HEX
Server: LiteSpeed
System: Linux premium235.web-hosting.com 4.18.0-553.45.1.lve.el8.x86_64 #1 SMP Wed Mar 26 12:08:09 UTC 2025 x86_64
User: beaupptk (733)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: /home/beaupptk/birthkumar.shop/wp-content/plugins/woocommerce/assets/client/admin/sanitize/index.js
/*! For license information please see index.js.LICENSE.txt */
(()=>{"use strict";var e={d:(t,n)=>{for(var o in n)e.o(n,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:n[o]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{DEFAULT_ALLOWED_ATTR:()=>re,DEFAULT_ALLOWED_TAGS:()=>oe,getTrustedTypesPolicy:()=>le,sanitizeHTML:()=>ie});const{entries:n,setPrototypeOf:o,isFrozen:r,getPrototypeOf:i,getOwnPropertyDescriptor:a}=Object;let{freeze:l,seal:c,create:s}=Object,{apply:u,construct:m}="undefined"!=typeof Reflect&&Reflect;l||(l=function(e){return e}),c||(c=function(e){return e}),u||(u=function(e,t,n){return e.apply(t,n)}),m||(m=function(e,t){return new e(...t)});const p=L(Array.prototype.forEach),f=L(Array.prototype.lastIndexOf),d=L(Array.prototype.pop),h=L(Array.prototype.push),g=L(Array.prototype.splice),T=L(String.prototype.toLowerCase),y=L(String.prototype.toString),E=L(String.prototype.match),A=L(String.prototype.replace),_=L(String.prototype.indexOf),S=L(String.prototype.trim),b=L(Object.prototype.hasOwnProperty),N=L(RegExp.prototype.test),w=(R=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return m(R,t)});var R;function L(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return u(e,t,o)}}function O(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:T;o&&o(e,null);let i=t.length;for(;i--;){let o=t[i];if("string"==typeof o){const e=n(o);e!==o&&(r(t)||(t[i]=e),o=e)}e[o]=!0}return e}function D(e){for(let t=0;t<e.length;t++)b(e,t)||(e[t]=null);return e}function v(e){const t=s(null);for(const[o,r]of n(e))b(e,o)&&(Array.isArray(r)?t[o]=D(r):r&&"object"==typeof r&&r.constructor===Object?t[o]=v(r):t[o]=r);return t}function C(e,t){for(;null!==e;){const n=a(e,t);if(n){if(n.get)return L(n.get);if("function"==typeof n.value)return L(n.value)}e=i(e)}return function(){return null}}const M=l(["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"]),x=l(["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"]),I=l(["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"]),k=l(["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"]),P=l(["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"]),z=l(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),U=l(["#text"]),F=l(["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","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","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","wrap","xmlns","slot"]),H=l(["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","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"]),W=l(["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"]),B=l(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),G=c(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Y=c(/<%[\w\W]*|[\w\W]*%>/gm),j=c(/\$\{[\w\W]*/gm),X=c(/^data-[\-\w.\u00B7-\uFFFF]+$/),q=c(/^aria-[\-\w]+$/),$=c(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),K=c(/^(?:\w+script|data):/i),V=c(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Z=c(/^html$/i),J=c(/^[a-z][.\w]*(-[.\w]+)+$/i);var Q=Object.freeze({__proto__:null,ARIA_ATTR:q,ATTR_WHITESPACE:V,CUSTOM_ELEMENT:J,DATA_ATTR:X,DOCTYPE_NAME:Z,ERB_EXPR:Y,IS_ALLOWED_URI:$,IS_SCRIPT_OR_DATA:K,MUSTACHE_EXPR:G,TMPLIT_EXPR:j});const ee=function(){return"undefined"==typeof window?null:window};var te=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ee();const o=t=>e(t);if(o.version="3.2.6",o.removed=[],!t||!t.document||9!==t.document.nodeType||!t.Element)return o.isSupported=!1,o;let{document:r}=t;const i=r,a=i.currentScript,{DocumentFragment:c,HTMLTemplateElement:u,Node:m,Element:R,NodeFilter:L,NamedNodeMap:D=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:G,DOMParser:Y,trustedTypes:j}=t,X=R.prototype,q=C(X,"cloneNode"),K=C(X,"remove"),V=C(X,"nextSibling"),J=C(X,"childNodes"),te=C(X,"parentNode");if("function"==typeof u){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let ne,oe="";const{implementation:re,createNodeIterator:ie,createDocumentFragment:ae,getElementsByTagName:le}=r,{importNode:ce}=i;let se={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};o.isSupported="function"==typeof n&&"function"==typeof te&&re&&void 0!==re.createHTMLDocument;const{MUSTACHE_EXPR:ue,ERB_EXPR:me,TMPLIT_EXPR:pe,DATA_ATTR:fe,ARIA_ATTR:de,IS_SCRIPT_OR_DATA:he,ATTR_WHITESPACE:ge,CUSTOM_ELEMENT:Te}=Q;let{IS_ALLOWED_URI:ye}=Q,Ee=null;const Ae=O({},[...M,...x,...I,...P,...U]);let _e=null;const Se=O({},[...F,...H,...W,...B]);let be=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}})),Ne=null,we=null,Re=!0,Le=!0,Oe=!1,De=!0,ve=!1,Ce=!0,Me=!1,xe=!1,Ie=!1,ke=!1,Pe=!1,ze=!1,Ue=!0,Fe=!1,He=!0,We=!1,Be={},Ge=null;const Ye=O({},["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 je=null;const Xe=O({},["audio","video","img","source","image","track"]);let qe=null;const $e=O({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ke="http://www.w3.org/1998/Math/MathML",Ve="http://www.w3.org/2000/svg",Ze="http://www.w3.org/1999/xhtml";let Je=Ze,Qe=!1,et=null;const tt=O({},[Ke,Ve,Ze],y);let nt=O({},["mi","mo","mn","ms","mtext"]),ot=O({},["annotation-xml"]);const rt=O({},["title","style","font","a","script"]);let it=null;const at=["application/xhtml+xml","text/html"];let lt=null,ct=null;const st=r.createElement("form"),ut=function(e){return e instanceof RegExp||e instanceof Function},mt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!ct||ct!==e){if(e&&"object"==typeof e||(e={}),e=v(e),it=-1===at.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,lt="application/xhtml+xml"===it?y:T,Ee=b(e,"ALLOWED_TAGS")?O({},e.ALLOWED_TAGS,lt):Ae,_e=b(e,"ALLOWED_ATTR")?O({},e.ALLOWED_ATTR,lt):Se,et=b(e,"ALLOWED_NAMESPACES")?O({},e.ALLOWED_NAMESPACES,y):tt,qe=b(e,"ADD_URI_SAFE_ATTR")?O(v($e),e.ADD_URI_SAFE_ATTR,lt):$e,je=b(e,"ADD_DATA_URI_TAGS")?O(v(Xe),e.ADD_DATA_URI_TAGS,lt):Xe,Ge=b(e,"FORBID_CONTENTS")?O({},e.FORBID_CONTENTS,lt):Ye,Ne=b(e,"FORBID_TAGS")?O({},e.FORBID_TAGS,lt):v({}),we=b(e,"FORBID_ATTR")?O({},e.FORBID_ATTR,lt):v({}),Be=!!b(e,"USE_PROFILES")&&e.USE_PROFILES,Re=!1!==e.ALLOW_ARIA_ATTR,Le=!1!==e.ALLOW_DATA_ATTR,Oe=e.ALLOW_UNKNOWN_PROTOCOLS||!1,De=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,ve=e.SAFE_FOR_TEMPLATES||!1,Ce=!1!==e.SAFE_FOR_XML,Me=e.WHOLE_DOCUMENT||!1,ke=e.RETURN_DOM||!1,Pe=e.RETURN_DOM_FRAGMENT||!1,ze=e.RETURN_TRUSTED_TYPE||!1,Ie=e.FORCE_BODY||!1,Ue=!1!==e.SANITIZE_DOM,Fe=e.SANITIZE_NAMED_PROPS||!1,He=!1!==e.KEEP_CONTENT,We=e.IN_PLACE||!1,ye=e.ALLOWED_URI_REGEXP||$,Je=e.NAMESPACE||Ze,nt=e.MATHML_TEXT_INTEGRATION_POINTS||nt,ot=e.HTML_INTEGRATION_POINTS||ot,be=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&ut(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(be.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&ut(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(be.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(be.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),ve&&(Le=!1),Pe&&(ke=!0),Be&&(Ee=O({},U),_e=[],!0===Be.html&&(O(Ee,M),O(_e,F)),!0===Be.svg&&(O(Ee,x),O(_e,H),O(_e,B)),!0===Be.svgFilters&&(O(Ee,I),O(_e,H),O(_e,B)),!0===Be.mathMl&&(O(Ee,P),O(_e,W),O(_e,B))),e.ADD_TAGS&&(Ee===Ae&&(Ee=v(Ee)),O(Ee,e.ADD_TAGS,lt)),e.ADD_ATTR&&(_e===Se&&(_e=v(_e)),O(_e,e.ADD_ATTR,lt)),e.ADD_URI_SAFE_ATTR&&O(qe,e.ADD_URI_SAFE_ATTR,lt),e.FORBID_CONTENTS&&(Ge===Ye&&(Ge=v(Ge)),O(Ge,e.FORBID_CONTENTS,lt)),He&&(Ee["#text"]=!0),Me&&O(Ee,["html","head","body"]),Ee.table&&(O(Ee,["tbody"]),delete Ne.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw w('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw w('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');ne=e.TRUSTED_TYPES_POLICY,oe=ne.createHTML("")}else void 0===ne&&(ne=function(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 r="dompurify"+(n?"#"+n:"");try{return e.createPolicy(r,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+r+" could not be created."),null}}(j,a)),null!==ne&&"string"==typeof oe&&(oe=ne.createHTML(""));l&&l(e),ct=e}},pt=O({},[...x,...I,...k]),ft=O({},[...P,...z]),dt=function(e){h(o.removed,{element:e});try{te(e).removeChild(e)}catch(t){K(e)}},ht=function(e,t){try{h(o.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){h(o.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(ke||Pe)try{dt(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},gt=function(e){let t=null,n=null;if(Ie)e="<remove></remove>"+e;else{const t=E(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===it&&Je===Ze&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const o=ne?ne.createHTML(e):e;if(Je===Ze)try{t=(new Y).parseFromString(o,it)}catch(e){}if(!t||!t.documentElement){t=re.createDocument(Je,"template",null);try{t.documentElement.innerHTML=Qe?oe:o}catch(e){}}const i=t.body||t.documentElement;return e&&n&&i.insertBefore(r.createTextNode(n),i.childNodes[0]||null),Je===Ze?le.call(t,Me?"html":"body")[0]:Me?t.documentElement:i},Tt=function(e){return ie.call(e.ownerDocument||e,e,L.SHOW_ELEMENT|L.SHOW_COMMENT|L.SHOW_TEXT|L.SHOW_PROCESSING_INSTRUCTION|L.SHOW_CDATA_SECTION,null)},yt=function(e){return e instanceof G&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof D)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},Et=function(e){return"function"==typeof m&&e instanceof m};function At(e,t,n){p(e,(e=>{e.call(o,t,n,ct)}))}const _t=function(e){let t=null;if(At(se.beforeSanitizeElements,e,null),yt(e))return dt(e),!0;const n=lt(e.nodeName);if(At(se.uponSanitizeElement,e,{tagName:n,allowedTags:Ee}),Ce&&e.hasChildNodes()&&!Et(e.firstElementChild)&&N(/<[/\w!]/g,e.innerHTML)&&N(/<[/\w!]/g,e.textContent))return dt(e),!0;if(7===e.nodeType)return dt(e),!0;if(Ce&&8===e.nodeType&&N(/<[/\w]/g,e.data))return dt(e),!0;if(!Ee[n]||Ne[n]){if(!Ne[n]&&bt(n)){if(be.tagNameCheck instanceof RegExp&&N(be.tagNameCheck,n))return!1;if(be.tagNameCheck instanceof Function&&be.tagNameCheck(n))return!1}if(He&&!Ge[n]){const t=te(e)||e.parentNode,n=J(e)||e.childNodes;if(n&&t)for(let o=n.length-1;o>=0;--o){const r=q(n[o],!0);r.__removalCount=(e.__removalCount||0)+1,t.insertBefore(r,V(e))}}return dt(e),!0}return e instanceof R&&!function(e){let t=te(e);t&&t.tagName||(t={namespaceURI:Je,tagName:"template"});const n=T(e.tagName),o=T(t.tagName);return!!et[e.namespaceURI]&&(e.namespaceURI===Ve?t.namespaceURI===Ze?"svg"===n:t.namespaceURI===Ke?"svg"===n&&("annotation-xml"===o||nt[o]):Boolean(pt[n]):e.namespaceURI===Ke?t.namespaceURI===Ze?"math"===n:t.namespaceURI===Ve?"math"===n&&ot[o]:Boolean(ft[n]):e.namespaceURI===Ze?!(t.namespaceURI===Ve&&!ot[o])&&!(t.namespaceURI===Ke&&!nt[o])&&!ft[n]&&(rt[n]||!pt[n]):!("application/xhtml+xml"!==it||!et[e.namespaceURI]))}(e)?(dt(e),!0):"noscript"!==n&&"noembed"!==n&&"noframes"!==n||!N(/<\/no(script|embed|frames)/i,e.innerHTML)?(ve&&3===e.nodeType&&(t=e.textContent,p([ue,me,pe],(e=>{t=A(t,e," ")})),e.textContent!==t&&(h(o.removed,{element:e.cloneNode()}),e.textContent=t)),At(se.afterSanitizeElements,e,null),!1):(dt(e),!0)},St=function(e,t,n){if(Ue&&("id"===t||"name"===t)&&(n in r||n in st))return!1;if(Le&&!we[t]&&N(fe,t));else if(Re&&N(de,t));else if(!_e[t]||we[t]){if(!(bt(e)&&(be.tagNameCheck instanceof RegExp&&N(be.tagNameCheck,e)||be.tagNameCheck instanceof Function&&be.tagNameCheck(e))&&(be.attributeNameCheck instanceof RegExp&&N(be.attributeNameCheck,t)||be.attributeNameCheck instanceof Function&&be.attributeNameCheck(t))||"is"===t&&be.allowCustomizedBuiltInElements&&(be.tagNameCheck instanceof RegExp&&N(be.tagNameCheck,n)||be.tagNameCheck instanceof Function&&be.tagNameCheck(n))))return!1}else if(qe[t]);else if(N(ye,A(n,ge,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==_(n,"data:")||!je[e])if(Oe&&!N(he,A(n,ge,"")));else if(n)return!1;return!0},bt=function(e){return"annotation-xml"!==e&&E(e,Te)},Nt=function(e){At(se.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||yt(e))return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:_e,forceKeepAttr:void 0};let r=t.length;for(;r--;){const i=t[r],{name:a,namespaceURI:l,value:c}=i,s=lt(a),u=c;let m="value"===a?u:S(u);if(n.attrName=s,n.attrValue=m,n.keepAttr=!0,n.forceKeepAttr=void 0,At(se.uponSanitizeAttribute,e,n),m=n.attrValue,!Fe||"id"!==s&&"name"!==s||(ht(a,e),m="user-content-"+m),Ce&&N(/((--!?|])>)|<\/(style|title)/i,m)){ht(a,e);continue}if(n.forceKeepAttr)continue;if(!n.keepAttr){ht(a,e);continue}if(!De&&N(/\/>/i,m)){ht(a,e);continue}ve&&p([ue,me,pe],(e=>{m=A(m,e," ")}));const f=lt(e.nodeName);if(St(f,s,m)){if(ne&&"object"==typeof j&&"function"==typeof j.getAttributeType)if(l);else switch(j.getAttributeType(f,s)){case"TrustedHTML":m=ne.createHTML(m);break;case"TrustedScriptURL":m=ne.createScriptURL(m)}if(m!==u)try{l?e.setAttributeNS(l,a,m):e.setAttribute(a,m),yt(e)?dt(e):d(o.removed)}catch(t){ht(a,e)}}else ht(a,e)}At(se.afterSanitizeAttributes,e,null)},wt=function e(t){let n=null;const o=Tt(t);for(At(se.beforeSanitizeShadowDOM,t,null);n=o.nextNode();)At(se.uponSanitizeShadowNode,n,null),_t(n),Nt(n),n.content instanceof c&&e(n.content);At(se.afterSanitizeShadowDOM,t,null)};return o.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,r=null,a=null,l=null;if(Qe=!e,Qe&&(e="\x3c!--\x3e"),"string"!=typeof e&&!Et(e)){if("function"!=typeof e.toString)throw w("toString is not a function");if("string"!=typeof(e=e.toString()))throw w("dirty is not a string, aborting")}if(!o.isSupported)return e;if(xe||mt(t),o.removed=[],"string"==typeof e&&(We=!1),We){if(e.nodeName){const t=lt(e.nodeName);if(!Ee[t]||Ne[t])throw w("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof m)n=gt("\x3c!----\x3e"),r=n.ownerDocument.importNode(e,!0),1===r.nodeType&&"BODY"===r.nodeName||"HTML"===r.nodeName?n=r:n.appendChild(r);else{if(!ke&&!ve&&!Me&&-1===e.indexOf("<"))return ne&&ze?ne.createHTML(e):e;if(n=gt(e),!n)return ke?null:ze?oe:""}n&&Ie&&dt(n.firstChild);const s=Tt(We?e:n);for(;a=s.nextNode();)_t(a),Nt(a),a.content instanceof c&&wt(a.content);if(We)return e;if(ke){if(Pe)for(l=ae.call(n.ownerDocument);n.firstChild;)l.appendChild(n.firstChild);else l=n;return(_e.shadowroot||_e.shadowrootmode)&&(l=ce.call(i,l,!0)),l}let u=Me?n.outerHTML:n.innerHTML;return Me&&Ee["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&N(Z,n.ownerDocument.doctype.name)&&(u="<!DOCTYPE "+n.ownerDocument.doctype.name+">\n"+u),ve&&p([ue,me,pe],(e=>{u=A(u,e," ")})),ne&&ze?ne.createHTML(u):u},o.setConfig=function(){mt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),xe=!0},o.clearConfig=function(){ct=null,xe=!1},o.isValidAttribute=function(e,t,n){ct||mt({});const o=lt(e),r=lt(t);return St(o,r,n)},o.addHook=function(e,t){"function"==typeof t&&h(se[e],t)},o.removeHook=function(e,t){if(void 0!==t){const n=f(se[e],t);return-1===n?void 0:g(se[e],n,1)[0]}return d(se[e])},o.removeHooks=function(e){se[e]=[]},o.removeAllHooks=function(){se={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},o}();let ne;const oe=["a","b","em","i","strong","p","br","abbr"],re=["target","href","rel","name","download","title"];function ie(e,t){const n={ALLOWED_TAGS:[...t?.tags||oe],ALLOWED_ATTR:[...t?.attr||re]},o=function(){if(void 0!==ne)return ne;if("undefined"==typeof window||!window.trustedTypes)return ne=null,null;try{ne=window.trustedTypes.createPolicy("woocommerce-sanitize-noop",{createHTML:e=>e})}catch(e){ne=null,console.warn('Failed to create "woocommerce-sanitize-noop" trusted type policy:',e)}return ne}();return o&&(n.TRUSTED_TYPES_POLICY=o),"HTMLBodyElement"===t?.returnType?n.RETURN_DOM=!0:"DocumentFragment"===t?.returnType&&(n.RETURN_DOM_FRAGMENT=!0),te.sanitize(null!=e?e:"",n)}let ae;function le(){if(void 0!==ae)return ae;if("undefined"==typeof window||!window.trustedTypes)return ae=null,null;try{ae=window.trustedTypes.createPolicy("woocommerce-sanitize",{createHTML:e=>ie(e)})}catch(e){ae=null,console.warn('Failed to create "woocommerce-sanitize" trusted type policy:',e)}return ae}(window.wc=window.wc||{}).sanitize=t})();