You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
197 KiB

10 years ago
9 years ago
10 years ago
9 years ago
  1. /*
  2. * # Semantic UI
  3. * https://github.com/Semantic-Org/Semantic-UI
  4. * http://www.semantic-ui.com/
  5. *
  6. * Copyright 2014 Contributors
  7. * Released under the MIT license
  8. * http://opensource.org/licenses/MIT
  9. *
  10. */
  11. !function(e,t,n,i){"use strict";e.fn.accordion=function(n){{var o,a=e(this),r=(new Date).getTime(),s=[],c=arguments[0],l="string"==typeof c,u=[].slice.call(arguments,1);t.requestAnimationFrame||t.mozRequestAnimationFrame||t.webkitRequestAnimationFrame||t.msRequestAnimationFrame||function(e){setTimeout(e,0)}}return a.each(function(){var d,m,f=e.isPlainObject(n)?e.extend(!0,{},e.fn.accordion.settings,n):e.extend({},e.fn.accordion.settings),g=f.className,p=f.namespace,b=f.selector,v=(f.error,"."+p),h="module-"+p,y=a.selector||"",x=e(this),w=x.find(b.title),C=x.find(b.content),T=this,k=x.data(h);m={initialize:function(){m.debug("Initializing accordion with bound events",x),x.on("click"+v,b.title,m.event.click),m.observeChanges(),m.instantiate()},instantiate:function(){k=m,x.data(h,m)},destroy:function(){m.debug("Destroying previous accordion for",x),x.removeData(h),w.off(v)},refresh:function(){w=x.find(b.title),C=x.find(b.content)},observeChanges:function(){"MutationObserver"in t&&(d=new MutationObserver(function(){m.debug("DOM tree modified, updating selector cache"),m.refresh()}),d.observe(T,{childList:!0,subtree:!0}),m.debug("Setting up mutation observer",d))},event:{click:function(){e.proxy(m.toggle,this)()}},toggle:function(t){var n=t!==i?"number"==typeof t?w.eq(t):e(t):e(this),o=n.next(C),a=o.is(":visible");m.debug("Toggling visibility of content",n),a?f.collapsible?e.proxy(m.close,n)():m.debug("Cannot close accordion content collapsing is disabled"):e.proxy(m.open,n)()},open:function(t){var n=t!==i?"number"==typeof t?w.eq(t):e(t):e(this),o=n.next(C),a=o.is(":animated"),r=o.hasClass(g.active);a||r||(m.debug("Opening accordion content",n),f.exclusive&&e.proxy(m.closeOthers,n)(),n.addClass(g.active),o.stop().children().stop().animate({opacity:1},f.duration,m.reset.display).end().slideDown(f.duration,f.easing,function(){o.addClass(g.active),e.proxy(m.reset.display,this)(),e.proxy(f.onOpen,this)(),e.proxy(f.onChange,this)()}))},close:function(t){var n=t!==i?"number"==typeof t?w.eq(t):e(t):e(this),o=n.next(C),a=o.hasClass(g.active);a&&(m.debug("Closing accordion content",o),n.removeClass(g.active),o.removeClass(g.active).show().stop().children().stop().animate({opacity:0},f.duration,m.reset.opacity).end().slideUp(f.duration,f.easing,function(){e.proxy(m.reset.display,this)(),e.proxy(f.onClose,this)(),e.proxy(f.onChange,this)()}))},closeOthers:function(t){var n,o,a,r=t!==i?w.eq(t):e(this),s=r.parents(b.content).prev(b.title),c=r.closest(b.accordion),l=b.title+"."+g.active+":visible",u=b.content+"."+g.active+":visible";f.closeNested?(n=c.find(l).not(s),a=n.next(C)):(n=c.find(l).not(s),o=c.find(u).find(l).not(s),n=n.not(o),a=n.next(C)),n.size()>0&&(m.debug("Exclusive enabled, closing other content",n),n.removeClass(g.active),a.stop().children().stop().animate({opacity:0},f.duration,m.resetOpacity).end().slideUp(f.duration,f.easing,function(){e(this).removeClass(g.active),e.proxy(m.reset.display,this)()}))},reset:{display:function(){m.verbose("Removing inline display from element",this),e(this).css("display",""),""===e(this).attr("style")&&e(this).attr("style","").removeAttr("style")},opacity:function(){m.verbose("Removing inline opacity from element",this),e(this).css("opacity",""),""===e(this).attr("style")&&e(this).attr("style","").removeAttr("style")}},setting:function(t,n){if(m.debug("Changing setting",t,n),e.isPlainObject(t))e.extend(!0,f,t);else{if(n===i)return f[t];f[t]=n}},internal:function(t,n){return m.debug("Changing internal",t,n),n===i?m[t]:void(e.isPlainObject(t)?e.extend(!0,m,t):m[t]=n)},debug:function(){f.debug&&(f.performance?m.performance.log(arguments):(m.debug=Function.prototype.bind.call(console.info,console,f.name+":"),m.debug.apply(console,arguments)))},verbose:function(){f.verbose&&f.debug&&(f.performance?m.performance.log(arguments):(m.verbose=Function.prototype.bind.call(console.info,console,f.name+":"),m.verbose.apply(console,arguments)))},error:function(){m.error=Function.prototype.bind.call(console.error,console,f.name+":"),m.error.apply(console,arguments)},performance:{log:function(e){var t,n,i;f
  12. },instantiate:function(){p.verbose("Storing instance of dropdown",p),j=p,k.data(T,p)},destroy:function(){p.verbose("Destroying previous dropdown for",k),p.remove.tabbable(),k.off(C).removeData(T)},observeChanges:function(){"MutationObserver"in t&&(n=new MutationObserver(function(){p.debug("DOM tree modified, updating selector cache"),p.refresh()}),n.observe(R,{childList:!0,subtree:!0}),p.debug("Setting up mutation observer",n))},setup:{layout:function(){k.is("select")&&p.setup.select(),p.is.search()&&!p.is.searchable()&&(z=e("<input />").addClass(v.search).insertBefore(S)),b.allowTab&&p.set.tabbable()},select:function(){var t=p.get.selectValues();p.debug("Dropdown initialized on a select",t),A=k,A.parents(x.dropdown).size()>0?(p.debug("Creating dropdown menu only from template"),k=A.closest(x.dropdown),0===k.find("."+v.dropdown).size()&&e("<div />").addClass(v.menu).html(b.templates.menu(t)).appendTo(k)):(p.debug("Creating entire dropdown from template"),k=e("<div />").attr("class",A.attr("class")).addClass(v.selection).addClass(v.dropdown).html(b.templates.dropdown(t)).insertBefore(A),A.removeAttr("class").prependTo(k)),p.refresh()}},refresh:function(){S=k.find(x.text),z=k.find(x.search),A=k.find(x.input),E=k.children(x.menu),F=E.find(x.item)},toggle:function(){p.verbose("Toggling menu visibility"),p.is.active()?p.hide():p.show()},show:function(){p.debug("Checking if dropdown can show"),p.is.active()||(p.animate.show(function(){p.can.click()&&p.bind.intent(),p.set.visible()}),e.proxy(b.onShow,R)())},hide:function(){p.is.active()&&(p.debug("Hiding dropdown"),p.animate.hide(function(){p.remove.visible()}),e.proxy(b.onHide,R)())},hideOthers:function(){p.verbose("Finding other dropdowns to hide"),r.not(k).has(x.menu+":visible:not(."+v.animating+")").dropdown("hide")},hideSubMenus:function(){var e=E.find(x.menu),t=e.has(x.item+"."+v.active);e.not(t).removeClass(v.visible).removeAttr("style")},bind:{keyboardEvents:function(){p.debug("Binding keyboard events"),k.on("keydown"+C,p.event.keydown),p.is.searchable()&&k.on(p.get.inputEvent(),x.search,p.event.input)},touchEvents:function(){p.debug("Touch device detected binding additional touch events"),p.is.searchSelection()||k.on("touchstart"+C,p.event.test.toggle),E.on("touchstart"+C,x.item,p.event.item.mouseenter)},mouseEvents:function(){p.verbose("Mouse detected binding mouse events"),p.is.searchSelection()?k.on("mousedown"+C,x.menu,p.event.menu.activate).on("mouseup"+C,x.menu,p.event.menu.deactivate).on("focus"+C,x.search,p.event.searchFocus).on("click"+C,x.search,p.show).on("blur"+C,x.search,p.event.searchBlur):("click"==b.on?k.on("click"+C,p.event.test.toggle):"hover"==b.on?k.on("mouseenter"+C,p.delay.show).on("mouseleave"+C,p.delay.hide):k.on(b.on+C,p.toggle),k.on("mousedown"+C,p.event.mousedown).on("mouseup"+C,p.event.mouseup).on("focus"+C,p.event.focus).on("blur"+C,p.event.blur)),E.on("mouseenter"+C,x.item,p.event.item.mouseenter).on("mouseleave"+C,x.item,p.event.item.mouseleave).on("click"+C,x.item,p.event.item.click)},intent:function(){p.verbose("Binding hide intent event to document"),l&&s.on("touchstart"+C,p.event.test.touch).on("touchmove"+C,p.event.test.touch),s.on("click"+C,p.event.test.hide)}},unbind:{intent:function(){p.verbose("Removing hide intent event from document"),l&&s.off("touchstart"+C).off("touchmove"+C),s.off("click"+C)}},filter:function(t){var n,o,a=e(),r=new RegExp("(?:s|^)"+t,"i"),s=new RegExp(t,"i");F.each(function(){var t=e(this),n=t.data(h.text)!==i?t.data(h.text):b.preserveHTML?t.html():t.text(),o=t.data(h.value)!==i?t.data(h.value):"string"==typeof n?n.toLowerCase():n;r.test(n)||r.test(o)?a=a.add(t):b.fullTextSearch&&(s.test(n)||s.test(o))&&(a=a.add(t))}),o=F.not(a),n=o.size()==F.size(),p.remove.filteredItem(),p.remove.selectedItem(),o.addClass(v.filtered),F.not("."+v.filtered).eq(0).addClass(v.selected),n&&p.hide()},focusSearch:function(){p.is.search()&&z.focus()},event:{mousedown:function(){O=!0},mouseup:function(){O=!1},focus:function(){!O&&p.is.hidden()&&p.show()},blur:function(){O||p.hide()},searchFocus:function(){O=!0,p.show()},searchBlur
  13. },can:{fit:function(){return C.cache.height<C.cache.contextHeight}},is:{active:function(){return F.hasClass(S.active)},animating:function(){return F.transition("is supported")?F.transition("is animating"):F.is(":visible")},modernBrowser:function(){return!(t.ActiveXObject||"ActiveXObject"in t)}},set:{autofocus:function(){if(T.autofocus){var e=F.find(":input:visible"),t=e.filter("[autofocus]"),n=t.size()>0?t:e;n.first().focus()}},clickaway:function(){T.closable&&x.off("click"+P).on("click"+P,C.event.click)},screenHeight:function(){C.cache.height>C.cache.pageHeight?(C.debug("Modal is taller than page content, resizing page height"),l.css("height",C.cache.height+T.padding)):l.css("height","")},active:function(){F.addClass(S.active)},scrolling:function(){y.addClass(S.scrolling),F.addClass(S.scrolling)},type:function(){C.can.fit()?(C.verbose("Modal fits on screen"),C.remove.scrolling()):(C.verbose("Modal cannot fit on screen setting to scrolling"),C.set.scrolling())},position:function(){C.verbose("Centering modal on page",C.cache),F.css(C.can.fit()?{top:"",marginTop:-(C.cache.height/2)}:{marginTop:"",top:c.scrollTop()})}},setting:function(t,n){if(C.debug("Changing setting",t,n),e.isPlainObject(t))e.extend(!0,T,t);else{if(n===i)return T[t];T[t]=n}},internal:function(t,n){if(e.isPlainObject(t))e.extend(!0,C,t);else{if(n===i)return C[t];C[t]=n}},debug:function(){T.debug&&(T.performance?C.performance.log(arguments):(C.debug=Function.prototype.bind.call(console.info,console,T.name+":"),C.debug.apply(console,arguments)))},verbose:function(){T.verbose&&T.debug&&(T.performance?C.performance.log(arguments):(C.verbose=Function.prototype.bind.call(console.info,console,T.name+":"),C.verbose.apply(console,arguments)))},error:function(){C.error=Function.prototype.bind.call(console.error,console,T.name+":"),C.error.apply(console,arguments)},performance:{log:function(e){var t,n,i;T.performance&&(t=(new Date).getTime(),i=d||t,n=t-i,d=t,m.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:R,"Execution Time":n})),clearTimeout(C.performance.timer),C.performance.timer=setTimeout(C.performance.display,100)},display:function(){var t=T.name+":",n=0;d=!1,clearTimeout(C.performance.timer),e.each(m,function(e,t){n+=t["Execution Time"]}),t+=" "+n+"ms",u&&(t+=" '"+u+"'"),(console.group!==i||console.table!==i)&&m.length>0&&(console.groupCollapsed(t),console.table?console.table(m):e.each(m,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),m=[]}},invoke:function(t,n,o){var r,s,c,l=j;return n=n||p,o=R||o,"string"==typeof t&&l!==i&&(t=t.split(/[\. ]/),r=t.length-1,e.each(t,function(n,o){var a=n!=r?o+t[n+1].charAt(0).toUpperCase()+t[n+1].slice(1):t;if(e.isPlainObject(l[a])&&n!=r)l=l[a];else{if(l[a]!==i)return s=l[a],!1;if(!e.isPlainObject(l[o])||n==r)return l[o]!==i?(s=l[o],!1):!1;l=l[o]}})),e.isFunction(s)?c=s.apply(o,n):s!==i&&(c=s),e.isArray(a)?a.push(c):a!==i?a=[a,c]:c!==i&&(a=c),s}},g?(j===i&&C.initialize(),C.invoke(f)):(j!==i&&C.destroy(),C.initialize())}),a!==i?a:this},e.fn.modal.settings={name:"Modal",namespace:"modal",debug:!1,verbose:!0,performance:!0,allowMultiple:!1,detachable:!0,closable:!0,autofocus:!0,context:"body",duration:500,easing:"easeOutExpo",offset:0,transition:"scale",padding:30,onShow:function(){},onHide:function(){},onVisible:function(){},onHidden:function(){},onApprove:function(){return!0},onDeny:function(){return!0},selector:{close:".close, .actions .button",approve:".actions .positive, .actions .approve, .actions .ok",deny:".actions .negative, .actions .deny, .actions .cancel",modal:".ui.modal"},error:{dimmer:"UI Dimmer, a required component is not included in this page",method:"The method you called is not defined.",notFound:"The element you specified could not be found"},className:{active:"active",scrolling:"scrolling"}}}(jQuery,window,document),function(e,t,n,i){"use strict";e.fn.nag=function(n){var o,a=e(this),r=a.selector||"",s=(new Date).getTime(),c=[],l=arguments[0],u="string"==typeof l,d=[].slice.call(arguments,1);return a.each(function(){{var a,m=e.isPlainObject(n)?e.extend(!0,{},e
  14. },getRating:function(){var e=C.filter("."+g.active).size();return d.verbose("Current rating retrieved",e),e},enable:function(){d.debug("Setting rating to interactive mode"),C.on("mouseenter"+v,d.event.mouseenter).on("mouseleave"+v,d.event.mouseleave).on("click"+v,d.event.click),w.removeClass(g.disabled)},disable:function(){d.debug("Setting rating to read-only mode"),C.off(v),w.addClass(g.disabled)},setRating:function(t){var n=t-1>=0?t-1:0,i=C.eq(n);w.removeClass(g.selected),C.removeClass(g.selected).removeClass(g.active),t>0&&(d.verbose("Setting current rating to",t),i.prevAll().andSelf().addClass(g.active)),e.proxy(m.onRate,y)(t)},setting:function(t,n){if(d.debug("Changing setting",t,n),e.isPlainObject(t))e.extend(!0,m,t);else{if(n===i)return m[t];m[t]=n}},internal:function(t,n){if(e.isPlainObject(t))e.extend(!0,d,t);else{if(n===i)return d[t];d[t]=n}},debug:function(){m.debug&&(m.performance?d.performance.log(arguments):(d.debug=Function.prototype.bind.call(console.info,console,m.name+":"),d.debug.apply(console,arguments)))},verbose:function(){m.verbose&&m.debug&&(m.performance?d.performance.log(arguments):(d.verbose=Function.prototype.bind.call(console.info,console,m.name+":"),d.verbose.apply(console,arguments)))},error:function(){d.error=Function.prototype.bind.call(console.error,console,m.name+":"),d.error.apply(console,arguments)},performance:{log:function(e){var t,n,i;m.performance&&(t=(new Date).getTime(),i=r||t,n=t-i,r=t,s.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:y,"Execution Time":n})),clearTimeout(d.performance.timer),d.performance.timer=setTimeout(d.performance.display,100)},display:function(){var t=m.name+":",n=0;r=!1,clearTimeout(d.performance.timer),e.each(s,function(e,t){n+=t["Execution Time"]}),t+=" "+n+"ms",a&&(t+=" '"+a+"'"),o.size()>1&&(t+=" ("+o.size()+")"),(console.group!==i||console.table!==i)&&s.length>0&&(console.groupCollapsed(t),console.table?console.table(s):e.each(s,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),s=[]}},invoke:function(t,o,a){var r,s,c,l=x;return o=o||u,a=y||a,"string"==typeof t&&l!==i&&(t=t.split(/[\. ]/),r=t.length-1,e.each(t,function(n,o){var a=n!=r?o+t[n+1].charAt(0).toUpperCase()+t[n+1].slice(1):t;if(e.isPlainObject(l[a])&&n!=r)l=l[a];else{if(l[a]!==i)return s=l[a],!1;if(!e.isPlainObject(l[o])||n==r)return l[o]!==i?(s=l[o],!1):!1;l=l[o]}})),e.isFunction(s)?c=s.apply(a,o):s!==i&&(c=s),e.isArray(n)?n.push(c):n!==i?n=[n,c]:c!==i&&(n=c),s}},l?(x===i&&d.initialize(),d.invoke(c)):(x!==i&&d.destroy(),d.initialize())}),n!==i?n:this},e.fn.rating.settings={name:"Rating",namespace:"rating",debug:!1,verbose:!0,performance:!0,initialRating:0,interactive:!0,maxRating:4,clearable:"auto",onRate:function(){},error:{method:"The method you called is not defined",noMaximum:"No maximum rating specified. Cannot generate HTML automatically"},metadata:{rating:"rating",maxRating:"maxRating"},className:{active:"active",disabled:"disabled",selected:"selected",loading:"loading"},selector:{icon:".icon"},templates:{icon:function(e){for(var t=1,n="";e>=t;)n+='<i class="icon"></i>',t++;return n}}}}(jQuery,window,document),function(e,t,n,i){"use strict";e.fn.search=function(n){var o,a=e(this),r=a.selector||"",s=(new Date).getTime(),c=[],l=arguments[0],u="string"==typeof l,d=[].slice.call(arguments,1);return e(this).each(function(){var m,f=e.extend(!0,{},e.fn.search.settings,n),g=f.className,p=f.selector,b=f.error,v=f.namespace,h="."+v,y=v+"-module",x=e(this),w=x.find(p.prompt),C=x.find(p.searchButton),T=x.find(p.results),k=(x.find(p.result),x.find(p.category),this),S=x.data(y);m={initialize:function(){m.verbose("Initializing module");var e=w[0],t=e!==i&&e.oninput!==i?"input":e!==i&&e.onpropertychange!==i?"propertychange":"keyup";f.automatic&&w.on(t+h,m.search.throttle),w.on("focus"+h,m.event.focus).on("blur"+h,m.event.blur).on("keydown"+h,m.handleKeyboard),C.on("click"+h,m.search.query),T.on("mousedown"+h,m.event.mousedown).on("mouseup"+h,m.event.mouseup).on("click"+h,p.result,m.results.select),m.instantiate()},instantiate:function(){m.verbose("Stori
  15. },visible:function(){S.addClass(x.visible)},overlay:function(){S.addClass(x.overlay)}},remove:{bodyCSS:function(){v.debug("Removing body css styles",r),r.size()>0&&r.remove()},pushed:function(){z.removeClass(x.pushed)},pushable:function(){z.removeClass(x.pushable)},active:function(){S.removeClass(x.active)},animating:function(){S.removeClass(x.animating)},transition:function(e){e=e||v.get.transition(),S.removeClass(e)},direction:function(e){e=e||v.get.direction(),S.removeClass(x[e])},visible:function(){S.removeClass(x.visible)},overlay:function(){S.removeClass(x.overlay)}},get:{direction:function(){return S.hasClass(x.top)?x.top:S.hasClass(x.right)?x.right:S.hasClass(x.bottom)?x.bottom:x.left},transition:function(){var e=v.get.direction();return v.is.mobile()?"auto"==h.mobileTransition?h.defaultTransition.mobile[e]:h.mobileTransition:"auto"==h.transition?h.defaultTransition.computer[e]:h.transition},transitionEvent:function(){var e,t=n.createElement("element"),o={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(e in o)if(t.style[e]!==i)return o[e]}},is:{ie:function(){var e=!t.ActiveXObject&&"ActiveXObject"in t,n="ActiveXObject"in t;return e||n},legacy:function(){var e,o=n.createElement("div"),a={webkitTransform:"-webkit-transform",OTransform:"-o-transform",msTransform:"-ms-transform",MozTransform:"-moz-transform",transform:"transform"};n.body.insertBefore(o,null);for(var r in a)o.style[r]!==i&&(o.style[r]="translate3d(1px,1px,1px)",e=t.getComputedStyle(o).getPropertyValue(a[r]));return n.body.removeChild(o),!(e!==i&&e.length>0&&"none"!==e)},mobile:function(){var e=navigator.userAgent,t=/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Silk-Accelerated|(hpw|web)OS|Fennec|Minimo|Opera M(obi|ini)|Blazer|Dolfin|Dolphin|Skyfire|Zune/,n=t.test(e);return n?(v.verbose("Browser was found to be mobile",e),!0):(v.verbose("Browser is not mobile, using regular transition",e),!1)},closed:function(){return!v.is.visible()},visible:function(){return S.hasClass(x.visible)},vertical:function(){return S.hasClass(x.top)},animating:function(){return z.hasClass(x.animating)}},setting:function(t,n){if(v.debug("Changing setting",t,n),e.isPlainObject(t))e.extend(!0,h,t);else{if(n===i)return h[t];h[t]=n}},internal:function(t,n){if(e.isPlainObject(t))e.extend(!0,v,t);else{if(n===i)return v[t];v[t]=n}},debug:function(){h.debug&&(h.performance?v.performance.log(arguments):(v.debug=Function.prototype.bind.call(console.info,console,h.name+":"),v.debug.apply(console,arguments)))},verbose:function(){h.verbose&&h.debug&&(h.performance?v.performance.log(arguments):(v.verbose=Function.prototype.bind.call(console.info,console,h.name+":"),v.verbose.apply(console,arguments)))},error:function(){v.error=Function.prototype.bind.call(console.error,console,h.name+":"),v.error.apply(console,arguments)},performance:{log:function(e){var t,n,i;h.performance&&(t=(new Date).getTime(),i=l||t,n=t-i,l=t,u.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:E,"Execution Time":n})),clearTimeout(v.performance.timer),v.performance.timer=setTimeout(v.performance.display,100)},display:function(){var t=h.name+":",n=0;l=!1,clearTimeout(v.performance.timer),e.each(u,function(e,t){n+=t["Execution Time"]}),t+=" "+n+"ms",c&&(t+=" '"+c+"'"),(console.group!==i||console.table!==i)&&u.length>0&&(console.groupCollapsed(t),console.table?console.table(u):e.each(u,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),u=[]}},invoke:function(t,n,o){var r,s,c,l=F;return n=n||f,o=E||o,"string"==typeof t&&l!==i&&(t=t.split(/[\. ]/),r=t.length-1,e.each(t,function(n,o){var a=n!=r?o+t[n+1].charAt(0).toUpperCase()+t[n+1].slice(1):t;if(e.isPlainObject(l[a])&&n!=r)l=l[a];else{if(l[a]!==i)return s=l[a],!1;if(!e.isPlainObject(l[o])||n==r)return l[o]!==i?(s=l[o],!1):(v.error(C.method,t),!1);l=l[o]}})),e.isFunction(s)?c=s.apply(o,n):s!==i&&(c=s),e.isArray(a)?a.push(c):a!==i?a=[a,c]:c!==i&&(a=c),s}},m?(F===i&&v.initialize(),v.invoke(d)):(F!==i&&v.invoke("destroy"),v.initializ
  16. }})},content:{fetch:function(t,n){var a,r,c=o.get.tabElement(t),l={dataType:"html",stateContext:c,onSuccess:function(i){o.cache.add(n,i),o.content.update(t,i),t==p?(o.debug("Content loaded",t),o.activate.tab(t)):o.debug("Content loaded in background",t),e.proxy(s.onTabInit,c)(t,b,v),e.proxy(s.onTabLoad,c)(t,b,v)},urlData:{tab:n}},u=c.data(y.promise)||!1,d=u&&"pending"===u.state();n=n||t,r=o.cache.read(n),s.cache&&r?(o.debug("Showing existing content",n),o.content.update(t,r),o.activate.tab(t),e.proxy(s.onTabLoad,c)(t,b,v)):d?(o.debug("Content is already loading",n),c.addClass(h.loading)):e.api!==i?(a=e.extend(!0,{headers:{"X-Remote":!0}},s.apiSettings,l),o.debug("Retrieving remote content",n,a),e.api(a)):o.error(w.api)},update:function(e,t){o.debug("Updating html for",e);var n=o.get.tabElement(e);n.html(t)}},activate:{all:function(e){o.activate.tab(e),o.activate.navigation(e)},tab:function(e){var t=o.get.tabElement(e);o.verbose("Showing tab content for",t),t.addClass(h.active).siblings(g).removeClass(h.active+" "+h.loading)},navigation:function(e){var t=o.get.navElement(e);o.verbose("Activating tab navigation for",t,e),t.addClass(h.active).siblings(r).removeClass(h.active+" "+h.loading)}},deactivate:{all:function(){o.deactivate.navigation(),o.deactivate.tabs()},navigation:function(){r.removeClass(h.active)},tabs:function(){g.removeClass(h.active+" "+h.loading)}},is:{tab:function(e){return e!==i?o.get.tabElement(e).size()>0:!1}},get:{initialPath:function(){return r.eq(0).data(y.tab)||g.eq(0).data(y.tab)},path:function(){return e.address.value()},defaultPathArray:function(e){return o.utilities.pathToArray(o.get.defaultPath(e))},defaultPath:function(e){var t=r.filter("[data-"+y.tab+'^="'+e+'/"]').eq(0),n=t.data(y.tab)||!1;if(n){if(o.debug("Found default tab",n),A<s.maxDepth)return A++,o.get.defaultPath(n);o.error(w.recursion)}else o.debug("No default tabs found for",e,g);return A=0,e},navElement:function(e){return e=e||p,r.filter("[data-"+y.tab+'="'+e+'"]')},tabElement:function(e){var t,n,i,a;return e=e||p,i=o.utilities.pathToArray(e),a=o.utilities.last(i),t=g.filter("[data-"+y.tab+'="'+a+'"]'),n=g.filter("[data-"+y.tab+'="'+e+'"]'),t.size()>0?t:n},tab:function(){return p}},utilities:{filterArray:function(t,n){return e.grep(t,function(t){return-1==e.inArray(t,n)})},last:function(t){return e.isArray(t)?t[t.length-1]:!1},pathToArray:function(e){return e===i&&(e=p),"string"==typeof e?e.split("/"):[e]},arrayToPath:function(t){return e.isArray(t)?t.join("/"):!1}},setting:function(t,n){if(o.debug("Changing setting",t,n),e.isPlainObject(t))e.extend(!0,s,t);else{if(n===i)return s[t];s[t]=n}},internal:function(t,n){if(e.isPlainObject(t))e.extend(!0,o,t);else{if(n===i)return o[t];o[t]=n}},debug:function(){s.debug&&(s.performance?o.performance.log(arguments):(o.debug=Function.prototype.bind.call(console.info,console,s.name+":"),o.debug.apply(console,arguments)))},verbose:function(){s.verbose&&s.debug&&(s.performance?o.performance.log(arguments):(o.verbose=Function.prototype.bind.call(console.info,console,s.name+":"),o.verbose.apply(console,arguments)))},error:function(){o.error=Function.prototype.bind.call(console.error,console,s.name+":"),o.error.apply(console,arguments)},performance:{log:function(e){var t,n,i;s.performance&&(t=(new Date).getTime(),i=l||t,n=t-i,l=t,u.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:P,"Execution Time":n})),clearTimeout(o.performance.timer),o.performance.timer=setTimeout(o.performance.display,100)},display:function(){var t=s.name+":",n=0;l=!1,clearTimeout(o.performance.timer),e.each(u,function(e,t){n+=t["Execution Time"]}),t+=" "+n+"ms",c&&(t+=" '"+c+"'"),(console.group!==i||console.table!==i)&&u.length>0&&(console.groupCollapsed(t),console.table?console.table(u):e.each(u,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),u=[]}},invoke:function(t,n,r){var s,c,l,u=E;return n=n||f,r=P||r,"string"==typeof t&&u!==i&&(t=t.split(/[\. ]/),s=t.length-1,e.each(t,function(n,a){var r=n!=s?a+t[n+1].charAt(0).toUpperCase()+t[n+1].slice(1):t;if(e.isPlainObject(u[r])&&n!=s)
  17. },error:function(){r.error=Function.prototype.bind.call(console.error,console,f.name+":"),r.error.apply(console,arguments)},performance:{log:function(e){var t,n,i;f.performance&&(t=(new Date).getTime(),i=c||t,n=t-i,c=t,l.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:T,"Execution Time":n})),clearTimeout(r.performance.timer),r.performance.timer=setTimeout(r.performance.display,100)},display:function(){var t=f.name+":",n=0;c=!1,clearTimeout(r.performance.timer),e.each(l,function(e,t){n+=t["Execution Time"]}),t+=" "+n+"ms",s&&(t+=" '"+s+"'"),(console.group!==i||console.table!==i)&&l.length>0&&(console.groupCollapsed(t),console.table?console.table(l):e.each(l,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),l=[]}},invoke:function(t,n,o){var r,s,c,l=w;return n=n||m,o=T||o,"string"==typeof t&&l!==i&&(t=t.split(/[\. ]/),r=t.length-1,e.each(t,function(n,o){var a=n!=r?o+t[n+1].charAt(0).toUpperCase()+t[n+1].slice(1):t;if(e.isPlainObject(l[a])&&n!=r)l=l[a];else{if(l[a]!==i)return s=l[a],!1;if(!e.isPlainObject(l[o])||n==r)return l[o]!==i?(s=l[o],!1):!1;l=l[o]}})),e.isFunction(s)?c=s.apply(o,n):s!==i&&(c=s),e.isArray(a)?a.push(c):a!==i?a=[a,c]:c!==i&&(a=c),s}},d?(w===i&&r.initialize(),r.invoke(u)):(w!==i&&r.destroy(),r.initialize())}),a!==i?a:this},e.fn.visibility.settings={name:"Visibility",namespace:"visibility",className:{fixed:"fixed"},debug:!1,verbose:!1,performance:!0,offset:0,includeMargin:!1,context:t,throttle:!1,type:!1,transition:!1,duration:500,onPassed:{},onPassing:!1,onTopVisible:!1,onBottomVisible:!1,onTopPassed:!1,onBottomPassed:!1,onPassingReverse:!1,onTopVisibleReverse:!1,onBottomVisibleReverse:!1,onTopPassedReverse:!1,onBottomPassedReverse:!1,once:!0,continuous:!1,onRefresh:function(){},onScroll:function(){},error:{method:"The method you called is not defined."}}}(jQuery,window,document),function(e,t,n,i){e.visit=e.fn.visit=function(n){var o,a=e(e.isFunction(this)?t:this),r=a.selector||"",s=(new Date).getTime(),c=[],l=arguments[0],u="string"==typeof l,d=[].slice.call(arguments,1);return a.each(function(){var m,f=e.extend(!0,{},e.fn.visit.settings,n),g=f.error,p=f.namespace,b=p+"-module",v=e(this),h=e(),y=this,x=v.data(b);m={initialize:function(){f.count?m.store(f.key.count,f.count):f.id?m.add.id(f.id):f.increment&&"increment"!==u&&m.increment(),m.add.display(v),m.instantiate()},instantiate:function(){m.verbose("Storing instance of visit module",m),x=m,v.data(b,m)},destroy:function(){m.verbose("Destroying instance"),v.removeData(b)},increment:function(e){var t=m.get.count(),n=+t+1;e?m.add.id(e):(n>f.limit&&!f.surpass&&(n=f.limit),m.debug("Incrementing visits",n),m.store(f.key.count,n))},decrement:function(e){var t=m.get.count(),n=+t-1;e?m.remove.id(e):(m.debug("Removing visit"),m.store(f.key.count,n))},get:{count:function(){return+m.retrieve(f.key.count)||0},idCount:function(e){return e=e||m.get.ids(),e.length},ids:function(e){var t=[];return e=e||m.retrieve(f.key.ids),"string"==typeof e&&(t=e.split(f.delimiter)),m.verbose("Found visited ID list",t),t},storageOptions:function(){var e={};return f.expires&&(e.expires=f.expires),f.domain&&(e.domain=f.domain),f.path&&(e.path=f.path),e}},has:{visited:function(t,n){var o=!1;return n=n||m.get.ids(),t!==i&&n&&e.each(n,function(e,n){n==t&&(o=!0)}),o}},set:{count:function(e){m.store(f.key.count,e)},ids:function(e){m.store(f.key.ids,e)}},reset:function(){m.store(f.key.count,0),m.store(f.key.ids,null)},add:{id:function(e){var t=m.retrieve(f.key.ids),n=t===i||""===t?e:t+f.delimiter+e;m.has.visited(e)?m.debug("Unique content already visited, not adding visit",e,t):e===i?m.debug("ID is not defined"):(m.debug("Adding visit to unique content",e),m.store(f.key.ids,n)),m.set.count(m.get.idCount())},display:function(t){var n=e(t);n.size()>0&&!e.isWindow(n[0])&&(m.debug("Updating visit count for element",n),h=h.size()>0?h.add(n):n)}},remove:{id:function(t){var n=m.get.ids(),o=[];t!==i&&n!==i&&(m.debug("Removing visit to unique content",t,n),e.each(n,function(e,n){n!==t&&o.push(n)}),o=o.join(f.delimiter),m.store(f.key.ids,o)),m.set.count(m.