!function(){"use strict";var e={n:function(n){var t=n&&n.__esModule?function(){return n.default}:function(){return n};return e.d(t,{a:t}),t},d:function(n,t){for(var o in t)e.o(t,o)&&!e.o(n,o)&&Object.defineProperty(n,o,{enumerable:!0,get:t[o]})},o:function(e,n){return Object.prototype.hasOwnProperty.call(e,n)}},n=window.wp.apiFetch,t=e.n(n),o=window.wp.components,a=window.wp.domReady,c=e.n(a),d=window.wp.element,r=window.wp.i18n;const{ajaxurl:i,epsa:l}=window,s=({blogId:e,isDefaultChecked:n})=>{const[a,c]=(0,d.useState)(n),[s,p]=(0,d.useState)(!1);return React.createElement(o.ToggleControl,{checked:a,className:"index-toggle",disabled:s,label:a?(0,r.__)("On","elasticprobe"):(0,r.__)("Off","elasticprobe"),onChange:async n=>{c(n),p(!0);const o=new FormData;o.append("action","ep_site_admin"),o.append("blog_id",e),o.append("checked",n?"yes":"no"),o.append("nonce",l.nonce),await t()({method:"POST",url:i,body:o}),p(!1)},__nextHasNoMarginBottom:!0})};c()((()=>{const e=document.getElementsByClassName("index-toggle");for(const n of e)(0,d.render)(React.createElement(s,{blogId:n.dataset.blogId,isDefaultChecked:n.checked}),n.parentElement)}))}();