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