!function(){"use strict";var e={n:function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,{a:n}),n},d:function(t,n){for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},t=window.wp.domReady,n=e.n(t),r=window.wp.i18n;n()((()=>{const e=document.querySelectorAll(".ep-credentials-tab"),t=document.getElementById("ep_host"),n=t.labels[0],o=t.nextElementSibling,a=document.getElementsByClassName("ep-additional-fields");let c=document.querySelector(".nav-tab-active");const i=()=>c&&"epio"in c.dataset;let l=i()?t.value:"",s=i()?"":t.value;const u=e=>{i()?l=e.currentTarget.value:s=e.currentTarget.value},d=u=>{c=u.currentTarget;for(const t of e)t.classList.toggle("nav-tab-active",t===c);for(const e of a)e.classList.toggle("hidden",!i());n.innerText=i()?(0,r.__)("ElasticProbe.com Host URL","elasticprobe"):(0,r.__)("Elasticsearch Host URL","elasticprobe"),t.disabled||(t.value=i()?l:s,o.innerText=i()?(0,r.__)("Plug in your ElasticProbe.com server here!","elasticprobe"):(0,r.__)("Plug in your Elasticsearch server here!","elasticprobe"))};t&&t.addEventListener("input",u);for(const t of e)t.addEventListener("click",d)}))}();