!function(j,U,k){"use strict";functionD(e){return"function"==typeofe&&"number"!=typeofe.nodeType}U=void0!==U&&U.Math===Math?U:globalThis,j.fn.tab=function(c){varl,d=D(this)?j(U):j(this),u=j(k),g=d.selector||"",L=Date.now(),S=[],E=c,w="string"==typeofE,O=[].slice.call(arguments,1),F=!1;returnd.each(function(){varb,i,f,h,p,v=j.isPlainObject(c)?j.extend(!0,{},j.fn.tab.settings,c):j.extend({},j.fn.tab.settings),m=v.className,y=v.metadata,t=v.selector,T=v.error,a=v.regExp,n="."+v.namespace,e="module-"+v.namespace,A=j(this),o={},C=!0,r=0,x=this,s=A.data(e),P={initialize:function(){P.debug("Initializing tab menu item",A),P.determineTabs(),P.debug("Determining tabs",v.context,i),v.auto&&P.set.auto(),P.bind.events(),v.history&&!F&&(P.initializeHistory(),F=!0);vare,t=P.determine.activeTab();v.autoTabActivation&&void0===s&&null===t&&(t=!0===v.autoTabActivation?P.get.initialPath():v.autoTabActivation,P.debug("No active tab detected, setting tab active",t),P.changeTab(t)),null!==t&&v.history&&(e=j.address.autoUpdate(),j.address.autoUpdate(!1),j.address.value(t),j.address.autoUpdate(e)),P.instantiate()},instantiate:function(){P.verbose("Storing instance of module",P),s=P,A.data(e,P)},destroy:function(){P.debug("Destroying tabs",A),A.removeData(e).off(n)},bind:{events:function(){vare;null!==(e=x)&&e===e.window||(P.debug("Attaching tab activation events to element",A),A.on("click"+n,P.event.click))}},determineTabs:function(){vare;"parent"===v.context?(0<A.closest(t.ui).length?(e=A.closest(t.ui),P.verbose("Using closest UI element as parent",e)):e=A,b=e.parent(),P.verbose("Determined parent element for creating context",b)):v.context?(b=[U,k].indexOf(v.context)<0?u.find(v.context):j(v.context),P.verbose("Using selector for tab context",v.context,b)):b=j("body"),v.childrenOnly?(i=b.children(t.tabs),P.debug("Searching tab context children for tabs",b,i)):(i=b.find(t.tabs),P.debug("Searching tab context for tabs",b,i))},initializeHistory:function(){if(P.debug("Initializing page state"),void0===j.address)returnP.error(T.state),!1;if("state"===v.historyType){if(P.debug("Using HTML5 to manage state"),!1===v.path)returnP.error(T.path),!1;j.address.history(!0).state(v.path),j(U).trigger("popstate")}j.address.bind("change",P.event.history.change)},event:{click:function(e){vart=j(this).data(y.tab);void0!==t?(v.history?(P.verbose("Updating page state",e),j.address.value(t)):(P.verbose("Changing tab",e),P.changeTab(t)),e.preventDefault()):P.debug("No tab specified")},history:{change:function(e){vart=e.pathNames.join("/")||P.get.initialPath(),a=v.templates.determineTitle(t)||!1;P.performance.display(),P.debug("History change event",t,e),p=e,void0!==t&&P.changeTab(t),a&&j.address.title(a)}}},refresh:function(){f&&(P.debug("Refreshing tab",f),P.changeTab(f))},cache:{read:function(e){returnvoid0!==e&&o[e]},add:function(e,t){e=e||f,P.debug("Adding cached content for",e),o[e]=t},remove:function(e){e=e||f,P.debug("Removing cached content for",e),deleteo[e]}},escape:{string:function(e){return(e=String(e)).replace(a.escape,"\\$&")}},set:{auto:function(){vare="string"==typeofv.path?v.path.replace(/\/$/,"")+"/{$tab}":"/{$tab}";P.verbose("Setting up automatic tab retrieval from server",e),j.isPlainObject(v.apiSettings)?v.apiSettings.url=e:v.apiSettings={url:e}},loading:function(e){vart=P.get.tabElement(e);t.hasClass(m.loading)||(P.verbose("Setting loading state for",t),t.addClass(m.loading).siblings(i).removeClass(m.active+" "+m.loading),0<t.length&&v.onRequest.call(t[0],e))},state:function(e){j.address.value(e)}},changeTab:function(l){vard=U.history&&U.history.pushState&&v.ignoreFirstLoad&&C,u=v.auto||j.isPlainObject(v.apiSettings),g=u&&!d?P.utilities.pathToArray(l):P.get.defaultPathArray(l);l=P.utilities.arrayToPath(g),j.each(g,function(e,t){vara,n,i=g.slice(0,e+1),o=P.utilities.arrayToPath(i),r=P.is.tab(o),s=e+1===g.length,c=P.get.tabElement(o);returnP.verbose("Looking for tab",t),r?(P.verbose("Tab was found",t),f=o,h=P.utilities.filterArray(g,i),s?n=!0:(r=g.slice(0,e+2),t=P.utilities.arrayToPath(r),(n=!P.is.tab(t))&&P.verbose("T