vistaview 0.7.8 → 0.10.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.
Files changed (164) hide show
  1. package/README.md +276 -97
  2. package/dist/extensions/dailymotion-video.d.ts +2 -0
  3. package/dist/extensions/dailymotion-video.js +80 -0
  4. package/dist/extensions/dailymotion-video.umd.js +1 -0
  5. package/dist/extensions/download.d.ts +2 -0
  6. package/dist/extensions/download.js +35 -0
  7. package/dist/extensions/download.umd.js +1 -0
  8. package/dist/extensions/google-maps.d.ts +2 -0
  9. package/dist/extensions/google-maps.js +94 -0
  10. package/dist/extensions/google-maps.umd.js +1 -0
  11. package/dist/extensions/image-story.d.ts +2 -0
  12. package/dist/extensions/image-story.js +621 -0
  13. package/dist/extensions/image-story.umd.js +2 -0
  14. package/dist/extensions/logger.d.ts +2 -0
  15. package/dist/extensions/logger.js +23 -0
  16. package/dist/extensions/logger.umd.js +1 -0
  17. package/dist/extensions/mapbox.d.ts +2 -0
  18. package/dist/extensions/mapbox.js +124 -0
  19. package/dist/extensions/mapbox.umd.js +1 -0
  20. package/dist/extensions/openstreetmap.d.ts +2 -0
  21. package/dist/extensions/openstreetmap.js +125 -0
  22. package/dist/extensions/openstreetmap.umd.js +1 -0
  23. package/dist/extensions/streamable-video.d.ts +2 -0
  24. package/dist/extensions/streamable-video.js +76 -0
  25. package/dist/extensions/streamable-video.umd.js +1 -0
  26. package/dist/extensions/vidyard-video.d.ts +2 -0
  27. package/dist/extensions/vidyard-video.js +80 -0
  28. package/dist/extensions/vidyard-video.umd.js +1 -0
  29. package/dist/extensions/vimeo-video.d.ts +2 -0
  30. package/dist/extensions/vimeo-video.js +76 -0
  31. package/dist/extensions/vimeo-video.umd.js +1 -0
  32. package/dist/extensions/wistia-video.d.ts +2 -0
  33. package/dist/extensions/wistia-video.js +85 -0
  34. package/dist/extensions/wistia-video.umd.js +1 -0
  35. package/dist/extensions/youtube-video.d.ts +2 -0
  36. package/dist/extensions/youtube-video.js +88 -0
  37. package/dist/extensions/youtube-video.umd.js +1 -0
  38. package/dist/lib/components.d.ts +1 -3
  39. package/dist/lib/components.d.ts.map +1 -1
  40. package/dist/lib/defaults/image-setup.d.ts +3 -0
  41. package/dist/lib/defaults/image-setup.d.ts.map +1 -0
  42. package/dist/lib/defaults/init.d.ts.map +1 -1
  43. package/dist/lib/defaults/open.d.ts +3 -0
  44. package/dist/lib/defaults/open.d.ts.map +1 -0
  45. package/dist/lib/defaults/options.d.ts.map +1 -1
  46. package/dist/lib/defaults/transition.d.ts +1 -1
  47. package/dist/lib/defaults/transition.d.ts.map +1 -1
  48. package/dist/lib/extensions/dailymotion-video.d.ts +34 -0
  49. package/dist/lib/extensions/dailymotion-video.d.ts.map +1 -0
  50. package/dist/lib/extensions/download.d.ts +3 -0
  51. package/dist/lib/extensions/download.d.ts.map +1 -0
  52. package/dist/lib/extensions/google-maps.d.ts +49 -0
  53. package/dist/lib/extensions/google-maps.d.ts.map +1 -0
  54. package/dist/lib/extensions/image-story.d.ts +12 -0
  55. package/dist/lib/extensions/image-story.d.ts.map +1 -0
  56. package/dist/lib/extensions/logger.d.ts +3 -0
  57. package/dist/lib/extensions/logger.d.ts.map +1 -0
  58. package/dist/lib/extensions/mapbox.d.ts +53 -0
  59. package/dist/lib/extensions/mapbox.d.ts.map +1 -0
  60. package/dist/lib/extensions/openstreetmap.d.ts +51 -0
  61. package/dist/lib/extensions/openstreetmap.d.ts.map +1 -0
  62. package/dist/lib/extensions/streamable-video.d.ts +32 -0
  63. package/dist/lib/extensions/streamable-video.d.ts.map +1 -0
  64. package/dist/lib/extensions/vidyard-video.d.ts +33 -0
  65. package/dist/lib/extensions/vidyard-video.d.ts.map +1 -0
  66. package/dist/lib/extensions/vimeo-video.d.ts +36 -0
  67. package/dist/lib/extensions/vimeo-video.d.ts.map +1 -0
  68. package/dist/lib/extensions/wistia-video.d.ts +34 -0
  69. package/dist/lib/extensions/wistia-video.d.ts.map +1 -0
  70. package/dist/lib/extensions/youtube-video.d.ts +38 -0
  71. package/dist/lib/extensions/youtube-video.d.ts.map +1 -0
  72. package/dist/lib/main.d.ts +2 -2
  73. package/dist/lib/main.d.ts.map +1 -1
  74. package/dist/lib/types.d.ts +134 -42
  75. package/dist/lib/types.d.ts.map +1 -1
  76. package/dist/lib/utils/get-fitted-size.d.ts +5 -0
  77. package/dist/lib/utils/get-fitted-size.d.ts.map +1 -0
  78. package/dist/lib/utils/get-full-size-dim.d.ts +5 -0
  79. package/dist/lib/utils/get-full-size-dim.d.ts.map +1 -0
  80. package/dist/lib/utils/get-style.d.ts +5 -0
  81. package/dist/lib/utils/get-style.d.ts.map +1 -0
  82. package/dist/lib/utils/index.d.ts +3 -0
  83. package/dist/lib/utils/index.d.ts.map +1 -0
  84. package/dist/lib/utils/is-not-zero-css.d.ts +2 -0
  85. package/dist/lib/utils/is-not-zero-css.d.ts.map +1 -0
  86. package/dist/lib/utils/parse-element.d.ts +3 -0
  87. package/dist/lib/utils/parse-element.d.ts.map +1 -0
  88. package/dist/lib/vista-box.d.ts +107 -0
  89. package/dist/lib/vista-box.d.ts.map +1 -0
  90. package/dist/lib/vista-hires-transition.d.ts +32 -0
  91. package/dist/lib/vista-hires-transition.d.ts.map +1 -0
  92. package/dist/lib/vista-image-event.d.ts +23 -0
  93. package/dist/lib/vista-image-event.d.ts.map +1 -0
  94. package/dist/lib/vista-image.d.ts +33 -0
  95. package/dist/lib/vista-image.d.ts.map +1 -0
  96. package/dist/lib/{pointers.d.ts → vista-pointers.d.ts} +1 -1
  97. package/dist/lib/vista-pointers.d.ts.map +1 -0
  98. package/dist/lib/vista-state.d.ts +18 -0
  99. package/dist/lib/vista-state.d.ts.map +1 -0
  100. package/dist/lib/vista-view.d.ts +25 -28
  101. package/dist/lib/vista-view.d.ts.map +1 -1
  102. package/dist/react.d.ts +9 -9
  103. package/dist/react.d.ts.map +1 -1
  104. package/dist/react.js +59 -49
  105. package/dist/solid.d.ts +8 -11
  106. package/dist/solid.d.ts.map +1 -1
  107. package/dist/solid.js +28 -32
  108. package/dist/style.css +1 -1
  109. package/dist/styles/autumn-amber.css +1 -0
  110. package/dist/styles/autumn-amber.d.ts +1 -0
  111. package/dist/styles/cotton-candy.css +1 -0
  112. package/dist/styles/cotton-candy.d.ts +1 -0
  113. package/dist/styles/dark-rounded.css +1 -1
  114. package/dist/styles/ember-glow.css +1 -0
  115. package/dist/styles/ember-glow.d.ts +1 -0
  116. package/dist/styles/extensions/image-story.css +1 -0
  117. package/dist/styles/extensions/image-story.d.ts +1 -0
  118. package/dist/styles/forest-moss.css +1 -0
  119. package/dist/styles/forest-moss.d.ts +1 -0
  120. package/dist/styles/green-lake.css +1 -0
  121. package/dist/styles/green-lake.d.ts +1 -0
  122. package/dist/styles/ice-crystal.css +1 -0
  123. package/dist/styles/ice-crystal.d.ts +1 -0
  124. package/dist/styles/lavender-fields.css +1 -0
  125. package/dist/styles/lavender-fields.d.ts +1 -0
  126. package/dist/styles/midnight-gold.css +1 -0
  127. package/dist/styles/midnight-gold.d.ts +1 -0
  128. package/dist/styles/midnight-ocean.css +1 -0
  129. package/dist/styles/midnight-ocean.d.ts +1 -0
  130. package/dist/styles/mint-chocolate.css +1 -0
  131. package/dist/styles/mint-chocolate.d.ts +1 -0
  132. package/dist/styles/neon-nights.css +1 -0
  133. package/dist/styles/neon-nights.d.ts +1 -0
  134. package/dist/styles/paper-light.css +1 -0
  135. package/dist/styles/paper-light.d.ts +1 -0
  136. package/dist/styles/retro-arcade.css +1 -0
  137. package/dist/styles/retro-arcade.d.ts +1 -0
  138. package/dist/styles/soft-neutral.css +1 -0
  139. package/dist/styles/soft-neutral.d.ts +1 -0
  140. package/dist/styles/stark-minimal.css +1 -0
  141. package/dist/styles/stark-minimal.d.ts +1 -0
  142. package/dist/styles/strawberry.css +1 -0
  143. package/dist/styles/strawberry.d.ts +1 -0
  144. package/dist/svelte.d.ts +11 -2
  145. package/dist/svelte.d.ts.map +1 -1
  146. package/dist/svelte.js +36 -14
  147. package/dist/vista-box-CQvGrjln.js +318 -0
  148. package/dist/vistaview.d.ts +9 -2
  149. package/dist/vistaview.d.ts.map +1 -1
  150. package/dist/vistaview.js +719 -686
  151. package/dist/vistaview.umd.js +14 -7
  152. package/dist/vue.d.ts +28 -9
  153. package/dist/vue.d.ts.map +1 -1
  154. package/dist/vue.js +43 -24
  155. package/package.json +8 -3
  156. package/dist/lib/defaults/setup.d.ts +0 -3
  157. package/dist/lib/defaults/setup.d.ts.map +0 -1
  158. package/dist/lib/errors.d.ts +0 -4
  159. package/dist/lib/errors.d.ts.map +0 -1
  160. package/dist/lib/image-state.d.ts +0 -40
  161. package/dist/lib/image-state.d.ts.map +0 -1
  162. package/dist/lib/pointers.d.ts.map +0 -1
  163. package/dist/lib/utils.d.ts +0 -27
  164. package/dist/lib/utils.d.ts.map +0 -1
@@ -0,0 +1,621 @@
1
+ function gn(w) {
2
+ return w && w.__esModule && Object.prototype.hasOwnProperty.call(w, "default") ? w.default : w;
3
+ }
4
+ /*! @license DOMPurify 3.3.1 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.1/LICENSE */
5
+ var We, bt;
6
+ function Dt() {
7
+ if (bt) return We;
8
+ bt = 1;
9
+ const {
10
+ entries: w,
11
+ setPrototypeOf: G,
12
+ isFrozen: M,
13
+ getPrototypeOf: v,
14
+ getOwnPropertyDescriptor: L
15
+ } = Object;
16
+ let {
17
+ freeze: r,
18
+ seal: u,
19
+ create: _
20
+ } = Object, {
21
+ apply: E,
22
+ construct: I
23
+ } = typeof Reflect < "u" && Reflect;
24
+ r || (r = function(o) {
25
+ return o;
26
+ }), u || (u = function(o) {
27
+ return o;
28
+ }), E || (E = function(o, c) {
29
+ for (var a = arguments.length, f = new Array(a > 2 ? a - 2 : 0), N = 2; N < a; N++)
30
+ f[N - 2] = arguments[N];
31
+ return o.apply(c, f);
32
+ }), I || (I = function(o) {
33
+ for (var c = arguments.length, a = new Array(c > 1 ? c - 1 : 0), f = 1; f < c; f++)
34
+ a[f - 1] = arguments[f];
35
+ return new o(...a);
36
+ });
37
+ const d = O(Array.prototype.forEach), Ct = O(Array.prototype.lastIndexOf), je = O(Array.prototype.pop), J = O(Array.prototype.push), It = O(Array.prototype.splice), ce = O(String.prototype.toLowerCase), Ae = O(String.prototype.toString), Se = O(String.prototype.match), Q = O(String.prototype.replace), wt = O(String.prototype.indexOf), Mt = O(String.prototype.trim), x = O(Object.prototype.hasOwnProperty), y = O(RegExp.prototype.test), ee = vt(TypeError);
38
+ function O(l) {
39
+ return function(o) {
40
+ o instanceof RegExp && (o.lastIndex = 0);
41
+ for (var c = arguments.length, a = new Array(c > 1 ? c - 1 : 0), f = 1; f < c; f++)
42
+ a[f - 1] = arguments[f];
43
+ return E(l, o, a);
44
+ };
45
+ }
46
+ function vt(l) {
47
+ return function() {
48
+ for (var o = arguments.length, c = new Array(o), a = 0; a < o; a++)
49
+ c[a] = arguments[a];
50
+ return I(l, c);
51
+ };
52
+ }
53
+ function s(l, o) {
54
+ let c = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : ce;
55
+ G && G(l, null);
56
+ let a = o.length;
57
+ for (; a--; ) {
58
+ let f = o[a];
59
+ if (typeof f == "string") {
60
+ const N = c(f);
61
+ N !== f && (M(o) || (o[a] = N), f = N);
62
+ }
63
+ l[f] = !0;
64
+ }
65
+ return l;
66
+ }
67
+ function xt(l) {
68
+ for (let o = 0; o < l.length; o++)
69
+ x(l, o) || (l[o] = null);
70
+ return l;
71
+ }
72
+ function P(l) {
73
+ const o = _(null);
74
+ for (const [c, a] of w(l))
75
+ x(l, c) && (Array.isArray(a) ? o[c] = xt(a) : a && typeof a == "object" && a.constructor === Object ? o[c] = P(a) : o[c] = a);
76
+ return o;
77
+ }
78
+ function te(l, o) {
79
+ for (; l !== null; ) {
80
+ const a = L(l, o);
81
+ if (a) {
82
+ if (a.get)
83
+ return O(a.get);
84
+ if (typeof a.value == "function")
85
+ return O(a.value);
86
+ }
87
+ l = v(l);
88
+ }
89
+ function c() {
90
+ return null;
91
+ }
92
+ return c;
93
+ }
94
+ const Xe = r(["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"]), Le = r(["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"]), Re = r(["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"]), Pt = r(["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"]), ye = r(["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"]), kt = r(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), $e = r(["#text"]), Ve = r(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "exportparts", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inert", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "part", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "slot", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns", "slot"]), Oe = r(["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"]), qe = r(["accent", "accentunder", "align", "bevelled", "close", "columnsalign", "columnlines", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lspace", "lquote", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]), ue = r(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), Ut = u(/\{\{[\w\W]*|[\w\W]*\}\}/gm), Ft = u(/<%[\w\W]*|[\w\W]*%>/gm), Ht = u(/\$\{[\w\W]*/gm), zt = u(/^data-[\-\w.\u00B7-\uFFFF]+$/), Gt = u(/^aria-[\-\w]+$/), Ke = u(
95
+ /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
96
+ // eslint-disable-line no-useless-escape
97
+ ), Bt = u(/^(?:\w+script|data):/i), Wt = u(
98
+ /[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g
99
+ // eslint-disable-line no-control-regex
100
+ ), Ze = u(/^html$/i), Yt = u(/^[a-z][.\w]*(-[.\w]+)+$/i);
101
+ var Je = /* @__PURE__ */ Object.freeze({
102
+ __proto__: null,
103
+ ARIA_ATTR: Gt,
104
+ ATTR_WHITESPACE: Wt,
105
+ CUSTOM_ELEMENT: Yt,
106
+ DATA_ATTR: zt,
107
+ DOCTYPE_NAME: Ze,
108
+ ERB_EXPR: Ft,
109
+ IS_ALLOWED_URI: Ke,
110
+ IS_SCRIPT_OR_DATA: Bt,
111
+ MUSTACHE_EXPR: Ut,
112
+ TMPLIT_EXPR: Ht
113
+ });
114
+ const ne = {
115
+ element: 1,
116
+ text: 3,
117
+ // Deprecated
118
+ progressingInstruction: 7,
119
+ comment: 8,
120
+ document: 9
121
+ }, jt = function() {
122
+ return typeof window > "u" ? null : window;
123
+ }, Xt = function(o, c) {
124
+ if (typeof o != "object" || typeof o.createPolicy != "function")
125
+ return null;
126
+ let a = null;
127
+ const f = "data-tt-policy-suffix";
128
+ c && c.hasAttribute(f) && (a = c.getAttribute(f));
129
+ const N = "dompurify" + (a ? "#" + a : "");
130
+ try {
131
+ return o.createPolicy(N, {
132
+ createHTML(Y) {
133
+ return Y;
134
+ },
135
+ createScriptURL(Y) {
136
+ return Y;
137
+ }
138
+ });
139
+ } catch {
140
+ return console.warn("TrustedTypes policy " + N + " could not be created."), null;
141
+ }
142
+ }, Qe = function() {
143
+ return {
144
+ afterSanitizeAttributes: [],
145
+ afterSanitizeElements: [],
146
+ afterSanitizeShadowDOM: [],
147
+ beforeSanitizeAttributes: [],
148
+ beforeSanitizeElements: [],
149
+ beforeSanitizeShadowDOM: [],
150
+ uponSanitizeAttribute: [],
151
+ uponSanitizeElement: [],
152
+ uponSanitizeShadowNode: []
153
+ };
154
+ };
155
+ function et() {
156
+ let l = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : jt();
157
+ const o = (i) => et(i);
158
+ if (o.version = "3.3.1", o.removed = [], !l || !l.document || l.document.nodeType !== ne.document || !l.Element)
159
+ return o.isSupported = !1, o;
160
+ let {
161
+ document: c
162
+ } = l;
163
+ const a = c, f = a.currentScript, {
164
+ DocumentFragment: N,
165
+ HTMLTemplateElement: Y,
166
+ Node: be,
167
+ Element: tt,
168
+ NodeFilter: oe,
169
+ NamedNodeMap: Vt = l.NamedNodeMap || l.MozNamedAttrMap,
170
+ HTMLFormElement: qt,
171
+ DOMParser: Kt,
172
+ trustedTypes: fe
173
+ } = l, ie = tt.prototype, Zt = te(ie, "cloneNode"), Jt = te(ie, "remove"), Qt = te(ie, "nextSibling"), en = te(ie, "childNodes"), me = te(ie, "parentNode");
174
+ if (typeof Y == "function") {
175
+ const i = c.createElement("template");
176
+ i.content && i.content.ownerDocument && (c = i.content.ownerDocument);
177
+ }
178
+ let b, re = "";
179
+ const {
180
+ implementation: De,
181
+ createNodeIterator: tn,
182
+ createDocumentFragment: nn,
183
+ getElementsByTagName: on
184
+ } = c, {
185
+ importNode: rn
186
+ } = a;
187
+ let D = Qe();
188
+ o.isSupported = typeof w == "function" && typeof me == "function" && De && De.createHTMLDocument !== void 0;
189
+ const {
190
+ MUSTACHE_EXPR: Ne,
191
+ ERB_EXPR: Ce,
192
+ TMPLIT_EXPR: Ie,
193
+ DATA_ATTR: an,
194
+ ARIA_ATTR: sn,
195
+ IS_SCRIPT_OR_DATA: ln,
196
+ ATTR_WHITESPACE: nt,
197
+ CUSTOM_ELEMENT: cn
198
+ } = Je;
199
+ let {
200
+ IS_ALLOWED_URI: ot
201
+ } = Je, g = null;
202
+ const it = s({}, [...Xe, ...Le, ...Re, ...ye, ...$e]);
203
+ let A = null;
204
+ const rt = s({}, [...Ve, ...Oe, ...qe, ...ue]);
205
+ let p = Object.seal(_(null, {
206
+ tagNameCheck: {
207
+ writable: !0,
208
+ configurable: !1,
209
+ enumerable: !0,
210
+ value: null
211
+ },
212
+ attributeNameCheck: {
213
+ writable: !0,
214
+ configurable: !1,
215
+ enumerable: !0,
216
+ value: null
217
+ },
218
+ allowCustomizedBuiltInElements: {
219
+ writable: !0,
220
+ configurable: !1,
221
+ enumerable: !0,
222
+ value: !1
223
+ }
224
+ })), ae = null, we = null;
225
+ const j = Object.seal(_(null, {
226
+ tagCheck: {
227
+ writable: !0,
228
+ configurable: !1,
229
+ enumerable: !0,
230
+ value: null
231
+ },
232
+ attributeCheck: {
233
+ writable: !0,
234
+ configurable: !1,
235
+ enumerable: !0,
236
+ value: null
237
+ }
238
+ }));
239
+ let at = !0, Me = !0, st = !1, lt = !0, X = !1, pe = !0, B = !1, ve = !1, xe = !1, $ = !1, de = !1, Te = !1, ct = !0, ut = !1;
240
+ const un = "user-content-";
241
+ let Pe = !0, se = !1, V = {}, k = null;
242
+ const ke = s({}, ["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"]);
243
+ let ft = null;
244
+ const mt = s({}, ["audio", "video", "img", "source", "image", "track"]);
245
+ let Ue = null;
246
+ const pt = s({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), he = "http://www.w3.org/1998/Math/MathML", Ee = "http://www.w3.org/2000/svg", F = "http://www.w3.org/1999/xhtml";
247
+ let q = F, Fe = !1, He = null;
248
+ const fn = s({}, [he, Ee, F], Ae);
249
+ let ge = s({}, ["mi", "mo", "mn", "ms", "mtext"]), _e = s({}, ["annotation-xml"]);
250
+ const mn = s({}, ["title", "style", "font", "a", "script"]);
251
+ let le = null;
252
+ const pn = ["application/xhtml+xml", "text/html"], dn = "text/html";
253
+ let h = null, K = null;
254
+ const Tn = c.createElement("form"), dt = function(e) {
255
+ return e instanceof RegExp || e instanceof Function;
256
+ }, ze = function() {
257
+ let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
258
+ if (!(K && K === e)) {
259
+ if ((!e || typeof e != "object") && (e = {}), e = P(e), le = // eslint-disable-next-line unicorn/prefer-includes
260
+ pn.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? dn : e.PARSER_MEDIA_TYPE, h = le === "application/xhtml+xml" ? Ae : ce, g = x(e, "ALLOWED_TAGS") ? s({}, e.ALLOWED_TAGS, h) : it, A = x(e, "ALLOWED_ATTR") ? s({}, e.ALLOWED_ATTR, h) : rt, He = x(e, "ALLOWED_NAMESPACES") ? s({}, e.ALLOWED_NAMESPACES, Ae) : fn, Ue = x(e, "ADD_URI_SAFE_ATTR") ? s(P(pt), e.ADD_URI_SAFE_ATTR, h) : pt, ft = x(e, "ADD_DATA_URI_TAGS") ? s(P(mt), e.ADD_DATA_URI_TAGS, h) : mt, k = x(e, "FORBID_CONTENTS") ? s({}, e.FORBID_CONTENTS, h) : ke, ae = x(e, "FORBID_TAGS") ? s({}, e.FORBID_TAGS, h) : P({}), we = x(e, "FORBID_ATTR") ? s({}, e.FORBID_ATTR, h) : P({}), V = x(e, "USE_PROFILES") ? e.USE_PROFILES : !1, at = e.ALLOW_ARIA_ATTR !== !1, Me = e.ALLOW_DATA_ATTR !== !1, st = e.ALLOW_UNKNOWN_PROTOCOLS || !1, lt = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, X = e.SAFE_FOR_TEMPLATES || !1, pe = e.SAFE_FOR_XML !== !1, B = e.WHOLE_DOCUMENT || !1, $ = e.RETURN_DOM || !1, de = e.RETURN_DOM_FRAGMENT || !1, Te = e.RETURN_TRUSTED_TYPE || !1, xe = e.FORCE_BODY || !1, ct = e.SANITIZE_DOM !== !1, ut = e.SANITIZE_NAMED_PROPS || !1, Pe = e.KEEP_CONTENT !== !1, se = e.IN_PLACE || !1, ot = e.ALLOWED_URI_REGEXP || Ke, q = e.NAMESPACE || F, ge = e.MATHML_TEXT_INTEGRATION_POINTS || ge, _e = e.HTML_INTEGRATION_POINTS || _e, p = e.CUSTOM_ELEMENT_HANDLING || {}, e.CUSTOM_ELEMENT_HANDLING && dt(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (p.tagNameCheck = e.CUSTOM_ELEMENT_HANDLING.tagNameCheck), e.CUSTOM_ELEMENT_HANDLING && dt(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (p.attributeNameCheck = e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), e.CUSTOM_ELEMENT_HANDLING && typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (p.allowCustomizedBuiltInElements = e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), X && (Me = !1), de && ($ = !0), V && (g = s({}, $e), A = [], V.html === !0 && (s(g, Xe), s(A, Ve)), V.svg === !0 && (s(g, Le), s(A, Oe), s(A, ue)), V.svgFilters === !0 && (s(g, Re), s(A, Oe), s(A, ue)), V.mathMl === !0 && (s(g, ye), s(A, qe), s(A, ue))), e.ADD_TAGS && (typeof e.ADD_TAGS == "function" ? j.tagCheck = e.ADD_TAGS : (g === it && (g = P(g)), s(g, e.ADD_TAGS, h))), e.ADD_ATTR && (typeof e.ADD_ATTR == "function" ? j.attributeCheck = e.ADD_ATTR : (A === rt && (A = P(A)), s(A, e.ADD_ATTR, h))), e.ADD_URI_SAFE_ATTR && s(Ue, e.ADD_URI_SAFE_ATTR, h), e.FORBID_CONTENTS && (k === ke && (k = P(k)), s(k, e.FORBID_CONTENTS, h)), e.ADD_FORBID_CONTENTS && (k === ke && (k = P(k)), s(k, e.ADD_FORBID_CONTENTS, h)), Pe && (g["#text"] = !0), B && s(g, ["html", "head", "body"]), g.table && (s(g, ["tbody"]), delete ae.tbody), e.TRUSTED_TYPES_POLICY) {
261
+ if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function")
262
+ throw ee('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
263
+ if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function")
264
+ throw ee('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
265
+ b = e.TRUSTED_TYPES_POLICY, re = b.createHTML("");
266
+ } else
267
+ b === void 0 && (b = Xt(fe, f)), b !== null && typeof re == "string" && (re = b.createHTML(""));
268
+ r && r(e), K = e;
269
+ }
270
+ }, Tt = s({}, [...Le, ...Re, ...Pt]), ht = s({}, [...ye, ...kt]), hn = function(e) {
271
+ let t = me(e);
272
+ (!t || !t.tagName) && (t = {
273
+ namespaceURI: q,
274
+ tagName: "template"
275
+ });
276
+ const n = ce(e.tagName), m = ce(t.tagName);
277
+ return He[e.namespaceURI] ? e.namespaceURI === Ee ? t.namespaceURI === F ? n === "svg" : t.namespaceURI === he ? n === "svg" && (m === "annotation-xml" || ge[m]) : !!Tt[n] : e.namespaceURI === he ? t.namespaceURI === F ? n === "math" : t.namespaceURI === Ee ? n === "math" && _e[m] : !!ht[n] : e.namespaceURI === F ? t.namespaceURI === Ee && !_e[m] || t.namespaceURI === he && !ge[m] ? !1 : !ht[n] && (mn[n] || !Tt[n]) : !!(le === "application/xhtml+xml" && He[e.namespaceURI]) : !1;
278
+ }, U = function(e) {
279
+ J(o.removed, {
280
+ element: e
281
+ });
282
+ try {
283
+ me(e).removeChild(e);
284
+ } catch {
285
+ Jt(e);
286
+ }
287
+ }, W = function(e, t) {
288
+ try {
289
+ J(o.removed, {
290
+ attribute: t.getAttributeNode(e),
291
+ from: t
292
+ });
293
+ } catch {
294
+ J(o.removed, {
295
+ attribute: null,
296
+ from: t
297
+ });
298
+ }
299
+ if (t.removeAttribute(e), e === "is")
300
+ if ($ || de)
301
+ try {
302
+ U(t);
303
+ } catch {
304
+ }
305
+ else
306
+ try {
307
+ t.setAttribute(e, "");
308
+ } catch {
309
+ }
310
+ }, Et = function(e) {
311
+ let t = null, n = null;
312
+ if (xe)
313
+ e = "<remove></remove>" + e;
314
+ else {
315
+ const T = Se(e, /^[\r\n\t ]+/);
316
+ n = T && T[0];
317
+ }
318
+ le === "application/xhtml+xml" && q === F && (e = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + e + "</body></html>");
319
+ const m = b ? b.createHTML(e) : e;
320
+ if (q === F)
321
+ try {
322
+ t = new Kt().parseFromString(m, le);
323
+ } catch {
324
+ }
325
+ if (!t || !t.documentElement) {
326
+ t = De.createDocument(q, "template", null);
327
+ try {
328
+ t.documentElement.innerHTML = Fe ? re : m;
329
+ } catch {
330
+ }
331
+ }
332
+ const R = t.body || t.documentElement;
333
+ return e && n && R.insertBefore(c.createTextNode(n), R.childNodes[0] || null), q === F ? on.call(t, B ? "html" : "body")[0] : B ? t.documentElement : R;
334
+ }, gt = function(e) {
335
+ return tn.call(
336
+ e.ownerDocument || e,
337
+ e,
338
+ // eslint-disable-next-line no-bitwise
339
+ oe.SHOW_ELEMENT | oe.SHOW_COMMENT | oe.SHOW_TEXT | oe.SHOW_PROCESSING_INSTRUCTION | oe.SHOW_CDATA_SECTION,
340
+ null
341
+ );
342
+ }, Ge = function(e) {
343
+ return e instanceof qt && (typeof e.nodeName != "string" || typeof e.textContent != "string" || typeof e.removeChild != "function" || !(e.attributes instanceof Vt) || typeof e.removeAttribute != "function" || typeof e.setAttribute != "function" || typeof e.namespaceURI != "string" || typeof e.insertBefore != "function" || typeof e.hasChildNodes != "function");
344
+ }, _t = function(e) {
345
+ return typeof be == "function" && e instanceof be;
346
+ };
347
+ function H(i, e, t) {
348
+ d(i, (n) => {
349
+ n.call(o, e, t, K);
350
+ });
351
+ }
352
+ const At = function(e) {
353
+ let t = null;
354
+ if (H(D.beforeSanitizeElements, e, null), Ge(e))
355
+ return U(e), !0;
356
+ const n = h(e.nodeName);
357
+ if (H(D.uponSanitizeElement, e, {
358
+ tagName: n,
359
+ allowedTags: g
360
+ }), pe && e.hasChildNodes() && !_t(e.firstElementChild) && y(/<[/\w!]/g, e.innerHTML) && y(/<[/\w!]/g, e.textContent) || e.nodeType === ne.progressingInstruction || pe && e.nodeType === ne.comment && y(/<[/\w]/g, e.data))
361
+ return U(e), !0;
362
+ if (!(j.tagCheck instanceof Function && j.tagCheck(n)) && (!g[n] || ae[n])) {
363
+ if (!ae[n] && Lt(n) && (p.tagNameCheck instanceof RegExp && y(p.tagNameCheck, n) || p.tagNameCheck instanceof Function && p.tagNameCheck(n)))
364
+ return !1;
365
+ if (Pe && !k[n]) {
366
+ const m = me(e) || e.parentNode, R = en(e) || e.childNodes;
367
+ if (R && m) {
368
+ const T = R.length;
369
+ for (let C = T - 1; C >= 0; --C) {
370
+ const z = Zt(R[C], !0);
371
+ z.__removalCount = (e.__removalCount || 0) + 1, m.insertBefore(z, Qt(e));
372
+ }
373
+ }
374
+ }
375
+ return U(e), !0;
376
+ }
377
+ return e instanceof tt && !hn(e) || (n === "noscript" || n === "noembed" || n === "noframes") && y(/<\/no(script|embed|frames)/i, e.innerHTML) ? (U(e), !0) : (X && e.nodeType === ne.text && (t = e.textContent, d([Ne, Ce, Ie], (m) => {
378
+ t = Q(t, m, " ");
379
+ }), e.textContent !== t && (J(o.removed, {
380
+ element: e.cloneNode()
381
+ }), e.textContent = t)), H(D.afterSanitizeElements, e, null), !1);
382
+ }, St = function(e, t, n) {
383
+ if (ct && (t === "id" || t === "name") && (n in c || n in Tn))
384
+ return !1;
385
+ if (!(Me && !we[t] && y(an, t))) {
386
+ if (!(at && y(sn, t))) {
387
+ if (!(j.attributeCheck instanceof Function && j.attributeCheck(t, e))) {
388
+ if (!A[t] || we[t]) {
389
+ if (
390
+ // First condition does a very basic check if a) it's basically a valid custom element tagname AND
391
+ // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
392
+ // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
393
+ !(Lt(e) && (p.tagNameCheck instanceof RegExp && y(p.tagNameCheck, e) || p.tagNameCheck instanceof Function && p.tagNameCheck(e)) && (p.attributeNameCheck instanceof RegExp && y(p.attributeNameCheck, t) || p.attributeNameCheck instanceof Function && p.attributeNameCheck(t, e)) || // Alternative, second condition checks if it's an `is`-attribute, AND
394
+ // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
395
+ t === "is" && p.allowCustomizedBuiltInElements && (p.tagNameCheck instanceof RegExp && y(p.tagNameCheck, n) || p.tagNameCheck instanceof Function && p.tagNameCheck(n)))
396
+ ) return !1;
397
+ } else if (!Ue[t]) {
398
+ if (!y(ot, Q(n, nt, ""))) {
399
+ if (!((t === "src" || t === "xlink:href" || t === "href") && e !== "script" && wt(n, "data:") === 0 && ft[e])) {
400
+ if (!(st && !y(ln, Q(n, nt, "")))) {
401
+ if (n)
402
+ return !1;
403
+ }
404
+ }
405
+ }
406
+ }
407
+ }
408
+ }
409
+ }
410
+ return !0;
411
+ }, Lt = function(e) {
412
+ return e !== "annotation-xml" && Se(e, cn);
413
+ }, Rt = function(e) {
414
+ H(D.beforeSanitizeAttributes, e, null);
415
+ const {
416
+ attributes: t
417
+ } = e;
418
+ if (!t || Ge(e))
419
+ return;
420
+ const n = {
421
+ attrName: "",
422
+ attrValue: "",
423
+ keepAttr: !0,
424
+ allowedAttributes: A,
425
+ forceKeepAttr: void 0
426
+ };
427
+ let m = t.length;
428
+ for (; m--; ) {
429
+ const R = t[m], {
430
+ name: T,
431
+ namespaceURI: C,
432
+ value: z
433
+ } = R, Z = h(T), Be = z;
434
+ let S = T === "value" ? Be : Mt(Be);
435
+ if (n.attrName = Z, n.attrValue = S, n.keepAttr = !0, n.forceKeepAttr = void 0, H(D.uponSanitizeAttribute, e, n), S = n.attrValue, ut && (Z === "id" || Z === "name") && (W(T, e), S = un + S), pe && y(/((--!?|])>)|<\/(style|title|textarea)/i, S)) {
436
+ W(T, e);
437
+ continue;
438
+ }
439
+ if (Z === "attributename" && Se(S, "href")) {
440
+ W(T, e);
441
+ continue;
442
+ }
443
+ if (n.forceKeepAttr)
444
+ continue;
445
+ if (!n.keepAttr) {
446
+ W(T, e);
447
+ continue;
448
+ }
449
+ if (!lt && y(/\/>/i, S)) {
450
+ W(T, e);
451
+ continue;
452
+ }
453
+ X && d([Ne, Ce, Ie], (Ot) => {
454
+ S = Q(S, Ot, " ");
455
+ });
456
+ const yt = h(e.nodeName);
457
+ if (!St(yt, Z, S)) {
458
+ W(T, e);
459
+ continue;
460
+ }
461
+ if (b && typeof fe == "object" && typeof fe.getAttributeType == "function" && !C)
462
+ switch (fe.getAttributeType(yt, Z)) {
463
+ case "TrustedHTML": {
464
+ S = b.createHTML(S);
465
+ break;
466
+ }
467
+ case "TrustedScriptURL": {
468
+ S = b.createScriptURL(S);
469
+ break;
470
+ }
471
+ }
472
+ if (S !== Be)
473
+ try {
474
+ C ? e.setAttributeNS(C, T, S) : e.setAttribute(T, S), Ge(e) ? U(e) : je(o.removed);
475
+ } catch {
476
+ W(T, e);
477
+ }
478
+ }
479
+ H(D.afterSanitizeAttributes, e, null);
480
+ }, En = function i(e) {
481
+ let t = null;
482
+ const n = gt(e);
483
+ for (H(D.beforeSanitizeShadowDOM, e, null); t = n.nextNode(); )
484
+ H(D.uponSanitizeShadowNode, t, null), At(t), Rt(t), t.content instanceof N && i(t.content);
485
+ H(D.afterSanitizeShadowDOM, e, null);
486
+ };
487
+ return o.sanitize = function(i) {
488
+ let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, t = null, n = null, m = null, R = null;
489
+ if (Fe = !i, Fe && (i = "<!-->"), typeof i != "string" && !_t(i))
490
+ if (typeof i.toString == "function") {
491
+ if (i = i.toString(), typeof i != "string")
492
+ throw ee("dirty is not a string, aborting");
493
+ } else
494
+ throw ee("toString is not a function");
495
+ if (!o.isSupported)
496
+ return i;
497
+ if (ve || ze(e), o.removed = [], typeof i == "string" && (se = !1), se) {
498
+ if (i.nodeName) {
499
+ const z = h(i.nodeName);
500
+ if (!g[z] || ae[z])
501
+ throw ee("root node is forbidden and cannot be sanitized in-place");
502
+ }
503
+ } else if (i instanceof be)
504
+ t = Et("<!---->"), n = t.ownerDocument.importNode(i, !0), n.nodeType === ne.element && n.nodeName === "BODY" || n.nodeName === "HTML" ? t = n : t.appendChild(n);
505
+ else {
506
+ if (!$ && !X && !B && // eslint-disable-next-line unicorn/prefer-includes
507
+ i.indexOf("<") === -1)
508
+ return b && Te ? b.createHTML(i) : i;
509
+ if (t = Et(i), !t)
510
+ return $ ? null : Te ? re : "";
511
+ }
512
+ t && xe && U(t.firstChild);
513
+ const T = gt(se ? i : t);
514
+ for (; m = T.nextNode(); )
515
+ At(m), Rt(m), m.content instanceof N && En(m.content);
516
+ if (se)
517
+ return i;
518
+ if ($) {
519
+ if (de)
520
+ for (R = nn.call(t.ownerDocument); t.firstChild; )
521
+ R.appendChild(t.firstChild);
522
+ else
523
+ R = t;
524
+ return (A.shadowroot || A.shadowrootmode) && (R = rn.call(a, R, !0)), R;
525
+ }
526
+ let C = B ? t.outerHTML : t.innerHTML;
527
+ return B && g["!doctype"] && t.ownerDocument && t.ownerDocument.doctype && t.ownerDocument.doctype.name && y(Ze, t.ownerDocument.doctype.name) && (C = "<!DOCTYPE " + t.ownerDocument.doctype.name + `>
528
+ ` + C), X && d([Ne, Ce, Ie], (z) => {
529
+ C = Q(C, z, " ");
530
+ }), b && Te ? b.createHTML(C) : C;
531
+ }, o.setConfig = function() {
532
+ let i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
533
+ ze(i), ve = !0;
534
+ }, o.clearConfig = function() {
535
+ K = null, ve = !1;
536
+ }, o.isValidAttribute = function(i, e, t) {
537
+ K || ze({});
538
+ const n = h(i), m = h(e);
539
+ return St(n, m, t);
540
+ }, o.addHook = function(i, e) {
541
+ typeof e == "function" && J(D[i], e);
542
+ }, o.removeHook = function(i, e) {
543
+ if (e !== void 0) {
544
+ const t = Ct(D[i], e);
545
+ return t === -1 ? void 0 : It(D[i], t, 1)[0];
546
+ }
547
+ return je(D[i]);
548
+ }, o.removeHooks = function(i) {
549
+ D[i] = [];
550
+ }, o.removeAllHooks = function() {
551
+ D = Qe();
552
+ }, o;
553
+ }
554
+ var $t = et();
555
+ return We = $t, We;
556
+ }
557
+ var Ye, Nt;
558
+ function _n() {
559
+ return Nt || (Nt = 1, Ye = self.DOMPurify || (self.DOMPurify = Dt().default || Dt())), Ye;
560
+ }
561
+ var An = _n();
562
+ const Sn = /* @__PURE__ */ gn(An), Ln = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-up-icon lucide-chevron-up"><path d="m18 15-6-6-6 6"/></svg>';
563
+ function Rn(w, G, M) {
564
+ const v = parseInt(w, 10), L = Object.keys(G).reduce(
565
+ (u, _) => {
566
+ const E = parseInt(_, 10);
567
+ return E < v ? u.before.push(_) : E > v && u.after.push(_), u;
568
+ },
569
+ { before: [], after: [] }
570
+ );
571
+ let r = 0;
572
+ for (; L.before.length + L.after.length > M; ) {
573
+ const u = r % 2 === 0 ? L.before.shift() ?? L.after.pop() : L.after.pop() ?? L.before.shift();
574
+ r++, u !== void 0 && delete G[u];
575
+ }
576
+ }
577
+ function yn({
578
+ getStory: w,
579
+ maxStoryCache: G = 5
580
+ }) {
581
+ let M = {}, v = "", L = null, r = null, u = null;
582
+ return {
583
+ name: "imageStory",
584
+ control: () => {
585
+ L = document.createElement("div"), L.classList.add("vvw-story");
586
+ const _ = document.createElement("div");
587
+ _.classList.add("vvw-story-container"), L.appendChild(_), r = document.createElement("div"), r.classList.add("vvw-story-text"), u = document.createElement("div"), u.classList.add("vvw-story-loading");
588
+ const E = document.createElement("button");
589
+ return E.classList.add("vvw-story-button"), E.innerHTML = Ln, E.addEventListener("click", () => {
590
+ r != null && r.classList.contains("expanded") ? (r.classList.remove("expanded"), E.classList.remove("expanded"), _.style.removeProperty("--vvw-story-height")) : (r == null || r.classList.add("expanded"), E.classList.add("expanded"), requestAnimationFrame(() => {
591
+ const I = r == null ? void 0 : r.offsetHeight;
592
+ _.style.setProperty("--vvw-story-height", `${I}px`);
593
+ }));
594
+ }), _.appendChild(r), _.appendChild(E), L;
595
+ },
596
+ onClose(_) {
597
+ if (v !== "") {
598
+ const E = M[v];
599
+ E && E.onUnload && E.onUnload();
600
+ }
601
+ M = {}, v = "", L && L.remove(), L = null, r = null, u = null;
602
+ },
603
+ onImageView: (_, E) => {
604
+ const I = _.index.to ?? -1;
605
+ if (v !== "" && `${I}` !== v) {
606
+ const d = M[v];
607
+ d && d.onUnload && d.onUnload();
608
+ }
609
+ if (`${I}` in M) {
610
+ const d = M[`${I}`];
611
+ r && (r.innerHTML = d.content || ""), d.onLoad && d.onLoad();
612
+ } else
613
+ r && (r.innerHTML = ""), r && u && r.appendChild(u), w(I).then((d) => {
614
+ d !== null ? (d.content = Sn.sanitize(d.content), M[`${I}`] = d, r && (r.innerHTML = d.content || ""), d.onLoad && d.onLoad(), Rn(`${I}`, M, G)) : delete M[`${I}`];
615
+ });
616
+ }
617
+ };
618
+ }
619
+ export {
620
+ yn as imageStory
621
+ };