PluginProbe ʕ •ᴥ•ʔ
Kubio AI Page Builder / 2.2.4
Kubio AI Page Builder v2.2.4
2.8.4 2.8.3 2.8.2 2.8.1 trunk 1.0.0 1.0.1 1.1.0 1.2.0 1.2.1 1.2.2 1.2.3 1.3.0 1.3.1 1.3.2 1.4.0 1.4.1 1.4.2 1.4.3 1.5.0 1.6.0 1.6.1 1.6.2 1.6.3 1.6.4 1.7.0 1.7.1 1.7.2 1.7.3 1.8.0 1.8.1 1.8.2 1.9.0 2.0.0 2.1.1 2.1.2 2.1.3 2.2.0 2.2.3 2.2.4 2.2.5 2.3.0 2.3.1 2.3.3 2.3.4 2.4.0 2.4.1 2.4.2 2.4.3 2.4.5 2.5.0 2.5.1 2.5.2 2.5.3 2.6.0 2.6.1 2.6.2 2.6.3 2.6.5 2.6.6 2.6.7 2.7.0 2.7.1 2.7.2 2.7.3 2.8.0
kubio / static / fancybox / jquery.fancybox.min.js
kubio / static / fancybox Last commit date
jquery.fancybox.min.css 4 years ago jquery.fancybox.min.js 4 years ago
jquery.fancybox.min.js
3724 lines
1 // ==================================================
2 // fancyBox v3.5.7
3 //
4 // Licensed GPLv3 for open source use
5 // or fancyBox Commercial License for commercial use
6 //
7 // http://fancyapps.com/fancybox/
8 // Copyright 2019 fancyApps
9 //
10 // ==================================================
11 !(function (t, e, n, o) {
12 'use strict';
13 function i(t, e) {
14 var o,
15 i,
16 a,
17 s = [],
18 r = 0;
19 (t && t.isDefaultPrevented()) ||
20 (t.preventDefault(),
21 (e = e || {}),
22 t && t.data && (e = h(t.data.options, e)),
23 (o = e.$target || n(t.currentTarget).trigger('blur')),
24 ((a = n.fancybox.getInstance()) &&
25 a.$trigger &&
26 a.$trigger.is(o)) ||
27 (e.selector
28 ? (s = n(e.selector))
29 : ((i = o.attr('data-fancybox') || ''),
30 i
31 ? ((s = t.data ? t.data.items : []),
32 (s = s.length
33 ? s.filter('[data-fancybox="' + i + '"]')
34 : n('[data-fancybox="' + i + '"]')))
35 : (s = [o])),
36 (r = n(s).index(o)),
37 r < 0 && (r = 0),
38 (a = n.fancybox.open(s, e, r)),
39 (a.$trigger = o)));
40 }
41 if (((t.console = t.console || { info: function (t) {} }), n)) {
42 if (n.fn.fancybox)
43 return void console.info('fancyBox already initialized');
44 var a = {
45 closeExisting: !1,
46 loop: !1,
47 gutter: 50,
48 keyboard: !0,
49 preventCaptionOverlap: !0,
50 arrows: !0,
51 infobar: !0,
52 smallBtn: 'auto',
53 toolbar: 'auto',
54 buttons: ['zoom', 'slideShow', 'thumbs', 'close'],
55 idleTime: 3,
56 protect: !1,
57 modal: !1,
58 image: { preload: !1 },
59 ajax: { settings: { data: { fancybox: !0 } } },
60 iframe: {
61 tpl:
62 '<iframe id="fancybox-frame{rnd}" name="fancybox-frame{rnd}" class="fancybox-iframe" allowfullscreen="allowfullscreen" allow="autoplay; fullscreen" src=""></iframe>',
63 preload: !0,
64 css: {},
65 attr: { scrolling: 'auto' },
66 },
67 video: {
68 tpl:
69 '<video class="fancybox-video" controls controlsList="nodownload" poster="{{poster}}"><source src="{{src}}" type="{{format}}" />Sorry, your browser doesn\'t support embedded videos, <a href="{{src}}">download</a> and watch with your favorite video player!</video>',
70 format: '',
71 autoStart: !0,
72 },
73 defaultType: 'image',
74 animationEffect: 'zoom',
75 animationDuration: 366,
76 zoomOpacity: 'auto',
77 transitionEffect: 'fade',
78 transitionDuration: 366,
79 slideClass: '',
80 baseClass: '',
81 baseTpl:
82 '<div class="fancybox-container" role="dialog" tabindex="-1"><div class="fancybox-bg"></div><div class="fancybox-inner"><div class="fancybox-infobar"><span data-fancybox-index></span>&nbsp;/&nbsp;<span data-fancybox-count></span></div><div class="fancybox-toolbar">{{buttons}}</div><div class="fancybox-navigation">{{arrows}}</div><div class="fancybox-stage"></div><div class="fancybox-caption"><div class="fancybox-caption__body"></div></div></div></div>',
83 spinnerTpl: '<div class="fancybox-loading"></div>',
84 errorTpl: '<div class="fancybox-error"><p>{{ERROR}}</p></div>',
85 btnTpl: {
86 download:
87 '<a download data-fancybox-download class="fancybox-button fancybox-button--download" title="{{DOWNLOAD}}" href="javascript:;"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M18.62 17.09V19H5.38v-1.91zm-2.97-6.96L17 11.45l-5 4.87-5-4.87 1.36-1.32 2.68 2.64V5h1.92v7.77z"/></svg></a>',
88 zoom:
89 '<button data-fancybox-zoom class="fancybox-button fancybox-button--zoom" title="{{ZOOM}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M18.7 17.3l-3-3a5.9 5.9 0 0 0-.6-7.6 5.9 5.9 0 0 0-8.4 0 5.9 5.9 0 0 0 0 8.4 5.9 5.9 0 0 0 7.7.7l3 3a1 1 0 0 0 1.3 0c.4-.5.4-1 0-1.5zM8.1 13.8a4 4 0 0 1 0-5.7 4 4 0 0 1 5.7 0 4 4 0 0 1 0 5.7 4 4 0 0 1-5.7 0z"/></svg></button>',
90 close:
91 '<button data-fancybox-close class="fancybox-button fancybox-button--close" title="{{CLOSE}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 10.6L6.6 5.2 5.2 6.6l5.4 5.4-5.4 5.4 1.4 1.4 5.4-5.4 5.4 5.4 1.4-1.4-5.4-5.4 5.4-5.4-1.4-1.4-5.4 5.4z"/></svg></button>',
92 arrowLeft:
93 '<button data-fancybox-prev class="fancybox-button fancybox-button--arrow_left" title="{{PREV}}"><div><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M11.28 15.7l-1.34 1.37L5 12l4.94-5.07 1.34 1.38-2.68 2.72H19v1.94H8.6z"/></svg></div></button>',
94 arrowRight:
95 '<button data-fancybox-next class="fancybox-button fancybox-button--arrow_right" title="{{NEXT}}"><div><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M15.4 12.97l-2.68 2.72 1.34 1.38L19 12l-4.94-5.07-1.34 1.38 2.68 2.72H5v1.94z"/></svg></div></button>',
96 smallBtn:
97 '<button type="button" data-fancybox-close class="fancybox-button fancybox-close-small" title="{{CLOSE}}"><svg xmlns="http://www.w3.org/2000/svg" version="1" viewBox="0 0 24 24"><path d="M13 12l5-5-1-1-5 5-5-5-1 1 5 5-5 5 1 1 5-5 5 5 1-1z"/></svg></button>',
98 },
99 parentEl: 'body',
100 hideScrollbar: !0,
101 autoFocus: !0,
102 backFocus: !0,
103 trapFocus: !0,
104 fullScreen: { autoStart: !1 },
105 touch: { vertical: !0, momentum: !0 },
106 hash: null,
107 media: {},
108 slideShow: { autoStart: !1, speed: 3e3 },
109 thumbs: {
110 autoStart: !1,
111 hideOnClose: !0,
112 parentEl: '.fancybox-container',
113 axis: 'y',
114 },
115 wheel: 'auto',
116 onInit: n.noop,
117 beforeLoad: n.noop,
118 afterLoad: n.noop,
119 beforeShow: n.noop,
120 afterShow: n.noop,
121 beforeClose: n.noop,
122 afterClose: n.noop,
123 onActivate: n.noop,
124 onDeactivate: n.noop,
125 clickContent: function (t, e) {
126 return 'image' === t.type && 'zoom';
127 },
128 clickSlide: 'close',
129 clickOutside: 'close',
130 dblclickContent: !1,
131 dblclickSlide: !1,
132 dblclickOutside: !1,
133 mobile: {
134 preventCaptionOverlap: !1,
135 idleTime: !1,
136 clickContent: function (t, e) {
137 return 'image' === t.type && 'toggleControls';
138 },
139 clickSlide: function (t, e) {
140 return 'image' === t.type ? 'toggleControls' : 'close';
141 },
142 dblclickContent: function (t, e) {
143 return 'image' === t.type && 'zoom';
144 },
145 dblclickSlide: function (t, e) {
146 return 'image' === t.type && 'zoom';
147 },
148 },
149 lang: 'en',
150 i18n: {
151 en: {
152 CLOSE: 'Close',
153 NEXT: 'Next',
154 PREV: 'Previous',
155 ERROR:
156 'The requested content cannot be loaded. <br/> Please try again later.',
157 PLAY_START: 'Start slideshow',
158 PLAY_STOP: 'Pause slideshow',
159 FULL_SCREEN: 'Full screen',
160 THUMBS: 'Thumbnails',
161 DOWNLOAD: 'Download',
162 SHARE: 'Share',
163 ZOOM: 'Zoom',
164 },
165 de: {
166 CLOSE: 'Schlie&szlig;en',
167 NEXT: 'Weiter',
168 PREV: 'Zur&uuml;ck',
169 ERROR:
170 'Die angeforderten Daten konnten nicht geladen werden. <br/> Bitte versuchen Sie es sp&auml;ter nochmal.',
171 PLAY_START: 'Diaschau starten',
172 PLAY_STOP: 'Diaschau beenden',
173 FULL_SCREEN: 'Vollbild',
174 THUMBS: 'Vorschaubilder',
175 DOWNLOAD: 'Herunterladen',
176 SHARE: 'Teilen',
177 ZOOM: 'Vergr&ouml;&szlig;ern',
178 },
179 },
180 },
181 s = n(t),
182 r = n(e),
183 c = 0,
184 l = function (t) {
185 return t && t.hasOwnProperty && t instanceof n;
186 },
187 d = (function () {
188 return (
189 t.requestAnimationFrame ||
190 t.webkitRequestAnimationFrame ||
191 t.mozRequestAnimationFrame ||
192 t.oRequestAnimationFrame ||
193 function (e) {
194 return t.setTimeout(e, 1e3 / 60);
195 }
196 );
197 })(),
198 u = (function () {
199 return (
200 t.cancelAnimationFrame ||
201 t.webkitCancelAnimationFrame ||
202 t.mozCancelAnimationFrame ||
203 t.oCancelAnimationFrame ||
204 function (e) {
205 t.clearTimeout(e);
206 }
207 );
208 })(),
209 f = (function () {
210 var t,
211 n = e.createElement('fakeelement'),
212 o = {
213 transition: 'transitionend',
214 OTransition: 'oTransitionEnd',
215 MozTransition: 'transitionend',
216 WebkitTransition: 'webkitTransitionEnd',
217 };
218 for (t in o) if (void 0 !== n.style[t]) return o[t];
219 return 'transitionend';
220 })(),
221 p = function (t) {
222 return t && t.length && t[0].offsetHeight;
223 },
224 h = function (t, e) {
225 var o = n.extend(!0, {}, t, e);
226 return (
227 n.each(e, function (t, e) {
228 n.isArray(e) && (o[t] = e);
229 }),
230 o
231 );
232 },
233 g = function (t) {
234 var o, i;
235 return (
236 !(!t || t.ownerDocument !== e) &&
237 (n('.fancybox-container').css('pointer-events', 'none'),
238 (o = {
239 x: t.getBoundingClientRect().left + t.offsetWidth / 2,
240 y: t.getBoundingClientRect().top + t.offsetHeight / 2,
241 }),
242 (i = e.elementFromPoint(o.x, o.y) === t),
243 n('.fancybox-container').css('pointer-events', ''),
244 i)
245 );
246 },
247 b = function (t, e, o) {
248 var i = this;
249 (i.opts = h({ index: o }, n.fancybox.defaults)),
250 n.isPlainObject(e) && (i.opts = h(i.opts, e)),
251 n.fancybox.isMobile && (i.opts = h(i.opts, i.opts.mobile)),
252 (i.id = i.opts.id || ++c),
253 (i.currIndex = parseInt(i.opts.index, 10) || 0),
254 (i.prevIndex = null),
255 (i.prevPos = null),
256 (i.currPos = 0),
257 (i.firstRun = !0),
258 (i.group = []),
259 (i.slides = {}),
260 i.addContent(t),
261 i.group.length && i.init();
262 };
263 n.extend(b.prototype, {
264 init: function () {
265 var o,
266 i,
267 a = this,
268 s = a.group[a.currIndex],
269 r = s.opts;
270 r.closeExisting && n.fancybox.close(!0),
271 n('body').addClass('fancybox-active'),
272 !n.fancybox.getInstance() &&
273 !1 !== r.hideScrollbar &&
274 !n.fancybox.isMobile &&
275 e.body.scrollHeight > t.innerHeight &&
276 (n('head').append(
277 '<style id="fancybox-style-noscroll" type="text/css">.compensate-for-scrollbar{margin-right:' +
278 (t.innerWidth - e.documentElement.clientWidth) +
279 'px;}</style>'
280 ),
281 n('body').addClass('compensate-for-scrollbar')),
282 (i = ''),
283 n.each(r.buttons, function (t, e) {
284 i += r.btnTpl[e] || '';
285 }),
286 (o = n(
287 a.translate(
288 a,
289 r.baseTpl
290 .replace('{{buttons}}', i)
291 .replace(
292 '{{arrows}}',
293 r.btnTpl.arrowLeft + r.btnTpl.arrowRight
294 )
295 )
296 )
297 .attr('id', 'fancybox-container-' + a.id)
298 .addClass(r.baseClass)
299 .data('FancyBox', a)
300 .appendTo(r.parentEl)),
301 (a.$refs = { container: o }),
302 [
303 'bg',
304 'inner',
305 'infobar',
306 'toolbar',
307 'stage',
308 'caption',
309 'navigation',
310 ].forEach(function (t) {
311 a.$refs[t] = o.find('.fancybox-' + t);
312 }),
313 a.trigger('onInit'),
314 a.activate(),
315 a.jumpTo(a.currIndex);
316 },
317 translate: function (t, e) {
318 var n = t.opts.i18n[t.opts.lang] || t.opts.i18n.en;
319 return e.replace(/\{\{(\w+)\}\}/g, function (t, e) {
320 return void 0 === n[e] ? t : n[e];
321 });
322 },
323 addContent: function (t) {
324 var e,
325 o = this,
326 i = n.makeArray(t);
327 n.each(i, function (t, e) {
328 var i,
329 a,
330 s,
331 r,
332 c,
333 l = {},
334 d = {};
335 n.isPlainObject(e)
336 ? ((l = e), (d = e.opts || e))
337 : 'object' === n.type(e) && n(e).length
338 ? ((i = n(e)),
339 (d = i.data() || {}),
340 (d = n.extend(!0, {}, d, d.options)),
341 (d.$orig = i),
342 (l.src = o.opts.src || d.src || i.attr('href')),
343 l.type || l.src || ((l.type = 'inline'), (l.src = e)))
344 : (l = { type: 'html', src: e + '' }),
345 (l.opts = n.extend(!0, {}, o.opts, d)),
346 n.isArray(d.buttons) && (l.opts.buttons = d.buttons),
347 n.fancybox.isMobile &&
348 l.opts.mobile &&
349 (l.opts = h(l.opts, l.opts.mobile)),
350 (a = l.type || l.opts.type),
351 (r = l.src || ''),
352 !a &&
353 r &&
354 ((s = r.match(/\.(mp4|mov|ogv|webm)((\?|#).*)?$/i))
355 ? ((a = 'video'),
356 l.opts.video.format ||
357 (l.opts.video.format =
358 'video/' +
359 ('ogv' === s[1] ? 'ogg' : s[1])))
360 : r.match(
361 /(^data:image\/[a-z0-9+\/=]*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg|ico)((\?|#).*)?$)/i
362 )
363 ? (a = 'image')
364 : r.match(/\.(pdf)((\?|#).*)?$/i)
365 ? ((a = 'iframe'),
366 (l = n.extend(!0, l, {
367 contentType: 'pdf',
368 opts: { iframe: { preload: !1 } },
369 })))
370 : '#' === r.charAt(0) && (a = 'inline')),
371 a ? (l.type = a) : o.trigger('objectNeedsType', l),
372 l.contentType ||
373 (l.contentType =
374 n.inArray(l.type, ['html', 'inline', 'ajax']) >
375 -1
376 ? 'html'
377 : l.type),
378 (l.index = o.group.length),
379 'auto' == l.opts.smallBtn &&
380 (l.opts.smallBtn =
381 n.inArray(l.type, ['html', 'inline', 'ajax']) >
382 -1),
383 'auto' === l.opts.toolbar &&
384 (l.opts.toolbar = !l.opts.smallBtn),
385 (l.$thumb = l.opts.$thumb || null),
386 l.opts.$trigger &&
387 l.index === o.opts.index &&
388 ((l.$thumb = l.opts.$trigger.find('img:first')),
389 l.$thumb.length &&
390 (l.opts.$orig = l.opts.$trigger)),
391 (l.$thumb && l.$thumb.length) ||
392 !l.opts.$orig ||
393 (l.$thumb = l.opts.$orig.find('img:first')),
394 l.$thumb && !l.$thumb.length && (l.$thumb = null),
395 (l.thumb =
396 l.opts.thumb ||
397 (l.$thumb ? l.$thumb[0].src : null)),
398 'function' === n.type(l.opts.caption) &&
399 (l.opts.caption = l.opts.caption.apply(e, [o, l])),
400 'function' === n.type(o.opts.caption) &&
401 (l.opts.caption = o.opts.caption.apply(e, [o, l])),
402 l.opts.caption instanceof n ||
403 (l.opts.caption =
404 void 0 === l.opts.caption
405 ? ''
406 : l.opts.caption + ''),
407 'ajax' === l.type &&
408 ((c = r.split(/\s+/, 2)),
409 c.length > 1 &&
410 ((l.src = c.shift()),
411 (l.opts.filter = c.shift()))),
412 l.opts.modal &&
413 (l.opts = n.extend(!0, l.opts, {
414 trapFocus: !0,
415 infobar: 0,
416 toolbar: 0,
417 smallBtn: 0,
418 keyboard: 0,
419 slideShow: 0,
420 fullScreen: 0,
421 thumbs: 0,
422 touch: 0,
423 clickContent: !1,
424 clickSlide: !1,
425 clickOutside: !1,
426 dblclickContent: !1,
427 dblclickSlide: !1,
428 dblclickOutside: !1,
429 })),
430 o.group.push(l);
431 }),
432 Object.keys(o.slides).length &&
433 (o.updateControls(),
434 (e = o.Thumbs) &&
435 e.isActive &&
436 (e.create(), e.focus()));
437 },
438 addEvents: function () {
439 var e = this;
440 e.removeEvents(),
441 e.$refs.container
442 .on(
443 'click.fb-close',
444 '[data-fancybox-close]',
445 function (t) {
446 t.stopPropagation(),
447 t.preventDefault(),
448 e.close(t);
449 }
450 )
451 .on(
452 'touchstart.fb-prev click.fb-prev',
453 '[data-fancybox-prev]',
454 function (t) {
455 t.stopPropagation(),
456 t.preventDefault(),
457 e.previous();
458 }
459 )
460 .on(
461 'touchstart.fb-next click.fb-next',
462 '[data-fancybox-next]',
463 function (t) {
464 t.stopPropagation(),
465 t.preventDefault(),
466 e.next();
467 }
468 )
469 .on('click.fb', '[data-fancybox-zoom]', function (t) {
470 e[
471 e.isScaledDown()
472 ? 'scaleToActual'
473 : 'scaleToFit'
474 ]();
475 }),
476 s.on('orientationchange.fb resize.fb', function (t) {
477 t &&
478 t.originalEvent &&
479 'resize' === t.originalEvent.type
480 ? (e.requestId && u(e.requestId),
481 (e.requestId = d(function () {
482 e.update(t);
483 })))
484 : (e.current &&
485 'iframe' === e.current.type &&
486 e.$refs.stage.hide(),
487 setTimeout(
488 function () {
489 e.$refs.stage.show(), e.update(t);
490 },
491 n.fancybox.isMobile ? 600 : 250
492 ));
493 }),
494 r.on('keydown.fb', function (t) {
495 var o = n.fancybox ? n.fancybox.getInstance() : null,
496 i = o.current,
497 a = t.keyCode || t.which;
498 if (9 == a)
499 return void (i.opts.trapFocus && e.focus(t));
500 if (
501 !(
502 !i.opts.keyboard ||
503 t.ctrlKey ||
504 t.altKey ||
505 t.shiftKey ||
506 n(t.target).is(
507 'input,textarea,video,audio,select'
508 )
509 )
510 )
511 return 8 === a || 27 === a
512 ? (t.preventDefault(), void e.close(t))
513 : 37 === a || 38 === a
514 ? (t.preventDefault(), void e.previous())
515 : 39 === a || 40 === a
516 ? (t.preventDefault(), void e.next())
517 : void e.trigger('afterKeydown', t, a);
518 }),
519 e.group[e.currIndex].opts.idleTime &&
520 ((e.idleSecondsCounter = 0),
521 r.on(
522 'mousemove.fb-idle mouseleave.fb-idle mousedown.fb-idle touchstart.fb-idle touchmove.fb-idle scroll.fb-idle keydown.fb-idle',
523 function (t) {
524 (e.idleSecondsCounter = 0),
525 e.isIdle && e.showControls(),
526 (e.isIdle = !1);
527 }
528 ),
529 (e.idleInterval = t.setInterval(function () {
530 ++e.idleSecondsCounter >=
531 e.group[e.currIndex].opts.idleTime &&
532 !e.isDragging &&
533 ((e.isIdle = !0),
534 (e.idleSecondsCounter = 0),
535 e.hideControls());
536 }, 1e3)));
537 },
538 removeEvents: function () {
539 var e = this;
540 s.off('orientationchange.fb resize.fb'),
541 r.off('keydown.fb .fb-idle'),
542 this.$refs.container.off('.fb-close .fb-prev .fb-next'),
543 e.idleInterval &&
544 (t.clearInterval(e.idleInterval),
545 (e.idleInterval = null));
546 },
547 previous: function (t) {
548 return this.jumpTo(this.currPos - 1, t);
549 },
550 next: function (t) {
551 return this.jumpTo(this.currPos + 1, t);
552 },
553 jumpTo: function (t, e) {
554 var o,
555 i,
556 a,
557 s,
558 r,
559 c,
560 l,
561 d,
562 u,
563 f = this,
564 h = f.group.length;
565 if (
566 !(
567 f.isDragging ||
568 f.isClosing ||
569 (f.isAnimating && f.firstRun)
570 )
571 ) {
572 if (
573 ((t = parseInt(t, 10)),
574 !(a = f.current ? f.current.opts.loop : f.opts.loop) &&
575 (t < 0 || t >= h))
576 )
577 return !1;
578 if (
579 ((o = f.firstRun = !Object.keys(f.slides).length),
580 (r = f.current),
581 (f.prevIndex = f.currIndex),
582 (f.prevPos = f.currPos),
583 (s = f.createSlide(t)),
584 h > 1 &&
585 ((a || s.index < h - 1) && f.createSlide(t + 1),
586 (a || s.index > 0) && f.createSlide(t - 1)),
587 (f.current = s),
588 (f.currIndex = s.index),
589 (f.currPos = s.pos),
590 f.trigger('beforeShow', o),
591 f.updateControls(),
592 (s.forcedDuration = void 0),
593 n.isNumeric(e)
594 ? (s.forcedDuration = e)
595 : (e =
596 s.opts[
597 o
598 ? 'animationDuration'
599 : 'transitionDuration'
600 ]),
601 (e = parseInt(e, 10)),
602 (i = f.isMoved(s)),
603 s.$slide.addClass('fancybox-slide--current'),
604 o)
605 )
606 return (
607 s.opts.animationEffect &&
608 e &&
609 f.$refs.container.css(
610 'transition-duration',
611 e + 'ms'
612 ),
613 f.$refs.container
614 .addClass('fancybox-is-open')
615 .trigger('focus'),
616 f.loadSlide(s),
617 void f.preload('image')
618 );
619 (c = n.fancybox.getTranslate(r.$slide)),
620 (l = n.fancybox.getTranslate(f.$refs.stage)),
621 n.each(f.slides, function (t, e) {
622 n.fancybox.stop(e.$slide, !0);
623 }),
624 r.pos !== s.pos && (r.isComplete = !1),
625 r.$slide.removeClass(
626 'fancybox-slide--complete fancybox-slide--current'
627 ),
628 i
629 ? ((u =
630 c.left -
631 (r.pos * c.width + r.pos * r.opts.gutter)),
632 n.each(f.slides, function (t, o) {
633 o.$slide
634 .removeClass('fancybox-animated')
635 .removeClass(function (t, e) {
636 return (
637 e.match(
638 /(^|\s)fancybox-fx-\S+/g
639 ) || []
640 ).join(' ');
641 });
642 var i =
643 o.pos * c.width + o.pos * o.opts.gutter;
644 n.fancybox.setTranslate(o.$slide, {
645 top: 0,
646 left: i - l.left + u,
647 }),
648 o.pos !== s.pos &&
649 o.$slide.addClass(
650 'fancybox-slide--' +
651 (o.pos > s.pos
652 ? 'next'
653 : 'previous')
654 ),
655 p(o.$slide),
656 n.fancybox.animate(
657 o.$slide,
658 {
659 top: 0,
660 left:
661 (o.pos - s.pos) * c.width +
662 (o.pos - s.pos) *
663 o.opts.gutter,
664 },
665 e,
666 function () {
667 o.$slide
668 .css({
669 transform: '',
670 opacity: '',
671 })
672 .removeClass(
673 'fancybox-slide--next fancybox-slide--previous'
674 ),
675 o.pos === f.currPos &&
676 f.complete();
677 }
678 );
679 }))
680 : e &&
681 s.opts.transitionEffect &&
682 ((d =
683 'fancybox-animated fancybox-fx-' +
684 s.opts.transitionEffect),
685 r.$slide.addClass(
686 'fancybox-slide--' +
687 (r.pos > s.pos ? 'next' : 'previous')
688 ),
689 n.fancybox.animate(
690 r.$slide,
691 d,
692 e,
693 function () {
694 r.$slide
695 .removeClass(d)
696 .removeClass(
697 'fancybox-slide--next fancybox-slide--previous'
698 );
699 },
700 !1
701 )),
702 s.isLoaded ? f.revealContent(s) : f.loadSlide(s),
703 f.preload('image');
704 }
705 },
706 createSlide: function (t) {
707 var e,
708 o,
709 i = this;
710 return (
711 (o = t % i.group.length),
712 (o = o < 0 ? i.group.length + o : o),
713 !i.slides[t] &&
714 i.group[o] &&
715 ((e = n('<div class="fancybox-slide"></div>').appendTo(
716 i.$refs.stage
717 )),
718 (i.slides[t] = n.extend(!0, {}, i.group[o], {
719 pos: t,
720 $slide: e,
721 isLoaded: !1,
722 })),
723 i.updateSlide(i.slides[t])),
724 i.slides[t]
725 );
726 },
727 scaleToActual: function (t, e, o) {
728 var i,
729 a,
730 s,
731 r,
732 c,
733 l = this,
734 d = l.current,
735 u = d.$content,
736 f = n.fancybox.getTranslate(d.$slide).width,
737 p = n.fancybox.getTranslate(d.$slide).height,
738 h = d.width,
739 g = d.height;
740 l.isAnimating ||
741 l.isMoved() ||
742 !u ||
743 'image' != d.type ||
744 !d.isLoaded ||
745 d.hasError ||
746 ((l.isAnimating = !0),
747 n.fancybox.stop(u),
748 (t = void 0 === t ? 0.5 * f : t),
749 (e = void 0 === e ? 0.5 * p : e),
750 (i = n.fancybox.getTranslate(u)),
751 (i.top -= n.fancybox.getTranslate(d.$slide).top),
752 (i.left -= n.fancybox.getTranslate(d.$slide).left),
753 (r = h / i.width),
754 (c = g / i.height),
755 (a = 0.5 * f - 0.5 * h),
756 (s = 0.5 * p - 0.5 * g),
757 h > f &&
758 ((a = i.left * r - (t * r - t)),
759 a > 0 && (a = 0),
760 a < f - h && (a = f - h)),
761 g > p &&
762 ((s = i.top * c - (e * c - e)),
763 s > 0 && (s = 0),
764 s < p - g && (s = p - g)),
765 l.updateCursor(h, g),
766 n.fancybox.animate(
767 u,
768 { top: s, left: a, scaleX: r, scaleY: c },
769 o || 366,
770 function () {
771 l.isAnimating = !1;
772 }
773 ),
774 l.SlideShow && l.SlideShow.isActive && l.SlideShow.stop());
775 },
776 scaleToFit: function (t) {
777 var e,
778 o = this,
779 i = o.current,
780 a = i.$content;
781 o.isAnimating ||
782 o.isMoved() ||
783 !a ||
784 'image' != i.type ||
785 !i.isLoaded ||
786 i.hasError ||
787 ((o.isAnimating = !0),
788 n.fancybox.stop(a),
789 (e = o.getFitPos(i)),
790 o.updateCursor(e.width, e.height),
791 n.fancybox.animate(
792 a,
793 {
794 top: e.top,
795 left: e.left,
796 scaleX: e.width / a.width(),
797 scaleY: e.height / a.height(),
798 },
799 t || 366,
800 function () {
801 o.isAnimating = !1;
802 }
803 ));
804 },
805 getFitPos: function (t) {
806 var e,
807 o,
808 i,
809 a,
810 s = this,
811 r = t.$content,
812 c = t.$slide,
813 l = t.width || t.opts.width,
814 d = t.height || t.opts.height,
815 u = {};
816 return (
817 !!(t.isLoaded && r && r.length) &&
818 ((e = n.fancybox.getTranslate(s.$refs.stage).width),
819 (o = n.fancybox.getTranslate(s.$refs.stage).height),
820 (e -=
821 parseFloat(c.css('paddingLeft')) +
822 parseFloat(c.css('paddingRight')) +
823 parseFloat(r.css('marginLeft')) +
824 parseFloat(r.css('marginRight'))),
825 (o -=
826 parseFloat(c.css('paddingTop')) +
827 parseFloat(c.css('paddingBottom')) +
828 parseFloat(r.css('marginTop')) +
829 parseFloat(r.css('marginBottom'))),
830 (l && d) || ((l = e), (d = o)),
831 (i = Math.min(1, e / l, o / d)),
832 (l *= i),
833 (d *= i),
834 l > e - 0.5 && (l = e),
835 d > o - 0.5 && (d = o),
836 'image' === t.type
837 ? ((u.top =
838 Math.floor(0.5 * (o - d)) +
839 parseFloat(c.css('paddingTop'))),
840 (u.left =
841 Math.floor(0.5 * (e - l)) +
842 parseFloat(c.css('paddingLeft'))))
843 : 'video' === t.contentType &&
844 ((a =
845 t.opts.width && t.opts.height
846 ? l / d
847 : t.opts.ratio || 16 / 9),
848 d > l / a ? (d = l / a) : l > d * a && (l = d * a)),
849 (u.width = l),
850 (u.height = d),
851 u)
852 );
853 },
854 update: function (t) {
855 var e = this;
856 n.each(e.slides, function (n, o) {
857 e.updateSlide(o, t);
858 });
859 },
860 updateSlide: function (t, e) {
861 var o = this,
862 i = t && t.$content,
863 a = t.width || t.opts.width,
864 s = t.height || t.opts.height,
865 r = t.$slide;
866 o.adjustCaption(t),
867 i &&
868 (a || s || 'video' === t.contentType) &&
869 !t.hasError &&
870 (n.fancybox.stop(i),
871 n.fancybox.setTranslate(i, o.getFitPos(t)),
872 t.pos === o.currPos &&
873 ((o.isAnimating = !1), o.updateCursor())),
874 o.adjustLayout(t),
875 r.length &&
876 (r.trigger('refresh'),
877 t.pos === o.currPos &&
878 o.$refs.toolbar
879 .add(
880 o.$refs.navigation.find(
881 '.fancybox-button--arrow_right'
882 )
883 )
884 .toggleClass(
885 'compensate-for-scrollbar',
886 r.get(0).scrollHeight >
887 r.get(0).clientHeight
888 )),
889 o.trigger('onUpdate', t, e);
890 },
891 centerSlide: function (t) {
892 var e = this,
893 o = e.current,
894 i = o.$slide;
895 !e.isClosing &&
896 o &&
897 (i.siblings().css({ transform: '', opacity: '' }),
898 i
899 .parent()
900 .children()
901 .removeClass(
902 'fancybox-slide--previous fancybox-slide--next'
903 ),
904 n.fancybox.animate(
905 i,
906 { top: 0, left: 0, opacity: 1 },
907 void 0 === t ? 0 : t,
908 function () {
909 i.css({ transform: '', opacity: '' }),
910 o.isComplete || e.complete();
911 },
912 !1
913 ));
914 },
915 isMoved: function (t) {
916 var e,
917 o,
918 i = t || this.current;
919 return (
920 !!i &&
921 ((o = n.fancybox.getTranslate(this.$refs.stage)),
922 (e = n.fancybox.getTranslate(i.$slide)),
923 !i.$slide.hasClass('fancybox-animated') &&
924 (Math.abs(e.top - o.top) > 0.5 ||
925 Math.abs(e.left - o.left) > 0.5))
926 );
927 },
928 updateCursor: function (t, e) {
929 var o,
930 i,
931 a = this,
932 s = a.current,
933 r = a.$refs.container;
934 s &&
935 !a.isClosing &&
936 a.Guestures &&
937 (r.removeClass(
938 'fancybox-is-zoomable fancybox-can-zoomIn fancybox-can-zoomOut fancybox-can-swipe fancybox-can-pan'
939 ),
940 (o = a.canPan(t, e)),
941 (i = !!o || a.isZoomable()),
942 r.toggleClass('fancybox-is-zoomable', i),
943 n('[data-fancybox-zoom]').prop('disabled', !i),
944 o
945 ? r.addClass('fancybox-can-pan')
946 : i &&
947 ('zoom' === s.opts.clickContent ||
948 (n.isFunction(s.opts.clickContent) &&
949 'zoom' == s.opts.clickContent(s)))
950 ? r.addClass('fancybox-can-zoomIn')
951 : s.opts.touch &&
952 (s.opts.touch.vertical || a.group.length > 1) &&
953 'video' !== s.contentType &&
954 r.addClass('fancybox-can-swipe'));
955 },
956 isZoomable: function () {
957 var t,
958 e = this,
959 n = e.current;
960 if (n && !e.isClosing && 'image' === n.type && !n.hasError) {
961 if (!n.isLoaded) return !0;
962 if (
963 (t = e.getFitPos(n)) &&
964 (n.width > t.width || n.height > t.height)
965 )
966 return !0;
967 }
968 return !1;
969 },
970 isScaledDown: function (t, e) {
971 var o = this,
972 i = !1,
973 a = o.current,
974 s = a.$content;
975 return (
976 void 0 !== t && void 0 !== e
977 ? (i = t < a.width && e < a.height)
978 : s &&
979 ((i = n.fancybox.getTranslate(s)),
980 (i = i.width < a.width && i.height < a.height)),
981 i
982 );
983 },
984 canPan: function (t, e) {
985 var o = this,
986 i = o.current,
987 a = null,
988 s = !1;
989 return (
990 'image' === i.type &&
991 (i.isComplete || (t && e)) &&
992 !i.hasError &&
993 ((s = o.getFitPos(i)),
994 void 0 !== t && void 0 !== e
995 ? (a = { width: t, height: e })
996 : i.isComplete &&
997 (a = n.fancybox.getTranslate(i.$content)),
998 a &&
999 s &&
1000 (s =
1001 Math.abs(a.width - s.width) > 1.5 ||
1002 Math.abs(a.height - s.height) > 1.5)),
1003 s
1004 );
1005 },
1006 loadSlide: function (t) {
1007 var e,
1008 o,
1009 i,
1010 a = this;
1011 if (!t.isLoading && !t.isLoaded) {
1012 if (((t.isLoading = !0), !1 === a.trigger('beforeLoad', t)))
1013 return (t.isLoading = !1), !1;
1014 switch (
1015 ((e = t.type),
1016 (o = t.$slide),
1017 o
1018 .off('refresh')
1019 .trigger('onReset')
1020 .addClass(t.opts.slideClass),
1021 e)
1022 ) {
1023 case 'image':
1024 a.setImage(t);
1025 break;
1026 case 'iframe':
1027 a.setIframe(t);
1028 break;
1029 case 'html':
1030 a.setContent(t, t.src || t.content);
1031 break;
1032 case 'video':
1033 a.setContent(
1034 t,
1035 t.opts.video.tpl
1036 .replace(/\{\{src\}\}/gi, t.src)
1037 .replace(
1038 '{{format}}',
1039 t.opts.videoFormat ||
1040 t.opts.video.format ||
1041 ''
1042 )
1043 .replace('{{poster}}', t.thumb || '')
1044 );
1045 break;
1046 case 'inline':
1047 n(t.src).length
1048 ? a.setContent(t, n(t.src))
1049 : a.setError(t);
1050 break;
1051 case 'ajax':
1052 a.showLoading(t),
1053 (i = n.ajax(
1054 n.extend({}, t.opts.ajax.settings, {
1055 url: t.src,
1056 success: function (e, n) {
1057 'success' === n &&
1058 a.setContent(t, e);
1059 },
1060 error: function (e, n) {
1061 e && 'abort' !== n && a.setError(t);
1062 },
1063 })
1064 )),
1065 o.one('onReset', function () {
1066 i.abort();
1067 });
1068 break;
1069 default:
1070 a.setError(t);
1071 }
1072 return !0;
1073 }
1074 },
1075 setImage: function (t) {
1076 var o,
1077 i = this;
1078 setTimeout(function () {
1079 var e = t.$image;
1080 i.isClosing ||
1081 !t.isLoading ||
1082 (e && e.length && e[0].complete) ||
1083 t.hasError ||
1084 i.showLoading(t);
1085 }, 50),
1086 i.checkSrcset(t),
1087 (t.$content = n('<div class="fancybox-content"></div>')
1088 .addClass('fancybox-is-hidden')
1089 .appendTo(t.$slide.addClass('fancybox-slide--image'))),
1090 !1 !== t.opts.preload &&
1091 t.opts.width &&
1092 t.opts.height &&
1093 t.thumb &&
1094 ((t.width = t.opts.width),
1095 (t.height = t.opts.height),
1096 (o = e.createElement('img')),
1097 (o.onerror = function () {
1098 n(this).remove(), (t.$ghost = null);
1099 }),
1100 (o.onload = function () {
1101 i.afterLoad(t);
1102 }),
1103 (t.$ghost = n(o)
1104 .addClass('fancybox-image')
1105 .appendTo(t.$content)
1106 .attr('src', t.thumb))),
1107 i.setBigImage(t);
1108 },
1109 checkSrcset: function (e) {
1110 var n,
1111 o,
1112 i,
1113 a,
1114 s = e.opts.srcset || e.opts.image.srcset;
1115 if (s) {
1116 (i = t.devicePixelRatio || 1),
1117 (a = t.innerWidth * i),
1118 (o = s.split(',').map(function (t) {
1119 var e = {};
1120 return (
1121 t
1122 .trim()
1123 .split(/\s+/)
1124 .forEach(function (t, n) {
1125 var o = parseInt(
1126 t.substring(0, t.length - 1),
1127 10
1128 );
1129 if (0 === n) return (e.url = t);
1130 o &&
1131 ((e.value = o),
1132 (e.postfix = t[t.length - 1]));
1133 }),
1134 e
1135 );
1136 })),
1137 o.sort(function (t, e) {
1138 return t.value - e.value;
1139 });
1140 for (var r = 0; r < o.length; r++) {
1141 var c = o[r];
1142 if (
1143 ('w' === c.postfix && c.value >= a) ||
1144 ('x' === c.postfix && c.value >= i)
1145 ) {
1146 n = c;
1147 break;
1148 }
1149 }
1150 !n && o.length && (n = o[o.length - 1]),
1151 n &&
1152 ((e.src = n.url),
1153 e.width &&
1154 e.height &&
1155 'w' == n.postfix &&
1156 ((e.height = (e.width / e.height) * n.value),
1157 (e.width = n.value)),
1158 (e.opts.srcset = s));
1159 }
1160 },
1161 setBigImage: function (t) {
1162 var o = this,
1163 i = e.createElement('img'),
1164 a = n(i);
1165 (t.$image = a
1166 .one('error', function () {
1167 o.setError(t);
1168 })
1169 .one('load', function () {
1170 var e;
1171 t.$ghost ||
1172 (o.resolveImageSlideSize(
1173 t,
1174 this.naturalWidth,
1175 this.naturalHeight
1176 ),
1177 o.afterLoad(t)),
1178 o.isClosing ||
1179 (t.opts.srcset &&
1180 ((e = t.opts.sizes),
1181 (e && 'auto' !== e) ||
1182 (e =
1183 (t.width / t.height > 1 &&
1184 s.width() / s.height() > 1
1185 ? '100'
1186 : Math.round(
1187 (t.width / t.height) *
1188 100
1189 )) + 'vw'),
1190 a
1191 .attr('sizes', e)
1192 .attr('srcset', t.opts.srcset)),
1193 t.$ghost &&
1194 setTimeout(function () {
1195 t.$ghost &&
1196 !o.isClosing &&
1197 t.$ghost.hide();
1198 }, Math.min(
1199 300,
1200 Math.max(1e3, t.height / 1600)
1201 )),
1202 o.hideLoading(t));
1203 })
1204 .addClass('fancybox-image')
1205 .attr('src', t.src)
1206 .appendTo(t.$content)),
1207 (i.complete || 'complete' == i.readyState) &&
1208 a.naturalWidth &&
1209 a.naturalHeight
1210 ? a.trigger('load')
1211 : i.error && a.trigger('error');
1212 },
1213 resolveImageSlideSize: function (t, e, n) {
1214 var o = parseInt(t.opts.width, 10),
1215 i = parseInt(t.opts.height, 10);
1216 (t.width = e),
1217 (t.height = n),
1218 o > 0 &&
1219 ((t.width = o), (t.height = Math.floor((o * n) / e))),
1220 i > 0 &&
1221 ((t.width = Math.floor((i * e) / n)), (t.height = i));
1222 },
1223 setIframe: function (t) {
1224 var e,
1225 o = this,
1226 i = t.opts.iframe,
1227 a = t.$slide;
1228 (t.$content = n(
1229 '<div class="fancybox-content' +
1230 (i.preload ? ' fancybox-is-hidden' : '') +
1231 '"></div>'
1232 )
1233 .css(i.css)
1234 .appendTo(a)),
1235 a.addClass('fancybox-slide--' + t.contentType),
1236 (t.$iframe = e = n(
1237 i.tpl.replace(/\{rnd\}/g, new Date().getTime())
1238 )
1239 .attr(i.attr)
1240 .appendTo(t.$content)),
1241 i.preload
1242 ? (o.showLoading(t),
1243 e.on('load.fb error.fb', function (e) {
1244 (this.isReady = 1),
1245 t.$slide.trigger('refresh'),
1246 o.afterLoad(t);
1247 }),
1248 a.on('refresh.fb', function () {
1249 var n,
1250 o,
1251 s = t.$content,
1252 r = i.css.width,
1253 c = i.css.height;
1254 if (1 === e[0].isReady) {
1255 try {
1256 (n = e.contents()),
1257 (o = n.find('body'));
1258 } catch (t) {}
1259 o &&
1260 o.length &&
1261 o.children().length &&
1262 (a.css('overflow', 'visible'),
1263 s.css({
1264 width: '100%',
1265 'max-width': '100%',
1266 height: '9999px',
1267 }),
1268 void 0 === r &&
1269 (r = Math.ceil(
1270 Math.max(
1271 o[0].clientWidth,
1272 o.outerWidth(!0)
1273 )
1274 )),
1275 s
1276 .css('width', r || '')
1277 .css('max-width', ''),
1278 void 0 === c &&
1279 (c = Math.ceil(
1280 Math.max(
1281 o[0].clientHeight,
1282 o.outerHeight(!0)
1283 )
1284 )),
1285 s.css('height', c || ''),
1286 a.css('overflow', 'auto')),
1287 s.removeClass('fancybox-is-hidden');
1288 }
1289 }))
1290 : o.afterLoad(t),
1291 e.attr('src', t.src),
1292 a.one('onReset', function () {
1293 try {
1294 n(this)
1295 .find('iframe')
1296 .hide()
1297 .unbind()
1298 .attr('src', '//about:blank');
1299 } catch (t) {}
1300 n(this).off('refresh.fb').empty(),
1301 (t.isLoaded = !1),
1302 (t.isRevealed = !1);
1303 });
1304 },
1305 setContent: function (t, e) {
1306 var o = this;
1307 o.isClosing ||
1308 (o.hideLoading(t),
1309 t.$content && n.fancybox.stop(t.$content),
1310 t.$slide.empty(),
1311 l(e) && e.parent().length
1312 ? ((e.hasClass('fancybox-content') ||
1313 e.parent().hasClass('fancybox-content')) &&
1314 e.parents('.fancybox-slide').trigger('onReset'),
1315 (t.$placeholder = n('<div>').hide().insertAfter(e)),
1316 e.css('display', 'inline-block'))
1317 : t.hasError ||
1318 ('string' === n.type(e) &&
1319 (e = n('<div>').append(n.trim(e)).contents()),
1320 t.opts.filter &&
1321 (e = n('<div>').html(e).find(t.opts.filter))),
1322 t.$slide.one('onReset', function () {
1323 n(this).find('video,audio').trigger('pause'),
1324 t.$placeholder &&
1325 (t.$placeholder
1326 .after(
1327 e.removeClass('fancybox-content').hide()
1328 )
1329 .remove(),
1330 (t.$placeholder = null)),
1331 t.$smallBtn &&
1332 (t.$smallBtn.remove(), (t.$smallBtn = null)),
1333 t.hasError ||
1334 (n(this).empty(),
1335 (t.isLoaded = !1),
1336 (t.isRevealed = !1));
1337 }),
1338 n(e).appendTo(t.$slide),
1339 n(e).is('video,audio') &&
1340 (n(e).addClass('fancybox-video'),
1341 n(e).wrap('<div></div>'),
1342 (t.contentType = 'video'),
1343 (t.opts.width = t.opts.width || n(e).attr('width')),
1344 (t.opts.height = t.opts.height || n(e).attr('height'))),
1345 (t.$content = t.$slide
1346 .children()
1347 .filter(
1348 'div,form,main,video,audio,article,.fancybox-content'
1349 )
1350 .first()),
1351 t.$content.siblings().hide(),
1352 t.$content.length ||
1353 (t.$content = t.$slide
1354 .wrapInner('<div></div>')
1355 .children()
1356 .first()),
1357 t.$content.addClass('fancybox-content'),
1358 t.$slide.addClass('fancybox-slide--' + t.contentType),
1359 o.afterLoad(t));
1360 },
1361 setError: function (t) {
1362 (t.hasError = !0),
1363 t.$slide
1364 .trigger('onReset')
1365 .removeClass('fancybox-slide--' + t.contentType)
1366 .addClass('fancybox-slide--error'),
1367 (t.contentType = 'html'),
1368 this.setContent(t, this.translate(t, t.opts.errorTpl)),
1369 t.pos === this.currPos && (this.isAnimating = !1);
1370 },
1371 showLoading: function (t) {
1372 var e = this;
1373 (t = t || e.current) &&
1374 !t.$spinner &&
1375 (t.$spinner = n(e.translate(e, e.opts.spinnerTpl))
1376 .appendTo(t.$slide)
1377 .hide()
1378 .fadeIn('fast'));
1379 },
1380 hideLoading: function (t) {
1381 var e = this;
1382 (t = t || e.current) &&
1383 t.$spinner &&
1384 (t.$spinner.stop().remove(), delete t.$spinner);
1385 },
1386 afterLoad: function (t) {
1387 var e = this;
1388 e.isClosing ||
1389 ((t.isLoading = !1),
1390 (t.isLoaded = !0),
1391 e.trigger('afterLoad', t),
1392 e.hideLoading(t),
1393 !t.opts.smallBtn ||
1394 (t.$smallBtn && t.$smallBtn.length) ||
1395 (t.$smallBtn = n(
1396 e.translate(t, t.opts.btnTpl.smallBtn)
1397 ).appendTo(t.$content)),
1398 t.opts.protect &&
1399 t.$content &&
1400 !t.hasError &&
1401 (t.$content.on('contextmenu.fb', function (t) {
1402 return 2 == t.button && t.preventDefault(), !0;
1403 }),
1404 'image' === t.type &&
1405 n(
1406 '<div class="fancybox-spaceball"></div>'
1407 ).appendTo(t.$content)),
1408 e.adjustCaption(t),
1409 e.adjustLayout(t),
1410 t.pos === e.currPos && e.updateCursor(),
1411 e.revealContent(t));
1412 },
1413 adjustCaption: function (t) {
1414 var e,
1415 n = this,
1416 o = t || n.current,
1417 i = o.opts.caption,
1418 a = o.opts.preventCaptionOverlap,
1419 s = n.$refs.caption,
1420 r = !1;
1421 s.toggleClass('fancybox-caption--separate', a),
1422 a &&
1423 i &&
1424 i.length &&
1425 (o.pos !== n.currPos
1426 ? ((e = s.clone().appendTo(s.parent())),
1427 e.children().eq(0).empty().html(i),
1428 (r = e.outerHeight(!0)),
1429 e.empty().remove())
1430 : n.$caption && (r = n.$caption.outerHeight(!0)),
1431 o.$slide.css('padding-bottom', r || ''));
1432 },
1433 adjustLayout: function (t) {
1434 var e,
1435 n,
1436 o,
1437 i,
1438 a = this,
1439 s = t || a.current;
1440 s.isLoaded &&
1441 !0 !== s.opts.disableLayoutFix &&
1442 (s.$content.css('margin-bottom', ''),
1443 s.$content.outerHeight() > s.$slide.height() + 0.5 &&
1444 ((o = s.$slide[0].style['padding-bottom']),
1445 (i = s.$slide.css('padding-bottom')),
1446 parseFloat(i) > 0 &&
1447 ((e = s.$slide[0].scrollHeight),
1448 s.$slide.css('padding-bottom', 0),
1449 Math.abs(e - s.$slide[0].scrollHeight) < 1 &&
1450 (n = i),
1451 s.$slide.css('padding-bottom', o))),
1452 s.$content.css('margin-bottom', n));
1453 },
1454 revealContent: function (t) {
1455 var e,
1456 o,
1457 i,
1458 a,
1459 s = this,
1460 r = t.$slide,
1461 c = !1,
1462 l = !1,
1463 d = s.isMoved(t),
1464 u = t.isRevealed;
1465 return (
1466 (t.isRevealed = !0),
1467 (e =
1468 t.opts[
1469 s.firstRun ? 'animationEffect' : 'transitionEffect'
1470 ]),
1471 (i =
1472 t.opts[
1473 s.firstRun
1474 ? 'animationDuration'
1475 : 'transitionDuration'
1476 ]),
1477 (i = parseInt(
1478 void 0 === t.forcedDuration ? i : t.forcedDuration,
1479 10
1480 )),
1481 (!d && t.pos === s.currPos && i) || (e = !1),
1482 'zoom' === e &&
1483 (t.pos === s.currPos &&
1484 i &&
1485 'image' === t.type &&
1486 !t.hasError &&
1487 (l = s.getThumbPos(t))
1488 ? (c = s.getFitPos(t))
1489 : (e = 'fade')),
1490 'zoom' === e
1491 ? ((s.isAnimating = !0),
1492 (c.scaleX = c.width / l.width),
1493 (c.scaleY = c.height / l.height),
1494 (a = t.opts.zoomOpacity),
1495 'auto' == a &&
1496 (a =
1497 Math.abs(
1498 t.width / t.height - l.width / l.height
1499 ) > 0.1),
1500 a && ((l.opacity = 0.1), (c.opacity = 1)),
1501 n.fancybox.setTranslate(
1502 t.$content.removeClass('fancybox-is-hidden'),
1503 l
1504 ),
1505 p(t.$content),
1506 void n.fancybox.animate(
1507 t.$content,
1508 c,
1509 i,
1510 function () {
1511 (s.isAnimating = !1), s.complete();
1512 }
1513 ))
1514 : (s.updateSlide(t),
1515 e
1516 ? (n.fancybox.stop(r),
1517 (o =
1518 'fancybox-slide--' +
1519 (t.pos >= s.prevPos
1520 ? 'next'
1521 : 'previous') +
1522 ' fancybox-animated fancybox-fx-' +
1523 e),
1524 r
1525 .addClass(o)
1526 .removeClass('fancybox-slide--current'),
1527 t.$content.removeClass('fancybox-is-hidden'),
1528 p(r),
1529 'image' !== t.type &&
1530 t.$content.hide().show(0),
1531 void n.fancybox.animate(
1532 r,
1533 'fancybox-slide--current',
1534 i,
1535 function () {
1536 r.removeClass(o).css({
1537 transform: '',
1538 opacity: '',
1539 }),
1540 t.pos === s.currPos &&
1541 s.complete();
1542 },
1543 !0
1544 ))
1545 : (t.$content.removeClass('fancybox-is-hidden'),
1546 u ||
1547 !d ||
1548 'image' !== t.type ||
1549 t.hasError ||
1550 t.$content.hide().fadeIn('fast'),
1551 void (t.pos === s.currPos && s.complete())))
1552 );
1553 },
1554 getThumbPos: function (t) {
1555 var e,
1556 o,
1557 i,
1558 a,
1559 s,
1560 r = !1,
1561 c = t.$thumb;
1562 return (
1563 !(!c || !g(c[0])) &&
1564 ((e = n.fancybox.getTranslate(c)),
1565 (o = parseFloat(c.css('border-top-width') || 0)),
1566 (i = parseFloat(c.css('border-right-width') || 0)),
1567 (a = parseFloat(c.css('border-bottom-width') || 0)),
1568 (s = parseFloat(c.css('border-left-width') || 0)),
1569 (r = {
1570 top: e.top + o,
1571 left: e.left + s,
1572 width: e.width - i - s,
1573 height: e.height - o - a,
1574 scaleX: 1,
1575 scaleY: 1,
1576 }),
1577 e.width > 0 && e.height > 0 && r)
1578 );
1579 },
1580 complete: function () {
1581 var t,
1582 e = this,
1583 o = e.current,
1584 i = {};
1585 !e.isMoved() &&
1586 o.isLoaded &&
1587 (o.isComplete ||
1588 ((o.isComplete = !0),
1589 o.$slide.siblings().trigger('onReset'),
1590 e.preload('inline'),
1591 p(o.$slide),
1592 o.$slide.addClass('fancybox-slide--complete'),
1593 n.each(e.slides, function (t, o) {
1594 o.pos >= e.currPos - 1 && o.pos <= e.currPos + 1
1595 ? (i[o.pos] = o)
1596 : o &&
1597 (n.fancybox.stop(o.$slide),
1598 o.$slide.off().remove());
1599 }),
1600 (e.slides = i)),
1601 (e.isAnimating = !1),
1602 e.updateCursor(),
1603 e.trigger('afterShow'),
1604 o.opts.video.autoStart &&
1605 o.$slide
1606 .find('video,audio')
1607 .filter(':visible:first')
1608 .trigger('play')
1609 .one('ended', function () {
1610 Document.exitFullscreen
1611 ? Document.exitFullscreen()
1612 : this.webkitExitFullscreen &&
1613 this.webkitExitFullscreen(),
1614 e.next();
1615 }),
1616 o.opts.autoFocus &&
1617 'html' === o.contentType &&
1618 ((t = o.$content.find(
1619 'input[autofocus]:enabled:visible:first'
1620 )),
1621 t.length ? t.trigger('focus') : e.focus(null, !0)),
1622 o.$slide.scrollTop(0).scrollLeft(0));
1623 },
1624 preload: function (t) {
1625 var e,
1626 n,
1627 o = this;
1628 o.group.length < 2 ||
1629 ((n = o.slides[o.currPos + 1]),
1630 (e = o.slides[o.currPos - 1]),
1631 e && e.type === t && o.loadSlide(e),
1632 n && n.type === t && o.loadSlide(n));
1633 },
1634 focus: function (t, o) {
1635 var i,
1636 a,
1637 s = this,
1638 r = [
1639 'a[href]',
1640 'area[href]',
1641 'input:not([disabled]):not([type="hidden"]):not([aria-hidden])',
1642 'select:not([disabled]):not([aria-hidden])',
1643 'textarea:not([disabled]):not([aria-hidden])',
1644 'button:not([disabled]):not([aria-hidden])',
1645 'iframe',
1646 'object',
1647 'embed',
1648 'video',
1649 'audio',
1650 '[contenteditable]',
1651 '[tabindex]:not([tabindex^="-"])',
1652 ].join(',');
1653 s.isClosing ||
1654 ((i =
1655 !t && s.current && s.current.isComplete
1656 ? s.current.$slide.find(
1657 '*:visible' +
1658 (o ? ':not(.fancybox-close-small)' : '')
1659 )
1660 : s.$refs.container.find('*:visible')),
1661 (i = i.filter(r).filter(function () {
1662 return (
1663 'hidden' !== n(this).css('visibility') &&
1664 !n(this).hasClass('disabled')
1665 );
1666 })),
1667 i.length
1668 ? ((a = i.index(e.activeElement)),
1669 t && t.shiftKey
1670 ? (a < 0 || 0 == a) &&
1671 (t.preventDefault(),
1672 i.eq(i.length - 1).trigger('focus'))
1673 : (a < 0 || a == i.length - 1) &&
1674 (t && t.preventDefault(),
1675 i.eq(0).trigger('focus')))
1676 : s.$refs.container.trigger('focus'));
1677 },
1678 activate: function () {
1679 var t = this;
1680 n('.fancybox-container').each(function () {
1681 var e = n(this).data('FancyBox');
1682 e &&
1683 e.id !== t.id &&
1684 !e.isClosing &&
1685 (e.trigger('onDeactivate'),
1686 e.removeEvents(),
1687 (e.isVisible = !1));
1688 }),
1689 (t.isVisible = !0),
1690 (t.current || t.isIdle) && (t.update(), t.updateControls()),
1691 t.trigger('onActivate'),
1692 t.addEvents();
1693 },
1694 close: function (t, e) {
1695 var o,
1696 i,
1697 a,
1698 s,
1699 r,
1700 c,
1701 l,
1702 u = this,
1703 f = u.current,
1704 h = function () {
1705 u.cleanUp(t);
1706 };
1707 return (
1708 !u.isClosing &&
1709 ((u.isClosing = !0),
1710 !1 === u.trigger('beforeClose', t)
1711 ? ((u.isClosing = !1),
1712 d(function () {
1713 u.update();
1714 }),
1715 !1)
1716 : (u.removeEvents(),
1717 (a = f.$content),
1718 (o = f.opts.animationEffect),
1719 (i = n.isNumeric(e)
1720 ? e
1721 : o
1722 ? f.opts.animationDuration
1723 : 0),
1724 f.$slide.removeClass(
1725 'fancybox-slide--complete fancybox-slide--next fancybox-slide--previous fancybox-animated'
1726 ),
1727 !0 !== t ? n.fancybox.stop(f.$slide) : (o = !1),
1728 f.$slide.siblings().trigger('onReset').remove(),
1729 i &&
1730 u.$refs.container
1731 .removeClass('fancybox-is-open')
1732 .addClass('fancybox-is-closing')
1733 .css('transition-duration', i + 'ms'),
1734 u.hideLoading(f),
1735 u.hideControls(!0),
1736 u.updateCursor(),
1737 'zoom' !== o ||
1738 (a &&
1739 i &&
1740 'image' === f.type &&
1741 !u.isMoved() &&
1742 !f.hasError &&
1743 (l = u.getThumbPos(f))) ||
1744 (o = 'fade'),
1745 'zoom' === o
1746 ? (n.fancybox.stop(a),
1747 (s = n.fancybox.getTranslate(a)),
1748 (c = {
1749 top: s.top,
1750 left: s.left,
1751 scaleX: s.width / l.width,
1752 scaleY: s.height / l.height,
1753 width: l.width,
1754 height: l.height,
1755 }),
1756 (r = f.opts.zoomOpacity),
1757 'auto' == r &&
1758 (r =
1759 Math.abs(
1760 f.width / f.height -
1761 l.width / l.height
1762 ) > 0.1),
1763 r && (l.opacity = 0),
1764 n.fancybox.setTranslate(a, c),
1765 p(a),
1766 n.fancybox.animate(a, l, i, h),
1767 !0)
1768 : (o && i
1769 ? n.fancybox.animate(
1770 f.$slide
1771 .addClass(
1772 'fancybox-slide--previous'
1773 )
1774 .removeClass(
1775 'fancybox-slide--current'
1776 ),
1777 'fancybox-animated fancybox-fx-' +
1778 o,
1779 i,
1780 h
1781 )
1782 : !0 === t
1783 ? setTimeout(h, i)
1784 : h(),
1785 !0)))
1786 );
1787 },
1788 cleanUp: function (e) {
1789 var o,
1790 i,
1791 a,
1792 s = this,
1793 r = s.current.opts.$orig;
1794 s.current.$slide.trigger('onReset'),
1795 s.$refs.container.empty().remove(),
1796 s.trigger('afterClose', e),
1797 s.current.opts.backFocus &&
1798 ((r && r.length && r.is(':visible')) ||
1799 (r = s.$trigger),
1800 r &&
1801 r.length &&
1802 ((i = t.scrollX),
1803 (a = t.scrollY),
1804 r.trigger('focus'),
1805 n('html, body').scrollTop(a).scrollLeft(i))),
1806 (s.current = null),
1807 (o = n.fancybox.getInstance()),
1808 o
1809 ? o.activate()
1810 : (n('body').removeClass(
1811 'fancybox-active compensate-for-scrollbar'
1812 ),
1813 n('#fancybox-style-noscroll').remove());
1814 },
1815 trigger: function (t, e) {
1816 var o,
1817 i = Array.prototype.slice.call(arguments, 1),
1818 a = this,
1819 s = e && e.opts ? e : a.current;
1820 if (
1821 (s ? i.unshift(s) : (s = a),
1822 i.unshift(a),
1823 n.isFunction(s.opts[t]) && (o = s.opts[t].apply(s, i)),
1824 !1 === o)
1825 )
1826 return o;
1827 'afterClose' !== t && a.$refs
1828 ? a.$refs.container.trigger(t + '.fb', i)
1829 : r.trigger(t + '.fb', i);
1830 },
1831 updateControls: function () {
1832 var t = this,
1833 o = t.current,
1834 i = o.index,
1835 a = t.$refs.container,
1836 s = t.$refs.caption,
1837 r = o.opts.caption;
1838 o.$slide.trigger('refresh'),
1839 r && r.length
1840 ? ((t.$caption = s), s.children().eq(0).html(r))
1841 : (t.$caption = null),
1842 t.hasHiddenControls || t.isIdle || t.showControls(),
1843 a.find('[data-fancybox-count]').html(t.group.length),
1844 a.find('[data-fancybox-index]').html(i + 1),
1845 a
1846 .find('[data-fancybox-prev]')
1847 .prop('disabled', !o.opts.loop && i <= 0),
1848 a
1849 .find('[data-fancybox-next]')
1850 .prop(
1851 'disabled',
1852 !o.opts.loop && i >= t.group.length - 1
1853 ),
1854 'image' === o.type
1855 ? a
1856 .find('[data-fancybox-zoom]')
1857 .show()
1858 .end()
1859 .find('[data-fancybox-download]')
1860 .attr('href', o.opts.image.src || o.src)
1861 .show()
1862 : o.opts.toolbar &&
1863 a
1864 .find(
1865 '[data-fancybox-download],[data-fancybox-zoom]'
1866 )
1867 .hide(),
1868 n(e.activeElement).is(':hidden,[disabled]') &&
1869 t.$refs.container.trigger('focus');
1870 },
1871 hideControls: function (t) {
1872 var e = this,
1873 n = ['infobar', 'toolbar', 'nav'];
1874 (!t && e.current.opts.preventCaptionOverlap) ||
1875 n.push('caption'),
1876 this.$refs.container.removeClass(
1877 n
1878 .map(function (t) {
1879 return 'fancybox-show-' + t;
1880 })
1881 .join(' ')
1882 ),
1883 (this.hasHiddenControls = !0);
1884 },
1885 showControls: function () {
1886 var t = this,
1887 e = t.current ? t.current.opts : t.opts,
1888 n = t.$refs.container;
1889 (t.hasHiddenControls = !1),
1890 (t.idleSecondsCounter = 0),
1891 n
1892 .toggleClass(
1893 'fancybox-show-toolbar',
1894 !(!e.toolbar || !e.buttons)
1895 )
1896 .toggleClass(
1897 'fancybox-show-infobar',
1898 !!(e.infobar && t.group.length > 1)
1899 )
1900 .toggleClass('fancybox-show-caption', !!t.$caption)
1901 .toggleClass(
1902 'fancybox-show-nav',
1903 !!(e.arrows && t.group.length > 1)
1904 )
1905 .toggleClass('fancybox-is-modal', !!e.modal);
1906 },
1907 toggleControls: function () {
1908 this.hasHiddenControls
1909 ? this.showControls()
1910 : this.hideControls();
1911 },
1912 }),
1913 (n.fancybox = {
1914 version: '3.5.7',
1915 defaults: a,
1916 getInstance: function (t) {
1917 var e = n(
1918 '.fancybox-container:not(".fancybox-is-closing"):last'
1919 ).data('FancyBox'),
1920 o = Array.prototype.slice.call(arguments, 1);
1921 return (
1922 e instanceof b &&
1923 ('string' === n.type(t)
1924 ? e[t].apply(e, o)
1925 : 'function' === n.type(t) && t.apply(e, o),
1926 e)
1927 );
1928 },
1929 open: function (t, e, n) {
1930 return new b(t, e, n);
1931 },
1932 close: function (t) {
1933 var e = this.getInstance();
1934 e && (e.close(), !0 === t && this.close(t));
1935 },
1936 destroy: function () {
1937 this.close(!0), r.add('body').off('click.fb-start', '**');
1938 },
1939 isMobile: /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(
1940 navigator.userAgent
1941 ),
1942 use3d: (function () {
1943 var n = e.createElement('div');
1944 return (
1945 t.getComputedStyle &&
1946 t.getComputedStyle(n) &&
1947 t.getComputedStyle(n).getPropertyValue('transform') &&
1948 !(e.documentMode && e.documentMode < 11)
1949 );
1950 })(),
1951 getTranslate: function (t) {
1952 var e;
1953 return (
1954 !(!t || !t.length) &&
1955 ((e = t[0].getBoundingClientRect()),
1956 {
1957 top: e.top || 0,
1958 left: e.left || 0,
1959 width: e.width,
1960 height: e.height,
1961 opacity: parseFloat(t.css('opacity')),
1962 })
1963 );
1964 },
1965 setTranslate: function (t, e) {
1966 var n = '',
1967 o = {};
1968 if (t && e)
1969 return (
1970 (void 0 === e.left && void 0 === e.top) ||
1971 ((n =
1972 (void 0 === e.left
1973 ? t.position().left
1974 : e.left) +
1975 'px, ' +
1976 (void 0 === e.top
1977 ? t.position().top
1978 : e.top) +
1979 'px'),
1980 (n = this.use3d
1981 ? 'translate3d(' + n + ', 0px)'
1982 : 'translate(' + n + ')')),
1983 void 0 !== e.scaleX && void 0 !== e.scaleY
1984 ? (n +=
1985 ' scale(' +
1986 e.scaleX +
1987 ', ' +
1988 e.scaleY +
1989 ')')
1990 : void 0 !== e.scaleX &&
1991 (n += ' scaleX(' + e.scaleX + ')'),
1992 n.length && (o.transform = n),
1993 void 0 !== e.opacity && (o.opacity = e.opacity),
1994 void 0 !== e.width && (o.width = e.width),
1995 void 0 !== e.height && (o.height = e.height),
1996 t.css(o)
1997 );
1998 },
1999 animate: function (t, e, o, i, a) {
2000 var s,
2001 r = this;
2002 n.isFunction(o) && ((i = o), (o = null)),
2003 r.stop(t),
2004 (s = r.getTranslate(t)),
2005 t.on(f, function (c) {
2006 (!c ||
2007 !c.originalEvent ||
2008 (t.is(c.originalEvent.target) &&
2009 'z-index' !=
2010 c.originalEvent.propertyName)) &&
2011 (r.stop(t),
2012 n.isNumeric(o) &&
2013 t.css('transition-duration', ''),
2014 n.isPlainObject(e)
2015 ? void 0 !== e.scaleX &&
2016 void 0 !== e.scaleY &&
2017 r.setTranslate(t, {
2018 top: e.top,
2019 left: e.left,
2020 width: s.width * e.scaleX,
2021 height: s.height * e.scaleY,
2022 scaleX: 1,
2023 scaleY: 1,
2024 })
2025 : !0 !== a && t.removeClass(e),
2026 n.isFunction(i) && i(c));
2027 }),
2028 n.isNumeric(o) &&
2029 t.css('transition-duration', o + 'ms'),
2030 n.isPlainObject(e)
2031 ? (void 0 !== e.scaleX &&
2032 void 0 !== e.scaleY &&
2033 (delete e.width,
2034 delete e.height,
2035 t
2036 .parent()
2037 .hasClass('fancybox-slide--image') &&
2038 t
2039 .parent()
2040 .addClass('fancybox-is-scaling')),
2041 n.fancybox.setTranslate(t, e))
2042 : t.addClass(e),
2043 t.data(
2044 'timer',
2045 setTimeout(function () {
2046 t.trigger(f);
2047 }, o + 33)
2048 );
2049 },
2050 stop: function (t, e) {
2051 t &&
2052 t.length &&
2053 (clearTimeout(t.data('timer')),
2054 e && t.trigger(f),
2055 t.off(f).css('transition-duration', ''),
2056 t.parent().removeClass('fancybox-is-scaling'));
2057 },
2058 }),
2059 (n.fn.fancybox = function (t) {
2060 var e;
2061 return (
2062 (t = t || {}),
2063 (e = t.selector || !1),
2064 e
2065 ? n('body')
2066 .off('click.fb-start', e)
2067 .on('click.fb-start', e, { options: t }, i)
2068 : this.off('click.fb-start').on(
2069 'click.fb-start',
2070 { items: this, options: t },
2071 i
2072 ),
2073 this
2074 );
2075 }),
2076 r.on('click.fb-start', '[data-fancybox]', i),
2077 r.on('click.fb-start', '[data-fancybox-trigger]', function (t) {
2078 n(
2079 '[data-fancybox="' +
2080 n(this).attr('data-fancybox-trigger') +
2081 '"]'
2082 )
2083 .eq(n(this).attr('data-fancybox-index') || 0)
2084 .trigger('click.fb-start', { $trigger: n(this) });
2085 }),
2086 (function () {
2087 var t = null;
2088 r.on(
2089 'mousedown mouseup focus blur',
2090 '.fancybox-button',
2091 function (e) {
2092 switch (e.type) {
2093 case 'mousedown':
2094 t = n(this);
2095 break;
2096 case 'mouseup':
2097 t = null;
2098 break;
2099 case 'focusin':
2100 n('.fancybox-button').removeClass(
2101 'fancybox-focus'
2102 ),
2103 n(this).is(t) ||
2104 n(this).is('[disabled]') ||
2105 n(this).addClass('fancybox-focus');
2106 break;
2107 case 'focusout':
2108 n('.fancybox-button').removeClass(
2109 'fancybox-focus'
2110 );
2111 }
2112 }
2113 );
2114 })();
2115 }
2116 })(window, document, jQuery),
2117 (function (t) {
2118 'use strict';
2119 var e = {
2120 youtube: {
2121 matcher: /(youtube\.com|youtu\.be|youtube\-nocookie\.com)\/(watch\?(.*&)?v=|v\/|u\/|embed\/?)?(videoseries\?list=(.*)|[\w-]{11}|\?listType=(.*)&list=(.*))(.*)/i,
2122 params: {
2123 autoplay: 1,
2124 autohide: 1,
2125 fs: 1,
2126 rel: 0,
2127 hd: 1,
2128 wmode: 'transparent',
2129 enablejsapi: 1,
2130 html5: 1,
2131 },
2132 paramPlace: 8,
2133 type: 'iframe',
2134 url: 'https://www.youtube-nocookie.com/embed/$4',
2135 thumb: 'https://img.youtube.com/vi/$4/hqdefault.jpg',
2136 },
2137 vimeo: {
2138 matcher: /^.+vimeo.com\/(.*\/)?([\d]+)(.*)?/,
2139 params: {
2140 autoplay: 1,
2141 hd: 1,
2142 show_title: 1,
2143 show_byline: 1,
2144 show_portrait: 0,
2145 fullscreen: 1,
2146 },
2147 paramPlace: 3,
2148 type: 'iframe',
2149 url: '//player.vimeo.com/video/$2',
2150 },
2151 instagram: {
2152 matcher: /(instagr\.am|instagram\.com)\/p\/([a-zA-Z0-9_\-]+)\/?/i,
2153 type: 'image',
2154 url: '//$1/p/$2/media/?size=l',
2155 },
2156 gmap_place: {
2157 matcher: /(maps\.)?google\.([a-z]{2,3}(\.[a-z]{2})?)\/(((maps\/(place\/(.*)\/)?\@(.*),(\d+.?\d+?)z))|(\?ll=))(.*)?/i,
2158 type: 'iframe',
2159 url: function (t) {
2160 return (
2161 '//maps.google.' +
2162 t[2] +
2163 '/?ll=' +
2164 (t[9]
2165 ? t[9] +
2166 '&z=' +
2167 Math.floor(t[10]) +
2168 (t[12] ? t[12].replace(/^\//, '&') : '')
2169 : t[12] + ''
2170 ).replace(/\?/, '&') +
2171 '&output=' +
2172 (t[12] && t[12].indexOf('layer=c') > 0
2173 ? 'svembed'
2174 : 'embed')
2175 );
2176 },
2177 },
2178 gmap_search: {
2179 matcher: /(maps\.)?google\.([a-z]{2,3}(\.[a-z]{2})?)\/(maps\/search\/)(.*)/i,
2180 type: 'iframe',
2181 url: function (t) {
2182 return (
2183 '//maps.google.' +
2184 t[2] +
2185 '/maps?q=' +
2186 t[5].replace('query=', 'q=').replace('api=1', '') +
2187 '&output=embed'
2188 );
2189 },
2190 },
2191 },
2192 n = function (e, n, o) {
2193 if (e)
2194 return (
2195 (o = o || ''),
2196 'object' === t.type(o) && (o = t.param(o, !0)),
2197 t.each(n, function (t, n) {
2198 e = e.replace('$' + t, n || '');
2199 }),
2200 o.length && (e += (e.indexOf('?') > 0 ? '&' : '?') + o),
2201 e
2202 );
2203 };
2204 t(document).on('objectNeedsType.fb', function (o, i, a) {
2205 var s,
2206 r,
2207 c,
2208 l,
2209 d,
2210 u,
2211 f,
2212 p = a.src || '',
2213 h = !1;
2214 (s = t.extend(!0, {}, e, a.opts.media)),
2215 t.each(s, function (e, o) {
2216 if ((c = p.match(o.matcher))) {
2217 if (
2218 ((h = o.type),
2219 (f = e),
2220 (u = {}),
2221 o.paramPlace && c[o.paramPlace])
2222 ) {
2223 (d = c[o.paramPlace]),
2224 '?' == d[0] && (d = d.substring(1)),
2225 (d = d.split('&'));
2226 for (var i = 0; i < d.length; ++i) {
2227 var s = d[i].split('=', 2);
2228 2 == s.length &&
2229 (u[s[0]] = decodeURIComponent(
2230 s[1].replace(/\+/g, ' ')
2231 ));
2232 }
2233 }
2234 return (
2235 (l = t.extend(!0, {}, o.params, a.opts[e], u)),
2236 (p =
2237 'function' === t.type(o.url)
2238 ? o.url.call(this, c, l, a)
2239 : n(o.url, c, l)),
2240 (r =
2241 'function' === t.type(o.thumb)
2242 ? o.thumb.call(this, c, l, a)
2243 : n(o.thumb, c)),
2244 'youtube' === e
2245 ? (p = p.replace(
2246 /&t=((\d+)m)?(\d+)s/,
2247 function (t, e, n, o) {
2248 return (
2249 '&start=' +
2250 ((n
2251 ? 60 * parseInt(n, 10)
2252 : 0) +
2253 parseInt(o, 10))
2254 );
2255 }
2256 ))
2257 : 'vimeo' === e && (p = p.replace('&%23', '#')),
2258 !1
2259 );
2260 }
2261 }),
2262 h
2263 ? (a.opts.thumb ||
2264 (a.opts.$thumb && a.opts.$thumb.length) ||
2265 (a.opts.thumb = r),
2266 'iframe' === h &&
2267 (a.opts = t.extend(!0, a.opts, {
2268 iframe: {
2269 preload: !1,
2270 attr: { scrolling: 'no' },
2271 },
2272 })),
2273 t.extend(a, {
2274 type: h,
2275 src: p,
2276 origSrc: a.src,
2277 contentSource: f,
2278 contentType:
2279 'image' === h
2280 ? 'image'
2281 : 'gmap_place' == f || 'gmap_search' == f
2282 ? 'map'
2283 : 'video',
2284 }))
2285 : p && (a.type = a.opts.defaultType);
2286 });
2287 var o = {
2288 youtube: {
2289 src: 'https://www.youtube.com/iframe_api',
2290 class: 'YT',
2291 loading: !1,
2292 loaded: !1,
2293 },
2294 vimeo: {
2295 src: 'https://player.vimeo.com/api/player.js',
2296 class: 'Vimeo',
2297 loading: !1,
2298 loaded: !1,
2299 },
2300 load: function (t) {
2301 var e,
2302 n = this;
2303 if (this[t].loaded)
2304 return void setTimeout(function () {
2305 n.done(t);
2306 });
2307 this[t].loading ||
2308 ((this[t].loading = !0),
2309 (e = document.createElement('script')),
2310 (e.type = 'text/javascript'),
2311 (e.src = this[t].src),
2312 'youtube' === t
2313 ? (window.onYouTubeIframeAPIReady = function () {
2314 (n[t].loaded = !0), n.done(t);
2315 })
2316 : (e.onload = function () {
2317 (n[t].loaded = !0), n.done(t);
2318 }),
2319 document.body.appendChild(e));
2320 },
2321 done: function (e) {
2322 var n, o, i;
2323 'youtube' === e && delete window.onYouTubeIframeAPIReady,
2324 (n = t.fancybox.getInstance()) &&
2325 ((o = n.current.$content.find('iframe')),
2326 'youtube' === e && void 0 !== YT && YT
2327 ? (i = new YT.Player(o.attr('id'), {
2328 events: {
2329 onStateChange: function (t) {
2330 0 == t.data && n.next();
2331 },
2332 },
2333 }))
2334 : 'vimeo' === e &&
2335 void 0 !== Vimeo &&
2336 Vimeo &&
2337 ((i = new Vimeo.Player(o)),
2338 i.on('ended', function () {
2339 n.next();
2340 })));
2341 },
2342 };
2343 t(document).on({
2344 'afterShow.fb': function (t, e, n) {
2345 e.group.length > 1 &&
2346 ('youtube' === n.contentSource ||
2347 'vimeo' === n.contentSource) &&
2348 o.load(n.contentSource);
2349 },
2350 });
2351 })(jQuery),
2352 (function (t, e, n) {
2353 'use strict';
2354 var o = (function () {
2355 return (
2356 t.requestAnimationFrame ||
2357 t.webkitRequestAnimationFrame ||
2358 t.mozRequestAnimationFrame ||
2359 t.oRequestAnimationFrame ||
2360 function (e) {
2361 return t.setTimeout(e, 1e3 / 60);
2362 }
2363 );
2364 })(),
2365 i = (function () {
2366 return (
2367 t.cancelAnimationFrame ||
2368 t.webkitCancelAnimationFrame ||
2369 t.mozCancelAnimationFrame ||
2370 t.oCancelAnimationFrame ||
2371 function (e) {
2372 t.clearTimeout(e);
2373 }
2374 );
2375 })(),
2376 a = function (e) {
2377 var n = [];
2378 (e = e.originalEvent || e || t.e),
2379 (e =
2380 e.touches && e.touches.length
2381 ? e.touches
2382 : e.changedTouches && e.changedTouches.length
2383 ? e.changedTouches
2384 : [e]);
2385 for (var o in e)
2386 e[o].pageX
2387 ? n.push({ x: e[o].pageX, y: e[o].pageY })
2388 : e[o].clientX &&
2389 n.push({ x: e[o].clientX, y: e[o].clientY });
2390 return n;
2391 },
2392 s = function (t, e, n) {
2393 return e && t
2394 ? 'x' === n
2395 ? t.x - e.x
2396 : 'y' === n
2397 ? t.y - e.y
2398 : Math.sqrt(
2399 Math.pow(t.x - e.x, 2) + Math.pow(t.y - e.y, 2)
2400 )
2401 : 0;
2402 },
2403 r = function (t) {
2404 if (
2405 t.is(
2406 'a,area,button,[role="button"],input,label,select,summary,textarea,video,audio,iframe'
2407 ) ||
2408 n.isFunction(t.get(0).onclick) ||
2409 t.data('selectable')
2410 )
2411 return !0;
2412 for (var e = 0, o = t[0].attributes, i = o.length; e < i; e++)
2413 if ('data-fancybox-' === o[e].nodeName.substr(0, 14))
2414 return !0;
2415 return !1;
2416 },
2417 c = function (e) {
2418 var n = t.getComputedStyle(e)['overflow-y'],
2419 o = t.getComputedStyle(e)['overflow-x'],
2420 i =
2421 ('scroll' === n || 'auto' === n) &&
2422 e.scrollHeight > e.clientHeight,
2423 a =
2424 ('scroll' === o || 'auto' === o) &&
2425 e.scrollWidth > e.clientWidth;
2426 return i || a;
2427 },
2428 l = function (t) {
2429 for (var e = !1; ; ) {
2430 if ((e = c(t.get(0)))) break;
2431 if (
2432 ((t = t.parent()),
2433 !t.length ||
2434 t.hasClass('fancybox-stage') ||
2435 t.is('body'))
2436 )
2437 break;
2438 }
2439 return e;
2440 },
2441 d = function (t) {
2442 var e = this;
2443 (e.instance = t),
2444 (e.$bg = t.$refs.bg),
2445 (e.$stage = t.$refs.stage),
2446 (e.$container = t.$refs.container),
2447 e.destroy(),
2448 e.$container.on(
2449 'touchstart.fb.touch mousedown.fb.touch',
2450 n.proxy(e, 'ontouchstart')
2451 );
2452 };
2453 (d.prototype.destroy = function () {
2454 var t = this;
2455 t.$container.off('.fb.touch'),
2456 n(e).off('.fb.touch'),
2457 t.requestId && (i(t.requestId), (t.requestId = null)),
2458 t.tapped && (clearTimeout(t.tapped), (t.tapped = null));
2459 }),
2460 (d.prototype.ontouchstart = function (o) {
2461 var i = this,
2462 c = n(o.target),
2463 d = i.instance,
2464 u = d.current,
2465 f = u.$slide,
2466 p = u.$content,
2467 h = 'touchstart' == o.type;
2468 if (
2469 (h && i.$container.off('mousedown.fb.touch'),
2470 (!o.originalEvent || 2 != o.originalEvent.button) &&
2471 f.length &&
2472 c.length &&
2473 !r(c) &&
2474 !r(c.parent()) &&
2475 (c.is('img') ||
2476 !(
2477 o.originalEvent.clientX >
2478 c[0].clientWidth + c.offset().left
2479 )))
2480 ) {
2481 if (
2482 !u ||
2483 d.isAnimating ||
2484 u.$slide.hasClass('fancybox-animated')
2485 )
2486 return o.stopPropagation(), void o.preventDefault();
2487 (i.realPoints = i.startPoints = a(o)),
2488 i.startPoints.length &&
2489 (u.touch && o.stopPropagation(),
2490 (i.startEvent = o),
2491 (i.canTap = !0),
2492 (i.$target = c),
2493 (i.$content = p),
2494 (i.opts = u.opts.touch),
2495 (i.isPanning = !1),
2496 (i.isSwiping = !1),
2497 (i.isZooming = !1),
2498 (i.isScrolling = !1),
2499 (i.canPan = d.canPan()),
2500 (i.startTime = new Date().getTime()),
2501 (i.distanceX = i.distanceY = i.distance = 0),
2502 (i.canvasWidth = Math.round(f[0].clientWidth)),
2503 (i.canvasHeight = Math.round(f[0].clientHeight)),
2504 (i.contentLastPos = null),
2505 (i.contentStartPos = n.fancybox.getTranslate(
2506 i.$content
2507 ) || { top: 0, left: 0 }),
2508 (i.sliderStartPos = n.fancybox.getTranslate(f)),
2509 (i.stagePos = n.fancybox.getTranslate(
2510 d.$refs.stage
2511 )),
2512 (i.sliderStartPos.top -= i.stagePos.top),
2513 (i.sliderStartPos.left -= i.stagePos.left),
2514 (i.contentStartPos.top -= i.stagePos.top),
2515 (i.contentStartPos.left -= i.stagePos.left),
2516 n(e)
2517 .off('.fb.touch')
2518 .on(
2519 h
2520 ? 'touchend.fb.touch touchcancel.fb.touch'
2521 : 'mouseup.fb.touch mouseleave.fb.touch',
2522 n.proxy(i, 'ontouchend')
2523 )
2524 .on(
2525 h
2526 ? 'touchmove.fb.touch'
2527 : 'mousemove.fb.touch',
2528 n.proxy(i, 'ontouchmove')
2529 ),
2530 n.fancybox.isMobile &&
2531 e.addEventListener('scroll', i.onscroll, !0),
2532 (((i.opts || i.canPan) &&
2533 (c.is(i.$stage) || i.$stage.find(c).length)) ||
2534 (c.is('.fancybox-image') && o.preventDefault(),
2535 n.fancybox.isMobile &&
2536 c.parents('.fancybox-caption').length)) &&
2537 ((i.isScrollable = l(c) || l(c.parent())),
2538 (n.fancybox.isMobile && i.isScrollable) ||
2539 o.preventDefault(),
2540 (1 === i.startPoints.length || u.hasError) &&
2541 (i.canPan
2542 ? (n.fancybox.stop(i.$content),
2543 (i.isPanning = !0))
2544 : (i.isSwiping = !0),
2545 i.$container.addClass(
2546 'fancybox-is-grabbing'
2547 )),
2548 2 === i.startPoints.length &&
2549 'image' === u.type &&
2550 (u.isLoaded || u.$ghost) &&
2551 ((i.canTap = !1),
2552 (i.isSwiping = !1),
2553 (i.isPanning = !1),
2554 (i.isZooming = !0),
2555 n.fancybox.stop(i.$content),
2556 (i.centerPointStartX =
2557 0.5 *
2558 (i.startPoints[0].x +
2559 i.startPoints[1].x) -
2560 n(t).scrollLeft()),
2561 (i.centerPointStartY =
2562 0.5 *
2563 (i.startPoints[0].y +
2564 i.startPoints[1].y) -
2565 n(t).scrollTop()),
2566 (i.percentageOfImageAtPinchPointX =
2567 (i.centerPointStartX -
2568 i.contentStartPos.left) /
2569 i.contentStartPos.width),
2570 (i.percentageOfImageAtPinchPointY =
2571 (i.centerPointStartY -
2572 i.contentStartPos.top) /
2573 i.contentStartPos.height),
2574 (i.startDistanceBetweenFingers = s(
2575 i.startPoints[0],
2576 i.startPoints[1]
2577 )))));
2578 }
2579 }),
2580 (d.prototype.onscroll = function (t) {
2581 var n = this;
2582 (n.isScrolling = !0),
2583 e.removeEventListener('scroll', n.onscroll, !0);
2584 }),
2585 (d.prototype.ontouchmove = function (t) {
2586 var e = this;
2587 return void 0 !== t.originalEvent.buttons &&
2588 0 === t.originalEvent.buttons
2589 ? void e.ontouchend(t)
2590 : e.isScrolling
2591 ? void (e.canTap = !1)
2592 : ((e.newPoints = a(t)),
2593 void (
2594 (e.opts || e.canPan) &&
2595 e.newPoints.length &&
2596 e.newPoints.length &&
2597 ((e.isSwiping && !0 === e.isSwiping) ||
2598 t.preventDefault(),
2599 (e.distanceX = s(
2600 e.newPoints[0],
2601 e.startPoints[0],
2602 'x'
2603 )),
2604 (e.distanceY = s(
2605 e.newPoints[0],
2606 e.startPoints[0],
2607 'y'
2608 )),
2609 (e.distance = s(e.newPoints[0], e.startPoints[0])),
2610 e.distance > 0 &&
2611 (e.isSwiping
2612 ? e.onSwipe(t)
2613 : e.isPanning
2614 ? e.onPan()
2615 : e.isZooming && e.onZoom()))
2616 ));
2617 }),
2618 (d.prototype.onSwipe = function (e) {
2619 var a,
2620 s = this,
2621 r = s.instance,
2622 c = s.isSwiping,
2623 l = s.sliderStartPos.left || 0;
2624 if (!0 !== c)
2625 'x' == c &&
2626 (s.distanceX > 0 &&
2627 (s.instance.group.length < 2 ||
2628 (0 === s.instance.current.index &&
2629 !s.instance.current.opts.loop))
2630 ? (l += Math.pow(s.distanceX, 0.8))
2631 : s.distanceX < 0 &&
2632 (s.instance.group.length < 2 ||
2633 (s.instance.current.index ===
2634 s.instance.group.length - 1 &&
2635 !s.instance.current.opts.loop))
2636 ? (l -= Math.pow(-s.distanceX, 0.8))
2637 : (l += s.distanceX)),
2638 (s.sliderLastPos = {
2639 top:
2640 'x' == c
2641 ? 0
2642 : s.sliderStartPos.top + s.distanceY,
2643 left: l,
2644 }),
2645 s.requestId && (i(s.requestId), (s.requestId = null)),
2646 (s.requestId = o(function () {
2647 s.sliderLastPos &&
2648 (n.each(s.instance.slides, function (t, e) {
2649 var o = e.pos - s.instance.currPos;
2650 n.fancybox.setTranslate(e.$slide, {
2651 top: s.sliderLastPos.top,
2652 left:
2653 s.sliderLastPos.left +
2654 o * s.canvasWidth +
2655 o * e.opts.gutter,
2656 });
2657 }),
2658 s.$container.addClass('fancybox-is-sliding'));
2659 }));
2660 else if (Math.abs(s.distance) > 10) {
2661 if (
2662 ((s.canTap = !1),
2663 r.group.length < 2 && s.opts.vertical
2664 ? (s.isSwiping = 'y')
2665 : r.isDragging ||
2666 !1 === s.opts.vertical ||
2667 ('auto' === s.opts.vertical && n(t).width() > 800)
2668 ? (s.isSwiping = 'x')
2669 : ((a = Math.abs(
2670 (180 *
2671 Math.atan2(s.distanceY, s.distanceX)) /
2672 Math.PI
2673 )),
2674 (s.isSwiping = a > 45 && a < 135 ? 'y' : 'x')),
2675 'y' === s.isSwiping &&
2676 n.fancybox.isMobile &&
2677 s.isScrollable)
2678 )
2679 return void (s.isScrolling = !0);
2680 (r.isDragging = s.isSwiping),
2681 (s.startPoints = s.newPoints),
2682 n.each(r.slides, function (t, e) {
2683 var o, i;
2684 n.fancybox.stop(e.$slide),
2685 (o = n.fancybox.getTranslate(e.$slide)),
2686 (i = n.fancybox.getTranslate(r.$refs.stage)),
2687 e.$slide
2688 .css({
2689 transform: '',
2690 opacity: '',
2691 'transition-duration': '',
2692 })
2693 .removeClass('fancybox-animated')
2694 .removeClass(function (t, e) {
2695 return (
2696 e.match(/(^|\s)fancybox-fx-\S+/g) ||
2697 []
2698 ).join(' ');
2699 }),
2700 e.pos === r.current.pos &&
2701 ((s.sliderStartPos.top = o.top - i.top),
2702 (s.sliderStartPos.left = o.left - i.left)),
2703 n.fancybox.setTranslate(e.$slide, {
2704 top: o.top - i.top,
2705 left: o.left - i.left,
2706 });
2707 }),
2708 r.SlideShow &&
2709 r.SlideShow.isActive &&
2710 r.SlideShow.stop();
2711 }
2712 }),
2713 (d.prototype.onPan = function () {
2714 var t = this;
2715 if (
2716 s(t.newPoints[0], t.realPoints[0]) <
2717 (n.fancybox.isMobile ? 10 : 5)
2718 )
2719 return void (t.startPoints = t.newPoints);
2720 (t.canTap = !1),
2721 (t.contentLastPos = t.limitMovement()),
2722 t.requestId && i(t.requestId),
2723 (t.requestId = o(function () {
2724 n.fancybox.setTranslate(t.$content, t.contentLastPos);
2725 }));
2726 }),
2727 (d.prototype.limitMovement = function () {
2728 var t,
2729 e,
2730 n,
2731 o,
2732 i,
2733 a,
2734 s = this,
2735 r = s.canvasWidth,
2736 c = s.canvasHeight,
2737 l = s.distanceX,
2738 d = s.distanceY,
2739 u = s.contentStartPos,
2740 f = u.left,
2741 p = u.top,
2742 h = u.width,
2743 g = u.height;
2744 return (
2745 (i = h > r ? f + l : f),
2746 (a = p + d),
2747 (t = Math.max(0, 0.5 * r - 0.5 * h)),
2748 (e = Math.max(0, 0.5 * c - 0.5 * g)),
2749 (n = Math.min(r - h, 0.5 * r - 0.5 * h)),
2750 (o = Math.min(c - g, 0.5 * c - 0.5 * g)),
2751 l > 0 &&
2752 i > t &&
2753 (i = t - 1 + Math.pow(-t + f + l, 0.8) || 0),
2754 l < 0 &&
2755 i < n &&
2756 (i = n + 1 - Math.pow(n - f - l, 0.8) || 0),
2757 d > 0 &&
2758 a > e &&
2759 (a = e - 1 + Math.pow(-e + p + d, 0.8) || 0),
2760 d < 0 &&
2761 a < o &&
2762 (a = o + 1 - Math.pow(o - p - d, 0.8) || 0),
2763 { top: a, left: i }
2764 );
2765 }),
2766 (d.prototype.limitPosition = function (t, e, n, o) {
2767 var i = this,
2768 a = i.canvasWidth,
2769 s = i.canvasHeight;
2770 return (
2771 n > a
2772 ? ((t = t > 0 ? 0 : t), (t = t < a - n ? a - n : t))
2773 : (t = Math.max(0, a / 2 - n / 2)),
2774 o > s
2775 ? ((e = e > 0 ? 0 : e), (e = e < s - o ? s - o : e))
2776 : (e = Math.max(0, s / 2 - o / 2)),
2777 { top: e, left: t }
2778 );
2779 }),
2780 (d.prototype.onZoom = function () {
2781 var e = this,
2782 a = e.contentStartPos,
2783 r = a.width,
2784 c = a.height,
2785 l = a.left,
2786 d = a.top,
2787 u = s(e.newPoints[0], e.newPoints[1]),
2788 f = u / e.startDistanceBetweenFingers,
2789 p = Math.floor(r * f),
2790 h = Math.floor(c * f),
2791 g = (r - p) * e.percentageOfImageAtPinchPointX,
2792 b = (c - h) * e.percentageOfImageAtPinchPointY,
2793 m =
2794 (e.newPoints[0].x + e.newPoints[1].x) / 2 -
2795 n(t).scrollLeft(),
2796 v =
2797 (e.newPoints[0].y + e.newPoints[1].y) / 2 -
2798 n(t).scrollTop(),
2799 y = m - e.centerPointStartX,
2800 x = v - e.centerPointStartY,
2801 w = l + (g + y),
2802 $ = d + (b + x),
2803 S = { top: $, left: w, scaleX: f, scaleY: f };
2804 (e.canTap = !1),
2805 (e.newWidth = p),
2806 (e.newHeight = h),
2807 (e.contentLastPos = S),
2808 e.requestId && i(e.requestId),
2809 (e.requestId = o(function () {
2810 n.fancybox.setTranslate(e.$content, e.contentLastPos);
2811 }));
2812 }),
2813 (d.prototype.ontouchend = function (t) {
2814 var o = this,
2815 s = o.isSwiping,
2816 r = o.isPanning,
2817 c = o.isZooming,
2818 l = o.isScrolling;
2819 if (
2820 ((o.endPoints = a(t)),
2821 (o.dMs = Math.max(new Date().getTime() - o.startTime, 1)),
2822 o.$container.removeClass('fancybox-is-grabbing'),
2823 n(e).off('.fb.touch'),
2824 e.removeEventListener('scroll', o.onscroll, !0),
2825 o.requestId && (i(o.requestId), (o.requestId = null)),
2826 (o.isSwiping = !1),
2827 (o.isPanning = !1),
2828 (o.isZooming = !1),
2829 (o.isScrolling = !1),
2830 (o.instance.isDragging = !1),
2831 o.canTap)
2832 )
2833 return o.onTap(t);
2834 (o.speed = 100),
2835 (o.velocityX = (o.distanceX / o.dMs) * 0.5),
2836 (o.velocityY = (o.distanceY / o.dMs) * 0.5),
2837 r
2838 ? o.endPanning()
2839 : c
2840 ? o.endZooming()
2841 : o.endSwiping(s, l);
2842 }),
2843 (d.prototype.endSwiping = function (t, e) {
2844 var o = this,
2845 i = !1,
2846 a = o.instance.group.length,
2847 s = Math.abs(o.distanceX),
2848 r =
2849 'x' == t &&
2850 a > 1 &&
2851 ((o.dMs > 130 && s > 10) || s > 50);
2852 (o.sliderLastPos = null),
2853 'y' == t && !e && Math.abs(o.distanceY) > 50
2854 ? (n.fancybox.animate(
2855 o.instance.current.$slide,
2856 {
2857 top:
2858 o.sliderStartPos.top +
2859 o.distanceY +
2860 150 * o.velocityY,
2861 opacity: 0,
2862 },
2863 200
2864 ),
2865 (i = o.instance.close(!0, 250)))
2866 : r && o.distanceX > 0
2867 ? (i = o.instance.previous(300))
2868 : r && o.distanceX < 0 && (i = o.instance.next(300)),
2869 !1 !== i ||
2870 ('x' != t && 'y' != t) ||
2871 o.instance.centerSlide(200),
2872 o.$container.removeClass('fancybox-is-sliding');
2873 }),
2874 (d.prototype.endPanning = function () {
2875 var t,
2876 e,
2877 o,
2878 i = this;
2879 i.contentLastPos &&
2880 (!1 === i.opts.momentum || i.dMs > 350
2881 ? ((t = i.contentLastPos.left),
2882 (e = i.contentLastPos.top))
2883 : ((t = i.contentLastPos.left + 500 * i.velocityX),
2884 (e = i.contentLastPos.top + 500 * i.velocityY)),
2885 (o = i.limitPosition(
2886 t,
2887 e,
2888 i.contentStartPos.width,
2889 i.contentStartPos.height
2890 )),
2891 (o.width = i.contentStartPos.width),
2892 (o.height = i.contentStartPos.height),
2893 n.fancybox.animate(i.$content, o, 366));
2894 }),
2895 (d.prototype.endZooming = function () {
2896 var t,
2897 e,
2898 o,
2899 i,
2900 a = this,
2901 s = a.instance.current,
2902 r = a.newWidth,
2903 c = a.newHeight;
2904 a.contentLastPos &&
2905 ((t = a.contentLastPos.left),
2906 (e = a.contentLastPos.top),
2907 (i = {
2908 top: e,
2909 left: t,
2910 width: r,
2911 height: c,
2912 scaleX: 1,
2913 scaleY: 1,
2914 }),
2915 n.fancybox.setTranslate(a.$content, i),
2916 r < a.canvasWidth && c < a.canvasHeight
2917 ? a.instance.scaleToFit(150)
2918 : r > s.width || c > s.height
2919 ? a.instance.scaleToActual(
2920 a.centerPointStartX,
2921 a.centerPointStartY,
2922 150
2923 )
2924 : ((o = a.limitPosition(t, e, r, c)),
2925 n.fancybox.animate(a.$content, o, 150)));
2926 }),
2927 (d.prototype.onTap = function (e) {
2928 var o,
2929 i = this,
2930 s = n(e.target),
2931 r = i.instance,
2932 c = r.current,
2933 l = (e && a(e)) || i.startPoints,
2934 d = l[0] ? l[0].x - n(t).scrollLeft() - i.stagePos.left : 0,
2935 u = l[0] ? l[0].y - n(t).scrollTop() - i.stagePos.top : 0,
2936 f = function (t) {
2937 var o = c.opts[t];
2938 if ((n.isFunction(o) && (o = o.apply(r, [c, e])), o))
2939 switch (o) {
2940 case 'close':
2941 r.close(i.startEvent);
2942 break;
2943 case 'toggleControls':
2944 r.toggleControls();
2945 break;
2946 case 'next':
2947 r.next();
2948 break;
2949 case 'nextOrClose':
2950 r.group.length > 1
2951 ? r.next()
2952 : r.close(i.startEvent);
2953 break;
2954 case 'zoom':
2955 'image' == c.type &&
2956 (c.isLoaded || c.$ghost) &&
2957 (r.canPan()
2958 ? r.scaleToFit()
2959 : r.isScaledDown()
2960 ? r.scaleToActual(d, u)
2961 : r.group.length < 2 &&
2962 r.close(i.startEvent));
2963 }
2964 };
2965 if (
2966 (!e.originalEvent || 2 != e.originalEvent.button) &&
2967 (s.is('img') || !(d > s[0].clientWidth + s.offset().left))
2968 ) {
2969 if (
2970 s.is(
2971 '.fancybox-bg,.fancybox-inner,.fancybox-outer,.fancybox-container'
2972 )
2973 )
2974 o = 'Outside';
2975 else if (s.is('.fancybox-slide')) o = 'Slide';
2976 else {
2977 if (
2978 !r.current.$content ||
2979 !r.current.$content.find(s).addBack().filter(s)
2980 .length
2981 )
2982 return;
2983 o = 'Content';
2984 }
2985 if (i.tapped) {
2986 if (
2987 (clearTimeout(i.tapped),
2988 (i.tapped = null),
2989 Math.abs(d - i.tapX) > 50 ||
2990 Math.abs(u - i.tapY) > 50)
2991 )
2992 return this;
2993 f('dblclick' + o);
2994 } else
2995 (i.tapX = d),
2996 (i.tapY = u),
2997 c.opts['dblclick' + o] &&
2998 c.opts['dblclick' + o] !== c.opts['click' + o]
2999 ? (i.tapped = setTimeout(function () {
3000 (i.tapped = null),
3001 r.isAnimating || f('click' + o);
3002 }, 500))
3003 : f('click' + o);
3004 return this;
3005 }
3006 }),
3007 n(e)
3008 .on('onActivate.fb', function (t, e) {
3009 e && !e.Guestures && (e.Guestures = new d(e));
3010 })
3011 .on('beforeClose.fb', function (t, e) {
3012 e && e.Guestures && e.Guestures.destroy();
3013 });
3014 })(window, document, jQuery),
3015 (function (t, e) {
3016 'use strict';
3017 e.extend(!0, e.fancybox.defaults, {
3018 btnTpl: {
3019 slideShow:
3020 '<button data-fancybox-play class="fancybox-button fancybox-button--play" title="{{PLAY_START}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M6.5 5.4v13.2l11-6.6z"/></svg><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M8.33 5.75h2.2v12.5h-2.2V5.75zm5.15 0h2.2v12.5h-2.2V5.75z"/></svg></button>',
3021 },
3022 slideShow: { autoStart: !1, speed: 3e3, progress: !0 },
3023 });
3024 var n = function (t) {
3025 (this.instance = t), this.init();
3026 };
3027 e.extend(n.prototype, {
3028 timer: null,
3029 isActive: !1,
3030 $button: null,
3031 init: function () {
3032 var t = this,
3033 n = t.instance,
3034 o = n.group[n.currIndex].opts.slideShow;
3035 (t.$button = n.$refs.toolbar
3036 .find('[data-fancybox-play]')
3037 .on('click', function () {
3038 t.toggle();
3039 })),
3040 n.group.length < 2 || !o
3041 ? t.$button.hide()
3042 : o.progress &&
3043 (t.$progress = e(
3044 '<div class="fancybox-progress"></div>'
3045 ).appendTo(n.$refs.inner));
3046 },
3047 set: function (t) {
3048 var n = this,
3049 o = n.instance,
3050 i = o.current;
3051 i &&
3052 (!0 === t || i.opts.loop || o.currIndex < o.group.length - 1)
3053 ? n.isActive &&
3054 'video' !== i.contentType &&
3055 (n.$progress &&
3056 e.fancybox.animate(
3057 n.$progress.show(),
3058 { scaleX: 1 },
3059 i.opts.slideShow.speed
3060 ),
3061 (n.timer = setTimeout(function () {
3062 o.current.opts.loop ||
3063 o.current.index != o.group.length - 1
3064 ? o.next()
3065 : o.jumpTo(0);
3066 }, i.opts.slideShow.speed)))
3067 : (n.stop(), (o.idleSecondsCounter = 0), o.showControls());
3068 },
3069 clear: function () {
3070 var t = this;
3071 clearTimeout(t.timer),
3072 (t.timer = null),
3073 t.$progress && t.$progress.removeAttr('style').hide();
3074 },
3075 start: function () {
3076 var t = this,
3077 e = t.instance.current;
3078 e &&
3079 (t.$button
3080 .attr(
3081 'title',
3082 (e.opts.i18n[e.opts.lang] || e.opts.i18n.en)
3083 .PLAY_STOP
3084 )
3085 .removeClass('fancybox-button--play')
3086 .addClass('fancybox-button--pause'),
3087 (t.isActive = !0),
3088 e.isComplete && t.set(!0),
3089 t.instance.trigger('onSlideShowChange', !0));
3090 },
3091 stop: function () {
3092 var t = this,
3093 e = t.instance.current;
3094 t.clear(),
3095 t.$button
3096 .attr(
3097 'title',
3098 (e.opts.i18n[e.opts.lang] || e.opts.i18n.en)
3099 .PLAY_START
3100 )
3101 .removeClass('fancybox-button--pause')
3102 .addClass('fancybox-button--play'),
3103 (t.isActive = !1),
3104 t.instance.trigger('onSlideShowChange', !1),
3105 t.$progress && t.$progress.removeAttr('style').hide();
3106 },
3107 toggle: function () {
3108 var t = this;
3109 t.isActive ? t.stop() : t.start();
3110 },
3111 }),
3112 e(t).on({
3113 'onInit.fb': function (t, e) {
3114 e && !e.SlideShow && (e.SlideShow = new n(e));
3115 },
3116 'beforeShow.fb': function (t, e, n, o) {
3117 var i = e && e.SlideShow;
3118 o
3119 ? i && n.opts.slideShow.autoStart && i.start()
3120 : i && i.isActive && i.clear();
3121 },
3122 'afterShow.fb': function (t, e, n) {
3123 var o = e && e.SlideShow;
3124 o && o.isActive && o.set();
3125 },
3126 'afterKeydown.fb': function (n, o, i, a, s) {
3127 var r = o && o.SlideShow;
3128 !r ||
3129 !i.opts.slideShow ||
3130 (80 !== s && 32 !== s) ||
3131 e(t.activeElement).is('button,a,input') ||
3132 (a.preventDefault(), r.toggle());
3133 },
3134 'beforeClose.fb onDeactivate.fb': function (t, e) {
3135 var n = e && e.SlideShow;
3136 n && n.stop();
3137 },
3138 }),
3139 e(t).on('visibilitychange', function () {
3140 var n = e.fancybox.getInstance(),
3141 o = n && n.SlideShow;
3142 o && o.isActive && (t.hidden ? o.clear() : o.set());
3143 });
3144 })(document, jQuery),
3145 (function (t, e) {
3146 'use strict';
3147 var n = (function () {
3148 for (
3149 var e = [
3150 [
3151 'requestFullscreen',
3152 'exitFullscreen',
3153 'fullscreenElement',
3154 'fullscreenEnabled',
3155 'fullscreenchange',
3156 'fullscreenerror',
3157 ],
3158 [
3159 'webkitRequestFullscreen',
3160 'webkitExitFullscreen',
3161 'webkitFullscreenElement',
3162 'webkitFullscreenEnabled',
3163 'webkitfullscreenchange',
3164 'webkitfullscreenerror',
3165 ],
3166 [
3167 'webkitRequestFullScreen',
3168 'webkitCancelFullScreen',
3169 'webkitCurrentFullScreenElement',
3170 'webkitCancelFullScreen',
3171 'webkitfullscreenchange',
3172 'webkitfullscreenerror',
3173 ],
3174 [
3175 'mozRequestFullScreen',
3176 'mozCancelFullScreen',
3177 'mozFullScreenElement',
3178 'mozFullScreenEnabled',
3179 'mozfullscreenchange',
3180 'mozfullscreenerror',
3181 ],
3182 [
3183 'msRequestFullscreen',
3184 'msExitFullscreen',
3185 'msFullscreenElement',
3186 'msFullscreenEnabled',
3187 'MSFullscreenChange',
3188 'MSFullscreenError',
3189 ],
3190 ],
3191 n = {},
3192 o = 0;
3193 o < e.length;
3194 o++
3195 ) {
3196 var i = e[o];
3197 if (i && i[1] in t) {
3198 for (var a = 0; a < i.length; a++) n[e[0][a]] = i[a];
3199 return n;
3200 }
3201 }
3202 return !1;
3203 })();
3204 if (n) {
3205 var o = {
3206 request: function (e) {
3207 (e = e || t.documentElement),
3208 e[n.requestFullscreen](e.ALLOW_KEYBOARD_INPUT);
3209 },
3210 exit: function () {
3211 t[n.exitFullscreen]();
3212 },
3213 toggle: function (e) {
3214 (e = e || t.documentElement),
3215 this.isFullscreen() ? this.exit() : this.request(e);
3216 },
3217 isFullscreen: function () {
3218 return Boolean(t[n.fullscreenElement]);
3219 },
3220 enabled: function () {
3221 return Boolean(t[n.fullscreenEnabled]);
3222 },
3223 };
3224 e.extend(!0, e.fancybox.defaults, {
3225 btnTpl: {
3226 fullScreen:
3227 '<button data-fancybox-fullscreen class="fancybox-button fancybox-button--fsenter" title="{{FULL_SCREEN}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"/></svg><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M5 16h3v3h2v-5H5zm3-8H5v2h5V5H8zm6 11h2v-3h3v-2h-5zm2-11V5h-2v5h5V8z"/></svg></button>',
3228 },
3229 fullScreen: { autoStart: !1 },
3230 }),
3231 e(t).on(n.fullscreenchange, function () {
3232 var t = o.isFullscreen(),
3233 n = e.fancybox.getInstance();
3234 n &&
3235 (n.current &&
3236 'image' === n.current.type &&
3237 n.isAnimating &&
3238 ((n.isAnimating = !1),
3239 n.update(!0, !0, 0),
3240 n.isComplete || n.complete()),
3241 n.trigger('onFullscreenChange', t),
3242 n.$refs.container.toggleClass(
3243 'fancybox-is-fullscreen',
3244 t
3245 ),
3246 n.$refs.toolbar
3247 .find('[data-fancybox-fullscreen]')
3248 .toggleClass('fancybox-button--fsenter', !t)
3249 .toggleClass('fancybox-button--fsexit', t));
3250 });
3251 }
3252 e(t).on({
3253 'onInit.fb': function (t, e) {
3254 var i;
3255 if (!n)
3256 return void e.$refs.toolbar
3257 .find('[data-fancybox-fullscreen]')
3258 .remove();
3259 e && e.group[e.currIndex].opts.fullScreen
3260 ? ((i = e.$refs.container),
3261 i.on(
3262 'click.fb-fullscreen',
3263 '[data-fancybox-fullscreen]',
3264 function (t) {
3265 t.stopPropagation(),
3266 t.preventDefault(),
3267 o.toggle();
3268 }
3269 ),
3270 e.opts.fullScreen &&
3271 !0 === e.opts.fullScreen.autoStart &&
3272 o.request(),
3273 (e.FullScreen = o))
3274 : e &&
3275 e.$refs.toolbar.find('[data-fancybox-fullscreen]').hide();
3276 },
3277 'afterKeydown.fb': function (t, e, n, o, i) {
3278 e &&
3279 e.FullScreen &&
3280 70 === i &&
3281 (o.preventDefault(), e.FullScreen.toggle());
3282 },
3283 'beforeClose.fb': function (t, e) {
3284 e &&
3285 e.FullScreen &&
3286 e.$refs.container.hasClass('fancybox-is-fullscreen') &&
3287 o.exit();
3288 },
3289 });
3290 })(document, jQuery),
3291 (function (t, e) {
3292 'use strict';
3293 var n = 'fancybox-thumbs';
3294 e.fancybox.defaults = e.extend(
3295 !0,
3296 {
3297 btnTpl: {
3298 thumbs:
3299 '<button data-fancybox-thumbs class="fancybox-button fancybox-button--thumbs" title="{{THUMBS}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M14.59 14.59h3.76v3.76h-3.76v-3.76zm-4.47 0h3.76v3.76h-3.76v-3.76zm-4.47 0h3.76v3.76H5.65v-3.76zm8.94-4.47h3.76v3.76h-3.76v-3.76zm-4.47 0h3.76v3.76h-3.76v-3.76zm-4.47 0h3.76v3.76H5.65v-3.76zm8.94-4.47h3.76v3.76h-3.76V5.65zm-4.47 0h3.76v3.76h-3.76V5.65zm-4.47 0h3.76v3.76H5.65V5.65z"/></svg></button>',
3300 },
3301 thumbs: {
3302 autoStart: !1,
3303 hideOnClose: !0,
3304 parentEl: '.fancybox-container',
3305 axis: 'y',
3306 },
3307 },
3308 e.fancybox.defaults
3309 );
3310 var o = function (t) {
3311 this.init(t);
3312 };
3313 e.extend(o.prototype, {
3314 $button: null,
3315 $grid: null,
3316 $list: null,
3317 isVisible: !1,
3318 isActive: !1,
3319 init: function (t) {
3320 var e = this,
3321 n = t.group,
3322 o = 0;
3323 (e.instance = t),
3324 (e.opts = n[t.currIndex].opts.thumbs),
3325 (t.Thumbs = e),
3326 (e.$button = t.$refs.toolbar.find(
3327 '[data-fancybox-thumbs]'
3328 ));
3329 for (
3330 var i = 0, a = n.length;
3331 i < a && (n[i].thumb && o++, !(o > 1));
3332 i++
3333 );
3334 o > 1 && e.opts
3335 ? (e.$button.removeAttr('style').on('click', function () {
3336 e.toggle();
3337 }),
3338 (e.isActive = !0))
3339 : e.$button.hide();
3340 },
3341 create: function () {
3342 var t,
3343 o = this,
3344 i = o.instance,
3345 a = o.opts.parentEl,
3346 s = [];
3347 o.$grid ||
3348 ((o.$grid = e(
3349 '<div class="' +
3350 n +
3351 ' ' +
3352 n +
3353 '-' +
3354 o.opts.axis +
3355 '"></div>'
3356 ).appendTo(i.$refs.container.find(a).addBack().filter(a))),
3357 o.$grid.on('click', 'a', function () {
3358 i.jumpTo(e(this).attr('data-index'));
3359 })),
3360 o.$list ||
3361 (o.$list = e('<div class="' + n + '__list">').appendTo(
3362 o.$grid
3363 )),
3364 e.each(i.group, function (e, n) {
3365 (t = n.thumb),
3366 t || 'image' !== n.type || (t = n.src),
3367 s.push(
3368 '<a href="javascript:;" tabindex="0" data-index="' +
3369 e +
3370 '"' +
3371 (t && t.length
3372 ? ' style="background-image:url(' +
3373 t +
3374 ')"'
3375 : 'class="fancybox-thumbs-missing"') +
3376 '></a>'
3377 );
3378 }),
3379 (o.$list[0].innerHTML = s.join('')),
3380 'x' === o.opts.axis &&
3381 o.$list.width(
3382 parseInt(o.$grid.css('padding-right'), 10) +
3383 i.group.length *
3384 o.$list.children().eq(0).outerWidth(!0)
3385 );
3386 },
3387 focus: function (t) {
3388 var e,
3389 n,
3390 o = this,
3391 i = o.$list,
3392 a = o.$grid;
3393 o.instance.current &&
3394 ((e = i
3395 .children()
3396 .removeClass('fancybox-thumbs-active')
3397 .filter(
3398 '[data-index="' + o.instance.current.index + '"]'
3399 )
3400 .addClass('fancybox-thumbs-active')),
3401 (n = e.position()),
3402 'y' === o.opts.axis &&
3403 (n.top < 0 || n.top > i.height() - e.outerHeight())
3404 ? i
3405 .stop()
3406 .animate(
3407 { scrollTop: i.scrollTop() + n.top },
3408 t
3409 )
3410 : 'x' === o.opts.axis &&
3411 (n.left < a.scrollLeft() ||
3412 n.left >
3413 a.scrollLeft() +
3414 (a.width() - e.outerWidth())) &&
3415 i.parent().stop().animate({ scrollLeft: n.left }, t));
3416 },
3417 update: function () {
3418 var t = this;
3419 t.instance.$refs.container.toggleClass(
3420 'fancybox-show-thumbs',
3421 this.isVisible
3422 ),
3423 t.isVisible
3424 ? (t.$grid || t.create(),
3425 t.instance.trigger('onThumbsShow'),
3426 t.focus(0))
3427 : t.$grid && t.instance.trigger('onThumbsHide'),
3428 t.instance.update();
3429 },
3430 hide: function () {
3431 (this.isVisible = !1), this.update();
3432 },
3433 show: function () {
3434 (this.isVisible = !0), this.update();
3435 },
3436 toggle: function () {
3437 (this.isVisible = !this.isVisible), this.update();
3438 },
3439 }),
3440 e(t).on({
3441 'onInit.fb': function (t, e) {
3442 var n;
3443 e &&
3444 !e.Thumbs &&
3445 ((n = new o(e)),
3446 n.isActive && !0 === n.opts.autoStart && n.show());
3447 },
3448 'beforeShow.fb': function (t, e, n, o) {
3449 var i = e && e.Thumbs;
3450 i && i.isVisible && i.focus(o ? 0 : 250);
3451 },
3452 'afterKeydown.fb': function (t, e, n, o, i) {
3453 var a = e && e.Thumbs;
3454 a &&
3455 a.isActive &&
3456 71 === i &&
3457 (o.preventDefault(), a.toggle());
3458 },
3459 'beforeClose.fb': function (t, e) {
3460 var n = e && e.Thumbs;
3461 n &&
3462 n.isVisible &&
3463 !1 !== n.opts.hideOnClose &&
3464 n.$grid.hide();
3465 },
3466 });
3467 })(document, jQuery),
3468 (function (t, e) {
3469 'use strict';
3470 function n(t) {
3471 var e = {
3472 '&': '&amp;',
3473 '<': '&lt;',
3474 '>': '&gt;',
3475 '"': '&quot;',
3476 "'": '&#39;',
3477 '/': '&#x2F;',
3478 '`': '&#x60;',
3479 '=': '&#x3D;',
3480 };
3481 return String(t).replace(/[&<>"'`=\/]/g, function (t) {
3482 return e[t];
3483 });
3484 }
3485 e.extend(!0, e.fancybox.defaults, {
3486 btnTpl: {
3487 share:
3488 '<button data-fancybox-share class="fancybox-button fancybox-button--share" title="{{SHARE}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.55 19c1.4-8.4 9.1-9.8 11.9-9.8V5l7 7-7 6.3v-3.5c-2.8 0-10.5 2.1-11.9 4.2z"/></svg></button>',
3489 },
3490 share: {
3491 url: function (t, e) {
3492 return (
3493 (!t.currentHash &&
3494 'inline' !== e.type &&
3495 'html' !== e.type &&
3496 (e.origSrc || e.src)) ||
3497 window.location
3498 );
3499 },
3500 tpl:
3501 '<div class="fancybox-share"><h1>{{SHARE}}</h1><p><a class="fancybox-share__button fancybox-share__button--fb" href="https://www.facebook.com/sharer/sharer.php?u={{url}}"><svg viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><path d="m287 456v-299c0-21 6-35 35-35h38v-63c-7-1-29-3-55-3-54 0-91 33-91 94v306m143-254h-205v72h196" /></svg><span>Facebook</span></a><a class="fancybox-share__button fancybox-share__button--tw" href="https://twitter.com/intent/tweet?url={{url}}&text={{descr}}"><svg viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><path d="m456 133c-14 7-31 11-47 13 17-10 30-27 37-46-15 10-34 16-52 20-61-62-157-7-141 75-68-3-129-35-169-85-22 37-11 86 26 109-13 0-26-4-37-9 0 39 28 72 65 80-12 3-25 4-37 2 10 33 41 57 77 57-42 30-77 38-122 34 170 111 378-32 359-208 16-11 30-25 41-42z" /></svg><span>Twitter</span></a><a class="fancybox-share__button fancybox-share__button--pt" href="https://www.pinterest.com/pin/create/button/?url={{url}}&description={{descr}}&media={{media}}"><svg viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><path d="m265 56c-109 0-164 78-164 144 0 39 15 74 47 87 5 2 10 0 12-5l4-19c2-6 1-8-3-13-9-11-15-25-15-45 0-58 43-110 113-110 62 0 96 38 96 88 0 67-30 122-73 122-24 0-42-19-36-44 6-29 20-60 20-81 0-19-10-35-31-35-25 0-44 26-44 60 0 21 7 36 7 36l-30 125c-8 37-1 83 0 87 0 3 4 4 5 2 2-3 32-39 42-75l16-64c8 16 31 29 56 29 74 0 124-67 124-157 0-69-58-132-146-132z" fill="#fff"/></svg><span>Pinterest</span></a></p><p><input class="fancybox-share__input" type="text" value="{{url_raw}}" onclick="select()" /></p></div>',
3502 },
3503 }),
3504 e(t).on('click', '[data-fancybox-share]', function () {
3505 var t,
3506 o,
3507 i = e.fancybox.getInstance(),
3508 a = i.current || null;
3509 a &&
3510 ('function' === e.type(a.opts.share.url) &&
3511 (t = a.opts.share.url.apply(a, [i, a])),
3512 (o = a.opts.share.tpl
3513 .replace(
3514 /\{\{media\}\}/g,
3515 'image' === a.type ? encodeURIComponent(a.src) : ''
3516 )
3517 .replace(/\{\{url\}\}/g, encodeURIComponent(t))
3518 .replace(/\{\{url_raw\}\}/g, n(t))
3519 .replace(
3520 /\{\{descr\}\}/g,
3521 i.$caption
3522 ? encodeURIComponent(i.$caption.text())
3523 : ''
3524 )),
3525 e.fancybox.open({
3526 src: i.translate(i, o),
3527 type: 'html',
3528 opts: {
3529 touch: !1,
3530 animationEffect: !1,
3531 afterLoad: function (t, e) {
3532 i.$refs.container.one(
3533 'beforeClose.fb',
3534 function () {
3535 t.close(null, 0);
3536 }
3537 ),
3538 e.$content
3539 .find('.fancybox-share__button')
3540 .click(function () {
3541 return (
3542 window.open(
3543 this.href,
3544 'Share',
3545 'width=550, height=450'
3546 ),
3547 !1
3548 );
3549 });
3550 },
3551 mobile: { autoFocus: !1 },
3552 },
3553 }));
3554 });
3555 })(document, jQuery),
3556 (function (t, e, n) {
3557 'use strict';
3558 function o() {
3559 var e = t.location.hash.substr(1),
3560 n = e.split('-'),
3561 o =
3562 n.length > 1 && /^\+?\d+$/.test(n[n.length - 1])
3563 ? parseInt(n.pop(-1), 10) || 1
3564 : 1,
3565 i = n.join('-');
3566 return { hash: e, index: o < 1 ? 1 : o, gallery: i };
3567 }
3568 function i(t) {
3569 '' !== t.gallery &&
3570 n("[data-fancybox='" + n.escapeSelector(t.gallery) + "']")
3571 .eq(t.index - 1)
3572 .focus()
3573 .trigger('click.fb-start');
3574 }
3575 function a(t) {
3576 var e, n;
3577 return (
3578 !!t &&
3579 ((e = t.current ? t.current.opts : t.opts),
3580 '' !==
3581 (n =
3582 e.hash ||
3583 (e.$orig
3584 ? e.$orig.data('fancybox') ||
3585 e.$orig.data('fancybox-trigger')
3586 : '')) && n)
3587 );
3588 }
3589 n.escapeSelector ||
3590 (n.escapeSelector = function (t) {
3591 return (t + '').replace(
3592 /([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g,
3593 function (t, e) {
3594 return e
3595 ? '\0' === t
3596 ? ''
3597 : t.slice(0, -1) +
3598 '\\' +
3599 t.charCodeAt(t.length - 1).toString(16) +
3600 ' '
3601 : '\\' + t;
3602 }
3603 );
3604 }),
3605 n(function () {
3606 !1 !== n.fancybox.defaults.hash &&
3607 (n(e).on({
3608 'onInit.fb': function (t, e) {
3609 var n, i;
3610 !1 !== e.group[e.currIndex].opts.hash &&
3611 ((n = o()),
3612 (i = a(e)) &&
3613 n.gallery &&
3614 i == n.gallery &&
3615 (e.currIndex = n.index - 1));
3616 },
3617 'beforeShow.fb': function (n, o, i, s) {
3618 var r;
3619 i &&
3620 !1 !== i.opts.hash &&
3621 (r = a(o)) &&
3622 ((o.currentHash =
3623 r +
3624 (o.group.length > 1
3625 ? '-' + (i.index + 1)
3626 : '')),
3627 t.location.hash !== '#' + o.currentHash &&
3628 (s &&
3629 !o.origHash &&
3630 (o.origHash = t.location.hash),
3631 o.hashTimer && clearTimeout(o.hashTimer),
3632 (o.hashTimer = setTimeout(function () {
3633 'replaceState' in t.history
3634 ? (t.history[
3635 s
3636 ? 'pushState'
3637 : 'replaceState'
3638 ](
3639 {},
3640 e.title,
3641 t.location.pathname +
3642 t.location.search +
3643 '#' +
3644 o.currentHash
3645 ),
3646 s && (o.hasCreatedHistory = !0))
3647 : (t.location.hash = o.currentHash),
3648 (o.hashTimer = null);
3649 }, 300))));
3650 },
3651 'beforeClose.fb': function (n, o, i) {
3652 i &&
3653 !1 !== i.opts.hash &&
3654 (clearTimeout(o.hashTimer),
3655 o.currentHash && o.hasCreatedHistory
3656 ? t.history.back()
3657 : o.currentHash &&
3658 ('replaceState' in t.history
3659 ? t.history.replaceState(
3660 {},
3661 e.title,
3662 t.location.pathname +
3663 t.location.search +
3664 (o.origHash || '')
3665 )
3666 : (t.location.hash = o.origHash)),
3667 (o.currentHash = null));
3668 },
3669 }),
3670 n(t).on('hashchange.fb', function () {
3671 var t = o(),
3672 e = null;
3673 n.each(
3674 n('.fancybox-container').get().reverse(),
3675 function (t, o) {
3676 var i = n(o).data('FancyBox');
3677 if (i && i.currentHash) return (e = i), !1;
3678 }
3679 ),
3680 e
3681 ? e.currentHash === t.gallery + '-' + t.index ||
3682 (1 === t.index &&
3683 e.currentHash == t.gallery) ||
3684 ((e.currentHash = null), e.close())
3685 : '' !== t.gallery && i(t);
3686 }),
3687 setTimeout(function () {
3688 n.fancybox.getInstance() || i(o());
3689 }, 50));
3690 });
3691 })(window, document, jQuery),
3692 (function (t, e) {
3693 'use strict';
3694 var n = new Date().getTime();
3695 e(t).on({
3696 'onInit.fb': function (t, e, o) {
3697 e.$refs.stage.on(
3698 'mousewheel DOMMouseScroll wheel MozMousePixelScroll',
3699 function (t) {
3700 var o = e.current,
3701 i = new Date().getTime();
3702 e.group.length < 2 ||
3703 !1 === o.opts.wheel ||
3704 ('auto' === o.opts.wheel && 'image' !== o.type) ||
3705 (t.preventDefault(),
3706 t.stopPropagation(),
3707 o.$slide.hasClass('fancybox-animated') ||
3708 ((t = t.originalEvent || t),
3709 i - n < 250 ||
3710 ((n = i),
3711 e[
3712 (-t.deltaY ||
3713 -t.deltaX ||
3714 t.wheelDelta ||
3715 -t.detail) < 0
3716 ? 'next'
3717 : 'previous'
3718 ]())));
3719 }
3720 );
3721 },
3722 });
3723 })(document, jQuery);
3724