!function(e,t){"use strict";ElementsKit_Helper.registerWidget("elementskit-unfold.default",(function(e){var t=e.find(".ekit-unfold-btn"),i=e.find(".ekit-unfold-wrapper"),n=e.find(".ekit-unfold-data"),o=e.find(".ekit-unfold-data-inner"),a=t.find(".collapse-btn"),l=t.find(".expand-btn"),s=i.data("config"),r=parseInt(s.transition_duration,10)||300,c=a.length>0||l.length>0;function h(e){if(c){var i=t.contents().filter((function(){return 3===this.nodeType}))[0];i&&(i.nodeValue=ElementsKit_Helper.removeSpecificCharacters(e))}else t.html(ElementsKit_Helper.removeSpecificCharacters(e))}function d(e){c&&("collapse"===e?(a.show(),l.hide()):(l.show(),a.hide()))}s.collapse_height>=o.outerHeight()?(t.hide(),n.addClass("active").height("auto")):(t.show(),n.removeClass("active").height(s.collapse_height)),t.off("click").on("click",(function(){var e=n.hasClass("active");e?(n.stop().animate({height:s.collapse_height},r),h(s.expand_text),d("expand")):(n.stop().animate({height:o.outerHeight()},r,(function(){n.height("auto")})),h(s.collapse_text),d("collapse")),n.toggleClass("active"),e&&requestAnimationFrame((()=>{n[0].scrollIntoView({block:"center",behavior:"smooth"})}))}))}))}(jQuery,window.elementorFrontend);