!function(a){"use strict";function s(s,t){this.$el=s,this.$contentWrapper=s.find(".minimog-tabs__content"),this.ACTIVE_CLASS="active",this.SWITCHING_CLASS="switching",this.defaults={navType:"list",contentHeight:0},this.settings=a.extend({},this.defaults,t),this.triggerMethod=(t,i)=>{"function"==typeof this[t]&&this[t](i)},this.setOptions=function(t){this.settings=a.extend({},this.settings,t=t||{})},this.getOptions=function(){return this.settings},this.update=function(t){this.setOptions(t),this.updateContentHeight()},this.init=function(){var t,e=this,i=this.$contentWrapper.children(".tab-content");"dropdown"===e.settings.navType?(s.on("change",".tab-select",function(t){var i=a(this).val();e.switchTab(i)}),a.fn.MinimogNiceSelect()&&s.find(".tab-select").MinimogNiceSelect()):(s.on("click",".tab-title",function(t){t.preventDefault();var t=a(this),i=t.data("tab");t.hasClass(e.ACTIVE_CLASS)||(t.siblings().removeClass(e.ACTIVE_CLASS).attr("aria-selected","false").attr("tabindex","-1"),t.addClass(e.ACTIVE_CLASS).attr("aria-selected","true").attr("tabindex","0"),e.switchTab(i))}),a.fn.perfectScrollbar&&!window.minimog.Helpers.isHandheld()&&s.find(".minimog-tabs__header-inner").perfectScrollbar({suppressScrollY:!0,useBothWheelAxes:!0})),this.$activeTab=s.find(".tab-content.active"),this.updateLayout(),a.fn.MinimogAccordion&&0<(t=e.$el.find(".minimog-accordion")).length&&(t.on("MinimogAccordionBeforeChange",function(){e.$el.addClass(e.SWITCHING_CLASS)}),t.on("MinimogAccordionChange",function(){e.updateLayout(),setTimeout(function(){e.$el.removeClass(e.SWITCHING_CLASS)},400)}));const n=new ResizeObserver(t=>{this.updateLayout()});i.each(function(){n.observe(a(this).get(0))}),s.addClass("initialized")},this.switchTab=function(t){var i=this,e=(s.addClass(i.SWITCHING_CLASS),s.find(".tab-content"));e.removeClass(i.ACTIVE_CLASS).attr("aria-expanded",!1).prop("hidden",!0),this.$activeTab=e.filter('[data-tab="'+t+'"]').addClass(i.ACTIVE_CLASS).attr("aria-expanded",!0).prop("hidden",!1),i.updateLayout(),setTimeout(function(){s.removeClass(i.SWITCHING_CLASS)},400),a(document.body).trigger("MinimogTabChange",[s,this.$activeTab])},this.updateLayout=function(){this.settings.contentHeight=this.$activeTab.outerHeight(),this.updateContentHeight()},this.updateContentHeight=function(){this.$contentWrapper.css("height",this.settings.contentHeight+"px")},this.init()}a(window);const o="minimogTabPanel";a.fn.extend({MinimogTabPanel:function(e,n){return this.length?"options"===e?a.data(this.get(0),o).getOptions():this.each(function(){var t=a(this);let i=a.data(this,o);i?i.triggerMethod(e,n):(i=new s(t,e),a.data(this,o,i))}):this}})}(jQuery);