From 0f5528f6a2598843847db65b0d1ab6aee0cf6e54 Mon Sep 17 00:00:00 2001 From: Spaghetti-bit Date: Wed, 6 Nov 2024 09:32:04 -0700 Subject: [PATCH] A possible FPS lag fix caused by chat spam. (#27292) * Testing... * Allows duplicate messages with the tally marker but doesn't animate the badge. * Removes a few unused imports and removes some comments. * Rebuild TGUI, merge conflict inbound... maybe. --- tgui/packages/tgui-panel/chat/renderer.js | 17 ++++----- tgui/public/tgui-panel.bundle.js | 44 +++++++++++------------ 2 files changed, 29 insertions(+), 32 deletions(-) diff --git a/tgui/packages/tgui-panel/chat/renderer.js b/tgui/packages/tgui-panel/chat/renderer.js index 455c296ebd2a..deb0e802383f 100644 --- a/tgui/packages/tgui-panel/chat/renderer.js +++ b/tgui/packages/tgui-panel/chat/renderer.js @@ -96,10 +96,7 @@ const updateMessageBadge = (message) => { const foundBadge = node.querySelector('.Chat__badge'); const badge = foundBadge || document.createElement('div'); badge.textContent = times; - badge.className = classes(['Chat__badge', 'Chat__badge--animate']); - requestAnimationFrame(() => { - badge.className = 'Chat__badge'; - }); + badge.className = 'Chat__badge'; if (!foundBadge) { node.appendChild(badge); } @@ -297,11 +294,7 @@ class ChatRenderer { } } - getCombinableMessage(predicate) { - const now = Date.now(); - const len = this.visibleMessages.length; - const from = len - 1; - const to = Math.max(0, len - COMBINE_MAX_MESSAGES); + getCombinableMessage(predicate, now, from, to) { for (let i = from; i >= to; i--) { const message = this.visibleMessages[i]; // prettier-ignore @@ -336,10 +329,14 @@ class ChatRenderer { const fragment = document.createDocumentFragment(); const countByType = {}; let node; + + const len = this.visibleMessages.length; + const from = len - 1; + const to = Math.max(0, len - COMBINE_MAX_MESSAGES); for (let payload of batch) { const message = createMessage(payload); // Combine messages - const combinable = this.getCombinableMessage(message); + const combinable = this.getCombinableMessage(message, now, from, to); if (combinable) { combinable.times = (combinable.times || 1) + 1; updateMessageBadge(combinable); diff --git a/tgui/public/tgui-panel.bundle.js b/tgui/public/tgui-panel.bundle.js index 09f4c45d2676..7376322b852e 100644 --- a/tgui/public/tgui-panel.bundle.js +++ b/tgui/public/tgui-panel.bundle.js @@ -1,4 +1,4 @@ -(function(){(function(){var xn={96376:function(y,n,t){"use strict";n.__esModule=!0,n.createPopper=void 0,n.popperGenerator=g;var e=u(t(74758)),r=u(t(28811)),o=u(t(98309)),a=u(t(44896)),s=u(t(33118)),i=u(t(10579)),c=u(t(56500)),p=u(t(17633));n.detectOverflow=p.default;var f=t(75573);function u(h){return h&&h.__esModule?h:{default:h}}var v={placement:"bottom",modifiers:[],strategy:"absolute"};function l(){for(var h=arguments.length,m=new Array(h),E=0;E0&&(0,r.round)(u.width)/c.offsetWidth||1,l=c.offsetHeight>0&&(0,r.round)(u.height)/c.offsetHeight||1);var g=(0,e.isElement)(c)?(0,o.default)(c):window,d=g.visualViewport,h=!(0,a.default)()&&f,m=(u.left+(h&&d?d.offsetLeft:0))/v,E=(u.top+(h&&d?d.offsetTop:0))/l,I=u.width/v,O=u.height/l;return{width:I,height:O,top:E,right:m+I,bottom:E+O,left:m,x:m,y:E}}},49035:function(y,n,t){"use strict";n.__esModule=!0,n.default=O;var e=t(46206),r=h(t(87991)),o=h(t(79752)),a=h(t(98309)),s=h(t(44896)),i=h(t(40600)),c=h(t(16599)),p=t(75573),f=h(t(37786)),u=h(t(57819)),v=h(t(4206)),l=h(t(12972)),g=h(t(81666)),d=t(63618);function h(C){return C&&C.__esModule?C:{default:C}}function m(C,S){var b=(0,f.default)(C,!1,S==="fixed");return b.top=b.top+C.clientTop,b.left=b.left+C.clientLeft,b.bottom=b.top+C.clientHeight,b.right=b.left+C.clientWidth,b.width=C.clientWidth,b.height=C.clientHeight,b.x=b.left,b.y=b.top,b}function E(C,S,b){return S===e.viewport?(0,g.default)((0,r.default)(C,b)):(0,p.isElement)(S)?m(S,b):(0,g.default)((0,o.default)((0,i.default)(C)))}function I(C){var S=(0,a.default)((0,u.default)(C)),b=["absolute","fixed"].indexOf((0,c.default)(C).position)>=0,T=b&&(0,p.isHTMLElement)(C)?(0,s.default)(C):C;return(0,p.isElement)(T)?S.filter(function(P){return(0,p.isElement)(P)&&(0,v.default)(P,T)&&(0,l.default)(P)!=="body"}):[]}function O(C,S,b,T){var P=S==="clippingParents"?I(C):[].concat(S),N=[].concat(P,[b]),M=N[0],w=N.reduce(function(D,V){var F=E(C,V,T);return D.top=(0,d.max)(F.top,D.top),D.right=(0,d.min)(F.right,D.right),D.bottom=(0,d.min)(F.bottom,D.bottom),D.left=(0,d.max)(F.left,D.left),D},E(C,M,T));return w.width=w.right-w.left,w.height=w.bottom-w.top,w.x=w.left,w.y=w.top,w}},74758:function(y,n,t){"use strict";n.__esModule=!0,n.default=v;var e=f(t(37786)),r=f(t(13390)),o=f(t(12972)),a=t(75573),s=f(t(79697)),i=f(t(40600)),c=f(t(10798)),p=t(63618);function f(l){return l&&l.__esModule?l:{default:l}}function u(l){var g=l.getBoundingClientRect(),d=(0,p.round)(g.width)/l.offsetWidth||1,h=(0,p.round)(g.height)/l.offsetHeight||1;return d!==1||h!==1}function v(l,g,d){d===void 0&&(d=!1);var h=(0,a.isHTMLElement)(g),m=(0,a.isHTMLElement)(g)&&u(g),E=(0,i.default)(g),I=(0,e.default)(l,m,d),O={scrollLeft:0,scrollTop:0},C={x:0,y:0};return(h||!h&&!d)&&(((0,o.default)(g)!=="body"||(0,c.default)(E))&&(O=(0,r.default)(g)),(0,a.isHTMLElement)(g)?(C=(0,e.default)(g,!0),C.x+=g.clientLeft,C.y+=g.clientTop):E&&(C.x=(0,s.default)(E))),{x:I.left+O.scrollLeft-C.x,y:I.top+O.scrollTop-C.y,width:I.width,height:I.height}}},16599:function(y,n,t){"use strict";n.__esModule=!0,n.default=o;var e=r(t(95115));function r(a){return a&&a.__esModule?a:{default:a}}function o(a){return(0,e.default)(a).getComputedStyle(a)}},40600:function(y,n,t){"use strict";n.__esModule=!0,n.default=r;var e=t(75573);function r(o){return(((0,e.isElement)(o)?o.ownerDocument:o.document)||window.document).documentElement}},79752:function(y,n,t){"use strict";n.__esModule=!0,n.default=c;var e=i(t(40600)),r=i(t(16599)),o=i(t(79697)),a=i(t(43750)),s=t(63618);function i(p){return p&&p.__esModule?p:{default:p}}function c(p){var f,u=(0,e.default)(p),v=(0,a.default)(p),l=(f=p.ownerDocument)==null?void 0:f.body,g=(0,s.max)(u.scrollWidth,u.clientWidth,l?l.scrollWidth:0,l?l.clientWidth:0),d=(0,s.max)(u.scrollHeight,u.clientHeight,l?l.scrollHeight:0,l?l.clientHeight:0),h=-v.scrollLeft+(0,o.default)(p),m=-v.scrollTop;return(0,r.default)(l||u).direction==="rtl"&&(h+=(0,s.max)(u.clientWidth,l?l.clientWidth:0)-g),{width:g,height:d,x:h,y:m}}},3073:function(y,n){"use strict";n.__esModule=!0,n.default=t;function t(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}},28811:function(y,n,t){"use strict";n.__esModule=!0,n.default=o;var e=r(t(37786));function r(a){return a&&a.__esModule?a:{default:a}}function o(a){var s=(0,e.default)(a),i=a.offsetWidth,c=a.offsetHeight;return Math.abs(s.width-i)<=1&&(i=s.width),Math.abs(s.height-c)<=1&&(c=s.height),{x:a.offsetLeft,y:a.offsetTop,width:i,height:c}}},12972:function(y,n){"use strict";n.__esModule=!0,n.default=t;function t(e){return e?(e.nodeName||"").toLowerCase():null}},13390:function(y,n,t){"use strict";n.__esModule=!0,n.default=i;var e=s(t(43750)),r=s(t(95115)),o=t(75573),a=s(t(3073));function s(c){return c&&c.__esModule?c:{default:c}}function i(c){return c===(0,r.default)(c)||!(0,o.isHTMLElement)(c)?(0,e.default)(c):(0,a.default)(c)}},44896:function(y,n,t){"use strict";n.__esModule=!0,n.default=v;var e=p(t(95115)),r=p(t(12972)),o=p(t(16599)),a=t(75573),s=p(t(87031)),i=p(t(57819)),c=p(t(35366));function p(l){return l&&l.__esModule?l:{default:l}}function f(l){return!(0,a.isHTMLElement)(l)||(0,o.default)(l).position==="fixed"?null:l.offsetParent}function u(l){var g=/firefox/i.test((0,c.default)()),d=/Trident/i.test((0,c.default)());if(d&&(0,a.isHTMLElement)(l)){var h=(0,o.default)(l);if(h.position==="fixed")return null}var m=(0,i.default)(l);for((0,a.isShadowRoot)(m)&&(m=m.host);(0,a.isHTMLElement)(m)&&["html","body"].indexOf((0,r.default)(m))<0;){var E=(0,o.default)(m);if(E.transform!=="none"||E.perspective!=="none"||E.contain==="paint"||["transform","perspective"].indexOf(E.willChange)!==-1||g&&E.willChange==="filter"||g&&E.filter&&E.filter!=="none")return m;m=m.parentNode}return null}function v(l){for(var g=(0,e.default)(l),d=f(l);d&&(0,s.default)(d)&&(0,o.default)(d).position==="static";)d=f(d);return d&&((0,r.default)(d)==="html"||(0,r.default)(d)==="body"&&(0,o.default)(d).position==="static")?g:d||u(l)||g}},57819:function(y,n,t){"use strict";n.__esModule=!0,n.default=s;var e=a(t(12972)),r=a(t(40600)),o=t(75573);function a(i){return i&&i.__esModule?i:{default:i}}function s(i){return(0,e.default)(i)==="html"?i:i.assignedSlot||i.parentNode||((0,o.isShadowRoot)(i)?i.host:null)||(0,r.default)(i)}},24426:function(y,n,t){"use strict";n.__esModule=!0,n.default=i;var e=s(t(57819)),r=s(t(10798)),o=s(t(12972)),a=t(75573);function s(c){return c&&c.__esModule?c:{default:c}}function i(c){return["html","body","#document"].indexOf((0,o.default)(c))>=0?c.ownerDocument.body:(0,a.isHTMLElement)(c)&&(0,r.default)(c)?c:i((0,e.default)(c))}},87991:function(y,n,t){"use strict";n.__esModule=!0,n.default=i;var e=s(t(95115)),r=s(t(40600)),o=s(t(79697)),a=s(t(89331));function s(c){return c&&c.__esModule?c:{default:c}}function i(c,p){var f=(0,e.default)(c),u=(0,r.default)(c),v=f.visualViewport,l=u.clientWidth,g=u.clientHeight,d=0,h=0;if(v){l=v.width,g=v.height;var m=(0,a.default)();(m||!m&&p==="fixed")&&(d=v.offsetLeft,h=v.offsetTop)}return{width:l,height:g,x:d+(0,o.default)(c),y:h}}},95115:function(y,n){"use strict";n.__esModule=!0,n.default=t;function t(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var r=e.ownerDocument;return r&&r.defaultView||window}return e}},43750:function(y,n,t){"use strict";n.__esModule=!0,n.default=o;var e=r(t(95115));function r(a){return a&&a.__esModule?a:{default:a}}function o(a){var s=(0,e.default)(a),i=s.pageXOffset,c=s.pageYOffset;return{scrollLeft:i,scrollTop:c}}},79697:function(y,n,t){"use strict";n.__esModule=!0,n.default=s;var e=a(t(37786)),r=a(t(40600)),o=a(t(43750));function a(i){return i&&i.__esModule?i:{default:i}}function s(i){return(0,e.default)((0,r.default)(i)).left+(0,o.default)(i).scrollLeft}},75573:function(y,n,t){"use strict";n.__esModule=!0,n.isElement=o,n.isHTMLElement=a,n.isShadowRoot=s;var e=r(t(95115));function r(i){return i&&i.__esModule?i:{default:i}}function o(i){var c=(0,e.default)(i).Element;return i instanceof c||i instanceof Element}function a(i){var c=(0,e.default)(i).HTMLElement;return i instanceof c||i instanceof HTMLElement}function s(i){if(typeof ShadowRoot=="undefined")return!1;var c=(0,e.default)(i).ShadowRoot;return i instanceof c||i instanceof ShadowRoot}},89331:function(y,n,t){"use strict";n.__esModule=!0,n.default=o;var e=r(t(35366));function r(a){return a&&a.__esModule?a:{default:a}}function o(){return!/^((?!chrome|android).)*safari/i.test((0,e.default)())}},10798:function(y,n,t){"use strict";n.__esModule=!0,n.default=o;var e=r(t(16599));function r(a){return a&&a.__esModule?a:{default:a}}function o(a){var s=(0,e.default)(a),i=s.overflow,c=s.overflowX,p=s.overflowY;return/auto|scroll|overlay|hidden/.test(i+p+c)}},87031:function(y,n,t){"use strict";n.__esModule=!0,n.default=o;var e=r(t(12972));function r(a){return a&&a.__esModule?a:{default:a}}function o(a){return["table","td","th"].indexOf((0,e.default)(a))>=0}},98309:function(y,n,t){"use strict";n.__esModule=!0,n.default=i;var e=s(t(24426)),r=s(t(57819)),o=s(t(95115)),a=s(t(10798));function s(c){return c&&c.__esModule?c:{default:c}}function i(c,p){var f;p===void 0&&(p=[]);var u=(0,e.default)(c),v=u===((f=c.ownerDocument)==null?void 0:f.body),l=(0,o.default)(u),g=v?[l].concat(l.visualViewport||[],(0,a.default)(u)?u:[]):u,d=p.concat(g);return v?d:d.concat(i((0,r.default)(g)))}},46206:function(y,n){"use strict";n.__esModule=!0,n.write=n.viewport=n.variationPlacements=n.top=n.start=n.right=n.reference=n.read=n.popper=n.placements=n.modifierPhases=n.main=n.left=n.end=n.clippingParents=n.bottom=n.beforeWrite=n.beforeRead=n.beforeMain=n.basePlacements=n.auto=n.afterWrite=n.afterRead=n.afterMain=void 0;var t=n.top="top",e=n.bottom="bottom",r=n.right="right",o=n.left="left",a=n.auto="auto",s=n.basePlacements=[t,e,r,o],i=n.start="start",c=n.end="end",p=n.clippingParents="clippingParents",f=n.viewport="viewport",u=n.popper="popper",v=n.reference="reference",l=n.variationPlacements=s.reduce(function(P,N){return P.concat([N+"-"+i,N+"-"+c])},[]),g=n.placements=[].concat(s,[a]).reduce(function(P,N){return P.concat([N,N+"-"+i,N+"-"+c])},[]),d=n.beforeRead="beforeRead",h=n.read="read",m=n.afterRead="afterRead",E=n.beforeMain="beforeMain",I=n.main="main",O=n.afterMain="afterMain",C=n.beforeWrite="beforeWrite",S=n.write="write",b=n.afterWrite="afterWrite",T=n.modifierPhases=[d,h,m,E,I,O,C,S,b]},95996:function(y,n,t){"use strict";n.__esModule=!0;var e={popperGenerator:!0,detectOverflow:!0,createPopperBase:!0,createPopper:!0,createPopperLite:!0};n.popperGenerator=n.detectOverflow=n.createPopperLite=n.createPopperBase=n.createPopper=void 0;var r=t(46206);Object.keys(r).forEach(function(c){c==="default"||c==="__esModule"||Object.prototype.hasOwnProperty.call(e,c)||c in n&&n[c]===r[c]||(n[c]=r[c])});var o=t(39805);Object.keys(o).forEach(function(c){c==="default"||c==="__esModule"||Object.prototype.hasOwnProperty.call(e,c)||c in n&&n[c]===o[c]||(n[c]=o[c])});var a=t(96376);n.popperGenerator=a.popperGenerator,n.detectOverflow=a.detectOverflow,n.createPopperBase=a.createPopper;var s=t(83312);n.createPopper=s.createPopper;var i=t(2473);n.createPopperLite=i.createPopper},19975:function(y,n,t){"use strict";n.__esModule=!0,n.default=void 0;var e=o(t(12972)),r=t(75573);function o(c){return c&&c.__esModule?c:{default:c}}function a(c){var p=c.state;Object.keys(p.elements).forEach(function(f){var u=p.styles[f]||{},v=p.attributes[f]||{},l=p.elements[f];!(0,r.isHTMLElement)(l)||!(0,e.default)(l)||(Object.assign(l.style,u),Object.keys(v).forEach(function(g){var d=v[g];d===!1?l.removeAttribute(g):l.setAttribute(g,d===!0?"":d)}))})}function s(c){var p=c.state,f={popper:{position:p.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(p.elements.popper.style,f.popper),p.styles=f,p.elements.arrow&&Object.assign(p.elements.arrow.style,f.arrow),function(){Object.keys(p.elements).forEach(function(u){var v=p.elements[u],l=p.attributes[u]||{},g=Object.keys(p.styles.hasOwnProperty(u)?p.styles[u]:f[u]),d=g.reduce(function(h,m){return h[m]="",h},{});!(0,r.isHTMLElement)(v)||!(0,e.default)(v)||(Object.assign(v.style,d),Object.keys(l).forEach(function(h){v.removeAttribute(h)}))})}}var i=n.default={name:"applyStyles",enabled:!0,phase:"write",fn:a,effect:s,requires:["computeStyles"]}},52744:function(y,n,t){"use strict";n.__esModule=!0,n.default=void 0;var e=u(t(83104)),r=u(t(28811)),o=u(t(4206)),a=u(t(44896)),s=u(t(41199)),i=t(28595),c=u(t(43286)),p=u(t(81447)),f=t(46206);function u(h){return h&&h.__esModule?h:{default:h}}var v=function(){function h(m,E){return m=typeof m=="function"?m(Object.assign({},E.rects,{placement:E.placement})):m,(0,c.default)(typeof m!="number"?m:(0,p.default)(m,f.basePlacements))}return h}();function l(h){var m,E=h.state,I=h.name,O=h.options,C=E.elements.arrow,S=E.modifiersData.popperOffsets,b=(0,e.default)(E.placement),T=(0,s.default)(b),P=[f.left,f.right].indexOf(b)>=0,N=P?"height":"width";if(!(!C||!S)){var M=v(O.padding,E),w=(0,r.default)(C),D=T==="y"?f.top:f.left,V=T==="y"?f.bottom:f.right,F=E.rects.reference[N]+E.rects.reference[T]-S[T]-E.rects.popper[N],$=S[T]-E.rects.reference[T],Y=(0,a.default)(C),j=Y?T==="y"?Y.clientHeight||0:Y.clientWidth||0:0,x=F/2-$/2,U=M[D],K=j-w[N]-M[V],z=j/2-w[N]/2+x,W=(0,i.within)(U,z,K),tt=T;E.modifiersData[I]=(m={},m[tt]=W,m.centerOffset=W-z,m)}}function g(h){var m=h.state,E=h.options,I=E.element,O=I===void 0?"[data-popper-arrow]":I;O!=null&&(typeof O=="string"&&(O=m.elements.popper.querySelector(O),!O)||(0,o.default)(m.elements.popper,O)&&(m.elements.arrow=O))}var d=n.default={name:"arrow",enabled:!0,phase:"main",fn:l,effect:g,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]}},59894:function(y,n,t){"use strict";n.__esModule=!0,n.default=void 0,n.mapToStyles=l;var e=t(46206),r=f(t(44896)),o=f(t(95115)),a=f(t(40600)),s=f(t(16599)),i=f(t(83104)),c=f(t(45)),p=t(63618);function f(h){return h&&h.__esModule?h:{default:h}}var u={top:"auto",right:"auto",bottom:"auto",left:"auto"};function v(h,m){var E=h.x,I=h.y,O=m.devicePixelRatio||1;return{x:(0,p.round)(E*O)/O||0,y:(0,p.round)(I*O)/O||0}}function l(h){var m,E=h.popper,I=h.popperRect,O=h.placement,C=h.variation,S=h.offsets,b=h.position,T=h.gpuAcceleration,P=h.adaptive,N=h.roundOffsets,M=h.isFixed,w=S.x,D=w===void 0?0:w,V=S.y,F=V===void 0?0:V,$=typeof N=="function"?N({x:D,y:F}):{x:D,y:F};D=$.x,F=$.y;var Y=S.hasOwnProperty("x"),j=S.hasOwnProperty("y"),x=e.left,U=e.top,K=window;if(P){var z=(0,r.default)(E),W="clientHeight",tt="clientWidth";if(z===(0,o.default)(E)&&(z=(0,a.default)(E),(0,s.default)(z).position!=="static"&&b==="absolute"&&(W="scrollHeight",tt="scrollWidth")),z=z,O===e.top||(O===e.left||O===e.right)&&C===e.end){U=e.bottom;var it=M&&z===K&&K.visualViewport?K.visualViewport.height:z[W];F-=it-I.height,F*=T?1:-1}if(O===e.left||(O===e.top||O===e.bottom)&&C===e.end){x=e.right;var lt=M&&z===K&&K.visualViewport?K.visualViewport.width:z[tt];D-=lt-I.width,D*=T?1:-1}}var Z=Object.assign({position:b},P&&u),_=N===!0?v({x:D,y:F},(0,o.default)(E)):{x:D,y:F};if(D=_.x,F=_.y,T){var ut;return Object.assign({},Z,(ut={},ut[U]=j?"0":"",ut[x]=Y?"0":"",ut.transform=(K.devicePixelRatio||1)<=1?"translate("+D+"px, "+F+"px)":"translate3d("+D+"px, "+F+"px, 0)",ut))}return Object.assign({},Z,(m={},m[U]=j?F+"px":"",m[x]=Y?D+"px":"",m.transform="",m))}function g(h){var m=h.state,E=h.options,I=E.gpuAcceleration,O=I===void 0?!0:I,C=E.adaptive,S=C===void 0?!0:C,b=E.roundOffsets,T=b===void 0?!0:b,P={placement:(0,i.default)(m.placement),variation:(0,c.default)(m.placement),popper:m.elements.popper,popperRect:m.rects.popper,gpuAcceleration:O,isFixed:m.options.strategy==="fixed"};m.modifiersData.popperOffsets!=null&&(m.styles.popper=Object.assign({},m.styles.popper,l(Object.assign({},P,{offsets:m.modifiersData.popperOffsets,position:m.options.strategy,adaptive:S,roundOffsets:T})))),m.modifiersData.arrow!=null&&(m.styles.arrow=Object.assign({},m.styles.arrow,l(Object.assign({},P,{offsets:m.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:T})))),m.attributes.popper=Object.assign({},m.attributes.popper,{"data-popper-placement":m.placement})}var d=n.default={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:g,data:{}}},36692:function(y,n,t){"use strict";n.__esModule=!0,n.default=void 0;var e=r(t(95115));function r(i){return i&&i.__esModule?i:{default:i}}var o={passive:!0};function a(i){var c=i.state,p=i.instance,f=i.options,u=f.scroll,v=u===void 0?!0:u,l=f.resize,g=l===void 0?!0:l,d=(0,e.default)(c.elements.popper),h=[].concat(c.scrollParents.reference,c.scrollParents.popper);return v&&h.forEach(function(m){m.addEventListener("scroll",p.update,o)}),g&&d.addEventListener("resize",p.update,o),function(){v&&h.forEach(function(m){m.removeEventListener("scroll",p.update,o)}),g&&d.removeEventListener("resize",p.update,o)}}var s=n.default={name:"eventListeners",enabled:!0,phase:"write",fn:function(){function i(){}return i}(),effect:a,data:{}}},23798:function(y,n,t){"use strict";n.__esModule=!0,n.default=void 0;var e=p(t(71376)),r=p(t(83104)),o=p(t(86459)),a=p(t(17633)),s=p(t(9041)),i=t(46206),c=p(t(45));function p(l){return l&&l.__esModule?l:{default:l}}function f(l){if((0,r.default)(l)===i.auto)return[];var g=(0,e.default)(l);return[(0,o.default)(l),g,(0,o.default)(g)]}function u(l){var g=l.state,d=l.options,h=l.name;if(!g.modifiersData[h]._skip){for(var m=d.mainAxis,E=m===void 0?!0:m,I=d.altAxis,O=I===void 0?!0:I,C=d.fallbackPlacements,S=d.padding,b=d.boundary,T=d.rootBoundary,P=d.altBoundary,N=d.flipVariations,M=N===void 0?!0:N,w=d.allowedAutoPlacements,D=g.options.placement,V=(0,r.default)(D),F=V===D,$=C||(F||!M?[(0,e.default)(D)]:f(D)),Y=[D].concat($).reduce(function(nt,k){return nt.concat((0,r.default)(k)===i.auto?(0,s.default)(g,{placement:k,boundary:b,rootBoundary:T,padding:S,flipVariations:M,allowedAutoPlacements:w}):k)},[]),j=g.rects.reference,x=g.rects.popper,U=new Map,K=!0,z=Y[0],W=0;W=0,_=Z?"width":"height",ut=(0,a.default)(g,{placement:tt,boundary:b,rootBoundary:T,altBoundary:P,padding:S}),ft=Z?lt?i.right:i.left:lt?i.bottom:i.top;j[_]>x[_]&&(ft=(0,e.default)(ft));var pt=(0,e.default)(ft),J=[];if(E&&J.push(ut[it]<=0),O&&J.push(ut[ft]<=0,ut[pt]<=0),J.every(function(nt){return nt})){z=tt,K=!1;break}U.set(tt,J)}if(K)for(var rt=M?3:1,at=function(){function nt(k){var q=Y.find(function(et){var ht=U.get(et);if(ht)return ht.slice(0,k).every(function(Et){return Et})});if(q)return z=q,"break"}return nt}(),mt=rt;mt>0;mt--){var ot=at(mt);if(ot==="break")break}g.placement!==z&&(g.modifiersData[h]._skip=!0,g.placement=z,g.reset=!0)}}var v=n.default={name:"flip",enabled:!0,phase:"main",fn:u,requiresIfExists:["offset"],data:{_skip:!1}}},83761:function(y,n,t){"use strict";n.__esModule=!0,n.default=void 0;var e=t(46206),r=o(t(17633));function o(p){return p&&p.__esModule?p:{default:p}}function a(p,f,u){return u===void 0&&(u={x:0,y:0}),{top:p.top-f.height-u.y,right:p.right-f.width+u.x,bottom:p.bottom-f.height+u.y,left:p.left-f.width-u.x}}function s(p){return[e.top,e.right,e.bottom,e.left].some(function(f){return p[f]>=0})}function i(p){var f=p.state,u=p.name,v=f.rects.reference,l=f.rects.popper,g=f.modifiersData.preventOverflow,d=(0,r.default)(f,{elementContext:"reference"}),h=(0,r.default)(f,{altBoundary:!0}),m=a(d,v),E=a(h,l,g),I=s(m),O=s(E);f.modifiersData[u]={referenceClippingOffsets:m,popperEscapeOffsets:E,isReferenceHidden:I,hasPopperEscaped:O},f.attributes.popper=Object.assign({},f.attributes.popper,{"data-popper-reference-hidden":I,"data-popper-escaped":O})}var c=n.default={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:i}},39805:function(y,n,t){"use strict";n.__esModule=!0,n.preventOverflow=n.popperOffsets=n.offset=n.hide=n.flip=n.eventListeners=n.computeStyles=n.arrow=n.applyStyles=void 0;var e=u(t(19975));n.applyStyles=e.default;var r=u(t(52744));n.arrow=r.default;var o=u(t(59894));n.computeStyles=o.default;var a=u(t(36692));n.eventListeners=a.default;var s=u(t(23798));n.flip=s.default;var i=u(t(83761));n.hide=i.default;var c=u(t(61410));n.offset=c.default;var p=u(t(40107));n.popperOffsets=p.default;var f=u(t(75137));n.preventOverflow=f.default;function u(v){return v&&v.__esModule?v:{default:v}}},61410:function(y,n,t){"use strict";n.__esModule=!0,n.default=void 0,n.distanceAndSkiddingToXY=a;var e=o(t(83104)),r=t(46206);function o(c){return c&&c.__esModule?c:{default:c}}function a(c,p,f){var u=(0,e.default)(c),v=[r.left,r.top].indexOf(u)>=0?-1:1,l=typeof f=="function"?f(Object.assign({},p,{placement:c})):f,g=l[0],d=l[1];return g=g||0,d=(d||0)*v,[r.left,r.right].indexOf(u)>=0?{x:d,y:g}:{x:g,y:d}}function s(c){var p=c.state,f=c.options,u=c.name,v=f.offset,l=v===void 0?[0,0]:v,g=r.placements.reduce(function(E,I){return E[I]=a(I,p.rects,l),E},{}),d=g[p.placement],h=d.x,m=d.y;p.modifiersData.popperOffsets!=null&&(p.modifiersData.popperOffsets.x+=h,p.modifiersData.popperOffsets.y+=m),p.modifiersData[u]=g}var i=n.default={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:s}},40107:function(y,n,t){"use strict";n.__esModule=!0,n.default=void 0;var e=r(t(89951));function r(s){return s&&s.__esModule?s:{default:s}}function o(s){var i=s.state,c=s.name;i.modifiersData[c]=(0,e.default)({reference:i.rects.reference,element:i.rects.popper,strategy:"absolute",placement:i.placement})}var a=n.default={name:"popperOffsets",enabled:!0,phase:"read",fn:o,data:{}}},75137:function(y,n,t){"use strict";n.__esModule=!0,n.default=void 0;var e=t(46206),r=l(t(83104)),o=l(t(41199)),a=l(t(28066)),s=t(28595),i=l(t(28811)),c=l(t(44896)),p=l(t(17633)),f=l(t(45)),u=l(t(34780)),v=t(63618);function l(h){return h&&h.__esModule?h:{default:h}}function g(h){var m=h.state,E=h.options,I=h.name,O=E.mainAxis,C=O===void 0?!0:O,S=E.altAxis,b=S===void 0?!1:S,T=E.boundary,P=E.rootBoundary,N=E.altBoundary,M=E.padding,w=E.tether,D=w===void 0?!0:w,V=E.tetherOffset,F=V===void 0?0:V,$=(0,p.default)(m,{boundary:T,rootBoundary:P,padding:M,altBoundary:N}),Y=(0,r.default)(m.placement),j=(0,f.default)(m.placement),x=!j,U=(0,o.default)(Y),K=(0,a.default)(U),z=m.modifiersData.popperOffsets,W=m.rects.reference,tt=m.rects.popper,it=typeof F=="function"?F(Object.assign({},m.rects,{placement:m.placement})):F,lt=typeof it=="number"?{mainAxis:it,altAxis:it}:Object.assign({mainAxis:0,altAxis:0},it),Z=m.modifiersData.offset?m.modifiersData.offset[m.placement]:null,_={x:0,y:0};if(z){if(C){var ut,ft=U==="y"?e.top:e.left,pt=U==="y"?e.bottom:e.right,J=U==="y"?"height":"width",rt=z[U],at=rt+$[ft],mt=rt-$[pt],ot=D?-tt[J]/2:0,nt=j===e.start?W[J]:tt[J],k=j===e.start?-tt[J]:-W[J],q=m.elements.arrow,et=D&&q?(0,i.default)(q):{width:0,height:0},ht=m.modifiersData["arrow#persistent"]?m.modifiersData["arrow#persistent"].padding:(0,u.default)(),Et=ht[ft],st=ht[pt],yt=(0,s.within)(0,W[J],et[J]),Pt=x?W[J]/2-ot-yt-Et-lt.mainAxis:nt-yt-Et-lt.mainAxis,bt=x?-W[J]/2+ot+yt+st+lt.mainAxis:k+yt+st+lt.mainAxis,ct=m.elements.arrow&&(0,c.default)(m.elements.arrow),gt=ct?U==="y"?ct.clientTop||0:ct.clientLeft||0:0,It=(ut=Z==null?void 0:Z[U])!=null?ut:0,Lt=rt+Pt-It-gt,Vt=rt+bt-It,Ot=(0,s.within)(D?(0,v.min)(at,Lt):at,rt,D?(0,v.max)(mt,Vt):mt);z[U]=Ot,_[U]=Ot-rt}if(b){var dt,St=U==="x"?e.top:e.left,At=U==="x"?e.bottom:e.right,Tt=z[K],Nt=K==="y"?"height":"width",Ft=Tt+$[St],jt=Tt-$[At],$t=[e.top,e.left].indexOf(Y)!==-1,Ht=(dt=Z==null?void 0:Z[K])!=null?dt:0,Yt=$t?Ft:Tt-W[Nt]-tt[Nt]-Ht+lt.altAxis,Wt=$t?Tt+W[Nt]+tt[Nt]-Ht-lt.altAxis:jt,te=D&&$t?(0,s.withinMaxClamp)(Yt,Tt,Wt):(0,s.within)(D?Yt:Ft,Tt,D?Wt:jt);z[K]=te,_[K]=te-Tt}m.modifiersData[I]=_}}var d=n.default={name:"preventOverflow",enabled:!0,phase:"main",fn:g,requiresIfExists:["offset"]}},2473:function(y,n,t){"use strict";n.__esModule=!0,n.defaultModifiers=n.createPopper=void 0;var e=t(96376);n.popperGenerator=e.popperGenerator,n.detectOverflow=e.detectOverflow;var r=i(t(36692)),o=i(t(40107)),a=i(t(59894)),s=i(t(19975));function i(f){return f&&f.__esModule?f:{default:f}}var c=n.defaultModifiers=[r.default,o.default,a.default,s.default],p=n.createPopper=(0,e.popperGenerator)({defaultModifiers:c})},83312:function(y,n,t){"use strict";n.__esModule=!0;var e={createPopper:!0,createPopperLite:!0,defaultModifiers:!0,popperGenerator:!0,detectOverflow:!0};n.defaultModifiers=n.createPopperLite=n.createPopper=void 0;var r=t(96376);n.popperGenerator=r.popperGenerator,n.detectOverflow=r.detectOverflow;var o=d(t(36692)),a=d(t(40107)),s=d(t(59894)),i=d(t(19975)),c=d(t(61410)),p=d(t(23798)),f=d(t(75137)),u=d(t(52744)),v=d(t(83761)),l=t(2473);n.createPopperLite=l.createPopper;var g=t(39805);Object.keys(g).forEach(function(E){E==="default"||E==="__esModule"||Object.prototype.hasOwnProperty.call(e,E)||E in n&&n[E]===g[E]||(n[E]=g[E])});function d(E){return E&&E.__esModule?E:{default:E}}var h=n.defaultModifiers=[o.default,a.default,s.default,i.default,c.default,p.default,f.default,u.default,v.default],m=n.createPopperLite=n.createPopper=(0,r.popperGenerator)({defaultModifiers:h})},9041:function(y,n,t){"use strict";n.__esModule=!0,n.default=i;var e=s(t(45)),r=t(46206),o=s(t(17633)),a=s(t(83104));function s(c){return c&&c.__esModule?c:{default:c}}function i(c,p){p===void 0&&(p={});var f=p,u=f.placement,v=f.boundary,l=f.rootBoundary,g=f.padding,d=f.flipVariations,h=f.allowedAutoPlacements,m=h===void 0?r.placements:h,E=(0,e.default)(u),I=E?d?r.variationPlacements:r.variationPlacements.filter(function(S){return(0,e.default)(S)===E}):r.basePlacements,O=I.filter(function(S){return m.indexOf(S)>=0});O.length===0&&(O=I);var C=O.reduce(function(S,b){return S[b]=(0,o.default)(c,{placement:b,boundary:v,rootBoundary:l,padding:g})[(0,a.default)(b)],S},{});return Object.keys(C).sort(function(S,b){return C[S]-C[b]})}},89951:function(y,n,t){"use strict";n.__esModule=!0,n.default=i;var e=s(t(83104)),r=s(t(45)),o=s(t(41199)),a=t(46206);function s(c){return c&&c.__esModule?c:{default:c}}function i(c){var p=c.reference,f=c.element,u=c.placement,v=u?(0,e.default)(u):null,l=u?(0,r.default)(u):null,g=p.x+p.width/2-f.width/2,d=p.y+p.height/2-f.height/2,h;switch(v){case a.top:h={x:g,y:p.y-f.height};break;case a.bottom:h={x:g,y:p.y+p.height};break;case a.right:h={x:p.x+p.width,y:d};break;case a.left:h={x:p.x-f.width,y:d};break;default:h={x:p.x,y:p.y}}var m=v?(0,o.default)(v):null;if(m!=null){var E=m==="y"?"height":"width";switch(l){case a.start:h[m]=h[m]-(p[E]/2-f[E]/2);break;case a.end:h[m]=h[m]+(p[E]/2-f[E]/2);break;default:}}return h}},10579:function(y,n){"use strict";n.__esModule=!0,n.default=t;function t(e){var r;return function(){return r||(r=new Promise(function(o){Promise.resolve().then(function(){r=void 0,o(e())})})),r}}},17633:function(y,n,t){"use strict";n.__esModule=!0,n.default=v;var e=u(t(49035)),r=u(t(40600)),o=u(t(37786)),a=u(t(89951)),s=u(t(81666)),i=t(46206),c=t(75573),p=u(t(43286)),f=u(t(81447));function u(l){return l&&l.__esModule?l:{default:l}}function v(l,g){g===void 0&&(g={});var d=g,h=d.placement,m=h===void 0?l.placement:h,E=d.strategy,I=E===void 0?l.strategy:E,O=d.boundary,C=O===void 0?i.clippingParents:O,S=d.rootBoundary,b=S===void 0?i.viewport:S,T=d.elementContext,P=T===void 0?i.popper:T,N=d.altBoundary,M=N===void 0?!1:N,w=d.padding,D=w===void 0?0:w,V=(0,p.default)(typeof D!="number"?D:(0,f.default)(D,i.basePlacements)),F=P===i.popper?i.reference:i.popper,$=l.rects.popper,Y=l.elements[M?F:P],j=(0,e.default)((0,c.isElement)(Y)?Y:Y.contextElement||(0,r.default)(l.elements.popper),C,b,I),x=(0,o.default)(l.elements.reference),U=(0,a.default)({reference:x,element:$,strategy:"absolute",placement:m}),K=(0,s.default)(Object.assign({},$,U)),z=P===i.popper?K:x,W={top:j.top-z.top+V.top,bottom:z.bottom-j.bottom+V.bottom,left:j.left-z.left+V.left,right:z.right-j.right+V.right},tt=l.modifiersData.offset;if(P===i.popper&&tt){var it=tt[m];Object.keys(W).forEach(function(lt){var Z=[i.right,i.bottom].indexOf(lt)>=0?1:-1,_=[i.top,i.bottom].indexOf(lt)>=0?"y":"x";W[lt]+=it[_]*Z})}return W}},81447:function(y,n){"use strict";n.__esModule=!0,n.default=t;function t(e,r){return r.reduce(function(o,a){return o[a]=e,o},{})}},28066:function(y,n){"use strict";n.__esModule=!0,n.default=t;function t(e){return e==="x"?"y":"x"}},83104:function(y,n,t){"use strict";n.__esModule=!0,n.default=r;var e=t(46206);function r(o){return o.split("-")[0]}},34780:function(y,n){"use strict";n.__esModule=!0,n.default=t;function t(){return{top:0,right:0,bottom:0,left:0}}},41199:function(y,n){"use strict";n.__esModule=!0,n.default=t;function t(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}},71376:function(y,n){"use strict";n.__esModule=!0,n.default=e;var t={left:"right",right:"left",bottom:"top",top:"bottom"};function e(r){return r.replace(/left|right|bottom|top/g,function(o){return t[o]})}},86459:function(y,n){"use strict";n.__esModule=!0,n.default=e;var t={start:"end",end:"start"};function e(r){return r.replace(/start|end/g,function(o){return t[o]})}},45:function(y,n){"use strict";n.__esModule=!0,n.default=t;function t(e){return e.split("-")[1]}},63618:function(y,n){"use strict";n.__esModule=!0,n.round=n.min=n.max=void 0;var t=n.max=Math.max,e=n.min=Math.min,r=n.round=Math.round},56500:function(y,n){"use strict";n.__esModule=!0,n.default=t;function t(e){var r=e.reduce(function(o,a){var s=o[a.name];return o[a.name]=s?Object.assign({},s,a,{options:Object.assign({},s.options,a.options),data:Object.assign({},s.data,a.data)}):a,o},{});return Object.keys(r).map(function(o){return r[o]})}},43286:function(y,n,t){"use strict";n.__esModule=!0,n.default=o;var e=r(t(34780));function r(a){return a&&a.__esModule?a:{default:a}}function o(a){return Object.assign({},(0,e.default)(),a)}},33118:function(y,n,t){"use strict";n.__esModule=!0,n.default=o;var e=t(46206);function r(a){var s=new Map,i=new Set,c=[];a.forEach(function(f){s.set(f.name,f)});function p(f){i.add(f.name);var u=[].concat(f.requires||[],f.requiresIfExists||[]);u.forEach(function(v){if(!i.has(v)){var l=s.get(v);l&&p(l)}}),c.push(f)}return a.forEach(function(f){i.has(f.name)||p(f)}),c}function o(a){var s=r(a);return e.modifierPhases.reduce(function(i,c){return i.concat(s.filter(function(p){return p.phase===c}))},[])}},81666:function(y,n){"use strict";n.__esModule=!0,n.default=t;function t(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}},35366:function(y,n){"use strict";n.__esModule=!0,n.default=t;function t(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(r){return r.brand+"/"+r.version}).join(" "):navigator.userAgent}},28595:function(y,n,t){"use strict";n.__esModule=!0,n.within=r,n.withinMaxClamp=o;var e=t(63618);function r(a,s,i){return(0,e.max)(a,(0,e.min)(s,i))}function o(a,s,i){var c=r(a,s,i);return c>i?i:c}},22734:function(y){"use strict";/*! @license DOMPurify 2.5.4 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.5.4/LICENSE */(function(n,t){y.exports=t()})(void 0,function(){"use strict";function n(ct){"@babel/helpers - typeof";return n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(gt){return typeof gt}:function(gt){return gt&&typeof Symbol=="function"&>.constructor===Symbol&>!==Symbol.prototype?"symbol":typeof gt},n(ct)}function t(ct,gt){return t=Object.setPrototypeOf||function(){function It(Lt,Vt){return Lt.__proto__=Vt,Lt}return It}(),t(ct,gt)}function e(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(ct){return!1}}function r(ct,gt,It){return e()?r=Reflect.construct:r=function(){function Lt(Vt,Ot,dt){var St=[null];St.push.apply(St,Ot);var At=Function.bind.apply(Vt,St),Tt=new At;return dt&&t(Tt,dt.prototype),Tt}return Lt}(),r.apply(null,arguments)}function o(ct){return a(ct)||s(ct)||i(ct)||p()}function a(ct){if(Array.isArray(ct))return c(ct)}function s(ct){if(typeof Symbol!="undefined"&&ct[Symbol.iterator]!=null||ct["@@iterator"]!=null)return Array.from(ct)}function i(ct,gt){if(ct){if(typeof ct=="string")return c(ct,gt);var It=Object.prototype.toString.call(ct).slice(8,-1);if(It==="Object"&&ct.constructor&&(It=ct.constructor.name),It==="Map"||It==="Set")return Array.from(ct);if(It==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(It))return c(ct,gt)}}function c(ct,gt){(gt==null||gt>ct.length)&&(gt=ct.length);for(var It=0,Lt=new Array(gt);It1?It-1:0),Vt=1;Vt/gm),mt=h(/\${[\w\W]*}/gm),ot=h(/^data-[\-\w.\u00B7-\uFFFF]/),nt=h(/^aria-[\-\w]+$/),k=h(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),q=h(/^(?:\w+script|data):/i),et=h(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),ht=h(/^html$/i),Et=h(/^[a-z][.\w]*(-[.\w]+)+$/i),st=function(){function ct(){return typeof window=="undefined"?null:window}return ct}(),yt=function(){function ct(gt,It){if(n(gt)!=="object"||typeof gt.createPolicy!="function")return null;var Lt=null,Vt="data-tt-policy-suffix";It.currentScript&&It.currentScript.hasAttribute(Vt)&&(Lt=It.currentScript.getAttribute(Vt));var Ot="dompurify"+(Lt?"#"+Lt:"");try{return gt.createPolicy(Ot,{createHTML:function(){function dt(St){return St}return dt}(),createScriptURL:function(){function dt(St){return St}return dt}()})}catch(dt){return null}}return ct}();function Pt(){var ct=arguments.length>0&&arguments[0]!==void 0?arguments[0]:st(),gt=function(){function B(R){return Pt(R)}return B}();if(gt.version="2.5.4",gt.removed=[],!ct||!ct.document||ct.document.nodeType!==9)return gt.isSupported=!1,gt;var It=ct.document,Lt=ct.document,Vt=ct.DocumentFragment,Ot=ct.HTMLTemplateElement,dt=ct.Node,St=ct.Element,At=ct.NodeFilter,Tt=ct.NamedNodeMap,Nt=Tt===void 0?ct.NamedNodeMap||ct.MozNamedAttrMap:Tt,Ft=ct.HTMLFormElement,jt=ct.DOMParser,$t=ct.trustedTypes,Ht=St.prototype,Yt=K(Ht,"cloneNode"),Wt=K(Ht,"nextSibling"),te=K(Ht,"childNodes"),Ce=K(Ht,"parentNode");if(typeof Ot=="function"){var Me=Lt.createElement("template");Me.content&&Me.content.ownerDocument&&(Lt=Me.content.ownerDocument)}var _t=yt($t,It),Re=_t?_t.createHTML(""):"",ve=Lt,se=ve.implementation,sn=ve.createNodeIterator,cn=ve.createDocumentFragment,On=ve.getElementsByTagName,ln=It.importNode,fn={};try{fn=U(Lt).documentMode?Lt.documentMode:{}}catch(B){}var ne={};gt.isSupported=typeof Ce=="function"&&se&&se.createHTMLDocument!==void 0&&fn!==9;var He=rt,we=at,Le=mt,An=ot,dn=nt,Pn=q,vn=et,Be=Et,he=k,Gt=null,re=x({},[].concat(o(z),o(W),o(tt),o(lt),o(_))),Xt=null,hn=x({},[].concat(o(ut),o(ft),o(pt),o(J))),zt=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ce=null,De=null,pn=!0,We=!0,gn=!1,mn=!0,le=!1,Fe=!0,fe=!1,xe=!1,Oe=!1,kt=!1,Ve=!1,je=!1,ze=!0,ke=!1,pe="user-content-",Xe=!0,Ae=!1,be={},ge=null,Qe=x({},["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"]),yn=null,Ze=x({},["audio","video","img","source","image","track"]),Je=null,oe=x({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ue="http://www.w3.org/1998/Math/MathML",$e="http://www.w3.org/2000/svg",ue="http://www.w3.org/1999/xhtml",Te=ue,_e=!1,qe=null,tn=x({},[Ue,$e,ue],P),me,Sn=["application/xhtml+xml","text/html"],Nn="text/html",Qt,Ie=null,En=255,Mn=Lt.createElement("form"),Cn=function(){function B(R){return R instanceof RegExp||R instanceof Function}return B}(),ee=function(){function B(R){Ie&&Ie===R||((!R||n(R)!=="object")&&(R={}),R=U(R),me=Sn.indexOf(R.PARSER_MEDIA_TYPE)===-1?me=Nn:me=R.PARSER_MEDIA_TYPE,Qt=me==="application/xhtml+xml"?P:T,Gt="ALLOWED_TAGS"in R?x({},R.ALLOWED_TAGS,Qt):re,Xt="ALLOWED_ATTR"in R?x({},R.ALLOWED_ATTR,Qt):hn,qe="ALLOWED_NAMESPACES"in R?x({},R.ALLOWED_NAMESPACES,P):tn,Je="ADD_URI_SAFE_ATTR"in R?x(U(oe),R.ADD_URI_SAFE_ATTR,Qt):oe,yn="ADD_DATA_URI_TAGS"in R?x(U(Ze),R.ADD_DATA_URI_TAGS,Qt):Ze,ge="FORBID_CONTENTS"in R?x({},R.FORBID_CONTENTS,Qt):Qe,ce="FORBID_TAGS"in R?x({},R.FORBID_TAGS,Qt):{},De="FORBID_ATTR"in R?x({},R.FORBID_ATTR,Qt):{},be="USE_PROFILES"in R?R.USE_PROFILES:!1,pn=R.ALLOW_ARIA_ATTR!==!1,We=R.ALLOW_DATA_ATTR!==!1,gn=R.ALLOW_UNKNOWN_PROTOCOLS||!1,mn=R.ALLOW_SELF_CLOSE_IN_ATTR!==!1,le=R.SAFE_FOR_TEMPLATES||!1,Fe=R.SAFE_FOR_XML!==!1,fe=R.WHOLE_DOCUMENT||!1,kt=R.RETURN_DOM||!1,Ve=R.RETURN_DOM_FRAGMENT||!1,je=R.RETURN_TRUSTED_TYPE||!1,Oe=R.FORCE_BODY||!1,ze=R.SANITIZE_DOM!==!1,ke=R.SANITIZE_NAMED_PROPS||!1,Xe=R.KEEP_CONTENT!==!1,Ae=R.IN_PLACE||!1,he=R.ALLOWED_URI_REGEXP||he,Te=R.NAMESPACE||ue,zt=R.CUSTOM_ELEMENT_HANDLING||{},R.CUSTOM_ELEMENT_HANDLING&&Cn(R.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(zt.tagNameCheck=R.CUSTOM_ELEMENT_HANDLING.tagNameCheck),R.CUSTOM_ELEMENT_HANDLING&&Cn(R.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(zt.attributeNameCheck=R.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),R.CUSTOM_ELEMENT_HANDLING&&typeof R.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(zt.allowCustomizedBuiltInElements=R.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),le&&(We=!1),Ve&&(kt=!0),be&&(Gt=x({},o(_)),Xt=[],be.html===!0&&(x(Gt,z),x(Xt,ut)),be.svg===!0&&(x(Gt,W),x(Xt,ft),x(Xt,J)),be.svgFilters===!0&&(x(Gt,tt),x(Xt,ft),x(Xt,J)),be.mathMl===!0&&(x(Gt,lt),x(Xt,pt),x(Xt,J))),R.ADD_TAGS&&(Gt===re&&(Gt=U(Gt)),x(Gt,R.ADD_TAGS,Qt)),R.ADD_ATTR&&(Xt===hn&&(Xt=U(Xt)),x(Xt,R.ADD_ATTR,Qt)),R.ADD_URI_SAFE_ATTR&&x(Je,R.ADD_URI_SAFE_ATTR,Qt),R.FORBID_CONTENTS&&(ge===Qe&&(ge=U(ge)),x(ge,R.FORBID_CONTENTS,Qt)),Xe&&(Gt["#text"]=!0),fe&&x(Gt,["html","head","body"]),Gt.table&&(x(Gt,["tbody"]),delete ce.tbody),d&&d(R),Ie=R)}return B}(),Pe=x({},["mi","mo","mn","ms","mtext"]),en=x({},["foreignobject","annotation-xml"]),Rn=x({},["title","style","font","a","script"]),Ge=x({},W);x(Ge,tt),x(Ge,it);var Ye=x({},lt);x(Ye,Z);var bn=function(){function B(R){var G=Ce(R);(!G||!G.tagName)&&(G={namespaceURI:Te,tagName:"template"});var H=T(R.tagName),X=T(G.tagName);return qe[R.namespaceURI]?R.namespaceURI===$e?G.namespaceURI===ue?H==="svg":G.namespaceURI===Ue?H==="svg"&&(X==="annotation-xml"||Pe[X]):!!Ge[H]:R.namespaceURI===Ue?G.namespaceURI===ue?H==="math":G.namespaceURI===$e?H==="math"&&en[X]:!!Ye[H]:R.namespaceURI===ue?G.namespaceURI===$e&&!en[X]||G.namespaceURI===Ue&&!Pe[X]?!1:!Ye[H]&&(Rn[H]||!Ge[H]):!!(me==="application/xhtml+xml"&&qe[R.namespaceURI]):!1}return B}(),Zt=function(){function B(R){b(gt.removed,{element:R});try{R.parentNode.removeChild(R)}catch(G){try{R.outerHTML=Re}catch(H){R.remove()}}}return B}(),ye=function(){function B(R,G){try{b(gt.removed,{attribute:G.getAttributeNode(R),from:G})}catch(H){b(gt.removed,{attribute:null,from:G})}if(G.removeAttribute(R),R==="is"&&!Xt[R])if(kt||Ve)try{Zt(G)}catch(H){}else try{G.setAttribute(R,"")}catch(H){}}return B}(),Tn=function(){function B(R){var G,H;if(Oe)R=""+R;else{var X=N(R,/^[\r\n\t ]+/);H=X&&X[0]}me==="application/xhtml+xml"&&Te===ue&&(R=''+R+"");var vt=_t?_t.createHTML(R):R;if(Te===ue)try{G=new jt().parseFromString(vt,me)}catch(Rt){}if(!G||!G.documentElement){G=se.createDocument(Te,"template",null);try{G.documentElement.innerHTML=_e?Re:vt}catch(Rt){}}var Ct=G.body||G.documentElement;return R&&H&&Ct.insertBefore(Lt.createTextNode(H),Ct.childNodes[0]||null),Te===ue?On.call(G,fe?"html":"body")[0]:fe?G.documentElement:Ct}return B}(),Ke=function(){function B(R){return sn.call(R.ownerDocument||R,R,At.SHOW_ELEMENT|At.SHOW_COMMENT|At.SHOW_TEXT|At.SHOW_PROCESSING_INSTRUCTION|At.SHOW_CDATA_SECTION,null,!1)}return B}(),nn=function(){function B(R){return R instanceof Ft&&(typeof R.__depth!="undefined"&&typeof R.__depth!="number"||typeof R.__removalCount!="undefined"&&typeof R.__removalCount!="number"||typeof R.nodeName!="string"||typeof R.textContent!="string"||typeof R.removeChild!="function"||!(R.attributes instanceof Nt)||typeof R.removeAttribute!="function"||typeof R.setAttribute!="function"||typeof R.namespaceURI!="string"||typeof R.insertBefore!="function"||typeof R.hasChildNodes!="function")}return B}(),Ne=function(){function B(R){return n(dt)==="object"?R instanceof dt:R&&n(R)==="object"&&typeof R.nodeType=="number"&&typeof R.nodeName=="string"}return B}(),ae=function(){function B(R,G,H){ne[R]&&C(ne[R],function(X){X.call(gt,G,H,Ie)})}return B}(),rn=function(){function B(R){var G;if(ae("beforeSanitizeElements",R,null),nn(R)||V(/[\u0080-\uFFFF]/,R.nodeName))return Zt(R),!0;var H=Qt(R.nodeName);if(ae("uponSanitizeElement",R,{tagName:H,allowedTags:Gt}),R.hasChildNodes()&&!Ne(R.firstElementChild)&&(!Ne(R.content)||!Ne(R.content.firstElementChild))&&V(/<[/\w]/g,R.innerHTML)&&V(/<[/\w]/g,R.textContent)||H==="select"&&V(/