@descope/web-components-ui 1.18.0 → 1.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/umd/5414.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
/*! For license information please see 5414.js.LICENSE.txt */
|
2
|
-
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[5414],{25414:(e,t,n)=>{n.d(t,{A:()=>ee});const{entries:o,setPrototypeOf:r,isFrozen:i,getPrototypeOf:a,getOwnPropertyDescriptor:l}=Object;let{freeze:c,seal:s,create:u}=Object,{apply:m,construct:p}="undefined"!=typeof Reflect&&Reflect;c||(c=function(e){return e}),s||(s=function(e){return e}),m||(m=function(e,t,n){return e.apply(t,n)}),p||(p=function(e,t){return new e(...t)});const f=R(Array.prototype.forEach),d=R(Array.prototype.pop),h=R(Array.prototype.push),g=R(String.prototype.toLowerCase),T=R(String.prototype.toString),y=R(String.prototype.match),E=R(String.prototype.replace),_=R(String.prototype.indexOf),A=R(String.prototype.trim),S=R(Object.prototype.hasOwnProperty),b=R(RegExp.prototype.test),N=(w=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return p(w,t)});var w;function R(e){return function(t){for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return m(e,t,o)}}function O(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:g;r&&r(e,null);let o=t.length;for(;o--;){let r=t[o];if("string"==typeof r){const e=n(r);e!==r&&(i(t)||(t[o]=e),r=e)}e[r]=!0}return e}function C(e){for(let t=0;t<e.length;t++)S(e,t)||(e[t]=null);return e}function D(e){const t=u(null);for(const[n,r]of o(e))S(e,n)&&(Array.isArray(r)?t[n]=C(r):r&&"object"==typeof r&&r.constructor===Object?t[n]=D(r):t[n]=r);return t}function L(e,t){for(;null!==e;){const n=l(e,t);if(n){if(n.get)return R(n.get);if("function"==typeof n.value)return R(n.value)}e=a(e)}return function(){return null}}const v=c(["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"]),k=c(["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"]),x=c(["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"]),M=c(["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"]),I=c(["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"]),U=c(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),z=c(["#text"]),P=c(["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=c(["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"]),F=c(["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=c(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),W=s(/\{\{[\w\W]*|[\w\W]*\}\}/gm),G=s(/<%[\w\W]*|[\w\W]*%>/gm),Y=s(/\$\{[\w\W]*}/gm),j=s(/^data-[\-\w.\u00B7-\uFFFF]+$/),X=s(/^aria-[\-\w]+$/),q=s(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),$=s(/^(?:\w+script|data):/i),K=s(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),V=s(/^html$/i),Z=s(/^[a-z][.\w]*(-[.\w]+)+$/i);var J=Object.freeze({__proto__:null,ARIA_ATTR:X,ATTR_WHITESPACE:K,CUSTOM_ELEMENT:Z,DATA_ATTR:j,DOCTYPE_NAME:V,ERB_EXPR:G,IS_ALLOWED_URI:q,IS_SCRIPT_OR_DATA:$,MUSTACHE_EXPR:W,TMPLIT_EXPR:Y});const Q=function(){return"undefined"==typeof window?null:window};var ee=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Q();const n=t=>e(t);if(n.version="3.2.3",n.removed=[],!t||!t.document||9!==t.document.nodeType)return n.isSupported=!1,n;let{document:r}=t;const i=r,a=i.currentScript,{DocumentFragment:l,HTMLTemplateElement:s,Node:m,Element:p,NodeFilter:w,NamedNodeMap:R=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:C,DOMParser:W,trustedTypes:G}=t,Y=p.prototype,j=L(Y,"cloneNode"),X=L(Y,"remove"),$=L(Y,"nextSibling"),K=L(Y,"childNodes"),Z=L(Y,"parentNode");if("function"==typeof s){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let ee,te="";const{implementation:ne,createNodeIterator:oe,createDocumentFragment:re,getElementsByTagName:ie}=r,{importNode:ae}=i;let le={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};n.isSupported="function"==typeof o&&"function"==typeof Z&&ne&&void 0!==ne.createHTMLDocument;const{MUSTACHE_EXPR:ce,ERB_EXPR:se,TMPLIT_EXPR:ue,DATA_ATTR:me,ARIA_ATTR:pe,IS_SCRIPT_OR_DATA:fe,ATTR_WHITESPACE:de,CUSTOM_ELEMENT:he}=J;let{IS_ALLOWED_URI:ge}=J,Te=null;const ye=O({},[...v,...k,...x,...I,...z]);let Ee=null;const _e=O({},[...P,...H,...F,...B]);let Ae=Object.seal(u(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}})),Se=null,be=null,Ne=!0,we=!0,Re=!1,Oe=!0,Ce=!1,De=!0,Le=!1,ve=!1,ke=!1,xe=!1,Me=!1,Ie=!1,Ue=!0,ze=!1,Pe=!0,He=!1,Fe={},Be=null;const We=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 Ge=null;const Ye=O({},["audio","video","img","source","image","track"]);let je=null;const Xe=O({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),qe="http://www.w3.org/1998/Math/MathML",$e="http://www.w3.org/2000/svg",Ke="http://www.w3.org/1999/xhtml";let Ve=Ke,Ze=!1,Je=null;const Qe=O({},[qe,$e,Ke],T);let et=O({},["mi","mo","mn","ms","mtext"]),tt=O({},["annotation-xml"]);const nt=O({},["title","style","font","a","script"]);let ot=null;const rt=["application/xhtml+xml","text/html"];let it=null,at=null;const lt=r.createElement("form"),ct=function(e){return e instanceof RegExp||e instanceof Function},st=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!at||at!==e){if(e&&"object"==typeof e||(e={}),e=D(e),ot=-1===rt.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,it="application/xhtml+xml"===ot?T:g,Te=S(e,"ALLOWED_TAGS")?O({},e.ALLOWED_TAGS,it):ye,Ee=S(e,"ALLOWED_ATTR")?O({},e.ALLOWED_ATTR,it):_e,Je=S(e,"ALLOWED_NAMESPACES")?O({},e.ALLOWED_NAMESPACES,T):Qe,je=S(e,"ADD_URI_SAFE_ATTR")?O(D(Xe),e.ADD_URI_SAFE_ATTR,it):Xe,Ge=S(e,"ADD_DATA_URI_TAGS")?O(D(Ye),e.ADD_DATA_URI_TAGS,it):Ye,Be=S(e,"FORBID_CONTENTS")?O({},e.FORBID_CONTENTS,it):We,Se=S(e,"FORBID_TAGS")?O({},e.FORBID_TAGS,it):{},be=S(e,"FORBID_ATTR")?O({},e.FORBID_ATTR,it):{},Fe=!!S(e,"USE_PROFILES")&&e.USE_PROFILES,Ne=!1!==e.ALLOW_ARIA_ATTR,we=!1!==e.ALLOW_DATA_ATTR,Re=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Oe=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Ce=e.SAFE_FOR_TEMPLATES||!1,De=!1!==e.SAFE_FOR_XML,Le=e.WHOLE_DOCUMENT||!1,xe=e.RETURN_DOM||!1,Me=e.RETURN_DOM_FRAGMENT||!1,Ie=e.RETURN_TRUSTED_TYPE||!1,ke=e.FORCE_BODY||!1,Ue=!1!==e.SANITIZE_DOM,ze=e.SANITIZE_NAMED_PROPS||!1,Pe=!1!==e.KEEP_CONTENT,He=e.IN_PLACE||!1,ge=e.ALLOWED_URI_REGEXP||q,Ve=e.NAMESPACE||Ke,et=e.MATHML_TEXT_INTEGRATION_POINTS||et,tt=e.HTML_INTEGRATION_POINTS||tt,Ae=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&ct(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Ae.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&ct(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Ae.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Ae.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ce&&(we=!1),Me&&(xe=!0),Fe&&(Te=O({},z),Ee=[],!0===Fe.html&&(O(Te,v),O(Ee,P)),!0===Fe.svg&&(O(Te,k),O(Ee,H),O(Ee,B)),!0===Fe.svgFilters&&(O(Te,x),O(Ee,H),O(Ee,B)),!0===Fe.mathMl&&(O(Te,I),O(Ee,F),O(Ee,B))),e.ADD_TAGS&&(Te===ye&&(Te=D(Te)),O(Te,e.ADD_TAGS,it)),e.ADD_ATTR&&(Ee===_e&&(Ee=D(Ee)),O(Ee,e.ADD_ATTR,it)),e.ADD_URI_SAFE_ATTR&&O(je,e.ADD_URI_SAFE_ATTR,it),e.FORBID_CONTENTS&&(Be===We&&(Be=D(Be)),O(Be,e.FORBID_CONTENTS,it)),Pe&&(Te["#text"]=!0),Le&&O(Te,["html","head","body"]),Te.table&&(O(Te,["tbody"]),delete Se.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw N('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw N('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');ee=e.TRUSTED_TYPES_POLICY,te=ee.createHTML("")}else void 0===ee&&(ee=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}}(G,a)),null!==ee&&"string"==typeof te&&(te=ee.createHTML(""));c&&c(e),at=e}},ut=O({},[...k,...x,...M]),mt=O({},[...I,...U]),pt=function(e){h(n.removed,{element:e});try{Z(e).removeChild(e)}catch(t){X(e)}},ft=function(e,t){try{h(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){h(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(xe||Me)try{pt(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},dt=function(e){let t=null,n=null;if(ke)e="<remove></remove>"+e;else{const t=y(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===ot&&Ve===Ke&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const o=ee?ee.createHTML(e):e;if(Ve===Ke)try{t=(new W).parseFromString(o,ot)}catch(e){}if(!t||!t.documentElement){t=ne.createDocument(Ve,"template",null);try{t.documentElement.innerHTML=Ze?te:o}catch(e){}}const i=t.body||t.documentElement;return e&&n&&i.insertBefore(r.createTextNode(n),i.childNodes[0]||null),Ve===Ke?ie.call(t,Le?"html":"body")[0]:Le?t.documentElement:i},ht=function(e){return oe.call(e.ownerDocument||e,e,w.SHOW_ELEMENT|w.SHOW_COMMENT|w.SHOW_TEXT|w.SHOW_PROCESSING_INSTRUCTION|w.SHOW_CDATA_SECTION,null)},gt=function(e){return e instanceof C&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof R)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},Tt=function(e){return"function"==typeof m&&e instanceof m};function yt(e,t,o){f(e,(e=>{e.call(n,t,o,at)}))}const Et=function(e){let t=null;if(yt(le.beforeSanitizeElements,e,null),gt(e))return pt(e),!0;const o=it(e.nodeName);if(yt(le.uponSanitizeElement,e,{tagName:o,allowedTags:Te}),e.hasChildNodes()&&!Tt(e.firstElementChild)&&b(/<[/\w]/g,e.innerHTML)&&b(/<[/\w]/g,e.textContent))return pt(e),!0;if(7===e.nodeType)return pt(e),!0;if(De&&8===e.nodeType&&b(/<[/\w]/g,e.data))return pt(e),!0;if(!Te[o]||Se[o]){if(!Se[o]&&At(o)){if(Ae.tagNameCheck instanceof RegExp&&b(Ae.tagNameCheck,o))return!1;if(Ae.tagNameCheck instanceof Function&&Ae.tagNameCheck(o))return!1}if(Pe&&!Be[o]){const t=Z(e)||e.parentNode,n=K(e)||e.childNodes;if(n&&t)for(let o=n.length-1;o>=0;--o){const r=j(n[o],!0);r.__removalCount=(e.__removalCount||0)+1,t.insertBefore(r,$(e))}}return pt(e),!0}return e instanceof p&&!function(e){let t=Z(e);t&&t.tagName||(t={namespaceURI:Ve,tagName:"template"});const n=g(e.tagName),o=g(t.tagName);return!!Je[e.namespaceURI]&&(e.namespaceURI===$e?t.namespaceURI===Ke?"svg"===n:t.namespaceURI===qe?"svg"===n&&("annotation-xml"===o||et[o]):Boolean(ut[n]):e.namespaceURI===qe?t.namespaceURI===Ke?"math"===n:t.namespaceURI===$e?"math"===n&&tt[o]:Boolean(mt[n]):e.namespaceURI===Ke?!(t.namespaceURI===$e&&!tt[o])&&!(t.namespaceURI===qe&&!et[o])&&!mt[n]&&(nt[n]||!ut[n]):!("application/xhtml+xml"!==ot||!Je[e.namespaceURI]))}(e)?(pt(e),!0):"noscript"!==o&&"noembed"!==o&&"noframes"!==o||!b(/<\/no(script|embed|frames)/i,e.innerHTML)?(Ce&&3===e.nodeType&&(t=e.textContent,f([ce,se,ue],(e=>{t=E(t,e," ")})),e.textContent!==t&&(h(n.removed,{element:e.cloneNode()}),e.textContent=t)),yt(le.afterSanitizeElements,e,null),!1):(pt(e),!0)},_t=function(e,t,n){if(Ue&&("id"===t||"name"===t)&&(n in r||n in lt))return!1;if(we&&!be[t]&&b(me,t));else if(Ne&&b(pe,t));else if(!Ee[t]||be[t]){if(!(At(e)&&(Ae.tagNameCheck instanceof RegExp&&b(Ae.tagNameCheck,e)||Ae.tagNameCheck instanceof Function&&Ae.tagNameCheck(e))&&(Ae.attributeNameCheck instanceof RegExp&&b(Ae.attributeNameCheck,t)||Ae.attributeNameCheck instanceof Function&&Ae.attributeNameCheck(t))||"is"===t&&Ae.allowCustomizedBuiltInElements&&(Ae.tagNameCheck instanceof RegExp&&b(Ae.tagNameCheck,n)||Ae.tagNameCheck instanceof Function&&Ae.tagNameCheck(n))))return!1}else if(je[t]);else if(b(ge,E(n,de,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==_(n,"data:")||!Ge[e])if(Re&&!b(fe,E(n,de,"")));else if(n)return!1;return!0},At=function(e){return"annotation-xml"!==e&&y(e,he)},St=function(e){yt(le.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||gt(e))return;const o={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Ee,forceKeepAttr:void 0};let r=t.length;for(;r--;){const i=t[r],{name:a,namespaceURI:l,value:c}=i,s=it(a);let u="value"===a?c:A(c);if(o.attrName=s,o.attrValue=u,o.keepAttr=!0,o.forceKeepAttr=void 0,yt(le.uponSanitizeAttribute,e,o),u=o.attrValue,!ze||"id"!==s&&"name"!==s||(ft(a,e),u="user-content-"+u),De&&b(/((--!?|])>)|<\/(style|title)/i,u)){ft(a,e);continue}if(o.forceKeepAttr)continue;if(ft(a,e),!o.keepAttr)continue;if(!Oe&&b(/\/>/i,u)){ft(a,e);continue}Ce&&f([ce,se,ue],(e=>{u=E(u,e," ")}));const m=it(e.nodeName);if(_t(m,s,u)){if(ee&&"object"==typeof G&&"function"==typeof G.getAttributeType)if(l);else switch(G.getAttributeType(m,s)){case"TrustedHTML":u=ee.createHTML(u);break;case"TrustedScriptURL":u=ee.createScriptURL(u)}try{l?e.setAttributeNS(l,a,u):e.setAttribute(a,u),gt(e)?pt(e):d(n.removed)}catch(e){}}}yt(le.afterSanitizeAttributes,e,null)},bt=function e(t){let n=null;const o=ht(t);for(yt(le.beforeSanitizeShadowDOM,t,null);n=o.nextNode();)yt(le.uponSanitizeShadowNode,n,null),Et(n),St(n),n.content instanceof l&&e(n.content);yt(le.afterSanitizeShadowDOM,t,null)};return n.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=null,r=null,a=null,c=null;if(Ze=!e,Ze&&(e="\x3c!--\x3e"),"string"!=typeof e&&!Tt(e)){if("function"!=typeof e.toString)throw N("toString is not a function");if("string"!=typeof(e=e.toString()))throw N("dirty is not a string, aborting")}if(!n.isSupported)return e;if(ve||st(t),n.removed=[],"string"==typeof e&&(He=!1),He){if(e.nodeName){const t=it(e.nodeName);if(!Te[t]||Se[t])throw N("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof m)o=dt("\x3c!----\x3e"),r=o.ownerDocument.importNode(e,!0),1===r.nodeType&&"BODY"===r.nodeName||"HTML"===r.nodeName?o=r:o.appendChild(r);else{if(!xe&&!Ce&&!Le&&-1===e.indexOf("<"))return ee&&Ie?ee.createHTML(e):e;if(o=dt(e),!o)return xe?null:Ie?te:""}o&&ke&&pt(o.firstChild);const s=ht(He?e:o);for(;a=s.nextNode();)Et(a),St(a),a.content instanceof l&&bt(a.content);if(He)return e;if(xe){if(Me)for(c=re.call(o.ownerDocument);o.firstChild;)c.appendChild(o.firstChild);else c=o;return(Ee.shadowroot||Ee.shadowrootmode)&&(c=ae.call(i,c,!0)),c}let u=Le?o.outerHTML:o.innerHTML;return Le&&Te["!doctype"]&&o.ownerDocument&&o.ownerDocument.doctype&&o.ownerDocument.doctype.name&&b(V,o.ownerDocument.doctype.name)&&(u="<!DOCTYPE "+o.ownerDocument.doctype.name+">\n"+u),Ce&&f([ce,se,ue],(e=>{u=E(u,e," ")})),ee&&Ie?ee.createHTML(u):u},n.setConfig=function(){st(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),ve=!0},n.clearConfig=function(){at=null,ve=!1},n.isValidAttribute=function(e,t,n){at||st({});const o=it(e),r=it(t);return _t(o,r,n)},n.addHook=function(e,t){"function"==typeof t&&h(le[e],t)},n.removeHook=function(e){return d(le[e])},n.removeHooks=function(e){le[e]=[]},n.removeAllHooks=function(){le={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},n}()}}]);
|
2
|
+
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[5414],{25414:(e,t,n)=>{n.d(t,{A:()=>ne});const{entries:o,setPrototypeOf:r,isFrozen:i,getPrototypeOf:a,getOwnPropertyDescriptor:l}=Object;let{freeze:c,seal:s,create:u}=Object,{apply:m,construct:p}="undefined"!=typeof Reflect&&Reflect;c||(c=function(e){return e}),s||(s=function(e){return e}),m||(m=function(e,t,n){return e.apply(t,n)}),p||(p=function(e,t){return new e(...t)});const f=v(Array.prototype.forEach),d=v(Array.prototype.lastIndexOf),h=v(Array.prototype.pop),g=v(Array.prototype.push),T=v(Array.prototype.splice),y=v(String.prototype.toLowerCase),E=v(String.prototype.toString),_=v(String.prototype.match),A=v(String.prototype.replace),S=v(String.prototype.indexOf),b=v(String.prototype.trim),N=v(Object.prototype.hasOwnProperty),w=v(RegExp.prototype.test),R=(O=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return p(O,t)});var O;function v(e){return function(t){for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return m(e,t,o)}}function C(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:y;r&&r(e,null);let o=t.length;for(;o--;){let r=t[o];if("string"==typeof r){const e=n(r);e!==r&&(i(t)||(t[o]=e),r=e)}e[r]=!0}return e}function D(e){for(let t=0;t<e.length;t++)N(e,t)||(e[t]=null);return e}function L(e){const t=u(null);for(const[n,r]of o(e))N(e,n)&&(Array.isArray(r)?t[n]=D(r):r&&"object"==typeof r&&r.constructor===Object?t[n]=L(r):t[n]=r);return t}function k(e,t){for(;null!==e;){const n=l(e,t);if(n){if(n.get)return v(n.get);if("function"==typeof n.value)return v(n.value)}e=a(e)}return function(){return null}}const x=c(["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"]),I=c(["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"]),M=c(["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"]),U=c(["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"]),z=c(["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"]),P=c(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),H=c(["#text"]),F=c(["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"]),B=c(["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=c(["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"]),G=c(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Y=s(/\{\{[\w\W]*|[\w\W]*\}\}/gm),j=s(/<%[\w\W]*|[\w\W]*%>/gm),X=s(/\$\{[\w\W]*/gm),q=s(/^data-[\-\w.\u00B7-\uFFFF]+$/),$=s(/^aria-[\-\w]+$/),K=s(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),V=s(/^(?:\w+script|data):/i),Z=s(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),J=s(/^html$/i),Q=s(/^[a-z][.\w]*(-[.\w]+)+$/i);var ee=Object.freeze({__proto__:null,ARIA_ATTR:$,ATTR_WHITESPACE:Z,CUSTOM_ELEMENT:Q,DATA_ATTR:q,DOCTYPE_NAME:J,ERB_EXPR:j,IS_ALLOWED_URI:K,IS_SCRIPT_OR_DATA:V,MUSTACHE_EXPR:Y,TMPLIT_EXPR:X});const te=function(){return"undefined"==typeof window?null:window};var ne=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:te();const n=t=>e(t);if(n.version="3.2.4",n.removed=[],!t||!t.document||9!==t.document.nodeType||!t.Element)return n.isSupported=!1,n;let{document:r}=t;const i=r,a=i.currentScript,{DocumentFragment:l,HTMLTemplateElement:s,Node:m,Element:p,NodeFilter:O,NamedNodeMap:v=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:D,DOMParser:Y,trustedTypes:j}=t,X=p.prototype,q=k(X,"cloneNode"),$=k(X,"remove"),V=k(X,"nextSibling"),Z=k(X,"childNodes"),Q=k(X,"parentNode");if("function"==typeof s){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:[]};n.isSupported="function"==typeof o&&"function"==typeof Q&&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}=ee;let{IS_ALLOWED_URI:ye}=ee,Ee=null;const _e=C({},[...x,...I,...M,...z,...H]);let Ae=null;const Se=C({},[...F,...B,...W,...G]);let be=Object.seal(u(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,Oe=!0,ve=!1,Ce=!0,De=!1,Le=!0,ke=!1,xe=!1,Ie=!1,Me=!1,Ue=!1,ze=!1,Pe=!0,He=!1,Fe=!0,Be=!1,We={},Ge=null;const Ye=C({},["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=C({},["audio","video","img","source","image","track"]);let qe=null;const $e=C({},["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=C({},[Ke,Ve,Ze],E);let nt=C({},["mi","mo","mn","ms","mtext"]),ot=C({},["annotation-xml"]);const rt=C({},["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=L(e),it=-1===at.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,lt="application/xhtml+xml"===it?E:y,Ee=N(e,"ALLOWED_TAGS")?C({},e.ALLOWED_TAGS,lt):_e,Ae=N(e,"ALLOWED_ATTR")?C({},e.ALLOWED_ATTR,lt):Se,et=N(e,"ALLOWED_NAMESPACES")?C({},e.ALLOWED_NAMESPACES,E):tt,qe=N(e,"ADD_URI_SAFE_ATTR")?C(L($e),e.ADD_URI_SAFE_ATTR,lt):$e,je=N(e,"ADD_DATA_URI_TAGS")?C(L(Xe),e.ADD_DATA_URI_TAGS,lt):Xe,Ge=N(e,"FORBID_CONTENTS")?C({},e.FORBID_CONTENTS,lt):Ye,Ne=N(e,"FORBID_TAGS")?C({},e.FORBID_TAGS,lt):{},we=N(e,"FORBID_ATTR")?C({},e.FORBID_ATTR,lt):{},We=!!N(e,"USE_PROFILES")&&e.USE_PROFILES,Re=!1!==e.ALLOW_ARIA_ATTR,Oe=!1!==e.ALLOW_DATA_ATTR,ve=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Ce=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,De=e.SAFE_FOR_TEMPLATES||!1,Le=!1!==e.SAFE_FOR_XML,ke=e.WHOLE_DOCUMENT||!1,Me=e.RETURN_DOM||!1,Ue=e.RETURN_DOM_FRAGMENT||!1,ze=e.RETURN_TRUSTED_TYPE||!1,Ie=e.FORCE_BODY||!1,Pe=!1!==e.SANITIZE_DOM,He=e.SANITIZE_NAMED_PROPS||!1,Fe=!1!==e.KEEP_CONTENT,Be=e.IN_PLACE||!1,ye=e.ALLOWED_URI_REGEXP||K,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),De&&(Oe=!1),Ue&&(Me=!0),We&&(Ee=C({},H),Ae=[],!0===We.html&&(C(Ee,x),C(Ae,F)),!0===We.svg&&(C(Ee,I),C(Ae,B),C(Ae,G)),!0===We.svgFilters&&(C(Ee,M),C(Ae,B),C(Ae,G)),!0===We.mathMl&&(C(Ee,z),C(Ae,W),C(Ae,G))),e.ADD_TAGS&&(Ee===_e&&(Ee=L(Ee)),C(Ee,e.ADD_TAGS,lt)),e.ADD_ATTR&&(Ae===Se&&(Ae=L(Ae)),C(Ae,e.ADD_ATTR,lt)),e.ADD_URI_SAFE_ATTR&&C(qe,e.ADD_URI_SAFE_ATTR,lt),e.FORBID_CONTENTS&&(Ge===Ye&&(Ge=L(Ge)),C(Ge,e.FORBID_CONTENTS,lt)),Fe&&(Ee["#text"]=!0),ke&&C(Ee,["html","head","body"]),Ee.table&&(C(Ee,["tbody"]),delete Ne.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw R('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw R('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(""));c&&c(e),ct=e}},pt=C({},[...I,...M,...U]),ft=C({},[...z,...P]),dt=function(e){g(n.removed,{element:e});try{Q(e).removeChild(e)}catch(t){$(e)}},ht=function(e,t){try{g(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){g(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(Me||Ue)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,/^[\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,ke?"html":"body")[0]:ke?t.documentElement:i},Tt=function(e){return ie.call(e.ownerDocument||e,e,O.SHOW_ELEMENT|O.SHOW_COMMENT|O.SHOW_TEXT|O.SHOW_PROCESSING_INSTRUCTION|O.SHOW_CDATA_SECTION,null)},yt=function(e){return e instanceof D&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof v)||"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 _t(e,t,o){f(e,(e=>{e.call(n,t,o,ct)}))}const At=function(e){let t=null;if(_t(se.beforeSanitizeElements,e,null),yt(e))return dt(e),!0;const o=lt(e.nodeName);if(_t(se.uponSanitizeElement,e,{tagName:o,allowedTags:Ee}),e.hasChildNodes()&&!Et(e.firstElementChild)&&w(/<[/\w]/g,e.innerHTML)&&w(/<[/\w]/g,e.textContent))return dt(e),!0;if(7===e.nodeType)return dt(e),!0;if(Le&&8===e.nodeType&&w(/<[/\w]/g,e.data))return dt(e),!0;if(!Ee[o]||Ne[o]){if(!Ne[o]&&bt(o)){if(be.tagNameCheck instanceof RegExp&&w(be.tagNameCheck,o))return!1;if(be.tagNameCheck instanceof Function&&be.tagNameCheck(o))return!1}if(Fe&&!Ge[o]){const t=Q(e)||e.parentNode,n=Z(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 p&&!function(e){let t=Q(e);t&&t.tagName||(t={namespaceURI:Je,tagName:"template"});const n=y(e.tagName),o=y(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"!==o&&"noembed"!==o&&"noframes"!==o||!w(/<\/no(script|embed|frames)/i,e.innerHTML)?(De&&3===e.nodeType&&(t=e.textContent,f([ue,me,pe],(e=>{t=A(t,e," ")})),e.textContent!==t&&(g(n.removed,{element:e.cloneNode()}),e.textContent=t)),_t(se.afterSanitizeElements,e,null),!1):(dt(e),!0)},St=function(e,t,n){if(Pe&&("id"===t||"name"===t)&&(n in r||n in st))return!1;if(Oe&&!we[t]&&w(fe,t));else if(Re&&w(de,t));else if(!Ae[t]||we[t]){if(!(bt(e)&&(be.tagNameCheck instanceof RegExp&&w(be.tagNameCheck,e)||be.tagNameCheck instanceof Function&&be.tagNameCheck(e))&&(be.attributeNameCheck instanceof RegExp&&w(be.attributeNameCheck,t)||be.attributeNameCheck instanceof Function&&be.attributeNameCheck(t))||"is"===t&&be.allowCustomizedBuiltInElements&&(be.tagNameCheck instanceof RegExp&&w(be.tagNameCheck,n)||be.tagNameCheck instanceof Function&&be.tagNameCheck(n))))return!1}else if(qe[t]);else if(w(ye,A(n,ge,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==S(n,"data:")||!je[e])if(ve&&!w(he,A(n,ge,"")));else if(n)return!1;return!0},bt=function(e){return"annotation-xml"!==e&&_(e,Te)},Nt=function(e){_t(se.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||yt(e))return;const o={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Ae,forceKeepAttr:void 0};let r=t.length;for(;r--;){const i=t[r],{name:a,namespaceURI:l,value:c}=i,s=lt(a);let u="value"===a?c:b(c);if(o.attrName=s,o.attrValue=u,o.keepAttr=!0,o.forceKeepAttr=void 0,_t(se.uponSanitizeAttribute,e,o),u=o.attrValue,!He||"id"!==s&&"name"!==s||(ht(a,e),u="user-content-"+u),Le&&w(/((--!?|])>)|<\/(style|title)/i,u)){ht(a,e);continue}if(o.forceKeepAttr)continue;if(ht(a,e),!o.keepAttr)continue;if(!Ce&&w(/\/>/i,u)){ht(a,e);continue}De&&f([ue,me,pe],(e=>{u=A(u,e," ")}));const m=lt(e.nodeName);if(St(m,s,u)){if(ne&&"object"==typeof j&&"function"==typeof j.getAttributeType)if(l);else switch(j.getAttributeType(m,s)){case"TrustedHTML":u=ne.createHTML(u);break;case"TrustedScriptURL":u=ne.createScriptURL(u)}try{l?e.setAttributeNS(l,a,u):e.setAttribute(a,u),yt(e)?dt(e):h(n.removed)}catch(e){}}}_t(se.afterSanitizeAttributes,e,null)},wt=function e(t){let n=null;const o=Tt(t);for(_t(se.beforeSanitizeShadowDOM,t,null);n=o.nextNode();)_t(se.uponSanitizeShadowNode,n,null),At(n),Nt(n),n.content instanceof l&&e(n.content);_t(se.afterSanitizeShadowDOM,t,null)};return n.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=null,r=null,a=null,c=null;if(Qe=!e,Qe&&(e="\x3c!--\x3e"),"string"!=typeof e&&!Et(e)){if("function"!=typeof e.toString)throw R("toString is not a function");if("string"!=typeof(e=e.toString()))throw R("dirty is not a string, aborting")}if(!n.isSupported)return e;if(xe||mt(t),n.removed=[],"string"==typeof e&&(Be=!1),Be){if(e.nodeName){const t=lt(e.nodeName);if(!Ee[t]||Ne[t])throw R("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof m)o=gt("\x3c!----\x3e"),r=o.ownerDocument.importNode(e,!0),1===r.nodeType&&"BODY"===r.nodeName||"HTML"===r.nodeName?o=r:o.appendChild(r);else{if(!Me&&!De&&!ke&&-1===e.indexOf("<"))return ne&&ze?ne.createHTML(e):e;if(o=gt(e),!o)return Me?null:ze?oe:""}o&&Ie&&dt(o.firstChild);const s=Tt(Be?e:o);for(;a=s.nextNode();)At(a),Nt(a),a.content instanceof l&&wt(a.content);if(Be)return e;if(Me){if(Ue)for(c=ae.call(o.ownerDocument);o.firstChild;)c.appendChild(o.firstChild);else c=o;return(Ae.shadowroot||Ae.shadowrootmode)&&(c=ce.call(i,c,!0)),c}let u=ke?o.outerHTML:o.innerHTML;return ke&&Ee["!doctype"]&&o.ownerDocument&&o.ownerDocument.doctype&&o.ownerDocument.doctype.name&&w(J,o.ownerDocument.doctype.name)&&(u="<!DOCTYPE "+o.ownerDocument.doctype.name+">\n"+u),De&&f([ue,me,pe],(e=>{u=A(u,e," ")})),ne&&ze?ne.createHTML(u):u},n.setConfig=function(){mt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),xe=!0},n.clearConfig=function(){ct=null,xe=!1},n.isValidAttribute=function(e,t,n){ct||mt({});const o=lt(e),r=lt(t);return St(o,r,n)},n.addHook=function(e,t){"function"==typeof t&&g(se[e],t)},n.removeHook=function(e,t){if(void 0!==t){const n=d(se[e],t);return-1===n?void 0:T(se[e],n,1)[0]}return h(se[e])},n.removeHooks=function(e){se[e]=[]},n.removeAllHooks=function(){se={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},n}()}}]);
|
@@ -1 +1 @@
|
|
1
|
-
/*! @license DOMPurify 3.2.
|
1
|
+
/*! @license DOMPurify 3.2.4 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.4/LICENSE */
|