"use strict";Liferay.Loader.define("@liferay!analytics-settings-web$testing-library/dom@8.20.0/dist/pretty-dom",["module","exports","require","@liferay!analytics-settings-web$babel/runtime/helpers/interopRequireDefault","liferay!analytics-settings-web$pretty-format","./DOMElementFilter","./get-user-code-frame","./helpers","./config"],(function(e,t,r){window;{var n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};var o=r("@liferay!analytics-settings-web$babel/runtime/helpers/interopRequireDefault");Object.defineProperty(t,"__esModule",{value:!0}),t.logDOM=void 0,t.prettyDOM=prettyDOM,t.prettyFormat=void 0;var i=function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=_getRequireWildcardCache(t);if(r&&r.has(e))return r.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}n.default=e,r&&r.set(e,n);return n}(r("liferay!analytics-settings-web$pretty-format"));t.prettyFormat=i;var a=o(r("./DOMElementFilter")),l=r("./get-user-code-frame"),s=r("./helpers"),c=r("./config");function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(_getRequireWildcardCache=function(e){return e?r:t})(e)}const shouldHighlight=()=>{let e;try{var t,r;e=JSON.parse(null==(t=process)||null==(r=t.env)?void 0:r.COLORS)}catch(e){}return"boolean"==typeof e?e:"undefined"!=typeof process&&void 0!==process.versions&&void 0!==process.versions.node},{DOMCollection:e}=i.plugins,u=1,f=8;function filterCommentsAndDefaultIgnoreTagsTags(e){return e.nodeType!==f&&(e.nodeType!==u||!e.matches((0,c.getConfig)().defaultIgnore))}function prettyDOM(t,r,o={}){if(t||(t=(0,s.getDocument)().body),"number"!=typeof r&&(r="undefined"!=typeof process&&process.env.DEBUG_PRINT_LIMIT||7e3),0===r)return"";t.documentElement&&(t=t.documentElement);let l=typeof t;if("object"===l?l=t.constructor.name:t={},!("outerHTML"in t))throw new TypeError("Expected an element or document but got "+l);const{filterNode:c=filterCommentsAndDefaultIgnoreTagsTags}=o,u=function _objectWithoutProperties(e,t){var r={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}(o,["filterNode"]),f=i.format(t,n({plugins:[(0,a.default)(c),e],printFunctionName:!1,highlight:shouldHighlight()},u));return void 0!==r&&t.outerHTML.length>r?f.slice(0,r)+"...":f}const logDOM=(...e)=>{const t=(0,l.getUserCodeFrame)();t?console.log(`${prettyDOM(...e)}\n\n${t}`):console.log(prettyDOM(...e))};t.logDOM=logDOM}}));
//# sourceMappingURL=pretty-dom.js.map