/i,m)){bt(a,e);continue}if(Me&&E(/((--!?|])>)|<\/(style|title)/i,m)){bt(a,e);continue}Ie&&u([de,he,ge],e=>{m=g(m,e," ")});const f=ut(e.nodeName);if(Dt(f,s,m)){if(!Ge||"id"!==s&&"name"!==s||(bt(a,e),m=Ye+m),ae&&"object"==typeof j&&"function"==typeof j.getAttributeType)if(l);else switch(j.getAttributeType(f,s)){case"TrustedHTML":m=ae.createHTML(m);break;case"TrustedScriptURL":m=ae.createScriptURL(m)}try{l?e.setAttributeNS(l,a,m):e.setAttribute(a,m),Ct(e)?Nt(e):p(o.removed)}catch(e){}}}wt("afterSanitizeAttributes",e,null)},Ot=function e(t){let n=null;const o=vt(t);for(wt("beforeSanitizeShadowDOM",t,null);n=o.nextNode();){if(wt("uponSanitizeShadowNode",n,null),xt(n))continue;const t=ie(n);n.nodeType===V&&(t&&t.__depth?n.__depth=(n.__removalCount||0)+t.__depth+1:n.__depth=1),(n.__depth>=mt||n.__depth<0||N(n.__depth))&&Nt(n),n.content instanceof s&&(n.content.__depth=n.__depth,e(n.content)),Lt(n)}wt("afterSanitizeShadowDOM",t,null)};return o.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,r=null,i=null,l=null;if(rt=!e,rt&&(e="\x3c!--\x3e"),"string"!=typeof e&&!Rt(e)){if("function"!=typeof e.toString)throw A("toString is not a function");if("string"!=typeof(e=e.toString()))throw A("dirty is not a string, aborting")}if(!o.isSupported)return e;if(Pe||ht(t),o.removed=[],"string"==typeof e&&(Xe=!1),Xe){if(e.nodeName){const t=ut(e.nodeName);if(!be[t]||we[t])throw A("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof v)n=St("\x3c!----\x3e"),r=n.ownerDocument.importNode(e,!0),r.nodeType===V&&"BODY"===r.nodeName||"HTML"===r.nodeName?n=r:n.appendChild(r);else{if(!He&&!Ie&&!Ue&&-1===e.indexOf("<"))return ae&&Be?ae.createHTML(e):e;if(n=St(e),!n)return He?null:Be?le:""}n&&Fe&&Nt(n.firstChild);const c=vt(Xe?e:n);for(;i=c.nextNode();){if(xt(i))continue;const e=ie(i);i.nodeType===V&&(e&&e.__depth?i.__depth=(i.__removalCount||0)+e.__depth+1:i.__depth=1),(i.__depth>=mt||i.__depth<0||N(i.__depth))&&Nt(i),i.content instanceof s&&(i.content.__depth=i.__depth,Ot(i.content)),Lt(i)}if(Xe)return e;if(He){if(ze)for(l=ue.call(n.ownerDocument);n.firstChild;)l.appendChild(n.firstChild);else l=n;return(ve.shadowroot||ve.shadowrootmode)&&(l=me.call(a,l,!0)),l}let p=Ue?n.outerHTML:n.innerHTML;return Ue&&be["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&E(q,n.ownerDocument.doctype.name)&&(p="\n"+p),Ie&&u([de,he,ge],e=>{p=g(p,e," ")}),ae&&Be?ae.createHTML(p):p},o.setConfig=function(){ht(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Pe=!0},o.clearConfig=function(){pt=null,Pe=!1},o.isValidAttribute=function(e,t,n){pt||ht({});const o=ut(e),r=ut(t);return Dt(o,r,n)},o.addHook=function(e,t){"function"==typeof t&&(fe[e]=fe[e]||[],m(fe[e],t))},o.removeHook=function(e){if(fe[e])return p(fe[e])},o.removeHooks=function(e){fe[e]&&(fe[e]=[])},o.removeAllHooks=function(){fe={}},o}()}()},317591:(e,t,n)=>{var o,r,i;i=function(){function e(){for(var e=0,t={};e