/*! * REVOLUTION 6.0.0 UTILS - BUILDER BASIC JS * @version: 1.0 (01.07.2019) * @author ThemePunch */ window.RVS = void 0 === window.RVS ? {} : window.RVS, RVS.F = void 0 === RVS.F ? {} : RVS.F, RVS.ENV = void 0 === RVS.ENV ? {} : RVS.ENV, RVS.LIB = void 0 === RVS.LIB ? {} : RVS.LIB, RVS.V = void 0 === RVS.V ? {} : RVS.V, RVS.S = void 0 === RVS.S ? {} : RVS.S, RVS.C = void 0 === RVS.C ? {} : RVS.C, RVS.WIN = void 0 === RVS.WIN ? jQuery(window) : RVS.WIN, RVS.DOC = void 0 === RVS.DOC ? jQuery(document) : RVS.DOC, jQuery.fn.RSScroll || (jQuery.fn.RSScroll = function(e, t) { if (!e || "string" != typeof e) return this.each(function(t) { var i = jQuery(this); i.data("revsliderps") || i.data("revsliderps", new RSPerfectScrollbar(this, e || {})) }); switch (e) { case "update": return this.each(function() { var e = jQuery(this).data("revsliderps"); e && e.update() }); case "scrollTop": return this.each(function() { this.scrollTop = t }); case "destroy": return this.each(function() { var e = jQuery(this), t = e.data("revsliderps"); t && (t.destroy(), e.removeData("revsliderps")) }) } }) /*! * perfect-scrollbar v1.4.0 * (c) 2018 Hyunje Jun * @license MIT * */ , function(e, t) { "object" == typeof exports && "undefined" != typeof module ? module.exports = t() : "function" == typeof define && define.amd ? define(t) : e.RSPerfectScrollbar = t() }(this, function() { "use strict"; function e(e) { return getComputedStyle(e) } function t(e, t) { for (var i in t) { var r = t[i]; "number" == typeof r && (r += "px"), e.style[i] = r } return e } function i(e) { var t = document.createElement("div"); return t.className = e, t } function r(e, t) { if (!g) throw new Error("No element matching method supported"); return g.call(e, t) } function a(e) { e.remove ? e.remove() : e.parentNode && e.parentNode.removeChild(e) } function o(e, t) { return Array.prototype.filter.call(e.children, function(e) { return r(e, t) }) } function n(e, t) { var i = e.element.classList, r = f.state.scrolling(t); i.contains(r) ? clearTimeout(m[t]) : i.add(r) } function s(e, t) { m[t] = setTimeout(function() { return e.isAlive && e.element.classList.remove(f.state.scrolling(t)) }, e.settings.scrollingThreshold) } function l(e, t) { n(e, t), s(e, t) } function c(e) { if ("function" == typeof window.CustomEvent) return new CustomEvent(e); var t = document.createEvent("CustomEvent"); return t.initCustomEvent(e, !1, !1, void 0), t } function d(e) { return parseInt(e, 10) || 0 } function p(e) { return r(e, "input,[contenteditable]") || r(e, "select,[contenteditable]") || r(e, "textarea,[contenteditable]") || r(e, "button,[contenteditable]") } function u(e, t) { return e.settings.minScrollbarLength && (t = Math.max(t, e.settings.minScrollbarLength)), e.settings.maxScrollbarLength && (t = Math.min(t, e.settings.maxScrollbarLength)), t } function v(e, i) { var r = { width: i.railXWidth }, a = Math.floor(e.scrollTop); i.isRtl ? r.left = i.negativeScrollAdjustment + e.scrollLeft + i.containerWidth - i.contentWidth : r.left = e.scrollLeft, i.isScrollbarXUsingBottom ? r.bottom = i.scrollbarXBottom - a : r.top = i.scrollbarXTop + a, t(i.scrollbarXRail, r); var o = { top: a, height: i.railYHeight }; i.isScrollbarYUsingRight ? i.isRtl ? o.right = i.contentWidth - (i.negativeScrollAdjustment + e.scrollLeft) - i.scrollbarYRight - i.scrollbarYOuterWidth : o.right = i.scrollbarYRight - e.scrollLeft : i.isRtl ? o.left = i.negativeScrollAdjustment + e.scrollLeft + 2 * i.containerWidth - i.contentWidth - i.scrollbarYLeft - i.scrollbarYOuterWidth : o.left = i.scrollbarYLeft + e.scrollLeft, t(i.scrollbarYRail, o), t(i.scrollbarX, { left: i.scrollbarXLeft, width: i.scrollbarXWidth - i.railBorderXWidth }), t(i.scrollbarY, { top: i.scrollbarYTop, height: i.scrollbarYHeight - i.railBorderYWidth }) } function h(e, t) { function i(t) { g[u] = m + S * (t[l] - b), n(e, v), V(e), t.stopPropagation(), t.preventDefault() } function r() { s(e, v), e[h].classList.remove(f.state.clicking), e.event.unbind(e.ownerDocument, "mousemove", i) } var a = t[0], o = t[1], l = t[2], c = t[3], d = t[4], p = t[5], u = t[6], v = t[7], h = t[8], g = e.element, m = null, b = null, S = null; e.event.bind(e[d], "mousedown", function(t) { m = g[u], b = t[l], S = (e[o] - e[a]) / (e[c] - e[p]), e.event.bind(e.ownerDocument, "mousemove", i), e.event.once(e.ownerDocument, "mouseup", r), e[h].classList.add(f.state.clicking), t.stopPropagation(), t.preventDefault() }) } var g = "undefined" != typeof Element && (Element.prototype.matches || Element.prototype.webkitMatchesSelector || Element.prototype.mozMatchesSelector || Element.prototype.msMatchesSelector), f = { main: "ps", element: { thumb: function(e) { return "rs__scrollbar-" + e }, rail: function(e) { return "rs__scrollbar-" + e + "-rail" }, consuming: "ps__child--consume" }, state: { focus: "ps--focus", clicking: "ps--clicking", active: function(e) { return "ps--active-" + e }, scrolling: function(e) { return "ps--scrolling-" + e } } }, m = { x: null, y: null }, b = function(e) { this.element = e, this.handlers = {} }, S = { isEmpty: { configurable: !0 } }; b.prototype.bind = function(e, t) { void 0 === this.handlers[e] && (this.handlers[e] = []), this.handlers[e].push(t), this.element.addEventListener(e, t, !1) }, b.prototype.unbind = function(e, t) { var i = this; this.handlers[e] = this.handlers[e].filter(function(r) { return !(!t || r === t) || (i.element.removeEventListener(e, r, !1), !1) }) }, b.prototype.unbindAll = function() { for (var e in this.handlers) this.unbind(e) }, S.isEmpty.get = function() { var e = this; return Object.keys(this.handlers).every(function(t) { return 0 === e.handlers[t].length }) }, Object.defineProperties(b.prototype, S); var y = function() { this.eventElements = [] }; y.prototype.eventElement = function(e) { var t = this.eventElements.filter(function(t) { return t.element === e })[0]; return t || (t = new b(e), this.eventElements.push(t)), t }, y.prototype.bind = function(e, t, i) { this.eventElement(e).bind(t, i) }, y.prototype.unbind = function(e, t, i) { var r = this.eventElement(e); r.unbind(t, i), r.isEmpty && this.eventElements.splice(this.eventElements.indexOf(r), 1) }, y.prototype.unbindAll = function() { this.eventElements.forEach(function(e) { return e.unbindAll() }), this.eventElements = [] }, y.prototype.once = function(e, t, i) { var r = this.eventElement(e), a = function(e) { r.unbind(t, a), i(e) }; r.bind(t, a) }; var R = function(e, t, i, r, a) { var o; if (void 0 === r && (r = !0), void 0 === a && (a = !1), "top" === t) o = ["contentHeight", "containerHeight", "scrollTop", "y", "up", "down"]; else { if ("left" !== t) throw new Error("A proper axis should be provided"); o = ["contentWidth", "containerWidth", "scrollLeft", "x", "left", "right"] }! function(e, t, i, r, a) { var o = i[0], n = i[1], s = i[2], d = i[3], p = i[4], u = i[5]; void 0 === r && (r = !0), void 0 === a && (a = !1); var v = e.element; e.reach[d] = null, v[s] < 1 && (e.reach[d] = "start"), v[s] > e[o] - e[n] - 1 && (e.reach[d] = "end"), t && (v.dispatchEvent(c("ps-scroll-" + d)), t < 0 ? v.dispatchEvent(c("ps-scroll-" + p)) : t > 0 && v.dispatchEvent(c("ps-scroll-" + u)), r && l(e, d)), e.reach[d] && (t || a) && v.dispatchEvent(c("ps-" + d + "-reach-" + e.reach[d])) }(e, i, o, r, a) }, _ = { isWebKit: "undefined" != typeof document && "WebkitAppearance" in document.documentElement.style, supportsTouch: "undefined" != typeof window && ("ontouchstart" in window || window.DocumentTouch && document instanceof window.DocumentTouch), supportsIePointer: "undefined" != typeof navigator && navigator.msMaxTouchPoints, isChrome: "undefined" != typeof navigator && /Chrome/i.test(navigator && navigator.userAgent) }, V = function(e) { var t = e.element, i = Math.floor(t.scrollTop); e.containerWidth = t.clientWidth, e.containerHeight = t.clientHeight, e.contentWidth = t.scrollWidth, e.contentHeight = t.scrollHeight, t.contains(e.scrollbarXRail) || (o(t, f.element.rail("x")).forEach(function(e) { return a(e) }), t.appendChild(e.scrollbarXRail)), t.contains(e.scrollbarYRail) || (o(t, f.element.rail("y")).forEach(function(e) { return a(e) }), t.appendChild(e.scrollbarYRail)), !e.settings.suppressScrollX && e.containerWidth + e.settings.scrollXMarginOffset < e.contentWidth ? (e.scrollbarXActive = !0, e.railXWidth = e.containerWidth - e.railXMarginWidth, e.railXRatio = e.containerWidth / e.railXWidth, e.scrollbarXWidth = u(e, d(e.railXWidth * e.containerWidth / e.contentWidth)), e.scrollbarXLeft = d((e.negativeScrollAdjustment + t.scrollLeft) * (e.railXWidth - e.scrollbarXWidth) / (e.contentWidth - e.containerWidth))) : e.scrollbarXActive = !1, !e.settings.suppressScrollY && e.containerHeight + e.settings.scrollYMarginOffset < e.contentHeight ? (e.scrollbarYActive = !0, e.railYHeight = e.containerHeight - e.railYMarginHeight, e.railYRatio = e.containerHeight / e.railYHeight, e.scrollbarYHeight = u(e, d(e.railYHeight * e.containerHeight / e.contentHeight)), e.scrollbarYTop = d(i * (e.railYHeight - e.scrollbarYHeight) / (e.contentHeight - e.containerHeight))) : e.scrollbarYActive = !1, e.scrollbarXLeft >= e.railXWidth - e.scrollbarXWidth && (e.scrollbarXLeft = e.railXWidth - e.scrollbarXWidth), e.scrollbarYTop >= e.railYHeight - e.scrollbarYHeight && (e.scrollbarYTop = e.railYHeight - e.scrollbarYHeight), v(t, e), e.scrollbarXActive ? t.classList.add(f.state.active("x")) : (t.classList.remove(f.state.active("x")), e.scrollbarXWidth = 0, e.scrollbarXLeft = 0, t.scrollLeft = 0), e.scrollbarYActive ? t.classList.add(f.state.active("y")) : (t.classList.remove(f.state.active("y")), e.scrollbarYHeight = 0, e.scrollbarYTop = 0, t.scrollTop = 0) }, k = { "click-rail": function(e) { e.event.bind(e.scrollbarY, "mousedown", function(e) { return e.stopPropagation() }), e.event.bind(e.scrollbarYRail, "mousedown", function(t) { var i = t.pageY - window.pageYOffset - e.scrollbarYRail.getBoundingClientRect().top > e.scrollbarYTop ? 1 : -1; e.element.scrollTop += i * e.containerHeight, V(e), t.stopPropagation() }), e.event.bind(e.scrollbarX, "mousedown", function(e) { return e.stopPropagation() }), e.event.bind(e.scrollbarXRail, "mousedown", function(t) { var i = t.pageX - window.pageXOffset - e.scrollbarXRail.getBoundingClientRect().left > e.scrollbarXLeft ? 1 : -1; e.element.scrollLeft += i * e.containerWidth, V(e), t.stopPropagation() }) }, "drag-thumb": function(e) { h(e, ["containerWidth", "contentWidth", "pageX", "railXWidth", "scrollbarX", "scrollbarXWidth", "scrollLeft", "x", "scrollbarXRail"]), h(e, ["containerHeight", "contentHeight", "pageY", "railYHeight", "scrollbarY", "scrollbarYHeight", "scrollTop", "y", "scrollbarYRail"]) }, keyboard: function(e) { var t = e.element, i = function() { return r(t, ":hover") }, a = function() { return r(e.scrollbarX, ":focus") || r(e.scrollbarY, ":focus") }; e.event.bind(e.ownerDocument, "keydown", function(r) { if (!(r.isDefaultPrevented && r.isDefaultPrevented() || r.defaultPrevented) && (i() || a())) { var o = document.activeElement ? document.activeElement : e.ownerDocument.activeElement; if (o) { if ("IFRAME" === o.tagName) o = o.contentDocument.activeElement; else for (; o.shadowRoot;) o = o.shadowRoot.activeElement; if (p(o)) return } var n = 0, s = 0; switch (r.which) { case 37: n = r.metaKey ? -e.contentWidth : r.altKey ? -e.containerWidth : -30; break; case 38: s = r.metaKey ? e.contentHeight : r.altKey ? e.containerHeight : 30; break; case 39: n = r.metaKey ? e.contentWidth : r.altKey ? e.containerWidth : 30; break; case 40: s = r.metaKey ? -e.contentHeight : r.altKey ? -e.containerHeight : -30; break; case 32: s = r.shiftKey ? e.containerHeight : -e.containerHeight; break; case 33: s = e.containerHeight; break; case 34: s = -e.containerHeight; break; case 36: s = e.contentHeight; break; case 35: s = -e.contentHeight; break; default: return } e.settings.suppressScrollX && 0 !== n || e.settings.suppressScrollY && 0 !== s || (t.scrollTop -= s, t.scrollLeft += n, V(e), function(i, r) { var a = Math.floor(t.scrollTop); if (0 === i) { if (!e.scrollbarYActive) return !1; if (0 === a && r > 0 || a >= e.contentHeight - e.containerHeight && r < 0) return !e.settings.wheelPropagation } var o = t.scrollLeft; if (0 === r) { if (!e.scrollbarXActive) return !1; if (0 === o && i < 0 || o >= e.contentWidth - e.containerWidth && i > 0) return !e.settings.wheelPropagation } return !0 }(n, s) && r.preventDefault()) } }) }, wheel: function(t) { function i(t, i, r) { if (!_.isWebKit && a.querySelector("select:focus")) return !0; if (!a.contains(t)) return !1; for (var o = t; o && o !== a;) { if (o.classList.contains(f.element.consuming)) return !0; var n = e(o); if ([n.overflow, n.overflowX, n.overflowY].join("").match(/(scroll|auto)/)) { var s = o.scrollHeight - o.clientHeight; if (s > 0 && !(0 === o.scrollTop && r > 0 || o.scrollTop === s && r < 0)) return !0; var l = o.scrollWidth - o.clientWidth; if (l > 0 && !(0 === o.scrollLeft && i < 0 || o.scrollLeft === l && i > 0)) return !0 } o = o.parentNode } return !1 } function r(e) { var r = function(e) { var t = e.deltaX, i = -1 * e.deltaY; return void 0 !== t && void 0 !== i || (t = -1 * e.wheelDeltaX / 6, i = e.wheelDeltaY / 6), e.deltaMode && 1 === e.deltaMode && (t *= 10, i *= 10), t != t && i != i && (t = 0, i = e.wheelDelta), e.shiftKey ? [-i, -t] : [t, i] }(e), o = r[0], n = r[1]; if (!i(e.target, o, n)) { var s = !1; t.settings.useBothWheelAxes ? t.scrollbarYActive && !t.scrollbarXActive ? (n ? a.scrollTop -= n * t.settings.wheelSpeed : a.scrollTop += o * t.settings.wheelSpeed, s = !0) : t.scrollbarXActive && !t.scrollbarYActive && (o ? a.scrollLeft += o * t.settings.wheelSpeed : a.scrollLeft -= n * t.settings.wheelSpeed, s = !0) : (a.scrollTop -= n * t.settings.wheelSpeed, a.scrollLeft += o * t.settings.wheelSpeed), V(t), (s = s || function(e, i) { var r = Math.floor(a.scrollTop), o = 0 === a.scrollTop, n = r + a.offsetHeight === a.scrollHeight, s = 0 === a.scrollLeft, l = a.scrollLeft + a.offsetWidth === a.scrollWidth; return !(Math.abs(i) > Math.abs(e) ? o || n : s || l) || !t.settings.wheelPropagation }(o, n)) && !e.ctrlKey && (e.stopPropagation(), e.preventDefault()) } } var a = t.element; void 0 !== window.onwheel ? t.event.bind(a, "wheel", r) : void 0 !== window.onmousewheel && t.event.bind(a, "mousewheel", r) }, touch: function(t) { function i(e, i) { var r = Math.floor(d.scrollTop), a = d.scrollLeft, o = Math.abs(e), n = Math.abs(i); if (n > o) { if (i < 0 && r === t.contentHeight - t.containerHeight || i > 0 && 0 === r) return 0 === window.scrollY && i > 0 && _.isChrome } else if (o > n && (e < 0 && a === t.contentWidth - t.containerWidth || e > 0 && 0 === a)) return !0; return !0 } function r(e, i) { d.scrollTop -= i, d.scrollLeft -= e, V(t) } function a(e) { return e.targetTouches ? e.targetTouches[0] : e } function o(e) { return !(e.pointerType && "pen" === e.pointerType && 0 === e.buttons || (!e.targetTouches || 1 !== e.targetTouches.length) && (!e.pointerType || "mouse" === e.pointerType || e.pointerType === e.MSPOINTER_TYPE_MOUSE)) } function n(e) { if (o(e)) { var t = a(e); p.pageX = t.pageX, p.pageY = t.pageY, u = (new Date).getTime(), null !== h && clearInterval(h) } } function s(t, i, r) { if (!d.contains(t)) return !1; for (var a = t; a && a !== d;) { if (a.classList.contains(f.element.consuming)) return !0; var o = e(a); if ([o.overflow, o.overflowX, o.overflowY].join("").match(/(scroll|auto)/)) { var n = a.scrollHeight - a.clientHeight; if (n > 0 && !(0 === a.scrollTop && r > 0 || a.scrollTop === n && r < 0)) return !0; var s = a.scrollLeft - a.clientWidth; if (s > 0 && !(0 === a.scrollLeft && i < 0 || a.scrollLeft === s && i > 0)) return !0 } a = a.parentNode } return !1 } function l(e) { if (o(e)) { var t = a(e), n = { pageX: t.pageX, pageY: t.pageY }, l = n.pageX - p.pageX, c = n.pageY - p.pageY; if (s(e.target, l, c)) return; r(l, c), p = n; var d = (new Date).getTime(), h = d - u; h > 0 && (v.x = l / h, v.y = c / h, u = d), i(l, c) && e.preventDefault() } } function c() { t.settings.swipeEasing && (clearInterval(h), h = setInterval(function() { t.isInitialized ? clearInterval(h) : v.x || v.y ? Math.abs(v.x) < .01 && Math.abs(v.y) < .01 ? clearInterval(h) : (r(30 * v.x, 30 * v.y), v.x *= .8, v.y *= .8) : clearInterval(h) }, 10)) } if (_.supportsTouch || _.supportsIePointer) { var d = t.element, p = {}, u = 0, v = {}, h = null; _.supportsTouch ? (t.event.bind(d, "touchstart", n), t.event.bind(d, "touchmove", l), t.event.bind(d, "touchend", c)) : _.supportsIePointer && (window.PointerEvent ? (t.event.bind(d, "pointerdown", n), t.event.bind(d, "pointermove", l), t.event.bind(d, "pointerup", c)) : window.MSPointerEvent && (t.event.bind(d, "MSPointerDown", n), t.event.bind(d, "MSPointerMove", l), t.event.bind(d, "MSPointerUp", c))) } } }, O = function(r, a) { var o = this; if (void 0 === a && (a = {}), "string" == typeof r && (r = document.querySelector(r)), !r || !r.nodeName) throw new Error("no element is specified to initialize RSPerfectScrollbar"); for (var n in this.element = r, r.classList.add(f.main), this.settings = { handlers: ["click-rail", "drag-thumb", "keyboard", "wheel", "touch"], maxScrollbarLength: null, minScrollbarLength: null, scrollingThreshold: 1e3, scrollXMarginOffset: 0, scrollYMarginOffset: 0, suppressScrollX: !1, suppressScrollY: !1, swipeEasing: !0, useBothWheelAxes: !1, wheelPropagation: !0, wheelSpeed: 1 }, a) o.settings[n] = a[n]; this.containerWidth = null, this.containerHeight = null, this.contentWidth = null, this.contentHeight = null; var s = function() { return r.classList.add(f.state.focus) }, l = function() { return r.classList.remove(f.state.focus) }; this.isRtl = "rtl" === e(r).direction, this.isNegativeScroll = function() { var e, t = r.scrollLeft; return r.scrollLeft = -1, e = r.scrollLeft < 0, r.scrollLeft = t, e }(), this.negativeScrollAdjustment = this.isNegativeScroll ? r.scrollWidth - r.clientWidth : 0, this.event = new y, this.ownerDocument = r.ownerDocument || document, this.scrollbarXRail = i(f.element.rail("x")), r.appendChild(this.scrollbarXRail), this.scrollbarX = i(f.element.thumb("x")), this.scrollbarXRail.appendChild(this.scrollbarX), this.scrollbarX.setAttribute("tabindex", 0), this.event.bind(this.scrollbarX, "focus", s), this.event.bind(this.scrollbarX, "blur", l), this.scrollbarXActive = null, this.scrollbarXWidth = null, this.scrollbarXLeft = null; var c = e(this.scrollbarXRail); this.scrollbarXBottom = parseInt(c.bottom, 10), isNaN(this.scrollbarXBottom) ? (this.isScrollbarXUsingBottom = !1, this.scrollbarXTop = d(c.top)) : this.isScrollbarXUsingBottom = !0, this.railBorderXWidth = d(c.borderLeftWidth) + d(c.borderRightWidth), t(this.scrollbarXRail, { display: "block" }), this.railXMarginWidth = d(c.marginLeft) + d(c.marginRight), t(this.scrollbarXRail, { display: "" }), this.railXWidth = null, this.railXRatio = null, this.scrollbarYRail = i(f.element.rail("y")), r.appendChild(this.scrollbarYRail), this.scrollbarY = i(f.element.thumb("y")), this.scrollbarYRail.appendChild(this.scrollbarY), this.scrollbarY.setAttribute("tabindex", 0), this.event.bind(this.scrollbarY, "focus", s), this.event.bind(this.scrollbarY, "blur", l), this.scrollbarYActive = null, this.scrollbarYHeight = null, this.scrollbarYTop = null; var p = e(this.scrollbarYRail); this.scrollbarYRight = parseInt(p.right, 10), isNaN(this.scrollbarYRight) ? (this.isScrollbarYUsingRight = !1, this.scrollbarYLeft = d(p.left)) : this.isScrollbarYUsingRight = !0, this.scrollbarYOuterWidth = this.isRtl ? function(t) { var i = e(t); return d(i.width) + d(i.paddingLeft) + d(i.paddingRight) + d(i.borderLeftWidth) + d(i.borderRightWidth) }(this.scrollbarY) : null, this.railBorderYWidth = d(p.borderTopWidth) + d(p.borderBottomWidth), t(this.scrollbarYRail, { display: "block" }), this.railYMarginHeight = d(p.marginTop) + d(p.marginBottom), t(this.scrollbarYRail, { display: "" }), this.railYHeight = null, this.railYRatio = null, this.reach = { x: r.scrollLeft <= 0 ? "start" : r.scrollLeft >= this.contentWidth - this.containerWidth ? "end" : null, y: r.scrollTop <= 0 ? "start" : r.scrollTop >= this.contentHeight - this.containerHeight ? "end" : null }, this.isAlive = !0, this.settings.handlers.forEach(function(e) { return k[e](o) }), this.lastScrollTop = Math.floor(r.scrollTop), this.lastScrollLeft = r.scrollLeft, this.event.bind(this.element, "scroll", function(e) { return o.onScroll(e) }), V(this) }; return O.prototype.update = function() { this.isAlive && (this.negativeScrollAdjustment = this.isNegativeScroll ? this.element.scrollWidth - this.element.clientWidth : 0, t(this.scrollbarXRail, { display: "block" }), t(this.scrollbarYRail, { display: "block" }), this.railXMarginWidth = d(e(this.scrollbarXRail).marginLeft) + d(e(this.scrollbarXRail).marginRight), this.railYMarginHeight = d(e(this.scrollbarYRail).marginTop) + d(e(this.scrollbarYRail).marginBottom), t(this.scrollbarXRail, { display: "none" }), t(this.scrollbarYRail, { display: "none" }), V(this), R(this, "top", 0, !1, !0), R(this, "left", 0, !1, !0), t(this.scrollbarXRail, { display: "" }), t(this.scrollbarYRail, { display: "" })) }, O.prototype.onScroll = function(e) { this.isAlive && (V(this), R(this, "top", this.element.scrollTop - this.lastScrollTop), R(this, "left", this.element.scrollLeft - this.lastScrollLeft), this.lastScrollTop = Math.floor(this.element.scrollTop), this.lastScrollLeft = this.element.scrollLeft) }, O.prototype.destroy = function() { this.isAlive && (this.event.unbindAll(), a(this.scrollbarX), a(this.scrollbarY), a(this.scrollbarXRail), a(this.scrollbarYRail), this.removePsClasses(), this.element = null, this.scrollbarX = null, this.scrollbarY = null, this.scrollbarXRail = null, this.scrollbarYRail = null, this.isAlive = !1) }, O.prototype.removePsClasses = function() { this.element.className = this.element.className.split(" ").filter(function(e) { return !e.match(/^ps([-_].+|)$/) }).join(" ") }, O }), function() { var e, t, i = null, r = null, a = null, o = null; RVS.DOC.on("click", "#rs_copyright", function() { RVS.F.RSDialog.create({ modalid: "#rbm_copyright", bgopacity: .25 }) }), RVS.DOC.on("click", "#rbm_copyright .rbm_close", function() { RVS.F.RSDialog.close() }), RVS.DOC.on("click", ".copyright_sel", function() { jQuery(".copyright_sel").removeClass("selected"), jQuery(".crm_content_wrap").removeClass("selected"), this.className += " selected", document.getElementById("crm_" + this.dataset.crm).className += " selected" }), RVS.F.capitalise = function(e) { return e.substr(0, 1).toUpperCase() + e.substr(1) }, RVS.F.capitaliseAll = function(e) { var t = e.split(" "); for (var i in t) t[i] = t[i].substr(0, 1).toUpperCase() + t[i].substr(1); return t.join(" ") }, RVS.F.debug = function(e) { console.log(e) }, RVS.F.compareVersion = function(e, t) { if ("string" != typeof e) return !1; if ("string" != typeof t) return !1; e = e.split("."), t = t.split("."); const i = Math.min(e.length, t.length); for (let r = 0; r < i; ++r) { if (e[r] = parseInt(e[r], 10), t[r] = parseInt(t[r], 10), e[r] > t[r]) return 1; if (e[r] < t[r]) return -1 } return e.length == t.length ? 0 : e.length < t.length ? -1 : 1 }, RVS.DOC.on("click", "#rbmas_activateplugin", function() { var e = jQuery("#rbmas_purchasekey").val(); RVS.F.ajaxRequest("activate_plugin", { code: e }, function(t) { t.success && (RVS.ENV.activated = !0, RVS.ENV.code = e, jQuery(".rbmas_close").click(), RVS.DOC.trigger("registrationdone"), void 0 !== RVS && void 0 !== RVS.F && (void 0 !== RVS.F.updateDraw && RVS.F.updateDraw(), void 0 !== RVS.F.isActivated && RVS.F.isActivated(), void 0 !== RVS.F.notifications && RVS.F.notifications())) }) }), RVS.F.openAddImageDialog = function(e, t, i) { e || (e = RVS_LANG.select_image), "undefined" != typeof wp && void 0 !== wp.media ? u(e, t, i) : v(e, t) }, RVS.F.openAddVideoDialog = function(e, t, i) { e || (e = RVS_LANG.select_image), "undefined" != typeof wp && void 0 !== wp.media && p(e, t, i) }, RVS.F.getLayerIcon = function(e) { return "zone" === e ? "storage" : "shape" === e ? "crop_landscape" : "image" === e ? "filter_hdr" : "video" === e ? "live_tv" : "audio" === e ? "audiotrack" : "button" === e ? "radio_button_checked" : "column" === e ? "view_column" : "group" === e ? "format_shapes" : "row" === e ? "reorder" : "object" === e ? "filter_drama" : "title" }; var n, s, l, c, d, p = function(e, t, i) { null == i && (i = !1); var r = wp.media({ title: e, multiple: i, library: {}, button: { text: "Insert" } }); r.on("select", function() { var e = r.state().get("selection").first().toJSON(), a = r.state().get("selection"), o = []; 1 == i ? (a.map(function(e) { var t = e.toJSON(), i = {}; i.url = t.url, i.id = t.id, i.width = t.width, i.height = t.height, o.push(i) }), t(o)) : t(e.url, e.id, e.width, e.height) }), r.open() }, u = function(e, t, i) { null == i && (i = !1); var r = wp.media({ title: e, multiple: i, library: { type: "image" }, button: { text: "Insert" } }); r.on("select", function() { var e = r.state().get("selection").first().toJSON(), a = r.state().get("selection"), o = []; 1 == i ? (a.map(function(e) { var t = e.toJSON(), i = { url: t.url, id: t.id, width: t.width, height: t.height }; o.push(i) }), t(o)) : t(e.url, e.id, e.width, e.height) }), r.open() }, v = function(e, t) { //track var i = "type=image&post_id=0&TB_iframe=true&height=450&width=960"; i = encodeURI(i), tb_show(e, custom_admin_url + "/filemanager/dialog.php?" + i), window.getImg = function() { void 0 !== iframe_img && t(iframe_img), tb_remove() } }; RVS.F.setCookie = function(e, t, i) { var r = new Date; r.setTime(r.getTime() + 24 * i * 60 * 60 * 1e3); var a = "expires=" + r.toUTCString(); document.cookie = e + "=" + t + ";" + a + ";path=/" }, RVS.F.getCookie = function(e) { for (var t = e + "=", i = decodeURIComponent(document.cookie).split(";"), r = 0; r < i.length; r++) { for (var a = i[r]; " " == a.charAt(0);) a = a.substring(1); if (0 == a.indexOf(t)) return a.substring(t.length, a.length) } return "" }, RVS.F.toObject = function(e) { for (var t = {}, i = 0; i < e.length; ++i) t[i] = e[i]; return t }, RVS.F.RSDialog = { create: function(e) { e.modalid = e.modalid.replace("#", ""); var t = jQuery('.rb-modal-wrapper[data-modal="' + e.modalid + '"]'); t.addClass("_TPRB_"), t.length ? (l = t.find(".rb-modal-inner"), c = t.find(".rb_modal"), d || (d = jQuery("#rb_modal_underlay")), e.hasOwnProperty("bgopacity") || (e.bgopacity = .05), s && s[0].dataset.modal !== e.modalid && (n = s), s = t, t.show(), d.css("z-index", parseInt(t.css("z-index"), 10) - 1).show(), "rbm_decisionModal" === e.modalid && RVS.F.RSDialog.doCancelModal(e), RVS.F.RSDialog.center(), tpGS.gsap.to(d, .3, { opacity: e.bgopacity, ease: tpGS.Power3.EaseInOut }), tpGS.gsap.fromTo(t, .3, { autoAlpha: 0, scale: .9 }, { autoAlpha: 1, scale: 1, ease: tpGS.Power3.EaseInOut })) : console.log("modal error: " + e.modalid) }, setDragScroll: function(e) { e > 0 ? (c.draggable({ handle: ".rbm_header", axis: !1, cancel: ".rbm_close" }), l.RSScroll("destroy")) : (c.draggable({ handle: ".rbm_header", axis: "x", cancel: ".rbm_close" }), l.RSScroll({ wheelPropagation: !0, suppressScrollX: !1, minScrollbarLength: 30 })) }, center: function() { if (s) { var e = Math.max(.5 * window.innerHeight - .5 * c.height(), 0), t = "auto"; s[0].dataset.centerineditor && (t = Math.round(.5 * RVS.C.rb.width() - .5 * c.width())), RVS.F.RSDialog.setDragScroll(e), c.css({ marginTop: Math.ceil(e), marginLeft: t, left: 0, top: 0 }), l.RSScroll("update") } }, close: function(e) { s && (tpGS.gsap.killTweensOf(s), s.hide().css("opacity", 0)), !n && d && (tpGS.gsap.killTweensOf(d), d.hide().css("opacity", 0)), d.css("z-index", 999995), s = n, n = void 0 }, doCancelModal: function(e) { var t, i; document.getElementById("decmod_icon").innerHTML = e.icon, document.getElementById("decmod_title").innerHTML = e.title, document.getElementById("decmod_maintxt").innerHTML = e.maintext, document.getElementById("decmod_subtxt").innerHTML = e.subtext, void 0 !== e.do ? (t = document.getElementById("decmod_do_icon"), i = document.getElementById("decmod_do_txt"), void 0 !== t && (t.innerHTML = e.do.icon), void 0 !== i && (i.innerHTML = e.do.text), jQuery("#decmod_do_btn").show().off("click").on("click", function() { void 0 !== e.do.event && RVS.DOC.trigger(e.do.event, e.do.eventparam), !0 !== e.do.keepDialog && (RVS.F.RSDialog.close(), RVS.F.RSDialog.close()) })) : jQuery("#decmod_do_btn").hide(), void 0 !== e.cancel ? (t = document.getElementById("decmod_dont_icon"), i = document.getElementById("decmod_dont_txt"), void 0 !== t && (t.innerHTML = e.cancel.icon), void 0 !== i && (i.innerHTML = e.cancel.text), jQuery("#decmod_dont_btn").show().off("click").on("click", function() { RVS.F.RSDialog.close() })) : jQuery("#decmod_dont_btn").hide(), e.swapbuttons ? jQuery("#decmod_do_btn").css({ float: "right", marginLeft: "10px", marginRight: "0px" }) : jQuery("#decmod_do_btn").css({ float: "none", marginLeft: "0px", marginRight: "10px" }) } }, RVS.DOC.on("mousedown", ".rb_modal", function() { RVS.S.clickStartOnModal = !0 }).on("mouseup", ".rb_modal", function() { setTimeout(function() { RVS.S.clickStartOnModal = !1 }, 50) }), RVS.DOC.on("click", ".rb-modal-content", function() { s && !0 !== RVS.S.clickStartOnModal && s.find(".rbm_close").click(), RVS.S.clickStartOnModal = !1 }).on("click", ".rb_modal", function(e) { e.stopPropagation() }).on("keydown", function(e, t) { "27" == e.keyCode && s && s.find(".rbm_close").click() }), jQuery(window).on("resize", RVS.F.RSDialog.center), RVS.F.triggerShowHideDep = function(e, t) { void 0 === e.dataset.show || void 0 === e.dataset.hide || "radio" === e.type && !e.checked ? RVS.F.showHideDep({ target: e.dataset.showhide, nortarget: e.dataset.hideshow, value: void 0 === t ? e.value : t, depend: e.dataset.showhidedep }) : RVS.F.showHideGroups({ hide: e.dataset.hide, show: e.dataset.show, val: t, showprio: e.dataset.showprio }) }, RVS.F.triggerInput = function(e) { if (void 0 !== e.inp) { var t = e.inp.split(","); for (var i in e.when = "true" === e.when || "false" !== e.when && e.when, e.whennot = "true" === e.whennot || "false" !== e.whennot && e.whennot, t) if (t.hasOwnProperty(i)) { var r = jQuery(t[i].replace("*val*", e.dep)); void 0 !== e.val && (e.val = e.val.replace("*val*", e.dep), (void 0 !== e.when && e.dep == e.when || void 0 !== e.whennot && e.dep != e.whennot || void 0 === e.when && void 0 === e.whennot) && ("checkbox" === r[0].type ? r.checked = "false" !== e.val && !1 !== e.val : r.val(e.val))), r.trigger("change") } } }, RVS.F.showHideDep = function(e) { var t = jQuery(e.target), i = jQuery(e.nortarget), r = "true" === e.depend || "false" !== e.depend && e.depend; "string" == typeof r && r.indexOf("!!") >= 0 ? (r = r.replace("!!", ""), e.value !== r ? (t.show().removeClass("showhide_hidden"), i.hide().addClass("showhide_hidden")) : (t.hide().addClass("showhide_hidden"), i.show().removeClass("showhide_hidden"))) : e.value === r ? (t.show().removeClass("showhide_hidden"), i.hide().addClass("showhide_hidden")) : (t.hide().addClass("showhide_hidden"), i.show().removeClass("showhide_hidden")) }, RVS.F.showHideGroups = function(e) { void 0 !== e.val && (e.show = e.show.replace(/\*val\*/g, e.val).replace(/ /g, ""), e.hide = e.hide.replace(/\*val\*/g, e.val).replace(/ /g, "")), "hide" === e.showprio ? (jQuery(e.show).show(), jQuery(e.hide).hide()) : (jQuery(e.hide).hide(), jQuery(e.show).show()) }, RVS.F.updateEasyInput = function(e) { e.nval = "false" !== e.nval && ("true" === e.nval || e.nval), e.path = void 0 === e.path ? "settings." : e.path; var t = void 0, i = "", r = e.el.type, a = e.el.dataset; switch (r) { case "checkbox": case "text": case "textarea": case "select-one": case "select-multiple": if (e.multiselection) for (var o in RVS.selLayers) RVS.selLayers.hasOwnProperty(o) && (i = void 0 === e.nval ? RVS.F.getDeepVal({ root: e.root, path: e.path + RVS.selLayers[o] + "." + e.el.dataset.r }) : e.nval, t = null == t || t == i ? i : void 0 !== a.multiplaceholder ? a.multiplaceholder : ""); else t = void 0 === e.nval ? RVS.F.getDeepVal({ root: e.root, path: e.path + e.el.dataset.r }) : e.nval; void 0 === t && void 0 !== e.el.dataset.default && (t = e.el.dataset.default), "select-one" === r && (e.el.className.indexOf("setboxes") >= 0 && RVS.F.checkAvailableTagS2({ select: jQuery(e.el), val: t }), e.el.value = t, jQuery(e.el).trigger("change.select2RS")), "select-multiple" === r && (jQuery.isArray(t) || (t = t.split(",")), jQuery(e.el).val(t), jQuery(e.el).trigger("change.select2RS")), void 0 === a.unselect && void 0 === a.select || RVS.F.setUnsetSelected({ unselect: a.unselect, select: a.select, val: e.el.value, rval: a.rval, prval: a.prval, prvalif: a.prvalif }), "checkbox" === r ? e.el.checked = void 0 === t ? void 0 : "false" !== t && !1 !== t : (e.el.value = t, e.el.history = e.el.value), "layer_action_type" === e.el.id && (e.el.value = RVS_LANG["layeraction_" + e.el.value]), void 0 !== e.el.value && "undefined" !== e.el.value || (e.el.value = ""), "text" === r && e.el.className.indexOf("my-color-field") >= 0 && jQuery(e.el).rsColorPicker("refresh"); break; case "radio": if (e.multiselection) for (var o in RVS.selLayers) RVS.selLayers.hasOwnProperty(o) && (i = void 0 === e.nval ? e.el.value === RVS.F.getDeepVal({ root: e.root, path: e.path + RVS.selLayers[o] + "." + e.el.dataset.r }) : e.nval, t = null == t || t == i ? i : ""); else t = void 0 === e.nval ? e.el.value === RVS.F.getDeepVal({ root: e.root, path: e.path + e.el.dataset.r }) : e.nval; e.el.checked = t, void 0 === a.unselect && void 0 === a.select || e.el.checked.checked && RVS.F.setUnsetSelected({ unselect: a.unselect, select: a.select, val: e.el.checked, rval: a.rval, prval: a.prval, prvalif: a.prvalif }) } }, RVS.F.updateEasyInputs = function(e) { e.path = void 0 === e.path ? "settings." : e.path, jQuery(e.container).find(".easyinit").each(function(t) { if (RVS.F.updateEasyInput({ el: this, path: e.path, multiselection: e.multiselection, root: e.root }), "init" === e.trigger || e.visualUpdate) { var i = jQuery(this); "init" === e.trigger && i.trigger("init"), "checkbox" === this.type && RVS.F.turnOnOffVisUpdate({ input: i }) } }) }, RVS.F.getDeepValue = function(e, t) { if ("string" == typeof t && (t = t.split(".")), t.length > 1) { var i = t.shift(); return e.hasOwnProperty(i) ? RVS.F.getDeepValue(e[i], t) : void 0 } return e.hasOwnProperty(t[0]) ? e[t[0]] : void 0 }, RVS.F.writeDeepPath = function(e, t, i) { if ("string" == typeof t) { var r = t.split("."), a = r.length, o = a - 1, n = e; if (a) for (var s = 0; s < a; s++) s < o ? n = n[r[s]] : n[r[s]] = i } }, RVS.F.getConcVals = function(e, t) { return e.replace("#size#", t).replace("#slide#", RVS.S.slideId).replace("#curslidetrans#", RVS.S.slideTrans).replace("#actionindex#", RVS.S.actionIdx).replace("#targetlayer#", RVS.S.actionTrgtLayerId).replace("#frame#", "timeline.frames." + RVS.S.keyFrame).replace("#framekey#", RVS.S.keyFrame) }, RVS.F.getDeepVal = function(e) { if (!(e.path.indexOf("#targetlayer#") >= 0) || void 0 !== RVS.S.actionTrgtLayerId && "none" !== RVS.S.actionTrgtLayerId) return RVS.F.getDeepValue(void 0 === e.root ? RVS.SLIDER : e.root, RVS.F.getConcVals(e.path, void 0 === e.screen ? RVS.screen : e.screen)) }, RVS.F.minMaxCheck = function(e) { return e.v = "wrong" !== e.v && void 0 !== e.max ? Math.min(e.v, e.max) : e.v, e.v = "wrong" !== e.v && void 0 !== e.min ? Math.max(e.v, e.min) : e.v, e.v }, RVS.F.checkNumInput = function(e) { var t = jQuery.isNumeric(e.val), i = t ? e.val : e.val.replace(/[^\d||-]+/g, ""), r = t ? "" : e.val.replace(/\d+/, ""), a = void 0 !== e.history ? e.history.replace(/\d+/, "") : "px", o = void 0 !== e.allowed ? e.allowed.toLowerCase().split(",") : ["px"], n = ""; if (i = "" === i ? "wrong" : i, r = r.toLowerCase(), jQuery.inArray("random", o) >= 0 && "{" === r[0] && "}" === r[r.length - 1] || jQuery.inArray("cycle", o) >= 0 && "[" === r[0] && "]" === r[r.length - 1]) return e.val = e.val.replace(/[^[\d||%||\-||{||}||.||,||\[||\]]+/g, ""), e.val; if (jQuery.inArray("#/#", o) >= 0 && "#" === r[0] && "#" === r[r.length - 1] && "/" === e.val[2]) return e.val; for (var s in o) o.hasOwnProperty(s) && (r != o[s] && r != "-" + o[s] || (n = o[s])); return "wrong" === i && "" === n && e.val.length > 0 ? "badvalue" : (i = "wrong" === i ? 0 : i, "%" === n || "px" === n || "ms" === n || "deg" === n || "char" === n || "-%" === n || "-px" === n || "-ms" === n || "-deg" === n ? RVS.F.minMaxCheck({ v: i, min: e.min, max: e.max }) + n : "" !== n ? n.toLowerCase() : e.val.length <= 1 || e.val == i ? jQuery.inArray("none", o) >= 0 && 0 === i ? "none" : (a = jQuery.inArray(a, o) >= 0 && ("px" === a || "%" === a || "ms" === a || "deg" === a || "char" === a) ? a : jQuery.inArray("px", o) >= 0 ? "px" : jQuery.inArray("ms", o) >= 0 ? "ms" : jQuery.inArray("%", o) >= 0 ? "%" : jQuery.inArray("deg", o) >= 0 ? "deg" : jQuery.inArray("char", o) >= 0 ? "char" : "", RVS.F.minMaxCheck({ v: i, min: e.min, max: e.max }) + a) : "badvalue") }, RVS.DOC.on("change init update focus", ".tos2, .basicinput, .scblockinput, .slideinput, .sliderinput, .globalinput, .layerinput, .navinput, .navstyleinput, .indeplayerinput, .actioninput, .targetlayeractioninput", function(e) { var t = e.currentTarget, i = t.dataset, r = "checkbox" === t.type ? this.checked : this.value, a = jQuery(this); if (i.numeric) { if ("badvalue" === (r = RVS.F.checkNumInput({ val: r, allowed: i.allowed, history: i.history, min: i.min, max: i.max }))) return void jQuery(t).addClass("badvalue"); t.className = t.className.replace("badvalue", ""), t.value = r, i.history = t.value } switch ("true" === i.sanitize && (r = RVS.F.sanitize_input(r)), "select-multiple" === t.type && (r = [], jQuery.each(t.selectedOptions, function() { r.push(this.value) })), void 0 === i.showhide && void 0 === i.show && void 0 === i.hide || ("radio" !== t.type || t.checked) && RVS.F.triggerShowHideDep(t, r), void 0 === i.unselect && void 0 === i.select || ("radio" !== t.type || t.checked) && RVS.F.setUnsetSelected({ unselect: i.unselect, select: i.select, val: r, rval: i.rval, prval: i.prval, prvalif: i.prvalif }), void 0 === i.setclasson && void 0 === i.class || ("radio" !== t.type || t.checked) && RVS.F.setUnsetClass({ container: i.setclasson, class: i.class, inversclass: i.inversclass, val: r, rval: i.rval }), void 0 === i.disable && void 0 === i.enable || ("radio" !== t.type || t.checked) && RVS.F.setEnableDisable({ disable: i.disable, enable: i.enable, val: r }), void 0 === i.available && void 0 === i.unavailable || ("radio" !== t.type || t.checked) && RVS.F.setUnAvailable({ unavailable: i.unavailable, available: i.available, val: r }), void 0 !== i.change && (void 0 !== i.changewhen && (r === i.changewhen || !0 === r && "true" === i.changewhen || !1 === r && "false" === i.changewhen) && RVS.F.setInputTo({ field: jQuery(i.change), val: i.changeto, path: i.path }), void 0 !== i.changewhennot && r !== i.changewhennot && (!1 !== r && "false" !== r || i.changewhennot + "" != "false") && (!0 !== r && "true" !== r || i.changewhennot + "" != "true") && RVS.F.setInputTo({ field: jQuery(i.change), val: i.changeto, path: i.path })), void 0 !== i.updatetext && jQuery(i.updatetext).text(r), e.type) { case "change": if (void 0 !== i.r) { if (void 0 !== i.valcheck && RVS.F.hasOwnProperty(i.valcheck) && "function" == typeof RVS.F[i.valcheck]) { r = RVS.F[i.valcheck](r); i.numeric && (r = RVS.F.checkNumInput({ val: r, allowed: i.allowed, history: i.history, min: i.min, max: i.max })), this.value = r, i.history = r } a.hasClass("scblockinput") && RVS.F.writeDeepPath(RVS.SC.BLOCK, i.r, r), a.hasClass("slideinput") && RVS.F.updateSliderObj({ path: RVS.S.slideId + ".slide." + i.r, val: r, evt: i.evt, evtparam: i.evtparam }), a.hasClass("navstyleinput") && (RVS.F.updateSliderObj({ path: i.r + "-def", val: !0 }), jQuery("#" + e.currentTarget.id + "-def").prop("checked", "checked"), RVS.F.turnOnOff(jQuery("#" + e.currentTarget.id + "-def").closest(".tponoffwrap"), !1), RVS.F.updateSliderObj({ path: i.r, val: r, evt: i.evt, evtparam: i.evtparam })), a.hasClass("globalinput") && RVS.F.updateSliderObj({ path: i.r, val: r, evt: i.evt, evtparam: i.evtparam }), a.hasClass("sliderinput") && RVS.F.updateSliderObj({ path: "settings." + i.r, val: r, evt: i.evt, evtparam: i.evtparam }), a.hasClass("layerinput") && "true" !== i.updateviaevt && 1 != i.updateviaevt && RVS.F.updateLayerObj({ path: i.r, val: r, evt: i.evt, evtparam: i.evtparam }), a.hasClass("actioninput") && RVS.F.updateSliderObj({ path: RVS.S.slideId + ".layers." + RVS.selLayers[0] + "." + i.r, val: r, evt: i.evt, evtparam: i.evtparam }), a.hasClass("targetlayeractioninput") && (void 0 !== RVS.S.actionTrgtLayerId && ("" + RVS.S.actionTrgtLayerId).indexOf("static-") >= 0 ? RVS.F.updateSliderObj({ path: RVS.SLIDER.staticSlideId + ".layers." + ("" + RVS.S.actionTrgtLayerId).replace("static-", "") + "." + i.r, val: r, evt: i.evt, evtparam: i.evtparam }) : RVS.F.updateSliderObj({ path: RVS.S.slideId + ".layers." + RVS.S.actionTrgtLayerId + "." + i.r, val: r, evt: i.evt, evtparam: i.evtparam })), a.hasClass("indeplayerinput") && RVS.F.updateSliderObj({ path: RVS.S.slideId + ".layers." + i.r, val: r, evt: i.evt, evtparam: i.evtparam }), a.hasClass("presetToCustom") && (jQuery("#sr_" + i.evtparam + "_style_preset").val("").trigger("change.select2RS"), RVS.SLIDER.settings.nav[i.evtparam].preset = ""), void 0 !== this.dataset.triggerinp && RVS.F.triggerInput({ inp: this.dataset.triggerinp, dep: r, val: this.dataset.triggerinpval, when: this.dataset.triggerwhen, whennot: this.dataset.triggerwhennot }) } a.hasClass("callEvent") && jQuery("body").trigger(i.evt, { event: e, val: r, eventparam: i.evtparam }); break; case "focusin": void 0 !== i.focusevt && RVS.DOC.trigger(i.focusevt, { event: e, val: r, eventparam: i.focusevtparam }), void 0 !== i.responsive && (RVS.S.respInfoBar.visible = !0, RVS.F.showFieldResponsiveValues(this)), "true" == i.cursortoclick ? window.setTimeout(function() { ! function(e) { if ("number" == typeof e.selectionStart) e.selectionStart = e.selectionEnd = e.value.length; else if (void 0 !== e.createTextRange) { e.focus(); var t = e.createTextRange(); t.collapse(!1), t.select() } }(this) }, 1) : a.select() } }), RVS.F.showInfo = function(e) { if (!("register" == e.type && jQuery("#rbm_activate_slider").length > 0)) { var t = "register" == e.type ? e.content : 'info'; "info" == e.type && (t = 'info'), "goodtoknow" == e.type && (t = 'mode_comment'), "warning" == e.type && (t = 'close'), "success" == e.type && (t = 'done'), e.showdelay = null != e.showdelay ? e.showdelay : 0, e.hidedelay = null != e.hidedelay ? e.hidedelay : 0, 0 === jQuery("#rb_maininfo_wrap").length && jQuery("body").append('
'), 0 == jQuery("#eg-toolbox-wrapper").length && jQuery("#rb_maininfo_wrap").append('
').appendTo(jQuery("body")), "register" === e.type ? jQuery("#eg-toolbox-wrapper").append(t) : jQuery("#eg-toolbox-wrapper").append('
' + t + e.content + "
"); var i = jQuery("#eg-toolbox-wrapper").find(".eg-toolbox.newadded"); i.removeClass("newadded"), tpGS.gsap.fromTo(i, .5, { y: -50, autoAlpha: 0, transformOrigin: "50% 50%", transformPerspective: 900, rotationX: -90 }, { autoAlpha: 1, y: 0, rotationX: 0, ease: "back.out", delay: e.showdelay }), "event" != e.hideon ? ("register" == e.type ? i.find(".rbmas_close").click(function() { tpGS.gsap.to(i, .3, { x: 200, ease: "power3.inOut", autoAlpha: 0, onComplete: function() { i.remove() } }) }) : i.click(function() { tpGS.gsap.to(i, .3, { x: 200, ease: "power3.inOut", autoAlpha: 0, onComplete: function() { i.remove() } }) }), 0 != e.hidedelay && "click" != e.hideon && tpGS.gsap.to(i, .3, { x: 200, ease: "power3.inOut", autoAlpha: 0, delay: e.hidedelay + e.showdelay, onComplete: function() { i.remove() } })) : jQuery("#eg-toolbox-wrapper").on(e.event, function() { tpGS.gsap.to(i, .3, { x: 200, ease: "power3.inOut", autoAlpha: 0, onComplete: function() { i.remove() } }) }) } }, RVS.F.showRegisterSliderInfo = function() { void 0 === window.rbmContent && (window.rbmContent = '
', window.rbmContent += '
close
', window.rbmContent += '
', window.rbmContent += '\t
' + RVS_LANG.active_sr_to_access + "
", window.rbmContent += '\t
check' + RVS_LANG.active_sr_tmp_obl + "
", window.rbmContent += '\t
check' + RVS_LANG.addons + "
", window.rbmContent += '\t
check' + RVS_LANG.active_sr_inst_upd + "
", window.rbmContent += '\t
check' + RVS_LANG.active_sr_one_on_one + "
", window.rbmContent += '\t
', window.rbmContent += '\t\t
vpn_key' + (RVS.ENV.selling ? RVS_LANG.ihavelicensekey : RVS_LANG.ihavepurchasecode) + "
", window.rbmContent += '\t\t
shopping_cart' + (RVS.ENV.selling ? RVS_LANG.getlicensekey : RVS_LANG.getpurchasecode) + "", window.rbmContent += "\t
", window.rbmContent += "
", window.rbmContent += '
', window.rbmContent += '\t
' + (RVS.ENV.selling ? RVS_LANG.active_sr_plg_activ_key : RVS_LANG.active_sr_plg_activ) + "
", window.rbmContent += '\t', window.rbmContent += '\tvpn_key' + (RVS.ENV.selling ? RVS_LANG.registerKey : RVS_LANG.registerCode) + "", window.rbmContent += '\t
', window.rbmContent += '\t\t
' + (RVS.ENV.selling ? RVS_LANG.onelicensekey : RVS_LANG.onepurchasekey) + "
", window.rbmContent += '\t\t
' + (RVS.ENV.selling ? RVS_LANG.onelicensekey_info : RVS_LANG.onepurchasekey_info) + "
", window.rbmContent += '\t\t
shopping_cart' + (RVS.ENV.selling ? RVS_LANG.getlicensekey : RVS_LANG.getpurchasecode) + "", RVS.ENV.selling && (window.rbmContent += 'person' + RVS_LANG.membersarea + ""), window.rbmContent += "\t
", window.rbmContent += "
", window.rbmContent += '
', window.rbmContent += "
", RVS.DOC.on("click", "#rbmas_active_plugin_now", function() { return jQuery("#rbm_activate_slider").addClass("rbmas_show_activate"), !1 })), RVS.F.showInfo({ content: window.rbmContent, type: "register", showdelay: 0, hidedelay: 0, hideon: "", event: "" }) }, RVS.F.showWaitAMinute = function(e) { var i = jQuery("#waitaminute"); if (t = void 0 === t ? 0 : t, null != e.delay && (t++, tpGS.gsap.to(i, .3, { autoAlpha: 1, ease: "power3.inOut" }), tpGS.gsap.set(i, { display: "block" }), setTimeout(function() { 0 === --t && tpGS.gsap.to(i, .3, { autoAlpha: 0, ease: "power3.inOut", onComplete: function() { tpGS.gsap.set(i, { display: "block" }) } }) }, e.delay)), null != e.fadeIn && (i && i.length > 0 && (tpGS.gsap.to(i, e.fadeIn / 1e3, { autoAlpha: 1, ease: "power3.inOut" }), tpGS.gsap.set(i, { display: "block" })), t++), null != e.fadeOut && 0 === --t && i && i.length > 0 && tpGS.gsap.to(i, e.fadeOut / 1e3, { autoAlpha: 0, ease: "power3.inOut", onComplete: function() { tpGS.gsap.set(i, { display: "block" }) } }), null != e.text) switch (e.text) { case "progress1": break; default: i.html('
' + e.text + "
") } else i.html('
' + RVS_LANG.please_wait_a_moment + "
"); return !0 }, RVS.F.turnOnOff = function(e, t) { var i = e.find("input"); i.is(":checked") ? t ? (i.removeAttr("checked"), i.trigger("change"), e.addClass("off")) : e.removeClass("off") : t ? (i.prop("checked", "checked"), i.trigger("change"), e.removeClass("off")) : e.addClass("off") }, RVS.F.turnOnOffVisUpdate = function(e) { e.btn = void 0 === e.btn ? e.input.closest(".tponoff_inner") : e.btn, e.wrap = e.btn.closest(".tponoffwrap"), e.input = void 0 === e.input ? btn.find("input") : e.input, e.input.is(":checked") ? (e.wrap.addClass("on"), e.wrap.removeClass("off")) : (e.wrap.removeClass("on"), e.wrap.addClass("off")) }, RVS.F.initOnOff = function(t) { void 0 === t ? jQuery('input[type="checkbox"]').each(function() { var e = jQuery(this); e.hasClass("simplechkbx") || e.hasClass("tponoff") || (e.wrap('
On
Off
'), e.addClass("tponoff")) }) : t.find('input[type="checkbox"]').each(function() { var e = jQuery(this); e.hasClass("simplechkbx") || e.hasClass("tponoff") || (e.wrap('
On
Off
'), e.addClass("tponoff")) }), void 0 === e && (e = !0, RVS.DOC.on("click", ".tponoffwrap", function() { RVS.F.turnOnOff(jQuery(this), !0) })), RVS.F.updateAllOnOff() }, RVS.F.updateAllOnOff = function() { jQuery(".tponoffwrap").each(function() { RVS.F.turnOnOff(jQuery(this), !1) }) }, RVS.F.getAllShortCodes = function() { console.log(""), console.log("%c ------- INSERT SHORTCODE PARAMETERS INTO TEMPLATE LIBRARY --------", "background:#222;color:#bada55"), console.log(""), jQuery(".slider_slug").find("input").each(function() { var e, t = ""; void 0 !== (e = RVS.SC.parseShortCode(this.value)) && void 0 !== e.attributes && (void 0 !== (e = e.attributes).usage && (t += ' usage="' + e.usage + '"'), void 0 !== e.modal && (t += ' modal="' + e.modal + '"'), void 0 !== e.offset && (t += ' offset="' + e.offset + '"'), void 0 !== e.layout && (t += ' layout="' + e.layout + '"'), void 0 !== e.zindex && (t += ' zindex="' + e.zindex + '"'), "" !== t && void 0 !== t && (console.log("%c==== " + e.alias + " ==== ", "background:#222;font-size:13px; line-height:15px;"), console.log("%c" + t, "background:#222;color:#c0392b;font-size:10px; line-height:15px;"), console.log(""))) }), console.log("%c -------------------------------------------------------------------", "background:#222;color:#bada55") }, RVS.F.ajaxRequest = function(e, t, i, r, a, o, n) { var s = { action: RVS.ENV.plugin_dir + "_ajax_action", client_action: e, nonce: RVS.ENV.nonce, data: t }; b(), h(), f(), void 0 === r && (void 0 !== o ? RVS.F.showWaitAMinute({ fadeIn: 500, text: o }) : RVS.F.showWaitAMinute({ fadeIn: 500, text: RVS_LANG.please_wait_a_moment })), jQuery.ajax({ type: "post", url: rev_ajaxurl, dataType: "json", data: s, success: function(t) { if (void 0 !== r || t.is_redirect || RVS.F.showWaitAMinute({ fadeOut: 500 }), g(), !t) return RVS.F.showErrorMessage("Empty ajax response!"), !1; if (-1 == t) return RVS.F.showErrorMessage("ajax error!!!"), !1; if (0 == t) return RVS.F.showErrorMessage("ajax error, action: " + e + " not found"), !1; if (null == t.success) return RVS.F.showErrorMessage("The 'success' param is a must!"), !1; if (0 == t.success) { if (void 0 === a) return RVS.F.showErrorMessage(t.message), !1; "function" == typeof i && i(t) } else "function" == typeof i && i(t), t.message && !0 !== n && S(t.message), t.is_redirect && (location.href = t.redirect_url) }, error: function(t, i, a) { switch (void 0 === r && RVS.F.showWaitAMinute({ fadeOut: 500 }), g(), e) { case "preview_slider": jQuery("#rbm_preview .rbm_close").click(), RVS.F.showInfo({ content: RVS_LANG.previewnotworking, type: "info", showdelay: 0, hidedelay: 5, hideon: "", event: "" }); break; case "check_system": RVS.F.showInfo({ content: RVS_LANG.checksystemnotworking, type: "info", showdelay: 0, hidedelay: 5, hideon: "", event: "" }); break; default: "parsererror" == i && RVS.F.debug(t.responseText), RVS.F.showErrorMessage("Ajax Error!!! " + i) } } }) }, RVS.F.showErrorMessage = function(e) { RVS.F.showInfo({ content: e, type: "warning", showdelay: 0, hidedelay: 3, hideon: "", event: "" }), m() }, RVS.F.setErrorMessageID = function(e) { i = e }, RVS.F.setSuccessMessageID = function(e) { r = e }, RVS.F.hideSuccessMessage = function() { r ? (jQuery("#" + r).hide(), r = null) : jQuery("#success_message").slideUp("slow").fadeOut("slow"), m() }; var h = function() { a && jQuery("#" + a).show() }, g = function() { a && (jQuery("#" + a).hide(), a = null) }, f = function() { if (o) { var e = o.split(","); if (e.length > 1) for (var t = 0; t < e.length; t++) jQuery("#" + e[t]).hide(); else jQuery("#" + o).hide() } }, m = function() { if (o) { var e = o.split(","); if (e.length > 1) for (var t = 0; t < e.length; t++) jQuery("#" + e[t]).show(); else jQuery("#" + o).show(); o = null } }, b = function() { null !== i ? (jQuery("#" + i).hide(), i = null) : jQuery("#error_message").hide() }, S = function(e) { RVS.F.showInfo({ content: e, type: "success", showdelay: 0, hidedelay: 1, hideon: "", event: "" }), m() } }(), window.UniteLayersRev = { addon_callbacks: [] }, UniteLayersRev.addPreventLeave = UniteLayersRev.add_layer_actions = UniteLayersRev.add_layer_change = function() { console.log("Function is depricated. Please Update Addons") }, function(e) { "function" == typeof define && define.amd ? define(["jquery"], e) : "object" == typeof module && module.exports ? module.exports = function(t, i) { return void 0 === i && (i = "undefined" != typeof window ? require("jquery") : require("jquery")(t)), e(i), i } : e(jQuery) }(function(e) { var t = function() { if (e && e.fn && e.fn.select2RS && e.fn.select2RS.amd) var t = e.fn.select2RS.amd; var i, r, a, o; return t && t.requirejs || (t ? r = t : t = {}, function(e) { var t, o, n, s, l = {}, c = {}, d = {}, p = {}, u = Object.prototype.hasOwnProperty, v = [].slice, h = /\.js$/; function g(e, t) { return u.call(e, t) } function f(e, t) { var i, r, a, o, n, s, l, c, p, u, v, g = t && t.split("/"), f = d.map, m = f && f["*"] || {}; if (e) { for (n = (e = e.split("/")).length - 1, d.nodeIdCompat && h.test(e[n]) && (e[n] = e[n].replace(h, "")), "." === e[0].charAt(0) && g && (e = g.slice(0, g.length - 1).concat(e)), p = 0; p < e.length; p++) if ("." === (v = e[p])) e.splice(p, 1), p -= 1; else if (".." === v) { if (0 === p || 1 === p && ".." === e[2] || ".." === e[p - 1]) continue; p > 0 && (e.splice(p - 1, 2), p -= 2) } e = e.join("/") } if ((g || m) && f) { for (p = (i = e.split("/")).length; p > 0; p -= 1) { if (r = i.slice(0, p).join("/"), g) for (u = g.length; u > 0; u -= 1) if ((a = f[g.slice(0, u).join("/")]) && (a = a[r])) { o = a, s = p; break } if (o) break; !l && m && m[r] && (l = m[r], c = p) }!o && l && (o = l, s = c), o && (i.splice(0, s, o), e = i.join("/")) } return e } function m(t, i) { return function() { var r = v.call(arguments, 0); return "string" != typeof r[0] && 1 === r.length && r.push(null), o.apply(e, r.concat([t, i])) } } function b(e) { return function(t) { l[e] = t } } function S(i) { if (g(c, i)) { var r = c[i]; delete c[i], p[i] = !0, t.apply(e, r) } if (!g(l, i) && !g(p, i)) throw new Error("No " + i); return l[i] } function y(e) { var t, i = e ? e.indexOf("!") : -1; return i > -1 && (t = e.substring(0, i), e = e.substring(i + 1, e.length)), [t, e] } function R(e) { return e ? y(e) : [] } function _(e) { return function() { return d && d.config && d.config[e] || {} } } n = function(e, t) { var i, r, a = y(e), o = a[0], n = t[1]; return e = a[1], o && (i = S(o = f(o, n))), o ? e = i && i.normalize ? i.normalize(e, (r = n, function(e) { return f(e, r) })) : f(e, n) : (o = (a = y(e = f(e, n)))[0], e = a[1], o && (i = S(o))), { f: o ? o + "!" + e : e, n: e, pr: o, p: i } }, s = { require: function(e) { return m(e) }, exports: function(e) { var t = l[e]; return void 0 !== t ? t : l[e] = {} }, module: function(e) { return { id: e, uri: "", exports: l[e], config: _(e) } } }, t = function(t, i, r, a) { var o, d, u, v, h, f, y, _ = [], V = typeof r; if (f = R(a = a || t), "undefined" === V || "function" === V) { for (i = !i.length && r.length ? ["require", "exports", "module"] : i, h = 0; h < i.length; h += 1) if ("require" === (d = (v = n(i[h], f)).f)) _[h] = s.require(t); else if ("exports" === d) _[h] = s.exports(t), y = !0; else if ("module" === d) o = _[h] = s.module(t); else if (g(l, d) || g(c, d) || g(p, d)) _[h] = S(d); else { if (!v.p) throw new Error(t + " missing " + d); v.p.load(v.n, m(a, !0), b(d), {}), _[h] = l[d] } u = r ? r.apply(l[t], _) : void 0, t && (o && o.exports !== e && o.exports !== l[t] ? l[t] = o.exports : u === e && y || (l[t] = u)) } else t && (l[t] = r) }, i = r = o = function(i, r, a, l, c) { if ("string" == typeof i) return s[i] ? s[i](r) : S(n(i, R(r)).f); if (!i.splice) { if ((d = i).deps && o(d.deps, d.callback), !r) return; r.splice ? (i = r, r = a, a = null) : i = e } return r = r || function() {}, "function" == typeof a && (a = l, l = c), l ? t(e, i, r, a) : setTimeout(function() { t(e, i, r, a) }, 4), o }, o.config = function(e) { return o(e) }, i._defined = l, (a = function(e, t, i) { if ("string" != typeof e) throw new Error("See almond README: incorrect module build, no module name"); t.splice || (i = t, t = []), g(l, e) || g(c, e) || (c[e] = [e, t, i]) }).amd = { jQuery: !0 } }(), t.requirejs = i, t.require = r, t.define = a), t.define("almond", function() {}), t.define("jquery", [], function() { var t = e || $; return null == t && console && console.error && console.error("Select2: An instance of jQuery or a jQuery-compatible library was not found. Make sure that you are including jQuery before Select2 on your web page."), t }), t.define("select2RS/utils", ["jquery"], function(e) { var t = {}; function i(e) { var t = e.prototype, i = []; for (var r in t) { "function" == typeof t[r] && ("constructor" !== r && i.push(r)) } return i } t.Extend = function(e, t) { var i = {}.hasOwnProperty; function r() { this.constructor = e } for (var a in t) i.call(t, a) && (e[a] = t[a]); return r.prototype = t.prototype, e.prototype = new r, e.__super__ = t.prototype, e }, t.Decorate = function(e, t) { var r = i(t), a = i(e); function o() { var i = Array.prototype.unshift, r = t.prototype.constructor.length, a = e.prototype.constructor; r > 0 && (i.call(arguments, e.prototype.constructor), a = t.prototype.constructor), a.apply(this, arguments) } t.displayName = e.displayName, o.prototype = new function() { this.constructor = o }; for (var n = 0; n < a.length; n++) { var s = a[n]; o.prototype[s] = e.prototype[s] } for (var l = function(e) { var i = function() {}; e in o.prototype && (i = o.prototype[e]); var r = t.prototype[e]; return function() { return Array.prototype.unshift.call(arguments, i), r.apply(this, arguments) } }, c = 0; c < r.length; c++) { var d = r[c]; o.prototype[d] = l(d) } return o }; var r = function() { this.listeners = {} }; r.prototype.on = function(e, t) { this.listeners = this.listeners || {}, e in this.listeners ? this.listeners[e].push(t) : this.listeners[e] = [t] }, r.prototype.trigger = function(e) { var t = Array.prototype.slice, i = t.call(arguments, 1); this.listeners = this.listeners || {}, null == i && (i = []), 0 === i.length && i.push({}), i[0]._type = e, e in this.listeners && this.invoke(this.listeners[e], t.call(arguments, 1)), "*" in this.listeners && this.invoke(this.listeners["*"], arguments) }, r.prototype.invoke = function(e, t) { for (var i = 0, r = e.length; i < r; i++) e[i].apply(this, t) }, t.Observable = r, t.generateChars = function(e) { for (var t = "", i = 0; i < e; i++) { t += Math.floor(36 * Math.random()).toString(36) } return t }, t.bind = function(e, t) { return function() { e.apply(t, arguments) } }, t._convertData = function(e) { for (var t in e) { var i = t.split("-"), r = e; if (1 !== i.length) { for (var a = 0; a < i.length; a++) { var o = i[a]; (o = o.substring(0, 1).toLowerCase() + o.substring(1)) in r || (r[o] = {}), a == i.length - 1 && (r[o] = e[t]), r = r[o] } delete e[t] } } return e }, t.hasScroll = function(t, i) { var r = e(i), a = i.style.overflowX, o = i.style.overflowY; return (a !== o || "hidden" !== o && "visible" !== o) && ("scroll" === a || "scroll" === o || (r.innerHeight() < i.scrollHeight || r.innerWidth() < i.scrollWidth)) }, t.escapeMarkup = function(e) { var t = { "\\": "\", "&": "&", "<": "<", ">": ">", '"': """, "'": "'", "/": "/" }; return "string" != typeof e ? e : String(e).replace(/[&<>"'\/\\]/g, function(e) { return t[e] }) }, t.appendMany = function(t, i) { if ("1.7" === e.fn.jquery.substr(0, 3)) { var r = e(); e.map(i, function(e) { r = r.add(e) }), i = r } t.append(i) }, t.__cache = {}; var a = 0; return t.GetUniqueElementId = function(e) { var t = e.getAttribute("data-select2RS-id"); return null == t && (e.id ? (t = e.id, e.setAttribute("data-select2RS-id", t)) : (e.setAttribute("data-select2RS-id", ++a), t = a.toString())), t }, t.StoreData = function(e, i, r) { var a = t.GetUniqueElementId(e); t.__cache[a] || (t.__cache[a] = {}), t.__cache[a][i] = r }, t.GetData = function(i, r) { var a = t.GetUniqueElementId(i); return r ? t.__cache[a] && null != t.__cache[a][r] ? t.__cache[a][r] : e(i).data(r) : t.__cache[a] }, t.RemoveData = function(e) { var i = t.GetUniqueElementId(e); null != t.__cache[i] && delete t.__cache[i], e.removeAttribute("data-select2RS-id") }, t }), t.define("select2RS/results", ["jquery", "./utils"], function(e, t) { function i(e, t, r) { this.$element = e, this.data = r, this.options = t, i.__super__.constructor.call(this) } return t.Extend(i, t.Observable), i.prototype.render = function() { var t = e(''); return this.options.get("multiple") && t.attr("aria-multiselectable", "true"), this.$results = t, t }, i.prototype.clear = function() { this.$results.empty() }, i.prototype.displayMessage = function(t) { var i = this.options.get("escapeMarkup"); this.clear(), this.hideLoading(); var r = e(''), a = this.options.get("translations").get(t.message); r.append(i(a(t.args))), r[0].className += " select2RS-results__message", this.$results.append(r) }, i.prototype.hideMessages = function() { this.$results.find(".select2RS-results__message").remove() }, i.prototype.append = function(e) { this.hideLoading(); var t = []; if (null != e.results && 0 !== e.results.length) { e.results = this.sort(e.results); for (var i = 0; i < e.results.length; i++) { var r = e.results[i], a = this.option(r); t.push(a) } this.$results.append(t) } else 0 === this.$results.children().length && this.trigger("results:message", { message: "noResults" }) }, i.prototype.position = function(e, t) { t.find(".select2RS-results").append(e) }, i.prototype.sort = function(e) { return this.options.get("sorter")(e) }, i.prototype.highlightFirstItem = function() { var e = this.$results.find(".select2RS-results__option[aria-selected]"), t = e.filter("[aria-selected=true]"); t.length > 0 ? t.first().trigger("mouseenter") : e.first().trigger("mouseenter"), this.ensureHighlightVisible() }, i.prototype.setClasses = function() { var i = this; this.data.current(function(r) { var a = e.map(r, function(e) { return e.id.toString() }); i.$results.find(".select2RS-results__option[aria-selected]").each(function() { var i = e(this), r = t.GetData(this, "data"), o = "" + r.id; null != r.element && r.element.selected || null == r.element && e.inArray(o, a) > -1 ? i.attr("aria-selected", "true") : i.attr("aria-selected", "false") }) }) }, i.prototype.showLoading = function(e) { this.hideLoading(); var t = { disabled: !0, loading: !0, text: this.options.get("translations").get("searching")(e) }, i = this.option(t); i.className += " loading-results", this.$results.prepend(i) }, i.prototype.hideLoading = function() { this.$results.find(".loading-results").remove() }, i.prototype.option = function(i) { var r = document.createElement("li"); r.className = "select2RS-results__option"; var a = { role: "option", "aria-selected": "false" }, o = window.Element.prototype.matches || window.Element.prototype.msMatchesSelector || window.Element.prototype.webkitMatchesSelector; for (var n in (null != i.element && o.call(i.element, ":disabled") || null == i.element && i.disabled) && (delete a["aria-selected"], a["aria-disabled"] = "true"), null == i.id && delete a["aria-selected"], null != i._resultId && (r.id = i._resultId), i.title && (r.title = i.title), i.children && (a.role = "group", a["aria-label"] = i.text, delete a["aria-selected"]), a) { var s = a[n]; r.setAttribute(n, s) } if (i.children) { var l = e(r), c = document.createElement("strong"); c.className = "select2RS-results__group"; e(c); this.template(i, c); for (var d = [], p = 0; p < i.children.length; p++) { var u = i.children[p], v = this.option(u); d.push(v) } var h = e("", { class: "select2RS-results__options select2RS-results__options--nested" }); h.append(d), l.append(c), l.append(h) } else this.template(i, r); return t.StoreData(r, "data", i), r }, i.prototype.bind = function(i, r) { var a = this, o = i.id + "-results"; this.$results.attr("id", o), i.on("results:all", function(e) { a.clear(), a.append(e.data), i.isOpen() && (a.setClasses(), a.highlightFirstItem()) }), i.on("results:append", function(e) { a.append(e.data), i.isOpen() && a.setClasses() }), i.on("query", function(e) { a.hideMessages(), a.showLoading(e) }), i.on("select", function() { i.isOpen() && (a.setClasses(), a.options.get("scrollAfterSelect") && a.highlightFirstItem()) }), i.on("unselect", function() { i.isOpen() && (a.setClasses(), a.options.get("scrollAfterSelect") && a.highlightFirstItem()) }), i.on("open", function() { a.$results.attr("aria-expanded", "true"), a.$results.attr("aria-hidden", "false"), a.setClasses(), a.ensureHighlightVisible() }), i.on("close", function() { a.$results.attr("aria-expanded", "false"), a.$results.attr("aria-hidden", "true"), a.$results.removeAttr("aria-activedescendant") }), i.on("results:toggle", function() { var e = a.getHighlightedResults(); 0 !== e.length && e.trigger("mouseup") }), i.on("results:select", function() { var e = a.getHighlightedResults(); if (0 !== e.length) { var i = t.GetData(e[0], "data"); "true" == e.attr("aria-selected") ? a.trigger("close", {}) : a.trigger("select", { data: i }) } }), i.on("results:previous", function() { var e = a.getHighlightedResults(), t = a.$results.find("[aria-selected]"), i = t.index(e); if (!(i <= 0)) { var r = i - 1; 0 === e.length && (r = 0); var o = t.eq(r); o.trigger("mouseenter"); var n = a.$results.offset().top, s = o.offset().top, l = a.$results.scrollTop() + (s - n); 0 === r ? a.$results.scrollTop(0) : s - n < 0 && a.$results.scrollTop(l) } }), i.on("results:next", function() { var e = a.getHighlightedResults(), t = a.$results.find("[aria-selected]"), i = t.index(e) + 1; if (!(i >= t.length)) { var r = t.eq(i); r.trigger("mouseenter"); var o = a.$results.offset().top + a.$results.outerHeight(!1), n = r.offset().top + r.outerHeight(!1), s = a.$results.scrollTop() + n - o; 0 === i ? a.$results.scrollTop(0) : n > o && a.$results.scrollTop(s) } }), i.on("results:focus", function(e) { e.element.addClass("select2RS-results__option--highlighted") }), i.on("results:message", function(e) { a.displayMessage(e) }), e.fn.mousewheel && this.$results.on("mousewheel", function(e) { var t = a.$results.scrollTop(), i = a.$results.get(0).scrollHeight - t + e.deltaY, r = e.deltaY > 0 && t - e.deltaY <= 0, o = e.deltaY < 0 && i <= a.$results.height(); r ? (a.$results.scrollTop(0), e.preventDefault(), e.stopPropagation()) : o && (a.$results.scrollTop(a.$results.get(0).scrollHeight - a.$results.height()), e.preventDefault(), e.stopPropagation()) }), this.$results.on("mouseup", ".select2RS-results__option[aria-selected]", function(i) { var r = e(this), o = t.GetData(this, "data"); "true" !== r.attr("aria-selected") ? a.trigger("select", { originalEvent: i, data: o }) : a.options.get("multiple") ? a.trigger("unselect", { originalEvent: i, data: o }) : a.trigger("close", {}) }), this.$results.on("mouseenter", ".select2RS-results__option[aria-selected]", function(i) { var r = t.GetData(this, "data"); a.getHighlightedResults().removeClass("select2RS-results__option--highlighted"), a.trigger("results:focus", { data: r, element: e(this) }) }) }, i.prototype.getHighlightedResults = function() { return this.$results.find(".select2RS-results__option--highlighted") }, i.prototype.destroy = function() { this.$results.remove() }, i.prototype.ensureHighlightVisible = function() { var e = this.getHighlightedResults(); if (0 !== e.length) { var t = this.$results.find("[aria-selected]").index(e), i = this.$results.offset().top, r = e.offset().top, a = this.$results.scrollTop() + (r - i), o = r - i; a -= 2 * e.outerHeight(!1), t <= 2 ? this.$results.scrollTop(0) : (o > this.$results.outerHeight() || o < 0) && this.$results.scrollTop(a) } }, i.prototype.template = function(t, i) { var r = this.options.get("templateResult"), a = this.options.get("escapeMarkup"), o = r(t, i); null == o ? i.style.display = "none" : "string" == typeof o ? i.innerHTML = a(o) : e(i).append(o) }, i }), t.define("select2RS/keys", [], function() { return { BACKSPACE: 8, TAB: 9, ENTER: 13, SHIFT: 16, CTRL: 17, ALT: 18, ESC: 27, SPACE: 32, PAGE_UP: 33, PAGE_DOWN: 34, END: 35, HOME: 36, LEFT: 37, UP: 38, RIGHT: 39, DOWN: 40, DELETE: 46 } }), t.define("select2RS/selection/base", ["jquery", "../utils", "../keys"], function(e, t, i) { function r(e, t) { this.$element = e, this.options = t, r.__super__.constructor.call(this) } return t.Extend(r, t.Observable), r.prototype.render = function() { var i = e(''); return this._tabindex = 0, null != t.GetData(this.$element[0], "old-tabindex") ? this._tabindex = t.GetData(this.$element[0], "old-tabindex") : null != this.$element.attr("tabindex") && (this._tabindex = this.$element.attr("tabindex")), i.attr("title", this.$element.attr("title")), i.attr("tabindex", this._tabindex), i.attr("aria-disabled", "false"), this.$selection = i, i }, r.prototype.bind = function(e, t) { var r = this, a = e.id + "-results"; this.container = e, this.$selection.on("focus", function(e) { r.trigger("focus", e) }), this.$selection.on("blur", function(e) { r._handleBlur(e) }), this.$selection.on("keydown", function(e) { r.trigger("keypress", e), e.which === i.SPACE && e.preventDefault() }), e.on("results:focus", function(e) { r.$selection.attr("aria-activedescendant", e.data._resultId) }), e.on("selection:update", function(e) { r.update(e.data) }), e.on("open", function() { r.$selection.attr("aria-expanded", "true"), r.$selection.attr("aria-owns", a), r._attachCloseHandler(e) }), e.on("close", function() { r.$selection.attr("aria-expanded", "false"), r.$selection.removeAttr("aria-activedescendant"), r.$selection.removeAttr("aria-owns"), r.$selection.trigger("focus"), r._detachCloseHandler(e) }), e.on("enable", function() { r.$selection.attr("tabindex", r._tabindex), r.$selection.attr("aria-disabled", "false") }), e.on("disable", function() { r.$selection.attr("tabindex", "-1"), r.$selection.attr("aria-disabled", "true") }) }, r.prototype._handleBlur = function(t) { var i = this; window.setTimeout(function() { document.activeElement == i.$selection[0] || e.contains(i.$selection[0], document.activeElement) || i.trigger("blur", t) }, 1) }, r.prototype._attachCloseHandler = function(i) { e(document.body).on("mousedown.select2RS." + i.id, function(i) { var r = e(i.target).closest(".select2RS"); e(".select2RS.select2RS-container--open").each(function() { this != r[0] && t.GetData(this, "element").select2RS("close") }) }) }, r.prototype._detachCloseHandler = function(t) { e(document.body).off("mousedown.select2RS." + t.id) }, r.prototype.position = function(e, t) { t.find(".selection").append(e) }, r.prototype.destroy = function() { this._detachCloseHandler(this.container) }, r.prototype.update = function(e) { throw new Error("The `update` method must be defined in child classes.") }, r }), t.define("select2RS/selection/single", ["jquery", "./base", "../utils", "../keys"], function(e, t, i, r) { function a() { a.__super__.constructor.apply(this, arguments) } return i.Extend(a, t), a.prototype.render = function() { var e = a.__super__.render.call(this); return e.addClass("select2RS-selection--single"), e.html(''), e }, a.prototype.bind = function(e, t) { var i = this; a.__super__.bind.apply(this, arguments); var r = e.id + "-container"; this.$selection.find(".select2RS-selection__rendered").attr("id", r).attr("role", "textbox").attr("aria-readonly", "true"), this.$selection.attr("aria-labelledby", r), this.$selection.on("mousedown", function(e) { 1 === e.which && i.trigger("toggle", { originalEvent: e }) }), this.$selection.on("focus", function(e) {}), this.$selection.on("blur", function(e) {}), e.on("focus", function(t) { e.isOpen() || i.$selection.trigger("focus") }) }, a.prototype.clear = function() { var e = this.$selection.find(".select2RS-selection__rendered"); e.empty(), e.removeAttr("title") }, a.prototype.display = function(e, t) { var i = this.options.get("templateSelection"); return this.options.get("escapeMarkup")(i(e, t)) }, a.prototype.selectionContainer = function() { return e("") }, a.prototype.update = function(e) { if (0 !== e.length) { var t = e[0], i = this.$selection.find(".select2RS-selection__rendered"), r = this.display(t, i); i.empty().append(r); var a = t.title || t.text; a ? i.attr("title", a) : i.removeAttr("title") } else this.clear() }, a }), t.define("select2RS/selection/multiple", ["jquery", "./base", "../utils"], function(e, t, i) { function r(e, t) { r.__super__.constructor.apply(this, arguments) } return i.Extend(r, t), r.prototype.render = function() { var e = r.__super__.render.call(this); return e.addClass("select2RS-selection--multiple"), e.html(''), e }, r.prototype.bind = function(t, a) { var o = this; r.__super__.bind.apply(this, arguments), this.$selection.on("click", function(e) { o.trigger("toggle", { originalEvent: e }) }), this.$selection.on("click", ".select2RS-selection__choice__remove", function(t) { if (!o.options.get("disabled")) { var r = e(this).parent(), a = i.GetData(r[0], "data"); o.trigger("unselect", { originalEvent: t, data: a }) } }) }, r.prototype.clear = function() { var e = this.$selection.find(".select2RS-selection__rendered"); e.empty(), e.removeAttr("title") }, r.prototype.display = function(e, t) { var i = this.options.get("templateSelection"); return this.options.get("escapeMarkup")(i(e, t)) }, r.prototype.selectionContainer = function() { return e('
  • ×
  • ') }, r.prototype.update = function(e) { if (this.clear(), 0 !== e.length) { for (var t = [], r = 0; r < e.length; r++) { var a = e[r], o = this.selectionContainer(), n = this.display(a, o); o.append(n); var s = a.title || a.text; s && o.attr("title", s), i.StoreData(o[0], "data", a), t.push(o) } var l = this.$selection.find(".select2RS-selection__rendered"); i.appendMany(l, t) } }, r }), t.define("select2RS/selection/placeholder", ["../utils"], function(e) { function t(e, t, i) { this.placeholder = this.normalizePlaceholder(i.get("placeholder")), e.call(this, t, i) } return t.prototype.normalizePlaceholder = function(e, t) { return "string" == typeof t && (t = { id: "", text: t }), t }, t.prototype.createPlaceholder = function(e, t) { var i = this.selectionContainer(); return i.html(this.display(t)), i.addClass("select2RS-selection__placeholder").removeClass("select2RS-selection__choice"), i }, t.prototype.update = function(e, t) { var i = 1 == t.length && t[0].id != this.placeholder.id; if (t.length > 1 || i) return e.call(this, t); this.clear(); var r = this.createPlaceholder(this.placeholder); this.$selection.find(".select2RS-selection__rendered").append(r) }, t }), t.define("select2RS/selection/allowClear", ["jquery", "../keys", "../utils"], function(e, t, i) { function r() {} return r.prototype.bind = function(e, t, i) { var r = this; e.call(this, t, i), null == this.placeholder && this.options.get("debug") && window.console && console.error && console.error("Select2: The `allowClear` option should be used in combination with the `placeholder` option."), this.$selection.on("mousedown", ".select2RS-selection__clear", function(e) { r._handleClear(e) }), t.on("keypress", function(e) { r._handleKeyboardClear(e, t) }) }, r.prototype._handleClear = function(e, t) { if (!this.options.get("disabled")) { var r = this.$selection.find(".select2RS-selection__clear"); if (0 !== r.length) { t.stopPropagation(); var a = i.GetData(r[0], "data"), o = this.$element.val(); this.$element.val(this.placeholder.id); var n = { data: a }; if (this.trigger("clear", n), n.prevented) this.$element.val(o); else { for (var s = 0; s < a.length; s++) if (n = { data: a[s] }, this.trigger("unselect", n), n.prevented) return void this.$element.val(o); this.$element.trigger("change"), this.trigger("toggle", {}) } } } }, r.prototype._handleKeyboardClear = function(e, i, r) { r.isOpen() || i.which != t.DELETE && i.which != t.BACKSPACE || this._handleClear(i) }, r.prototype.update = function(t, r) { if (t.call(this, r), !(this.$selection.find(".select2RS-selection__placeholder").length > 0 || 0 === r.length)) { var a = this.options.get("translations").get("removeAllItems"), o = e('×'); i.StoreData(o[0], "data", r), this.$selection.find(".select2RS-selection__rendered").prepend(o) } }, r }), t.define("select2RS/selection/search", ["jquery", "../utils", "../keys"], function(e, t, i) { function r(e, t, i) { e.call(this, t, i) } return r.prototype.render = function(t) { var i = e(''); this.$searchContainer = i, this.$search = i.find("input"); var r = t.call(this); return this._transferTabIndex(), r }, r.prototype.bind = function(e, r, a) { var o = this, n = r.id + "-results"; e.call(this, r, a), r.on("open", function() { o.$search.attr("aria-controls", n), o.$search.trigger("focus") }), r.on("close", function() { o.$search.val(""), o.$search.removeAttr("aria-controls"), o.$search.removeAttr("aria-activedescendant"), o.$search.trigger("focus") }), r.on("enable", function() { o.$search.prop("disabled", !1), o._transferTabIndex() }), r.on("disable", function() { o.$search.prop("disabled", !0) }), r.on("focus", function(e) { o.$search.trigger("focus") }), r.on("results:focus", function(e) { e.data._resultId ? o.$search.attr("aria-activedescendant", e.data._resultId) : o.$search.removeAttr("aria-activedescendant") }), this.$selection.on("focusin", ".select2RS-search--inline", function(e) { o.trigger("focus", e) }), this.$selection.on("focusout", ".select2RS-search--inline", function(e) { o._handleBlur(e) }), this.$selection.on("keydown", ".select2RS-search--inline", function(e) { if (e.stopPropagation(), o.trigger("keypress", e), o._keyUpPrevented = e.isDefaultPrevented(), e.which === i.BACKSPACE && "" === o.$search.val()) { var r = o.$searchContainer.prev(".select2RS-selection__choice"); if (r.length > 0) { var a = t.GetData(r[0], "data"); o.searchRemoveChoice(a), e.preventDefault() } } }), this.$selection.on("click", ".select2RS-search--inline", function(e) { o.$search.val() && e.stopPropagation() }); var s = document.documentMode, l = s && s <= 11; this.$selection.on("input.searchcheck", ".select2RS-search--inline", function(e) { l ? o.$selection.off("input.search input.searchcheck") : o.$selection.off("keyup.search") }), this.$selection.on("keyup.search input.search", ".select2RS-search--inline", function(e) { if (l && "input" === e.type) o.$selection.off("input.search input.searchcheck"); else { var t = e.which; t != i.SHIFT && t != i.CTRL && t != i.ALT && t != i.TAB && o.handleSearch(e) } }) }, r.prototype._transferTabIndex = function(e) { this.$search.attr("tabindex", this.$selection.attr("tabindex")), this.$selection.attr("tabindex", "-1") }, r.prototype.createPlaceholder = function(e, t) { this.$search.attr("placeholder", t.text) }, r.prototype.update = function(e, t) { var i = this.$search[0] == document.activeElement; this.$search.attr("placeholder", ""), e.call(this, t), this.$selection.find(".select2RS-selection__rendered").append(this.$searchContainer), this.resizeSearch(), i && this.$search.trigger("focus") }, r.prototype.handleSearch = function() { if (this.resizeSearch(), !this._keyUpPrevented) { var e = this.$search.val(); this.trigger("query", { term: e }) } this._keyUpPrevented = !1 }, r.prototype.searchRemoveChoice = function(e, t) { this.trigger("unselect", { data: t }), this.$search.val(t.text), this.handleSearch() }, r.prototype.resizeSearch = function() { this.$search.css("width", "25px"); var e = ""; "" !== this.$search.attr("placeholder") ? e = this.$selection.find(".select2RS-selection__rendered").width() : e = .75 * (this.$search.val().length + 1) + "em"; this.$search.css("width", e) }, r }), t.define("select2RS/selection/eventRelay", ["jquery"], function(e) { function t() {} return t.prototype.bind = function(t, i, r) { var a = this, o = ["open", "opening", "close", "closing", "select", "selecting", "unselect", "unselecting", "clear", "clearing"], n = ["opening", "closing", "selecting", "unselecting", "clearing"]; t.call(this, i, r), i.on("*", function(t, i) { if (-1 !== e.inArray(t, o)) { i = i || {}; var r = e.Event("select2RS:" + t, { params: i }); a.$element.trigger(r), -1 !== e.inArray(t, n) && (i.prevented = r.isDefaultPrevented()) } }) }, t }), t.define("select2RS/translation", ["jquery", "require"], function(e, t) { function i(e) { this.dict = e || {} } return i.prototype.all = function() { return this.dict }, i.prototype.get = function(e) { return this.dict[e] }, i.prototype.extend = function(t) { this.dict = e.extend({}, t.all(), this.dict) }, i._cache = {}, i.loadPath = function(e) { if (!(e in i._cache)) { var r = t(e); i._cache[e] = r } return new i(i._cache[e]) }, i }), t.define("select2RS/diacritics", [], function() { return { "Ⓐ": "A", "A": "A", "À": "A", "Á": "A", "Â": "A", "Ầ": "A", "Ấ": "A", "Ẫ": "A", "Ẩ": "A", "Ã": "A", "Ā": "A", "Ă": "A", "Ằ": "A", "Ắ": "A", "Ẵ": "A", "Ẳ": "A", "Ȧ": "A", "Ǡ": "A", "Ä": "A", "Ǟ": "A", "Ả": "A", "Å": "A", "Ǻ": "A", "Ǎ": "A", "Ȁ": "A", "Ȃ": "A", "Ạ": "A", "Ậ": "A", "Ặ": "A", "Ḁ": "A", "Ą": "A", "Ⱥ": "A", "Ɐ": "A", "Ꜳ": "AA", "Æ": "AE", "Ǽ": "AE", "Ǣ": "AE", "Ꜵ": "AO", "Ꜷ": "AU", "Ꜹ": "AV", "Ꜻ": "AV", "Ꜽ": "AY", "Ⓑ": "B", "B": "B", "Ḃ": "B", "Ḅ": "B", "Ḇ": "B", "Ƀ": "B", "Ƃ": "B", "Ɓ": "B", "Ⓒ": "C", "C": "C", "Ć": "C", "Ĉ": "C", "Ċ": "C", "Č": "C", "Ç": "C", "Ḉ": "C", "Ƈ": "C", "Ȼ": "C", "Ꜿ": "C", "Ⓓ": "D", "D": "D", "Ḋ": "D", "Ď": "D", "Ḍ": "D", "Ḑ": "D", "Ḓ": "D", "Ḏ": "D", "Đ": "D", "Ƌ": "D", "Ɗ": "D", "Ɖ": "D", "Ꝺ": "D", "DZ": "DZ", "DŽ": "DZ", "Dz": "Dz", "Dž": "Dz", "Ⓔ": "E", "E": "E", "È": "E", "É": "E", "Ê": "E", "Ề": "E", "Ế": "E", "Ễ": "E", "Ể": "E", "Ẽ": "E", "Ē": "E", "Ḕ": "E", "Ḗ": "E", "Ĕ": "E", "Ė": "E", "Ë": "E", "Ẻ": "E", "Ě": "E", "Ȅ": "E", "Ȇ": "E", "Ẹ": "E", "Ệ": "E", "Ȩ": "E", "Ḝ": "E", "Ę": "E", "Ḙ": "E", "Ḛ": "E", "Ɛ": "E", "Ǝ": "E", "Ⓕ": "F", "F": "F", "Ḟ": "F", "Ƒ": "F", "Ꝼ": "F", "Ⓖ": "G", "G": "G", "Ǵ": "G", "Ĝ": "G", "Ḡ": "G", "Ğ": "G", "Ġ": "G", "Ǧ": "G", "Ģ": "G", "Ǥ": "G", "Ɠ": "G", "Ꞡ": "G", "Ᵹ": "G", "Ꝿ": "G", "Ⓗ": "H", "H": "H", "Ĥ": "H", "Ḣ": "H", "Ḧ": "H", "Ȟ": "H", "Ḥ": "H", "Ḩ": "H", "Ḫ": "H", "Ħ": "H", "Ⱨ": "H", "Ⱶ": "H", "Ɥ": "H", "Ⓘ": "I", "I": "I", "Ì": "I", "Í": "I", "Î": "I", "Ĩ": "I", "Ī": "I", "Ĭ": "I", "İ": "I", "Ï": "I", "Ḯ": "I", "Ỉ": "I", "Ǐ": "I", "Ȉ": "I", "Ȋ": "I", "Ị": "I", "Į": "I", "Ḭ": "I", "Ɨ": "I", "Ⓙ": "J", "J": "J", "Ĵ": "J", "Ɉ": "J", "Ⓚ": "K", "K": "K", "Ḱ": "K", "Ǩ": "K", "Ḳ": "K", "Ķ": "K", "Ḵ": "K", "Ƙ": "K", "Ⱪ": "K", "Ꝁ": "K", "Ꝃ": "K", "Ꝅ": "K", "Ꞣ": "K", "Ⓛ": "L", "L": "L", "Ŀ": "L", "Ĺ": "L", "Ľ": "L", "Ḷ": "L", "Ḹ": "L", "Ļ": "L", "Ḽ": "L", "Ḻ": "L", "Ł": "L", "Ƚ": "L", "Ɫ": "L", "Ⱡ": "L", "Ꝉ": "L", "Ꝇ": "L", "Ꞁ": "L", "LJ": "LJ", "Lj": "Lj", "Ⓜ": "M", "M": "M", "Ḿ": "M", "Ṁ": "M", "Ṃ": "M", "Ɱ": "M", "Ɯ": "M", "Ⓝ": "N", "N": "N", "Ǹ": "N", "Ń": "N", "Ñ": "N", "Ṅ": "N", "Ň": "N", "Ṇ": "N", "Ņ": "N", "Ṋ": "N", "Ṉ": "N", "Ƞ": "N", "Ɲ": "N", "Ꞑ": "N", "Ꞥ": "N", "NJ": "NJ", "Nj": "Nj", "Ⓞ": "O", "O": "O", "Ò": "O", "Ó": "O", "Ô": "O", "Ồ": "O", "Ố": "O", "Ỗ": "O", "Ổ": "O", "Õ": "O", "Ṍ": "O", "Ȭ": "O", "Ṏ": "O", "Ō": "O", "Ṑ": "O", "Ṓ": "O", "Ŏ": "O", "Ȯ": "O", "Ȱ": "O", "Ö": "O", "Ȫ": "O", "Ỏ": "O", "Ő": "O", "Ǒ": "O", "Ȍ": "O", "Ȏ": "O", "Ơ": "O", "Ờ": "O", "Ớ": "O", "Ỡ": "O", "Ở": "O", "Ợ": "O", "Ọ": "O", "Ộ": "O", "Ǫ": "O", "Ǭ": "O", "Ø": "O", "Ǿ": "O", "Ɔ": "O", "Ɵ": "O", "Ꝋ": "O", "Ꝍ": "O", "Œ": "OE", "Ƣ": "OI", "Ꝏ": "OO", "Ȣ": "OU", "Ⓟ": "P", "P": "P", "Ṕ": "P", "Ṗ": "P", "Ƥ": "P", "Ᵽ": "P", "Ꝑ": "P", "Ꝓ": "P", "Ꝕ": "P", "Ⓠ": "Q", "Q": "Q", "Ꝗ": "Q", "Ꝙ": "Q", "Ɋ": "Q", "Ⓡ": "R", "R": "R", "Ŕ": "R", "Ṙ": "R", "Ř": "R", "Ȑ": "R", "Ȓ": "R", "Ṛ": "R", "Ṝ": "R", "Ŗ": "R", "Ṟ": "R", "Ɍ": "R", "Ɽ": "R", "Ꝛ": "R", "Ꞧ": "R", "Ꞃ": "R", "Ⓢ": "S", "S": "S", "ẞ": "S", "Ś": "S", "Ṥ": "S", "Ŝ": "S", "Ṡ": "S", "Š": "S", "Ṧ": "S", "Ṣ": "S", "Ṩ": "S", "Ș": "S", "Ş": "S", "Ȿ": "S", "Ꞩ": "S", "Ꞅ": "S", "Ⓣ": "T", "T": "T", "Ṫ": "T", "Ť": "T", "Ṭ": "T", "Ț": "T", "Ţ": "T", "Ṱ": "T", "Ṯ": "T", "Ŧ": "T", "Ƭ": "T", "Ʈ": "T", "Ⱦ": "T", "Ꞇ": "T", "Ꜩ": "TZ", "Ⓤ": "U", "U": "U", "Ù": "U", "Ú": "U", "Û": "U", "Ũ": "U", "Ṹ": "U", "Ū": "U", "Ṻ": "U", "Ŭ": "U", "Ü": "U", "Ǜ": "U", "Ǘ": "U", "Ǖ": "U", "Ǚ": "U", "Ủ": "U", "Ů": "U", "Ű": "U", "Ǔ": "U", "Ȕ": "U", "Ȗ": "U", "Ư": "U", "Ừ": "U", "Ứ": "U", "Ữ": "U", "Ử": "U", "Ự": "U", "Ụ": "U", "Ṳ": "U", "Ų": "U", "Ṷ": "U", "Ṵ": "U", "Ʉ": "U", "Ⓥ": "V", "V": "V", "Ṽ": "V", "Ṿ": "V", "Ʋ": "V", "Ꝟ": "V", "Ʌ": "V", "Ꝡ": "VY", "Ⓦ": "W", "W": "W", "Ẁ": "W", "Ẃ": "W", "Ŵ": "W", "Ẇ": "W", "Ẅ": "W", "Ẉ": "W", "Ⱳ": "W", "Ⓧ": "X", "X": "X", "Ẋ": "X", "Ẍ": "X", "Ⓨ": "Y", "Y": "Y", "Ỳ": "Y", "Ý": "Y", "Ŷ": "Y", "Ỹ": "Y", "Ȳ": "Y", "Ẏ": "Y", "Ÿ": "Y", "Ỷ": "Y", "Ỵ": "Y", "Ƴ": "Y", "Ɏ": "Y", "Ỿ": "Y", "Ⓩ": "Z", "Z": "Z", "Ź": "Z", "Ẑ": "Z", "Ż": "Z", "Ž": "Z", "Ẓ": "Z", "Ẕ": "Z", "Ƶ": "Z", "Ȥ": "Z", "Ɀ": "Z", "Ⱬ": "Z", "Ꝣ": "Z", "ⓐ": "a", "a": "a", "ẚ": "a", "à": "a", "á": "a", "â": "a", "ầ": "a", "ấ": "a", "ẫ": "a", "ẩ": "a", "ã": "a", "ā": "a", "ă": "a", "ằ": "a", "ắ": "a", "ẵ": "a", "ẳ": "a", "ȧ": "a", "ǡ": "a", "ä": "a", "ǟ": "a", "ả": "a", "å": "a", "ǻ": "a", "ǎ": "a", "ȁ": "a", "ȃ": "a", "ạ": "a", "ậ": "a", "ặ": "a", "ḁ": "a", "ą": "a", "ⱥ": "a", "ɐ": "a", "ꜳ": "aa", "æ": "ae", "ǽ": "ae", "ǣ": "ae", "ꜵ": "ao", "ꜷ": "au", "ꜹ": "av", "ꜻ": "av", "ꜽ": "ay", "ⓑ": "b", "b": "b", "ḃ": "b", "ḅ": "b", "ḇ": "b", "ƀ": "b", "ƃ": "b", "ɓ": "b", "ⓒ": "c", "c": "c", "ć": "c", "ĉ": "c", "ċ": "c", "č": "c", "ç": "c", "ḉ": "c", "ƈ": "c", "ȼ": "c", "ꜿ": "c", "ↄ": "c", "ⓓ": "d", "d": "d", "ḋ": "d", "ď": "d", "ḍ": "d", "ḑ": "d", "ḓ": "d", "ḏ": "d", "đ": "d", "ƌ": "d", "ɖ": "d", "ɗ": "d", "ꝺ": "d", "dz": "dz", "dž": "dz", "ⓔ": "e", "e": "e", "è": "e", "é": "e", "ê": "e", "ề": "e", "ế": "e", "ễ": "e", "ể": "e", "ẽ": "e", "ē": "e", "ḕ": "e", "ḗ": "e", "ĕ": "e", "ė": "e", "ë": "e", "ẻ": "e", "ě": "e", "ȅ": "e", "ȇ": "e", "ẹ": "e", "ệ": "e", "ȩ": "e", "ḝ": "e", "ę": "e", "ḙ": "e", "ḛ": "e", "ɇ": "e", "ɛ": "e", "ǝ": "e", "ⓕ": "f", "f": "f", "ḟ": "f", "ƒ": "f", "ꝼ": "f", "ⓖ": "g", "g": "g", "ǵ": "g", "ĝ": "g", "ḡ": "g", "ğ": "g", "ġ": "g", "ǧ": "g", "ģ": "g", "ǥ": "g", "ɠ": "g", "ꞡ": "g", "ᵹ": "g", "ꝿ": "g", "ⓗ": "h", "h": "h", "ĥ": "h", "ḣ": "h", "ḧ": "h", "ȟ": "h", "ḥ": "h", "ḩ": "h", "ḫ": "h", "ẖ": "h", "ħ": "h", "ⱨ": "h", "ⱶ": "h", "ɥ": "h", "ƕ": "hv", "ⓘ": "i", "i": "i", "ì": "i", "í": "i", "î": "i", "ĩ": "i", "ī": "i", "ĭ": "i", "ï": "i", "ḯ": "i", "ỉ": "i", "ǐ": "i", "ȉ": "i", "ȋ": "i", "ị": "i", "į": "i", "ḭ": "i", "ɨ": "i", "ı": "i", "ⓙ": "j", "j": "j", "ĵ": "j", "ǰ": "j", "ɉ": "j", "ⓚ": "k", "k": "k", "ḱ": "k", "ǩ": "k", "ḳ": "k", "ķ": "k", "ḵ": "k", "ƙ": "k", "ⱪ": "k", "ꝁ": "k", "ꝃ": "k", "ꝅ": "k", "ꞣ": "k", "ⓛ": "l", "l": "l", "ŀ": "l", "ĺ": "l", "ľ": "l", "ḷ": "l", "ḹ": "l", "ļ": "l", "ḽ": "l", "ḻ": "l", "ſ": "l", "ł": "l", "ƚ": "l", "ɫ": "l", "ⱡ": "l", "ꝉ": "l", "ꞁ": "l", "ꝇ": "l", "lj": "lj", "ⓜ": "m", "m": "m", "ḿ": "m", "ṁ": "m", "ṃ": "m", "ɱ": "m", "ɯ": "m", "ⓝ": "n", "n": "n", "ǹ": "n", "ń": "n", "ñ": "n", "ṅ": "n", "ň": "n", "ṇ": "n", "ņ": "n", "ṋ": "n", "ṉ": "n", "ƞ": "n", "ɲ": "n", "ʼn": "n", "ꞑ": "n", "ꞥ": "n", "nj": "nj", "ⓞ": "o", "o": "o", "ò": "o", "ó": "o", "ô": "o", "ồ": "o", "ố": "o", "ỗ": "o", "ổ": "o", "õ": "o", "ṍ": "o", "ȭ": "o", "ṏ": "o", "ō": "o", "ṑ": "o", "ṓ": "o", "ŏ": "o", "ȯ": "o", "ȱ": "o", "ö": "o", "ȫ": "o", "ỏ": "o", "ő": "o", "ǒ": "o", "ȍ": "o", "ȏ": "o", "ơ": "o", "ờ": "o", "ớ": "o", "ỡ": "o", "ở": "o", "ợ": "o", "ọ": "o", "ộ": "o", "ǫ": "o", "ǭ": "o", "ø": "o", "ǿ": "o", "ɔ": "o", "ꝋ": "o", "ꝍ": "o", "ɵ": "o", "œ": "oe", "ƣ": "oi", "ȣ": "ou", "ꝏ": "oo", "ⓟ": "p", "p": "p", "ṕ": "p", "ṗ": "p", "ƥ": "p", "ᵽ": "p", "ꝑ": "p", "ꝓ": "p", "ꝕ": "p", "ⓠ": "q", "q": "q", "ɋ": "q", "ꝗ": "q", "ꝙ": "q", "ⓡ": "r", "r": "r", "ŕ": "r", "ṙ": "r", "ř": "r", "ȑ": "r", "ȓ": "r", "ṛ": "r", "ṝ": "r", "ŗ": "r", "ṟ": "r", "ɍ": "r", "ɽ": "r", "ꝛ": "r", "ꞧ": "r", "ꞃ": "r", "ⓢ": "s", "s": "s", "ß": "s", "ś": "s", "ṥ": "s", "ŝ": "s", "ṡ": "s", "š": "s", "ṧ": "s", "ṣ": "s", "ṩ": "s", "ș": "s", "ş": "s", "ȿ": "s", "ꞩ": "s", "ꞅ": "s", "ẛ": "s", "ⓣ": "t", "t": "t", "ṫ": "t", "ẗ": "t", "ť": "t", "ṭ": "t", "ț": "t", "ţ": "t", "ṱ": "t", "ṯ": "t", "ŧ": "t", "ƭ": "t", "ʈ": "t", "ⱦ": "t", "ꞇ": "t", "ꜩ": "tz", "ⓤ": "u", "u": "u", "ù": "u", "ú": "u", "û": "u", "ũ": "u", "ṹ": "u", "ū": "u", "ṻ": "u", "ŭ": "u", "ü": "u", "ǜ": "u", "ǘ": "u", "ǖ": "u", "ǚ": "u", "ủ": "u", "ů": "u", "ű": "u", "ǔ": "u", "ȕ": "u", "ȗ": "u", "ư": "u", "ừ": "u", "ứ": "u", "ữ": "u", "ử": "u", "ự": "u", "ụ": "u", "ṳ": "u", "ų": "u", "ṷ": "u", "ṵ": "u", "ʉ": "u", "ⓥ": "v", "v": "v", "ṽ": "v", "ṿ": "v", "ʋ": "v", "ꝟ": "v", "ʌ": "v", "ꝡ": "vy", "ⓦ": "w", "w": "w", "ẁ": "w", "ẃ": "w", "ŵ": "w", "ẇ": "w", "ẅ": "w", "ẘ": "w", "ẉ": "w", "ⱳ": "w", "ⓧ": "x", "x": "x", "ẋ": "x", "ẍ": "x", "ⓨ": "y", "y": "y", "ỳ": "y", "ý": "y", "ŷ": "y", "ỹ": "y", "ȳ": "y", "ẏ": "y", "ÿ": "y", "ỷ": "y", "ẙ": "y", "ỵ": "y", "ƴ": "y", "ɏ": "y", "ỿ": "y", "ⓩ": "z", "z": "z", "ź": "z", "ẑ": "z", "ż": "z", "ž": "z", "ẓ": "z", "ẕ": "z", "ƶ": "z", "ȥ": "z", "ɀ": "z", "ⱬ": "z", "ꝣ": "z", "Ά": "Α", "Έ": "Ε", "Ή": "Η", "Ί": "Ι", "Ϊ": "Ι", "Ό": "Ο", "Ύ": "Υ", "Ϋ": "Υ", "Ώ": "Ω", "ά": "α", "έ": "ε", "ή": "η", "ί": "ι", "ϊ": "ι", "ΐ": "ι", "ό": "ο", "ύ": "υ", "ϋ": "υ", "ΰ": "υ", "ώ": "ω", "ς": "σ", "’": "'" } }), t.define("select2RS/data/base", ["../utils"], function(e) { function t(e, i) { t.__super__.constructor.call(this) } return e.Extend(t, e.Observable), t.prototype.current = function(e) { throw new Error("The `current` method must be defined in child classes.") }, t.prototype.query = function(e, t) { throw new Error("The `query` method must be defined in child classes.") }, t.prototype.bind = function(e, t) {}, t.prototype.destroy = function() {}, t.prototype.generateResultId = function(t, i) { var r = t.id + "-result-"; return r += e.generateChars(4), null != i.id ? r += "-" + i.id.toString() : r += "-" + e.generateChars(4), r }, t }), t.define("select2RS/data/select", ["./base", "../utils", "jquery"], function(e, t, i) { function r(e, t) { this.$element = e, this.options = t, r.__super__.constructor.call(this) } return t.Extend(r, e), r.prototype.current = function(e) { var t = [], r = this; this.$element.find(":selected").each(function() { var e = i(this), a = r.item(e); t.push(a) }), e(t) }, r.prototype.select = function(e) { var t = this; if (e.selected = !0, i(e.element).is("option")) return e.element.selected = !0, void this.$element.trigger("change"); if (this.$element.prop("multiple")) this.current(function(r) { var a = []; (e = [e]).push.apply(e, r); for (var o = 0; o < e.length; o++) { var n = e[o].id; - 1 === i.inArray(n, a) && a.push(n) } t.$element.val(a), t.$element.trigger("change") }); else { var r = e.id; this.$element.val(r), this.$element.trigger("change") } }, r.prototype.unselect = function(e) { var t = this; if (this.$element.prop("multiple")) { if (e.selected = !1, i(e.element).is("option")) return e.element.selected = !1, void this.$element.trigger("change"); this.current(function(r) { for (var a = [], o = 0; o < r.length; o++) { var n = r[o].id; n !== e.id && -1 === i.inArray(n, a) && a.push(n) } t.$element.val(a), t.$element.trigger("change") }) } }, r.prototype.bind = function(e, t) { var i = this; this.container = e, e.on("select", function(e) { i.select(e.data) }), e.on("unselect", function(e) { i.unselect(e.data) }) }, r.prototype.destroy = function() { this.$element.find("*").each(function() { t.RemoveData(this) }) }, r.prototype.query = function(e, t) { var r = [], a = this; this.$element.children().each(function() { var t = i(this); if (t.is("option") || t.is("optgroup")) { var o = a.item(t), n = a.matches(e, o); null !== n && r.push(n) } }), t({ results: r }) }, r.prototype.addOptions = function(e) { t.appendMany(this.$element, e) }, r.prototype.option = function(e) { var r; e.children ? (r = document.createElement("optgroup")).label = e.text : void 0 !== (r = document.createElement("option")).textContent ? r.textContent = e.text : r.innerText = e.text, void 0 !== e.id && (r.value = e.id), e.disabled && (r.disabled = !0), e.selected && (r.selected = !0), e.title && (r.title = e.title); var a = i(r), o = this._normalizeItem(e); return o.element = r, t.StoreData(r, "data", o), a }, r.prototype.item = function(e) { var r = {}; if (null != (r = t.GetData(e[0], "data"))) return r; if (e.is("option")) r = { id: e.val(), text: e.text(), disabled: e.prop("disabled"), selected: e.prop("selected"), title: e.prop("title") }; else if (e.is("optgroup")) { r = { text: e.prop("label"), children: [], title: e.prop("title") }; for (var a = e.children("option"), o = [], n = 0; n < a.length; n++) { var s = i(a[n]), l = this.item(s); o.push(l) } r.children = o } return (r = this._normalizeItem(r)).element = e[0], t.StoreData(e[0], "data", r), r }, r.prototype._normalizeItem = function(e) { e !== Object(e) && (e = { id: e, text: e }); return null != (e = i.extend({}, { text: "" }, e)).id && (e.id = e.id.toString()), null != e.text && (e.text = e.text.toString()), null == e._resultId && e.id && null != this.container && (e._resultId = this.generateResultId(this.container, e)), i.extend({}, { selected: !1, disabled: !1 }, e) }, r.prototype.matches = function(e, t) { return this.options.get("matcher")(e, t) }, r }), t.define("select2RS/data/array", ["./select", "../utils", "jquery"], function(e, t, i) { function r(e, t) { this._dataToConvert = t.get("data") || [], r.__super__.constructor.call(this, e, t) } return t.Extend(r, e), r.prototype.bind = function(e, t) { r.__super__.bind.call(this, e, t), this.addOptions(this.convertToOptions(this._dataToConvert)) }, r.prototype.select = function(e) { var t = this.$element.find("option").filter(function(t, i) { return i.value == e.id.toString() }); 0 === t.length && (t = this.option(e), this.addOptions(t)), r.__super__.select.call(this, e) }, r.prototype.convertToOptions = function(e) { var r = this, a = this.$element.find("option"), o = a.map(function() { return r.item(i(this)).id }).get(), n = []; function s(e) { return function() { return i(this).val() == e.id } } for (var l = 0; l < e.length; l++) { var c = this._normalizeItem(e[l]); if (i.inArray(c.id, o) >= 0) { var d = a.filter(s(c)), p = this.item(d), u = i.extend(!0, {}, c, p), v = this.option(u); d.replaceWith(v) } else { var h = this.option(c); if (c.children) { var g = this.convertToOptions(c.children); t.appendMany(h, g) } n.push(h) } } return n }, r }), t.define("select2RS/data/ajax", ["./array", "../utils", "jquery"], function(e, t, i) { function r(e, t) { this.ajaxOptions = this._applyDefaults(t.get("ajax")), null != this.ajaxOptions.processResults && (this.processResults = this.ajaxOptions.processResults), r.__super__.constructor.call(this, e, t) } return t.Extend(r, e), r.prototype._applyDefaults = function(e) { var t = { data: function(e) { return i.extend({}, e, { q: e.term }) }, transport: function(e, t, r) { var a = i.ajax(e); return a.then(t), a.fail(r), a } }; return i.extend({}, t, e, !0) }, r.prototype.processResults = function(e) { return e }, r.prototype.query = function(e, t) { var r = this; null != this._request && (i.isFunction(this._request.abort) && this._request.abort(), this._request = null); var a = i.extend({ type: "GET" }, this.ajaxOptions); function o() { var o = a.transport(a, function(a) { var o = r.processResults(a, e); r.options.get("debug") && window.console && console.error && (o && o.results && i.isArray(o.results) || console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")), t(o) }, function() { "status" in o && (0 === o.status || "0" === o.status) || r.trigger("results:message", { message: "errorLoading" }) }); r._request = o } "function" == typeof a.url && (a.url = a.url.call(this.$element, e)), "function" == typeof a.data && (a.data = a.data.call(this.$element, e)), this.ajaxOptions.delay && null != e.term ? (this._queryTimeout && window.clearTimeout(this._queryTimeout), this._queryTimeout = window.setTimeout(o, this.ajaxOptions.delay)) : o() }, r }), t.define("select2RS/data/tags", ["jquery"], function(e) { function t(t, i, r) { var a = r.get("tags"), o = r.get("createTag"); void 0 !== o && (this.createTag = o); var n = r.get("insertTag"); if (void 0 !== n && (this.insertTag = n), t.call(this, i, r), e.isArray(a)) for (var s = 0; s < a.length; s++) { var l = a[s], c = this._normalizeItem(l), d = this.option(c); this.$element.append(d) } } return t.prototype.query = function(e, t, i) { var r = this; this._removeOldTags(), null != t.term && null == t.page ? e.call(this, t, function e(a, o) { for (var n = a.results, s = 0; s < n.length; s++) { var l = n[s], c = null != l.children && !e({ results: l.children }, !0); if ((l.text || "").toUpperCase() === (t.term || "").toUpperCase() || c) return !o && (a.data = n, void i(a)) } if (o) return !0; var d = r.createTag(t); if (null != d) { var p = r.option(d); p.attr("data-select2RS-tag", !0), r.addOptions([p]), r.insertTag(n, d) } a.results = n, i(a) }) : e.call(this, t, i) }, t.prototype.createTag = function(t, i) { var r = e.trim(i.term); return "" === r ? null : { id: r, text: r } }, t.prototype.insertTag = function(e, t, i) { t.unshift(i) }, t.prototype._removeOldTags = function(t) { this.$element.find("option[data-select2RS-tag]").each(function() { this.selected || e(this).remove() }) }, t }), t.define("select2RS/data/tokenizer", ["jquery"], function(e) { function t(e, t, i) { var r = i.get("tokenizer"); void 0 !== r && (this.tokenizer = r), e.call(this, t, i) } return t.prototype.bind = function(e, t, i) { e.call(this, t, i), this.$search = t.dropdown.$search || t.selection.$search || i.find(".select2RS-search__field") }, t.prototype.query = function(t, i, r) { var a = this; i.term = i.term || ""; var o = this.tokenizer(i, this.options, function(t) { var i = a._normalizeItem(t); if (!a.$element.find("option").filter(function() { return e(this).val() === i.id }).length) { var r = a.option(i); r.attr("data-select2RS-tag", !0), a._removeOldTags(), a.addOptions([r]) }! function(e) { a.trigger("select", { data: e }) }(i) }); o.term !== i.term && (this.$search.length && (this.$search.val(o.term), this.$search.trigger("focus")), i.term = o.term), t.call(this, i, r) }, t.prototype.tokenizer = function(t, i, r, a) { for (var o = r.get("tokenSeparators") || [], n = i.term, s = 0, l = this.createTag || function(e) { return { id: e.term, text: e.term } }; s < n.length;) { var c = n[s]; if (-1 !== e.inArray(c, o)) { var d = n.substr(0, s), p = l(e.extend({}, i, { term: d })); null != p ? (a(p), n = n.substr(s + 1) || "", s = 0) : s++ } else s++ } return { term: n } }, t }), t.define("select2RS/data/minimumInputLength", [], function() { function e(e, t, i) { this.minimumInputLength = i.get("minimumInputLength"), e.call(this, t, i) } return e.prototype.query = function(e, t, i) { t.term = t.term || "", t.term.length < this.minimumInputLength ? this.trigger("results:message", { message: "inputTooShort", args: { minimum: this.minimumInputLength, input: t.term, params: t } }) : e.call(this, t, i) }, e }), t.define("select2RS/data/maximumInputLength", [], function() { function e(e, t, i) { this.maximumInputLength = i.get("maximumInputLength"), e.call(this, t, i) } return e.prototype.query = function(e, t, i) { t.term = t.term || "", this.maximumInputLength > 0 && t.term.length > this.maximumInputLength ? this.trigger("results:message", { message: "inputTooLong", args: { maximum: this.maximumInputLength, input: t.term, params: t } }) : e.call(this, t, i) }, e }), t.define("select2RS/data/maximumSelectionLength", [], function() { function e(e, t, i) { this.maximumSelectionLength = i.get("maximumSelectionLength"), e.call(this, t, i) } return e.prototype.bind = function(e, t, i) { var r = this; e.call(this, t, i), t.on("select", function() { r._checkIfMaximumSelected() }) }, e.prototype.query = function(e, t, i) { var r = this; this._checkIfMaximumSelected(function() { e.call(r, t, i) }) }, e.prototype._checkIfMaximumSelected = function(e, t) { var i = this; this.current(function(e) { var r = null != e ? e.length : 0; i.maximumSelectionLength > 0 && r >= i.maximumSelectionLength ? i.trigger("results:message", { message: "maximumSelected", args: { maximum: i.maximumSelectionLength } }) : t && t() }) }, e }), t.define("select2RS/dropdown", ["jquery", "./utils"], function(e, t) { function i(e, t) { this.$element = e, this.options = t, i.__super__.constructor.call(this) } return t.Extend(i, t.Observable), i.prototype.render = function() { var t = e(''); return t.attr("dir", this.options.get("dir")), this.$dropdown = t, t }, i.prototype.bind = function() {}, i.prototype.position = function(e, t) {}, i.prototype.destroy = function() { this.$dropdown.remove() }, i }), t.define("select2RS/dropdown/search", ["jquery", "../utils"], function(e, t) { function i() {} return i.prototype.render = function(t) { var i = t.call(this), r = e(''); return this.$searchContainer = r, this.$search = r.find("input"), i.prepend(r), i }, i.prototype.bind = function(t, i, r) { var a = this, o = i.id + "-results"; t.call(this, i, r), this.$search.on("keydown", function(e) { a.trigger("keypress", e), a._keyUpPrevented = e.isDefaultPrevented() }), this.$search.on("input", function(t) { e(this).off("keyup") }), this.$search.on("keyup input", function(e) { a.handleSearch(e) }), i.on("open", function() { a.$search.attr("tabindex", 0), a.$search.attr("aria-controls", o), a.$search.trigger("focus"), window.setTimeout(function() { a.$search.trigger("focus") }, 0) }), i.on("close", function() { a.$search.attr("tabindex", -1), a.$search.removeAttr("aria-controls"), a.$search.removeAttr("aria-activedescendant"), a.$search.val(""), a.$search.trigger("blur") }), i.on("focus", function() { i.isOpen() || a.$search.trigger("focus") }), i.on("results:all", function(e) { null != e.query.term && "" !== e.query.term || (a.showSearch(e) ? a.$searchContainer.removeClass("select2RS-search--hide") : a.$searchContainer.addClass("select2RS-search--hide")) }), i.on("results:focus", function(e) { e.data._resultId ? a.$search.attr("aria-activedescendant", e.data._resultId) : a.$search.removeAttr("aria-activedescendant") }) }, i.prototype.handleSearch = function(e) { if (!this._keyUpPrevented) { var t = this.$search.val(); this.trigger("query", { term: t }) } this._keyUpPrevented = !1 }, i.prototype.showSearch = function(e, t) { return !0 }, i }), t.define("select2RS/dropdown/hidePlaceholder", [], function() { function e(e, t, i, r) { this.placeholder = this.normalizePlaceholder(i.get("placeholder")), e.call(this, t, i, r) } return e.prototype.append = function(e, t) { t.results = this.removePlaceholder(t.results), e.call(this, t) }, e.prototype.normalizePlaceholder = function(e, t) { return "string" == typeof t && (t = { id: "", text: t }), t }, e.prototype.removePlaceholder = function(e, t) { for (var i = t.slice(0), r = t.length - 1; r >= 0; r--) { var a = t[r]; this.placeholder.id === a.id && i.splice(r, 1) } return i }, e }), t.define("select2RS/dropdown/infiniteScroll", ["jquery"], function(e) { function t(e, t, i, r) { this.lastParams = {}, e.call(this, t, i, r), this.$loadingMore = this.createLoadingMore(), this.loading = !1 } return t.prototype.append = function(e, t) { this.$loadingMore.remove(), this.loading = !1, e.call(this, t), this.showLoadingMore(t) && (this.$results.append(this.$loadingMore), this.loadMoreIfNeeded()) }, t.prototype.bind = function(e, t, i) { var r = this; e.call(this, t, i), t.on("query", function(e) { r.lastParams = e, r.loading = !0 }), t.on("query:append", function(e) { r.lastParams = e, r.loading = !0 }), this.$results.on("scroll", this.loadMoreIfNeeded.bind(this)) }, t.prototype.loadMoreIfNeeded = function() { var t = e.contains(document.documentElement, this.$loadingMore[0]); !this.loading && t && (this.$results.offset().top + this.$results.outerHeight(!1) + 50 >= this.$loadingMore.offset().top + this.$loadingMore.outerHeight(!1) && this.loadMore()) }, t.prototype.loadMore = function() { this.loading = !0; var t = e.extend({}, { page: 1 }, this.lastParams); t.page++, this.trigger("query:append", t) }, t.prototype.showLoadingMore = function(e, t) { return t.pagination && t.pagination.more }, t.prototype.createLoadingMore = function() { var t = e('
  • '), i = this.options.get("translations").get("loadingMore"); return t.html(i(this.lastParams)), t }, t }), t.define("select2RS/dropdown/attachBody", ["jquery", "../utils"], function(e, t) { function i(t, i, r) { this.$dropdownParent = e(r.get("dropdownParent") || document.body), t.call(this, i, r) } return i.prototype.bind = function(e, t, i) { var r = this; e.call(this, t, i), t.on("open", function() { r._showDropdown(), r._attachPositioningHandler(t), r._bindContainerResultHandlers(t) }), t.on("close", function() { r._hideDropdown(), r._detachPositioningHandler(t) }), this.$dropdownContainer.on("mousedown", function(e) { e.stopPropagation() }) }, i.prototype.destroy = function(e) { e.call(this), this.$dropdownContainer.remove() }, i.prototype.position = function(e, t, i) { t.attr("class", i.attr("class")), t.removeClass("select2RS"), t.addClass("select2RS-container--open"), t.css({ position: "absolute", top: -999999 }), this.$container = i }, i.prototype.render = function(t) { var i = e(""), r = t.call(this); return i.append(r), this.$dropdownContainer = i, i }, i.prototype._hideDropdown = function(e) { this.$dropdownContainer.detach() }, i.prototype._bindContainerResultHandlers = function(e, t) { if (!this._containerResultsHandlersBound) { var i = this; t.on("results:all", function() { i._positionDropdown(), i._resizeDropdown() }), t.on("results:append", function() { i._positionDropdown(), i._resizeDropdown() }), t.on("results:message", function() { i._positionDropdown(), i._resizeDropdown() }), t.on("select", function() { i._positionDropdown(), i._resizeDropdown() }), t.on("unselect", function() { i._positionDropdown(), i._resizeDropdown() }), this._containerResultsHandlersBound = !0 } }, i.prototype._attachPositioningHandler = function(i, r) { var a = this, o = "scroll.select2RS." + r.id, n = "resize.select2RS." + r.id, s = "orientationchange.select2RS." + r.id, l = this.$container.parents().filter(t.hasScroll); l.each(function() { t.StoreData(this, "select2RS-scroll-position", { x: e(this).scrollLeft(), y: e(this).scrollTop() }) }), l.on(o, function(e) {}), e(window).on(o + " " + n + " " + s, function(e) { a._positionDropdown(), a._resizeDropdown() }) }, i.prototype._detachPositioningHandler = function(i, r) { var a = "scroll.select2RS." + r.id, o = "resize.select2RS." + r.id, n = "orientationchange.select2RS." + r.id; this.$container.parents().filter(t.hasScroll).off(a), e(window).off(a + " " + o + " " + n) }, i.prototype._positionDropdown = function() { var t = e(window), i = this.$dropdown.hasClass("select2RS-dropdown--above"), r = this.$dropdown.hasClass("select2RS-dropdown--below"), a = null, o = this.$container.offset(); o.bottom = o.top + this.$container.outerHeight(!1); var n = { height: this.$container.outerHeight(!1) }; n.top = o.top, n.bottom = o.top + n.height; var s = this.$dropdown.outerHeight(!1), l = t.scrollTop(), c = t.scrollTop() + t.height(), d = l < o.top - s, p = c > o.bottom + s, u = { left: o.left, top: n.bottom }, v = this.$dropdownParent; "static" === v.css("position") && (v = v.offsetParent()); var h = { top: 0, left: 0 }; (e.contains(document.body, v[0]) || v[0].isConnected) && (h = v.offset()), u.top -= h.top, u.left -= h.left, i || r || (a = "below"), p || !d || i ? !d && p && i && (a = "below") : a = "above", ("above" == a || i && "below" !== a) && (u.top = n.top - h.top - s), null != a && (this.$dropdown.removeClass("select2RS-dropdown--below select2RS-dropdown--above").addClass("select2RS-dropdown--" + a), this.$container.removeClass("select2RS-container--below select2RS-container--above").addClass("select2RS-container--" + a)), this.$dropdownContainer.css(u) }, i.prototype._resizeDropdown = function() { var e = { width: this.$container.outerWidth(!1) + "px" }; this.options.get("dropdownAutoWidth") && (e.minWidth = e.width, e.position = "relative", e.width = "auto"), this.$dropdown.css(e) }, i.prototype._showDropdown = function(e) { this.$dropdownContainer.appendTo(this.$dropdownParent), this._positionDropdown(), this._resizeDropdown() }, i }), t.define("select2RS/dropdown/minimumResultsForSearch", [], function() { function e(e, t, i, r) { this.minimumResultsForSearch = i.get("minimumResultsForSearch"), this.minimumResultsForSearch < 0 && (this.minimumResultsForSearch = 1 / 0), e.call(this, t, i, r) } return e.prototype.showSearch = function(e, t) { return !(function e(t) { for (var i = 0, r = 0; r < t.length; r++) { var a = t[r]; a.children ? i += e(a.children) : i++ } return i }(t.data.results) < this.minimumResultsForSearch) && e.call(this, t) }, e }), t.define("select2RS/dropdown/selectOnClose", ["../utils"], function(e) { function t() {} return t.prototype.bind = function(e, t, i) { var r = this; e.call(this, t, i), t.on("close", function(e) { r._handleSelectOnClose(e) }) }, t.prototype._handleSelectOnClose = function(t, i) { if (i && null != i.originalSelect2Event) { var r = i.originalSelect2Event; if ("select" === r._type || "unselect" === r._type) return } var a = this.getHighlightedResults(); if (!(a.length < 1)) { var o = e.GetData(a[0], "data"); null != o.element && o.element.selected || null == o.element && o.selected || this.trigger("select", { data: o }) } }, t }), t.define("select2RS/dropdown/closeOnSelect", [], function() { function e() {} return e.prototype.bind = function(e, t, i) { var r = this; e.call(this, t, i), t.on("select", function(e) { r._selectTriggered(e) }), t.on("unselect", function(e) { r._selectTriggered(e) }) }, e.prototype._selectTriggered = function(e, t) { var i = t.originalEvent; i && (i.ctrlKey || i.metaKey) || this.trigger("close", { originalEvent: i, originalSelect2Event: t }) }, e }), t.define("select2RS/i18n/en", [], function() { return { errorLoading: function() { return "The results could not be loaded." }, inputTooLong: function(e) { var t = e.input.length - e.maximum, i = "Please delete " + t + " character"; return 1 != t && (i += "s"), i }, inputTooShort: function(e) { return "Please enter " + (e.minimum - e.input.length) + " or more characters" }, loadingMore: function() { return "Loading more results…" }, maximumSelected: function(e) { var t = "You can only select " + e.maximum + " item"; return 1 != e.maximum && (t += "s"), t }, noResults: function() { return "No results found" }, searching: function() { return "Searching…" }, removeAllItems: function() { return "Remove all items" } } }), t.define("select2RS/defaults", ["jquery", "require", "./results", "./selection/single", "./selection/multiple", "./selection/placeholder", "./selection/allowClear", "./selection/search", "./selection/eventRelay", "./utils", "./translation", "./diacritics", "./data/select", "./data/array", "./data/ajax", "./data/tags", "./data/tokenizer", "./data/minimumInputLength", "./data/maximumInputLength", "./data/maximumSelectionLength", "./dropdown", "./dropdown/search", "./dropdown/hidePlaceholder", "./dropdown/infiniteScroll", "./dropdown/attachBody", "./dropdown/minimumResultsForSearch", "./dropdown/selectOnClose", "./dropdown/closeOnSelect", "./i18n/en"], function(e, t, i, r, a, o, n, s, l, c, d, p, u, v, h, g, f, m, b, S, y, R, _, V, k, O, w, B, L) { function I() { this.reset() } return I.prototype.apply = function(d) { if (null == (d = e.extend(!0, {}, this.defaults, d)).dataAdapter) { if (null != d.ajax ? d.dataAdapter = h : null != d.data ? d.dataAdapter = v : d.dataAdapter = u, d.minimumInputLength > 0 && (d.dataAdapter = c.Decorate(d.dataAdapter, m)), d.maximumInputLength > 0 && (d.dataAdapter = c.Decorate(d.dataAdapter, b)), d.maximumSelectionLength > 0 && (d.dataAdapter = c.Decorate(d.dataAdapter, S)), d.tags && (d.dataAdapter = c.Decorate(d.dataAdapter, g)), null == d.tokenSeparators && null == d.tokenizer || (d.dataAdapter = c.Decorate(d.dataAdapter, f)), null != d.query) { var p = t(d.amdBase + "compat/query"); d.dataAdapter = c.Decorate(d.dataAdapter, p) } if (null != d.initSelection) { var L = t(d.amdBase + "compat/initSelection"); d.dataAdapter = c.Decorate(d.dataAdapter, L) } } if (null == d.resultsAdapter && (d.resultsAdapter = i, null != d.ajax && (d.resultsAdapter = c.Decorate(d.resultsAdapter, V)), null != d.placeholder && (d.resultsAdapter = c.Decorate(d.resultsAdapter, _)), d.selectOnClose && (d.resultsAdapter = c.Decorate(d.resultsAdapter, w))), null == d.dropdownAdapter) { if (d.multiple) d.dropdownAdapter = y; else { var I = c.Decorate(y, R); d.dropdownAdapter = I } if (0 !== d.minimumResultsForSearch && (d.dropdownAdapter = c.Decorate(d.dropdownAdapter, O)), d.closeOnSelect && (d.dropdownAdapter = c.Decorate(d.dropdownAdapter, B)), null != d.dropdownCssClass || null != d.dropdownCss || null != d.adaptDropdownCssClass) { var x = t(d.amdBase + "compat/dropdownCss"); d.dropdownAdapter = c.Decorate(d.dropdownAdapter, x) } d.dropdownAdapter = c.Decorate(d.dropdownAdapter, k) } if (null == d.selectionAdapter) { if (d.multiple ? d.selectionAdapter = a : d.selectionAdapter = r, null != d.placeholder && (d.selectionAdapter = c.Decorate(d.selectionAdapter, o)), d.allowClear && (d.selectionAdapter = c.Decorate(d.selectionAdapter, n)), d.multiple && (d.selectionAdapter = c.Decorate(d.selectionAdapter, s)), null != d.containerCssClass || null != d.containerCss || null != d.adaptContainerCssClass) { var C = t(d.amdBase + "compat/containerCss"); d.selectionAdapter = c.Decorate(d.selectionAdapter, C) } d.selectionAdapter = c.Decorate(d.selectionAdapter, l) } d.language = this._resolveLanguage(d.language), d.language.push("en"); for (var A = [], j = 0; j < d.language.length; j++) { var J = d.language[j]; - 1 === A.indexOf(J) && A.push(J) } return d.language = A, d.translations = this._processTranslations(d.language, d.debug), d }, I.prototype.reset = function() { function t(e) { return e.replace(/[^\u0000-\u007E]/g, function(e) { return p[e] || e }) } this.defaults = { amdBase: "./", amdLanguageBase: "./i18n/", closeOnSelect: !0, debug: !1, dropdownAutoWidth: !1, escapeMarkup: c.escapeMarkup, language: {}, matcher: function i(r, a) { if ("" === e.trim(r.term)) return a; if (a.children && a.children.length > 0) { for (var o = e.extend(!0, {}, a), n = a.children.length - 1; n >= 0; n--) null == i(r, a.children[n]) && o.children.splice(n, 1); return o.children.length > 0 ? o : i(r, o) } var s = t(a.text).toUpperCase(), l = t(r.term).toUpperCase(); return s.indexOf(l) > -1 ? a : null }, minimumInputLength: 0, maximumInputLength: 0, maximumSelectionLength: 0, minimumResultsForSearch: 0, selectOnClose: !1, scrollAfterSelect: !1, sorter: function(e) { return e }, templateResult: function(e) { return e.text }, templateSelection: function(e) { return e.text }, theme: "default", width: "resolve" } }, I.prototype.applyFromElement = function(e, t) { var i = e.language, r = this.defaults.language, a = t.prop("lang"), o = t.closest("[lang]").prop("lang"), n = Array.prototype.concat.call(this._resolveLanguage(a), this._resolveLanguage(i), this._resolveLanguage(r), this._resolveLanguage(o)); return e.language = n, e }, I.prototype._resolveLanguage = function(t) { if (!t) return []; if (e.isEmptyObject(t)) return []; if (e.isPlainObject(t)) return [t]; var i; i = e.isArray(t) ? t : [t]; for (var r = [], a = 0; a < i.length; a++) if (r.push(i[a]), "string" == typeof i[a] && i[a].indexOf("-") > 0) { var o = i[a].split("-")[0]; r.push(o) } return r }, I.prototype._processTranslations = function(t, i) { for (var r = new d, a = 0; a < t.length; a++) { var o = new d, n = t[a]; if ("string" == typeof n) try { o = d.loadPath(n) } catch (e) { try { n = this.defaults.amdLanguageBase + n, o = d.loadPath(n) } catch (e) { i && window.console && console.warn && console.warn('Select2: The language file for "' + n + '" could not be automatically loaded. A fallback will be used instead.') } } else o = e.isPlainObject(n) ? new d(n) : n; r.extend(o) } return r }, I.prototype.set = function(t, i) { var r = {}; r[e.camelCase(t)] = i; var a = c._convertData(r); e.extend(!0, this.defaults, a) }, new I }), t.define("select2RS/options", ["require", "jquery", "./defaults", "./utils"], function(e, t, i, r) { function a(t, a) { if (this.options = t, null != a && this.fromElement(a), null != a && (this.options = i.applyFromElement(this.options, a)), this.options = i.apply(this.options), a && a.is("input")) { var o = e(this.get("amdBase") + "compat/inputData"); this.options.dataAdapter = r.Decorate(this.options.dataAdapter, o) } } return a.prototype.fromElement = function(e) { var i = ["select2RS"]; null == this.options.multiple && (this.options.multiple = e.prop("multiple")), null == this.options.disabled && (this.options.disabled = e.prop("disabled")), null == this.options.dir && (e.prop("dir") ? this.options.dir = e.prop("dir") : e.closest("[dir]").prop("dir") ? this.options.dir = e.closest("[dir]").prop("dir") : this.options.dir = "ltr"), e.prop("disabled", this.options.disabled), e.prop("multiple", this.options.multiple), r.GetData(e[0], "select2RSTags") && (this.options.debug && window.console && console.warn && console.warn('Select2: The `data-select2RS-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of Select2.'), r.StoreData(e[0], "data", r.GetData(e[0], "select2RSTags")), r.StoreData(e[0], "tags", !0)), r.GetData(e[0], "rev_ajaxurl") && (this.options.debug && window.console && console.warn && console.warn("Select2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of Select2."), e.attr("ajax--url", r.GetData(e[0], "rev_ajaxurl")), r.StoreData(e[0], "ajax-Url", r.GetData(e[0], "rev_ajaxurl"))); var a = {}; function o(e, t) { return t.toUpperCase() } for (var n = 0; n < e[0].attributes.length; n++) { var s = e[0].attributes[n].name; if ("data-" == s.substr(0, "data-".length)) { var l = s.substring("data-".length), c = r.GetData(e[0], l); a[l.replace(/-([a-z])/g, o)] = c } } t.fn.jquery && "1." == t.fn.jquery.substr(0, 2) && e[0].dataset && (a = t.extend(!0, {}, e[0].dataset, a)); var d = t.extend(!0, {}, r.GetData(e[0]), a); for (var p in d = r._convertData(d)) t.inArray(p, i) > -1 || (t.isPlainObject(this.options[p]) ? t.extend(this.options[p], d[p]) : this.options[p] = d[p]); return this }, a.prototype.get = function(e) { return this.options[e] }, a.prototype.set = function(e, t) { this.options[e] = t }, a }), t.define("select2RS/core", ["jquery", "./options", "./utils", "./keys"], function(e, t, i, r) { var a = function(e, r) { null != i.GetData(e[0], "select2RS") && i.GetData(e[0], "select2RS").destroy(), this.$element = e, this.id = this._generateId(e), r = r || {}, this.options = new t(r, e), a.__super__.constructor.call(this); var o = e.attr("tabindex") || 0; i.StoreData(e[0], "old-tabindex", o), e.attr("tabindex", "-1"); var n = this.options.get("dataAdapter"); this.dataAdapter = new n(e, this.options); var s = this.render(); this._placeContainer(s); var l = this.options.get("selectionAdapter"); this.selection = new l(e, this.options), this.$selection = this.selection.render(), this.selection.position(this.$selection, s); var c = this.options.get("dropdownAdapter"); this.dropdown = new c(e, this.options), this.$dropdown = this.dropdown.render(), this.dropdown.position(this.$dropdown, s); var d = this.options.get("resultsAdapter"); this.results = new d(e, this.options, this.dataAdapter), this.$results = this.results.render(), this.results.position(this.$results, this.$dropdown); var p = this; this._bindAdapters(), this._registerDomEvents(), this._registerDataEvents(), this._registerSelectionEvents(), this._registerDropdownEvents(), this._registerResultsEvents(), this._registerEvents(), this.dataAdapter.current(function(e) { p.trigger("selection:update", { data: e }) }), e.addClass("select2RS-hidden-accessible"), e.attr("aria-hidden", "true"), this._syncAttributes(), i.StoreData(e[0], "select2RS", this), e.data("select2RS", this) }; return i.Extend(a, i.Observable), a.prototype._generateId = function(e) { return "select2RS-" + (null != e.attr("id") ? e.attr("id") : null != e.attr("name") ? e.attr("name") + "-" + i.generateChars(2) : i.generateChars(4)).replace(/(:|\.|\[|\]|,)/g, "") }, a.prototype._placeContainer = function(e) { e.insertAfter(this.$element); var t = this._resolveWidth(this.$element, this.options.get("width")); null != t && e.css("width", t) }, a.prototype._resolveWidth = function(e, t) { var i = /^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i; if ("resolve" == t) { var r = this._resolveWidth(e, "style"); return null != r ? r : this._resolveWidth(e, "element") } if ("element" == t) { var a = e.outerWidth(!1); return a <= 0 ? "auto" : a + "px" } if ("style" == t) { var o = e.attr("style"); if ("string" != typeof o) return null; for (var n = o.split(";"), s = 0, l = n.length; s < l; s += 1) { var c = n[s].replace(/\s/g, "").match(i); if (null !== c && c.length >= 1) return c[1] } return null } return "computedstyle" == t ? window.getComputedStyle(e[0]).width : t }, a.prototype._bindAdapters = function() { this.dataAdapter.bind(this, this.$container), this.selection.bind(this, this.$container), this.dropdown.bind(this, this.$container), this.results.bind(this, this.$container) }, a.prototype._registerDomEvents = function() { var t = this; this.$element.on("change.select2RS", function() { t.dataAdapter.current(function(e) { t.trigger("selection:update", { data: e }) }) }), this.$element.on("focus.select2RS", function(e) { t.trigger("focus", e) }), this._syncA = i.bind(this._syncAttributes, this), this._syncS = i.bind(this._syncSubtree, this), this.$element[0].attachEvent && this.$element[0].attachEvent("onpropertychange", this._syncA); var r = window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver; null != r ? (this._observer = new r(function(i) { e.each(i, t._syncA), e.each(i, t._syncS) }), this._observer.observe(this.$element[0], { attributes: !0, childList: !0, subtree: !1 })) : this.$element[0].addEventListener && (this.$element[0].addEventListener("DOMAttrModified", t._syncA, !1), this.$element[0].addEventListener("DOMNodeInserted", t._syncS, !1), this.$element[0].addEventListener("DOMNodeRemoved", t._syncS, !1)) }, a.prototype._registerDataEvents = function() { var e = this; this.dataAdapter.on("*", function(t, i) { e.trigger(t, i) }) }, a.prototype._registerSelectionEvents = function() { var t = this, i = ["toggle", "focus"]; this.selection.on("toggle", function() { t.toggleDropdown() }), this.selection.on("focus", function(e) { t.focus(e) }), this.selection.on("*", function(r, a) { -1 === e.inArray(r, i) && t.trigger(r, a) }) }, a.prototype._registerDropdownEvents = function() { var e = this; this.dropdown.on("*", function(t, i) { e.trigger(t, i) }) }, a.prototype._registerResultsEvents = function() { var e = this; this.results.on("*", function(t, i) { e.trigger(t, i) }) }, a.prototype._registerEvents = function() { var e = this; this.on("open", function() { e.$container.addClass("select2RS-container--open") }), this.on("close", function() { e.$container.removeClass("select2RS-container--open") }), this.on("enable", function() { e.$container.removeClass("select2RS-container--disabled") }), this.on("disable", function() { e.$container.addClass("select2RS-container--disabled") }), this.on("blur", function() { e.$container.removeClass("select2RS-container--focus") }), this.on("query", function(t) { e.isOpen() || e.trigger("open", {}), this.dataAdapter.query(t, function(i) { e.trigger("results:all", { data: i, query: t }) }) }), this.on("query:append", function(t) { this.dataAdapter.query(t, function(i) { e.trigger("results:append", { data: i, query: t }) }) }), this.on("keypress", function(t) { var i = t.which; e.isOpen() ? i === r.ESC || i === r.TAB || i === r.UP && t.altKey ? (e.close(), t.preventDefault()) : i === r.ENTER ? (e.trigger("results:select", {}), t.preventDefault()) : i === r.SPACE && t.ctrlKey ? (e.trigger("results:toggle", {}), t.preventDefault()) : i === r.UP ? (e.trigger("results:previous", {}), t.preventDefault()) : i === r.DOWN && (e.trigger("results:next", {}), t.preventDefault()) : (i === r.ENTER || i === r.SPACE || i === r.DOWN && t.altKey) && (e.open(), t.preventDefault()) }) }, a.prototype._syncAttributes = function() { this.options.set("disabled", this.$element.prop("disabled")), this.options.get("disabled") ? (this.isOpen() && this.close(), this.trigger("disable", {})) : this.trigger("enable", {}) }, a.prototype._syncSubtree = function(e, t) { var i = !1, r = this; if (!e || !e.target || "OPTION" === e.target.nodeName || "OPTGROUP" === e.target.nodeName) { if (t) if (t.addedNodes && t.addedNodes.length > 0) for (var a = 0; a < t.addedNodes.length; a++) { t.addedNodes[a].selected && (i = !0) } else t.removedNodes && t.removedNodes.length > 0 && (i = !0); else i = !0; i && this.dataAdapter.current(function(e) { r.trigger("selection:update", { data: e }) }) } }, a.prototype.trigger = function(e, t) { var i = a.__super__.trigger, r = { open: "opening", close: "closing", select: "selecting", unselect: "unselecting", clear: "clearing" }; if (void 0 === t && (t = {}), e in r) { var o = r[e], n = { prevented: !1, name: e, args: t }; if (i.call(this, o, n), n.prevented) return void(t.prevented = !0) } i.call(this, e, t) }, a.prototype.toggleDropdown = function() { this.options.get("disabled") || (this.isOpen() ? this.close() : this.open()) }, a.prototype.open = function() { this.isOpen() || this.trigger("query", {}) }, a.prototype.close = function() { this.isOpen() && this.trigger("close", {}) }, a.prototype.isOpen = function() { return this.$container.hasClass("select2RS-container--open") }, a.prototype.hasFocus = function() { return this.$container.hasClass("select2RS-container--focus") }, a.prototype.focus = function(e) { this.hasFocus() || (this.$container.addClass("select2RS-container--focus"), this.trigger("focus", {})) }, a.prototype.enable = function(e) { this.options.get("debug") && window.console && console.warn && console.warn('Select2: The `select2RS("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop("disabled") instead.'), null != e && 0 !== e.length || (e = [!0]); var t = !e[0]; this.$element.prop("disabled", t) }, a.prototype.data = function() { this.options.get("debug") && arguments.length > 0 && window.console && console.warn && console.warn('Select2: Data can no longer be set using `select2RS("data")`. You should consider setting the value instead using `$element.val()`.'); var e = []; return this.dataAdapter.current(function(t) { e = t }), e }, a.prototype.val = function(t) { if (this.options.get("debug") && window.console && console.warn && console.warn('Select2: The `select2RS("val")` method has been deprecated and will be removed in later Select2 versions. Use $element.val() instead.'), null == t || 0 === t.length) return this.$element.val(); var i = t[0]; e.isArray(i) && (i = e.map(i, function(e) { return e.toString() })), this.$element.val(i).trigger("change") }, a.prototype.destroy = function() { this.$container.remove(), this.$element[0].detachEvent && this.$element[0].detachEvent("onpropertychange", this._syncA), null != this._observer ? (this._observer.disconnect(), this._observer = null) : this.$element[0].removeEventListener && (this.$element[0].removeEventListener("DOMAttrModified", this._syncA, !1), this.$element[0].removeEventListener("DOMNodeInserted", this._syncS, !1), this.$element[0].removeEventListener("DOMNodeRemoved", this._syncS, !1)), this._syncA = null, this._syncS = null, this.$element.off(".select2RS"), this.$element.attr("tabindex", i.GetData(this.$element[0], "old-tabindex")), this.$element.removeClass("select2RS-hidden-accessible"), this.$element.attr("aria-hidden", "false"), i.RemoveData(this.$element[0]), this.$element.removeData("select2RS"), this.dataAdapter.destroy(), this.selection.destroy(), this.dropdown.destroy(), this.results.destroy(), this.dataAdapter = null, this.selection = null, this.dropdown = null, this.results = null }, a.prototype.render = function() { var t = e(''); return t.attr("dir", this.options.get("dir")), this.$container = t, this.$container.addClass("select2RS-container--" + this.options.get("theme")), i.StoreData(t[0], "element", this.$element), t }, a }), t.define("select2RS/compat/utils", ["jquery"], function(e) { return { syncCssClasses: function(t, i, r) { var a, o, n = []; (a = e.trim(t.attr("class"))) && e((a = "" + a).split(/\s+/)).each(function() { 0 === this.indexOf("select2RS-") && n.push(this) }), (a = e.trim(i.attr("class"))) && e((a = "" + a).split(/\s+/)).each(function() { 0 !== this.indexOf("select2RS-") && null != (o = r(this)) && n.push(o) }), t.attr("class", n.join(" ")) } } }), t.define("select2RS/compat/containerCss", ["jquery", "./utils"], function(e, t) { function i(e) { return null } function r() {} return r.prototype.render = function(r) { var a = r.call(this), o = this.options.get("containerCssClass") || ""; e.isFunction(o) && (o = o(this.$element)); var n = this.options.get("adaptContainerCssClass"); if (n = n || i, -1 !== o.indexOf(":all:")) { o = o.replace(":all:", ""); var s = n; n = function(e) { var t = s(e); return null != t ? t + " " + e : e } } var l = this.options.get("containerCss") || {}; return e.isFunction(l) && (l = l(this.$element)), t.syncCssClasses(a, this.$element, n), a.css(l), a.addClass(o), a }, r }), t.define("select2RS/compat/dropdownCss", ["jquery", "./utils"], function(e, t) { function i(e) { return null } function r() {} return r.prototype.render = function(r) { var a = r.call(this), o = this.options.get("dropdownCssClass") || ""; e.isFunction(o) && (o = o(this.$element)); var n = this.options.get("adaptDropdownCssClass"); if (n = n || i, -1 !== o.indexOf(":all:")) { o = o.replace(":all:", ""); var s = n; n = function(e) { var t = s(e); return null != t ? t + " " + e : e } } var l = this.options.get("dropdownCss") || {}; return e.isFunction(l) && (l = l(this.$element)), t.syncCssClasses(a, this.$element, n), a.css(l), a.addClass(o), a }, r }), t.define("select2RS/compat/initSelection", ["jquery"], function(e) { function t(e, t, i) { i.get("debug") && window.console && console.warn && console.warn("Select2: The `initSelection` option has been deprecated in favor of a custom data adapter that overrides the `current` method. This method is now called multiple times instead of a single time when the instance is initialized. Support will be removed for the `initSelection` option in future versions of Select2"), this.initSelection = i.get("initSelection"), this._isInitialized = !1, e.call(this, t, i) } return t.prototype.current = function(t, i) { var r = this; this._isInitialized ? t.call(this, i) : this.initSelection.call(null, this.$element, function(t) { r._isInitialized = !0, e.isArray(t) || (t = [t]), i(t) }) }, t }), t.define("select2RS/compat/inputData", ["jquery", "../utils"], function(e, t) { function i(e, t, i) { this._currentData = [], this._valueSeparator = i.get("valueSeparator") || ",", "hidden" === t.prop("type") && i.get("debug") && console && console.warn && console.warn("Select2: Using a hidden input with Select2 is no longer supported and may stop working in the future. It is recommended to use a `
    delete
    save
    delete
    delete
    OFF
    ON
    save
    close
    palettekeyboard_arrow_up
    check
    '; function st() { this.innerHTML = ge[dt(this, "data-text")] } function lt() { this.setAttribute("placeholder", ge[dt(this, "data-placeholder")]) } function ct() { this.setAttribute("data-message", ge[dt(this, "data-alert")]) } function dt(e, t) { return e.getAttribute(t) || "" } function pt(t) { t || (t = {}), "string" == typeof t && (t = JSON.parse(t.replace(/\&/g, '"'))), ge = e.extend({}, rt, t), G = ge.color, b.find("*[data-placeholder]").each(lt), b.find("*[data-alert]").each(ct), b.find("*[data-text]").each(st) } function ut(t, i, r, a) { var o, n, s, l, c; if (e.isPlainObject(t)) for (var d in t) t.hasOwnProperty(d) && ("string" == typeof(t = t[d]) ? "gradient" === (t = RSColor.process(t))[1] ? (l = (n = t[2]).angle, c = n.type, t = RSColor.processGradient(e.extend(!0, {}, n), !0)) : t = t[0] : (l = t.angle, c = t.type), o = isNaN(d) ? d.replace(/_/g, " ").replace(/\b\w/g, function(e) { return e.toUpperCase() }) : "radial" !== c ? l + "°" : "radial"); else o = t; if ("blank" !== t) { e.isPlainObject(t) && (n = t, "", t = a || RSColor.processGradient(e.extend(!0, {}, t), !0)); var p = ''; return i || (p += 'clear'), s = e(p += ""), n && s.data("gradient", n), s[0] } return (s = document.createElement("span")).className = "revbuilder-cpicker-color blank", s } function vt() { var t = dt(this, "data-color").toLowerCase(), i = !Je && t === xe.toLowerCase(); if (t === be || i) { var r = e(this); return r.closest(".revbuilder-cpicker-presets-group").find(".revbuilder-cpicker-color.selected").removeClass("selected"), Pe = r, Je && !W && ft(Pe.data("gradient"), !0), r.addClass("selected"), !1 } } function ht(e, t) { for (var i = document.createDocumentFragment(), r = -1 !== e.search("core"), a = r ? "" : " revbuilder-picker-color-custom", o = t.length, n = Math.max(Math.ceil(o / Ue), We), s = 0; s < n; s++) for (; t.length < (s + 1) * Ue;) t[t.length] = "blank"; for (o = t.length, s = 0; s < o; s++) i.appendChild(ut(t[s], r, a)); return ["revbuilder-cpicker-" + e, i] } function gt(e, t, i) { if (Ae) { if (!e) { var r = t || L.val(), a = void 0 !== i ? i : Le.val(); t = "transparent" === r ? "transparent" : "100%" === a ? RSColor.sanitizeHex(r) : RSColor.processRgba(r, a) } var o = "transparent" === t, n = o ? "" : t; e ? R.data("state", t) : B.data("state", t), o ? (Ae.css("background", n), Oe.css("background", n)) : (Ae[0].style.background = n, Oe.css("background", n)), c && c(we, t, Se, Re), RVS.DOC.trigger("revcolorpickerupdate", [we, t]) } } function ft(i, r) { var o = RSColor.process(i), n = o[1], l = o[0]; if (a && y.removeClass("checked"), "gradient" !== n && "gradient_css" !== n) { switch (n) { case "hex": i = RSColor.sanitizeHex(l), Le.val("100%"), Pt(100); break; case "rgba": var c = RSColor.rgbaToHex(l), d = parseInt(100 * c[1], 10); i = c[0], Le.val(d + "%"), Pt(d); break; case "rgb": i = RSColor.rgbToHex(l), Le.val("100%"), Pt(100); break; default: ae.click(), B.click() } Q.val(i).change(), r || B.click() } else a ? ("gradient_css" === n && (o[2] = JSON.parse(o[2])), function(i) { var r = i.angle, a = i.easing ? i.easing : "none", o = i.hasOwnProperty("strength") ? i.strength : "100"; "radial" === i.type && (r = "radial"); oe.removeClass("selected"), e('.revbuilder-cpicker-orientation[data-direction="' + r + '"]').addClass("selected"), $t(a), s.val(a).trigger("change.select2RS"), w.val(o + "%"), t.val(Vt(r)), $t(), Jt(r), function(e) { for (var t, i, r = document.createDocumentFragment(), a = e.length, o = 0; o < a; o++) i = e[o], t = i.align, r.appendChild(_t(t, i.position, yt(i), St(i, t))); pe && pe.draggable("destroy"); ue.empty().append(r), pe = ue.children().draggable(it) }(i.colors) }(o[2]), Bt(), r || (ce = !0, R.click())) : (Q.val(RSColor.defaultValue).change(), B.click()); return [l, n] } function mt(t, i) { var r = function(e, t) { var i, r = o.slice(), a = r.length; for (r.sort(RSColor.sortPoints); a--;) if ((i = r[a]).align === e && i.x < t) return i; a = r.length; for (var n = 0; n < a; n++) if ((i = r[n]).align === e && i.x > t) return i }(t, i).color, a = St(r, t, !0), n = _t(t, i, yt(r, !0), a); C && C.removeClass("active"), C = e(n).addClass("active").appendTo(ue).draggable(it), z = C.children(".revbuilder-cpicker-point-square")[0], $ = C.children(".revbuilder-cpicker-point-triangle")[0], pe = ue.children(); var s = bt(i); Bt(n), "bottom" === t && x.val(s[1]).change() } function bt(e) { void 0 === e && (e = o[ne].x); var t = C.attr("data-color"), i = C.hasClass("revbuilder-cpicker-point-bottom"); if (i) ve.hasClass("active") && ve.removeClass("active"), t = RSColor.rgbaToHex(t)[0], Qe.css("background", t), b.find(".revbuilder-cpicker-point-bottom").length > 2 && ve.addClass("active"), de.parent().addClass("disabled"), b.addClass("open"); else { ve.hasClass("active") && (Qe.css("background", ""), ve.removeClass("active")); var r = RSColor.getOpacity(t); de.attr("data-opacity", r).val(r).parent().removeClass("disabled"), b.find(".revbuilder-cpicker-point-top").length > 2 && ve.addClass("active"), b.removeClass("open") } return I.val(e + "%").parent().removeClass("disabled"), [i, t] } function St(e, t, i) { return "bottom" === t ? "rgb(" + e.r + "," + e.g + "," + e.b + ")" : "rgba(0, 0, 0, " + (i ? "1" : e.a) + ")" } function yt(e, t) { var i = t ? "1" : e.a; return "rgba(" + e.r + "," + e.g + "," + e.b + "," + i + ")" } function Rt(e, t) { var i = RSColor.hexToRGB(e); t ? (_.val(e), g.value = i[0], f.value = i[1], m.value = i[2]) : (L.val(e), u.value = i[0], v.value = i[1], h.value = i[2], "0%" === Le[0].value && Le.val("100%").trigger("focusout")), L.rsColorPicker("refresh") } function _t(t, i, r, a) { var o = document.createElement("span"); return o.className = "revbuilder-cpicker-point revbuilder-cpicker-point-" + t, "string" == typeof r ? o.setAttribute("data-color", r) : e(o).data("gradient", r), o.setAttribute("data-location", i), o.style.left = i + "%", o.innerHTML = "bottom" === t ? '' : '', o } function Vt(e) { return M || (M = document.createElement("textarea")), e && "radial" !== e || (e = "0"), M.innerHTML = e + "°", M.value } function kt() { C && (C.removeClass("active"), C = !1), I.parent().addClass("disabled"), de.parent().addClass("disabled"), ve.removeClass("active"), ve.removeClass("active"), Qe.css("background", ""), b.removeClass("open") } function Ot(e, t) { b.removeClass("active is-basic").hide(), r.removeClass("revbuilder-colorpicker-open"), De.css({ left: "", top: "" }), A && (A.remove(), A = !1), Pe ? (Pe.hasClass("selected") ? (t && we.data("hex", Pe.attr("data-color").toLowerCase()), Pe.removeClass("selected")) : we.removeData("hex"), Pe = !1) : we.removeData("hex"), t || (J && J(we, le, se, Se, Re), Ie && "transparent" !== Ie ? (Ae[0].style.background = Ie, Oe.css("background", Ie)) : (Ae.css("background", ""), Oe.css("background", "")), RVS.DOC.trigger("revcolorpickercancel", [we, le, se])), l = null, n = null, u = null, v = null, h = null, g = null, f = null, m = null, _ = null, j = null, L = null, X = null, N = null, U = null, Y = null, K = null, H = null, M = null, re = null, ie = null, ue = null, Oe = null, Le = null, Ae = null, we = null } function wt(t) { var i = e.extend(!0, {}, Ge); return RSColor.processGradient(i, !0, t) } function Bt(i, r, a, l) { q = r, At(), q = !1; for (var c, d, p, u, v = [], h = o.length, g = 0; g < h; g++) d = (p = o[g]).color, v[g] = d, (c = p.el).setAttribute("data-color", RSColor.rgbaString(d.r, d.g, d.b, d.a)), c.setAttribute("data-opacity", 100 * d.a), i && i === c && (ne = g); n.hasClass("selected") ? (Ge.type = "radial", Ge.angle = "0") : (Ge.type = "linear", Ge.angle = parseInt(t.val(), 10).toString()), Ge.colors = v, Ge.easing = s.val(), Ge.strength = parseInt(w.val(), 10), Pe && !Te && Pe.removeClass("selected"), l || (u = e.extend(!0, {}, Ge), gt(!0, RSColor.processGradient(u, !0))), a || (U || (U = document.getElementById("revbuilder-cpicker-direction-horizontal")), Y || (Y = document.getElementById("revbuilder-cpicker-direction-vertical")), K || (K = document.getElementById("revbuilder-cpicker-direction-radial")), H || (H = document.getElementById("revbuilder-cpicker-gradient-input")), u = wt(!0), H.style.background = function(e, t) { var i; - 1 === e.search("deg") && (i = (e = e.split("("))[0], e.shift(), e = i + "(180deg, " + e.join("(")), i = (e = e.split("("))[0], e.shift(); var r = e.join("(").split(","); return r.shift(), i + "(" + (t = void 0 !== t ? t + "deg," : "ellipse at center,") + r.join(",") }(u.replace("radial-", "linear-").replace("ellipse at center,", ""), "90"), "none" !== Ge.easing && (u = wt()), re.style.background = u, Ge.type = "linear", Ge.angle = "90", U.style.background = wt(), Ge.angle = "180", Y.style.background = wt(), Ge.type = "radial", Ge.angle = "0", K.style.background = wt()) } function Lt(e, t) { if (0 === e) return !1; for (var i; e--;) if ((i = o[e]).align !== t) return i; return !1 } function It(e, t, i) { if (e === i) return !1; for (var r; e++ < i;) if ((r = o[e]).align !== t) return r; return !1 } function xt(e, t, i) { var r, a = t.alpha, o = i.alpha; r = a !== o ? RSColor.distAlpha(e.x, t.x, i.x, a, o).toFixed(2) : a, r = RSColor.sanitizeAlpha(r), e.alpha = r, e.color.a = r } function Ct(e, t, i) { var r = e.color, a = t.color, o = i.color; if (t !== i) { var n = e.x, s = t.x, l = i.x; r.r = RSColor.distColor(n, s, l, a.r, o.r), r.g = RSColor.distColor(n, s, l, a.g, o.g), r.b = RSColor.distColor(n, s, l, a.b, o.b) } else r.r = a.r, r.g = a.g, r.b = a.b } function At() { o = [], D = [], P = [], pe.each(jt), o.sort(RSColor.sortPoints); for (var e, t, i, r, a = o.length, n = a - 1, s = 0; s < a; s++) !1 === (t = Lt(s, i = (e = o[s]).align)) && (t = It(s, i, n)), !1 === (r = It(s, i, n)) && (r = Lt(s, i)), "bottom" === i ? xt(e, t, r) : Ct(e, t, r); o.sort(RSColor.sortPoints) } function jt(e) { var t = RSColor.rgbValues(dt(this, "data-color"), 4), i = -1 !== this.className.search("bottom") ? "bottom" : "top", r = t[3].replace(/\.?0*$/, "") || 0, a = this.style.left; - 1 !== a.search("px") ? (a = parseInt(a, 10), a = parseInt(100 * (Math.round(a) / (He - 2)).toFixed(2), 10)) : a = parseInt(a, 10), q && (a < 50 ? a += 2 * (50 - a) : a -= 2 * (a - 50)), this.style.left = a + "%", this.setAttribute("data-location", a), r = RSColor.sanitizeAlpha(r), o[e] = { el: this, x: a, alpha: r, align: i, color: { r: parseInt(t[0], 10), g: parseInt(t[1], 10), b: parseInt(t[2], 10), a: r, position: a, align: i } }, C && C[0] !== this && ("bottom" === i ? P[P.length] = a : D[D.length] = a) } function Jt(e) { ie || (ie = document.getElementById("revbuilder-cpicker-wheel-point")), e = void 0 !== e ? e : parseInt(t.val(), 10), ie.style.transform = "rotate(" + e + "deg)" } function Tt(i, r, a) { var o, n, s = void 0 !== a, l = s ? a : parseInt(t.val(), 10); if (i && "keyup" === i.type) o = !isNaN(l) && l >= -360 && l <= 360, n = l; else { var c = parseInt(t.data("orig-value"), 10); l || (l = "0"), (isNaN(l) || l < -360 || l > 360) && (l = n = c, t.val(Vt(l)), o = !0), l !== c && (n = l, o = !0, t.val(Vt(l)), s || (l = r || l, oe.removeClass("selected"), e('.revbuilder-cpicker-orientation[data-direction="' + l + '"]').addClass("selected"))) }(o || r) && (n && Jt(n), Bt()) } function Ft(e, t) { var i = parseInt(100 * (Math.round(t.position.left) / (He - 2)).toFixed(2), 10); I.val(i + "%").trigger("keyup") } function Et() { var t = e(this); t.hasClass("revbuilder-cpicker-point-bottom") ? "bottom" : "top", t.click() } function Dt() { I.trigger("focusout") } function Pt(e) { Me = !0, Ne.slider("value", Math.round(.01 * e * Ke)), Me = !1 } function Nt(e) { var t = te.offset(), i = e.pageX - t.left, r = e.pageY - t.top; if (!isNaN(i) && !isNaN(r)) { var a = Math.atan2(r - Ze, i - Ze) * (180 / Math.PI) + 90; a < 0 && (a += 360), a = Math.max(0, Math.min(360, Math.round(a))), a = 5 * Math.round(a / 5), !0, Tt(!1, !1, a), !1 } } function Mt(e) { e.stopImmediatePropagation() } function zt(t) { t || (t = Be), t.each(function() { var t = e(this).find(".revbuilder-cpicker-color").css("margin-bottom", 0), i = t.length; t.each(function(e) { e < i - 4 && (this.style.marginBottom = et + "px") }) }).RSScroll("update") } function $t(t) { X || (X = e("#revpicker-easing-row")), t || (t = s.val()), X["none" === t ? "removeClass" : "addClass"]("active") } function Qt() { S || function() { r || (r = e("body"), b = e('
    ' + nt + "
    ").appendTo(r)); Ve.core && (Ve.core.colors && (at = Ve.core.colors), Ve.core.gradients && (ot = Ve.core.gradients)); Ht(Ve), pt(Ve.language || rt), S = !0 }(), Qe = e("#revbuilder-cpicker-preview-gradient"), ve = e("#revbuilder-cpicker-color-delete"), de = e("#revbuilder-cpicker-grad-opacity"), I = e("#revbuilder-cpicker-color-location"), oe = e(".revbuilder-cpicker-orientation"), x = e("#revbuilder-cpicker-iris-gradient"), Q = e("#revbuilder-cpicker-iris-color"), R = e("#revbuilder-cpicker-gradient-btn"), ae = e("#revbuilder-cpciker-clear-hex"), y = e("#revbuilder-cpicker-meta-reverse"), Ne = e("#revbuilder-cpicker-scroll"), B = e("#revbuilder-cpicker-color-btn"), w = e("#revbuilder-cpicker-strength"), t = e("#revbuilder-cpicker-meta-angle"), te = e("#revbuilder-cpicker-wheel"), De = e("#revbuilder-cpicker"), s = e("#revbuilder-cpicker-easing"), it.drag = Ft, it.stop = Dt, it.start = Et, B.data("state", e("#revbuilder-cpicker-colors").find(".revbuilder-cpicker-color").eq(0).attr("data-color") || "#ffffff"), R.data("state", e("#revbuilder-cpicker-gradients").find(".revbuilder-cpicker-color").eq(0).attr("data-color") || "linear-gradient(0deg, rgba(255, 255, 255, 1) 0%, rgba(0, 0, 0, 1) 100%)"), De.draggable({ containment: "window", handle: ".revbuilder-cpicker-draggable", stop: function() { De.css("height", "auto") } }), Be = e(".revbuilder-cpicker-presets-group").RSScroll({ wheelPropagation: !1, suppressScrollX: !0 }), te.on("mousedown.revcpicker", function(e) { oe.removeClass("selected"), Z = !0, Nt(e) }).on("mousemove.revcpicker", function(e) { Z && Nt(e) }).on("mouseleave.revcpicker mouseup.revcpicker", function() { Z = !1 }), e(".revbuilder-cpicker-main-btn").on("click.revcpicker", function() { var t; if (W = -1 === this.id.search("gradient"), Ae && (t = e(this).data("state")), W ? (Ae && (be = L.val()), b.removeClass("gradient-view").addClass("color-view")) : (Ae && (be = t), b.removeClass("color-view").addClass("gradient-view"), ce || (j.children(".revbuilder-cpicker-color").not(".blank").eq(0).click(), ce = !0)), t) { var i = "transparent" === t ? "" : t; Ae.css("background", i), Oe.css("background", i), Je = !0, e(".revbuilder-cpicker-color").not(".blank").each(vt), Je = !1, RVS.DOC.trigger("revcolorpickerupdate", [we, t]) } W || (Te = !0, e(".revbuilder-cpicker-point-bottom").first().click(), Te = !1) }), e("#revbuilder-cpicker-palette").on("click", function() { b.hasClass("palette-open") ? b.removeClass("palette-open") : (b.addClass("palette-open"), zt()) }), e("#revbuilder-cpicker-check").on("click.revcipicker", function() { var t, i, r, a; if (b.hasClass("color-view")) { var o = L.val(), n = Le.val(); r = "transparent" === o ? "transparent" : "100%" === n ? RSColor.sanitizeHex(o) : RSColor.processRgba(o, n), t = [we, r, !1], i = r } else { kt(), Bt(!1, !1, !0, !0); var s = JSON.stringify(Ge).replace(/\"/g, "&"); i = RSColor.processGradient(e.extend(!0, {}, Ge), !0), t = [we, i, s] }!0 !== (a = t[1] !== Ie) && !0 !== he || (we.attr("data-color", t[1]), RVS.DOC.trigger("revcolorpickerchanged", t), $e && $e(t[0], t[1], t[2], Se, Re)), Ot(0, !0 === a || !0 === he) }), b.on("click.revcpicker", function(t) { e(t.target).closest("#revbuilder-cpicker").length || kt() }), e(".revbuilder-cpicker-close").on("click.revcpicker", Ot), Q.wpColorPicker({ palettes: !1, width: 190, border: !1, hide: !1, change: function(e, t) { var i = t.color.toString(); if (this.value = i, Rt(i), !je) { var r = Le.val(); 0 === parseInt(r, 10) && (i = "transparent"), gt(!1, i, r), Pe && (Pe.removeClass("selected"), Pe = !1) } } }), x.wpColorPicker({ palettes: !1, height: 190, border: !1, hide: !1, change: function(e, t) { var i = t.color.toString(); this.value = i, Rt(i, !0), Qe.css("background", i), z.style.backgroundColor = i, $.style.borderBottomColor = i; var r = RSColor.processRgba(i, 100), a = RSColor.rgbValues(r, 4), o = Ge.colors[ne]; o.r = a[0], o.g = a[1], o.b = a[2], o.a = RSColor.sanitizeAlpha(a[3]), C && C.attr("data-color", r), Bt() } }), Ne.slider({ orientation: "vertical", max: Ke, value: Ke, start: function() { Ee = "transparent" === L.val() }, slide: function(e, t) { if (!Me) { var i, r = parseInt(100 * (t.value / Ke).toFixed(2), 10); Ee && (i = r ? "#ffffff" : "transparent", L.val(i)), 0 === r && (i = "transparent"), gt(!1, i, r || "transparent"), Le.val(r + "%") } } }), e("body").on("click.revcpicker", ".revbuilder-cpicker-point", function() { ue.find(".revbuilder-cpicker-point.active").removeClass("active"), C = e(this).addClass("active"), z = C.children(".revbuilder-cpicker-point-square")[0], $ = C.children(".revbuilder-cpicker-point-triangle")[0], Bt(this); var t = bt(); t[0] && x.val(t[1]).change() }).on("mousedown.revcpicker", ".revbuilder-cpicker-point", function(t) { C = e(this).data("mousestart", t.pageY) }).on("mousemove.revcpicker", function(e) { if (C && C.data("mousestart")) { var t = C.data("mousestart"), i = e.pageY; C.hasClass("revbuilder-cpicker-point-bottom") ? i > t && i - t > Xe && ve.hasClass("active") ? C.addClass("warning") : C.removeClass("warning") : t > i && t - i > Xe && ve.hasClass("active") ? C.addClass("warning") : C.removeClass("warning") } }).on("mouseup.revcpicker", function(e) { if (C && C.data("mousestart")) { var t = C.data("mousestart"), i = e.pageY; C.removeData("mousestart"), C.hasClass("revbuilder-cpicker-point-bottom") ? i > t && i - t > Ye && ve.hasClass("active") ? ve.click() : C.removeClass("warning") : t > i && t - i > Ye && ve.hasClass("active") ? ve.click() : C.removeClass("warning") } }).on("keypress.revcpicker", function(e) { if (b.hasClass("active")) { var t = e.which; 27 == t ? Ot() : 13 == t && V && V.blur() } }).on("click.revcpicker", ".revbuilder-cpicker-color:not(.blank)", function() { if (Pe) { if (Pe[0] === this && Pe.hasClass("selected")) return; Pe.removeClass("selected") } if (Pe = e(this), b.hasClass("color-view")) { var t, i = Pe.attr("data-color"), r = RSColor.process(i); "rgba" === r[1] ? (i = RSColor.rgbaToHex(r[0]), t = 100 * parseFloat(i[1]), Le.val(t + "%").trigger("keyup"), i = i[0]) : "transparent" !== r[1] && "transparent" !== i ? Le.val("100%").trigger("keyup") : (je = !0, ae.click()), je = !0, Q.val(i).change(), "transparent" === L.val() && L.val(i.toLowerCase()), je = !1; var a = Le.val(); 0 === parseInt(a, 10) && (i = "transparent"), gt(!1, i, a), Pe.addClass("selected") } else l.removeClass("full"), N.removeClass("full"), ft(Pe.data("gradient"), !0), y.removeClass("checked"), j.find(".revbuilder-cpicker-color.selected").removeClass("selected"), e(".revbuilder-cpicker-point-bottom").first().click(), Pe.addClass("selected") }).on("mouseover.revcpicker", ".revbuilder-cpicker-color:not(.blank)", function() { Fe && (re.style.background = dt(this, "data-color")) }).on("mouseout.revcpicker", ".revbuilder-cpicker-color:not(.blank)", function() { Fe && Bt() }).on("click.revcpicker", ".revbuilder-cpicker-delete", function() { if (p) { if (window.confirm(document.getElementById("revbuilder-cpicker-remove-delete").innerHTML)) { b.addClass("onajax onajaxdelete"); var t = e(this), i = t.parent(), r = i.attr("data-title") || ""; if (!r) return void console.log("Preset does not have a name/title"); var a = -1 !== t.closest(".revbuilder-cpicker-presets-group")[0].id.search("colors") ? "colors" : "gradients"; RVS.DOC.off("revcpicker_onajax_delete.revcpicker").on("revcpicker_onajax_delete.revcpicker", function(r, a) { a && console.log(a); var o = t.closest(".revbuilder-cpicker-presets-group"), n = o.find(".rs__scrollbar-x-rail"); i.remove(), e('').insertBefore(n), zt(o), b.removeClass("onajax onajaxdelete") }), r = e.trim(r.replace(/\W+/g, "_")).replace(/^\_|\_$/g, "").toLowerCase(), p("delete", r, a, "revcpicker_onajax_delete", we) } return !1 } console.log("Ajax callback not defined") }), e(".revbuilder-cpicker-save-preset-btn").on("click.revcpicker", function() { if (p) { var t, i, r = e(this), a = r.closest(".revbuilder-cpicker-presets").find(".revbuilder-cpicker-preset-save").val(); if (a && isNaN(a)) { if (t = b.hasClass("color-view") ? "colors" : "gradients", a = e.trim(a.replace(/\W+/g, "_")).replace(/^\_|\_$/g, "").toLowerCase(), e("#revbuilder-cpicker-" + t + "-custom").find(".revbuilder-cpicker-color").not(".blank").each(function() { if (e.trim(dt(this, "data-title").replace(/\W+/g, "_")).replace(/^\_|\_$/g, "").toLowerCase() === a) return alert(r.attr("data-message")), i = !0, !1 }), !i) { b.addClass("onajax onajaxsave"); var o, n, s = {}; if ("colors" === t) { var l = L.val(), c = Le.val(); o = "transparent" === l ? "transparent" : "100%" === c ? RSColor.sanitizeHex(l) : RSColor.processRgba(l, c) } else n = re.style.background, Bt(!1, !1, !0), o = e.extend({}, Ge); s[a] = o, RVS.DOC.off("revcpicker_onajax_save.revcpicker").on("revcpicker_onajax_save.revcpicker", function(i, a) { if (a) return b.removeClass("onajax onajaxsave"), void alert(r.attr("data-message")); var o = e(ut(s, !1, " revbuilder-picker-color-custom", n)), l = e("#revbuilder-cpicker-" + t + "-custom"), c = l.find(".rs__scrollbar-x-rail"), d = l.find(".revbuilder-cpicker-color.blank"); if (d.length) d = d.eq(0), o.insertBefore(d), d.remove(); else { o.insertBefore(c); for (var p = l.children(".revbuilder-cpicker-color").length, u = Math.max(Math.ceil(p / Ue), We) * Ue; p++ < u;) e('').insertBefore(c) } e("#revbuilder-cpicker-preset-" + t).val("custom").trigger("change"), zt(l), o.click(), e(".revbuilder-cpicker-preset-save").val(""), b.removeClass("onajax onajaxsave") }), p("save", s, t, "revcpicker_onajax_save", we) } } else alert(r.attr("data-message")) } else console.log("Ajax callback not defined") }), ae.on("click.revcpicker", function() { Pt(0), Q.val(RSColor.defaultValue).change(), L.val("transparent"), gt(!1, "transparent"), clearTimeout(ke), ke = setTimeout(Gt, 100) }), b.find('input[type="text"]').on("focusin.revcpicker", function() { V = this }).on("focusout.revcpicker", function() { V = !1 }), e(".revbuilder-cpicker-input").on("focusin.revcpicker", function() { var t = e(this); t.data("orig-value", t.val()).parent().addClass("focus") }).on("focusout.revcpicker", function() { e(this).parent().removeClass("focus") }), e(".revbuilder-cpicker-rgb").on("focusin.revcpicker", function() { e(this).data("prev", this.value) }).on("focusout.revcpicker keyup.revcpicker", function() { var t = this.value; isNaN(t) || t < 0 || t > 255 ? this.value = e(this).data("prev") : b.hasClass("color-view") ? L.val(RSColor.rgbToHex("rgb(" + u.value + "," + v.value + "," + h.value + ")")).trigger("focusout") : _.val(RSColor.rgbToHex("rgb(" + g.value + "," + f.value + "," + m.value + ")")).trigger("focusout") }), e(".revbuilder-cpicker-hex").on("focusout.revcpicker", function() { var t, i; if ("revbuilder-cpicker-color-hex" === this.id) { if (!(i = L.val())) return void ae.click(); if (i = RSColor.sanitizeHex(i), RSColor.isColor.test(i)) Rt(i); else { if (!(t = e(this).data("orig-value"))) return void ae.click(); if ("transparent" === (i = t)) return void ae.click(); Rt(i) } Q.val(i).change() } else i = _.val() || RSColor.defaultValue, i = RSColor.sanitizeHex(i), RSColor.isColor.test(i) || (i = (t = e(this).data("orig-value")) || RSColor.defaultValue), _.val(i), x.val(i).change() }).on("focusin.revcpicker", Mt), I.on("keyup.revcpicker focusout.revcpicker", function(e) { if (C) { var t, i = "bottom" === (C.hasClass("revbuilder-cpicker-point-bottom") ? "bottom" : "top") ? P : D, r = I.val().replace("%", "") || "0", a = e.type; for (isNaN(r) && (r = "keyup" === a ? "0" : C.attr("data-location")), t = (r = Math.max(0, Math.min(100, parseInt(r, 10)))) < 50 ? 1 : -1; - 1 !== i.indexOf(r);) r += t; "focusout" === a && (I.val(r + "%"), C.attr("data-location", r)), C.css("left", r + "%"), Bt() } }).on("focusin.revcpicker", Mt), e("#revbuilder-cpciker-clear-gradient").on("click.revcpicker", function() { x.val(RSColor.defaultValue).change() }), t.on("keyup.revcpicker focusout.revcpicker", Tt).on("focusin.revcpicker", Mt), oe.on("click.revcpicker", function() { var i = e(this), r = i.attr("data-direction"); oe.removeClass("selected"), i.addClass("selected"), "radial" !== r ? t.val(Vt(r)) : t.val(0), Tt(!1, r) }), e(".revbuilder-cpicker-point-delete").on("click.revcpicker", function() { if (-1 !== this.className.search("active")) { var e = C.hasClass("revbuilder-cpicker-point-bottom") ? "bottom" : "top", t = b.find(".revbuilder-cpicker-point-" + e).length; t > 2 && (C.draggable("destroy").remove(), pe = ue.children(), b.click(), Bt()), t <= qe && ("bottom" === e ? N.removeClass("full") : l.removeClass("full")) } }), e(".revbuilder-cpicker-preset-save").on("focusin.revcpicker", Mt), e(".revbuilder-cpicker-opacity-input").on("keyup.revcpicker focusout.revcpicker", function(t) { var i, r = -1 === this.id.search("grad"), a = r ? Le : de, o = a.val().replace("%", ""), n = t.type; if (isNaN(o) && (o = "keyup" === n ? "0" : e(this).data("orig-value").replace("%", "")), o = Math.max(0, Math.min(100, o)), "focusout" === n && (a.val(o + "%"), r || C.attr("data-opacity", o)), r) { gt(!1, 0 === parseInt(o, 10) && "transparent", o), Pt(o) } else { var s = RSColor.rgbValues(C.attr("data-color"), 3), l = Ge.colors[ne]; o = RSColor.sanitizeAlpha(.01 * parseInt(o, 10)), l.r = s[0], l.g = s[1], l.b = s[2], l.a = o, i = RSColor.rgbaString(l.r, l.g, l.b, o), C.attr("data-color", i), Bt(), i = "rgba(0, 0, 0, " + o + ")", z.style.backgroundColor = i, $.style.borderTopColor = i } }).on("focusin.revcpicker", Mt), e(".revbuilder-cpicker-builder-hit").on("click.revcpicker", function(e) { o || At(); for (var t = parseInt(100 * ((e.pageX - l.offset().left) / He).toFixed(2), 10), i = -1 !== this.id.search("bottom") ? "bottom" : "top", r = "bottom" === i ? P : D, a = t < 50 ? 1 : -1; - 1 !== r.indexOf(t);) t += a; "bottom" === i ? b.find(".revbuilder-cpicker-point-bottom").length < qe ? (mt(i, t), Pe = !1) : N.addClass("full") : b.find(".revbuilder-cpicker-point-top").length < qe ? (mt(i, t), Pe = !1) : l.addClass("full") }), y.on("click.revcpicker", function() { !y.hasClass("checked") ? y.addClass("checked") : y.removeClass("checked"), Bt(!1, !0) }), s.on("change.revcpicker", function() { Bt(), $t(this.value) }), w.on("keyup.revcpicker focusout.revcpicker", function(e) { var t = w.val().replace("%", ""), i = e.type; isNaN(t) && (t = "keyup" === i ? "0" : w.data("orig-value").replace("%", "")), t = Math.max(10, Math.min(1e3, t)), "focusout" === i && w.val(t + "%"), Bt() }).on("focusin.revcpicker", Mt); var a = e(".revbuilder-cpicker-preset-selector").on("change.revcpicker", function() { var e = this.value, t = "core" === e ? "custom" : "core", i = -1 !== this.id.search("colors") ? "colors" : "gradients"; document.getElementById("revbuilder-cpicker-" + i + "-" + t).style.display = "none", document.getElementById("revbuilder-cpicker-" + i + "-" + e).style.display = "block", zt() }); e.fn.select2RS && (a.select2RS({ minimumResultsForSearch: -1 }), s.select2RS({ minimumResultsForSearch: -1 })), i = !0 } function Gt() { Le.val("0%") } function Ht(t) { var i, r, a, o, n, s = e.extend({}, t), l = s.core || {}, c = s.custom; !fe || c ? (o = 4, c = (fe = c) || { colors: [], gradients: [] }) : o = 2, l.colors || (l.colors = at), l.gradients || (l.gradients = ot); for (var d = 0; d < o; d++) { switch (d) { case 0: i = "colors-core", a = l.colors; break; case 1: i = "gradients-core", a = l.gradients; break; case 2: i = "colors-custom", a = c.colors; break; case 3: i = "gradients-custom", a = c.gradients } r = ht(i, a.slice() || []), (n = e("#" + r[0])).find(".revbuilder-cpicker-color").remove(), n.prepend(r[1]) } } function qt(e, t, i) { return jQuery.grep(e, function(e) { return e[i] != t[i] }) } function Zt(e, t, i) { var r = -1; for (var a in t) void 0 !== t[a][i] && t[a][i] === e[i] && (r = a); return r } function Wt(e) { return e.id ? jQuery('' + e.text + "") : e.text } function Ut(e) { for (var t in void 0 !== Se[e] && ft(Se[e].v, !1), _e) for (var i in Se) Se.hasOwnProperty(i) && (i !== e && void 0 !== Se[i].ref && 0 !== Se[i].ref.length && (Se[i].ref = qt(Se[i].ref, _e[t], "r")), i === e && (Se[i].ref = void 0 === Se[i].ref ? [] : Se[i].ref, -1 == Zt(_e[t], Se[i].ref, "r") && Se[i].ref.push(_e[t]))) } e.rsColorPickerApi = { setValue: function(e, t) { ft(e, t) }, setGlobalColors: function(e) { Se = jQuery.extend(!0, {}, e) }, setGlobalCandidates: function(e) { _e = e }, getGlobalColors: function() { return Se }, closeColorPicker: function() { Ot() }, showGlobal: function(e, t, i) { Se = jQuery.extend(!0, {}, t), _e = i, ye = e.mode; var r, a; e.currentInput[0].dataset; for (var o in currentEditing = document.getElementById("revbuilder-cpicker-current-edit"), editTitle = document.getElementById("revbuilder-cpicker-edit-title"), widgetId = we.attr("data-widget-id"), html = we.attr("data-appended-html"), editing = we.attr("data-editing"), r = '
    ' + RVS_LANG.globalcoloractive + "
    ", r += '', r += '
    ', r += '
    ", r += '
    color_lens' + RVS_LANG.editskins + "
    ", r += "
    ", b.find("#revbuilder-cpicker").append(r = jQuery(r)), a = r.find("#gc_skinPicker"); var n = function() { var e = []; for (var t in _e) for (var i in e[t] = -1, Se) Se.hasOwnProperty(i) && void 0 !== Se[i].ref && 0 !== Se[i].ref.length && -1 === e[t] && (e[t] = -1 !== Zt(_e[t], Se[i].ref, "r") ? i : -1); var r = -1; for (var i in e) r = -1 === r && -1 !== e[i] ? e[i] : -1 !== e[i] && -1 !== r[i] ? -999 : r; return r }(); - 1 === n || -999 === n ? (Re = !1, document.getElementById("inp_SkinPicker").style.display = "none", jQuery("#enadisaGlobalSkin")[0].checked = !1) : (Re = n, a[0].value = n, document.getElementById("inp_SkinPicker").style.display = "inline-block", jQuery("#enadisaGlobalSkin")[0].checked = !0, currentEditing.innerHTML = Se[n].alias + " Skin"), void 0 !== RVS && void 0 !== RVS.F && void 0 !== RVS.F.initOnOff && (RVS.F.initOnOff(r), RVS.F.turnOnOff(r, !1)), a.select2RS({ tags: !1, templateResult: Wt, minimumResultsForSearch: "Infinity" }), jQuery("#enadisaGlobalSkin").on("change", function() { he = !0, !0 === this.checked ? (document.getElementById("inp_SkinPicker").style.display = "inline-block", a.trigger("change.select2")) : (Re = !1, Ut(-1), document.getElementById("inp_SkinPicker").style.display = "none", ft(Ie, !1), currentEditing.innerHTML = editing) }), a.on("change.select2", function() { he = !0, Se = jQuery.extend(!0, {}, t), -1 !== Re && -999 !== Re && void 0 !== t[Re] && ft(t[Re].v, !1), Re = this.value, Ut(this.value), function(e, t) { var i = "single" === t || "basic" === t; if (!i) for (var r in Se[e].ref) Se[e].ref.hasOwnProperty(r) && (i = !0 === i || RVS.F.noGradient(Se[e].ref[r].r)); i ? jQuery("#revbuilder-cpicker-gradient-btn").hide() : jQuery("#revbuilder-cpicker-gradient-btn").show() }(this.value, ye), currentEditing.innerHTML = Se[this.value].alias + " Skin" }) }, hideGlobal: function() { jQuery("#revbuilder-cpicker-globals").remove(), Se = void 0, Re = void 0 } }, e.rsColorPicker = function(t) { Ve = e.extend(!0, Ve || {}, t), t.mode && (tt = t.mode), t.init && (d = t.init), t.onAjax && (O = t.onAjax), t.onEdit && (k = t.onEdit), t.change && (E = t.change), t.cancel && (F = t.cancel), t.title && (T = t.title), t.language && t.language, t.widgetId && (me = t.widgetId), t.defaultValue && (RSColor.defaultValue = t.defaultValue), t.wrapClasses && (ze = t.wrapClasses), t.appendedHtml && (Ce = t.appendedHtml), t.onRefresh && (ee = t.defRefresh), S && (zt(), t.language && pt(t.language)) }; var Yt = { refresh: function() { var t = e(this), i = [t]; if (t.hasClass("revbuilder-cpicker-component")) { var r = t.data("revcp") || {}, a = t.val() || r.defaultValue || RSColor.defaultValue, o = r.onRefresh || ee, n = RSColor.process(a); a = n[0], n = "rgba" === n[1] && RSColor.transparentRgba(a, !0) ? "" : a, "transparent" !== a ? (t.data("tpcp")[0].style.background = n, Oe && Oe.css("background", n)) : (t.data("tpcp").css("background", ""), Oe && Oe.css("background", "")), t.attr("data-color", a).data("hex", a), i[1] = a, o && o(i[0], a) } else i[1] = !1, i[2] = "Color Picker not inited for this input field yet"; RVS.DOC.trigger("revcolorpickerrefresh", i) }, destroy: function() { e(this).removeData().closest(".revbuilder-cpicker-master-wrap").removeData().remove() } }; function Xt() { void 0 !== RVS.LIB.COLOR_PRESETS && RVS.LIB.COLOR_PRESETS || (RVS.LIB.COLOR_PRESETS = { colors: [], gradients: [] }), RVS.LIB.COLOR_PRESETS.colors || (RVS.LIB.COLOR_PRESETS.colors = []), RVS.LIB.COLOR_PRESETS.gradients || (RVS.LIB.COLOR_PRESETS.gradients = []), e.rsColorPicker({ custom: RVS.LIB.COLOR_PRESETS, onAjax: function(e, t, i, r, a) { var o = !1, n = RVS.LIB.COLOR_PRESETS[i]; switch (e) { case "save": n[n.length] = t, o = !0; break; case "delete": var s = n.length; e: for (var l = 0; l < s; l++) for (var c in n[l]) if (c === t) { n.splice(l, 1), o = !0; break e } } o && "undefined" != typeof RVS && void 0 !== RVS.F && RVS.F.ajaxRequest("save_color_preset", { presets: jQuery.extend(!0, {}, RVS.LIB.COLOR_PRESETS) }, function(e) { var t = e.error || !1; RVS.DOC.trigger(r, [t]) }) } }) } e.fn.rsColorPicker = function(t) { return t && "string" == typeof t ? this.each(Yt[t]) : this.each(function() { var i = e(this); if (i.hasClass("revbuilder-cpicker-component")) i.rsColorPicker("refresh"); else { var r, a, o = e('').data("revcolorinput", i), n = e(''), s = e(''), l = i.attr("data-wrap-classes"), c = i.attr("data-wrapper"), p = i.attr("data-wrap-id"), u = i.attr("data-title"), v = i.val(), h = 1 == i.data("visible") ? "visible-cp-input" : ""; if (o.insertBefore(i).append([n, s, i]), t && e.isPlainObject(t)) { c || (c = t.wrapper), l || (l = t.wrapClasses), p || (p = t.wrapId), u || (u = t.title), a = t.defaultValue; var g = i.data("revcp"); g && (t = e.extend({}, g, t)), i.data("revcp", t) } l || (l = ze), l && o.addClass(l), p && o.attr("id", p), v || (v = a || RSColor.defaultValue, i.val(v)), v = (r = RSColor.process(v))[0], "transparent" !== (r = "rgba" === r[1] && RSColor.transparentRgba(v, !0) ? "" : v) && (n[0].style.background = r), s[0].innerHTML = u || T || G || rt.color, i.attr("data-color", v).data("tpcp", n).addClass("revbuilder-cpicker-component"), c ? (c = e(c).addClass("revbuilder-cpicker-master-wrap").addClass(h), o.wrap(c)) : o.addClass("revbuilder-cpicker-master-wrap").addClass(h); var f = !!t && (t.init || d), m = Ve ? e.extend(!0, Ve, t || {}) : t || !1; f && f(o, i, v, m), RVS.DOC.trigger("revcolorpickerinit", [o, i, v, m]) } }) }, e(function() { e("body").on("click.revcpicker", ".revbuilder-colorpicker", function() { i || Qt(), re = document.getElementById("revbuilder-cpicker-gradient-output"), g = document.getElementById("revbuilder-cpicker-r2"), f = document.getElementById("revbuilder-cpicker-g2"), m = document.getElementById("revbuilder-cpicker-b2"), u = document.getElementById("revbuilder-cpicker-r"), v = document.getElementById("revbuilder-cpicker-g"), h = document.getElementById("revbuilder-cpicker-b"), ue = e("#revbuilder-cpciker-point-container"), Oe = e("#revbuilder-cpicker-preview-color"), Le = e("#revbuilder-cpicker-color-opacity"), n = e("#revbuilder-cpicker-orientation-radial"), j = e("#revbuilder-cpicker-gradients-core"), _ = e("#revbuilder-cpicker-gradient-hex"), N = e("#revbuilder-cpicker-hit-bottom"), L = e("#revbuilder-cpicker-color-hex"), l = e("#revbuilder-cpicker-hit-top"), we = e(this).data("revcolorinput"); var t, o, s, d, S, y, V, w, I, x, C, T, D, P = document.getElementById("revbuilder-cpicker-current-edit"), M = document.getElementById("revbuilder-cpicker-edit-title"), z = we.attr("data-widget-id"), $ = we.attr("data-appended-html"), Q = we.attr("data-editing"), G = we.attr("data-colors"), H = we.attr("data-mode"), q = we.data("revcp"), Z = we.attr("data-lang"); if (G && ((G = JSON.parse(G.replace(/\&/g, '"'))).colors && (y = G.colors), G.gradients && (d = G.gradients)), q) { var W = q.colors; W && (W.core && (s = W.core.colors, t = W.core.gradients), W.custom && (S = W.custom.colors, o = W.custom.gradients)), C = q.onEdit, T = q.onAjax, w = q.change, I = q.cancel, Z || (Z = q.lang), H || (H = q.mode), $ || ($ = q.appendedHtml), Q || (Q = q.editing), z || (z = q.widgetId) }(t || s || o || S || d || y) && (V = {}, (t || s || d || y) && (V.core = { colors: y || s || at, gradients: d || t || ot }), (o || S) && (V.custom = { colors: S || at, gradients: o || ot }), Ht(V)), z || (z = me), z && (b[0].id = z), $ || ($ = Ce), $ && (A = e($).appendTo(De)), Z && pt(Z), H || (H = tt), Q ? M.style.visibility = "visible" : (Q = "", M.style.visibility = "hidden"), P.innerHTML = Q, "single" === H || "basic" === H ? (a = !1, R.hide(), B.show(), "basic" === H && b.addClass("is-basic")) : (a = !0, R.show(), B.show()), function(e) { return "string" == typeof e && "transparent" !== e.trim() && -1 === e.search(/\[\{/) && -1 !== e.search("-gradient") }(D = we.val() || RSColor.defaultValue) && (D = RSColor.reverseGradient(D)), D.split("||").length > 1 && (D = RSColor.joinToRgba(D), we.val(D)), x = ft(D), Ie = x[0], le = Ie, se = we.val(), c = C || k, p = T || O, J = I || F, $e = w || E, "gradient" !== x[1] ? B.data("state", Ie) : R.data("state", Ie), r.addClass("revbuilder-colorpicker-open"), Ae = we.data("tpcp"), b.data("revcpickerinput", we).addClass("active").show(), zt(), xe = we.attr("data-color"); var U = RSColor.process(D); "rgba" === U[1] ? 0 == (U = RSColor.rgbValues(U[0], 4))[3] ? Oe.css("background", "") : Oe.css("background", xe) : "transparent" === U[1] ? Oe.css("background", "") : Oe.css("background", xe), be = we.data("hex"), e(".revbuilder-cpicker-color").not(".blank").each(vt), De.css({ marginLeft: -.5 * De.width(), marginTop: -.5 * De.height() }), RVS.DOC.trigger("RSCOLOR.OPEN", { openingValue: x[0], mode: H, currentInput: we }) }) }), "loading" === document.readyState ? window.addEventListener("DOMContentLoaded", function() { Xt() }) : Xt() }("undefined" !== jQuery && jQuery), function(e) { if ("object" == typeof exports && "undefined" != typeof module) module.exports = e(); else if ("function" == typeof define && define.amd) define([], e); else { ("undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : this).RSClipboard = e() } }(function() { return function e(t, i, r) { function a(n, s) { if (!i[n]) { if (!t[n]) { var l = "function" == typeof require && require; if (!s && l) return l(n, !0); if (o) return o(n, !0); var c = new Error("Cannot find module '" + n + "'"); throw c.code = "MODULE_NOT_FOUND", c } var d = i[n] = { exports: {} }; t[n][0].call(d.exports, function(e) { return a(t[n][1][e] || e) }, d, d.exports, e, t, i, r) } return i[n].exports } for (var o = "function" == typeof require && require, n = 0; n < r.length; n++) a(r[n]); return a }({ 1: [function(e, t, i) { var r = 9; if ("undefined" != typeof Element && !Element.prototype.matches) { var a = Element.prototype; a.matches = a.matchesSelector || a.mozMatchesSelector || a.msMatchesSelector || a.oMatchesSelector || a.webkitMatchesSelector } t.exports = function(e, t) { for (; e && e.nodeType !== r;) { if ("function" == typeof e.matches && e.matches(t)) return e; e = e.parentNode } } }, {}], 2: [function(e, t, i) { function r(e, t, i, r) { return function(i) { i.delegateTarget = a(i.target, t), i.delegateTarget && r.call(e, i) } } var a = e("./closest"); t.exports = function(e, t, i, a, o) { var n = r.apply(this, arguments); return e.addEventListener(i, n, o), { destroy: function() { e.removeEventListener(i, n, o) } } } }, { "./closest": 1 }], 3: [function(e, t, i) { i.node = function(e) { return void 0 !== e && e instanceof HTMLElement && 1 === e.nodeType }, i.nodeList = function(e) { var t = Object.prototype.toString.call(e); return void 0 !== e && ("[object NodeList]" === t || "[object HTMLCollection]" === t) && "length" in e && (0 === e.length || i.node(e[0])) }, i.string = function(e) { return "string" == typeof e || e instanceof String }, i.fn = function(e) { return "[object Function]" === Object.prototype.toString.call(e) } }, {}], 4: [function(e, t, i) { var r = e("./is"), a = e("delegate"); t.exports = function(e, t, i) { if (!e && !t && !i) throw new Error("Missing required arguments"); if (!r.string(t)) throw new TypeError("Second argument must be a String"); if (!r.fn(i)) throw new TypeError("Third argument must be a Function"); if (r.node(e)) return function(e, t, i) { return e.addEventListener(t, i), { destroy: function() { e.removeEventListener(t, i) } } }(e, t, i); if (r.nodeList(e)) return function(e, t, i) { return Array.prototype.forEach.call(e, function(e) { e.addEventListener(t, i) }), { destroy: function() { Array.prototype.forEach.call(e, function(e) { e.removeEventListener(t, i) }) } } }(e, t, i); if (r.string(e)) return function(e, t, i) { return a(document.body, e, t, i) }(e, t, i); throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList") } }, { "./is": 3, delegate: 2 }], 5: [function(e, t, i) { t.exports = function(e) { var t; if ("SELECT" === e.nodeName) e.focus(), t = e.value; else if ("INPUT" === e.nodeName || "TEXTAREA" === e.nodeName) { var i = e.hasAttribute("readonly"); i || e.setAttribute("readonly", ""), e.select(), e.setSelectionRange(0, e.value.length), i || e.removeAttribute("readonly"), t = e.value } else { e.hasAttribute("contenteditable") && e.focus(); var r = window.getSelection(), a = document.createRange(); a.selectNodeContents(e), r.removeAllRanges(), r.addRange(a), t = r.toString() } return t } }, {}], 6: [function(e, t, i) { function r() {} r.prototype = { on: function(e, t, i) { var r = this.e || (this.e = {}); return (r[e] || (r[e] = [])).push({ fn: t, ctx: i }), this }, once: function(e, t, i) { function r() { a.off(e, r), t.apply(i, arguments) } var a = this; return r._ = t, this.on(e, r, i) }, emit: function(e) { for (var t = [].slice.call(arguments, 1), i = ((this.e || (this.e = {}))[e] || []).slice(), r = 0, a = i.length; r < a; r++) i[r].fn.apply(i[r].ctx, t); return this }, off: function(e, t) { var i = this.e || (this.e = {}), r = i[e], a = []; if (r && t) for (var o = 0, n = r.length; o < n; o++) r[o].fn !== t && r[o].fn._ !== t && a.push(r[o]); return a.length ? i[e] = a : delete i[e], this } }, t.exports = r }, {}], 7: [function(e, t, i) { ! function(r, a) { if (void 0 !== i) a(t, e("select")); else { var o = { exports: {} }; a(o, r.select), r.clipboardAction = o.exports } }(this, function(e, t) { "use strict"; var i = function(e) { return e && e.__esModule ? e : { default: e } }(t), r = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) { return typeof e } : function(e) { return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e }, a = function() { function e(e, t) { for (var i = 0; i < t.length; i++) { var r = t[i]; r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r) } } return function(t, i, r) { return i && e(t.prototype, i), r && e(t, r), t } }(), o = function() { function e(t) { (function(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") })(this, e), this.resolveOptions(t), this.initSelection() } return a(e, [{ key: "resolveOptions", value: function() { var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}; this.action = e.action, this.container = e.container, this.emitter = e.emitter, this.target = e.target, this.text = e.text, this.trigger = e.trigger, this.selectedText = "" } }, { key: "initSelection", value: function() { this.text ? this.selectFake() : this.target && this.selectTarget() } }, { key: "selectFake", value: function() { var e = this, t = "rtl" == document.documentElement.getAttribute("dir"); this.removeFake(), this.fakeHandlerCallback = function() { return e.removeFake() }, this.fakeHandler = this.container.addEventListener("click", this.fakeHandlerCallback) || !0, this.fakeElem = document.createElement("textarea"), this.fakeElem.style.fontSize = "12pt", this.fakeElem.style.border = "0", this.fakeElem.style.padding = "0", this.fakeElem.style.margin = "0", this.fakeElem.style.position = "absolute", this.fakeElem.style[t ? "right" : "left"] = "-9999px"; var r = window.pageYOffset || document.documentElement.scrollTop; this.fakeElem.style.top = r + "px", this.fakeElem.setAttribute("readonly", ""), this.fakeElem.value = this.text, this.container.appendChild(this.fakeElem), this.selectedText = (0, i.default)(this.fakeElem), this.copyText() } }, { key: "removeFake", value: function() { this.fakeHandler && (this.container.removeEventListener("click", this.fakeHandlerCallback), this.fakeHandler = null, this.fakeHandlerCallback = null), this.fakeElem && (this.container.removeChild(this.fakeElem), this.fakeElem = null) } }, { key: "selectTarget", value: function() { this.selectedText = (0, i.default)(this.target), this.copyText() } }, { key: "copyText", value: function() { var e = void 0; try { e = document.execCommand(this.action) } catch (t) { e = !1 } this.handleResult(e) } }, { key: "handleResult", value: function(e) { this.emitter.emit(e ? "success" : "error", { action: this.action, text: this.selectedText, trigger: this.trigger, clearSelection: this.clearSelection.bind(this) }) } }, { key: "clearSelection", value: function() { this.trigger && this.trigger.focus(), window.getSelection().removeAllRanges() } }, { key: "destroy", value: function() { this.removeFake() } }, { key: "action", set: function() { var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "copy"; if (this._action = e, "copy" !== this._action && "cut" !== this._action) throw new Error('Invalid "action" value, use either "copy" or "cut"') }, get: function() { return this._action } }, { key: "target", set: function(e) { if (void 0 !== e) { if (!e || "object" !== (void 0 === e ? "undefined" : r(e)) || 1 !== e.nodeType) throw new Error('Invalid "target" value, use a valid Element'); if ("copy" === this.action && e.hasAttribute("disabled")) throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute'); if ("cut" === this.action && (e.hasAttribute("readonly") || e.hasAttribute("disabled"))) throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes'); this._target = e } }, get: function() { return this._target } }]), e }(); e.exports = o }) }, { select: 5 }], 8: [function(e, t, i) { ! function(r, a) { if (void 0 !== i) a(t, e("./clipboard-action"), e("tiny-emitter"), e("good-listener")); else { var o = { exports: {} }; a(o, r.clipboardAction, r.tinyEmitter, r.goodListener), r.clipboard = o.exports } }(this, function(e, t, i, r) { "use strict"; function a(e) { return e && e.__esModule ? e : { default: e } } function o(e, t) { var i = "data-clipboard-" + e; if (t.hasAttribute(i)) return t.getAttribute(i) } var n = a(t), s = a(i), l = a(r), c = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) { return typeof e } : function(e) { return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e }, d = function() { function e(e, t) { for (var i = 0; i < t.length; i++) { var r = t[i]; r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r) } } return function(t, i, r) { return i && e(t.prototype, i), r && e(t, r), t } }(), p = function(e) { function t(e, i) { ! function(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") }(this, t); var r = function(e, t) { if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return !t || "object" != typeof t && "function" != typeof t ? e : t }(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this)); return r.resolveOptions(i), r.listenClick(e), r } return function(e, t) { if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t); e.prototype = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t) }(t, s.default), d(t, [{ key: "resolveOptions", value: function() { var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}; this.action = "function" == typeof e.action ? e.action : this.defaultAction, this.target = "function" == typeof e.target ? e.target : this.defaultTarget, this.text = "function" == typeof e.text ? e.text : this.defaultText, this.container = "object" === c(e.container) ? e.container : document.body } }, { key: "listenClick", value: function(e) { var t = this; this.listener = (0, l.default)(e, "click", function(e) { return t.onClick(e) }) } }, { key: "onClick", value: function(e) { var t = e.delegateTarget || e.currentTarget; this.clipboardAction && (this.clipboardAction = null), this.clipboardAction = new n.default({ action: this.action(t), target: this.target(t), text: this.text(t), container: this.container, trigger: t, emitter: this }) } }, { key: "defaultAction", value: function(e) { return o("action", e) } }, { key: "defaultTarget", value: function(e) { var t = o("target", e); if (t) return document.querySelector(t) } }, { key: "defaultText", value: function(e) { return o("text", e) } }, { key: "destroy", value: function() { this.listener.destroy(), this.clipboardAction && (this.clipboardAction.destroy(), this.clipboardAction = null) } }], [{ key: "isSupported", value: function() { var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : ["copy", "cut"], t = "string" == typeof e ? [e] : e, i = !!document.queryCommandSupported; return t.forEach(function(e) { i = i && !!document.queryCommandSupported(e) }), i } }]), t }(); e.exports = p }) }, { "./clipboard-action": 7, "good-listener": 4, "tiny-emitter": 6 }] }, {}, [8])(8) }), window.RVS = void 0 === window.RVS ? {} : window.RVS, RVS.F = void 0 === RVS.F ? {} : RVS.F, RVS.ENV = void 0 === RVS.ENV ? {} : RVS.ENV, RVS.LIB = void 0 === RVS.LIB ? {} : RVS.LIB, RVS.V = void 0 === RVS.V ? {} : RVS.V, RVS.S = void 0 === RVS.S ? {} : RVS.S, RVS.C = void 0 === RVS.C ? {} : RVS.C, RVS.WIN = void 0 === RVS.WIN ? jQuery(window) : RVS.WIN, RVS.DOC = void 0 === RVS.DOC ? jQuery(document) : RVS.DOC, RVS.OZ = void 0 === RVS.OZ ? {} : RVS.OZ, function() { function e(e) { if (void 0 === RVS.ENV.optimizer) { var n = '
    '; n += '\t
    ', n += '\t\t
    ', n += '\t\t\t
    ', n += '\t\t\t\t
    flash_on' + RVS_LANG.optimizertitel + 'close
    ', n += '
    ', n += '
    ', n += '
    ' + RVS_LANG.element + "
    ", n += '
    ' + RVS_LANG.filesize + "
    ", n += '
    ' + RVS_LANG.dimensions + 'help
    ' + RVS_LANG.toosmall + '
    ' + RVS_LANG.standard1x + '
    ' + RVS_LANG.retina2x + '
    ' + RVS_LANG.oversized + "
    ", n += '
    ' + RVS_LANG.suggestion + "
    ", n += '
    ', n += "
    ", n += "
    ", n += '\t\t\t\t
    ', n += "\t\t\t\t
    ", n += '\t\t\t\t", n += "\t\t\t
    ", n += "\t\t
    ", n += "\t
    ", n += "
    ", RVS.ENV.optimizer = jQuery(n), RVS.ENV.optlist = RVS.ENV.optimizer.find("#rbm_optimizer_list"), jQuery("body").append(RVS.ENV.optimizer) } RVS.ENV.optlist[0].innerHTML = "", RVS.F.RSDialog.create({ modalid: "#rbm_optimizer", bgopacity: .5 }), RVS.S.optUID = 0, RVS.OZ.slideFullSize = 0, RVS.OZ.list = {}, RVS.OZ.loadAddons = [], RVS.OZ.addOnsFullSize = 0, function() { if (RVS.V.avSizes = function() { var e = []; for (var t in void 0 === RVS.V.sizes && (RVS.V.sizes = ["d", "n", "t", "m"], RVS.V.sizesold = ["desktop", "notebook", "tablet", "mobile"]), RVS.V.sizes) !0 === RVS.OZ.settings.size.custom[RVS.V.sizes[t]] && e.push(RVS.V.sizes[t]); return e }(), RVS.OZ.toLoad = {}, void 0 !== RVS.OZ && void 0 !== RVS.OZ.settings && void 0 !== RVS.OZ.settings.size) { var e, n = { w: s(RVS.OZ.settings.size.width), h: s(RVS.OZ.settings.size.height) }, l = function(e, t, i, r) { var a = { w: e, h: t }; e > t ? e > i && (a.w = i) : t > r && (a.h = r); return a }(n.w.max, n.h.max, 1920, 1920); for (var d in void 0 !== RVS.OZ.settings && void 0 !== RVS.OZ.settings.layout && void 0 !== RVS.OZ.settings.layout.bg && RVS.OZ.settings.layout.bg.useImage && void 0 !== RVS.OZ.settings.layout.bg.image && "" !== RVS.OZ.settings.layout.bg.image && RVS.OZ.settings.layout.bg.image.length < 5 && (RVS.ENV.optlist.append(t({ alias: RVS_LANG.modulbackground, url: RVS.OZ.settings.layout.bg.image, rw: l.w, rh: l.h, pathURL: "settings.layout.bg.image", pathSize: "settings.layout.bg.imageSourceType", slideid: "settings" })), RVS.OZ.toLoad[RVS.S.optUID] = RVS.OZ.list[RVS.S.optUID].url), RVS.OZ.slideIDs) { var p = RVS.OZ.slideIDs[d]; void 0 !== RVS.OZ[p] && void 0 !== RVS.OZ[p].slide && void 0 !== RVS.OZ[p].slide.bg && ("image" !== RVS.OZ[p].slide.bg.type && "external" !== RVS.OZ[p].slide.bg.type && "html5" !== RVS.OZ[p].slide.bg.type && "youtube" !== RVS.OZ[p].slide.bg.type && "vimeo" !== RVS.OZ[p].slide.bg.type || void 0 === RVS.OZ[p].slide.bg.image || "" === RVS.OZ[p].slide.bg.image || RVS.OZ[p].slide.bg.image.length < 5 || (RVS.OZ[p].slide.title = void 0 === RVS.OZ[p].slide.title ? "Slide" : RVS.OZ[p].slide.title, RVS.ENV.optlist.append(t({ alias: "#" + (parseInt(d) + 1) + " " + RVS.OZ[p].slide.title, url: RVS.OZ[p].slide.bg.image, rw: l.w, rh: l.h, pathURL: p + ".slide.bg.image", pathSize: p + ".slide.bg.imageSourceType", slideid: p })), RVS.OZ.toLoad[RVS.S.optUID] = RVS.OZ.list[RVS.S.optUID].url)) } for (var d in RVS.OZ.slideIDs) { var p = RVS.OZ.slideIDs[d]; if (void 0 !== RVS.OZ[p] && void 0 !== RVS.OZ[p].layers) for (var u in RVS.OZ[p].layers) { var v, h = RVS.OZ[p].layers[u], g = 0; if (void 0 !== h.idle && void 0 !== h.idle.backgroundImage && h.idle.backgroundImage.length > 4 && (g = { layerid: u, imgtype: "bg", bgsize: h.idle.backgroundSize, alias: h.alias, url: h.idle.backgroundImage, path: p + ".layers." + u + ".idle.", pathURL: p + ".layers." + u + ".idle.backgroundImage", pathSize: p + ".layers." + u + ".behavior.imageSourceType", slideid: p }), "image" === h.type && void 0 !== h.media && void 0 !== h.media.imageUrl && h.media.imageUrl.length > 4 && (g = { layerid: u, imgtype: "image", alias: h.alias, url: h.media.imageUrl, pathURL: p + ".layers." + u + ".media.imageUrl", pathSize: p + ".layers." + u + ".behavior.imageSourceType", slideid: p }), "video" === h.type && void 0 !== h.media && void 0 !== h.media.posterUrl && h.media.posterUrl.length > 4 && (g = { layerid: u, imgtype: "poster", alias: h.alias, url: h.media.posterUrl, pathURL: p + ".layers." + u + ".media.posterUrl", pathSize: p + ".layers." + u + ".behavior.imageSourceType", slideid: p }), "text" !== h.type && "button" !== h.type || o(h), void 0 !== g && 0 !== g) { var f = { w: n.w.sizes, h: n.w.sizes }; if (-1 !== h.group.puid && void 0 !== h.group.puid) { var m = RVS.OZ[p].layers[h.group.puid]; "group" === m.type && (f.w = s(m.size.width, f.w).sizes, f.h = s(m.size.height, f.h).sizes) } "column" === h.type ? (g.rw = s(h.size.width, f.w, RVS.F.convertFraction(h.group.columnSize), h.group.columnbreakat).max, g.rh = s(h.size.height, f.h).max) : (g.rw = s(h.size.width, f.w).max, g.rh = s(h.size.height, f.h).max), RVS.ENV.optlist.append(t(g)), RVS.OZ.toLoad[RVS.S.optUID] = RVS.OZ.list[RVS.S.optUID].url } } } for (d in RVS.OZ.fontFamilies) RVS.OZ.fontFamilies.hasOwnProperty(d) && (v = i({ alias: d, weights: RVS.OZ.fontFamilies[d].weights }), RVS.ENV.optlist.append(v)); for (d in RVS.OZ.settings.addOns) RVS.OZ.settings.addOns.hasOwnProperty(d) && !0 === RVS.OZ.settings.addOns[d].enable && (e = r({ alias: void 0 === RVS.LIB.ADDONS || void 0 === RVS.LIB.ADDONS[d] || void 0 === RVS.LIB.ADDONS[d].full_title ? d : RVS.LIB.ADDONS[d].full_title, slug: d }), RVS.ENV.optlist.append(e)); var b = void 0 !== RVS.ENV.output_compress && RVS.ENV.output_compress.length > 0; RVS.ENV.optlist.append(a({ alias: RVS_LANG.coretools, size: b ? "43 kb" : "116 kb", warning: b ? "" : RVS_LANG.enablecompression })), RVS.ENV.optlist.append(a({ alias: RVS_LANG.corejs, size: b ? "72 kb" : "289 kb", warning: b ? "" : RVS_LANG.enablecompression })), RVS.ENV.optlist.append(a({ alias: RVS_LANG.corecss, size: b ? "11 kb" : "55 kb", warning: b ? "" : RVS_LANG.enablecompression })), RVS.OZ.coreFullSize = b ? 134 : 481, function() { if (void 0 === RVS.OZ.loadAddons || 0 == RVS.OZ.loadAddons.length) return; RVS.F.ajaxRequest("get_addons_sizes", { addons: RVS.OZ.loadAddons }, function(e) { if (e.success) { for (var t in e.addons) if (jQuery.isNumeric(parseInt(e.addons[t]))) { var i = Math.round(parseInt(e.addons[t], 0) / 1e3); jQuery("#addrowsize_" + t).html(i + " kb"), RVS.OZ.addOnsFullSize += i } c() } }, void 0, !0) }(), RVS.F.ajaxRequest("get_same_aspect_ratio", { images: RVS.OZ.toLoad }, function(e) { if (e.success) { for (var t in e.images) if (e.images.hasOwnProperty(t)) for (var i in RVS.OZ.list[t].images = jQuery.extend(!0, {}, e.images[t]), RVS.OZ.list[t].images) RVS.OZ.list[t].images.hasOwnProperty(i) && !0 === RVS.OZ.list[t].images[i].default && (RVS.OZ.list[t].selected = jQuery.extend(!0, {}, RVS.OZ.list[t].images[i])); c() } }, void 0, !0) } }(), jQuery("#rbm_optimizer_list").RSScroll({ wheelPropagation: !1, suppressScrollX: !0 }), RVS.F.RSDialog.center() } function t(e) { RVS.S.optUID++; var t = '
    '; return t += '
    ' + e.alias + "
    ", t += '
    ' + RVS_LANG.calculating + "
    ", t += '
    ', t += '
    ', t += '
    ', t += "
    ", RVS.OZ.list[RVS.S.optUID] = { row: jQuery(t), url: e.url, rw: e.rw, rh: e.rh, path: e.path, bgsize: e.bgsize, pathURL: e.pathURL, pathSize: e.pathSize, slideid: e.slideid, layerid: e.layerid, imgtype: e.imgtype }, RVS.OZ.list[RVS.S.optUID].row } function i(e) { e.alias = e.alias.trimStart(), e.alias = e.alias.trimEnd(); var t = e.alias.split(" ").join("+"), i = e.alias.split(" ").join("_"), r = e.weights.toString().split(",").join("%2C"), a = '
    '; return a += '
    text_fields' + e.alias + " " + e.weights.toString() + "
    ", a += '
    ' + RVS_LANG.calculating + "
    ", a += '
    ', a += '
    ', a += '
    ', a += "
    ", a = jQuery(a), function(e, t, i) { var r = new XMLHttpRequest; r.open("GET", e, !0), r.onreadystatechange = function() { if (this.readyState == this.DONE) { var e = [], a = r.response.split("url("); for (var o in a) if ("h" === a[o][0] || "H" === a[o][0]) { var s = a[o].split(") format"); - 1 == jQuery.inArray(s[0], e) && e.push(s[0]) } for (var l in e) n(e[l], t, i) } }, r.onerror = function(e) { jQuery("#fontrowsize_" + i)[0].innerHTML = "N.A." }, r.send() }("https://fonts.googleapis.com/css?family=" + t + ":" + r, e.alias, i), a } function r(e) { RVS.OZ.loadAddons.push(e.slug), e.alias = e.alias.replace("Slider Revolution", ""); e.alias.split(" ").join("_"); var t = '
    '; return t += '
    extension' + e.alias + "
    ", t += '
    ' + RVS_LANG.calculating + "
    ", t += '
    ', t += '
    ', t += '
    ', t += "
    ", t = jQuery(t) } function a(e) { var t = '
    '; return t += '
    code' + e.alias + "
    ", t += '
    ' + e.size + "
    ", t += '
    ', t += '
    ' + e.warning + "
    ", t += '
    ', t += "
    ", t = jQuery(t) } function o(e) { for (var t in void 0 !== e.idle && void 0 === e.idle.fontFamily && (e.idle.fontFamily = "Roboto"), RVS.OZ.fontFamilies = void 0 === RVS.OZ.fontFamilies ? {} : RVS.OZ.fontFamilies, RVS.OZ.fontFamilies[e.idle.fontFamily] = void 0 === RVS.OZ.fontFamilies[e.idle.fontFamily] ? { weights: [], italic: !1 } : RVS.OZ.fontFamilies[e.idle.fontFamily], RVS.V.avSizes) void 0 !== e.idle && void 0 !== e.idle.fontWeight && void 0 !== e.idle.fontWeight[RVS.V.avSizes[t]] && -1 === jQuery.inArray(e.idle.fontWeight[RVS.V.avSizes[t]].v, RVS.OZ.fontFamilies[e.idle.fontFamily].weights) && RVS.OZ.fontFamilies[e.idle.fontFamily].weights.push(e.idle.fontWeight[RVS.V.avSizes[t]].v); RVS.OZ.fontFamilies[e.idle.fontFamily].italic = !0 === RVS.OZ.fontFamilies[e.idle.fontFamily].italic || !0 === e.idle.fontStyle } function n(e, t, i) { var r = new XMLHttpRequest; r.open("HEAD", e, !0), r.onreadystatechange = function() { if (this.readyState === this.DONE) { var e = parseInt(r.getResponseHeader("Content-Length")); RVS.OZ.fontFamilies[t].size = void 0 === RVS.OZ.fontFamilies[t].size ? e : RVS.OZ.fontFamilies[t].size + e, jQuery("#fontrowsize_" + i)[0].innerHTML = Math.round(parseInt(RVS.OZ.fontFamilies[t].size) / 1e3) + " kb", p() } }, r.onerror = function(e) { jQuery("#fontrowsize_" + i)[0].innerHTML = "N.A." }, r.send() } function s(e, t, i, r) { var a = 0, o = {}; for (var n in RVS.V.avSizes) { var s = a; void 0 !== i ? ("notebook" === r && jQuery.inArray(RVS.V.avSizes[n], ["t", "m", "n"]) >= 0 && (i = 1), "mobile" === r && jQuery.inArray(RVS.V.avSizes[n], ["m"]) >= 0 && (i = 1), "tablet" === r && jQuery.inArray(RVS.V.avSizes[n], ["t", "m"]) >= 0 && (i = 1), s = t[RVS.V.avSizes[n]] * i) : (void 0 !== e && void 0 !== e[RVS.V.avSizes[n]] && (s = void 0 !== e[RVS.V.avSizes[n]].v ? jQuery.isNumeric(parseInt(e[RVS.V.avSizes[n]].v)) ? e[RVS.V.avSizes[n]].v : a : jQuery.isNumeric(parseInt(e[RVS.V.avSizes[n]])) ? e[RVS.V.avSizes[n]] : a), s = (s + "").indexOf("%") >= 0 ? t[RVS.V.avSizes[n]] * (parseInt(s, 0) / 100) : parseInt(s, 0)), a = Math.max(s, a), o[RVS.V.avSizes[n]] = s } return { max: parseInt(a, 0), sizes: o } } function l(e) { e.h, e.w; return 0 === e.rh && 0 === e.rw && (e.rh = e.h, e.rw = e.w), 0 === e.rh && (e.rh = e.rw / e.w * e.h), 0 === e.rw && (e.rw = e.rh / e.h * e.w), { width: e.rw, height: e.rh } } function c() { for (var e in RVS.OZ.minFullSize = 0, RVS.OZ.list) if (RVS.OZ.list.hasOwnProperty(e)) { var t, i, r, a, o = RVS.OZ.list[e], n = jQuery(o.row.find(".op_c_c")), s = { index: -1, val: 0 }, c = { index: -1, val: 999999 }, u = "width", v = 0, h = 0, g = 0, f = 0, m = []; if (void 0 !== o.selected) { if (jQuery.isNumeric(o.selected.size)) { o.currentSize = o.selected.size, o.currentUrl = o.selected.url; var b = Math.round(o.selected.size / 1e3) + " kb"; o.row.find(".op_c_b")[0].innerHTML = b }(t = l({ rw: o.rw, rh: o.rh, w: o.selected.width, h: o.selected.height })).width < t.height && o.selected.width > o.selected.height && (u = "height"), "contain" === o.bgsize && (u = "width" === u ? "height" : "width") } if (void 0 !== t) { for (var S in o.images) if (o.images.hasOwnProperty(S)) { var y = o.images[S][u] / t[u] * 100 / 3; if (y >= 33 && y <= 67 && h++, 1 == o.images[S].default) i = y >= 33 && y <= 67, r = y > 67, g = y, f = o.images[S].size, v = d({ cont: n, ozindex: e, imgindex: S, left: y > 100 ? 100 : y, amnt: v, class: "selected original" }); else if (o.images[S][u] === t[u] || 2 * o.images[S][u] === t[u]) v = d({ cont: n, ozindex: e, imgindex: S, left: y > 100 ? 100 : y, amnt: v }); else if (s.val < y && y < 33) s = { index: S, val: y, size: o.images[S].size }; else if (c.val > y && y > 67) c = { index: S, val: y, size: o.images[S].size }; else if (y > 33 && y < 67) { for (var R in a = y < 38 ? 38 : y > 62 ? 62 : y, m) Math.abs(m[R] - a) < 3 && (a += a < m[R] ? -3 : 3); m.push(a), v = d({ cont: n, ozindex: e, imgindex: S, left: a, amnt: v }) } o.images[S].cs = y } - 1 !== s.index && (Math.abs(s.val - g) < 3 && (s.val += g < s.val ? 3 : -3), a = s.val <= 3 ? 3 : s.val > 30 ? 30 : s.val, v = d({ cont: n, ozindex: e, imgindex: s.index, left: a, amnt: v })), -1 !== c.index && (!0 !== r || g > c.val) && (Math.abs(c.val - g) < 3 && (c.val += g < c.val ? 3 : -3), a = c.val >= 97 ? 97 : c.val < 70 ? 70 : c.val, v = d({ cont: n, ozindex: e, imgindex: c.index, left: a, amnt: v })); var _ = f; - 1 !== s.index && jQuery.isNumeric(parseInt(s.size, 0)) ? _ = f > s.size ? parseInt(s.size, 0) : f : -1 !== c.index && jQuery.isNumeric(parseInt(c.size, 0)) && (_ = f > c.size ? parseInt(c.size, 0) : f), RVS.OZ.minFullSize += _ } var V = ""; 0 === h ? V = RVS_LANG.chgimgsizesrc : h > 0 && !0 !== i && (V = RVS_LANG.pickandim), "" !== V && (o.row.find(".op_c_d")[0].innerHTML = V), o.row[0].dataset.currentinfo = V } RVS.OZ.minFullSize = RVS.OZ.minFullSize / 1e3, p(!0) } function d(e) { return e.class = void 0 === e.class ? "" : e.class, e.cont.append('
    '), e.amnt + 1 } function p(e) { var t = []; for (var i in RVS.OZ.slideFullSize = 0, RVS.OZ.list) if (RVS.OZ.list.hasOwnProperty(i)) { var r = RVS.OZ.list[i]; if (jQuery.isNumeric(r.currentSize) && -1 == jQuery.inArray(r.currentUrl, t)) { t.push(r.currentUrl), RVS.OZ.slideFullSize += Math.round(r.currentSize / 1e3); var a = Math.round(r.currentSize / 1e3) + " kb"; r.row.find(".op_c_b")[0].innerHTML = a } } for (var o in RVS.OZ.fontsFullSize = 0, RVS.OZ.fontFamilies) RVS.OZ.fontFamilies.hasOwnProperty(o) && void 0 !== RVS.OZ.fontFamilies[o].size && jQuery.isNumeric(parseInt(RVS.OZ.fontFamilies[o].size)) && (RVS.OZ.fontsFullSize += Math.round(parseInt(RVS.OZ.fontFamilies[o].size) / 1e3)); !0 === e && (RVS.OZ.slideFullSizeCache = RVS.OZ.slideFullSize); var n = parseInt(RVS.OZ.fontsFullSize) + parseInt(RVS.OZ.addOnsFullSize) + parseInt(RVS.OZ.coreFullSize), s = parseInt(RVS.OZ.slideFullSizeCache) + n, l = parseInt(RVS.OZ.minFullSize) + n, c = parseInt(RVS.OZ.slideFullSize) + n, d = Math.round(l / s * 100), p = Math.round((s - c) / s * 100), u = s - c == 0 ? "" : " ( " + (s < c ? "+" : "-") + Math.abs(p) + "% ~ " + (s - c) + " kb)"; jQuery("#optimizer_fullsize").html(c + " kb"), jQuery("#optimizer_cachedsize").html(RVS.OZ.slideFullSizeCache + n + " kb"), jQuery("#optimized_prec").html(RVS_LANG.sizeafteroptim + u), jQuery("#optimize_to_save").html(RVS_LANG.loadedmediainfo + " " + (100 - d) + "% ~ " + (s - l) + " kb") } function u(e) { if (e.index < e.slides.length) { e.order = void 0 === e.order ? 0 : e.order, e.order++; var t = e.slides[e.index]; if (jQuery.inArray(t + "", RVS.OZ.inWork) >= 0) { var i = JSON.stringify(RVS.OZ[e.slides[e.index]].slide), r = JSON.stringify(RVS.OZ[e.slides[e.index]].layers), a = { slider_id: RVS.ENV.sliderID, slide_id: e.slides[e.index], params: i, layers: r, slide_order: e.order }; RVS.DOC.trigger("rs_save_slide_params", [a]), RVS.F.ajaxRequest("save_slide", a, function(t) { t.success && (e.index++, u(e)) }, void 0, void 0, RVS_LANG.saveslide + '
    "' + RVS.OZ[e.slides[e.index]].slide.title + '"') } else e.index++, u(e) } else RVS.OZ.inWork = void 0 === RVS.OZ.inWork ? [] : RVS.OZ.inWork, void 0 !== e.trigger && e.trigger() } function v() { var e = JSON.stringify(RVS.OZ.settings), t = RVS.OZ.slideIDs.slice(), i = -1; for (var r in t) t.hasOwnProperty(r) && ("" + t[r]).indexOf("static") >= 0 && (i = r); t.splice(i, 1), RVS.F.ajaxRequest("save_slider", { slider_id: RVS.ENV.sliderID, params: e, slide_ids: t }, function(e) { e.success && void 0 !== e.missing && e.missing.length > 0 && u({ index: 0, slides: RVS.OZ.slideIDs, works: e.missing }) }, void 0, void 0, RVS_LANG.saveslide + '
    ' + RVS_LANG.slidersettings + "") } function h(e, t, i, r) { if ("string" == typeof t) { var a = t.split("."), o = a.length, n = o - 1, s = e; if (o) for (var l = 0; l < o; l++) l < n && void 0 === s[a[l]] && (s[a[l]] = {}), l < n ? s = s[a[l]] : s[a[l]] = i } } RVS.F.openOptimizer = function(t) { if (function() { if (void 0 !== RVS.S.optimizerListener) return; RVS.DOC.on("click", "#rbm_optimizer .rbm_close", function() { RVS.F.RSDialog.close() }), RVS.DOC.on("click", ".optim_checkbox", function() { jQuery(this).toggleClass("checked") }), RVS.DOC.on("mouseenter", ".ofsinfo", function(e) { var t = jQuery(this), i = t.closest(".optim_row"), r = i.find(".op_c_d"); r[0].innerHTML = "Optimal: " + this.dataset.optim }), RVS.DOC.on("mouseleave", ".ofsinfo", function(e) { var t = jQuery(this), i = t.closest(".optim_row"), r = i.find(".op_c_d"); i[0].dataset.currentinfo = void 0 === i[0].dataset.currentinfo ? "" : i[0].dataset.currentinfo, r[0].innerHTML = i[0].dataset.currentinfo }), RVS.DOC.on("click mouseenter", ".ofs_markpoint", function(e) { var t = jQuery(this), i = t.closest(".optim_row"), r = i.find(".op_c_b"), a = i.find(".op_c_d"), o = i.find(".op_c_e"), n = i[0].dataset.uid, s = RVS.OZ.list[n].images[t[0].dataset.imgindex]; if ("mouseenter" === e.type) RVS.OZ.list[n].lastSize = RVS.OZ.list[n].currentSize, RVS.OZ.list[n].lastUrl = RVS.OZ.list[n].currentUrl; else { if (t.hasClass("selected")) return; RVS.OZ.list[n].lastSize = s.size, RVS.OZ.list[n].lastUrl = s.url } RVS.OZ.list[i[0].dataset.uid].currentSize = s.size, RVS.OZ.list[i[0].dataset.uid].currentUrl = s.url, a[0].innerHTML = "Dimension: " + s.width + " x " + s.height, jQuery.isNumeric(s.size) && (r[0].innerHTML = Math.round(s.size / 1e3) + " kb"), "mouseenter" !== e.type && (RVS.OZ.list[n].pickedImage = t[0].dataset.imgindex, i.find(".ofs_markpoint.selected").removeClass("selected"), t.addClass("selected"), i[0].dataset.currentinfo = s.cs < 31 || s.cs > 69 ? RVS_LANG.pickandim : "", !0 !== s.default ? o[0].innerHTML = 'flash_on' : o[0].innerHTML = ""), p() }), RVS.DOC.on("mouseleave", ".ofs_markpoint", function() { var e = jQuery(this), t = e.closest(".optim_row"), i = t.find(".op_c_b"), r = t.find(".op_c_d"), a = t[0].dataset.uid; RVS.OZ.list[a].lastSize !== RVS.OZ.list[a].currentSize && (RVS.OZ.list[a].currentSize = RVS.OZ.list[a].lastSize, RVS.OZ.list[a].currentUrl = RVS.OZ.list[a].lastUrl, jQuery.isNumeric(RVS.OZ.list[a].lastSize) && (i[0].innerHTML = Math.round(RVS.OZ.list[a].lastSize / 1e3) + " kb"), p()), t[0].dataset.currentinfo = void 0 === t[0].dataset.currentinfo ? "" : t[0].dataset.currentinfo, r[0].innerHTML = t[0].dataset.currentinfo }), RVS.DOC.on("click", "#rbm_optpanel_savebtn", function() { var e = [], t = []; for (var i in RVS.OZ.list) if (RVS.OZ.list.hasOwnProperty(i) && void 0 !== RVS.OZ.list[i].pickedImage) { var r = RVS.OZ.list[i], a = r.images[r.pickedImage]; !0 !== a.default && (-1 == jQuery.inArray(r.slideid, e) && e.push(r.slideid), void 0 !== r.layerid && t.push({ slideid: r.slideid, layerid: r.layerid, type: r.imgtype, url: a.url }), h(RVS.OZ, r.pathURL, a.url), h(RVS.OZ, r.pathSize, r.pickedImage)) } if (e.length > 0) if (void 0 !== RVS.SLIDER) { for (i in e) "settings" !== e[i] && -1 == jQuery.inArray(e[i], RVS.SLIDER.inWork) && RVS.SLIDER.inWork.push(e[i]), RVS.SLIDER[e[i]] = jQuery.extend(!0, RVS.SLIDER[e[i]], RVS.OZ[e[i]]); for (i in t) if (t.hasOwnProperty(i)) { var o = t[i], n = jQuery("#_lc_" + o.slideid + "_" + o.layerid + "_"); n.length > 0 && ("image" === o.type && n.find("._lc_image_inside_").attr("src", o.url), RVS.F.drawHTMLLayer({ uid: o.layerid })) } RVS.F.convertIDStoTxt(), RVS.F.convertArrayToObjects(), RVS.F.saveSlides({ index: 0, slides: RVS.SLIDER.slideIDs, trigger: RVS.F.saveSliderSettings, works: RVS.SLIDER.inWork }) } else { for (i in e) RVS.OZ.inWork = void 0 === RVS.OZ.inWork ? [] : RVS.OZ.inWork, "settings" !== e[i] && -1 == jQuery.inArray(e[i], RVS.OZ.inWork) && RVS.OZ.inWork.push(e[i]), RVS.OZ[e[i]] = jQuery.extend(!0, RVS.OZ[e[i]], RVS.OZ[e[i]]); for (i in t) if (t.hasOwnProperty(i)) { var o = t[i], n = jQuery("#_lc_" + o.slideid + "_" + o.layerid + "_"); n.length > 0 && ("image" === o.type && n.find("._lc_image_inside_").attr("src", o.url), RVS.F.drawHTMLLayer({ uid: o.layerid })) } convertIDStoTxt(), RVS.OZ.settings.nav.arrows.presets = Object.assign({}, RVS.OZ.settings.nav.arrows.presets), RVS.OZ.settings.nav.bullets.presets = Object.assign({}, RVS.OZ.settings.nav.bullets.presets), RVS.OZ.settings.nav.thumbs.presets = Object.assign({}, RVS.OZ.settings.nav.thumbs.presets), RVS.OZ.settings.nav.tabs.presets = Object.assign({}, RVS.OZ.settings.nav.tabs.presets), void 0 !== RVS.OZ.settings.skins && void 0 !== RVS.OZ.settings.skins.colors && (RVS.OZ.settings.skins.colors = Object.assign({}, RVS.OZ.settings.skins.colors)), u({ index: 0, slides: RVS.OZ.slideIDs, trigger: v, works: RVS.OZ.inWork }) } RVS.F.RSDialog.close() }), RVS.DOC.on("click", "#more_about_optimizer", function() { RVS.F.RSDialog.create({ modalid: "#rbm_optimizer_infos", bgopacity: .5 }), RVS.F.RSDialog.center() }), RVS.DOC.on("click", "#rbm_optimizer_infos .rbm_close", function() { RVS.F.RSDialog.close() }), jQuery("#rbm_optimizer_infos").closest(".rb-modal-wrapper").appendTo(jQuery("body")), RVS.S.optimizerListener = !0 }(), void 0 !== t && (void 0 !== t.sliderid && "" !== t.sliderid || void 0 !== t.alias && "" !== t.alias)) { RVS.F.showWaitAMinute({ fadeIn: 0, text: RVS_LANG.loadingcontent }); var i = {}; void 0 !== t.alias && "" !== t.alias && (i.alias = t.alias), void 0 !== t.sliderid && "" !== t.sliderid && (i.id = "slider-" + t.sliderid), setTimeout(function() { RVS.F.ajaxRequest("get_full_slider_object", i, function(t) { if (void 0 === t.id) RVS.F.showWaitAMinute({ fadeOut: 500, text: RVS_LANG.preparingdatas }); else { for (var i in RVS.ENV.sliderid = t.id, RVS.ENV.sliderID = t.id, RVS.F.showWaitAMinute({ fadeIn: 500, text: RVS_LANG.preparingdatas }), t.slider_params.alias = t.alias, t.slider_params.title = t.title, RVS.OZ = { slideIDs: [] }, RVS.OZ.settings = jQuery.extend(!0, {}, t.slider_params), void 0 !== t.static_slide && null != t.static_slide.params && void 0 !== t.static_slide.params.static && !0 === t.static_slide.params.static.isstatic && (RVS.OZ[t.static_slide.id] = { slide: jQuery.extend(!0, {}, t.static_slide.params), layers: jQuery.extend(!0, {}, t.static_slide.layers) }, RVS.OZ.slideIDs.push(t.static_slide.id)), t.slides) if (t.slides.hasOwnProperty(i)) { let e = t.slides[i]; RVS.OZ[e.id] = { slide: jQuery.extend(!0, {}, e.params), layers: jQuery.extend(!0, {}, e.layers) }, RVS.OZ.slideIDs.push(e.id) } e(), RVS.F.showWaitAMinute({ fadeOut: 500, text: RVS_LANG.preparingdatas }) } }, void 0, !0), RVS.F.showWaitAMinute({ fadeOut: 0, text: RVS_LANG.loadingcontent }) }, 100) } else void 0 !== RVS.SLIDER && (RVS.S.optimID = RVS.SLIDER.id, RVS.OZ = jQuery.extend(!0, {}, RVS.SLIDER), e()) }, convertIDStoTxt = function() { for (var e in RVS.OZ.slideIDs) RVS.OZ.slideIDs.hasOwnProperty(e) && (RVS.OZ.slideIDs[e] = "" + RVS.OZ.slideIDs[e]); for (var e in RVS.OZ.inWork) RVS.OZ.inWork.hasOwnProperty(e) && (RVS.OZ.inWork[e] = "" + RVS.OZ.inWork[e]) } }(), window.RVS = void 0 === window.RVS ? {} : window.RVS, RVS.F = void 0 === RVS.F ? {} : RVS.F, RVS.ENV = void 0 === RVS.ENV ? {} : RVS.ENV, RVS.LIB = void 0 === RVS.LIB ? {} : RVS.LIB, RVS.V = void 0 === RVS.V ? {} : RVS.V, RVS.S = void 0 === RVS.S ? {} : RVS.S, RVS.C = void 0 === RVS.C ? {} : RVS.C, RVS.WIN = void 0 === RVS.WIN ? jQuery(window) : RVS.WIN, RVS.DOC = void 0 === RVS.DOC ? jQuery(document) : RVS.DOC, function() { var e = { images: "photo_camera", modules: "aspect_ratio", moduletemplates: "aspect_ratio", layers: "layers", videos: "videocam", svgs: "copyright", fonticons: "font_download", objects: "filter_drama" }, t = { xs: 10, s: 25, m: 50, l: 75, o: 100 }; function i(t) { jQuery("#ol_filter_" + t).remove(), m({ groupType: t, groupAlias: RVS_LANG["ol_" + t], icon: e[t], count: RVS.LIB.OBJ.types[t].count, tags: RVS.LIB.OBJ.types[t].tags, groupopen: !0 }) } function r(e, t) { var i = void 0 !== e.bg.src && e.bg.src.length > 3 ? e.bg.src : RVS.ENV.plugin_url + "admin/assets/images/sources/" + e.source + ".png", r = void 0 !== e.bg.style ? e.bg.style : {}; switch (Array.isArray(r) && (r = RVS.F.toObject(r)), e.bg.type) { case "image": r.backgroundImage = "url(" + i + ")", tpGS.gsap.set(t, r); break; case "color": case "colored": case "solid": var a = window.RSColor.get(r["background-color"]); a.indexOf("gradient") >= 0 ? tpGS.gsap.set(t, { backgroundImage: a }) : tpGS.gsap.set(t, { backgroundColor: a }); break; case "transparent": tpGS.gsap.set(t, { backgroundImage: "url(" + RVS.ENV.plugin_url + "admin/assets/images/sources/" + (void 0 === e.source ? "gallery" : e.source) + ".png)", backgroundRepeat: "no-repeat", backgroundSize: "cover" }) } } function a(e, t) { RVS.LIB.OBJ.selectedSlideId = e, void 0 === RVS.LIB.OBJ.items.moduleslides[RVS.LIB.OBJ.selectedSlideId].layers ? RVS.F.ajaxRequest("get_layers_by_slide", { slide_id: t }, function(e) { if (e.success) { var t = !0; if (void 0 !== e.layers && null !== e.layers) for (var i in e.layers) { if (!t) continue; t = "top" == i || "bottom" == i || "middle" == i } t ? RVS.F.showInfo({ content: RVS_LANG.nolayersinslide, type: "success", showdelay: 0, hidedelay: 2, hideon: "", event: "" }) : (RVS.LIB.OBJ.items.moduleslides[RVS.LIB.OBJ.selectedSlideId].layers = jQuery.extend(!0, {}, e.layers), RVS.F.layerImportList()) } }) : RVS.F.layerImportList() } function o(e, t, i) { var r = '\t
    '; r += '\t\t' + RVS.F.getLayerIcon(e.type) + "", r += '\t\t
    ' + e.alias + "
    ", r += '\t\t
    ' + e.size.width.d.v + " x " + e.size.height.d.v + "
    ", e.actions.action.length > 0 && (r += '\t\t
    ' + RVS_LANG.layerwithaction + "
    "); var a = RVS.F.layerFrameTriggeredBy({ layerid: e.uid, src: RVS.LIB.OBJ.items.moduleslides[RVS.LIB.OBJ.selectedSlideId].layers }); return "" !== a.alias && "" !== a.uid && (r += '\t\t
    ' + RVS_LANG.triggeredby + " " + a.alias + "
    "), r += '\t\t
    radio_button_unchecked
    ', r += "\t
    " } function n(e, t) { var i; for (var r in RVS.LIB.OBJ.items[t]) RVS.LIB.OBJ.items[t].hasOwnProperty(r) && (i = RVS.LIB.OBJ.items[t][r].id === e ? RVS.LIB.OBJ.items[t][r] : i); return i } function s(e) { return function(e, t) { var i; for (var r in RVS.LIB.OBJ.items[t]) RVS.LIB.OBJ.items[t].hasOwnProperty(r) && (i = RVS.LIB.OBJ.items[t][r].uid === e ? RVS.LIB.OBJ.items[t][r] : i); return i }(e, "moduletemplates") } function l(e, t) { for (var i in RVS.LIB.OBJ.items.moduletemplates) if (RVS.LIB.OBJ.items.moduletemplates.hasOwnProperty(i) && RVS.LIB.OBJ.items.moduletemplates[i].uid === e.uid && (RVS.LIB.OBJ.items.moduletemplates[i].installed = e.hiddensliderid, t && (RVS.LIB.OBJ.items.moduletemplates[i].modal = "1"), void 0 !== RVS.LIB.OBJ.items.moduletemplates[i].ref && RVS.LIB.OBJ.items.moduletemplates[i].ref.find(".installed_notinstalled").html(RVS_LANG.installed), e.children)) for (var r in RVS.LIB.OBJ.items.moduletemplateslides) RVS.LIB.OBJ.items.moduletemplateslides.hasOwnProperty(r) && RVS.LIB.OBJ.items.moduletemplateslides[r].parent == RVS.LIB.OBJ.items.moduletemplates[i].id && (RVS.LIB.OBJ.items.moduletemplateslides[r].installed = e.hiddensliderid, RVS.LIB.OBJ.items.moduletemplateslides[r].slideid = e.slideids[parseInt(RVS.LIB.OBJ.items.moduletemplateslides[r].slideid, 0)], void 0 !== RVS.LIB.OBJ.items.moduletemplateslides[r].ref && RVS.LIB.OBJ.items.moduletemplateslides[r].ref.find(".installed_notinstalled").html(RVS_LANG.installed)) } function c(e) { e && jQuery("#searchobjects").val(""); var t = jQuery("li.ol_filter_listelement.selected"); t.length > 0 && void 0 !== t && jQuery("#searchobjects").attr("placeholder", RVS_LANG.search + " " + f(t[0].dataset.title).t + " ...") } function d() { jQuery(".olibrary_item.selected").removeClass("selected"), RVS.LIB.OBJ.container_Underlay.hide(), jQuery("#obj_library_mediapreview").remove(), RVS.LIB.OBJ.moduleInFocus = !1 } function p() { var e = Math.floor(RVS.LIB.OBJ.container_OutputWrap.width() / 287), t = Math.floor(RVS.LIB.OBJ.container_OutputWrap.innerHeight() / 235); return 0 !== e && 0 !== t || (e = Math.floor((window.innerWidth - 330) / 287), t = Math.floor((window.innerHeight - 160) / 235)), e * t } function u() { RVS.LIB.OBJ.pageAmount = parseInt(RVS.LIB.OBJ.pageAmount, 0), RVS.LIB.OBJ.selectedPage = parseInt(RVS.LIB.OBJ.selectedPage, 0), jQuery(".page_button.ol_pagination").each(function() { var e = parseInt(this.dataset.page, 0), t = !1; 1 !== e && e !== RVS.LIB.OBJ.pageAmount || (t = !0), RVS.LIB.OBJ.selectedPage < 4 && e > 0 && e < 5 && (t = !0), RVS.LIB.OBJ.selectedPage > RVS.LIB.OBJ.pageAmount - 3 && e > RVS.LIB.OBJ.pageAmount - 4 && e < 9999 && (t = !0), e < 9999 && e >= RVS.LIB.OBJ.selectedPage - 1 && e <= RVS.LIB.OBJ.selectedPage + 1 && e > 0 && (t = !0), (RVS.LIB.OBJ.selectedPage >= 4 && -9999 === e || RVS.LIB.OBJ.selectedPage <= RVS.LIB.OBJ.pageAmount - 3 && 9999 === e) && (t = !0), RVS.LIB.OBJ.pageAmount < 8 && (t = 9999 != e && -9999 != e), this.style.display = t ? "inline-block" : "none" }) } function v(e) { var t = []; t.push(e); for (var i = 0; - 1 !== e && 20 !== i;) { e = -1 !== RVS.F.getSliderIndex(e) && void 0 !== RVS.LIB.OBJ.items[RVS.LIB.OBJ.selectedType][e] && RVS.LIB.OBJ.items[RVS.LIB.OBJ.selectedType][e].parent || -1, t.push(e), i++ } return t } function h(e) { return e.filter === e.o.source || e.filter === e.o.type || e.filter === e.o.size || jQuery.inArray(e.filter, e.o.tags) >= 0 } function g() { RVS.LIB.OBJ.container_Filters.RSScroll({ wheelPropagation: !1 }), RVS.LIB.OBJ.container_OutputWrap.RSScroll({ wheelPropagation: !1 }) } function f(e) { switch (e) { case "Slider": return { o: 1, t: "Slider" }; case "Carousel": return { o: 2, t: "Carousel" }; case "Hero": return { o: 3, t: "Hero" }; case "Website": return { o: 4, t: "Website" }; case "Premium": return { o: 5, t: "Special FX" }; case "Postbased": return { o: 6, t: "Product Based" }; case "Socialmedia": return { o: 7, t: "Social Media" }; case "Revolution Base": return { o: 8, t: "Basic" }; default: return { o: 0, t: e } } } function m(e) { var t = void 0 !== e.tags && Object.keys(e.tags).length > 0; if (_html = '
    ' + e.icon + '' + e.groupAlias + "
    ", t) { _html += '
      ', _html += '
    • All
    • '; var i = new Array, r = new Array; for (var a in e.tags) if (e.tags.hasOwnProperty(a)) { var o = "moduletemplates" === e.groupType ? f(e.tags[a]) : { o: 0, t: e.tags[a] }; 0 == o.o ? r.push('
    • ' + o.t + "
    • ") : i[o.o] = '
    • ' + o.t + "
    • " } for (var a in i) void 0 !== i[a] && (_html += i[a]); for (var a in r) void 0 !== r[a] && (_html += r[a]); _html += "
    " } _html += "
    ", RVS.LIB.OBJ.container_Filters.append(_html) } RVS.F.initObjectLibrary = function(e) { RVS.DOC.on("click", "#ol_close", function() { !0 === RVS.LIB.OBJ.moduleInFocus ? (d(), RVS.LIB.OBJ.moduleInFocus = !1) : RVS.F.closeObjectLibrary() }), RVS.DOC.on("click", "#reset_objsorting", function() { d(), jQuery("#sel_olibrary_sorting").val("datedesc").trigger("change.select2RS"), RVS.DOC.trigger("updateObjectLibraryOverview", { val: "datedesc", eventparam: "#reset_objsorting", ignoreCookie: !0 }) }), RVS.DOC.on("updateObjectLibraryOverview", function(e, t) { if (void 0 !== t && void 0 !== t.eventparam) { var i = "#reset_objsorting" === t.eventparam ? "datedesc" === t.val ? 0 : 1 : "all" === t.val ? 0 : 1, r = 1 === i ? "inline-block" : "none"; tpGS.gsap.set(t.eventparam, { autoAlpha: i, display: r }) } void 0 === t || t.ignoreRebuild || (void 0 !== t.val && !0 !== t.ignoreCookie && RVS.F.setCookie("rs6_library_pagination", t.val, 360), d(), RVS.F.updateFilteredList({ force: !0, keeppage: !1, noanimation: !1 })) }), RVS.DOC.on("click", ".ol_filter_listelement", function() { var e = jQuery(this), t = e.closest(".ol_filter_type"); if ("true" != this.dataset.subtags) RVS.LIB.OBJ.lastSelectedType = RVS.LIB.OBJ.selectedType, RVS.LIB.OBJ.selectedType = this.dataset.type, RVS.LIB.OBJ.selectedFilter = this.dataset.filter, RVS.LIB.OBJ.selectedPage = 1, RVS.LIB.OBJ.selectedPackage = -1, RVS.LIB.OBJ.selectedFolder = -1, RVS.F.loadLibrary({ modules: [this.dataset.type], event: "reBuildObjectLibrary" }), jQuery(".ol_filter_listelement.selected").removeClass("selected"), e.addClass("selected"), t.find(".ol_filter_headerelement").addClass("selected"); else { var i = t.hasClass("open"); jQuery(".ol_filter_type.open").removeClass("open"), i || t.addClass("open"); var r = t.find(".ol_filter_group"); 0 === r.find(".selected").length && r.find(".ol_filter_listelement").first().click() } return c(), d(), !1 }), RVS.DOC.on("click", "#ol_right_underlay", d), RVS.DOC.on("click", ".ol_link_to_add", function() { var e = this.dataset.librarytype; if ("modules" === e || "true" === RVS.ENV.activated || !0 === RVS.ENV.activated) switch (e) { case "modules": let u, v = jQuery(this).closest(".olibrary_item").attr("data-objid"), h = RVS.LIB.OBJ.items.modules, g = h.length; for (let e = 0; e < g && (u = h[e]).id !== v; e++); RVS.DOC.trigger(RVS.LIB.OBJ.success.modules, u), RVS.F.closeObjectLibrary(); break; case "moduleslides": case "moduletemplateslides": var t = RVS.LIB.OBJ.items[this.dataset.librarytype][RVS.F.getModuleIndex(this.dataset.id, this.dataset.librarytype)]; if (null == t.installed) { var i = this.dataset.parentuid; RVS.F.ajaxRequest("import_template_slider", { uid: i }, function(e) { e.success && (l({ uid: i, hiddensliderid: e.hiddensliderid, children: !0, slideids: e.slider.slide_ids }), RVS.DOC.trigger(RVS.LIB.OBJ.success.slide, t.slideid), RVS.F.closeObjectLibrary()) }, void 0, void 0, RVS_LANG.installingtemplate + '
    ' + this.dataset.parenttitle + "") } else RVS.DOC.trigger(RVS.LIB.OBJ.success.slide, t.slideid), RVS.F.closeObjectLibrary(); break; case "moduletemplates": RVS.LIB.OBJ.container_Underlay.show(), RVS.LIB.OBJ.moduleInFocus = !0; var t = jQuery(this); if ("moduletemplates" === this.dataset.librarytype) { var r = t.closest(".olibrary_item"), a = r.find(".ol_template_info_wrap"); r.addClass("selected"); var o = r.offset().left; tpGS.gsap.set(a, { left: "auto", right: "auto" }), o + 630 > window.outerWidth + (RVS.S.isRTL ? -300 : 0) ? o - 340 > 300 ? tpGS.gsap.set(a, { left: "auto", right: "100%", x: "-20px", transformOrigin: "100% 0%" }) : tpGS.gsap.set(a, { left: r.width() - (o + 630 - window.outerWidth) + "px", zIndex: 200, right: "auto", x: "20px", transformOrigin: "0% 0%" }) : tpGS.gsap.set(a, { left: "100%", right: "auto", x: "20px", transformOrigin: "0% 0%" }); // var s = r.find(".redownloadTemplateState"), // c = r.find(".createBlankPageState"); // s.length > 0 && (s[0].checked = RVS.LIB.OBJ.reDownloadTemplate), c.length > 0 && (c[0].checked = RVS.LIB.OBJ.createBlankPage), RVS.F.turnOnOffVisUpdate({ // input: s // }), RVS.F.turnOnOffVisUpdate({ // input: c // }) } break; case "videos": var d = jQuery.extend(!0, RVS.LIB.OBJ.data, n(this.dataset.id, this.dataset.librarytype)); RVS.F.ajaxRequest("load_library_object", { type: "video", id: this.dataset.id }, function(e) { e.success && (d.img = e.cover, d.video = e.url, RVS.DOC.trigger(RVS.LIB.OBJ.success.video, d)) }), RVS.F.closeObjectLibrary(); break; case "layers": RVS.F.ajaxRequest("load_library_object", { type: "layers", id: this.dataset.id }, function(e) { if (e.success) { for (var t in RVS.LIB.OBJ.import = { toImport: [] }, e.layers) e.layers.hasOwnProperty(t) && RVS.LIB.OBJ.import.toImport.push(e.layers[t].uid); RVS.F.showWaitAMinute({ fadeIn: 100, text: RVS_LANG.importinglayers }), RVS.F.importSelectedLayers(e.layers), RVS.DOC.trigger(RVS.LIB.OBJ.success.layers) } else RVS.F.closeObjectLibrary() }); break; case "fonticons": case "svgs": var p = function(e, t) { var i; for (var r in RVS.LIB.OBJ.items[t]) RVS.LIB.OBJ.items[t].hasOwnProperty(r) && (i = RVS.LIB.OBJ.items[t][r].handle === e ? RVS.LIB.OBJ.items[t][r] : i); return i }(this.dataset.handle, this.dataset.librarytype); "svgs" === this.dataset.librarytype && (p.path = p.ref.find("svg path").attr("d")), RVS.DOC.trigger(RVS.LIB.OBJ.success.icon, p), RVS.F.closeObjectLibrary(); break; default: var p = n(this.dataset.id, this.dataset.librarytype); RVS.DOC.trigger(RVS.LIB.OBJ.success.custom, p), RVS.F.closeObjectLibrary() } else RVS.F.showRegisterSliderInfo() }), RVS.DOC.on("mouseenter", ".ol_link_to_add_image", function() { var e = document.getElementById("sizeinfo_" + this.dataset.librarytype + "_" + this.dataset.id); null != e && (e.innerHTML = Math.round(parseInt(e.dataset.w, 0) * (t[this.dataset.size] / 100)) + "x" + Math.round(parseInt(e.dataset.h, 0) * (t[this.dataset.size] / 100))) }), RVS.DOC.on("mouseleave", ".ol_link_to_add_image", function() { var e = document.getElementById("sizeinfo_" + this.dataset.librarytype + "_" + this.dataset.id); null != e && (e.innerHTML = parseInt(e.dataset.w, 0) + "x" + parseInt(e.dataset.h, 0)) }), RVS.DOC.on("click", ".ol_link_to_add_image", function() { if ("true" === RVS.ENV.activated || !0 === RVS.ENV.activated) { var e = jQuery.extend(!0, RVS.LIB.OBJ.data, n(this.dataset.id, this.dataset.librarytype)); e.size = t[this.dataset.size], RVS.F.ajaxRequest("load_library_object", { type: t[this.dataset.size], id: this.dataset.id }, function(t) { t.success && (e.img = t.url, RVS.DOC.trigger(RVS.LIB.OBJ.success.image, e)) }), RVS.F.closeObjectLibrary() } else RVS.F.showRegisterSliderInfo() }), RVS.DOC.on("reBuildObjectLibrary", function() { d(), RVS.F.reBuildObjectLibrary(), jQuery(".ol_filter_type.selected").removeClass("selected"), jQuery(".ol_filter_listelement.selected").removeClass("selected"), jQuery(".ol_filter_listelement").each(function() { this.dataset.filter === RVS.LIB.OBJ.selectedFilter && this.dataset.type === RVS.LIB.OBJ.selectedType && this.classList.add("selected") }), jQuery(".ol_filter_type.open").addClass("selected") }), RVS.DOC.on("reBuildObjectLibraryAndCheckSingleSlide", function() { d(), RVS.F.reBuildObjectLibrary(); var e, t, i = 0; for (var r in RVS.LIB.OBJ.items.moduleslides) RVS.LIB.OBJ.items.moduleslides.hasOwnProperty(r) && RVS.LIB.OBJ.items.moduleslides[r].slider_id === RVS.LIB.OBJ.selectedModule && (i++, e = RVS.LIB.OBJ.items.moduleslides[r].id, t = RVS.LIB.OBJ.items.moduleslides[r].installed); 1 === i && "layers" === RVS.LIB.OBJ.depth && a(e, t) }), RVS.DOC.on("click", ".ol_link_to_view", function() { var e = jQuery(this); void 0 !== e[0].dataset.preview && e[0].dataset.preview.length > 0 && window.open(e[0].dataset.preview, "_blank") }), RVS.DOC.on("mouseenter", ".show_video_on_hover", function() { clearTimeout(window.showVideOnHoverTimer); var e = jQuery(this), t = e.closest(".olibrary_item"), i = t.find(".ol_template_info_wrap"), r = this.dataset.videosource; window.showVideOnHoverTimer = setTimeout(function() { t.find(".videopreview").append(''), t.addClass("selected"); var e = t.offset().left; tpGS.gsap.set(i, { left: "auto", right: "auto" }), e + 630 > window.outerWidth + (RVS.S.isRTL ? -300 : 0) ? e - 340 > 300 ? tpGS.gsap.set(i, { left: "auto", right: "100%", x: "-20px", transformOrigin: "100% 0%" }) : tpGS.gsap.set(i, { left: t.width() - (e + 630 - window.outerWidth) + "px", zIndex: 200, right: "auto", x: "20px", transformOrigin: "0% 0%" }) : tpGS.gsap.set(i, { left: "100%", right: "auto", x: "20px", transformOrigin: "0% 0%" }) }, 500) }), RVS.DOC.on("mouseleave", ".show_video_on_hover", function() { clearTimeout(window.showVideOnHoverTimer), d() }), RVS.DOC.on("click", ".ol_link_to_deeper", function() { RVS.LIB.OBJ.selectedModule = -1, RVS.LIB.OBJ.selectedModuleTitle = "", jQuery("#searchobjects").val(""), "moduletemplates" === this.dataset.librarytype ? "package_parent" === this.dataset.elementtype ? (RVS.LIB.OBJ.selectedPackage = this.dataset.packageid, RVS.LIB.OBJ.selectedPackageTitle = this.dataset.title, d(), RVS.F.updateFilteredList({ force: !0, keeppage: !1, noanimation: !1 })) : "module_parent" === this.dataset.elementtype && (RVS.LIB.OBJ.lastSelectedType = RVS.LIB.OBJ.selectedType, RVS.LIB.OBJ.selectedModule = this.dataset.packageid, RVS.LIB.OBJ.selectedModuleTitle = this.dataset.title, RVS.LIB.OBJ.selectedType = "moduletemplateslides", RVS.F.loadSimpleModule({ modules: ["moduletemplateslides"], parenttype: "moduletemplates", moduleid: this.dataset.moduleid, module_uid: this.dataset.module_uid, event: "reBuildObjectLibrary" })) : "modules" === this.dataset.librarytype ? "folder_parent" === this.dataset.elementtype ? (RVS.LIB.OBJ.selectedFolder = this.dataset.folderid, RVS.F.resetAllFilters(), RVS.F.updateFilteredList({ force: !0, keeppage: !1, noanimation: !1 })) : "module_parent" === this.dataset.elementtype && (RVS.LIB.OBJ.lastSelectedType = RVS.LIB.OBJ.selectedType, RVS.LIB.OBJ.selectedModule = this.dataset.packageid, RVS.LIB.OBJ.selectedModuleTitle = this.dataset.title, RVS.LIB.OBJ.selectedType = "moduleslides", RVS.F.loadSimpleModule({ modules: ["moduleslides"], parenttype: "modules", moduleid: this.dataset.moduleid, event: "reBuildObjectLibraryAndCheckSingleSlide" })) : "moduleslides" === this.dataset.librarytype && a(this.dataset.id, this.dataset.slideid), jQuery("#ol_right").scrollTop(0) }), RVS.DOC.on("click", ".page_button.ol_pagination", function() { d(), jQuery(".page_button.ol_pagination.selected").removeClass("selected"), RVS.LIB.OBJ.selectedPage = -9999 === parseInt(this.dataset.page, 0) ? RVS.LIB.OBJ.selectedPage = parseInt(RVS.LIB.OBJ.selectedPage, 0) - 3 : 9999 === parseInt(this.dataset.page, 0) ? RVS.LIB.OBJ.selectedPage = parseInt(RVS.LIB.OBJ.selectedPage, 0) + 3 : this.dataset.page, jQuery(".page_button.ol_pagination[data-page=" + RVS.LIB.OBJ.selectedPage + "]").addClass("selected"), jQuery("#ol_right").scrollTop(0), RVS.F.drawOverview(), u() }), RVS.WIN.on("resize", function() { RVS.LIB.OBJ.open && (clearTimeout(window.resizedObjectLibraryTimeOut), window.resizedObjectLibraryTimeOut = setTimeout(function() { var e = p(); e = e < 1 ? 1 : e, d(), RVS.LIB.OBJ.maxAmountPerPage !== e && RVS.F.updateFilteredList({ force: !0, keeppage: !0, noanimation: !0 }) }, 10)) }), RVS.DOC.on("click", ".rsl_breadcrumb", function() { RVS.LIB.OBJ.selectedModule = -1, RVS.LIB.OBJ.selectedModuleTitle = "", RVS.LIB.OBJ.selectedModuleType = "", RVS.LIB.OBJ.selectedType = "moduletemplateslides" === RVS.LIB.OBJ.selectedType ? "moduletemplates" : "moduleslides" === RVS.LIB.OBJ.selectedType ? "modules" : RVS.LIB.OBJ.selectedType, void 0 !== this.dataset.folderid && (d(), "moduletemplates" === RVS.LIB.OBJ.selectedType && (RVS.LIB.OBJ.selectedPackage = parseInt(this.dataset.folderid, 0)), "modules" === RVS.LIB.OBJ.selectedType && (RVS.LIB.OBJ.selectedFolder = parseInt(this.dataset.folderid, 0), RVS.F.resetAllFilters()), RVS.F.updateFilteredList({ force: !0, keeppage: !0, noanimation: !0 })) }), RVS.DOC.on("click", ".olibrary_favorit", function() { var e = jQuery(this), t = { do: "add", type: this.dataset.librarytype, id: this.dataset.id }; e.toggleClass("selected"), e.hasClass("selected") || (t.do = "remove"), RVS.F.ajaxRequest("set_favorite", t, function(e) { e.success && (function(e) { for (var t in RVS.LIB.OBJ.items[e.type]) RVS.LIB.OBJ.items[e.type].hasOwnProperty(t) && RVS.LIB.OBJ.items[e.type][t].id === e.id && (RVS.LIB.OBJ.items[e.type][t].favorite = "add" === e.do) }(t), RVS.F.updateFilteredList({ force: !0, keeppage: !0, noanimation: !0 })) }) }), RVS.DOC.on("click", "#obj_updatefromserver", function() { RVS.F.updateObjectLibraryFromServer(RVS.LIB.OBJ.selectedType) }), RVS.DOC.on("click", "#obj_fil_favorite", function() { var e = jQuery(this); e.toggleClass("selected"), d(), RVS.F.updateFilteredList({ force: !0, keeppage: !0, noanimation: !0 }) }), RVS.DOC.on("keyup", "#searchobjects", function() { d(), clearTimeout(window.searchKeyUp), window.searchKeyUp = setTimeout(function() { RVS.F.updateFilteredList({ force: !0, keeppage: !1, noanimation: !1 }), RVS.LIB.OBJ.container_OutputWrap.RSScroll("update") }, 200) }), RVS.DOC.on("change", ".redownloadTemplateState", function() { RVS.LIB.OBJ.reDownloadTemplate = this.checked }), RVS.DOC.on("change", ".createBlankPageState", function() { RVS.LIB.OBJ.createBlankPage = this.checked }), RVS.DOC.on("click", ".olti_install_template", function() { if ("true" === RVS.ENV.activated || !0 === RVS.ENV.activated) { var e = this.dataset.uid, t = s(e); RVS.LIB.OBJ.sliderPackageIds = [], RVS.LIB.OBJ.reDownloadTemplate || 0 == t.installed ? RVS.F.ajaxRequest("import_template_slider", { uid: e, install: !0 }, function(t) { t.success && (RVS.LIB.OBJ.sliderPackageIds.push(t.slider.id), void 0 !== RVS.LIB.OBJ.success && void 0 !== RVS.LIB.OBJ.success.slider && RVS.DOC.trigger(RVS.LIB.OBJ.success.slider, t), RVS.LIB.OBJ.createBlankPage && RVS.LIB.OBJ.success && RVS.LIB.OBJ.success.draftpage && RVS.DOC.trigger(RVS.LIB.OBJ.success.draftpage, { pages: RVS.LIB.OBJ.sliderPackageIds }), l({ uid: e, hiddensliderid: t.hiddensliderid })), RVS.F.closeObjectLibrary() }, void 0, void 0, RVS_LANG.installtemplate + '
    ' + this.dataset.title + "") : RVS.F.ajaxRequest("install_template_slider", { uid: this.dataset.uid, sliderid: t.installed }, function(e) { e.success && RVS.LIB.OBJ.sliderPackageIds.push(e.slider.id), void 0 !== RVS.LIB.OBJ.success && void 0 !== RVS.LIB.OBJ.success.slider && RVS.DOC.trigger(RVS.LIB.OBJ.success.slider, e), RVS.LIB.OBJ.createBlankPage && RVS.LIB.OBJ.success && RVS.LIB.OBJ.success.draftpage && RVS.DOC.trigger(RVS.LIB.OBJ.success.draftpage, { pages: RVS.LIB.OBJ.sliderPackageIds }), RVS.F.closeObjectLibrary() }, void 0, void 0, RVS_LANG.installtemplate + '
    ' + this.dataset.title + "") } else RVS.F.showRegisterSliderInfo() }), RVS.DOC.on("click", ".olti_install_template_package", function() { if ("true" === RVS.ENV.activated || !0 === RVS.ENV.activated) { var e = this.dataset.uids.split(","), t = this.dataset.folderuid; RVS.F.createNewFolder({ foldername: this.dataset.package, enter: !0, callBack: "sliderPackageInstall", callBackParam: { uids: e, index: 0, folderuid: t, name: this.dataset.package, createBlankPage: RVS.LIB.OBJ.createBlankPage, amount: e.length - 1 } }) } else RVS.F.showRegisterSliderInfo() }), RVS.DOC.on("sliderPackageInstall", function(e, t) { RVS.LIB.OBJ.sliderPackageIds = [], RVS.LIB.OBJ.sliderPackageReferenceMap = new Object, RVS.LIB.OBJ.sliderPackageReferenceMap.slider_map = new Object, RVS.LIB.OBJ.sliderPackageReferenceMap.slides_map = new Object, RVS.LIB.OBJ.sliderPackageModals = [], RVS.LIB.OBJ.sliderPackageModalsOrig = [], RVS.LIB.OBJ.sliderPackageModalsOrigUid = [], RVS.LIB.OBJ.sliderPackageModal = !1, RVS.LIB.OBJ.sliderPackageAdditions = {}, RVS.LIB.OBJ.sliderPackageAdditionsUID = {}, RVS.LIB.OBJ.sliderPackageAdditionsInstalled = {}, function e(t) { if (t.index <= t.amount) { var i = t.uids[t.index], r = s(i); 1 !== r.modal && "1" !== r.modal || (RVS.LIB.OBJ.sliderPackageModal = !0, RVS.LIB.OBJ.sliderPackageModalsOrig.push("" + r.installed), RVS.LIB.OBJ.sliderPackageModalsOrigUid.push(r.uid)), void 0 !== r.additions && "" !== r.additions && (RVS.LIB.OBJ.sliderPackageAdditionsUID[r.uid] = r.additions, RVS.LIB.OBJ.sliderPackageAdditionsInstalled[r.installed] = r.additions), RVS.LIB.OBJ.reDownloadTemplate || 0 == r.installed ? RVS.F.ajaxRequest("import_template_slider", { folderid: void 0 !== sliderLibrary ? sliderLibrary.selectedFolder : -1, uid: i }, function(r) { r.success && (r.silent = !0, r.ignoreAjaxFolderMove = !0, r.slider.modal = jQuery.inArray("" + r.hiddensliderid, RVS.LIB.OBJ.sliderPackageModalsOrig) >= 0 || jQuery.inArray(r.uid, RVS.LIB.OBJ.sliderPackageModalsOrigUid) >= 0, l({ uid: i, hiddensliderid: r.hiddensliderid, modal: r.slider.modal }), void 0 !== RVS.LIB.OBJ.success && void 0 !== RVS.LIB.OBJ.success.slider && RVS.DOC.trigger(RVS.LIB.OBJ.success.slider, r), RVS.LIB.OBJ.sliderPackageIds.push(r.slider.id), void 0 !== r.map && void 0 !== r.map.slider && (RVS.LIB.OBJ.sliderPackageReferenceMap.slider_map = jQuery.extend(!0, RVS.LIB.OBJ.sliderPackageReferenceMap.slider_map, r.map.slider)), void 0 !== r.map && void 0 !== r.map.slides && (RVS.LIB.OBJ.sliderPackageReferenceMap.slides_map = jQuery.extend(!0, RVS.LIB.OBJ.sliderPackageReferenceMap.slides_map, r.map.slides)), r.slider.modal && RVS.LIB.OBJ.sliderPackageModals.push(r.slider.id), void 0 !== RVS.LIB.OBJ.sliderPackageAdditionsUID[r.uid] && (RVS.LIB.OBJ.sliderPackageAdditions[r.slider.id] = RVS.LIB.OBJ.sliderPackageAdditionsUID[r.uid])), t.index++, e(t) }, void 0, void 0, RVS_LANG.installpackage + '
    ' + t.name + " (" + (t.index + 1) + " / " + (t.amount + 1) + ")") : RVS.F.ajaxRequest("install_template_slider", { folderid: void 0 !== sliderLibrary ? sliderLibrary.selectedFolder : -1, uid: i, sliderid: r.installed }, function(i) { i.success && (i.silent = !0, i.ignoreAjaxFolderMove = !0, void 0 !== RVS.LIB.OBJ.success && void 0 !== RVS.LIB.OBJ.success.slider && RVS.DOC.trigger(RVS.LIB.OBJ.success.slider, i), RVS.LIB.OBJ.sliderPackageIds.push(i.slider.id), void 0 !== i.map && void 0 !== i.map.slider && (RVS.LIB.OBJ.sliderPackageReferenceMap.slider_map = jQuery.extend(!0, RVS.LIB.OBJ.sliderPackageReferenceMap.slider_map, i.map.slider)), void 0 !== i.map && void 0 !== i.map.slides && (RVS.LIB.OBJ.sliderPackageReferenceMap.slides_map = jQuery.extend(!0, RVS.LIB.OBJ.sliderPackageReferenceMap.slides_map, i.map.slides)), (jQuery.inArray("" + i.hiddensliderid, RVS.LIB.OBJ.sliderPackageModalsOrig) >= 0 || jQuery.inArray(i.uid, RVS.LIB.OBJ.sliderPackageModalsOrigUid) >= 0) && RVS.LIB.OBJ.sliderPackageModals.push(i.slider.id), void 0 !== RVS.LIB.OBJ.sliderPackageAdditionsUID[i.uid] && (RVS.LIB.OBJ.sliderPackageAdditions[i.slider.id] = RVS.LIB.OBJ.sliderPackageAdditionsUID[i.uid]), void 0 !== RVS.LIB.OBJ.sliderPackageAdditionsInstalled[i.hiddensliderid] && (RVS.LIB.OBJ.sliderPackageAdditions[i.slider.id] = RVS.LIB.OBJ.sliderPackageAdditionsInstalled[i.hiddensliderid])), t.index++, e(t) }, void 0, void 0, RVS_LANG.installpackage + '
    ' + t.name + " (" + (t.index + 1) + " / " + (t.amount + 1) + ")") } else { l({ uid: t.folderuid, hiddensliderid: !0 }), RVS.LIB.OBJ.createBlankPage && RVS.LIB.OBJ.success && RVS.LIB.OBJ.success.draftpage && RVS.DOC.trigger(RVS.LIB.OBJ.success.draftpage, { pages: RVS.LIB.OBJ.sliderPackageIds, modals: RVS.LIB.OBJ.sliderPackageModals, additions: RVS.LIB.OBJ.sliderPackageAdditions }), RVS.F.closeObjectLibrary(); var a = void 0 !== sliderLibrary ? sliderLibrary.selectedFolder : -1; if (-1 !== a && (a = RVS.F.getOVSliderIndex(a), RVS.F.ajaxRequest("save_slider_folder", { id: sliderLibrary.sliders[a].id, children: sliderLibrary.sliders[a].children }, function(e) {}), -1 !== sliderLibrary.sliders[a].parent)) { var o = RVS.F.getOVSliderIndex(sliderLibrary.sliders[a].parent); RVS.F.ajaxRequest("save_slider_folder", { id: sliderLibrary.sliders[o].id, children: sliderLibrary.sliders[o].children }, function(e) {}) } RVS.LIB.OBJ.sliderPackageModal && RVS.F.ajaxRequest("adjust_modal_ids", { map: RVS.LIB.OBJ.sliderPackageReferenceMap }, function(e) {}) } }(t) }), RVS.F.buildObjectLibrary(e), RVS.LIB.OBJ.items = {}, RVS.LIB.OBJ.search = jQuery("#searchobjects"), RVS.LIB.OBJ.inited = !0 }, RVS.F.extendFilterIcons = function(t) { e[t.handle] = t.icon }, RVS.F.extendLibTypes = function(e) { RVS.LIB.OBJ.types = jQuery.extend(!0, e, RVS.LIB.OBJ.types) }, RVS.F.openObjectLibrary = function(e) { RVS.LIB.OBJ.open = !0, e = void 0 === e ? { types: "all", filter: "all", selected: ["moduletemplates"], success: { slider: "addNewSlider" } } : e, RVS.S.isRTL = void 0 === RVS.S.isRTL ? jQuery("body").hasClass("rtl") : RVS.S.isRTL, RVS.LIB.OBJ.inited || RVS.F.initObjectLibrary(), !0 !== e.silent && (tpGS.gsap.fromTo(RVS.LIB.OBJ.container_Library, .7, { scale: .8, autoAlpha: 0, display: "none" }, { autoAlpha: 1, display: "block", scale: 1, ease: "power3.inOut" }), tpGS.gsap.fromTo("#ol_header, #ol_footer", .5, { autoAlpha: 0, ease: "power3.inOut" }, { autoAlpha: 1, opacity: 1, ease: "power3.inOut", delay: .5 })), RVS.LIB.OBJ.staticalso = e.staticalso, RVS.LIB.OBJ.success = e.success, RVS.LIB.OBJ.selectedType = e.selected[0], RVS.LIB.OBJ.selectedFilter = e.filter, RVS.LIB.OBJ.selectedFolder = -1, RVS.LIB.OBJ.selectedPage = 0, RVS.LIB.OBJ.selectedPackage = -1, RVS.LIB.OBJ.selectedModule = -1, RVS.LIB.OBJ.selectedModuleTitle = "", RVS.LIB.OBJ.slideParent = -1, RVS.LIB.OBJ.reDownloadTemplate = !1, RVS.LIB.OBJ.createBlankPage = !1, RVS.LIB.OBJ.data = e.data, RVS.LIB.OBJ.context = void 0 === e.context ? "overview" : "editor", RVS.LIB.OBJ.depth = void 0 === e.depth ? "slide" : e.depth, jQuery(".ol_filter_type.selected").removeClass("selected"), jQuery(".ol_filter_type.open").removeClass("open"), "all" !== e.types ? RVS.LIB.OBJ.container_Filters.find(".ol_filter_type").each(function() { jQuery.inArray(this.dataset.type, e.types) >= 0 ? jQuery(this).show() : jQuery(this).hide() }) : RVS.LIB.OBJ.container_Filters.find(".ol_filter_type").show(); var t = jQuery("#ol_filter_" + e.selected); t.addClass("open"), t.find(".ol_filter_headerelement").addClass("selected"), t.find('.ol_filter_listelement[data-filter="' + e.filter + '"]').addClass("selected"), c(!0), RVS.F.loadLibrary({ modules: e.selected, event: void 0 !== e.event ? e.event : "reBuildObjectLibrary" }), !1 === e.updatelist ? jQuery("#obj_updatefromserver").hide() : jQuery("#obj_updatefromserver").show() }, RVS.F.reBuildObjectLibrary = function() { RVS.F.updateFilteredList() }, RVS.F.updateObjectLibraryFromServer = function(e) { RVS.F.removeModuleTemplatesFromLibrary(e), RVS.LIB.OBJ.refreshFromServer = !0, RVS.F.loadLibrary({ modules: [e], event: "reBuildObjectLibrary" }) }, RVS.F.removeModuleTemplatesFromLibrary = function(e) { delete RVS.LIB.OBJ.types[e], delete RVS.LIB.OBJ.items[e], RVS.LIB.OBJ.selectedType = e, RVS.LIB.OBJ.lastSelectedType = e, RVS.LIB.OBJ.filteredList = [], RVS.LIB.OBJ.oldList = [], RVS.LIB.OBJ.pages = [], RVS.LIB.OBJ.container_Output[0].innerHTML = "" }, RVS.F.loadLibrary = function(e) { var t = [], r = []; for (var a in e.modules) e.modules.hasOwnProperty(a) && (RVS.LIB.OBJ.types[e.modules[a]] = void 0 === RVS.LIB.OBJ.types[e.modules[a]] ? {} : RVS.LIB.OBJ.types[e.modules[a]], !0 !== RVS.LIB.OBJ.types[e.modules[a]].loaded ? t.push(e.modules[a]) : r.push(e.modules[a])); t.length > 0 && RVS.F.ajaxRequest("load_module", { module: t, refresh_from_server: RVS.LIB.OBJ.refreshFromServer }, function(t) { if (t.success) { for (var r in t.modules) if (t.modules.hasOwnProperty(r)) { for (var a in RVS.LIB.OBJ.items[r] = void 0 === RVS.LIB.OBJ.items[r] ? [] : RVS.LIB.OBJ.items[r], t.modules[r].items) t.modules[r].items.hasOwnProperty(a) && (RVS.LIB.OBJ.items[r][a] = t.modules[r].items[a], RVS.LIB.OBJ.items[r][a].libraryType = r, void 0 === RVS.LIB.OBJ.items[r][a].id && (RVS.LIB.OBJ.items[r][a].id = a)); void 0 !== t.modules[r].tags && (RVS.LIB.OBJ.types[r].tags = t.modules[r].tags, i(r)), RVS.LIB.OBJ.types[r].loaded = !0 } if (void 0 !== e.event && RVS.DOC.trigger(e.event, e.eventparam), RVS.LIB.OBJ.success && RVS.LIB.OBJ.success.event) { let e = RVS.LIB.OBJ.success.eventparam || !1; RVS.DOC.trigger(RVS.LIB.OBJ.success.event, e) } } }), r.length > 0 && 0 === t.length && void 0 !== e.event && RVS.DOC.trigger(e.event, e.eventparam), RVS.LIB.OBJ.refreshFromServer = !1 }, RVS.F.loadSimpleModule = function(e) { var t = !1; for (var i in RVS.LIB.OBJ.items[e.modules[0]]) RVS.LIB.OBJ.items[e.modules[0]].hasOwnProperty(i) && (t = !0 === t || RVS.LIB.OBJ.items[e.modules[0]][i].parent == e.moduleid); t ? void 0 !== e.event && RVS.DOC.trigger(e.event, e.eventparam) : RVS.F.ajaxRequest("load_module", { module: e.modules[0], module_id: e.moduleid, module_uid: e.module_uid, static: RVS.LIB.OBJ.staticalso }, function(t) { if (t.success) { for (var i in t.modules) if (t.modules.hasOwnProperty(i)) { RVS.LIB.OBJ.items[i] = void 0 === RVS.LIB.OBJ.items[i] ? [] : RVS.LIB.OBJ.items[i]; var r = RVS.LIB.OBJ.items[i].length, a = RVS.F.getModuleIndex(e.moduleid, e.parenttype), o = RVS.LIB.OBJ.items[e.parenttype][a].title; for (var n in t.modules[i].items) t.modules[i].items.hasOwnProperty(n) && (t.modules[i].items[n].libraryType = i, t.modules[i].items[n].moduleid = e.moduleid, t.modules[i].items[n].module_uid = e.module_uid, t.modules[i].items[n].parenttitle = o, t.modules[i].items[n].slideid = void 0 === t.modules[i].items[n].id ? n : t.modules[i].items[n].id, t.modules[i].items[n].id = parseInt(r, 0) + parseInt(n, 0), RVS.LIB.OBJ.items[i].push(t.modules[i].items[n])) } void 0 !== e.event && RVS.DOC.trigger(e.event, e.eventparam) } }) }, RVS.F.addonInstalledOnDemand = function(e) { var t = !1; if (void 0 !== RVS.LIB.OBJ && void 0 !== RVS.LIB.OBJ.items) { for (var i in RVS.LIB.OBJ.items.moduletemplates) if (RVS.LIB.OBJ.items.moduletemplates.hasOwnProperty(i)) { var r = RVS.LIB.OBJ.items.moduletemplates[i]; for (var a in r.plugin_require) if (r.plugin_require.hasOwnProperty(a)) { var o = r.plugin_require[a].path.split("/"); (o = o[o.length - 1].split(".php")[0]) !== e && r.plugin_require[a].name !== e || (r.plugin_require[a].installed = !0, r && r.ref && r.ref.remove(), delete r.ref, t = !0) } } t && RVS.F.updateFilteredList({ force: !0, keeppage: !1, noanimation: !1 }) } }, RVS.F.updateParentAttributes = function() { if (window.parentAttributesUpdateForObjects) return !1; for (var e in window.parentAttributesUpdateForObjects = !0, RVS.LIB.OBJ.items.modules) if (RVS.LIB.OBJ.items.modules.hasOwnProperty(e) && RVS.LIB.OBJ.items.modules[e].folder) for (var t in RVS.LIB.OBJ.items.modules[e].children) if (RVS.LIB.OBJ.items.modules[e].children.hasOwnProperty(t)) { var i = RVS.F.getSliderIndex(RVS.LIB.OBJ.items.modules[e].children[t]); - 1 !== i && (RVS.LIB.OBJ.items.modules[i].parent = RVS.LIB.OBJ.items.modules[e].id) } }, RVS.F.updateFilteredList = function(e) { if (e = void 0 === e ? { force: !1, keeppage: !1, noanimation: !1, focusItem: !1 } : e, -1 !== RVS.LIB.OBJ.selectedPackage) RVS.LIB.OBJ.items[RVS.LIB.OBJ.selectedType].sort(function(e, t) { return e.package_order - t.package_order }), RVS.LIB.OBJ.container_Sorting.hide(); else switch (RVS.LIB.OBJ.container_Sorting.show(), RVS.LIB.OBJ.container_Library.find("#sel_olibrary_sorting").select2RS("data")[0].id) { case "datedesc": "moduletemplateslides" === RVS.LIB.OBJ.selectedType || "moduleslides" === RVS.LIB.OBJ.selectedType ? RVS.LIB.OBJ.items[RVS.LIB.OBJ.selectedType].sort(function(e, t) { return e.id - t.id }) : RVS.LIB.OBJ.items[RVS.LIB.OBJ.selectedType].sort(function(e, t) { return t.id - e.id }); break; case "title": RVS.LIB.OBJ.items[RVS.LIB.OBJ.selectedType].sort(function(e, t) { return e.title.toUpperCase().localeCompare(t.title.toUpperCase()) }); break; case "titledesc": RVS.LIB.OBJ.items[RVS.LIB.OBJ.selectedType].sort(function(e, t) { return t.title.toUpperCase().localeCompare(e.title.toUpperCase()) }); break; default: RVS.LIB.OBJ.items[RVS.LIB.OBJ.selectedType].sort(function(e, t) { return e.id - t.id }) } RVS.LIB.OBJ.selectedFolder = parseInt(RVS.LIB.OBJ.selectedFolder, 0), RVS.LIB.OBJ.oldlist = RVS.LIB.OBJ.filteredList, RVS.LIB.OBJ.filteredList = []; var t = jQuery("#searchobjects").val().toLowerCase(), i = jQuery("#obj_fil_favorite").hasClass("selected"); for (var r in "modules" === RVS.LIB.OBJ.selectedType && RVS.F.updateParentAttributes(), RVS.LIB.OBJ.items[RVS.LIB.OBJ.selectedType]) if (RVS.LIB.OBJ.items[RVS.LIB.OBJ.selectedType].hasOwnProperty(r)) { var a = RVS.LIB.OBJ.items[RVS.LIB.OBJ.selectedType][r]; a.parent = void 0 === a.parent ? -1 : a.parent; var o = v(a.parent); if (!i || a.favorite) { var n = jQuery.inArray(RVS.LIB.OBJ.selectedFolder, o) >= 0 || jQuery.inArray("" + RVS.LIB.OBJ.selectedFolder, o) >= 0; (t.length > 2 && n && a.title.toLowerCase().indexOf(t) >= 0 && ("all" == RVS.LIB.OBJ.selectedFilter || h({ o: a, filter: RVS.LIB.OBJ.selectedFilter })) || t.length < 3 && RVS.LIB.OBJ.selectedType === a.libraryType && "all" == RVS.LIB.OBJ.selectedFilter && parseInt(a.parent, 0) == RVS.LIB.OBJ.selectedFolder || t.length < 3 && RVS.LIB.OBJ.selectedType === a.libraryType && h({ o: a, filter: RVS.LIB.OBJ.selectedFilter }) && n || "moduletemplateslides" === RVS.LIB.OBJ.selectedType || "moduleslides" === RVS.LIB.OBJ.selectedType) && (i && a.favorite && (-1 == RVS.LIB.OBJ.selectedPackage || a.package_id == RVS.LIB.OBJ.selectedPackage) || "moduletemplates" === RVS.LIB.OBJ.selectedType && (t.length > 2 || -1 == RVS.LIB.OBJ.selectedPackage && (null == a.package_id || "true" == a.package_parent) || -1 !== RVS.LIB.OBJ.selectedPackage && a.package_id == RVS.LIB.OBJ.selectedPackage && "true" != a.package_parent) || ("moduletemplateslides" === RVS.LIB.OBJ.selectedType || "moduleslides" === RVS.LIB.OBJ.selectedType) && RVS.LIB.OBJ.selectedModule == a.parent || "moduletemplates" !== RVS.LIB.OBJ.selectedType && "moduletemplateslides" !== RVS.LIB.OBJ.selectedType && "moduleslides" !== RVS.LIB.OBJ.selectedType) && RVS.LIB.OBJ.filteredList.push(a.id) } }(e.force || JSON.stringify(RVS.LIB.OBJ.oldlist) !== JSON.stringify(RVS.LIB.OBJ.filteredList)) && (RVS.F.buildPagination({ keeppage: e.keeppage, focusItem: e.focusitem }), RVS.F.drawOverview({ noanimation: e.noanimation, focusItem: e.focusItem })), RVS.LIB.OBJ.container_OutputWrap.RSScroll("update") }, RVS.F.drawOverview = function(e) { if (e = void 0 === e ? { noanimation: !1 } : e, RVS.LIB.OBJ.container_Output.find(".rsl_breadcrumb_wrap").remove(), -1 !== RVS.LIB.OBJ.selectedFolder || -1 !== RVS.LIB.OBJ.selectedPackage || -1 !== RVS.LIB.OBJ.selectedModule) { var t = '
    '; t += '
    apps' + RVS_LANG.simproot + "
    ", t += 'keyboard_arrow_right'; var i = ""; if (-1 !== RVS.LIB.OBJ.selectedFolder) { for (var r = RVS.LIB.OBJ.selectedFolder, a = 0; - 1 !== r && 100 !== a;) { var o = "moduleslides" === RVS.LIB.OBJ.selectedType ? "modules" : RVS.LIB.OBJ.selectedType, n = RVS.F.getModuleIndex(r, o); - 1 !== n && "-1" !== n ? (i = '
    folder_open' + RVS.LIB.OBJ.items[o][n].title + '
    keyboard_arrow_right' + i, r = RVS.LIB.OBJ.items[o][n].parent || -1, a++) : (a = 100, RVS.LIB.OBJ.selectedModule = -1, RVS.LIB.OBJ.selectedModuleTitle = "", RVS.LIB.OBJ.selectedModuleType = "", d(), "moduletemplates" === RVS.LIB.OBJ.selectedType && (RVS.LIB.OBJ.selectedPackage = -1), "modules" === RVS.LIB.OBJ.selectedType && (RVS.LIB.OBJ.selectedFolder = -1, RVS.F.resetAllFilters()), RVS.F.updateFilteredList({ force: !0, keeppage: !0, noanimation: !0 })) } t += i } t += -1 !== RVS.LIB.OBJ.selectedPackage ? '
    ' + RVS.LIB.OBJ.selectedPackageTitle + "
    " : '
    ', t += -1 !== RVS.LIB.OBJ.selectedModule ? -1 !== RVS.LIB.OBJ.selectedPackage ? 'keyboard_arrow_right
    ' + RVS.LIB.OBJ.selectedModuleTitle + "
    " : '
    ' + RVS.LIB.OBJ.selectedModuleTitle + "
    " : '
    ', t += "
    ", RVS.LIB.OBJ.container_Output.append(t) } if (void 0 !== RVS.LIB.OBJ.lastSelectedType && RVS.LIB.OBJ.lastSelectedType !== RVS.LIB.OBJ.selectedType) for (var s in RVS.LIB.OBJ.items[RVS.LIB.OBJ.lastSelectedType]) void 0 !== RVS.LIB.OBJ.items[RVS.LIB.OBJ.lastSelectedType][s].ref && RVS.LIB.OBJ.items[RVS.LIB.OBJ.lastSelectedType][s].ref.detach(); for (var s in RVS.LIB.OBJ.lastSelectedType = RVS.LIB.OBJ.selectedType, RVS.LIB.OBJ.selectedPage = void 0 === RVS.LIB.OBJ.selectedPage ? 1 : RVS.LIB.OBJ.selectedPage, RVS.LIB.OBJ.waitForLoad = [], RVS.LIB.OBJ.waitForLoadIndex = 0, RVS.LIB.OBJ.items[RVS.LIB.OBJ.selectedType]) if (RVS.LIB.OBJ.items[RVS.LIB.OBJ.selectedType].hasOwnProperty(s)) { var l = RVS.LIB.OBJ.items[RVS.LIB.OBJ.selectedType][s]; jQuery.inArray(l.id, RVS.LIB.OBJ.pages[RVS.LIB.OBJ.selectedPage - 1]) >= 0 && void 0 === l.ref && (void 0 !== l.img && ("object" == typeof l.img && -1 === l.img.url.indexOf("//") || "object" != typeof l.img && -1 === l.img.indexOf("//")) && RVS.LIB.OBJ.waitForLoad.push({ librarytype: l.libraryType, mediatype: "img", ind: s, id: "object" == typeof l.img ? l.img.url : l.img }), void 0 !== l.video_thumb && ("object" == typeof l.video_thumb && -1 === l.video_thumb.url.indexOf("//") || "object" != typeof l.video_thumb && -1 === l.video_thumb.indexOf("//")) && RVS.LIB.OBJ.waitForLoad.push({ librarytype: l.libraryType, mediatype: "video", ind: s, id: "object" == typeof l.video_thumb ? l.video_thumb.url : l.img })) } RVS.F.loadAllMissingMedia() }, RVS.F.loadAllMissingMedia = function() { if (RVS.LIB.OBJ.waitForLoad.length > 0) { if (RVS.LIB.OBJ.waitForLoadIndex < RVS.LIB.OBJ.waitForLoad.length) { var e = "layers" === RVS.LIB.OBJ.waitForLoad[0].librarytype || "videos" === RVS.LIB.OBJ.waitForLoad[0].librarytype ? Math.round(RVS.LIB.OBJ.waitForLoad.length / 2) : RVS.LIB.OBJ.waitForLoad.length; e = "videos" === RVS.LIB.OBJ.waitForLoad[0].librarytype ? Math.round(RVS.LIB.OBJ.waitForLoad.length / 2) + " " + RVS_LANG.elements + " (" + Math.round(RVS.LIB.OBJ.waitForLoad.length / 2 * 450) / 100 + "MB)" : "layers" === RVS.LIB.OBJ.waitForLoad[0].librarytype ? Math.round(RVS.LIB.OBJ.waitForLoad.length / 2) + " " + RVS_LANG.elements + " (" + Math.round(RVS.LIB.OBJ.waitForLoad.length / 2 * 25) / 100 + "MB)" : Math.round(RVS.LIB.OBJ.waitForLoad.length) + " " + RVS_LANG.elements + " (" + Math.round(1.5 * RVS.LIB.OBJ.waitForLoad.length) / 100 + "MB)", RVS.F.ajaxRequest("load_library_image", RVS.LIB.OBJ.waitForLoad, function(e) { if (e.success) { for (var t in e.data) if (e.data.hasOwnProperty(t)) { var i = e.data[t], r = RVS.LIB.OBJ.items[RVS.LIB.OBJ.selectedType][i.ind]; "img" === i.mediatype && ("object" == typeof r.img ? r.img.url = i.url : r.img = i.url), "video" === i.mediatype && ("object" == typeof r.video_thumb ? r.video_thumb.url = i.url : r.video_thumb = i.url) } RVS.F.finalDrawOfElements() } else console.log("Could Not be loaded. Please try later."), RVS.F.finalDrawOfElements() }, void 0, void 0, RVS_LANG.loadingthumbs + '
    ' + RVS_LANG.loading + " " + e + "") } } else RVS.F.finalDrawOfElements() }, RVS.F.finalDrawOfElements = function() { for (var e in RVS.LIB.OBJ.items[RVS.LIB.OBJ.selectedType]) if (RVS.LIB.OBJ.items[RVS.LIB.OBJ.selectedType].hasOwnProperty(e)) { var t = RVS.LIB.OBJ.items[RVS.LIB.OBJ.selectedType][e]; jQuery.inArray(t.id, RVS.LIB.OBJ.pages[RVS.LIB.OBJ.selectedPage - 1]) >= 0 ? (0, void 0 !== t.ref && t.folder && t.ref.remove(), t.ref = void 0 === t.ref || t.folder ? RVS.F.buildElement(t) : t.ref, t.ref.appendTo(RVS.LIB.OBJ.container_Output)) : void 0 !== t.ref && t.ref.detach() } "moduletemplates" === RVS.LIB.OBJ.selectedType && RVS.F.initOnOff(RVS.LIB.OBJ.container_Output), g() }, RVS.F.buildElement = function(e, t) { var i = '
    '; i += '\t
    ', i += '\t
    ', i += "\t
    ", i += "
    "; var a = jQuery(i), o = a.find(".olibrary_content_wrap"), n = a.find(".olibrary_media_wrap"), s = "", l = "", c = 'check', d = 'close'; switch (e.libraryType) { case "moduletemplates": var p, u = !0, v = !0; if (s = '
    ', s += '\t
    ' + e.title + "
    ", s += "true" == e.package_parent ? '\t
    ' + RVS_LANG.packageBIG + "
    " : '\t
    ' + RVS_LANG.moduleBIG + "
    ", s += '\t", s += "
    ", s += '
    ', s += '\tstar', s += "
    ", l += '
    ', l += '
    ' + e.title + "
    ", l += e.description, l += '
    ', l += '
    ' + RVS_LANG.setupnotes + "
    ", l += e.setup_notes, (void 0 !== e.required || void 0 !== e.plugin_require && null !== e.plugin_require) && (l += '
    ', l += '
    ' + RVS_LANG.requirements + "
    ", void 0 !== e.required && (l += '
    ' + (e.required <= RVS.ENV.revision ? c : d) + "Slider Revolution Version " + e.required + "
    "), e.required > RVS.ENV.revision && (u = !1), void 0 !== e.plugin_require && null !== e.plugin_require)) for (var h in e.plugin_require) e.plugin_require.hasOwnProperty(h) && (l += '
    ' + ("true" == e.plugin_require[h].installed || 1 == e.plugin_require[h].installed ? c : d) + '' + e.plugin_require[h].name + "
    ", "true" !== e.plugin_require[h].installed && !0 !== e.plugin_require[h].installed && (u = !1)); u = !1 !== RVS.ENV.activated && u, "editor" === RVS.LIB.OBJ.context ? "true" == e.package_parent ? a.append('
    folder
    ') : u ? a.append('
    burst_mode
    ') : a.append('
    burst_mode
    ') : "true" == e.package_parent ? a.append('
    addfoldervisibility
    ') : a.append('
    addvisibility
    '), void 0 !== e.package_id && -1 !== e.package_id && (p = function(e) { var t, i = [], r = !0; for (var a in RVS.LIB.OBJ.items.moduletemplates) RVS.LIB.OBJ.items.moduletemplates.hasOwnProperty(a) && RVS.LIB.OBJ.items.moduletemplates[a].package_id === e.packageId && ("true" === RVS.LIB.OBJ.items.moduletemplates[a].package_parent ? t = RVS.LIB.OBJ.items.moduletemplates[a] : i.push({ o: parseInt(RVS.LIB.OBJ.items.moduletemplates[a].package_order, 0), uid: RVS.LIB.OBJ.items.moduletemplates[a].uid })); i.sort(function(e, t) { return e.o - t.o }); var o = []; for (var a in i) void 0 !== i[a] && void 0 !== i[a].uid && o.push(i[a].uid); if (void 0 !== t) for (var n in t.plugin_require) "true" != t.plugin_require[n].installed && (r = !1); return { installable: r, uids: o } }({ packageId: e.package_id }), "true" != e.package_parent && !1 === p.installable && (v = !1)), l += '
    ', l += '
    ' + RVS_LANG.availableversion + "
    ", l += '
    ' + e.version + "
    ", l += '
    '; var g = !1; //track if ("true" != e.package_parent && (RVS.ENV.activated ? l += u ? '
    file_download' + RVS_LANG.installtemplate + "
    " : '
    file_download' + RVS_LANG.installtemplate + "
    " : (g = !0, l += '
    file_download' + RVS_LANG.licencerequired + "
    "), void 0 !== e.package_id && -1 !== e.package_id && (l += '
    ')), void 0 !== e.package_id && -1 !== e.package_id && (RVS.ENV.activated ? l += u && v ? '
    file_download' + RVS_LANG.installpackage + "
    " : '
    file_download' + RVS_LANG.installpackage + "
    " : g || (l += '
    file_download' + RVS_LANG.licencerequired + "
    ")), ("true" != e.package_parent && u || void 0 !== e.package_id && -1 !== e.package_id && u && v) && (l += '
    ', l += '', l += ''), l += "
    ", void 0 !== e.img && "string" === jQuery.type(e.img)) tpGS.gsap.set(n, { backgroundImage: "url(" + e.img + ")", "background-size": "cover", backgroundPosition: "center center" }); else if (void 0 !== e.img && "object" === jQuery.type(e.img)) { var f = void 0 !== e.img.style ? jQuery('
    ') : jQuery('
    '); void 0 !== e.img.url && e.img.url.length > 3 && tpGS.gsap.set(f, { backgroundImage: "url(" + e.img.url + ")" }), n.append(f) } break; case "moduleslides": case "moduletemplateslides": u = !0, v = !0; if (s = '
    ', s += '\t
    ' + e.title + "
    ", s += "true" == e.package_parent ? '\t
    ' + RVS_LANG.packageBIG + "
    " : '\t
    ' + RVS_LANG.moduleBIG + "
    ", "moduletemplateslides" === e.libraryType && (void 0 !== e.required || void 0 !== e.plugin_require && null !== e.plugin_require) && (e.required > RVS.ENV.revision && (u = !1), void 0 !== e.plugin_require && null !== e.plugin_require)) for (var h in e.plugin_require) e.plugin_require.hasOwnProperty(h) && "true" != e.plugin_require[h].installed && u && (u = !1); if ("layers" === RVS.LIB.OBJ.depth) a.append('
    layers
    '), r(e, n); else if (u && (a.append('
    add
    '), s += "moduletemplateslides" === e.libraryType ? '\t" : "", s += "
    "), "moduletemplateslides" === e.libraryType) { if (void 0 !== e.img && "string" === jQuery.type(e.img)) tpGS.gsap.set(n, { backgroundImage: "url(" + e.img + ")", "background-size": "cover", backgroundPosition: "center center" }); else if (void 0 !== e.img && "object" === jQuery.type(e.img)) { f = void 0 !== e.img.style ? jQuery('
    ') : jQuery('
    '); void 0 !== e.img.url && e.img.url.length > 3 && tpGS.gsap.set(f, { backgroundImage: "url(" + e.img.url + ")" }), n.append(f) } } else r(e, n); break; case "svgs": s = '
    ', s += '\t
    ' + e.title + "
    ", s += '\t
    ' + RVS_LANG.iconBIG + "
    ", s += '\t", s += "
    ", s += '
    ', s += '\tstar', s += "
    ", a.append('
    add
    '), void 0 !== e.img && jQuery.get(e.img, function(e) { var t = document.createElement("div"); t.className = "ol_svg_preview", t.innerHTML = (new XMLSerializer).serializeToString(e.documentElement), n.append(t) }), n[0].className += " patternbg"; break; case "fonticons": s = '
    ', s += '\t
    ' + e.title + "
    ", s += '\t
    ' + RVS_LANG.iconBIG + "
    ", s += '\t", s += "
    ", s += '
    ', s += '\tstar', s += "
    ", a.append('
    add
    '); var m = ""; if (void 0 !== e.classextension) for (var b in e.classextension) e.classextension.hasOwnProperty(b) && (m += " " + e.classextension[b]); "MaterialIcons" === e.tags[0] ? n.append('' + e.handle.replace(".", "") + "") : n.append(''), n[0].className += " patternbg"; break; case "modules": let t = !("undefined" == typeof RS_SHORTCODE_FAV || !RS_SHORTCODE_FAV.modules) && RS_SHORTCODE_FAV.modules; if (t) for (let i in t) if (t.hasOwnProperty(i) && t[i] === e.id) { e.favorite = !0; break } if (s = '
    ', s += '\t
    ' + e.title + "
    ", e.folder ? s += '\t
    ' + RVS_LANG.folderBIG + "
    " : s += '\t
    ' + RVS_LANG.moduleBIG + "
    ", e.folder || (s += '\t"), s += "
    ", s += '
    ', s += '\tstar', s += "
    ", e.folder) { a.append('
    folder
    '); for (b = 1; b <= 4; b++) { var S = jQuery('
    '); if (void 0 !== e.children && e.children.length >= b) { var y = RVS.F.getSliderIndex(e.children[b - 1]); - 1 !== y && r(RVS.LIB.OBJ.items[RVS.LIB.OBJ.selectedType][y], S) } n.append(S) } n.addClass("obj_med_darkbg") } else "editor" === RVS.LIB.OBJ.context ? a.append('
    burst_mode
    ') : RVS.LIB.OBJ.shortcode_generator ? a.append('
    add
    ') : a.append('
    addvisibility
    '), r(e, n); break; case "objects": if (s = '
    ', s += '\t
    ' + e.title + "
    ", s += '\t
    ' + RVS_LANG.objectBIG + "
    ", s += '\t", s += "
    ", s += '
    ', s += '\tstar', s += "
    ", !1 === RVS.ENV.activated ? a.append('
    not_interested' + RVS_LANG.licencerequired + "
    ") : a.append('
    '), void 0 !== e.img && "string" === jQuery.type(e.img)) { f = jQuery(''); n.append(f) } else if (void 0 !== e.img && "object" === jQuery.type(e.img)) { f = void 0 !== e.img.style ? jQuery('
    ') : jQuery('
    '); void 0 !== e.img.url && e.img.url.length > 3 && tpGS.gsap.set(f, { backgroundImage: "url(" + e.img.url + ")", backgroundRepeat: "no-repeat", "background-size": "contain", backgroundPosition: "center center" }), n.append(f) } n[0].className += " patternbg"; break; case "images": if (s = '
    ', s += '\t
    ' + e.title + "
    ", s += '\t
    ' + RVS_LANG.imageBIG + "
    ", s += '\t", s += "
    ", s += '
    ', s += '\tstar', s += "
    ", !1 === RVS.ENV.activated ? a.append('
    not_interested' + RVS_LANG.licencerequired + "
    ") : a.append('
    '), void 0 !== e.img && "string" === jQuery.type(e.img)) tpGS.gsap.set(n, { backgroundImage: "url(" + e.img + ")", "background-repeat": "no-repeat", "background-size": "cover", backgroundPosition: "center center", backgroundRepeat: "no-repeat" }); else if (void 0 !== e.img && "object" === jQuery.type(e.img)) { f = void 0 !== e.img.style ? jQuery('
    ') : jQuery('
    '); void 0 !== e.img.url && e.img.url.length > 3 && tpGS.gsap.set(f, { backgroundImage: "url(" + e.img.url + ")" }), n.append(f) } n[0].className += " patternbg"; break; case "videos": if (s = '
    ', s += '\t
    ' + e.title + "
    ", s += '\t
    ' + RVS_LANG.videoBIG + "
    ", s += '\t", s += "
    ", s += '
    ', s += '\tstar', s += "
    ", l += '
    ', l += "
    ", a[0].className += " show_video_on_hover", a[0].dataset.videosource = e.video_thumb.url, !1 === RVS.ENV.activated ? a.append('
    not_interested' + RVS_LANG.licencerequired + "
    ") : a.append('
    add
    '), n[0].dataset.videosource = e.video_thumb.url, void 0 !== e.img && "string" === jQuery.type(e.img)) tpGS.gsap.set(n, { backgroundImage: "url(" + e.img + ")", "background-repeat": "no-repeat", "background-size": "cover", backgroundPosition: "center center" }); else if (void 0 !== e.img && "object" === jQuery.type(e.img)) { f = void 0 !== e.img.style ? jQuery('
    ') : jQuery('
    '); void 0 !== e.img.url && e.img.url.length > 3 && tpGS.gsap.set(f, { backgroundImage: "url(" + e.img.url + ")" }), n.append(f) } break; case "layers": if (e.title = RVS.F.capitaliseAll(e.title.replace(/[_-]/g, " ")), s = '
    ', s += '\t
    ' + e.title + "
    ", s += '\t
    ' + RVS_LANG.layersBIG + "
    ", s += '\t", s += "
    ", s += '
    ', s += '\tstar', s += "
    ", l += '
    ', l += "
    ", a[0].className += " show_video_on_hover", a[0].dataset.videosource = e.video_thumb.url, !1 === RVS.ENV.activated ? a.append('
    not_interested' + RVS_LANG.licencerequired + "
    ") : a.append('
    add
    '), n[0].dataset.videosource = e.video_thumb.url, void 0 !== e.img && "string" === jQuery.type(e.img)) tpGS.gsap.set(n, { backgroundImage: "url(" + e.img + ")", "background-repeat": "no-repeat", "background-size": "cover", backgroundPosition: "center center" }); else if (void 0 !== e.img && "object" === jQuery.type(e.img)) { f = void 0 !== e.img.style ? jQuery('
    ') : jQuery('
    '); void 0 !== e.img.url && e.img.url.length > 3 && tpGS.gsap.set(f, { backgroundImage: "url(" + e.img.url + ")", backgroundSize: "cover" }), n.append(f) } break; default: if (void 0 !== RVS.F["newObjectLibraryItem_" + e.libraryType]) { var R = RVS.F["newObjectLibraryItem_" + e.libraryType](e, a); void 0 !== R.content && (s += R.content), void 0 !== R.infocontent && (l += R.infocontent) } } return "" !== s && o.append(s), "" !== l && a.append(l), a }, RVS.F.changeOLIBToFolder = function(e) { RVS.LIB.OBJ.selectedFolder = e, RVS.F.resetAllFilters(), RVS.F.updateFilteredList({ force: !0, keeppage: !1, noanimation: !1 }) }, RVS.F.buildPagination = function(e) { var t, i, r, a = RVS.F.getCookie("rs6_library_pagination"); if (t = i = r = p(), jQuery("#ol_right").scrollTop(0), e = void 0 === e ? { keeppage: !1 } : e, RVS.LIB.OBJ.maxAmountPerPage !== t) { jQuery("#ol_pagination").select2RS("destroy"), RVS.LIB.OBJ.maxAmountPerPage = t; for (var o = 0; o <= 4; o++) { var n = document.getElementById("olpage_per_page_" + o); n.value = r, n.selected = n.value === a, n.innerHTML = RVS_LANG.show + " " + r + " " + RVS_LANG.perpage, r += i } jQuery("#ol_pagination").select2RS({ minimumResultsForSearch: "Infinity" }) } RVS.LIB.OBJ.items[RVS.LIB.OBJ.selectedType].length < t ? RVS.LIB.OBJ.container_Library.find("#ol_footer").hide() : RVS.LIB.OBJ.container_Library.find("#ol_footer").show(), RVS.LIB.OBJ.selectedPage = e.keeppage && jQuery(".page_button.ol_pagination.selected").length > 0 ? jQuery(".page_button.ol_pagination.selected").data("page") : 1; var s, l = void 0 === RVS.LIB.OBJ.container_Pagination.select2RS("data")[0] ? 4 : RVS.LIB.OBJ.container_Pagination.select2RS("data")[0].id, c = 0; if (RVS.LIB.OBJ.pageAmount = "all" === l || null === parseInt(l, 0) || 0 === parseInt(l, 0) ? 1 : Math.ceil(RVS.LIB.OBJ.filteredList.length / parseInt(l, 0)), RVS.LIB.OBJ.itemPerPage = "all" === l ? 99999 : parseInt(l, 0), RVS.LIB.OBJ.itemPerPage = -1 != RVS.LIB.OBJ.selectedFolder ? RVS.LIB.OBJ.itemPerPage - 1 : RVS.LIB.OBJ.itemPerPage, RVS.LIB.OBJ.container_PaginationWrap[0].innerHTML = "", RVS.LIB.OBJ.selectedPage = RVS.LIB.OBJ.selectedPage > RVS.LIB.OBJ.pageAmount ? RVS.LIB.OBJ.pageAmount : RVS.LIB.OBJ.selectedPage, RVS.LIB.OBJ.pageAmount > 1) for (o = 1; o <= RVS.LIB.OBJ.pageAmount; o++) s = o !== RVS.LIB.OBJ.selectedPage ? "" : "selected", RVS.LIB.OBJ.container_PaginationWrap[0].innerHTML += '
    ' + o + "
    ", 1 === o ? RVS.LIB.OBJ.container_PaginationWrap[0].innerHTML += '
    ...
    ' : o === RVS.LIB.OBJ.pageAmount - 1 && (RVS.LIB.OBJ.container_PaginationWrap[0].innerHTML += '
    ...
    '); for (var d in RVS.LIB.OBJ.pages = [], RVS.LIB.OBJ.pages.push([]), RVS.LIB.OBJ.filteredList) RVS.LIB.OBJ.filteredList.hasOwnProperty(d) && (RVS.LIB.OBJ.pages[RVS.LIB.OBJ.pages.length - 1].push(RVS.LIB.OBJ.filteredList[d]), ++c === RVS.LIB.OBJ.itemPerPage && (c = 0, RVS.LIB.OBJ.pages.push([]))); u() }, RVS.F.buildObjectLibrary = function(t) { var i = '
    '; for (var r in i += '\t', i += '\t
    ', i += '\t\t
    ', i += "\t
    ", i += '\t
    ', i += '\t\t", i += '\t\t
    ', i += ' \t\t\t
    ', i += '\t\t\t
    ', i += "\t\t
    ", i += '\t\t", i += "\t
    ", i += "
    ", RVS.LIB.OBJ.container_Library = jQuery(i), RVS.LIB.OBJ.container_Underlay = RVS.LIB.OBJ.container_Library.find("#ol_right_underlay"), RVS.LIB.OBJ.container_Right = RVS.LIB.OBJ.container_Library.find("#ol_right"), RVS.LIB.OBJ.container_Filters = RVS.LIB.OBJ.container_Library.find("#ol_filters"), RVS.LIB.OBJ.container_Output = RVS.LIB.OBJ.container_Library.find("#ol_results"), RVS.LIB.OBJ.container_OutputWrap = RVS.LIB.OBJ.container_Library.find("#ol_results_wrap"), RVS.LIB.OBJ.container_PaginationWrap = RVS.LIB.OBJ.container_Library.find("#ol_pagination_wrap"), RVS.LIB.OBJ.container_Pagination = RVS.LIB.OBJ.container_Library.find("#ol_pagination"), RVS.LIB.OBJ.container_Sorting = RVS.LIB.OBJ.container_Library.find("#ol_modulessorting"), RVS.LIB.OBJ.types) RVS.LIB.OBJ.types.hasOwnProperty(r) && m({ groupType: r, groupAlias: RVS_LANG["ol_" + r], icon: e[r], count: RVS.LIB.OBJ.types[r].count, tags: RVS.LIB.OBJ.types[r].tags }); jQuery("body").append(RVS.LIB.OBJ.container_Library), jQuery("#sel_olibrary_sorting").select2RS({ minimumResultsForSearch: "Infinity" }), jQuery("#ol_pagination").select2RS({ minimumResultsForSearch: "Infinity" }), g() }, RVS.F.buildLayerListToSelect = function(e) { var t = '
    ', i = { root: "" }; for (var r in e) e.hasOwnProperty(r) && "zone" !== e[r].type && (e[r] = jQuery.extend(!0, RVS.F.addLayerObj(e[r].type, void 0, !0), e[r]), void 0 !== e[r].group && "row" !== e[r].type && "group" !== e[r].type && "column" !== e[r].type && (-1 == e[r].group.puid ? i.root += o(e[r], 0) : (i[e[r].group.puid] = null == i[e[r].group.puid] ? "" : i[e[r].group.puid], i[e[r].group.puid] += o(e[r], "column" == e[e[r].group.puid].type ? 2 : 1)))); for (var r in e) e.hasOwnProperty(r) && "column" === e[r].type && (i[e[r].group.puid] = null == i[e[r].group.puid] ? "" : i[e[r].group.puid], i[e[r].group.puid] += '
    ', i[e[r].group.puid] += o(e[r], 1), i[e[r].group.puid] += '
    ', void 0 !== i[e[r].uid] && (i[e[r].group.puid] += i[e[r].uid]), i[e[r].group.puid] += "\t
    ", i[e[r].group.puid] += "
    "); for (var r in e) e.hasOwnProperty(r) && ("row" !== e[r].type && "group" !== e[r].type || (t += '
    ', t += o(e[r], 0), t += '\t
    ', void 0 !== i[e[r].uid] && (t += i[e[r].uid]), t += "\t
    ", t += "
    ")); return t += i.root, t += "
    " }, RVS.F.layerImportList = function() { jQuery("#rb_modal_underlay").appendTo("body"), void 0 !== RVS.LIB.OBJ.import && void 0 !== RVS.LIB.OBJ.import.basics || (jQuery('.rb-modal-wrapper[data-modal="rbm_layerimport"]').appendTo("body"), RVS.LIB.OBJ.import = { container: jQuery("#rbm_layerimport_list"), basics: !0 }, RVS.DOC.on("click", "#rbm_layerimport .rbm_close", function() { jQuery("#rb_modal_underlay").appendTo("#slider_settings"), RVS.F.RSDialog.close() }), RVS.DOC.on("click", ".layimpli_element", function() { jQuery(this).toggleClass("selected"), function(e) { if ("column" === e.dataset.type || "row" === e.dataset.type || "group" === e.dataset.type) { var t = e.parentNode.getElementsByClassName("layimpli_element"); if (e.className.indexOf("selected") >= 0) for (let e in t) t.hasOwnProperty(e) && void 0 !== t[e].className && -1 == t[e].className.indexOf("selected") && (t[e].className += " selected"); else for (let e in t) t.hasOwnProperty(e) && t[e].className && (t[e].className = t[e].className.replace("selected", "")) } if (-1 != e.dataset.puid && e.className.indexOf("selected") >= 0) { var i = RVS.LIB.OBJ.items.moduleslides[RVS.LIB.OBJ.selectedSlideId].layers; jQuery("#layi_" + e.dataset.puid).addClass("selected"), void 0 !== i[e.dataset.puid] && "column" === i[e.dataset.puid].type && jQuery("#layi_" + i[e.dataset.puid].group.puid).addClass("selected") } for (var r in RVS.LIB.OBJ.import.layers) if (void 0 !== RVS.LIB.OBJ.import.layers[r].className && "row" == RVS.LIB.OBJ.import.layers[r].dataset.type && RVS.LIB.OBJ.import.layers[r].className.indexOf("selected") >= 0) { t = RVS.LIB.OBJ.import.layers[r].parentNode.getElementsByClassName("layimpli_element layimpli_level_1"); for (let e in t) t.hasOwnProperty(e) && void 0 !== t[e].className && -1 == t[e].className.indexOf("selected") && (t[e].className += " selected") } }(this), function() { for (var e in RVS.LIB.OBJ.import.toImport = [], RVS.LIB.OBJ.import.layers) { if (!RVS.LIB.OBJ.import.layers.hasOwnProperty(e)) continue; let t = RVS.LIB.OBJ.import.layers[e].dataset; void 0 !== RVS.LIB.OBJ.import.layers[e] && void 0 !== RVS.LIB.OBJ.import.layers[e].className && (RVS.LIB.OBJ.import.layers[e].className.indexOf("selected") >= 0 ? (RVS.LIB.OBJ.import.toImport.push(t.uid), RVS.LIB.OBJ.import.layers[e].getElementsByClassName("layimpli_icon_checbox")[0].innerHTML = "check_circle_outline") : RVS.LIB.OBJ.import.layers[e].getElementsByClassName("layimpli_icon_checbox")[0].innerHTML = "radio_button_unchecked") } jQuery("#layers_import_feedback").html(RVS.LIB.OBJ.import.toImport.length > 0 ? RVS.LIB.OBJ.import.toImport.length + " " + RVS_LANG.nrlayersimporting : RVS_LANG.nothingselected) }() }), RVS.DOC.on("click", "#layers_import_from_slides_button", function() { RVS.F.showWaitAMinute({ fadeIn: 100, text: RVS_LANG.importinglayers }), setTimeout(RVS.F.importSelectedLayers, 200) })), RVS.LIB.OBJ.import.container[0].innerHTML = RVS.F.buildLayerListToSelect(RVS.LIB.OBJ.items.moduleslides[RVS.LIB.OBJ.selectedSlideId].layers), RVS.LIB.OBJ.import.container.RSScroll({ suppressScrollX: !0 }), RVS.LIB.OBJ.import.layers = RVS.LIB.OBJ.import.container[0].getElementsByClassName("layimpli_element"), RVS.F.RSDialog.create({ modalid: "rbm_layerimport", bgopacity: .85 }) }, RVS.F.resetAllFilters = function() { RVS.LIB.OBJ.selectedPage = 1, jQuery("#sel_olibrary_sorting").val("datedesc").trigger("change.select2RS"), RVS.DOC.trigger("updateObjectLibraryOverview", { val: "datedesc", eventparam: "#reset_objsorting", ignoreRebuild: !0, ignoreCookie: !0 }) }, RVS.F.closeObjectLibrary = function() { d(), RVS.LIB.OBJ.moduleInFocus = !1, tpGS.gsap.fromTo(RVS.LIB.OBJ.container_Library, .7, { autoAlpha: 1, display: "block", scale: 1 }, { scale: .8, autoAlpha: 0, display: "none", ease: "power3.inOut" }), tpGS.gsap.fromTo("#ol_header, #ol_footer", .5, { autoAlpha: 1 }, { autoAlpha: 0, ease: "power3.inOut" }), RVS.LIB.OBJ.open = !1 }, RVS.F.getSliderIndex = function(e) { var t = -1; for (var i in RVS.LIB.OBJ.items[RVS.LIB.OBJ.selectedType]) RVS.LIB.OBJ.items[RVS.LIB.OBJ.selectedType].hasOwnProperty(i) && RVS.LIB.OBJ.items[RVS.LIB.OBJ.selectedType][i].id == e && (t = i); return t }, RVS.F.getModuleIndex = function(e, t) { var i = -1; for (var r in RVS.LIB.OBJ.items[t]) RVS.LIB.OBJ.items[t].hasOwnProperty(r) && RVS.LIB.OBJ.items[t][r].id == e && (i = r); return i } }();