@ntix/components-scorad 1.0.5 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/@ntix/components-scorad.es.js +126 -106
- package/dist/@ntix/components-scorad.umd.js +25 -25
- package/dist/componentsScoradLogger.d.ts +2 -5
- package/dist/getScoradScore.d.ts +2 -1
- package/dist/validateScoradData.d.ts +2 -1
- package/docs/componentsScoradLogger.md +1 -2
- package/docs/getScoradScore.md +219 -1
- package/docs/validateScoradData.md +1 -1
- package/package.json +34 -34
|
@@ -148,28 +148,43 @@ var Success = class {
|
|
|
148
148
|
this.value = e;
|
|
149
149
|
}
|
|
150
150
|
value;
|
|
151
|
+
getErrors() {
|
|
152
|
+
return Result.EMPTY_ERRORS;
|
|
153
|
+
}
|
|
151
154
|
orThrow() {
|
|
152
155
|
return this.value;
|
|
153
156
|
}
|
|
154
157
|
orNull() {
|
|
155
158
|
return this.value;
|
|
156
159
|
}
|
|
157
|
-
|
|
160
|
+
fold(e, t) {
|
|
161
|
+
return e(this.value);
|
|
162
|
+
}
|
|
158
163
|
}, Failure = class e {
|
|
159
164
|
constructor(e) {
|
|
165
|
+
if (!e?.length) throw Error("errors are required");
|
|
160
166
|
this.errors = e;
|
|
161
167
|
}
|
|
162
168
|
errors;
|
|
169
|
+
getErrors() {
|
|
170
|
+
return this.errors;
|
|
171
|
+
}
|
|
163
172
|
orThrow() {
|
|
164
173
|
throw Error(e.formatErrors(this.errors));
|
|
165
174
|
}
|
|
166
175
|
orNull() {
|
|
167
176
|
return null;
|
|
168
177
|
}
|
|
178
|
+
fold(e, t) {
|
|
179
|
+
return t(this.errors);
|
|
180
|
+
}
|
|
169
181
|
static formatErrors = (e) => e.join("\n");
|
|
170
182
|
}, Result = {
|
|
183
|
+
EMPTY_ERRORS: Object.freeze([]),
|
|
171
184
|
Ok: (e) => new Success(e),
|
|
172
|
-
Fail: (e) => new Failure(e)
|
|
185
|
+
Fail: (e) => new Failure(e),
|
|
186
|
+
isSuccess: (e) => e instanceof Success,
|
|
187
|
+
isFailure: (e) => e instanceof Failure
|
|
173
188
|
}, padNumber = (e, t) => e.toString().padStart(t, "0").slice(-t), toKebabCase = (e) => e == null ? e : e?.replace(/[A-Z]+(?![a-z])|[A-Z]/g, (e, t) => (t ? "-" : "") + e).toLowerCase();
|
|
174
189
|
function Att(e = {}) {
|
|
175
190
|
return function(t, r) {
|
|
@@ -553,15 +568,15 @@ var html$1 = freeze(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.a
|
|
|
553
568
|
};
|
|
554
569
|
function createDOMPurify() {
|
|
555
570
|
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : getGlobal(), t = (e) => createDOMPurify(e);
|
|
556
|
-
if (t.version = "3.3.
|
|
571
|
+
if (t.version = "3.3.1", t.removed = [], !e || !e.document || e.document.nodeType !== NODE_TYPE.document || !e.Element) return t.isSupported = !1, t;
|
|
557
572
|
let { document: n } = e, r = n, i = r.currentScript, { DocumentFragment: a, HTMLTemplateElement: o, Node: s, Element: c, NodeFilter: l, NamedNodeMap: u = e.NamedNodeMap || e.MozNamedAttrMap, HTMLFormElement: d, DOMParser: f, trustedTypes: p } = e, m = c.prototype, h = lookupGetter(m, "cloneNode"), g = lookupGetter(m, "remove"), _ = lookupGetter(m, "nextSibling"), ze = lookupGetter(m, "childNodes"), v = lookupGetter(m, "parentNode");
|
|
558
573
|
if (typeof o == "function") {
|
|
559
574
|
let e = n.createElement("template");
|
|
560
575
|
e.content && e.content.ownerDocument && (n = e.content.ownerDocument);
|
|
561
576
|
}
|
|
562
|
-
let y, b = "", { implementation:
|
|
563
|
-
t.isSupported = typeof entries == "function" && typeof v == "function" &&
|
|
564
|
-
let { MUSTACHE_EXPR:
|
|
577
|
+
let y, b = "", { implementation: Be, createNodeIterator: Ve, createDocumentFragment: He, getElementsByTagName: Ue } = n, { importNode: We } = r, x = _createHooksMap();
|
|
578
|
+
t.isSupported = typeof entries == "function" && typeof v == "function" && Be && Be.createHTMLDocument !== void 0;
|
|
579
|
+
let { MUSTACHE_EXPR: S, ERB_EXPR: C, TMPLIT_EXPR: w, DATA_ATTR: Ge, ARIA_ATTR: Ke, IS_SCRIPT_OR_DATA: qe, ATTR_WHITESPACE: Je, CUSTOM_ELEMENT: Ye } = EXPRESSIONS, { IS_ALLOWED_URI: Xe } = EXPRESSIONS, T = null, Ze = addToSet({}, [
|
|
565
580
|
...html$1,
|
|
566
581
|
...svg$1,
|
|
567
582
|
...svgFilters,
|
|
@@ -591,7 +606,7 @@ function createDOMPurify() {
|
|
|
591
606
|
enumerable: !0,
|
|
592
607
|
value: !1
|
|
593
608
|
}
|
|
594
|
-
})), O = null,
|
|
609
|
+
})), O = null, k = null, A = Object.seal(create(null, {
|
|
595
610
|
tagCheck: {
|
|
596
611
|
writable: !0,
|
|
597
612
|
configurable: !1,
|
|
@@ -604,7 +619,7 @@ function createDOMPurify() {
|
|
|
604
619
|
enumerable: !0,
|
|
605
620
|
value: null
|
|
606
621
|
}
|
|
607
|
-
})),
|
|
622
|
+
})), $e = !0, j = !0, et = !1, tt = !0, M = !1, N = !0, P = !1, nt = !1, rt = !1, F = !1, I = !1, L = !1, it = !0, at = !1, ot = !0, R = !1, z = {}, B = null, st = addToSet({}, [
|
|
608
623
|
"annotation-xml",
|
|
609
624
|
"audio",
|
|
610
625
|
"colgroup",
|
|
@@ -630,14 +645,14 @@ function createDOMPurify() {
|
|
|
630
645
|
"title",
|
|
631
646
|
"video",
|
|
632
647
|
"xmp"
|
|
633
|
-
]),
|
|
648
|
+
]), ct = null, lt = addToSet({}, [
|
|
634
649
|
"audio",
|
|
635
650
|
"video",
|
|
636
651
|
"img",
|
|
637
652
|
"source",
|
|
638
653
|
"image",
|
|
639
654
|
"track"
|
|
640
|
-
]),
|
|
655
|
+
]), ut = null, dt = addToSet({}, [
|
|
641
656
|
"alt",
|
|
642
657
|
"class",
|
|
643
658
|
"for",
|
|
@@ -652,28 +667,28 @@ function createDOMPurify() {
|
|
|
652
667
|
"value",
|
|
653
668
|
"style",
|
|
654
669
|
"xmlns"
|
|
655
|
-
]), V = "http://www.w3.org/1998/Math/MathML", H = "http://www.w3.org/2000/svg", U = "http://www.w3.org/1999/xhtml", W = U,
|
|
670
|
+
]), V = "http://www.w3.org/1998/Math/MathML", H = "http://www.w3.org/2000/svg", U = "http://www.w3.org/1999/xhtml", W = U, ft = !1, pt = null, mt = addToSet({}, [
|
|
656
671
|
V,
|
|
657
672
|
H,
|
|
658
673
|
U
|
|
659
|
-
], stringToString),
|
|
674
|
+
], stringToString), G = addToSet({}, [
|
|
660
675
|
"mi",
|
|
661
676
|
"mo",
|
|
662
677
|
"mn",
|
|
663
678
|
"ms",
|
|
664
679
|
"mtext"
|
|
665
|
-
]),
|
|
680
|
+
]), K = addToSet({}, ["annotation-xml"]), ht = addToSet({}, [
|
|
666
681
|
"title",
|
|
667
682
|
"style",
|
|
668
683
|
"font",
|
|
669
684
|
"a",
|
|
670
685
|
"script"
|
|
671
|
-
]),
|
|
686
|
+
]), q = null, gt = ["application/xhtml+xml", "text/html"], J = null, Y = null, _t = n.createElement("form"), vt = function(e) {
|
|
672
687
|
return e instanceof RegExp || e instanceof Function;
|
|
673
|
-
},
|
|
688
|
+
}, yt = function() {
|
|
674
689
|
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
675
|
-
if (!(
|
|
676
|
-
if ((!e || typeof e != "object") && (e = {}), e = clone(e),
|
|
690
|
+
if (!(Y && Y === e)) {
|
|
691
|
+
if ((!e || typeof e != "object") && (e = {}), e = clone(e), q = gt.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? "text/html" : e.PARSER_MEDIA_TYPE, J = q === "application/xhtml+xml" ? stringToString : stringToLowerCase, T = objectHasOwnProperty(e, "ALLOWED_TAGS") ? addToSet({}, e.ALLOWED_TAGS, J) : Ze, E = objectHasOwnProperty(e, "ALLOWED_ATTR") ? addToSet({}, e.ALLOWED_ATTR, J) : Qe, pt = objectHasOwnProperty(e, "ALLOWED_NAMESPACES") ? addToSet({}, e.ALLOWED_NAMESPACES, stringToString) : mt, ut = objectHasOwnProperty(e, "ADD_URI_SAFE_ATTR") ? addToSet(clone(dt), e.ADD_URI_SAFE_ATTR, J) : dt, ct = objectHasOwnProperty(e, "ADD_DATA_URI_TAGS") ? addToSet(clone(lt), e.ADD_DATA_URI_TAGS, J) : lt, B = objectHasOwnProperty(e, "FORBID_CONTENTS") ? addToSet({}, e.FORBID_CONTENTS, J) : st, O = objectHasOwnProperty(e, "FORBID_TAGS") ? addToSet({}, e.FORBID_TAGS, J) : clone({}), k = objectHasOwnProperty(e, "FORBID_ATTR") ? addToSet({}, e.FORBID_ATTR, J) : clone({}), z = objectHasOwnProperty(e, "USE_PROFILES") ? e.USE_PROFILES : !1, $e = e.ALLOW_ARIA_ATTR !== !1, j = e.ALLOW_DATA_ATTR !== !1, et = e.ALLOW_UNKNOWN_PROTOCOLS || !1, tt = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, M = e.SAFE_FOR_TEMPLATES || !1, N = e.SAFE_FOR_XML !== !1, P = e.WHOLE_DOCUMENT || !1, F = e.RETURN_DOM || !1, I = e.RETURN_DOM_FRAGMENT || !1, L = e.RETURN_TRUSTED_TYPE || !1, rt = e.FORCE_BODY || !1, it = e.SANITIZE_DOM !== !1, at = e.SANITIZE_NAMED_PROPS || !1, ot = e.KEEP_CONTENT !== !1, R = e.IN_PLACE || !1, Xe = e.ALLOWED_URI_REGEXP || IS_ALLOWED_URI, W = e.NAMESPACE || U, G = e.MATHML_TEXT_INTEGRATION_POINTS || G, K = e.HTML_INTEGRATION_POINTS || K, D = e.CUSTOM_ELEMENT_HANDLING || {}, e.CUSTOM_ELEMENT_HANDLING && vt(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (D.tagNameCheck = e.CUSTOM_ELEMENT_HANDLING.tagNameCheck), e.CUSTOM_ELEMENT_HANDLING && vt(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (D.attributeNameCheck = e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), e.CUSTOM_ELEMENT_HANDLING && typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (D.allowCustomizedBuiltInElements = e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), M && (j = !1), I && (F = !0), z && (T = addToSet({}, text), E = [], z.html === !0 && (addToSet(T, html$1), addToSet(E, html$2)), z.svg === !0 && (addToSet(T, svg$1), addToSet(E, svg), addToSet(E, xml)), z.svgFilters === !0 && (addToSet(T, svgFilters), addToSet(E, svg), addToSet(E, xml)), z.mathMl === !0 && (addToSet(T, mathMl$1), addToSet(E, mathMl), addToSet(E, xml))), e.ADD_TAGS && (typeof e.ADD_TAGS == "function" ? A.tagCheck = e.ADD_TAGS : (T === Ze && (T = clone(T)), addToSet(T, e.ADD_TAGS, J))), e.ADD_ATTR && (typeof e.ADD_ATTR == "function" ? A.attributeCheck = e.ADD_ATTR : (E === Qe && (E = clone(E)), addToSet(E, e.ADD_ATTR, J))), e.ADD_URI_SAFE_ATTR && addToSet(ut, e.ADD_URI_SAFE_ATTR, J), e.FORBID_CONTENTS && (B === st && (B = clone(B)), addToSet(B, e.FORBID_CONTENTS, J)), e.ADD_FORBID_CONTENTS && (B === st && (B = clone(B)), addToSet(B, e.ADD_FORBID_CONTENTS, J)), ot && (T["#text"] = !0), P && addToSet(T, [
|
|
677
692
|
"html",
|
|
678
693
|
"head",
|
|
679
694
|
"body"
|
|
@@ -682,28 +697,28 @@ function createDOMPurify() {
|
|
|
682
697
|
if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw typeErrorCreate("TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.");
|
|
683
698
|
y = e.TRUSTED_TYPES_POLICY, b = y.createHTML("");
|
|
684
699
|
} else y === void 0 && (y = _createTrustedTypesPolicy(p, i)), y !== null && typeof b == "string" && (b = y.createHTML(""));
|
|
685
|
-
freeze && freeze(e),
|
|
700
|
+
freeze && freeze(e), Y = e;
|
|
686
701
|
}
|
|
687
|
-
},
|
|
702
|
+
}, bt = addToSet({}, [
|
|
688
703
|
...svg$1,
|
|
689
704
|
...svgFilters,
|
|
690
705
|
...svgDisallowed
|
|
691
|
-
]),
|
|
706
|
+
]), xt = addToSet({}, [...mathMl$1, ...mathMlDisallowed]), St = function(e) {
|
|
692
707
|
let t = v(e);
|
|
693
708
|
(!t || !t.tagName) && (t = {
|
|
694
709
|
namespaceURI: W,
|
|
695
710
|
tagName: "template"
|
|
696
711
|
});
|
|
697
712
|
let n = stringToLowerCase(e.tagName), r = stringToLowerCase(t.tagName);
|
|
698
|
-
return
|
|
699
|
-
},
|
|
713
|
+
return pt[e.namespaceURI] ? e.namespaceURI === H ? t.namespaceURI === U ? n === "svg" : t.namespaceURI === V ? n === "svg" && (r === "annotation-xml" || G[r]) : !!bt[n] : e.namespaceURI === V ? t.namespaceURI === U ? n === "math" : t.namespaceURI === H ? n === "math" && K[r] : !!xt[n] : e.namespaceURI === U ? t.namespaceURI === H && !K[r] || t.namespaceURI === V && !G[r] ? !1 : !xt[n] && (ht[n] || !bt[n]) : !!(q === "application/xhtml+xml" && pt[e.namespaceURI]) : !1;
|
|
714
|
+
}, X = function(e) {
|
|
700
715
|
arrayPush(t.removed, { element: e });
|
|
701
716
|
try {
|
|
702
717
|
v(e).removeChild(e);
|
|
703
718
|
} catch {
|
|
704
719
|
g(e);
|
|
705
720
|
}
|
|
706
|
-
},
|
|
721
|
+
}, Z = function(e, n) {
|
|
707
722
|
try {
|
|
708
723
|
arrayPush(t.removed, {
|
|
709
724
|
attribute: n.getAttributeNode(e),
|
|
@@ -715,55 +730,55 @@ function createDOMPurify() {
|
|
|
715
730
|
from: n
|
|
716
731
|
});
|
|
717
732
|
}
|
|
718
|
-
if (n.removeAttribute(e), e === "is") if (
|
|
719
|
-
|
|
733
|
+
if (n.removeAttribute(e), e === "is") if (F || I) try {
|
|
734
|
+
X(n);
|
|
720
735
|
} catch {}
|
|
721
736
|
else try {
|
|
722
737
|
n.setAttribute(e, "");
|
|
723
738
|
} catch {}
|
|
724
|
-
},
|
|
739
|
+
}, Ct = function(e) {
|
|
725
740
|
let t = null, r = null;
|
|
726
|
-
if (
|
|
741
|
+
if (rt) e = "<remove></remove>" + e;
|
|
727
742
|
else {
|
|
728
743
|
let t = stringMatch(e, /^[\r\n\t ]+/);
|
|
729
744
|
r = t && t[0];
|
|
730
745
|
}
|
|
731
|
-
|
|
746
|
+
q === "application/xhtml+xml" && W === U && (e = "<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>" + e + "</body></html>");
|
|
732
747
|
let i = y ? y.createHTML(e) : e;
|
|
733
748
|
if (W === U) try {
|
|
734
|
-
t = new f().parseFromString(i,
|
|
749
|
+
t = new f().parseFromString(i, q);
|
|
735
750
|
} catch {}
|
|
736
751
|
if (!t || !t.documentElement) {
|
|
737
|
-
t =
|
|
752
|
+
t = Be.createDocument(W, "template", null);
|
|
738
753
|
try {
|
|
739
|
-
t.documentElement.innerHTML =
|
|
754
|
+
t.documentElement.innerHTML = ft ? b : i;
|
|
740
755
|
} catch {}
|
|
741
756
|
}
|
|
742
757
|
let a = t.body || t.documentElement;
|
|
743
|
-
return e && r && a.insertBefore(n.createTextNode(r), a.childNodes[0] || null), W === U ?
|
|
744
|
-
}, Ct = function(e) {
|
|
745
|
-
return Be.call(e.ownerDocument || e, e, l.SHOW_ELEMENT | l.SHOW_COMMENT | l.SHOW_TEXT | l.SHOW_PROCESSING_INSTRUCTION | l.SHOW_CDATA_SECTION, null);
|
|
758
|
+
return e && r && a.insertBefore(n.createTextNode(r), a.childNodes[0] || null), W === U ? Ue.call(t, P ? "html" : "body")[0] : P ? t.documentElement : a;
|
|
746
759
|
}, wt = function(e) {
|
|
760
|
+
return Ve.call(e.ownerDocument || e, e, l.SHOW_ELEMENT | l.SHOW_COMMENT | l.SHOW_TEXT | l.SHOW_PROCESSING_INSTRUCTION | l.SHOW_CDATA_SECTION, null);
|
|
761
|
+
}, Q = function(e) {
|
|
747
762
|
return e instanceof d && (typeof e.nodeName != "string" || typeof e.textContent != "string" || typeof e.removeChild != "function" || !(e.attributes instanceof u) || typeof e.removeAttribute != "function" || typeof e.setAttribute != "function" || typeof e.namespaceURI != "string" || typeof e.insertBefore != "function" || typeof e.hasChildNodes != "function");
|
|
748
763
|
}, Tt = function(e) {
|
|
749
764
|
return typeof s == "function" && e instanceof s;
|
|
750
765
|
};
|
|
751
766
|
function $(e, n, r) {
|
|
752
767
|
arrayForEach(e, (e) => {
|
|
753
|
-
e.call(t, n, r,
|
|
768
|
+
e.call(t, n, r, Y);
|
|
754
769
|
});
|
|
755
770
|
}
|
|
756
771
|
let Et = function(e) {
|
|
757
772
|
let n = null;
|
|
758
|
-
if ($(
|
|
759
|
-
let r =
|
|
760
|
-
if ($(
|
|
773
|
+
if ($(x.beforeSanitizeElements, e, null), Q(e)) return X(e), !0;
|
|
774
|
+
let r = J(e.nodeName);
|
|
775
|
+
if ($(x.uponSanitizeElement, e, {
|
|
761
776
|
tagName: r,
|
|
762
777
|
allowedTags: T
|
|
763
|
-
}),
|
|
764
|
-
if (!(
|
|
778
|
+
}), N && e.hasChildNodes() && !Tt(e.firstElementChild) && regExpTest(/<[/\w!]/g, e.innerHTML) && regExpTest(/<[/\w!]/g, e.textContent) || e.nodeType === NODE_TYPE.progressingInstruction || N && e.nodeType === NODE_TYPE.comment && regExpTest(/<[/\w]/g, e.data)) return X(e), !0;
|
|
779
|
+
if (!(A.tagCheck instanceof Function && A.tagCheck(r)) && (!T[r] || O[r])) {
|
|
765
780
|
if (!O[r] && Ot(r) && (D.tagNameCheck instanceof RegExp && regExpTest(D.tagNameCheck, r) || D.tagNameCheck instanceof Function && D.tagNameCheck(r))) return !1;
|
|
766
|
-
if (
|
|
781
|
+
if (ot && !B[r]) {
|
|
767
782
|
let t = v(e) || e.parentNode, n = ze(e) || e.childNodes;
|
|
768
783
|
if (n && t) {
|
|
769
784
|
let r = n.length;
|
|
@@ -773,29 +788,29 @@ function createDOMPurify() {
|
|
|
773
788
|
}
|
|
774
789
|
}
|
|
775
790
|
}
|
|
776
|
-
return
|
|
791
|
+
return X(e), !0;
|
|
777
792
|
}
|
|
778
|
-
return e instanceof c && !
|
|
793
|
+
return e instanceof c && !St(e) || (r === "noscript" || r === "noembed" || r === "noframes") && regExpTest(/<\/no(script|embed|frames)/i, e.innerHTML) ? (X(e), !0) : (M && e.nodeType === NODE_TYPE.text && (n = e.textContent, arrayForEach([
|
|
794
|
+
S,
|
|
779
795
|
C,
|
|
780
|
-
w
|
|
781
|
-
We
|
|
796
|
+
w
|
|
782
797
|
], (e) => {
|
|
783
798
|
n = stringReplace(n, e, " ");
|
|
784
|
-
}), e.textContent !== n && (arrayPush(t.removed, { element: e.cloneNode() }), e.textContent = n)), $(
|
|
799
|
+
}), e.textContent !== n && (arrayPush(t.removed, { element: e.cloneNode() }), e.textContent = n)), $(x.afterSanitizeElements, e, null), !1);
|
|
785
800
|
}, Dt = function(e, t, r) {
|
|
786
|
-
if (
|
|
787
|
-
if (!(
|
|
788
|
-
if (!E[t] ||
|
|
801
|
+
if (it && (t === "id" || t === "name") && (r in n || r in _t)) return !1;
|
|
802
|
+
if (!(j && !k[t] && regExpTest(Ge, t)) && !($e && regExpTest(Ke, t)) && !(A.attributeCheck instanceof Function && A.attributeCheck(t, e))) {
|
|
803
|
+
if (!E[t] || k[t]) {
|
|
789
804
|
if (!(Ot(e) && (D.tagNameCheck instanceof RegExp && regExpTest(D.tagNameCheck, e) || D.tagNameCheck instanceof Function && D.tagNameCheck(e)) && (D.attributeNameCheck instanceof RegExp && regExpTest(D.attributeNameCheck, t) || D.attributeNameCheck instanceof Function && D.attributeNameCheck(t, e)) || t === "is" && D.allowCustomizedBuiltInElements && (D.tagNameCheck instanceof RegExp && regExpTest(D.tagNameCheck, r) || D.tagNameCheck instanceof Function && D.tagNameCheck(r)))) return !1;
|
|
790
|
-
} else if (!
|
|
805
|
+
} else if (!ut[t] && !regExpTest(Xe, stringReplace(r, Je, "")) && !((t === "src" || t === "xlink:href" || t === "href") && e !== "script" && stringIndexOf(r, "data:") === 0 && ct[e]) && !(et && !regExpTest(qe, stringReplace(r, Je, ""))) && r) return !1;
|
|
791
806
|
}
|
|
792
807
|
return !0;
|
|
793
808
|
}, Ot = function(e) {
|
|
794
809
|
return e !== "annotation-xml" && stringMatch(e, Ye);
|
|
795
810
|
}, kt = function(e) {
|
|
796
|
-
$(
|
|
811
|
+
$(x.beforeSanitizeAttributes, e, null);
|
|
797
812
|
let { attributes: n } = e;
|
|
798
|
-
if (!n ||
|
|
813
|
+
if (!n || Q(e)) return;
|
|
799
814
|
let r = {
|
|
800
815
|
attrName: "",
|
|
801
816
|
attrValue: "",
|
|
@@ -804,34 +819,34 @@ function createDOMPurify() {
|
|
|
804
819
|
forceKeepAttr: void 0
|
|
805
820
|
}, i = n.length;
|
|
806
821
|
for (; i--;) {
|
|
807
|
-
let { name: a, namespaceURI: o, value: s } = n[i], c =
|
|
808
|
-
if (r.attrName = c, r.attrValue = u, r.keepAttr = !0, r.forceKeepAttr = void 0, $(
|
|
809
|
-
|
|
822
|
+
let { name: a, namespaceURI: o, value: s } = n[i], c = J(a), l = s, u = a === "value" ? l : stringTrim(l);
|
|
823
|
+
if (r.attrName = c, r.attrValue = u, r.keepAttr = !0, r.forceKeepAttr = void 0, $(x.uponSanitizeAttribute, e, r), u = r.attrValue, at && (c === "id" || c === "name") && (Z(a, e), u = "user-content-" + u), N && regExpTest(/((--!?|])>)|<\/(style|title|textarea)/i, u)) {
|
|
824
|
+
Z(a, e);
|
|
810
825
|
continue;
|
|
811
826
|
}
|
|
812
827
|
if (c === "attributename" && stringMatch(u, "href")) {
|
|
813
|
-
|
|
828
|
+
Z(a, e);
|
|
814
829
|
continue;
|
|
815
830
|
}
|
|
816
831
|
if (r.forceKeepAttr) continue;
|
|
817
832
|
if (!r.keepAttr) {
|
|
818
|
-
|
|
833
|
+
Z(a, e);
|
|
819
834
|
continue;
|
|
820
835
|
}
|
|
821
|
-
if (!
|
|
822
|
-
|
|
836
|
+
if (!tt && regExpTest(/\/>/i, u)) {
|
|
837
|
+
Z(a, e);
|
|
823
838
|
continue;
|
|
824
839
|
}
|
|
825
|
-
|
|
840
|
+
M && arrayForEach([
|
|
841
|
+
S,
|
|
826
842
|
C,
|
|
827
|
-
w
|
|
828
|
-
We
|
|
843
|
+
w
|
|
829
844
|
], (e) => {
|
|
830
845
|
u = stringReplace(u, e, " ");
|
|
831
846
|
});
|
|
832
|
-
let d =
|
|
847
|
+
let d = J(e.nodeName);
|
|
833
848
|
if (!Dt(d, c, u)) {
|
|
834
|
-
|
|
849
|
+
Z(a, e);
|
|
835
850
|
continue;
|
|
836
851
|
}
|
|
837
852
|
if (y && typeof p == "object" && typeof p.getAttributeType == "function" && !o) switch (p.getAttributeType(d, c)) {
|
|
@@ -843,68 +858,68 @@ function createDOMPurify() {
|
|
|
843
858
|
break;
|
|
844
859
|
}
|
|
845
860
|
if (u !== l) try {
|
|
846
|
-
o ? e.setAttributeNS(o, a, u) : e.setAttribute(a, u),
|
|
861
|
+
o ? e.setAttributeNS(o, a, u) : e.setAttribute(a, u), Q(e) ? X(e) : arrayPop(t.removed);
|
|
847
862
|
} catch {
|
|
848
|
-
|
|
863
|
+
Z(a, e);
|
|
849
864
|
}
|
|
850
865
|
}
|
|
851
|
-
$(
|
|
866
|
+
$(x.afterSanitizeAttributes, e, null);
|
|
852
867
|
}, At = function e(t) {
|
|
853
|
-
let n = null, r =
|
|
854
|
-
for ($(
|
|
855
|
-
$(
|
|
868
|
+
let n = null, r = wt(t);
|
|
869
|
+
for ($(x.beforeSanitizeShadowDOM, t, null); n = r.nextNode();) $(x.uponSanitizeShadowNode, n, null), Et(n), kt(n), n.content instanceof a && e(n.content);
|
|
870
|
+
$(x.afterSanitizeShadowDOM, t, null);
|
|
856
871
|
};
|
|
857
872
|
return t.sanitize = function(e) {
|
|
858
873
|
let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, i = null, o = null, c = null, l = null;
|
|
859
|
-
if (
|
|
874
|
+
if (ft = !e, ft && (e = "<!-->"), typeof e != "string" && !Tt(e)) if (typeof e.toString == "function") {
|
|
860
875
|
if (e = e.toString(), typeof e != "string") throw typeErrorCreate("dirty is not a string, aborting");
|
|
861
876
|
} else throw typeErrorCreate("toString is not a function");
|
|
862
877
|
if (!t.isSupported) return e;
|
|
863
|
-
if (
|
|
878
|
+
if (nt || yt(n), t.removed = [], typeof e == "string" && (R = !1), R) {
|
|
864
879
|
if (e.nodeName) {
|
|
865
|
-
let t =
|
|
880
|
+
let t = J(e.nodeName);
|
|
866
881
|
if (!T[t] || O[t]) throw typeErrorCreate("root node is forbidden and cannot be sanitized in-place");
|
|
867
882
|
}
|
|
868
|
-
} else if (e instanceof s) i =
|
|
883
|
+
} else if (e instanceof s) i = Ct("<!---->"), o = i.ownerDocument.importNode(e, !0), o.nodeType === NODE_TYPE.element && o.nodeName === "BODY" || o.nodeName === "HTML" ? i = o : i.appendChild(o);
|
|
869
884
|
else {
|
|
870
|
-
if (!
|
|
871
|
-
if (i =
|
|
885
|
+
if (!F && !M && !P && e.indexOf("<") === -1) return y && L ? y.createHTML(e) : e;
|
|
886
|
+
if (i = Ct(e), !i) return F ? null : L ? b : "";
|
|
872
887
|
}
|
|
873
|
-
i &&
|
|
874
|
-
let u =
|
|
888
|
+
i && rt && X(i.firstChild);
|
|
889
|
+
let u = wt(R ? e : i);
|
|
875
890
|
for (; c = u.nextNode();) Et(c), kt(c), c.content instanceof a && At(c.content);
|
|
876
|
-
if (
|
|
877
|
-
if (
|
|
878
|
-
if (
|
|
891
|
+
if (R) return e;
|
|
892
|
+
if (F) {
|
|
893
|
+
if (I) for (l = He.call(i.ownerDocument); i.firstChild;) l.appendChild(i.firstChild);
|
|
879
894
|
else l = i;
|
|
880
|
-
return (E.shadowroot || E.shadowrootmode) && (l =
|
|
895
|
+
return (E.shadowroot || E.shadowrootmode) && (l = We.call(r, l, !0)), l;
|
|
881
896
|
}
|
|
882
|
-
let d =
|
|
883
|
-
return
|
|
897
|
+
let d = P ? i.outerHTML : i.innerHTML;
|
|
898
|
+
return P && T["!doctype"] && i.ownerDocument && i.ownerDocument.doctype && i.ownerDocument.doctype.name && regExpTest(DOCTYPE_NAME, i.ownerDocument.doctype.name) && (d = "<!DOCTYPE " + i.ownerDocument.doctype.name + ">\n" + d), M && arrayForEach([
|
|
899
|
+
S,
|
|
884
900
|
C,
|
|
885
|
-
w
|
|
886
|
-
We
|
|
901
|
+
w
|
|
887
902
|
], (e) => {
|
|
888
903
|
d = stringReplace(d, e, " ");
|
|
889
|
-
}), y &&
|
|
904
|
+
}), y && L ? y.createHTML(d) : d;
|
|
890
905
|
}, t.setConfig = function() {
|
|
891
|
-
|
|
906
|
+
yt(arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}), nt = !0;
|
|
892
907
|
}, t.clearConfig = function() {
|
|
893
|
-
|
|
908
|
+
Y = null, nt = !1;
|
|
894
909
|
}, t.isValidAttribute = function(e, t, n) {
|
|
895
|
-
return
|
|
910
|
+
return Y || yt({}), Dt(J(e), J(t), n);
|
|
896
911
|
}, t.addHook = function(e, t) {
|
|
897
|
-
typeof t == "function" && arrayPush(
|
|
912
|
+
typeof t == "function" && arrayPush(x[e], t);
|
|
898
913
|
}, t.removeHook = function(e, t) {
|
|
899
914
|
if (t !== void 0) {
|
|
900
|
-
let n = arrayLastIndexOf(
|
|
901
|
-
return n === -1 ? void 0 : arraySplice(
|
|
915
|
+
let n = arrayLastIndexOf(x[e], t);
|
|
916
|
+
return n === -1 ? void 0 : arraySplice(x[e], n, 1)[0];
|
|
902
917
|
}
|
|
903
|
-
return arrayPop(
|
|
918
|
+
return arrayPop(x[e]);
|
|
904
919
|
}, t.removeHooks = function(e) {
|
|
905
|
-
|
|
920
|
+
x[e] = [];
|
|
906
921
|
}, t.removeAllHooks = function() {
|
|
907
|
-
|
|
922
|
+
x = _createHooksMap();
|
|
908
923
|
}, t;
|
|
909
924
|
}
|
|
910
925
|
var purify = createDOMPurify(), HTMLConfig = { sanitize: (e) => purify.sanitize(e) }, html = (e, ...t) => new HTMLLiteralResult(e.reduce((e, n, r) => {
|
|
@@ -1406,12 +1421,17 @@ var component_default$3 = ":host{--host-display:inline-flex;--scorad-label-text-
|
|
|
1406
1421
|
}
|
|
1407
1422
|
renderLevel(e) {
|
|
1408
1423
|
let t = (t) => {
|
|
1409
|
-
t && t.addEventListener("value-input", (t) => {
|
|
1424
|
+
t && (t.addEventListener("value-input", (t) => {
|
|
1410
1425
|
this.value = {
|
|
1411
1426
|
...this.value,
|
|
1412
1427
|
[e]: t.detail
|
|
1413
|
-
}, this.valueInput(this.value);
|
|
1414
|
-
})
|
|
1428
|
+
}, this.errors = void 0, this.valueInput(this.value);
|
|
1429
|
+
}), t.addEventListener("value-change", (t) => {
|
|
1430
|
+
this.value = {
|
|
1431
|
+
...this.value,
|
|
1432
|
+
[e]: t.detail
|
|
1433
|
+
}, this.errors = void 0, this.valueChange(this.value);
|
|
1434
|
+
}));
|
|
1415
1435
|
}, n = ScoradResources.subjective[e];
|
|
1416
1436
|
return html`
|
|
1417
1437
|
<scorad-label class="${toKebabCase(e)} row"
|
|
@@ -1478,12 +1498,12 @@ const getScoradScore = (e) => {
|
|
|
1478
1498
|
let t = validateScoradData(e);
|
|
1479
1499
|
if (t instanceof Failure) return t;
|
|
1480
1500
|
e = t.value;
|
|
1481
|
-
let n = selectScoradWeights(e), r = Object.entries(e.extent).reduce((e, [t, r]) => e + r * n[t], 0), i = Object.values(e.intensity).reduce((e, t) => e + t, 0), a = e.subjective.pruritus + e.subjective.sleeplessness, o = Math.round((r / 5 + 7 * i / 2 + a)
|
|
1501
|
+
let n = selectScoradWeights(e), r = Object.entries(e.extent).reduce((e, [t, r]) => e + r * n[t], 0), i = Object.values(e.intensity).reduce((e, t) => e + t, 0), a = e.subjective.pruritus + e.subjective.sleeplessness, o = (e) => Math.round((e + 2 ** -52) * 100) / 100, s = o(r / 5 + 7 * i / 2 + a);
|
|
1482
1502
|
return Result.Ok({
|
|
1483
|
-
A: r,
|
|
1503
|
+
A: o(r),
|
|
1484
1504
|
B: i,
|
|
1485
1505
|
C: a,
|
|
1486
|
-
total:
|
|
1506
|
+
total: s
|
|
1487
1507
|
});
|
|
1488
1508
|
};
|
|
1489
1509
|
var component_default$1 = ":host{--host-display:var(--scorad-label-display,inline-flex);--host-options:var(--scorad-label-options,solid 1px var(--host-color));--host-text-min-width:var(--scorad-label-text-min-width,none);--host-text-max-width:var(--scorad-label-text-max-width,none);grid-column:1/3;grid-template-columns:subgrid;padding:var(--host-padding-unit);border-radius:var(--host-border-radius-outer);flex-wrap:wrap;align-content:baseline;align-items:baseline;position:relative}:host(:hover){outline:var(--host-outline-hover)}:host(:focus-within){outline:var(--host-outline-focus)}:host>label{min-width:var(--host-text-min-width);max-width:var(--host-text-max-width)}:host>label>slot[name=text]{transition:all .2s ease-in-out;display:block}:host>label>slot[name=description]{opacity:0;margin-bottom:-1.1em;transition:all .4s ease-in-out;display:block}:host(:hover)>label>slot[name=text],:host(:focus-within)>label>slot[name=text]{transform:translateY(-.5em)}:host(:hover)>label>slot[name=description],:host(:focus-within)>label>slot[name=description]{opacity:.667;transform:translateY(-.6em)}@media print{:host>label>slot[name=text]{transform:translateY(-.5em)}:host>label>slot[name=description]{opacity:.667;transform:translateY(-.6em)}}:host>label{padding:var(--host-padding-unit);flex:1;padding-left:0}", tag$1 = "scorad-label", HTMLScoradLabelElement = class extends HTMLComponentElement {
|
|
@@ -1527,10 +1547,10 @@ var tag = "scorad-component", HTMLScoradElement = class extends HTMLComponentEle
|
|
|
1527
1547
|
if (!this.shadowRoot) return;
|
|
1528
1548
|
let e = this.shadowRoot.querySelector("#score");
|
|
1529
1549
|
if (!e) return;
|
|
1530
|
-
let t = getScoradScore(this.value).orNull(), n = {}, r = validateScoradData(this.value).
|
|
1550
|
+
let t = getScoradScore(this.value).orNull(), n = Object.freeze({}), r = validateScoradData(this.value).fold((e) => n, (e) => e.reduce((e, t) => {
|
|
1531
1551
|
let n = t.indexOf(":");
|
|
1532
1552
|
return setValue(e, t.substring(0, n), t.substring(n + 2));
|
|
1533
|
-
}, n);
|
|
1553
|
+
}, n));
|
|
1534
1554
|
e.innerText = `${t?.total ?? "Get Score"}`, e.style.color = this.showErrors && r != n ? "var(--host-error-color)" : "";
|
|
1535
1555
|
let i = this.shadowRoot.querySelector("scorad-subjective");
|
|
1536
1556
|
i && (i.value = this.value?.subjective ?? SCORAD_SUBJECTIVE_DEFAULT, i.score = t?.B, i.readonly = this.readonly, this.showErrors && (i.errors = getValue(r, "subjective")));
|
|
@@ -1612,7 +1632,7 @@ var tag = "scorad-component", HTMLScoradElement = class extends HTMLComponentEle
|
|
|
1612
1632
|
|
|
1613
1633
|
<scorad-label id="score-label"
|
|
1614
1634
|
text="SCORAD"
|
|
1615
|
-
description="(A / 5) + (7
|
|
1635
|
+
description="(A / 5) + (7 × B / 2) + C"
|
|
1616
1636
|
${(e) => {
|
|
1617
1637
|
e instanceof HTMLScoradLabelElement && e.addEventListener("click", () => {
|
|
1618
1638
|
if (!this.shadowRoot) return;
|
|
@@ -1641,4 +1661,4 @@ __decorate([Att({
|
|
|
1641
1661
|
delegatesFocus: !0
|
|
1642
1662
|
})], HTMLScoradElement);
|
|
1643
1663
|
const componentsScoradLogger = provideLogger("@ntix/components-scorad", typeof ANTIX_COMPONENTS_SCORAD_LOG_LEVEL > "u" ? LogLevel.warn : ANTIX_COMPONENTS_SCORAD_LOG_LEVEL);
|
|
1644
|
-
export { HTMLScoradElement, HTMLScoradExtentElement, HTMLScoradIntensityElement, HTMLScoradLabelElement, HTMLScoradOptionsElement, HTMLScoradSubjectiveElement, HTMLScoradWeightingsElement, SCORAD_ADULT_WEIGHTS, SCORAD_CHILD_WEIGHTS, SCORAD_DEFAULT, SCORAD_EXTENT_DEFAULT, SCORAD_EXTENT_MAX_VALUE, SCORAD_INTENSITY_DEFAULT, SCORAD_INTENSITY_MAX_VALUE, SCORAD_SUBJECTIVE_DEFAULT, SCORAD_SUBJECTIVE_MAX_VALUE, ScoradResources, componentsScoradLogger, getScoradScore, selectScoradWeights, validateScoradData };
|
|
1664
|
+
export { Failure, HTMLScoradElement, HTMLScoradExtentElement, HTMLScoradIntensityElement, HTMLScoradLabelElement, HTMLScoradOptionsElement, HTMLScoradSubjectiveElement, HTMLScoradWeightingsElement, LogLevel, Result, SCORAD_ADULT_WEIGHTS, SCORAD_CHILD_WEIGHTS, SCORAD_DEFAULT, SCORAD_EXTENT_DEFAULT, SCORAD_EXTENT_MAX_VALUE, SCORAD_INTENSITY_DEFAULT, SCORAD_INTENSITY_MAX_VALUE, SCORAD_SUBJECTIVE_DEFAULT, SCORAD_SUBJECTIVE_MAX_VALUE, ScoradResources, Success, componentsScoradLogger, getScoradScore, selectScoradWeights, validateScoradData };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports):typeof define==`function`&&define.amd?define([`exports`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.AntixComponentsScorad={}))})(this,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=new Map,n=e=>e==null?[]:(Array.isArray(e)||(e=[e]),e.map(e=>{if(t.has(e))return t.get(e);let n=new CSSStyleSheet;return n.replaceSync(e),t.set(e,n),n})),r=e=>{let t=e;return t.__metadata=t.__metadata??{attributes:[],watches:[],events:[]},t};(()=>{let e=`__drag_attached`;return{list:(t,n,r)=>{if(t.dataset[e])return;t.dataset[e]=`true`;let i=(e,n)=>e.find(e=>e instanceof HTMLElement&&t.contains(e)&&n(e)),a=(e,n,r=()=>!0)=>!(e instanceof Node)||!t.contains(e)?null:e==null||e instanceof HTMLElement&&r(e)?e:a(n(e),n,r),o=e=>a(e?.nextSibling,e=>e?.nextSibling),s=(e,t)=>n=>n instanceof HTMLElement&&(e??(e=>e.classList.contains(t)))(n),c=()=>Array.from(t.children).filter(u).reduce((e,t)=>e.set(t,t.getBoundingClientRect()),new Map),l=s(r?.gripSelector,`drag-grip`),u=s(r?.itemSelector,`drag-item`),d,f,p,m=0,h,
|
|
1
|
+
(function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports):typeof define==`function`&&define.amd?define([`exports`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.AntixComponentsScorad={}))})(this,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=new Map,n=e=>e==null?[]:(Array.isArray(e)||(e=[e]),e.map(e=>{if(t.has(e))return t.get(e);let n=new CSSStyleSheet;return n.replaceSync(e),t.set(e,n),n})),r=e=>{let t=e;return t.__metadata=t.__metadata??{attributes:[],watches:[],events:[]},t};(()=>{let e=`__drag_attached`;return{list:(t,n,r)=>{if(t.dataset[e])return;t.dataset[e]=`true`;let i=(e,n)=>e.find(e=>e instanceof HTMLElement&&t.contains(e)&&n(e)),a=(e,n,r=()=>!0)=>!(e instanceof Node)||!t.contains(e)?null:e==null||e instanceof HTMLElement&&r(e)?e:a(n(e),n,r),o=e=>a(e?.nextSibling,e=>e?.nextSibling),s=(e,t)=>n=>n instanceof HTMLElement&&(e??(e=>e.classList.contains(t)))(n),c=()=>Array.from(t.children).filter(u).reduce((e,t)=>e.set(t,t.getBoundingClientRect()),new Map),l=s(r?.gripSelector,`drag-grip`),u=s(r?.itemSelector,`drag-item`),d,f,p,m=0,h,g,_=e=>{let n=e.composedPath();d=i(n,l),d&&(e.preventDefault(),e.stopPropagation(),window.getSelection()?.removeAllRanges(),f=c(),p=i(n,u),m=e.clientY,h=p.dataset.id,p.classList.add(`dragging`),p.style.pointerEvents=`none`,p.style.zIndex=`2`,t.style.touchAction=`none`,t.style.userSelect=`none`,document.addEventListener(`pointermove`,ee),document.addEventListener(`pointerup`,v))},ee=e=>{if(!p||!f)throw Error(`drag item is undefined`);let n=f.get(p),r=null;for(let[t,i]of f.entries()){if(t===p||e.clientY<=i.top||e.clientY>=i.bottom)continue;e.stopPropagation();let a=i.top+(n.bottom-i.top)/2;r=e.clientY>a?o(t):t;break}if(r){g=r instanceof HTMLElement?r.dataset.id:void 0,t.insertBefore(p,r),p.style.transform=``;var i=n.top;f=c(),m+=f.get(p).top-i,d?.focus()}p.style.transform=`translateY(${e.clientY-m}px)`},v=e=>{if(!p)throw Error(`drag item is undefined`);e.stopPropagation(),document.removeEventListener(`pointermove`,ee),document.removeEventListener(`pointerup`,v),p.classList.remove(`dragging`),p.style.transform=``,p.style.pointerEvents=``,p.style.zIndex=``,p=void 0,t.style.touchAction=``,t.style.userSelect=``,h&&g&&(n(h,g),h=void 0,g=void 0)},y=e=>{if(!e.altKey)return;let r=(e,r)=>{let i=document.activeElement;t.insertBefore(e,r),i instanceof HTMLElement&&i.focus(),n(e.dataset.id,r?.dataset.id)};switch(e.key){case`ArrowUp`:{let t=a(e.target,e=>e?.parentElement,u);if(t&&u(t.previousElementSibling)){let e=t.previousElementSibling;r(t,e)}break}case`ArrowDown`:{let t=a(e.target,e=>e?.parentElement,u);if(t&&u(t.nextElementSibling)){let e=t.nextElementSibling?.nextElementSibling;r(t,e)}break}}};return t.addEventListener(`pointerdown`,_),t.addEventListener(`keydown`,y),()=>{t.removeEventListener(`pointerdown`,_),t.removeEventListener(`keydown`,y)}}}})();var i=`
|
|
2
2
|
button:not([disabled]),
|
|
3
3
|
[href],
|
|
4
4
|
input:not([disabled]),
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
textarea:not([disabled]),
|
|
7
7
|
[tabindex]:not([tabindex="-1"]),
|
|
8
8
|
[contenteditable]:not([contenteditable="false"])
|
|
9
|
-
`,a={trace:0,debug:1,log:2,info:3,warn:4,error:5};function o(e,t,n){let r=()=>{},i={provide:r=>o(`${e}.${r}`,t,n)};for(let o of Object.keys(a)){let s=o,c=a[s],l=n[s];t>c?i[s]=r:i[s]=((t,...n)=>l(`[${e}]`,t,...n))}return i}var s=(()=>{let e=(e,t)=>(t??=s.defaultLevel,o(e,t,s.adapter));return e.adapter=console,e.defaultLevel=a.warn,e})(),c=(e,t)=>{if(e===t||Number.isNaN(e)&&Number.isNaN(t))return!0;if(!(typeof e==`object`&&e)||!(typeof t==`object`&&t))return!1;let n=Array.isArray(e);if(n!==Array.isArray(t))return!1;if(n){let n=e,r=t;if(n.length!==r.length)return!1;for(let e=0;e<n.length;e++)if(!c(n[e],r[e]))return!1;return!0}let r=Object.keys(e),i=Object.keys(t);if(r.length!==i.length)return!1;for(let n of r){if(!Object.prototype.hasOwnProperty.call(t,n))return!1;let r=e[n],i=t[n];if(!c(r,i))return!1}return!0},l=(e,t)=>{let n=e;for(;n;){let e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=Object.getPrototypeOf(n)}};function u(e){return e.split(/\.|\[|\]\.?/).filter(e=>e!==``).map(e=>{let t=Number.parseInt(e);return isNaN(t)?e:t})}function d(e,t){let n=u(t);for(let t=0;t<n.length;t++){if(e==null)return;let r=n[t];e=e[r]}return e}var f=e=>Object.keys(e);function p(e,t,n){let r=t.match(/[^.\[\]]+/g);if(!r)return n;let i={...e},a=i;for(let e=0;e<r.length-1;e++){let t=r[e],n=r[e+1],i=!isNaN(Number(n));t in a?Array.isArray(a[t])?a[t]=[...a[t]]:a[t]={...a[t]}:a[t]=i?[]:{},a=a[t]}let o=r[r.length-1];return a[o]=n,i}function m(e){return e!=null&&typeof e.then==`function`}var h=class{constructor(e){this.value=e}value;orThrow(){return this.value}orNull(){return this.value}
|
|
10
|
-
`)},te={Ok:e=>new h(e),Fail:e=>new ee(e)},ne=(e,t)=>e.toString().padStart(t,`0`).slice(-t),g=e=>e==null?e:e?.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(e,t)=>(t?`-`:``)+e).toLowerCase();function _(e={}){return function(t,n){let i=e?.name??n,a=e?.read??(e=>e),o=e?.write??(e=>e);if(!o&&!a)throw Error(`@Att() should have read or write options`);var s=r(t.constructor);s.__metadata.attributes=[...s.__metadata.attributes,{propertyName:n,name:g(i),read:a,write:o}]}}var v={read:e=>e===`true`,write:e=>e===!0?`true`:`false`},re={read:e=>e!=null,write:e=>e===!0?``:void 0},ie=s(`@ntix/components-core`,typeof ANTIX_COMPONENTS_CORE_LOG_LEVEL>`u`?a.warn:ANTIX_COMPONENTS_CORE_LOG_LEVEL);function ae(e){return typeof e==`object`&&!!e&&`render`in e&&typeof e.render==`function`&&e.render.length===1}function y(e={tag:void 0}){let t=()=>{},r=ie.provide(`component-decorator`),i={shadowRoot:`open`,delegatesFocus:!1,...e,css:n(e.css)};return function(n){let a=new Map,o=class extends n{constructor(...e){super(...e);let t=n.__metadata;t&&(t.events.forEach(e=>{r.debug(`event`,e.propertyName,e.name),Object.defineProperty(this,e.propertyName,{value:function(t){let n=new CustomEvent(e.name,{detail:t,...e.init});return this.dispatchEvent(n)},writable:!1,configurable:!1,enumerable:!0})}),t.watches.forEach(e=>{let t=e.methodName;r.debug(`${this.tagName}.${t}()`,{propertyNames:e.propertyNames}),e.propertyNames.forEach(e=>{let n=l(this,e);r.debug(`watch`,e,n);let i=n?.value,a=n?.get?.bind(this)??(()=>i),o=n?.set?.bind(this)??(e=>{i=e});Object.defineProperty(this,e,{get:a,set:function(n){let r=a();r!==n&&(o(n),this[t](n,r,e)===!1&&o(r))},enumerable:!0,configurable:!0})})}),t.attributes.forEach(e=>{let t=l(this,e.propertyName),n=t?.value,i=t?.get?.bind(this)??(()=>n),o=t?.set?.bind(this)??(e=>{n=e});if(e.write){let t=o,n=e.write;o=r=>{r!==i()&&t(r);let a=this.getAttribute(e.name),o=n(r);if(o==null)a!=null&&this.removeAttribute(e.name);else{let t=`${o}`;a!==t&&this.setAttribute(e.name,t)}}}r.debug(`${this.tagName}.${e.propertyName}`,{att:e.name,read:!!e.read,write:!!e.write}),Object.defineProperty(this,e.propertyName,{get:i,set:o,enumerable:!0}),e.read&&a.set(e.name,()=>{this.hasAttribute(e.name)||o(i())})}))}__shadowRoot};if(o.__metadata){let e=new Set(o.observedAttributes);o.__metadata.attributes.forEach(t=>{t.read&&e.add(t.name)}),o.observedAttributes=Array.from(e)}let s;o.prototype.resizeCallback&&(s=new ResizeObserver(e=>{o.prototype.resizeCallback?.call(e[0].target)}));let c=o.prototype.attributeChangedCallback??t;o.prototype.attributeChangedCallback=function(e,t,n){if(c(e,t,n),n!==t){var r=o.__metadata?.attributes.find(t=>t.name===e);r?.read&&(this[r.propertyName]=r.read(n))}};let u=o.prototype.connectedCallback??t;o.prototype.connectedCallback=function(){a.forEach(e=>e()),(i.shadowRoot===`open`||i.shadowRoot===`closed`)&&!this.__shadowRoot&&(this.__shadowRoot=this.attachShadow({delegatesFocus:i.delegatesFocus,mode:i.shadowRoot,slotAssignment:`named`}),this.__shadowRoot.adoptedStyleSheets=i.css),u.call(this),s&&s.observe(this)};let d=o.prototype.disconnectedCallback??t;o.prototype.disconnectedCallback=function(){d.call(this),s&&s.unobserve(this)};let f=o.prototype.beforeRender??t,p=o.prototype.render??t,h=o.prototype.afterRender??t;return o.prototype.render=async function(){r.debug(`render`,this.tagName);let e=f.call(this);if(m(e)&&await e,this.__shadowRoot){let e=this.__shadowRoot,t=p.call(this);ae(t)?await t.render(e):e.innerHTML=t}h.call(this)},r.debug(`define`,e.tag),window.customElements.define(e.tag,o),o}}function b(e={}){return function(t,n){var i=r(t.constructor);i.__metadata.events=[...i.__metadata.events,{name:e?.name??g(n),init:e,propertyName:n}]}}var x=class extends HTMLElement{addEventListener(e,t,n){return super.addEventListener(e,t,n),()=>{super.removeEventListener(e,t,n)}}removeEventListener(e,t,n){super.removeEventListener(e,t,n)}};function S(...e){return function(t,n){var i=r(t.constructor);i.__metadata.watches=[...i.__metadata.watches,{methodName:n,propertyNames:e}]}}function oe(e){return typeof e==`function`}var se=class extends Array{render=(e,t=``)=>new Promise(n=>{let r=document.createElement(`template`),i={},a=e=>{let t=`_${Object.keys(i).length}`;return i[t]=e,t},o=e=>Array.isArray(e)?e.map(o).join(``):oe(e)?`_r_=${a(e)}`:`${e}`;r.innerHTML=t+o(this),e.replaceChildren(r.content);let s=async e=>{if(e.nodeType===Node.ELEMENT_NODE&&e.hasAttribute(`_r_`)){let t=e.getAttribute(`_r_`);if(t){e.removeAttribute(`_r_`);let n=i[t];for(n.element=e;!e.isConnected;)await new Promise(e=>requestAnimationFrame(()=>e()));n(e)}}await Promise.all([...e.children].map(s))};s(e).then(n)})},{entries:ce,setPrototypeOf:le,isFrozen:ue,getPrototypeOf:de,getOwnPropertyDescriptor:fe}=Object,{freeze:C,seal:w,create:pe}=Object,{apply:me,construct:T}=typeof Reflect<`u`&&Reflect;C||=function(e){return e},w||=function(e){return e},me||=function(e,t){var n=[...arguments].slice(2);return e.apply(t,n)},T||=function(e){return new e(...[...arguments].slice(1))};var he=O(Array.prototype.forEach),ge=O(Array.prototype.lastIndexOf),_e=O(Array.prototype.pop),ve=O(Array.prototype.push),ye=O(Array.prototype.splice),be=O(String.prototype.toLowerCase),xe=O(String.prototype.toString),Se=O(String.prototype.match),Ce=O(String.prototype.replace),we=O(String.prototype.indexOf),Te=O(String.prototype.trim),E=O(Object.prototype.hasOwnProperty),D=O(RegExp.prototype.test),Ee=k(TypeError);function O(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);var n=[...arguments].slice(1);return me(e,t,n)}}function k(e){return function(){return T(e,[...arguments])}}function A(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:be;le&&le(e,null);let r=t.length;for(;r--;){let i=t[r];if(typeof i==`string`){let e=n(i);e!==i&&(ue(t)||(t[r]=e),i=e)}e[i]=!0}return e}function De(e){for(let t=0;t<e.length;t++)E(e,t)||(e[t]=null);return e}function j(e){let t=pe(null);for(let[n,r]of ce(e))E(e,n)&&(Array.isArray(r)?t[n]=De(r):r&&typeof r==`object`&&r.constructor===Object?t[n]=j(r):t[n]=r);return t}function Oe(e,t){for(;e!==null;){let n=fe(e,t);if(n){if(n.get)return O(n.get);if(typeof n.value==`function`)return O(n.value)}e=de(e)}function n(){return null}return n}var ke=C(`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(`.`)),Ae=C(`svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern`.split(`.`)),je=C([`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`]),Me=C([`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`]),Ne=C(`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(`.`)),Pe=C([`maction`,`maligngroup`,`malignmark`,`mlongdiv`,`mscarries`,`mscarry`,`msgroup`,`mstack`,`msline`,`msrow`,`semantics`,`annotation`,`annotation-xml`,`mprescripts`,`none`]),Fe=C([`#text`]),Ie=C(`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`.split(`.`)),Le=C(`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`.split(`.`)),Re=C(`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`.split(`.`)),ze=C([`xlink:href`,`xml:id`,`xlink:title`,`xml:space`,`xmlns:xlink`]),M=w(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Be=w(/<%[\w\W]*|[\w\W]*%>/gm),Ve=w(/\$\{[\w\W]*/gm),N=w(/^data-[\-\w.\u00B7-\uFFFF]+$/),He=w(/^aria-[\-\w]+$/),Ue=w(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),We=w(/^(?:\w+script|data):/i),Ge=w(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Ke=w(/^html$/i),qe=w(/^[a-z][.\w]*(-[.\w]+)+$/i),Je=Object.freeze({__proto__:null,ARIA_ATTR:He,ATTR_WHITESPACE:Ge,CUSTOM_ELEMENT:qe,DATA_ATTR:N,DOCTYPE_NAME:Ke,ERB_EXPR:Be,IS_ALLOWED_URI:Ue,IS_SCRIPT_OR_DATA:We,MUSTACHE_EXPR:M,TMPLIT_EXPR:Ve}),Ye={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Xe=function(){return typeof window>`u`?null:window},Ze=function(e,t){if(typeof e!=`object`||typeof e.createPolicy!=`function`)return null;let n=null,r=`data-tt-policy-suffix`;t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let i=`dompurify`+(n?`#`+n:``);try{return e.createPolicy(i,{createHTML(e){return e},createScriptURL(e){return e}})}catch{return console.warn(`TrustedTypes policy `+i+` could not be created.`),null}},Qe=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function $e(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Xe(),t=e=>$e(e);if(t.version=`3.3.0`,t.removed=[],!e||!e.document||e.document.nodeType!==Ye.document||!e.Element)return t.isSupported=!1,t;let{document:n}=e,r=n,i=r.currentScript,{DocumentFragment:a,HTMLTemplateElement:o,Node:s,Element:c,NodeFilter:l,NamedNodeMap:u=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:d,DOMParser:f,trustedTypes:p}=e,m=c.prototype,h=Oe(m,`cloneNode`),ee=Oe(m,`remove`),te=Oe(m,`nextSibling`),ne=Oe(m,`childNodes`),g=Oe(m,`parentNode`);if(typeof o==`function`){let e=n.createElement(`template`);e.content&&e.content.ownerDocument&&(n=e.content.ownerDocument)}let _,v=``,{implementation:re,createNodeIterator:ie,createDocumentFragment:ae,getElementsByTagName:y}=n,{importNode:b}=r,x=Qe();t.isSupported=typeof ce==`function`&&typeof g==`function`&&re&&re.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:S,ERB_EXPR:oe,TMPLIT_EXPR:se,DATA_ATTR:le,ARIA_ATTR:ue,IS_SCRIPT_OR_DATA:de,ATTR_WHITESPACE:fe,CUSTOM_ELEMENT:w}=Je,{IS_ALLOWED_URI:me}=Je,T=null,O=A({},[...ke,...Ae,...je,...Ne,...Fe]),k=null,De=A({},[...Ie,...Le,...Re,...ze]),M=Object.seal(pe(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Be=null,Ve=null,N=Object.seal(pe(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),He=!0,We=!0,Ge=!1,qe=!0,P=!1,et=!0,F=!1,I=!1,tt=!1,L=!1,R=!1,z=!1,B=!0,nt=!1,rt=!0,V=!1,H={},U=null,W=A({},[`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`]),it=null,at=A({},[`audio`,`video`,`img`,`source`,`image`,`track`]),G=null,ot=A({},[`alt`,`class`,`for`,`id`,`label`,`name`,`pattern`,`placeholder`,`role`,`summary`,`title`,`value`,`style`,`xmlns`]),st=`http://www.w3.org/1998/Math/MathML`,ct=`http://www.w3.org/2000/svg`,K=`http://www.w3.org/1999/xhtml`,lt=K,q=!1,ut=null,dt=A({},[st,ct,K],xe),J=A({},[`mi`,`mo`,`mn`,`ms`,`mtext`]),ft=A({},[`annotation-xml`]),pt=A({},[`title`,`style`,`font`,`a`,`script`]),Y=null,mt=[`application/xhtml+xml`,`text/html`],X=null,ht=null,gt=n.createElement(`form`),_t=function(e){return e instanceof RegExp||e instanceof Function},Z=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(ht&&ht===e)){if((!e||typeof e!=`object`)&&(e={}),e=j(e),Y=mt.indexOf(e.PARSER_MEDIA_TYPE)===-1?`text/html`:e.PARSER_MEDIA_TYPE,X=Y===`application/xhtml+xml`?xe:be,T=E(e,`ALLOWED_TAGS`)?A({},e.ALLOWED_TAGS,X):O,k=E(e,`ALLOWED_ATTR`)?A({},e.ALLOWED_ATTR,X):De,ut=E(e,`ALLOWED_NAMESPACES`)?A({},e.ALLOWED_NAMESPACES,xe):dt,G=E(e,`ADD_URI_SAFE_ATTR`)?A(j(ot),e.ADD_URI_SAFE_ATTR,X):ot,it=E(e,`ADD_DATA_URI_TAGS`)?A(j(at),e.ADD_DATA_URI_TAGS,X):at,U=E(e,`FORBID_CONTENTS`)?A({},e.FORBID_CONTENTS,X):W,Be=E(e,`FORBID_TAGS`)?A({},e.FORBID_TAGS,X):j({}),Ve=E(e,`FORBID_ATTR`)?A({},e.FORBID_ATTR,X):j({}),H=E(e,`USE_PROFILES`)?e.USE_PROFILES:!1,He=e.ALLOW_ARIA_ATTR!==!1,We=e.ALLOW_DATA_ATTR!==!1,Ge=e.ALLOW_UNKNOWN_PROTOCOLS||!1,qe=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,P=e.SAFE_FOR_TEMPLATES||!1,et=e.SAFE_FOR_XML!==!1,F=e.WHOLE_DOCUMENT||!1,L=e.RETURN_DOM||!1,R=e.RETURN_DOM_FRAGMENT||!1,z=e.RETURN_TRUSTED_TYPE||!1,tt=e.FORCE_BODY||!1,B=e.SANITIZE_DOM!==!1,nt=e.SANITIZE_NAMED_PROPS||!1,rt=e.KEEP_CONTENT!==!1,V=e.IN_PLACE||!1,me=e.ALLOWED_URI_REGEXP||Ue,lt=e.NAMESPACE||K,J=e.MATHML_TEXT_INTEGRATION_POINTS||J,ft=e.HTML_INTEGRATION_POINTS||ft,M=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&_t(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(M.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&_t(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(M.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements==`boolean`&&(M.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),P&&(We=!1),R&&(L=!0),H&&(T=A({},Fe),k=[],H.html===!0&&(A(T,ke),A(k,Ie)),H.svg===!0&&(A(T,Ae),A(k,Le),A(k,ze)),H.svgFilters===!0&&(A(T,je),A(k,Le),A(k,ze)),H.mathMl===!0&&(A(T,Ne),A(k,Re),A(k,ze))),e.ADD_TAGS&&(typeof e.ADD_TAGS==`function`?N.tagCheck=e.ADD_TAGS:(T===O&&(T=j(T)),A(T,e.ADD_TAGS,X))),e.ADD_ATTR&&(typeof e.ADD_ATTR==`function`?N.attributeCheck=e.ADD_ATTR:(k===De&&(k=j(k)),A(k,e.ADD_ATTR,X))),e.ADD_URI_SAFE_ATTR&&A(G,e.ADD_URI_SAFE_ATTR,X),e.FORBID_CONTENTS&&(U===W&&(U=j(U)),A(U,e.FORBID_CONTENTS,X)),rt&&(T[`#text`]=!0),F&&A(T,[`html`,`head`,`body`]),T.table&&(A(T,[`tbody`]),delete Be.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!=`function`)throw Ee(`TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.`);if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!=`function`)throw Ee(`TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.`);_=e.TRUSTED_TYPES_POLICY,v=_.createHTML(``)}else _===void 0&&(_=Ze(p,i)),_!==null&&typeof v==`string`&&(v=_.createHTML(``));C&&C(e),ht=e}},vt=A({},[...Ae,...je,...Me]),yt=A({},[...Ne,...Pe]),bt=function(e){let t=g(e);(!t||!t.tagName)&&(t={namespaceURI:lt,tagName:`template`});let n=be(e.tagName),r=be(t.tagName);return ut[e.namespaceURI]?e.namespaceURI===ct?t.namespaceURI===K?n===`svg`:t.namespaceURI===st?n===`svg`&&(r===`annotation-xml`||J[r]):!!vt[n]:e.namespaceURI===st?t.namespaceURI===K?n===`math`:t.namespaceURI===ct?n===`math`&&ft[r]:!!yt[n]:e.namespaceURI===K?t.namespaceURI===ct&&!ft[r]||t.namespaceURI===st&&!J[r]?!1:!yt[n]&&(pt[n]||!vt[n]):!!(Y===`application/xhtml+xml`&&ut[e.namespaceURI]):!1},xt=function(e){ve(t.removed,{element:e});try{g(e).removeChild(e)}catch{ee(e)}},Q=function(e,n){try{ve(t.removed,{attribute:n.getAttributeNode(e),from:n})}catch{ve(t.removed,{attribute:null,from:n})}if(n.removeAttribute(e),e===`is`)if(L||R)try{xt(n)}catch{}else try{n.setAttribute(e,``)}catch{}},St=function(e){let t=null,r=null;if(tt)e=`<remove></remove>`+e;else{let t=Se(e,/^[\r\n\t ]+/);r=t&&t[0]}Y===`application/xhtml+xml`&<===K&&(e=`<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>`+e+`</body></html>`);let i=_?_.createHTML(e):e;if(lt===K)try{t=new f().parseFromString(i,Y)}catch{}if(!t||!t.documentElement){t=re.createDocument(lt,`template`,null);try{t.documentElement.innerHTML=q?v:i}catch{}}let a=t.body||t.documentElement;return e&&r&&a.insertBefore(n.createTextNode(r),a.childNodes[0]||null),lt===K?y.call(t,F?`html`:`body`)[0]:F?t.documentElement:a},Ct=function(e){return ie.call(e.ownerDocument||e,e,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},wt=function(e){return e instanceof d&&(typeof e.nodeName!=`string`||typeof e.textContent!=`string`||typeof e.removeChild!=`function`||!(e.attributes instanceof u)||typeof e.removeAttribute!=`function`||typeof e.setAttribute!=`function`||typeof e.namespaceURI!=`string`||typeof e.insertBefore!=`function`||typeof e.hasChildNodes!=`function`)},Tt=function(e){return typeof s==`function`&&e instanceof s};function $(e,n,r){he(e,e=>{e.call(t,n,r,ht)})}let Et=function(e){let n=null;if($(x.beforeSanitizeElements,e,null),wt(e))return xt(e),!0;let r=X(e.nodeName);if($(x.uponSanitizeElement,e,{tagName:r,allowedTags:T}),et&&e.hasChildNodes()&&!Tt(e.firstElementChild)&&D(/<[/\w!]/g,e.innerHTML)&&D(/<[/\w!]/g,e.textContent)||e.nodeType===Ye.progressingInstruction||et&&e.nodeType===Ye.comment&&D(/<[/\w]/g,e.data))return xt(e),!0;if(!(N.tagCheck instanceof Function&&N.tagCheck(r))&&(!T[r]||Be[r])){if(!Be[r]&&Ot(r)&&(M.tagNameCheck instanceof RegExp&&D(M.tagNameCheck,r)||M.tagNameCheck instanceof Function&&M.tagNameCheck(r)))return!1;if(rt&&!U[r]){let t=g(e)||e.parentNode,n=ne(e)||e.childNodes;if(n&&t){let r=n.length;for(let i=r-1;i>=0;--i){let r=h(n[i],!0);r.__removalCount=(e.__removalCount||0)+1,t.insertBefore(r,te(e))}}}return xt(e),!0}return e instanceof c&&!bt(e)||(r===`noscript`||r===`noembed`||r===`noframes`)&&D(/<\/no(script|embed|frames)/i,e.innerHTML)?(xt(e),!0):(P&&e.nodeType===Ye.text&&(n=e.textContent,he([S,oe,se],e=>{n=Ce(n,e,` `)}),e.textContent!==n&&(ve(t.removed,{element:e.cloneNode()}),e.textContent=n)),$(x.afterSanitizeElements,e,null),!1)},Dt=function(e,t,r){if(B&&(t===`id`||t===`name`)&&(r in n||r in gt))return!1;if(!(We&&!Ve[t]&&D(le,t))&&!(He&&D(ue,t))&&!(N.attributeCheck instanceof Function&&N.attributeCheck(t,e))){if(!k[t]||Ve[t]){if(!(Ot(e)&&(M.tagNameCheck instanceof RegExp&&D(M.tagNameCheck,e)||M.tagNameCheck instanceof Function&&M.tagNameCheck(e))&&(M.attributeNameCheck instanceof RegExp&&D(M.attributeNameCheck,t)||M.attributeNameCheck instanceof Function&&M.attributeNameCheck(t,e))||t===`is`&&M.allowCustomizedBuiltInElements&&(M.tagNameCheck instanceof RegExp&&D(M.tagNameCheck,r)||M.tagNameCheck instanceof Function&&M.tagNameCheck(r))))return!1}else if(!G[t]&&!D(me,Ce(r,fe,``))&&!((t===`src`||t===`xlink:href`||t===`href`)&&e!==`script`&&we(r,`data:`)===0&&it[e])&&!(Ge&&!D(de,Ce(r,fe,``)))&&r)return!1}return!0},Ot=function(e){return e!==`annotation-xml`&&Se(e,w)},kt=function(e){$(x.beforeSanitizeAttributes,e,null);let{attributes:n}=e;if(!n||wt(e))return;let r={attrName:``,attrValue:``,keepAttr:!0,allowedAttributes:k,forceKeepAttr:void 0},i=n.length;for(;i--;){let{name:a,namespaceURI:o,value:s}=n[i],c=X(a),l=s,u=a===`value`?l:Te(l);if(r.attrName=c,r.attrValue=u,r.keepAttr=!0,r.forceKeepAttr=void 0,$(x.uponSanitizeAttribute,e,r),u=r.attrValue,nt&&(c===`id`||c===`name`)&&(Q(a,e),u=`user-content-`+u),et&&D(/((--!?|])>)|<\/(style|title|textarea)/i,u)){Q(a,e);continue}if(c===`attributename`&&Se(u,`href`)){Q(a,e);continue}if(r.forceKeepAttr)continue;if(!r.keepAttr){Q(a,e);continue}if(!qe&&D(/\/>/i,u)){Q(a,e);continue}P&&he([S,oe,se],e=>{u=Ce(u,e,` `)});let d=X(e.nodeName);if(!Dt(d,c,u)){Q(a,e);continue}if(_&&typeof p==`object`&&typeof p.getAttributeType==`function`&&!o)switch(p.getAttributeType(d,c)){case`TrustedHTML`:u=_.createHTML(u);break;case`TrustedScriptURL`:u=_.createScriptURL(u);break}if(u!==l)try{o?e.setAttributeNS(o,a,u):e.setAttribute(a,u),wt(e)?xt(e):_e(t.removed)}catch{Q(a,e)}}$(x.afterSanitizeAttributes,e,null)},At=function e(t){let n=null,r=Ct(t);for($(x.beforeSanitizeShadowDOM,t,null);n=r.nextNode();)$(x.uponSanitizeShadowNode,n,null),Et(n),kt(n),n.content instanceof a&&e(n.content);$(x.afterSanitizeShadowDOM,t,null)};return t.sanitize=function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=null,o=null,c=null,l=null;if(q=!e,q&&(e=`<!-->`),typeof e!=`string`&&!Tt(e))if(typeof e.toString==`function`){if(e=e.toString(),typeof e!=`string`)throw Ee(`dirty is not a string, aborting`)}else throw Ee(`toString is not a function`);if(!t.isSupported)return e;if(I||Z(n),t.removed=[],typeof e==`string`&&(V=!1),V){if(e.nodeName){let t=X(e.nodeName);if(!T[t]||Be[t])throw Ee(`root node is forbidden and cannot be sanitized in-place`)}}else if(e instanceof s)i=St(`<!---->`),o=i.ownerDocument.importNode(e,!0),o.nodeType===Ye.element&&o.nodeName===`BODY`||o.nodeName===`HTML`?i=o:i.appendChild(o);else{if(!L&&!P&&!F&&e.indexOf(`<`)===-1)return _&&z?_.createHTML(e):e;if(i=St(e),!i)return L?null:z?v:``}i&&tt&&xt(i.firstChild);let u=Ct(V?e:i);for(;c=u.nextNode();)Et(c),kt(c),c.content instanceof a&&At(c.content);if(V)return e;if(L){if(R)for(l=ae.call(i.ownerDocument);i.firstChild;)l.appendChild(i.firstChild);else l=i;return(k.shadowroot||k.shadowrootmode)&&(l=b.call(r,l,!0)),l}let d=F?i.outerHTML:i.innerHTML;return F&&T[`!doctype`]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&D(Ke,i.ownerDocument.doctype.name)&&(d=`<!DOCTYPE `+i.ownerDocument.doctype.name+`>
|
|
11
|
-
`+d),
|
|
9
|
+
`,a={trace:0,debug:1,log:2,info:3,warn:4,error:5};function o(e,t,n){let r=()=>{},i={provide:r=>o(`${e}.${r}`,t,n)};for(let o of Object.keys(a)){let s=o,c=a[s],l=n[s];t>c?i[s]=r:i[s]=((t,...n)=>l(`[${e}]`,t,...n))}return i}var s=(()=>{let e=(e,t)=>(t??=s.defaultLevel,o(e,t,s.adapter));return e.adapter=console,e.defaultLevel=a.warn,e})(),c=(e,t)=>{if(e===t||Number.isNaN(e)&&Number.isNaN(t))return!0;if(!(typeof e==`object`&&e)||!(typeof t==`object`&&t))return!1;let n=Array.isArray(e);if(n!==Array.isArray(t))return!1;if(n){let n=e,r=t;if(n.length!==r.length)return!1;for(let e=0;e<n.length;e++)if(!c(n[e],r[e]))return!1;return!0}let r=Object.keys(e),i=Object.keys(t);if(r.length!==i.length)return!1;for(let n of r){if(!Object.prototype.hasOwnProperty.call(t,n))return!1;let r=e[n],i=t[n];if(!c(r,i))return!1}return!0},l=(e,t)=>{let n=e;for(;n;){let e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=Object.getPrototypeOf(n)}};function u(e){return e.split(/\.|\[|\]\.?/).filter(e=>e!==``).map(e=>{let t=Number.parseInt(e);return isNaN(t)?e:t})}function d(e,t){let n=u(t);for(let t=0;t<n.length;t++){if(e==null)return;let r=n[t];e=e[r]}return e}var f=e=>Object.keys(e);function p(e,t,n){let r=t.match(/[^.\[\]]+/g);if(!r)return n;let i={...e},a=i;for(let e=0;e<r.length-1;e++){let t=r[e],n=r[e+1],i=!isNaN(Number(n));t in a?Array.isArray(a[t])?a[t]=[...a[t]]:a[t]={...a[t]}:a[t]=i?[]:{},a=a[t]}let o=r[r.length-1];return a[o]=n,i}function m(e){return e!=null&&typeof e.then==`function`}var h=class{constructor(e){this.value=e}value;getErrors(){return _.EMPTY_ERRORS}orThrow(){return this.value}orNull(){return this.value}fold(e,t){return e(this.value)}},g=class e{constructor(e){if(!e?.length)throw Error(`errors are required`);this.errors=e}errors;getErrors(){return this.errors}orThrow(){throw Error(e.formatErrors(this.errors))}orNull(){return null}fold(e,t){return t(this.errors)}static formatErrors=e=>e.join(`
|
|
10
|
+
`)},_={EMPTY_ERRORS:Object.freeze([]),Ok:e=>new h(e),Fail:e=>new g(e),isSuccess:e=>e instanceof h,isFailure:e=>e instanceof g},ee=(e,t)=>e.toString().padStart(t,`0`).slice(-t),v=e=>e==null?e:e?.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(e,t)=>(t?`-`:``)+e).toLowerCase();function y(e={}){return function(t,n){let i=e?.name??n,a=e?.read??(e=>e),o=e?.write??(e=>e);if(!o&&!a)throw Error(`@Att() should have read or write options`);var s=r(t.constructor);s.__metadata.attributes=[...s.__metadata.attributes,{propertyName:n,name:v(i),read:a,write:o}]}}var b={read:e=>e===`true`,write:e=>e===!0?`true`:`false`},te={read:e=>e!=null,write:e=>e===!0?``:void 0},ne=s(`@ntix/components-core`,typeof ANTIX_COMPONENTS_CORE_LOG_LEVEL>`u`?a.warn:ANTIX_COMPONENTS_CORE_LOG_LEVEL);function re(e){return typeof e==`object`&&!!e&&`render`in e&&typeof e.render==`function`&&e.render.length===1}function x(e={tag:void 0}){let t=()=>{},r=ne.provide(`component-decorator`),i={shadowRoot:`open`,delegatesFocus:!1,...e,css:n(e.css)};return function(n){let a=new Map,o=class extends n{constructor(...e){super(...e);let t=n.__metadata;t&&(t.events.forEach(e=>{r.debug(`event`,e.propertyName,e.name),Object.defineProperty(this,e.propertyName,{value:function(t){let n=new CustomEvent(e.name,{detail:t,...e.init});return this.dispatchEvent(n)},writable:!1,configurable:!1,enumerable:!0})}),t.watches.forEach(e=>{let t=e.methodName;r.debug(`${this.tagName}.${t}()`,{propertyNames:e.propertyNames}),e.propertyNames.forEach(e=>{let n=l(this,e);r.debug(`watch`,e,n);let i=n?.value,a=n?.get?.bind(this)??(()=>i),o=n?.set?.bind(this)??(e=>{i=e});Object.defineProperty(this,e,{get:a,set:function(n){let r=a();r!==n&&(o(n),this[t](n,r,e)===!1&&o(r))},enumerable:!0,configurable:!0})})}),t.attributes.forEach(e=>{let t=l(this,e.propertyName),n=t?.value,i=t?.get?.bind(this)??(()=>n),o=t?.set?.bind(this)??(e=>{n=e});if(e.write){let t=o,n=e.write;o=r=>{r!==i()&&t(r);let a=this.getAttribute(e.name),o=n(r);if(o==null)a!=null&&this.removeAttribute(e.name);else{let t=`${o}`;a!==t&&this.setAttribute(e.name,t)}}}r.debug(`${this.tagName}.${e.propertyName}`,{att:e.name,read:!!e.read,write:!!e.write}),Object.defineProperty(this,e.propertyName,{get:i,set:o,enumerable:!0}),e.read&&a.set(e.name,()=>{this.hasAttribute(e.name)||o(i())})}))}__shadowRoot};if(o.__metadata){let e=new Set(o.observedAttributes);o.__metadata.attributes.forEach(t=>{t.read&&e.add(t.name)}),o.observedAttributes=Array.from(e)}let s;o.prototype.resizeCallback&&(s=new ResizeObserver(e=>{o.prototype.resizeCallback?.call(e[0].target)}));let c=o.prototype.attributeChangedCallback??t;o.prototype.attributeChangedCallback=function(e,t,n){if(c(e,t,n),n!==t){var r=o.__metadata?.attributes.find(t=>t.name===e);r?.read&&(this[r.propertyName]=r.read(n))}};let u=o.prototype.connectedCallback??t;o.prototype.connectedCallback=function(){a.forEach(e=>e()),(i.shadowRoot===`open`||i.shadowRoot===`closed`)&&!this.__shadowRoot&&(this.__shadowRoot=this.attachShadow({delegatesFocus:i.delegatesFocus,mode:i.shadowRoot,slotAssignment:`named`}),this.__shadowRoot.adoptedStyleSheets=i.css),u.call(this),s&&s.observe(this)};let d=o.prototype.disconnectedCallback??t;o.prototype.disconnectedCallback=function(){d.call(this),s&&s.unobserve(this)};let f=o.prototype.beforeRender??t,p=o.prototype.render??t,h=o.prototype.afterRender??t;return o.prototype.render=async function(){r.debug(`render`,this.tagName);let e=f.call(this);if(m(e)&&await e,this.__shadowRoot){let e=this.__shadowRoot,t=p.call(this);re(t)?await t.render(e):e.innerHTML=t}h.call(this)},r.debug(`define`,e.tag),window.customElements.define(e.tag,o),o}}function S(e={}){return function(t,n){var i=r(t.constructor);i.__metadata.events=[...i.__metadata.events,{name:e?.name??v(n),init:e,propertyName:n}]}}var C=class extends HTMLElement{addEventListener(e,t,n){return super.addEventListener(e,t,n),()=>{super.removeEventListener(e,t,n)}}removeEventListener(e,t,n){super.removeEventListener(e,t,n)}};function w(...e){return function(t,n){var i=r(t.constructor);i.__metadata.watches=[...i.__metadata.watches,{methodName:n,propertyNames:e}]}}function ie(e){return typeof e==`function`}var ae=class extends Array{render=(e,t=``)=>new Promise(n=>{let r=document.createElement(`template`),i={},a=e=>{let t=`_${Object.keys(i).length}`;return i[t]=e,t},o=e=>Array.isArray(e)?e.map(o).join(``):ie(e)?`_r_=${a(e)}`:`${e}`;r.innerHTML=t+o(this),e.replaceChildren(r.content);let s=async e=>{if(e.nodeType===Node.ELEMENT_NODE&&e.hasAttribute(`_r_`)){let t=e.getAttribute(`_r_`);if(t){e.removeAttribute(`_r_`);let n=i[t];for(n.element=e;!e.isConnected;)await new Promise(e=>requestAnimationFrame(()=>e()));n(e)}}await Promise.all([...e.children].map(s))};s(e).then(n)})},{entries:oe,setPrototypeOf:se,isFrozen:ce,getPrototypeOf:le,getOwnPropertyDescriptor:ue}=Object,{freeze:T,seal:E,create:de}=Object,{apply:fe,construct:D}=typeof Reflect<`u`&&Reflect;T||=function(e){return e},E||=function(e){return e},fe||=function(e,t){var n=[...arguments].slice(2);return e.apply(t,n)},D||=function(e){return new e(...[...arguments].slice(1))};var pe=A(Array.prototype.forEach),me=A(Array.prototype.lastIndexOf),he=A(Array.prototype.pop),ge=A(Array.prototype.push),_e=A(Array.prototype.splice),ve=A(String.prototype.toLowerCase),ye=A(String.prototype.toString),be=A(String.prototype.match),xe=A(String.prototype.replace),Se=A(String.prototype.indexOf),Ce=A(String.prototype.trim),O=A(Object.prototype.hasOwnProperty),k=A(RegExp.prototype.test),we=j(TypeError);function A(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);var n=[...arguments].slice(1);return fe(e,t,n)}}function j(e){return function(){return D(e,[...arguments])}}function M(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ve;se&&se(e,null);let r=t.length;for(;r--;){let i=t[r];if(typeof i==`string`){let e=n(i);e!==i&&(ce(t)||(t[r]=e),i=e)}e[i]=!0}return e}function Te(e){for(let t=0;t<e.length;t++)O(e,t)||(e[t]=null);return e}function N(e){let t=de(null);for(let[n,r]of oe(e))O(e,n)&&(Array.isArray(r)?t[n]=Te(r):r&&typeof r==`object`&&r.constructor===Object?t[n]=N(r):t[n]=r);return t}function Ee(e,t){for(;e!==null;){let n=ue(e,t);if(n){if(n.get)return A(n.get);if(typeof n.value==`function`)return A(n.value)}e=le(e)}function n(){return null}return n}var De=T(`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(`.`)),Oe=T(`svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern`.split(`.`)),ke=T([`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`]),Ae=T([`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`]),je=T(`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(`.`)),Me=T([`maction`,`maligngroup`,`malignmark`,`mlongdiv`,`mscarries`,`mscarry`,`msgroup`,`mstack`,`msline`,`msrow`,`semantics`,`annotation`,`annotation-xml`,`mprescripts`,`none`]),Ne=T([`#text`]),Pe=T(`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`.split(`.`)),Fe=T(`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`.split(`.`)),Ie=T(`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`.split(`.`)),Le=T([`xlink:href`,`xml:id`,`xlink:title`,`xml:space`,`xmlns:xlink`]),P=E(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Re=E(/<%[\w\W]*|[\w\W]*%>/gm),ze=E(/\$\{[\w\W]*/gm),F=E(/^data-[\-\w.\u00B7-\uFFFF]+$/),Be=E(/^aria-[\-\w]+$/),Ve=E(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),He=E(/^(?:\w+script|data):/i),Ue=E(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),We=E(/^html$/i),Ge=E(/^[a-z][.\w]*(-[.\w]+)+$/i),Ke=Object.freeze({__proto__:null,ARIA_ATTR:Be,ATTR_WHITESPACE:Ue,CUSTOM_ELEMENT:Ge,DATA_ATTR:F,DOCTYPE_NAME:We,ERB_EXPR:Re,IS_ALLOWED_URI:Ve,IS_SCRIPT_OR_DATA:He,MUSTACHE_EXPR:P,TMPLIT_EXPR:ze}),qe={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Je=function(){return typeof window>`u`?null:window},Ye=function(e,t){if(typeof e!=`object`||typeof e.createPolicy!=`function`)return null;let n=null,r=`data-tt-policy-suffix`;t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let i=`dompurify`+(n?`#`+n:``);try{return e.createPolicy(i,{createHTML(e){return e},createScriptURL(e){return e}})}catch{return console.warn(`TrustedTypes policy `+i+` could not be created.`),null}},Xe=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Ze(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Je(),t=e=>Ze(e);if(t.version=`3.3.1`,t.removed=[],!e||!e.document||e.document.nodeType!==qe.document||!e.Element)return t.isSupported=!1,t;let{document:n}=e,r=n,i=r.currentScript,{DocumentFragment:a,HTMLTemplateElement:o,Node:s,Element:c,NodeFilter:l,NamedNodeMap:u=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:d,DOMParser:f,trustedTypes:p}=e,m=c.prototype,h=Ee(m,`cloneNode`),g=Ee(m,`remove`),_=Ee(m,`nextSibling`),ee=Ee(m,`childNodes`),v=Ee(m,`parentNode`);if(typeof o==`function`){let e=n.createElement(`template`);e.content&&e.content.ownerDocument&&(n=e.content.ownerDocument)}let y,b=``,{implementation:te,createNodeIterator:ne,createDocumentFragment:re,getElementsByTagName:x}=n,{importNode:S}=r,C=Xe();t.isSupported=typeof oe==`function`&&typeof v==`function`&&te&&te.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:w,ERB_EXPR:ie,TMPLIT_EXPR:ae,DATA_ATTR:se,ARIA_ATTR:ce,IS_SCRIPT_OR_DATA:le,ATTR_WHITESPACE:ue,CUSTOM_ELEMENT:E}=Ke,{IS_ALLOWED_URI:fe}=Ke,D=null,A=M({},[...De,...Oe,...ke,...je,...Ne]),j=null,Te=M({},[...Pe,...Fe,...Ie,...Le]),P=Object.seal(de(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Re=null,ze=null,F=Object.seal(de(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),Be=!0,He=!0,Ue=!1,Ge=!0,I=!1,Qe=!0,L=!1,R=!1,$e=!1,z=!1,B=!1,V=!1,H=!0,et=!1,tt=!0,U=!1,nt={},W=null,G=M({},[`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`]),rt=null,it=M({},[`audio`,`video`,`img`,`source`,`image`,`track`]),K=null,at=M({},[`alt`,`class`,`for`,`id`,`label`,`name`,`pattern`,`placeholder`,`role`,`summary`,`title`,`value`,`style`,`xmlns`]),ot=`http://www.w3.org/1998/Math/MathML`,st=`http://www.w3.org/2000/svg`,q=`http://www.w3.org/1999/xhtml`,ct=q,J=!1,lt=null,ut=M({},[ot,st,q],ye),Y=M({},[`mi`,`mo`,`mn`,`ms`,`mtext`]),dt=M({},[`annotation-xml`]),ft=M({},[`title`,`style`,`font`,`a`,`script`]),X=null,pt=[`application/xhtml+xml`,`text/html`],Z=null,mt=null,ht=n.createElement(`form`),gt=function(e){return e instanceof RegExp||e instanceof Function},Q=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(mt&&mt===e)){if((!e||typeof e!=`object`)&&(e={}),e=N(e),X=pt.indexOf(e.PARSER_MEDIA_TYPE)===-1?`text/html`:e.PARSER_MEDIA_TYPE,Z=X===`application/xhtml+xml`?ye:ve,D=O(e,`ALLOWED_TAGS`)?M({},e.ALLOWED_TAGS,Z):A,j=O(e,`ALLOWED_ATTR`)?M({},e.ALLOWED_ATTR,Z):Te,lt=O(e,`ALLOWED_NAMESPACES`)?M({},e.ALLOWED_NAMESPACES,ye):ut,K=O(e,`ADD_URI_SAFE_ATTR`)?M(N(at),e.ADD_URI_SAFE_ATTR,Z):at,rt=O(e,`ADD_DATA_URI_TAGS`)?M(N(it),e.ADD_DATA_URI_TAGS,Z):it,W=O(e,`FORBID_CONTENTS`)?M({},e.FORBID_CONTENTS,Z):G,Re=O(e,`FORBID_TAGS`)?M({},e.FORBID_TAGS,Z):N({}),ze=O(e,`FORBID_ATTR`)?M({},e.FORBID_ATTR,Z):N({}),nt=O(e,`USE_PROFILES`)?e.USE_PROFILES:!1,Be=e.ALLOW_ARIA_ATTR!==!1,He=e.ALLOW_DATA_ATTR!==!1,Ue=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Ge=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,I=e.SAFE_FOR_TEMPLATES||!1,Qe=e.SAFE_FOR_XML!==!1,L=e.WHOLE_DOCUMENT||!1,z=e.RETURN_DOM||!1,B=e.RETURN_DOM_FRAGMENT||!1,V=e.RETURN_TRUSTED_TYPE||!1,$e=e.FORCE_BODY||!1,H=e.SANITIZE_DOM!==!1,et=e.SANITIZE_NAMED_PROPS||!1,tt=e.KEEP_CONTENT!==!1,U=e.IN_PLACE||!1,fe=e.ALLOWED_URI_REGEXP||Ve,ct=e.NAMESPACE||q,Y=e.MATHML_TEXT_INTEGRATION_POINTS||Y,dt=e.HTML_INTEGRATION_POINTS||dt,P=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&>(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(P.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&>(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(P.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements==`boolean`&&(P.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),I&&(He=!1),B&&(z=!0),nt&&(D=M({},Ne),j=[],nt.html===!0&&(M(D,De),M(j,Pe)),nt.svg===!0&&(M(D,Oe),M(j,Fe),M(j,Le)),nt.svgFilters===!0&&(M(D,ke),M(j,Fe),M(j,Le)),nt.mathMl===!0&&(M(D,je),M(j,Ie),M(j,Le))),e.ADD_TAGS&&(typeof e.ADD_TAGS==`function`?F.tagCheck=e.ADD_TAGS:(D===A&&(D=N(D)),M(D,e.ADD_TAGS,Z))),e.ADD_ATTR&&(typeof e.ADD_ATTR==`function`?F.attributeCheck=e.ADD_ATTR:(j===Te&&(j=N(j)),M(j,e.ADD_ATTR,Z))),e.ADD_URI_SAFE_ATTR&&M(K,e.ADD_URI_SAFE_ATTR,Z),e.FORBID_CONTENTS&&(W===G&&(W=N(W)),M(W,e.FORBID_CONTENTS,Z)),e.ADD_FORBID_CONTENTS&&(W===G&&(W=N(W)),M(W,e.ADD_FORBID_CONTENTS,Z)),tt&&(D[`#text`]=!0),L&&M(D,[`html`,`head`,`body`]),D.table&&(M(D,[`tbody`]),delete Re.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!=`function`)throw we(`TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.`);if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!=`function`)throw we(`TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.`);y=e.TRUSTED_TYPES_POLICY,b=y.createHTML(``)}else y===void 0&&(y=Ye(p,i)),y!==null&&typeof b==`string`&&(b=y.createHTML(``));T&&T(e),mt=e}},_t=M({},[...Oe,...ke,...Ae]),vt=M({},[...je,...Me]),yt=function(e){let t=v(e);(!t||!t.tagName)&&(t={namespaceURI:ct,tagName:`template`});let n=ve(e.tagName),r=ve(t.tagName);return lt[e.namespaceURI]?e.namespaceURI===st?t.namespaceURI===q?n===`svg`:t.namespaceURI===ot?n===`svg`&&(r===`annotation-xml`||Y[r]):!!_t[n]:e.namespaceURI===ot?t.namespaceURI===q?n===`math`:t.namespaceURI===st?n===`math`&&dt[r]:!!vt[n]:e.namespaceURI===q?t.namespaceURI===st&&!dt[r]||t.namespaceURI===ot&&!Y[r]?!1:!vt[n]&&(ft[n]||!_t[n]):!!(X===`application/xhtml+xml`&<[e.namespaceURI]):!1},bt=function(e){ge(t.removed,{element:e});try{v(e).removeChild(e)}catch{g(e)}},xt=function(e,n){try{ge(t.removed,{attribute:n.getAttributeNode(e),from:n})}catch{ge(t.removed,{attribute:null,from:n})}if(n.removeAttribute(e),e===`is`)if(z||B)try{bt(n)}catch{}else try{n.setAttribute(e,``)}catch{}},St=function(e){let t=null,r=null;if($e)e=`<remove></remove>`+e;else{let t=be(e,/^[\r\n\t ]+/);r=t&&t[0]}X===`application/xhtml+xml`&&ct===q&&(e=`<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>`+e+`</body></html>`);let i=y?y.createHTML(e):e;if(ct===q)try{t=new f().parseFromString(i,X)}catch{}if(!t||!t.documentElement){t=te.createDocument(ct,`template`,null);try{t.documentElement.innerHTML=J?b:i}catch{}}let a=t.body||t.documentElement;return e&&r&&a.insertBefore(n.createTextNode(r),a.childNodes[0]||null),ct===q?x.call(t,L?`html`:`body`)[0]:L?t.documentElement:a},Ct=function(e){return ne.call(e.ownerDocument||e,e,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},wt=function(e){return e instanceof d&&(typeof e.nodeName!=`string`||typeof e.textContent!=`string`||typeof e.removeChild!=`function`||!(e.attributes instanceof u)||typeof e.removeAttribute!=`function`||typeof e.setAttribute!=`function`||typeof e.namespaceURI!=`string`||typeof e.insertBefore!=`function`||typeof e.hasChildNodes!=`function`)},Tt=function(e){return typeof s==`function`&&e instanceof s};function $(e,n,r){pe(e,e=>{e.call(t,n,r,mt)})}let Et=function(e){let n=null;if($(C.beforeSanitizeElements,e,null),wt(e))return bt(e),!0;let r=Z(e.nodeName);if($(C.uponSanitizeElement,e,{tagName:r,allowedTags:D}),Qe&&e.hasChildNodes()&&!Tt(e.firstElementChild)&&k(/<[/\w!]/g,e.innerHTML)&&k(/<[/\w!]/g,e.textContent)||e.nodeType===qe.progressingInstruction||Qe&&e.nodeType===qe.comment&&k(/<[/\w]/g,e.data))return bt(e),!0;if(!(F.tagCheck instanceof Function&&F.tagCheck(r))&&(!D[r]||Re[r])){if(!Re[r]&&Ot(r)&&(P.tagNameCheck instanceof RegExp&&k(P.tagNameCheck,r)||P.tagNameCheck instanceof Function&&P.tagNameCheck(r)))return!1;if(tt&&!W[r]){let t=v(e)||e.parentNode,n=ee(e)||e.childNodes;if(n&&t){let r=n.length;for(let i=r-1;i>=0;--i){let r=h(n[i],!0);r.__removalCount=(e.__removalCount||0)+1,t.insertBefore(r,_(e))}}}return bt(e),!0}return e instanceof c&&!yt(e)||(r===`noscript`||r===`noembed`||r===`noframes`)&&k(/<\/no(script|embed|frames)/i,e.innerHTML)?(bt(e),!0):(I&&e.nodeType===qe.text&&(n=e.textContent,pe([w,ie,ae],e=>{n=xe(n,e,` `)}),e.textContent!==n&&(ge(t.removed,{element:e.cloneNode()}),e.textContent=n)),$(C.afterSanitizeElements,e,null),!1)},Dt=function(e,t,r){if(H&&(t===`id`||t===`name`)&&(r in n||r in ht))return!1;if(!(He&&!ze[t]&&k(se,t))&&!(Be&&k(ce,t))&&!(F.attributeCheck instanceof Function&&F.attributeCheck(t,e))){if(!j[t]||ze[t]){if(!(Ot(e)&&(P.tagNameCheck instanceof RegExp&&k(P.tagNameCheck,e)||P.tagNameCheck instanceof Function&&P.tagNameCheck(e))&&(P.attributeNameCheck instanceof RegExp&&k(P.attributeNameCheck,t)||P.attributeNameCheck instanceof Function&&P.attributeNameCheck(t,e))||t===`is`&&P.allowCustomizedBuiltInElements&&(P.tagNameCheck instanceof RegExp&&k(P.tagNameCheck,r)||P.tagNameCheck instanceof Function&&P.tagNameCheck(r))))return!1}else if(!K[t]&&!k(fe,xe(r,ue,``))&&!((t===`src`||t===`xlink:href`||t===`href`)&&e!==`script`&&Se(r,`data:`)===0&&rt[e])&&!(Ue&&!k(le,xe(r,ue,``)))&&r)return!1}return!0},Ot=function(e){return e!==`annotation-xml`&&be(e,E)},kt=function(e){$(C.beforeSanitizeAttributes,e,null);let{attributes:n}=e;if(!n||wt(e))return;let r={attrName:``,attrValue:``,keepAttr:!0,allowedAttributes:j,forceKeepAttr:void 0},i=n.length;for(;i--;){let{name:a,namespaceURI:o,value:s}=n[i],c=Z(a),l=s,u=a===`value`?l:Ce(l);if(r.attrName=c,r.attrValue=u,r.keepAttr=!0,r.forceKeepAttr=void 0,$(C.uponSanitizeAttribute,e,r),u=r.attrValue,et&&(c===`id`||c===`name`)&&(xt(a,e),u=`user-content-`+u),Qe&&k(/((--!?|])>)|<\/(style|title|textarea)/i,u)){xt(a,e);continue}if(c===`attributename`&&be(u,`href`)){xt(a,e);continue}if(r.forceKeepAttr)continue;if(!r.keepAttr){xt(a,e);continue}if(!Ge&&k(/\/>/i,u)){xt(a,e);continue}I&&pe([w,ie,ae],e=>{u=xe(u,e,` `)});let d=Z(e.nodeName);if(!Dt(d,c,u)){xt(a,e);continue}if(y&&typeof p==`object`&&typeof p.getAttributeType==`function`&&!o)switch(p.getAttributeType(d,c)){case`TrustedHTML`:u=y.createHTML(u);break;case`TrustedScriptURL`:u=y.createScriptURL(u);break}if(u!==l)try{o?e.setAttributeNS(o,a,u):e.setAttribute(a,u),wt(e)?bt(e):he(t.removed)}catch{xt(a,e)}}$(C.afterSanitizeAttributes,e,null)},At=function e(t){let n=null,r=Ct(t);for($(C.beforeSanitizeShadowDOM,t,null);n=r.nextNode();)$(C.uponSanitizeShadowNode,n,null),Et(n),kt(n),n.content instanceof a&&e(n.content);$(C.afterSanitizeShadowDOM,t,null)};return t.sanitize=function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=null,o=null,c=null,l=null;if(J=!e,J&&(e=`<!-->`),typeof e!=`string`&&!Tt(e))if(typeof e.toString==`function`){if(e=e.toString(),typeof e!=`string`)throw we(`dirty is not a string, aborting`)}else throw we(`toString is not a function`);if(!t.isSupported)return e;if(R||Q(n),t.removed=[],typeof e==`string`&&(U=!1),U){if(e.nodeName){let t=Z(e.nodeName);if(!D[t]||Re[t])throw we(`root node is forbidden and cannot be sanitized in-place`)}}else if(e instanceof s)i=St(`<!---->`),o=i.ownerDocument.importNode(e,!0),o.nodeType===qe.element&&o.nodeName===`BODY`||o.nodeName===`HTML`?i=o:i.appendChild(o);else{if(!z&&!I&&!L&&e.indexOf(`<`)===-1)return y&&V?y.createHTML(e):e;if(i=St(e),!i)return z?null:V?b:``}i&&$e&&bt(i.firstChild);let u=Ct(U?e:i);for(;c=u.nextNode();)Et(c),kt(c),c.content instanceof a&&At(c.content);if(U)return e;if(z){if(B)for(l=re.call(i.ownerDocument);i.firstChild;)l.appendChild(i.firstChild);else l=i;return(j.shadowroot||j.shadowrootmode)&&(l=S.call(r,l,!0)),l}let d=L?i.outerHTML:i.innerHTML;return L&&D[`!doctype`]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&k(We,i.ownerDocument.doctype.name)&&(d=`<!DOCTYPE `+i.ownerDocument.doctype.name+`>
|
|
11
|
+
`+d),I&&pe([w,ie,ae],e=>{d=xe(d,e,` `)}),y&&V?y.createHTML(d):d},t.setConfig=function(){Q(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}),R=!0},t.clearConfig=function(){mt=null,R=!1},t.isValidAttribute=function(e,t,n){return mt||Q({}),Dt(Z(e),Z(t),n)},t.addHook=function(e,t){typeof t==`function`&&ge(C[e],t)},t.removeHook=function(e,t){if(t!==void 0){let n=me(C[e],t);return n===-1?void 0:_e(C[e],n,1)[0]}return he(C[e])},t.removeHooks=function(e){C[e]=[]},t.removeAllHooks=function(){C=Xe()},t}var I=Ze(),Qe={sanitize:e=>I.sanitize(e)},L=(e,...t)=>new ae(e.reduce((e,n,r)=>{let i=t[r]??``;return typeof i==`string`?[...e,n,Qe.sanitize(i)]:i===!1?[...e,n]:Array.isArray(i)?[...e,n,...i]:[...e,n,i]},[]));function R(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}var $e=`:host{--host-display:flex;--host-heading-border:var(--scorad-heading-border,solid 1px var(--host-color));--host-score-color:var(--scorad-score-color,var(--host-color));--host-score-background:var(--scorad-score-background,var(--host-background-color));--host-score-border:var(--scorad-score-border,solid 1px var(--host-color));gap:var(--host-spacing-unit);flex-wrap:wrap;width:fit-content}h3{aspect-ratio:1;border:var(--host-heading-border);padding:var(--host-padding-unit);margin:0 0 0 calc(-1*var(--host-padding-unit));border-radius:50%;justify-content:center;align-items:center;line-height:0;display:inline-flex}p{padding:var(--host-padding-unit)0 0;margin:0;font-size:.9em}scorad-label{break-inside:avoid;outline:none;flex:5 19rem}#extent-label{flex-basis:100%}#intensity-label{flex-grow:1}#score-label{background:linear-gradient(to bottom,transparent,var(--background-color)75%);flex-basis:100%;font-size:1.2rem;position:sticky;bottom:0}@media print{#score-label{position:relative}}#score-label>span{padding:var(--host-padding-unit);border-radius:var(--host-border-radius);outline:var(--host-score-border);color:var(--host-score-color);background:var(--host-score-background)}scorad-extent,scorad-intensity,scorad-subjective{margin:.6rem calc(-1*var(--host-padding-unit));flex:100%}`,z=`*{box-sizing:border-box}:host{--host-color-l:var(--color-l,50%);--host-error-color-h:var(--error-color-h,0);--host-color:var(--color,#444);--host-background-color:var(--background-color,#eee);--host-primary-color:var(--primary-color,var(--host-color));--host-error-color:var(--error-color,hsl(var(--host-error-color-h),66.7%,var(--host-color-l)));--host-spacing-unit:var(--scorad-spacing-unit,.25rem);--host-padding-unit:var(--scorad-padding-unit,.333rem);--host-border-radius:var(--scorad-border-radius,3px);--host-border-radius-outer:var(--scorad-border-radius-outer,calc(var(--host-border-radius) + var(--host-padding-unit)));--host-outline-hover:var(--scorad-outline-hover,dashed 2px var(--host-primary-color));--host-outline-focus:var(--scorad-outline-focus,solid 2px var(--host-primary-color));display:var(--host-display,inline-flex);line-height:1.2}@media (prefers-color-scheme:dark){:host{--host-color-l:var(--color-l,70%)}}`;let B={headNeck:null,anteriorTrunk:null,posteriorTrunk:null,upperLimbs:null,lowerLimbs:null,genitals:null},V={erythema:null,oedemaPapulation:null,oozingCrusting:null,excoriations:null,lichenification:null,xerosis:null},H={pruritus:null,sleeplessness:null},et={child:!1,extent:B,intensity:V,subjective:H},tt={headNeck:.09,anteriorTrunk:.18,posteriorTrunk:.18,upperLimbs:.18,lowerLimbs:.36,genitals:.01},U={headNeck:.18,anteriorTrunk:.18,posteriorTrunk:.18,upperLimbs:.18,lowerLimbs:.28,genitals:0};var nt=`:host{--host-display:inline-flex;--host-font-size:1rem;flex-wrap:wrap;justify-content:center;align-items:center;position:relative}label{padding:var(--host-padding-unit)}svg{min-width:14rem;max-width:18rem;margin:var(--host-padding-unit)0;fill:#0000;stroke:var(--host-color);stroke-width:1px;stroke-linecap:round;stroke-linejoin:round;flex:16rem;overflow:visible}@media print{svg{flex:0 0 14rem;width:14rem}}path,line{vector-effect:non-scaling-stroke}path{opacity:.333}text,line{opacity:.667}g{outline:none}g[tabindex] path{opacity:1;fill:hsla(var(--scorad-h,0),var(--extent,"0%"),50%,var(--opacity,0))}:host(:not([aria-readonly=true])) g[tabindex] path{cursor:grab}:host(:not([aria-readonly=true])) :has(:active) g[tabindex] path{cursor:ns-resize}:is(:host(:not([aria-readonly=true])) :not(:has(:active)) g[tabindex]:hover path,:host(:not([aria-readonly=true])) :not(:has(:active)) g[tabindex]:hover line){stroke-width:2px;stroke:var(--host-primary-color);stroke-dasharray:2 3.5;opacity:1}:host(:not([aria-readonly=true])) g[tabindex]:focus path,:host(:not([aria-readonly=true])) g[tabindex]:active path,:host(:not([aria-readonly=true])) g[tabindex].selected path,:host(:not([aria-readonly=true])) g[tabindex]:focus line,:host(:not([aria-readonly=true])) g[tabindex]:active line,:host(:not([aria-readonly=true])) g[tabindex].selected line{stroke-width:2px;stroke:var(--host-primary-color);opacity:1;stroke-dasharray:none!important}g[tabindex] text{fill:var(--host-color);stroke:none;font-size:var(--host-font-size);text-anchor:end}g[tabindex].posterior-trunk text{text-anchor:start}:is(:host(:not([aria-readonly=true])) :not(:has(:active)) g[tabindex]:hover text,:host(:not([aria-readonly=true])) g[tabindex]:focus text,:host(:not([aria-readonly=true])) g[tabindex]:active text,:host(:not([aria-readonly=true])) g[tabindex].selected text){fill:var(--host-primary-color);opacity:1}`;let W=e=>e?.child?U:tt,G=e=>{let t=[],n=(e,n,r)=>{for(let[i,a]of Object.entries(e))G.isValid(a,r)||t.push(G.formatError(n,i,r,a))},r={...e?.extent??B},i=W(e);for(let[e,t]of Object.entries(i))t===0&&delete r[e];return n(r,`extent`,100),n(e?.intensity??V,`intensity`,3),n(e?.subjective??H,`subjective`,10),t.length?_.Fail(t):_.Ok(e)};G.formatError=(e,t,n,r)=>`${e}.${t}: must be between 0 and ${n}, but received ${r}.`,G.isValid=(e,t)=>typeof e==`number`&&Number.isFinite(e)&&e>=0&&e<=t;let rt={child:{text:`child`,description:`use weightings for a child`},extent:{headNeck:{text:`head`,description:`percentage of the head and neck area affected`},anteriorTrunk:{text:`trunk`,description:`percentage of the front torso area affected`},posteriorTrunk:{text:`back`,description:`percentage of the back torso area affected`},genitals:{text:`genitals`,description:`percentage of the genital area affected`},upperLimbs:{text:`arms`,description:`percentage of the arms and shoulders affected`},lowerLimbs:{text:`legs`,description:`percentage of the legs and hips affected`}},intensity:{erythema:{text:`Erythema`,description:`redness of the skin`},oedemaPapulation:{text:`Oedema/Papulation`,description:`swelling and small bumps`},oozingCrusting:{text:`Oozing/Crusting`,description:`fluid leakage and dried scabs`},excoriations:{text:`Excoriations`,description:`scratch marks`},lichenification:{text:`Lichenification`,description:`skin thickening and hardening`},xerosis:{text:`Xerosis`,description:`dryness of the skin`}},subjective:{pruritus:{text:`Pruritus`,description:`itching`},sleeplessness:{text:`Sleeplessness`,description:`difficulty sleeping`}}};var it=`scorad-extent`,K=class extends C{connectedCallback(){this.render(),this.addEventListener(`focusin`,this.handleFocusIn,{once:!0})}disconnectedCallback(){this.removeEventListener(`focusin`,this.handleFocusIn)}handleFocusIn=()=>{this.readonly||(this.committedValue=this.value,this.addEventListener(`focusout`,this.handleFocusOut,{once:!0}))};handleFocusOut=()=>{this.addEventListener(`focusin`,this.handleFocusIn,{once:!0}),!c(this.value,this.committedValue)&&this.valueChange(this.value)};child=!1;readonly=!1;committedValue=B;value=B;score;setValue=e=>{this.value=e,this.errors=void 0,this.valueInput(this.value)};errors;afterRender(){if(!this.value){this.value=B;return}if(this.shadowRoot)for(let e of f(B)){let t=(this.value??{})[e],n=this.shadowRoot.querySelector(`.${v(e)}`);if(!n)return;n.style.setProperty(`--extent`,`${t}%`),n.style.setProperty(`--opacity`,`${(t??0)/100}`);let r=n.querySelector(`text`);if(!r)return;r.textContent=G.isValid(t,100)?`${t}%`:rt.extent[e].text,n.querySelectorAll(`path`).forEach(t=>t.style.stroke=this.errors?.[e]==null?``:`var(--host-error-color)`)}}resizeCallback(){if(!this.shadowRoot)return;let e=this.shadowRoot.querySelector(`svg`);if(!e)return;let t=Math.round(19e3/e.clientWidth)/100;this.style.setProperty(`--host-font-size`,`${t}rem`)}render(){let e=e=>{let t=t=>{if(this.readonly)return;let n=Math.round(Math.min(100,Math.max(0,t)));this.setValue({...this.value,[e]:n})};return n=>{if(!n)return;`ontouchstart`in window&&n.addEventListener(`touchstart`,e=>{e.preventDefault()},{passive:!1}),n.style.touchAction=`none`,n.addEventListener(`pointerdown`,r=>{r.stopPropagation(),n.focus();let i=this.value[e],a=r.clientY,o=e=>{e.preventDefault();let n=(a-e.clientY)/2;t(Math.round((i+n)/5)*5)},s=()=>{document.removeEventListener(`pointermove`,o),document.removeEventListener(`pointerup`,s),document.removeEventListener(`pointercancel`,s)};document.addEventListener(`pointermove`,o),document.addEventListener(`pointerup`,s),document.addEventListener(`pointercancel`,s),o(r)});let r,i;n.addEventListener(`focus`,()=>{i=`000`,r=this.value[e]}),n.addEventListener(`keydown`,n=>{let a=G.isValid(this.value[e],100)?this.value[e]:0,o=n.shiftKey?5:1;switch(n.key){case`0`:case`1`:case`2`:case`3`:case`4`:case`5`:case`6`:case`7`:case`8`:case`9`:t(Number.parseInt(i.substring(1)+n.key)),i=ee(this.value[e],3);break;case`ArrowLeft`:case`ArrowDown`:n.preventDefault(),t(a-o);break;case`ArrowUp`:case`ArrowRight`:n.preventDefault(),t(a+o);break;case`Escape`:n.preventDefault(),t(r);break}})}},t=e=>t=>{t&&(t.textContent=`${this.value[e]}%`)};return L`
|
|
12
12
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 190 240">
|
|
13
13
|
<g ${e(`headNeck`)}
|
|
14
14
|
class="head-neck" tabindex="0">
|
|
@@ -16,14 +16,14 @@
|
|
|
16
16
|
<line x1="45" y1="16" x2="68" y2="17"></line>
|
|
17
17
|
<path d="M100,45 100,49 Q95,48 90,49 L90,45 A20,22.5 1,1,1 100,45Z"></path>
|
|
18
18
|
</g>
|
|
19
|
-
${this.child?
|
|
19
|
+
${this.child?L`
|
|
20
20
|
<g ${e(`anteriorTrunk`)}
|
|
21
21
|
class="anterior-trunk" tabindex="0">
|
|
22
22
|
<text x="40" y="50" ${t(`anteriorTrunk`)}>--</text>
|
|
23
23
|
<line x1="45" y1="46" x2="77" y2="52"></line>
|
|
24
24
|
<path d="M80,58 Q95,52 110,58 L120,130 95,149 70,130 L80,60Z"></path>
|
|
25
25
|
</g>
|
|
26
|
-
`:
|
|
26
|
+
`:L`
|
|
27
27
|
<g ${e(`anteriorTrunk`)}
|
|
28
28
|
class="anterior-trunk" tabindex="0">
|
|
29
29
|
<text x="40" y="50" ${t(`anteriorTrunk`)}>--</text>
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
<path d="M74,61 70,85 40,135 A1,1 0,0,1 25,130Z"></path>
|
|
39
39
|
<path d="M116,61 120,85 150,135 A1,1 0,0,0 165,130Z"></path>
|
|
40
40
|
</g>
|
|
41
|
-
${this.child?``:
|
|
41
|
+
${this.child?``:L`
|
|
42
42
|
<g ${e(`genitals`)}
|
|
43
43
|
class="genitals" tabindex="0">
|
|
44
44
|
<text x="40" y="170" ${t(`genitals`)}>--</text>
|
|
@@ -73,64 +73,64 @@
|
|
|
73
73
|
<path d="M120,142 Q110,155 100,151 L100,230 A1,1 0,0,0 120,230Z"></path>
|
|
74
74
|
</g>
|
|
75
75
|
</svg>
|
|
76
|
-
`}valueInput;valueChange};
|
|
77
|
-
${Array.from({length:this.max-this.min+1},(e,t)=>this.min+t).map(e=>
|
|
76
|
+
`}valueInput;valueChange};R([y(te)],K.prototype,`child`,void 0),R([y({name:`aria-readonly`,...b})],K.prototype,`readonly`,void 0),R([y({name:`has-errors`,write:e=>e==null?void 0:``,read:!1})],K.prototype,`errors`,void 0),R([w(`value`,`errors`,`readonly`)],K.prototype,`afterRender`,null),R([w(`child`)],K.prototype,`render`,null),R([S()],K.prototype,`valueInput`,void 0),R([S()],K.prototype,`valueChange`,void 0),K=R([x({tag:it,css:[z,nt],delegatesFocus:!0})],K);var at=`:host{--host-display:inline-flex;flex-direction:column;position:relative}scorad-options{align-self:center;margin-left:auto}`,ot=`:host{--host-display:inline-flex;--host-option-width:var(--scorad-option-width,1.5em);--host-option-height:var(--scorad-option-height,1.5em);--host-option-border:var(--scorad-option-border,solid 1px var(--host-color));--host-option-border-selected:var(--scorad-option-border-selected,solid 2px var(--host-color));--host-option-color:var(--scorad-option-color,var(--host-color));--host-option-background:var(--scorad-option-background,transparent);--host-option-color-selected:var(--scorad-option-color-selected,var(--host-background-color));--host-option-background-selected:var(--scorad-option-background-selected,var(--host-color));gap:var(--host-spacing-unit);margin:var(--host-padding-unit)0;outline:none;width:max-content;position:relative}span{height:var(--host-option-height);width:var(--host-option-width);outline:var(--host-option-border);border-radius:var(--host-border-radius);padding:calc(.5*var(--host-padding-unit))var(--host-padding-unit);color:var(--host-option-color);background:var(--host-option-background)}:host(:not([aria-readonly=true])) span{cursor:pointer}span:before{content:"";touch-action:none;pointer-events:none}span[aria-selected=true]{outline:var(--host-option-border-selected);color:var(--host-option-color-selected);background:var(--host-option-background-selected)}`,st=`scorad-options`,q=class extends C{connectedCallback(){this.render(),this.addEventListener(`focusin`,this.handleFocusIn,{once:!0}),this.addEventListener(`click`,this.handleClick)}disconnectedCallback(){this.removeEventListener(`focusin`,this.handleFocusIn),this.removeEventListener(`click`,this.handleClick)}handleFocusIn=()=>{this.readonly||(this.committedValue=this.value,this.addEventListener(`focusout`,this.handleFocusOut,{once:!0}),this.addEventListener(`keydown`,this.handleKeydown))};handleFocusOut=()=>{this.removeEventListener(`keydown`,this.handleKeydown),this.addEventListener(`focusin`,this.handleFocusIn,{once:!0}),this.setValue(this.value),this.value!==this.committedValue&&this.valueChange(this.value)};handleClick=e=>{if(this.readonly)return;e.stopPropagation(),e.preventDefault(),this.focus();let t=e.composedPath()[0];if(!(t instanceof HTMLSpanElement))return;let n=Number.parseInt(t.dataset.value);this.setValue(n)};handleKeydown=e=>{let t=this.value??0;switch(e.key){case`ArrowLeft`:case`ArrowDown`:e.preventDefault(),this.setValue(t-1);break;case`ArrowUp`:case`ArrowRight`:e.preventDefault(),this.setValue(t+1);break;case`Escape`:e.preventDefault(),this.setValue(this.committedValue);break}};min=0;max=5;showHue=!1;committedValue=0;value=0;setValue=e=>{this.value=Math.max(this.min,Math.min(this.max,e)),this.valueInput(this.value)};readonly=!1;text=[];render(){return L`
|
|
77
|
+
${Array.from({length:this.max-this.min+1},(e,t)=>this.min+t).map(e=>L`
|
|
78
78
|
<span data-value="${e}">${this.text[e]}</span>
|
|
79
79
|
`)}
|
|
80
|
-
`}afterRender(){this.shadowRoot&&this.shadowRoot.querySelectorAll(`span`).forEach(e=>{let t=Number.parseInt(e.dataset.value);if(e.setAttribute(`aria-selected`,t===this.value?`true`:`false`),!this.showHue)return;if(t>this.value){e.style.backgroundColor=``;return}let n=Math.round(100*t/(this.max-this.min));e.style.backgroundColor=`hsl(var(--scorad-h, 0), ${n}%, 50%, ${n}%)`})}valueInput;valueChange};
|
|
80
|
+
`}afterRender(){this.shadowRoot&&this.shadowRoot.querySelectorAll(`span`).forEach(e=>{let t=Number.parseInt(e.dataset.value);if(e.setAttribute(`aria-selected`,t===this.value?`true`:`false`),!this.showHue)return;if(t>this.value){e.style.backgroundColor=``;return}let n=Math.round(100*t/(this.max-this.min));e.style.backgroundColor=`hsl(var(--scorad-h, 0), ${n}%, 50%, ${n}%)`})}valueInput;valueChange};R([y({read:Number,write:!1})],q.prototype,`min`,void 0),R([y({read:Number,write:!1})],q.prototype,`max`,void 0),R([y(te)],q.prototype,`showHue`,void 0),R([y({name:`aria-readonly`,...b})],q.prototype,`readonly`,void 0),R([y({write:!1})],q.prototype,`text`,void 0),R([w(`min`,`max`,`text`)],q.prototype,`render`,null),R([w(`value`,`readonly`)],q.prototype,`afterRender`,null),R([S()],q.prototype,`valueInput`,void 0),R([S()],q.prototype,`valueChange`,void 0),q=R([x({tag:st,css:[z,ot]})],q);var ct=`scorad-intensity`,J=class extends C{connectedCallback(){this.render()}readonly=!1;value=V;score;errors;afterRender(){if(this.value==null){this.value=V;return}if(this.shadowRoot)for(let[e,t]of Object.entries(this.value)){let n=this.shadowRoot.querySelector(`.${v(e)}`);if(!n)return;n.dataset.value=`${t}`;let r=n.querySelector(`scorad-options`);if(!r)return;r.value=t,r.readonly=this.readonly,r.style.setProperty(`--host-option-border`,this.errors?.[e]==null?null:`solid 1px var(--host-error-color)`)}}render(){return L`
|
|
81
81
|
${f(this.value).map(e=>this.renderLevel(e))}
|
|
82
|
-
`}renderLevel(e){let t=t=>{t&&(t.addEventListener(`value-input`,t=>{this.value={...this.value,[e]:t.detail},this.errors=void 0,this.valueInput(this.value)}),t.addEventListener(`value-change`,t=>{this.value={...this.value,[e]:t.detail},this.errors=void 0,this.valueChange(this.value)}))},n=
|
|
83
|
-
<scorad-label class="${
|
|
82
|
+
`}renderLevel(e){let t=t=>{t&&(t.addEventListener(`value-input`,t=>{this.value={...this.value,[e]:t.detail},this.errors=void 0,this.valueInput(this.value)}),t.addEventListener(`value-change`,t=>{this.value={...this.value,[e]:t.detail},this.errors=void 0,this.valueChange(this.value)}))},n=rt.intensity[e];return L`
|
|
83
|
+
<scorad-label class="${v(e)} row"
|
|
84
84
|
text="${n.text}"
|
|
85
85
|
description="${n.description}">
|
|
86
86
|
<scorad-options ${t}
|
|
87
87
|
min="0" max="3" show-hue tabindex="0"
|
|
88
88
|
></scorad-options>
|
|
89
89
|
</scorad-label>
|
|
90
|
-
`}valueInput;valueChange};
|
|
90
|
+
`}valueInput;valueChange};R([y({name:`aria-readonly`,...b})],J.prototype,`readonly`,void 0),R([y({name:`has-errors`,write:e=>e==null?void 0:``,read:!1})],J.prototype,`errors`,void 0),R([w(`value`,`errors`,`readonly`)],J.prototype,`afterRender`,null),R([S()],J.prototype,`valueInput`,void 0),R([S()],J.prototype,`valueChange`,void 0),J=R([x({tag:ct,css:[z,at],delegatesFocus:!0})],J);var lt=`:host{--host-display:inline-flex;--scorad-label-text-min-width:7rem;flex-direction:column;position:relative}scorad-options{align-self:center;margin-left:auto}`,ut=`scorad-subjective`,Y=class extends C{connectedCallback(){this.render()}readonly=!1;value=H;score;errors;afterRender(){if(this.value==null){this.value=H;return}if(this.shadowRoot)for(let[e,t]of Object.entries(this.value)){let n=this.shadowRoot.querySelector(`.${v(e)}`);if(!n)return;n.dataset.value=`${t}`;let r=n.querySelector(`scorad-options`);if(!r)return;r.value=t,r.readonly=this.readonly,r.style.setProperty(`--host-option-border`,this.errors?.[e]==null?null:`solid 1px var(--host-error-color)`)}}render(){return L`
|
|
91
91
|
${f(this.value).map(e=>this.renderLevel(e))}
|
|
92
|
-
`}renderLevel(e){let t=t=>{t&&t.addEventListener(`value-input`,t=>{this.value={...this.value,[e]:t.detail},this.valueInput(this.value)})},n=
|
|
93
|
-
<scorad-label class="${
|
|
92
|
+
`}renderLevel(e){let t=t=>{t&&(t.addEventListener(`value-input`,t=>{this.value={...this.value,[e]:t.detail},this.errors=void 0,this.valueInput(this.value)}),t.addEventListener(`value-change`,t=>{this.value={...this.value,[e]:t.detail},this.errors=void 0,this.valueChange(this.value)}))},n=rt.subjective[e];return L`
|
|
93
|
+
<scorad-label class="${v(e)} row"
|
|
94
94
|
text="${n.text}"
|
|
95
95
|
description="${n.description}">
|
|
96
96
|
<scorad-options ${t}
|
|
97
97
|
min="0" max="10" show-hue tabindex="0"></scorad-options>
|
|
98
98
|
</scorad-label>
|
|
99
|
-
`}valueInput;valueChange};
|
|
99
|
+
`}valueInput;valueChange};R([y({name:`aria-readonly`,...b})],Y.prototype,`readonly`,void 0),R([y({name:`has-errors`,write:e=>e==null?void 0:``,read:!1})],Y.prototype,`errors`,void 0),R([w(`value`,`errors`,`readonly`)],Y.prototype,`afterRender`,null),R([S()],Y.prototype,`valueInput`,void 0),R([S()],Y.prototype,`valueChange`,void 0),Y=R([x({tag:ut,css:[z,lt],delegatesFocus:!0})],Y);var dt=`:host{--host-display:inline-flex;padding:0 var(--host-padding-unit);border-radius:var(--host-border-radius);justify-content:center;align-items:baseline;position:relative}:host(:hover){outline:var(--host-outline-hover)}:host(:focus-within){outline:var(--host-outline-focus)}scorad-options{--host-option-width:auto;--host-option-height:auto}`,ft=`scorad-weightings`,X=class extends C{connectedCallback(){this.render()}readonly=!1;value=!1;afterRender(){if(this.value==null){this.value=!1;return}if(!this.shadowRoot)return;let e=this.shadowRoot.querySelector(`scorad-options`);e&&(e.value=this.value?1:0,e.text=[`Adult`,`Child`],e.readonly=this.readonly)}render(){return L`
|
|
100
100
|
<scorad-options ${e=>{e.addEventListener(`value-input`,e=>{this.value=e.detail===1,this.valueInput(this.value)})}}
|
|
101
101
|
min="0" max="1" tabindex="0"
|
|
102
102
|
></scorad-options>
|
|
103
|
-
`}valueInput;valueChange};
|
|
103
|
+
`}valueInput;valueChange};R([y({name:`aria-readonly`,...b})],X.prototype,`readonly`,void 0),R([w(`value`,`readonly`)],X.prototype,`afterRender`,null),R([S()],X.prototype,`valueInput`,void 0),R([S()],X.prototype,`valueChange`,void 0),X=R([x({tag:ft,css:[z,dt],delegatesFocus:!0})],X);let pt=e=>{let t=G(e);if(t instanceof g)return t;e=t.value;let n=W(e),r=Object.entries(e.extent).reduce((e,[t,r])=>e+r*n[t],0),i=Object.values(e.intensity).reduce((e,t)=>e+t,0),a=e.subjective.pruritus+e.subjective.sleeplessness,o=e=>Math.round((e+2**-52)*100)/100,s=o(r/5+7*i/2+a);return _.Ok({A:o(r),B:i,C:a,total:s})};var Z=`:host{--host-display:var(--scorad-label-display,inline-flex);--host-options:var(--scorad-label-options,solid 1px var(--host-color));--host-text-min-width:var(--scorad-label-text-min-width,none);--host-text-max-width:var(--scorad-label-text-max-width,none);grid-column:1/3;grid-template-columns:subgrid;padding:var(--host-padding-unit);border-radius:var(--host-border-radius-outer);flex-wrap:wrap;align-content:baseline;align-items:baseline;position:relative}:host(:hover){outline:var(--host-outline-hover)}:host(:focus-within){outline:var(--host-outline-focus)}:host>label{min-width:var(--host-text-min-width);max-width:var(--host-text-max-width)}:host>label>slot[name=text]{transition:all .2s ease-in-out;display:block}:host>label>slot[name=description]{opacity:0;margin-bottom:-1.1em;transition:all .4s ease-in-out;display:block}:host(:hover)>label>slot[name=text],:host(:focus-within)>label>slot[name=text]{transform:translateY(-.5em)}:host(:hover)>label>slot[name=description],:host(:focus-within)>label>slot[name=description]{opacity:.667;transform:translateY(-.6em)}@media print{:host>label>slot[name=text]{transform:translateY(-.5em)}:host>label>slot[name=description]{opacity:.667;transform:translateY(-.6em)}}:host>label{padding:var(--host-padding-unit);flex:1;padding-left:0}`,mt=`scorad-label`,ht=class extends C{connectedCallback(){this.render(),this.addEventListener(`click`,this.handleClick)}diconnectedCallback(){this.removeEventListener(`click`,this.handleClick)}handleClick=e=>{this.querySelector(i)?.focus()};text=`(label)`;description;render(){return L`
|
|
104
104
|
<label>
|
|
105
105
|
<slot name="text"><span>${this.text}</span></slot>
|
|
106
106
|
<slot name="description"><small>${this.description}</small></slot>
|
|
107
107
|
</label>
|
|
108
108
|
<slot></slot>
|
|
109
|
-
`}};
|
|
109
|
+
`}};R([y({write:!1})],ht.prototype,`text`,void 0),R([y({write:!1})],ht.prototype,`description`,void 0),ht=R([x({tag:mt,css:[z,Z]})],ht);var gt=`scorad-component`,Q=class extends C{connectedCallback(){this.render()}readonly=!1;value=et;showErrors=!1;afterRender(){if(this.value==null){this.value=et;return}if(!this.shadowRoot)return;let e=this.shadowRoot.querySelector(`#score`);if(!e)return;let t=pt(this.value).orNull(),n=Object.freeze({}),r=G(this.value).fold(e=>n,e=>e.reduce((e,t)=>{let n=t.indexOf(`:`);return p(e,t.substring(0,n),t.substring(n+2))},n));e.innerText=`${t?.total??`Get Score`}`,e.style.color=this.showErrors&&r!=n?`var(--host-error-color)`:``;let i=this.shadowRoot.querySelector(`scorad-subjective`);i&&(i.value=this.value?.subjective??H,i.score=t?.B,i.readonly=this.readonly,this.showErrors&&(i.errors=d(r,`subjective`)));let a=this.shadowRoot.querySelector(`scorad-intensity`);a&&(a.value=this.value?.intensity??V,a.score=t?.B,a.readonly=this.readonly,this.showErrors&&(a.errors=d(r,`intensity`)));let o=this.shadowRoot.querySelector(`scorad-extent`);o&&(o.child=this.value?.child??!1,o.value=this.value?.extent??B,o.score=t?.A,o.readonly=this.readonly,this.showErrors&&(o.errors=d(r,`extent`)));let s=this.shadowRoot.querySelector(`scorad-weightings`);s&&(s.value=this.value?.child??!1,s.readonly=this.readonly)}render(){return L`
|
|
110
110
|
<scorad-label id="extent-label">
|
|
111
111
|
<h3 slot="text">A</h3>
|
|
112
112
|
<p slot="description">extent - effected surface area</p>
|
|
113
|
-
<scorad-weightings ${e=>{e instanceof
|
|
114
|
-
<scorad-extent tabindex="0" ${e=>{e instanceof
|
|
113
|
+
<scorad-weightings ${e=>{e instanceof X&&(e.addEventListener(`value-input`,e=>{this.value={...this.value,child:e.detail},this.valueInput(this.value)}),e.addEventListener(`value-change`,e=>{this.value={...this.value,child:e.detail},this.valueChange(this.value)}))}}></scorad-weightings>
|
|
114
|
+
<scorad-extent tabindex="0" ${e=>{e instanceof K&&(e.addEventListener(`value-input`,e=>{this.value={...this.value,extent:e.detail},this.valueInput(this.value)}),e.addEventListener(`value-change`,e=>{this.value={...this.value,extent:e.detail},this.valueChange(this.value)}))}}></scorad-extent>
|
|
115
115
|
</scorad-label>
|
|
116
116
|
|
|
117
117
|
<scorad-label id="intensity-label">
|
|
118
118
|
<h3 slot="text">B</h3>
|
|
119
119
|
<p slot="description">intensity - clinical sign severity</p>
|
|
120
|
-
<scorad-intensity tabindex="0" ${e=>{e instanceof
|
|
120
|
+
<scorad-intensity tabindex="0" ${e=>{e instanceof J&&(e.addEventListener(`value-input`,e=>{this.value={...this.value,intensity:e.detail},this.valueInput(this.value)}),e.addEventListener(`value-change`,e=>{this.value={...this.value,intensity:e.detail},this.valueChange(this.value)}))}}></scorad-intensity>
|
|
121
121
|
</scorad-label>
|
|
122
122
|
|
|
123
123
|
<scorad-label id="subjective-label">
|
|
124
124
|
<h3 slot="text">C</h3>
|
|
125
125
|
<p slot="description">subjective - patient reported symptoms</p>
|
|
126
|
-
<scorad-subjective tabindex="0" ${e=>{e instanceof
|
|
126
|
+
<scorad-subjective tabindex="0" ${e=>{e instanceof Y&&(e.addEventListener(`value-input`,e=>{this.value={...this.value,subjective:e.detail},this.valueInput(this.value)}),e.addEventListener(`value-change`,e=>{this.value={...this.value,subjective:e.detail},this.valueChange(this.value)}))}}></scorad-subjective>
|
|
127
127
|
</scorad-label>
|
|
128
128
|
|
|
129
129
|
<scorad-label id="score-label"
|
|
130
130
|
text="SCORAD"
|
|
131
|
-
description="(A / 5) + (7
|
|
132
|
-
${e=>{e instanceof
|
|
131
|
+
description="(A / 5) + (7 × B / 2) + C"
|
|
132
|
+
${e=>{e instanceof ht&&e.addEventListener(`click`,()=>{if(!this.shadowRoot)return;this.showErrors=!0;let e=this.shadowRoot.querySelector(`[has-errors]`);e&&(e.focus({preventScroll:!0}),e.scrollIntoView({behavior:`smooth`,block:`start`}))})}}
|
|
133
133
|
>
|
|
134
134
|
<span id="score" tabindex="0"></span>
|
|
135
135
|
</scorad-label>
|
|
136
|
-
`}valueInput;valueChange};
|
|
136
|
+
`}valueInput;valueChange};R([y({name:`aria-readonly`,...b})],Q.prototype,`readonly`,void 0),R([w(`value`,`showErrors`,`readonly`)],Q.prototype,`afterRender`,null),R([S()],Q.prototype,`valueInput`,void 0),R([S()],Q.prototype,`valueChange`,void 0),Q=R([x({tag:gt,css:[z,$e],delegatesFocus:!0})],Q);let _t=s(`@ntix/components-scorad`,typeof ANTIX_COMPONENTS_SCORAD_LOG_LEVEL>`u`?a.warn:ANTIX_COMPONENTS_SCORAD_LOG_LEVEL);e.Failure=g,Object.defineProperty(e,`HTMLScoradElement`,{enumerable:!0,get:function(){return Q}}),Object.defineProperty(e,`HTMLScoradExtentElement`,{enumerable:!0,get:function(){return K}}),Object.defineProperty(e,`HTMLScoradIntensityElement`,{enumerable:!0,get:function(){return J}}),Object.defineProperty(e,`HTMLScoradLabelElement`,{enumerable:!0,get:function(){return ht}}),Object.defineProperty(e,`HTMLScoradOptionsElement`,{enumerable:!0,get:function(){return q}}),Object.defineProperty(e,`HTMLScoradSubjectiveElement`,{enumerable:!0,get:function(){return Y}}),Object.defineProperty(e,`HTMLScoradWeightingsElement`,{enumerable:!0,get:function(){return X}}),e.LogLevel=a,e.Result=_,e.SCORAD_ADULT_WEIGHTS=tt,e.SCORAD_CHILD_WEIGHTS=U,e.SCORAD_DEFAULT=et,e.SCORAD_EXTENT_DEFAULT=B,e.SCORAD_EXTENT_MAX_VALUE=100,e.SCORAD_INTENSITY_DEFAULT=V,e.SCORAD_INTENSITY_MAX_VALUE=3,e.SCORAD_SUBJECTIVE_DEFAULT=H,e.SCORAD_SUBJECTIVE_MAX_VALUE=10,e.ScoradResources=rt,e.Success=h,e.componentsScoradLogger=_t,e.getScoradScore=pt,e.selectScoradWeights=W,e.validateScoradData=G});
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
* @group Utils
|
|
4
|
-
*/
|
|
1
|
+
import { LogLevel } from '@ntix/components-core';
|
|
2
|
+
export { LogLevel };
|
|
5
3
|
/**
|
|
6
4
|
Internal logger instance for @ntix/components-scorad.
|
|
7
|
-
Configured with a dedicated namespace and the resolved {@link logLevel}.
|
|
8
5
|
*/
|
|
9
6
|
export declare const componentsScoradLogger: import('@ntix/components-core').ILogger;
|
package/dist/getScoradScore.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { Result } from '@ntix/components-core';
|
|
1
|
+
import { Result, Success, Failure } from '@ntix/components-core';
|
|
2
2
|
import { ScoradData } from './ScoradData';
|
|
3
3
|
import { ScoradScore } from './ScoradScore';
|
|
4
|
+
export { Result, Success, Failure };
|
|
4
5
|
/**
|
|
5
6
|
* Calculates the final composite SCORAD score (A/5 + 7B/2 + C) from the raw data.
|
|
6
7
|
* @param data - The complete ScoradData input object.
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { Result } from '@ntix/components-core';
|
|
1
|
+
import { Result, Success, Failure } from '@ntix/components-core';
|
|
2
2
|
import { ScoradData } from './ScoradData';
|
|
3
|
+
export { Result, Success, Failure };
|
|
3
4
|
/**
|
|
4
5
|
* Validates all fields within the ScoradData object against their allowed clinical bounds.
|
|
5
6
|
* Returns an array of error messages.
|
package/docs/getScoradScore.md
CHANGED
|
@@ -2,6 +2,188 @@
|
|
|
2
2
|
|
|
3
3
|
***
|
|
4
4
|
|
|
5
|
+
## Classes
|
|
6
|
+
|
|
7
|
+
### Failure
|
|
8
|
+
|
|
9
|
+
A failed operation containing one or more error messages.
|
|
10
|
+
|
|
11
|
+
#### Properties
|
|
12
|
+
|
|
13
|
+
##### errors
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
readonly errors: string[];
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
An array of errors
|
|
20
|
+
|
|
21
|
+
##### formatErrors()
|
|
22
|
+
|
|
23
|
+
```ts
|
|
24
|
+
static formatErrors: (errors) => string;
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Joins multiple error messages into a single newline-delimited string.
|
|
28
|
+
|
|
29
|
+
###### Parameters
|
|
30
|
+
|
|
31
|
+
| Parameter | Type |
|
|
32
|
+
| ------ | ------ |
|
|
33
|
+
| `errors` | `string`[] |
|
|
34
|
+
|
|
35
|
+
###### Returns
|
|
36
|
+
|
|
37
|
+
`string`
|
|
38
|
+
|
|
39
|
+
#### Methods
|
|
40
|
+
|
|
41
|
+
##### fold()
|
|
42
|
+
|
|
43
|
+
```ts
|
|
44
|
+
fold<R>(onSuccess, onFailure): R;
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Transforms the result using the onFailure callback.
|
|
48
|
+
|
|
49
|
+
###### Type Parameters
|
|
50
|
+
|
|
51
|
+
| Type Parameter |
|
|
52
|
+
| ------ |
|
|
53
|
+
| `R` |
|
|
54
|
+
|
|
55
|
+
###### Parameters
|
|
56
|
+
|
|
57
|
+
| Parameter | Type |
|
|
58
|
+
| ------ | ------ |
|
|
59
|
+
| `onSuccess` | `unknown` |
|
|
60
|
+
| `onFailure` | (`errors`) => `R` |
|
|
61
|
+
|
|
62
|
+
###### Returns
|
|
63
|
+
|
|
64
|
+
`R`
|
|
65
|
+
|
|
66
|
+
##### getErrors()
|
|
67
|
+
|
|
68
|
+
```ts
|
|
69
|
+
getErrors(): string[];
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Returns the collection of error messages.
|
|
73
|
+
|
|
74
|
+
###### Returns
|
|
75
|
+
|
|
76
|
+
`string`[]
|
|
77
|
+
|
|
78
|
+
##### orNull()
|
|
79
|
+
|
|
80
|
+
```ts
|
|
81
|
+
orNull(): null;
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Returns null to indicate failure.
|
|
85
|
+
|
|
86
|
+
###### Returns
|
|
87
|
+
|
|
88
|
+
`null`
|
|
89
|
+
|
|
90
|
+
##### orThrow()
|
|
91
|
+
|
|
92
|
+
```ts
|
|
93
|
+
orThrow(): never;
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
Throws an Error with the formatted error messages.
|
|
97
|
+
|
|
98
|
+
###### Returns
|
|
99
|
+
|
|
100
|
+
`never`
|
|
101
|
+
|
|
102
|
+
***
|
|
103
|
+
|
|
104
|
+
### Success
|
|
105
|
+
|
|
106
|
+
A successful operation containing a value.
|
|
107
|
+
|
|
108
|
+
#### Type Parameters
|
|
109
|
+
|
|
110
|
+
| Type Parameter |
|
|
111
|
+
| ------ |
|
|
112
|
+
| `T` |
|
|
113
|
+
|
|
114
|
+
#### Properties
|
|
115
|
+
|
|
116
|
+
##### value
|
|
117
|
+
|
|
118
|
+
```ts
|
|
119
|
+
readonly value: T;
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
The value
|
|
123
|
+
|
|
124
|
+
#### Methods
|
|
125
|
+
|
|
126
|
+
##### fold()
|
|
127
|
+
|
|
128
|
+
```ts
|
|
129
|
+
fold<R>(onSuccess, onFailure): R;
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
Transforms the result using the onSuccess callback.
|
|
133
|
+
|
|
134
|
+
###### Type Parameters
|
|
135
|
+
|
|
136
|
+
| Type Parameter |
|
|
137
|
+
| ------ |
|
|
138
|
+
| `R` |
|
|
139
|
+
|
|
140
|
+
###### Parameters
|
|
141
|
+
|
|
142
|
+
| Parameter | Type |
|
|
143
|
+
| ------ | ------ |
|
|
144
|
+
| `onSuccess` | (`value`) => `R` |
|
|
145
|
+
| `onFailure` | `unknown` |
|
|
146
|
+
|
|
147
|
+
###### Returns
|
|
148
|
+
|
|
149
|
+
`R`
|
|
150
|
+
|
|
151
|
+
##### getErrors()
|
|
152
|
+
|
|
153
|
+
```ts
|
|
154
|
+
getErrors(): string[];
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
Returns an empty array of errors.
|
|
158
|
+
|
|
159
|
+
###### Returns
|
|
160
|
+
|
|
161
|
+
`string`[]
|
|
162
|
+
|
|
163
|
+
##### orNull()
|
|
164
|
+
|
|
165
|
+
```ts
|
|
166
|
+
orNull(): T;
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
Returns the contained value.
|
|
170
|
+
|
|
171
|
+
###### Returns
|
|
172
|
+
|
|
173
|
+
`T`
|
|
174
|
+
|
|
175
|
+
##### orThrow()
|
|
176
|
+
|
|
177
|
+
```ts
|
|
178
|
+
orThrow(): T;
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
Returns the contained value.
|
|
182
|
+
|
|
183
|
+
###### Returns
|
|
184
|
+
|
|
185
|
+
`T`
|
|
186
|
+
|
|
5
187
|
## Functions
|
|
6
188
|
|
|
7
189
|
### getScoradScore()
|
|
@@ -20,6 +202,42 @@ Calculates the final composite SCORAD score (A/5 + 7B/2 + C) from the raw data.
|
|
|
20
202
|
|
|
21
203
|
#### Returns
|
|
22
204
|
|
|
23
|
-
`Result
|
|
205
|
+
[`Result`](#result)\<[`ScoradScore`](ScoradScore.md#scoradscore)\>
|
|
24
206
|
|
|
25
207
|
The final SCORAD score, rounded to two decimal places.
|
|
208
|
+
|
|
209
|
+
## Type Aliases
|
|
210
|
+
|
|
211
|
+
### Result
|
|
212
|
+
|
|
213
|
+
```ts
|
|
214
|
+
type Result<T> = Success<T> | Failure;
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
A discriminated union representing either a Success or a Failure.
|
|
218
|
+
|
|
219
|
+
#### Type Parameters
|
|
220
|
+
|
|
221
|
+
| Type Parameter |
|
|
222
|
+
| ------ |
|
|
223
|
+
| `T` |
|
|
224
|
+
|
|
225
|
+
## Variables
|
|
226
|
+
|
|
227
|
+
### Result
|
|
228
|
+
|
|
229
|
+
```ts
|
|
230
|
+
Result: object;
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
Utilities for creating and checking Result instances.
|
|
234
|
+
|
|
235
|
+
#### Type Declaration
|
|
236
|
+
|
|
237
|
+
| Name | Type | Description |
|
|
238
|
+
| ------ | ------ | ------ |
|
|
239
|
+
| <a id="empty_errors"></a> `EMPTY_ERRORS` | `string`[] | - |
|
|
240
|
+
| <a id="fail"></a> `Fail()` | (`errors`) => [`Failure`](#failure) | Creates a new Failure instance. |
|
|
241
|
+
| <a id="isfailure"></a> `isFailure()` | \<`T`\>(`result`) => `result is Failure` | Type guard that identifies if a Result is a Failure. |
|
|
242
|
+
| <a id="issuccess"></a> `isSuccess()` | \<`T`\>(`result`) => `result is Success<T>` | Type guard that identifies if a Result is a Success. |
|
|
243
|
+
| <a id="ok"></a> `Ok()` | \<`T`\>(`value`) => [`Success`](#success)\<`T`\> | Creates a new Success instance. |
|
package/package.json
CHANGED
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@ntix/components-scorad",
|
|
3
|
-
"version": "
|
|
4
|
-
"homepage": "https://antix.co.uk/scorad",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"publishConfig": {
|
|
7
|
-
"access": "public"
|
|
8
|
-
},
|
|
9
|
-
"license": "SEE LICENSE IN LICENSE.md",
|
|
10
|
-
"main": "./dist/@ntix/components-scorad.umd.js",
|
|
11
|
-
"module": "./dist/@ntix/components-scorad.es.js",
|
|
12
|
-
"types": "./dist/index.d.ts",
|
|
13
|
-
"exports": {
|
|
14
|
-
".": {
|
|
15
|
-
"types": "./dist/index.d.ts",
|
|
16
|
-
"import": "./dist/@ntix/components-scorad.es.js",
|
|
17
|
-
"require": "./dist/@ntix/components-scorad.umd.js"
|
|
18
|
-
}
|
|
19
|
-
},
|
|
20
|
-
"files": [
|
|
21
|
-
"docs",
|
|
22
|
-
"dist",
|
|
23
|
-
"README.md",
|
|
24
|
-
"LICENSE.md",
|
|
25
|
-
"VALIDATION.md"
|
|
26
|
-
],
|
|
27
|
-
"scripts": {
|
|
28
|
-
"dev": "vite",
|
|
29
|
-
"test": "vitest run",
|
|
30
|
-
"docs": "typedoc",
|
|
31
|
-
"build": "vite build && npm run docs",
|
|
32
|
-
"preview": "vite preview",
|
|
33
|
-
"prepublishOnly": "npm run test && npm run build"
|
|
34
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@ntix/components-scorad",
|
|
3
|
+
"version": "2.0.0",
|
|
4
|
+
"homepage": "https://antix.co.uk/scorad",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"publishConfig": {
|
|
7
|
+
"access": "public"
|
|
8
|
+
},
|
|
9
|
+
"license": "SEE LICENSE IN LICENSE.md",
|
|
10
|
+
"main": "./dist/@ntix/components-scorad.umd.js",
|
|
11
|
+
"module": "./dist/@ntix/components-scorad.es.js",
|
|
12
|
+
"types": "./dist/index.d.ts",
|
|
13
|
+
"exports": {
|
|
14
|
+
".": {
|
|
15
|
+
"types": "./dist/index.d.ts",
|
|
16
|
+
"import": "./dist/@ntix/components-scorad.es.js",
|
|
17
|
+
"require": "./dist/@ntix/components-scorad.umd.js"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"files": [
|
|
21
|
+
"docs",
|
|
22
|
+
"dist",
|
|
23
|
+
"README.md",
|
|
24
|
+
"LICENSE.md",
|
|
25
|
+
"VALIDATION.md"
|
|
26
|
+
],
|
|
27
|
+
"scripts": {
|
|
28
|
+
"dev": "vite",
|
|
29
|
+
"test": "vitest run",
|
|
30
|
+
"docs": "typedoc",
|
|
31
|
+
"build": "vite build && npm run docs",
|
|
32
|
+
"preview": "vite preview",
|
|
33
|
+
"prepublishOnly": "npm run test && npm run build"
|
|
34
|
+
}
|
|
35
35
|
}
|