"use strict";Liferay.Loader.define("@liferay!analytics-settings-web$testing-library/dom@8.20.0/dist/queries/display-value",["module","exports","require","../query-helpers","../helpers","./all-utils"],(function(e,l,a){window;{Object.defineProperty(l,"__esModule",{value:!0}),l.queryByDisplayValue=l.queryAllByDisplayValue=l.getByDisplayValue=l.getAllByDisplayValue=l.findByDisplayValue=l.findAllByDisplayValue=void 0;var i=a("../query-helpers"),t=a("../helpers"),r=a("./all-utils");const queryAllByDisplayValue=(e,l,{exact:a=!0,collapseWhitespace:i,trim:s,normalizer:y}={})=>{(0,t.checkContainerType)(e);const u=a?r.matches:r.fuzzyMatches,n=(0,r.makeNormalizer)({collapseWhitespace:i,trim:s,normalizer:y});return Array.from(e.querySelectorAll("input,textarea,select")).filter((e=>{if("SELECT"===e.tagName){return Array.from(e.options).filter((e=>e.selected)).some((e=>u((0,r.getNodeText)(e),e,l,n)))}return u(e.value,e,l,n)}))},getMultipleError=(e,l)=>`Found multiple elements with the display value: ${l}.`,getMissingError=(e,l)=>`Unable to find an element with the display value: ${l}.`,e=(0,i.wrapAllByQueryWithSuggestion)(queryAllByDisplayValue,queryAllByDisplayValue.name,"queryAll");l.queryAllByDisplayValue=e;const[s,y,u,n,p]=(0,r.buildQueries)(queryAllByDisplayValue,getMultipleError,getMissingError);l.findByDisplayValue=p,l.findAllByDisplayValue=n,l.getByDisplayValue=u,l.getAllByDisplayValue=y,l.queryByDisplayValue=s}}));
//# sourceMappingURL=display-value.js.map