function sanitize(n){if(!_securityfeature.xss)return n;const i=DOMPurify.sanitize(n),t=document.createElement("div");t.innerHTML=i;const r=t.querySelectorAll("script");r.forEach(n=>{n.parentNode.removeChild(n)});const u=t.querySelectorAll("*");return u.forEach(n=>{const t=n.attributes;for(let i=0;i<t.length;i++)(t[i].name.startsWith("data-")||t[i].name.startsWith("on")||t[i].name.startsWith("id")||t[i].name.startsWith("name"))&&n.removeAttribute(t[i].name)}),t.innerHTML}function sanitizeAndSetEditorData(n){if(!_securityfeature.xss)return n;const t=document.createElement("div");t.innerHTML=n;return sanitize(t.innerHTML.replace(/&lt;/g,"<").replace(/&gt;/g,">"))}function sanitizeform(n){var t=$("#"+n);return _securityfeature.xss&&$.each(t[0].elements,function(n,i){(i.type=="text"||i.type=="textarea")&&(t[0].elements[n].value=sanitize(i.value))}),t}!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(n=n||self).DOMPurify=t()}(this,function(){"use strict";function i(n){return function(t){for(var r=arguments.length,u=Array(r>1?r-1:0),i=1;i<r;i++)u[i-1]=arguments[i];return c(n,t,u)}}function n(n,t){var r,i,u;for(g&&g(n,null),r=t.length;r--;)i=t[r],"string"==typeof i&&(u=l(i),u!==i&&(lt(t)||(t[r]=u),i=u)),n[i]=!0;return n}function o(n){var i=yt(null);for(var t in n)c(y,n,[t])&&(i[t]=n[t]);return i}function a(n,t){for(;null!==n;){var r=vt(n,t);if(r){if(r.get)return i(r.get);if("function"==typeof r.value)return i(r.value)}n=at(n)}return function(n){return console.warn("fallback value for",n),null}}function r(n){if(Array.isArray(n)){for(var t=0,i=Array(n.length);t<n.length;t++)i[t]=n[t];return i}return Array.from(n)}var y=Object.hasOwnProperty,g=Object.setPrototypeOf,lt=Object.isFrozen,at=Object.getPrototypeOf,vt=Object.getOwnPropertyDescriptor,t=Object.freeze,u=Object.seal,yt=Object.create,nt="undefined"!=typeof Reflect&&Reflect,c=nt.apply,p=nt.construct,ht,ct;c||(c=function(n,t,i){return n.apply(t,i)});t||(t=function(n){return n});u||(u=function(n){return n});p||(p=function(n,t){return new(Function.prototype.bind.apply(n,[null].concat(function(n){if(Array.isArray(n)){for(var t=0,i=Array(n.length);t<n.length;t++)i[t]=n[t];return i}return Array.from(n)}(t))))});var tt,pt=i(Array.prototype.forEach),it=i(Array.prototype.pop),s=i(Array.prototype.push),l=i(String.prototype.toLowerCase),rt=i(String.prototype.match),e=i(String.prototype.replace),wt=i(String.prototype.indexOf),bt=i(String.prototype.trim),f=i(RegExp.prototype.test),ut=(tt=TypeError,function(){for(var t=arguments.length,i=Array(t),n=0;n<t;n++)i[n]=arguments[n];return p(tt,i)});var ft=t(["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","section","select","shadow","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"]),w=t(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),b=t(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),kt=t(["animate","color-profile","cursor","discard","fedropshadow","feimage","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"]),k=t(["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"]),dt=t(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),et=t(["#text"]),ot=t(["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","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),d=t(["accent-height","accumulate","additive","alignment-baseline","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","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","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","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","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","targetx","targety","transform","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"]),st=t(["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"]),v=t(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),gt=u(/\{\{[\s\S]*|[\s\S]*\}\}/gm),ni=u(/<%[\s\S]*|[\s\S]*%>/gm),ti=u(/^data-[\-\w.\u00B7-\uFFFF]/),ii=u(/^aria-[\-\w]+$/),ri=u(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ui=u(/^(?:\w+script|data):/i),fi=u(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n};return ht=function(){return"undefined"==typeof window?null:window},ct=function(n,t){var i,r,u;if("object"!==(void 0===n?"undefined":h(n))||"function"!=typeof n.createPolicy)return null;i=null;r="data-tt-policy-suffix";t.currentScript&&t.currentScript.hasAttribute(r)&&(i=t.currentScript.getAttribute(r));u="dompurify"+(i?"#"+i:"");try{return n.createPolicy(u,{createHTML:function(n){return n}})}catch(n){return console.warn("TrustedTypes policy "+u+" could not be created."),null}},function y(){var u=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ht(),i=function(n){return y(n)},bi,g,ir;if(i.version="2.3.3",i.removed=[],!u||!u.document||9!==u.document.nodeType)return i.isSupported=!1,i;var rr=u.document,lt=u.document,gr=u.DocumentFragment,uf=u.HTMLTemplateElement,pi=u.Node,nu=u.Element,ur=u.NodeFilter,tu=u.NamedNodeMap,ff=void 0===tu?u.NamedNodeMap||u.MozNamedAttrMap:tu,ef=u.Text,of=u.Comment,sf=u.DOMParser,hf=u.trustedTypes,wi=nu.prototype,cf=a(wi,"cloneNode"),lf=a(wi,"nextSibling"),af=a(wi,"childNodes"),fr=a(wi,"parentNode");"function"==typeof uf&&(bi=lt.createElement("template"),bi.content&&bi.content.ownerDocument&&(lt=bi.content.ownerDocument));var at=ct(hf,rr),iu=at&&gi?at.createHTML(""):"",ki=lt,er=ki.implementation,vf=ki.createNodeIterator,yf=ki.createDocumentFragment,pf=ki.getElementsByTagName,wf=rr.importNode,ru={};try{ru=o(lt).documentMode?lt.documentMode:{}}catch(y){}g={};i.isSupported="function"==typeof fr&&er&&void 0!==er.createHTMLDocument&&9!==ru;var or=gt,sr=ni,bf=ti,kf=ii,df=ui,uu=fi,hr=ri,c=null,fu=n({},[].concat(r(ft),r(w),r(b),r(k),r(et))),p=null,eu=n({},[].concat(r(ot),r(d),r(st),r(v))),cr=null,lr=null,ou=!0,ar=!0,su=!1,yt=!1,ei=!1,vr=!1,yr=!1,oi=!1,di=!1,hu=!0,gi=!1,cu=!0,pr=!0,ai=!1,si={},hi=null,lu=n({},["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"]),au=null,vu=n({},["audio","video","img","source","image","track"]),wr=null,yu=n({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),br="http://www.w3.org/1998/Math/MathML",kr="http://www.w3.org/2000/svg",vt="http://www.w3.org/1999/xhtml",nr=vt,pu=!1,vi=void 0,gf=["application/xhtml+xml","text/html"],ne="text/html",ci=void 0,li=null,te=lt.createElement("form"),dr=function(i){li&&li===i||(i&&"object"===(void 0===i?"undefined":h(i))||(i={}),i=o(i),c="ALLOWED_TAGS"in i?n({},i.ALLOWED_TAGS):fu,p="ALLOWED_ATTR"in i?n({},i.ALLOWED_ATTR):eu,wr="ADD_URI_SAFE_ATTR"in i?n(o(yu),i.ADD_URI_SAFE_ATTR):yu,au="ADD_DATA_URI_TAGS"in i?n(o(vu),i.ADD_DATA_URI_TAGS):vu,hi="FORBID_CONTENTS"in i?n({},i.FORBID_CONTENTS):lu,cr="FORBID_TAGS"in i?n({},i.FORBID_TAGS):{},lr="FORBID_ATTR"in i?n({},i.FORBID_ATTR):{},si="USE_PROFILES"in i&&i.USE_PROFILES,ou=!1!==i.ALLOW_ARIA_ATTR,ar=!1!==i.ALLOW_DATA_ATTR,su=i.ALLOW_UNKNOWN_PROTOCOLS||!1,yt=i.SAFE_FOR_TEMPLATES||!1,ei=i.WHOLE_DOCUMENT||!1,oi=i.RETURN_DOM||!1,di=i.RETURN_DOM_FRAGMENT||!1,hu=!1!==i.RETURN_DOM_IMPORT,gi=i.RETURN_TRUSTED_TYPE||!1,yr=i.FORCE_BODY||!1,cu=!1!==i.SANITIZE_DOM,pr=!1!==i.KEEP_CONTENT,ai=i.IN_PLACE||!1,hr=i.ALLOWED_URI_REGEXP||hr,nr=i.NAMESPACE||vt,vi=vi=-1===gf.indexOf(i.PARSER_MEDIA_TYPE)?ne:i.PARSER_MEDIA_TYPE,ci="application/xhtml+xml"===vi?function(n){return n}:l,yt&&(ar=!1),di&&(oi=!0),si&&(c=n({},[].concat(r(et))),p=[],!0===si.html&&(n(c,ft),n(p,ot)),!0===si.svg&&(n(c,w),n(p,d),n(p,v)),!0===si.svgFilters&&(n(c,b),n(p,d),n(p,v)),!0===si.mathMl&&(n(c,k),n(p,st),n(p,v))),i.ADD_TAGS&&(c===fu&&(c=o(c)),n(c,i.ADD_TAGS)),i.ADD_ATTR&&(p===eu&&(p=o(p)),n(p,i.ADD_ATTR)),i.ADD_URI_SAFE_ATTR&&n(wr,i.ADD_URI_SAFE_ATTR),i.FORBID_CONTENTS&&(hi===lu&&(hi=o(hi)),n(hi,i.FORBID_CONTENTS)),pr&&(c["#text"]=!0),ei&&n(c,["html","head","body"]),c.table&&(n(c,["tbody"]),delete cr.tbody),t&&t(i),li=i)},wu=n({},["mi","mo","mn","ms","mtext"]),bu=n({},["foreignobject","desc","title","annotation-xml"]),tr=n({},w);n(tr,b);n(tr,kt);ir=n({},k);n(ir,dt);var ie=function(t){var i=fr(t),r,u,f;return(i&&i.tagName||(i={namespaceURI:vt,tagName:"template"}),r=l(t.tagName),u=l(i.tagName),t.namespaceURI===kr)?i.namespaceURI===vt?"svg"===r:i.namespaceURI===br?"svg"===r&&("annotation-xml"===u||wu[u]):Boolean(tr[r]):t.namespaceURI===br?i.namespaceURI===vt?"math"===r:i.namespaceURI===kr?"math"===r&&bu[u]:Boolean(ir[r]):t.namespaceURI===vt?i.namespaceURI===kr&&!bu[u]?!1:i.namespaceURI===br&&!wu[u]?!1:(f=n({},["title","style","font","a","script"]),!ir[r]&&(f[r]||!tr[r])):!1},nt=function(n){s(i.removed,{element:n});try{n.parentNode.removeChild(n)}catch(t){try{n.outerHTML=iu}catch(t){n.remove()}}},ku=function(n,t){try{s(i.removed,{attribute:t.getAttributeNode(n),from:t})}catch(n){s(i.removed,{attribute:null,from:t})}if(t.removeAttribute(n),"is"===n&&!p[n])if(oi||di)try{nt(t)}catch(n){}else try{t.setAttribute(n,"")}catch(n){}},du=function(n){var t=void 0,r=void 0,u,f,i;if(yr?n="<remove><\/remove>"+n:(u=rt(n,/^[\r\n\t ]+/),r=u&&u[0]),"application/xhtml+xml"===vi&&(n='<html xmlns="http://www.w3.org/1999/xhtml"><head><\/head><body>'+n+"<\/body><\/html>"),f=at?at.createHTML(n):n,nr===vt)try{t=(new sf).parseFromString(f,vi)}catch(n){}if(!t||!t.documentElement){t=er.createDocument(nr,"template",null);try{t.documentElement.innerHTML=pu?"":f}catch(n){}}return i=t.body||t.documentElement,n&&r&&i.insertBefore(lt.createTextNode(r),i.childNodes[0]||null),nr===vt?pf.call(t,ei?"html":"body")[0]:ei?t.documentElement:i},gu=function(n){return vf.call(n.ownerDocument||n,n,ur.SHOW_ELEMENT|ur.SHOW_COMMENT|ur.SHOW_TEXT,null,!1)},re=function(n){return!(n instanceof ef||n instanceof of)&&!("string"==typeof n.nodeName&&"string"==typeof n.textContent&&"function"==typeof n.removeChild&&n.attributes instanceof ff&&"function"==typeof n.removeAttribute&&"function"==typeof n.setAttribute&&"string"==typeof n.namespaceURI&&"function"==typeof n.insertBefore)},yi=function(n){return"object"===(void 0===pi?"undefined":h(pi))?n instanceof pi:n&&"object"===(void 0===n?"undefined":h(n))&&"number"==typeof n.nodeType&&"string"==typeof n.nodeName},tt=function(n,t,r){g[n]&&pt(g[n],function(n){n.call(i,t,r,li)})},nf=function(n){var r=void 0,t,h,u,o;if((tt("beforeSanitizeElements",n,null),re(n))||rt(n.nodeName,/[\u0080-\uFFFF]/)||(t=ci(n.nodeName),tt("uponSanitizeElement",n,{tagName:t,allowedTags:c}),!yi(n.firstElementChild)&&(!yi(n.content)||!yi(n.content.firstElementChild))&&f(/<[/\w]/g,n.innerHTML)&&f(/<[/\w]/g,n.textContent))||"select"===t&&f(/<template/i,n.innerHTML))return nt(n),!0;if(!c[t]||cr[t]){if(pr&&!hi[t]&&(h=fr(n)||n.parentNode,u=af(n)||n.childNodes,u&&h))for(o=u.length-1;o>=0;--o)h.insertBefore(cf(u[o],!0),lf(n));return nt(n),!0}return n instanceof nu&&!ie(n)?(nt(n),!0):"noscript"!==t&&"noembed"!==t||!f(/<\/no(script|embed)/i,n.innerHTML)?(yt&&3===n.nodeType&&(r=n.textContent,r=e(r,or," "),r=e(r,sr," "),n.textContent!==r&&(s(i.removed,{element:n.cloneNode()}),n.textContent=r)),tt("afterSanitizeElements",n,null),!1):(nt(n),!0)},tf=function(n,t,i){return cu&&("id"===t||"name"===t)&&(i in lt||i in te)?!1:(!ar||lr[t]||!f(bf,t))&&(!ou||!f(kf,t))&&(!p[t]||lr[t]||!wr[t]&&!f(hr,e(i,uu,""))&&("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===n||0!==wt(i,"data:")||!au[n])&&(!su||f(df,e(i,uu,"")))&&i)?!1:!0},rf=function(n){var c=void 0,t=void 0,s=void 0,h=void 0,o,r,v;if(tt("beforeSanitizeAttributes",n,null),o=n.attributes,o){for(r={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:p},h=o.length;h--;){var l=c=o[h],u=l.name,a=l.namespaceURI;if(t=bt(c.value),s=ci(u),r.attrName=s,r.attrValue=t,r.keepAttr=!0,r.forceKeepAttr=void 0,tt("uponSanitizeAttribute",n,r),t=r.attrValue,!r.forceKeepAttr&&(ku(u,n),r.keepAttr))if(f(/\/>/i,t))ku(u,n);else if(yt&&(t=e(t,or," "),t=e(t,sr," ")),v=ci(n.nodeName),tf(v,s,t))try{a?n.setAttributeNS(a,u,t):n.setAttribute(u,t);it(i.removed)}catch(n){}}tt("afterSanitizeAttributes",n,null)}},ue=function y(n){var t=void 0,i=gu(n);for(tt("beforeSanitizeShadowDOM",n,null);t=i.nextNode();)tt("uponSanitizeShadowNode",t,null),nf(t)||(t.content instanceof gr&&y(t.content),rf(t));tt("afterSanitizeShadowDOM",n,null)};return i.sanitize=function(n,t){var r=void 0,c=void 0,f=void 0,l=void 0,s=void 0,a,o;if((pu=!n)&&(n="<!-->"),"string"!=typeof n&&!yi(n)){if("function"!=typeof n.toString)throw ut("toString is not a function");if("string"!=typeof(n=n.toString()))throw ut("dirty is not a string, aborting");}if(!i.isSupported){if("object"===h(u.toStaticHTML)||"function"==typeof u.toStaticHTML){if("string"==typeof n)return u.toStaticHTML(n);if(yi(n))return u.toStaticHTML(n.outerHTML)}return n}if(vr||dr(t),i.removed=[],"string"==typeof n&&(ai=!1),!ai)if(n instanceof pi)1===(c=(r=du("<!---->")).ownerDocument.importNode(n,!0)).nodeType&&"BODY"===c.nodeName||"HTML"===c.nodeName?r=c:r.appendChild(c);else{if(!oi&&!yt&&!ei&&-1===n.indexOf("<"))return at&&gi?at.createHTML(n):n;if(!(r=du(n)))return oi?null:iu}for(r&&yr&&nt(r.firstChild),a=gu(ai?n:r);f=a.nextNode();)3===f.nodeType&&f===l||nf(f)||(f.content instanceof gr&&ue(f.content),rf(f),l=f);if(l=null,ai)return n;if(oi){if(di)for(s=yf.call(r.ownerDocument);r.firstChild;)s.appendChild(r.firstChild);else s=r;return hu&&(s=wf.call(rr,s,!0)),s}return o=ei?r.outerHTML:r.innerHTML,yt&&(o=e(o,or," "),o=e(o,sr," ")),at&&gi?at.createHTML(o):o},i.setConfig=function(n){dr(n);vr=!0},i.clearConfig=function(){li=null;vr=!1},i.isValidAttribute=function(n,t,i){li||dr({});var r=ci(n),u=ci(t);return tf(r,u,i)},i.addHook=function(n,t){"function"==typeof t&&(g[n]=g[n]||[],s(g[n],t))},i.removeHook=function(n){g[n]&&it(g[n])},i.removeHooks=function(n){g[n]&&(g[n]=[])},i.removeAllHooks=function(){g={}},i}()})