vendor: 5,632 bytes, lines 1-96
1/*! Magnific Popup - v1.1.0 - 2016-02-20 | http://dimsemenov.com/plugins/magnific-popup/ | Copyright (c) 2016 Dmitry Semenov; */ ! function(a) { 2 "function" == typeof define && define.amd ? define(["jquery"], a) : a("object" == typeof exports ? require("jquery") : window.jQuery || window.Zepto) 3}(function(a) { 4 var b, c, d, e, f, g, h = "Close", 5 i = "BeforeClose", 6 j = "AfterClose", 7 k = "BeforeAppend", 8 l = "MarkupParse", 9 m = "Open", 10 n = "Change", 11 o = "mfp", 12 p = "." + o, 13 q = "mfp-ready", 14 r = "mfp-removing", 15 s = "mfp-prevent-close", 16 t = function() {}, 17 u = !!window.jQuery, 18 v = a(window), 19 w = function(a, c) { 20 b.ev.on(o + a + p, c) 21 }, 22 x = function(b, c, d, e) { 23 var f = document.createElement("div"); 24 return f.className = "mfp-" + b, d && (f.innerHTML = d), e ? c && c.appendChild(f) : (f = a(f), c && f.appendTo(c)), f 25 }, 26 y = function(c, d) { 27 b.ev.triggerHandler(o + c, d), b.st.callbacks && (c = c.charAt(0).toLowerCase() + c.slice(1), b.st.callbacks[c] && b.st.callbacks[c].apply(b, a.isArray(d) ? d : [d])) 28 }, 29 z = function(c) { 30 return c === g && b.currTemplate.closeBtn || (b.currTemplate.closeBtn = a(b.st.closeMarkup.replace("%title%", b.st.tClose)), g = c), b.currTemplate.closeBtn 31 }, 32 A = function() { 33 a.magnificPopup.instance || (b = new t, b.init(), a.magnificPopup.instance = b) 34 }, 35 B = function() { 36 var a = document.createElement("p").style, 37 b = ["ms", "O", "Moz", "Webkit"]; 38 if (void 0 !== a.transition) return !0; 39 for (; b.length;) 40 if (b.pop() + "Transition" in a) return !0; 41 return !1 42 }; 43 t.prototype = { 44 constructor: t, 45 init: function() { 46 var c = navigator.appVersion; 47 b.isLowIE = b.isIE8 = document.all && !document.addEventListener, b.isAndroid = /android/gi.test(c), b.isIOS = /iphone|ipad|ipod/gi.test(c), b.supportsTransition = B(), b.probablyMobile = b.isAndroid || b.isIOS || /(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent), d = a(document), b.popupsCache = {} 48 }, 49 open: function(c) { 50 var e; 51 if (c.isObj === !1) { 52 b.items = c.items.toArray(), b.index = 0; 53 var g, h = c.items; 54 for (e = 0; e < h.length; e++) 55 if (g = h[e], g.parsed && (g = g.el[0]), g === c.el[0]) { 56 b.index = e; 57 break 58 } 59 } else b.items = a.isArray(c.items) ? c.items : [c.items], b.index = c.index || 0; 60 if (b.isOpen) return void b.updateItemHTML(); 61 b.types = [], f = "", c.mainEl && c.mainEl.length ? b.ev = c.mainEl.eq(0) : b.ev = d, c.key ? (b.popupsCache[c.key] || (b.popupsCache[c.key] = {}), b.currTemplate = b.popupsCache[c.key]) : b.currTemplate = {}, b.st = a.extend(!0, {}, a.magnificPopup.defaults, c), b.fixedContentPos = "auto" === b.st.fixedContentPos ? !b.probablyMobile : b.st.fixedContentPos, b.st.modal && (b.st.closeOnContentClick = !1, b.st.closeOnBgClick = !1, b.st.showCloseBtn = !1, b.st.enableEscapeKey = !1), b.bgOverlay || (b.bgOverlay = x("bg").on("click" + p, function() { 62 b.close() 63 }), b.wrap = x("wrap").attr("tabindex", -1).on("click" + p, function(a) { 64 b._checkIfClose(a.target) && b.close() 65 }), b.container = x("container", b.wrap)), b.contentContainer = x("content"), b.st.preloader && (b.preloader = x("preloader", b.container, b.st.tLoading)); 66 var i = a.magnificPopup.modules; 67 for (e = 0; e < i.length; e++) { 68 var j = i[e]; 69 j = j.charAt(0).toUpperCase() + j.slice(1), b["init" + j].call(b) 70 } 71 y("BeforeOpen"), b.st.showCloseBtn && (b.st.closeBtnInside ? (w(l, function(a, b, c, d) { 72 c.close_replaceWith = z(d.type) 73 }), f += " mfp-close-btn-in") : b.wrap.append(z())), b.st.alignTop && (f += " mfp-align-top"), b.fixedContentPos ? b.wrap.css({ 74 overflow: b.st.overflowY, 75 overflowX: "hidden", 76 overflowY: b.st.overflowY 77 }) : b.wrap.css({ 78 top: v.scrollTop(), 79 position: "absolute" 80 }), (b.st.fixedBgPos === !1 || "auto" === b.st.fixedBgPos && !b.fixedContentPos) && b.bgOverlay.css({ 81 height: d.height(), 82 position: "absolute" 83 }), b.st.enableEscapeKey && d.on("keyup" + p, function(a) { 84 27 === a.keyCode && b.close() 85 }), v.on("resize" + p, function() { 86 b.updateSize() 87 }), b.st.closeOnContentClick || (f += " mfp-auto-cursor"), f && b.wrap.addClass(f); 88 var k = b.wH = v.height(), 89 n = {}; 90 if (b.fixedContentPos && b._hasScrollBar(k)) { 91 var o = b._getScrollbarSize(); 92 o && (n.marginRight = o) 93 } 94 b.fixedContentPos && (b.isIE7 ? a("body, html").css("overflow", "hidden") : n.overflow = "hidden"); 95 var r = b.st.mainClass; 96 return b.isIE7 && (r += " mfp-ie7"), r && b._addClassToMFP(r), b.updateItemHTML(), y("BuildControls"), a("html").css(n), b.bgOverlay.add(b.
96wrap).prependTo(b.st.prependTo || a(document.body)), b._lastFocusedEl = document.activeElement, setTimeout(function() { 97 b.content ? (b._addClassToMFP(q), b._setFocus()) : b.bgOverlay.addClass(q), d.on("focusin" + p, b._onFocusIn) 98 }, 16), b.isOpen = !0, b.updateSize(k), y(m), c 99 }, 100 close: function() { 101 b.isOpen && (y(i), b.isOpen = !1, b.st.removalDelay && !b.isLowIE && b.supportsTransition ? (b._addClassToMFP(r), setTimeout(function() { 102 b._close() 103 }, b.st.removalDelay)) : b._close()) 104 }, 105 _close: function() { 106 y(h); 107 var c = r + " " + q + " "; 108 if (b.bgOverlay.detach(), b.wrap.detach(), b.container.empty(), b.st.mainClass && (c += b.st.mainClass + " "), b._removeClassFromMFP(c), b.fixedContentPos) { 109 var e = { 110 marginRight: "" 111 }; 112 b.isIE7 ? a("body, html").css("overflow", "") : e.overflow = "", a("html").css(e) 113 } 114 d.off("keyup" + p + " focusin" + p), b.ev.off(p), b.wrap.attr("class", "mfp-wrap").removeAttr("style"), b.bgOverlay.attr("class", "mfp-bg"), b.container.attr("class", "mfp-container"), !b.st.showCloseBtn || b.st.closeBtnInside && b.currTemplate[b.currItem.type] !== !0 || b.currTemplate.closeBtn && b.currTemplate.closeBtn.detach(), b.st.autoFocusLast && b._lastFocusedEl && a(b._lastFocusedEl).focus(), b.currItem = null, b.content = null, b.currTemplate = null, b.prevHeight = 0, y(j) 115 }, 116 updateSize: function(a) { 117 if (b.isIOS) { 118 var c = document.documentElement.clientWidth / window.innerWidth, 119 d = window.innerHeight * c; 120 b.wrap.css("height", d), b.wH = d 121 } else b.wH = a || v.height(); 122 b.fixedContentPos || b.wrap.css("height", b.wH), y("Resize") 123 }, 124 updateItemHTML: function() { 125 var c = b.items[b.index]; 126 b.contentContainer.detach(), b.content && b.content.detach(), c.parsed || (c = b.parseEl(b.index)); 127 var d = c.type; 128 if (y("BeforeChange", [b.currItem ? b.currItem.type : "", d]), b.currItem = c, !b.currTemplate[d]) { 129 var f = b.st[d] ? b.st[d].markup : !1; 130 y("FirstMarkupParse", f), f ? b.currTemplate[d] = a(f) : b.currTemplate[d] = !0 131 } 132 e && e !== c.type && b.container.removeClass("mfp-" + e + "-holder"); 133 var g = b["get" + d.charAt(0).toUpperCase() + d.slice(1)](c, b.currTemplate[d]); 134 b.appendContent(g, d), c.preloaded = !0, y(n, c), e = c.type, b.container.prepend(b.contentContainer), y("AfterChange") 135 }, 136 appendContent: function(a, c) { 137 b.content = a, a ? b.st.showCloseBtn && b.st.closeBtnInside && b.currTemplate[c] === !0 ? b.content.find(".mfp-close").length || b.content.append(z()) : b.content = a : b.content = "", y(k), b.container.addClass("mfp-" + c + "-holder"), b.contentContainer.append(b.content) 138 }, 139 parseEl: function(c) { 140 var d, e = b.items[c]; 141 if (e.tagName ? e = { 142 el: a(e) 143 } : (d = e.type, e = { 144 data: e, 145 src: e.src 146 }), e.el) { 147 for (var f = b.types, g = 0; g < f.length; g++) 148 if (e.el.hasClass("mfp-" + f[g])) { 149 d = f[g]; 150 break 151 } 152 e.src = e.el.attr("data-mfp-src"), e.src || (e.src = e.el.attr("href")) 153 } 154 return e.type = d || b.st.type || "inline", e.index = c, e.parsed = !0, b.items[c] = e, y("ElementParse", e), b.items[c] 155 }, 156 addGroup: function(a, c) { 157 var d = function(d) { 158 d.mfpEl = this, b._openClick(d, a, c) 159 }; 160 c || (c = {}); 161 var e = "click.magnificPopup"; 162 c.mainEl = a, c.items ? (c.isObj = !0, a.off(e).on(e, d)) : (c.isObj = !1, c.delegate ? a.off(e).on(e, c.delegate, d) : (c.items = a, a.off(e).on(e, d))) 163 }, 164 _openClick: function(c, d, e) { 165 var f = void 0 !== e.midClick ? e.midClick : a.magnificPopup.defaults.midClick; 166 if (f || !(2 === c.which || c.ctrlKey || c.metaKey || c.altKey || c.shift
166Key)) { 167 var g = void 0 !== e.disableOn ? e.disableOn : a.magnificPopup.defaults.disableOn; 168 if (g) 169 if (a.isFunction(g)) { 170 if (!g.call(b)) return !0 171 } else if (v.width() < g) return !0; 172 c.type && (c.preventDefault(), b.isOpen && c.stopPropagation()), e.el = a(c.mfpEl), e.delegate && (e.items = d.find(e.delegate)), b.open(e) 173 } 174 }, 175 updateStatus: function(a, d) { 176 if (b.preloader) { 177 c !== a && b.container.removeClass("mfp-s-" + c), d || "loading" !== a || (d = b.st.tLoading); 178 var e = { 179 status: a, 180 text: d 181 }; 182 y("UpdateStatus", e), a = e.status, d = e.text, b.preloader.html(d), b.preloader.find("a").on("click", function(a) { 183 a.stopImmediatePropagation() 184 }), b.container.addClass("mfp-s-" + a), c = a 185 } 186 }, 187 _checkIfClose: function(c) { 188 if (!a(c).hasClass(s)) { 189 var d = b.st.closeOnContentClick, 190 e = b.st.closeOnBgClick; 191 if (d && e) return !0; 192 if (!b.content || a(c).hasClass("mfp-close") || b.preloader && c === b.preloader[0]) return !0; 193 if (c === b.content[0] || a.contains(b.content[0], c)) { 194 if (d) return !0 195 } else if (e && a.contains(document, c)) return !0; 196 return !1 197 } 198 }, 199 _addClassToMFP: function(a) { 200 b.bgOverlay.addClass(a), b.wrap.addClass(a) 201 }, 202 _removeClassFromMFP: function(a) { 203 this.bgOverlay.removeClass(a), b.wrap.removeClass(a) 204 }, 205 _hasScrollBar: function(a) { 206 return (b.isIE7 ? d.height() : document.body.scrollHeight) > (a || v.height()) 207 }, 208 _setFocus: function() { 209 (b.st.focus ? b.content.find(b.st.focus).eq(0) : b.wrap).focus() 210 }, 211 _onFocusIn: function(c) { 212 return c.target === b.wrap[0] || a.contains(b.wrap[0], c.target) ? void 0 : (b._setFocus(), !1) 213 }, 214 _parseMarkup: function(b, c, d) { 215 var e; 216 d.data && (c = a.extend(d.data, c)), y(l, [b, c, d]), a.each(c, function(c, d) { 217 if (void 0 === d || d === !1) return !0; 218 if (e = c.split("_"), e.length > 1) { 219 var f = b.find(p + "-" + e[0]); 220 if (f.length > 0) { 221 var g = e[1]; 222 "replaceWith" === g ? f[0] !== d[0] && f.replaceWith(d) : "img" === g ? f.is("img") ? f.attr("src", d) : f.replaceWith(a("<img>").attr("src", d).attr("class", f.attr("class"))) : f.attr(e[1], d) 223 } 224 } else b.find(p + "-" + c).html(d) 225 }) 226 }, 227 _getScrollbarSize: function() { 228 if (void 0 === b.scrollbarSize) { 229 var a = document.createElement("div"); 230 a.style.cssText = "width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;", document.body.appendChild(a), b.scrollbarSize = a.offsetWidth - a.clientWidth, document.body.removeChild(a) 231 } 232 return b.scrollbarSize 233 } 234 }, a.magnificPopup = { 235 instance: null, 236 proto: t.prototype, 237 modules: [], 238 open: function(b, c) { 239 return A(), b = b ? a.extend(!0, {}, b) : {}, b.isObj = !0, b.index = c || 0, this.instance.open(b) 240 }, 241 close: function() { 242 return a.magnificPopup.instance && a.magnificPopup.instance.close() 243 }, 244 registerModule: function(b, c) { 245 c.options && (a.magnificPopup.defaults[b] = c.options), a.extend(this.proto, c.proto), this.modules.push(b) 246 }, 247 defaults: { 248 disableOn: 0, 249 key: null, 250 midClick: !1, 251 mainClass: "", 252 preloader: !0, 253 focus: "", 254 closeOnContentClick: !1, 255 closeOnBgClick: !0, 256 closeBtnInside: !0, 257 showCloseBtn: !0, 258 enableEscapeKey: !0, 259 modal: !1, 260 alignTop: !1, 261 removalDelay: 0, 262 prependTo: null, 263 fixedContentPos: "auto", 264 fixedBgPos: "auto", 265 overflowY: "auto", 266 closeMarkup: '<button title="%title%" type="button" class="mfp-close">×</button>', 267 tClose: "Close (Esc)", 268 tLoading: "Loading...", 269 autoFocusLast: !0 270 } 271 }, a.fn.magnificPopup = function(c) { 272 A(); 273 var d = a(this); 274 if ("string" == typeof c) 275 if ("open" === c) { 276 var e, f = u ? d.data("magnificPopup") : d[0].magnificPopup, 277 g = parseInt(arguments[1], 10) || 0; 278 f.items ? e = f.items[g] : (e = d, f.delegate && (e = e.find(f.delegate)), e = e.eq(g)), b._openClick({ 279 mfpEl: e 280 }, d, f) 281 } else b.isOpen && b[c].apply(b, Array.prototype.slice.call(arguments, 1)); 282 else c = a.extend(!0, {}, c), u ? d.data("magnificPopup", c) : d[0].magnificPopup = c, b.addGroup(d, c); 283 return d 284 }; 285 var C, D, E, F = "inline", 286 G = function() { 287 E && (D.after(E.addClass(C)).detach(), E = null) 288 }; 289 a.magnificPopup.registerModule(F, { 290 options: { 291 hiddenClass: "hide", 292 markup: "", 293 tNotFound: "Content not found" 294 }, 295 proto: { 296 initInline: function() { 297 b.types.push(F), w(h + "." + F, function() { 298 G() 299 }) 300 }, 301 getInline: function(c, d) { 302 if (G(), c.src) { 303 var e = b.st.inline, 304 f = a(c.src); 305 if (f.length) { 306 var g = f[0].parentNode; 307 g && g.tagName && (D || (C = e.hiddenClass, D = x(C), C = "mfp-" + C), E = f.after(D).detach().removeClass(C)), b.updateStatus("ready") 308 } else b.updateStatus("error", e.tNotFound), f = a("<div>"); 309 return c.inlineElement = f, f 310 } 311 return b.updateStatus("ready"), b._parseMarkup(d, {}, c), d 312 } 313 } 314 });
315 var H, I = "ajax", 316 J = function() { 317 H && a(document.body).removeClass(H) 318 }, 319 K = function() { 320 J(), b.req && b.req.abort() 321 }; 322 a.magnificPopup.registerModule(I, { 323 options: { 324 settings: null, 325 cursor: "mfp-ajax-cur", 326 tError: '<a href="%url%">The content</a> could not be loaded.' 327 }, 328 proto: { 329 initAjax: function() { 330 b.types.push(I), H = b.st.ajax.cursor, w(h + "." + I, K), w("BeforeChange." + I, K) 331 }, 332 getAjax: function(c) { 333 H && a(document.body).addClass(H), b.updateStatus("loading"); 334 var d = a.extend({ 335 url: c.src, 336 success: function(d, e, f) { 337 var g = { 338 data: d, 339 xhr: f 340 }; 341 y("ParseAjax", g), b.appendContent(a(g.data), I), c.finished = !0, J(), b._setFocus(), setTimeout(function() { 342 b.wrap.addClass(q) 343 }, 16), b.updateStatus("ready"), y("AjaxContentAdded") 344 }, 345 error: function() { 346 J(), c.finished = c.loadError = !0, b.updateStatus("error", b.st.ajax.tError.replace("%url%", c.src)) 347 } 348 }, b.st.ajax.settings); 349 return b.req = a.ajax(d), "" 350 } 351 } 352 }); 353 var L, M = function(c) { 354 if (c.data && void 0 !== c.data.title) return c.data.title; 355 var d = b.st.image.titleSrc; 356 if (d) { 357 if (a.isFunction(d)) return d.call(b, c); 358 if (c.el) return c.el.attr(d) || "" 359 } 360 return "" 361 }; 362 a.magnificPopup.registerModule("image", { 363 options: { 364 markup: '<div class="mfp-figure"><div class="mfp-close"></div><figure><div class="mfp-img"></div><figcaption><div class="mfp-bottom-bar"><div class="mfp-title"></div><div class="mfp-counter"></div></div></figcaption></figure></div>', 365 cursor: "mfp-zoom-out-cur", 366 titleSrc: "title", 367 verticalFit: !0, 368 tError: '<a href="%url%">The image</a> could not be loaded.' 369 }, 370 proto: { 371 initImage: function() { 372 var c = b.st.image, 373 d = ".image"; 374 b.types.push("image"), w(m + d, function() { 375 "image" === b.currItem.type && c.cursor && a(document.body).addClass(c.cursor) 376 }), w(h + d, function() { 377 c.cursor && a(document.body).removeClass(c.cursor), v.off("resize" + p) 378 }), w("Resize" + d, b.resizeImage), b.isLowIE && w("AfterChange", b.resizeImage) 379 }, 380 resizeImage: function() { 381 var a = b.currItem; 382 if (a && a.img && b.st.image.verticalFit) { 383 var c = 0; 384 b.isLowIE && (c = parseInt(a.img.css("padding-top"), 10) + parseInt(a.img.css("padding-bottom"), 10)), a.img.css("max-height", b.wH - c) 385 } 386 }, 387 _onImageHasSize: function(a) { 388 a.img && (a.hasSize = !0, L && clearInterval(L), a.isCheckingImgSize = !1, y("ImageHasSize", a), a.imgHidden && (b.content && b.content.removeClass("mfp-loading"), a.imgHidden = !1)) 389 }, 390 findImageSize: function(a) { 391 var c = 0, 392 d = a.img[0], 393 e = function(f) { 394 L && clearInterval(L), L = setInterval(function() { 395 return d.naturalWidth > 0 ? void b._onImageHasSize(a) : (c > 200 && clearInterval(L), c++, void(3 === c ? e(10) : 40 === c ? e(50) : 100 === c && e(500))) 396 }, f) 397 }; 398 e(1) 399 }, 400 getImage: function(c, d) { 401 var e = 0, 402 f = function() { 403 c && (c.img[0].complete ? (c.img.off(".mfploader"), c === b.currItem && (b._onImageHasSize(c), b.updateStatus("ready")), c.hasSize = !0, c.loaded = !0, y("ImageLoadComplete")) : (e++, 200 > e ? setTimeout(f, 100) : g())) 404 }, 405 g = function() { 406 c && (c.img.off(".mfploader"), c === b.currItem && (b._onImageHasSize(c), b.updateStatus("error", h.tError.replace("%url%", c.src))), c.hasSize = !0, c.loaded = !0, c.loadError = !0) 407 }, 408 h = b.st.image, 409 i = d.find(".mfp-img"); 410 if (i.length) { 411 var j = document.createElement("img"); 412 j.className = "mfp-img", c.el && c.el.find("img").length && (j.alt = c.el.find("img").attr("alt")), c.img = a(j).on("load.mfploader", f).on("error.mfploader", g), j.src = c.src, i.is("img") && (c.img = c.img.clone()), j = c.img[0], j.naturalWi
412dth > 0 ? c.hasSize = !0 : j.width || (c.hasSize = !1) 413 } 414 return b._parseMarkup(d, { 415 title: M(c), 416 img_replaceWith: c.img 417 }, c), b.resizeImage(), c.hasSize ? (L && clearInterval(L), c.loadError ? (d.addClass("mfp-loading"), b.updateStatus("error", h.tError.replace("%url%", c.src))) : (d.removeClass("mfp-loading"), b.updateStatus("ready")), d) : (b.updateStatus("loading"), c.loading = !0, c.hasSize || (c.imgHidden = !0, d.addClass("mfp-loading"), b.findImageSize(c)), d) 418 } 419 } 420 }); 421 var N, O = function() { 422 return void 0 === N && (N = void 0 !== document.createElement("p").style.MozTransform), N 423 }; 424 a.magnificPopup.registerModule("zoom", { 425 options: { 426 enabled: !1, 427 easing: "ease-in-out", 428 duration: 300, 429 opener: function(a) { 430 return a.is("img") ? a : a.find("img") 431 } 432 }, 433 proto: { 434 initZoom: function() { 435 var a, c = b.st.zoom, 436 d = ".zoom"; 437 if (c.enabled && b.supportsTransition) { 438 var e, f, g = c.duration, 439 j = function(a) { 440 var b = a.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"), 441 d = "all " + c.duration / 1e3 + "s " + c.easing, 442 e = { 443 position: "fixed", 444 zIndex: 9999, 445 left: 0, 446 top: 0, 447 "-webkit-backface-visibility": "hidden" 448 }, 449 f = "transition"; 450 return e["-webkit-" + f] = e["-moz-" + f] = e["-o-" + f] = e[f] = d, b.css(e), b 451 }, 452 k = function() { 453 b.content.css("visibility", "visible") 454 }; 455 w("BuildControls" + d, function() { 456 if (b._allowZoom()) { 457 if (clearTimeout(e), b.content.css("visibility", "hidden"), a = b._getItemToZoom(), !a) return void k(); 458 f = j(a), f.css(b._getOffset()), b.wrap.append(f), e = setTimeout(function() { 459 f.css(b._getOffset(!0)), e = setTimeout(function() { 460 k(), setTimeout(function() { 461 f.remove(), a = f = null, y("ZoomAnimationEnded") 462 }, 16) 463 }, g) 464 }, 16) 465 } 466 }), w(i + d, function() { 467 if (b._allowZoom()) { 468 if (clearTimeout(e), b.st.removalDelay = g, !a) { 469 if (a = b._getItemToZoom(), !a) return; 470 f = j(a) 471 } 472 f.css(b._getOffset(!0)), b.wrap.append(f), b.content.css("visibility", "hidden"), setTimeout(function() { 473 f.css(b._getOffset()) 474 }, 16) 475 } 476 }), w(h + d, function() { 477 b._allowZoom() && (k(), f && f.remove(), a = null) 478 }) 479 } 480 }, 481 _allowZoom: function() { 482 return "image" === b.currItem.type 483 }, 484 _getItemToZoom: function() { 485 return b.currItem.hasSize ? b.currItem.img : !1 486 }, 487 _getOffset: function(c) { 488 var d; 489 d = c ? b.currItem.img : b.st.zoom.opener(b.currItem.el || b.currItem); 490 var e = d.offset(), 491 f = parseInt(d.css("padding-top"), 10), 492 g = parseInt(d.css("padding-bottom"), 10); 493 e.top -= a(window).scrollTop() - f; 494 var h = { 495 width: d.width(), 496 height: (u ? d.innerHeight() : d[0].offsetHeight) - g - f 497 }; 498 return O() ? h["-moz-transform"] = h.transform = "translate(" + e.left + "px," + e.top + "px)" : (h.left = e.left, h.top = e.top), h 499 } 500 } 501 });
502 var P = "iframe", 503 Q = "//about:blank", 504 R = function(a) { 505 if (b.currTemplate[P]) { 506 var c = b.currTemplate[P].find("iframe"); 507 c.length && (a || (c[0].src = Q), b.isIE8 && c.css("display", a ? "block" : "none")) 508 } 509 }; 510 a.magnificPopup.registerModule(P, { 511 options: { 512 markup: '<div class="mfp-iframe-scaler"><div class="mfp-close"></div><iframe class="mfp-iframe" src="//about:blank" frameborder="0" allowfullscreen></iframe></div>', 513 srcAction: "iframe_src", 514 patterns: { 515 youtube: { 516 index: "youtube.com", 517 id: "v=", 518 src: "//www.youtube.com/embed/%id%?autoplay=1" 519 }, 520 vimeo: { 521 index: "vimeo.com/", 522 id: "/", 523 src: "//player.vimeo.com/video/%id%?autoplay=1" 524 }, 525 gmaps: { 526 index: "//maps.google.", 527 src: "%id%&output=embed" 528 } 529 } 530 }, 531 proto: { 532 initIframe: function() { 533 b.types.push(P), w("BeforeChange", function(a, b, c) { 534 b !== c && (b === P ? R() : c === P && R(!0)) 535 }), w(h + "." + P, function() { 536 R() 537 }) 538 }, 539 getIframe: function(c, d) { 540 var e = c.src, 541 f = b.st.iframe; 542 a.each(f.patterns, function() { 543 return e.indexOf(this.index) > -1 ? (this.id && (e = "string" == typeof this.id ? e.substr(e.lastIndexOf(this.id) + this.id.length, e.length) : this.id.call(this, e)), e = this.src.replace("%id%", e), !1) : void 0 544 }); 545 var g = {}; 546 return f.srcAction && (g[f.srcAction] = e), b._parseMarkup(d, g, c), b.updateStatus("ready"), d 547 } 548 } 549 }); 550 var S = function(a) { 551 var c = b.items.length; 552 return a > c - 1 ? a - c : 0 > a ? c + a : a 553 }, 554 T = function(a, b, c) { 555 return a.replace(/%curr%/gi, b + 1).replace(/%total%/gi, c) 556 }; 557 a.magnificPopup.registerModule("gallery", { 558 options: { 559 enabled: !1, 560 arrowMarkup: '<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%"></button>', 561 preload: [0, 2], 562 navigateByImgClick: !0, 563 arrows: !0, 564 tPrev: "Previous (Left arrow key)", 565 tNext: "Next (Right arrow key)", 566 tCounter: "%curr% of %total%" 567 }, 568 proto: { 569 initGallery: function() { 570 var c = b.st.gallery, 571 e = ".mfp-gallery"; 572 return b.direction = !0, c && c.enabled ? (f += " mfp-gallery", w(m + e, function() { 573 c.navigateByImgClick && b.wrap.on("click" + e, ".mfp-img", function() { 574 return b.items.length > 1 ? (b.next(), !1) : void 0 575 }), d.on("keydown" + e, function(a) { 576 37 === a.keyCode ? b.prev() : 39 === a.keyCode && b.next() 577 }) 578 }), w("UpdateStatus" + e, function(a, c) { 579 c.text && (c.text = T(c.text, b.currItem.index, b.items.length)) 580 }), w(l + e, function(a, d, e, f) { 581 var g = b.items.length; 582 e.counter = g > 1 ? T(c.tCounter, f.index, g) : "" 583 }), w("BuildControls" + e, function() { 584 if (b.items.length > 1 && c.arrows && !b.arrowLeft) { 585 var d = c.arrowMarkup, 586 e = b.arrowLeft = a(d.replace(/%title%/gi, c.tPrev).replace(/%dir%/gi, "left")).addClass(s), 587 f = b.arrowRight = a(d.replace(/%title%/gi, c.tNext).replace(/%dir%/gi, "right")).addClass(s); 588 e.click(function() { 589 b.prev() 590 }), f.click(function() { 591 b.next() 592 }), b.container.append(e.add(f)) 593 } 594 }), w(n + e, function() { 595 b._preloadTimeout && clearTimeout(b._preloadTimeout), b._preloadTimeout = setTimeout(function() { 596 b.preloadNearbyImages(), b._preloadTimeout = null 597 }, 16) 598 }), void w(h + e, function() { 599 d.off(e), b.wrap.off("click" + e), b.arrowRight = b.arrowLeft = null 600 })) : !1 601 }, 602 next: function() { 603 b.direction = !0, b.index = S(b.index + 1), b.updateItemHTML() 604 }, 605 prev: function() { 606 b.direction = !1, b.index = S(b.index - 1), b.updateItemHTML() 607 }, 608 goTo: function(a) { 609 b.direction = a >= b.index, b.index = a, b.updateItemHTML() 610 }, 611 preloadNearbyImages: function() { 612 var a, c = b.st.gallery.preload, 613 d = Math.min(c[0], b.items.length), 614 e = Math.min(c[1], b.items.length); 615 for (a = 1; a <= (b.direction ? e : d); a++) b._preloadItem(b.index + a); 616 for (a = 1; a <= (b.direction ? d : e); a++) b._preloadItem(b.index - a) 617 }, 618 _preloadItem: function(c) { 619 if (c = S(c), !b.items[c].preloaded) { 620 var d = b.items[c]; 621 d.parsed || (d = b.parseEl(c)), y("LazyLoad", d), "image" === d.t
621ype && (d.img = a('<img class="mfp-img" />').on("load.mfploader", function() { 622 d.hasSize = !0 623 }).on("error.mfploader", function() { 624 d.hasSize = !0, d.loadError = !0, y("LazyLoadError", d) 625 }).attr("src", d.src)), d.preloaded = !0 626 } 627 } 628 } 629 }); 630 var U = "retina"; 631 a.magnificPopup.registerModule(U, { 632 options: { 633 replaceSrc: function(a) { 634 return a.src.replace(/\.\w+$/, function(a) { 635 return "@2x" + a 636 }) 637 }, 638 ratio: 1 639 }, 640 proto: { 641 initRetina: function() { 642 if (window.devicePixelRatio > 1) { 643 var a = b.st.retina, 644 c = a.ratio; 645 c = isNaN(c) ? c() : c, c > 1 && (w("ImageHasSize." + U, function(a, b) { 646 b.img.css({ 647 "max-width": b.img[0].naturalWidth / c, 648 width: "100%" 649 }) 650 }), w("ElementParse." + U, function(b, d) { 651 d.src = a.replaceSrc(d, c) 652 })) 653 } 654 } 655 } 656 }), A() 657});
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.