!function(e){function a(s,i=0,n=1e3,t=!1){if(i>=s.length)return void(t&&setTimeout((()=>{a(s,0,n,t)}),n));const d=e(s[i]),_=d.find("> .esab__head"),o=d.find("> .esab__body");o.slideDown((()=>{_.attr("aria-expanded","true"),d.addClass("esab__active_accordion"),_.find(".esab__icon").addClass("esab__active_icon"),o.addClass("esab__active"),setTimeout((()=>{o.slideUp((()=>{_.attr("aria-expanded","false"),d.removeClass("esab__active_accordion"),_.find(".esab__icon").removeClass("esab__active_icon"),o.removeClass("esab__active"),a(s,i+1,n,t)}))}),n)}))}e(document).ready((function(){e(".wp-block-nexa-faqs").each((function(){const s=e(this),i="individual"===s.data("mode")?"individual":"accordion",n=!1!==s.data("close"),t=s.data("activator")||"click",d=s.data("speed")||1e3,_=100*parseInt(d),o=s.data("infinite")||!1;s.find(".esab__body.esab__active").slideDown();const c=s.find(".single-faq");c.each((function(d){const r=e(this),l=r.find("> .esab__head").not(".esab__disabled"),b=r.find("> .esab__body").not(".esab__disabled"),v=`esab-body-${s.index()}-${r.index()}`;b.attr({role:"region",id:v}),l.attr({tabindex:"0",role:"button","aria-expanded":b.hasClass("esab__active")?"true":"false","aria-controls":v});const f=function(a){if("click"===a.type||"mouseenter"===a.type||"keydown"===a.type&&("Enter"===a.key||" "===a.key)){"keydown"===a.type&&a.preventDefault(),a.stopPropagation();const t=b.hasClass("esab__active");if("individual"===i){if(t&&!n&&1===s.find(".esab__body.esab__active").length)return;t?b.slideUp((()=>{b.removeClass("esab__active"),r.removeClass("esab__active_accordion"),l.find(".esab__icon").removeClass("esab__active_icon"),l.attr("aria-expanded","false")})):b.slideDown((()=>{b.addClass("esab__active"),r.addClass("esab__active_accordion"),l.find(".esab__icon").addClass("esab__active_icon"),l.attr("aria-expanded","true")}))}else{if(t&&!n&&1===s.find(".esab__body.esab__active").length)return;t||s.find(".single-faq").each((function(){const a=e(this);if(a[0]!==r[0]){const e=a.find("> .esab__body"),s=a.find("> .esab__head");e.hasClass("esab__active")&&e.slideUp((()=>{e.removeClass("esab__active"),a.removeClass("esab__active_accordion"),s.attr("aria-expanded","false"),s.find(".esab__icon").removeClass("esab__active_icon")}))}})),t?b.slideUp((()=>{b.removeClass("esab__active"),r.removeClass("esab__active_accordion"),l.find(".esab__icon").removeClass("esab__active_icon"),l.attr("aria-expanded","false")})):b.slideDown((()=>{b.addClass("esab__active"),r.addClass("esab__active_accordion"),l.find(".esab__icon").addClass("esab__active_icon"),l.attr("aria-expanded","true")}))}}};"click"===t?l.on("click keydown",f):"hover"===t?l.on("mouseenter keydown",f):"autoplay"===t&&setTimeout((function(){a(c,0,_,o)}),500)}))}))}))}(jQuery);