@instructure/platform-assignment-review 0.4.1 → 0.4.9
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/index.js +1447 -1047
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1,173 +1,226 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { createContext as
|
|
1
|
+
import { jsx as r, jsxs as S } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as Un, useContext as zn, useMemo as qe, useState as Ee, useRef as jn, useEffect as Tt, useCallback as Hn } from "react";
|
|
3
3
|
import { Flex as h } from "@instructure/ui-flex";
|
|
4
|
-
import { Heading as
|
|
5
|
-
import { Spinner as
|
|
6
|
-
import { Text as
|
|
7
|
-
import { View as
|
|
8
|
-
import { useQuery as
|
|
9
|
-
import
|
|
10
|
-
import { z as
|
|
11
|
-
import { Pill as
|
|
12
|
-
import { IconDownloadLine as
|
|
13
|
-
import { ScreenReaderContent as
|
|
14
|
-
import { Link as
|
|
15
|
-
import { TruncateText as
|
|
16
|
-
import { Button as
|
|
17
|
-
import { TextArea as
|
|
18
|
-
import { Badge as
|
|
19
|
-
import { Tooltip as
|
|
20
|
-
const
|
|
21
|
-
function
|
|
22
|
-
translations:
|
|
23
|
-
children:
|
|
4
|
+
import { Heading as St } from "@instructure/ui-heading";
|
|
5
|
+
import { Spinner as Ye } from "@instructure/ui-spinner";
|
|
6
|
+
import { Text as _ } from "@instructure/ui-text";
|
|
7
|
+
import { View as K } from "@instructure/ui-view";
|
|
8
|
+
import { useQuery as Ve, useQueryClient as dn, useMutation as fn } from "@tanstack/react-query";
|
|
9
|
+
import ae from "graphql-tag";
|
|
10
|
+
import { z as i } from "zod";
|
|
11
|
+
import { Pill as _t } from "@instructure/ui-pill";
|
|
12
|
+
import { IconDownloadLine as $n, IconCheckMarkSolid as Bn, IconArrowStartLine as Gn, IconArrowEndLine as Wn, IconTrashLine as qn, IconArrowOpenStartLine as pn, IconArrowOpenEndLine as gn, IconXLine as Yn, IconLockLine as hn, IconDocumentLine as Kt, IconLinkLine as Vn, IconDiscussionLine as Xn, IconQuizLine as Kn, IconAssignmentLine as Zn } from "@instructure/ui-icons";
|
|
13
|
+
import { ScreenReaderContent as Et } from "@instructure/ui-a11y-content";
|
|
14
|
+
import { Link as Qn } from "@instructure/ui-link";
|
|
15
|
+
import { TruncateText as bn } from "@instructure/ui-truncate-text";
|
|
16
|
+
import { Button as $, IconButton as Jn } from "@instructure/ui-buttons";
|
|
17
|
+
import { TextArea as Tn } from "@instructure/ui-text-area";
|
|
18
|
+
import { Badge as yn } from "@instructure/ui-badge";
|
|
19
|
+
import { Tooltip as ei } from "@instructure/ui-tooltip";
|
|
20
|
+
const An = Un(void 0);
|
|
21
|
+
function Uo({
|
|
22
|
+
translations: e,
|
|
23
|
+
children: n
|
|
24
24
|
}) {
|
|
25
|
-
return /* @__PURE__ */
|
|
25
|
+
return /* @__PURE__ */ r(An.Provider, { value: e, children: n });
|
|
26
26
|
}
|
|
27
|
-
function
|
|
28
|
-
const
|
|
29
|
-
if (!
|
|
27
|
+
function q() {
|
|
28
|
+
const e = zn(An);
|
|
29
|
+
if (!e)
|
|
30
30
|
throw new Error("useTranslations must be used within TranslationsProvider");
|
|
31
|
-
return
|
|
31
|
+
return e;
|
|
32
32
|
}
|
|
33
|
-
/*! @license DOMPurify 3.
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
|
|
33
|
+
/*! @license DOMPurify 3.4.5 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.5/LICENSE */
|
|
34
|
+
function Zt(e, n) {
|
|
35
|
+
(n == null || n > e.length) && (n = e.length);
|
|
36
|
+
for (var o = 0, a = Array(n); o < n; o++) a[o] = e[o];
|
|
37
|
+
return a;
|
|
38
|
+
}
|
|
39
|
+
function ti(e) {
|
|
40
|
+
if (Array.isArray(e)) return e;
|
|
41
|
+
}
|
|
42
|
+
function ni(e, n) {
|
|
43
|
+
var o = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
|
44
|
+
if (o != null) {
|
|
45
|
+
var a, l, c, d, b = [], u = !0, f = !1;
|
|
46
|
+
try {
|
|
47
|
+
if (c = (o = o.call(e)).next, n !== 0) for (; !(u = (a = c.call(o)).done) && (b.push(a.value), b.length !== n); u = !0) ;
|
|
48
|
+
} catch (g) {
|
|
49
|
+
f = !0, l = g;
|
|
50
|
+
} finally {
|
|
51
|
+
try {
|
|
52
|
+
if (!u && o.return != null && (d = o.return(), Object(d) !== d)) return;
|
|
53
|
+
} finally {
|
|
54
|
+
if (f) throw l;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
return b;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
function ii() {
|
|
61
|
+
throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
62
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
63
|
+
}
|
|
64
|
+
function oi(e, n) {
|
|
65
|
+
return ti(e) || ni(e, n) || ri(e, n) || ii();
|
|
66
|
+
}
|
|
67
|
+
function ri(e, n) {
|
|
68
|
+
if (e) {
|
|
69
|
+
if (typeof e == "string") return Zt(e, n);
|
|
70
|
+
var o = {}.toString.call(e).slice(8, -1);
|
|
71
|
+
return o === "Object" && e.constructor && (o = e.constructor.name), o === "Map" || o === "Set" ? Array.from(e) : o === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o) ? Zt(e, n) : void 0;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
const Sn = Object.entries, Qt = Object.setPrototypeOf, si = Object.isFrozen, ai = Object.getPrototypeOf, li = Object.getOwnPropertyDescriptor;
|
|
75
|
+
let B = Object.freeze, Y = Object.seal, _e = Object.create, _n = typeof Reflect < "u" && Reflect, yt = _n.apply, At = _n.construct;
|
|
76
|
+
B || (B = function(n) {
|
|
77
|
+
return n;
|
|
51
78
|
});
|
|
52
|
-
|
|
53
|
-
return
|
|
79
|
+
Y || (Y = function(n) {
|
|
80
|
+
return n;
|
|
54
81
|
});
|
|
55
|
-
|
|
56
|
-
for (var
|
|
82
|
+
yt || (yt = function(n, o) {
|
|
83
|
+
for (var a = arguments.length, l = new Array(a > 2 ? a - 2 : 0), c = 2; c < a; c++)
|
|
57
84
|
l[c - 2] = arguments[c];
|
|
58
|
-
return
|
|
85
|
+
return n.apply(o, l);
|
|
59
86
|
});
|
|
60
|
-
|
|
61
|
-
for (var o = arguments.length,
|
|
62
|
-
|
|
63
|
-
return new
|
|
87
|
+
At || (At = function(n) {
|
|
88
|
+
for (var o = arguments.length, a = new Array(o > 1 ? o - 1 : 0), l = 1; l < o; l++)
|
|
89
|
+
a[l - 1] = arguments[l];
|
|
90
|
+
return new n(...a);
|
|
64
91
|
});
|
|
65
|
-
const
|
|
66
|
-
function
|
|
67
|
-
return function(
|
|
68
|
-
|
|
69
|
-
for (var o = arguments.length,
|
|
70
|
-
|
|
71
|
-
return
|
|
92
|
+
const Te = x(Array.prototype.forEach), ci = x(Array.prototype.lastIndexOf), Jt = x(Array.prototype.pop), ye = x(Array.prototype.push), mi = x(Array.prototype.splice), H = Array.isArray, Ne = x(String.prototype.toLowerCase), dt = x(String.prototype.toString), en = x(String.prototype.match), Ae = x(String.prototype.replace), tn = x(String.prototype.indexOf), ui = x(String.prototype.trim), di = x(Number.prototype.toString), fi = x(Boolean.prototype.toString), nn = typeof BigInt > "u" ? null : x(BigInt.prototype.toString), on = typeof Symbol > "u" ? null : x(Symbol.prototype.toString), D = x(Object.prototype.hasOwnProperty), Oe = x(Object.prototype.toString), z = x(RegExp.prototype.test), Ge = pi(TypeError);
|
|
93
|
+
function x(e) {
|
|
94
|
+
return function(n) {
|
|
95
|
+
n instanceof RegExp && (n.lastIndex = 0);
|
|
96
|
+
for (var o = arguments.length, a = new Array(o > 1 ? o - 1 : 0), l = 1; l < o; l++)
|
|
97
|
+
a[l - 1] = arguments[l];
|
|
98
|
+
return yt(e, n, a);
|
|
72
99
|
};
|
|
73
100
|
}
|
|
74
|
-
function
|
|
101
|
+
function pi(e) {
|
|
75
102
|
return function() {
|
|
76
|
-
for (var
|
|
77
|
-
o[
|
|
78
|
-
return
|
|
103
|
+
for (var n = arguments.length, o = new Array(n), a = 0; a < n; a++)
|
|
104
|
+
o[a] = arguments[a];
|
|
105
|
+
return At(e, o);
|
|
79
106
|
};
|
|
80
107
|
}
|
|
81
|
-
function
|
|
82
|
-
let o = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] :
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
108
|
+
function T(e, n) {
|
|
109
|
+
let o = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : Ne;
|
|
110
|
+
if (Qt && Qt(e, null), !H(n))
|
|
111
|
+
return e;
|
|
112
|
+
let a = n.length;
|
|
113
|
+
for (; a--; ) {
|
|
114
|
+
let l = n[a];
|
|
87
115
|
if (typeof l == "string") {
|
|
88
116
|
const c = o(l);
|
|
89
|
-
c !== l && (
|
|
117
|
+
c !== l && (si(n) || (n[a] = c), l = c);
|
|
90
118
|
}
|
|
91
|
-
|
|
119
|
+
e[l] = !0;
|
|
92
120
|
}
|
|
93
|
-
return
|
|
121
|
+
return e;
|
|
94
122
|
}
|
|
95
|
-
function
|
|
96
|
-
for (let
|
|
97
|
-
|
|
98
|
-
return
|
|
123
|
+
function gi(e) {
|
|
124
|
+
for (let n = 0; n < e.length; n++)
|
|
125
|
+
D(e, n) || (e[n] = null);
|
|
126
|
+
return e;
|
|
99
127
|
}
|
|
100
|
-
function
|
|
101
|
-
const
|
|
102
|
-
for (const
|
|
103
|
-
|
|
104
|
-
|
|
128
|
+
function W(e) {
|
|
129
|
+
const n = _e(null);
|
|
130
|
+
for (const a of Sn(e)) {
|
|
131
|
+
var o = oi(a, 2);
|
|
132
|
+
const l = o[0], c = o[1];
|
|
133
|
+
D(e, l) && (H(c) ? n[l] = gi(c) : c && typeof c == "object" && c.constructor === Object ? n[l] = W(c) : n[l] = c);
|
|
134
|
+
}
|
|
135
|
+
return n;
|
|
136
|
+
}
|
|
137
|
+
function hi(e) {
|
|
138
|
+
switch (typeof e) {
|
|
139
|
+
case "string":
|
|
140
|
+
return e;
|
|
141
|
+
case "number":
|
|
142
|
+
return di(e);
|
|
143
|
+
case "boolean":
|
|
144
|
+
return fi(e);
|
|
145
|
+
case "bigint":
|
|
146
|
+
return nn ? nn(e) : "0";
|
|
147
|
+
case "symbol":
|
|
148
|
+
return on ? on(e) : "Symbol()";
|
|
149
|
+
case "undefined":
|
|
150
|
+
return Oe(e);
|
|
151
|
+
case "function":
|
|
152
|
+
case "object": {
|
|
153
|
+
if (e === null)
|
|
154
|
+
return Oe(e);
|
|
155
|
+
const n = e, o = de(n, "toString");
|
|
156
|
+
if (typeof o == "function") {
|
|
157
|
+
const a = o(n);
|
|
158
|
+
return typeof a == "string" ? a : Oe(a);
|
|
159
|
+
}
|
|
160
|
+
return Oe(e);
|
|
161
|
+
}
|
|
162
|
+
default:
|
|
163
|
+
return Oe(e);
|
|
164
|
+
}
|
|
105
165
|
}
|
|
106
|
-
function
|
|
107
|
-
for (;
|
|
108
|
-
const
|
|
109
|
-
if (
|
|
110
|
-
if (
|
|
111
|
-
return
|
|
112
|
-
if (typeof
|
|
113
|
-
return
|
|
166
|
+
function de(e, n) {
|
|
167
|
+
for (; e !== null; ) {
|
|
168
|
+
const a = li(e, n);
|
|
169
|
+
if (a) {
|
|
170
|
+
if (a.get)
|
|
171
|
+
return x(a.get);
|
|
172
|
+
if (typeof a.value == "function")
|
|
173
|
+
return x(a.value);
|
|
114
174
|
}
|
|
115
|
-
|
|
175
|
+
e = ai(e);
|
|
116
176
|
}
|
|
117
177
|
function o() {
|
|
118
178
|
return null;
|
|
119
179
|
}
|
|
120
180
|
return o;
|
|
121
181
|
}
|
|
122
|
-
|
|
182
|
+
function bi(e) {
|
|
183
|
+
try {
|
|
184
|
+
return z(e, ""), !0;
|
|
185
|
+
} catch {
|
|
186
|
+
return !1;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
const rn = B(["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"]), ft = B(["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"]), pt = B(["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"]), Ti = B(["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"]), gt = B(["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"]), yi = B(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), sn = B(["#text"]), an = B(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "command", "commandfor", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "exportparts", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inert", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "part", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "slot", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns"]), ht = B(["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"]), ln = B(["accent", "accentunder", "align", "bevelled", "close", "columnalign", "columnlines", "columnspacing", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lquote", "lspace", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]), We = B(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), Ai = Y(/{{[\w\W]*|^[\w\W]*}}/g), Si = Y(/<%[\w\W]*|^[\w\W]*%>/g), _i = Y(/\${[\w\W]*/g), Ei = Y(/^data-[\-\w.\u00B7-\uFFFF]+$/), Ii = Y(/^aria-[\-\w]+$/), cn = Y(
|
|
123
190
|
/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
|
|
124
191
|
// eslint-disable-line no-useless-escape
|
|
125
|
-
),
|
|
192
|
+
), wi = Y(/^(?:\w+script|data):/i), Ci = Y(
|
|
126
193
|
/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g
|
|
127
194
|
// eslint-disable-line no-control-regex
|
|
128
|
-
),
|
|
129
|
-
var Yt = /* @__PURE__ */ Object.freeze({
|
|
130
|
-
__proto__: null,
|
|
131
|
-
ARIA_ATTR: ni,
|
|
132
|
-
ATTR_WHITESPACE: ri,
|
|
133
|
-
CUSTOM_ELEMENT: oi,
|
|
134
|
-
DATA_ATTR: ti,
|
|
135
|
-
DOCTYPE_NAME: an,
|
|
136
|
-
ERB_EXPR: Jn,
|
|
137
|
-
IS_ALLOWED_URI: sn,
|
|
138
|
-
IS_SCRIPT_OR_DATA: ii,
|
|
139
|
-
MUSTACHE_EXPR: Qn,
|
|
140
|
-
TMPLIT_EXPR: ei
|
|
141
|
-
});
|
|
142
|
-
const Ce = {
|
|
195
|
+
), Di = Y(/^html$/i), Ri = Y(/^[a-z][.\w]*(-[.\w]+)+$/i), Se = {
|
|
143
196
|
element: 1,
|
|
144
197
|
text: 3,
|
|
145
198
|
// Deprecated
|
|
146
199
|
progressingInstruction: 7,
|
|
147
200
|
comment: 8,
|
|
148
201
|
document: 9
|
|
149
|
-
},
|
|
202
|
+
}, Oi = function() {
|
|
150
203
|
return typeof window > "u" ? null : window;
|
|
151
|
-
},
|
|
152
|
-
if (typeof
|
|
204
|
+
}, Ni = function(n, o) {
|
|
205
|
+
if (typeof n != "object" || typeof n.createPolicy != "function")
|
|
153
206
|
return null;
|
|
154
|
-
let
|
|
207
|
+
let a = null;
|
|
155
208
|
const l = "data-tt-policy-suffix";
|
|
156
|
-
o && o.hasAttribute(l) && (
|
|
157
|
-
const c = "dompurify" + (
|
|
209
|
+
o && o.hasAttribute(l) && (a = o.getAttribute(l));
|
|
210
|
+
const c = "dompurify" + (a ? "#" + a : "");
|
|
158
211
|
try {
|
|
159
|
-
return
|
|
160
|
-
createHTML(
|
|
161
|
-
return
|
|
212
|
+
return n.createPolicy(c, {
|
|
213
|
+
createHTML(d) {
|
|
214
|
+
return d;
|
|
162
215
|
},
|
|
163
|
-
createScriptURL(
|
|
164
|
-
return
|
|
216
|
+
createScriptURL(d) {
|
|
217
|
+
return d;
|
|
165
218
|
}
|
|
166
219
|
});
|
|
167
220
|
} catch {
|
|
168
221
|
return console.warn("TrustedTypes policy " + c + " could not be created."), null;
|
|
169
222
|
}
|
|
170
|
-
},
|
|
223
|
+
}, mn = function() {
|
|
171
224
|
return {
|
|
172
225
|
afterSanitizeAttributes: [],
|
|
173
226
|
afterSanitizeElements: [],
|
|
@@ -180,57 +233,27 @@ const Ce = {
|
|
|
180
233
|
uponSanitizeShadowNode: []
|
|
181
234
|
};
|
|
182
235
|
};
|
|
183
|
-
function
|
|
184
|
-
let
|
|
185
|
-
const
|
|
186
|
-
if (
|
|
187
|
-
return
|
|
188
|
-
let
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
HTMLTemplateElement: f,
|
|
194
|
-
Node: b,
|
|
195
|
-
Element: m,
|
|
196
|
-
NodeFilter: p,
|
|
197
|
-
NamedNodeMap: g = t.NamedNodeMap || t.MozNamedAttrMap,
|
|
198
|
-
HTMLFormElement: D,
|
|
199
|
-
DOMParser: I,
|
|
200
|
-
trustedTypes: E
|
|
201
|
-
} = t, T = m.prototype, ie = Ie(T, "cloneNode"), ae = Ie(T, "remove"), re = Ie(T, "nextSibling"), v = Ie(T, "childNodes"), q = Ie(T, "parentNode");
|
|
202
|
-
if (typeof f == "function") {
|
|
203
|
-
const d = o.createElement("template");
|
|
204
|
-
d.content && d.content.ownerDocument && (o = d.content.ownerDocument);
|
|
236
|
+
function En() {
|
|
237
|
+
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Oi();
|
|
238
|
+
const n = (p) => En(p);
|
|
239
|
+
if (n.version = "3.4.5", n.removed = [], !e || !e.document || e.document.nodeType !== Se.document || !e.Element)
|
|
240
|
+
return n.isSupported = !1, n;
|
|
241
|
+
let o = e.document;
|
|
242
|
+
const a = o, l = a.currentScript, c = e.DocumentFragment, d = e.HTMLTemplateElement, b = e.Node, u = e.Element, f = e.NodeFilter, g = e.NamedNodeMap, C = g === void 0 ? e.NamedNodeMap || e.MozNamedAttrMap : g, I = e.HTMLFormElement, w = e.DOMParser, y = e.trustedTypes, V = u.prototype, fe = de(V, "cloneNode"), le = de(V, "remove"), M = de(V, "nextSibling"), ne = de(V, "childNodes"), O = de(V, "parentNode"), ce = b && b.prototype ? de(b.prototype, "nodeType") : null;
|
|
243
|
+
if (typeof d == "function") {
|
|
244
|
+
const p = o.createElement("template");
|
|
245
|
+
p.content && p.content.ownerDocument && (o = p.content.ownerDocument);
|
|
205
246
|
}
|
|
206
|
-
let
|
|
207
|
-
const
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
let
|
|
216
|
-
r.isSupported = typeof on == "function" && typeof q == "function" && k && k.createHTMLDocument !== void 0;
|
|
217
|
-
const {
|
|
218
|
-
MUSTACHE_EXPR: he,
|
|
219
|
-
ERB_EXPR: be,
|
|
220
|
-
TMPLIT_EXPR: We,
|
|
221
|
-
DATA_ATTR: dn,
|
|
222
|
-
ARIA_ATTR: fn,
|
|
223
|
-
IS_SCRIPT_OR_DATA: pn,
|
|
224
|
-
ATTR_WHITESPACE: ht,
|
|
225
|
-
CUSTOM_ELEMENT: gn
|
|
226
|
-
} = Yt;
|
|
227
|
-
let {
|
|
228
|
-
IS_ALLOWED_URI: bt
|
|
229
|
-
} = Yt, N = null;
|
|
230
|
-
const Tt = A({}, [...Gt, ...ot, ...st, ...at, ...Bt]);
|
|
231
|
-
let M = null;
|
|
232
|
-
const At = A({}, [...Wt, ...lt, ...qt, ...Ue]);
|
|
233
|
-
let R = Object.seal(Fe(null, {
|
|
247
|
+
let E, N = "";
|
|
248
|
+
const J = o, Ie = J.implementation, xe = J.createNodeIterator, Xe = J.createDocumentFragment, Ke = J.getElementsByTagName, Ze = a.importNode;
|
|
249
|
+
let j = mn();
|
|
250
|
+
n.isSupported = typeof Sn == "function" && typeof O == "function" && Ie && Ie.createHTMLDocument !== void 0;
|
|
251
|
+
const ke = Ai, Me = Si, Pe = _i, Dn = Ei, Rn = Ii, On = wi, wt = Ci, Nn = Ri;
|
|
252
|
+
let Ct = cn, P = null;
|
|
253
|
+
const Dt = T({}, [...rn, ...ft, ...pt, ...gt, ...sn]);
|
|
254
|
+
let U = null;
|
|
255
|
+
const Rt = T({}, [...an, ...ht, ...ln, ...We]);
|
|
256
|
+
let R = Object.seal(_e(null, {
|
|
234
257
|
tagNameCheck: {
|
|
235
258
|
writable: !0,
|
|
236
259
|
configurable: !1,
|
|
@@ -249,8 +272,8 @@ function ln() {
|
|
|
249
272
|
enumerable: !0,
|
|
250
273
|
value: !1
|
|
251
274
|
}
|
|
252
|
-
})),
|
|
253
|
-
const
|
|
275
|
+
})), we = null, Fe = null;
|
|
276
|
+
const ie = Object.seal(_e(null, {
|
|
254
277
|
tagCheck: {
|
|
255
278
|
writable: !0,
|
|
256
279
|
configurable: !1,
|
|
@@ -264,171 +287,194 @@ function ln() {
|
|
|
264
287
|
value: null
|
|
265
288
|
}
|
|
266
289
|
}));
|
|
267
|
-
let
|
|
268
|
-
const
|
|
269
|
-
let
|
|
270
|
-
const
|
|
271
|
-
let
|
|
272
|
-
const
|
|
273
|
-
let
|
|
274
|
-
const
|
|
275
|
-
let
|
|
276
|
-
const
|
|
277
|
-
let
|
|
278
|
-
const
|
|
279
|
-
let
|
|
280
|
-
const
|
|
281
|
-
let
|
|
282
|
-
const
|
|
283
|
-
return
|
|
284
|
-
},
|
|
285
|
-
let
|
|
286
|
-
if (
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
290
|
+
let Ot = !0, Qe = !0, Nt = !1, vt = !0, oe = !1, Ce = !0, me = !1, Je = !1, et = !1, pe = !1, Ue = !1, ze = !1, Lt = !0, xt = !1;
|
|
291
|
+
const kt = "user-content-";
|
|
292
|
+
let tt = !0, De = !1, ge = {}, Z = null;
|
|
293
|
+
const nt = T({}, ["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"]);
|
|
294
|
+
let Mt = null;
|
|
295
|
+
const Pt = T({}, ["audio", "video", "img", "source", "image", "track"]);
|
|
296
|
+
let it = null;
|
|
297
|
+
const Ft = T({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), je = "http://www.w3.org/1998/Math/MathML", He = "http://www.w3.org/2000/svg", Q = "http://www.w3.org/1999/xhtml";
|
|
298
|
+
let he = Q, ot = !1, rt = null;
|
|
299
|
+
const vn = T({}, [je, He, Q], dt);
|
|
300
|
+
let st = T({}, ["mi", "mo", "mn", "ms", "mtext"]), at = T({}, ["annotation-xml"]);
|
|
301
|
+
const Ln = T({}, ["title", "style", "font", "a", "script"]);
|
|
302
|
+
let Re = null;
|
|
303
|
+
const xn = ["application/xhtml+xml", "text/html"], kn = "text/html";
|
|
304
|
+
let k = null, be = null;
|
|
305
|
+
const Mn = o.createElement("form"), Ut = function(t) {
|
|
306
|
+
return t instanceof RegExp || t instanceof Function;
|
|
307
|
+
}, lt = function() {
|
|
308
|
+
let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
309
|
+
if (be && be === t)
|
|
310
|
+
return;
|
|
311
|
+
(!t || typeof t != "object") && (t = {}), t = W(t), Re = // eslint-disable-next-line unicorn/prefer-includes
|
|
312
|
+
xn.indexOf(t.PARSER_MEDIA_TYPE) === -1 ? kn : t.PARSER_MEDIA_TYPE, k = Re === "application/xhtml+xml" ? dt : Ne, P = D(t, "ALLOWED_TAGS") && H(t.ALLOWED_TAGS) ? T({}, t.ALLOWED_TAGS, k) : Dt, U = D(t, "ALLOWED_ATTR") && H(t.ALLOWED_ATTR) ? T({}, t.ALLOWED_ATTR, k) : Rt, rt = D(t, "ALLOWED_NAMESPACES") && H(t.ALLOWED_NAMESPACES) ? T({}, t.ALLOWED_NAMESPACES, dt) : vn, it = D(t, "ADD_URI_SAFE_ATTR") && H(t.ADD_URI_SAFE_ATTR) ? T(W(Ft), t.ADD_URI_SAFE_ATTR, k) : Ft, Mt = D(t, "ADD_DATA_URI_TAGS") && H(t.ADD_DATA_URI_TAGS) ? T(W(Pt), t.ADD_DATA_URI_TAGS, k) : Pt, Z = D(t, "FORBID_CONTENTS") && H(t.FORBID_CONTENTS) ? T({}, t.FORBID_CONTENTS, k) : nt, we = D(t, "FORBID_TAGS") && H(t.FORBID_TAGS) ? T({}, t.FORBID_TAGS, k) : W({}), Fe = D(t, "FORBID_ATTR") && H(t.FORBID_ATTR) ? T({}, t.FORBID_ATTR, k) : W({}), ge = D(t, "USE_PROFILES") ? t.USE_PROFILES && typeof t.USE_PROFILES == "object" ? W(t.USE_PROFILES) : t.USE_PROFILES : !1, Ot = t.ALLOW_ARIA_ATTR !== !1, Qe = t.ALLOW_DATA_ATTR !== !1, Nt = t.ALLOW_UNKNOWN_PROTOCOLS || !1, vt = t.ALLOW_SELF_CLOSE_IN_ATTR !== !1, oe = t.SAFE_FOR_TEMPLATES || !1, Ce = t.SAFE_FOR_XML !== !1, me = t.WHOLE_DOCUMENT || !1, pe = t.RETURN_DOM || !1, Ue = t.RETURN_DOM_FRAGMENT || !1, ze = t.RETURN_TRUSTED_TYPE || !1, et = t.FORCE_BODY || !1, Lt = t.SANITIZE_DOM !== !1, xt = t.SANITIZE_NAMED_PROPS || !1, tt = t.KEEP_CONTENT !== !1, De = t.IN_PLACE || !1, Ct = bi(t.ALLOWED_URI_REGEXP) ? t.ALLOWED_URI_REGEXP : cn, he = typeof t.NAMESPACE == "string" ? t.NAMESPACE : Q, st = D(t, "MATHML_TEXT_INTEGRATION_POINTS") && t.MATHML_TEXT_INTEGRATION_POINTS && typeof t.MATHML_TEXT_INTEGRATION_POINTS == "object" ? W(t.MATHML_TEXT_INTEGRATION_POINTS) : T({}, ["mi", "mo", "mn", "ms", "mtext"]), at = D(t, "HTML_INTEGRATION_POINTS") && t.HTML_INTEGRATION_POINTS && typeof t.HTML_INTEGRATION_POINTS == "object" ? W(t.HTML_INTEGRATION_POINTS) : T({}, ["annotation-xml"]);
|
|
313
|
+
const s = D(t, "CUSTOM_ELEMENT_HANDLING") && t.CUSTOM_ELEMENT_HANDLING && typeof t.CUSTOM_ELEMENT_HANDLING == "object" ? W(t.CUSTOM_ELEMENT_HANDLING) : _e(null);
|
|
314
|
+
if (R = _e(null), D(s, "tagNameCheck") && Ut(s.tagNameCheck) && (R.tagNameCheck = s.tagNameCheck), D(s, "attributeNameCheck") && Ut(s.attributeNameCheck) && (R.attributeNameCheck = s.attributeNameCheck), D(s, "allowCustomizedBuiltInElements") && typeof s.allowCustomizedBuiltInElements == "boolean" && (R.allowCustomizedBuiltInElements = s.allowCustomizedBuiltInElements), oe && (Qe = !1), Ue && (pe = !0), ge && (P = T({}, sn), U = _e(null), ge.html === !0 && (T(P, rn), T(U, an)), ge.svg === !0 && (T(P, ft), T(U, ht), T(U, We)), ge.svgFilters === !0 && (T(P, pt), T(U, ht), T(U, We)), ge.mathMl === !0 && (T(P, gt), T(U, ln), T(U, We))), ie.tagCheck = null, ie.attributeCheck = null, D(t, "ADD_TAGS") && (typeof t.ADD_TAGS == "function" ? ie.tagCheck = t.ADD_TAGS : H(t.ADD_TAGS) && (P === Dt && (P = W(P)), T(P, t.ADD_TAGS, k))), D(t, "ADD_ATTR") && (typeof t.ADD_ATTR == "function" ? ie.attributeCheck = t.ADD_ATTR : H(t.ADD_ATTR) && (U === Rt && (U = W(U)), T(U, t.ADD_ATTR, k))), D(t, "ADD_URI_SAFE_ATTR") && H(t.ADD_URI_SAFE_ATTR) && T(it, t.ADD_URI_SAFE_ATTR, k), D(t, "FORBID_CONTENTS") && H(t.FORBID_CONTENTS) && (Z === nt && (Z = W(Z)), T(Z, t.FORBID_CONTENTS, k)), D(t, "ADD_FORBID_CONTENTS") && H(t.ADD_FORBID_CONTENTS) && (Z === nt && (Z = W(Z)), T(Z, t.ADD_FORBID_CONTENTS, k)), tt && (P["#text"] = !0), me && T(P, ["html", "head", "body"]), P.table && (T(P, ["tbody"]), delete we.tbody), t.TRUSTED_TYPES_POLICY) {
|
|
315
|
+
if (typeof t.TRUSTED_TYPES_POLICY.createHTML != "function")
|
|
316
|
+
throw Ge('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
|
|
317
|
+
if (typeof t.TRUSTED_TYPES_POLICY.createScriptURL != "function")
|
|
318
|
+
throw Ge('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
|
|
319
|
+
E = t.TRUSTED_TYPES_POLICY, N = E.createHTML("");
|
|
320
|
+
} else
|
|
321
|
+
E === void 0 && (E = Ni(y, l)), E !== null && typeof N == "string" && (N = E.createHTML(""));
|
|
322
|
+
B && B(t), be = t;
|
|
323
|
+
}, zt = T({}, [...ft, ...pt, ...Ti]), jt = T({}, [...gt, ...yi]), Pn = function(t) {
|
|
324
|
+
let s = O(t);
|
|
325
|
+
(!s || !s.tagName) && (s = {
|
|
326
|
+
namespaceURI: he,
|
|
302
327
|
tagName: "template"
|
|
303
328
|
});
|
|
304
|
-
const
|
|
305
|
-
return
|
|
306
|
-
},
|
|
307
|
-
|
|
308
|
-
element:
|
|
329
|
+
const m = Ne(t.tagName), A = Ne(s.tagName);
|
|
330
|
+
return rt[t.namespaceURI] ? t.namespaceURI === He ? s.namespaceURI === Q ? m === "svg" : s.namespaceURI === je ? m === "svg" && (A === "annotation-xml" || st[A]) : !!zt[m] : t.namespaceURI === je ? s.namespaceURI === Q ? m === "math" : s.namespaceURI === He ? m === "math" && at[A] : !!jt[m] : t.namespaceURI === Q ? s.namespaceURI === He && !at[A] || s.namespaceURI === je && !st[A] ? !1 : !jt[m] && (Ln[m] || !zt[m]) : !!(Re === "application/xhtml+xml" && rt[t.namespaceURI]) : !1;
|
|
331
|
+
}, X = function(t) {
|
|
332
|
+
ye(n.removed, {
|
|
333
|
+
element: t
|
|
309
334
|
});
|
|
310
335
|
try {
|
|
311
|
-
|
|
336
|
+
O(t).removeChild(t);
|
|
312
337
|
} catch {
|
|
313
|
-
|
|
338
|
+
le(t);
|
|
314
339
|
}
|
|
315
|
-
},
|
|
340
|
+
}, ue = function(t, s) {
|
|
316
341
|
try {
|
|
317
|
-
|
|
318
|
-
attribute:
|
|
319
|
-
from:
|
|
342
|
+
ye(n.removed, {
|
|
343
|
+
attribute: s.getAttributeNode(t),
|
|
344
|
+
from: s
|
|
320
345
|
});
|
|
321
346
|
} catch {
|
|
322
|
-
|
|
347
|
+
ye(n.removed, {
|
|
323
348
|
attribute: null,
|
|
324
|
-
from:
|
|
349
|
+
from: s
|
|
325
350
|
});
|
|
326
351
|
}
|
|
327
|
-
if (
|
|
328
|
-
if (
|
|
352
|
+
if (s.removeAttribute(t), t === "is")
|
|
353
|
+
if (pe || Ue)
|
|
329
354
|
try {
|
|
330
|
-
|
|
355
|
+
X(s);
|
|
331
356
|
} catch {
|
|
332
357
|
}
|
|
333
358
|
else
|
|
334
359
|
try {
|
|
335
|
-
|
|
360
|
+
s.setAttribute(t, "");
|
|
336
361
|
} catch {
|
|
337
362
|
}
|
|
338
|
-
},
|
|
339
|
-
let
|
|
340
|
-
if (
|
|
341
|
-
|
|
363
|
+
}, Ht = function(t) {
|
|
364
|
+
let s = null, m = null;
|
|
365
|
+
if (et)
|
|
366
|
+
t = "<remove></remove>" + t;
|
|
342
367
|
else {
|
|
343
|
-
const L =
|
|
344
|
-
|
|
368
|
+
const L = en(t, /^[\r\n\t ]+/);
|
|
369
|
+
m = L && L[0];
|
|
345
370
|
}
|
|
346
|
-
|
|
347
|
-
const
|
|
348
|
-
if (
|
|
371
|
+
Re === "application/xhtml+xml" && he === Q && (t = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + t + "</body></html>");
|
|
372
|
+
const A = E ? E.createHTML(t) : t;
|
|
373
|
+
if (he === Q)
|
|
349
374
|
try {
|
|
350
|
-
|
|
375
|
+
s = new w().parseFromString(A, Re);
|
|
351
376
|
} catch {
|
|
352
377
|
}
|
|
353
|
-
if (!
|
|
354
|
-
|
|
378
|
+
if (!s || !s.documentElement) {
|
|
379
|
+
s = Ie.createDocument(he, "template", null);
|
|
355
380
|
try {
|
|
356
|
-
|
|
381
|
+
s.documentElement.innerHTML = ot ? N : A;
|
|
357
382
|
} catch {
|
|
358
383
|
}
|
|
359
384
|
}
|
|
360
|
-
const
|
|
361
|
-
return
|
|
362
|
-
},
|
|
363
|
-
return
|
|
364
|
-
|
|
365
|
-
|
|
385
|
+
const v = s.body || s.documentElement;
|
|
386
|
+
return t && m && v.insertBefore(o.createTextNode(m), v.childNodes[0] || null), he === Q ? Ke.call(s, me ? "html" : "body")[0] : me ? s.documentElement : v;
|
|
387
|
+
}, $t = function(t) {
|
|
388
|
+
return xe.call(
|
|
389
|
+
t.ownerDocument || t,
|
|
390
|
+
t,
|
|
391
|
+
// eslint-disable-next-line no-bitwise
|
|
392
|
+
f.SHOW_ELEMENT | f.SHOW_COMMENT | f.SHOW_TEXT | f.SHOW_PROCESSING_INSTRUCTION | f.SHOW_CDATA_SECTION,
|
|
393
|
+
null
|
|
394
|
+
);
|
|
395
|
+
}, Bt = function(t) {
|
|
396
|
+
t.normalize();
|
|
397
|
+
const s = xe.call(
|
|
398
|
+
t.ownerDocument || t,
|
|
399
|
+
t,
|
|
366
400
|
// eslint-disable-next-line no-bitwise
|
|
367
|
-
|
|
401
|
+
f.SHOW_TEXT | f.SHOW_COMMENT | f.SHOW_CDATA_SECTION | f.SHOW_PROCESSING_INSTRUCTION,
|
|
368
402
|
null
|
|
369
403
|
);
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
404
|
+
let m = s.nextNode();
|
|
405
|
+
for (; m; ) {
|
|
406
|
+
let A = m.data;
|
|
407
|
+
Te([ke, Me, Pe], (v) => {
|
|
408
|
+
A = Ae(A, v, " ");
|
|
409
|
+
}), m.data = A, m = s.nextNode();
|
|
410
|
+
}
|
|
411
|
+
}, ct = function(t) {
|
|
412
|
+
return t instanceof I && (typeof t.nodeName != "string" || typeof t.textContent != "string" || typeof t.removeChild != "function" || !(t.attributes instanceof C) || typeof t.removeAttribute != "function" || typeof t.setAttribute != "function" || typeof t.namespaceURI != "string" || typeof t.insertBefore != "function" || typeof t.hasChildNodes != "function");
|
|
413
|
+
}, $e = function(t) {
|
|
414
|
+
if (!ce || typeof t != "object" || t === null)
|
|
415
|
+
return !1;
|
|
416
|
+
try {
|
|
417
|
+
return typeof ce(t) == "number";
|
|
418
|
+
} catch {
|
|
419
|
+
return !1;
|
|
420
|
+
}
|
|
374
421
|
};
|
|
375
|
-
function
|
|
376
|
-
|
|
377
|
-
|
|
422
|
+
function ee(p, t, s) {
|
|
423
|
+
Te(p, (m) => {
|
|
424
|
+
m.call(n, t, s, be);
|
|
378
425
|
});
|
|
379
426
|
}
|
|
380
|
-
const
|
|
381
|
-
let
|
|
382
|
-
if (
|
|
383
|
-
return
|
|
384
|
-
const
|
|
385
|
-
if (
|
|
386
|
-
tagName:
|
|
387
|
-
allowedTags:
|
|
388
|
-
}),
|
|
389
|
-
return
|
|
390
|
-
if (!(
|
|
391
|
-
if (!
|
|
427
|
+
const Gt = function(t) {
|
|
428
|
+
let s = null;
|
|
429
|
+
if (ee(j.beforeSanitizeElements, t, null), ct(t))
|
|
430
|
+
return X(t), !0;
|
|
431
|
+
const m = k(t.nodeName);
|
|
432
|
+
if (ee(j.uponSanitizeElement, t, {
|
|
433
|
+
tagName: m,
|
|
434
|
+
allowedTags: P
|
|
435
|
+
}), Ce && t.hasChildNodes() && !$e(t.firstElementChild) && z(/<[/\w!]/g, t.innerHTML) && z(/<[/\w!]/g, t.textContent) || Ce && t.namespaceURI === Q && m === "style" && $e(t.firstElementChild) || t.nodeType === Se.progressingInstruction || Ce && t.nodeType === Se.comment && z(/<[/\w]/g, t.data))
|
|
436
|
+
return X(t), !0;
|
|
437
|
+
if (we[m] || !(ie.tagCheck instanceof Function && ie.tagCheck(m)) && !P[m]) {
|
|
438
|
+
if (!we[m] && qt(m) && (R.tagNameCheck instanceof RegExp && z(R.tagNameCheck, m) || R.tagNameCheck instanceof Function && R.tagNameCheck(m)))
|
|
392
439
|
return !1;
|
|
393
|
-
if (
|
|
394
|
-
const
|
|
395
|
-
if (
|
|
396
|
-
const L =
|
|
397
|
-
for (let
|
|
398
|
-
const
|
|
399
|
-
|
|
440
|
+
if (tt && !Z[m]) {
|
|
441
|
+
const A = O(t) || t.parentNode, v = ne(t) || t.childNodes;
|
|
442
|
+
if (v && A) {
|
|
443
|
+
const L = v.length;
|
|
444
|
+
for (let G = L - 1; G >= 0; --G) {
|
|
445
|
+
const re = fe(v[G], !0);
|
|
446
|
+
A.insertBefore(re, M(t));
|
|
400
447
|
}
|
|
401
448
|
}
|
|
402
449
|
}
|
|
403
|
-
return
|
|
450
|
+
return X(t), !0;
|
|
404
451
|
}
|
|
405
|
-
return
|
|
406
|
-
|
|
407
|
-
}),
|
|
408
|
-
element:
|
|
409
|
-
}),
|
|
410
|
-
},
|
|
411
|
-
if (
|
|
452
|
+
return t instanceof u && !Pn(t) || (m === "noscript" || m === "noembed" || m === "noframes") && z(/<\/no(script|embed|frames)/i, t.innerHTML) ? (X(t), !0) : (oe && t.nodeType === Se.text && (s = t.textContent, Te([ke, Me, Pe], (A) => {
|
|
453
|
+
s = Ae(s, A, " ");
|
|
454
|
+
}), t.textContent !== s && (ye(n.removed, {
|
|
455
|
+
element: t.cloneNode()
|
|
456
|
+
}), t.textContent = s)), ee(j.afterSanitizeElements, t, null), !1);
|
|
457
|
+
}, Wt = function(t, s, m) {
|
|
458
|
+
if (Fe[s] || Lt && (s === "id" || s === "name") && (m in o || m in Mn))
|
|
412
459
|
return !1;
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
}
|
|
460
|
+
const A = U[s] || ie.attributeCheck instanceof Function && ie.attributeCheck(s, t);
|
|
461
|
+
if (!(Qe && !Fe[s] && z(Dn, s))) {
|
|
462
|
+
if (!(Ot && z(Rn, s))) {
|
|
463
|
+
if (!A || Fe[s]) {
|
|
464
|
+
if (
|
|
465
|
+
// First condition does a very basic check if a) it's basically a valid custom element tagname AND
|
|
466
|
+
// b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
|
467
|
+
// and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
|
|
468
|
+
!(qt(t) && (R.tagNameCheck instanceof RegExp && z(R.tagNameCheck, t) || R.tagNameCheck instanceof Function && R.tagNameCheck(t)) && (R.attributeNameCheck instanceof RegExp && z(R.attributeNameCheck, s) || R.attributeNameCheck instanceof Function && R.attributeNameCheck(s, t)) || // Alternative, second condition checks if it's an `is`-attribute, AND
|
|
469
|
+
// the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
|
470
|
+
s === "is" && R.allowCustomizedBuiltInElements && (R.tagNameCheck instanceof RegExp && z(R.tagNameCheck, m) || R.tagNameCheck instanceof Function && R.tagNameCheck(m)))
|
|
471
|
+
) return !1;
|
|
472
|
+
} else if (!it[s]) {
|
|
473
|
+
if (!z(Ct, Ae(m, wt, ""))) {
|
|
474
|
+
if (!((s === "src" || s === "xlink:href" || s === "href") && t !== "script" && tn(m, "data:") === 0 && Mt[t])) {
|
|
475
|
+
if (!(Nt && !z(On, Ae(m, wt, "")))) {
|
|
476
|
+
if (m)
|
|
477
|
+
return !1;
|
|
432
478
|
}
|
|
433
479
|
}
|
|
434
480
|
}
|
|
@@ -436,151 +482,505 @@ function ln() {
|
|
|
436
482
|
}
|
|
437
483
|
}
|
|
438
484
|
return !0;
|
|
439
|
-
},
|
|
440
|
-
return
|
|
441
|
-
},
|
|
442
|
-
|
|
443
|
-
const
|
|
444
|
-
|
|
445
|
-
} = e;
|
|
446
|
-
if (!a || tt(e))
|
|
485
|
+
}, Fn = T({}, ["annotation-xml", "color-profile", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "missing-glyph"]), qt = function(t) {
|
|
486
|
+
return !Fn[Ne(t)] && z(Nn, t);
|
|
487
|
+
}, Yt = function(t) {
|
|
488
|
+
ee(j.beforeSanitizeAttributes, t, null);
|
|
489
|
+
const s = t.attributes;
|
|
490
|
+
if (!s || ct(t))
|
|
447
491
|
return;
|
|
448
|
-
const
|
|
492
|
+
const m = {
|
|
449
493
|
attrName: "",
|
|
450
494
|
attrValue: "",
|
|
451
495
|
keepAttr: !0,
|
|
452
|
-
allowedAttributes:
|
|
496
|
+
allowedAttributes: U,
|
|
453
497
|
forceKeepAttr: void 0
|
|
454
498
|
};
|
|
455
|
-
let
|
|
456
|
-
for (;
|
|
457
|
-
const
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
} = U, pe = w(L), nt = ee;
|
|
462
|
-
let x = L === "value" ? nt : Yn(nt);
|
|
463
|
-
if (u.attrName = pe, u.attrValue = x, u.keepAttr = !0, u.forceKeepAttr = void 0, J(O.uponSanitizeAttribute, e, u), x = u.attrValue, It && (pe === "id" || pe === "name") && (se(L, e), x = hn + x), we && F(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, x)) {
|
|
464
|
-
se(L, e);
|
|
499
|
+
let A = s.length;
|
|
500
|
+
for (; A--; ) {
|
|
501
|
+
const v = s[A], L = v.name, G = v.namespaceURI, re = v.value, te = k(L), ut = re;
|
|
502
|
+
let F = L === "value" ? ut : ui(ut);
|
|
503
|
+
if (m.attrName = te, m.attrValue = F, m.keepAttr = !0, m.forceKeepAttr = void 0, ee(j.uponSanitizeAttribute, t, m), F = m.attrValue, xt && (te === "id" || te === "name") && tn(F, kt) !== 0 && (ue(L, t), F = kt + F), Ce && z(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, F)) {
|
|
504
|
+
ue(L, t);
|
|
465
505
|
continue;
|
|
466
506
|
}
|
|
467
|
-
if (
|
|
468
|
-
|
|
507
|
+
if (te === "attributename" && en(F, "href")) {
|
|
508
|
+
ue(L, t);
|
|
469
509
|
continue;
|
|
470
510
|
}
|
|
471
|
-
if (
|
|
511
|
+
if (m.forceKeepAttr)
|
|
472
512
|
continue;
|
|
473
|
-
if (!
|
|
474
|
-
|
|
513
|
+
if (!m.keepAttr) {
|
|
514
|
+
ue(L, t);
|
|
475
515
|
continue;
|
|
476
516
|
}
|
|
477
|
-
if (!
|
|
478
|
-
|
|
517
|
+
if (!vt && z(/\/>/i, F)) {
|
|
518
|
+
ue(L, t);
|
|
479
519
|
continue;
|
|
480
520
|
}
|
|
481
|
-
|
|
482
|
-
|
|
521
|
+
oe && Te([ke, Me, Pe], (Xt) => {
|
|
522
|
+
F = Ae(F, Xt, " ");
|
|
483
523
|
});
|
|
484
|
-
const
|
|
485
|
-
if (!
|
|
486
|
-
|
|
524
|
+
const Vt = k(t.nodeName);
|
|
525
|
+
if (!Wt(Vt, te, F)) {
|
|
526
|
+
ue(L, t);
|
|
487
527
|
continue;
|
|
488
528
|
}
|
|
489
|
-
if (
|
|
490
|
-
switch (
|
|
529
|
+
if (E && typeof y == "object" && typeof y.getAttributeType == "function" && !G)
|
|
530
|
+
switch (y.getAttributeType(Vt, te)) {
|
|
491
531
|
case "TrustedHTML": {
|
|
492
|
-
|
|
532
|
+
F = E.createHTML(F);
|
|
493
533
|
break;
|
|
494
534
|
}
|
|
495
535
|
case "TrustedScriptURL": {
|
|
496
|
-
|
|
536
|
+
F = E.createScriptURL(F);
|
|
497
537
|
break;
|
|
498
538
|
}
|
|
499
539
|
}
|
|
500
|
-
if (
|
|
540
|
+
if (F !== ut)
|
|
501
541
|
try {
|
|
502
|
-
|
|
542
|
+
G ? t.setAttributeNS(G, L, F) : t.setAttribute(L, F), ct(t) ? X(t) : Jt(n.removed);
|
|
503
543
|
} catch {
|
|
504
|
-
|
|
544
|
+
ue(L, t);
|
|
505
545
|
}
|
|
506
546
|
}
|
|
507
|
-
|
|
508
|
-
},
|
|
509
|
-
let
|
|
510
|
-
const
|
|
511
|
-
for (
|
|
512
|
-
|
|
513
|
-
|
|
547
|
+
ee(j.afterSanitizeAttributes, t, null);
|
|
548
|
+
}, mt = function(t) {
|
|
549
|
+
let s = null;
|
|
550
|
+
const m = $t(t);
|
|
551
|
+
for (ee(j.beforeSanitizeShadowDOM, t, null); s = m.nextNode(); )
|
|
552
|
+
ee(j.uponSanitizeShadowNode, s, null), Gt(s), Yt(s), s.content instanceof c && mt(s.content);
|
|
553
|
+
ee(j.afterSanitizeShadowDOM, t, null);
|
|
554
|
+
}, Be = function(t) {
|
|
555
|
+
if (t.nodeType === Se.element && t.shadowRoot instanceof c) {
|
|
556
|
+
const A = t.shadowRoot;
|
|
557
|
+
Be(A), mt(A);
|
|
558
|
+
}
|
|
559
|
+
const s = t.childNodes;
|
|
560
|
+
if (!s)
|
|
561
|
+
return;
|
|
562
|
+
const m = [];
|
|
563
|
+
Te(s, (A) => {
|
|
564
|
+
ye(m, A);
|
|
565
|
+
});
|
|
566
|
+
for (const A of m)
|
|
567
|
+
Be(A);
|
|
514
568
|
};
|
|
515
|
-
return
|
|
516
|
-
let
|
|
517
|
-
if (
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
const ee = w(d.nodeName);
|
|
528
|
-
if (!N[ee] || Te[ee])
|
|
529
|
-
throw Ee("root node is forbidden and cannot be sanitized in-place");
|
|
569
|
+
return n.sanitize = function(p) {
|
|
570
|
+
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, s = null, m = null, A = null, v = null;
|
|
571
|
+
if (ot = !p, ot && (p = "<!-->"), typeof p != "string" && !$e(p) && (p = hi(p), typeof p != "string"))
|
|
572
|
+
throw Ge("dirty is not a string, aborting");
|
|
573
|
+
if (!n.isSupported)
|
|
574
|
+
return p;
|
|
575
|
+
if (Je || lt(t), n.removed = [], typeof p == "string" && (De = !1), De) {
|
|
576
|
+
const re = p.nodeName;
|
|
577
|
+
if (typeof re == "string") {
|
|
578
|
+
const te = k(re);
|
|
579
|
+
if (!P[te] || we[te])
|
|
580
|
+
throw Ge("root node is forbidden and cannot be sanitized in-place");
|
|
530
581
|
}
|
|
531
|
-
|
|
532
|
-
|
|
582
|
+
Be(p);
|
|
583
|
+
} else if ($e(p))
|
|
584
|
+
s = Ht("<!---->"), m = s.ownerDocument.importNode(p, !0), m.nodeType === Se.element && m.nodeName === "BODY" || m.nodeName === "HTML" ? s = m : s.appendChild(m), Be(m);
|
|
533
585
|
else {
|
|
534
|
-
if (!
|
|
535
|
-
|
|
536
|
-
return
|
|
537
|
-
if (
|
|
538
|
-
return
|
|
586
|
+
if (!pe && !oe && !me && // eslint-disable-next-line unicorn/prefer-includes
|
|
587
|
+
p.indexOf("<") === -1)
|
|
588
|
+
return E && ze ? E.createHTML(p) : p;
|
|
589
|
+
if (s = Ht(p), !s)
|
|
590
|
+
return pe ? null : ze ? N : "";
|
|
539
591
|
}
|
|
540
|
-
|
|
541
|
-
const L =
|
|
542
|
-
for (;
|
|
543
|
-
|
|
544
|
-
if (
|
|
545
|
-
return
|
|
546
|
-
if (
|
|
547
|
-
if (
|
|
548
|
-
for (
|
|
549
|
-
|
|
592
|
+
s && et && X(s.firstChild);
|
|
593
|
+
const L = $t(De ? p : s);
|
|
594
|
+
for (; A = L.nextNode(); )
|
|
595
|
+
Gt(A), Yt(A), A.content instanceof c && mt(A.content);
|
|
596
|
+
if (De)
|
|
597
|
+
return oe && Bt(p), p;
|
|
598
|
+
if (pe) {
|
|
599
|
+
if (oe && Bt(s), Ue)
|
|
600
|
+
for (v = Xe.call(s.ownerDocument); s.firstChild; )
|
|
601
|
+
v.appendChild(s.firstChild);
|
|
550
602
|
else
|
|
551
|
-
|
|
552
|
-
return (
|
|
603
|
+
v = s;
|
|
604
|
+
return (U.shadowroot || U.shadowrootmode) && (v = Ze.call(a, v, !0)), v;
|
|
553
605
|
}
|
|
554
|
-
let
|
|
555
|
-
return
|
|
556
|
-
` +
|
|
557
|
-
|
|
558
|
-
}),
|
|
559
|
-
},
|
|
560
|
-
let
|
|
561
|
-
|
|
562
|
-
},
|
|
563
|
-
|
|
564
|
-
},
|
|
565
|
-
|
|
566
|
-
const
|
|
567
|
-
return
|
|
568
|
-
},
|
|
569
|
-
typeof
|
|
570
|
-
},
|
|
571
|
-
if (
|
|
572
|
-
const
|
|
573
|
-
return
|
|
606
|
+
let G = me ? s.outerHTML : s.innerHTML;
|
|
607
|
+
return me && P["!doctype"] && s.ownerDocument && s.ownerDocument.doctype && s.ownerDocument.doctype.name && z(Di, s.ownerDocument.doctype.name) && (G = "<!DOCTYPE " + s.ownerDocument.doctype.name + `>
|
|
608
|
+
` + G), oe && Te([ke, Me, Pe], (re) => {
|
|
609
|
+
G = Ae(G, re, " ");
|
|
610
|
+
}), E && ze ? E.createHTML(G) : G;
|
|
611
|
+
}, n.setConfig = function() {
|
|
612
|
+
let p = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
613
|
+
lt(p), Je = !0;
|
|
614
|
+
}, n.clearConfig = function() {
|
|
615
|
+
be = null, Je = !1;
|
|
616
|
+
}, n.isValidAttribute = function(p, t, s) {
|
|
617
|
+
be || lt({});
|
|
618
|
+
const m = k(p), A = k(t);
|
|
619
|
+
return Wt(m, A, s);
|
|
620
|
+
}, n.addHook = function(p, t) {
|
|
621
|
+
typeof t == "function" && ye(j[p], t);
|
|
622
|
+
}, n.removeHook = function(p, t) {
|
|
623
|
+
if (t !== void 0) {
|
|
624
|
+
const s = ci(j[p], t);
|
|
625
|
+
return s === -1 ? void 0 : mi(j[p], s, 1)[0];
|
|
574
626
|
}
|
|
575
|
-
return
|
|
576
|
-
},
|
|
577
|
-
|
|
578
|
-
},
|
|
579
|
-
|
|
580
|
-
},
|
|
627
|
+
return Jt(j[p]);
|
|
628
|
+
}, n.removeHooks = function(p) {
|
|
629
|
+
j[p] = [];
|
|
630
|
+
}, n.removeAllHooks = function() {
|
|
631
|
+
j = mn();
|
|
632
|
+
}, n;
|
|
581
633
|
}
|
|
582
|
-
var
|
|
583
|
-
const
|
|
634
|
+
var bt = En();
|
|
635
|
+
const vi = /* @__PURE__ */ new Set([
|
|
636
|
+
// layout
|
|
637
|
+
"display",
|
|
638
|
+
"float",
|
|
639
|
+
"clear",
|
|
640
|
+
"overflow",
|
|
641
|
+
"overflow-x",
|
|
642
|
+
"overflow-y",
|
|
643
|
+
"visibility",
|
|
644
|
+
"cursor",
|
|
645
|
+
"direction",
|
|
646
|
+
"user-select",
|
|
647
|
+
"zoom",
|
|
648
|
+
// positioning — values filtered by allowlist hook below
|
|
649
|
+
"position",
|
|
650
|
+
"top",
|
|
651
|
+
"right",
|
|
652
|
+
"bottom",
|
|
653
|
+
"left",
|
|
654
|
+
// sizing
|
|
655
|
+
"width",
|
|
656
|
+
"height",
|
|
657
|
+
"min-width",
|
|
658
|
+
"min-height",
|
|
659
|
+
"max-width",
|
|
660
|
+
"max-height",
|
|
661
|
+
// box model extensions
|
|
662
|
+
"box-sizing",
|
|
663
|
+
"aspect-ratio",
|
|
664
|
+
"resize",
|
|
665
|
+
"object-fit",
|
|
666
|
+
"object-position",
|
|
667
|
+
// spacing
|
|
668
|
+
"margin",
|
|
669
|
+
"margin-top",
|
|
670
|
+
"margin-right",
|
|
671
|
+
"margin-bottom",
|
|
672
|
+
"margin-left",
|
|
673
|
+
"margin-offset",
|
|
674
|
+
"padding",
|
|
675
|
+
"padding-top",
|
|
676
|
+
"padding-right",
|
|
677
|
+
"padding-bottom",
|
|
678
|
+
"padding-left",
|
|
679
|
+
// typography
|
|
680
|
+
"font",
|
|
681
|
+
"font-family",
|
|
682
|
+
"font-size",
|
|
683
|
+
"font-style",
|
|
684
|
+
"font-variant",
|
|
685
|
+
"font-weight",
|
|
686
|
+
"font-stretch",
|
|
687
|
+
"font-width",
|
|
688
|
+
"line-height",
|
|
689
|
+
"text-align",
|
|
690
|
+
"text-decoration",
|
|
691
|
+
"text-indent",
|
|
692
|
+
"white-space",
|
|
693
|
+
"vertical-align",
|
|
694
|
+
"text-transform",
|
|
695
|
+
"letter-spacing",
|
|
696
|
+
"word-spacing",
|
|
697
|
+
"text-shadow",
|
|
698
|
+
"text-overflow",
|
|
699
|
+
"text-decoration-color",
|
|
700
|
+
"text-decoration-line",
|
|
701
|
+
"text-decoration-style",
|
|
702
|
+
"text-decoration-thickness",
|
|
703
|
+
"text-underline-offset",
|
|
704
|
+
"text-align-last",
|
|
705
|
+
"unicode-bidi",
|
|
706
|
+
// font extensions
|
|
707
|
+
"font-feature-settings",
|
|
708
|
+
"font-kerning",
|
|
709
|
+
"font-optical-sizing",
|
|
710
|
+
"font-variant-caps",
|
|
711
|
+
"font-variant-ligatures",
|
|
712
|
+
"font-variant-numeric",
|
|
713
|
+
// text flow
|
|
714
|
+
"word-break",
|
|
715
|
+
"overflow-wrap",
|
|
716
|
+
"word-wrap",
|
|
717
|
+
"hyphens",
|
|
718
|
+
"line-break",
|
|
719
|
+
"tab-size",
|
|
720
|
+
"writing-mode",
|
|
721
|
+
"text-orientation",
|
|
722
|
+
"text-combine-upright",
|
|
723
|
+
// color & background
|
|
724
|
+
"color",
|
|
725
|
+
"background",
|
|
726
|
+
"background-color",
|
|
727
|
+
"background-image",
|
|
728
|
+
"background-attachment",
|
|
729
|
+
"background-position",
|
|
730
|
+
"background-position-x",
|
|
731
|
+
"background-position-y",
|
|
732
|
+
"background-repeat",
|
|
733
|
+
"background-size",
|
|
734
|
+
"background-clip",
|
|
735
|
+
"background-origin",
|
|
736
|
+
// border
|
|
737
|
+
"border",
|
|
738
|
+
"border-color",
|
|
739
|
+
"border-style",
|
|
740
|
+
"border-width",
|
|
741
|
+
"border-radius",
|
|
742
|
+
"border-collapse",
|
|
743
|
+
"border-spacing",
|
|
744
|
+
"border-top",
|
|
745
|
+
"border-top-color",
|
|
746
|
+
"border-top-style",
|
|
747
|
+
"border-top-width",
|
|
748
|
+
"border-right",
|
|
749
|
+
"border-right-color",
|
|
750
|
+
"border-right-style",
|
|
751
|
+
"border-right-width",
|
|
752
|
+
"border-bottom",
|
|
753
|
+
"border-bottom-color",
|
|
754
|
+
"border-bottom-style",
|
|
755
|
+
"border-bottom-width",
|
|
756
|
+
"border-left",
|
|
757
|
+
"border-left-color",
|
|
758
|
+
"border-left-style",
|
|
759
|
+
"border-left-width",
|
|
760
|
+
// shadows & outline
|
|
761
|
+
"box-shadow",
|
|
762
|
+
"outline",
|
|
763
|
+
"outline-color",
|
|
764
|
+
"outline-style",
|
|
765
|
+
"outline-width",
|
|
766
|
+
// list
|
|
767
|
+
"list-style",
|
|
768
|
+
"list-style-image",
|
|
769
|
+
"list-style-position",
|
|
770
|
+
"list-style-type",
|
|
771
|
+
// table
|
|
772
|
+
"table-layout",
|
|
773
|
+
"caption-side",
|
|
774
|
+
"empty-cells",
|
|
775
|
+
// flex
|
|
776
|
+
"flex",
|
|
777
|
+
"flex-basis",
|
|
778
|
+
"flex-direction",
|
|
779
|
+
"flex-flow",
|
|
780
|
+
"flex-grow",
|
|
781
|
+
"flex-shrink",
|
|
782
|
+
"flex-wrap",
|
|
783
|
+
"align-content",
|
|
784
|
+
"align-items",
|
|
785
|
+
"align-self",
|
|
786
|
+
"justify-content",
|
|
787
|
+
"justify-items",
|
|
788
|
+
"justify-self",
|
|
789
|
+
"order",
|
|
790
|
+
"gap",
|
|
791
|
+
"row-gap",
|
|
792
|
+
"column-gap",
|
|
793
|
+
"place-content",
|
|
794
|
+
"place-items",
|
|
795
|
+
"place-self",
|
|
796
|
+
// grid
|
|
797
|
+
"grid",
|
|
798
|
+
"grid-area",
|
|
799
|
+
"grid-auto-columns",
|
|
800
|
+
"grid-auto-flow",
|
|
801
|
+
"grid-auto-rows",
|
|
802
|
+
"grid-column",
|
|
803
|
+
"grid-column-end",
|
|
804
|
+
"grid-column-gap",
|
|
805
|
+
"grid-column-start",
|
|
806
|
+
"grid-gap",
|
|
807
|
+
"grid-row",
|
|
808
|
+
"grid-row-end",
|
|
809
|
+
"grid-row-gap",
|
|
810
|
+
"grid-row-start",
|
|
811
|
+
"grid-template",
|
|
812
|
+
"grid-template-areas",
|
|
813
|
+
"grid-template-columns",
|
|
814
|
+
"grid-template-rows",
|
|
815
|
+
// transitions
|
|
816
|
+
"transition",
|
|
817
|
+
"transition-property",
|
|
818
|
+
"transition-duration",
|
|
819
|
+
"transition-timing-function",
|
|
820
|
+
"transition-delay",
|
|
821
|
+
// animations
|
|
822
|
+
"animation",
|
|
823
|
+
"animation-name",
|
|
824
|
+
"animation-duration",
|
|
825
|
+
"animation-timing-function",
|
|
826
|
+
"animation-delay",
|
|
827
|
+
"animation-iteration-count",
|
|
828
|
+
"animation-direction",
|
|
829
|
+
"animation-fill-mode",
|
|
830
|
+
"animation-play-state",
|
|
831
|
+
// columns
|
|
832
|
+
"column-count",
|
|
833
|
+
"column-width",
|
|
834
|
+
"columns",
|
|
835
|
+
"column-rule",
|
|
836
|
+
"column-rule-color",
|
|
837
|
+
"column-rule-style",
|
|
838
|
+
"column-rule-width",
|
|
839
|
+
"column-fill",
|
|
840
|
+
"column-span",
|
|
841
|
+
// page breaks
|
|
842
|
+
"break-before",
|
|
843
|
+
"break-after",
|
|
844
|
+
"break-inside",
|
|
845
|
+
"page-break-before",
|
|
846
|
+
"page-break-after",
|
|
847
|
+
"page-break-inside",
|
|
848
|
+
// generated content
|
|
849
|
+
"quotes",
|
|
850
|
+
"counter-reset",
|
|
851
|
+
"counter-increment",
|
|
852
|
+
"content",
|
|
853
|
+
// UI / interaction
|
|
854
|
+
// pointer-events is included: RCE uses it legitimately (e.g. non-interactive
|
|
855
|
+
// decorative overlays). It is not in the overlay-phishing class because it
|
|
856
|
+
// cannot reposition elements — position/z-index remain blocked.
|
|
857
|
+
"pointer-events",
|
|
858
|
+
"caret-color",
|
|
859
|
+
"accent-color",
|
|
860
|
+
"appearance"
|
|
861
|
+
]), Li = /* @__PURE__ */ new Set([
|
|
862
|
+
"src",
|
|
863
|
+
"href",
|
|
864
|
+
"action",
|
|
865
|
+
"formaction",
|
|
866
|
+
"data",
|
|
867
|
+
"poster",
|
|
868
|
+
"background",
|
|
869
|
+
"cite",
|
|
870
|
+
"longdesc",
|
|
871
|
+
"xlink:href"
|
|
872
|
+
]), un = /^\s*(\/\/|\\)/, xi = [
|
|
873
|
+
"background",
|
|
874
|
+
"background-image",
|
|
875
|
+
"list-style",
|
|
876
|
+
"list-style-image",
|
|
877
|
+
"cursor",
|
|
878
|
+
// content: url(...) triggers an HTTP GET even on non-pseudo elements in some
|
|
879
|
+
// browsers; strip it as defense-in-depth against tracking-pixel exfiltration.
|
|
880
|
+
"content"
|
|
881
|
+
], ki = /url\s*\(\s*['"]?(?:[a-z][a-z0-9+\-.]*:|\/\/)/i, Mi = /* @__PURE__ */ new Set([
|
|
882
|
+
"allow-downloads",
|
|
883
|
+
"allow-forms",
|
|
884
|
+
"allow-modals",
|
|
885
|
+
"allow-orientation-lock",
|
|
886
|
+
"allow-pointer-lock",
|
|
887
|
+
"allow-popups",
|
|
888
|
+
"allow-popups-to-escape-sandbox",
|
|
889
|
+
"allow-presentation",
|
|
890
|
+
"allow-same-origin",
|
|
891
|
+
"allow-scripts",
|
|
892
|
+
"allow-storage-access-by-user-activation",
|
|
893
|
+
"allow-top-navigation-by-user-activation"
|
|
894
|
+
]), Pi = {
|
|
895
|
+
ADD_TAGS: ["iframe"],
|
|
896
|
+
ADD_ATTR: [
|
|
897
|
+
"allowfullscreen",
|
|
898
|
+
"allow",
|
|
899
|
+
"frameborder",
|
|
900
|
+
"sandbox",
|
|
901
|
+
"data-media-id",
|
|
902
|
+
"data-media-type",
|
|
903
|
+
// RCE produces target="_blank" for external links. Modern browsers treat
|
|
904
|
+
// target="_blank" as implicit rel="noopener", and the backend allowlist
|
|
905
|
+
// already includes target.
|
|
906
|
+
"target",
|
|
907
|
+
"webkitallowfullscreen",
|
|
908
|
+
"mozallowfullscreen",
|
|
909
|
+
"scrolling",
|
|
910
|
+
// MathML 4 (W3C) annotation attributes for screen-reader accessibility.
|
|
911
|
+
// MathCAT, JAWS, and NVDA use `intent` to know how to pronounce
|
|
912
|
+
// expressions; `arg` labels sub-expressions referenced by intent.
|
|
913
|
+
// These are plain string annotations — no URL-loading, no code execution.
|
|
914
|
+
"intent",
|
|
915
|
+
"arg"
|
|
916
|
+
],
|
|
917
|
+
// Rails UJS turns data-method/data-remote/etc. on clickable elements into
|
|
918
|
+
// state-changing requests carrying the victim's CSRF token. Strip them so
|
|
919
|
+
// user-authored HTML cannot become a CSRF gadget when UJS is on the page.
|
|
920
|
+
FORBID_ATTR: ["data-method", "data-remote", "data-url", "data-confirm", "data-disable-with"],
|
|
921
|
+
// In browsers that support the Trusted Types API (Chromium, Firefox),
|
|
922
|
+
// DOMPurify returns a TrustedHTML object rather than a plain string. The
|
|
923
|
+
// exported sanitizeHtml signature declares string — a deliberate lie that
|
|
924
|
+
// mirrors the same lie the browser DOM lib (Element.innerHTML: string),
|
|
925
|
+
// React (__html: string), and jQuery (html(string)) already tell. All those
|
|
926
|
+
// sinks runtime-accept TrustedHTML even though their TS signatures only
|
|
927
|
+
// declare string; lying here lets callers assign the result directly without
|
|
928
|
+
// a per-call cast. Do not perform string operations (.slice, .match, etc.)
|
|
929
|
+
// on the return value — those methods do not exist on TrustedHTML and will
|
|
930
|
+
// throw in modern browsers.
|
|
931
|
+
RETURN_TRUSTED_TYPE: !0,
|
|
932
|
+
// Wraps input in a body context during parsing, preventing namespace
|
|
933
|
+
// confusion attacks where fragments like <svg> could influence parse context.
|
|
934
|
+
FORCE_BODY: !0
|
|
935
|
+
};
|
|
936
|
+
let se = null;
|
|
937
|
+
function Fi() {
|
|
938
|
+
return se || (se = typeof bt == "function" ? bt(window) : bt, se.addHook("afterSanitizeAttributes", (e) => {
|
|
939
|
+
if (!(e instanceof Element) || !e.hasAttribute("style")) return;
|
|
940
|
+
const n = e.style, o = [];
|
|
941
|
+
for (let c = 0; c < n.length; c++) {
|
|
942
|
+
const d = n.item(c);
|
|
943
|
+
vi.has(d) || o.push(d);
|
|
944
|
+
}
|
|
945
|
+
for (const c of o) n.removeProperty(c);
|
|
946
|
+
const a = /* @__PURE__ */ new Set([
|
|
947
|
+
"static",
|
|
948
|
+
"relative",
|
|
949
|
+
"absolute",
|
|
950
|
+
"initial",
|
|
951
|
+
"inherit",
|
|
952
|
+
"unset",
|
|
953
|
+
"revert",
|
|
954
|
+
"revert-layer"
|
|
955
|
+
]), l = n.getPropertyValue("position").trim().toLowerCase();
|
|
956
|
+
l && !a.has(l) && n.removeProperty("position");
|
|
957
|
+
for (const c of xi) {
|
|
958
|
+
const d = n.getPropertyValue(c);
|
|
959
|
+
d && ki.test(d) && n.removeProperty(c);
|
|
960
|
+
}
|
|
961
|
+
n.length === 0 && e.removeAttribute("style");
|
|
962
|
+
}), se.addHook("uponSanitizeAttribute", (e, n) => {
|
|
963
|
+
Li.has(n.attrName) && un.test(n.attrValue) && (n.keepAttr = !1);
|
|
964
|
+
}), se.addHook("afterSanitizeAttributes", (e) => {
|
|
965
|
+
!(e instanceof Element) || !e.hasAttribute("srcset") || (e.getAttribute("srcset") ?? "").split(",").map((n) => n.trim().split(/\s+/)[0]).some((n) => un.test(n)) && e.removeAttribute("srcset");
|
|
966
|
+
}), se.addHook("afterSanitizeAttributes", (e) => {
|
|
967
|
+
var n;
|
|
968
|
+
if (!(e instanceof Element) || e.tagName !== "A" && e.tagName !== "AREA" || ((n = e.getAttribute("target")) == null ? void 0 : n.toLowerCase()) !== "_blank") return;
|
|
969
|
+
const o = e.getAttribute("rel") ?? "", a = new Set(o.split(/\s+/).filter(Boolean));
|
|
970
|
+
a.add("noopener"), e.setAttribute("rel", [...a].join(" "));
|
|
971
|
+
}), se.addHook("afterSanitizeAttributes", (e) => {
|
|
972
|
+
if (!(e instanceof Element) || e.tagName !== "IFRAME" || !e.hasAttribute("sandbox")) return;
|
|
973
|
+
const n = (e.getAttribute("sandbox") ?? "").toLowerCase().split(/\s+/).filter(Boolean), o = n.filter((a) => Mi.has(a));
|
|
974
|
+
o.length !== n.length && e.setAttribute("sandbox", o.join(" "));
|
|
975
|
+
}), se);
|
|
976
|
+
}
|
|
977
|
+
function It(e, n) {
|
|
978
|
+
if (typeof window > "u")
|
|
979
|
+
throw new Error("sanitizeHtml requires a DOM environment (window is not defined)");
|
|
980
|
+
const o = Pi;
|
|
981
|
+
return Fi().sanitize(e ?? "", o);
|
|
982
|
+
}
|
|
983
|
+
const Ui = ae`
|
|
584
984
|
query GetAssignment($courseId: ID!, $assignmentId: ID!, $userId: ID!) {
|
|
585
985
|
legacyNode(_id: $assignmentId, type: Assignment) {
|
|
586
986
|
... on Assignment {
|
|
@@ -639,7 +1039,7 @@ const li = ne`
|
|
|
639
1039
|
contentType
|
|
640
1040
|
submissionPreviewUrl
|
|
641
1041
|
}
|
|
642
|
-
`,
|
|
1042
|
+
`, zi = ae`
|
|
643
1043
|
query GetSubmissionComments(
|
|
644
1044
|
$submissionId: ID!
|
|
645
1045
|
$courseId: String
|
|
@@ -688,7 +1088,7 @@ const li = ne`
|
|
|
688
1088
|
}
|
|
689
1089
|
}
|
|
690
1090
|
}
|
|
691
|
-
`,
|
|
1091
|
+
`, ji = ae`
|
|
692
1092
|
query getSubmissions($submissionId: ID!) {
|
|
693
1093
|
node(id: $submissionId) {
|
|
694
1094
|
... on Submission {
|
|
@@ -722,382 +1122,382 @@ const li = ne`
|
|
|
722
1122
|
contentType
|
|
723
1123
|
submissionPreviewUrl
|
|
724
1124
|
}
|
|
725
|
-
`,
|
|
726
|
-
_id:
|
|
727
|
-
displayName:
|
|
728
|
-
id:
|
|
729
|
-
mimeClass:
|
|
730
|
-
url:
|
|
731
|
-
contentType:
|
|
732
|
-
submissionPreviewUrl:
|
|
733
|
-
}),
|
|
734
|
-
_id:
|
|
735
|
-
activeSubmissionType:
|
|
736
|
-
body:
|
|
737
|
-
attachments:
|
|
738
|
-
}),
|
|
739
|
-
id:
|
|
740
|
-
submittedAt:
|
|
741
|
-
body:
|
|
742
|
-
grade:
|
|
743
|
-
score:
|
|
744
|
-
submissionType:
|
|
745
|
-
attempt:
|
|
746
|
-
unreadCommentCount:
|
|
747
|
-
attachment:
|
|
748
|
-
attachments:
|
|
749
|
-
submissionDraft:
|
|
750
|
-
}),
|
|
751
|
-
_id:
|
|
752
|
-
name:
|
|
753
|
-
description:
|
|
754
|
-
allowedExtensions:
|
|
755
|
-
allowedAttempts:
|
|
756
|
-
dueAt:
|
|
757
|
-
pointsPossible:
|
|
758
|
-
submissionTypes:
|
|
759
|
-
gradingType:
|
|
760
|
-
published:
|
|
761
|
-
submissionsConnection:
|
|
762
|
-
nodes:
|
|
1125
|
+
`, ve = i.object({
|
|
1126
|
+
_id: i.string(),
|
|
1127
|
+
displayName: i.string(),
|
|
1128
|
+
id: i.string(),
|
|
1129
|
+
mimeClass: i.string(),
|
|
1130
|
+
url: i.string(),
|
|
1131
|
+
contentType: i.string(),
|
|
1132
|
+
submissionPreviewUrl: i.string().nullable()
|
|
1133
|
+
}), Hi = i.object({
|
|
1134
|
+
_id: i.string(),
|
|
1135
|
+
activeSubmissionType: i.string(),
|
|
1136
|
+
body: i.string().nullable(),
|
|
1137
|
+
attachments: i.array(ve).nullable()
|
|
1138
|
+
}), $i = i.object({
|
|
1139
|
+
id: i.string(),
|
|
1140
|
+
submittedAt: i.string(),
|
|
1141
|
+
body: i.string().nullable(),
|
|
1142
|
+
grade: i.string().nullable(),
|
|
1143
|
+
score: i.number().nullable(),
|
|
1144
|
+
submissionType: i.string(),
|
|
1145
|
+
attempt: i.number(),
|
|
1146
|
+
unreadCommentCount: i.number(),
|
|
1147
|
+
attachment: ve.nullable(),
|
|
1148
|
+
attachments: i.array(ve).nullable(),
|
|
1149
|
+
submissionDraft: Hi.nullable()
|
|
1150
|
+
}), Bi = i.object({
|
|
1151
|
+
_id: i.string(),
|
|
1152
|
+
name: i.string(),
|
|
1153
|
+
description: i.string().nullable(),
|
|
1154
|
+
allowedExtensions: i.array(i.string()).nullable(),
|
|
1155
|
+
allowedAttempts: i.number().nullable(),
|
|
1156
|
+
dueAt: i.string().nullable(),
|
|
1157
|
+
pointsPossible: i.number().nullable(),
|
|
1158
|
+
submissionTypes: i.array(i.string()),
|
|
1159
|
+
gradingType: i.string(),
|
|
1160
|
+
published: i.boolean().nullable().optional(),
|
|
1161
|
+
submissionsConnection: i.object({
|
|
1162
|
+
nodes: i.array($i)
|
|
763
1163
|
})
|
|
764
|
-
}),
|
|
765
|
-
legacyNode:
|
|
766
|
-
course:
|
|
767
|
-
name:
|
|
1164
|
+
}), Gi = i.object({
|
|
1165
|
+
legacyNode: Bi,
|
|
1166
|
+
course: i.object({
|
|
1167
|
+
name: i.string()
|
|
768
1168
|
})
|
|
769
|
-
}),
|
|
770
|
-
startCursor:
|
|
771
|
-
endCursor:
|
|
772
|
-
hasPreviousPage:
|
|
773
|
-
hasNextPage:
|
|
774
|
-
}),
|
|
775
|
-
_id:
|
|
776
|
-
attempt:
|
|
777
|
-
author:
|
|
778
|
-
avatarUrl:
|
|
779
|
-
shortName:
|
|
780
|
-
courseRoles:
|
|
1169
|
+
}), In = i.object({
|
|
1170
|
+
startCursor: i.string(),
|
|
1171
|
+
endCursor: i.string(),
|
|
1172
|
+
hasPreviousPage: i.boolean(),
|
|
1173
|
+
hasNextPage: i.boolean()
|
|
1174
|
+
}), wn = i.object({
|
|
1175
|
+
_id: i.string(),
|
|
1176
|
+
attempt: i.number(),
|
|
1177
|
+
author: i.object({
|
|
1178
|
+
avatarUrl: i.string().nullable(),
|
|
1179
|
+
shortName: i.string(),
|
|
1180
|
+
courseRoles: i.string().nullable()
|
|
781
1181
|
}),
|
|
782
|
-
htmlComment:
|
|
783
|
-
read:
|
|
784
|
-
updatedAt:
|
|
785
|
-
createdAt:
|
|
786
|
-
attachments:
|
|
787
|
-
|
|
788
|
-
url:
|
|
789
|
-
mimeClass:
|
|
790
|
-
displayName:
|
|
791
|
-
contentType:
|
|
792
|
-
id:
|
|
1182
|
+
htmlComment: i.string(),
|
|
1183
|
+
read: i.boolean(),
|
|
1184
|
+
updatedAt: i.string(),
|
|
1185
|
+
createdAt: i.string(),
|
|
1186
|
+
attachments: i.array(
|
|
1187
|
+
i.object({
|
|
1188
|
+
url: i.string(),
|
|
1189
|
+
mimeClass: i.string(),
|
|
1190
|
+
displayName: i.string(),
|
|
1191
|
+
contentType: i.string(),
|
|
1192
|
+
id: i.string()
|
|
793
1193
|
})
|
|
794
1194
|
).nullable()
|
|
795
|
-
}),
|
|
796
|
-
submissionComments:
|
|
797
|
-
commentsConnection:
|
|
798
|
-
pageInfo:
|
|
799
|
-
nodes:
|
|
1195
|
+
}), Wi = i.object({
|
|
1196
|
+
submissionComments: i.object({
|
|
1197
|
+
commentsConnection: i.object({
|
|
1198
|
+
pageInfo: In,
|
|
1199
|
+
nodes: i.array(wn)
|
|
800
1200
|
})
|
|
801
1201
|
})
|
|
802
|
-
}),
|
|
803
|
-
comments:
|
|
804
|
-
pageInfo:
|
|
805
|
-
}),
|
|
806
|
-
submittedAt:
|
|
807
|
-
body:
|
|
808
|
-
grade:
|
|
809
|
-
score:
|
|
810
|
-
submissionType:
|
|
811
|
-
state:
|
|
812
|
-
attempt:
|
|
813
|
-
attachment:
|
|
814
|
-
attachments:
|
|
815
|
-
}),
|
|
816
|
-
node:
|
|
817
|
-
submissionHistoriesConnection:
|
|
818
|
-
nodes:
|
|
1202
|
+
}), zo = i.object({
|
|
1203
|
+
comments: i.array(wn),
|
|
1204
|
+
pageInfo: In
|
|
1205
|
+
}), qi = i.object({
|
|
1206
|
+
submittedAt: i.string(),
|
|
1207
|
+
body: i.string().nullable(),
|
|
1208
|
+
grade: i.string().nullable(),
|
|
1209
|
+
score: i.number().nullable(),
|
|
1210
|
+
submissionType: i.string(),
|
|
1211
|
+
state: i.string(),
|
|
1212
|
+
attempt: i.number(),
|
|
1213
|
+
attachment: ve.nullable(),
|
|
1214
|
+
attachments: i.array(ve).nullable()
|
|
1215
|
+
}), Yi = i.object({
|
|
1216
|
+
node: i.object({
|
|
1217
|
+
submissionHistoriesConnection: i.object({
|
|
1218
|
+
nodes: i.array(qi)
|
|
819
1219
|
})
|
|
820
1220
|
})
|
|
821
|
-
}),
|
|
822
|
-
attribute:
|
|
823
|
-
message:
|
|
824
|
-
}),
|
|
825
|
-
createSubmissionComment:
|
|
826
|
-
submissionComment:
|
|
827
|
-
_id:
|
|
828
|
-
attachments:
|
|
829
|
-
|
|
830
|
-
_id:
|
|
831
|
-
displayName:
|
|
832
|
-
id:
|
|
833
|
-
mimeClass:
|
|
834
|
-
url:
|
|
1221
|
+
}), Le = i.object({
|
|
1222
|
+
attribute: i.string(),
|
|
1223
|
+
message: i.string()
|
|
1224
|
+
}), Vi = i.object({
|
|
1225
|
+
createSubmissionComment: i.object({
|
|
1226
|
+
submissionComment: i.object({
|
|
1227
|
+
_id: i.string(),
|
|
1228
|
+
attachments: i.array(
|
|
1229
|
+
i.object({
|
|
1230
|
+
_id: i.string(),
|
|
1231
|
+
displayName: i.string(),
|
|
1232
|
+
id: i.string(),
|
|
1233
|
+
mimeClass: i.string(),
|
|
1234
|
+
url: i.string()
|
|
835
1235
|
})
|
|
836
1236
|
).nullable(),
|
|
837
|
-
author:
|
|
838
|
-
avatarUrl:
|
|
839
|
-
shortName:
|
|
1237
|
+
author: i.object({
|
|
1238
|
+
avatarUrl: i.string().nullable(),
|
|
1239
|
+
shortName: i.string()
|
|
840
1240
|
}),
|
|
841
|
-
htmlComment:
|
|
842
|
-
mediaObject:
|
|
843
|
-
id:
|
|
844
|
-
_id:
|
|
845
|
-
mediaSources:
|
|
846
|
-
|
|
847
|
-
height:
|
|
848
|
-
src:
|
|
849
|
-
type:
|
|
850
|
-
width:
|
|
1241
|
+
htmlComment: i.string(),
|
|
1242
|
+
mediaObject: i.object({
|
|
1243
|
+
id: i.string(),
|
|
1244
|
+
_id: i.string(),
|
|
1245
|
+
mediaSources: i.array(
|
|
1246
|
+
i.object({
|
|
1247
|
+
height: i.string(),
|
|
1248
|
+
src: i.string(),
|
|
1249
|
+
type: i.string(),
|
|
1250
|
+
width: i.string()
|
|
851
1251
|
})
|
|
852
1252
|
),
|
|
853
|
-
mediaTracks:
|
|
854
|
-
|
|
855
|
-
_id:
|
|
856
|
-
locale:
|
|
857
|
-
content:
|
|
858
|
-
kind:
|
|
1253
|
+
mediaTracks: i.array(
|
|
1254
|
+
i.object({
|
|
1255
|
+
_id: i.string(),
|
|
1256
|
+
locale: i.string(),
|
|
1257
|
+
content: i.string(),
|
|
1258
|
+
kind: i.string()
|
|
859
1259
|
})
|
|
860
1260
|
),
|
|
861
|
-
mediaType:
|
|
862
|
-
title:
|
|
1261
|
+
mediaType: i.string(),
|
|
1262
|
+
title: i.string()
|
|
863
1263
|
}).nullable(),
|
|
864
|
-
read:
|
|
865
|
-
updatedAt:
|
|
1264
|
+
read: i.boolean(),
|
|
1265
|
+
updatedAt: i.string()
|
|
866
1266
|
}).nullable(),
|
|
867
|
-
errors:
|
|
1267
|
+
errors: i.array(Le).nullable()
|
|
868
1268
|
})
|
|
869
|
-
}),
|
|
870
|
-
markSubmissionCommentsRead:
|
|
871
|
-
errors:
|
|
1269
|
+
}), Xi = i.object({
|
|
1270
|
+
markSubmissionCommentsRead: i.object({
|
|
1271
|
+
errors: i.array(Le).nullable()
|
|
872
1272
|
})
|
|
873
|
-
}),
|
|
874
|
-
createSubmission:
|
|
875
|
-
submission:
|
|
876
|
-
_id:
|
|
877
|
-
createdAt:
|
|
878
|
-
attempt:
|
|
879
|
-
submittedAt:
|
|
880
|
-
score:
|
|
1273
|
+
}), jo = i.object({
|
|
1274
|
+
createSubmission: i.object({
|
|
1275
|
+
submission: i.object({
|
|
1276
|
+
_id: i.string(),
|
|
1277
|
+
createdAt: i.string(),
|
|
1278
|
+
attempt: i.number(),
|
|
1279
|
+
submittedAt: i.string().nullable(),
|
|
1280
|
+
score: i.number().nullable()
|
|
881
1281
|
}).nullable(),
|
|
882
|
-
errors:
|
|
1282
|
+
errors: i.array(Le).nullable()
|
|
883
1283
|
})
|
|
884
|
-
}),
|
|
1284
|
+
}), Ho = i.object(
|
|
885
1285
|
{
|
|
886
|
-
createSubmissionDraft:
|
|
887
|
-
submissionDraft:
|
|
888
|
-
_id:
|
|
1286
|
+
createSubmissionDraft: i.object({
|
|
1287
|
+
submissionDraft: i.object({
|
|
1288
|
+
_id: i.string()
|
|
889
1289
|
}).nullable(),
|
|
890
|
-
errors:
|
|
1290
|
+
errors: i.array(Le).nullable()
|
|
891
1291
|
})
|
|
892
1292
|
}
|
|
893
|
-
),
|
|
1293
|
+
), $o = i.object(
|
|
894
1294
|
{
|
|
895
|
-
deleteSubmissionDraft:
|
|
896
|
-
submissionDraftIds:
|
|
897
|
-
errors:
|
|
1295
|
+
deleteSubmissionDraft: i.object({
|
|
1296
|
+
submissionDraftIds: i.array(i.string()).nullable(),
|
|
1297
|
+
errors: i.array(Le).nullable()
|
|
898
1298
|
})
|
|
899
1299
|
}
|
|
900
1300
|
);
|
|
901
|
-
function
|
|
902
|
-
courseId:
|
|
903
|
-
assignmentId:
|
|
1301
|
+
function Ki({
|
|
1302
|
+
courseId: e,
|
|
1303
|
+
assignmentId: n,
|
|
904
1304
|
userId: o,
|
|
905
|
-
executeQuery:
|
|
1305
|
+
executeQuery: a,
|
|
906
1306
|
enabled: l = !0
|
|
907
1307
|
}) {
|
|
908
|
-
return
|
|
909
|
-
queryKey: ["assignment-review", "assignment",
|
|
1308
|
+
return Ve({
|
|
1309
|
+
queryKey: ["assignment-review", "assignment", e, n, o],
|
|
910
1310
|
queryFn: async () => {
|
|
911
|
-
const c = await
|
|
912
|
-
courseId:
|
|
913
|
-
assignmentId:
|
|
1311
|
+
const c = await a(Ui, {
|
|
1312
|
+
courseId: e,
|
|
1313
|
+
assignmentId: n,
|
|
914
1314
|
userId: o
|
|
915
|
-
}),
|
|
1315
|
+
}), d = Gi.parse(c);
|
|
916
1316
|
return {
|
|
917
|
-
...
|
|
918
|
-
courseName:
|
|
1317
|
+
...d.legacyNode,
|
|
1318
|
+
courseName: d.course.name
|
|
919
1319
|
};
|
|
920
1320
|
},
|
|
921
1321
|
enabled: l
|
|
922
1322
|
});
|
|
923
1323
|
}
|
|
924
|
-
function
|
|
925
|
-
submissionId:
|
|
926
|
-
executeQuery:
|
|
1324
|
+
function Zi({
|
|
1325
|
+
submissionId: e,
|
|
1326
|
+
executeQuery: n,
|
|
927
1327
|
enabled: o = !0
|
|
928
1328
|
}) {
|
|
929
|
-
return
|
|
930
|
-
queryKey: ["assignment-review", "submissions",
|
|
1329
|
+
return Ve({
|
|
1330
|
+
queryKey: ["assignment-review", "submissions", e],
|
|
931
1331
|
queryFn: async () => {
|
|
932
|
-
const
|
|
933
|
-
return
|
|
934
|
-
(c,
|
|
1332
|
+
const a = await n(ji, { submissionId: e });
|
|
1333
|
+
return Yi.parse(a).node.submissionHistoriesConnection.nodes.slice().sort(
|
|
1334
|
+
(c, d) => new Date(d.submittedAt).getTime() - new Date(c.submittedAt).getTime()
|
|
935
1335
|
);
|
|
936
1336
|
},
|
|
937
1337
|
enabled: o
|
|
938
1338
|
});
|
|
939
1339
|
}
|
|
940
|
-
function
|
|
941
|
-
if (!
|
|
942
|
-
const
|
|
943
|
-
return Number.isNaN(
|
|
1340
|
+
function Qi(e) {
|
|
1341
|
+
if (!e) return "";
|
|
1342
|
+
const n = new Date(e);
|
|
1343
|
+
return Number.isNaN(n.getTime()) ? "" : n.toLocaleDateString();
|
|
944
1344
|
}
|
|
945
|
-
function
|
|
946
|
-
submission:
|
|
947
|
-
isSelected:
|
|
1345
|
+
function Ji({
|
|
1346
|
+
submission: e,
|
|
1347
|
+
isSelected: n,
|
|
948
1348
|
isDraft: o = !1,
|
|
949
|
-
pointsPossible:
|
|
1349
|
+
pointsPossible: a,
|
|
950
1350
|
onClick: l
|
|
951
1351
|
}) {
|
|
952
|
-
const c =
|
|
953
|
-
return /* @__PURE__ */
|
|
954
|
-
|
|
1352
|
+
const c = q(), d = o ? c.submissionCurrentAttempt() : c.commentsAttempt({ number: e.attempt }), b = e.score != null && a != null ? `${e.score}/${a}` : null;
|
|
1353
|
+
return /* @__PURE__ */ r(
|
|
1354
|
+
K,
|
|
955
1355
|
{
|
|
956
1356
|
as: "div",
|
|
957
1357
|
padding: "small medium",
|
|
958
1358
|
borderWidth: "small",
|
|
959
|
-
borderColor:
|
|
1359
|
+
borderColor: n ? "brand" : "primary",
|
|
960
1360
|
borderRadius: "medium",
|
|
961
|
-
background:
|
|
1361
|
+
background: n ? "secondary" : "primary",
|
|
962
1362
|
cursor: "pointer",
|
|
963
1363
|
onClick: l,
|
|
964
1364
|
role: "button",
|
|
965
1365
|
tabIndex: 0,
|
|
966
|
-
onKeyDown: (
|
|
967
|
-
(
|
|
1366
|
+
onKeyDown: (u) => {
|
|
1367
|
+
(u.key === "Enter" || u.key === " ") && (u.preventDefault(), l());
|
|
968
1368
|
},
|
|
969
|
-
children: /* @__PURE__ */
|
|
970
|
-
/* @__PURE__ */
|
|
971
|
-
/* @__PURE__ */
|
|
972
|
-
/* @__PURE__ */
|
|
973
|
-
o && /* @__PURE__ */
|
|
1369
|
+
children: /* @__PURE__ */ S(h, { justifyItems: "space-between", alignItems: "center", children: [
|
|
1370
|
+
/* @__PURE__ */ S(h, { direction: "column", gap: "xx-small", children: [
|
|
1371
|
+
/* @__PURE__ */ S(h, { gap: "small", alignItems: "center", children: [
|
|
1372
|
+
/* @__PURE__ */ r(_, { weight: "bold", children: d }),
|
|
1373
|
+
o && /* @__PURE__ */ r(_t, { color: "info", children: c.submissionDraft() })
|
|
974
1374
|
] }),
|
|
975
|
-
!o &&
|
|
1375
|
+
!o && e.submittedAt && /* @__PURE__ */ r(_, { size: "small", color: "secondary", children: Qi(e.submittedAt) })
|
|
976
1376
|
] }),
|
|
977
|
-
b && /* @__PURE__ */
|
|
1377
|
+
b && /* @__PURE__ */ r(_, { weight: "bold", children: b })
|
|
978
1378
|
] })
|
|
979
1379
|
}
|
|
980
1380
|
);
|
|
981
1381
|
}
|
|
982
|
-
function
|
|
983
|
-
submissionId:
|
|
984
|
-
selectedAttempt:
|
|
1382
|
+
function eo({
|
|
1383
|
+
submissionId: e,
|
|
1384
|
+
selectedAttempt: n,
|
|
985
1385
|
onAttemptSelect: o,
|
|
986
|
-
pointsPossible:
|
|
1386
|
+
pointsPossible: a,
|
|
987
1387
|
executeQuery: l
|
|
988
1388
|
}) {
|
|
989
|
-
const c =
|
|
990
|
-
submissionId:
|
|
1389
|
+
const c = q(), { data: d, isLoading: b, isError: u } = Zi({
|
|
1390
|
+
submissionId: e,
|
|
991
1391
|
executeQuery: l
|
|
992
1392
|
});
|
|
993
1393
|
if (b)
|
|
994
|
-
return /* @__PURE__ */
|
|
995
|
-
if (
|
|
996
|
-
return /* @__PURE__ */
|
|
997
|
-
const
|
|
998
|
-
return
|
|
999
|
-
|
|
1394
|
+
return /* @__PURE__ */ r(h, { justifyItems: "center", padding: "medium", children: /* @__PURE__ */ r(Ye, { renderTitle: c.navigationAttempts(), size: "small" }) });
|
|
1395
|
+
if (u)
|
|
1396
|
+
return /* @__PURE__ */ r(h, { justifyItems: "center", padding: "medium", children: /* @__PURE__ */ r(_, { color: "danger", children: c.submissionLoadAttemptsError() }) });
|
|
1397
|
+
const f = (d == null ? void 0 : d.filter((g) => g.attempt > 0)) ?? [];
|
|
1398
|
+
return f.length === 0 ? /* @__PURE__ */ r(h, { padding: "medium", children: /* @__PURE__ */ r(_, { color: "secondary", children: c.submissionNoAttempts() }) }) : /* @__PURE__ */ r(h, { direction: "column", gap: "x-small", padding: "none none medium none", children: f.map((g) => /* @__PURE__ */ r(
|
|
1399
|
+
Ji,
|
|
1000
1400
|
{
|
|
1001
1401
|
submission: g,
|
|
1002
|
-
isSelected:
|
|
1003
|
-
pointsPossible:
|
|
1402
|
+
isSelected: n === g.attempt,
|
|
1403
|
+
pointsPossible: a,
|
|
1004
1404
|
onClick: () => o(g)
|
|
1005
1405
|
},
|
|
1006
1406
|
g.attempt
|
|
1007
1407
|
)) });
|
|
1008
1408
|
}
|
|
1009
|
-
function
|
|
1010
|
-
attachments:
|
|
1011
|
-
size:
|
|
1409
|
+
function Cn({
|
|
1410
|
+
attachments: e,
|
|
1411
|
+
size: n = "medium"
|
|
1012
1412
|
}) {
|
|
1013
|
-
return
|
|
1014
|
-
|
|
1413
|
+
return e.length === 0 ? null : /* @__PURE__ */ r(h, { direction: "column", gap: "x-small", children: e.map((o) => /* @__PURE__ */ r(
|
|
1414
|
+
K,
|
|
1015
1415
|
{
|
|
1016
1416
|
as: "div",
|
|
1017
|
-
padding:
|
|
1417
|
+
padding: n === "small" ? "x-small" : "small medium",
|
|
1018
1418
|
borderColor: "primary",
|
|
1019
1419
|
borderWidth: "small",
|
|
1020
1420
|
borderRadius: "medium",
|
|
1021
|
-
children: /* @__PURE__ */
|
|
1022
|
-
/* @__PURE__ */
|
|
1023
|
-
/* @__PURE__ */
|
|
1421
|
+
children: /* @__PURE__ */ S(h, { as: "div", gap: "small", width: "100%", justifyItems: "space-between", alignItems: "center", children: [
|
|
1422
|
+
/* @__PURE__ */ r(h.Item, { shouldShrink: !0, children: /* @__PURE__ */ r(bn, { children: o.displayName }) }),
|
|
1423
|
+
/* @__PURE__ */ r(Qn, { href: o.url, isWithinText: !1, renderIcon: /* @__PURE__ */ r($n, {}), children: /* @__PURE__ */ r(Et, { children: `Download ${o.displayName}` }) })
|
|
1024
1424
|
] })
|
|
1025
1425
|
},
|
|
1026
1426
|
o.id
|
|
1027
1427
|
)) });
|
|
1028
1428
|
}
|
|
1029
|
-
function
|
|
1030
|
-
return /* @__PURE__ */
|
|
1429
|
+
function to(e) {
|
|
1430
|
+
return /* @__PURE__ */ r("span", { dangerouslySetInnerHTML: { __html: It(e) } });
|
|
1031
1431
|
}
|
|
1032
|
-
function
|
|
1033
|
-
submission:
|
|
1034
|
-
isLastAttempt:
|
|
1432
|
+
function no({
|
|
1433
|
+
submission: e,
|
|
1434
|
+
isLastAttempt: n = !0,
|
|
1035
1435
|
showAttemptLabel: o = !0,
|
|
1036
|
-
renderHTML:
|
|
1436
|
+
renderHTML: a
|
|
1037
1437
|
}) {
|
|
1038
|
-
const l =
|
|
1039
|
-
if (!
|
|
1040
|
-
const
|
|
1041
|
-
if (
|
|
1042
|
-
for (const I of
|
|
1043
|
-
|
|
1044
|
-
return
|
|
1045
|
-
}, [
|
|
1046
|
-
return
|
|
1047
|
-
o && !
|
|
1048
|
-
/* @__PURE__ */
|
|
1049
|
-
/* @__PURE__ */
|
|
1050
|
-
/* @__PURE__ */
|
|
1438
|
+
const l = q(), c = a ?? to, d = (e == null ? void 0 : e.submissionType) === "online_text_entry", b = (e == null ? void 0 : e.submissionType) === "online_upload", u = d ? l.submissionTextHeading() : l.submissionUploadHeading(), f = qe(() => {
|
|
1439
|
+
if (!e) return [];
|
|
1440
|
+
const C = [];
|
|
1441
|
+
if (e.attachment && C.push(e.attachment), e.attachments)
|
|
1442
|
+
for (const I of e.attachments)
|
|
1443
|
+
C.some((w) => w.id === I.id) || C.push(I);
|
|
1444
|
+
return C;
|
|
1445
|
+
}, [e]), g = qe(() => c((e == null ? void 0 : e.body) ?? ""), [e == null ? void 0 : e.body, c]);
|
|
1446
|
+
return e ? /* @__PURE__ */ r(K, { as: "div", children: /* @__PURE__ */ S(h, { direction: "column", gap: "small", children: [
|
|
1447
|
+
o && !n && e.attempt != null && /* @__PURE__ */ r(_, { size: "small", weight: "bold", color: "secondary", children: l.submissionViewingAttempt({ number: e.attempt }) }),
|
|
1448
|
+
/* @__PURE__ */ S(h, { gap: "x-small", alignItems: "center", children: [
|
|
1449
|
+
/* @__PURE__ */ r(Bn, { color: "success" }),
|
|
1450
|
+
/* @__PURE__ */ r(St, { level: "h3", children: u })
|
|
1051
1451
|
] }),
|
|
1052
|
-
|
|
1053
|
-
/* @__PURE__ */
|
|
1054
|
-
/* @__PURE__ */
|
|
1452
|
+
d && e.body && /* @__PURE__ */ S(h, { alignItems: "stretch", gap: "small", children: [
|
|
1453
|
+
/* @__PURE__ */ r(K, { as: "div", width: "4px", background: "primary", borderRadius: "small" }),
|
|
1454
|
+
/* @__PURE__ */ r(K, { as: "div", children: /* @__PURE__ */ r(_, { children: g }) })
|
|
1055
1455
|
] }),
|
|
1056
|
-
b &&
|
|
1456
|
+
b && f.length > 0 && /* @__PURE__ */ r(Cn, { attachments: f })
|
|
1057
1457
|
] }) }) : null;
|
|
1058
1458
|
}
|
|
1059
|
-
function
|
|
1060
|
-
const
|
|
1061
|
-
return Number.isNaN(
|
|
1459
|
+
function io(e) {
|
|
1460
|
+
const n = new Date(e);
|
|
1461
|
+
return Number.isNaN(n.getTime()) ? "" : n.toLocaleDateString(void 0, { month: "short", day: "numeric", year: "numeric" });
|
|
1062
1462
|
}
|
|
1063
|
-
function
|
|
1064
|
-
return /* @__PURE__ */
|
|
1463
|
+
function oo() {
|
|
1464
|
+
return /* @__PURE__ */ r(_, { color: "secondary", size: "small", children: "|" });
|
|
1065
1465
|
}
|
|
1066
|
-
function
|
|
1067
|
-
score:
|
|
1068
|
-
pointsPossible:
|
|
1466
|
+
function ro({
|
|
1467
|
+
score: e,
|
|
1468
|
+
pointsPossible: n,
|
|
1069
1469
|
gradingType: o,
|
|
1070
|
-
dueAt:
|
|
1470
|
+
dueAt: a,
|
|
1071
1471
|
allowedAttempts: l,
|
|
1072
1472
|
currentAttempt: c,
|
|
1073
|
-
isOverdue:
|
|
1473
|
+
isOverdue: d,
|
|
1074
1474
|
estimatedDuration: b,
|
|
1075
|
-
labels:
|
|
1475
|
+
labels: u
|
|
1076
1476
|
}) {
|
|
1077
|
-
const
|
|
1477
|
+
const f = q(), g = [];
|
|
1078
1478
|
return b && g.push(
|
|
1079
|
-
/* @__PURE__ */
|
|
1080
|
-
),
|
|
1081
|
-
/* @__PURE__ */
|
|
1082
|
-
) :
|
|
1083
|
-
/* @__PURE__ */
|
|
1479
|
+
/* @__PURE__ */ r(_, { size: "small", children: (u == null ? void 0 : u.duration) ?? f.headerDuration({ minutes: b }) }, "duration")
|
|
1480
|
+
), e != null && n != null ? g.push(
|
|
1481
|
+
/* @__PURE__ */ r(_, { size: "small", children: (u == null ? void 0 : u.score) ?? f.headerScore({ score: e, total: n }) }, "score")
|
|
1482
|
+
) : n != null && o !== "not_graded" && g.push(
|
|
1483
|
+
/* @__PURE__ */ r(_, { size: "small", children: (u == null ? void 0 : u.pointsPossible) ?? f.headerPointsPossible({ points: n }) }, "points")
|
|
1084
1484
|
), l != null && (l === -1 ? g.push(
|
|
1085
|
-
/* @__PURE__ */
|
|
1485
|
+
/* @__PURE__ */ r(_, { size: "small", children: (u == null ? void 0 : u.attempts) ?? f.headerAttemptsUnlimited() }, "attempts")
|
|
1086
1486
|
) : c != null ? g.push(
|
|
1087
|
-
/* @__PURE__ */
|
|
1487
|
+
/* @__PURE__ */ r(_, { size: "small", children: (u == null ? void 0 : u.attempts) ?? f.headerAttemptOf({ current: c, total: l }) }, "attempts")
|
|
1088
1488
|
) : g.push(
|
|
1089
|
-
/* @__PURE__ */
|
|
1090
|
-
)),
|
|
1091
|
-
/* @__PURE__ */
|
|
1092
|
-
), /* @__PURE__ */
|
|
1093
|
-
g.map((
|
|
1094
|
-
I > 0 && /* @__PURE__ */
|
|
1095
|
-
|
|
1489
|
+
/* @__PURE__ */ r(_, { size: "small", children: (u == null ? void 0 : u.attempts) ?? f.headerAttemptsAllowed({ count: l }) }, "attempts")
|
|
1490
|
+
)), a && g.push(
|
|
1491
|
+
/* @__PURE__ */ r(_, { size: "small", children: (u == null ? void 0 : u.dueDate) ?? f.headerDueDate({ date: io(a) }) }, "due")
|
|
1492
|
+
), /* @__PURE__ */ S(h, { as: "div", direction: "row", alignItems: "center", gap: "small", children: [
|
|
1493
|
+
g.map((C, I) => /* @__PURE__ */ S(h, { gap: "small", alignItems: "center", children: [
|
|
1494
|
+
I > 0 && /* @__PURE__ */ r(oo, {}),
|
|
1495
|
+
C
|
|
1096
1496
|
] }, `item-${String(I)}`)),
|
|
1097
|
-
|
|
1497
|
+
d && /* @__PURE__ */ r(_t, { color: "danger", children: (u == null ? void 0 : u.overdue) ?? f.headerOverdue() })
|
|
1098
1498
|
] });
|
|
1099
1499
|
}
|
|
1100
|
-
const
|
|
1500
|
+
const so = ae`
|
|
1101
1501
|
mutation CreateSubmissionComment(
|
|
1102
1502
|
$id: ID!
|
|
1103
1503
|
$submissionAttempt: Int!
|
|
@@ -1187,7 +1587,7 @@ const vi = ne`
|
|
|
1187
1587
|
mimeClass
|
|
1188
1588
|
url
|
|
1189
1589
|
}
|
|
1190
|
-
`,
|
|
1590
|
+
`, ao = ae`
|
|
1191
1591
|
mutation MarkSubmissionCommentsRead(
|
|
1192
1592
|
$submissionId: ID!
|
|
1193
1593
|
$submissionCommentIds: [ID!]!
|
|
@@ -1204,7 +1604,7 @@ const vi = ne`
|
|
|
1204
1604
|
}
|
|
1205
1605
|
}
|
|
1206
1606
|
}
|
|
1207
|
-
`,
|
|
1607
|
+
`, Bo = ae`
|
|
1208
1608
|
mutation CreateSubmission(
|
|
1209
1609
|
$assignmentLid: ID!
|
|
1210
1610
|
$submissionType: OnlineSubmissionType!
|
|
@@ -1232,7 +1632,7 @@ const vi = ne`
|
|
|
1232
1632
|
}
|
|
1233
1633
|
}
|
|
1234
1634
|
}
|
|
1235
|
-
`,
|
|
1635
|
+
`, Go = ae`
|
|
1236
1636
|
mutation CreateSubmissionDraft(
|
|
1237
1637
|
$submissionId: ID!
|
|
1238
1638
|
$submissionType: DraftableSubmissionType!
|
|
@@ -1258,7 +1658,7 @@ const vi = ne`
|
|
|
1258
1658
|
}
|
|
1259
1659
|
}
|
|
1260
1660
|
}
|
|
1261
|
-
`,
|
|
1661
|
+
`, Wo = ae`
|
|
1262
1662
|
mutation DeleteSubmissionDraft($submissionId: ID!) {
|
|
1263
1663
|
deleteSubmissionDraft(input: { submissionId: $submissionId }) {
|
|
1264
1664
|
submissionDraftIds
|
|
@@ -1269,123 +1669,123 @@ const vi = ne`
|
|
|
1269
1669
|
}
|
|
1270
1670
|
}
|
|
1271
1671
|
`;
|
|
1272
|
-
function
|
|
1273
|
-
executeQuery:
|
|
1672
|
+
function lo({
|
|
1673
|
+
executeQuery: e
|
|
1274
1674
|
}) {
|
|
1275
|
-
const
|
|
1276
|
-
return
|
|
1277
|
-
mutationFn: async ({ submissionId: o, attempt:
|
|
1278
|
-
const
|
|
1675
|
+
const n = dn();
|
|
1676
|
+
return fn({
|
|
1677
|
+
mutationFn: async ({ submissionId: o, attempt: a, comment: l, fileIds: c }) => {
|
|
1678
|
+
const d = await e(so, {
|
|
1279
1679
|
id: o,
|
|
1280
|
-
submissionAttempt:
|
|
1680
|
+
submissionAttempt: a,
|
|
1281
1681
|
comment: l,
|
|
1282
1682
|
fileIds: c
|
|
1283
1683
|
});
|
|
1284
|
-
return
|
|
1684
|
+
return Vi.parse(d), d;
|
|
1285
1685
|
},
|
|
1286
|
-
onSuccess: (o,
|
|
1287
|
-
|
|
1288
|
-
queryKey: ["assignment-review", "submission-comments",
|
|
1686
|
+
onSuccess: (o, a) => {
|
|
1687
|
+
n.invalidateQueries({
|
|
1688
|
+
queryKey: ["assignment-review", "submission-comments", a.submissionId]
|
|
1289
1689
|
});
|
|
1290
1690
|
}
|
|
1291
1691
|
});
|
|
1292
1692
|
}
|
|
1293
|
-
function
|
|
1294
|
-
submissionId:
|
|
1295
|
-
courseId:
|
|
1693
|
+
function co({
|
|
1694
|
+
submissionId: e,
|
|
1695
|
+
courseId: n,
|
|
1296
1696
|
pageParams: o,
|
|
1297
|
-
direction:
|
|
1697
|
+
direction: a,
|
|
1298
1698
|
executeQuery: l,
|
|
1299
1699
|
enabled: c
|
|
1300
1700
|
}) {
|
|
1301
|
-
return
|
|
1701
|
+
return Ve({
|
|
1302
1702
|
queryKey: [
|
|
1303
1703
|
"assignment-review",
|
|
1304
1704
|
"submission-comments",
|
|
1305
|
-
|
|
1306
|
-
|
|
1705
|
+
e,
|
|
1706
|
+
n,
|
|
1307
1707
|
o == null ? void 0 : o.startCursor,
|
|
1308
1708
|
o == null ? void 0 : o.endCursor,
|
|
1309
|
-
|
|
1709
|
+
a
|
|
1310
1710
|
],
|
|
1311
1711
|
queryFn: async () => {
|
|
1312
|
-
const
|
|
1313
|
-
submissionId:
|
|
1314
|
-
courseId:
|
|
1315
|
-
beforeCursor:
|
|
1316
|
-
afterCursor:
|
|
1317
|
-
first:
|
|
1318
|
-
last:
|
|
1319
|
-
}), b =
|
|
1712
|
+
const d = await l(zi, {
|
|
1713
|
+
submissionId: e,
|
|
1714
|
+
courseId: n,
|
|
1715
|
+
beforeCursor: a === "prev" ? (o == null ? void 0 : o.startCursor) ?? null : null,
|
|
1716
|
+
afterCursor: a === "next" ? (o == null ? void 0 : o.endCursor) ?? null : null,
|
|
1717
|
+
first: a === "next" ? 5 : null,
|
|
1718
|
+
last: a === "prev" || !a ? 5 : null
|
|
1719
|
+
}), b = Wi.parse(d);
|
|
1320
1720
|
return {
|
|
1321
1721
|
comments: [...b.submissionComments.commentsConnection.nodes].sort(
|
|
1322
|
-
(
|
|
1722
|
+
(f, g) => new Date(f.createdAt).getTime() - new Date(g.createdAt).getTime()
|
|
1323
1723
|
),
|
|
1324
1724
|
pageInfo: b.submissionComments.commentsConnection.pageInfo
|
|
1325
1725
|
};
|
|
1326
1726
|
},
|
|
1327
|
-
enabled: c ?? !!
|
|
1727
|
+
enabled: c ?? !!e
|
|
1328
1728
|
});
|
|
1329
1729
|
}
|
|
1330
|
-
function
|
|
1331
|
-
executeQuery:
|
|
1730
|
+
function mo({
|
|
1731
|
+
executeQuery: e
|
|
1332
1732
|
}) {
|
|
1333
|
-
const
|
|
1334
|
-
return
|
|
1335
|
-
mutationFn: async ({ submissionId: o, submissionCommentIds:
|
|
1336
|
-
const l = await
|
|
1337
|
-
|
|
1338
|
-
{ submissionId: o, submissionCommentIds:
|
|
1733
|
+
const n = dn();
|
|
1734
|
+
return fn({
|
|
1735
|
+
mutationFn: async ({ submissionId: o, submissionCommentIds: a }) => {
|
|
1736
|
+
const l = await e(
|
|
1737
|
+
ao,
|
|
1738
|
+
{ submissionId: o, submissionCommentIds: a }
|
|
1339
1739
|
);
|
|
1340
|
-
return
|
|
1740
|
+
return Xi.parse(l), l;
|
|
1341
1741
|
},
|
|
1342
|
-
onSuccess: (o,
|
|
1343
|
-
|
|
1742
|
+
onSuccess: (o, a) => {
|
|
1743
|
+
n.invalidateQueries({
|
|
1344
1744
|
queryKey: ["assignment-review", "assignment"],
|
|
1345
|
-
predicate: (l) => l.queryKey.includes(
|
|
1745
|
+
predicate: (l) => l.queryKey.includes(a.assignmentId)
|
|
1346
1746
|
});
|
|
1347
1747
|
}
|
|
1348
1748
|
});
|
|
1349
1749
|
}
|
|
1350
|
-
function
|
|
1351
|
-
return /* @__PURE__ */
|
|
1750
|
+
function uo(e) {
|
|
1751
|
+
return /* @__PURE__ */ r("span", { dangerouslySetInnerHTML: { __html: It(e) } });
|
|
1352
1752
|
}
|
|
1353
|
-
function
|
|
1354
|
-
const
|
|
1355
|
-
return Number.isNaN(
|
|
1753
|
+
function fo(e) {
|
|
1754
|
+
const n = new Date(e);
|
|
1755
|
+
return Number.isNaN(n.getTime()) ? "" : n.toLocaleString();
|
|
1356
1756
|
}
|
|
1357
|
-
function
|
|
1358
|
-
comment:
|
|
1359
|
-
isFullWidth:
|
|
1757
|
+
function po({
|
|
1758
|
+
comment: e,
|
|
1759
|
+
isFullWidth: n,
|
|
1360
1760
|
renderHTML: o
|
|
1361
1761
|
}) {
|
|
1362
|
-
var
|
|
1363
|
-
const
|
|
1364
|
-
return /* @__PURE__ */
|
|
1365
|
-
|
|
1762
|
+
var u;
|
|
1763
|
+
const a = q(), l = o ?? uo, c = ((u = e.author.courseRoles) == null ? void 0 : u.includes("StudentEnrollment")) ?? !1, d = qe(() => l(e.htmlComment), [e.htmlComment, l]);
|
|
1764
|
+
return /* @__PURE__ */ r(
|
|
1765
|
+
K,
|
|
1366
1766
|
{
|
|
1367
1767
|
as: "div",
|
|
1368
1768
|
padding: "small medium",
|
|
1369
1769
|
borderWidth: "small",
|
|
1370
1770
|
borderColor: "primary",
|
|
1371
1771
|
borderRadius: "medium",
|
|
1372
|
-
margin:
|
|
1373
|
-
children: /* @__PURE__ */
|
|
1374
|
-
/* @__PURE__ */
|
|
1375
|
-
/* @__PURE__ */
|
|
1376
|
-
/* @__PURE__ */
|
|
1377
|
-
!
|
|
1772
|
+
margin: n ? "none" : c ? "none none none medium" : "none medium none none",
|
|
1773
|
+
children: /* @__PURE__ */ S(h, { as: "div", direction: "column", gap: "small", children: [
|
|
1774
|
+
/* @__PURE__ */ S(h, { as: "div", direction: "column", gap: "xx-small", children: [
|
|
1775
|
+
/* @__PURE__ */ S(h, { as: "div", justifyItems: "space-between", alignItems: "center", children: [
|
|
1776
|
+
/* @__PURE__ */ r(h.Item, { shouldShrink: !0, children: /* @__PURE__ */ r(_, { weight: "bold", size: "medium", children: /* @__PURE__ */ r(bn, { children: e.author.shortName }) }) }),
|
|
1777
|
+
!e.read && /* @__PURE__ */ r(yn, { type: "notification", standalone: !0, children: /* @__PURE__ */ r(Et, { children: a.commentsUnreadSingle() }) })
|
|
1378
1778
|
] }),
|
|
1379
|
-
/* @__PURE__ */
|
|
1380
|
-
|
|
1779
|
+
/* @__PURE__ */ r(_, { size: "small", color: "secondary", children: fo(e.createdAt) }),
|
|
1780
|
+
e.attempt > 0 && /* @__PURE__ */ r(_, { size: "small", color: "secondary", children: a.commentsAttempt({ number: e.attempt }) })
|
|
1381
1781
|
] }),
|
|
1382
|
-
/* @__PURE__ */
|
|
1383
|
-
|
|
1384
|
-
|
|
1782
|
+
/* @__PURE__ */ r(_, { size: "medium", children: d }),
|
|
1783
|
+
e.attachments && e.attachments.length > 0 && /* @__PURE__ */ r(
|
|
1784
|
+
Cn,
|
|
1385
1785
|
{
|
|
1386
|
-
attachments:
|
|
1387
|
-
...
|
|
1388
|
-
_id:
|
|
1786
|
+
attachments: e.attachments.map((f) => ({
|
|
1787
|
+
...f,
|
|
1788
|
+
_id: f._id ?? f.id,
|
|
1389
1789
|
submissionPreviewUrl: null
|
|
1390
1790
|
})),
|
|
1391
1791
|
size: "small"
|
|
@@ -1395,507 +1795,507 @@ function Ui({
|
|
|
1395
1795
|
}
|
|
1396
1796
|
);
|
|
1397
1797
|
}
|
|
1398
|
-
function
|
|
1399
|
-
submissionId:
|
|
1400
|
-
courseId:
|
|
1798
|
+
function go({
|
|
1799
|
+
submissionId: e,
|
|
1800
|
+
courseId: n,
|
|
1401
1801
|
assignmentId: o,
|
|
1402
|
-
attempt:
|
|
1802
|
+
attempt: a,
|
|
1403
1803
|
canPostComment: l,
|
|
1404
1804
|
onCommentPosted: c,
|
|
1405
|
-
renderHTML:
|
|
1805
|
+
renderHTML: d,
|
|
1406
1806
|
executeQuery: b
|
|
1407
1807
|
}) {
|
|
1408
|
-
const
|
|
1409
|
-
submissionId:
|
|
1410
|
-
courseId:
|
|
1411
|
-
pageParams:
|
|
1412
|
-
direction:
|
|
1808
|
+
const u = q(), [f, g] = Ee(""), [C, I] = Ee({}), w = jn(/* @__PURE__ */ new Set()), { data: y, isLoading: V, isError: fe } = co({
|
|
1809
|
+
submissionId: e,
|
|
1810
|
+
courseId: n,
|
|
1811
|
+
pageParams: C.pageParams,
|
|
1812
|
+
direction: C.direction,
|
|
1413
1813
|
executeQuery: b
|
|
1414
|
-
}),
|
|
1415
|
-
|
|
1416
|
-
if (!(
|
|
1417
|
-
const
|
|
1418
|
-
var
|
|
1419
|
-
return !((
|
|
1420
|
-
}).map((
|
|
1421
|
-
if (
|
|
1422
|
-
for (const
|
|
1423
|
-
|
|
1424
|
-
|
|
1814
|
+
}), le = lo({ executeQuery: b }), M = mo({ executeQuery: b });
|
|
1815
|
+
Tt(() => {
|
|
1816
|
+
if (!(y != null && y.comments) || y.comments.length === 0) return;
|
|
1817
|
+
const E = y.comments.filter((N) => !N.read && !w.current.has(N._id)).filter((N) => {
|
|
1818
|
+
var J;
|
|
1819
|
+
return !((J = N.author.courseRoles) != null && J.includes("StudentEnrollment"));
|
|
1820
|
+
}).map((N) => N._id);
|
|
1821
|
+
if (E.length > 0) {
|
|
1822
|
+
for (const N of E)
|
|
1823
|
+
w.current.add(N);
|
|
1824
|
+
M.mutate({ submissionId: e, assignmentId: o, submissionCommentIds: E });
|
|
1425
1825
|
}
|
|
1426
|
-
}, [
|
|
1427
|
-
const
|
|
1428
|
-
(
|
|
1429
|
-
var
|
|
1430
|
-
return !((
|
|
1826
|
+
}, [y == null ? void 0 : y.comments, e, o, M]);
|
|
1827
|
+
const ne = y == null ? void 0 : y.comments.some(
|
|
1828
|
+
(E) => {
|
|
1829
|
+
var N;
|
|
1830
|
+
return !((N = E.author.courseRoles) != null && N.includes("StudentEnrollment"));
|
|
1431
1831
|
}
|
|
1432
|
-
),
|
|
1433
|
-
|
|
1434
|
-
{ submissionId:
|
|
1832
|
+
), O = () => {
|
|
1833
|
+
f.trim() && le.mutate(
|
|
1834
|
+
{ submissionId: e, attempt: a, comment: f },
|
|
1435
1835
|
{
|
|
1436
1836
|
onSuccess: () => {
|
|
1437
1837
|
g(""), c == null || c();
|
|
1438
1838
|
}
|
|
1439
1839
|
}
|
|
1440
1840
|
);
|
|
1441
|
-
},
|
|
1442
|
-
return
|
|
1443
|
-
/* @__PURE__ */
|
|
1444
|
-
|
|
1445
|
-
|
|
1841
|
+
}, ce = (y == null ? void 0 : y.pageInfo.hasNextPage) || (y == null ? void 0 : y.pageInfo.hasPreviousPage);
|
|
1842
|
+
return V || !y && !fe ? /* @__PURE__ */ r(h, { justifyItems: "center", padding: "medium", children: /* @__PURE__ */ r(Ye, { renderTitle: u.commentsPanelTitle(), size: "small" }) }) : fe ? /* @__PURE__ */ r(h, { justifyItems: "center", padding: "medium", children: /* @__PURE__ */ r(_, { color: "danger", children: u.commentsLoadError() }) }) : /* @__PURE__ */ S(h, { as: "div", direction: "column", justifyItems: "space-between", height: "100%", children: [
|
|
1843
|
+
/* @__PURE__ */ S(h, { as: "div", direction: "column", children: [
|
|
1844
|
+
y.comments.length === 0 ? /* @__PURE__ */ r(h, { justifyItems: "center", padding: "medium", children: /* @__PURE__ */ r(_, { color: "secondary", children: u.commentsEmpty() }) }) : /* @__PURE__ */ r(h, { direction: "column", gap: "x-small", children: y.comments.map((E) => /* @__PURE__ */ r(
|
|
1845
|
+
po,
|
|
1446
1846
|
{
|
|
1447
|
-
comment:
|
|
1448
|
-
isFullWidth: !
|
|
1449
|
-
renderHTML:
|
|
1847
|
+
comment: E,
|
|
1848
|
+
isFullWidth: !ne,
|
|
1849
|
+
renderHTML: d
|
|
1450
1850
|
},
|
|
1451
|
-
|
|
1851
|
+
E._id
|
|
1452
1852
|
)) }),
|
|
1453
|
-
|
|
1454
|
-
/* @__PURE__ */
|
|
1455
|
-
|
|
1853
|
+
ce && /* @__PURE__ */ S(h, { justifyItems: "space-between", padding: "small none", children: [
|
|
1854
|
+
/* @__PURE__ */ r(
|
|
1855
|
+
$,
|
|
1456
1856
|
{
|
|
1457
|
-
renderIcon: () => /* @__PURE__ */
|
|
1857
|
+
renderIcon: () => /* @__PURE__ */ r(Gn, {}),
|
|
1458
1858
|
size: "small",
|
|
1459
|
-
interaction:
|
|
1460
|
-
onClick: () => I({ pageParams:
|
|
1461
|
-
children:
|
|
1859
|
+
interaction: y.pageInfo.hasPreviousPage ? "enabled" : "disabled",
|
|
1860
|
+
onClick: () => I({ pageParams: y.pageInfo, direction: "prev" }),
|
|
1861
|
+
children: u.commentsPreviousComments()
|
|
1462
1862
|
}
|
|
1463
1863
|
),
|
|
1464
|
-
/* @__PURE__ */
|
|
1465
|
-
|
|
1864
|
+
/* @__PURE__ */ r(
|
|
1865
|
+
$,
|
|
1466
1866
|
{
|
|
1467
|
-
renderIcon: () => /* @__PURE__ */
|
|
1867
|
+
renderIcon: () => /* @__PURE__ */ r(Wn, {}),
|
|
1468
1868
|
size: "small",
|
|
1469
|
-
interaction:
|
|
1470
|
-
onClick: () => I({ pageParams:
|
|
1471
|
-
children:
|
|
1869
|
+
interaction: y.pageInfo.hasNextPage ? "enabled" : "disabled",
|
|
1870
|
+
onClick: () => I({ pageParams: y.pageInfo, direction: "next" }),
|
|
1871
|
+
children: u.commentsNextComments()
|
|
1472
1872
|
}
|
|
1473
1873
|
)
|
|
1474
1874
|
] })
|
|
1475
1875
|
] }),
|
|
1476
|
-
l && /* @__PURE__ */
|
|
1477
|
-
/* @__PURE__ */
|
|
1478
|
-
|
|
1876
|
+
l && /* @__PURE__ */ S(h, { as: "div", direction: "column", gap: "small", padding: "small none medium", children: [
|
|
1877
|
+
/* @__PURE__ */ r(
|
|
1878
|
+
Tn,
|
|
1479
1879
|
{
|
|
1480
1880
|
resize: "vertical",
|
|
1481
|
-
label: /* @__PURE__ */
|
|
1482
|
-
value:
|
|
1483
|
-
onChange: (
|
|
1881
|
+
label: /* @__PURE__ */ r(_, { weight: "bold", size: "medium", children: u.commentsPlaceholder() }),
|
|
1882
|
+
value: f,
|
|
1883
|
+
onChange: (E) => g(E.target.value)
|
|
1484
1884
|
}
|
|
1485
1885
|
),
|
|
1486
|
-
/* @__PURE__ */
|
|
1487
|
-
|
|
1886
|
+
/* @__PURE__ */ r(
|
|
1887
|
+
$,
|
|
1488
1888
|
{
|
|
1489
1889
|
color: "primary",
|
|
1490
|
-
onClick:
|
|
1491
|
-
interaction:
|
|
1492
|
-
children:
|
|
1890
|
+
onClick: O,
|
|
1891
|
+
interaction: f.trim().length > 0 && !le.isPending ? "enabled" : "disabled",
|
|
1892
|
+
children: u.commentsPost()
|
|
1493
1893
|
}
|
|
1494
1894
|
)
|
|
1495
1895
|
] })
|
|
1496
1896
|
] });
|
|
1497
1897
|
}
|
|
1498
|
-
function
|
|
1499
|
-
return /* @__PURE__ */
|
|
1898
|
+
function ho(e) {
|
|
1899
|
+
return /* @__PURE__ */ r("span", { dangerouslySetInnerHTML: { __html: It(e) } });
|
|
1500
1900
|
}
|
|
1501
|
-
function
|
|
1502
|
-
courseId:
|
|
1503
|
-
assignmentId:
|
|
1901
|
+
function qo({
|
|
1902
|
+
courseId: e,
|
|
1903
|
+
assignmentId: n,
|
|
1504
1904
|
userId: o,
|
|
1505
|
-
feedbackMode:
|
|
1905
|
+
feedbackMode: a = !1,
|
|
1506
1906
|
onError: l,
|
|
1507
1907
|
renderHTML: c,
|
|
1508
|
-
renderPanels:
|
|
1908
|
+
renderPanels: d,
|
|
1509
1909
|
executeQuery: b
|
|
1510
1910
|
}) {
|
|
1511
|
-
const
|
|
1911
|
+
const u = q(), f = c ?? ho, {
|
|
1512
1912
|
data: g,
|
|
1513
|
-
isLoading:
|
|
1913
|
+
isLoading: C,
|
|
1514
1914
|
isError: I,
|
|
1515
|
-
error:
|
|
1516
|
-
} =
|
|
1517
|
-
|
|
1518
|
-
),
|
|
1915
|
+
error: w
|
|
1916
|
+
} = Ki({ courseId: e, assignmentId: n, userId: o, executeQuery: b }), [y, V] = Ee(null), [fe, le] = Ee(
|
|
1917
|
+
a ? "comments" : null
|
|
1918
|
+
), M = qe(
|
|
1519
1919
|
() => (g == null ? void 0 : g.submissionsConnection.nodes[0]) ?? null,
|
|
1520
1920
|
[g]
|
|
1521
|
-
),
|
|
1522
|
-
|
|
1921
|
+
), ne = M != null && M.attempt > 0, O = y ?? M, ce = y == null || y.attempt === (M == null ? void 0 : M.attempt), E = ne && ce, N = ((g == null ? void 0 : g.allowedAttempts) ?? 0) !== 1, J = Hn((Ze) => {
|
|
1922
|
+
V(Ze);
|
|
1523
1923
|
}, []);
|
|
1524
|
-
if (
|
|
1525
|
-
I &&
|
|
1526
|
-
}, [I,
|
|
1527
|
-
|
|
1528
|
-
}, [
|
|
1529
|
-
return /* @__PURE__ */
|
|
1924
|
+
if (Tt(() => {
|
|
1925
|
+
I && w && l && l(w);
|
|
1926
|
+
}, [I, w, l]), Tt(() => {
|
|
1927
|
+
a && ne && le("comments");
|
|
1928
|
+
}, [a, ne]), C)
|
|
1929
|
+
return /* @__PURE__ */ r(h, { justifyItems: "center", padding: "large", children: /* @__PURE__ */ r(Ye, { renderTitle: u.progressLoading() }) });
|
|
1530
1930
|
if (I || !g)
|
|
1531
|
-
return /* @__PURE__ */
|
|
1532
|
-
const
|
|
1533
|
-
|
|
1931
|
+
return /* @__PURE__ */ r(h, { justifyItems: "center", padding: "large", children: /* @__PURE__ */ r(_, { color: "danger", children: u.assignmentLoadError() }) });
|
|
1932
|
+
const Ie = !!g.dueAt && new Date(g.dueAt) < /* @__PURE__ */ new Date() && !ne, xe = M ? /* @__PURE__ */ r(
|
|
1933
|
+
go,
|
|
1534
1934
|
{
|
|
1535
|
-
submissionId:
|
|
1536
|
-
courseId:
|
|
1537
|
-
assignmentId:
|
|
1538
|
-
attempt: (
|
|
1539
|
-
canPostComment:
|
|
1540
|
-
renderHTML:
|
|
1935
|
+
submissionId: M.id,
|
|
1936
|
+
courseId: e,
|
|
1937
|
+
assignmentId: n,
|
|
1938
|
+
attempt: (O == null ? void 0 : O.attempt) ?? 0,
|
|
1939
|
+
canPostComment: E,
|
|
1940
|
+
renderHTML: f,
|
|
1541
1941
|
executeQuery: b
|
|
1542
1942
|
}
|
|
1543
|
-
) : null,
|
|
1544
|
-
|
|
1943
|
+
) : null, Xe = N && M ? /* @__PURE__ */ r(
|
|
1944
|
+
eo,
|
|
1545
1945
|
{
|
|
1546
|
-
submissionId:
|
|
1547
|
-
selectedAttempt:
|
|
1548
|
-
onAttemptSelect:
|
|
1946
|
+
submissionId: M.id,
|
|
1947
|
+
selectedAttempt: O == null ? void 0 : O.attempt,
|
|
1948
|
+
onAttemptSelect: J,
|
|
1549
1949
|
pointsPossible: g.pointsPossible,
|
|
1550
1950
|
executeQuery: b
|
|
1551
1951
|
}
|
|
1552
|
-
) : null,
|
|
1553
|
-
commentsPanel:
|
|
1554
|
-
attemptsPanel:
|
|
1555
|
-
activePanel:
|
|
1556
|
-
setActivePanel:
|
|
1557
|
-
unreadCommentCount: (
|
|
1558
|
-
hasMultipleAttempts:
|
|
1952
|
+
) : null, Ke = {
|
|
1953
|
+
commentsPanel: xe,
|
|
1954
|
+
attemptsPanel: Xe,
|
|
1955
|
+
activePanel: fe,
|
|
1956
|
+
setActivePanel: le,
|
|
1957
|
+
unreadCommentCount: (M == null ? void 0 : M.unreadCommentCount) ?? 0,
|
|
1958
|
+
hasMultipleAttempts: N
|
|
1559
1959
|
};
|
|
1560
|
-
return /* @__PURE__ */
|
|
1561
|
-
/* @__PURE__ */
|
|
1562
|
-
|
|
1960
|
+
return /* @__PURE__ */ S(h, { direction: "column", gap: "medium", children: [
|
|
1961
|
+
/* @__PURE__ */ r(
|
|
1962
|
+
ro,
|
|
1563
1963
|
{
|
|
1564
|
-
score:
|
|
1964
|
+
score: O == null ? void 0 : O.score,
|
|
1565
1965
|
pointsPossible: g.pointsPossible,
|
|
1566
1966
|
gradingType: g.gradingType,
|
|
1567
1967
|
dueAt: g.dueAt,
|
|
1568
1968
|
allowedAttempts: g.allowedAttempts,
|
|
1569
|
-
currentAttempt:
|
|
1570
|
-
isOverdue:
|
|
1969
|
+
currentAttempt: O == null ? void 0 : O.attempt,
|
|
1970
|
+
isOverdue: Ie
|
|
1571
1971
|
}
|
|
1572
1972
|
),
|
|
1573
|
-
g.description && /* @__PURE__ */
|
|
1574
|
-
/* @__PURE__ */
|
|
1575
|
-
/* @__PURE__ */
|
|
1973
|
+
g.description && /* @__PURE__ */ S(K, { as: "div", children: [
|
|
1974
|
+
/* @__PURE__ */ r(St, { level: "h3", children: u.assignmentInstructions() }),
|
|
1975
|
+
/* @__PURE__ */ r(K, { as: "div", margin: "small none large none", children: f(g.description) })
|
|
1576
1976
|
] }),
|
|
1577
|
-
/* @__PURE__ */
|
|
1578
|
-
|
|
1977
|
+
/* @__PURE__ */ r(
|
|
1978
|
+
no,
|
|
1579
1979
|
{
|
|
1580
|
-
submission:
|
|
1581
|
-
isLastAttempt:
|
|
1582
|
-
renderHTML:
|
|
1980
|
+
submission: O,
|
|
1981
|
+
isLastAttempt: ce,
|
|
1982
|
+
renderHTML: f
|
|
1583
1983
|
}
|
|
1584
1984
|
),
|
|
1585
|
-
|
|
1985
|
+
d ? d(Ke) : null
|
|
1586
1986
|
] });
|
|
1587
1987
|
}
|
|
1588
|
-
function
|
|
1589
|
-
existingFiles:
|
|
1590
|
-
onSubmit:
|
|
1988
|
+
function Yo({
|
|
1989
|
+
existingFiles: e,
|
|
1990
|
+
onSubmit: n,
|
|
1591
1991
|
onSaveDraft: o,
|
|
1592
|
-
onDiscardDraft:
|
|
1992
|
+
onDiscardDraft: a,
|
|
1593
1993
|
onSelectFiles: l,
|
|
1594
1994
|
isSubmitting: c = !1
|
|
1595
1995
|
}) {
|
|
1596
|
-
const
|
|
1597
|
-
const
|
|
1598
|
-
|
|
1599
|
-
}, g = (
|
|
1600
|
-
|
|
1601
|
-
},
|
|
1602
|
-
return /* @__PURE__ */
|
|
1603
|
-
b.length > 0 && /* @__PURE__ */
|
|
1604
|
-
|
|
1996
|
+
const d = q(), [b, u] = Ee(e ?? []), f = async () => {
|
|
1997
|
+
const w = await l();
|
|
1998
|
+
u((y) => [...y, ...w]);
|
|
1999
|
+
}, g = (w) => {
|
|
2000
|
+
u((y) => y.filter((V) => V.id !== w));
|
|
2001
|
+
}, C = b.map((w) => w.id), I = b.length > 0 && !c;
|
|
2002
|
+
return /* @__PURE__ */ S(h, { direction: "column", gap: "medium", children: [
|
|
2003
|
+
b.length > 0 && /* @__PURE__ */ r(h, { direction: "column", gap: "x-small", children: b.map((w) => /* @__PURE__ */ r(
|
|
2004
|
+
K,
|
|
1605
2005
|
{
|
|
1606
2006
|
as: "div",
|
|
1607
2007
|
padding: "small",
|
|
1608
2008
|
borderWidth: "small",
|
|
1609
2009
|
borderColor: "primary",
|
|
1610
2010
|
borderRadius: "medium",
|
|
1611
|
-
children: /* @__PURE__ */
|
|
1612
|
-
/* @__PURE__ */
|
|
1613
|
-
/* @__PURE__ */
|
|
1614
|
-
|
|
2011
|
+
children: /* @__PURE__ */ S(h, { justifyItems: "space-between", alignItems: "center", children: [
|
|
2012
|
+
/* @__PURE__ */ r(_, { children: w.name }),
|
|
2013
|
+
/* @__PURE__ */ r(
|
|
2014
|
+
$,
|
|
1615
2015
|
{
|
|
1616
2016
|
size: "small",
|
|
1617
|
-
renderIcon: () => /* @__PURE__ */
|
|
1618
|
-
onClick: () => g(
|
|
1619
|
-
children: /* @__PURE__ */
|
|
2017
|
+
renderIcon: () => /* @__PURE__ */ r(qn, {}),
|
|
2018
|
+
onClick: () => g(w.id),
|
|
2019
|
+
children: /* @__PURE__ */ S("span", { className: "screenreader-only", children: [
|
|
1620
2020
|
"Remove ",
|
|
1621
|
-
|
|
2021
|
+
w.name
|
|
1622
2022
|
] })
|
|
1623
2023
|
}
|
|
1624
2024
|
)
|
|
1625
2025
|
] })
|
|
1626
2026
|
},
|
|
1627
|
-
|
|
2027
|
+
w.id
|
|
1628
2028
|
)) }),
|
|
1629
|
-
/* @__PURE__ */
|
|
1630
|
-
/* @__PURE__ */
|
|
1631
|
-
/* @__PURE__ */
|
|
1632
|
-
|
|
2029
|
+
/* @__PURE__ */ r($, { onClick: f, children: d.submissionFormAddFiles() }),
|
|
2030
|
+
/* @__PURE__ */ S(h, { gap: "small", children: [
|
|
2031
|
+
/* @__PURE__ */ r(
|
|
2032
|
+
$,
|
|
1633
2033
|
{
|
|
1634
2034
|
color: "primary",
|
|
1635
|
-
onClick: () =>
|
|
2035
|
+
onClick: () => n(C),
|
|
1636
2036
|
interaction: I ? "enabled" : "disabled",
|
|
1637
|
-
children:
|
|
2037
|
+
children: d.submissionFormSubmit()
|
|
1638
2038
|
}
|
|
1639
2039
|
),
|
|
1640
|
-
o && /* @__PURE__ */
|
|
1641
|
-
|
|
2040
|
+
o && /* @__PURE__ */ r(
|
|
2041
|
+
$,
|
|
1642
2042
|
{
|
|
1643
|
-
onClick: () => o(
|
|
2043
|
+
onClick: () => o(C),
|
|
1644
2044
|
interaction: b.length > 0 ? "enabled" : "disabled",
|
|
1645
|
-
children:
|
|
2045
|
+
children: d.submissionFormSaveDraft()
|
|
1646
2046
|
}
|
|
1647
2047
|
),
|
|
1648
|
-
|
|
2048
|
+
a && e && e.length > 0 && /* @__PURE__ */ r($, { color: "primary-inverse", onClick: a, children: d.submissionFormDiscardDraft() })
|
|
1649
2049
|
] })
|
|
1650
2050
|
] });
|
|
1651
2051
|
}
|
|
1652
|
-
function
|
|
1653
|
-
prevItem:
|
|
1654
|
-
nextItem:
|
|
2052
|
+
function Vo({
|
|
2053
|
+
prevItem: e,
|
|
2054
|
+
nextItem: n,
|
|
1655
2055
|
onNavigatePrev: o,
|
|
1656
|
-
onNavigateNext:
|
|
2056
|
+
onNavigateNext: a,
|
|
1657
2057
|
labels: l
|
|
1658
2058
|
}) {
|
|
1659
|
-
const c =
|
|
1660
|
-
if (!
|
|
2059
|
+
const c = q();
|
|
2060
|
+
if (!e && !n)
|
|
1661
2061
|
return null;
|
|
1662
|
-
const
|
|
1663
|
-
return /* @__PURE__ */
|
|
1664
|
-
|
|
1665
|
-
|
|
2062
|
+
const d = (l == null ? void 0 : l.previous) ?? c.navigationPrevious(), b = (l == null ? void 0 : l.next) ?? c.navigationNext();
|
|
2063
|
+
return /* @__PURE__ */ S(h, { justifyItems: "space-between", padding: "small none", children: [
|
|
2064
|
+
e ? /* @__PURE__ */ r(
|
|
2065
|
+
$,
|
|
1666
2066
|
{
|
|
1667
|
-
renderIcon: () => /* @__PURE__ */
|
|
2067
|
+
renderIcon: () => /* @__PURE__ */ r(pn, {}),
|
|
1668
2068
|
onClick: o,
|
|
1669
|
-
"aria-label": `${
|
|
1670
|
-
children:
|
|
2069
|
+
"aria-label": `${d}: ${e.title}`,
|
|
2070
|
+
children: d
|
|
1671
2071
|
}
|
|
1672
|
-
) : /* @__PURE__ */
|
|
1673
|
-
|
|
1674
|
-
|
|
2072
|
+
) : /* @__PURE__ */ r("div", {}),
|
|
2073
|
+
n ? /* @__PURE__ */ r(
|
|
2074
|
+
$,
|
|
1675
2075
|
{
|
|
1676
|
-
renderIcon: () => /* @__PURE__ */
|
|
1677
|
-
onClick:
|
|
1678
|
-
"aria-label": `${b}: ${
|
|
2076
|
+
renderIcon: () => /* @__PURE__ */ r(gn, {}),
|
|
2077
|
+
onClick: a,
|
|
2078
|
+
"aria-label": `${b}: ${n.title}`,
|
|
1679
2079
|
children: b
|
|
1680
2080
|
}
|
|
1681
|
-
) : /* @__PURE__ */
|
|
2081
|
+
) : /* @__PURE__ */ r("div", {})
|
|
1682
2082
|
] });
|
|
1683
2083
|
}
|
|
1684
|
-
function
|
|
1685
|
-
switch (
|
|
2084
|
+
function bo(e) {
|
|
2085
|
+
switch (e) {
|
|
1686
2086
|
case "Assignment":
|
|
1687
|
-
return /* @__PURE__ */
|
|
2087
|
+
return /* @__PURE__ */ r(Zn, {});
|
|
1688
2088
|
case "Quiz":
|
|
1689
|
-
return /* @__PURE__ */
|
|
2089
|
+
return /* @__PURE__ */ r(Kn, {});
|
|
1690
2090
|
case "Discussion":
|
|
1691
|
-
return /* @__PURE__ */
|
|
2091
|
+
return /* @__PURE__ */ r(Xn, {});
|
|
1692
2092
|
case "Page":
|
|
1693
|
-
return /* @__PURE__ */
|
|
2093
|
+
return /* @__PURE__ */ r(Kt, {});
|
|
1694
2094
|
case "ExternalUrl":
|
|
1695
2095
|
case "ExternalTool":
|
|
1696
|
-
return /* @__PURE__ */
|
|
2096
|
+
return /* @__PURE__ */ r(Vn, {});
|
|
1697
2097
|
default:
|
|
1698
|
-
return /* @__PURE__ */
|
|
2098
|
+
return /* @__PURE__ */ r(Kt, {});
|
|
1699
2099
|
}
|
|
1700
2100
|
}
|
|
1701
|
-
function
|
|
1702
|
-
item:
|
|
1703
|
-
isSelected:
|
|
2101
|
+
function To({
|
|
2102
|
+
item: e,
|
|
2103
|
+
isSelected: n,
|
|
1704
2104
|
isLoadingItem: o,
|
|
1705
|
-
onClick:
|
|
2105
|
+
onClick: a
|
|
1706
2106
|
}) {
|
|
1707
|
-
var
|
|
1708
|
-
const l =
|
|
1709
|
-
|
|
2107
|
+
var u, f, g, C, I;
|
|
2108
|
+
const l = q(), c = ((u = e.content_details) == null ? void 0 : u.locked_for_user) ?? !1, d = (f = e.content_details) == null ? void 0 : f.lock_explanation, b = /* @__PURE__ */ r(
|
|
2109
|
+
K,
|
|
1710
2110
|
{
|
|
1711
2111
|
as: "div",
|
|
1712
2112
|
padding: "small",
|
|
1713
|
-
background:
|
|
2113
|
+
background: n ? "secondary" : "primary",
|
|
1714
2114
|
borderRadius: "small",
|
|
1715
2115
|
cursor: c ? "not-allowed" : "pointer",
|
|
1716
|
-
onClick: c ? void 0 :
|
|
2116
|
+
onClick: c ? void 0 : a,
|
|
1717
2117
|
role: c ? void 0 : "button",
|
|
1718
2118
|
tabIndex: c ? void 0 : 0,
|
|
1719
|
-
onKeyDown: c ? void 0 : (
|
|
1720
|
-
(
|
|
2119
|
+
onKeyDown: c ? void 0 : (w) => {
|
|
2120
|
+
(w.key === "Enter" || w.key === " ") && (w.preventDefault(), a());
|
|
1721
2121
|
},
|
|
1722
|
-
children: /* @__PURE__ */
|
|
1723
|
-
/* @__PURE__ */
|
|
1724
|
-
/* @__PURE__ */
|
|
1725
|
-
/* @__PURE__ */
|
|
1726
|
-
((g =
|
|
1727
|
-
date: new Date(
|
|
2122
|
+
children: /* @__PURE__ */ S(h, { gap: "small", alignItems: "center", children: [
|
|
2123
|
+
/* @__PURE__ */ r(h.Item, { children: c ? /* @__PURE__ */ r(hn, {}) : bo(e.type) }),
|
|
2124
|
+
/* @__PURE__ */ r(h.Item, { shouldGrow: !0, shouldShrink: !0, children: /* @__PURE__ */ S(h, { direction: "column", gap: "xx-small", children: [
|
|
2125
|
+
/* @__PURE__ */ r(_, { weight: n ? "bold" : "normal", size: "small", children: e.title }),
|
|
2126
|
+
((g = e.content_details) == null ? void 0 : g.due_at) && /* @__PURE__ */ r(_, { size: "x-small", color: "secondary", children: l.progressDueDate({
|
|
2127
|
+
date: new Date(e.content_details.due_at).toLocaleDateString()
|
|
1728
2128
|
}) }),
|
|
1729
|
-
((
|
|
2129
|
+
((C = e.content_details) == null ? void 0 : C.points_possible) != null && /* @__PURE__ */ r(_, { size: "x-small", color: "secondary", children: l.progressPoints({ points: e.content_details.points_possible }) })
|
|
1730
2130
|
] }) }),
|
|
1731
|
-
o && /* @__PURE__ */
|
|
1732
|
-
((I =
|
|
2131
|
+
o && /* @__PURE__ */ r(Ye, { size: "x-small", renderTitle: l.progressLoading() }),
|
|
2132
|
+
((I = e.completion_requirement) == null ? void 0 : I.completed) && /* @__PURE__ */ r(_, { color: "success", size: "small", children: "✓" })
|
|
1733
2133
|
] })
|
|
1734
2134
|
}
|
|
1735
2135
|
);
|
|
1736
|
-
return c &&
|
|
2136
|
+
return c && d ? /* @__PURE__ */ r(ei, { renderTip: d, placement: "end", children: b }) : b;
|
|
1737
2137
|
}
|
|
1738
|
-
function
|
|
1739
|
-
module:
|
|
1740
|
-
currentItemId:
|
|
2138
|
+
function Xo({
|
|
2139
|
+
module: e,
|
|
2140
|
+
currentItemId: n,
|
|
1741
2141
|
onItemClick: o,
|
|
1742
|
-
onClose:
|
|
2142
|
+
onClose: a,
|
|
1743
2143
|
onNavigateModule: l,
|
|
1744
2144
|
hasPrevModule: c = !1,
|
|
1745
|
-
hasNextModule:
|
|
2145
|
+
hasNextModule: d = !1,
|
|
1746
2146
|
isLoading: b = !1,
|
|
1747
|
-
title:
|
|
2147
|
+
title: u
|
|
1748
2148
|
}) {
|
|
1749
|
-
var
|
|
1750
|
-
const
|
|
1751
|
-
return /* @__PURE__ */
|
|
1752
|
-
/* @__PURE__ */
|
|
1753
|
-
/* @__PURE__ */
|
|
1754
|
-
/* @__PURE__ */
|
|
2149
|
+
var C;
|
|
2150
|
+
const f = q(), g = u ?? f.navigationMyProgress();
|
|
2151
|
+
return /* @__PURE__ */ S(h, { direction: "column", height: "100%", children: [
|
|
2152
|
+
/* @__PURE__ */ S(h, { justifyItems: "space-between", alignItems: "center", padding: "small", children: [
|
|
2153
|
+
/* @__PURE__ */ r(St, { level: "h3", children: g }),
|
|
2154
|
+
/* @__PURE__ */ r(Jn, { screenReaderLabel: f.navigationClosePanel(), onClick: a, size: "small", children: /* @__PURE__ */ r(Yn, {}) })
|
|
1755
2155
|
] }),
|
|
1756
|
-
/* @__PURE__ */
|
|
1757
|
-
|
|
1758
|
-
/* @__PURE__ */
|
|
2156
|
+
/* @__PURE__ */ S(K, { as: "div", padding: "none small", overflowY: "auto", children: [
|
|
2157
|
+
e.state === "locked" && /* @__PURE__ */ r(h, { padding: "none none small", children: /* @__PURE__ */ S(_t, { color: "warning", children: [
|
|
2158
|
+
/* @__PURE__ */ r(hn, {}),
|
|
1759
2159
|
" ",
|
|
1760
|
-
|
|
2160
|
+
f.progressLocked()
|
|
1761
2161
|
] }) }),
|
|
1762
|
-
/* @__PURE__ */
|
|
1763
|
-
/* @__PURE__ */
|
|
1764
|
-
|
|
2162
|
+
/* @__PURE__ */ r(_, { weight: "bold", size: "medium", children: e.name }),
|
|
2163
|
+
/* @__PURE__ */ r(h, { direction: "column", gap: "xx-small", padding: "small none", children: (C = e.items) == null ? void 0 : C.map((I) => /* @__PURE__ */ r(
|
|
2164
|
+
To,
|
|
1765
2165
|
{
|
|
1766
2166
|
item: I,
|
|
1767
|
-
isSelected: I.id ===
|
|
1768
|
-
isLoadingItem: b && I.id ===
|
|
2167
|
+
isSelected: I.id === n,
|
|
2168
|
+
isLoadingItem: b && I.id === n,
|
|
1769
2169
|
onClick: () => o(I)
|
|
1770
2170
|
},
|
|
1771
2171
|
I.id
|
|
1772
2172
|
)) })
|
|
1773
2173
|
] }),
|
|
1774
|
-
l && /* @__PURE__ */
|
|
1775
|
-
/* @__PURE__ */
|
|
1776
|
-
|
|
2174
|
+
l && /* @__PURE__ */ S(h, { justifyItems: "space-between", padding: "small", children: [
|
|
2175
|
+
/* @__PURE__ */ r(
|
|
2176
|
+
$,
|
|
1777
2177
|
{
|
|
1778
|
-
renderIcon: () => /* @__PURE__ */
|
|
2178
|
+
renderIcon: () => /* @__PURE__ */ r(pn, {}),
|
|
1779
2179
|
size: "small",
|
|
1780
2180
|
interaction: c ? "enabled" : "disabled",
|
|
1781
2181
|
onClick: () => l("prev"),
|
|
1782
|
-
"aria-label":
|
|
1783
|
-
children:
|
|
2182
|
+
"aria-label": f.navigationPreviousModule(),
|
|
2183
|
+
children: f.navigationPrevious()
|
|
1784
2184
|
}
|
|
1785
2185
|
),
|
|
1786
|
-
/* @__PURE__ */
|
|
1787
|
-
|
|
2186
|
+
/* @__PURE__ */ r(
|
|
2187
|
+
$,
|
|
1788
2188
|
{
|
|
1789
|
-
renderIcon: () => /* @__PURE__ */
|
|
2189
|
+
renderIcon: () => /* @__PURE__ */ r(gn, {}),
|
|
1790
2190
|
size: "small",
|
|
1791
|
-
interaction:
|
|
2191
|
+
interaction: d ? "enabled" : "disabled",
|
|
1792
2192
|
onClick: () => l("next"),
|
|
1793
|
-
"aria-label":
|
|
1794
|
-
children:
|
|
2193
|
+
"aria-label": f.navigationNextModule(),
|
|
2194
|
+
children: f.navigationNext()
|
|
1795
2195
|
}
|
|
1796
2196
|
)
|
|
1797
2197
|
] })
|
|
1798
2198
|
] });
|
|
1799
2199
|
}
|
|
1800
|
-
function
|
|
1801
|
-
existingDraft:
|
|
1802
|
-
onSubmit:
|
|
2200
|
+
function Ko({
|
|
2201
|
+
existingDraft: e,
|
|
2202
|
+
onSubmit: n,
|
|
1803
2203
|
onSaveDraft: o,
|
|
1804
|
-
onDiscardDraft:
|
|
2204
|
+
onDiscardDraft: a,
|
|
1805
2205
|
isSubmitting: l = !1
|
|
1806
2206
|
}) {
|
|
1807
|
-
const c =
|
|
1808
|
-
return /* @__PURE__ */
|
|
1809
|
-
/* @__PURE__ */
|
|
1810
|
-
|
|
2207
|
+
const c = q(), [d, b] = Ee(e ?? ""), u = d.trim().length > 0 && !l;
|
|
2208
|
+
return /* @__PURE__ */ S(h, { direction: "column", gap: "medium", children: [
|
|
2209
|
+
/* @__PURE__ */ r(
|
|
2210
|
+
Tn,
|
|
1811
2211
|
{
|
|
1812
2212
|
label: c.submissionTextHeading(),
|
|
1813
|
-
value:
|
|
1814
|
-
onChange: (
|
|
2213
|
+
value: d,
|
|
2214
|
+
onChange: (f) => b(f.target.value),
|
|
1815
2215
|
resize: "vertical",
|
|
1816
2216
|
height: "200px"
|
|
1817
2217
|
}
|
|
1818
2218
|
),
|
|
1819
|
-
/* @__PURE__ */
|
|
1820
|
-
/* @__PURE__ */
|
|
1821
|
-
|
|
2219
|
+
/* @__PURE__ */ S(h, { gap: "small", children: [
|
|
2220
|
+
/* @__PURE__ */ r(
|
|
2221
|
+
$,
|
|
1822
2222
|
{
|
|
1823
2223
|
color: "primary",
|
|
1824
|
-
onClick: () =>
|
|
1825
|
-
interaction:
|
|
2224
|
+
onClick: () => n(d),
|
|
2225
|
+
interaction: u ? "enabled" : "disabled",
|
|
1826
2226
|
children: c.submissionFormSubmit()
|
|
1827
2227
|
}
|
|
1828
2228
|
),
|
|
1829
|
-
o && /* @__PURE__ */
|
|
1830
|
-
|
|
2229
|
+
o && /* @__PURE__ */ r(
|
|
2230
|
+
$,
|
|
1831
2231
|
{
|
|
1832
|
-
onClick: () => o(
|
|
1833
|
-
interaction:
|
|
2232
|
+
onClick: () => o(d),
|
|
2233
|
+
interaction: d.trim().length > 0 ? "enabled" : "disabled",
|
|
1834
2234
|
children: c.submissionFormSaveDraft()
|
|
1835
2235
|
}
|
|
1836
2236
|
),
|
|
1837
|
-
|
|
2237
|
+
a && e && /* @__PURE__ */ r($, { color: "primary-inverse", onClick: a, children: c.submissionFormDiscardDraft() })
|
|
1838
2238
|
] })
|
|
1839
2239
|
] });
|
|
1840
2240
|
}
|
|
1841
|
-
function
|
|
1842
|
-
unreadCount:
|
|
2241
|
+
function Zo({
|
|
2242
|
+
unreadCount: e
|
|
1843
2243
|
}) {
|
|
1844
|
-
const
|
|
1845
|
-
if (
|
|
2244
|
+
const n = q();
|
|
2245
|
+
if (e === 0)
|
|
1846
2246
|
return null;
|
|
1847
|
-
const o =
|
|
1848
|
-
return /* @__PURE__ */
|
|
2247
|
+
const o = e === 1 ? n.commentsUnreadSingle() : n.commentsUnread({ count: e });
|
|
2248
|
+
return /* @__PURE__ */ r(yn, { count: e, standalone: !0, children: /* @__PURE__ */ r(Et, { children: o }) });
|
|
1849
2249
|
}
|
|
1850
|
-
function
|
|
1851
|
-
courseId:
|
|
1852
|
-
moduleItemId:
|
|
2250
|
+
function Qo({
|
|
2251
|
+
courseId: e,
|
|
2252
|
+
moduleItemId: n,
|
|
1853
2253
|
fetchSequence: o,
|
|
1854
|
-
enabled:
|
|
2254
|
+
enabled: a = !0
|
|
1855
2255
|
}) {
|
|
1856
|
-
return
|
|
1857
|
-
queryKey: ["assignment-review", "module-item-sequence",
|
|
1858
|
-
queryFn: () => o(
|
|
1859
|
-
enabled:
|
|
2256
|
+
return Ve({
|
|
2257
|
+
queryKey: ["assignment-review", "module-item-sequence", e, n],
|
|
2258
|
+
queryFn: () => o(e, n),
|
|
2259
|
+
enabled: a && !!n
|
|
1860
2260
|
});
|
|
1861
2261
|
}
|
|
1862
2262
|
export {
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
2263
|
+
Gi as AssignmentResponseSchema,
|
|
2264
|
+
qo as AssignmentReview,
|
|
2265
|
+
Ji as AttemptCard,
|
|
2266
|
+
no as AttemptView,
|
|
2267
|
+
eo as AttemptsHistory,
|
|
2268
|
+
Bo as CREATE_SUBMISSION,
|
|
2269
|
+
so as CREATE_SUBMISSION_COMMENT,
|
|
2270
|
+
Go as CREATE_SUBMISSION_DRAFT,
|
|
2271
|
+
po as CommentCard,
|
|
2272
|
+
Vi as CreateSubmissionCommentResponseSchema,
|
|
2273
|
+
Ho as CreateSubmissionDraftResponseSchema,
|
|
2274
|
+
jo as CreateSubmissionResponseSchema,
|
|
2275
|
+
Wo as DELETE_SUBMISSION_DRAFT,
|
|
2276
|
+
$o as DeleteSubmissionDraftResponseSchema,
|
|
2277
|
+
Cn as DownloadButtons,
|
|
2278
|
+
Yo as FileUploadSubmissionForm,
|
|
2279
|
+
Ui as GET_ASSIGNMENT,
|
|
2280
|
+
ji as GET_SUBMISSIONS,
|
|
2281
|
+
zi as GET_SUBMISSION_COMMENTS,
|
|
2282
|
+
ro as LearningContentHeader,
|
|
2283
|
+
ao as MARK_SUBMISSION_COMMENTS_READ,
|
|
2284
|
+
Xi as MarkSubmissionCommentsReadResponseSchema,
|
|
2285
|
+
Vo as ModuleNavigation,
|
|
2286
|
+
Xo as MyProgressPanel,
|
|
2287
|
+
go as SubmissionComments,
|
|
2288
|
+
zo as SubmissionCommentsDataSchema,
|
|
2289
|
+
Wi as SubmissionCommentsQueryResponseSchema,
|
|
2290
|
+
Yi as SubmissionsQueryResponseSchema,
|
|
2291
|
+
Ko as TextEntrySubmissionForm,
|
|
2292
|
+
Uo as TranslationsProvider,
|
|
2293
|
+
Zo as UnreadCommentsBadge,
|
|
2294
|
+
lo as useCreateSubmissionComment,
|
|
2295
|
+
Ki as useGetAssignment,
|
|
2296
|
+
co as useGetSubmissionComments,
|
|
2297
|
+
Zi as useGetSubmissions,
|
|
2298
|
+
mo as useMarkSubmissionCommentsRead,
|
|
2299
|
+
Qo as useModuleItemSequence,
|
|
2300
|
+
q as useTranslations
|
|
1901
2301
|
};
|