!function(){"use strict";(0,window.ctFrontend.registerDynamicChunk)("blocksy_ext_woo_extra_filters_lookup_progress",{mount:function(t,{event:e}){const n=new URL(ct_localizations.ajax_url);let o;n.searchParams.append("action","blc_get_lookup_progress");const r=function(){try{fetch(n).then(function(t){return t.json()}).then(function({success:t,data:e}){if(!t)return;const n=document.querySelectorAll(".ct-filter-widget-wrapper .ct-notice-progress-bar-heading span"),r=document.querySelectorAll(".ct-filter-widget-wrapper .ct-notice-progress-bar span");if("progress"===e.state){const t=e.total_count>0?Math.round(e.processed_count/e.total_count*100):0;n.forEach(function(e){e.innerText=`${t}%`}),r.forEach(function(e){e.style.width=`${t}%`})}"idle"===e.state&&!0===e.enabled&&(clearInterval(o),n.forEach(function(t){t.innerText="100%"}),r.forEach(function(t){t.style.width="100%"}),setTimeout(function(){window.location.reload()},1e3))})}catch(t){console.error("Error fetching lookup progress:",t)}};return r(),o=setInterval(r,5e3),function(){return clearInterval(o)}}})}();