(()=>{"use strict";var t={n:e=>{var o=e&&e.__esModule?()=>e.default:()=>e;return t.d(o,{a:o}),o},d:(e,o)=>{for(var l in o)t.o(o,l)&&!t.o(e,l)&&Object.defineProperty(e,l,{enumerable:!0,get:o[l]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e)};const e=window.wp.domReady;var o=t.n(e);const l=window.wp.i18n;function r(t,e){return[...document.querySelectorAll(t)].map((t=>(t=>{const o=document.createElement("button");return o.setAttribute("aria-label",e),o.setAttribute("type","button"),o.setAttribute("class","error-details-toggle"),t.appendChild(o),o})(t)))}function n({btn:t,toggleAllButtonSelector:e=null,targetDetailsSelector:o}){let l=!1;const r=[...document.querySelectorAll(o)];let n=[];e&&(n=[...document.querySelectorAll(e)]),t.addEventListener("click",(()=>{l=!l,n.forEach((t=>{t.classList.toggle("is-open")})),r.forEach((t=>{l?t.setAttribute("open",!0):t.removeAttribute("open")}))}))}o()((()=>{r("th.column-details.manage-column",(0,l.__)("Toggle all details","amp")).forEach((t=>{n({btn:t,toggleAllButtonSelector:".column-details button.error-details-toggle",targetDetailsSelector:".column-details details"})})),r("th.manage-column.column-sources_with_invalid_output",(0,l.__)("Toggle all sources","amp")).forEach((t=>{n({btn:t,toggleAllButtonSelector:".column-sources_with_invalid_output button.error-details-toggle",targetDetailsSelector:"details.source"})})),document.querySelectorAll("tr[id]").forEach((t=>{!function(t){const e=t.querySelector(".amp-validation-error-new");e&&t.classList.toggle("new",Boolean(parseInt(e.value)))}(t),function(t){const e=t.querySelector(".amp-validation-error-status");if(!e)return;const{tagName:o,value:l}=e,r="SELECT"===o?"2"===l:"0"===l;t.classList.toggle("kept",r)}(t)}))}))})();