1! function(a, b, c, d) { 2 "use strict"; 3 a.waSlideMenu = function(d, e) { 4 var f = "SlideMenu", 5 g = this; 6 g._addCssNamespace = function(b, c) { 7 var d = {}; 8 return a.each(b, function(a, b) { 9 "string" == typeof b && (d[a] = c + f + b) 10 }), d 11 }, g._setup = function() { 12 g.o = a.extend({}, a.waSlideMenu.defaults, e), g.o.classNames = g._addCssNamespace(g.o.classNames, g.o.namespace), g.$waSlideMenu = a(d), g.$waSlideMenu.data(f, g), g.$backs = [], g.$items = g.$waSlideMenu.find(g.o.itemSelector), g.$waSlideMenu.addClass(g.o.classNames.navigationClass), g.$movable = a("<div/>", { 13 class: g.o.classNames.wrapperClass 14 }), g.$inheritedMenus = g.$waSlideMenu.find(g.o.menuSelector), g.$rootMenu = a(g.$inheritedMenus.splice(0, 1)), g.$rootMenu.addClass(g.o.classNames.allMenusClass).appendTo(g.$movable.prependTo(g.$waSlideMenu)), g.$inheritedMenus.addClass(g.o.classNames.allMenusClass + " " + g.o.classNames.inheritedMenuClass); 15 var b = g.$items.prop("tagName"); 16 g.$inheritedMenus.each(function(c, d) { 17 var e = a(d).closest(g.o.itemSelector).children("a").attr("href"), 18 f = a("<" + b + "/>", { 19 class: g.o.classNames.menuItemBackClass 20 }); 21 g.o.backOnTop ? f.prependTo(a(d)) : f.appendTo(a(d)), g.$backs.push(f.append(a("<a>", { 22 href: e 23 }).html(g.o.backLinkContent))) 24 }), g.o.minHeightMenu > 0 && (g.o.minHeightMenu = g.o.minHeightMenu > g.$waSlideMenu.height() ? g.o.minHeightMenu : g.$waSlideMenu.height(), g.$waSlideMenu.css("min-height", g.o.minHeightMenu)), g.o.previousHeight = 0, g.o.nowSliding = !1 25 }, g.gotoSelected = function(a, b) { 26 g._hideOtherMenus(a, g._scrollToTop), g._heightFix(a), g._animateSlide(a, b) 27 }, g._animateSlide = function(a, d) { 28 function l(a) { 29 var c = b.getComputedStyle(a, null).getPropertyValue(m("transform")), 30 d = c.match(/matrix(?:(3d)\(-{0,1}\d+(?:, -{0,1}\d+)*(?:, (-{0,1}\d+))(?:, (-{0,1}\d+))(?:, (-{0,1}\d+)), -{0,1}\d+\)|\(-{0,1}\d+(?:, -{0,1}\d+)*(?:, (-{0,1}\d+))(?:, (-{0,1}\d+))\))/); 31 return d ? "3d" == d[1] ? d.slice(2, 5) : (d.push(0), d.slice(5, 8)) : [0, 0, 0] 32 } 33 34 function m(a) { 35 var b = c.createElement("div"); 36 if (a in b.style) return a; 37 for (var d = ["-moz-", "-webkit-", "-o-", "-ms-"], e = 0; e < d.length; ++e) { 38 var f = d[e] + a; 39 if (f in b.style) return f 40 } 41 } 42 var e = Math.abs(a * g.$movable.outerWidth()), 43 f = a > 0 ? g.o.onSlideForward : g.o.onSlideBack, 44 h = l(g.$movable[0]), 45 i = h[0] ? h[0] : 0, 46 j = Math.abs(i), 47 k = { 48 transform: "translate3d(" + (-1) * (a > 0 ? j + e : j - e) + "px, 0, 0)" 49 }; 50 f && "function" == typeof f && f(g), d ? (g.o.nowSliding = !0, animit(g.$movable[0]).queue(k, { 51 duration: .3, 52 timing: "ease-in-out" 53 }).play(), g.$movable.one("transitionend", function() { 54 g.o.nowSliding = !1, g._scrollToTop(a), g.o.afterSlide && "function" == typeof g.o.afterSlide && g.o.afterSlide(g) 55 })) : g.$movable.css("right", "-" + e + "%") 56 }, g._scrollToTop = function(c) { 57 var d = g.$currentMenuElement.children(g.o.menuSelector), 58 e = !!g.$currentMenuElement.hasClass(g.o.classNames.menuItemBackClass); 59 if (g.o.scrollToTopSpeed && (e || d.length > 0)) { 60 var f = c > 0 ? d.children(g.o.itemSelector).last() : g.$currentMenuElement, 61 h = c > 0 ? f.closest(g.o.menuSelector) : g.$currentMenuElement, 62 i = f.offset().top, 63 j = a(b).scrollTop(); 64 i - j < 0 && a("html, body").animate({ 65 scrollTop: h.offset().top 66 }, g.o.scrollToTopSpeed) 67 } 68 }, g._heightFix = function(b) { 69 if (g.o.autoHeightMenu) { 70 var c = 0, 71 d = 0; 72 b > 0 ? (d = g.$currentMenuElement.offset().top - g.$waSlideMenu.offset().top + g.$currentMenuElement.outerHeight(), c = g.$currentMenuElement.children(g.o.menuSelector).height()) : c = g.$currentMenuElement.closest(g.o.menuSelector).height(); 73 var e = g.$currentMenuElement.parents("ul").length - b * -1; 74 c = e ? c - 0 : c, g.o.previousHeight = c, g.$waSlideMenu.css("height", c) 75 } 76 }, g._hideOtherMenus = function(a) { 77 var b = g.$currentMenuElement.parentsUntil("." + g.o.classNames.navigationClass).filter(g.o.itemSelector); 78 b.push(g.$currentMenuElement[0]), a > 0 && (g.$inheritedMenus.css("visibility", "hidden"), b.children(g.o.menuSelector).css("visibility", "visible")) 79 }, g.loadContent = function(c, d) { 80 var e = a("<span/>", { 81 class: g.o.classNames.loadingClass 82 }).html(" "), 83 h = '<div style="clear:both"></div>'; 84 g.o.loadContainer.length > 0 && c.length > 0 && a.inArray(d, g.o.excludeUri) < 0 && location.origin + d !== b.location.href && (g.o.beforeLoad && "function" == typeof g.o.beforeLoad ? g.o.beforeLoad.apply(c) : c.html(e).append(h), a.aja
84x({ 85 url: d, 86 type: "get" 87 }).done(function(a) { 88 c.html(a + h), g.changeTitle(), g.changeUri(d), g.o.afterLoadDone && "function" == typeof g.o.afterLoadDone && g.o.afterLoadDone.apply(c), g.$waSlideMenu.trigger("afterLoadDone." + g.o.namespace + f) 89 }).fail(function() { 90 g.$currentMenuElement.siblings().children("." + g.o.classNames.menuItemBackClass).trigger("click"), g.o.afterLoadFail && "function" == typeof g.o.afterLoadFail && g.o.afterLoadFail.apply(c), g.$waSlideMenu.trigger("afterLoadFail." + g.o.namespace + f) 91 }).always(function() { 92 g.o.afterLoadAlways && "function" == typeof g.o.afterLoadAlways && g.o.afterLoadAlways.apply(c), g.$waSlideMenu.trigger("afterLoadAlways." + g.o.namespace + f) 93 })) 94 }, g.changeTitle = function() { 95 g.o.setTitle && a("title").text(g.$currentMenuElement.children("a").text()) 96 }, g.changeUri = function(a) { 97 b.history && history.pushState && b.history.pushState({}, "", a) 98 }, g._menuItemClicked = function(b, c, d) { 99 if ((a(b).parent().hasClass("sublevel") || a(b).parent().hasClass("waSlideMenu-back")) && (c.preventDefault(), c.stopPropagation()), g.o.nowSliding) return !1; 100 g.$currentMenuElement = a(b).parent(g.o.itemSelector); 101 var e = a(b).attr("href"), 102 h = g.$currentMenuElement.children(g.o.menuSelector), 103 i = !!g.$currentMenuElement.hasClass(g.o.classNames.menuItemBackClass), 104 j = a(g.o.loadContainer); 105 g.$waSlideMenu.find(g.o.itemSelector).filter("." + g.o.selectedClass).removeClass(g.o.selectedClass), i && (g.$currentMenuElement = g.$currentMenuElement.closest(g.o.menuSelector).closest(g.o.itemSelector)), g.$currentMenuElement.addClass(g.o.selectedClass), g.o.loadOnlyLatest === !1 ? g.loadContent(j, e) : g.o.loadOnlyLatest && 0 === h.length && d > 0 && g.loadContent(j, e), 0 === h.length && d > 0 && (g.o.onLatestClick && "function" == typeof g.o.onLatestClick && g.o.onLatestClick.apply(b), g.$waSlideMenu.trigger("onLatestClick." + g.o.namespace + f)), (h.length > 0 || d < 0) && g.gotoSelected(d, !0) 106 }, g._menuDown = function(a) { 107 g._menuItemClicked(this, a, 1) 108 }, g._menuUp = function(a) { 109 g._menuItemClicked(this, a, -1) 110 }, g._remove = function() { 111 g.$items.off("click", "a", g._menuDown), g.$waSlideMenu.removeClass(g.o.classNames.navigationClass), g.o.autoHeightMenu && g.$waSlideMenu.css("height", "initial"), g.o.minHeightMenu > 0 && g.$waSlideMenu.css("min-height", "initial"), g.$rootMenu.removeClass(g.o.classNames.allMenusClass).prependTo(g.$waSlideMenu), g.$inheritedMenus.removeClass(g.o.classNames.allMenusClass + " " + g.o.classNames.inheritedMenuClass), g.$inheritedMenus.css("visibility", ""), a.each(g.$backs, function(a, b) { 112 b.remove() 113 }), g.$movable.remove(), g.$waSlideMenu.removeData(f) 114 }, g.exec = function(a) { 115 g.hasOwnProperty(a) && "function" == typeof g[a] && g[a].call() 116 }, g.destroy = function() { 117 g._remove() 118 }, g.init = function() { 119 g._setup(), a.each(g.$backs, function(a, b) { 120 b.on("click", "a", g._menuUp) 121 }), g.$items.on("click", "a", g._menuDown), b.history && history.pushState && (b.onpopstate = function(a) { 122 a && a.state && location.reload() 123 }); 124 var c = g.$waSlideMenu.find("." + g.o.selectedClass).first(); 125 if (c.length) { 126 g.$currentMenuElement = c; 127 var d = g.$currentMenuElement.children("a").first(), 128 e = c.parentsUntil("." + g.o.classNames.navigationClass).filter(g.o.itemSelector).length, 129 h = c.children(g.o.menuSelector).length; 130 a.inArray(d.attr("href"), g.o.excludeUri) < 0 && (h > 0 && (e += 1), g.gotoSelected(e, !1), g._heightFix(h)); 131 } 132 g.o.onInit && "function" == typeof g.o.onInit && g.o.onInit(g), g.$waSlideMenu.trigger("onInit." + g.o.namespace + f) 133 }; 134 var i = a(d).data(f); 135 "object" == typeof i ? a.each(e, function(a, b) { 136 "function" == typeof i[a] ? i[a](b) : i.o.hasOwnProperty(a) && (i.o[a] = b) 137 }) : g.init() 138 }, a.waSlideMenu.defaults = { 139 namespace: "wa", 140 slideSpeed: 400, 141 slideEasing: "linear", 142 backLinkContent: "Back", 143 backOnTop: !1, 144 selectedClass: "selected", 145 loadContainer: "", 146 minHeightMenu: 0, 147 autoHeightMenu: !0, 148 excludeUri: ["/", "#"], 149 loadOnlyLatest: !1, 150 menuSelector: "ul", 151 itemSelector: "li", 152 setTitle: !1, 153 scrollToTopSpeed: 0, 154 onInit: null, 155 onSlideForward: null, 156 onSlideBack: null, 157 onLatestClick: null, 158 afterSlide: null, 159 beforeLoad: null, 160 afterLoadAlways: null, 161 afterLoadDone: null, 162 afterLoadFail: null, 163 classNames: { 164 navigationClass: "-nav", 165 wrapperClass: "-wrapper", 166 allMenusClass: "-menu", 167 inheritedMenuClass: "-inheritedmenu", 168 menuItemBackClass: "-back", 169 loadingClass: "-loading" 170 } 171 }, a.fn.waSlideMenu = function(b, c) { 172 return this.each(function() { 173 var d; 174 "object" != typeof b && "undefined" != typeof c ? (d = {}, d[b] = c) : d = b; 175 new a.waSlideMenu(this, d) 176 }) 177 } 178}(jQuery, window, document);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.