import{b as a}from"./state.B1AUjM8Q.js";function r(){import.meta.url,import("_").catch(()=>1),async function*(){}().next()}function d(){a.loading&&a.loading.show(),a.generateButton&&a.generateButton.prop("disabled",!0)}function u(){a.loading&&a.loading.hide(),a.generateButton&&a.generateButton.prop("disabled",!1)}function p(e){!a.modal||a.modal.length===0||a.modal.find(".saai-error").text(e).show()}function h(e){const t=jQuery,i=t('<div class="notice notice-success is-dismissible"><p>'+e+"</p></div>");t(".wrap > h1").length>0?t(".wrap > h1").after(i):t(".wp-header-end").length>0?t(".wp-header-end").after(i):t("body").prepend(i),setTimeout(()=>{i.fadeOut(300,function(){t(this).remove()})},3e3)}function f(){const e=jQuery,t=e("#saai-check-all"),i=e(".saai-generate-field"),s=i.length,n=i.filter(":checked").length;n===0?(t.prop("checked",!1),t.prop("indeterminate",!1)):n===s?(t.prop("checked",!0),t.prop("indeterminate",!1)):(t.prop("checked",!1),t.prop("indeterminate",!0))}function g(){const e=jQuery,t=e(".saai-current-values"),i=e('input[name="generate_alt"]').is(":checked"),s=e('input[name="generate_caption"]').is(":checked"),n=e('input[name="generate_title"]').is(":checked"),o=e('input[name="generate_description"]').is(":checked");e('.saai-current-field[data-field="alt"]').toggleClass("show",i),e('.saai-current-field[data-field="caption"]').toggleClass("show",s),e('.saai-current-field[data-field="title"]').toggleClass("show",n),e('.saai-current-field[data-field="description"]').toggleClass("show",o);const c=i||s||n||o;t.toggleClass("empty",!c)}export{r as __vite_legacy_guard,f as a,p as b,h as c,u as h,d as s,g as u};
