@pie-qti/player-elements 0.1.20 → 0.1.21

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.
Files changed (50) hide show
  1. package/dist/{define-BwFVHv-A.js → define-XpbOHJoz.js} +29 -19
  2. package/dist/define-XpbOHJoz.js.map +1 -0
  3. package/dist/{dist-oe9UH-A2.js → dist-4hIHy9-L.js} +583 -628
  4. package/dist/dist-4hIHy9-L.js.map +1 -0
  5. package/dist/dist-Nkkk25AH.js +1275 -0
  6. package/dist/dist-Nkkk25AH.js.map +1 -0
  7. package/dist/{element-BiInkn5Q.js → element-DNnKo2Uk.js} +2 -2
  8. package/dist/{element-BiInkn5Q.js.map → element-DNnKo2Uk.js.map} +1 -1
  9. package/dist/{element-class-CILJ4Ls7-rJWb-Gwb.js → element-class-iN9MRyjF-D6u8ACFm.js} +1829 -1811
  10. package/dist/{element-class-CILJ4Ls7-rJWb-Gwb.js.map → element-class-iN9MRyjF-D6u8ACFm.js.map} +1 -1
  11. package/dist/elements.js +3 -3
  12. package/dist/index.js +2 -2
  13. package/dist/item-toolbar-element-3k36WOlC.js +6086 -0
  14. package/dist/item-toolbar-element-3k36WOlC.js.map +1 -0
  15. package/dist/{mathlive.min-DeR46YTX-D-KAmiue.js → mathlive.min-DeR46YTX-DamfKay_.js} +1 -1
  16. package/dist/{mathlive.min-DeR46YTX-D-KAmiue.js.map → mathlive.min-DeR46YTX-DamfKay_.js.map} +1 -1
  17. package/dist/pie-assessment-toolkit-element-CP-OMtE6.js +28516 -0
  18. package/dist/pie-assessment-toolkit-element-CP-OMtE6.js.map +1 -0
  19. package/dist/pie-tool-calculator-VzYEjxiY.js +2309 -0
  20. package/dist/pie-tool-calculator-VzYEjxiY.js.map +1 -0
  21. package/dist/register-players.js +1 -1
  22. package/dist/register.js +7 -6
  23. package/dist/register.js.map +1 -1
  24. package/dist/{resolveItems-DHNyVysE.js → resolveItems-hMDtJOXa.js} +2 -2
  25. package/dist/{resolveItems-DHNyVysE.js.map → resolveItems-hMDtJOXa.js.map} +1 -1
  26. package/dist/{root-CYGgRw16.js → root--0fyaoNu.js} +3 -3
  27. package/dist/root--0fyaoNu.js.map +1 -0
  28. package/dist/{sre-CgK32OcY.js → sre-CFPLI6BY.js} +1 -1
  29. package/dist/{sre-CgK32OcY.js.map → sre-CFPLI6BY.js.map} +1 -1
  30. package/dist/{tag-names-OgMDHLpx.js → tag-names-ClLtKtXt.js} +2 -2
  31. package/dist/tag-names-ClLtKtXt.js.map +1 -0
  32. package/dist/tool-tts-inline-B-xT_sdY.js +2641 -0
  33. package/dist/tool-tts-inline-B-xT_sdY.js.map +1 -0
  34. package/package.json +6 -6
  35. package/dist/define-BwFVHv-A.js.map +0 -1
  36. package/dist/dist-DswyTalX.js +0 -6731
  37. package/dist/dist-DswyTalX.js.map +0 -1
  38. package/dist/dist-oe9UH-A2.js.map +0 -1
  39. package/dist/item-toolbar-element-t_zI1vE6.js +0 -1892
  40. package/dist/item-toolbar-element-t_zI1vE6.js.map +0 -1
  41. package/dist/pie-assessment-toolkit-element-RzBk8WVs.js +0 -7113
  42. package/dist/pie-assessment-toolkit-element-RzBk8WVs.js.map +0 -1
  43. package/dist/pie-tool-calculator-GW-LhvB_.js +0 -6905
  44. package/dist/pie-tool-calculator-GW-LhvB_.js.map +0 -1
  45. package/dist/root-CYGgRw16.js.map +0 -1
  46. package/dist/sre-Dz5gsR-A.js +0 -17220
  47. package/dist/sre-Dz5gsR-A.js.map +0 -1
  48. package/dist/tag-names-OgMDHLpx.js.map +0 -1
  49. package/dist/tool-tts-inline-drDEIti_.js +0 -3724
  50. package/dist/tool-tts-inline-drDEIti_.js.map +0 -1
@@ -0,0 +1,1275 @@
1
+ import "./tag-names-ClLtKtXt.js";
2
+ //#region ../../node_modules/.bun/dompurify@3.4.13/node_modules/dompurify/dist/purify.es.mjs
3
+ function e(e, t) {
4
+ (t == null || t > e.length) && (t = e.length);
5
+ for (var n = 0, r = Array(t); n < t; n++) r[n] = e[n];
6
+ return r;
7
+ }
8
+ function t(e) {
9
+ if (Array.isArray(e)) return e;
10
+ }
11
+ function n(e, t) {
12
+ var n = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
13
+ if (n != null) {
14
+ var r, i, a, o, s = [], c = !0, l = !1;
15
+ try {
16
+ if (a = (n = n.call(e)).next, t !== 0) for (; !(c = (r = a.call(n)).done) && (s.push(r.value), s.length !== t); c = !0);
17
+ } catch (e) {
18
+ l = !0, i = e;
19
+ } finally {
20
+ try {
21
+ if (!c && n.return != null && (o = n.return(), Object(o) !== o)) return;
22
+ } finally {
23
+ if (l) throw i;
24
+ }
25
+ }
26
+ return s;
27
+ }
28
+ }
29
+ function r() {
30
+ throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
31
+ }
32
+ function i(e, i) {
33
+ return t(e) || n(e, i) || a(e, i) || r();
34
+ }
35
+ function a(t, n) {
36
+ if (t) {
37
+ if (typeof t == "string") return e(t, n);
38
+ var r = {}.toString.call(t).slice(8, -1);
39
+ return r === "Object" && t.constructor && (r = t.constructor.name), r === "Map" || r === "Set" ? Array.from(t) : r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? e(t, n) : void 0;
40
+ }
41
+ }
42
+ var o = Object.entries, s = Object.setPrototypeOf, c = Object.isFrozen, l = Object.getPrototypeOf, u = Object.getOwnPropertyDescriptor, d = Object.freeze, f = Object.seal, p = Object.create, ee = typeof Reflect < "u" && Reflect, m = ee.apply, te = ee.construct;
43
+ d ||= function(e) {
44
+ return e;
45
+ }, f ||= function(e) {
46
+ return e;
47
+ }, m ||= function(e, t) {
48
+ var n = [...arguments].slice(2);
49
+ return e.apply(t, n);
50
+ }, te ||= function(e) {
51
+ return new e(...[...arguments].slice(1));
52
+ };
53
+ var ne = S(Array.prototype.forEach), re = S(Array.prototype.lastIndexOf), ie = S(Array.prototype.pop), ae = S(Array.prototype.push), oe = S(Array.prototype.splice), h = Array.isArray, se = S(String.prototype.toLowerCase), ce = S(String.prototype.toString), le = S(String.prototype.match), ue = S(String.prototype.replace), de = S(String.prototype.indexOf), fe = S(String.prototype.trim), pe = S(Number.prototype.toString), me = S(Boolean.prototype.toString), g = typeof BigInt > "u" ? null : S(BigInt.prototype.toString), _ = typeof Symbol > "u" ? null : S(Symbol.prototype.toString), v = S(Object.prototype.hasOwnProperty), y = S(Object.prototype.toString), b = S(RegExp.prototype.test), x = C(TypeError);
54
+ function S(e) {
55
+ return function(t) {
56
+ t instanceof RegExp && (t.lastIndex = 0);
57
+ var n = [...arguments].slice(1);
58
+ return m(e, t, n);
59
+ };
60
+ }
61
+ function C(e) {
62
+ return function() {
63
+ return te(e, [...arguments]);
64
+ };
65
+ }
66
+ function w(e, t) {
67
+ let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : se;
68
+ if (s && s(e, null), !h(t)) return e;
69
+ let r = t.length;
70
+ for (; r--;) {
71
+ let i = t[r];
72
+ if (typeof i == "string") {
73
+ let e = n(i);
74
+ e !== i && (c(t) || (t[r] = e), i = e);
75
+ }
76
+ e[i] = !0;
77
+ }
78
+ return e;
79
+ }
80
+ function T(e) {
81
+ for (let t = 0; t < e.length; t++) v(e, t) || (e[t] = null);
82
+ return e;
83
+ }
84
+ function E(e) {
85
+ let t = p(null);
86
+ for (let r of o(e)) {
87
+ var n = i(r, 2);
88
+ let a = n[0], o = n[1];
89
+ v(e, a) && (h(o) ? t[a] = T(o) : o && typeof o == "object" && o.constructor === Object ? t[a] = E(o) : t[a] = o);
90
+ }
91
+ return t;
92
+ }
93
+ function he(e) {
94
+ switch (typeof e) {
95
+ case "string": return e;
96
+ case "number": return pe(e);
97
+ case "boolean": return me(e);
98
+ case "bigint": return g ? g(e) : "0";
99
+ case "symbol": return _ ? _(e) : "Symbol()";
100
+ case "undefined": return y(e);
101
+ case "function":
102
+ case "object": {
103
+ if (e === null) return y(e);
104
+ let t = e, n = D(t, "toString");
105
+ if (typeof n == "function") {
106
+ let e = n(t);
107
+ return typeof e == "string" ? e : y(e);
108
+ }
109
+ return y(e);
110
+ }
111
+ default: return y(e);
112
+ }
113
+ }
114
+ function D(e, t) {
115
+ for (; e !== null;) {
116
+ let n = u(e, t);
117
+ if (n) {
118
+ if (n.get) return S(n.get);
119
+ if (typeof n.value == "function") return S(n.value);
120
+ }
121
+ e = l(e);
122
+ }
123
+ function n() {
124
+ return null;
125
+ }
126
+ return n;
127
+ }
128
+ function ge(e) {
129
+ try {
130
+ return b(e, ""), !0;
131
+ } catch {
132
+ return !1;
133
+ }
134
+ }
135
+ var _e = d(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr".split(".")), ve = d(/* @__PURE__ */ "svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern".split(".")), ye = d([
136
+ "feBlend",
137
+ "feColorMatrix",
138
+ "feComponentTransfer",
139
+ "feComposite",
140
+ "feConvolveMatrix",
141
+ "feDiffuseLighting",
142
+ "feDisplacementMap",
143
+ "feDistantLight",
144
+ "feDropShadow",
145
+ "feFlood",
146
+ "feFuncA",
147
+ "feFuncB",
148
+ "feFuncG",
149
+ "feFuncR",
150
+ "feGaussianBlur",
151
+ "feImage",
152
+ "feMerge",
153
+ "feMergeNode",
154
+ "feMorphology",
155
+ "feOffset",
156
+ "fePointLight",
157
+ "feSpecularLighting",
158
+ "feSpotLight",
159
+ "feTile",
160
+ "feTurbulence"
161
+ ]), be = d([
162
+ "animate",
163
+ "color-profile",
164
+ "cursor",
165
+ "discard",
166
+ "font-face",
167
+ "font-face-format",
168
+ "font-face-name",
169
+ "font-face-src",
170
+ "font-face-uri",
171
+ "foreignobject",
172
+ "hatch",
173
+ "hatchpath",
174
+ "mesh",
175
+ "meshgradient",
176
+ "meshpatch",
177
+ "meshrow",
178
+ "missing-glyph",
179
+ "script",
180
+ "set",
181
+ "solidcolor",
182
+ "unknown",
183
+ "use"
184
+ ]), xe = d(/* @__PURE__ */ "math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts".split(".")), Se = d([
185
+ "maction",
186
+ "maligngroup",
187
+ "malignmark",
188
+ "mlongdiv",
189
+ "mscarries",
190
+ "mscarry",
191
+ "msgroup",
192
+ "mstack",
193
+ "msline",
194
+ "msrow",
195
+ "semantics",
196
+ "annotation",
197
+ "annotation-xml",
198
+ "mprescripts",
199
+ "none"
200
+ ]), Ce = d(["#text"]), we = d(/* @__PURE__ */ "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".split(".")), Te = d(/* @__PURE__ */ "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.dominant-baseline.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-orientation.text-rendering.textlength.type.u1.u2.unicode.values.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan".split(".")), Ee = d(/* @__PURE__ */ "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".split(".")), De = d([
201
+ "xlink:href",
202
+ "xml:id",
203
+ "xlink:title",
204
+ "xml:space",
205
+ "xmlns:xlink"
206
+ ]), Oe = f(/{{[\w\W]*|^[\w\W]*}}/g), ke = f(/<%[\w\W]*|^[\w\W]*%>/g), Ae = f(/\${[\w\W]*/g), je = f(/^data-[\-\w.\u00B7-\uFFFF]+$/), Me = f(/^aria-[\-\w]+$/), Ne = f(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i), Pe = f(/^(?:\w+script|data):/i), Fe = f(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g), Ie = f(/^html$/i), Le = f(/^[a-z][.\w]*(-[.\w]+)+$/i), Re = f(/<[/\w!]/g), ze = f(/<[/\w]/g), Be = f(/<\/no(script|embed|frames)/i), Ve = f(/\/>/i), O = {
207
+ element: 1,
208
+ attribute: 2,
209
+ text: 3,
210
+ cdataSection: 4,
211
+ entityReference: 5,
212
+ entityNode: 6,
213
+ processingInstruction: 7,
214
+ comment: 8,
215
+ document: 9,
216
+ documentType: 10,
217
+ documentFragment: 11,
218
+ notation: 12
219
+ }, He = function() {
220
+ return typeof window > "u" ? null : window;
221
+ }, Ue = function(e, t) {
222
+ if (typeof e != "object" || typeof e.createPolicy != "function") return null;
223
+ let n = null, r = "data-tt-policy-suffix";
224
+ t && t.hasAttribute(r) && (n = t.getAttribute(r));
225
+ let i = "dompurify" + (n ? "#" + n : "");
226
+ try {
227
+ return e.createPolicy(i, {
228
+ createHTML(e) {
229
+ return e;
230
+ },
231
+ createScriptURL(e) {
232
+ return e;
233
+ }
234
+ });
235
+ } catch {
236
+ return console.warn("TrustedTypes policy " + i + " could not be created."), null;
237
+ }
238
+ }, We = function() {
239
+ return {
240
+ afterSanitizeAttributes: [],
241
+ afterSanitizeElements: [],
242
+ afterSanitizeShadowDOM: [],
243
+ beforeSanitizeAttributes: [],
244
+ beforeSanitizeElements: [],
245
+ beforeSanitizeShadowDOM: [],
246
+ uponSanitizeAttribute: [],
247
+ uponSanitizeElement: [],
248
+ uponSanitizeShadowNode: []
249
+ };
250
+ }, k = function(e, t, n, r) {
251
+ return v(e, t) && h(e[t]) ? w(r.base ? E(r.base) : {}, e[t], r.transform) : n;
252
+ };
253
+ function Ge() {
254
+ let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : He(), t = (e) => Ge(e);
255
+ if (t.version = "3.4.13", t.removed = [], !e || !e.document || e.document.nodeType !== O.document || !e.Element) return t.isSupported = !1, t;
256
+ let n = e.document, r = n, i = r.currentScript;
257
+ e.DocumentFragment;
258
+ let a = e.HTMLTemplateElement, s = e.Node, c = e.Element, l = e.NodeFilter;
259
+ e.NamedNodeMap === void 0 && (e.NamedNodeMap || e.MozNamedAttrMap), e.HTMLFormElement;
260
+ let u = e.DOMParser, ee = e.trustedTypes, m = c.prototype, te = D(m, "cloneNode"), pe = D(m, "remove"), me = D(m, "nextSibling"), g = D(m, "childNodes"), _ = D(m, "parentNode"), y = D(m, "shadowRoot"), S = D(m, "attributes"), C = s && s.prototype ? D(s.prototype, "nodeType") : null, T = s && s.prototype ? D(s.prototype, "nodeName") : null, A = s && s.prototype ? D(s.prototype, "ownerDocument") : null;
261
+ if (typeof a == "function") {
262
+ let e = n.createElement("template");
263
+ e.content && e.content.ownerDocument && (n = e.content.ownerDocument);
264
+ }
265
+ let j, M = "", Ke, qe = !1, N = 0, Je = function() {
266
+ if (N > 0) throw x("A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the \"DOMPurify and Trusted Types\" section of the README.");
267
+ }, P = function(e) {
268
+ Je(), N++;
269
+ try {
270
+ return j.createHTML(e);
271
+ } finally {
272
+ N--;
273
+ }
274
+ }, Ye = function(e) {
275
+ Je(), N++;
276
+ try {
277
+ return j.createScriptURL(e);
278
+ } finally {
279
+ N--;
280
+ }
281
+ }, Xe = function() {
282
+ return qe ||= (Ke = Ue(ee, i), !0), Ke;
283
+ }, Ze = n, Qe = Ze.implementation, $e = Ze.createNodeIterator, et = Ze.createDocumentFragment, tt = Ze.getElementsByTagName, nt = r.importNode, F = We();
284
+ t.isSupported = typeof o == "function" && typeof _ == "function" && Qe && Qe.createHTMLDocument !== void 0;
285
+ let rt = Oe, it = ke, at = Ae, I = je, L = Me, ot = Pe, st = Fe, ct = Le, lt = Ne, R = null, ut = w({}, [
286
+ ..._e,
287
+ ...ve,
288
+ ...ye,
289
+ ...xe,
290
+ ...Ce
291
+ ]), z = null, dt = w({}, [
292
+ ...we,
293
+ ...Te,
294
+ ...Ee,
295
+ ...De
296
+ ]), B = Object.seal(p(null, {
297
+ tagNameCheck: {
298
+ writable: !0,
299
+ configurable: !1,
300
+ enumerable: !0,
301
+ value: null
302
+ },
303
+ attributeNameCheck: {
304
+ writable: !0,
305
+ configurable: !1,
306
+ enumerable: !0,
307
+ value: null
308
+ },
309
+ allowCustomizedBuiltInElements: {
310
+ writable: !0,
311
+ configurable: !1,
312
+ enumerable: !0,
313
+ value: !1
314
+ }
315
+ })), V = null, ft = null, H = Object.seal(p(null, {
316
+ tagCheck: {
317
+ writable: !0,
318
+ configurable: !1,
319
+ enumerable: !0,
320
+ value: null
321
+ },
322
+ attributeCheck: {
323
+ writable: !0,
324
+ configurable: !1,
325
+ enumerable: !0,
326
+ value: null
327
+ }
328
+ })), pt = !0, mt = !0, ht = !1, gt = !0, U = !1, W = !0, G = !1, _t = !1, vt = null, K = null, yt = !1, q = !1, bt = !1, xt = !1, St = !0, Ct = !1, wt = "user-content-", Tt = !0, Et = !1, Dt = {}, J = null, Ot = w({}, /* @__PURE__ */ "annotation-xml.audio.colgroup.desc.foreignobject.head.iframe.math.mi.mn.mo.ms.mtext.noembed.noframes.noscript.plaintext.script.selectedcontent.style.svg.template.thead.title.video.xmp".split(".")), kt = null, At = w({}, [
329
+ "audio",
330
+ "video",
331
+ "img",
332
+ "source",
333
+ "image",
334
+ "track"
335
+ ]), jt = null, Mt = w({}, [
336
+ "alt",
337
+ "class",
338
+ "for",
339
+ "id",
340
+ "label",
341
+ "name",
342
+ "pattern",
343
+ "placeholder",
344
+ "role",
345
+ "summary",
346
+ "title",
347
+ "value",
348
+ "style",
349
+ "xmlns"
350
+ ]), Nt = "http://www.w3.org/1998/Math/MathML", Pt = "http://www.w3.org/2000/svg", Y = "http://www.w3.org/1999/xhtml", Ft = Y, It = !1, Lt = null, Rt = w({}, [
351
+ Nt,
352
+ Pt,
353
+ Y
354
+ ], ce), zt = d([
355
+ "mi",
356
+ "mo",
357
+ "mn",
358
+ "ms",
359
+ "mtext"
360
+ ]), Bt = w({}, zt), Vt = d(["annotation-xml"]), Ht = w({}, Vt), Ut = w({}, [
361
+ "title",
362
+ "style",
363
+ "font",
364
+ "a",
365
+ "script"
366
+ ]), Wt = null, Gt = ["application/xhtml+xml", "text/html"], X = null, Kt = null, qt = n.createElement("form"), Jt = function(e) {
367
+ return e instanceof RegExp || e instanceof Function;
368
+ }, Yt = function() {
369
+ let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
370
+ if (Kt && Kt === e) return;
371
+ (!e || typeof e != "object") && (e = {}), e = E(e), Wt = Gt.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? "text/html" : e.PARSER_MEDIA_TYPE, X = Wt === "application/xhtml+xml" ? ce : se, R = k(e, "ALLOWED_TAGS", ut, { transform: X }), z = k(e, "ALLOWED_ATTR", dt, { transform: X }), Lt = k(e, "ALLOWED_NAMESPACES", Rt, { transform: ce }), jt = k(e, "ADD_URI_SAFE_ATTR", Mt, {
372
+ transform: X,
373
+ base: Mt
374
+ }), kt = k(e, "ADD_DATA_URI_TAGS", At, {
375
+ transform: X,
376
+ base: At
377
+ }), J = k(e, "FORBID_CONTENTS", Ot, { transform: X }), V = k(e, "FORBID_TAGS", E({}), { transform: X }), ft = k(e, "FORBID_ATTR", E({}), { transform: X }), Dt = v(e, "USE_PROFILES") ? e.USE_PROFILES && typeof e.USE_PROFILES == "object" ? E(e.USE_PROFILES) : e.USE_PROFILES : !1, pt = e.ALLOW_ARIA_ATTR !== !1, mt = e.ALLOW_DATA_ATTR !== !1, ht = e.ALLOW_UNKNOWN_PROTOCOLS || !1, gt = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, U = e.SAFE_FOR_TEMPLATES || !1, W = e.SAFE_FOR_XML !== !1, G = e.WHOLE_DOCUMENT || !1, q = e.RETURN_DOM || !1, bt = e.RETURN_DOM_FRAGMENT || !1, xt = e.RETURN_TRUSTED_TYPE || !1, yt = e.FORCE_BODY || !1, St = e.SANITIZE_DOM !== !1, Ct = e.SANITIZE_NAMED_PROPS || !1, Tt = e.KEEP_CONTENT !== !1, Et = e.IN_PLACE || !1, lt = ge(e.ALLOWED_URI_REGEXP) ? e.ALLOWED_URI_REGEXP : Ne, Ft = typeof e.NAMESPACE == "string" ? e.NAMESPACE : Y, Bt = v(e, "MATHML_TEXT_INTEGRATION_POINTS") && e.MATHML_TEXT_INTEGRATION_POINTS && typeof e.MATHML_TEXT_INTEGRATION_POINTS == "object" ? E(e.MATHML_TEXT_INTEGRATION_POINTS) : w({}, zt), Ht = v(e, "HTML_INTEGRATION_POINTS") && e.HTML_INTEGRATION_POINTS && typeof e.HTML_INTEGRATION_POINTS == "object" ? E(e.HTML_INTEGRATION_POINTS) : w({}, Vt);
378
+ let t = v(e, "CUSTOM_ELEMENT_HANDLING") && e.CUSTOM_ELEMENT_HANDLING && typeof e.CUSTOM_ELEMENT_HANDLING == "object" ? E(e.CUSTOM_ELEMENT_HANDLING) : p(null);
379
+ if (B = p(null), v(t, "tagNameCheck") && Jt(t.tagNameCheck) && (B.tagNameCheck = t.tagNameCheck), v(t, "attributeNameCheck") && Jt(t.attributeNameCheck) && (B.attributeNameCheck = t.attributeNameCheck), v(t, "allowCustomizedBuiltInElements") && typeof t.allowCustomizedBuiltInElements == "boolean" && (B.allowCustomizedBuiltInElements = t.allowCustomizedBuiltInElements), f(B), U && (mt = !1), bt && (q = !0), Dt && (R = w({}, Ce), z = p(null), Dt.html === !0 && (w(R, _e), w(z, we)), Dt.svg === !0 && (w(R, ve), w(z, Te), w(z, De)), Dt.svgFilters === !0 && (w(R, ye), w(z, Te), w(z, De)), Dt.mathMl === !0 && (w(R, xe), w(z, Ee), w(z, De))), H.tagCheck = null, H.attributeCheck = null, v(e, "ADD_TAGS") && (typeof e.ADD_TAGS == "function" ? H.tagCheck = e.ADD_TAGS : h(e.ADD_TAGS) && (R === ut && (R = E(R)), w(R, e.ADD_TAGS, X))), v(e, "ADD_ATTR") && (typeof e.ADD_ATTR == "function" ? H.attributeCheck = e.ADD_ATTR : h(e.ADD_ATTR) && (z === dt && (z = E(z)), w(z, e.ADD_ATTR, X))), v(e, "ADD_URI_SAFE_ATTR") && h(e.ADD_URI_SAFE_ATTR) && w(jt, e.ADD_URI_SAFE_ATTR, X), v(e, "FORBID_CONTENTS") && h(e.FORBID_CONTENTS) && (J === Ot && (J = E(J)), w(J, e.FORBID_CONTENTS, X)), v(e, "ADD_FORBID_CONTENTS") && h(e.ADD_FORBID_CONTENTS) && (J === Ot && (J = E(J)), w(J, e.ADD_FORBID_CONTENTS, X)), Tt && (R["#text"] = !0), G && w(R, [
380
+ "html",
381
+ "head",
382
+ "body"
383
+ ]), R.table && (w(R, ["tbody"]), delete V.tbody), e.TRUSTED_TYPES_POLICY) {
384
+ if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function") throw x("TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.");
385
+ if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw x("TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.");
386
+ let t = j;
387
+ j = e.TRUSTED_TYPES_POLICY;
388
+ try {
389
+ M = P("");
390
+ } catch (e) {
391
+ throw j = t, e;
392
+ }
393
+ } else e.TRUSTED_TYPES_POLICY === null ? (j = void 0, M = "") : (j === void 0 && (j = Xe()), j && typeof M == "string" && (M = P("")));
394
+ d && d(e), Kt = e;
395
+ }, Xt = w({}, [
396
+ ...ve,
397
+ ...ye,
398
+ ...be
399
+ ]), Zt = w({}, [...xe, ...Se]), Qt = function(e, t, n) {
400
+ return t.namespaceURI === Y ? e === "svg" : t.namespaceURI === Nt ? e === "svg" && (n === "annotation-xml" || Bt[n]) : !!Xt[e];
401
+ }, $t = function(e, t, n) {
402
+ return t.namespaceURI === Y ? e === "math" : t.namespaceURI === Pt ? e === "math" && Ht[n] : !!Zt[e];
403
+ }, en = function(e, t, n) {
404
+ return t.namespaceURI === Pt && !Ht[n] || t.namespaceURI === Nt && !Bt[n] ? !1 : !Zt[e] && (Ut[e] || !Xt[e]);
405
+ }, tn = function(e) {
406
+ let t = _(e);
407
+ (!t || !t.tagName) && (t = {
408
+ namespaceURI: Ft,
409
+ tagName: "template"
410
+ });
411
+ let n = se(e.tagName), r = se(t.tagName);
412
+ return Lt[e.namespaceURI] ? e.namespaceURI === Pt ? Qt(n, t, r) : e.namespaceURI === Nt ? $t(n, t, r) : e.namespaceURI === Y ? en(n, t, r) : !!(Wt === "application/xhtml+xml" && Lt[e.namespaceURI]) : !1;
413
+ }, Z = function(e) {
414
+ ae(t.removed, { element: e });
415
+ try {
416
+ _(e).removeChild(e);
417
+ } catch {
418
+ if (pe(e), !_(e)) throw x("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place");
419
+ }
420
+ }, nn = function(e) {
421
+ an(e);
422
+ let t = g(e);
423
+ if (t) {
424
+ let e = [];
425
+ ne(t, (t) => {
426
+ ae(e, t);
427
+ }), ne(e, (e) => {
428
+ try {
429
+ pe(e);
430
+ } catch {}
431
+ });
432
+ }
433
+ let n = S(e);
434
+ if (n) for (let t = n.length - 1; t >= 0; --t) {
435
+ let r = n[t], i = r && r.name;
436
+ if (typeof i == "string") try {
437
+ e.removeAttribute(i);
438
+ } catch {}
439
+ }
440
+ }, Q = function(e, n) {
441
+ try {
442
+ ae(t.removed, {
443
+ attribute: n.getAttributeNode(e),
444
+ from: n
445
+ });
446
+ } catch {
447
+ ae(t.removed, {
448
+ attribute: null,
449
+ from: n
450
+ });
451
+ }
452
+ if (n.removeAttribute(e), e === "is") if (q || bt) try {
453
+ Z(n);
454
+ } catch {}
455
+ else try {
456
+ n.setAttribute(e, "");
457
+ } catch {}
458
+ }, rn = function(e) {
459
+ let t = S(e);
460
+ if (t) for (let n = t.length - 1; n >= 0; --n) {
461
+ let r = t[n], i = r && r.name;
462
+ if (!(typeof i != "string" || z[X(i)])) try {
463
+ e.removeAttribute(i);
464
+ } catch {}
465
+ }
466
+ }, an = function(e) {
467
+ let t = [e];
468
+ for (; t.length > 0;) {
469
+ let e = t.pop();
470
+ (C ? C(e) : e.nodeType) === O.element && rn(e);
471
+ let n = g(e);
472
+ if (n) for (let e = n.length - 1; e >= 0; --e) t.push(n[e]);
473
+ }
474
+ }, on = function(e) {
475
+ if (!W) return;
476
+ let t = [e];
477
+ for (; t.length > 0;) {
478
+ let e = t.pop(), n = C ? C(e) : e.nodeType;
479
+ if (n === O.processingInstruction || n === O.comment && b(ze, e.data)) {
480
+ try {
481
+ pe(e);
482
+ } catch {}
483
+ continue;
484
+ }
485
+ if (n === O.element) {
486
+ let t = e, n = X(T ? T(e) : e.nodeName);
487
+ try {
488
+ t.hasAttribute && t.hasAttribute("patchsrc") && t.removeAttribute("patchsrc"), t.hasAttribute && t.hasAttribute("for") && n !== "label" && n !== "output" && t.removeAttribute("for");
489
+ } catch {}
490
+ }
491
+ let r = g(e);
492
+ if (r) for (let e = r.length - 1; e >= 0; --e) t.push(r[e]);
493
+ }
494
+ }, sn = function(e) {
495
+ let t = null, r = null;
496
+ if (yt) e = "<remove></remove>" + e;
497
+ else {
498
+ let t = le(e, /^[\r\n\t ]+/);
499
+ r = t && t[0];
500
+ }
501
+ Wt === "application/xhtml+xml" && Ft === Y && (e = "<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>" + e + "</body></html>");
502
+ let i = j ? P(e) : e;
503
+ if (Ft === Y) try {
504
+ t = new u().parseFromString(i, Wt);
505
+ } catch {}
506
+ if (!t || !t.documentElement) {
507
+ t = Qe.createDocument(Ft, "template", null);
508
+ try {
509
+ t.documentElement.innerHTML = It ? M : i;
510
+ } catch {}
511
+ }
512
+ let a = t.body || t.documentElement;
513
+ return e && r && a.insertBefore(n.createTextNode(r), a.childNodes[0] || null), Ft === Y ? tt.call(t, G ? "html" : "body")[0] : G ? t.documentElement : a;
514
+ }, cn = function(e) {
515
+ let t = A ? A(e) : e.ownerDocument;
516
+ return $e.call(t || e, e, l.SHOW_ELEMENT | l.SHOW_COMMENT | l.SHOW_TEXT | l.SHOW_PROCESSING_INSTRUCTION | l.SHOW_CDATA_SECTION, null);
517
+ }, ln = function(e) {
518
+ return e = ue(e, rt, " "), e = ue(e, it, " "), e = ue(e, at, " "), e;
519
+ }, un = function(e) {
520
+ e.normalize();
521
+ let t = A ? A(e) : e.ownerDocument, n = $e.call(t || e, e, l.SHOW_TEXT | l.SHOW_COMMENT | l.SHOW_CDATA_SECTION | l.SHOW_PROCESSING_INSTRUCTION, null), r = n.nextNode();
522
+ for (; r;) r.data = ln(r.data), r = n.nextNode();
523
+ let i = e.querySelectorAll?.call(e, "template");
524
+ i && ne(i, (e) => {
525
+ fn(e.content) && un(e.content);
526
+ });
527
+ }, dn = function(e) {
528
+ let t = T ? T(e) : null;
529
+ return typeof t != "string" || X(t) !== "form" ? !1 : typeof e.nodeName != "string" || typeof e.textContent != "string" || typeof e.removeChild != "function" || e.attributes !== S(e) || typeof e.removeAttribute != "function" || typeof e.setAttribute != "function" || typeof e.namespaceURI != "string" || typeof e.insertBefore != "function" || typeof e.hasChildNodes != "function" || e.nodeType !== C(e) || e.childNodes !== g(e);
530
+ }, fn = function(e) {
531
+ if (!C || typeof e != "object" || !e) return !1;
532
+ try {
533
+ return C(e) === O.documentFragment;
534
+ } catch {
535
+ return !1;
536
+ }
537
+ }, pn = function(e) {
538
+ if (!C || typeof e != "object" || !e) return !1;
539
+ try {
540
+ return typeof C(e) == "number";
541
+ } catch {
542
+ return !1;
543
+ }
544
+ };
545
+ function $(e, n, r) {
546
+ e.length !== 0 && ne(e, (e) => {
547
+ e.call(t, n, r, Kt);
548
+ });
549
+ }
550
+ let mn = function(e, t) {
551
+ return !!(W && e.hasChildNodes() && !pn(e.firstElementChild) && b(Re, e.textContent) && b(Re, e.innerHTML) || W && e.namespaceURI === Y && t === "style" && pn(e.firstElementChild) || e.nodeType === O.processingInstruction || W && e.nodeType === O.comment && b(ze, e.data));
552
+ }, hn = function(e, t, n) {
553
+ if (!V[t] && bn(t) && (B.tagNameCheck instanceof RegExp && b(B.tagNameCheck, t) || B.tagNameCheck instanceof Function && B.tagNameCheck(t))) return !1;
554
+ if (Tt && !J[t]) {
555
+ let t = _(e), r = g(e);
556
+ if (r && t) {
557
+ let i = r.length;
558
+ for (let a = i - 1; a >= 0; --a) {
559
+ let i = e === n ? te(r[a], !0) : r[a];
560
+ t.insertBefore(i, me(e));
561
+ }
562
+ }
563
+ }
564
+ return Z(e), !0;
565
+ }, gn = function(e, t, n, r) {
566
+ return e.length === 0 ? t : t === n || t === r ? E(t) : t;
567
+ }, _n = function(e, n) {
568
+ if ($(F.beforeSanitizeElements, e, null), e !== n && _(e) === null) return Et && an(e), !0;
569
+ if (dn(e)) return Z(e), !0;
570
+ let r = X(T ? T(e) : e.nodeName);
571
+ if (R = gn(F.uponSanitizeElement, R, ut, vt), $(F.uponSanitizeElement, e, {
572
+ tagName: r,
573
+ allowedTags: R
574
+ }), e !== n && _(e) === null) return Et && an(e), !0;
575
+ if (mn(e, r)) return Z(e), !0;
576
+ if (V[r] || !(H.tagCheck instanceof Function && H.tagCheck(r)) && !R[r]) {
577
+ let t = hn(e, r, n);
578
+ return t === !1 && $(F.afterSanitizeElements, e, null), t;
579
+ }
580
+ if ((C ? C(e) : e.nodeType) === O.element && !tn(e) || (r === "noscript" || r === "noembed" || r === "noframes") && b(Be, e.innerHTML)) return Z(e), !0;
581
+ if (U && e.nodeType === O.text) {
582
+ let n = ln(e.textContent);
583
+ e.textContent !== n && (ae(t.removed, { element: e.cloneNode() }), e.textContent = n);
584
+ }
585
+ return $(F.afterSanitizeElements, e, null), !1;
586
+ }, vn = function(e, t, r) {
587
+ if (ft[t] || W && t === "patchsrc" || W && t === "for" && e !== "label" && e !== "output" || St && (t === "id" || t === "name") && (r in n || r in qt)) return !1;
588
+ let i = z[t] || H.attributeCheck instanceof Function && H.attributeCheck(t, e);
589
+ if (!(mt && b(I, t)) && !(pt && b(L, t))) {
590
+ if (!i) {
591
+ if (!(bn(e) && (B.tagNameCheck instanceof RegExp && b(B.tagNameCheck, e) || B.tagNameCheck instanceof Function && B.tagNameCheck(e)) && (B.attributeNameCheck instanceof RegExp && b(B.attributeNameCheck, t) || B.attributeNameCheck instanceof Function && B.attributeNameCheck(t, e)) || t === "is" && B.allowCustomizedBuiltInElements && (B.tagNameCheck instanceof RegExp && b(B.tagNameCheck, r) || B.tagNameCheck instanceof Function && B.tagNameCheck(r)))) return !1;
592
+ } else if (!jt[t] && !b(lt, ue(r, st, "")) && !((t === "src" || t === "xlink:href" || t === "href") && e !== "script" && de(r, "data:") === 0 && kt[e]) && !(ht && !b(ot, ue(r, st, ""))) && r) return !1;
593
+ }
594
+ return !0;
595
+ }, yn = w({}, [
596
+ "annotation-xml",
597
+ "color-profile",
598
+ "font-face",
599
+ "font-face-format",
600
+ "font-face-name",
601
+ "font-face-src",
602
+ "font-face-uri",
603
+ "missing-glyph"
604
+ ]), bn = function(e) {
605
+ return !yn[se(e)] && b(ct, e);
606
+ }, xn = function(e, t, n, r) {
607
+ if (j && typeof ee == "object" && typeof ee.getAttributeType == "function" && !n) switch (ee.getAttributeType(e, t)) {
608
+ case "TrustedHTML": return P(r);
609
+ case "TrustedScriptURL": return Ye(r);
610
+ }
611
+ return r;
612
+ }, Sn = function(e, n, r, i) {
613
+ try {
614
+ r ? e.setAttributeNS(r, n, i) : e.setAttribute(n, i), dn(e) ? Z(e) : ie(t.removed);
615
+ } catch {
616
+ Q(n, e);
617
+ }
618
+ }, Cn = function(e) {
619
+ $(F.beforeSanitizeAttributes, e, null);
620
+ let t = e.attributes;
621
+ if (!t || dn(e)) return;
622
+ z = gn(F.uponSanitizeAttribute, z, dt, K);
623
+ let n = {
624
+ attrName: "",
625
+ attrValue: "",
626
+ keepAttr: !0,
627
+ allowedAttributes: z,
628
+ forceKeepAttr: void 0
629
+ }, r = t.length, i = X(e.nodeName);
630
+ for (; r--;) {
631
+ let a = t[r], o = a.name, s = a.namespaceURI, c = a.value, l = X(o), u = c, d = o === "value" ? u : fe(u);
632
+ if (n.attrName = l, n.attrValue = d, n.keepAttr = !0, n.forceKeepAttr = void 0, $(F.uponSanitizeAttribute, e, n), d = n.attrValue, Ct && (l === "id" || l === "name") && de(d, wt) !== 0 && (Q(o, e), d = wt + d), W && b(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, d)) {
633
+ Q(o, e);
634
+ continue;
635
+ }
636
+ if (l === "attributename" && le(d, "href")) {
637
+ Q(o, e);
638
+ continue;
639
+ }
640
+ if (!n.forceKeepAttr) {
641
+ if (!n.keepAttr) {
642
+ Q(o, e);
643
+ continue;
644
+ }
645
+ if (!gt && b(Ve, d)) {
646
+ Q(o, e);
647
+ continue;
648
+ }
649
+ if (U && (d = ln(d)), !vn(i, l, d)) {
650
+ Q(o, e);
651
+ continue;
652
+ }
653
+ d = xn(i, l, s, d), d !== u && Sn(e, o, s, d);
654
+ }
655
+ }
656
+ $(F.afterSanitizeAttributes, e, null);
657
+ }, wn = function(e) {
658
+ let t = null, n = cn(e);
659
+ for ($(F.beforeSanitizeShadowDOM, e, null); t = n.nextNode();) if ($(F.uponSanitizeShadowNode, t, null), _n(t, e), Cn(t), fn(t.content) && wn(t.content), (C ? C(t) : t.nodeType) === O.element) {
660
+ let e = y(t);
661
+ fn(e) && (Tn(e), wn(e));
662
+ }
663
+ $(F.afterSanitizeShadowDOM, e, null);
664
+ }, Tn = function(e) {
665
+ let t = [{
666
+ node: e,
667
+ shadow: null
668
+ }];
669
+ for (; t.length > 0;) {
670
+ let e = t.pop();
671
+ if (e.shadow) {
672
+ wn(e.shadow);
673
+ continue;
674
+ }
675
+ let n = e.node, r = (C ? C(n) : n.nodeType) === O.element, i = g(n);
676
+ if (i) for (let e = i.length - 1; e >= 0; --e) t.push({
677
+ node: i[e],
678
+ shadow: null
679
+ });
680
+ if (r) {
681
+ let e = T ? T(n) : null;
682
+ if (typeof e == "string" && X(e) === "template") {
683
+ let e = n.content;
684
+ fn(e) && t.push({
685
+ node: e,
686
+ shadow: null
687
+ });
688
+ }
689
+ }
690
+ if (r) {
691
+ let e = y(n);
692
+ fn(e) && t.push({
693
+ node: null,
694
+ shadow: e
695
+ }, {
696
+ node: e,
697
+ shadow: null
698
+ });
699
+ }
700
+ }
701
+ };
702
+ return t.sanitize = function(e) {
703
+ let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, i = null, a = null, o = null, s = null;
704
+ if (It = !e, It && (e = "<!-->"), typeof e != "string" && !pn(e) && (e = he(e), typeof e != "string")) throw x("dirty is not a string, aborting");
705
+ if (!t.isSupported) return e;
706
+ _t ? (R = vt, z = K) : Yt(n), (F.uponSanitizeElement.length > 0 || F.uponSanitizeAttribute.length > 0) && (R = E(R)), F.uponSanitizeAttribute.length > 0 && (z = E(z)), t.removed = [];
707
+ let c = Et && typeof e != "string" && pn(e);
708
+ if (c) {
709
+ on(e);
710
+ let t = T ? T(e) : e.nodeName;
711
+ if (typeof t == "string") {
712
+ let n = X(t);
713
+ if (!R[n] || V[n]) throw nn(e), x("root node is forbidden and cannot be sanitized in-place");
714
+ }
715
+ if (dn(e)) throw nn(e), x("root node is clobbered and cannot be sanitized in-place");
716
+ try {
717
+ Tn(e);
718
+ } catch (t) {
719
+ throw nn(e), t;
720
+ }
721
+ } else if (pn(e)) i = sn("<!---->"), a = i.ownerDocument.importNode(e, !0), a.nodeType === O.element && a.nodeName === "BODY" || a.nodeName === "HTML" ? i = a : i.appendChild(a), Tn(a);
722
+ else {
723
+ if (!q && !U && !G && e.indexOf("<") === -1) return j && xt ? P(e) : e;
724
+ if (i = sn(e), !i) return q ? null : xt ? M : "";
725
+ }
726
+ i && yt && Z(i.firstChild);
727
+ let l = c ? e : i;
728
+ try {
729
+ let e = cn(l);
730
+ for (; o = e.nextNode();) _n(o, l), Cn(o), fn(o.content) && wn(o.content);
731
+ } catch (n) {
732
+ throw c && (nn(e), ne(t.removed, (e) => {
733
+ e.element && an(e.element);
734
+ })), n;
735
+ }
736
+ if (c) return ne(t.removed, (e) => {
737
+ e.element && an(e.element);
738
+ }), U && un(e), e;
739
+ if (q) {
740
+ if (U && un(i), bt) for (s = et.call(i.ownerDocument); i.firstChild;) s.appendChild(i.firstChild);
741
+ else s = i;
742
+ return (z.shadowroot || z.shadowrootmode) && (s = nt.call(r, s, !0)), s;
743
+ }
744
+ let u = G ? i.outerHTML : i.innerHTML;
745
+ return G && R["!doctype"] && i.ownerDocument && i.ownerDocument.doctype && i.ownerDocument.doctype.name && b(Ie, i.ownerDocument.doctype.name) && (u = "<!DOCTYPE " + i.ownerDocument.doctype.name + ">\n" + u), U && (u = ln(u)), j && xt ? P(u) : u;
746
+ }, t.setConfig = function() {
747
+ Yt(arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}), _t = !0, vt = R, K = z;
748
+ }, t.clearConfig = function() {
749
+ Kt = null, _t = !1, vt = null, K = null, j = Ke, M = "";
750
+ }, t.isValidAttribute = function(e, t, n) {
751
+ return Kt || Yt({}), vn(X(e), X(t), n);
752
+ }, t.addHook = function(e, t) {
753
+ typeof t == "function" && v(F, e) && ae(F[e], t);
754
+ }, t.removeHook = function(e, t) {
755
+ if (v(F, e)) {
756
+ if (t !== void 0) {
757
+ let n = re(F[e], t);
758
+ return n === -1 ? void 0 : oe(F[e], n, 1)[0];
759
+ }
760
+ return ie(F[e]);
761
+ }
762
+ }, t.removeHooks = function(e) {
763
+ v(F, e) && (F[e] = []);
764
+ }, t.removeAllHooks = function() {
765
+ F = We();
766
+ }, t;
767
+ }
768
+ var A = Ge(), j = null;
769
+ function M() {
770
+ if (j) return j;
771
+ if (typeof window > "u" || !window.document) return null;
772
+ let e = A;
773
+ return j = typeof e == "function" ? e(window) : A, j;
774
+ }
775
+ var Ke = [
776
+ "script",
777
+ "foreignobject",
778
+ "iframe",
779
+ "object",
780
+ "embed",
781
+ "base",
782
+ "form"
783
+ ], qe = [
784
+ "onerror",
785
+ "onload",
786
+ "onclick",
787
+ "onmouseover",
788
+ "onmouseout",
789
+ "onmouseenter",
790
+ "onmouseleave",
791
+ "onfocus",
792
+ "onblur",
793
+ "onkeydown",
794
+ "onkeyup",
795
+ "onkeypress",
796
+ "formaction",
797
+ "xlink:href"
798
+ ], N = /* @__PURE__ */ new Map(), Je = 64;
799
+ function P(e) {
800
+ if (typeof e != "string" || e.length === 0 || !e.trimStart().toLowerCase().startsWith("<svg")) return "";
801
+ let t = N.get(e);
802
+ if (t !== void 0) return t;
803
+ let n = M();
804
+ if (!n) return "";
805
+ let r = n.sanitize(e, {
806
+ USE_PROFILES: {
807
+ svg: !0,
808
+ svgFilters: !0
809
+ },
810
+ FORBID_TAGS: Ke,
811
+ FORBID_ATTR: qe,
812
+ ALLOW_UNKNOWN_PROTOCOLS: !1,
813
+ RETURN_TRUSTED_TYPE: !1
814
+ }), i = typeof r == "string" ? r : String(r ?? "");
815
+ if (N.size >= Je) {
816
+ let e = [...N.keys()];
817
+ for (let t = 0; t < e.length / 2; t += 1) N.delete(e[t]);
818
+ }
819
+ return N.set(e, i), i;
820
+ }
821
+ function Ye(e) {
822
+ try {
823
+ let t = {
824
+ BASE_URL: "/",
825
+ DEV: !1,
826
+ MODE: "production",
827
+ PROD: !0,
828
+ SSR: !1
829
+ }?.[e];
830
+ if (typeof t == "string" && t.length > 0) return t;
831
+ } catch {}
832
+ }
833
+ typeof window < "u" && window.PIE_BUILDER_ORIGIN_URL || Ye("PUBLIC_BUILDER_ORIGIN_URL"), typeof window < "u" && window.PIE_BUILDER_BUNDLE_URL || Ye("PUBLIC_BUILDER_BUNDLE_URL");
834
+ var Xe = class {
835
+ initialized = !1;
836
+ config;
837
+ trackError(e, t) {
838
+ if (!this.guardedOperation("trackError", e, t) || !this.applyErrorFilter(e, t)) return;
839
+ let n = this.transformAttributes(t);
840
+ try {
841
+ this.doTrackError(e, n), this.config?.debug && console.log(`[${this.providerName}] Tracked error:`, e, n);
842
+ } catch (e) {
843
+ console.error(`[${this.providerName}] Error tracking error:`, e);
844
+ }
845
+ }
846
+ trackEvent(e, t) {
847
+ if (!this.guardedOperation("trackEvent", e, t) || !this.applyEventFilter(e, t) || !this.applySampling(e)) return;
848
+ let n = this.transformAttributes(t);
849
+ n.timestamp || (n = {
850
+ ...n,
851
+ timestamp: (/* @__PURE__ */ new Date()).toISOString()
852
+ });
853
+ try {
854
+ this.doTrackEvent(e, n), this.config?.debug && console.log(`[${this.providerName}] Tracked event:`, e, n);
855
+ } catch (e) {
856
+ console.error(`[${this.providerName}] Error tracking event:`, e);
857
+ }
858
+ }
859
+ trackMetric(e, t, n) {
860
+ this.trackEvent(`metric:${e}`, {
861
+ ...n,
862
+ metricValue: t,
863
+ metricName: e
864
+ });
865
+ }
866
+ setUserContext(e, t) {
867
+ if (this.guardedOperation("setUserContext", e, t)) try {
868
+ this.doSetUserContext(e, t), this.config?.debug && console.log(`[${this.providerName}] Set user context:`, e, t);
869
+ } catch (e) {
870
+ console.error(`[${this.providerName}] Error setting user context:`, e);
871
+ }
872
+ }
873
+ setGlobalAttributes(e) {
874
+ if (this.guardedOperation("setGlobalAttributes", e)) try {
875
+ this.doSetGlobalAttributes(e), this.config?.debug && console.log(`[${this.providerName}] Set global attributes:`, e);
876
+ } catch (e) {
877
+ console.error(`[${this.providerName}] Error setting global attributes:`, e);
878
+ }
879
+ }
880
+ guardedOperation(e, ...t) {
881
+ return this.isReady() ? !0 : (this.config?.debug && console.warn(`[${this.providerName}] Attempted to ${e} but provider not ready:`, ...t), !1);
882
+ }
883
+ applyErrorFilter(e, t) {
884
+ return this.config?.errorFilter && !this.config.errorFilter(e, t) ? (this.config?.debug && console.log(`[${this.providerName}] Error filtered out:`, e, t), !1) : !0;
885
+ }
886
+ applyEventFilter(e, t) {
887
+ return this.config?.eventFilter && !this.config.eventFilter(e, t) ? (this.config?.debug && console.log(`[${this.providerName}] Event filtered out:`, e, t), !1) : !0;
888
+ }
889
+ applySampling(e) {
890
+ return this.config?.sampleRate !== void 0 && this.config.sampleRate < 1 && Math.random() > this.config.sampleRate ? (this.config?.debug && console.log(`[${this.providerName}] Event sampled out:`, e), !1) : !0;
891
+ }
892
+ transformAttributes(e) {
893
+ return this.config?.attributeTransformer ? this.config.attributeTransformer(e) : e;
894
+ }
895
+ }, Ze = class extends Xe {
896
+ providerId = "newrelic";
897
+ providerName = "New Relic";
898
+ async initialize(e) {
899
+ this.config = e, typeof window < "u" && window.newrelic ? (this.initialized = !0, this.config?.debug && console.log("[NewRelicProvider] Initialized successfully")) : (this.config?.debug && console.warn("[NewRelicProvider] New Relic not available (window.newrelic not found)"), this.initialized = !1);
900
+ }
901
+ isReady() {
902
+ return this.initialized && typeof window < "u" && !!window.newrelic;
903
+ }
904
+ destroy() {
905
+ this.initialized = !1, this.config?.debug && console.log("[NewRelicProvider] Destroyed");
906
+ }
907
+ doTrackError(e, t) {
908
+ window.newrelic.noticeError(e, t);
909
+ }
910
+ doTrackEvent(e, t) {
911
+ window.newrelic.addPageAction(e, t);
912
+ }
913
+ doSetUserContext(e, t) {
914
+ let n = window.newrelic;
915
+ if (n.setUserId && n.setUserId(e), t && n.setCustomAttribute) for (let [e, r] of Object.entries(t)) n.setCustomAttribute(e, r);
916
+ }
917
+ doSetGlobalAttributes(e) {
918
+ let t = window.newrelic;
919
+ if (t.setCustomAttribute) for (let [n, r] of Object.entries(e)) t.setCustomAttribute(n, r);
920
+ }
921
+ };
922
+ //#endregion
923
+ //#region ../../node_modules/.bun/@pie-players+pie-players-shared@0.3.53/node_modules/@pie-players/pie-players-shared/dist/instrumentation/provider-guards.js
924
+ function Qe(e) {
925
+ if (!e || typeof e != "object") return !1;
926
+ let t = e;
927
+ return typeof t.providerId == "string" && typeof t.providerName == "string" && typeof t.initialize == "function" && typeof t.trackError == "function" && typeof t.trackEvent == "function" && typeof t.destroy == "function" && typeof t.isReady == "function";
928
+ }
929
+ //#endregion
930
+ //#region ../../node_modules/.bun/@pie-players+pie-players-shared@0.3.53/node_modules/@pie-players/pie-players-shared/dist/loader-config.js
931
+ var $e = {
932
+ retryDelayMs: 3e3,
933
+ timeoutMs: 12e4
934
+ }, et;
935
+ (function(e) {
936
+ e.player = "player.js", e.clientPlayer = "client-player.js", e.editor = "editor.js";
937
+ })(et ||= {});
938
+ var tt;
939
+ (function(e) {
940
+ e.loading = "loading", e.loaded = "loaded";
941
+ })(tt ||= {}), $e.timeoutMs;
942
+ //#endregion
943
+ //#region ../../node_modules/.bun/@pie-players+pie-players-shared@0.3.53/node_modules/@pie-players/pie-players-shared/dist/types/index.js
944
+ var nt;
945
+ (function(e) {
946
+ e.SAVE = "save", e.MODEL = "model", e.SCORE = "score", e.MANUAL_SCORE = "manual-score";
947
+ })(nt ||= {});
948
+ var F;
949
+ (function(e) {
950
+ e.AUTO = "auto", e.MANUAL = "manual";
951
+ })(F ||= {});
952
+ var rt;
953
+ (function(e) {
954
+ e.GATHER = "gather", e.VIEW = "view", e.EVALUATE = "evaluate";
955
+ })(rt ||= {});
956
+ var it;
957
+ (function(e) {
958
+ e.PENDING = "pending", e.IN_PROGRESS = "in_progress", e.COMPLETED = "completed", e.FAILED = "failed";
959
+ })(it ||= {});
960
+ var at;
961
+ (function(e) {
962
+ e[e.ROOT = 0] = "ROOT", e[e.SUBJECT = 1] = "SUBJECT", e[e.LEVEL = 2] = "LEVEL", e[e.STANDARD = 3] = "STANDARD";
963
+ })(at ||= {});
964
+ //#endregion
965
+ //#region ../../node_modules/.bun/@pie-players+pie-players-shared@0.3.53/node_modules/@pie-players/pie-players-shared/dist/pie/logger.js
966
+ function I(e, t) {
967
+ let n = `[${e}]`;
968
+ return {
969
+ debug: (e, ...r) => {
970
+ t() && console.debug(n, e, ...r);
971
+ },
972
+ info: (e, ...t) => console.info(n, e, ...t),
973
+ warn: (e, ...t) => console.warn(n, e, ...t),
974
+ error: (e, ...t) => console.error(n, e, ...t)
975
+ };
976
+ }
977
+ function L() {
978
+ return typeof window < "u" && window.PIE_DEBUG === !0;
979
+ }
980
+ I("math-rendering", () => L()), I("pie-scoring", () => L()), I("pie-updates", () => L()), I("pie-initialization", () => L()), et.player, I("asset-handler", () => L()), I("authoring", () => L());
981
+ //#endregion
982
+ //#region ../../node_modules/.bun/@pie-players+pie-players-shared@0.3.53/node_modules/@pie-players/pie-players-shared/dist/pie/instrumentation-event-bridge.js
983
+ var ot = I("instrumentation-event-bridge", () => L());
984
+ function st(e) {
985
+ return e && typeof e == "object" ? e : e === void 0 ? {} : { value: e };
986
+ }
987
+ function ct(e) {
988
+ ot.warn(`[InstrumentationEventBridge:${e}] Ignoring invalid instrumentation provider; expected InstrumentationProvider contract`);
989
+ }
990
+ function lt(e) {
991
+ try {
992
+ e.provider.trackError(e.error instanceof Error ? e.error : Error(String(e.error ?? "Unknown instrumentation bridge error")), {
993
+ component: e.component,
994
+ errorType: "InstrumentationBridgeError",
995
+ sourceEventName: e.sourceEventName
996
+ });
997
+ } catch {}
998
+ }
999
+ function R(e) {
1000
+ if (!e.host || !e.eventMap.length || !e.instrumentationProvider) return () => {};
1001
+ if (!Qe(e.instrumentationProvider)) return e.debug && ct(e.component), () => {};
1002
+ let t = e.instrumentationProvider, n = [], r = Math.max(0, e.dedupeWindowMs ?? 0), i = /* @__PURE__ */ new Map(), a = (e, t) => {
1003
+ let n = [
1004
+ t.assessmentId,
1005
+ t.sectionId,
1006
+ t.attemptId,
1007
+ t.itemId,
1008
+ t.canonicalItemId,
1009
+ t.sourceRuntimeId
1010
+ ].map((e) => String(e ?? "")).join("|");
1011
+ return `${e.instrumentationEventName}|${n}`;
1012
+ };
1013
+ for (let o of e.eventMap) {
1014
+ let s = (n) => {
1015
+ try {
1016
+ if (!t.isReady() || e.shouldTrackEvent && !e.shouldTrackEvent(n)) return;
1017
+ let s = st(n.detail), c = (/* @__PURE__ */ new Date()).toISOString(), l = {
1018
+ ...s,
1019
+ ...e.staticAttributes,
1020
+ component: e.component,
1021
+ sourceEventName: o.sourceEventName,
1022
+ timestamp: c
1023
+ };
1024
+ if (r > 0) {
1025
+ let e = Date.now(), t = a(o, l), n = i.get(t);
1026
+ if (typeof n == "number" && e - n < r) return;
1027
+ i.set(t, e);
1028
+ }
1029
+ t.trackEvent(o.instrumentationEventName, { ...l });
1030
+ } catch (n) {
1031
+ lt({
1032
+ provider: t,
1033
+ component: e.component,
1034
+ error: n,
1035
+ sourceEventName: o.sourceEventName
1036
+ });
1037
+ }
1038
+ };
1039
+ e.host.addEventListener(o.sourceEventName, s), n.push(() => {
1040
+ e.host?.removeEventListener(o.sourceEventName, s);
1041
+ });
1042
+ }
1043
+ return () => {
1044
+ for (let e of n) e();
1045
+ };
1046
+ }
1047
+ //#endregion
1048
+ //#region ../../node_modules/.bun/@pie-players+pie-players-shared@0.3.53/node_modules/@pie-players/pie-players-shared/dist/pie/instrumentation-provider-resolution.js
1049
+ function ut(e) {
1050
+ return e && typeof e == "object" ? e : {};
1051
+ }
1052
+ function z(e) {
1053
+ let t = ut(ut(e).loaderConfig);
1054
+ return Object.keys(t).length > 0 ? t : null;
1055
+ }
1056
+ function dt(e) {
1057
+ if (!e || !("instrumentationProvider" in e)) return { kind: "unset" };
1058
+ let t = e.instrumentationProvider;
1059
+ return t === null ? { kind: "null" } : t === void 0 ? { kind: "unset" } : {
1060
+ kind: "value",
1061
+ value: t
1062
+ };
1063
+ }
1064
+ function B(e) {
1065
+ if (!e || !("trackPageActions" in e)) return;
1066
+ let t = e.trackPageActions;
1067
+ return typeof t == "boolean" ? t : void 0;
1068
+ }
1069
+ function V(e, t) {
1070
+ return e.kind === "value" || e.kind === "null" ? e : t;
1071
+ }
1072
+ var ft, H = I("instrumentation-provider-resolution", () => L());
1073
+ function pt() {
1074
+ return ft || (ft = new Ze(), ft.initialize()), ft;
1075
+ }
1076
+ function mt(e) {
1077
+ let t = z(e.runtimePlayer), n = z(e.player), r = B(t), i = B(n), a = r ?? i ?? !1, o = V(dt(t), dt(n));
1078
+ if (o.kind !== "null") {
1079
+ if (o.kind === "unset") return a ? pt() : void 0;
1080
+ if (Qe(o.value)) return o.value;
1081
+ if (e.debug) {
1082
+ let t = e.component ? `[${e.component}] ` : "";
1083
+ H.warn(`${t}Ignoring invalid instrumentation provider; expected InstrumentationProvider contract`);
1084
+ }
1085
+ }
1086
+ }
1087
+ //#endregion
1088
+ //#region ../../node_modules/.bun/@pie-players+pie-players-shared@0.3.53/node_modules/@pie-players/pie-players-shared/dist/pie/stages.js
1089
+ var ht = Object.freeze([
1090
+ "composed",
1091
+ "engine-ready",
1092
+ "interactive",
1093
+ "disposed"
1094
+ ]);
1095
+ function gt(e) {
1096
+ return ht;
1097
+ }
1098
+ function U(e) {
1099
+ let t = ht.indexOf(e);
1100
+ if (t === -1) throw Error(`Unknown stage \`${e}\``);
1101
+ return t;
1102
+ }
1103
+ //#endregion
1104
+ //#region ../../node_modules/.bun/@pie-players+pie-players-shared@0.3.53/node_modules/@pie-players/pie-players-shared/dist/pie/stage-tracker.js
1105
+ var W = !1;
1106
+ function G(e) {
1107
+ W || (W = !0, typeof console < "u" && console.warn && console.warn(`[pie-stage-tracker] Unexpected ${e.reason} stage transition from \`${e.from ?? "<none>"}\` to \`${e.to}\`. Stage transitions are expected to be monotonic within a cohort; call \`reset()\` when \`(sectionId, attemptId)\` changes.`));
1108
+ }
1109
+ function _t(e) {
1110
+ let t = gt(e.sourceCeShape), n = new Set(t), r = e.now ?? (() => (/* @__PURE__ */ new Date()).toISOString()), i = e.onUnexpectedTransition ?? G, a = null, o = e.sectionId, s = e.attemptId, c = /* @__PURE__ */ new Set();
1111
+ function l(t, n) {
1112
+ e.emit({
1113
+ stage: t,
1114
+ status: n,
1115
+ runtimeId: e.runtimeId,
1116
+ sectionId: o,
1117
+ attemptId: s,
1118
+ timestamp: r(),
1119
+ sourceCe: e.sourceCe
1120
+ });
1121
+ }
1122
+ function u(e) {
1123
+ let t = U(e), r = a === null ? 0 : U(a) + 1;
1124
+ for (let e = r; e < t; e += 1) {
1125
+ let t = ht[e];
1126
+ n.has(t) || c.has(t) || (c.add(t), l(t, "skipped"));
1127
+ }
1128
+ }
1129
+ function d(e, t = "entered") {
1130
+ let r = U(e), o = a === null ? -1 : U(a);
1131
+ if (t === "entered") {
1132
+ if (c.has(e)) {
1133
+ i({
1134
+ from: a,
1135
+ to: e,
1136
+ reason: "duplicate"
1137
+ });
1138
+ return;
1139
+ }
1140
+ if (r < o) {
1141
+ i({
1142
+ from: a,
1143
+ to: e,
1144
+ reason: "backward"
1145
+ });
1146
+ return;
1147
+ }
1148
+ if (!n.has(e)) {
1149
+ if (c.has(e)) return;
1150
+ c.add(e), l(e, "skipped");
1151
+ return;
1152
+ }
1153
+ u(e), c.add(e), a = e, l(e, "entered");
1154
+ return;
1155
+ }
1156
+ if (t === "failed") {
1157
+ u(e), c.add(e), a = e, l(e, "failed");
1158
+ return;
1159
+ }
1160
+ c.has(e) || (c.add(e), l(e, "skipped"));
1161
+ }
1162
+ function f(e) {
1163
+ a = null, c.clear(), e && (o = e.sectionId, s = e.attemptId);
1164
+ }
1165
+ function p() {
1166
+ return a;
1167
+ }
1168
+ return {
1169
+ enter: d,
1170
+ reset: f,
1171
+ getCurrent: p
1172
+ };
1173
+ }
1174
+ //#endregion
1175
+ //#region ../../node_modules/.bun/@pie-players+pie-players-shared@0.3.53/node_modules/@pie-players/pie-players-shared/dist/pie/instrumentation-event-map.js
1176
+ var vt = [
1177
+ {
1178
+ sourceEventName: "pie-stage-change",
1179
+ instrumentationEventName: "pie-toolkit-stage-change"
1180
+ },
1181
+ {
1182
+ sourceEventName: "runtime-owned",
1183
+ instrumentationEventName: "pie-toolkit-runtime-owned"
1184
+ },
1185
+ {
1186
+ sourceEventName: "runtime-inherited",
1187
+ instrumentationEventName: "pie-toolkit-runtime-inherited"
1188
+ },
1189
+ {
1190
+ sourceEventName: "toolkit-ready",
1191
+ instrumentationEventName: "pie-toolkit-ready"
1192
+ },
1193
+ {
1194
+ sourceEventName: "section-ready",
1195
+ instrumentationEventName: "pie-toolkit-section-ready"
1196
+ },
1197
+ {
1198
+ sourceEventName: "framework-error",
1199
+ instrumentationEventName: "pie-toolkit-framework-error"
1200
+ }
1201
+ ];
1202
+ new Set([
1203
+ "id",
1204
+ "element",
1205
+ ...new Set([
1206
+ "complete",
1207
+ "component",
1208
+ "timestamp",
1209
+ "sourceRuntimeId"
1210
+ ])
1211
+ ]), I("pie-overrides", () => L());
1212
+ //#endregion
1213
+ //#region ../../node_modules/.bun/@pie-players+pie-players-shared@0.3.53/node_modules/@pie-players/pie-players-shared/dist/ui/first-focusable.js
1214
+ var K = [
1215
+ "a[href]",
1216
+ "button:not([disabled])",
1217
+ "input:not([disabled]):not([type='hidden'])",
1218
+ "select:not([disabled])",
1219
+ "textarea:not([disabled])",
1220
+ "[contenteditable]:not([contenteditable='false'])",
1221
+ "[tabindex]:not([tabindex='-1'])"
1222
+ ].join(",");
1223
+ function yt(e) {
1224
+ return !e.matches(K) || e.hasAttribute("disabled") || e.closest("[inert]") ? !1 : e.offsetParent !== null || e.getClientRects().length > 0;
1225
+ }
1226
+ //#endregion
1227
+ //#region ../../node_modules/.bun/@pie-players+pie-players-shared@0.3.53/node_modules/@pie-players/pie-players-shared/dist/ui/focus-trap.js
1228
+ function q(e) {
1229
+ return Array.from(e.querySelectorAll(K)).filter((e) => yt(e));
1230
+ }
1231
+ function bt(e, t) {
1232
+ try {
1233
+ if (t && e.contains(t)) {
1234
+ t.focus();
1235
+ return;
1236
+ }
1237
+ let n = q(e);
1238
+ if (n.length > 0) {
1239
+ n[0].focus();
1240
+ return;
1241
+ }
1242
+ e.focus?.();
1243
+ } catch {}
1244
+ }
1245
+ function xt(e, t = {}) {
1246
+ let n = typeof document < "u" ? document.activeElement : null, r = t.wrap ?? !0, i = (n) => {
1247
+ if (n.key === "Escape") {
1248
+ t.onEscape?.();
1249
+ return;
1250
+ }
1251
+ if (n.key !== "Tab") return;
1252
+ let i = q(e);
1253
+ if (!i.length) {
1254
+ if (!r) return;
1255
+ n.preventDefault(), e.focus?.();
1256
+ return;
1257
+ }
1258
+ let a = document.activeElement, o = i.indexOf(a || i[0]);
1259
+ if (n.shiftKey) {
1260
+ o <= 0 && (r ? (n.preventDefault(), i[i.length - 1].focus()) : t.onTabExit?.("backward", n));
1261
+ return;
1262
+ }
1263
+ o === i.length - 1 && (r ? (n.preventDefault(), i[0].focus()) : t.onTabExit?.("forward", n));
1264
+ };
1265
+ return queueMicrotask(() => bt(e, t.initialFocus)), e.addEventListener("keydown", i), () => {
1266
+ e.removeEventListener("keydown", i);
1267
+ try {
1268
+ n?.focus?.();
1269
+ } catch {}
1270
+ };
1271
+ }
1272
+ //#endregion
1273
+ export { _t as a, Qe as c, vt as i, P as l, K as n, mt as o, yt as r, R as s, xt as t };
1274
+
1275
+ //# sourceMappingURL=dist-Nkkk25AH.js.map