mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-12 11:04:25 +00:00
4 lines
11 KiB
JavaScript
4 lines
11 KiB
JavaScript
|
/*! PhotoSwipe Default UI - 4.1.3 - 2019-01-08
|
||
|
* http://photoswipe.com
|
||
|
* Copyright (c) 2019 Dmitry Semenov; */
|
||
|
!function (a, b) { "function" == typeof define && define.amd ? define(b) : "object" == typeof exports ? module.exports = b() : a.PhotoSwipeUI_Default = b(); }(this, function () { "use strict"; var a = function (a, b) { var c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v = this, w = !1, x = !0, y = !0, z = { barsSize: { top: 44, bottom: "auto" }, closeElClasses: ["item", "caption", "zoom-wrap", "ui", "top-bar"], timeToIdle: 4e3, timeToIdleOutside: 1e3, loadingIndicatorDelay: 1e3, addCaptionHTMLFn: function (a, b) { return a.title ? (b.children[0].innerHTML = a.title, !0) : (b.children[0].innerHTML = "", !1); }, closeEl: !0, captionEl: !0, fullscreenEl: !0, zoomEl: !0, shareEl: !0, counterEl: !0, arrowEl: !0, preloaderEl: !0, tapToClose: !1, tapToToggleControls: !0, clickToCloseNonZoomable: !0, shareButtons: [{ id: "download", label: "Download image", url: "{{raw_image_url}}", download: !0 }], getImageURLForShare: function () { return a.currItem.src || ""; }, getPageURLForShare: function () { return window.location.href; }, getTextForShare: function () { return a.currItem.title || ""; }, indexIndicatorSep: " / ", fitControlsWidth: 1200 }, A = function (a) { if (r) return !0; a = a || window.event, q.timeToIdle && q.mouseUsed && !k && K(); for (var c, d, e = a.target || a.srcElement, f = e.getAttribute("class") || "", g = 0; g < S.length; g++)c = S[g], c.onTap && f.indexOf("pswp__" + c.name) > -1 && (c.onTap(), d = !0); if (d) { a.stopPropagation && a.stopPropagation(), r = !0; var h = b.features.isOldAndroid ? 600 : 30; s = setTimeout(function () { r = !1; }, h); } }, B = function () { return !a.likelyTouchDevice || q.mouseUsed || screen.width > q.fitControlsWidth; }, C = function (a, c, d) { b[(d ? "add" : "remove") + "Class"](a, "pswp__" + c); }, D = function () { var a = 1 === q.getNumItemsFn(); a !== p && (C(d, "ui--one-slide", a), p = a); }, E = function () { C(i, "share-modal--hidden", y); }, F = function () { return y = !y, y ? (b.removeClass(i, "pswp__share-modal--fade-in"), setTimeout(function () { y && E(); }, 300)) : (E(), setTimeout(function () { y || b.addClass(i, "pswp__share-modal--fade-in"); }, 30)), y || H(), !1; }, G = function (b) { b = b || window.event; var c = b.target || b.srcElement; return a.shout("shareLinkClick", b, c), !!c.href && (!!c.hasAttribute("download") || (window.open(c.href, "pswp_share", "scrollbars=yes,resizable=yes,toolbar=no,location=yes,width=550,height=420,top=100,left=" + (window.screen ? Math.round(screen.width / 2 - 275) : 100)), y || F(), !1)); }, H = function () { for (var a, b, c, d, e, f = "", g = 0; g < q.shareButtons.length; g++)a = q.shareButtons[g], c = q.getImageURLForShare(a), d = q.getPageURLForShare(a), e = q.getTextForShare(a), b = a.url.replace("{{url}}", encodeURIComponent(d)).replace("{{image_url}}", encodeURIComponent(c)).replace("{{raw_image_url}}", c).replace("{{text}}", encodeURIComponent(e)), f += '<a href="' + b + '" target="_blank" class="pswp__share--' + a.id + '"' + (a.download ? "download" : "") + ">" + a.label + "</a>", q.parseShareButtonOut && (f = q.parseShareButtonOut(a, f)); i.children[0].innerHTML = f, i.children[0].onclick = G; }, I = function (a) { for (var c = 0; c < q.closeElClasses.length; c++)if (b.hasClass(a, "pswp__" + q.closeElClasses[c])) return !0; }, J = 0, K = function () { clearTimeout(u), J = 0, k && v.setIdle(!1); }, L = function (a) { a = a ? a : window.event; var b = a.relatedTarget || a.toElement; b && "HTML" !== b.nodeName || (clearTimeout(u), u = setTimeout(function () { v.setIdle(!0); }, q.timeToIdleOutside)); }, M = function () { q.fullscreenEl && !b.features.isOldAndroid && (c || (c = v.getFullscreenAPI()), c ? (b.bind(document, c.eventK, v.updateFullscreen), v.updateFullscreen(), b.addClass(a.template, "pswp--supports-fs")) : b.removeClass(a.template, "pswp--supports-fs")); }, N = function () { q.preloaderEl && (O(!0), l("beforeChange", function () { clearTimeout(o), o = setTimeout(function () { a.currItem && a.currItem.loading ? (!a.allowProgressiveImg() || a.currItem.img && !a.currItem.img.naturalWidth) && O
|