@ntix/components-scorad 1.0.5 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/@ntix/components-scorad.es.js +430 -228
- package/dist/@ntix/components-scorad.umd.js +39 -32
- package/dist/index.d.ts +517 -20
- package/docs/HTMLScoradValueElement.md +4 -4
- package/docs/ScoradResources.md +1 -1
- package/docs/componentsScoradLogger.md +1 -2
- package/docs/getScoradScore.md +219 -1
- package/docs/validateScoradData.md +1 -1
- package/package.json +34 -34
- package/dist/HTMLScoradValueElement.d.ts +0 -37
- package/dist/ScoradData.d.ts +0 -12
- package/dist/ScoradExtentData.d.ts +0 -21
- package/dist/ScoradExtentWeights.d.ts +0 -5
- package/dist/ScoradIntensityData.d.ts +0 -22
- package/dist/ScoradResources.d.ts +0 -20
- package/dist/ScoradScore.d.ts +0 -20
- package/dist/ScoradSubjectiveData.d.ts +0 -14
- package/dist/component.d.ts +0 -43
- package/dist/componentsScoradLogger.d.ts +0 -9
- package/dist/constants.d.ts +0 -37
- package/dist/extent/component.d.ts +0 -61
- package/dist/extent/index.d.ts +0 -1
- package/dist/getScoradScore.d.ts +0 -9
- package/dist/intensity/component.d.ts +0 -50
- package/dist/intensity/index.d.ts +0 -1
- package/dist/label/component.d.ts +0 -11
- package/dist/label/index.d.ts +0 -1
- package/dist/options/component.d.ts +0 -22
- package/dist/options/index.d.ts +0 -1
- package/dist/selectScoradWeights.d.ts +0 -9
- package/dist/subjective/component.d.ts +0 -50
- package/dist/subjective/index.d.ts +0 -1
- package/dist/validateScoradData.d.ts +0 -14
- package/dist/weightings/component.d.ts +0 -36
- package/dist/weightings/index.d.ts +0 -1
|
@@ -9,16 +9,176 @@ var cache = /* @__PURE__ */ new Map(), asCachedStyle = (t) => t == null ? [] : (
|
|
|
9
9
|
watches: [],
|
|
10
10
|
events: []
|
|
11
11
|
}, t;
|
|
12
|
-
}
|
|
13
|
-
(()
|
|
12
|
+
}, isNumberType = (e) => (typeof e == "number" || e instanceof Number) && !isNaN(e.valueOf()), parseNumberOrNull = (e) => {
|
|
13
|
+
if (isNumberType(e)) return e;
|
|
14
|
+
let t = Number.parseFloat(e);
|
|
15
|
+
return isNaN(t) ? null : t;
|
|
16
|
+
}, parseNumber = (e) => {
|
|
17
|
+
let t = parseNumberOrNull(e);
|
|
18
|
+
if (t === null) throw Error(`Could not parse '${e}' as Number`);
|
|
19
|
+
return t;
|
|
20
|
+
}, isStringType = (e) => typeof e == "string" || e instanceof String, 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(), DATES = {
|
|
21
|
+
get MS_PER_DAY() {
|
|
22
|
+
return 864e5;
|
|
23
|
+
},
|
|
24
|
+
WEEK_START_DAY: (() => {
|
|
25
|
+
try {
|
|
26
|
+
let e = new Intl.DateTimeFormat().resolvedOptions().locale, t = new Intl.Locale(e);
|
|
27
|
+
if (typeof t.getWeekInfo == "function") {
|
|
28
|
+
let e = t.getWeekInfo().firstDay;
|
|
29
|
+
return e === 7 ? 0 : e;
|
|
30
|
+
}
|
|
31
|
+
} catch {}
|
|
32
|
+
return 1;
|
|
33
|
+
})()
|
|
34
|
+
}, getWeekNumber = (e, t, n, r = 1) => {
|
|
35
|
+
let i = new Date(e, t - 1, n, 0, 0, 0, 0), a = (i.getDay() - r + 7) % 7;
|
|
36
|
+
i.setDate(i.getDate() + 3 - a);
|
|
37
|
+
let o = new Date(i.getFullYear(), 0, 4), s = (o.getDay() - r + 7) % 7, c = (i.getTime() - o.getTime()) / DATES.MS_PER_DAY;
|
|
38
|
+
return 1 + Math.round((c - 3 + s) / 7);
|
|
39
|
+
}, isDateType = (e) => e instanceof Date && !isNaN(e.getTime());
|
|
40
|
+
(class e {
|
|
41
|
+
constructor(e, t, n) {
|
|
42
|
+
let r = Math.trunc(parseNumber(e)), i = Math.trunc(parseNumber(t)), o = Math.trunc(parseNumber(n)), s = new Date(r, i - 1, o, 0, 0, 0, 0);
|
|
43
|
+
if (s.getFullYear() !== r || s.getMonth() + 1 !== i || s.getDate() !== o) throw Error(`DateOnly 'Year:${r}, Month:${i}, Day:${o}' is not valid`);
|
|
44
|
+
this.year = r, this.month = i, this.day = o, this.dayOfWeek = s.getDay(), this.weekNumber = getWeekNumber(r, i, o, DATES.WEEK_START_DAY), this.timeMs = s.getTime(), Object.freeze(this);
|
|
45
|
+
}
|
|
46
|
+
day;
|
|
47
|
+
month;
|
|
48
|
+
year;
|
|
49
|
+
dayOfWeek;
|
|
50
|
+
weekNumber;
|
|
51
|
+
timeMs;
|
|
52
|
+
addDays(t) {
|
|
53
|
+
let n = this.toDate();
|
|
54
|
+
return n.setDate(n.getDate() + t), e.fromDate(n);
|
|
55
|
+
}
|
|
56
|
+
addMonths(t, n = {}) {
|
|
57
|
+
let { keepEndOfMonth: r = !0, preventOverflow: i = !0 } = n, a = r && this.equals(this.endOfMonth()), o = a ? this.startOfMonth().toDate() : this.toDate(), s = o.getDate();
|
|
58
|
+
if (o.setMonth(o.getMonth() + t), s !== o.getDate()) {
|
|
59
|
+
if (!i) throw Error(`addMonths overflow: ${s} does not exist in target month.`);
|
|
60
|
+
o.setDate(0);
|
|
61
|
+
}
|
|
62
|
+
return a ? e.fromDate(o).endOfMonth() : e.fromDate(o);
|
|
63
|
+
}
|
|
64
|
+
with(t) {
|
|
65
|
+
return new e(t.year ?? this.year, t.month ?? this.month, t.day ?? this.day);
|
|
66
|
+
}
|
|
67
|
+
startOfWeek() {
|
|
68
|
+
let e = (this.dayOfWeek - DATES.WEEK_START_DAY + 7) % 7;
|
|
69
|
+
return this.addDays(-e);
|
|
70
|
+
}
|
|
71
|
+
endOfWeek() {
|
|
72
|
+
return this.startOfWeek().addDays(6);
|
|
73
|
+
}
|
|
74
|
+
getWeekDates(e = (e) => e) {
|
|
75
|
+
let t = this.startOfWeek(), n = /* @__PURE__ */ new Set();
|
|
76
|
+
for (let r = 0; r < 7; r++) n.add(e(t.addDays(r)));
|
|
77
|
+
return n;
|
|
78
|
+
}
|
|
79
|
+
startOfMonth() {
|
|
80
|
+
return this.with({ day: 1 });
|
|
81
|
+
}
|
|
82
|
+
endOfMonth() {
|
|
83
|
+
let e = new Date(this.year, this.month, 0).getDate();
|
|
84
|
+
return this.with({ day: e });
|
|
85
|
+
}
|
|
86
|
+
getMonthDates(e) {
|
|
87
|
+
let t = this.startOfMonth(), n = /* @__PURE__ */ new Set(), r = this.endOfMonth().day;
|
|
88
|
+
for (let i = 0; i < r; i++) n.add(e(t.addDays(i)));
|
|
89
|
+
return n;
|
|
90
|
+
}
|
|
91
|
+
startOfYear() {
|
|
92
|
+
return this.with({
|
|
93
|
+
month: 1,
|
|
94
|
+
day: 1
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
endOfYear() {
|
|
98
|
+
return this.with({
|
|
99
|
+
month: 12,
|
|
100
|
+
day: 31
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
equals(t) {
|
|
104
|
+
return this.timeMs === e.parseOrNull(t)?.timeMs;
|
|
105
|
+
}
|
|
106
|
+
toString() {
|
|
107
|
+
return `${String(this.year).padStart(4, "0")}-${String(this.month).padStart(2, "0")}-${String(this.day).padStart(2, "0")}`;
|
|
108
|
+
}
|
|
109
|
+
toJSON() {
|
|
110
|
+
return this.toString();
|
|
111
|
+
}
|
|
112
|
+
toDate() {
|
|
113
|
+
return new Date(this.year, this.month - 1, this.day);
|
|
114
|
+
}
|
|
115
|
+
static equals = (t, n) => e.parseOrNull(t)?.equals(n) ?? !1;
|
|
116
|
+
static today = () => e.fromDate(/* @__PURE__ */ new Date());
|
|
117
|
+
static parseOrNull = (t) => {
|
|
118
|
+
if (t instanceof e) return t;
|
|
119
|
+
if (isDateType(t)) return e.fromDate(t);
|
|
120
|
+
if (isNumberType(t)) return e.fromDate(new Date(t));
|
|
121
|
+
if (isStringType(t)) try {
|
|
122
|
+
if (t.indexOf("-") === -1) return e.fromDate(new Date(t));
|
|
123
|
+
let n = t.split("-");
|
|
124
|
+
if (n.length === 3) return new e(n[0], n[1], n[2]);
|
|
125
|
+
} catch {}
|
|
126
|
+
return null;
|
|
127
|
+
};
|
|
128
|
+
static parse = (t) => {
|
|
129
|
+
let n = e.parseOrNull(t);
|
|
130
|
+
if (n === null) throw Error(`Could not parse '${t}' as DateOnly`);
|
|
131
|
+
return n;
|
|
132
|
+
};
|
|
133
|
+
static parseToSet = (t) => t == null ? t : new Set(Array.from(t, (t) => e.parse(t)));
|
|
134
|
+
static parseToStringSet = (t) => t == null ? t : new Set(Array.from(t, (t) => e.parse(t).toString()));
|
|
135
|
+
static addDays(t, n) {
|
|
136
|
+
let r = e.parse(t).toDate();
|
|
137
|
+
return r.setDate(r.getDate() + n), e.fromDate(r).toString();
|
|
138
|
+
}
|
|
139
|
+
static fromDate = (t) => new e(t.getFullYear(), t.getMonth() + 1, t.getDate());
|
|
140
|
+
static fromUTCDate = (t) => new e(t.getUTCFullYear(), t.getUTCMonth() + 1, t.getUTCDate());
|
|
141
|
+
static #e;
|
|
142
|
+
static #t;
|
|
143
|
+
static #n;
|
|
144
|
+
static #r;
|
|
145
|
+
static #i;
|
|
146
|
+
static setLocale(t, n) {
|
|
147
|
+
n = {
|
|
148
|
+
date: {
|
|
149
|
+
day: "numeric",
|
|
150
|
+
month: "short",
|
|
151
|
+
year: "2-digit"
|
|
152
|
+
},
|
|
153
|
+
dateLong: {
|
|
154
|
+
day: "numeric",
|
|
155
|
+
month: "long",
|
|
156
|
+
year: "numeric"
|
|
157
|
+
},
|
|
158
|
+
monthYear: {
|
|
159
|
+
month: "long",
|
|
160
|
+
year: "2-digit"
|
|
161
|
+
},
|
|
162
|
+
weekday: "narrow",
|
|
163
|
+
weekdayLong: "long",
|
|
164
|
+
...n ?? {}
|
|
165
|
+
}, e.#e = new Intl.DateTimeFormat(t, n.date), e.#t = new Intl.DateTimeFormat(t, n.dateLong), e.#n = new Intl.DateTimeFormat(t, n.monthYear), e.#r = new Intl.DateTimeFormat(t, { weekday: n.weekday }), e.#i = new Intl.DateTimeFormat(t, { weekday: n.weekdayLong });
|
|
166
|
+
}
|
|
167
|
+
static #a = e.setLocale("en-GB");
|
|
168
|
+
static formatDate = (t) => e.#e.format(t instanceof e ? t.toDate() : t);
|
|
169
|
+
static formatDateLong = (t) => e.#t.format(t instanceof e ? t.toDate() : t);
|
|
170
|
+
static formatMonthYear = (t) => e.#n.format(t instanceof e ? t.toDate() : t);
|
|
171
|
+
static formatWeekday = (t) => e.#r.format(new Date(1970, 0, 4 + t));
|
|
172
|
+
static formatWeekdayLong = (t) => e.#i.format(new Date(1970, 0, 4 + t));
|
|
173
|
+
}), (() => {
|
|
14
174
|
let e = "__drag_attached";
|
|
15
175
|
return { list: (t, n, r) => {
|
|
16
176
|
if (t.dataset[e]) return;
|
|
17
177
|
t.dataset[e] = "true";
|
|
18
|
-
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()), /* @__PURE__ */ new Map()), l = s(r?.gripSelector, "drag-grip"), u = s(r?.itemSelector, "drag-item"), d, f, p, m = 0, h, g,
|
|
178
|
+
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()), /* @__PURE__ */ new Map()), l = s(r?.gripSelector, "drag-grip"), u = s(r?.itemSelector, "drag-item"), d, f, p, m = 0, h, g, ze = (e) => {
|
|
19
179
|
let n = e.composedPath();
|
|
20
|
-
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",
|
|
21
|
-
},
|
|
180
|
+
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", Be), document.addEventListener("pointerup", _));
|
|
181
|
+
}, Be = (e) => {
|
|
22
182
|
if (!p || !f) throw Error("drag item is undefined");
|
|
23
183
|
let n = f.get(p), r = null;
|
|
24
184
|
for (let [t, i] of f.entries()) {
|
|
@@ -34,10 +194,10 @@ var cache = /* @__PURE__ */ new Map(), asCachedStyle = (t) => t == null ? [] : (
|
|
|
34
194
|
f = c(), m += f.get(p).top - i, d?.focus();
|
|
35
195
|
}
|
|
36
196
|
p.style.transform = `translateY(${e.clientY - m}px)`;
|
|
37
|
-
},
|
|
197
|
+
}, _ = (e) => {
|
|
38
198
|
if (!p) throw Error("drag item is undefined");
|
|
39
|
-
e.stopPropagation(), document.removeEventListener("pointermove",
|
|
40
|
-
},
|
|
199
|
+
e.stopPropagation(), document.removeEventListener("pointermove", Be), document.removeEventListener("pointerup", _), 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);
|
|
200
|
+
}, v = (e) => {
|
|
41
201
|
if (!e.altKey) return;
|
|
42
202
|
let r = (e, r) => {
|
|
43
203
|
let i = document.activeElement;
|
|
@@ -62,8 +222,8 @@ var cache = /* @__PURE__ */ new Map(), asCachedStyle = (t) => t == null ? [] : (
|
|
|
62
222
|
}
|
|
63
223
|
}
|
|
64
224
|
};
|
|
65
|
-
return t.addEventListener("pointerdown",
|
|
66
|
-
t.removeEventListener("pointerdown",
|
|
225
|
+
return t.addEventListener("pointerdown", ze), t.addEventListener("keydown", v), () => {
|
|
226
|
+
t.removeEventListener("pointerdown", ze), t.removeEventListener("keydown", v);
|
|
67
227
|
};
|
|
68
228
|
} };
|
|
69
229
|
})();
|
|
@@ -76,12 +236,12 @@ var FOCUSABLE = "\n button:not([disabled]), \n [href], \n input:not([di
|
|
|
76
236
|
error: 5
|
|
77
237
|
};
|
|
78
238
|
function createLogger(e, t, n) {
|
|
79
|
-
let r = () => {},
|
|
239
|
+
let r = () => {}, i = { provide: (r) => createLogger(`${e}.${r}`, t, n) };
|
|
80
240
|
for (let a of Object.keys(LogLevel)) {
|
|
81
|
-
let
|
|
82
|
-
t >
|
|
241
|
+
let o = a, s = LogLevel[o], c = n[o];
|
|
242
|
+
t > s ? i[o] = r : i[o] = ((t, ...n) => c(`[${e}]`, t, ...n));
|
|
83
243
|
}
|
|
84
|
-
return
|
|
244
|
+
return i;
|
|
85
245
|
}
|
|
86
246
|
var provideLogger = (() => {
|
|
87
247
|
let e = (e, t) => (t ??= provideLogger.defaultLevel, createLogger(e, t, provideLogger.adapter));
|
|
@@ -148,29 +308,44 @@ var Success = class {
|
|
|
148
308
|
this.value = e;
|
|
149
309
|
}
|
|
150
310
|
value;
|
|
311
|
+
getErrors() {
|
|
312
|
+
return Result.EMPTY_ERRORS;
|
|
313
|
+
}
|
|
151
314
|
orThrow() {
|
|
152
315
|
return this.value;
|
|
153
316
|
}
|
|
154
317
|
orNull() {
|
|
155
318
|
return this.value;
|
|
156
319
|
}
|
|
157
|
-
|
|
320
|
+
fold(e, t) {
|
|
321
|
+
return e(this.value);
|
|
322
|
+
}
|
|
158
323
|
}, Failure = class e {
|
|
159
324
|
constructor(e) {
|
|
325
|
+
if (!e?.length) throw Error("errors are required");
|
|
160
326
|
this.errors = e;
|
|
161
327
|
}
|
|
162
328
|
errors;
|
|
329
|
+
getErrors() {
|
|
330
|
+
return this.errors;
|
|
331
|
+
}
|
|
163
332
|
orThrow() {
|
|
164
333
|
throw Error(e.formatErrors(this.errors));
|
|
165
334
|
}
|
|
166
335
|
orNull() {
|
|
167
336
|
return null;
|
|
168
337
|
}
|
|
338
|
+
fold(e, t) {
|
|
339
|
+
return t(this.errors);
|
|
340
|
+
}
|
|
169
341
|
static formatErrors = (e) => e.join("\n");
|
|
170
342
|
}, Result = {
|
|
343
|
+
EMPTY_ERRORS: Object.freeze([]),
|
|
171
344
|
Ok: (e) => new Success(e),
|
|
172
|
-
Fail: (e) => new Failure(e)
|
|
173
|
-
|
|
345
|
+
Fail: (e) => new Failure(e),
|
|
346
|
+
isSuccess: (e) => e instanceof Success,
|
|
347
|
+
isFailure: (e) => e instanceof Failure
|
|
348
|
+
};
|
|
174
349
|
function Att(e = {}) {
|
|
175
350
|
return function(t, r) {
|
|
176
351
|
let i = e?.name ?? r, a = e?.read ?? ((e) => e), o = e?.write ?? ((e) => e);
|
|
@@ -278,34 +453,34 @@ function Component(e = { tag: void 0 }) {
|
|
|
278
453
|
o.prototype.resizeCallback && (s = new ResizeObserver((e) => {
|
|
279
454
|
o.prototype.resizeCallback?.call(e[0].target);
|
|
280
455
|
}));
|
|
281
|
-
let
|
|
456
|
+
let c = o.prototype.attributeChangedCallback ?? n;
|
|
282
457
|
o.prototype.attributeChangedCallback = function(e, t, n) {
|
|
283
|
-
if (
|
|
458
|
+
if (c(e, t, n), n !== t) {
|
|
284
459
|
var r = o.__metadata?.attributes.find((t) => t.name === e);
|
|
285
460
|
r?.read && (this[r.propertyName] = r.read(n));
|
|
286
461
|
}
|
|
287
462
|
};
|
|
288
|
-
let
|
|
463
|
+
let l = o.prototype.connectedCallback ?? n;
|
|
289
464
|
o.prototype.connectedCallback = function() {
|
|
290
|
-
a.forEach((e) => e()), (i.shadowRoot === "open" || i.shadowRoot === "closed") && !this.__shadowRoot && (this.__shadowRoot = this.attachShadow({
|
|
465
|
+
this.style.setProperty("--hem", getComputedStyle(this).fontSize), a.forEach((e) => e()), (i.shadowRoot === "open" || i.shadowRoot === "closed") && !this.__shadowRoot && (this.__shadowRoot = this.attachShadow({
|
|
291
466
|
delegatesFocus: i.delegatesFocus,
|
|
292
467
|
mode: i.shadowRoot,
|
|
293
468
|
slotAssignment: "named"
|
|
294
|
-
}), this.__shadowRoot.adoptedStyleSheets = i.css),
|
|
469
|
+
}), this.__shadowRoot.adoptedStyleSheets = i.css), l.call(this), s && s.observe(this);
|
|
295
470
|
};
|
|
296
|
-
let
|
|
471
|
+
let u = o.prototype.disconnectedCallback ?? n;
|
|
297
472
|
o.prototype.disconnectedCallback = function() {
|
|
298
|
-
|
|
473
|
+
u.call(this), s && s.unobserve(this);
|
|
299
474
|
};
|
|
300
|
-
let
|
|
475
|
+
let d = o.prototype.beforeRender ?? n, f = o.prototype.render ?? n, p = o.prototype.afterRender ?? n;
|
|
301
476
|
return o.prototype.render = async function() {
|
|
302
477
|
r.debug("render", this.tagName);
|
|
303
|
-
let e =
|
|
478
|
+
let e = d.call(this);
|
|
304
479
|
if (isPromise(e) && await e, this.__shadowRoot) {
|
|
305
|
-
let e = this.__shadowRoot, t =
|
|
480
|
+
let e = this.__shadowRoot, t = f.call(this);
|
|
306
481
|
isComponentRender(t) ? await t.render(e) : e.innerHTML = t;
|
|
307
482
|
}
|
|
308
|
-
|
|
483
|
+
p.call(this);
|
|
309
484
|
}, r.debug("define", e.tag), window.customElements.define(e.tag, o), o;
|
|
310
485
|
};
|
|
311
486
|
}
|
|
@@ -328,6 +503,11 @@ var HTMLComponentElement = class extends HTMLElement {
|
|
|
328
503
|
removeEventListener(e, t, n) {
|
|
329
504
|
super.removeEventListener(e, t, n);
|
|
330
505
|
}
|
|
506
|
+
ref(e) {
|
|
507
|
+
return (t) => {
|
|
508
|
+
this[e] = t;
|
|
509
|
+
};
|
|
510
|
+
}
|
|
331
511
|
};
|
|
332
512
|
function Watch(...e) {
|
|
333
513
|
return function(t, r) {
|
|
@@ -553,26 +733,26 @@ var html$1 = freeze(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.a
|
|
|
553
733
|
};
|
|
554
734
|
function createDOMPurify() {
|
|
555
735
|
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : getGlobal(), t = (e) => createDOMPurify(e);
|
|
556
|
-
if (t.version = "3.3.
|
|
557
|
-
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"),
|
|
736
|
+
if (t.version = "3.3.1", t.removed = [], !e || !e.document || e.document.nodeType !== NODE_TYPE.document || !e.Element) return t.isSupported = !1, t;
|
|
737
|
+
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"), ze = lookupGetter(m, "nextSibling"), Be = lookupGetter(m, "childNodes"), _ = lookupGetter(m, "parentNode");
|
|
558
738
|
if (typeof o == "function") {
|
|
559
739
|
let e = n.createElement("template");
|
|
560
740
|
e.content && e.content.ownerDocument && (n = e.content.ownerDocument);
|
|
561
741
|
}
|
|
562
|
-
let
|
|
563
|
-
t.isSupported = typeof entries == "function" && typeof
|
|
564
|
-
let { MUSTACHE_EXPR:
|
|
742
|
+
let v, y = "", { implementation: Ve, createNodeIterator: He, createDocumentFragment: Ue, getElementsByTagName: We } = n, { importNode: Ge } = r, b = _createHooksMap();
|
|
743
|
+
t.isSupported = typeof entries == "function" && typeof _ == "function" && Ve && Ve.createHTMLDocument !== void 0;
|
|
744
|
+
let { MUSTACHE_EXPR: x, ERB_EXPR: S, TMPLIT_EXPR: C, DATA_ATTR: Ke, ARIA_ATTR: qe, IS_SCRIPT_OR_DATA: Je, ATTR_WHITESPACE: Ye, CUSTOM_ELEMENT: Xe } = EXPRESSIONS, { IS_ALLOWED_URI: Ze } = EXPRESSIONS, w = null, Qe = addToSet({}, [
|
|
565
745
|
...html$1,
|
|
566
746
|
...svg$1,
|
|
567
747
|
...svgFilters,
|
|
568
748
|
...mathMl$1,
|
|
569
749
|
...text
|
|
570
|
-
]),
|
|
750
|
+
]), T = null, $e = addToSet({}, [
|
|
571
751
|
...html$2,
|
|
572
752
|
...svg,
|
|
573
753
|
...mathMl,
|
|
574
754
|
...xml
|
|
575
|
-
]),
|
|
755
|
+
]), E = Object.seal(create(null, {
|
|
576
756
|
tagNameCheck: {
|
|
577
757
|
writable: !0,
|
|
578
758
|
configurable: !1,
|
|
@@ -591,7 +771,7 @@ function createDOMPurify() {
|
|
|
591
771
|
enumerable: !0,
|
|
592
772
|
value: !1
|
|
593
773
|
}
|
|
594
|
-
})),
|
|
774
|
+
})), D = null, et = null, O = Object.seal(create(null, {
|
|
595
775
|
tagCheck: {
|
|
596
776
|
writable: !0,
|
|
597
777
|
configurable: !1,
|
|
@@ -604,7 +784,7 @@ function createDOMPurify() {
|
|
|
604
784
|
enumerable: !0,
|
|
605
785
|
value: null
|
|
606
786
|
}
|
|
607
|
-
})),
|
|
787
|
+
})), tt = !0, k = !0, nt = !1, rt = !0, A = !1, j = !0, M = !1, N = !1, P = !1, F = !1, I = !1, L = !1, it = !0, at = !1, ot = !0, R = !1, z = {}, B = null, st = addToSet({}, [
|
|
608
788
|
"annotation-xml",
|
|
609
789
|
"audio",
|
|
610
790
|
"colgroup",
|
|
@@ -630,14 +810,14 @@ function createDOMPurify() {
|
|
|
630
810
|
"title",
|
|
631
811
|
"video",
|
|
632
812
|
"xmp"
|
|
633
|
-
]),
|
|
813
|
+
]), ct = null, lt = addToSet({}, [
|
|
634
814
|
"audio",
|
|
635
815
|
"video",
|
|
636
816
|
"img",
|
|
637
817
|
"source",
|
|
638
818
|
"image",
|
|
639
819
|
"track"
|
|
640
|
-
]),
|
|
820
|
+
]), ut = null, dt = addToSet({}, [
|
|
641
821
|
"alt",
|
|
642
822
|
"class",
|
|
643
823
|
"for",
|
|
@@ -652,58 +832,58 @@ function createDOMPurify() {
|
|
|
652
832
|
"value",
|
|
653
833
|
"style",
|
|
654
834
|
"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,
|
|
835
|
+
]), 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
836
|
V,
|
|
657
837
|
H,
|
|
658
838
|
U
|
|
659
|
-
], stringToString),
|
|
839
|
+
], stringToString), G = addToSet({}, [
|
|
660
840
|
"mi",
|
|
661
841
|
"mo",
|
|
662
842
|
"mn",
|
|
663
843
|
"ms",
|
|
664
844
|
"mtext"
|
|
665
|
-
]),
|
|
845
|
+
]), K = addToSet({}, ["annotation-xml"]), ht = addToSet({}, [
|
|
666
846
|
"title",
|
|
667
847
|
"style",
|
|
668
848
|
"font",
|
|
669
849
|
"a",
|
|
670
850
|
"script"
|
|
671
|
-
]),
|
|
851
|
+
]), q = null, gt = ["application/xhtml+xml", "text/html"], J = null, Y = null, _t = n.createElement("form"), vt = function(e) {
|
|
672
852
|
return e instanceof RegExp || e instanceof Function;
|
|
673
|
-
},
|
|
853
|
+
}, yt = function() {
|
|
674
854
|
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
675
|
-
if (!(
|
|
676
|
-
if ((!e || typeof e != "object") && (e = {}), e = clone(e),
|
|
855
|
+
if (!(Y && Y === e)) {
|
|
856
|
+
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, w = objectHasOwnProperty(e, "ALLOWED_TAGS") ? addToSet({}, e.ALLOWED_TAGS, J) : Qe, T = objectHasOwnProperty(e, "ALLOWED_ATTR") ? addToSet({}, e.ALLOWED_ATTR, J) : $e, 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, D = objectHasOwnProperty(e, "FORBID_TAGS") ? addToSet({}, e.FORBID_TAGS, J) : clone({}), et = objectHasOwnProperty(e, "FORBID_ATTR") ? addToSet({}, e.FORBID_ATTR, J) : clone({}), z = objectHasOwnProperty(e, "USE_PROFILES") ? e.USE_PROFILES : !1, tt = e.ALLOW_ARIA_ATTR !== !1, k = e.ALLOW_DATA_ATTR !== !1, nt = e.ALLOW_UNKNOWN_PROTOCOLS || !1, rt = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, A = e.SAFE_FOR_TEMPLATES || !1, j = e.SAFE_FOR_XML !== !1, M = e.WHOLE_DOCUMENT || !1, F = e.RETURN_DOM || !1, I = e.RETURN_DOM_FRAGMENT || !1, L = e.RETURN_TRUSTED_TYPE || !1, P = 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, Ze = e.ALLOWED_URI_REGEXP || IS_ALLOWED_URI, W = e.NAMESPACE || U, G = e.MATHML_TEXT_INTEGRATION_POINTS || G, K = e.HTML_INTEGRATION_POINTS || K, E = e.CUSTOM_ELEMENT_HANDLING || {}, e.CUSTOM_ELEMENT_HANDLING && vt(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (E.tagNameCheck = e.CUSTOM_ELEMENT_HANDLING.tagNameCheck), e.CUSTOM_ELEMENT_HANDLING && vt(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (E.attributeNameCheck = e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), e.CUSTOM_ELEMENT_HANDLING && typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (E.allowCustomizedBuiltInElements = e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), A && (k = !1), I && (F = !0), z && (w = addToSet({}, text), T = [], z.html === !0 && (addToSet(w, html$1), addToSet(T, html$2)), z.svg === !0 && (addToSet(w, svg$1), addToSet(T, svg), addToSet(T, xml)), z.svgFilters === !0 && (addToSet(w, svgFilters), addToSet(T, svg), addToSet(T, xml)), z.mathMl === !0 && (addToSet(w, mathMl$1), addToSet(T, mathMl), addToSet(T, xml))), e.ADD_TAGS && (typeof e.ADD_TAGS == "function" ? O.tagCheck = e.ADD_TAGS : (w === Qe && (w = clone(w)), addToSet(w, e.ADD_TAGS, J))), e.ADD_ATTR && (typeof e.ADD_ATTR == "function" ? O.attributeCheck = e.ADD_ATTR : (T === $e && (T = clone(T)), addToSet(T, 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 && (w["#text"] = !0), M && addToSet(w, [
|
|
677
857
|
"html",
|
|
678
858
|
"head",
|
|
679
859
|
"body"
|
|
680
|
-
]),
|
|
860
|
+
]), w.table && (addToSet(w, ["tbody"]), delete D.tbody), e.TRUSTED_TYPES_POLICY) {
|
|
681
861
|
if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function") throw typeErrorCreate("TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.");
|
|
682
862
|
if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw typeErrorCreate("TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.");
|
|
683
|
-
|
|
684
|
-
} else
|
|
685
|
-
freeze && freeze(e),
|
|
863
|
+
v = e.TRUSTED_TYPES_POLICY, y = v.createHTML("");
|
|
864
|
+
} else v === void 0 && (v = _createTrustedTypesPolicy(p, i)), v !== null && typeof y == "string" && (y = v.createHTML(""));
|
|
865
|
+
freeze && freeze(e), Y = e;
|
|
686
866
|
}
|
|
687
|
-
},
|
|
867
|
+
}, bt = addToSet({}, [
|
|
688
868
|
...svg$1,
|
|
689
869
|
...svgFilters,
|
|
690
870
|
...svgDisallowed
|
|
691
|
-
]),
|
|
692
|
-
let t =
|
|
871
|
+
]), xt = addToSet({}, [...mathMl$1, ...mathMlDisallowed]), St = function(e) {
|
|
872
|
+
let t = _(e);
|
|
693
873
|
(!t || !t.tagName) && (t = {
|
|
694
874
|
namespaceURI: W,
|
|
695
875
|
tagName: "template"
|
|
696
876
|
});
|
|
697
877
|
let n = stringToLowerCase(e.tagName), r = stringToLowerCase(t.tagName);
|
|
698
|
-
return
|
|
699
|
-
},
|
|
878
|
+
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;
|
|
879
|
+
}, X = function(e) {
|
|
700
880
|
arrayPush(t.removed, { element: e });
|
|
701
881
|
try {
|
|
702
|
-
|
|
882
|
+
_(e).removeChild(e);
|
|
703
883
|
} catch {
|
|
704
884
|
g(e);
|
|
705
885
|
}
|
|
706
|
-
},
|
|
886
|
+
}, Z = function(e, n) {
|
|
707
887
|
try {
|
|
708
888
|
arrayPush(t.removed, {
|
|
709
889
|
attribute: n.getAttributeNode(e),
|
|
@@ -715,196 +895,196 @@ function createDOMPurify() {
|
|
|
715
895
|
from: n
|
|
716
896
|
});
|
|
717
897
|
}
|
|
718
|
-
if (n.removeAttribute(e), e === "is") if (
|
|
719
|
-
|
|
898
|
+
if (n.removeAttribute(e), e === "is") if (F || I) try {
|
|
899
|
+
X(n);
|
|
720
900
|
} catch {}
|
|
721
901
|
else try {
|
|
722
902
|
n.setAttribute(e, "");
|
|
723
903
|
} catch {}
|
|
724
|
-
},
|
|
904
|
+
}, Ct = function(e) {
|
|
725
905
|
let t = null, r = null;
|
|
726
|
-
if (
|
|
906
|
+
if (P) e = "<remove></remove>" + e;
|
|
727
907
|
else {
|
|
728
908
|
let t = stringMatch(e, /^[\r\n\t ]+/);
|
|
729
909
|
r = t && t[0];
|
|
730
910
|
}
|
|
731
|
-
|
|
732
|
-
let i =
|
|
911
|
+
q === "application/xhtml+xml" && W === U && (e = "<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>" + e + "</body></html>");
|
|
912
|
+
let i = v ? v.createHTML(e) : e;
|
|
733
913
|
if (W === U) try {
|
|
734
|
-
t = new f().parseFromString(i,
|
|
914
|
+
t = new f().parseFromString(i, q);
|
|
735
915
|
} catch {}
|
|
736
916
|
if (!t || !t.documentElement) {
|
|
737
|
-
t =
|
|
917
|
+
t = Ve.createDocument(W, "template", null);
|
|
738
918
|
try {
|
|
739
|
-
t.documentElement.innerHTML =
|
|
919
|
+
t.documentElement.innerHTML = ft ? y : i;
|
|
740
920
|
} catch {}
|
|
741
921
|
}
|
|
742
922
|
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);
|
|
923
|
+
return e && r && a.insertBefore(n.createTextNode(r), a.childNodes[0] || null), W === U ? We.call(t, M ? "html" : "body")[0] : M ? t.documentElement : a;
|
|
746
924
|
}, wt = function(e) {
|
|
925
|
+
return He.call(e.ownerDocument || e, e, l.SHOW_ELEMENT | l.SHOW_COMMENT | l.SHOW_TEXT | l.SHOW_PROCESSING_INSTRUCTION | l.SHOW_CDATA_SECTION, null);
|
|
926
|
+
}, Q = function(e) {
|
|
747
927
|
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
928
|
}, Tt = function(e) {
|
|
749
929
|
return typeof s == "function" && e instanceof s;
|
|
750
930
|
};
|
|
751
931
|
function $(e, n, r) {
|
|
752
932
|
arrayForEach(e, (e) => {
|
|
753
|
-
e.call(t, n, r,
|
|
933
|
+
e.call(t, n, r, Y);
|
|
754
934
|
});
|
|
755
935
|
}
|
|
756
936
|
let Et = function(e) {
|
|
757
937
|
let n = null;
|
|
758
|
-
if ($(
|
|
759
|
-
let r =
|
|
760
|
-
if ($(
|
|
938
|
+
if ($(b.beforeSanitizeElements, e, null), Q(e)) return X(e), !0;
|
|
939
|
+
let r = J(e.nodeName);
|
|
940
|
+
if ($(b.uponSanitizeElement, e, {
|
|
761
941
|
tagName: r,
|
|
762
|
-
allowedTags:
|
|
763
|
-
}),
|
|
764
|
-
if (!(
|
|
765
|
-
if (!
|
|
766
|
-
if (
|
|
767
|
-
let t =
|
|
942
|
+
allowedTags: w
|
|
943
|
+
}), j && e.hasChildNodes() && !Tt(e.firstElementChild) && regExpTest(/<[/\w!]/g, e.innerHTML) && regExpTest(/<[/\w!]/g, e.textContent) || e.nodeType === NODE_TYPE.progressingInstruction || j && e.nodeType === NODE_TYPE.comment && regExpTest(/<[/\w]/g, e.data)) return X(e), !0;
|
|
944
|
+
if (!(O.tagCheck instanceof Function && O.tagCheck(r)) && (!w[r] || D[r])) {
|
|
945
|
+
if (!D[r] && Ot(r) && (E.tagNameCheck instanceof RegExp && regExpTest(E.tagNameCheck, r) || E.tagNameCheck instanceof Function && E.tagNameCheck(r))) return !1;
|
|
946
|
+
if (ot && !B[r]) {
|
|
947
|
+
let t = _(e) || e.parentNode, n = Be(e) || e.childNodes;
|
|
768
948
|
if (n && t) {
|
|
769
949
|
let r = n.length;
|
|
770
950
|
for (let i = r - 1; i >= 0; --i) {
|
|
771
951
|
let r = h(n[i], !0);
|
|
772
|
-
r.__removalCount = (e.__removalCount || 0) + 1, t.insertBefore(r,
|
|
952
|
+
r.__removalCount = (e.__removalCount || 0) + 1, t.insertBefore(r, ze(e));
|
|
773
953
|
}
|
|
774
954
|
}
|
|
775
955
|
}
|
|
776
|
-
return
|
|
956
|
+
return X(e), !0;
|
|
777
957
|
}
|
|
778
|
-
return e instanceof c && !
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
958
|
+
return e instanceof c && !St(e) || (r === "noscript" || r === "noembed" || r === "noframes") && regExpTest(/<\/no(script|embed|frames)/i, e.innerHTML) ? (X(e), !0) : (A && e.nodeType === NODE_TYPE.text && (n = e.textContent, arrayForEach([
|
|
959
|
+
x,
|
|
960
|
+
S,
|
|
961
|
+
C
|
|
782
962
|
], (e) => {
|
|
783
963
|
n = stringReplace(n, e, " ");
|
|
784
|
-
}), e.textContent !== n && (arrayPush(t.removed, { element: e.cloneNode() }), e.textContent = n)), $(
|
|
964
|
+
}), e.textContent !== n && (arrayPush(t.removed, { element: e.cloneNode() }), e.textContent = n)), $(b.afterSanitizeElements, e, null), !1);
|
|
785
965
|
}, Dt = function(e, t, r) {
|
|
786
|
-
if (
|
|
787
|
-
if (!(
|
|
788
|
-
if (!
|
|
789
|
-
if (!(Ot(e) && (
|
|
790
|
-
} else if (!
|
|
966
|
+
if (it && (t === "id" || t === "name") && (r in n || r in _t)) return !1;
|
|
967
|
+
if (!(k && !et[t] && regExpTest(Ke, t)) && !(tt && regExpTest(qe, t)) && !(O.attributeCheck instanceof Function && O.attributeCheck(t, e))) {
|
|
968
|
+
if (!T[t] || et[t]) {
|
|
969
|
+
if (!(Ot(e) && (E.tagNameCheck instanceof RegExp && regExpTest(E.tagNameCheck, e) || E.tagNameCheck instanceof Function && E.tagNameCheck(e)) && (E.attributeNameCheck instanceof RegExp && regExpTest(E.attributeNameCheck, t) || E.attributeNameCheck instanceof Function && E.attributeNameCheck(t, e)) || t === "is" && E.allowCustomizedBuiltInElements && (E.tagNameCheck instanceof RegExp && regExpTest(E.tagNameCheck, r) || E.tagNameCheck instanceof Function && E.tagNameCheck(r)))) return !1;
|
|
970
|
+
} else if (!ut[t] && !regExpTest(Ze, stringReplace(r, Ye, "")) && !((t === "src" || t === "xlink:href" || t === "href") && e !== "script" && stringIndexOf(r, "data:") === 0 && ct[e]) && !(nt && !regExpTest(Je, stringReplace(r, Ye, ""))) && r) return !1;
|
|
791
971
|
}
|
|
792
972
|
return !0;
|
|
793
973
|
}, Ot = function(e) {
|
|
794
|
-
return e !== "annotation-xml" && stringMatch(e,
|
|
974
|
+
return e !== "annotation-xml" && stringMatch(e, Xe);
|
|
795
975
|
}, kt = function(e) {
|
|
796
|
-
$(
|
|
976
|
+
$(b.beforeSanitizeAttributes, e, null);
|
|
797
977
|
let { attributes: n } = e;
|
|
798
|
-
if (!n ||
|
|
978
|
+
if (!n || Q(e)) return;
|
|
799
979
|
let r = {
|
|
800
980
|
attrName: "",
|
|
801
981
|
attrValue: "",
|
|
802
982
|
keepAttr: !0,
|
|
803
|
-
allowedAttributes:
|
|
983
|
+
allowedAttributes: T,
|
|
804
984
|
forceKeepAttr: void 0
|
|
805
985
|
}, i = n.length;
|
|
806
986
|
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
|
-
|
|
987
|
+
let { name: a, namespaceURI: o, value: s } = n[i], c = J(a), l = s, u = a === "value" ? l : stringTrim(l);
|
|
988
|
+
if (r.attrName = c, r.attrValue = u, r.keepAttr = !0, r.forceKeepAttr = void 0, $(b.uponSanitizeAttribute, e, r), u = r.attrValue, at && (c === "id" || c === "name") && (Z(a, e), u = "user-content-" + u), j && regExpTest(/((--!?|])>)|<\/(style|title|textarea)/i, u)) {
|
|
989
|
+
Z(a, e);
|
|
810
990
|
continue;
|
|
811
991
|
}
|
|
812
992
|
if (c === "attributename" && stringMatch(u, "href")) {
|
|
813
|
-
|
|
993
|
+
Z(a, e);
|
|
814
994
|
continue;
|
|
815
995
|
}
|
|
816
996
|
if (r.forceKeepAttr) continue;
|
|
817
997
|
if (!r.keepAttr) {
|
|
818
|
-
|
|
998
|
+
Z(a, e);
|
|
819
999
|
continue;
|
|
820
1000
|
}
|
|
821
|
-
if (!
|
|
822
|
-
|
|
1001
|
+
if (!rt && regExpTest(/\/>/i, u)) {
|
|
1002
|
+
Z(a, e);
|
|
823
1003
|
continue;
|
|
824
1004
|
}
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
1005
|
+
A && arrayForEach([
|
|
1006
|
+
x,
|
|
1007
|
+
S,
|
|
1008
|
+
C
|
|
829
1009
|
], (e) => {
|
|
830
1010
|
u = stringReplace(u, e, " ");
|
|
831
1011
|
});
|
|
832
|
-
let d =
|
|
1012
|
+
let d = J(e.nodeName);
|
|
833
1013
|
if (!Dt(d, c, u)) {
|
|
834
|
-
|
|
1014
|
+
Z(a, e);
|
|
835
1015
|
continue;
|
|
836
1016
|
}
|
|
837
|
-
if (
|
|
1017
|
+
if (v && typeof p == "object" && typeof p.getAttributeType == "function" && !o) switch (p.getAttributeType(d, c)) {
|
|
838
1018
|
case "TrustedHTML":
|
|
839
|
-
u =
|
|
1019
|
+
u = v.createHTML(u);
|
|
840
1020
|
break;
|
|
841
1021
|
case "TrustedScriptURL":
|
|
842
|
-
u =
|
|
1022
|
+
u = v.createScriptURL(u);
|
|
843
1023
|
break;
|
|
844
1024
|
}
|
|
845
1025
|
if (u !== l) try {
|
|
846
|
-
o ? e.setAttributeNS(o, a, u) : e.setAttribute(a, u),
|
|
1026
|
+
o ? e.setAttributeNS(o, a, u) : e.setAttribute(a, u), Q(e) ? X(e) : arrayPop(t.removed);
|
|
847
1027
|
} catch {
|
|
848
|
-
|
|
1028
|
+
Z(a, e);
|
|
849
1029
|
}
|
|
850
1030
|
}
|
|
851
|
-
$(
|
|
1031
|
+
$(b.afterSanitizeAttributes, e, null);
|
|
852
1032
|
}, At = function e(t) {
|
|
853
|
-
let n = null, r =
|
|
854
|
-
for ($(
|
|
855
|
-
$(
|
|
1033
|
+
let n = null, r = wt(t);
|
|
1034
|
+
for ($(b.beforeSanitizeShadowDOM, t, null); n = r.nextNode();) $(b.uponSanitizeShadowNode, n, null), Et(n), kt(n), n.content instanceof a && e(n.content);
|
|
1035
|
+
$(b.afterSanitizeShadowDOM, t, null);
|
|
856
1036
|
};
|
|
857
1037
|
return t.sanitize = function(e) {
|
|
858
1038
|
let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, i = null, o = null, c = null, l = null;
|
|
859
|
-
if (
|
|
1039
|
+
if (ft = !e, ft && (e = "<!-->"), typeof e != "string" && !Tt(e)) if (typeof e.toString == "function") {
|
|
860
1040
|
if (e = e.toString(), typeof e != "string") throw typeErrorCreate("dirty is not a string, aborting");
|
|
861
1041
|
} else throw typeErrorCreate("toString is not a function");
|
|
862
1042
|
if (!t.isSupported) return e;
|
|
863
|
-
if (
|
|
1043
|
+
if (N || yt(n), t.removed = [], typeof e == "string" && (R = !1), R) {
|
|
864
1044
|
if (e.nodeName) {
|
|
865
|
-
let t =
|
|
866
|
-
if (!
|
|
1045
|
+
let t = J(e.nodeName);
|
|
1046
|
+
if (!w[t] || D[t]) throw typeErrorCreate("root node is forbidden and cannot be sanitized in-place");
|
|
867
1047
|
}
|
|
868
|
-
} else if (e instanceof s) i =
|
|
1048
|
+
} 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
1049
|
else {
|
|
870
|
-
if (!
|
|
871
|
-
if (i =
|
|
1050
|
+
if (!F && !A && !M && e.indexOf("<") === -1) return v && L ? v.createHTML(e) : e;
|
|
1051
|
+
if (i = Ct(e), !i) return F ? null : L ? y : "";
|
|
872
1052
|
}
|
|
873
|
-
i &&
|
|
874
|
-
let u =
|
|
1053
|
+
i && P && X(i.firstChild);
|
|
1054
|
+
let u = wt(R ? e : i);
|
|
875
1055
|
for (; c = u.nextNode();) Et(c), kt(c), c.content instanceof a && At(c.content);
|
|
876
|
-
if (
|
|
877
|
-
if (
|
|
878
|
-
if (
|
|
1056
|
+
if (R) return e;
|
|
1057
|
+
if (F) {
|
|
1058
|
+
if (I) for (l = Ue.call(i.ownerDocument); i.firstChild;) l.appendChild(i.firstChild);
|
|
879
1059
|
else l = i;
|
|
880
|
-
return (
|
|
1060
|
+
return (T.shadowroot || T.shadowrootmode) && (l = Ge.call(r, l, !0)), l;
|
|
881
1061
|
}
|
|
882
|
-
let d =
|
|
883
|
-
return
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
1062
|
+
let d = M ? i.outerHTML : i.innerHTML;
|
|
1063
|
+
return M && w["!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), A && arrayForEach([
|
|
1064
|
+
x,
|
|
1065
|
+
S,
|
|
1066
|
+
C
|
|
887
1067
|
], (e) => {
|
|
888
1068
|
d = stringReplace(d, e, " ");
|
|
889
|
-
}),
|
|
1069
|
+
}), v && L ? v.createHTML(d) : d;
|
|
890
1070
|
}, t.setConfig = function() {
|
|
891
|
-
|
|
1071
|
+
yt(arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}), N = !0;
|
|
892
1072
|
}, t.clearConfig = function() {
|
|
893
|
-
|
|
1073
|
+
Y = null, N = !1;
|
|
894
1074
|
}, t.isValidAttribute = function(e, t, n) {
|
|
895
|
-
return
|
|
1075
|
+
return Y || yt({}), Dt(J(e), J(t), n);
|
|
896
1076
|
}, t.addHook = function(e, t) {
|
|
897
|
-
typeof t == "function" && arrayPush(
|
|
1077
|
+
typeof t == "function" && arrayPush(b[e], t);
|
|
898
1078
|
}, t.removeHook = function(e, t) {
|
|
899
1079
|
if (t !== void 0) {
|
|
900
|
-
let n = arrayLastIndexOf(
|
|
901
|
-
return n === -1 ? void 0 : arraySplice(
|
|
1080
|
+
let n = arrayLastIndexOf(b[e], t);
|
|
1081
|
+
return n === -1 ? void 0 : arraySplice(b[e], n, 1)[0];
|
|
902
1082
|
}
|
|
903
|
-
return arrayPop(
|
|
1083
|
+
return arrayPop(b[e]);
|
|
904
1084
|
}, t.removeHooks = function(e) {
|
|
905
|
-
|
|
1085
|
+
b[e] = [];
|
|
906
1086
|
}, t.removeAllHooks = function() {
|
|
907
|
-
|
|
1087
|
+
b = _createHooksMap();
|
|
908
1088
|
}, t;
|
|
909
1089
|
}
|
|
910
1090
|
var purify = createDOMPurify(), HTMLConfig = { sanitize: (e) => purify.sanitize(e) }, html = (e, ...t) => new HTMLLiteralResult(e.reduce((e, n, r) => {
|
|
@@ -929,7 +1109,7 @@ function __decorate(e, t, n, r) {
|
|
|
929
1109
|
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);
|
|
930
1110
|
return i > 3 && a && Object.defineProperty(t, n, a), a;
|
|
931
1111
|
}
|
|
932
|
-
var component_default = ":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
|
|
1112
|
+
var component_default$1 = ":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{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);font-size:1.2rem}#score:focus{outline:var(--host-outline-selected)}scorad-extent,scorad-intensity,scorad-subjective{margin:.6rem calc(-1*var(--host-padding-unit));flex:100%}", host_default = "*{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));--host-outline-selected:var(--scorad-outline-selected,solid 2px var(--host-color));display:var(--host-display,inline-flex);line-height:1.2}@media (prefers-color-scheme:dark){:host{--host-color-l:var(--color-l,70%)}}";
|
|
933
1113
|
const SCORAD_EXTENT_MAX_VALUE = 100, SCORAD_INTENSITY_MAX_VALUE = 3, SCORAD_SUBJECTIVE_MAX_VALUE = 10, SCORAD_EXTENT_DEFAULT = {
|
|
934
1114
|
headNeck: null,
|
|
935
1115
|
anteriorTrunk: null,
|
|
@@ -978,10 +1158,11 @@ const selectScoradWeights = (e) => e?.child ? SCORAD_CHILD_WEIGHTS : SCORAD_ADUL
|
|
|
978
1158
|
validateScoradData.formatError = (e, t, n, r) => `${e}.${t}: must be between 0 and ${n}, but received ${r}.`, validateScoradData.isValid = (e, t) => typeof e == "number" && Number.isFinite(e) && e >= 0 && e <= t;
|
|
979
1159
|
const ScoradResources = {
|
|
980
1160
|
child: {
|
|
981
|
-
text: "
|
|
1161
|
+
text: "weightings",
|
|
982
1162
|
description: "use weightings for a child"
|
|
983
1163
|
},
|
|
984
1164
|
extent: {
|
|
1165
|
+
text: "A. Extent",
|
|
985
1166
|
headNeck: {
|
|
986
1167
|
text: "head",
|
|
987
1168
|
description: "percentage of the head and neck area affected"
|
|
@@ -1008,6 +1189,13 @@ const ScoradResources = {
|
|
|
1008
1189
|
}
|
|
1009
1190
|
},
|
|
1010
1191
|
intensity: {
|
|
1192
|
+
text: "B. Intensity",
|
|
1193
|
+
levels: [
|
|
1194
|
+
"none",
|
|
1195
|
+
"mild",
|
|
1196
|
+
"moderate",
|
|
1197
|
+
"severe"
|
|
1198
|
+
],
|
|
1011
1199
|
erythema: {
|
|
1012
1200
|
text: "Erythema",
|
|
1013
1201
|
description: "redness of the skin"
|
|
@@ -1034,6 +1222,20 @@ const ScoradResources = {
|
|
|
1034
1222
|
}
|
|
1035
1223
|
},
|
|
1036
1224
|
subjective: {
|
|
1225
|
+
text: "C. Subjective",
|
|
1226
|
+
levels: [
|
|
1227
|
+
"0",
|
|
1228
|
+
"1",
|
|
1229
|
+
"2",
|
|
1230
|
+
"3",
|
|
1231
|
+
"4",
|
|
1232
|
+
"5",
|
|
1233
|
+
"6",
|
|
1234
|
+
"7",
|
|
1235
|
+
"8",
|
|
1236
|
+
"9",
|
|
1237
|
+
"10"
|
|
1238
|
+
],
|
|
1037
1239
|
pruritus: {
|
|
1038
1240
|
text: "Pruritus",
|
|
1039
1241
|
description: "itching"
|
|
@@ -1088,6 +1290,7 @@ var tag$6 = "scorad-extent", HTMLScoradExtentElement = class extends HTMLCompone
|
|
|
1088
1290
|
this.style.setProperty("--host-font-size", `${t}rem`);
|
|
1089
1291
|
}
|
|
1090
1292
|
render() {
|
|
1293
|
+
this.setAttribute("role", "group"), this.setAttribute("aria-label", ScoradResources.extent.text);
|
|
1091
1294
|
let e = (e) => {
|
|
1092
1295
|
let t = (t) => {
|
|
1093
1296
|
if (this.readonly) return;
|
|
@@ -1150,6 +1353,7 @@ var tag$6 = "scorad-extent", HTMLScoradExtentElement = class extends HTMLCompone
|
|
|
1150
1353
|
return html`
|
|
1151
1354
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 190 240">
|
|
1152
1355
|
<g ${e("headNeck")}
|
|
1356
|
+
aria-label="${ScoradResources.extent.headNeck.text}"
|
|
1153
1357
|
class="head-neck" tabindex="0">
|
|
1154
1358
|
<text x="40" y="20" ${t("headNeck")}>--</text>
|
|
1155
1359
|
<line x1="45" y1="16" x2="68" y2="17"></line>
|
|
@@ -1157,6 +1361,7 @@ var tag$6 = "scorad-extent", HTMLScoradExtentElement = class extends HTMLCompone
|
|
|
1157
1361
|
</g>
|
|
1158
1362
|
${this.child ? html`
|
|
1159
1363
|
<g ${e("anteriorTrunk")}
|
|
1364
|
+
aria-label="${ScoradResources.extent.anteriorTrunk.text}"
|
|
1160
1365
|
class="anterior-trunk" tabindex="0">
|
|
1161
1366
|
<text x="40" y="50" ${t("anteriorTrunk")}>--</text>
|
|
1162
1367
|
<line x1="45" y1="46" x2="77" y2="52"></line>
|
|
@@ -1164,6 +1369,7 @@ var tag$6 = "scorad-extent", HTMLScoradExtentElement = class extends HTMLCompone
|
|
|
1164
1369
|
</g>
|
|
1165
1370
|
` : html`
|
|
1166
1371
|
<g ${e("anteriorTrunk")}
|
|
1372
|
+
aria-label="${ScoradResources.extent.anteriorTrunk.text}"
|
|
1167
1373
|
class="anterior-trunk" tabindex="0">
|
|
1168
1374
|
<text x="40" y="50" ${t("anteriorTrunk")}>--</text>
|
|
1169
1375
|
<line x1="45" y1="46" x2="75" y2="52"></line>
|
|
@@ -1171,6 +1377,7 @@ var tag$6 = "scorad-extent", HTMLScoradExtentElement = class extends HTMLCompone
|
|
|
1171
1377
|
</g>
|
|
1172
1378
|
`}
|
|
1173
1379
|
<g ${e("upperLimbs")}
|
|
1380
|
+
aria-label="${ScoradResources.extent.upperLimbs.text}"
|
|
1174
1381
|
class="upper-limbs" tabindex="0">
|
|
1175
1382
|
<text x="40" y="80" ${t("upperLimbs")}>--</text>
|
|
1176
1383
|
<line x1="45" y1="76" x2="50" y2="78"></line>
|
|
@@ -1179,6 +1386,7 @@ var tag$6 = "scorad-extent", HTMLScoradExtentElement = class extends HTMLCompone
|
|
|
1179
1386
|
</g>
|
|
1180
1387
|
${this.child ? "" : html`
|
|
1181
1388
|
<g ${e("genitals")}
|
|
1389
|
+
aria-label="${ScoradResources.extent.genitals.text}"
|
|
1182
1390
|
class="genitals" tabindex="0">
|
|
1183
1391
|
<text x="40" y="170" ${t("genitals")}>--</text>
|
|
1184
1392
|
<line x1="45" y1="164" x2="63" y2="138"></line>
|
|
@@ -1186,6 +1394,7 @@ var tag$6 = "scorad-extent", HTMLScoradExtentElement = class extends HTMLCompone
|
|
|
1186
1394
|
</g>
|
|
1187
1395
|
`}
|
|
1188
1396
|
<g ${e("lowerLimbs")}
|
|
1397
|
+
aria-label="${ScoradResources.extent.lowerLimbs.text}"
|
|
1189
1398
|
class="lower-limbs" tabindex="">
|
|
1190
1399
|
<text x="40" y="200" ${t("lowerLimbs")}>--</text>
|
|
1191
1400
|
<line x1="45" y1="195" x2="63" y2="195"></line>
|
|
@@ -1202,6 +1411,7 @@ var tag$6 = "scorad-extent", HTMLScoradExtentElement = class extends HTMLCompone
|
|
|
1202
1411
|
<path d="M116,61 120,85 150,135 A1,1 0,0,0 165,130Z"></path>
|
|
1203
1412
|
</g>
|
|
1204
1413
|
<g ${e("posteriorTrunk")}
|
|
1414
|
+
aria-label="${ScoradResources.extent.posteriorTrunk.text}"
|
|
1205
1415
|
class="posterior-trunk" tabindex="0">
|
|
1206
1416
|
<text x="150" y="50" ${t("posteriorTrunk")}>--</text>
|
|
1207
1417
|
<line x1="145" y1="46" x2="115" y2="52"></line>
|
|
@@ -1217,10 +1427,7 @@ var tag$6 = "scorad-extent", HTMLScoradExtentElement = class extends HTMLCompone
|
|
|
1217
1427
|
valueInput;
|
|
1218
1428
|
valueChange;
|
|
1219
1429
|
};
|
|
1220
|
-
__decorate([Att(AttBoolean)], HTMLScoradExtentElement.prototype, "child", void 0), __decorate([Att({
|
|
1221
|
-
name: "aria-readonly",
|
|
1222
|
-
...AttTrueFalse
|
|
1223
|
-
})], HTMLScoradExtentElement.prototype, "readonly", void 0), __decorate([Att({
|
|
1430
|
+
__decorate([Att(AttBoolean)], HTMLScoradExtentElement.prototype, "child", void 0), __decorate([Att(AttBoolean)], HTMLScoradExtentElement.prototype, "readonly", void 0), __decorate([Att({
|
|
1224
1431
|
name: "has-errors",
|
|
1225
1432
|
write: (e) => e == null ? void 0 : "",
|
|
1226
1433
|
read: !1
|
|
@@ -1229,7 +1436,7 @@ __decorate([Att(AttBoolean)], HTMLScoradExtentElement.prototype, "child", void 0
|
|
|
1229
1436
|
css: [host_default, component_default$6],
|
|
1230
1437
|
delegatesFocus: !0
|
|
1231
1438
|
})], HTMLScoradExtentElement);
|
|
1232
|
-
var component_default$4 = ":host{--host-display:inline-flex;flex-direction:column;position:relative}scorad-options{align-self:center;margin-left:auto}", component_default$5 = ":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-
|
|
1439
|
+
var component_default$4 = ":host{--host-display:inline-flex;flex-direction:column;position:relative}scorad-options{align-self:center;margin-left:auto}", component_default$5 = ":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-checked=true]{outline:var(--host-option-border-selected);color:var(--host-option-color-selected);background:var(--host-option-background-selected)}", tag$5 = "scorad-options", HTMLScoradOptionsElement = class extends HTMLComponentElement {
|
|
1233
1440
|
connectedCallback() {
|
|
1234
1441
|
this.render(), this.addEventListener("focusin", this.handleFocusIn, { once: !0 }), this.addEventListener("click", this.handleClick);
|
|
1235
1442
|
}
|
|
@@ -1268,6 +1475,7 @@ var component_default$4 = ":host{--host-display:inline-flex;flex-direction:colum
|
|
|
1268
1475
|
};
|
|
1269
1476
|
min = 0;
|
|
1270
1477
|
max = 5;
|
|
1478
|
+
hideText = !1;
|
|
1271
1479
|
showHue = !1;
|
|
1272
1480
|
committedValue = 0;
|
|
1273
1481
|
value = 0;
|
|
@@ -1277,22 +1485,23 @@ var component_default$4 = ":host{--host-display:inline-flex;flex-direction:colum
|
|
|
1277
1485
|
readonly = !1;
|
|
1278
1486
|
text = [];
|
|
1279
1487
|
render() {
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1488
|
+
let e = Array.from({ length: this.max - this.min + 1 }, (e, t) => this.min + t);
|
|
1489
|
+
return this.setAttribute("role", "radiogroup"), html`
|
|
1490
|
+
${e.map((e) => html`
|
|
1491
|
+
<span role="radio" data-value="${e}">${this.hideText ? "" : this.text[e]}</span>
|
|
1283
1492
|
`)}
|
|
1284
1493
|
`;
|
|
1285
1494
|
}
|
|
1286
1495
|
afterRender() {
|
|
1287
|
-
this.shadowRoot && this.shadowRoot.querySelectorAll("span").forEach((e) => {
|
|
1288
|
-
let
|
|
1289
|
-
if (e.setAttribute("aria-
|
|
1290
|
-
if (
|
|
1496
|
+
this.shadowRoot && this.shadowRoot.querySelectorAll("span").forEach((e, t) => {
|
|
1497
|
+
let n = Number.parseInt(e.dataset.value);
|
|
1498
|
+
if (e.setAttribute("aria-checked", n === this.value ? "true" : "false"), this.hideText && e.setAttribute("aria-label", this.text[t] ?? `option ${t}`), !this.showHue) return;
|
|
1499
|
+
if (n > this.value) {
|
|
1291
1500
|
e.style.backgroundColor = "";
|
|
1292
1501
|
return;
|
|
1293
1502
|
}
|
|
1294
|
-
let
|
|
1295
|
-
e.style.backgroundColor = `hsl(var(--scorad-h, 0), ${
|
|
1503
|
+
let r = Math.round(100 * n / (this.max - this.min));
|
|
1504
|
+
e.style.backgroundColor = `hsl(var(--scorad-h, 0), ${r}%, 50%, ${r}%)`;
|
|
1296
1505
|
});
|
|
1297
1506
|
}
|
|
1298
1507
|
valueInput;
|
|
@@ -1304,10 +1513,10 @@ __decorate([Att({
|
|
|
1304
1513
|
})], HTMLScoradOptionsElement.prototype, "min", void 0), __decorate([Att({
|
|
1305
1514
|
read: Number,
|
|
1306
1515
|
write: !1
|
|
1307
|
-
})], HTMLScoradOptionsElement.prototype, "max", void 0), __decorate([Att(AttBoolean)], HTMLScoradOptionsElement.prototype, "showHue", void 0), __decorate([Att({
|
|
1516
|
+
})], HTMLScoradOptionsElement.prototype, "max", void 0), __decorate([Att(AttBoolean)], HTMLScoradOptionsElement.prototype, "hideText", void 0), __decorate([Att(AttBoolean)], HTMLScoradOptionsElement.prototype, "showHue", void 0), __decorate([Att({
|
|
1308
1517
|
name: "aria-readonly",
|
|
1309
1518
|
...AttTrueFalse
|
|
1310
|
-
})], HTMLScoradOptionsElement.prototype, "readonly", void 0), __decorate([Att({ write: !1 })], HTMLScoradOptionsElement.prototype, "text", void 0), __decorate([Watch("min", "max", "text")], HTMLScoradOptionsElement.prototype, "render", null), __decorate([Watch("value", "readonly")], HTMLScoradOptionsElement.prototype, "afterRender", null), __decorate([Event()], HTMLScoradOptionsElement.prototype, "valueInput", void 0), __decorate([Event()], HTMLScoradOptionsElement.prototype, "valueChange", void 0), HTMLScoradOptionsElement = __decorate([Component({
|
|
1519
|
+
})], HTMLScoradOptionsElement.prototype, "readonly", void 0), __decorate([Att({ write: !1 })], HTMLScoradOptionsElement.prototype, "text", void 0), __decorate([Watch("min", "max", "text", "hideText")], HTMLScoradOptionsElement.prototype, "render", null), __decorate([Watch("value", "readonly")], HTMLScoradOptionsElement.prototype, "afterRender", null), __decorate([Event()], HTMLScoradOptionsElement.prototype, "valueInput", void 0), __decorate([Event()], HTMLScoradOptionsElement.prototype, "valueChange", void 0), HTMLScoradOptionsElement = __decorate([Component({
|
|
1311
1520
|
tag: tag$5,
|
|
1312
1521
|
css: [host_default, component_default$5]
|
|
1313
1522
|
})], HTMLScoradOptionsElement);
|
|
@@ -1330,11 +1539,11 @@ var tag$4 = "scorad-intensity", HTMLScoradIntensityElement = class extends HTMLC
|
|
|
1330
1539
|
n.dataset.value = `${t}`;
|
|
1331
1540
|
let r = n.querySelector("scorad-options");
|
|
1332
1541
|
if (!r) return;
|
|
1333
|
-
r.value = t, r.readonly = this.readonly, r.style.setProperty("--host-option-border", this.errors?.[e] == null ? null : "solid 1px var(--host-error-color)");
|
|
1542
|
+
r.value = t, r.readonly = this.readonly, r.text = ScoradResources.intensity.levels, r.hideText = !0, r.style.setProperty("--host-option-border", this.errors?.[e] == null ? null : "solid 1px var(--host-error-color)");
|
|
1334
1543
|
}
|
|
1335
1544
|
}
|
|
1336
1545
|
render() {
|
|
1337
|
-
return html`
|
|
1546
|
+
return this.setAttribute("role", "group"), this.setAttribute("aria-label", ScoradResources.intensity.text), html`
|
|
1338
1547
|
${objectKeys(this.value).map((e) => this.renderLevel(e))}
|
|
1339
1548
|
`;
|
|
1340
1549
|
}
|
|
@@ -1365,10 +1574,7 @@ var tag$4 = "scorad-intensity", HTMLScoradIntensityElement = class extends HTMLC
|
|
|
1365
1574
|
valueInput;
|
|
1366
1575
|
valueChange;
|
|
1367
1576
|
};
|
|
1368
|
-
__decorate([Att({
|
|
1369
|
-
name: "aria-readonly",
|
|
1370
|
-
...AttTrueFalse
|
|
1371
|
-
})], HTMLScoradIntensityElement.prototype, "readonly", void 0), __decorate([Att({
|
|
1577
|
+
__decorate([Att(AttBoolean)], HTMLScoradIntensityElement.prototype, "readonly", void 0), __decorate([Att({
|
|
1372
1578
|
name: "has-errors",
|
|
1373
1579
|
write: (e) => e == null ? void 0 : "",
|
|
1374
1580
|
read: !1
|
|
@@ -1396,22 +1602,27 @@ var component_default$3 = ":host{--host-display:inline-flex;--scorad-label-text-
|
|
|
1396
1602
|
n.dataset.value = `${t}`;
|
|
1397
1603
|
let r = n.querySelector("scorad-options");
|
|
1398
1604
|
if (!r) return;
|
|
1399
|
-
r.value = t, r.readonly = this.readonly, r.style.setProperty("--host-option-border", this.errors?.[e] == null ? null : "solid 1px var(--host-error-color)");
|
|
1605
|
+
r.value = t, r.readonly = this.readonly, r.text = ScoradResources.subjective.levels, r.hideText = !0, r.style.setProperty("--host-option-border", this.errors?.[e] == null ? null : "solid 1px var(--host-error-color)");
|
|
1400
1606
|
}
|
|
1401
1607
|
}
|
|
1402
1608
|
render() {
|
|
1403
|
-
return html`
|
|
1609
|
+
return this.setAttribute("role", "group"), this.setAttribute("aria-label", ScoradResources.subjective.text), html`
|
|
1404
1610
|
${objectKeys(this.value).map((e) => this.renderLevel(e))}
|
|
1405
1611
|
`;
|
|
1406
1612
|
}
|
|
1407
1613
|
renderLevel(e) {
|
|
1408
1614
|
let t = (t) => {
|
|
1409
|
-
t && t.addEventListener("value-input", (t) => {
|
|
1615
|
+
t && (t.addEventListener("value-input", (t) => {
|
|
1410
1616
|
this.value = {
|
|
1411
1617
|
...this.value,
|
|
1412
1618
|
[e]: t.detail
|
|
1413
|
-
}, this.valueInput(this.value);
|
|
1414
|
-
})
|
|
1619
|
+
}, this.errors = void 0, this.valueInput(this.value);
|
|
1620
|
+
}), t.addEventListener("value-change", (t) => {
|
|
1621
|
+
this.value = {
|
|
1622
|
+
...this.value,
|
|
1623
|
+
[e]: t.detail
|
|
1624
|
+
}, this.errors = void 0, this.valueChange(this.value);
|
|
1625
|
+
}));
|
|
1415
1626
|
}, n = ScoradResources.subjective[e];
|
|
1416
1627
|
return html`
|
|
1417
1628
|
<scorad-label class="${toKebabCase(e)} row"
|
|
@@ -1425,10 +1636,7 @@ var component_default$3 = ":host{--host-display:inline-flex;--scorad-label-text-
|
|
|
1425
1636
|
valueInput;
|
|
1426
1637
|
valueChange;
|
|
1427
1638
|
};
|
|
1428
|
-
__decorate([Att({
|
|
1429
|
-
name: "aria-readonly",
|
|
1430
|
-
...AttTrueFalse
|
|
1431
|
-
})], HTMLScoradSubjectiveElement.prototype, "readonly", void 0), __decorate([Att({
|
|
1639
|
+
__decorate([Att(AttBoolean)], HTMLScoradSubjectiveElement.prototype, "readonly", void 0), __decorate([Att({
|
|
1432
1640
|
name: "has-errors",
|
|
1433
1641
|
write: (e) => e == null ? void 0 : "",
|
|
1434
1642
|
read: !1
|
|
@@ -1453,7 +1661,7 @@ var component_default$2 = ":host{--host-display:inline-flex;padding:0 var(--host
|
|
|
1453
1661
|
e && (e.value = this.value ? 1 : 0, e.text = ["Adult", "Child"], e.readonly = this.readonly);
|
|
1454
1662
|
}
|
|
1455
1663
|
render() {
|
|
1456
|
-
return html`
|
|
1664
|
+
return this.setAttribute("role", "group"), this.setAttribute("aria-label", ScoradResources.child.text), html`
|
|
1457
1665
|
<scorad-options ${(e) => {
|
|
1458
1666
|
e.addEventListener("value-input", (e) => {
|
|
1459
1667
|
this.value = e.detail === 1, this.valueInput(this.value);
|
|
@@ -1466,10 +1674,7 @@ var component_default$2 = ":host{--host-display:inline-flex;padding:0 var(--host
|
|
|
1466
1674
|
valueInput;
|
|
1467
1675
|
valueChange;
|
|
1468
1676
|
};
|
|
1469
|
-
__decorate([Att({
|
|
1470
|
-
name: "aria-readonly",
|
|
1471
|
-
...AttTrueFalse
|
|
1472
|
-
})], HTMLScoradWeightingsElement.prototype, "readonly", void 0), __decorate([Watch("value", "readonly")], HTMLScoradWeightingsElement.prototype, "afterRender", null), __decorate([Event()], HTMLScoradWeightingsElement.prototype, "valueInput", void 0), __decorate([Event()], HTMLScoradWeightingsElement.prototype, "valueChange", void 0), HTMLScoradWeightingsElement = __decorate([Component({
|
|
1677
|
+
__decorate([Att(AttBoolean)], HTMLScoradWeightingsElement.prototype, "readonly", void 0), __decorate([Watch("value", "readonly")], HTMLScoradWeightingsElement.prototype, "afterRender", null), __decorate([Event()], HTMLScoradWeightingsElement.prototype, "valueInput", void 0), __decorate([Event()], HTMLScoradWeightingsElement.prototype, "valueChange", void 0), HTMLScoradWeightingsElement = __decorate([Component({
|
|
1473
1678
|
tag: tag$2,
|
|
1474
1679
|
css: [host_default, component_default$2],
|
|
1475
1680
|
delegatesFocus: !0
|
|
@@ -1478,41 +1683,15 @@ const getScoradScore = (e) => {
|
|
|
1478
1683
|
let t = validateScoradData(e);
|
|
1479
1684
|
if (t instanceof Failure) return t;
|
|
1480
1685
|
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)
|
|
1686
|
+
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
1687
|
return Result.Ok({
|
|
1483
|
-
A: r,
|
|
1688
|
+
A: o(r),
|
|
1484
1689
|
B: i,
|
|
1485
1690
|
C: a,
|
|
1486
|
-
total:
|
|
1691
|
+
total: s
|
|
1487
1692
|
});
|
|
1488
1693
|
};
|
|
1489
|
-
var
|
|
1490
|
-
connectedCallback() {
|
|
1491
|
-
this.render(), this.addEventListener("click", this.handleClick);
|
|
1492
|
-
}
|
|
1493
|
-
diconnectedCallback() {
|
|
1494
|
-
this.removeEventListener("click", this.handleClick);
|
|
1495
|
-
}
|
|
1496
|
-
handleClick = (e) => {
|
|
1497
|
-
this.querySelector(FOCUSABLE)?.focus();
|
|
1498
|
-
};
|
|
1499
|
-
text = "(label)";
|
|
1500
|
-
description;
|
|
1501
|
-
render() {
|
|
1502
|
-
return html`
|
|
1503
|
-
<label>
|
|
1504
|
-
<slot name="text"><span>${this.text}</span></slot>
|
|
1505
|
-
<slot name="description"><small>${this.description}</small></slot>
|
|
1506
|
-
</label>
|
|
1507
|
-
<slot></slot>
|
|
1508
|
-
`;
|
|
1509
|
-
}
|
|
1510
|
-
};
|
|
1511
|
-
__decorate([Att({ write: !1 })], HTMLScoradLabelElement.prototype, "text", void 0), __decorate([Att({ write: !1 })], HTMLScoradLabelElement.prototype, "description", void 0), HTMLScoradLabelElement = __decorate([Component({
|
|
1512
|
-
tag: tag$1,
|
|
1513
|
-
css: [host_default, component_default$1]
|
|
1514
|
-
})], HTMLScoradLabelElement);
|
|
1515
|
-
var tag = "scorad-component", HTMLScoradElement = class extends HTMLComponentElement {
|
|
1694
|
+
var tag$1 = "scorad-component", HTMLScoradElement = class extends HTMLComponentElement {
|
|
1516
1695
|
connectedCallback() {
|
|
1517
1696
|
this.render();
|
|
1518
1697
|
}
|
|
@@ -1527,10 +1706,10 @@ var tag = "scorad-component", HTMLScoradElement = class extends HTMLComponentEle
|
|
|
1527
1706
|
if (!this.shadowRoot) return;
|
|
1528
1707
|
let e = this.shadowRoot.querySelector("#score");
|
|
1529
1708
|
if (!e) return;
|
|
1530
|
-
let t = getScoradScore(this.value).orNull(), n = {}, r = validateScoradData(this.value).
|
|
1709
|
+
let t = getScoradScore(this.value).orNull(), n = Object.freeze({}), r = validateScoradData(this.value).fold((e) => n, (e) => e.reduce((e, t) => {
|
|
1531
1710
|
let n = t.indexOf(":");
|
|
1532
1711
|
return setValue(e, t.substring(0, n), t.substring(n + 2));
|
|
1533
|
-
}, n);
|
|
1712
|
+
}, n));
|
|
1534
1713
|
e.innerText = `${t?.total ?? "Get Score"}`, e.style.color = this.showErrors && r != n ? "var(--host-error-color)" : "";
|
|
1535
1714
|
let i = this.shadowRoot.querySelector("scorad-subjective");
|
|
1536
1715
|
i && (i.value = this.value?.subjective ?? SCORAD_SUBJECTIVE_DEFAULT, i.score = t?.B, i.readonly = this.readonly, this.showErrors && (i.errors = getValue(r, "subjective")));
|
|
@@ -1542,7 +1721,7 @@ var tag = "scorad-component", HTMLScoradElement = class extends HTMLComponentEle
|
|
|
1542
1721
|
s && (s.value = this.value?.child ?? !1, s.readonly = this.readonly);
|
|
1543
1722
|
}
|
|
1544
1723
|
render() {
|
|
1545
|
-
return html`
|
|
1724
|
+
return this.setAttribute("role", "region"), this.setAttribute("aria-label", "SCORAD component"), html`
|
|
1546
1725
|
<scorad-label id="extent-label">
|
|
1547
1726
|
<h3 slot="text">A</h3>
|
|
1548
1727
|
<p slot="description">extent - effected surface area</p>
|
|
@@ -1612,9 +1791,10 @@ var tag = "scorad-component", HTMLScoradElement = class extends HTMLComponentEle
|
|
|
1612
1791
|
|
|
1613
1792
|
<scorad-label id="score-label"
|
|
1614
1793
|
text="SCORAD"
|
|
1615
|
-
description="(A / 5) + (7
|
|
1616
|
-
|
|
1617
|
-
|
|
1794
|
+
description="(A / 5) + (7 × B / 2) + C"
|
|
1795
|
+
>
|
|
1796
|
+
<button id="score" ${(e) => {
|
|
1797
|
+
e instanceof HTMLButtonElement && e.addEventListener("click", () => {
|
|
1618
1798
|
if (!this.shadowRoot) return;
|
|
1619
1799
|
this.showErrors = !0;
|
|
1620
1800
|
let e = this.shadowRoot.querySelector("[has-errors]");
|
|
@@ -1624,21 +1804,43 @@ var tag = "scorad-component", HTMLScoradElement = class extends HTMLComponentEle
|
|
|
1624
1804
|
}));
|
|
1625
1805
|
});
|
|
1626
1806
|
}}
|
|
1627
|
-
|
|
1628
|
-
<span id="score" tabindex="0"></span>
|
|
1807
|
+
tabindex="0"></button>
|
|
1629
1808
|
</scorad-label>
|
|
1630
1809
|
`;
|
|
1631
1810
|
}
|
|
1632
1811
|
valueInput;
|
|
1633
1812
|
valueChange;
|
|
1634
1813
|
};
|
|
1635
|
-
__decorate([Att({
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
})], HTMLScoradElement.prototype, "readonly", void 0), __decorate([Watch("value", "showErrors", "readonly")], HTMLScoradElement.prototype, "afterRender", null), __decorate([Event()], HTMLScoradElement.prototype, "valueInput", void 0), __decorate([Event()], HTMLScoradElement.prototype, "valueChange", void 0), HTMLScoradElement = __decorate([Component({
|
|
1639
|
-
tag,
|
|
1640
|
-
css: [host_default, component_default],
|
|
1814
|
+
__decorate([Att(AttBoolean)], HTMLScoradElement.prototype, "readonly", void 0), __decorate([Watch("value", "showErrors", "readonly")], HTMLScoradElement.prototype, "afterRender", null), __decorate([Event()], HTMLScoradElement.prototype, "valueInput", void 0), __decorate([Event()], HTMLScoradElement.prototype, "valueChange", void 0), HTMLScoradElement = __decorate([Component({
|
|
1815
|
+
tag: tag$1,
|
|
1816
|
+
css: [host_default, component_default$1],
|
|
1641
1817
|
delegatesFocus: !0
|
|
1642
1818
|
})], HTMLScoradElement);
|
|
1643
1819
|
const componentsScoradLogger = provideLogger("@ntix/components-scorad", typeof ANTIX_COMPONENTS_SCORAD_LOG_LEVEL > "u" ? LogLevel.warn : ANTIX_COMPONENTS_SCORAD_LOG_LEVEL);
|
|
1644
|
-
|
|
1820
|
+
var component_default = ":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 = "scorad-label", HTMLScoradLabelElement = class extends HTMLComponentElement {
|
|
1821
|
+
connectedCallback() {
|
|
1822
|
+
this.render(), this.addEventListener("click", this.handleClick);
|
|
1823
|
+
}
|
|
1824
|
+
diconnectedCallback() {
|
|
1825
|
+
this.removeEventListener("click", this.handleClick);
|
|
1826
|
+
}
|
|
1827
|
+
handleClick = (e) => {
|
|
1828
|
+
this.querySelector(FOCUSABLE)?.focus();
|
|
1829
|
+
};
|
|
1830
|
+
text = "(label)";
|
|
1831
|
+
description;
|
|
1832
|
+
render() {
|
|
1833
|
+
return html`
|
|
1834
|
+
<label>
|
|
1835
|
+
<slot name="text"><span>${this.text}</span></slot>
|
|
1836
|
+
<slot name="description"><small>${this.description}</small></slot>
|
|
1837
|
+
</label>
|
|
1838
|
+
<slot></slot>
|
|
1839
|
+
`;
|
|
1840
|
+
}
|
|
1841
|
+
};
|
|
1842
|
+
__decorate([Att({ write: !1 })], HTMLScoradLabelElement.prototype, "text", void 0), __decorate([Att({ write: !1 })], HTMLScoradLabelElement.prototype, "description", void 0), HTMLScoradLabelElement = __decorate([Component({
|
|
1843
|
+
tag,
|
|
1844
|
+
css: [host_default, component_default]
|
|
1845
|
+
})], HTMLScoradLabelElement);
|
|
1846
|
+
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 };
|