https://www.ugra.ch/wp-content/themes/kallyas/framework/zion-builder/dist/znpb_frontend.js?ver=1.3.0
vendor: 5,782 bytes, lines 1-113
1(function() { 2 "use strict"; 3 /*! modernizr 3.3.1 (Custom Build) | MIT * 4 * https://modernizr.com/download/?-backgroundcliptext-csspointerevents-flexbox-objectfit-touchevents-video-setclasses !*/ 5 !function(e, n, t) { 6 function o(e2, n2) { 7 return typeof e2 === n2; 8 } 9 function r() { 10 var e2, n2, t2, r2, s2, i2, a2; 11 for (var l2 in x) if (x.hasOwnProperty(l2)) { 12 if (e2 = [], n2 = x[l2], n2.name && (e2.push(n2.name.toLowerCase()), n2.options && n2.options.aliases && n2.options.aliases.length)) for (t2 = 0; t2 < n2.options.aliases.length; t2++) e2.push(n2.options.aliases[t2].toLowerCase()); 13 for (r2 = o(n2.fn, "function") ? n2.fn() : n2.fn, s2 = 0; s2 < e2.length; s2++) i2 = e2[s2], a2 = i2.split("."), 1 === a2.length ? Modernizr2[a2[0]] = r2 : (!Modernizr2[a2[0]] || Modernizr2[a2[0]] instanceof Boolean || (Modernizr2[a2[0]] = new Boolean(Modernizr2[a2[0]])), Modernizr2[a2[0]][a2[1]] = r2), g.push((r2 ? "" : "no-") + a2.join("-")); 14 } 15 } 16 function s(e2) { 17 var n2 = b.className, t2 = Modernizr2._config.classPrefix || ""; 18 if (w && (n2 = n2.baseVal), Modernizr2._config.enableJSClass) { 19 var o2 = new RegExp("(^|\\s)" + t2 + "no-js(\\s|$)"); 20 n2 = n2.replace(o2, "$1" + t2 + "js$2"); 21 } 22 Modernizr2._config.enableClasses && (n2 += " " + t2 + e2.join(" " + t2), w ? b.className.baseVal = n2 : b.className = n2); 23 } 24 function i() { 25 return "function" != typeof n.createElement ? n.createElement(arguments[0]) : w ? n.createElementNS.call(n, "http://www.w3.org/2000/svg", arguments[0]) : n.createElement.apply(n, arguments); 26 } 27 function a(e2) { 28 return e2.replace(/([a-z])-([a-z])/g, function(e3, n2, t2) { 29 return n2 + t2.toUpperCase(); 30 }).replace(/^-/, ""); 31 } 32 function l() { 33 var e2 = n.body; 34 return e2 || (e2 = i(w ? "svg" : "body"), e2.fake = true), e2; 35 } 36 function f(e2, t2, o2, r2) { 37 var s2, a2, f2, u2, c2 = "modernizr", p2 = i("div"), d2 = l(); 38 if (parseInt(o2, 10)) for (; o2--; ) f2 = i("div"), f2.id = r2 ? r2[o2] : c2 + (o2 + 1), p2.appendChild(f2); 39 return s2 = i("style"), s2.type = "text/css", s2.id = "s" + c2, (d2.fake ? d2 : p2).appendChild(s2), d2.appendChild(p2), s2.styleSheet ? s2.styleSheet.cssText = e2 : s2.appendChild(n.createTextNode(e2)), p2.id = c2, d2.fake && (d2.style.background = "", d2.style.overflow = "hidden", u2 = b.style.overflow, b.style.overflow = "hidden", b.appendChild(d2)), a2 = t2(p2, e2), d2.fake ? (d2.parentNode.removeChild(d2), b.style.overflow = u2, b.offsetHeight) : p2.parentNode.removeChild(p2), !!a2; 40 } 41 function u(e2, n2) { 42 return !!~("" + e2).indexOf(n2); 43 } 44 function c(e2, n2) { 45 return function() { 46 return e2.apply(n2, arguments); 47 }; 48 } 49 function p(e2, n2, t2) { 50 var r2; 51 for (var s2 in e2) if (e2[s2] in n2) return t2 === false ? e2[s2] : (r2 = n2[e2[s2]], o(r2, "function") ? c(r2, t2 || n2) : r2); 52 return false; 53 } 54 function d(e2) { 55 return e2.replace(/([A-Z])/g, function(e3, n2) { 56 return "-" + n2.toLowerCase(); 57 }).replace(/^ms-/, "-ms-"); 58 } 59 function v(n2, o2) { 60 var r2 = n2.length; 61 if ("CSS" in e && "supports" in e.CSS) { 62 for (; r2--; ) if (e.CSS.supports(d(n2[r2]), o2)) return true; 63 return false; 64 } 65 if ("CSSSupportsRule" in e) { 66 for (var s2 = []; r2--; ) s2.push("(" + d(n2[r2]) + ":" + o2 + ")"); 67 return s2 = s2.join(" or "), f("@supports (" + s2 + ") { #modernizr { position: absolute; } }", function(e2) { 68 return "absolute" == getComputedStyle(e2, null).position; 69 }); 70 } 71 return t; 72 } 73 function m(e2, n2, r2, s2) { 74 function l2() { 75 c2 && (delete k.style, delete k.modElem); 76 } 77 if (s2 = o(s2, "undefined") ? false : s2, !o(r2, "undefined")) { 78 var f2 = v(e2, r2); 79 if (!o(f2, "undefined")) return f2; 80 } 81 for (var c2, p2, d2, m2, y2, h2 = ["modernizr", "tspan", "samp"]; !k.style && h2.length; ) c2 = true, k.modElem = i(h2.shift()), k.style = k.modElem.style; 82 for (d2 = e2.length, p2 = 0; d2 > p2; p2++) if (m2 = e2[p2], y2 = k.style[m2], u(m2, "-") && (m2 = a(m2)), k.style[m2] !== t) { 83 if (s2 || o(r2, "undefined")) return l2(), "pfx" == n2 ? m2 : true; 84 try { 85 k.style[m2] = r2; 86 } catch (g2) { 87 } 88 if (k.style[m2] != y2) return l2(), "pfx" == n2 ? m2 : true; 89 } 90 return l2(), false; 91 } 92 function y(e2, n2, t2, r2, s2) { 93 var i2 = e2.charAt(0).toUpperCase() + e2.slice(1), a2 = (e2 + " " + P.join(i2 + " ") + i2).split(" "); 94 return o(n2, "string") || o(n2, "undefined") ? m(a2, n2, r2, s2) : (a2 = (e2 + " " + j.join(i2 + " ") + i2).split(" "), p(a2, n2, t2)); 95 } 96 function h(e2, n2, o2) { 97 return y(e2, t, t, n2, o2); 98 } 99 var g = [], x = [], C = { _version: "3.3.1", _config: { classPrefix: "", enableClasses: true, enableJSClass: true, usePrefixes: true }, _q: [], on: function(e2, n2) { 100 var t2 = this; 101 setTimeout(function() { 102 n2(t2[e2]); 103 }, 0); 104 }, addTest: function(e2, n2, t2) { 105 x.push({ name: e2, fn: n2, options: t2 }); 106 }, addAsyncTest: function(e2) { 107 x.push({ name: null, fn: e2 }); 108 } }, Modernizr2 = function() { 109 }; 110 Modernizr2.prototype = C, Modernizr2 = new Modernizr2(); 111 var b = n.documentElement, w = "svg" === b.nodeName.toLowerCase(), T = C._config.usePrefixes ? " -webkit- -moz- -o- -ms- ".split(" ") : ["", ""]; 112 C._prefixes = T, Modernizr2.addTest("video", function() { 113 var e2 = i("video"), n2 = false;
114 try { 115 (n2 = !!e2.canPlayType) && (n2 = new Boolean(n2), n2.ogg = e2.canPlayType('video/ogg; codecs="theora"').replace(/^no$/, ""), n2.h264 = e2.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/, ""), n2.webm = e2.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/, ""), n2.vp9 = e2.canPlayType('video/webm; codecs="vp9"').replace(/^no$/, ""), n2.hls = e2.canPlayType('application/x-mpegURL; codecs="avc1.42E01E"').replace(/^no$/, "")); 116 } catch (t2) { 117 } 118 return n2; 119 }), Modernizr2.addTest("csspointerevents", function() { 120 var e2 = i("a").style; 121 return e2.cssText = "pointer-events:auto", "auto" === e2.pointerEvents; 122 }); 123 var _ = C.testStyles = f; 124 Modernizr2.addTest("touchevents", function() { 125 var t2; 126 if ("ontouchstart" in e || e.DocumentTouch && n instanceof DocumentTouch) t2 = true; 127 else { 128 var o2 = ["@media (", T.join("touch-enabled),("), "heartz", ")", "{#modernizr{top:9px;position:absolute}}"].join(""); 129 _(o2, function(e2) { 130 t2 = 9 === e2.offsetTop; 131 }); 132 } 133 return t2; 134 }); 135 var S = "Moz O ms Webkit", P = C._config.usePrefixes ? S.split(" ") : []; 136 C._cssomPrefixes = P; 137 var E = function(n2) { 138 var o2, r2 = T.length, s2 = e.CSSRule; 139 if ("undefined" == typeof s2) return t; 140 if (!n2) return false; 141 if (n2 = n2.replace(/^@/, ""), o2 = n2.replace(/-/g, "_").toUpperCase() + "_RULE", o2 in s2) return "@" + n2; 142 for (var i2 = 0; r2 > i2; i2++) { 143 var a2 = T[i2], l2 = a2.toUpperCase() + "_" + o2; 144 if (l2 in s2) return "@-" + a2.toLowerCase() + "-" + n2; 145 } 146 return false; 147 }; 148 C.atRule = E; 149 var j = C._config.usePrefixes ? S.toLowerCase().split(" ") : []; 150 C._domPrefixes = j; 151 var z = { elem: i("modernizr") }; 152 Modernizr2._q.push(function() { 153 delete z.elem; 154 }); 155 var k = { style: z.elem.style }; 156 Modernizr2._q.unshift(function() { 157 delete k.style; 158 }), C.testAllProps = y, C.testAllProps = h, Modernizr2.addTest("flexbox", h("flexBasis", "1px", true)); 159 var N = C.prefixed = function(e2, n2, t2) { 160 return 0 === e2.indexOf("@") ? E(e2) : (-1 != e2.indexOf("-") && (e2 = a(e2)), n2 ? y(e2, n2, t2) : y(e2, "pfx")); 161 }; 162 Modernizr2.addTest("objectfit", !!N("objectFit"), { aliases: ["object-fit"] }), Modernizr2.addTest("backgroundcliptext", function() { 163 return h("backgroundClip", "text"); 164 }), r(), s(g), delete C.addTest, delete C.addAsyncTest; 165 for (var L = 0; L < Modernizr2._q.length; L++) Modernizr2._q[L](); 166 e.Modernizr = Modernizr2; 167 }(window, document); 168 /*! 169 * Bootstrap v3.3.7 (http://getbootstrap.com) 170 * Copyright 2011-2017 Twitter, Inc. 171 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 172 */ 173 /*! 174 * Generated using the Bootstrap Customizer (http://getbootstrap.com/customize/?id=1f5abcbc13a31592a88f68a5da3768af) 175 * Config saved to config.json and https://gist.github.com/1f5abcbc13a31592a88f68a5da3768af 176 */ 177 if (typeof jQuery === "undefined") { 178 throw new Error("Bootstrap's JavaScript requires jQuery"); 179 } 180 +function($) { 181 var version = $.fn.jquery.split(" ")[0].split("."); 182 if (version[0] < 2 && version[1] < 9 || version[0] == 1 && version[1] == 9 && version[2] < 1 || version[0] > 3) { 183 throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4"); 184 } 185 }(jQuery); 186 +function($) { 187 var dismiss = '[data-dismiss="alert"]'; 188 var Alert = function(el) { 189 $(el).on("click", dismiss, this.close); 190 }; 191 Alert.VERSION = "3.3.7"; 192 Alert.TRANSITION_DURATION = 150; 193 Alert.prototype.close = function(e) { 194 var $this = $(this); 195 var selector = $this.attr("data-target"); 196 if (!selector) { 197 selector = $this.attr("href"); 198 selector = selector && selector.replace(/.*(?=#[^\s]*$)/, ""); 199 } 200 var $parent = $(selector === "#" ? [] : selector); 201 if (e) e.preventDefault(); 202 if (!$parent.length) { 203 $parent = $this.closest(".alert"); 204 } 205 $parent.trigger(e = $.Event("close.bs.alert")); 206 if (e.isDefaultPrevented()) return; 207 $parent.removeClass("in"); 208 function removeElement() { 209 $parent.detach().trigger("closed.bs.alert").remove(); 210 } 211 $.support.transition && $parent.hasClass("fade") ? $parent.one("bsTransitionEnd", removeElement).emulateTransitionEnd(Alert.TRANSITION_DURATION) : removeElement(); 212 }; 213 function Plugin(option) { 214 return this.each(function() { 215 var $this = $(this); 216 var data = $this.data("bs.alert"); 217 if (!data) $this.data("bs.alert", data = new Alert(this)); 218 if (typeof option == "string") data[option].call($this); 219 }); 220 } 221 var old = $.fn.alert; 222 $.fn.alert = Plugin; 223 $.fn.alert.Constructor = Alert; 224 $.fn.alert.noConflict = function() { 225 $.fn.alert = old; 226 return this; 227 }; 228 $(document).on("click.bs.alert.data-api", dismiss, Alert.prototype.close); 229 }(jQuery); 230 +function($) { 231 var Button = function(element, options) { 232 this.$element = $(element); 233 this.options = $.extend({}, Button.DEFAULTS, options); 234 this.isLoading = false; 235 }; 236 Button.VERSION = "3.3.7"; 237 Button.DEFAULTS = { 238 loadingText: "loading..." 239 }; 240 Button.prototype.setState = function(state) { 241 var d = "disabled"; 242 var $el = this.$element; 243 var val = $el.is("input") ? "val" : "html"; 244 var data = $el.data(); 245 state += "Text"; 246 if (data.resetText == null) $el.data("resetText", $el[val]()); 247 setTimeout($.proxy(function() { 248 $el[val](data[state] == null ? this.options[state] : data[state]); 249 if (state == "loadingText") { 250 this.isLoading = true; 251 $el.addClass(d).attr(d, d).prop(d, true); 252 } else if (this.isLoading) { 253 this.isLoading = false; 254 $el.removeClass(d).removeAttr(d).prop(d, false); 255 } 256 }, this), 0); 257 }; 258 Button.prototype.toggle = function() { 259 var changed = true; 260 var $parent = this.$element.closest('[data-toggle="buttons"]'); 261 if ($parent.length) { 262 var $input = this.$element.find("input"); 263 if ($input.prop("type") == "radio") { 264 if ($input.prop("checked")) changed = false; 265 $parent.find(".active").removeClass("active"); 266 this.$element.addClass("active"); 267 } else if ($input.prop("type") == "checkbox") { 268 if ($input.prop("checked") !== this.$element.hasClass("active")) changed = false; 269 this.$element.toggleClass("active"); 270 } 271 $input.prop("checked", this.$element.hasClass("active"));
272 if (changed) $input.trigger("change"); 273 } else { 274 this.$element.attr("aria-pressed", !this.$element.hasClass("active")); 275 this.$element.toggleClass("active"); 276 } 277 }; 278 function Plugin(option) { 279 return this.each(function() { 280 var $this = $(this); 281 var data = $this.data("bs.button"); 282 var options = typeof option == "object" && option; 283 if (!data) $this.data("bs.button", data = new Button(this, options)); 284 if (option == "toggle") data.toggle(); 285 else if (option) data.setState(option); 286 }); 287 } 288 var old = $.fn.button; 289 $.fn.button = Plugin; 290 $.fn.button.Constructor = Button; 291 $.fn.button.noConflict = function() { 292 $.fn.button = old; 293 return this; 294 }; 295 $(document).on("click.bs.button.data-api", '[data-toggle^="button"]', function(e) { 296 var $btn = $(e.target).closest(".btn"); 297 Plugin.call($btn, "toggle"); 298 if (!$(e.target).is('input[type="radio"], input[type="checkbox"]')) { 299 e.preventDefault(); 300 if ($btn.is("input,button")) $btn.trigger("focus"); 301 else $btn.find("input:visible,button:visible").first().trigger("focus"); 302 } 303 }).on("focus.bs.button.data-api blur.bs.button.data-api", '[data-toggle^="button"]', function(e) { 304 $(e.target).closest(".btn").toggleClass("focus", /^focus(in)?$/.test(e.type)); 305 }); 306 }(jQuery); 307 +function($) { 308 var backdrop = ".dropdown-backdrop"; 309 var toggle = '[data-toggle="dropdown"]'; 310 var Dropdown = function(element) { 311 $(element).on("click.bs.dropdown", this.toggle); 312 }; 313 Dropdown.VERSION = "3.3.7"; 314 function getParent($this) { 315 var selector = $this.attr("data-target"); 316 if (!selector) { 317 selector = $this.attr("href"); 318 selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, ""); 319 } 320 var $parent = selector && $(selector); 321 return $parent && $parent.length ? $parent : $this.parent(); 322 } 323 function clearMenus(e) { 324 if (e && e.which === 3) return; 325 $(backdrop).remove(); 326 $(toggle).each(function() { 327 var $this = $(this); 328 var $parent = getParent($this); 329 var relatedTarget = { relatedTarget: this }; 330 if (!$parent.hasClass("open")) return; 331 if (e && e.type == "click" && /input|textarea/i.test(e.target.tagName) && $.contains($parent[0], e.target)) return; 332 $parent.trigger(e = $.Event("hide.bs.dropdown", relatedTarget)); 333 if (e.isDefaultPrevented()) return; 334 $this.attr("aria-expanded", "false"); 335 $parent.removeClass("open").trigger($.Event("hidden.bs.dropdown", relatedTarget)); 336 }); 337 } 338 Dropdown.prototype.toggle = function(e) { 339 var $this = $(this); 340 if ($this.is(".disabled, :disabled")) return; 341 var $parent = getParent($this); 342 var isActive = $parent.hasClass("open"); 343 clearMenus(); 344 if (!isActive) { 345 if ("ontouchstart" in document.documentElement && !$parent.closest(".
vendor: 15,094 bytes, lines 345-652
345navbar-nav").length) { 346 $(document.createElement("div")).addClass("dropdown-backdrop").insertAfter($(this)).on("click", clearMenus); 347 } 348 var relatedTarget = { relatedTarget: this }; 349 $parent.trigger(e = $.Event("show.bs.dropdown", relatedTarget)); 350 if (e.isDefaultPrevented()) return; 351 $this.trigger("focus").attr("aria-expanded", "true"); 352 $parent.toggleClass("open").trigger($.Event("shown.bs.dropdown", relatedTarget)); 353 } 354 return false; 355 }; 356 Dropdown.prototype.keydown = function(e) { 357 if (!/(38|40|27|32)/.test(e.which) || /input|textarea/i.test(e.target.tagName)) return; 358 var $this = $(this); 359 e.preventDefault(); 360 e.stopPropagation(); 361 if ($this.is(".disabled, :disabled")) return; 362 var $parent = getParent($this); 363 var isActive = $parent.hasClass("open"); 364 if (!isActive && e.which != 27 || isActive && e.which == 27) { 365 if (e.which == 27) $parent.find(toggle).trigger("focus"); 366 return $this.trigger("click"); 367 } 368 var desc = " li:not(.disabled):visible a"; 369 var $items = $parent.find(".dropdown-menu" + desc); 370 if (!$items.length) return; 371 var index = $items.index(e.target); 372 if (e.which == 38 && index > 0) index--; 373 if (e.which == 40 && index < $items.length - 1) index++; 374 if (!~index) index = 0; 375 $items.eq(index).trigger("focus"); 376 }; 377 function Plugin(option) { 378 return this.each(function() { 379 var $this = $(this); 380 var data = $this.data("bs.dropdown"); 381 if (!data) $this.data("bs.dropdown", data = new Dropdown(this)); 382 if (typeof option == "string") data[option].call($this); 383 }); 384 } 385 var old = $.fn.dropdown; 386 $.fn.dropdown = Plugin; 387 $.fn.dropdown.Constructor = Dropdown; 388 $.fn.dropdown.noConflict = function() { 389 $.fn.dropdown = old; 390 return this; 391 }; 392 $(document).on("click.bs.dropdown.data-api", clearMenus).on("click.bs.dropdown.data-api", ".dropdown form", function(e) { 393 e.stopPropagation(); 394 }).on("click.bs.dropdown.data-api", toggle, Dropdown.prototype.toggle).on("keydown.bs.dropdown.data-api", toggle, Dropdown.prototype.keydown).on("keydown.bs.dropdown.data-api", ".dropdown-menu", Dropdown.prototype.keydown); 395 }(jQuery); 396 +function($) { 397 var Tooltip = function(element, options) { 398 this.type = null; 399 this.options = null; 400 this.enabled = null; 401 this.timeout = null; 402 this.hoverState = null; 403 this.$element = null; 404 this.inState = null; 405 this.init("tooltip", element, options); 406 }; 407 Tooltip.VERSION = "3.3.7"; 408 Tooltip.TRANSITION_DURATION = 150; 409 Tooltip.DEFAULTS = { 410 animation: true, 411 placement: "top", 412 selector: false, 413 template: '<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>', 414 trigger: "hover focus", 415 title: "", 416 delay: 0, 417 html: false, 418 container: false, 419 viewport: { 420 selector: "body", 421 padding: 0 422 } 423 }; 424 Tooltip.prototype.init = function(type, element, options) { 425 this.enabled = true; 426 this.type = type; 427 this.$element = $(element); 428 this.options = this.getOptions(options); 429 this.$viewport = this.options.viewport && $($.isFunction(this.options.viewport) ? this.options.viewport.call(this, this.$element) : this.options.viewport.selector || this.options.viewport); 430 this.inState = { click: false, hover: false, focus: false }; 431 if (this.$element[0] instanceof document.constructor && !this.options.selector) { 432 throw new Error("`selector` option must be specified when initializing " + this.type + " on the window.document object!"); 433 } 434 var triggers = this.options.trigger.split(" "); 435 for (var i = triggers.length; i--; ) { 436 var trigger = triggers[i]; 437 if (trigger == "click") { 438 this.$element.on("click." + this.type, this.options.selector, $.proxy(this.toggle, this)); 439 } else if (trigger != "manual") { 440 var eventIn = trigger == "hover" ? "mouseenter" : "focusin"; 441 var eventOut = trigger == "hover" ? "mouseleave" : "focusout"; 442 this.$element.on(eventIn + "." + this.type, this.options.selector, $.proxy(this.enter, this)); 443 this.$element.on(eventOut + "." + this.type, this.options.selector, $.proxy(this.leave, this)); 444 } 445 } 446 this.options.selector ? this._options = $.extend({}, this.options, { trigger: "manual", selector: "" }) : this.fixTitle(); 447 }; 448 Tooltip.prototype.getDefaults = function() { 449 return Tooltip.DEFAULTS; 450 }; 451 Tooltip.prototype.getOptions = function(options) { 452 options = $.extend({}, this.getDefaults(), this.$element.data(), options); 453 if (options.delay && typeof options.delay == "number") { 454 options.delay = { 455 show: options.delay, 456 hide: options.delay 457 }; 458 } 459 return options; 460 }; 461 Tooltip.prototype.getDelegateOptions = function() { 462 var options = {}; 463 var defaults = this.getDefaults(); 464 this._options && $.each(this._options, function(key, value) { 465 if (defaults[key] != value) options[key] = value; 466 }); 467 return options; 468 }; 469 Tooltip.prototype.enter = function(obj) { 470 var self2 = obj instanceof this.constructor ? obj : $(obj.currentTarget).data("bs." + this.type); 471 if (!self2) { 472 self2 = new this.constructor(obj.currentTarget, this.getDelegateOptions()); 473 $(obj.currentTarget).data("bs." + this.type, self2); 474 } 475 if (obj instanceof $.Event) { 476 self2.inState[obj.type == "focusin" ? "focus" : "hover"] = true; 477 } 478 if (self2.tip().hasClass("in") || self2.hoverState == "in") { 479 self2.hoverState = "in"; 480 return; 481 } 482 clearTimeout(self2.timeout); 483 self2.hoverState = "in"; 484 if (!self2.options.delay || !self2.options.delay.show) return self2.show(); 485 self2.timeout = setTimeout(function() { 486 if (self2.hoverState == "in") self2.show(); 487 }, self2.options.delay.show); 488 }; 489 Tooltip.prototype.isInStateTrue = function() { 490 for (var key in this.inState) { 491 if (this.inState[key]) return true; 492 } 493 return false; 494 }; 495 Tooltip.prototype.leave = function(obj) { 496 var self2 = obj instanceof this.constructor ? obj : $(obj.currentTarget).data("bs." + this.type); 497 if (!self2) { 498 self2 = new this.constructor(obj.currentTarget, this.getDelegateOptions()); 499 $(obj.currentTarget).data("bs." + this.type, self2); 500 } 501 if (obj instanceof $.Event) { 502 self2.inState[obj.type == "focusout" ? "focus" : "hover"] = false; 503 } 504 if (self2.isInStateTrue()) return; 505 clearTimeout(self2.timeout); 506 self2.hoverState = "out"; 507 if (!self2.options.delay || !self2.options.delay.hide) return self2.hide(); 508 self2.timeout = setTimeout(function() { 509 if (self2.hoverState == "out") self2.hide(); 510 }, self2.options.delay.hide); 511 }; 512 Tooltip.prototype.show = function() { 513 var e = $.Event("show.bs." + this.type); 514 if (this.hasContent() && this.enabled) { 515 this.$element.trigger(e); 516 var inDom = $.contains(this.$element[0].ownerDocument.documentElement, this.$element[0]); 517 if (e.isDefaultPrevented() || !inDom) return; 518 var that = this; 519 var $tip = this.tip(); 520 var tipId = this.getUID(this.type); 521 this.setContent(); 522 $tip.attr("id", tipId); 523 this.$element.attr("aria-describedby", tipId); 524 if (this.options.animation) $tip.addClass("fade"); 525 var placement = typeof this.options.placement == "function" ? this.options.placement.call(this, $tip[0], this.$element[0]) : this.options.placement; 526 var autoToken = /\s?auto?\s?/i; 527 var autoPlace = autoToken.test(placement); 528 if (autoPlace) placement = placement.replace(autoToken, "") || "top"; 529 $tip.detach().css({ top: 0, left: 0, display: "block" }).addClass(placement).data("bs." + this.type, this); 530 this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element); 531 this.$element.trigger("inserted.bs." + this.type); 532 var pos = this.getPosition(); 533 var actualWidth = $tip[0].offsetWidth; 534 var actualHeight = $tip[0].offsetHeight; 535 if (autoPlace) { 536 var orgPlacement = placement; 537 var viewportDim = this.getPosition(this.$viewport); 538 placement = placement == "bottom" && pos.bottom + actualHeight > viewportDim.bottom ? "top" : placement == "top" && pos.top - actualHeight < viewportDim.top ? "bottom" : placement == "right" && pos.right + actualWidth > viewportDim.width ? "left" : placement == "left" && pos.left - actualWidth < viewportDim.left ? "right" : placement; 539 $tip.removeClass(orgPlacement).addClass(placement); 540 } 541 var calculatedOffset = this.getCalculatedOffset(placement, pos, actualWidth, actualHeight); 542 this.applyPlacement(calculatedOffset, placement); 543 var complete = function() { 544 var prevHoverState = that.hoverState; 545 that.$element.trigger("shown.bs." + that.type); 546 that.hoverState = null; 547 if (prevHoverState == "out") that.leave(that); 548 }; 549 $.support.transition && this.$tip.hasClass("fade") ? $tip.one("bsTransitionEnd", complete).emulateTransitionEnd(Tooltip.TRANSITION_DURATION) : complete(); 550 } 551 }; 552 Tooltip.prototype.applyPlacement = function(offset, placement) { 553 var $tip = this.tip(); 554 var width = $tip[0].offsetWidth; 555 var height = $tip[0].offsetHeight; 556 var marginTop = parseInt($tip.css("margin-top"), 10); 557 var marginLeft = parseInt($tip.css("margin-left"), 10); 558 if (isNaN(marginTop)) marginTop = 0; 559 if (isNaN(marginLeft)) marginLeft = 0; 560 offset.top += marginTop; 561 offset.left += marginLeft; 562 $.offset.setOffset($tip[0], $.extend({ 563 using: function(props) { 564 $tip.css({ 565 top: Math.round(props.top), 566 left: Math.round(props.left) 567 }); 568 } 569 }, offset), 0); 570 $tip.addClass("in"); 571 var actualWidth = $tip[0].offsetWidth; 572 var actualHeight = $tip[0].offsetHeight; 573 if (placement == "top" && actualHeight != height) { 574 offset.top = offset.top + height - actualHeight; 575 } 576 var delta = this.getViewportAdjustedDelta(placement, offset, actualWidth, actualHeight); 577 if (delta.left) offset.left += delta.left; 578 else offset.top += delta.top; 579 var isVertical = /top|bottom/.test(placement); 580 var arrowDelta = isVertical ? delta.left * 2 - width + actualWidth : delta.top * 2 - height + actualHeight; 581 var arrowOffsetPosition = isVertical ? "offsetWidth" : "offsetHeight"; 582 $tip.offset(offset); 583 this.replaceArrow(arrowDelta, $tip[0][arrowOffsetPosition], isVertical); 584 }; 585 Tooltip.prototype.replaceArrow = function(delta, dimension, isVertical) { 586 this.arrow().css(isVertical ? "left" : "top", 50 * (1 - delta / dimension) + "%").css(isVertical ? "top" : "left", ""); 587 }; 588 Tooltip.prototype.setContent = function() { 589 var $tip = this.tip(); 590 var title = this.getTitle(); 591 $tip.find(".tooltip-inner")[this.options.html ? "html" : "text"](title); 592 $tip.removeClass("fade in top bottom left right"); 593 }; 594 Tooltip.prototype.hide = function(callback) { 595 var that = this; 596 var $tip = $(this.$tip); 597 var e = $.Event("hide.bs." + this.type); 598 function complete() { 599 if (that.hoverState != "in") $tip.detach(); 600 if (that.$element) { 601 that.$element.removeAttr("aria-describedby").trigger("hidden.bs." + that.type); 602 } 603 callback && callback(); 604 } 605 this.$element.trigger(e); 606 if (e.isDefaultPrevented()) return; 607 $tip.removeClass("in"); 608 $.support.transition && $tip.hasClass("fade") ? $tip.one("bsTransitionEnd", complete).emulateTransitionEnd(Tooltip.TRANSITION_DURATION) : complete(); 609 this.hoverState = null; 610 return this; 611 }; 612 Tooltip.prototype.fixTitle = function() { 613 var $e = this.$element; 614 if ($e.attr("title") || typeof $e.attr("data-original-title") != "string") { 615 $e.attr("data-original-title", $e.attr("title") || "").attr("title", ""); 616 } 617 }; 618 Tooltip.prototype.hasContent = function() { 619 return this.getTitle(); 620 }; 621 Tooltip.prototype.getPosition = function($element) { 622 $element = $element || this.$element; 623 var el = $element[0]; 624 var isBody = el.tagName == "BODY"; 625 var elRect = el.getBoundingClientRect(); 626 if (elRect.width == null) { 627 elRect = $.extend({}, elRect, { width: elRect.right - elRect.left, height: elRect.bottom - elRect.top }); 628 } 629 var isSvg = window.SVGElement && el instanceof window.SVGElement; 630 var elOffset = isBody ? { top: 0, left: 0 } : isSvg ? null : $element.offset(); 631 var scroll = { scroll: isBody ? document.documentElement.scrollTop || document.body.scrollTop : $element.scrollTop() }; 632 var outerDims = isBody ? { width: $(window).width(), height: $(window).height() } : null; 633 return $.extend({}, elRect, scroll, outerDims, elOffset); 634 }; 635 Tooltip.prototype.getCalculatedOffset = function(placement, pos, actualWidth, actualHeight) { 636 return placement == "bottom" ? { top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2 } : placement == "top" ? { top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2 } : placement == "left" ? { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth } : ( 637 /* placement == 'right' */ 638 { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width } 639 ); 640 }; 641 Tooltip.prototype.getViewportAdjustedDelta = function(placement, pos, actualWidth, actualHeight) { 642 var delta = { top: 0, left: 0 }; 643 if (!this.$viewport) return delta; 644 var viewportPadding = this.options.viewport && this.options.viewport.padding || 0; 645 var viewportDimensions = this.getPosition(this.$viewport); 646 if (/right|left/.test(placement)) { 647 var topEdgeOffset = pos.top - viewportPadding - viewportDimensions.scroll; 648 var bottomEdgeOffset = pos.top + viewportPadding - viewportDimensions.scroll + actualHeight; 649 if (topEdgeOffset < viewportDimensions.top) { 650 delta.top = viewportDimensions.top - topEdgeOffset; 651 } else if (bottomEdgeOffset > viewportDimensions.top + viewportDimensions.height) { 652 delta.top = viewportDimensions.top + viewportDimensions.height - bottom
652EdgeOffset; 653 } 654 } else { 655 var leftEdgeOffset = pos.left - viewportPadding; 656 var rightEdgeOffset = pos.left + viewportPadding + actualWidth; 657 if (leftEdgeOffset < viewportDimensions.left) { 658 delta.left = viewportDimensions.left - leftEdgeOffset; 659 } else if (rightEdgeOffset > viewportDimensions.right) { 660 delta.left = viewportDimensions.left + viewportDimensions.width - rightEdgeOffset; 661 } 662 } 663 return delta; 664 }; 665 Tooltip.prototype.getTitle = function() { 666 var title; 667 var $e = this.$element; 668 var o = this.options; 669 title = $e.attr("data-original-title") || (typeof o.title == "function" ? o.title.call($e[0]) : o.title); 670 return title; 671 }; 672 Tooltip.prototype.getUID = function(prefix) { 673 do 674 prefix += ~~(Math.random() * 1e6); 675 while (document.getElementById(prefix)); 676 return prefix; 677 }; 678 Tooltip.prototype.tip = function() { 679 if (!this.$tip) { 680 this.$tip = $(this.options.template); 681 if (this.$tip.length != 1) { 682 throw new Error(this.type + " `template` option must consist of exactly 1 top-level element!"); 683 } 684 } 685 return this.$tip; 686 }; 687 Tooltip.prototype.arrow = function() { 688 return this.$arrow = this.$arrow || this.tip().find(".tooltip-arrow"); 689 }; 690 Tooltip.prototype.enable = function() { 691 this.enabled = true; 692 }; 693 Tooltip.prototype.disable = function() { 694 this.enabled = false; 695 }; 696 Tooltip.prototype.toggleEnabled = function() { 697 this.enabled = !this.enabled; 698 }; 699 Tooltip.prototype.toggle = function(e) { 700 var self2 = this; 701 if (e) { 702 self2 = $(e.currentTarget).data("bs." + this.type); 703 if (!self2) { 704 self2 = new this.constructor(e.currentTarget, this.getDelegateOptions()); 705 $(e.currentTarget).data("bs." + this.type, self2); 706 } 707 } 708 if (e) { 709 self2.inState.click = !self2.inState.click; 710 if (self2.isInStateTrue()) self2.enter(self2); 711 else self2.leave(self2); 712 } else { 713 self2.tip().hasClass("in") ? self2.leave(self2) : self2.enter(self2); 714 } 715 }; 716 Tooltip.prototype.destroy = function() { 717 var that = this; 718 clearTimeout(this.timeout); 719 this.hide(function() { 720 that.$element.off("." + that.type).removeData("bs." + that.type); 721 if (that.$tip) { 722 that.$tip.detach(); 723 } 724 that.$tip = null; 725 that.$arrow = null; 726 that.$viewport = null; 727 that.$element = null; 728 }); 729 }; 730 function Plugin(option) { 731 return this.each(function() { 732 var $this = $(this); 733 var data = $this.data("bs.tooltip"); 734 var options = typeof option == "object" && option; 735 if (!data && /destroy|hide/.test(option)) return; 736 if (!data) $this.data("bs.tooltip", data = new Tooltip(this, options)); 737 if (typeof option == "string") data[option](); 738 }); 739 } 740 var old = $.fn.tooltip; 741 $.fn.tooltip = Plugin; 742 $.fn.tooltip.Constructor = Tooltip; 743 $.fn.tooltip.noConflict = function() { 744 $.fn.tooltip = old; 745 return this; 746 }; 747 }(jQuery); 748 +function($) { 749 var Tab = function(element) { 750 this.element = $(element); 751 }; 752 Tab.VERSION = "3.3.7"; 753 Tab.TRANSITION_DURATION = 150; 754 Tab.prototype.show = function() { 755 var $this = this.element; 756 var $ul = $this.closest("ul:not(.dropdown-menu)"); 757 var selector = $this.data("target"); 758 if (!selector) { 759 selector = $this.attr("href"); 760 selector = selector && selector.replace(/.*(?=#[^\s]*$)/, ""); 761 } 762 if ($this.parent("li").hasClass("active")) return; 763 var $previous = $ul.find(".active:last a"); 764 var hideEvent = $.Event("hide.bs.tab", { 765 relatedTarget: $this[0] 766 }); 767 var showEvent = $.Event("show.bs.tab", { 768 relatedTarget: $previous[0] 769 }); 770 $previous.trigger(hideEvent); 771 $this.trigger(showEvent); 772 if (showEvent.isDefaultPrevented() || hideEvent.isDefaultPrevented()) return; 773 var $target = $(selector); 774 this.activate($this.closest("li"), $ul); 775 this.activate($target, $target.parent(), function() { 776 $previous.trigger({ 777 type: "hidden.bs.tab", 778 relatedTarget: $this[0] 779 }); 780 $this.trigger({ 781 type: "shown.bs.tab", 782 relatedTarget: $previous[0] 783 }); 784 }); 785 }; 786 Tab.prototype.activate = function(element, container, callback) { 787 var $active = container.find("> .active"); 788 var transition = callback && $.support.transition && ($active.length && $active.hasClass("fade") || !!container.find("> .fade").length); 789 function next() { 790 $active.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded", false); 791 element.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded", true); 792 if (transition) { 793 element[0].offsetWidth; 794 element.addClass("in"); 795 } else { 796 element.removeClass("fade"); 797 } 798 if (element.parent(".dropdown-menu").length) { 799 element.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded", true); 800 } 801 callback && callback(); 802 } 803 $active.length && transition ? $active.one("bsTransitionEnd", next).emulateTransitionEnd(Tab.TRANSITION_DURATION) : next(); 804 $active.removeClass("in"); 805 }; 806 function Plugin(option) { 807 return this.each(function() { 808 var $this = $(this); 809 var data = $this.data("bs.tab"); 810 if (!data) $this.data("bs.tab", data = new Tab(this)); 811 if (typeof option == "string") data[option](); 812 }); 813 } 814 var old = $.fn.tab; 815 $.fn.tab = Plugin; 816 $.fn.tab.Constructor = Tab; 817 $.fn.tab.noConflict = function() { 818 $.fn.tab = old; 819 return this; 820 }; 821 var clickHandler = function(e) { 822 e.preventDefault(); 823 Plugin.call($(this), "show"); 824 }; 825 $(document).on("click.bs.tab.data-api", '[data-toggle="tab"]', clickHandler).on("click.bs.tab.data-api", '[data-toggle="pill"]', clickHandler); 826 }(jQuery); 827 +function($) { 828 var Collapse = function(element, options) { 829 this.$element = $(element); 830 this.options = $.extend({}, Collapse.DEFAULTS, options); 831 this.$trigger = $('[data-toggle="collapse"][href="#' + element.i
831d + '"],[data-toggle="collapse"][data-target="#' + element.id + '"]'); 832 this.transitioning = null; 833 if (this.options.parent) { 834 this.$parent = this.getParent(); 835 } else { 836 this.addAriaAndCollapsedClass(this.$element, this.$trigger); 837 } 838 if (this.options.toggle) this.toggle(); 839 }; 840 Collapse.VERSION = "3.3.7"; 841 Collapse.TRANSITION_DURATION = 350; 842 Collapse.DEFAULTS = { 843 toggle: true 844 }; 845 Collapse.prototype.dimension = function() { 846 var hasWidth = this.$element.hasClass("width"); 847 return hasWidth ? "width" : "height"; 848 }; 849 Collapse.prototype.show = function() { 850 if (this.transitioning || this.$element.hasClass("in")) return; 851 var activesData; 852 var actives = this.$parent && this.$parent.children(".panel").children(".in, .collapsing"); 853 if (actives && actives.length) { 854 activesData = actives.data("bs.collapse"); 855 if (activesData && activesData.transitioning) return; 856 } 857 var startEvent = $.Event("show.bs.collapse"); 858 this.$element.trigger(startEvent); 859 if (startEvent.isDefaultPrevented()) return; 860 if (actives && actives.length) { 861 Plugin.call(actives, "hide"); 862 activesData || actives.data("bs.collapse", null); 863 } 864 var dimension = this.dimension(); 865 this.$element.removeClass("collapse").addClass("collapsing")[dimension](0).attr("aria-expanded", true); 866 this.$trigger.removeClass("collapsed").attr("aria-expanded", true); 867 this.transitioning = 1; 868 var complete = function() { 869 this.$element.removeClass("collapsing").addClass("collapse in")[dimension](""); 870 this.transitioning = 0; 871 this.$element.trigger("shown.bs.collapse"); 872 }; 873 if (!$.support.transition) return complete.call(this); 874 var scrollSize = $.camelCase(["scroll", dimension].join("-")); 875 this.$element.one("bsTransitionEnd", $.proxy(complete, this)).emulateTransitionEnd(Collapse.TRANSITION_DURATION)[dimension](this.$element[0][scrollSize]); 876 }; 877 Collapse.prototype.hide = function() { 878 if (this.transitioning || !this.$element.hasClass("in")) return; 879 var startEvent = $.Event("hide.bs.collapse"); 880 this.$element.trigger(startEvent); 881 if (startEvent.isDefaultPrevented()) return; 882 var dimension = this.dimension(); 883 this.$element[dimension](this.$element[dimension]())[0].offsetHeight; 884 this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded", false); 885 this.$trigger.addClass("collapsed").attr("aria-expanded", false); 886 this.transitioning = 1; 887 var complete = function() { 888 this.transitioning = 0; 889 this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse"); 890 }; 891 if (!$.support.transition) return complete.call(this); 892 this.$element[dimension](0).one("bsTransitionEnd", $.proxy(complete, this)).emulateTransitionEnd(Collapse.TRANSITION_DURATION); 893 }; 894 Collapse.prototype.toggle = function() { 895 this[this.$element.hasClass("in") ? "hide" : "show"](); 896 }; 897 Collapse.prototype.getParent = function() { 898 return $(this.options.parent).find('[data-toggle="collapse"][data-parent="' + this.options.parent + '"]').each($.proxy(function(i, element) { 899 var $element = $(element); 900 this.addAriaAndCollapsedClass(getTargetFromTrigger($element), $element); 901 }, this)).end(); 902 }; 903 Collapse.prototype.addAriaAndCollapsedClass = function($element, $trigger) { 904 var isOpen = $element.hasClass("in"); 905 $element.attr("aria-expanded", isOpen); 906 $trigger.toggleClass("collapsed", !isOpen).attr("aria-expanded", isOpen); 907 }; 908 function getTargetFromTrigger($trigger) { 909 var href; 910 var target = $trigger.attr("data-target") || (href = $trigger.attr("href")) && href.replace(/.*(?=#[^\s]+$)/, ""); 911 return $(target); 912 } 913 function Plugin(option) { 914 return this.each(function() { 915 var $this = $(this); 916 var data = $this.data("bs.collapse"); 917 var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == "object" && option); 918 if (!data && options.toggle && /show|hide/.test(option)) options.toggle = false; 919 if (!data) $this.data("bs.collapse", data = new Collapse(this, options)); 920 if (typeof option == "string") data[option](); 921 }); 922 } 923 var old = $.fn.collapse; 924 $.fn.collapse = Plugin; 925 $.fn.collapse.Constructor = Collapse; 926 $.fn.collapse.noConflict = function() { 927 $.fn.collapse = old; 928 return this; 929 }; 930 $(document).on("click.bs.collapse.data-api", '[data-toggle="collapse"]', function(e) { 931 var $this = $(this); 932 if (!$this.attr("data-target")) e.preventDefault(); 933 var $target = getTargetFromTrigger($this); 934 var data = $target.data("bs.collapse"); 935 var option = data ? "toggle" : $this.data(); 936 Plugin.call($target, option); 937 });
938 }(jQuery); 939 +function($) { 940 function transitionEnd() { 941 var el = document.createElement("bootstrap"); 942 var transEndEventNames = { 943 WebkitTransition: "webkitTransitionEnd", 944 MozTransition: "transitionend", 945 OTransition: "oTransitionEnd otransitionend", 946 transition: "transitionend" 947 }; 948 for (var name in transEndEventNames) { 949 if (el.style[name] !== void 0) { 950 return { end: transEndEventNames[name] }; 951 } 952 } 953 return false; 954 } 955 $.fn.emulateTransitionEnd = function(duration) { 956 var called = false; 957 var $el = this; 958 $(this).one("bsTransitionEnd", function() { 959 called = true; 960 }); 961 var callback = function() { 962 if (!called) $($el).trigger($.support.transition.end); 963 }; 964 setTimeout(callback, duration); 965 return this; 966 }; 967 $(function() { 968 $.support.transition = transitionEnd(); 969 if (!$.support.transition) return; 970 $.event.special.bsTransitionEnd = { 971 bindType: $.support.transition.end, 972 delegateType: $.support.transition.end, 973 handle: function(e) { 974 if ($(e.target).is(this)) return e.handleObj.handler.apply(this, arguments); 975 } 976 }; 977 }); 978 }(jQuery); 979 (function() { 980 if (jQuery == void 0) { 981 console.log("Jquery not included!"); 982 return; 983 } 984 var $ = jQuery; 985 function isIE_fun() { 986 var myNav = navigator.userAgent.toLowerCase(); 987 return myNav.indexOf("msie") != -1 ? parseInt(myNav.split("msie")[1]) : false; 988 } 989 var isIE = isIE_fun(); 990 var players = 0; 991 var youtube_api_state = 0;
992 var vimeo_api_state = 0; 993 jQuery.fn.extend({ 994 ensureLoad: function(handler) { 995 return this.each(function() { 996 if (this.complete || this.readyState === 4) { 997 handler.call(this); 998 } else if (this.readyState === "uninitialized" && this.src.indexOf("data:") === 0) { 999 $(this).trigger("error"); 1000 handler.call(this); 1001 } else { 1002 $(this).one("load", handler); 1003 if (isIE && this.src != void 0 && this.src.indexOf("?") == -1) { 1004 this.src = this.src + "?" + (/* @__PURE__ */ new Date()).getTime(); 1005 } 1006 } 1007 }); 1008 } 1009 }); 1010 window.video_background = function($holder, in_parameters) { 1011 this.hidden = false; 1012 this.$holder = $holder; 1013 this.isVimeoPlaying = true; 1014 this.isVimeoMute = 1; 1015 this.id = "video_background_video_" + players; 1016 players++; 1017 this.parameters = { 1018 position: "absolute", 1019 "z-index": "-1", 1020 video_ratio: false, 1021 loop: true, 1022 autoplay: true, 1023 muted: false, 1024 mp4: false, 1025 webm: false, 1026 ogg: false, 1027 youtube: false, 1028 vimeo: false, 1029 controls: 1, 1030 controls_position: "bottom-right", 1031 priority: "html5", 1032 fallback_image: false, 1033 sizing: "fill", 1034 // fill || adjust 1035 start: 0, 1036 video_overlay: 0, 1037 mobile_play: "no", 1038 tranitionIn: true 1039 }; 1040 $.each( 1041 in_parameters, 1042 $.proxy(function(index, obj) { 1043 this.parameters[index] = obj; 1044 }, this) 1045 ); 1046 this.$video_holder = $( 1047 '<div id="' + this.id + '" class="evb-video-holder"></div>' 1048 ).appendTo($holder).css({ 1049 "z-index": this.parameters["z-index"], 1050 position: this.parameters.position, 1051 top: 0, 1052 left: 0, 1053 right: 0, 1054 bottom: 0, 1055 overflow: "hidden" 1056 }); 1057 this.ismobile = navigator.userAgent.match( 1058 /(iPad)|(iPhone)|(iPod)|(android)|(webOS)/i 1059 ); 1060 this.decision = "image"; 1061 var allow_mobile_videos = ZionBuilderFrontend.allow_video_on_mobile; 1062 if (!this.ismobile || allow_mobile_videos) { 1063 this.decision = this.parameters.priority; 1064 if (this.parameters.youtube !== false) { 1065 this.decision = "youtube"; 1066 } else if (this.parameters.vimeo !== false) { 1067 this.decision = "vimeo"; 1068 } else { 1069 this.decision = "html5"; 1070 } 1071 } 1072 if (this.decision == "image") { 1073 this.make_image(); 1074 } else if (this.decision == "youtube") { 1075 this.make_youtube(); 1076 } else if (this.decision == "vimeo") { 1077 this.make_vimeo(); 1078 } else { 1079 this.make_video(); 1080 } 1081 return this; 1082 }; 1083 window.video_background.prototype = { 1084 // Make html5 video 1085 make_video: function() { 1086 var parameters = (this.parameters.autoplay ? "autoplay " : "") + (this.parameters.loop ? 'loop onended="this.play()" ' : ""); 1087 parameters += this.parameters.muted ? " muted " : ""; 1088 var str = '<video width="100%" height="100%" ' + parameters + ">"; 1089 if (this.parameters.mp4 !== false) { 1090 str += '<source src="' + this.parameters.mp4 + '" type="video/mp4"></source>'; 1091 } 1092 if (this.parameters.webm !== false) { 1093 str += '<source src="' + this.parameters.webm + '" type="video/webm"></source>'; 1094 } 1095 if (this.parameters.ogg !== false) { 1096 str += '<source src="' + this.parameters.ogg + '" type="video/ogg"></source>'; 1097 } 1098 str += "</video>"; 1099 this.$video = $(str).addClass("object-fit__cover"); 1100 this.$video_holder.append(this.$video); 1101 this.video = this.$video.get(0); 1102 if (typeof Modernizr == "object" && !Modernizr.objectfit) { 1103 if (this.parameters.video_ratio !== false) { 1104 this.resize_timeout = false; 1105 $(window).resize( 1106 $.proxy(function() { 1107 clearTimeout(this.resize_timeout); 1108 this.resize_timeout = setTimeout( 1109 $.proxy(this.video_resize, this), 1110 10 1111 ); 1112 }, this) 1113 ); 1114 this.video_resize(); 1115 } 1116 } else { 1117 this.$video.css({ width: "100%", height: "100%" });
1118 } 1119 this.$video_holder.closest(".zn-videoBg").addClass("is-loaded"); 1120 if (this.parameters.muted) { 1121 this.mute(); 1122 } 1123 if (this.parameters.controls) { 1124 this.make_controls(); 1125 } 1126 }, 1127 video_resize: function(self2) { 1128 this.$video = typeof self2 !== "undefined" && self2 === true ? this.$video.children("iframe") : this.$video; 1129 var w = this.$video_holder.width(); 1130 var h = this.$video_holder.height(); 1131 var new_width = w; 1132 var new_height = w / this.parameters.video_ratio; 1133 if (new_height < h) { 1134 new_height = h; 1135 new_width = h * this.parameters.video_ratio; 1136 } 1137 new_height = Math.ceil(new_height); 1138 new_width = Math.ceil(new_width); 1139 var top = Math.round(h / 2 - new_height / 2); 1140 var left = Math.round(w / 2 - new_width / 2); 1141 this.$video.attr("width", new_width); 1142 this.$video.attr("height", new_height); 1143 this.$video.css({ 1144 position: "absolute", 1145 top: top + "px", 1146 left: left + "px" 1147 }); 1148 }, 1149 //Make youtube 1150 make_youtube: function() { 1151 var $html = $("html"); 1152 var pars = { 1153 loop: this.parameters.loop ? 1 : 0, 1154 start: this.parameters.start, 1155 autoplay: this.parameters.autoplay ? 1 : 0, 1156 controls: 0, 1157 showinfo: 0, 1158 wmode: "transparent", 1159 iv_load_policy: 3, 1160 modestbranding: 1, 1161 rel: 0, 1162 mute: this.parameters.muted ? 1 : 0 1163 }; 1164 if (this.parameters.loop) { 1165 pars["playlist"] = this.parameters.youtube; 1166 } 1167 this.$video = $( 1168 '<iframe id="' + this.id + '_yt" allowfullscreen="allowfullscreen" width="640" height="360" src="https://www.youtube.com/embed/' + this.parameters.youtube + "?enablejsapi=1&" + $.param(pars) + '" frameborder="0"></iframe>' 1169 ).appendTo(this.$video_holder).css({ 1170 position: "absolute" 1171 }); 1172 this.youtube_ready = false; 1173 if (youtube_api_state == 0) { 1174 var tag = document.createElement("script"); 1175 tag.src = "https://www.youtube.com/iframe_api"; 1176 var firstScriptTag = document.getElementsByTagName("script")[0]; 1177 firstScriptTag.parentNode.insertBefore(tag, firstScriptTag); 1178 youtube_api_state = 1; 1179 window.onYouTubeIframeAPIReady = $.proxy(function() { 1180 $html.trigger("yt_loaded"); 1181 this.build_youtube(); 1182 youtube_api_state = 2; 1183 }, this); 1184 } else if (youtube_api_state == 1) { 1185 $html.bind("yt_loaded", $.proxy(this.build_youtube, this)); 1186 } else if (youtube_api_state == 2) { 1187 this.build_youtube(); 1188 } 1189 }, 1190 build_youtube: function() { 1191 this.player = new YT.Player(this.id + "_yt", { 1192 height: "100%", 1193 width: "100%", 1194 videoId: this.parameters.youtube, 1195 events: { 1196 onReady: $.proxy(this.youtube_ready_fun, this) 1197 } 1198 }); 1199 }, 1200 youtube_ready_fun: function(event) { 1201 this.youtube_ready = true; 1202 this.$video = $("#" + this.id + "_yt"); 1203 this.$video_holder.closest(".zn-videoBg").addClass("is-loaded"); 1204 if (this.parameters.video_ratio !== false) { 1205 this.resize_timeout = false; 1206 $(window).resize( 1207 $.proxy(function() { 1208 clearTimeout(this.resize_timeout); 1209 this.resize_timeout = setTimeout( 1210 $.proxy(this.video_resize, this), 1211 10 1212 ); 1213 }, this) 1214 ); 1215 this.video_resize(); 1216 } 1217 if (this.parameters.muted) { 1218 this.mute(); 1219 } 1220 if (this.parameters.controls) { 1221 this.make_controls(); 1222 } 1223 }, 1224 //Make vimeo 1225 make_vimeo: function() { 1226 $("html"); 1227 this.$video = $('<div id="' + this.id + '_vm"></div>').appendTo(this.$video_holder).css({ 1228 position: "absolute",
1229 top: 0, 1230 left: 0, 1231 right: 0, 1232 bottom: 0 1233 }); 1234 this.vimeo_ready = false; 1235 if (vimeo_api_state === 0) { 1236 $.getScript( 1237 "//player.vimeo.com/api/player.js", 1238 $.proxy(function() { 1239 this.build_vimeo(); 1240 vimeo_api_state = 1; 1241 }, this) 1242 ); 1243 } else if (vimeo_api_state == 1) { 1244 this.build_vimeo(); 1245 } 1246 }, 1247 build_vimeo: function() { 1248 console.log(this.parameters); 1249 var pars = { 1250 id: this.parameters.vimeo, 1251 loop: this.parameters.loop ? 1 : 0, 1252 autoplay: this.parameters.autoplay ? 1 : 0, 1253 muted: this.parameters.muted ? 1 : 0 1254 }; 1255 this.player = new Vimeo.Player(this.id + "_vm", pars); 1256 var self2 = this; 1257 this.player.on("loaded", function() { 1258 self2.vimeo_ready_fun(); 1259 }); 1260 this.player.on("play", function() { 1261 self2.isVimeoPlaying = true; 1262 }); 1263 this.player.on("pause", function() { 1264 self2.isVimeoPlaying = false; 1265 }); 1266 this.player.getPaused().then(function(paused) { 1267 self2.isVimeoPlaying = !paused; 1268 }); 1269 this.player.on("volumechange", function(e) { 1270 self2.isVimeoMute = e.volume === 0 ? true : false; 1271 }); 1272 }, 1273 vimeo_ready_fun: function(event) { 1274 this.vimeo_ready = true; 1275 this.$video = $("#" + this.id + "_vm"); 1276 this.$video_holder.closest(".zn-videoBg").addClass("is-loaded"); 1277 if (this.parameters.video_ratio !== false) { 1278 this.resize_timeout = false; 1279 $(window).resize( 1280 $.proxy(function() { 1281 clearTimeout(this.resize_timeout); 1282 this.resize_timeout = setTimeout( 1283 $.proxy(this.video_resize, this), 1284 10 1285 ); 1286 }, this) 1287 ); 1288 this.video_resize(true); 1289 } 1290 if (this.parameters.start) { 1291 this.player.setCurrentTime(this.parameters.start); 1292 } 1293 if (this.parameters.muted) { 1294 this.isVimeoMute = true; 1295 this.mute(); 1296 } 1297 if (this.parameters.controls) { 1298 this.make_controls(); 1299 } 1300 }, 1301 make_controls: function() { 1302 var self2 = this, $controls; 1303 $controls = '<ul class="zn-videoBg-controls" data-position="' + this.parameters.controls_position + '">'; 1304 $controls += '<li><a href="#" class="btn-toggleplay zn-videoBg-controls-toggleplay">'; 1305 $controls += '<i class="kl-icon glyphicon glyphicon-play circled-icon ' + (!this.isPlaying() ? "paused" : "") + '"></i>'; 1306 $controls += "</a></li>"; 1307 $controls += '<li><a href="#" class="btn-audio zn-videoBg-controls-togglemute">'; 1308 $controls += '<i class="kl-icon glyphicon glyphicon-volume-up circled-icon ci-xsmall ' + (this.parameters.muted ? "mute" : "") + '"></i>'; 1309 $controls += "</a></li>"; 1310 $controls += "</ul>"; 1311 $($controls).appendTo(this.$video_holder); 1312 this.$video_holder.find(".btn-toggleplay").on("click", function(e) { 1313 e.preventDefault(); 1314 self2.toggle_play(); 1315 $(this).children("i").toggleClass("paused"); 1316 }); 1317 this.$video_holder.find(".btn-audio").on("click", function(e) { 1318 e.preventDefault(); 1319 self2.toggle_mute(); 1320 $(this).children("i").toggleClass("mute"); 1321 }); 1322 }, 1323 // Make image 1324 make_image: function() { 1325 if (this.parameters.fallback_image === false || this.parameters.fallback_image == "") { 1326 return; 1327 } 1328 this.$img = $( 1329 '<img src="' + this.parameters.fallback_image + '" class="cover-fit-img" />' 1330 ).appendTo(this.$video_holder).css({ 1331 position: "absolute" 1332 }); 1333 if (typeof Modernizr == "object" && !Modernizr.objectfit) { 1334 this.$img.ensureLoad($.proxy(this.image_loaded, this)); 1335 } else { 1336 this.$img.css({ width: "100%", height: "100%" });
1337 } 1338 this.$video_holder.closest(".zn-videoBg").addClass("is-loaded"); 1339 }, 1340 image_loaded: function() { 1341 this.original_width = this.$img.width(); 1342 this.original_height = this.$img.height(); 1343 this.resize_timeout = false; 1344 $(window).resize( 1345 $.proxy(function() { 1346 clearTimeout(this.resize_timeout); 1347 this.resize_timeout = setTimeout( 1348 $.proxy(this.image_resize, this), 1349 10 1350 ); 1351 }, this) 1352 ); 1353 this.image_resize(); 1354 }, 1355 image_resize: function() { 1356 var w = this.$video_holder.width(); 1357 var h = this.$video_holder.height(); 1358 var new_width = w; 1359 var new_height = this.original_height / (this.original_width / w); 1360 if (this.parameters.sizing == "adjust" && new_height > h || this.parameters.sizing == "fill" && new_height < h) { 1361 new_height = h; 1362 new_width = this.original_width / (this.original_height / h); 1363 } 1364 new_height = Math.ceil(new_height); 1365 new_width = Math.ceil(new_width); 1366 var top = Math.round(h / 2 - new_height / 2); 1367 var left = Math.round(w / 2 - new_width / 2); 1368 this.$img.css({ 1369 width: new_width + "px", 1370 height: new_height + "px", 1371 top: top + "px", 1372 left: left + "px" 1373 }); 1374 }, 1375 // User Callable Functions 1376 funcIsVimeoPlaying: function(value) { 1377 this.isVimeoPlaying = value; 1378 }, 1379 isPlaying: function() { 1380 if (this.decision == "html5") return !this.video.paused; 1381 else if (this.decision == "youtube" && this.youtube_ready) 1382 return this.player.getPlayerState() === 1; 1383 else if (this.decision == "vimeo" && this.vimeo_ready) { 1384 var self2 = this; 1385 this.player.getPaused().then(function(paused) { 1386 self2.funcIsVimeoPlaying(!paused); 1387 }); 1388 return this.isVimeoPlaying; 1389 } 1390 return false; 1391 }, 1392 // Play 1393 play: function() { 1394 if (this.decision == "html5") this.video.play(); 1395 else if (this.decision == "youtube" && this.youtube_ready) 1396 this.player.playVideo(); 1397 else if (this.decision == "vimeo" && this.vimeo_ready) this.player.play(); 1398 }, 1399 // Pause 1400 pause: function() { 1401 if (this.decision == "html5") this.video.pause(); 1402 else if (this.decision == "youtube" && this.youtube_ready) 1403 this.player.pauseVideo(); 1404 else if (this.decision == "vimeo" && this.vimeo_ready) 1405 this.player.pause(); 1406 }, 1407 // Toogle play 1408 toggle_play: function() { 1409 if (this.isPlaying()) { 1410 this.pause(); 1411 } else this.play(); 1412 }, 1413 funcIsVimeoMute: function(value) { 1414 this.isVimeoMute = value; 1415 }, 1416 // Is mute 1417 isMuted: function() { 1418 if (this.decision == "html5") return !this.video.volume; 1419 else if (this.decision == "youtube" && this.youtube_ready) 1420 return this.player.isMuted(); 1421 else if (this.decision == "vimeo" && this.vimeo_ready) { 1422 var self2 = this; 1423 this.player.getVolume().then(function(volume) { 1424 self2.funcIsVimeoMute(volume === 0 ? true : false); 1425 }); 1426 return this.isVimeoMute; 1427 } 1428 return false; 1429 }, 1430 // Mute 1431 mute: function() { 1432 if (this.decision == "html5") this.video.volume = 0; 1433 else if (this.decision == "youtube" && this.youtube_ready) 1434 this.player.mute(); 1435 else if (this.decision == "vimeo" && this.vimeo_ready) { 1436 this.player.setVolume(0); 1437 } 1438 }, 1439 //Unmute 1440 unmute: function() { 1441 if (this.decision == "html5") this.video.volume = 1; 1442 else if (this.decision == "youtube" && this.youtube_ready) 1443 this.player.unMute(); 1444 else if (this.decision == "vimeo" && this.vimeo_ready) 1445 this.player.setVolume(1); 1446 }, 1447 //Toogle mute 1448 toggle_mute: function() { 1449 if (this.isMuted()) this.unmute(); 1450 else this.mute(); 1451 }, 1452 //Hide 1453 hide: function() { 1454 this.pause(); 1455 this.$video_holder.stop().fadeTo(700, 0); 1456 this.hidden = true; 1457 }, 1458 //Show 1459 show: function() { 1460 this.play(); 1461 this.$video_holder.stop().fadeTo(700, 1); 1462 this.hidden = false; 1463 }, 1464 //Toogle Hidden 1465 toogle_hidden: function() { 1466 if (this.hidden) this.show(); 1467 else this.hide(); 1468 }, 1469 //Rewind 1470 rewind: function() { 1471 if (this.decision == "html5") this.video.currentTime = 0; 1472 else if (this.decision == "youtube" && this.youtube_ready) 1473 this.player.seekTo(0); 1474 else if (this.decision == "vimeo" && this.vimeo_ready) 1475 this.player.setCurrentTime(0); 1476 } 1477 }; 1478 })();
vendor: 16,626 bytes, lines 1479-1818
1479 var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {}; 1480 function getDefaultExportFromCjs(x) { 1481 return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x; 1482 } 1483 var rellax = { exports: {} }; 1484 (function(module) { 1485 (function(root, factory) { 1486 if (module.exports) { 1487 module.exports = factory(); 1488 } else { 1489 root.Rellax = factory(); 1490 } 1491 })(typeof window !== "undefined" ? window : commonjsGlobal, function() { 1492 var Rellax2 = function(el, options) { 1493 var self2 = Object.create(Rellax2.prototype); 1494 var posY = 0; 1495 var screenY = 0; 1496 var posX = 0; 1497 var screenX = 0; 1498 var blocks = []; 1499 var pause = true; 1500 var loop = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.msRequestAnimationFrame || window.oRequestAnimationFrame || function(callback) { 1501 return setTimeout(callback, 1e3 / 60); 1502 }; 1503 var loopId = null; 1504 var supportsPassive = false; 1505 try { 1506 var opts = Object.defineProperty({}, "passive", { 1507 get: function() { 1508 supportsPassive = true; 1509 } 1510 }); 1511 window.addEventListener("testPassive", null, opts); 1512 window.removeEventListener("testPassive", null, opts); 1513 } catch (e) { 1514 } 1515 var clearLoop = window.cancelAnimationFrame || window.mozCancelAnimationFrame || clearTimeout; 1516 var transformProp = window.transformProp || function() { 1517 var testEl = document.createElement("div"); 1518 if (testEl.style.transform === null) { 1519 var vendors = ["Webkit", "Moz", "ms"]; 1520 for (var vendor in vendors) { 1521 if (testEl.style[vendors[vendor] + "Transform"] !== void 0) { 1522 return vendors[vendor] + "Transform"; 1523 } 1524 } 1525 } 1526 return "transform"; 1527 }(); 1528 self2.options = { 1529 speed: -2, 1530 verticalSpeed: null, 1531 horizontalSpeed: null, 1532 breakpoints: [576, 768, 1201], 1533 center: false, 1534 wrapper: null, 1535 relativeToWrapper: false, 1536 round: true, 1537 vertical: true, 1538 horizontal: false, 1539 verticalScrollAxis: "y", 1540 horizontalScrollAxis: "x", 1541 callback: function() { 1542 } 1543 }; 1544 if (options) { 1545 Object.keys(options).forEach(function(key) { 1546 self2.options[key] = options[key]; 1547 }); 1548 } 1549 function validateCustomBreakpoints() { 1550 if (self2.options.breakpoints.length === 3 && Array.isArray(self2.options.breakpoints)) { 1551 var isAscending = true; 1552 var isNumerical = true; 1553 var lastVal; 1554 self2.options.breakpoints.forEach(function(i) { 1555 if (typeof i !== "number") isNumerical = false; 1556 if (lastVal !== null) { 1557 if (i < lastVal) isAscending = false; 1558 } 1559 lastVal = i; 1560 }); 1561 if (isAscending && isNumerical) return; 1562 } 1563 self2.options.breakpoints = [576, 768, 1201]; 1564 console.warn("Rellax: You must pass an array of 3 numbers in ascending order to the breakpoints option. Defaults reverted"); 1565 } 1566 if (options && options.breakpoints) { 1567 validateCustomBreakpoints(); 1568 } 1569 if (!el) { 1570 el = ".rellax"; 1571 } 1572 var elements = typeof el === "string" ? document.querySelectorAll(el) : [el]; 1573 if (elements.length > 0) { 1574 self2.elems = elements; 1575 } else { 1576 console.warn("Rellax: The elements you're trying to select don't exist."); 1577 return; 1578 } 1579 if (self2.options.wrapper) { 1580 if (!self2.options.wrapper.nodeType) { 1581 var wrapper = document.querySelector(self2.options.wrapper); 1582 if (wrapper) { 1583 self2.options.wrapper = wrapper; 1584 } else { 1585 console.warn("Rellax: The wrapper you're trying to use doesn't exist."); 1586 return; 1587 } 1588 } 1589 } 1590 var currentBreakpoint; 1591 var getCurrentBreakpoint = function(w) { 1592 var bp = self2.options.breakpoints; 1593 if (w < bp[0]) return "xs"; 1594 if (w >= bp[0] && w < bp[1]) return "sm"; 1595 if (w >= bp[1] && w < bp[2]) return "md"; 1596 return "lg"; 1597 }; 1598 var cacheBlocks = function() { 1599 for (var i = 0; i < self2.elems.length; i++) { 1600 var block = createBlock(self2.elems[i]); 1601 blocks.push(block); 1602 } 1603 }; 1604 var init = function() { 1605 for (var i = 0; i < blocks.length; i++) { 1606 self2.elems[i].style.cssText = blocks[i].style; 1607 } 1608 blocks = []; 1609 screenY = window.innerHeight; 1610 screenX = window.innerWidth; 1611 currentBreakpoint = getCurrentBreakpoint(screenX); 1612 setPosition(); 1613 cacheBlocks(); 1614 animate(); 1615 if (pause) { 1616 window.addEventListener("resize", init); 1617 pause = false; 1618 update(); 1619 } 1620 }; 1621 var createBlock = function(el2) { 1622 var dataPercentage = el2.getAttribute("data-rellax-percentage"); 1623 var dataSpeed = el2.getAttribute("data-rellax-speed"); 1624 var dataXsSpeed = el2.getAttribute("data-rellax-xs-speed"); 1625 var dataMobileSpeed = el2.getAttribute("data-rellax-mobile-speed"); 1626 var dataTabletSpeed = el2.getAttribute("data-rellax-tablet-speed"); 1627 var dataDesktopSpeed = el2.getAttribute("data-rellax-desktop-speed"); 1628 var dataVerticalSpeed = el2.getAttribute("data-rellax-vertical-speed"); 1629 var dataHorizontalSpeed = el2.getAttribute("data-rellax-horizontal-speed"); 1630 var dataVericalScrollAxis = el2.getAttribute("data-rellax-vertical-scroll-axis"); 1631 var dataHorizontalScrollAxis = el2.getAttribute("data-rellax-horizontal-scroll-axis"); 1632 var dataZindex = el2.getAttribute("data-rellax-zindex") || 0; 1633 var dataMin = el2.getAttribute("data-rellax-min"); 1634 var dataMax = el2.getAttribute("data-rellax-max"); 1635 var dataMinX = el2.getAttribute("data-rellax-min-x"); 1636 var dataMaxX = el2.getAttribute("data-rellax-max-x"); 1637 var dataMinY = el2.getAttribute("data-rellax-min-y"); 1638 var dataMaxY = el2.getAttribute("data-rellax-max-y"); 1639 var mapBreakpoints; 1640 var breakpoints = true; 1641 if (!dataXsSpeed && !dataMobileSpeed && !dataTabletSpeed && !dataDesktopSpeed) { 1642 breakpoints = false; 1643 } else { 1644 mapBreakpoints = { 1645 "xs": dataXsSpeed, 1646 "sm": dataMobileSpeed, 1647 "md": dataTabletSpeed, 1648 "lg": dataDesktopSpeed 1649 }; 1650 } 1651 var wrapperPosY = self2.options.wrapper ? self2.options.wrapper.scrollTop : window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop; 1652 if (self2.options.relativeToWrapper) { 1653 var scrollPosY = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop; 1654 wrapperPosY = scrollPosY - self2.options.wrapper.offsetTop; 1655 } 1656 var posY2 = self2.options.vertical ? dataPercentage || self2.options.center ? wrapperPosY : 0 : 0; 1657 var posX2 = self2.options.horizontal ? dataPercentage || self2.options.center ? self2.options.wrapper ? self2.options.wrapper.scrollLeft : window.pageXOffset || document.documentElement.scrollLeft || document.body.scrollLeft : 0 : 0; 1658 var blockTop = posY2 + el2.getBoundingClientRect().top; 1659 var blockHeight = el2.clientHeight || el2.offsetHeight || el2.scrollHeight; 1660 var blockLeft = posX2 + el2.getBoundingClientRect().left; 1661 var blockWidth = el2.clientWidth || el2.offsetWidth || el2.scrollWidth; 1662 var percentageY = dataPercentage ? dataPercentage : (posY2 - blockTop + screenY) / (blockHeight + screenY); 1663 var percentageX = dataPercentage ? dataPercentage : (posX2 - blockLeft + screenX) / (blockWidth + screenX); 1664 if (self2.options.center) { 1665 percentageX = 0.5; 1666 percentageY = 0.5; 1667 } 1668 var speed = breakpoints && mapBreakpoints[currentBreakpoint] !== null ? Number(mapBreakpoints[currentBreakpoint]) : dataSpeed ? dataSpeed : self2.options.speed; 1669 var verticalSpeed = dataVerticalSpeed ? dataVerticalSpeed : self2.options.verticalSpeed; 1670 var horizontalSpeed = dataHorizontalSpeed ? dataHorizontalSpeed : self2.options.horizontalSpeed; 1671 var verticalScrollAxis = dataVericalScrollAxis ? dataVericalScrollAxis : self2.options.verticalScrollAxis; 1672 var horizontalScrollAxis = dataHorizontalScrollAxis ? dataHorizontalScrollAxis : self2.options.horizontalScrollAxis; 1673 var bases = updatePosition(percentageX, percentageY, speed, verticalSpeed, horizontalSpeed); 1674 var style = el2.style.cssText; 1675 var transform = ""; 1676 var searchResult = /transform\s*:/i.exec(style); 1677 if (searchResult) { 1678 var index = searchResult.index; 1679 var trimmedStyle = style.slice(index); 1680 var delimiter = trimmedStyle.indexOf(";"); 1681 if (delimiter) { 1682 transform = " " + trimmedStyle.slice(11, delimiter).replace(/\s/g, ""); 1683 } else { 1684 transform = " " + trimmedStyle.slice(11).replace(/\s/g, ""); 1685 } 1686 } 1687 return { 1688 baseX: bases.x, 1689 baseY: bases.y, 1690 top: blockTop, 1691 left: blockLeft, 1692 height: blockHeight, 1693 width: blockWidth, 1694 speed, 1695 verticalSpeed, 1696 horizontalSpeed, 1697 verticalScrollAxis, 1698 horizontalScrollAxis, 1699 style, 1700 transform, 1701 zindex: dataZindex, 1702 min: dataMin, 1703 max: dataMax, 1704 minX: dataMinX, 1705 maxX: dataMaxX, 1706 minY: dataMinY, 1707 maxY: dataMaxY 1708 }; 1709 }; 1710 var setPosition = function() { 1711 var oldY = posY; 1712 var oldX = posX; 1713 posY = self2.options.wrapper ? self2.options.wrapper.scrollTop : (document.documentElement || document.body.parentNode || document.body).scrollTop || window.pageYOffset; 1714 posX = self2.options.wrapper ? self2.options.wrapper.scrollLeft : (document.documentElement || document.body.parentNode || document.body).scrollLeft || window.pageXOffset; 1715 if (self2.options.relativeToWrapper) { 1716 var scrollPosY = (document.documentElement || document.body.parentNode || document.body).scrollTop || window.pageYOffset; 1717 posY = scrollPosY - self2.options.wrapper.offsetTop; 1718 } 1719 if (oldY != posY && self2.options.vertical) { 1720 return true; 1721 } 1722 if (oldX != posX && self2.options.horizontal) { 1723 return true; 1724 } 1725 return false; 1726 }; 1727 var updatePosition = function(percentageX, percentageY, speed, verticalSpeed, horizontalSpeed) { 1728 var result = {}; 1729 var valueX = (horizontalSpeed ? horizontalSpeed : speed) * (100 * (1 - percentageX)); 1730 var valueY = (verticalSpeed ? verticalSpeed : speed) * (100 * (1 - percentageY)); 1731 result.x = self2.options.round ? Math.round(valueX) : Math.round(valueX * 100) / 100; 1732 result.y = self2.options.round ? Math.round(valueY) : Math.round(valueY * 100) / 100; 1733 return result; 1734 }; 1735 var deferredUpdate = function() { 1736 window.removeEventListener("resize", deferredUpdate); 1737 window.removeEventListener("orientationchange", deferredUpdate); 1738 (self2.options.wrapper ? self2.options.wrapper : window).removeEventListener("scroll", deferredUpdate); 1739 (self2.options.wrapper ? self2.options.wrapper : document).removeEventListener("touchmove", deferredUpdate); 1740 loopId = loop(update); 1741 }; 1742 var update = function() { 1743 if (setPosition() && pause === false) { 1744 animate(); 1745 loopId = loop(update); 1746 } else { 1747 loopId = null; 1748 window.addEventListener("resize", deferredUpdate); 1749 window.addEventListener("orientationchange", deferredUpdate); 1750 (self2.options.wrapper ? self2.options.wrapper : window).addEventListener("scroll", deferredUpdate, supportsPassive ? { passive: true } : false); 1751 (self2.options.wrapper ? self2.options.wrapper : document).addEventListener("touchmove", deferredUpdate, supportsPassive ? { passive: true } : false); 1752 } 1753 }; 1754 var animate = function() { 1755 var positions; 1756 for (var i = 0; i < self2.elems.length; i++) { 1757 var verticalScrollAxis = blocks[i].verticalScrollAxis.toLowerCase(); 1758 var horizontalScrollAxis = blocks[i].horizontalScrollAxis.toLowerCase(); 1759 var verticalScrollX = verticalScrollAxis.indexOf("x") != -1 ? posY : 0; 1760 var verticalScrollY = verticalScrollAxis.indexOf("y") != -1 ? posY : 0; 1761 var horizontalScrollX = horizontalScrollAxis.indexOf("x") != -1 ? posX : 0; 1762 var horizontalScrollY = horizontalScrollAxis.indexOf("y") != -1 ? posX : 0; 1763 var percentageY = (verticalScrollY + horizontalScrollY - blocks[i].top + screenY) / (blocks[i].height + screenY); 1764 var percentageX = (verticalScrollX + horizontalScrollX - blocks[i].left + screenX) / (blocks[i].width + screenX); 1765 positions = updatePosition(percentageX, percentageY, blocks[i].speed, blocks[i].verticalSpeed, blocks[i].horizontalSpeed); 1766 var positionY = positions.y - blocks[i].baseY; 1767 var positionX = positions.x - blocks[i].baseX; 1768 if (blocks[i].min !== null) { 1769 if (self2.options.vertical && !self2.options.horizontal) { 1770 positionY = positionY <= blocks[i].min ? blocks[i].min : positionY; 1771 } 1772 if (self2.options.horizontal && !self2.options.vertical) { 1773 positionX = positionX <= blocks[i].min ? blocks[i].min : positionX; 1774 } 1775 } 1776 if (blocks[i].minY != null) { 1777 positionY = positionY <= blocks[i].minY ? blocks[i].minY : positionY; 1778 } 1779 if (blocks[i].minX != null) { 1780 positionX = positionX <= blocks[i].minX ? blocks[i].minX : positionX; 1781 } 1782 if (blocks[i].max !== null) { 1783 if (self2.options.vertical && !self2.options.horizontal) { 1784 positionY = positionY >= blocks[i].max ? blocks[i].max : positionY; 1785 } 1786 if (self2.options.horizontal && !self2.options.vertical) { 1787 positionX = positionX >= blocks[i].max ? blocks[i].max : positionX; 1788 } 1789 } 1790 if (blocks[i].maxY != null) { 1791 positionY = positionY >= blocks[i].maxY ? blocks[i].maxY : positionY; 1792 } 1793 if (blocks[i].maxX != null) { 1794 positionX = positionX >= blocks[i].maxX ? blocks[i].maxX : positionX; 1795 } 1796 var zindex = blocks[i].zindex; 1797 var translate = "translate3d(" + (self2.options.horizontal ? positionX : "0") + "px," + (self2.options.vertical ? positionY : "0") + "px," + zindex + "px) " + blocks[i].transform; 1798 self2.elems[i].style[transformProp] = translate; 1799 } 1800 self2.options.callback(positions); 1801 }; 1802 self2.destroy = function() { 1803 for (var i = 0; i < self2.elems.length; i++) { 1804 self2.elems[i].style.cssText = blocks[i].style; 1805 } 1806 if (!pause) { 1807 window.removeEventListener("resize", init); 1808 pause = true; 1809 } 1810 clearLoop(loopId); 1811 loopId = null; 1812 }; 1813 init(); 1814 self2.refresh = init; 1815 return self2; 1816 }; 1817 return Rellax2; 1818 });
1819 })(rellax); 1820 var rellaxExports = rellax.exports; 1821 const Rellax = /* @__PURE__ */ getDefaultExportFromCjs(rellaxExports); 1822 /*! 1823 * znParallax - Parallax jQuery Plugin 1824 * Based on Parallux Responsive jQuery Parallax plugin 1825 * Original author: @tomsarduy 1826 * Licensed under the MIT license 1827 */ 1828 (function($, window2) { 1829 var pluginName = "znParallax", $window = $(window2), is_mobile = false, winHeight = $window.height(), rendered = false, defaults = { 1830 bleed: 0 1831 }; 1832 function debounce(func, wait, immediate) { 1833 var timeout; 1834 return function() { 1835 var context = this, args = arguments; 1836 var later = function() { 1837 timeout = null; 1838 func.apply(context, args); 1839 }; 1840 clearTimeout(timeout); 1841 timeout = setTimeout(later, wait || 100); 1842 }; 1843 } 1844 function Plugin(element, options) { 1845 this.element = element; 1846 this.options = $.extend({}, defaults, options); 1847 this._defaults = defaults; 1848 this._name = pluginName; 1849 this.init(element); 1850 } 1851 Plugin.prototype = { 1852 init: function(element) { 1853 var self2 = this, $el = $(element); 1854 this.$par = $el.parent(); 1855 this.$bg = $el.children().first(); 1856 this.scaleFactor = this.options.bleed ? "scale(" + this.options.bleed + ")" : ""; 1857 this.updateStuff(); 1858 this.render(); 1859 if (!$el.hasClass("is-fixed")) { 1860 $el.addClass("is-fixed"); 1861 } 1862 is_mobile = this.mobileCheck(); 1863 var event = typeof window2.isSmoothScroll !== "undefined" ? "smoothScrollCustomEvent scroll" : "scroll"; 1864 $window.on(event, function() { 1865 self2.mobileCheck(); 1866 if (!is_mobile) { 1867 self2.updateStuff(); 1868 self2.render(); 1869 } 1870 }); 1871 $window.on("orientationchange resize", debounce(function() { 1872 self2.mobileCheck(); 1873 if (!is_mobile) { 1874 self2.updateStuff(); 1875 if (!$el.hasClass("is-fixed")) { 1876 $el.addClass("is-fixed"); 1877 } 1878 } else { 1879 self2.disableParallax(); 1880 } 1881 })); 1882 }, 1883 mobileCheck: function() { 1884 var hasTouch = typeof Modernizr === "object" && Modernizr.touchevents || false; 1885 is_mobile = hasTouch && window2.matchMedia("(max-width: 1024px)").matches; 1886 }, 1887 updateStuff: function() { 1888 var self2 = this; 1889 var updateValues = function() { 1890 winHeight = $window.height(); 1891 self2.parTop = self2.$par.offset().top; 1892 self2.parLeft = Math.ceil(!self2.isRtl() ? self2.$par.offset().left : "-" + ($window.width() - (self2.$par.offset().left + self2.$par.outerWidth()))); 1893 self2.parWidth = self2.$par.outerWidth(); 1894 self2.parHeight = self2.$par.outerHeight(); 1895 $(self2.element).css({ height: self2.parHeight, width: self2.parWidth }); 1896 }; 1897 debounce(updateValues(), 200); 1898 }, 1899 isRtl: function() { 1900 var $html = $("html"); 1901 return $html.is("[dir]") && $html.attr("dir") === "rtl"; 1902 }, 1903 //The Parallax rendering, magic happens here 1904 render: function() { 1905 var $el = $(this.element); 1906 var $scrollY = window2.scrollY || window2.pageYOffset || 0; 1907 var $winST = $window.scrollTop(); 1908 if (!rendered || $winST + winHeight >= this.parTop && $winST <= this.parTop + this.parHeight) { 1909 var $diffElem = (($scrollY - this.parTop) / 1.3).toFixed(0); 1910 $el.addClass("is-visible"); 1911 $el.css({ "transform": "translate3d(" + this.parLeft + "px," + (this.parTop - $scrollY) + "px,0)" + this.scaleFactor }); 1912 this.$bg.css("transform", "translate3d(0," + $diffElem + "px,0)"); 1913 rendered = true; 1914 } else { 1915 $el.removeClass("is-visible"); 1916 } 1917 }, 1918 disableParallax: function() { 1919 $(this.element).removeClass("is-fixed").css({ "transform": "", "height": "" }); 1920 this.$bg.css("transform", ""); 1921 } 1922 }; 1923 $.fn[pluginName] = function(options) { 1924 return this.each(function() { 1925 if (!$.data(this, "plugin_" + pluginName)) { 1926 $.data( 1927 this, 1928 "plugin_" + pluginName, 1929 new Plugin(this, options) 1930 ); 1931 } 1932 }); 1933 }; 1934 })(jQuery, window); 1935 (function($) { 1936 $.ZnbFrontendJs = function() { 1937 this.scope = $(document); 1938 this.zinit(); 1939 }; 1940 $.ZnbFrontendJs.prototype = { 1941 zinit: function() { 1942 var fw = this; 1943 fw.addActions(); 1944 fw.initHelpers($(document)); 1945 fw.refresh_events($(document)); 1946 $(document).trigger("ZnbFrontendJsReady", this); 1947 }, 1948 refresh_events: function(content) { 1949 var fw = this; 1950 fw.contact_forms(content); 1951 fw.doParallax(content); 1952 fw.doObjectParallax(content); 1953 fw.background_video(content); 1954 fw.entryAnimations(content); 1955 fw.objectFitCover(content); 1956 }, 1957 RefreshOnWidthChange: function(content) { 1958 }, 1959 addActions: function() { 1960 var fw = this; 1961 fw.scope.on("ZnWidthChanged", function(e) { 1962 fw.RefreshOnWidthChange(e.content); 1963 $(window).trigger("resize"); 1964 }); 1965 fw.scope.on("ZnNewContent", function(e) { 1966 fw.refresh_events(e.content); 1967 }); 1968 }, 1969 unbind_events: function(scope) { 1970 }, 1971 initHelpers: function(scope) { 1972 var fw = this; 1973 this.helpers = {}; 1974 this.helpers.IsJsonString = function(a) { 1975 try { 1976 JSON.parse(a); 1977 } catch (e) { 1978 return false; 1979 } 1980 return true; 1981 }; 1982 this.helpers.is_null = function(a) { 1983 return a === null; 1984 }; 1985 this.helpers.is_undefined = function(a) { 1986 return typeof a == "undefined" || a === null || a === "" || a === "undefined"; 1987 }; 1988 this.helpers.is_number = function(a) { 1989 return (a instanceof Number || typeof a == "number") && !isNaN(a); 1990 }; 1991 this.helpers.is_true = function(a) { 1992 return a === true || a === "true"; 1993 }; 1994 this.helpers.is_false = function(a) {
1995 return a === false || a === "false"; 1996 }; 1997 this.helpers.throttle = function(func, wait, options) { 1998 var timeout, context, args, result; 1999 var previous = 0; 2000 if (!options) options = {}; 2001 var later = function() { 2002 previous = options.leading === false ? 0 : fw.helpers.date_now; 2003 timeout = null; 2004 result = func.apply(context, args); 2005 if (!timeout) context = args = null; 2006 }; 2007 var throttled = function() { 2008 var now = fw.helpers.date_now; 2009 if (!previous && options.leading === false) previous = now; 2010 var remaining = wait - (now - previous); 2011 context = this; 2012 args = arguments; 2013 if (remaining <= 0 || remaining > wait) { 2014 if (timeout) { 2015 clearTimeout(timeout); 2016 timeout = null; 2017 } 2018 previous = now; 2019 result = func.apply(context, args); 2020 if (!timeout) context = args = null; 2021 } else if (!timeout && options.trailing !== false) { 2022 timeout = setTimeout(later, remaining); 2023 } 2024 return result; 2025 }; 2026 throttled.cancel = function() { 2027 clearTimeout(timeout); 2028 previous = 0; 2029 timeout = context = args = null; 2030 }; 2031 return throttled; 2032 }; 2033 this.helpers.debounce = function(func, wait, immediate) { 2034 var timeout; 2035 return function() { 2036 var context = this, args = arguments; 2037 var later = function() { 2038 timeout = null; 2039 if (!immediate) func.apply(context, args); 2040 }; 2041 var callNow = immediate && !timeout; 2042 clearTimeout(timeout); 2043 timeout = setTimeout(later, wait); 2044 if (callNow) func.apply(context, args); 2045 }; 2046 }; 2047 this.helpers.isInViewport = function(element) { 2048 var rect = element.getBoundingClientRect(); 2049 var html = document.documentElement; 2050 var tolerance = rect.height * 0.75; 2051 return rect.top >= -tolerance && rect.bottom <= (window.innerHeight || html.clientHeight) + tolerance; 2052 }; 2053 this.helpers.date_now = Date.now || function() { 2054 return (/* @__PURE__ */ new Date()).getTime(); 2055 }; 2056 this.helpers.hasTouch = typeof Modernizr == "object" && Modernizr.touchevents || false; 2057 this.helpers.hasTouchMobile = this.helpers.hasTouch && window.matchMedia("(max-width: 1024px)").matches; 2058 this.helpers.ua = navigator.userAgent || ""; 2059 this.helpers.is_mobile_ie = -1 !== this.helpers.ua.indexOf("IEMobile"); 2060 this.helpers.is_firefox = -1 !== this.helpers.ua.indexOf("Firefox"); 2061 this.helpers.isAtLeastIE11 = !!(this.helpers.ua.match(/Trident/) && !this.helpers.ua.match(/MSIE/)); 2062 this.helpers.isIE11 = !!(this.helpers.ua.match(/Trident/) && this.helpers.ua.match(/rv[ :]11/)); 2063 this.helpers.isMac = /^Mac/.test(navigator.platform); 2064 this.helpers.is_safari = /^((?!chrome|android).)*safari/i.test( 2065 this.helpers.ua 2066 ); 2067 this.helpers.isIE10 = navigator.userAgent.match("MSIE 10"); 2068 this.helpers.isIE9 = navigator.userAgent.match("MSIE 9"); 2069 this.helpers.is_EDGE = /Edge\/12./i.test(this.helpers.ua); 2070 this.helpers.is_pb = !this.helpers.is_undefined(window.ZnPbData); 2071 var $body = $("body"); 2072 if (this.helpers.is_EDGE) $body.addClass("is-edge"); 2073 if (this.helpers.isIE11) $body.addClass("is-ie11"); 2074 if (this.helpers.is_safari) $body.addClass("is-safari"); 2075 }, 2076 contact_forms: function(scope) { 2077 var fw = this, element = scope ? scope.find(".zn-contactForm") : $(".zn-contactForm"); 2078 element.each(function(index, el) { 2079 var $el = $(el), time_picker = $el.find(".zn-formItem-field--timepicker"), date_picker = $el.find(".zn-formItem-field--datepicker"), datepicker_lang = date_picker.is("[data-datepickerlang]") ? date_picker.attr("data-datepickerlang") : "", date_format = date_picker.is("[data-dateformat]") ? date_picker.attr("data-dateformat") : "yy-mm-dd", timeformat = time_picker.is("[data-timeformat]") ? time_picker.attr("data-timeformat") : "h:i A"; 2080 if (time_picker.length > 0) { 2081 time_picker.timepicker({ 2082 timeFormat: timeformat, 2083 className: "cf-elm-tp" 2084 }); 2085 } 2086 if (date_picker.length > 0) { 2087 date_picker.datepicker({ 2088 dateFormat: date_format, 2089 showOtherMonths: true 2090 }).datepicker("widget").wrap('<div class="ll-skin-melon"/>'); 2091 if (datepicker_lang !== "") { 2092 $.datepicker.setDefaults($.datepicker.regional[datepicker_lang]); 2093 } 2094 } 2095 $el.on("submit", function(e) { 2096 e.preventDefault(); 2097 if (fw.form_submitting === true) { 2098 return false; 2099 } 2100 fw.form_submitting = true; 2101 var form = $(this), response_container = form.find(".zn_contact_ajax_response:eq(0)"), has_error = false, inputs = { 2102 fields: form.find( 2103 'textarea, select, input[type="text"], input[type="checkbox"], input[type="hidden"]' 2104 ) 2105 }, form_id = response_container.attr("id"), submit_button = form.find(".zn-formSubmit"); 2106 if ((fw.helpers.isIE11 || fw.helpers.isIE10 || fw.helpers.isIE9) && form.is('[action="#"]')) { 2107 form.attr("action", ""); 2108 } 2109 submit_button.addClass("zn-contactForm--loading"); 2110 inputs.fields.each(function() { 2111 var field = $(this), p_container = field.parent(); 2112 if (field.is(":checkbox")) { 2113 if (field.is(":checked")) { 2114 field.val(true); 2115 } else { 2116 field.val(""); 2117 } 2118 } 2119 p_container.removeClass("zn-formItem--invalid"); 2120 if (field.hasClass("zn_validate_not_empty")) { 2121 if (field.is(":checkbox")) { 2122 if (!field.is(":checked")) { 2123 p_container.addClass("zn-formItem--invalid"); 2124 has_error = true; 2125 } 2126 } else { 2127 if (field.val() === "") { 2128 p_container.addClass("zn-formItem--invalid"); 2129 has_error = true; 2130 } 2131 } 2132 } else if (field.hasClass("zn_validate_is_email")) { 2133 if (!field.val().match(/^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/)) { 2134 p_container.addClass("zn-formItem--invalid"); 2135 has_error = true; 2136 } 2137 } else if (field.hasClass("zn_validate_is_numeric")) { 2138 if (isNaN(field.val())) { 2139 p_container.addClass("zn-formItem--invalid"); 2140 has_error = true; 2141 } 2142 } 2143 }); 2144 if (has_error) { 2145 submit_button.removeClass("zn-contactForm--loading"); 2146 fw.form_submitting = false; 2147 return false; 2148 } 2149 var data = form.serialize(); 2150 $.post(form.attr("action"), data).success(function(result) { 2151 fw.form_submitting = false; 2152 submit_button.removeClass("zn-contactForm--loading"); 2153 var response = $(result).find( 2154 "#" + form_id + " > .zn_cf_response" 2155 ), responseContainer = $("#" + form_id), redirect_uri = form.data("redirect"); 2156 responseContainer.html(response); 2157 if (response.hasClass("alert-success")) { 2158 inputs.fields.val(""); 2159 if (redirect_uri) { 2160 window.location.replace(redirect_uri); 2161 } 2162 } 2163 }).error(function() { 2164 console.log("Error loading page"); 2165 }); 2166 return false; 2167 }); 2168 }); 2169 }, 2170 /**
2171 * Easy Video Background 2172 * Based on easy background video plugin 2173 * Example data setup attribute: 2174 * data-video-setup='{ "position": absolute, "loop": true , "autoplay": true, "muted": true, "mp4":"", "webm":"", "ogg":"" }' 2175 */ 2176 background_video: function(scope) { 2177 var fw = this, elements = scope.find(".zn-videoBg:not(.zn-videoBg--no-init)"); 2178 if (!elements.length) return; 2179 elements.each(function(index, el) { 2180 var $video = $(el), $options = $video.is("[data-video-setup]") && fw.helpers.IsJsonString($video.attr("data-video-setup")) ? JSON.parse($video.attr("data-video-setup")) : {}; 2181 if (typeof window.video_background != "undefined") { 2182 new window.video_background($video, $options); 2183 } 2184 }); 2185 }, 2186 doParallax: function(scope) { 2187 var fw = this, $el = $(".js-znParallax", $(scope)); 2188 if ($el.length > 0 && !fw.helpers.hasTouchMobile && typeof $.fn.znParallax != "undefined") { 2189 $el.znParallax(); 2190 } 2191 }, 2192 doObjectParallax: function(scope) { 2193 var fw = this, $el = $(".js-doObjParallax", $(scope)); 2194 if ($el.length > 0 && !fw.helpers.hasTouchMobile && !fw.helpers.is_mobile_ie && typeof Rellax != "undefined") { 2195 new Rellax(".js-doObjParallax"); 2196 } 2197 }, 2198 entryAnimations: function(scope) { 2199 var fw = this, elements = $(scope).find(".zn-animateInViewport"), is = []; 2200 if (elements.length > 0) { 2201 elements.each(function(i, el) { 2202 var $el = $(el); 2203 $el.css("animation-delay", $el.attr("data-anim-delay")); 2204 function animateEntrance() { 2205 if ($(el).parent().hasClass("eluida7543286")) { 2206 console.log(fw.helpers.isInViewport(el)); 2207 } 2208 if (!is[i] && fw.helpers.isInViewport(el)) { 2209 $el.removeClass("zn-animateInViewport").addClass("is-animating"); 2210 is[i] = true; 2211 } 2212 } 2213 animateEntrance(); 2214 $(window).on("scroll", animateEntrance); 2215 }); 2216 } 2217 }, 2218 objectFitCover: function(scope) { 2219 var fw = this; 2220 function coverFillSwitch(container, obj, invert) { 2221 if (!container || !obj) return false; 2222 var objHeight = obj.naturalHeight || obj.videoHeight; 2223 var objWidth = obj.naturalWidth || obj.videoWidth; 2224 var containerRatio = container.offsetWidth / container.offsetHeight; 2225 var objRatio = objWidth / objHeight; 2226 var ratioComparison = false; 2227 if (objRatio >= containerRatio) ratioComparison = true; 2228 if (ratioComparison) { 2229 obj.style.height = "100%"; 2230 obj.style.width = "auto"; 2231 } else { 2232 obj.style.height = "auto"; 2233 obj.style.width = "100%"; 2234 } 2235 } 2236 function applyStandardProperties(container, obj) { 2237 var containerStyle = window.getComputedStyle(container); 2238 if (containerStyle.overflow !== "hidden") 2239 container.style.overflow = "hidden"; 2240 if (containerStyle.position !== "relative" && containerStyle.position !== "absolute" && containerStyle.position !== "fixed") 2241 container.style.position = "relative"; 2242 obj.style.position = "absolute"; 2243 obj.style.top = "50%"; 2244 obj.style.left = "50%"; 2245 obj.style.transform = "translate(-50%,-50%)"; 2246 } 2247 function objectFitInt(el) { 2248 var objs = document.getElementsByClassName(el); 2249 for (var i = 0; i < objs.length; i++) { 2250 var obj = objs[i]; 2251 var container = obj.parentElement; 2252 coverFillSwitch(container, obj); 2253 applyStandardProperties(container, obj); 2254 } 2255 } 2256 if (typeof Modernizr == "object" && !Modernizr.objectfit) { 2257 window.addEventListener( 2258 "load", 2259 objectFitInt("object-fit__cover"), 2260 false 2261 ); 2262 window.addEventListener( 2263 "resize", 2264 fw.helpers.throttle(function() { 2265 var i, obj, container; 2266 var objsCover = document.getElementsByClassName("object-fit__cover"); 2267 for (i = 0; i < objsCover.length; i++) { 2268 obj = objsCover[i]; 2269 container = obj.parentElement; 2270 coverFillSwitch(container, obj); 2271 } 2272 }, 100), 2273 false 2274 ); 2275 } 2276 if ($(".js-object-fit-cover", scope).length !== 0) { 2277 window.addEventListener( 2278 "load", 2279 objectFitInt("js-object-fit-cover"), 2280 false 2281 ); 2282 window.addEventListener( 2283 "resize", 2284 fw.helpers.throttle(function() { 2285 var i, obj, container; 2286 var objsCover = document.getElementsByClassName( 2287 "js-object-fit-cover" 2288 ); 2289 for (i = 0; i < objsCover.length; i++) { 2290 obj = objsCover[i]; 2291 container = obj.parentElement; 2292 coverFillSwitch(container, obj); 2293 } 2294 }, 100), 2295 false 2296 ); 2297 } 2298 } 2299 }; 2300 $(document).ready(function() { 2301 $.znb_frontend_js = new $.ZnbFrontendJs(); 2302 });
2303 })(jQuery); 2304})();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.