/*! elementor - v3.27.0 - 18-02-2025 */ /*! For license information please see text-path.5923566687faac82ea62.bundle.min.js.LICENSE.txt */ "use strict";(self.webpackChunkelementorFrontend=self.webpackChunkelementorFrontend||[]).push([[30],{241:(e,t,n)=>{var o=n(6784);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(7672),r=o(n(4786));class TextPathHandler extends elementorModules.frontend.handlers.Base{getDefaultSettings(){return{selectors:{pathContainer:".e-text-path",svg:".e-text-path > svg"}}}getDefaultElements(){const{selectors:e}=this.getSettings(),t=this.$element[0];return{widgetWrapper:t,pathContainer:t.querySelector(e.pathContainer),svg:t.querySelector(e.svg),textPath:t.querySelector(e.textPath)}}onInit(){this.elements=this.getDefaultElements(),this.fetchSVG().then((()=>{this.pathId=`e-path-${this.elements.widgetWrapper.dataset.id}`,this.textPathId=`e-text-path-${this.elements.widgetWrapper.dataset.id}`,this.elements.svg&&this.initTextPath()}))}fetchSVG(){const{url:e}=this.elements.pathContainer.dataset;return e&&e.endsWith(".svg")?fetch(e).then((e=>e.text())).then((e=>{this.elements.pathContainer.innerHTML=r.default.sanitize(e),this.elements=this.getDefaultElements()})):Promise.reject(e)}setOffset(e){this.elements.textPath&&(this.isRTL()&&(e=100-parseInt(e)),this.elements.textPath.setAttribute("startOffset",e+"%"))}onElementChange(e){const{start_point:t,text:n}=this.getElementSettings();switch(e){case"start_point":this.setOffset(t.size);break;case"text":this.setText(n);break;case"text_path_direction":this.setOffset(t.size),this.setText(n)}}attachIdToPath(){(this.elements.svg.querySelector("[data-path-anchor]")||this.elements.svg.querySelector("path")).id=this.pathId}initTextPath(){const{start_point:e}=this.getElementSettings(),t=this.elements.pathContainer.dataset.text;this.attachIdToPath(),this.elements.svg.innerHTML+=`\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t`,this.elements.textPath=this.elements.svg.querySelector(`#${this.textPathId}`),this.setOffset(e.size),this.setText(t)}setText(e){const{is_external:t,nofollow:n}=this.getElementSettings().link,{linkUrl:o}=this.elements.pathContainer.dataset,i=t?"_blank":"",l=n?"nofollow":"";o&&(e=`${(0,a.escapeHTML)(e)}`,e=r.default.sanitize(e,{ADD_ATTR:["target"]})),this.elements.textPath.innerHTML=e;const s=this.elements.svg.querySelector(`#${this.textPathId}-clone`);if(s&&s.remove(),this.shouldReverseText()){const t=this.elements.textPath.cloneNode();t.id+="-clone",t.classList.add("elementor-hidden"),t.textContent=e,this.elements.textPath.parentNode.appendChild(t),this.reverseToRTL()}}isRTL(){const{text_path_direction:e}=this.getElementSettings();let t=elementorFrontend.config.is_rtl;return e&&(t="rtl"===e),t}shouldReverseText(){if(!this.isRTL())return!1;if(elementorFrontend.utils.environment.firefox)return!1;return!elementorFrontend.utils.environment.blink||!this.isFixedChromiumVersion()}isFixedChromiumVersion(){return parseInt(navigator.userAgent.match(/(?:Chrom(?:e|ium)|Edg)\/([0-9]+)\./)[1])>=96}reverseToRTL(){let e=this.elements.textPath;e=e.querySelector("a")||e;e.textContent=e.textContent.replace(/([\u0591-\u07FF\u200F\u202B\u202E\uFB1D-\uFDFD\uFE70-\uFEFC\s$&+,:;=?@#|'<>.^*()%!-]+)/gi,(e=>e.split("").reverse().join(""))),e.setAttribute("aria-hidden",!0)}}t.default=TextPathHandler},4786:e=>{const{entries:t,setPrototypeOf:n,isFrozen:o,getPrototypeOf:a,getOwnPropertyDescriptor:r}=Object;let{freeze:i,seal:l,create:s}=Object,{apply:c,construct:u}="undefined"!=typeof Reflect&&Reflect;i||(i=function freeze(e){return e}),l||(l=function seal(e){return e}),c||(c=function apply(e,t,n){return e.apply(t,n)}),u||(u=function construct(e,t){return new e(...t)});const d=unapply(Array.prototype.forEach),m=unapply(Array.prototype.pop),p=unapply(Array.prototype.push),f=unapply(String.prototype.toLowerCase),h=unapply(String.prototype.toString),T=unapply(String.prototype.match),g=unapply(String.prototype.replace),S=unapply(String.prototype.indexOf),y=unapply(String.prototype.trim),_=unapply(Object.prototype.hasOwnProperty),E=unapply(RegExp.prototype.test),A=function unconstruct(e){return function(){for(var t=arguments.length,n=new Array(t),o=0;o1?n-1:0),a=1;a2&&void 0!==arguments[2]?arguments[2]:f;n&&n(e,null);let r=t.length;for(;r--;){let n=t[r];if("string"==typeof n){const e=a(n);e!==n&&(o(t)||(t[r]=e),n=e)}e[n]=!0}return e}function cleanArray(e){for(let t=0;t/gm),P=l(/\$\{[\w\W]*}/gm),z=l(/^data-[\-\w.\u00B7-\uFFFF]+$/),H=l(/^aria-[\-\w]+$/),F=l(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),U=l(/^(?:\w+script|data):/i),G=l(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),B=l(/^html$/i),W=l(/^[a-z][.\w]*(-[.\w]+)+$/i);var Y=Object.freeze({__proto__:null,ARIA_ATTR:H,ATTR_WHITESPACE:G,CUSTOM_ELEMENT:W,DATA_ATTR:z,DOCTYPE_NAME:B,ERB_EXPR:M,IS_ALLOWED_URI:F,IS_SCRIPT_OR_DATA:U,MUSTACHE_EXPR:I,TMPLIT_EXPR:P});const j=1,$=3,q=7,V=8,X=9,K=function getGlobal(){return"undefined"==typeof window?null:window};var Z=function createDOMPurify(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:K();const DOMPurify=e=>createDOMPurify(e);if(DOMPurify.version="3.2.3",DOMPurify.removed=[],!e||!e.document||e.document.nodeType!==X)return DOMPurify.isSupported=!1,DOMPurify;let{document:n}=e;const o=n,a=o.currentScript,{DocumentFragment:r,HTMLTemplateElement:l,Node:c,Element:u,NodeFilter:I,NamedNodeMap:M=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:P,DOMParser:z,trustedTypes:H}=e,U=u.prototype,G=lookupGetter(U,"cloneNode"),W=lookupGetter(U,"remove"),Z=lookupGetter(U,"nextSibling"),J=lookupGetter(U,"childNodes"),Q=lookupGetter(U,"parentNode");if("function"==typeof l){const e=n.createElement("template");e.content&&e.content.ownerDocument&&(n=e.content.ownerDocument)}let ee,te="";const{implementation:ne,createNodeIterator:oe,createDocumentFragment:ae,getElementsByTagName:re}=n,{importNode:ie}=o;let le={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};DOMPurify.isSupported="function"==typeof t&&"function"==typeof Q&&ne&&void 0!==ne.createHTMLDocument;const{MUSTACHE_EXPR:se,ERB_EXPR:ce,TMPLIT_EXPR:ue,DATA_ATTR:de,ARIA_ATTR:me,IS_SCRIPT_OR_DATA:pe,ATTR_WHITESPACE:fe,CUSTOM_ELEMENT:he}=Y;let{IS_ALLOWED_URI:Te}=Y,ge=null;const Se=addToSet({},[...b,...x,...N,...R,...C]);let ye=null;const _e=addToSet({},[...k,...D,...O,...L]);let Ee=Object.seal(s(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}})),Ae=null,be=null,xe=!0,Ne=!0,ve=!1,Re=!0,we=!1,Ce=!0,ke=!1,De=!1,Oe=!1,Le=!1,Ie=!1,Me=!1,Pe=!0,ze=!1,He=!0,Fe=!1,Ue={},Ge=null;const Be=addToSet({},["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"]);let We=null;const Ye=addToSet({},["audio","video","img","source","image","track"]);let je=null;const $e=addToSet({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),qe="http://www.w3.org/1998/Math/MathML",Ve="http://www.w3.org/2000/svg",Xe="http://www.w3.org/1999/xhtml";let Ke=Xe,Ze=!1,Je=null;const Qe=addToSet({},[qe,Ve,Xe],h);let et=addToSet({},["mi","mo","mn","ms","mtext"]),tt=addToSet({},["annotation-xml"]);const nt=addToSet({},["title","style","font","a","script"]);let ot=null;const at=["application/xhtml+xml","text/html"];let rt=null,it=null;const lt=n.createElement("form"),st=function isRegexOrFunction(e){return e instanceof RegExp||e instanceof Function},ct=function _parseConfig(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!it||it!==e){if(e&&"object"==typeof e||(e={}),e=clone(e),ot=-1===at.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,rt="application/xhtml+xml"===ot?h:f,ge=_(e,"ALLOWED_TAGS")?addToSet({},e.ALLOWED_TAGS,rt):Se,ye=_(e,"ALLOWED_ATTR")?addToSet({},e.ALLOWED_ATTR,rt):_e,Je=_(e,"ALLOWED_NAMESPACES")?addToSet({},e.ALLOWED_NAMESPACES,h):Qe,je=_(e,"ADD_URI_SAFE_ATTR")?addToSet(clone($e),e.ADD_URI_SAFE_ATTR,rt):$e,We=_(e,"ADD_DATA_URI_TAGS")?addToSet(clone(Ye),e.ADD_DATA_URI_TAGS,rt):Ye,Ge=_(e,"FORBID_CONTENTS")?addToSet({},e.FORBID_CONTENTS,rt):Be,Ae=_(e,"FORBID_TAGS")?addToSet({},e.FORBID_TAGS,rt):{},be=_(e,"FORBID_ATTR")?addToSet({},e.FORBID_ATTR,rt):{},Ue=!!_(e,"USE_PROFILES")&&e.USE_PROFILES,xe=!1!==e.ALLOW_ARIA_ATTR,Ne=!1!==e.ALLOW_DATA_ATTR,ve=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Re=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,we=e.SAFE_FOR_TEMPLATES||!1,Ce=!1!==e.SAFE_FOR_XML,ke=e.WHOLE_DOCUMENT||!1,Le=e.RETURN_DOM||!1,Ie=e.RETURN_DOM_FRAGMENT||!1,Me=e.RETURN_TRUSTED_TYPE||!1,Oe=e.FORCE_BODY||!1,Pe=!1!==e.SANITIZE_DOM,ze=e.SANITIZE_NAMED_PROPS||!1,He=!1!==e.KEEP_CONTENT,Fe=e.IN_PLACE||!1,Te=e.ALLOWED_URI_REGEXP||F,Ke=e.NAMESPACE||Xe,et=e.MATHML_TEXT_INTEGRATION_POINTS||et,tt=e.HTML_INTEGRATION_POINTS||tt,Ee=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&st(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Ee.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&st(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Ee.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Ee.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),we&&(Ne=!1),Ie&&(Le=!0),Ue&&(ge=addToSet({},C),ye=[],!0===Ue.html&&(addToSet(ge,b),addToSet(ye,k)),!0===Ue.svg&&(addToSet(ge,x),addToSet(ye,D),addToSet(ye,L)),!0===Ue.svgFilters&&(addToSet(ge,N),addToSet(ye,D),addToSet(ye,L)),!0===Ue.mathMl&&(addToSet(ge,R),addToSet(ye,O),addToSet(ye,L))),e.ADD_TAGS&&(ge===Se&&(ge=clone(ge)),addToSet(ge,e.ADD_TAGS,rt)),e.ADD_ATTR&&(ye===_e&&(ye=clone(ye)),addToSet(ye,e.ADD_ATTR,rt)),e.ADD_URI_SAFE_ATTR&&addToSet(je,e.ADD_URI_SAFE_ATTR,rt),e.FORBID_CONTENTS&&(Ge===Be&&(Ge=clone(Ge)),addToSet(Ge,e.FORBID_CONTENTS,rt)),He&&(ge["#text"]=!0),ke&&addToSet(ge,["html","head","body"]),ge.table&&(addToSet(ge,["tbody"]),delete Ae.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw A('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw A('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');ee=e.TRUSTED_TYPES_POLICY,te=ee.createHTML("")}else void 0===ee&&(ee=function _createTrustedTypesPolicy(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const o="data-tt-policy-suffix";t&&t.hasAttribute(o)&&(n=t.getAttribute(o));const a="dompurify"+(n?"#"+n:"");try{return e.createPolicy(a,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+a+" could not be created."),null}}(H,a)),null!==ee&&"string"==typeof te&&(te=ee.createHTML(""));i&&i(e),it=e}},ut=addToSet({},[...x,...N,...v]),dt=addToSet({},[...R,...w]),mt=function _forceRemove(e){p(DOMPurify.removed,{element:e});try{Q(e).removeChild(e)}catch(t){W(e)}},pt=function _removeAttribute(e,t){try{p(DOMPurify.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){p(DOMPurify.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(Le||Ie)try{mt(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},ft=function _initDocument(e){let t=null,o=null;if(Oe)e=""+e;else{const t=T(e,/^[\r\n\t ]+/);o=t&&t[0]}"application/xhtml+xml"===ot&&Ke===Xe&&(e=''+e+"");const a=ee?ee.createHTML(e):e;if(Ke===Xe)try{t=(new z).parseFromString(a,ot)}catch(e){}if(!t||!t.documentElement){t=ne.createDocument(Ke,"template",null);try{t.documentElement.innerHTML=Ze?te:a}catch(e){}}const r=t.body||t.documentElement;return e&&o&&r.insertBefore(n.createTextNode(o),r.childNodes[0]||null),Ke===Xe?re.call(t,ke?"html":"body")[0]:ke?t.documentElement:r},ht=function _createNodeIterator(e){return oe.call(e.ownerDocument||e,e,I.SHOW_ELEMENT|I.SHOW_COMMENT|I.SHOW_TEXT|I.SHOW_PROCESSING_INSTRUCTION|I.SHOW_CDATA_SECTION,null)},Tt=function _isClobbered(e){return e instanceof P&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof M)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},gt=function _isNode(e){return"function"==typeof c&&e instanceof c};function _executeHooks(e,t,n){d(e,(e=>{e.call(DOMPurify,t,n,it)}))}const St=function _sanitizeElements(e){let t=null;if(_executeHooks(le.beforeSanitizeElements,e,null),Tt(e))return mt(e),!0;const n=rt(e.nodeName);if(_executeHooks(le.uponSanitizeElement,e,{tagName:n,allowedTags:ge}),e.hasChildNodes()&&!gt(e.firstElementChild)&&E(/<[/\w]/g,e.innerHTML)&&E(/<[/\w]/g,e.textContent))return mt(e),!0;if(e.nodeType===q)return mt(e),!0;if(Ce&&e.nodeType===V&&E(/<[/\w]/g,e.data))return mt(e),!0;if(!ge[n]||Ae[n]){if(!Ae[n]&&_t(n)){if(Ee.tagNameCheck instanceof RegExp&&E(Ee.tagNameCheck,n))return!1;if(Ee.tagNameCheck instanceof Function&&Ee.tagNameCheck(n))return!1}if(He&&!Ge[n]){const t=Q(e)||e.parentNode,n=J(e)||e.childNodes;if(n&&t){for(let o=n.length-1;o>=0;--o){const a=G(n[o],!0);a.__removalCount=(e.__removalCount||0)+1,t.insertBefore(a,Z(e))}}}return mt(e),!0}return e instanceof u&&!function _checkValidNamespace(e){let t=Q(e);t&&t.tagName||(t={namespaceURI:Ke,tagName:"template"});const n=f(e.tagName),o=f(t.tagName);return!!Je[e.namespaceURI]&&(e.namespaceURI===Ve?t.namespaceURI===Xe?"svg"===n:t.namespaceURI===qe?"svg"===n&&("annotation-xml"===o||et[o]):Boolean(ut[n]):e.namespaceURI===qe?t.namespaceURI===Xe?"math"===n:t.namespaceURI===Ve?"math"===n&&tt[o]:Boolean(dt[n]):e.namespaceURI===Xe?!(t.namespaceURI===Ve&&!tt[o])&&!(t.namespaceURI===qe&&!et[o])&&!dt[n]&&(nt[n]||!ut[n]):!("application/xhtml+xml"!==ot||!Je[e.namespaceURI]))}(e)?(mt(e),!0):"noscript"!==n&&"noembed"!==n&&"noframes"!==n||!E(/<\/no(script|embed|frames)/i,e.innerHTML)?(we&&e.nodeType===$&&(t=e.textContent,d([se,ce,ue],(e=>{t=g(t,e," ")})),e.textContent!==t&&(p(DOMPurify.removed,{element:e.cloneNode()}),e.textContent=t)),_executeHooks(le.afterSanitizeElements,e,null),!1):(mt(e),!0)},yt=function _isValidAttribute(e,t,o){if(Pe&&("id"===t||"name"===t)&&(o in n||o in lt))return!1;if(Ne&&!be[t]&&E(de,t));else if(xe&&E(me,t));else if(!ye[t]||be[t]){if(!(_t(e)&&(Ee.tagNameCheck instanceof RegExp&&E(Ee.tagNameCheck,e)||Ee.tagNameCheck instanceof Function&&Ee.tagNameCheck(e))&&(Ee.attributeNameCheck instanceof RegExp&&E(Ee.attributeNameCheck,t)||Ee.attributeNameCheck instanceof Function&&Ee.attributeNameCheck(t))||"is"===t&&Ee.allowCustomizedBuiltInElements&&(Ee.tagNameCheck instanceof RegExp&&E(Ee.tagNameCheck,o)||Ee.tagNameCheck instanceof Function&&Ee.tagNameCheck(o))))return!1}else if(je[t]);else if(E(Te,g(o,fe,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==S(o,"data:")||!We[e]){if(ve&&!E(pe,g(o,fe,"")));else if(o)return!1}else;return!0},_t=function _isBasicCustomElement(e){return"annotation-xml"!==e&&T(e,he)},Et=function _sanitizeAttributes(e){_executeHooks(le.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||Tt(e))return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ye,forceKeepAttr:void 0};let o=t.length;for(;o--;){const a=t[o],{name:r,namespaceURI:i,value:l}=a,s=rt(r);let c="value"===r?l:y(l);if(n.attrName=s,n.attrValue=c,n.keepAttr=!0,n.forceKeepAttr=void 0,_executeHooks(le.uponSanitizeAttribute,e,n),c=n.attrValue,!ze||"id"!==s&&"name"!==s||(pt(r,e),c="user-content-"+c),Ce&&E(/((--!?|])>)|<\/(style|title)/i,c)){pt(r,e);continue}if(n.forceKeepAttr)continue;if(pt(r,e),!n.keepAttr)continue;if(!Re&&E(/\/>/i,c)){pt(r,e);continue}we&&d([se,ce,ue],(e=>{c=g(c,e," ")}));const u=rt(e.nodeName);if(yt(u,s,c)){if(ee&&"object"==typeof H&&"function"==typeof H.getAttributeType)if(i);else switch(H.getAttributeType(u,s)){case"TrustedHTML":c=ee.createHTML(c);break;case"TrustedScriptURL":c=ee.createScriptURL(c)}try{i?e.setAttributeNS(i,r,c):e.setAttribute(r,c),Tt(e)?mt(e):m(DOMPurify.removed)}catch(e){}}}_executeHooks(le.afterSanitizeAttributes,e,null)},At=function _sanitizeShadowDOM(e){let t=null;const n=ht(e);for(_executeHooks(le.beforeSanitizeShadowDOM,e,null);t=n.nextNode();)_executeHooks(le.uponSanitizeShadowNode,t,null),St(t),Et(t),t.content instanceof r&&_sanitizeShadowDOM(t.content);_executeHooks(le.afterSanitizeShadowDOM,e,null)};return DOMPurify.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,a=null,i=null,l=null;if(Ze=!e,Ze&&(e="\x3c!--\x3e"),"string"!=typeof e&&!gt(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(!DOMPurify.isSupported)return e;if(De||ct(t),DOMPurify.removed=[],"string"==typeof e&&(Fe=!1),Fe){if(e.nodeName){const t=rt(e.nodeName);if(!ge[t]||Ae[t])throw A("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof c)n=ft("\x3c!----\x3e"),a=n.ownerDocument.importNode(e,!0),a.nodeType===j&&"BODY"===a.nodeName||"HTML"===a.nodeName?n=a:n.appendChild(a);else{if(!Le&&!we&&!ke&&-1===e.indexOf("<"))return ee&&Me?ee.createHTML(e):e;if(n=ft(e),!n)return Le?null:Me?te:""}n&&Oe&&mt(n.firstChild);const s=ht(Fe?e:n);for(;i=s.nextNode();)St(i),Et(i),i.content instanceof r&&At(i.content);if(Fe)return e;if(Le){if(Ie)for(l=ae.call(n.ownerDocument);n.firstChild;)l.appendChild(n.firstChild);else l=n;return(ye.shadowroot||ye.shadowrootmode)&&(l=ie.call(o,l,!0)),l}let u=ke?n.outerHTML:n.innerHTML;return ke&&ge["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&E(B,n.ownerDocument.doctype.name)&&(u="\n"+u),we&&d([se,ce,ue],(e=>{u=g(u,e," ")})),ee&&Me?ee.createHTML(u):u},DOMPurify.setConfig=function(){ct(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),De=!0},DOMPurify.clearConfig=function(){it=null,De=!1},DOMPurify.isValidAttribute=function(e,t,n){it||ct({});const o=rt(e),a=rt(t);return yt(o,a,n)},DOMPurify.addHook=function(e,t){"function"==typeof t&&p(le[e],t)},DOMPurify.removeHook=function(e){return m(le[e])},DOMPurify.removeHooks=function(e){le[e]=[]},DOMPurify.removeAllHooks=function(){le={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},DOMPurify}();e.exports=Z}}]);