"use strict";Liferay.Loader.define("@liferay!analytics-settings-web$testing-library/dom@8.20.0/dist/DOMElementFilter",["module","exports","require"],(function(e,t,n){window;{function escapeHTML(e){return e.replace(/</g,"&lt;").replace(/>/g,"&gt;")}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function createDOMElementFilter(e){return{test:e=>{var t;return(null==e||null==(t=e.constructor)?void 0:t.name)&&testNode(e)},serialize:(t,n,s,c,a,u)=>{if(function nodeIsText(e){return e.nodeType===r}(t))return printText(t.data,n);if(function nodeIsComment(e){return e.nodeType===o}(t))return printComment(t.data,n);const i=nodeIsFragment(t)?"DocumentFragment":t.tagName.toLowerCase();return++c>n.maxDepth?printElementAsLeaf(i,n):printElement(i,printProps(nodeIsFragment(t)?[]:Array.from(t.attributes).map((e=>e.name)).sort(),nodeIsFragment(t)?{}:Array.from(t.attributes).reduce(((e,t)=>(e[t.name]=t.value,e)),{}),n,s+n.indent,c,a,u),printChildren(Array.prototype.slice.call(t.childNodes||t.children).filter(e),n,s+n.indent,c,a,u),n,s)}}},t.test=void 0;const printProps=(e,t,n,r,o,s,c)=>{const a=r+n.indent,u=n.colors;return e.map((e=>{const i=t[e];let l=c(i,n,a,o,s);return"string"!=typeof i&&(-1!==l.indexOf("\n")&&(l=n.spacingOuter+a+l+n.spacingOuter+r),l="{"+l+"}"),n.spacingInner+r+u.prop.open+e+u.prop.close+"="+u.value.open+l+u.value.close})).join("")},e=3,printChildren=(t,n,r,o,s,c)=>t.map((t=>{const a="string"==typeof t?printText(t,n):c(t,n,r,o,s);return""===a&&"object"==typeof t&&null!==t&&t.nodeType!==e?"":n.spacingOuter+r+a})).join(""),printText=(e,t)=>{const n=t.colors.content;return n.open+escapeHTML(e)+n.close},printComment=(e,t)=>{const n=t.colors.comment;return n.open+"\x3c!--"+escapeHTML(e)+"--\x3e"+n.close},printElement=(e,t,n,r,o)=>{const s=r.colors.tag;return s.open+"<"+e+(t&&s.close+t+r.spacingOuter+o+s.open)+(n?">"+s.close+n+r.spacingOuter+o+s.open+"</"+e:(t&&!r.min?"":" ")+"/")+">"+s.close},printElementAsLeaf=(e,t)=>{const n=t.colors.tag;return n.open+"<"+e+n.close+" …"+n.open+" />"+n.close},n=1,r=3,o=8,s=11,c=/^((HTML|SVG)\w*)?Element$/,testNode=e=>{const t=e.constructor.name,{nodeType:a,tagName:u}=e,i="string"==typeof u&&u.includes("-")||"function"==typeof e.hasAttribute&&e.hasAttribute("is");return a===n&&(c.test(t)||i)||a===r&&"Text"===t||a===o&&"Comment"===t||a===s&&"DocumentFragment"===t},test=e=>{var t;return(null==e||null==(t=e.constructor)?void 0:t.name)&&testNode(e)};function nodeIsFragment(e){return e.nodeType===s}t.test=test}}));
//# sourceMappingURL=DOMElementFilter.js.map