1/*! PhotoSwipe Default UI - 4.1.2 - 2017-04-05 2 * http://photoswipe.com 3 * Copyright (c) 2017 Dmitry Semenov; */ 4!(function (a, b) { 5 a.PhotoSwipeUI_Default = b() 6})(window, function () { 7 'use strict' 8 var a = function (a, b) { 9 var c, 10 d, 11 e, 12 f, 13 g, 14 h, 15 i, 16 j, 17 k, 18 l, 19 m, 20 n, 21 o, 22 p, 23 q, 24 r, 25 s, 26 t, 27 u, 28 v = this, 29 w = !1, 30 x = !0, 31 y = !0, 32 z = { 33 barsSize: { top: 44, bottom: 'auto' }, 34 closeElClasses: ['item', 'caption', 'zoom-wrap', 'ui', 'top-bar'], 35 timeToIdle: 4e3, 36 timeToIdleOutside: 1e3, 37 loadingIndicatorDelay: 1e3, 38 addCaptionHTMLFn: function (a, b) { 39 return a.title ? ((b.children[0].innerHTML = a.title), !0) : ((b.children[0].innerHTML = ''), !1) 40 }, 41 closeEl: !0, 42 captionEl: !0, 43 fullscreenEl: !0, 44 zoomEl: !0, 45 shareEl: !0, 46 counterEl: !0, 47 arrowEl: !0, 48 preloaderEl: !0, 49 tapToClose: !1, 50 tapToToggleControls: !0, 51 clickToCloseNonZoomable: !0, 52 shareButtons: [ 53 { id: 'facebook', label: 'Share on Facebook', url: 'https://www.facebook.com/sharer/sharer.php?u={{url}}' }, 54 { id: 'twitter', label: 'Tweet', url: 'https://twitter.com/intent/tweet?text={{text}}&url={{url}}' }, 55 { 56 id: 'pinterest', 57 label: 'Pin it', 58 url: 'http://www.pinterest.com/pin/create/button/?url={{url}}&media={{image_url}}&description={{text}}' 59 }, 60 { id: 'download', label: 'Download image', url: '{{raw_image_url}}', download: !0 } 61 ], 62 getImageURLForShare: function () { 63 return a.currItem.src || '' 64 }, 65 getPageURLForShare: function () { 66 return window.location.href 67 }, 68 getTextForShare: function () { 69 return a.currItem.title || '' 70 }, 71 indexIndicatorSep: ' / ', 72 fitControlsWidth: 1200 73 }, 74 A = function (a) { 75 if (r) return !0 76 ; (a = a || window.event), q.timeToIdle && q.mouseUsed && !k && K() 77 for (var c, d, e = a.target || a.srcElement, f = e.getAttribute('class') || '', g = 0; g < S.length; g++) 78 (c = S[g]), c.onTap && f.indexOf('pswp__' + c.name) > -1 && (c.onTap(), (d = !0)) 79 if (d) { 80 a.stopPropagation && a.stopPropagation(), (r = !0) 81 var h = b.features.isOldAndroid ? 600 : 30 82 s = setTimeout(function () { 83 r = !1 84 }, h) 85 } 86 }, 87 B = function () { 88 return !a.likelyTouchDevice || q.mouseUsed || screen.width > q.fitControlsWidth 89 }, 90 C = function (a, c, d) { 91 b[(d ? 'add' : 'remove') + 'Class'](a, 'pswp__' + c) 92 }, 93 D = function () { 94 var a = 1 === q.getNumItemsFn() 95 a !== p && (C(d, 'ui--one-slide', a), (p = a)) 96 }, 97 E = function () { 98 C(i, 'share-modal--hidden', y) 99 }, 100 F = function () { 101 return ( 102 (y = !y), 103 y 104 ? (b.removeClass(i, 'pswp__share-modal--fade-in'), 105 setTimeout(function () { 106 y && E() 107 }, 300)) 108 : (E(), 109 setTimeout(function () { 110 y || b.addClass(i, 'pswp__share-modal--fade-in') 111 }, 30)), 112 y || H(), 113 !1 114 ) 115 }, 116 G = function (b) { 117 b = b || window.event 118 var c = b.target || b.srcElement 119 return ( 120 a.shout('shareLinkClick', b, c), 121 !!c.href && 122 (!!c.hasAttribute('download') || 123 (window.open( 124 c.href, 125 'pswp_share', 126 'scrollbars=yes,resizable=yes,toolbar=no,location=yes,width=550,height=420,top=100,left=' + 127 (window.screen ? Math.round(screen.width / 2 - 275) : 100) 128 ), 129 y || F(), 130 !1)) 131 ) 132 }, 133 H = function () { 134 for (var a, b, c, d, e, f = '', g = 0; g < q.shareButtons.length; g++) 135 (a = q.shareButtons[g]), 136 (c = q.getImageURLForShare(a)), 137 (d = q.getPageURLForShare(a)), 138 (e = q.getTextForShare(a)), 139 (b = a.url 140 .replace('{{url}}', encodeURIComponent(d)) 141 .replace('{{image_url}}', encodeURIComponent(c)) 142 .replace('{{raw_image_url}}', c) 143 .replace('{{text}}', encodeURIComponent(e))), 144 (f += 145 '<a href="' + 146 b + 147 '" target="_blank" class="pswp__share--' + 148 a.id + 149 '"' + 150 (a.download ? 'download' : '') + 151 '>' + 152 a.label + 153 '</a>'), 154 q.parseShareButtonOut && (f = q.parseShareButtonOut(a, f)) 155 ; (i.children[0].innerHTML = f), (i.children[0].onclick = G) 156 }, 157 I = function (a) { 158 for (var c = 0; c < q.closeElClasses.length; c++) if (b.hasClass(a, 'pswp__' + q.closeElClasses[c])) return !0 159 }, 160 J = 0, 161 K = function () { 162 clearTimeout(u), (J = 0), k && v.setIdle(!1) 163 }, 164 L = function (a) { 165 a = a ? a : window.event 166 var b = a.relatedTarget || a.toElement 167 ; (b && 'HTML' !== b.nodeName) || 168 (clearTimeout(u), 169 (u = setTimeout(function () { 170 v.setIdle(!0) 171 }, q.timeToIdleOutside))) 172 }, 173 M = function () { 174 q.fullscreenEl && 175 !b.features.isOldAndroid && 176 (c || (c = v.getFullscreenAPI()), 177 c 178 ? (b.bind(document, c.eventK, v.updateFullscreen), 179 v.updateFullscreen(),
180 b.addClass(a.template, 'pswp--supports-fs')) 181 : b.removeClass(a.template, 'pswp--supports-fs')) 182 }, 183 N = function () { 184 q.preloaderEl && 185 (O(!0), 186 l('beforeChange', function () { 187 clearTimeout(o), 188 (o = setTimeout(function () { 189 a.currItem && a.currItem.loading 190 ? (!a.allowProgressiveImg() || (a.currItem.img && !a.currItem.img.naturalWidth)) && O(!1) 191 : O(!0) 192 }, q.loadingIndicatorDelay)) 193 }), 194 l('imageLoadComplete', function (b, c) { 195 a.currItem === c && O(!0) 196 })) 197 }, 198 O = function (a) { 199 n !== a && (C(m, 'preloader--active', !a), (n = a)) 200 }, 201 P = function (a) { 202 var c = a.vGap 203 if (B()) { 204 var g = q.barsSize 205 if (q.captionEl && 'auto' === g.bottom) 206 if ( 207 (f || 208 ((f = b.createEl('pswp__caption pswp__caption--fake')), 209 f.appendChild(b.createEl('pswp__caption__center')), 210 d.insertBefore(f, e), 211 b.addClass(d, 'pswp__ui--fit')), 212 q.addCaptionHTMLFn(a, f, !0)) 213 ) { 214 var h = f.clientHeight 215 c.bottom = parseInt(h, 10) || 44 216 } else c.bottom = g.top 217 else c.bottom = 'auto' === g.bottom ? 0 : g.bottom 218 c.top = g.top 219 } else c.top = c.bottom = 0 220 }, 221 Q = function () { 222 q.timeToIdle && 223 l('mouseUsed', function () { 224 b.bind(document, 'mousemove', K), 225 b.bind(document, 'mouseout', L), 226 (t = setInterval(function () { 227 J++, 2 === J && v.setIdle(!0) 228 }, q.timeToIdle / 2)) 229 }) 230 }, 231 R = function () { 232 l('onVerticalDrag', function (a) { 233 x && a < 0.95 ? v.hideControls() : !x && a >= 0.95 && v.showControls() 234 }) 235 var a 236 l('onPinchClose', function (b) { 237 x && b < 0.9 ? (v.hideControls(), (a = !0)) : a && !x && b > 0.9 && v.showControls() 238 }), 239 l('zoomGestureEnded', function () { 240 ; (a = !1), a && !x && v.showControls() 241 }) 242 }, 243 S = [ 244 { 245 name: 'caption', 246 option: 'captionEl', 247 onInit: function (a) { 248 e = a 249 } 250 }, 251 { 252 name: 'share-modal', 253 option: 'shareEl', 254 onInit: function (a) { 255 i = a 256 }, 257 onTap: function () { 258 F() 259 } 260 }, 261 { 262 name: 'button--share', 263 option: 'shareEl', 264 onInit: function (a) { 265 h = a 266 }, 267 onTap: function () { 268 F() 269 } 270 }, 271 { name: 'button--zoom', option: 'zoomEl', onTap: a.toggleDesktopZoom }, 272 { 273 name: 'counter', 274 option: 'counterEl', 275 onInit: function (a) { 276 g = a 277 } 278 }, 279 { name: 'button--close', option: 'closeEl', onTap: a.close }, 280 { name: 'button--arrow--left', option: 'arrowEl', onTap: a.prev }, 281 { name: 'button--arrow--right', option: 'arrowEl', onTap: a.next }, 282 { 283 name: 'button--fs', 284 option: 'fullscreenEl', 285 onTap: function () { 286 c.isFullscreen() ? c.exit() : c.enter() 287 } 288 }, 289 { 290 name: 'preloader', 291 option: 'preloaderEl', 292 onInit: function (a) { 293 m = a 294 } 295 } 296 ], 297 T = function () { 298 var a, 299 c, 300 e, 301 f = function (d) { 302 if (d) 303 for (var f = d.length, g = 0; g < f; g++) { 304 ; (a = d[g]), (c = a.className) 305 for (var h = 0; h < S.length; h++) 306 (e = S[h]), 307 c.indexOf('pswp__' + e.name) > -1 && 308 (q[e.option] 309 ? (b.removeClass(a, 'pswp__element--disabled'), e.onInit && e.onInit(
309a)) 310 : b.addClass(a, 'pswp__element--disabled')) 311 } 312 } 313 f(d.children) 314 var g = b.getChildByClass(d, 'pswp__top-bar') 315 g && f(g.children) 316 } 317 ; (v.init = function () { 318 b.extend(a.options, z, !0), 319 (q = a.options), 320 (d = b.getChildByClass(a.scrollWrap, 'pswp__ui')), 321 (l = a.listen), 322 R(), 323 l('beforeChange', v.update), 324 l('doubleTap', function (b) { 325 var c = a.currItem.initialZoomLevel 326 a.getZoomLevel() !== c ? a.zoomTo(c, b, 333) : a.zoomTo(q.getDoubleTapZoom(!1, a.currItem), b, 333) 327 }), 328 l('preventDragEvent', function (a, b, c) { 329 var d = a.target || a.srcElement 330 d && 331 d.getAttribute('class') && 332 a.type.indexOf('mouse') > -1 && 333 (d.getAttribute('class').indexOf('__caption') > 0 || /(SMALL|STRONG|EM)/i.test(d.tagName)) && 334 (c.prevent = !1) 335 }), 336 l('bindEvents', function () { 337 b.bind(d, 'pswpTap click', A), 338 b.bind(a.scrollWrap, 'pswpTap', v.onGlobalTap), 339 a.likelyTouchDevice || b.bind(a.scrollWrap, 'mouseover', v.onMouseOver) 340 }), 341 l('unbindEvents', function () { 342 y || F(), 343 t && clearInterval(t), 344 b.unbind(document, 'mouseout', L), 345 b.unbind(document, 'mousemove', K), 346 b.unbind(d, 'pswpTap click', A), 347 b.unbind(a.scrollWrap, 'pswpTap', v.onGlobalTap), 348 b.unbind(a.scrollWrap, 'mouseover', v.onMouseOver), 349 c && 350 (b.unbind(document, c.eventK, v.updateFullscreen), 351 c.isFullscreen() && ((q.hideAnimationDuration = 0), c.exit()), 352 (c = null)) 353 }), 354 l('destroy', function () { 355 q.captionEl && (f && d.removeChild(f), b.removeClass(e, 'pswp__caption--empty')), 356 i && (i.children[0].onclick = null), 357 b.removeClass(d, 'pswp__ui--over-close'), 358 b.addClass(d, 'pswp__ui--hidden'), 359 v.setIdle(!1) 360 }), 361 q.showAnimationDuration || b.removeClass(d, 'pswp__ui--hidden'), 362 l('initialZoomIn', function () { 363 q.showAnimationDuration && b.removeClass(d, 'pswp__ui--hidden') 364 }), 365 l('initialZoomOut', function () { 366 b.addClass(d, 'pswp__ui--hidden') 367 }), 368 l('parseVerticalMargin', P), 369 T(), 370 q.shareEl && h && i && (y = !0), 371 D(), 372 Q(), 373 M(), 374 N() 375 }), 376 (v.setIdle = function (a) { 377 ; (k = a), C(d, 'ui--idle', a) 378 }), 379 (v.update = function () { 380 x && a.currItem 381 ? (v.updateIndexIndicator(), 382 q.captionEl && (q.addCaptionHTMLFn(a.currItem, e), C(e, 'caption--empty', !a.currItem.title)), 383 (w = !0)) 384 : (w = !1), 385 y || F(), 386 D() 387 }), 388 (v.updateFullscreen = function (d) { 389 d && 390 setTimeout(function () { 391 a.setScrollOffset(0, b.getScrollY()) 392 }, 50), 393 b[(c.isFullscreen() ? 'add' : 'remove') + 'Class'](a.template, 'pswp--fs') 394 }), 395 (v.updateIndexIndicator = function () { 396 q.counterEl && (g.innerHTML = a.getCurrentIndex() + 1 + q.indexIndicatorSep + q.getNumItemsFn()) 397 }), 398 (v.onGlobalTap = function (c) { 399 c = c || window.event 400 var d = c.target || c.srcElement 401 if (!r) 402 if (c.detail && 'mouse' === c.detail.pointerType) { 403 if (I(d)) return void a.close() 404 b.hasClass(d, 'pswp__img') && 405 (1 === a.getZoomLevel() && a.getZoomLevel() <= a.currItem.fitRatio 406 ? q.clickToCloseNonZoomable && a.close() 407 : a.toggleDesktopZoom(c.detail.releasePoint)) 408 } else if ( 409 (q.tapToToggleControls && (x ? v.hideControls() : v.showControls()), 410 q.tapToClose && (b.hasClass(d, 'pswp__img') || I(d))) 411 ) 412 return void a.close() 413 }), 414 (v.onMouseOver = function (a) { 415 a = a || window.event 416 var b = a.target || a.srcElement 417 C(d, 'ui--over-close', I(b)) 418 }), 419 (v.hideControls = function () { 420 b.addClass(d, 'pswp__ui--hidden'), (x = !1) 421 }), 422 (v.showControls = function () { 423 ;
423 (x = !0), w || v.update(), b.removeClass(d, 'pswp__ui--hidden') 424 }), 425 (v.supportsFullscreen = function () { 426 var a = document 427 return !!(a.exitFullscreen || a.mozCancelFullScreen || a.webkitExitFullscreen || a.msExitFullscreen) 428 }), 429 (v.getFullscreenAPI = function () { 430 var b, 431 c = document.documentElement, 432 d = 'fullscreenchange' 433 return ( 434 c.requestFullscreen 435 ? (b = { enterK: 'requestFullscreen', exitK: 'exitFullscreen', elementK: 'fullscreenElement', eventK: d }) 436 : c.mozRequestFullScreen 437 ? (b = { 438 enterK: 'mozRequestFullScreen', 439 exitK: 'mozCancelFullScreen', 440 elementK: 'mozFullScreenElement', 441 eventK: 'moz' + d 442 }) 443 : c.webkitRequestFullscreen 444 ? (b = { 445 enterK: 'webkitRequestFullscreen', 446 exitK: 'webkitExitFullscreen', 447 elementK: 'webkitFullscreenElement', 448 eventK: 'webkit' + d 449 }) 450 : c.msRequestFullscreen && 451 (b = { 452 enterK: 'msRequestFullscreen', 453 exitK: 'msExitFullscreen', 454 elementK: 'msFullscreenElement', 455 eventK: 'MSFullscreenChange' 456 }), 457 b && 458 ((b.enter = function () { 459 return ( 460 (j = q.closeOnScroll), 461 (q.closeOnScroll = !1), 462 'webkitRequestFullscreen' !== this.enterK 463 ? a.template[this.enterK]() 464 : void a.template[this.enterK](Element.ALLOW_KEYBOARD_INPUT) 465 ) 466 }), 467 (b.exit = function () { 468 return (q.closeOnScroll = j), document[this.exitK]() 469 }), 470 (b.isFullscreen = function () { 471 return document[this.elementK] 472 })), 473 b 474 ) 475 }) 476 } 477 return a 478})
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.