(()=>{(function(){"use strict";$("[role='tablist']").each(function(){$(this).find("[role='tab'].active").length===0&&($(this).find("[role='tab']").first().addClass("active").attr("aria-selected",!0),$(this).closest(".tabs").find(".tab-content").first().find(".tab-pane").first().addClass("active"))}),$("body").on("click","[role='tab']",function(){i(this)});function i(t){$(t).closest("[role='tablist']").find("[role='tab']").each(function(){if($(this).hasClass("active")&&this!==t){let e=new Event("hide.tw.tab");$(this)[0].dispatchEvent(e)}if(!$(this).hasClass("active")&&this===t){let e=new Event("show.tw.tab");$(this)[0].dispatchEvent(e)}}),$(t).closest("[role='tablist']").find("[role='tab']").removeClass("active").attr("aria-selected",!1),$(t).addClass("active").attr("aria-selected",!0);let a=$(t).attr("data-tw-target");$(t).parent().parent().find("[role='tab']").each(function(e,o){if(o==t&&a===void 0){a="#tab-id-"+e+"-"+Math.floor(Math.random()*1e4);let c=$(t).closest(".tabs").find(".tab-pane")[e];$(t).attr("data-tw-target",a),c&&(c.id=a.slice(1))}});let s=$(a).closest(".tab-content").width();$(a).closest(".tab-content").children(".tab-pane").removeAttr("style").removeClass("active"),$(a).css("width",s+"px").addClass("active")}(function(a){addEventListener("resize",s=>{$("[role='tabpanel']").each(function(){if($(this).hasClass("active")){let e=$(this).closest(".tab-content").width();$(this).css("width",e+"px")}})})})();function n(t){return{show(){i(t)}}}(function(){$("[role='tab']").each(function(){this.__tab=n(this)}),window.tailwind===void 0&&(window.tailwind={}),window.tailwind.Tab={getInstance(a){return a.__tab},getOrCreateInstance(a){return a.__tab===void 0?n(a):a.__tab}}})()})();})();
