/* * # Fomantic UI - 2.9.0-beta.293+2a71b5e * https://github.com/fomantic/Fomantic-UI * http://fomantic-ui.com/ * * Copyright 2022 Contributors * Released under the MIT license * http://opensource.org/licenses/MIT * */ !function(O,j,k,I){"use strict";O.isWindow=O.isWindow||function(e){return null!=e&&e===e.window},O.isFunction=O.isFunction||function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},j=void 0!==j&&j.Math==Math?j:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),O.fn.tab=function(c){var l,d=O.isFunction(this)?O(j):O(this),u=d.selector||"",g=(new Date).getTime(),P=[],F=c,w="string"==typeof F,S=[].slice.call(arguments,1),E=!1;return d.each(function(){var b,i,f,h,p,v=O.isPlainObject(c)?O.extend(!0,{},O.fn.tab.settings,c):O.extend({},O.fn.tab.settings),m=v.className,y=v.metadata,t=v.selector,T=v.error,a=v.regExp,e="."+v.namespace,n="module-"+v.namespace,L=O(this),o={},x=!0,r=0,A=this,s=L.data(n),C={initialize:function(){C.debug("Initializing tab menu item",L),C.fix.callbacks(),C.determineTabs(),C.debug("Determining tabs",v.context,i),v.auto&&C.set.auto(),C.bind.events(),v.history&&!E&&(C.initializeHistory(),E=!0);var e,t=C.determine.activeTab();v.autoTabActivation&&s===I&&null==t&&(t=!0===v.autoTabActivation?C.get.initialPath():v.autoTabActivation,C.debug("No active tab detected, setting tab active",t),C.changeTab(t)),null!=t&&v.history&&(e=O.address.autoUpdate(),O.address.autoUpdate(!1),O.address.value(t),O.address.autoUpdate(e)),C.instantiate()},instantiate:function(){C.verbose("Storing instance of module",C),s=C,L.data(n,C)},destroy:function(){C.debug("Destroying tabs",L),L.removeData(n).off(e)},bind:{events:function(){O.isWindow(A)||(C.debug("Attaching tab activation events to element",L),L.on("click"+e,C.event.click))}},determineTabs:function(){var e;"parent"===v.context?(0