PageSourceSearch

https://lofficieluk.com/format/header.js

js lofficieluk.com collected 2026-10-06 13:17:37 UTC 1,359,295 bytes, 233 lines download raw bytes

1!function (e, t) { "use strict"; "object" == typeof module && "object" == typeof module.exports ? module.exports = e.document ? t(e, !0) : function (e) { if (!e.document) throw new Error("jQuery requires a window with a document"); return t(e) } : t(e) }("undefined" != typeof window ? window : this, function (e, t) {
2    "use strict"; function n(e, t) { t = t || te; var n = t.createElement("script"); n.text = e, t.head.appendChild(n).parentNode.removeChild(n) } function i(e) { var t = !!e && "length" in e && e.length, n = fe.type(e); return "function" === n || fe.isWindow(e) ? !1 : "array" === n || 0 === t || "number" == typeof t && t > 0 && t - 1 in e } function o(e, t, n) { return fe.isFunction(t) ? fe.grep(e, function (e, i) { return !!t.call(e, i, e) !== n }) : t.nodeType ? fe.grep(e, function (e) { return e === t !== n }) : "string" != typeof t ? fe.grep(e, function (e) { return se.call(t, e) > -1 !== n }) : Ie.test(t) ? fe.filter(t, e, n) : (t = fe.filter(t, e), fe.grep(e, function (e) { return se.call(t, e) > -1 !== n && 1 === e.nodeType })) } function r(e, t) { for (; (e = e[t]) && 1 !== e.nodeType;); return e } function s(e) { var t = {}; return fe.each(e.match(xe) || [], function (e, n) { t[n] = !0 }), t } function a(e) { return e } function l(e) { throw e } function c(e, t, n) { var i; try { e && fe.isFunction(i = e.promise) ? i.call(e).done(t).fail(n) : e && fe.isFunction(i = e.then) ? i.call(e, t, n) : t.call(void 0, e) } catch (e) { n.call(void 0, e) } } function d() { te.removeEventListener("DOMContentLoaded", d), e.removeEventListener("load", d), fe.ready() } function u() { this.expando = fe.expando + u.uid++ } function h(e) { return "true" === e ? !0 : "false" === e ? !1 : "null" === e ? null : e === +e + "" ? +e : Pe.test(e) ? JSON.parse(e) : e } function p(e, t, n) { var i; if (void 0 === n && 1 === e.nodeType) if (i = "data-" + t.replace(Fe, "-$&").toLowerCase(), n = e.getAttribute(i), "string" == typeof n) { try { n = h(n) } catch (o) { } Le.set(e, t, n) } else n = void 0; return n } function f(e, t, n, i) { var o, r = 1, s = 20, a = i ? function () { return i.cur() } : function () { return fe.css(e, t, "") }, l = a(), c = n && n[3] || (fe.cssNumber[t] ? "" : "px"), d = (fe.cssNumber[t] || "px" !== c && +l) && Me.exec(fe.css(e, t)); if (d && d[3] !== c) { c = c || d[3], n = n || [], d = +l || 1; do r = r || ".5", d /= r, fe.style(e, t, d + c); while (r !== (r = a() / l) && 1 !== r && --s) } return n && (d = +d || +l || 0, o = n[1] ? d + (n[1] + 1) * n[2] : +n[2], i && (i.unit = c, i.start = d, i.end = o)), o } function m(e) { var t, n = e.ownerDocument, i = e.nodeName, o = ze[i]; return o ? o : (t = n.body.appendChild(n.createElement(i)), o = fe.css(t, "dis
2play"), t.parentNode.removeChild(t), "none" === o && (o = "block"), ze[i] = o, o) } function g(e, t) { for (var n, i, o = [], r = 0, s = e.length; s > r; r++)i = e[r], i.style && (n = i.style.display, t ? ("none" === n && (o[r] = $e.get(i, "display") || null, o[r] || (i.style.display = "")), "" === i.style.display && qe(i) && (o[r] = m(i))) : "none" !== n && (o[r] = "none", $e.set(i, "display", n))); for (r = 0; s > r; r++)null != o[r] && (e[r].style.display = o[r]); return e } function v(e, t) { var n; return n = "undefined" != typeof e.getElementsByTagName ? e.getElementsByTagName(t || "*") : "undefined" != typeof e.querySelectorAll ? e.querySelectorAll(t || "*") : [], void 0 === t || t && fe.nodeName(e, t) ? fe.merge([e], n) : n } function E(e, t) { for (var n = 0, i = e.length; i > n; n++)$e.set(e[n], "globalEval", !t || $e.get(t[n], "globalEval")) } function T(e, t, n, i, o) { for (var r, s, a, l, c, d, u = t.createDocumentFragment(), h = [], p = 0, f = e.length; f > p; p++)if (r = e[p], r || 0 === r) if ("object" === fe.type(r)) fe.merge(h, r.nodeType ? [r] : r); else if (Xe.test(r)) { for (s = s || u.appendChild(t.createElement("div")), a = (We.exec(r) || ["", ""])[1].toLowerCase(), l = Ge[a] || Ge._default, s.innerHTML = l[1] + fe.htmlPrefilter(r) + l[2], d = l[0]; d--;)s = s.lastChild; fe.merge(h, s.childNodes), s = u.firstChild, s.textContent = "" } else h.push(t.createTextNode(r)); for (u.textContent = "", p = 0; r = h[p++];)if (i && fe.inArray(r, i) > -1) o && o.push(r); else if (c = fe.contains(r.ownerDocument, r), s = v(u.appendChild(r), "script"), c && E(s), n) for (d = 0; r = s[d++];)Ve.test(r.type || "") && n.push(r); return u } function y() { return !0 } function b() { return !1 } function C() { try { return te.activeElement } catch (e) { } } function _(e, t, n, i, o, r) { var s, a; if ("object" == typeof t) { "string" != typeof n && (i = i || n, n = void 0); for (a in t) _(e, a, n, i, t[a], r); return e } if (null == i && null == o ? (o = n, i = n = void 0) : null == o && ("string" == typeof n ? (o = i, i = void 0) : (o = i, i = n, n = void 0)), o === !1) o = b; else if (!o) return e; return 1 === r && (s = o, o = function (e) { return fe().off(e), s.apply(this, arguments) }, o.guid = s.guid || (s.guid = fe.guid++)), e.each(function () { fe.event.add(this, t, o, i, n) }) } function I(e, t) { return fe.nodeName(e, "table") && fe.nodeName(11 !== t.nodeType ? t : t.firstChild, "tr") ? e.getElementsByTagName("tbody")[0] || e : e } function O(e) { return e.type = (null !== e.getAttribute("type")) + "/" + e.type, e } function D(e) { var t = it.exec(e.type); return t ? e.type = t[1] : e.removeAttribute("type"), e } function R(e, t) { var n, i, o, r, s, a, l, c; if (1 === t.nodeType) { if ($e.hasData(e) && (r = $e.access(e), s = $e.set(t, r), c = r.events)) { delete s.handle, s.events = {}; for (o in c) for (n = 0, i = c[o].length; i > n; n++)fe.event.add(t, o, c[o][n]) } Le.hasData(e) && (a = Le.access(e), l = fe.extend({}, a), Le.set(t, l)) } } function k(e, t) { var n = t.nodeName.toLowerCase(); "input" === n && Ue.test(e.type) ? t.checked = e.checked : "input" !== n && "textarea" !== n || (t.defaultValue = e.defaultValue) } function w(e, t, i, o) { t = oe.apply([], t); var r, s, a, l, c, d, u = 0, h = e.length, p = h - 1, f = t[0], m = fe.isFunction(f); if (m || h > 1 && "string" == typeof f && !he.checkClone && nt.test(f)) return e.each(function (n) { var r = e.eq(n); m && (t[0] = f.call(this, n, r.html())), w(r, t, i, o) }); if (h && (r = T(t, e[0].ownerDocument, !1, e, o), s = r.firstChild, 1 === r.childNodes.length && (r = s), s || o)) { for (a = fe.map(v(r, "script"), O), l = a.length; h > u; u++)c = r, u !== p && (c = fe.clone(c, !0, !0), l && fe.merge(a, v(c, "script"))), i.call(e[u], c, u); if (l) for (d = a[a.length - 1].ownerDocument, fe.map(a, D), u = 0; l > u; u++)c = a[u], Ve.test(c.type || "") && !$e.access(c, "globalEval") && fe.contains(d, c) && (c.src ? fe._evalUrl && fe._evalUrl(c.src) : n(c.textContent.replace(ot, ""), d)) } return e } function x(e, t, n) { for (var i, o = t ? fe.filter(t, e) : e, r = 0; null != (i = o[r]); r++)n || 1 !== i.nodeType || fe.cleanData(v(i)), i.parentNode && (n && fe.contains(i.ownerDocument, i) && E(v(i, "script")), i.parentNode.removeChild(i)); return e } function K(e, t, n) { var i, o, r, s, a = e.style; return n = n || at(e), n && (s = n.getPropertyValue(t) || n[t], "" 
vendor: 7,983 bytes, line 2
2!== s || fe.contains(e.ownerDocument, e) || (s = fe.style(e, t)), !he.pixelMarginRight() && st.test(s) && rt.test(t) && (i = a.width, o = a.minWidth, r = a.maxWidth, a.minWidth = a.maxWidth = a.width = s, s = n.width, a.width = i, a.minWidth = o, a.maxWidth = r)), void 0 !== s ? s + "" : s } function S(e, t) { return { get: function () { return e() ? void delete this.get : (this.get = t).apply(this, arguments) } } } function N(e) { if (e in ht) return e; for (var t = e[0].toUpperCase() + e.slice(1), n = ut.length; n--;)if (e = ut[n] + t, e in ht) return e } function A(e, t, n) { var i = Me.exec(t); return i ? Math.max(0, i[2] - (n || 0)) + (i[3] || "px") : t } function $(e, t, n, i, o) { var r, s = 0; for (r = n === (i ? "border" : "content") ? 4 : "width" === t ? 1 : 0; 4 > r; r += 2)"margin" === n && (s += fe.css(e, n + He[r], !0, o)), i ? ("content" === n && (s -= fe.css(e, "padding" + He[r], !0, o)), "margin" !== n && (s -= fe.css(e, "border" + He[r] + "Width", !0, o))) : (s += fe.css(e, "padding" + He[r], !0, o), "padding" !== n && (s += fe.css(e, "border" + He[r] + "Width", !0, o))); return s } function L(e, t, n) { var i, o = !0, r = at(e), s = "border-box" === fe.css(e, "boxSizing", !1, r); if (e.getClientRects().length && (i = e.getBoundingClientRect()[t]), 0 >= i || null == i) { if (i = K(e, t, r), (0 > i || null == i) && (i = e.style[t]), st.test(i)) return i; o = s && (he.boxSizingReliable() || i === e.style[t]), i = parseFloat(i) || 0 } return i + $(e, t, n || (s ? "border" : "content"), o, r) + "px" } function P(e, t, n, i, o) { return new P.prototype.init(e, t, n, i, o) } function F() { ft && (e.requestAnimationFrame(F), fe.fx.tick()) } function B() { return e.setTimeout(function () { pt = void 0 }), pt = fe.now() } function M(e, t) { var n, i = 0, o = { height: e }; for (t = t ? 1 : 0; 4 > i; i += 2 - t)n = He[i], o["margin" + n] = o["padding" + n] = e; return t && (o.opacity = o.width = e), o } function H(e, t, n) { for (var i, o = (z.tweeners[t] || []).concat(z.tweeners["*"]), r = 0, s = o.length; s > r; r++)if (i = o[r].call(n, t, e)) return i } function q(e, t, n) { var i, o, r, s, a, l, c, d, u = "width" in t || "height" in t, h = this, p = {}, f = e.style, m = e.nodeType && qe(e), v = $e.get(e, "fxshow"); n.queue || (s = fe._queueHooks(e, "fx"), null == s.unqueued && (s.unqueued = 0, a = s.empty.fire, s.empty.fire = function () { s.unqueued || a() }), s.unqueued++, h.always(function () { h.always(function () { s.unqueued--, fe.queue(e, "fx").length || s.empty.fire() }) })); for (i in t) if (o = t[i], mt.test(o)) { if (delete t[i], r = r || "toggle" === o, o === (m ? "hide" : "show")) { if ("show" !== o || !v || void 0 === v[i]) continue; m = !0 } p[i] = v && v[i] || fe.style(e, i) } if (l = !fe.isEmptyObject(t), l || !fe.isEmptyObject(p)) { u && 1 === e.nodeType && (n.overflow = [f.overflow, f.overflowX, f.overflowY], c = v && v.display, null == c && (c = $e.get(e, "display")), d = fe.css(e, "display"), "none" === d && (c ? d = c : (g([e], !0), c = e.style.display || c, d = fe.css(e, "display"), g([e]))), ("inline" === d || "inline-block" === d && null != c) && "none" === fe.css(e, "float") && (l || (h.done(function () { f.display = c }), null == c && (d = f.display, c = "none" === d ? "" : d)), f.display = "inline-block")), n.overflow && (f.overflow = "hidden", h.always(function () { f.overflow = n.overflow[0], f.overflowX = n.overflow[1], f.overflowY = n.overflow[2] })), l = !1; for (i in p) l || (v ? "hidden" in v && (m = v.hidden) : v = $e.access(e, "fxshow", { display: c }), r && (v.hidden = !m), m && g([e], !0), h.done(function () { m || g([e]), $e.remove(e, "fxshow"); for (i in p) fe.style(e, i, p[i]) })), l = H(m ? v[i] : 0, i, h), i in v || (v[i] = l.start, m && (l.end = l.start, l.start = 0)) } } function j(e, t) { var n, i, o, r, s; for (n in e) if (i = fe.camelCase(n), o = t[i], r = e[n], fe.isArray(r) && (o = r[1], r = e[n] = r[0]), n !== i && (e[i] = r, delete e[n]), s = fe.cssHooks[i], s && "expand" in s) { r = s.expand(r), delete e[i]; for (n in r) n in e || (e[n] = r[n], t[n] = o) } else t[i] = o } function z(e, t, n) { var i, o, r = 0, s = z.prefilters.length, a = fe.Deferred().always(function () { delete l.elem }), l = function () { if (o) return !1; for (var t = pt || B(), n = Math.max(0, c.startTime + c.duration - t), i = n / c.duration || 0, r = 1 - i, s = 0, l = c.tweens.length; l > s; s++)c.tweens[s].run(r); return a.notifyWith(e, [c, r, n]), 1 > r && l ? n : (a.resolveWith(e, [c]), !1) }, c = a.promise({ elem: e, props: fe.extend({}, t), opts: fe.extend(!0, { specialEasing: {}, easing: fe.easing._default }, n), originalProperties: t, originalOptions: n, startTime: pt || B(), duration: n.duration, tweens: [], createTween: function (t, n) { var i = fe.Tween(e, c.opts, t, n, c.opts.specialEasing[t] || c.opts.easing); return c.tweens.push(i), i }, stop: function (t) { var n = 0, i = t ? c.tweens.length : 0; if (o) return this; for (o = !0; i > n; n++)c.tweens[n].run(1); return t ? (a.notifyWith(e, [c, 1, 0]), a.resolveWith(e, [c, t])) : a.rejectWith(e, [c, t]), this } }), d = c.props; for (j(d, c.opts.specialEasing); s > r; r++)if (i = z.prefilters[r].call(c, e, d, c.opts)) return fe.isFunction(i.stop) && (fe._queueHooks(c.elem, c.opts.queue).stop = fe.proxy(i.stop, i)), i; return fe.map(d, H, c), fe.isFunction(c.opts.start) && c.opts.start.call(e, c), fe.fx.timer(fe.extend(l, { elem: e, anim: c, queue: c.opts.queue })), c.progress(c.opts.progress).done(c.opts.done, c.opts.complete).fail(c.opts.fail).always(c.opts.always) } function U(e) { var t = e.match(xe) || []; return t.join(" ") } function W(e) { return e.getAttribute && e.getAttribute("class") || "" } function V(e, t, n, i) { var o; if (fe.isArray(t)) fe.each(t, function (t, o) { n || Dt.test(e) ? i(e, o) : V(e + "[" + ("object" == typeof o && null != o ? t : "") + "]", o, n, i) }); else if (n || "object" !== fe.type(t)) i(e, t); else for (o in t) V(e + "[" + o + "]", t[o], n, i) } function G(e) { return function (t, n) { "string" != typeof t && (n = t, t = "*"); var i, o = 0, r = t.toLowerCase().match(xe) || []; if (fe.isFunction(n)) for (; i = r[o++];)"+" === i[0] ? (i = i.slice(1) || "*", (e[i] = e[i] || []).unshift(n)) : (e[i] = e[i] || []).push(n) } } function X(e, t, n, i) { function o(a) { var l; return r[a] = !0, fe.each(e[a] || [], function (e, a) { var c = a(t, n, i); return "string" != typeof c || s || r[c] ? s ? !(l = c) : void 0 : (t.dataTypes.unshift(c), o(c), !1) }), l } var r = {}, s = e === Ft; return o(t.dataTypes[0]) || !r["*"] && o("*") } function Y(e, t) { var n, i, o = fe.ajaxSettings.flatOptions || {}; for (n in t) void 0 !== t[n] && ((o[n] ? e : i || (i = {}))[n] = t[n]); return i && fe.extend(!0, e, i), e } function Z(e, t, n) { for (var i, o, r, s, a = e.contents, l = e.dataTypes; "*" === l[0];)l.shift(), void 0 === i && (i = e.mimeType || t.getResponseHeader("Content-Type")); if (i) for (o in a) if (a[o] && a[o].test(i)) { l.unshift(o); break } if (l[0] in n) r = l[0]; else { for (o in n) { if (!l[0] || e.converters[o + " " + l[0]]) { r = o; break } s || (s = o) } r = r || s } return r ? (r !== l[0] && l.unshift(r), n[r]) : void 0 } function Q(e, t, n, i) { var o, r, s, a, l, c = {}, d = e.dataTypes.slice(); if (d[1]) for (s in e.converters) c[s.toLowerCase()] = e.converters[s]; for (r = d.shift(); r;)if (e.responseFields[r] && (n[e.responseFields[r]] = t), !l && i && e.dataFilter && (t = e.dataFilter(t, e.dataType)), l = r, r = d.shift()) if ("*" === r) r = l; else if ("*" !== l && l !== r) { if (s = c[l + " " + r] || c["* " + r], !s) for (o in c) if (a = o.split(" "), a[1] === r && (s = c[l + " " + a[0]] || c["* " + a[0]])) { s === !0 ? s = c[o] : c[o] !== !0 && (r = a[0], d.unshift(a[1])); break } if (s !== !0) if (s && e["throws"]) t = s(t); else try { t = s(t) } catch (u) { return { state: "parsererror", error: s ? u : "No conversion from " + l + " to " + r } } } return { state: "success", data: t } }
vendor: 4,510 bytes, line 2
2 function J(e) { return fe.isWindow(e) ? e : 9 === e.nodeType && e.defaultView } var ee = [], te = e.document, ne = Object.getPrototypeOf, ie = ee.slice, oe = ee.concat, re = ee.push, se = ee.indexOf, ae = {}, le = ae.toString, ce = ae.hasOwnProperty, de = ce.toString, ue = de.call(Object), he = {}, pe = "3.1.1", fe = function (e, t) { return new fe.fn.init(e, t) }, me = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ge = /^-ms-/, ve = /-([a-z])/g, Ee = function (e, t) { return t.toUpperCase() }; fe.fn = fe.prototype = { jquery: pe, constructor: fe, length: 0, toArray: function () { return ie.call(this) }, get: function (e) { return null == e ? ie.call(this) : 0 > e ? this[e + this.length] : this[e] }, pushStack: function (e) { var t = fe.merge(this.constructor(), e); return t.prevObject = this, t }, each: function (e) { return fe.each(this, e) }, map: function (e) { return this.pushStack(fe.map(this, function (t, n) { return e.call(t, n, t) })) }, slice: function () { return this.pushStack(ie.apply(this, arguments)) }, first: function () { return this.eq(0) }, last: function () { return this.eq(-1) }, eq: function (e) { var t = this.length, n = +e + (0 > e ? t : 0); return this.pushStack(n >= 0 && t > n ? [this[n]] : []) }, end: function () { return this.prevObject || this.constructor() }, push: re, sort: ee.sort, splice: ee.splice }, fe.extend = fe.fn.extend = function () { var e, t, n, i, o, r, s = arguments[0] || {}, a = 1, l = arguments.length, c = !1; for ("boolean" == typeof s && (c = s, s = arguments[a] || {}, a++), "object" == typeof s || fe.isFunction(s) || (s = {}), a === l && (s = this, a--); l > a; a++)if (null != (e = arguments[a])) for (t in e) n = s[t], i = e[t], s !== i && (c && i && (fe.isPlainObject(i) || (o = fe.isArray(i))) ? (o ? (o = !1, r = n && fe.isArray(n) ? n : []) : r = n && fe.isPlainObject(n) ? n : {}, s[t] = fe.extend(c, r, i)) : void 0 !== i && (s[t] = i)); return s }, fe.extend({ expando: "jQuery" + (pe + Math.random()).replace(/\D/g, ""), isReady: !0, error: function (e) { throw new Error(e) }, noop: function () { }, isFunction: function (e) { return "function" === fe.type(e) }, isArray: Array.isArray, isWindow: function (e) { return null != e && e === e.window }, isNumeric: function (e) { var t = fe.type(e); return ("number" === t || "string" === t) && !isNaN(e - parseFloat(e)) }, isPlainObject: function (e) { var t, n; return e && "[object Object]" === le.call(e) ? (t = ne(e)) ? (n = ce.call(t, "constructor") && t.constructor, "function" == typeof n && de.call(n) === ue) : !0 : !1 }, isEmptyObject: function (e) { var t; for (t in e) return !1; return !0 }, type: function (e) { return null == e ? e + "" : "object" == typeof e || "function" == typeof e ? ae[le.call(e)] || "object" : typeof e }, globalEval: function (e) { n(e) }, camelCase: function (e) { return e.replace(ge, "ms-").replace(ve, Ee) }, nodeName: function (e, t) { return e.nodeName && e.nodeName.toLowerCase() === t.toLowerCase() }, each: function (e, t) { var n, o = 0; if (i(e)) for (n = e.length; n > o && t.call(e[o], o, e[o]) !== !1; o++); else for (o in e) if (t.call(e[o], o, e[o]) === !1) break; return e }, trim: function (e) { return null == e ? "" : (e + "").replace(me, "") }, makeArray: function (e, t) { var n = t || []; return null != e && (i(Object(e)) ? fe.merge(n, "string" == typeof e ? [e] : e) : re.call(n, e)), n }, inArray: function (e, t, n) { return null == t ? -1 : se.call(t, e, n) }, merge: function (e, t) { for (var n = +t.length, i = 0, o = e.length; n > i; i++)e[o++] = t[i]; return e.length = o, e }, grep: function (e, t, n) { for (var i, o = [], r = 0, s = e.length, a = !n; s > r; r++)i = !t(e[r], r), i !== a && o.push(e[r]); return o }, map: function (e, t, n) { var o, r, s = 0, a = []; if (i(e)) for (o = e.length; o > s; s++)r = t(e[s], s, n), null != r && a.push(r); else for (s in e) r = t(e[s], s, n), null != r && a.push(r); return oe.apply([], a) }, guid: 1, proxy: function (e, t) { var n, i, o; return "string" == typeof t && (n = e[t], t = e, e = n), fe.isFunction(e) ? (i = ie.call(arguments, 2), o = function () { return e.apply(t || this, i.concat(ie.call(arguments))) }, o.guid = e.guid = e.guid || fe.guid++, o) : void 0 }, now: Date.now, support: he }), "function" == typeof Symbol && (fe.fn[Symbol.iterator] = ee[Symbol.iterator]), fe.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "), function (e, t) { ae["[object " + t + "]"] = t.toLowerCase() }); var Te = function (e) {
vendor: 14,908 bytes, line 3
3        function t(e, t, n, i) { var o, r, s, a, l, c, d, h = t && t.ownerDocument, f = t ? t.nodeType : 9; if (n = n || [], "string" != typeof e || !e || 1 !== f && 9 !== f && 11 !== f) return n; if (!i && ((t ? t.ownerDocument || t : H) !== N && S(t), t = t || N, $)) { if (11 !== f && (l = ve.exec(e))) if (o = l[1]) { if (9 === f) { if (!(s = t.getElementById(o))) return n; if (s.id === o) return n.push(s), n } else if (h && (s = h.getElementById(o)) && B(t, s) && s.id === o) return n.push(s), n } else { if (l[2]) return Q.apply(n, t.getElementsByTagName(e)), n; if ((o = l[3]) && C.getElementsByClassName && t.getElementsByClassName) return Q.apply(n, t.getElementsByClassName(o)), n } if (C.qsa && !W[e + " "] && (!L || !L.test(e))) { if (1 !== f) h = t, d = e; else if ("object" !== t.nodeName.toLowerCase()) { for ((a = t.getAttribute("id")) ? a = a.replace(be, Ce) : t.setAttribute("id", a = M), c = D(e), r = c.length; r--;)c[r] = "#" + a + " " + p(c[r]); d = c.join(","), h = Ee.test(e) && u(t.parentNode) || t } if (d) try { return Q.apply(n, h.querySelectorAll(d)), n } catch (m) { } finally { a === M && t.removeAttribute("id") } } } return k(e.replace(ae, "$1"), t, n, i) } function n() { function e(n, i) { return t.push(n + " ") > _.cacheLength && delete e[t.shift()], e[n + " "] = i } var t = []; return e } function i(e) { return e[M] = !0, e } function o(e) { var t = N.createElement("fieldset"); try { return !!e(t) } catch (n) { return !1 } finally { t.parentNode && t.parentNode.removeChild(t), t = null } } function r(e, t) { for (var n = e.split("|"), i = n.length; i--;)_.attrHandle[n[i]] = t } function s(e, t) { var n = t && e, i = n && 1 === e.nodeType && 1 === t.nodeType && e.sourceIndex - t.sourceIndex; if (i) return i; if (n) for (; n = n.nextSibling;)if (n === t) return -1; return e ? 1 : -1 } function a(e) { return function (t) { var n = t.nodeName.toLowerCase(); return "input" === n && t.type === e } } function l(e) { return function (t) { var n = t.nodeName.toLowerCase(); return ("input" === n || "button" === n) && t.type === e } } function c(e) { return function (t) { return "form" in t ? t.parentNode && t.disabled === !1 ? "label" in t ? "label" in t.parentNode ? t.parentNode.disabled === e : t.disabled === e : t.isDisabled === e || t.isDisabled !== !e && Ie(t) === e : t.disabled === e : "label" in t ? t.disabled === e : !1 } } function d(e) { return i(function (t) { return t = +t, i(function (n, i) { for (var o, r = e([], n.length, t), s = r.length; s--;)n[o = r[s]] && (n[o] = !(i[o] = n[o])) }) }) } function u(e) { return e && "undefined" != typeof e.getElementsByTagName && e } function h() { } function p(e) { for (var t = 0, n = e.length, i = ""; n > t; t++)i += e[t].value; return i } function f(e, t, n) { var i = t.dir, o = t.next, r = o || i, s = n && "parentNode" === r, a = j++; return t.first ? function (t, n, o) { for (; t = t[i];)if (1 === t.nodeType || s) return e(t, n, o); return !1 } : function (t, n, l) { var c, d, u, h = [q, a]; if (l) { for (; t = t[i];)if ((1 === t.nodeType || s) && e(t, n, l)) return !0 } else for (; t = t[i];)if (1 === t.nodeType || s) if (u = t[M] || (t[M] = {}), d = u[t.uniqueID] || (u[t.uniqueID] = {}), o && o === t.nodeName.toLowerCase()) t = t[i] || t; else { if ((c = d[r]) && c[0] === q && c[1] === a) return h[2] = c[2]; if (d[r] = h, h[2] = e(t, n, l)) return !0 } return !1 } } function m(e) { return e.length > 1 ? function (t, n, i) { for (var o = e.length; o--;)if (!e[o](t, n, i)) return !1; return !0 } : e[0] } function g(e, n, i) { for (var o = 0, r = n.length; r > o; o++)t(e, n[o], i); return i } function v(e, t, n, i, o) { for (var r, s = [], a = 0, l = e.length, c = null != t; l > a; a++)(r = e[a]) && (n && !n(r, i, o) || (s.push(r), c && t.push(a))); return s } function E(e, t, n, o, r, s) { return o && !o[M] && (o = E(o)), r && !r[M] && (r = E(r, s)), i(function (i, s, a, l) { var c, d, u, h = [], p = [], f = s.length, m = i || g(t || "*", a.nodeType ? [a] : a, []), E = !e || !i && t ? m : v(m, h, e, a, l), T = n ? r || (i ? e : f || o) ? [] : s : E; if (n && n(E, T, a, l), o) for (c = v(T, p), o(c, [], a, l), d = c.length; d--;)(u = c[d]) && (T[p[d]] = !(E[p[d]] = u)); if (i) { if (r || e) { if (r) { for (c = [], d = T.length; d--;)(u = T[d]) && c.push(E[d] = u); r(null, T = [], c, l) } for (d = T.length; d--;)(u = T[d]) && (c = r ? ee(i, u) : h[d]) > -1 && (i[c] = !(s[c] = u)) } } else T = v(T === s ? T.splice(f, T.length) : T), r ? r(null, s, T, l) : Q.apply(s, T) }) } function T(e) { for (var t, n, i, o = e.length, r = _.relative[e[0].type], s = r || _.relative[" "], a = r ? 1 : 0, l = f(function (e) { return e === t }, s, !0), c = f(function (e) { return ee(t, e) > -1 }, s, !0), d = [function (e, n, i) { var o = !r && (i || n !== w) || ((t = n).nodeType ? l(e, n, i) : c(e, n, i)); return t = null, o }]; o > a; a++)if (n = _.relative[e[a].type]) d = [f(m(d), n)]; else { if (n = _.filter[e[a].type].apply(null, e[a].matches), n[M]) { for (i = ++a; o > i && !_.relative[e[i].type]; i++); return E(a > 1 && m(d), a > 1 && p(e.slice(0, a - 1).concat({ value: " " === e[a - 2].type ? "*" : "" })).replace(ae, "$1"), n, i > a && T(e.slice(a, i)), o > i && T(e = e.slice(i)), o > i && p(e)) } d.push(n) } return m(d) } function y(e, n) { var o = n.length > 0, r = e.length > 0, s = function (i, s, a, l, c) { var d, u, h, p = 0, f = "0", m = i && [], g = [], E = w, T = i || r && _.find.TAG("*", c), y = q += null == E ? 1 : Math.random() || .1, b = T.length; for (c && (w = s === N || s || c); f !== b && null != (d = T[f]); f++) { if (r && d) { for (u = 0, s || d.ownerDocument === N || (S(d), a = !$); h = e[u++];)if (h(d, s || N, a)) { l.push(d); break } c && (q = y) } o && ((d = !h && d) && p--, i && m.push(d)) } if (p += f, o && f !== p) { for (u = 0; h = n[u++];)h(m, g, s, a); if (i) { if (p > 0) for (; f--;)m[f] || g[f] || (g[f] = Y.call(l)); g = v(g) } Q.apply(l, g), c && !i && g.length > 0 && p + n.length > 1 && t.uniqueSort(l) } return c && (q = y, w = E), m }; return o ? i(s) : s } var b, C, _, I, O, D, R, k, w, x, K, S, N, A, $, L, P, F, B, M = "sizzle" + 1 * new Date, H = e.document, q = 0, j = 0, z = n(), U = n(), W = n(), V = function (e, t) { return e === t && (K = !0), 0 }, G = {}.hasOwnProperty, X = [], Y = X.pop, Z = X.push, Q = X.push, J = X.slice, ee = function (e, t) { for (var n = 0, i = e.length; i > n; n++)if (e[n] === t) return n; return -1 }, te = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped", ne = "[\\x20\\t\\r\\n\\f]", ie = "(?:\\\\.|[\\w-]|[^\x00-\\xa0])+", oe = "\\[" + ne + "*(" + ie + ")(?:" + ne + "*([*^$|!~]?=)" + ne + "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + ie + "))|)" + ne + "*\\]", re = ":(" + ie + ")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|" + oe + ")*)|.*)\\)|)", se = new RegExp(ne + "+", "g"), ae = new RegExp("^" + ne + "+|((?:^|[^\\\\])(?:\\\\.)*)" + ne + "+$", "g"), le = new RegExp("^" + ne + "*," + ne + "*"), ce = new RegExp("^" + ne + "*([>+~]|" + ne + ")" + ne + "*"), de = new RegExp("=" + ne + "*([^\\]'\"]*?)" + ne + "*\\]", "g"), ue = new RegExp(re), he = new RegExp("^" + ie + "$"), pe = { ID: new RegExp("^#(" + ie + ")"), CLASS: new RegExp("^\\.(" + ie + ")"), TAG: new RegExp("^(" + ie + "|[*])"), ATTR: new RegExp("^" + oe), PSEUDO: new RegExp("^" + re), CHILD: new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + ne + "*(even|odd|(([+-]|)(\\d*)n|)" + ne + "*(?:([+-]|)" + ne + "*(\\d+)|))" + ne + "*\\)|)", "i"), bool: new RegExp("^(?:" + te + ")$", "i"), needsContext: new RegExp("^" + ne + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + ne + "*((?:-\\d)?\\d*)" + ne + "*\\)|)(?=[^-]|$)", "i") }, fe = /^(?:input|select|textarea|button)$/i, me = /^h\d$/i, ge = /^[^{]+\{\s*\[native \w/, ve = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, Ee = /[+~]/, Te = new RegExp("\\\\([\\da-f]{1,6}" + ne + "?|(" + ne + ")|.)", "ig"), ye = function (e, t, n) { var i = "0x" + t - 65536; return i !== i || n ? t : 0 > i ? String.fromCharCode(i + 65536) : String.fromCharCode(i >> 10 | 55296, 1023 & i | 56320) }, be = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g, Ce = function (e, t) { return t ? "\x00" === e ? "\ufffd" : e.slice(0, -1) + "\\" + e.charCodeAt(e.length - 1).toString(16) + " " : "\\" + e }, _e = function () { S() }, Ie = f(function (e) { return e.disabled === !0 && ("form" in e || "label" in e) }, { dir: "parentNode", next: "legend" }); try { Q.apply(X = J.call(H.childNodes), H.childNodes), X[H.childNodes.length].nodeType } catch (Oe) { Q = { apply: X.length ? function (e, t) { Z.apply(e, J.call(t)) } : function (e, t) { for (var n = e.length, i = 0; e[n++] = t[i++];); e.length = n - 1 } } } C = t.support = {}, O = t.isXML = function (e) { var t = e && (e.ownerDocument || e).documentElement; return t ? "HTML" !== t.nodeName : !1 }, S = t.setDocument = function (e) { var t, n, i = e ? e.ownerDocument || e : H; return i !== N && 9 === i.nodeType && i.documentElement ? (N = i, A = N.documentElement, $ = !O(N), H !== N && (n = N.defaultView) && n.top !== n && (n.addEventListener ? n.addEventListener("unload", _e, !1) : n.attachEvent && n.attachEvent("onunload", _e)), C.attributes = o(function (e) { return e.className = "i", !e.getAttribute("className") }), C.getElementsByTagName = o(function (e) { return e.appendChild(N.createComment("")), !e.getElementsByTagName("*").length }), C.getElementsByClassName = ge.test(N.getElementsByClassName), C.getById = o(function (e) { return A.appendChild(e).id = M, !N.getElementsByName || !N.getElementsByName(M).length }), C.getById ? (_.filter.ID = function (e) { var t = e.replace(Te, ye); return function (e) { return e.getAttribute("id") === t } }, _.find.ID = function (e, t) { if ("undefined" != typeof t.getElementById && $) { var n = t.getElementById(e); return n ? [n] : [] } }) : (_.filter.ID = function (e) { var t = e.replace(Te, ye); return function (e) { var n = "undefined" != typeof e.getAttributeNode && e.getAttributeNode("id"); return n && n.value === t } }, _.find.ID = function (e, t) { if ("undefined" != typeof t.getElementById && $) { var n, i, o, r = t.getElementById(e); if (r) { if (n = r.getAttributeNode("id"), n && n.value === e) return [r]; for (o = t.getElementsByName(e), i = 0; r = o[i++];)if (n = r.getAttributeNode("id"), n && n.value === e) return [r] } return [] } }), _.find.TAG = C.getElementsByTagName ? function (e, t) { return "undefined" != typeof t.getElementsByTagName ? t.getElementsByTagName(e) : C.qsa ? t.querySelectorAll(e) : void 0 } : function (e, t) { var n, i = [], o = 0, r = t.getElementsByTagName(e); if ("*" === e) { for (; n = r[o++];)1 === n.nodeType && i.push(n); return i } return r }, _.find.CLASS = C.getElementsByClassName && function (e, t) { return "undefined" != typeof t.getElementsByClassName && $ ? t.getElementsByClassName(e) : void 0 }, P = [], L = [], (C.qsa = ge.test(N.querySelectorAll)) && (o(function (e) { A.appendChild(e).innerHTML = "<a id='" + M + "'></a><select id='" + M + "-\r\\' msallowcapture=''><option selected=''></option></select>", e.querySelectorAll("[msallowcapture^='']").length && L.push("[*^$]=" + ne + "*(?:''|\"\")"), e.querySelectorAll("[selected]").length || L.push("\\[" + ne + "*(?:value|" + te + ")"), e.querySelectorAll("[id~=" + M + "-]").length || L.push("~="), e.querySelectorAll(":checked").length || L.push(":checked"), e.querySelectorAll("a#" + M + "+*").length || L.push(".#.+[+~]") }), o(function (e) { e.innerHTML = "<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>"; var t = N.createElement("input"); t.setAttribute("type", "hidden"), e.appendChild(t).setAttribute("name", "D"), e.querySelectorAll("[name=d]").length && L.push("name" + ne + "*[*^$|!~]?="), 2 !== e.querySelectorAll(":enabled").length && L.push(":enabled", ":disabled"), A.appendChild(e).disabled = !0, 2 !== e.querySelectorAll(":disabled").length && L.push(":enabled", ":disabled"), e.querySelectorAll("*,:x"), L.push(",.*:") })), (C.matchesSelector = ge.test(F = A.matches || A.webkitMatchesSelector || A.mozMatchesSelector || A.oMatchesSelector || A.msMatchesSelector)) && o(function (e) { C.disconnectedMatch = F.call(e, "*"), F.call(e, "[s!='']:x"), P.push("!=", re) }), L = L.length && new RegExp(L.join("|")), P = P.length && new RegExp(P.join("|")), t = ge.test(A.compareDocumentPosition), B = t || ge.test(A.contains) ? function (e, t) { var n = 9 === e.nodeType ? e.documentElement : e, i = t && t.parentNode; return e === i || !(!i || 1 !== i.nodeType || !(n.contains ? n.contains(i) : e.compareDocumentPosition && 16 & e.compareDocumentPosition(i))) } : function (e, t) { if (t) for (; t = t.parentNode;)if (t === e) return !0; return !1 }, V = t ? function (e, t) { if (e === t) return K = !0, 0; var n = !e.compareDocumentPosition - !t.compareDocumentPosition; return n ? n : (n = (e.ownerDocument || e) === (t.ownerDocument || t) ? e.compareDocumentPosition(t) : 1, 1 & n || !C.sortDetached && t.compareDocumentPosition(e) === n ? e === N || e.ownerDocument === H && B(H, e) ? -1 : t === N || t.ownerDocument === H && B(H, t) ? 1 : x ? ee(x, e) - ee(x, t) : 0 : 4 & n ? -1 : 1) } : function (e, t) { if (e === t) return K = !0, 0; var n, i = 0, o = e.parentNode, r = t.parentNode, a = [e], l = [t]; if (!o || !r) return e === N ? -1 : t === N ? 1 : o ? -1 : r ? 1 : x ? ee(x, e) - ee(x, t) : 0; if (o === r) return s(e, t); for (n = e; n = n.parentNode;)a.unshift(n); for (n = t; n = n.parentNode;)l.unshift(n); for (; a[i] === l[i];)i++; return i ? s(a[i], l[i]) : a[i] === H ? -1 : l[i] === H ? 1 : 0 }, N) : N }, t.matches = function (e, n) { return t(e, null, null, n) }, t.matchesSelector = function (e, n) { if ((e.ownerDocument || e) !== N && S(e), n = n.replace(de, "='$1']"), C.matchesSelector && $ && !W[n + " "] && (!P || !P.test(n)) && (!L || !L.test(n))) try { var i = F.call(e, n); if (i || C.disconnectedMatch || e.document && 11 !== e.document.nodeType) return i } catch (o) { } return t(n, N, null, [e]).length > 0 }, t.contains = function (e, t) { return (e.ownerDocument || e) !== N && S(e), B(e, t) }, t.attr = function (e, t) { (e.ownerDocument || e) !== N && S(e); var n = _.attrHandle[t.toLowerCase()], i = n && G.call(_.attrHandle, t.toLowerCase()) ? n(e, t, !$) : void 0; return void 0 !== i ? i : C.attributes || !$ ? e.getAttribute(t) : (i = e.getAttributeNode(t)) && i.specified ? i.value : null }, t.escape = function (e) { return (e + "").replace(be, Ce) }, t.error = function (e) { throw new Error("Syntax error, unrecognized expression: " + e) }, t.uniqueSort = function (e) { var t, n = [], i = 0, o = 0; if (K = !C.detectDuplicates, x = !C.sortStable && e.slice(0), e.sort(V), K) { for (; t = e[o++];)t === e[o] && (i = n.push(o)); for (; i--;)e.splice(n[i], 1) } return x = null, e }
vendor: 5,501 bytes, lines 3-5
3, I = t.getText = function (e) { var t, n = "", i = 0, o = e.nodeType; if (o) { if (1 === o || 9 === o || 11 === o) { if ("string" == typeof e.textContent) return e.textContent; for (e = e.firstChild; e; e = e.nextSibling)n += I(e) } else if (3 === o || 4 === o) return e.nodeValue } else for (; t = e[i++];)n += I(t); return n }, _ = t.selectors = {
4            cacheLength: 50, createPseudo: i, match: pe, attrHandle: {}, find: {}, relative: { ">": { dir: "parentNode", first: !0 }, " ": { dir: "parentNode" }, "+": { dir: "previousSibling", first: !0 }, "~": { dir: "previousSibling" } }, preFilter: { ATTR: function (e) { return e[1] = e[1].replace(Te, ye), e[3] = (e[3] || e[4] || e[5] || "").replace(Te, ye), "~=" === e[2] && (e[3] = " " + e[3] + " "), e.slice(0, 4) }, CHILD: function (e) { return e[1] = e[1].toLowerCase(), "nth" === e[1].slice(0, 3) ? (e[3] || t.error(e[0]), e[4] = +(e[4] ? e[5] + (e[6] || 1) : 2 * ("even" === e[3] || "odd" === e[3])), e[5] = +(e[7] + e[8] || "odd" === e[3])) : e[3] && t.error(e[0]), e }, PSEUDO: function (e) { var t, n = !e[6] && e[2]; return pe.CHILD.test(e[0]) ? null : (e[3] ? e[2] = e[4] || e[5] || "" : n && ue.test(n) && (t = D(n, !0)) && (t = n.indexOf(")", n.length - t) - n.length) && (e[0] = e[0].slice(0, t), e[2] = n.slice(0, t)), e.slice(0, 3)) } }, filter: { TAG: function (e) { var t = e.replace(Te, ye).toLowerCase(); return "*" === e ? function () { return !0 } : function (e) { return e.nodeName && e.nodeName.toLowerCase() === t } }, CLASS: function (e) { var t = z[e + " "]; return t || (t = new RegExp("(^|" + ne + ")" + e + "(" + ne + "|$)")) && z(e, function (e) { return t.test("string" == typeof e.className && e.className || "undefined" != typeof e.getAttribute && e.getAttribute("class") || "") }) }, ATTR: function (e, n, i) { return function (o) { var r = t.attr(o, e); return null == r ? "!=" === n : n ? (r += "", "=" === n ? r === i : "!=" === n ? r !== i : "^=" === n ? i && 0 === r.indexOf(i) : "*=" === n ? i && r.indexOf(i) > -1 : "$=" === n ? i && r.slice(-i.length) === i : "~=" === n ? (" " + r.replace(se, " ") + " ").indexOf(i) > -1 : "|=" === n ? r === i || r.slice(0, i.length + 1) === i + "-" : !1) : !0 } }, CHILD: function (e, t, n, i, o) { var r = "nth" !== e.slice(0, 3), s = "last" !== e.slice(-4), a = "of-type" === t; return 1 === i && 0 === o ? function (e) { return !!e.parentNode } : function (t, n, l) { var c, d, u, h, p, f, m = r !== s ? "nextSibling" : "previousSibling", g = t.parentNode, v = a && t.nodeName.toLowerCase(), E = !l && !a, T = !1; if (g) { if (r) { for (; m;) { for (h = t; h = h[m];)if (a ? h.nodeName.toLowerCase() === v : 1 === h.nodeType) return !1; f = m = "only" === e && !f && "nextSibling" } return !0 } if (f = [s ? g.firstChild : g.lastChild], s && E) { for (h = g, u = h[M] || (h[M] = {}), d = u[h.uniqueID] || (u[h.uniqueID] = {}), c = d[e] || [], p = c[0] === q && c[1], T = p && c[2], h = p && g.childNodes[p]; h = ++p && h && h[m] || (T = p = 0) || f.pop();)if (1 === h.nodeType && ++T && h === t) { d[e] = [q, p, T]; break } } else if (E && (h = t, u = h[M] || (h[M] = {}), d = u[h.uniqueID] || (u[h.uniqueID] = {}), c = d[e] || [], p = c[0] === q && c[1], T = p), T === !1) for (; (h = ++p && h && h[m] || (T = p = 0) || f.pop()) && ((a ? h.nodeName.toLowerCase() !== v : 1 !== h.nodeType) || !++T || (E && (u = h[M] || (h[M] = {}), d = u[h.uniqueID] || (u[h.uniqueID] = {}), d[e] = [q, T]), h !== t));); return T -= o, T === i || T % i === 0 && T / i >= 0 } } }, PSEUDO: function (e, n) { var o, r = _.pseudos[e] || _.setFilters[e.toLowerCase()] || t.error("unsupported pseudo: " + e); return r[M] ? r(n) : r.length > 1 ? (o = [e, e, "", n], _.setFilters.hasOwnProperty(e.toLowerCase()) ? i(function (e, t) { for (var i, o = r(e, n), s = o.length; s--;)i = ee(e, o[s]), e[i] = !(t[i] = o[s]) }) : function (e) { return r(e, 0, o) }) : r } }, pseudos: {
5                not: i(function (e) { var t = [], n = [], o = R(e.replace(ae, "$1")); return o[M] ? i(function (e, t, n, i) { for (var r, s = o(e, null, i, []), a = e.length; a--;)(r = s[a]) && (e[a] = !(t[a] = r)) }) : function (e, i, r) { return t[0] = e, o(t, null, r, n), t[0] = null, !n.pop() } }), has: i(function (e) { return function (n) { return t(e, n).length > 0 } }), contains: i(function (e) { return e = e.replace(Te, ye), function (t) { return (t.textContent || t.innerText || I(t)).indexOf(e) > -1 } }), lang: i(function (e) { return he.test(e || "") || t.error("unsupported lang: " + e), e = e.replace(Te, ye).toLowerCase(), function (t) { var n; do if (n = $ ? t.lang : t.getAttribute("xml:lang") || t.getAttribute("lang")) return n = n.toLowerCase(), n === e || 0 === n.indexOf(e + "-"); while ((t = t.parentNode) && 1 === t.nodeType); return !1 } }), target: function (t) { var n = e.location && e.location.hash; return n && n.slice(1) === t.id }, root: function (e) { return e === A }, focus: function (e) { return e === N.activeElement && (!N.hasFocus || N.hasFocus()) && !!(e.type || e.href || ~e.tabIndex) }, enabled: c(!1), disabled: c(!0), checked: function (e) { var t = e.nodeName.toLowerCase(); return "input" === t && !!e.checked || "option" === t && !!e.selected }, selected: function (e) { return e.parentNode && e.parentNode.selectedIndex, e.selected === !0 }, empty: function (e) { for (e = e.firstChild; e; e = e.nextSibling)if (e.nodeType < 6) return !1; return !0 }, parent: function (e) { return !_.pseudos.empty(e) }, header: function (e) { return me.test(e.nodeName) }
vendor: 5,111 bytes, lines 5-10
5, input: function (e) { return fe.test(e.nodeName) }, button: function (e) {
6                    var t = e.nodeName.toLowerCase(); return "input" === t && "button" === e.type || "button" === t;
7                }, text: function (e) { var t; return "input" === e.nodeName.toLowerCase() && "text" === e.type && (null == (t = e.getAttribute("type")) || "text" === t.toLowerCase()) }, first: d(function () { return [0] }), last: d(function (e, t) { return [t - 1] }), eq: d(function (e, t, n) { return [0 > n ? n + t : n] }), even: d(function (e, t) { for (var n = 0; t > n; n += 2)e.push(n); return e }), odd: d(function (e, t) { for (var n = 1; t > n; n += 2)e.push(n); return e }), lt: d(function (e, t, n) { for (var i = 0 > n ? n + t : n; --i >= 0;)e.push(i); return e }), gt: d(function (e, t, n) { for (var i = 0 > n ? n + t : n; ++i < t;)e.push(i); return e })
8            }
9        }, _.pseudos.nth = _.pseudos.eq; for (b in { radio: !0, checkbox: !0, file: !0, password: !0, image: !0 }) _.pseudos[b] = a(b); for (b in { submit: !0, reset: !0 }) _.pseudos[b] = l(b); return h.prototype = _.filters = _.pseudos, _.setFilters = new h, D = t.tokenize = function (e, n) { var i, o, r, s, a, l, c, d = U[e + " "]; if (d) return n ? 0 : d.slice(0); for (a = e, l = [], c = _.preFilter; a;) { i && !(o = le.exec(a)) || (o && (a = a.slice(o[0].length) || a), l.push(r = [])), i = !1, (o = ce.exec(a)) && (i = o.shift(), r.push({ value: i, type: o[0].replace(ae, " ") }), a = a.slice(i.length)); for (s in _.filter) !(o = pe[s].exec(a)) || c[s] && !(o = c[s](o)) || (i = o.shift(), r.push({ value: i, type: s, matches: o }), a = a.slice(i.length)); if (!i) break } return n ? a.length : a ? t.error(e) : U(e, l).slice(0) }, R = t.compile = function (e, t) { var n, i = [], o = [], r = W[e + " "]; if (!r) { for (t || (t = D(e)), n = t.length; n--;)r = T(t[n]), r[M] ? i.push(r) : o.push(r); r = W(e, y(o, i)), r.selector = e } return r }, k = t.select = function (e, t, n, i) { var o, r, s, a, l, c = "function" == typeof e && e, d = !i && D(e = c.selector || e); if (n = n || [], 1 === d.length) { if (r = d[0] = d[0].slice(0), r.length > 2 && "ID" === (s = r[0]).type && 9 === t.nodeType && $ && _.relative[r[1].type]) { if (t = (_.find.ID(s.matches[0].replace(Te, ye), t) || [])[0], !t) return n; c && (t = t.parentNode), e = e.slice(r.shift().value.length) } for (o = pe.needsContext.test(e) ? 0 : r.length; o-- && (s = r[o], !_.relative[a = s.type]);)if ((l = _.find[a]) && (i = l(s.matches[0].replace(Te, ye), Ee.test(r[0].type) && u(t.parentNode) || t))) { if (r.splice(o, 1), e = i.length && p(r), !e) return Q.apply(n, i), n; break } } return (c || R(e, d))(i, t, !$, n, !t || Ee.test(e) && u(t.parentNode) || t), n }, C.sortStable = M.split("").sort(V).join("") === M, C.detectDuplicates = !!K, S(), C.sortDetached = o(function (e) { return 1 & e.compareDocumentPosition(N.createElement("fieldset")) }), o(function (e) { return e.innerHTML = "<a href='#'></a>", "#" === e.firstChild.getAttribute("href") }) || r("type|href|height|width", function (e, t, n) { return n ? void 0 : e.getAttribute(t, "type" === t.toLowerCase() ? 1 : 2) }), C.attributes && o(function (e) { return e.innerHTML = "<input/>", e.firstChild.setAttribute("value", ""), "" === e.firstChild.getAttribute("value") }) || r("value", function (e, t, n) { return n || "input" !== e.nodeName.toLowerCase() ? void 0 : e.defaultValue }), o(function (e) { return null == e.getAttribute("disabled") }) || r(te, function (e, t, n) { var i; return n ? void 0 : e[t] === !0 ? t.toLowerCase() : (i = e.getAttributeNode(t)) && i.specified ? i.value : null }), t
10    }(e); fe.find = Te, fe.expr = Te.selectors, fe.expr[":"] = fe.expr.pseudos, fe.uniqueSort = fe.unique = Te.uniqueSort, fe.text = Te.getText, fe.isXMLDoc = Te.isXML, fe.contains = Te.contains, fe.escapeSelector = Te.escape; var ye = function (e, t, n) { for (var i = [], o = void 0 !== n; (e = e[t]) && 9 !== e.nodeType;)if (1 === e.nodeType) { if (o && fe(e).is(n)) break; i.push(e) } return i }, be = function (e, t) { for (var n = []; e; e = e.nextSibling)1 === e.nodeType && e !== t && n.push(e); return n }, Ce = fe.expr.match.needsContext, _e = /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i, Ie = /^.[^:#\[\.,]*$/; fe.filter = function (e, t, n) { var i = t[0]; return n && (e = ":not(" + e + ")"), 1 === t.length && 1 === i.nodeType ? fe.find.matchesSelector(i, e) ? [i] : [] : fe.find.matches(e, fe.grep(t, function (e) { return 1 === e.nodeType })) }, fe.fn.extend({ find: function (e) { var t, n, i = this.length, o = this; if ("string" != typeof e) return this.pushStack(fe(e).filter(function () { for (t = 0; i > t; t++)if (fe.contains(o[t], this)) return !0 })); for (n = this.pushStack([]), t = 0; i > t; t++)fe.find(e, o[t], n); return i > 1 ? fe.uniqueSort(n) : n }, filter: function (e) { return this.pushStack(o(this, e || [], !1)) }, not: function (e) { return this.pushStack(o(this, e || [], !0)) }, is: function (e) { return !!o(this, "string" == typeof e && Ce.test(e) ? fe(e) : e || [], !1).length } }); var Oe, De = /^(?:\s*(<[\w\W]+>)[^>
vendor: 5,368 bytes, line 10
10]*|#([\w-]+))$/, Re = fe.fn.init = function (e, t, n) { var i, o; if (!e) return this; if (n = n || Oe, "string" == typeof e) { if (i = "<" === e[0] && ">" === e[e.length - 1] && e.length >= 3 ? [null, e, null] : De.exec(e), !i || !i[1] && t) return !t || t.jquery ? (t || n).find(e) : this.constructor(t).find(e); if (i[1]) { if (t = t instanceof fe ? t[0] : t, fe.merge(this, fe.parseHTML(i[1], t && t.nodeType ? t.ownerDocument || t : te, !0)), _e.test(i[1]) && fe.isPlainObject(t)) for (i in t) fe.isFunction(this[i]) ? this[i](t[i]) : this.attr(i, t[i]); return this } return o = te.getElementById(i[2]), o && (this[0] = o, this.length = 1), this } return e.nodeType ? (this[0] = e, this.length = 1, this) : fe.isFunction(e) ? void 0 !== n.ready ? n.ready(e) : e(fe) : fe.makeArray(e, this) }; Re.prototype = fe.fn, Oe = fe(te); var ke = /^(?:parents|prev(?:Until|All))/, we = { children: !0, contents: !0, next: !0, prev: !0 }; fe.fn.extend({ has: function (e) { var t = fe(e, this), n = t.length; return this.filter(function () { for (var e = 0; n > e; e++)if (fe.contains(this, t[e])) return !0 }) }, closest: function (e, t) { var n, i = 0, o = this.length, r = [], s = "string" != typeof e && fe(e); if (!Ce.test(e)) for (; o > i; i++)for (n = this[i]; n && n !== t; n = n.parentNode)if (n.nodeType < 11 && (s ? s.index(n) > -1 : 1 === n.nodeType && fe.find.matchesSelector(n, e))) { r.push(n); break } return this.pushStack(r.length > 1 ? fe.uniqueSort(r) : r) }, index: function (e) { return e ? "string" == typeof e ? se.call(fe(e), this[0]) : se.call(this, e.jquery ? e[0] : e) : this[0] && this[0].parentNode ? this.first().prevAll().length : -1 }, add: function (e, t) { return this.pushStack(fe.uniqueSort(fe.merge(this.get(), fe(e, t)))) }, addBack: function (e) { return this.add(null == e ? this.prevObject : this.prevObject.filter(e)) } }), fe.each({ parent: function (e) { var t = e.parentNode; return t && 11 !== t.nodeType ? t : null }, parents: function (e) { return ye(e, "parentNode") }, parentsUntil: function (e, t, n) { return ye(e, "parentNode", n) }, next: function (e) { return r(e, "nextSibling") }, prev: function (e) { return r(e, "previousSibling") }, nextAll: function (e) { return ye(e, "nextSibling") }, prevAll: function (e) { return ye(e, "previousSibling") }, nextUntil: function (e, t, n) { return ye(e, "nextSibling", n) }, prevUntil: function (e, t, n) { return ye(e, "previousSibling", n) }, siblings: function (e) { return be((e.parentNode || {}).firstChild, e) }, children: function (e) { return be(e.firstChild) }, contents: function (e) { return e.contentDocument || fe.merge([], e.childNodes) } }, function (e, t) { fe.fn[e] = function (n, i) { var o = fe.map(this, t, n); return "Until" !== e.slice(-5) && (i = n), i && "string" == typeof i && (o = fe.filter(i, o)), this.length > 1 && (we[e] || fe.uniqueSort(o), ke.test(e) && o.reverse()), this.pushStack(o) } }); var xe = /[^\x20\t\r\n\f]+/g; fe.Callbacks = function (e) { e = "string" == typeof e ? s(e) : fe.extend({}, e); var t, n, i, o, r = [], a = [], l = -1, c = function () { for (o = e.once, i = t = !0; a.length; l = -1)for (n = a.shift(); ++l < r.length;)r[l].apply(n[0], n[1]) === !1 && e.stopOnFalse && (l = r.length, n = !1); e.memory || (n = !1), t = !1, o && (r = n ? [] : "") }, d = { add: function () { return r && (n && !t && (l = r.length - 1, a.push(n)), function i(t) { fe.each(t, function (t, n) { fe.isFunction(n) ? e.unique && d.has(n) || r.push(n) : n && n.length && "string" !== fe.type(n) && i(n) }) }(arguments), n && !t && c()), this }, remove: function () { return fe.each(arguments, function (e, t) { for (var n; (n = fe.inArray(t, r, n)) > -1;)r.splice(n, 1), l >= n && l-- }), this }, has: function (e) { return e ? fe.inArray(e, r) > -1 : r.length > 0 }, empty: function () { return r && (r = []), this }, disable: function () { return o = a = [], r = n = "", this }, disabled: function () { return !r }, lock: function () { return o = a = [], n || t || (r = n = ""), this }, locked: function () { return !!o }, fireWith: function (e, n) { return o || (n = n || [], n = [e, n.slice ? n.slice() : n], a.push(n), t || c()), this }, fire: function () { return d.fireWith(this, arguments), this }, fired: function () { return !!i } }; return d }, fe.extend({ Deferred: function (t) { var n = [["notify", "progress", fe.Callbacks("memory"), fe.Callbacks("memory"), 2], ["resolve", "done", fe.Callbacks("once memory"), fe.Callbacks("once memory"), 0, "resolved"], ["reject", "fail", fe.Callbacks("once memory"), fe.Callbacks("once memory"), 1, "rejected"]], i = "pending", o = { state: function () { return i }, always: function () { return r.done(arguments).fail(arguments), this }, "catch": function (e) { return o.then(null, e) }, pipe: function () { var e = arguments; return fe.Deferred(function (t) { fe.each(n, function (n, i) { var o = fe.isFunction(e[i[4]]) && e[i[4]]; r[i[1]](function () { var e = o && o.apply(this, arguments); e && fe.isFunction(e.promise) ? e.promise().progress(t.notify).done(t.resolve).fail(t.reject) : t[i[0] + "With"](this, o ? [e] : arguments) }) }), e = null }).promise() }, then: function (t, i, o) { function r(t, n, i, o) { return function () { var c = this, d = arguments, u = function () { var e, u; if (!(s > t)) { if (e = i.apply(c, d), e === n.promise()) throw new TypeError("Thenable self
10-resolution"); u = e && ("object" == typeof e || "function" == typeof e) && e.then, fe.isFunction(u) ? o ? u.call(e, r(s, n, a, o), r(s, n, l, o)) : (s++, u.call(e, r(s, n, a, o), r(s, n, l, o), r(s, n, a, n.notifyWith))) : (i !== a && (c = void 0, d = [e]), (o || n.resolveWith)(c, d)) } }, h = o ? u : function () { try { u() } catch (e) { fe.Deferred.exceptionHook && fe.Deferred.exceptionHook(e, h.stackTrace), t + 1 >= s && (i !== l && (c = void 0, d = [e]), n.rejectWith(c, d)) } }; t ? h() : (fe.Deferred.getStackHook && (h.stackTrace = fe.Deferred.getStackHook()), e.setTimeout(h)) } } var s = 0; return fe.Deferred(function (e) { n[0][3].add(r(0, e, fe.isFunction(o) ? o : a, e.notifyWith)), n[1][3].add(r(0, e, fe.isFunction(t) ? t : a)), n[2][3].add(r(0, e, fe.isFunction(i) ? i : l)) }).promise() }, promise: function (e) { return null != e ? fe.extend(e, o) : o } }, r = {}; return fe.each(n, function (e, t) { var s = t[2], a = t[5]; o[t[1]] = s.add, a && s.add(function () { i = a }, n[3 - e][2].disable, n[0][2].lock), s.add(t[3].fire), r[t[0]] = function () { return r[t[0] + "With"](this === r ? void 0 : this, arguments), this }, r[t[0] + "With"] = s.fireWith }), o.promise(r), t && t.call(r, r), r }, when: function (e) { var t = arguments.length, n = t, i = Array(n), o = ie.call(arguments), r = fe.Deferred(), s = function (e) { return function (n) { i[e] = this, o[e] = arguments.length > 1 ? ie.call(arguments) : n, --t || r.resolveWith(i, o) } }; if (1 >= t && (c(e, r.done(s(n)).resolve, r.reject), "pending" === r.state() || fe.isFunction(o[n] && o[n].then))) return r.then(); for (; n--;)c(o[n], s(n), r.reject); return r.promise() } }); var Ke = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/; fe.Deferred.exceptionHook = function (t, n) { e.console && e.console.warn && t && Ke.test(t.name) && e.console.warn("jQuery.Deferred exception: " + t.message, t.stack, n) }, fe.readyException = function (t) { e.setTimeout(function () { throw t }) }; var Se = fe.Deferred(); fe.fn.ready = function (e) { return Se.then(e)["catch"](function (e) { fe.readyException(e) }), this }, fe.extend({ isReady: !1, readyWait: 1, holdReady: function (e) { e ? fe.readyWait++ : fe.ready(!0) }, ready: function (e) { (e === !0 ? --fe.readyWait : fe.isReady) || (fe.isReady = !0, e !== !0 && --fe.readyWait > 0 || Se.resolveWith(te, [fe])) } }), fe.ready.then = Se.then, "complete" === te.readyState || "loading" !== te.readyState && !te.documentElement.doScroll ? e.setTimeout(fe.ready) : (te.addEventListener("DOMContentLoaded", d), e.addEventListener("load", d)); var Ne = function (e, t, n, i, o, r, s) { var a = 0, l = e.length, c = null == n; if ("object" === fe.type(n)) { o = !0; for (a in n) Ne(e, t, a, n[a], !0, r, s) } else if (void 0 !== i && (o = !0, fe.isFunction(i) || (s = !0), c && (s ? (t.call(e, i), t = null) : (c = t, t = function (e, t, n) { return c.call(fe(e), n) })), t)) for (; l > a;
vendor: 5,158 bytes, line 10
10 a++)t(e[a], n, s ? i : i.call(e[a], a, t(e[a], n))); return o ? e : c ? t.call(e) : l ? t(e[0], n) : r }, Ae = function (e) { return 1 === e.nodeType || 9 === e.nodeType || !+e.nodeType }; u.uid = 1, u.prototype = { cache: function (e) { var t = e[this.expando]; return t || (t = {}, Ae(e) && (e.nodeType ? e[this.expando] = t : Object.defineProperty(e, this.expando, { value: t, configurable: !0 }))), t }, set: function (e, t, n) { var i, o = this.cache(e); if ("string" == typeof t) o[fe.camelCase(t)] = n; else for (i in t) o[fe.camelCase(i)] = t[i]; return o }, get: function (e, t) { return void 0 === t ? this.cache(e) : e[this.expando] && e[this.expando][fe.camelCase(t)] }, access: function (e, t, n) { return void 0 === t || t && "string" == typeof t && void 0 === n ? this.get(e, t) : (this.set(e, t, n), void 0 !== n ? n : t) }, remove: function (e, t) { var n, i = e[this.expando]; if (void 0 !== i) { if (void 0 !== t) { fe.isArray(t) ? t = t.map(fe.camelCase) : (t = fe.camelCase(t), t = t in i ? [t] : t.match(xe) || []), n = t.length; for (; n--;)delete i[t[n]] } (void 0 === t || fe.isEmptyObject(i)) && (e.nodeType ? e[this.expando] = void 0 : delete e[this.expando]) } }, hasData: function (e) { var t = e[this.expando]; return void 0 !== t && !fe.isEmptyObject(t) } }; var $e = new u, Le = new u, Pe = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/, Fe = /[A-Z]/g; fe.extend({ hasData: function (e) { return Le.hasData(e) || $e.hasData(e) }, data: function (e, t, n) { return Le.access(e, t, n) }, removeData: function (e, t) { Le.remove(e, t) }, _data: function (e, t, n) { return $e.access(e, t, n) }, _removeData: function (e, t) { $e.remove(e, t) } }), fe.fn.extend({ data: function (e, t) { var n, i, o, r = this[0], s = r && r.attributes; if (void 0 === e) { if (this.length && (o = Le.get(r), 1 === r.nodeType && !$e.get(r, "hasDataAttrs"))) { for (n = s.length; n--;)s[n] && (i = s[n].name, 0 === i.indexOf("data-") && (i = fe.camelCase(i.slice(5)), p(r, i, o[i]))); $e.set(r, "hasDataAttrs", !0) } return o } return "object" == typeof e ? this.each(function () { Le.set(this, e) }) : Ne(this, function (t) { var n; if (r && void 0 === t) { if (n = Le.get(r, e), void 0 !== n) return n; if (n = p(r, e), void 0 !== n) return n } else this.each(function () { Le.set(this, e, t) }) }, null, t, arguments.length > 1, null, !0) }, removeData: function (e) { return this.each(function () { Le.remove(this, e) }) } }), fe.extend({ queue: function (e, t, n) { var i; return e ? (t = (t || "fx") + "queue", i = $e.get(e, t), n && (!i || fe.isArray(n) ? i = $e.access(e, t, fe.makeArray(n)) : i.push(n)), i || []) : void 0 }, dequeue: function (e, t) { t = t || "fx"; var n = fe.queue(e, t), i = n.length, o = n.shift(), r = fe._queueHooks(e, t), s = function () { fe.dequeue(e, t) }; "inprogress" === o && (o = n.shift(), i--), o && ("fx" === t && n.unshift("inprogress"), delete r.stop, o.call(e, s, r)), !i && r && r.empty.fire() }, _queueHooks: function (e, t) { var n = t + "queueHooks"; return $e.get(e, n) || $e.access(e, n, { empty: fe.Callbacks("once memory").add(function () { $e.remove(e, [t + "queue", n]) }) }) } }), fe.fn.extend({ queue: function (e, t) { var n = 2; return "string" != typeof e && (t = e, e = "fx", n--), arguments.length < n ? fe.queue(this[0], e) : void 0 === t ? this : this.each(function () { var n = fe.queue(this, e, t); fe._queueHooks(this, e), "fx" === e && "inprogress" !== n[0] && fe.dequeue(this, e) }) }, dequeue: function (e) { return this.each(function () { fe.dequeue(this, e) }) }, clearQueue: function (e) { return this.queue(e || "fx", []) }, promise: function (e, t) { var n, i = 1, o = fe.Deferred(), r = this, s = this.length, a = function () { --i || o.resolveWith(r, [r]) }; for ("string" != typeof e && (t = e, e = void 0), e = e || "fx"; s--;)n = $e.get(r[s], e + "queueHooks"), n && n.empty && (i++, n.empty.add(a)); return a(), o.promise(t) } }); var Be = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source, Me = new RegExp("^(?:([+-])=|)(" + Be + ")([a-z%]*)$", "i"), He = ["Top", "Right", "Bottom", "Left"], qe = function (e, t) { return e = t || e, "none" === e.style.display || "" === e.style.display && fe.contains(e.ownerDocument, e) && "none" === fe.css(e, "display") }, je = function (e, t, n, i) { var o, r, s = {}; for (r in t) s[r] = e.style[r], e.style[r] = t[r]; o = n.apply(e, i || []); for (r in t) e.style[r] = s[r]; return o }, ze = {}; fe.fn.extend({ show: function () { return g(this, !0) }, hide: function () { return g(this) }, toggle: function (e) { return "boolean" == typeof e ? e ? this.show() : this.hide() : this.each(function () { qe(this) ? fe(this).show() : fe(this).hide() }) } }); var Ue = /^(?:checkbox|radio)$/i, We = /<([a-z][^\/\0>\x20\t\r\n\f]+)/i, Ve = /^$|\/(?:java|ecma)script/i, Ge = { option: [1, "<select multiple='multiple'>", "</select>"], thead: [1, "<table>", "</table>"], col: [2, "<table><colgroup>", "</colgroup></table>"], tr: [2, "<table><tbody>", "</tbody></table>"], td: [3, "<table><tbody><tr>", "</tr></tbody></table>"], _default: [0, "", ""] }; Ge.optgroup = Ge.option, Ge.tbody = Ge.tfoot = Ge.colgroup = Ge.caption = Ge.thead, Ge.th = Ge.td;
10 var Xe = /<|&#?\w+;/; !function () { var e = te.createDocumentFragment(), t = e.appendChild(te.createElement("div")), n = te.createElement("input"); n.setAttribute("type", "radio"), n.setAttribute("checked", "checked"), n.setAttribute("name", "t"), t.appendChild(n), he.checkClone = t.cloneNode(!0).cloneNode(!0).lastChild.checked, t.innerHTML = "<textarea>x</textarea>", he.noCloneChecked = !!t.cloneNode(!0).lastChild.defaultValue }(); var Ye = te.documentElement, Ze = /^key/, Qe = /^(?:mouse|pointer|contextmenu|drag|drop)|click/, Je = /^([^.]*)(?:\.(.+)|)/; fe.event = { global: {}, add: function (e, t, n, i, o) { var r, s, a, l, c, d, u, h, p, f, m, g = $e.get(e); if (g) for (n.handler && (r = n, n = r.handler, o = r.selector), o && fe.find.matchesSelector(Ye, o), n.guid || (n.guid = fe.guid++), (l = g.events) || (l = g.events = {}), (s = g.handle) || (s = g.handle = function (t) { return "undefined" != typeof fe && fe.event.triggered !== t.type ? fe.event.dispatch.apply(e, arguments) : void 0 }), t = (t || "").match(xe) || [""], c = t.length; c--;)a = Je.exec(t[c]) || [], p = m = a[1], f = (a[2] || "").split(".").sort(), p && (u = fe.event.special[p] || {}, p = (o ? u.delegateType : u.bindType) || p, u = fe.event.special[p] || {}, d = fe.extend({ type: p, origType: m, data: i, handler: n, guid: n.guid, selector: o, needsContext: o && fe.expr.match.needsContext.test(o), namespace: f.join(".") }, r), (h = l[p]) || (h = l[p] = [], h.delegateCount = 0, u.setup && u.setup.call(e, i, f, s) !== !1 || e.addEventListener && e.addEventListener(p, s)), u.add && (u.add.call(e, d), d.handler.guid || (d.handler.guid = n.guid)), o ? h.splice(h.delegateCount++, 0, d) : h.push(d), fe.event.global[p] = !0) }, remove: function (e, t, n, i, o) { var r, s, a, l, c, d, u, h, p, f, m, g = $e.hasData(e) && $e.get(e); if (g && (l = g.events)) { for (t = (t || "").match(xe) || [""], c = t.length; c--;)if (a = Je.exec(t[c]) || [], p = m = a[1], f = (a[2] || "").split(".").sort(), p) { for (u = fe.event.special[p] || {}, p = (i ? u.delegateType : u.bindType) || p, h = l[p] || [], a = a[2] && new RegExp("(^|\\.)" + f.join("\\.(?:.*\\.|)") + "(\\.|$)"), s = r = h.length; r--;)d = h[r], !o && m !== d.origType || n && n.guid !== d.guid || a && !a.test(d.namespace) || i && i !== d.selector && ("**" !== i || !d.selector) || (h.splice(r, 1), d.selector && h.delegateCount--, u.remove && u.remove.call(e, d)); s && !h.length && (u.teardown && u.teardown.call(e, f, g.handle) !== !1 || fe.removeEvent(e, p, g.handle), delete l[p]) } else for (p in l) fe.event.remove(e, p + t[c], n, i, !0); fe.isEmptyObject(l) && $e.remove(e, "handle events") } }, dispatch: function (e) { var t, n, i, o, r, s, a = fe.event.fix(e), l = new Array(arguments.length), c = ($e.get(this, "events") || {})[a.type] || [], d = fe.event.special[a.type] || {}; for (l[0] = a, t = 1; t < arguments.length; t++)l[t] = arguments[t]; if (a.delegateTarget = this, !d.preDispatch || d.preDispatch.call(this, a) !== !1) { for (s = fe.event.handlers.call(this, a, c), t = 0; (o = s[t++]) && !a.isPropagationStopped();)for (a.currentTarget = o.elem, n = 0; (r = o.handlers[n++]) && !a.isImmediatePropagationStopped();)a.rnamespace && !a.rnamespace.test(r.namespace) || (a.handleObj = r, a.data = r.data, i = ((fe.event.special[r.origType] || {}).handle || r.handler).apply(o.elem, l), void 0 !== i && (a.result = i) === !1 && (a.preventDefault(), a.stopPropagation())); return d.postDispatch && d.postDispatch.call(this, a), a.result } }, handlers: function (e, t) { var n, i, o, r, s, a = [], l = t.delegateCount, c = e.target; if (l && c.nodeType && !("click" === e.type && e.button >= 1)) for (; c !== this; c = c.parentNode || this)if (1 === c.nodeType && ("click" !== e.type || c.disabled !== !0)) { for (r = [], s = {}, n = 0; l > n; n++)i = t[n], o = i.selector + " ", void 0 === s[o] && (s[o] = i.needsContext ? fe(o, this).index(c) > -1 : fe.find(o, this, null, [c]).length), s[o] && r.push(i); r.length && a.push({ elem: c, handlers: r }) } return c = this, l < t.length && a.push({ elem: c, handlers: t.slice(l) }), a }, addProp: function (e, t) { Object.defineProperty(fe.Event.prototype, e, { enumerable: !0, configurable: !0, get: fe.isFunction(t) ? function () { return this.originalEvent ? t(this.originalEvent) : void 0 } : function () { return this.originalEvent ? this.originalEvent[e] : void 0 }, set: function (t) { Object.defineProperty(this, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) } }) }, fix: function (e) { return e[fe.expando] ? e : new fe.Event(e) }, special: { load: { noBubble: !0 }, focus: { trigger: function () { return this !== C() && this.focus ? (this.focus(), !1) : void 0 }, delegateType: "focusin" }, blur: { trigger: function () { return this === C() && this.blur ? (this.blur(), !1) : void 0 }, delegateType: "focusout" }, click: { trigger: function () { return "checkbox" === this.type && this.click && fe.nodeName(this, "input") ? (this.click(), !1) : void 0 }, _default: function (e) { return fe.nodeName(e.target, "a") } }, beforeunload: { postDispatch: function (e) { void 0 !== e.result && e.originalEvent && (e.originalEvent.returnValue = e.result) } } } }, fe.removeEvent = function (e, t, n) { e.removeEventListener && e.removeEventListener(t, n) }, fe.Event = function (e, t) { return this instanceof fe.Event ? (e && e.type ? (this.originalEvent = e, this.type = e.type, this.isDefaultPrevented = e.defaultPrevented || void 0 === e.defaultPrevented && e.returnValue === !1 ? y : b, this.target = e.target && 3 === e.target.nodeType ? e.target.parentNode : e.target, this.currentTarget = e.currentTarget, this.relatedTarget = e.relatedTarget) : this.type = e, t && fe.extend(this, t), this.timeStamp = e && e.t
vendor: 5,337 bytes, line 10
10imeStamp || fe.now(), void (this[fe.expando] = !0)) : new fe.Event(e, t) }, fe.Event.prototype = { constructor: fe.Event, isDefaultPrevented: b, isPropagationStopped: b, isImmediatePropagationStopped: b, isSimulated: !1, preventDefault: function () { var e = this.originalEvent; this.isDefaultPrevented = y, e && !this.isSimulated && e.preventDefault() }, stopPropagation: function () { var e = this.originalEvent; this.isPropagationStopped = y, e && !this.isSimulated && e.stopPropagation() }, stopImmediatePropagation: function () { var e = this.originalEvent; this.isImmediatePropagationStopped = y, e && !this.isSimulated && e.stopImmediatePropagation(), this.stopPropagation() } }, fe.each({ altKey: !0, bubbles: !0, cancelable: !0, changedTouches: !0, ctrlKey: !0, detail: !0, eventPhase: !0, metaKey: !0, pageX: !0, pageY: !0, shiftKey: !0, view: !0, "char": !0, charCode: !0, key: !0, keyCode: !0, button: !0, buttons: !0, clientX: !0, clientY: !0, offsetX: !0, offsetY: !0, pointerId: !0, pointerType: !0, screenX: !0, screenY: !0, targetTouches: !0, toElement: !0, touches: !0, which: function (e) { var t = e.button; return null == e.which && Ze.test(e.type) ? null != e.charCode ? e.charCode : e.keyCode : !e.which && void 0 !== t && Qe.test(e.type) ? 1 & t ? 1 : 2 & t ? 3 : 4 & t ? 2 : 0 : e.which } }, fe.event.addProp), fe.each({ mouseenter: "mouseover", mouseleave: "mouseout", pointerenter: "pointerover", pointerleave: "pointerout" }, function (e, t) { fe.event.special[e] = { delegateType: t, bindType: t, handle: function (e) { var n, i = this, o = e.relatedTarget, r = e.handleObj; return o && (o === i || fe.contains(i, o)) || (e.type = r.origType, n = r.handler.apply(this, arguments), e.type = t), n } } }), fe.fn.extend({ on: function (e, t, n, i) { return _(this, e, t, n, i) }, one: function (e, t, n, i) { return _(this, e, t, n, i, 1) }, off: function (e, t, n) { var i, o; if (e && e.preventDefault && e.handleObj) return i = e.handleObj, fe(e.delegateTarget).off(i.namespace ? i.origType + "." + i.namespace : i.origType, i.selector, i.handler), this; if ("object" == typeof e) { for (o in e) this.off(o, t, e[o]); return this } return t !== !1 && "function" != typeof t || (n = t, t = void 0), n === !1 && (n = b), this.each(function () { fe.event.remove(this, e, n, t) }) } }); var et = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi, tt = /<script|<style|<link/i, nt = /checked\s*(?:[^=]|=\s*.checked.)/i, it = /^true\/(.*)/, ot = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g; fe.extend({ htmlPrefilter: function (e) { return e.replace(et, "<$1></$2>") }, clone: function (e, t, n) { var i, o, r, s, a = e.cloneNode(!0), l = fe.contains(e.ownerDocument, e); if (!(he.noCloneChecked || 1 !== e.nodeType && 11 !== e.nodeType || fe.isXMLDoc(e))) for (s = v(a), r = v(e), i = 0, o = r.length; o > i; i++)k(r[i], s[i]); if (t) if (n) for (r = r || v(e), s = s || v(a), i = 0, o = r.length; o > i; i++)R(r[i], s[i]); else R(e, a); return s = v(a, "script"), s.length > 0 && E(s, !l && v(e, "script")), a }, cleanData: function (e) { for (var t, n, i, o = fe.event.special, r = 0; void 0 !== (n = e[r]); r++)if (Ae(n)) { if (t = n[$e.expando]) { if (t.events) for (i in t.events) o[i] ? fe.event.remove(n, i) : fe.removeEvent(n, i, t.handle); n[$e.expando] = void 0 } n[Le.expando] && (n[Le.expando] = void 0) } } }), fe.fn.extend({ detach: function (e) { return x(this, e, !0) }, remove: function (e) { return x(this, e) }, text: function (e) { return Ne(this, function (e) { return void 0 === e ? fe.text(this) : this.empty().each(function () { 1 !== this.nodeType && 11 !== this.nodeType && 9 !== this.nodeType || (this.textContent = e) }) }, null, e, arguments.length) }, append: function () { return w(this, arguments, function (e) { if (1 === this.nodeType || 11 === this.nodeType || 9 === this.nodeType) { var t = I(this, e); t.appendChild(e) } }) }, prepend: function () { return w(this, arguments, function (e) { if (1 === this.nodeType || 11 === this.nodeType || 9 === this.nodeType) { var t = I(this, e); t.insertBefore(e, t.firstChild) } }) }, before: function () { return w(this, arguments, function (e) { this.parentNode && this.parentNode.insertBefore(e, this) }) }, after: function () { return w(this, arguments, function (e) { this.parentNode && this.parentNode.insertBefore(e, this.nextSibling) }) }, empty: function () { for (var e, t = 0; null != (e = this[t]); t++)1 === e.nodeType && (fe.cleanData(v(e, !1)), e.textContent = ""); return this }, clone: function (e, t) { return e = null == e ? !1 : e, t = null == t ? e : t, this.map(function () { return fe.clone(this, e, t) }) }, html: function (e) { return Ne(this, function (e) { var t = this[0] || {}, n = 0, i = this.length; if (void 0 === e && 1 === t.nodeType) return t.innerHTML; if ("string" == typeof e && !tt.test(e) && !Ge[(We.exec(e) || ["", ""])[1].toLowerCase()]) { e = fe.htmlPrefilter(e); try { for (; i > n; n++)t = this[n] || {}, 1 === t.nodeType && (fe.cleanData(v(t, !1)), t.innerHTML = e); t = 0 } catch (o) { } } t && this.empty().append(e) }, null, e, arguments.length) }, replaceWith: function () { var e = []; return w(this, arguments, function (t) { var n = this.parentNode; fe.inArray(this, e) < 0 && (fe.cleanData(v(this)), n && n.replaceChild(t, this)) }, e) } }
vendor: 9,723 bytes, lines 10-12
10), fe.each({ appendTo: "append", prependTo: "prepend", insertBefore: "before", insertAfter: "after", replaceAll: "replaceWith" }, function (e, t) { fe.fn[e] = function (e) { for (var n, i = [], o = fe(e), r = o.length - 1, s = 0; r >= s; s++)n = s === r ? this : this.clone(!0), fe(o[s])[t](n), re.apply(i, n.get()); return this.pushStack(i) } }); var rt = /^margin/, st = new RegExp("^(" + Be + ")(?!px)[a-z%]+$", "i"), at = function (t) { var n = t.ownerDocument.defaultView; return n && n.opener || (n = e), n.getComputedStyle(t) }; !function () { function t() { if (a) { a.style.cssText = "box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%", a.innerHTML = "", Ye.appendChild(s); var t = e.getComputedStyle(a); n = "1%" !== t.top, r = "2px" === t.marginLeft, i = "4px" === t.width, a.style.marginRight = "50%", o = "4px" === t.marginRight, Ye.removeChild(s), a = null } } var n, i, o, r, s = te.createElement("div"), a = te.createElement("div"); a.style && (a.style.backgroundClip = "content-box", a.cloneNode(!0).style.backgroundClip = "", he.clearCloneStyle = "content-box" === a.style.backgroundClip, s.style.cssText = "border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute", s.appendChild(a), fe.extend(he, { pixelPosition: function () { return t(), n }, boxSizingReliable: function () { return t(), i }, pixelMarginRight: function () { return t(), o }, reliableMarginLeft: function () { return t(), r } })) }(); var lt = /^(none|table(?!-c[ea]).+)/, ct = { position: "absolute", visibility: "hidden", display: "block" }, dt = { letterSpacing: "0", fontWeight: "400" }, ut = ["Webkit", "Moz", "ms"], ht = te.createElement("div").style; fe.extend({ cssHooks: { opacity: { get: function (e, t) { if (t) { var n = K(e, "opacity"); return "" === n ? "1" : n } } } }, cssNumber: { animationIterationCount: !0, columnCount: !0, fillOpacity: !0, flexGrow: !0, flexShrink: !0, fontWeight: !0, lineHeight: !0, opacity: !0, order: !0, orphans: !0, widows: !0, zIndex: !0, zoom: !0 }, cssProps: { "float": "cssFloat" }, style: function (e, t, n, i) { if (e && 3 !== e.nodeType && 8 !== e.nodeType && e.style) { var o, r, s, a = fe.camelCase(t), l = e.style; return t = fe.cssProps[a] || (fe.cssProps[a] = N(a) || a), s = fe.cssHooks[t] || fe.cssHooks[a], void 0 === n ? s && "get" in s && void 0 !== (o = s.get(e, !1, i)) ? o : l[t] : (r = typeof n, "string" === r && (o = Me.exec(n)) && o[1] && (n = f(e, t, o), r = "number"), null != n && n === n && ("number" === r && (n += o && o[3] || (fe.cssNumber[a] ? "" : "px")), he.clearCloneStyle || "" !== n || 0 !== t.indexOf("background") || (l[t] = "inherit"), s && "set" in s && void 0 === (n = s.set(e, n, i)) || (l[t] = n)), void 0) } }, css: function (e, t, n, i) { var o, r, s, a = fe.camelCase(t); return t = fe.cssProps[a] || (fe.cssProps[a] = N(a) || a), s = fe.cssHooks[t] || fe.cssHooks[a], s && "get" in s && (o = s.get(e, !0, n)), void 0 === o && (o = K(e, t, i)), "normal" === o && t in dt && (o = dt[t]), "" === n || n ? (r = parseFloat(o), n === !0 || isFinite(r) ? r || 0 : o) : o } }), fe.each(["height", "width"], function (e, t) { fe.cssHooks[t] = { get: function (e, n, i) { return n ? !lt.test(fe.css(e, "display")) || e.getClientRects().length && e.getBoundingClientRect().width ? L(e, t, i) : je(e, ct, function () { return L(e, t, i) }) : void 0 }, set: function (e, n, i) { var o, r = i && at(e), s = i && $(e, t, i, "border-box" === fe.css(e, "boxSizing", !1, r), r); return s && (o = Me.exec(n)) && "px" !== (o[3] || "px") && (e.style[t] = n, n = fe.css(e, t)), A(e, n, s) } } }), fe.cssHooks.marginLeft = S(he.reliableMarginLeft, function (e, t) { return t ? (parseFloat(K(e, "marginLeft")) || e.getBoundingClientRect().left - je(e, { marginLeft: 0 }, function () { return e.getBoundingClientRect().left })) + "px" : void 0 }), fe.each({ margin: "", padding: "", border: "Width" }, function (e, t) { fe.cssHooks[e + t] = { expand: function (n) { for (var i = 0, o = {}, r = "string" == typeof n ? n.split(" ") : [n]; 4 > i; i++)o[e + He[i] + t] = r[i] || r[i - 2] || r[0]; return o } }, rt.test(e) || (fe.cssHooks[e + t].set = A) }), fe.fn.extend({ css: function (e, t) { return Ne(this, function (e, t, n) { var i, o, r = {}, s = 0; if (fe.isArray(t)) { for (i = at(e), o = t.length; o > s; s++)r[t[s]] = fe.css(e, t[s], !1, i); return r } return void 0 !== n ? fe.style(e, t, n) : fe.css(e, t) }, e, t, arguments.length > 1) } }), fe.Tween = P, P.prototype = { constructor: P, init: function (e, t, n, i, o, r) { this.elem = e, this.prop = n, this.easing = o || fe.easing._default, this.options = t, this.start = this.now = this.cur(), this.end = i, this.unit = r || (fe.cssNumber[n] ? "" : "px") }, cur: function () { var e = P.propHooks[this.prop]; return e && e.get ? e.get(this) : P.propHooks._default.get(this) }, run: function (e) { var t, n = P.propHooks[this.prop]; return this.options.duration ? this.pos = t = fe.easing[this.easing](e, this.options.duration * e, 0, 1, this.options.duration) : this.pos = t = e, this.now = (this.end - this.start) * t + this.start, this.options.step && this.options.step.call(this.elem, this.now, this), n && n.set ? n.set(this) : P.propHooks._default.set(this), this } }, P.prototype.init.prototype = P.prototype, P.propHooks = { _default: { get: function (e) { var t; return 1 !== e.elem.nodeType || null != e.elem[e.prop] && null == e.elem.style[e.prop] ? e.elem[e.prop] : (t = fe.css(e.elem, e.prop, ""), t && "auto" !== t ? t : 0) }, set: function (e) { fe.fx.step[e.prop] ? fe.fx.step[e.prop](e) : 1 !== e.elem.nodeType || null == e.elem.style[fe.cssProps[e.prop]] && !fe.cssHooks[e.prop] ? e.elem[e.prop] = e.now : fe.style(e.elem, e.prop, e.now + e.unit) } } }, P.propHooks.scrollTop = P.propHooks.scrollLeft = { set: function (e) { e.elem.nodeType && e.elem.parentNode && (e.elem[e.prop] = e.now) } }, fe.easing = { linear: function (e) { return e }, swing: function (e) { return .5 - Math.cos(e * Math.PI) / 2 }, _default: "swing" }, fe.fx = P.prototype.init, fe.fx.step = {}; var pt, ft, mt = /^(?:toggle|show|hide)$/, gt = /queueHooks$/; fe.Animation = fe.extend(z, { tweeners: { "*": [function (e, t) { var n = this.createTween(e, t); return f(n.elem, e, Me.exec(t), n), n }] }, tweener: function (e, t) { fe.isFunction(e) ? (t = e, e = ["*"]) : e = e.match(xe); for (var n, i = 0, o = e.length; o > i; i++)n = e[i], z.tweeners[n] = z.tweeners[n] || [], z.tweeners[n].unshift(t) }, prefilters: [q], prefilter: function (e, t) { t ? z.prefilters.unshift(e) : z.prefilters.push(e) } }), fe.speed = function (e, t, n) { var i = e && "object" == typeof e ? fe.extend({}, e) : { complete: n || !n && t || fe.isFunction(e) && e, duration: e, easing: n && t || t && !fe.isFunction(t) && t }; return fe.fx.off || te.hidden ? i.duration = 0 : "number" != typeof i.duration && (i.duration in fe.fx.speeds ? i.duration = fe.fx.speeds[i.duration] : i.duration = fe.fx.speeds._default), null != i.queue && i.queue !== !0 || (i.queue = "fx"), i.old = i.complete, i.complete = function () { fe.isFunction(i.old) && i.old.call(this), i.queue && fe.dequeue(this, i.queue) }, i }, fe.fn.extend({ fadeTo: function (e, t, n, i) { return this.filter(qe).css("opacity", 0).show().end().animate({ opacity: t }, e, n, i) }, animate: function (e, t, n, i) { var o = fe.isEmptyObject(e), r = fe.speed(t, n, i), s = function () { var t = z(this, fe.extend({}, e), r); (o || $e.get(this, "finish")) && t.stop(!0) }; return s.finish = s, o || r.queue === !1 ? this.each(s) : this.queue(r.queue, s) }, stop: function (e, t, n) { var i = function (e) { var t = e.stop; delete e.stop, t(n) }; return "string" != typeof e && (n = t, t = e, e = void 0), t && e !== !1 && this.queue(e || "fx", []), this.each(function () { var t = !0, o = null != e && e + "queueHooks", r = fe.timers, s = $e.get(this); if (o) s[o] && s[o].stop && i(s[o]); else for (o in s) s[o] && s[o].stop && gt.test(o) && i(s[o]); for (o = r.length; o--;)r[o].elem !== this || null != e && r[o].queue !== e || (r[o].anim.stop(n), t = !1, r.splice(o, 1)); !t && n || fe.dequeue(this, e) }) }, finish: function (e) { return e !== !1 && (e = e || "fx"), this.each(function () { var t, n = $e.get(this), i = n[e + "queue"], o = n[e + "queueHooks"], r = fe.timers, s = i ? i.length : 0; for (n.finish = !0, fe.queue(this, e, []), o && o.stop && o.stop.call(this, !0), t = r.length; t--;)r[t].elem === this && r[t].queue === e && (r[t].anim.stop(!0), r.splice(t, 1)); for (t = 0; s > t; t++)i[t] && i[t].finish && i[t].finish.call(this); delete n.finish }) } }), fe.each(["toggle", "show", "hide"], function (e, t) { var n = fe.fn[t]; fe.fn[t] = function (e, i, o) { return null == e || "boolean" == typeof e ? n.apply(this, arguments) : this.animate(M(t, !0), e, i, o) } }), fe.each({ slideDown: M("show"), slideUp: M("hide"), slideToggle: M("toggle"), fadeIn: { opacity: "show" }, fadeOut: { opacity: "hide" }, fadeToggle: { opacity: "toggle" } }, function (e, t) { fe.fn[e] = function (e, n, i) { return this.animate(t, e, n, i) } }), fe.timers = [], fe.fx.tick = function () { var e, t = 0, n = fe.timers; for (pt = fe.now(); t < n.length; t++)e = n[t], e() || n[t] !== e || n.splice(t--, 1); n.length || fe.fx.stop(), pt = void 0 }, fe.fx.timer = function (e) { fe.timers.push(e), e() ? fe.fx.start() : fe.timers.pop() }, fe.fx.interval = 13, fe.fx.start = function () { ft || (ft = e.requestAnimationFrame ? e.requestAnimationFrame(F) : e.setInterval(fe.fx.tick, fe.fx.interval)) }, fe.fx.stop = function () {
11        e.cancelAnimationFrame ? e.cancelAnimationFrame(ft) : e.clearInterval(ft), ft = null;
12    }, fe.fx.speeds = { slow: 600, fast: 200, _default: 400 }
vendor: 12,651 bytes, line 12
12, fe.fn.delay = function (t, n) { return t = fe.fx ? fe.fx.speeds[t] || t : t, n = n || "fx", this.queue(n, function (n, i) { var o = e.setTimeout(n, t); i.stop = function () { e.clearTimeout(o) } }) }, function () { var e = te.createElement("input"), t = te.createElement("select"), n = t.appendChild(te.createElement("option")); e.type = "checkbox", he.checkOn = "" !== e.value, he.optSelected = n.selected, e = te.createElement("input"), e.value = "t", e.type = "radio", he.radioValue = "t" === e.value }(); var vt, Et = fe.expr.attrHandle; fe.fn.extend({ attr: function (e, t) { return Ne(this, fe.attr, e, t, arguments.length > 1) }, removeAttr: function (e) { return this.each(function () { fe.removeAttr(this, e) }) } }), fe.extend({ attr: function (e, t, n) { var i, o, r = e.nodeType; if (3 !== r && 8 !== r && 2 !== r) return "undefined" == typeof e.getAttribute ? fe.prop(e, t, n) : (1 === r && fe.isXMLDoc(e) || (o = fe.attrHooks[t.toLowerCase()] || (fe.expr.match.bool.test(t) ? vt : void 0)), void 0 !== n ? null === n ? void fe.removeAttr(e, t) : o && "set" in o && void 0 !== (i = o.set(e, n, t)) ? i : (e.setAttribute(t, n + ""), n) : o && "get" in o && null !== (i = o.get(e, t)) ? i : (i = fe.find.attr(e, t), null == i ? void 0 : i)) }, attrHooks: { type: { set: function (e, t) { if (!he.radioValue && "radio" === t && fe.nodeName(e, "input")) { var n = e.value; return e.setAttribute("type", t), n && (e.value = n), t } } } }, removeAttr: function (e, t) { var n, i = 0, o = t && t.match(xe); if (o && 1 === e.nodeType) for (; n = o[i++];)e.removeAttribute(n) } }), vt = { set: function (e, t, n) { return t === !1 ? fe.removeAttr(e, n) : e.setAttribute(n, n), n } }, fe.each(fe.expr.match.bool.source.match(/\w+/g), function (e, t) { var n = Et[t] || fe.find.attr; Et[t] = function (e, t, i) { var o, r, s = t.toLowerCase(); return i || (r = Et[s], Et[s] = o, o = null != n(e, t, i) ? s : null, Et[s] = r), o } }); var Tt = /^(?:input|select|textarea|button)$/i, yt = /^(?:a|area)$/i; fe.fn.extend({ prop: function (e, t) { return Ne(this, fe.prop, e, t, arguments.length > 1) }, removeProp: function (e) { return this.each(function () { delete this[fe.propFix[e] || e] }) } }), fe.extend({ prop: function (e, t, n) { var i, o, r = e.nodeType; if (3 !== r && 8 !== r && 2 !== r) return 1 === r && fe.isXMLDoc(e) || (t = fe.propFix[t] || t, o = fe.propHooks[t]), void 0 !== n ? o && "set" in o && void 0 !== (i = o.set(e, n, t)) ? i : e[t] = n : o && "get" in o && null !== (i = o.get(e, t)) ? i : e[t] }, propHooks: { tabIndex: { get: function (e) { var t = fe.find.attr(e, "tabindex"); return t ? parseInt(t, 10) : Tt.test(e.nodeName) || yt.test(e.nodeName) && e.href ? 0 : -1 } } }, propFix: { "for": "htmlFor", "class": "className" } }), he.optSelected || (fe.propHooks.selected = { get: function (e) { var t = e.parentNode; return t && t.parentNode && t.parentNode.selectedIndex, null }, set: function (e) { var t = e.parentNode; t && (t.selectedIndex, t.parentNode && t.parentNode.selectedIndex) } }), fe.each(["tabIndex", "readOnly", "maxLength", "cellSpacing", "cellPadding", "rowSpan", "colSpan", "useMap", "frameBorder", "contentEditable"], function () { fe.propFix[this.toLowerCase()] = this }), fe.fn.extend({ addClass: function (e) { var t, n, i, o, r, s, a, l = 0; if (fe.isFunction(e)) return this.each(function (t) { fe(this).addClass(e.call(this, t, W(this))) }); if ("string" == typeof e && e) for (t = e.match(xe) || []; n = this[l++];)if (o = W(n), i = 1 === n.nodeType && " " + U(o) + " ") { for (s = 0; r = t[s++];)i.indexOf(" " + r + " ") < 0 && (i += r + " "); a = U(i), o !== a && n.setAttribute("class", a) } return this }, removeClass: function (e) { var t, n, i, o, r, s, a, l = 0; if (fe.isFunction(e)) return this.each(function (t) { fe(this).removeClass(e.call(this, t, W(this))) }); if (!arguments.length) return this.attr("class", ""); if ("string" == typeof e && e) for (t = e.match(xe) || []; n = this[l++];)if (o = W(n), i = 1 === n.nodeType && " " + U(o) + " ") { for (s = 0; r = t[s++];)for (; i.indexOf(" " + r + " ") > -1;)i = i.replace(" " + r + " ", " "); a = U(i), o !== a && n.setAttribute("class", a) } return this }, toggleClass: function (e, t) { var n = typeof e; return "boolean" == typeof t && "string" === n ? t ? this.addClass(e) : this.removeClass(e) : fe.isFunction(e) ? this.each(function (n) { fe(this).toggleClass(e.call(this, n, W(this), t), t) }) : this.each(function () { var t, i, o, r; if ("string" === n) for (i = 0, o = fe(this), r = e.match(xe) || []; t = r[i++];)o.hasClass(t) ? o.removeClass(t) : o.addClass(t); else void 0 !== e && "boolean" !== n || (t = W(this), t && $e.set(this, "__className__", t), this.setAttribute && this.setAttribute("class", t || e === !1 ? "" : $e.get(this, "__className__") || "")) }) }, hasClass: function (e) { var t, n, i = 0; for (t = " " + e + " "; n = this[i++];)if (1 === n.nodeType && (" " + U(W(n)) + " ").indexOf(t) > -1) return !0; return !1 } }); var bt = /\r/g; fe.fn.extend({ val: function (e) { var t, n, i, o = this[0]; { if (arguments.length) return i = fe.isFunction(e), this.each(function (n) { var o; 1 === this.nodeType && (o = i ? e.call(this, n, fe(this).val()) : e, null == o ? o = "" : "number" == typeof o ? o += "" : fe.isArray(o) && (o = fe.map(o, function (e) { return null == e ? "" : e + "" })), t = fe.valHooks[this.type] || fe.valHooks[this.nodeName.toLowerCase()], t && "set" in t && void 0 !== t.set(this, o, "value") || (this.value = o)) }); if (o) return t = fe.valHooks[o.type] || fe.valHooks[o.nodeName.toLowerCase()], t && "get" in t && void 0 !== (n = t.get(o, "value")) ? n : (n = o.value, "string" == typeof n ? n.replace(bt, "") : null == n ? "" : n) } } }), fe.extend({ valHooks: { option: { get: function (e) { var t = fe.find.attr(e, "value"); return null != t ? t : U(fe.text(e)) } }, select: { get: function (e) { var t, n, i, o = e.options, r = e.selectedIndex, s = "select-one" === e.type, a = s ? null : [], l = s ? r + 1 : o.length; for (i = 0 > r ? l : s ? r : 0; l > i; i++)if (n = o[i], (n.selected || i === r) && !n.disabled && (!n.parentNode.disabled || !fe.nodeName(n.parentNode, "optgroup"))) { if (t = fe(n).val(), s) return t; a.push(t) } return a }, set: function (e, t) { for (var n, i, o = e.options, r = fe.makeArray(t), s = o.length; s--;)i = o[s], (i.selected = fe.inArray(fe.valHooks.option.get(i), r) > -1) && (n = !0); return n || (e.selectedIndex = -1), r } } } }), fe.each(["radio", "checkbox"], function () { fe.valHooks[this] = { set: function (e, t) { return fe.isArray(t) ? e.checked = fe.inArray(fe(e).val(), t) > -1 : void 0 } }, he.checkOn || (fe.valHooks[this].get = function (e) { return null === e.getAttribute("value") ? "on" : e.value }) }); var Ct = /^(?:focusinfocus|focusoutblur)$/; fe.extend(fe.event, { trigger: function (t, n, i, o) { var r, s, a, l, c, d, u, h = [i || te], p = ce.call(t, "type") ? t.type : t, f = ce.call(t, "namespace") ? t.namespace.split(".") : []; if (s = a = i = i || te, 3 !== i.nodeType && 8 !== i.nodeType && !Ct.test(p + fe.event.triggered) && (p.indexOf(".") > -1 && (f = p.split("."), p = f.shift(), f.sort()), c = p.indexOf(":") < 0 && "on" + p, t = t[fe.expando] ? t : new fe.Event(p, "object" == typeof t && t), t.isTrigger = o ? 2 : 3, t.namespace = f.join("."), t.rnamespace = t.namespace ? new RegExp("(^|\\.)" + f.join("\\.(?:.*\\.|)") + "(\\.|$)") : null, t.result = void 0, t.target || (t.target = i), n = null == n ? [t] : fe.makeArray(n, [t]), u = fe.event.special[p] || {}, o || !u.trigger || u.trigger.apply(i, n) !== !1)) { if (!o && !u.noBubble && !fe.isWindow(i)) { for (l = u.delegateType || p, Ct.test(l + p) || (s = s.parentNode); s; s = s.parentNode)h.push(s), a = s; a === (i.ownerDocument || te) && h.push(a.defaultView || a.parentWindow || e) } for (r = 0; (s = h[r++]) && !t.isPropagationStopped();)t.type = r > 1 ? l : u.bindType || p, d = ($e.get(s, "events") || {})[t.type] && $e.get(s, "handle"), d && d.apply(s, n), d = c && s[c], d && d.apply && Ae(s) && (t.result = d.apply(s, n), t.result === !1 && t.preventDefault()); return t.type = p, o || t.isDefaultPrevented() || u._default && u._default.apply(h.pop(), n) !== !1 || !Ae(i) || c && fe.isFunction(i[p]) && !fe.isWindow(i) && (a = i[c], a && (i[c] = null), fe.event.triggered = p, i[p](), fe.event.triggered = void 0, a && (i[c] = a)), t.result } }, simulate: function (e, t, n) { var i = fe.extend(new fe.Event, n, { type: e, isSimulated: !0 }); fe.event.trigger(i, null, t) } }), fe.fn.extend({ trigger: function (e, t) { return this.each(function () { fe.event.trigger(e, t, this) }) }, triggerHandler: function (e, t) { var n = this[0]; return n ? fe.event.trigger(e, t, n, !0) : void 0 } }), fe.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "), function (e, t) { fe.fn[t] = function (e, n) { return arguments.length > 0 ? this.on(t, null, e, n) : this.trigger(t) } }), fe.fn.extend({ hover: function (e, t) { return this.mouseenter(e).mouseleave(t || e) } }), he.focusin = "onfocusin" in e, he.focusin || fe.each({ focus: "focusin", blur: "focusout" }, function (e, t) { var n = function (e) { fe.event.simulate(t, e.target, fe.event.fix(e)) }; fe.event.special[t] = { setup: function () { var i = this.ownerDocument || this, o = $e.access(i, t); o || i.addEventListener(e, n, !0), $e.access(i, t, (o || 0) + 1) }, teardown: function () { var i = this.ownerDocument || this, o = $e.access(i, t) - 1; o ? $e.access(i, t, o) : (i.removeEventListener(e, n, !0), $e.remove(i, t)) } } }); var _t = e.location, It = fe.now(), Ot = /\?/; fe.parseXML = function (t) { var n; if (!t || "string" != typeof t) return null; try { n = (new e.DOMParser).parseFromString(t, "text/xml") } catch (i) { n = void 0 } return n && !n.getElementsByTagName("parsererror").length || fe.error("Invalid XML: " + t), n }; var Dt = /\[\]$/, Rt = /\r?\n/g, kt = /^(?:submit|button|image|reset|file)$/i, wt = /^(?:input|select|textarea|keygen)/i; fe.param = function (e, t) { var n, i = [], o = function (e, t) { var n = fe.isFunction(t) ? t() : t; i[i.length] = encodeURIComponent(e) + "=" + encodeURIComponent(null == n ? "" : n) }; if (fe.isArray(e) || e.jquery && !fe.isPlainObject(e)) fe.each(e, function () { o(this.name, this.value) }); else for (n in e) V(n, e[n], t, o); return i.join("&") }, fe.fn.extend({ serialize: function () { return fe.param(this.serializeArray()) }, serializeArray: function () { return this.map(function () { var e = fe.prop(this, "elements"); return e ? fe.makeArray(e) : this }).filter(function () { var e = this.type; return this.name && !fe(this).is(":disabled") && wt.test(this.nodeName) && !kt.test(e) && (this.checked || !Ue.test(e)) }).map(function (e, t) { var n = fe(this).val(); return null == n ? null : fe.isArray(n) ? fe.map(n, function (e) { return { name: t.name, value: e.replace(Rt, "\r\n") } }) : { name: t.name, value: n.replace(Rt, "\r\n") } }).get() } }); var xt = /%20/g, Kt = /#.*$/, St = /([?&])_=[^&]*/, Nt = /^(.*?):[ \t]*([^\r\n]*)$/gm, At = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/, $t = /^(?:GET|HEAD)$/, Lt = /^\/\//, Pt = {}, Ft = {}, Bt = "*/".concat("*"), Mt = te.createElement("a"); Mt.href = _t.href, fe.extend({ active: 0, lastModified: {}, etag: {}, ajaxSettings: { url: _t.href, type: "GET", isLocal: At.test(_t.protocol), global: !0, processData: !0, async: !0, contentType: "application/x-www-form-urlencoded; charset=UTF-8", accepts: { "*": Bt, text: "text/plain", html: "text/html", xml: "application/xml, text/xml", json: "application/json, text/javascript" }, contents: { xml: /\bxml\b/, html: /\bhtml/, json: /\bjson\b/ }, responseFields: { xml: "responseXML", text: "responseText", json: "responseJSON" }, converters: { "* text": String, "text html": !0, "text json": JSON.parse, "text xml": fe.parseXML }, flatOptions: { url: !0, context: !0 } }, ajaxSetup: function (e, t) { return t ? Y(Y(e, fe.ajaxSettings), t) : Y(fe.ajaxSettings, e) }, ajaxPrefilter: G(Pt), ajaxTransport: G(Ft), ajax: function (t, n) { function i(t, n, i, a) { var c, h, p, y, b, C = n; d || (d = !0, l && e.clearTimeout(l), o = void 0, s = a || "", _.readyState = t > 0 ? 4 : 0, c = t >= 200 && 300 > t || 304 === t, i && (y = Z(f, _, i)), y = Q(f, y, _, c), c ? (f.ifModified && (b = _.getResponseHeader("Last-Modified"), b && (fe.lastModified[r] = b), b = _.getResponseHeader("etag"), b && (fe.etag[r] = b)), 204 === t || "HEAD" === f.type ? C = "nocontent" : 304 === t ? C = "notmodified" : (C = y.state, h = y.data, p 
vendor: 11,873 bytes, line 12
12= y.error, c = !p)) : (p = C, !t && C || (C = "error", 0 > t && (t = 0))), _.status = t, _.statusText = (n || C) + "", c ? v.resolveWith(m, [h, C, _]) : v.rejectWith(m, [_, C, p]), _.statusCode(T), T = void 0, u && g.trigger(c ? "ajaxSuccess" : "ajaxError", [_, f, c ? h : p]), E.fireWith(m, [_, C]), u && (g.trigger("ajaxComplete", [_, f]), --fe.active || fe.event.trigger("ajaxStop"))) } "object" == typeof t && (n = t, t = void 0), n = n || {}; var o, r, s, a, l, c, d, u, h, p, f = fe.ajaxSetup({}, n), m = f.context || f, g = f.context && (m.nodeType || m.jquery) ? fe(m) : fe.event, v = fe.Deferred(), E = fe.Callbacks("once memory"), T = f.statusCode || {}, y = {}, b = {}, C = "canceled", _ = { readyState: 0, getResponseHeader: function (e) { var t; if (d) { if (!a) for (a = {}; t = Nt.exec(s);)a[t[1].toLowerCase()] = t[2]; t = a[e.toLowerCase()] } return null == t ? null : t }, getAllResponseHeaders: function () { return d ? s : null }, setRequestHeader: function (e, t) { return null == d && (e = b[e.toLowerCase()] = b[e.toLowerCase()] || e, y[e] = t), this }, overrideMimeType: function (e) { return null == d && (f.mimeType = e), this }, statusCode: function (e) { var t; if (e) if (d) _.always(e[_.status]); else for (t in e) T[t] = [T[t], e[t]]; return this }, abort: function (e) { var t = e || C; return o && o.abort(t), i(0, t), this } }; if (v.promise(_), f.url = ((t || f.url || _t.href) + "").replace(Lt, _t.protocol + "//"), f.type = n.method || n.type || f.method || f.type, f.dataTypes = (f.dataType || "*").toLowerCase().match(xe) || [""], null == f.crossDomain) { c = te.createElement("a"); try { c.href = f.url, c.href = c.href, f.crossDomain = Mt.protocol + "//" + Mt.host != c.protocol + "//" + c.host } catch (I) { f.crossDomain = !0 } } if (f.data && f.processData && "string" != typeof f.data && (f.data = fe.param(f.data, f.traditional)), X(Pt, f, n, _), d) return _; u = fe.event && f.global, u && 0 === fe.active++ && fe.event.trigger("ajaxStart"), f.type = f.type.toUpperCase(), f.hasContent = !$t.test(f.type), r = f.url.replace(Kt, ""), f.hasContent ? f.data && f.processData && 0 === (f.contentType || "").indexOf("application/x-www-form-urlencoded") && (f.data = f.data.replace(xt, "+")) : (p = f.url.slice(r.length), f.data && (r += (Ot.test(r) ? "&" : "?") + f.data, delete f.data), f.cache === !1 && (r = r.replace(St, "$1"), p = (Ot.test(r) ? "&" : "?") + "_=" + It++ + p), f.url = r + p), f.ifModified && (fe.lastModified[r] && _.setRequestHeader("If-Modified-Since", fe.lastModified[r]), fe.etag[r] && _.setRequestHeader("If-None-Match", fe.etag[r])), (f.data && f.hasContent && f.contentType !== !1 || n.contentType) && _.setRequestHeader("Content-Type", f.contentType), _.setRequestHeader("Accept", f.dataTypes[0] && f.accepts[f.dataTypes[0]] ? f.accepts[f.dataTypes[0]] + ("*" !== f.dataTypes[0] ? ", " + Bt + "; q=0.01" : "") : f.accepts["*"]); for (h in f.headers) _.setRequestHeader(h, f.headers[h]); if (f.beforeSend && (f.beforeSend.call(m, _, f) === !1 || d)) return _.abort(); if (C = "abort", E.add(f.complete), _.done(f.success), _.fail(f.error), o = X(Ft, f, n, _)) { if (_.readyState = 1, u && g.trigger("ajaxSend", [_, f]), d) return _; f.async && f.timeout > 0 && (l = e.setTimeout(function () { _.abort("timeout") }, f.timeout)); try { d = !1, o.send(y, i) } catch (I) { if (d) throw I; i(-1, I) } } else i(-1, "No Transport"); return _ }, getJSON: function (e, t, n) { return fe.get(e, t, n, "json") }, getScript: function (e, t) { return fe.get(e, void 0, t, "script") } }), fe.each(["get", "post"], function (e, t) { fe[t] = function (e, n, i, o) { return fe.isFunction(n) && (o = o || i, i = n, n = void 0), fe.ajax(fe.extend({ url: e, type: t, dataType: o, data: n, success: i }, fe.isPlainObject(e) && e)) } }), fe._evalUrl = function (e) { return fe.ajax({ url: e, type: "GET", dataType: "script", cache: !0, async: !1, global: !1, "throws": !0 }) }, fe.fn.extend({ wrapAll: function (e) { var t; return this[0] && (fe.isFunction(e) && (e = e.call(this[0])), t = fe(e, this[0].ownerDocument).eq(0).clone(!0), this[0].parentNode && t.insertBefore(this[0]), t.map(function () { for (var e = this; e.firstElementChild;)e = e.firstElementChild; return e }).append(this)), this }, wrapInner: function (e) { return fe.isFunction(e) ? this.each(function (t) { fe(this).wrapInner(e.call(this, t)) }) : this.each(function () { var t = fe(this), n = t.contents(); n.length ? n.wrapAll(e) : t.append(e) }) }, wrap: function (e) { var t = fe.isFunction(e); return this.each(function (n) { fe(this).wrapAll(t ? e.call(this, n) : e) }) }, unwrap: function (e) { return this.parent(e).not("body").each(function () { fe(this).replaceWith(this.childNodes) }), this } }), fe.expr.pseudos.hidden = function (e) { return !fe.expr.pseudos.visible(e) }, fe.expr.pseudos.visible = function (e) { return !!(e.offsetWidth || e.offsetHeight || e.getClientRects().length) }, fe.ajaxSettings.xhr = function () { try { return new e.XMLHttpRequest } catch (t) { } }; var Ht = { 0: 200, 1223: 204 }, qt = fe.ajaxSettings.xhr(); he.cors = !!qt && "withCredentials" in qt, he.ajax = qt = !!qt, fe.ajaxTransport(function (t) { var n, i; return he.cors || qt && !t.crossDomain ? { send: function (o, r) { var s, a = t.xhr(); if (a.open(t.type, t.url, t.async, t.username, t.password), t.xhrFields) for (s in t.xhrFields) a[s] = t.xhrFields[s]; t.mimeType && a.overrideMimeType && a.overrideMimeType(t.mimeType), t.crossDomain || o["X-Requested-With"] || (o["X-Requested-With"] = "XMLHttpRequest"); for (s in o) a.setRequestHeader(s, o[s]); n = function (e) { return function () { n && (n = i = a.onload = a.onerror = a.onabort = a.onreadystatechange = null, "abort" === e ? a.abort() : "error" === e ? "number" != typeof a.status ? r(0, "error") : r(a.status, a.statusText) : r(Ht[a.status] || a.status, a.statusText, "text" !== (a.responseType || "text") || "string" != typeof a.responseText ? { binary: a.response } : { text: a.responseText }, a.getAllResponseHeaders())) } }, a.onload = n(), i = a.onerror = n("error"), void 0 !== a.onabort ? a.onabort = i : a.onreadystatechange = function () { 4 === a.readyState && e.setTimeout(function () { n && i() }) }, n = n("abort"); try { a.send(t.hasContent && t.data || null) } catch (l) { if (n) throw l } }, abort: function () { n && n() } } : void 0 }), fe.ajaxPrefilter(function (e) { e.crossDomain && (e.contents.script = !1) }), fe.ajaxSetup({ accepts: { script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript" }, contents: { script: /\b(?:java|ecma)script\b/ }, converters: { "text script": function (e) { return fe.globalEval(e), e } } }), fe.ajaxPrefilter("script", function (e) { void 0 === e.cache && (e.cache = !1), e.crossDomain && (e.type = "GET") }), fe.ajaxTransport("script", function (e) { if (e.crossDomain) { var t, n; return { send: function (i, o) { t = fe("<script>").prop({ charset: e.scriptCharset, src: e.url }).on("load error", n = function (e) { t.remove(), n = null, e && o("error" === e.type ? 404 : 200, e.type) }), te.head.appendChild(t[0]) }, abort: function () { n && n() } } } }); var jt = [], zt = /(=)\?(?=&|$)|\?\?/; fe.ajaxSetup({ jsonp: "callback", jsonpCallback: function () { var e = jt.pop() || fe.expando + "_" + It++; return this[e] = !0, e } }), fe.ajaxPrefilter("json jsonp", function (t, n, i) { var o, r, s, a = t.jsonp !== !1 && (zt.test(t.url) ? "url" : "string" == typeof t.data && 0 === (t.contentType || "").indexOf("application/x-www-form-urlencoded") && zt.test(t.data) && "data"); return a || "jsonp" === t.dataTypes[0] ? (o = t.jsonpCallback = fe.isFunction(t.jsonpCallback) ? t.jsonpCallback() : t.jsonpCallback, a ? t[a] = t[a].replace(zt, "$1" + o) : t.jsonp !== !1 && (t.url += (Ot.test(t.url) ? "&" : "?") + t.jsonp + "=" + o), t.converters["script json"] = function () { return s || fe.error(o + " was not called"), s[0] }, t.dataTypes[0] = "json", r = e[o], e[o] = function () { s = arguments }, i.always(function () { void 0 === r ? fe(e).removeProp(o) : e[o] = r, t[o] && (t.jsonpCallback = n.jsonpCallback, jt.push(o)), s && fe.isFunction(r) && r(s[0]), s = r = void 0 }), "script") : void 0 }), he.createHTMLDocument = function () { var e = te.implementation.createHTMLDocument("").body; return e.innerHTML = "<form></form><form></form>", 2 === e.childNodes.length }(), fe.parseHTML = function (e, t, n) { if ("string" != typeof e) return []; "boolean" == typeof t && (n = t, t = !1); var i, o, r; return t || (he.createHTMLDocument ? (t = te.implementation.createHTMLDocument(""), i = t.createElement("base"), i.href = te.location.href, t.head.appendChild(i)) : t = te), o = _e.exec(e), r = !n && [], o ? [t.createElement(o[1])] : (o = T([e], t, r), r && r.length && fe(r).remove(), fe.merge([], o.childNodes)) }, fe.fn.load = function (e, t, n) { var i, o, r, s = this, a = e.indexOf(" "); return a > -1 && (i = U(e.slice(a)), e = e.slice(0, a)), fe.isFunction(t) ? (n = t, t = void 0) : t && "object" == typeof t && (o = "POST"), s.length > 0 && fe.ajax({ url: e, type: o || "GET", dataType: "html", data: t }).done(function (e) { r = arguments, s.html(i ? fe("<div>").append(fe.parseHTML(e)).find(i) : e) }).always(n && function (e, t) { s.each(function () { n.apply(this, r || [e.responseText, t, e]) }) }), this }, fe.each(["ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend"], function (e, t) { fe.fn[t] = function (e) { return this.on(t, e) } }), fe.expr.pseudos.animated = function (e) { return fe.grep(fe.timers, function (t) { return e === t.elem }).length }, fe.offset = { setOffset: function (e, t, n) { var i, o, r, s, a, l, c, d = fe.css(e, "position"), u = fe(e), h = {}; "static" === d && (e.style.position = "relative"), a = u.offset(), r = fe.css(e, "top"), l = fe.css(e, "left"), c = ("absolute" === d || "fixed" === d) && (r + l).indexOf("auto") > -1, c ? (i = u.position(), s = i.top, o = i.left) : (s = parseFloat(r) || 0, o = parseFloat(l) || 0), fe.isFunction(t) && (t = t.call(e, n, fe.extend({}, a))), null != t.top && (h.top = t.top - a.top + s), null != t.left && (h.left = t.left - a.left + o), "using" in t ? t.using.call(e, h) : u.css(h) } }, fe.fn.extend({ offset: function (e) { if (arguments.length) return void 0 === e ? this : this.each(function (t) { fe.offset.setOffset(this, e, t) }); var t, n, i, o, r = this[0]; if (r) return r.getClientRects().length ? (i = r.getBoundingClientRect(), i.width || i.height ? (o = r.ownerDocument, n = J(o), t = o.documentElement, { top: i.top + n.pageYOffset - t.clientTop, left: i.left + n.pageXOffset - t.clientLeft }) : i) : { top: 0, left: 0 } }, position: function () { if (this[0]) { var e, t, n = this[0], i = { top: 0, left: 0 }; return "fixed" === fe.css(n, "position") ? t = n.getBoundingClientRect() : (e = this.offsetParent(), t = this.offset(), fe.nodeName(e[0], "html") || (i = e.offset()), i = { top: i.top + fe.css(e[0], "borderTopWidth", !0), left: i.left + fe.css(e[0], "borderLeftWidth", !0) }), { top: t.top - i.top - fe.css(n, "marginTop", !0), left: t.left - i.left - fe.css(n, "marginLeft", !0) } } }, offsetParent: function () { return this.map(function () { for (var e = this.offsetParent; e && "static" === fe.css(e, "position");)e = e.offsetParent; return e || Ye }) } }), fe.each({ scrollLeft: "pageXOffset", scrollTop: "pageYOffset" }, function (e, t) { var n = "pageYOffset" === t; fe.fn[e] = function (i) { return Ne(this, function (e, i, o) { var r = J(e); return void 0 === o ? r ? r[t] : e[i] : void (r ? r.scrollTo(n ? r.pageXOffset : o, n ? o : r.pageYOffset) : e[i] = o) }, e, i, arguments.length) } }), fe.each(["top", "left"], function (e, t) { fe.cssHooks[t] = S(he.pixelPosition, function (e, n) { return n ? (n = K(e, t), st.test(n) ? fe(e).position()[t] + "px" : n) : void 0 }) }), fe.each({ Height: "height", Width: "width" }
12, function (e, t) { fe.each({ padding: "inner" + e, content: t, "": "outer" + e }, function (n, i) { fe.fn[i] = function (o, r) { var s = arguments.length && (n || "boolean" != typeof o), a = n || (o === !0 || r === !0 ? "margin" : "border"); return Ne(this, function (t, n, o) { var r; return fe.isWindow(t) ? 0 === i.indexOf("outer") ? t["inner" + e] : t.document.documentElement["client" + e] : 9 === t.nodeType ? (r = t.documentElement, Math.max(t.body["scroll" + e], r["scroll" + e], t.body["offset" + e], r["offset" + e], r["client" + e])) : void 0 === o ? fe.css(t, n, a) : fe.style(t, n, o, a) }, t, s ? o : void 0, s) } }) }), fe.fn.extend({ bind: function (e, t, n) { return this.on(e, null, t, n) }, unbind: function (e, t) { return this.off(e, null, t) }, delegate: function (e, t, n, i) { return this.on(t, e, n, i) }, undelegate: function (e, t, n) { return 1 === arguments.length ? this.off(e, "**") : this.off(t, e || "**", n) } }), fe.parseJSON = JSON.parse, "function" == typeof define && define.amd && define("jquery", [], function () { return fe }); var Ut = e.jQuery, Wt = e.$; return fe.noConflict = function (t) { return e.$ === fe && (e.$ = Wt), t && e.jQuery === fe && (e.jQuery = Ut), fe }, t || (e.jQuery = e.$ = fe), fe
13}), function (e, t) { "use strict"; e.rails !== t && e.error("jquery-ujs has already been loaded!"); var n, i = e(document); e.rails = n = { linkClickSelector: "a[data-confirm], a[data-method], a[data-remote]:not([disabled]), a[data-disable-with], a[data-disable]", buttonClickSelector: "button[data-remote]:not([form]):not(form button), button[data-confirm]:not([form]):not(form button)", inputChangeSelector: "select[data-remote], input[data-remote], textarea[data-remote]", formSubmitSelector: "form", formInputClickSelector: "form input[type=submit], form input[type=image], form button[type=submit], form button:not([type]), input[type=submit][form], input[type=image][form], button[type=submit][form], button[form]:not([type])", disableSelector: "input[data-disable-with]:enabled, button[data-disable-with]:enabled, textarea[data-disable-with]:enabled, input[data-disable]:enabled, button[data-disable]:enabled, textarea[data-disable]:enabled", enableSelector: "input[data-disable-with]:disabled, button[data-disable-with]:disabled, textarea[data-disable-with]:disabled, input[data-disable]:disabled, button[data-disable]:disabled, textarea[data-disable]:disabled", requiredInputSelector: "input[name][required]:not([disabled]), textarea[name][required]:not([disabled])", fileInputSelector: "input[type=file]:not([disabled])", linkDisableSelector: "a[data-disable-with], a[data-disable]", buttonDisableSelector: "button[data-remote][data-disable-with], button[data-remote][data-disable]", csrfToken: function () { return e("meta[name=csrf-token]").attr("content") }, csrfParam: function () { return e("meta[name=csrf-param]").attr("content") }, CSRFProtection: function (e) { var t = n.csrfToken(); t && e.setRequestHeader("X-CSRF-Token", t) }, refreshCSRFTokens: function () { e('form input[name="' + n.csrfParam() + '"]').val(n.csrfToken()) }, fire: function (t, n, i) { var o = e.Event(n); return t.trigger(o, i), o.result !== !1 }, confirm: function (e) { return confirm(e) }, ajax: function (t) { return e.ajax(t) }, href: function (e) { return e[0].href }, isRemote: function (e) { return e.data("remote") !== t && e.data("remote") !== !1 }, handleRemote: function (i) { var o, r, s, a, l, c; if (n.fire(i, "ajax:before")) { if (a = i.data("with-credentials") || null, l = i.data("type") || e.ajaxSettings && e.ajaxSettings.dataType, i.is("form")) { o = i.data("ujs:submit-button-formmethod") || i.attr("method"), r = i.data("ujs:submit-button-formaction") || i.attr("action"), s = e(i[0]).serializeArray(); var d = i.data("ujs:submit-button"); d && (s.push(d), i.data("ujs:submit-button", null)), i.data("ujs:submit-button-formmethod", null), i.data("ujs:submit-button-formaction", null) } else i.is(n.inputChangeSelector) ? (o = i.data("method"), r = i.data("url"), s = i.serialize(), i.data("params") && (s = s + "&" + i.data("params"))) : i.is(n.buttonClickSelector) ? (o = i.data("method") || "get", r = i.data("url"), s = i.serialize(), i.data("params") && (s = s + "&" + i.data("params"))) : (o = i.data("method"), r = n.href(i), s = i.data("params") || null); return c = { type: o || "GET", data: s, dataType: l, beforeSend: function (e, o) { return o.dataType === t && e.setRequestHeader("accept", "*/*;q=0.5, " + o.accepts.script), n.fire(i, "ajax:beforeSend", [e, o]) ? void i.trigger("ajax:send", e) : !1 }, success: function (e, t, n) { i.trigger("ajax:success", [e, t, n]) }, complete: function (e, t) { i.trigger("ajax:complete", [e, t]) }, error: function (e, t, n) { i.trigger("ajax:error", [e, t, n]) }, crossDomain: n.isCrossDomain(r) }, a && (c.xhrFields = { withCredentials: a }), r && (c.url = r), n.ajax(c) } return !1 }, isCrossDomain: function (e) { var t = document.createElement("a"); t.href = location.href; var n = document.createElement("a"); try { return n.href = e, n.href = n.href, !((!n.protocol || ":" === n.protocol) && !n.host || t.protocol + "//" + t.host == n.protocol + "//" + n.host) } catch (i) { return !0 } }, handleMethod: function (i) { var o = n.href(i), r = i.data("method"), s = i.attr("target"), a = n.csrfToken(), l = n.csrfParam(), c = e('<form method="post" action="' + o + '"></form>'), d = '<input name="_method" value="' + r + '" type="hidden" />'; l === t || a === t || n.isCrossDomain(o) || (d += '<input name="' + l + '" value="' + a + '" type="hidden" />'), s && c.attr("target", s), c.hide().append(d).appendTo("body"), c.submit() }, formElements: function (t, n) { return t.is("form") ? e(t[0].elements).filter(n) : t.find(n) }, disableFormElements: function (t) { n.formElements(t, n.disableSelector).each(function () { n.disableFormElement(e(this)) }) }, disableFormElement: function (e) { var n, i; n = e.is("button") ? "html" : "val", i = e.data("disable-with"), i !== t && (e.data("ujs:enable-with", e[n]()), e[n](i)), e.prop("disabled", !0), e.data("ujs:disabled", !0) }, enableFormElements: function (t) { n.formElements(t, n.enableSelector).each(function () { n.enableFormElement(e(this)) }) }, enableFormElement: function (e) { var n = e.is("button") ? "html" : "val"; e.data("ujs:enable-with") !== t && (e[n](e.data("ujs:enable-with")), e.removeData("ujs:enable-with")), e.prop("disabled", !1), e.removeData("ujs:disabled") }, allowAction: function (e) { var t, i = e.data("confirm"), o = !1; if (!i) return !0; if (n.fire(e, "confirm")) { try { o = n.confirm(i) } catch (r) { (console.error || console.log).call(console, r.stack || r) } t = n.fire(e, "confirm:complete", [o]) } return o && t }, blankInputs: function (t, n, i) { var o, r, s, a, l = e(), c = n || "input,textarea", d = t.find(c), u = {}; return d.each(function () { o = e(this), o.is("input[type=radio]") ? (a = o.attr("name"), u[a] || (0 === t.find('input[type=radio]:checked[name="' + a + '"]').length && (s = t.find('input[type=radio][name="' + a + '"]'), l = l.add(s)), u[a] = a)) : (r = o.is("input[type=checkbox],input[type=radio]") ? o.is(":checked") : !!o.val(), r === i && (l = l.add(o))) }), l.length ? l : !1 }, nonBlankInputs: function (e, t) { return n.blankInputs(e, t, !0) }, stopEverything: function (t) { return e(t.target).trigger("ujs:everythingStopped"), t.stopImmediatePropagation(), !1 }, disableElement: function (e) { var i = e.data("disable-with"); i !== t && (e.data("ujs:enable-with", e.html()), e.html(i)), e.bind("click.railsDisable", function (e) { return n.stopEverything(e) }), e.data("ujs:disabled", !0) }, enableElement: function (e) { e.data("ujs:enable-with") !== t && (e.html(e.data("ujs:enable-with")), e.removeData("ujs:enable-with")), e.unbind("click.railsDisable"), e.removeData("ujs:disabled") } }, n.fire(i, "rails:attachBindings") && (e.ajaxPrefilter(function (e, t, i) { e.crossDomain || n.CSRFProtection(i) }), e(window).on("pageshow.rails", function () { e(e.rails.enableSelector).each(function () { var t = e(this); t.data("ujs:disabled") && e.rails.enableFormElement(t) }), e(e.rails.linkDisableSelector).each(function () { var t = e(this); t.data("ujs:disabled") && e.rails.enableElement(t) }) }), i.delegate(n.linkDisableSelector, "ajax:complete", function () { n.enableElement(e(this)) }), i.delegate(n.buttonDisableSelector, "ajax:complete", function () { n.enableFormElement(e(this)) }), i.delegate(n.linkClickSelector, "click.rails", function (t) { var i = e(this), o = i.data("method"), r = i.data("params"), s = t.metaKey || t.ctrlKey; if (!n.allowAction(i)) return n.stopEverything(t); if (!s && i.is(n.linkDisableSelector) && n.disableElement(i), n.isRemote(i)) { if (s && (!o || "GET" === o) && !r) return !0; var a = n.handleRemote(i); return a === !1 ? n.enableElement(i) : a.fail(function () { n.enableElement(i) }), !1 } return o ? (n.handleMethod(i), !1) : void 0 }), i.delegate(n.buttonClickSelector, "click.rails", function (t) { var i = e(this); if (!n.allowAction(i) || !n.isRemote(i)) return n.stopEverything(t); i.is(n.buttonDisableSelector) && n.disableFormElement(i); var o = n.handleRemote(i); return o === !1 ? n.enableFormElement(i) : o.fail(function () { n.enableFormElement(i) }), !1 }), i.delegate(n.inputChangeSelector, "change.rails", function (t) { var i = e(this); return n.allowAction(i) && n.isRemote(i) ? (n.handleRemote(i), !1) : n.stopEverything(t) }), i.delegate(n.formSubmitSelector, "submit.rails", function (i) { var o, r, s = e(this), a = n.isRemote(s); if (!n.allowAction(s)) return n.stopEverything(i); if (s.attr("novalidate") === t) if (s.data("ujs:formnovalidate-button") === t) { if (o = n.blankInputs(s, n.requiredInputSelector, !1), o && n.fire(s, "ajax:aborted:required", [o])) return n.stopEverything(i) } else s.data("ujs:formnovalidate-button", t); if (a) { if (r = n.nonBlankInputs(s, n.fileInputSelector)) { setTimeout(function () { n.disableFormElements(s) }, 13); var l = n.fire(s, "ajax:aborted:file", [r]); return l || setTimeout(function () { n.enableFormElements(s) }, 13), l } return n.handleRemote(s), !1 } setTimeout(function () { n.disableFormElements(s) }, 13) }), i.delegate(n.formInputClickSelector, "click.rails", function (t) { var i = e(this); if (!n.allowAction(i)) return n.stopEverything(t); var o = i.attr("name"), r = o ? { name: o, value: i.val() } : null, s = i.closest("form"); 0 === s.length && (s = e("#" + i.attr("form"))), s.data("ujs:submit-button", r), s.data("ujs:formnovalidate-button", i.attr("formnovalidate")), s.data("ujs:submit-button-formaction", i.attr("formaction")), s.data("ujs:submit-button-formmethod", i.attr("formmethod")) }), i.delegate(n.formSubmitSelector, "ajax:send.rails", function (t) { this === t.target && n.disableFormElements(e(this)) }), i.delegate(n.formSubmitSelector, "ajax:complete.rails", function (t) { this === t.target && n.enableFormElements(e(this)) }), e(function () { n.refreshCSRFTokens() })) }(jQuery), function (e, t) { "function" == typeof define && define.amd ? define(t) : "object" == typeof module && module.exports ? module.exports = t() : e.EvEmitter = t() }("undefined" != typeof window ? window : this, function () { "use strict"; function e() { } var t = e.prototype; return t.on = function (e, t) { if (e && t) { var n = this._events = this._events || {}, i = n[e] = n[e] || []; return -1 == i.indexOf(t) && i.push(t), this } }, t.once = function (e, t) { if (e && t) { this.on(e, t); var n = this._onceEvents = this._onceEvents || {}, i = n[e] = n[e] || {}; return i[t] = !0, this } }, t.off = function (e, t) { var n = this._events && this._events[e]; if (n && n.length) { var i = n.indexOf(t); return -1 != i && n.splice(i, 1), this } }, t.emitEvent = function (e, t) { var n = this._events && this._events[e]; if (n && n.length) { var i = 0, o = n[i]; t = t || []; for (var r = this._onceEvents && this._onceEvents[e]; o;) { var s = r && r[o]; s && (this.off(e, o), delete r[o]), o.apply(this, t), i += s ? 0 : 1, o = n[i] } return this } }, e }), function (e) {
14    var t = 0, n = function () { return (new Date).getTime() + t++ }, i = function (e) { return "[" + e + "]$1" }, o = function (e) { return "_" + e + "_$1" }, r = function (t, n, i) { return t ? "function" == typeof t ? (n && console.warn("association-insertion-traversal is ignored, because association-insertion-node is given as a function."), t(i)) : "string" == typeof t ? n ? i[n](t) : "this" == t ? i : e(t) : void 0 : i.parent() }; e(document).on("click", ".add_fields", function (t) { t.preventDefault(); var s = e(this), a = s.data("association"), l = s.data("associations"), c = s.data("association-insertion-template"), d = s.data("association-insertion-method") || s.data("association-insertion-position") || "before", u = s.data("association-insertion-node"), h = s.data("association-insertion-traversal"), p = parseInt(s.data("c
vendor: 38,821 bytes, lines 14-23
14ount"), 10), f = new RegExp("\\[new_" + a + "\\](.*?\\s)", "g"), m = new RegExp("_new_" + a + "_(\\w*)", "g"), g = n(), v = c.replace(f, i(g)), E = []; for (v == c && (f = new RegExp("\\[new_" + l + "\\](.*?\\s)", "g"), m = new RegExp("_new_" + l + "_(\\w*)", "g"), v = c.replace(f, i(g))), v = v.replace(m, o(g)), E = [v], p = isNaN(p) ? 1 : Math.max(p, 1), p -= 1; p;)g = n(), v = c.replace(f, i(g)), v = v.replace(m, o(g)), E.push(v), p -= 1; var T = r(u, h, s); T && 0 != T.length || console.warn("Couldn't find the element to insert the template. Make sure your `data-association-insertion-*` on `link_to_add_association` is correct."), e.each(E, function (t, n) { var i = e(n); T.trigger("cocoon:before-insert", [i]); T[d](i); T.trigger("cocoon:after-insert", [i]) }) }), e(document).on("click", ".remove_fields.dynamic, .remove_fields.existing", function (t) {
15        var n = e(this), i = n.data("wrapper-class") || "nested-fields", o = n.closest("." + i), r = o.parent(); t.preventDefault(), r.trigger("cocoon:before-remove", [o]); var s = r.data("remove-timeout") || 0; setTimeout(function () { n.hasClass("dynamic") ? o.remove() : (n.prev("input[type=hidden]").val("1"), o.hide()), r.trigger("cocoon:after-remove", [o]) }, s)
16    }), e(document).on("ready page:load", function () { e(".remove_fields.existing.destroyed").each(function () { var t = e(this), n = t.data("wrapper-class") || "nested-fields"; t.closest("." + n).hide() }) })
17}(jQuery), function (e) { var t = !1; if ("function" == typeof define && define.amd && (define(e), t = !0), "object" == typeof exports && (module.exports = e(), t = !0), !t) { var n = window.Cookies, i = window.Cookies = e(); i.noConflict = function () { return window.Cookies = n, i } } }(function () { function e() { for (var e = 0, t = {}; e < arguments.length; e++) { var n = arguments[e]; for (var i in n) t[i] = n[i] } return t } function t(n) { function i(t, o, r) { var s; if ("undefined" != typeof document) { if (arguments.length > 1) { if (r = e({ path: "/" }, i.defaults, r), "number" == typeof r.expires) { var a = new Date; a.setMilliseconds(a.getMilliseconds() + 864e5 * r.expires), r.expires = a } r.expires = r.expires ? r.expires.toUTCString() : ""; try { s = JSON.stringify(o), /^[\{\[]/.test(s) && (o = s) } catch (l) { } o = n.write ? n.write(o, t) : encodeURIComponent(String(o)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent), t = encodeURIComponent(String(t)), t = t.replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent), t = t.replace(/[\(\)]/g, escape); var c = ""; for (var d in r) r[d] && (c += "; " + d, r[d] !== !0 && (c += "=" + r[d])); return document.cookie = t + "=" + o + c } t || (s = {}); for (var u = document.cookie ? document.cookie.split("; ") : [], h = /(%[0-9A-Z]{2})+/g, p = 0; p < u.length; p++) { var f = u[p].split("="), m = f.slice(1).join("="); '"' === m.charAt(0) && (m = m.slice(1, -1)); try { var g = f[0].replace(h, decodeURIComponent); if (m = n.read ? n.read(m, g) : n(m, g) || m.replace(h, decodeURIComponent), this.json) try { m = JSON.parse(m) } catch (l) { } if (t === g) { s = m; break } t || (s[g] = m) } catch (l) { } } return s } } return i.set = i, i.get = function (e) { return i.call(i, e) }, i.getJSON = function () { return i.apply({ json: !0 }, [].slice.call(arguments)) }, i.defaults = {}, i.remove = function (t, n) { i(t, "", e(n, { expires: -1 })) }, i.withConverter = t, i } return t(function () { }) }), function (e) { "function" == typeof define && define.amd ? define(["jquery"], e) : e(jQuery) }(function (e) {
18    e.ui = e.ui || {}; var t = (e.ui.version = "1.12.1", 0), n = Array.prototype.slice; e.cleanData = function (t) { return function (n) { var i, o, r; for (r = 0; null != (o = n[r]); r++)try { i = e._data(o, "events"), i && i.remove && e(o).triggerHandler("remove") } catch (s) { } t(n) } }(e.cleanData), e.widget = function (t, n, i) { var o, r, s, a = {}, l = t.split(".")[0]; t = t.split(".")[1]; var c = l + "-" + t; return i || (i = n, n = e.Widget), e.isArray(i) && (i = e.extend.apply(null, [{}].concat(i))), e.expr[":"][c.toLowerCase()] = function (t) { return !!e.data(t, c) }, e[l] = e[l] || {}, o = e[l][t], r = e[l][t] = function (e, t) { return this._createWidget ? void (arguments.length && this._createWidget(e, t)) : new r(e, t) }, e.extend(r, o, { version: i.version, _proto: e.extend({}, i), _childConstructors: [] }), s = new n, s.options = e.widget.extend({}, s.options), e.each(i, function (t, i) { return e.isFunction(i) ? void (a[t] = function () { function e() { return n.prototype[t].apply(this, arguments) } function o(e) { return n.prototype[t].apply(this, e) } return function () { var t, n = this._super, r = this._superApply; return this._super = e, this._superApply = o, t = i.apply(this, arguments), this._super = n, this._superApply = r, t } }()) : void (a[t] = i) }), r.prototype = e.widget.extend(s, { widgetEventPrefix: o ? s.widgetEventPrefix || t : t }, a, { constructor: r, namespace: l, widgetName: t, widgetFullName: c }), o ? (e.each(o._childConstructors, function (t, n) { var i = n.prototype; e.widget(i.namespace + "." + i.widgetName, r, n._proto) }), delete o._childConstructors) : n._childConstructors.push(r), e.widget.bridge(t, r), r }, e.widget.extend = function (t) { for (var i, o, r = n.call(arguments, 1), s = 0, a = r.length; a > s; s++)for (i in r[s]) o = r[s][i], r[s].hasOwnProperty(i) && void 0 !== o && (e.isPlainObject(o) ? t[i] = e.isPlainObject(t[i]) ? e.widget.extend({}, t[i], o) : e.widget.extend({}, o) : t[i] = o); return t }, e.widget.bridge = function (t, i) { var o = i.prototype.widgetFullName || t; e.fn[t] = function (r) { var s = "string" == typeof r, a = n.call(arguments, 1), l = this; return s ? this.length || "instance" !== r ? this.each(function () { var n, i = e.data(this, o); return "instance" === r ? (l = i, !1) : i ? e.isFunction(i[r]) && "_" !== r.charAt(0) ? (n = i[r].apply(i, a), n !== i && void 0 !== n ? (l = n && n.jquery ? l.pushStack(n.get()) : n, !1) : void 0) : e.error("no such method '" + r + "' for " + t + " widget instance") : e.error("cannot call methods on " + t + " prior to initialization; attempted to call method '" + r + "'") }) : l = void 0 : (a.length && (r = e.widget.extend.apply(null, [r].concat(a))), this.each(function () { var t = e.data(this, o); t ? (t.option(r || {}), t._init && t._init()) : e.data(this, o, new i(r, this)) })), l } }, e.Widget = function () { }, e.Widget._childConstructors = [], e.Widget.prototype = { widgetName: "widget", widgetEventPrefix: "", defaultElement: "<div>", options: { classes: {}, disabled: !1, create: null }, _createWidget: function (n, i) { i = e(i || this.defaultElement || this)[0], this.element = e(i), this.uuid = t++, this.eventNamespace = "." + this.widgetName + this.uuid, this.bindings = e(), this.hoverable = e(), this.focusable = e(), this.classesElementLookup = {}, i !== this && (e.data(i, this.widgetFullName, this), this._on(!0, this.element, { remove: function (e) { e.target === i && this.destroy() } }), this.document = e(i.style ? i.ownerDocument : i.document || i), this.window = e(this.document[0].defaultView || this.document[0].parentWindow)), this.options = e.widget.extend({}, this.options, this._getCreateOptions(), n), this._create(), this.options.disabled && this._setOptionDisabled(this.options.disabled), this._trigger("create", null, this._getCreateEventData()), this._init() }, _getCreateOptions: function () { return {} }, _getCreateEventData: e.noop, _create: e.noop, _init: e.noop, destroy: function () { var t = this; this._destroy(), e.each(this.classesElementLookup, function (e, n) { t._removeClass(n, e) }), this.element.off(this.eventNamespace).removeData(this.widgetFullName), this.widget().off(this.eventNamespace).removeAttr("aria-disabled"), this.bindings.off(this.eventNamespace) }, _destroy: e.noop, widget: function () { return this.element }, option: function (t, n) { var i, o, r, s = t; if (0 === arguments.length) return e.widget.extend({}, this.options); if ("string" == typeof t) if (s = {}, i = t.split("."), t = i.shift(), i.length) { for (o = s[t] = e.widget.extend({}, this.options[t]), r = 0; r < i.length - 1; r++)o[i[r]] = o[i[r]] || {}, o = o[i[r]]; if (t = i.pop(), 1 === arguments.length) return void 0 === o[t] ? null : o[t]; o[t] = n } else { if (1 === arguments.length) return void 0 === this.options[t] ? null : this.options[t]; s[t] = n } return this._setOptions(s), this }, _setOptions: function (e) { var t; for (t in e) this._setOption(t, e[t]); return this }, _setOption: function (e, t) { return "classes" === e && this._setOptionClasses(t), this.options[e] = t, "disabled" === e && this._setOptionDisabled(t), this }, _setOptionClasses: function (t) { var n, i, o; for (n in t) o = this.classesElementLookup[n], t[n] !== this.options.classes[n] && o && o.length && (i = e(o.get()), this._removeClass(o, n), i.addClass(this._classes({ element: i, keys: n, classes: t, add: !0 }))) }, _setOptionDisabled: function (e) { this._toggleClass(this.widget(), this.widgetFullName + "-disabled", null, !!e), e && (this._removeClass(this.hoverable, null, "ui-state-hover"), this._removeClass(this.focusable, null, "ui-state-focus")) }, enable: function () { return this._setOptions({ disabled: !1 }) }, disable: function () { return this._setOptions({ disabled: !0 }) }, _classes: function (t) { function n(n, r) { var s, a; for (a = 0; a < n.length; a++)s = o.classesElementLookup[n[a]] || e(), s = e(t.add ? e.unique(s.get().concat(t.element.get())) : s.not(t.element).get()), o.classesElementLookup[n[a]] = s, i.push(n[a]), r && t.classes[n[a]] && i.push(t.classes[n[a]]) } var i = [], o = this; return t = e.extend({ element: this.element, classes: this.options.classes || {} }, t), this._on(t.element, { remove: "_untrackClassesElement" }), t.keys && n(t.keys.match(/\S+/g) || [], !0), t.extra && n(t.extra.match(/\S+/g) || []), i.join(" ") }, _untrackClassesElement: function (t) { var n = this; e.each(n.classesElementLookup, function (i, o) { -1 !== e.inArray(t.target, o) && (n.classesElementLookup[i] = e(o.not(t.target).get())) }) }, _removeClass: function (e, t, n) { return this._toggleClass(e, t, n, !1) }, _addClass: function (e, t, n) { return this._toggleClass(e, t, n, !0) }, _toggleClass: function (e, t, n, i) { i = "boolean" == typeof i ? i : n; var o = "string" == typeof e || null === e, r = { extra: o ? t : n, keys: o ? e : t, element: o ? this.element : e, add: i }; return r.element.toggleClass(this._classes(r), i), this }, _on: function (t, n, i) { var o, r = this; "boolean" != typeof t && (i = n, n = t, t = !1), i ? (n = o = e(n), this.bindings = this.bindings.add(n)) : (i = n, n = this.element, o = this.widget()), e.each(i, function (i, s) { function a() { return t || r.options.disabled !== !0 && !e(this).hasClass("ui-state-disabled") ? ("string" == typeof s ? r[s] : s).apply(r, arguments) : void 0 } "string" != typeof s && (a.guid = s.guid = s.guid || a.guid || e.guid++); var l = i.match(/^([\w:-]*)\s*(.*)$/), c = l[1] + r.eventNamespace, d = l[2]; d ? o.on(c, d, a) : n.on(c, a) }) }, _off: function (t, n) { n = (n || "").split(" ").join(this.eventNamespace + " ") + this.eventNamespace, t.off(n).off(n), this.bindings = e(this.bindings.not(t).get()), this.focusable = e(this.focusable.not(t).get()), this.hoverable = e(this.hoverable.not(t).get()) }, _delay: function (e, t) { function n() { return ("string" == typeof e ? i[e] : e).apply(i, arguments) } var i = this; return setTimeout(n, t || 0) }, _hoverable: function (t) { this.hoverable = this.hoverable.add(t), this._on(t, { mouseenter: function (t) { this._addClass(e(t.currentTarget), null, "ui-state-hover") }, mouseleave: function (t) { this._removeClass(e(t.currentTarget), null, "ui-state-hover") } }) }, _focusable: function (t) { this.focusable = this.focusable.add(t), this._on(t, { focusin: function (t) { this._addClass(e(t.currentTarget), null, "ui-state-focus") }, focusout: function (t) { this._removeClass(e(t.currentTarget), null, "ui-state-focus") } }) }, _trigger: function (t, n, i) { var o, r, s = this.options[t]; if (i = i || {}, n = e.Event(n), n.type = (t === this.widgetEventPrefix ? t : this.widgetEventPrefix + t).toLowerCase(), n.target = this.element[0], r = n.originalEvent) for (o in r) o in n || (n[o] = r[o]); return this.element.trigger(n, i), !(e.isFunction(s) && s.apply(this.element[0], [n].concat(i)) === !1 || n.isDefaultPrevented()) } }, e.each({ show: "fadeIn", hide: "fadeOut" }, function (t, n) { e.Widget.prototype["_" + t] = function (i, o, r) { "string" == typeof o && (o = { effect: o }); var s, a = o ? o === !0 || "number" == typeof o ? n : o.effect || n : t; o = o || {}, "number" == typeof o && (o = { duration: o }), s = !e.isEmptyObject(o), o.complete = r, o.delay && i.delay(o.delay), s && e.effects && e.effects.effect[a] ? i[t](o) : a !== t && i[a] ? i[a](o.duration, o.easing, r) : i.queue(function (n) { e(this)[t](), r && r.call(i[0]), n() }) } }); e.widget, e.ui.keyCode = { BACKSPACE: 8, COMMA: 188, DELETE: 46, DOWN: 40, END: 35, ENTER: 13, ESCAPE: 27, HOME: 36, LEFT: 37, PAGE_DOWN: 34, PAGE_UP: 33, PERIOD: 190, RIGHT: 39, SPACE: 32, TAB: 9, UP: 38 }, e.fn.extend({ uniqueId: function () { var e = 0; return function () { return this.each(function () { this.id || (this.id = "ui-id-" + ++e) }) } }(), removeUniqueId: function () { return this.each(function () { /^ui-id-\d+$/.test(this.id) && e(this).removeAttr("id") }) } }), e.widget("ui.accordion", { version: "1.12.1", options: { active: 0, animate: {}, classes: { "ui-accordion-header": "ui-corner-top", "ui-accordion-header-collapsed": "ui-corner-all", "ui-accordion-content": "ui-corner-bottom" }, collapsible: !1, event: "click", header: "> li > :first-child, > :not(li):even", heightStyle: "auto", icons: { activeHeader: "ui-icon-triangle-1-s", header: "ui-icon-triangle-1-e" }, activate: null, beforeActivate: null }, hideProps: { borderTopWidth: "hide", borderBottomWidth: "hide", paddingTop: "hide", paddingBottom: "hide", height: "hide" }, showProps: { borderTopWidth: "show", borderBottomWidth: "show", paddingTop: "show", paddingBottom: "show", height: "show" }, _create: function () { var t = this.options; this.prevShow = this.prevHide = e(), this._addClass("ui-accordion", "ui-widget ui-helper-reset"), this.element.attr("role", "tablist"), t.collapsible || t.active !== !1 && null != t.active || (t.active = 0), this._processPanels(), t.active < 0 && (t.active += this.headers.length), this._refresh() }, _getCreateEventData: function () { return { header: this.active, panel: this.active.length ? this.active.next() : e() } }, _createIcons: function () { var t, n, i = this.options.icons; i && (t = e("<span>"), this._addClass(t, "ui-accordion-header-icon", "ui-icon " + i.header), t.prependTo(this.headers), n = this.active.children(".ui-accordion-header-icon"), this._removeClass(n, i.header)._addClass(n, null, i.activeHeader)._addClass(this.headers, "ui-accordion-icons")) }, _destroyIcons: function () { this._removeClass(this.headers, "ui-accordion-icons"), this.headers.children(".ui-accordion-header-icon").remove() }, _destroy: function () { var e; this.element.removeAttr("role"), this.headers.removeAttr("role aria-expanded aria-selected aria-controls tabIndex").removeUniqueId(), this._destroyIcons(), e = this.headers.next().css("display", "").removeAttr("role aria-hidden aria-labelledby").removeUniqueId(), "content" !== this.options.heightStyle && e.css("height", "") }, _setOption: function (e, t) { return "active" === e ? void this._activate(t) : ("event" === e && (this.options.event && this._off(this.headers, this.options.event), this._setupEvents(t)), this._super(e, t), "collapsible" !== e || t || this.options.active !== !1 || this._activate(0), void ("icons" === e && (this._destroyIcons(), t && this._createIcons()))) }, _setOptionDisabled: function (e) { this._super(e), this.element.attr("aria-disabled", e), this._toggleClass(null, "ui-state-disabled", !!e), this._toggleClass(this.headers.add(this.headers.next()), null, "ui-state-disabled", !!e) }, _keydown: function (t) { if (!t.altKey && !t.ctrlKey) { var n = e.ui.keyCode, i = this.headers.length, o = this.headers.index(t.target), r = !1; switch (t.keyCode) { case n.RIGHT: case n.DOWN: r = this.headers[(o + 1) % i]; break; case n.LEFT: case n.UP: r = this.headers[(o - 1 + i) % i]; break; case n.SPACE: case n.ENTER: this._eventHandler(t); break; case n.HOME: r = this.headers[0]; break; case n.END: r = this.headers[i - 1] }r && (e(t.target).attr("tabIndex", -1), e(r).attr("tabIndex", 0), e(r).trigger("focus"), t.preventDefault()) } }, _panelKeyDown: function (t) { t.keyCode === e.ui.keyCode.UP && t.ctrlKey && e(t.currentTarget).prev().trigger("focus") }, refresh: function () { var t = this.options; this._processPanels(), t.active === !1 && t.collapsible === !0 || !this.headers.length ? (t.active = !1, this.active = e()) : t.active === !1 ? this._activate(0) : this.active.length && !e.contains(this.element[0], this.active[0]) ? this.headers.length === this.headers.find(".ui-state-disabled").length ? (t.active = !1, this.active = e()) : this._activate(Math.max(0, t.active - 1)) : t.active = this.headers.index(this.active), this._destroyIcons(), this._refresh() }, _processPanels: function () { var e = this.headers, t = this.panels; this.headers = this.element.find(this.options.header), this._addClass(this.headers, "ui-accordion-header ui-accordion-header-collapsed", "ui-state-default"), this.panels = this.headers.next().filter(":not(.ui-accordion-content-active)").hide(), this._addClass(this.panels, "ui-accordion-content", "ui-helper-reset ui-widget-content"), t && (this._off(e.not(this.headers)), this._off(t.not(this.panels))) }, _refresh: function () { var t, n = this.options, i = n.heightStyle, o = this.element.parent(); this.active = this._findActive(n.active), this._addClass(this.active, "ui-accordion-header-active", "ui-state-active")._removeClass(this.active, "ui-accordion-header-collapsed"), this._addClass(this.active.next(), "ui-accordion-content-active"), this.active.next().show(), this.headers.attr("role", "tab").each(function () { var t = e(this), n = t.uniqueId().attr("id"), i = t.next(), o = i.uniqueId().attr("id"); t.attr("aria-controls", o), i.attr("aria-labelledby", n) }).next().attr("role", "tabpanel"), this.headers.not(this.active).attr({ "aria-selected": "false", "aria-expanded": "false", tabIndex: -1 }).next().attr({ "aria-hidden": "true" }).hide(), this.active.length ? this.active.attr({ "aria-selected": "true", "aria-expanded": "true", tabIndex: 0 }).next().attr({ "aria-hidden": "false" }) : this.headers.eq(0).attr("tabIndex", 0), this._createIcons(), this._setupEvents(n.event), "fill" === i ? (t = o.height(), this.element.siblings(":visible").each(function () { var n = e(this), i = n.css("position"); "absolute" !== i && "fixed" !== i && (t -= n.outerHeight(!0)) }), this.headers.each(function () { t -= e(this).outerHeight(!0) }), this.headers.next().each(function () { e(this).height(Math.max(0, t - e(this).innerHeight() + e(this).height())) }).css("overflow", "auto")) : "auto" === i && (t = 0, this.headers.next().each(function () { var n = e(this).is(":visible"); n || e(this).show(), t = Math.max(t, e(this).css("height", "").height()), n || e(this).hide() }).height(t)) }, _activate: function (t) { var n = this._findActive(t)[0]; n !== this.active[0] && (n = n || this.active[0], this._eventHandler({ target: n, currentTarget: n, preventDefault: e.noop })) }, _findActive: function (t) { return "number" == typeof t ? this.headers.eq(t) : e() }, _setupEvents: function (t) { var n = { keydown: "_keydown" }; t && e.each(t.split(" "), function (e, t) { n[t] = "_eventHandler" }), this._off(this.headers.add(this.headers.next())), this._on(this.headers, n), this._on(this.headers.next(), { keydown: "_panelKeyDown" }), this._hoverable(this.headers), this._focusable(this.headers) }, _eventHandler: function (t) { var n, i, o = this.options, r = this.active, s = e(t.currentTarget), a = s[0] === r[0], l = a && o.collapsible, c = l ? e() : s.next(), d = r.next(), u = { oldHeader: r, oldPanel: d, newHeader: l ? e() : s, newPanel: c }; t.preventDefault(), a && !o.collapsible || this._trigger("beforeActivate", t, u) === !1 || (o.active = l ? !1 : this.headers.index(s), this.active = a ? e() : s, this._toggle(u), this._removeClass(r, "ui-accordion-header-active", "ui-state-active"), o.icons && (n = r.children(".ui-accordion-header-icon"), this._removeClass(n, null, o.icons.activeHeader)._addClass(n, null, o.icons.header)), a || (this._removeClass(s, "ui-accordion-header-collapsed")._addClass(s, "ui-accordion-header-active", "ui-state-active"), o.icons && (i = s.children(".ui-accordion-header-icon"), this._removeClass(i, null, o.icons.header)._addClass(i, null, o.icons.activeHeader)), this._addClass(s.next(), "ui-accordion-content-active"))) }, _toggle: function (t) { var n = t.newPanel, i = this.prevShow.length ? this.prevShow : t.oldPanel; this.prevShow.add(this.prevHide).stop(!0, !0), this.prevShow = n, this.prevHide = i, this.options.animate ? this._animate(n, i, t) : (i.hide(), n.show(), this._toggleComplete(t)), i.attr({ "aria-hidden": "true" }), i.prev().attr({ "aria-selected": "false", "aria-expanded": "false" }), n.length && i.length ? i.prev().attr({ tabIndex: -1, "aria-expanded": "false" }) : n.length && this.headers.filter(function () { return 0 === parseInt(e(this).attr("tabIndex"), 10) }).attr("tabIndex", -1), n.attr("aria-hidden", "false").prev().attr({ "aria-selected": "true", "aria-expanded": "true", tabIndex: 0 }) }, _animate: function (e, t, n) { var i, o, r, s = this, a = 0, l = e.css("box-sizing"), c = e.length && (!t.length || e.index() < t.index()), d = this.options.animate || {}, u = c && d.down || d, h = function () { s._toggleComplete(n) }; return "number" == typeof u && (r = u), "string" == typeof u && (o = u), o = o || u.easing || d.easing, r = r || u.duration || d.duration, t.length ? e.length ? (i = e.show().outerHeight(), t.animate(this.hideProps, { duration: r, easing: o, step: function (e, t) { t.now = Math.round(e) } }), void e.hide().animate(this.showProps, { duration: r, easing: o, complete: h, step: function (e, n) { n.now = Math.round(e), "height" !== n.prop ? "content-box" === l && (a += n.now) : "content" !== s.options.heightStyle && (n.now = Math.round(i - t.outerHeight() - a), a = 0) } })) : t.animate(this.hideProps, r, o, h) : e.animate(this.showProps, r, o, h) }, _toggleComplete: function (e) { var t = e.oldPanel, n = t.prev(); this._removeClass(t, "ui-accordion-content-active"), this._removeClass(n, "ui-accordion-header-active")._addClass(n, "ui-accordion-header-collapsed"), t.length && (t.parent()[0].className = t.parent()[0].className), this._trigger("activate", null, e) } }), e.ui.escapeSelector = function () { var e = /([!"#$%&'()*+,.\/:;<=>?@[\]^`{|}~])/g; return function (t) { return t.replace(e, "\\$1") } }(), e.ui.safeActiveElement = function (e) { var t; try { t = e.activeElement } catch (n) { t = e.body } return t || (t = e.body), t.nodeName || (t = e.body), t }; e.widget("ui.tabs", { version: "1.12.1", delay: 300, options: { active: null, classes: { "ui-tabs": "ui-corner-all", "ui-tabs-nav": "ui-corner-all", "ui-tabs-panel": "ui-corner-bottom", "ui-tabs-tab": "ui-corner-top" }, collapsible: !1, event: "click", heightStyle: "content", hide: null, show: null, activate: null, beforeActivate: null, beforeLoad: null, load: null }, _isLocal: function () { var e = /#.*$/; return function (t) { var n, i; n = t.href.replace(e, ""), i = location.href.replace(e, ""); try { n = decodeURIComponent(n) } catch (o) { } try { i = decodeURIComponent(i) } catch (o) { } return t.hash.length > 1 && n === i } }(), _create: function () { var t = this, n = this.options; this.running = !1, this._addClass("ui-tabs", "ui-widget ui-widget-content"), this._toggleClass("ui-tabs-collapsible", null, n.collapsible), this._processTabs(), n.active = this._initialActive(), e.isArray(n.disabled) && (n.disabled = e.unique(n.disabled.concat(e.map(this.tabs.filter(".ui-state-disabled"), function (e) { return t.tabs.index(e) }))).sort()), this.options.active !== !1 && this.anchors.length ? this.active = this._findActive(n.active) : this.active = e(), this._refresh(), this.active.length && this.load(n.active) }, _initialActive: function () { var t = this.options.active, n = this.options.collapsible, i = location.hash.substring(1); return null === t && (i && this.tabs.each(function (n, o) { return e(o).attr("aria-controls") === i ? (t = n, !1) : void 0 }), null === t && (t = this.tabs.index(this.tabs.filter(".ui-tabs-active"))), null !== t && -1 !== t || (t = this.tabs.length ? 0 : !1)), t !== !1 && (t = this.tabs.index(this.tabs.eq(t)), -1 === t && (t = n ? !1 : 0)), !n && t === !1 && this.anchors.length && (t = 0), t }, _getCreateEventData: function () { return { tab: this.active, panel: this.active.length ? this._getPanelForTab(this.active) : e() } }, _tabKeydown: function (t) { var n = e(e.ui.safeActiveElement(this.document[0])).closest("li"), i = this.tabs.index(n), o = !0; if (!this._handlePageNav(t)) { switch (t.keyCode) { case e.ui.keyCode.RIGHT: case e.ui.keyCode.DOWN: i++; break; case e.ui.keyCode.UP: case e.ui.keyCode.LEFT: o = !1, i--; break; case e.ui.keyCode.END: i = this.anchors.length - 1; break; case e.ui.keyCode.HOME: i = 0; break; case e.ui.keyCode.SPACE: return t.preventDefault(), clearTimeout(this.activating), void this._activate(i); case e.ui.keyCode.ENTER: return t.preventDefault(), clearTimeout(this.activating), void this._activate(i === this.options.active ? !1 : i); default: return }t.preventDefault(), clearTimeout(this.activating), i = this._focusNextTab(i, o), t.ctrlKey || t.metaKey || (n.attr("aria-selected", "false"), this.tabs.eq(i).attr("aria-selected", "true"), this.activating = this._delay(function () { this.option("active", i) }, this.delay)) } }, _panelKeydown: function (t) { this._handlePageNav(t) || t.ctrlKey && t.keyCode === e.ui.keyCode.UP && (t.preventDefault(), this.active.trigger("focus")) }, _handlePageNav: function (t) { return t.altKey && t.keyCode === e.ui.keyCode.PAGE_UP ? (this._activate(this._focusNextTab(this.options.active - 1, !1)), !0) : t.altKey && t.keyCode === e.ui.keyCode.PAGE_DOWN ? (this._activate(this._focusNextTab(this.options.active + 1, !0)), !0) : void 0 }, _findNextTab: function (t, n) { function i() { return t > o && (t = 0), 0 > t && (t = o), t } for (var o = this.tabs.length - 1; -1 !== e.inArray(i(), this.options.disabled);)t = n ? t + 1 : t - 1; return t }, _focusNextTab: function (e, t) { return e = this._findNextTab(e, t), this.tabs.eq(e).trigger("focus"), e }, _setOption: function (e, t) { return "active" === e ? void this._activate(t) : (this._super(e, t), "collapsible" === e && (this._toggleClass("ui-tabs-collapsible", null, t), t || this.options.active !== !1 || this._activate(0)), "event" === e && this._setupEvents(t), void ("heightStyle" === e && this._setupHeightStyle(t))) }, _sanitizeSelector: function (e) { return e ? e.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g, "\\$&") : "" }, refresh: function () { var t = this.options, n = this.tablist.children(":has(a[href])"); t.disabled = e.map(n.filter(".ui-state-disabled"), function (e) { return n.index(e) }), this._processTabs(), t.active !== !1 && this.anchors.length ? this.active.length && !e.contains(this.tablist[0], this.active[0]) ? this.tabs.length === t.disabled.length ? (t.active = !1, this.active = e()) : this._activate(this._findNextTab(Math.max(0, t.active - 1), !1)) : t.active = this.tabs.index(this.active) : (t.active = !1, this.active = e()), this._refresh() }, _refresh: function () { this._setOptionDisabled(this.options.disabled), this._setupEvents(this.options.event), this._setupHeightStyle(this.options.heightStyle), this.tabs.not(this.active).attr({ "aria-selected": "false", "aria-expanded": "false", tabIndex: -1 }), this.panels.not(this._getPanelForTab(this.active)).hide().attr({ "aria-hidden": "true" }), this.active.length ? (this.active.attr({ "aria-selected": "true", "aria-expanded": "true", tabIndex: 0 }), this._addClass(this.active, "ui-tabs-active", "ui-state-active"), this._getPanelForTab(this.active).show().attr({ "aria-hidden": "false" })) : this.tabs.eq(0).attr("tabIndex", 0) }, _processTabs: function () { var t = this, n = this.tabs, i = this.anchors, o = this.panels; this.tablist = this._getList().attr("role", "tablist"), this._addClass(this.tablist, "ui-tabs-nav", "ui-helper-reset ui-helper-clearfix ui-widget-header"), this.tablist.on("mousedown" + this.eventNamespace, "> li", function (t) { e(this).is(".ui-state-disabled") && t.preventDefault() }).on("focus" + this.eventNamespace, ".ui-tabs-anchor", function () { e(this).closest("li").is(".ui-state-disabled") && this.blur() }), this.tabs = this.tablist.find("> li:has(a[href])").attr({ role: "tab", tabIndex: -1 }), this._addClass(this.tabs, "ui-tabs-tab", "ui-state-default"), this.anchors = this.tabs.map(function () { return e("a", this)[0] }).attr({ role: "presentation", tabIndex: -1 }), this._addClass(this.anchors, "ui-tabs-anchor"), this.panels = e(), this.anchors.each(function (n, i) { var o, r, s, a = e(i).uniqueId().attr("id"), l = e(i).closest("li"), c = l.attr("aria-controls"); t._isLocal(i) ? (o = i.hash, s = o.substring(1), r = t.element.find(t._sanitizeSelector(o))) : (s = l.attr("aria-controls") || e({}).uniqueId()[0].id, o = "#" + s, r = t.element.find(o), r.length || (r = t._createPanel(s), r.insertAfter(t.panels[n - 1] || t.tablist)), r.attr("aria-live", "polite")), r.length && (t.panels = t.panels.add(r)), c && l.data("ui-tabs-aria-controls", c), l.attr({ "aria-controls": s, "aria-labelledby": a }), r.attr("aria-labelledby", a) }), this.panels.attr("role", "tabpanel"), this._addClass(this.panels, "ui-tabs-panel", "ui-widget-content"), n && (this._off(n.not(this.tabs)), this._off(i.not(this.anchors)), this._off(o.not(this.panels))) }, _getList: function () { return this.tablist || this.element.find("ol, ul").eq(0) }, _createPanel: function (t) { return e("<div>").attr("id", t).data("ui-tabs-destroy", !0) }, _setOptionDisabled: function (t) { var n, i, o; for (e.isArray(t) && (t.length ? t.length === this.anchors.length && (t = !0) : t = !1), o = 0; i = this.tabs[o]; o++)n = e(i), t === !0 || -1 !== e.inArray(o, t) ? (n.attr("aria-disabled", "true"), this._addClass(n, null, "ui-state-disabled")) : (n.removeAttr("aria-disabled"), this._removeClass(n, null, "ui-state-disabled")); this.options.disabled = t, this._toggleClass(this.widget(), this.widgetFullName + "-disabled", null, t === !0) }, _setupEvents: function (t) { var n = {}; t && e.each(t.split(" "), function (e, t) { n[t] = "_eventHandler" }), this._off(this.anchors.add(this.tabs).add(this.panels)), this._on(!0, this.anchors, { click: function (e) { e.preventDefault() } }), this._on(this.anchors, n), this._on(this.tabs, { keydown: "_tabKeydown" }), this._on(this.panels, { keydown: "_panelKeydown" }), this._focusable(this.tabs), this._hoverable(this.tabs) }, _setupHeightStyle: function (t) { var n, i = this.element.parent(); "fill" === t ? (n = i.height(), n -= this.element.outerHeight() - this.element.height(), this.element.siblings(":visible").each(function () { var t = e(this), i = t.css("position"); "absolute" !== i && "fixed" !== i && (n -= t.outerHeight(!0)) }), this.element.children().not(this.panels).each(function () { n -= e(this).outerHeight(!0) }), this.panels.each(function () { e(this).height(Math.max(0, n - e(this).innerHeight() + e(this).height())) }).css("overflow", "auto")) : "auto" === t && (n = 0, this.panels.each(function () { n = Math.max(n, e(this).height("").height()) }).height(n)) }, _eventHandler: function (t) { var n = this.options, i = this.active, o = e(t.currentTarget), r = o.closest("li"), s = r[0] === i[0], a = s && n.collapsible, l = a ? e() : this._getPanelForTab(r), c = i.length ? this._getPanelForTab(i) : e(), d = { oldTab: i, oldPanel: c, newTab: a ? e() : r, newPanel: l }; t.preventDefault(), r.hasClass("ui-state-disabled") || r.hasClass("ui-tabs-loading") || this.running || s && !n.collapsible || this._trigger("beforeActivate", t, d) === !1 || (n.active = a ? !1 : this.tabs.index(r), this.active = s ? e() : r, this.xhr && this.xhr.abort(), c.length || l.length || e.error("jQuery UI Tabs: Mismatching fragment identifier."), l.length && this.load(this.tabs.index(r), t), this._toggle(t, d)) }, _toggle: function (t, n) { function i() { r.running = !1, r._trigger("activate", t, n) } function o() { r._addClass(n.newTab.closest("li"), "ui-tabs-active", "ui-state-active"), s.length && r.options.show ? r._show(s, r.options.show, i) : (s.show(), i()) } var r = this, s = n.newPanel, a = n.oldPanel; this.running = !0, a.length && this.options.hide ? this._hide(a, this.options.hide, function () { r._removeClass(n.oldTab.closest("li"), "ui-tabs-active", "ui-state-active"), o() }) : (this._removeClass(n.oldTab.closest("li"), "ui-tabs-active", "ui-state-active"), a.hide(), o()), a.attr("aria-hidden", "true"), n.oldTab.attr({ "aria-selected": "false", "aria-expanded": "false" }), s.length && a.length ? n.oldTab.attr("tabIndex", -1) : s.length && this.tabs.filter(function () { return 0 === e(this).attr("tabIndex") }).attr("tabIndex", -1), s.attr("aria-hidden", "false"), n.newTab.attr({ "aria-selected": "true", "aria-expanded": "true", tabIndex: 0 }) }, _activate: function (t) { var n, i = this._findActive(t); i[0] !== this.active[0] && (i.length || (i = this.active), n = i.find(".ui-tabs-anchor")[0], this._eventHandler({ target: n, currentTarget: n, preventDefault: e.noop })) }, _findActive: function (t) { return t === !1 ? e() : this.tabs.eq(t) }, _getIndex: function (t) { return "string" == typeof t && (t = this.anchors.index(this.anchors.filter("[href$='" + e.ui.escapeSelector(t) + "']"))), t }, _destroy: function () { this.xhr && this.xhr.abort(), this.tablist.removeAttr("role").off(this.eventNamespace), this.anchors.removeAttr("role tabIndex").removeUniqueId(), this.tabs.add(this.panels).each(function () { e.data(this, "ui-tabs-destroy") ? e(this).remove() : e(this).removeAttr("role tabIndex aria-live aria-busy aria-selected aria-labelledby aria-hidden aria-expanded") }), this.tabs.each(function () { var t = e(this), n = t.data("ui-tabs-aria-controls"); n ? t.attr("aria-controls", n).removeData("ui-tabs-aria-controls") : t.removeAttr("aria-controls") }), this.panels.show(), "content" !== this.options.heightStyle && this.panels.css("height", "") }, enable: function (t) { var n = this.options.disabled; n !== !1 && (void 0 === t ? n = !1 : (t = this._getIndex(t), n = e.isArray(n) ? e.map(n, function (e) { return e !== t ? e : null }) : e.map(this.tabs, function (e, n) { return n !== t ? n : null })), this._setOptionDisabled(n)) }, disable: function (t) { var n = this.options.disabled; if (n !== !0) { if (void 0 === t) n = !0; else { if (t = this._getIndex(t), -1 !== e.inArray(t, n)) return; n = e.isArray(n) ? e.merge([t], n).sort() : [t] } this._setOptionDisabled(n) } }, load: function (t, n) { t = this._getIndex(t); var i = this, o = this.tabs.eq(t), r = o.find(".ui-tabs-anchor"), s = this._getPanelForTab(o), a = { tab: o, panel: s }, l = function (e, t) { "abort" === t && i.panels.stop(!1, !0), i._removeClass(o, "ui-tabs-loading"), s.removeAttr("aria-busy"), e === i.xhr && delete i.xhr }; this._isLocal(r[0]) || (this.xhr = e.ajax(this._ajaxSettings(r, n, a)), this.xhr && "canceled" !== this.xhr.statusText && (this._addClass(o, "ui-tabs-loading"), s.attr("aria-busy", "true"), this.xhr.done(function (e, t, o) { setTimeout(function () { s.html(e), i._trigger("load", n, a), l(o, t) }, 1) }).fail(function (e, t) { setTimeout(function () { l(e, t) }, 1) }))) }, _ajaxSettings: function (t, n, i) { var o = this; return { url: t.attr("href").replace(/#.*$/, ""), beforeSend: function (t, r) { return o._trigger("beforeLoad", n, e.extend({ jqXHR: t, ajaxSettings: r }, i)) } } }, _getPanelForTab: function (t) { var n = e(t).attr("aria-controls"); return this.element.find(this._sanitizeSelector("#" + n)) } }), e.uiBackCompat !== !1 && e.widget("ui.tabs", e.ui.tabs, { _processTabs: function () { this._superApply(arguments), this._addClass(this.tabs, "ui-tab") } }); var i = (e.ui.tabs, "ui-effects-"), o = "ui-effects-style", r = "ui-effects-animated", s = e; e.effects = { effect: {} }, function (e, t) {
19        function n(e, t, n) { var i = u[t.type] || {}; return null == e ? n || !t.def ? null : t.def : (e = i.floor ? ~~e : parseFloat(e), isNaN(e) ? t.def : i.mod ? (e + i.mod) % i.mod : 0 > e ? 0 : i.max < e ? i.max : e) } function i(t) { var n = c(), i = n._rgba = []; return t = t.toLowerCase(), f(l, function (e, o) { var r, s = o.re.exec(t), a = s && o.parse(s), l = o.space || "rgba"; return a ? (r = n[l](a), n[d[l].cache] = r[d[l].cache], i = n._rgba = r._rgba, !1) : void 0 }), i.length ? ("0,0,0,0" === i.join() && e.extend(i, r.transparent), n) : r[t] } function o(e, t, n) { return n = (n + 1) % 1, 1 > 6 * n ? e + (t - e) * n * 6 : 1 > 2 * n ? t : 2 > 3 * n ? e + (t - e) * (2 / 3 - n) * 6 : e } var r, s = "backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor", a = /^([\-+])=\s*(\d+\.?\d*)/, l = [{ re: /rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/, parse: function (e) { return [e[1], e[2], e[3], e[4]] } }, { re: /rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/, parse: function (e) { return [2.55 * e[1], 2.55 * e[2], 2.55 * e[3], e[4]] } }, { re: /#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/, parse: function (e) { return [parseInt(e[1], 16), parseInt(e[2], 16), parseInt(e[3], 16)] } }, { re: /#([a-f0-9])([a-f0-9])([a-f0-9])/, parse: function (e) { return [parseInt(e[1] + e[1], 16), parseInt(e[2] + e[2], 16), parseInt(e[3] + e[3], 16)] } }, {
20            re: /hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/, space: "hsla", parse: function (e) {
21                return [e[1], e[2] / 100, e[3] / 100, e[4]];
22            }
23        }], c = e.Color = function (t, n, i, o) { return new e.Color.fn.parse(t, n, i, o) }, d = { rgba: { props: { red: { idx: 0, type: "byte" }, green: { idx: 1, type: "byte" }, blue: { idx: 2, type: "byte" } } }, hsla: { props: { hue: { idx: 0, type: "degrees" }, saturation: { idx: 1, type: "percent" }, lightness: { idx: 2, type: "percent" } } } }, u = { "byte": { floor: !0, max: 255 }, percent: { max: 1 }, degrees: { mod: 360, floor: !0 } }, h = c.support = {}, p = e("<p>")[0], f = e.each;
vendor: 4,376 bytes, line 23
23 p.style.cssText = "background-color:rgba(1,1,1,.5)", h.rgba = p.style.backgroundColor.indexOf("rgba") > -1, f(d, function (e, t) { t.cache = "_" + e, t.props.alpha = { idx: 3, type: "percent", def: 1 } }), c.fn = e.extend(c.prototype, { parse: function (o, s, a, l) { if (o === t) return this._rgba = [null, null, null, null], this; (o.jquery || o.nodeType) && (o = e(o).css(s), s = t); var u = this, h = e.type(o), p = this._rgba = []; return s !== t && (o = [o, s, a, l], h = "array"), "string" === h ? this.parse(i(o) || r._default) : "array" === h ? (f(d.rgba.props, function (e, t) { p[t.idx] = n(o[t.idx], t) }), this) : "object" === h ? (o instanceof c ? f(d, function (e, t) { o[t.cache] && (u[t.cache] = o[t.cache].slice()) }) : f(d, function (t, i) { var r = i.cache; f(i.props, function (e, t) { if (!u[r] && i.to) { if ("alpha" === e || null == o[e]) return; u[r] = i.to(u._rgba) } u[r][t.idx] = n(o[e], t, !0) }), u[r] && e.inArray(null, u[r].slice(0, 3)) < 0 && (u[r][3] = 1, i.from && (u._rgba = i.from(u[r]))) }), this) : void 0 }, is: function (e) { var t = c(e), n = !0, i = this; return f(d, function (e, o) { var r, s = t[o.cache]; return s && (r = i[o.cache] || o.to && o.to(i._rgba) || [], f(o.props, function (e, t) { return null != s[t.idx] ? n = s[t.idx] === r[t.idx] : void 0 })), n }), n }, _space: function () { var e = [], t = this; return f(d, function (n, i) { t[i.cache] && e.push(n) }), e.pop() }, transition: function (e, t) { var i = c(e), o = i._space(), r = d[o], s = 0 === this.alpha() ? c("transparent") : this, a = s[r.cache] || r.to(s._rgba), l = a.slice(); return i = i[r.cache], f(r.props, function (e, o) { var r = o.idx, s = a[r], c = i[r], d = u[o.type] || {}; null !== c && (null === s ? l[r] = c : (d.mod && (c - s > d.mod / 2 ? s += d.mod : s - c > d.mod / 2 && (s -= d.mod)), l[r] = n((c - s) * t + s, o))) }), this[o](l) }, blend: function (t) { if (1 === this._rgba[3]) return this; var n = this._rgba.slice(), i = n.pop(), o = c(t)._rgba; return c(e.map(n, function (e, t) { return (1 - i) * o[t] + i * e })) }, toRgbaString: function () { var t = "rgba(", n = e.map(this._rgba, function (e, t) { return null == e ? t > 2 ? 1 : 0 : e }); return 1 === n[3] && (n.pop(), t = "rgb("), t + n.join() + ")" }, toHslaString: function () { var t = "hsla(", n = e.map(this.hsla(), function (e, t) { return null == e && (e = t > 2 ? 1 : 0), t && 3 > t && (e = Math.round(100 * e) + "%"), e }); return 1 === n[3] && (n.pop(), t = "hsl("), t + n.join() + ")" }, toHexString: function (t) { var n = this._rgba.slice(), i = n.pop(); return t && n.push(~~(255 * i)), "#" + e.map(n, function (e) { return e = (e || 0).toString(16), 1 === e.length ? "0" + e : e }).join("") }, toString: function () { return 0 === this._rgba[3] ? "transparent" : this.toRgbaString() } }), c.fn.parse.prototype = c.fn, d.hsla.to = function (e) { if (null == e[0] || null == e[1] || null == e[2]) return [null, null, null, e[3]]; var t, n, i = e[0] / 255, o = e[1] / 255, r = e[2] / 255, s = e[3], a = Math.max(i, o, r), l = Math.min(i, o, r), c = a - l, d = a + l, u = .5 * d; return t = l === a ? 0 : i === a ? 60 * (o - r) / c + 360 : o === a ? 60 * (r - i) / c + 120 : 60 * (i - o) / c + 240, n = 0 === c ? 0 : .5 >= u ? c / d : c / (2 - d), [Math.round(t) % 360, n, u, null == s ? 1 : s] }, d.hsla.from = function (e) { if (null == e[0] || null == e[1] || null == e[2]) return [null, null, null, e[3]]; var t = e[0] / 360, n = e[1], i = e[2], r = e[3], s = .5 >= i ? i * (1 + n) : i + n - i * n, a = 2 * i - s; return [Math.round(255 * o(a, s, t + 1 / 3)), Math.round(255 * o(a, s, t)), Math.round(255 * o(a, s, t - 1 / 3)), r] }, f(d, function (i, o) { var r = o.props, s = o.cache, l = o.to, d = o.from; c.fn[i] = function (i) { if (l && !this[s] && (this[s] = l(this._rgba)), i === t) return this[s].slice(); var o, a = e.type(i), u = "array" === a || "object" === a ? i : arguments, h = this[s].slice(); return f(r, function (e, t) { var i = u["object" === a ? e : t.idx]; null == i && (i = h[t.idx]), h[t.idx] = n(i, t) }), d ? (o = c(d(h)), o[s] = h, o) : c(h) }, f(r, function (t, n) { c.fn[t] || (c.fn[t] = function (o) { var r, s = e.type(o), l = "alpha" === t ? this._hsla ? "hsla" : "rgba" : i, c = this[l](), d = c[n.idx]; return "undefined" === s ? d : ("function" === s && (o = o.call(this, d), s = e.type(o)), null == o && n.empty ? this 
vendor: 4,705 bytes, lines 23-24
23: ("string" === s && (r = a.exec(o), r && (o = d + parseFloat(r[2]) * ("+" === r[1] ? 1 : -1))), c[n.idx] = o, this[l](c))) }) }) }), c.hook = function (t) { var n = t.split(" "); f(n, function (t, n) { e.cssHooks[n] = { set: function (t, o) { var r, s, a = ""; if ("transparent" !== o && ("string" !== e.type(o) || (r = i(o)))) { if (o = c(r || o), !h.rgba && 1 !== o._rgba[3]) { for (s = "backgroundColor" === n ? t.parentNode : t; ("" === a || "transparent" === a) && s && s.style;)try { a = e.css(s, "backgroundColor"), s = s.parentNode } catch (l) { } o = o.blend(a && "transparent" !== a ? a : "_default") } o = o.toRgbaString() } try { t.style[n] = o } catch (l) { } } }, e.fx.step[n] = function (t) { t.colorInit || (t.start = c(t.elem, n), t.end = c(t.end), t.colorInit = !0), e.cssHooks[n].set(t.elem, t.start.transition(t.end, t.pos)) } }) }, c.hook(s), e.cssHooks.borderColor = { expand: function (e) { var t = {}; return f(["Top", "Right", "Bottom", "Left"], function (n, i) { t["border" + i + "Color"] = e }), t } }, r = e.Color.names = { aqua: "#00ffff", black: "#000000", blue: "#0000ff", fuchsia: "#ff00ff", gray: "#808080", green: "#008000", lime: "#00ff00", maroon: "#800000", navy: "#000080", olive: "#808000", purple: "#800080", red: "#ff0000", silver: "#c0c0c0", teal: "#008080", white: "#ffffff", yellow: "#ffff00", transparent: [null, null, null, 0], _default: "#ffffff" }
24    }(s), function () { function t(t) { var n, i, o = t.ownerDocument.defaultView ? t.ownerDocument.defaultView.getComputedStyle(t, null) : t.currentStyle, r = {}; if (o && o.length && o[0] && o[o[0]]) for (i = o.length; i--;)n = o[i], "string" == typeof o[n] && (r[e.camelCase(n)] = o[n]); else for (n in o) "string" == typeof o[n] && (r[n] = o[n]); return r } function n(t, n) { var i, r, s = {}; for (i in n) r = n[i], t[i] !== r && (o[i] || !e.fx.step[i] && isNaN(parseFloat(r)) || (s[i] = r)); return s } var i = ["add", "remove", "toggle"], o = { border: 1, borderBottom: 1, borderColor: 1, borderLeft: 1, borderRight: 1, borderTop: 1, borderWidth: 1, margin: 1, padding: 1 }; e.each(["borderLeftStyle", "borderRightStyle", "borderBottomStyle", "borderTopStyle"], function (t, n) { e.fx.step[n] = function (e) { ("none" !== e.end && !e.setAttr || 1 === e.pos && !e.setAttr) && (s.style(e.elem, n, e.end), e.setAttr = !0) } }), e.fn.addBack || (e.fn.addBack = function (e) { return this.add(null == e ? this.prevObject : this.prevObject.filter(e)) }), e.effects.animateClass = function (o, r, s, a) { var l = e.speed(r, s, a); return this.queue(function () { var r, s = e(this), a = s.attr("class") || "", c = l.children ? s.find("*").addBack() : s; c = c.map(function () { var n = e(this); return { el: n, start: t(this) } }), r = function () { e.each(i, function (e, t) { o[t] && s[t + "Class"](o[t]) }) }, r(), c = c.map(function () { return this.end = t(this.el[0]), this.diff = n(this.start, this.end), this }), s.attr("class", a), c = c.map(function () { var t = this, n = e.Deferred(), i = e.extend({}, l, { queue: !1, complete: function () { n.resolve(t) } }); return this.el.animate(this.diff, i), n.promise() }), e.when.apply(e, c.get()).done(function () { r(), e.each(arguments, function () { var t = this.el; e.each(this.diff, function (e) { t.css(e, "") }) }), l.complete.call(s[0]) }) }) }, e.fn.extend({ addClass: function (t) { return function (n, i, o, r) { return i ? e.effects.animateClass.call(this, { add: n }, i, o, r) : t.apply(this, arguments) } }(e.fn.addClass), removeClass: function (t) { return function (n, i, o, r) { return arguments.length > 1 ? e.effects.animateClass.call(this, { remove: n }, i, o, r) : t.apply(this, arguments) } }(e.fn.removeClass), toggleClass: function (t) { return function (n, i, o, r, s) { return "boolean" == typeof i || void 0 === i ? o ? e.effects.animateClass.call(this, i ? { add: n } : { remove: n }, o, r, s) : t.apply(this, arguments) : e.effects.animateClass.call(this, { toggle: n }, i, o, r) } }(e.fn.toggleClass), switchClass: function (t, n, i, o, r) { return e.effects.animateClass.call(this, { add: n, remove: t }, i, o, r) } }) }(), function () { function t(t, n, i, o) { return e.isPlainObject(t) && (n = t, t = t.effect), t = { effect: t }, null == n && (n = {}), e.isFunction(n) && (o = n, i = null, n = {}), ("number" == typeof n || e.fx.speeds[n]) && (o = i, i = n, n = {}), e.isFunction(i) && (o = i, i = null), n && e.extend(t, n), i = i || n.duration, t.duration = e.fx.off ? 0 : "number" == typeof i ? i : i in e.fx.speeds ? e.fx.speeds[i] : e.fx.speeds._default, t.complete = o || n.complete, t } function n(t) { return !t || "number" == typeof t || e.fx.speeds[t] ? !0 : "string" != typeof t || e.effects.effect[t] ? e.
vendor: 8,303 bytes, line 24
24isFunction(t) ? !0 : "object" == typeof t && !t.effect : !0 } function s(e, t) { var n = t.outerWidth(), i = t.outerHeight(), o = /^rect\((-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto)\)$/, r = o.exec(e) || ["", 0, n, i, 0]; return { top: parseFloat(r[1]) || 0, right: "auto" === r[2] ? n : parseFloat(r[2]), bottom: "auto" === r[3] ? i : parseFloat(r[3]), left: parseFloat(r[4]) || 0 } } e.expr && e.expr.filters && e.expr.filters.animated && (e.expr.filters.animated = function (t) { return function (n) { return !!e(n).data(r) || t(n) } }(e.expr.filters.animated)), e.uiBackCompat !== !1 && e.extend(e.effects, { save: function (e, t) { for (var n = 0, o = t.length; o > n; n++)null !== t[n] && e.data(i + t[n], e[0].style[t[n]]) }, restore: function (e, t) { for (var n, o = 0, r = t.length; r > o; o++)null !== t[o] && (n = e.data(i + t[o]), e.css(t[o], n)) }, setMode: function (e, t) { return "toggle" === t && (t = e.is(":hidden") ? "show" : "hide"), t }, createWrapper: function (t) { if (t.parent().is(".ui-effects-wrapper")) return t.parent(); var n = { width: t.outerWidth(!0), height: t.outerHeight(!0), "float": t.css("float") }, i = e("<div></div>").addClass("ui-effects-wrapper").css({ fontSize: "100%", background: "transparent", border: "none", margin: 0, padding: 0 }), o = { width: t.width(), height: t.height() }, r = document.activeElement; try { r.id } catch (s) { r = document.body } return t.wrap(i), (t[0] === r || e.contains(t[0], r)) && e(r).trigger("focus"), i = t.parent(), "static" === t.css("position") ? (i.css({ position: "relative" }), t.css({ position: "relative" })) : (e.extend(n, { position: t.css("position"), zIndex: t.css("z-index") }), e.each(["top", "left", "bottom", "right"], function (e, i) { n[i] = t.css(i), isNaN(parseInt(n[i], 10)) && (n[i] = "auto") }), t.css({ position: "relative", top: 0, left: 0, right: "auto", bottom: "auto" })), t.css(o), i.css(n).show() }, removeWrapper: function (t) { var n = document.activeElement; return t.parent().is(".ui-effects-wrapper") && (t.parent().replaceWith(t), (t[0] === n || e.contains(t[0], n)) && e(n).trigger("focus")), t } }), e.extend(e.effects, { version: "1.12.1", define: function (t, n, i) { return i || (i = n, n = "effect"), e.effects.effect[t] = i, e.effects.effect[t].mode = n, i }, scaledDimensions: function (e, t, n) { if (0 === t) return { height: 0, width: 0, outerHeight: 0, outerWidth: 0 }; var i = "horizontal" !== n ? (t || 100) / 100 : 1, o = "vertical" !== n ? (t || 100) / 100 : 1; return { height: e.height() * o, width: e.width() * i, outerHeight: e.outerHeight() * o, outerWidth: e.outerWidth() * i } }, clipToBox: function (e) { return { width: e.clip.right - e.clip.left, height: e.clip.bottom - e.clip.top, left: e.clip.left, top: e.clip.top } }, unshift: function (e, t, n) { var i = e.queue(); t > 1 && i.splice.apply(i, [1, 0].concat(i.splice(t, n))), e.dequeue() }, saveStyle: function (e) { e.data(o, e[0].style.cssText) }, restoreStyle: function (e) { e[0].style.cssText = e.data(o) || "", e.removeData(o) }, mode: function (e, t) { var n = e.is(":hidden"); return "toggle" === t && (t = n ? "show" : "hide"), (n ? "hide" === t : "show" === t) && (t = "none"), t }, getBaseline: function (e, t) { var n, i; switch (e[0]) { case "top": n = 0; break; case "middle": n = .5; break; case "bottom": n = 1; break; default: n = e[0] / t.height }switch (e[1]) { case "left": i = 0; break; case "center": i = .5; break; case "right": i = 1; break; default: i = e[1] / t.width }return { x: i, y: n } }, createPlaceholder: function (t) { var n, o = t.css("position"), r = t.position(); return t.css({ marginTop: t.css("marginTop"), marginBottom: t.css("marginBottom"), marginLeft: t.css("marginLeft"), marginRight: t.css("marginRight") }).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()), /^(static|relative)/.test(o) && (o = "absolute", n = e("<" + t[0].nodeName + ">").insertAfter(t).css({ display: /^(inline|ruby)/.test(t.css("display")) ? "inline-block" : "block", visibility: "hidden", marginTop: t.css("marginTop"), marginBottom: t.css("marginBottom"), marginLeft: t.css("marginLeft"), marginRight: t.css("marginRight"), "float": t.css("float") }).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()).addClass("ui-effects-placeholder"), t.data(i + "placeholder", n)), t.css({ position: o, left: r.left, top: r.top }), n }, removePlaceholder: function (e) { var t = i + "placeholder", n = e.data(t); n && (n.remove(), e.removeData(t)) }, cleanUp: function (t) { e.effects.restoreStyle(t), e.effects.removePlaceholder(t) }, setTransition: function (t, n, i, o) { return o = o || {}, e.each(n, function (e, n) { var r = t.cssUnit(n); r[0] > 0 && (o[n] = r[0] * i + r[1]) }), o } }), e.fn.extend({ effect: function () { function n(t) { function n() { l.removeData(r), e.effects.cleanUp(l), "hide" === i.mode && l.hide(), a() } function a() { e.isFunction(c) && c.call(l[0]), e.isFunction(t) && t() } var l = e(this); i.mode = u.shift(), e.uiBackCompat === !1 || s ? "none" === i.mode ? (l[d](), a()) : o.call(l[0], i, n) : (l.is(":hidden") ? "hide" === d : "show" === d) ? (l[d](), a()) : o.call(l[0], i, a) } var i = t.apply(this, arguments), o = e.effects.effect[i.effect], s = o.mode, a = i.queue, l = a || "fx", c = i.complete, d = i.mode, u = [], h = function (t) { var n = e(this), i = e.effects.mode(n, d) || s; n.data(r, !0), u.push(i), s && ("show" === i || i === s && "hide" === i) && n.show(), s && "none" === i || e.effects.saveStyle(n), e.isFunction(t) && t() }; return e.fx.off || !o ? d ? this[d](i.duration, c) : this.each(function () { c && c.call(this) }) : a === !1 ? this.each(h).each(n) : this.queue(l, h).queue(l, n) }, show: function (e) { return function (i) { if (n(i)) return e.apply(this, arguments); var o = t.apply(this, arguments); return o.mode = "show", this.effect.call(this, o) } }(e.fn.show), hide: function (e) { return function (i) { if (n(i)) return e.apply(this, arguments); var o = t.apply(this, arguments); return o.mode = "hide", this.effect.call(this, o) } }(e.fn.hide), toggle: function (e) { return function (i) { if (n(i) || "boolean" == typeof i) return e.apply(this, arguments); var o = t.apply(this, arguments); return o.mode = "toggle", this.effect.call(this, o) } }(e.fn.toggle), cssUnit: function (t) { var n = this.css(t), i = []; return e.each(["em", "px", "%", "pt"], function (e, t) { n.indexOf(t) > 0 && (i = [parseFloat(n), t]) }), i }, cssClip: function (e) { return e ? this.css("clip", "rect(" + e.top + "px " + e.right + "px " + e.bottom + "px " + e.left + "px)") : s(this.css("clip"), this) }, transfer: function (t, n) { var i = e(this), o = e(t.to), r = "fixed" === o.css("position"), s = e("body"), a = r ? s.scrollTop() : 0, l = r ? s.scrollLeft() : 0, c = o.offset(), d = { top: c.top - a, left: c.left - l, height: o.innerHeight(), width: o.innerWidth() }, u = i.offset(), h = e("<div class='ui-effects-transfer'></div>").appendTo("body").addClass(t.className).css({ top: u.top - a, left: u.left - l, height: i.innerHeight(), width: i.innerWidth(), position: r ? "fixed" : "absolute" }).animate(d, t.duration, t.easing, function () { h.remove(), e.isFunction(n) && n() }) } }), e.fx.step.clip = function (t) { t.clipInit || (t.start = e(t.elem).cssClip(), "string" == typeof t.end && (t.end = s(t.end, t.elem)), t.clipInit = !0), e(t.elem).cssClip({ top: t.pos * (t.end.top - t.start.top) + t.start.top, right: t.pos * (t.end.right - t.start.right) + t.start.right, bottom: t.pos * (t.end.bottom - t.start.bottom) + t.start.bottom, left: t.pos * (t.end.left - t.start.left) + t.start.left }) } }(), function () { var t = {}; e.each(["Quad", "Cubic", "Quart", "Quint", "Expo"], function (e, n) { t[n] = function (t) { return Math.pow(t, e + 2) } }), e.extend(t, { Sine: function (e) { return 1 - Math.cos(e * Math.PI / 2) }, Circ: function (e) { return 1 - Math.sqrt(1 - e * e) }, Elastic: function (e) { return 0 === e || 1 === e ? e : -Math.pow(2, 8 * (e - 1)) * Math.sin((80 * (e - 1) - 7.5) * Math.PI / 15) }, Back: function (e) { return e * e * (3 * e - 2) }, Bounce: function (e) { for (var t, n = 4; e < ((t = Math.pow(2, --n)) - 1) / 11;); return 1 / Math.pow(4, 3 - n) - 7.5625 * Math.pow((3 * t - 2) / 22 - e, 2) } }
24), e.each(t, function (t, n) { e.easing["easeIn" + t] = n, e.easing["easeOut" + t] = function (e) { return 1 - n(1 - e) }, e.easing["easeInOut" + t] = function (e) { return .5 > e ? n(2 * e) / 2 : 1 - n(-2 * e + 2) / 2 } }) }(); e.effects, e.effects.define("fade", "toggle", function (t, n) { var i = "show" === t.mode; e(this).css("opacity", i ? 0 : 1).animate({ opacity: i ? 1 : 0 }, { queue: !1, duration: t.duration, easing: t.easing, complete: n }) })
25}), function (e) {
26    function t(e, n) { return new t.prototype.init(e, n) } var n = 0, o = function (e) { return this[0] = e.startOffset, this[1] = e.endOffset, this.range = e, this }; o.prototype.equals = function () { return this[0] === this[1] }, e.fn.redactor = function (n) { var i = [], o = Array.prototype.slice.call(arguments, 1); return "string" == typeof n ? this.each(function () { var t = e.data(this, "redactor"); if ("undefined" == typeof t || !e.isFunction(t[n])) return e.error('No such method "' + n + '" for Redactor'); var r = t[n].apply(t, o); void 0 !== r && r !== t && i.push(r) }) : this.each(function () { e.data(this, "redactor") || e.data(this, "redactor", t(this, n)) }), 0 === i.length ? this : 1 === i.length ? i[0] : i }, e.Redactor = t, e.Redactor.VERSION = "9.1.9", e.Redactor.opts = { rangy: !1, iframe: !1, fullpage: !1, css: !1, lang: "en", direction: "ltr", placeholder: !1, wym: !1, mobile: !0, cleanup: !0, tidyHtml: !0, pastePlainText: !1, removeEmptyTags: !0, templateVars: !1, xhtml: !1, visual: !0, focus: !1, tabindex: !1, autoresize: !0, minHeight: !1, maxHeight: !1, shortcuts: !0, autosave: !1, autosaveInterval: 60, plugins: !1, linkAnchor: !0, linkEmail: !0, linkProtocol: "http://", linkNofollow: !1, linkSize: 50, imageFloatMargin: "10px", imageGetJson: !1, imageUpload: !1, imageUploadParam: "file", fileUpload: !1, fileUploadParam: "file", clipboardUpload: !0, clipboardUploadUrl: !1, dragUpload: !0, dnbImageTypes: ["image/png", "image/jpeg", "image/gif"], s3: !1, uploadFields: !1, observeImages: !0, observeLinks: !0, modalOverlay: !0, tabSpaces: !1, tabFocus: !0, air: !1, airButtons: ["formatting", "|", "bold", "italic", "deleted", "|", "unorderedlist", "orderedlist", "outdent", "indent"], toolbar: !0, toolbarFixed: !1, toolbarFixedTarget: document, toolbarFixedTopOffset: 0, toolbarFixedBox: !1, toolbarExternal: !1, buttonSource: !0, buttonSeparator: '<li class="redactor_separator"></li>', buttonsCustom: {}, buttonsAdd: [], buttons: ["html", "|", "formatting", "|", "bold", "italic", "deleted", "|", "unorderedlist", "orderedlist", "outdent", "indent", "|", "image", "video", "file", "table", "link", "|", "alignment", "|", "horizontalrule"], activeButtons: ["deleted", "italic", "bold", "underline", "unorderedlist", "orderedlist", "alignleft", "aligncenter", "alignright", "justify", "table"], activeButtonsStates: { b: "bold", strong: "bold", i: "italic", em: "italic", del: "deleted", strike: "deleted", ul: "unorderedlist", ol: "orderedlist", u: "underline", tr: "table", td: "table", table: "table" }, activeButtonsAdd: !1, formattingTags: ["p", "blockquote", "pre", "h1", "h2", "h3", "h4", "h5", "h6"], linebreaks: !1, paragraphy: !0, convertDivs: !0, convertLinks: !0, convertImageLinks: !1, convertVideoLinks: !1, formattingPre: !1, phpTags: !1, allowedTags: !1, deniedTags: ["html", "head", "link", "body", "meta", "script", "style", "applet"], boldTag: "strong", italicTag: "em", indentValue: 20, buffer: [], rebuffer: [], textareamode: !1, emptyHtml: "<p>&#x200b;</p>", invisibleSpace: "&#x200b;", rBlockTest: /^(P|H[1-6]|LI|ADDRESS|SECTION|HEADER|FOOTER|ASIDE|ARTICLE)$/i, alignmentTags: ["P", "H1", "H2", "H3", "H4", "H5", "H6", "DD", "DL", "DT", "DIV", "TD", "BLOCKQUOTE", "OUTPUT", "FIGCAPTION", "ADDRESS", "SECTION", "HEADER", "FOOTER", "ASIDE", "ARTICLE"], ownLine: ["area", "body", "head", "hr", "i?frame", "link", "meta", "noscript", "style", "script", "table", "tbody", "thead", "tfoot"], contOwnLine: ["li", "dt", "dt", "h[1-6]", "option", "script"], newLevel: ["blockquote", "div", "dl", "fieldset", "form", "frameset", "map", "ol", "p", "pre", "select", "td", "th", "tr", "ul"], blockLevelElements: ["P", "H1", "H2", "H3", "H4", "H5", "H6", "DD", "DL", "DT", "DIV", "LI", "BLOCKQUOTE", "OUTPUT", "FIGCAPTION", "PRE", "ADDRESS", "SECTION", "HEADER", "FOOTER", "ASIDE", "ARTICLE", "TD"], langs: { en: { html: "HTML", video: "Insert Video", image: "Insert Image", table: "Table", link: "Link", link_insert: "Insert link", link_edit: "Edit link", unlink: "Unlink", formatting: "Formatting", paragraph: "Normal text", quote: "Quote", co
26de: "Code", header1: "Header 1", header2: "Header 2", header3: "Header 3", header4: "Header 4", header5: "Header 5", bold: "Bold", italic: "Italic", fontcolor: "Font Color", backcolor: "Back Color", unorderedlist: "Unordered List", orderedlist: "Ordered List", outdent: "Outdent", indent: "Indent", cancel: "Cancel", insert: "Insert", save: "Save", _delete: "Delete", insert_table: "Insert Table", insert_row_above: "Add Row Above", insert_row_below: "Add Row Below", insert_column_left: "Add Column Left", insert_column_right: "Add Column Right", delete_column: "Delete Column", delete_row: "Delete Row", delete_table: "Delete Table", rows: "Rows", columns: "Columns", add_head: "Add Head", delete_head: "Delete Head", title: "Title", image_position: "Position", none: "None", left: "Left", right: "Right", image_web_link: "Image Web Link", text: "Text", mailto: "Email", web: "URL", video_html_code: "Video Embed Code", file: "Insert File", upload: "Upload", download: "Download", choose: "Choose", or_choose: "Or choose", drop_file_here: "Drop file here", align_left: "Align text to the left", align_center: "Center text", align_right: "Align text to the right", align_justify: "Justify text", horizontalrule: "Insert Horizontal Rule", deleted: "Deleted", anchor: "Anchor", link_new_tab: "Open link in new tab", underline: "Underline", alignment: "Alignment", filename: "Name (optional)", edit: "Edit" } } }, t.fn = e.Redactor.prototype = {
27        keyCode: { BACKSPACE: 8, DELETE: 46, DOWN: 40, ENTER: 13, ESC: 27, TAB: 9, CTRL: 17, META: 91, LEFT: 37, LEFT_WIN: 91 }, init: function (t, o) { this.rtePaste = !1, this.$element = this.$source = e(t), this.uuid = n++; var r = e.extend(!0, {}, e.Redactor.opts); if (this.opts = e.extend({}, r, this.$element.data(), o), this.start = !0, this.dropdowns = [], this.sourceHeight = this.$source.css("height"), this.sourceWidth = this.$source.css("width"), this.opts.fullpage && (this.opts.iframe = !0), this.opts.linebreaks && (this.opts.paragraphy = !1), this.opts.paragraphy && (this.opts.linebreaks = !1), this.opts.toolbarFixedBox && (this.opts.toolbarFixed = !0), this.document = document, this.window = window, this.savedSel = !1, this.cleanlineBefore = new RegExp("^<(/?" + this.opts.ownLine.join("|/?") + "|" + this.opts.contOwnLine.join("|") + ")[ >]"), this.cleanlineAfter = new RegExp("^<(br|/?" + this.opts.ownLine.join("|/?") + "|/" + this.opts.contOwnLine.join("|/") + ")[ >]"), this.cleannewLevel = new RegExp("^</?(" + this.opts.newLevel.join("|") + ")[ >]"), this.rTestBlock = new RegExp("^(" + this.opts.blockLevelElements.join("|") + ")$", "i"), this.opts.linebreaks === !1) { if (this.opts.allowedTags !== !1) { var s = ["strong", "em", "del"], a = ["b", "i", "strike"]; "-1" === e.inArray("p", this.opts.allowedTags) && this.opts.allowedTags.push("p"); for (i in s) "-1" != e.inArray(s[i], this.opts.allowedTags) && this.opts.allowedTags.push(a[i]) } if (this.opts.deniedTags !== !1) { var l = e.inArray("p", this.opts.deniedTags); "-1" !== l && this.opts.deniedTags.splice(l, l) } } (this.browser("msie") || this.browser("opera")) && (this.opts.buttons = this.removeFromArrayByValue(this.opts.buttons, "horizontalrule")), this.opts.curLang = this.opts.langs[this.opts.lang], this.buildStart() }, toolbarInit: function (e) { return { html: { title: e.html, func: "toggle" }, formatting: { title: e.formatting, func: "show", dropdown: { p: { title: e.paragraph, func: "formatBlocks" }, blockquote: { title: e.quote, func: "formatQuote", className: "redactor_format_blockquote" }, pre: { title: e.code, func: "formatBlocks", className: "redactor_format_pre" }, h1: { title: e.header1, func: "formatBlocks", className: "redactor_format_h1" }, h2: { title: e.header2, func: "formatBlocks", className: "redactor_format_h2" }, h3: { title: e.header3, func: "formatBlocks", className: "redactor_format_h3" }, h4: { title: e.header4, func: "formatBlocks", className: "redactor_format_h4" }, h5: { title: e.header5, func: "formatBlocks", className: "redactor_format_h5" } } }, bold: { title: e.bold, exec: "bold" }, italic: { title: e.italic, exec: "italic" }, deleted: { title: e.deleted, exec: "strikethrough" }, underline: { title: e.underline, exec: "underline" }, unorderedlist: { title: "&bull; " + e.unorderedlist, exec: "insertunorderedlist" }, orderedlist: { title: "1. " + e.orderedlist, exec: "insertorderedlist" }, outdent: { title: "< " + e.outdent, func: "indentingOutdent" }, indent: { title: "> " + e.indent, func: "indentingIndent" }, image: { title: e.image, func: "imageShow" }, video: { title: e.video, func: "videoShow" }, file: { title: e.file, func: "fileShow" }, table: { title: e.table, func: "show", dropdown: { insert_table: { title: e.insert_table, func: "tableShow" }, separator_drop1: { name: "separator" }, insert_row_above: { title: e.insert_row_above, func: "tableAddRowAbove" }, insert_row_below: { title: e.insert_row_below, func: "tableAddRowBelow" }, insert_column_left: { title: e.insert_column_left, func: "tableAddColumnLeft" }, insert_column_right: { title: e.insert_column_right, func: "tableAddColumnRight" }, separator_drop2: { name: "separator" }, add_head: { title: e.add_head, func: "tableAddHead" }, delete_head: { title: e.delete_head, func: "tableDeleteHead" }, separator_drop3: { name: "separator" }, delete_column: { title: e.delete_column, func: "tableDeleteColumn" }, delete_row: { title: e.delete_row, func: "tableDeleteRow" }, delete_table: { title: e.delete_table, func: "tableDeleteTable" } } }, link: { title: e.link, func: "show", dropdown: { link: { title: e.link_insert, func: "linkShow" }, unlink: { title: e.unlink, exec: "unlink" } } }, fontcolor: { title: e.fontcolor, func: "show" }, backcolor: { title: e.backcolor, func: "show" }, alignment: { title: e.alignment, func: "show", dropdown: { alignleft: { title: e.align_left, func: "alignmentLeft" }, aligncenter: { title: e.align_center, func: "alignmentCenter" }, alignright: { title: e.align_right, func: "alignmentRight" }, justify: { title: e.align_justify, func: "alignmentJustify" } } }, alignleft: { title: e.align_left, func: "alignmentLeft" }, aligncenter: { title: e.align_center, func: "alignmentCenter" }, alignright: { title: e.align_right, func: "alignmentRight" }, justify: { title: e.align_justify, func: "alignmentJustify" }, horizontalrule: { exec: "inserthorizontalrule", title: e.horizontalrule } } }, callback: function (t, n, i) { var o = this.opts[t + "Callback"]; return e.isFunction(o) ? n === !1 ? o.call(this, i) : o.call(this, n, i) : i }, destroy: function () { clearInterval(this.autosaveInterval), e(window).off(".redactor"), this.$source.off("redactor-textarea"), this.$element.off(".redactor").removeData("redactor"); var t = this.get(); if (this.opts.textareamode) this.$box.after(this.$source), this.$box.remove(), this.$source.val(t).show(); else { var n = this.$editor; this.opts.iframe && (n = this.$element), this.$box.after(n), this.$box.remove(), n.removeClass("redactor_editor").removeClass("redactor_editor_wym").removeAttr("contenteditable").html(t).show() } this.opts.air && e("#redactor_air_" + this.uuid).remove() }, getObject: function () { return e.extend({}, this) }, getEditor: function () { return this.$editor }, getBox: function () { return this.$box }, getIframe: function () { return this.opts.iframe ? this.$frame : !1 }, getToolbar: function () { return this.$toolbar ? this.$toolbar : !1 }, get: function () { return this.$source.val() }, getCodeIframe: function () { this.$editor.removeAttr("contenteditable").removeAttr("dir"); var e = this.outerHtml(this.$frame.contents().children()); return this.$editor.attr({ contenteditable: !0, dir: this.opts.direction }), e }, set: function (e, t, n) { e = e.toString(), e = e.replace(/\$/g, "&#36;"), this.opts.fullpage ? this.setCodeIframe(e) : this.setEditor(e, t), "" == e && (n = !1), n !== !1 && this.placeholderRemove() }, setEditor: function (e, t) { t !== !1 && (e = this.cleanSavePreCode(e), e = this.cleanStripTags(e), e = this.cleanConvertProtected(e), e = this.cleanConvertInlineTags(e, !0), e = this.opts.linebreaks === !1 ? this.cleanConverters(e) : e.replace(/<p(.*?)>([\w\W]*?)<\/p>/gi, "$2<br>")), e = e.replace(/&amp;#36;/g, "$"), e = this.cleanEmpty(e), this.$editor.html(e), this.setNonEditable(), this.setSpansVerified(), this.sync() }, setCodeIframe: function (e) { var t = this.iframePage(); this.$frame[0].src = "about:blank", e = this.cleanConvertProtected(e), e = this.cleanConvertInlineTags(e), e = this.cleanRemoveSpaces(e), t.open(), t.write(e), t.close(), this.opts.fullpage && (this.$editor = this.$frame.contents().find("body").attr({ contenteditable: !0, dir: this.opts.direction })), this.setNonEditable(), this.setSpansVerified(), this.sync() }, setFullpageOnInit: function (e) { e = this.cleanSavePreCode(e, !0), e = this.cleanConverters(e), e = this.cleanEmpty(e), this.$editor.html(e), this.setNonEditable(), this.setSpansVerified(), this.sync() }, setSpansVerified: function () { var t = this.$editor.find("span"), n = "inline"; e.each(t, function () { var t = this.outerHTML, i = new RegExp("<" + this.tagName, "gi"), o = t.replace(i, "<" + n); i = new RegExp("</" + this.tagName, "gi"), o = o.replace(i, "</" + n), e(this).replaceWith(o) }) }, setSpansVerifiedHtml: function (e) { return e = e.replace(/<span(.*?)>/, "<inline$1>"), e.replace(/<\/span>/, "</inline>") }, setNonEditable: function () { this.$editor.find(".noneditable").attr("contenteditable", !1) }, sync: function () { var t = "";
27 if (this.cleanUnverified(), t = this.opts.fullpage ? this.getCodeIframe() : this.$editor.html(), t = this.syncClean(t), t = this.cleanRemoveEmptyTags(t), t = t.replace(/<\/li><(ul|ol)>([\w\W]*?)<\/(ul|ol)>/gi, "<$1>$2</$1></li>"), "<br>" === e.trim(t) && (t = ""), this.opts.xhtml) { var n = ["br", "hr", "img", "link", "input", "meta"]; e.each(n, function (e, n) { t = t.replace(new RegExp("<" + n + "(.*?[^/$]?)>", "gi"), "<" + n + "$1 />") }) } t = this.callback("syncBefore", !1, t), this.$source.val(t), this.callback("syncAfter", !1, t), this.start === !1 && this.callback("change", !1, t) }, syncClean: function (t) { return this.opts.fullpage || (t = this.cleanStripTags(t)), t = e.trim(t), t = this.placeholderRemoveFromCode(t), t = t.replace(/&#x200b;/gi, ""), t = t.replace(/&#8203;/gi, ""), t = t.replace(/<\/a>&nbsp;/gi, "</a> "), this.opts.linkNofollow && (t = t.replace(/<a(.*?)rel="nofollow"(.*?)>/gi, "<a$1$2>"), t = t.replace(/<a(.*?)>/gi, '<a$1 rel="nofollow">')), t = t.replace("<!--?php", "<?php"), t = t.replace("?-->", "?>"), t = t.replace(/<(.*?)class="noeditable"(.*?) contenteditable="false"(.*?)>/gi, '<$1class="noeditable"$2$3>'), t = t.replace(/ data-tagblock=""/gi, ""), t = t.replace(/<br\s?\/?>\n?<\/(P|H[1-6]|LI|ADDRESS|SECTION|HEADER|FOOTER|ASIDE|ARTICLE)>/gi, "</$1>"), t = t.replace(/<span(.*?)id="redactor-image-box"(.*?)>([\w\W]*?)<img(.*?)><\/span>/i, "$3<img$4>"), t = t.replace(/<span(.*?)id="redactor-image-resizer"(.*?)>(.*?)<\/span>/i, ""), t = t.replace(/<span(.*?)id="redactor-image-editter"(.*?)>(.*?)<\/span>/i, ""), t = t.replace(/<font(.*?)>([\w\W]*?)<\/font>/gi, "$2"), t = t.replace(/<span(.*?)>([\w\W]*?)<\/span>/gi, "$2"), t = t.replace(/<inline>/gi, "<span>"), t = t.replace(/<inline /gi, "<span "), t = t.replace(/<\/inline>/gi, "</span>"), t = t.replace(/<span(.*?)class="redactor_placeholder"(.*?)>([\w\W]*?)<\/span>/gi, ""), t = t.replace(/<span>([\w\W]*?)<\/span>/gi, "$1"), t = t.replace(/&amp;/gi, "&"), t = t.replace(/\u2122/gi, "&trade;"), t = t.replace(/\xa9/gi, "&copy;"), t = this.cleanReConvertProtected(t) }, buildStart: function () { this.content = "", this.$box = e('<div class="redactor_box" />'), "TEXTAREA" === this.$source[0].tagName && (this.opts.textareamode = !0), this.opts.mobile === !1 && this.isMobile() ? this.buildMobile() : (this.buildContent(), this.opts.iframe ? (this.opts.autoresize = !1, this.iframeStart()) : this.opts.textareamode ? this.buildFromTextarea() : this.buildFromElement(), this.opts.iframe || (this.buildOptions(), this.buildAfter())) }, buildMobile: function () { this.opts.textareamode || (this.$editor = this.$source, this.$editor.hide(), this.$source = this.buildCodearea(this.$editor), this.$source.val(this.content)), this.$box.insertAfter(this.$source).append(this.$source) }, buildContent: function () { this.opts.textareamode ? this.content = e.trim(this.$source.val()) : this.content = e.trim(this.$source.html()) }, buildFromTextarea: function () { this.$editor = e("<div />"), this.$box.insertAfter(this.$source).append(this.$editor).append(this.$source), this.buildAddClasses(this.$editor), this.buildEnable() }, buildFromElement: function () { this.$editor = this.$source, this.$source = this.buildCodearea(this.$editor), this.$box.insertAfter(this.$editor).append(this.$editor).append(this.$source), this.buildEnable() }, buildCodearea: function (t) { return e("<textarea />").attr("name", t.attr("id")).css("height", this.sourceHeight) }, buildAddClasses: function (t) { e.each(this.$source.get(0).className.split(/\s+/), function (e, n) { t.addClass("redactor_" + n) }) }, buildEnable: function () { this.$editor.addClass("redactor_editor").attr({ contenteditable: !0, dir: this.opts.direction }), this.$source.attr("dir", this.opts.direction).hide(), this.set(this.content, !0, !1) }, buildOptions: function () { var e = this.$editor; this.opts.iframe && (e = this.$frame), this.opts.tabindex && e.attr("tabindex", this.opts.tabindex), this.opts.minHeight && e.css("min-height", this.opts.minHeight + "px"), this.opts.maxHeight && (this.opts.autoresize = !1, this.sourceHeight = this.opts.maxHeight), this.opts.wym && this.$editor.addClass("redactor_editor_wym"), this.opts.autoresize || e.css("height", this.sourceHeight) }, buildAfter: function () { if (this.start = !1, this.opts.toolbar && (this.opts.toolbar = this.toolbarInit(this.opts.curLang), this.toolbarBuild()), this.modalTemplatesInit(
27), this.buildPlugins(), this.buildBindKeyboard(), this.opts.autosave && this.autosave(), setTimeout(e.proxy(this.observeStart, this), 4), this.browser("mozilla")) try { this.document.execCommand("enableObjectResizing", !1, !1), this.document.execCommand("enableInlineTableEditing", !1, !1) } catch (t) { } this.opts.focus && setTimeout(e.proxy(this.focus, this), 100), this.opts.visual || setTimeout(e.proxy(function () { this.opts.visual = !0, this.toggle(!1) }, this), 200), this.callback("init") }, buildBindKeyboard: function () { this.dblEnter = 0, this.opts.dragUpload && this.opts.imageUpload !== !1 && this.$editor.on("drop.redactor", e.proxy(this.buildEventDrop, this)), this.$editor.on("paste.redactor", e.proxy(this.buildEventPaste, this)), this.$editor.on("keydown.redactor", e.proxy(this.buildEventKeydown, this)), this.$editor.on("keyup.redactor", e.proxy(this.buildEventKeyup, this)), e.isFunction(this.opts.textareaKeydownCallback) && this.$source.on("keydown.redactor-textarea", e.proxy(this.opts.textareaKeydownCallback, this)), e.isFunction(this.opts.focusCallback) && this.$editor.on("focus.redactor", e.proxy(this.opts.focusCallback, this)); var t; e(document).mousedown(function (n) { t = e(n.target) }), this.$editor.on("blur.redactor", e.proxy(function (n) { e(t).hasClass("redactor_toolbar") || 0 != e(t).parents(".redactor_toolbar").size() || (this.selectall = !1, e.isFunction(this.opts.blurCallback) && this.callback("blur", n)) }, this)) }, buildEventDrop: function (t) {
28            if (t = t.originalEvent || t, void 0 === window.FormData || !t.dataTransfer) return !0;
29            var n = t.dataTransfer.files.length; if (0 == n) return !0; t.preventDefault(); var i = t.dataTransfer.files[0]; if (this.opts.dnbImageTypes !== !1 && -1 == this.opts.dnbImageTypes.indexOf(i.type)) return !0; this.bufferSet(); var o = e('<div id="redactor-progress-drag" class="redactor-progress redactor-progress-striped"><div id="redactor-progress-bar" class="redactor-progress-bar" style="width: 100%;"></div></div>'); e(document.body).append(o), this.opts.s3 === !1 ? this.dragUploadAjax(this.opts.imageUpload, i, !0, o, t, this.opts.imageUploadParam) : this.s3uploadFile(i)
30        }, buildEventPaste: function (t) { var n = !1; if (this.browser("webkit") && -1 === navigator.userAgent.indexOf("Chrome")) { var i = this.browser("version").split("."); i[0] < 536 && (n = !0) } if (n) return !0; if (this.browser("opera")) return !0; if (this.opts.clipboardUpload && this.buildEventClipboardUpload(t)) return !0; if (this.opts.cleanup) { this.rtePaste = !0, this.selectionSave(), this.selectall || (this.opts.autoresize === !0 && this.fullscreen !== !0 ? (this.$editor.height(this.$editor.height()), this.saveScroll = this.document.body.scrollTop) : this.saveScroll = this.$editor.scrollTop()); var o = this.extractContent(); setTimeout(e.proxy(function () { var e = this.extractContent(); this.$editor.append(o), this.selectionRestore(); var t = this.getFragmentHtml(e); this.pasteClean(t), this.opts.autoresize === !0 && this.fullscreen !== !0 && this.$editor.css("height", "auto") }, this), 1) } }, buildEventClipboardUpload: function (t) { var n = t.originalEvent || t; if (this.clipboardFilePaste = !1, "undefined" == typeof n.clipboardData) return !1; if (n.clipboardData.items) { var i = n.clipboardData.items[0].getAsFile(); if (null !== i) { this.bufferSet(), this.clipboardFilePaste = !0; var o = new FileReader; return o.onload = e.proxy(this.pasteClipboardUpload, this), o.readAsDataURL(i), !0 } } return !1 }, buildEventKeydown: function (t) { if (this.rtePaste) return !1; var n = t.which, i = t.ctrlKey || t.metaKey, o = this.getParent(), r = this.getCurrent(), s = this.getBlock(), a = !1; if (this.callback("keydown", t), this.imageResizeHide(!1), (o && "PRE" === e(o).get(0).tagName || r && "PRE" === e(r).get(0).tagName) && (a = !0, n === this.keyCode.DOWN && this.insertAfterLastElement(s)), n === this.keyCode.DOWN && (o && "BLOCKQUOTE" === e(o)[0].tagName && this.insertAfterLastElement(o), r && "BLOCKQUOTE" === e(r)[0].tagName && this.insertAfterLastElement(r), o && "P" === e(o)[0].tagName && "BLOCKQUOTE" == e(o).parent()[0].tagName && this.insertAfterLastElement(o, e(o).parent()[0]), r && "P" === e(r)[0].tagName && o && "BLOCKQUOTE" == e(o)[0].tagName && this.insertAfterLastElement(r, o)), i && !t.shiftKey && this.shortcuts(t, n), i && 90 === n && !t.shiftKey && !t.altKey) return t.preventDefault(), void (this.opts.buffer.length ? this.bufferUndo() : this.document.execCommand("undo", !1, !1)); if (i && 90 === n && t.shiftKey && !t.altKey) return t.preventDefault(), void (0 != this.opts.rebuffer.length ? this.bufferRedo() : this.document.execCommand("redo", !1, !1)); if (i && 65 === n ? this.selectall = !0 : n == this.keyCode.LEFT_WIN || i || (this.selectall = !1), n != this.keyCode.ENTER || t.shiftKey || t.ctrlKey || t.metaKey) n === this.keyCode.ENTER && (t.ctrlKey || t.shiftKey) && (this.bufferSet(), t.preventDefault(), this.insertLineBreak()); else { if (this.browser("msie") && 1 == o.nodeType && ("TD" == o.tagName || "TH" == o.tagName)) return t.preventDefault(), this.bufferSet(), this.insertNode(document.createElement("br")), this.callback("enter", t), !1; if (s && ("BLOCKQUOTE" == s.tagName || "BLOCKQUOTE" == e(s).parent()[0].tagName)) if (this.isEndOfElement()) { if (1 == this.dblEnter) { var l, c; if ("BLOCKQUOTE" == s.tagName ? (c = "br", l = s) : (c = "p", l = e(s).parent()[0]), t.preventDefault(), this.insertingAfterLastElement(l), this.dblEnter = 0, "p" == c) e(s).parent().find("p").last().remove(); else { var d = e.trim(e(s).html()); e(s).html(d.replace(/<br\s?\/?>$/i, "")) } return } this.dblEnter++ } else this.dblEnter++; if (a === !0) return this.buildEventKeydownPre(t, r); if (!this.opts.linebreaks) if (s && this.opts.rBlockTest.test(s.tagName)) this.bufferSet(), setTimeout(e.proxy(function () { var t = this.getBlock(); if ("DIV" === t.tagName && !e(t).hasClass("redactor_editor")) { var n = e("<p>" + this.opts.invisibleSpace + "</p>"); e(t).replaceWith(n), this.selectionStart(n) } }, this), 1); else if (s === !1) { this.bufferSet(); var u = e("<p>" + this.opts.invisibleSpace + "</p>"); return this.insertNode(u[0]), this.selectionStart(u), this.callback("enter", t), !1 } if (this.opts.linebreaks) { if (!s || !this.opts.rBlockTest.test(s.tagName)) return this.buildEventKeydownInsertLineBreak(t); this.bufferSet(), setTimeout(e.proxy(function () { var t = this.getBlock(); "DIV" !== t.tagName && "P" !== t.tagName || e(t).hasClass("redactor_editor") || this.replaceLineBreak(t) }, this), 1) } if ("BLOCKQUOTE" == s.tagName || "FIGCAPTION" == s.tagName) return this.buildEventKeydownInsertLineBreak(t); this.callback("enter", t) } return n === this.keyCode.TAB && this.opts.shortcuts ? this.buildEventKeydownTab(t, a) : void (n === this.keyCode.BACKSPACE && this.buildEventKeydownBackspace(r)) }, buildEventKeydownPre: function (t, n) { t.preventDefault(), this.bufferSet(); var i = e(n).parent().text(); return this.insertNode(document.createTextNode("\n")), -1 == i.search(/\s$/) && this.insertNode(document.createTextNode("\n")), this.sync(), this.callback("enter", t), !1 }, buildEventKeydownTab: function (e, t) { return this.opts.tabFocus ? this.isEmpty(this.get()) && this.opts.tabSpaces === !1 ? !0 : (e.preventDefault(), t !== !0 || e.shiftKey ? this.opts.tabSpaces !== !1 ? (this.bufferSet(), this.insertNode(document.createTextNode(Array(this.opts.tabSpaces + 1).join("\xa0"))), this.sync(), !1) : (e.shiftKey ? this.indentingOutdent() : this.indentingIndent(), !1) : (this.bufferSet(), this.insertNode(document.createTextNode("	")), this.sync(), !1)) : !0 }, buildEventKeydownBackspace: function (t) { if ("undefined" != typeof t.tagName && /^(H[1-6])$/i.test(t.tagName)) { var n; n = e(this.opts.linebreaks === !1 ? "<p>" + this.opts.invisibleSpace + "</p>" : "<br>" + this.opts.invisibleSpace), e(t).replaceWith(n), this.selectionStart(n) } "undefined" != typeof t.nodeValue && null !== t.nodeValue && t.remove && 3 === t.nodeType && null == t.nodeValue.match(/[^\/\u200B]/g) && t.remove() }, buildEventKeydownInsertLineBreak: function (e) { this.bufferSet(), e.preventDefault(), this.insertLineBreak(), this.callback("enter", e) }, buildEventKeyup: function (t) { if (this.rtePaste) return !1; var n = t.which, i = this.getParent(), o = this.getCurrent(); if (!this.opts.linebreaks && 3 == o.nodeType && (0 == i || "BODY" == i.tagName)) { var r = e("<p>").append(e(o).clone()); e(o).replaceWith(r); var s = e(r).next(); "undefined" != typeof s[0] && "BR" == s[0].tagName && s.remove(), this.selectionEnd(r) } return (this.opts.convertLinks || this.opts.convertImageLinks || this.opts.convertVideoLinks) && n === this.keyCode.ENTER && this.buildEventKeyupConverters(), n === this.keyCode.DELETE || n === this.keyCode.BACKSPACE ? this.formatEmpty(t) : (this.callback("keyup", t), void this.sync()) }, buildEventKeyupConverters: function () { this.formatLinkify(this.opts.linkProtocol, this.opts.convertLinks, this.opts.convertImageLinks, this.opts.convertVideoLinks, this.opts.linkSize), setTimeout(e.proxy(function () { this.opts.convertImageLinks && this.observeImages(), this.opts.observeLinks && this.observeLinks() }, this), 5) }, buildPlugins: function () { this.opts.plugins && e.each(this.opts.plugins, e.proxy(function (t, n) { RedactorPlugins[n] && (e.extend(this, RedactorPlugins[n]), e.isFunction(RedactorPlugins[n].init) && this.init()) }, this)) }, iframeStart: function () { this.iframeCreate(), this.opts.textareamode ? this.iframeAppend(this.$source) : (this.$sourceOld = this.$source.hide(), this.$source = this.buildCodearea(this.$sourceOld), this.iframeAppend(this.$sourceOld)) }, iframeAppend: function (e) { this.$source.attr("dir", this.opts.direction).hide(), this.$box.insertAfter(e).append(this.$frame).append(this.$source) }, iframeCreate: function () { this.$frame = e('<iframe style="width: 100%;" frameborder="0" />').one("load", e.proxy(function () { if (this.opts.fullpage) { this.iframePage(), "" === this.content && (this.content = this.opts.invisibleSpace), this.$frame.contents()[0].write(this.content), this.$frame.contents()[0].close(); var t = setInterval(e.proxy(function () { this.$frame.contents().find("body").html() && (clearInterval(t), this.iframeLoad()) }, this), 0) } else this.iframeLoad() }, this)) }, iframeDoc: function () { return this.$frame[0].contentWindow.document }, iframePage: function () { var e = this.iframeDoc(); return e.documentElement && e.removeChild(e.documentElement), e }, iframeAddCss: function (t) { t = t || this.opts.css, this.isString(t) && this.$frame.contents().find("head").append('<link rel="stylesheet" href="' + t + '" />'), e.isArray(t) && e.each(t, e.proxy(function (e, t) { this.iframeAddCss(t) }, this)) }, iframeLoad: function () { this.$editor = this.$frame.contents().find("body").attr({ contenteditable: !0, dir: this.opts.direction }), this.$editor[0] && (this.document = this.$editor[0].ownerDocument, this.window = this.document.defaultView || window), this.iframeAddCss(), this.opts.fullpage ? this.setFullpageOnInit(this.$editor.html()) : this.set(this.content, !0, !1), this.buildOptions(), this.buildAfter() }, placeholderStart: function (t) { return this.isEmpty(t) && (this.$element.attr("placeholder") && (this.opts.placeholder = this.$element.attr("placeholder")), "" === this.opts.placeholder && (this.opts.placeholder = !1), this.opts.placeholder !== !1) ? (this.opts.focus = !1, this.$editor.one("focus.redactor_placeholder", e.proxy(this.placeholderFocus, this)), e('<span class="redactor_placeholder" data-redactor="verified">').attr("contenteditable", !1).text(this.opts.placeholder)) : !1 }, placeholderFocus: function () { this.$editor.find("span.redactor_placeholder").remove(); var e = ""; this.opts.linebreaks === !1 && (e = this.opts.emptyHtml), this.$editor.off("focus.redactor_placeholder"), this.$editor.html(e), this.opts.linebreaks === !1 ? this.selectionStart(this.$editor.children()[0]) : this.focus(), this.sync() }, placeholderRemove: function () { this.opts.placeholder = !1, this.$editor.find("span.redactor_placeholder").remove(), this.$editor.off("focus.redactor_placeholder") }, placeholderRemoveFromCode: function (e) { return e.replace(/<span class="redactor_placeholder"(.*?)>(.*?)<\/span>/i, "") }, shortcuts: function (e, t) { this.opts.shortcuts && (e.altKey ? 48 === t ? this.shortcutsLoadFormat(e, "p") : 49 === t ? this.shortcutsLoadFormat(e, "h1") : 50 === t ? this.shortcutsLoadFormat(e, "h2") : 51 === t ? this.shortcutsLoadFormat(e, "h3") : 52 === t ? this.shortcutsLoadFormat(e, "h4") : 53 === t ? this.shortcutsLoadFormat(e, "h5") : 54 === t && this.shortcutsLoadFormat(e, "h6") : 77 === t ? this.shortcutsLoad(e, "removeFormat") : 66 === t ? this.shortcutsLoad(e, "bold") : 73 === t ? this.shortcutsLoad(e, "italic") : 74 === t ? this.shortcutsLoad(e, "insertunorderedlist") : 75 === t ? this.shortcutsLoad(e, "insertorderedlist") : 72 === t ? this.shortcutsLoad(e, "superscript") : 76 === t && this.shortcutsLoad(e, "subscript")) }, shortcutsLoad: function (e, t) { e.preventDefault(), this.execCommand(t, !1) }, shortcutsLoadFormat: function (e, t) { e.preventDefault(), this.formatBlocks(t) }, focus: function () { this.browser("opera") ? this.$editor.focus() : this.window.setTimeout(e.proxy(this.focusSet, this, !0), 1) }, focusEnd: function () { this.focusSet() }, focusSet: function (e) { this.$editor.focus(); var t = this.getRange(); t.selectNodeContents(this.$editor[0]), t.collapse(e || !1);
30 var n = this.getSelection(); n.removeAllRanges(), n.addRange(t) }, toggle: function (e) { this.opts.visual ? this.toggleCode(e) : this.toggleVisual() }, toggleVisual: function () { var e = this.$source.hide().val(); "undefined" != typeof this.modified && (this.modified = this.cleanRemoveSpaces(this.modified, !1) !== this.cleanRemoveSpaces(e, !1)), this.modified && (this.opts.fullpage && "" === e ? this.setFullpageOnInit(e) : (this.set(e), this.opts.fullpage && this.buildBindKeyboard())), this.opts.iframe ? this.$frame.show() : this.$editor.show(), this.opts.fullpage && this.$editor.attr("contenteditable", !0), this.$source.off("keydown.redactor-textarea-indenting"), this.$editor.focus(), this.selectionRestore(), this.observeStart(), this.buttonActiveVisual(), this.buttonInactive("html"), this.opts.visual = !0 }, toggleCode: function (e) { e !== !1 && this.selectionSave(); var t = null; this.opts.iframe ? (t = this.$frame.height(), this.opts.fullpage && this.$editor.removeAttr("contenteditable"), this.$frame.hide()) : (t = this.$editor.innerHeight(), this.$editor.hide()); var n = this.$source.val(); "" !== n && this.opts.tidyHtml && this.$source.val(this.cleanHtml(n)), this.modified = n, this.$source.height(t).show().focus(), this.$source.on("keydown.redactor-textarea-indenting", this.textareaIndenting), this.buttonInactiveVisual(), this.buttonActive("html"), this.opts.visual = !1 }, textareaIndenting: function (t) { if (9 === t.keyCode) { var n = e(this), i = n.get(0).selectionStart; return n.val(n.val().substring(0, i) + "	" + n.val().substring(n.get(0).selectionEnd)), n.get(0).selectionStart = n.get(0).selectionEnd = i + 1, !1 } }, autosave: function () { var t = !1; this.autosaveInterval = setInterval(e.proxy(function () { var n = this.get(); t !== n && e.ajax({ url: this.opts.autosave, type: "post", data: this.$source.attr("name") + "=" + escape(encodeURIComponent(n)), success: e.proxy(function (e) { this.callback("autosave", !1, e), t = n }, this) }) }, this), 1e3 * this.opts.autosaveInterval) }, toolbarBuild: function () { if (this.opts.air) this.opts.buttons = this.opts.airButtons; else if (!this.opts.buttonSource) { var t = this.opts.buttons.indexOf("html"), n = this.opts.buttons[t + 1]; this.opts.buttons.splice(t, 1), "|" === n && this.opts.buttons.splice(t, 1) } if (e.extend(this.opts.toolbar, this.opts.buttonsCustom), e.each(this.opts.buttonsAdd, e.proxy(function (e, t) { this.opts.buttons.push(t) }, this)), this.opts.toolbar && e.each(this.opts.toolbar.formatting.dropdown, e.proxy(function (t) { "-1" == e.inArray(t, this.opts.formattingTags) && delete this.opts.toolbar.formatting.dropdown[t] }, this)), 0 === this.opts.buttons.length) return !1; if (this.airEnable(), this.$toolbar = e("<ul>").addClass("redactor_toolbar").attr("id", "redactor_toolbar_" + this.uuid), this.opts.air ? (this.$air = e('<div class="redactor_air">').attr("id", "redactor_air_" + this.uuid).hide(), this.$air.append(this.$toolbar), e("body").append(this.$air)) : this.opts.toolbarExternal ? e(this.opts.toolbarExternal).html(this.$toolbar) : this.$box.prepend(this.$toolbar), e.each(this.opts.buttons, e.proxy(function (t, n) { if ("|" === n) this.$toolbar.append(e(this.opts.buttonSeparator)); else if (this.opts.toolbar[n]) { var i = this.opts.toolbar[n]; if (this.opts.fileUpload === !1 && "file" === n) return !0; this.$toolbar.append(e("<li>").append(this.buttonBuild(n, i))) } }, this)), this.$toolbar.find("a").attr("tabindex", "-1"), this.opts.toolbarFixed && (this.toolbarObserveScroll(), e(this.opts.toolbarFixedTarget).on("scroll.redactor", e.proxy(this.toolbarObserveScroll, this))), this.opts.activeButtons) { var i = e.proxy(this.buttonActiveObserver, this); this.$editor.on("mouseup.redactor keyup.redactor", i) } }, toolbarObserveScroll: function () { var t = e(this.opts.toolbarFixedTarget).scrollTop(), n = this.$box.offset().top, i = 0, o = n + this.$box.height() + 40; if (t > n) { var r = "100%"; this.opts.toolbarFixedBox && (i = this.$box.offset().left, r = this.$box.innerWidth(), this.$toolbar.addClass("toolbar_fixed_box")), this.toolbarFixed = !0, this.$toolbar.css({ position: "fixed", width: r, zIndex: 1005, top: this.opts.toolbarFixedTo
30pOffset + "px", left: i }), o > t ? this.$toolbar.css("visibility", "visible") : this.$toolbar.css("visibility", "hidden") } else this.toolbarFixed = !1, this.$toolbar.css({ position: "relative", width: "auto", top: 0, left: i }), this.opts.toolbarFixedBox && this.$toolbar.removeClass("toolbar_fixed_box") }, airEnable: function () { this.opts.air && this.$editor.on("mouseup.redactor keyup.redactor", this, e.proxy(function (t) { var n = this.getSelectionText(); if ("mouseup" === t.type && "" != n && this.airShow(t), "keyup" === t.type && t.shiftKey && "" != n) { var i = e(this.getElement(this.getSelection().focusNode)), o = i.offset(); o.height = i.height(), this.airShow(o, !0) } }, this)) }, airShow: function (t, n) { if (this.opts.air) { var i, o; if (e(".redactor_air").hide(), n) i = t.left, o = t.top + t.height + 14, this.opts.iframe && (o += this.$box.position().top - e(this.document).scrollTop(), i += this.$box.position().left); else { var r = this.$air.innerWidth(); i = t.clientX, e(this.document).width() < i + r && (i -= r), o = t.clientY + 14, this.opts.iframe ? (o += this.$box.position().top, i += this.$box.position().left) : o += e(this.document).scrollTop() } this.$air.css({ left: i + "px", top: o + "px" }).show(), this.airBindHide() } }, airBindHide: function () { if (this.opts.air) { var t = e.proxy(function (t) { e(t).on("mousedown.redactor", e.proxy(function (n) { 0 === e(n.target).closest(this.$toolbar).length && (this.$air.fadeOut(100), this.selectionRemove(), e(t).off(n)) }, this)).on("keydown.redactor", e.proxy(function (n) { n.which === this.keyCode.ESC && this.get
30Selection().collapseToStart(), this.$air.fadeOut(100), e(t).off(n) }, this)) }, this); t(document), this.opts.iframe && t(this.document) } }, airBindMousemoveHide: function () { if (this.opts.air) { var t = e.proxy(function (t) { e(t).on("mousemove.redactor", e.proxy(function (n) { 0 === e(n.target).closest(this.$toolbar).length && (this.$air.fadeOut(100), e(t).off(n)) }, this)) }, this); t(document), this.opts.iframe && t(this.document) } }, dropdownBuild: function (t, n) { e.each(n, e.proxy(function (n, i) { i.className || (i.className = ""); var o; "separator" === i.name ? o = e('<a class="redactor_separator_drop">') : (o = e('<a href="#" class="' + i.className + " redactor_dropdown_" + n + '">' + i.title + "</a>"), o.on("click", e.proxy(function (e) { e.preventDefault && e.preventDefault(), this.browser("msie") && (e.returnValue = !1), i.callback && i.callback.call(this, n, o, i, e), i.exec && this.execCommand(i.exec, n), i.func && this[i.func](n), this.buttonActiveObserver(), this.opts.air && this.$air.fadeOut(100) }, this))), t.append(o) }, this)) }, dropdownShow: function (t, n) { if (!this.opts.visual) return t.preventDefault(), !1; var i = this.$toolbar.find(".redactor_dropdown_box_" + n), o = this.buttonGet(n); if (o.hasClass("dropact")) this.dropdownHideAll(); else { this.dropdownHideAll(), this.buttonActive(n), o.addClass("dropact"); var r = o.position(); this.toolbarFixed && (r = o.offset()); var s = i.width(); r.left + s > e(document).width() && (r.left -= s); var a = r.left + "px", l = 29, c = "absolute", d = l + "px"; this.opts.toolbarFixed && this.toolbarFixed ? c = "fixed" : this.opts.air || (d = r.top + l + "px"), i.css({ position: c, left: a, top: d }).show() } var u = e.proxy(function (e) { this.dropdownHide(e, i) }, this); e(document).one("click", u), this.$editor.one("click", u), t.stopPropagation(), this.$editor.focus() }, dropdownHideAll: function () { this.$toolbar.find("a.dropact").removeClass("redactor_act").removeClass("dropact"), e(".redactor_dropdown").hide() }, dropdownHide: function (t, n) { e(t.target).hasClass("dropact") || (n.removeClass("dropact"), this.dropdownHideAll()) }, buttonBuild: function (t, n) { var i = e('<a href="javascript:;" title="' + n.title + '" tabindex="-1" class="redactor_btn redactor_btn_' + t + '"></a>'); if (i.on("click", e.proxy(function (e) { return e.preventDefault && e.preventDefault(), this.browser("msie") && (e.returnValue = !1), i.hasClass("redactor_button_disabled") ? !1 : (this.isFocused() !== !1 || n.exec || this.$editor.focus(), n.exec ? (this.$editor.focus(), this.execCommand(n.exec, t), this.airBindMousemoveHide()) : n.func && "show" !== n.func ? (this[n.func](t), this.airBindMousemoveHide()) : n.callback ? (n.callback.call(this, t, i, n, e), this.airBindMousemoveHide()) : n.dropdown && this.dropdownShow(e, t), void this.buttonActiveObserver(!1, t)) }, this)), n.dropdown) { var o = e('<div class="redactor_dropdown redactor_dropdown_box_' + t + '" style="display: none;">'); o.appendTo(this.$toolbar), this.dropdownBuild(o, n.dropdown) } return i }, buttonGet: function (t) { return this.opts.toolbar ? e(this.$toolbar.find("a.redactor_btn_" + t)) : !1 }, buttonActiveToggle: function (e) { var t = this.buttonGet(e); t.hasClass("redactor_act") ? t.removeClass("redactor_act") : t.addClass("redactor_act") }, buttonActive: function (e) { this.buttonGet(e).addClass("redactor_act") }, buttonInactive: function (e) { this.buttonGet(e).removeClass("redactor_act") }, buttonInactiveAll: function (t) { e.each(this.opts.toolbar, e.proxy(function (e) { e != t && this.buttonInactive(e) }, this)) }, buttonActiveVisual: function () { this.$toolbar.find("a.redactor_btn").not("a.redactor_btn_html").removeClass("redactor_button_disabled") }, buttonInactiveVisual: function () { this.$toolbar.find("a.redactor_btn").not("a.redactor_btn_html").addClass("redactor_button_disabled") }, buttonChangeIcon: function (e, t) { this.buttonGet(e).addClass("redactor_btn_" + t) }, buttonRemoveIcon: function (e, t) { this.buttonGet(e).removeClass("redactor_btn_" + t) }, buttonAddSeparator: function () { this.$toolbar.append(e(this.opts.buttonSeparator)) }, buttonAddSeparatorAfter: function (t) { this.buttonGet(t).parent().after(e(this.opts.buttonSeparator)) }, buttonAddSeparatorBefore: function (t) { this.buttonGet(t).parent().before(e(this.opts.buttonSeparator)) }, buttonRemoveSeparatorAfter: function (e) { this.buttonGet(e).parent().next().remove() }, buttonRemoveSeparatorBefore: function (e) { this.buttonGet(e).parent().prev().remove() }, buttonSetRight: function (e) { this.opts.toolbar && this.buttonGet(e).parent().addClass("redactor_btn_right") }, buttonSetLeft: function (e) { this.opts.toolbar && this.buttonGet(e).parent().removeClass("redactor_btn_right") }, buttonAdd: function (t, n, i, o) { if (this.opts.toolbar) { var r = this.buttonBuild(t, { title: n, callback: i, dropdown: o }); this.$toolbar.append(e("<li>").append(r)) } }, buttonAddFirst: function (t, n, i, o) { if (this.opts.toolbar) { var r = this.buttonBuild(t, { title: n, callback: i, dropdown: o });
30 this.$toolbar.prepend(e("<li>").append(r)) } }, buttonAddAfter: function (t, n, i, o, r) { if (this.opts.toolbar) { var s = this.buttonBuild(n, { title: i, callback: o, dropdown: r }), a = this.buttonGet(t); 0 !== a.size() ? a.parent().after(e("<li>").append(s)) : this.$toolbar.append(e("<li>").append(s)) } }, buttonAddBefore: function (t, n, i, o, r) { if (this.opts.toolbar) { var s = this.buttonBuild(n, { title: i, callback: o, dropdown: r }), a = this.buttonGet(t); 0 !== a.size() ? a.parent().before(e("<li>").append(s)) : this.$toolbar.append(e("<li>").append(s)) } }, buttonRemove: function (e, t) { var n = this.buttonGet(e); t && n.parent().next().remove(), n.parent().removeClass("redactor_btn_right"), n.remove() }, buttonActiveObserver: function (t, n) { var i = this.getParent(); if (this.buttonInactiveAll(n), t === !1 && "html" !== n) return void (-1 != e.inArray(n, this.opts.activeButtons) && this.buttonActiveToggle(n)); i && "A" === i.tagName ? this.$toolbar.find("a.redactor_dropdown_link").text(this.opts.curLang.link_edit) : this.$toolbar.find("a.redactor_dropdown_link").text(this.opts.curLang.link_insert), this.opts.activeButtonsAdd && (e.each(this.opts.activeButtonsAdd, e.proxy(function (e, t) { this.opts.activeButtons.push(t) }, this)), e.extend(this.opts.activeButtonsStates, this.opts.activeButtonsAdd)), e.each(this.opts.activeButtonsStates, e.proxy(function (t, n) { 0 != e(i).closest(t, this.$editor.get()[0]).length && this.buttonActive(n) }, this)); var o = e(i).closest(this.opts.alignmentTags.toString().toLowerCase(), this.$editor[0]); if (o.length) { var r = o.css("text-align"); switch (r) { case "right": this.buttonActive("alignright"); break; case "center": this.buttonActive("aligncenter"); break; case "justify": this.buttonActive("justify"); break; default: this.buttonActive("alignleft") } } }, execPasteFrag: function (e) { var t = this.getSelection(); if (t.getRangeAt && t.rangeCount) { range = t.getRangeAt(0), range.deleteContents(); var n = document.createElement("div"); n.innerHTML = e; for (var i, o, r = document.createDocumentFragment(); i = n.firstChild;)o = r.appendChild(i); r.firstChild; range.insertNode(r), o && (range = range.cloneRange(), range.setStartAfter(o), range.collapse(!0), t.removeAllRanges(), t.addRange(range)) } }, exec: function (e, t, n) { "formatblock" === e && this.browser("msie") && (t = "<" + t + ">"), "inserthtml" === e && this.browser("msie") ? this.isIe11() ? this.execPasteFrag(t) : (this.$editor.focus(), this.document.selection.createRange().pasteHTML(t)) : this.document.execCommand(e, !1, t), n !== !1 && this.sync(), this.callback("execCommand", e, t) }, execCommand: function (e, t, n) { return this.opts.visual ? "inserthtml" === e ? (this.insertHtml(t, n), void this.callback("execCommand", e, t)) : this.currentOrParentIs("PRE") && !this.opts.formattingPre ? !1 : "insertunorderedlist" === e || "insertorderedlist" === e ? this.execLists(e, t) : "unlink" === e ? this.execUnlink(e, t) : (this.exec(e, t, n), void ("inserthorizontalrule" === e && this.$editor.find("hr").removeAttr("id"))) : (this.$source.focus(), !1) }, execUnlink: function (t, n) { this.bufferSet(); var i = this.currentOrParentIs("A"); return i ? (e(i).replaceWith(e(i).text()), this.sync(), void this.callback("execCommand", t, n)) : void 0 }, execLists: function (t, n) { this.bufferSet(); var i = this.getParent(), o = e(i).closest("ol, ul"), r = !1; if (o.length) { r = !0; var s = o[0].tagName; ("insertunorderedlist" === t && "OL" === s || "insertorderedlist" === t && "UL" === s) && (r = !1) } if (this.selectionSave(), r) { var a = this.getNodes(), l = this.getBlocks(a); "undefined" != typeof a[0] && a.length > 1 && 3 == a[0].nodeType && l.unshift(this.getBlock()); var c = "", d = ""; e.each(l, e.proxy(function (t, n) { if ("LI" == n.tagName) { var i = e(n), o = i.clone(); o.find("ul", "ol").remove(), c += this.opts.linebreaks === !1 ? this.outerHtml(e("<p>").append(o.contents())) : o.html() + "<br>", 0 == t ? (i.addClass("redactor-replaced").empty(), d = this.outerHtml(i)) : i.remove() } }, this)), html = this.$editor.html().replace(d, "</" + s + ">" + c + "<" + s + ">"), this.$editor.html(html), this.$editor.find(s + ":empty").remove() } else { var u = this.getParent(); this.document.execCommand(t); var i = this.getParent(), o = e(i).closest("ol, ul"); if (u && "TD" == u.tagName && o.wrapAll("<td>"), o.length) { var h = o.children().first(); if ("" == e.trim(e(h).text())) { var p = e('<span id="selection-marker-1"></span>'); e(h).prepend(p) } (this.browser("msie") || this.browser("mozilla")) && "LI" !== i.tagName && e(i).replaceWith(e(i).html()); var f = o.parent(); this.isParentRedactor(f) && this.nodeTestBlocks(f[0]) && f.replaceWith(f.contents()) } this.browser("mozilla") && this.$editor.focus() } this.selectionRestore(), e(p).remove(), this.sync(), this.callback("execCommand", t, n) }, indentingIndent: function () { this.indentingStart("indent") }, indentingOutdent: function () { this.indentingStart("outdent") }, indentingStart: function (t) { if (this.bufferSet(), "indent" === t) { var n = this.getBlock(); if (this.selectionSave(), n && "LI" == n.tagName) { var i = this.getParent(), o = e(i).closest("ol, ul"), r = o[0].tagName, s = this.getBlocks(); e.each(s, function (t, n) { if ("LI" == n.tagName) { var i = e(n).prev(); if (0 != i.size() && "LI" == i[0].tagName) { var o = i.children("ul, ol"); 0 == o.size() ? i.append(e("<" + r + ">").append(n)) : o.append(n) } } }) } else if (n === !1 && this.opts.linebreaks === !0) { this.exec("formatBlock", "blockquote"); var a = this.getBlock(), n = e('<div data-tagblock="">').html(e(a).html());
30 e(a).replaceWith(n); var l = this.normalize(e(n).css("margin-left")) + this.opts.indentValue; e(n).css("margin-left", l + "px") } else { var c = this.getBlocks(); e.each(c, e.proxy(function (t, n) { var i = !1; if ("TD" !== n.tagName) { i = -1 !== e.inArray(n.tagName, this.opts.alignmentTags) ? e(n) : e(n).closest(this.opts.alignmentTags.toString().toLowerCase(), this.$editor[0]); var o = this.normalize(i.css("margin-left")) + this.opts.indentValue; i.css("margin-left", o + "px") } }, this)) } this.selectionRestore() } else { this.selectionSave(); var n = this.getBlock(); if (n && "LI" == n.tagName) { var s = this.getBlocks(), d = 0; this.insideOutdent(n, d, s) } else { var c = this.getBlocks(); e.each(c, e.proxy(function (t, n) { var i = !1; i = -1 !== e.inArray(n.tagName, this.opts.alignmentTags) ? e(n) : e(n).closest(this.opts.alignmentTags.toString().toLowerCase(), this.$editor[0]); var o = this.normalize(i.css("margin-left")) - this.opts.indentValue; 0 >= o ? this.opts.linebreaks === !0 && "undefined" != typeof i.data("tagblock") ? i.replaceWith(i.html()) : (i.css("margin-left", ""), this.removeEmptyAttr(i, "style")) : i.css("margin-left", o + "px") }, this)) } this.selectionRestore() } this.sync() }, insideOutdent: function (t, n, i) { if (t && "LI" == t.tagName) { var o = e(t).parent().parent(); 0 != o.size() && "LI" == o[0].tagName ? o.after(t) : "undefined" != typeof i[n] ? (t = i[n], n++, this.insideOutdent(t, n, i)) : this.execCommand("insertunorderedlist") } }, alignmentLeft: function () { this.alignmentSet("", "JustifyLeft") }, alignmentRight: function () { this.alignmentSet("right", "JustifyRight") }, alignmentCenter: function () { this.alignmentSet("center", "JustifyCenter") }, alignmentJustify: function () { this.alignmentSet("justify", "JustifyFull") }, alignmentSet: function (t, n) { if (this.bufferSet(), this.oldIE()) return this.document.execCommand(n, !1, !1), !0; this.selectionSave(); var i = this.getBlock(); if (!i && this.opts.linebreaks) { this.exec("formatBlock", "blockquote"); var o = this.getBlock(), i = e('<div data-tagblock="">').html(e(o).html()); e(o).replaceWith(i), e(i).css("text-align", t), this.removeEmptyAttr(i, "style"), "" == t && "undefined" != typeof e(i).data("tagblock") && e(i).replaceWith(e(i).html()) } else { var r = this.getBlocks(); e.each(r, e.proxy(function (n, i) { var o = !1; o = -1 !== e.inArray(i.tagName, this.opts.alignmentTags) ? e(i) : e(i).closest(this.opts.alignmentTags.toString().toLowerCase(), this.$editor[0]), o && (o.css("text-align", t), this.removeEmptyAttr(o, "style")) }, this)) } this.selectionRestore(), this.sync() }, cleanEmpty: function (e) { var t = this.placeholderStart(e); return t !== !1 ? t : (this.opts.linebreaks === !1 && ("" === e ? e = this.opts.emptyHtml : -1 !== e.search(/^<hr\s?\/?>$/gi) && (e = "<hr>" + this.opts.emptyHtml)), e) }, cleanConverters: function (e) { return this.opts.convertDivs && (e = e.replace(/<div(.*?)>([\w\W]*?)<\/div>/gi, "<p$1>$2</p>")), this.opts.paragraphy && (e = this.cleanParagraphy(e)), e }, cleanConvertProtected: function (e) { return this.opts.templateVars && (e = e.replace(/\{\{(.*?)\}\}/gi, "<!-- template double $1 -->"), e = e.replace(/\{(.*?)\}/gi, "<!-- template $1 -->")), e = e.replace(/<script(.*?)>([\w\W]*?)<\/script>/gi, '<title type="text/javascript" style="display: none;" class="redactor-script-tag"$1>$2</title>'), e = e.replace(/<style(.*?)>([\w\W]*?)<\/style>/gi, '<section$1 style="display: none;" rel="redactor-style-tag">$2</section>'), e = e.replace(/<form(.*?)>([\w\W]*?)<\/form>/gi, '<section$1 rel="redactor-form-tag">$2</section>'), e = this.opts.phpTags ? e.replace(/<\?php([\w\W]*?)\?>/gi, '<section style="display: none;" rel="redactor-php-tag">$1</section>') : e.replace(/<\?php([\w\W]*?)\?>/gi, "") }, cleanReConvertProtected: function (e) { return this.opts.templateVars && (e = e.replace(/<!-- template double (.*?) -->/gi, "{{$1}}"), e = e.replace(/<!-- template (.*?) -->/gi, "{$1}")), e = e.replace(/<title type="text\/javascript" style="display: none;" class="redactor-script-tag"(.*?)>([\w\W]*?)<\/title>/gi, '<script$1 type="text/javascript">$2</script>'), e = e.replace(/<section(.*?) style="display: none;" rel="redactor-style-tag">([\w\W]*?)<\/section>/gi, "<style$1>$2</style>"), e = e.replace(/<section(.*?)rel="redactor-form-tag"(.*?)>([\w\W]*?)<\/section>/gi, "<form$1$2>$3</form>"), this.opts.phpTags && (e = e.replace(/<section style="display: none;" rel="redactor-php-tag">([\w\W]*?)<\/section>/gi, "<?php\r\n$1\r\n?>")), e }, cleanRemoveSpaces: function (t, n) { if (n !== !1) { var n = [], i = t.match(/<(pre|style|script|title)(.*?)>
30([\w\W]*?)<\/(pre|style|script|title)>/gi); if (null === i && (i = []), this.opts.phpTags) { var o = t.match(/<\?php([\w\W]*?)\?>/gi); o && (i = e.merge(i, o)) } i && e.each(i, function (e, i) { t = t.replace(i, "buffer_" + e), n.push(i) }) } return t = t.replace(/\n/g, " "), t = t.replace(/[\t]*/g, ""), t = t.replace(/\n\s*\n/g, "\n"), t = t.replace(/^[\s\n]*/g, " "), t = t.replace(/[\s\n]*$/g, " "), t = t.replace(/>\s{2,}</g, "> <"), t = this.cleanReplacer(t, n), t = t.replace(/\n\n/g, "\n") }, cleanReplacer: function (t, n) { return n === !1 ? t : (e.each(n, function (e, n) { t = t.replace("buffer_" + e, n) }), t) }, cleanRemoveEmptyTags: function (e) { e = e.replace(/<span>([\w\W]*?)<\/span>/gi, "$1"), e = e.replace(/[\u200B-\u200D\uFEFF]/g, ""); var t = ["<b>\\s*</b>", "<b>&nbsp;</b>", "<em>\\s*</em>"], n = ["<pre></pre>", "<blockquote>\\s*</blockquote>", "<dd></dd>", "<dt></dt>", "<ul></ul>", "<ol></ol>", "<li></li>", "<table></table>", "<tr></tr>", "<span>\\s*<span>", "<span>&nbsp;<span>", "<p>\\s*</p>", "<p></p>", "<p>&nbsp;</p>", "<p>\\s*<br>\\s*</p>", "<div>\\s*</div>", "<div>\\s*<br>\\s*</div>"]; n = this.opts.removeEmptyTags ? n.concat(t) : t; for (var i = n.length, o = 0; i > o; ++o)e = e.replace(new RegExp(n[o], "gi"), ""); return e }, cleanParagraphy: function (t) {
31            function n(e, n, i) { return t.replace(new RegExp(e, n), i) } if (t = e.trim(t), this.opts.linebreaks === !0) return t; if ("" === t || "<p></p>" === t) return this.opts.emptyHtml; t += "\n"; var i = [], o = t.match(/<(table|div|pre|object)(.*?)>([\w\W]*?)<\/(table|div|pre|object)>/gi); o || (o = []); var r = t.match(/<!--([\w\W]*?)-->/gi); if (r && (o = e.merge(o, r)), this.opts.phpTags) { var s = t.match(/<section(.*?)rel="redactor-php-tag">([\w\W]*?)<\/section>/gi); s && (o = e.merge(o, s)) } o && e.each(o, function (e, n) { i[e] = n, t = t.replace(n, "{replace" + e + "}\n") }), t = t.replace(/<br \/>\s*<br \/>/gi, "\n\n"); var a = "(comment|html|body|head|title|meta|style|script|link|iframe|table|thead|tfoot|caption|col|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|select|option|form|map|area|blockquote|address|math|style|p|h[1-6]|hr|fieldset|legend|section|article|aside|hgroup|header|footer|nav|figure|figcaption|details|menu|summary)"; t = n("(<" + a + "[^>]*>)", "gi", "\n$1"), t = n("(</" + a + ">)", "gi", "$1\n\n"), t = n("\r\n", "g", "\n"), t = n("\r", "g", "\n"), t = n("/\n\n+/", "g", "\n\n"); var l = t.split(new RegExp("\ns*\n", "g"), -1); t = ""; for (var c in l) l.hasOwnProperty(c) && (-1 == l[c].search("{replace") ? (l[c] = l[c].replace(/<p>\n\t<\/p>/gi, ""), l[c] = l[c].replace(/<p><\/p>/gi, ""), "" != l[c] && (t += "<p>" + l[c].replace(/^\n+|\n+$/g, "") + "</p>")) : t += l[c]); return t = n("<p>s*</p>", "gi", ""), t = n("<p>([^<]+)</(div|address|form)>", "gi", "<p>$1</p></$2>"), t = n("<p>s*(</?" + a + "[^>]*>)s*</p>", "gi", "$1"), t = n("<p>(<li.+?)</p>", "gi", "$1"), t = n("<p>s*(</?" + a + "[^>]*>)", "gi", "$1"), t = n("(</?" + a + "[^>]*>)s*</p>", "gi", "$1"), t = n("(</?" + a + "[^>]*>)s*<br />", "gi", "$1"), t = n("<br />(s*</?(?:p|li|div|dl|dd|dt|th|pre|td|ul|ol)[^>]*>)", "gi", "$1"), t = n("\n</p>", "gi", "</p>"), t = n("<li><p>", "gi", "<li>"), t = n("</p></li>", "gi", "</li>"), t = n("</li><p>", "gi", "</li>"), t = n("<p>	?\n?<p>", "gi", "<p>"), t = n("</dt><p>", "gi", "</dt>"),
32                t = n("</dd><p>", "gi", "</dd>"), t = n("<br></p></blockquote>", "gi", "</blockquote>"), t = n("<p>	*</p>", "gi", ""), e.each(i, function (e, n) { t = t.replace("{replace" + e + "}", n) }), e.trim(t)
33        }, cleanConvertInlineTags: function (e, t) { var n = "strong"; "b" === this.opts.boldTag && (n = "b"); var i = "em"; return "i" === this.opts.italicTag && (i = "i"), e = e.replace(/<span style="font-style: italic;">([\w\W]*?)<\/span>/gi, "<" + i + ">$1</" + i + ">"), e = e.replace(/<span style="font-weight: bold;">([\w\W]*?)<\/span>/gi, "<" + n + ">$1</" + n + ">"), e = "strong" === this.opts.boldTag ? e.replace(/<b>([\w\W]*?)<\/b>/gi, "<strong>$1</strong>") : e.replace(/<strong>([\w\W]*?)<\/strong>/gi, "<b>$1</b>"), e = "em" === this.opts.italicTag ? e.replace(/<i>([\w\W]*?)<\/i>/gi, "<em>$1</em>") : e.replace(/<em>([\w\W]*?)<\/em>/gi, "<i>$1</i>"), e = t !== !0 ? e.replace(/<strike>([\w\W]*?)<\/strike>/gi, "<del>$1</del>") : e.replace(/<del>([\w\W]*?)<\/del>/gi, "<strike>$1</strike>") }, cleanStripTags: function (t) { if ("" == t || "undefined" == typeof t) return t; var n = !1; this.opts.allowedTags !== !1 && (n = !0); var i = n === !0 ? this.opts.allowedTags : this.opts.deniedTags, o = /<\/?([a-z][a-z0-9]*)\b[^>]*>/gi; return t = t.replace(o, function (t, o) { return n === !0 ? e.inArray(o.toLowerCase(), i) > "-1" ? t : "" : e.inArray(o.toLowerCase(), i) > "-1" ? "" : t }), t = this.cleanConvertInlineTags(t) }, cleanSavePreCode: function (t, n) { var i = t.match(/<(pre|code)(.*?)>([\w\W]*?)<\/(pre|code)>/gi); return null !== i && e.each(i, e.proxy(function (e, i) { var o = i.match(/<(pre|code)(.*?)>([\w\W]*?)<\/(pre|code)>/i); o[3] = o[3].replace(/&nbsp;/g, " "), n !== !1 && (o[3] = this.cleanEncodeEntities(o[3])), o[3] = o[3].replace(/\$/g, "&#36;"), t = t.replace(i, "<" + o[1] + o[2] + ">" + o[3] + "</" + o[1] + ">") }, this)), t }, cleanEncodeEntities: function (e) { return e = String(e).replace(/&amp;/g, "&").replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&quot;/g, '"'), e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;") }
33, cleanUnverified: function () { var t = this.$editor.find("li, img, a, b, strong, sub, sup, i, em, u, small, strike, del, span, cite"); t.filter('[style*="background-color: transparent;"][style*="line-height"]').css("background-color", "").css("line-height", ""), t.filter('[style*="background-color: transparent;"]').css("background-color", ""), t.css("line-height", ""), e.each(t, e.proxy(function (e, t) { this.removeEmptyAttr(t, "style") }, this)), this.$editor.find('div[style="text-align: -webkit-auto;"]').contents().unwrap() }, cleanHtml: function (e) { var t = 0, n = e.length, i = 0, o = null, r = null, s = "", a = "", l = ""; for (this.cleanlevel = 0; n > t; t++) { if (i = t, -1 == e.substr(t).indexOf("<")) return a += e.substr(t), this.cleanFinish(a); for (; n > i && "<" != e.charAt(i);)i++; for (t != i && (l = e.substr(t, i - t), l.match(/^\s{2,}$/g) || ("\n" == a.charAt(a.length - 1) ? a += this.cleanGetTabs() : "\n" == l.charAt(0) && (a += "\n" + this.cleanGetTabs(), l = l.replace(/^\s+/, "")), a += l), l.match(/\n/) && (a += "\n" + this.cleanGetTabs())), o = i; n > i && ">" != e.charAt(i);)i++; s = e.substr(o, i - o), t = i; var c; if ("!--" == s.substr(1, 3)) { if (!s.match(/--$/)) { for (; "-->" != e.substr(i, 3);)i++; i += 2, s = e.substr(o, i - o), t = i } "\n" != a.charAt(a.length - 1) && (a += "\n"), a += this.cleanGetTabs(), a += s + ">\n" } else "!" == s[1] ? a = this.placeTag(s + ">", a) : "?" == s[1] ? a += s + ">\n" : (c = s.match(/^<(script|style|pre)/i)) ? (c[1] = c[1].toLowerCase(), s = this.cleanTag(s), a = this.placeTag(s, a), r = String(e.substr(t + 1)).toLowerCase().indexOf("</" + c[1]), r && (l = e.substr(t + 1, r), t += r, a += l)) : (s = this.cleanTag(s), a = this.placeTag(s, a)) } return this.cleanFinish(a) }, cleanGetTabs: function () { for (var e = "", t = 0; t < this.cleanlevel; t++)e += "	"; return e }, cleanFinish: function (e) { return e = e.replace(/\n\s*\n/g, "\n"), e = e.replace(/^[\s\n]*/, ""), e = e.replace(/[\s\n]*$/, ""), e = e.replace(/<script(.*?)>\n<\/script>/gi, "<script$1></script>"), this.cleanlevel = 0, e }, cleanTag: function (e) { var t = ""; e = e.replace(/\n/g, " "), e = e.replace(/\s{2,}/g, " "), e = e.replace(/^\s+|\s+$/g, " "); var n = ""; e.match(/\/$/) && (n = "/", e = e.replace(/\/+$/, "")); for (var i; i = /\s*([^= ]+)(?:=((['"']).*?\3|[^ ]+))?/.exec(e);)i[2] ? t += i[1].toLowerCase() + "=" + i[2] : i[1] && (t += i[1].toLowerCase()), t += " ", e = e.substr(i[0].length); return t.replace(/\s*$/, "") + n + ">" }, placeTag: function (e, t) { var n = e.match(this.cleannewLevel); return (e.match(this.cleanlineBefore) || n) && (t = t.replace(/\s*$/, ""), t += "\n"), n && "/" == e.charAt(1) && this.cleanlevel--, "\n" == t.charAt(t.length - 1) && (t += this.cleanGetTabs()), n && "/" != e.charAt(1) && this.cleanlevel++, t += e, (e.match(this.cleanlineAfter) || e.match(this.cleannewLevel)) && (t = t.replace(/ *$/, ""), t += "\n"), t }, formatEmpty: function (t) { var n = e.trim(this.$editor.html()); if (this.opts.linebreaks) "" == n && (t.preventDefault(), this.$editor.html(""), this.focus()); else { n = n.replace(/<br\s?\/?>/i, ""); var i = n.replace(/<p>\s?<\/p>/gi, ""); if ("" === n || "" === i) { t.preventDefault(); var o = e(this.opts.emptyHtml).get(0); this.$editor.html(o), this.focus() } } this.sync() }, formatBlocks: function (t) { this.bufferSet(); var n = this.getBlocks(); this.selectionSave(), e.each(n, e.proxy(function (n, i) { if ("LI" !== i.tagName) { var o = e(i).parent(); if ("p" === t) { if ("P" === i.tagName && 0 != o.size() && "BLOCKQUOTE" === o[0].tagName || "BLOCKQUOTE" === i.tagName) return void this.formatQuote(); if (this.opts.linebreaks) return; this.formatBlock(t, i) } else this.formatBlock(t, i) } }, this)), this.selectionRestore(), this.sync() }, formatBlock: function (t, n) { if (n === !1 && (n = this.getBlock()), n === !1) return this.opts.linebreaks === !0 && this.execCommand("formatblock", t), !0; var i = ""; if ("pre" !== t ? i = e(n).contents() : (i = e(n).html(), "" === e.trim(i) && (i = '<span id="selection-marker-1"></span>')), "PRE" === n.tagName && (t = "p"), this.opts.linebreaks === !0 && "p" === t) e
33(n).replaceWith(e("<div>").append(i).html() + "<br>"); else { var o = this.getParent(), r = e("<" + t + ">").append(i); e(n).replaceWith(r), o && "TD" == o.tagName && e(r).wrapAll("<td>") } }, formatChangeTag: function (t, n, i) { i !== !1 && this.selectionSave(); var o = e("<" + n + "/>"); return e(t).replaceWith(function () { return o.append(e(this).contents()) }), i !== !1 && this.selectionRestore(), o }, formatQuote: function () { if (this.bufferSet(), this.opts.linebreaks === !1) { this.selectionSave(); var t = this.getBlocks(), n = !1, i = t.length; if (t) { var o = "", r = "", s = !1, a = !0; if (e.each(t, function (e, t) { "P" !== t.tagName && (a = !1) }), e.each(t, e.proxy(function (l, c) { if ("BLOCKQUOTE" === c.tagName) this.formatBlock("p", c, !1); else if ("P" === c.tagName) if (n = e(c).parent(), "BLOCKQUOTE" == n[0].tagName) { var d = e(n).children("p").size(); 1 == d ? e(n).replaceWith(c) : d == i ? (s = "blockquote", o += this.outerHtml(c)) : (s = "html", o += this.outerHtml(c), 0 == l ? (e(c).addClass("redactor-replaced").empty(), r = this.outerHtml(c)) : e(c).remove()) } else a === !1 || 1 == t.length ? this.formatBlock("blockquote", c, !1) : (s = "paragraphs", o += this.outerHtml(c)); else "LI" !== c.tagName && this.formatBlock("blockquote", c, !1) }, this)), s) if ("paragraphs" == s) e(t[0]).replaceWith("<blockquote>" + o + "</blockquote>"), e(t).remove(); else if ("blockquote" == s) e(n).replaceWith(o); else if ("html" == s) { var l = this.$editor.html().replace(r, "</blockquote>" + o + "<blockquote>"); this.$editor.html(l), this.$editor.find("blockquote").each(function () { "" == e.trim(e(this).html()) && e(this).remove() }) } } this.selectionRestore() } else { var c = this.getBlock(); if ("BLOCKQUOTE" === c.tagName) { this.selectionSave(); var l = e.trim(e(c).html()), d = e.trim(this.getSelectionHtml()); if (l = l.replace(/<span(.*?)id="selection-marker(.*?)<\/span>/gi, ""), l == d) e(c).replaceWith(e(c).html() + "<br>"); else { this.inlineFormat("tmp"); var u = this.$editor.find("tmp"); u.empty(); var h = this.$editor.html().replace("<tmp></tmp>", '</blockquote><span id="selection-marker-1">' + this.opts.invisibleSpace + "</span>" + d + "<blockquote>"); this.$editor.html(h), u.remove(), this.$editor.find("blockquote").each(function () { "" == e.trim(e(this).html()) && e(this).remove() }) } this.selectionRestore(), this.$editor.find("span#selection-marker-1").attr("id", !1) } else { var p = this.selectionWrap("blockquote"), l = e(p).html(), f = ["ul", "ol", "table", "tr", "tbody", "thead", "tfoot", "dl"]; e.each(f, function (e, t) { l = l.replace(new RegExp("<" + t + "(.*?)>", "gi"), ""), l = l.replace(new RegExp("</" + t + ">", "gi"), "") }); var m = this.opts.blockLevelElements; m.push("td"), e.each(m, function (e, t) { l = l.replace(new RegExp("<" + t + "(.*?)>", "gi"), ""), l = l.replace(new RegExp("</" + t + ">", "gi"), "<br>") }), e(p).html(l), this.selectionElement(p); var g = e(p).next(); 0 != g.size() && "BR" === g[0].tagName && g.remove() } } this.sync() }, blockRemoveAttr: function (t) { var n = this.getBlocks(); e(n).removeAttr(t), this.sync() }, blockSetAttr: function (t, n) { var i = this.getBlocks(); e(i).attr(t, n), this.sync() }, blockRemoveStyle: function (t) { var n = this.getBlocks(); e(n).css(t, ""), this.removeEmptyAttr(n, "style"), this.sync() }, blockSetStyle: function (t, n) { var i = this.getBlocks(); e(i).css(t, n), this.sync() }, blockRemoveClass: function (t) { var n = this.getBlocks(); e(n).removeClass(t), this.removeEmptyAttr(n, "class"), this.sync() }, blockSetClass: function (t) { var n = this.getBlocks(); e(n).addClass(t), this.sync() }, inlineRemoveClass: function (t) { this.selectionSave(), this.inlineEachNodes(function (n) { e(n).removeClass(t), this.removeEmptyAttr(n, "class") }), this.selectionRestore(), this.sync() }, inlineSetClass: function (t) { var n = this.getCurrent(); e(n).hasClass(t) || this.inlineMethods("addClass", t) }, inlineRemoveStyle: function (t) { this.selectionSave(), this.inlineEachNodes(function (n) { e(n).css(t, ""), this.removeEmptyAttr(n, "style") }), this.selectionRestore(), this.sync() }, inlineSetStyle: function (e, t) { this.inlineMethods("css", e, t) }, inlineRemoveAttr: function (t) { this.selectionSave(); var n = this.getRange(), i = this.getElement(), o = this.getNodes(); (n.collapsed || n.startContainer === n.endContainer && i) && (o = e(i)), e(
33o).removeAttr(t), this.inlineUnwrapSpan(), this.selectionRestore(), this.sync() }, inlineSetAttr: function (e, t) { this.inlineMethods("attr", e, t) }, inlineMethods: function (t, n, i) { this.bufferSet(), this.selectionSave(); var o = this.getRange(), r = this.getElement(); if (!o.collapsed && o.startContainer !== o.endContainer || !r || this.nodeTestBlocks(r)) { this.document.execCommand("fontSize", !1, 4); var s = this.$editor.find("font"); e.each(s, e.proxy(function (e, o) { this.inlineSetMethods(t, o, n, i) }, this)) } else e(r)[t](n, i); this.selectionRestore(), this.sync() }, inlineSetMethods: function (t, n, i, o) { var r, s = e(n).parent(), a = this.getSelectionText(), l = e(s).text(), c = a == l; return c && s && "INLINE" === s[0].tagName && 0 != s[0].attributes.length ? (r = s, e(n).replaceWith(e(n).html())) : (r = e("<inline>").append(e(n).contents()), e(n).replaceWith(r)), e(r)[t](i, o), r }, inlineEachNodes: function (t) { var n, i = this.getRange(), o = this.getElement(), r = this.getNodes(); (i.collapsed || i.startContainer === i.endContainer && o) && (r = e(o), n = !0), e.each(r, e.proxy(function (i, o) { if (!n && "INLINE" !== o.tagName) { var r = this.getSelectionText(), s = e(o).parent().text(), a = r == s; if (!a || "INLINE" !== o.parentNode.tagName || e(o.parentNode).hasClass("redactor_editor")) return; o = o.parentNode } t.call(this, o) }, this)) }, inlineUnwrapSpan: function () { var t = this.$editor.find("inline"); e.each(t, e.proxy(function (t, n) { var i = e(n); void 0 === i.attr("class") && void 0 === i.attr("style") && i.contents().unwrap() }, this)) }, inlineFormat: function (t) { this.selectionSave(), this.document.execCommand("fontSize", !1, 4); var n, i = this.$editor.find("font"); e.each(i, function (i, o) { var r = e("<" + t + "/>").append(e(o).contents()); e(o).replaceWith(r), n = r }), this.selectionRestore(), this.sync() }, inlineRemoveFormat: function (t) { this.selectionSave(); var n = t.toUpperCase(), i = this.getNodes(), o = e(this.getParent()).parent(); e.each(i, function (e, t) { t.tagName === n && this.inlineRemoveFormatReplace(t) }), o && o[0].tagName === n && this.inlineRemoveFormatReplace(o), this.selectionRestore(), this.sync() }, inlineRemoveFormatReplace: function (t) { e(t).replaceWith(e(t).contents()) }, insertHtml: function (t, n) { var i = this.getCurrent(), o = i.parentNode; this.$editor.focus(), this.bufferSet(); var r = e("<div>").append(e.parseHTML(t)); t = r.html(), t = this.cleanRemoveEmptyTags(t), r = e("<div>").append(e.parseHTML(t)); var s = this.getBlock(); if (1 == r.contents().length) { var a = r.contents()[0].tagName; ("P" != a && a == s.tagName || "PRE" == a) && (t = r.text(), r = e("<div>").append(t)) } !this.opts.linebreaks && 1 == r.contents().length && 3 == r.contents()[0].nodeType && (this.getRangeSelectedNodes().length > 2 || !i || "BODY" == i.tagName && !o || "HTML" == o.tagName) && (t = "<p>" + t + "</p>"), t = this.setSpansVerifiedHtml(t), r.contents().length > 1 && s || r.contents().is("p, :header, ul, ol, li, div, table, td, blockquote, pre, address, section, header, footer, aside, article") ? this.browser("msie") ? this.isIe11() ? this.execPasteFrag(t) : this.document.selection.createRange().pasteHTML(t) : this.document.execCommand("inserthtml", !1, t) : this.insertHtmlAdvanced(t, !1), this.selectall && this.window.setTimeout(e.proxy(function () { this.opts.linebreaks ? this.focusEnd() : this.selectionEnd(this.$editor.contents().last()) }, this), 1), this.observeStart(), this.setNonEditable(), n !== !1 && this.sync() }, insertHtmlAdvanced: function (e, t) { e = this.setSpansVerifiedHtml(e); var n = this.getSelection(); if (n.getRangeAt && n.rangeCount) { var i = n.getRangeAt(0); i.deleteContents(); var o = this.document.createElement("div"); o.innerHTML = e; for (var r, s, a = this.document.createDocumentFragment(); r = o.firstChild;)s = a.appendChild(r); i.insertNode(a), s && (i = i.cloneRange(), i.setStartAfter(s), i.collapse(!0), n.removeAllRanges(), n.addRange(i)) } t !== !1 && this.sync() }, insertBeforeCursor: function (t) { t = this.setSpansVerifiedHtml(t); var n = e(t), i = document.createElement("span"); i.innerHTML = "\u200b"; var o = this.getRange(); o.insertNode(i), o.insertNode(n[0]), o.collapse(!1);
33 var r = this.getSelection(); r.removeAllRanges(), r.addRange(o), this.sync() }, insertText: function (t) { var n = e(e.parseHTML(t)); n.length && (t = n.text()), this.$editor.focus(), this.browser("msie") && !this.isIe11() ? this.document.selection.createRange().pasteHTML(t) : this.document.execCommand("inserthtml", !1, t), this.sync() }, insertNode: function (t) { if (t = t[0] || t, "SPAN" == t.tagName) { var n = "inline", i = t.outerHTML, o = new RegExp("<" + t.tagName, "i"), r = i.replace(o, "<" + n); o = new RegExp("</" + t.tagName, "i"), r = r.replace(o, "</" + n), t = e(r)[0] } var s = this.getSelection(); s.getRangeAt && s.rangeCount && (range = s.getRangeAt(0), range.deleteContents(), range.insertNode(t), range.setEndAfter(t), range.setStartAfter(t), s.removeAllRanges(), s.addRange(range)) }, insertNodeToCaretPositionFromPoint: function (e, t) { var n, i = e.clientX, o = e.clientY; if (this.document.caretPositionFromPoint) { var r = this.document.caretPositionFromPoint(i, o); n = this.getRange(), n.setStart(r.offsetNode, r.offset), n.collapse(!0), n.insertNode(t) } else if (this.document.caretRangeFromPoint) n = this.document.caretRangeFromPoint(i, o), n.insertNode(t); else if ("undefined" != typeof document.body.createTextRange) { n = this.document.body.createTextRange(), n.moveToPoint(i, o); var s = n.duplicate(); s.moveToPoint(i, o), n.setEndPoint("EndToEnd", s), n.select() } }, insertAfterLastElement: function (t, n) { if ("undefined" != typeof n && (t = n), this.isEndOfElement()) { if (this.opts.linebreaks) { var i = e("<div>").append(e.trim(this.$editor.html())).contents(); if (this.outerHtml(i.last()[0]) != this.outerHtml(t)) return !1 } else if (this.$editor.contents().last()[0] !== t) return !1; this.insertingAfterLastElement(t) } }, insertingAfterLastElement: function (t) { if (this.bufferSet(), this.opts.linebreaks === !1) { var n = e(this.opts.emptyHtml); e(t).after(n), this.selectionStart(n) } else { var n = e('<span id="selection-marker-1">' + this.opts.invisibleSpace + "</span>", this.document)[0]; e(t).after(n), e(n).after(this.opts.invisibleSpace), this.selectionRestore(), this.$editor.find("span#selection-marker-1").removeAttr("id") } }, insertLineBreak: function () { this.selectionSave(), this.$editor.find("#selection-marker-1").before("<br>" + (this.browser("webkit") ? this.opts.invisibleSpace : "")), this.selectionRestore() }, insertDoubleLineBreak: function () { this.selectionSave(), this.$editor.find("#selection-marker-1").before("<br><br>" + (this.browser("webkit") ? this.opts.invisibleSpace : "")), this.selectionRestore() }, replaceLineBreak: function (t) { var n = e("<br>" + this.opts.invisibleSpace); e(t).replaceWith(n), this.selectionStart(n) }, pasteClean: function (t) { if (t = this.callback("pasteBefore", !1, t), this.browser("msie")) { var n = e.trim(t); 0 == n.search(/^<a(.*?)>(.*?)<\/a>$/i) && (t = t.replace(/^<a(.*?)>(.*?)<\/a>$/i, "$2")) } if (this.opts.pastePlainText) { var n = this.document.createElement("div"); return t = t.replace(/<br>|<\/H[1-6]>|<\/p>|<\/div>/gi, "\n"), n.innerHTML = t, t = n.textContent || n.innerText, t = e.trim(t), t = t.replace("\n", "<br>"), t = this.cleanParagraphy(t), this.pasteInsert(t), !1 } if (this.currentOrParentIs("PRE")) return t = this.pastePre(t), this.pasteInsert(t), !0; if (t = t.replace(/<p(.*?)class="MsoListParagraphCxSpFirst"([\w\W]*?)<\/p>/gi, "<ul><li$2</li>"), t = t.replace(/<p(.*?)class="MsoListParagraphCxSpMiddle"([\w\W]*?)<\/p>/gi, "<li$2</li>"), t = t.replace(/<p(.*?)class="MsoListParagraphCxSpLast"([\w\W]*?)<\/p>/gi, "<li$2</li></ul>"), t = t.replace(/<p(.*?)class="MsoListParagraph"([\w\W]*?)<\/p>/gi, "<ul><li$2</li></ul>"), t = t.replace(/\xb7/g, ""), t = t.replace(/<!--[\s\S]*?-->|<\?(?:php)?[\s\S]*?\?>/gi, ""), t = t.replace(/(&nbsp;){2,}/gi, "&nbsp;"), t = t.replace(/&nbsp;/gi, " "), t = t.replace(/<b\sid="internal-source-marker(.*?)">([\w\W]*?)<\/b>/gi, "$2"), t = t.replace(/<b(.*?)id="docs-internal-guid(.*?)">([\w\W]*?)<\/b>/gi, "$3"), t = this.cleanStripTags(t), t = t.replace(/<td><\/td>/gi, "[td]"), t = t.replace(/<td>&nbsp;<\/td>/gi, "[td]"), t = t.replace(/<td><br><\/td>/gi, "[td]"), t = t.replace(/<td(.*?)colspan="(.*?)"(.*?)>([\w\W]*?)<\/td>/gi, '[td colspan="$2"]$4[/td]'), t = t.replace(/<td(.*?)rowspan="(.*?)"(.*?)>([\w\W]*?)<\/td>/gi, '[td rowspan="$2"]$4[/td]'), t = t.replace(/<a(.*?)href="(.*?)"(.*?)>([\w\W]*?)<\/a>/gi, '[a href="$2"]$4[/a]'), t = t.replace(/<iframe(.*?)>([\w\W]*?)<\/iframe>/gi, "[iframe$1]$2[/iframe]"), t = t.replace(/<video(.*?)>([\w\W]*?)<\/video>/gi, "[video$1]$2[/video]"), t = t.replace(/<audio(.*?)>([\w\W]*?)<\/audio>/gi, "[audio$1]$2[/audio]"), t = t.replace(/<embed(.*?)>([\w\W]*?)<\/embed>/gi, "[embed$1]$2[/embed]"), t = t.replace(/<object(.*?)>([\w\W]*?)<\/object>/gi, "[object$1]$2[/object]"), t = t.replace(/<param(.*?)>/gi, "[param$1]"), t = t.replace(/<img(.*?)>/gi, "[img$1]"), t = t.replace(/ class="(.*?)"/gi, ""), t = t.replace(/<(\w+)([\w\W]*?)>/gi, "<$1>"), t = t.replace(/<[^\/>][^>]*>(\s*|\t*|\n*|&nbsp;|<br>)<\/[^>]+>/gi, ""), t = t.replace(/<div>\s*?\t*?\n*?(<ul>|<ol>|<p>)/gi, "$1"), t = t.replace(/\[td colspan="(.*?)"\]([\w\W]*?)\[\/td\]/gi, '<td colspan="$1">$2</td>'), t = t.replace(/\[td rowspan="(.*?)"\]([\w\W]*?)\[\/td\]/gi, '<td rowspan="$1">$2</td>'), t = t.replace(/\[td\]/gi, "<td>&nbsp;</td>"), t = t.replace(/\[a href="(.*?)"\]([\w\W]*?)\[\/a\]/gi, '<a href="$1">$2</a>'), t = t.replace(/\[iframe(.*?)\]([\w\W]*?)\[\/iframe\]/gi, "<iframe$1>$2</iframe>"), t = t.replace(/\[video(.*?)\]([\w\W]*?)\[\/video\]/gi, "<video$1>$2</video>"), t = t.replace(/\[audio(.*?)\]([\w\W]*?)\[\/audio\]/gi, "<audio$1>$2</audio>"), t = t.replace(/\[embed(.*?)\]([\w\W]*?)\[\/embed\]/gi, "<embed$1>$2</embed>"), t = t.replace(/\[object(.*?)\]([\w\W]*?)\[\/object\]/gi, "<object$1>$2</object>"), t = t.replace(/\[param(.*?)\]/gi, "<param$1>"), t = t.replace(/\[img(.*?)\]/gi, "<img$1>"), this.opts.convertDivs && (t = t.replace(/<div(.*?)>([\w\W]*?)<\/div>/gi, "<p>$2</p>"), t = t.replace(/<\/div><p>/gi, "<p>"), t = t.replace(/<\/p><\/div>/gi, "</p>")), t = this.currentOrParentIs("LI") ? t.replace(/<p>([\w\W]*?)<\/p>/gi, "$1<br>") : this.cleanParagraphy(t), t = t.replace(/<span(.*?)>([\w\W]*?)<\/span>/gi, "$2"), t = t.replace(/<img>/gi, ""), t = t.replace(/<[^\/>][^>][^img|param|source]*>(\s*|\t*|\n*|&nbsp;|<br>)<\/[^>]+>/gi, ""), t = t.replace(/\n{3,}/gi, "\n"), t = t.replace(/<p><p>/gi, "<p>"), t = t.replace(/<\/p><\/p>/gi, "</p>"), t = t.replace(/<li>(\s*|\t*|\n*)<p>/gi, "<li>"), t = t.replace(/<\/p>(\s*|\t*|\n*)<\/li>/gi, "</li>"), this.opts.linebreaks === !0 && (t = t.replace(/<p(.*?)>([\w\W]*?)<\/p>/gi, "$2<br>")), t = t.replace(/<[^\/>][^>][^img|param|source]*>(\s*|\t*|\n*|&nbsp;|<br>)<\/[^>]+>/gi, ""), t = t.replace(/<img src="webkit-fake-url\:\/\/(.*?)"(.*?)>
33/gi, ""), t = t.replace(/<td(.*?)>(\s*|\t*|\n*)<p>([\w\W]*?)<\/p>(\s*|\t*|\n*)<\/td>/gi, "<td$1>$3</td>"), t = t.replace(/<div(.*?)>([\w\W]*?)<\/div>/gi, "$2"), t = t.replace(/<div(.*?)>([\w\W]*?)<\/div>/gi, "$2"), this.pasteClipboardMozilla = !1, this.browser("mozilla")) { if (this.opts.clipboardUpload) { var i = t.match(/<img src="data:image(.*?)"(.*?)>/gi); if (null !== i) { this.pasteClipboardMozilla = i; for (k in i) { var o = i[k].replace("<img", '<img data-mozilla-paste-image="' + k + '" '); t = t.replace(i[k], o) } } } for (; /<br>$/gi.test(t);)t = t.replace(/<br>$/gi, "") } for (t = t.replace(/<p>\u2022([\w\W]*?)<\/p>/gi, "<li>$1</li>"); /<font>([\w\W]*?)<\/font>/gi.test(t);)t = t.replace(/<font>([\w\W]*?)<\/font>/gi, "$1"); t = t.replace(/<p>\n?<li>/gi, "<li>"), this.browser("msie") && !this.isIe11() && (t = t.replace(/\n/g, "")), this.pasteInsert(t) }, pastePre: function (e) { e = e.replace(/<br>|<\/H[1-6]>|<\/p>|<\/div>/gi, "\n"); var t = this.document.createElement("div"); return t.innerHTML = e, this.cleanEncodeEntities(t.textContent || t.innerText) }, pasteInsert: function (t) { this.selectall && (this.opts.linebreaks ? this.$editor.html("") : this.$editor.html(this.opts.emptyHtml), this.$editor.focus()), t = this.callback("pasteAfter", !1, t), this.insertHtml(t), this.selectall = !1, setTimeout(e.proxy(function () { this.rtePaste = !1, this.browser("mozilla") && this.$editor.find("p:empty").remove(), this.pasteClipboardMozilla !== !1 && this.pasteClipboardUploadMozilla() }, this), 100), this.opts.autoresize && this.fullscreen !== !0 ? e(this.document.body).scrollTop(this.saveScroll) : this.$editor.scrollTop(this.saveScroll) }, pasteClipboardUploadMozilla: function () { var t = this.$editor.find("img[data-mozilla-paste-image]"); e.each(t, e.proxy(function (t, n) { var i = e(n), o = n.src.split(","), r = o[1], s = o[0].split(";")[0].split(":")[1]; e.post(this.opts.clipboardUploadUrl, { contentType: s, data: r }, e.proxy(function (t) { var n = "string" == typeof t ? e.parseJSON(t) : t; i.attr("src", n.filelink), i.removeAttr("data-mozilla-paste-image"), this.sync(), this.callback("imageUpload", i, n) }, this)) }, this)) }, pasteClipboardUpload: function (t) { var n = t.target.result, i = n.split(","), o = i[1], r = i[0].split(";")[0].split(":")[1]; this.opts.clipboardUpload ? e.post(this.opts.clipboardUploadUrl, { contentType: r, data: o }, e.proxy(function (t) { var n = "string" == typeof t ? e.parseJSON(t) : t, i = '<img src="' + n.filelink + '" id="clipboard-image-marker" />'; this.execCommand("inserthtml", i, !1); var o = e(this.$editor.find("img#clipboard-image-marker")); o.length ? o.removeAttr("id") : o = !1, this.sync(), o && this.callback("imageUpload", o, n) }, this)) : this.insertHtml('<img src="' + n + '" />') }, bufferSet: function (e) { void 0 !== e ? this.opts.buffer.push(e) : (this.selectionSave(), this.opts.buffer.push(this.$editor.html()), this.selectionRemoveMarkers("buffer")) }, bufferUndo: function () { return 0 === this.opts.buffer.length ? void this.$editor.focus() : (this.selectionSave(), this.opts.rebuffer.push(this.$editor.html()), this.selectionRestore(!1, !0), this.$editor.html(this.opts.buffer.pop()), this.selectionRestore(), void setTimeout(e.proxy(this.observeStart, this), 100)) }, bufferRedo: function () { return 0 === this.opts.rebuffer.length ? (this.$editor.focus(), !1) : (this.selectionSave(), this.opts.buffer.push(this.$editor.html()), this.selectionRestore(!1, !0), this.$editor.html(this.opts.rebuffer.pop()), this.selectionRestore(!0), void setTimeout(e.proxy(this.observeStart, this), 4)) }, observeStart: function () { this.observeImages(), this.opts.observeLinks && this.observeLinks() }, observeLinks: function () { this.$editor.find("a").on("click", e.proxy(this.linkObserver, this)), this.$editor.on("click.redactor", e.proxy(function (e) { this.linkObserverTooltipClose(e) }, this)), e(document).on("click.redactor", e.proxy(function (e) { this.linkObserverTooltipClose(e) }, this)) }, observeImages: function () { return this.opts.observeImages === !1 ? !1 : void this.$editor.find("img").each(e.proxy(function (t, n) { this.browser("msie") && e(n).attr("unselectable", "on"), this.imageResize(n) }, this)) }, linkObserver: function (t) { var n = e(t.target), i = n.offset(); if (this.opts.iframe) { var o = this.$frame.offset(); i.top = o.top + (i.top - e(this.document).scrollTop()), i.left += o.left } var r = e('<span class="redactor-link-tooltip"></span>'), s = n.attr("href"); s.length > 24 && (s = s.substring(0, 24) + "..."); var a = e('<a href="' + n.attr("href") + '" target="_blank">' + s + "</a>").on("click", e.proxy(function () { this.linkObserverTooltipClose(!1) }, this)), l = e('<a href="#">
33' + this.opts.curLang.edit + "</a>").on("click", e.proxy(function (e) { e.preventDefault(), this.linkShow(), this.linkObserverTooltipClose(!1) }, this)), c = e('<a href="#">' + this.opts.curLang.unlink + "</a>").on("click", e.proxy(function (e) { e.preventDefault(), this.execCommand("unlink"), this.linkObserverTooltipClose(!1) }, this)); r.append(a), r.append(" | "), r.append(l), r.append(" | "), r.append(c), r.css({ top: i.top + 20 + "px", left: i.left + "px" }), e(".redactor-link-tooltip").remove(), e("body").append(r) }, linkObserverTooltipClose: function (t) { return t !== !1 && "A" == t.target.tagName ? !1 : void e(".redactor-link-tooltip").remove() }, getSelection: function () { return this.opts.rangy ? this.opts.iframe ? rangy.getSelection(this.$frame[0]) : rangy.getSelection() : this.document.getSelection() }, getRange: function () { if (this.opts.rangy) return this.opts.iframe ? rangy.createRange(this.iframeDoc()) : rangy.createRange(); if (this.document.getSelection) { var e = this.getSelection(); if (e.getRangeAt && e.rangeCount) return e.getRangeAt(0) } return this.document.createRange() }, selectionElement: function (e) { this.setCaret(e) }, selectionStart: function (e) { this.selectionSet(e[0] || e, 0, null, 0) }, selectionEnd: function (e) { this.selectionSet(e[0] || e, 1, null, 1) }, selectionSet: function (e, t, n, i) { null == n && (n = e), null == i && (i = t); var o = this.getSelection(); if (o) { var r = this.getRange(); r.setStart(e, t), r.setEnd(n, i); try { o.removeAllRanges() } catch (s) { } o.addRange(r) } }, selectionWrap: function (e) { e = e.toLowerCase(); var t = this.getBlock(); if (t) { var n = this.formatChangeTag(t, e); return this.sync(), n } var i = this.getSelection(), o = i.getRangeAt(0), n = document.createElement(e); return n.appendChild(o.extractContents()), o.insertNode(n), this.selectionElement(n), n }, selectionAll: function () { var e = this.getRange(); e.selectNodeContents(this.$editor[0]); var t = this.getSelection(); t.removeAllRanges(), t.addRange(e) }, selectionRemove: function () { this.getSelection().removeAllRanges() }, getCaretOffset: function (t) { var n = 0, i = this.getRange(), o = i.cloneRange(); return o.selectNodeContents(t), o.setEnd(i.endContainer, i.endOffset), n = e.trim(o.toString()).length }, getCaretOffsetRange: function () { return new o(this.getSelection().getRangeAt(0)) }, setCaret: function (e, t, n) { "undefined" == typeof n && (n = t), e = e[0] || e; var i = this.getRange(); i.selectNodeContents(e); var o, r = this.getTextNodesIn(e), s = !1, a = 0; if (1 == r.length && t) i.setStart(r[0], t), i.setEnd(r[0], n); else for (var l, c = 0; l = r[c++];) { if (o = a + l.length, !s && t >= a && (o > t || t == o && c < r.length) && (i.setStart(l, t - a), s = !0), s && o >= n) { i.setEnd(l, n - a); break } a = o } var d = this.getSelection(); d.removeAllRanges(), d.addRange(i) }, getTextNodesIn: function (e) { var t = []; if (3 == e.nodeType) t.push(e); else for (var n = e.childNodes, i = 0, o = n.length; o > i; ++i)t.push.apply(t, this.getTextNodesIn(n[i])); return t }, getCurrent: function () { var e = !1, t = this.getSelection(); return t && t.rangeCount > 0 && (e = t.getRangeAt(0).startContainer), this.isParentRedactor(e) }, getParent: function (t) { return t = t || this.getCurrent(), t ? this.isParentRedactor(e(t).parent()[0]) : !1 }, getBlock: function (t) { for ("undefined" == typeof t && (t = this.getCurrent()); t;) { if (this.nodeTestBlocks(t)) return e(t).hasClass("redactor_editor") ? !1 : t; t = t.parentNode } return !1 }, getBlocks: function (t) { var n = []; if ("undefined" == typeof t) { var i = this.getRange(); if (i && i.collapsed === !0) return [this.getBlock()]; var t = this.getNodes(i) } return e.each(t, e.proxy(function (t, i) { return this.opts.iframe === !1 && 0 == e(i).parents("div.redactor_editor").size() ? !1 : void (this.nodeTestBlocks(i) && n.push(i)) }, this)), 0 === n.length && (n = [this.getBlock()]), n }, nodeTestBlocks: function (e) { return 1 == e.nodeType && this.rTestBlock.test(e.nodeName) }, tagTestBlock: function (e) { return this.rTestBlock.test(e) }, getNodes: function (t, n) { if ("undefined" == typeof t || 0 == t) var t = this.getRange(); if (t && t.collapsed === !0) { if ("undefined" == typeof n && this.tagTestBlock(n)) { var i = this.getBlock(); return i.tagName == n ? [i] : [] } return [this.getCurrent()] } var o = [], r = [], s = this.document.getSelection(); if (s.isCollapsed || (o = this.getRangeSelectedNodes(s.getRangeAt(0))), e.each(o, e.proxy(function (t, i) { return this.opts.iframe === !1 && 0 == e(i).parents("div.redactor_editor").size() ? !1 : void ("undefined" == typeof n ? "" != e.trim(i.textContent) && r.push(i) : i.tagName == n && r.push(i)) }, this)), 0 == r.length) { if ("undefined" == typeof n && this.tagTestBlock(n)) { var i = this.getBlock(); return i.tagName == n ? r.push(i) : [] } r.push(this.getCurrent()) } var a = r[r.length - 1]; return this.nodeTestBlocks(a) && (r = r.slice(0, -1)), r }, getElement: function (t) { for (t || (t = this.getCurrent()); t;) { if (1 == t.nodeType) return e(t).hasClass("redactor_editor") ? !1 : t; t = t.parentNode } return !1 }, getRangeSelectedNodes: function (e) { e = e || this.getRange(); var t = e.startContainer, n = e.endContainer; if (t == n) return [t]; for (var i = []; t && t != n;)i.push(t = this.nextNode(t)); for (t = e.startContainer; t && t != e.commonAncestorContainer;)i.unshift(t), t = t.parentNode; return i }, nextNode: function (e) { if (e.hasChildNodes()) return e.firstChild; for (; e && !e.nextSibling;)e = e.parentNode; return e ? e.nextSibling : null }
33, getSelectionText: function () { return this.getSelection().toString() }, getSelectionHtml: function () { var e = "", t = this.getSelection(); if (t.rangeCount) { for (var n = this.document.createElement("div"), i = t.rangeCount, o = 0; i > o; ++o)n.appendChild(t.getRangeAt(o).cloneContents()); e = n.innerHTML } return this.syncClean(e) }, selectionSave: function () { this.isFocused() || this.$editor.focus(), this.opts.rangy ? this.savedSel = rangy.saveSelection() : this.selectionCreateMarker(this.getRange()) }, selectionCreateMarker: function (t) { if (t) { var n = e('<span id="selection-marker-1" class="redactor-selection-marker">' + this.opts.invisibleSpace + "</span>", this.document)[0], i = e('<span id="selection-marker-2" class="redactor-selection-marker">' + this.opts.invisibleSpace + "</span>", this.document)[0]; t.collapsed === !0 ? this.selectionSetMarker(t, n, !0) : (this.selectionSetMarker(t, n, !0), this.selectionSetMarker(t, i, !1)), this.savedSel = this.$editor.html(), this.selectionRestore(!1, !1) } }, selectionSetMarker: function (e, t, n) { var i = e.cloneRange(); i.collapse(n), i.insertNode(t), i.detach() }, selectionRestore: function (e, t) { if (this.opts.rangy) rangy.restoreSelection(this.savedSel); else { e === !0 && this.savedSel && this.$editor.html(this.savedSel); var n = this.$editor.find("span#selection-marker-1"), i = this.$editor.find("span#selection-marker-2"); this.browser("mozilla") ? this.$editor.focus() : this.isFocused() || this.$editor.focus(), 0 != n.length && 0 != i.length ? this.selectionSet(n[0], 0, i[0], 0) : 0 != n.length && this.selectionSet(n[0], 0, null, 0), t !== !1 && (this.selectionRemoveMarkers(), this.savedSel = !1) } }, selectionRemoveMarkers: function () { this.opts.rangy ? rangy.removeMarkers(this.savedSel) : e.each(this.$editor.find("span.redactor-selection-marker"), function () { var t = e.trim(e(this).html().replace(/[^\u
330000-\u1C7F]/g, "")); "" == t ? e(this).remove() : e(this).removeAttr("class").removeAttr("id") }) }, tableShow: function () { this.selectionSave(), this.modalInit(this.opts.curLang.table, this.opts.modal_table, 300, e.proxy(function () { e("#redactor_insert_table_btn").click(e.proxy(this.tableInsert, this)), setTimeout(function () { e("#redactor_table_rows").focus() }, 200) }, this)) }, tableInsert: function () { var t, n, i, o, r = e("#redactor_table_rows").val(), s = e("#redactor_table_columns").val(), a = e("<div></div>"), l = Math.floor(99999 * Math.random()), c = e('<table id="table' + l + '"><tbody></tbody></table>'); for (t = 0; r > t; t++) { for (n = e("<tr></tr>"), i = 0; s > i; i++)o = e("<td>" + this.opts.invisibleSpace + "</td>"), 0 === t && 0 === i && o.append('<span id="selection-marker-1">' + this.opts.invisibleSpace + "</span>"), e(n).append(o); c.append(n) } a.append(c); var d = a.html(); this.modalClose(), this.selectionRestore(); var u = this.getBlock() || this.getCurrent(); u && "BODY" != u.tagName ? e(u).after(d) : this.insertHtmlAdvanced(d, !1), this.selectionRestore(); var h = this.$editor.find("#table" + l); this.buttonActiveObserver(), h.find("span#selection-marker-1").remove(), h.removeAttr("id"), this.sync() }, tableDeleteTable: function () { var t = e(this.getParent()).closest("table"); return this.isParentRedactor(t) ? 0 == t.size() ? !1 : (this.bufferSet(), t.remove(), void this.sync()) : !1 }, tableDeleteRow: function () { var t = e(this.getParent()).closest("table"); if (!this.isParentRedactor(t)) return !1; if (0 == t.size()) return !1; this.bufferSet(); var n = e(this.getParent()).closest("tr"), i = n.prev().length ? n.prev() : n.next(); if (i.length) { var o = i.children("td").first(); o.length && o.prepend('<span id="selection-marker-1">' + this.opts.invisibleSpace + "</span>") } n.remove(), this.selectionRestore(), this.sync() }, tableDeleteColumn: function () { var t = e(this.getParent()).closest("table"); if (!this.isParentRedactor(t)) return !1; if (0 == t.size()) return !1; this.bufferSet(); var n = e(this.getParent()).closest("td"), i = n.get(0).cellIndex; t.find("tr").each(e.proxy(function (t, n) { var o = 0 > i - 1 ? i + 1 : i - 1; 0 === t && e(n).find("td").eq(o).prepend('<span id="selection-marker-1">' + this.opts.invisibleSpace + "</span>"), e(n).find("td").eq(i).remove() }, this)), this.selectionRestore(), this.sync() }, tableAddHead: function () {
34            var t = e(this.getParent()).closest("table"); if (!this.isParentRedactor(t)) return !1; if (0 == t.size()) return !1; if (this.bufferSet(), 0 !== t.find("thead").size()) this.tableDeleteHead(); else {
35                var n = t.find("tr").first().clone(); n.find("td").html(this.opts.invisibleSpace), $thead = e("<thead></thead>"), $thead.append(n), t.prepend($thead), this.sync();
36            }
37        }, tableDeleteHead: function () { var t = e(this.getParent()).closest("table"); if (!this.isParentRedactor(t)) return !1; var n = t.find("thead"); return 0 == n.size() ? !1 : (this.bufferSet(), n.remove(), void this.sync()) }, tableAddRowAbove: function () { this.tableAddRow("before") }, tableAddRowBelow: function () { this.tableAddRow("after") }, tableAddColumnLeft: function () { this.tableAddColumn("before") }, tableAddColumnRight: function () { this.tableAddColumn("after") }, tableAddRow: function (t) { var n = e(this.getParent()).closest("table"); if (!this.isParentRedactor(n)) return !1; if (0 == n.size()) return !1; this.bufferSet(); var i = e(this.getParent()).closest("tr"), o = i.clone(); o.find("td").html(this.opts.invisibleSpace), "after" === t ? i.after(o) : i.before(o), this.sync() }, tableAddColumn: function (t) { var n = e(this.getParent()).closest("table"); if (!this.isParentRedactor(n)) return !1; if (0 == n.size()) return !1; this.bufferSet(); var i = 0, o = e(this.getParent()).closest("tr"), r = e(this.getParent()).closest("td"); o.find("td").each(e.proxy(function (t, n) { e(n)[0] === r[0] && (i = t) }, this)), n.find("tr").each(e.proxy(function (n, o) { var r = e(o).find("td").eq(i), s = r.clone(); s.html(this.opts.invisibleSpace), "after" === t ? r.after(s) : r.before(s) }, this)), this.sync() }, videoShow: function () { this.selectionSave(), this.modalInit(this.opts.curLang.video, this.opts.modal_video, 600, e.proxy(function () { e("#redactor_insert_video_btn").click(e.proxy(this.videoInsert, this)), setTimeout(function () { e("#redactor_insert_video_area").focus() }, 200) }, this)) }, videoInsert: function () { var t = e("#redactor_insert_video_area").val(); t = this.cleanStripTags(t), this.selectionRestore(); var n = this.getBlock() || this.getCurrent(); n ? e(n).after(t) : this.insertHtmlAdvanced(t, !1), this.sync(), this.modalClose() }, linkShow: function () { this.selectionSave(); var t = e.proxy(function () { this.insert_link_node = !1;
37 var t = this.getSelection(), n = "", i = "", o = "", r = this.getParent(), s = e(r).parent().get(0); s && "A" === s.tagName && (r = s), r && "A" === r.tagName ? (n = r.href, i = e(r).text(), o = r.target, this.insert_link_node = r) : i = t.toString(), e(".redactor_link_text").val(i); var a = self.location.href.replace(/\/$/i, ""), l = n.replace(a, ""); if (this.opts.linkProtocol === !1) { var c = new RegExp("^(http|ftp|https)://" + self.location.host, "i"); l = l.replace(c, "") } var d = e("#redactor_tabs").find("a"); this.opts.linkEmail === !1 && d.eq(1).remove(), this.opts.linkAnchor === !1 && d.eq(2).remove(), this.opts.linkEmail === !1 && this.opts.linkAnchor === !1 ? (e("#redactor_tabs").remove(), e("#redactor_link_url").val(l)) : 0 === n.search("mailto:") ? (this.modalSetTab.call(this, 2), e("#redactor_tab_selected").val(2), e("#redactor_link_mailto").val(n.replace("mailto:", ""))) : 0 === l.search(/^#/gi) ? (this.modalSetTab.call(this, 3), e("#redactor_tab_selected").val(3), e("#redactor_link_anchor").val(l.replace(/^#/gi, ""))) : e("#redactor_link_url").val(l), "_blank" === o && e("#redactor_link_blank").prop("checked", !0), e("#redactor_insert_link_btn").click(e.proxy(this.linkProcess, this)), setTimeout(function () { e("#redactor_link_url").focus() }, 200) }, this); this.modalInit(this.opts.curLang.link, this.opts.modal_link, 460, t) }, linkProcess: function () { var t = e("#redactor_tab_selected").val(), n = "", i = "", o = "", r = ""; if ("1" === t) { n = e("#redactor_link_url").val(), i = e("#redactor_link_url_text").val(), e("#redactor_link_blank").prop("checked") && (o = ' target="_blank"', r = "_blank"); var s = "((xn--)?[a-z0-9]+(-[a-z0-9]+)*.)+[a-z]{2,}", a = new RegExp("^(http|ftp|https)://" + s, "i"), l = new RegExp("^" + s, "i"); -1 == n.search(a) && 0 == n.search(l) && this.opts.linkProtocol && (n = this.opts.linkProtocol + n) } else "2" === t ? (n = "mailto:" + e("#redactor_link_mailto").val(), i = e("#redactor_link_mailto_text").val()) : "3" === t && (n = "#" + e("#redactor_link_anchor").val(), i = e("#redactor_link_anchor_text").val()); i = i.replace(/<|>/g, ""), this.linkInsert('<a href="' + n + '"' + o + ">" + i + "</a>", e.trim(i), n, r) }, linkInsert: function (t, n, i, o) { if (this.selectionRestore(), "" !== n) if (this.insert_link_node) this.bufferSet(), e(this.insert_link_node).text(n).attr("href", i), "" !== o ? e(this.insert_link_node).attr("target", o) : e(this.insert_link_node).removeAttr("target"), this.sync(); else { var r = e(t).addClass("redactor-added-link"); this.exec("inserthtml", this.outerHtml(r), !1), this.$editor.find("a.redactor-added-link").removeAttr("style").removeClass("redactor-added-link").each(function () { "" == this.className && e(this).removeAttr("class") }), this.sync() } setTimeout(e.proxy(function () { this.opts.observeLinks && this.observeLinks() }, this), 5), this.modalClose() }, fileShow: function () { this.selectionSave(); var t = e.proxy(function () { var t = this.getSelection(), n = ""; n = this.oldIE() ? t.text : t.toString(), e("#redactor_filename").val(n), this.isMobile() || this.draguploadInit("#redactor_file", { url: this.opts.fileUpload, uploadFields: this.opts.uploadFields, success: e.proxy(this.fileCallback, this), error: e.proxy(function (e, t) { this.callback("fileUploadError", t) }, this), uploadParam: this.opts.fileUploadParam }), this.uploadInit("redactor_file", { auto: !0, url: this.opts.fileUpload, success: e.proxy(this.fileCallback, this), error: e.proxy(function (e, t) { this.callback("fileUploadError", t) }, this) }) }, this); this.modalInit(this.opts.curLang.file, this.opts.modal_file, 500, t) }, fileCallback: function (t) { if (this.selectionRestore(), t !== !1) { var n = e("#redactor_filename").val(); "" === n && (n = t.filename); var i = '<a href="' + t.filelink + '" id="filelink-marker">' + n + "</a>"; this.browser("webkit") && this.window.chrome && (i += "&nbsp;"), this.execCommand("inserthtml", i, !1); var o = e(this.$editor.find("a#filelink-marker")); 0 != o.size() ? o.removeAttr("id") : o = !1, this.sync(), this.callback("fileUpload", o, t) } this.modalClose() }, imageShow: function () { this.selectionSave(); var t = e.proxy(function () { if (this.opts.imageGetJson ? e.getJSON(this.opts.imageGetJson, e.proxy(function (t) { var n = {}, i = 0; e.each(t, e.proxy(function (e, t) { "undefined" != typeof t.folder && (i++, n[t.folder] = i) }, this)); var o = !1; if (e.each(t, e.proxy(function (t, i) { var r = ""; "undefined" != typeof i.title && (r = i.title); var s = 0; e.isEmptyObject(n) || "undefined" == typeof i.folder || (s = n[i.folder], o === !1 && (o = ".redactorfolder" + s
37)); var a = e('<img src="' + i.thumb + '" class="redactorfolder redactorfolder' + s + '" rel="' + i.image + '" title="' + r + '" />'); e("#redactor_image_box").append(a), e(a).click(e.proxy(this.imageThumbClick, this)) }, this)), !e.isEmptyObject(n)) { e(".redactorfolder").hide(), e(o).show(); var r = function (t) { e(".redactorfolder").hide(), e(".redactorfolder" + e(t.target).val()).show() }, s = e('<select id="redactor_image_box_select">'); e.each(n, function (t, n) { s.append(e('<option value="' + n + '">' + t + "</option>")) }), e("#redactor_image_box").before(s), s.change(r) } }, this)) : e("#redactor_tabs").find("a").eq(1).remove(), this.opts.imageUpload || this.opts.s3) this.isMobile() || this.opts.s3 !== !1 || e("#redactor_file").length && this.draguploadInit("#redactor_file", { url: this.opts.imageUpload, uploadFields: this.opts.uploadFields, success: e.proxy(this.imageCallback, this), error: e.proxy(function (e, t) { this.callback("imageUploadError", t) }, this), uploadParam: this.opts.imageUploadParam }), this.opts.s3 === !1 ? this.uploadInit("redactor_file", { auto: !0, url: this.opts.imageUpload, success: e.proxy(this.imageCallback, this), error: e.proxy(function (e, t) { this.callback("imageUploadError", t) }, this) }) : e("#redactor_file").on("change.redactor", e.proxy(this.s3handleFileSelect, this)); else if (e(".redactor_tab").hide(), this.opts.imageGetJson) { var t = e("#redactor_tabs").find("a"); t.eq(0).remove(), t.eq(1).addClass("redactor_tabs_act"), e("#redactor_tab2").show() } else e("#redactor_tabs").remove(), e("#redactor_tab3").show(); e("#redactor_upload_btn").click(e.proxy(this.imageCallbackLink, this)), this.opts.imageUpload || this.opts.imageGetJson || setTimeout(function () { e("#redactor_file_link").focus() }, 200) }, this); this.modalInit(this.opts.curLang.image, this.opts.modal_image, 610, t) }, imageEdit: function (t) { var n = t, i = n.parent().parent(), o = e.proxy(function () { e("#redactor_file_alt").val(n.attr("alt")), e("#redactor_image_edit_src").attr("href", n.attr("src")), e("#redactor_form_image_align").val(n.css("float")), "A" === e(i).get(0).tagName && (e("#redactor_file_link").val(e(i).attr("href")), "_blank" == e(i).attr("target") && e("#redactor_link_blank").prop("checked", !0)), e("#redactor_image_delete_btn").click(e.proxy(function () { this.imageRemove(n) }, this)), e("#redactorSaveBtn").click(e.proxy(function () { this.imageSave(n) }, this)) }, this); this.modalInit(this.opts.curLang.edit, this.opts.modal_image_edit, 380, o) }, imageRemove: function (t) { var n = e(t).parent(); e(t).remove(), n.length && "P" === n[0].tagName && (this.$editor.focus(), this.selectionStart(n)), this.callback("imageDelete", t), this.modalClose(), this.sync() }, imageSave: function (t) { var n = e(t), i = n.parent(); n.attr("alt", e("#redactor_file_alt").val()); var o = e("#redactor_form_image_align").val(); if ("left" === o) this.imageMargin = "0 " + this.opts.imageFloatMargin + " " + this.opts.imageFloatMargin + " 0", n.css({ "float": "left", margin: this.imageMargin }); else if ("right" === o) this.imageMargin = "0 0 " + this.opts.imageFloatMargin + " " + this.opts.imageFloatMargin, n.css({ "float": "right", margin: this.imageMargin }); else { this.imageMargin = "0px"; var r = n.closest("#redactor-image-box"); 0 != r.size() && r.css({ "float": "", margin: "" }), n.css({ "float": "", margin: "" }) } var s = e.trim(e("#redactor_file_link").val()); if ("" !== s) { var a = !1; if (e("#redactor_link_blank").prop("checked") && (a = !0), "A" !== i.get(0).tagName) { var l = e('<a href="' + s + '">' + this.outerHtml(t) + "</a>"); a && l.attr("target", "_blank"), n.replaceWith(l) } else i.attr("href", s), a ? i.attr("target", "_blank") : i.removeAttr("target") } else "A" === i.get(0).tagName && i.replaceWith(this.outerHtml(t)); this.modalClose(), this.observeImages(), this.sync() }, imageResizeHide: function (t) { if (t !== !1 && 0 != e(t.target).parent().size() && "redactor-image-box" === e(t.target).parent()[0].id) return !1; var n = this.$editor.find("#redactor-image-box"); return 0 == n.size() ? !1 : (this.$editor.find("#redactor-image-editter, #redactor-image-resizer").remove(), "0px" != this.imageMargin && (n.find("img").css("margin", this.imageMargin), n.css("margin", ""), this.imageMargin = "0px"), n.find("img").css("opacity", ""), n.replaceWith(function () { return e(this).contents() }
37), e(document).off("click.redactor-image-resize-hide"), this.$editor.off("click.redactor-image-resize-hide"), this.$editor.off("keydown.redactor-image-delete"), void this.sync()) }, imageResize: function (t) { var n = e(t); n.on("mousedown", e.proxy(function () { this.imageResizeHide(!1) }, this)), n.on("dragstart", e.proxy(function () { this.$editor.on("drop.redactor-image-inside-drop", e.proxy(function () { setTimeout(e.proxy(function () { this.observeImages(), this.$editor.off("drop.redactor-image-inside-drop"), this.sync() }, this), 1) }, this)) }, this)), n.on("click", e.proxy(function () { if (0 != this.$editor.find("#redactor-image-box").size()) return !1; var t, i, o = n.width() / n.height(), r = 20, s = this.imageResizeControls(n), a = !1; s.on("mousedown", function (e) { a = !0, e.preventDefault(), o = n.width() / n.height(), t = Math.round(e.pageX - n.eq(0).offset().left), i = Math.round(e.pageY - n.eq(0).offset().top) }), e(this.document.body).on("mousemove", e.proxy(function (e) { if (a) { var s = (Math.round(e.pageX - n.eq(0).offset().left) - t, Math.round(e.pageY - n.eq(0).offset().top) - i), l = n.height(), c = parseInt(l, 10) + s, d = Math.round(c * o); d > r && (n.width(d), 100 > d ? this.imageEditter.css({ marginTop: "-7px", marginLeft: "-13px", fontSize: "9px", padding: "3px 5px" }) : this.imageEditter.css({ marginTop: "-11px", marginLeft: "-18px", fontSize: "11px", padding: "7px 10px" })), t = Math.round(e.pageX - n.eq(0).offset().left), i = Math.round(e.pageY - n.eq(0).offset().top), this.sync() } }, this)).on("mouseup", function () { a = !1 }), this.$editor.on("keydown.redactor-image-delete", e.proxy(function (e) { var t = e.which; this.keyCode.BACKSPACE != t && this.keyCode.DELETE != t || (this.bufferSet(), this.imageResizeHide(!1), this.imageRemove(n)) }, this)), e(document).on("click.redactor-image-resize-hide", e.proxy(this.imageResizeHide, this)), this.$editor.on("click.redactor-image-resize-hide", e.proxy(this.imageResizeHide, this)) }, this)) }, imageResizeControls: function (t) { var n = e('<span id="redactor-image-box" data-redactor="verified">'); n.css({ position: "relative", display: "inline-block", lineHeight: 0, outline: "1px dashed rgba(0, 0, 0, .6)", "float": t.css("float") }), n.attr("contenteditable", !1), this.imageMargin = t[0].style.margin, "0px" != this.imageMargin && (n.css("margin", this.imageMargin), t.css("margin", "")), t.css("opacity", .5).after(n), this.imageEditter = e('<span id="redactor-image-editter" data-redactor="verified">' + this.opts.curLang.edit + "</span>"), this.imageEditter.css({ position: "absolute", zIndex: 2, top: "50%", left: "50%", marginTop: "-11px", marginLeft: "-18px", lineHeight: 1, backgroundColor: "#000", color: "#fff", fontSize: "11px", padding: "7px 10px", cursor: "pointer" }), this.imageEditter.attr("contenteditable", !1), this.imageEditter.on("click", e.proxy(function () { this.imageEdit(t) }, this)), n.append(this.imageEditter); var i = e('<span id="redactor-image-resizer" data-redactor="verified"></span>'); return i.css({ position: "absolute", zIndex: 2, lineHeight: 1, cursor: "nw-resize", bottom: "-4px", right: "-5px", border: "1px solid #fff", backgroundColor: "#000", width: "8px", height: "8px" }), i.attr("contenteditable", !1), n.append(i), n.append(t), i }, imageThumbClick: function (t) { var n = '<img id="image-marker" src="' + e(t.target).attr("rel") + '" alt="' + e(t.target).attr("title") + '" />', i = this.getParent(); this.opts.paragraphy && 0 == e(i).closest("li").size() && (n = "<p>" + n + "</p>"), this.imageInsert(n, !0) }, imageCallbackLink: function () { var t = e("#redactor_file_link").val(); if ("" !== t) { var n = '<img id="image-marker" src="' + t + '" />'; this.opts.linebreaks === !1 && (n = "<p>" + n + "</p>"), this.imageInsert(n, !0) } else this.modalClose() }, imageCallback: function (e) { this.imageInsert(e) }, imageInsert: function (t, n) { if (this.selectionRestore(), t !== !1) { var i = ""; if (n !== !0) { i = '<img id="image-marker" src="' + t.filelink + '" />'; var o = this.getParent(); this.opts.paragraphy && 0 == e(o).closest("li").size() && (i = "<p>" + i + "</p>") } else i = t; this.execCommand("inserthtml", i, !1); var r = e(this.$editor.find("img#image-marker")); r.length ? r.removeAttr("id") : r = !1, this.sync(), n !== !0 && this.callback("imageUpload", r, t) } this.modalClose(), this.observeImages() }, modalTemplatesInit: function () { e.extend(this.opts, { modal_file: String() + '<section><div id="redactor-progress" class="redactor-progress redactor-progress-striped" style="display: none;"><div id="redactor-progress-bar" class="redactor-progress-bar" style="width: 100%;"></div></div><form id="redactorUploadFileForm" method="post" action="" enctype="multipart/form-data"><label>' + this.opts.curLang.filename + '</label><input type="text" id="redactor_filename" class="redactor_input" /><div style="margin-top: 7px;"><input type="file" id="redactor_file" name="' + this.opts.fileUploadParam + '" /></div></form></section>', modal_image_edit: String() + "<section><label>" + this.opts.curLang.title + '</label><input id="redactor_file_alt" class="redactor_input" /><label>' + this.opts.curLang.link + '</label><input id="redactor_file_link" class="redactor_input" /><label><input type="checkbox" id="redactor_link_blank"> ' + this.opts.curLang.link_new_tab + "</label><label>" + this.opts.curLang.image_position + '</label><select id="redactor_form_image_align"><option value="none">' + this.opts.curLang.none + '</option><option value="left">' + this.opts.curLang.left + '</option><option value="right">' + this.opts.curLang.right + '</option></select></section><footer><button id="redactor_image_delete_btn" class="redactor_modal_btn redactor_modal_delete_btn">' + this.opts.curLang._delete + '</button>&nbsp;&nbsp;&nbsp;<button class="redactor_modal_btn redactor_btn_modal_close">' + this.opts.curLang.cancel + '</button><input type="button" name="save" class="redactor_modal_btn redactor_modal_action_btn" id="redactorSaveBtn" value="' + this.opts.curLang.save + '" /></footer>', modal_image: String() + '<section><div id="redactor_tabs"><a href="#" class="redactor_tabs_act">' + this.opts.curLang.upload + '</a><a href="#">
37' + this.opts.curLang.choose + '</a><a href="#">' + this.opts.curLang.link + '</a></div><div id="redactor-progress" class="redactor-progress redactor-progress-striped" style="display: none;"><div id="redactor-progress-bar" class="redactor-progress-bar" style="width: 100%;"></div></div><form id="redactorInsertImageForm" method="post" action="" enctype="multipart/form-data"><div id="redactor_tab1" class="redactor_tab"><input type="file" id="redactor_file" name="' + this.opts.imageUploadParam + '" /></div><div id="redactor_tab2" class="redactor_tab" style="display: none;"><div id="redactor_image_box"></div></div></form><div id="redactor_tab3" class="redactor_tab" style="display: none;"><label>' + this.opts.curLang.image_web_link + '</label><input type="text" name="redactor_file_link" id="redactor_file_link" class="redactor_input"  /></div></section><footer><button class="redactor_modal_btn redactor_btn_modal_close">' + this.opts.curLang.cancel + '</button><input type="button" name="upload" class="redactor_modal_btn redactor_modal_action_btn" id="redactor_upload_btn" value="' + this.opts.curLang.insert + '" /></footer>', modal_link: String() + '<section><form id="redactorInsertLinkForm" method="post" action=""><div id="redactor_tabs"><a href="#" class="redactor_tabs_act">URL</a><a href="#">Email</a><a href="#">' + this.opts.curLang.anchor + '</a></div><input type="hidden" id="redactor_tab_selected" value="1" /><div class="redactor_tab" id="redactor_tab1"><label>URL</label><input type="text" id="redactor_link_url" class="redactor_input"  /><label>' + this.opts.curLang.text + '</label><input type="text" class="redactor_input redactor_link_text" id="redactor_link_url_text" /><label><input type="checkbox" id="redactor_link_blank"> ' + this.opts.curLang.link_new_tab + '</label></div><div class="redactor_tab" id="redactor_tab2" style="display: none;"><label>Email</label><input type="text" id="redactor_link_mailto" class="redactor_input" /><label>' + this.opts.curLang.text + '</label><input type="text" class="redactor_input redactor_link_text" id="redactor_link_mailto_text" /></div><div class="redactor_tab" id="redactor_tab3" style="display: none;"><label>' + this.opts.curLang.anchor + '</label><input type="text" class="redactor_input" id="redactor_link_anchor"  /><label>' + this.opts.curLang.text + '</label><input type="text" class="redactor_input redactor_link_text" id="redactor_link_anchor_text" /></div></form></section><footer><button class="redactor_modal_btn redactor_btn_modal_close">' + this.opts.curLang.cancel + '</button><input type="button" class="redactor_modal_btn redactor_modal_action_btn" id="redactor_insert_link_btn" value="' + this.opts.curLang.insert + '" /></footer>', modal_table: String() + "<section><label>" + this.opts.curLang.rows + '</label><input type="text" size="5" value="2" id="redactor_table_rows" /><label>' + this.opts.curLang.columns + '</label><input type="text" size="5" value="3" id="redactor_table_columns" /></section><footer><button class="redactor_modal_btn redactor_btn_modal_close">' + this.opts.curLang.cancel + '</button><input type="button" name="upload" class="redactor_modal_btn redactor_modal_action_btn" id="redactor_insert_table_btn" value="' + this.opts.curLang.insert + '" /></footer>', modal_video: String() + '<section><form id="redactorInsertVideoForm"><label>' + this.opts.curLang.video_html_code + '</label><textarea id="redactor_insert_video_area" style="width: 99%; height: 160px;"></textarea></form></section><footer><button class="redactor_modal_btn redactor_btn_modal_close">' + this.opts.curLang.cancel + '</button><input type="button" class="redactor_modal_btn redactor_modal_action_btn" id="redactor_insert_video_btn" value="' + this.opts.curLang.insert + '" /></footer>' }) }, modalInit: function (t, n, i, o) { var r = e("#redactor_modal_overlay"); r.length || (this.$overlay = r = e('<div id="redactor_modal_overlay" style="display: none;"></div>'), e("body").prepend(this.$overlay)), this.opts.modalOverlay && r.show().on("click", e.proxy(this.modalClose, this)); var s = e("#redactor_modal"); s.length || (this.$modal = s = e('<div id="redactor_modal" style="display: none;"><div id="redactor_modal_close">&times;</div><header id="redactor_modal_header"></header><div id="redactor_modal_inner"></div></div>'), e("body").append(this.$modal)), e("#redactor_modal_close").on("click", e.proxy(this.modalClose, this)), this.hdlModalClose = e.proxy(function (e) { return e.keyCode === this.keyCode.ESC ? (this.modalClose(), !1) : void 0 }, this), e(document).keyup(this.hdlModalClose), this.$editor.keyup(this.hdlModalClose), this.modalcontent = !1, 0 == n.indexOf("#") ? (this.modalcontent = e(n), e("#redactor_modal_inner").empty().append(this.modalcontent.html()), this.modalcontent.html("")) : e("#redactor_modal_inner").empty().append(n), s.find("#redactor_modal_header").html(t), "undefined" != typeof e.fn.draggable && (s.draggable({ handle: "#redactor_modal_header" }), s.find("#redactor_modal_header").css("cursor", "move")); var a = e("#redactor_tabs"); if (a.length) { var l = this; a.find("a").each(function (t, n) { t++, e(n).on("click", function (n) { if (n.preventDefault(), a.find("a").removeClass("redactor_tabs_act"), e(this).addClass("redactor_tabs_act"), e(".redactor_tab").hide(), e("#redactor_tab" + t).show(), e("#redactor_tab_selected").val(t), l.isMobile() === !1) { var i = s.outerHeight(); s.css("margin-top", "-" + (i + 10) / 2 + "px") } }) }) } s.find(".redactor_btn_modal_close").on("click", e.proxy(this.modalClose, this)), this.opts.autoresize === !0 ? this.saveModalScroll = this.document.body.scrollTop : this.saveModalScroll = this.$editor.scrollTop(), this.isMobile() === !1 ? (s.css({ position: "fixed", top: "-2000px", left: "50%", width: i + "px", marginLeft: "-" + (i + 60) / 2 + "px" }).show(), this.modalSaveBodyOveflow = e(document.body).css("overflow"), e(document.body).css("overflow", "hidden")) : s.css({ position: "fixed", width: "100%", height: "100%", top: "0", left: "0", margin: "0", minHeight: "300px" }).show(), "function" == typeof o && o(), this.isMobile() === !1 && setTimeout(function () { var e = s.outerHeight(); s.css({ top: "50%", height: "auto", minHeight: "auto", marginTop: "-" + (e + 10) / 2 + "px" }) }, 10) }, modalClose: function () { return e("#redactor_modal_close").off("click", this.modalClose), e("#redactor_modal").fadeOut("fast", e.proxy(function () { var t = e("#redactor_modal_inner"); this.modalcontent !== !1 && (this.modalcontent.html(t.html()), this.modalcontent = !1), t.html(""), this.opts.modalOverlay && e("#redactor_modal_overlay").hide().off("click", this.modalClose), e(document).unbind("
37keyup", this.hdlModalClose), this.$editor.unbind("keyup", this.hdlModalClose), this.selectionRestore(), this.opts.autoresize && this.saveModalScroll ? e(this.document.body).scrollTop(this.saveModalScroll) : this.opts.autoresize === !1 && this.saveModalScroll && this.$editor.scrollTop(this.saveModalScroll) }, this)), this.isMobile() === !1 && e(document.body).css("overflow", this.modalSaveBodyOveflow ? this.modalSaveBodyOveflow : "visible"), !1 }, modalSetTab: function (t) { e(".redactor_tab").hide(), e("#redactor_tabs").find("a").removeClass("redactor_tabs_act").eq(t - 1).addClass("redactor_tabs_act"), e("#redactor_tab" + t).show() }, s3handleFileSelect: function (e) { for (var t, n = e.target.files, i = 0; t = n[i]; i++)this.s3uploadFile(t) }, s3uploadFile: function (t) { this.s3executeOnSignedUrl(t, e.proxy(function (e) { this.s3uploadToS3(t, e) }, this)) }, s3executeOnSignedUrl: function (t, n) { var i = new XMLHttpRequest, o = "?"; "-1" != this.opts.s3.search(/\?/) && (o = "&"), i.open("GET", this.opts.s3 + o + "name=" + t.name + "&type=" + t.type, !0), i.overrideMimeType && i.overrideMimeType("text/plain; charset=x-user-defined"), i.onreadystatechange = function () { 4 == this.readyState && 200 == this.status ? (e("#redactor-progress").fadeIn(), n(decodeURIComponent(this.responseText))) : 4 == this.readyState && 200 != this.status }, i.send() }, s3createCORSRequest: function (e, t) { var n = new XMLHttpRequest; return "withCredentials" in n ? n.open(e, t, !0) : "undefined" != typeof XDomainRequest ? (n = new XDomainRequest, n.open(e, t)) : n = null, n }, s3uploadToS3: function (t, n) { var i = this.s3createCORSRequest("PUT", n); i && (i.onload = e.proxy(function () { if (200 == i.status) { e("#redactor-progress, #redactor-progress-drag").hide(); var t = n.split("?"); if (!t[0]) return !1; this.selectionRestore(); var o = ""; o = '<img id="image-marker" src="' + t[0] + '" />', this.opts.paragraphy && (o = "<p>" + o + "</p>"), this.execCommand("inserthtml", o, !1); var r = e(this.$editor.find("img#image-marker")); r.length ? r.removeAttr("id") : r = !1, this.sync(), this.callback("imageUpload", r, !1), this.modalClose(), this.observeImages() } }, this), i.onerror = function () { }, i.upload.onprogress = function () { }, i.setRequestHeader("Content-Type", t.type), i.setRequestHeader("x-amz-acl", "public-read"), i.send(t)) }, uploadInit: function (t, n) { this.uploadOptions = { url: !1, success: !1, error: !1, start: !1, trigger: !1, auto: !1, input: !1 }, e.extend(this.uploadOptions, n); var i = e("#" + t); i.length && "INPUT" === i[0].tagName ? (this.uploadOptions.input = i, this.el = e(i[0].form)) : this.el = i, this.element_action = this.el.attr("action"), this.uploadOptions.auto ? e(this.uploadOptions.input).change(e.proxy(function (e) { this.el.submit(function () { return !1 }), this.uploadSubmit(e) }, this)) : this.uploadOptions.trigger && e("#" + this.uploadOptions.trigger).click(e.proxy(this.uploadSubmit, this)) }, uploadSubmit: function () { e("#redactor-progress").fadeIn(), this.uploadForm(this.element, this.uploadFrame()) }, uploadFrame: function () { this.id = "f" + Math.floor(99999 * Math.random()); var t = this.document.createElement("div"), n = '<iframe style="display:none" id="' + this.id + '" name="' + this.id + '"></iframe>'; return t.innerHTML = n, e(t).appendTo("body"), this.uploadOptions.start && this.uploadOptions.start(), e("#" + this.id).load(e.proxy(this.uploadLoaded, this)), this.id }, uploadForm: function (t, n) { if (this.uploadOptions.input) { var i = "redactorUploadForm" + this.id, o = "redactorUploadFile" + this.id; this.form = e('<form  action="' + this.uploadOptions.url + '" method="POST" target="' + n + '" name="' + i + '" id="' + i + '" enctype="multipart/form-data" />'), this.opts.uploadFields !== !1 && "object" == typeof this.opts.uploadFields && e.each(this.opts.uploadFields, e.proxy(function (t, n) { null != n && 0 === n.toString().indexOf("#") && (n = e(n).val()); var i = e("<input/>", { type: "hidden", name: t, value: n }); e(this.form).append(i) }, this)); var r = this.uploadOptions.input, s = e(r).clone(); e(r).attr("id", o).before(s).appendTo(this.form), e(this.form).css("position", "absolute").css("top", "-2000px").css("left", "-2
37000px").appendTo("body"), this.form.submit() } else t.attr("target", n).attr("method", "POST").attr("enctype", "multipart/form-data").attr("action", this.uploadOptions.url), this.element.submit() }, uploadLoaded: function () { var t, n = e("#" + this.id)[0]; if (t = n.contentDocument ? n.contentDocument : n.contentWindow ? n.contentWindow.document : window.frames[this.id].document, this.uploadOptions.success) if (e("#redactor-progress").hide(), "undefined" != typeof t) { var i = t.body.innerHTML, o = i.match(/\{(.|\n)*\}/)[0]; o = o.replace(/^\[/, ""), o = o.replace(/\]$/, ""); var r = e.parseJSON(o); "undefined" == typeof r.error ? this.uploadOptions.success(r) : (this.uploadOptions.error(this, r), this.modalClose()) } else this.modalClose(), alert("Upload failed!"); this.el.attr("action", this.element_action), this.el.attr("target", "") }, draguploadInit: function (t, n) { return this.draguploadOptions = e.extend({ url: !1, success: !1, error: !1, preview: !1, uploadFields: !1, text: this.opts.curLang.drop_file_here, atext: this.opts.curLang.or_choose, uploadParam: !1 }, n), void 0 === window.FormData ? !1 : (this.droparea = e('<div class="redactor_droparea"></div>'), this.dropareabox = e('<div class="redactor_dropareabox">' + this.draguploadOptions.text + "</div>"), this.dropalternative = e('<div class="redactor_dropalternative">' + this.draguploadOptions.atext + "</div>"), this.droparea.append(this.dropareabox), e(t).before(this.droparea), e(t).before(this.dropalternative), this.dropareabox.on("dragover", e.proxy(function () { return this.draguploadOndrag() }, this)), this.dropareabox.on("dragleave", e.proxy(function () { return this.draguploadOndragleave() }, this)), void (this.dropareabox.get(0).ondrop = e.proxy(function (e) { e.preventDefault(), this.dropareabox.removeClass("hover").addClass("drop"), this.dragUploadAjax(this.draguploadOptions.url, e.dataTransfer.files[0], !1, !1, !1, this.draguploadOptions.uploadParam) }, this))) }, dragUploadAjax: function (t, n, i, o, r, s) { if (!i) { var a = e.ajaxSettings.xhr(); a.upload && a.upload.addEventListener("progress", e.proxy(this.uploadProgress, this), !1), e.ajaxSetup({ xhr: function () { return a } }) } var l = new FormData; s !== !1 ? l.append(s, n) : l.append("file", n), this.opts.uploadFields !== !1 && "object" == typeof this.opts.uploadFields && e.each(this.opts.uploadFields, e.proxy(function (t, n) { null != n && 0 === n.toString().indexOf("#") && (n = e(n).val()), l.append(t, n) }, this)), e.ajax({ url: t, dataType: "html", data: l, cache: !1, contentType: !1, processData: !1, type: "POST", success: e.proxy(function (t) { t = t.replace(/^\[/, ""), t = t.replace(/\]$/, ""); var n = "string" == typeof t ? e.parseJSON(t) : t; if (i) { o.fadeOut("slow", function () { e(this).remove() }); var s = e("<img>"); s.attr("src", n.filelink).attr("id", "drag-image-marker"), this.insertNodeToCaretPositionFromPoint(r, s[0]); var a = e(this.$editor.find("img#drag-image-marker")); a.length ? a.removeAttr("id") : a = !1, this.sync(), this.observeImages(), a && this.callback("imageUpload", a, n), "undefined" != typeof n.error && this.callback("imageUploadError", n) } else "undefined" == typeof n.error ? this.draguploadOptions.success(n) : (this.draguploadOptions.error(this, n), this.draguploadOptions.success(!1)) }, this) }) }, draguploadOndrag: function () { return this.dropareabox.addClass("hover"), !1 }, draguploadOndragleave: function () { return this.dropareabox.removeClass("hover"), !1 }, uploadProgress: function (e, t) { var n = e.loaded ? parseInt(e.loaded / e.total * 100, 10) : e; this.dropareabox.text("Loading " + n + "% " + (t || "")) }, isMobile: function () { return /(iPhone|iPod|BlackBerry|Android)/.test(navigator.userAgent) }, normalize: function (e) { return "undefined" == typeof e ? 0 : parseInt(e.replace("px", ""), 10) }, outerHtml: function (t) { return e("<div>").append(e(t).eq(0).clone()).html() }, isString: function (e) { return "[object String]" == Object.prototype.toString.call(e) }, isEmpty: function (e) { return e = e.replace(/&#x200b;|<br>|<br\/>|&nbsp;/gi, ""), e = e.replace(/\s/g, ""), e = e.replace(/^<p>[^\W\w\D\d]*?<\/p>$/i, ""), "" == e }, isIe11: function () { return !!navigator.userAgent.match(/Trident\/7\./) }, browser: function (e) { var t = navigator.userAgent.toLowerCase(), n = /(opr)[\/]([\w.]+)/.exec(t) || /(chrome)[ \/]([\w.]+)/.exec(t) || /(webkit)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(t) || /(webkit)[ \/]([\w.]+)/.exec(t) || /(opera)(?:.*version|)[ \/]([\w.]+)/.exec(t) || /(msie) ([\w.]+)/.exec(t) || t.indexOf("trident") >= 0 && /(rv)(?::| )([\w.]+)/.exec(t) || t.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(t) || []; return "version" == e ? n[2] : "webkit" == e ? "chrome" == n[1] || "webkit" == n[1] : "rv" == n[1] ? "msie" == e : "opr" == n[1] ? "webkit" == e : e == n[1] }, oldIE: function () { return !!(this.browser("msie") && parseInt(this.browser("version"), 10) < 9) }, getFragmentHtml: function (e) { var t = e.cloneNode(!0), n = this.document.createElement("div"); return n.appendChild(t), n.innerHTML }, extractContent: function () { for (var e, t = this.$editor[0], n = this.document.createDocumentFragment(); e = t.firstChild;)n.appendChild(e); return n }, isParentRedactor: function (t) { return t ? this.opts.iframe ? t : 0 == e(t).parents("div.redactor_editor").length || e(t).hasClass("redactor_editor") ? !1 : t : !1 }, currentOrParentIs: function (e) { var t = this.getParent(), n = this.getCurrent(); return t && t.tagName === e ? t : n && n.tagName === e ? n : !1 }, isEndOfElement: function () { var t = this.getBlock(), n = this.getCaretOffset(t), i = e.trim(e(t).text()).replace(/\n\r\n/g, ""), o = i.length; return n == o }
37, isFocused: function () { var t, n = this.getSelection(); return n && n.rangeCount && n.rangeCount > 0 && (t = n.getRangeAt(0).startContainer), t ? this.opts.iframe ? this.getCaretOffsetRange().equals() ? !this.$editor.is(t) : !0 : 0 != e(t).closest("div.redactor_editor").length : !1 }, removeEmptyAttr: function (t, n) { "" == e(t).attr(n) && e(t).removeAttr(n) }, removeFromArrayByValue: function (e, t) { for (var n = null; -1 !== (n = e.indexOf(t));)e.splice(n, 1); return e }
38    }, t.prototype.init.prototype = t.prototype, e.Redactor.fn.formatLinkify = function (t, n, i, o, r) { for (var s = /(^|&lt;|\s)(www\..+?\..+?)(\s|&gt;|$)/g, a = /(^|&lt;|\s)(((https?|ftp):\/\/|mailto:).+?)(\s|&gt;|$)/g, l = /(https?:\/\/.*\.(?:png|jpg|jpeg|gif))/gi, c = /https?:\/\/(?:[0-9A-Z-]+\.)?(?:youtu\.be\/|youtube\.com\S*[^\w\-\s])([\w\-]{11})(?=[^\w\-]|$)(?![?=&+%\w.-]*(?:['"][^<>]*>|<\/a>))[?=&+%\w.-]*/gi, d = /https?:\/\/(www\.)?vimeo.com\/(\d+)($|\/)/, u = (this.$editor ? this.$editor.get(0) : this).childNodes, h = u.length; h--;) { var p = u[h]; if (3 === p.nodeType) { var f = p.nodeValue; if (o && f) { var m = '<iframe width="500" height="281" src="', g = '" frameborder="0" allowfullscreen></iframe>'; f.match(c) ? (f = f.replace(c, m + "//www.youtube.com/embed/$1" + g), e(p).after(f).remove()) : f.match(d) && (f = f.replace(d, m + "//player.vimeo.com/video/$2" + g), e(p).after(f).remove()) } if (i && f && f.match(l) && (f = f.replace(l, '<img src="$1">'), e(p).after(f).remove()), n && f && (f.match(s) || f.match(a))) { var v = f.match(s) || f.match(a); v = v[0], v.length > r && (v = v.substring(0, r) + "..."), f = f.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(s, '$1<a href="' + t + '$2">' + e.trim(v) + "</a>$3").replace(a, '$1<a href="$2">' + e.trim(v) + "</a>$5"), e(p).after(f).remove() } } else 1 !== p.nodeType || /^(a|button|textarea)$/i.test(p.tagName) || e.Redactor.fn.formatLinkify.call(p, t, n, i, o, r) } }
39}(jQuery), $(document).ready(function () { $(".static-home").find('a[href!="#"]').prop("href", "/static/officiel/post") }), $(document).on("scroll", function () {
40    $(document).scrollTop() > 114 ? ($(".site-header").addClass("site-header--small"), $(".logo").addClass("logo_hide"), $(".logo_scroll").removeClass("logo_hide"), $(".site-header__tenants-button").addClass("header_icons"), $(".visible--on-lap").addClass("header_icons"), $(".hidden--on-lap").removeClass("more-color"), $(".site-header__nav-button").removeClass("mobile_side_color"), $(".site-header__nav-button").addClass("header_icons"), $(".site-header").removeClass("icon_header_background"), $(".site-header--rev").removeClass("is-reversed"), $(".site-header__logo").removeClass("logo_scroll"), $("body").addClass("masthead-is-closed")) : ($(".site-header").removeClass("site-header--small"), $(".site-header__logo").removeClass("logo_scroll"), $(".site-header").addClass("icon_header_background"), $(".site-header__nav-button").addClass("mobile_side_color"), $(".site-header__tenants-button").removeClass("mobile_onscroll_color"), $(".site-header__tenants-button").removeClass("header_icons"), $(".visible--on-lap").removeClass("header_icons"), $(".hidden--on-lap").addClass("more-color"), $(".site-header__nav-button").removeClass("header_icons"), $(".logo_scroll").addClass("logo_hide"), $(".logo").removeClass("logo_hide"), $("body").removeClass("masthead-is-closed"), $(".home-index").hasClass("body-with-background") || $(".site-header--rev").addClass("is-reversed"))
41}), function (e) { if ("object" == typeof exports && "undefined" != typeof module) module.exports = e(); else if ("function" == typeof define && define.amd) define([], e); else { var t; t = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : this, t.ProgressBar = e() } }(function () { var e; return function t(e, n, i) { function o(s, a) { if (!n[s]) { if (!e[s]) { var l = "function" == typeof require && require; if (!a && l) return l(s, !0); if (r) return r(s, !0); var c = new Error("Cannot find module '" + s + "'"); throw c.code = "MODULE_NOT_FOUND", c } var d = n[s] = { exports: {} }; e[s][0].call(d.exports, function (t) { var n = e[s][1][t]; return o(n ? n : t) }, d, d.exports, t, e, n, i) } return n[s].exports } for (var r = "function" == typeof require && require, s = 0; s < i.length; s++)o(i[s]); return o }({ 1: [function (t, n, i) { !function (t) { "undefined" == typeof SHIFTY_DEBUG_NOW && (SHIFTY_DEBUG_NOW = function () { return +new Date }); var o = function () { "use strict"; function o() { } function r(e, t) { var n; for (n in e) Object.hasOwnProperty.call(e, n) && t(n) } function s(e, t) { return r(t, function (n) { e[n] = t[n] }), e } function a(e, t) { r(t, function (n) { "undefined" == typeof e[n] && (e[n] = t[n]) }) } function l(e, t, n, i, o, r, s) { var a, l = (e - r) / o; for (a in t) t.hasOwnProperty(a) && (t[a] = c(n[a], i[a], f[s[a]], l)); return t } function c(e, t, n, i) { return e + (t - e) * n(i) } function d(e, t) { var n = p.prototype.filter, i = e._filterArgs; r(n, function (o) { "undefined" != typeof n[o][t] && n[o][t].apply(e, i) }) } function u(e, t, n, i, o, r, s, a, c) { b = t + n, C = Math.min(y(), b), _ = C >= b, e.isPlaying() && !_ ? (c(e._timeoutHandler, E), d(e, "beforeTween"), l(C, i, o, r, n, t, s), d(e, "afterTween"), a(i)) : _ && (a(r), e.stop(!0)) } function h(e, t) { var n = {}; return "string" == typeof t ? r(e, function (e) { n[e] = t }) : r(e, function (e) { n[e] || (n[e] = t[e] || g) }), n } function p(e, t) { this._currentState = e || {}, this._configured = !1, this._scheduleFunction = m, "undefined" != typeof t && this.setConfig(t) } var f, m, g = "linear", v = 500, E = 1e3 / 60, T = Date.now ? Date.now : function () { return +new Date }, y = SHIFTY_DEBUG_NOW ? SHIFTY_DEBUG_NOW : T; m = "undefined" != typeof window ? window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || window.mozCancelRequestAnimationFrame && window.mozRequestAnimationFrame || setTimeout : setTimeout; var b, C, _; return p.prototype.tween = function (e) { return this._isTweening ? this : (void 0 === e && this._configured || this.setConfig(e), this._start(this.get()), this.resume()) }, p.prototype.setConfig = function (e) { e = e || {}, this._configured = !0, this._pausedAtTime = null, this._start = e.start || o, this._step = e.step || o, this._finish = e.finish || o, this._duration = e.duration || v, this._currentState = e.from || this.get(), this._originalState = this.get(), this._targetState = e.to || this.get(), this._timestamp = y(); var t = this._currentState, n = this._targetState; return a(n, t), this._easing = h(t, e.easing || g), this._filterArgs = [t, this._originalState, n, this._easing], d(this, "tweenCreated"), this }, p.prototype.get = function () { return s({}, this._currentState) }, p.prototype.set = function (e) { this._currentState = e }, p.prototype.pause = function () { return this._pausedAtTime = y(), this._isPaused = !0, this }, p.prototype.resume = function () { this._isPaused && (this._timestamp += y() - this._pausedAtTime), this._isPaused = !1, this._isTweening = !0; var e = this; return this._timeoutHandler = function () { u(e, e._timestamp, e._duration, e._currentState, e._originalState, e._targetState, e._easing, e._step, e._scheduleFunction) }, this._timeoutHandler(), this }, p.prototype.stop = function (e) { return this._isTweening = !1, this._isPaused = !1, this._timeoutHandler = o, e && (s(this._currentState, this._targetState), d(this, "afterTweenEnd"), this._finish.call(this, this._currentState)), this }, p.prototype.isPlaying = function () { return this._isTweening && !this._isPaused }, p.prototype.setScheduleFunction = function (e) { this._scheduleFunction = e }, p.prototype.dispose = function () { var e; for (e in this) this.hasOwnProperty(e) && delete this[e] }, p.prototype.filter = {}, p.prototype.formula = { linear: function (e) { return e } }, f = p.prototype.formula, s(p, { now: y, each: r, tweenProps: l, tweenProp: c, applyFilter: d, shallowCopy: s, defaults: a, composeEasingObject: h }), "function" == typeof SHIFTY_DEBUG_NOW && (t.timeoutHandler = u), "object" == typeof i ? n.exports = p : "function" == typeof e && e.amd ? e(function () { return p }) : "undefined" == typeof t.Tweenable && (t.Tweenable = p), p }(); !function () { o.shallowCopy(o.prototype.formula, { easeInQuad: function (e) { return Math.pow(e, 2) }, easeOutQuad: function (e) { return -(Math.pow(e - 1, 2) - 1) }, easeInOutQuad: function (e) { return (e /= .5) < 1 ? .5 * Math.pow(e, 2) : -.5 * ((e -= 2) * e - 2) }, easeInCubic: function (e) { return Math.pow(e, 3) }, easeOutCubic: function (e) { return Math.pow(e - 1, 3) + 1 }, easeInOutCubic: function (e) { return (e /= .5) < 1 ? .5 * Math.pow(e, 3) : .5 * (Math.pow(e - 2, 3) + 2) }, easeInQuart: function (e) { return Math.pow(e, 4) }, easeOutQuart: function (e) { return -(Math.pow(e - 1, 4) - 1) }, easeInOutQuart: function (e) { return (e /= .5) < 1 ? .5 * Math.pow(e, 4) : -.5 * ((e -= 2) * Math.pow(e, 3) - 2) }, easeInQuint: function (e) { return Math.pow(e, 5) }, easeOutQuint: function (e) { return Math.pow(e - 1, 5) + 1 }, easeInOutQuint: function (e) { return (e /= .5) < 1 ? .5 * Math.pow(e, 5) : .5 * (Math.pow(e - 2, 5) + 2) }, easeInSine: function (e) { return -Math.cos(e * (Math.PI / 2)) + 1 }, easeOutSine: function (e) { return Math.sin(e * (Math.PI / 2)) }, easeInOutSine: function (e) { return -.5 * (Math.cos(Math.PI * e) - 1) }, easeInExpo: function (e) { return 0 === e ? 0 : Math.pow(2, 10 * (e - 1)) }, easeOutExpo: function (e) { return 1 === e ? 1 : -Math.pow(2, -10 * e) + 1 }, easeInOutExpo: function (e) { return 0 === e ? 0 : 1 === e ? 1 : (e /= .5) < 1 ? .5 * Math.pow(2, 10 * (e - 1)) : .5 * (-Math.pow(2, -10 * --e) + 2) }, easeInCirc: function (e) { return -(Math.sqrt(1 - e * e) - 1) }, easeOutCirc: function (e) { return Math.sqrt(1 - Math.pow(e - 1, 2)) }, easeInOutCirc: function (e) { return (e /= .5) < 1 ? -.5 * (Math.sqrt(1 - e * e) - 1) : .5 * (Math.sqrt(1 - (e -= 2) * e) + 1) }, easeOutBounce: function (e) { return 1 / 2.75 > e ? 7.5625 * e * e : 2 / 2.75 > e ? 7.5625 * (e -= 1.5 / 2.75) * e + .75 : 2.5 / 2.75 > e ? 7.5625 * (e -= 2.25 / 2.75) * e + .9375 : 7.5625 * (e -= 2.625 / 2.75) * e + .984375 }, easeInBack: function (e) { var t = 1.70158; return e * e * ((t + 1) * e - t) }, easeOutBack: function (e) { var t = 1.70158; return (e -= 1) * e * ((t + 1) * e + t) + 1 }, easeInOutBack: function (e) { var t = 1.70158; return (e /= .5) < 1 ? .5 * (e * e * (((t *= 1.525) + 1) * e - t)) : .5 * ((e -= 2) * e * (((t *= 1.525) + 1) * e + t) + 2) }, elastic: function (e) { return -1 * Math.pow(4, -8 * e) * Math.sin((6 * e - 1) * (2 * Math.PI) / 2) + 1 }, swingFromTo: function (e) { var t = 1.70158; return (e /= .5) < 1 ? .5 * (e * e * (((t *= 1.525) + 1) * e - t)) : .5 * ((e -= 2) * e * (((t *= 1.525) + 1) * e + t) + 2) }
vendor: 6,982 bytes, line 41
41, swingFrom: function (e) { var t = 1.70158; return e * e * ((t + 1) * e - t) }, swingTo: function (e) { var t = 1.70158; return (e -= 1) * e * ((t + 1) * e + t) + 1 }, bounce: function (e) { return 1 / 2.75 > e ? 7.5625 * e * e : 2 / 2.75 > e ? 7.5625 * (e -= 1.5 / 2.75) * e + .75 : 2.5 / 2.75 > e ? 7.5625 * (e -= 2.25 / 2.75) * e + .9375 : 7.5625 * (e -= 2.625 / 2.75) * e + .984375 }, bouncePast: function (e) { return 1 / 2.75 > e ? 7.5625 * e * e : 2 / 2.75 > e ? 2 - (7.5625 * (e -= 1.5 / 2.75) * e + .75) : 2.5 / 2.75 > e ? 2 - (7.5625 * (e -= 2.25 / 2.75) * e + .9375) : 2 - (7.5625 * (e -= 2.625 / 2.75) * e + .984375) }, easeFromTo: function (e) { return (e /= .5) < 1 ? .5 * Math.pow(e, 4) : -.5 * ((e -= 2) * Math.pow(e, 3) - 2) }, easeFrom: function (e) { return Math.pow(e, 4) }, easeTo: function (e) { return Math.pow(e, .25) } }) }(), function () { function e(e, t, n, i, o, r) { function s(e) { return ((p * e + f) * e + m) * e } function a(e) { return ((g * e + v) * e + E) * e } function l(e) { return (3 * p * e + 2 * f) * e + m } function c(e) { return 1 / (200 * e) } function d(e, t) { return a(h(e, t)) } function u(e) { return e >= 0 ? e : 0 - e } function h(e, t) { var n, i, o, r, a, c; for (o = e, c = 0; 8 > c; c++) { if (r = s(o) - e, u(r) < t) return o; if (a = l(o), u(a) < 1e-6) break; o -= r / a } if (n = 0, i = 1, o = e, n > o) return n; if (o > i) return i; for (; i > n;) { if (r = s(o), u(r - e) < t) return o; e > r ? n = o : i = o, o = .5 * (i - n) + n } return o } var p = 0, f = 0, m = 0, g = 0, v = 0, E = 0; return m = 3 * t, f = 3 * (i - t) - m, p = 1 - m - f, E = 3 * n, v = 3 * (o - n) - E, g = 1 - E - v, d(e, c(r)) } function t(t, n, i, o) { return function (r) { return e(r, t, n, i, o, 1) } } o.setBezierFunction = function (e, n, i, r, s) { var a = t(n, i, r, s); return a.x1 = n, a.y1 = i, a.x2 = r, a.y2 = s, o.prototype.formula[e] = a }, o.unsetBezierFunction = function (e) { delete o.prototype.formula[e] } }(), function () { function e(e, t, n, i, r) { return o.tweenProps(i, t, e, n, 1, 0, r) } var t = new o; t._filterArgs = [], o.interpolate = function (n, i, r, s) { var a = o.shallowCopy({}, n), l = o.composeEasingObject(n, s || "linear"); t.set({}); var c = t._filterArgs; c.length = 0, c[0] = a, c[1] = n, c[2] = i, c[3] = l, o.applyFilter(t, "tweenCreated"), o.applyFilter(t, "beforeTween"); var d = e(n, a, i, r, l); return o.applyFilter(t, "afterTween"), d } }(), function (e) { function t(e, t) { R.length = 0; var n, i = e.length; for (n = 0; i > n; n++)R.push("_" + t + "_" + n); return R } function n(e) { var t = e.match(b); return t ? (1 === t.length || e[0].match(y)) && t.unshift("") : t = ["", ""], t.join(D) } function i(t) { e.each(t, function (e) { var n = t[e]; "string" == typeof n && n.match(O) && (t[e] = o(n)) }) } function o(e) { return l(O, e, r) } function r(e) { var t = s(e); return "rgb(" + t[0] + "," + t[1] + "," + t[2] + ")" } function s(e) { return e = e.replace(/#/, ""), 3 === e.length && (e = e.split(""), e = e[0] + e[0] + e[1] + e[1] + e[2] + e[2]), k[0] = a(e.substr(0, 2)), k[1] = a(e.substr(2, 2)), k[2] = a(e.substr(4, 2)), k } function a(e) { return parseInt(e, 16) } function l(e, t, n) { var i = t.match(e), o = t.replace(e, D); if (i) for (var r, s = i.length, a = 0; s > a; a++)r = i.shift(), o = o.replace(D, n(r)); return o } function c(e) { return l(_, e, d) } function d(e) { for (var t = e.match(C), n = t.length, i = e.match(I)[0], o = 0; n > o; o++)i += parseInt(t[o], 10) + ","; return i = i.slice(0, -1) + ")" } function u(i) { var o = {}; return e.each(i, function (e) { var r = i[e]; if ("string" == typeof r) { var s = v(r); o[e] = { formatString: n(r), chunkNames: t(s, e) } } }), o } function h(t, n) { e.each(n, function (e) { for (var i = t[e], o = v(i), r = o.length, s = 0; r > s; s++)t[n[e].chunkNames[s]] = +o[s]; delete t[e] }) } function p(t, n) { e.each(n, function (e) { var i = t[e], o = f(t, n[e].chunkNames), r = m(o, n[e].chunkNames); i = g(n[e].formatString, r), t[e] = c(i) }) } function f(e, t) { for (var n, i = {}, o = t.length, r = 0; o > r; r++)n = t[r], i[n] = e[n], delete e[n]; return i } function m(e, t) { w.length = 0; for (var n = t.length, i = 0; n > i; i++)w.push(e[t[i]]); return w } function g(e, t) { for (var n = e, i = t.length, o = 0; i > o; o++)n = n.replace(D, +t[o].toFixed(4)); return n } function v(e) { return e.match(C) } function E(t, n) { e.each(n, function (e) { for (var i = n[e], o = i.chunkNames, r = o.length, s = t[e].split(" "), a = s[s.length - 1], l = 0; r > l; l++)t[o[l]] = s[l] || a; delete t[e] }) } function T(t, n) { e.each(n, function (e) { for (var i = n[e], o = i.chunkNames, r = o.length, s = "", a = 0; r > a; a++)s += " " + t[o[a]], delete t[o[a]]; t[e] = s.substr(1) }) } var y = /(\d|\-|\.)/, b = /([^\-0-9\.]+)/g, C = /[0-9.\-]+/g, _ = new RegExp("rgb\\(" + C.source + /,\s*/.source + C.source + /,\s*/.source + C.source + "\\)", "g"), I = /^.*\(/, O = /#([0-9]|[a-f]){3,6}/gi, D = "VAL", R = [], k = [], w = []; e.prototype.filter.token = { tweenCreated: function (e, t, n) { i(e), i(t), i(n), this._tokenData = u(e) }, beforeTween: function (e, t, n, i) { E(i, this._tokenData), h(e, this._tokenData), h(t, this._tokenData), h(n, this._tokenData) }, afterTween: function (e, t, n, i) { p(e, this._tokenData), p(t, this._tokenData), p(n, this._tokenData), T(i, this._tokenData) } } }(o) }(this) }, {}], 2: [function (e, t) { var n = e("./shape"), i = e("./utils"), o = function () { this._pathTemplate = "M 50,50 m 0,-{radius} a {radius},{radius} 0 1 1 0,{2radius} a {radius},{radius} 0 1 1 0,-{2radius}", n.apply(this, arguments) }; o.prototype = new n, o.prototype.constructor = o, o.prototype._pathString = function (e) { var t = e.strokeWidth; e.trailWidth && e.trailWidth > e.strokeWidth && (t = e.trailWidth); var n = 50 - t / 2; return i.render(this._pathTemplate, { radius: n, "2radius": 2 * n }) }, o.prototype._trailString = function (e) { return this._pathString(e) }, t.exports = o }, { "./shape": 6, "./utils": 8 }], 3: [function (e, t) { var n = e("./shape"), i = e("./utils"), o = function () { this._pathTemplate = "M 0,{center} L 100,{center}", n.apply(this, arguments) }; o.prototype = new n, o.prototype.constructor = o, o.prototype._initializeSvg = function (e, t) { e.setAttribute("viewBox", "0 0 100 " + t.strokeWidth), e.setAttribute("preserveAspectRatio", "none") }, o.prototype._pathString = function (e) { return i.render(this._pathTemplate, { center: e.strokeWidth / 2 }) }, o.prototype._trailString = function (e) { return this._pathString(e) }, t.exports = o }, { "./shape": 6, "./utils": 8 }], 4: [function (e, t) { var n = e("./line"), i = e("./circle"), o = e("./square"), r = e("./path"); t.exports = { Line: n, Circle: i, Square: o, Path: r } }, { "./circle": 2, "./line": 3, "./path": 5, "./square": 7 }], 5: [function (e, t) { var n = e("shifty"), i = e("./utils"), o = { easeIn: "easeInCubic", easeOut: "easeOutCubic", easeInOut: "easeInOutCubic" }
41, r = function (e, t) { t = i.extend({ duration: 800, easing: "linear", from: {}, to: {}, step: function () { } }, t); var n; n = i.isString(e) ? document.querySelector(e) : e, this.path = n, this._opts = t, this._tweenable = null; var o = this.path.getTotalLength(); this.path.style.strokeDasharray = o + " " + o, this.set(0) }; r.prototype.value = function () { var e = this._getComputedDashOffset(), t = this.path.getTotalLength(), n = 1 - e / t; return parseFloat(n.toFixed(6), 10) }, r.prototype.set = function (e) { this.stop(), this.path.style.strokeDashoffset = this._progressToOffset(e); var t = this._opts.step; if (i.isFunction(t)) { var n = this._easing(this._opts.easing), o = this._calculateTo(e, n); t(o, this._opts.shape || this, this._opts.attachment) } }, r.prototype.stop = function () { this._stopTween(), this.path.style.strokeDashoffset = this._getComputedDashOffset() }, r.prototype.animate = function (e, t, o) { t = t || {}, i.isFunction(t) && (o = t, t = {}); var r = i.extend({}, t), s = i.extend({}, this._opts); t = i.extend(s, t); var a = this._easing(t.easing), l = this._resolveFromAndTo(e, a, r); this.stop(), this.path.getBoundingClientRect(); var c = this._getComputedDashOffset(), d = this._progressToOffset(e), u = this; this._tweenable = new n, this._tweenable.tween({ from: i.extend({ offset: c }, l.from), to: i.extend({ offset: d }, l.to), duration: t.duration, easing: a, step: function (e) { u.path.style.strokeDashoffset = e.offset, t.step(e, t.shape || u, t.attachment) }, finish: function () { i.isFunction(o) && o() } }) }, r.prototype._getComputedDashOffset = function () { var e = window.getComputedStyle(this.path, null); return parseFloat(e.getPropertyValue("stroke-dashoffset"), 10) }, r.prototype._progressToOffset = function (e) { var t = this.path.getTotalLength(); return t - e * t }, r.prototype._resolveFromAndTo = function (e, t, n) { return n.from && n.to ? { from: n.from, to: n.to } : { from: this._calculateFrom(t), to: this._calculateTo(e, t) } }, r.prototype._calculateFrom = function (e) { return n.interpolate(this._opts.from, this._opts.to, this.value(), e) }, r.prototype._calculateTo = function (e, t) { return n.interpolate(this._opts.from, this._opts.to, e, t) }, r.prototype._stopTween = function () { null !== this._tweenable && (this._tweenable.stop(), this._tweenable.dispose(), this._tweenable = null) }, r.prototype._easing = function (e) { return o.hasOwnProperty(e) ? o[e] : e }, t.exports = r }, { "./utils": 8, shifty: 1 }], 6: [function (e, t) { var n = e("./path"), i = e("./utils"), o = "Object is destroyed", r = function s(e, t) { if (!(this instanceof s)) throw new Error("Constructor was called without new keyword"); if (0 !== arguments.length) { this._opts = i.extend({ color: "#555", strokeWidth: 1, trailColor: null, trailWidth: null, fill: null, text: { autoStyle: !0, color: null, value: "", className: "progressbar-text" } }, t, !0); var o, r = this._createSvgView(this._opts); if (o = i.isString(e) ? document.querySelector(e) : e, !o) throw new Error("Container does not exist: " + e); this._container = o, this._container.appendChild(r.svg), this.text = null, this._opts.text.value && (this.text = this._createTextElement(this._opts, this._container), this._container.appendChild(this.text)), this.svg = r.svg, this.path = r.path, this.trail = r.trail; var a = i.extend({ attachment: void 0, shape: this }, this._opts); this._progressPath = new n(r.path, a) } }; r.prototype.animate = function (e, t, n) { if (null === this._progressPath) throw new Error(o); this._progressPath.animate(e, t, n) }, r.prototype.stop = function () { if (null === this._progressPath) throw new Error(o); void 0 !== this._progressPath && this._progressPath.stop() }, r.prototype.destroy = function () { if (null === this._progressPath) throw new Error(o); this.stop(), this.svg.parentNode.removeChild(this.svg), this.svg = null, this.path = null, this.trail = null, this._progressPath = null, null !== this.text && (this.text.parentNode.removeChild(this.text), this.text = null) }, r.prototype.set = function (e) { if (null === this._progressPath) throw new Error(o); this._progressPath.set(e) }, r.prototype.value = function () { if (null === this._progressPath) throw new Error(o); return void 0 === this._progressPath ? 0 : this._progressPath.value() }, r.prototype.setText = function (e) { if (null === this._progressPath) throw new Error(o); null === this.text && (this.text = this._createTextElement(this._opts, this._container), this._container.appendChild(this.text)), this.text.removeChild(this.text.firstChild), this.text.appendChild(document.createTextNode(e)) }, r.prototype._createSvgView = function (e) { var t = document.createElementNS("http://www.w3.org/2000/svg", "svg"); this._initializeSvg(t, e); var n = null; (e.trailColor || e.trailWidth) && (n = this._createTrail(e), t.appendChild(n)); var i = this._createPath(e); return t.appendChild(i), { svg: t, path: i, trail: n } }, r.prototype._initializeSvg = function (e) { e.setAttribute("viewBox", "0 0 100 100") }, r.prototype._createPath = function (e) { var t = this._pathString(e); return this._createPathElement(t, e) }, r.prototype._createTrail = function (e) { var t = this._trailString(e), n = i.extend({}, e); return n.trailColor || (n.trailColor = "#eee"), n.trailWidth || (n.trailWidth = n.strokeWidth), n.color = n.trailColor, n.strokeWidth = n.trailWidth, n.fill = null, this._createPathElement(t, n) }, r.prototype._createPathElement = function (e, t) { var n = document.createElementNS("http://www.w3.org/2000/svg", "path"); return n.setAttribute("d", e), n.setAttribute("stroke", t.color), n.setAttribute("stroke-width", t.strokeWidth), t.fill ? n.setAttribute("fill", t.fill) : n.setAttribute("fill-opacity", "0"), n }, r.prototype._createTextElement = function (e, t) { var n = document.createElement("p"); return n.appendChild(document.createTextNode(e.text.value)), e.text.autoStyle && (t.style.position = "relative", n.style.position = "absolute", n.style.top = "50%", n.style.left = "50%", n.style.padding = 0, n.style.margin = 0, i.setStyle(n, "transform", "translate(-50%, -50%)"), e.text.color ? n.style.color = e.text.color : n.style.color = e.color), n.className = e.text.className, n }, r.prototype._pathString = function () { throw new Error("Override this function for each progress bar") }, r.prototype._trailString = function () { throw new Error("Override this function for each progress bar") }, t.exports = r }, { "./path": 5, "./utils": 8 }], 7: [function (e, t) { var n = e("./shape"), i = e("./utils"), o = function () { this._pathTemplate = "M 0,{halfOfStrokeWidth} L {width},{halfOfStrokeWidth} L {width},{width} L {halfOfStrokeWidth},{width} L {halfOfStrokeWidth},{strokeWidth}", this._trailTemplate = "M {startMargin},{halfOfStrokeWidth} L {width},{halfOfStrokeWidth} L {width},{width} L {halfOfStrokeWidth},{width} L {halfOfStrokeWidth},{halfOfStrokeWidth}", n.apply(this, arguments) }; o.prototype = new n, o.prototype.constructor = o, o.prototype._pathString = function (e) { var t = 100 - e.strokeWidth / 2; return i.render(this._pathTemplate, { width: t, strokeWidth: e.strokeWidth, halfOfStrokeWidth: e.strokeWidth / 2 }) }, o.prototype._trailString = function (e) { var t = 100 - e.strokeWidth / 2; return i.render(this._trailTemplate, { width: t, strokeWidth: e.strokeWidth, halfOfStrokeWidth: e.strokeWidth / 2, startMargin: e.strokeWidth / 2 - e.trailWidth / 2 }) }, t.exports = o }, { "./shape": 6, "./utils": 8 }], 8: [function (e, t) { function n(e, t, i) { e = e || {}, t = t || {}, i = i || !1; for (var o in t) if (t.hasOwnProperty(o)) { var r = e[o], s = t[o];
41 i && c(r) && c(s) ? e[o] = n(r, s, i) : e[o] = s } return e } function i(e, t) { var n = e; for (var i in t) if (t.hasOwnProperty(i)) { var o = t[i], r = "\\{" + i + "\\}", s = new RegExp(r, "g"); n = n.replace(s, o) } return n } function o(e, t, n) { for (var i = 0; i < d.length; ++i) { var o = d[i]; e.style[o + r(t)] = n } e.style[t] = n } function r(e) { return e.charAt(0).toUpperCase() + e.slice(1) } function s(e) { return "string" == typeof e || e instanceof String } function a(e) { return "function" == typeof e } function l(e) { return "[object Array]" === Object.prototype.toString.call(e) } function c(e) { if (l(e)) return !1; var t = typeof e; return "object" === t && !!e } var d = "Webkit Moz O ms".split(" "); t.exports = { extend: n, render: i, setStyle: o, capitalize: r, isString: s, isFunction: a, isObject: c } }, {}] }, {}, [4])(4) }), function (e, t) { "use strict"; "function" == typeof define && define.amd ? define(["ev-emitter/ev-emitter"], function (n) { return t(e, n) }) : "object" == typeof module && module.exports ? module.exports = t(e, require("ev-emitter")) : e.imagesLoaded = t(e, e.EvEmitter) }(window, function (e, t) { "use strict"; function n(e, t) { for (var n in t) e[n] = t[n]; return e } function i(e) { var t = []; if (Array.isArray(e)) t = e; else if ("number" == typeof e.length) for (var n = 0; n < e.length; n++)t.push(e[n]); else t.push(e); return t } function o(e, t, r) { return this instanceof o ? ("string" == typeof e && (e = document.querySelectorAll(e)), this.elements = i(e), this.options = n({}, this.options), "function" == typeof t ? r = t : n(this.options, t), r && this.on("always", r), this.getImages(), a && (this.jqDeferred = new a.Deferred), void setTimeout(function () { this.check() }.bind(this))) : new o(e, t, r) } function r(e) { this.img = e } function s(e, t) { this.url = e, this.element = t, this.img = new Image } var a = e.jQuery, l = e.console; o.prototype = Object.create(t.prototype), o.prototype.options = {}, o.prototype.getImages = function () { this.images = [], this.elements.forEach(this.addElementImages, this) }, o.prototype.addElementImages = function (e) { "IMG" == e.nodeName && this.addImage(e), this.options.background === !0 && this.addElementBackgroundImages(e); var t = e.nodeType; if (t && c[t]) { for (var n = e.querySelectorAll("img"), i = 0; i < n.length; i++) { var o = n[i]; this.addImage(o) } if ("string" == typeof this.options.background) { var r = e.querySelectorAll(this.options.background); for (i = 0; i < r.length; i++) { var s = r[i]; this.addElementBackgroundImages(s) } } } }; var c = { 1: !0, 9: !0, 11: !0 }; return o.prototype.addElementBackgroundImages = function (e) { var t = getComputedStyle(e); if (t) for (var n = /url\((['"])?(.*?)\1\)/gi, i = n.exec(t.backgroundImage); null !== i;) { var o = i && i[2]; o && this.addBackground(o, e), i = n.exec(t.backgroundImage) } }, o.prototype.addImage = function (e) { var t = new r(e); this.images.push(t) }, o.prototype.addBackground = function (e, t) { var n = new s(e, t); this.images.push(n) }, o.prototype.check = function () { function e(e, n, i) { setTimeout(function () { t.progress(e, n, i) }) } var t = this; return this.progressedCount = 0, this.hasAnyBroken = !1, this.images.length ? void this.images.forEach(function (t) { t.once("progress", e), t.check() }) : void this.complete() }, o.prototype.progress = function (e, t, n) { this.progressedCount++, this.hasAnyBroken = this.hasAnyBroken || !e.isLoaded, this.emitEvent("progress", [this, e, t]), this.jqDeferred && this.jqDeferred.notify && this.jqDeferred.notify(this, e), this.progressedCount == this.images.length && this.complete(), this.options.debug && l && l.log("progress: " + n, e, t) }, o.prototype.complete = function () { var e = this.hasAnyBroken ? "fail" : "done"; if (this.isComplete = !0, this.emitEvent(e, [this]), this.emitEvent("always", [this]), this.jqDeferred) { var t = this.hasAnyBroken ? "reject" : "resolve"; this.jqDeferred[t](this) } }, r.prototype = Object.create(t.prototype), r.prototype.check = function () { var e = this.getIsImageComplete();
41 return e ? void this.confirm(0 !== this.img.naturalWidth, "naturalWidth") : (this.proxyImage = new Image, this.proxyImage.addEventListener("load", this), this.proxyImage.addEventListener("error", this), this.img.addEventListener("load", this), this.img.addEventListener("error", this), void (this.proxyImage.src = this.img.src)) }, r.prototype.getIsImageComplete = function () { return this.img.complete && void 0 !== this.img.naturalWidth }, r.prototype.confirm = function (e, t) { this.isLoaded = e, this.emitEvent("progress", [this, this.img, t]) }, r.prototype.handleEvent = function (e) { var t = "on" + e.type; this[t] && this[t](e) }, r.prototype.onload = function () { this.confirm(!0, "onload"), this.unbindEvents() }, r.prototype.onerror = function () { this.confirm(!1, "onerror"), this.unbindEvents() }, r.prototype.unbindEvents = function () { this.proxyImage.removeEventListener("load", this), this.proxyImage.removeEventListener("error", this), this.img.removeEventListener("load", this), this.img.removeEventListener("error", this) }, s.prototype = Object.create(r.prototype), s.prototype.check = function () { this.img.addEventListener("load", this), this.img.addEventListener("error", this), this.img.src = this.url; var e = this.getIsImageComplete(); e && (this.confirm(0 !== this.img.naturalWidth, "naturalWidth"), this.unbindEvents()) }, s.prototype.unbindEvents = function () { this.img.removeEventListener("load", this), this.img.removeEventListener("error", this) }, s.prototype.confirm = function (e, t) { this.isLoaded = e, this.emitEvent("progress", [this, this.element, t]) }, o.makeJQueryPlugin = function (t) { t = t || e.jQuery, t && (a = t, a.fn.imagesLoaded = function (e, t) { var n = new o(this, e, t); return n.jqDeferred.promise(a(this)) }) }, o.makeJQueryPlugin(), o }), function () { var e; this.Behaviour = function () { function e(e, t, n) { this.dom = e, this.className = t, this.options = null != n ? n : {}, this.$dom = $(this.dom), this.$dom.data(this.className) || (this.$dom.data(this.className, !0), this.init()) } return e.prototype.data = function (e, t) { return null == t && (t = null), this.options[e] || this.$dom.data(e) || t }, e.prototype.domData = function (e) { return $(this.data(e)) }, e.prototype.isMobile = function () { return $(document).width() < 1024 }, e.prototype.init = function () { }, e }(), e = function () { return $("[data-behaviour]").each(function () { var e, t, n, i, o, r, s; for (t = $(this).data("behaviour").split(/\s+/), s = [], i = 0, r = t.length; r > i; i++)if (e = t[i], o = window[e]) try { s.push(new o(this, e)) } catch (a) { n = a, s.push(console.error(n)) } else s.push(console.error("Class " + e + " not found")); return s }) }, $(document).ready(function () { return e() }), $(document).ajaxComplete(function () { return e() }), $(document).on("cocoon:after-insert", function () { return e() }), $(document).on("reload-behaviours", function () { return e() }) }.call(this), function () { var e = function (e, n) { function i() { this.constructor = e } for (var o in n) t.call(n, o) && (e[o] = n[o]); return i.prototype = n.prototype, e.prototype = new i, e.__super__ = n.prototype, e }, t = {}.hasOwnProperty; this.Accordion = function (t) { function n() { return n.__super__.constructor.apply(this, arguments) } return e(n, t), n.prototype.init = function () { return this.$dom.accordion({ header: this.data("header-selector"), heightStyle: "content" }) }, n }(Behaviour) }.call(this), function () { var e = function (e, n) { function i() { this.constructor = e } for (var o in n) t.call(n, o) && (e[o] = n[o]); return i.prototype = n.prototype, e.prototype = new i, e.__super__ = n.prototype, e }, t = {}.hasOwnProperty; this.AccountToggler = function (t) { function n() { return n.__super__.constructor.apply(this, arguments) } return e(n, t), n.prototype.init = function () { return this.$dom.click(function (e) { return function (t) { return t.preventDefault(), t.stopPropagation(), e.$dom.parent().toggleClass("is-active") } }(this)) }, n }(Behaviour) }.call(this), function () { var e = function (e, n) { function i() { this.constructor = e } for (var o in n) t.call(n, o) && (e[o] = n[o]); return i.prototype = n.prototype, e.prototype = new i, e.__super__ = n.prototype, e }, t = {}.hasOwnProperty; this.ActiveInput = function (t) { function n() { return n.__super__.constructor.apply(this, arguments) } return e(n, t), n.prototype.init = function () { return this.$input = this.$dom.find("input"), 0 === this.$input.length && (this.$input = this.$dom.find("textarea")), this.$label = this.$dom.find("label"), this.$dom.focusin(function (e) { return function () { return e.$dom.addClass("is-active") } }(this)).focusout(function (e) { return function () { return e.$input.val().length <= 0 ? e.$dom.removeClass("is-active") : void 0 } }(this)).change(this.activeIfFilled.bind(this)), this.activeIfFilled() }, n.prototype.activeIfFilled = function () { return this.$input.val().length > 0 ? this.$dom.addClass("is-active") : this.$dom.removeClass("is-active") }, n }(Behaviour) }.call(this), function () { var e = function (e, n) { function i() { this.constructor = e } for (var o in n) t.call(n, o) && (e[o] = n[o]); return i.prototype = n.prototype, e.prototype = new i, e.__super__ = n.prototype, e }, t = {}.hasOwnProperty; this.AddBlock = function (t) { function n() { return n.__super__.constructor.apply(this, arguments) } return e(n, t), n.prototype.init = function () { return this.$image = this.$dom.find("> img"), this.$scrollTarget = this.domData("scroll-wrapper"), this.$dom.click(function (e) { return function () { var t; return t = e.$dom.height(), e.$image.css("top", t), e.$image.show(), e.$scrollTarget.animate({ scrollTop: e.$scrollTarget.get(0).scrollHeight }
41), e.$image.animate({ opacity: 1, top: 0 }, 500).animate({ opacity: 1 }, 1e3).animate({ opacity: 0, top: -t }, 500) } }(this)) }, n }(Behaviour) }.call(this), function () { var e = function (e, n) { function i() { this.constructor = e } for (var o in n) t.call(n, o) && (e[o] = n[o]); return i.prototype = n.prototype, e.prototype = new i, e.__super__ = n.prototype, e }, t = {}.hasOwnProperty; this.AnimateBlock = function (t) { function n() { return n.__super__.constructor.apply(this, arguments) } return e(n, t), n.prototype.init = function () { var e; return this.$dom.isInViewport() && (e = this.$dom, $(window).innerWidth() > 768) ? window.addEventListener("scroll", function () { var t, n, i, o; return i = $(window).scrollTop(), o = e.offset().top, t = e.height(), n = o - i, e.find(".block__list__gutter:last-child").css({ transform: "translateY(" + parseInt(n / 10 - i / 4) + "px)" }) }) : void 0 }, n }(Behaviour) }.call(this), function () { var e = function (e, n) { function i() { this.constructor = e } for (var o in n) t.call(n, o) && (e[o] = n[o]); return i.prototype = n.prototype, e.prototype = new i, e.__super__ = n.prototype, e }, t = {}.hasOwnProperty; this.AuthLaliste = function (t) { function n() { return n.__super__.constructor.apply(this, arguments) } return e(n, t), n.prototype.init = function () { return this.$dom.click(function () { return function (e) { return e.preventDefault(), e.stopPropagation(), $(".slide__auth__last").css("right", "0%") } }(this)) }, n }(Behaviour) }.call(this), function () { var e = function (e, n) { function i() { this.constructor = e } for (var o in n) t.call(n, o) && (e[o] = n[o]); return i.prototype = n.prototype, e.prototype = new i, e.__super__ = n.prototype, e }, t = {}.hasOwnProperty; this.ChannelsNavToggler = function (t) { function n() { return n.__super__.constructor.apply(this, arguments) } return e(n, t), n.prototype.init = function () { return this.$dom.click(function () { return function (e) { return e.preventDefault(), $(".site-body").toggleClass("has-overlay"), $("#channels-nav").toggleClass("is-visible"), $(".overlay").toggleClass("is-visible") } }(this)), $(".overlay, .aside-nav__header__closer").click(function () { return function (e) { return e.preventDefault(), $(".site-body").removeClass("has-overlay"), $("#channels-nav").removeClass("is-visible"), $(".overlay").removeClass("is-visible") } }(this)) }, n }(Behaviour) }.call(this), function () { var e = function (e, n) { function i() { this.constructor = e } for (var o in n) t.call(n, o) && (e[o] = n[o]); return i.prototype = n.prototype, e.prototype = new i, e.__super__ = n.prototype, e }, t = {}.hasOwnProperty; this.CheckRedirect = function (t) { function n() { return n.__super__.constructor.apply(this, arguments) } return e(n, t), n.prototype.init = function () { return Cookies.get("ip_check") ? void 0 : $.ajax({ url: "/api/site_redirect_check" }).done(function (e) { return Cookies.set("ip_check", !0), e.redirect ? window.location.replace(e.redirect_url) : void 0 }) }, n }(Behaviour) }.call(this), function () { var e = function (e, n) { function i() { this.constructor = e } for (var o in n) t.call(n, o) && (e[o] = n[o]); return i.prototype = n.prototype, e.prototype = new i, e.__super__ = n.prototype, e }, t = {}.hasOwnProperty; this.ClickableBox = function (t) { function n() { return n.__super__.constructor.apply(this, arguments) } return e(n, t), n.prototype.init = function () { return this.isMobile() ? (this.$dom.addClass("is-clickable"), this.$dom.on("click", function (e) { return function () { return location.href = e.data("href-click") } }(this))) : void 0 }, n }(Behaviour) }.call(this), function () { var e = function (e, n) { function i() { this.constructor = e } for (var o in n) t.call(n, o) && (e[o] = n[o]); return i.prototype = n.prototype, e.prototype = new i, e.__super__ = n.prototype, e }, t = {}.hasOwnProperty; this.CloseDialog = function (t) { function n() { return n.__super__.constructor.apply(this, arguments) } return e(n, t), n.prototype.init = function () { return this.$dom.click(function (e) { return function (t) { return t.preventDefault(), t.stopPropagation(), e.$dom.parents(".is-active").removeClass("is-active") } }(this)) }, n }(Behaviour) }.call(this), function () { var e = function (e, n) { function i() { this.constructor = e } for (var o in n) t.call(n, o) && (e[o] = n[o]); return i.prototype = n.prototype, e.prototype = new i, e.__super__ = n.prototype, e }, t = {}.hasOwnProperty; this.ClosePreview = function (t) { function n() { return n.__super__.constructor.apply(this, arguments) } return e(n, t), n.prototype.init = function () { return this.$dom.on("click", function () { return function (e) { var t; return e.preventDefault(), t = $("[data-open-state='opened']"), t.slideUp(), t.attr("data-open-state", "closed"), $(".is-heading-fixed").removeClass("is-heading-fixed") } }(this)) }, n }(Behaviour) }.call(this), function () {
42    var e = function (e, n) { function i() { this.constructor = e } for (var o in n) t.call(n, o) && (e[o] = n[o]); return i.prototype = n.prototype, e.prototype = new i, e.__super__ = n.prototype, e }, t = {}.hasOwnProperty; this.CocoonLimiter = function (t) {
43        function n() { return n.__super__.constructor.apply(this, arguments) } return e(n, t), n.prototype.init = function () { return this.$dom.on("cocoon:after-insert", function (e) { return function () { return e.checkToHideOrShowAddLinks() } }(this)).on("cocoon:after-remove", function (e) { return function (t, n) { return $(n).attr("data-block-visible", "false"), e.checkToHideOrShowAddLinks() } }(this)), this.checkToHideOrShowAddLinks() }, n.prototype.checkToHideOrShowAddLinks = function () {
44            var e, t, n; return e = this.$dom.find(this.data("actionsWrapper")),
45                n = this.data("target") + "[data-block-visible='true']", t = this.$dom.find(n), t.length >= 6 ? e.hide() : e.show()
46        }, n
47    }(Behaviour)
48}.call(this), function (e) { "function" == typeof define && define.amd ? define("picker", ["jquery"], e) : "object" == typeof exports ? module.exports = e(require("jquery")) : this.Picker = e(jQuery) }(function (e) { function t(r, s, l, h) { function p() { return t._.node("div", t._.node("div", t._.node("div", t._.node("div", R.component.nodes(C.open), I.box), I.wrap), I.frame), I.holder, 'tabindex="-1"') } function f() { O.data(s, R).addClass(I.input).val(O.data("value") ? R.get("select", _.format) : r.value), _.editable || O.on("focus." + C.id + " click." + C.id, function (e) { e.preventDefault(), R.open() }).on("keydown." + C.id, y), o(r, { haspopup: !0, expanded: !1, readonly: !1, owns: r.id + "_root" }) } function m() { o(R.$root[0], "hidden", !0) } function g() { R.$holder.on({ keydown: y, "focus.toOpen": T, blur: function () { O.removeClass(I.target) }, focusin: function (e) { R.$root.removeClass(I.focused), e.stopPropagation() }, "mousedown click": function (t) { var n = t.target; n != R.$holder[0] && (t.stopPropagation(), "mousedown" != t.type || e(n).is("input, select, textarea, button, option") || (t.preventDefault(), R.$holder[0].focus())) } }
48).on("click", "[data-pick], [data-nav], [data-clear], [data-close]", function () { var t = e(this), n = t.data(), i = t.hasClass(I.navDisabled) || t.hasClass(I.disabled), o = a(); o = o && (o.type || o.href), (i || o && !e.contains(R.$root[0], o)) && R.$holder[0].focus(), !i && n.nav ? R.set("highlight", R.component.item.highlight, { nav: n.nav }) : !i && "pick" in n ? (R.set("select", n.pick), _.closeOnSelect && R.close(!0)) : n.clear ? (R.clear(), _.closeOnClear && R.close(!0)) : n.close && R.close(!0) }) } function v() { var t; _.hiddenName === !0 ? (t = r.name, r.name = "") : (t = ["string" == typeof _.hiddenPrefix ? _.hiddenPrefix : "", "string" == typeof _.hiddenSuffix ? _.hiddenSuffix : "_submit"], t = t[0] + r.name + t[1]), R._hidden = e('<input type=hidden name="' + t + '"' + (O.data("value") || r.value ? ' value="' + R.get("select", _.formatSubmit) + '"' : "") + ">")[0], O.on("change." + C.id, function () { R._hidden.value = r.value ? R.get("select", _.formatSubmit) : "" }) } function E() { b && u ? R.$holder.find("." + I.frame).one("transitionend", function () { R.$holder[0].focus() }) : R.$holder[0].focus() } function T(e) { e.stopPropagation(), O.addClass(I.target), R.$root.addClass(I.focused), R.open() } function y(e) { var t = e.keyCode, n = /^(8|46)$/.test(t); return 27 == t ? (R.close(!0), !1) : void ((32 == t || n || !C.open && R.component.key[t]) && (e.preventDefault(), e.stopPropagation(), n ? R.clear().close() : R.open())) } if (!r) return t; var b = !1, C = { id: r.id || "P" + Math.abs(~~(Math.random() * new Date)) }, _ = l ? e.extend(!0, {}, l.defaults, h) : h || {}, I = e.extend({}, t.klasses(), _.klass), O = e(r), D = function () { return this.start() }, R = D.prototype = { constructor: D, $node: O, start: function () { return C && C.start ? R : (C.methods = {}, C.start = !0, C.open = !1, C.type = r.type, r.autofocus = r == a(), r.readOnly = !_.editable, r.id = r.id || C.id, "text" != r.type && (r.type = "text"), R.component = new l(R, _), R.$root = e('<div class="' + I.picker + '" id="' + r.id + '_root" />'), m(), R.$holder = e(p()).appendTo(R.$root), g(), _.formatSubmit && v(), f(), _.containerHidden ? e(_.containerHidden).append(R._hidden) : O.after(R._hidden), _.container ? e(_.container).append(R.$root) : O.after(R.$root), R.on({ start: R.component.onStart, render: R.component.onRender, stop: R.component.onStop, open: R.component.onOpen, close: R.component.onClose, set: R.component.onSet }).on({ start: _.onStart, render: _.onRender, stop: _.onStop, open: _.onOpen, close: _.onClose, set: _.onSet }), b = n(R.$holder[0]), r.autofocus && R.open(), R.trigger("start").trigger("render")) }, render: function (t) { return t ? (R.$holder = e(p()), g(), R.$root.html(R.$holder)) : R.$root.find("." + I.box).html(R.component.nodes(C.open)), R.trigger("render") }, stop: function () { return C.start ? (R.close(), R._hidden && R._hidden.parentNode.removeChild(R._hidden), R.$root.remove(), O.removeClass(I.input).removeData(s), setTimeout(function () { O.off("." + C.id) }, 0), r.type = C.type, r.readOnly = !1, R.trigger("stop"), C.methods = {}, C.start = !1, R) : R }, open: function (n) { return C.open ? R : (O.addClass(I.active), o(r, "expanded", !0), setTimeout(function () { R.$root.addClass(I.opened), o(R.$root[0], "hidden", !1) }, 0), n !== !1 && (C.open = !0, b && d.css("overflow", "hidden").css("padding-right", "+=" + i()), E(), c.on("click." + C.id + " focusin." + C.id, function (e) { var t = e.target; t != r && t != document && 3 != e.which && R.close(t === R.$holder[0]) }).on("keydown." + C.id, function (n) { var i = n.keyCode, o = R.component.key[i], r = n.target; 27 == i ? R.close(!0) : r != R.$holder[0] || !o && 13 != i ? e.contains(R.$root[0], r) && 13 == i && (n.preventDefault(), r.click()) : (n.preventDefault(), o ? t._.trigger(R.component.key.go, R, [t._.trigger(o)]) : R.$root.find("." + I.highlighted).hasClass(I.disabled) || (R.set("select", R.component.item.highlight), _.closeOnSelect && R.close(!0))) })), R.trigger("open")) }, close: function (e) { return e && (_.editable ? r.focus() : (R.$holder.off("focus.toOpen").focus(), setTimeout(function () { R.$holder.on("focus.toOpen", T) }, 0))), O.removeClass(I.active), o(r, "expanded", !1), setTimeout(function () { R.$root.removeClass(I.opened + " " + I.focused), o(R.$root[0], "hidden", !0) }, 0), C.open ? (C.open = !1, b && d.css("overflow", "").css("padding-right", "-=" + i()), c.off("." + C.id), R.trigger("close")) : R }, clear: function (e) { return R.set("clear", null, e) }, set: function (t, n, i) { var o, r, s = e.isPlainObject(t), a = s ? t : {}; if (i = s && e.isPlainObject(n) ? n : i || {}, t) { s || (a[t] = n); for (o in a) r = a[o], o in R.component.item && (void 0 === r && (r = null), R.component.set(o, r, i)), "select" != o && "clear" != o || O.val("clear" == o ? "" : R.get(o, _.format)).trigger("change"); R.render() } return i.muted ? R : R.trigger("set", a) }, get: function (e, n) { if (e = e || "value", null != C[e]) return C[e]; if ("valueSubmit" == e) { if (R._hidden) return R._hidden.value; e = "value" } if ("value" == e) return r.value; if (e in R.component.item) { if ("string" == typeof n) { var i = R.
48component.get(e); return i ? t._.trigger(R.component.formats.toString, R.component, [n, i]) : "" } return R.component.get(e) } }, on: function (t, n, i) { var o, r, s = e.isPlainObject(t), a = s ? t : {}; if (t) { s || (a[t] = n); for (o in a) r = a[o], i && (o = "_" + o), C.methods[o] = C.methods[o] || [], C.methods[o].push(r) } return R }, off: function () { var e, t, n = arguments; for (e = 0, namesCount = n.length; e < namesCount; e += 1)t = n[e], t in C.methods && delete C.methods[t]; return R }, trigger: function (e, n) { var i = function (e) { var i = C.methods[e]; i && i.map(function (e) { t._.trigger(e, R, [n]) }) }; return i("_" + e), i(e), R } }; return new D } function n(e) { var t, n = "position"; return e.currentStyle ? t = e.currentStyle[n] : window.getComputedStyle && (t = getComputedStyle(e)[n]), "fixed" == t } function i() { if (d.height() <= l.height()) return 0; var t = e('<div style="visibility:hidden;width:100px" />').appendTo("body"), n = t[0].offsetWidth; t.css("overflow", "scroll"); var i = e('<div style="width:100%" />').appendTo(t), o = i[0].offsetWidth; return t.remove(), n - o } function o(t, n, i) { if (e.isPlainObject(n)) for (var o in n) r(t, o, n[o]); else r(t, n, i) } function r(e, t, n) { e.setAttribute(("role" == t ? "" : "aria-") + t, n) } function s(t, n) { e.isPlainObject(t) || (t = { attribute: n }), n = ""; for (var i in t) { var o = ("role" == i ? "" : "aria-") + i, r = t[i]; n += null == r ? "" : o + '="' + t[i] + '"' } return n } function a() { try { return document.activeElement } catch (e) { } } var l = e(window), c = e(document), d = e(document.documentElement), u = null != document.documentElement.style.transition; return t.klasses = function (e) { return e = e || "picker", { picker: e, opened: e + "--opened", focused: e + "--focused", input: e + "__input", active: e + "__input--active", target: e + "__input--target", holder: e + "__holder", frame: e + "__frame", wrap: e + "__wrap", box: e + "__box" } }, t._ = { group: function (e) { for (var n, i = "", o = t._.trigger(e.min, e); o <= t._.trigger(e.max, e, [o]); o += e.i)n = t._.trigger(e.item, e, [o]), i += t._.node(e.node, n[0], n[1], n[2]); return i }, node: function (t, n, i, o) { return n ? (n = e.isArray(n) ? n.join("") : n, i = i ? ' class="' + i + '"' : "", o = o ? " " + o : "", "<" + t + i + o + ">" + n + "</" + t + ">") : "" }, lead: function (e) { return (10 > e ? "0" : "") + e }, trigger: function (e, t, n) { return "function" == typeof e ? e.apply(t, n || []) : e }, digits: function (e) { return /\d/.test(e[1]) ? 2 : 1 }, isDate: function (e) { return {}.toString.call(e).indexOf("Date") > -1 && this.isInteger(e.getDate()) }, isInteger: function (e) { return {}.toString.call(e).indexOf("Number") > -1 && e % 1 === 0 }, ariaAttr: s }, t.extend = function (n, i) { e.fn[n] = function (o, r) { var s = this.data(n); return "picker" == o ? s : s && "string" == typeof o ? t._.trigger(s[o], s, [r]) : this.each(function () { var r = e(this); r.data(n) || new t(this, n, i, o) }) }, e.fn[n].defaults = i.defaults }, t }), function (e) { "function" == typeof define && define.amd ? define(["picker", "jquery"], e) : "object" == typeof exports ? module.exports = e(require("./picker.js"), require("jquery")) : e(Picker, jQuery) }(function (e, t) { function n(e, t) { var n = this, i = e.$node[0], o = i.value, r = e.$node.data("value"), s = r || o, a = r ? t.formatSubmit : t.format, l = function () { return i.currentStyle ? "rtl" == i.currentStyle.direction : "rtl" == getComputedStyle(e.$root[0]).direction }; n.settings = t, n.$node = e.$node, n.queue = { min: "measure create", max: "measure create", now: "now create", select: "parse create validate", highlight: "parse navigate create validate", view: "parse create validate viewset", disable: "deactivate", enable: "activate" }, n.item = {}, n.item.clear = null, n.item.disable = (t.disable || []).slice(0), n.item.enable = -function (e) { return e[0] === !0 ? e.shift() : -1 }(n.item.disable), n.set("min", t.min).set("max", t.max).set("now"), s ? n.set("select", s, { format: a, defaultValue: !0 }) : n.set("select", null).set("highlight", n.item.now), n.key = { 40: 7, 38: -7, 39: function () { return l() ? -1 : 1 }, 37: function () { return l() ? 1 : -1 }, go: function (e) { var t = n.item.highlight, i = new Date(t.year, t.month, t.date + e); n.set("highlight", i, { interval: e }), this.render() } }, e.on("render", function () { e.$root.find("." + t.klass.selectMonth).on("change", function () { var n = this.value; n && (e.set("highlight", [e.get("view").year, n, e.get("highlight").date]), e.$root.find("." + t.klass.selectMonth).trigger("focus")) }), e.$root.find("." + t.klass.selectYear).on("change", function () { var n = this.value; n && (e.set("highlight", [n, e.get("view").month, e.get("highlight").date]), e.$root.find("." + t.klass.selectYear).trigger("focus")) }) }, 1).on("open", function () { var i = ""; n.disabled(n.get("now")) && (i = ":not(." + t.klass.buttonToday + ")"), e.$root.find("button" + i + ", select").attr("disabled", !1) }, 1).on("close", function () { e.$root.find("button, select").attr("disabled", !0) }, 1) } var i = 7, o = 6, r = e._; n.prototype.set = function (e, t, n) { var i = this, o = i.item; return null === t ? ("clear" == e && (e = "select"), o[e] = t, i) : (o["enable" == e ? "disable" : "flip" == e ? "enable" : e] = i.queue[e].split(" ").map(function (o) { return t = i[o](e, t, n) }).pop(), "select" == e ? i.set("highlight", o.select, n) : "highlight" == e ? i.set("view", o.highlight, n) : e.match(/^(flip|min|max|disable|enable)$/) && (o.select && i.disabled(o.select) && i.set("select", o.select, n), o.highlight && i.disabled(o.highlight) && i.set("highlight", o.highlight, n)), i) }, n.prototype.get = function (e) { return this.item[e] }, n.prototype.create = function (e, n, i) { var o, s = this; return n = void 0 === n ? e : n, n == -(1 / 0) || n == 1 / 0 ? o = n : t.isPlainObject(n) && r.isInteger(n.pick) ? n = n.obj : t.isArray(n) ? (n = new Date(n[0], n[1], n[2]), n = r.isDate(n) ? n : s.create().obj) : n = r.isInteger(n) || r.isDate(n) ? s.normalize(new Date(n), i) : s.now(e, n, i), { year: o || n.getFullYear(), month: o || n.getMonth(), date: o || n.getDate(), day: o || n.getDay(), obj: o || n, pick: o || n.getTime() } }, n.prototype.createRange = function (e, n) { var i = this, o = function (e) { return e === !0 || t.isArray(e) || r.isDate(e) ? i.create(e) : e }; return r.isInteger(e) || (e = o(e)), r.isInteger(n) || (n = o(n)), r.isInteger(e) && t.isPlainObject(n) ? e = [n.year, n.month, n.date + e] : r.isInteger(n) && t.isPlainObject(e) && (n = [e.year, e.month, e.date + n]), { from: o(e), to: o(n) } }, n.prototype.withinRange = function (e, t) { return e = this.createRange(e.from, e.to), t.pick >= e.from.pick && t.pick <= e.to.pick }, n.prototype.overlapRanges = function (e, t) { var n = this; return e = n.createRange(e.from, e.to), t = n.createRange(t.from, t.to), n.withinRange(e, t.from) || n.withinRange(e, t.to) || n.withinRange(t, e.from) || n.withinRange(t, e.to) }, n.prototype.now = function (e, t, n) { return t = new Date, n && n.rel && t.setDate(t.getDate() + n.rel), this.normalize(t, n) }, n.prototype.navigate = function (e, n, i) { var o, r, s, a, l = t.isArray(n), c = t.isPlainObject(n), d = this.item.view; if (l || c) { for (c ? (r = n.year, s = n.month, a = n.date) : (r = +n[0], s = +n[1], a = +n[2]), i && i.nav && d && d.month !== s && (r = d.year, s = d.month), o = new Date(r, s + (i && i.nav ? i.nav : 0), 1), r = o.getFullYear(), s = o.getMonth(); new Date(r, s, a).getMonth() !== s;)a -= 1; n = [r, s, a] } return n }, n.prototype.normalize = function (e) { return e.setHours(0, 0, 0, 0), e }, n.prototype.measure = function (e, t) { var n = this; return t ? "string" == typeof t ? t = n.parse(e, t) : r.isInteger(t) && (t = n.now(e, t, { rel: t })) : t = "min" == e ? -(1 / 0) : 1 / 0, t }, n.prototype.viewset = function (e, t) { return this.create([t.year, t.month, 1]) }, n.prototype.validate = function (e, n, i) { var o, s, a, l, c = this, d = n, u = i && i.interval ? i.interval : 1, h = -1 
48=== c.item.enable, p = c.item.min, f = c.item.max, m = h && c.item.disable.filter(function (e) { if (t.isArray(e)) { var i = c.create(e).pick; i < n.pick ? o = !0 : i > n.pick && (s = !0) } return r.isInteger(e) }).length; if ((!i || !i.nav && !i.defaultValue) && (!h && c.disabled(n) || h && c.disabled(n) && (m || o || s) || !h && (n.pick <= p.pick || n.pick >= f.pick))) for (h && !m && (!s && u > 0 || !o && 0 > u) && (u *= -1); c.disabled(n) && (Math.abs(u) > 1 && (n.month < d.month || n.month > d.month) && (n = d, u = u > 0 ? 1 : -1), n.pick <= p.pick ? (a = !0, u = 1, n = c.create([p.year, p.month, p.date + (n.pick === p.pick ? 0 : -1)])) : n.pick >= f.pick && (l = !0, u = -1, n = c.create([f.year, f.month, f.date + (n.pick === f.pick ? 0 : 1)])), !a || !l);)n = c.create([n.year, n.month, n.date + u]); return n }, n.prototype.disabled = function (e) { var n = this, i = n.item.disable.filter(function (i) { return r.isInteger(i) ? e.day === (n.settings.firstDay ? i : i - 1) % 7 : t.isArray(i) || r.isDate(i) ? e.pick === n.create(i).pick : t.isPlainObject(i) ? n.withinRange(i, e) : void 0 }); return i = i.length && !i.filter(function (e) { return t.isArray(e) && "inverted" == e[3] || t.isPlainObject(e) && e.inverted }).length, -1 === n.item.enable ? !i : i || e.pick < n.item.min.pick || e.pick > n.item.max.pick }, n.prototype.parse = function (e, t, n) { var i = this, o = {}; return t && "string" == typeof t ? (n && n.format || (n = n || {}, n.format = i.settings.format), i.formats.toArray(n.format).map(function (e) { var n = i.formats[e], s = n ? r.trigger(n, i, [t, o]) : e.replace(/^!/, "").length; n && (o[e] = t.substr(0, s)), t = t.substr(s) }), [o.yyyy || o.yy, +(o.mm || o.m) - 1, o.dd || o.d]) : t }, n.prototype.formats = function () { function e(e, t, n) { var i = e.match(/[^\x00-\x7F]+|\w+/)[0]; return n.mm || n.m || (n.m = t.indexOf(i) + 1), i.length } function t(e) { return e.match(/\w+/)[0].length } return { d: function (e, t) { return e ? r.digits(e) : t.date }, dd: function (e, t) { return e ? 2 : r.lead(t.date) }, ddd: function (e, n) { return e ? t(e) : this.settings.weekdaysShort[n.day] }, dddd: function (e, n) { return e ? t(e) : this.settings.weekdaysFull[n.day] }, m: function (e, t) { return e ? r.digits(e) : t.month + 1 }, mm: function (e, t) { return e ? 2 : r.lead(t.month + 1) }, mmm: function (t, n) { var i = this.settings.monthsShort; return t ? e(t, i, n) : i[n.month] }, mmmm: function (t, n) { var i = this.settings.monthsFull; return t ? e(t, i, n) : i[n.month] }, yy: function (e, t) { return e ? 2 : ("" + t.year).slice(2) }, yyyy: function (e, t) { return e ? 4 : t.year }, toArray: function (e) { return e.split(/(d{1,4}|m{1,4}|y{4}|yy|!.)/g) }, toString: function (e, t) { var n = this; return n.formats.toArray(e).map(function (e) { return r.trigger(n.formats[e], n, [0, t]) || e.replace(/^!/, "") }).join("") } } }(), n.prototype.isDateExact = function (e, n) { var i = this; return r.isInteger(e) && r.isInteger(n) || "boolean" == typeof e && "boolean" == typeof n ? e === n : (r.isDate(e) || t.isArray(e)) && (r.isDate(n) || t.isArray(n)) ? i.create(e).pick === i.create(n).pick : t.isPlainObject(e) && t.isPlainObject(n) ? i.isDateExact(e.from, n.from) && i.isDateExact(e.to, n.to) : !1 }, n.prototype.isDateOverlap = function (e, n) { var i = this, o = i.settings.firstDay ? 1 : 0; return r.isInteger(e) && (r.isDate(n) || t.isArray(n)) ? (e = e % 7 + o, e === i.create(n).day + 1) : r.isInteger(n) && (r.isDate(e) || t.isArray(e)) ? (n = n % 7 + o, n === i.create(e).day + 1) : t.isPlainObject(e) && t.isPlainObject(n) ? i.overlapRanges(e, n) : !1 }, n.prototype.flipEnable = function (e) { var t = this.item; t.enable = e || (-1 == t.enable ? 1 : -1) }, n.prototype.deactivate = function (e, n) { var i = this, o = i.item.disable.slice(0); return "flip" == n ? i.flipEnable() : n === !1 ? (i.flipEnable(1), o = []) : n === !0 ? (i.flipEnable(-1), o = []) : n.map(function (e) { for (var n, s = 0; s < o.length; s += 1)if (i.isDateExact(e, o[s])) { n = !0; break } n || (r.isInteger(e) || r.isDate(e) || t.isArray(e) || t.isPlainObject(e) && e.from && e.to) && o.push(e) }), o }, n.prototype.activate = function (e, n) { var i = this, o = i.item.disable, s = o.length; return "flip" == n ? i.flipEnable() : n === !0 ? (i.flipEnable(1), o = []) : n === !1 ? (i.flipEnable(-1), o = []) : n.map(function (e) { var n, a, l, c; for (l = 0; s > l; l += 1) { if (a = o[l], i.isDateExact(a, e)) { n = o[l] = null, c = !0; break } if (i.isDateOverlap(a, e)) { t.isPlainObject(e) ? (e.inverted = !0, n = e) : t.isArray(e) ? (n = e, n[3] || n.push("inverted")) : r.isDate(e) && (n = [e.getFullYear(), e.getMonth(), e.getDate(), "inverted"]); break } } if (n) for (l = 0; s > l; l += 1)if (i.isDateExact(o[l], e)) { o[l] = null; break } if (c) for (l = 0; s > l; l += 1)if (i.isDateOverlap(o[l], e)) { o[l] = null; break } n && o.push(n) }), o.filter(function (e) { return null != e }) }, n.prototype.nodes = function (e) { var t = this, n = t.settings, s = t.item, a = s.now, l = s.select, c = s.highlight, d = s.view, u = s.disable, h = s.min, p = s.max, f = function (e, t) { return n.firstDay && (e.push(e.shift()), t.push(t.shift())), r.node("thead", r.node("tr", r.group({ min: 0, max: i - 1, i: 1, node: "th", item: function (i) { return [e[i], n.klass.weekdays, 'scope=col title="' + t[i] + '"'] } }))) }((n.showWeekdaysFull ? n.weekdaysFull : n.weekdaysShort).slice(0), n.weekdaysFull.slice(0)), m = function (e) { return r.node("div", " ", n.klass["nav" + (e ? "Next" : "Prev")] + (e && d.year >= p.year && d.month >= p.month || !e && d.year <= h.year && d.month <= h.month ? " " + n.klass.navDisabled : ""), "data-nav=" + (e || -1) + " " + r.ariaAttr({ role: "button", controls: t.$node[0].id + "_table" }) + ' title="' + (e ? n.labelMonthNext : n.labelMonthPrev) + '"') }, g = function () { var i = n.showMonthsShort ? n.monthsShort : n.monthsFull; return n.selectMonths ? r.node("select", r.group({ min: 0, max: 11, i: 1, node: "option", item: function (e) { return [i[e], 0, "value=" + e + (d.month 
48== e ? " selected" : "") + (d.year == h.year && e < h.month || d.year == p.year && e > p.month ? " disabled" : "")] } }), n.klass.selectMonth, (e ? "" : "disabled") + " " + r.ariaAttr({ controls: t.$node[0].id + "_table" }) + ' title="' + n.labelMonthSelect + '"') : r.node("div", i[d.month], n.klass.month) }, v = function () { var i = d.year, o = n.selectYears === !0 ? 5 : ~~(n.selectYears / 2); if (o) { var s = h.year, a = p.year, l = i - o, c = i + o; if (s > l && (c += s - l, l = s), c > a) { var u = l - s, f = c - a; l -= u > f ? f : u, c = a } return r.node("select", r.group({ min: l, max: c, i: 1, node: "option", item: function (e) { return [e, 0, "value=" + e + (i == e ? " selected" : "")] } }), n.klass.selectYear, (e ? "" : "disabled") + " " + r.ariaAttr({ controls: t.$node[0].id + "_table" }) + ' title="' + n.labelYearSelect + '"') } return r.node("div", i, n.klass.year) }; return r.node("div", (n.selectYears ? v() + g() : g() + v()) + m() + m(1), n.klass.header) + r.node("table", f + r.node("tbody", r.group({ min: 0, max: o - 1, i: 1, node: "tr", item: function (e) { var o = n.firstDay && 0 === t.create([d.year, d.month, 1]).day ? -7 : 0; return [r.group({ min: i * e - d.day + o + 1, max: function () { return this.min + i - 1 }, i: 1, node: "td", item: function (e) { e = t.create([d.year, d.month, e + (n.firstDay ? 1 : 0)]); var i = l && l.pick == e.pick, o = c && c.pick == e.pick, s = u && t.disabled(e) || e.pick < h.pick || e.pick > p.pick, f = r.trigger(t.formats.toString, t, [n.format, e]); return [r.node("div", e.date, function (t) { return t.push(d.month == e.month ? n.klass.infocus : n.klass.outfocus), a.pick == e.pick && t.push(n.klass.now), i && t.push(n.klass.selected), o && t.push(n.klass.highlighted), s && t.push(n.klass.disabled), t.join(" ") }([n.klass.day]), "data-pick=" + e.pick + " " + r.ariaAttr({ role: "gridcell", label: f, selected: i && t.$node.val() === f ? !0 : null, activedescendant: o ? !0 : null, disabled: s ? !0 : null })), "", r.ariaAttr({ role: "presentation" })] } })] } })), n.klass.table, 'id="' + t.$node[0].id + '_table" ' + r.ariaAttr({ role: "grid", controls: t.$node[0].id, readonly: !0 })) + r.node("div", r.node("button", n.today, n.klass.buttonToday, "type=button data-pick=" + a.pick + (e && !t.disabled(a) ? "" : " disabled") + " " + r.ariaAttr({ controls: t.$node[0].id })) + r.node("button", n.clear, n.klass.buttonClear, "type=button data-clear=1" + (e ? "" : " disabled") + " " + r.ariaAttr({ controls: t.$node[0].id })) + r.node("button", n.close, n.klass.buttonClose, "type=button data-close=true " + (e ? "" : " disabled") + " " + r.ariaAttr({ controls: t.$node[0].id })), n.klass.footer) }, n.defaults = function (e) { return { labelMonthNext: "Next month", labelMonthPrev: "Previous month", labelMonthSelect: "Select a month", labelYearSelect: "Select a year", monthsFull: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "
48November", "December"], monthsShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], weekdaysFull: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], weekdaysShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], today: "Today", clear: "Clear", close: "Close", closeOnSelect: !0, closeOnClear: !0, format: "d mmmm, yyyy", klass: { table: e + "table", header: e + "header", navPrev: e + "nav--prev", navNext: e + "nav--next", navDisabled: e + "nav--disabled", month: e + "month", year: e + "year", selectMonth: e + "select--month", selectYear: e + "select--year", weekdays: e + "weekday", day: e + "day", disabled: e + "day--disabled", selected: e + "day--selected", highlighted: e + "day--highlighted", now: e + "day--today", infocus: e + "day--infocus", outfocus: e + "day--outfocus", footer: e + "footer", buttonClear: e + "button--clear", buttonToday: e + "button--today", buttonClose: e + "button--close" } } }(e.klasses().picker + "__"), e.extend("pickadate", n) }), function () { var e = function (e, n) { function i() { this.constructor = e } for (var o in n) t.call(n, o) && (e[o] = n[o]); return i.prototype = n.prototype, e.prototype = new i, e.__super__ = n.prototype, e }, t = {}.hasOwnProperty; this.Datepicker = function (t) { function n() { return n.__super__.constructor.apply(this, arguments) } return e(n, t), n.prototype.init = function () { return this.$dom.pickadate({ format: "dd/mm/yyyy", formatSubmit: "yyyy-mm-dd", hiddenName: !0, clear: "" }) }, n }(Behaviour) }.call(this), function () { var e = function (e, n) { function i() { this.constructor = e } for (var o in n) t.call(n, o) && (e[o] = n[o]); return i.prototype = n.prototype, e.prototype = new i, e.__super__ = n.prototype, e }, t = {}.hasOwnProperty; this.DeleteSetter = function (t) { function n() { return n.__super__.constructor.apply(this, arguments) } return e(n, t), n.prototype.init = function () { var e, t; return e = this.data("deleteTarget"), t = this.data("hideBlock"), this.$dom.click(function () { return function (n) { var i, o; return n.preventDefault(), (i = $("[data-delete-input='" + e + "']")) ? (o = $("[data-hide-element='" + t + "']")) ? confirm("Are you sure?") ? ($(i).val("true"), o.hide()) : void 0 : void console.log("hide block not found") : void console.log("Delete input not found") } }(this)) }, n }(Behaviour) }.call(this), function () { var e = function (e, n) { function i() { this.constructor = e } for (var o in n) t.call(n, o) && (e[o] = n[o]); return i.prototype = n.prototype, e.prototype = new i, e.__super__ = n.prototype, e }, t = {}.hasOwnProperty; this.Flashes = function (t) { function n() { return n.__super__.constructor.apply(this, arguments) } return e(n, t), n.prototype.init = function () { return setTimeout(function (e) { return function () { return e.$dom.fadeOut() } }(this), 3e3) }, n }(Behaviour) }.call(this), function () { var e = function (e, n) { function i() { this.constructor = e } for (var o in n) t.call(n, o) && (e[o] = n[o]); return i.prototype = n.prototype, e.prototype = new i, e.__super__ = n.prototype, e }, t = {}.hasOwnProperty; this.FormReset = function (t) { function n() { return n.__super__.constructor.apply(this, arguments) } return e(n, t), n.prototype.init = function () { return this.$dom.click(function (e) { return function (t) { return t.preventDefault(), e.reset() } }(this)) }, n.prototype.reset = function () { var e; return e = this.$dom.closest("form"), $(e).find("input:text, input:password, input:file, select, textarea").val(""), $(e).find("input:radio, input:checkbox").removeAttr("checked").removeAttr("selected"), e.submit() }, n }(Behaviour) }.call(this), function () { var e = function (e, n) { function i() { this.constructor = e } for (var o in n) t.call(n, o) && (e[o] = n[o]); return i.prototype = n.prototype, e.prototype = new i, e.__super__ = n.prototype, e }, t = {}.hasOwnProperty; this.HideSideElements = function (t) { function n() { return n.__super__.constructor.apply(this, arguments) } return e(n, t), n.prototype.init = function () { return this.$dom.on("scroll", this.handleScroll.bind(this)) }, n.prototype.handleScroll = function () { return this.$sideElements = this.$dom.find(".js-side-element"), this.$outwrapElements = this.$dom.find(".js-outwrap-element"), $.each(this.$sideElements, function (e) { return $.each(this.$outwrapElements, function (t) { return this.colliding(e, t) ? e.hide() : e.show() }) }) }, n.prototype.colliding = function (e, t) { var n, i, o, r, s, a, l, c, d, u, h, p; return d = e.offset().left, h = e.offset().top, o = e.outerHeight(!0), l = e.outerWidth(!0), n = h + o, s = d + l, u = t.offset().left, p = t.offset().top, r = t.outerHeight(!0), c = t.outerWidth(!0), i = p + r, a = u + c, !(p > n || h > i || u > s || d > a) }, n }(Behaviour) }.call(this), function () { var e = function (e, n) { function i() { this.constructor = e } for (var o in n) t.call(n, o) && (e[o] = n[o]); return i.prototype = n.prototype, e.prototype = new i, e.__super__ = n.prototype, e }, t = {}.hasOwnProperty; this.ImageGalleryTrigger = function (t) { function n() { return n.__super__.constructor.apply(this, arguments) } return e(n, t), n.prototype.init = function () { var e; return e = this.domData("target"), this.$dom.click(function () { return function (t) { return e.trigger("click"), t.preventDefault() } }(this)) }, n }(Behaviour) }.call(this), function () { this.Progress = function () { function e(t, n, i) { this.$bar = t, this.color = n, this.cancelHandler = null != i ? i : void 0, this.targetId = "progressbar-" + e.getIndex(), this.$bar.attr("id", this.targetId), this.startColor = this.color || "#d7d7d7", this.endColor = this.color || "#c4d58c", this.bar = this.createProgressBar(this.startColor, this.endColor), this.reset() } return e.prototype.createProgressBar = function (e, t) { return new ProgressBar.Line("#" + this.targetId, { strokeWidth: .3, easing: "easeInOut", trailWidth: .22, trailColor: "#d7d7d7", preserveAspectRatio: !0, svgStyle: { width: "100%", height: "100%" }, from: { color: t }, to: { color: t }, step: function (e, t) { return t.path.setAttribute("stroke", e.color) } }) }, e.prototype.startState = function () { return this.bar.destroy(), this.bar = this.createProgressBar(this.startColor, this.endColor) }, e.prototype.errorState = function () { return this.bar.destroy(), this.bar = this.createProgressBar(this.startColor, "#c4d58c"), this.bar.animate(1) }, e.prototype.set = function (e) { return e >= 1 ? 0 === this.lastValue ? (this.bar.set(0), this.bar.animate(1)) : this.bar.set(e) : (this.bar.set(e), this.lastValue = e) }, e.prototype.reset = function () { return this.lastValue = 0 }, e.prototype.hide = function () { return this.$bar.hide() }, e.prototype.show = function () { return this.$bar.show() }, e.prototype.animate = function (e) { return this.bar.animate(e) }, e.getIndex = function () { return void 0 === this.index && (this.index = 0), this.index += 1, this.index }, e }() }.call(this), function () {
49    var e = function (e, t) { return function () { return e.apply(t, arguments) } }, t = function (e, t) { function i() { this.constructor = e } for (var o in t) n.call(t, o) && (e[o] = t[o]); return i.prototype = t.prototype, e.prototype = new i, e.__super__ = t.prototype, e }, n = {}.hasOwnProperty; this.ImageUpload = function (n) {
50        function i() { return this.handleFitParam = e(this.handleFitParam, this), this.handleRemoveImage = e(this.handleRemoveImage, this), i.__super__.constructor.apply(this, arguments) } return t(i, n), i.prototype.init = function () { return this.addUploader(), this.$dom.closest(".grid__item").hasClass("js-removible-block") ? this.removeWholeBlock = !0 : this.removeWholeBlock = !1, this.$icon = this.$dom.find(".
50image-uploader__icon"), this.$thumbImage = this.$dom.find(".image__preview"), this.$dialog = this.$dom.find(".image-uploader__dialog").on("click", function (e) { return function () { return e.$uploader.trigger("click") } }(this)), this.$dom.on("uploadfile", this.handleUploadFile.bind(this)), this.$imageWrapper = this.$dom.closest(".js-removible-block"), 0 === this.$imageWrapper.length && (this.$imageWrapper = this.$dom), this.imageOptions = this.data("image-options"), this.$controlBar = this.$dialog.parent(), this.$cancelUpload = this.$dom.find(".image-uploader__cancel-button"), this.$cancelUpload.on("click", this.handleCancelUpload.bind(this)), this.$cancelUpload.hide(), this.progressBarColor = this.data("progressbar-color"), this.$removeImage = this.$dom.find(".image-uploader__remove-button"), this.$removeImage.on("click", this.handleRemoveImage.bind(this)), this.messages = { wait_for_upload: "Upload", uploading: "Uploading ...", error: "Error", success: "Success" }, this.icons = { wait_for_upload: "icon--plus", uploading: "icon--upload", error: "icon--cross", success: "icon--check" }, this.inputs = { filename: this.$dom.find("[role='image-filename']"), width: this.$dom.find("[role='image-width']"), height: this.$dom.find("[role='image-height']"), key: this.$dom.find("[role='image-key']"), fit: this.$dom.find("[role='image-fit']"), crop: this.$dom.find("[role='image-crop']"), caption: this.$dom.find("[role='image-caption']"), url: this.$dom.find("[role='image-url']"), _destroy: this.$dom.find("[name$='_destroy]']") }, this.inputs.fit.on("change", this.handleFitParam.bind(this)), this.inputs.fit.on("change", this.handleImageUpdate.bind(this)), this.inputs.crop.on("change", this.handleImageUpdate.bind(this)), this.progressBar = new Progress(this.$dom.find(".image-uploader__progress-bar"), this.progressBarColor), this.setControlMessage("wait_for_upload"), this.originalOpacityValue = this.$thumbImage.css("opacity"), this.handleFitParam() }, i.prototype.addUploader = function () { return void 0 !== this.uploader ? this.$uploader : (this.$uploader = $("<input type='file' accept='image/*' />"), this.$dom.append(this.$uploader), this.$uploader.on("change", this.handleUpload.bind(this)), this.$uploader) }, i.prototype.handleRemoveImage = function (e) { return confirm("Are you sure?") ? this.removeWholeBlock ? this.$dom.closest(".js-removible-block").hide() : (this.$thumbImage.hide(), this.$removeImage.hide(), this.inputs.caption.length > 0 ? this.inputs.caption.hide() : void 0) : e.stopPropagation() }, i.prototype.handleFitParam = function () { var e; return e = "crop" !== this.inputs.fit.find("select").val(), this.inputs.crop.find("select").prop("disabled", e), e ? this.inputs.crop.hide() : this.inputs.crop.show() }, i.prototype.setControlMessage = function (e) { return this.$icon.html($("<i class='" + this.icons[e] + "'></i>")), this.$dialog.html(this.messages[e]) }, i.prototype.handleImageUpdate = function (e) { var t; return t = this.imageOptions, "string" != typeof e && (e = this.$thumbImage.find("img").attr("src").split("?")[0]), this.inputs.fit.length > 0 && (t.fit = this.inputs.fit.find("select").val()), this.inputs.crop.length > 0 && (t.crop = this.inputs.crop.find("select").val()), this.$thumbImage.find("img").attr("src", e + "?" + $.param(t)) }, i.prototype.handleUpload = function (e) { var t; return e.preventDefault(), e.originalEvent.dataTransfer ? t = e.originalEvent.dataTransfer.files[0] : e.target && e.target.files && (t = e.target.files[0]), this.startUpload(t), e.stopPropagation() }, i.prototype.startUpload = function (e) { return this.$thumbImage.show(), this.$thumbImage.css("opacity", "0.1"), this.setControlMessage("uploading"), this.$cancelUpload.show(), this.$controlBar.addClass("is-active"), this.$controlBar.removeClass("is-success"), this.requestUpload(e).then(function (t) { return function (n) { return t.s3Url = n.s3_url, t.assetUrl = n.asset_url, t.upload = t.sendFile(e, n.s3_url), t.upload.promise.then(function () { return t.imageSizes(t.assetUrl) }).then(function (i) { return $.when({ asset_url: t.assetUrl, path: n.path, width: i.width, height: i.height, size: e.size, format: e.name.split(".").pop() }) }).then(function (n) { return t.handleImageUpdate(n.asset_url), t.input
50s.filename.val(e.name), t.inputs.width.val(n.width), t.inputs.height.val(n.height), t.inputs.key.val(n.path), t.$controlBar.addClass("is-success"), t.inputs.caption.length > 0 && t.inputs.caption.show(), t.inputs.fit.length > 0 && t.inputs.fit.show(), t.inputs.crop.length > 0 && t.inputs.crop.show(), t.inputs.url.length > 0 && t.inputs.url.show(), t.inputs._destroy.val("false"), t.$thumbImage.imagesLoaded(function () { return t.$thumbImage.show(), t.$removeImage.show(), t.finishUpload(), setTimeout(function () { return t.setControlMessage("wait_for_upload"), t.$controlBar.removeClass("is-success"), t.progressBar.set(0) }, 3e3) }) }).fail(function (e) { return (e = "uploadCanceled") ? void 0 : (alert("Image uploading failed: please retry"), t.finishUploadWithError()) }) } }(this)) }, i.prototype.handleCancelUpload = function (e) { return e.preventDefault(), this.upload.cancel(), this.progressBar.set(0), this.$cancelUpload.hide(), this.setControlMessage("wait_for_upload"), this.$thumbImage.css("opacity", this.originalOpacityValue), this.$thumbImage.hide() }, i.prototype.handleUploadFile = function (e, t) { return this.startUpload(t) }, i.prototype.finishUpload = function () { return this.setControlMessage("success"), this.$thumbImage.show(), this.$thumbImage.css("opacity", this.originalOpacityValue), this.$cancelUpload.hide() }, i.prototype.finishUploadWithError = function () { return this.progressBar.errorState(), this.setControlMessage("error"), this.$thumbImage.css("opacity", this.originalOpacityValue), this.$cancelUpload.hide() }, i.prototype.requestUpload = function (e) { var t; return t = JSON.stringify({ data: { attributes: { filename: e.name } } }), $.ajax({ type: "post", url: "/api/upload_request", data: t, dataType: "json", contentType: "application/json" }) }, i.prototype.imageSizes = function (e) { return $.ajax(e + "?fm=json").then(function () { return function (e) { return $.when({ height: e.PixelHeight, width: e.PixelWidth }) } }(this)) }, i.prototype.sendFile = function (e, t) {
51            var n, i, o; return i = $.Deferred(), o = new XMLHttpRequest, o.onreadystatechange = function (e) {
52                return function (t) {
53                    return 4 === t.target.readyState ? 200 === t.target.status ? (e.progressBar.set(1),
54                        i.resolve()) : i.reject() : void 0
55                }
56            }(this), o.upload.onprogress = function (e) { return function (t) { var n, i, o; return n = t.loaded || t.position, o = t.total || t.totalSize, i = n / o, e.progressBar.set(i) } }(this), n = function () { return function () { return i.reject("uploadCanceled"), o.onreadystatechange = null, o.abort() } }(this), o.open("PUT", t), o.setRequestHeader("x-amz-acl", "public-read"), o.send(e), { promise: i.promise(), cancel: n }
57        }, i
58    }(Behaviour)
59}.call(this), function e(t, n, i) { function o(s, a) { if (!n[s]) { if (!t[s]) { var l = "function" == typeof require && require; if (!a && l) return l(s, !0); if (r) return r(s, !0); var c = new Error("Cannot find module '" + s + "'"); throw c.code = "MODULE_NOT_FOUND", c } var d = n[s] = { exports: {} }; t[s][0].call(d.exports, function (e) { var n = t[s][1][e]; return o(n ? n : e) }, d, d.exports, e, t, n, i) } return n[s].exports } for (var r = "function" == typeof require && require, s = 0; s < i.length; s++)o(i[s]); return o }({
60    1: [function (e, t, n) { "use strict"; var i = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (e) { return typeof e } : function (e) { return e && "function" == typeof Symbol && e.constructor === Symbol ? "symbol" : typeof e }; !function (e, o) { "function" == typeof define && define.amd ? define(o) : "object" === ("undefined" == typeof n ? "undefined" : i(n)) ? t.exports = o() : e.PhotoSwipeUI_Default = o() }(void 0, function () { var e = function (e, t) { var n, i, o, r, s, a, l, c, d, u, h, p, f, m, g, v, E, T, y, b = this, C = !1, _ = !0, I = !0, O = { barsSize: { top: 44, bottom: "auto" }, closeElClasses: ["item", "caption", "zoom-wrap", "ui", "top-bar"], timeToIdle: 4e3, timeToIdleOutside: 1e3, loadingIndicatorDelay: 1e3, addCaptionHTMLFn: function (e, t) { return e.title ? (t.children[0].innerHTML = e.title, !0) : (t.children[0].innerHTML = "", !1) }, closeEl: !0, captionEl: !0, fullscreenEl: !0, zoomEl: !0, shareEl: !0, counterEl: !0, arrowEl
60: !0, preloaderEl: !0, tapToClose: !1, tapToToggleControls: !0, clickToCloseNonZoomable: !0, shareButtons: [{ id: "facebook", label: "Share on Facebook", url: "https://www.facebook.com/sharer/sharer.php?u={{url}}" }, { id: "twitter", label: "Tweet", url: "https://twitter.com/intent/tweet?text={{text}}&url={{url}}" }, { id: "pinterest", label: "Pin it", url: "http://www.pinterest.com/pin/create/button/?url={{url}}&media={{image_url}}&description={{text}}" }, { id: "download", label: "Download image", url: "{{raw_image_url}}", download: !0 }], getImageURLForShare: function () { return e.currItem.src || "" }, getPageURLForShare: function () { return window.location.href }, getTextForShare: function () { return e.currItem.title || "" }, indexIndicatorSep: " / ", fitControlsWidth: 1200 }, D = function (e) { if (v) return !0; e = e || window.event, g.timeToIdle && g.mouseUsed && !d && L(); for (var n, i, o = e.target || e.srcElement, r = o.getAttribute("class") || "", s = 0; s < z.length; s++)n = z[s], n.onTap && r.indexOf("pswp__" + n.name) > -1 && (n.onTap(), i = !0); if (i) { e.stopPropagation && e.stopPropagation(), v = !0; var a = t.features.isOldAndroid ? 600 : 30; E = setTimeout(function () { v = !1 }, a) } }, R = function () { return !e.likelyTouchDevice || g.mouseUsed || screen.width > g.fitControlsWidth }, k = function (e, n, i) { t[(i ? "add" : "remove") + "Class"](e, "pswp__" + n) }, w = function () { var e = 1 === g.getNumItemsFn(); e !== m && (k(i, "ui--one-slide", e), m = e) }, x = function () { k(l, "share-modal--hidden", I) }, K = function () { return I = !I, I ? (t.removeClass(l, "pswp__share-modal--fade-in"), setTimeout(function () { I && x() }, 300)) : (x(), setTimeout(function () { I || t.addClass(l, "pswp__share-modal--fade-in") }, 30)), I || N(), !1 }, S = function (t) { t = t || window.event; var n = t.target || t.srcElement; return e.shout("shareLinkClick", t, n), n.href ? n.hasAttribute("download") ? !0 : (window.open(n.href, "pswp_share", "scrollbars=yes,resizable=yes,toolbar=no,location=yes,width=550,height=420,top=100,left=" + (window.screen ? Math.round(screen.width / 2 - 275) : 100)), I || K(), !1) : !1 }, N = function () { for (var e, t, n, i, o, r = "", s = 0; s < g.shareButtons.length; s++)e = g.shareButtons[s], n = g.getImageURLForShare(e), i = g.getPageURLForShare(e), o = g.getTextForShare(e), t = e.url.replace("{{url}}", encodeURIComponent(i)).replace("{{image_url}}", encodeURIComponent(n)).replace("{{raw_image_url}}", n).replace("{{text}}", encodeURIComponent(o)), r += '<a href="' + t + '" target="_blank" class="pswp__share--' + e.id + '"' + (e.download ? "download" : "") + ">" + e.label + "</a>", g.parseShareButtonOut && (r = g.parseShareButtonOut(e, r)); l.children[0].innerHTML = r, l.children[0].onclick = S }, A = function (e) { for (var n = 0; n < g.closeElClasses.length; n++)if (t.hasClass(e, "pswp__" + g.closeElClasses[n])) return !0 }, $ = 0, L = function () { clearTimeout(y), $ = 0, d && b.setIdle(!1) }, P = function (e) { e = e ? e : window.event; var t = e.relatedTarget || e.toElement; t && "HTML" !== t.nodeName || (clearTimeout(y), y = setTimeout(function () { b.setIdle(!0) }, g.timeToIdleOutside)) }, F = function () { g.fullscreenEl && !t.features.isOldAndroid && (n || (n = b.getFullscreenAPI()), n ? (t.bind(document, n.eventK, b.updateFullscreen), b.updateFullscreen(), t.addClass(e.template, "pswp--supports-fs")) : t.removeClass(e.template, "pswp--supports-fs")) }, B = function () { g.preloaderEl && (M(!0), u("beforeChange", function () { clearTimeout(f), f = setTimeout(function () { e.currItem && e.currItem.loading ? (!e.allowProgressiveImg() || e.currItem.img && !e.currItem.img.naturalWidth) && M(!1) : M(!0) }, g.loadingIndicatorDelay) }), u("imageLoadComplete", function (t, n) { e.currItem === n && M(!0) })) }, M = function (e) { p !== e && (k(h, "preloader--active", !e), p = e) }, H = function (e) { var n = e.vGap; if (R()) { var s = g.barsSize; if (g.captionEl && "auto" === s.bottom) if (r || (r = t.createEl("pswp__caption pswp__caption--fake"), r.appendChild(t.createEl("pswp__caption__center")), i.insertBefore(r, o), t.addClass(i, "pswp__ui--fit")), g.addCaptionHTMLFn(e, r, !0)) { var a = r.clientHeight; n.bottom = parseInt(a, 10) || 44 } else n.bottom = s.top; else n.bottom = "auto" === s.bottom ? 0 : s.bottom; n.top = s.top } else n.top = n.bottom = 0 }, q = function () { g.timeToIdle && u("mouseUsed", function () { t.bind(document, "mousemove", L), t.bind(document, "mouseout", P), T = setInterval(function () { $++, 2 === $ && b.setIdle(!0) }, g.timeToIdle / 2) }) }, j = function () { u("onVerticalDrag", function (e) { _ && .95 > e ? b.hideControls() : !_ && e >= .95 && b.showControls() }); var e; u("onPinchClose", function (t) { _ && .9 > t ? (b.hideControls(), e = !0) : e && !_ && t > .9 && b.showControls() }), u("zoomGestureEnded", function () { e = !1, e && !_ && b.showControls() }) }, z = [{ name: "caption", option: "captionEl", onInit: function (e) { o = e } }, { name: "share-modal", option: "shareEl", onInit: function (e) { l = e }, onTap: function () { K() } }, { name: "button--share", option: "shareEl", onInit: function (e) { a = e }, onTap: function () { K() } }, { name: "button--zoom", option: "zoomEl", onTap: e.toggleDesktopZoom }, { name: "counter", option: "counterEl", onInit: function (e) { s = e } }, { name: "button--close", option: "closeEl", onTap: e.close }, { name: "button--arrow--left", option: "arrowEl", onTap: e.prev }, { name: "button--arrow--right", option: "arrowEl", onTap: e.next }, { name: "button--fs", option: "fullscreenEl", onTap: function () { n.isFullscreen() ? n.exit() : n.enter() } }, { name: "preloader", option: "preloaderEl", onInit: function (e) { h = e } }], U = function () { var e, n, o, r = function (i) { if (i) for (var r = i.length, s = 0; r > s; s++) { e = i[s], n = e.className; for (var a = 0; a < z.length; a++)o = z[a], n.indexOf("pswp__" + o.name) > -1 && (g[o.option] ? (t.removeClass(e, "pswp__element--disabled"), o.onInit && o.onInit(e)) : t.addClass(e, "pswp__element--disabled")) } }; r(i.children); var s = t.getChildByClass(i, "pswp__top-bar"); s && r(s.children) }; b.init = function () { t.extend(e.options, O, !0), g = e.options, i = t.getChildByClass(e.scrollWrap, "psw
60p__ui"), u = e.listen, j(), u("beforeChange", b.update), u("doubleTap", function (t) { var n = e.currItem.initialZoomLevel; e.getZoomLevel() !== n ? e.zoomTo(n, t, 333) : e.zoomTo(g.getDoubleTapZoom(!1, e.currItem), t, 333) }), u("preventDragEvent", function (e, t, n) { var i = e.target || e.srcElement; i && i.getAttribute("class") && e.type.indexOf("mouse") > -1 && (i.getAttribute("class").indexOf("__caption") > 0 || /(SMALL|STRONG|EM)/i.test(i.tagName)) && (n.prevent = !1) }), u("bindEvents", function () { t.bind(i, "pswpTap click", D), t.bind(e.scrollWrap, "pswpTap", b.onGlobalTap), e.likelyTouchDevice || t.bind(e.scrollWrap, "mouseover", b.onMouseOver) }), u("unbindEvents", function () { I || K(), T && clearInterval(T), t.unbind(document, "mouseout", P), t.unbind(document, "mousemove", L), t.unbind(i, "pswpTap click", D), t.unbind(e.scrollWrap, "pswpTap", b.onGlobalTap), t.unbind(e.scrollWrap, "mouseover", b.onMouseOver), n && (t.unbind(document, n.eventK, b.updateFullscreen), n.isFullscreen() && (g.hideAnimationDuration = 0, n.exit()), n = null) }), u("destroy", function () { g.captionEl && (r && i.removeChild(r), t.removeClass(o, "pswp__caption--empty")), l && (l.children[0].onclick = null), t.removeClass(i, "pswp__ui--over-close"), t.addClass(i, "pswp__ui--hidden"), b.setIdle(!1) }), g.showAnimationDuration || t.removeClass(i, "pswp__ui--hidden"), u("initialZoomIn", function () { g.showAnimationDuration && t.removeClass(i, "pswp__ui--hidden") }), u("initialZoomOut", function () { t.addClass(i, "pswp__ui--hidden") }), u("parseVerticalMargin", H), U(), g.shareEl && a && l && (I = !0), w(), q(), F(), B() }, b.setIdle = function (e) { d = e, k(i, "ui--idle", e) }, b.update = function () { _ && e.currItem ? (b.updateIndexIndicator(), g.captionEl && (g.addCaptionHTMLFn(e.currItem, o), k(o, "caption--empty", !e.currItem.title)), C = !0) : C = !1, I || K(), w() }, b.updateFullscreen = function (i) { i && setTimeout(function () { e.setScrollOffset(0, t.getScrollY()) }, 50), t[(n.isFullscreen() ? "add" : "remove") + "Class"](e.template, "pswp--fs") }, b.updateIndexIndicator = function () { g.counterEl && (s.innerHTML = e.getCurrentIndex() + 1 + g.indexIndicatorSep + g.getNumItemsFn()) }, b.onGlobalTap = function (n) { n = n || window.event; var i = n.target || n.srcElement; if (!v) if (n.detail && "mouse" === n.detail.pointerType) { if (A(i)) return void e.close(); t.hasClass(i, "pswp__img") && (1 === e.getZoomLevel() && e.getZoomLevel() <= e.currItem.fitRatio ? g.clickToCloseNonZoomable && e.close() : e.toggleDesktopZoom(n.detail.releasePoint)) } else if (g.tapToToggleControls && (_ ? b.hideControls() : b.showControls()), g.tapToClose && (t.hasClass(i, "pswp__img") || A(i))) return void e.close() }, b.onMouseOver = function (e) { e = e || window.event; var t = e.target || e.srcElement; k(i, "ui--over-close", A(t)) }, b.hideControls = function () { t.addClass(i, "pswp__ui--hidden"), _ = !1 }, b.showControls = function () { _ = !0, C || b.update(), t.removeClass(i, "pswp__ui--hidden") }, b.supportsFullscreen = function () { var e = document; return !!(e.exitFullscreen || e.mozCancelFullScreen || e.webkitExitFullscreen || e.msExitFullscreen) }, b.getFullscreenAPI = function () { var t, n = document.documentElement, i = "fullscreenchange"; return n.requestFullscreen ? t = { enterK: "requestFullscreen", exitK: "exitFullscreen", elementK: "fullscreenElement", eventK: i } : n.mozRequestFullScreen ? t = { enterK: "mozRequestFullScreen", exitK: "mozCancelFullScreen", elementK: "mozFullScreenElement", eventK: "moz" + i } : n.webkitRequestFullscreen ? t = { enterK: "webkitRequestFullscreen", exitK: "webkitExitFullscreen", elementK: "webkitFullscreenElement", eventK: "webkit" + i } : n.msRequestFullscreen && (t = { enterK: "msRequestFullscreen", exitK: "msExitFullscreen", elementK: "msFullscreenElement", eventK: "MSFullscreenChange" }), t && (t.enter = function () { return c = g.closeOnScroll, g.closeOnScroll = !1, "webkitRequestFullscreen" !== this.enterK ? e.template[this.enterK]() : void e.template[this.enterK](Element.ALLOW_KEYBOARD_INPUT) }, t.exit = function () { return g.closeOnScroll = c, document[this.exitK]() }, t.isFullscreen = function () { return document[this.elementK] }), t } }; return e }) }, {}], 2: [function (e, t, n) {
61        "use strict"; var i = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (e) { return typeof e } : function (e) { return e && "function" == typeof Symbol && e.constructor === Symbol ? "symbol" : typeof e }; !function (e, o) { "function" == typeof define && define.amd ? define(o) : "object" === ("undefined" == typeof n ? "undefined" : i(n)) ? t.exports = o() : e.PhotoSwipe = o() }(void 0, function () {
62            var e = function (e, t, n, o) {
63                var r = { features: null, bind: function (e, t, n, i) { var o = (i ? "remove" : "add") + "EventListener"; t = t.split(" "); for (var r = 0; r < t.length; r++)t[r] && e[o](t[r], n, !1) }, isArray: function (e) { return e instanceof Array }, createEl: function (e, t) { var n = document.createElement(t || "div"); return e && (n.className = e), n }, getScrollY: function () { var e = window.pageYOffset; return void 0 !== e ? e : document.documentElement.scrollTop }, unbind: function (e, t, n) { r.bind(e, t, n, !0) }, removeClass: function (e, t) { var n = new RegExp("(\\s|^)" + t + "(\\s|$)"); e.className = e.className.replace(n, " ").replace(/^\s\s*/, "").replace(/\s\s*$/, "") }, addClass: function (e, t) { r.hasClass(e, t) || (e.className += (e.className ? " " : "") + t) }, hasClass: function (e, t) { return e.className && new RegExp("(^|\\s)" + t + "(\\s|$)").test(e.className) }, getChildByClass: function (e, t) { for (var n = e.firstChild; n;) { if (r.hasClass(n, t)) return n; n = n.nextSibling } }, arraySearch: function (e, t, n) { for (var i = e.length; i--;)if (e[i][n] === t) return i; return -1 }, extend: function (e, t, n) { for (var i in t) if (t.hasOwnProperty(i)) { if (n && e.hasOwnProperty(i)) continue; e[i] = t[i] } }, easing: { sine: { out: function (e) { return Math.sin(e * (Math.PI / 2)) }, inOut: function (e) { return -(Math.cos(Math.PI * e) - 1) / 2 } }, cubic: { out: function (e) { return --e * e * e + 1 } } }, detectFeatures: function () { if (r.features) return r.features; var e = r.createEl(), t = e.style, n = "", i = {}; if (i.oldIE = document.all && !document.addEventListener, i.touch = "ontouchstart" in window, window.requestAnimationFrame && (i.raf = window.requestAnimationFrame, i.caf = window.cancelAnimationFrame), i.pointerEvent = navigator.pointerEnabled || navigator.msPointerEnabled, !i.pointerEvent) { var o = navigator.userAgent; if (/iP(hone|od)/.test(navigator.platform)) { var s = navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/); s && s.length > 0 && (s = parseInt(s[1], 10), s >= 1 && 8 > s && (i.isOldIOSPhone = !0)) } var a = o.match(/Android\s([0-9\.]*)/), l = a ? a[1] : 0; l = parseFloat(l), l >= 1 && (4.4 > l && (i.isOldAndroid = !0), i.androidVersion = l), i.isMobileOpera = /opera mini|o
63pera mobi/i.test(o) } for (var c, d, u = ["transform", "perspective", "animationName"], h = ["", "webkit", "Moz", "ms", "O"], p = 0; 4 > p; p++) { n = h[p]; for (var f = 0; 3 > f; f++)c = u[f], d = n + (n ? c.charAt(0).toUpperCase() + c.slice(1) : c), !i[c] && d in t && (i[c] = d); n && !i.raf && (n = n.toLowerCase(), i.raf = window[n + "RequestAnimationFrame"], i.raf && (i.caf = window[n + "CancelAnimationFrame"] || window[n + "CancelRequestAnimationFrame"])) } if (!i.raf) { var m = 0; i.raf = function (e) { var t = (new Date).getTime(), n = Math.max(0, 16 - (t - m)), i = window.setTimeout(function () { e(t + n) }, n); return m = t + n, i }, i.caf = function (e) { clearTimeout(e) } } return i.svg = !!document.createElementNS && !!document.createElementNS("http://www.w3.org/2000/svg", "svg").createSVGRect, r.features = i, i } }; r.detectFeatures(), r.features.oldIE && (r.bind = function (e, t, n, o) { t = t.split(" "); for (var r, s = (o ? "detach" : "attach") + "Event", a = function () { n.handleEvent.call(n) }, l = 0; l < t.length; l++)if (r = t[l]) if ("object" === ("undefined" == typeof n ? "undefined" : i(n)) && n.handleEvent) { if (o) { if (!n["oldIE" + r]) return !1 } else n["oldIE" + r] = a; e[s]("on" + r, n["oldIE" + r]) } else e[s]("on" + r, n) }); var s = this, a = 25, l = 3, c = { allowPanToNext: !0, spacing: .12, bgOpacity: 1, mouseUsed: !1, loop: !0, pinchToClose: !0, closeOnScroll: !0, closeOnVerticalDrag: !0, verticalDragRange: .75, hideAnimationDuration: 333, showAnimationDuration: 333, showHideOpacity: !1, focus: !0, escKey: !0, arrowKeys: !0, mainScrollEndFriction: .35, panEndFriction: .35, isClickableElement: function (e) { return "A" === e.tagName }, getDoubleTapZoom: function (e, t) { return e ? 1 : t.initialZoomLevel < .7 ? 1 : 1.33 }, maxSpreadZoom: 1.33, modal: !0, scaleMode: "fit" }; r.extend(c, o); var d, u, h, p, f, m, g, v, E, T, y, b, C, _, I, O, D, R, k, w, x, K, S, N, A, $, L, P, F, B, M, H, q, j, z, U, W, V, G, X, Y, Z, Q, J, ee, te, ne, ie, oe, re, se, ae, le, ce, de, ue, he = function () { return { x: 0, y: 0 } }, pe = he(), fe = he(), me = he(), ge = {}, ve = 0, Ee = {}, Te = he(), ye = 0, be = !0, Ce = [], _e = {}, Ie = !1, Oe = function (e, t) { r.extend(s, t.publicMethods), Ce.push(e) }, De = function (e) { var t = en(); return e > t - 1 ? e - t : 0 > e ? t + e : e }, Re = {}, ke = function (e, t) { return Re[e] || (Re[e] = []), Re[e].push(t) }, we = function (e) { var t = Re[e]; if (t) { var n = Array.prototype.slice.call(arguments); n.shift(); for (var i = 0; i < t.length; i++)t[i].apply(s, n) } }, xe = function () { return (new Date).getTime() }, Ke = function (e) { ce = e, s.bg.style.opacity = e * c.bgOpacity }, Se = function (e, t, n, i, o) { (!Ie || o && o !== s.currItem) && (i /= o ? o.fitRatio : s.currItem.fitRatio), e[K] = b + t + "px, " + n + "px" + C + " scale(" + i + ")" }, Ne = function (e) { oe && (e && (T > s.currItem.fitRatio ? Ie || (pn(s.currItem, !1, !0), Ie = !0) : Ie && (pn(s.currItem), Ie = !1)), Se(oe, me.x, me.y, T)) }, Ae = function (e) { e.container && Se(e.container.style, e.initialPosition.x, e.initialPosition.y, e.initialZoomLevel, e) }, $e = function (e, t) { t[K] = b + e + "px, 0px" + C }, Le = function (e, t) { if (!c.loop && t) { var n = p + (Te.x * ve - e) / Te.x, i = Math.round(e - Tt.x); (0 > n && i > 0 || n >= en() - 1 && 0 > i) && (e = Tt.x + i * c.mainScrollEndFriction) } Tt.x = e, $e(e, f) }, Pe = function (e, t) { var n = yt[e] - Ee[e]; return fe[e] + pe[e] + n - n * (t / y) }, Fe = function (e, t) { e.x = t.x, e.y = t.y, t.id && (e.id = t.id) }, Be = function (e) { e.x = Math.round(e.x), e.y = Math.round(e.y) }, Me = null, He = function Ln() { Me && (r.unbind(document, "mousemove", Ln), r.addClass(e, "pswp--has_mouse"), c.mouseUsed = !0, we("mouseUsed")), Me = setTimeout(function () { Me = null }, 100) }, qe = function () { r.bind(document, "keydown", s), M.transform && r.bind(s.scrollWrap, "click", s), c.mouseUsed || r.bind(document, "mousemove", He), r.bind(window, "resize scroll", s), we("bindEvents") }, je = function () { r.unbind(window, "resize", s), r.unbind(window, "scroll", E.scroll), r.unbind(document, "keydown", s), r.unbind(document, "mousemove", He), M.transform && r.unbind(s.scrollWrap, "click", s), V && r.unbind(window, g, s), we("unbindEvents") }, ze = function (e, t) { var n = cn(s.currItem, ge, e); return t && (ie = n), n }, Ue = function (e) { return e || (e = s.currItem), e.initialZoomLevel }, We = function (e) { return e || (e = s.currItem), e.w > 0 ? c.maxSpreadZoom : 1 }, Ve = function (e, t, n, i) { return i === s.currItem.initialZoomLevel ? (n[e] = s.currItem.initialPosition[e], !0) : (n[e] = Pe(e, i), n[e] > t.min[e] ? (n[e] = t.min[e], !0) : n[e] < t.max[e] ? (n[e] = t.max[e], !0) : !1) }, Ge = function () { if (K) { var t = M.perspective && !N; return b = "translate" + (t ? "3d(" : "("), void (C = M.perspective ? ", 0px)" : ")") } K = "left", r.addClass(e, "pswp--ie"), $e = function (e, t) { t.left = e + "px" }, Ae = function (e) { var t = e.fitRatio > 1 ? 1 : e.fitRatio, n = e.container.style, i = t * e.w, o = t * e.h; n.width = i + "px", n.height = o + "px", n.left = e.initialPosition.x + "px", n.top = e.initialPosition.y + "px" }, Ne = function () { if (oe) { var e = oe, t = s.currItem, n = t.fitRatio > 1 ? 1 : t.fitRatio, i = n * t.w, o = n * t.h; e.width = i + "px", e.height = o + "px", e.left = me.x + "px", e.top = me.y + "px" } } }, Xe = function (e) { var t = ""; c.escKey && 27 === e.keyCode ? t = "close" : c.arrowKeys && (37 === e.keyCode ? t = "prev" : 39 === e.keyCode && (t = "next")), t && (e.ctrlKey || e.altKey || e.shiftKey || e.metaKey || (e.preventDefault ? e.preventDefault() : e.returnValue = !1, s[t]())) }, Ye = function (e) { e && (Y || X || re || U) && (e.preventDefault(), e.stopPropagation()) }, Ze = function () { s.setScrollOffset(0, r.getScrollY()) }, Qe = {}, Je = 0, et = function (e) { Qe[e] && (Qe[e].raf && $(Qe[e].raf), Je--, delete Qe[e]) }, tt = function (e) { Qe[e] && et(e), Qe[e] || (Je++, Qe[e] = {}) }, nt = function () { for (var e in Qe) Qe.hasOwnProperty(e) && et(e) }, it = function (e, t, n, i, o, r, s) { var a, l = xe(); tt(e); var c = function d() { if (Qe[e]) { if (a = xe() - l, a >= i) return et(e), r(n), void (s && s()); r((n - t) * o(a / i) + t), Qe[e].raf = A(d) } }; c() }, ot = { shout: we, listen: ke, viewportSize: ge, options: c, isMainScrollAnimating: function () { return re }, getZoomLevel: function () { return T }, getCurrentIndex: function () { return p }, isDragging: function () { return V }, isZooming: function () { return ee }, setScrollOffset: function (e, t) { Ee.x = e, B = Ee.y = t, we("updateScrollOffset", Ee) }, applyZoomPan: function (e, t, n, i) { me.x = t, me.y = n, T = e, Ne(i) }, init: function () { if (!d && !u) { var n; s.framework = r, s.template = e, s.bg = r.getChildByClass(e, "pswp__bg"), L = e.className, d = !0, M = r.detectFeatures(), A = M.raf, $ = M.caf, K = M.transform, F = M.oldIE, s.scrollWrap = r.getChildByClass(e, "pswp__scroll-wrap"), s.container = r.getChildByClass(s.scrollWrap, "psw
63p__container"), f = s.container.style, s.itemHolders = O = [{ el: s.container.children[0], wrap: 0, index: -1 }, { el: s.container.children[1], wrap: 0, index: -1 }, { el: s.container.children[2], wrap: 0, index: -1 }], O[0].el.style.display = O[2].el.style.display = "none", Ge(), E = { resize: s.updateSize, scroll: Ze, keydown: Xe, click: Ye }; var i = M.isOldIOSPhone || M.isOldAndroid || M.isMobileOpera; for (M.animationName && M.transform && !i || (c.showAnimationDuration = c.hideAnimationDuration = 0), n = 0; n < Ce.length; n++)s["init" + Ce[n]](); if (t) { var o = s.ui = new t(s, r); o.init() } we("firstUpdate"), p = p || c.index || 0, (isNaN(p) || 0 > p || p >= en()) && (p = 0), s.currItem = Jt(p), (M.isOldIOSPhone || M.isOldAndroid) && (be = !1), e.setAttribute("aria-hidden", "false"), c.modal && (be ? e.style.position = "fixed" : (e.style.position = "absolute", e.style.top = r.getScrollY() + "px")), void 0 === B && (we("initialLayout"), B = P = r.getScrollY()); var a = "pswp--open "; for (c.mainClass && (a += c.mainClass + " "), c.showHideOpacity && (a += "pswp--animate_opacity "), a += N ? "pswp--touch" : "pswp--notouch", a += M.animationName ? " pswp--css_animation" : "", a += M.svg ? " pswp--svg" : "", r.addClass(e, a), s.updateSize(), m = -1, ye = null, n = 0; l > n; n++)$e((n + m) * Te.x, O[n].el.style); F || r.bind(s.scrollWrap, v, s), ke("initialZoomInEnd", function () { s.setContent(O[0], p - 1), s.setContent(O[2], p + 1), O[0].el.style.display = O[2].el.style.display = "block", c.focus && e.focus(), qe() }), s.setContent(O[1], p), s.updateCurrItem(), we("afterInit"), be || (_ = setInterval(function () { Je || V || ee || T !== s.currItem.initialZoomLevel || s.updateSize() }, 1e3)), r.addClass(e, "pswp--visible") } }, close: function () { d && (d = !1, u = !0, we("close"), je(), nn(s.currItem, null, !0, s.destroy)) }, destroy: function () { we("destroy"), Xt && clearTimeout(Xt), e.setAttribute("aria-hidden", "true"), e.className = L, _ && clearInterval(_), r.unbind(s.scrollWrap, v, s), r.unbind(window, "scroll", s), Ot(), nt(), Re = null }, panTo: function (e, t, n) { n || (e > ie.min.x ? e = ie.min.x : e < ie.max.x && (e = ie.max.x), t > ie.min.y ? t = ie.min.y : t < ie.max.y && (t = ie.max.y)), me.x = e, me.y = t, Ne() }, handleEvent: function (e) { e = e || window.event, E[e.type] && E[e.type](e) }, goTo: function (e) { e = De(e); var t = e - p; ye = t, p = e, s.currItem = Jt(p), ve -= t, Le(Te.x * ve), nt(), re = !1, s.updateCurrItem() }, next: function () { s.goTo(p + 1) }, prev: function () { s.goTo(p - 1) }, updateCurrZoomItem: function (e) { if (e && we("beforeChange", 0), O[1].el.children.length) { var t = O[1].el.children[0]; oe = r.hasClass(t, "pswp__zoom-wrap") ? t.style : null } else oe = null; ie = s.currItem.bounds, y = T = s.currItem.initialZoomLevel, me.x = ie.center.x, me.y = ie.center.y, e && we("afterChange") }, invalidateCurrItems: function () { I = !0; for (var e = 0; l > e; e++)O[e].item && (O[e].item.needsUpdate = !0) }, updateCurrItem: function (e) { if (0 !== ye) { var t, n = Math.abs(ye); if (!(e && 2 > n)) { s.currItem = Jt(p), Ie = !1, we("beforeChange", ye), n >= l && (m += ye + (ye > 0 ? -l : l), n = l); for (var i = 0; n > i; i++)ye > 0 ? (t = O.shift(), O[l - 1] = t, m++, $e((m + 2) * Te.x, t.el.style), s.setContent(t, p - n + i + 1 + 1)) : (t = O.pop(), O.unshift(t), m--, $e(m * Te.x, t.el.style), s.setContent(t, p + n - i - 1 - 1)); if (oe && 1 === Math.abs(ye)) { var o = Jt(D); o.initialZoomLevel !== T && (cn(o, ge), pn(o), Ae(o)) } ye = 0, s.updateCurrZoomItem(), D = p, we("afterChange") } } }, updateSize: function (t) { if (!be && c.modal) { var n = r.getScrollY(); if (B !== n && (e.style.top = n + "px", B = n), !t && _e.x === window.innerWidth && _e.y === window.innerHeight) return; _e.x = window.innerWidth, _e.y = window.innerHeight, e.style.height = _e.y + "px" } if (ge.x = s.scrollWrap.clientWidth, ge.y = s.scrollWrap.clientHeight, Ze(), Te.x = ge.x + Math.round(ge.x * c.spacing), Te.y = ge.y, Le(Te.x * ve), we("beforeResize"), void 0 !== m) { for (var i, o, a, d = 0; l > d; d++)i = O[d], $e((d + m) * Te.x, i.el.style), a = p + d - 1, c.loop && en() > 2 && (a = De(a)), o = Jt(a), o && (I || o.needsUpdate || !o.bounds) ? (s.cleanSlide(o), s.setContent(i, a), 1 === d && (s.currItem = o, s.updateCurrZoomItem(!0)), o.needsUpdate = !1) : -1 === i.index && a >= 0 && s.setContent(i, a), o && o.container && (cn(o, ge), pn(o), Ae(o)); I = !1 } y = T = s.currItem.initialZoomLevel, ie = s.currItem.bounds, ie && (me.x = ie.center.x, me.y = ie.center.y, Ne(!0)), we("resize") }, zoomTo: function (e, t, n, i, o) { t && (y = T, yt.x = Math.abs(t.x) - me.x, yt.y = Math.abs(t.y) - me.y, Fe(fe, me)); var s = ze(e, !1), a = {}; Ve("x", s, a, e), Ve("y", s, a, e); var l = T, c = { x: me.x, y: me.y }; Be(a); var d = function (t) { 1 === t ? (T = e, me.x = a.x, me.y = a.y) : (T = (e - l) * t + l, me.x = (a.x - c.x) * t + c.x, me.y = (a.y - c.y) * t + c.y), o && o(t), Ne(1 === t) }; n ? it("customZoomTo", 0, 1, n, i || r.easing.sine.inOut, d) : d(1) } }, rt = 30, st = 10, at = {}, lt = {}, ct = {}, dt = {}, ut = {}, ht = [], pt = {}, ft = [], mt = {}, gt = 0, vt = he(), Et = 0, Tt = he(), yt = he(), bt = he(), Ct = function (e, t) { return e.x === t.x && e.y === t.y }, _t = function (e, t) { return Math.abs(e.x - t.x) < a && Math.abs(e.y - t.y) < a }, It = function (e, t) { return mt.x = Math.abs(e.x - t.x), mt.y = Math.abs(e.y - t.y), Math.sqrt(mt.x * mt.x + mt.y * mt.y) }, Ot = function () { Z && ($(Z), Z = null) }, Dt = function Pn() { V && (Z = A(Pn), qt()) }, Rt = function () { return !("fit" === c.scaleMode && T === s.currItem.initialZoomLevel) }, kt = function Fn(e, t) { return e && e !== document ? e.getAttribute("class") && e.getAttribute("class").indexOf("pswp__scroll-wrap") > -1 ? !1 : t(e) ? e : Fn(e.parentNode, t) : !1 }, wt = {}, xt = function (e, t) { return wt.prevent = !kt(e.target, c.isClickableElement), we("preventDragEvent", e, t, wt), wt.prevent }, Kt = function (e, t) { return t.x = e.pageX, t.y = e.pageY, t.id = e.identifier, t }, St = function (e, t, n) { n.x = .5 * (e.x + t.x), n.y = .5 * (e.y + t.y) }, Nt = function (e, t, n) { if (e - q > 50) { var i = ft.length > 2 ? ft.shift() : {}; i.x = t, i.y = n, ft.push(i), q = e } }, At = function () { var e = me.y - s.currItem.initialPosition.y; return 1 - Math.abs(e / (ge.y / 2)) }, $t = {}, Lt = {}, Pt = [], Ft = function (e) { for (; Pt.length > 0;)Pt.pop(); return S ? (ue = 0, ht.forEach(function (e) { 0 === ue ? Pt[0] = e : 1 === ue && (Pt[1] = e), ue++ })) : e.type.indexOf("touch") > -1 ? e.touches && e.touches.length > 0 && (Pt[0] = Kt(e.touches[0], $t), e.touches.length > 1 && (Pt[1] = Kt(e.touches[1], Lt))) : ($t.x = e.pageX, $t.y = e.pageY, $t.id = "", Pt[0] = $t), Pt }, Bt = function (e, t) { var n, i, o, r, a = 0, l = me[e] + t[e], d = t[e] > 0, u = Tt.x + t.x, h = Tt.x - pt.x; return n = l > ie.min[e] || l < ie.max[e] ? c.panEndFriction : 1, l = me[e] + t[e] * n, !c.allowPanToNext && T !== s.currItem.initialZoomLevel || (oe ? "h" !== se || "x" !== e || X || (d ? (l > ie.min[e] && (n = c.panEndFriction, a = ie.min[e] - l, i = ie.min[e] - fe[e]), (0 >= i || 0 > h) && en() > 1 ? (r = u, 0 > h && u >
63 pt.x && (r = pt.x)) : ie.min.x !== ie.max.x && (o = l)) : (l < ie.max[e] && (n = c.panEndFriction, a = l - ie.max[e], i = fe[e] - ie.max[e]), (0 >= i || h > 0) && en() > 1 ? (r = u, h > 0 && u < pt.x && (r = pt.x)) : ie.min.x !== ie.max.x && (o = l))) : r = u, "x" !== e) ? void (re || Q || T > s.currItem.fitRatio && (me[e] += t[e] * n)) : (void 0 !== r && (Le(r, !0), Q = r !== pt.x), ie.min.x !== ie.max.x && (void 0 !== o ? me.x = o : Q || (me.x += t.x * n)), void 0 !== r) }, Mt = function (e) { if (!("mousedown" === e.type && e.button > 0)) { if (Qt) return void e.preventDefault(); if (!W || "mousedown" !== e.type) { if (xt(e, !0) && e.preventDefault(), we("pointerDown"), S) { var t = r.arraySearch(ht, e.pointerId, "id"); 0 > t && (t = ht.length), ht[t] = { x: e.pageX, y: e.pageY, id: e.pointerId } } var n = Ft(e), i = n.length; J = null, nt(), V && 1 !== i || (V = ae = !0, r.bind(window, g, s), z = de = le = U = Q = Y = G = X = !1, se = null, we("firstTouchStart", n), Fe(fe, me), pe.x = pe.y = 0, Fe(dt, n[0]), Fe(ut, dt), pt.x = Te.x * ve, ft = [{ x: dt.x, y: dt.y }], q = H = xe(), ze(T, !0), Ot(), Dt()), !ee && i > 1 && !re && !Q && (y = T, X = !1, ee = G = !0, pe.y = pe.x = 0, Fe(fe, me), Fe(at, n[0]), Fe(lt, n[1]), St(at, lt, bt), yt.x = Math.abs(bt.x) - me.x, yt.y = Math.abs(bt.y) - me.y, te = ne = It(at, lt)) } } }, Ht = function (e) { if (e.preventDefault(), S) { var t = r.arraySearch(ht, e.pointerId, "id"); if (t > -1) { var n = ht[t]; n.x = e.pageX, n.y = e.pageY } } if (V) { var i = Ft(e); if (se || Y || ee) J = i; else if (Tt.x !== Te.x * ve) se = "h"; else { var o = Math.abs(i[0].x - dt.x) - Math.abs(i[0].y - dt.y); Math.abs(o) >= st && (se = o > 0 ? "h" : "v", J = i) } } }, qt = function () { if (J) { var e = J.length; if (0 !== e) if (Fe(at, J[0]), ct.x = at.x - dt.x, ct.y = at.y - dt.y, ee && e > 1) { if (dt.x = at.x, dt.y = at.y, !ct.x && !ct.y && Ct(J[1], lt)) return; Fe(lt, J[1]), X || (X = !0, we("zoomGestureStarted")); var t = It(at, lt), n = Vt(t); n > s.currItem.initialZoomLevel + s.currItem.initialZoomLevel / 15 && (de = !0); var i = 1, o = Ue(), r = We(); if (o > n) if (c.pinchToClose && !de && y <= s.currItem.initialZoomLevel) { var a = o - n, l = 1 - a / (o / 1.2); Ke(l), we("onPinchClose", l), le = !0 } else i = (o - n) / o, i > 1 && (i = 1), n = o - i * (o / 3); else n > r && (i = (n - r) / (6 * o), i > 1 && (i = 1), n = r + i * o); 0 > i && (i = 0), te = t, St(at, lt, vt), pe.x += vt.x - bt.x, pe.y += vt.y - bt.y, Fe(bt, vt), me.x = Pe("x", n), me.y = Pe("y", n), z = n > T, T = n, Ne() } else { if (!se) return; if (ae && (ae = !1, Math.abs(ct.x) >= st && (ct.x -= J[0].x - ut.x), Math.abs(ct.y) >= st && (ct.y -= J[0].y - ut.y)), dt.x = at.x, dt.y = at.y, 0 === ct.x && 0 === ct.y) return; if ("v" === se && c.closeOnVerticalDrag && !Rt()) { pe.y += ct.y, me.y += ct.y; var d = At(); return U = !0, we("onVerticalDrag", d), Ke(d), void Ne() } Nt(xe(), at.x, at.y), Y = !0, ie = s.currItem.bounds; var u = Bt("x", ct); u || (Bt("y", ct), Be(me), Ne()) } } }, jt = function (e) { if (M.isOldAndroid) { if (W && "mouseup" === e.type) return; e.type.indexOf("touch") > -1 && (clearTimeout(W), W = setTimeout(function () { W = 0 }, 600)) } we("pointerUp"), xt(e, !1) && e.preventDefault(); var t; if (S) { var n = r.arraySearch(ht, e.pointerId, "id"); if (n > -1) if (t = ht.splice(n, 1)[0], navigator.pointerEnabled) t.type = e.pointerType || "mouse"; else { var i = { 4: "mouse", 2: "touch", 3: "pen" }; t.type = i[e.pointerType], t.type || (t.type = e.pointerType || "mouse") } } var o, a = Ft(e), l = a.length; if ("mouseup" === e.type && (l = 0), 2 === l) return J = null, !0; 1 === l && Fe(ut, a[0]), 0 !== l || se || re || (t || ("mouseup" === e.type ? t = { x: e.pageX, y: e.pageY, type: "mouse" } : e.changedTouches && e.changedTouches[0] && (t = { x: e.changedTouches[0].pageX, y: e.changedTouches[0].pageY, type: "touch" })), we("touchRelease", e, t)); var d = -1; if (0 === l && (V = !1, r.unbind(window, g, s), Ot(), ee ? d = 0 : -1 !== Et && (d = xe() - Et)), Et = 1 === l ? xe() : -1, o = -1 !== d && 150 > d ? "zoom" : "swipe", ee && 2 > l && (ee = !1, 1 === l && (o = "zoomPointerUp"), we("zoomGestureEnded")), J = null, Y || X || re || U) if (nt(), j || (j = zt()), j.calculateSwipeSpeed("x"), U) { var u = At(); if (u < c.verticalDragRange) s.close(); else { var h = me.y, p = ce; it("verticalDrag", 0, 1, 300, r.easing.cubic.out, function (e) { me.y = (s.currItem.initialPosition.y - h) * e + h, Ke((1 - p) * e + p), Ne() }), we("onVerticalDrag", 1) } } else { if ((Q || re) && 0 === l) { var f = Wt(o, j); if (f) return; o = "zoomPointerUp" } if (!re) return "swipe" !== o ? void Gt() : void (!Q && T > s.currItem.fitRatio && Ut(j)) } }, zt = function () { var e, t, n = { lastFlickOffset: {}, lastFlickDist: {}, lastFlickSpeed: {}, slowDownRatio: {}, slowDownRatioReverse: {}, speedDecelerationRatio: {}, speedDecelerationRatioAbs: {}, distanceOffset: {}, backAnimDestination: {}, backAnimStarted: {}, calculateSwipeSpeed: function (i) { ft.length > 1 ? (e = xe() - q + 50, t = ft[ft.length - 2][i]) : (e = xe() - H, t = ut[i]), n.lastFlickOffset[i] = dt[i] - t, n.lastFlickDist[i] = Math.abs(n.lastFlickOffset[i]), n.lastFlickDist[i] > 20 ? n.lastFlickSpeed[i] = n.lastFlickOffset[i] / e : n.lastFlickSpeed[i] = 0, Math.abs(n.lastFlickSpeed[i]) < .1 && (n.lastFlickSpeed[i] = 0), n.slowDownRatio[i] = .95, n.slowDownRatioReverse[i] = 1 - n.slowDownRatio[i], n.speedDecelerationRatio[i] = 1 }, calculateOverBoundsAnimOffset: function (e, t) { n.backAnimStarted[e] || (me[e] >
63 ie.min[e] ? n.backAnimDestination[e] = ie.min[e] : me[e] < ie.max[e] && (n.backAnimDestination[e] = ie.max[e]), void 0 !== n.backAnimDestination[e] && (n.slowDownRatio[e] = .7, n.slowDownRatioReverse[e] = 1 - n.slowDownRatio[e], n.speedDecelerationRatioAbs[e] < .05 && (n.lastFlickSpeed[e] = 0, n.backAnimStarted[e] = !0, it("bounceZoomPan" + e, me[e], n.backAnimDestination[e], t || 300, r.easing.sine.out, function (t) { me[e] = t, Ne() })))) }, calculateAnimOffset: function (e) { n.backAnimStarted[e] || (n.speedDecelerationRatio[e] = n.speedDecelerationRatio[e] * (n.slowDownRatio[e] + n.slowDownRatioReverse[e] - n.slowDownRatioReverse[e] * n.timeDiff / 10), n.speedDecelerationRatioAbs[e] = Math.abs(n.lastFlickSpeed[e] * n.speedDecelerationRatio[e]), n.distanceOffset[e] = n.lastFlickSpeed[e] * n.speedDecelerationRatio[e] * n.timeDiff, me[e] += n.distanceOffset[e]) }, panAnimLoop: function () { return Qe.zoomPan && (Qe.zoomPan.raf = A(n.panAnimLoop), n.now = xe(), n.timeDiff = n.now - n.lastNow, n.lastNow = n.now, n.calculateAnimOffset("x"), n.calculateAnimOffset("y"), Ne(), n.calculateOverBoundsAnimOffset("x"), n.calculateOverBoundsAnimOffset("y"), n.speedDecelerationRatioAbs.x < .05 && n.speedDecelerationRatioAbs.y < .05) ? (me.x = Math.round(me.x), me.y = Math.round(me.y), Ne(), void et("zoomPan")) : void 0 } }; return n }, Ut = function (e) { return e.calculateSwipeSpeed("y"), ie = s.currItem.bounds, e.backAnimDestination = {}, e.backAnimStarted = {}, Math.abs(e.lastFlickSpeed.x) <= .05 && Math.abs(e.lastFlickSpeed.y) <= .05 ? (e.speedDecelerationRatioAbs.x = e.speedDecelerationRatioAbs.y = 0, e.calculateOverBoundsAnimOffset("x"), e.calculateOverBoundsAnimOffset("y"), !0) : (tt("zoomPan"), e.lastNow = xe(), void e.panAnimLoop()) }, Wt = function (e, t) { var n; re || (gt = p); var i; if ("swipe" === e) { var o = dt.x - ut.x, a = t.lastFlickDist.x < 10; o > rt && (a || t.lastFlickOffset.x > 20) ? i = -1 : -rt > o && (a || t.lastFlickOffset.x < -20) && (i = 1) } var l; i && (p += i, 0 > p ? (p = c.loop ? en() - 1 : 0, l = !0) : p >= en() && (p = c.loop ? 0 : en() - 1, l = !0), l && !c.loop || (ye += i, ve -= i, n = !0)); var d, u = Te.x * ve, h = Math.abs(u - Tt.x); return n || u > Tt.x == t.lastFlickSpeed.x > 0 ? (d = Math.abs(t.lastFlickSpeed.x) > 0 ? h / Math.abs(t.lastFlickSpeed.x) : 333, d = Math.min(d, 400), d = Math.max(d, 250)) : d = 333, gt === p && (n = !1), re = !0, we("mainScrollAnimStart"), it("mainScroll", Tt.x, u, d, r.easing.cubic.out, Le, function () { nt(), re = !1, gt = -1, (n || gt !== p) && s.updateCurrItem(), we("mainScrollAnimComplete") }), n && s.updateCurrItem(!0), n }, Vt = function (e) { return 1 / ne * e * y }, Gt = function () { var e = T, t = Ue(), n = We(); t > T ? e = t : T > n && (e = n); var i, o = 1, a = ce; return le && !z && !de && t > T ? (s.close(), !0) : (le && (i = function (e) { Ke((o - a) * e + a) }), s.zoomTo(e, 0, 200, r.easing.cubic.out, i), !0) }; Oe("Gestures", { publicMethods: { initGestures: function () { var e = function (e, t, n, i, o) { R = e + t, k = e + n, w = e + i, x = o ? e + o : "" }; S = M.pointerEvent, S && M.touch && (M.touch = !1), S ? navigator.pointerEnabled ? e("pointer", "down", "move", "up", "cancel") : e("MSPointer", "Down", "Move", "Up", "Cancel") : M.touch ? (e("touch", "start", "move", "end", "cancel"), N = !0) : e("mouse", "down", "move", "up"), g = k + " " + w + " " + x, v = R, S && !N && (N = navigator.maxTouchPoints > 1 || navigator.msMaxTouchPoints > 1), s.likelyTouchDevice = N, E[R] = Mt, E[k] = Ht, E[w] = jt, x && (E[x] = E[w]), M.touch && (v += " mousedown", g += " mousemove mouseup", E.mousedown = E[R], E.mousemove = E[k], E.mouseup = E[w]), N || (c.allowPanToNext = !1) } } }); var Xt, Yt, Zt, Qt, Jt, en, tn, nn = function (t, n, i, o) {
64                    Xt && clearTimeout(Xt), Qt = !0, Zt = !0; var a; t.initialLayout ? (a = t.initialLayout, t.initialLayout = null) : a = c.getThumbBoundsFn && c.getThumbBoundsFn(p); var l = i ? c.hideAnimationDuration : c.showAnimationDuration, d = function () {
65                        et("initialZoom"), i ? (s.template.removeAttribute("style"), s.bg.removeAttribute("style")) : (Ke(1), n && (n.style.display = "block"), r.addClass(e, "pswp--animated-in"),
66                            we("initialZoom" + (i ? "OutEnd" : "InEnd"))), o && o(), Qt = !1
67                    }; if (!l || !a || void 0 === a.x) return we("initialZoom" + (i ? "Out" : "In")), T = t.initialZoomLevel, Fe(me, t.initialPosition), Ne(), e.style.opacity = i ? 0 : 1, Ke(1), void (l ? setTimeout(function () { d() }, l) : d()); var u = function () { var n = h, o = !s.currItem.src || s.currItem.loadError || c.showHideOpacity; t.miniImg && (t.miniImg.style.webkitBackfaceVisibility = "hidden"), i || (T = a.w / t.w, me.x = a.x, me.y = a.y - P, s[o ? "template" : "bg"].style.opacity = .001, Ne()), tt("initialZoom"), i && !n && r.removeClass(e, "pswp--animated-in"), o && (i ? r[(n ? "remove" : "add") + "Class"](e, "pswp--animate_opacity") : setTimeout(function () { r.addClass(e, "pswp--animate_opacity") }, 30)), Xt = setTimeout(function () { if (we("initialZoom" + (i ? "Out" : "In")), i) { var s = a.w / t.w, c = { x: me.x, y: me.y }, u = T, h = ce, p = function (t) { 1 === t ? (T = s, me.x = a.x, me.y = a.y - B) : (T = (s - u) * t + u, me.x = (a.x - c.x) * t + c.x, me.y = (a.y - B - c.y) * t + c.y), Ne(), o ? e.style.opacity = 1 - t : Ke(h - t * h) }; n ? it("initialZoom", 0, 1, l, r.easing.cubic.out, p, d) : (p(1), Xt = setTimeout(d, l + 20)) } else T = t.initialZoomLevel, Fe(me, t.initialPosition), Ne(), Ke(1), o ? e.style.opacity = 1 : Ke(1), Xt = setTimeout(d, l + 20) }
67, i ? 25 : 90) }; u()
68                }, on = {}, rn = [], sn = { index: 0, errorMsg: '<div class="pswp__error-msg"><a href="%url%" target="_blank">The image</a> could not be loaded.</div>', forceProgressiveLoading: !1, preload: [1, 1], getNumItemsFn: function () { return Yt.length } }, an = function () { return { center: { x: 0, y: 0 }, max: { x: 0, y: 0 }, min: { x: 0, y: 0 } } }, ln = function (e, t, n) { var i = e.bounds; i.center.x = Math.round((on.x - t) / 2), i.center.y = Math.round((on.y - n) / 2) + e.vGap.top, i.max.x = t > on.x ? Math.round(on.x - t) : i.center.x, i.max.y = n > on.y ? Math.round(on.y - n) + e.vGap.top : i.center.y, i.min.x = t > on.x ? 0 : i.center.x, i.min.y = n > on.y ? e.vGap.top : i.center.y }, cn = function (e, t, n) { if (e.src && !e.loadError) { var i = !n; if (i && (e.vGap || (e.vGap = { top: 0, bottom: 0 }), we("parseVerticalMargin", e)), on.x = t.x, on.y = t.y - e.vGap.top - e.vGap.bottom, i) { var o = on.x / e.w, r = on.y / e.h; e.fitRatio = r > o ? o : r; var s = c.scaleMode; "orig" === s ? n = 1 : "fit" === s && (n = e.fitRatio), n > 1 && (n = 1), e.initialZoomLevel = n, e.bounds || (e.bounds = an()) } if (!n) return; return ln(e, e.w * n, e.h * n), i && n === e.initialZoomLevel && (e.initialPosition = e.bounds.center), e.bounds } return e.w = e.h = 0, e.initialZoomLevel = e.fitRatio = 1, e.bounds = an(), e.initialPosition = e.bounds.center, e.bounds }, dn = function (e, t, n, i, o, r) { t.loadError || i && (t.imageAppended = !0, pn(t, i, t === s.currItem && Ie), n.appendChild(i), r && setTimeout(function () { t && t.loaded && t.placeholder && (t.placeholder.style.display = "none", t.placeholder = null) }, 500)) }, un = function (e) { e.loading = !0, e.loaded = !1; var t = e.img = r.createEl("pswp__img", "img"), n = function () { e.loading = !1, e.loaded = !0, e.loadComplete ? e.loadComplete(e) : e.img = null, t.onload = t.onerror = null, t = null }; return t.onload = n, t.onerror = function () { e.loadError = !0, n() }, t.src = e.src, t }, hn = function (e, t) { return e.src && e.loadError && e.container ? (t && (e.container.innerHTML = ""), e.container.innerHTML = c.errorMsg.replace("%url%", e.src), !0) : void 0 }, pn = function (e, t, n) { if (e.src) { t || (t = e.container.lastChild); var i = n ? e.w : Math.round(e.w * e.fitRatio), o = n ? e.h : Math.round(e.h * e.fitRatio); e.placeholder && !e.loaded && (e.placeholder.style.width = i + "px", e.placeholder.style.height = o + "px"), t.style.width = i + "px", t.style.height = o + "px" } }, fn = function () { if (rn.length) { for (var e, t = 0; t < rn.length; t++)e = rn[t], e.holder.index === e.index && dn(e.index, e.item, e.baseDiv, e.img, !1, e.clearPlaceholder); rn = [] } }; Oe("Controller", { publicMethods: { lazyLoadItem: function (e) { e = De(e); var t = Jt(e); t && (!t.loaded && !t.loading || I) && (we("gettingData", e, t), t.src && un(t)) }, initController: function () { r.extend(c, sn, !0), s.items = Yt = n, Jt = s.getItemAt, en = c.getNumItemsFn, tn = c.loop, en() < 3 && (c.loop = !1), ke("beforeChange", function (e) { var t, n = c.preload, i = null === e ? !0 : e >= 0, o = Math.min(n[0], en()), r = Math.min(n[1], en()); for (t = 1; (i ? r : o) >= t; t++)s.lazyLoadItem(p + t); for (t = 1; (i ? o : r) >= t; t++)s.lazyLoadItem(p - t) }), ke("initialLayout", function () { s.currItem.initialLayout = c.getThumbBoundsFn && c.getThumbBoundsFn(p) }), ke("mainScrollAnimComplete", fn), ke("initialZoomInEnd", fn), ke("destroy", function () { for (var e, t = 0; t < Yt.length; t++)e = Yt[t], e.container && (e.container = null), e.placeholder && (e.placeholder = null), e.img && (e.img = null), e.preloader && (e.preloader = null), e.loadError && (e.loaded = e.loadError = !1); rn = null }) }, getItemAt: function (e) { return e >= 0 && void 0 !== Yt[e] ? Yt[e] : !1 }, allowProgressiveImg: function () { return c.forceProgressiveLoading || !N || c.mouseUsed || screen.width > 1200 }, setContent: function (e, t) { c.loop && (t = De(t)); var n = s.getItemAt(e.index); n && (n.container = null); var i, o = s.getItemAt(t); if (!o) return void (e.el.innerHTML = ""); we("gettingData", t, o), e.index = t, e.item = o; var a = o.container = r.createEl("pswp__zoom-wrap"); if (!o.src && o.html && (o.html.tagName ? a.appendChild(o.html) : a.innerHTML = o.html), hn(o), cn(o, ge), !o.src || o.loadError || o.loaded) o.src && !o.loadError && (i = r.createEl("pswp__img", "img"), i.style.opacity = 1, i.src = o.src, pn(o, i), dn(t, o, a, i, !0)); else { if (o.loadComplete = function (n) { if (d) { if (e && e.index === t) { if (hn(n, !0)) return n.loadComplete = n.img = null, cn(n, ge), Ae(n), void (e.index === p && s.updateCurrZoomItem()); n.imageAppended ? !Qt && n.placeholder && (n.placeholder.style.display = "none", n.placeholder = null) : M.transform && (re || Qt) ? rn.push({ item: n, baseDiv: a, img: n.img, index: t, holder: e, clearPlaceholder: !0 }) : dn(t, n, a, n.img, re || Qt, !0) } n.loadComplete = null, n.img = null, we("imageLoadComplete", t, n) } }, r.features.transform) { var l = "pswp__img pswp__img--placeholder"; l += o.msrc ? "" : " pswp__img--placeholder--blank"; var u = r.createEl(l, o.msrc ? "img" : ""); o.msrc && (u.src = o.msrc), pn(o, u), a.appendChild(u), o.placeholder = u } o.loading || un(o), s.allowProgressiveImg() && (!Zt && M.transform ? rn.push({ item: o, baseDiv: a, img: o.img, index: t, holder: e }) : dn(t, o, a, o.img, !0, !0)) } Zt || t !== p ? Ae(o) : (oe = a.style, nn(o, i || o.img)), e.el.innerHTML = "", e.el.appendChild(a) }, cleanSlide: function (e) { e.img && (e.img.onload = e.img.onerror = null), e.loaded = e.loading = e.img = e.imageAppended = !1 } } }); var mn, gn = {}, vn = function (e, t, n) { var i = document.createEvent("CustomEvent"), o = { origEvent: e, target: e.target, releasePoint: t, pointerType: n || "touch" }; i.initCustomEvent("pswpTap", !0, !0, o), e.target.dispatchEvent(i) }; Oe("Tap", { publicMethods: { initTap: function () { ke("firstTouchStart", s.onTapStart), ke("touchRelease", s.onTapRelease), ke("destroy", function () { gn = {}, mn = null }) }, onTapStart: function (e) { e.length > 1 && (clearTimeout(mn), mn = null) }, onTapRelease: function (e, t) { if (t && !Y && !G && !Je) { var n = t; if (mn && (clearTimeout(mn), mn = null, _t(n, gn))) return void we("doubleTap", n); if ("mouse" === t.type) return void vn(e, t, "mouse"); var i = e.target.tagName.toUpperCase(); if ("BUTTON" === i || r.hasClass(e.target, "pswp__single-tap")) return void vn(e, t); Fe(gn, n), mn = setTimeout(function () { vn(e, t), mn = null }, 300) } } } }); var En; Oe("DesktopZoom", { publicMethods: { initDesktopZoom: function () { F || (N ? ke("mou
68seUsed", function () { s.setupDesktopZoom() }) : s.setupDesktopZoom(!0)) }, setupDesktopZoom: function (t) { En = {}; var n = "wheel mousewheel DOMMouseScroll"; ke("bindEvents", function () { r.bind(e, n, s.handleMouseWheel) }), ke("unbindEvents", function () { En && r.unbind(e, n, s.handleMouseWheel) }), s.mouseZoomedIn = !1; var i, o = function () { s.mouseZoomedIn && (r.removeClass(e, "pswp--zoomed-in"), s.mouseZoomedIn = !1), 1 > T ? r.addClass(e, "pswp--zoom-allowed") : r.removeClass(e, "pswp--zoom-allowed"), a() }, a = function () { i && (r.removeClass(e, "pswp--dragging"), i = !1) }; ke("resize", o), ke("afterChange", o), ke("pointerDown", function () { s.mouseZoomedIn && (i = !0, r.addClass(e, "pswp--dragging")) }), ke("pointerUp", a), t || o() }, handleMouseWheel: function (e) { if (T <= s.currItem.fitRatio) return c.modal && (!c.closeOnScroll || Je || V ? e.preventDefault() : K && Math.abs(e.deltaY) > 2 && (h = !0, s.close())), !0; if (e.stopPropagation(), En.x = 0, "deltaX" in e) 1 === e.deltaMode ? (En.x = 18 * e.deltaX, En.y = 18 * e.deltaY) : (En.x = e.deltaX, En.y = e.deltaY); else if ("wheelDelta" in e) e.wheelDeltaX && (En.x = -.16 * e.wheelDeltaX), e.wheelDeltaY ? En.y = -.16 * e.wheelDeltaY : En.y = -.16 * e.wheelDelta; else { if (!("detail" in e)) return; En.y = e.detail } ze(T, !0); var t = me.x - En.x, n = me.y - En.y; (c.modal || t <= ie.min.x && t >= ie.max.x && n <= ie.min.y && n >= ie.max.y) && e.preventDefault(), s.panTo(t, n) }, toggleDesktopZoom: function (t) { t = t || { x: ge.x / 2 + Ee.x, y: ge.y / 2 + Ee.y }; var n = c.getDoubleTapZoom(!0, s.currItem), i = T === n; s.mouseZoomedIn = !i, s.zoomTo(i ? s.currItem.initialZoomLevel : n, t, 333), r[(i ? "remove" : "add") + "Class"](e, "pswp--zoomed-in") } } }); var Tn, yn, bn, Cn, _n, In, On, Dn, Rn, kn, wn, xn, Kn = { history: !0, galleryUID: 1 }, Sn = function () { return wn.hash.substring(1) }, Nn = function () { Tn && clearTimeout(Tn), bn && clearTimeout(bn) }, An = function () { var e = Sn(), t = {}; if (e.length < 5) return t; var n, i = e.split("&"); for (n = 0; n < i.length; n++)if (i[n]) { var o = i[n].split("="); o.length < 2 || (t[o[0]] = o[1]) } if (c.galleryPIDs) { var r = t.pid; for (t.pid = 0, n = 0; n < Yt.length; n++)if (Yt[n].pid === r) { t.pid = n; break } } else t.pid = parseInt(t.pid, 10) - 1; return t.pid < 0 && (t.pid = 0), t }, $n = function Bn() { if (bn && clearTimeout(bn), Je || V) return void (bn = setTimeout(Bn, 500)); Cn ? clearTimeout(yn) : Cn = !0; var e = p + 1, t = Jt(p); t.hasOwnProperty("pid") && (e = t.pid); var n = On + "&gid=" + c.galleryUID + "&pid=" + e; Dn || -1 === wn.hash.indexOf(n) && (kn = !0); var i = wn.href.split("#")[0] + "#" + n; xn ? "#" + n !== window.location.hash && history[Dn ? "replaceState" : "pushState"]("", document.title, i) : Dn ? wn.replace(i) : wn.hash = n, Dn = !0, yn = setTimeout(function () { Cn = !1 }, 60) }; Oe("History", { publicMethods: { initHistory: function () { if (r.extend(c, Kn, !0), c.history) { wn = window.location, kn = !1, Rn = !1, Dn = !1, On = Sn(), xn = "pushState" in history, On.indexOf("gid=") > -1 && (On = On.split("&gid=")[0], On = On.split("?gid=")[0]), ke("afterChange", s.updateURL), ke("unbindEvents", function () { r.unbind(window, "hashchange", s.onHashChange) }); var e = function () { In = !0, Rn || (kn ? history.back() : On ? wn.hash = On : xn ? history.pushState("", document.title, wn.pathname + wn.search) : wn.hash = ""), Nn() }; ke("unbindEvents", function () { h && e() }), ke("destroy", function () { In || e() }), ke("firstUpdate", function () { p = An().pid }); var t = On.indexOf("pid="); t > -1 && (On = On.substring(0, t), "&" === On.slice(-1) && (On = On.slice(0, -1))), setTimeout(function () { d && r.bind(window, "hashchange", s.onHashChange) }, 40) } }, onHashChange: function () { return Sn() === On ? (Rn = !0, void s.close()) : void (Cn || (_n = !0, s.goTo(An().pid), _n = !1)) }, updateURL: function () { Nn(), _n || (Dn ? Tn = setTimeout($n, 800) : $n()) } } }), r.extend(s, ot)
69            }; return e
70        })
71    }, {}], 3: [function (e, t, n) { "use strict";
71 function i(e) { return e && e.__esModule ? e : { "default": e } } function o(e) { function t(t) { var n = h(t).slideSelector; return t.find(n).map(function (t) { var n = e(this).data("index", t), i = this.tagName.toUpperCase(); return "A" === i ? this.hash ? n = e(this.hash) : (n = n.find("img").eq(0), n.data("original-src", this.href)) : "IMG" !== i && (n = n.find("img")), n[0] }) } function n(e) { return function (t) { var n = e.eq(t), i = n.offset(), o = n[0].width; return { x: i.left, y: i.top, w: o } } } function i(t, n) { var i = e.Deferred(), o = n.data("original-src-" + t); return o ? i.resolve(o) : e("<img>").on("load", function () { i.resolve(this[t]) }).attr("src", n.attr("src")), i.promise() } function o(e) { return i("height", e) } function s(e) { return i("width", e) } function l(t) { var n = decodeURI(t.data("original-src") || t.attr("src")), i = n.match(/(\d+)[*\xd7x](\d+)/); if (null !== i) { var a = function () { var t = e.Deferred(); return setTimeout(function () { t.resolve(Number(i[1]), Number(i[2])) }, 0), { v: t.promise() } }(); if ("object" === ("undefined" == typeof a ? "undefined" : r(a))) return a.v } return e.when(s(t), o(t)) } function d() { var t = e(this), n = t.data("original-src") || t.attr("src"), i = e.Deferred(); return "IMG" !== this.tagName ? i.resolve({ html: this.innerHTML }) : l(t).done(function (e, o) { i.resolve({ w: e, h: o, src: n, msrc: t.attr("src"), title: t.attr("alt") }) }), i.promise() } function u(t) { var n = t.map(d).get(), i = e.Deferred(); return e.when.apply(e, n).done(function () { var e = Array.prototype.slice.call(arguments); i.resolve(e) }), i.promise() } function h(e) { return e.data("photoswipeOptions") } function p(e) { e.data("pswp-uid") || e.data("pswp-uid", b++) } function f(t, i, o, r) { var s = e.extend(h(i).globalOptions, { index: t, getThumbBoundsFn: n(o), galleryUID: i.data("pswp-uid") }), l = new a["default"](y[0], c["default"], r, s); e.each(h(i).events, function (e, t) { l.listen(e, t) }), l.init() } function m() { var e = window.location.hash.substring(1), t = {}; if (e.length < 5) return t; for (var n = e.split("&"), i = 0; i < n.length; i++)if (n[i]) { var o = n[i].split("="); o.length < 2 || (t[o[0]] = parseInt(o[1], 10)) } return t } function g(e) { var n = m(); n.pid && n.gid && !function () { var i = e[n.gid - 1], o = n.pid - 1, r = t(i), s = u(r); s.done(function (e) { f(o, i, r, e) }) }() } function v(t, n, i) { t.on("click.photoswipe", h(t).slideSelector, function (o) { o.preventDefault(), f(e(this).data("index"), t, n, i) }) } function E(e) { e.off("click.photoswipe") } function T(e) { var n = t(e), i = u(n); i.done(function (t) { E(e), v(e, n, t) }) } var y = e('<div class="pswp" tabindex="-1" role="dialog" aria-hidden="true"><div class="pswp__bg"></div><div class="pswp__scroll-wrap"><div class="pswp__container"><div class="pswp__item"></div><div class="pswp__item"></div><div class="pswp__item"></div></div><div class="pswp__ui pswp__ui--hidden"><div class="pswp__top-bar"><div class="pswp__counter"></div><button class="pswp__button pswp__button--close" title="Close (Esc)"></button> <button class="pswp__button pswp__button--share" title="Share"></button> <button class="pswp__button pswp__button--fs" title="Toggle fullscreen"></button> <button class="pswp__button pswp__button--zoom" title="Zoom in/out"></button><div class="pswp__preloader"><div class="pswp__preloader__icn"><div class="pswp__preloader__cut"><div class="pswp__preloader__donut"></div></div></div></div></div><div class="pswp__share-modal pswp__share-modal--hidden pswp__single-tap"><div class="pswp__share-tooltip"></div></div><button class="pswp__button pswp__button--arrow--left" title="Previous (arrow left)"></button> <button class="pswp__button pswp__button--arrow--right" title="Next (arrow right)"></button><div class="pswp__caption"><div class="pswp__caption__center"></div></div></div></div></div>').appendTo("body"), b = 1; e.fn.photoSwipe = function () { var n = arguments.length <= 0 || void 0 === arguments[0] ? "img" : arguments[0], i = arguments.length <= 1 || void 0 === arguments[1] ? {}
vendor: 24,314 bytes, lines 71-76
71 : arguments[1], o = arguments.length <= 2 || void 0 === arguments[2] ? {} : arguments[2], r = { bgOpacity: .973, showHideOpacity: !0 }, s = e.extend(r, i), a = [], l = "update" === n; return this.each(function () { if (l) return void T(e(this)); var i = e(this).data("photoswipeOptions", { slideSelector: n, globalOptions: s, events: o }), r = t(i), c = u(r); p(i), a.push(i), c.done(function (e) { v(i, r, e) }) }), l || g(a), this }, e.fn.photoSwipe.PhotoSwipe = a["default"] } Object.defineProperty(n, "__esModule", { value: !0 }), n.PhotoSwipe = n["default"] = void 0; var r = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (e) { return typeof e } : function (e) { return e && "function" == typeof Symbol && e.constructor === Symbol ? "symbol" : typeof e }, s = e("/Applications/MAMP/htdocs/jquery.photoswipe/node_modules/photoswipe/dist/photoswipe.js"), a = i(s), l = e("/Applications/MAMP/htdocs/jquery.photoswipe/node_modules/photoswipe/dist/photoswipe-ui-default.js"), c = i(l); o(jQuery), n["default"] = o, n.PhotoSwipe = a["default"] }, { "/Applications/MAMP/htdocs/jquery.photoswipe/node_modules/photoswipe/dist/photoswipe-ui-default.js": 1, "/Applications/MAMP/htdocs/jquery.photoswipe/node_modules/photoswipe/dist/photoswipe.js": 2 }]
72}, {}, [3]), function () { var e = function (e, n) { function i() { this.constructor = e } for (var o in n) t.call(n, o) && (e[o] = n[o]); return i.prototype = n.prototype, e.prototype = new i, e.__super__ = n.prototype, e }, t = {}.hasOwnProperty; this.ImagesGallery = function (t) { function n() { return n.__super__.constructor.apply(this, arguments) } return e(n, t), n.prototype.init = function () { return this.$dom.photoSwipe() }, n }(Behaviour) }.call(this), function (e, t, n, i) {
73    function o(t, n) { this.settings = null, this.options = e.extend({}, o.Defaults, n), this.$element = e(t), this._handlers = {}, this._plugins = {}, this._supress = {}, this._current = null, this._speed = null, this._coordinates = [], this._breakpoint = null, this._width = null, this._items = [], this._clones = [], this._mergers = [], this._widths = [], this._invalidated = {}, this._pipe = [], this._drag = { time: null, target: null, pointer: null, stage: { start: null, current: null }, direction: null }, this._states = { current: {}, tags: { initializing: ["busy"], animating: ["busy"], dragging: ["interacting"] } }, e.each(["onResize", "onThrottledResize"], e.proxy(function (t, n) { this._handlers[n] = e.proxy(this[n], this) }, this)), e.each(o.Plugins, e.proxy(function (e, t) { this._plugins[e.charAt(0).toLowerCase() + e.slice(1)] = new t(this) }, this)), e.each(o.Workers, e.proxy(function (t, n) { this._pipe.push({ filter: n.filter, run: e.proxy(n.run, this) }) }, this)), this.setup(), this.initialize() } o.Defaults = { items: 3, loop: !1, center: !1, rewind: !1, mouseDrag: !0, touchDrag: !0, pullDrag: !0, freeDrag: !1, margin: 0, stagePadding: 0, merge: !1, mergeFit: !0, autoWidth: !1, startPosition: 0, rtl: !1, smartSpeed: 250, fluidSpeed: !1, dragEndSpeed: !1, responsive: {}, responsiveRefreshRate: 200, responsiveBaseElement: t, fallbackEasing: "swing", info: !1, nestedItemSelector: !1, itemElement: "div", stageElement: "div", refreshClass: "owl-refresh", loadedClass: "owl-loaded", loadingClass: "owl-loading", rtlClass: "owl-rtl", responsiveClass: "owl-responsive", dragClass: "owl-drag", itemClass: "owl-item", stageClass: "owl-stage", stageOuterClass: "owl-stage-outer", grabClass: "owl-grab" }, o.Width = { Default: "default", Inner: "inner", Outer: "outer" }, o.Type = { Event: "event", State: "state" }, o.Plugins = {}, o.Workers = [{ filter: ["width", "settings"], run: function () { this._width = this.$element.width() } }, { filter: ["width", "items", "settings"], run: function (e) { e.current = this._items && this._items[this.relative(this._current)] } }, { filter: ["items", "settings"], run: function () { this.$stage.children(".cloned").remove() } }, { filter: ["width", "items", "settings"], run: function (e) { var t = this.settings.margin || "", n = !this.settings.autoWidth, i = this.settings.rtl, o = { width: "auto", "margin-left": i ? t : "", "margin-right": i ? "" : t }; !n && this.$stage.children().css(o), e.css = o } }, { filter: ["width", "items", "settings"], run: function (e) { var t = (this.width() / this.settings.items).toFixed(3) - this.settings.margin, n = null, i = this._items.length, o = !this.settings.autoWidth, r = []; for (e.items = { merge: !1, width: t }; i--;)n = this._mergers[i], n = this.settings.mergeFit && Math.min(n, this.settings.items) || n, e.items.merge = n > 1 || e.items.merge, r[i] = o ? t * n : this._items[i].width(); this._widths = r } }, { filter: ["items", "settings"], run: function () { var t = [], n = this._items, i = this.settings, o = Math.max(2 * i.items, 4), r = 2 * Math.ceil(n.length / 2), s = i.loop && n.length ? i.rewind ? o : Math.max(o, r) : 0, a = "", l = ""; for (s /= 2; s--;)t.push(this.normalize(t.length / 2, !0)), a += n[t[t.length - 1]][0].outerHTML, t.push(this.normalize(n.length - 1 - (t.length - 1) / 2, !0)), l = n[t[t.length - 1]][0].outerHTML + l; this._clones = t, e(a).addClass("cloned").appendTo(this.$stage), e(l).addClass("cloned").prependTo(this.$stage) } }, { filter: ["width", "items", "settings"], run: function () { for (var e = this.settings.rtl ? 1 : -1, t = this._clones.length + this._items.length, n = -1, i = 0, o = 0, r = []; ++n < t;)i = r[n - 1] || 0, o = this._widths[this.relative(n)] + this.settings.margin, r.push(i + o * e); this._coordinates = r } }, { filter: ["width", "items", "settings"], run: function () { var e = this.settings.stagePadding, t = this._coordinates, n = { width: Math.ceil(Math.abs(t[t.length - 1])) + 2 * e, "padding-left": e || "", "padding-right": e || "" }; this.$stage.css(n) } }, { filter: ["width", "items", "settings"], run: function (e) { var t = this._coordinates.length, n = !this.settings.autoWidth, i = this.$stage.children(); if (n && e.items.merge) for (; t--;)e.css.width = this._widths[this.relative(t)], i.eq(t).css(e.css); else n && (e.css.width = e.items.width, i.css(e.css)) } }, { filter: ["items"], run: function () { this._coordinates.length < 1 && this.$stage.removeAttr("style") } }, { filter: ["width", "items", "settings"], run: function (e) { e.current = e.current ? this.$stage.children().index(e.current) : 0, e.current = Math.max(this.minimum(), Math.min(this.maximum(), e.current)), this.reset(e.current) } }, { filter: ["position"], run: function () { this.animate(this.coordinates(this._current)) } }, { filter: ["width", "position", "items", "settings"], run: function () { var e, t, n, i, o = this.settings.rtl ? 1 : -1, r = 2 * this.settings.stagePadding, s = this.coordinates(this.current()) + r, a = s + this.width() * o, l = []; for (n = 0, i = this._coordinates.length; i > n; n++)e = this._coordinates[n - 1] || 0, t = Math.abs(this._coordinates[n]) + r * o, (this.op(e, "<=", s) && this.op(e, ">", a) || this.op(t, "<", s) && this.op(t, ">", a)) && l.push(n); this.$stage.children(".active").removeClass("active"), this.$stage.children(":eq(" + l.join("), :eq(") + ")").addClass("active"), this.settings.center && (this.$stage.children(".center").removeClass("center"), this.$stage.children().eq(this.current()).addClass("center")) } }], o.prototype.initialize = function () { if (this.enter("initializing"), this.trigger("initialize"), this.$element.toggleClass(this.settings.rtlClass, this.settings.rtl), this.settings.autoWidth && !this.is("pre-loading")) { var t, n, o; t = this.$element.find("img"), n = this.settings.nestedItemSelector ? "." + this.settings.nestedItemSelector : i, o = this.$element.children(n).width(), t.length && 0 >= o && this.preloadAutoWidthImages(t) } this.$element.addClass(this.options.loadingClass), this.$stage = e("<" + this.settings.stageElement + ' class="' + this.settings.stageClass + '"/>').wrap('<div class="' + this.settings.stageOuterClass + '"/>'), this.$element.append(this.$stage.parent()), this.replace(this.$element.children().not(this.$stage.parent())), this.$element.is(":visible") ? this.refresh() : this.invalidate("width"), this.$element.removeClass(this.options.loadingClass).addClass(this.options.loadedClass), this.registerEventHandlers(), this.leave("initializing"), this.trigger("initialized") }, o.prototype.setup = function () { var t = this.viewport(), n = this.options.responsive, i = -1, o = null; n ? (e.each(n, function (e) { t >= e && e > i && (i = Number(e)) }), o = e.extend({}, this.options, n[i]), "function" == typeof o.stagePadding && (o.stagePadding = o.stagePadding()), delete o.responsive, o.responsiveClass && this.$element.attr("class", this.$element.attr("class").replace(new RegExp("(" + this.options.responsiveClass + "-)\\S+\\s", "g"), "$1" + i))) : o = e.extend({}, this.options), this.trigger("change", { property: { name: "settings", value: o } }), this._breakpoint = i, this.settings = o, this.invalidate("settings"), this.trigger("changed", { property: { name: "settings", value: this.settings } }) }, o.prototype.optionsLogic = function () { this.settings.autoWidth && (this.settings.stagePadding = !1, this.settings.merge = !1) }, o.prototype.prepare = function (t) { var n = this.trigger("prepare", { content: t }); return n.data || (n.data = e("<" + this.settings.itemElement + "/>").addClass(this.options.itemClass).append(t)), this.trigger("prepared", { content: n.data }), n.data }, o.prototype.update = function () { for (var t = 0, n = this._pipe.length, i = e.proxy(function (e) { return this[e] }, this._invalidated), o = {}; n > t;)(this._invalidated.all || e.grep(this._pipe[t].filter, i).length > 0) && this._pipe[t].run(o), t++; this._invalidated = {}, !this.is("valid") && this.enter("valid") }, o.prototype.width = function (e) { switch (e = e || o.Width.Default) { case o.Width.Inner: case o.Width.Outer: return this._width; default: return this._width - 2 * this.settings.stagePadding + this.settings.margin } }, o.prototype.refresh = function () { this.enter("refreshing"), this.trigger("refresh"), this.setup(), this.optionsLogic(), this.$element.addClass(this.options.refreshClass), this.update(), this.$element.removeClass(this.options.refreshClass), this.leave("refreshing"), this.trigger("refreshed") }, o.prototype.onThrottledResize = function () { t.clearTimeout(this.resizeTimer), this.resizeTimer = t.setTimeout(this._handlers.onResize, this.settings.responsiveRefreshRate) }, o.prototype.onResize = function () { return this._items.length ? this._width === this.$element.width() ? !1 : this.$element.is(":visible") ? (this.enter("resizing"), this.trigger("resize").isDefaultPrevented() ? (this.leave("resizing"), !1) : (this.invalidate("width"), this.refresh(), this.leave("resizing"), void this.trigger("resized"))) : !1 : !1 }, o.prototype.registerEventHandlers = function () { e.support.transition && this.$stage.on(e.support.transition.end + ".owl.core", e.proxy(this.onTransitionEnd, this)), this.settings.responsive !== !1 && this.on(t, "resize", this._handlers.onThrottledResize), this.settings.mouseDrag && (this.$element.addClass(this.options.dragClass), this.$stage.on("mousedown.owl.core", e.proxy(this.onDragStart, this)), this.$stage.on("dragstart.owl.core selectstart.owl.core", function () { return !1 })), this.settings.touchDrag && (this.$stage.on("touchstart.owl.core", e.proxy(this.onDragStart, this)), this.$stage.on("touchcancel.owl.core", e.proxy(this.onDragEnd, this))) }, o.prototype.onDragStart = function (t) { var i = null; 3 !== t.which && (e.support.transform ? (i = this.$stage.css("transform").replace(/.*\(|\)| /g, "").split(","), i = { x: i[16 === i.length ? 12 : 4], y: i[16 === i.length ? 13 : 5] }) : (i = this.$stage.position(), i = { x: this.settings.rtl ? i.left + this.$stage.width() - this.width() + this.settings.margin : i.left, y: i.top }), this.is("animating") && (e.support.transform ? this.animate(i.x) : this.$stage.stop(), this.invalidate("position")), this.$element.toggleClass(this.options.grabClass, "mousedown" === t.type), this.speed(0), this._drag.time = (new Date).getTime(), this._drag.target = e(t.target), this._drag.stage.start = i, this._drag.stage.current = i, this._drag.pointer = this.pointer(t), e(n).on("mouseup.owl.core touchend.owl.core", e.proxy(this.onDragEnd, this)), e(n).one("mousemove.owl.core touchmove.owl.core", e.proxy(function (t) { var i = this.difference(this._drag.pointer, this.pointer(t)); e(n).on("mousemove.owl.core touchmove.owl.core", e.proxy(this.onDragMove, this)), Math.abs(i.x) < Math.abs(i.y) && this.is("valid") || (t.preventDefault(), this.enter("dragging"), this.trigger("drag")) }, this))) }, o.prototype.onDragMove = function (e) { var t = null, n = null, i = null, o = this.difference(this._drag.pointer, this.pointer(e)), r = this.difference(this._drag.stage.start, o); this.is("dragging") && (e.preventDefault(), this.settings.loop ? (t = this.coordinates(this.minimum()), n = this.coordinates(this.maximum() + 1) - t, r.x = ((r.x - t) % n + n) % n + t) : (t = this.settings.rtl ? this.coordinates(this.maximum()) : this.coordinates(this.minimum()), n = this.settings.rtl ? this.coordinates(this.minimum()) : this.coordinates(this.maximum()), i = this.settings.pullDrag ? -1 * o.x / 5 : 0, r.x = Math.max(Math.min(r.x, t + i), n + i)), this._drag.stage.current = r, this.animate(r.x)) }, o.prototype.onDragEnd = function (t) { var i = this.difference(this._drag.pointer, this.pointer(t)), o = this._drag.stage.current, r = i.x > 0 ^ this.settings.rtl ? "left" : "right"; e(n).off(".owl.core"), this.$element.removeClass(this.options.grabClass), (0 !== i.x && this.is("dragging") || !this.is("valid")) && (this.speed(this.settings.dragEndSpeed || this.settings.smartSpeed), this.current(this.closest(o.x, 0 !== i.x ? r : this._drag.direction)), this.invalidate("position"), this.update(), this._drag.direction = r, (Math.abs(i.x) > 3 || (new Date).getTime() - this._drag.time > 300) && this._drag.target.one("click.owl.core", function () { return !1 })), this.is("dragging") && (this.leave("dragging"), this.trigger("dragged")) }, o.prototype.closest = function (t, n) { var i = -1, o = 30, r = this.width(), s = this.coordinates(); return this.settings.freeDrag || e.each(s, e.proxy(function (e, a) { return "left" === n && t > a - o && a + o > t ? i = e : "right" === n && t > a - r - o && a - r + o > t ? i = e + 1 : this.op(t, "<", a) && this.op(t, ">", s[e + 1] || a - r) && (i = "left" === n ? e + 1 : e), -1 === i }, this)), this.settings.loop || (this.op(t, ">", s[this.minimum()]) ? i = t = this.minimum() : this.op(t, "<", s[this.maximum()]) && (i = t = this.maximum())), i }, o.prototype.animate = function (t) { var n = this.speed() > 0; this.is("animating") && this.onTransitionEnd(), n && (this.enter("animating"), this.trigger("translate")), e.support.transform3d && e.support.transition ? this.$stage.css({ transform: "translate3d(" + t + "px,0px,0px)", transition: this.speed() / 1e3 + "s" }) : n ? this.$stage.animate({ left: t + "px" }, this.speed(), this.settings.fallbackEasing, e.proxy(this.onTransitionEnd, this)) : this.$stage.css({ left: t + "px" }) }, o.prototype.is = function (e) { return this._states.current[e] && this._states.current[e] > 0 }, o.prototype.current = function (e) { if (e === i) return this._current; if (0 === this._items.length) return i; if (e = this.normalize(e), this._current !== e) { var t = this.trigger("change", { property: { name: "position", value: e } }); t.data !== i && (e = this.normalize(t.data)), this._current = e, this.invalidate("position"), this.trigger("changed", { property: { name: "position", value: this._current } }) } return this._current }, o.prototype.invalidate = function (t) { return "string" === e.type(t) && (this._invalidated[t] = !0, this.is("valid") && this.leave("valid")), e.map(this._invalidated, function (e, t) { return t }) }, o.prototype.reset = function (e) { e = this.normalize(e), e !== i && (this._speed = 0, this._current = e, this.suppress(["translate", "translated"]), this.animate(this.coordinates(e)), this.release(["translate", "translated"])) }, o.prototype.normalize = function (e, t) { var n = this._items.length, o = t ? 0 : this._clones.length; return !this.isNumeric(e) || 1 > n ? e = i : (0 > e || e >= n + o) && (e = ((e - o / 2) % n + n) % n + o / 2), e }, o.prototype.relative = function (e) { return e -= this._clones.length / 2, this.normalize(e, !0) }, o.prototype.maximum = function (e) { var t, n, i, o = this.settings, r = this._coordinates.length; if (o.loop) r = this._clones.length / 2 + this._items.length - 1; else if (o.autoWidth || o.merge) { for (t = this._items.length, n = this._items[--t].width(), i = this.$element.width(); t-- && (n += this._items[t].width() + this.settings.margin, !(n > i));); r = t + 1 } else r = o.center ? this._items.length - 1 : this._items.length - o.items; return e && (r -= this._clones.length / 2), Math.max(r, 0) }, o.prototype.minimum = function (e) { return e ? 0 : this._clones.length / 2 }, o.prototype.items = function (e) { return e === i ? this._items.slice() : (e = this.normalize(e, !0), this._items[e]) }, o.prototype.mergers = function (e) { return e === i ? this._mergers.slice() : (e = this.normalize(e, !0), this._mergers[e]) }, o.prototype.clones = function (t) { var n = this._clones.length / 2, o = n + this._items.length, r = function (e) { return e % 2 === 0 ? o + e / 2 : n - (e + 1) / 2 }; return t === i ? e.map(this._clones, function (e, t) { return r(t) }) : e.map(this._clones, function (e, n) { return e === t ? r(n) : null }) }, o.prototype.speed = function (e) { return e !== i && (this._speed = e), this._speed }, o.prototype.coordinates = function (t) { var n, o = 1, r = t - 1; return t === i ? e.map(this._coordinates, e.proxy(function (e, t) { return this.coordinates(t) }, this)) : (this.settings.center ? (this.settings.rtl && (o = -1, r = t + 1), n = this._coordinates[t], n += (this.width() - n + (this._coordinates[r] || 0)) / 2 * o) : n = this._coordinates[r] || 0, n = Math.ceil(n)) }, o.prototype.duration = function (e, t, n) { return 0 === n ? 0 : Math.min(Math.max(Math.abs(t - e), 1), 6) * Math.abs(n || this.settings.smartSpeed) }, o.prototype.to = function (e, t) { var n = this.current(), i = null, o = e - this.relative(n), r = (o > 0) - (0 > o), s = this._items.length, a = this.minimum(), l = this.maximum(); this.settings.loop ? (!this.settings.rewind && Math.abs(o) > s / 2 && (o += -1 * r * s), e = n + o, i = ((e - a) % s + s) % s + a, i !== e && l >= i - o && i - o > 0 && (n = i - o, e = i, this.reset(n))) : this.settings.rewind ? (l += 1, e = (e % l + l) % l) : e = Math.max(a, Math.min(l, e)), this.speed(this.duration(n, e, t)), this.current(e), this.$element.is(":visible") && this.update() }, o.prototype.next = function (e) { e = e || !1, this.to(this.relative(this.current()) + 1, e) }, o.prototype.prev = function (e) { e = e || !1, this.to(this.relative(this.current()) - 1, e) }, o.prototype.onTransitionEnd = function (e) { return e !== i && (e.stopPropagation(), (e.target || e.srcElement || e.originalTarget) !== this.$stage.get(0)) ? !1 : (this.leave("animating"), void this.trigger("translated")) }, o.prototype.viewport = function () { var i; if (this.options.responsiveBaseElement !== t) i = e(this.options.responsiveBaseElement).width(); else if (t.innerWidth) i = t.innerWidth; else { if (!n.documentElement || !n.documentElement.clientWidth) throw "Can not detect viewport width."; i = n.documentElement.clientWidth } return i }, o.prototype.replace = function (t) { this.$stage.empty(), this._items = [], t && (t = t instanceof jQuery ? t : e(t)), this.settings.nestedItemSelector && (t = t.find("." + this.settings.nestedItemSelector)), t.filter(function () { return 1 === this.nodeType }).each(e.proxy(function (e, t) { t = this.prepare(t), this.$stage.append(t), this._items.push(t), this._mergers.push(1 * t.find("[data-merge]").addBack("[data-merge]").attr("data-merge") || 1) }, this)), this.reset(this.isNumeric(this.settings.startPosition) ? this.settings.startPosition : 0), this.invalidate("items") }, o.prototype.add = function (t, n) { var o = this.relative(this._current); n = n === i ? this._items.length : this.normalize(n, !0), t = t instanceof jQuery ? t : e(t), this.trigger("add", { content: t, position: n }), t = this.prepare(t), 0 === this._items.length || n === this._items.length ? (0 === this._items.length && this.$stage.append(t), 0 !== this._items.length && this._items[n - 1].after(t), this._items.push(t), this._mergers.push(1 * t.find("[data-merge]").addBack("[data-merge]").attr("data-merge") || 1)) : (this._items[n].before(t), this._items.splice(n, 0, t), this._mergers.splice(n, 0, 1 * t.find("[data-merge]").addBack("[data-merge]").attr("data-merge") || 1)), this._items[o] && this.reset(this._items[o].index()), this.invalidate("items"), this.trigger("added", { content: t, position: n }) }, o.prototype.remove = function (e) { e = this.normalize(e, !0), e !== i && (this.trigger("remove", { content: this._items[e], position: e }), this._items[e].remove(), this._items.splice(e, 1), this._mergers.splice(e, 1), this.invalidate("items"), this.trigger("removed", { content: null, position: e })) }, o.prototype.preloadAutoWidthImages = function (t) { t.each(e.proxy(function (t, n) { this.enter("pre-loading"), n = e(n), e(new Image).one("load", e.proxy(function (e) { n.attr("src", e.target.src), n.css("opacity", 1), this.leave("pre-loading"), !this.is("pre-loading") && !this.is("initializing") && this.refresh() }, this)).attr("src", n.attr("src") || n.attr("data-src") || n.attr("data-src-retina")) }, this)) }, o.prototype.destroy = function () {
74        this.$element.off(".owl.core"),
75            this.$stage.off(".owl.core"), e(n).off(".owl.core"), this.settings.responsive !== !1 && (t.clearTimeout(this.resizeTimer), this.off(t, "resize", this._handlers.onThrottledResize)); for (var i in this._plugins) this._plugins[i].destroy(); this.$stage.children(".cloned").remove(), this.$stage.unwrap(), this.$stage.children().contents().unwrap(), this.$stage.children().unwrap(), this.$element.removeClass(this.options.refreshClass).removeClass(this.options.loadingClass).removeClass(this.options.loadedClass).removeClass(this.options.rtlClass).removeClass(this.options.dragClass).removeClass(this.options.grabClass).attr("class", this.$element.attr("class").replace(new RegExp(this.options.responsiveClass + "-\\S+\\s", "g"), "")).removeData("owl.carousel")
76    }, o.prototype.op = function (e, t, n) { var i = this.settings.rtl; switch (t) { case "<": return i ? e > n : n > e; case ">": return i ? n > e : e > n; case ">=": return i ? n >= e : e >= n; case "<=": return i ? e >= n : n >= e } }, o.prototype.on = function (e, t, n, i) { e.addEventListener ? e.addEventListener(t, n, i) : e.attachEvent && e.attachEvent("on" + t, n) }, o.prototype.off = function (e, t, n, i) { e.removeEventListener ? e.removeEventListener(t, n, i) : e.detachEvent && e.detachEvent("on" + t, n) }, o.prototype.trigger = function (t, n, i) { var r = { item: { count: this._items.length, index: this.current() } }, s = e.camelCase(e.grep(["on", t, i], function (e) { return e }).join("-").toLowerCase()), a = e.Event([t, "owl", i || "carousel"].join(".").toLowerCase(), e.extend({ relatedTarget: this }, r, n)); return this._supress[t] || (e.each(this._plugins, function (e, t) { t.onTrigger && t.onTrigger(a) }), this.register({ type: o.Type.Event, name: t }), this.$element.trigger(a), this.settings && "function" == typeof this.settings[s] && this.settings[s].call(this, a)), a }, o.prototype.enter = function (t) { e.each([t].concat(this._states.tags[t] || []), e.proxy(function (e, t) { this._states.current[t] === i && (this._states.current[t] = 0), this._states.current[t]++ }, this)) }, o.prototype.leave = function (t) { e.each([t].concat(this._states.tags[t] || []), e.proxy(function (e, t) { this._states.current[t]-- }, this)) }, o.prototype.register = function (t) { if (t.type === o.Type.Event) { if (e.event.special[t.name] || (e.event.special[t.name] = {}), !e.event.special[t.name].owl) { var n = e.event.special[t.name]._default; e.event.special[t.name]._default = function (e) { return !n || !n.apply || e.namespace && -1 !== e.
vendor: 16,384 bytes, lines 76-77
76namespace.indexOf("owl") ? e.namespace && e.namespace.indexOf("owl") > -1 : n.apply(this, arguments) }, e.event.special[t.name].owl = !0 } } else t.type === o.Type.State && (this._states.tags[t.name] ? this._states.tags[t.name] = this._states.tags[t.name].concat(t.tags) : this._states.tags[t.name] = t.tags, this._states.tags[t.name] = e.grep(this._states.tags[t.name], e.proxy(function (n, i) { return e.inArray(n, this._states.tags[t.name]) === i }, this))) }, o.prototype.suppress = function (t) { e.each(t, e.proxy(function (e, t) { this._supress[t] = !0 }, this)) }, o.prototype.release = function (t) { e.each(t, e.proxy(function (e, t) { delete this._supress[t] }, this)) }, o.prototype.pointer = function (e) { var n = { x: null, y: null }; return e = e.originalEvent || e || t.event, e = e.touches && e.touches.length ? e.touches[0] : e.changedTouches && e.changedTouches.length ? e.changedTouches[0] : e, e.pageX ? (n.x = e.pageX, n.y = e.pageY) : (n.x = e.clientX, n.y = e.clientY), n }, o.prototype.isNumeric = function (e) { return !isNaN(parseFloat(e)) }, o.prototype.difference = function (e, t) { return { x: e.x - t.x, y: e.y - t.y } }, e.fn.owlCarousel = function (t) { var n = Array.prototype.slice.call(arguments, 1); return this.each(function () { var i = e(this), r = i.data("owl.carousel"); r || (r = new o(this, "object" == typeof t && t), i.data("owl.carousel", r), e.each(["next", "prev", "to", "destroy", "refresh", "replace", "add", "remove"], function (t, n) { r.register({ type: o.Type.Event, name: n }), r.$element.on(n + ".owl.carousel.core", e.proxy(function (e) { e.namespace && e.relatedTarget !== this && (this.suppress([n]), r[n].apply(this, [].slice.call(arguments, 1)), this.release([n])) }, r)) })), "string" == typeof t && "_" !== t.charAt(0) && r[t].apply(r, n) }) }, e.fn.owlCarousel.Constructor = o
77}(window.Zepto || window.jQuery, window, document), function (e, t) { var n = function (t) { this._core = t, this._interval = null, this._visible = null, this._handlers = { "initialized.owl.carousel": e.proxy(function (e) { e.namespace && this._core.settings.autoRefresh && this.watch() }, this) }, this._core.options = e.extend({}, n.Defaults, this._core.options), this._core.$element.on(this._handlers) }; n.Defaults = { autoRefresh: !0, autoRefreshInterval: 500 }, n.prototype.watch = function () { this._interval || (this._visible = this._core.$element.is(":visible"), this._interval = t.setInterval(e.proxy(this.refresh, this), this._core.settings.autoRefreshInterval)) }, n.prototype.refresh = function () { this._core.$element.is(":visible") !== this._visible && (this._visible = !this._visible, this._core.$element.toggleClass("owl-hidden", !this._visible), this._visible && this._core.invalidate("width") && this._core.refresh()) }, n.prototype.destroy = function () { var e, n; t.clearInterval(this._interval); for (e in this._handlers) this._core.$element.off(e, this._handlers[e]); for (n in Object.getOwnPropertyNames(this)) "function" != typeof this[n] && (this[n] = null) }, e.fn.owlCarousel.Constructor.Plugins.AutoRefresh = n }(window.Zepto || window.jQuery, window, document), function (e, t, n, i) { var o = function (t) { this._core = t, this._loaded = [], this._handlers = { "initialized.owl.carousel change.owl.carousel resized.owl.carousel": e.proxy(function (t) { if (t.namespace && this._core.settings && this._core.settings.lazyLoad && (t.property && "position" == t.property.name || "initialized" == t.type)) for (var n = this._core.settings, o = n.center && Math.ceil(n.items / 2) || n.items, r = n.center && -1 * o || 0, s = (t.property && t.property.value !== i ? t.property.value : this._core.current()) + r, a = this._core.clones().length, l = e.proxy(function (e, t) { this.load(t) }, this); r++ < o;)this.load(a / 2 + this._core.relative(s)), a && e.each(this._core.clones(this._core.relative(s)), l), s++ }, this) }, this._core.options = e.extend({}, o.Defaults, this._core.options), this._core.$element.on(this._handlers) }; o.Defaults = { lazyLoad: !1 }, o.prototype.load = function (n) { var i = this._core.$stage.children().eq(n), o = i && i.find(".owl-lazy"); !o || e.inArray(i.get(0), this._loaded) > -1 || (o.each(e.proxy(function (n, i) { var o, r = e(i), s = t.devicePixelRatio > 1 && r.attr("data-src-retina") || r.attr("data-src"); this._core.trigger("load", { element: r, url: s }, "lazy"), r.is("img") ? r.one("load.owl.lazy", e.proxy(function () { r.css("opacity", 1), this._core.trigger("loaded", { element: r, url: s }, "lazy") }, this)).attr("src", s) : (o = new Image, o.onload = e.proxy(function () { r.css({ "background-image": "url(" + s + ")", opacity: "1" }), this._core.trigger("loaded", { element: r, url: s }, "lazy") }, this), o.src = s) }, this)), this._loaded.push(i.get(0))) }, o.prototype.destroy = function () { var e, t; for (e in this.handlers) this._core.$element.off(e, this.handlers[e]); for (t in Object.getOwnPropertyNames(this)) "function" != typeof this[t] && (this[t] = null) }, e.fn.owlCarousel.Constructor.Plugins.Lazy = o }(window.Zepto || window.jQuery, window, document), function (e) { var t = function (n) { this._core = n, this._handlers = { "initialized.owl.carousel refreshed.owl.carousel": e.proxy(function (e) { e.namespace && this._core.settings.autoHeight && this.update() }, this), "changed.owl.carousel": e.proxy(function (e) { e.namespace && this._core.settings.autoHeight && "position" == e.property.name && this.update() }, this), "loaded.owl.lazy": e.proxy(function (e) { e.namespace && this._core.settings.autoHeight && e.element.closest("." + this._core.settings.itemClass).index() === this._core.current() && this.update() }, this) }, this._core.options = e.extend({}, t.Defaults, this._core.options), this._core.$element.on(this._handlers) }; t.Defaults = { autoHeight: !1, autoHeightClass: "owl-height" }, t.prototype.update = function () { var t = this._core._current, n = t + this._core.settings.items, i = this._core.$stage.children().toArray().slice(t, n), o = [], r = 0; e.each(i, function (t, n) { o.push(e(n).height()) }), r = Math.max.apply(null, o), this._core.$stage.parent().height(r).addClass(this._core.settings.autoHeightClass) }, t.prototype.destroy = function () { var e, t; for (e in this._handlers) this._core.$element.off(e, this._handlers[e]); for (t in Object.getOwnPropertyNames(this)) "function" != typeof this[t] && (this[t] = null) }, e.fn.owlCarousel.Constructor.Plugins.AutoHeight = t }(window.Zepto || window.jQuery, window, document), function (e, t, n) { var i = function (t) { this._core = t, this._videos = {}, this._playing = null, this._handlers = { "initialized.owl.carousel": e.proxy(function (e) { e.namespace && this._core.register({ type: "state", name: "playing", tags: ["interacting"] }) }, this), "resize.owl.carousel": e.proxy(function (e) { e.namespace && this._core.settings.video && this.isInFullScreen() && e.preventDefault() }, this), "refreshed.owl.carousel": e.proxy(function (e) { e.namespace && this._core.is("resizing") && this._core.$stage.find(".cloned .owl-video-frame").remove() }, this), "changed.owl.carousel": e.proxy(function (e) { e.namespace && "position" === e.property.name && this._playing && this.stop() }, this), "prepared.owl.carousel": e.proxy(function (t) { if (t.namespace) { var n = e(t.content).find(".owl-video"); n.length && (n.css("display", "none"), this.fetch(n, e(t.content))) } }, this) }, this._core.options = e.extend({}, i.Defaults, this._core.options), this._core.$element.on(this._handlers), this._core.$element.on("click.owl.video", ".owl-video-play-icon", e.proxy(function (e) { this.play(e) }, this)) }; i.Defaults = { video: !1, videoHeight: !1, videoWidth: !1 }, i.prototype.fetch = function (e, t) { var n = function () { return e.attr("data-vimeo-id") ? "vimeo" : e.attr("data-vzaar-id") ? "vzaar" : "youtube" }(), i = e.attr("data-vimeo-id") || e.attr("data-youtube-id") || e.attr("data-vzaar-id"), o = e.attr("data-width") || this._core.settings.videoWidth, r = e.attr("data-height") || this._core.settings.videoHeight, s = e.attr("href"); if (!s) throw new Error("Missing video URL."); if (i = s.match(/(http:|https:|)\/\/(player.|www.|app.)?(vimeo\.com|youtu(be\.com|\.be|be\.googleapis\.com)|vzaar\.com)\/(video\/|videos\/|embed\/|channels\/.+\/|groups\/.+\/|watch\?v=|v\/)?([A-Za-z0-9._%-]*)(\&\S+)?/), i[3].indexOf("youtu") > -1) n = "youtube"; else if (i[3].indexOf("vimeo") > -1) n = "vimeo"; else { if (!(i[3].indexOf("vzaar") > -1)) throw new Error("Video URL not supported."); n = "vzaar" } i = i[6], this._videos[s] = { type: n, id: i, width: o, height: r }, t.attr("data-video", s), this.thumbnail(e, this._videos[s]) }, i.prototype.thumbnail = function (t, n) { var i, o, r, s = n.width && n.height ? 'style="width:' + n.width + "px;height:" + n.height + 'px;"' : "", a = t.find("img"), l = "src", c = "", d = this._core.settings, u = function (e) { o = '<div class="owl-video-play-icon"></div>', i = d.lazyLoad ? '<div class="owl-video-tn ' + c + '" ' + l + '="' + e + '"></div>' : '<div class="owl-video-tn" style="opacity:1;background-image:url(' + e + ')"></div>', t.after(i), t.after(o) }; return t.wrap('<div class="owl-video-wrapper"' + s + "></div>"), this._core.settings.lazyLoad && (l = "data-src", c = "owl-lazy"), a.length ? (u(a.attr(l)), a.remove(), !1) : void ("youtube" === n.type ? (r = "//img.youtube.com/vi/" + n.id + "/hqdefault.jpg", u(r)) : "vimeo" === n.type ? e.ajax({ type: "GET", url: "//vimeo.com/api/v2/video/" + n.id + ".json", jsonp: "callback", dataType: "jsonp", success: function (e) { r = e[0].thumbnail_large, u(r) } }) : "vzaar" === n.type && e.ajax({ type: "GET", url: "//vzaar.com/api/videos/" + n.id + ".json", jsonp: "callback", dataType: "jsonp", success: function (e) { r = e.framegrab_url, u(r) } })) }, i.prototype.stop = function () { this._core.trigger("stop", null, "video"), this._playing.find(".owl-video-frame").remove(), this._playing.removeClass("owl-video-playing"), this._playing = null, this._core.leave("playing"), this._core.trigger("stopped", null, "video") }, i.prototype.play = function (t) { var n, i = e(t.target), o = i.closest("." + this._core.settings.itemClass), r = this._videos[o.attr("data-video")], s = r.width || "100%", a = r.height || this._core.$stage.height(); this._playing || (this._core.enter("playing"), this._core.trigger("play", null, "video"), o = this._core.items(this._core.relative(o.index())), this._core.reset(o.index()), "youtube" === r.type ? n = '<iframe width="' + s + '" height="' + a + '" src="//www.youtube.com/embed/' + r.id + "?autoplay=1&v=" + r.id + '" frameborder="0" allowfullscreen></iframe>' : "vimeo" === r.type ? n = '<iframe src="//player.vimeo.com/video/' + r.id + '?autoplay=1" width="' + s + '" height="' + a + '" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>' : "vzaar" === r.type && (n = '<iframe frameborder="0"height="' + a + '"width="' + s + '" allowfullscreen mozallowfullscreen webkitAllowFullScreen src="//view.vzaar.com/' + r.id + '/player?autoplay=true"></iframe>'), e('<div class="owl-video-frame">' + n + "</div>").insertAfter(o.find(".owl-video")), this._playing = o.addClass("owl-video-playing")) }, i.prototype.isInFullScreen = function () { var t = n.fullscreenElement || n.mozFullScreenElement || n.webkitFullscreenElement; return t && e(t).parent().hasClass("owl-video-frame") }, i.prototype.destroy = function () { var e, t; this._core.$element.off("click.owl.video"); for (e in this._handlers) this._core.$element.off(e, this._handlers[e]); for (t in Object.getOwnPropertyNames(this)) "function" != typeof this[t] && (this[t] = null) }, e.fn.owlCarousel.Constructor.Plugins.Video = i }(window.Zepto || window.jQuery, window, document), function (e, t, n, i) { var o = function (t) { this.core = t, this.core.options = e.extend({}, o.Defaults, this.core.options), this.swapping = !0, this.previous = i, this.next = i, this.handlers = { "change.owl.carousel": e.proxy(function (e) { e.namespace && "position" == e.property.name && (this.previous = this.core.current(), this.next = e.property.value) }, this), "drag.owl.carousel dragged.owl.carousel translated.owl.carousel": e.proxy(function (e) { e.namespace && (this.swapping = "translated" == e.type) }, this), "translate.owl.carousel": e.proxy(function (e) { e.namespace && this.swapping && (this.core.options.animateOut || this.core.options.animateIn) && this.swap() }, this) }, this.core.$element.on(this.handlers) }; o.Defaults = { animateOut: !1, animateIn: !1 }, o.prototype.swap = function () { if (1 === this.core.settings.items && e.support.animation && e.support.transition) { this.core.speed(0); var t, n = e.proxy(this.clear, this), i = this.core.$stage.children().eq(this.previous), o = this.core.$stage.children().eq(this.next), r = this.core.settings.animateIn, s = this.core.settings.animateOut; this.core.current() !== this.previous && (s && (t = this.core.coordinates(this.previous) - this.core.coordinates(this.next), i.one(e.support.animation.end, n).css({ left: t + "px" }).addClass("animated owl-animated-out").addClass(s)), r && o.one(e.support.animation.end, n).addClass("animated owl-animated-in").addClass(r)) } }, o.prototype.clear = function (t) { e(t.target).css({ left: "" }).removeClass("animated owl-animated-out owl-animated-in").removeClass(this.core.settings.animateIn).removeClass(this.core.settings.animateOut), this.core.onTransitionEnd() }, o.prototype.destroy = function () { var e, t; for (e in this.handlers) this.core.$element.off(e, this.handlers[e]); for (t in Object.getOwnPropertyNames(this)) "function" != typeof this[t] && (this[t] = null) }, e.fn.owlCarousel.Constructor.Plugins.Animate = o }(window.Zepto || window.jQuery, window, document), function (e, t, n) { var i = function (t) { this._core = t, this._timeout = null, this._paused = !1, this._handlers = { "changed.owl.carousel": e.proxy(function (e) { e.namespace && "settings" === e.property.name ? this._core.settings.autoplay ? this.play() : this.stop() : e.namespace && "position" === e.property.name && this._core.settings.autoplay && this._setAutoPlayInterval() }, this), "initialized.owl.carousel": e.proxy(function (e) { e.namespace && this._core.settings.autoplay && this.play() }, this), "play.owl.autoplay": e.proxy(function (e, t, n) { e.namespace && this.play(t, n) }, this), "stop.owl.autoplay": e.proxy(function (e) { e.namespace && this.stop() }, this), "mouseover.owl.autoplay": e.proxy(function () { this._core.settings.autoplayHoverPause && this._core.is("rotating") && this.pause() }, this), "mouseleave.owl.autoplay": e.proxy(function () { this._core.settings.autoplayHoverPause && this._core.is("rotating") && this.play() }, this), "touchstart.owl.core": e.proxy(function () { this._core.settings.autoplayHoverPause && this._core.is("rotating") && this.pause() }, this), "touchend.owl.core": e.proxy(function () { this._core.settings.autoplayHoverPause && this.play() }, this) }, this._core.$element.on(this._handlers), this._core.options = e.extend({}, i.Defaults, this._core.options) }; i.Defaults = { autoplay: !1, autoplayTimeout: 5e3, autoplayHoverPause: !1, autoplaySpeed: !1 }, i.prototype.play = function () { this._paused = !1, this._core.is("rotating") || (this._core.enter("rotating"), this._setAutoPlayInterval()) }, i.prototype._getNextTimeout = function (i, o) { return this._timeout && t.clearTimeout(this._timeout), t.setTimeout(e.proxy(function () { this._paused || this._core.is("busy") || this._core.is("interacting") || n.hidden || this._core.next(o || this._core.settings.autoplaySpeed) }, this), i || this._core.settings.autoplayTimeout) }, i.prototype._setAutoPlayInterval = function () { this._timeout = this._getNextTimeout() }, i.prototype.stop = function () { this._core.is("rotating") && (t.clearTimeout(this._timeout), this._core.leave("rotating")) }, i.prototype.pause = function () { this._core.is("rotating") && (this._paused = !0) }, i.prototype.destroy = function () { var e, t; this.stop(); for (e in this._handlers) this._core.$element.off(e, this._handlers[e]); for (t in Object.getOwnPropertyNames(this)) "function" != typeof this[t] && (this[t] = null) }, e.fn.owlCarousel.Constructor.Plugins.autoplay = i }(window.Zepto || window.jQuery, window, document), function (e) { "use strict"; var t = function (n) { this._core = n, this._initialized =
77 !1, this._pages = [], this._controls = {}, this._templates = [], this.$element = this._core.$element, this._overrides = { next: this._core.next, prev: this._core.prev, to: this._core.to }, this._handlers = { "prepared.owl.carousel": e.proxy(function (t) { t.namespace && this._core.settings.dotsData && this._templates.push('<div class="' + this._core.settings.dotClass + '">' + e(t.content).find("[data-dot]").addBack("[data-dot]").attr("data-dot") + "</div>") }, this), "added.owl.carousel": e.proxy(function (e) { e.namespace && this._core.settings.dotsData && this._templates.splice(e.position, 0, this._templates.pop()) }, this), "remove.owl.carousel": e.proxy(function (e) { e.namespace && this._core.settings.dotsData && this._templates.splice(e.position, 1) }, this), "changed.owl.carousel": e.proxy(function (e) { e.namespace && "position" == e.property.name && this.draw() }, this), "initialized.owl.carousel": e.proxy(function (e) { e.namespace && !this._initialized && (this._core.trigger("initialize", null, "navigation"), this.initialize(), this.update(), this.draw(), this._initialized = !0, this._core.trigger("initialized", null, "navigation")) }, this), "refreshed.owl.carousel": e.proxy(function (e) { e.namespace && this._initialized && (this._core.trigger("refresh", null, "navigation"), this.update(), this.draw(), this._core.trigger("refreshed", null, "navigation")) }, this) }, this._core.options = e.extend({}, t.Defaults, this._core.options), this.$element.on(this._handlers) }; t.Defaults = { nav: !1, navText: ["prev", "next"], navSpeed: !1, navElement: "div", navContainer: !1, navContainerClass: "owl-nav", navClass: ["owl-prev", "owl-next"], slideBy: 1, dotClass: "owl-dot", dotsClass: "owl-dots", dots: !0, dotsEach: !1, dotsData: !1, dotsSpeed: !1, dotsContainer: !1 }, t.prototype.initialize = function () { var t, n = this._core.settings; this._controls.$relative = (n.navContainer ? e(n.navContainer) : e("<div>").addClass(n.navContainerClass).appendTo(this.$element)).addClass("disabled"), this._controls.$previous = e("<" + n.navElement + ">").addClass(n.navClass[0]).html(n.navText[0]).prependTo(this._controls.$relative).on("click", e.proxy(function () { this.prev(n.navSpeed) }, this)), this._controls.$next = e("<" + n.navElement + ">").addClass(n.navClass[1]).html(n.navText[1]).appendTo(this._controls.$relative).on("click", e.proxy(function () { this.next(n.navSpeed) }, this)), n.dotsData || (this._templates = [e("<div>").addClass(n.dotClass).append(e("<span>")).prop("outerHTML")]), this._controls.$absolute = (n.dotsContainer ? e(n.dotsContainer) : e("<div>").addClass(n.dotsClass).appendTo(this.$element)).addClass("disabled"), this._controls.$absolute.on("click", "div", e.proxy(function (t) { var i = e(t.target).parent().is(this._controls.$absolute) ? e(t.target).index() : e(t.target).parent().index(); t.preventDefault(), this.to(i, n.dotsSpeed) }, this)); for (t in this._overrides) this._core[t] = e.proxy(this[t], this) }, t.prototype.destroy = function () { var e, t, n, i; for (e in this._handlers) this.$element.off(e, this._handlers[e]); for (t in this._controls) this._controls[t].remove(); for (i in this.overides) this._core[i] = this._overrides[i]; for (n in Object.getOwnPropertyNames(this)) "function" != typeof this[n] && (this[n] = null) }, t.prototype.update = function () { var e, t, n, i = this._core.clones().length / 2, o = i + this._core.items().length, r = this._core.maximum(!0), s = this._core.settings, a = s.center || s.autoWidth || s.dotsData ? 1 : s.dotsEach || s.items; if ("page" !== s.slideBy && (s.slideBy = Math.min(s.slideBy, s.items)), s.dots || "page" == s.slideBy) for (this._pages = [], e = i, t = 0, n = 0; o > e; e++) { if (t >= a || 0 === t) { if (this._pages.push({ start: Math.min(r, e - i), end: e - i + a - 1 }), Math.min(r, e - i) === r) break; t = 0, ++n } t += this._core.mergers(this._core.relative(e)) } }, t.prototype.draw = function () { var t, n = this._core.settings, i = this._core.items().length <= n.items, o = this._core.relative(this._core.current()), r = n.loop || n.rewind; this._controls.$relative.toggleClass("disabled", !n.nav || i), n.nav && (this._controls.$previous.toggleClass("disabled", !r && o <= this._core.minimum(!0)), this._controls.$next.toggleClass("disabled", !r && o >= this._core.maximum(!0))), this._controls.$absolute.toggleClass("disabled", !n.dots || i), n.dots && (t = this._pages.length - this._controls.$absolute.children().length, n.dotsData && 0 !== t ? this._controls.$absolute.html(this._templates.join("")) : t > 0 ? this._controls.$absolute.append(new Array(t + 1).join(this._templates[0])) : 0 > t && this._controls.$absolute.children().slice(t).remove(), this._controls.$absolute.find(".active").removeClass("active"), this._controls.$absolute.children().eq(e.inArray(this.current(), this._pages)).addClass("active")) }, t.prototype.onTrigger = function (t) { var n = this._core.settings; t.page = { index: e.inArray(this.current(), this._pages), count: this._pages.length, size: n && (n.center || n.autoWidth || n.dotsData ? 1 : n.dotsEach || n.items) } }, t.prototype.current = function () { var t = this._core.relative(this._core.current()); return e.grep(this._pages, e.proxy(function (e) { return e.start <= t && e.end >= t }, this)).pop() }, t.prototype.getPosition = function (t) { var n, i, o = this._core.settings; return "page" == o.slideBy ? (n = e.inArray(this.current(), this._pages), i = this._pages.length, t ? ++n : --n, n = this._pages[(n % i + i) % i].start) : (n = this._core.relative(this._core.current()), i = this._core.items().length, t ? n += o.slideBy : n -= o.slideBy), n }, t.prototype.next = function (t) { e.proxy(this._overrides.to, this._core)(this.getPosition(!0), t) }, t.prototype.prev = function (t) { e.proxy(this._overrides.to, this._core)(this.getPosition(!1), t) }, t.prototype.to = function (t, n, i) { var o; !i && this._pages.length ? (o = this._pages.length, e.proxy(this._overrides.to, this._core)(this._pages[(t % o + o) % o].start, n)) : e.proxy(this._overrides.to, this._core)(t, n) }, e.fn.owlCarousel.Constructor.Plugins.Navigation = t }(window.Zepto || window.jQuery, window, document), function (e, t, n, i) { "use strict"; var o = function (n) { this._core = n, this._hashes = {}, this.$element = this._core.$element, this._handlers = { "initialized.owl.carousel": e.proxy(function (n) { n.namespace && "URLHash" === this._core.settings.startPosition && e(t).trigger("hashchange.owl.navigation") }, this), "prepared.owl.carousel": e.proxy(function (t) { if (t.namespace) { var n = e(t.content).find("[data-hash]").addBack("[data-hash]").attr("data-hash"); if (!n) return; this._hashes[n] = t.content } }, this), "changed.owl.carousel": e.proxy(function (n) { if (n.namespace && "position" === n.property.name) { var i = this._core.items(this._core.relative(this._core.current())), o = e.map(this._hashes, function (e, t) { return e === i ? t : null }).join(); if (!o || t.location.hash.slice(1) === o) return; t.location.hash = o } }, this) }, this._core.options = e.extend({}, o.Defaults, this._core.options), this.$element.on(this._handlers), e(t).on("hashchange.owl.navigation", e.proxy(function () { var e = t.location.hash.substring(1), n = this._core.$stage.children(), o = this._hashes[e] && n.index(this._hashes[e]); o !== i && o !== this._core.current() && this._core.to(this._core.relative(o), !1, !0) }, this)) }; o.Defaults = { URLhashListener: !1 }, o.prototype.destroy = function () { var n, i; e(t).off("hashchange.owl.navigation"); for (n in this._handlers) this._core.$element.off(n, this._handlers[n]); for (i in Object.getOwnPropertyNames(this)) "function" != typeof this[i] && (this[i] = null) }, e.fn.owlCarousel.Constructor.Plugins.Hash = o }(window.Zepto || window.jQuery, window, document), function (e, t, n, i) { function o(t, n) { var o = !1, r = t.charAt(0).toUpperCase() + t.slice(1); return e.each((t + " " + a.join(r + " ") + r).split(" "), function (e, t) { return s[t] !== i ? (o = n ? t : !0, !1) : void 0 }), o } function r(e) { return o(e, !0) } var s = e("<support>").get(0).style, a = "Webkit Moz O ms".split(" "), l = { transition: { end: { WebkitTransition: "webkitTransitionEnd", MozTransition: "transitionend", OTransition: "oTransitionEnd", transition: "transitionend" } }, animation: { end: { WebkitAnimation: "webkitAnimationEnd", MozAnimation: "animationend", OAnimation: "oAnimationEnd", animation: "animationend" } } }, c = { csstransforms: function () { return !!o("transform") }, csstransforms3d: function () { return !!o("perspective") }, csstransitions: function () { return !!o("transition") }, cssanimations: function () { return !!o("animation") } }; c.csstransitions() && (e.support.transition = new String(r("transition")), e.support.transition.end = l.transition.end[e.support.transition]), c.cssanimations() && (e.support.animation = new String(r("animation")), e.support.animation.end = l.animation.end[e.support.animation]), c.csstransforms() && (e.support.transform = new String(r("transform")), e.support.transform3d = c.csstransforms3d()) }(window.Zepto || window.jQuery, window, document), function () { var e = function (e, n) { function i() { this.constructor = e } for (var o in n) t.call(n, o) && (e[o] = n[o]); return i.prototype = n.prototype, e.prototype = new i, e.__super__ = n.prototype, e }, t = {}.hasOwnProperty; this.ImagesSlider = function (t) { function n() { return n.__super__.constructor.apply(this, arguments) } return e(n, t), n.prototype.init = function () { return this.$dom.addClass("owl-carousel"), this.$container = this.$dom.closest(".post-preview__tabs-content__item"), this.$dom.find("img[data-src]").each(function () { return $(this).attr("src", $(this).data("src")) }), this.$dom.imagesLoaded(this.initOwlCarousel.bind(this)) }, n.prototype.initOwlCarousel = function () { return this.$dom.owlCarousel(this.sliderOptions()) }, n.prototype.sliderOptions = function () { return { navText: ["", ""], nav: !0, margin: 20, autoWidth: !0, lazyLoad: !1 } }, n }(Behaviour) }.call(this), function () { var e = function (e, n) { function i() { this.constructor = e } for (var o in n) t.call(n, o) && (e[o] = n[o]); return i.prototype = n.prototype, e.prototype = new i, e.__super__ = n.prototype, e }, t = {}.hasOwnProperty; this.LabelShifter = function (t) { function n() { return n.__super__.constructor.apply(this, arguments) } return e(n, t), n.prototype.init = function () { return this.$input = this.$dom.find("input"), this.$label = this.$dom.find("label"), this.$input.focusin(function (e) { return function () { return e.moveLabel() } }(this)).focusout(function (e) { return function () { return e.$input.val().length <= 0 ? e.resetLabel() : void 0 } }(this)).change(function (e) { return function () { return e.$input.val().length > 0 ? e.moveLabel() : void 0 } }(this)), this.$input.val().length > 0 ? this.moveLabel() : void 0 }, n.prototype.moveLabel = function () { return this.$label.addClass("is-filled") }, n.prototype.resetLabel = function () { return this.$label.removeClass("is-filled") }, n }(Behaviour) }.call(this), function (e) { function t(t, n, i) { var r = { container: e.document.body, offset: 0, debounce: 15, failsafe: !0 }; void 0 !== n && "function" != typeof n || (i = n, n = {}); for (var s = r.container = n.container || r.container, l = r.offset = n.offset || r.offset, c = r.debounce = n.debounce || r.debounce, d = r.failsafe = n.failsafe || r.failsafe, u = 0; u < a.length; u++)if (a[u].container === s && a[u]._debounce === c && a[u]._failsafe === d) return a[u].isInViewport(t, l, i); return a[a.push(o(s, c, d)) - 1].isInViewport(t, l, i) } function n(e, t, n) { e.attachEvent ? e.attachEvent("on" + t, n) : e.addEventListener(t, n, !1) } function i(e, t, n) { var i; return function () { function o() { i = null, n || e.apply(r, s) } var r = this, s = arguments, a = n && !i; clearTimeout(i), i = setTimeout(o, t), a && e.apply(r, s) } } function o(t, o, a) { function d(e, t, n) { if (!n) return p(e, t); var i = u(e, t, n); return i.watch(), i } function u(e, t, n) { function i() { f.add(e, t, n) } function o() { f.remove(e) }
77 return { watch: i, dispose: o } } function h(e, t, n) { p(e, t) && (f.remove(e), n(e)) } function p(n, i) { if (!n) return !1; if (!c(e.document.documentElement, n) || !c(e.document.documentElement, t)) return !1; if (!n.offsetWidth || !n.offsetHeight) return !1; var o = n.getBoundingClientRect(), r = {}; if (t === e.document.body) r = { top: -i, left: -i, right: e.document.documentElement.clientWidth + i, bottom: e.document.documentElement.clientHeight + i }; else { var s = t.getBoundingClientRect(); r = { top: s.top - i, left: s.left - i, right: s.right + i, bottom: s.bottom + i } } var a = o.right >= r.left && o.left <= r.right && o.bottom >= r.top && o.top <= r.bottom; return a } var f = r(), m = t === e.document.body ? e : t, g = i(f.checkAll(h), o); return n(m, "scroll", g), m === e && n(e, "resize", g), l && s(f, t, g), a && setInterval(g, 150), { container: t, isInViewport: d, _debounce: o, _failsafe: a } } function r() { function e(e, t, n) { i(e) || r.push([e, t, n]) } function t(e) { var t = n(e); -1 !== t && r.splice(t, 1) } function n(e) { for (var t = r.length - 1; t >= 0; t--)if (r[t][0] === e) return t; return -1 } function i(e) { return -1 !== n(e) } function o(e) { return function () { for (var t = r.length - 1; t >= 0; t--)e.apply(this, r[t]) } } var r = []; return { add: e, remove: t, isWatched: i, checkAll: o } } function s(e, t, n) { function i(e) { e.some(o) === !0 && setTimeout(n, 0) } function o(t) { var n = a.call([], Array.prototype.slice.call(t.addedNodes), t.target); return s.call(n, e.isWatched).length > 0 } var r = new MutationObserver(i), s = Array.prototype.filter, a = Array.prototype.concat; r.observe(t, { childList: !0, subtree: !0, attributes: !0 }) } var a = [], l = "function" == typeof e.MutationObserver; e.inViewport = t; var c = function () { return e.document ? e.document.documentElement.compareDocumentPosition ? function (e, t) { return !!(16 & e.compareDocumentPosition(t)) } : e.document.documentElement.contains ? function (e, t) { return e !== t && (e.contains ? e.contains(t) : !1) } : function (e, t) { for (; t = t.parentNode;)if (t === e) return !0; return !1 } : !0 } }(window), function () { var e = function (e, n) { function i() { this.constructor = e } for (var o in n) t.call(n, o) && (e[o] = n[o]); return i.prototype = n.prototype, e.prototype = new i, e.__super__ = n.prototype, e }, t = {}.hasOwnProperty; this.LazyBehaviour = function (t) { function n(e, t, n) { this.dom = e, this.className = t, this.options = null != n ? n : {}, this.$dom = $(this.dom), this.$dom.data(this.className) || (this.$dom.data(this.className, !0), inViewport(this.dom, function (e) { return function () { return e.init() } }(this))) } return e(n, t), n }(Behaviour) }.call(this), function () { var e = function (e, n) { function i() { this.constructor = e } for (var o in n) t.call(n, o) && (e[o] = n[o]); return i.prototype = n.prototype, e.prototype = new i, e.__super__ = n.prototype, e }, t = {}.hasOwnProperty; this.LazyImage = function (t) { function n() { return n.__super__.constructor.apply(this, arguments) } return e(n, t), n.prototype.init = function () { return this.$dom.replaceWith($("<img />").attr("src", this.$dom.data("url"))) }, n }(LazyBehaviour) }.call(this), function () { var e = function (e, n) { function i() { this.constructor = e } for (var o in n) t.call(n, o) && (e[o] = n[o]); return i.prototype = n.prototype, e.prototype = new i, e.__super__ = n.prototype, e }, t = {}.hasOwnProperty; this.LazyShow = function (t) { function n() { return n.__super__.constructor.apply(this, arguments) } return e(n, t), n.prototype.init = function () { return this.$dom.addClass("is-activated"), this.$dom.children().show(), this.$dom.find("[data-delayed-style]").each(function () { return this.el = $(this), this.style.cssText = this.el.data("delayed-style") }) }, n }(LazyBehaviour) }.call(this), function () {
78    var e = function (e, n) { function i() { this.constructor = e } for (var o in n) t.call(n, o) && (e[o] = n[o]); return i.prototype = n.prototype, e.prototype = new i, e.__super__ = n.prototype, e }, t = {}.hasOwnProperty; this.TabHandler = function (t) {
79        function n() { return n.__super__.constructor.apply(this, arguments) } return e(n, t), n.prototype.init = function () { return this.initLinks(), this.hideClass = this.data("class-hidden") || "tabs__tab--hidden", this.hideAllTabs(), this.disableOnMobile && this.isMobile() ? this.allHandles().length > 0 ? this.openTab($(this.allHandles()[0])) : void 0 : (this.$dom.find(".
79is-active").length > 0 ? this.$dom.find(".is-active").trigger("click") : this.allHandles().first().trigger("click"), $(document).on("cocoon:after-insert", function (e) { return function () { return e.initLinks(), $(".is-active").trigger("click") } }(this))) }, n.prototype.disableOnMobile = function () { return !0 }, n.prototype.allHandles = function () { return this.$dom.find("a[data-target]") }, n.prototype.allContents = function () { return this.allHandles().map(function () { return function (e, t) { return $(t).data("target") } }(this)).map(function () { return function (e, t) { return $(t) } }(this)) }, n.prototype.initLinks = function () { return this.allHandles().off("click").on("click", this.switchTab.bind(this)) }, n.prototype.hideAllTabs = function () { return this.allContents().each(function (e) { return function (t, n) { return $(n).addClass(e.hideClass) } }(this)), this.allHandles().removeClass("is-active") }, n.prototype.switchTab = function (e) { var t; return e.preventDefault(), this.hideAllTabs(), t = $(e.currentTarget), this.openTab(t) }, n.prototype.openTab = function (e) {
80            var t, n; return e.addClass("is-active"), t = $(e.data("target")), t.removeClass(this.hideClass), n = t.attr("id"), !n || 0 !== n.indexOf("tabs-gallery") && 0 !== n.indexOf("tabs-shop") ? void 0 : setTimeout(function () {
81                return new ImagesSlider(t.find(".post-preview__slider").get(0), "ImagesSlider")
82            }, 100)
83        }, n
84    }(Behaviour)
85}.call(this), function () { var e = function (e, t) { return function () { return e.apply(t, arguments) } }, t = function (e, t) { function i() { this.constructor = e } for (var o in t) n.call(t, o) && (e[o] = t[o]); return i.prototype = t.prototype, e.prototype = new i, e.__super__ = t.prototype, e }, n = {}.hasOwnProperty; this.LocaleTabHandler = function (n) { function i() { return this.switchTab = e(this.switchTab, this), i.__super__.constructor.apply(this, arguments) } return t(i, n), i.prototype.tabs = function () { return this.$dom.find("li[data-locale]") }, i.prototype.switchTab = function (e) { var t, n; return i.__super__.switchTab.call(this, e), this.tabs().removeClass("active"), t = $(e.currentTarget), n = t.closest("li[data-locale]"), n.addClass("active") }, i.prototype.disableOnMobile = function () { return !1 }, i }(this.TabHandler) }.call(this), function () { var e = function (e, n) { function i() { this.constructor = e } for (var o in n) t.call(n, o) && (e[o] = n[o]); return i.prototype = n.prototype, e.prototype = new i, e.__super__ = n.prototype, e }, t = {}.hasOwnProperty; this.MainNavToggler = function (t) { function n() { return n.__super__.constructor.apply(this, arguments) } return e(n, t), n.prototype.init = function () { return this.$dom.click(function () { return function (e) { return e.preventDefault(), $(".site-body").toggleClass("has-overlay"), $("#main-nav").toggleClass("is-visible"), $(".overlay").toggleClass("is-visible") } }(this)), $(".overlay, .aside-nav__header__closer").click(function () { return function (e) { return e.preventDefault(), $(".site-body").removeClass("has-overlay"), $("#main-nav").removeClass("is-visible"), $(".overlay").removeClass("is-visible") } }(this)) }, n }(Behaviour) }.call(this), function () { var e = function (e, n) { function i() { this.constructor = e } for (var o in n) t.call(n, o) && (e[o] = n[o]); return i.prototype = n.prototype, e.prototype = new i, e.__super__ = n.prototype, e }, t = {}.hasOwnProperty; this.MenuTabHandler = function (t) { function n() { return n.__super__.constructor.apply(this, arguments) } return e(n, t), n.prototype.init = function () { return this.initLinks(), this.hideClass = this.data("class-hidden") || "tabs__tab--hidden", this.hideAllTabs(), this.disableOnMobile && this.isMobile() ? this.allHandles().length > 0 ? this.openTab($(this.allHandles()[0])) : void 0 : (this.$dom.find(".is-active").length > 0 ? this.$dom.find(".is-active").trigger("mouseover") : this.allHandles().first().trigger("mouseover"), $(document).on("cocoon:after-insert", function (e) { return function () { return e.initLinks(), $(".is-active").trigger("mouseover") } }(this))) }, n.prototype.disableOnMobile = function () { return !0 }, n.prototype.allHandles = function () { return this.$dom.find("a[data-target]") }, n.prototype.allContents = function () { return this.allHandles().map(function () { return function (e, t) { return $(t).data("target") } }(this)).map(function () { return function (e, t) { return $(t) } }(this)) }, n.prototype.initLinks = function () { return this.allHandles().off("mouseover").on("mouseover", this.switchTab.bind(this)).on("click", this.navigateIfDesktop.bind(this)) }, n.prototype.hideAllTabs = function () { return this.allContents().each(function (e) { return function (t, n) { return $(n).addClass(e.hideClass) } }(this)), this.allHandles().removeClass("is-active") }, n.prototype.switchTab = function (e) { return e.preventDefault(), this.hideAllTabs(), this.openTab($(e.currentTarget)) }, n.prototype.openTab = function (e) { var t; return e.addClass("is-active"), t = $(e.data("target")), t.removeClass(this.hideClass), t.hasClass("js-lazy-load") ? (t.removeClass("js-lazy-load"), console.log("Lazy load for " + t.attr("id")), t.find("img[data-src]").each(function () { return function (e, t) { var n; return n = $(t), n.attr("src", n.data("src")), n.removeAttr("width"), n.removeAttr("height") } }(this))) : void 0 }, n.prototype.navigateIfDesktop = function (e) { var t, n; return e.preventDefault(), (t = $("html").hasClass("touch")) ? void 0 : (n = $(e.currentTarget).data("href"), window.location = n) }, n }(Behaviour) }.call(this), function () { var e = function (e, n) { function i() { this.constructor = e } for (var o in n) t.call(n, o) && (e[o] = n[o]); return i.prototype = n.prototype, e.prototype = new i, e.__super__ = n.prototype, e }, t = {}.hasOwnProperty; this.MoreCategoriesToggler = function (t) { function n() { return n.__super__.constructor.apply(this, arguments) } return e(n, t), n.prototype.init = function () { return this.$dom.click(function (e) { return function (t) { return t.preventDefault(), t.stopPropagation(), $(".aside-nav__content__list__item").removeClass("visible--on-lap"), e.$dom.parent().toggleClass("hidden") } }(this)) }, n }(Behaviour) }.call(this), function () { var e = function (e, n) { function i() { this.constructor = e } for (var o in n) t.call(n, o) && (e[o] = n[o]); return i.prototype = n.prototype, e.prototype = new i, e.__super__ = n.prototype, e }, t = {}.hasOwnProperty; this.MoveElement = function (t) { function n() { return n.__super__.constructor.apply(this, arguments) } return e(n, t), n.prototype.init = function () { var e, t; return e = this.data("sibling"), e && (t = $(e), 0 !== t.length) ? (this.$dom.removeAttr("data-sibling"), this.$dom.detach(), $(t[0]).after(this.$dom)) : void 0 }, n }(Behaviour) }.call(this), function () { var e = function (e, n) { function i() { this.constructor = e } for (var o in n) t.call(n, o) && (e[o] = n[o]); return i.prototype = n.prototype, e.prototype = new i, e.__super__ = n.prototype, e }, t = {}.hasOwnProperty; this.MultiLocaleSession = function (t) { function n() { return n.__super__.constructor.apply(this, arguments) } return e(n, t), n.prototype.init = function () { return this.initMultiLocaleSession() }, n.prototype.initMultiLocaleSession = function () { var e, t; return $("li[data-locale]").on("click", this.handleMultiLocaleSession), $("#js-multi-locale-input").length > 0 && (t = $("#js-multi-locale-input"), e = this.getMultiLocaleSession(t), e.length > 0) ? e.trigger("click") : void 0 }, n.prototype.handleMultiLocaleSession = function (e) { var t, n; return t = $(e.currentTarget), n = t.closest("li[data-locale]"), $("#js-multi-locale-input").val(n.attr("data-locale")) }, n.prototype.getMultiLocaleSession = function (e) { return "" === e.val() ? $("li[data-locale] a")[0] : $("li[data-locale][data-locale=" + e.val() + "] a") }, n }(Behaviour) }.call(this), function (e) { "function" == typeof define && define.amd ? define(["jquery"], e) : e("object" == typeof exports ? require("jquery") : jQuery) }(function (e) {
86    var t = function () {
87        if (e && e.fn && e.fn.select2 && e.fn.select2.amd) var t = e.fn.select2.amd; var t; return function () { if (!t || !t.requirejs) { t ? n = t : t = {}; var e, n, i;
vendor: 27,102 bytes, line 87
87 !function (t) { function o(e, t) { return y.call(e, t) } function r(e, t) { var n, i, o, r, s, a, l, c, d, u, h, p = t && t.split("/"), f = E.map, m = f && f["*"] || {}; if (e && "." === e.charAt(0)) if (t) { for (e = e.split("/"), s = e.length - 1, E.nodeIdCompat && C.test(e[s]) && (e[s] = e[s].replace(C, "")), e = p.slice(0, p.length - 1).concat(e), d = 0; d < e.length; d += 1)if (h = e[d], "." === h) e.splice(d, 1), d -= 1; else if (".." === h) { if (1 === d && (".." === e[2] || ".." === e[0])) break; d > 0 && (e.splice(d - 1, 2), d -= 2) } e = e.join("/") } else 0 === e.indexOf("./") && (e = e.substring(2)); if ((p || m) && f) { for (n = e.split("/"), d = n.length; d > 0; d -= 1) { if (i = n.slice(0, d).join("/"), p) for (u = p.length; u > 0; u -= 1)if (o = f[p.slice(0, u).join("/")], o && (o = o[i])) { r = o, a = d; break } if (r) break; !l && m && m[i] && (l = m[i], c = d) } !r && l && (r = l, a = c), r && (n.splice(0, a, r), e = n.join("/")) } return e } function s(e, n) { return function () { var i = b.call(arguments, 0); return "string" != typeof i[0] && 1 === i.length && i.push(null), p.apply(t, i.concat([e, n])) } } function a(e) { return function (t) { return r(t, e) } } function l(e) { return function (t) { g[e] = t } } function c(e) { if (o(v, e)) { var n = v[e]; delete v[e], T[e] = !0, h.apply(t, n) } if (!o(g, e) && !o(T, e)) throw new Error("No " + e); return g[e] } function d(e) { var t, n = e ? e.indexOf("!") : -1; return n > -1 && (t = e.substring(0, n), e = e.substring(n + 1, e.length)), [t, e] } function u(e) { return function () { return E && E.config && E.config[e] || {} } } var h, p, f, m, g = {}, v = {}, E = {}, T = {}, y = Object.prototype.hasOwnProperty, b = [].slice, C = /\.js$/; f = function (e, t) { var n, i = d(e), o = i[0]; return e = i[1], o && (o = r(o, t), n = c(o)), o ? e = n && n.normalize ? n.normalize(e, a(t)) : r(e, t) : (e = r(e, t), i = d(e), o = i[0], e = i[1], o && (n = c(o))), { f: o ? o + "!" + e : e, n: e, pr: o, p: n } }, m = { require: function (e) { return s(e) }, exports: function (e) { var t = g[e]; return "undefined" != typeof t ? t : g[e] = {} }, module: function (e) { return { id: e, uri: "", exports: g[e], config: u(e) } } }, h = function (e, n, i, r) { var a, d, u, h, p, E, y = [], b = typeof i; if (r = r || e, "undefined" === b || "function" === b) { for (n = !n.length && i.length ? ["require", "exports", "module"] : n, p = 0; p < n.length; p += 1)if (h = f(n[p], r), d = h.f, "require" === d) y[p] = m.require(e); else if ("exports" === d) y[p] = m.exports(e), E = !0; else if ("module" === d) a = y[p] = m.module(e); else if (o(g, d) || o(v, d) || o(T, d)) y[p] = c(d); else { if (!h.p) throw new Error(e + " missing " + d); h.p.load(h.n, s(r, !0), l(d), {}), y[p] = g[d] } u = i ? i.apply(g[e], y) : void 0, e && (a && a.exports !== t && a.exports !== g[e] ? g[e] = a.exports : u === t && E || (g[e] = u)) } else e && (g[e] = i) }, e = n = p = function (e, n, i, o, r) { if ("string" == typeof e) return m[e] ? m[e](n) : c(f(e, n).f); if (!e.splice) { if (E = e, E.deps && p(E.deps, E.callback), !n) return; n.splice ? (e = n, n = i, i = null) : e = t } return n = n || function () { }, "function" == typeof i && (i = o, o = r), o ? h(t, e, n, i) : setTimeout(function () { h(t, e, n, i) }, 4), p }, p.config = function (e) { return p(e) }, e._defined = g, i = function (e, t, n) { if ("string" != typeof e) throw new Error("See almond README: incorrect module build, no module name"); t.splice || (n = t, t = []), o(g, e) || o(v, e) || (v[e] = [e, t, n]) }, i.amd = { jQuery: !0 } }(), t.requirejs = e, t.require = n, t.define = i } }(), 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("select2/utils", ["jquery"], function (e) { function t(e) { var t = e.prototype, n = []; for (var i in t) { var o = t[i]; "function" == typeof o && "constructor" !== i && n.push(i) } return n } var n = {}; n.Extend = function (e, t) { function n() { this.constructor = e } var i = {}.hasOwnProperty; for (var o in t) i.call(t, o) && (e[o] = t[o]); return n.prototype = t.prototype, e.prototype = new n, e.__super__ = t.prototype, e }, n.Decorate = function (e, n) { function i() { var t = Array.prototype.unshift, i = n.prototype.constructor.length, o = e.prototype.constructor; i > 0 && (t.call(arguments, e.prototype.constructor), o = n.prototype.constructor), o.apply(this, arguments) } function o() { this.constructor = i } var r = t(n), s = t(e); n.displayName = e.displayName, i.prototype = new o; for (var a = 0; a < s.length; a++) { var l = s[a]; i.prototype[l] = e.prototype[l] } for (var c = (function (e) { var t = function () { }; e in i.prototype && (t = i.prototype[e]); var o = n.prototype[e]; return function () { var e = Array.prototype.unshift; return e.call(arguments, t), o.apply(this, arguments) } }), d = 0; d < r.length; d++) { var u = r[d]; i.prototype[u] = c(u) } return i }; var i = function () { this.listeners = {} }; return i.prototype.on = function (e, t) { this.listeners = this.listeners || {}, e in this.listeners ? this.listeners[e].push(t) : this.listeners[e] = [t] }, i.prototype.trigger = function (e) { var t = Array.prototype.slice, n = t.call(arguments, 1); this.listeners = this.listeners || {}, null == n && (n = []), 0 === n.length && n.push({}), n[0]._type = e, e in this.listeners && this.invoke(this.listeners[e], t.call(arguments, 1)), "*" in this.listeners && this.invoke(this.listeners["*"], arguments) }, i.prototype.invoke = function (e, t) { for (var n = 0, i = e.length; i > n; n++)e[n].apply(this, t) }, n.Observable = i, n.generateChars = function (e) { for (var t = "", n = 0; e > n; n++) { var i = Math.floor(36 * Math.random()); t += i.toString(36) } return t }, n.bind = function (e, t) { return function () { e.apply(t, arguments) } }, n._convertData = function (e) { for (var t in e) { var n = t.split("-"), i = e; if (1 !== n.length) { for (var o = 0; o < n.length; o++) { var r = n[o]; r = r.substring(0, 1).toLowerCase() + r.substring(1), r in i || (i[r] = {}), o == n.length - 1 && (i[r] = e[t]), i = i[r] } delete e[t] } } return e }, n.hasScroll = function (t, n) { var i = e(n), o = n.style.overflowX, r = n.style.overflowY; return o !== r || "hidden" !== r && "visible" !== r ? "scroll" === o || "scroll" === r ? !0 : i.innerHeight() < n.scrollHeight || i.innerWidth() < n.scrollWidth : !1 }, n.escapeMarkup = function (e) { var t = { "\\": "&#92;", "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;", "/": "&#47;" }; return "string" != typeof e ? e : String(e).replace(/[&<>"'\/\\]/g, function (e) { return t[e] }) }, n.appendMany = function (t, n) { if ("1.7" === e.fn.jquery.substr(0, 3)) { var i = e(); e.map(n, function (e) { i = i.add(e) }), n = i } t.append(n) }, n }), t.define("select2/results", ["jquery", "./utils"], function (e, t) { function n(e, t, i) { this.$element = e, this.data = i, this.options = t, n.__super__.constructor.call(this) } return t.Extend(n, t.Observable), n.prototype.render = function () { var t = e('<ul class="select2-results__options" role="tree"></ul>'); return this.options.get("multiple") && t.attr("aria-multiselectable", "true"), this.$results = t, t }, n.prototype.clear = function () { this.$results.empty() }, n.prototype.displayMessage = function (t) { var n = this.options.get("escapeMarkup"); this.clear(), this.hideLoading(); var i = e('<li role="treeitem" aria-live="assertive" class="select2-results__option"></li>'), o = this.options.get("translations").get(t.message); i.append(n(o(t.args))), i[0].className += " select2-results__message", this.$results.append(i) }, n.prototype.hideMessages = function () { this.$results.find(".select2-results__message").remove() }, n.prototype.append = function (e) { this.hideLoading(); var t = []; if (null == e.results || 0 === e.results.length) return void (0 === this.$results.children().length && this.trigger("results:message", { message: "noResults" })); e.results = this.sort(e.results); for (var n = 0; n < e.results.length; n++) { var i = e.results[n], o = this.option(i); t.push(o) } this.$results.append(t) }, n.prototype.position = function (e, t) { var n = t.find(".select2-results"); n.append(e) }, n.prototype.sort = function (e) { var t = this.options.get("sorter"); return t(e) }, n.prototype.highlightFirstItem = function () { var e = this.$results.find(".select2-results__option[aria-selected]"), t = e.filter("[aria-selected=true]"); t.length > 0 ? t.first().trigger("mouseenter") : e.first().trigger("mouseenter"), this.ensureHighlightVisible() }, n.prototype.setClasses = function () { var t = this; this.data.current(function (n) { var i = e.map(n, function (e) { return e.id.toString() }), o = t.$results.find(".select2-results__option[aria-selected]"); o.each(function () { var t = e(this), n = e.data(this, "data"), o = "" + n.id; null != n.element && n.element.selected || null == n.element && e.inArray(o, i) > -1 ? t.attr("aria-selected", "true") : t.attr("aria-selected", "false") }) }) }, n.prototype.showLoading = function (e) { this.hideLoading(); var t = this.options.get("translations").get("searching"), n = { disabled: !0, loading: !0, text: t(e) }, i = this.option(n); i.className += " loading-results", this.$results.prepend(i) }, n.prototype.hideLoading = function () { this.$results.find(".loading-results").remove() }, n.prototype.option = function (t) { var n = document.createElement("li"); n.className = "select2-results__option"; var i = { role: "treeitem", "aria-selected": "false" }; t.disabled && (delete i["aria-selected"], i["aria-disabled"] = "true"), null == t.id && delete i["aria-selected"], null != t._resultId && (n.id = t._resultId), t.title && (n.title = t.title), t.children && (i.role = "group", i["aria-label"] = t.text, delete i["aria-selected"]); for (var o in i) { var r = i[o]; n.setAttribute(o, r) } if (t.children) { var s = e(n), a = document.createElement("strong"); a.className = "select2-results__group"; e(a); this.template(t, a); for (var l = [], c = 0; c < t.children.length; c++) { var d = t.children[c], u = this.option(d); l.push(u) } var h = e("<ul></ul>", { "class": "select2-results__options select2-results__options--nested" }); h.append(l), s.append(a), s.append(h) } else this.template(t, n); return e.data(n, "data", t), n }, n.prototype.bind = function (t) { var n = this, i = t.id + "-results"; this.$results.attr("id", i), t.on("results:all", function (e) { n.clear(), n.append(e.data), t.isOpen() && (n.setClasses(), n.highlightFirstItem()) }), t.on("results:append", function (e) { n.append(e.data), t.isOpen() && n.setClasses() }), t.on("query", function (e) { n.hideMessages(), n.showLoading(e) }), t.on("select", function () { t.isOpen() && (n.setClasses(), n.highlightFirstItem()) }), t.on("unselect", function () { t.isOpen() && (n.setClasses(), n.highlightFirstItem()) }), t.on("open", function () { n.$results.attr("aria-expanded", "true"), n.$results.attr("aria-hidden", "false"), n.setClasses(), n.ensureHighlightVisible() }), t.on("close", function () { n.$results.attr("aria-expanded", "false"), n.$results.attr("aria-hidden", "true"), n.$results.removeAttr("aria-activedescendant") }), t.on("results:toggle", function () { var e = n.getHighlightedResults(); 0 !== e.length && e.trigger("mouseup") }), t.on("results:select", function () { var e = n.getHighlightedResults(); if (0 !== e.length) { var t = e.data("data"); "true" == e.attr("aria-selected") ? n.trigger("close", {}) : n.trigger("select", { data: t }) } }), t.on("results:previous", function () { var e = n.getHighlightedResults(), t = n.$results.find("[aria-selected]"), i = t.index(e); if (0 !== i) { var o = i - 1; 0 === e.length && (o = 0); var r = t.eq(o); r.trigger("mouseenter"); var s = n.$results.offset().top, a = r.offset().top, l = n.$results.scrollTop() + (a - s); 0 === o ? n.$results.scrollTop(0) : 0 > a - s && n.$results.scrollTop(l) } }), t.on("results:next", function () { var e = n.getHighlightedResults(), t = n.$results.find("[aria-selected]"), i = t.index(e), o = i + 1; if (!(o >= t.length)) { var r = t.eq(o); r.trigger("mouseenter"); var s = n.$results.offset().top + n.$results.outerHeight(!1), a = r.offset().top + r.outerHeight(!1), l = n.$results.scrollTop() + a - s; 0 === o ? n.$results.scrollTop(0) : a > s && n.$results.scrollTop(l) } }), t.on("results:focus", function (e) { e.element.addClass("select2-results__option--highlighted") }), t.on("results:message", function (e) { n.displayMessage(e) }), e.fn.mousewheel && this.$results.on("mousewheel", function (e) { var t = n.$results.scrollTop(), i = n.$results.get(0).scrollHeight - t + e.deltaY, o = e.deltaY > 0 && t - e.deltaY <= 0, r = e.deltaY < 0 && i <= n.$results.height(); o ? (n.$results.scrollTop(0), e.preventDefault(), e.stopPropagation()) : r && (n.$results.scrollTop(n.$results.get(0).scrollHeight - n.$results.height()), e.preventDefault(), e.stopPropagation()) }), this.$results.on("mouseup", ".select2-results__option[aria-selected]", function (t) { var i = e(this), o = i.data("data"); return "true" === i.attr("aria-selected") ? void (n.options.get("multiple") ? n.trigger("unselect", { originalEvent: t, data: o }) : n.trigger("close", {})) : void n.trigger("select", { originalEvent: t, data: o }) }), this.$results.on("mouseenter", ".select2-results__option[aria-selected]", function () { var t = e(this).data("data"); n.getHighlightedResults().removeClass("select2-results__option--highlighted"), n.trigger("results:focus", { data: t, element: e(this) }) }) }, n.prototype.getHighlightedResults = function () { var e = this.$results.find(".select2-results__option--highlighted"); return e }, n.prototype.destroy = function () { this.$results.remove() }, n.prototype.ensureHighlightVisible = function () { var e = this.getHighlightedResults(); if (0 !== e.length) { var t = this.$results.find("[aria-selected]"), n = t.index(e), i = this.$results.offset().top, o = e.offset().top, r = this.$results.scrollTop() + (o - i), s = o - i; r -= 2 * e.outerHeight(!1), 2 >= n ? this.$results.scrollTop(0) : (s > this.$results.outerHeight() || 0 > s) && this.$results.scrollTop(r) } }, n.prototype.template = function (t, n) { var i = this.options.get("templateResult"), o = this.options.get("escapeMarkup"), r = i(t, n); null == r ? n.style.display = "none" : "string" == typeof r ? n.innerHTML = o(r) : e(n).append(r) }, n }), t.define("select2/keys", [], function () { var e = { 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 }; return e }), t.define("select2/selection/base", ["jquery", "../utils", "../keys"], function (e, t, n) { 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('<span class="select2-selection" role="combobox"  aria-haspopup="true" aria-expanded="false"></span>'); return this._tabindex = 0, null != this.$element.data("old-tabindex") ? this._tabindex = this.$element.data("old-tabindex") : null != this.$element.attr("tabindex") && (this._tabindex = this.$element.attr("tabindex")), t.attr("title", this.$element.attr("title")), t.attr("tabindex", this._tabindex), this.$selection = t, t }, i.prototype.bind = function (e) { var t = this, i = (e.id + "-container", e.id + "-results"); this.container = e, this.$selection.on("focus", function (e) { t.trigger("focus", e) }), this.$selection.on("blur", function (e) { t._handleBlur(e) }), this.$selection.on("keydown", function (e) { t.trigger("keypress", e), e.which === n.SPACE && e.preventDefault() }), e.on("results:focus", function (e) { t.$selection.attr("aria-activedescendant", e.data._resultId) }), e.on("selection:update", function (e) { t.update(e.data) }), e.on("open", function () { t.$selection.attr("aria-expanded", "true"), t.$selection.attr("aria-owns", i), t._attachCloseHandler(e) }), e.on("close", function () { t.$selection.attr("aria-expanded", "false"), t.$selection.removeAttr("aria-activedescendant"), t.$selection.removeAttr("aria-owns"), t.$selection.focus(), t._detachCloseHandler(e) }), e.on("enable", function () { t.$selection.attr("tabindex", t._tabindex) }), e.on("disable", function () { t.$selection.attr("tabindex", "-1") }) }, i.prototype._handleBlur = function (t) { var n = this; window.setTimeout(function () { document.activeElement == n.$selection[0] || e.contains(n.$selection[0], document.activeElement) || n.trigger("blur", t) }, 1) }, i.prototype._attachCloseHandler = function (t) { e(document.body).on("mousedown.select2." + t.id, function (t) { var n = e(t.target), i = n.closest(".select2"), o = e(".select2.select2-container--open"); o.each(function () { var t = e(this); if (this != i[0]) { var n = t.data("element"); n.select2("close") } }) }) }, i.prototype._detachCloseHandler = function (t) { e(document.body).off("mousedown.select2." + t.id) }, i.prototype.position = function (e, t) { var n = t.find(".selection"); n.append(e) }, i.prototype.destroy = function () { this._detachCloseHandler(this.container) }, i.prototype.update = function () { throw new Error("The `update` method must be defined in child classes.") }, i }), t.define("select2/selection/single", ["jquery", "./base", "../utils", "../keys"], function (e, t, n) { function i() { i.__super__.constructor.apply(this, arguments) } return n.Extend(i, t), i.prototype.render = function () { var e = i.__super__.render.call(this); return e.addClass("select2-selection--single"), e.html('<span class="select2-selection__rendered"></span><span class="select2-selection__arrow" role="presentation"><b role="presentation"></b></span>'), e }, i.prototype.bind = function (e) { var t = this; i.__super__.bind.apply(this, arguments); var n = e.id + "-container"; this.$selection.find(".select2-selection__rendered").attr("id", n), this.$selection.attr("aria-labelledby", n), this.$selection.on("mousedown", function (e) { 1 === e.which && t.trigger("toggle", { originalEvent: e }) }), this.$selection.on("focus", function () { }), this.$selection.on("blur", function () { }), e.on("focus", function () { e.isOpen() || t.$selection.focus() }), e.on("selection:update", function (e) { t.update(e.data) }) }, i.prototype.clear = function () { this.$selection.find(".select2-selection__rendered").empty() }, i.prototype.display = function (e, t) { var n = this.options.get("templateSelection"), i = this.options.get("escapeMarkup"); return i(n(e, t)) }, i.prototype.selectionContainer = function () { return e("<span></span>") }, i.prototype.update = function (e) { if (0 === e.length) return void this.clear(); var t = e[0], n = this.$selection.find(".select2-selection__rendered"), i = this.display(t, n); n.empty().append(i), n.prop("title", t.title || t.text) }, i }), t.define("select2/selection/multiple", ["jquery", "./base", "../utils"], function (e, t, n) { function i() { i.__super__.constructor.apply(this, arguments) } return n.Extend(i, t), i.prototype.render = function () { var e = i.__super__.render.call(this); return e.addClass("select2-selection--multiple"), e.html('<ul class="select2-selection__rendered"></ul>'), e }, i.prototype.bind = function () { var t = this; i.__super__.bind.apply(this, arguments), this.$selection.on("click", function (e) { t.trigger("toggle", { originalEvent: e }) }), this.$selection.on("click", ".select2-selection__choice__remove", function (n) { if (!t.options.get("disabled")) { var i = e(this), o = i.parent(), r = o.data("data"); t.trigger("unselect", { originalEvent: n, data: r }) } }) }, i.prototype.clear = function () { this.$selection.find(".select2-selection__rendered").empty() }, i.prototype.display = function (e, t) { var n = this.options.get("templateSelection"), i = this.options.get("escapeMarkup"); return i(n(e, t)) }, i.prototype.selectionContainer = function () { var t = e('<li class="select2-selection__choice"><span class="select2-selection__choice__remove" role="presentation">&times;</span></li>'); return t }, i.prototype.update = function (e) { if (this.clear(), 0 !== e.length) { for (var t = [], i = 0; i < e.length; i++) { var o = e[i], r = this.selectionContainer(), s = this.display(o, r); r.append(s), r.prop("title", o.title || o.text), r.data("data", o), t.push(r) } var a = this.$selection.find(".select2-selection__rendered"); n.appendMany(a, t) } }, i }), t.define("select2/selection/placeholder", ["../utils"], function () { function e(e, t, n) { this.placeholder = this.normalizePlaceholder(n.get("placeholder")), e.call(this, t, n) } return e.prototype.normalizePlaceholder = function (e, t) { return "string" == typeof t && (t = { id: "", text: t }), t }, e.prototype.createPlaceholder = function (e, t) { var n = this.selectionContainer(); return n.html(this.display(t)), n.addClass("select2-selection__placeholder").removeClass("select2-selection__choice"), n }, e.prototype.update = function (e, t) { var n = 1 == t.length && t[0].id != this.placeholder.id, i = t.length > 1; if (i || n) return e.call(this, t); this.clear(); var o = this.createPlaceholder(this.placeholder); this.$selection.find(".select2-selection__rendered").append(o) }, e }), t.define("select2/selection/allowClear", ["jquery", "../keys"], function (e, t) { function n() { } return n.prototype.bind = function (e, t, n) { var i = this; e.call(this, t, n), 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", ".select2-selection__clear", function (e) { i._handleClear(e) }), t.on("keypress", function (e) { i._handleKeyboardClear(e, t) }) }, n.prototype._handleClear = function (e, t) { if (!this.options.get("disabled")) { var n = this.$selection.find(".select2-selection__clear"); if (0 !== n.length) { t.stopPropagation(); for (var i = n.data("data"), o = 0; o < i.length; o++) { var r = { data: i[o] }; if (this.trigger("unselect", r), r.prevented) return } this.$element.val(this.placeholder.id).trigger("change"), this.trigger("toggle", {}) } } }, n.prototype._handleKeyboardClear = function (e, n, i) { i.isOpen() || n.which != t.DELETE && n.which != t.BACKSPACE || this._handleClear(n) }, n.prototype.update = function (t, n) { if (t.call(this, n), !(this.$selection.find(".select2-selection__placeholder").length > 0 || 0 === n.length)) { var i = e('<span class="select2-selection__clear">&times;</span>'); i.data("data", n), this.$selection.find(".select2-selection__rendered").prepend(i) } }, n }), t.define("select2/selection/search", ["jquery", "../utils", "../keys"], function (e, t, n) { function i(e, t, n) { e.call(this, t, n) } return i.prototype.render = function (t) { var n = e('<li class="select2-search select2-search--inline"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" role="textbox" aria-autocomplete="list" /></li>'); this.$searchContainer = n, this.$search = n.find("input"); var i = t.call(this); return this._transferTabIndex(), i }, i.prototype.bind = function (e, t, i) { var o = this; e.call(this, t, i), t.on("open", function () { o.$search.trigger("focus") }), t.on("close", function () { o.$search.val(""), o.$search.removeAttr("aria-activedescendant"), o.$search.trigger("focus") }), t.on("enable", function () { o.$search.prop("disabled", !1), o._transferTabIndex() }), t.on("disable", function () { o.$search.prop("disabled", !0) }), t.on("focus", function () { o.$search.trigger("focus") }), t.on("results:focus", function (e) { o.$search.attr("aria-activedescendant", e.id) }), this.$selection.on("focusin", ".select2-search--inline", function (e) { o.trigger("focus", e) }), this.$selection.on("focusout", ".select2-search--inline", function (e) { o._handleBlur(e) }), this.$selection.on("keydown", ".select2-search--inline", function (e) { e.stopPropagation(), o.trigger("keypress", e), o._keyUpPrevented = e.isDefaultPrevented(); var t = e.which; if (t === n.BACKSPACE && "" === o.$search.val()) { var i = o.$searchContainer.prev(".select2-selection__choice"); if (i.length > 0) { var r = i.data("data"); o.searchRemoveChoice(r), e.preventDefault() } } }); var r = document.documentMode, s = r && 11 >= r; this.$selection.on("input.searchcheck", ".select2-search--inline", function () { return s ? void o.$selection.off("input.search input.searchcheck") : void o.$selection.off("keyup.search") }), this.$selection.on("keyup.search input.search", ".select2-search--inline", function (e) { if (s && "input" === e.type) return void o.$selection.off("input.search input.searchcheck"); var t = e.which; t != n.SHIFT && t != n.CTRL && t != n.ALT && t != n.TAB && o.handleSearch(e) }) }, i.prototype._transferTabIndex = function () { this.$search.attr("tabindex", this.$selection.attr("tabindex")), this.$selection.attr("tabindex", "-1") }, i.prototype.createPlaceholder = function (e, t) { this.$search.attr("placeholder", t.text) }, i.prototype.update = function (e, t) { var n = this.$search[0] == document.activeElement; this.$search.attr("placeholder", ""), e.call(this, t), this.$selection.find(".select2-selection__rendered").append(this.$searchContainer), this.resizeSearch(), n && this.$search.focus() }, i.prototype.handleSearch = function () { if (this.resizeSearch(), !this._keyUpPrevented) { var e = this.$search.val(); this.trigger("query", { term: e }) } this._keyUpPrevented = !1 }, i.prototype.searchRemoveChoice = function (e, t) { this.trigger("unselect", { data: t }), this.$search.val(t.text), this.handleSearch() }, i.prototype.resizeSearch = function () { this.$search.css("width", "25px"); var e = ""; if ("" !== this.$search.attr("placeholder")) e = this.$selection.find(".select2-selection__rendered").innerWidth(); else { var t = this.$search.val().length + 1; e = .75 * t + "em" } this.$search.css("width", e) }, i }), t.define("select2/selection/eventRelay", ["jquery"], function (e) { function t() { } return t.prototype.bind = function (t, n, i) { var o = this, r = ["open", "opening", "close", "closing", "select", "selecting", "unselect", "unselecting"], s = ["opening", "closing", "selecting", "unselecting"]; t.call(this, n, i), n.on("*", function (t, n) { if (-1 !== e.inArray(t, r)) { n = n || {}; var i = e.Event("select2:" + t, { params: n }); o.$element.trigger(i), -1 !== e.inArray(t, s) && (n.prevented = i.isDefaultPrevented()) } }) }, t }), t.define("select2/translation", ["jquery", "require"], function (e, t) { function n(e) { this.dict = e || {} } return n.prototype.all = function () { return this.dict }, n.prototype.get = function (e) { return this.dict[e] }, n.prototype.extend = function (t) { this.dict = e.extend({}
87, t.all(), this.dict) }, n._cache = {}, n.loadPath = function (e) { if (!(e in n._cache)) { var i = t(e); n._cache[e] = i } return new n(n._cache[e]) }, n }), t.define("select2/diacritics", [], function () {
88            var e = {
89                "\u24b6": "A", "\uff21": "A", "\xc0": "A", "\xc1": "A", "\xc2": "A", "\u1ea6": "A", "\u1ea4": "A", "\u1eaa": "A", "\u1ea8": "A", "\xc3": "A", "\u0100": "A", "\u0102": "A", "\u1eb0": "A", "\u1eae": "A", "\u1eb4": "A", "\u1eb2": "A", "\u0226": "A", "\u01e0": "A", "\xc4": "A", "\u01de": "A", "\u1ea2": "A", "\xc5": "A", "\u01fa": "A", "\u01cd": "A", "\u0200": "A", "\u0202": "A", "\u1ea0": "A", "\u1eac": "A", "\u1eb6": "A", "\u1e00": "A", "\u0104": "A", "\u023a": "A", "\u2c6f": "A", "\ua732": "AA", "\xc6": "AE", "\u01fc": "AE", "\u01e2": "AE", "\ua734": "AO", "\ua736": "AU", "\ua738": "AV", "\ua73a": "AV", "\ua73c": "AY", "\u24b7": "B", "\uff22": "B", "\u1e02": "B", "\u1e04": "B", "\u1e06": "B", "\u0243": "B", "\u0182": "B", "\u0181": "B", "\u24b8": "C", "\uff23": "C", "\u0106": "C", "\u0108": "C", "\u010a": "C", "\u010c": "C", "\xc7": "C", "\u1e08": "C", "\u0187": "C", "\u023b": "C", "\ua73e": "C", "\u24b9": "D", "\uff24": "D", "\u1e0a": "D", "\u010e": "D", "\u1e0c": "D", "\u1e10": "D", "\u1e12": "D", "\u1e0e": "D", "\u0110": "D", "\u018b": "D", "\u018a": "D", "\u0189": "D", "\ua779": "D", "\u01f1": "DZ", "\u01c4": "DZ", "\u01f2": "Dz", "\u01c5": "Dz", "\u24ba": "E", "\uff25": "E", "\xc8": "E", "\xc9": "E", "\xca": "E", "\u1ec0": "E", "\u1ebe": "E", "\u1ec4": "E", "\u1ec2": "E", "\u1ebc": "E", "\u0112": "E", "\u1e14": "E", "\u1e16": "E", "\u0114": "E", "\u0116": "E", "\xcb": "E", "\u1eba": "E", "\u011a": "E", "\u0204": "E", "\u0206": "E", "\u1eb8": "E", "\u1ec6": "E", "\u0228": "E", "\u1e1c": "E", "\u0118": "E", "\u1e18": "E", "\u1e1a": "E", "\u0190": "E", "\u018e": "E", "\u24bb": "F", "\uff26": "F", "\u1e1e": "F", "\u0191": "F", "\ua77b": "F", "\u24bc": "G", "\uff27": "G", "\u01f4": "G", "\u011c": "G", "\u1e20": "G", "\u011e": "G", "\u0120": "G", "\u01e6": "G", "\u0122": "G", "\u01e4": "G", "\u0193": "G", "\ua7a0": "G", "\ua77d": "G", "\ua77e": "G", "\u24bd": "H", "\uff28": "H", "\u0124": "H", "\u1e22": "H", "\u1e26": "H", "\u021e": "H", "\u1e24": "H", "\u1e28": "H", "\u1e2a": "H", "\u0126": "H", "\u2c67": "H", "\u2c75": "H", "\ua78d": "H", "\u24be": "I", "\uff29": "I", "\xcc": "I", "\xcd": "I", "\xce": "I", "\u0128": "I", "\u012a": "I", "\u012c": "I", "\u0130": "I", "\xcf": "I", "\u1e2e": "I", "\u1ec8": "I", "\u01cf": "I", "\u0208": "I", "\u020a": "I", "\u1eca": "I", "\u012e": "I", "\u1e2c": "I", "\u0197": "I", "\u24bf": "J", "\uff2a": "J", "\u0134": "J", "\u0248": "J", "\u24c0": "K", "\uff2b": "K", "\u1e30": "K", "\u01e8": "K", "\u1e32": "K", "\u0136": "K", "\u1e34": "K", "\u0198": "K", "\u2c69": "K", "\ua740": "K", "\ua742": "K", "\ua744": "K", "\ua7a2": "K", "\u24c1": "L", "\uff2c": "L", "\u013f"
89: "L", "\u0139": "L", "\u013d": "L", "\u1e36": "L", "\u1e38": "L", "\u013b": "L", "\u1e3c": "L", "\u1e3a": "L", "\u0141": "L", "\u023d": "L", "\u2c62": "L", "\u2c60": "L", "\ua748": "L", "\ua746": "L", "\ua780": "L", "\u01c7": "LJ", "\u01c8": "Lj", "\u24c2": "M", "\uff2d": "M", "\u1e3e": "M", "\u1e40": "M", "\u1e42": "M", "\u2c6e": "M", "\u019c": "M", "\u24c3": "N", "\uff2e": "N", "\u01f8": "N",
90                "\u0143": "N", "\xd1": "N", "\u1e44": "N", "\u0147": "N", "\u1e46": "N", "\u0145": "N", "\u1e4a": "N", "\u1e48": "N", "\u0220": "N", "\u019d": "N", "\ua790": "N", "\ua7a4": "N", "\u01ca": "NJ", "\u01cb": "Nj", "\u24c4": "O", "\uff2f": "O", "\xd2": "O", "\xd3": "O", "\xd4": "O", "\u1ed2": "O", "\u1ed0": "O", "\u1ed6": "O", "\u1ed4": "O", "\xd5": "O", "\u1e4c": "O", "\u022c": "O", "\u1e4e": "O", "\u014c": "O", "\u1e50": "O", "\u1e52": "O", "\u014e": "O", "\u022e": "O", "\u0230": "O", "\xd6": "O", "\u022a": "O", "\u1ece": "O", "\u0150": "O", "\u01d1": "O", "\u020c": "O", "\u020e": "O", "\u01a0": "O", "\u1edc": "O", "\u1eda": "O", "\u1ee0": "O", "\u1ede": "O", "\u1ee2": "O", "\u1ecc": "O", "\u1ed8": "O", "\u01ea": "O", "\u01ec": "O", "\xd8": "O", "\u01fe": "O", "\u0186": "O", "\u019f": "O", "\ua74a": "O", "\ua74c": "O", "\u01a2": "OI", "\ua74e": "OO", "\u0222": "OU", "\u24c5": "P", "\uff30": "P", "\u1e54": "P", "\u1e56": "P", "\u01a4": "P", "\u2c63": "P", "\ua750": "P", "\ua752": "P", "\ua754": "P", "\u24c6": "Q", "\uff31": "Q", "\ua756": "Q", "\ua758": "Q", "\u024a": "Q", "\u24c7": "R", "\uff32": "R", "\u0154": "R", "\u1e58": "R", "\u0158": "R", "\u0210": "R", "\u0212": "R", "\u1e5a": "R", "\u1e5c": "R", "\u0156": "R", "\u1e5e": "R", "\u024c": "R", "\u2c64": "R", "\ua75a": "R", "\ua7a6": "R", "\ua782": "R", "\u24c8": "S", "\uff33": "S", "\u1e9e": "S", "\u015a": "S", "\u1e64": "S", "\u015c": "S", "\u1e60": "S", "\u0160": "S", "\u1e66": "S", "\u1e62": "S", "\u1e68": "S", "\u0218": "S", "\u015e": "S", "\u2c7e": "S", "\ua7a8": "S", "\ua784": "S", "\u24c9": "T", "\uff34": "T", "\u1e6a": "T", "\u0164": "T", "\u1e6c": "T", "\u021a": "T", "\u0162": "T", "\u1e70": "T", "\u1e6e": "T", "\u0166": "T", "\u01ac": "T", "\u01ae": "T", "\u023e": "T", "\ua786": "T", "\ua728": "TZ", "\u24ca": "U", "\uff35": "U", "\xd9": "U", "\xda": "U", "\xdb": "U", "\u0168": "U", "\u1e78": "U", "\u016a": "U", "\u1e7a": "U", "\u016c": "U", "\xdc": "U", "\u01db": "U", "\u01d7": "U", "\u01d5": "U", "\u01d9": "U", "\u1ee6": "U", "\u016e": "U", "\u0170": "U", "\u01d3": "U", "\u0214": "U", "\u0216": "U", "\u01af": "U", "\u1eea": "U", "\u1ee8": "U", "\u1eee": "U", "\u1eec": "U", "\u1ef0": "U", "\u1ee4": "U", "\u1e72": "U", "\u0172": "U", "\u1e76": "U", "\u1e74": "U", "\u0244": "U", "\u24cb": "V", "\uff36": "V", "\u1e7c": "V", "\u1e7e": "V", "\u01b2": "V", "\ua75e": "V", "\u0245": "V", "\ua760": "VY", "\u24cc": "W", "\uff37": "W", "\u1e80": "W", "\u1e82": "W", "\u0174": "W", "\u1e86": "W", "\u1e84": "W", "\u1e88": "W", "\u2c72": "W", "\u24cd": "X", "\uff38": "X", "\u1e8a": "X", "\u1e8c": "X", "\u24ce": "Y", "\uff39": "Y", "\u1ef2": "Y", "\xdd": "Y", "\u0176": "Y", "\u1ef8": "Y", "\u0232": "Y", "\u1e8e": "Y", "\u0178": "Y", "\u1ef6": "Y", "\u1ef4": "Y", "\u01b3": "Y", "\u024e": "Y", "\u1efe": "Y", "\u24cf": "Z", "\uff3a": "Z", "\u0179": "Z", "\u1e90": "Z", "\u017b": "Z", "\u017d": "Z", "\u1e92": "Z", "\u1e94": "Z", "\u01b5": "Z", "\u0224": "Z", "\u2c7f": "Z", "\u2c6b": "Z", "\ua762": "Z", "\u24d0": "a", "\uff41": "a", "\u1e9a": "a", "\xe0": "a", "\xe1": "a", "\xe2": "a", "\u1ea7": "a", "\u1ea5": "a", "\u1eab": "a", "\u1ea9": "a", "\xe3": "a", "\u0101": "a", "\u0103": "a", "\u1eb1": "a", "\u1eaf": "a", "\u1eb5": "a", "\u1eb3": "a", "\u0227": "a", "\u01e1": "a", "\xe4": "a", "\u01df": "a", "\u1ea3": "a", "\xe5": "a", "\u01fb": "a", "\u01ce": "a", "\u0201": "a", "\u0203": "a", "\u1ea1": "a", "\u1ead": "a", "\u1eb7": "a", "\u1e01": "a", "\u0105": "a", "\u2c65": "a", "\u0250": "a", "\ua733": "aa", "\xe6": "ae", "\u01fd": "ae", "\u01e3": "ae", "\ua735": "ao", "\ua737": "au", "\ua739": "av", "\ua73b": "av", "\ua73d": "ay", "\u24d1": "b", "\uff42": "b", "\u1e03": "b", "\u1e05": "b", "\u1e07": "b", "\u0180": "b", "\u0183": "b", "\u0253": "b", "\u24d2": "c", "\uff43": "c", "\u0107": "c", "\u0109": "c", "\u010b": "c", "\u010d": "c", "\xe7": "c", "\u1e09": "c", "\u0188": "c", "\u023c": "c", "\ua73f": "c", "\u2184": "c", "\u24d3": "d", "\uff44": "d", "\u1e0b": "d", "\u010f": "d", "\u1e0d": "d", "\u1e11": "d", "\u1e13": "d", "\u1e0f": "d", "\u0111": "d", "\u018c": "d", "\u0256": "d", "\u0257": "d", "\ua77a": "d", "\u01f3": "dz", "\u01c6": "dz", "\u24d4": "e", "\uff45": "e", "\xe8": "e", "\xe9": "e", "\xea": "e", "\u1ec1": "e", "\u1ebf": "e", "\u1ec5": "e", "\u1ec3": "e", "\u1ebd": "e", "\u0113": "e", "\u1e15": "e", "\u1e17": "e", "\u0115": "e", "\u0117": "e", "\xeb"
90: "e", "\u1ebb": "e", "\u011b": "e", "\u0205": "e", "\u0207": "e", "\u1eb9": "e", "\u1ec7": "e", "\u0229": "e", "\u1e1d": "e", "\u0119": "e", "\u1e19": "e", "\u1e1b": "e", "\u0247": "e", "\u025b": "e", "\u01dd": "e", "\u24d5": "f", "\uff46": "f", "\u1e1f": "f", "\u0192": "f", "\ua77c": "f", "\u24d6": "g", "\uff47": "g", "\u01f5": "g", "\u011d": "g", "\u1e21": "g", "\u011f": "g", "\u0121": "g", "\u01e7": "g", "\u0123": "g", "\u01e5": "g", "\u0260": "g", "\ua7a1": "g", "\u1d79": "g", "\ua77f": "g", "\u24d7": "h", "\uff48": "h", "\u0125": "h", "\u1e23": "h", "\u1e27": "h", "\u021f": "h", "\u1e25": "h", "\u1e29": "h", "\u1e2b": "h", "\u1e96": "h", "\u0127": "h", "\u2c68": "h", "\u2c76": "h", "\u0265": "h", "\u0195": "hv", "\u24d8": "i", "\uff49": "i", "\xec": "i", "\xed": "i", "\xee": "i", "\u0129": "i", "\u012b": "i", "\u012d": "i", "\xef": "i", "\u1e2f": "i", "\u1ec9": "i", "\u01d0": "i", "\u0209": "i", "\u020b": "i", "\u1ecb": "i", "\u012f": "i", "\u1e2d": "i", "\u0268": "i", "\u0131": "i", "\u24d9": "j", "\uff4a": "j", "\u0135": "j", "\u01f0": "j", "\u0249": "j", "\u24da": "k", "\uff4b": "k", "\u1e31": "k", "\u01e9": "k", "\u1e33": "k", "\u0137": "k", "\u1e35": "k", "\u0199": "k", "\u2c6a": "k", "\ua741": "k", "\ua743": "k", "\ua745": "k", "\ua7a3": "k", "\u24db": "l", "\uff4c": "l", "\u0140": "l", "\u013a": "l", "\u013e": "l", "\u1e37": "l", "\u1e39": "l", "\u013c": "l", "\u1e3d": "l", "\u1e3b": "l", "\u017f": "l", "\u0142": "l", "\u019a": "l", "\u026b": "l", "\u2c61": "l", "\ua749": "l", "\ua781": "l", "\ua747": "l", "\u01c9": "lj", "\u24dc": "m", "\uff4d": "m", "\u1e3f": "m", "\u1e41": "m", "\u1e43": "m", "\u0271": "m", "\u026f": "m", "\u24dd": "n", "\uff4e": "n", "\u01f9": "n", "\u0144": "n", "\xf1": "n", "\u1e45": "n", "\u0148": "n", "\u1e47": "n", "\u0146": "n", "\u1e4b": "n", "\u1e49": "n", "\u019e": "n", "\u0272": "n", "\u0149": "n", "\ua791": "n", "\ua7a5": "n", "\u01cc": "nj", "\u24de": "o", "\uff4f": "o", "\xf2": "o", "\xf3": "o", "\xf4": "o", "\u1ed3": "o", "\u1ed1": "o", "\u1ed7": "o", "\u1ed5": "o", "\xf5": "o", "\u1e4d": "o", "\u022d": "o", "\u1e4f": "o", "\u014d": "o", "\u1e51": "o", "\u1e53": "o", "\u014f": "o", "\u022f": "o", "\u0231": "o", "\xf6": "o", "\u022b": "o", "\u1ecf": "o", "\u0151": "o", "\u01d2": "o", "\u020d": "o", "\u020f": "o", "\u01a1": "o", "\u1edd": "o", "\u1edb": "o", "\u1ee1": "o", "\u1edf": "o", "\u1ee3": "o", "\u1ecd": "o", "\u1ed9": "o", "\u01eb": "o", "\u01ed": "o", "\xf8": "o", "\u01ff": "o", "\u0254": "o", "\ua74b": "o", "\ua74d": "o", "\u0275": "o", "\u01a3": "oi", "\u0223": "ou", "\ua74f": "oo", "\u24df": "p", "\uff50": "p", "\u1e55": "p", "\u1e57": "p", "\u01a5": "p", "\u1d7d": "p", "\ua751": "p", "\ua753": "p", "\ua755": "p", "\u24e0": "q", "\uff51": "q", "\u024b": "q", "\ua757": "q", "\ua759": "q", "\u24e1": "r", "\uff52": "r", "\u0155": "r", "\u1e59": "r", "\u0159": "r", "\u0211": "r", "\u0213": "r", "\u1e5b": "r", "\u1e5d": "r", "\u0157": "r", "\u1e5f": "r", "\u024d": "r", "\u027d": "r", "\ua75b": "r", "\ua7a7": "r", "\ua783": "r", "\u24e2": "s", "\uff53": "s", "\xdf": "s", "\u015b": "s", "\u1e65": "s", "\u015d": "s", "\u1e61": "s", "\u0161": "s", "\u1e67": "s", "\u1e63": "s", "\u1e69": "s", "\u0219": "s", "\u015f": "s", "\u023f": "s", "\ua7a9": "s", "\ua785": "s", "\u1e9b": "s", "\u24e3": "t", "\uff54": "t", "\u1e6b": "t", "\u1e97": "t", "\u0165": "t", "\u1e6d": "t", "\u021b": "t", "\u0163": "t", "\u1e71": "t", "\u1e6f": "t", "\u0167": "t", "\u01ad": "t", "\u0288": "t", "\u2c66": "t", "\ua787": "t", "\ua729": "tz", "\u24e4": "u", "\uff55": "u", "\xf9": "u", "\xfa": "u", "\xfb": "u", "\u0169": "u", "\u1e79": "u", "\u016b": "u", "\u1e7b": "u", "\u016d": "u", "\xfc": "u", "\u01dc": "u", "\u01d8": "u", "\u01d6": "u", "\u01da": "u", "\u1ee7": "u", "\u016f": "u", "\u0171": "u", "\u01d4": "u", "\u0215": "u", "\u0217": "u", "\u01b0": "u", "\u1eeb": "u", "\u1ee9": "u", "\u1eef": "u", "\u1eed": "u", "\u1ef1": "u", "\u1ee5": "u", "\u1e73": "u", "\u0173": "u", "\u1e77": "u", "\u1e75": "u", "\u0289": "u", "\u24e5": "v", "\uff56": "v", "\u1e7d": "v", "\u1e7f": "v", "\u028b": "v", "\ua75f": "v", "\u028c": "v", "\ua761": "vy", "\u24e6": "w", "\uff57": "w", "\u1e81": "w", "\u1e83": "w", "\u0175": "
vendor: 1,982 bytes, lines 90-92
90w", "\u1e87": "w", "\u1e85": "w", "\u1e98": "w", "\u1e89": "w", "\u2c73": "w", "\u24e7": "x", "\uff58": "x", "\u1e8b": "x", "\u1e8d": "x", "\u24e8": "y", "\uff59": "y", "\u1ef3": "y", "\xfd": "y", "\u0177": "y", "\u1ef9": "y", "\u0233": "y", "\u1e8f": "y", "\xff": "y", "\u1ef7": "y", "\u1e99": "y", "\u1ef5": "y", "\u01b4": "y", "\u024f": "y", "\u1eff": "y", "\u24e9": "z", "\uff5a": "z", "\u017a": "z", "\u1e91": "z", "\u017c": "z", "\u017e": "z", "\u1e93": "z", "\u1e95": "z", "\u01b6": "z", "\u0225": "z", "\u0240": "z", "\u2c6c": "z", "\ua763": "z", "\u0386": "\u0391", "\u0388": "\u0395", "\u0389": "\u0397", "\u038a": "\u0399", "\u03aa": "\u0399", "\u038c": "\u039f", "\u038e": "\u03a5", "\u03ab": "\u03a5", "\u038f": "\u03a9", "\u03ac": "\u03b1", "\u03ad": "\u03b5", "\u03ae": "\u03b7", "\u03af": "\u03b9", "\u03ca": "\u03b9", "\u0390": "\u03b9", "\u03cc": "\u03bf", "\u03cd": "\u03c5", "\u03cb": "\u03c5", "\u03b0": "\u03c5", "\u03c9": "\u03c9", "\u03c2": "\u03c3"
91            }; return e
92        }), t.define("select2/data/base", ["../utils"], function (e) { function t() { t.__super__.constructor.call(this) } return e.Extend(t, e.Observable), t.prototype.current = function () { throw new Error("The `current` method must be defined in child classes.") }, t.prototype.query = function () { throw new Error("The `query` method must be defined in child classes.") }, t.prototype.bind = function () { }, t.prototype.destroy = function () { }, t.prototype.generateResultId = function (t, n) { var i = t.id + "-result-"; return i += e.generateChars(4), i += null != n.id ? "-" + n.id.toString() : "-" + e.generateChars(4) }, t }), t.define("select2/data/select", ["./base", "../utils", "jquery"], function (e, t, n) { function i(e, t) { this.$element = e, this.options = t, i.__super__.constructor.call(this) } return t.Extend(i, e), i.prototype.current = function (e) { var t = [], i = this; this.$element.find(":selected").each(function () { var e = n(this), o = i.item(e);
vendor: 34,203 bytes, lines 92-93
92 t.push(o) }), e(t) }, i.prototype.select = function (e) { var t = this; if (e.selected = !0, n(e.element).is("option")) return e.element.selected = !0, void this.$element.trigger("change"); if (this.$element.prop("multiple")) this.current(function (i) { var o = []; e = [e], e.push.apply(e, i); for (var r = 0; r < e.length; r++) { var s = e[r].id; -1 === n.inArray(s, o) && o.push(s) } t.$element.val(o), t.$element.trigger("change") }); else { var i = e.id; this.$element.val(i), this.$element.trigger("change") } }, i.prototype.unselect = function (e) { var t = this; if (this.$element.prop("multiple")) return e.selected = !1, n(e.element).is("option") ? (e.element.selected = !1, void this.$element.trigger("change")) : void this.current(function (i) { for (var o = [], r = 0; r < i.length; r++) { var s = i[r].id; s !== e.id && -1 === n.inArray(s, o) && o.push(s) } t.$element.val(o), t.$element.trigger("change") }) }, i.prototype.bind = function (e) { var t = this; this.container = e, e.on("select", function (e) { t.select(e.data) }), e.on("unselect", function (e) { t.unselect(e.data) }) }, i.prototype.destroy = function () { this.$element.find("*").each(function () { n.removeData(this, "data") }) }, i.prototype.query = function (e, t) { var i = [], o = this, r = this.$element.children(); r.each(function () { var t = n(this); if (t.is("option") || t.is("optgroup")) { var r = o.item(t), s = o.matches(e, r); null !== s && i.push(s) } }), t({ results: i }) }, i.prototype.addOptions = function (e) { t.appendMany(this.$element, e) }, i.prototype.option = function (e) { var t; e.children ? (t = document.createElement("optgroup"), t.label = e.text) : (t = document.createElement("option"), void 0 !== t.textContent ? t.textContent = e.text : t.innerText = e.text), e.id && (t.value = e.id), e.disabled && (t.disabled = !0), e.selected && (t.selected = !0), e.title && (t.title = e.title); var i = n(t), o = this._normalizeItem(e); return o.element = t, n.data(t, "data", o), i }, i.prototype.item = function (e) { var t = {}; if (t = n.data(e[0], "data"), null != t) return t; if (e.is("option")) t = { id: e.val(), text: e.text(), disabled: e.prop("disabled"), selected: e.prop("selected"), title: e.prop("title") }; else if (e.is("optgroup")) { t = { text: e.prop("label"), children: [], title: e.prop("title") }; for (var i = e.children("option"), o = [], r = 0; r < i.length; r++) { var s = n(i[r]), a = this.item(s); o.push(a) } t.children = o } return t = this._normalizeItem(t), t.element = e[0], n.data(e[0], "data", t), t }, i.prototype._normalizeItem = function (e) { n.isPlainObject(e) || (e = { id: e, text: e }), e = n.extend({}, { text: "" }, e); var t = { selected: !1, disabled: !1 }; return null != 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)), n.extend({}, t, e) }, i.prototype.matches = function (e, t) { var n = this.options.get("matcher"); return n(e, t) }, i }), t.define("select2/data/array", ["./select", "../utils", "jquery"], function (e, t, n) { function i(e, t) { var n = t.get("data") || []; i.__super__.constructor.call(this, e, t), this.addOptions(this.convertToOptions(n)) } return t.Extend(i, e), i.prototype.select = function (e) { var t = this.$element.find("option").filter(function (t, n) { return n.value == e.id.toString() }); 0 === t.length && (t = this.option(e), this.addOptions(t)), i.__super__.select.call(this, e) }, i.prototype.convertToOptions = function (e) { function i(e) { return function () { return n(this).val() == e.id } } for (var o = this, r = this.$element.find("option"), s = r.map(function () { return o.item(n(this)).id }).get(), a = [], l = 0; l < e.length; l++) { var c = this._normalizeItem(e[l]); if (n.inArray(c.id, s) >= 0) { var d = r.filter(i(c)), u = this.item(d), h = n.extend(!0, {}, c, u), p = this.option(h); d.replaceWith(p) } else { var f = this.option(c); if (c.children) { var m = this.convertToOptions(c.children); t.appendMany(f, m) } a.push(f) } } return a }, i }), t.define("select2/data/ajax", ["./array", "../utils", "jquery"], function (e, t, n) { function i(e, t) { this.ajaxOptions = this._applyDefaults(t.get("ajax")), null != this.ajaxOptions.processResults && (this.processResults = this.ajaxOptions.processResults), i.__super__.constructor.call(this, e, t) } return t.Extend(i, e), i.prototype._applyDefaults = function (e) { var t = { data: function (e) { return n.extend({}, e, { q: e.term }) }, transport: function (e, t, i) { var o = n.ajax(e); return o.then(t), o.fail(i), o } }; return n.extend({}, t, e, !0) }, i.prototype.processResults = function (e) { return e }, i.prototype.query = function (e, t) { function i() { var i = r.transport(r, function (i) { var r = o.processResults(i, e); o.options.get("debug") && window.console && console.error && (r && r.results && n.isArray(r.results) || console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")), t(r) }, function () { i.status && "0" === i.status || o.trigger("results:message", { message: "errorLoading" }) }); o._request = i } var o = this; null != this._request && (n.isFunction(this._request.abort) && this._request.abort(), this._request = null); var r = n.extend({ type: "GET" }, this.ajaxOptions); "function" == typeof r.url && (r.url = r.url.call(this.$element, e)), "function" == typeof r.data && (r.data = r.data.call(this.$element, e)), this.ajaxOptions.delay && null != e.term ? (this._queryTimeout && window.clearTimeout(this._queryTimeout), this._queryTimeout = window.setTimeout(i, this.ajaxOptions.delay)) : i() }, i }), t.define("select2/data/tags", ["jquery"], function (e) { function t(t, n, i) { var o = i.get("tags"), r = i.get("createTag"); void 0 !== r && (this.createTag = r); var s = i.get("insertTag"); if (void 0 !== s && (this.insertTag = s), t.call(this, n, i), e.isArray(o)) for (var a = 0; a < o.length; a++) { var l = o[a], c = this._normalizeItem(l), d = this.option(c); this.$element.append(d) } } return t.prototype.query = function (e, t, n) { function i(e, r) { for (var s = e.results, a = 0; a < s.length; a++) { var l = s[a], c = null != l.children && !i({ results: l.children }, !0), d = l.text === t.term; if (d || c) return r ? !1 : (e.data = s, void n(e)) } if (r) return !0; var u = o.createTag(t); if (null != u) { var h = o.option(u); h.attr("data-select2-tag", !0), o.addOptions([h]), o.insertTag(s, u) } e.results = s, n(e) } var o = this; return this._removeOldTags(), null == t.term || null != t.page ? void e.call(this, t, n) : void e.call(this, t, i) }, t.prototype.createTag = function (t, n) { var i = e.trim(n.term); return "" === i ? null : { id: i, text: i } }, t.prototype.insertTag = function (e, t, n) { t.unshift(n) }, t.prototype._removeOldTags = function () { var t = (this._lastTag, this.$element.find("option[data-select2-tag]")); t.each(function () { this.selected || e(this).remove() }) }, t }), t.define("select2/data/tokenizer", ["jquery"], function (e) { function t(e, t, n) { var i = n.get("tokenizer"); void 0 !== i && (this.tokenizer = i), e.call(this, t, n) } return t.prototype.bind = function (e, t, n) { e.call(this, t, n), this.$search = t.dropdown.$search || t.selection.$search || n.find(".select2-search__field") }, t.prototype.query = function (t, n, i) { function o(t) { var n = s._normalizeItem(t), i = s.$element.find("option").filter(function () { return e(this).val() === n.id }); if (!i.length) { var o = s.option(n); o.attr("data-select2-tag", !0), s._removeOldTags(), s.addOptions([o]) } r(n) } function r(e) { s.trigger("select", { data: e }) } var s = this; n.term = n.term || ""; var a = this.tokenizer(n, this.options, o); a.term !== n.term && (this.$search.length && (this.$search.val(a.term), this.$search.focus()), n.term = a.term), t.call(this, n, i) }, t.prototype.tokenizer = function (t, n, i, o) { for (var r = i.get("tokenSeparators") || [], s = n.term, a = 0, l = this.createTag || function (e) { return { id: e.term, text: e.term } }; a < s.length;) { var c = s[a]; if (-1 !== e.inArray(c, r)) { var d = s.substr(0, a), u = e.extend({}, n, { term: d }), h = l(u); null != h ? (o(h), s = s.substr(a + 1) || "", a = 0) : a++ } else a++ } return { term: s } }, t }), t.define("select2/data/minimumInputLength", [], function () { function e(e, t, n) { this.minimumInputLength = n.get("minimumInputLength"), e.call(this, t, n) } return e.prototype.query = function (e, t, n) { return t.term = t.term || "", t.term.length < this.minimumInputLength ? void this.trigger("results:message", { message: "inputTooShort", args: { minimum: this.minimumInputLength, input: t.term, params: t } }) : void e.call(this, t, n) }, e }), t.define("select2/data/maximumInputLength", [], function () { function e(e, t, n) { this.maximumInputLength = n.get("maximumInputLength"), e.call(this, t, n) } return e.prototype.query = function (e, t, n) { return t.term = t.term || "", this.maximumInputLength > 0 && t.term.length > this.maximumInputLength ? void this.trigger("results:message", { message: "inputTooLong", args: { maximum: this.maximumInputLength, input: t.term, params: t } }) : void e.call(this, t, n) }, e }), t.define("select2/data/maximumSelectionLength", [], function () { function e(e, t, n) { this.maximumSelectionLength = n.get("maximumSelectionLength"), e.call(this, t, n) } return e.prototype.query = function (e, t, n) { var i = this; this.current(function (o) { var r = null != o ? o.length : 0; return i.maximumSelectionLength > 0 && r >= i.maximumSelectionLength ? void i.trigger("results:message", { message: "maximumSelected", args: { maximum: i.maximumSelectionLength } }) : void e.call(i, t, n) }) }, e }), t.define("select2/dropdown", ["jquery", "./utils"], function (e, t) { function n(e, t) { this.$element = e, this.options = t, n.__super__.constructor.call(this) } return t.Extend(n, t.Observable), n.prototype.render = function () { var t = e('<span class="select2-dropdown"><span class="select2-results"></span></span>'); return t.attr("dir", this.options.get("dir")), this.$dropdown = t, t }, n.prototype.bind = function () { }, n.prototype.position = function () { }, n.prototype.destroy = function () { this.$dropdown.remove() }, n }), t.define("select2/dropdown/search", ["jquery", "../utils"], function (e) { function t() { } return t.prototype.render = function (t) { var n = t.call(this), i = e('<span class="select2-search select2-search--dropdown"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" role="textbox" /></span>'); return this.$searchContainer = i, this.$search = i.find("input"), n.prepend(i), n }, t.prototype.bind = function (t, n, i) { var o = this; t.call(this, n, i), this.$search.on("keydown", function (e) { o.trigger("keypress", e), o._keyUpPrevented = e.isDefaultPrevented() }), this.$search.on("input", function () { e(this).off("keyup") }), this.$search.on("keyup input", function (e) { o.handleSearch(e) }), n.on("open", function () { o.$search.attr("tabindex", 0), o.$search.focus(), window.setTimeout(function () { o.$search.focus() }, 0) }), n.on("close", function () { o.$search.attr("tabindex", -1), o.$search.val("") }), n.on("focus", function () { n.isOpen() && o.$search.focus() }), n.on("results:all", function (e) { if (null == e.query.term || "" === e.query.term) { var t = o.showSearch(e); t ? o.$searchContainer.removeClass("select2-search--hide") : o.$searchContainer.addClass("select2-search--hide") } }) }, t.prototype.handleSearch = function () { if (!this._keyUpPrevented) { var e = this.$search.val(); this.trigger("query", { term: e }) } this._keyUpPrevented = !1 }, t.prototype.showSearch = function () { return !0 }, t }), t.define("select2/dropdown/hidePlaceholder", [], function () { function e(e, t, n, i) { this.placeholder = this.normalizePlaceholder(n.get("placeholder")), e.call(this, t, n, i) } 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 n = t.slice(0), i = t.length - 1; i >= 0; i--) { var o = t[i]; this.placeholder.id === o.id && n.splice(i, 1) } return n }, e }), t.define("select2/dropdown/infiniteScroll", ["jquery"], function (e) { function t(e, t, n, i) { this.lastParams = {}, e.call(this, t, n, i), 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) }, t.prototype.bind = function (t, n, i) { var o = this; t.call(this, n, i), n.on("query", function (e) { o.lastParams = e, o.loading = !0 }), n.on("query:append", function (e) { o.lastParams = e, o.loading = !0 }), this.$results.on("scroll", function () { var t = e.contains(document.documentElement, o.$loadingMore[0]); if (!o.loading && t) { var n = o.$results.offset().top + o.$results.outerHeight(!1), i = o.$loadingMore.offset().top + o.$loadingMore.outerHeight(!1); n + 50 >= i && o.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('<li class="select2-results__option select2-results__option--load-more"role="treeitem" aria-disabled="true"></li>'), n = this.options.get("translations").get("loadingMore"); return t.html(n(this.lastParams)), t }, t }), t.define("select2/dropdown/attachBody", ["jquery", "../utils"], function (e, t) { function n(t, n, i) { this.$dropdownParent = i.get("dropdownParent") || e(document.body), t.call(this, n, i) } return n.prototype.bind = function (e, t, n) { var i = this, o = !1; e.call(this, t, n), t.on("open", function () { i._showDropdown(), i._attachPositioningHandler(t), o || (o = !0, t.on("results:all", function () { i._positionDropdown(), i._resizeDropdown() }), t.on("results:append", function () { i._positionDropdown(), i._resizeDropdown() })) }), t.on("close", function () { i._hideDropdown(), i._detachPositioningHandler(t) }), this.$dropdownContainer.on("mousedown", function (e) { e.stopPropagation() }) }, n.prototype.destroy = function (e) { e.call(this), this.$dropdownContainer.remove() }, n.prototype.position = function (e, t, n) { t.attr("class", n.attr("class")), t.removeClass("select2"), t.addClass("select2-container--open"), t.css({ position: "absolute", top: -999999 }), this.$container = n }, n.prototype.render = function (t) { var n = e("<span></span>"), i = t.call(this); return n.append(i), this.$dropdownContainer = n, n }, n.prototype._hideDropdown = function () { this.$dropdownContainer.detach() }, n.prototype._attachPositioningHandler = function (n, i) { var o = this, r = "scroll.select2." + i.id, s = "resize.select2." + i.id, a = "orientationchange.select2." + i.id, l = this.$container.parents().filter(t.hasScroll); l.each(function () { e(this).data("select2-scroll-position", { x: e(this).scrollLeft(), y: e(this).scrollTop() }) }), l.on(r, function () { var t = e(this).data("select2-scroll-position"); e(this).scrollTop(t.y) }), e(window).on(r + " " + s + " " + a, function () { o._positionDropdown(), o._resizeDropdown() }) }, n.prototype._detachPositioningHandler = function (n, i) { var o = "scroll.select2." + i.id, r = "resize.select2." + i.id, s = "orientationchange.select2." + i.id, a = this.$container.parents().filter(t.hasScroll); a.off(o), e(window).off(o + " " + r + " " + s) }, n.prototype._positionDropdown = function () { var t = e(window), n = this.$dropdown.hasClass("select2-dropdown--above"), i = this.$dropdown.hasClass("select2-dropdown--below"), o = null, r = this.$container.offset(); r.bottom = r.top + this.$container.outerHeight(!1); var s = { height: this.$container.outerHeight(!1) }; s.top = r.top, s.bottom = r.top + s.height; var a = { height: this.$dropdown.outerHeight(!1) }, l = { top: t.scrollTop(), bottom: t.scrollTop() + t.height() }, c = l.top < r.top - a.height, d = l.bottom > r.bottom + a.height, u = { left: r.left, top: s.bottom }, h = this.$dropdownParent; "static" === h.css("position") && (h = h.offsetParent()); var p = h.offset(); u.top -= p.top, u.left -= p.left, n || i || (o = "below"), d || !c || n ? !c && d && n && (o = "below") : o = "above", ("above" == o || n && "below" !== o) && (u.top = s.top - p.top - a.height), null != o && (this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--" + o), this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--" + o)), this.$dropdownContainer.css(u) }, n.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) }, n.prototype._showDropdown = function () { this.$dropdownContainer.appendTo(this.$dropdownParent), this._positionDropdown(), this._resizeDropdown() }, n }), t.define("select2/dropdown/minimumResultsForSearch", [], function () { function e(t) { for (var n = 0, i = 0; i < t.length; i++) { var o = t[i]; o.children ? n += e(o.children) : n++ } return n } function t(e, t, n, i) { this.minimumResultsForSearch = n.get("minimumResultsForSearch"), this.minimumResultsForSearch < 0 && (this.minimumResultsForSearch = 1 / 0), e.call(this, t, n, i) } return t.prototype.showSearch = function (t, n) { return e(n.data.results) < this.minimumResultsForSearch ? !1 : t.call(this, n) }, t }), t.define("select2/dropdown/selectOnClose", [], function () { function e() { } return e.prototype.bind = function (e, t, n) { var i = this; e.call(this, t, n), t.on("close", function (e) { i._handleSelectOnClose(e) }) }, e.prototype._handleSelectOnClose = function (e, t) { if (t && null != t.originalSelect2Event) { var n = t.originalSelect2Event; if ("select" === n._type || "unselect" === n._type) return } var i = this.getHighlightedResults(); if (!(i.length < 1)) { var o = i.data("data"); null != o.element && o.element.selected || null == o.element && o.selected || this.trigger("select", { data: o }) } }, e }), t.define("select2/dropdown/closeOnSelect", [], function () { function e() { } return e.prototype.bind = function (e, t, n) { var i = this; e.call(this, t, n), t.on("select", function (e) { i._selectTriggered(e) }), t.on("unselect", function (e) { i._selectTriggered(e) }) }, e.prototype._selectTriggered = function (e, t) { var n = t.originalEvent; n && n.ctrlKey || this.trigger("close", { originalEvent: n, originalSelect2Event: t }) }, e }), t.define("select2/i18n/en", [], function () { return { errorLoading: function () { return "The results could not be loaded." }, inputTooLong: function (e) { var t = e.input.length - e.maximum, n = "Please delete " + t + " character"; return 1 != t && (n += "s"), n }, inputTooShort: function (e) { var t = e.minimum - e.input.length, n = "Please enter " + t + " or more characters"; return n }, loadingMore: function () { return "Loading more results\u2026" }, 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\u2026" } } }), t.define("select2/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, n, i, o, r, s, a, l, c, d, u, h, p, f, m, g, v, E, T, y, b, C, _, I, O, D, R, k) { function w() { this.reset() } w.prototype.apply = function (u) { if (u = e.extend(!0, {}, this.defaults, u), null == u.dataAdapter) { if (null != u.ajax ? u.dataAdapter = f : null != u.data ? u.dataAdapter = p : u.dataAdapter = h, u.minimumInputLength > 0 && (u.dataAdapter = c.Decorate(u.dataAdapter, v)), u.maximumInputLength > 0 && (u.dataAdapter = c.Decorate(u.dataAdapter, E)), u.maximumSelectionLength > 0 && (u.dataAdapter = c.Decorate(u.dataAdapter, T)), u.tags && (u.dataAdapter = c.Decorate(u.dataAdapter, m)), null == u.tokenSeparators && null == u.tokenizer || (u.dataAdapter = c.Decorate(u.dataAdapter, g)), null != u.query) { var k = t(u.amdBase + "compat/query"); u.dataAdapter = c.Decorate(u.dataAdapter, k) } if (null != u.initSelection) { var w = t(u.amdBase + "compat/initSelection"); u.dataAdapter = c.Decorate(u.dataAdapter, w) } } if (null == u.resultsAdapter && (u.resultsAdapter = n, null != u.ajax && (u.resultsAdapter = c.Decorate(u.resultsAdapter, _)), null != u.placeholder && (u.resultsAdapter = c.Decorate(u.resultsAdapter, C)), u.selectOnClose && (u.resultsAdapter = c.Decorate(u.resultsAdapter, D))), null == u.dropdownAdapter) { if (u.multiple) u.dropdownAdapter = y; else { var x = c.Decorate(y, b); u.dropdownAdapter = x } if (0 !== u.minimumResultsForSearch && (u.dropdownAdapter = c.Decorate(u.dropdownAdapter, O)), u.closeOnSelect && (u.dropdownAdapter = c.Decorate(u.dropdownAdapter, R)), null != u.dropdownCssClass || null != u.dropdownCss || null != u.adaptDropdownCssClass) { var K = t(u.amdBase + "compat/dropdownCss"); u.dropdownAdapter = c.Decorate(u.dropdownAdapter, K) } u.dropdownAdapter = c.Decorate(u.dropdownAdapter, I) } if (null == u.selectionAdapter) { if (u.multiple ? u.selectionAdapter = o : u.selectionAdapter = i, null != u.placeholder && (u.selectionAdapter = c.Decorate(u.selectionAdapter, r)), u.allowClear && (u.selectionAdapter = c.Decorate(u.selectionAdapter, s)), u.multiple && (u.selectionAdapter = c.Decorate(u.selectionAdapter, a)), null != u.containerCssClass || null != u.containerCss || null != u.adaptContainerCssClass) { var S = t(u.amdBase + "compat/containerCss"); u.selectionAdapter = c.Decorate(u.selectionAdapter, S) } u.selectionAdapter = c.Decorate(u.selectionAdapter, l) } if ("string" == typeof u.language) if (u.language.indexOf("-") > 0) { var N = u.language.split("-"), A = N[0]; u.language = [u.language, A] } else u.language = [u.language]; if (e.isArray(u.language)) { var $ = new d; u.language.push("en"); for (var L = u.language, P = 0; P < L.length; P++) { var F = L[P], B = {}; try { B = d.loadPath(F) } catch (M) { try { F = this.defaults.amdLanguageBase + F, B = d.loadPath(F) } catch (H) { u.debug && window.console && console.warn && console.warn('Select2: The language file for "' + F + '" could not be automatically loaded. A fallback will be used instead.'); continue } } $.extend(B) } u.translations = $ } else { var q = d.loadPath(this.defaults.amdLanguageBase + "en"), j = new d(u.language); j.extend(q), u.translations = j } return u }, w.prototype.reset = function () { function t(e) { function t(e) { return u[e] || e } return e.replace(/[^\u0000-\u007E]/g, t) } function n(i, o) { if ("" === e.trim(i.term)) return o; if (o.children && o.children.length > 0) { for (var r = e.extend(!0, {}, o), s = o.children.length - 1; s >= 0; s--) { var a = o.children[s], l = n(i, a); null == l && r.children.splice(s, 1) } return r.children.length > 0 ? r : n(i, r) } var c = t(o.text).toUpperCase(), d = t(i.term).toUpperCase(); return c.indexOf(d) > -1 ? o : null } this.defaults = { amdBase: "./", amdLanguageBase: "./i18n/", closeOnSelect: !0, debug: !1, dropdownAutoWidth: !1, escapeMarkup: c.escapeMarkup, language: k, matcher: n, minimumInputLength: 0, maximumInputLength: 0, maximumSelectionLength: 0, minimumResultsForSearch: 0, selectOnClose: !1, sorter: function (e) { return e }, templateResult: function (e) { return e.text }, templateSelection: function (e) { return e.text }, theme: "default", width: "resolve" } }, w.prototype.set = function (t, n) { var i = e.camelCase(t), o = {}; o[i] = n; var r = c._convertData(o); e.extend(this.defaults, r) }; var x = new w; return x }), t.define("select2/options", ["require", "jquery", "./defaults", "./utils"], function (e, t, n, i) { function o(t, o) { if (this.options = t, null != o && this.fromElement(o), this.options = n.apply(this.options), o && o.is("input")) { var r = e(this.get("amdBase") + "compat/inputData"); this.options.dataAdapter = i.Decorate(this.options.dataAdapter, r) } } return o.prototype.fromElement = function (e) { var n = ["select2"]; null == this.options.multiple && (this.options.multiple = e.prop("multiple")), null == this.options.disabled && (this.options.disabled = e.prop("disabled")), null == this.options.language && (e.prop("lang") ? this.options.language = e.prop("lang").toLowerCase() : e.closest("[lang]").prop("lang") && (this.options.language = e.closest("[lang]").prop("lang"))), 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), e.data("select2Tags") && (this.options.debug && window.console && console.warn && console.warn('Select2: The `data-select2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of Select2.'), e.data("data", e.data("select2Tags")), e.data("tags", !0)), e.data("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", e.data("ajaxUrl")), e.data("ajax--url", e.data("ajaxUrl"))); var o = {}; o = t.fn.jquery && "1." == t.fn.jquery.substr(0, 2) && e[0].dataset ? t.extend(!0, {}, e[0].dataset, e.data()) : e.data(); var r = t.extend(!0, {}, o); r = i._convertData(r); for (var s in r) t.inArray(s, n) > -1 || (t.isPlainObject(this.options[s]) ? t.extend(this.options[s], r[s]) : this.options[s] = r[s]); return this }, o.prototype.get = function (e) { return this.options[e] }, o.prototype.set = function (e, t) { this.options[e] = t }, o }), t.define("select2/core", ["jquery", "./options", "./utils", "./keys"], function (e, t, n, i) {
93            var o = function (e, n) { null != e.data("select2") && e.data("select2").destroy(), this.$element = e, this.id = this._generateId(e), n = n || {}, this.options = new t(n, e), o.__super__.constructor.call(this); var i = e.attr("tabindex") || 0; e.data("old-tabindex", i), e.attr("tabindex", "-1"); var r = this.options.get("dataAdapter"); this.dataAdapter = new r(e, this.options); var s = this.render(); this._placeContainer(s); var a = this.options.get("selectionAdapter"); this.selection = new a(e, this.options), this.$selection = this.selection.render(), this.selection.position(this.$selection, s); var l = this.options.get("dropdownAdapter"); this.dropdown = new l(e, this.options), this.$dropdown = this.dropdown.render(), this.dropdown.position(this.$dropdown, s); var c = this.options.get("resultsAdapter"); this.results = new c(e, this.options, this.dataAdapter), this.$results = this.results.render(), this.results.position(this.$results, this.$dropdown); var d = this; this._bindAdapters(), this._registerDomEvents(), this._registerDataEvents(), this._registerSelectionEvents(), this._registerDropdownEvents(), this._registerResultsEvents(), this._registerEvents(), this.dataAdapter.current(function (e) { d.trigger("selection:update", { data: e }) }), e.addClass("select2-hidden-accessible"), e.attr("aria-hidden", "true"), this._syncAttributes(), e.data("select2", this) }; return n.Extend(o, n.Observable), o.prototype._generateId = function (e) { var t = ""; return t = null != e.attr("id") ? e.attr("id") : null != e.attr("name") ? e.attr("name") + "-" + n.generateChars(2) : n.generateChars(4), t = t.replace(/(:|\.|\[|\]|,)/g, ""), t = "select2-" + t }, o.prototype._placeContainer = function (e) { e.insertAfter(this.$element); var t = this._resolveWidth(this.$element, this.options.get("width")); null != t && e.css("width", t) }, o.prototype._resolveWidth = function (e, t) { var n = /^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i; if ("resolve" == t) { var i = this._resolveWidth(e, "style"); return null != i ? i : this._resolveWidth(e, "element") } if ("element" == t) { var o = e.outerWidth(!1); return 0 >= o ? "auto" : o + "px" } if ("style" == t) { var r = e.attr("style"); if ("string" != typeof r) return null; for (var s = r.split(";"), a = 0, l = s.length; l > a; a += 1) { var c = s[a].replace(/\s/g, ""), d = c.match(n); if (null !== d && d.length >= 1) return d[1] } return null } return t }, o.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) }, o.prototype._registerDomEvents = function () { var t = this; this.$element.on("change.select2", function () { t.dataAdapter.current(function (e) { t.trigger("selection:update", { data: e }) }) }), this.$element.on("focus.select2", function (e) { t.trigger("focus", e) }), this._syncA = n.bind(this._syncAttributes, this), this._syncS = n.bind(this._syncSubtree, this), this.$element[0].attachEvent && this.$element[0].attachEvent("onpropertychange", this._syncA); var i = window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver; null != i ? (this._observer = new i(function (n) { e.each(n, t._syncA), e.each(n, 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)) }, o.prototype._registerDataEvents = function () { var e = this; this.dataAdapter.on("*", function (t, n) { e.trigger(t, n) }) }, o.prototype._registerSelectionEvents = function () { var t = this, n = ["toggle", "focus"]; this.selection.on("toggle", function () { t.toggleDropdown() }), this.selection.on("focus", function (e) { t.focus(e) }), this.selection.on("*", function (i, o) { -1 === e.inArray(i, n) && t.trigger(i, o) }) }, o.prototype._registerDropdownEvents = function () { var e = this; this.dropdown.on("*", function (t, n) { e.trigger(t, n) }) }, o.prototype._registerResultsEvents = function () { var e = this; this.results.on("*", function (t, n) { e.trigger(t, n) }) }, o.prototype._registerEvents = function () { var e = this; this.on("open", function () { e.$container.addClass("select2-container--open") }), this.on("close", function () { e.$container.removeClass("select2-container--open") }), this.on("enable", function () { e.$container.removeClass("select2-container--disabled") }), this.on("disable", function () { e.$container.addClass("select2-container--disabled") }), this.on("blur", function () { e.$container.removeClass("select2-container--focus") }), this.on("query", function (t) { e.isOpen() || e.trigger("open", {}), this.dataAdapter.query(t, function (n) { e.trigger("results:all", { data: n, query: t }) }) }), this.on("query:append", function (t) { this.dataAdapter.query(t, function (n) { e.trigger("results:append", { data: n, query: t }) }) }), this.on("keypress", function (t) { var n = t.which; e.isOpen() ? n === i.ESC || n === i.TAB || n === i.UP && t.altKey ? (e.close(), t.preventDefault()) : n === i.ENTER ? (e.trigger("results:select", {}), t.preventDefault()) : n === i.SPACE && t.ctrlKey ? (e.trigger("results:toggle", {}), t.preventDefault()) : n === i.UP ? (e.trigger("results:previous", {}), t.preventDefault()) : n === i.DOWN && (e.trigger("results:next", {}), t.preventDefault()) : (n === i.ENTER || n === i.SPACE || n === i.DOWN && t.altKey) && (e.open(), t.preventDefault()) }) }, o.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", {}) }, o.prototype._syncSubtree = function (e, t) { var n = !1, i = this; if (!e || !e.target || "OPTION" === e.target.nodeName || "OPTGROUP" === e.target.nodeName) { if (t) if (t.addedNodes && t.addedNodes.length > 0) for (var o = 0; o < t.addedNodes.length; o++) { var r = t.addedNodes[o]; r.selected && (n = !0) } else t.removedNodes && t.removedNodes.length > 0 && (n = !0); else n = !0; n && this.dataAdapter.current(function (e) { i.trigger("selection:update", { data: e }) }) } }, o.prototype.trigger = function (e, t) { var n = o.__super__.trigger, i = { open: "opening", close: "closing", select: "selecting", unselect: "unselecting" }; if (void 0 === t && (t = {}), e in i) { var r = i[e], s = { prevented: !1, name: e, args: t }; if (n.call(this, r, s), s.prevented) return void (t.prevented = !0) } n.call(this, e, t) }, o.prototype.toggleDropdown = function () { this.options.get("disabled") || (this.isOpen() ? this.close() : this.open()) }, o.prototype.open = function () { this.isOpen() || this.trigger("query", {}) }, o.prototype.close = function () { this.isOpen() && this.trigger("close", {}) }, o.prototype.isOpen = function () { return this.$container.hasClass("select2-container--open") }, o.prototype.hasFocus = function () { return this.$container.hasClass("select2-container--focus") }
93, o.prototype.focus = function () { this.hasFocus() || (this.$container.addClass("select2-container--focus"), this.trigger("focus", {})) }, o.prototype.enable = function (e) { this.options.get("debug") && window.console && console.warn && console.warn('Select2: The `select2("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) }, o.prototype.data = function () { this.options.get("debug") && arguments.length > 0 && window.console && console.warn && console.warn('Select2: Data can no longer be set using `select2("data")`. You should consider setting the value instead using `$element.val()`.'); var e = []; return this.dataAdapter.current(function (t) { e = t }), e }, o.prototype.val = function (t) { if (this.options.get("debug") && window.console && console.warn && console.warn('Select2: The `select2("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 n = t[0]; e.isArray(n) && (n = e.map(n, function (e) { return e.toString() })), this.$element.val(n).trigger("change") }, o.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(".select2"), this.$element.attr("tabindex", this.$element.data("old-tabindex")), this.$element.removeClass("select2-hidden-accessible"), this.$element.attr("aria-hidden", "false"), this.$element.removeData("select2"), this.dataAdapter.destroy(), this.selection.destroy(), this.dropdown.destroy(), this.results.destroy(), this.dataAdapter = null, this.selection = null, this.dropdown = null, this.results = null }, o.prototype.render = function () { var t = e('<span class="select2 select2-container"><span class="selection"></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>'); return t.attr("dir", this.options.get("dir")), this.$container = t, this.$container.addClass("select2-container--" + this.options.get("theme")), t.data("element", this.$element), t }, o
94        }), t.define("jquery-mousewheel", ["jquery"], function (e) { return e }), t.define("jquery.select2", ["jquery", "jquery-mousewheel", "./select2/core", "./select2/defaults"], function (e, t, n, i) { if (null == e.fn.select2) { var o = ["open", "close", "destroy"]; e.fn.select2 = function (t) { if (t = t || {}, "object" == typeof t) return this.each(function () { var i = e.extend(!0, {}, t); new n(e(this), i) }), this; if ("string" == typeof t) { var i, r = Array.prototype.slice.call(arguments, 1); return this.each(function () { var n = e(this).data("select2"); null == n && window.console && console.error && console.error("The select2('" + t + "') method was called on an element that is not using Select2."), i = n[t].apply(n, r) }), e.inArray(t, o) > -1 ? this : i } throw new Error("Invalid arguments for Select2: " + t) } } return null == e.fn.select2.defaults && (e.fn.select2.defaults = i), n }), { define: t.define, require: t.require }
95    }(), n = t.require("jquery.select2"); return e.fn.select2.amd = t, n
96}), function (e) { "use strict"; "function" == typeof define && define.amd ? define(e) : "undefined" != typeof module && "undefined" != typeof module.exports ? module.exports = e() : "undefined" != typeof Package ? Sortable = e() : window.Sortable = e() }(function () { "use strict"; function e(e, t) { if (!e || !e.nodeType || 1 !== e.nodeType) throw "Sortable: `el` must be HTMLElement, and not " + {}.toString.call(e); this.el = e, this.options = t = v({}, t), e[P] = this; var n = { group: Math.random(), sort: !0, disabled: !1, store: null, handle: null, scroll: !0, scrollSensitivity: 30, scrollSpeed: 10, draggable: /[uo]l/i.test(e.nodeName) ? "li" : ">*", ghostClass: "sortable-ghost", chosenClass: "sortable-chosen", ignore: "a, img", filter: null, animation: 0, setData: function (e, t) { e.setData("Text", t.textContent) }, dropBubble: !1, dragoverBubble: !1, dataIdAttr: "data-id", delay: 0, forceFallback: !1, fallbackClass: "sortable-fallback", fallbackOnBody: !1 }; for (var i in n) !(i in t) && (t[i] = n[i]); V(t); for (var r in this) "_" === r.charAt(0) && (this[r] = this[r].bind(this)); this.nativeDraggable = t.forceFallback ? !1 : H, o(e, "mousedown", this._onTapStart), o(e, "touchstart", this._onTapStart), this.nativeDraggable && (o(e, "dragover", this), o(e, "dragenter", this)), U.push(this._onDragOver), t.store && this.sort(t.store.get(this)) }
96 function t(e) { b && b.state !== e && (a(b, "display", e ? "none" : ""), !e && b.state && C.insertBefore(b, E), b.state = e) } function n(e, t, n) { if (e) { n = n || B, t = t.split("."); var i = t.shift().toUpperCase(), o = new RegExp("\\s(" + t.join("|") + ")(?=\\s)", "g"); do if (">*" === i && e.parentNode === n || ("" === i || e.nodeName.toUpperCase() == i) && (!t.length || ((" " + e.className + " ").match(o) || []).length == t.length)) return e; while (e !== n && (e = e.parentNode)) } return null } function i(e) { e.dataTransfer && (e.dataTransfer.dropEffect = "move"), e.preventDefault() } function o(e, t, n) { e.addEventListener(t, n, !1) } function r(e, t, n) { e.removeEventListener(t, n, !1) } function s(e, t, n) { if (e) if (e.classList) e.classList[n ? "add" : "remove"](t); else { var i = (" " + e.className + " ").replace(L, " ").replace(" " + t + " ", " "); e.className = (i + (n ? " " + t : "")).replace(L, " ") } } function a(e, t, n) { var i = e && e.style; if (i) { if (void 0 === n) return B.defaultView && B.defaultView.getComputedStyle ? n = B.defaultView.getComputedStyle(e, "") : e.currentStyle && (n = e.currentStyle), void 0 === t ? n : n[t]; t in i || (t = "-webkit-" + t), i[t] = n + ("string" == typeof n ? "" : "px") } } function l(e, t, n) { if (e) { var i = e.getElementsByTagName(t), o = 0, r = i.length; if (n) for (; r > o; o++)n(i[o], o); return i } return [] } function c(e, t, n, i, o, r, s) { var a = B.createEvent("Event"), l = (e || t[P]).options, c = "on" + n.charAt(0).toUpperCase() + n.substr(1); a.initEvent(n, !0, !0), a.to = t, a.from = o || t, a.item = i || t, a.clone = b, a.oldIndex = r, a.newIndex = s, t.dispatchEvent(a), l[c] && l[c].call(e, a) } function d(e, t, n, i, o, r) { var s, a, l = e[P], c = l.options.onMove; return s = B.createEvent("Event"), s.initEvent("move", !0, !0), s.to = t, s.from = e, s.dragged = n, s.draggedRect = i, s.related = o || t, s.relatedRect = r || t.getBoundingClientRect(), e.dispatchEvent(s), c && (a = c.call(l, s)), a } function u(e) { e.draggable = !1 } function h() { j = !1 } function p(e, t) { var n = e.lastElementChild, i = n.getBoundingClientRect(); return (t.clientY - (i.top + i.height) > 5 || t.clientX - (i.right + i.width) > 5) && n } function f(e) { for (var t = e.tagName + e.className + e.src + e.href + e.textContent, n = t.length, i = 0; n--;)i += t.charCodeAt(n); return i.toString(36) } function m(e) { var t = 0; if (!e || !e.parentNode) return -1; for (; e && (e = e.previousElementSibling);)"TEMPLATE" !== e.nodeName.toUpperCase() && t++; return t } function g(e, t) { var n, i; return function () { void 0 === n && (n = arguments, i = this, setTimeout(function () { 1 === n.length ? e.call(i, n[0]) : e.apply(i, n), n = void 0 }, t)) } } function v(e, t) { if (e && t) for (var n in t) t.hasOwnProperty(n) && (e[n] = t[n]); return e } var E, T, y, b, C, _, I, O, D, R, k, w, x, K, S, N, A, $ = {}, L = /\s+/g, P = "Sortable" + (new Date).getTime(), F = window, B = F.document, M = F.parseInt, H = !!("draggable" in B.createElement("div")), q = function (e) { return e = B.createElement("x"), e.style.cssText = "pointer-events:auto", "auto" === e.style.pointerEvents }(), j = !1, z = Math.abs, U = ([].slice, []), W = g(function (e, t, n) { if (n && t.scroll) { var i, o, r, s, a = t.scrollSensitivity, l = t.scrollSpeed, c = e.clientX, d = e.clientY, u = window.innerWidth, h = window.innerHeight; if (O !== n && (I = t.scroll, O = n, I === !0)) { I = n; do if (I.offsetWidth < I.scrollWidth || I.offsetHeight < I.scrollHeight) break; while (I = I.parentNode) } I && (i = I, o = I.getBoundingClientRect(), r = (z(o.right - c) <= a) - (z(o.left - c) <= a), s = (z(o.bottom - d) <= a) - (z(o.top - d) <= a)), r || s || (r = (a >= u - c) - (a >= c), s = (a >= h - d) - (a >= d), (r || s) && (i = F)), $.vx === r && $.vy === s && $.el === i || ($.el = i, $.vx = r, $.vy = s, clearInterval($.pid), i && ($.pid = setInterval(function () { i === F ? F.scrollTo(F.pageXOffset + r * l, F.pageYOffset + s * l) : (s && (i.scrollTop += s * l), r && (i.scrollLeft += r * l)) }, 24))) } }, 30), V = function (e) { var t = e.group; t && "object" == typeof t || (t = e.group = { name: t }), ["pull", "put"].forEach(function (e) { e in t || (t[e] = !0) }), e.groups = " " + t.name + (t.put.join ? " " + t.put.join(" ") : "") + " " }; return e.prototype = { constructor: e, _onTapStart: function (e) { var t = this, i = this.el, o = this.options, r = e.type, s = e.touches && e.touches[0], a = (s || e).target, l = a, d = o.filter; if (!("mousedown" === r && 0 !== e.button || o.disabled) && (a = n(a, o.draggable, i))) { if (w = m(a), "function" == typeof d) { if (d.call(this, e, a, this)) return c(t, l, "filter", a, i, w), void e.preventDefault() } else if (d && (d = d.split(",").some(function (e) { return e = n(l, e.trim(), i), e ? (c(t, e, "filter", a, i, w), !0) : void 0 }))) return void e.preventDefault(); o.handle && !n(l, o.handle, i) || this._prepareDragStart(e, s, a) } }, _prepareDragStart: function (e, t, n) { var i, r = this, a = r.el, c = r.options, d = a.ownerDocument; n && !E && n.parentNode === a && (S = e, C = a, E = n, T = E.parentNode, _ = E.nextSibling, K = c.group, i = function () { r._disableDelayedDrag(), E.draggable = !0, s(E, r.options.chosenClass, !0), r._triggerDragStart(t) }, c.ignore.split(",").forEach(function (e) { l(E, e.trim(), u) }), o(d, "mouseup", r._onDrop), o(d, "touchend", r._onDrop), o(d, "touchcancel", r._onDrop), c.delay ? (o(d, "mouseup", r._disableDelayedDrag), o(d, "touchend", r._disableDelayedDrag), o(d, "touchcancel", r._disableDelayedDrag), o(d, "mousemove", r._disableDelayedDrag), o(d, "touchmove", r._disableDelayedDrag), r._dragStartTimer = setTimeout(i, c.delay)) : i()) }, _disableDelayedDrag: function () { var e = this.el.ownerDocument; clearTimeout(this._dragStartTimer), r(e, "mouseup", this._disableDelayedDrag), r(e, "touchend", this._disableDelayedDrag), r(e, "touchcancel", this._disableDelayedDrag), r(e, "mousemove", this._disableDelayedDrag), r(e, "touchmove", this._disableDelayedDrag) }, _triggerDragStart: function (e) { e ? (S = { target: E, clientX: e.clientX, clientY: e.clientY }, this._onDragStart(S, "touch")) : this.nativeDraggable ? (o(E, "dragend", this), o(C, "dragstart", this._onDragStart)) : this._onDragStart(S, !0); try { B.selection ? B.selection.empty() : window.getSelection().removeAllRanges() } catch (t) { } }, _dragStarted: function () { C && E && (s(E, this.options.ghostClass, !0), e.active = this, c(this, C, "start", E, C, w)) }, _emulateDragOver: function () { if (N) { if (this._lastX === N.clientX && this._lastY === N.clientY) return; this._lastX = N.clientX, this._lastY = N.clientY, q || a(y, "display", "none"); var e = B.elementFromPoint(N.clientX, N.clientY), t = e, n = " " + this.options.group.name, i = U.length; if (t) do { if (t[P] && t[P].options.groups.indexOf(n) > -1) { for (; i--;)U[i]({ clientX: N.clientX, clientY: N.clientY, target: e, rootEl: t }); break } e = t } while (t = t.parentNode); q || a(y, "display", "") } }, _onTouchMove: function (t) { if (S) { e.active || this._dragStarted(), this._appendGhost(); var n = t.touches ? t.touches[0] : t, i = n.clientX - S.clientX, o = n.clientY - S.clientY, r = t.touches ? "translate3d(" + i + "px," + o + "px,0)" : "translate(" + i + "px," + o + "px)"; A = !0, N = n, a(y, "webkitTransform", r), a(y, "mozTransform", r), a(y, "msTransform", r), a(y, "transform", r), t.preventDefault() } }, _appendGhost: function () { if (!y) { var e, t = E.getBoundingClientRect(), n = a(E), i = this.options; y = E.cloneNode(!0), s(y, i.ghostClass, !1), s(y, i.fallbackClass, !0), a(y, "top", t.top - M(n.marginTop, 10)), a(y, "left", t.left - M(n.marginLeft, 10)), a(y, "width", t.width), a(y, "height", t.height), a(y, "opacity", "0.8"), a(y, "position", "fixed"), a(y, "zIndex", "100000"), a(y, "pointerEvents", "none"), i.fallbackOnBody && B.body.appendChild(y) || C.appendChild(y), e = y.getBoundingClientRect(), a(y, "width", 2 * t.width - e.width), a(y, "height", 2 * t.height - e.height) } }, _onDragStart: function (e, t) { var n = e.dataTransfer, i = this.options; this._offUpEvents(), "clone" == K.pull && (b = E.cloneNode(!0), a(b, "dis
96play", "none"), C.insertBefore(b, E)), t ? ("touch" === t ? (o(B, "touchmove", this._onTouchMove), o(B, "touchend", this._onDrop), o(B, "touchcancel", this._onDrop)) : (o(B, "mousemove", this._onTouchMove), o(B, "mouseup", this._onDrop)), this._loopId = setInterval(this._emulateDragOver, 50)) : (n && (n.effectAllowed = "move", i.setData && i.setData.call(this, n, E)), o(B, "drop", this), setTimeout(this._dragStarted, 0)) }, _onDragOver: function (e) { var i, o, r, s = this.el, l = this.options, c = l.group, u = c.put, f = K === c, m = l.sort; if (void 0 !== e.preventDefault && (e.preventDefault(), !l.dragoverBubble && e.stopPropagation()), A = !0, K && !l.disabled && (f ? m || (r = !C.contains(E)) : K.pull && u && (K.name === c.name || u.indexOf && ~u.indexOf(K.name))) && (void 0 === e.rootEl || e.rootEl === this.el)) { if (W(e, l, this.el), j) return; if (i = n(e.target, l.draggable, s), o = E.getBoundingClientRect(), r) return t(!0), void (b || _ ? C.insertBefore(E, b || _) : m || C.appendChild(E)); if (0 === s.children.length || s.children[0] === y || s === e.target && (i = p(s, e))) { if (i) { if (i.animated) return; v = i.getBoundingClientRect() } t(f), d(C, s, E, o, i, v) !== !1 && (E.contains(s) || (s.appendChild(E), T = s), this._animate(o, E), i && this._animate(v, i)) } else if (i && !i.animated && i !== E && void 0 !== i.parentNode[P]) { D !== i && (D = i, R = a(i), k = a(i.parentNode)); var g, v = i.getBoundingClientRect(), I = v.right - v.left, O = v.bottom - v.top, w = /left|right|inline/.test(R.cssFloat + R.display) || "flex" == k.display && 0 === k["flex-direction"].indexOf("row"), x = i.offsetWidth > E.offsetWidth, S = i.offsetHeight > E.offsetHeight, N = (w ? (e.clientX - v.left) / I : (e.clientY - v.top) / O) > .5, $ = i.nextElementSibling, L = d(C, s, E, o, i, v); if (L !== !1) { if (j = !0, setTimeout(h, 30), t(f), 1 === L || -1 === L) g = 1 === L; else if (w) { var F = E.offsetTop, B = i.offsetTop; g = F === B ? i.previousElementSibling === E && !x || N && x : B > F } else g = $ !== E && !S || N && S; E.contains(s) || (g && !$ ? s.appendChild(E) : i.parentNode.insertBefore(E, g ? $ : i)), T = E.parentNode, this._animate(o, E), this._animate(v, i) } } } }, _animate: function (e, t) { var n = this.options.animation; if (n) { var i = t.getBoundingClientRect(); a(t, "transition", "none"), a(t, "transform", "translate3d(" + (e.left - i.left) + "px," + (e.top - i.top) + "px,0)"), t.offsetWidth, a(t, "transition", "all " + n + "ms"), a(t, "transform", "translate3d(0,0,0)"), clearTimeout(t.animated), t.animated = setTimeout(function () { a(t, "transition", ""), a(t, "transform", ""), t.animated = !1 }, n) } }, _offUpEvents: function () { var e = this.el.ownerDocument; r(B, "touchmove", this._onTouchMove), r(e, "mouseup", this._onDrop), r(e, "touchend", this._onDrop), r(e, "touchcancel", this._onDrop) }, _onDrop: function (t) { var n = this.el, i = this.options; clearInterval(this._loopId), clearInterval($.pid), clearTimeout(this._dragStartTimer), r(B, "mousemove", this._onTouchMove), this.nativeDraggable && (r(B, "drop", this), r(n, "dragstart", this._onDragStart)), this._offUpEvents(), t && (A && (t.preventDefault(), !i.dropBubble && t.stopPropagation()), y && y.parentNode.removeChild(y), E && (this.nativeDraggable && r(E, "dragend", this), u(E), s(E, this.options.ghostClass, !1), s(E, this.options.chosenClass, !1), C !== T ? (x = m(E), x >= 0 && (c(null, T, "sort", E, C, w, x), c(this, C, "sort", E, C, w, x), c(null, T, "add", E, C, w, x), c(this, C, "remove", E, C, w, x))) : (b && b.parentNode.removeChild(b), E.nextSibling !== _ && (x = m(E), x >= 0 && (c(this, C, "update", E, C, w, x), c(this, C, "sort", E, C, w, x)))), e.active && (null !== x && -1 !== x || (x = w), c(this, C, "end", E, C, w, x), this.save())), C = E = T = y = _ = b = I = O = S = N = A = x = D = R = K = e.active = null) }, handleEvent: function (e) { var t = e.type; "dragover" === t || "dragenter" === t ? E && (this._onDragOver(e), i(e)) : "drop" !== t && "dragend" !== t || this._onDrop(e) }, toArray: function () { for (var e, t = [], i = this.el.children, o = 0, r = i.length, s = this.options; r > o; o++)e = i[o], n(e, s.draggable, this.el) && t.push(e.getAttribute(s.dataIdAttr) || f(e)); return t }, sort: function (e) { var t = {}, i = this.el;
96 this.toArray().forEach(function (e, o) { var r = i.children[o]; n(r, this.options.draggable, i) && (t[e] = r) }, this), e.forEach(function (e) { t[e] && (i.removeChild(t[e]), i.appendChild(t[e])) }) }, save: function () { var e = this.options.store; e && e.set(this) }, closest: function (e, t) { return n(e, t || this.options.draggable, this.el) }, option: function (e, t) { var n = this.options; return void 0 === t ? n[e] : (n[e] = t, void ("group" === e && V(n))) }, destroy: function () { var e = this.el; e[P] = null, r(e, "mousedown", this._onTapStart), r(e, "touchstart", this._onTapStart), this.nativeDraggable && (r(e, "dragover", this), r(e, "dragenter", this)), Array.prototype.forEach.call(e.querySelectorAll("[draggable]"), function (e) { e.removeAttribute("draggable") }), U.splice(U.indexOf(this._onDragOver), 1), this._onDrop(), this.el = e = null } }, e.utils = { on: o, off: r, css: a, find: l, is: function (e, t) { return !!n(e, t, e) }, extend: v, throttle: g, closest: n, toggleClass: s, index: m }, e.create = function (t, n) { return new e(t, n) }, e.version = "1.4.2", e }), function () { var e = function (e, n) { function i() { this.constructor = e } for (var o in n) t.call(n, o) && (e[o] = n[o]); return i.prototype = n.prototype, e.prototype = new i, e.__super__ = n.prototype, e }, t = {}.hasOwnProperty; this.MultiSelectMultiSubmitSortable = function (t) { function n() { return n.__super__.constructor.apply(this, arguments) } return e(n, t), n.prototype.init = function () { var e, t, n; return this.sortableTarget = this.data("sortable-target"), this.$dom.find("input[name$='_destroy]']").val(!1), this.$addAssociation = this.$dom.find("[role='add-assoc']"), this.itemId = this.data("item-id-attr"), n = { width: "100%", multiple: !0, placeholder: "Type here" }, this.$select = this.$dom.find("select"), this.$select.select2(n), e = { draggable: ".cocoon-row", dataIdAttr: "position", disabled: !1, handle: ".cocoon-row__handle", onSort: function (e) { return function () { return e.calculateOrder() } }(this) }, t = this.$dom.find(this.sortableTarget).get(0), this.sortable = Sortable.create(t, e), this.$select.on("select2:select", function (e) { return function () { return $.each(e.$select.select2("data"), function (t, n) { var i, o; return i = e.$dom.find(".cocoon-row[data-item-id='" + n.id + "']"), 0 === i.length && (e.$addAssociation.trigger("click"), i = e.$dom.find(".js-empty"), i.attr("data-item-id", n.id), i.removeClass("js-empty")), i.find("input[name$='" + e.itemId + "]']").val(n.id), i.find("input[name$='position]']").val(1e3), i.find(".cocoon-row__title").html(n.text), i.show(), o = i.find(".cocoon-row__remove a"), o.attr("data-confirm", "Are you sure?") }) } }(this)), this.$select.on("select2:unselect", function (e) { return function (t) { var n, i; return n = e.$dom.find(".cocoon-row[data-item-id='" + t.params.data.id + "']"), i = n.find(".cocoon-row__remove a"), i.removeAttr("data-confirm"), i.trigger("click") } }(this)), this.$dom.on("cocoon:before-remove", function (e) { return function (t, n) { return e.$select.find("option[value='" + n.data("item-id") + "']").removeAttr("selected") } }(this)) }, n.prototype.calculateOrder = function () { var e, t, n, i, o, r; for (e = this.$dom.find(".cocoon-row"), r = [], n = t = 0, o = e.length; o > t; n = ++t)i = e[n], r.push($(i).find('input[name$="[position]"]').val(n)); return r }, n }(Behaviour) }.call(this), function () { var e = function (e, n) { function i() { this.constructor = e } for (var o in n) t.call(n, o) && (e[o] = n[o]); return i.prototype = n.prototype, e.prototype = new i, e.__super__ = n.prototype, e }, t = {}.hasOwnProperty; this.MultiUpload = function (t) { function n() { return n.__super__.constructor.apply(this, arguments) } return e(n, t), n.prototype.init = function () { return this.$addButton = $(this.$dom.find("[role='add-image']")), this.$uploadButton = this.$dom.find("[role='image-uploader']"), this.$images = this.$dom.find("[role='image-box']"), this.$uploader = this.$dom.find("[role='image-input-uploader']"), this.$uploader.on("change", this.handleFilesUpload.bind(this)), this.$dom.on("dragenter", function (e) { return e.preventDefault() }).on("dragover", function (e) { return e.preventDefault() }).on("dragleave", function (e) { return e.preventDefault() }).on("drop", this.handleFilesUpload.bind(this)) }, n.prototype.handleFilesUpload = function (e) { var t; return e.preventDefault(), t = void 0, e.originalEvent.dataTransfer ? t = e.originalEvent.dataTransfer.files : e.target && e.target.files && (t = e.target.files), void 0 !== t && this.transferFiles(t), e.stopPropagation() }, n.prototype.transferFiles = function (e) { var t, n, i, o, r; for (r = [], i = 0, o = e.length; o > i; i++)n = e[i], this.$addButton.trigger("click"), t = $(this.$dom.find(".js-empty")[0]), t.removeClass("js-empty"), r.push(t.trigger("uploadfile", n)); return r }, n }(Behaviour) }.call(this), function () { var e = function (e, n) { function i() { this.constructor = e } for (var o in n) t.call(n, o) && (e[o] = n[o]); return i.prototype = n.prototype, e.prototype = new i, e.__super__ = n.prototype, e }, t = {}.hasOwnProperty; this.NewsletterForm = function (t) { function n() { return n.__super__.constructor.apply(this, arguments) } return e(n, t), n.prototype.init = function () { return this.$dom.submit(function (e) { return function (t) { return t.preventDefault(), $("#newsletter-ok-message").remove(), $("#newsletter-fail-message").remove(), $.post({ url: e.data("url"), data: e.$dom.serialize() }).then(function (t) { return e.$dom.find(".form__actions").append($("<p id='newsletter-ok-message' style='color: green;'>" + t.message + "</p>")), setTimeout(function () { return $("#newsletter-ok-message").slideUp(), e.$dom.trigger("reset") }, 3e3) })["catch"](function (t) { var n; return n = t.responseJSON, e.$dom.find(".form__actions").append($("<p id='newsletter-fail-message' style='color: red;'>" + n.message + "</p>")), setTimeout(function () { return $("#newsletter-fail-message").slideUp() }, 3e3) }) } }(this)) }, n }(Behaviour) }.call(this), function () { var e = function (e, n) { function i() { this.constructor = e } for (var o in n) t.call(n, o) && (e[o] = n[o]); return i.prototype = n.prototype, e.prototype = new i, e.__super__ = n.prototype, e }, t = {}.hasOwnProperty; this.PlayVideo = function (t) { function n() { return n.__super__.constructor.apply(this, arguments) } return e(n, t), n.prototype.init = function () { return this.$video = this.$dom.closest(".video-player"), this.$dom.on("click", function (e) { return function () { return e.$video.addClass("is-playing"), e.$video.find(".video-player__embed iframe")[0].src += "?autoplay=1" } }(this)) }, n }(Behaviour) }.call(this), function () { var e = function (e, n) { function i() { this.constructor = e } for (var o in n) t.call(n, o) && (e[o] = n[o]); return i.prototype = n.prototype, e.prototype = new i, e.__super__ = n.prototype, e }, t = {}.hasOwnProperty; this.PostAsyncPreview = function (t) { function n() { return n.__super__.constructor.apply(this, arguments) } return e(n, t), n.prototype.init = function () { return this.isMobile() ? void 0 : (this.postUrl = this.data("post-url"), this.$dom.on("click", this.handleClick.bind(this)), this.$targetBox = this.$dom.closest("[data-block-id]").next(), this.$targetBox.data("open-state") ? void 0 : this.$targetBox.hide()) }, n.prototype.handleClick = function (e) { return e.preventDefault(), this.$dom.addClass("is-loading"), this.retrievePost().then(function (e) { return function (t) { var n;
96 return n = $(t), n.imagesLoaded().always(function () { return $(".is-heading-fixed").removeClass("is-heading-fixed"), e.$dom.addClass("is-heading-fixed"), e.$targetBox.html(n), $(document).trigger("reload-behaviours"), e.$dom.removeClass("is-loading"), "closed" === e.$targetBox.attr("data-open-state") && (e.closeAllPreviewBoxes(), e.$targetBox.attr("data-open-state", "opened"), e.$targetBox.slideDown()), e.moveToTargetBox() }) } }(this)) }, n.prototype.moveToTargetBox = function () { return $("html, body").animate({ scrollTop: this.$dom.offset().top - 70 }, 100) }, n.prototype.closeAllPreviewBoxes = function () { var e; return e = this.allOpenPreviewBoxes(), e.each(function () { return $(this).attr("data-open-state", "closed"), $(this).html(""), $(this).slideUp() }) }, n.prototype.allOpenPreviewBoxes = function () { return $("[data-open-state='opened']") }, n.prototype.retrievePost = function () { return $.ajax({ url: this.postUrl }) }, n }(Behaviour) }.call(this), function () { var e = function (e, n) { function i() { this.constructor = e } for (var o in n) t.call(n, o) && (e[o] = n[o]); return i.prototype = n.prototype, e.prototype = new i, e.__super__ = n.prototype, e }, t = {}.hasOwnProperty; this.PostGallery = function (t) { function n() { return n.__super__.constructor.apply(this, arguments) } return e(n, t), n.prototype.init = function () { return this.$dom.addClass("owl-carousel"), this.$dom.imagesLoaded(function (e) { return function () { var t; return t = function (e) { var t, n, i; return t = e.target, i = e.item.count, n = e.item.index + 1, this.$dom.parent().find(".slider__title__item").html(n), this.$dom.parent().find(".slider__title__items").html(i) }.bind(e), e.$dom.owlCarousel({ navText: ["", ""], nav: !1, rtl: "rtl" === $("html").attr("dir"), center: "rtl" !== $("html").attr("dir"), margin: 15, stagePadding: 50, items: 1, URLhashListener: !0, onInitialized: t, onTranslated: t, autoHeight: !0, responsive: { 400: { items: 2 }, 720: { items: 2, margin: 20, stagePadding: 50 }, 1024: { nav: !0, items: 1, stagePadding: 0 } } }) } }(this)) }, n }(Behaviour) }.call(this), function () { "undefined" != typeof window.CKEDITOR_BASEPATH && null !== window.CKEDITOR_BASEPATH || (window.CKEDITOR_BASEPATH = "/assets/ckeditor/") }.call(this), function () {
97    window.CKEDITOR && window.CKEDITOR.dom || (window.CKEDITOR || (window.CKEDITOR = function () { var e = /(^|.*[\\\/])ckeditor\.js(?:\?.*|;.*)?$/i, t = { timestamp: "GB8C", version: "4.6.1", revision: "580bcaf", rnd: Math.floor(900 * Math.random()) + 100, _: { pending: [], basePathSrcPattern: e }, status: "unloaded", basePath: function () { var t = window.CKEDITOR_BASEPATH || ""; if (!t) for (var n = document.getElementsByTagName("script"), i = 0; i < n.length; i++) { var o = n[i].src.match(e); if (o) { t = o[1]; break } } if (-1 == t.indexOf(":/") && "//" != t.slice(0, 2) && (t = 0 === t.indexOf("/") ? location.href.match(/^.*?:\/\/[^\/]*/)[0] + t : location.href.match(/^[^\?]*\/(?:)/)[0] + t), !t) throw 'The CKEditor installation path could not be automatically detected. Please set the global variable "CKEDITOR_BASEPATH" before creating editor instances.'; return t }(), getUrl: function (e) { return -1 == e.indexOf(":/") && 0 !== e.indexOf("/") && (e = this.basePath + e), this.timestamp && "/" != e.charAt(e.length - 1) && !/[&?]t=/.test(e) && (e += (0 <= e.indexOf("?") ? "&" : "?") + "t=" + this.timestamp), e }, domReady: function () { function e() { try { document.addEventListener ? (document.removeEventListener("DOMContentLoaded", e, !1), t()) : document.attachEvent && "complete" === document.readyState && (document.detachEvent("onreadystatechange", e), t()) } catch (n) { } } function t() { for (var e; e = n.shift();)e() } var n = []; return function (t) { function i() { try { document.documentElement.doScroll("left") } catch (t) { return void setTimeout(i, 1) } e() } if (n.push(t), "complete" === document.readyState && setTimeout(e, 1), 1 == n.length) if (document.addEventListener) document.addEventListener("DOMContentLoaded", e, !1), window.addEventListener("load", e, !1); else if (document.attachEvent) { document.attachEvent("onreadystatechange", e), window.attachEvent("onload", e), t = !1; try { t = !window.frameElement } catch (o) { } document.documentElement.doScroll && t && i() } } }() }, n = window.CKEDITOR_GETURL; if (n) { var i = t.getUrl; t.getUrl = function (e) { return n.call(t, e) || i.call(t, e) } } return t }()), CKEDITOR.event || (CKEDITOR.event = function () { }, CKEDITOR.event.implementOn = function (e) { var t, n = CKEDITOR.event.prototype; for (t in n) null == e[t] && (e[t] = n[t]) }, CKEDITOR.event.prototype = function () {
98        function e(e) { var i = t(this); return i[e] || (i[e] = new n(e)) } var t = function (e) { return e = e.getPrivate && e.getPrivate() || e._ || (e._ = {}), e.events || (e.events = {}) }, n = function (e) { this.name = e, this.listeners = [] }; return n.prototype = { getListenerIndex: function (e) { for (var t = 0, n = this.listeners; t < n.length; t++)if (n[t].fn == e) return t; return -1 } }, {
99            define: function (t, n) { var i = e.call(this, t); CKEDITOR.tools.extend(i, n, !0) }, on: function (t, n, i, o, r) {
100                function s(e, r, s, l) {
101                    return e = { name: t, sender: this, editor: e, data: r, listenerData: o, stop: s, cancel: l, removeListener: a }, !1 === n.call(i, e) ? !1 : e.data
102                } function a() { c.removeListener(t, n) } var l = e.call(this, t); if (0 > l.getListenerIndex(n)) { l = l.listeners, i || (i = this), isNaN(r) && (r = 10); var c = this; s.fn = n, s.priority = r; for (var d = l.length - 1; d >= 0; d--)if (l[d].priority <= r) return l.splice(d + 1, 0, s), { removeListener: a }; l.unshift(s) } return { removeListener: a }
103            }, once: function () { var e = Array.prototype.slice.call(arguments), t = e[1]; return e[1] = function (e) { return e.removeListener(), t.apply(this, arguments) }, this.on.apply(this, e) }, capture: function () { CKEDITOR.event.useCapture = 1; var e = this.on.apply(this, arguments); return CKEDITOR.event.useCapture = 0, e }, fire: function () { var e = 0, n = function () { e = 1 }, i = 0, o = function () { i = 1 }; return function (r, s, a) { var l = t(this)[r]; r = e; var c = i; if (e = i = 0, l) { var d = l.listeners; if (d.length) for (var u, d = d.slice(0), h = 0; h < d.length; h++) { if (l.errorProof) try { u = d[h].call(this, a, s, n, o) } catch (p) { } else u = d[h].call(this, a, s, n, o); if (!1 === u ? i = 1 : "undefined" != typeof u && (s = u), e || i) break } } return s = i ? !1 : "undefined" == typeof s ? !0 : s, e = r, i = c, s } }
103(), fireOnce: function (e, n, i) { return n = this.fire(e, n, i), delete t(this)[e], n }, removeListener: function (e, n) { var i = t(this)[e]; if (i) { var o = i.getListenerIndex(n); o >= 0 && i.listeners.splice(o, 1) } }, removeAllListeners: function () { var e, n = t(this); for (e in n) delete n[e] }, hasListeners: function (e) { return (e = t(this)[e]) && 0 < e.listeners.length }
104        }
105    }()), CKEDITOR.editor || (CKEDITOR.editor = function () { CKEDITOR._.pending.push([this, arguments]), CKEDITOR.event.call(this) }, CKEDITOR.editor.prototype.fire = function (e, t) { return e in { instanceReady: 1, loaded: 1 } && (this[e] = !0), CKEDITOR.event.prototype.fire.call(this, e, t, this) }, CKEDITOR.editor.prototype.fireOnce = function (e, t) { return e in { instanceReady: 1, loaded: 1 } && (this[e] = !0), CKEDITOR.event.prototype.fireOnce.call(this, e, t, this) }, CKEDITOR.event.implementOn(CKEDITOR.editor.prototype)), CKEDITOR.env || (CKEDITOR.env = function () { var e = navigator.userAgent.toLowerCase(), t = e.match(/edge[ \/](\d+.?\d*)/), n = -1 < e.indexOf("trident/"), n = !(!t && !n), n = { ie: n, edge: !!t, webkit: !n && -1 < e.indexOf(" applewebkit/"), air: -1 < e.indexOf(" adobeair/"), mac: -1 < e.indexOf("macintosh"), quirks: "BackCompat" == document.compatMode && (!document.documentMode || 10 > document.documentMode), mobile: -1 < e.indexOf("mobile"), iOS: /(ipad|iphone|ipod)/.test(e), isCustomDomain: function () { if (!this.ie) return !1; var e = document.domain, t = window.location.hostname; return e != t && e != "[" + t + "]" }, secure: "https:" == location.protocol }; n.gecko = "Gecko" == navigator.product && !n.webkit && !n.ie, n.webkit && (-1 < e.indexOf("chrome") ? n.chrome = !0 : n.safari = !0); var i = 0; return n.ie && (i = t ? parseFloat(t[1]) : n.quirks || !document.documentMode ? parseFloat(e.match(/msie (\d+)/)[1]) : document.documentMode, n.ie9Compat = 9 == i, n.ie8Compat = 8 == i, n.ie7Compat = 7 == i, n.ie6Compat = 7 > i || n.quirks), n.gecko && (t = e.match(/rv:([\d\.]+)/)) && (t = t[1].split("."), i = 1e4 * t[0] + 100 * (t[1] || 0) + 1 * (t[2] || 0)), n.air && (i = parseFloat(e.match(/ adobeair\/(\d+)/)[1])), n.webkit && (i = parseFloat(e.match(/ applewebkit\/(\d+)/)[1])), n.version = i, n.isCompatible = !(n.ie && 7 > i || n.gecko && 4e4 > i || n.webkit && 534 > i), n.hidpi = 2 <= window.devicePixelRatio, n.needsBrFiller = n.gecko || n.webkit || n.ie && i > 10, n.needsNbspFiller = n.ie && 11 > i, n.cssClass = "cke_browser_" + (n.ie ? "ie" : n.gecko ? "gecko" : n.webkit ? "webkit" : "unknown"), n.quirks && (n.cssClass += " cke_browser_quirks"), n.ie && (n.cssClass += " cke_browser_ie" + (n.quirks ? "6 cke_browser_iequirks" : n.version)), n.air && (n.cssClass += " cke_browser_air"), n.iOS && (n.cssClass += " cke_browser_ios"), n.hidpi && (n.cssClass += " cke_hidpi"), n }()), "unloaded" == CKEDITOR.status && function () { CKEDITOR.event.implementOn(CKEDITOR), CKEDITOR.loadFullCore = function () { if ("basic_ready" != CKEDITOR.status) CKEDITOR.loadFullCore._load = 1; else { delete CKEDITOR.loadFullCore; var e = document.createElement("script"); e.type = "text/javascript", e.src = CKEDITOR.basePath + "ckeditor.js", document.getElementsByTagName("head")[0].appendChild(e) } }, CKEDITOR.loadFullCoreTimeout = 0, CKEDITOR.add = function (e) { (this._.pending || (this._.pending = [])).push(e) }, function () { CKEDITOR.domReady(function () { var e = CKEDITOR.loadFullCore, t = CKEDITOR.loadFullCoreTimeout; e && (CKEDITOR.status = "basic_ready", e && e._load ? e() : t && setTimeout(function () { CKEDITOR.loadFullCore && CKEDITOR.loadFullCore() }, 1e3 * t)) }) }(), CKEDITOR.status = "basic_loaded" }(), CKEDITOR.VERBOSITY_WARN = 1, CKEDITOR.VERBOSITY_ERROR = 2, CKEDITOR.verbosity = CKEDITOR.VERBOSITY_WARN | CKEDITOR.VERBOSITY_ERROR, CKEDITOR.warn = function (e, t) { CKEDITOR.verbosity & CKEDITOR.VERBOSITY_WARN && CKEDITOR.fire("log", { type: "warn", errorCode: e, additionalData: t }) }, CKEDITOR.error = function (e, t) { CKEDITOR.verbosity & CKEDITOR.VERBOSITY_ERROR && CKEDITOR.fire("log", { type: "error", errorCode: e, additionalData: t }) }, CKEDITOR.on("log", function (e) { if (window.console && window.console.log) { var t = console[e.data.type] ? e.data.type : "log", n = e.data.errorCode;
105 (e = e.data.additionalData) ? console[t]("[CKEDITOR] Error code: " + n + ".", e) : console[t]("[CKEDITOR] Error code: " + n + "."), console[t]("[CKEDITOR] For more information about this error go to http://docs.ckeditor.com/#!/guide/dev_errors-section-" + n) } }, null, null, 999), CKEDITOR.dom = {}, function () { var e = [], t = CKEDITOR.env.gecko ? "-moz-" : CKEDITOR.env.webkit ? "-webkit-" : CKEDITOR.env.ie ? "-ms-" : "", n = /&/g, i = />/g, o = /</g, r = /"/g, s = /&(lt|gt|amp|quot|nbsp|shy|#\d{1,5});/g, a = { lt: "<", gt: ">", amp: "&", quot: '"', nbsp: "\xa0", shy: "\xad" }, l = function (e, t) { return "#" == t[0] ? String.fromCharCode(parseInt(t.slice(1), 10)) : a[t] }; CKEDITOR.on("reset", function () { e = [] }), CKEDITOR.tools = { arrayCompare: function (e, t) { if (!e && !t) return !0; if (!e || !t || e.length != t.length) return !1; for (var n = 0; n < e.length; n++)if (e[n] != t[n]) return !1; return !0 }, getIndex: function (e, t) { for (var n = 0; n < e.length; ++n)if (t(e[n])) return n; return -1 }, clone: function (e) { var t; if (e && e instanceof Array) { t = []; for (var n = 0; n < e.length; n++)t[n] = CKEDITOR.tools.clone(e[n]); return t } if (null === e || "object" != typeof e || e instanceof String || e instanceof Number || e instanceof Boolean || e instanceof Date || e instanceof RegExp || e.nodeType || e.window === e) return e; t = new e.constructor; for (n in e) t[n] = CKEDITOR.tools.clone(e[n]); return t }, capitalize: function (e, t) { return e.charAt(0).toUpperCase() + (t ? e.slice(1) : e.slice(1).toLowerCase()) }, extend: function (e) { var t, n, i = arguments.length; "boolean" == typeof (t = arguments[i - 1]) ? i-- : "boolean" == typeof (t = arguments[i - 2]) && (n = arguments[i - 1], i -= 2); for (var o = 1; i > o; o++) { var r, s = arguments[o]; for (r in s) !0 !== t && null != e[r] || (!n || r in n) && (e[r] = s[r]) } return e }, prototypedCopy: function (e) { var t = function () { }; return t.prototype = e, new t }, copy: function (e) { var t, n = {}; for (t in e) n[t] = e[t]; return n }, isArray: function (e) { return "[object Array]" == Object.prototype.toString.call(e) }, isEmpty: function (e) { for (var t in e) if (e.hasOwnProperty(t)) return !1; return !0 }, cssVendorPrefix: function (e, n, i) { return i ? t + e + ":" + n + ";" + e + ":" + n : (i = {}, i[e] = n, i[t + e] = n, i) }, cssStyleToDomStyle: function () { var e = document.createElement("div").style, t = "undefined" != typeof e.cssFloat ? "cssFloat" : "undefined" != typeof e.styleFloat ? "styleFloat" : "float"; return function (e) { return "float" == e ? t : e.replace(/-./g, function (e) { return e.substr(1).toUpperCase() }) } }(), buildStyleHtml: function (e) { e = [].concat(e); for (var t, n = [], i = 0; i < e.length; i++)(t = e[i]) && (/@import|[{}]/.test(t) ? n.push("<style>" + t + "</style>") : n.push('<link type="text/css" rel=stylesheet href="' + t + '">')); return n.join("") }, htmlEncode: function (e) { return void 0 === e || null === e ? "" : String(e).replace(n, "&amp;").replace(i, "&gt;").replace(o, "&lt;") }, htmlDecode: function (e) { return e.replace(s, l) }, htmlEncodeAttr: function (e) { return CKEDITOR.tools.htmlEncode(e).replace(r, "&quot;") }, htmlDecodeAttr: function (e) { return CKEDITOR.tools.htmlDecode(e) }, transformPlainTextToHtml: function (e, t) { var n = t == CKEDITOR.ENTER_BR, i = this.htmlEncode(e.replace(/\r\n/g, "\n")), i = i.replace(/\t/g, "&nbsp;&nbsp; &nbsp;"), o = t == CKEDITOR.ENTER_P ? "p" : "div"; if (!n) { var r = /\n{2}/g; if (r.test(i)) var s = "<" + o + ">", a = "</" + o + ">", i = s + i.replace(r, function () { return a + s }) + a } return i = i.replace(/\n/g, "<br>"), n || (i = i.replace(new RegExp("<br>(?=</" + o + ">)"), function (e) { return CKEDITOR.tools.repeat(e, 2) })), i = i.replace(/^ | $/g, "&nbsp;"), i = i.replace(/(>|\s) /g, function (e, t) { return t + "&nbsp;" }).replace(/ (?=<)/g, "&nbsp;") }, getNextNumber: function () { var e = 0; return function () { return ++e } }(), getNextId: function () { return "cke_" + this.getNextNumber() }, getUniqueId: function () { for (var e = "e", t = 0; 8 > t; t++)e += Math.floor(65536 * (1 + Math.random())).toString(16).substring(1); return e }, override: function (e, t) { var n = t(e); return n.prototype = e.prototype, n }
105, setTimeout: function (e, t, n, i, o) { return o || (o = window), n || (n = o), o.setTimeout(function () { i ? e.apply(n, [].concat(i)) : e.apply(n) }, t || 0) }, trim: function () { var e = /(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g; return function (t) { return t.replace(e, "") } }(), ltrim: function () { var e = /^[ \t\n\r]+/g; return function (t) { return t.replace(e, "") } }(), rtrim: function () { var e = /[ \t\n\r]+$/g; return function (t) { return t.replace(e, "") } }(), indexOf: function (e, t) { if ("function" == typeof t) { for (var n = 0, i = e.length; i > n; n++)if (t(e[n])) return n } else { if (e.indexOf) return e.indexOf(t); for (n = 0, i = e.length; i > n; n++)if (e[n] === t) return n } return -1 }, search: function (e, t) { var n = CKEDITOR.tools.indexOf(e, t); return n >= 0 ? e[n] : null }, bind: function (e, t) { return function () { return e.apply(t, arguments) } }, createClass: function (e) { var t = e.$, n = e.base, i = e.privates || e._, o = e.proto; if (e = e.statics, !t && (t = function () { n && this.base.apply(this, arguments) }), i) var r = t, t = function () { var e, t = this._ || (this._ = {}); for (e in i) { var n = i[e]; t[e] = "function" == typeof n ? CKEDITOR.tools.bind(n, this) : n } r.apply(this, arguments) }; return n && (t.prototype = this.prototypedCopy(n.prototype), t.prototype.constructor = t, t.base = n, t.baseProto = n.prototype, t.prototype.base = function () { this.base = n.prototype.base, n.apply(this, arguments), this.base = arguments.callee }), o && this.extend(t.prototype, o, !0), e && this.extend(t, e, !0), t }, addFunction: function (t, n) { return e.push(function () { return t.apply(n || this, arguments) }) - 1 }, removeFunction: function (t) { e[t] = null }, callFunction: function (t) { var n = e[t]; return n && n.apply(window, Array.prototype.slice.call(arguments, 1)) }, cssLength: function () { var e, t = /^-?\d+\.?\d*px$/; return function (n) { return e = CKEDITOR.tools.trim(n + "") + "px", t.test(e) ? e : n || "" } }(), convertToPx: function () { var e; return function (t) { return e || (e = CKEDITOR.dom.element.createFromHtml('<div style="position:absolute;left:-9999px;top:-9999px;margin:0px;padding:0px;border:0px;"></div>', CKEDITOR.document), CKEDITOR.document.getBody().append(e)), /%$/.test(t) ? t : (e.setStyle("width", t), e.$.clientWidth) } }(), repeat: function (e, t) { return Array(t + 1).join(e) }, tryThese: function () { for (var e, t = 0, n = arguments.length; n > t; t++) { var i = arguments[t]; try { e = i(); break } catch (o) { } } return e }, genKey: function () { return Array.prototype.slice.call(arguments).join("-") }, defer: function (e) { return function () { var t = arguments, n = this; window.setTimeout(function () { e.apply(n, t) }, 0) } }, normalizeCssText: function (e, t) { var n, i = [], o = CKEDITOR.tools.parseCssText(e, !0, t); for (n in o) i.push(n + ":" + o[n]); return i.sort(), i.length ? i.join(";") + ";" : "" }, convertRgbToHex: function (e) { return e.replace(/(?:rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\))/gi, function (e, t, n, i) { for (e = [t, n, i], t = 0; 3 > t; t++)e[t] = ("0" + parseInt(e[t], 10).toString(16)).slice(-2); return "#" + e.join("") }) }, normalizeHex: function (e) { return e.replace(/#(([0-9a-f]{3}){1,2})($|;|\s+)/gi, function (e, t, n, i) { return e = t.toLowerCase(), 3 == e.length && (e = e.split(""), e = [e[0], e[0], e[1], e[1], e[2], e[2]].join("")), "#" + e + i }) }, parseCssText: function (e, t, n) { var i = {}; return n && (e = new CKEDITOR.dom.element("span").setAttribute("style", e).getAttribute("style") || ""), e && (e = CKEDITOR.tools.normalizeHex(CKEDITOR.tools.convertRgbToHex(e))), e && ";" != e ? (e.replace(/&quot;/g, '"').replace(/\s*([^:;\s]+)\s*:\s*([^;]+)\s*(?=;|$)/g, function (e, n, o) { t && (n = n.toLowerCase(), "font-family" == n && (o = o.replace(/\s*,\s*/g, ",")), o = CKEDITOR.tools.trim(o)), i[n] = o }), i) : i }, writeCssText: function (e, t) { var n, i = []; for (n in e) i.push(n + ":" + e[n]); return t && i.sort(), i.join("; ") }, objectCompare: function (e, t, n) { var i; if (!e && !t) return !0; if (!e || !t) return !1; for (i in e) if (e[i] != t[i]) return !1; if (!n) for (i in t) if (e[i] != t[i]) return !1; return !0 }, objectKeys: function (e) { var t, n = []; for (t in e) n.push(t); return n }, convertArrayToObject: function (e, t) { var n = {}; 1 == arguments.length && (t = !0); for (var i = 0, o = e.length; o > i; ++i)n[e[i]] = t; return n }, fixDomain: function () { for (var e; ;)try { e = window.parent.document.domain; break } catch (t) { if (e = e ? e.replace(/.+?(?:\.|$)/, "") : document.domain, !e) break; document.domain = e } return !!e }, eventsBuffer: function (e, t, n) { function i() { r = (new Date).getTime(), o = !1, n ? t.call(n) : t() } var o, r = 0; return { input: function () { if (!o) { var t = (new Date).getTime() - r; e > t ? o = setTimeout(i, e - t) : i() } }, reset: function () { o && clearTimeout(o), o = r = 0 } } }, enableHtml5Elements: function (e, t) { for (var n, i = "abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup main mark meter nav output progress section summary time video".split(" "), o = i.length; o--;)n = e.createElement(i[o]), t && e.appendChild(n) }, checkIfAnyArrayItemMatches: function (e, t) { for (var n = 0, i = e.length; i > n; ++n)if (e[n].match(t)) return !0; return !1 }, checkIfAnyObjectPropertyMatches: function (e, t) { for (var n in e) if (n.match(t)) return !0; return !1 }, keystrokeToString: function (e, t) { var n = 16711680 & t, i = 65535 & t, o = CKEDITOR.env.mac, r = [], s = []; return n & CKEDITOR.CTRL && (r.push(o ? "\u2318" : e[17]), s.push(o ? e[224] : e[17])), n & CKEDITOR.ALT && (r.push(o ? "\u2325" : e[18]), s.push(e[18])), n & CKEDITOR.SH
vendor: 2,783 bytes, line 105
105IFT && (r.push(o ? "\u21e7" : e[16]), s.push(e[16])), i && (e[i] ? (r.push(e[i]), s.push(e[i])) : (r.push(String.fromCharCode(i)), s.push(String.fromCharCode(i)))), { display: r.join("+"), aria: s.join("+") } }, transparentImageData: "data:image/gif;base64,R0lGODlhAQABAPABAP///wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw==", getCookie: function (e) { e = e.toLowerCase(); for (var t, n, i = document.cookie.split(";"), o = 0; o < i.length; o++)if (t = i[o].split("="), n = decodeURIComponent(CKEDITOR.tools.trim(t[0]).toLowerCase()), n === e) return decodeURIComponent(1 < t.length ? t[1] : ""); return null }, setCookie: function (e, t) { document.cookie = encodeURIComponent(e) + "=" + encodeURIComponent(t) + ";path=/" }, getCsrfToken: function () { var e = CKEDITOR.tools.getCookie("ckCsrfToken"); if (!e || 40 != e.length) { var e = [], t = ""; if (window.crypto && window.crypto.getRandomValues) e = new Uint8Array(40), window.crypto.getRandomValues(e); else for (var n = 0; 40 > n; n++)e.push(Math.floor(256 * Math.random())); for (n = 0; n < e.length; n++)var i = "abcdefghijklmnopqrstuvwxyz0123456789".charAt(e[n] % 36), t = t + (.5 < Math.random() ? i.toUpperCase() : i); e = t, CKEDITOR.tools.setCookie("ckCsrfToken", e) } return e }, escapeCss: function (e) { return e ? window.CSS && CSS.escape ? CSS.escape(e) : isNaN(parseInt(e.charAt(0), 10)) ? e : "\\3" + e.charAt(0) + " " + e.substring(1, e.length) : "" }, style: { parse: { _colors: { aliceblue: "#F0F8FF", antiquewhite: "#FAEBD7", aqua: "#00FFFF", aquamarine: "#7FFFD4", azure: "#F0FFFF", beige: "#F5F5DC", bisque: "#FFE4C4", black: "#000000", blanchedalmond: "#FFEBCD", blue: "#0000FF", blueviolet: "#8A2BE2", brown: "#A52A2A", burlywood: "#DEB887", cadetblue: "#5F9EA0", chartreuse: "#7FFF00", chocolate: "#D2691E", coral: "#FF7F50", cornflowerblue: "#6495ED", cornsilk: "#FFF8DC", crimson: "#DC143C", cyan: "#00FFFF", darkblue: "#00008B", darkcyan: "#008B8B", darkgoldenrod: "#B8860B", darkgray: "#A9A9A9", darkgreen: "#006400", darkgrey: "#A9A9A9", darkkhaki: "#BDB76B", darkmagenta: "#8B008B", darkolivegreen: "#556B2F", darkorange: "#FF8C00", darkorchid: "#9932CC", darkred: "#8B0000", darksalmon: "#E9967A", darkseagreen: "#8FBC8F", darkslateblue: "#483D8B", darkslategray: "#2F4F4F", darkslategrey: "#2F4F4F", darkturquoise: "#00CED1", darkviolet: "#9400D3", deeppink: "#FF1493", deepskyblue: "#00BFFF", dimgray: "#696969", dimgrey: "#696969", dodgerblue: "#1E90FF", firebrick: "#B22222", floralwhite: "#FFFAF0", forestgreen: "#228B22", fuchsia: "#FF00FF", gainsboro: "#DCDCDC", ghostwhite: "#F8F8FF", gold: "#FFD700", goldenrod: "#DAA520", gray: "#808080", green: "#008000", greenyellow: "#ADFF2F", grey: "#808080", honeydew: "#F0FFF0", hotpink: "#FF69B4", indianred: "#CD5C5C", indigo: "#4B0082", ivory: "#F
105FFFF0", khaki: "#F0E68C", lavender: "#E6E6FA", lavenderblush: "#FFF0F5", lawngreen: "#7CFC00", lemonchiffon: "#FFFACD", lightblue: "#ADD8E6", lightcoral: "#F08080", lightcyan: "#E0FFFF", lightgoldenrodyellow: "#FAFAD2", lightgray: "#D3D3D3", lightgreen: "#90EE90", lightgrey: "#D3D3D3", lightpink: "#FFB6C1", lightsalmon: "#FFA07A", lightseagreen: "#20B2AA", lightskyblue: "#87CEFA", lightslategray: "#778899", lightslategrey: "#778899", lightsteelblue: "#B0C4DE", lightyellow: "#FFFFE0", lime: "#00FF00", limegreen: "#32CD32", linen: "#FAF0E6", magenta: "#FF00FF", maroon: "#800000", mediumaquamarine: "#66CDAA", mediumblue: "#0000CD", mediumorchid: "#BA55D3", mediumpurple: "#9370DB", mediumseagreen: "#3CB371", mediumslateblue: "#7B68EE", mediumspringgreen: "#00FA9A", mediumturquoise: "#48D1CC", mediumvioletred: "#C71585", midnightblue: "#191970", mintcream: "#F5FFFA", mistyrose: "#FFE4E1", moccasin: "#FFE4B5", navajowhite: "#FFDEAD", navy: "#000080", oldlace: "#FDF5E6", olive: "#808000", olivedrab: "#6B8E23", orange: "#FFA500", orangered: "#FF4500", orchid: "#DA70D6", palegoldenrod: "#EEE8AA", palegreen: "#98FB98", paleturquoise: "#AFEEEE", palevioletred: "#DB7093", papayawhip: "#FFEFD5", peachpuff: "#FFDAB9", peru: "#CD853F", pink: "#FFC0CB", plum: "#DDA0DD", powderblue: "#B0E0E6", purple: "#800080", rebeccapurple: "#663399", red: "#FF0000", rosybrown: "#BC8F8F", royalblue: "#4169E1", saddlebrown: "#8B4513", salmon: "#FA8072", sandybrown: "#F4A460", seagreen: "#2E8B57", seashell: "#FFF5EE", sienna: "#A0522D", silver: "#C0C0C0", skyblue: "#87CEEB", slateblue: "#6A5ACD", slategray: "#708090", slategrey: "#708090", snow: "#FFFAFA", springgreen: "#00FF7F", steelblue: "#4682B4", tan: "#D2B48C", teal: "#008080", thistle: "#D8BFD8", tomato: "#FF6347", turquoise: "#40E0D0", violet: "#EE82EE", wheat: "#F5DEB3", white: "#FFFFFF", whitesmoke: "#F5F5F5", yellow: "#FFFF00", yellowgreen: "#9ACD32" }, _rgbaRegExp: /rgba?\(\s*\d+%?\s*,\s*\d+%?\s*,\s*\d+%?\s*(?:,\s*[0-9.]+\s*)?\)/gi, _hslaRegExp: /hsla?\(\s*[0-9.]+\s*,\s*\d+%\s*,\s*\d+%\s*(?:,\s*[0-9.]+\s*)?\)/gi, background: function (e) { var t = [], n = [], n = this._findColor(e); return n.length && (t.color = n[0], CKEDITOR.tools.array.forEach(n, function (t) { e = e.replace(t, "") })), (e = CKEDITOR.tools.trim(e)) && (t.unprocessed = e), t }, margin: function (e) { function t(e) { n.top = i[e[0]], n.right = i[e[1]], n.bottom = i[e[2]], n.left = i[e[3]] } var n = {}, i = e.match(/(?:\-?[\.\d]+(?:%|\w*)|auto|inherit|initial|unset)/g) || ["0px"]; switch (i.length) { case 1: t([0, 0, 0, 0]); break; case 2: t([0, 1, 0, 1]); break; case 3: t([0, 1, 2, 1]); break; case 4: t([0, 1, 2, 3]) }return n }, _findColor: function (e) { var t = [], n = CKEDITOR.tools.array, t = t.concat(e.match(this._rgbaRegExp) || []), t = t.concat(e.match(this._hslaRegExp) || []); return t = t.concat(n.filter(e.split(/\s+/), function (e) { return e.match(/^\#[a-f0-9]{3}(?:[a-f0-9]{3})?$/gi) ? !0 : e.toLowerCase() in CKEDITOR.tools.style.parse._colors })) } } }, array: { filter: function (e, t, n) { var i = []; return this.forEach(e, function (o, r) { t.call(n, o, r, e) && i.push(o) }), i }
105, forEach: function (e, t, n) { var i, o = e.length; for (i = 0; o > i; i++)t.call(n, e[i], i, e) } } }, CKEDITOR.tools.array.indexOf = CKEDITOR.tools.indexOf, CKEDITOR.tools.array.isArray = CKEDITOR.tools.isArray }(), CKEDITOR.dtd = function () { var e = CKEDITOR.tools.extend, t = function (e, t) { for (var n = CKEDITOR.tools.clone(e), i = 1; i < arguments.length; i++) { t = arguments[i]; for (var o in t) delete n[o] } return n }, n = {}, i = {}, o = { address: 1, article: 1, aside: 1, blockquote: 1, details: 1, div: 1, dl: 1, fieldset: 1, figure: 1, footer: 1, form: 1, h1: 1, h2: 1, h3: 1, h4: 1, h5: 1, h6: 1, header: 1, hgroup: 1, hr: 1, main: 1, menu: 1, nav: 1, ol: 1, p: 1, pre: 1, section: 1, table: 1, ul: 1 }, r = { command: 1, link: 1, meta: 1, noscript: 1, script: 1, style: 1 }, s = {}, a = { "#": 1 }, l = { center: 1, dir: 1, noframes: 1 }; return e(n, { a: 1, abbr: 1, area: 1, audio: 1, b: 1, bdi: 1, bdo: 1, br: 1, button: 1, canvas: 1, cite: 1, code: 1, command: 1, datalist: 1, del: 1, dfn: 1, em: 1, embed: 1, i: 1, iframe: 1, img: 1, input: 1, ins: 1, kbd: 1, keygen: 1, label: 1, map: 1, mark: 1, meter: 1, noscript: 1, object: 1, output: 1, progress: 1, q: 1, ruby: 1, s: 1, samp: 1, script: 1, select: 1, small: 1, span: 1, strong: 1, sub: 1, sup: 1, textarea: 1, time: 1, u: 1, "var": 1, video: 1, wbr: 1 }, a, { acronym: 1, applet: 1, basefont: 1, big: 1, font: 1, isindex: 1, strike: 1, style: 1, tt: 1 }), e(i, o, n, l), t = { a: t(n, { a: 1, button: 1 }), abbr: n, address: i, area: s, article: i, aside: i, audio: e({ source: 1, track: 1 }, i), b: n, base: s, bdi: n, bdo: n, blockquote: i, body: i, br: s, button: t(n, { a: 1, button: 1 }), canvas: n, caption: i, cite: n, code: n, col: s, colgroup: { col: 1 }, command: s, datalist: e({ option: 1 }, n), dd: i, del: n, details: e({ summary: 1 }, i), dfn: n, div: i, dl: { dt: 1, dd: 1 }, dt: i, em: n, embed: s, fieldset: e({ legend: 1 }, i), figcaption: i, figure: e({ figcaption: 1 }, i), footer: i, form: i, h1: n, h2: n, h3: n, h4: n, h5: n, h6: n, head: e({ title: 1, base: 1 }, r), header: i, hgroup: { h1: 1, h2: 1, h3: 1, h4: 1, h5: 1, h6: 1 }, hr: s, html: e({ head: 1, body: 1 }, i, r), i: n, iframe: a, img: s, input: s, ins: n, kbd: n, keygen: s, label: n, legend: n, li: i, link: s, main: i, map: i, mark: n, menu: e({ li: 1 }, i), meta: s, meter: t(n, { meter: 1 }), nav: i, noscript: e({ link: 1, meta: 1, style: 1 }, n), object: e({ param: 1 }, n), ol: { li: 1 }, optgroup: { option: 1 }, option: a, output: n, p: n, param: s, pre: n, progress: t(n, { progress: 1 }), q: n, rp: n, rt: n, ruby: e({ rp: 1, rt: 1 }, n), s: n, samp: n, script: a, section: i, select: { optgroup: 1, option: 1 }, small: n, source: s, span: n, strong: n, style: a, sub: n, summary: e({ h1: 1, h2: 1, h3: 1, h4: 1, h5: 1, h6: 1 }, n), sup: n, table: { caption: 1, colgroup: 1, thead: 1, tfoot: 1, tbody: 1, tr: 1 }, tbody: { tr: 1 }, td: i, textarea: a, tfoot: { tr: 1 }, th: i, thead: { tr: 1 }, time: t(n, { time: 1 }), title: a, tr: { th: 1, td: 1 }, track: s, u: n, ul: { li: 1 }, "var": n, video: e({ source: 1, track: 1 }, i), wbr: s, acronym: n, applet: e({ param: 1 }, i), basefont: s, big: n, center: i, dialog: s, dir: { li: 1 }, font: n, isindex: s, noframes: i, strike: n, tt: n }, e(t, { $block: e({ audio: 1, dd: 1, dt: 1, figcaption: 1, li: 1, video: 1 }, o, l), $blockLimit: { article: 1, aside: 1, audio: 1, body: 1, caption: 1, details: 1, dir: 1, div: 1, dl: 1, fieldset: 1, figcaption: 1, figure: 1, footer: 1, form: 1, header: 1, hgroup: 1, main: 1, menu: 1, nav: 1, ol: 1, section: 1, table: 1, td: 1, th: 1, tr: 1, ul: 1, video: 1 }, $cdata: { script: 1, style: 1 }, $editable: { address: 1, article: 1, aside: 1, blockquote: 1, body: 1, details: 1, div: 1, fieldset: 1, figcaption: 1, footer: 1, form: 1, h1: 1, h2: 1, h3: 1, h4: 1, h5: 1, h6: 1, header: 1, hgroup: 1, main: 1, nav: 1, p: 1, pre: 1, section: 1 }, $empty: { area: 1, base: 1, basefont: 1, br: 1, col: 1, command: 1, dialog: 1, embed: 1, hr: 1, img: 1, input: 1, isindex: 1, keygen: 1, link: 1, meta: 1, param: 1, source: 1, track: 1, wbr: 1 }, $inline: n, $list: { dl: 1, ol: 1, ul: 1 }, $listItem: { dd: 1, dt: 1, li: 1 }, $nonBodyContent: e({ body: 1, head: 1, html: 1 }, t.head), $nonEditable: { applet: 1, audio: 1, button: 1, embed: 1, iframe: 1, map: 1, object: 1, option: 1, param: 1, script: 1, textarea: 1, video: 1 }, $object: { applet: 1, audio: 1, button: 1, hr: 1, iframe: 1, img: 1, input: 1, object: 1, select: 1, table: 1, textarea: 1, video: 1 }, $removeEmpty: { abbr: 1, acronym: 1, b: 1, bdi: 1, bdo: 1, big: 1, cite: 1, code: 1, del: 1, dfn: 1, em: 1, font: 1, i: 1, ins: 1, label: 1, kbd: 1, mark: 1, meter: 1, output: 1, q: 1, ruby: 1, s: 1, samp: 1, small: 1, span: 1, strike: 1, strong: 1, sub: 1, sup: 1, time: 1, tt: 1, u: 1, "var": 1 }, $tabIndex: { a: 1, area: 1, button: 1, input: 1, object: 1, select: 1, textarea: 1 }, $tableContent: { caption: 1, col: 1, colgroup: 1, tbody: 1, td: 1, tfoot: 1, th: 1, thead: 1, tr: 1 }, $transparent: { a: 1, audio: 1, canvas: 1, del: 1, ins: 1, map: 1, noscript: 1, object: 1, video: 1 }, $intermediate: { caption: 1, colgroup: 1, dd: 1, dt: 1, figcaption: 1, legend: 1, li: 1, optgroup: 1, option: 1, rp: 1, rt: 1, summary: 1, tbody: 1, td: 1, tfoot: 1, th: 1, thead: 1, tr: 1 } }), t }(), CKEDITOR.dom.event = function (e) { this.$ = e }, CKEDITOR.dom.event.prototype = { getKey: function () { return this.$.keyCode || this.$.which }, getKeystroke: function () { var e = this.getKey(); return (this.$.ctrlKey || this.$.metaKey) && (e += CKEDITOR.CTRL), this.$.shiftKey && (e += CKEDITOR.SH
105IFT), this.$.altKey && (e += CKEDITOR.ALT), e }, preventDefault: function (e) { var t = this.$; t.preventDefault ? t.preventDefault() : t.returnValue = !1, e && this.stopPropagation() }, stopPropagation: function () { var e = this.$; e.stopPropagation ? e.stopPropagation() : e.cancelBubble = !0 }, getTarget: function () { var e = this.$.target || this.$.srcElement; return e ? new CKEDITOR.dom.node(e) : null }, getPhase: function () { return this.$.eventPhase || 2 }, getPageOffset: function () { var e = this.getTarget().getDocument().$; return { x: this.$.pageX || this.$.clientX + (e.documentElement.scrollLeft || e.body.scrollLeft), y: this.$.pageY || this.$.clientY + (e.documentElement.scrollTop || e.body.scrollTop) } } }, CKEDITOR.CTRL = 1114112, CKEDITOR.SHIFT = 2228224, CKEDITOR.ALT = 4456448, CKEDITOR.EVENT_PHASE_CAPTURING = 1, CKEDITOR.EVENT_PHASE_AT_TARGET = 2, CKEDITOR.EVENT_PHASE_BUBBLING = 3, CKEDITOR.dom.domObject = function (e) { e && (this.$ = e) }, CKEDITOR.dom.domObject.prototype = function () { var e = function (e, t) { return function (n) { "undefined" != typeof CKEDITOR && e.fire(t, new CKEDITOR.dom.event(n)) } }; return { getPrivate: function () { var e; return (e = this.getCustomData("_")) || this.setCustomData("_", e = {}), e }, on: function (t) { var n = this.getCustomData("_cke_nativeListeners"); return n || (n = {}, this.setCustomData("_cke_nativeListeners", n)), n[t] || (n = n[t] = e(this, t), this.$.addEventListener ? this.$.addEventListener(t, n, !!CKEDITOR.event.useCapture) : this.$.attachEvent && this.$.attachEvent("on" + t, n)), CKEDITOR.event.prototype.on.apply(this, arguments) }, removeListener: function (e) { if (CKEDITOR.event.prototype.removeListener.apply(this, arguments), !this.hasListeners(e)) { var t = this.getCustomData("_cke_nativeListeners"), n = t && t[e]; n && (this.$.removeEventListener ? this.$.removeEventListener(e, n, !1) : this.$.detachEvent && this.$.detachEvent("on" + e, n), delete t[e]) } }, removeAllListeners: function () { var e, t = this.getCustomData("_cke_nativeListeners"); for (e in t) { var n = t[e]; this.$.detachEvent ? this.$.detachEvent("on" + e, n) : this.$.removeEventListener && this.$.removeEventListener(e, n, !1), delete t[e] } CKEDITOR.event.prototype.removeAllListeners.call(this) } } }(), function (e) { var t = {}; CKEDITOR.on("reset", function () { t = {} }), e.equals = function (e) { try { return e && e.$ === this.$ } catch (t) { return !1 } }, e.setCustomData = function (e, n) { var i = this.getUniqueId(); return (t[i] || (t[i] = {}))[e] = n, this }, e.getCustomData = function (e) { var n = this.$["data-cke-expando"]; return (n = n && t[n]) && e in n ? n[e] : null }, e.removeCustomData = function (e) { var n, i, o = this.$["data-cke-expando"], o = o && t[o]; return o && (n = o[e], i = e in o, delete o[e]), i ? n : null }, e.clearCustomData = function () { this.removeAllListeners(); var e = this.$["data-cke-expando"]; e && delete t[e] }, e.getUniqueId = function () { return this.$["data-cke-expando"] || (this.$["data-cke-expando"] = CKEDITOR.tools.getNextNumber()) }, CKEDITOR.event.implementOn(e) }(CKEDITOR.dom.domObject.prototype), CKEDITOR.dom.node = function (e) { return e ? new CKEDITOR.dom[e.nodeType == CKEDITOR.NODE_DOCUMENT ? "document" : e.nodeType == CKEDITOR.NODE_ELEMENT ? "element" : e.nodeType == CKEDITOR.NODE_TEXT ? "text" : e.nodeType == CKEDITOR.NODE_COMMENT ? "comment" : e.nodeType == CKEDITOR.NODE_DOCUMENT_FRAGMENT ? "documentFragment" : "domObject"](e) : this }, CKEDITOR.dom.node.prototype = new CKEDITOR.dom.domObject, CKEDITOR.NODE_ELEMENT = 1, CKEDITOR.NODE_DOCUMENT = 9, CKEDITOR.NODE_TEXT = 3, CKEDITOR.NODE_COMMENT = 8, CKEDITOR.NODE_DOCUMENT_FRAGMENT = 11, CKEDITOR.POSITION_IDENTICAL = 0, CKEDITOR.POSITION_DISCONNECTED = 1, CKEDITOR.POSITION_FOLLOWING = 2, CKEDITOR.POSITION_PRECEDING = 4, CKEDITOR.POSITION_IS_CONTAINED = 8, CKEDITOR.POSITION_CONTAINS = 16, CKEDITOR.tools.extend(CKEDITOR.dom.node.prototype, { appendTo: function (e, t) { return e.append(this, t), e }, clone: function (e, t) { function n(i) { if (i["data-cke-expando"] && (i["data-cke-expando"] = !1), (i.nodeType == CKEDITOR.NODE_ELEMENT || i.nodeType == CKEDITOR.NODE_DOCUMENT_FRAGMENT) && (t || i.nodeType != CKEDITOR.NODE_ELEMENT || i.removeAttribute("id", !1), e)) { i = i.childNodes; for (var o = 0; o < i.length; o++)n(i[o]) } } function i(t) { if (t.type == CKEDITOR.NODE_ELEMENT || t.type == CKEDITOR.NODE_DOCUMENT_FRAGMENT) { if (t.type != CKEDITOR.NODE_DOCUMENT_FRAGMENT) { var n = t.getName(); ":" == n[0] && t.renameNode(n.substring(1)) } if (e) for (n = 0; n < t.getChildCount(); n++)i(t.getChild(n)) } } var o = this.$.cloneNode(e); return n(o), o = new CKEDITOR.dom.node(o), CKEDITOR.env.ie && 9 >
vendor: 5,318 bytes, line 105
105 CKEDITOR.env.version && (this.type == CKEDITOR.NODE_ELEMENT || this.type == CKEDITOR.NODE_DOCUMENT_FRAGMENT) && i(o), o }, hasPrevious: function () { return !!this.$.previousSibling }, hasNext: function () { return !!this.$.nextSibling }, insertAfter: function (e) { return e.$.parentNode.insertBefore(this.$, e.$.nextSibling), e }, insertBefore: function (e) { return e.$.parentNode.insertBefore(this.$, e.$), e }, insertBeforeMe: function (e) { return this.$.parentNode.insertBefore(e.$, this.$), e }, getAddress: function (e) { for (var t = [], n = this.getDocument().$.documentElement, i = this.$; i && i != n;) { var o = i.parentNode; o && t.unshift(this.getIndex.call({ $: i }, e)), i = o } return t }, getDocument: function () { return new CKEDITOR.dom.document(this.$.ownerDocument || this.$.parentNode.ownerDocument) }, getIndex: function (e) { function t(e, i) { var o = i ? e.nextSibling : e.previousSibling; return o && o.nodeType == CKEDITOR.NODE_TEXT ? n(o) ? t(o, i) : o : null } function n(e) { return !e.nodeValue || e.nodeValue == CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE } var i, o = this.$, r = -1; if (!this.$.parentNode || e && o.nodeType == CKEDITOR.NODE_TEXT && n(o) && !t(o) && !t(o, !0)) return -1; do e && o != this.$ && o.nodeType == CKEDITOR.NODE_TEXT && (i || n(o)) || (r++, i = o.nodeType == CKEDITOR.NODE_TEXT); while (o = o.previousSibling); return r }, getNextSourceNode: function (e, t, n) { if (n && !n.call) { var i = n; n = function (e) { return !e.equals(i) } } e = !e && this.getFirst && this.getFirst(); var o; if (!e) { if (this.type == CKEDITOR.NODE_ELEMENT && n && !1 === n(this, !0)) return null; e = this.getNext() } for (; !e && (o = (o || this).getParent());) { if (n && !1 === n(o, !0)) return null; e = o.getNext() } return !e || n && !1 === n(e) ? null : t && t != e.type ? e.getNextSourceNode(!1, t, n) : e }, getPreviousSourceNode: function (e, t, n) { if (n && !n.call) { var i = n; n = function (e) { return !e.equals(i) } } e = !e && this.getLast && this.getLast(); var o; if (!e) { if (this.type == CKEDITOR.NODE_ELEMENT && n && !1 === n(this, !0)) return null; e = this.getPrevious() } for (; !e && (o = (o || this).getParent());) { if (n && !1 === n(o, !0)) return null; e = o.getPrevious() } return !e || n && !1 === n(e) ? null : t && e.type != t ? e.getPreviousSourceNode(!1, t, n) : e }, getPrevious: function (e) { var t, n = this.$; do t = (n = n.previousSibling) && 10 != n.nodeType && new CKEDITOR.dom.node(n); while (t && e && !e(t)); return t }, getNext: function (e) { var t, n = this.$; do t = (n = n.nextSibling) && new CKEDITOR.dom.node(n); while (t && e && !e(t)); return t }, getParent: function (e) { var t = this.$.parentNode; return t && (t.nodeType == CKEDITOR.NODE_ELEMENT || e && t.nodeType == CKEDITOR.NODE_DOCUMENT_FRAGMENT) ? new CKEDITOR.dom.node(t) : null }, getParents: function (e) { var t = this, n = []; do n[e ? "push" : "unshift"](t); while (t = t.getParent()); return n }, getCommonAncestor: function (e) { if (e.equals(this)) return this; if (e.contains && e.contains(this)) return e; var t = this.contains ? this : this.getParent(); do if (t.contains(e)) return t; while (t = t.getParent()); return null }, getPosition: function (e) { var t = this.$, n = e.$; if (t.compareDocumentPosition) return t.compareDocumentPosition(n); if (t == n) return CKEDITOR.POSITION_IDENTICAL; if (this.type == CKEDITOR.NODE_ELEMENT && e.type == CKEDITOR.NODE_ELEMENT) { if (t.contains) { if (t.contains(n)) return CKEDITOR.POSITION_CONTAINS + CKEDITOR.POSITION_PRECEDING; if (n.contains(t)) return CKEDITOR.POSITION_IS_CONTAINED + CKEDITOR.POSITION_FOLLOWING } if ("sourceIndex" in t) return 0 > t.sourceIndex || 0 > n.sourceIndex ? CKEDITOR.POSITION_DISCONNECTED : t.sourceIndex < n.sourceIndex ? CKEDITOR.POSITION_PRECEDING : CKEDITOR.POSITION_FOLLOWING } t = this.getAddress(), e = e.getAddress(); for (var n = Math.min(t.length, e.length), i = 0; n > i; i++)if (t[i] != e[i]) return t[i] < e[i] ? CKEDITOR.POSITION_PRECEDING : CKEDITOR.POSITION_FOLLOWING; return t.length < e.length ? CKEDITOR.POSITION_CONTAINS + CKEDITOR.POSITION_PRECEDING : CKEDITOR.POSITION_IS_CONTAINED + CKEDITOR.POSITION_FOLLOWING }, getAscendant: function (e, t) { var n, i, o = this.$; t || (o = o.parentNode), "function" == typeof e ? (i = !0, n = e) : (i = !1, n = function (t) { return t = "string" == typeof t.nodeName ? t.nodeName.toLowerCase() : "", "string" == typeof e ? t == e : t in e }); for (; o;) { if (n(i ? new CKEDITOR.dom.node(o) : o)) return new CKEDITOR.dom.node(o); try { o = o.parentNode } catch (r) { o = null } } return null }, hasAscendant: function (e, t) { var n = this.$; for (t || (n = n.parentNode); n;) { if (n.nodeName && n.nodeName.toLowerCase() == e) return !0; n = n.parentNode } return !1 }, move: function (e, t) { e.append(this.remove(), t) }, remove: function (e) { var t = this.$, n = t.parentNode; if (n) { if (e) for (; e = t.firstChild;)n.insertBefore(t.removeChild(e), t); n.removeChild(t) } return this }, replace: function (e) { this.insertBefore(e), e.remove() }, trim: function () { this.ltrim(), this.rtrim() }, ltrim: function () { for (var e; this.getFirst && (e = this.getFirst());) { if (e.type == CKEDITOR.NODE_TEXT) { var t = CKEDITOR.tools.ltrim(e.getText()), n = e.getLength(); if (!t) { e.remove();
105 continue } t.length < n && (e.split(n - t.length), this.$.removeChild(this.$.firstChild)) } break } }, rtrim: function () { for (var e; this.getLast && (e = this.getLast());) { if (e.type == CKEDITOR.NODE_TEXT) { var t = CKEDITOR.tools.rtrim(e.getText()), n = e.getLength(); if (!t) { e.remove(); continue } t.length < n && (e.split(t.length), this.$.lastChild.parentNode.removeChild(this.$.lastChild)) } break } CKEDITOR.env.needsBrFiller && (e = this.$.lastChild) && 1 == e.type && "br" == e.nodeName.toLowerCase() && e.parentNode.removeChild(e) }, isReadOnly: function (e) { var t = this; if (this.type != CKEDITOR.NODE_ELEMENT && (t = this.getParent()), CKEDITOR.env.edge && t && t.is("textarea", "input") && (e = !0), !e && t && "undefined" != typeof t.$.isContentEditable) return !(t.$.isContentEditable || t.data("cke-editable")); for (; t;) { if (t.data("cke-editable")) return !1; if (t.hasAttribute("contenteditable")) return "false" == t.getAttribute("contenteditable"); t = t.getParent() } return !0 } }), CKEDITOR.dom.window = function (e) { CKEDITOR.dom.domObject.call(this, e) }, CKEDITOR.dom.window.prototype = new CKEDITOR.dom.domObject,
106        CKEDITOR.tools.extend(CKEDITOR.dom.window.prototype, { focus: function () { this.$.focus() }, getViewPaneSize: function () { var e = this.$.document, t = "CSS1Compat" == e.compatMode; return { width: (t ? e.documentElement.clientWidth : e.body.clientWidth) || 0, height: (t ? e.documentElement.clientHeight : e.body.clientHeight) || 0 } }, getScrollPosition: function () { var e = this.$; return "pageXOffset" in e ? { x: e.pageXOffset || 0, y: e.pageYOffset || 0 } : (e = e.document, { x: e.documentElement.scrollLeft || e.body.scrollLeft || 0, y: e.documentElement.scrollTop || e.body.scrollTop || 0 }) }, getFrame: function () { var e = this.$.frameElement; return e ? new CKEDITOR.dom.element.get(e) : null } }), CKEDITOR.dom.document = function (e) { CKEDITOR.dom.domObject.call(this, e) }, CKEDITOR.dom.document.prototype = new CKEDITOR.dom.domObject, CKEDITOR.tools.extend(CKEDITOR.dom.document.prototype, { type: CKEDITOR.NODE_DOCUMENT, appendStyleSheet: function (e) { if (this.$.createStyleSheet) this.$.createStyleSheet(e); else { var t = new CKEDITOR.dom.element("link"); t.setAttributes({ rel: "stylesheet", type: "text/css", href: e }), this.getHead().append(t) } }, appendStyleText: function (e) { if (this.$.createStyleSheet) { var t = this.$.createStyleSheet(""); t.cssText = e } else { var n = new CKEDITOR.dom.element("style", this); n.append(new CKEDITOR.dom.text(e, this)), this.getHead().append(n) } return t || n.$.sheet }, createElement: function (e, t) { var n = new CKEDITOR.dom.element(e, this); return t && (t.attributes && n.setAttributes(t.attributes), t.styles && n.setStyles(t.styles)), n }, createText: function (e) { return new CKEDITOR.dom.text(e, this) }, focus: function () { this.getWindow().focus() }, getActive: function () { var e; try { e = this.$.activeElement } catch (t) { return null } return new CKEDITOR.dom.element(e) }, getById: function (e) { return (e = this.$.getElementById(e)) ? new CKEDITOR.dom.element(e) : null }, getByAddress: function (e, t) { for (var n = this.$.documentElement, i = 0; n && i < e.length; i++) { var o = e[i]; if (t) for (var r = -1, s = 0; s < n.childNodes.length; s++) { var a = n.childNodes[s]; if ((!0 !== t || 3 != a.nodeType || !a.previousSibling || 3 != a.previousSibling.nodeType) && (r++, r == o)) { n = a; break } } else n = n.childNodes[o] } return n ? new CKEDITOR.dom.node(n) : null }, getElementsByTag: function (e, t) { return CKEDITOR.env.ie && 8 >= document.documentMode || !t || (e = t + ":" + e), new CKEDITOR.dom.nodeList(this.$.getElementsByTagName(e)) }, getHead: function () { var e = this.$.getElementsByTagName("head")[0]; return e = e ? new CKEDITOR.dom.element(e) : this.getDocumentElement().append(new CKEDITOR.dom.element("head"), !0) }, getBody: function () { return new CKEDITOR.dom.element(this.$.body) }, getDocumentElement: function () { return new CKEDITOR.dom.element(this.$.documentElement) }, getWindow: function () { return new CKEDITOR.dom.window(this.$.parentWindow || this.$.defaultView) }, write: function (e) { this.$.open("text/html", "replace"), CKEDITOR.env.ie && (e = e.replace(/(?:^\s*<!DOCTYPE[^>]*?>)|^/i, '$&\n<script data-cke-temp="1">(' + CKEDITOR.tools.fixDomain + ")();</script>")), this.$.write(e), this.$.close() }, find: function (e) { return new CKEDITOR.dom.nodeList(this.$.querySelectorAll(e)) }, findOne: function (e) { return (e = this.$.querySelector(e)) ? new CKEDITOR.dom.element(e) : null }, _getHtml5ShivFrag: function () { var e = this.getCustomData("html5ShivFrag"); return e || (e = this.$.createDocumentFragment(), CKEDITOR.tools.enableHtml5Elements(e, !0), this.setCustomData("html5ShivFrag", e)), e } }), CKEDITOR.dom.nodeList = function (e) { this.$ = e }, CKEDITOR.dom.nodeList.prototype = { count: function () { return this.$.length }, getItem: function (e) { return 0 > e || e >= this.$.length ? null : (e = this.$[e]) ? new CKEDITOR.dom.node(e) : null } }, CKEDITOR.dom.element = function (e, t) { "string" == typeof e && (e = (t ? t.$ : document).createElement(e)), CKEDITOR.dom.domObject.call(this, e) }, CKEDITOR.dom.element.get = function (e) { return (e = "string" == typeof e ? document.getElementById(e) || document.getElementsByName(e)[0] : e) && (e.$ ? e : new CKEDITOR.dom.element(e)) }, CKEDITOR.dom.element.prototype = new CKEDITOR.dom.node, CKEDITOR.dom.element.createFromHtml = function (e, t) { var n = new CKEDITOR.dom.element("div", t); return n.setHtml(e), n.getFirst().remove() }, CKEDITOR.dom.element.setMarker = function (e, t, n, i) { var o = t.getCustomData("list_marker_id") || t.setCustomData("list_marker_id", CKEDITOR.tools.getNextNumber()).getCustomData("list_marker_id"), r = t.getCustomData("list_marker_names") || t.setCustomData("list_marker_names", {}).getCustomData("list_marker_names"); return e[o] = t, r[n] = 1, t.setCustomData(n, i) }, CKEDITOR.dom.element.clearAllMarkers = function (e) { for (var t in e) CKEDITOR.dom.element.clearMarkers(e, e[t], 1) }
106, CKEDITOR.dom.element.clearMarkers = function (e, t, n) { var i, o = t.getCustomData("list_marker_names"), r = t.getCustomData("list_marker_id"); for (i in o) t.removeCustomData(i); t.removeCustomData("list_marker_names"), n && (t.removeCustomData("list_marker_id"), delete e[r]) }, function () { function e(e, t) { return -1 < (" " + e + " ").replace(r, " ").indexOf(" " + t + " ") } function t(e) { var t = !0; return e.$.id || (e.$.id = "cke_tmp_" + CKEDITOR.tools.getNextNumber(), t = !1), function () { t || e.removeAttribute("id") } } function n(e, t) { var n = CKEDITOR.tools.escapeCss(e.$.id); return "#" + n + " " + t.split(/,\s*/).join(", #" + n + " ") } function i(e) { for (var t = 0, n = 0, i = s[e].length; i > n; n++)t += parseInt(this.getComputedStyle(s[e][n]) || 0, 10) || 0; return t } var o = document.createElement("_").classList, o = "undefined" != typeof o && null !== String(o.add).match(/\[Native code\]/gi), r = /[\n\t\r]/g; CKEDITOR.tools.extend(CKEDITOR.dom.element.prototype, { type: CKEDITOR.NODE_ELEMENT, addClass: o ? function (e) { return this.$.classList.add(e), this } : function (t) { var n = this.$.className; return n && (e(n, t) || (n += " " + t)), this.$.className = n || t, this }, removeClass: o ? function (e) { var t = this.$; return t.classList.remove(e), t.className || t.removeAttribute("class"), this } : function (t) { var n = this.getAttribute("class"); return n && e(n, t) && ((n = n.replace(new RegExp("(?:^|\\s+)" + t + "(?=\\s|$)"), "").replace(/^\s+/, "")) ? this.setAttribute("class", n) : this.removeAttribute("class")), this }, hasClass: function (t) { return e(this.$.className, t) }, append: function (e, t) { return "string" == typeof e && (e = this.getDocument().createElement(e)), t ? this.$.insertBefore(e.$, this.$.firstChild) : this.$.appendChild(e.$), e }, appendHtml: function (e) { if (this.$.childNodes.length) { var t = new CKEDITOR.dom.element("div", this.getDocument()); t.setHtml(e), t.moveChildren(this) } else this.setHtml(e) }, appendText: function (e) { null != this.$.text && CKEDITOR.env.ie && 9 > CKEDITOR.env.version ? this.$.text += e : this.append(new CKEDITOR.dom.text(e)) }, appendBogus: function (e) { if (e || CKEDITOR.env.needsBrFiller) { for (e = this.getLast(); e && e.type == CKEDITOR.NODE_TEXT && !CKEDITOR.tools.rtrim(e.getText());)e = e.getPrevious(); e && e.is && e.is("br") || (e = this.getDocument().createElement("br"), CKEDITOR.env.gecko && e.setAttribute("type", "_moz"), this.append(e)) } }, breakParent: function (e, t) { var n = new CKEDITOR.dom.range(this.getDocument()); n.setStartAfter(this), n.setEndAfter(e); var i, o = n.extractContents(!1, t || !1); if (n.insertNode(this.remove()), CKEDITOR.env.ie && !CKEDITOR.env.edge) { for (n = new CKEDITOR.dom.element("div"); i = o.getFirst();)i.$.style.backgroundColor && (i.$.style.backgroundColor = i.$.style.backgroundColor), n.append(i); n.insertAfter(this), n.remove(!0) } else o.insertAfterNode(this) }, contains: document.compareDocumentPosition ? function (e) { return !!(16 & this.$.compareDocumentPosition(e.$)) } : function (e) { var t = this.$; return e.type != CKEDITOR.NODE_ELEMENT ? t.contains(e.getParent().$) : t != e.$ && t.contains(e.$) }, focus: function () { function e() { try { this.$.focus() } catch (e) { } } return function (t) { t ? CKEDITOR.tools.setTimeout(e, 100, this) : e.call(this) } }(), getHtml: function () { var e = this.$.innerHTML; return CKEDITOR.env.ie ? e.replace(/<\?[^>]*>/g, "") : e }, getOuterHtml: function () { if (this.$.outerHTML) return this.$.outerHTML.replace(/<\?[^>]*>/, ""); var e = this.$.ownerDocument.createElement("div"); return e.appendChild(this.$.cloneNode(!0)), e.innerHTML }, getClientRect: function () { var e = CKEDITOR.tools.extend({}, this.$.getBoundingClientRect()); return !e.width && (e.width = e.right - e.left), !e.height && (e.height = e.bottom - e.top), e }, setHtml: CKEDITOR.env.ie && 9 > CKEDITOR.env.version ? function (e) { try { var t = this.$; if (this.getParent()) return t.innerHTML = e; var n = this.getDocument()._getHtml5ShivFrag(); return n.appendChild(t), t.innerHTML = e, n.removeChild(t), e } catch (i) { for (this.$.innerHTML = "", t = new CKEDITOR.dom.element("body", this.getDocument()), t.$.innerHTML = e, t = t.getChildren(); t.count();)this.append(t.getItem(0)); return e } } : function (e) { return this.$.innerHTML = e }, setText: function () { var e = document.createElement("p"); return e.innerHTML = "x", e = e.textContent, function (t) { this.$[e ? "textContent" : "innerText"] = t } }(), getAttribute: function () { var e = function (e) { return this.$.getAttribute(e, 2) }; return CKEDITOR.env.ie && (CKEDITOR.env.ie7Compat || CKEDITOR.env.quirks) ? function (e) { switch (e) { case "class": e = "className"; break; case "http-equiv": e = "httpEquiv"; break; case "name": return this.$.name; case "tabindex": return e = this.$.getAttribute(e, 2), 0 !== e && 0 === this.$.tabIndex && (e = null), e; case "checked": return e = this.$.attributes.getNamedItem(e), (e.specified ? e.nodeValue : this.$.checked) ? "checked" : null; case "hspace": case "value": return this.$[e]; case "style": return this.$.style.cssText; case "contenteditable": case "contentEditable": return this.$.attributes.getNamedItem("contentEditable").specified ? this.$.getAttribute("contentEditable") : null }return this.$.getAttribute(e, 2) } : e }(), getAttributes: function (e) { var t, n = {}, i = this.$.attributes; for (e = CKEDITOR.tools.isArray(e) ? e : [], t = 0; t < i.length; t++)-1 === CKEDITOR.tools.indexOf(e, i[t].name) && (n[i[t].name] = i[t].value); return n }, getChildren: function () { return new CKEDITOR.dom.nodeList(this.$.childNodes) }, getComputedStyle: document.defaultView && document.defaultView.getComputedStyle ? function (e) { var t = this.getWindow().$.getComputedStyle(this.$, null); return t ? t.getPropertyValue(e) : "" } : function (e) { return this.$.currentStyle[CKEDITOR.tools.cssStyleToDomStyle(e)] }, getDtd: function () { var e = CKEDITOR.dtd[this.getName()]; return this.getDtd = function () { return e }, e }, getElementsByTag: CKEDITOR.dom.document.prototype.getElementsByTag, getTabIndex: function () { var e = this.$.tabIndex; return 0 !== e || CKEDITOR.dtd.$tabIndex[this.getName()] || 0 === parseInt(this.getAttribute("tabindex"), 10) ? e : -1 }, getText: function () { return this.$.textContent || this.$.innerText || "" }, getWindow: function () { return this.getDocument().getWindow() }, getId: function () { return this.$.id || null }, getNameAtt: function () { return this.$.name || null }, getName: function () { var e = this.$.nodeName.toLowerCase(); if (CKEDITOR.env.ie && 8 >= document.documentMode) { var t = this.$.scopeName; "HTML" != t && (e = t.toLowerCase() + ":" + e) } return this.getName = function () { return e }, this.getName() }, getValue: function () { return this.$.value }, getFirst: function (e) { var t = this.$.firstChild; return (t = t && new CKEDITOR.dom.node(t)) && e && !e(t) && (t = t.getNext(e)), t }, getLast: function (e) { var t = this.$.lastChild; return (t = t && new CKEDITOR.dom.node(t)) && e && !e(t) && (t = t.getPrevious(e)), t }, getStyle: function (e) { return this.$.style[CKEDITOR.tools.cssStyleToDomStyle(e)] }, is: function () { var e = this.getName(); if ("object" == typeof arguments[0]) return !!arguments[0][e]; for (var t = 0; t < arguments.length; t++)if (arguments[t] == e) return !0; return !1 }, isEditable: function (e) { var t = this.getName();
106 return this.isReadOnly() || "none" == this.getComputedStyle("display") || "hidden" == this.getComputedStyle("visibility") || CKEDITOR.dtd.$nonEditable[t] || CKEDITOR.dtd.$empty[t] || this.is("a") && (this.data("cke-saved-name") || this.hasAttribute("name")) && !this.getChildCount() ? !1 : !1 !== e ? (e = CKEDITOR.dtd[t] || CKEDITOR.dtd.span, !(!e || !e["#"])) : !0 }, isIdentical: function (e) { var t = this.clone(0, 1); if (e = e.clone(0, 1), t.removeAttributes(["_moz_dirty", "data-cke-expando", "data-cke-saved-href", "data-cke-saved-name"]), e.removeAttributes(["_moz_dirty", "data-cke-expando", "data-cke-saved-href", "data-cke-saved-name"]), t.$.isEqualNode) return t.$.style.cssText = CKEDITOR.tools.normalizeCssText(t.$.style.cssText), e.$.style.cssText = CKEDITOR.tools.normalizeCssText(e.$.style.cssText), t.$.isEqualNode(e.$); if (t = t.getOuterHtml(), e = e.getOuterHtml(), CKEDITOR.env.ie && 9 > CKEDITOR.env.version && this.is("a")) { var n = this.getParent(); n.type == CKEDITOR.NODE_ELEMENT && (n = n.clone(), n.setHtml(t), t = n.getHtml(), n.setHtml(e), e = n.getHtml()) } return t == e }, isVisible: function () { var e, t, n = (this.$.offsetHeight || this.$.offsetWidth) && "hidden" != this.getComputedStyle("visibility"); return n && CKEDITOR.env.webkit && (e = this.getWindow(), !e.equals(CKEDITOR.document.getWindow()) && (t = e.$.frameElement) && (n = new CKEDITOR.dom.element(t).isVisible())), !!n }, isEmptyInlineRemoveable: function () { if (!CKEDITOR.dtd.$removeEmpty[this.getName()]) return !1; for (var e = this.getChildren(), t = 0, n = e.count(); n > t; t++) { var i = e.getItem(t); if ((i.type != CKEDITOR.NODE_ELEMENT || !i.data("cke-bookmark")) && (i.type == CKEDITOR.NODE_ELEMENT && !i.isEmptyInlineRemoveable() || i.type == CKEDITOR.NODE_TEXT && CKEDITOR.tools.trim(i.getText()))) return !1 } return !0 }, hasAttributes: CKEDITOR.env.ie && (CKEDITOR.env.ie7Compat || CKEDITOR.env.quirks) ? function () { for (var e = this.$.attributes, t = 0; t < e.length; t++) { var n = e[t]; switch (n.nodeName) { case "class": if (this.getAttribute("class")) return !0; case "data-cke-expando": continue; default: if (n.specified) return !0 } } return !1 } : function () { var e = this.$.attributes, t = e.length, n = { "data-cke-expando": 1, _moz_dirty: 1 }; return t > 0 && (t > 2 || !n[e[0].nodeName] || 2 == t && !n[e[1].nodeName]) }, hasAttribute: function () { function e(e) { var t = this.$.attributes.getNamedItem(e); if ("input" == this.getName()) switch (e) { case "class": return 0 < this.$.className.length; case "checked": return !!this.$.checked; case "value": return e = this.getAttribute("type"), "checkbox" == e || "radio" == e ? "on" != this.$.value : !!this.$.value }return t ? t.specified : !1 } return CKEDITOR.env.ie ? 8 > CKEDITOR.env.version ? function (t) { return "name" == t ? !!this.$.name : e.call(this, t) } : e : function (e) { return !!this.$.attributes.getNamedItem(e) } }(), hide: function () { this.setStyle("display", "none") }, moveChildren: function (e, t) { var n = this.$; if (e = e.$, n != e) { var i; if (t) for (; i = n.lastChild;)e.insertBefore(n.removeChild(i), e.firstChild); else for (; i = n.firstChild;)e.appendChild(n.removeChild(i)) } }, mergeSiblings: function () { function e(e, t, n) { if (t && t.type == CKEDITOR.NODE_ELEMENT) { for (var i = []; t.data("cke-bookmark") || t.isEmptyInlineRemoveable();)if (i.push(t), t = n ? t.getNext() : t.getPrevious(), !t || t.type != CKEDITOR.NODE_ELEMENT) return; if (e.isIdentical(t)) { for (var o = n ? e.getLast() : e.getFirst(); i.length;)i.shift().move(e, !n); t.moveChildren(e, !n), t.remove(), o && o.type == CKEDITOR.NODE_ELEMENT && o.mergeSiblings() } } } return function (t) { (!1 === t || CKEDITOR.dtd.$removeEmpty[this.getName()] || this.is("a")) && (e(this, this.getNext(), !0), e(this, this.getPrevious())) } }(), show: function () { this.setStyles({ display: "", visibility: "" }) }, setAttribute: function () { var e = function (e, t) { return this.$.setAttribute(e, t), this }; return CKEDITOR.env.ie && (CKEDITOR.env.ie7Compat || CKEDITOR.env.quirks) ? function (t, n) { return "class" == t ? this.$.className = n : "style" == t ? this.$.style.cssText = n : "tabindex" == t ? this.$.tabIndex = n : "checked" == t ? this.$.checked = n : "contenteditable" == t ? e.call(this, "contentEditable", n) : e.apply(this, arguments), this } : CKEDITOR.env.ie8Compat && CKEDITOR.env.secure ? function (t, n) { if ("src" == t && n.match(/^http:\/\//)) try { e.apply(this, arguments) } catch (i) { } else e.apply(this, arguments); return this } : e }(), setAttributes: function (e) { for (var t in e) this.setAttribute(t, e[t]); return this }, setValue: function (e) { return this.$.value = e, this }, removeAttribute: function () { var e = function (e) { this.$.removeAttribute(e) }; return CKEDITOR.env.ie && (CKEDITOR.env.ie7Compat || CKEDITOR.env.quirks) ? function (e) { "class" == e ? e = "className" : "tabindex" == e ? e = "tabIndex" : "contenteditable" == e && (e = "contentEditable"), this.$.removeAttribute(e) } : e }(), removeAttributes: function (e) { if (CKEDITOR.tools.isArray(e)) for (var t = 0; t < e.length; t++)this.removeAttribute(e[t]); else for (t in e = e || this.getAttributes()) e.hasOwnProperty(t) && this.removeAttribute(t) }, removeStyle: function (e) { var t = this.$.style; if (t.removeProperty || "border" != e && "margin" != e && "padding" != e) t.removeProperty ? t.removeProperty(e) : t.removeAttribute(CKEDITOR.tools.cssStyleToDomStyle(e)), this.$.style.cssText || this.removeAttribute("style"); else { var n, i = ["top", "left", "right", "bottom"]; "border" == e && (n = ["color", "style", "width"]); for (var t = [], o = 0; o < i.length; o++)if (n) for (var r = 0; r < n.length; r++)t.push([e, i[o], n[r]].join("-")); else t.push([e, i[o]].join("-")); for (e = 0; e < t.length; e++)this.removeStyle(t[e]) } }, setStyle: function (e, t) { return this.$.style[CKEDITOR.tools.cssStyleToDomStyle(e)] = t, this }, setStyles: function (e) { for (var t in e) this.setStyle(t, e[t]); return this }, setOpacity: function (e) { CKEDITOR.env.ie && 9 > CKEDITOR.env.version ? (e = Math.round(100 * e), this.setStyle("filter", e >= 100 ? "" : "progid:DXImageTransform.Microsoft.Alpha(opacity=" + e + ")")) : this.setStyle("opacity", e) }, unselectable: function () { if (this.setStyles(CKEDITOR.tools.cssVendorPrefix("user-select", "none")), CKEDITOR.env.ie) { this.setAttribute("unselectable", "on"); for (var e, t = this.getElementsByTag("*"), n = 0, i = t.count(); i > n; n++)e = t.getItem(n), e.setAttribute("unselectable", "on") } }, getPositionedAncestor: function () { for (var e = this; "html" != e.getName();) { if ("static" != e.getComputedStyle("position")) return e; e = e.getParent() } return null }, getDocumentPosition: function (e) { var t = 0, n = 0, i = this.getDocument(), o = i.getBody(), r = "BackCompat" == i.$.compatMode; if (document.documentElement.getBoundingClientRect && (CKEDITOR.env.ie ? 8 !== CKEDITOR.env.version : 1)) { var s = this.$.getBoundingClientRect(), a = i.$.documentElement, l = a.clientTop || o.$.clientTop || 0, c = a.clientLeft || o.$.clientLeft || 0, d = !0; CKEDITOR.env.ie && (d = i.getDocumentElement().contains(this), i = i.getBody().contains(this), d = r && i || !r && d), d && (CKEDITOR.env.webkit || CKEDITOR.env.ie && 12 <= CKEDITOR.env.version ? (t = o.$.scrollLeft || a.scrollLeft, n = o.$.scrollTop || a.scrollTop) : (n = r ? o.$ : a, t = n.scrollLeft, n = n.scrollTop), t = s.left + t - c, n = s.top + n 
106- l) } else for (l = this, c = null; l && "body" != l.getName() && "html" != l.getName();) { for (t += l.$.offsetLeft - l.$.scrollLeft, n += l.$.offsetTop - l.$.scrollTop, l.equals(this) || (t += l.$.clientLeft || 0, n += l.$.clientTop || 0); c && !c.equals(l);)t -= c.$.scrollLeft, n -= c.$.scrollTop, c = c.getParent(); c = l, l = (s = l.$.offsetParent) ? new CKEDITOR.dom.element(s) : null } return e && (s = this.getWindow(), l = e.getWindow(), !s.equals(l) && s.$.frameElement && (e = new CKEDITOR.dom.element(s.$.frameElement).getDocumentPosition(e), t += e.x, n += e.y)), document.documentElement.getBoundingClientRect || !CKEDITOR.env.gecko || r || (t += this.$.clientLeft ? 1 : 0, n += this.$.clientTop ? 1 : 0), { x: t, y: n } }, scrollIntoView: function (e) { var t = this.getParent(); if (t) do if ((t.$.clientWidth && t.$.clientWidth < t.$.scrollWidth || t.$.clientHeight && t.$.clientHeight < t.$.scrollHeight) && !t.is("body") && this.scrollIntoParent(t, e, 1), t.is("html")) { var n = t.getWindow(); try { var i = n.$.frameElement; i && (t = new CKEDITOR.dom.element(i)) } catch (o) { } } while (t = t.getParent()) }, scrollIntoParent: function (e, t, n) { function i(t, n) { /body|html/.test(e.getName()) ? e.getWindow().$.scrollBy(t, n) : (e.$.scrollLeft += t, e.$.scrollTop += n) } function o(e, t) { var n = { x: 0, y: 0 }; if (!e.is(d ? "body" : "html")) { var i = e.$.getBoundingClientRect(); n.x = i.left, n.y = i.top } return i = e.getWindow(), i.equals(t) || (i = o(CKEDITOR.dom.element.get(i.$.frameElement), t), n.x += i.x, n.y += i.y), n } function r(e, t) { return parseInt(e.getComputedStyle("margin-" + t) || 0, 10) || 0 } var s, a, l, c; !e && (e = this.getWindow()), l = e.getDocument(); var d = "BackCompat" == l.$.compatMode; e instanceof CKEDITOR.dom.window && (e = d ? l.getBody() : l.getDocumentElement()), CKEDITOR.env.webkit && (l = this.getEditor(!1)) && (l._.previousScrollTop = null), l = e.getWindow(), a = o(this, l); var u = o(e, l), h = this.$.offsetHeight; s = this.$.offsetWidth; var p = e.$.clientHeight, f = e.$.clientWidth; l = a.x - r(this, "left") - u.x || 0, c = a.y - r(this, "top") - u.y || 0, s = a.x + s + r(this, "right") - (u.x + f) || 0, a = a.y + h + r(this, "bottom") - (u.y + p) || 0, (0 > c || a > 0) && i(0, !0 === t ? c : !1 === t ? a : 0 > c ? c : a), n && (0 > l || s > 0) && i(0 > l ? l : s, 0) }, setState: function (e, t, n) { switch (t = t || "cke", e) { case CKEDITOR.TRISTATE_ON: this.addClass(t + "_on"), this.removeClass(t + "_off"), this.removeClass(t + "_disabled"), n && this.setAttribute("aria-pressed", !0), n && this.removeAttribute("aria-disabled"); break; case CKEDITOR.TRISTATE_DISABLED: this.addClass(t + "_disabled"), this.removeClass(t + "_off"), this.removeClass(t + "_on"), n && this.setAttribute("aria-disabled", !0), n && this.removeAttribute("aria-pressed"); break; default: this.addClass(t + "_off"), this.removeClass(t + "_on"), this.removeClass(t + "_disabled"), n && this.removeAttribute("aria-pressed"), n && this.removeAttribute("aria-disabled") } }, getFrameDocument: function () { var e = this.$; try { e.contentWindow.document } catch (t) { e.src = e.src } return e && new CKEDITOR.dom.document(e.contentWindow.document) }, copyAttributes: function (e, t) { var n = this.$.attributes; t = t || {}; for (var i = 0; i < n.length; i++) { var o, r = n[i], s = r.nodeName.toLowerCase(); s in t || ("checked" == s && (o = this.getAttribute(s)) ? e.setAttribute(s, o) : CKEDITOR.env.ie && !this.hasAttribute(s) || (o = this.getAttribute(s), null === o && (o = r.nodeValue), e.setAttribute(s, o))) } "" !== this.$.style.cssText && (e.$.style.cssText = this.$.style.cssText) }, renameNode: function (e) { if (this.getName() != e) { var t = this.getDocument(); e = new CKEDITOR.dom.element(e, t), this.copyAttributes(e), this.moveChildren(e), this.getParent(!0) && this.$.parentNode.replaceChild(e.$, this.$), e.$["data-cke-expando"] = this.$["data-cke-expando"], this.$ = e.$, delete this.getName } }, getChild: function () { function e(e, t) { var n = e.childNodes; return t >= 0 && t < n.length ? n[t] : void 0 } return function (t) { var n = this.$; if (t.slice) for (t = t.slice(); 0 < t.length && n;)n = e(n, t.shift()); else n = e(n, t); return n ? new CKEDITOR.dom.node(n) : null } }(), getChildCount: function () { return this.$.childNodes.length }, disableContextMenu: function () { function e(e) { return e.type == CKEDITOR.NODE_ELEMENT && e.hasClass("cke_enable_context_menu") } this.on("contextmenu", function (t) { t.data.getTarget().getAscendant(e, !0) || t.data.preventDefault() }) }, getDirection: function (e) { return e ? this.getComputedStyle("direction") || this.getDirection() || this.getParent() && this.getParent().getDirection(1) || this.getDocument().$.dir || "ltr" : this.get
106Style("direction") || this.getAttribute("dir") }, data: function (e, t) { return e = "data-" + e, void 0 === t ? this.getAttribute(e) : (!1 === t ? this.removeAttribute(e) : this.setAttribute(e, t), null) }, getEditor: function (e) { var t, n, i, o = CKEDITOR.instances; e = e || void 0 === e; for (t in o) if (n = o[t], n.element.equals(this) && n.elementMode != CKEDITOR.ELEMENT_MODE_APPENDTO || !e && (i = n.editable()) && (i.equals(this) || i.contains(this))) return n; return null }, find: function (e) { var i = t(this); return e = new CKEDITOR.dom.nodeList(this.$.querySelectorAll(n(this, e))), i(), e }, findOne: function (e) { var i = t(this); return e = this.$.querySelector(n(this, e)), i(), e ? new CKEDITOR.dom.element(e) : null }, forEach: function (e, t, n) { if (!(n || t && this.type != t)) var i = e(this); if (!1 !== i) { n = this.getChildren(); for (var o = 0; o < n.count(); o++)i = n.getItem(o), i.type == CKEDITOR.NODE_ELEMENT ? i.forEach(e, t) : t && i.type != t || e(i) } } }); var s = { width: ["border-left-width", "border-right-width", "padding-left", "padding-right"], height: ["border-top-width", "border-bottom-width", "padding-top", "padding-bottom"] }; CKEDITOR.dom.element.prototype.setSize = function (e, t, n) { "number" == typeof t && (!n || CKEDITOR.env.ie && CKEDITOR.env.quirks || (t -= i.call(this, e)), this.setStyle(e, t + "px")) }, CKEDITOR.dom.element.prototype.getSize = function (e, t) { var n = Math.max(this.$["offset" + CKEDITOR.tools.capitalize(e)], this.$["client" + CKEDITOR.tools.capitalize(e)]) || 0; return t && (n -= i.call(this, e)), n } }(), CKEDITOR.dom.documentFragment = function (e) { e = e || CKEDITOR.document, this.$ = e.type == CKEDITOR.NODE_DOCUMENT ? e.$.createDocumentFragment() : e }, CKEDITOR.tools.extend(CKEDITOR.dom.documentFragment.prototype, CKEDITOR.dom.element.prototype, { type: CKEDITOR.NODE_DOCUMENT_FRAGMENT, insertAfterNode: function (e) { e = e.$, e.parentNode.insertBefore(this.$, e.nextSibling) }, getHtml: function () { var e = new CKEDITOR.dom.element("div"); return this.clone(1, 1).appendTo(e), e.getHtml().replace(/\s*data-cke-expando=".*?"/g, "") } }, !0, { append: 1, appendBogus: 1, clone: 1, getFirst: 1, getHtml: 1, getLast: 1, getParent: 1, getNext: 1, getPrevious: 1, appendTo: 1, moveChildren: 1, insertBefore: 1, insertAfterNode: 1, replace: 1, trim: 1, type: 1, ltrim: 1, rtrim: 1, getDocument: 1, getChildCount: 1, getChild: 1, getChildren: 1 }), function () { function e(e, t) { var n = this.range; if (this._.end) return null; if (!this._.start) { if (this._.start = 1, n.collapsed) return this.end(), null; n.optimize() } var i, o = n.startContainer; i = n.endContainer; var r, s = n.startOffset, a = n.endOffset, l = this.guard, c = this.type, d = e ? "getPreviousSourceNode" : "getNextSourceNode"; if (!e && !this._.guardLTR) { var u = i.type == CKEDITOR.NODE_ELEMENT ? i : i.getParent(), h = i.type == CKEDITOR.NODE_ELEMENT ? i.getChild(a) : i.getNext(); this._.guardLTR = function (e, t) { return !(t && u.equals(e) || h && e.equals(h) || e.type == CKEDITOR.NODE_ELEMENT && t && e.equals(n.root)) } } if (e && !this._.guardRTL) { var p = o.type == CKEDITOR.NODE_ELEMENT ? o : o.getParent(), f = o.type == CKEDITOR.NODE_ELEMENT ? s ? o.getChild(s - 1) : null : o.getPrevious(); this._.guardRTL = function (e, t) { return !(t && p.equals(e) || f && e.equals(f) || e.type == CKEDITOR.NODE_ELEMENT && t && e.equals(n.root)) } } var m = e ? this._.guardRTL : this._.guardLTR; for (r = l ? function (e, t) { return !1 === m(e, t) ? !1 : l(e, t) } : m, this.current ? i = this.current[d](!1, c, r) : (e ? i.type == CKEDITOR.NODE_ELEMENT && (i = a > 0 ? i.getChild(a - 1) : !1 === r(i, !0) ? null : i.getPreviousSourceNode(!0, c, r)) : (i = o, i.type == CKEDITOR.NODE_ELEMENT && ((i = i.getChild(s)) || (i = !1 === r(o, !0) ? null : o.getNextSourceNode(!0, c, r)))), i && !1 === r(i) && (i = null)); i && !this._.end;) { if (this.current = i, this.evaluator && !1 === this.evaluator(i)) { if (t && this.evaluator) return !1 } else if (!t) return i; i = i[d](!1, c, r) } return this.end(), this.current = null } function t(t) { for (var n, i = null; n = e.call(this, t);
106)i = n; return i } CKEDITOR.dom.walker = CKEDITOR.tools.createClass({ $: function (e) { this.range = e, this._ = {} }, proto: { end: function () { this._.end = 1 }, next: function () { return e.call(this) }, previous: function () { return e.call(this, 1) }, checkForward: function () { return !1 !== e.call(this, 0, 1) }, checkBackward: function () { return !1 !== e.call(this, 1, 1) }, lastForward: function () { return t.call(this) }, lastBackward: function () { return t.call(this, 1) }, reset: function () { delete this.current, this._ = {} } } }); var n = { block: 1, "list-item": 1, table: 1, "table-row-group": 1, "table-header-group": 1, "table-footer-group": 1, "table-row": 1, "table-column-group": 1, "table-column": 1, "table-cell": 1, "table-caption": 1 }, i = { absolute: 1, fixed: 1 }; CKEDITOR.dom.element.prototype.isBlockBoundary = function (e) { return "none" != this.getComputedStyle("float") || this.getComputedStyle("position") in i || !n[this.getComputedStyle("display")] ? !!(this.is(CKEDITOR.dtd.$block) || e && this.is(e)) : !0 }, CKEDITOR.dom.walker.blockBoundary = function (e) { return function (t) { return !(t.type == CKEDITOR.NODE_ELEMENT && t.isBlockBoundary(e)) } }, CKEDITOR.dom.walker.listItemBoundary = function () { return this.blockBoundary({ br: 1 }) }, CKEDITOR.dom.walker.bookmark = function (e, t) { function n(e) { return e && e.getName && "span" == e.getName() && e.data("cke-bookmark") } return function (i) { var o, r; return o = i && i.type != CKEDITOR.NODE_ELEMENT && (r = i.getParent()) && n(r), o = e ? o : o || n(i), !!(t ^ o) } }, CKEDITOR.dom.walker.whitespaces = function (e) { return function (t) { var n; return t && t.type == CKEDITOR.NODE_TEXT && (n = !CKEDITOR.tools.trim(t.getText()) || CKEDITOR.env.webkit && t.getText() == CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE), !!(e ^ n) } }, CKEDITOR.dom.walker.invisible = function (e) { var t = CKEDITOR.dom.walker.whitespaces(), n = CKEDITOR.env.webkit ? 1 : 0; return function (i) { return t(i) ? i = 1 : (i.type == CKEDITOR.NODE_TEXT && (i = i.getParent()), i = i.$.offsetWidth <= n), !!(e ^ i) } }, CKEDITOR.dom.walker.nodeType = function (e, t) { return function (n) { return !!(t ^ n.type == e) } }, CKEDITOR.dom.walker.bogus = function (e) { function t(e) { return !r(e) && !s(e) } return function (n) { var i = CKEDITOR.env.needsBrFiller ? n.is && n.is("br") : n.getText && o.test(n.getText()); return i && (i = n.getParent(), n = n.getNext(t), i = i.isBlockBoundary() && (!n || n.type == CKEDITOR.NODE_ELEMENT && n.isBlockBoundary())), !!(e ^ i) } }, CKEDITOR.dom.walker.temp = function (e) { return function (t) { return t.type != CKEDITOR.NODE_ELEMENT && (t = t.getParent()), t = t && t.hasAttribute("data-cke-temp"), !!(e ^ t) } }; var o = /^[\t\r\n ]*(?:&nbsp;|\xa0)$/, r = CKEDITOR.dom.walker.whitespaces(), s = CKEDITOR.dom.walker.bookmark(), a = CKEDITOR.dom.walker.temp(), l = function (e) { return s(e) || r(e) || e.type == CKEDITOR.NODE_ELEMENT && e.is(CKEDITOR.dtd.$inline) && !e.is(CKEDITOR.dtd.$empty) }; CKEDITOR.dom.walker.ignored = function (e) { return function (t) { return t = r(t) || s(t) || a(t), !!(e ^ t) } }; var c = CKEDITOR.dom.walker.ignored(); CKEDITOR.dom.walker.empty = function (e) { return function (t) { for (var n = 0, i = t.getChildCount(); i > n; ++n)if (!c(t.getChild(n))) return !!e; return !e } }; var d = CKEDITOR.dom.walker.empty(), u = CKEDITOR.dom.walker.validEmptyBlockContainers = CKEDITOR.tools.extend(function (e) { var t, n = {}; for (t in e) CKEDITOR.dtd[t]["#"] && (n[t] = 1); return n }(CKEDITOR.dtd.$block), { caption: 1, td: 1, th: 1 }); CKEDITOR.dom.walker.editable = function (e) { return function (t) { return t = c(t) ? !1 : !!(t.type == CKEDITOR.NODE_TEXT || t.type == CKEDITOR.NODE_ELEMENT && (t.is(CKEDITOR.dtd.$inline) || t.is("hr") || "false" == t.getAttribute("contenteditable") || !CKEDITOR.env.needsBrFiller && t.is(u) && d(t))), !!(e ^ t) } }, CKEDITOR.dom.element.prototype.getBogus = function () { var e = this; do e = e.getPreviousSourceNode(); while (l(e)); return e && (CKEDITOR.env.needsBrFiller ? e.is && e.is("br") : e.getText && o.test(e.getText())) ? e : !1 } }(), CKEDITOR.dom.range = function (e) { this.endOffset = this.endContainer = this.startOffset = this.startContainer = null, this.collapsed = !0; var t = e instanceof CKEDITOR.dom.document; this.document = t ? e : e.getDocument(), this.root = t ? e.getBody() : e }, function () {
107            function e(e) { e.collapsed = e.startContainer && e.endContainer && e.startContainer.equals(e.endContainer) && e.startOffset == e.endOffset } function t(e, t, n, i, o) { function r(e, t, n, i) { var r = n ? e.getPrevious() : e.getNext(); return i && l ? r : (d || i ? t.append(e.clone(!0, o), n) : (e.remove(), c && t.append(e)), r) } function s() { var e, t, n, i = Math.min(I.length, O.length); for (e = 0; i > e; e++)if (t = I[e], n = O[e], !t.equals(n)) return e; return e - 1 } function a() { var t = D - 1, n = p && f && !v.equals(E); R - 1 > t || k - 1 > t || n ? (n ? e.moveToPosition(E, CKEDITOR.POSITION_BEFORE_START) : k == t + 1 && h ? e.moveToPosition(O[t], CKEDITOR.POSITION_BEFORE_END) : e.moveToPosition(O[t + 1], CKEDITOR.POSITION_BEFORE_START), i && (t = I[t + 1]) && t.type == CKEDITOR.NODE_ELEMENT && (n = CKEDITOR.dom.element.createFromHtml('<span data-cke-bookmark="1" style="display:none">&nbsp;</span>', e.document), n.insertAfter(t), t.mergeSiblings(!1), e.moveToBookmark({ startNode: n }))) : e.collapse(!0) } e.optimizeBookmark(); var l = 0 === t, c = 1 == t, d = 2 == t; t = d || c; var u, h, p, f, m, g, v = e.startContainer, E = e.endContainer, T = e.startOffset, y = e.endOffset; if (d && E.type == CKEDITOR.NODE_TEXT && v.equals(E)) v = e.document.createText(v.substring(T, y)), n.append(v); else { E.type == CKEDITOR.NODE_TEXT ? d ? g = !0 : E = E.split(y) : 0 < E.getChildCount() ? y >= E.getChildCount() ? (E = E.getChild(y - 1), h = !0) : E = E.getChild(y) : f = h = !0, v.type == CKEDITOR.NODE_TEXT ? d ? m = !0 : v.split(T) : 0 < v.getChildCount() ? 0 === T ? (v = v.getChild(T), u = !0) : v = v.getChild(T - 1) : p = u = !0; for (var b, C, _, I = v.getParents(), O = E.getParents(), D = s(), R = I.length - 1, k = O.length - 1, w = n, x = -1, K = D; R >= K; K++) { for (C = I[K], _ = C.getNext(), K != R || C.equals(O[K]) && k > R ? t && (b = w.append(C.clone(0, o))) : u ? r(C, w, !1, p) : m && w.append(e.document.createText(C.substring(T))); _;) { if (_.equals(O[K])) { x = K; break } _ = r(_, w) } w = b } for (w = n, K = D; k >= K; K++)if (n = O[K], _ = n.getPrevious(), n.equals(I[K])) t && (w = w.getChild(0)); else { if (K != k || n.equals(I[K]) && R > k ? t && (b = w.append(n.clone(0, o))) : h ? r(n, w, !1, f) : g && w.append(e.document.createText(n.substring(0, y))), K > x) for (; _;)_ = r(_, w, !0); w = b } d || a() } }
107 function n() { var e = !1, t = CKEDITOR.dom.walker.whitespaces(), n = CKEDITOR.dom.walker.bookmark(!0), i = CKEDITOR.dom.walker.bogus(); return function (o) { return n(o) || t(o) ? !0 : i(o) && !e ? e = !0 : !(o.type == CKEDITOR.NODE_TEXT && (o.hasAscendant("pre") || CKEDITOR.tools.trim(o.getText()).length) || o.type == CKEDITOR.NODE_ELEMENT && !o.is(r)) } } function i(e) { var t = CKEDITOR.dom.walker.whitespaces(), n = CKEDITOR.dom.walker.bookmark(1); return function (i) { return n(i) || t(i) ? !0 : !e && s(i) || i.type == CKEDITOR.NODE_ELEMENT && i.is(CKEDITOR.dtd.$removeEmpty) } } function o(e) { return function () { var t; return this[e ? "getPreviousNode" : "getNextNode"](function (e) { return !t && c(e) && (t = e), l(e) && !(s(e) && e.equals(t)) }) } } var r = { abbr: 1, acronym: 1, b: 1, bdo: 1, big: 1, cite: 1, code: 1, del: 1, dfn: 1, em: 1, font: 1, i: 1, ins: 1, label: 1, kbd: 1, q: 1, samp: 1, small: 1, span: 1, strike: 1, strong: 1, sub: 1, sup: 1, tt: 1, u: 1, "var": 1 }, s = CKEDITOR.dom.walker.bogus(), a = /^[\t\r\n ]*(?:&nbsp;|\xa0)$/, l = CKEDITOR.dom.walker.editable(), c = CKEDITOR.dom.walker.ignored(!0); CKEDITOR.dom.range.prototype = {
108                clone: function () { var e = new CKEDITOR.dom.range(this.root); return e._setStartContainer(this.startContainer), e.startOffset = this.startOffset, e._setEndContainer(this.endContainer), e.endOffset = this.endOffset, e.collapsed = this.collapsed, e }, collapse: function (e) { e ? (this._setEndContainer(this.startContainer), this.endOffset = this.startOffset) : (this._setStartContainer(this.endContainer), this.startOffset = this.endOffset), this.collapsed = !0 }, cloneContents: function (e) { var n = new CKEDITOR.dom.documentFragment(this.document); return this.collapsed || t(this, 2, n, !1, "undefined" == typeof e ? !0 : e), n }, deleteContents: function (e) { this.collapsed || t(this, 0, null, e) }, extractContents: function (e, n) { var i = new CKEDITOR.dom.documentFragment(this.document); return this.collapsed || t(this, 1, i, e, "undefined" == typeof n ? !0 : n), i }, createBookmark: function (e) {
109                    var t, n, i, o, r = this.collapsed;
110                    return t = this.document.createElement("span"), t.data("cke-bookmark", 1), t.setStyle("display", "none"), t.setHtml("&nbsp;"), e && (i = "cke_bm_" + CKEDITOR.tools.getNextNumber(), t.setAttribute("id", i + (r ? "C" : "S"))), r || (n = t.clone(), n.setHtml("&nbsp;"), e && n.setAttribute("id", i + "E"), o = this.clone(), o.collapse(), o.insertNode(n)), o = this.clone(), o.collapse(!0), o.insertNode(t), n ? (this.setStartAfter(t), this.setEndBefore(n)) : this.moveToPosition(t, CKEDITOR.POSITION_AFTER_END), { startNode: e ? i + (r ? "C" : "S") : t, endNode: e ? i + "E" : n, serializable: e, collapsed: r }
111                }, createBookmark2: function () { function e(e) { var t, i = e.container, o = e.offset; t = i; var r = o; if (t = t.type != CKEDITOR.NODE_ELEMENT || 0 === r || r == t.getChildCount() ? 0 : t.getChild(r - 1).type == CKEDITOR.NODE_TEXT && t.getChild(r).type == CKEDITOR.NODE_TEXT, t && (i = i.getChild(o - 1), o = i.getLength()), i.type == CKEDITOR.NODE_ELEMENT && o > 0) { e: { for (t = i; o--;)if (r = t.getChild(o).getIndex(!0), r >= 0) { o = r; break e } o = -1 } o += 1 } if (i.type == CKEDITOR.NODE_TEXT) { for (t = i, r = 0; (t = t.getPrevious()) && t.type == CKEDITOR.NODE_TEXT;)r += t.getText().replace(CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE, "").length; t = r, i.getText() ? o += t : (r = i.getPrevious(n), t ? (o = t, i = r ? r.getNext() : i.getParent().getFirst()) : (i = i.getParent(), o = r ? r.getIndex(!0) + 1 : 0)) } e.container = i, e.offset = o } function t(e, t) { var n = t.getCustomData("cke-fillingChar"); if (n) { var i = e.container; n.equals(i) && (e.offset -= CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE.length, 0 >= e.offset && (e.offset = i.getIndex(), e.container = i.getParent())) } } var n = CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_TEXT, !0); return function (n) { var i = this.collapsed, o = { container: this.startContainer, offset: this.startOffset }, r = { container: this.endContainer, offset: this.endOffset }; return n && (e(o), t(o, this.root), i || (e(r), t(r, this.root))), { start: o.container.getAddress(n), end: i ? null : r.container.getAddress(n), startOffset: o.offset, endOffset: r.offset, normalized: n, collapsed: i, is2: !0 } } }(), moveToBookmark: function (e) { if (e.is2) { var t = this.document.getByAddress(e.start, e.normalized), n = e.startOffset, i = e.end && this.document.getByAddress(e.end, e.normalized); e = e.endOffset, this.setStart(t, n), i ? this.setEnd(i, e) : this.collapse(!0) } else t = (n = e.serializable) ? this.document.getById(e.startNode) : e.startNode, e = n ? this.document.getById(e.endNode) : e.endNode, this.setStartBefore(t), t.remove(), e ? (this.setEndBefore(e), e.remove()) : this.collapse(!0) }, getBoundaryNodes: function () { var e, t = this.startContainer, n = this.endContainer, i = this.startOffset, o = this.endOffset; if (t.type == CKEDITOR.NODE_ELEMENT) if (e = t.getChildCount(), e > i) t = t.getChild(i); else if (1 > e) t = t.getPreviousSourceNode(); else { for (t = t.$; t.lastChild;
111)t = t.lastChild; t = new CKEDITOR.dom.node(t), t = t.getNextSourceNode() || t } if (n.type == CKEDITOR.NODE_ELEMENT) if (e = n.getChildCount(), e > o) n = n.getChild(o).getPreviousSourceNode(!0); else if (1 > e) n = n.getPreviousSourceNode(); else { for (n = n.$; n.lastChild;)n = n.lastChild; n = new CKEDITOR.dom.node(n) } return t.getPosition(n) & CKEDITOR.POSITION_FOLLOWING && (t = n), { startNode: t, endNode: n } }, getCommonAncestor: function (e, t) { var n = this.startContainer, i = this.endContainer, n = n.equals(i) ? e && n.type == CKEDITOR.NODE_ELEMENT && this.startOffset == this.endOffset - 1 ? n.getChild(this.startOffset) : n : n.getCommonAncestor(i); return t && !n.is ? n.getParent() : n }, optimize: function () { var e = this.startContainer, t = this.startOffset; e.type != CKEDITOR.NODE_ELEMENT && (t ? t >= e.getLength() && this.setStartAfter(e) : this.setStartBefore(e)), e = this.endContainer, t = this.endOffset, e.type != CKEDITOR.NODE_ELEMENT && (t ? t >= e.getLength() && this.setEndAfter(e) : this.setEndBefore(e)) }, optimizeBookmark: function () { var e = this.startContainer, t = this.endContainer; e.is && e.is("span") && e.data("cke-bookmark") && this.setStartAt(e, CKEDITOR.POSITION_BEFORE_START), t && t.is && t.is("span") && t.data("cke-bookmark") && this.setEndAt(t, CKEDITOR.POSITION_AFTER_END) }, trim: function (e, t) { var n = this.startContainer, i = this.startOffset, o = this.collapsed; if ((!e || o) && n && n.type == CKEDITOR.NODE_TEXT) { if (i) if (i >= n.getLength()) i = n.getIndex() + 1, n = n.getParent(); else { var r = n.split(i), i = n.getIndex() + 1, n = n.getParent(); this.startContainer.equals(this.endContainer) ? this.setEnd(r, this.endOffset - this.startOffset) : n.equals(this.endContainer) && (this.endOffset += 1) } else i = n.getIndex(), n = n.getParent(); if (this.setStart(n, i), o) return void this.collapse(!0) } n = this.endContainer, i = this.endOffset, t || o || !n || n.type != CKEDITOR.NODE_TEXT || (i ? (i >= n.getLength() || n.split(i), i = n.getIndex() + 1) : i = n.getIndex(), n = n.getParent(), this.setEnd(n, i)) }, enlarge: function (e, t) { function n(e) { return e && e.type == CKEDITOR.NODE_ELEMENT && e.hasAttribute("contenteditable") ? null : e } var i = new RegExp(/[^\s\ufeff]/); switch (e) { case CKEDITOR.ENLARGE_INLINE: var o = 1; case CKEDITOR.ENLARGE_ELEMENT: var r = function (e, t) { var n = new CKEDITOR.dom.range(f); n.setStart(e, t), n.setEndAt(f, CKEDITOR.POSITION_BEFORE_END); var o, n = new CKEDITOR.dom.walker(n); for (n.guard = function (e) { return !(e.type == CKEDITOR.NODE_ELEMENT && e.isBlockBoundary()) }; o = n.next();) { if (o.type != CKEDITOR.NODE_TEXT) return !1; if (h = o != e ? o.getText() : o.substring(t), i.test(h)) return !1 } return !0 }; if (this.collapsed) break; var s, a, l, c, d, u, h, p = this.getCommonAncestor(), f = this.root, m = !1; u = this.startContainer; var g = this.startOffset; for (u.type == CKEDITOR.NODE_TEXT ? (g && (u = !CKEDITOR.tools.trim(u.substring(0, g)).length && u, m = !!u), u && ((c = u.getPrevious()) || (l = u.getParent()))) : (g && (c = u.getChild(g - 1) || u.getLast()), c || (l = u)), l = n(l); l || c;) { if (l && !c) { if (!d && l.equals(p) && (d = !0), o ? l.isBlockBoundary() : !f.contains(l)) break; m && "inline" == l.getComputedStyle("display") || (m = !1, d ? s = l : this.setStartBefore(l)), c = l.getPrevious() } for (; c;)if (u = !1, c.type == CKEDITOR.NODE_COMMENT) c = c.getPrevious(); else { if (c.type == CKEDITOR.NODE_TEXT) h = c.getText(), i.test(h) && (c = null), u = /[\s\ufeff]$/.test(h); else if ((c.$.offsetWidth > (CKEDITOR.env.webkit ? 1 : 0) || t && c.is("br")) && !c.data("cke-bookmark")) if (m && CKEDITOR.dtd.$removeEmpty[c.getName()]) { if (h = c.getText(), i.test(h)) c = null; else for (var v, g = c.$.getElementsByTagName("*"), E = 0; v = g[E++];)if (!CKEDITOR.dtd.$removeEmpty[v.nodeName.toLowerCase()]) { c = null; break } c && (u = !!h.length) } else c = null; if (u && (m ? d ? s = l : l && this.setStartBefore(l) : m = !0), c) { if (u = c.getPrevious(), !l && !u) { l = c, c = null; break } c = u } else l = null } l && (l = n(l.getParent())) } for (u = this.endContainer, g = this.endOffset, l = c = null, d = m = !1, u.type == CKEDITOR.NODE_TEXT ? CKEDITOR.tools.trim(u.substring(g)).length ? m = !0 : (m = !u.getLength(), g == u.getLength() ? (c = u.getNext()) || (l = u.getParent()) : r(u, g) && (l = u.getParent())) : (c = u.getChild(g)) || (l = u); l || c;) { if (l && !c) { if (!d && l.equals(p) && (d = !0), o ? l.isBlockBoundary() : !f.contains(l)) break; m && "inline" == l.getComputedStyle("display") || (m = !1, d ? a = l : l && this.setEndAfter(l)), c = l.getNext() } for (; c;) { if (u = !1, c.type == CKEDITOR.NODE_TEXT) h = c.getText(), r(c, 0) || (c = null), u = /^[\s\ufeff]/.test(h);
111 else if (c.type == CKEDITOR.NODE_ELEMENT) { if ((0 < c.$.offsetWidth || t && c.is("br")) && !c.data("cke-bookmark")) if (m && CKEDITOR.dtd.$removeEmpty[c.getName()]) { if (h = c.getText(), i.test(h)) c = null; else for (g = c.$.getElementsByTagName("*"), E = 0; v = g[E++];)if (!CKEDITOR.dtd.$removeEmpty[v.nodeName.toLowerCase()]) { c = null; break } c && (u = !!h.length) } else c = null } else u = 1; if (u && m && (d ? a = l : this.setEndAfter(l)), c) { if (u = c.getNext(), !l && !u) { l = c, c = null; break } c = u } else l = null } l && (l = n(l.getParent())) } s && a && (p = s.contains(a) ? a : s, this.setStartBefore(p), this.setEndAfter(p)); break; case CKEDITOR.ENLARGE_BLOCK_CONTENTS: case CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS: l = new CKEDITOR.dom.range(this.root), f = this.root, l.setStartAt(f, CKEDITOR.POSITION_AFTER_START), l.setEnd(this.startContainer, this.startOffset), l = new CKEDITOR.dom.walker(l); var T, y, b = CKEDITOR.dom.walker.blockBoundary(e == CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS ? { br: 1 } : null), C = null, _ = function (e) { if (e.type == CKEDITOR.NODE_ELEMENT && "false" == e.getAttribute("contenteditable")) if (C) { if (C.equals(e)) return void (C = null) } else C = e; else if (C) return; var t = b(e); return t || (T = e), t }, o = function (e) { var t = _(e); return !t && e.is && e.is("br") && (y = e), t }; if (l.guard = _, l = l.lastBackward(), T = T || f, this.setStartAt(T, !T.is("br") && (!l && this.checkStartOfBlock() || l && T.contains(l)) ? CKEDITOR.POSITION_AFTER_START : CKEDITOR.POSITION_AFTER_END), e == CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS) { l = this.clone(), l = new CKEDITOR.dom.walker(l); var I = CKEDITOR.dom.walker.whitespaces(), O = CKEDITOR.dom.walker.bookmark(); if (l.evaluator = function (e) { return !I(e) && !O(e) }, (l = l.previous()) && l.type == CKEDITOR.NODE_ELEMENT && l.is("br")) break } l = this.clone(), l.collapse(), l.setEndAt(f, CKEDITOR.POSITION_BEFORE_END), l = new CKEDITOR.dom.walker(l), l.guard = e == CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS ? o : _, T = C = y = null, l = l.lastForward(), T = T || f, this.setEndAt(T, !l && this.checkEndOfBlock() || l && T.contains(l) ? CKEDITOR.POSITION_BEFORE_END : CKEDITOR.POSITION_BEFORE_START), y && this.setEndAfter(y) } }, shrink: function (e, t, n) { if (!this.collapsed) { e = e || CKEDITOR.SHRINK_TEXT; var i = this.clone(), o = this.startContainer, r = this.endContainer, s = this.startOffset, a = this.endOffset, l = 1, c = 1; o && o.type == CKEDITOR.NODE_TEXT && (s ? s >= o.getLength() ? i.setStartAfter(o) : (i.setStartBefore(o), l = 0) : i.setStartBefore(o)), r && r.type == CKEDITOR.NODE_TEXT && (a ? a >= r.getLength() ? i.setEndAfter(r) : (i.setEndAfter(r), c = 0) : i.setEndBefore(r)); var i = new CKEDITOR.dom.walker(i), d = CKEDITOR.dom.walker.bookmark(); i.evaluator = function (t) { return t.type == (e == CKEDITOR.SHRINK_ELEMENT ? CKEDITOR.NODE_ELEMENT : CKEDITOR.NODE_TEXT) }; var u; return i.guard = function (t, i) { return d(t) ? !0 : e == CKEDITOR.SHRINK_ELEMENT && t.type == CKEDITOR.NODE_TEXT || i && t.equals(u) || !1 === n && t.type == CKEDITOR.NODE_ELEMENT && t.isBlockBoundary() || t.type == CKEDITOR.NODE_ELEMENT && t.hasAttribute("contenteditable") ? !1 : (i || t.type != CKEDITOR.NODE_ELEMENT || (u = t), !0) }, l && (o = i[e == CKEDITOR.SHRINK_ELEMENT ? "lastForward" : "next"]()) && this.setStartAt(o, t ? CKEDITOR.POSITION_AFTER_START : CKEDITOR.POSITION_BEFORE_START), c && (i.reset(), (i = i[e == CKEDITOR.SHRINK_ELEMENT ? "lastBackward" : "previous"]()) && this.setEndAt(i, t ? CKEDITOR.POSITION_BEFORE_END : CKEDITOR.POSITION_AFTER_END)), !(!l && !c) } }, insertNode: function (e) { this.optimizeBookmark(), this.trim(!1, !0); var t = this.startContainer, n = t.getChild(this.startOffset); n ? e.insertBefore(n) : t.append(e), e.getParent() && e.getParent().equals(this.endContainer) && this.endOffset++, this.setStartBefore(e) }, moveToPosition: function (e, t) { this.setStartAt(e, t), this.collapse(!0) }, moveToRange: function (e) { this.setStart(e.startContainer, e.startOffset), this.setEnd(e.endContainer, e.endOffset) }, selectNodeContents: function (e) { this.setStart(e, 0), this.setEnd(e, e.type == CKEDITOR.NODE_TEXT ? e.getLength() : e.getChildCount()) }, setStart: function (t, n) { t.type == CKEDITOR.NODE_ELEMENT && CKEDITOR.dtd.$empty[t.getName()] && (n = t.getIndex(), t = t.getParent()), this._setStartContainer(t), this.startOffset = n, this.endContainer || (this._setEndContainer(t), this.endOffset = n), e(this) }, setEnd: function (t, n) { t.type == CKEDITOR.NODE_ELEMENT && CKEDITOR.dtd.$empty[t.getName()] && (n = t.getIndex() + 1, t = t.getParent()), this._setEndContainer(t), this.endOffset = n, this.startContainer || (this._setStartContainer(t), this.startOffset = n), e(this) }, setStartAfter: function (e) { this.setStart(e.getParent(), e.getIndex() + 1) }, setStartBefore: function (e) { this.setStart(e.getParent(), e.getIndex()) }, setEndAfter: function (e) { this.setEnd(e.getParent(), e.getIndex() + 1) }, setEndBefore: function (e) { this.setEnd(e.getParent(), e.getIndex()) }, setStartAt: function (t, n) { switch (n) { case CKEDITOR.POSITION_AFTER_START: this.setStart(t, 0); break; case CKEDITOR.POSITION_BEFORE_END: t.type == CKEDITOR.NODE_TEXT ? this.setStart(t, t.getLength()) : this.setStart(t, t.getChildCount()); break; case CKEDITOR.POSITION_BEFORE_START: this.setStartBefore(t); break; case CKEDITOR.POSITION_AFTER_END: this.setStartAfter(t) }e(this) }, setEndAt: function (t, n) { switch (n) { case CKEDITOR.POSITION_AFTER_START: this.setEnd(t, 0); break; case CKEDITOR.POSITION_BEFORE_END: t.type == CKEDITOR.NODE_TEXT ? this.setEnd(t, t.getLength()) : this.setEnd(t, t.getChildCount()); break; case CKEDITOR.POSITION_BEFORE_START: this.setEndBefore(t); break; case CKEDITOR.POSITION_AFTER_END: this.setEndAfter(t) }e(this) }, fixBlock: function (e, t) { var n = this.createBookmark(), i = this.document.createElement(t); this.collapse(e), this.enlarge(CKEDITOR.ENLARGE_BLOCK_CONTENTS), this.extractContents().appendTo(i), i.trim(), this.insertNode(i); var o = i.getBogus(); return o && o.remove(), i.appendBogus(), this.moveToBookmark(n), i }, splitBlock: function (e, t) { var n = new CKEDITOR.dom.elementPath(this.startContainer, this.root), i = new CKEDITOR.dom.elementPath(this.endContainer, this.root), o = n.block, r = i.block, s = null; return n.blockLimit.equals(i.blockLimit) ? ("br" != e && (o || (o = this.fixBlock(!0, e), r = new CKEDITOR.dom.elementPath(this.endContainer, this.root).block), r || (r = this.fixBlock(!1, e))), n = o && this.checkStartOfBlock(), i = r && this.checkEndOfBlock(), this.deleteContents(), o && o.equals(r) && (i ? (s = new CKEDITOR.dom.elementPath(this.startContainer, this.root), this.moveToPosition(r, CKEDITOR.POSITION_AFTER_END), r = null) : n ? (s = new CKEDITOR.dom.elementPath(this.startContainer, this.root), this.moveToPosition(o, CKEDITOR.POSITION_BEFORE_START), o = null) : (r = this.splitElement(o, t || !1), o.is("ul", "ol") || o.appendBogus())), { previousBlock: o, nextBlock: r, wasStartOfBlock: n, wasEndOfBlock: i, elementPath: s }) : null }, splitElement: function (e, t) { if (!this.collapsed) return null; this.setEndAt(e, CKEDITOR.POSITION_BEFORE_END); var n = this.extractContents(!1, t || !1), i = e.clone(!1, t || !1); return n.appendTo(i), i.insertAfter(e), this.moveToPosition(e, CKEDITOR.POSITION_AFTER_END), i }, removeEmptyBlocksAtEnd: function () { function e(e) { return function (i) { return !(t(i) || n(i) || i.type == CKEDITOR.NODE_ELEMENT && i.isEmptyInlineRemoveable() || e.is("table") && i.is("caption")) } }
111 var t = CKEDITOR.dom.walker.whitespaces(), n = CKEDITOR.dom.walker.bookmark(!1); return function (t) { for (var n, i = this.createBookmark(), o = this[t ? "endPath" : "startPath"](), r = o.block || o.blockLimit; r && !r.equals(o.root) && !r.getFirst(e(r));)n = r.getParent(), this[t ? "setEndAt" : "setStartAt"](r, CKEDITOR.POSITION_AFTER_END), r.remove(1), r = n; this.moveToBookmark(i) } }(), startPath: function () { return new CKEDITOR.dom.elementPath(this.startContainer, this.root) }, endPath: function () { return new CKEDITOR.dom.elementPath(this.endContainer, this.root) }, checkBoundaryOfElement: function (e, t) { var n = t == CKEDITOR.START, o = this.clone(); return o.collapse(n), o[n ? "setStartAt" : "setEndAt"](e, n ? CKEDITOR.POSITION_AFTER_START : CKEDITOR.POSITION_BEFORE_END), o = new CKEDITOR.dom.walker(o), o.evaluator = i(n), o[n ? "checkBackward" : "checkForward"]() }, checkStartOfBlock: function () { var e = this.startContainer, t = this.startOffset; return CKEDITOR.env.ie && t && e.type == CKEDITOR.NODE_TEXT && (e = CKEDITOR.tools.ltrim(e.substring(0, t)), a.test(e) && this.trim(0, 1)), this.trim(), e = new CKEDITOR.dom.elementPath(this.startContainer, this.root), t = this.clone(), t.collapse(!0), t.setStartAt(e.block || e.blockLimit, CKEDITOR.POSITION_AFTER_START), e = new CKEDITOR.dom.walker(t), e.evaluator = n(), e.checkBackward() }, checkEndOfBlock: function () { var e = this.endContainer, t = this.endOffset; return CKEDITOR.env.ie && e.type == CKEDITOR.NODE_TEXT && (e = CKEDITOR.tools.rtrim(e.substring(t)), a.test(e) && this.trim(1, 0)), this.trim(), e = new CKEDITOR.dom.elementPath(this.endContainer, this.root), t = this.clone(), t.collapse(!1), t.setEndAt(e.block || e.blockLimit, CKEDITOR.POSITION_BEFORE_END), e = new CKEDITOR.dom.walker(t), e.evaluator = n(), e.checkForward() }, getPreviousNode: function (e, t, n) { var i = this.clone(); return i.collapse(1), i.setStartAt(n || this.root, CKEDITOR.POSITION_AFTER_START), n = new CKEDITOR.dom.walker(i), n.evaluator = e, n.guard = t, n.previous() }, getNextNode: function (e, t, n) { var i = this.clone(); return i.collapse(), i.setEndAt(n || this.root, CKEDITOR.POSITION_BEFORE_END), n = new CKEDITOR.dom.walker(i), n.evaluator = e, n.guard = t, n.next() }, checkReadOnly: function () { function e(e, t) { for (; e;) { if (e.type == CKEDITOR.NODE_ELEMENT) { if ("false" == e.getAttribute("contentEditable") && !e.data("cke-editable")) return 0; if (e.is("html") || "true" == e.getAttribute("contentEditable") && (e.contains(t) || e.equals(t))) break } e = e.getParent() } return 1 } return function () { var t = this.startContainer, n = this.endContainer; return !(e(t, n) && e(n, t)) } }(), moveToElementEditablePosition: function (e, t) { if (e.type == CKEDITOR.NODE_ELEMENT && !e.isEditable(!1)) return this.moveToPosition(e, t ? CKEDITOR.POSITION_AFTER_END : CKEDITOR.POSITION_BEFORE_START), !0; for (var n = 0; e;) { if (e.type == CKEDITOR.NODE_TEXT) { t && this.endContainer && this.checkEndOfBlock() && a.test(e.getText()) ? this.moveToPosition(e, CKEDITOR.POSITION_BEFORE_START) : this.moveToPosition(e, t ? CKEDITOR.POSITION_AFTER_END : CKEDITOR.POSITION_BEFORE_START), n = 1; break } if (e.type == CKEDITOR.NODE_ELEMENT) if (e.isEditable()) this.moveToPosition(e, t ? CKEDITOR.POSITION_BEFORE_END : CKEDITOR.POSITION_AFTER_START), n = 1; else if (t && e.is("br") && this.endContainer && this.checkEndOfBlock()) this.moveToPosition(e, CKEDITOR.POSITION_BEFORE_START); else if ("false" == e.getAttribute("contenteditable") && e.is(CKEDITOR.dtd.$block)) return this.setStartBefore(e), this.setEndAfter(e), !0; var i = e, o = n, r = void 0; i.type == CKEDITOR.NODE_ELEMENT && i.isEditable(!1) && (r = i[t ? "getLast" : "getFirst"](c)), o || r || (r = i[t ? "getPrevious" : "getNext"](c)), e = r } return !!n }, moveToClosestEditablePosition: function (e, t) { var n, i, o, r = 0, s = [CKEDITOR.POSITION_AFTER_END, CKEDITOR.POSITION_BEFORE_START]; return e ? (n = new CKEDITOR.dom.range(this.root), n.moveToPosition(e, s[t ? 0 : 1])) : n = this.clone(), e && !e.is(CKEDITOR.dtd.$block) ? r = 1 : (i = n[t ? "getNextEditableNode" : "getPreviousEditableNode"]()) && (r = 1, (o = i.type == CKEDITOR.NODE_ELEMENT) && i.is(CKEDITOR.dtd.$block) && "false" == i.getAttribute("contenteditable") ? (n.setStartAt(i, CKEDITOR.POSITION_BEFORE_START), n.setEndAt(i, CKEDITOR.POSITION_AFTER_END)) : !CKEDITOR.env.needsBrFiller && o && i.is(CKEDITOR.dom.walker.validEmptyBlockContainers
111) ? (n.setEnd(i, 0), n.collapse()) : n.moveToPosition(i, s[t ? 1 : 0])), r && this.moveToRange(n), !!r }, moveToElementEditStart: function (e) { return this.moveToElementEditablePosition(e) }, moveToElementEditEnd: function (e) { return this.moveToElementEditablePosition(e, !0) }, getEnclosedNode: function () { var e = this.clone(); if (e.optimize(), e.startContainer.type != CKEDITOR.NODE_ELEMENT || e.endContainer.type != CKEDITOR.NODE_ELEMENT) return null; var e = new CKEDITOR.dom.walker(e), t = CKEDITOR.dom.walker.bookmark(!1, !0), n = CKEDITOR.dom.walker.whitespaces(!0); e.evaluator = function (e) { return n(e) && t(e) }; var i = e.next(); return e.reset(), i && i.equals(e.previous()) ? i : null }, getTouchedStartNode: function () { var e = this.startContainer; return this.collapsed || e.type != CKEDITOR.NODE_ELEMENT ? e : e.getChild(this.startOffset) || e }, getTouchedEndNode: function () { var e = this.endContainer; return this.collapsed || e.type != CKEDITOR.NODE_ELEMENT ? e : e.getChild(this.endOffset - 1) || e }, getNextEditableNode: o(), getPreviousEditableNode: o(1), scrollIntoView: function () { var e, t, n, i = new CKEDITOR.dom.element.createFromHtml("<span>&nbsp;</span>", this.document), o = this.clone(); o.optimize(), (n = o.startContainer.type == CKEDITOR.NODE_TEXT) ? (t = o.startContainer.getText(), e = o.startContainer.split(o.startOffset), i.insertAfter(o.startContainer)) : o.insertNode(i), i.scrollIntoView(), n && (o.startContainer.setText(t), e.remove()), i.remove() }, _setStartContainer: function (e) { this.startContainer = e }, _setEndContainer: function (e) { this.endContainer = e }, _find: function (e, t) { var n, i, o, r, s = this.getCommonAncestor(), a = this.getBoundaryNodes(), l = []; if (s && s.find) for (i = s.find(e), n = 0; n < i.count(); n++)s = i.getItem(n), (t || !s.isReadOnly()) && (o = s.getPosition(a.startNode) & CKEDITOR.POSITION_FOLLOWING || a.startNode.equals(s), r = s.getPosition(a.endNode) & CKEDITOR.POSITION_PRECEDING + CKEDITOR.POSITION_IS_CONTAINED, o && r && l.push(s)); return l }
112            }
113        }(), CKEDITOR.POSITION_AFTER_START = 1, CKEDITOR.POSITION_BEFORE_END = 2, CKEDITOR.POSITION_BEFORE_START = 3, CKEDITOR.POSITION_AFTER_END = 4, CKEDITOR.ENLARGE_ELEMENT = 1, CKEDITOR.ENLARGE_BLOCK_CONTENTS = 2, CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS = 3, CKEDITOR.ENLARGE_INLINE = 4, CKEDITOR.START = 1, CKEDITOR.END = 2, CKEDITOR.SHRINK_ELEMENT = 1, CKEDITOR.SHRINK_TEXT = 2, function () { function e(e) { 1 > arguments.length || (this.range = e, this.forceBrBreak = 0, this.enlargeBr = 1, this.enforceRealBlocks = 0, this._ || (this._ = {})) } function t(e) { var t = []; return e.forEach(function (e) { return "true" == e.getAttribute("contenteditable") ? (t.push(e), !1) : void 0 }, CKEDITOR.NODE_ELEMENT, !0), t } function n(e, i, o, r) { e: { null == r && (r = t(o)); for (var s; s = r.shift();)if (s.getDtd().p) { r = { element: s, remaining: r }; break e } r = null } return r ? (s = CKEDITOR.filter.instances[r.element.data("cke-filter")]) && !s.check(i) ? n(e, i, o, r.remaining) : (i = new CKEDITOR.dom.range(r.element), i.selectNodeContents(r.element), i = i.createIterator(), i.enlargeBr = e.enlargeBr, i.enforceRealBlocks = e.enforceRealBlocks, i.activeFilter = i.filter = s, e._.nestedEditable = { element: r.element, container: o, remaining: r.remaining, iterator: i }, 1) : 0 } function i(e, t, n) { return t ? (e = e.clone(), e.collapse(!n), e.checkBoundaryOfElement(t, n ? CKEDITOR.START : CKEDITOR.END)) : !1 } var o = /^[\r\n\t ]+$/, r = CKEDITOR.dom.walker.bookmark(!1, !0), s = CKEDITOR.dom.walker.whitespaces(!0), a = function (e) { return r(e) && s(e) }, l = { dd: 1, dt: 1, li: 1 }; e.prototype = { getNextParagraph: function (e) { var t, s, c, d, u; if (e = e || "p", this._.nestedEditable) { if (t = this._.nestedEditable.iterator.getNextParagraph(e)) return this.activeFilter = this._.nestedEditable.iterator.activeFilter, t; if (this.activeFilter = this.filter, n(this, e, this._.nestedEditable.container, this._.nestedEditable.remaining)) return this.activeFilter = this._.nestedEditable.iterator.activeFilter, this._.nestedEditable.iterator.getNextParagraph(e); this._.nestedEditable = null } if (!this.range.root.getDtd()[e]) return null; if (!this._.started) { var h = this.range.clone(); s = h.startPath(); var p = h.endPath(), f = !h.collapsed && i(h, s.block), m = !h.collapsed && i(h, p.block, 1); h.shrink(CKEDITOR.SHRINK_ELEMENT, !0), f && h.setStartAt(s.block, CKEDITOR.POSITION_BEFORE_END), m && h.setEndAt(p.block, CKEDITOR.POSITION_AFTER_START), s = h.endContainer.hasAscendant("pre", !0) || h.startContainer.hasAscendant("pre", !0), h.enlarge(this.forceBrBreak && !s || !this.enlargeBr ? CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS : CKEDITOR.ENLARGE_BLOCK_CONTENTS), h.collapsed || (s = new CKEDITOR.dom.walker(h.clone()), p = CKEDITOR.dom.walker.bookmark(!0, !0), s.evaluator = p, this._.nextNode = s.next(), s = new CKEDITOR.dom.walker(h.clone()), s.evaluator = p, s = s.previous(), this._.lastNode = s.getNextSourceNode(!0, null, h.root), this._.lastNode && this._.lastNode.type == CKEDITOR.NODE_TEXT && !CKEDITOR.tools.trim(this._.lastNode.getText()) && this._.lastNode.getParent().isBlockBoundary() && (p = this.range.clone(), p.moveToPosition(this._.lastNode, CKEDITOR.POSITION_AFTER_END), p.checkEndOfBlock() && (p = new CKEDITOR.dom.elementPath(p.endContainer, p.root), this._.lastNode = (p.block || p.blockLimit).getNextSourceNode(!0))), this._.lastNode && h.root.contains(this._.lastNode) || (this._.lastNode = this._.docEndMarker = h.document.createText(""), this._.lastNode.insertAfter(s)), h = null), this._.started = 1, s = h } for (p = this._.nextNode, h = this._.lastNode, this._.nextNode = null; p;) { var f = 0, m = p.hasAscendant("pre"), g = p.type != CKEDITOR.NODE_ELEMENT, v = 0; if (g) p.type == CKEDITOR.NODE_TEXT && o.test(p.getText()) && (g = 0); else { var E = p.getName(); if (CKEDITOR.dtd.$block[E] && "false" == p.getAttribute("contenteditable")) { t = p, n(this, e, t); break } if (p.isBlockBoundary(this.forceBrBreak && !m && { br: 1 })) { if ("br" == E) g = 1; else if (!s && !p.getChildCount() && "hr" != E) { t = p, c = p.equals(h); break } s && (s.setEndAt(p, CKEDITOR.POSITION_BEFORE_START), "br" != E && (this._.nextNode = p)), f = 1 } else { if (p.getFirst()) { s || (s = this.range.clone(), s.setStartAt(p, CKEDITOR.POSITION_BEFORE_START)), p = p.getFirst();
113 continue } g = 1 } } if (g && !s && (s = this.range.clone(), s.setStartAt(p, CKEDITOR.POSITION_BEFORE_START)), c = (!f || g) && p.equals(h), s && !f) for (; !p.getNext(a) && !c;) { if (E = p.getParent(), E.isBlockBoundary(this.forceBrBreak && !m && { br: 1 })) { f = 1, g = 0, c || E.equals(h), s.setEndAt(E, CKEDITOR.POSITION_BEFORE_END); break } p = E, g = 1, c = p.equals(h), v = 1 } if (g && s.setEndAt(p, CKEDITOR.POSITION_AFTER_END), p = this._getNextSourceNode(p, v, h), (c = !p) || f && s) break } if (!t) { if (!s) return this._.docEndMarker && this._.docEndMarker.remove(), this._.nextNode = null; t = new CKEDITOR.dom.elementPath(s.startContainer, s.root), p = t.blockLimit, f = { div: 1, th: 1, td: 1 }, t = t.block, !t && p && !this.enforceRealBlocks && f[p.getName()] && s.checkStartOfBlock() && s.checkEndOfBlock() && !p.equals(s.root) ? t = p : !t || this.enforceRealBlocks && t.is(l) ? (t = this.range.document.createElement(e), s.extractContents().appendTo(t), t.trim(), s.insertNode(t), d = u = !0) : "li" != t.getName() ? s.checkStartOfBlock() && s.checkEndOfBlock() || (t = t.clone(!1), s.extractContents().appendTo(t), t.trim(), u = s.splitBlock(), d = !u.wasStartOfBlock, u = !u.wasEndOfBlock, s.insertNode(t)) : c || (this._.nextNode = t.equals(h) ? null : this._getNextSourceNode(s.getBoundaryNodes().endNode, 1, h)) } return d && (d = t.getPrevious()) && d.type == CKEDITOR.NODE_ELEMENT && ("br" == d.getName() ? d.remove() : d.getLast() && "br" == d.getLast().$.nodeName.toLowerCase() && d.getLast().remove()), u && (d = t.getLast()) && d.type == CKEDITOR.NODE_ELEMENT && "br" == d.getName() && (!CKEDITOR.env.needsBrFiller || d.getPrevious(r) || d.getNext(r)) && d.remove(), this._.nextNode || (this._.nextNode = c || t.equals(h) || !h ? null : this._getNextSourceNode(t, 1, h)), t }, _getNextSourceNode: function (e, t, n) { function i(e) { return !(e.equals(n) || e.equals(o)) } var o = this.range.root; for (e = e.getNextSourceNode(t, null, i); !r(e);)e = e.getNextSourceNode(t, null, i); return e } }, CKEDITOR.dom.range.prototype.createIterator = function () { return new e(this) } }(), CKEDITOR.command = function (e, t) { this.uiItems = [], this.exec = function (n) { return this.state != CKEDITOR.TRISTATE_DISABLED && this.checkAllowed() ? (this.editorFocus && e.focus(), !1 === this.fire("exec") ? !0 : !1 !== t.exec.call(this, e, n)) : !1 }, this.refresh = function (e, n) { return !this.readOnly && e.readOnly ? !0 : this.context && !n.isContextFor(this.context) || !this.checkAllowed(!0) ? (this.disable(), !0) : (this.startDisabled || this.enable(), this.modes && !this.modes[e.mode] && this.disable(), !1 === this.fire("refresh", { editor: e, path: n }) ? !0 : t.refresh && !1 !== t.refresh.apply(this, arguments)) }; var n; this.checkAllowed = function (t) { return t || "boolean" != typeof n ? n = e.activeFilter.checkFeature(this) : n }, CKEDITOR.tools.extend(this, t, { modes: { wysiwyg: 1 }, editorFocus: 1, contextSensitive: !!t.context, state: CKEDITOR.TRISTATE_DISABLED }), CKEDITOR.event.call(this) }, CKEDITOR.command.prototype = { enable: function () { this.state == CKEDITOR.TRISTATE_DISABLED && this.checkAllowed() && this.setState(this.preserveState && "undefined" != typeof this.previousState ? this.previousState : CKEDITOR.TRISTATE_OFF) }, disable: function () { this.setState(CKEDITOR.TRISTATE_DISABLED) }, setState: function (e) { return this.state == e || e != CKEDITOR.TRISTATE_DISABLED && !this.checkAllowed() ? !1 : (this.previousState = this.state, this.state = e, this.fire("state"), !0) }, toggleState: function () { this.state == CKEDITOR.TRISTATE_OFF ? this.setState(CKEDITOR.TRISTATE_ON) : this.state == CKEDITOR.TRISTATE_ON && this.setState(CKEDITOR.TRISTATE_OFF) } }, CKEDITOR.event.implementOn(CKEDITOR.command.prototype), CKEDITOR.ENTER_P = 1, CKEDITOR.ENTER_BR = 2, CKEDITOR.ENTER_DIV = 3, CKEDITOR.config = { customConfig: "config.js", autoUpdateElement: !0, language: "", defaultLanguage: "en", contentsLangDirection: "", enterMode: CKEDITOR.ENTER_P, forceEnterMode: !1, shiftEnterMode: CKEDITOR.ENTER_BR, docType: "<!DOCTYPE html>", bodyId: "", bodyClass: "", fullPage: !1, height: 200, contentsCss: CKEDITOR.getUrl("contents.css"), extraPlugins: "", removePlugins: "", protectedSource: [], tabIndex: 0, width: "", baseFloatZIndex: 1e4, blockedKeystrokes: [CKEDITOR.CTRL + 66, CKEDITOR.CTRL + 73, CKEDITOR.CTRL + 85] }, function () {
114            function e(e, t, n, i, o) { var r, a; e = []; for (r in t) { a = t[r], a = "boolean" == typeof a ? {} : "function" == typeof a ? { match: a } : R(a), "$" != r.charAt(0) && (a.elements = r), n && (a.featureName = n.toLowerCase()); var l = a; l.elements = s(l.elements, /\s+/) || null, l.propertiesOnly = l.propertiesOnly || !0 === l.elements; var c = /\s*,\s*/, d = void 0; for (d in K) { l[d] = s(l[d], c) || null;
114 var u = l, h = S[d], p = s(l[S[d]], c), f = l[d], m = [], g = !0, E = void 0; p ? g = !1 : p = {}; for (E in f) "!" == E.charAt(0) && (E = E.slice(1), m.push(E), p[E] = !0, g = !1); for (; E = m.pop();)f[E] = f["!" + E], delete f["!" + E]; u[h] = (g ? !1 : p) || null } l.match = l.match || null, i.push(a), e.push(a) } t = o.elements, o = o.generic; var T; for (n = 0, i = e.length; i > n; ++n) { r = R(e[n]), a = !0 === r.classes || !0 === r.styles || !0 === r.attributes, l = r, d = h = c = void 0; for (c in K) l[c] = v(l[c]); u = !0; for (d in S) { c = S[d], h = l[c], p = [], f = void 0; for (f in h) -1 < f.indexOf("*") ? p.push(new RegExp("^" + f.replace(/\*/g, ".*") + "$")) : p.push(f); h = p, h.length && (l[c] = h, u = !1) } if (l.nothingRequired = u, l.noProperties = !(l.attributes || l.classes || l.styles), !0 === r.elements || null === r.elements) o[a ? "unshift" : "push"](r); else for (T in l = r.elements, delete r.elements, l) t[T] ? t[T][a ? "unshift" : "push"](r) : t[T] = [r] } } function t(e, t, i, o) { if ((!e.match || e.match(t)) && (o || a(e, t)) && (e.propertiesOnly || (i.valid = !0), i.allAttributes || (i.allAttributes = n(e.attributes, t.attributes, i.validAttributes)), i.allStyles || (i.allStyles = n(e.styles, t.styles, i.validStyles)), !i.allClasses)) { if (e = e.classes, t = t.classes, o = i.validClasses, e) if (!0 === e) e = !0; else { for (var r, s = 0, l = t.length; l > s; ++s)r = t[s], o[r] || (o[r] = e(r)); e = !1 } else e = !1; i.allClasses = e } } function n(e, t, n) { if (!e) return !1; if (!0 === e) return !0; for (var i in t) n[i] || (n[i] = e(i)); return !1 } function i(e, t, n) { if (!e.match || e.match(t)) { if (e.noProperties) return !1; if (n.hadInvalidAttribute = o(e.attributes, t.attributes) || n.hadInvalidAttribute, n.hadInvalidStyle = o(e.styles, t.styles) || n.hadInvalidStyle, e = e.classes, t = t.classes, e) { for (var i = !1, r = !0 === e, s = t.length; s--;)(r || e(t[s])) && (t.splice(s, 1), i = !0); e = i } else e = !1; n.hadInvalidClass = e || n.hadInvalidClass } } function o(e, t) { if (!e) return !1; var n, i = !1, o = !0 === e; for (n in t) (o || e(n)) && (delete t[n], i = !0); return i } function r(e, t, n) { return e.disabled || e.customConfig && !n || !t ? !1 : (e._.cachedChecks = {}, !0) } function s(e, t) { if (!e) return !1; if (!0 === e) return e; if ("string" == typeof e) return e = k(e), "*" == e ? !0 : CKEDITOR.tools.convertArrayToObject(e.split(t)); if (CKEDITOR.tools.isArray(e)) return e.length ? CKEDITOR.tools.convertArrayToObject(e) : !1; var n, i = {}, o = 0; for (n in e) i[n] = e[n], o++; return o ? i : !1 } function a(e, t) { if (e.nothingRequired) return !0; var n, i, o, r; if (o = e.requiredClasses) for (r = t.classes, n = 0; n < o.length; ++n)if (i = o[n], "string" == typeof i) { if (-1 == CKEDITOR.tools.indexOf(r, i)) return !1 } else if (!CKEDITOR.tools.checkIfAnyArrayItemMatches(r, i)) return !1; return l(t.styles, e.requiredStyles) && l(t.attributes, e.requiredAttributes) } function l(e, t) { if (!t) return !0; for (var n, i = 0; i < t.length; ++i)if (n = t[i], "string" == typeof n) { if (!(n in e)) return !1 } else if (!CKEDITOR.tools.checkIfAnyObjectPropertyMatches(e, n)) return !1; return !0 } function c(e) { if (!e) return {}; e = e.split(/\s*,\s*/).sort(); for (var t = {}; e.length;)t[e.shift()] = "cke-test"; return t } function d(e) { var t, n, i, o, r = {}, s = 1; for (e = k(e); t = e.match(N);)(n = t[2]) ? (i = u(n, "styles"), o = u(n, "attrs"), n = u(n, "classes")) : i = o = n = null, r["$" + s++] = { elements: t[1], classes: n, styles: i, attributes: o }, e = e.slice(t[0].length); return r } function u(e, t) { var n = e.match(A[t]); return n ? k(n[1]) : null } function h(e) { var t = e.styleBackup = e.attributes.style, n = e.classBackup = e.attributes["class"]; e.styles || (e.styles = CKEDITOR.tools.parseCssText(t || "", 1)), e.classes || (e.classes = n ? n.split(/\s+/) : []) } function p(e, n, o, r) { var s, a = 0; if (r.toHtml && (n.name = n.name.replace($, "$1")), r.doCallbacks && e.elementCallbacks) { e: { s = e.elementCallbacks; for (var l, c = 0, d = s.length; d > c; ++c)if (l = s[c](n)) { s = l; break e } s = void 0 } if (s) return s } if (r.doTransform && (s = e._.transformations[n.name])) { for (h(n), c = 0; c < s.length; ++c)b(e, n, s[c]); m(n) } if (r.doFilter) { e: { c = n.name, d = e._, e = d.allowedRules.elements[c], s = d.allowedRules.generic, c = d.disallowedRules.elements[c], d = d.disallowedRules.generic, l = r.skipRequired; var u, p, f = { valid: !1, validAttributes: {}, validClasses: {}, validStyles: {}, allAttributes: !1, allClasses: !1, allStyles: !1, hadInvalidAttribute: !1, hadInvalidClass: !1, hadInvalidStyle: !1 }; if (e || s) { if (h(n), c) for (u = 0, p = c.length; p > u; ++u)if (!1 === i(c[u], n, f)) { e = null; break e } if (d) for (u = 0, p = d.length; p > u; ++u)i(d[u], n, f); if (e) for (u = 0, p = e.length; p > u; ++u)t(e[u], n, f, l); if (s) for (u = 0, p = s.length; p > u; ++u)t(s[u], n, f, l); e = f } else e = null } if (!e || !e.valid) return o.push(n), 1; p = e.validAttributes; var v = e.validStyles; s = e.validClasses; var c = n.attributes, E = n.styles, d = n.classes; l = n.classBackup; var T, y, C = n.styleBackup, _ = [], f = [], I = /^data-cke-/; if (u = !1, delete c.style, delete c["class"], delete n.classBackup, delete n.styleBackup, !e.allAttributes) for (T in c) p[T] || (I.test(T) ? T == (y = T.replace(/^data-cke-saved-/, "")) || p[y] || (delete c[T], u = !0) : (delete c[T], u = !0)); if (!e.allStyles || e.hadInvalidStyle) { for (T in E) e.allStyles || v[T] ? _.push(T + ":" + E[T]) : u = !0; _.length && (c.style = _.sort().join("; ")) } else C && (c.style = C); if (!e.allClasses || e.hadInvalidClass) { for (T = 0; T < d.length; ++T)(e.allClasses || s[d[T]]) && f.push(d[T]); f.length && (c["class"] = f.sort().join(" ")), l && f.length < l.split(/\s+/).length && (u = !0) } else l && (c["class"] = l); if (u && (a = 1), !r.skipFinalValidation && !g(n)) return o.push(n), 1 } return r.toHtml && (n.name = n.name.replace(L, "cke:$1")), a } function f(e) { var t, n = []; for (t in e) -1 < t.indexOf("*") && n.push(t.replace(/\*/g, ".*")); return n.length ? new RegExp("^(?:" + n.join("|") + ")$") : null } function m(e) { var t, n = e.attributes; delete n.style, delete n["class"], (t = CKEDITOR.tools.writeCssText(e.styles, !0)) && (n.style = t), e.classes.length && (n["class"] = e.classes.sort().join(" ")) }
114 function g(e) { switch (e.name) { case "a": if (!(e.children.length || e.attributes.name || e.attributes.id)) return !1; break; case "img": if (!e.attributes.src) return !1 }return !0 } function v(e) { if (!e) return !1; if (!0 === e) return !0; var t = f(e); return function (n) { return n in e || t && n.match(t) } } function E() {
115                return new CKEDITOR.htmlParser.element("br")
116            } function T(e) { return e.type == CKEDITOR.NODE_ELEMENT && ("br" == e.name || D.$block[e.name]) } function y(e, t, n) { var i = e.name; if (D.$empty[i] || !e.children.length) "hr" == i && "br" == t ? e.replaceWith(E()) : (e.parent && n.push({ check: "it", el: e.parent }), e.remove()); else if (D.$block[i] || "tr" == i) if ("br" == t) e.previous && !T(e.previous) && (t = E(), t.insertBefore(e)), e.next && !T(e.next) && (t = E(), t.insertAfter(e)), e.replaceWithChildren(); else { var o, i = e.children; e: { o = D[t]; for (var r, s = 0, a = i.length; a > s; ++s)if (r = i[s], r.type == CKEDITOR.NODE_ELEMENT && !o[r.name]) { o = !1; break e } o = !0 } if (o) e.name = t, e.attributes = {}, n.push({ check: "parent-down", el: e }); else { o = e.parent; for (var l, c, s = o.type == CKEDITOR.NODE_DOCUMENT_FRAGMENT || "body" == o.name, a = i.length; a > 0;)r = i[--a], s && (r.type == CKEDITOR.NODE_TEXT || r.type == CKEDITOR.NODE_ELEMENT && D.$inline[r.name]) ? (l || (l = new CKEDITOR.htmlParser.element(t), l.insertAfter(e), n.push({ check: "parent-down", el: l })), l.add(r, 0)) : (l = null, c = D[o.name] || D.span, r.insertAfter(e), o.type == CKEDITOR.NODE_DOCUMENT_FRAGMENT || r.type != CKEDITOR.NODE_ELEMENT || c[r.name] || n.push({ check: "el-up", el: r })); e.remove() } } else i in { style: 1, script: 1 } ? e.remove() : (e.parent && n.push({ check: "it", el: e.parent }), e.replaceWithChildren()) } function b(e, t, n) { var i, o; for (i = 0; i < n.length; ++i)if (o = n[i], !(o.check && !e.check(o.check, !1) || o.left && !o.left(t))) { o.right(t, x); break } } function C(e, t) { var n, i, o, r, s = t.getDefinition(), a = s.attributes, l = s.styles; if (e.name != s.element) return !1; for (n in a) if ("class" == n) { for (s = a[n].split(/\s+/), o = e.classes.join("|"); r = s.pop();)if (-1 == o.indexOf(r)) return !1 } else if (e.attributes[n] != a[n]) return !1; for (i in l) if (e.styles[i] != l[i]) return !1; return !0 } function _(e, t) { var n, i; return "string" == typeof e ? n = e : e instanceof CKEDITOR.style ? i = e : (n = e[0], i = e[1]), [{ element: n, left: i, right: function (e, n) { n.transform(e, t) } }] } function I(e) { return function (t) { return C(t, e) } } function O(e) { return function (t, n) { n[e](t) } } var D = CKEDITOR.dtd, R = CKEDITOR.tools.copy, k = CKEDITOR.tools.trim, w = ["", "p", "br", "div"]; CKEDITOR.FILTER_SKIP_TREE = 2, CKEDITOR.filter = function (e) { if (this.allowedContent = [], this.disallowedContent = [], this.elementCallbacks = null, this.disabled = !1, this.editor = null, this.id = CKEDITOR.tools.getNextNumber(), this._ = { allowedRules: { elements: {}, generic: [] }, disallowedRules: { elements: {}, generic: [] }, transformations: {}, cachedTests: {} }, CKEDITOR.filter.instances[this.id] = this, e instanceof CKEDITOR.editor) { e = this.editor = e, this.customConfig = !0; var t = e.config.allowedContent; !0 === t ? this.disabled = !0 : (t || (this.customConfig = !1), this.allow(t, "config", 1), this.allow(e.config.extraAllowedContent, "extra", 1), this.allow(w[e.enterMode] + " " + w[e.shiftEnterMode], "default", 1), this.disallow(e.config.disallowedContent)) } else this.customConfig = !1, this.allow(e, "default", 1) }, CKEDITOR.filter.instances = {}, CKEDITOR.filter.prototype = { allow: function (t, n, i) { if (!r(this, t, i)) return !1; var o, s; if ("string" == typeof t) t = d(t); else if (t instanceof CKEDITOR.style) { if (t.toAllowedContentRules) return this.allow(t.toAllowedContentRules(this.editor), n, i); o = t.getDefinition(), t = {}, i = o.attributes, t[o.element] = o = { styles: o.styles, requiredStyles: o.styles && CKEDITOR.tools.objectKeys(o.styles) }, i && (i = R(i), o.classes = i["class"] ? i["class"].split(/\s+/) : null, o.requiredClasses = o.classes, delete i["class"], o.attributes = i, o.requiredAttributes = i && CKEDITOR.tools.objectKeys(i)) } else if (CKEDITOR.tools.isArray(t)) { for (o = 0; o < t.length; ++o)s = this.allow(t[o], n, i); return s } return e(this, t, n, this.allowedContent, this._.allowedRules), !0 }, applyTo: function (e, t, n, i) { if (this.disabled) return !1; var o, r = this, s = [], a = this.editor && this.editor.config.protectedSource, l = !1, c = { doFilter: !n, doTransform: !0, doCallbacks: !0, toHtml: t }; e.forEach(function (e) { if (e.type == CKEDITOR.NODE_ELEMENT) { if ("off" == e.attributes["data-cke-filter"]) return !1; if (!t || "span" != e.name || !~CKEDITOR.tools.objectKeys(e.attributes).join("|").indexOf("data-cke-")) if (o = p(r, e, s, c
116), 1 & o) l = !0; else if (2 & o) return !1 } else if (e.type == CKEDITOR.NODE_COMMENT && e.value.match(/^\{cke_protected\}(?!\{C\})/)) { var n; e: { var i = decodeURIComponent(e.value.replace(/^\{cke_protected\}/, "")); n = []; var d, u, h; if (a) for (u = 0; u < a.length; ++u)if ((h = i.match(a[u])) && h[0].length == i.length) { n = !0; break e } i = CKEDITOR.htmlParser.fragment.fromHtml(i), 1 == i.children.length && (d = i.children[0]).type == CKEDITOR.NODE_ELEMENT && p(r, d, n, c), n = !n.length } n || s.push(e) } }, null, !0), s.length && (l = !0); var d; e = [], i = w[i || (this.editor ? this.editor.enterMode : CKEDITOR.ENTER_P)]; for (var u; n = s.pop();)n.type == CKEDITOR.NODE_ELEMENT ? y(n, i, e) : n.remove(); for (; d = e.pop();)if (n = d.el, n.parent) switch (u = D[n.parent.name] || D.span, d.check) { case "it": D.$removeEmpty[n.name] && !n.children.length ? y(n, i, e) : g(n) || y(n, i, e); break; case "el-up": n.parent.type == CKEDITOR.NODE_DOCUMENT_FRAGMENT || u[n.name] || y(n, i, e); break; case "parent-down": n.parent.type == CKEDITOR.NODE_DOCUMENT_FRAGMENT || u[n.name] || y(n.parent, i, e) }return l }, checkFeature: function (e) { return this.disabled || !e ? !0 : (e.toFeature && (e = e.toFeature(this.editor)), !e.requiredContent || this.check(e.requiredContent)) }, disable: function () { this.disabled = !0 }, disallow: function (t) { return r(this, t, !0) ? ("string" == typeof t && (t = d(t)), e(this, t, null, this.disallowedContent, this._.disallowedRules), !0) : !1 }, addContentForms: function (e) { if (!this.disabled && e) { var t, n, i, o = []; for (t = 0; t < e.length && !i; ++t)n = e[t], ("string" == typeof n || n instanceof CKEDITOR.style) && this.check(n) && (i = n); if (i) { for (t = 0; t < e.length; ++t)o.push(_(e[t], i)); this.addTransformations(o) } } }, addElementCallback: function (e) { this.elementCallbacks || (this.elementCallbacks = []), this.elementCallbacks.push(e) }, addFeature: function (e) { return this.disabled || !e ? !0 : (e.toFeature && (e = e.toFeature(this.editor)), this.allow(e.allowedContent, e.name), this.addTransformations(e.contentTransformations), this.addContentForms(e.contentForms), e.requiredContent && (this.customConfig || this.disallowedContent.length) ? this.check(e.requiredContent) : !0) }, addTransformations: function (e) { var t, n; if (!this.disabled && e) { var i, o = this._.transformations; for (i = 0; i < e.length; ++i) { t = e[i]; var r = void 0, s = void 0, a = void 0, l = void 0, c = void 0, d = void 0; for (n = [], s = 0; s < t.length; ++s)a = t[s], "string" == typeof a ? (a = a.split(/\s*:\s*/), l = a[0], c = null, d = a[1]) : (l = a.check, c = a.left, d = a.right), r || (r = a, r = r.element ? r.element : l ? l.match(/^([a-z0-9]+)/i)[0] : r.left.getDefinition().element), c instanceof CKEDITOR.style && (c = I(c)), n.push({ check: l == r ? null : l, left: c, right: "string" == typeof d ? O(d) : d }); t = r, o[t] || (o[t] = []), o[t].push(n) } } }, check: function (e, t, n) { if (this.disabled) return !0; if (CKEDITOR.tools.isArray(e)) { for (var i = e.length; i--;)if (this.check(e[i], t, n)) return !0; return !1 } var o, r; if ("string" == typeof e) { if (r = e + "<" + (!1 === t ? "0" : "1") + (n ? "1" : "0") + ">", r in this._.cachedChecks) return this._.cachedChecks[r]; i = d(e).$1, o = i.styles; var s = i.classes; i.name = i.elements, i.classes = s = s ? s.split(/\s*,\s*/) : [], i.styles = c(o), i.attributes = c(i.attributes), i.children = [], s.length && (i.attributes["class"] = s.join(" ")), o && (i.attributes.style = CKEDITOR.tools.writeCssText(i.styles)), o = i } else i = e.getDefinition(), o = i.styles, s = i.attributes || {}, o && !CKEDITOR.tools.isEmpty(o) ? (o = R(o), s.style = CKEDITOR.tools.writeCssText(o, !0)) : o = {}, o = { name: i.element, attributes: s, classes: s["class"] ? s["class"].split(/\s+/) : [], styles: o, children: [] }; var a, s = CKEDITOR.tools.clone(o), l = []; if (!1 !== t && (a = this._.transformations[o.name])) { for (i = 0; i < a.length; ++i)b(this, o, a[i]); m(o) } return p(this, s, l, { doFilter: !0, doTransform: !1 !== t, skipRequired: !n, skipFinalValidation: !n }), t = 0 < l.length ? !1 : !!CKEDITOR.tools.objectCompare(o.attributes, s.attributes, !0), "string" == typeof e && (this._.cachedChecks[r] = t), t }, getAllowedEnterMode: function () { var e = ["p", "div", "br"], t = { p: CKEDITOR.ENTER_P, div: CKEDITOR.ENTER_DIV, br: CKEDITOR.ENTER_BR }; return function (n, i) { var o, r = e.slice(); if (this.check(w[n])) return n; for (i || (r = r.reverse()); o = r.pop();)if (this.check(o)) return t[o]; return CKEDITOR.ENTER_BR } }(), destroy: function () { delete CKEDITOR.filter.instances[this.id], delete this._, delete this.allowedContent, delete this.disallowedContent } }; var x, K = { styles: 1, attributes: 1, classes: 1 }, S = { styles: "requiredStyles", attributes: "requiredAttributes", classes: "requiredClasses" }, N = /^([a-z0-9\-*\s]+)((?:\s*\{[!\w\-,\s\*]+\}\s*|\s*\[[!\w\-,\s\*]+\]\s*|\s*\([!\w\-,\s\*]+\)\s*){0,3})(?:;\s*|$)/i, A = { styles: /{([^}]+)}/, attrs: /\[([^\]]+)\]/, classes: /\(([^\)]+)\)/ }, $ = /^cke:(object|embed|param)$/, L = /^(object|embed|param)$/; x = CKEDITOR.filter.transformationsTools = { sizeToStyle: function (e) { this.lengthToStyle(e, "width"), this.lengthToStyle(e, "height") }, sizeToAttribute: function (e) { this.lengthToAttribute(e, "width"), this.lengthToAttribute(e, "height") }, lengthToStyle: function (e, t, n) { if (n = n || t, !(n in e.styles)) { var i = e.attributes[t]; i && (/^\d+$/.test(i) && (i += "px"), e.styles[n] = i) } delete e.attributes[t] }, lengthToAttribute: function (e, t, n) { if (n = n || t, !(n in e.attributes)) { var i = e.styles[t], o = i && i.match(/^(\d+)(?:\.\d*)?px$/); o ? e.attributes[n] = o[1] : "cke-test" == i && (e.attributes[n] = "cke-test") } delete e.styles[t] }, alignmentToStyle: function (e) { if (!("float" in e.styles)) { var t = e.attributes.align; "left" != t && "right" != t || (e.styles["float"] = t) } delete e.attributes.align }, alignmentToAttribute: function (e) { if (!("align" in e.attributes)) { var t = e.styles["float"]; "left" != t && "right" != t || (e.attributes.align = t) } delete e.styles["float"] }, splitBorderShorthand: function (e) { function t(t) { e.styles["border-top-width"] = n[t[0]], e.styles["border-right-width"] = n[t[1]], e.styles["border-bottom-width"] = n[t[2]], e.styles["border-left-width"] = n[t[3]] } if (e.styles.border) { var n = e.styles.border.match(/([\.\d]+\w+)/g) || ["0px"]; switch (n.length) { case 1: e.styles["border-width"] = n[0]; break; case 2: t([0, 1, 0, 1]); break; case 3: t([0, 1, 2, 1]); break; case 4: t([0, 1, 2, 3]) }e.styles["border-style"] = e.styles["border-style"] || (e.styles.border.match(/(none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset|initial|inherit)/) || [])[0], e.styles["border-style"] || delete e.styles["border-style"], delete e.styles.border } }, listTypeToStyle: function (e) { if (e.attributes.type) switch (e.attributes.type) { case "a": e.styles["list-style-type"] = "lower-alpha"; break; case "A": e.styles["list-style-type"] = "upper-alpha"; break; case "i": e.styles["list-style-type"] = "lower-roman"; break; case "I": e.styles["list-style-type"] = "upper-roman"; break; case "1": e.styles["list-style-type"] = "decimal"; break; default: e.styles["list-style-type"] = e.attributes.type } }, splitMarginShorthand: function (e) { function t(t) { e.styles["margin-top"] = n[t[0]], e.styles["margin-right"] = n[t[1]], e.styles["margin-bottom"] = n[t[2]], e.styles["margin-left"] = n[t[3]] } if (e.styles.margin) { var n = e.styles.margin.match(/(\-?[\.\d]+\w+)/g) || ["0px"]; switch (n.length) { case 1: e.styles.margin = n[0]; break; case 2: t([0, 1, 0, 1]); break; case 3: t([0, 1, 2, 1]); break; case 4: t([0, 1, 2, 3]) }delete e.styles.margin } }, matchesStyle: C, transform: function (e, t) { if ("string" == typeof t) e.
116name = t; else { var n, i, o, r, s = t.getDefinition(), a = s.styles, l = s.attributes; e.name = s.element; for (n in l) if ("class" == n) for (s = e.classes.join("|"), o = l[n].split(/\s+/); r = o.pop();)-1 == s.indexOf(r) && e.classes.push(r); else e.attributes[n] = l[n]; for (i in a) e.styles[i] = a[i] } } }
117        }(), function () { CKEDITOR.focusManager = function (e) { return e.focusManager ? e.focusManager : (this.hasFocus = !1, this.currentActive = null, this._ = { editor: e }, this) }, CKEDITOR.focusManager._ = { blurDelay: 200 }, CKEDITOR.focusManager.prototype = { focus: function (e) { this._.timer && clearTimeout(this._.timer), e && (this.currentActive = e), this.hasFocus || this._.locked || ((e = CKEDITOR.currentInstance) && e.focusManager.blur(1), this.hasFocus = !0, (e = this._.editor.container) && e.addClass("cke_focus"), this._.editor.fire("focus")) }, lock: function () { this._.locked = 1 }, unlock: function () { delete this._.locked }, blur: function (e) { function t() { if (this.hasFocus) { this.hasFocus = !1; var e = this._.editor.container; e && e.removeClass("cke_focus"), this._.editor.fire("blur") } } if (!this._.locked) { this._.timer && clearTimeout(this._.timer); var n = CKEDITOR.focusManager._.blurDelay; e || !n ? t.call(this) : this._.timer = CKEDITOR.tools.setTimeout(function () { delete this._.timer, t.call(this) }, n, this) } }, add: function (e, t) { var n = e.getCustomData("focusmanager"); if (!n || n != this) { n && n.remove(e); var n = "focus", i = "blur"; t && (CKEDITOR.env.ie ? (n = "focusin", i = "focusout") : CKEDITOR.event.useCapture = 1); var o = { blur: function () { e.equals(this.currentActive) && this.blur() }, focus: function () { this.focus(e) } }; e.on(n, o.focus, this), e.on(i, o.blur, this), t && (CKEDITOR.event.useCapture = 0), e.setCustomData("focusmanager", this), e.setCustomData("focusmanager_handlers", o) } }, remove: function (e) { e.removeCustomData("focusmanager"); var t = e.removeCustomData("focusmanager_handlers"); e.removeListener("blur", t.blur), e.removeListener("focus", t.focus) } } }(), CKEDITOR.keystrokeHandler = function (e) { return e.keystrokeHandler ? e.keystrokeHandler : (this.keystrokes = {}, this.blockedKeystrokes = {}, this._ = { editor: e }, this) }, function () { var e, t = function (t) { t = t.data; var n = t.getKeystroke(), i = this.keystrokes[n], o = this._.editor; return e = !1 === o.fire("key", { keyCode: n, domEvent: t }), e || (i && (e = !1 !== o.execCommand(i, { from: "keystrokeHandler" })), e || (e = !!this.blockedKeystrokes[n])), e && t.preventDefault(!0), !e }, n = function (t) { e && (e = !1, t.data.preventDefault(!0)) }; CKEDITOR.keystrokeHandler.prototype = { attach: function (e) { e.on("keydown", t, this), CKEDITOR.env.gecko && CKEDITOR.env.mac && e.on("keypress", n, this) } } }(), function () { CKEDITOR.lang = { languages: { af: 1, ar: 1, bg: 1, bn: 1, bs: 1, ca: 1, cs: 1, cy: 1, da: 1, de: 1, "de-ch": 1, el: 1, "en-au": 1, "en-ca": 1, "en-gb": 1, en: 1, eo: 1, es: 1, et: 1, eu: 1, fa: 1, fi: 1, fo: 1, "fr-ca": 1, fr: 1, gl: 1, gu: 1, he: 1, hi: 1, hr: 1, hu: 1, id: 1, is: 1, it: 1, ja: 1, ka: 1, km: 1, ko: 1, ku: 1, lt: 1, lv: 1, mk: 1, mn: 1, ms: 1, nb: 1, nl: 1, no: 1, oc: 1, pl: 1, "pt-br": 1, pt: 1, ro: 1, ru: 1, si: 1, sk: 1, sl: 1, sq: 1, "sr-latn": 1, sr: 1, sv: 1, th: 1, tr: 1, tt: 1, ug: 1, uk: 1, vi: 1, "zh-cn": 1, zh: 1 }, rtl: { ar: 1, fa: 1, he: 1, ku: 1, ug: 1 }, load: function (e, t, n) { e && CKEDITOR.lang.languages[e] || (e = this.detect(t, e)); var i = this; t = function () { i[e].dir = i.rtl[e] ? "rtl" : "ltr", n(e, i[e]) }, this[e] ? t() : CKEDITOR.scriptLoader.load(CKEDITOR.getUrl("lang/" + e + ".js"), t, this) }, detect: function (e, t) { var n = this.languages; t = t || navigator.userLanguage || navigator.language || e; var i = t.toLowerCase().match(/([a-z]+)(?:-([a-z]+))?/), o = i[1], i = i[2]; return n[o + "-" + i] ? o = o + "-" + i : n[o] || (o = null), CKEDITOR.lang.detect = o ? function () { return o } : function (e) { return e }, o || e } } }(), CKEDITOR.scriptLoader = function () { var e = {}, t = {}; return { load: function (n, i, o, r) { var s = "string" == typeof n; s && (n = [n]), o || (o = CKEDITOR); var a = n.length, l = [], c = [], d = function (e) { i && (s ? i.call(o, e) : i.call(o, l, c)) }; if (0 === a) d(!0); else { var u = function (e, t) { (t ? l : c).push(e), 0 >= --a && (r && CKEDITOR.document.getDocumentElement().removeStyle("cursor"), d(t)) }, h = function (n, i) { e[n] = 1; var o = t[n]; delete t[n]; for (var r = 0; r < o.length; r++)o[r](n, i) }, p = function (n) { if (e[n]) u(n, !0); else { var o = t[n] || (t[n] = []); if (o.push(u), !(1 < o.length)) { var r = new CKEDITOR.dom.element("script"); r.setAttributes({ type: "text/javascript", src: n }), i && (CKEDITOR.env.ie && (8 >= CKEDITOR.env.version || CKEDITOR.env.ie9Compat) ? r.$.onreadystatechange = function () { "loaded" != r.$.readyState && "complete" != r.$.readyState || (r.$.onreadystatechange = null, h(n, !0)) } : (r.$.onload = function () { setTimeout(function () { h(n, !0) }, 0) }, r.$.onerror = function () { h(n, !1) })), r.appendTo(CKEDITOR.document.getHead()) } } }; r && CKEDITOR.document.getDocumentElement().setStyle("cursor", "wait"); for (var f = 0; a > f; f++)p(n[f]) } }, queue: function () { function e() { var e; (e = t[0]) && this.load(e.scriptUrl, e.callback, CKEDITOR, 0) } var t = []; return function (n, i) { var o = this;
117 t.push({ scriptUrl: n, callback: function () { i && i.apply(this, arguments), t.shift(), e.call(o) } }), 1 == t.length && e.call(this) } }() } }(), CKEDITOR.resourceManager = function (e, t) { this.basePath = e, this.fileName = t, this.registered = {}, this.loaded = {}, this.externals = {}, this._ = { waitingList: {} } }, CKEDITOR.resourceManager.prototype = { add: function (e, t) { if (this.registered[e]) throw Error('[CKEDITOR.resourceManager.add] The resource name "' + e + '" is already registered.'); var n = this.registered[e] = t || {}; return n.name = e, n.path = this.getPath(e), CKEDITOR.fire(e + CKEDITOR.tools.capitalize(this.fileName) + "Ready", n), this.get(e) }, get: function (e) { return this.registered[e] || null }, getPath: function (e) { var t = this.externals[e]; return CKEDITOR.getUrl(t && t.dir || this.basePath + e + "/") }, getFilePath: function (e) { var t = this.externals[e]; return CKEDITOR.getUrl(this.getPath(e) + (t ? t.file : this.fileName + ".js")) }, addExternal: function (e, t, n) { e = e.split(","); for (var i = 0; i < e.length; i++) { var o = e[i]; n || (t = t.replace(/[^\/]+$/, function (e) { return n = e, "" })), this.externals[o] = { dir: t, file: n || this.fileName + ".js" } } }, load: function (e, t, n) { CKEDITOR.tools.isArray(e) || (e = e ? [e] : []); for (var i = this.loaded, o = this.registered, r = [], s = {}, a = {}, l = 0; l < e.length; l++) { var c = e[l]; if (c) if (i[c] || o[c]) a[c] = this.get(c); else { var d = this.getFilePath(c); r.push(d), d in s || (s[d] = []), s[d].push(c) } } CKEDITOR.scriptLoader.load(r, function (e, o) { if (o.length) throw Error('[CKEDITOR.resourceManager.load] Resource name "' + s[o[0]].join(",") + '" was not found at "' + o[0] + '".'); for (var r = 0; r < e.length; r++)for (var l = s[e[r]], c = 0; c < l.length; c++) { var d = l[c]; a[d] = this.get(d), i[d] = 1 } t.call(n, a) }, this) } }, CKEDITOR.plugins = new CKEDITOR.resourceManager("plugins/", "plugin"), CKEDITOR.plugins.load = CKEDITOR.tools.override(CKEDITOR.plugins.load, function (e) { var t = {}; return function (n, i, o) { var r = {}, s = function (n) { e.call(this, n, function (e) { CKEDITOR.tools.extend(r, e); var n, a = []; for (n in e) { var l = e[n], c = l && l.requires; if (!t[n]) { if (l.icons) for (var d = l.icons.split(","), u = d.length; u--;)CKEDITOR.skin.addIcon(d[u], l.path + "icons/" + (CKEDITOR.env.hidpi && l.hidpi ? "hidpi/" : "") + d[u] + ".png"); t[n] = 1 } if (c) for (c.split && (c = c.split(",")), l = 0; l < c.length; l++)r[c[l]] || a.push(c[l]) } if (a.length) s.call(this, a); else { for (n in r) l = r[n], l.onLoad && !l.onLoad._called && (!1 === l.onLoad() && delete r[n], l.onLoad._called = 1); i && i.call(o || window, r) } }, this) }; s.call(this, n) } }), CKEDITOR.plugins.setLang = function (e, t, n) { var i = this.get(e); e = i.langEntries || (i.langEntries = {}), i = i.lang || (i.lang = []), i.split && (i = i.split(",")), -1 == CKEDITOR.tools.indexOf(i, t) && i.push(t), e[t] = n }, CKEDITOR.ui = function (e) { return e.ui ? e.ui : (this.items = {}, this.instances = {}, this.editor = e, this._ = { handlers: {} }, this) }, CKEDITOR.ui.prototype = { add: function (e, t, n) { n.name = e.toLowerCase(); var i = this.items[e] = { type: t, command: n.command || null, args: Array.prototype.slice.call(arguments, 2) }; CKEDITOR.tools.extend(i, n) }, get: function (e) { return this.instances[e] }, create: function (e) { var t = this.items[e], n = t && this._.handlers[t.type], i = t && t.command && this.editor.getCommand(t.command), n = n && n.create.apply(this, t.args); return this.instances[e] = n, i && i.uiItems.push(n), n && !n.type && (n.type = t.type), n }, addHandler: function (e, t) { this._.handlers[e] = t }, space: function (e) { return CKEDITOR.document.getById(this.spaceId(e)) }, spaceId: function (e) { return this.editor.id + "_" + e } }, CKEDITOR.event.implementOn(CKEDITOR.ui), function () { function e(e, o, s) { if (CKEDITOR.event.call(this), e = e && CKEDITOR.tools.clone(e), void 0 !== o) { if (!(o instanceof CKEDITOR.dom.element)) throw Error("Expect element of type CKEDITOR.dom.element."); if (!s) throw Error("One of the element modes must be specified."); if (CKEDITOR.env.ie && CKEDITOR.env.quirks && s == CKEDITOR.ELEMENT_MODE_INLINE) throw Error("Inline element mode is not supported on IE quirks."); if (!n(o, s)) throw Error('The specified element mode is not supported on element: "' + o.getName() + '".'); this.element = o, this.elementMode = s, this.name = this.elementMode != CKEDITOR.ELEMENT_MODE_APPENDTO && (o.getId() || o.getNameAtt()) } else this.elementMode = CKEDITOR.ELEMENT_MODE_NONE; this._ = {}, this.commands = {}, this.templates = {}, this.name = this.name || t(), this.id = CKEDITOR.tools.getNextId(), this.status = "unloaded", this.config = CKEDITOR.tools.prototypedCopy(CKEDITOR.config), this.ui = new CKEDITOR.ui(this), this.focusManager = new CKEDITOR.focusManager(this), this.keystrokeHandler = new CKEDITOR.keystrokeHandler(this), this.on("readOnly", i), this.on("selectionChange", function (e) { r(this, e.data.path) }), this.on("activeFilterChange", function () { r(this, this.elementPath(), !0) }), this.on("mode", i), this.on("instanceReady", function () { this.config.startupFocus && this.focus() }), CKEDITOR.fire("instanceCreated", null, this), CKEDITOR.add(this), CKEDITOR.tools.setTimeout(function () { "destroyed" !== this.status ? a(this, e) : CKEDITOR.warn("editor-incorrect-destroy") }, 0, this) } function t() { do var e = "editor" + ++p; while (CKEDITOR.instances[e]); return e } function n(e, t) { return t == CKEDITOR.ELEMENT_MODE_INLINE ? e.is(CKEDITOR.dtd.$editable) || e.is("textarea") : t == CKEDITOR.ELEMENT_MODE_REPLACE ? !e.is(CKEDITOR.dtd.$nonBodyContent) : 1 } function i() { var e, t = this.commands; for (e in t) o(this, t[e]) } function o(e, t) { t[t.startDisabled ? "disable" : e.readOnly && !t.readOnly ? "disable" : t.modes[e.mode] ? "enable" : "disable"]() } function r(e, t, n) { if (t) { var i, o, r = e.commands; for (o in r) i = r[o], (n || i.contextSensitive) && i.refresh(e, t) } } function s(e) { var t = e.config.customConfig; if (!t) return !1; var t = CKEDITOR.getUrl(t), n = f[t] || (f[t] = {}); return n.fn ? (n.fn.call(e, e.config), CKEDITOR.getUrl(e.config.customConfig) != t && s(e) || e.fireOnce("customConfigLoaded")) : CKEDITOR.scriptLoader.queue(t, function () { n.fn = CKEDITOR.editorConfig ? CKEDITOR.editorConfig : function () { }, s(e) }), !0 } function a(e, t) { e.on("customConfigLoaded", function () { if (t) { if (t.on) for (var n in t.on) e.on(n, t.on[n]); CKEDITOR.tools.extend(e.config, t, !0), delete e.config.on } n = e.config, e.readOnly = n.readOnly ? !0 : e.elementMode == CKEDITOR.ELEMENT_MODE_INLINE ? e.element.is("textarea") ? e.element.hasAttribute("disabled") || e.element.hasAttribute("readonly") : e.element.isReadOnly() : e.elementMode == CKEDITOR.ELEMENT_MODE_REPLACE ? e.element.hasAttribute("disabled") || e.element.hasAttribute("readonly") : !1, e.blockless = e.elementMode == CKEDITOR.ELEMENT_MODE_INLINE ? !(e.element.is("textarea") || CKEDITOR.dtd[e.element.getName()].p) : !1, e.tabIndex = n.tabIndex || e.element && e.element.getAttribute("tabindex") || 0, e.activeEnterMode = e.enterMode = e.blockless ? CKEDITOR.ENTER_BR : n.enterMode, e.activeShiftEnterMode = e.shiftEnterMode = e.blockless ? CKEDITOR.ENTER_BR : n.shiftEnterMode, n.skin && (CKEDITOR.skinName = n.skin), e.fireOnce("configLoaded"), e.dataProcessor = new CKEDITOR.htmlDataProcessor(e), e.filter = e.activeFilter = new CKEDITOR.filter(e), l(e) }), t && null != t.customConfig && (e.config.customConfig = t.customConfig), s(e) || e.fireOnce("customConfigLoaded") } function l(e) { CKEDITOR.skin.loadPart("editor", function () { c(e) }) } function c(e) { CKEDITOR.lang.load(e.config.language, e.config.defaultLanguage, function (t, n) { var i = e.config.title; e.langCode = t, e.lang = CKEDITOR.tools.prototypedCopy(n), e.title = "string" == typeof i || !1 === i ? i : [e.lang.editor, e.name].join(", "), e.config.contentsLangDirection || (e.config.contentsLangDirection = e.elementMode == CKEDITOR.ELEMENT_MODE_INLINE ? e.element.getDirection(1) : e.lang.dir), e.fire("langLoaded"), d(e) }) } function d(e) { e.getStylesSet(function (t) { e.once("loaded", function () { e.fire("stylesSet", { styles: t }) }, null, null, 1), u(e) }) } function u(e) { var t = e.config, n = t.plugins, i = t.extraPlugins, o = t.removePlugins; if (i) var r = new RegExp("(?:^|,)(?:" + i.replace(/\s*,\s*/g, "|") + ")(?=,|$)", "g"), n = n.replace(r, ""), n = n + ("," + i); if (o) var s = new RegExp("(?:^|,)(?:" + o.replace(/\s*,\s*/g, "|") + ")(?=,|$)", "g"), n = n.replace(s, ""); CKEDITOR.env.air && (n += ",adobeair"), CKEDITOR.plugins.load(n.split(","), function (n) { var i = [], o = [], r = []; e.plugins = n; for (var a in n) { var l, c = n[a], d = c.lang, u = null, h = c.requires; if (CKEDITOR.tools.isArray(h) && (h = h.join(",")), h && (l = h.match(s))) for (; h = l.pop();)CKEDITOR.error("editor-plugin-required", { plugin: h.replace(",", ""), requiredBy: a }); d && !e.lang[a] && (d.split && (d = d.split(",")), 0 <= CKEDITOR.tools.indexOf(d, e.langCode) ? u = e.langCode : (u = e.langCode.replace(/-.*/, ""), u = u != e.langCode && 0 <= CKEDITOR.tools.indexOf(d, u) ? u : 0 <= CKEDITOR.tools.indexOf(d, "en") ? "en" : d[0]), c.langEntries && c.langEntries[u] ? (e.lang[a] = c.langEntries[u], u = null) : r.push(CKEDITOR.getUrl(c.path + "lang/" + u + ".js"))), o.push(u), i.push(c) } CKEDITOR.scriptLoader.load(r, function () { for (var n = ["beforeInit", "init", "afterInit"], r = 0; r < n.length; r++)for (var s = 0; s < i.length; s++) { var a = i[s]; 0 === r && o[s] && a.lang && a.langEntries && (e.lang[a.name] = a.langEntries[o[s]]), a[n[r]] && a[n[r]](e) } for (e.fireOnce("pluginsLoaded"), t.keystrokes && e.setKeystroke(e.config.keystrokes), s = 0; s < e.config.blockedKeystrokes.length; s++)e.keystrokeHandler.blockedKeystrokes[e.config.blockedKeystrokes[s]] = 1; e.status = "loaded", e.fireOnce("loaded"), CKEDITOR.fire("instanceLoaded", null, e) }) }) } function h() { var e = this.element; if (e && this.elementMode != CKEDITOR.ELEMENT_MODE_APPENDTO) { var t = this.getData(); return this.config.htmlEncodeOutput && (t = CKEDITOR.tools.htmlEncode(t)), e.is("textarea") ? e.setValue(t) : e.setHtml(t), !0 } return !1 } e.prototype = CKEDITOR.editor.prototype, CKEDITOR.editor = e; var p = 0, f = {}; CKEDITOR.tools.extend(CKEDITOR.editor.prototype, { addCommand: function (e, t) { t.name = e.toLowerCase(); var n = new CKEDITOR.command(this, t); return this.mode && o(this, n), this.commands[e] = n }, _attachToForm: function () { function e(e) { n.updateElement(), n._.required && !i.getValue() && !1 === n.fire("required") && e.data.preventDefault() } function t(e) { return !!(e && e.call && e.apply) } var n = this, i = n.element, o = new CKEDITOR.dom.element(i.$.form); i.is("textarea") && o && (o.on("submit", e), t(o.$.submit) && (
117o.$.submit = CKEDITOR.tools.override(o.$.submit, function (t) { return function () { e(), t.apply ? t.apply(this) : t() } })), n.on("destroy", function () { o.removeListener("submit", e) })) }, destroy: function (e) { this.fire("beforeDestroy"), !e && h.call(this), this.editable(null), this.filter && (this.filter.destroy(), delete this.filter), delete this.activeFilter, this.status = "destroyed", this.fire("destroy"), this.removeAllListeners(), CKEDITOR.remove(this), CKEDITOR.fire("instanceDestroyed", null, this) }, elementPath: function (e) { if (!e) { if (e = this.getSelection(), !e) return null; e = e.getStartElement() } return e ? new CKEDITOR.dom.elementPath(e, this.editable()) : null }, createRange: function () { var e = this.editable(); return e ? new CKEDITOR.dom.range(e) : null }, execCommand: function (e, t) { var n = this.getCommand(e), i = { name: e, commandData: t, command: n }; return n && n.state != CKEDITOR.TRISTATE_DISABLED && !1 !== this.fire("beforeCommandExec", i) && (i.returnValue = n.exec(i.commandData), !n.async && !1 !== this.fire("afterCommandExec", i)) ? i.returnValue : !1 }, getCommand: function (e) { return this.commands[e] }, getData: function (e) { !e && this.fire("beforeGetData"); var t = this._.data; return "string" != typeof t && (t = (t = this.element) && this.elementMode == CKEDITOR.ELEMENT_MODE_REPLACE ? t.is("textarea") ? t.getValue() : t.getHtml() : ""), t = { dataValue: t }, !e && this.fire("getData", t), t.dataValue }, getSnapshot: function () { var e = this.fire("getSnapshot"); return "string" != typeof e && (e = (e = this.element) && this.elementMode == CKEDITOR.ELEMENT_MODE_REPLACE ? e.is("textarea") ? e.getValue() : e.getHtml() : ""), e }, loadSnapshot: function (e) { this.fire("loadSnapshot", e) }, setData: function (e, t, n) { var i = !0, o = t; t && "object" == typeof t && (n = t.internal, o = t.callback, i = !t.noSnapshot), !n && i && this.fire("saveSnapshot"), !o && n || this.once("dataReady", function (e) { !n && i && this.fire("saveSnapshot"), o && o.call(e.editor) }), e = { dataValue: e }, !n && this.fire("setData", e), this._.data = e.dataValue, !n && this.fire("afterSetData", e) }, setReadOnly: function (e) { e = null == e || e, this.readOnly != e && (this.readOnly = e, this.keystrokeHandler.blockedKeystrokes[8] = +e, this.editable().setReadOnly(e), this.fire("readOnly")) }, insertHtml: function (e, t, n) { this.fire("insertHtml", { dataValue: e, mode: t, range: n }) }, insertText: function (e) { this.fire("insertText", e) }, insertElement: function (e) { this.fire("insertElement", e) }, getSelectedHtml: function (e) { var t = this.editable(), n = this.getSelection(), n = n && n.getRanges(); if (!t || !n || 0 === n.length) return null; for (var i, o, r, s = new CKEDITOR.dom.documentFragment, a = 0; a < n.length; a++) { var l = n[a], c = l.startContainer; c.getName && "tr" == c.getName() ? (i || (i = c.getAscendant("table").clone(), i.append(c.getAscendant("tbody").clone()), s.append(i), i = i.findOne("tbody")), o && o.equals(c) || (o = c, r = c.clone(), i.append(r)), r.append(l.cloneContents())) : s.append(l.cloneContents()) } return t = i ? s : t.getHtmlFromRange(n[0]), e ? t.getHtml() : t }, extractSelectedHtml: function (e, t) { var n = this.editable(), i = this.getSelection().getRanges(); return n && 0 !== i.length ? (i = i[0], n = n.extractHtmlFromRange(i, t), t || this.getSelection().selectRanges([i]), e ? n.getHtml() : n) : null }, focus: function () { this.fire("beforeFocus") }, checkDirty: function () { return "ready" == this.status && this._.previousValue !== this.getSnapshot() }, resetDirty: function () { this._.previousValue = this.getSnapshot() }, updateElement: function () { return h.call(this) }, setKeystroke: function () { for (var e, t, n = this.keystrokeHandler.keystrokes, i = CKEDITOR.tools.isArray(arguments[0]) ? arguments[0] : [[].slice.call(arguments, 0)], o = i.length; o--;)e = i[o], t = 0, CKEDITOR.tools.isArray(e) && (t = e[1], e = e[0]), t ? n[e] = t : delete n[e] }, getCommandKeystroke: function (e) { var t, n = e.name, i = this.keystrokeHandler.keystrokes; if (e.fakeKeystroke) return e.fakeKeystroke; for (t in i) if (i.hasOwnProperty(t) && i[t] == n) return t; return null }, addFeature: function (e) { return this.filter.addFeature(e) }, setActiveFilter: function (e) { e || (e = this.filter), this.activeFilter 
117!== e && (this.activeFilter = e, this.fire("activeFilterChange"), e === this.filter ? this.setActiveEnterMode(null, null) : this.setActiveEnterMode(e.getAllowedEnterMode(this.enterMode), e.getAllowedEnterMode(this.shiftEnterMode, !0))) }, setActiveEnterMode: function (e, t) { e = e ? this.blockless ? CKEDITOR.ENTER_BR : e : this.enterMode, t = t ? this.blockless ? CKEDITOR.ENTER_BR : t : this.shiftEnterMode, this.activeEnterMode == e && this.activeShiftEnterMode == t || (this.activeEnterMode = e, this.activeShiftEnterMode = t, this.fire("activeEnterModeChange")) }, showNotification: function (e) { alert(e) } }) }(), CKEDITOR.ELEMENT_MODE_NONE = 0, CKEDITOR.ELEMENT_MODE_REPLACE = 1, CKEDITOR.ELEMENT_MODE_APPENDTO = 2, CKEDITOR.ELEMENT_MODE_INLINE = 3, CKEDITOR.htmlParser = function () { this._ = { htmlPartsRegex: /<(?:(?:\/([^>]+)>)|(?:!--([\S|\s]*?)--\x3e)|(?:([^\/\s>]+)((?:\s+[\w\-:.]+(?:\s*=\s*?(?:(?:"[^"]*")|(?:'[^']*')|[^\s"'\/>]+))?)*)[\S\s]*?(\/?)>))/g } }, function () { var e = /([\w\-:.]+)(?:(?:\s*=\s*(?:(?:"([^"]*)")|(?:'([^']*)')|([^\s>]+)))|(?=\s|$))/g, t = { checked: 1, compact: 1, declare: 1, defer: 1, disabled: 1, ismap: 1, multiple: 1, nohref: 1, noresize: 1, noshade: 1, nowrap: 1, readonly: 1, selected: 1 }; CKEDITOR.htmlParser.prototype = { onTagOpen: function () { }, onTagClose: function () { }, onText: function () { }, onCDATA: function () { }, onComment: function () { }, parse: function (n) { for (var i, o, r, s = 0; i = this._.htmlPartsRegex.exec(n);)if (o = i.index, o > s && (s = n.substring(s, o), r ? r.push(s) : this.onText(s)), s = this._.htmlPartsRegex.lastIndex, !(o = i[1]) || (o = o.toLowerCase(), r && CKEDITOR.dtd.$cdata[o] && (this.onCDATA(r.join("")), r = null), r)) if (r) r.push(i[0]); else if (o = i[3]) { if (o = o.toLowerCase(), !/="/.test(o)) { var a, l = {}, c = i[4]; if (i = !!i[5], c) for (; a = e.exec(c);) { var d = a[1].toLowerCase(); a = a[2] || a[3] || a[4] || "", l[d] = !a && t[d] ? d : CKEDITOR.tools.htmlDecodeAttr(a) } this.onTagOpen(o, l, i), !r && CKEDITOR.dtd.$cdata[o] && (r = []) } } else (o = i[2]) && this.onComment(o); else this.onTagClose(o); n.length > s && this.onText(n.substring(s, n.length)) } } }(), CKEDITOR.htmlParser.basicWriter = CKEDITOR.tools.createClass({ $: function () { this._ = { output: [] } }, proto: { openTag: function (e) { this._.output.push("<", e) }, openTagClose: function (e, t) { t ? this._.output.push(" />") : this._.output.push(">") }, attribute: function (e, t) { "string" == typeof t && (t = CKEDITOR.tools.htmlEncodeAttr(t)), this._.output.push(" ", e, '="', t, '"') }, closeTag: function (e) { this._.output.push("</", e, ">") }, text: function (e) { this._.output.push(e) }, comment: function (e) { this._.output.push("<!--", e, "-->") }, write: function (e) { this._.output.push(e) }, reset: function () { this._.output = [], this._.indent = !1 }, getHtml: function (e) { var t = this._.output.join(""); return e && this.reset(), t } } }), function () { CKEDITOR.htmlParser.node = function () { }, CKEDITOR.htmlParser.node.prototype = { remove: function () { var e = this.parent.children, t = CKEDITOR.tools.indexOf(e, this), n = this.previous, i = this.next; n && (n.next = i), i && (i.previous = n), e.splice(t, 1), this.parent = null }, replaceWith: function (e) { var t = this.parent.children, n = CKEDITOR.tools.indexOf(t, this), i = e.previous = this.previous, o = e.next = this.next; i && (i.next = e), o && (o.previous = e), t[n] = e, e.parent = this.parent, this.parent = null }, insertAfter: function (e) { var t = e.parent.children, n = CKEDITOR.tools.indexOf(t, e), i = e.next; t.splice(n + 1, 0, this), this.next = e.next, this.previous = e, e.next = this, i && (i.previous = this), this.parent = e.parent }, insertBefore: function (e) { var t = e.parent.children, n = CKEDITOR.tools.indexOf(t, e); t.splice(n, 0, this), this.next = e, (this.previous = e.previous) && (e.previous.next = this), e.previous = this, this.parent = e.parent }, getAscendant: function (e) { for (var t = ("function" == typeof e ? e : "string" == typeof e ? function (t) { return t.name == e } : function (t) { return t.name in e }), n = this.parent; n && n.type == CKEDITOR.NODE_ELEMENT;) { if (t(n)) return n; n = n.parent } return null }, wrapWith: function (e) { return this.replaceWith(e), e.add(this), e }, getIndex: function () { return CKEDITOR.tools.indexOf(this.parent.children, this) }, getFilterContext: function (e) { return e || {} } } }(), CKEDITOR.htmlParser.comment = function (e) { this.value = e, this._ = { isBlockLike: !1 } }, CKEDITOR.htmlParser.comment.prototype = CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node, {
118            type: CKEDITOR.NODE_COMMENT, filter: function (e, t) {
119                var n = this.value; return (n = e.onComment(t, n, this)) ? "string" != typeof n ? (this.replaceWith(n), !1) : (this.value = n,
120                    !0) : (this.remove(), !1)
121            }, writeHtml: function (e, t) { t && this.filter(t), e.comment(this.value) }
122        }), function () { CKEDITOR.htmlParser.text = function (e) { this.value = e, this._ = { isBlockLike: !1 } }, CKEDITOR.htmlParser.text.prototype = CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node, { type: CKEDITOR.NODE_TEXT, filter: function (e, t) { return (this.value = e.onText(t, this.value, this)) ? void 0 : (this.remove(), !1) }, writeHtml: function (e, t) { t && this.filter(t), e.text(this.value) } }) }(), function () { CKEDITOR.htmlParser.cdata = function (e) { this.value = e }, CKEDITOR.htmlParser.cdata.prototype = CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node, { type: CKEDITOR.NODE_TEXT, filter: function () { }, writeHtml: function (e) { e.write(this.value) } }) }(), CKEDITOR.htmlParser.fragment = function () { this.children = [], this.parent = null, this._ = { isBlockLike: !0, hasInlineStarted: !1 } }, function () { function e(e) { return e.attributes["data-cke-survive"] ? !1 : "a" == e.name && e.attributes.href || CKEDITOR.dtd.$removeEmpty[e.name] } var t = CKEDITOR.tools.extend({ table: 1, ul: 1, ol: 1, dl: 1 }, CKEDITOR.dtd.table, CKEDITOR.dtd.ul, CKEDITOR.dtd.ol, CKEDITOR.dtd.dl), n = { ol: 1, ul: 1 }, i = CKEDITOR.tools.extend({}, { html: 1 }, CKEDITOR.dtd.html, CKEDITOR.dtd.body, CKEDITOR.dtd.head, { style: 1, script: 1 }), o = { ul: "li", ol: "li", dl: "dd", table: "tbody", tbody: "tr", thead: "tr", tfoot: "tr", tr: "td" }; CKEDITOR.htmlParser.fragment.fromHtml = function (r, s, a) { function l(e) { var t; if (0 < g.length) for (var n = 0; n < g.length; n++) { var i = g[n], o = i.name, r = CKEDITOR.dtd[o], s = E.name && CKEDITOR.dtd[E.name]; s && !s[o] || e && r && !r[e] && CKEDITOR.dtd[e] ? o == E.name && (u(E, E.parent, 1), n--) : (t || (c(), t = 1), i = i.clone(), i.parent = E, E = i, g.splice(n, 1), n--) } } function c() { for (; v.length;)u(v.shift(), E) } function d(e) { if (e._.isBlockLike && "pre" != e.name && "textarea" != e.name) { var t, n = e.children.length, i = e.children[n - 1]; i && i.type == CKEDITOR.NODE_TEXT && ((t = CKEDITOR.tools.rtrim(i.value)) ? i.value = t : e.children.length = n - 1) } } function u(t, n, i) { n = n || E || m; var o = E; void 0 === t.previous && (h(n, t) && (E = n, f.onTagOpen(a, {}), t.returnPoint = n = E), d(t), e(t) && !t.children.length || n.add(t), "pre" == t.name && (y = !1), "textarea" == t.name && (T = !1)), t.returnPoint ? (E = t.returnPoint, delete t.returnPoint) : E = i ? n : o } function h(e, t) { if ((e == m || "body" == e.name) && a && (!e.name || CKEDITOR.dtd[e.name][a])) { var n, i; return (n = t.attributes && (i = t.attributes["data-cke-real-element-type"]) ? i : t.name) && n in CKEDITOR.dtd.$inline && !(n in CKEDITOR.dtd.head) && !t.isOrphan || t.type == CKEDITOR.NODE_TEXT } } function p(e, t) { return e in CKEDITOR.dtd.$listItem || e in CKEDITOR.dtd.$tableContent ? e == t || "dt" == e && "dd" == t || "dd" == e && "dt" == t : !1 } var f = new CKEDITOR.htmlParser, m = s instanceof CKEDITOR.htmlParser.element ? s : "string" == typeof s ? new CKEDITOR.htmlParser.element(s) : new CKEDITOR.htmlParser.fragment, g = [], v = [], E = m, T = "textarea" == m.name, y = "pre" == m.name; f.onTagOpen = function (o, r, s, a) { if (r = new CKEDITOR.htmlParser.element(o, r), r.isUnknown && s && (r.isEmpty = !0), r.isOptionalClose = a, e(r)) g.push(r); else { if ("pre" == o) y = !0; else { if ("br" == o && y) return void E.add(new CKEDITOR.htmlParser.text("\n")); "textarea" == o && (T = !0) } if ("br" == o) v.push(r); else { for (; a = (s = E.name) ? CKEDITOR.dtd[s] || (E._.isBlockLike ? CKEDITOR.dtd.div : CKEDITOR.dtd.span) : i, !(r.isUnknown || E.isUnknown || a[o]
122);)if (E.isOptionalClose) f.onTagClose(s); else if (o in n && s in n) s = E.children, (s = s[s.length - 1]) && "li" == s.name || u(s = new CKEDITOR.htmlParser.element("li"), E), !r.returnPoint && (r.returnPoint = E), E = s; else if (o in CKEDITOR.dtd.$listItem && !p(o, s)) f.onTagOpen("li" == o ? "ul" : "dl", {}, 0, 1); else if (s in t && !p(o, s)) !r.returnPoint && (r.returnPoint = E), E = E.parent; else { if (s in CKEDITOR.dtd.$inline && g.unshift(E), !E.parent) { r.isOrphan = 1; break } u(E, E.parent, 1) } l(o), c(), r.parent = E, r.isEmpty ? u(r) : E = r } } }, f.onTagClose = function (e) { for (var t = g.length - 1; t >= 0; t--)if (e == g[t].name) return void g.splice(t, 1); for (var n = [], i = [], o = E; o != m && o.name != e;)o._.isBlockLike || i.unshift(o), n.push(o), o = o.returnPoint || o.parent; if (o != m) { for (t = 0; t < n.length; t++) { var r = n[t]; u(r, r.parent) } E = o, o._.isBlockLike && c(), u(o, o.parent), o == E && (E = E.parent), g = g.concat(i) } "body" == e && (a = !1) }, f.onText = function (e) { if (E._.hasInlineStarted && !v.length || y || T || (e = CKEDITOR.tools.ltrim(e), 0 !== e.length)) { var n = E.name, r = n ? CKEDITOR.dtd[n] || (E._.isBlockLike ? CKEDITOR.dtd.div : CKEDITOR.dtd.span) : i; !T && !r["#"] && n in t ? (f.onTagOpen(o[n] || ""), f.onText(e)) : (c(), l(), y || T || (e = e.replace(/[\t\r\n ]{2,}|[\t\r\n]/g, " ")), e = new CKEDITOR.htmlParser.text(e), h(E, e) && this.onTagOpen(a, {}, 0, 1), E.add(e)) } }, f.onCDATA = function (e) { E.add(new CKEDITOR.htmlParser.cdata(e)) }, f.onComment = function (e) { c(), l(), E.add(new CKEDITOR.htmlParser.comment(e)) }, f.parse(r); for (c(); E != m;)u(E, E.parent, 1); return d(m), m }, CKEDITOR.htmlParser.fragment.prototype = { type: CKEDITOR.NODE_DOCUMENT_FRAGMENT, add: function (e, t) { isNaN(t) && (t = this.children.length); var n = t > 0 ? this.children[t - 1] : null; if (n) { if (e._.isBlockLike && n.type == CKEDITOR.NODE_TEXT && (n.value = CKEDITOR.tools.rtrim(n.value), 0 === n.value.length)) return this.children.pop(), void this.add(e); n.next = e } e.previous = n, e.parent = this, this.children.splice(t, 0, e), this._.hasInlineStarted || (this._.hasInlineStarted = e.type == CKEDITOR.NODE_TEXT || e.type == CKEDITOR.NODE_ELEMENT && !e._.isBlockLike) }, filter: function (e, t) { t = this.getFilterContext(t), e.onRoot(t, this), this.filterChildren(e, !1, t) }, filterChildren: function (e, t, n) { if (this.childrenFilteredBy != e.id) for (n = this.getFilterContext(n), t && !this.parent && e.onRoot(n, this), this.childrenFilteredBy = e.id, t = 0; t < this.children.length; t++)!1 === this.children[t].filter(e, n) && t-- }, writeHtml: function (e, t) { t && this.filter(t), this.writeChildrenHtml(e) }, writeChildrenHtml: function (e, t, n) { var i = this.getFilterContext(); for (n && !this.parent && t && t.onRoot(i, this), t && this.filterChildren(t, !1, i), t = 0, n = this.children, i = n.length; i > t; t++)n[t].writeHtml(e) }, forEach: function (e, t, n) { if (!(n || t && this.type != t)) var i = e(this); if (!1 !== i) { n = this.children; for (var o = 0; o < n.length; o++)i = n[o], i.type == CKEDITOR.NODE_ELEMENT ? i.forEach(e, t) : t && i.type != t || e(i) } }, getFilterContext: function (e) { return e || {} } } }(), function () { function e() { this.rules = [] } function t(t, n, i, o) { var r, s; for (r in n) (s = t[r]) || (s = t[r] = new e), s.add(n[r], i, o) } CKEDITOR.htmlParser.filter = CKEDITOR.tools.createClass({ $: function (t) { this.id = CKEDITOR.tools.getNextNumber(), this.elementNameRules = new e, this.attributeNameRules = new e, this.elementsRules = {}, this.attributesRules = {}, this.textRules = new e, this.commentRules = new e, this.rootRules = new e, t && this.addRules(t, 10) }, proto: { addRules: function (e, n) { var i; "number" == typeof n ? i = n : n && "priority" in n && (i = n.priority), "number" != typeof i && (i = 10), "object" != typeof n && (n = {}), e.elementNames && this.elementNameRules.addMany(e.elementNames, i, n), e.attributeNames && this.attributeNameRules.addMany(e.attributeNames, i, n), e.elements && t(this.elementsRules, e.elements, i, n), e.attributes && t(this.attributesRules, e.attributes, i, n), e.text && this.textRules.add(e.text, i, n), e.comment && this.commentRules.add(e.comment, i, n), e.root && this.rootRules.add(e.root, i, n) }, applyTo: function (e) { e.filter(this) }, onElementName: function (e, t) { return this.elementNameRules.execOnName(e, t) }, onAttributeName: function (e, t) { return this.attributeNameRules.execOnName(e, t) }, onText: function (e, t, n) { return this.textRules.exec(e, t, n) }, onComment: function (e, t, n) { return this.commentRules.exec(e, t, n) }, onRoot: function (e, t) { return this.rootRules.exec(e, t) }, onElement: function (e, t) { for (var n, i = [this.elementsRules["^"], this.elementsRules[t.n
122ame], this.elementsRules.$], o = 0; 3 > o; o++)if (n = i[o]) { if (n = n.exec(e, t, this), !1 === n) return null; if (n && n != t) return this.onNode(e, n); if (t.parent && !t.name) break } return t }, onNode: function (e, t) { var n = t.type; return n == CKEDITOR.NODE_ELEMENT ? this.onElement(e, t) : n == CKEDITOR.NODE_TEXT ? new CKEDITOR.htmlParser.text(this.onText(e, t.value)) : n == CKEDITOR.NODE_COMMENT ? new CKEDITOR.htmlParser.comment(this.onComment(e, t.value)) : null }, onAttribute: function (e, t, n, i) { return (n = this.attributesRules[n]) ? n.exec(e, i, t, this) : i } } }), CKEDITOR.htmlParser.filterRulesGroup = e, e.prototype = { add: function (e, t, n) { this.rules.splice(this.findIndex(t), 0, { value: e, priority: t, options: n }) }, addMany: function (e, t, n) { for (var i = [this.findIndex(t), 0], o = 0, r = e.length; r > o; o++)i.push({ value: e[o], priority: t, options: n }); this.rules.splice.apply(this.rules, i) }, findIndex: function (e) { for (var t = this.rules, n = t.length - 1; n >= 0 && e < t[n].priority;)n--; return n + 1 }, exec: function (e, t) { var n, i, o, r, s = t instanceof CKEDITOR.htmlParser.node || t instanceof CKEDITOR.htmlParser.fragment, a = Array.prototype.slice.call(arguments, 1), l = this.rules, c = l.length; for (r = 0; c > r; r++)if (s && (n = t.type, i = t.name), o = l[r], !(e.nonEditable && !o.options.applyToAll || e.nestedEditable && o.options.excludeNestedEditable)) { if (o = o.value.apply(null, a), !1 === o || s && o && (o.name != i || o.type != n)) return o; null != o && (a[0] = t = o) } return t }, execOnName: function (e, t) { for (var n, i = 0, o = this.rules, r = o.length; t && r > i; i++)n = o[i], e.nonEditable && !n.options.applyToAll || e.nestedEditable && n.options.excludeNestedEditable || (t = t.replace(n.value[0], n.value[1])); return t } } }(), function () { function e(e, t) { function a(e) { return e || CKEDITOR.env.needsNbspFiller ? new CKEDITOR.htmlParser.text("\xa0") : new CKEDITOR.htmlParser.element("br", { "data-cke-bogus": 1 }) } function l(e, t) { return function (o) { if (o.type != CKEDITOR.NODE_DOCUMENT_FRAGMENT) { var s, l, d = [], u = n(o); if (u) for (c(u, 1) && d.push(u); u;)r(u) && (s = i(u)) && c(s) && ((l = i(s)) && !r(l) ? d.push(s) : (a(h).insertAfter(s), s.remove())), u = u.previous; for (u = 0; u < d.length; u++)d[u].remove(); (d = !e || !1 !== ("function" == typeof t ? t(o) : t)) && ((h || CKEDITOR.env.needsBrFiller || o.type != CKEDITOR.NODE_DOCUMENT_FRAGMENT) && (h || CKEDITOR.env.needsBrFiller || !(7 < document.documentMode || o.name in CKEDITOR.dtd.tr || o.name in CKEDITOR.dtd.$listItem)) ? (d = n(o), d = !d || "form" == o.name && "input" == d.name) : d = !1), d && o.add(a(e)) } } } function c(e, t) { if ((!h || CKEDITOR.env.needsBrFiller) && e.type == CKEDITOR.NODE_ELEMENT && "br" == e.name && !e.attributes["data-cke-eol"]) return !0; var n; return !!(e.type == CKEDITOR.NODE_TEXT && (n = e.value.match(g)) && (n.index && (new CKEDITOR.htmlParser.text(e.value.substring(0, n.index)).insertBefore(e), e.value = n[0]), !CKEDITOR.env.needsBrFiller && h && (!t || e.parent.name in p) || !h && ((n = e.previous) && "br" == n.name || !n || r(n)))) } var d, u = { elements: {} }, h = "html" == t, p = CKEDITOR.tools.extend({}, y); for (d in p) "#" in E[d] || delete p[d]; for (d in p) u.elements[d] = l(h, e.config.fillEmptyBlocks); return u.root = l(h, !1), u.elements.br = function (e) { return function (t) { if (t.parent.type != CKEDITOR.NODE_DOCUMENT_FRAGMENT) { var n = t.attributes; if ("data-cke-bogus" in n || "data-cke-eol" in n) delete n["data-cke-bogus"]; else { for (n = t.next; n && o(n);)n = n.next; var l = i(t); !n && r(t.parent) ? s(t.parent, a(e)) : r(n) && l && !r(l) && a(e).insertBefore(n) } } } }(h), u } function t(e, t) { return e != CKEDITOR.ENTER_BR && !1 !== t ? e == CKEDITOR.ENTER_DIV ? "div" : "p" : !1 } function n(e) { for (e = e.children[e.children.length - 1]; e && o(e);)e = e.previous; return e } function i(e) { for (e = e.previous; e && o(e);)e = e.previous; return e } function o(e) { return e.type == CKEDITOR.NODE_TEXT && !CKEDITOR.tools.trim(e.value) || e.type == CKEDITOR.NODE_ELEMENT && e.attributes["data-cke-bookmark"] } function r(e) { return e && (e.type == CKEDITOR.NODE_ELEMENT && e.name in y || e.type == CKEDITOR.NODE_DOCUMENT_FRAGMENT) } function s(e, t) { var n = e.children[e.children.length - 1]; e.children.push(t), t.parent = e, n && (n.next = t, t.previous = n) } function a(e) { e = e.attributes, "false" != e.contenteditable && (e["data-cke-editable"] = e.contenteditable ? "true" : 1), e.contenteditable = "false" } function l(e) { switch (e = e.attributes, e["data-cke-editable"]) { case "true": e.contenteditable = "true"; break; case "1": delete e.contenteditable } } function c(e) { return e.replace(O, function (e, t, n) { return "<" + t + n.replace(D, function (e, t) { return R.test(t) && -1 == n.indexOf("data-cke-saved-" + t) ? " data-cke-saved-" + e + " data-cke-" + CKEDITOR.rn
122d + "-" + e : e }) + ">" }) } function d(e, t) { return e.replace(t, function (e, t, n) { return 0 === e.indexOf("<textarea") && (e = t + p(n).replace(/</g, "&lt;").replace(/>/g, "&gt;") + "</textarea>"), "<cke:encoded>" + encodeURIComponent(e) + "</cke:encoded>" }) } function u(e) { return e.replace(x, function (e, t) { return decodeURIComponent(t) }) } function h(e) { return e.replace(/\x3c!--(?!{cke_protected})[\s\S]+?--\x3e/g, function (e) { return "<!--" + v + "{C}" + encodeURIComponent(e).replace(/--/g, "%2D%2D") + "-->" }) } function p(e) { return e.replace(/\x3c!--\{cke_protected\}\{C\}([\s\S]+?)--\x3e/g, function (e, t) { return decodeURIComponent(t) }) } function f(e, t) { var n = t._.dataStore; return e.replace(/\x3c!--\{cke_protected\}([\s\S]+?)--\x3e/g, function (e, t) { return decodeURIComponent(t) }).replace(/\{cke_protected_(\d+)\}/g, function (e, t) { return n && n[t] || "" }) } function m(e, t) { var n = [], i = t.config.protectedSource, o = t._.dataStore || (t._.dataStore = { id: 1 }), r = /<\!--\{cke_temp(comment)?\}(\d*?)--\x3e/g, i = [/<script[\s\S]*?(<\/script>|$)/gi, /<noscript[\s\S]*?<\/noscript>/gi, /<meta[\s\S]*?\/?>/gi].concat(i); e = e.replace(/\x3c!--[\s\S]*?--\x3e/g, function (e) { return "<!--{cke_tempcomment}" + (n.push(e) - 1) + "-->" }); for (var s = 0; s < i.length; s++)e = e.replace(i[s], function (e) { return e = e.replace(r, function (e, t, i) { return n[i] }), /cke_temp(comment)?/.test(e) ? e : "<!--{cke_temp}" + (n.push(e) - 1) + "-->" }); return e = e.replace(r, function (e, t, i) { return "<!--" + v + (t ? "{C}" : "") + encodeURIComponent(n[i]).replace(/--/g, "%2D%2D") + "-->" }), e = e.replace(/<\w+(?:\s+(?:(?:[^\s=>]+\s*=\s*(?:[^'"\s>]+|'[^']*'|"[^"]*"))|[^\s=\/>]+))+\s*\/?>/g, function (e) { return e.replace(/\x3c!--\{cke_protected\}([^>]*)--\x3e/g, function (e, t) { return o[o.id] = decodeURIComponent(t), "{cke_protected_" + o.id++ + "}" }) }), e = e.replace(/<(title|iframe|textarea)([^>]*)>([\s\S]*?)<\/\1>/g, function (e, n, i, o) { return "<" + n + i + ">" + f(p(o), t) + "</" + n + ">" }) } CKEDITOR.htmlDataProcessor = function (n) { var i, o, r = this; this.editor = n, this.dataFilter = i = new CKEDITOR.htmlParser.filter, this.htmlFilter = o = new CKEDITOR.htmlParser.filter, this.writer = new CKEDITOR.htmlParser.basicWriter, i.addRules(b), i.addRules(C, { applyToAll: !0 }), i.addRules(e(n, "data"), { applyToAll: !0 }), o.addRules(_), o.addRules(I, { applyToAll: !0 }), o.addRules(e(n, "html"), { applyToAll: !0 }), n.on("toHtml", function (e) { e = e.data; var i, o = e.dataValue, o = m(o, n), o = d(o, w), o = c(o), o = d(o, k), o = o.replace(K, "$1cke:$2"), o = o.replace(N, "<cke:$1$2></cke:$1>"), o = o.replace(/(<pre\b[^>]*>)(\r\n|\n)/g, "$1$2$2"), o = o.replace(/([^a-z0-9<\-])(on\w{3,})(?!>)/gi, "$1data-cke-" + CKEDITOR.rnd + "-$2"); i = e.context || n.editable().getName(); var r; CKEDITOR.env.ie && 9 > CKEDITOR.env.version && "pre" == i && (i = "div", o = "<pre>" + o + "</pre>", r = 1), i = n.document.createElement(i), i.setHtml("a" + o), o = i.getHtml().substr(1), o = o.replace(new RegExp("data-cke-" + CKEDITOR.rnd + "-", "ig"), ""), r && (o = o.replace(/^<pre>|<\/pre>$/gi, "")), o = o.replace(S, "$1$2"), o = u(o), o = p(o), i = !1 === e.fixForBody ? !1 : t(e.enterMode, n.config.autoParagraph), o = CKEDITOR.htmlParser.fragment.fromHtml(o, e.context, i), i && (r = o, !r.children.length && CKEDITOR.dtd[r.name][i] && (i = new CKEDITOR.htmlParser.element(i), r.add(i))), e.dataValue = o }, null, null, 5), n.on("toHtml", function (e) { e.data.filter.applyTo(e.data.dataValue, !0, e.data.dontFilter, e.data.enterMode) && n.fire("dataFiltered") }, null, null, 6), n.on("toHtml", function (e) { e.data.dataValue.filterChildren(r.dataFilter, !0) }, null, null, 10), n.on("toHtml", function (e) { e = e.data; var t = e.dataValue, n = new CKEDITOR.htmlParser.basicWriter; t.writeChildrenHtml(n), t = n.getHtml(!0), e.dataValue = h(t) }, null, null, 15), n.on("toDataFormat", function (e) { var i = e.data.dataValue; e.data.enterMode != CKEDITOR.ENTER_BR && (i = i.replace(/^<br *\/?>/i, "")), e.data.dataValue = CKEDITOR.htmlParser.fragment.fromHtml(i, e.data.context, t(e.data.enterMode, n.config.autoParagraph)) }, null, null, 5), n.on("toDataFormat", function (e) { e.data.dataValue.filterChildren(r.htmlFilter, !0) }, null, null, 10), n.on("toDataFormat", function (e) { e.data.filter.applyTo(e.data.dataValue, !1, !0) }, null, null, 11), n.on("toDataFormat", function (e) { var t = e.data.dataValue, i = r.writer; i.reset(), t.writeChildrenHtml(i), t = i.getHtml(!0), t = p(t), t = f(t, n), e.data.dataValue = t }, null, null, 15) }, CKEDITOR.htmlDataProcessor.prototype = { toHtml: function (e, t, n, i) { var o, r, s, a, l = this.editor; return t && "object" == typeof t ? (o = t.context, n = t.fixForBody, i = t.dontFilter, r = t.filter, s = t.enterMode, a = t.protectedWhitespace
122s) : o = t, o || null === o || (o = l.editable().getName()), l.fire("toHtml", { dataValue: e, context: o, fixForBody: n, dontFilter: i, filter: r || l.filter, enterMode: s || l.enterMode, protectedWhitespaces: a }).dataValue }, toDataFormat: function (e, t) { var n, i, o; return t && (n = t.context, i = t.filter, o = t.enterMode), n || null === n || (n = this.editor.editable().getName()), this.editor.fire("toDataFormat", { dataValue: e, filter: i || this.editor.filter, context: n, enterMode: o || this.editor.enterMode }).dataValue } }; var g = /(?:&nbsp;|\xa0)$/, v = "{cke_protected}", E = CKEDITOR.dtd, T = "caption colgroup col thead tfoot tbody".split(" "), y = CKEDITOR.tools.extend({}, E.$blockLimit, E.$block), b = { elements: { input: a, textarea: a } }, C = { attributeNames: [[/^on/, "data-cke-pa-on"], [/^data-cke-expando$/, ""]] }, _ = { elements: { embed: function (e) { var t = e.parent; if (t && "object" == t.name) { var n = t.attributes.width, t = t.attributes.height; n && (e.attributes.width = n), t && (e.attributes.height = t) } }, a: function (e) { var t = e.attributes; return e.children.length || t.name || t.id || e.attributes["data-cke-saved-name"] ? void 0 : !1 } } }, I = { elementNames: [[/^cke:/, ""], [/^\?xml:namespace$/, ""]], attributeNames: [[/^data-cke-(saved|pa)-/, ""], [/^data-cke-.*/, ""], ["hidefocus", ""]], elements: { $: function (e) { var t = e.attributes; if (t) { if (t["data-cke-temp"]) return !1; for (var n, i = ["name", "href", "src"], o = 0; o < i.length; o++)n = "data-cke-saved-" + i[o], n in t && delete t[i[o]] } return e }, table: function (e) { e.children.slice(0).sort(function (e, t) { var n, i; return e.type == CKEDITOR.NODE_ELEMENT && t.type == e.type && (n = CKEDITOR.tools.indexOf(T, e.name), i = CKEDITOR.tools.indexOf(T, t.name)), n > -1 && i > -1 && n != i || (n = e.parent ? e.getIndex() : -1, i = t.parent ? t.getIndex() : -1), n > i ? 1 : -1 }) }, param: function (e) { return e.children = [], e.isEmpty = !0, e }, span: function (e) { "Apple-style-span" == e.attributes["class"] && delete e.name }, html: function (e) { delete e.attributes.contenteditable, delete e.attributes["class"] }, body: function (e) { delete e.attributes.spellcheck, delete e.attributes.contenteditable }, style: function (e) { var t = e.children[0]; t && t.value && (t.value = CKEDITOR.tools.trim(t.value)), e.attributes.type || (e.attributes.type = "text/css") }, title: function (e) { var t = e.children[0]; !t && s(e, t = new CKEDITOR.htmlParser.text), t.value = e.attributes["data-cke-title"] || "" }, input: l, textarea: l }, attributes: { "class": function (e) { return CKEDITOR.tools.ltrim(e.replace(/(?:^|\s+)cke_[^\s]*/g, "")) || !1 } } }; CKEDITOR.env.ie && (I.attributes.style = function (e) { return e.replace(/(^|;)([^\:]+)/g, function (e) { return e.toLowerCase() }) }); var O = /<(a|area|img|input|source)\b([^>]*)>/gi, D = /([\w-:]+)\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|(?:[^ "'>]+))/gi, R = /^(href|src|name)$/i, k = /(?:<style(?=[ >])[^>]*>[\s\S]*?<\/style>)|(?:<(:?link|meta|base)[^>]*>)/gi, w = /(<textarea(?=[ >])[^>]*>)([\s\S]*?)(?:<\/textarea>)/gi, x = /<cke:encoded>([^<]*)<\/cke:encoded>/gi, K = /(<\/?)((?:object|embed|param|html|body|head|title)[^>]*>)/gi, S = /(<\/?)cke:((?:html|body|head|title)[^>]*>)/gi, N = /<cke:(param|embed)([^>]*?)\/?>(?!\s*<\/cke:\1)/gi }(), CKEDITOR.htmlParser.element = function (e, t) { this.name = e, this.attributes = t || {}, this.children = []; var n = e || "", i = n.match(/^cke:(.*)/); i && (n = i[1]), n = !!(CKEDITOR.dtd.$nonBodyContent[n] || CKEDITOR.dtd.$block[n] || CKEDITOR.dtd.$listItem[n] || CKEDITOR.dtd.$tableContent[n] || CKEDITOR.dtd.$nonEditable[n] || "br" == n), this.isEmpty = !!CKEDITOR.dtd.$empty[e], this.isUnknown = !CKEDITOR.dtd[e], this._ = { isBlockLike: n, hasInlineStarted: this.isEmpty || !n } }, CKEDITOR.htmlParser.cssStyle = function (e) { var t = {}; return ((e instanceof CKEDITOR.htmlParser.element ? e.attributes.style : e) || "").replace(/&quot;/g, '"').replace(/\s*([^ :;]+)\s*:\s*([^;]+)\s*(?=;|$)/g, function (e, n, i) { "font-family" == n && (i = i.replace(/["']/g, "")), t[n.toLowerCase()] = i }), { rules: t, populate: function (e) { var t = this.toString(); t && (e instanceof CKEDITOR.dom.element ? e.setAttribute("style", t) : e instanceof CKEDITOR.htmlParser.element ? e.attributes.style = t : e.style = t) }, toString: function () { var e, n = []; for (e in t) t[e] && n.push(e, ":", t[e], ";"); return n.join("") } } }, function () { function e(e) { return function (t) { return t.type == CKEDITOR.NODE_ELEMENT && ("string" == typeof e ? t.name == e : t.name in e) } } var t = function (e, t) { return e = e[0], t = t[0], t > e ? -1 : e > t ? 1 : 0 }, n = CKEDITOR.htmlParser.fragment.prototype; CKEDITOR.htmlParser.element.prototype = CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node, { type: CKEDITOR.NODE_ELEMENT, add: n.add, clone: function () { return new CKEDITOR.htmlParser.element(this.name, this.attributes) }, filter: function (e, t) { var n, i, o = this; if (t = o.getFilterContext(t), t.off) return !0; for (o.parent || e.onRoot(t, o); ;) { if (n = o.name, !(i = e.onElementName(t, n))) return this.remove(), !1; if (o.name = i, !(o = e.onElement(t, o))) return this.remove(), !1; if (o !== this) return this.replaceWith(o), !1; if (o.name == n) break; if (o.type != CKEDITOR.NODE_ELEMENT) return this.replaceWith(o), !1; if (!o.name) return this.replaceWithChildren(), !1 } n = o.attributes; var r, s; for (r in n) { for (i = n[r]; ;) { if (!(s = e.onAttributeName(t, r))) { delete n[r]; break } if (s == r) break; delete n[r], r = s } s && (!1 === (i = e.onAttribute(t, o, s, i)) ? delete n[s] : n[s] = i) } return o.isEmpty || this.filterChildren(e, !1, t), !0 }, filterChildren: n.filterChildren, writeHtml: function (e, n) { n && this.filter(n); var i, o, r = this.name, s = [], a = this.attributes; e.openTag(r, a); for (i in a) s.push([i, a[i]]); for (e.sortAttributes && s.sort(t), i = 0, o = s.length; o > i; i++)a = s[i], e.attribute(a[0], a[1]); e.openTagClose(r, this.isEmpty), this.writeChildrenHtml(e), this.isEmpty || e.closeTag(r) }, writeChildrenHtml: n.writeChildrenHtml, replaceWithChildren: function () { for (var e = this.children, t = e.length; t;)e[--t].insertAfter(this); this.remove() }
122, forEach: n.forEach, getFirst: function (t) { if (!t) return this.children.length ? this.children[0] : null; "function" != typeof t && (t = e(t)); for (var n = 0, i = this.children.length; i > n; ++n)if (t(this.children[n])) return this.children[n]; return null }, getHtml: function () { var e = new CKEDITOR.htmlParser.basicWriter; return this.writeChildrenHtml(e), e.getHtml() }, setHtml: function (e) { e = this.children = CKEDITOR.htmlParser.fragment.fromHtml(e).children; for (var t = 0, n = e.length; n > t; ++t)e[t].parent = this }, getOuterHtml: function () { var e = new CKEDITOR.htmlParser.basicWriter; return this.writeHtml(e), e.getHtml() }, split: function (e) { for (var t = this.children.splice(e, this.children.length - e), n = this.clone(), i = 0; i < t.length; ++i)t[i].parent = n; return n.children = t, t[0] && (t[0].previous = null), e > 0 && (this.children[e - 1].next = null), this.parent.add(n, this.getIndex() + 1), n }, find: function (e, t) { void 0 === t && (t = !1); var n, i = []; for (n = 0; n < this.children.length; n++) { var o = this.children[n]; "function" == typeof e && e(o) ? i.push(o) : "string" == typeof e && o.name === e && i.push(o), t && o.find && (i = i.concat(o.find(e, t))) } return i }, addClass: function (e) { if (!this.hasClass(e)) { var t = this.attributes["class"] || ""; this.attributes["class"] = t + (t ? " " : "") + e } }, removeClass: function (e) { var t = this.attributes["class"]; t && ((t = CKEDITOR.tools.trim(t.replace(new RegExp("(?:\\s+|^)" + e + "(?:\\s+|$)"), " "))) ? this.attributes["class"] = t : delete this.attributes["class"]) }, hasClass: function (e) { var t = this.attributes["class"]; return t ? new RegExp("(?:^|\\s)" + e + "(?=\\s|$)").test(t) : !1 }, getFilterContext: function (e) { var t = []; if (e || (e = { off: !1, nonEditable: !1, nestedEditable: !1 }), e.off || "off" != this.attributes["data-cke-processor"] || t.push("off", !0), e.nonEditable || "false" != this.attributes.contenteditable ? e.nonEditable && !e.nestedEditable && "true" == this.attributes.contenteditable && t.push("nestedEditable", !0) : t.push("nonEditable", !0), t.length) { e = CKEDITOR.tools.copy(e); for (var n = 0; n < t.length; n += 2)e[t[n]] = t[n + 1] } return e } }, !0) }(), function () { var e = {}, t = /{([^}]+)}/g, n = /([\\'])/g, i = /\n/g, o = /\r/g; CKEDITOR.template = function (r) { if (e[r]) this.output = e[r]; else { var s = r.replace(n, "\\$1").replace(i, "\\n").replace(o, "\\r").replace(t, function (e, t) { return "',data['" + t + "']==undefined?'{" + t + "}':data['" + t + "'],'" }); this.output = e[r] = Function("data", "buffer", "return buffer?buffer.push('" + s + "'):['" + s + "'].join('');") } } }(), delete CKEDITOR.loadFullCore, CKEDITOR.instances = {}, CKEDITOR.document = new CKEDITOR.dom.document(document), CKEDITOR.add = function (e) { CKEDITOR.instances[e.name] = e, e.on("focus", function () { CKEDITOR.currentInstance != e && (CKEDITOR.currentInstance = e, CKEDITOR.fire("currentInstance")) }), e.on("blur", function () { CKEDITOR.currentInstance == e && (CKEDITOR.currentInstance = null, CKEDITOR.fire("currentInstance")) }), CKEDITOR.fire("instance", null, e) }, CKEDITOR.remove = function (e) { delete CKEDITOR.instances[e.name] }, function () { var e = {}; CKEDITOR.addTemplate = function (t, n) { var i = e[t]; return i ? i : (i = { name: t, source: n }, CKEDITOR.fire("template", i), e[t] = new CKEDITOR.template(i.source)) }, CKEDITOR.getTemplate = function (t) { return e[t] } }(), function () { var e = []; CKEDITOR.addCss = function (t) { e.push(t) }, CKEDITOR.getCss = function () { return e.join("\n") } }(), CKEDITOR.on("instanceDestroyed", function () { CKEDITOR.tools.isEmpty(this.instances) && CKEDITOR.fire("reset") }), CKEDITOR.TRISTATE_ON = 1, CKEDITOR.TRISTATE_OFF = 2, CKEDITOR.TRISTATE_DISABLED = 0, function () { CKEDITOR.inline = function (e, t) { if (!CKEDITOR.env.isCompatible) return null; if (e = CKEDITOR.dom.element.get(e), e.getEditor()) throw 'The editor instance "' + e.getEditor().name + '" is already attached to the provided element.'; var n = new CKEDITOR.editor(t, e, CKEDITOR.ELEMENT_MODE_INLINE), i = e.is("textarea") ? e : null; return i ? (n.setData(i.getValue(), null, !0), e = CKEDITOR.dom.element.createFromHtml('<div contenteditable="' + !!n.readOnly + '" class="cke_textarea_inline">' + i.getValue() + "</div>", CKEDITOR.document), e.insertAfter(i), i.hide(), i.$.form && n._attachToForm()) : n.setData(e.getHtml(), null, !0), n.on("loaded", function () { n.fire("uiReady"), n.editable(e), n.container = e, n.ui.contentsElement = e, n.setData(n.getData(1)), n.resetDirty(), n.fire("contentDom"), n.mode = "wysiwyg", n.fire("mode"), n.status = "ready", n.fireOnce("instanceReady"), CKEDITOR.fire("instanceReady", null, n) }, null, null, 1e4), n.on("destroy", function () { i && (n.container.clearCustomData(), n.container.remove(), i.show()), n.element.clearCustomData(), delete n.element }), n }, CKEDITOR.inlineAll = function () { var e, t, n; for (n in CKEDITOR.dtd.$editable) for (var i = CKEDITOR.document.getElementsByTag(n), o = 0, r = i.count(); r > o; o++)e = i.getItem(o), "true" == e.getAttribute("contenteditable") && (t = { element: e, config: {} }, !1 !== CKEDITOR.fire("inline", t) && CKEDITOR.inline(e, t.config)) }, CKEDITOR.domReady(function () { !CKEDITOR.disableAutoInline && CKEDITOR.inlineAll() }) }(), CKEDITOR.replaceClass = "ckeditor", function () { function e(e, i, o, r) { if (!CKEDITOR.env.isCompatible) return null; if (e = CKEDITOR.dom.element.get(e), e.getEditor()) throw 'The editor instance "' + e.getEditor().name + '" is already attached to the provided element.'; var s = new CKEDITOR.editor(i, e, r); return r == CKEDITOR.ELEMENT_MODE_REPLACE && (e.setStyle("visibility", "hidden"), s._.required = e.hasAttribute("required"), e.removeAttribute("required")), o && s.setData(o, null, !0), s.on("loaded", function () { n(s), r == CKEDITOR.ELEMENT_MODE_REPLACE && s.config.autoUpdateElement && e.$.form && s._attachToForm(), s.setMode(s.config.startupMode, function () { s.resetDirty(), s.status = "ready", s.fireOnce("instanceReady"), CKEDITOR.fire("instanceReady", null, s) }) }), s.on("destroy", t), s } function t() { var e = this.container, t = this.element; e && (e.clearCustomData(), e.remove()), t && (t.clearCustomData(), this.elementMode == CKEDITOR.ELEMENT_MODE_REPLACE && (t.show(), this._.required && t.setAttribute("required", "required")), delete this.element) } function n(e) { var t = e.name, n = e.element, i = e.elementMode, o = e.fire("uiSpace", { space: "to
122p", html: "" }).html, r = e.fire("uiSpace", { space: "bottom", html: "" }).html, s = new CKEDITOR.template('<{outerEl} id="cke_{name}" class="{id} cke cke_reset cke_chrome cke_editor_{name} cke_{langDir} ' + CKEDITOR.env.cssClass + '"  dir="{langDir}" lang="{langCode}" role="application"' + (e.title ? ' aria-labelledby="cke_{name}_arialbl"' : "") + ">" + (e.title ? '<span id="cke_{name}_arialbl" class="cke_voice_label">{voiceLabel}</span>' : "") + '<{outerEl} class="cke_inner cke_reset" role="presentation">{topHtml}<{outerEl} id="{contentId}" class="cke_contents cke_reset" role="presentation"></{outerEl}>{bottomHtml}</{outerEl}></{outerEl}>'), t = CKEDITOR.dom.element.createFromHtml(s.output({ id: e.id, name: t, langDir: e.lang.dir, langCode: e.langCode, voiceLabel: e.title, topHtml: o ? '<span id="' + e.ui.spaceId("top") + '" class="cke_top cke_reset_all" role="presentation" style="height:auto">' + o + "</span>" : "", contentId: e.ui.spaceId("contents"), bottomHtml: r ? '<span id="' + e.ui.spaceId("bottom") + '" class="cke_bottom cke_reset_all" role="presentation">' + r + "</span>" : "", outerEl: CKEDITOR.env.ie ? "span" : "div" })); i == CKEDITOR.ELEMENT_MODE_REPLACE ? (n.hide(), t.insertAfter(n)) : n.append(t), e.container = t, e.ui.contentsElement = e.ui.space("contents"), o && e.ui.space("top").unselectable(), r && e.ui.space("bottom").unselectable(), n = e.config.width, i = e.config.height, n && t.setStyle("width", CKEDITOR.tools.cssLength(n)), i && e.ui.space("contents").setStyle("height", CKEDITOR.tools.cssLength(i)), t.disableContextMenu(), CKEDITOR.env.webkit && t.on("focus", function () { e.focus() }), e.fireOnce("uiReady") } CKEDITOR.replace = function (t, n) { return e(t, n, null, CKEDITOR.ELEMENT_MODE_REPLACE) }, CKEDITOR.appendTo = function (t, n, i) { return e(t, n, i, CKEDITOR.ELEMENT_MODE_APPENDTO) }, CKEDITOR.replaceAll = function () { for (var e = document.getElementsByTagName("textarea"), t = 0; t < e.length; t++) { var n = null, i = e[t]; if (i.name || i.id) { if ("string" == typeof arguments[0]) { if (!new RegExp("(?:^|\\s)" + arguments[0] + "(?:$|\\s)").test(i.className)) continue } else if ("function" == typeof arguments[0] && (n = {}, !1 === arguments[0](i, n))) continue; this.replace(i, n) } } }, CKEDITOR.editor.prototype.addMode = function (e, t) { (this._.modes || (this._.modes = {}))[e] = t }, CKEDITOR.editor.prototype.setMode = function (e, t) { var n = this, i = this._.modes; if (e != n.mode && i && i[e]) { if (n.fire("beforeSetMode", e), n.mode) { var o, r = n.checkDirty(), i = n._.previousModeData, s = 0; n.fire("beforeModeUnload"), n.editable(0), n._.previousMode = n.mode, n._.previousModeData = o = n.getData(1), "source" == n.mode && i == o && (n.fire("lockSnapshot", { forceUpdate: !0 }), s = 1), n.ui.space("contents").setHtml(""), n.mode = "" } else n._.previousModeData = n.getData(1); this._.modes[e](function () { n.mode = e, void 0 !== r && !r && n.resetDirty(), s ? n.fire("unlockSnapshot") : "wysiwyg" == e && n.fire("saveSnapshot"), setTimeout(function () { n.fire("mode"), t && t.call(n) }, 0) }) } }, CKEDITOR.editor.prototype.resize = function (e, t, n, i) { var o = this.container, r = this.ui.space("contents"), s = CKEDITOR.env.webkit && this.document && this.document.getWindow().$.frameElement; i = i ? this.container.getFirst(function (e) { return e.type == CKEDITOR.NODE_ELEMENT && e.hasClass("cke_inner") }) : o, i.setSize("width", e, !0), s && (s.style.width = "1%"); var a = (i.$.offsetHeight || 0) - (r.$.clientHeight || 0), o = Math.max(t - (n ? 0 : a), 0); t = n ? t + a : t, r.setStyle("height", o + "px"), s && (s.style.width = "100%"), this.fire("resize", { outerHeight: t, contentsHeight: o, outerWidth: e || i.getSize("width") }) }, CKEDITOR.editor.prototype.getResizable = function (e) { return e ? this.ui.space("contents") : this.container }, CKEDITOR.domReady(function () { CKEDITOR.replaceClass && CKEDITOR.replaceAll(CKEDITOR.replaceClass) }) }(), CKEDITOR.config.startupMode = "wysiwyg", function () {
123            function e(e) { var n, o = e.editor, r = e.data.path, a = r.blockLimit, l = e.data.selection, c = l.getRanges()[0]; (CKEDITOR.env.gecko || CKEDITOR.env.ie && CKEDITOR.env.needsBrFiller) && (l = t(l, r)) && (l.appendBogus(), n = CKEDITOR.env.ie), s(o, r.block, a) && c.collapsed && !c.getCommonAncestor().isReadOnly() && (r = c.clone(), r.enlarge(CKEDITOR.ENLARGE_BLOCK_CONTENTS), a = new CKEDITOR.dom.walker(r), a.guard = function (e) { return !i(e) || e.type == CKEDITOR.NODE_COMMENT || e.isReadOnly() }, !a.checkForward() || r.checkStartOfBlock() && r.checkEndOfBlock()) && (o = c.fixBlock(!0, o.activeEnterMode == CKEDITOR.ENTER_DIV ? "div" : "p"), CKEDITOR.env.needsBrFiller || (o = o.getFirst(i)) && o.type == CKEDITOR.NODE_TEXT && CKEDITOR.tools.trim(o.getText()).match(/^(?:&nbsp;|\xa0)$/) && o.remove(), n = 1, e.cancel()), n && c.select() } function t(e, t) { if (e.isFake) return 0; var n = t.block || t.blockLimit, o = n && n.getLast(i); return !n || !n.isBlockBoundary() || o && o.type == CKEDITOR.NODE_ELEMENT && o.isBlockBoundary() || n.is("pre") || n.getBogus() ? void 0 : n } function n(e) { var t = e.data.getTarget(); t.is("input") && (t = t.getAttribute("type"), "submit" != t && "reset" != t || e.data.preventDefault()) } function i(e) { return d(e) && u(e) } function o(e, t) { return function (n) { var i = n.data.$.toElement || n.data.$.fromElement || n.data.$.relatedTarget; (i = i && i.nodeType == CKEDITOR.NODE_ELEMENT ? new CKEDITOR.dom.element(i) : null) && (t.equals(i) || t.contains(i)) || e.call(this, n) } } function r(e) { function t(e) { return function (t, o) { return o && t.type == CKEDITOR.NODE_ELEMENT && t.is(r) && (n = t), o || !i(t) || e && p(t) ? void 0 : !1 } } var n, o = e.getRanges()[0]; e = e.root; var r = { table: 1, ul: 1, ol: 1, dl: 1 }; if (o.startPath().contains(r)) { var s = o.clone(); if (s.collapse(1), s.setStartAt(e, CKEDITOR.POSITION_AFTER_START), e = new CKEDITOR.dom.walker(s), e.guard = t(), e.checkBackward(), n) return s = o.clone(), s.collapse(), s.setEndAt(n, CKEDITOR.POSITION_AFTER_END), e = new CKEDITOR.dom.walker(s), e.guard = t(!0), n = !1, e.checkForward(), n } return null } function s(e, t, n) { return !1 !== e.config.autoParagraph && e.activeEnterMode != CKEDITOR.ENTER_BR && (e.editable().equals(n) && !t || t && "true" == t.getAttribute("contenteditable")) } function a(e) { return e.activeEnterMode != CKEDITOR.ENTER_BR && !1 !== e.config.autoParagraph ? e.activeEnterMode == CKEDITOR.ENTER_DIV ? "div" : "p" : !1 } function l(e) {
124                var t = e.editor; t.getSelection().scrollIntoView(),
125                    setTimeout(function () { t.fire("saveSnapshot") }, 0)
126            } function c(e, t, n) { var i = e.getCommonAncestor(t); for (t = e = n ? t : e; (e = e.getParent()) && !i.equals(e) && 1 == e.getChildCount();)t = e; t.remove() } var d, u, h, p, f, m, g, v, E, T; CKEDITOR.editable = CKEDITOR.tools.createClass({ base: CKEDITOR.dom.element, $: function (e, t) { this.base(t.$ || t), this.editor = e, this.status = "unloaded", this.hasFocus = !1, this.setup() }, proto: { focus: function () { var e; if (CKEDITOR.env.webkit && !this.hasFocus && (e = this.editor._.previousActive || this.getDocument().getActive(), this.contains(e))) return void e.focus(); CKEDITOR.env.edge && 14 < CKEDITOR.env.version && !this.hasFocus && this.getDocument().equals(CKEDITOR.document) && (this.editor._.previousScrollTop = this.$.scrollTop); try { !CKEDITOR.env.ie || CKEDITOR.env.edge && 14 < CKEDITOR.env.version || !this.getDocument().equals(CKEDITOR.document) ? this.$.focu
126s() : this.$.setActive() } catch (t) { if (!CKEDITOR.env.ie) throw t } CKEDITOR.env.safari && !this.isInline() && (e = CKEDITOR.document.getActive(), e.equals(this.getWindow().getFrame()) || this.getWindow().focus()) }, on: function (e, t) { var n = Array.prototype.slice.call(arguments, 0); return CKEDITOR.env.ie && /^focus|blur$/.exec(e) && (e = "focus" == e ? "focusin" : "focusout", t = o(t, this), n[0] = e, n[1] = t), CKEDITOR.dom.element.prototype.on.apply(this, n) }, attachListener: function (e) { !this._.listeners && (this._.listeners = []); var t = Array.prototype.slice.call(arguments, 1), t = e.on.apply(e, t); return this._.listeners.push(t), t }, clearListeners: function () { var e = this._.listeners; try { for (; e.length;)e.pop().removeListener() } catch (t) { } }, restoreAttrs: function () { var e, t, n = this._.attrChanges; for (t in n) n.hasOwnProperty(t) && (e = n[t], null !== e ? this.setAttribute(t, e) : this.removeAttribute(t)) }, attachClass: function (e) { var t = this.getCustomData("classes"); this.hasClass(e) || (!t && (t = []), t.push(e), this.setCustomData("classes", t), this.addClass(e)) }, changeAttr: function (e, t) { var n = this.getAttribute(e); t !== n && (!this._.attrChanges && (this._.attrChanges = {}), e in this._.attrChanges || (this._.attrChanges[e] = n), this.setAttribute(e, t)) }, insertText: function (e) { this.editor.focus(), this.insertHtml(this.transformPlainTextToHtml(e), "text") }, transformPlainTextToHtml: function (e) { var t = this.editor.getSelection().getStartElement().hasAscendant("pre", !0) ? CKEDITOR.ENTER_BR : this.editor.activeEnterMode; return CKEDITOR.tools.transformPlainTextToHtml(e, t) }, insertHtml: function (e, t, n) { var i = this.editor; i.focus(), i.fire("saveSnapshot"), n || (n = i.getSelection().getRanges()[0]), m(this, t || "html", e, n), n.select(), l(this), this.editor.fire("afterInsertHtml", {}) }, insertHtmlIntoRange: function (e, t, n) { m(this, n || "html", e, t), this.editor.fire("afterInsertHtml", { intoRange: t }) }, insertElement: function (e, t) { var n = this.editor; n.focus(), n.fire("saveSnapshot"); var o = n.activeEnterMode, n = n.getSelection(), r = e.getName(), r = CKEDITOR.dtd.$block[r]; t || (t = n.getRanges()[0]), this.insertElementIntoRange(e, t) && (t.moveToPosition(e, CKEDITOR.POSITION_AFTER_END), r && ((r = e.getNext(function (e) { return i(e) && !p(e) })) && r.type == CKEDITOR.NODE_ELEMENT && r.is(CKEDITOR.dtd.$block) ? r.getDtd()["#"] ? t.moveToElementEditStart(r) : t.moveToElementEditEnd(e) : r || o == CKEDITOR.ENTER_BR || (r = t.fixBlock(!0, o == CKEDITOR.ENTER_DIV ? "div" : "p"), t.moveToElementEditStart(r)))), n.selectRanges([t]), l(this) }, insertElementIntoSelection: function (e) { this.insertElement(e) }, insertElementIntoRange: function (e, t) { var n = this.editor, i = n.config.enterMode, o = e.getName(), r = CKEDITOR.dtd.$block[o]; if (t.checkReadOnly()) return !1; t.deleteContents(1), t.startContainer.type == CKEDITOR.NODE_ELEMENT && (t.startContainer.is({ tr: 1, table: 1, tbody: 1, thead: 1, tfoot: 1 }) ? g(t) : t.startContainer.is(CKEDITOR.dtd.$list) && v(t)); var s, a; if (r) for (; (s = t.getCommonAncestor(0, 1)) && (a = CKEDITOR.dtd[s.getName()]) && (!a || !a[o]);)s.getName() in CKEDITOR.dtd.span ? t.splitElement(s) : t.checkStartOfBlock() && t.checkEndOfBlock() ? (t.setStartBefore(s), t.collapse(!0), s.remove()) : t.splitBlock(i == CKEDITOR.ENTER_DIV ? "div" : "p", n.editable()); return t.insertNode(e), !0 }, setData: function (e, t) { t || (e = this.editor.dataProcessor.toHtml(e)), this.setHtml(e), this.fixInitialSelection(), "unloaded" == this.status && (this.status = "ready"), this.editor.fire("dataReady") }, getData: function (e) { var t = this.getHtml(); return e || (t = this.editor.dataProcessor.toDataFormat(t)), t }, setReadOnly: function (e) { this.setAttribute("contenteditable", !e) }, detach: function () { this.removeClass("cke_editable"), this.status = "detached"; var e = this.editor; this._.detach(), delete e.document, delete e.window }, isInline: function () { return this.getDocument().equals(CKEDITOR.document) }, fixInitialSelection: function () { function e() { var e, t = n.getDocument().$, i = t.getSelection(); e: if (i.anchorNode && i.anchorNode == n.$) e = !0; else { if (CKEDITOR.env.webkit && (e = n.getDocument().getActive()) && e.equals(n) && !i.anchorNode) { e = !0; break e } e = void 0 } e && (e = new CKEDITOR.dom.range(n), e.moveToElementEditStart(n), t = t.createRange(), t.setStart(e.startContainer.$, e.startOffset), t.collapse(!0), i.removeAllRanges(), i.addRange(t)) } function t() { var e = n.getDocument().$, t = e.selection, i = n.getDocument().getActive(); "None" == t.type && i.equals(n) && (t = new CKEDITOR.dom.range(n), e = e.body.createTextRange(), t.moveToElementEditStart(n), t = t.startContainer, t.type != CKEDITOR.NODE_ELEMENT && (t = t.getParent()), e.moveToElementText(t.$), e.collapse(!0), e.select()) } var n = this; CKEDITOR.env.ie && (9 > CKEDITOR.env.version || CKEDITOR.env.quirks) ? this.hasFocus && (this.focus(), t()) : this.hasFocus ? (this.focus(), e()) : this.once("focus", function () { e() }, null, null, -999) }, getHtmlFromRange: function (e) { return e.collapsed ? new CKEDITOR.dom.documentFragment(e.document) : (e = { doc: this.getDocument(), range: e.clone() }, E.eol.detect(e, this), E.bogus.exclude(e), E.cell.shrink(e), e.fragment = e.range.cloneContents(), E.tree.rebuild(e, this), E.eol.fix(e, this), new CKEDITOR.dom.documentFragment(e.fragment.$)) }, extractHtmlFromRange: function (e, t) { var n = T, i = { range: e, doc: e.document }, o = this.getHtmlFromRange(e); if (e.collapsed) return e.optimize(), o; e.enlarge(CKEDITOR.ENLARGE_INLINE, 1), n.table.detectPurge(i), i.bookmark = e.createBookmark(), delete i.range; var r = this.editor.createRange(); if (r.moveToPosition(i.bookmark.startNode, CKEDITOR.POSITION_BEFORE_START), i.targetBookmark = r.createBookmark(), n.list.detectMerge(i, this), n.table.detectRanges(i, this), n.block.detectMerge(i, this), i.tableContentsRanges ? (n.table.deleteRanges(i), e.moveToBookmark(i.bookmark), i.range = e) : (e.moveToBookmark(i.bookmark), i.range = e, e.extractContents(n.detectExtractMerge(i))), e.moveToBookmark(i.targetBookmark), e.optimize(), n.fixUneditableRangePosition(e), n.list.merge(i, this), n.table.purge(i, this), n.block.merge(i, this), t) { if (n = e.startPath(), i = e.checkStartOfBlock() && e.checkEndOfBlock() && n.block && !e.root.equals(n.block)) { e: { var s, i = n.block.getElementsByTag("span"), r = 0; if (i) for (; s = i.getItem(r++);)if (!u(s)) { i = !0; break e } i = !1 } i = !i } i && (e.moveToPosition(n.block, CKEDITOR.POSITION_BEFORE_START), n.block.remove()) } else n.autoParagraph(this.editor, e), h(e.startContainer) && e.startContainer.appendBogus(); return e.startContainer.mergeSiblings(), o }, setup: function () { var e = this.editor; if (this.attachListener(e, "beforeGetData", function () { var t = this.getData(); this.is("textarea") || !1 !== e.config.ignoreEmptyParagraph && (t = t.replace(f, function (e, t) { return t })), e.setData(t, null, 1) }, this), this.attachListener(e, "getSnapshot", function (e) { e.data = this.getData(1) }, this), this.attachListener(e, "afterSetData", function () { this.setData(e.getData(1)) }
126, this), this.attachListener(e, "loadSnapshot", function (e) { this.setData(e.data, 1) }, this), this.attachListener(e, "beforeFocus", function () { var t = e.getSelection(); (t = t && t.getNative()) && "Control" == t.type || this.focus() }, this), this.attachListener(e, "insertHtml", function (e) { this.insertHtml(e.data.dataValue, e.data.mode, e.data.range) }, this), this.attachListener(e, "insertElement", function (e) { this.insertElement(e.data) }, this), this.attachListener(e, "insertText", function (e) { this.insertText(e.data) }, this), this.setReadOnly(e.readOnly), this.attachClass("cke_editable"), e.elementMode == CKEDITOR.ELEMENT_MODE_INLINE ? this.attachClass("cke_editable_inline") : e.elementMode != CKEDITOR.ELEMENT_MODE_REPLACE && e.elementMode != CKEDITOR.ELEMENT_MODE_APPENDTO || this.attachClass("cke_editable_themed"), this.attachClass("cke_contents_" + e.config.contentsLangDirection), e.keystrokeHandler.blockedKeystrokes[8] = +e.readOnly, e.keystrokeHandler.attach(this), this.on("blur", function () { this.hasFocus = !1 }, null, null, -1), this.on("focus", function () { this.hasFocus = !0 }, null, null, -1), CKEDITOR.env.webkit && this.on("scroll", function () { e._.previousScrollTop = e.editable().$.scrollTop }, null, null, -1), CKEDITOR.env.edge && 14 < CKEDITOR.env.version) { var t = function () { var n = e.editable(); null != e._.previousScrollTop && n.getDocument().equals(CKEDITOR.document) && (n.$.scrollTop = e._.previousScrollTop, e._.previousScrollTop = null, this.removeListener("scroll", t)) }; this.on("scroll", t) } if (e.focusManager.add(this), this.equals(CKEDITOR.document.getActive()) && (this.hasFocus = !0, e.once("contentDom", function () { e.focusManager.focus(this) }, this)), this.isInline() && this.changeAttr("tabindex", e.tabIndex), !this.is("textarea")) { e.document = this.getDocument(), e.window = this.getWindow(); var o = e.document; this.changeAttr("spellcheck", !e.config.disableNativeSpellChecker); var s = e.config.contentsLangDirection; this.getDirection(1) != s && this.changeAttr("dir", s); var a = CKEDITOR.getCss(); if (a) { var s = o.getHead(), l = s.getCustomData("stylesheet"); l ? a != l.getText() && (CKEDITOR.env.ie && 9 > CKEDITOR.env.version ? l.$.styleSheet.cssText = a : l.setText(a)) : (a = o.appendStyleText(a), a = new CKEDITOR.dom.element(a.ownerNode || a.owningElement), s.setCustomData("stylesheet", a), a.data("cke-temp", 1)) } s = o.getCustomData("stylesheet_ref") || 0, o.setCustomData("stylesheet_ref", s + 1), this.setCustomData("cke_includeReadonly", !e.config.disableReadonlyStyling), this.attachListener(this, "click", function (e) { e = e.data; var t = new CKEDITOR.dom.elementPath(e.getTarget(), this).contains("a"); t && 2 != e.$.button && t.isReadOnly() && e.preventDefault() }); var u = { 8: 1, 46: 1 }; this.attachListener(e, "key", function (t) { if (e.readOnly) return !0; var n, i = t.data.domEvent.getKey(); if (i in u) { t = e.getSelection(); var o, s, a, l, c = t.getRanges()[0], h = c.startPath(), i = 8 == i; CKEDITOR.env.ie && 11 > CKEDITOR.env.version && (o = t.getSelectedElement()) || (o = r(t)) ? (e.fire("saveSnapshot"), c.moveToPosition(o, CKEDITOR.POSITION_BEFORE_START), o.remove(), c.select(), e.fire("saveSnapshot"), n = 1) : c.collapsed && ((s = h.block) && (l = s[i ? "getPrevious" : "getNext"](d)) && l.type == CKEDITOR.NODE_ELEMENT && l.is("table") && c[i ? "checkStartOfBlock" : "checkEndOfBlock"]() ? (e.fire("saveSnapshot"), c[i ? "checkEndOfBlock" : "checkStartOfBlock"]() && s.remove(), c["moveToElementEdit" + (i ? "End" : "Start")](l), c.select(), e.fire("saveSnapshot"), n = 1) : h.blockLimit && h.blockLimit.is("td") && (a = h.blockLimit.getAscendant("table")) && c.checkBoundaryOfElement(a, i ? CKEDITOR.START : CKEDITOR.END) && (l = a[i ? "getPrevious" : "getNext"](d)) ? (e.fire("saveSnapshot"), c["moveToElementEdit" + (i ? "End" : "Start")](l), c.checkStartOfBlock() && c.checkEndOfBlock() ? l.remove() : c.select(), e.fire("saveSnapshot"), n = 1) : (a = h.contains(["td", "th", "caption"])) && c.checkBoundaryOfElement(a, i ? CKEDITOR.START : CKEDITOR.END) && (n = 1)) } return !n }), e.blockless && CKEDITOR.env.ie && CKEDITOR.env.needsBrFiller && this.attachListener(this, "keyup", function (t) { t.data.getKeystroke() in u && !this.getFirst(i) && (this.appendBogus(), t = e.createRange(), t.moveToPosition(this, CKEDITOR.POSITION_AFTER_START), t.select()) }), this.attachListener(this, "dblclick", function (t) { return e.readOnly ? !1 : (t = { element: t.data.getTarget() }, void e.fire("doubleclick", t)) }), CKEDITOR.env.ie && this.attachListener(this, "click", n), CKEDITOR.env.ie && !CKEDITOR.env.edge || this.attachListener(this, "mousedown", function (t) { var n = t.data.getTarget(); n.is("img", "hr", "input", "textarea", "select") && !n.isReadOnly() && (e.getSelection().selectElement(n), n.is("input", "textarea", "select") && t.data.preventDefault()) }), CKEDITOR.env.edge && this.attachListener(this, "mouseup", function (t) { (t = t.data.getTarget()) && t.is("img") && e.getSelection().selectElement(t) }), CKEDITOR.env.gecko && this.attachListener(this, "mouseup", function (t) { if (2 == t.data.$.button && (t = t.data.getTarget(), !t.getOuterHtml().replace(f, ""))) { var n = e.createRange(); n.moveToElementEditStart(t), n.select(!0) } }), CKEDITOR.env.webkit && (this.attachListener(this, "click", function (e) { e.data.getTarget().is("input", "select") && e.data.preventDefault() }), this.attachListener(this, "mouseup", function (e) { e.data.getTarget().is("input", "textarea") && e.data.preventDefault() })), CKEDITOR.env.webkit && this.attachListener(e, "key", function (t) { if (e.readOnly) return !0; if (t = t.data.domEvent.getKey(), t in u) { var n = 8 == t, i = e.getSelection().getRanges()[0]; if (t = i.startPath(), i.collapsed) e: { var o = t.block; if (o && i[n ? "checkStartOfBlock" : "checkEndOfBlock"]() && i.moveToClose
126stEditablePosition(o, !n) && i.collapsed) { if (i.startContainer.type == CKEDITOR.NODE_ELEMENT) { var r = i.startContainer.getChild(i.startOffset - (n ? 1 : 0)); if (r && r.type == CKEDITOR.NODE_ELEMENT && r.is("hr")) { e.fire("saveSnapshot"), r.remove(), t = !0; break e } } if (i = i.startPath().block, !i || i && i.contains(o)) t = void 0; else { e.fire("saveSnapshot"); var s; (s = (n ? i : o).getBogus()) && s.remove(), s = e.getSelection(), r = s.createBookmarks(), (n ? o : i).moveChildren(n ? i : o, !1), t.lastElement.mergeSiblings(), c(o, i, !n), s.selectBookmarks(r), t = !0 } } else t = !1 } else n = i, s = t.block, i = n.endPath().block, s && i && !s.equals(i) ? (e.fire("saveSnapshot"), (o = s.getBogus()) && o.remove(), n.enlarge(CKEDITOR.ENLARGE_INLINE), n.deleteContents(), i.getParent() && (i.moveChildren(s, !1), t.lastElement.mergeSiblings(), c(s, i, !0)), n = e.getSelection().getRanges()[0], n.collapse(1), n.optimize(), "" === n.startContainer.getHtml() && n.startContainer.appendBogus(), n.select(), t = !0) : t = !1; if (!t) return; return e.getSelection().scrollIntoView(), e.fire("saveSnapshot"), !1 } }, this, null, 100) } } }, _: { detach: function () { this.editor.setData(this.editor.getData(), 0, 1), this.clearListeners(), this.restoreAttrs(); var e; if (e = this.removeCustomData("classes")) for (; e.length;)this.removeClass(e.pop()); if (!this.is("textarea")) { e = this.getDocument(); var t = e.getHead(); if (t.getCustomData("stylesheet")) { var n = e.getCustomData("stylesheet_ref"); --n ? e.setCustomData("stylesheet_ref", n) : (e.removeCustomData("stylesheet_ref"), t.removeCustomData("stylesheet").remove()) } } this.editor.fire("contentDomUnload"), delete this.editor } } }), CKEDITOR.editor.prototype.editable = function (e) { var t = this._.editable; return t && e ? 0 : (arguments.length && (t = this._.editable = e ? e instanceof CKEDITOR.editable ? e : new CKEDITOR.editable(this, e) : (t && t.detach(), null)), t) }, CKEDITOR.on("instanceLoaded", function (t) { var n = t.editor; n.on("insertElement", function (e) { e = e.data, e.type == CKEDITOR.NODE_ELEMENT && (e.is("input") || e.is("textarea")) && ("false" != e.getAttribute("contentEditable") && e.data("cke-editable", e.hasAttribute("contenteditable") ? "true" : "1"), e.setAttribute("contentEditable", !1)) }), n.on("selectionChange", function (t) { if (!n.readOnly) { var i = n.getSelection(); i && !i.isLocked && (i = n.checkDirty(), n.fire("lockSnapshot"), e(t), n.fire("unlockSnapshot"), !i && n.resetDirty()) } }) }), CKEDITOR.on("instanceCreated", function (e) { var t = e.editor; t.on("mode", function () { var e = t.editable(); if (e && e.isInline()) { var n = t.title; e.changeAttr("role", "textbox"), e.changeAttr("aria-label", n), n && e.changeAttr("title", n); var i = t.fire("ariaEditorHelpLabel", {}).label; if (i && (n = this.ui.space(this.elementMode == CKEDITOR.ELEMENT_MODE_INLINE ? "top" : "contents"))) { var o = CKEDITOR.tools.getNextId(), i = CKEDITOR.dom.element.createFromHtml('<span id="' + o + '" class="cke_voice_label">' + i + "</span>"); n.append(i), e.changeAttr("aria-describedby", o) } } }) }), CKEDITOR.addCss(".cke_editable{cursor:text}.cke_editable img,.cke_editable input,.cke_editable textarea{cursor:default}"), d = CKEDITOR.dom.walker.whitespaces(!0), u = CKEDITOR.dom.walker.bookmark(!1, !0), h = CKEDITOR.dom.walker.empty(), p = CKEDITOR.dom.walker.bogus(), f = /(^|<body\b[^>]*>)\s*<(p|div|address|h\d|center|pre)[^>]*>\s*(?:<br[^>]*>|&nbsp;|\u00A0|&#160;)?\s*(:?<\/\2>)?\s*(?=$|<\/body>)/gi, m = function () { function e(e) { return e.type == CKEDITOR.NODE_ELEMENT } function t(n, i) { var o, r, s, a, l = [], c = i.range.startContainer; o = i.range.startPath(); for (var c = d[c.getName()], u = 0, h = n.getChildren(), p = h.count(), f = -1, m = -1, g = 0, v = o.contains(d.$list); p > u; ++u)o = h.getItem(u), e(o) ? (s = o.getName(), v && s in CKEDITOR.dtd.$list ? l = l.concat(t(o, i)) : (a = !!c[s], "br" != s || !o.data("cke-eol") || u && u != p - 1 || (g = (r = u ? l[u - 1].node : h.getItem(u + 1)) && (!e(r) || !r.is("br")), r = r && e(r) && d.$block[r.getName()]), -1 != f || a || (f = u), a || (m = u), l.push({ isElement: 1, isLineBreak: g, isBlock: o.isBlockBoundary(), hasBlockSibling: r, node: o, name: s, allowed: a }), r = g = 0)) : l.push({ isElement: 0, node: o, allowed: 1 }); return f > -1 && (l[f].firstNotAllowed = 1), m > -1 && (l[m].lastNotAllowed = 1), l } function n(t, i) { var o, r = [], s = t.getChildren(), a = s.count(), l = 0, c = d[i], u = !t.is(d.$inline) || t.is("br"); for (u && r.push(" "); a > l; l++)o = s.getItem(l), e(o) && !o.is(c) ? r = r.concat(n(o, i)) : r.push(o); return u && r.push(" "), r } function o(t) { return e(t.startContainer) && t.startContainer.getChild(t.startOffset - 1) } function r(t) { return t && e(t) && (t.is(d.$removeEmpty) || t.is("a") && !t.isBlockBoundary()) } function l(t, n, i, o) { var r, s, a = t.clone(); a.setEndAt(n, CKEDITOR.POSITION_BEFORE_END), (r = new CKEDITOR.dom.walker(a).next()) && e(r) && u[r.getName()] && (s = r.getPrevious()) && e(s) && !s.getParent().equals(t.startContainer) && i.contains(s) && o.contains(r) && r.isIdentical(s) && (r.moveChildren(s), r.remove(), l(t, n, i, o)) } function c(t, n) { function i(t, n) { return n.isBlock && n.isElement && !n.node.is("br") && e(t) && t.is("br") ? (t.remove(), 1) : void 0 } var o = n.endContainer.getChild(n.endOffset), r = n.endContainer.getChild(n.endOffset - 1); o && i(o, t[t.length - 1]), r && i(r, t[0]) && (n.setEnd(n.endContainer, n.endOffset - 1), n.collapse()) } var d = CKEDITOR.dtd, u = { p: 1, div: 1, h1: 1, h2: 1, h3: 1, h4: 1, h5: 1, h6: 1, ul: 1, ol: 1, li: 1, pre: 1, dl: 1, blockquote: 1 }, h = { p: 1, div: 1, h1: 1, h2: 1, h3: 1, h4: 1, h5: 1, h6: 1 }
126, p = CKEDITOR.tools.extend({}, d.$inline); return delete p.br, function (u, f, m, g) { var v = u.editor, E = !1; if ("unfiltered_html" == f && (f = "html", E = !0), !g.checkReadOnly()) { var T = new CKEDITOR.dom.elementPath(g.startContainer, g.root).blockLimit || g.root; u = { type: f, dontFilter: E, editable: u, editor: v, range: g, blockLimit: T, mergeCandidates: [], zombies: [] }, f = u.range, g = u.mergeCandidates; var y, b; if ("text" == u.type && f.shrink(CKEDITOR.SHRINK_ELEMENT, !0, !1) && (y = CKEDITOR.dom.element.createFromHtml("<span>&nbsp;</span>", f.document), f.insertNode(y), f.setStartAfter(y)), E = new CKEDITOR.dom.elementPath(f.startContainer), u.endPath = T = new CKEDITOR.dom.elementPath(f.endContainer), !f.collapsed) { var v = T.block || T.blockLimit, C = f.getCommonAncestor(); v && !v.equals(C) && !v.contains(C) && f.checkEndOfBlock() && u.zombies.push(v), f.deleteContents() } for (; (b = o(f)) && e(b) && b.isBlockBoundary() && E.contains(b);)f.moveToPosition(b, CKEDITOR.POSITION_BEFORE_END); for (l(f, u.blockLimit, E, T), y && (f.setEndBefore(y), f.collapse(), y.remove()), y = f.startPath(), (v = y.contains(r, !1, 1)) && (f.splitElement(v), u.inlineStylesRoot = v, u.inlineStylesPeak = y.lastElement), y = f.createBookmark(), (v = y.startNode.getPrevious(i)) && e(v) && r(v) && g.push(v), (v = y.startNode.getNext(i)) && e(v) && r(v) && g.push(v), v = y.startNode; (v = v.getParent()) && r(v);)g.push(v); if (f.moveToBookmark(y), y = m) { if (y = u.range, "text" == u.type && u.inlineStylesRoot) { for (b = u.inlineStylesPeak, f = b.getDocument().createText("{cke-peak}"), g = u.inlineStylesRoot.getParent(); !b.equals(g);)f = f.appendTo(b.clone()), b = b.getParent(); m = f.getOuterHtml().split("{cke-peak}").join(m) } if (b = u.blockLimit.getName(), /^\s+|\s+$/.test(m) && "span" in CKEDITOR.dtd[b]) { var _ = '<span data-cke-marker="1">&nbsp;</span>'; m = _ + m + _ } if (m = u.editor.dataProcessor.toHtml(m, { context: null, fixForBody: !1, protectedWhitespaces: !!_, dontFilter: u.dontFilter, filter: u.editor.activeFilter, enterMode: u.editor.activeEnterMode }), b = y.document.createElement("body"), b.setHtml(m), _ && (b.getFirst().remove(), b.getLast().remove()), (_ = y.startPath().block) && (1 != _.getChildCount() || !_.getBogus())) e: { var I;
126 if (1 == b.getChildCount() && e(I = b.getFirst()) && I.is(h) && !I.hasAttribute("contenteditable")) { for (_ = I.getElementsByTag("*"), y = 0, g = _.count(); g > y; y++)if (f = _.getItem(y), !f.is(p)) break e; I.moveChildren(I.getParent(1)), I.remove() } } u.dataWrapper = b, y = m } if (y) { I = u.range, y = I.document; var O; b = u.blockLimit, g = 0; var D, R, k, _ = []; m = v = 0; var w, x; f = I.startContainer; var K, E = u.endPath.elements[0], T = E.getPosition(f), C = !(!E.getCommonAncestor(f) || T == CKEDITOR.POSITION_IDENTICAL || T & CKEDITOR.POSITION_CONTAINS + CKEDITOR.POSITION_IS_CONTAINED); for (f = t(u.dataWrapper, u), c(f, I); g < f.length; g++) { if (T = f[g], O = T.isLineBreak) { O = I, w = b; var S = void 0, N = void 0; T.hasBlockSibling ? O = 1 : (S = O.startContainer.getAscendant(d.$block, 1)) && S.is({ div: 1, p: 1 }) ? (N = S.getPosition(w), N == CKEDITOR.POSITION_IDENTICAL || N == CKEDITOR.POSITION_CONTAINS ? O = 0 : (w = O.splitElement(S), O.moveToPosition(w, CKEDITOR.POSITION_AFTER_START), O = 1)) : O = 0 } if (O) m = g > 0; else { if (O = I.startPath(), !T.isBlock && s(u.editor, O.block, O.blockLimit) && (k = a(u.editor)) && (k = y.createElement(k), k.appendBogus(), I.insertNode(k), CKEDITOR.env.needsBrFiller && (D = k.getBogus()) && D.remove(), I.moveToPosition(k, CKEDITOR.POSITION_BEFORE_END)), (O = I.startPath().block) && !O.equals(R) && ((D = O.getBogus()) && (D.remove(), _.push(O)), R = O), T.firstNotAllowed && (v = 1), v && T.isElement) { for (O = I.startContainer, w = null; O && !d[O.getName()][T.name];) { if (O.equals(b)) { O = null; break } w = O, O = O.getParent() } if (O) w && (x = I.splitElement(w), u.zombies.push(x), u.zombies.push(w)); else { w = b.getName(), K = !g, O = g == f.length - 1, w = n(T.node, w); for (var S = [], N = w.length, A = 0, $ = void 0, L = 0, P = -1; N > A; A++)$ = w[A], " " == $ ? (L || K && !A || (S.push(new CKEDITOR.dom.text(" ")), P = S.length), L = 1) : (S.push($), L = 0); O && P == S.length && S.pop(), K = S } } if (K) { for (; O = K.pop();)I.insertNode(O); K = 0 } else I.insertNode(T.node); T.lastNotAllowed && g < f.length - 1 && ((x = C ? E : x) && I.setEndAt(x, CKEDITOR.POSITION_AFTER_START), v = 0), I.collapse() } } 1 != f.length ? D = !1 : (D = f[0], D = D.isElement && "false" == D.node.getAttribute("contenteditable")), D && (m = !0, O = f[0].node, I.setStartAt(O, CKEDITOR.POSITION_BEFORE_START), I.setEndAt(O, CKEDITOR.POSITION_AFTER_END)), u.dontMoveCaret = m, u.bogusNeededBlocks = _ } D = u.range; var F; for (x = u.bogusNeededBlocks, K = D.createBookmark(); R = u.zombies.pop();)R.getParent() && (k = D.clone(), k.moveToElementEditStart(R), k.removeEmptyBlocksAtEnd()); if (x) for (; R = x.pop();)CKEDITOR.env.needsBrFiller ? R.appendBogus() : R.append(D.document.createText("\xa0")); for (; R = u.mergeCandidates.pop();)R.mergeSiblings(); if (D.moveToBookmark(K), !u.dontMoveCaret) { for (R = o(D); R && e(R) && !R.is(d.$empty);) { if (R.isBlockBoundary()) D.moveToPosition(R, CKEDITOR.POSITION_BEFORE_END); else { if (r(R) && R.getHtml().match(/(\s|&nbsp;)$/g)) { F = null; break } F = D.clone(), F.moveToPosition(R, CKEDITOR.POSITION_BEFORE_END) } R = R.getLast(i) } F && D.moveToRange(F) } } } }(), g = function () { function e(e) { return e = new CKEDITOR.dom.walker(e), e.guard = function (e, t) { return t ? !1 : e.type == CKEDITOR.NODE_ELEMENT ? e.is(CKEDITOR.dtd.$tableContent) : void 0 }, e.evaluator = function (e) { return e.type == CKEDITOR.NODE_ELEMENT }, e } function t(e, t, n) { return t = e.getDocument().createElement(t), e.append(t, n), t } function n(e) { var t, n = e.count(); for (n; 0 < n--;)t = e.getItem(n), CKEDITOR.tools.trim(t.getHtml()) || (t.appendBogus(), CKEDITOR.env.ie && 9 > CKEDITOR.env.version && t.getChildCount() && t.getFirst().remove()) } return function (i) { var o = i.startContainer, r = o.getAscendant("table", 1), s = !1; n(r.getElementsByTag("td")), n(r.getElementsByTag("th")), r = i.clone(), r.setStart(o, 0), r = e(r).lastBackward(), r || (r = i.clone(), r.setEndAt(o, CKEDITOR.POSITION_BEFORE_END), r = e(r).lastForward(), s = !0), r || (r = o), r.is("table") ? (i.setStartAt(r, CKEDITOR.POSITION_BEFORE_START), i.collapse(!0), r.remove()) : (r.is({ tbody: 1, thead: 1, tfoot: 1 }) && (r = t(r, "tr", s)), r.is("tr") && (r = t(r, r.getParent().is("thead") ? "th" : "td", s)), (o = r.getBogus()) && o.remove(), i.moveToPosition(r, s ? CKEDITOR.POSITION_AFTER_START : CKEDITOR.POSITION_BEFORE_END)) } }(), v = function () { function e(e) { return e = new CKEDITOR.dom.walker(e), e.guard = function (e, t) { return t ? !1 : e.type == CKEDITOR.NODE_ELEMENT ? e.is(CKEDITOR.dtd.$list) || e.is(CKEDITOR.dtd.$listItem) : void 0 }, e.evaluator = function (e) { return e.type == CKEDITOR.NODE_ELEMENT && e.is(CKEDITOR.dtd.$listItem) }, e } return function (t) { var n, i = t.startContainer, o = !1; n = t.clone(), n.setStart(i, 0), n = e(n).lastBackward(), n || (n = t.clone(), n.setEndAt(i, CKEDITOR.POSITION_BEFORE_END), n = e(n).lastForward(), o = !0), n || (n = i), n.is(CKEDITOR.dtd.$list) ? (t.setStartAt(n, CKEDITOR.POSITION_BEFORE_START), t.collapse(!0), n.remove()) : ((i = n.getBogus()) && i.remove(), t.moveToPosition(n, o ? CKEDITOR.POSITION_AFTER_START : CKEDITOR.POSITION_BEFORE_END), t.select()) } }(), E = { eol: { detect: function (e, t) { var n = e.range, i = n.clone(), o = n.clone(), r = new CKEDITOR.dom.elementPath(n.startContainer, t), s = new CKEDITOR.dom.elementPath(n.endContainer, t); i.collapse(1), o.collapse(), r.block && i.checkBoundaryOfElement(r.block, CKEDITOR.END) && (n.setStartAfter(r.block), e.prependEolBr = 1), s.block && o.checkBoundaryOfElement(s.block, CKEDITOR.START) && (n.setEndBefore(s.block), e.appendEolBr = 1) }, fix: function (e, t) { var n, i = t.getDocument(); e.appendEolBr && (n = this.createEolBr(i), e.fragment.append(n)), !e.prependEolBr || n && !n.getPrevious() || e.fragment.append(this.createEolBr(i), 1) }, createEolBr: function (e) { return e.createElement("br", { attributes: { "data-cke-eol": 1 } }) } }, bogus: { exclude: function (e) { var t = e.range.getBoundaryNodes(), n = t.startNode, t = t.endNode; !t || !p(t) || n && n.equals(t) || e.range.setEndBefore(t) } }, tree: { rebuild: function (e, t) { var n, i = e.range, o = i.getCommonAncestor(), r = new CKEDITOR.dom.elementPath(o, t), s = new CKEDITOR.dom.elementPath(i.startContainer, t), i = new CKEDITOR.dom.elementPath(i.endContainer, t); if (o.type == CKEDITOR.NODE_TEXT && (o = o.getParent()), r.blockLimit.is({ tr: 1, table: 1 })) { var a = r.contains("table").getParent(); n = function (e) { return !e.equals(a) } } else if (r.block && r.block.is(CKEDITOR.dtd.$listItem) && (s = s.contains(CKEDITOR.dtd.$list), i = i.contains(CKEDITOR.dtd.$list), !s.equals(i))) { var l = r.contains(CKEDITOR.dtd.$list).getParent(); n = function (e) { return !e.equals(l) } } n || (n = function (e) { return !e.equals(r.block) && !e.equals(r.blockLimit) }), this.rebuildFragment(e, t, o, n) }, rebuildFragment: function (e, t, n, i) { for (var o; n && !n.equals(t) && i(n);)o = n.clone(0, 1), e.fragment.appendTo(o), e.fragment = o, n = n.getParent() } }, cell: { shrink: function (e) { e = e.range; var t = e.startContainer, n = e.endContainer, i = e.startOffset, o = e.endOffset; t.type == CKEDITOR.NODE_ELEMENT && t.equals(n) && t.is("tr") && ++i == o && e.shrink(CKEDITOR.SHRINK_TEXT) } } }, T = function () { function e(e, t) { var n = e.getParent(); n.is(CKEDITOR.dtd.$inline) && e[t ? "insertBefore" : "insertAfter"](n) } function t(t, n, i) { e(n), e(i, 1); for (var o; o = i.getNext();)o.insertAfter(n), n = o; h(t) && t.remove() } function n(e, t) { var n = new CKEDITOR.dom.range(e); return n.setStartAfter(t.startNode), n.setEndBefore(t.endNode), n } return { list: { detectMerge: function (e, t) { var i = n(t, e.bookmark), o = i.startPath(), r = i.endPath(), s = o.contains(CKEDITOR.dtd.$list), a = r.contains(CKEDITOR.dtd.$list); e.mergeList = s && a && s.getParent().equals(a.getParent()) && !s.equals(a), e.mergeListItems = o.block && r.block && o.block.is(CKEDITOR.dtd.$listItem) && r.block.is(CKEDITOR.dtd.$listItem), (e.mergeList || e.mergeListItems) && (i = i.clone(), i.setStartBefore(e.bookmark.startNode), i.setEndAfter(e.bookmark.endNode), e.mergeListBookmark = i.createBookmark()) }, merge: function (e, n) { if (e.mergeListBookmark) { var i = e.mergeListBookmark.startNode, o = e.mergeListBookmark.endNode, r = new CKEDITOR.dom.elementPath(i, n), s = new CKEDITOR.dom.elementPath(o, n); if (e.mergeList) { var a = r.contains(CKEDITOR.dtd.$list), l = s.contains(CKEDITOR.dtd.$list); a.equals(l) || (l.moveChildren(a), l.remove()) } e.mergeListItems && (r = r.contains(CKEDITOR.dtd.$listItem), s = s.contains(CKEDITOR.dtd.$listItem), r.equals(s) || t(s, i, o)), i.remove(), o.remove() } } }, block: { detectMerge: function (e, t) { if (!e.tableContentsRanges && !e.mergeListBookmark) { var n = new CKEDITOR.dom.range(t); n.setStartBefore(e.bookmark.startNode), n.setEndAfter(e.bookmark.endNode), e.mergeBlockBookmark = n.createBookmark() } }, merge: function (e, n) { if (e.mergeBlockBookmark && !e.purgeTableBookmark) { var i = e.mergeBlockBookmark.startNode, o = e.mergeBlockBookmark.endNode, r = new CKEDITOR.dom.elementPath(i, n), s = new CKEDITOR.dom.elementPath(o, n), r = r.block, s = s.block; r && s && !r.equals(s) && t(s, i, o), i.remove(), o.remove() } } }, table: function () { function e(e) { var n, o = [], r = new CKEDITOR.dom.walker(e), s = e.startPath().contains(i), a = e.endPath().contains(i), l = {}; return r.guard = function (r, c) { if (r.type == CKEDITOR.NODE_ELEMENT) { var d = "visited_" + (c ? "out" : "in"); if (r.getCustomData(d)) return; CKEDITOR.dom.element.setMarker(l, r, d, 1) } c && s && r.equals(s) ? (n = e.clone(), n.setEndAt(s, CKEDITOR.POSITION_BEFORE_END), o.push(n)) : !c && a && r.equals(a) ? (n = e.clone(), n.setStartAt(a, CKEDITOR.POSITION_AFTER_START), o.push(n)) : ((d = !c) && (d = r.type == CKEDITOR.NODE_ELEMENT && r.is(i) && (!s || t(r, s)) && (!a || t(r, a))), d && (n = e.clone(), n.selectNodeContents(r), o.push(n))) }, r.lastForward(), CKEDITOR.dom.element.clearAllMarkers(l), o } function t(e, t) { var n = CKEDITOR.POSITION_CONTAINS + CKEDITOR.POSITION_IS_CONTAINED, i = e.getPosition(t); return i === CKEDITOR.POSITION_IDENTICAL ? !1 : 0 === (i & n) }
126 var i = { td: 1, th: 1, caption: 1 }; return { detectPurge: function (e) { var t = e.range, n = t.clone(); n.enlarge(CKEDITOR.ENLARGE_ELEMENT); var n = new CKEDITOR.dom.walker(n), o = 0; if (n.evaluator = function (e) { e.type == CKEDITOR.NODE_ELEMENT && e.is(i) && ++o }, n.checkForward(), o > 1) { var n = t.startPath().contains("table"), r = t.endPath().contains("table"); n && r && t.checkBoundaryOfElement(n, CKEDITOR.START) && t.checkBoundaryOfElement(r, CKEDITOR.END) && (t = e.range.clone(), t.setStartBefore(n), t.setEndAfter(r), e.purgeTableBookmark = t.createBookmark()) } }, detectRanges: function (o, r) { var s, a, l = n(r, o.bookmark), c = l.clone(), d = l.getCommonAncestor(); d.is(CKEDITOR.dtd.$tableContent) && !d.is(i) && (d = d.getAscendant("table", !0)), a = d, d = new CKEDITOR.dom.elementPath(l.startContainer, a), a = new CKEDITOR.dom.elementPath(l.endContainer, a), d = d.contains("table"), a = a.contains("table"), (d || a) && (d && a && t(d, a) ? (o.tableSurroundingRange = c, c.setStartAt(d, CKEDITOR.POSITION_AFTER_END), c.setEndAt(a, CKEDITOR.POSITION_BEFORE_START), c = l.clone(), c.setEndAt(d, CKEDITOR.POSITION_AFTER_END), s = l.clone(), s.setStartAt(a, CKEDITOR.POSITION_BEFORE_START), s = e(c).concat(e(s))) : d ? a || (o.tableSurroundingRange = c, c.setStartAt(d, CKEDITOR.POSITION_AFTER_END), l.setEndAt(d, CKEDITOR.POSITION_AFTER_END)) : (o.tableSurroundingRange = c, c.setEndAt(a, CKEDITOR.POSITION_BEFORE_START), l.setStartAt(a, CKEDITOR.POSITION_AFTER_START)), o.tableContentsRanges = s ? s : e(l)) }, deleteRanges: function (e) { for (var t; t = e.tableContentsRanges.pop();)t.extractContents(), h(t.startContainer) && t.startContainer.appendBogus(); e.tableSurroundingRange && e.tableSurroundingRange.extractContents() }, purge: function (e) { if (e.purgeTableBookmark) { var t = e.doc, n = e.range.clone(), t = t.createElement("p"); t.insertBefore(e.purgeTableBookmark.startNode), n.moveToBookmark(e.purgeTableBookmark), n.deleteContents(), e.range.moveToPosition(t, CKEDITOR.POSITION_AFTER_START) } } } }(), detectExtractMerge: function (e) { return !(e.range.startPath().contains(CKEDITOR.dtd.$listItem) && e.range.endPath().contains(CKEDITOR.dtd.$listItem)) }, fixUneditableRangePosition: function (e) { e.startContainer.getDtd()["#"] || e.moveToClosestEditablePosition(null, !0) }, autoParagraph: function (e, t) { var n, i = t.startPath(); s(e, i.block, i.blockLimit) && (n = a(e)) && (n = t.document.createElement(n), n.appendBogus(), t.insertN
126ode(n), t.moveToPosition(n, CKEDITOR.POSITION_AFTER_START)) } } }()
127        }(), function () {
128            function e() { var e, t = this._.fakeSelection; if (t && (e = this.getSelection(1), e && e.isHidden() || (t.reset(), t = 0)), (t || (t = e || this.getSelection(1), t && t.getType() != CKEDITOR.SELECTION_NONE)) && (this.fire("selectionCheck", t), e = this.elementPath(), !e.compare(this._.selectionPreviousPath))) { var n = this._.selectionPreviousPath && this._.selectionPreviousPath.blockLimit.equals(e.blockLimit); CKEDITOR.env.webkit && !n && (this._.previousActive = this.document.getActive()), this._.selectionPreviousPath = e, this.fire("selectionChange", { selection: t, path: e }) } } function t() { h = !0, u || (n.call(this), u = CKEDITOR.tools.setTimeout(n, 200, this)) } function n() { u = null, h && (CKEDITOR.tools.setTimeout(e, 0, this), h = !1) } function i(e) { return !(!v(e) && (e.type != CKEDITOR.NODE_ELEMENT || e.is(CKEDITOR.dtd.$empty))) } function o(e) { function t(t, n) { return t && t.type != CKEDITOR.NODE_TEXT ? e.clone()["moveToElementEdit" + (n ? "End" : "Start")](t) : !1 } if (!(e.root instanceof CKEDITOR.editable)) return !1; var n = e.startContainer, o = e.getPreviousNode(i, null, n), r = e.getNextNode(i, null, n); return !(!t(o) && !t(r, 1) && (o || r || n.type == CKEDITOR.NODE_ELEMENT && n.isBlockBoundary() && n.getBogus())) } function r(e) { s(e, !1); var t = e.getDocument().createText(m); return e.setCustomData("cke-fillingChar", t), t } function s(e, t) { var n = e && e.removeCustomData("cke-fillingChar"); if (n) { if (!1 !== t) { var i = e.getDocument().getSelection().getNative(), o = i && "None" != i.type && i.getRangeAt(0), r = m.length; if (n.getLength() > r && o && o.intersectsNode(n.$)) { var s = [{ node: i.anchorNode, offset: i.anchorOffset }, { node: i.focusNode, offset: i.focusOffset }]; i.anchorNode == n.$ && i.anchorOffset > r && (s[0].offset -= r), i.focusNode == n.$ && i.focusOffset > r && (s[1].offset -= r) } } n.setText(a(n.getText(), 1)), s && (n = e.getDocument().$, i = n.getSelection(), n = n.createRange(), n.setStart(s[0].node, s[0].offset), n.collapse(!0), i.removeAllRanges(), i.addRange(n), i.extend(s[1].node, s[1].offset)) } } function a(e, t) {
129                return t ? e.replace(g, function (e, t) { return t ? "\xa0" : "" }) : e.replace(m, "");
130            } function l(e, t) { var n = CKEDITOR.dom.element.createFromHtml('<div data-cke-hidden-sel="1" data-cke-temp="1" style="' + (CKEDITOR.env.ie && 14 > CKEDITOR.env.version ? "display:none" : "position:fixed;top:0;left:-1000px") + '">' + (t || "&nbsp;") + "</div>", e.document); e.fire("lockSnapshot"), e.editable().append(n); var i = e.getSelection(1), o = e.createRange(), r = i.root.on("selectionchange", function (e) { e.cancel() }, null, null, 0); o.setStartAt(n, CKEDITOR.POSITION_AFTER_START), o.setEndAt(n, CKEDITOR.POSITION_BEFORE_END), i.selectRanges([o]), r.removeListener(), e.fire("unlockSnapshot"), e._.hiddenSelectionContainer = n } function c(e) { var t = { 37: 1, 39: 1, 8: 1, 46: 1 }; return function (n) { var i = n.data.getKeystroke(); if (t[i]) { var o = e.getSelection().getRanges(), r = o[0]; 1 == o.length && r.collapsed && (i = r[38 > i ? "getPreviousEditableNode" : "getNextEditableNode"]()) && i.type == CKEDITOR.NODE_ELEMENT && "false" == i.getAttribute("contenteditable") && (e.getSelection().fake(i), n.data.preventDefault(), n.cancel()) } } } function d(e) { for (var t = 0; t < e.length; t++) { var n = e[t]; if (n.getCommonAncestor().isReadOnly() && e.splice(t, 1), !n.collapsed) { if (n.startContainer.isReadOnly()) for (var i, o = n.startContainer; o && !((i = o.type == CKEDITOR.NODE_ELEMENT) && o.is("body") || !o.isReadOnly());)i && "false" == o.getAttribute("contentEditable") && n.setStartAfter(o), o = o.getParent(); o = n.startContainer, i = n.endContainer; var r = n.startOffset, s = n.endOffset, a = n.clone(); o && o.type == CKEDITOR.NODE_TEXT && (r >= o.getLength() ? a.setStartAfter(o) : a.setStartBefore(o)), i && i.type == CKEDITOR.NODE_TEXT && (s ? a.setEndAfter(i) : a.setEndBefore(i)), o = new CKEDITOR.dom.walker(a), o.evaluator = function (i) { if (i.type == CKEDITOR.NODE_ELEMENT && i.isReadOnly()) { var o = n.clone(); return n.setEndBefore(i), n.collapsed && e.splice(t--, 1), i.getPosition(a.endContainer) & CKEDITOR.POSITION_CONTAINS || (
130o.setStartAfter(i), o.collapsed || e.splice(t + 1, 0, o)), !0 } return !1 }, o.next() } } return e } var u, h, p = "function" != typeof window.getSelection, f = 1, m = CKEDITOR.tools.repeat("\u200b", 7), g = new RegExp(m + "( )?", "g"), v = CKEDITOR.dom.walker.invisible(1), E = function () { function e(e) { return function (t) { var n = t.editor.createRange(); return n.moveToClosestEditablePosition(t.selected, e) && t.editor.getSelection().selectRanges([n]), !1 } } function t(e) { return function (t) { var n, i = t.editor, o = i.createRange(); return (n = o.moveToClosestEditablePosition(t.selected, e)) || (n = o.moveToClosestEditablePosition(t.selected, !e)), n && i.getSelection().selectRanges([o]), i.fire("saveSnapshot"), t.selected.remove(), n || (o.moveToElementEditablePosition(i.editable()), i.getSelection().selectRanges([o])), i.fire("saveSnapshot"), !1 } } var n = e(), i = e(1); return { 37: n, 38: n, 39: i, 40: i, 8: t(), 46: t(1) } }(); CKEDITOR.on("instanceCreated", function (n) { function i() { var e = o.getSelection(); e && e.removeAllRanges() } var o = n.editor; o.on("contentDom", function () { function n() { a = new CKEDITOR.dom.selection(o.getSelection()), a.lock() } function i() { d.removeListener("mouseup", i), f.removeListener("mouseup", i); var e = CKEDITOR.document.$.selection, t = e.createRange(); "None" != e.type && t.parentElement().ownerDocument == l.$ && t.select() } var r, a, l = o.document, d = CKEDITOR.document, u = o.editable(), h = l.getBody(), f = l.getDocumentElement(), m = u.isInline(); if (CKEDITOR.env.gecko && u.attachListener(u, "focus", function (e) { e.removeListener(), 0 !== r && (e = o.getSelection().getNative()) && e.isCollapsed && e.anchorNode == u.$ && (e = o.createRange(), e.moveToElementEditStart(u), e.select()) }, null, null, -2), u.attachListener(u, CKEDITOR.env.webkit ? "DOMFocusIn" : "focus", function () { r && CKEDITOR.env.webkit && (r = o._.previousActive && o._.previousActive.equals(l.getActive())) && null != o._.previousScrollTop && o._.previousScrollTop != u.$.scrollTop && (u.$.scrollTop = o._.previousScrollTop), o.unlockSelection(r), r = 0 }, null, null, -1), u.attachListener(u, "mousedown", function () { r = 0 }), (CKEDITOR.env.ie || m) && (p ? u.attachListener(u, "beforedeactivate", n, null, null, -1) : u.attachListener(o, "selectionCheck", n, null, null, -1), u.attachListener(u, CKEDITOR.env.webkit ? "DOMFocusOut" : "blur", function () { o.lockSelection(a), r = 1 }, null, null, -1), u.attachListener(u, "mousedown", function () { r = 0 })), CKEDITOR.env.ie && !m) { var g; if (u.attachListener(u, "mousedown", function (e) { 2 == e.data.$.button && ((e = o.document.getSelection()) && e.getType() != CKEDITOR.SELECTION_NONE || (g = o.window.getScrollPosition())) }), u.attachListener(u, "mouseup", function (e) { 2 == e.data.$.button && g && (o.document.$.documentElement.scrollLeft = g.x, o.document.$.documentElement.scrollTop = g.y), g = null }), "BackCompat" != l.$.compatMode) { if (CKEDITOR.env.ie7Compat || CKEDITOR.env.ie6Compat) { var v, E; f.on("mousedown", function (e) { function t(e) { if (e = e.data.$, v) { var t = h.$.createTextRange(); try { t.moveToPoint(e.clientX, e.clientY) } catch (n) { } v.setEndPoint(0 > E.compareEndPoints("StartToStart", t) ? "EndToEnd" : "StartToStart", t), v.select() } } function n() { f.removeListener("mousemove", t), d.removeListener("mouseup", n), f.removeListener("mouseup", n), v.select() } if (e = e.data, e.getTarget().is("html") && e.$.y < f.$.clientHeight && e.$.x < f.$.clientWidth) { v = h.$.createTextRange(); try { v.moveToPoint(e.$.clientX, e.$.clientY) } catch (i) { } E = v.duplicate(), f.on("mousemove", t), d.on("mouseup", n), f.on("mouseup", n) } }) } 7 < CKEDITOR.env.version && 11 > CKEDITOR.env.version && f.on("mousedown", function (e) { e.data.getTarget().is("html") && (d.on("mouseup", i), f.on("mouseup", i)) }) } } if (u.attachListener(u, "selectionchange", e, o), u.attachListener(u, "keyup", t, o), u.attachListener(u, CKEDITOR.env.webkit ? "DOMFocusIn" : "focus", function () { o.forceNextSelectionCheck(), o.selectionChange(1) }), m && (CKEDITOR.env.webkit || CKEDITOR.env.gecko)) { var T; u.attachListener(u, "mousedown", function () { T = 1 }), u.attachListener(l.getDocumentElement(), "mouseup", function () { T && t.call(o), T = 0 }) } else u.attachListener(CKEDITOR.env.ie ? u : l.getDocumentElement(), "mouseup", t, o); CKEDITOR.env.webkit && u.attachListener(l, "keydown", function (e) { switch (e.data.getKey()) { case 13: case 33: case 34: case 35: case 36: case 37: case 39: case 8: case 45: case 46: s(u) } }, null, null, -1), u.attachListener(u, "keydown", c(o), null, null, -1) }), o.on("setData", function () { o.unlockSelection(), CKEDITOR.env.webkit && i() }), o.on("contentDomUnload", function () { o.unlockSelection() }), CKEDITOR.env.ie9Compat && o.on("beforeDestroy", i, null, null, 9), o.on("dataReady", function () { delete o._.fakeSelection, delete o._.hiddenSelectionContainer, o.selectionChange(1) }
130), o.on("loadSnapshot", function () { var e = CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_ELEMENT), t = o.editable().getLast(e); t && t.hasAttribute("data-cke-hidden-sel") && (t.remove(), CKEDITOR.env.gecko && (e = o.editable().getFirst(e)) && e.is("br") && e.getAttribute("_moz_editor_bogus_node") && e.remove()) }, null, null, 100), o.on("key", function (e) { if ("wysiwyg" == o.mode) { var t = o.getSelection(); if (t.isFake) { var n = E[e.data.keyCode]; if (n) return n({ editor: o, selected: t.getSelectedElement(), selection: t, keyEvent: e }) } } }) }), CKEDITOR.env.webkit && CKEDITOR.on("instanceReady", function (e) { var t = e.editor; t.on("selectionChange", function () { var e = t.editable(), n = e.getCustomData("cke-fillingChar"); n && (n.getCustomData("ready") ? s(e) : n.setCustomData("ready", 1)) }, null, null, -1), t.on("beforeSetMode", function () { s(t.editable()) }, null, null, -1), t.on("getSnapshot", function (e) { e.data && (e.data = a(e.data)) }, t, null, 20), t.on("toDataFormat", function (e) { e.data.dataValue = a(e.data.dataValue) }, null, null, 0) }), CKEDITOR.editor.prototype.selectionChange = function (n) { (n ? e : t).call(this) }, CKEDITOR.editor.prototype.getSelection = function (e) { return !this._.savedSelection && !this._.fakeSelection || e ? (e = this.editable()) && "wysiwyg" == this.mode ? new CKEDITOR.dom.selection(e) : null : this._.savedSelection || this._.fakeSelection }, CKEDITOR.editor.prototype.lockSelection = function (e) { return e = e || this.getSelection(1), e.getType() != CKEDITOR.SELECTION_NONE ? (!e.isLocked && e.lock(), this._.savedSelection = e, !0) : !1 }, CKEDITOR.editor.prototype.unlockSelection = function (e) { var t = this._.savedSelection; return t ? (t.unlock(e), delete this._.savedSelection, !0) : !1 }, CKEDITOR.editor.prototype.forceNextSelectionCheck = function () { delete this._.selectionPreviousPath }, CKEDITOR.dom.document.prototype.getSelection = function () { return new CKEDITOR.dom.selection(this) }, CKEDITOR.dom.range.prototype.select = function () { var e = this.root instanceof CKEDITOR.editable ? this.root.editor.getSelection() : new CKEDITOR.dom.selection(this.root); return e.selectRanges([this]), e }, CKEDITOR.SELECTION_NONE = 1, CKEDITOR.SELECTION_TEXT = 2, CKEDITOR.SELECTION_ELEMENT = 3, CKEDITOR.dom.selection = function (e) { if (e instanceof CKEDITOR.dom.selection) { var t = e; e = e.root } var n = e instanceof CKEDITOR.dom.element; if (this.rev = t ? t.rev : f++, this.document = e instanceof CKEDITOR.dom.document ? e : e.getDocument(), this.root = n ? e : this.document.getBody(), this.isLocked = 0, this._ = { cache: {} }, t) return CKEDITOR.tools.extend(this._.cache, t._.cache), this.isFake = t.isFake, this.isLocked = t.isLocked, this; e = this.getNative(); var i, o; if (e) if (e.getRangeAt) i = (o = e.rangeCount && e.getRangeAt(0)) && new CKEDITOR.dom.node(o.commonAncestorContainer); else { try { o = e.createRange() } catch (r) { } i = o && CKEDITOR.dom.element.get(o.item && o.item(0) || o.parentElement()) } return (!i || i.type != CKEDITOR.NODE_ELEMENT && i.type != CKEDITOR.NODE_TEXT || !this.root.equals(i) && !this.root.contains(i)) && (this._.cache.type = CKEDITOR.SELECTION_NONE, this._.cache.startElement = null, this._.cache.selectedElement = null, this._.cache.selectedText = "", this._.cache.ranges = new CKEDITOR.dom.rangeList), this }; var T = { img: 1, hr: 1, li: 1, table: 1, tr: 1, td: 1, th: 1, embed: 1, object: 1, ol: 1, ul: 1, a: 1, input: 1, form: 1, select: 1, textarea: 1, button: 1, fieldset: 1, thead: 1, tfoot: 1 }; CKEDITOR.tools.extend(CKEDITOR.dom.selection, { _removeFillingCharSequenceString: a, _createFillingCharSequenceNode: r, FILLING_CHAR_SEQUENCE: m }), CKEDITOR.dom.selection.prototype = { getNative: function () { return void 0 !== this._.cache.nativeSel ? this._.cache.nativeSel : this._.cache.nativeSel = p ? this.document.$.selection : this.document.getWindow().$.getSelection() }, getType: p ? function () { var e = this._.cache; if (e.type) return e.type; var t = CKEDITOR.SELECTION_NONE; try { var n = this.getNative(), i = n.type;
130 "Text" == i && (t = CKEDITOR.SELECTION_TEXT), "Control" == i && (t = CKEDITOR.SELECTION_ELEMENT), n.createRange().parentElement() && (t = CKEDITOR.SELECTION_TEXT) } catch (o) { } return e.type = t } : function () { var e = this._.cache; if (e.type) return e.type; var t = CKEDITOR.SELECTION_TEXT, n = this.getNative(); if (n && n.rangeCount) { if (1 == n.rangeCount) { var n = n.getRangeAt(0), i = n.startContainer; i == n.endContainer && 1 == i.nodeType && 1 == n.endOffset - n.startOffset && T[i.childNodes[n.startOffset].nodeName.toLowerCase()] && (t = CKEDITOR.SELECTION_ELEMENT) } } else t = CKEDITOR.SELECTION_NONE; return e.type = t }, getRanges: function () { var e = p ? function () { function e(e) { return new CKEDITOR.dom.node(e).getIndex() } var t = function (t, n) { t = t.duplicate(), t.collapse(n); var i = t.parentElement(); if (!i.hasChildNodes()) return { container: i, offset: 0 }; for (var o, r, s, a, l = i.children, c = t.duplicate(), d = 0, u = l.length - 1, h = -1; u >= d;)if (h = Math.floor((d + u) / 2), o = l[h], c.moveToElementText(o), s = c.compareEndPoints("StartToStart", t), s > 0) u = h - 1; else { if (!(0 > s)) return { container: i, offset: e(o) }; d = h + 1 } if (-1 == h || h == l.length - 1 && 0 > s) { if (c.moveToElementText(i), c.setEndPoint("StartToStart", t), c = c.text.replace(/(\r\n|\r)/g, "\n").length, l = i.childNodes, !c) return o = l[l.length - 1], o.nodeType != CKEDITOR.NODE_TEXT ? { container: i, offset: l.length } : { container: o, offset: o.nodeValue.length }; for (i = l.length; c > 0 && i > 0;)r = l[--i], r.nodeType == CKEDITOR.NODE_TEXT && (a = r, c -= r.nodeValue.length); return { container: a, offset: -c } } if (c.collapse(s > 0), c.setEndPoint(s > 0 ? "StartToStart" : "EndToStart", t), c = c.text.replace(/(\r\n|\r)/g, "\n").length, !c) return { container: i, offset: e(o) + (s > 0 ? 0 : 1) }; for (; c > 0;)try { r = o[s > 0 ? "previousSibling" : "nextSibling"], r.nodeType == CKEDITOR.NODE_TEXT && (c -= r.nodeValue.length, a = r), o = r } catch (p) { return { container: i, offset: e(o) } } return { container: a, offset: s > 0 ? -c : a.nodeValue.length + c } }; return function () { var e = this.getNative(), n = e && e.createRange(), i = this.getType(); if (!e) return []; if (i == CKEDITOR.SELECTION_TEXT) return e = new CKEDITOR.dom.range(this.root), i = t(n, !0), e.setStart(new CKEDITOR.dom.node(i.container), i.offset), i = t(n), e.setEnd(new CKEDITOR.dom.node(i.container), i.offset), e.endContainer.getPosition(e.startContainer) & CKEDITOR.POSITION_PRECEDING && e.endOffset <= e.startContainer.getIndex() && e.collapse(), [e]; if (i == CKEDITOR.SELECTION_ELEMENT) { for (var i = [], o = 0; o < n.length; o++) { for (var r = n.item(o), s = r.parentNode, a = 0, e = new CKEDITOR.dom.range(this.root); a < s.childNodes.length && s.childNodes[a] != r; a++); e.setStart(new CKEDITOR.dom.node(s), a), e.setEnd(new CKEDITOR.dom.node(s), a + 1), i.push(e) } return i } return [] } }() : function () { var e, t = [], n = this.getNative(); if (!n) return t; for (var i = 0; i < n.rangeCount; i++) { var o = n.getRangeAt(i); e = new CKEDITOR.dom.range(this.root), e.setStart(new CKEDITOR.dom.node(o.startContainer), o.startOffset), e.setEnd(new CKEDITOR.dom.node(o.endContainer), o.endOffset), t.push(e) } return t }; return function (t) { var n = this._.cache, i = n.ranges; return i || (n.ranges = i = new CKEDITOR.dom.rangeList(e.call(this))), t ? d(new CKEDITOR.dom.rangeList(i.slice())) : i } }(), getStartElement: function () { var e = this._.cache; if (void 0 !== e.startElement) return e.startElement; var t; switch (this.getType()) { case CKEDITOR.SELECTION_ELEMENT: return this.getSelectedElement(); case CKEDITOR.SELECTION_TEXT: var n = this.getRanges()[0]; if (n) { if (n.collapsed) t = n.startContainer, t.type != CKEDITOR.NODE_ELEMENT && (t = t.getParent()); else { for (n.optimize(); t = n.startContainer, n.startOffset == (t.getChildCount ? t.getChildCount() : t.getLength()) && !t.isBlockBoundary();)n.setStartAfter(t); if (t = n.startContainer, t.type != CKEDITOR.NODE_ELEMENT) return t.getParent(); if ((t = t.getChild(n.startOffset)) && t.type == CKEDITOR.NODE_ELEMENT) for (n = t.getFirst(); n && n.type == CKEDITOR.NODE_ELEMENT;)t = n, n = n.getFirst(); else t = n.startContainer } t = t.$ } }return e.startElement = t ? new CKEDITOR.dom.element(t) : null }, getSelectedElement: function () { var e = this._.cache; if (void 0 !== e.selectedElement) return e.selectedElement; var t = this, n = CKEDITOR.tools.tryThese(function () { return t.getNative().createRange().item(0) }, function () { for (var e, n, i = t.getRanges()[0].clone(), o = 2; o && !((e = i.getEnclosedNode()) && e.type == CKEDITOR.NODE_ELEMENT && T[e.getName()] && (n = e)); o--)i.shrink(CKEDITOR.SHRINK_ELEMENT); return n && n.$ }); return e.selectedElement = n ? new CKEDITOR.dom.element(n) : null }, getSelectedText: function () { var e = this._.cache; if (void 0 !== e.selectedText) return e.selectedText; var t = this.getNative(), t = p ? "Control" == t.type ? "" : t.createRange().text : t.toString(); return e.selectedText = t }
130, lock: function () { this.getRanges(), this.getStartElement(), this.getSelectedElement(), this.getSelectedText(), this._.cache.nativeSel = null, this.isLocked = 1 }, unlock: function (e) { if (this.isLocked) { if (e) var t = this.getSelectedElement(), n = !t && this.getRanges(), i = this.isFake; this.isLocked = 0, this.reset(), e && (e = t || n[0] && n[0].getCommonAncestor()) && e.getAscendant("body", 1) && (i ? this.fake(t) : t ? this.selectElement(t) : this.selectRanges(n)) } }, reset: function () { this._.cache = {}, this.isFake = 0; var e = this.root.editor; if (e && e._.fakeSelection) if (this.rev == e._.fakeSelection.rev) { delete e._.fakeSelection; var t = e._.hiddenSelectionContainer; if (t) { var n = e.checkDirty(); e.fire("lockSnapshot"), t.remove(), e.fire("unlockSnapshot"), !n && e.resetDirty() } delete e._.hiddenSelectionContainer } else CKEDITOR.warn("selection-fake-reset"); this.rev = f++ }, selectElement: function (e) { var t = new CKEDITOR.dom.range(this.root); t.setStartBefore(e), t.setEndAfter(e), this.selectRanges([t]) }, selectRanges: function (e) { var t = this.root.editor, t = t && t._.hiddenSelectionContainer; if (this.reset(), t) for (var n, t = this.root, i = 0; i < e.length; ++i)n = e[i], n.endContainer.equals(t) && (n.endOffset = Math.min(n.endOffset, t.getChildCount())); if (e.length) if (this.isLocked) { var a = CKEDITOR.document.getActive(); this.unlock(), this.selectRanges(e), this.lock(), a && !a.equals(this.root) && a.focus() } else { var l, c, d; if (1 == e.length && !(d = e[0]).collapsed && (l = d.getEnclosedNode()) && l.type == CKEDITOR.NODE_ELEMENT && (d = d.clone(), d.shrink(CKEDITOR.SHRINK_ELEMENT, !0), (c = d.getEnclosedNode()) && c.type == CKEDITOR.NODE_ELEMENT && (l = c), "false" == l.getAttribute("contenteditable")) || (l = void 0), l) this.fake(l); else { if (p) { d = CKEDITOR.dom.walker.whitespaces(!0), c = /\ufeff|\u00a0/, t = { table: 1, tbody: 1, tr: 1 }, 1 < e.length && (l = e[e.length - 1], e[0].setEnd(l.endContainer, l.endOffset)), l = e[0], e = l.collapsed; var u, h, f; if ((n = l.getEnclosedNode()) && n.type == CKEDITOR.NODE_ELEMENT && n.getName() in T && (!n.is("a") || !n.getText())) try { return f = n.$.createControlRange(), f.addElement(n.$), void f.select() } catch (m) { } (l.startContainer.type == CKEDITOR.NODE_ELEMENT && l.startContainer.getName() in t || l.endContainer.type == CKEDITOR.NODE_ELEMENT && l.endContainer.getName() in t) && (l.shrink(CKEDITOR.NODE_ELEMENT, !0), e = l.collapsed), f = l.createBookmark(), t = f.startNode, e || (a = f.endNode), f = l.document.$.body.createTextRange(), f.moveToElementText(t.$), f.moveStart("character", 1), a ? (c = l.document.$.body.createTextRange(), c.moveToElementText(a.$), f.setEndPoint("EndToEnd", c), f.moveEnd("character", -1)) : (u = t.getNext(d), h = t.hasAscendant("pre"), u = !(u && u.getText && u.getText().match(c)) && (h || !t.hasPrevious() || t.getPrevious().is && t.getPrevious().is("br")), h = l.document.createElement("span"), h.setHtml("&#65279;"), h.insertBefore(t), u && l.document.createText("\ufeff").insertBefore(t)), l.setStartBefore(t), t.remove(), e ? (u ? (f.moveStart("character", -1), f.select(), l.document.$.selection.clear()) : f.select(), l.moveToPosition(h, CKEDITOR.POSITION_BEFORE_START), h.remove()) : (l.setEndBefore(a), a.remove(), f.select()) } else { if (a = this.getNative(), !a) return; for (this.removeAllRanges(), f = 0; f < e.length; f++)if (f < e.length - 1 && (u = e[f], h = e[f + 1], c = u.clone(), c.setStart(u.endContainer, u.endOffset), c.setEnd(h.startContainer, h.startOffset), !c.collapsed && (c.shrink(CKEDITOR.NODE_ELEMENT, !0), l = c.getCommonAncestor(), c = c.getEnclosedNode(), l.isReadOnly() || c && c.isReadOnly()))) h.setStart(u.startContainer, u.startOffset), e.splice(f--, 1); else { l = e[f], h = this.document.$.createRange(), l.collapsed && CKEDITOR.env.webkit && o(l) && (c = r(this.root), l.insertNode(c), (u = c.getNext()) && !c.getPrevious() && u.type == CKEDITOR.NODE_ELEMENT && "br" == u.getName() ? (s(this.root), l.moveToPosition(u, CKEDITOR.POSITION_BEFORE_START)) : l.moveToPosition(c, CKEDITOR.POSITION_AFTER_END)), h.setStart(l.startContainer.$, l.startOffset); try { h.setEnd(l.endContainer.$, l.endOffset) } catch (g) { if (!(0 <= g.toString().indexOf("NS_ERROR_ILLEGAL_VALUE"))) throw g; l.collapse(1), h.setEnd(l.endContainer.$, l.endOffset) } a.addRange(h) } } this.reset(), this.root.fire("selectionchange") } } }, fake: function (e, t) { var n = this.root.editor; void 0 === t && e.hasAttribute("aria-label") && (t = e.getAttribute("aria-label")), this.reset(), l(n, t); var i = this._.cache, o = new CKEDITOR.dom.range(this.root); o.setStartBefore(e), o.setEndAfter(e), i.ranges = new CKEDITOR.dom.rangeList(o), i.selectedElement = i.startElement = e, i.type = CKEDITOR.SELECTION_ELEMENT, i.selectedText = i.nativeSel = null, this.isFake = 1, this.rev = f++, n._.fakeSelection = this, this.root.fire("selectionchange") }, isHidden: function () { var e = this.getCommonAncestor(); return e && e.type == CKEDITOR.NODE_TEXT && (e = e.getParent()), !(!e || !e.data("cke-hidden-sel")) }, createBookmarks: function (e) { return e = this.getRanges().createBookmarks(e), this.isFake && (e.isFake = 1), e }, createBookmarks2: function (e) { return e = this.getRanges().createBookmarks2(e), this.isFake && (e.isFake = 1), e }, selectBookmarks: function (e) { for (var t, n = [], i = 0; i < e.length; i++) { var o = new CKEDITOR.dom.range(this.root); o.moveToBookmark(e[i]), n.push(o) } return e.isFake && (t = n[0].getEnclosedNode(), t && t.type == CKEDITOR.NODE_ELEMENT || (CKEDITOR.warn("selection-not-fake"), e.
130isFake = 0)), e.isFake ? this.fake(t) : this.selectRanges(n), this }, getCommonAncestor: function () { var e = this.getRanges(); return e.length ? e[0].startContainer.getCommonAncestor(e[e.length - 1].endContainer) : null }, scrollIntoView: function () { this.type != CKEDITOR.SELECTION_NONE && this.getRanges()[0].scrollIntoView() }, removeAllRanges: function () { if (this.getType() != CKEDITOR.SELECTION_NONE) { var e = this.getNative(); try { e && e[p ? "empty" : "removeAllRanges"]() } catch (t) { } this.reset() } } }
131        }(), CKEDITOR.STYLE_BLOCK = 1, CKEDITOR.STYLE_INLINE = 2, CKEDITOR.STYLE_OBJECT = 3, function () {
132            function e(e, t) { for (var n, i; (e = e.getParent()) && !e.equals(t);)if (e.getAttribute("data-nostyle")) n = e; else if (!i) { var o = e.getAttribute("contentEditable"); "false" == o ? n = e : "true" == o && (i = 1) } return n } function t(e, t, n, i) { return (e.getPosition(t) | i) == i && (!n.childRule || n.childRule(e)) } function n(i) { var r = i.document; if (i.collapsed) r = v(this, r), i.insertNode(r), i.moveToPosition(r, CKEDITOR.POSITION_BEFORE_END); else { var s, a = this.element, l = this._.definition, c = l.ignoreReadonly, d = c || l.includeReadonly; null == d && (d = i.root.getCustomData("cke_includeReadonly")); var u = CKEDITOR.dtd[a]; u || (s = !0, u = CKEDITOR.dtd.span), i.enlarge(CKEDITOR.ENLARGE_INLINE, 1), i.trim(); var h, p = i.createBookmark(), m = p.startNode, g = p.endNode, E = m; if (!c) { var T = i.getCommonAncestor(), c = e(m, T), T = e(g, T); c && (E = c.getNextSourceNode(!0)), T && (g = T) } for (E.getPosition(g) == CKEDITOR.POSITION_FOLLOWING && (E = 0); E;) { if (c = !1, E.equals(g)) E = null, c = !0; else { var y = E.type == CKEDITOR.NODE_ELEMENT ? E.getName() : null, T = y && "false" == E.getAttribute("contentEditable"), b = y && E.getAttribute("data-nostyle"); if (y && E.data("cke-bookmark")) { E = E.getNextSourceNode(!0); continue } if (T && d && CKEDITOR.dtd.$block[y]) for (var C = E, _ = o(C), I = void 0, O = _.length, D = 0, C = O && new CKEDITOR.dom.range(C.getDocument()); O > D; ++D) { var I = _[D], R = CKEDITOR.filter.instances[I.data("cke-filter")]; (R ? R.check(this) : 1) && (C.selectNodeContents(I), n.call(this, C)) } if (_ = y ? !u[y] || b ? 0 : T && !d ? 0 : t(E, g, l, x) : 1) { if (I = E.getParent(), _ = l, O = a, D = s, !I || !(I.getDtd() || CKEDITOR.dtd.span)[O] && !D || _.parentRule && !_.parentRule(I)) c = !0; else if (h || y && CKEDITOR.dtd.$removeEmpty[y] && (E.getPosition(g) | x) != x || (h = i.clone(), h.setStartBefore(E)), y = E.type, y == CKEDITOR.NODE_TEXT || T || y == CKEDITOR.NODE_ELEMENT && !E.getChildCount()) { for (var w, y = E; (c = !y.getNext(k)) && (w = y.getParent(), u[w.getName()]) && t(w, m, l, K);)y = w; h.setEndAfter(y) } } else c = !0; E = E.getNextSourceNode(b || T) } if (c && h && !h.collapsed) { for (var S, N, A, c = v(this, r), T = c.hasAttributes(), b = h.getCommonAncestor(), y = {}, _ = {}, I = {}, O = {}; c && b;) { if (b.getName() == a) { for (S in l.attributes) !O[S] && (A = b.getAttribute(N)) && (c.getAttribute(S) == A ? _[S] = 1 : O[S] = 1); for (N in l.styles) !I[N] && (A = b.getStyle(N)) && (c.getStyle(N) == A ? y[N] = 1 : I[N] = 1) } b = b.getParent() } for (S in _) c.removeAttribute(S); for (N in y) c.removeStyle(N); T && !c.hasAttributes() && (c = null), c ? (h.extractContents().appendTo(c), h.insertNode(c), f.call(this, c), c.mergeSiblings(), CKEDITOR.env.ie || c.$.normalize()) : (c = new CKEDITOR.dom.element("span"), h.extractContents().appendTo(c), h.insertNode(c), f.call(this, c), c.remove(!0)), h = null } } i.moveToBookmark(p), i.shrink(CKEDITOR.SHRINK_TEXT), i.shrink(CKEDITOR.NODE_ELEMENT, !0) } } function i(e) { function t() { for (var e = new CKEDITOR.dom.elementPath(i.getParent()), t = new CKEDITOR.dom.elementPath(c.getParent()), n = null, o = null, r = 0; r < e.elements.length; r++) { var s = e.elements[r]; if (s == e.block || s == e.blockLimit) break; d.checkElementRemovable(s, !0) && (n = s) } for (r = 0; r < t.elements.length && (s = t.elements[r], s != t.block && s != t.blockLimit); r++)d.checkElementRemovable(s, !0) && (o = s); o && c.breakParent(o), n && i.breakParent(n) } e.enlarge(CKEDITOR.ENLARGE_INLINE, 1); var n = e.createBookmark(), i = n.startNode; if (e.collapsed) { for (var o, r, s = new CKEDITOR.dom.elementPath(i.getParent(), e.root), a = 0; a < s.elements.length && (r = s.elements[a]) && r != s.block && r != s.blockLimit; a++)if (this.checkElementRemovable(r)) { var l; e.collapsed && (e.checkBoundaryOfElement(r, CKEDITOR.END) || (l = e.checkBoundaryOfElement(r, CKEDITOR.START))) ? (o = r, o.match = l ? "start" : "end") : (r.mergeSiblings(), r.is(this.element) ? p.call(this, r) : m(r, y(this)[r.getName()])) } if (o) { for (r = i, a = 0; l = s.elements[a], !l.equals(o); a++)l.match || (l = l.clone(), l.append(r), r = l); r["start" == o.match ? "insertBefore" : "insertAfter"](o) } } else { var c = n.endNode, d = this; for (t(), s = i; !s.equals(c);)o = s.getNextSourceNode(), s.type == CKEDITOR.NODE_ELEMENT && this.checkElementRemovable(s) && (s.getName() == this.element ? p.call(this, s) : m(s, y(this)[s.getName()]), o.type == CKEDITOR.NODE_ELEMENT && o.contains(i) && (t(), o = i.getNext())), s = o } e.moveToBookmark(n), e.shrink(CKEDITOR.NODE_ELEMENT, !0) } function o(e) { var t = []; return e.forEach(function (e) { return "true" == e.getAttribute("contenteditable") ? (t.push(e), !1) : void 0 }, CKEDITOR.NODE_ELEMENT, !0), t } function r(e) { var t = e.getEnclosedNode() || e.getCommonAncestor(!1, !0); (e = new CKEDITOR.dom.elementPath(t, e.root).contains(this.element, 1)) && !e.isReadOnly() && E(e, this) } function s(e) { var t = e.getCommonAncestor(!0, !0); if (e = new CKEDITOR.dom.elementPath(t, e.root).contains(this.element, 1)) { var t = this._.definition, n = t.attributes; if (n) for (var i in n) e.removeAttribute(i, n[i]); if (t.styles) for (var o in t.styles) t.styles.hasOwnProperty(o) && e.removeStyle(o) } } function a(e) { var t = e.createBookmark(!0), n = e.createIterator(); n.enforceRealBlocks = !0, this._.enterMode && (n.enlargeBr = this._.enterMode != CKEDITOR.ENTER_BR); for (var i, o, r = e.document; i = n.getNextParagraph();)!i.isReadOnly() && (n.activeFilter ? n.activeFilter.check(this) : 1) && (o = v(this, r, i), c(i, o)); e.moveToBookmark(t) } function l(e) { var t = e.createBookmark(1), n = e.createIterator(); n.enforceRealBlocks = !0, n.enlargeBr = this._.enterMode != CKEDITOR.ENTER_BR; for (var i, o; i = n.getNextParagraph();)this.checkElementRemovable(i) && (i.is("pre") ? ((o = this._.enterMode == CKEDITOR.ENTER_BR ? null : e.document.createElement(this._.enterMode == CKEDITOR.ENTER_P ? "p" : "div")) && i.copyAttributes(o), c(i, o)) : p.call(this, i)); e.moveToBookmark(t) } function c(e, t) { var n = !t; n && (t = e.getDocument().createElement("div"), e.copyAttributes(t)); var i = t && t.is("pre"), o = e.is("pre"), r = !i && o; if (i && !o) { if (o = t, (r = e.getBogus()) && r.remove(), r = e.getHtml(), r = u(r, /(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g, ""), r = r.replace(/[ \t\r\n]*(<br[^>]*>)[ \t\r\n]*/gi, "$1"), r = r.replace(/([ \t\n\r]+|&nbsp;)/g, " "), r = r.replace(/<br\b[^>]*>/gi, "\n"), CKEDITOR.env.ie) { var s = e.getDocument().createElement("div"); s.append(o), o.$.outerHTML = "<pre>" + r + "</pre>", o.copyAttributes(s.getFirst()), o = s.getFirst().remove() } else o.setHtml(r); t = o } else r ? t = h(n ? [e.getHtml()] : d(e), t) : e.moveChildren(t); if (t.replace(e), i) { var a, n = t; (a = n.getPrevious(w)) && a.type == CKEDITOR.NODE_ELEMENT && a.is("pre") && (i = u(a.getHtml(), /\n$/, "") + "\n\n" + u(n.getHtml(), /^\n/, ""), CKEDITOR.env.ie ? n.$.outerHTML = "<pre>" + i + "</pre>" : n.setHtml(i), a.remove()) } else n && g(t) } function d(e) { var t = []; return u(e.getOuterHtml(), /(\S\s*)\n(?:\s|(<span[^>]+data-cke-bookmark.*?\/span>))*\n(?!$)/gi, function (e, t, n) { return t + "</pre>" + n + "<pre>" }).replace(/<pre\b.*?>([\s\S]*?)<\/pre>/gi, function (e, n) { t.push(n) }), t } function u(e, t, n) { var i = "", o = ""; return e = e.replace(/(^<span[^>]+data-cke-bookmark.*?\/span>)|(<span[^>]+data-cke-bookmark.*?\/span>$)/gi, function (e, t, n) { return t && (i = t), n && (o = n), "" }), i + e.replace(t, n) + o } function h(e, t) { var n; 1 < e.length && (n = new CKEDITOR.dom.documentFragment(t.getDocument())); for (var i = 0; i < e.length; i++) { var o = e[i], o = o.replace(/(\r\n|\r)/g, "\n"), o = u(o, /^[ \t]*\n/, ""), o = u(o, /\n$/, ""), o = u(o, /^[ \t]+|[ \t]+$/g, function (e, t) { return 1 == e.length ? "&nbsp;" : t ? " " + CKEDITOR.tools.repeat("&nbsp;", e.length - 1) : CKEDITOR.tools.repeat("&nbsp;", e.length - 1) + " " }), o = o.replace(/\n/g, "<br>"), o = o.replace(/[ \t]{2,}/g, function (e) { return CKEDITOR.tools.repeat("&nbsp;", e.length - 1) + " " }); if (n) { var r = t.clone(); r.setHtml(o), n.append(r) } else t.setHtml(o) } return n || t } function p(e, t) { var n, i = this._.definition, o = i.attributes, i = i.styles, r = y(this)[e.getName()], s = CKEDITOR.tools.isEmpty(o) && CKEDITOR.tools.isEmpty(i); for (n in o) ("class" != n && !this._.definition.fullMatch || e.getAttribute(n) == b(n, o[n])) && (t && "data-" == n.slice(0, 5) || (s = e.hasAttribute(n), e.removeAttribute(n))); for (var a in i) this._.definition.fullMatch && e.getStyle(a) != b(a, i[a], !0) || (s = s || !!e.getStyle(a), e.removeStyle(a)); m(e, r, I[e.getName()]), s && (this._.definition.alwaysRemoveElement ? g(e, 1) : !CKEDITOR.dtd.$block[e.getName()] || this._.enterMode == CKEDITOR.ENTER_BR && !e.hasAttributes() ? g(e) : e.renameNode(this._.enterMode == CKEDITOR.ENTER_P ? "p" : "div")) } function f(e) { for (var t, n = y(this), i = e.getElementsByTag(this.element), o = i.count(); 0 <= --o;)t = i.getItem(o), t.isReadOnly() || p.call(this, t, !0); for (var r in n) if (r != this.element) for (i = e.getElementsByTag(r), o = i.count() - 1; o >= 0; o--)t = i.getItem(o), t.isReadOnly() || m(t, n[r]) } function m(e, t, n) { if (t = t && t.attributes) for (var i = 0; i < t.length; i++) { var o, r = t[i][0]; if (o = e.getAttribute(r)) { var s = t[i][1]; (null === s || s.test && s.test(o) || "string" == typeof s && o == s) && e.removeAttribute(r) } } n || g(e) } function g(e, t) { if (!e.hasAttributes() || t) if (CKEDITOR.dtd.$block[e.getName()]) { var n = e.getPrevious(w), i = e.getNext(w); !n || n.type != CKEDITOR.NODE_TEXT && n.isBlockBoundary({ br: 1 }) || e.append("br", 1), !i || i.type != CKEDITOR.NODE_TEXT && i.isBlockBoundary({ br: 1 }) || e.append("br"), e.remove(!0) } else n = e.getFirst(), i = e.getLast(), e.remove(!0), n && (n.type == CKEDITOR.NODE_ELEMENT && n.mergeSiblings(), i && !n.equals(i) && i.type == CKEDITOR.NODE_ELEMENT && i.mergeSiblings()) } function v(e, t, n) { var i; return i = e.element, "*" == i && (i = "span"), i = new CKEDITOR.dom.element(i, t), n && n.copyAttributes(i), i = E(i, e), t.getCustomData("doc_processing_style") && i.hasAttribute("id") ? i.removeAttribute("id") : t.setCustomData("doc_processing_style", 1), i } function E(e, t) { var n = t._.definition, i = n.attributes, n = CKEDITOR.style.getStyleText(n); if (i) for (var o in i) e.setAttribute(o, i[o]); return n && e.setAttribute("style", n), e } function T(e, t) { for (var n in e) e[n] = e[n].replace(R, function (e, n) { return t[n] }) } function y(e) { if (e._.overrides) return e._.overrides; var t = e._.overrides = {}, n = e._.definition.overrides; if (n) { CKEDITOR.tools.isArray(n) || (n = [n]); for (var i = 0; i < n.length; i++) { var o, r, s = n[i]; if ("string" == typeof s ? o = s.toLowerCase() : (o = s.element ? s.element.toLowerCase() : e.element, r = s.attributes), s = t[o] || (t[o] = {}), r) { var a, s = s.attributes = s.attributes || []; for (a in r) s.push([a.toLowerCase(), r[a]]) } } } return t } function b(e, t, n) { var i = new CKEDITOR.dom.element("span"); return i[n ? "setStyle" : "setAttribute"](e, t), i[n ? "getStyle" : "getAttribute"](e) } function C(e, t) { function n(e, t) { return "font-family" == t.toLowerCase() ? e.replace(/["']/g, "") : e } "string" == typeof e && (e = CKEDITOR.tools.parseCssText(e)), "string" == typeof t && (t = CKEDITOR.tools.parseCssText(t, !0)); for (var i in e) if (!(i in t) || n(t[i], i) != n(e[i], i) && "inherit" != e[i] && "inherit" != t[i]) return !1; return !0 } function _(e, t, n) { var i = e.document, o = e.getRanges(); t = t ? this.removeFromRange : this.applyToRange; for (var r, s = o.createIterator(); r = s.getNextRange();)t.call(this, r, n); e.selectRanges(o), i.removeCustomData("doc_processing_style") } var I = { address: 1, div: 1, h1: 1, h2: 1, h3: 1, h4: 1, h5: 1, h6: 1, p: 1, pre: 1, section: 1, header: 1, footer: 1, nav: 1, article: 1, aside: 1, figure: 1, dialog: 1, hgroup: 1, time: 1, meter: 1, menu: 1, command: 1, keygen: 1, output: 1, progress: 1, details: 1, datagrid: 1, datalist: 1 }, O = { a: 1, blockquote: 1, embed: 1, hr: 1, img: 1, li: 1, object: 1, ol: 1, table: 1, td: 1, tr: 1, th: 1, ul: 1, dl: 1, dt: 1, dd: 1, form: 1, audio: 1, video: 1 }, D = /\s*(?:;\s*|$)/, R = /#\((.+?)\)/g, k = CKEDITOR.dom.walker.bookmark(0, 1), w = CKEDITOR.dom.walker.whitespace
132s(1); CKEDITOR.style = function (e, t) { if ("string" == typeof e.type) return new CKEDITOR.style.customHandlers[e.type](e); var n = e.attributes; n && n.style && (e.styles = CKEDITOR.tools.extend({}, e.styles, CKEDITOR.tools.parseCssText(n.style)), delete n.style), t && (e = CKEDITOR.tools.clone(e), T(e.attributes, t), T(e.styles, t)), n = this.element = e.element ? "string" == typeof e.element ? e.element.toLowerCase() : e.element : "*", this.type = e.type || (I[n] ? CKEDITOR.STYLE_BLOCK : O[n] ? CKEDITOR.STYLE_OBJECT : CKEDITOR.STYLE_INLINE), "object" == typeof this.element && (this.type = CKEDITOR.STYLE_OBJECT), this._ = { definition: e } }, CKEDITOR.style.prototype = {
133                apply: function (e) { if (e instanceof CKEDITOR.dom.document) return _.call(this, e.getSelection()); if (this.checkApplicable(e.elementPath(), e)) { var t = this._.enterMode; t || (this._.enterMode = e.activeEnterMode), _.call(this, e.getSelection(), 0, e), this._.enterMode = t } }, remove: function (e) { if (e instanceof CKEDITOR.dom.document) return _.call(this, e.getSelection(), 1); if (this.checkApplicable(e.elementPath(), e)) { var t = this._.enterMode; t || (this._.enterMode = e.activeEnterMode), _.call(this, e.getSelection(), 1, e), this._.enterMode = t } }, applyToRange: function (e) { return this.applyToRange = this.type == CKEDITOR.STYLE_INLINE ? n : this.type == CKEDITOR.STYLE_BLOCK ? a : this.type == CKEDITOR.STYLE_OBJECT ? r : null, this.applyToRange(e) }, removeFromRange: function (e) { return this.removeFromRange = this.type == CKEDITOR.STYLE_INLINE ? i : this.type == CKEDITOR.STYLE_BLOCK ? l : this.type == CKEDITOR.STYLE_OBJECT ? s : null, this.removeFromRange(e) }, applyToObject: function (e) { E(e, this) }, checkActive: function (e, t) { switch (this.type) { case CKEDITOR.STYLE_BLOCK: return this.checkElementRemovable(e.block || e.blockLimit, !0, t); case CKEDITOR.STYLE_OBJECT: case CKEDITOR.STYLE_INLINE: for (var n, i = e.elements, o = 0; o < i.length; o++)if (n = i[o], this.type != CKEDITOR.STYLE_INLINE || n != e.block && n != e.blockLimit) { if (this.type == CKEDITOR.STYLE_OBJECT) { var r = n.getName(); if (!("string" == typeof this.element ? r == this.element : r in this.element)) continue } if (this.checkElementRemovable(n, !0, t)) return !0 } }return !1 }, checkApplicable: function (e, t, n) { if (t && t instanceof CKEDITOR.filter && (n = t), n && !n.check(this)) return !1; switch (this.type) { case CKEDITOR.STYLE_OBJECT: return !!e.contains(this.element); case CKEDITOR.STYLE_BLOCK: return !!e.blockLimit.getDtd()[this.element] }return !0 }, checkElementMatch: function (e, t) {
134                    var n = this._.definition; if (!e || !n.ignoreReadonly && e.isReadOnly()) return !1;
135                    var i = e.getName(); if ("string" == typeof this.element ? i == this.element : i in this.element) { if (!t && !e.hasAttributes()) return !0; if (i = n._AC) n = i; else { var i = {}, o = 0, r = n.attributes; if (r) for (var s in r) o++, i[s] = r[s]; (s = CKEDITOR.style.getStyleText(n)) && (i.style || o++, i.style = s), i._length = o, n = n._AC = i } if (!n._length) return !0; for (var a in n) if ("_length" != a) if (i = e.getAttribute(a) || "", "style" == a ? C(n[a], i) : n[a] == i) { if (!t) return !0 } else if (t) return !1; if (t) return !0 } return !1
136                }, checkElementRemovable: function (e, t, n) { if (this.checkElementMatch(e, t, n)) return !0; if (t = y(this)[e.getName()]) { var i; if (!(t = t.attributes)) return !0; for (n = 0; n < t.length; n++)if (i = t[n][0], i = e.getAttribute(i)) { var o = t[n][1]; if (null === o) return !0; if ("string" == typeof o) { if (i == o) return !0 } else if (o.test(i)) return !0 } } return !1 }, buildPreview: function (e) { var t = this._.definition, n = [], i = t.element; "bdo" == i && (i = "span"); var n = ["<", i], o = t.attributes; if (o) for (var r in o) n.push(" ", r, '="', o[r], '"'); return (o = CKEDITOR.style.getStyleText(t)) && n.push(' style="', o, '"'), n.push(">", e || t.name, "</", i, ">"), n.join("") }, getDefinition: function () { return this._.definition }
137            }, CKEDITOR.style.getStyleText = function (e) { var t = e._ST; if (t) return t; var t = e.styles, n = e.attributes && e.attributes.style || "", i = ""; n.length && (n = n.replace(D, ";")); for (var o in t) { var r = t[o], s = (o + ":" + r).replace(D, ";"); "inherit" == r ? i += s : n += s } return n.length && (n = CKEDITOR.tools.normalizeCssText(n, !0)), e._ST = n + i }, CKEDITOR.style.customHandlers = {}, CKEDITOR.style.addCustomHandler = function (e) { var t = function (e) { this._ = { definition: e }, this.setup && this.setup(e) }; return t.prototype = CKEDITOR.tools.extend(CKEDITOR.tools.prototypedCopy(CKEDITOR.style.prototype), { assignedTo: CKEDITOR.STYLE_OBJECT }, e, !0), this.customHandlers[e.type] = t }; var x = CKEDITOR.POSITION_PRECEDING | CKEDITOR.POSITION_IDENTICAL | CKEDITOR.POSITION_IS_CONTAINED, K = CKEDITOR.POSITION_FOLLOWING | CKEDITOR.POSITION_IDENTICAL | CKEDITOR.POSITION_IS_CONTAINED
138        }(), CKEDITOR.styleCommand = function (e, t) { this.requiredContent = this.allowedContent = this.style = e, CKEDITOR.tools.extend(this, t, !0) }, CKEDITOR.styleCommand.prototype.exec = function (e) { e.focus(), this.state == CKEDITOR.TRISTATE_OFF ? e.applyStyle(this.style) : this.state == CKEDITOR.TRISTATE_ON && e.removeStyle(this.style) }, CKEDITOR.stylesSet = new CKEDITOR.resourceManager("", "stylesSet"), CKEDITOR.addStylesSet = CKEDITOR.tools.bind(CKEDITOR.stylesSet.add, CKEDITOR.stylesSet), CKEDITOR.loadStylesSet = function (e, t, n) { CKEDITOR.stylesSet.addExternal(e, t, ""), CKEDITOR.stylesSet.load(e, n) }, CKEDITOR.tools.extend(CKEDITOR.editor.prototype, { attachStyleStateChange: function (e, t) { var n = this._.styleStateChangeCallbacks; n || (n = this._.styleStateChangeCallbacks = [], this.on("selectionChange", function (e) { for (var t = 0; t < n.length; t++) { var i = n[t], o = i.style.checkActive(e.data.path, this) ? CKEDITOR.TRISTATE_ON : CKEDITOR.TRISTATE_OFF; i.fn.call(this, o) } })), n.push({ style: e, fn: t }) }, applyStyle: function (e) { e.apply(this) }, removeStyle: function (e) { e.remove(this) }, getStylesSet: function (e) { if (this._.stylesDefinitions) e(this._.stylesDefinitions);
138 else { var t = this, n = t.config.stylesCombo_stylesSet || t.config.stylesSet; if (!1 === n) e(null); else if (n instanceof Array) t._.stylesDefinitions = n, e(n); else { n || (n = "default"); var n = n.split(":"), i = n[0]; CKEDITOR.stylesSet.addExternal(i, n[1] ? n.slice(1).join(":") : CKEDITOR.getUrl("styles.js"), ""), CKEDITOR.stylesSet.load(i, function (n) { t._.stylesDefinitions = n[i], e(t._.stylesDefinitions) }) } } } }), CKEDITOR.dom.comment = function (e, t) { "string" == typeof e && (e = (t ? t.$ : document).createComment(e)), CKEDITOR.dom.domObject.call(this, e) }, CKEDITOR.dom.comment.prototype = new CKEDITOR.dom.node, CKEDITOR.tools.extend(CKEDITOR.dom.comment.prototype, { type: CKEDITOR.NODE_COMMENT, getOuterHtml: function () { return "<!--" + this.$.nodeValue + "-->" } }), function () { var e, t = {}, n = {}; for (e in CKEDITOR.dtd.$blockLimit) e in CKEDITOR.dtd.$list || (t[e] = 1); for (e in CKEDITOR.dtd.$block) e in CKEDITOR.dtd.$blockLimit || e in CKEDITOR.dtd.$empty || (n[e] = 1); CKEDITOR.dom.elementPath = function (e, i) { var o, r = null, s = null, a = [], l = e; i = i || e.getDocument().getBody(); do if (l.type == CKEDITOR.NODE_ELEMENT) { if (a.push(l), !this.lastElement && (this.lastElement = l, l.is(CKEDITOR.dtd.$object) || "false" == l.getAttribute("contenteditable"))) continue; if (l.equals(i)) break; if (!s && (o = l.getName(), "true" == l.getAttribute("contenteditable") ? s = l : !r && n[o] && (r = l), t[o])) { if (o = !r && "div" == o) { e: { o = l.getChildren(); for (var c = 0, d = o.count(); d > c; c++) { var u = o.getItem(c); if (u.type == CKEDITOR.NODE_ELEMENT && CKEDITOR.dtd.$block[u.getName()]) { o = !0; break e } } o = !1 } o = !o } o ? r = l : s = l } } while (l = l.getParent()); s || (s = i), this.block = r, this.blockLimit = s, this.root = i, this.elements = a } }(), CKEDITOR.dom.elementPath.prototype = { compare: function (e) { var t = this.elements; if (e = e && e.elements, !e || t.length != e.length) return !1; for (var n = 0; n < t.length; n++)if (!t[n].equals(e[n])) return !1; return !0 }, contains: function (e, t, n) { var i; "string" == typeof e && (i = function (t) { return t.getName() == e }), e instanceof CKEDITOR.dom.element ? i = function (t) { return t.equals(e) } : CKEDITOR.tools.isArray(e) ? i = function (t) { return -1 < CKEDITOR.tools.indexOf(e, t.getName()) } : "function" == typeof e ? i = e : "object" == typeof e && (i = function (t) { return t.getName() in e }); var o = this.elements, r = o.length; for (t && r--, n && (o = Array.prototype.slice.call(o, 0), o.reverse()), t = 0; r > t; t++)if (i(o[t])) return o[t]; return null }, isContextFor: function (e) { var t; return e in CKEDITOR.dtd.$block ? (t = this.contains(CKEDITOR.dtd.$intermediate) || this.root.equals(this.block) && this.block || this.blockLimit, !!t.getDtd()[e]) : !0 }, direction: function () { return (this.block || this.blockLimit || this.root).getDirection(1) } }, CKEDITOR.dom.text = function (e, t) { "string" == typeof e && (e = (t ? t.$ : document).createTextNode(e)), this.$ = e }, CKEDITOR.dom.text.prototype = new CKEDITOR.dom.node, CKEDITOR.tools.extend(CKEDITOR.dom.text.prototype, { type: CKEDITOR.NODE_TEXT, getLength: function () { return this.$.nodeValue.length }, getText: function () { return this.$.nodeValue }, setText: function (e) { this.$.nodeValue = e }, split: function (e) { var t = this.$.parentNode, n = t.childNodes.length, i = this.getLength(), o = this.getDocument(), r = new CKEDITOR.dom.text(this.$.splitText(e), o); return t.childNodes.length == n && (e >= i ? (r = o.createText(""), r.insertAfter(this)) : (e = o.createText(""), e.insertAfter(r), e.remove())), r }, substring: function (e, t) { return "number" != typeof t ? this.$.nodeValue.substr(e) : this.$.nodeValue.substring(e, t) } }), function () { function e(e, t, n) { var i = e.serializable, o = t[n ? "endContainer" : "startContainer"], r = n ? "endOffset" : "startOffset", s = i ? t.document.getById(e.startNode) : e.startNode; return e = i ? t.document.getById(e.endNode) : e.endNode, o.equals(s.getPrevious()) ? (t.startOffset = t.startOffset - o.getLength() - e.getPrevious().getLength(), o = e.getNext()) : o.equals(e.getPrevious()) && (t.startOffset -= o.getLength(), o = e.getNext()), o.equals(s.getParent()) && t[r]++, o.equals(e.getParent()) && t[r]++, t[n ? "endContainer" : "startContainer"] = o, t } CKEDITOR.dom.rangeList = function (e) { return e instanceof CKEDITOR.dom.rangeList ? e : (e ? e instanceof CKEDITOR.dom.range && (e = [e]) : e = [], CKEDITOR.tools.extend(e, t)) }; var t = { createIterator: function () { var e, t = this, n = CKEDITOR.dom.walker.bookmark(), i = []; return { getNextRange: function (o) { e = void 0 === e ? 0 : e + 1; var r = t[e]; if (r && 1 < t.length) { if (!e) for (var s = t.length - 1; s >= 0; s--)i.unshift(t[s].createBookmark(!0)); if (o) for (var a = 0; t[e + a + 1];) { var l = r.document; for (o = 0, s = l.getById(i[a].endNode), l = l.getById(i[a + 1].startNode); ;) { if (s = s.getNextSourceNode(!1), l.equals(s)) o = 1; else if (n(s) || s.type == CKEDITOR.NODE_ELEMENT && s.isBlockBoundary()) continue; break } if (!o) break; a++ } for (r.moveToBookmark(i.shift()); a--;)s = t[++e], s.moveToBookmark(i.shift()), r.setEnd(s.endContainer, s.endOffset) } return r } } }, createBookmarks: function (t) { for (var n, i = [], o = 0; o < this.length; o++) { i.push(n = this[o].createBookmark(t, !0)); for (var r = o + 1; r < this.length; r++)this[r] = e(n, this[r]), this[r] = e(n, this[r], !0) } return i }, createBookmarks2: function (e) { for (var t = [], n = 0; n < this.length; n++)t.push(this[n].createBookmark2(e)); return t }, moveToBookmarks: function (e) { for (var t = 0; t < this.length; t++)this[t].moveToBookmark(e[t]) } } }(), function () { function e() { return CKEDITOR.getUrl(CKEDITOR.skinName.split(",")[1] || "skins/" + CKEDITOR.skinName.split(",")[0] + "/") } function t(t) { var n = CKEDITOR.skin["ua_" + t], i = CKEDITOR.env; if (n) for (var o, n = n.split(",").sort(function (e, t) { return e > t ? -1 : 1 }), r = 0; r < n.length; r++)if (o = n[r], i.ie && (o.replace(/^ie/, "") == i.version || i.quirks && "iequirks" == o) && (o = "ie"), i[o]) { t += "_" + n[r]; break } return CKEDITOR.getUrl(e() + t + ".css") } function n(e, n) { r[e] || (CKEDITOR.document.appendStyleSheet(t(e)), r[e] = 1), n && n() } function i(e) { var t = e.getById(s); return t || (t = e.getHead().append("style"), t.setAttribute("id", s), t.setAttribute("type", "text/css")), t } function o(e, t, n) { var i, o, r; if (CKEDITOR.env.webkit) for (t = t.split("}").slice(0, -1), o = 0; o < t.length; o++)t[o] = t[o].split("{"); for (var s = 0; s < e.length; s++)if (CKEDITOR.env.webkit) for (o = 0; o < t.length; o++) { for (r = t[o][1], i = 0; i < n.length; i++)r = r.replace(n[i][0], n[i][1]); e[s].$.sheet.addRule(t[o][0], r) } else { for (r = t, i = 0; i < n.length; i++)r = r.replace(n[i][0], n[i][1]); CKEDITOR.env.ie && 11 > CKEDITOR.env.version ? e[s].$.styleSheet.cssText += r : e[s].$.innerHTML += r } } var r = {}; CKEDITOR.skin = { path: e, loadPart: function (t, i) { CKEDITOR.skin.name != CKEDITOR.skinName.split(",")[0] ? CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(e() + "skin.js"), function () { n(t, i) }) : n(t, i) }, getPath: function (e) { return CKEDITOR.getUrl(t(e)) }, icons: {}, addIcon: function (e, t, n, i) { e = e.toLowerCase(), this.icons[e] || (this.icons[e] 
138= { path: t, offset: n || 0, bgsize: i || "16px" }) }, getIconStyle: function (e, t, n, i, o) { var r; return e && (e = e.toLowerCase(), t && (r = this.icons[e + "-rtl"]), r || (r = this.icons[e])), e = n || r && r.path || "", i = i || r && r.offset, o = o || r && r.bgsize || "16px", e && (e = e.replace(/'/g, "\\'")), e && "background-image:url('" + CKEDITOR.getUrl(e) + "');background-position:0 " + i + "px;background-size:" + o + ";" } }, CKEDITOR.tools.extend(CKEDITOR.editor.prototype, { getUiColor: function () { return this.uiColor }, setUiColor: function (e) { var t = i(CKEDITOR.document); return (this.setUiColor = function (e) { this.uiColor = e; var n = CKEDITOR.skin.chameleon, i = "", r = ""; "function" == typeof n && (i = n(this, "editor"), r = n(this, "panel")), e = [[l, e]], o([t], i, e), o(a, r, e) }).call(this, e) } }); var s = "cke_ui_color", a = [], l = /\$color/g; CKEDITOR.on("instanceLoaded", function (e) { if (!CKEDITOR.env.ie || !CKEDITOR.env.quirks) { var t = e.editor; e = function (e) { if (e = (e.data[0] || e.data).element.getElementsByTag("iframe").getItem(0).getFrameDocument(), !e.getById("cke_ui_color")) { e = i(e), a.push(e); var n = t.getUiColor(); n && o([e], CKEDITOR.skin.chameleon(t, "panel"), [[l, n]]) } }, t.on("panelShow", e), t.on("menuShow", e), t.config.uiColor && t.setUiColor(t.config.uiColor) } }) }(), function () { if (CKEDITOR.env.webkit) CKEDITOR.env.hc = !1; else { var e = CKEDITOR.dom.element.createFromHtml('<div style="width:0;height:0;position:absolute;left:-10000px;border:1px solid;border-color:red blue"></div>', CKEDITOR.document); e.appendTo(CKEDITOR.document.getHead()); try { var t = e.getComputedStyle("border-top-color"), n = e.getComputedStyle("border-right-color"); CKEDITOR.env.hc = !(!t || t != n) } catch (i) { CKEDITOR.env.hc = !1 } e.remove() } if (CKEDITOR.env.hc && (CKEDITOR.env.cssClass += " cke_hc"), CKEDITOR.document.appendStyleText(".cke{visibility:hidden;}"), CKEDITOR.status = "loaded", CKEDITOR.fireOnce("loaded"), e = CKEDITOR._.pending) for (delete CKEDITOR._.pending, t = 0; t < e.length; t++)CKEDITOR.editor.prototype.constructor.apply(e[t][0], e[t][1]), CKEDITOR.add(e[t][0]) }(), CKEDITOR.skin.name = "moono-lisa", CKEDITOR.skin.ua_editor = "ie,iequirks,ie8,gecko", CKEDITOR.skin.ua_dialog = "ie,iequirks,ie8", CKEDITOR.skin.chameleon = function () { var e = function () { return function (e, t) { for (var n = e.match(/[^#]./g), i = 0; 3 > i; i++) { var o, r = i; o = parseInt(n[i], 16), o = ("0" + (0 > t ? 0 | o * (1 + t) : 0 | o + (255 - o) * t).toString(16)).slice(-2), n[r] = o } return "#" + n.join("") } }(), t = { editor: new CKEDITOR.template("{id}.cke_chrome [border-color:{defaultBorder};] {id} .cke_top [ background-color:{defaultBackground};border-bottom-color:{defaultBorder};] {id} .cke_bottom [background-color:{defaultBackground};border-top-color:{defaultBorder};] {id} .cke_resizer [border-right-color:{ckeResizer}] {id} .cke_dialog_title [background-color:{defaultBackground};border-bottom-color:{defaultBorder};] {id} .cke_dialog_footer [background-color:{defaultBackground};outline-color:{defaultBorder};] {id} .cke_dialog_tab [background-color:{dialogTab};border-color:{defaultBorder};] {id}
138 .cke_dialog_tab:hover [background-color:{lightBackground};] {id} .cke_dialog_contents [border-top-color:{defaultBorder};] {id} .cke_dialog_tab_selected, {id} .cke_dialog_tab_selected:hover [background:{dialogTabSelected};border-bottom-color:{dialogTabSelectedBorder};] {id} .cke_dialog_body [background:{dialogBody};border-color:{defaultBorder};] {id} a.cke_button_off:hover,{id} a.cke_button_off:focus,{id} a.cke_button_off:active [background-color:{darkBackground};border-color:{toolbarElementsBorder};] {id} .cke_button_on [background-color:{ckeButtonOn};border-color:{toolbarElementsBorder};] {id} .cke_toolbar_separator,{id} .cke_toolgroup a.cke_button:last-child:after,{id} .cke_toolgroup a.cke_button.cke_button_disabled:hover:last-child:after [background-color: {toolbarElementsBorder};border-color: {toolbarElementsBorder};] {id} a.cke_combo_button:hover,{id} a.cke_combo_button:focus,{id} .cke_combo_on a.cke_combo_button [border-color:{toolbarElementsBorder};background-color:{darkBackground};] {id} .cke_combo:after [border-color:{toolbarElementsBorder};] {id} .cke_path_item [color:{elementsPathColor};] {id} a.cke_path_item:hover,{id} a.cke_path_item:focus,{id} a.cke_path_item:active [background-color:{darkBackground};] {id}.cke_panel [border-color:{defaultBorder};] "), panel: new CKEDITOR.template(".cke_panel_grouptitle [background-color:{lightBackgroun
138d};border-color:{defaultBorder};] .cke_menubutton_icon [background-color:{menubuttonIcon};] .cke_menubutton:hover,.cke_menubutton:focus,.cke_menubutton:active [background-color:{menubuttonHover};] .cke_menubutton:hover .cke_menubutton_icon, .cke_menubutton:focus .cke_menubutton_icon, .cke_menubutton:active .cke_menubutton_icon [background-color:{menubuttonIconHover};] .cke_menubutton_disabled:hover .cke_menubutton_icon,.cke_menubutton_disabled:focus .cke_menubutton_icon,.cke_menubutton_disabled:active .cke_menubutton_icon [background-color:{menubuttonIcon};] .cke_menuseparator [background-color:{menubuttonIcon};] a:hover.cke_colorbox, a:active.cke_colorbox [border-color:{defaultBorder};] a:hover.cke_colorauto, a:hover.cke_colormore, a:active.cke_colorauto, a:active.cke_colormore [background-color:{ckeColorauto};border-color:{defaultBorder};] ") }; return function (n, i) { var o = e(n.uiColor, .4), o = { id: "." + n.id, defaultBorder: e(o, -.2), toolbarElementsBorder: e(o, -.25), defaultBackground: o, lightBackground: e(o, .8), darkBackground: e(o, -.15), ckeButtonOn: e(o, .4), ckeResizer: e(o, -.4), ckeColorauto: e(o, .8), dialogBody: e(o, .7), dialogTab: e(o, .65), dialogTabSelected: "#FFF", dialogTabSelectedBorder: "#FFF", elementsPathColor: e(o, -.6), menubuttonHover: e(o, .1), menubuttonIcon: e(o, .5), menubuttonIconHover: e(o, .3) }; return t[i].output(o).replace(/\[/g, "{").replace(/\]/g, "}") } }(), CKEDITOR.plugins.add("dialogui", {
139            onLoad: function () {
140                var e = function (e) { this._ || (this._ = {}), this._["default"] = this._.initValue = e["default"] || "", this._.required = e.required || !1; for (var t = [this._], n = 1; n < arguments.length; n++)t.push(arguments[n]); return t.push(!0), CKEDITOR.tools.extend.apply(CKEDITOR.tools, t), this._ }, t = { build: function (e, t, n) { return new CKEDITOR.ui.dialog.textInput(e, t, n) } }, n = { build: function (e, t, n) { return new CKEDITOR.ui.dialog[t.type](e, t, n) } }, i = { isChanged: function () { return this.getValue() != this.getInitValue() }, reset: function (e) { this.setValue(this.getInitValue(), e) }, setInitValue: function () { this._.initValue = this.getValue() }, resetInitValue: function () { this._.initValue = this._["default"] }, getInitValue: function () { return this._.initValue } }, o = CKEDITOR.tools.extend({}, CKEDITOR.ui.dialog.uiElement.prototype.eventProcessors, { onChange: function (e, t) { this._.domOnChangeRegistered || (e.on("load", function () { this.getInputElement().on("change", function () { e.parts.dialog.isVisible() && this.fire("change", { value: this.getValue() }) }, this) }, this), this._.domOnChangeRegistered = !0), this.on("change", t) } }, !0), r = /^on([A-Z]\w+)/, s = function (e) { for (var t in e) (r.test(t) || "title" == t || "type" == t) && delete e[t]; return e }, a = function (e) { e = e.data.getKeystroke(), e == CKEDITOR.SH
140IFT + CKEDITOR.ALT + 36 ? this.setDirectionMarker("ltr") : e == CKEDITOR.SHIFT + CKEDITOR.ALT + 35 && this.setDirectionMarker("rtl") }; CKEDITOR.tools.extend(CKEDITOR.ui.dialog, { labeledElement: function (t, n, i, o) { if (!(4 > arguments.length)) { var r = e.call(this, n); r.labelId = CKEDITOR.tools.getNextId() + "_label", this._.children = []; var s = { role: n.role || "presentation" }; n.includeLabel && (s["aria-labelledby"] = r.labelId), CKEDITOR.ui.dialog.uiElement.call(this, t, n, i, "div", null, s, function () { var e = [], i = n.required ? " cke_required" : ""; return "horizontal" != n.labelLayout ? e.push('<label class="cke_dialog_ui_labeled_label' + i + '" ', ' id="' + r.labelId + '"', r.inputId ? ' for="' + r.inputId + '"' : "", (n.labelStyle ? ' style="' + n.labelStyle + '"' : "") + ">", n.label, "</label>", '<div class="cke_dialog_ui_labeled_content"', n.controlStyle ? ' style="' + n.controlStyle + '"' : "", ' role="presentation">', o.call(this, t, n), "</div>") : (i = { type: "hbox", widths: n.widths, padding: 0, children: [{ type: "html", html: '<label class="cke_dialog_ui_labeled_label' + i + '" id="' + r.labelId + '" for="' + r.inputId + '"' + (n.labelStyle ? ' style="' + n.labelStyle + '"' : "") + ">" + CKEDITOR.tools.htmlEncode(n.label) + "</label>" }, { type: "html", html: '<span class="cke_dialog_ui_labeled_content"' + (n.controlStyle ? ' style="' + n.controlStyle + '"' : "") + ">" + o.call(this, t, n) + "</span>" }] }, CKEDITOR.dialog._.uiElementBuilders.hbox.build(t, i, e)), e.join("") }) } }, textInput: function (t, n, i) { if (!(3 > arguments.length)) { e.call(this, n); var o = this._.inputId = CKEDITOR.tools.getNextId() + "_textInput", r = { "class": "cke_dialog_ui_input_" + n.type, id: o, type: n.type }; n.validate && (this.validate = n.validate), n.maxLength && (r.maxlength = n.maxLength), n.size && (r.size = n.size), n.inputStyle && (r.style = n.inputStyle); var s = this, l = !1; t.on("load", function () { s.getInputElement().on("keydown", function (e) { 13 == e.data.getKeystroke() && (l = !0) }), s.getInputElement().on("keyup", function (e) { 13 == e.data.getKeystroke() && l && (t.getButton("ok") && setTimeout(function () { t.getButton("ok").click() }, 0), l = !1), s.bidi && a.call(s, e) }, null, null, 1e3) }), CKEDITOR.ui.dialog.labeledElement.call(this, t, n, i, function () { var e = ['<div class="cke_dialog_ui_input_', n.type, '" role="presentation"']; n.width && e.push('style="width:' + n.width + '" '), e.push("><input "), r["aria-labelledby"] = this._.labelId, this._.required && (r["aria-required"] = this._.required); for (var t in r) e.push(t + '="' + r[t] + '" '); return e.push(" /></div>"), e.join("") }) } }, textarea: function (t, n, i) { if (!(3 > arguments.length)) { e.call(this, n); var o = this, r = this._.inputId = CKEDITOR.tools.getNextId() + "_textarea", s = {}; n.validate && (this.validate = n.validate), s.rows = n.rows || 5, s.cols = n.cols || 20, s["class"] = "cke_dialog_ui_input_textarea " + (n["class"] || ""), "undefined" != typeof n.inputStyle && (s.style = n.inputStyle), n.dir && (s.dir = n.dir), o.bidi && t.on("load", function () { o.getInputElement().on("keyup", a) }, o), CKEDITOR.ui.dialog.labeledElement.call(this, t, n, i, function () { s["aria-labelledby"] = this._.labelId, this._.required && (s["aria-required"] = this._.required); var e, t = ['<div class="cke_dialog_ui_input_textarea" role="presentation"><textarea id="', r, '" ']; for (e in s) t.push(e + '="' + CKEDITOR.tools.htmlEncode(s[e]) + '" '); return t.push(">", CKEDITOR.tools.htmlEncode(o._["default"]), "</textarea></div>"), t.join("") }) } }, checkbox: function (t, n, i) { if (!(3 > arguments.length)) { var o = e.call(this, n, { "default": !!n["default"] }); n.validate && (this.validate = n.validate), CKEDITOR.ui.dialog.uiElement.call(this, t, n, i, "span", null, null, function () { var e = CKEDITOR.tools.extend({}, n, { id: n.id ? n.id + "_checkbox" : CKEDITOR.tools.getNextId() + "_checkbox" }, !0), i = [], r = CKEDITOR.tools.getNextId() + "_label", a = { "class": "cke_dialog_ui_checkbox_input", type: "checkbox", "aria-labelledby": r }; return s(e), n["default"] && (a.checked = "checked"), "undefined" != typeof e.inputStyle && (e.style = e.inputStyle), o.checkbox = new CKEDITOR.ui.dialog.uiElement(t, e, i, "input", null, a), i.push(' <label id="', r, '" for="', a.id, '"' + (n.labelStyle ? ' style="' + n.labelStyle + '"' : "") + ">", CKEDITOR.tools.htmlEncode(n.label), "</label>"), i.join("") }) } }, radio: function (t, n, i) { if (!(3 > arguments.length)) { e.call(this, n), this._["default"] || (this._["default"] = this._.initValue = n.items[0][1]), n.validate && (this.validate = n.validate); var o = [], r = this; n.role = "radiogroup", n.includeLabel = !0, CKEDITOR.ui.dialog.labeledElement.call(this, t, n, i, function () { for (var e = [], i = [], a = (n.id ? n.id : CKEDITOR.tools.getNextId()) + "_radio", l = 0; l < n.items.length; l++) { var c = n.items[l], d = void 0 !== c[2] ? c[2] : c[0], u = void 0 !== c[1] ? c[1] : c[0], h = CKEDITOR.tools.getNextId() + "_radio_input", p = h + "_label", h = CKEDITOR.tools.extend({}, n, { id: h, title: null, type: null }, !0), d = CKEDITOR.tools.extend({}, h, { title: d }, !0), f = { type: "radio", "class": "cke_dialog_ui_radio_input", name: a, value: u, "aria-labelledby": p }, m = []; r._["default"] == u && (f.checked = "checked"), s(h), s(d), "undefined" != typeof h.inputStyle && (h.style = h.inputStyle), h.keyboardFocusable = !0, o.push(new CKEDITOR.ui.dialog.uiElement(t, h, m, "input", null, f)), m.push(" "), new CKEDITOR.ui.dialog.uiElement(t, d, m, "label", null, { id: p, "for": f.id }, c[0]), e.push(m.join("")) } return new CKEDITOR.ui.dialog.hbox(t, o, e, i), i.join("") }), this._.children = o } }, button: function (t, n, i) { if (arguments.length) { "function" == typeof n && (n = n(t.getParentEditor())), e.call(this, n, { disabled: n.disabled || !1 }), CKEDITOR.event.implementOn(this); var o = this; t.on("load", function () { var e = this.getElement(); !function () { e.on("click", function (e) { o.click(), e.data.preventDefault() }
140), e.on("keydown", function (e) { e.data.getKeystroke() in { 32: 1 } && (o.click(), e.data.preventDefault()) }) }(), e.unselectable() }, this); var r = CKEDITOR.tools.extend({}, n); delete r.style; var s = CKEDITOR.tools.getNextId() + "_label"; CKEDITOR.ui.dialog.uiElement.call(this, t, r, i, "a", null, { style: n.style, href: "javascript:void(0)", title: n.label, hidefocus: "true", "class": n["class"], role: "button", "aria-labelledby": s }, '<span id="' + s + '" class="cke_dialog_ui_button">' + CKEDITOR.tools.htmlEncode(n.label) + "</span>") } }, select: function (t, n, i) { if (!(3 > arguments.length)) { var o = e.call(this, n); n.validate && (this.validate = n.validate), o.inputId = CKEDITOR.tools.getNextId() + "_select", CKEDITOR.ui.dialog.labeledElement.call(this, t, n, i, function () { var e = CKEDITOR.tools.extend({}, n, { id: n.id ? n.id + "_select" : CKEDITOR.tools.getNextId() + "_select" }, !0), i = [], r = [], a = { id: o.inputId, "class": "cke_dialog_ui_input_select", "aria-labelledby": this._.labelId }; i.push('<div class="cke_dialog_ui_input_', n.type, '" role="presentation"'), n.width && i.push('style="width:' + n.width + '" '), i.push(">"), void 0 !== n.size && (a.size = n.size), void 0 !== n.multiple && (a.multiple = n.multiple), s(e); for (var l, c = 0; c < n.items.length && (l = n.items[c]); c++)r.push('<option value="', CKEDITOR.tools.htmlEncode(void 0 !== l[1] ? l[1] : l[0]).replace(/"/g, "&quot;"), '" /> ', CKEDITOR.tools.htmlEncode(l[0])); return "undefined" != typeof e.inputStyle && (e.style = e.inputStyle), o.select = new CKEDITOR.ui.dialog.uiElement(t, e, i, "select", null, a, r.join("")), i.push("</div>"), i.join("") }) } }, file: function (t, n, i) { if (!(3 > arguments.length)) { void 0 === n["default"] && (n["default"] = ""); var o = CKEDITOR.tools.extend(e.call(this, n), { definition: n, buttons: [] }); n.validate && (this.validate = n.validate), t.on("load", function () { CKEDITOR.document.getById(o.frameId).getParent().addClass("cke_dialog_ui_input_file") }), CKEDITOR.ui.dialog.labeledElement.call(this, t, n, i, function () { o.frameId = CKEDITOR.tools.getNextId() + "_fileInput"; var e = ['<iframe frameborder="0" allowtransparency="0" class="cke_dialog_ui_input_file" role="presentation" id="', o.frameId, '" title="', n.label, '" src="javascript:void(']; return e.push(CKEDITOR.env.ie ? "(function(){" + encodeURIComponent("document.open();(" + CKEDITOR.tools.fixDomain + ")();document.close();") + "})()" : "0"), e.push(')"></iframe>'), e.join("") }) } }, fileButton: function (t, n, i) { var o = this; if (!(3 > arguments.length)) { e.call(this, n), n.validate && (this.validate = n.validate); var r = CKEDITOR.tools.extend({}, n), s = r.onClick; r.className = (r.className ? r.className + " " : "") + "cke_dialog_ui_button", r.onClick = function (e) { var i = n["for"]; s && !1 === s.call(this, e) || (t.getContentElement(i[0], i[1]).submit(), this.disable()) }, t.on("load", function () { t.getContentElement(n["for"][0], n["for"][1])._.buttons.push(o) }), CKEDITOR.ui.dialog.button.call(this, t, r, i) } }, html: function () { var e = /^\s*<[\w:]+\s+([^>]*)?>/, t = /^(\s*<[\w:]+(?:\s+[^>]*)?)((?:.|\r|\n)+)$/, n = /\/$/; return function (i, o, r) { if (!(3 > arguments.length)) { var s = [], a = o.html; "<" != a.charAt(0) && (a = "<span>" + a + "</span>"); var l = o.focus; if (l) { var c = this.focus; this.focus = function () { ("function" == typeof l ? l : c).call(this), this.fire("focus") }, o.isFocusable && (this.isFocusable = this.isFocusable), this.keyboardFocusable = !0 } CKEDITOR.ui.dialog.uiElement.call(this, i, o, s, "span", null, null, ""), s = s.join("").match(e), a = a.match(t) || ["", "", ""], n.test(a[1]) && (a[1] = a[1].slice(0, -1), a[2] = "/" + a[2]), r.push([a[1], " ", s[1] || "", a[2]].join("")) } } }(), fieldset: function (e, t, n, i, o) { var r = o.label; this._ = { children: t }, CKEDITOR.ui.dialog.uiElement.call(this, e, o, i, "fieldset", null, null, function () { var e = []; r && e.push("<legend" + (o.labelStyle ? ' style="' + o.labelStyle + '"' : "") + ">" + r + "</legend>"); for (var t = 0; t < n.length; t++)e.push(n[t]); return e.join("") }) } }, !0), CKEDITOR.ui.dialog.html.prototype = new CKEDITOR.ui.dialog.uiElement, CKEDITOR.ui.dialog.labeledElement.prototype = CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement, { setLabel: function (e) { var t = CKEDITOR.document.getById(this._.labelId); return 1 > t.getChildCount() ? new CKEDITOR.dom.text(e, CKEDITOR.document).appendTo(t) : t.getChild(0).$.nodeValue = e, this }, getLabel: function () { var e = CKEDITOR.document.getById(this._.labelId); return !e || 1 > e.getChildCount() ? "" : e.getChild(0).getText() }, eventProcessors: o }, !0), CKEDITOR.ui.dialog.button.prototype = CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement, { click: function () { return this._.disabled ? !1 : this.fire("click", { dialog: this._.dialog }) }, enable: function () { this._.disabled = !1; var e = this.getElement(); e && e.removeClass("cke_disabled") }, disable: function () { this._.disabled = !0, this.getElement().addClass("cke_disabled") }, isVisible: function () { return this.getElement().getFirst().isVisible() }, isEnabled: function () { return !this._.disabled }, eventProcessors: CKEDITOR.tools.extend({}, CKEDITOR.ui.dialog.uiElement.prototype.eventProcessors, { onClick: function (e, t) { this.on("click", function () { t.apply(this, arguments) }) } }, !0), accessKeyUp: function () { this.click() }, accessKeyDown: function () { this.focus() }, keyboardFocusable: !0 }, !0), CKEDITOR.ui.dialog.textInput.prototype = CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.labeledElement, { getInputElement: function () { return CKEDITOR.document.getById(this._.inputId) }
140, focus: function () { var e = this.selectParentTab(); setTimeout(function () { var t = e.getInputElement(); t && t.$.focus() }, 0) }, select: function () { var e = this.selectParentTab(); setTimeout(function () { var t = e.getInputElement(); t && (t.$.focus(), t.$.select()) }, 0) }, accessKeyUp: function () { this.select() }, setValue: function (e) { if (this.bidi) { var t = e && e.charAt(0); (t = "\u202a" == t ? "ltr" : "\u202b" == t ? "rtl" : null) && (e = e.slice(1)), this.setDirectionMarker(t) } return e || (e = ""), CKEDITOR.ui.dialog.uiElement.prototype.setValue.apply(this, arguments) }, getValue: function () { var e = CKEDITOR.ui.dialog.uiElement.prototype.getValue.call(this); if (this.bidi && e) { var t = this.getDirectionMarker(); t && (e = ("ltr" == t ? "\u202a" : "\u202b") + e) } return e }, setDirectionMarker: function (e) { var t = this.getInputElement(); e ? t.setAttributes({ dir: e, "data-cke-dir-marker": e }) : this.getDirectionMarker() && t.removeAttributes(["dir", "data-cke-dir-marker"]) }, getDirectionMarker: function () { return this.getInputElement().data("cke-dir-marker") }, keyboardFocusable: !0 }, i, !0), CKEDITOR.ui.dialog.textarea.prototype = new CKEDITOR.ui.dialog.textInput, CKEDITOR.ui.dialog.select.prototype = CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.labeledElement, { getInputElement: function () { return this._.select.getElement() }, add: function (e, t, n) { var i = new CKEDITOR.dom.element("option", this.getDialog().getParentEditor().document), o = this.getInputElement().$; return i.$.text = e, i.$.value = void 0 === t || null === t ? e : t, void 0 === n || null === n ? CKEDITOR.env.ie ? o.add(i.$) : o.add(i.$, null) : o.add(i.$, n), this }, remove: function (e) { return this.getInputElement().$.remove(e), this }, clear: function () { for (var e = this.getInputElement().$; 0 < e.length;)e.remove(0); return this }, keyboardFocusable: !0 }, i, !0), CKEDITOR.ui.dialog.checkbox.prototype = CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement, { getInputElement: function () { return this._.checkbox.getElement() }, setValue: function (e, t) { this.getInputElement().$.checked = e, !t && this.fire("change", { value: e }) }, getValue: function () { return this.getInputElement().$.checked }, accessKeyUp: function () { this.setValue(!this.getValue()) }, eventProcessors: { onChange: function (e, t) { return !CKEDITOR.env.ie || 8 < CKEDITOR.env.version ? o.onChange.apply(this, arguments) : (e.on("load", function () { var e = this._.checkbox.getElement(); e.on("propertychange", function (t) { t = t.data.$, "checked" == t.propertyName && this.fire("change", { value: e.$.checked }) }, this) }, this), this.on("change", t), null) } }, keyboardFocusable: !0 }, i, !0), CKEDITOR.ui.dialog.radio.prototype = CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement, { setValue: function (e, t) { for (var n, i = this._.children, o = 0; o < i.length && (n = i[o]); o++)n.getElement().$.checked = n.getValue() == e; !t && this.fire("change", { value: e }) }, getValue: function () { for (var e = this._.children, t = 0; t < e.length; t++)if (e[t].getElement().$.checked) return e[t].getValue(); return null }, accessKeyUp: function () { var e, t = this._.children; for (e = 0; e < t.length; e++)if (t[e].getElement().$.checked) return void t[e].getElement().focus(); t[0].getElement().focus() }, eventProcessors: { onChange: function (e, t) { return !CKEDITOR.env.ie || 8 < CKEDITOR.env.version ? o.onChange.apply(this, arguments) : (e.on("load", function () { for (var e = this._.children, t = this, n = 0; n < e.length; n++)e[n].getElement().on("propertychange", function (e) { e = e.data.$, "checked" == e.propertyName && this.$.checked && t.fire("change", { value: this.getAttribute("value") }) }) }, this), this.on("change", t), null) } } }, i, !0), CKEDITOR.ui.dialog.file.prototype = CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.labeledElement, i, { getInputElement: function () { var e = CKEDITOR.document.getById(this._.frameId).getFrameDocument(); return 0 < e.$.forms.length ? new CKEDITOR.dom.element(e.$.forms[0].elements[0]) : this.getElement() }, submit: function () { return this.getInputElement().getParent().$.submit(), this }, getAction: function () { return this.getInputElement().getParent().$.action }, registerEvents: function (e) { var t, n, i = /^on([A-Z]\w+)/, o = function (e, t, n, i) { e.on("formLoaded", function () { e.getInputElement().on(n, i, e) }) }; for (n in e) (t = n.match(i)) && (this.eventProcessors[n] ? this.eventProcessors[n].call(this, this._.dialog, e[n]) : o(this, this._.dialog, t[1].toLowerCase(), e[n])); return this }, reset: function () { function e() { n.$.open(); var e = ""; i.size && (e = i.size - (CKEDITOR.env.ie ? 7 : 0)); var c = t.frameId + "_input"; for (n.$.write(['<html dir="' + a + '" lang="' + l + '"><head><title></title></head><body style="margin: 0; overflow: hidden; background: transparent;">', '<form enctype="multipart/form-data" method="POST" dir="' + a + '" lang="' + l + '" action="', CKEDITOR.tools.htmlEncode(i.action), '"><label id="', t.labelId, '" for="', c, '" style="display:none">', CKEDITOR.tools.htmlEncode(i.label), '</label><input style="width:100%" id="', c, '" aria-labelledby="', t.labelId, '" type="file" name="', CKEDITOR.tools.htmlEncode(i.id || "cke_upload"), '" size="', CKEDITOR.tools.htmlEncode(e > 0 ? e : ""), '" /></form></body></html><script>', CKEDITOR.env.ie ? "(" + CKEDITOR.tools.fixDomain + ")();" : "", "window.parent.CKEDITOR.tools.callFunction(" + r + ");", "window.onbeforeunload = function() {window.parent.CKEDITOR.tools.callFunction(" + s + ")}", "</script>"].join("")), n.$.close(), e = 0; e < o.length; e++)o[e].enable() } var t = this._, n = CKEDITOR.document.getById(t.frameId).getFrameDocument(), i = t.definition, o = t.buttons, r = this.formLoadedNumber, s = this.formUnloadNumber, a = t.dialog._.editor.lang.dir, l = t.dialog._.editor.langCode; r || (r = this.formLoadedNumber = CKEDITOR.tools.addFunction(function () { this.fire("formLoaded") }, this), s = this.formUnloadNumber = CKEDITOR.tools.addFunction(function () { this.getInputElement().clearCustomData() }, this), this.getDialog()._.editor.on("destroy", function () { CKEDITOR.tools.removeFunction(r), CKEDITOR.tools.removeFunction(s) })), CKEDITOR.env.gecko ? setTimeout(e, 500) : e() }, getValue: function () { return this.getInputElement().$.value || "" }, setInitValue: function () { this._.initValue = "" }, eventProcessors: { onChange: function (e, t) { this._.domOnChangeRegistered || (this.on("formLoaded", function () { this.getInputElement().on("change", function () { this.fire("change", { value: this.getValue() }) }, this) }, this), this._.domOnChangeRegistered = !0), this.on("change", t) } }, keyboardFocusable: !0 }, !0), CKEDITOR.ui.dialog.fileButton.prototype = new CKEDITOR.ui.dialog.button, CKEDITOR.ui.dialog.fieldset.prototype = CKEDITOR.tools.clone(CKEDITOR.ui.dialog.hbox.prototype), CKEDITOR.dialog.addUIElement("text", t),
141                    CKEDITOR.dialog.addUIElement("password", t), CKEDITOR.dialog.addUIElement("textarea", n), CKEDITOR.dialog.addUIElement("checkbox", n), CKEDITOR.dialog.addUIElement("radio", n), CKEDITOR.dialog.addUIElement("button", n), CKEDITOR.dialog.addUIElement("select", n), CKEDITOR.dialog.addUIElement("file", n), CKEDITOR.dialog.addUIElement("fileButton", n), CKEDITOR.dialog.addUIElement("html", n), CKEDITOR.dialog.addUIElement("fieldset", { build: function (e, t, n) { for (var i, o = t.children, r = [], s = [], a = 0; a < o.length && (i = o[a]); a++) { var l = []; r.push(l), s.push(CKEDITOR.dialog._.uiElementBuilders[i.type].build(e, i, l)) } return new CKEDITOR.ui.dialog[t.type](e, s, r, n, t) } })
142            }
143        }), CKEDITOR.DIALOG_RESIZE_NONE = 0, CKEDITOR.DIALOG_RESIZE_WIDTH = 1, CKEDITOR.DIALOG_RESIZE_HEIGHT = 2, CKEDITOR.DIALOG_RESIZE_BOTH = 3, CKEDITOR.DIALOG_STATE_IDLE = 1, CKEDITOR.DIALOG_STATE_BUSY = 2, function () {
144            function e() { for (var e = this._.tabIdList.length, t = CKEDITOR.tools.indexOf(this._.tabIdList, this._.currentTabId) + e, n = t - 1; n > t - e; n--)if (this._.tabs[this._.tabIdList[n % e]][0].$.offsetHeight) return this._.tabIdList[n % e]; return null } function t() { for (var e = this._.tabIdList.length, t = CKEDITOR.tools.indexOf(this._.tabIdList, this._.currentTabId), n = t + 1; t + e > n; n++)if (this._.tabs[this._.tabIdList[n % e]][0].$.offsetHeight) return this._.tabIdList[n % e]; return null } function n(e, t) { for (var n = e.$.getElementsByTagName("input"), i = 0, o = n.length; o > i; i++) { var r = new CKEDITOR.dom.element(n[i]); "text" == r.getAttribute("type").toLowerCase() && (t ? (r.setAttribute("value", r.getCustomData("fake_value") || ""), r.removeCustomData("fake_value")) : (r.setCustomData("fake_value", r.getAttribute("value")), r.setAttribute("value", ""))) } } function i(e, t) { var n = this.getInputElement(); n && (e ? n.removeAttribute("aria-invalid") : n.setAttribute("aria-invalid", !0)), e || (this.select ? this.select() : this.focus()), t && alert(t), this.fire("validated", { valid: e, msg: t }) } function o() { var e = this.getInputElement(); e && e.removeAttribute("aria-invalid") } function r(e) { var t = CKEDITOR.dom.element.createFromHtml(CKEDITOR.addTemplate("dialog", m).output({ id: CKEDITOR.tools.getNextNumber(), editorId: e.id, langDir: e.lang.dir, langCode: e.langCode, editorDialogClass: "cke_editor_" + e.name.replace(/\./g, "\\.") + "_dialog", closeTitle: e.lang.common.close, hidpi: CKEDITOR.env.hidpi ? "cke_hidpi" : "" })), n = t.getChild([0, 0, 0, 0, 0]), i = n.getChild(0), o = n.getChild(1); return e.plugins.clipboard && CKEDITOR.plugins.clipboard.preventDefaultDropOnElement(n), !CKEDITOR.env.ie || CKEDITOR.env.quirks || CKEDITOR.env.edge || (e = "javascript:void(function(){" + encodeURIComponent("document.open();(" + CKEDITOR.tools.fixDomain + ")();document.close();") + "}())", CKEDITOR.dom.element.createFromHtml('<iframe frameBorder="0" class="cke_iframe_shim" src="' + e + '" tabIndex="-1"></iframe>').appendTo(n.getParent())), i.unselectable(), o.unselectable(), { element: t, parts: { dialog: t.getChild(0), title: i, close: o, tabs: n.getChild(2), contents: n.getChild([3, 0, 0, 0]), footer: n.getChild([3, 0, 1, 0]) } } } function s(e, t, n) { this.element = t, this.focusIndex = n, this.tabIndex = 0, this.isFocusable = function () { return !t.getAttribute("disabled") && t.isVisible() }, this.focus = function () { e._.currentFocusIndex = this.focusIndex, this.element.focus() }
144, t.on("keydown", function (e) { e.data.getKeystroke() in { 32: 1, 13: 1 } && this.fire("click") }), t.on("focus", function () { this.fire("mouseover") }), t.on("blur", function () { this.fire("mouseout") }) } function a(e) { function t() { e.layout() } var n = CKEDITOR.document.getWindow(); n.on("resize", t), e.on("hide", function () { n.removeListener("resize", t) }) } function l(e, t) { this._ = { dialog: e }, CKEDITOR.tools.extend(this, t) } function c(e) { function t(t) { var n = e.getSize(), l = CKEDITOR.document.getWindow().getViewPaneSize(), c = t.data.$.screenX, d = t.data.$.screenY, u = c - i.x, h = d - i.y; i = { x: c, y: d }, o.x += u, o.y += h, e.move(o.x + a[3] < s ? -a[3] : o.x - a[1] > l.width - n.width - s ? l.width - n.width + ("rtl" == r.lang.dir ? 0 : a[1]) : o.x, o.y + a[0] < s ? -a[0] : o.y - a[2] > l.height - n.height - s ? l.height - n.height + a[2] : o.y, 1), t.data.preventDefault() } function n() { if (CKEDITOR.document.removeListener("mousemove", t), CKEDITOR.document.removeListener("mouseup", n), CKEDITOR.env.ie6Compat) { var e = C.getChild(0).getFrameDocument(); e.removeListener("mousemove", t), e.removeListener("mouseup", n) } } var i = null, o = null, r = e.getParentEditor(), s = r.config.dialog_magnetDistance, a = CKEDITOR.skin.margins || [0, 0, 0, 0]; "undefined" == typeof s && (s = 20), e.parts.title.on("mousedown", function (r) { if (i = { x: r.data.$.screenX, y: r.data.$.screenY }, CKEDITOR.document.on("mousemove", t), CKEDITOR.document.on("mouseup", n), o = e.getPosition(), CKEDITOR.env.ie6Compat) { var s = C.getChild(0).getFrameDocument(); s.on("mousemove", t), s.on("mouseup", n) } r.data.preventDefault() }, e) } function d(e) { function t(t) { var n = "rtl" == u.lang.dir, d = c.width, h = c.height, p = d + (t.data.$.screenX - l.x) * (n ? -1 : 1) * (e._.moved ? 1 : 2), f = h + (t.data.$.screenY - l.y) * (e._.moved ? 1 : 2), m = e._.element.getFirst(), m = n && m.getComputedStyle("right"), g = e.getPosition(); g.y + f > a.height && (f = a.height - g.y), (n ? m : g.x) + p > a.width && (p = a.width - (n ? m : g.x)), o != CKEDITOR.DIALOG_RESIZE_WIDTH && o != CKEDITOR.DIALOG_RESIZE_BOTH || (d = Math.max(i.minWidth || 0, p - r)), o != CKEDITOR.DIALOG_RESIZE_HEIGHT && o != CKEDITOR.DIALOG_RESIZE_BOTH || (h = Math.max(i.minHeight || 0, f - s)), e.resize(d, h), e._.moved || e.layout(), t.data.preventDefault() } function n() { if (CKEDITOR.document.removeListener("mouseup", n), CKEDITOR.document.removeListener("mousemove", t), d && (d.remove(), d = null), CKEDITOR.env.ie6Compat) { var e = C.getChild(0).getFrameDocument(); e.removeListener("mouseup", n), e.removeListener("mousemove", t) } } var i = e.definition, o = i.resizable; if (o != CKEDITOR.DIALOG_RESIZE_NONE) { var r, s, a, l, c, d, u = e.getParentEditor(), h = CKEDITOR.tools.addFunction(function (i) { c = e.getSize(); var o = e.parts.contents; o.$.getElementsByTagName("iframe").length && (d = CKEDITOR.dom.element.createFromHtml('<div class="cke_dialog_resize_cover" style="height: 100%; position: absolute; width: 100%;"></div>'), o.append(d)), s = c.height - e.parts.contents.getSize("height", !(CKEDITOR.env.gecko || CKEDITOR.env.ie && CKEDITOR.env.quirks)), r = c.width - e.parts.contents.getSize("width", 1), l = { x: i.screenX, y: i.screenY }, a = CKEDITOR.document.getWindow().getViewPaneSize(), CKEDITOR.document.on("mousemove", t), CKEDITOR.document.on("mouseup", n), CKEDITOR.env.ie6Compat && (o = C.getChild(0).getFrameDocument(), o.on("mousemove", t), o.on("mouseup", n)), i.preventDefault && i.preventDefault() }); e.on("load", function () { var t = ""; o == CKEDITOR.DIALOG_RESIZE_WIDTH ? t = " cke_resizer_horizontal" : o == CKEDITOR.DIALOG_RESIZE_HEIGHT && (t = " cke_resizer_vertical"), t = CKEDITOR.dom.element.createFromHtml('<div class="cke_resizer' + t + " cke_resizer_" + u.lang.dir + '" title="' + CKEDITOR.tools.htmlEncode(u.lang.common.resize) + '" onmousedown="CKEDITOR.tools.callFunction(' + h + ', event )">' + ("ltr" == u.lang.dir ? "\u25e2" : "\u25e3") + "</div>"), e.parts.footer.append(t, 1) }), u.on("destroy", function () { CKEDITOR.tools.removeFunction(h) }) } } function u(e) { e.data.preventDefault(1) } function h(e) { var t = CKEDITOR.document.getWindow(), n = e.config, i = CKEDITOR.skinName || e.config.skin, o = n.dialog_backgroundCoverColor || ("moono-lisa" == i ? "black" : "white"), i = n.dialog_backgroundCoverOpacity, r = n.baseFloatZIndex, n = CKEDITOR.tools.genKey(o, i, r), s = _[n]; s ? s.show() : (r = ['<div tabIndex="-1" style="position: ', CKEDITOR.env.ie6Compat ? "absolute" : "fixed", "; z-index: ", r, "; top: 0px; left: 0px; ", CKEDITOR.env.ie6Compat ? "" : "background-color: " + o, '" class="cke_dialog_background_cover">'], CKEDITOR.env.ie6Compat && (o = "<html><body style=\\'background-color:" + o + ";\\'></body></html>", r.push('<iframe hidefocus="true" frameborder="0" id="cke_dialog_background_iframe" src="javascript:'), r.push("void((function(){" + encodeURIComponent("document.open();(" + CKEDITOR.tools.fixDomain + ")();document.write( '" + o + "' );document.close();") + "})())"), r.push('" style="position:absolute;
144left:0;top:0;width:100%;height: 100%;filter: progid:DXImageTransform.Microsoft.Alpha(opacity=0)"></iframe>')), r.push("</div>"), s = CKEDITOR.dom.element.createFromHtml(r.join("")), s.setOpacity(void 0 !== i ? i : .5), s.on("keydown", u), s.on("keypress", u), s.on("keyup", u), s.appendTo(CKEDITOR.document.getBody()), _[n] = s), e.focusManager.add(s), C = s, e = function () { var e = t.getViewPaneSize(); s.setStyles({ width: e.width + "px", height: e.height + "px" }) }; var a = function () { var e = t.getScrollPosition(), n = CKEDITOR.dialog._.currentTop; if (s.setStyles({ left: e.x + "px", top: e.y + "px" }), n) do e = n.getPosition(), n.move(e.x, e.y); while (n = n._.parentDialog) }; if (b = e, t.on("resize", e), e(), CKEDITOR.env.mac && CKEDITOR.env.webkit || s.focus(), CKEDITOR.env.ie6Compat) { var l = function () { a(), arguments.callee.prevScrollHandler.apply(this, arguments) }; t.$.setTimeout(function () { l.prevScrollHandler = window.onscroll || function () { }, window.onscroll = l }, 0), a() } } function p(e) { C && (e.focusManager.remove(C), e = CKEDITOR.document.getWindow(), C.hide(), e.removeListener("resize", b), CKEDITOR.env.ie6Compat && e.$.setTimeout(function () { window.onscroll = window.onscroll && window.onscroll.prevScrollHandler || null }, 0), b = null) } var f = CKEDITOR.tools.cssLength, m = '<div class="cke_reset_all {editorId} {editorDialogClass} {hidpi}" dir="{langDir}" lang="{langCode}" role="dialog" aria-labelledby="cke_dialog_title_{id}"><table class="cke_dialog ' + CKEDITOR.env.cssClass + ' cke_{langDir}" style="position:absolute" role="presentation"><tr><td role="presentation"><div class="cke_dialog_body" role="presentation"><div id="cke_dialog_title_{id}" class="cke_dialog_title" role="presentation"></div><a id="cke_dialog_close_button_{id}" class="cke_dialog_close_button" href="javascript:void(0)" title="{closeTitle}" role="button"><span class="cke_label">X</span></a><div id="cke_dialog_tabs_{id}" class="cke_dialog_tabs" role="tablist"></div><table class="cke_dialog_contents" role="presentation"><tr><td id="cke_dialog_contents_{id}" class="cke_dialog_contents_body" role="presentation"></td></tr><tr><td id="cke_dialog_footer_{id}" class="cke_dialog_footer" role="presentation"></td></tr></table></div></td></tr></table></div>'; CKEDITOR.dialog = function (n, s) { function a() { var e = _._.focusList; e.sort(function (e, t) { return e.tabIndex != t.tabIndex ? t.tabIndex - e.tabIndex : e.focusIndex - t.focusIndex }); for (var t = e.length, n = 0; t > n; n++)e[n].focusIndex = n } function l(e) { var t = _._.focusList; if (e = e || 0, !(1 > t.length)) { var n = _._.currentFocusIndex; _._.tabBarMode && 0 > e && (n = 0); try { t[n].getInputElement().$.blur() } catch (i) { } var o = n, r = 1 < _._.pageCount; do { if (o += e, r && !_._.tabBarMode && (o == t.length || -1 == o)) return _._.tabBarMode = !0, _._.tabs[_._.currentTabId][0].focus(), void (_._.currentFocusIndex = -1); if (o = (o + t.length) % t.length, o == n) break } while (e && !t[o].isFocusable()); t[o].focus(), "text" == t[o].type && t[o].select() } } function u(i) { if (_ == CKEDITOR.dialog._.currentTop) { var o = i.data.getKeystroke(), r = "rtl" == n.lang.dir, s = [37, 38, 39, 40];
144 if (p = f = 0, 9 == o || o == CKEDITOR.SHIFT + 9) l(o == CKEDITOR.SHIFT + 9 ? -1 : 1), p = 1; else if (o == CKEDITOR.ALT + 121 && !_._.tabBarMode && 1 < _.getPageCount()) _._.tabBarMode = !0, _._.tabs[_._.currentTabId][0].focus(), _._.currentFocusIndex = -1, p = 1; else if (-1 != CKEDITOR.tools.indexOf(s, o) && _._.tabBarMode) o = -1 != CKEDITOR.tools.indexOf([r ? 39 : 37, 38], o) ? e.call(_) : t.call(_), _.selectPage(o), _._.tabs[o][0].focus(), p = 1; else if (13 != o && 32 != o || !_._.tabBarMode) if (13 == o) o = i.data.getTarget(), o.is("a", "button", "select", "textarea") || o.is("input") && "button" == o.$.type || ((o = this.getButton("ok")) && CKEDITOR.tools.setTimeout(o.click, 0, o), p = 1), f = 1; else { if (27 != o) return; (o = this.getButton("cancel")) ? CKEDITOR.tools.setTimeout(o.click, 0, o) : !1 !== this.fire("cancel", { hide: !0 }).hide && this.hide(), f = 1 } else this.selectPage(this._.currentTabId), this._.tabBarMode = !1, this._.currentFocusIndex = -1, l(1), p = 1; h(i) } } function h(e) { p ? e.data.preventDefault(1) : f && e.data.stopPropagation() } var p, f, m = CKEDITOR.dialog._.dialogDefinitions[s], v = CKEDITOR.tools.clone(g), E = n.config.dialog_buttonsOrder || "OS", T = n.lang.dir, b = {}; if (("OS" == E && CKEDITOR.env.mac || "rtl" == E && "ltr" == T || "ltr" == E && "rtl" == T) && v.buttons.reverse(), m = CKEDITOR.tools.extend(m(n), v), m = CKEDITOR.tools.clone(m), m = new y(this, m), v = r(n), this._ = { editor: n, element: v.element, name: s, contentSize: { width: 0, height: 0 }, size: { width: 0, height: 0 }, contents: {}, buttons: {}, accessKeyMap: {}, tabs: {}, tabIdList: [], currentTabId: null, currentTabIndex: null, pageCount: 0, lastTab: null, tabBarMode: !1, focusList: [], currentFocusIndex: 0, hasFocus: !1 }, this.parts = v.parts, CKEDITOR.tools.setTimeout(function () { n.fire("ariaWidget", this.parts.contents) }, 0, this), v = { position: CKEDITOR.env.ie6Compat ? "absolute" : "fixed", top: 0, visibility: "hidden" }, v["rtl" == T ? "right" : "left"] = 0, this.parts.dialog.setStyles(v), CKEDITOR.event.call(this), this.definition = m = CKEDITOR.fire("dialogDefinition", { name: s, definition: m }, n).definition, !("removeDialogTabs" in n._) && n.config.removeDialogTabs) { for (v = n.config.removeDialogTabs.split(";"), T = 0; T < v.length; T++)if (E = v[T].split(":"), 2 == E.length) { var C = E[0]; b[C] || (b[C] = []), b[C].push(E[1]) } n._.removeDialogTabs = b } if (n._.removeDialogTabs && (b = n._.removeDialogTabs[s])) for (T = 0; T < b.length; T++)m.removeContents(b[T]); m.onLoad && this.on("load", m.onLoad), m.onShow && this.on("show", m.onShow), m.onHide && this.on("hide", m.onHide), m.onOk && this.on("ok", function (e) { n.fire("saveSnapshot"), setTimeout(function () { n.fire("saveSnapshot") }, 0), !1 === m.onOk.call(this, e) && (e.data.hide = !1) }), this.state = CKEDITOR.DIALOG_STATE_IDLE, m.onCancel && this.on("cancel", function (e) { !1 === m.onCancel.call(this, e) && (e.data.hide = !1) }); var _ = this, I = function (e) { var t, n = _._.contents, i = !1; for (t in n) for (var o in n[t]) if (i = e.call(this, n[t][o])) return }; this.on("ok", function (e) { I(function (t) { if (t.validate) { var n = t.validate(this), o = "string" == typeof n || !1 === n; return o && (e.data.hide = !1, e.stop()), i.call(t, !o, "string" == typeof n ? n : void 0), o } }) }, this, null, 0), this.on("cancel", function (e) { I(function (t) { return t.isChanged() ? (n.config.dialog_noConfirmCancel || confirm(n.lang.common.confirmCancel) || (e.data.hide = !1), !0) : void 0 }) }, this, null, 0), this.parts.close.on("click", function (e) { !1 !== this.fire("cancel", { hide: !0 }).hide && this.hide(), e.data.preventDefault() }, this), this.changeFocus = l; var O = this._.element; for (n.focusManager.add(O, 1), this.on("show", function () { O.on("keydown", u, this), CKEDITOR.env.gecko && O.on("keypress", h, this) }), this.on("hide", function () { O.removeListener("keydown", u), CKEDITOR.env.gecko && O.removeListener("keypress", h), I(function (e) { o.apply(e) }) }), this.on("iframeAdded", function (e) { new CKEDITOR.dom.document(e.data.iframe.$.contentWindow.document).on("keydown", u, this, null, 0) }), this.on("show", function () { a(); var e = 1 < _._.pageCount; n.config.dialog_startupFocusTab && e ? (_._.tabBarMode = !0, _._.tabs[_._.currentTabId][0].focus(), _._.currentFocusIndex = -1) : this._.hasFocus || (this._.currentFocusIndex = e ? -1 : this._.focusList.length - 1, m.onFocus ? (e = m.onFocus.c
144all(this)) && e.focus() : l(1)) }, this, null, 4294967295), CKEDITOR.env.ie6Compat && this.on("load", function () { var e = this.getElement(), t = e.getFirst(); t.remove(), t.appendTo(e) }, this), c(this), d(this), new CKEDITOR.dom.text(m.title, CKEDITOR.document).appendTo(this.parts.title), T = 0; T < m.contents.length; T++)(b = m.contents[T]) && this.addPage(b); for (this.parts.tabs.on("click", function (e) { var t = e.data.getTarget(); t.hasClass("cke_dialog_tab") && (t = t.$.id, this.selectPage(t.substring(4, t.lastIndexOf("_"))), this._.tabBarMode && (this._.tabBarMode = !1, this._.currentFocusIndex = -1, l(1)), e.data.preventDefault()) }, this), T = [], b = CKEDITOR.dialog._.uiElementBuilders.hbox.build(this, { type: "hbox", className: "cke_dialog_footer_buttons", widths: [], children: m.buttons }, T).getChild(), this.parts.footer.setHtml(T.join("")), T = 0; T < b.length; T++)this._.buttons[b[T].id] = b[T] }, CKEDITOR.dialog.prototype = { destroy: function () { this.hide(), this._.element.remove() }, resize: function () { return function (e, t) { this._.contentSize && this._.contentSize.width == e && this._.contentSize.height == t || (CKEDITOR.dialog.fire("resize", { dialog: this, width: e, height: t }, this._.editor), this.fire("resize", { width: e, height: t }, this._.editor), this.parts.contents.setStyles({ width: e + "px", height: t + "px" }), "rtl" == this._.editor.lang.dir && this._.position && (this._.position.x = CKEDITOR.document.getWindow().getViewPaneSize().width - this._.contentSize.width - parseInt(this._.element.getFirst().getStyle("right"), 10)), this._.contentSize = { width: e, height: t }) } }(), getSize: function () { var e = this._.element.getFirst(); return { width: e.$.offsetWidth || 0, height: e.$.offsetHeight || 0 } }, move: function (e, t, n) { var i = this._.element.getFirst(), o = "rtl" == this._.editor.lang.dir, r = "fixed" == i.getComputedStyle("position"); CKEDITOR.env.ie && i.setStyle("zoom", "100%"), r && this._.position && this._.position.x == e && this._.position.y == t || (this._.position = { x: e, y: t }, r || (r = CKEDITOR.document.getWindow().getScrollPosition(), e += r.x, t += r.y), o && (r = this.getSize(), e = CKEDITOR.document.getWindow().getViewPaneSize().width - r.width - e), t = { top: (t > 0 ? t : 0) + "px" }, t[o ? "right" : "left"] = (e > 0 ? e : 0) + "px", i.setStyles(t), n && (this._.moved = 1)) }, getPosition: function () { return CKEDITOR.tools.extend({}, this._.position) }, show: function () { var e = this._.element, t = this.definition; e.getParent() && e.getParent().equals(CKEDITOR.document.getBody()) ? e.setStyle("display", "block") : e.appendTo(CKEDITOR.document.getBody()), this.resize(this._.contentSize && this._.contentSize.width || t.width || t.minWidth, this._.contentSize && this._.contentSize.height || t.height || t.minHeight), this.reset(), this.selectPage(this.definition.contents[0].id), null === CKEDITOR.dialog._.currentZIndex && (CKEDITOR.dialog._.currentZIndex = this._.editor.config.baseFloatZIndex), this._.element.getFirst().setStyle("z-index", CKEDITOR.dialog._.currentZIndex += 10), null === CKEDITOR.dialog._.currentTop ? (CKEDITOR.dialog._.currentTop = this, this._.parentDialog = null, h(this._.editor)) : (this._.parentDialog = CKEDITOR.dialog._.currentTop, this._.parentDialog.getElement().getFirst().$.style.zIndex -= Math.floor(this._.editor.config.baseFloatZIndex / 2), CKEDITOR.dialog._.currentTop = this), e.on("keydown", O), e.on("keyup", D), this._.hasFocus = !1; for (var n in t.contents) if (t.contents[n]) { var e = t.contents[n], i = this._.tabs[e.id], o = e.requiredContent, r = 0; if (i) { for (var s in this._.contents[e.id]) { var l = this._.contents[e.id][s]; "hbox" != l.type && "vbox" != l.type && l.getInputElement() && (l.requiredContent && !this._.editor.activeFilter.check(l.requiredContent) ? l.disable() : (l.enable(), r++)) } !r || o && !this._.editor.activeFilter.check(o) ? i[0].addClass("cke_dialog_tab_disabled") : i[0].removeClass("cke_dialog_tab_disabled") } } CKEDITOR.tools.setTimeout(function () { this.layout(), a(this), this.parts.dialog.setStyle("visibility", ""), this.fireOnce("load", {}), CKEDITOR.ui.fire("ready", this), this.fire("show", {}), this._.editor.fire("dialogShow", this), this._.parentDialog || this._.editor.focusManager.lock(), this.foreach(function (e) { e.setInitValue && e.setInitValue() }) }, 100, this) }
144, layout: function () { var e = this.parts.dialog, t = this.getSize(), n = CKEDITOR.document.getWindow().getViewPaneSize(), i = (n.width - t.width) / 2, o = (n.height - t.height) / 2; CKEDITOR.env.ie6Compat || (t.height + (o > 0 ? o : 0) > n.height || t.width + (i > 0 ? i : 0) > n.width ? e.setStyle("position", "absolute") : e.setStyle("position", "fixed")), this.move(this._.moved ? this._.position.x : i, this._.moved ? this._.position.y : o) }, foreach: function (e) { for (var t in this._.contents) for (var n in this._.contents[t]) e.call(this, this._.contents[t][n]); return this }, reset: function () { var e = function (e) { e.reset && e.reset(1) }; return function () { return this.foreach(e), this } }(), setupContent: function () { var e = arguments; this.foreach(function (t) { t.setup && t.setup.apply(t, e) }) }, commitContent: function () { var e = arguments; this.foreach(function (t) { CKEDITOR.env.ie && this._.currentFocusIndex == t.focusIndex && t.getInputElement().$.blur(), t.commit && t.commit.apply(t, e) }) }, hide: function () { if (this.parts.dialog.isVisible()) { this.fire("hide", {}), this._.editor.fire("dialogHide", this), this.selectPage(this._.tabIdList[0]); var e = this._.element; for (e.setStyle("display", "none"), this.parts.dialog.setStyle("visibility", "hidden"), k(this); CKEDITOR.dialog._.currentTop != this;)CKEDITOR.dialog._.currentTop.hide(); if (this._.parentDialog) { var t = this._.parentDialog.getElement().getFirst(); t.setStyle("z-index", parseInt(t.$.style.zIndex, 10) + Math.floor(this._.editor.config.baseFloatZIndex / 2)) } else p(this._.editor); if (CKEDITOR.dialog._.currentTop = this._.parentDialog) CKEDITOR.dialog._.currentZIndex -= 10; else { CKEDITOR.dialog._.currentZIndex = null, e.removeListener("keydown", O), e.removeListener("keyup", D); var n = this._.editor; n.focus(), setTimeout(function () { n.focusManager.unlock(), CKEDITOR.env.iOS && n.window.focus() }, 0) } delete this._.parentDialog, this.foreach(function (e) { e.resetInitValue && e.resetInitValue() }), this.setState(CKEDITOR.DIALOG_STATE_IDLE) } }, addPage: function (e) { if (!e.requiredContent || this._.editor.filter.check(e.requiredContent)) { for (var t = [], n = e.label ? ' title="' + CKEDITOR.tools.htmlEncode(e.label) + '"' : "", i = CKEDITOR.dialog._.uiElementBuilders.vbox.build(this, { type: "vbox", className: "cke_dialog_page_contents", children: e.elements, expand: !!e.expand, padding: e.padding, style: e.style || "width: 100%;" }, t), o = this._.contents[e.id] = {}, r = i.getChild(), s = 0; i = r.shift();)i.notAllowed || "hbox" == i.type || "vbox" == i.type || s++, o[i.id] = i, "function" == typeof i.getChild && r.push.apply(r, i.getChild()); s || (e.hidden = !0), t = CKEDITOR.dom.element.createFromHtml(t.join("")), t.setAttribute("role", "tabpanel"), i = CKEDITOR.env, o = "cke_" + e.id + "_" + CKEDITOR.tools.getNextNumber(), n = CKEDITOR.dom.element.createFromHtml(['<a class="cke_dialog_tab"', 0 < this._.pageCount ? " cke_last" : "cke_first", n, e.hidden ? ' style="display:none"' : "", ' id="', o, '"', i.gecko && !i.hc ? "" : ' href="javascript:void(0)"', ' tabIndex="-1" hidefocus="true" role="tab">', e.label, "</a>"].join("")), t.setAttribute("aria-labelledby", o), this._.tabs[e.id] = [n, t], this._.tabIdList.push(e.id), !e.hidden && this._.pageCount++, this._.lastTab = n, this.updateStyle(), t.setAttribute("name", e.id), t.appendTo(this.parts.contents), n.unselectable(), this.parts.tabs.append(n), e.accessKey && (R(this, this, "CTRL+" + e.accessKey, x, w), this._.accessKeyMap["CTRL+" + e.accessKey] = e.id) } }, selectPage: function (e) { if (this._.currentTabId != e && !this._.tabs[e][0].hasClass("cke_dialog_tab_disabled") && !1 !== this.fire("selectPage", { page: e, currentPage: this._.currentTabId })) { for (var t in this._.tabs) { var i = this._.tabs[t][0], o = this._.tabs[t][1]; t != e && (i.removeClass("cke_dialog_tab_selected"), o.hide()), o.setAttribute("aria-hidden", t != e) } var r = this._.tabs[e]; r[0].addClass("cke_dialog_tab_selected"), CKEDITOR.env.ie6Compat || CKEDITOR.env.ie7Compat ? (n(r[1]), r[1].show(), setTimeout(function () { n(r[1], 1) }, 0)) : r[1].show(), this._.currentTabId = e, this._.currentTabIndex = CKEDITOR.tools.indexOf(this._.tabIdList, e) } }, updateStyle: function () { this.parts.dialog[(1 === this._.pageCount ? "add" : "remove") + "Class"]("cke_single_page") }, hidePage: function (t) { var n = this._.tabs[t] && this._.tabs[t][0]; n && 1 != this._.pageCount && n.isVisible() && (t == this._.currentTabId && this.selectPage(e.call(this)), n.hide(), this._.pageCount--, this.updateStyle()) }, showPage: function (e) { (e = this._.tabs[e] && this._.tabs[e][0]) && (e.show(), this._.pageCount++, this.updateStyle()) }, getElement: function () { return this._.element }, getName: function () { return this._.name }, getContentElement: function (e, t) { var n = this._.contents[e]; return n && n[t] }, getValueOf: function (e, t) { return this.getContentElement(e, t).getValue() }, setValueOf: function (e, t, n) { return this.getContentElement(e, t).setValue(n) }, getButton: function (e) { return this._.buttons[e] }, click: function (e) { return this._.buttons[e].click() }, disableButton: function (e) { return this._.buttons[e].disable() }, enableButton: function (e) { return this._.buttons[e].enable() }, getPageCount: function () { return this._.pageCount }, getParentEditor: function () { return this._.editor }, getSelectedElement: function () { return this.getParentEditor().getSelection().getSelectedElement() }, addFocusable: function (e, t) { if ("undefined" == typeof t) t = this._.focusList.length, this._.focusList.push(new s(this, e, t)); else { this._.focusList.splice(t, 0, new s(this, e, t)); for (var n = t + 1; n < this._.focusList.length; n++)this._.focusList[n].focusIndex++ } }, setState: function (e) { if (this.state != e) { if (this.state = e, e == CKEDITOR.DIALOG_STATE_BUSY) { if (!this.parts.spinner) { var t = this.getParentEditor().lang.dir, n = { attributes: { "class": "cke_dialog_spinner" }, styles: { "float": "rtl" == t ? "right" : "left" } }; n.styles["margin-" + ("rtl" == t ? "left" : "right")] = "8px", this.parts.spinner = CKEDITOR.document.createElement("div", n), this.parts.spinner.setHtml("&#8987;"), this.parts.spinner.appendTo(this.parts.title, 1) } this.parts.spinner.show(), this.getButton("ok").disable() } else e == CKEDITOR.DIALOG_STATE_IDLE && (this.parts.spinner && this.parts.spinner.hide(), this.getButton("ok").enable()); this.fire("state", e) } } }, CKEDITOR.tools.extend(CKEDITOR.dialog, { add: function (e, t) { this._.dialogDefinitions[e] && "function" != typeof t || (this._.dialogDefinitions[e] = t) }, exists: function (e) { return !!this._.dialogDefinitions[e] }, getCurrent: function () { return CKEDITOR.dialog._.currentTop }, isTabEnabled: function (e, t, n) { return e = e.config.removeDialogTabs, !(e && e.match(new RegExp("(?:^|;)" + t + ":" + n + "(?:$|;)", "i"))) }, okButton: function () { var e = function (e, t) { return t = t || {}, CKEDITOR.tools.extend({ id: "ok", type: "button", label: e.lang.common.ok, "class": "cke_dialog_ui_button_ok", onClick: function (e) { e = e.data.dialog, !1 !== e.fire("ok", { hide: !0 }).hide && e.hide() } }, t, !0) }; return e.type = "button", e.override = function (t) { return CKEDITOR.tools.extend(function (n) { return e(n, t) }, { type: "button" }, !0) }, e }(), cancelButton: function () { var e = function (e, t) { return t = t || {}, CKEDITOR.tools.extend({ id: "cancel", type: "button", label: e.lang.common.cancel, "class": "cke_dialog_ui_button_cancel", onClick: function (e) { e = e.data.dialog, !1 !== e.fire("cancel", { hide: !0 }).hide && e.hide() } }, t, !0) }; return e.type = "button", e.override = function (t) { return CKEDITOR.tools.extend(function (n) { return e(n, t) }, { type: "button" }, !0) }, e }(), addUIElement: function (e, t) { this._.uiElementBuilders[e] = t } }), CKEDITOR.dialog._ = { uiElementBuilders: {}, dialogDefinitions: {}, currentTop: null, currentZIndex: null }, CKEDITOR.event.implementOn(CKEDITOR.dialog), CKEDITOR.event.implementOn(CKEDITOR.dialog.prototype); var g = { resizable: CKEDITOR.DIALOG_RESIZE_BOTH, minWidth: 600, minHeight: 400, buttons: [CKEDITOR.dialog.okButton, CKEDITOR.dialog.cancelButton] }, v = function (e, t, n) { for (var i, o = 0; i = e[o]; o++)if (i.id == t || n && i[n] && (i = v(i[n], t, n))) return i; return null }, E = function (e, t, n, i, o) { if (n) { for (var r, s = 0; r = e[s]; s++) { if (r.id == n) return e.splice(s, 0, t), t; if (i && r[i] && (r = E(r[i], t, n, i, !0))) return r } if (o) return null } return e.push(t), t }, T = function (e, t, n) { for (var i, o = 0; i = e[o]; o++) { if (i.id == t) return e.splice(o, 1); if (n && i[n] && (i = T(i[n], t, n))) return i } return null }, y = function (e, t) { this.dialog = e; for (var n, i = t.contents, o = 0; n = i[o]; o++)i[o] = n && new l(e, n); CKEDITOR.tools.extend(this, t) }; y.prototype = { getContents: function (e) { return v(this.contents, e) }, getButton: function (e) { return v(this.buttons, e) }, addContents: function (e, t) { return E(this.contents, e, t) }, addButton: function (e, t) { return E(this.buttons, e, t) }, removeContents: function (e) { T(this.contents, e) }, removeButton: function (e) { T(this.buttons, e) } }, l.prototype = { get: function (e) { return v(this.elements, e, "children") }, add: function (e, t) { return E(this.elements, e, t, "children") }, remove: function (e) { T(this.elements, e, "children") } }; var b, C, _ = {}, I = {}, O = function (e) { var t = e.data.$.ctrlKey || e.data.$.metaKey, n = e.data.$.altKey, i = e.data.$.shiftKey, o = String.fromCharCode(e.data.$.keyCode);
144 (t = I[(t ? "CTRL+" : "") + (n ? "ALT+" : "") + (i ? "SHIFT+" : "") + o]) && t.length && (t = t[t.length - 1], t.keydown && t.keydown.call(t.uiElement, t.dialog, t.key), e.data.preventDefault()) }, D = function (e) { var t = e.data.$.ctrlKey || e.data.$.metaKey, n = e.data.$.altKey, i = e.data.$.shiftKey, o = String.fromCharCode(e.data.$.keyCode); (t = I[(t ? "CTRL+" : "") + (n ? "ALT+" : "") + (i ? "SHIFT+" : "") + o]) && t.length && (t = t[t.length - 1], t.keyup && (t.keyup.call(t.uiElement, t.dialog, t.key), e.data.preventDefault())) }, R = function (e, t, n, i, o) { (I[n] || (I[n] = [])).push({ uiElement: e, dialog: t, key: n, keyup: o || e.accessKeyUp, keydown: i || e.accessKeyDown }) }, k = function (e) { for (var t in I) { for (var n = I[t], i = n.length - 1; i >= 0; i--)n[i].dialog != e && n[i].uiElement != e || n.splice(i, 1); 0 === n.length && delete I[t] } }, w = function (e, t) { e._.accessKeyMap[t] && e.selectPage(e._.accessKeyMap[t]) }, x = function () { }; !function () { CKEDITOR.ui.dialog = { uiElement: function (e, t, n, i, o, r, s) { if (!(4 > arguments.length)) { var a = (i.call ? i(t) : i) || "div", l = ["<", a, " "], c = (o && o.call ? o(t) : o) || {}, d = (r && r.call ? r(t) : r) || {}, u = (s && s.call ? s.call(this, e, t) : s) || "", h = this.domId = d.id || CKEDITOR.tools.getNextId() + "_uiElement"; t.requiredContent && !e.getParentEditor().filter.check(t.requiredContent) && (c.display = "none", this.notAllowed = !0), d.id = h; var p = {}; t.type && (p["cke_dialog_ui_" + t.type] = 1), t.className && (p[t.className] = 1), t.disabled && (p.cke_disabled = 1); for (var f = d["class"] && d["class"].split ? d["class"].split(" ") : [], h = 0; h < f.length; h++)f[h] && (p[f[h]] = 1); f = []; for (h in p) f.push(h); d["class"] = f.join(" "), t.title && (d.title = t.title), p = (t.style || "").split(";"), t.align && (f = t.align, c["margin-left"] = "left" == f ? 0 : "auto", c["margin-right"] = "right" == f ? 0 : "auto"); for (h in c) p.push(h + ":" + c[h]); for (t.hidden && p.push("display:none"), h = p.length - 1; h >= 0; h--)"" === p[h] && p.splice(h, 1); 0 < p.length && (d.style = (d.style ? d.style + "; " : "") + p.join("; ")); for (h in d) l.push(h + '="' + CKEDITOR.tools.htmlEncode(d[h]) + '" '); l.push(">", u, "</", a, ">"), n.push(l.join("")), (this._ || (this._ = {})).dialog = e, "boolean" == typeof t.isChanged && (this.isChanged = function () { return t.isChanged }), "function" == typeof t.isChanged && (this.isChanged = t.isChanged), "function" == typeof t.setValue && (this.setValue = CKEDITOR.tools.override(this.setValue, function (e) { return function (n) { e.call(this, t.setValue.call(this, n)) } })), "function" == typeof t.getValue && (this.getValue = CKEDITOR.tools.override(this.getValue, function (e) { return function () { return t.getValue.call(this, e.call(this)) } })), CKEDITOR.event.implementOn(this), this.registerEvents(t), this.accessKeyUp && this.accessKeyDown && t.accessKey && R(this, e, "CTRL+" + t.accessKey); var m = this; e.on("load", function () { var t = m.getInputElement(); if (t) { var n = m.type in { checkbox: 1, ratio: 1 } && CKEDITOR.env.ie && 8 > CKEDITOR.env.version ? "cke_dialog_ui_focused" : ""; t.on("focus", function () { e._.tabBarMode = !1, e._.hasFocus = !0, m.fire("focus"), n && this.addClass(n) }), t.on("blur", function () { m.fire("blur"), n && this.removeClass(n) }) } }), CKEDITOR.tools.extend(this, t), this.keyboardFocusable && (this.tabIndex = t.tabIndex || 0, this.focusIndex = e._.focusList.push(this) - 1, this.on("focus", function () { e._.currentFocusIndex = m.focusIndex })) } }, hbox: function (e, t, n, i, o) { if (!(4 > arguments.length)) { this._ || (this._ = {}); var r, s = this._.children = t, a = o && o.widths || null, l = o && o.height || null, c = { role: "presentation" }; o && o.align && (c.align = o.align), CKEDITOR.ui.dialog.uiElement.call(this, e, o || { type: "hbox" }, i, "table", {}, c, function () { var e = ['<tbody><tr class="cke_dialog_ui_hbox">']; for (r = 0; r < n.length; r++) { var t = "cke_dialog_ui_hbox_child", i = []; 0 === r && (t = "cke_dialog_ui_hbox_first"), r == n.length - 1 && (t = "cke_dialog_ui_hbox_last"), e.push('<td class="', t, '" role="presentation" '), a ? a[r] && i.push("width:" 
144+ f(a[r])) : i.push("width:" + Math.floor(100 / n.length) + "%"), l && i.push("height:" + f(l)), o && void 0 !== o.padding && i.push("padding:" + f(o.padding)), CKEDITOR.env.ie && CKEDITOR.env.quirks && s[r].align && i.push("text-align:" + s[r].align), 0 < i.length && e.push('style="' + i.join("; ") + '" '), e.push(">", n[r], "</td>") } return e.push("</tr></tbody>"), e.join("") }) } }, vbox: function (e, t, n, i, o) { if (!(3 > arguments.length)) { this._ || (this._ = {}); var r = this._.children = t, s = o && o.width || null, a = o && o.heights || null; CKEDITOR.ui.dialog.uiElement.call(this, e, o || { type: "vbox" }, i, "div", null, { role: "presentation" }, function () { var t = ['<table role="presentation" cellspacing="0" border="0" ']; t.push('style="'), o && o.expand && t.push("height:100%;"), t.push("width:" + f(s || "100%"), ";"), CKEDITOR.env.webkit && t.push("float:none;"), t.push('"'), t.push('align="', CKEDITOR.tools.htmlEncode(o && o.align || ("ltr" == e.getParentEditor().lang.dir ? "left" : "right")), '" '), t.push("><tbody>"); for (var i = 0; i < n.length; i++) { var l = []; t.push('<tr><td role="presentation" '), s && l.push("width:" + f(s || "100%")), a ? l.push("height:" + f(a[i])) : o && o.expand && l.push("height:" + Math.floor(100 / n.length) + "%"), o && void 0 !== o.padding && l.push("padding:" + f(o.padding)), CKEDITOR.env.ie && CKEDITOR.env.quirks && r[i].align && l.push("text-align:" + r[i].align), 0 < l.length && t.push('style="', l.join("; "), '" '), t.push(' class="cke_dialog_ui_vbox_child">', n[i], "</td></tr>") } return t.push("</tbody></table>"), t.join("") }) } } } }(), CKEDITOR.ui.dialog.uiElement.prototype = {
145                getElement: function () { return CKEDITOR.document.getById(this.domId) }, getInputElement: function () { return this.getElement() }, getDialog: function () { return this._.dialog }, setValue: function (e, t) { return this.getInputElement().setValue(e), !t && this.fire("change", { value: e }), this }, getValue: function () { return this.getInputElement().getValue() }, isChanged: function () { return !1 }, selectParentTab: function () { for (var e = this.getInputElement(); (e = e.getParent()) && -1 == e.$.className.search("cke_dialog_page_contents");); return e ? (e = e.getAttribute("name"), this._.dialog._.currentTabId != e && this._.dialog.selectPage(e), this) : this }, focus: function () { return this.selectParentTab().getInputElement().focus(), this }, registerEvents: function (e) {
146                    var t, n, i = /^on([A-Z]\w+)/, o = function (e, t, n, i) { t.on("load", function () { e.getInputElement().on(n, i, e) }) }; for (n in e) (t = n.match(i)) && (this.eventProcessors[n] ? this.eventProcessors[n].call(this, this._.dialog, e[n]) : o(this, this._.dialog, t[1].toLowerCase(), e[n]));
147                    return this
148                }, eventProcessors: { onLoad: function (e, t) { e.on("load", t, this) }, onShow: function (e, t) { e.on("show", t, this) }, onHide: function (e, t) { e.on("hide", t, this) } }, accessKeyDown: function () { this.focus() }, accessKeyUp: function () { }, disable: function () { var e = this.getElement(); this.getInputElement().setAttribute("disabled", "true"), e.addClass("cke_disabled") }, enable: function () { var e = this.getElement(); this.getInputElement().removeAttribute("disabled"), e.removeClass("cke_disabled") }, isEnabled: function () { return !this.getElement().hasClass("cke_disabled") }, isVisible: function () { return this.getInputElement().isVisible() }, isFocusable: function () { return !(!this.isEnabled() || !this.isVisible()) }
149            }, CKEDITOR.ui.dialog.hbox.prototype = CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement, { getChild: function (e) { return 1 > arguments.length ? this._.children.concat() : (e.splice || (e = [e]), 2 > e.length ? this._.children[e[0]] : this._.children[e[0]] && this._.children[e[0]].getChild ? this._.children[e[0]].getChild(e.slice(1, e.length)) : null) } }, !0), CKEDITOR.ui.dialog.vbox.prototype = new CKEDITOR.ui.dialog.hbox, function () { var e = { build: function (e, t, n) { for (var i, o = t.children, r = [], s = [], a = 0; a < o.length && (i = o[a]); a++) { var l = []; r.push(l), s.push(CKEDITOR.dialog._.uiElementBuilders[i.type].build(e, i, l)) } return new CKEDITOR.ui.dialog[t.type](e, s, r, n, t) } }; CKEDITOR.dialog.addUIElement("hbox", e), CKEDITOR.dialog.addUIElement("vbox", e) }(), CKEDITOR.dialogCommand = function (e, t) { this.dialogName = e, CKEDITOR.tools.extend(this, t, !0) }, CKEDITOR.dialogCommand.prototype = { exec: function (e) { e.openDialog(this.dialogName) }, canUndo: !1, editorFocus: 1 }, function () { var e = /^([a]|[^a])+$/, t = /^\d*$/, n = /^\d*(?:\.\d+)?$/, i = /^(((\d*(\.\d+))|(\d*))(px|\%)?)?$/, o = /^(((\d*(\.\d+))|(\d*))(px|em|ex|in|cm|mm|pt|pc|\%)?)?$/i, r = /^(\s*[\w-]+\s*:\s*[^:;]+(?:;|$))*$/; CKEDITOR.VALIDATE_OR = 1, CKEDITOR.VALIDATE_AND = 2, CKEDITOR.dialog.validate = { functions: function () { var e = arguments; return function () { var t, n, i = this && this.getValue ? this.getValue() : e[0], o = CKEDITOR.VALIDATE_AND, r = []; for (n = 0; n < e.length && "function" == typeof e[n]; n++)r.push(e[n]); n < e.length && "string" == typeof e[n] && (t = e[n], n++), n < e.length && "number" == typeof e[n] && (o = e[n]); var s = o == CKEDITOR.VALIDATE_AND; for (n = 0; n < r.length; n++)s = o == CKEDITOR.VALIDATE_AND ? s && r[n](i) : s || r[n](i); return s ? !0 : t } }, regex: function (e, t) { return function (n) { return n = this && this.getValue ? this.getValue() : n, e.test(n) ? !0 : t } }, notEmpty: function (t) { return this.regex(e, t) }, integer: function (e) { return this.regex(t, e) }, number: function (e) { return this.regex(n, e) }, cssLength: function (e) { return this.functions(function (e) { return o.test(CKEDITOR.tools.trim(e)) }, e) }, htmlLength: function (e) { return this.functions(function (e) { return i.test(CKEDITOR.tools.trim(e)) }, e) }, inlineStyle: function (e) { return this.functions(function (e) { return r.test(CKEDITOR.tools.trim(e)) }, e) }, equals: function (e, t) { return this.functions(function (t) { return t == e }, t) }, notEqual: function (e, t) { return this.functions(function (t) { return t != e }, t) } }, CKEDITOR.on("instanceDestroyed", function (e) { if (CKEDITOR.tools.isEmpty(CKEDITOR.instances)) { for (var t; t = CKEDITOR.dialog._.currentTop;)t.hide(); for (var n in _) _[n].remove(); _ = {} } e = e.editor._.storedDialogs; for (var i in e) e[i].destroy() }) }(), CKEDITOR.tools.extend(CKEDITOR.editor.prototype, { openDialog: function (e, t) { var n = null, i = CKEDITOR.dialog._.dialogDefinitions[e]; if (null === CKEDITOR.dialog._.currentTop && h(this), "function" == typeof i) n = this._.storedDialogs || (this._.storedDialogs = {}), n = n[e] || (n[e] = new CKEDITOR.dialog(this, e)), t && t.call(n, n), n.show(); else { if ("failed" == i) throw p(this), Error('[CKEDITOR.dialog.openDialog] Dialog "' + e + '" failed when loading definition.'); "string" == typeof i && CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(i), function () { "function" != typeof CKEDITOR.dialog._.dialogDefinitions[e] && (CKEDITOR.dialog._.dialogDefinitions[e] = "failed"), this.openDialog(e, t) }, this, 0, 1) } return CKEDITOR.skin.loadPart("dialog"), n } })
150        }(), CKEDITOR.plugins.add("dialog", { requires: "dialogui", init: function (e) { e.on("doubleclick", function (t) { t.data.dialog && e.openDialog(t.data.dialog) }, null, null, 999) } }), CKEDITOR.plugins.add("about", { requires: "dialog", init: function (e) { var t = e.addCommand("about", new CKEDITOR.dialogCommand("about")); t.modes = { wysiwyg: 1, source: 1 }, t.canUndo = !1, t.readOnly = 1, e.ui.addButton && e.ui.addButton("About", { label: e.lang.about.title, command: "about", toolbar: "about" }), CKEDITOR.dialog.add("about", this.path + "dialogs/about.js") } }), function () { CKEDITOR.plugins.add("a11yhelp", { requires: "dialog", availableLangs: { af: 1, ar: 1, bg: 1, ca: 1, cs: 1, cy: 1, da: 1, de: 1, "de-ch": 1, el: 1, en: 1, "en-gb": 1, eo: 1, es: 1, et: 1, eu: 1, fa: 1, fi: 1, fo: 1, fr: 1, "fr-ca": 1, gl: 1, gu: 1, he: 1, hi: 1, hr: 1, hu: 1, id: 1, it: 1, ja: 1, km: 1, ko: 1, ku: 1, lt: 1, lv: 1, mk: 1, mn: 1, nb: 1, nl: 1, no: 1, oc: 1, pl: 1, pt: 1, "pt-br": 1, ro: 1, ru: 1, si: 1, sk: 1, sl: 1, sq: 1, sr: 1, "sr-latn": 1, sv: 1, th: 1, tr: 1, tt: 1, ug: 1, uk: 1, vi: 1, zh: 1, "zh-cn": 1 }, init: function (e) { var t = this; e.addCommand("a11yHelp", { exec: function () { var n = e.langCode, n = t.availableLangs[n] ? n : t.availableLangs[n.replace(/-.*/, "")] ? n.replace(/-.*/, "") : "en"; CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(t.path + "dialogs/lang/" + n + ".js"), function () { e.lang.a11yhelp = t.langEntries[n], e.o
150penDialog("a11yHelp") }) }, modes: { wysiwyg: 1, source: 1 }, readOnly: 1, canUndo: !1 }), e.setKeystroke(CKEDITOR.ALT + 48, "a11yHelp"), CKEDITOR.dialog.add("a11yHelp", this.path + "dialogs/a11yhelp.js"), e.on("ariaEditorHelpLabel", function (t) { t.data.label = e.lang.common.editorHelp }) } }) }(), function () { function e(e) { var t = this.att; e = e && e.hasAttribute(t) && e.getAttribute(t) || "", void 0 !== e && this.setValue(e) } function t() { for (var e, t = 0; t < arguments.length; t++)if (arguments[t] instanceof CKEDITOR.dom.element) { e = arguments[t]; break } if (e) { var t = this.att, n = this.getValue(); n ? e.setAttribute(t, n) : e.removeAttribute(t, n) } } var n = { id: 1, dir: 1, classes: 1, styles: 1 }; CKEDITOR.plugins.add("dialogadvtab", { requires: "dialog", allowedContent: function (e) { e || (e = n); var t = []; e.id && t.push("id"), e.dir && t.push("dir"); var i = ""; return t.length && (i += "[" + t.join(",") + "]"), e.classes && (i += "(*)"), e.styles && (i += "{*}"), i }, createAdvancedTab: function (i, o, r) { o || (o = n); var s = i.lang.common, a = { id: "advanced", label: s.advancedTab, title: s.advancedTab, elements: [{ type: "vbox", padding: 1, children: [] }] }, l = []; return (o.id || o.dir) && (o.id && l.push({ id: "advId", att: "id", type: "text", requiredContent: r ? r + "[id]" : null, label: s.id, setup: e, commit: t }), o.dir && l.push({ id: "advLangDir", att: "dir", type: "select", requiredContent: r ? r + "[dir]" : null, label: s.langDir, "default": "", style: "width:100%", items: [[s.notSet, ""], [s.langDirLTR, "ltr"], [s.langDirRTL, "rtl"]], setup: e, commit: t }), a.elements[0].children.push({ type: "hbox", widths: ["50%", "50%"], children: [].concat(l) })), (o.styles || o.classes) && (l = [], o.styles && l.push({ id: "advStyles", att: "style", type: "text", requiredContent: r ? r + "{cke-xyz}" : null, label: s.styles, "default": "", validate: CKEDITOR.dialog.validate.inlineStyle(s.invalidInlineStyle), onChange: function () { }, getStyle: function (e, t) { var n = this.getValue().match(new RegExp("(?:^|;)\\s*" + e + "\\s*:\\s*([^;]*)", "i")); return n ? n[1] : t }, updateStyle: function (e, t) { var n = this.getValue(), o = i.document.createElement("span"); o.setAttribute("style", n), o.setStyle(e, t), n = CKEDITOR.tools.normalizeCssText(o.getAttribute("style")), this.setValue(n, 1) }, setup: e, commit: t }), o.classes && l.push({ type: "hbox", widths: ["45%", "55%"], children: [{ id: "advCSSClasses", att: "class", type: "text", requiredContent: r ? r + "(cke-xyz)" : null, label: s.cssClasses, "default": "", setup: e, commit: t }] }), a.elements[0].children.push({ type: "hbox", widths: ["50%", "50%"], children: [].concat(l) })), a } }) }(), CKEDITOR.plugins.add("basicstyles", { init: function (e) { var t = 0, n = function (n, o, r, s) { if (s) { s = new CKEDITOR.style(s); var a = i[r]; a.unshift(s), e.attachStyleStateChange(s, function (t) { !e.readOnly && e.getCommand(r).setState(t) }), e.addCommand(r, new CKEDITOR.styleCommand(s, { contentForms: a })), e.ui.addButton && e.ui.addButton(n, { label: o, command: r, toolbar: "basicstyles," + (t += 10) }) } }, i = { bold: ["strong", "b", ["span", function (e) { return e = e.styles["font-weight"], "bold" == e || +e >= 700 }]], italic: ["em", "i", ["span", function (e) { return "italic" == e.styles["font-style"] }]], underline: ["u", ["span", function (e) { return "underline" == e.styles["text-decoration"] }]], strike: ["s", "strike", ["span", function (e) { return "line-through" == e.styles["text-decoration"] }]], subscript: ["sub"], superscript: ["sup"] }, o = e.config, r = e.lang.basicstyles; n("Bold", r.bold, "bold", o.coreStyles_bold), n("Italic", r.italic, "italic", o.coreStyles_italic), n("Underline", r.underline, "underline", o.coreStyles_underline), n("Strike", r.strike, "strike", o.coreStyles_strike), n("Subscript", r.subscript, "subscript", o.coreStyles_subscript), n("Superscript", r.superscript, "superscript", o.coreStyles_superscript), e.setKeystroke([[CKEDITOR.CTRL + 66, "bold"], [CKEDITOR.CTRL + 73, "italic"], [CKEDITOR.CTRL + 85, "underline"]]) } }), CKEDITOR.config.coreStyles_bold = { element: "strong", overrides: "b" }, CKEDITOR.config.coreStyles_italic = { element: "em", overrides: "i" }, CKEDITOR.config.coreStyles_underline = { element: "u" }, CKEDITOR.config.coreStyles_strike = { element: "s", overrides: "strike" }, CKEDITOR.config.coreStyles_subscript = { element: "sub" }, CKEDITOR.config.coreStyles_superscript = { element: "sup" }, function () { function e(e, t, n, i) { if (!e.isReadOnly() && !e.equals(n.editable())) { CKEDITOR.dom.element.setMarker(i, e, "bidi_processed", 1), i = e; for (var o = n.editable(); (i = i.getParent()) && !i.equals(o);)if (i.getCustomData("bidi_processed")) return e.removeStyle("direction"), void e.removeAttribute("dir"); i = "useComputedState" in n.config ? n.config.useComputedState : 1, (i ? e.getComputedStyle("direction") : e.getStyle("direction") || e.hasAttribute("dir")) != t && (e.removeStyle("direction"), i ? (e.removeAttribute("dir"), t != e.getComputedStyle("direction") && e.setAttribute("dir", t)) : e.setAttribute("dir", t), n.forceNextSelectionCheck()) } } function t(e, t, n) { var i = e.getCommonAncestor(!1, !0);
150 if (e = e.clone(), e.enlarge(n == CKEDITOR.ENTER_BR ? CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS : CKEDITOR.ENLARGE_BLOCK_CONTENTS), e.checkBoundaryOfElement(i, CKEDITOR.START) && e.checkBoundaryOfElement(i, CKEDITOR.END)) { for (var o; i && i.type == CKEDITOR.NODE_ELEMENT && (o = i.getParent()) && 1 == o.getChildCount() && !(i.getName() in t);)i = o; return i.type == CKEDITOR.NODE_ELEMENT && i.getName() in t && i } } function n(n) { return { context: "p", allowedContent: { "h1 h2 h3 h4 h5 h6 table ul ol blockquote div tr p div li td": { propertiesOnly: !0, attributes: "dir" } }, requiredContent: "p[dir]", refresh: function (e, t) { var n, i = e.config.useComputedState, i = void 0 === i || i; if (!i) { n = t.lastElement; for (var o = e.editable(); n && !(n.getName() in s || n.equals(o));) { var r = n.getParent(); if (!r) break; n = r } } n = n || t.block || t.blockLimit, n.equals(e.editable()) && (o = e.getSelection().getRanges()[0].getEnclosedNode()) && o.type == CKEDITOR.NODE_ELEMENT && (n = o), n && (i = i ? n.getComputedStyle("direction") : n.getStyle("direction") || n.getAttribute("dir"), e.getCommand("bidirtl").setState("rtl" == i ? CKEDITOR.TRISTATE_ON : CKEDITOR.TRISTATE_OFF), e.getCommand("bidiltr").setState("ltr" == i ? CKEDITOR.TRISTATE_ON : CKEDITOR.TRISTATE_OFF)), i = (t.block || t.blockLimit || e.editable()).getDirection(1), i != (e._.selDir || e.lang.dir) && (e._.selDir = i, e.fire("contentDirChanged", i)) }, exec: function (i) { var s = i.getSelection(), a = i.config.enterMode, l = s.getRanges(); if (l && l.length) { for (var c, d = {}, u = s.createBookmarks(), l = l.createIterator(), h = 0; c = l.getNextRange(1);) { var p = c.getEnclosedNode(); p && (!p || p.type == CKEDITOR.NODE_ELEMENT && p.getName() in r) || (p = t(c, o, a)), p && e(p, n, i, d); var f = new CKEDITOR.dom.walker(c), m = u[h].startNode, g = u[h++].endNode; f.evaluator = function (e) { var t, n = a == CKEDITOR.ENTER_P ? "p" : "div"; return (t = (e ? e.type == CKEDITOR.NODE_ELEMENT : !1) && e.getName() in o) && ((n = e.is(n)) && (n = (n = e.getParent()) ? n.type == CKEDITOR.NODE_ELEMENT : !1), t = !(n && e.getParent().is("blockquote"))), !!(t && e.getPosition(m) & CKEDITOR.POSITION_FOLLOWING && (e.getPosition(g) & CKEDITOR.POSITION_PRECEDING + CKEDITOR.POSITION_CONTAINS) == CKEDITOR.POSITION_PRECEDING) }; for (; p = f.next();)e(p, n, i, d); for (c = c.createIterator(), c.enlargeBr = a != CKEDITOR.ENTER_BR; p = c.getNextParagraph(a == CKEDITOR.ENTER_P ? "p" : "div");)e(p, n, i, d) } CKEDITOR.dom.element.clearAllMarkers(d), i.forceNextSelectionCheck(), s.selectBookmarks(u), i.focus() } } } } function i(e) { var t = e == a.setAttribute, n = e == a.removeAttribute, i = /\bdirection\s*:\s*(.*?)\s*(:?$|;)/; return function (o, r) { if (!this.isReadOnly()) { var s; if (s = o == (t || n ? "dir" : "direction") || "style" == o && (n || i.test(r))) { e: { s = this; for (var a = s.getDocument().getBody().getParent(); s;) { if (s.equals(a)) { s = !1; break e } s = s.getParent() } s = !0 } s = !s } if (s && (s = this.getDirection(1), a = e.apply(this, arguments), s != this.getDirection(1))) return this.getDocument().fire("dirChanged", this), a } return e.apply(this, arguments) } } var o = { table: 1, ul: 1, ol: 1, blockquote: 1, div: 1 }, r = {}, s = {}; CKEDITOR.tools.extend(r, o, { tr: 1, p: 1, div: 1, li: 1 }), CKEDITOR.tools.extend(s, r, { td: 1 }), CKEDITOR.plugins.add("bidi", { init: function (e) { function t(t, n, i, o, r) { e.addCommand(i, new CKEDITOR.command(e, o)), e.ui.addButton && e.ui.addButton(t, { label: n, command: i, toolbar: "bidi," + r }) } if (!e.blockless) { var i = e.lang.bidi; t("BidiLtr", i.ltr, "bidiltr", n("ltr"), 10), t("BidiRtl", i.rtl, "bidirtl", n("rtl"), 20), e.on("contentDom", function () { e.document.on("dirChanged", function (t) { e.fire("dirChanged", { node: t.data, dir: t.data.getDirection(1) }) }) }), e.on("contentDirChanged", function (t) { t = (e.lang.dir != t.data ? "add" : "remove") + "Class"; var n = e.ui.space(e.config.toolbarLocation); n && n[t]("cke_mixed_dir_content") }) } } }); for (var a = CKEDITOR.dom.element.prototype, l = ["setStyle", "removeStyle", "setAttribute", "removeAttribute"], c = 0; c < l.length; c++)a[l[c]] = CKEDITOR.tools.override(a[l[c]], i) }(), function () { var e = { exec: function (e) { var t = e.getCommand("blockquote").state, n = e.getSelection(), i = n && n.getRanges()[0]; if (i) { var o = n.createBookmarks(); if (CKEDITOR.env.ie) { var r, s = o[0].startNode, a = o[0].endNode; if (s && "blockquote" == s.getParent().getName()) for (r = s; r = r.getNext();)if (r.type == CKEDITOR.NODE_ELEMENT && r.isBlockBoundary()) { s.move(r, !0); break } if (a && "blockquote" == a.getParent().getName()) for (r = a; r = r.getPrevious();)if (r.type == CKEDITOR.NODE_ELEMENT && r.isBlockBoundary()) { a.move(r); break } } var l = i.createIterator(); if (l.enlargeBr = e.config.enterMode != CKEDITOR.ENTER_BR, t == CKEDITOR.TRISTATE_OFF) { for (s = []; t = l.getNextParagraph();)s.push(t); for (1 > s.length && (t = e.document.createElement(e.config.enterMode == CKEDITOR.ENTER_P ? "p" : "div"), a = o.shift(), i.insertNode(t), t.append(new CKEDITOR.dom.text("\ufeff", e.document)), i.moveToBookmark(a), i.selectNodeContents(t), i.collapse(!0), a = i.createBookmark(), s.push(t), o.unshift(a)), r = s[0].getParent(), i = [], a = 0; a < s.length; a++)t = s[a], r = r.getCommonAncestor(t.getParent()); for (t = { table: 1, tbody: 1, tr: 1, ol: 1, ul: 1 }; t[r.getName()];)r = r.getParent(); for (a = null; 0 < s.length;) { for (t = s.shift(); !t.getParent().equals(r);)t = t.getParent(); t.equals(a) || i.push(t), a = t } for (; 0 < i.length;)if (t = i.shift(), "blockquote" == t.getName()) { for (a = new CKEDITOR.dom.documentFragment(e.document); t.getFirst();)a.append(t.getFirst().remove()), s.push(a.getLast()); a.replace(t) } else s.push(t); for (i = e.document.createElement("blockquote"), i.insertBefore(s[0]); 0 < s.length;)t = s.shift(), i.append(t) } else if (t == CKEDITOR.TRISTATE_ON) { for (a = [], r = {}; t = l.getNextParagraph();) { for (s = i = null; t.getParent();) { if ("blockquote" == t.getParent().getName()) { i = t.getParent(), s = t; break } t = t.getParent() } i && s && !s.getCustomData("blockquote_moveout") && (a.push(s), CKEDITOR.dom.element.setMarker(r, s, "blockquote_moveout", !0)) } for (CKEDITOR.dom.element.clearAllMarkers(r), t = [], s = [], r = {}; 0 < a.length;)l = a.shift(), i = l.getParent(), l.getPrevious() ? l.getNext() ? (l.breakParent(l.getParent()), s.push(l.getNext())) : l.remove().insertAfter(i) : l.remove().insertBefore(i), i.getCustomData("blockquote_processed") || (s.push(i), CKEDITOR.dom.element.setMarker(r, i, "blockquote_processed", !0)), t.push(l); for (CKEDITOR.dom.element.clearAllMarkers(r), a = s.length - 1; a >= 0; a--) { i = s[a]; e: { r = i; for (var l = 0, c = r.getChildCount(), d = void 0; c > l && (d = r.getChild(l)); l++)if (d.type == CKEDITOR.NODE_ELEMENT && d.isBlockBoundary()) { r = !1; break e } r = !0 } r && i.remove() } if (e.config.enterMode == CKEDITOR.ENTER_BR) for (i = !0; t.length;)if (l = t.shift(), "div" == l.getName()) { for (a = new CKEDITOR.dom.documentFragment(e.document), !i || !l.getPrevious() || l.getPrevious().type == CKEDITOR.NODE_ELEMENT && l.getPrevious().isBlockBoundary() || a.append(e.document.createElement("br")), i = l.getNext() && !(l.getNext().type == CKEDITOR.NODE_ELEMENT && l.getNext().isBlockBoundary()); l.getFirst();)l.getFirst().remove().appendTo(a); i && a.append(e.document.createElement("br")), a.replace(l), i = !1 } } n.selectBookmarks(o), e.focus() } }, refresh: function (e, t) { this.setState(e.elementPath(t.block || t.blockLimit).contains("blockquote", 1) ? CKEDITOR.TRISTATE_ON : CKEDITOR.TRISTATE_OFF) }, context: "blockquote", allowedContent: "blockquote", requiredContent: "blockquote" }; CKEDITOR.plugins.add("blockquote", { init: function (t) { t.blockless || (t.addCommand("blockquote", e), t.ui.addButton && t.ui.addButton("Blockquote", { label: t.lang.blockquote.toolbar, command: "blockquote", toolbar: "blocks,10" })) } }) }(), function () {
151            function e(e, t, n) { return t.type || (t.type = "auto"), n && !1 === e.fire("beforePaste", t) || !t.dataValue && t.dataTransfer.isEmpty() ? !1 : (t.dataValue || (t.dataValue = ""), CKEDITOR.env.gecko && "drop" == t.method && e.toolbox && e.once("afterPaste", function () { e.toolbox.focus() }), e.fire("paste", t)) } function t(t) { function n() { var e = t.editable(); if (CKEDITOR.plugins.clipboard.isCustomCopyCutSupported) { var n = function (e) { t.readOnly && "cut" == e.name || m.initPasteDataTransfer(e, t), e.data.preventDefault() }; e.on("copy", n), e.on("cut", n), e.on("cut", function () { t.readOnly || t.extractSelectedHtml() }, null, null, 999) } e.on(m.mainPasteEvent, function (e) { "beforepaste" == m.mainPasteEvent && g || h(e) }), "beforepaste" == m.mainPasteEvent && (e.on("paste", function (e) { v || (r(), e.data.preventDefault(), h(e), a("paste") || t.openDialog("paste")) }), e.on("contextmenu", s, null, null, 0), e.on("beforepaste", function (e) { !e.data || e.data.$.ctrlKey || e.data.$.shiftKey || s() }, null, null, 0)), e.on("beforecut", function () { !g && l(t) }); var i; e.attachListener(CKEDITOR.env.ie ? e : t.document.getDocumentElement(), "mouseup", function () { i = setTimeout(function () { p() }, 0) }), t.on("destroy", function () { clearTimeout(i) }), e.on("keyup", p) } function i(e) { return { type: e, canUndo: "cut" == e, startDisabled: !0, fakeKeystroke: "cut" == e ? CKEDITOR.CTRL + 88 : CKEDITOR.CTRL + 67, exec: function () { "cut" == this.type && l(); var e, n = this.type; if (CKEDITOR.env.ie) e = a(n); else try { e = t.document.$.execCommand(n, !1, null) } catch (i) { e = !1 } return e || t.showNotification(t.lang.clipboard[this.type + "Error"]), e } } } function o() { return { canUndo: !1, async: !0, fakeKeystroke: CKEDITOR.CTRL + 86, exec: function (t, n) { var i = this, o = function (n, o) { n && e(t, n, !!o), t.fire("afterCommandExec", { name: "paste", command: i, returnValue: !!n }) }; "string" == typeof n ? o({ dataValue: n, method: "paste", dataTransfer: m.initPasteDataTransfer() }, 1) : t.getClipboardData(o) } } } function r() { v = 1, setTimeout(function () { v = 0 }, 100) } function s() { g = 1, setTimeout(function () { g = 0 }, 10) } function a(e) { var n = t.document, i = n.getBody(), o = !1, r = function () { o = !0 }; return i.on(e, r), 7 < CKEDITOR.env.version ? n.$.execCommand(e) : n.$.selection.createRange().execCommand(e), i.removeListener(e, r), o } function l() { if (CKEDITOR.env.ie && !CKEDITOR.env.quirks) { var e, n, i, o = t.getSelection(); o.getType() == CKEDITOR.SELECTION_ELEMENT && (e = o.getSelectedElement()) && (n = o.getRanges()[0], i = t.document.createText(""), i.insertBefore(e), n.setStartBefore(i), n.setEndAfter(e), o.selectRanges([n]), setTimeout(function () { e.getParent() && (i.remove(), o.selectElement(e)) }, 0)) } } function c(e, n) { var i, o = t.document, r = t.editable(), s = function (e) { e.cancel() }; if (!o.getById("cke_pastebin")) { var a = t.getSelection(), l = a.createBookmarks(); CKEDITOR.env.ie && a.root.fire("selectionchange"); var c = new CKEDITOR.dom.element(!CKEDITOR.env.webkit && !r.is("body") || CKEDITOR.env.ie ? "div" : "body", o); c.setAttributes({ id: "cke_pastebin", "data-cke-temp": "1" }); var d = 0, o = o.getWindow(); CKEDITOR.env.webkit ? (r.append(c), c.addClass("cke_editable"), r.is("body") || (d = "static" != r.getComputedStyle("position") ? r : CKEDITOR.dom.element.get(r.$.offsetParent), d = d.getDocumentPosition().y)) : r.getAscendant(CKEDITOR.env.ie ? "body" : "html", 1).append(c), c.setStyles({ position: "absolute", top: o.getScrollPosition().y - d + 10 + "px", width: "1px", height: Math.max(1, o.getViewPaneSize().height - 20) + "px", overflow: "hidden", margin: 0, padding: 0 }), CKEDITOR.env.safari && c.setStyles(CKEDITOR.tools.cssVendorPrefix("user-select", "text")), (d = c.getParent().isReadOnly()) ? (c.setOpacity(0), c.setAttribute("contenteditable", !0)) : c.setStyle("ltr" == t.config.contentsLangDirection ? "left" : "right", "-10000px"), t.on("selectionChange", s, null, null, 0), (CKEDITOR.env.webkit || CKEDITOR.env.gecko) && (i = r.once("blur", s, null, null, -100)), d && c.focus(), d = new CKEDITOR.dom.range(c), d.selectNodeContents(c); var u = d.select(); CKEDITOR.env.ie && (i = r.once("blur", function () { t.lockSelection(u) }));
151 var h = CKEDITOR.document.getWindow().getScrollPosition().y; setTimeout(function () { CKEDITOR.env.webkit && (CKEDITOR.document.getBody().$.scrollTop = h), i && i.removeListener(), CKEDITOR.env.ie && r.focus(), a.selectBookmarks(l), c.remove(); var e; CKEDITOR.env.webkit && (e = c.getFirst()) && e.is && e.hasClass("Apple-style-span") && (c = e), t.removeListener("selectionChange", s), n(c.getHtml()) }, 0) } } function d() { if ("paste" == m.mainPasteEvent) return t.fire("beforePaste", { type: "auto", method: "paste" }), !1; t.focus(), r(); var e = t.focusManager; return e.lock(), t.editable().fire(m.mainPasteEvent) && !a("paste") ? (e.unlock(), !1) : (e.unlock(), !0) } function u(e) { if ("wysiwyg" == t.mode) switch (e.data.keyCode) { case CKEDITOR.CTRL + 86: case CKEDITOR.SHIFT + 45: e = t.editable(), r(), "paste" == m.mainPasteEvent && e.fire("beforepaste"); break; case CKEDITOR.CTRL + 88: case CKEDITOR.SHIFT + 46: t.fire("saveSnapshot"), setTimeout(function () { t.fire("saveSnapshot") }, 50) } } function h(n) { var i = { type: "auto", method: "paste", dataTransfer: m.initPasteDataTransfer(n) }; i.dataTransfer.cacheData(); var o = !1 !== t.fire("beforePaste", i); o && m.canClipboardApiBeTrusted(i.dataTransfer, t) ? (n.data.preventDefault(), setTimeout(function () { e(t, i) }, 0)) : c(n, function (n) { i.dataValue = n.replace(/<span[^>]+data-cke-bookmark[^<]*?<\/span>/gi, ""), o && e(t, i) }) } function p() { if ("wysiwyg" == t.mode) { var e = f("paste"); t.getCommand("cut").setState(f("cut")), t.getCommand("copy").setState(f("copy")), t.getCommand("paste").setState(e), t.fire("pasteState", e) } } function f(e) { if (E && e in { paste: 1, cut: 1 }) return CKEDITOR.TRISTATE_DISABLED; if ("paste" == e) return CKEDITOR.TRISTATE_OFF; e = t.getSelection(); var n = e.getRanges(); return e.getType() == CKEDITOR.SELECTION_NONE || 1 == n.length && n[0].collapsed ? CKEDITOR.TRISTATE_DISABLED : CKEDITOR.TRISTATE_OFF } var m = CKEDITOR.plugins.clipboard, g = 0, v = 0, E = 0; !function () { t.on("key", u), t.on("contentDom", n), t.on("selectionChange", function (e) { E = e.data.selection.getRanges()[0].checkReadOnly(), p() }), t.contextMenu && t.contextMenu.addListener(function (e, t) { return E = t.getRanges()[0].checkReadOnly(), { cut: f("cut"), copy: f("copy"), paste: f("paste") } }) }(), function () { function e(e, n, i, o, r) { var s = t.lang.clipboard[n]; t.addCommand(n, i), t.ui.addButton && t.ui.addButton(e, { label: s, command: n, toolbar: "clipboard," + o }), t.addMenuItems && t.addMenuItem(n, { label: s, command: n, group: "clipboard", order: r }) } e("Cut", "cut", i("cut"), 10, 1), e("Copy", "copy", i("copy"), 20, 4), e("Paste", "paste", o(), 30, 8) }(), t.getClipboardData = function (e, n) { function i(e) { e.removeListener(), e.cancel(), n(e.data) } function o(e) { e.removeListener(), e.cancel(), l = !0, n({ type: a, dataValue: e.data.dataValue, dataTransfer: e.data.dataTransfer, method: "paste" }) } function r() { this.customTitle = e && e.title } var s = !1, a = "auto", l = !1; n || (n = e, e = null), t.on("paste", i, null, null, 0), t.on("beforePaste", function (e) { e.removeListener(), s = !0, a = e.data.type }, null, null, 1e3), !1 === d() && (t.removeListener("paste", i), s && t.fire("pasteDialog", r) ? (t.on("pasteDialogCommit", o), t.on("dialogHide", function (e) { e.removeListener(), e.data.removeListener("pasteDialogCommit", o), setTimeout(function () { l || n(null) }, 10) })) : n(null)) } } function n(e) { if (CKEDITOR.env.webkit) { if (!e.match(/^[^<]*$/g) && !e.match(/^(<div><br( ?\/)?><\/div>|<div>[^<]*<\/div>)*$/gi)) return "html" } else if (CKEDITOR.env.ie) { if (!e.match(/^([^<]|<br( ?\/)?>)*$/gi) && !e.match(/^(<p>([^<]|<br( ?\/)?>)*<\/p>|(\r\n))*$/gi)) return "html" } else { if (!CKEDITOR.env.gecko) return "html"; if (!e.match(/^([^<]|<br( ?\/)?>)*$/gi)) return "html" } return "htmlifiedtext" } function i(e, t) { function n(e) { return CKEDITOR.tools.repeat("</p><p>", ~~(e / 2)) + (1 == e % 2 ? "<br>" : "") } return t = t.replace(/\s+/g, " ").replace(/> +</g, "><").replace(/<br ?\/>/gi, "<br>"), t = t.replace(/<\/?[A-Z]+>/g, function (e) { return e.toLowerCase() }), t.match(/^[^<]$/) ? t : (CKEDITOR.env.webkit && -1 < t.indexOf("<div>") && (t = t.replace(/^(<div>(<br>|)<\/div>)(?!$|(<div>(<br>|)<\/div>))/g, "<br>").replace(/^(<div>(<br>|)<\/div>){2}(?!$)/g, "<div></div>"), t.match(/<div>(<br>|)<\/div>/) && (t = "<p>" + t.replace(/(<div>(<br>|)<\/div>)+/g, function (e) { return n(e.split("</div><div>").length + 1) }) + "</p>"), t = t.replace(/<\/div><div>/g, "<br>"), t = t.replace(/<\/?div>/g, "")), CKEDITOR.env.gecko && e.enterMode != CKEDITOR.ENTER_BR && (CKEDITOR.env.gecko && (t = t.replace(/^<br><br>$/, "<br>")), -1 < t.indexOf("<br><br>") && (t = "<p>" + t.replace(/(<br>){2,}/g, function (e) { return n(e.length / 4) }) + "</p>")), s(e, t)) } function o() { function e() { var e, t = {}; for (e in CKEDITOR.dtd) "$" != e.charAt(0) && "div" != e && "span" != e && (t[e] = 1); return t } var t = {}; return { get: function (n) { return "plain-text" == n ? t.plainText || (t.plainText = new CKEDITOR.filter("br")) : "semantic-content" == n ? ((n = t.semanticContent) || (n = new CKEDITOR.filter, n.allow({ $1: { elements: e(), attributes: !0, styles: !1, classes: !1 } }), n = t.semanticContent = n), n) : n ? new CKEDITOR.filter(n) : null } } } function r(e, t, n) { t = CKEDITOR.htmlParser.fragment.fromHtml(t); var i = new CKEDITOR.htmlParser.basicWriter; return n.applyTo(t, !0, !1, e.activeEnterMode), t.writeHtml(i), i.getHtml() } function s(e, t) { return e.enterMode == CKEDITOR.ENTER_BR ? t = t.replace(/(<\/p><p>)+/g, function (e) { return CKEDITOR.tools.repeat("<br>", e.length / 7 * 2) }).replace(/<\/?p>/g, "") : e.enterMode == CKEDITOR.ENTER_DIV && (t = t.replace(/<(\/)?p>/g, "<$1div>")), t } function a(e) { e.data.preventDefault(), e.data.$.dataTransfer.dropEffect = "none" } function l(t) { var n = CKEDITOR.plugins.clipboard; t.on("contentDom", function () { function i(n, i, o) { i.select(), e(t, { dataTransfer: o, method: "drop" }, 1), o.sourceEditor.fire("saveSnapshot"), o.sourceEditor.editable().extractHtmlFromRange(n), o.sourceEditor.getSelection().selectRanges([n]), o.sourceEditor.fire("saveSnapshot") } function o(i, o) { i.select(), e(t, { dataTransfer: o, method: "drop" }, 1), n.resetDragDataTransfer() } function r(e, n, i) { var o = { $: e.data.$, target: e.data.getTarget() }; n && (o.dragRange = n), i && (o.dropRange = i), !1 === t.fire(e.name, o) && e.data.preventDefault() } function s(e) { return e.type != CKEDITOR.NODE_ELEMENT && (e = e.getParent()), e.getChildCount() } var a = t.editable(), l = CKEDITOR.plugins.clipboard.getDropTarget(t), c = t.ui.space("top"), d = t.ui.space("bottom"); n.preventDefaultDropOnElement(c), n.preventDefaultDropOnElement(d), a.attachListener(l, "dragstart", r), a.attachListener(t, "dragstart", n.resetDragDataTransfer, n, null, 1), a.attachListener(t, "dragstart", function (e) { n.initDragDataTransfer(e, t) }, null, null, 2), a.attachListener(t, "dragstart", function () { var e = n.dragRange = t.getSelection().getRanges()[0]; CKEDITOR.env.ie && 10 > CKEDITOR.env.version && (n.dragStartContainerChildCount = e ? s(e.startContainer) : null, n.dragEndContainerChildCount = e ? s(e.endContainer) : null) }, null, null, 100), a.attachListener(l, "dragend", r), a.attachListener(t, "dragend", n.initDragDataTransfer, n, null, 1), a.attachListener(t, "dragend", n.resetDragDataTransfer, n, null, 100), a.attachListener(l, "dragover", function (e) { var t = e.data.getTarget(); t && t.is && t.is("html") ? e.data.preventDefault() : CKEDITOR.env.ie && CKEDITOR.plugins.clipboard.isFileApiSupported && e.data.$.dataTransfer.types.contains("Files") && e.data.preventDefault() }), a.attachListener(l, "drop", function (e) { if (!e.data.$.defaultPrevented) { e.data.preventDefault(); var i = e.data.getTarget(); if (!i.isReadOnly() || i.type == CKEDITOR.NODE_ELEMENT && i.is("html")) { var i = n.getRangeAtDropPosition(e, t), o = n.dragRange; i && r(e, o, i) } } }, null, null, 9999), a.attachListener(t, "drop", n.initDragDataTransfer, n, null, 1), a.attachListener(t, "drop", function (e) { if (e = e.data) { var r = e.dropRange, s = e.dragRange, a = e.dataTransfer; a.getTransferType(t) == CKEDITOR.DATA_TRANSFER_INTERNAL ? setTimeout(function () { n.internalDrop(s, r, a, t) }, 0) : a.getTransferType(t) == CKEDITOR.DATA_TRANSFER_CROSS_EDITORS ? i(s, r, a) : o(r, a) } }, null, null, 9999) }) } CKEDITOR.plugins.add("clipboard", { requires: "dialog", init: function (e) { var s, a = o(); e.config.forcePasteAsPlainText ? s = "plain-text" : e.config.pasteFilter ? s = e.config.pasteFilter : !CKEDITOR.env.webkit || "pasteFilter" in e.config || (s = "semantic-content"), e.pasteFilter = a.get(s), t(e), l(e), CKEDITOR.dialog.add("paste", CKEDITOR.getUrl(this.path + "dialogs/paste.js")), e.on("paste", function (t) { if (t.data.dataTransfer || (t.data.dataTransfer = new CKEDITOR.plugins.clipboard.dataTransfer), !t.data.dataValue) { var n = t.data.dataTransfer, i = n.getData("text/html"); i ? (t.data.dataValue = i, t.data.type = "html") : (i = n.getData("text/plain")) && (t.data.dataValue = e.editable().transformPlainTextToHtml(i), t.data.type = "text") } }, null, null, 1), e.on("paste", function (e) { var t = e.data.dataValue, n = CKEDITOR.dtd.$block; if (-1 < t.indexOf("Apple-") && (t = t.replace(/<span class="Apple-converted-s
151pace">&nbsp;<\/span>/gi, " "), "html" != e.data.type && (t = t.replace(/<span class="Apple-tab-span"[^>]*>([^<]*)<\/span>/gi, function (e, t) { return t.replace(/\t/g, "&nbsp;&nbsp; &nbsp;") })), -1 < t.indexOf('<br class="Apple-interchange-newline">') && (e.data.startsWithEOL = 1, e.data.preSniffing = "html", t = t.replace(/<br class="Apple-interchange-newline">/, "")), t = t.replace(/(<[^>]+) class="Apple-[^"]*"/gi, "$1")), t.match(/^<[^<]+cke_(editable|contents)/i)) { var i, o, r = new CKEDITOR.dom.element("div"); for (r.setHtml(t); 1 == r.getChildCount() && (i = r.getFirst()) && i.type == CKEDITOR.NODE_ELEMENT && (i.hasClass("cke_editable") || i.hasClass("cke_contents"));)r = o = i; o && (t = o.getHtml().replace(/<br>$/i, "")) } CKEDITOR.env.ie ? t = t.replace(/^&nbsp;(?: |\r\n)?<(\w+)/g, function (t, i) { return i.toLowerCase() in n ? (e.data.preSniffing = "html", "<" + i) : t }) : CKEDITOR.env.webkit ? t = t.replace(/<\/(\w+)><div><br><\/div>$/, function (t, i) { return i in n ? (e.data.endsWithEOL = 1, "</" + i + ">") : t }) : CKEDITOR.env.gecko && (t = t.replace(/(\s)<br>$/, "$1")), e.data.dataValue = t }, null, null, 3), e.on("paste", function (t) { t = t.data; var o, s = t.type, l = t.dataValue, c = e.config.clipboard_defaultContentType || "html", d = t.dataTransfer.getTransferType(e); o = "html" == s || "html" == t.preSniffing ? "html" : n(l), "htmlifiedtext" == o && (l = i(e.config, l)), "text" == s && "html" == o ? l = r(e, l, a.get("plain-text")) : d == CKEDITOR.DATA_TRANSFER_EXTERNAL && e.pasteFilter && !t.dontFilter && (l = r(e, l, e.pasteFilter)), t.startsWithEOL && (l = '<br data-cke-eol="1">' + l), t.endsWithEOL && (l += '<br data-cke-eol="1">'), "auto" == s && (s = "html" == o || "html" == c ? "html" : "text"), t.type = s, t.dataValue = l, delete t.preSniffing, delete t.startsWithEOL, delete t.endsWithEOL }, null, null, 6), e.on("paste", function (t) { t = t.data, t.dataValue && (e.insertHtml(t.dataValue, t.type, t.range), setTimeout(function () { e.fire("afterPaste") }, 0)) }, null, null, 1e3), e.on("pasteDialog", function (t) { setTimeout(function () { e.openDialog("paste", t.data) }, 0) }) } }), CKEDITOR.plugins.clipboard = {
152                isCustomCopyCutSupported: !CKEDITOR.env.ie && !CKEDITOR.env.iOS, isCustomDataTypesSupported: !CKEDITOR.env.ie, isFileApiSupported: !CKEDITOR.env.ie || 9 < CKEDITOR.env.version, mainPasteEvent: CKEDITOR.env.ie && !CKEDITOR.env.edge ? "beforepaste" : "paste", canClipboardApiBeTrusted: function (e, t) { return !!(e.getTransferType(t) != CKEDITOR.DATA_TRANSFER_EXTERNAL || CKEDITOR.env.chrome && !e.isEmpty() || CKEDITOR.env.gecko && (e.getData("text/html") || e.getFilesCount())) }, getDropTarget: function (e) { var t = e.editable(); return CKEDITOR.env.ie && 9 > CKEDITOR.env.version || t.isInline() ? t : e.document }, fixSplitNodesAfterDrop: function (e, t, n, i) { function o(e, n, i) { var o = e; return o.type == CKEDITOR.NODE_TEXT && (o = e.getParent()), o.equals(n) && i != n.getChildCount() ? (e = t.startContainer.getChild(t.startOffset - 1), n = t.startContainer.getChild(t.startOffset), e && e.type == CKEDITOR.NODE_TEXT && n && n.type == CKEDITOR.NODE_TEXT && (i = e.getLength(), e.setText(e.getText() + n.getText()), n.remove(), t.setStart(e, i), t.collapse(!0)), !0) : void 0 } var r = t.startContainer; "number" == typeof i && "number" == typeof n && r.type == CKEDITOR.NODE_ELEMENT && (o(e.startContainer, r, n) || o(e.endContainer, r, i)) }, isDropRangeAffectedByDragRange: function (e, t) { var n = t.startContainer, i = t.endOffset; return !!(e.endContainer.equals(n) && e.endOffset <= i || e.startContainer.getParent().equals(n) && e.startContainer.getIndex() < i || e.endContainer.getParent().equals(n) && e.endContainer.getIndex() < i) }, internalDrop: function (t, n, i, o) {
153                    var r, s, a = CKEDITOR.plugins.clipboard, l = o.editable(); o.fire("saveSnapshot"), o.fire("lockSnapshot", { dontUpdate: 1 }), CKEDITOR.env.ie && 10 > CKEDITOR.env.version && this.fixSplitNodesAfterDrop(t, n, a.dragStartContainerChildCount, a.dragEndContainerChildCount), (s = this.isDropRangeAffectedByDragRange(t, n)) || (r = t.createBookmark(!1)), a = n.clone().createBookmark(!1), s && (r = t.createBookmark(!1)), t = r.startNode, n = r.endNode, s = a.startNode, n && t.getPosition(s) & CKEDITOR.POSITION_PRECEDING && n.getPosition(s) & CKEDITOR.POSITION_FOLLOWING && s.insertBefore(t), t = o.createRange(), t.moveToBookmark(r), l.extractHtmlFromRange(t, 1), n = o.createRange(), n.moveToBookmark(a),
154                        e(o, { dataTransfer: i, method: "drop", range: n }, 1), o.fire("unlockSnapshot")
155                }, getRangeAtDropPosition: function (e, t) { var n = e.data.$, i = n.clientX, o = n.clientY, r = t.getSelection(!0).getRanges()[0], s = t.createRange(); if (e.data.testRange) return e.data.testRange; if (document.caretRangeFromPoint) n = t.document.$.caretRangeFromPoint(i, o), s.setStart(CKEDITOR.dom.node(n.startContainer), n.startOffset), s.collapse(!0); else if (n.rangeParent) s.setStart(CKEDITOR.dom.node(n.rangeParent), n.rangeOffset), s.collapse(!0); else { if (CKEDITOR.env.ie && 8 < CKEDITOR.env.version && r && t.editable().hasFocus) return r; if (!document.body.createTextRange) return null; t.focus(), n = t.document.getBody().$.createTextRange(); try { for (var a = !1, l = 0; 20 > l && !a; l++) { if (!a) try { n.moveToPoint(i, o - l), a = !0 } catch (c) { } if (!a) try { n.moveToPoint(i, o + l), a = !0 } catch (d) { } } if (a) { var u = "cke-temp-" + (new Date).getTime(); n.pasteHTML('<span id="' + u + '">\u200b</span>');
155 var h = t.document.getById(u); s.moveToPosition(h, CKEDITOR.POSITION_BEFORE_START), h.remove() } else { var p, f = t.document.$.elementFromPoint(i, o), m = new CKEDITOR.dom.element(f); if (m.equals(t.editable()) || "html" == m.getName()) return r && r.startContainer && !r.startContainer.equals(t.editable()) ? r : null; p = m.getClientRect(), i < p.left ? s.setStartAt(m, CKEDITOR.POSITION_AFTER_START) : s.setStartAt(m, CKEDITOR.POSITION_BEFORE_END), s.collapse(!0) } } catch (g) { return null } } return s }, initDragDataTransfer: function (e, t) { var n = e.data.$ ? e.data.$.dataTransfer : null, i = new this.dataTransfer(n, t); n ? this.dragData && i.id == this.dragData.id ? i = this.dragData : this.dragData = i : this.dragData ? i = this.dragData : this.dragData = i, e.data.dataTransfer = i }, resetDragDataTransfer: function () { this.dragData = null }, initPasteDataTransfer: function (e, t) { if (this.isCustomCopyCutSupported) { if (e && e.data && e.data.$) { var n = new this.dataTransfer(e.data.$.clipboardData, t); return this.copyCutData && n.id == this.copyCutData.id ? (n = this.copyCutData, n.$ = e.data.$.clipboardData) : this.copyCutData = n, n } return new this.dataTransfer(null, t) } return new this.dataTransfer(CKEDITOR.env.edge && e && e.data.$ && e.data.$.clipboardData || null, t) }, preventDefaultDropOnElement: function (e) { e && e.on("dragover", a) }
156            }; var c = CKEDITOR.plugins.clipboard.isCustomDataTypesSupported ? "cke/id" : "Text"; CKEDITOR.plugins.clipboard.dataTransfer = function (e, t) { if (e && (this.$ = e), this._ = { metaRegExp: /^<meta.*?>/i, bodyRegExp: /<body(?:[\s\S]*?)>([\s\S]*)<\/body>/i, fragmentRegExp: /\x3c!--(?:Start|End)Fragment--\x3e/g, data: {}, files: [], normalizeType: function (e) { return e = e.toLowerCase(), "text" == e || "text/plain" == e ? "Text" : "url" == e ? "URL" : e } }, this.id = this.getData(c), this.id || (this.id = "Text" == c ? "" : "cke-" + CKEDITOR.tools.getUniqueId()), "Text" != c) try { this.$.setData(c, this.id) } catch (n) { } t && (this.sourceEditor = t, this.setData("text/html", t.getSelectedHtml(1)), "Text" == c || this.getData("text/plain") || this.setData("text/plain", t.getSelection().getSelectedText())) }, CKEDITOR.DATA_TRANSFER_INTERNAL = 1, CKEDITOR.DATA_TRANSFER_CROSS_EDITORS = 2, CKEDITOR.DATA_TRANSFER_EXTERNAL = 3, CKEDITOR.plugins.clipboard.dataTransfer.prototype = { getData: function (e) { e = this._.normalizeType(e); var t = this._.data[e]; if (void 0 === t || null === t || "" === t) try { t = this.$.getData(e) } catch (n) { } return void 0 !== t && null !== t && "" !== t || (t = ""), "text/html" == e ? (t = t.replace(this._.metaRegExp, ""), (e = this._.bodyRegExp.exec(t)) && e.length && (t = e[1], t = t.replace(this._.fragmentRegExp, ""))) : "Text" == e && CKEDITOR.env.gecko && this.getFilesCount() && "file://" == t.substring(0, 7) && (t = ""), t }, setData: function (e, t) { if (e = this._.normalizeType(e), this._.data[e] = t, CKEDITOR.plugins.clipboard.isCustomDataTypesSupported || "URL" == e || "Text" == e) { "Text" == c && "Text" == e && (this.id = t); try { this.$.setData(e, t) } catch (n) { } } }, getTransferType: function (e) { return this.sourceEditor ? this.sourceEditor == e ? CKEDITOR.DATA_TRANSFER_INTERNAL : CKEDITOR.DATA_TRANSFER_CROSS_EDITORS : CKEDITOR.DATA_TRANSFER_EXTERNAL }, cacheData: function () { function e(e) { e = i._.normalizeType(e); var t = i.getData(e); t && (i._.data[e] = t) } if (this.$) { var t, n, i = this; if (CKEDITOR.plugins.clipboard.isCustomDataTypesSupported) { if (this.$.types) for (t = 0; t < this.$.types.length; t++)e(this.$.types[t]) } else e("Text"), e("URL"); if (n = this._getImageFromClipboard(), this.$ && this.$.files || n) { if (this._.files = [], this.$.files && this.$.files.length) for (t = 0; t < this.$.files.length; t++)this._.files.push(this.$.files[t]); 0 === this._.files.length && n && this._.files.push(n) } } }, getFilesCount: function () { return this._.files.length ? this._.files.length : this.$ && this.$.files && this.$.files.length ? this.$.files.length : this._getImageFromClipboard() ? 1 : 0 }, getFile: function (e) { return this._.files.length ? this._.files[e] : this.$ && this.$.files && this.$.files.length ? this.$.files[e] : 0 === e ? this._getImageFromClipboard() : void 0 }, isEmpty: function () { var e, t = {}; if (this.getFilesCount()) return !1; for (e in this._.data) t[e] = 1; if (this.$) if (CKEDITOR.plugins.clipboard.isCustomDataTypesSupported) { if (this.$.types) for (var n = 0; n < this.$.types.length; n++)t[this.$.types[n]] = 1 } else t.Text = 1, t.URL = 1; "Text" != c && (t[c] = 0); for (e in t) if (t[e] && "" !== this.getData(e)) return !1; return !0 }, _getImageFromClipboard: function () { var e; if (this.$ && this.$.items && this.$.items[0]) try { if ((e = this.$.items[0].getAsFile()) && e.type) return e } catch (t) { } } }
157        }(), function () { var e = '<a id="{id}" class="cke_button cke_button__{name} cke_button_{state} {cls}"' + (CKEDITOR.env.gecko && !CKEDITOR.env.hc ? "" : " href=\"javascript:void('{titleJs}')\"") + ' title="{title}" tabindex="-1" hidefocus="true" role="button" aria-labelledby="{id}_label" aria-describedby="{id}_description" aria-haspopup="{hasArrow}" aria-disabled="{ariaDisabled}"'; CKEDITOR.env.gecko && CKEDITOR.env.mac && (e += ' onkeypress="return false;
157"'), CKEDITOR.env.gecko && (e += ' onblur="this.style.cssText = this.style.cssText;"'); var e = e + (' onkeydown="return CKEDITOR.tools.callFunction({keydownFn},event);" onfocus="return CKEDITOR.tools.callFunction({focusFn},event);" ' + (CKEDITOR.env.ie ? 'onclick="return false;" onmouseup' : "onclick") + '="CKEDITOR.tools.callFunction({clickFn},this);return false;"><span class="cke_button_icon cke_button__{iconName}_icon" style="{style}"'), e = e + '>&nbsp;</span><span id="{id}_label" class="cke_button_label cke_button__{name}_label" aria-hidden="false">{label}</span><span id="{id}_description" class="cke_button_label" aria-hidden="false">{ariaShortcut}</span>{arrowHtml}</a>', t = CKEDITOR.addTemplate("buttonArrow", '<span class="cke_button_arrow">' + (CKEDITOR.env.hc ? "&#9660;" : "") + "</span>"), n = CKEDITOR.addTemplate("button", e); CKEDITOR.plugins.add("button", { beforeInit: function (e) { e.ui.addHandler(CKEDITOR.UI_BUTTON, CKEDITOR.ui.button.handler) } }), CKEDITOR.UI_BUTTON = "button", CKEDITOR.ui.button = function (e) { CKEDITOR.tools.extend(this, e, { title: e.label, click: e.click || function (t) { t.execCommand(e.command) } }), this._ = {} }, CKEDITOR.ui.button.handler = { create: function (e) { return new CKEDITOR.ui.button(e) } }, CKEDITOR.ui.button.prototype = { render: function (e, i) { function o() { var t = e.mode; t && (t = this.modes[t] ? void 0 !== g[t] ? g[t] : CKEDITOR.TRISTATE_OFF : CKEDITOR.TRISTATE_DISABLED, t = e.readOnly && !this.readOnly ? CKEDITOR.TRISTATE_DISABLED : t, this.setState(t), this.refresh && this.refresh()) } var r, s, a, l = CKEDITOR.env, c = this._.id = CKEDITOR.tools.getNextId(), d = "", u = this.command; this._.editor = e; var h = { id: c, button: this, editor: e, focus: function () { CKEDITOR.document.getById(c).focus() }, execute: function () { this.button.click(e) }, attach: function (e) { this.button.attach(e) } }, p = CKEDITOR.tools.addFunction(function (e) { return h.onkey ? (e = new CKEDITOR.dom.event(e), !1 !== h.onkey(h, e.getKeystroke())) : void 0 }), f = CKEDITOR.tools.addFunction(function (e) { var t; return h.onfocus && (t = !1 !== h.onfocus(h, new CKEDITOR.dom.event(e))), t }), m = 0; if (h.clickFn = r = CKEDITOR.tools.addFunction(function () { m && (e.unlockSelection(1), m = 0), h.execute(), l.iOS && e.focus() }), this.modes) { var g = {}; e.on("beforeModeUnload", function () { e.mode && this._.state != CKEDITOR.TRISTATE_DISABLED && (g[e.mode] = this._.state) }, this), e.on("activeFilterChange", o, this), e.on("mode", o, this), !this.readOnly && e.on("readOnly", o, this) } else u && (u = e.getCommand(u)) && (u.on("state", function () { this.setState(u.state) }, this), d += u.state == CKEDITOR.TRISTATE_ON ? "on" : u.state == CKEDITOR.TRISTATE_DISABLED ? "disabled" : "off"); this.directional && e.on("contentDirChanged", function (t) { var n = CKEDITOR.document.getById(this._.id), i = n.getFirst(); t = t.data, t != e.lang.dir ? n.addClass("cke_" + t) : n.removeClass("cke_ltr").removeClass("cke_rtl"), i.setAttribute("style", CKEDITOR.skin.getIconStyle(v, "rtl" == t, this.icon, this.iconOffset)) }, this), u ? (s = e.getCommandKeystroke(u)) && (a = CKEDITOR.tools.keystrokeToString(e.lang.common.keyboard, s)) : d += "off"; var v = s = this.name || this.command; return this.icon && !/\./.test(this.icon) && (v = this.icon, this.icon = null), d = { id: c, name: s, iconName: v, label: this.label, cls: this.className || "", state: d, ariaDisabled: "disabled" == d ? "true" : "false", title: this.title + (a ? " (" + a.display + ")" : ""), ariaShortcut: a ? e.lang.common.keyboardShortcut + " " + a.aria : "", titleJs: l.gecko && !l.hc ? "" : (this.title || "").replace("'", ""), hasArrow: this.hasArrow ? "true" : "false", keydownFn: p, focusFn: f, clickFn: r, style: CKEDITOR.skin.getIconStyle(v, "rtl" == e.lang.dir, this.icon, this.iconOffset), arrowHtml: this.hasArrow ? t.output() : "" }, n.output(d, i), this.onRender && this.onRender(), h }, setState: function (e) { if (this._.state == e) return !1; this._.state = e; var t = CKEDITOR.document.getById(this._.id); return t ? (t.setState(e, "cke_button"), e == CKEDITOR.TRISTATE_DISABLED ? t.setAttribute("aria-disabled", !0) : t.removeAttribute("aria-disabled"), this.hasArrow ? (e = e == CKEDITOR.TRISTATE_ON ? this._.editor.lang.button.selectedLabel.replace(/%1/g, this.label) : this.label, CKEDITOR.document.getById(this._.id + "_label").setText(e)) : e == CKEDITOR.TRISTATE_ON ? t.setAttribute("aria-pressed", !0) : t.removeAttribute("aria-pressed"), !0) : !1 }, getState: function () { return this._.state }, toFeature: function (e) { if (this._.feature) return this._.feature; var t = this; return this.allowedContent || this.requiredContent || !this.command || (t = e.getCommand(this.command) || t), this._.feature = t } }, CKEDITOR.ui.prototype.addButton = function (e, t) { this.add(e, CKEDITOR.UI_BUTTON, t) } }(), CKEDITOR.plugins.add("panelbutton", { requires: "button", onLoad: function () { function e(e) { var t = this._; t.state != CKEDITOR.TRISTATE_DISABLED && (this.createPanel(e), t.on ? t.panel.hide() : t.panel.showBlock(this._.id, this.document.getById(this._.id), 4)) } CKEDITOR.ui.panelButton = CKEDITOR.tools.createClass({ base: CKEDITOR.ui.button, $: function (t) { var n = t.panel || {}; delete t.panel, this.base(t), this.document = n.parent && n.parent.getDocument() || CKEDITOR.document, n.block = { attributes: n.attributes }, this.hasArrow = n.toolbarRelated = !0, this.click = e, this._ = { panelDefinition: n } }, statics: { handler: { create: function (e) { return new CKEDITOR.ui.panelButton(e) } } }, proto: { createPanel: function (e) { var t = this._; if (!t.panel) { var n = this._.panelDefinition, i = this._.panelDefinition.block, o = n.parent || CKEDITOR.document.getBody(), r = this._.panel = new CKEDITOR.ui.floatPanel(e, o, n), n = r.addBlock(t.id, i), s = this; r.onShow = function () { s.className && this.element.addClass(s.className + "_panel"), s.setState(CKEDITOR.TRISTATE_ON), t.on = 1, s.editorFocus && e.focus(), s.onOpen && s.onOpen() }, r.onHide = function (n) { s.className && this.element.getFirst().removeClass(s.className + "_panel"), s.setState(s.modes && s.modes[e.mode] ? CKEDITOR.TRISTATE_OFF : CKEDITOR.TRISTATE_DISABLED), t.on = 0, !n && s.onClose && s.onClose() }, r.onEscape = function () { r.hide(1), s.document.getById(t.id).focus() }, this.onBlock && this.onBlock(r, n), n.onHide = function () { t.on = 0, s.setState(CKEDITOR.TRISTATE_OFF) } } } } }) }, beforeInit: function (e) { e.ui.addHandler(CKEDITOR.UI_PANELBUTTON, CKEDITOR.ui.panelButton.handler) } }), CKEDITOR.UI_PANELBUTTON = "panelbutton", function () { CKEDITOR.plugins.add("panel", { beforeInit: function (e) { e.ui.addHandler(CKEDITOR.UI_PANEL, CKEDITOR.ui.panel.handler) } }), CKEDITOR.UI_PANEL = "panel", CKEDITOR.ui.panel = function (e, t) { t && CKEDITOR.tools.extend(this, t), CKEDITOR.tools.extend(this, { className: "", css: [] }), this.id = CKEDITOR.tools.getNextId(), this.document = e, this.isFramed = this.forceIFrame || this.css.length, this._ = { blocks: {} } }, CKEDITOR.ui.panel.handler = { create: function (e) { return new CKEDITOR.ui.panel(e) } }; var e = CKEDITOR.addTemplate("panel", '<div lang="{langCode}" id="{id}" dir={dir} class="cke cke_reset_all {editorId} cke_panel cke_panel {cls} cke_{dir}" style="z-index:{z-index}" role="presentation">{frame}</div>'), t = CKEDITOR.addTemplate("panel-frame", '<iframe id="{id}" class="cke_panel_frame" role="presentation" frameborder="0" src="{src}"></iframe>'), n = CKEDITOR.addTemplate("panel-frame-inner", '<!DOCTYPE html><html class="cke_panel_container {env}" dir="{dir}" lang="{langCode}"><head>{css}</head><body class="cke_{dir}" style="margin:0;padding:0" onload="{onload}"></body></html>'); CKEDITOR.ui.panel.prototype = { render: function (i, o) { this.getHolderElement = function () { var e = this._.holder; if (!e) { if (this.isFramed) { var e = this.document.getById(this.id + "_frame"), t = e.getParent(), e = e.getFrameDocument(); CKEDITOR.env.iOS && t.setStyles({ overflow: "scroll", "-webkit-overflow-scrolling": "touch" }), t = CKEDITOR.tools.addFunction(CKEDITOR.tools.bind(function () { this.isLoaded = !0, this.onLoad && this.onLoad() }, this)), e.write(n.output(CKEDITOR.tools.extend({ css: CKEDITOR.tools.buildStyleHtml(this.css), onload: "window.parent.CKEDITOR.tools.callFunction(" + t + ");" }
157, r))), e.getWindow().$.CKEDITOR = CKEDITOR, e.on("keydown", function (e) { var t = e.data.getKeystroke(), n = this.document.getById(this.id).getAttribute("dir"); this._.onKeyDown && !1 === this._.onKeyDown(t) ? e.data.preventDefault() : (27 == t || t == ("rtl" == n ? 39 : 37)) && this.onEscape && !1 === this.onEscape(t) && e.data.preventDefault() }, this), e = e.getBody(), e.unselectable(), CKEDITOR.env.air && CKEDITOR.tools.callFunction(t) } else e = this.document.getById(this.id); this._.holder = e } return e }; var r = { editorId: i.id, id: this.id, langCode: i.langCode, dir: i.lang.dir, cls: this.className, frame: "", env: CKEDITOR.env.cssClass, "z-index": i.config.baseFloatZIndex + 1 }; if (this.isFramed) { var s = CKEDITOR.env.air ? "javascript:void(0)" : CKEDITOR.env.ie ? "javascript:void(function(){" + encodeURIComponent("document.open();(" + CKEDITOR.tools.fixDomain + ")();document.close();") + "}())" : ""; r.frame = t.output({ id: this.id + "_frame", src: s }) } return s = e.output(r), o && o.push(s), s }, addBlock: function (e, t) { return t = this._.blocks[e] = t instanceof CKEDITOR.ui.panel.block ? t : new CKEDITOR.ui.panel.block(this.getHolderElement(), t), this._.currentBlock || this.showBlock(e), t }, getBlock: function (e) { return this._.blocks[e] }, showBlock: function (e) { e = this._.blocks[e]; var t = this._.currentBlock, n = !this.forceIFrame || CKEDITOR.env.ie ? this._.holder : this.document.getById(this.id + "_frame"); return t && t.hide(), this._.currentBlock = e, CKEDITOR.fire("ariaWidget", n), e._.focusIndex = -1, this._.onKeyDown = e.onKeyDown && CKEDITOR.tools.bind(e.onKeyDown, e), e.show(), e }, destroy: function () { this.element && this.element.remove() } }, CKEDITOR.ui.panel.block = CKEDITOR.tools.createClass({ $: function (e, t) { this.element = e.append(e.getDocument().createElement("div", { attributes: { tabindex: -1, "class": "cke_panel_block" }, styles: { display: "none" } })), t && CKEDITOR.tools.extend(this, t), this.element.setAttributes({ role: this.attributes.role || "presentation", "aria-label": this.attributes["aria-label"], title: this.attributes.title || this.attributes["aria-label"] }), this.keys = {}, this._.focusIndex = -1, this.element.disableContextMenu() }, _: { markItem: function (e) { -1 != e && (e = this.element.getElementsByTag("a").getItem(this._.focusIndex = e), CKEDITOR.env.webkit && e.getDocument().getWindow().focus(), e.focus(), this.onMark && this.onMark(e)) } }, proto: { show: function () { this.element.setStyle("display", "") }, hide: function () { this.onHide && !0 === this.onHide.call(this) || this.element.setStyle("display", "none") }, onKeyDown: function (e, t) { var n = this.keys[e]; switch (n) { case "next": for (var i, o = this._.focusIndex, n = this.element.getElementsByTag("a"); i = n.getItem(++o);)if (i.getAttribute("_cke_focus") && i.$.offsetWidth) { this._.focusIndex = o, i.focus(); break } return i || t ? !1 : (this._.focusIndex = -1, this.onKeyDown(e, 1)); case "prev": for (o = this._.focusIndex, n = this.element.getElementsByTag("a"); o > 0 && (i = n.getItem(--o));) { if (i.getAttribute("_cke_focus") && i.$.offsetWidth) { this._.focusIndex = o, i.focus(); break } i = null } return i || t ? !1 : (this._.focusIndex = n.count(), this.onKeyDown(e, 1)); case "click": case "mouseup": return o = this._.focusIndex, (i = o >= 0 && this.element.getElementsByTag("a").getItem(o)) && (i.$[n] ? i.$[n]() : i.$["on" + n]()), !1 }return !0 } } }) }(), CKEDITOR.plugins.add("floatpanel", { requires: "panel" }), function () { function e(e, n, i, o, r) { r = CKEDITOR.tools.genKey(n.getUniqueId(), i.getUniqueId(), e.lang.dir, e.uiColor || "", o.css || "", r || ""); var s = t[r]; return s || (s = t[r] = new CKEDITOR.ui.panel(n, o), s.element = i.append(CKEDITOR.dom.element.createFromHtml(s.render(e), n)), s.element.setStyles({ display: "none", position: "absolute" })), s } var t = {}; CKEDITOR.ui.floatPanel = CKEDITOR.tools.createClass({ $: function (t, n, i, o) { function r() { c.hide() } i.forceIFrame = 1, i.toolbarRelated && t.elementMode == CKEDITOR.ELEMENT_MODE_INLINE && (n = CKEDITOR.document.getById("cke_" + t.name)); var s = n.getDocument(); o = e(t, s, n, i, o || 0); var a = o.element, l = a.getFirst(), c = this; a.disableContextMenu(), this.element = a, this._ = { editor: t, panel: o, parentElement: n, definition: i, document: s, iframe: l, children: [], dir: t.lang.dir, showBlockParams: null }, t.on("mode", r), t.on("resize", r), s.getWindow().on("resize", function () { this.reposition() }, this) }, proto: { addBlock: function (e, t) { return this._.panel.addBlock(e, t) }, addListBlock: function (e, t) { return this._.panel.addListBlock(e, t) }, getBlock: function (e) { return this._.panel.getBlock(e) }, showBlock: function (e, t, n, i, o, r) { var s = this._.panel, a = s.showBlock(e); this._.showBlockParams = [].slice.call(arguments), this.allowBlur(!1); var l = this._.editor.editable(); this._.returnFocus = l.hasFocus ? l : new CKEDITOR.dom.element(CKEDITOR.document.$.activeElement), this._.hideTimeout = 0; var c = this.element, l = this._.iframe, l = CKEDITOR.env.ie && !CKEDITOR.env.edge ? l : new CKEDITOR.dom.window(l.$.contentWindow), d = c.getDocument(), u = this._.parentElement.getPositionedAncestor(), h = t.getDocumentPosition(d), d = u ? u.getDocumentPosition(d) : { x: 0, y: 0 }
157, p = "rtl" == this._.dir, f = h.x + (i || 0) - d.x, m = h.y + (o || 0) - d.y; !p || 1 != n && 4 != n ? p || 2 != n && 3 != n || (f += t.$.offsetWidth - 1) : f += t.$.offsetWidth, 3 != n && 4 != n || (m += t.$.offsetHeight - 1), this._.panel._.offsetParentId = t.getId(), c.setStyles({ top: m + "px", left: 0, display: "" }), c.setOpacity(0), c.getFirst().removeStyle("width"), this._.editor.focusManager.add(l), this._.blurSet || (CKEDITOR.event.useCapture = !0, l.on("blur", function (e) { function t() { delete this._.returnFocus, this.hide() } this.allowBlur() && e.data.getPhase() == CKEDITOR.EVENT_PHASE_AT_TARGET && this.visible && !this._.activeChild && (CKEDITOR.env.iOS ? this._.hideTimeout || (this._.hideTimeout = CKEDITOR.tools.setTimeout(t, 0, this)) : t.call(this)) }, this), l.on("focus", function () { this._.focused = !0, this.hideChild(), this.allowBlur(!0) }, this), CKEDITOR.env.iOS && (l.on("touchstart", function () { clearTimeout(this._.hideTimeout) }, this), l.on("touchend", function () { this._.hideTimeout = 0, this.focus() }, this)), CKEDITOR.event.useCapture = !1, this._.blurSet = 1), s.onEscape = CKEDITOR.tools.bind(function (e) { return this.onEscape && !1 === this.onEscape(e) ? !1 : void 0 }, this), CKEDITOR.tools.setTimeout(function () { var e = CKEDITOR.tools.bind(function () { var e = c; if (e.removeStyle("width"), a.autoSize) { var t = a.element.getDocument(), t = (CKEDITOR.env.webkit || CKEDITOR.env.edge ? a.element : t.getBody()).$.scrollWidth; CKEDITOR.env.ie && CKEDITOR.env.quirks && t > 0 && (t += (e.$.offsetWidth || 0) - (e.$.clientWidth || 0) + 3), e.setStyle("width", t + 10 + "px"), t = a.element.$.scrollHeight, CKEDITOR.env.ie && CKEDITOR.env.quirks && t > 0 && (t += (e.$.offsetHeight || 0) - (e.$.clientHeight || 0) + 3), e.setStyle("height", t + "px"), s._.currentBlock.element.setStyle("display", "none").removeStyle("display") } else e.removeStyle("height"); p && (f -= c.$.offsetWidth), c.setStyle("left", f + "px"); var t = s.element.getWindow(), e = c.$.getBoundingClientRect(), t = t.getViewPaneSize(), n = e.width || e.right - e.left, i = e.height || e.bottom - e.top, o = p ? e.right : t.width - e.left, l = p ? t.width - e.right : e.left; p ? n > o && (f = l > n ? f + n : t.width > n ? f - e.left : f - e.right + t.width) : n > o && (f = l > n ? f - n : t.width > n ? f - e.right + t.width : f - e.left), n = e.top, t.height - e.top < i && (m = n > i ? m - i : t.height > i ? m - e.bottom + t.height : m - e.top), CKEDITOR.env.ie && (t = e = new CKEDITOR.dom.element(c.$.offsetParent), "html" == t.getName() && (t = t.getDocument().getBody()), "rtl" == t.getComputedStyle("direction") && (f = CKEDITOR.env.ie8Compat ? f - 2 * c.getDocument().getDocumentElement().$.scrollLeft : f - (e.$.scrollWidth - e.$.clientWidth))); var d, e = c.getFirst(); (d = e.getCustomData("activePanel")) && d.onHide && d.onHide.call(this, 1), e.setCustomData("activePanel", this), c.setStyles({ top: m + "px", left: f + "px" }), c.setOpacity(1), r && r() }, this); s.isLoaded ? e() : s.onLoad = e, CKEDITOR.tools.setTimeout(function () { var e = CKEDITOR.env.webkit && CKEDITOR.document.getWindow().getScrollPosition().y; this.focus(), a.element.focus(), CKEDITOR.env.webkit && (CKEDITOR.document.getBody().$.scrollTop = e), this.allowBlur(!0), this._.editor.fire("panelShow", this) }, 0, this) }, CKEDITOR.env.air ? 200 : 0, this), this.visible = 1, this.onShow && this.onShow.call(this) }, reposition: function () { var e = this._.showBlockParams; this.visible && this._.showBlockParams && (this.hide(), this.showBlock.apply(this, e)) }, focus: function () { if (CKEDITOR.env.webkit) { var e = CKEDITOR.document.getActive(); e && !e.equals(this._.iframe) && e.$.blur() } (this._.lastFocused || this._.iframe.getFrameDocument().getWindow()).focus() }, blur: function () { var e = this._.iframe.getFrameDocument().getActive(); e && e.is("a") && (this._.lastFocused = e) }, hide: function (e) { !this.visible || this.onHide && !0 === this.onHide.call(this) || (this.hideChild(), CKEDITOR.env.gecko && this._.iframe.getFrameDocument().$.activeElement.blur(), this.element.setStyle("display", "none"), this.visible = 0, this.element.getFirst().removeCustomData("activePanel"), (e = e && this._.returnFocus) && (CKEDITOR.env.webkit && e.type && e.getWindow().$.focus(), e.focus()), delete this._.lastFocused, this._.showBlockParams = null, this._.editor.fire("panelHide", this)) }, allowBlur: function (e) { var t = this._.panel; return void 0 !== e && (t.allowBlur = e), t.allowBlur }, showAsChild: function (e, t, n, i, o, r) { this._.activeChild == e && e._.panel._.offsetParentId == n.getId() || (this.hideChild(), e.onHide = CKEDITOR.tools.bind(function () { CKEDITOR.tools.setTimeout(function () { this._.focused || this.hide() }, 0, this) }, this), this._.activeChild = e, this._.focused = !1, e.showBlock(t, n, i, o, r), this.blur(), (CKEDITOR.env.ie7Compat || CKEDITOR.env.ie6Compat) && setTimeout(function () { e.element.getChild(0).$.style.cssText += "" }, 100)) }, hideChild: function (e) { var t = this._.activeChild; t && (delete t.onHide, delete this._.activeChild, t.hide(), e && this.focus()) } } }), CKEDITOR.on("instanceDestroyed", function () { var e, n = CKEDITOR.tools.isEmpty(CKEDITOR.instances); for (e in t) { var i = t[e]; n ? i.destroy() : i.element.hide() } n && (t = {}) }) }(), CKEDITOR.plugins.add("colorbutton", { requires: "panelbutton,floatpanel", init: function (e) { function t(t, i, s, a, l) { var c = new CKEDITOR.style(o["colorButton_" + i + "Style"]), d = CKEDITOR.tools.getNextId() + "_colorBox"; l = l || {}, e.ui.add(t, CKEDITOR.UI_PANELBUTTON, { label: s, title: s, modes: { wysiwyg: 1 }, editorFocus: 0, toolbar: "colors," + a, allowedContent: c, requiredContent: c, contentTransformations: l.contentTransformations, panel: { css: CKEDITOR.skin.getPath("editor"), attributes: { role: "listbox", "aria-label": r.panelTitle } }, onBlock: function (t, o) { o.autoSize = !0, o.element.addClass("cke_colorblock"), o.element.setHtml(n(t, i, d)), o.element.getDocument().getBody().setStyle("overflow", "hidden"), CKEDITOR.ui.fire("ready", this); var r = o.keys, s = "rtl" == e.lang.dir; r[s ? 37 : 39] = "next", r[40] = "next", r[9] = "next", r[s ? 39 : 37] = "prev", r[38] = "prev", r[CKEDITOR.SH
157IFT + 9] = "prev", r[32] = "click" }, refresh: function () { e.activeFilter.check(c) || this.setState(CKEDITOR.TRISTATE_DISABLED) }, onOpen: function () { var t, n = e.getSelection(), n = n && n.getStartElement(), n = e.elementPath(n); if (n) { n = n.block || n.blockLimit || e.document.getBody(); do t = n && n.getComputedStyle("back" == i ? "background-color" : "color") || "transparent"; while ("back" == i && "transparent" == t && n && (n = n.getParent())); return t && "transparent" != t || (t = "#ffffff"), !1 !== o.colorButton_enableAutomatic && this._.panel._.iframe.getFrameDocument().getById(d).setStyle("background-color", t), t } } }) } function n(t, n, s) { var a = [], l = o.colorButton_colors.split(","), c = e.plugins.colordialog && !1 !== o.colorButton_enableMore, d = l.length + (c ? 2 : 1), u = CKEDITOR.tools.addFunction(function (n, r) { function s(e) { this.removeListener("ok", s), this.removeListener("cancel", s), "ok" == e.name && a(this.getContentElement("picker", "selectedColor").getValue(), r) } var a = arguments.callee; if ("?" == n) e.openDialog("colordialog", function () { this.on("ok", s), this.on("cancel", s) }); else { if (e.focus(), t.hide(), e.fire("saveSnapshot"), e.removeStyle(new CKEDITOR.style(o["colorButton_" + r + "Style"], { color: "inherit" })), n) { var l = o["colorButton_" + r + "Style"]; l.childRule = "back" == r ? function (e) { return i(e) } : function (e) { return !(e.is("a") || e.getElementsByTag("a").count()) || i(e) }, e.applyStyle(new CKEDITOR.style(l, { color: n })) } e.fire("saveSnapshot") } }); for (!1 !== o.colorButton_enableAutomatic && a.push('<a class="cke_colorauto" _cke_focus=1 hidefocus=true title="', r.auto, '" onclick="CKEDITOR.tools.callFunction(', u, ",null,'", n, "');return false;\" href=\"javascript:void('", r.auto, '\')" role="option" aria-posinset="1" aria-setsize="', d, '"><table role="presentation" cellspacing=0 cellpadding=0 width="100%"><tr><td><span class="cke_colorbox" id="', s, '"></span></td><td colspan=7 align=center>', r.auto, "</td></tr></table></a>"), a.push('<table role="presentation" cellspacing=0 cellpadding=0 width="100%">'), s = 0; s < l.length; s++) { 0 === s % 8 && a.push("</tr><tr>"); var h = l[s].split("/"), p = h[0], f = h[1] || p; h[1] || (p = "#" + p.replace(/^(.)(.)(.)$/, "$1$1$2$2$3$3")), h = e.lang.colorbutton.colors[f] || f, a.push('<td><a class="cke_colorbox" _cke_focus=1 hidefocus=true title="', h, '" onclick="CKEDITOR.tools.callFunction(', u, ",'", p, "','", n, "'); return false;\" href=\"javascript:void('", h, '\')" role="option" aria-posinset="', s + 2, '" aria-setsize="', d, '"><span class="cke_colorbox" style="background-color:#', f, '"></span></a></td>') } return c && a.push('</tr><tr><td colspan=8 align=center><a class="cke_colormore" _cke_focus=1 hidefocus=true title="', r.more, '" onclick="CKEDITOR.tools.callFunction(', u, ",'?','", n, "');return false;\" href=\"javascript:void('", r.more, "')\"", ' role="option" aria-posinset="', d, '" aria-setsize="', d, '">', r.more, "</a></td>"), a.push("</tr></table>"), a.join("") } function i(e) { return "false" == e.getAttribute("contentEditable") || e.getAttribute("data-nostyle") } var o = e.config, r = e.lang.colorbutton; if (!CKEDITOR.env.hc) { t("TextColor", "fore", r.textColorTitle, 10, { contentTransformations: [[{ element: "font", check: "span{color}", left: function (e) { return !!e.attributes.color }, right: function (e) { e.name = "span", e.attributes.color && (e.styles.color = e.attributes.color), delete e.attributes.color } }]] }); var s = {}
157, a = e.config.colorButton_normalizeBackground; (void 0 === a || a) && (s.contentTransformations = [[{ element: "span", left: function (e) { var t = CKEDITOR.tools; return "span" == e.name && e.styles && e.styles.background ? (e = t.style.parse.background(e.styles.background), e.color && 1 === t.objectKeys(e).length) : !1 }, right: function (t) { var n = new CKEDITOR.style(e.config.colorButton_backStyle, { color: t.styles.background }).getDefinition(); return t.name = n.element, t.styles = n.styles, t.attributes = n.attributes || {}, t } }]]), t("BGColor", "back", r.bgColorTitle, 20, s) } } }), CKEDITOR.config.colorButton_colors = "000,800000,8B4513,2F4F4F,008080,000080,4B0082,696969,B22222,A52A2A,DAA520,006400,40E0D0,0000CD,800080,808080,F00,FF8C00,FFD700,008000,0FF,00F,EE82EE,A9A9A9,FFA07A,FFA500,FFFF00,00FF00,AFEEEE,ADD8E6,DDA0DD,D3D3D3,FFF0F5,FAEBD7,FFFFE0,F0FFF0,F0FFFF,F0F8FF,E6E6FA,FFF", CKEDITOR.config.colorButton_foreStyle = { element: "span", styles: { color: "#(color)" }, overrides: [{ element: "font", attributes: { color: null } }] }, CKEDITOR.config.colorButton_backStyle = { element: "span", styles: { "background-color": "#(color)" } }, CKEDITOR.plugins.colordialog = { requires: "dialog", init: function (e) { var t = new CKEDITOR.dialogCommand("colordialog"); t.editorFocus = !1, e.addCommand("colordialog", t), CKEDITOR.dialog.add("colordialog", this.path + "dialogs/colordialog.js"), e.getColorFromDialog = function (t, n) { var i = function (e) { this.removeListener("ok", i), this.removeListener("cancel", i), e = "ok" == e.name ? this.getValueOf("picker", "selectedColor") : null, t.call(n, e) }, o = function (e) { e.on("ok", i), e.on("cancel", i) }; e.execCommand("colordialog"), e._.storedDialogs && e._.storedDialogs.colordialog ? o(e._.storedDialogs.colordialog) : CKEDITOR.on("dialogDefinition", function (e) { if ("colordialog" == e.data.name) { var t = e.data.definition; e.removeListener(), t.onLoad = CKEDITOR.tools.override(t.onLoad, function (e) { return function () { o(this), t.onLoad = e, "function" == typeof e && e.call(this) } }) } }) } } }, CKEDITOR.plugins.add("colordialog", CKEDITOR.plugins.colordialog), function () { CKEDITOR.plugins.add("templates", { requires: "dialog", init: function (e) { CKEDITOR.dialog.add("templates", CKEDITOR.getUrl(this.path + "dialogs/templates.js")), e.addCommand("templates", new CKEDITOR.dialogCommand("templates")), e.ui.addButton && e.ui.addButton("Templates", { label: e.lang.templates.button, command: "templates", toolbar: "doctools,10" }) } }); var e = {}, t = {}; CKEDITOR.addTemplates = function (t, n) { e[t] = n }, CKEDITOR.getTemplates = function (t) { return e[t] }, CKEDITOR.loadTemplates = function (e, n) { for (var i = [], o = 0, r = e.length; r > o; o++)t[e[o]] || (i.push(e[o]), t[e[o]] = 1); i.length ? CKEDITOR.scriptLoader.load(i, n) : setTimeout(n, 0) } }(), CKEDITOR.config.templates_files = [CKEDITOR.getUrl("plugins/templates/templates/default.js")], CKEDITOR.config.templates_replaceContent = !0, CKEDITOR.plugins.add("menu", { requires: "floatpanel", beforeInit: function (e) { for (var t = e.config.menu_groups.split(","), n = e._.menuGroups = {}, i = e._.menuItems = {}, o = 0; o < t.length; o++)n[t[o]] = o + 1; e.addMenuGroup = function (e, t) { n[e] = t || 100 }, e.addMenuItem = function (e, t) { n[t.group] && (i[e] = new CKEDITOR.menuItem(this, e, t)) }, e.addMenuItems = function (e) { for (var t in e) this.addMenuItem(t, e[t]) }, e.getMenuItem = function (e) { return i[e] }, e.removeMenuItem = function (e) { delete i[e] } } }), function () {
158            function e(e) { e.sort(function (e, t) { return e.group < t.group ? -1 : e.group > t.group ? 1 : e.order < t.order ? -1 : e.order > t.order ? 1 : 0 }) } var t = '<span class="cke_menuitem"><a id="{id}" class="cke_menubutton cke_menubutton__{name} cke_menubutton_{state} {cls}" href="{href}" title="{title}" tabindex="-1" _cke_focus=1 hidefocus="true" role="{role}" aria-label="{label}" aria-describedby="{id}_description" aria-haspopup="{hasPopup}" aria-disabled="{disabled}" {ariaChecked}'; CKEDITOR.env.gecko && CKEDITOR.env.mac && (t += ' onkeypress="return false;
158"'), CKEDITOR.env.gecko && (t += ' onblur="this.style.cssText = this.style.cssText;"'); var t = t + (' onmouseover="CKEDITOR.tools.callFunction({hoverFn},{index});" onmouseout="CKEDITOR.tools.callFunction({moveOutFn},{index});" ' + (CKEDITOR.env.ie ? 'onclick="return false;" onmouseup' : "onclick") + '="CKEDITOR.tools.callFunction({clickFn},{index}); return false;">'), n = CKEDITOR.addTemplate("menuItem", t + '<span class="cke_menubutton_inner"><span class="cke_menubutton_icon"><span class="cke_button_icon cke_button__{iconName}_icon" style="{iconStyle}"></span></span><span class="cke_menubutton_label">{label}</span>{shortcutHtml}{arrowHtml}</span></a><span id="{id}_description" class="cke_voice_label" aria-hidden="false">{ariaShortcut}</span></span>'), i = CKEDITOR.addTemplate("menuArrow", '<span class="cke_menuarrow"><span>{label}</span></span>'), o = CKEDITOR.addTemplate("menuShortcut", '<span class="cke_menubutton_label cke_menubutton_shortcut">{shortcut}</span>'); CKEDITOR.menu = CKEDITOR.tools.createClass({
159                $: function (e, t) { t = this._.definition = t || {}, this.id = CKEDITOR.tools.getNextId(), this.editor = e, this.items = [], this._.listeners = [], this._.level = t.level || 1; var n = CKEDITOR.tools.extend({}, t.panel, { css: [CKEDITOR.skin.getPath("editor")], level: this._.level - 1, block: {} }), i = n.block.attributes = n.attributes || {}; !i.role && (i.role = "menu"), this._.panelDefinition = n }, _: { onShow: function () { var e = this.editor.getSelection(), t = e && e.getStartElement(), n = this.editor.elementPath(), i = this._.listeners; this.removeAll(); for (var o = 0; o < i.length; o++) { var r = i[o](t, e, n); if (r) for (var s in r) { var a = this.editor.getMenuItem(s); !a || a.command && !this.editor.getCommand(a.command).state || (a.state = r[s], this.add(a)) } } }, onClick: function (e) { this.hide(), e.onClick ? e.onClick() : e.command && this.editor.execCommand(e.command) }, onEscape: function (e) { var t = this.parent; return t ? t._.panel.hideChild(1) : 27 == e && this.hide(1), !1 }, onHide: function () { this.onHide && this.onHide() }, showSubMenu: function (e) { var t = this._.subMenu, n = this.items[e]; if (n = n.getItems && n.getItems()) { t ? t.removeAll() : (t = this._.subMenu = new CKEDITOR.menu(this.editor, CKEDITOR.tools.extend({}, this._.definition, { level: this._.level + 1 }, !0)), t.parent = this, t._.onClick = CKEDITOR.tools.bind(this._.onClick, this)); for (var i in n) { var o = this.editor.getMenuItem(i); o && (o.state = n[i], t.add(o)) } var r = this._.panel.getBlock(this.id).element.getDocument().getById(this.id + String(e)); setTimeout(function () { t.show(r, 2) }, 0) } else this._.panel.hideChild(1) } }, proto: {
160                    add: function (e) { e.order || (e.order = this.items.length), this.items.push(e) }, removeAll: function () { this.items = [] }, show: function (t, n, i, o) {
161                        if (this.parent || (this._.onShow(), this.items.length)) {
162                            n = n || ("rtl" == this.editor.lang.dir ? 2 : 1);
163                            var r = this.items, s = this.editor, a = this._.panel, l = this._.element; if (!a) { a = this._.panel = new CKEDITOR.ui.floatPanel(this.editor, CKEDITOR.document.getBody(), this._.panelDefinition, this._.level), a.onEscape = CKEDITOR.tools.bind(function (e) { return !1 === this._.onEscape(e) ? !1 : void 0 }, this), a.onShow = function () { a._.panel.getHolderElement().getParent().addClass("cke").addClass("cke_reset_all") }, a.onHide = CKEDITOR.tools.bind(function () { this._.onHide && this._.onHide() }, this), l = a.addBlock(this.id, this._.panelDefinition.block), l.autoSize = !0; var c = l.keys; c[40] = "next", c[9] = "next", c[38] = "prev", c[CKEDITOR.SHIFT + 9] = "prev", c["rtl" == s.lang.dir ? 37 : 39] = CKEDITOR.env.ie ? "mouseup" : "click", c[32] = CKEDITOR.env.ie ? "mouseup" : "click", CKEDITOR.env.ie && (c[13] = "mouseup"), l = this._.element = l.element, c = l.getDocument(), c.getBody().setStyle("overflow", "hidden"), c.getElementsByTag("html").getItem(0).setStyle("overflow", "hidden"), this._.itemOverFn = CKEDITOR.tools.addFunction(function (e) { clearTimeout(this._.showSubTimeout), this._.showSubTimeout = CKEDITOR.tools.setTimeout(this._.showSubMenu, s.config.menu_subMenuDelay || 400, this, [e]) }, this), this._.itemOutFn = CKEDITOR.tools.addFunction(function () { clearTimeout(this._.showSubTimeout) }, this), this._.itemClickFn = CKEDITOR.tools.addFunction(function (e) { var t = this.items[e]; t.state == CKEDITOR.TRISTATE_DISABLED ? this.hide(1) : t.getItems ? this._.showSubMenu(e) : this._.onClick(t) }, this) } e(r); for (var c = s.elementPath(), c = ['<div class="cke_menu' + (c && c.direction() != s.lang.dir ? " cke_mixed_dir_content" : "") + '" role="presentation">'], d = r.length, u = d && r[0].group, h = 0; d > h; h++) { var p = r[h]; u != p.group && (c.push('<div class="cke_menuseparator" role="separator"></div>'), u = p.group), p.render(this, h, c) } c.push("</div>"), l.setHtml(c.join("")), CKEDITOR.ui.fire("ready", this), this.parent ? this.parent._.panel.showAsChild(a, this.id, t, n, i, o) : a.showBlock(this.id, t, n, i, o), s.fire("menuShow", [a])
164                        }
165                    }, addListener: function (e) { this._.listeners.push(e) }, hide: function (e) { this._.onHide && this._.onHide(), this._.panel && this._.panel.hide(e) }
166                }
167            }), CKEDITOR.menuItem = CKEDITOR.tools.createClass({ $: function (e, t, n) { CKEDITOR.tools.extend(this, n, { order: 0, className: "cke_menubutton__" + t }), this.group = e._.menuGroups[this.group], this.editor = e, this.name = t }, proto: { render: function (e, t, r) { var s, a, l = e.id + String(t), c = "undefined" == typeof this.state ? CKEDITOR.TRISTATE_OFF : this.state, d = "", u = this.editor, h = c == CKEDITOR.TRISTATE_ON ? "on" : c == CKEDITOR.TRISTATE_DISABLED ? "disabled" : "off"; this.role in { menuitemcheckbox: 1, menuitemradio: 1 } && (d = ' aria-checked="' + (c == CKEDITOR.TRISTATE_ON ? "true" : "false") + '"'); var p = this.getItems, f = "&#" + ("rtl" == this.editor.lang.dir ? "9668" : "9658") + ";", m = this.name; this.icon && !/\./.test(this.icon) && (m = this.icon), this.command && (s = u.getCommand(this.command), (s = u.getCommandKeystroke(s)) && (a = CKEDITOR.tools.keystrokeToString(u.lang.common.keyboard, s))), e = { id: l, name: this.name, iconName: m, label: this.label, cls: this.className || "", state: h, hasPopup: p ? "true" : "false", disabled: c == CKEDITOR.TRISTATE_DISABLED, title: this.label + (a ? " (" + a.display + ")" : ""), ariaShortcut: a ? u.lang.common.keyboardShortcut + " " + a.aria : "", href: "javascript:void('" + (this.label || "").replace("'") + "')", hoverFn: e._.itemOverFn, moveOutFn: e._.itemOutFn, clickFn: e._.itemClickFn, index: t, iconStyle: CKEDITOR.skin.getIconStyle(m, "rtl" == this.editor.lang.dir, m == this.icon ? null : this.icon, this.iconOffset), shortcutHtml: a ? o.output({ shortcut: a.display }) : "", arrowHtml: p ? i.output({ label: f }) : "", role: this.role ? this.role : "menuitem", ariaChecked: d }, n.output(e, r) } } })
168        }(), CKEDITOR.config.menu_groups = "clipboard,form,tablecell,tablecellproperties,tablerow,tablecolumn,table,anchor,link,image,flash,checkbox,radio,textfield,hiddenfield,imagebutton,button,select,textarea,div", CKEDITOR.plugins.add("contextmenu", { requires: "menu", onLoad: function () { CKEDITOR.plugins.contextMenu = CKEDITOR.tools.createClass({ base: CKEDITOR.menu, $: function (e) { this.base.call(this, e, { panel: { className: "cke_menu_panel", attributes: { "aria-label": e.lang.contextmenu.options } } }) }, proto: { addTarget: function (e, t) { if (e.on("contextmenu", function (e) { e = e.data; var i = CKEDITOR.env.webkit ? n : CKEDITOR.env.mac ? e.$.metaKey : e.$.ctrlKey; if (!t || !i) { if (e.preventDefault(), CKEDITOR.env.mac && CKEDITOR.env.webkit) { var i = this.editor, o = new CKEDITOR.dom.elementPath(e.getTarget(), i.editable()).contains(function (e) { return e.hasAttribute("contenteditable") }, !0); o && "false" == o.getAttribute("contenteditable") && i.getSelection().fake(o) } var o = e.getTarget().getDocument(), r = e.getTarget().getDocument().getDocumentElement(), i = !o.equals(CKEDITOR.document), o = o.getWindow().getScrollPosition(), s = i ? e.$.clientX : e.$.pageX || o.x + e.$.clientX, a = i ? e.$.clientY : e.$.pageY || o.y + e.$.clientY; CKEDITOR.tools.setTimeout(function () { this.open(r, null, s, a) }, CKEDITOR.env.ie ? 200 : 0, this) } }, this), CKEDITOR.env.webkit) { var n, i = function () { n = 0 };
168 e.on("keydown", function (e) { n = CKEDITOR.env.mac ? e.data.$.metaKey : e.data.$.ctrlKey }), e.on("keyup", i), e.on("contextmenu", i) } }, open: function (e, t, n, i) { this.editor.focus(), e = e || CKEDITOR.document.getDocumentElement(), this.editor.selectionChange(1), this.show(e, t, n, i) } } }) }, beforeInit: function (e) { var t = e.contextMenu = new CKEDITOR.plugins.contextMenu(e); e.on("contentDom", function () { t.addTarget(e.editable(), !1 !== e.config.browserContextMenuOnCtrl) }), e.addCommand("contextMenu", { exec: function () { e.contextMenu.open(e.document.getBody()) } }), e.setKeystroke(CKEDITOR.SHIFT + 121, "contextMenu"), e.setKeystroke(CKEDITOR.CTRL + CKEDITOR.SHIFT + 121, "contextMenu") } }), function () { function e(e) { var t = (e = e.data) && e.$; return e && t ? CKEDITOR.env.ie && 9 > CKEDITOR.env.version ? 1 === t.button : 0 === t.button : !1 } function t(e, t, n, i) { var o = new CKEDITOR.dom.walker(e); if (!(e = e.startContainer.getAscendant(t, !0) || e.endContainer.getAscendant(t, !0)) || (n(e), !i)) for (; (e = o.next()) && (!(e = e.getAscendant(t, !0)) || (n(e), !i));); } function n(e, t) { var n = { ul: "ol", ol: "ul" }; return -1 !== o(t, function (t) { return t.element === e || t.element === n[e] }) } function i(e) { this.styles = null, this.sticky = !1, this.editor = e, this.filter = new CKEDITOR.filter(e.config.copyFormatting_allowRules), !0 === e.config.copyFormatting_allowRules && (this.filter.disabled = !0), e.config.copyFormatting_disallowRules && this.filter.disallow(e.config.copyFormatting_disallowRules) } var o = CKEDITOR.tools.indexOf, r = !1; CKEDITOR.plugins.add("copyformatting", { lang: "en", icons: "copyformatting", hidpi: !0, init: function (t) { var i = CKEDITOR.plugins.copyformatting; i._addScreenReaderContainer(), r || (CKEDITOR.document.appendStyleSheet(this.path + "styles/copyformatting.css"), r = !0), t.addContentsCss && t.addContentsCss(this.path + "styles/copyformatting.css"), t.copyFormatting = new i.state(t), t.addCommand("copyFormatting", i.commands.copyFormatting), t.addCommand("applyFormatting", i.commands.applyFormatting), t.ui.addButton("CopyFormatting", { label: t.lang.copyformatting.label, command: "copyFormatting", toolbar: "cleanup,0" }), t.on("contentDom", function () { var n = t.editable(), i = n.isInline() ? n : t.document, o = t.ui.get("CopyFormatting"); n.attachListener(i, "mouseup", function (n) { e(n) && t.execCommand("applyFormatting") }), n.attachListener(CKEDITOR.document, "mouseup", function (i) { var o = t.getCommand("copyFormatting"); e(i) && o.state === CKEDITOR.TRISTATE_ON && !n.contains(i.data.getTarget()) && t.execCommand("copyFormatting") }), o && (i = CKEDITOR.document.getById(o._.id), n.attachListener(i, "dblclick", function () { t.execCommand("copyFormatting", { sticky: !0 }) }), n.attachListener(i, "mouseup", function (e) { e.data.stopPropagation() })) }), t.config.copyFormatting_keystrokeCopy && t.setKeystroke(t.config.copyFormatting_keystrokeCopy, "copyFormatting"), t.config.copyFormatting_keystrokePaste && t.setKeystroke(t.config.copyFormatting_keystrokePaste, "applyFormatting"), t.on("key", function (e) { var n = t.getCommand("copyFormatting"); e = e.data.domEvent, e.getKeystroke && 27 === e.getKeystroke() && n.state === CKEDITOR.TRISTATE_ON && t.execCommand("copyFormatting") }), t.copyFormatting.on("extractFormatting", function (e) { var n = e.data.element; return n.contains(t.editable()) || n.equals(t.editable()) ? e.cancel() : (n = i._convertElementToStyleDef(n), t.copyFormatting.filter.check(new CKEDITOR.style(n), !0, !0) ? void (e.data.styleDef = n) : e.cancel()) }), t.copyFormatting.on("applyFormatting", function (e) { if (!e.data.preventFormatStripping) { var r, s, a = e.data.range, l = i._extractStylesFromRange(t, a), c = i._determineContext(a); if (t.copyFormatting._isContextAllowed(c)) for (s = 0; s < l.length;
168 s++)c = l[s], r = a.createBookmark(), -1 === o(i.preservedElements, c.element) ? CKEDITOR.env.webkit && !CKEDITOR.env.chrome ? l[s].removeFromRange(e.data.range, e.editor) : l[s].remove(e.editor) : n(c.element, e.data.styles) && i._removeStylesFromElementInRange(a, c.element), a.moveToBookmark(r) } }), t.copyFormatting.on("applyFormatting", function (e) { var n = CKEDITOR.plugins.copyformatting, i = n._determineContext(e.data.range); "list" === i && t.copyFormatting._isContextAllowed("list") ? n._applyStylesToListContext(e.editor, e.data.range, e.data.styles) : "table" === i && t.copyFormatting._isContextAllowed("table") ? n._applyStylesToTableContext(e.editor, e.data.range, e.data.styles) : t.copyFormatting._isContextAllowed("text") && n._applyStylesToTextContext(e.editor, e.data.range, e.data.styles) }, null, null, 999) } }), i.prototype._isContextAllowed = function (e) { var t = this.editor.config.copyFormatting_allowedContexts; return !0 === t || -1 !== o(t, e) }, CKEDITOR.event.implementOn(i.prototype), CKEDITOR.plugins.copyformatting = { state: i, inlineBoundary: "h1 h2 h3 h4 h5 h6 p div".split(" "), excludedAttributes: ["id", "style", "href", "data-cke-saved-href", "dir"], elementsForInlineTransform: ["li"], excludedElementsFromInlineTransform: ["table", "thead", "tbody", "ul", "ol"], excludedAttributesFromInlineTransform: ["value", "type"], preservedElements: "ul ol li td th tr thead tbody table".split(" "), breakOnElements: ["ul", "ol", "table"], commands: { copyFormatting: { exec: function (e, t) { var n = CKEDITOR.plugins.copyformatting, i = e.copyFormatting, o = t ? "keystrokeHandler" == t.from : !1, r = t ? t.sticky || o : !1, s = n._getCursorContainer(e), a = CKEDITOR.document.getDocumentElement(); return this.state === CKEDITOR.TRISTATE_ON ? (i.styles = null, i.sticky = !1, s.removeClass("cke_copyformatting_active"), a.removeClass("cke_copyformatting_disabled"), a.removeClass("cke_copyformatting_tableresize_cursor"), n._putScreenReaderMessage(e, "canceled"), this.setState(CKEDITOR.TRISTATE_OFF)) : (i.styles = n._extractStylesFromElement(e, e.elementPath().lastElement), this.setState(CKEDITOR.TRISTATE_ON), o || (s.addClass("cke_copyformatting_active"), a.addClass("cke_copyformatting_tableresize_cursor"), e.config.copyFormatting_outerCursor && a.addClass("cke_copyformatting_disabled")), i.sticky = r, void n._putScreenReaderMessage(e, "copied")) } }, applyFormatting: { exec: function (e, t) { var n = e.getCommand("copyFormatting"), i = t ? "keystrokeHandler" == t.from : !1, o = CKEDITOR.plugins.copyformatting, r = e.copyFormatting, s = o._getCursorContainer(e), a = CKEDITOR.document.getDocumentElement(); if (i || n.state === CKEDITOR.TRISTATE_ON) { if (i && !r.styles) return o._putScreenReaderMessage(e, "failed"); i = o._applyFormat(e, r.styles), r.sticky || (r.styles = null, s.removeClass("cke_copyformatting_active"), a.removeClass("cke_copyformatting_disabled"), a.removeClass("cke_copyformatting_tableresize_cursor"), n.setState(CKEDITOR.TRISTATE_OFF)), o._putScreenReaderMessage(e, i ? "applied" : "canceled") } } } }, _getCursorContainer: function (e) { return e.elementMode === CKEDITOR.ELEMENT_MODE_INLINE ? e.editable() : e.editable().getParent() }, _convertElementToStyleDef: function (e) { var t = CKEDITOR.tools, n = e.getAttributes(CKEDITOR.plugins.copyformatting.excludedAttributes), t = t.parseCssText(e.getAttribute("style"), !0, !0); return { element: e.getName(), type: CKEDITOR.STYLE_INLINE, attributes: n, styles: t } }, _extractStylesFromElement: function (e, t) { var n = {}, i = []; do if (t.type === CKEDITOR.NODE_ELEMENT && !t.hasAttribute("data-cke-bookmark") && (n.element = t, e.copyFormatting.fire("extractFormatting", n, e) && n.styleDef && i.push(new CKEDITOR.style(n.styleDef)), t.getName && -1 !== o(CKEDITOR.plugins.copyformatting.breakOnElements, t.getName()))) break; while ((t = t.getParent()) && t.type === CKEDITOR.NODE_ELEMENT); return i }, _extractStylesFromRange: function (e, t) { for (var n, i = [], o = new CKEDITOR.dom.walker(t); n = o.next();)i = i.concat(CKEDITOR.plugins.copyformatting._extractStylesFromElement(e, n)); return i }, _removeStylesFromElementInRange: function (e, t) { for (var n, i = -1 !== o(["ol", "ul", "table"], t), r = new CKEDITOR.dom.walker(e); (n = r.next()) && (!(n = n.getAscendant(t, !0)) || (n.removeAttributes(n.getAttributes()), !i));); }, _getSelectedWordOffset: function (e) { function t(e, t) { return e[t ? "getPrevious" : "getNext"](function (e) { return e.type !== CKEDITOR.NODE_COMMENT }) } function n(e) { return e.type == CKEDITOR.NODE_ELEMENT ? (e = e.getHtml().replace(/<span.*?>&nbsp;<\/span>/g, ""), e.replace(/<.*?>/g, "")) : e.getText() } function i(e, r) { var s, a, l = e, c = /\s/g, d = "p br ol ul li td th div caption body".split(" "), u = !1, h = !1; do { for (s = t(l, r); !s && l.getParent();) { if (l = l.getParent(), -1 !== o(d, l.getName())) { h = u = !0; break } s = t(l, r) } if (s && s.getName && -1 !== o(d, s.getName())) { u = !0; break } l = s } while (l && l.getStyle && ("none" == l.getStyle("display") || !l.getText())); for (l || (l = e); l.type !== CKEDITOR.NODE_TEXT;)l = !u || r || h ? l.getChild(0) : l.getChild(l.getChildCount() - 1); for (d = n(l); null != (h = c.exec(d)) && (a = h.index, r);); if ("number" != typeof a && !u) return i(l, r); if (u) r ? a = 0 : (c = /([\.\b]*$)/, a = (h = c.exec(d)) ? h.index : d.length); else if (r && (a += 1, a > d.length)) return i(l); return { node: l, offset: a } } var r, s, a, l, c, d = /\b\w+\b/gi; for (a = l = c = e.startContainer, r = n(a); null != (s = d.exec(r));)if (s.index + s[0].length >= e.startOffset) return e = s.index, d = s.index + s[0].length, 0 === s.index && (s = i(a, !0), l = s.node, e = s.offset), d >= r.length && (r = i(a), c = r.node, d = r.offset), { startNode: l, startOffset: e, endNode: c, endOffset: d }; return null }, _filterStyles: function (e) { var t, n, i = CKEDITOR.tools.isEmpty, o = []; for (n = 0; n < e.length; n++)t = e[n]._.definition, -1 !== CKEDITOR.tools.indexOf(CKEDITOR.plugins.copyformatting.inlineBoundary, t.element) && (t.element = e[n].element = "span"), "span" === t.element && i(t.attributes) && i(t.styles) || o.push(e[n]); return o }, _determineContext: function (e) { function t(t) { var n, i = new CKEDITOR.dom.walker(e); if (e.startContainer.getAscendant(t, !0) || e.endContainer.getAscendant(t, !0)) return !0; for (; n = i.next();)if (n.getAscendant(t, !0)) return !0 } return t({ ul: 1, ol: 1 }) ? "list" : t("table") ? "table" : "text" }, _applyStylesToTextContext: function (e, t, n) { var i, r, s = CKEDITOR.plugins.copyformatting, a = s.excludedAttributesFromInlineTransform; for (CKEDITOR.env.webkit && !CKEDITOR.env.chrome && e.getSelection().selectRanges([t]), i = 0; i < n.length; i++)if (t = n[i], -1 === o(s.excludedElementsFromInlineTransform, t.element)) { if (-1 !== o(s.elementsForInlineTransform, t.element)) for (t.element = t._.definition.element = "span", r = 0; r < a.length; r++)t._.definition.attributes[a[r]] && delete t._.definition.attributes[a[r]]; t.apply(e) } }, _applyStylesToListContext: function (e, n, i) { var o, r, s; for (s = 0; s < i.length; s++)o = i[s], r = n.createBookmark(), "ol" === o.element || "ul" === o.element ? t(n, { ul: 1, ol: 1 }, function (e) { var t = o; e.getName() !== t.element && e.renameNode(t.element), t.applyToObject(e) }, !0) : "li" === o.element ? t(n, "li", function (e) { o.applyToObject(e) }) : CKEDITOR.plugins.copyformatting._applyStylesToTextContext(e, n, [o]), n.moveToBookmark(r) }, _applyStylesToTableContext: function (e, n, i) { function r(e, t) { e.getName() !== t.element && (t = t.getDefinition(), t.element = e.getName(), t = new CKEDITOR.style(t)), t.applyToObject(e) } var s, a; for (a = 0; a < i.length; a++)s = i[a], -1 !== o(["table", "tr"], s.element) ? t(n, s.element, function (e) { s.applyToObject(e) }) : -1 !== o(["td", "th"], s.element) ? t(n, { td: 1, th: 1 }, function (e) { r(e, s) }) : -1 !== o(["thead", "tbody"], s.element) ? t(n, { thead: 1, tbody: 1 }, function (e) { r(e, s) }) : CKEDITOR.plugins.copyformatting._applyStylesToTextContext(e, n, [s]) }, _applyFormat: function (e, t) { var n, i, o = e.getSelection().getRanges()[0], r = CKEDITOR.plugins.copyformatting; if (!o) return !1; if (o.collapsed) { if (i = e.getSelection().createBookmarks(), !(n = r._getSelectedWordOffset(o))) return; o = e.createRange(), o.setStart(n.startNode, n.startOffset), o.setEnd(n.endNode, n.endOffset), o.select() } return t = r._filterStyles(t), e.copyFormatting.fire("applyFormatting", { styles: t, range: o, preventFormatStripping: !1 }, e) ? (i && e.getSelection().selectBookmarks(i), !0) : !1 }, _putScreenReaderMessage: function (e, t) { this._getScreenReaderContainer().setText(e.lang.copyformatting.notification[t]) }, _addScreenReaderContainer: function () { return this._getScreenReaderContainer() ? this._getScreenReaderContainer() : CKEDITOR.document.getBody().append(CKEDITOR.dom.element.createFromHtml('<div class="cke_screen_reader_only cke_copyformatting_notification"><div aria-live="polite"></div></div>')).getChild(0) }, _getScreenReaderContainer: function () { return CKEDITOR.document.getBody().findOne(".cke_copyformatting_notification div[aria-live]") } }, CKEDITOR.config.copyFormatting_outerCursor = !0, CKEDITOR.config.copyFormatting_allowRules = "b s u i em strong span p div td th ol ul li(*)[*]{*}", CKEDITOR.config.copyFormatting_disallowRules = "*[data-cke-widget*,data-widget*,data-cke-realelement](cke_widget*)", CKEDITOR.config.copyFormatting_allowedContexts = !0, CKEDITOR.config.copyFormatting_keystrokeCopy = CKEDITOR.CTRL + CKEDITOR.SH
168IFT + 67, CKEDITOR.config.copyFormatting_keystrokePaste = CKEDITOR.CTRL + CKEDITOR.SHIFT + 86 }(), function () { CKEDITOR.plugins.add("div", { requires: "dialog", init: function (e) { if (!e.blockless) { var t = e.lang.div, n = "div(*)"; CKEDITOR.dialog.isTabEnabled(e, "editdiv", "advanced") && (n += ";div[dir,id,lang,title]{*}"), e.addCommand("creatediv", new CKEDITOR.dialogCommand("creatediv", { allowedContent: n, requiredContent: "div", contextSensitive: !0, contentTransformations: [["div: alignmentToStyle"]], refresh: function (e, t) { this.setState("div" in (e.config.div_wrapTable ? t.root : t.blockLimit).getDtd() ? CKEDITOR.TRISTATE_OFF : CKEDITOR.TRISTATE_DISABLED) } })), e.addCommand("editdiv", new CKEDITOR.dialogCommand("editdiv", { requiredContent: "div" })), e.addCommand("removediv", { requiredContent: "div", exec: function (e) { function t(t) { (t = CKEDITOR.plugins.div.getSurroundDiv(e, t)) && !t.data("cke-div-added") && (s.push(t), t.data("cke-div-added")) } for (var n, i = e.getSelection(), o = i && i.getRanges(), r = i.createBookmarks(), s = [], a = 0; a < o.length; a++)n = o[a], n.collapsed ? t(i.getStartElement()) : (n = new CKEDITOR.dom.walker(n), n.evaluator = t, n.lastForward()); for (a = 0; a < s.length; a++)s[a].remove(!0); i.selectBookmarks(r) } }), e.ui.addButton && e.ui.addButton("CreateDiv", { label: t.toolbar, command: "creatediv", toolbar: "blocks,50" }), e.addMenuItems && (e.addMenuItems({ editdiv: { label: t.edit, command: "editdiv", group: "div", order: 1 }, removediv: { label: t.remove, command: "removediv", group: "div", order: 5 } }), e.contextMenu && e.contextMenu.addListener(function (t) { return !t || t.isReadOnly() ? null : CKEDITOR.plugins.div.getSurroundDiv(e) ? { editdiv: CKEDITOR.TRISTATE_OFF, removediv: CKEDITOR.TRISTATE_OFF } : null })), CKEDITOR.dialog.add("creatediv", this.path + "dialogs/div.js"), CKEDITOR.dialog.add("editdiv", this.path + "dialogs/div.js") } } }), CKEDITOR.plugins.div = { getSurroundDiv: function (e, t) { var n = e.elementPath(t); return e.elementPath(n.blockLimit).contains(function (e) { return e.is("div") && !e.isReadOnly() }, 1) } } }(), CKEDITOR.plugins.add("resize", { init: function (e) { function t(t) { var n = a.width, o = a.height, l = n + (t.data.$.screenX - s.x) * ("rtl" == r ? -1 : 1); t = o + (t.data.$.screenY - s.y), c && (n = Math.max(i.resize_minWidth, Math.min(l, i.resize_maxWidth))), d && (o = Math.max(i.resize_minHeight, Math.min(t, i.resize_maxHeight))), e.resize(c ? n : null, o) } function n() { CKEDITOR.document.removeListener("mousemove", t), CKEDITOR.document.removeListener("mouseup", n), e.document && (e.document.removeListener("mousemove", t), e.document.removeListener("mouseup", n)) } var i = e.config, o = e.ui.spaceId("resizer"), r = e.element ? e.element.getDirection(1) : "ltr"; if (!i.resize_dir && (i.resize_dir = "vertical"), void 0 === i.resize_maxWidth && (i.resize_maxWidth = 3e3), void 0 === i.resize_maxHeight && (i.resize_maxHeight = 3e3), void 0 === i.resize_minWidth && (i.resize_minWidth = 750), void 0 === i.resize_minHeight && (i.resize_minHeight = 250), !1 !== i.resize_enabled) { var s, a, l = null, c = ("both" == i.resize_dir || "horizontal" == i.resize_dir) && i.resize_minWidth != i.resize_maxWidth, d = ("both" == i.resize_dir || "vertical" == i.resize_dir) && i.resize_minHeight != i.resize_maxHeight, u = CKEDITOR.tools.addFunction(function (o) { l || (l = e.getResizable()), a = { width: l.$.offsetWidth || 0, height: l.$.offsetHeight || 0 }, s = { x: o.screenX, y: o.screenY }, i.resize_minWidth > a.width && (i.resize_minWidth = a.width), i.resize_minHeight > a.height && (i.resize_minHeight = a.height), CKEDITOR.document.on("mousemove", t), CKEDITOR.document.on("mouseup", n), e.document && (e.document.on("mousemove", t), e.document.on("mouseup", n)), o.preventDefault && o.preventDefault() }); e.on("destroy", function () { CKEDITOR.tools.removeFunction(u) }), e.on("uiSpace", function (t) { if ("bottom" == t.data.space) { var n = ""; c && !d && (n = " cke_resizer_horizontal"), !c && d && (n = " cke_resizer_vertical"); var i = '<span id="' + o + '" class="cke_resizer' + n + " cke_resizer_" + r + '" title="' + CKEDITOR.tools.htmlEncode(e.lang.common.resize) + '" onmousedown="CKEDITOR.tools.callFunction(' 
168+ u + ', event)">' + ("ltr" == r ? "\u25e2" : "\u25e3") + "</span>"; "ltr" == r && "ltr" == n ? t.data.html += i : t.data.html = i + t.data.html } }, e, null, 100), e.on("maximize", function (t) { e.ui.space("resizer")[t.data == CKEDITOR.TRISTATE_ON ? "hide" : "show"]() }) } } }), function () { function e(e) { function n() { for (var n = i(), r = CKEDITOR.tools.clone(e.config.toolbarGroups) || t(e), s = 0; s < r.length; s++) { var a = r[s]; if ("/" != a) { "string" == typeof a && (a = r[s] = { name: a }); var l, c = a.groups; if (c) for (var d = 0; d < c.length; d++)l = c[d], (l = n[l]) && o(a, l); (l = n[a.name]) && o(a, l) } } return r } function i() { var t, n, i, o = {}; for (t in e.ui.items) n = e.ui.items[t], i = n.toolbar || "others", i = i.split(","), n = i[0], i = parseInt(i[1] || -1, 10), o[n] || (o[n] = []), o[n].push({ name: t, order: i }); for (n in o) o[n] = o[n].sort(function (e, t) { return e.order == t.order ? 0 : 0 > t.order ? -1 : 0 > e.order ? 1 : e.order < t.order ? -1 : 1 }); return o } function o(t, n) { if (n.length) { t.items ? t.items.push(e.ui.create("-")) : t.items = []; for (var i; i = n.shift();)i = "string" == typeof i ? i : i.name, s && -1 != CKEDITOR.tools.indexOf(s, i) || (i = e.ui.create(i)) && e.addFeature(i) && t.items.push(i) } } function r(e) { var t, n, i, r = []; for (t = 0; t < e.length; ++t)n = e[t], i = {}, "/" == n ? r.push(n) : CKEDITOR.tools.isArray(n) ? (o(i, CKEDITOR.tools.clone(n)), r.push(i)) : n.items && (o(i, CKEDITOR.tools.clone(n.items)), i.name = n.name, r.push(i)); return r } var s = e.config.removeButtons, s = s && s.split(","), a = e.config.toolbar; return "string" == typeof a && (a = e.config["toolbar_" + a]), e.toolbar = a ? r(a) : n() } function t(e) { return e._.toolbarGroups || (e._.toolbarGroups = [{ name: "document", groups: ["mode", "document", "doctools"] }, { name: "clipboard", groups: ["clipboard", "undo"] }, { name: "editing", groups: ["find", "selection", "spellchecker"] }, { name: "forms" }, "/", { name: "basicstyles", groups: ["basicstyles", "cleanup"] }, { name: "paragraph", groups: ["list", "indent", "blocks", "align", "bidi"] }, { name: "links" }, { name: "insert" }, "/", { name: "styles" }, { name: "colors" }, { name: "tools" }, { name: "others" }, { name: "about" }]) } var n = function () { this.toolbars = [], this.focusCommandExecuted = !1 }; n.prototype.focus = function () { for (var e, t = 0; e = this.toolbars[t++];)for (var n, i = 0; n = e.items[i++];)if (n.focus) return void n.focus() }; var i = { modes: { wysiwyg: 1, source: 1 }, readOnly: 1, exec: function (e) { e.toolbox && (e.toolbox.focusCommandExecuted = !0, CKEDITOR.env.ie || CKEDITOR.env.air ? setTimeout(function () { e.toolbox.focus() }, 100) : e.toolbox.focus()) } }; CKEDITOR.plugins.add("toolbar", { requires: "button", init: function (t) { var o, r = function (e, n) { var i, s = "rtl" == t.lang.dir, a = t.config.toolbarGroupCycling, l = s ? 37 : 39, s = s ? 39 : 37, a = void 0 === a || a; switch (n) { case 9: case CKEDITOR.SHIFT + 9: for (; !i || !i.items.length;)if (i = 9 == n ? (i ? i.next : e.toolbar.next) || t.toolbox.toolbars[0] : (i ? i.previous : e.toolbar.previous) || t.toolbox.toolbars[t.toolbox.toolbars.length - 1], i.items.length) for (e = i.items[o ? i.items.length - 1 : 0]; e && !e.focus;)(e = o ? e.previous : e.next) || (i = 0); return e && e.focus(), !1; case l: i = e; do i = i.next, !i && a && (i = e.toolbar.items[0]); while (i && !i.focus); return i ? i.focus() : r(e, 9), !1; case 40: return e.button && e.button.hasArrow ? (t.once("panelShow", function (e) { e.data._.panel._.currentBlock.onKeyDown(40) }), e.execute()) : r(e, 40 == n ? l : s), !1; case s: case 38: i = e; do i = i.previous, !i && a && (i = e.toolbar.items[e.toolbar.items.length - 1]); while (i && !i.focus); return i ? i.focus() : (o = 1, r(e, CKEDITOR.SHIFT + 9), o = 0), !1; case 27: return t.focus(), !1; case 13: case 32: return e.execute(), !1 }return !0 }; t.on("uiSpace", function (i) { if (i.data.space == t.config.toolbarLocation) { i.removeListener(), t.toolbox = new n; var o, s, a = CKEDITOR.tools.getNextId(), l = ['<span id="', a, '" class="cke_voice_label">', t.lang.toolbar.toolbars, "</span>", '<span id="' + t.ui.spaceId("toolbox") + '" class="cke_toolbox" role="group" aria-labelledby="', a, '" onmousedown="return false;">'], a = !1 !== t.config.toolbarStartupExpanded; t.config.toolbarCanCollapse && t.elementMode != CKEDITOR.ELEMENT_MODE_INLINE && l.push('<span class="cke_toolbox_main"' + (a ? ">" : ' style="display:none">'));
168 for (var c = t.toolbox.toolbars, d = e(t), u = d.length, h = 0; u > h; h++) { var p, f, m, g = 0, v = d[h], E = "/" !== v && ("/" === d[h + 1] || h == u - 1); if (v) if (o && (l.push("</span>"), s = o = 0), "/" === v) l.push('<span class="cke_toolbar_break"></span>'); else { m = v.items || v; for (var T = 0; T < m.length; T++) { var y, b = m[T]; if (b) { var C = function (e) { e = e.render(t, l), _ = g.items.push(e) - 1, _ > 0 && (e.previous = g.items[_ - 1], e.previous.next = e), e.toolbar = g, e.onkey = r, e.onfocus = function () { t.toolbox.focusCommandExecuted || t.focus() } }; if (b.type == CKEDITOR.UI_SEPARATOR) s = o && b; else { if (y = !1 !== b.canGroup, !g) { p = CKEDITOR.tools.getNextId(), g = { id: p, items: [] }, f = v.name && (t.lang.toolbar.toolbarGroups[v.name] || v.name), l.push('<span id="', p, '" class="cke_toolbar' + (E ? ' cke_toolbar_last"' : '"'), f ? ' aria-labelledby="' + p + '_label"' : "", ' role="toolbar">'), f && l.push('<span id="', p, '_label" class="cke_voice_label">', f, "</span>"), l.push('<span class="cke_toolbar_start"></span>'); var _ = c.push(g) - 1; _ > 0 && (g.previous = c[_ - 1], g.previous.next = g) } y ? o || (l.push('<span class="cke_toolgroup" role="presentation">'), o = 1) : o && (l.push("</span>"), o = 0), s && (C(s), s = 0), C(b) } } } o && (l.push("</span>"), s = o = 0), g && l.push('<span class="cke_toolbar_end"></span></span>') } } if (t.config.toolbarCanCollapse && l.push("</span>"), t.config.toolbarCanCollapse && t.elementMode != CKEDITOR.ELEMENT_MODE_INLINE) { var I = CKEDITOR.tools.addFunction(function () { t.execCommand("toolbarCollapse") }); t.on("destroy", function () { CKEDITOR.tools.removeFunction(I) }), t.addCommand("toolbarCollapse", { readOnly: 1, exec: function (e) { var t = e.ui.space("toolbar_collapser"), n = t.getPrevious(), i = e.ui.space("contents"), o = n.getParent(), r = parseInt(i.$.style.height, 10), s = o.$.offsetHeight, a = t.hasClass("cke_toolbox_collapser_min"); a ? (n.show(), t.removeClass("cke_toolbox_collapser_min"), t.setAttribute("title", e.lang.toolbar.toolbarCollapse)) : (n.hide(), t.addClass("cke_toolbox_collapser_min"), t.setAttribute("title", e.lang.toolbar.toolbarExpand)), t.getFirst().setText(a ? "\u25b2" : "\u25c0"), i.setStyle("height", r - (o.$.offsetHeight - s) + "px"), e.fire("resize", { outerHeight: e.container.$.offsetHeight, contentsHeight: i.$.offsetHeight, outerWidth: e.container.$.offsetWidth }) }, modes: { wysiwyg: 1, source: 1 } }), t.setKeystroke(CKEDITOR.ALT + (CKEDITOR.env.ie || CKEDITOR.env.webkit ? 189 : 109), "toolbarCollapse"), l.push('<a title="' + (a ? t.lang.toolbar.toolbarCollapse : t.lang.toolbar.toolbarExpand) + '" id="' + t.ui.spaceId("toolbar_collapser") + '" tabIndex="-1" class="cke_toolbox_collapser'), a || l.push(" cke_toolbox_collapser_min"), l.push('" onclick="CKEDITOR.tools.callFunction(' + I + ')">', '<span class="cke_arrow">&#9650;</span>', "</a>") } l.push("</span>"), i.data.html += l.join("") } }), t.on("destroy", function () { if (this.toolbox) { var e, t, n, i, o = 0; for (e = this.toolbox.toolbars; o < e.length; o++)for (n = e[o].items, t = 0; t < n.length; t++)i = n[t], i.clickFn && CKEDITOR.tools.removeFunction(i.clickFn), i.keyDownFn && CKEDITOR.tools.removeFunction(i.keyDownFn) } }), t.on("uiReady", function () { var e = t.ui.space("toolbox"); e && t.focusManager.add(e, 1) }), t.addCommand("toolbarFocus", i), t.setKeystroke(CKEDITOR.ALT + 121, "toolbarFocus"), t.ui.add("-", CKEDITOR.UI_SEPARATOR, {}), t.ui.addHandler(CKEDITOR.UI_SEPARATOR, { create: function () { return { render: function (e, t) { return t.push('<span class="cke_toolbar_separator" role="separator"></span>'), {} } } } }) } }), CKEDITOR.ui.prototype.addToolbarGroup = function (e, n, i) { var o = t(this.editor), r = 0 === n, s = { name: e }; if (i) { if (i = CKEDITOR.tools.search(o, function (e) { return e.name == i })) return !i.groups && (i.groups = []), n && (n = CKEDITOR.tools.indexOf(i.groups, n), n >= 0) ? void i.groups.splice(n + 1, 0, e) : void (r ? i.groups.splice(0, 0, e) : i.groups.push(e)); n = null } n && (n = CKEDITOR.tools.indexOf(o, function (e) { return e.name == n })), r ? o.splice(0, 0, e) : "number" == typeof n ? o.splice(n + 1, 0, s) : o.push(e) } }(), CKEDITOR.UI_SEPARATOR = "separator", CKEDITOR.config.toolbarLocation = "top", function () { function e(e, n) { function o(t) { t = l.list[t]; var n; t.equals(e.editable()) || "true" == t.getAttribute("contenteditable") ? (n = e.createRange(), n.selectNodeContents(t), n = n.select()) : (n = e.getSelection(), n.selectElement(t)), CKEDITOR.env.ie && e.fire("selectionChange", { selection: n, path: new CKEDITOR.dom.elementPath(t) }), e.focus() } function r() { s && s.setHtml('<span class="cke_path_empty">&nbsp;</span>'), delete l.list } var s, a = e.ui.spaceId("path"), l = e._.elementsPath, c = l.idBase; n.html += '<span id="' + a + '_label" class="cke_voice_label">' + e.lang.elementspath.eleLabel + '</span><span id="' + a + '" class="cke_path" role="group" aria-labelledby="' + a + '_label"><span class="cke_path_empty">&nbsp;</span></span>', e.on("uiReady", function () { var t = e.ui.space("path"); t && e.focusManager.add(t, 1) }), l.onClick = o; var d = CKEDITOR.tools.addFunction(o), u = CKEDITOR.tools.addFunction(function (t, n) { var i, r = l.idBase; switch (n = new CKEDITOR.dom.event(n), i = "rtl" == e.lang.dir, n.getKeystroke()) { case i ? 39 : 37: case 9: return (i = CKEDITOR.document.getById(r + (t + 1))) || (i = CKEDITOR.document.getById(r + "0")), i.focus(), !1;
168 case i ? 37 : 39: case CKEDITOR.SHIFT + 9: return (i = CKEDITOR.document.getById(r + (t - 1))) || (i = CKEDITOR.document.getById(r + (l.list.length - 1))), i.focus(), !1; case 27: return e.focus(), !1; case 13: case 32: return o(t), !1 }return !0 }); e.on("selectionChange", function () { for (var t, n = [], o = l.list = [], r = [], h = l.filters, p = !0, f = e.elementPath().elements, m = f.length; m--;) { var g = f[m], v = 0; t = g.data("cke-display-name") ? g.data("cke-display-name") : g.data("cke-real-element-type") ? g.data("cke-real-element-type") : g.getName(), (p = g.hasAttribute("contenteditable") ? "true" == g.getAttribute("contenteditable") : p) || g.hasAttribute("contenteditable") || (v = 1); for (var E = 0; E < h.length; E++) { var T = h[E](g, t); if (!1 === T) { v = 1; break } t = T || t } v || (o.unshift(g), r.unshift(t)) } for (o = o.length, h = 0; o > h; h++)t = r[h], p = e.lang.elementspath.eleTitle.replace(/%1/, t), t = i.output({ id: c + h, label: p, text: t, jsTitle: "javascript:void('" + t + "')", index: h, keyDownFn: u, clickFn: d }), n.unshift(t); s || (s = CKEDITOR.document.getById(a)), r = s, r.setHtml(n.join("") + '<span class="cke_path_empty">&nbsp;</span>'), e.fire("elementsPathUpdate", { space: r }) }), e.on("readOnly", r), e.on("contentDomUnload", r), e.addCommand("elementsPathFocus", t.toolbarFocus), e.setKeystroke(CKEDITOR.ALT + 122, "elementsPathFocus") } var t = { toolbarFocus: { editorFocus: !1, readOnly: 1, exec: function (e) { (e = CKEDITOR.document.getById(e._.elementsPath.idBase + "0")) && e.focus(CKEDITOR.env.ie || CKEDITOR.env.air) } } }, n = ""; CKEDITOR.env.gecko && CKEDITOR.env.mac && (n += ' onkeypress="return false;"'), CKEDITOR.env.gecko && (n += ' onblur="this.style.cssText = this.style.cssText;"'); var i = CKEDITOR.addTemplate("pathItem", '<a id="{id}" href="{jsTitle}" tabindex="-1" class="cke_path_item" title="{label}"' + n + ' hidefocus="true"  onkeydown="return CKEDITOR.tools.callFunction({keyDownFn},{index}, event );" onclick="CKEDITOR.tools.callFunction({clickFn},{index}); return false;" role="button" aria-label="{label}">{text}</a>'); CKEDITOR.plugins.add("elementspath", { init: function (t) { t._.elementsPath = { idBase: "cke_elementspath_" + CKEDITOR.tools.getNextNumber() + "_", filters: [] }, t.on("uiSpace", function (n) { "bottom" == n.data.space && e(t, n.data) }) } }) }(), function () {
169            function e(e, t, n) { n = e.config.forceEnterMode || n, "wysiwyg" == e.mode && (t || (t = e.activeEnterMode), e.elementPath().isContextFor("p") || (t = CKEDITOR.ENTER_BR, n = 1), e.fire("saveSnapshot"), t == CKEDITOR.ENTER_BR ? s(e, t, null, n) : a(e, t, null, n), e.fire("saveSnapshot")) } function t(e) { e = e.getSelection().getRanges(!0); for (var t = e.length - 1; t > 0; t--)e[t].deleteContents(); return e[0] } function n(e) { var t = e.startContainer.getAscendant(function (e) { return e.type == CKEDITOR.NODE_ELEMENT && "true" == e.getAttribute("contenteditable") }, !0); return e.root.equals(t) ? e : (t = new CKEDITOR.dom.range(t), t.moveToRange(e), t) } CKEDITOR.plugins.add("enterkey", { init: function (t) { t.addCommand("enter", { modes: { wysiwyg: 1 }, editorFocus: !1, exec: function (t) { e(t) } }), t.addCommand("shiftEnter", { modes: { wysiwyg: 1 }, editorFocus: !1, exec: function (t) { e(t, t.activeShiftEnterMode, 1) } }
169), t.setKeystroke([[13, "enter"], [CKEDITOR.SHIFT + 13, "shiftEnter"]]) } }); var i = CKEDITOR.dom.walker.whitespaces(), o = CKEDITOR.dom.walker.bookmark(); CKEDITOR.plugins.enterkey = {
170                enterBlock: function (e, r, a, c) {
171                    if (a = a || t(e)) {
172                        a = n(a); var d, u = a.document, h = a.checkStartOfBlock(), p = a.checkEndOfBlock(), f = e.elementPath(a.startContainer), m = f.block, g = r == CKEDITOR.ENTER_DIV ? "div" : "p"; if (h && p) {
173                            if (m && (m.is("li") || m.getParent().is("li"))) {
174                                m.is("li") || (m = m.getParent()), a = m.getParent(), d = a.getParent(), c = !m.hasPrevious(); var v = !m.hasNext(), g = e.getSelection(), E = g.createBookmarks(), h = m.getDirection(1), p = m.getAttribute("class"), T = m.getAttribute("style"), y = d.getDirection(1) != h;
175                                if (e = e.enterMode != CKEDITOR.ENTER_BR || y || T || p, d.is("li")) c || v ? (c && v && a.remove(), m[v ? "insertAfter" : "insertBefore"](d)) : m.breakParent(d); else { if (e) f.block.is("li") ? (d = u.createElement(r == CKEDITOR.ENTER_P ? "p" : "div"), y && d.setAttribute("dir", h), T && d.setAttribute("style", T), p && d.setAttribute("class", p), m.moveChildren(d)) : d = f.block, c || v ? d[c ? "insertBefore" : "insertAfter"](a) : (m.breakParent(a), d.insertAfter(a)); else if (m.appendBogus(!0), c || v) for (; u = m[c ? "getFirst" : "getLast"]();)u[c ? "insertBefore" : "insertAfter"](a); else for (m.breakParent(a); u = m.getLast();)u.insertAfter(a); m.remove() } return void g.selectBookmarks(E)
176                            } if (m && m.getParent().is("blockquote")) return m.breakParent(m.getParent()), m.getPrevious().getFirst(CKEDITOR.dom.walker.invisible(1)) || m.getPrevious().remove(), m.getNext().getFirst(CKEDITOR.dom.walker.invisible(1)) || m.getNext().remove(), a.moveToElementEditStart(m), void a.select()
177                        } else if (m && m.is("pre") && !p) return void s(e, r, a, c); if (h = a.splitBlock(g)) { if (r = h.previousBlock, m = h.nextBlock, f = h.wasStartOfBlock, e = h.wasEndOfBlock, m ? (E = m.getParent(), E.is("li") && (m.breakParent(E), m.move(m.getNext(), 1))) : r && (E = r.getParent()) && E.is("li") && (r.breakParent(E), E = r.getNext(), a.moveToElementEditStart(E), r.move(r.getPrevious())), f || e) { if (r ? (r.is("li") || !l.test(r.getName()) && !r.is("pre")) && (d = r.clone()) : m && (d = m.clone()), d ? c && !d.is("li") && d.renameNode(g) : E && E.is("li") ? d = E : (d = u.createElement(g), r && (v = r.getDirection()) && d.setAttribute("dir", v)), u = h.elementPath) for (c = 0, g = u.elements.length; g > c && (E = u.elements[c], !E.equals(u.block) && !E.equals(u.blockLimit)); c++)CKEDITOR.dtd.$removeEmpty[E.getName()] && (E = E.clone(), d.moveChildren(E), d.append(E)); d.appendBogus(), d.getParent() || a.insertNode(d), d.is("li") && d.removeAttribute("value"), !CKEDITOR.env.ie || !f || e && r.getChildCount() || (a.moveToElementEditStart(e ? r : d), a.select()), a.moveToElementEditStart(f && !e ? m : d) } else m.is("li") && (d = a.clone(), d.selectNodeContents(m), d = new CKEDITOR.dom.walker(d), d.evaluator = function (e) { return !(o(e) || i(e) || e.type == CKEDITOR.NODE_ELEMENT && e.getName() in CKEDITOR.dtd.$inline && !(e.getName() in CKEDITOR.dtd.$empty)) }, (E = d.next()) && E.type == CKEDITOR.NODE_ELEMENT && E.is("ul", "ol") && (CKEDITOR.env.needsBrFiller ? u.createElement("br") : u.createText("\xa0")).insertBefore(E)), m && a.moveToElementEditStart(m); a.select(), a.scrollIntoView() }
178                    }
179                }, enterBr: function (e, n, i, o) { if (i = i || t(e)) { var r = i.document, s = i.checkEndOfBlock(), c = new CKEDITOR.dom.elementPath(e.getSelection().getStartElement()), d = c.block, u = d && c.block.getName(); o || "li" != u ? (!o && s && l.test(u) ? (s = d.getDirection()) ? (r = r.createElement("div"), r.setAttribute("dir", s), r.insertAfter(d), i.setStart(r, 0)) : (r.createElement("br").insertAfter(d), CKEDITOR.env.gecko && r.createText("").insertAfter(d), i.setStartAt(d.getNext(), CKEDITOR.env.ie ? CKEDITOR.POSITION_BEFORE_START : CKEDITOR.POSITION_AFTER_START)) : (e = "pre" == u && CKEDITOR.env.ie && 8 > CKEDITOR.env.version ? r.createText("\r") : r.createElement("br"), i.deleteContents(), i.insertNode(e), CKEDITOR.env.needsBrFiller ? (r.createText("\ufeff").insertAfter(e), s && (d || c.blockLimit).appendBogus(), e.getNext().$.nodeValue = "", i.setStartAt(e.getNext(), CKEDITOR.POSITION_AFTER_START)) : i.setStartAt(e, CKEDITOR.POSITION_AFTER_END)), i.collapse(!0), i.select(), i.scrollIntoView()) : a(e, n, i, o) } }
180            }; var r = CKEDITOR.plugins.enterkey, s = r.enterBr, a = r.enterBlock, l = /^h[1-6]$/
181        }(), function () { function e(e, t) { var n = {}, i = [], o = { nbsp: "\xa0", shy: "\xad", gt: ">", lt: "<", amp: "&", apos: "'", quot: '"' }; if (e = e.replace(/\b(nbsp|shy|gt|lt|amp|apos|quot)(?:,|$)/g, function (e, r) { var s = t ? "&" + r + ";" : o[r]; return n[s] = t ? o[r] : "&" + r + ";", i.push(s), "" }), !t && e) { e = e.split(","); var r, s = document.createElement("div"); for (s.innerHTML = "&" + e.join(";&") + ";", r = s.innerHTML, s = null, s = 0; s < r.length; s++) { var a = r.charAt(s); n[a] = "&" + e[s] + ";", i.push(a) } } return n.regex = i.join(t ? "|" : ""), n } CKEDITOR.plugins.add("entities", { afterInit: function (t) { function n(e) { return l[e] } function i(e) { return "force" != o.entities_processNumerical && s[e] ? s[e] : "&#" + e.charCodeAt(0) + ";" } var o = t.config; if (t = (t = t.dataProcessor) && t.htmlFilter) { var r = []; !1 !== o.basicEntities && r.push("nbsp,gt,lt,amp"), o.entities && (r.length && r.push("quot,iexcl,cent,pound,curren,yen,brvbar,sect,uml,copy,ordf,laquo,not,shy,reg,macr,deg,plusmn,sup2,sup3,acute,micro,para,middot,cedil,sup1,ordm,raquo,frac14,frac12,frac34,iquest,times,divide,fnof,bull,hellip,prime,Prime,oline,frasl,weierp,image,real,trade,alefsym,larr,uarr,rarr,darr,harr,crarr,lArr,uArr,rArr,dArr,hArr,forall,part,exist,empty,nabla,isin,notin,ni,prod,sum,minus,lowast,radic,prop,infin,ang,and,or,cap,cup,int,there4,sim,cong,asymp,ne,equiv,le,ge,sub,sup,nsub,sube,supe,oplus,otimes,perp,sdot,lceil,rceil,lfloor,rfloor,lang,rang,loz,spades,clubs,hearts,diams,circ,tilde,ensp,emsp,thinsp,zwnj,zwj,lrm,rlm,ndash,mdash,lsquo,rsquo,sbquo,ldquo,rdquo,bdquo,dagger,Dagger,permil,lsaquo,rsaquo,euro"), o.entities_latin && r.push("Agrave,Aacute,Acirc,Atilde,Auml,Aring,AElig,Ccedil,Egrave,Eacute,Ecirc,Euml,Igrave,Iacute,Icirc,Iuml,ETH,Ntilde,Ograve,Oacute,Ocirc,Otilde,Ouml,Oslash,Ugrave,Uacute,Ucirc,Uuml,Yacute,THORN,szlig,agrave,aacute,acirc,atilde,auml,aring,aelig,ccedil,egrave,eacute,ecirc,euml,igrave,iacute,icirc,iuml,eth,ntilde,ograve,oacute,ocirc,otilde,ouml,oslash,ugrave,uacute,ucirc,uuml,yacute,thorn,yuml,OElig,oelig,Scaron,scaron,Yuml"), o.entities_greek && r.push("Alp
181ha,Beta,Gamma,Delta,Epsilon,Zeta,Eta,Theta,Iota,Kappa,Lambda,Mu,Nu,Xi,Omicron,Pi,Rho,Sigma,Tau,Upsilon,Phi,Chi,Psi,Omega,alpha,beta,gamma,delta,epsilon,zeta,eta,theta,iota,kappa,lambda,mu,nu,xi,omicron,pi,rho,sigmaf,sigma,tau,upsilon,phi,chi,psi,omega,thetasym,upsih,piv"), o.entities_additional && r.push(o.entities_additional)); var s = e(r.join(",")), a = s.regex ? "[" + s.regex + "]" : "a^"; delete s.regex, o.entities && o.entities_processNumerical && (a = "[^ -~]|" + a); var a = new RegExp(a, "g"), l = e("nbsp,gt,lt,amp,shy", !0), c = new RegExp(l.regex, "g"); t.addRules({ text: function (e) { return e.replace(c, n).replace(a, i) } }, { applyToAll: !0, excludeNestedEditable: !0 }) } } }) }(), CKEDITOR.config.basicEntities = !0, CKEDITOR.config.entities = !0, CKEDITOR.config.entities_latin = !0, CKEDITOR.config.entities_greek = !0, CKEDITOR.config.entities_additional = "#39", CKEDITOR.plugins.add("popup"), CKEDITOR.tools.extend(CKEDITOR.editor.prototype, { popup: function (e, t, n, i) { t = t || "80%", n = n || "70%", "string" == typeof t && 1 < t.length && "%" == t.substr(t.length - 1, 1) && (t = parseInt(window.screen.width * parseInt(t, 10) / 100, 10)), "string" == typeof n && 1 < n.length && "%" == n.substr(n.length - 1, 1) && (n = parseInt(window.screen.height * parseInt(n, 10) / 100, 10)), 640 > t && (t = 640), 420 > n && (n = 420); var o = parseInt((window.screen.height - n) / 2, 10), r = parseInt((window.screen.width - t) / 2, 10); i = (i || "location=no,menubar=no,toolbar=no,dependent=yes,minimizable=no,modal=yes,alwaysRaised=yes,resizable=yes,scrollbars=yes") + ",width=" + t + ",height=" + n + ",top=" + o + ",left=" + r; var s = window.open("", null, i, !0); if (!s) return !1; try { -1 == navigator.userAgent.toLowerCase().indexOf(" chrome/") && (s.moveTo(r, o), s.resizeTo(t, n)), s.focus(), s.location.href = e } catch (a) { window.open(e, null, i, !0) } return !0 } }), function () { function e(e, t) { var n = []; if (!t) return e; for (var i in t) n.push(i + "=" + encodeURIComponent(t[i])); return e + (-1 != e.indexOf("?") ? "&" : "?") + n.join("&") } function t(e) { return e += "", e.charAt(0).toUpperCase() + e.substr(1) } function n() { var n = this.getDialog(), i = n.getParentEditor(); i._.filebrowserSe = this; var o = i.config["filebrowser" + t(n.getName()) + "WindowWidth"] || i.config.filebrowserWindowWidth || "80%", n = i.config["filebrowser" + t(n.getName()) + "WindowHeight"] || i.config.filebrowserWindowHeight || "70%", r = this.filebrowser.params || {}; r.CKEditor = i.name, r.CKEditorFuncNum = i._.filebrowserFn, r.langCode || (r.langCode = i.langCode), r = e(this.filebrowser.url, r), i.popup(r, o, n, i.config.filebrowserWindowFeatures || i.config.fileBrowserWindowFeatures) } function i() { var e = this.getDialog(); return e.getParentEditor()._.filebrowserSe = this, !(!e.getContentElement(this["for"][0], this["for"][1]).getInputElement().$.value || !e.getContentElement(this["for"][0], this["for"][1]).getAction()) } function o(t, n, i) { var o = i.params || {}; o.CKEditor = t.name, o.CKEditorFuncNum = t._.filebrowserFn, o.langCode || (o.langCode = t.langCode), n.action = e(i.url, o), n.filebrowser = i } function r(e, s, a, l) { if (l && l.length) for (var c, d = l.length; d--;)if (c = l[d], "hbox" != c.type && "vbox" != c.type && "fieldset" != c.type || r(e, s, a, c.children), c.filebrowser) if ("string" == typeof c.filebrowser && (c.filebrowser = { action: "fileButton" == c.type ? "QuickUpload" : "Browse", target: c.filebrowser }), "Browse" == c.filebrowser.action) { var u = c.filebrowser.url; void 0 === u && (u = e.config["filebrowser" + t(s) + "BrowseUrl"], void 0 === u && (u = e.config.filebrowserBrowseUrl)), u && (c.onClick = n, c.filebrowser.url = u, c.hidden = !1) } else if ("QuickUpload" == c.filebrowser.action && c["for"] && (u = c.filebrowser.url, void 0 === u && (u = e.config["filebrowser" + t(s) + "UploadUrl"], void 0 === u && (u = e.config.filebrowserUploadUrl)), u)) { var h = c.onClick; c.onClick = function (e) { var t = e.sender; return h && !1 === h.call(t, e) ? !1 : i.call(t, e) ? (e = t.getDialog().getContentElement(this["for"][0], this["for"][1]).getInputElement(), (t = new CKEDITOR.dom.element(e.$.form)) && ((e = t.$.elements.ckCsrfToken) ? e = new CKEDITOR.dom.element(e) : (e = new CKEDITOR.dom.element("input"), e.setAttributes({ name: "ckCsrfToken", type: "hidden" }), t.append(e)), e.setAttribute("value", CKEDITOR.tools.getCsrfToken())), !0) : !1 }, c.filebrowser.url = u, c.hidden = !1, o(e, a.getContents(c["for"][0]).get(c["for"][1]), c.filebrowser) } } function s(e, t, n) { if (-1 !== n.indexOf(";")) { n = n.split(";"); for (var i = 0; i < n.length; i++)if (s(e, t, n[i])) return !0; return !1 } return (e = e.getContents(t).get(n).filebrowser) && e.url } function a(e, t) { var n = this._.filebrowserSe.getDialog(), i = this._.filebrowserSe["for"], o = this._.filebrowserSe.filebrowser.onSelect; i && n.getContentElement(i[0], i[1]).reset(), "function" == typeof t && !1 === t.call(this._.filebrowserSe) || o && !1 === o.call(this._.filebrowserSe, e, t) || ("string" == typeof t && t && alert(t), e && (i = this._.filebrowserSe, n = i.getDialog(), i = i.filebrowser.target || null) && (i = i.split(":"), (o = n.getContentElement(i[0], i[1])) && (o.setValue(e), n.selectPage(i[0])))) } CKEDITOR.plugins.add("filebrowser", { requires: "popup", init: function (e) { e._.filebrowserFn = CKEDITOR.tools.addFunction(a, e), e.on("destroy", function () { CKEDITOR.tools.removeFunction(this._.filebrowserFn) }) } }), CKEDITOR.on("dialogDefinition", function (e) { if (e.editor.plugins.filebrowser) for (var t, n = e.data.definition, i = 0; i < n.contents.length; ++i)(t = n.contents[i]) && (r(e.editor, e.data.name, n, t.elements), t.hidden && t.filebrowser && (t.hidden = !s(n, t.id, t.filebrowser))) }) }(), CKEDITOR.plugins.add("find", { requires: "dialog", init: function (e) { var t = e.addCommand("find", new CKEDITOR.dialogCommand("find")); t.canUndo = !1, t.readOnly = 1, e.addCommand("replace", new CKEDITOR.dialogCommand("replace")).canUndo = !1, e.ui.addButton && (e.ui.addButton("Find", { label: e.lang.find.find, command: "find", toolbar: "find,10" }), e.ui.addButton("Replace", { label: e.lang.find.replace, command: "replace", toolbar: "find,20" })), CKEDITOR.dialog.add("find", this.path + "dialogs/find.js"), CKEDITOR.dialog.add("replace", this.path + "dialogs/find.js") } }), CKEDITOR.config.find_highlight = { element: "span", styles: { "background-color": "#004", color: "#fff" } }, function () { function e(e, t) { var n = i.exec(e), o = i.exec(t); if (n) { if (!n[2] && "px" == o[2]) return o[1]; if ("px" == n[2] && !o[2]) return o[1] + "px" } return t } var t = CKEDITOR.htmlParser.cssStyle, n = CKEDITOR.tools.cssLength, i = /^((?:\d*(?:\.\d+))|(?:\d+))(.*)?$/i, o = { elements: { $: function (n) { var i = n.attributes;
181 if ((i = (i = (i = i && i["data-cke-realelement"]) && new CKEDITOR.htmlParser.fragment.fromHtml(decodeURIComponent(i))) && i.children[0]) && n.attributes["data-cke-resizable"]) { var o = new t(n).rules; n = i.attributes; var r = o.width, o = o.height; r && (n.width = e(n.width, r)), o && (n.height = e(n.height, o)) } return i } } }; CKEDITOR.plugins.add("fakeobjects", { init: function (e) { e.filter.allow("img[!data-cke-realelement,src,alt,title](*){*}", "fakeobjects") }, afterInit: function (e) { (e = (e = e.dataProcessor) && e.htmlFilter) && e.addRules(o, { applyToAll: !0 }) } }), CKEDITOR.editor.prototype.createFakeElement = function (e, i, o, r) { var s = this.lang.fakeobjects, s = s[o] || s.unknown; return i = { "class": i, "data-cke-realelement": encodeURIComponent(e.getOuterHtml()), "data-cke-real-node-type": e.type, alt: s, title: s, align: e.getAttribute("align") || "" }, CKEDITOR.env.hc || (i.src = CKEDITOR.tools.transparentImageData), o && (i["data-cke-real-element-type"] = o), r && (i["data-cke-resizable"] = r, o = new t, r = e.getAttribute("width"), e = e.getAttribute("height"), r && (o.rules.width = n(r)), e && (o.rules.height = n(e)), o.populate(i)), this.document.createElement("img", { attributes: i }) }, CKEDITOR.editor.prototype.createFakeParserElement = function (e, i, o, r) { var s, a = this.lang.fakeobjects, a = a[o] || a.unknown; return s = new CKEDITOR.htmlParser.basicWriter, e.writeHtml(s), s = s.getHtml(), i = { "class": i, "data-cke-realelement": encodeURIComponent(s), "data-cke-real-node-type": e.type, alt: a, title: a, align: e.attributes.align || "" }, CKEDITOR.env.hc || (i.src = CKEDITOR.tools.transparentImageData), o && (i["data-cke-real-element-type"] = o), r && (i["data-cke-resizable"] = r, r = e.attributes, e = new t, o = r.width, r = r.height, void 0 !== o && (e.rules.width = n(o)), void 0 !== r && (e.rules.height = n(r)), e.populate(i)), new CKEDITOR.htmlParser.element("img", i) }, CKEDITOR.editor.prototype.restoreRealElement = function (t) { if (t.data("cke-real-node-type") != CKEDITOR.NODE_ELEMENT) return null; var n = CKEDITOR.dom.element.createFromHtml(decodeURIComponent(t.data("cke-realelement")), this.document); if (t.data("cke-resizable")) { var i = t.getStyle("width"); t = t.getStyle("height"), i && n.setAttribute("width", e(n.getAttribute("width"), i)), t && n.setAttribute("height", e(n.getAttribute("height"), t)) } return n } }(), function () { function e(e) { return e = e.attributes, "application/x-shockwave-flash" == e.type || n.test(e.src || "") } function t(e, t) { return e.createFakeParserElement(t, "cke_flash", "flash", !0) } var n = /\.swf(?:$|\?)/i; CKEDITOR.plugins.add("flash", { requires: "dialog,fakeobjects", onLoad: function () { CKEDITOR.addCss("img.cke_flash{background-image: url(" + CKEDITOR.getUrl(this.path + "images/placeholder.png") + ");background-position: center center;background-repeat: no-repeat;border: 1px solid #a9a9a9;width: 80px;height: 80px;}") }, init: function (e) { var t = "object[classid,codebase,height,hspace,vspace,width];param[name,value];embed[height,hspace,pluginspage,src,type,vspace,width]"; CKEDITOR.dialog.isTabEnabled(e, "flash", "properties") && (t += ";object[align]; embed[allowscriptaccess,quality,scale,wmode]"), CKEDITOR.dialog.isTabEnabled(e, "flash", "advanced") && (t += ";object[id]{*}; embed[bgcolor]{*}(*)"), e.addCommand("flash", new CKEDITOR.dialogCommand("flash", { allowedContent: t, requiredContent: "embed" })), e.ui.addButton && e.ui.addButton("Flash", { label: e.lang.common.flash, command: "flash", toolbar: "insert,20" }), CKEDITOR.dialog.add("flash", this.path + "dialogs/flash.js"), e.addMenuItems && e.addMenuItems({ flash: { label: e.lang.flash.properties, command: "flash", group: "flash" } }), e.on("doubleclick", function (e) { var t = e.data.element; t.is("img") && "flash" == t.data("cke-real-element-type") && (e.data.dialog = "flash") }), e.contextMenu && e.contextMenu.addListener(function (e) { return e && e.is("img") && !e.isReadOnly() && "flash" == e.data("cke-real-element-type") ? { flash: CKEDITOR.TRISTATE_OFF } : void 0 }) }, afterInit: function (n) { var i = n.dataProcessor; (i = i && i.dataFilter) && i.addRules({ elements: { "cke:object": function (i) { var o = i.attributes; if (!(o.classid && String(o.classid).toLowerCase() || e(i))) { for (o = 0; o < i.children.length; o++)if ("cke:embed" == i.children[o].name) { if (!e(i.children[o])) break; return t(n, i) } return null } return t(n, i) }, "cke:embed": function (i) { return e(i) ? t(n, i) : null } } }, 5) } }) }(), CKEDITOR.tools.extend(CKEDITOR.config, { flashEmbedTagOnly: !1, flashAddEmbedTag: !0, flashConvertOnEdit: !1 }), function () { function e(e) { var i = e.config, o = e.fire("uiSpace", { space: "to
181p", html: "" }).html, r = function () { function o(e, t, i) { a.setStyle(t, n(i)), a.setStyle("position", e) } function s(e) { var t = c.getDocumentPosition(); switch (e) { case "top": o("absolute", "top", t.y - p - g); break; case "pin": o("fixed", "top", E); break; case "bottom": o("absolute", "top", t.y + (u.height || u.bottom - u.top) + g) }l = e } var l, c, d, u, h, p, f, m = i.floatSpaceDockedOffsetX || 0, g = i.floatSpaceDockedOffsetY || 0, v = i.floatSpacePinnedOffsetX || 0, E = i.floatSpacePinnedOffsetY || 0; return function (o) { if (c = e.editable()) { var E = o && "focus" == o.name; E && a.show(), e.fire("floatingSpaceLayout", { show: E }), a.removeStyle("left"), a.removeStyle("right"), d = a.getClientRect(), u = c.getClientRect(), h = t.getViewPaneSize(), p = d.height, f = "pageXOffset" in t.$ ? t.$.pageXOffset : CKEDITOR.document.$.documentElement.scrollLeft, l ? (s(p + g <= u.top ? "top" : p + g > h.height - u.bottom ? "pin" : "bottom"), o = h.width / 2, o = i.floatSpacePreferRight ? "right" : 0 < u.left && u.right < h.width && u.width > d.width ? "rtl" == i.contentsLangDirection ? "right" : "left" : o - u.left > u.right - o ? "left" : "right", d.width > h.width ? (o = "left", E = 0) : (E = "left" == o ? 0 < u.left ? u.left : 0 : u.right < h.width ? h.width - u.right : 0, E + d.width > h.width && (o = "left" == o ? "right" : "left", E = 0)), a.setStyle(o, n(("pin" == l ? v : m) + E + ("pin" == l ? 0 : "left" == o ? f : -f)))) : (l = "pin", s("pin"), r(o)) } } }(); if (o) { var s = new CKEDITOR.template('<div id="cke_{name}" class="cke {id} cke_reset_all cke_chrome cke_editor_{name} cke_float cke_{langDir} ' + CKEDITOR.env.cssClass + '" dir="{langDir}" title="' + (CKEDITOR.env.gecko ? " " : "") + '" lang="{langCode}" role="application" style="{style}"' + (e.title ? ' aria-labelledby="cke_{name}_arialbl"' : " ") + ">" + (e.title ? '<span id="cke_{name}_arialbl" class="cke_voice_label">{voiceLabel}</span>' : " ") + '<div class="cke_inner"><div id="{topId}" class="cke_top" role="presentation">{content}</div></div></div>'), a = CKEDITOR.document.getBody().append(CKEDITOR.dom.element.createFromHtml(s.output({ content: o, id: e.id, langDir: e.lang.dir, langCode: e.langCode, name: e.name, style: "display:none;z-index:" + (i.baseFloatZIndex - 1), topId: e.ui.spaceId("top"), voiceLabel: e.title }))), l = CKEDITOR.tools.eventsBuffer(500, r), c = CKEDITOR.tools.eventsBuffer(100, r); a.unselectable(), a.on("mousedown", function (e) { e = e.data, e.getTarget().hasAscendant("a", 1) || e.preventDefault() }), e.on("focus", function (n) { r(n), e.on("change", l.input), t.on("scroll", c.input), t.on("resize", c.input) }), e.on("blur", function () { a.hide(), e.removeListener("change", l.input), t.removeListener("scroll", c.input), t.removeListener("resize", c.input) }), e.on("destroy", function () { t.removeListener("scroll", c.input), t.removeListener("resize", c.input), a.clearCustomData(), a.remove() }), e.focusManager.hasFocus && a.show(), e.focusManager.add(a, 1) } } var t = CKEDITOR.document.getWindow(), n = CKEDITOR.tools.cssLength; CKEDITOR.plugins.add("floatingspace", { init: function (t) { t.on("loaded", function () { e(this) }, null, null, 20) } }) }(), CKEDITOR.plugins.add("listblock", { requires: "panel", onLoad: function () { var e = CKEDITOR.addTemplate("panel-list", '<ul role="presentation" class="cke_panel_list">{items}</ul>'), t = CKEDITOR.addTemplate("panel-list-item", '<li id="{id}" class="cke_panel_listItem" role=presentation><a id="{id}_option" _cke_focus=1 hidefocus=true title="{title}" href="javascript:void(\'{val}\')"  {onclick}="CKEDITOR.tools.callFunction({clickFn},\'{val}\'); return false;" role="option">{text}</a></li>'), n = CKEDITOR.addTemplate("panel-list-group", '<h1 id="{id}" class="cke_panel_grouptitle" role="presentation" >{label}</h1>'), i = /\'/g; CKEDITOR.ui.panel.prototype.addListBlock = function (e, t) { return this.addBlock(e, new CKEDITOR.ui.listBlock(this.getHolderElement(), t)) }, CKEDITOR.ui.listBlock = CKEDITOR.tools.createClass({ base: CKEDITOR.ui.panel.block, $: function (e, t) { t = t || {}; var n = t.attributes || (t.attributes = {}); (this.multiSelect = !!t.multiSelect) && (n["aria-multiselectable"] = !0), !n.role && (n.role = "listbox"), this.base.apply(this, arguments), this.element.setAttribute("role", n.role), n = this.keys, n[40] = "next", n[9] = "next", n[38] = "prev", n[CKEDITOR.SH
181IFT + 9] = "prev", n[32] = CKEDITOR.env.ie ? "mouseup" : "click", CKEDITOR.env.ie && (n[13] = "mouseup"), this._.pendingHtml = [], this._.pendingList = [], this._.items = {}, this._.groups = {} }, _: { close: function () { if (this._.started) { var t = e.output({ items: this._.pendingList.join("") }); this._.pendingList = [], this._.pendingHtml.push(t), delete this._.started } }, getClick: function () { return this._.click || (this._.click = CKEDITOR.tools.addFunction(function (e) { var t = this.toggle(e); this.onClick && this.onClick(e, t) }, this)), this._.click } }, proto: { add: function (e, n, o) { var r = CKEDITOR.tools.getNextId(); this._.started || (this._.started = 1, this._.size = this._.size || 0), this._.items[e] = r; var s; s = CKEDITOR.tools.htmlEncodeAttr(e).replace(i, "\\'"), e = { id: r, val: s, onclick: CKEDITOR.env.ie ? 'onclick="return false;" onmouseup' : "onclick", clickFn: this._.getClick(), title: CKEDITOR.tools.htmlEncodeAttr(o || e), text: n || e }, this._.pendingList.push(t.output(e)) }, startGroup: function (e) { this._.close(); var t = CKEDITOR.tools.getNextId(); this._.groups[e] = t, this._.pendingHtml.push(n.output({ id: t, label: e })) }, commit: function () { this._.close(), this.element.appendHtml(this._.pendingHtml.join("")), delete this._.size, this._.pendingHtml = [] }, toggle: function (e) { var t = this.isMarked(e); return t ? this.unmark(e) : this.mark(e), !t }, hideGroup: function (e) { var t = (e = this.element.getDocument().getById(this._.groups[e])) && e.getNext(); e && (e.setStyle("display", "none"), t && "ul" == t.getName() && t.setStyle("display", "none")) }, hideItem: function (e) { this.element.getDocument().getById(this._.items[e]).setStyle("display", "none") }, showAll: function () { var e, t = this._.items, n = this._.groups, i = this.element.getDocument(); for (e in t) i.getById(t[e]).setStyle("display", ""); for (var o in n) t = i.getById(n[o]), e = t.getNext(), t.setStyle("display", ""), e && "ul" == e.getName() && e.setStyle("display", "") }, mark: function (e) { this.multiSelect || this.unmarkAll(), e = this._.items[e]; var t = this.element.getDocument().getById(e); t.addClass("cke_selected"), this.element.getDocument().getById(e + "_option").setAttribute("aria-selected", !0), this.onMark && this.onMark(t) }, unmark: function (e) { var t = this.element.getDocument(); e = this._.items[e]; var n = t.getById(e); n.removeClass("cke_selected"), t.getById(e + "_option").removeAttribute("aria-selected"), this.onUnmark && this.onUnmark(n) }, unmarkAll: function () { var e, t = this._.items, n = this.element.getDocument(); for (e in t) { var i = t[e]; n.getById(i).removeClass("cke_selected"), n.getById(i + "_option").removeAttribute("aria-selected") } this.onUnmark && this.onUnmark() }, isMarked: function (e) { return this.element.getDocument().getById(this._.items[e]).hasClass("cke_selected") }, focus: function (e) { this._.focusIndex = -1; var t, n = this.element.getElementsByTag("a"), i = -1; if (e) { for (t = this.element.getDocument().getById(this._.items[e]).getFirst(); e = n.getItem(++i);)if (e.equals(t)) { this._.focusIndex = i; break } } else this.element.focus(); t && setTimeout(function () { t.focus() }, 0) } } }) } }), CKEDITOR.plugins.add("richcombo", { requires: "floatpanel,listblock,button", beforeInit: function (e) { e.ui.addHandler(CKEDITOR.UI_RICHCOMBO, CKEDITOR.ui.richCombo.handler) } }), function () { var e = '<span id="{id}" class="cke_combo cke_combo__{name} {cls}" role="presentation"><span id="{id}_label" class="cke_combo_label">{label}</span><a class="cke_combo_button" title="{title}" tabindex="-1"' + (CKEDITOR.env.gecko && !CKEDITOR.env.hc ? "" : " href=\"javascript:void('{titleJs}')\"") + ' hidefocus="true" role="button" aria-labelledby="{id}_label" aria-haspopup="true"'; CKEDITOR.env.gecko && CKEDITOR.env.mac && (e += ' onkeypress="return false;"'), CKEDITOR.env.gecko && (e += ' onblur="this.style.cssText = this.style.cssText;"'); var e = e + (' onkeydown="return CKEDITOR.tools.callFunction({keydownFn},event,this);" onfocus="return CKEDITOR.tools.callFunction({focusFn},event);" ' + (CKEDITOR.env.ie ? 'onclick="return false;" onmouseup' : "onclick") + '="CKEDITOR.tools.callFunction({clickFn},this);return false;"><span id="{id}_text" class="cke_combo_text cke_combo_inlinelabel">{label}</span><span class="cke_combo_open"><span class="cke_combo_arrow">' + (CKEDITOR.env.hc ? "&#9660;" : CKEDITOR.env.air ? "&nbsp;" : "") + "</span></span></a></span>"), t = CKEDITOR.addTemplate("combo", e); CKEDITOR.UI_RICHCOMBO = "richcombo", CKEDITOR.ui.richCombo = CKEDITOR.tools.createClass({ $: function (e) { CKEDITOR.tools.extend(this, e, { canGroup: !1, title: e.label, modes: { wysiwyg: 1 }, editorFocus: 1 }), e = this.panel || {}, delete this.panel, this.id = CKEDITOR.tools.getNextNumber(), this.document = e.parent && e.parent.getDocument() || CKEDITOR.document, e.className = "cke_combopanel", e.block = { multiSelect: e.multiSelect, attributes: e.attributes }, e.toolbarRelated = !0, this._ = { panelDefinition: e, items: {} } }, proto: { renderHtml: function (e) { var t = []; return this.render(e, t), t.join("") }, render: function (e, n) { function i() { if (this.getState() != CKEDITOR.TRISTATE_ON) { var t = this.modes[e.mode] ? CKEDITOR.TRISTATE_OFF : CKEDITOR.TRISTATE_DISABLED; e.readOnly && !this.readOnly && (t = CKEDITOR.TRISTATE_DISABLED), this.setState(t), this.setValue(""), t != CKEDITOR.TRISTATE_DISABLED && this.refresh && this.refresh() } } var o = CKEDITOR.env, r = "cke_" + this.id, s = CKEDITOR.tools.addFunction(function (t) { u && (e.unlockSelection(1), u = 0), l.execute(t) }, this), a = this, l = { id: r, combo: this, focus: function () { CKEDITOR.document.getById(r).getChild(1).focus() }, execute: function (t) { var n = a._; if (n.state != CKEDITOR.TRISTATE_DISABLED) if (a.createPanel(e), n.on) n.panel.hide(); else { a.commit(); var i = a.getValue(); i ? n.list.mark(i) : n.list.unmarkAll(), n.panel.showBlock(a.id, new CKEDITOR.dom.element(t), 4) } }, clickFn: s }; e.on("activeFilterChange", i, this), e.on("mode", i, this), e.on("selectionChange", i, this), !this.readOnly && e.on("readOnly", i, this); var c = CKEDITOR.tools.addFunction(function (t, n) { t = new CKEDITOR.dom.event(t); var i = t.getKeystroke(); switch (40 == i && e.once("panelShow", function (e) { e.data._.panel._.currentBlock.onKeyDown(40) }), i) { case 13: case 32: case 40: CKEDITOR.tools.callFunction(s, n); break; default: l.onkey(l, i) }t.preventDefault() }), d = CKEDITOR.tools.addFunction(function () { l.onfocus && l.onfocus() }), u = 0; return l.keyDownFn = c, o = { id: r, name: this.name || this.command, label: this.label, title: this.title, cls: this.className || "", titleJs: o.gecko && !o.hc ? "" : (this.title || "").replace("'", ""), keydownFn: c, focusFn: d, clickFn: s }, t.output(o, n), this.onRender && this.onRender(), l }, createPanel: function (e) { if (!this._.panel) { var t = this._.panelDefinition, n = this._.panelDefinition.block, i = t.parent || CKEDITOR.document.getBody(), o = "cke_combopanel__" + this.name, r = new CKEDITOR.ui.floatPanel(e, i, t), s = r.addListBlock(this.id, n), a = this; r.onShow = function () { this.element.addClass(o), a.setState(CKEDITOR.TRISTATE_ON), a._.on = 1, a.editorFocus && !e.focusManager.hasFocus && e.focus(), a.onOpen && a.onOpen(), e.once("panelShow", function () { s.focus(!s.multiSelect && a.getValue()) }) }, r.onHide = function (t) { this.element.removeClass(o), a.setState(a.modes && a.modes[e.mode] ? CKEDITOR.TRISTATE_OFF : CKEDITOR.TRISTATE_DISABLED), a._.on = 0, !t && a.onClose && a.onClose() }, r.onEscape = function () { r.hide(1) }, s.onClick = function (e, t) { a.onClick && a.onClick.call(a, e, t), r.hide() }, this._.panel = r, this._.list = s, r.getBlock(this.id).onHide = function () { a._.on = 0, a.setState(CKEDITOR.TRISTATE_OFF) }, this.init && this.init() } }, setValue: function (e, t) { this._.value = e; var n = this.document.getById("cke_" + this.id + "_text"); n && (e || t ? n.removeClass("cke_combo_inlinelabel") : (t = this.label, n.addClass("cke_combo_inlinelabel")), n.setText("undefined" != typeof t ? t : e)) }, getValue: function () { return this._.value || "" }, unmarkAll: function () { this._.list.unmarkAll() }, mark: function (e) { this._.list.mark(e) }, hideItem: function (e) { this._.list.hideItem(e) }, hideGroup: function (e) { this._.list.hideGroup(e) }, showAll: function () { this._.list.showAll() }, add: function (e, t, n) { this._.items[e] = n || e, this._.list.add(e, t, n) }, startGroup: function (e) { this._.list.startGroup(e) }, commit: function () { this._.committed || (this._.list.commit(), this._.committed = 1, CKEDITOR.ui.fire("ready", this)), this._.committed = 1 }, setState: function (e) { if (this._.state != e) { var t = this.document.getById("cke_" + this.id); t.setState(e, "cke_combo"), e == CKEDITOR.TRISTATE_DISABLED ? t.setAttribute("aria-disabled", !0) : t.removeAttribute("aria-disabled"), this._.state = e } }, getState: function () { return this._.state }, enable: function () { this._.state == CKEDITOR.TRISTATE_DISABLED && this.setState(this._.lastState) }, disable: function () { this._.state != CKEDITOR.TRISTATE_DISABLED && (this._.lastState = this._.state, this.setState(CKEDITOR.TRISTATE_DISABLED)) } }, statics: { handler: { create: function (e) { return new CKEDITOR.ui.richCombo(e) } } } }), CKEDITOR.ui.prototype.addRichCombo = function (e, t) { this.add(e, CKEDITOR.UI_RICHCOMBO, t) } }(), function () { function e(e, n, i, o, r, s, a, l) { var c = e.config, d = new CKEDITOR.style(a), u = r.split(";"); r = []; for (var h = {}, p = 0; p < u.length; p++) { var f = u[p]; if (f) { var f = f.split("/"), m = {}, g = u[p] = f[0]; m[i] = r[p] = f[1] || g, h[g] = new CKEDITOR.style(a, m), h[g]._.definition.name = g } else u.splice(p--, 1) } e.ui.addRichCombo(n, { label: o.label, title: o.panelTitle, toolbar: "styles," + l, allowedContent: d, requiredContent: d, contentTransformations: [[{ element: "font", check: "span", left: function (e) { return !!e.attributes.size || !!e.attributes.align || !!e.attributes.face }, right: function (e) { var t = " x-small small medium large x-large xx-large 48px".split(" "); e.name = "span", e.attributes.size && (e.styles["font-size"] = t[e.attributes.size], delete e.attributes.size), e.attributes.align && (e.styles["text-align"] = e.attributes.align, delete e.attributes.align), e.attributes.face && (e.styles["font-family"] = e.attributes.face, delete e.attributes.face) } }]], panel: { css: [CKEDITOR.skin.getPath("editor")].concat(c.contentsCss), multiSelect: !1, attributes: { "aria-label": o.panelTitle } }, init: function () { this.startGroup(o.panelTitle); for (var e = 0; e < u.length; e++) { var t = u[e]; this.add(t, h[t].buildPreview(), t) } }, onClick: function (n) { e.focus(), e.fire("saveSnapshot"); var i = this.getValue(), o = h[n]; if (i && n != i) { var r = h[i], s = e.getSelection().getRanges()[0]; if (s.collapsed) { var a = e.elementPath(), l = a.contains(function (e) { return r.checkElementRemovable(e) }); if (l) { var c = s.checkBoundaryOfElement(l, CKEDITOR.START), d = s.checkBoundaryOfElement(l, CKEDITOR.END); if (c && d) { for (c = s.createBookmark(); a = l.getFirst();)a.insertBefore(l); l.remove(), s.moveToBookmark(c) } else c ? s.moveToPosition(l, CKEDITOR.POSITION_BEFORE_START) : d ? s.moveToPosition(l, CKEDITOR.POSITION_AFTER_END) : (s.splitElement(l), s.moveToPosition(l, CKEDITOR.POSITION_AFTER_END), t(s, a.elements.slice(), l)); e.getSelection().selectRanges([s]) } } else e.removeStyle(r) } e[i == n ? "removeStyle" : "applyStyle"](o), e.fire("saveSnapshot") }, onRender: function () { e.on("selectionChange", function (t) { var n = this.getValue(); t = t.data.path.elements; for (var i, o = 0; o < t.length; o++) { i = t[o]; for (var r in h) if (h[r].checkElementMatch(i, !0, e)) return void (r != n && this.setValue(r)) } this.setValue("", s) }, this) }, refresh: function () { e.activeFilter.check(d) || this.setState(CKEDITOR.TRISTATE_DISABLED) } }) } function t(e, n, i) { var o = n.pop(); if (o) { if (i) return t(e, n, o.equals(i) ? null : i);
181 i = o.clone(), e.insertNode(i), e.moveToPosition(i, CKEDITOR.POSITION_AFTER_START), t(e, n) } } CKEDITOR.plugins.add("font", { requires: "richcombo", init: function (t) { var n = t.config; e(t, "Font", "family", t.lang.font, n.font_names, n.font_defaultLabel, n.font_style, 30), e(t, "FontSize", "size", t.lang.font.fontSize, n.fontSize_sizes, n.fontSize_defaultLabel, n.fontSize_style, 40) } }) }(), CKEDITOR.config.font_names = "Arial/Arial, Helvetica, sans-serif;Comic Sans MS/Comic Sans MS, cursive;Courier New/Courier New, Courier, monospace;Georgia/Georgia, serif;Lucida Sans Unicode/Lucida Sans Unicode, Lucida Grande, sans-serif;Tahoma/Tahoma, Geneva, sans-serif;Times New Roman/Times New Roman, Times, serif;Trebuchet MS/Trebuchet MS, Helvetica, sans-serif;Verdana/Verdana, Geneva, sans-serif", CKEDITOR.config.font_defaultLabel = "", CKEDITOR.config.font_style = { element: "span", styles: { "font-family": "#(family)" }, overrides: [{ element: "font", attributes: { face: null } }] }, CKEDITOR.config.fontSize_sizes = "8/8px;9/9px;10/10px;11/11px;12/12px;14/14px;16/16px;18/18px;20/20px;22/22px;24/24px;26/26px;28/28px;36/36px;48/48px;72/72px", CKEDITOR.config.fontSize_defaultLabel = "", CKEDITOR.config.fontSize_style = { element: "span", styles: { "font-size": "#(size)" }, overrides: [{ element: "font", attributes: { size: null } }] }, CKEDITOR.plugins.add("forms", {
182            requires: "dialog,fakeobjects", onLoad: function () { CKEDITOR.addCss(".cke_editable form{border: 1px dotted #FF0000;padding: 2px;}\n"), CKEDITOR.addCss("img.cke_hidden{background-image: url(" + CKEDITOR.getUrl(this.path + "images/hiddenfield.gif") + ");background-position: center center;background-repeat: no-repeat;border: 1px solid #a9a9a9;width: 16px !important;height: 16px !important;}") }, init: function (e) {
183                var t = e.lang, n = 0, i = { email: 1, password: 1, search: 1, tel: 1, text: 1, url: 1 }, o = { checkbox: "input[type,name,checked,required]", radio: "input[type,name,checked,required]", textfield: "input[type,name,value,size,maxlength,required]", textarea: "textarea[cols,rows,name,required]", select: "select[name,size,multiple,required]; option[value,selected]", button: "input[type,name,value]", form: "form[action,name,id,enctype,target,method]", hiddenfield: "input[type,name,value]", imagebutton: "input[type,alt,src]{width,height,border,border-width,border-style,margin,float}" }, r = { checkbox: "input", radio: "input", textfield: "input", textarea: "textarea", select: "select", button: "input", form: "form", hiddenfield: "input", imagebutton: "input" }, s = function (i, s, a) {
184                    var l = { allowedContent: o[s], requiredContent: r[s] }; "form" == s && (l.context = "form"), e.addCommand(s, new CKEDITOR.dialogCommand(s, l)),
185                        e.ui.addButton && e.ui.addButton(i, { label: t.common[i.charAt(0).toLowerCase() + i.slice(1)], command: s, toolbar: "forms," + (n += 10) }), CKEDITOR.dialog.add(s, a)
186                }, a = this.path + "dialogs/"; !e.blockless && s("Form", "form", a + "form.js"), s("Checkbox", "checkbox", a + "checkbox.js"), s("Radio", "radio", a + "radio.js"), s("TextField", "textfield", a + "textfield.js"), s("Textarea", "textarea", a + "textarea.js"), s("Select", "select", a + "select.js"), s("Button", "button", a + "button.js"); var l = e.plugins.image; l && !e.plugins.image2 && s("ImageButton", "imagebutton", CKEDITOR.plugins.getPath("image") + "dialogs/image.js"), s("HiddenField", "hiddenfield", a + "hiddenfield.js"), e.addMenuItems && (s = { checkbox: { label: t.forms.checkboxAndRadio.checkboxTitle, command: "checkbox", group: "checkbox" }, radio: { label: t.forms.checkboxAndRadio.radioTitle, command: "radio", group: "radio" }, textfield: { label: t.forms.textfield.title, command: "textfield", group: "textfield" }, hiddenfield: { label: t.forms.hidden.title, command: "hiddenfield", group: "hiddenfield" }, button: { label: t.forms.button.title, command: "button", group: "button" }, select: { label: t.forms.select.title, command: "select", group: "select" }, textarea: { label: t.forms.textarea.title, command: "textarea", group: "textarea" } }
186, l && (s.imagebutton = { label: t.image.titleButton, command: "imagebutton", group: "imagebutton" }), !e.blockless && (s.form = { label: t.forms.form.menu, command: "form", group: "form" }), e.addMenuItems(s)), e.contextMenu && (!e.blockless && e.contextMenu.addListener(function (e, t, n) { return (e = n.contains("form", 1)) && !e.isReadOnly() ? { form: CKEDITOR.TRISTATE_OFF } : void 0 }), e.contextMenu.addListener(function (e) { if (e && !e.isReadOnly()) { var t = e.getName(); if ("select" == t) return { select: CKEDITOR.TRISTATE_OFF }; if ("textarea" == t) return { textarea: CKEDITOR.TRISTATE_OFF }; if ("input" == t) { var n = e.getAttribute("type") || "text"; switch (n) { case "button": case "submit": case "reset": return { button: CKEDITOR.TRISTATE_OFF }; case "checkbox": return { checkbox: CKEDITOR.TRISTATE_OFF }; case "radio": return { radio: CKEDITOR.TRISTATE_OFF }; case "image": return l ? { imagebutton: CKEDITOR.TRISTATE_OFF } : null }if (i[n]) return { textfield: CKEDITOR.TRISTATE_OFF } } if ("img" == t && "hiddenfield" == e.data("cke-real-element-type")) return { hiddenfield: CKEDITOR.TRISTATE_OFF } } })), e.on("doubleclick", function (t) { var n = t.data.element; if (!e.blockless && n.is("form")) t.data.dialog = "form"; else if (n.is("select")) t.data.dialog = "select"; else if (n.is("textarea")) t.data.dialog = "textarea"; else if (n.is("img") && "hiddenfield" == n.data("cke-real-element-type")) t.data.dialog = "hiddenfield"; else if (n.is("input")) { switch (n = n.getAttribute("type") || "text") { case "button": case "submit": case "reset": t.data.dialog = "button"; break; case "checkbox": t.data.dialog = "checkbox"; break; case "radio": t.data.dialog = "radio"; break; case "image": t.data.dialog = "imagebutton" }i[n] && (t.data.dialog = "textfield") } })
187            }, afterInit: function (e) { var t = e.dataProcessor, n = t && t.htmlFilter, t = t && t.dataFilter; CKEDITOR.env.ie && n && n.addRules({ elements: { input: function (e) { e = e.attributes; var t = e.type; t || (e.type = "text"), "checkbox" != t && "radio" != t || "on" != e.value || delete e.value } } }, { applyToAll: !0 }), t && t.addRules({ elements: { input: function (t) { return "hidden" == t.attributes.type ? e.createFakeParserElement(t, "cke_hidden", "hiddenfield") : void 0 } } }, { applyToAll: !0 }) }
188        }), CKEDITOR.plugins.add("format", { requires: "richcombo", init: function (e) { if (!e.blockless) { for (var t = e.config, n = e.lang.format, i = t.format_tags.split(";"), o = {}, r = 0, s = [], a = 0; a < i.length; a++) { var l = i[a], c = new CKEDITOR.style(t["format_" + l]); e.filter.customConfig && !e.filter.check(c) || (r++, o[l] = c, o[l]._.enterMode = e.config.enterMode, s.push(c)) } 0 !== r && e.ui.addRichCombo("Format", { label: n.label, title: n.panelTitle, toolbar: "styles,20", allowedContent: s, panel: { css: [CKEDITOR.skin.getPath("editor")].concat(t.contentsCss), multiSelect: !1, attributes: { "aria-label": n.panelTitle } }, init: function () { this.startGroup(n.panelTitle); for (var e in o) { var t = n["tag_" + e]; this.add(e, o[e].buildPreview(t), t) } }, onClick: function (t) { e.focus(), e.fire("saveSnapshot"), t = o[t]; var n = e.elementPath(); e[t.checkActive(n, e) ? "removeStyle" : "applyStyle"](t), setTimeout(function () { e.fire("saveSnapshot") }, 0) }, onRender: function () { e.on("selectionChange", function (t) { var n = this.getValue(); t = t.data.path, this.refresh(); for (var i in o) if (o[i].checkActive(t, e)) return void (i != n && this.setValue(i, e.lang.format["tag_" + i])); this.setValue("") }, this) }, onOpen: function () { this.showAll(); for (var t in o) e.activeFilter.check(o[t]) || this.hideItem(t) }, refresh: function () { var t = e.elementPath(); if (t) { if (t.isContextFor("p")) for (var n in o) if (e.activeFilter.check(o[n])) return; this.setState(CKEDITOR.TRISTATE_DISABLED) } } }) } } }), CKEDITOR.config.format_tags = "p;h1;h2;h3;h4;h5;h6;pre;address;div", CKEDITOR.config.format_p = { element: "p" }, CKEDITOR.config.format_div = { element: "div" }, CKEDITOR.config.format_pre = { element: "pre" }, CKEDITOR.config.format_address = { element: "address" }, CKEDITOR.config.format_h1 = { element: "h1" }, CKEDITOR.config.format_h2 = { element: "h2" }, CKEDITOR.config.format_h3 = { element: "h3" }, CKEDITOR.config.format_h4 = { element: "h4" }, CKEDITOR.config.format_h5 = { element: "h5" }, CKEDITOR.config.format_h6 = { element: "h6" }, function () { var e = { canUndo: !1, exec: function (e) { var t = e.document.createElement("hr"); e.insertElement(t) }, allowedContent: "hr", requiredContent: "hr" }; CKEDITOR.plugins.add("horizontalrule", { init: function (t) { t.blockless || (t.addCommand("horizontalrule", e), t.ui.addButton && t.ui.addButton("HorizontalRule", { label: t.lang.horizontalrule.toolbar, command: "horizontalrule", toolbar: "insert,40" })) } }) }(), CKEDITOR.plugins.add("htmlwriter", { init: function (e) { var t = new CKEDITOR.htmlWriter; t.forceSimpleAmpersand = e.config.forceSimpleAmpersand, t.indentationChars = e.config.dataIndentationChars || "	", e.dataProcessor.writer = t } }), CKEDITOR.htmlWriter = CKEDITOR.tools.createClass({ base: CKEDITOR.htmlParser.basicWriter, $: function () { this.base(), this.indentationChars = "	", this.selfClosingEnd = " />", this.lineBreakChars = "\n", this.sortAttributes = 1, this._.indent = 0, this._.indentation = "", this._.inPre = 0, this._.rules = {}; var e, t = CKEDITOR.dtd; for (e in CKEDITOR.tools.extend({}, t.$nonBodyContent, t.$block, t.$listItem, t.$tableContent)) this.setRules(e, { indent: !t[e]["#"], breakBeforeOpen: 1, breakBeforeClose: !t[e]["#"], breakAfterClose: 1, needsSpace: e in t.$block && !(e in { li: 1, dt: 1, dd: 1 }) }); this.setRules("br", { breakAfterOpen: 1 }), this.setRules("title", { indent: 0, breakAfterOpen: 0 }), this.setRules("style", { indent: 0, breakBeforeClose: 1 }), this.setRules("pre", { breakAfterOpen: 1, indent: 0 }) }, proto: { openTag: function (e) { var t = this._.rules[e]; this._.afterCloser && t && t.needsSpace && this._.needsSpace && this._.output.push("\n"), this._.indent ? this.indentation() : t && t.breakBeforeOpen && (this.lineBreak(), this.indentation()), this._.output.push("<", e), this._.afterCloser = 0 }, openTagClose: function (e, t) { var n = this._.rules[e]; t ? (this._.output.push(this.selfClosingEnd), n && n.breakAfterClose && (this._.needsSpace = n.needsSpace)) : (this._.output.push(">"), n && n.indent && (this._.indentation += this.indentationChars)), n && n.breakAfterOpen && this.lineBreak(), "pre" == e && (this._.inPre = 1) }, attribute: function (e, t) { "string" == typeof t && (this.forceSimpleAmpersand && (t = t.replace(/&amp;/g, "&")), t = CKEDITOR.tools.htmlEncodeAttr(t)), this._.output.push(" ", e, '="', t, '"') }, closeTag: function (e) { var t = this._.rules[e]; t && t.indent && (this._.indentation = this._.indentation.substr(this.indentationChars.length)), this._.indent ? this.indentation() : t && t.breakBeforeClose && (this.lineBreak(), this.indentation()), this._.output.push("</", e, ">"), "pre" == e && (this._.inPre = 0), t && t.breakAfterClose && (this.lineBreak(), this._.needsSpace = t.needsSpace), this._.afterCloser = 1 }, text: function (e) { this._.indent && (this.indentation(), !this._.inPre && (e = CKEDITOR.tools.ltrim(e))), this._.output.push(e) }, comment: function (e) { this._.indent && this.indentation(), this._.output.push("<!--", e, "-->") }, lineBreak: function () { !this._.inPre && 0 < this._.output.length && this._.output.push(this.lineBreakChars), this._.indent = 1 }, indentation: function () { !this._.inPre && this._.indentation && this._.output.push(this._.indentation), this._.indent = 0 }, reset: function () { this._.output = [], this._.indent = 0, this._.indentation = "", this._.afterCloser = 0, this._.inPre = 0, this._.needsSpace = 0 }, setRules: function (e, t) { var n = this._.rules[e]; n ? CKEDITOR.tools.extend(n, t, !0) : this._.rules[e] = t } } }), function () { CKEDITOR.plugins.add("iframe", { requires: "dialog,fakeobjects", onLoad: function () { CKEDITOR.addCss("img.cke_iframe{background-image: url(" + CKEDITOR.getUrl(this.path + "images/placeholder.png") + ");background-position: center center;background-repeat: no-repeat;border: 1px solid #a9a9a9;width: 80px;height: 80px;}") }, init: function (e) { var t = e.lang.iframe, n = "iframe[align,longdesc,frameborder,height,name,scrolling,src,title,width]"; e.plugins.dialogadvtab && (n += ";iframe" + e.plugins.dialogadvtab.allowedContent({ id: 1, classes: 1, styles: 1 })), CKEDITOR.dialog.add("iframe", this.path + "dialogs/iframe.js"), e.addCommand("iframe", new CKEDITOR.dialogCommand("iframe", { allowedContent: n, requiredContent: "iframe" })), e.ui.addButton && e.ui.addButton("Iframe", { label: t.toolbar, command: "iframe", toolbar: "insert,80" }), e.on("doubleclick", function (e) { var t = e.data.element; t.is("img") && "iframe" == t.data("cke-real-element-type") && (e.data.dialog = "iframe") }), e.addMenuItems && e.addMenuItems({ iframe: { label: t.title, command: "iframe", group: "image" } }), e.contextMenu && e.contextMenu.addListener(function (e) { return e && e.is("img") && "iframe" == e.data("cke-real-element-type") ? { iframe: CKEDITOR.TRISTATE_OFF } : void 0 }) }, afterInit: function (e) { var t = e.dataProcessor; (t = t && t.dataFilter) && t.addRules({ elements: { iframe: function (t) { return e.createFakeParserElement(t, "cke_iframe", "iframe", !0) } } }) } }) }(), function () { function e(e) { function n(e) { var t = !1; a.attachListener(a, "keydown", function () { var n = o.getBody().getElementsByTag(e); if (!t) { for (var i = 0; i < n.count(); i++)n.getItem(i).setCustomData("retain", !0); t = !0 } }, null, null, 1), a.attachListener(a, "keyup", function () { var n = o.getElementsByTag(e); t && (1 != n.count() || n.getItem(0).getCustomData("retain") || n.getItem(0).hasAttribute("data-cke-temp") || n.getItem(0).remove(1), t = !1) }) } var i = this.editor, o = e.document, r = o.body, s = o.getElementById("cke_actscrpt"); s && s.parentNode.removeChild(s), (s = o.getElementById("cke_shimscrpt")) && s.parentNode.removeChild(s), (s = o.getElementById("cke_basetagscrpt")) && s.parentNode.removeChild(s), r.contentEditable = !0, CKEDITOR.env.ie && (r.hideFocus = !0, r.disabled = !0, r.removeAttribute("disabled")), delete this._.isLoadingData, this.$ = r, o = new CKEDITOR.dom.document(o), this.setup(), this.fixInitialSelection(); var a = this; CKEDITOR.env.ie && !CKEDITOR.env.edge && o.getDocumentElement().addClass(o.$.compatMode), CKEDITOR.env.ie && !CKEDITOR.env.edge && i.enterMode != CKEDITOR.ENTER_P ? n("p") : CKEDITOR.env.edge && i.enterMode != CKEDITOR.ENTER_DIV && n("div"), (CKEDITOR.env.webkit || CKEDITOR.env.ie && 10 < CKEDITOR.env.version) && o.getDocumentElement().on("mousedown", function (e) { e.data.getTarget().is("html") && setTimeout(function () { i.editable().focus() }) }), t(i); try { i.document.$.execCommand("2D-position", !1, !0) } catch (l) { } (CKEDITOR.env.gecko || CKEDITOR.env.ie && "CSS1Compat" == i.document.$.compatMode) && this.attachListener(this, "keydown", function (e) { var t = e.data.getKeystroke(); if (33 == t || 34 == t) if (CKEDITOR.env.ie) setTimeout(function () { i.getSelection().scrollIntoView() }, 0);
188 else if (i.window.$.innerHeight > this.$.offsetHeight) { var n = i.createRange(); n[33 == t ? "moveToElementEditStart" : "moveToElementEditEnd"](this), n.select(), e.data.preventDefault() } }), CKEDITOR.env.ie && this.attachListener(o, "blur", function () { try { o.$.selection.empty() } catch (e) { } }), CKEDITOR.env.iOS && this.attachListener(o, "touchend", function () { e.focus() }), r = i.document.getElementsByTag("title").getItem(0), r.data("cke-title", r.getText()), CKEDITOR.env.ie && (i.document.$.title = this._.docTitle), CKEDITOR.tools.setTimeout(function () { "unloaded" == this.status && (this.status = "ready"), i.fire("contentDom"), this._.isPendingFocus && (i.focus(), this._.isPendingFocus = !1), setTimeout(function () { i.fire("dataReady") }, 0) }, 0, this) } function t(e) { function t() { var t; e.editable().attachListener(e, "selectionChange", function () { var i = e.getSelection().getSelectedElement(); i && (t && (t.detachEvent("onresizestart", n), t = null), i.$.attachEvent("onresizestart", n), t = i.$) }) } function n(e) { e.returnValue = !1 } if (CKEDITOR.env.gecko) try { var i = e.document.$; i.execCommand("enableObjectResizing", !1, !e.config.disableObjectResizing), i.execCommand("enableInlineTableEditing", !1, !e.config.disableNativeTableHandles) } catch (o) { } else CKEDITOR.env.ie && 11 > CKEDITOR.env.version && e.config.disableObjectResizing && t(e) } function n() { var e = []; if (8 <= CKEDITOR.document.$.documentMode) { e.push("html.CSS1Compat [contenteditable=false]{min-height:0 !important}"); var t, n = []; for (t in CKEDITOR.dtd.$removeEmpty) n.push("html.CSS1Compat " + t + "[contenteditable=false]"); e.push(n.join(",") + "{display:inline-block}") } else CKEDITOR.env.gecko && (e.push("html{height:100% !important}"), e.push("img:-moz-broken{-moz-force-broken-image-icon:1;min-width:24px;min-height:24px}")); return e.push("html{cursor:text;*cursor:auto}"), e.push("img,input,textarea{cursor:default}"), e.join("\n") } var i; CKEDITOR.plugins.add("wysiwygarea", { init: function (e) { e.config.fullPage && e.addFeature({ allowedContent: "html head title; style [media,type]; body (*)[id]; meta link [*]", requiredContent: "body" }), e.addMode("wysiwyg", function (t) { function n(n) { n && n.removeListener(), e.editable(new i(e, r.$.contentWindow.document.body)), e.setData(e.getData(1), t) } var o = "document.open();" + (CKEDITOR.env.ie ? "(" + CKEDITOR.tools.fixDomain + ")();" : "") + "document.close();", o = CKEDITOR.env.air ? "javascript:void(0)" : CKEDITOR.env.ie && !CKEDITOR.env.edge ? "javascript:void(function(){" + encodeURIComponent(o) + "}())" : "", r = CKEDITOR.dom.element.createFromHtml('<iframe src="' + o + '" frameBorder="0"></iframe>'); r.setStyles({ width: "100%", height: "100%" }), r.addClass("cke_wysiwyg_frame").addClass("cke_reset"), o = e.ui.space("contents"), o.append(r); var s = CKEDITOR.env.ie && !CKEDITOR.env.edge || CKEDITOR.env.gecko; s && r.on("load", n); var a = e.title, l = e.fire("ariaEditorHelpLabel", {}).label; if (a && (CKEDITOR.env.ie && l && (a += ", " + l), r.setAttribute("title", a)), l) { var a = CKEDITOR.tools.getNextId(), c = CKEDITOR.dom.element.createFromHtml('<span id="' + a + '" class="cke_voice_label">' + l + "</span>"); o.append(c, 1), r.setAttribute("aria-describedby", a) } e.on("beforeModeUnload", function (e) { e.removeListener(), c && c.remove() }), r.setAttributes({ tabIndex: e.tabIndex, allowTransparency: "true" }), !s && n(), e.fire("ariaWidget", r) }) } }), CKEDITOR.editor.prototype.addContentsCss = function (e) { var t = this.config, n = t.contentsCss; CKEDITOR.tools.isArray(n) || (t.contentsCss = n ? [n] : []), t.contentsCss.push(e) }, i = CKEDITOR.tools.createClass({ $: function () { this.base.apply(this, arguments), this._.frameLoadedHandler = CKEDITOR.tools.addFunction(function (t) { CKEDITOR.tools.setTimeout(e, 0, this, t) }, this), this._.docTitle = this.getWindow().getFrame().getAttribute("title") }, base: CKEDITOR.editable, proto: { setData: function (e, t) { var i = this.editor; if (t) this.setHtml(e), this.fixInitialSelection(), i.fire("dataReady"); else { this._.isLoadingData = !0, i._.dataStore = { id: 1 }; var o = i.config, r = o.fullPage, s = o.docType, a = CKEDITOR.tools.buildStyleHtml(n()).replace(/<style>/, '<style data-cke-temp="1">'); r || (a += CKEDITOR.tools.buildStyleHtml(i.config.contentsCss)); var l = o.baseHref ? '<base href="' + o.baseHref + '" data-cke-temp="1" />' : ""; r && (e = e.replace(/<!DOCTYPE[^>]*>/i, function (e) { return i.docType = s = e, "" }).replace(/<\?xml\s[^\?]*\?>/i, function (e) { return i.xmlDeclaration = e, "" })), e = i.dataProcessor.toHtml(e), r ? (/<body[\s|>]/.test(e) || (e = "<body>" + e), /<html[\s|>]/.test(e) || (e = "<html>" + e + "</html>"), /<head[\s|>]/.test(e) ? /<title[\s|>]/.test(e) || (e = e.replace(/<head[^>]*>/, "$&<title></title>")) : e = e.replace(/<html[^>]*>/, "$&<head><title></title></head>"), l && (e = e.replace(/<head[^>]*?>/, "$&" + l)), e = e.replace(/<\/head\s*>/, a + "$&"), e = s + e) : e = o.docType + '<html dir="' + o.contentsLangDirection + '" lang="' + (o.contentsLanguage || i.langCode) + '"><head><title>' + this._.docTitle + "</title>" + l + a + "</head><body" + (o.bodyId ? ' id="' + o.bodyId + '"' : "") + (o.bodyClass ? ' class="' + o.bodyClass + '"' : "") + ">" + e + "</body></html>", CKEDITOR.env.gecko && (e = e.replace(/<body/, '<body contenteditable="true" '), 2e4 > CKEDITOR.env.version && (e = e.replace(/<body[^>]*>/, "$&<!-- cke-content-start -->"))), o = '<script id="cke_actscrpt" type="text/javascript"' + (CKEDITOR.env.ie ? ' defer="defer" ' : "") + ">var wasLoaded=0;function onload(){if(!wasLoaded)window.parent.CKEDITOR.tools.callFunction(" + this._.frameLoadedHandler + ",window);wasLoaded=1;}" + (CKEDITOR.env.ie ? "onload();" : 'document.addEventListener("DOMContentLoaded", onload, false );') + "</script>", CKEDITOR.env.ie && 9 > CKEDITOR.env.version && (o += '<script id="cke_shimscrpt">window.parent.CKEDITOR.tools.enableHtml5Elements(document)</script>'), l && CKEDITOR.env.ie && 10 > CKEDITOR.env.version && (o += '<script id="cke_basetagscrpt">var baseTag = document.querySelector( "base" );baseTag.href = baseTag.href;</script>'), e = e.replace(/(?=\s*<\/(:?head)>)/, o), this.clearCustomData(), this.clearListeners(), i.fire("contentDomUnload"); var c = this.getDocument(); try { c.write(e) } catch (d) { setTimeout(function () { c.write(e) }, 0) } } }, getData: function (e) { if (e) return this.getHtml(); e = this.editor; var t = e.config, n = t.fullPage, i = n && e.docType, o = n && e.xmlDeclaration, r = this.getDocument(), n = n ? r.getDocumentElement().getOuterHtml() : r.getBody().getHtml(); return CKEDITOR.env.gecko && t.enterMode != CKEDITOR.ENTER_BR && (n = n.replace(/<br>(?=\s*(:?$|<\/body>))/, "")), n = e.dataProcessor.toDataFormat(n), o && (n = o + "\n" + n), i && (n = i + "\n" + n), n }, focus: function () { this._.isLoadingData ? this._.isPendingFocus = !0 : i.baseProto.focus.call(this) }, detach: function () { var e, t = this.editor, n = t.document; try { e = t.window.getFrame() } catch (o) { } i.baseProto.detach.call(this), this.clearCustomData(), n.getDocumentElement().clearCustomData(), CKEDITOR.tools.removeFunction(this._.frameLoadedHandler), e && e.getParent() ? (e.clearCustomData(), (t = e.removeCustomData("onResize")) && t.removeListener(), e.remove()) : CKEDITOR.warn("editor-destroy-iframe") } } }) }(), CKEDITOR.config.disableObjectResizing = !1, CKEDITOR.config.disableNativeTableHandles = !0, CKEDITOR.config.disableNativeSpellChecker = !0, function () { function e(e, t) { return t || (t = e.getSelection().getSelectedElement()), t && t.is("img") && !t.data("cke-realelement") && !t.isReadOnly() ? t : void 0 } function t(e) { var t = e.getStyle("float"); return "inherit" != t && "none" != t || (t = 0), t || (t = e.getAttribute("align")), t } CKEDITOR.plugins.add("image", { requires: "dialog", init: function (t) { if (!t.plugins.image2) { CKEDITOR.dialog.add("image", this.path + "dialogs/image.js"); var n = "img[alt,!src]{border-style,border-width,float,height,margin,margin-bottom,margin-left,margin-right,margin-top,width}"; CKEDITOR.dialog.isTabEnabled(t, "image", "advanced") && (n = "img[alt,dir,id,lang,longdesc,!src,title]{*}(*)"), t.addCommand("image", new CKEDITOR.dialogCommand("image", { allowedContent: n, requiredContent: "img[alt,src]", contentTransformations: [["img{width}: sizeToStyle", "img[width]: sizeToAttribute"], ["img{float}: alignmentToStyle", "img[align]: alignmentToAttribute"]] })), t.ui.addButton && t.ui.addButton("Image", { label: t.lang.common.image, command: "image", toolbar: "insert,10" }), t.on("doubleclick", function (e) { var t = e.data.element; !t.is("img") || t.data("cke-realelement") || t.isReadOnly() || (e.data.dialog = "image") }), t.addMenuItems && t.addMenuItems({ image: { label: t.lang.image.menu, command: "image", group: "image" } }), t.contextMenu && t.contextMenu.addListener(function (n) { return e(t, n) ? { image: CKEDITOR.TRISTATE_OFF } : void 0 }) } }, afterInit: function (n) { function i(i) { var o = n.getCommand("justify" + i); o && ("left" != i && "right" != i || o.on("exec", function (o) { var r, s = e(n); s && (r = t(s), r == i ? (s.removeStyle("float"), i == t(s) && s.removeAttribute("align")) : s.setStyle("float", i), o.cancel()) }), o.on("refresh", function (o) { var r = e(n); r && (r = t(r), this.setState(r == i ? CKEDITOR.TRISTATE_ON : "right" == i || "left" == 
188i ? CKEDITOR.TRISTATE_OFF : CKEDITOR.TRISTATE_DISABLED), o.cancel()) })) } n.plugins.image2 || (i("left"), i("right"), i("center"), i("block")) } }) }(), CKEDITOR.config.image_removeLinkByEmptyURL = !0, function () { function e(e, i) { var o, r; i.on("refresh", function (e) { var i, o = [t]; for (i in e.data.states) o.push(e.data.states[i]); this.setState(CKEDITOR.tools.search(o, n) ? n : t) }, i, null, 100), i.on("exec", function (t) { o = e.getSelection(), r = o.createBookmarks(1), t.data || (t.data = {}), t.data.done = !1 }, i, null, 0), i.on("exec", function () { e.forceNextSelectionCheck(), o.selectBookmarks(r) }, i, null, 100) } var t = CKEDITOR.TRISTATE_DISABLED, n = CKEDITOR.TRISTATE_OFF; CKEDITOR.plugins.add("indent", { init: function (t) { var n = CKEDITOR.plugins.indent.genericDefinition; e(t, t.addCommand("indent", new n(!0))), e(t, t.addCommand("outdent", new n)), t.ui.addButton && (t.ui.addButton("Indent", { label: t.lang.indent.indent, command: "indent", directional: !0, toolbar: "indent,20" }), t.ui.addButton("Outdent", { label: t.lang.indent.outdent, command: "outdent", directional: !0, toolbar: "indent,10" })), t.on("dirChanged", function (e) { var n = t.createRange(), i = e.data.node; n.setStartBefore(i), n.setEndAfter(i); for (var o, r = new CKEDITOR.dom.walker(n); o = r.next();)if (o.type == CKEDITOR.NODE_ELEMENT) if (!o.equals(i) && o.getDirection()) n.setStartAfter(o), r = new CKEDITOR.dom.walker(n); else { var s = t.config.indentClasses; if (s) for (var a = "ltr" == e.data.dir ? ["_rtl", ""] : ["", "_rtl"], l = 0; l < s.length; l++)o.hasClass(s[l] + a[0]) && (o.removeClass(s[l] + a[0]), o.addClass(s[l] + a[1])); s = o.getStyle("margin-right"), a = o.getStyle("margin-left"), s ? o.setStyle("margin-left", s) : o.removeStyle("margin-left"), a ? o.setStyle("margin-right", a) : o.removeStyle("margin-right") } }) } }), CKEDITOR.plugins.indent = { genericDefinition: function (e) { this.isIndent = !!e, this.startDisabled = !this.isIndent }, specificDefinition: function (e, t, n) { this.name = t, this.editor = e, this.jobs = {}, this.enterBr = e.config.enterMode == CKEDITOR.ENTER_BR, this.isIndent = !!n, this.relatedGlobal = n ? "indent" : "outdent", this.indentKey = n ? 9 : CKEDITOR.SH
188IFT + 9, this.database = {} }, registerCommands: function (e, t) { e.on("pluginsLoaded", function () { for (var e in t) (function (e, t) { var n, i = e.getCommand(t.relatedGlobal); for (n in t.jobs) i.on("exec", function (i) { i.data.done || (e.fire("lockSnapshot"), t.execJob(e, n) && (i.data.done = !0), e.fire("unlockSnapshot"), CKEDITOR.dom.element.clearAllMarkers(t.database)) }, this, null, n), i.on("refresh", function (i) { i.data.states || (i.data.states = {}), i.data.states[t.name + "@" + n] = t.refreshJob(e, n, i.data.path) }, this, null, n); e.addFeature(t) })(this, t[e]) }) } }, CKEDITOR.plugins.indent.genericDefinition.prototype = { context: "p", exec: function () { } }, CKEDITOR.plugins.indent.specificDefinition.prototype = { execJob: function (e, n) { var i = this.jobs[n]; return i.state != t ? i.exec.call(this, e) : void 0 }, refreshJob: function (e, n, i) { return n = this.jobs[n], e.activeFilter.checkFeature(this) ? n.state = n.refresh.call(this, e, i) : n.state = t, n.state }, getContext: function (e) { return e.contains(this.context) } } }(), function () { function e(e, n, i) { if (!e.getCustomData("indent_processed")) { var o = this.editor, r = this.isIndent; if (n) { if (o = e.$.className.match(this.classNameRegex), i = 0, o && (o = o[1], i = CKEDITOR.tools.indexOf(n, o) + 1), 0 > (i += r ? 1 : -1)) return; i = Math.min(i, n.length), i = Math.max(i, 0), e.$.className = CKEDITOR.tools.ltrim(e.$.className.replace(this.classNameRegex, "")), i > 0 && e.addClass(n[i - 1]) } else { n = t(e, i), i = parseInt(e.getStyle(n), 10); var s = o.config.indentOffset || 40; if (isNaN(i) && (i = 0), i += (r ? 1 : -1) * s, 0 > i) return; i = Math.max(i, 0), i = Math.ceil(i / s) * s, e.setStyle(n, i ? i + (o.config.indentUnit || "px") : ""), "" === e.getAttribute("style") && e.removeAttribute("style") } CKEDITOR.dom.element.setMarker(this.database, e, "indent_processed", 1) } } function t(e, t) { return "ltr" == (t || e.getComputedStyle("direction")) ? "margin-left" : "margin-right" } var n = CKEDITOR.dtd.$listItem, i = CKEDITOR.dtd.$list, o = CKEDITOR.TRISTATE_DISABLED, r = CKEDITOR.TRISTATE_OFF; CKEDITOR.plugins.add("indentblock", { requires: "indent", init: function (s) { function a() { l.specificDefinition.apply(this, arguments), this.allowedContent = { "div h1 h2 h3 h4 h5 h6 ol p pre ul": { propertiesOnly: !0, styles: c ? null : "margin-left,margin-right", classes: c || null } }, this.contentTransformations = [["div: splitMarginShorthand"], ["h1: splitMarginShorthand"], ["h2: splitMarginShorthand"], ["h3: splitMarginShorthand"], ["h4: splitMarginShorthand"], ["h5: splitMarginShorthand"], ["h6: splitMarginShorthand"], ["ol: splitMarginShorthand"], ["p: splitMarginShorthand"], ["pre: splitMarginShorthand"], ["ul: splitMarginShorthand"]], this.enterBr && (this.allowedContent.div = !0), this.requiredContent = (this.enterBr ? "div" : "p") + (c ? "(" + c.join(",") + ")" : "{margin-left}"), this.jobs = { 20: { refresh: function (e, i) { var s = i.block || i.blockLimit; if (!s.is(n)) var a = s.getAscendant(n), s = a && i.contains(a) || s; if (s.is(n) && (s = s.getParent()), this.enterBr || this.getContext(i)) { if (c) { var a = c, s = s.$.className.match(this.classNameRegex), l = this.isIndent, a = s ? l ? s[1] != a.slice(-1) : !0 : l; return a ? r : o } return this.isIndent ? r : s ? CKEDITOR[0 >= (parseInt(s.getStyle(t(s)), 10) || 0) ? "TRISTATE_DISABLED" : "TRISTATE_OFF"] : o } return o }, exec: function (t) { var n, o = t.getSelection(), o = o && o.getRanges()[0]; if (n = t.elementPath().contains(i)) e.call(this, n, c); else for (o = o.createIterator(), t = t.config.enterMode, o.enforceRealBlocks = !0, o.enlargeBr = t != CKEDITOR.ENTER_BR; n = o.getNextParagraph(t == CKEDITOR.ENTER_P ? "p" : "div");)n.isReadOnly() || e.call(this, n, c); return !0 } } } } var l = CKEDITOR.plugins.indent, c = s.config.indentClasses; l.registerCommands(s, { indentblock: new a(s, "indentblock", !0), outdentblock: new a(s, "outdentblock") }), CKEDITOR.tools.extend(a.prototype, l.specificDefinition.prototype, { context: { div: 1, dl: 1, h1: 1, h2: 1, h3: 1, h4: 1, h5: 1, h6: 1, ul: 1, ol: 1, p: 1, pre: 1, table: 1 }, classNameRegex: c ? new RegExp("(?:^|\\s+)(" + c.join("|") + ")(?=$|\\s)") : null }) } }) }(), function () { function e(e) { function i(t) { for (var i = o.startContainer, l = o.endContainer; i && !i.getParent().equals(t);)i = i.getParent(); for (; l && !l.getParent().equals(t);)l = l.getParent(); if (!i || !l) return !1; for (var c = i, i = [], d = !1; !d;)c.equals(l) && (d = !0), i.push(c), c = c.getNext(); if (1 > i.length) return !1; for (c = t.getParents(!0), l = 0; l < c.length; l++)if (c[l].getName && a[c[l].getName()]) { t = c[l]; break } for (var c = r.isIndent ? 1 : -1, l = i[0], i = i[i.length - 1], d = CKEDITOR.plugins.list.listToArray(t, s), u = d[i.getCustomData("listarray_index")].indent, l = l.getCustomData("listarray_index"); l <= i.getCustomData("listarray_index"); l++)if (d[l].indent += c, c > 0) { var h = d[l].parent; d[l].parent = new CKEDITOR.dom.element(h.getName(), h.getDocument()) } for (l = i.getCustomData("listarray_index") + 1; l < d.length && d[l].indent > u; l++)d[l].indent += c; if (i = CKEDITOR.plugins.list.arrayToList(d, s, null, e.config.enterMode, t.getDirection()), !r.isIndent) { var p; if ((p = t.getParent()) && p.is("li")) for (var f, c = i.listNode.getChildren(), m = [], l = c.count() - 1; l >= 0; l--)(f = c.getItem(l)) && f.is && f.is("li") && m.push(f) } if (i && i.listNode.replace(t), m && m.length) for (l = 0; l < m.length; l++) { for (f = t = m[l]; (f = f.getNext()) && f.is && f.getName() in a;)CKEDITOR.env.needsNbspFiller && !t.getFirst(n) && t.append(o.document.createText("\xa0")), t.append(f); t.insertAfter(p) } return i && e.fire("contentDomInvalidated"), !0 } for (var o, r = this, s = this.database, a = this.context, l = e.getSelection(), l = (l && l.getRanges()).createIterator(); o = l.getNextRange();) { for (var c = o.getCommonAncestor(); c && (c.type != CKEDITOR.NODE_ELEMENT || !a[c.getName()]);) { if (e.editable().equals(c)) { c = !1; break } c = c.getParent() } if (c || (c = o.startPath().contains(a)) && o.setEndAt(c, CKEDITOR.POSITION_BEFORE_END), !c) { var d = o.getEnclosedNode(); d && d.type == CKEDITOR.NODE_ELEMENT && d.getName() in a && (o.setStartAt(d, CKEDITOR.POSITION_AFTER_START), o.setEndAt(d, CKEDITOR.POSITION_BEFORE_END), c = d) } if (c && o.startContainer.type == CKEDITOR.NODE_ELEMENT && o.startContainer.getName() in a && (d = new CKEDITOR.dom.walker(o), d.evaluator = t, o.startContainer = d.next()), c && o.endContainer.type == CKEDITOR.NODE_ELEMENT && o.endContainer.getName() in a && (d = new CKEDITOR.dom.walker(o), d.evaluator = t, o.endContainer = d.previous()), c) return i(c) } return 0 } function t(e) { return e.type == CKEDITOR.NODE_ELEMENT && e.is("li") } function n(e) { return i(e) && o(e) }
188 var i = CKEDITOR.dom.walker.whitespaces(!0), o = CKEDITOR.dom.walker.bookmark(!1, !0), r = CKEDITOR.TRISTATE_DISABLED, s = CKEDITOR.TRISTATE_OFF; CKEDITOR.plugins.add("indentlist", { requires: "indent", init: function (t) { function n(t) { i.specificDefinition.apply(this, arguments), this.requiredContent = ["ul", "ol"], t.on("key", function (e) { if ("wysiwyg" == t.mode && e.data.keyCode == this.indentKey) { var n = this.getContext(t.elementPath()); !n || this.isIndent && CKEDITOR.plugins.indentList.firstItemInPath(this.context, t.elementPath(), n) || (t.execCommand(this.relatedGlobal), e.cancel()) } }, this), this.jobs[this.isIndent ? 10 : 30] = { refresh: this.isIndent ? function (e, t) { var n = this.getContext(t), i = CKEDITOR.plugins.indentList.firstItemInPath(this.context, t, n); return n && this.isIndent && !i ? s : r } : function (e, t) { return !this.getContext(t) || this.isIndent ? r : s }, exec: CKEDITOR.tools.bind(e, this) } } var i = CKEDITOR.plugins.indent; i.registerCommands(t, { indentlist: new n(t, "indentlist", !0), outdentlist: new n(t, "outdentlist") }), CKEDITOR.tools.extend(n.prototype, i.specificDefinition.prototype, { context: { ol: 1, ul: 1 } }) } }), CKEDITOR.plugins.indentList = {}, CKEDITOR.plugins.indentList.firstItemInPath = function (e, n, i) { var o = n.contains(t); return i || (i = n.contains(e)), i && o && o.equals(i.getFirst(t)) } }(), CKEDITOR.plugins.add("smiley", { requires: "dialog", init: function (e) { e.config.smiley_path = e.config.smiley_path || this.path + "images/", e.addCommand("smiley", new CKEDITOR.dialogCommand("smiley", { allowedContent: "img[alt,height,!src,title,width]", requiredContent: "img" })), e.ui.addButton && e.ui.addButton("Smiley", { label: e.lang.smiley.toolbar, command: "smiley", toolbar: "insert,50" }), CKEDITOR.dialog.add("smiley", this.path + "dialogs/smiley.js") } }), CKEDITOR.config.smiley_images = "regular_smile.png sad_smile.png wink_smile.png teeth_smile.png confused_smile.png tongue_smile.png embarrassed_smile.png omg_smile.png whatchutalkingabout_smile.png angry_smile.png angel_smile.png shades_smile.png devil_smile.png cry_smile.png lightbulb.png thumbs_down.png thumbs_up.png heart.png broken_heart.png kiss.png envelope.png".split(" "), CKEDITOR.config.smiley_descriptions = "smiley;sad;wink;laugh;frown;cheeky;blush;surprise;indecision;angry;angel;cool;devil;crying;enlightened;no;yes;heart;broken heart;kiss;mail".split(";"), function () {
189            function e(e, t) { t = void 0 === t || t; var n; if (t) n = e.getComputedStyle("text-align"); else { for (; (!e.hasAttribute || !e.hasAttribute("align") && !e.getStyle("text-align")) && (n = e.getParent(), n);)e = n; n = e.getStyle("text-align") || e.getAttribute("align") || "" } return n && (n = n.replace(/(?:-(?:moz|webkit)-)?(?:start|auto)/i, "")), !n && t && (n = "rtl" == e.getComputedStyle("direction") ? "right" : "left"), n } function t(e, t, n) { this.editor = e, this.name = t, this.value = n, this.context = "p", t = e.config.justifyClasses; var i = e.config.enterMode == CKEDITOR.ENTER_P ? "p" : "div"; if (t) { switch (n) { case "left": this.cssClassName = t[0]; break; case "center": this.cssClassName = t[1]; break; case "right": this.cssClassName = t[2]; break; case "justify": this.cssClassName = t[3] }this.cssClassRegex = new RegExp("(?:^|\\s+)(?:" + t.join("|") + ")(?=$|\\s)"), this.requiredContent = i + "(" + this.cssClassName + ")" } else this.requiredContent = i + "{text-align}"; this.allowedContent = { "caption div h1 h2 h3 h4 h5 h6 p pre td th li": { propertiesOnly: !0, styles: this.cssClassName ? null : "text-align", classes: this.cssClassName || null } }, e.config.enterMode == CKEDITOR.ENTER_BR && (this.allowedContent.div = !0) } function n(e) { var t = e.editor, n = t.createRange(); n.setStartBefore(e.data.node), n.setEndAfter(e.data.node); for (var i, o = new CKEDITOR.dom.walker(n); i = o.next();)if (i.type == CKEDITOR.NODE_ELEMENT) if (!i.equals(e.data.node) && i.getDirection()) n.setStartAfter(i), o = new CKEDITOR.dom.walker(n); else { var r = t.config.justifyClasses; r && (i.hasClass(r[0]) ? (i.removeClass(r[0]), i.addClass(r[2])) : i.hasClass(r[2]) && (i.removeClass(r[2]), i.addClass(r[0]))), r = i.getStyle("text-align"), "left" == r ? i.setStyle("text-align", "right") : "right" == r && i.setStyle("text-align", "left") } } t.prototype = { exec: function (t) { var n = t.getSelection(), i = t.config.enterMode; if (n) { for (var o, r, s = n.createBookmarks(), a = n.getRanges(), l = this.cssClassName, c = t.config.useComputedState, c = void 0 === c || c, d = a.length - 1; d >= 0; d--)for (o = a[d].createIterator(), o.enlargeBr = i != CKEDITOR.ENTER_BR; r = o.getNextParagraph(i == CKEDITOR.ENTER_P ? "p" : "div");)if (!r.isReadOnly()) { r.removeAttribute("align"), r.removeStyle("text-align"); var u = l && (r.$.className = CKEDITOR.tools.ltrim(r.$.className.replace(this.cssClassRegex, ""))), h = this.state == CKEDITOR.TRISTATE_OFF && (!c || e(r, !0) != this.value); l ? h ? r.addClass(l) : u || r.removeAttribute("class") : h && r.setStyle("text-align", this.value) } t.focus(), t.forceNextSelectionCheck(), n.selectBookmarks(s) } }, refresh: function (t, n) { var i = n.block || n.blockLimit; this.setState("body" != i.getName() && e(i, this.editor.config.useComputedState) == this.value ? CKEDITOR.TRISTATE_ON : CKEDITOR.TRISTATE_OFF) } }, CKEDITOR.plugins.add("justify", {
190                init: function (e) {
191                    if (!e.blockless) {
192                        var i = new t(e, "justifyleft", "left"), o = new t(e, "justifycenter", "center"), r = new t(e, "justifyright", "right"), s = new t(e, "justifyblock", "justify"); e.addCommand("justifyleft", i), e.addCommand("justifycenter", o), e.addCommand("justifyright", r), e.addCommand("justifyblock", s), e.ui.addButton && (e.ui.addButton("JustifyLeft", {
193                            label: e.lang.justify.left, command: "justifyleft", toolbar: "align,10"
194                        }), e.ui.addButton("JustifyCenter", { label: e.lang.justify.center, command: "justifycenter", toolbar: "align,20" }), e.ui.addButton("JustifyRight", { label: e.lang.justify.right, command: "justifyright", toolbar: "align,30" }), e.ui.addButton("JustifyBlock", { label: e.lang.justify.block, command: "justifyblock", toolbar: "align,40" })), e.on("dirChanged", n)
195                    }
196                }
197            })
198        }(), CKEDITOR.plugins.add("menubutton", { requires: "button,menu", onLoad: function () { var e = function (e) { var t = this._, n = t.menu; t.state !== CKEDITOR.TRISTATE_DISABLED && (t.on && n ? n.hide() : (t.previousState = t.state, n || (n = t.menu = new CKEDITOR.menu(e, { panel: { className: "cke_menu_panel", attributes: { "aria-label": e.lang.common.options } } }), n.onHide = CKEDITOR.tools.bind(function () { var n = this.command ? e.getCommand(this.command).modes : this.modes; this.setState(!n || n[e.mode] ? t.previousState : CKEDITOR.TRISTATE_DISABLED), t.on = 0 }, this), this.onMenu && n.addListener(this.onMenu)), this.setState(CKEDITOR.TRISTATE_ON), t.on = 1, setTimeout(function () { n.show(CKEDITOR.document.getById(t.id), 4) }, 0))) }; CKEDITOR.ui.menuButton = CKEDITOR.tools.createClass({ base: CKEDITOR.ui.button, $: function (t) { delete t.panel, this.base(t), this.hasArrow = !0, this.click = e }, statics: { handler: { create: function (e) { return new CKEDITOR.ui.menuButton(e) } } } }) }, beforeInit: function (e) { e.ui.addHandler(CKEDITOR.UI_MENUBUTTON, CKEDITOR.ui.menuButton.handler) } }), CKEDITOR.UI_MENUBUTTON = "menubutton", function () { CKEDITOR.plugins.add("language", { requires: "menubutton", init: function (e) { var t, n, i, o, r = e.config.language_list || ["ar:Arabic:rtl", "fr:French", "es:Spanish"], s = this, a = e.lang.language, l = {}; for (e.addCommand("language", { allowedContent: "span[!lang,!dir]", requiredContent: "span[lang,dir]", contextSensitive: !0, exec: function (e, t) { var n = l["language_" + t]; n && e[n.style.checkActive(e.elementPath(), e) ? "removeStyle" : "applyStyle"](n.style) }, refresh: function (e) { this.setState(s.getCurrentLangElement(e) ? CKEDITOR.TRISTATE_ON : CKEDITOR.TRISTATE_OFF) } }), o = 0; o < r.length; o++)t = r[o].split(":"), n = t[0], i = "language_" + n, l[i] = { label: t[1], langId: n, group: "language", order: o, ltr: "rtl" != ("" + t[2]).toLowerCase(), onClick: function () { e.execCommand("language", this.langId) }, role: "menuitemcheckbox" }, l[i].style = new CKEDITOR.style({ element: "span", attributes: { lang: n, dir: l[i].ltr ? "ltr" : "rtl" } }); l.language_remove = { label: a.remove, group: "language_remove", state: CKEDITOR.TRISTATE_DISABLED, order: l.length, onClick: function () { var t = s.getCurrentLangElement(e); t && e.execCommand("language", t.getAttribute("lang")) } }, e.addMenuGroup("language", 1), e.addMenuGroup("language_remove"), e.addMenuItems(l), e.ui.add("Language", CKEDITOR.UI_MENUBUTTON, { label: a.button, allowedContent: "span[!lang,!dir]", requiredContent: "span[lang,dir]", toolbar: "bidi,30", command: "language", onMenu: function () { var t, n = {}, i = s.getCurrentLangElement(e); for (t in l) n[t] = CKEDITOR.TRISTATE_OFF; return n.language_remove = i ? CKEDITOR.TRISTATE_OFF : CKEDITOR.TRISTATE_DISABLED, i && (n["language_" + i.getAttribute("lang")] = CKEDITOR.TRISTATE_ON), n } }) }, getCurrentLangElement: function (e) { var t = e.elementPath(); e = t && t.elements; var n; if (t) for (var i = 0; i < e.length; i++)t = e[i], !n && "span" == t.getName() && t.hasAttribute("dir") && t.hasAttribute("lang") && (n = t); return n } }) }(), function () { function e(e) { return e.replace(/'/g, "\\$&") } function t(e) { for (var t, n = e.length, i = [], o = 0; n > o; o++)t = e.charCodeAt(o), i.push(t); return "String.fromCharCode(" + i.join(",") + ")" } function n(t, n) { var i, o, r = t.plugins.link, s = r.compiledProtectionFunction.params; o = [r.compiledProtectionFunction.name, "("]; for (var a = 0; a < s.length; a++)r = s[a].toLowerCase(), i = n[r], a > 0 && o.push(","), o.push("'", i ? e(encodeURIComponent(n[r])) : "", "'"); return o.push(")"), o.join("") } function i(e) { e = e.config.emailProtection || ""; var t; return e && "encode" != e && (t = {}, e.replace(/^([^(]+)\(([^)]+)\)$/, function (e, n, i) { t.name = n, t.params = [], i.replace(/[^,\s]+/g, function (e) { t.params.push(e) }) })), t } CKEDITOR.plugins.add("link", { requires: "dialog,fakeobjects", onLoad: function () { function e(e) { return n.replace(/%1/g, "rtl" == e ? "right" : "left").replace(/%2/g, "cke_contents_" + e) } var t = "background:url(" + CKEDITOR.getUrl(this.path + "images" + (CKEDITOR.env.hidpi ? "/hidpi" : "") + "/anchor.png") + ") no-repeat %1 center;border:1px dotted #00f;background-size:16px;", n = ".%2 a.cke_anchor,.%2 a.cke_anchor_empty,.cke_editable.%2 a[name],.cke_editable.%2 a[data-cke-saved-name]{" + t + "padding-%1:18px;
198cursor:auto;}.%2 img.cke_anchor{" + t + "width:16px;min-height:15px;height:1.15em;vertical-align:text-bottom;}"; CKEDITOR.addCss(e("ltr") + e("rtl")) }, init: function (e) { var t = "a[!href]"; CKEDITOR.dialog.isTabEnabled(e, "link", "advanced") && (t = t.replace("]", ",accesskey,charset,dir,id,lang,name,rel,tabindex,title,type,download]{*}(*)")), CKEDITOR.dialog.isTabEnabled(e, "link", "target") && (t = t.replace("]", ",target,onclick]")), e.addCommand("link", new CKEDITOR.dialogCommand("link", { allowedContent: t, requiredContent: "a[href]" })), e.addCommand("anchor", new CKEDITOR.dialogCommand("anchor", { allowedContent: "a[!name,id]", requiredContent: "a[name]" })), e.addCommand("unlink", new CKEDITOR.unlinkCommand), e.addCommand("removeAnchor", new CKEDITOR.removeAnchorCommand), e.setKeystroke(CKEDITOR.CTRL + 76, "link"), e.ui.addButton && (e.ui.addButton("Link", { label: e.lang.link.toolbar, command: "link", toolbar: "links,10" }), e.ui.addButton("Unlink", { label: e.lang.link.unlink, command: "unlink", toolbar: "links,20" }), e.ui.addButton("Anchor", { label: e.lang.link.anchor.toolbar, command: "anchor", toolbar: "links,30" })), CKEDITOR.dialog.add("link", this.path + "dialogs/link.js"), CKEDITOR.dialog.add("anchor", this.path + "dialogs/anchor.js"), e.on("doubleclick", function (t) { var n = CKEDITOR.plugins.link.getSelectedLink(e) || t.data.element; n.isReadOnly() || (n.is("a") ? (t.data.dialog = !n.getAttribute("name") || n.getAttribute("href") && n.getChildCount() ? "link" : "anchor", t.data.link = n) : CKEDITOR.plugins.link.tryRestoreFakeAnchor(e, n) && (t.data.dialog = "anchor")) }, null, null, 0), e.on("doubleclick", function (t) { t.data.dialog in { link: 1, anchor: 1 } && t.data.link && e.getSelection().selectElement(t.data.link) }, null, null, 20), e.addMenuItems && e.addMenuItems({ anchor: { label: e.lang.link.anchor.menu, command: "anchor", group: "anchor", order: 1 }, removeAnchor: { label: e.lang.link.anchor.remove, command: "removeAnchor", group: "anchor", order: 5 }, link: { label: e.lang.link.menu, command: "link", group: "link", order: 1 }, unlink: { label: e.lang.link.unlink, command: "unlink", group: "link", order: 5 } }), e.contextMenu && e.contextMenu.addListener(function (t) { if (!t || t.isReadOnly()) return null; if (t = CKEDITOR.plugins.link.tryRestoreFakeAnchor(e, t), !t && !(t = CKEDITOR.plugins.link.getSelectedLink(e))) return null; var n = {}; return t.getAttribute("href") && t.getChildCount() && (n = { link: CKEDITOR.TRISTATE_OFF, unlink: CKEDITOR.TRISTATE_OFF }), t && t.hasAttribute("name") && (n.anchor = n.removeAnchor = CKEDITOR.TRISTATE_OFF), n }), this.compiledProtectionFunction = i(e) }, afterInit: function (e) { e.dataProcessor.dataFilter.addRules({ elements: { a: function (t) { return t.attributes.name ? t.children.length ? null : e.createFakeParserElement(t, "cke_anchor", "anchor") : null } } }); var t = e._.elementsPath && e._.elementsPath.filters; t && t.push(function (t, n) { return "a" != n || !CKEDITOR.plugins.link.tryRestoreFakeAnchor(e, t) && (!t.getAttribute("name") || t.getAttribute("href") && t.getChildCount()) ? void 0 : "anchor" }) } }); var o = /^javascript:/, r = /^mailto:([^?]+)(?:\?(.+))?$/, s = /subject=([^;?:@&=$,\/]*)/i, a = /body=([^;?:@&=$,\/]*)/i, l = /^#(.*)$/, c = /^((?:http|https|ftp|news):\/\/)?(.*)$/, d = /^(_(?:self|top|parent|blank))$/, u = /^javascript:void\(location\.href='mailto:'\+String\.fromCharCode\(([^)]+)\)(?:\+'(.*)')?\)$/, h = /^javascript:([^(]+)\(([^)]+)\)$/, p = /\s*window.open\(\s*this\.href\s*,\s*(?:'([^']*)'|null)\s*,\s*'([^']*)'\s*\)\s*;\s*return\s*false;*\s*/, f = /(?:^|,)([^=]+)=(\d+|yes|no)/gi, m = { id: "advId", dir: "advLangDir", accessKey: "advAccessKey", name: "advName", lang: "advLangCode", tabindex: "advTabIndex", title: "advTitle", type: "advContentType", "class": "advCSSClasses", charset: "advCharset", style: "advStyles", rel: "advRel" }; CKEDITOR.plugins.link = { getSelectedLink: function (e) { var t = e.getSelection(), n = t.getSelectedElement(); return n && n.is("a") ? n : (t = t.getRanges()[0]) ? (t.shrink(CKEDITOR.SHRINK_TEXT), e.elementPath(t.getCommonAncestor()).contains("a", 1)) : null }, getEditorAnchors: function (e) { for (var t, n = e.editable(), i = n.isInline() && !e.plugins.divarea ? e.document : n, n = i.getElementsByTag("a"), i = i.getElementsByTag("img"), o = [], r = 0; t = n.getItem(r++);)(t.data("cke-saved-name") || t.hasAttribute("name")) && o.push({ name: t.data("cke-saved-name") || t.getAttribute("name"), id: t.getAttribute("id") }); for (r = 0; t = i.getItem(r++);)(t = this.tryRestoreFakeAnchor(e, t)) && o.push({ name: t.getAttribute("name"), id: t.getAttribute("id") }); return o }, fakeAnchor: !0, tryRestoreFakeAnchor: function (e, t) { if (t && t.data("cke-real-element-type") && "anchor" == t.data("cke-real-element-type")) { var n = e.restoreRealElement(t); if (n.data("cke-saved-name")) return n } }, parseLinkAttributes: function (e, t) { var n, i = t && (t.data("cke-saved-href") || t.getAttribute("href")) || "", g = e.plugins.link.compiledProtectionFunction, v = e.config.emailProtection, E = {}; if (i.match(o) && ("encode" == v ? i = i.replace(u, function (e, t, n) { return n = n || "", "mailto:" + String.fromCharCode.apply(String, t.split(",")) + n.replace(/\\'/g, "'") }) : v && i.replace(h, function (e, t, n) { if (t == g.name) { E.type = "email", e = E.email = {}, t = /(^')|('$)/g, n = n.match(/[^,\s]+/g); for (var i, o, r = n.length, s = 0; r > s; s++)i = decodeURIComponent, o = n[s].replace(t, "").replace(/\\'/g, "'"), o = i(o), i = g.params[s].toLowerCase(), e[i] = o; e.address = [e.name, e.domain].join("@") } })), !E.type) if (v = i.match(l)) E.type = "anchor", E.anchor = {}, E.anchor.name = E.anchor.id = v[1]; else if (v = i.match(r)) { n = i.match(s), i = i.match(a), E.type = "email"; var T = E.email = {}; T.address = v[1], n && (T.subject = decodeURIComponent(n[1])), i && (T.body = decodeURIComponent(i[1])) } else i && (n = i.match(c)) && (E.type = "url", E.url = {}, E.url.protocol = n[1], E.url.url = n[2]); if (t) { if (i = t.getAttribute("target")) E.target = { type: i.match(d) ? i : "frame", name: i }; else if (i = (i = t.data("cke-pa-onclick") || t.getAttribute("onclick")) && i.match(p)) for (E.target = { type: "popup", name: i[1] }; v = f.exec(i[2]);)"yes" != v[2] && "1" != v[2] || v[1] in { height: 1, width: 1, top: 1, left: 1 } ? isFinite(v[2]) && (E.target[v[1]] = v[2]) : E.target[v[1]] = !0; null !== t.getAttribute("download") && (E.download = !0); var y, i = {}; for (y in m) (v = t.getAttribute(y)) && (i[m[y]] = v); (y = t.data("cke-saved-name") || i.advName) && (i.advName = y), CKEDITOR.tools.isEmpty(i) || (E.advanced = i) } return E }, getLinkAttributes: function (i, o) { var r = i.config.emailProtection || "", s = {}; switch (o.type) { case "url": var r = o.url && void 0 !== o.url.protocol ? o.url.protocol : "http://", a = o.url && CKEDITOR.tools.trim(o.url.url) || ""; s["data-cke-saved-href"] = 0 === a.indexOf("/") ? a : r + a; break;
198 case "anchor": r = o.anchor && o.anchor.id, s["data-cke-saved-href"] = "#" + (o.anchor && o.anchor.name || r || ""); break; case "email": var l = o.email, a = l.address; switch (r) { case "": case "encode": var c = encodeURIComponent(l.subject || ""), d = encodeURIComponent(l.body || ""), l = []; c && l.push("subject=" + c), d && l.push("body=" + d), l = l.length ? "?" + l.join("&") : "", "encode" == r ? (r = ["javascript:void(location.href='mailto:'+", t(a)], l && r.push("+'", e(l), "'"), r.push(")")) : r = ["mailto:", a, l]; break; default: r = a.split("@", 2), l.name = r[0], l.domain = r[1], r = ["javascript:", n(i, l)] }s["data-cke-saved-href"] = r.join("") }if (o.target) if ("popup" == o.target.type) { for (var r = ["window.open(this.href, '", o.target.name || "", "', '"], u = "resizable status location toolbar menubar fullscreen scrollbars dependent".split(" "), a = u.length, c = function (e) { o.target[e] && u.push(e + "=" + o.target[e]) }, l = 0; a > l; l++)u[l] += o.target[u[l]] ? "=yes" : "=no"; c("width"), c("left"), c("height"), c("top"), r.push(u.join(","), "'); return false;"), s["data-cke-pa-onclick"] = r.join("") } else "notSet" != o.target.type && o.target.name && (s.target = o.target.name); if (o.download && (s.download = ""), o.advanced) { for (var h in m) (r = o.advanced[m[h]]) && (s[h] = r); s.name && (s["data-cke-saved-name"] = s.name) } s["data-cke-saved-href"] && (s.href = s["data-cke-saved-href"]), h = { target: 1, onclick: 1, "data-cke-pa-onclick": 1, "data-cke-saved-name": 1, download: 1 }, o.advanced && CKEDITOR.tools.extend(h, m); for (var p in s) delete h[p]; return { set: s, removed: CKEDITOR.tools.objectKeys(h) } }, showDisplayTextForElement: function (e, t) { var n = { img: 1, table: 1, tbody: 1, thead: 1, tfoot: 1, input: 1, select: 1, textarea: 1 }; return t.widgets && t.widgets.focused ? !1 : !e || !e.getName || !e.is(n) } }, CKEDITOR.unlinkCommand = function () { }, CKEDITOR.unlinkCommand.prototype = { exec: function (e) { var t = new CKEDITOR.style({ element: "a", type: CKEDITOR.STYLE_INLINE, alwaysRemoveElement: 1 }); e.removeStyle(t) }, refresh: function (e, t) { var n = t.lastElement && t.lastElement.getAscendant("a", !0); n && "a" == n.getName() && n.getAttribute("href") && n.getChildCount() ? this.setState(CKEDITOR.TRISTATE_OFF) : this.setState(CKEDITOR.TRISTATE_DISABLED) }, contextSensitive: 1, startDisabled: 1, requiredContent: "a[href]" }, CKEDITOR.removeAnchorCommand = function () { }, CKEDITOR.removeAnchorCommand.prototype = { exec: function (e) { var t, n = e.getSelection(), i = n.createBookmarks(); n && (t = n.getSelectedElement()) && (t.getChildCount() ? t.is("a") : CKEDITOR.plugins.link.tryRestoreFakeAnchor(e, t)) ? t.remove(1) : (t = CKEDITOR.plugins.link.getSelectedLink(e)) && (t.hasAttribute("href") ? (t.removeAttributes({ name: 1, "data-cke-saved-name": 1 }), t.removeClass("cke_anchor")) : t.remove(1)), n.selectBookmarks(i) }, requiredContent: "a[name]" }, CKEDITOR.tools.extend(CKEDITOR.config, { linkShowAdvancedTab: !0, linkShowTargetTab: !0 }) }(), function () { function e(e, t, n) { function i(n) { !(l = d[n ? "getFirst" : "getLast"]()) || l.is && l.isBlockBoundary() || !(c = t.root[n ? "getPrevious" : "getNext"](CKEDITOR.dom.walker.invisible(!0))) || c.is && c.isBlockBoundary({ br: 1 }) || e.document.createElement("br")[n ? "insertBefore" : "insertAfter"](l) } for (var o = CKEDITOR.plugins.list.listToArray(t.root, n), r = [], s = 0; s < t.contents.length; s++) { var a = t.contents[s]; (a = a.getAscendant("li", !0)) && !a.getCustomData("list_item_processed") && (r.push(a), CKEDITOR.dom.element.setMarker(n, a, "list_item_processed", !0)) } for (a = null, s = 0; s < r.length; s++)a = r[s].getCustomData("listarray_index"), o[a].indent = -1; for (s = a + 1; s < o.length; s++)if (o[s].indent > o[s - 1].indent + 1) { for (r = o[s - 1].indent + 1 - o[s].indent, a = o[s].indent; o[s] && o[s].indent >= a;)o[s].indent += r, s++; s-- } var l, c, d = CKEDITOR.plugins.list.arrayToList(o, n, null, e.config.enterMode, t.root.getAttribute("dir")).listNode; i(!0), i(), d.replace(t.root), e.fire("contentDomInvalidated") } function t(e, t) { this.name = e, this.context = this.type = t, this.allowedContent = t + " li", this.requiredContent = t } function n(e, t, n, i) { for (var o, r; o = e[i ? "getLast" : "getFirst"](p);)(r = o.getDirection(1)) !== t.getDirection(1) && o.setAttribute("dir", r), o.remove(), n ? o[i ? "insertBefore" : "insertAfter"](n) : t.append(o, i) } function i(e) { function t(t) { var i = e[t ? "getPrevious" : "getNext"](d); i && i.type == CKEDITOR.NODE_ELEMENT && i.is(e.getName()) && (n(e, i, null, !t), e.remove(), e = i) } t(), t(1) } function o(e) { return e.type == CKEDITOR.NODE_ELEMENT && (e.getName() in CKEDITOR.dtd.$block || e.getName() in CKEDITOR.dtd.$listItem) && CKEDITOR.dtd[e.getName()]["#"] } function r(e, t, o) { e.fire("saveSnapshot"), o.enlarge(CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS); var r = o.extractContents(); t.trim(!1, !0); var a = t.createBookmark(), l = new CKEDITOR.dom.elementPath(t.startContainer), c = l.block, l = l.lastElement.getAscendant("li", 1) || c, h = new CKEDITOR.dom.elementPath(o.startContainer), p = h.contains(CKEDITOR.dtd.$listItem), h 
198= h.contains(CKEDITOR.dtd.$list); for (c ? (c = c.getBogus()) && c.remove() : h && (c = h.getPrevious(d)) && u(c) && c.remove(), (c = r.getLast()) && c.type == CKEDITOR.NODE_ELEMENT && c.is("br") && c.remove(), (c = t.startContainer.getChild(t.startOffset)) ? r.insertBefore(c) : t.startContainer.append(r), p && (r = s(p)) && (l.contains(p) ? (n(r, p.getParent(), p), r.remove()) : l.append(r)); o.checkStartOfBlock() && o.checkEndOfBlock() && (h = o.startPath(), r = h.block, r);)r.is("li") && (l = r.getParent(), r.equals(l.getLast(d)) && r.equals(l.getFirst(d)) && (r = l)), o.moveToPosition(r, CKEDITOR.POSITION_BEFORE_START), r.remove(); o = o.clone(), r = e.editable(), o.setEndAt(r, CKEDITOR.POSITION_BEFORE_END), o = new CKEDITOR.dom.walker(o), o.evaluator = function (e) { return d(e) && !u(e) }, (o = o.next()) && o.type == CKEDITOR.NODE_ELEMENT && o.getName() in CKEDITOR.dtd.$list && i(o), t.moveToBookmark(a), t.select(), e.fire("saveSnapshot") } function s(e) { return (e = e.getLast(d)) && e.type == CKEDITOR.NODE_ELEMENT && e.getName() in a ? e : null } var a = { ol: 1, ul: 1 }, l = CKEDITOR.dom.walker.whitespaces(), c = CKEDITOR.dom.walker.bookmark(), d = function (e) { return !(l(e) || c(e)) }, u = CKEDITOR.dom.walker.bogus(); CKEDITOR.plugins.list = { listToArray: function (e, t, n, i, o) { if (!a[e.getName()]) return []; i || (i = 0), n || (n = []); for (var r = 0, s = e.getChildCount(); s > r; r++) { var l = e.getChild(r); if (l.type == CKEDITOR.NODE_ELEMENT && l.getName() in CKEDITOR.dtd.$list && CKEDITOR.plugins.list.listToArray(l, t, n, i + 1), "li" == l.$.nodeName.toLowerCase()) { var c = { parent: e, indent: i, element: l, contents: [] }; o ? c.grandparent = o : (c.grandparent = e.getParent(), c.grandparent && "li" == c.grandparent.$.nodeName.toLowerCase() && (c.grandparent = c.grandparent.getParent())), t && CKEDITOR.dom.element.setMarker(t, l, "listarray_index", n.length), n.push(c); for (var d, u = 0, h = l.getChildCount(); h > u; u++)d = l.getChild(u), d.type == CKEDITOR.NODE_ELEMENT && a[d.getName()] ? CKEDITOR.plugins.list.listToArray(d, t, n, i + 1, c.grandparent) : c.contents.push(d) } } return n }, arrayToList: function (e, t, n, i, o) { if (n || (n = 0), !e || e.length < n + 1) return null; for (var r, s, l, u = e[n].parent.getDocument(), h = new CKEDITOR.dom.documentFragment(u), p = null, f = n, m = Math.max(e[n].indent, 0), g = null, v = i == CKEDITOR.ENTER_P ? "p" : "div"; ;) { var E = e[f]; if (r = E.grandparent, s = E.element.getDirection(1), E.indent == m) { for (p && e[f].parent.getName() == p.getName() || (p = e[f].parent.clone(!1, 1), o && p.setAttribute("dir", o), h.append(p)), g = p.append(E.element.clone(0, 1)), s != p.getDirection(1) && g.setAttribute("dir", s), r = 0; r < E.contents.length; r++)g.append(E.contents[r].clone(1, 1)); f++ } else if (E.indent == Math.max(m, 0) + 1) E = e[f - 1].element.getDirection(1), f = CKEDITOR.plugins.list.arrayToList(e, null, f, i, E != s ? s : null), !g.getChildCount() && CKEDITOR.env.needsNbspFiller && 7 >= u.$.documentMode && g.append(u.createText("\xa0")), g.append(f.listNode), f = f.nextIndex; else { if (-1 != E.indent || n || !r) return null; a[r.getName()] ? (g = E.element.clone(!1, !0), s != r.getDirection(1) && g.setAttribute("dir", s)) : g = new CKEDITOR.dom.documentFragment(u); var T, y, p = r.getDirection(1) != s, b = E.element, C = b.getAttribute("class"), _ = b.getAttribute("style"), I = g.type == CKEDITOR.NODE_DOCUMENT_FRAGMENT && (i != CKEDITOR.ENTER_BR || p || _ || C), O = E.contents.length; for (r = 0; O > r; r++)if (T = E.contents[r], c(T) && O > 1) I ? y = T.clone(1, 1) : g.append(T.clone(1, 1)); else if (T.type == CKEDITOR.NODE_ELEMENT && T.isBlockBoundary()) { p && !T.getDirection() && T.setAttribute("dir", s), l = T; var D = b.getAttribute("style"); D && l.setAttribute("style", D.replace(/([^;])$/, "$1;") + (l.getAttribute("style") || "")), C && T.addClass(C), l = null, y && (g.append(y), y = null), g.append(T.clone(1, 1)) } else I ? (l || (l = u.createElement(v), g.append(l), p && l.setAttribute("dir", s)), _ && l.setAttribute("style", _), C && l.setAttribute("class", C), y && (l.append(y), y = null), l.append(T.clone(1, 1))) : g.append(T.clone(1, 1)); y && ((l || g).append(y), y = null), g.type == CKEDITOR.NODE_DOCUMENT_FRAGMENT && f != e.length - 1 && (CKEDITOR.env.needsBrFiller && (s = g.getLast()) && s.type == CKEDITOR.NODE_ELEMENT && s.is("br") && s.remove(), (s = g.getLast(d)) && s.type == CKEDITOR.NODE_ELEMENT && s.is(CKEDITOR.dtd.$block) || g.append(u.createElement("br"))), s = g.$.nodeName.toLowerCase(), "div" != s && "p" != s || g.appendBogus(), h.append(g), p = null, f++ } if (l = null, e.length <= f || Math.max(e[f].indent, 0) < m) break } if (t) for (e = h.getFirst(); e;) { if (e.type == CKEDITOR.NODE_ELEMENT && (CKEDITOR.dom.element.clearMarkers(t, e), e.getName() in CKEDITOR.dtd.$listItem && (n = e, u = o = i = void 0, i = n.getDirection()))) { for (o = n.getParent(); o && !(u = o.getDirection());)o = o.getParent(); i == u && n.removeAttribute("dir") } e = e.getNextSourceNode() } return { listNode: h, nextIndex: f } } };
198 var h = /^h[1-6]$/, p = CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_ELEMENT); t.prototype = { exec: function (t) { this.refresh(t, t.elementPath()); var n = t.config, o = t.getSelection(), r = o && o.getRanges(); if (this.state == CKEDITOR.TRISTATE_OFF) { var s = t.editable(); if (s.getFirst(d)) { var l = 1 == r.length && r[0]; (n = l && l.getEnclosedNode()) && n.is && this.type == n.getName() && this.setState(CKEDITOR.TRISTATE_ON) } else n.enterMode == CKEDITOR.ENTER_BR ? s.appendBogus() : r[0].fixBlock(1, n.enterMode == CKEDITOR.ENTER_P ? "p" : "div"), o.selectRanges(r) } for (var n = o.createBookmarks(!0), s = [], c = {}, r = r.createIterator(), u = 0; (l = r.getNextRange()) && ++u;) { var p = l.getBoundaryNodes(), f = p.startNode, m = p.endNode; for (f.type == CKEDITOR.NODE_ELEMENT && "td" == f.getName() && l.setStartAt(p.startNode, CKEDITOR.POSITION_AFTER_START), m.type == CKEDITOR.NODE_ELEMENT && "td" == m.getName() && l.setEndAt(p.endNode, CKEDITOR.POSITION_BEFORE_END), l = l.createIterator(), l.forceBrBreak = this.state == CKEDITOR.TRISTATE_OFF; p = l.getNextParagraph();)if (!p.getCustomData("list_block")) { CKEDITOR.dom.element.setMarker(c, p, "list_block", 1); for (var g, v = t.elementPath(p), f = v.elements, m = 0, v = v.blockLimit, E = f.length - 1; E >= 0 && (g = f[E]); E--)if (a[g.getName()] && v.contains(g)) { v.removeCustomData("list_group_object_" + u), (f = g.getCustomData("list_group_object")) ? f.contents.push(p) : (f = { root: g, contents: [p] }, s.push(f), CKEDITOR.dom.element.setMarker(c, g, "list_group_object", f)), m = 1; break } m || (m = v, m.getCustomData("list_group_object_" + u) ? m.getCustomData("list_group_object_" + u).contents.push(p) : (f = { root: m, contents: [p] }, CKEDITOR.dom.element.setMarker(c, m, "list_group_object_" + u, f), s.push(f))) } } for (g = []; 0 < s.length;)if (f = s.shift(), this.state == CKEDITOR.TRISTATE_OFF) if (a[f.root.getName()]) { for (r = t, u = f, f = c, l = g, m = CKEDITOR.plugins.list.listToArray(u.root, f), v = [], p = 0; p < u.contents.length; p++)E = u.contents[p], (E = E.getAscendant("li", !0)) && !E.getCustomData("list_item_processed") && (v.push(E), CKEDITOR.dom.element.setMarker(f, E, "list_item_processed", !0)); for (var E = u.root.getDocument(), T = void 0, y = void 0, p = 0; p < v.length; p++) { var b = v[p].getCustomData("listarray_index"), T = m[b].parent; T.is(this.type) || (y = E.createElement(this.type), T.copyAttributes(y, { start: 1, type: 1 }), y.removeStyle("list-style-type"), m[b].parent = y) } for (f = CKEDITOR.plugins.list.arrayToList(m, f, null, r.config.enterMode), m = void 0, v = f.listNode.getChildCount(), p = 0; v > p && (m = f.listNode.getChild(p)); p++)m.getName() == this.type && l.push(m); f.listNode.replace(u.root), r.fire("contentDomInvalidated") } else { for (m = t, l = f, p = g, v = l.contents, r = l.root.getDocument(), u = [], 1 == v.length && v[0].equals(l.root) && (f = r.createElement("div"), v[0].moveChildren && v[0].moveChildren(f), v[0].append(f), v[0] = f), l = l.contents[0].getParent(), E = 0; E < v.length; E++)l = l.getCommonAncestor(v[E].getParent()); for (T = m.config.useComputedState, m = f = void 0, T = void 0 === T || T, E = 0; E < v.length; E++)for (y = v[E]; b = y.getParent();) { if (b.equals(l)) { u.push(y), !m && y.getDirection() && (m = 1), y = y.getDirection(T), null !== f && (f = f && f != y ? null : y); break } y = b } if (!(1 > u.length)) { for (v = u[u.length - 1].getNext(), E = r.createElement(this.type), p.push(E), T = p = void 0; u.length;)p = u.shift(), T = r.createElement("li"), y = p, y.is("pre") || h.test(y.getName()) || "false" == y.getAttribute("contenteditable") ? p.appendTo(T) : (p.copyAttributes(T), f && p.getDirection() && (T.removeStyle("direction"), T.removeAttribute("dir")), p.moveChildren(T), p.remove()), T.appendTo(E); f && m && E.setAttribute("dir", f), v ? E.insertBefore(v) : E.appendTo(l) } } else this.state == CKEDITOR.TRISTATE_ON && a[f.root.getName()] && e.call(this, t, f, c); for (E = 0; E < g.length; E++)i(g[E]); CKEDITOR.dom.element.clearAllMarkers(c), o.selectBookmarks(n), t.focus() }, refresh: function (e, t) { var n = t.contains(a, 1), i = t.blockLimit || t.root; n && i.contains(n) ? this.setState(n.is(this.type) ? CKEDITOR.TRISTATE_ON : CKEDITOR.TRISTATE_OFF) : this.setState(CKEDITOR.TRISTATE_OFF) } }, CKEDITOR.plugins.add("list", { requires: "indentlist", init: function (e) { e.blockless || (e.addCommand("numberedlist", new t("numberedlist", "ol")), e.addCommand("bulletedlist", new t("bulletedlist", "ul")), e.ui.addButton && (e.ui.addButton("NumberedList", { label: e.lang.list.numberedlist, command: "numberedlist", directional: !0, toolbar: "list,10" }), e.ui.addButton("BulletedList", { label: e.lang.list.bulletedlist, command: "bulletedlist", directional: !0, toolbar: "list,20" })), e.on("key", function (t) { var n, i = t.data.domEvent.getKey(); if ("wysiwyg" == e.mode && i in { 8: 1, 46: 1 }) { var l = e.getSelection().getRanges()[0], c = l && l.startPath(); if (l && l.collapsed) { var h = 8 == i, p = e.editable(), f = new CKEDITOR.dom.walker(l.clone()); if (f.evaluator = function (e) { return d(e) && !u(e) }, f.guard = function (e, t) { return !(t && e.type == CKEDITOR.NODE_ELEMENT && e.is("table")) }, i = l.clone(), h) { var m; if ((m = c.contains(a)) && l.checkBoundaryOfElement(m, CKEDITOR.START) && (m = m.getParent()) && m.is("li") && (m = s(m)) ? (n = m, m = m.getPrevious(d), i.moveToPosition(m && u(m) ? m : n, CKEDITOR.POSITION_BEFORE_START)) : (f.range.setStartAt(p, CKEDITOR.POSITION_AFTER_START), f.range.setEnd(l.startContainer, l.startOffset), (m = f.previous()) && m.type == CKEDITOR.NODE_ELEMENT && (m.getName() in a || m.is("li")) && (m.is("li") || (f.range.selectNodeContents(m), f.reset(), f.evaluator = o, m = f.previous()), n = m, i.moveToElementEditEnd(n), i.moveToPosition(i.endPath().block, CKEDITOR.POSITION_BEFORE_END))), n) r(e, i, l), t.cancel(); else { var g = c.contains(a); g && l.checkBoundaryOfElement(g, CKEDITOR.START) && (n = g.getFirst(d), l.checkBoundaryOfElement(n, CKEDITOR.START) && (m = g.getPrevious(d), s(n) ? m && (l.moveToElementEditEnd(m), l.select()) : e.execCommand("outde
198nt"), t.cancel())) } } else if (n = c.contains("li")) { if (f.range.setEndAt(p, CKEDITOR.POSITION_BEFORE_END), h = (p = n.getLast(d)) && o(p) ? p : n, c = 0, (m = f.next()) && m.type == CKEDITOR.NODE_ELEMENT && m.getName() in a && m.equals(p) ? (c = 1, m = f.next()) : l.checkBoundaryOfElement(h, CKEDITOR.END) && (c = 2), c && m) { if (l = l.clone(), l.moveToElementEditStart(m), 1 == c && (i.optimize(), !i.startContainer.equals(n))) { for (n = i.startContainer; n.is(CKEDITOR.dtd.$inline);)g = n, n = n.getParent(); g && i.moveToPosition(g, CKEDITOR.POSITION_AFTER_END) } 2 == c && (i.moveToPosition(i.endPath().block, CKEDITOR.POSITION_BEFORE_END), l.endPath().block && l.moveToPosition(l.endPath().block, CKEDITOR.POSITION_AFTER_START)), r(e, i, l), t.cancel() } } else f.range.setEndAt(p, CKEDITOR.POSITION_BEFORE_END), (m = f.next()) && m.type == CKEDITOR.NODE_ELEMENT && m.is(a) && (m = m.getFirst(d), c.block && l.checkStartOfBlock() && l.checkEndOfBlock() ? (c.block.remove(), l.moveToElementEditStart(m), l.select()) : s(m) ? (l.moveToElementEditStart(m), l.select()) : (l = l.clone(), l.moveToElementEditStart(m), r(e, i, l)), t.cancel()); setTimeout(function () { e.selectionChange(1) }) } } })) } }) }(), function () { CKEDITOR.plugins.liststyle = { requires: "dialog,contextmenu", init: function (e) { if (!e.blockless) { var t; t = new CKEDITOR.dialogCommand("numberedListStyle", { requiredContent: "ol", allowedContent: "ol{list-style-type}[start]; li{list-style-type}[value]", contentTransformations: [["ol: listTypeToStyle"]] }), t = e.addCommand("numberedListStyle", t), e.addFeature(t), CKEDITOR.dialog.add("numberedListStyle", this.path + "dialogs/liststyle.js"), t = new CKEDITOR.dialogCommand("bulletedListStyle", { requiredContent: "ul", allowedContent: "ul{list-style-type}", contentTransformations: [["ul: listTypeToStyle"]] }), t = e.addCommand("bulletedListStyle", t), e.addFeature(t), CKEDITOR.dialog.add("bulletedListStyle", this.path + "dialogs/liststyle.js"), e.addMenuGroup("list", 108), e.addMenuItems({ numberedlist: { label: e.lang.liststyle.numberedTitle, group: "list", command: "numberedListStyle" }, bulletedlist: { label: e.lang.liststyle.bulletedTitle, group: "list", command: "bulletedListStyle" } }), e.contextMenu.addListener(function (e) { if (!e || e.isReadOnly()) return null; for (; e;) { var t = e.getName(); if ("ol" == t) return { numberedlist: CKEDITOR.TRISTATE_OFF }; if ("ul" == t) return { bulletedlist: CKEDITOR.TRISTATE_OFF }; e = e.getParent() } return null }) } } }, CKEDITOR.plugins.add("liststyle", CKEDITOR.plugins.liststyle) }(), function () {
199            function e(e, t, n) { return u(t) && u(n) && n.equals(t.getNext(function (e) { return !(G(e) || X(e) || h(e)) })) } function t(e) { this.upper = e[0], this.lower = e[1], this.set.apply(this, e.slice(2)) } function n(e) { var t = e.element; if (t && u(t) && (t = t.getAscendant(e.triggers, !0)) && e.editable.contains(t)) { var n = s(t); if ("true" == n.getAttribute("contenteditable")) return t; if (n.is(e.triggers)) return n } return null } function i(e, t, n) { return y(e, t), y(e, n), e = t.size.bottom, n = n.size.top, e && n ? 0 | (e + n) / 2 : e || n } function o(e, t, n) { return t = t[n ? "getPrevious" : "getNext"](function (t) { return t && t.type == CKEDITOR.NODE_TEXT && !G(t) || u(t) && !h(t) && !d(e, t) }) } function r(e, t, n) { return e > t && n > e } function s(e, t) { if (e.data("cke-editable")) return null; for (t || (e = e.getParent()); e && !e.data("cke-editable");) { if (e.hasAttribute("contenteditable")) return e; e = e.getParent() } return null } function a(e) { var t = e.doc, n = D('<span contenteditable="false" style="' + z + "position:absolute;border-top:1px dashed " + e.boxColor + '"></span>', t), i = CKEDITOR.getUrl(this.path + "images/" + (R.hidpi ? "hidpi/" : "") + "icon" + (e.rtl ? "-rtl" : "") + ".png"); for (I(n, { attach: function () { return this.wrap.getParent() || this.wrap.appendTo(e.editable, !0), this }, lineChildren: [I(D('<span title="' + e.editor.lang.magicline.title + '" contenteditable="false">&#8629;</span>', t), { base: z + "height:17px;width:17px;" + (e.rtl ? "left" : "right") + ":17px;background:url(" + i + ") center no-repeat " + e.boxColor + ";cursor:pointer;" + (R.hc ? "font-size: 15px;line-height:14px;border:1px solid #fff;text-align:center;" : "") + (R.hidpi ? "background-size: 9px 10px;" : ""), looks: ["top:-8px; border-radius: 2px;", "top:-17px; border-radius: 2px 2px 0px 0px;", "top:-1px; border-radius: 0px 0px 2px 2px;"] }), I(D(W, t), { base: U + "left:0px;border-left-color:" + e.boxColor + ";", looks: ["border-width:8px 0 8px 8px;top:-8px", "border-width:8px 0 0 8px;top:-8px", "border-width:0 0 8px 8px;top:0px"] }), I(D(W, t), { base: U + "right:0px;border-right-color:" + e.boxColor + ";", looks: ["border-width:8px 8px 8px 0;top:-8px", "border-width:8px 8px 0 0;top:-8px", "border-width:0 8px 8px 0;top:0px"] })], detach: function () { return this.wrap.getParent() && this.wrap.remove(), this }, mouseNear: function () { y(e, this); var t = e.holdDistance, n = this.size; return !!(n && r(e.mouse.y, n.top - t, n.bottom + t) && r(e.mouse.x, n.left - t, n.right + t)) }, place: function () { var t = e.view, n = e.editable, i = e.trigger, o = i.upper, s = i.lower, a = o || s, l = a.getParent(), c = {}; this.trigger = i, o && y(e, o, !0), s && y(e, s, !0), y(e, l, !0), e.inInlineMode && b(e, !0), l.equals(n) ? (c.left = t.scroll.x, c.right = -t.scroll.x, c.width = "") : (c.left = a.size.left - a.size.margin.left + t.scroll.x - (e.inInlineMode ? t.editable.left + t.editable.border.left : 0), c.width = a.size.outerWidth + a.size.margin.left + a.size.margin.right + t.scroll.x, c.right = ""), o && s ? c.top = o.size.margin.bottom === s.size.margin.top ? 0 | o.size.bottom + o.size.margin.bottom / 2 : o.size.margin.bottom < s.size.margin.top ? o.size.bottom + o.size.margin.bottom : o.size.bottom + o.size.margin.bottom - s.size.margin.top : o ? s || (c.top = o.size.bottom + o.size.margin.bottom) : c.top = s.size.top - s.size.margin.top, i.is($) || r(c.top, t.scroll.y - 15, t.scroll.y + 5) ? (c.top = e.inInlineMode ? 0 : t.scroll.y, this.look($)) : i.is(L) || r(c.top, t.pane.bottom - 5, t.pane.bottom + 15) ? (c.top = e.inInlineMode ? t.editable.height + t.editable.padding.top + t.editable.padding.bottom : t.pane.bottom - 1, this.look(L)) : (e.inInlineMode && (c.top -= t.editable.top + t.editable.border.top), this.look(P)), e.inInlineMode && (c.top--, c.top += t.editable.scroll.top, c.left += t.editable.scroll.left); for (var d in c) c[d] = CKEDITOR.tools.cssLength(c[d]); this.setStyles(c) }, look: function (e) { if (this.oldLook != e) { for (var t, n = this.lineChildren.length; n--;)(t = this.lineChildren[n]).setAttribute("style", t.base + t.looks[0 | e / 2]); this.oldLook = e } }, wrap: new O("span", e.doc) }), t = n.lineChildren.length; t--;)n.lineChildren[t].appendTo(n); n.look(P), n.appendTo(n.wrap), n.unselectable(), n.lineChildren[0].on("mouseup", function (t) { n.detach(), l(e, function (t) { var n = e.line.trigger; t[n.is(K) ? "insertBefore" : "insertAfter"](n.is(K) ? n.lower : n.upper) }, !0), e.editor.focus(), R.ie || e.enterMode == CKEDITOR.ENTER_BR || e.hotNode.scrollIntoView(), t.data.preventDefault(!0) }), n.on("mousedown", function (e) { e.data.preventDefault(!0) }), e.line = n } function l(e, t, n) { var i, o = new CKEDITOR.dom.range(e.doc), r = e.editor; R.ie && e.enterMode == CKEDITOR.ENTER_BR ? i = e.doc.createText(F) : (i = (i = s(e.element, !0)) && i.data("cke-enter-mode") || e.enterMode, i = new O(x[i], e.doc), i.is("br") || e.doc.
199createText(F).appendTo(i)), n && r.fire("saveSnapshot"), t(i), o.moveToPosition(i, CKEDITOR.POSITION_AFTER_START), r.getSelection().selectRanges([o]), e.hotNode = i, n && r.fire("saveSnapshot") } function c(e, t) { return { canUndo: !0, modes: { wysiwyg: 1 }, exec: function () { function i(n) { var i = R.ie && 9 > R.version ? " " : F, o = e.hotNode && e.hotNode.getText() == i && e.element.equals(e.hotNode) && e.lastCmdDirection === !!t; l(e, function (i) { o && e.hotNode && e.hotNode.remove(), i[t ? "insertAfter" : "insertBefore"](n), i.setAttributes({ "data-cke-magicline-hot": 1, "data-cke-magicline-dir": !!t }), e.lastCmdDirection = !!t }), R.ie || e.enterMode == CKEDITOR.ENTER_BR || e.hotNode.scrollIntoView(), e.line.detach() } return function (r) { r = r.getSelection().getStartElement(); var a; if (r = r.getAscendant(q, 1), !m(e, r) && r && !r.equals(e.editable) && !r.contains(e.editable)) { (a = s(r)) && "false" == a.getAttribute("contenteditable") && (r = a), e.element = r, a = o(e, r, !t); var l; u(a) && a.is(e.triggers) && a.is(H) && (!o(e, a, !t) || (l = o(e, a, !t)) && u(l) && l.is(e.triggers)) ? i(a) : (l = n(e, r), u(l) && (o(e, l, !t) ? (r = o(e, l, !t)) && u(r) && r.is(e.triggers) && i(l) : i(l))) } } }() } } function d(e, t) { if (!t || t.type != CKEDITOR.NODE_ELEMENT || !t.$) return !1; var n = e.line; return n.wrap.equals(t) || n.wrap.contains(t) } function u(e) { return e && e.type == CKEDITOR.NODE_ELEMENT && e.$ } function h(e) {
200                if (!u(e)) return !1; var t; return (t = p(e)) || (u(e) ? (t = {
201                    left: 1, right: 1, center: 1
202                }, t = !(!t[e.getComputedStyle("float")] && !t[e.getAttribute("align")])) : t = !1), t
203            } function p(e) { return !!{ absolute: 1, fixed: 1 }[e.getComputedStyle("position")] } function f(e, t) { return u(t) ? t.is(e.triggers) : null } function m(e, t) { if (!t) return !1; for (var n = t.getParents(1), i = n.length; i--;)for (var o = e.tabuList.length; o--;)if (n[i].hasAttribute(e.tabuList[o])) return !0; return !1 } function g(e, t, n) { return (t = t[n ? "getLast" : "getFirst"](function (t) { return e.isRelevant(t) && !t.is(M) })) ? (y(e, t), n ? t.size.top > e.mouse.y : t.size.bottom < e.mouse.y) : !1 } function v(e) { var n = e.editable, i = e.mouse, o = e.view, s = e.triggerOffset; b(e); var a = i.y > (e.inInlineMode ? o.editable.top + o.editable.height / 2 : Math.min(o.editable.height, o.pane.height) / 2), n = n[a ? "getLast" : "getFirst"](function (e) { return !(G(e) || X(e)) }); return n ? (d(e, n) && (n = e.line.wrap[a ? "getPrevious" : "getNext"](function (e) { return !(G(e) || X(e)) })), u(n) && !h(n) && f(e, n) ? (y(e, n), !a && 0 <= n.size.top && r(i.y, 0, n.size.top + s) ? (e = e.inInlineMode || 0 === o.scroll.y ? $ : P, new t([null, n, K, A, e])) : a && n.size.bottom <= o.pane.height && r(i.y, n.size.bottom - s, o.pane.height) ? (e = e.inInlineMode || r(n.size.bottom, o.pane.height - s, o.pane.height) ? L : P, new t([n, null, S, A, e])) : null) : null) : null } function E(e) { var i = e.mouse, s = e.view, a = e.triggerOffset, l = n(e); if (!l) return null; y(e, l); var c, d, a = Math.min(a, 0 | l.size.outerHeight / 2), p = []; if (r(i.y, l.size.top - 1, l.size.top + a)) d = !1; else { if (!r(i.y, l.size.bottom - a, l.size.bottom + 1)) return null; d = !0 } if (h(l) || g(e, l, d) || l.getParent().is(B)) return null; var m = o(e, l, !d); if (m) { if (m && m.type == CKEDITOR.NODE_TEXT) return null; if (u(m)) { if (h(m) || !f(e, m) || m.getParent().is(B)) return null; p = [m, l][d ? "reverse" : "concat"]().concat([N, A]) } } else l.equals(e.editable[d ? "getLast" : "getFirst"](e.isRelevant)) ? (b(e), d && r(i.y, l.size.bottom - a, s.pane.height) && r(l.size.bottom, s.pane.height - a, s.pane.height) ? c = L : r(i.y, 0, l.size.top + a) && (c = $)) : c = P, p = [null, l][d ? "reverse" : "concat"]().concat([d ? S : K, A, c, l.equals(e.editable[d ? "getLast" : "getFirst"](e.isRelevant)) ? d ? L : $ : P]); return 0 in p ? new t(p) : null } function T(e, t, n, i) { for (var o = t.getDocumentPosition(), r = {}, s = {}, a = {}, l = {}, c = Z.length; c--;)r[Z[c]] = parseInt(t.getComputedStyle.call(t, "border-" + Z[c] + "-width"), 10) || 0, a[Z[c]] = parseInt(t.getComputedStyle.call(t, "padding-" + Z[c]), 10) || 0, s[Z[c]] = parseInt(t.getComputedStyle.call(t, "margin-" + Z[c]), 10) || 0; return n && !i || C(e, i), l.top = o.y - (n ? 0 : e.view.scroll.y), l.left = o.x - (n ? 0 : e.view.scroll.x), l.outerWidth = t.$.offsetWidth, l.outerHeight = t.$.offsetHeight, l.height = l.outerHeight - (a.top + a.bottom + r.top + r.bottom), l.width = l.outerWidth - (a.left + a.right + r.left + r.right), l.bottom = l.top + l.outerHeight, l.right = l.left + l.outerWidth, e.inInlineMode && (l.scroll = { top: t.$.scrollTop, left: t.$.scrollLeft }), I({ border: r, padding: a, margin: s, ignoreScroll: n }, l, !0) } function y(e, t, n) { if (!u(t)) return t.size = null; if (t.size) { if (t.size.ignoreScroll == n && t.size.date >
203 new Date - j) return null } else t.size = {}; return I(t.size, T(e, t, n), { date: +new Date }, !0) } function b(e, t) { e.view.editable = T(e, e.editable, t, !0) } function C(e, t) { e.view || (e.view = {}); var n = e.view; if (!(!t && n && n.date > new Date - j)) { var i = e.win, n = i.getScrollPosition(), i = i.getViewPaneSize(); I(e.view, { scroll: { x: n.x, y: n.y, width: e.doc.$.documentElement.scrollWidth - i.width, height: e.doc.$.documentElement.scrollHeight - i.height }, pane: { width: i.width, height: i.height, bottom: i.height + n.y }, date: +new Date }, !0) } } function _(e, n, i, o) { for (var r = o, s = o, a = 0, l = !1, c = !1, d = e.view.pane.height, u = e.mouse; u.y + a < d && 0 < u.y - a && (l || (l = n(r, o)), c || (c = n(s, o)), !l && 0 < u.y - a && (r = i(e, { x: u.x, y: u.y - a })), !c && u.y + a < d && (s = i(e, { x: u.x, y: u.y + a })), !l || !c);)a += 2; return new t([r, s, null, null]) } CKEDITOR.plugins.add("magicline", { init: function (e) { var i, r, s, f = e.config, g = f.magicline_triggerOffset || 30, y = { editor: e, enterMode: f.enterMode, triggerOffset: g, holdDistance: 0 | g * (f.magicline_holdDistance || .5), boxColor: f.magicline_color || "#ff0000", rtl: "rtl" == f.contentsLangDirection, tabuList: ["data-cke-hidden-sel"].concat(f.magicline_tabuList || []), triggers: f.magicline_everywhere ? q : { table: 1, hr: 1, div: 1, ul: 1, ol: 1, dl: 1, form: 1, blockquote: 1 } }; y.isRelevant = function (e) { return u(e) && !d(y, e) && !h(e) }, e.on("contentDom", function () { var u = e.editable(), h = e.document, g = e.window; I(y, { editable: u, inInlineMode: u.isInline(), doc: h, win: g, hotNode: null }, !0), y.boundary = y.inInlineMode ? y.editable : y.doc.getDocumentElement(), u.is(w.$inline) || (y.inInlineMode && !p(u) && u.setStyles({ position: "relative", top: null, left: null }), a.call(this, y), C(y), u.attachListener(e, "beforeUndoImage", function () { y.line.detach() }), u.attachListener(e, "beforeGetData", function () { y.line.wrap.getParent() && (y.line.detach(), e.once("getData", function () { y.line.attach() }, null, null, 1e3)) }, null, null, 0), u.attachListener(y.inInlineMode ? h : h.getWindow().getFrame(), "mouseout", function (t) { if ("wysiwyg" == e.mode) if (y.inInlineMode) { var n = t.data.$.clientX; t = t.data.$.clientY, C(y), b(y, !0); var i = y.view.editable, o = y.view.scroll; n > i.left - o.x && n < i.right - o.x && t > i.top - o.y && t < i.bottom - o.y || (clearTimeout(s), s = null, y.line.detach()) } else clearTimeout(s), s = null, y.line.detach() }), u.attachListener(u, "keyup", function () { y.hiddenMode = 0 }), u.attachListener(u, "keydown", function (t) { if ("wysiwyg" == e.mode) switch (t.data.getKeystroke()) { case 2228240: case 16: y.hiddenMode = 1, y.line.detach() } }), u.attachListener(y.inInlineMode ? u : h, "mousemove", function (t) { if (r = !0, "wysiwyg" == e.mode && !e.readOnly && !s) { var n = { x: t.data.$.clientX, y: t.data.$.clientY }; s = setTimeout(function () { y.mouse = n, s = y.trigger = null, C(y), r && !y.hiddenMode && e.focusManager.hasFocus && !y.line.mouseNear() && (y.element = V(y, !0)) && ((y.trigger = v(y) || E(y) || Y(y)) && !m(y, y.trigger.upper || y.trigger.lower) ? y.line.attach().place() : (y.trigger = null, y.line.detach()), r = !1) }, 30) } }), u.attachListener(g, "scroll", function () { "wysiwyg" == e.mode && (y.line.detach(), R.webkit && (y.hiddenMode = 1, clearTimeout(i), i = setTimeout(function () { y.mouseDown || (y.hiddenMode = 0) }, 50))) }), u.attachListener(k ? h : g, "mousedown", function () { "wysiwyg" == e.mode && (y.line.detach(), y.hiddenMode = 1, y.mouseDown = 1) }), u.attachListener(k ? h : g, "mouseup", function () { y.hiddenMode = 0, y.mouseDown = 0 }), e.addCommand("accessPreviousSpace", c(y)), e.addCommand("accessNextSpace", c(y, !0)), e.setKeystroke([[f.magicline_keystrokePrevious, "accessPreviousSpace"], [f.magicline_keystrokeNext, "accessNextSpace"]]), e.on("loadSnapshot", function () { var t, n, i, o; for (o in { p: 1, br: 1, div: 1 }) for (t = e.document.getElementsByTag(o), i = t.count(); i--;)if ((n = t.getItem(i)).data("cke-magicline-hot")) return y.hotNode = n, void (y.lastCmdDirection = "true" === n.data("cke-magicline-dir")) }
203), this.backdoor = { accessFocusSpace: l, boxTrigger: t, isLine: d, getAscendantTrigger: n, getNonEmptyNeighbour: o, getSize: T, that: y, triggerEdge: E, triggerEditable: v, triggerExpand: Y }) }, this) } }); var I = CKEDITOR.tools.extend, O = CKEDITOR.dom.element, D = O.createFromHtml, R = CKEDITOR.env, k = CKEDITOR.env.ie && 9 > CKEDITOR.env.version, w = CKEDITOR.dtd, x = {}, K = 128, S = 64, N = 32, A = 16, $ = 4, L = 2, P = 1, F = "\xa0", B = w.$listItem, M = w.$tableContent, H = I({}, w.$nonEditable, w.$empty), q = w.$block, j = 100, z = "width:0px;height:0px;padding:0px;margin:0px;display:block;z-index:9999;color:#fff;position:absolute;font-size: 0px;line-height:0px;", U = z + "border-color:transparent;display:block;border-style:solid;", W = "<span>" + F + "</span>"; x[CKEDITOR.ENTER_BR] = "br", x[CKEDITOR.ENTER_P] = "p", x[CKEDITOR.ENTER_DIV] = "div", t.prototype = { set: function (e, t, n) { return this.properties = e + t + (n || P), this }, is: function (e) { return (this.properties & e) == e } }; var V = function () { function e(e, t) { var n = e.$.elementFromPoint(t.x, t.y); return n && n.nodeType ? new CKEDITOR.dom.element(n) : null } return function (t, n, i) { if (!t.mouse) return null; var o = t.doc, r = t.line.wrap; i = i || t.mouse; var s = e(o, i); return n && d(t, s) && (r.hide(), s = e(o, i), r.show()), !s || s.type != CKEDITOR.NODE_ELEMENT || !s.$ || R.ie && 9 > R.version && !t.boundary.equals(s) && !t.boundary.contains(s) ? null : s } }(), G = CKEDITOR.dom.walker.whitespaces(), X = CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_COMMENT), Y = function () { function t(t) { var o, s, a, l = t.element; if (!u(l) || l.contains(t.editable) || l.isReadOnly()) return null; if (a = _(t, function (e, t) { return !t.equals(e) }, function (e, t) { return V(e, !0, t) }, l), o = a.upper, s = a.lower, e(t, o, s)) return a.set(N, 8); if (o && l.contains(o)) for (; !o.getParent().equals(l);)o = o.getParent(); else o = l.getFirst(function (e) { return n(t, e) }); if (s && l.contains(s)) for (; !s.getParent().equals(l);)s = s.getParent(); else s = l.getLast(function (e) { return n(t, e) }); if (!o || !s) return null; if (y(t, o), y(t, s), !r(t.mouse.y, o.size.top, s.size.bottom)) return null; for (var c, d, h, p, l = Number.MAX_VALUE; s && !s.equals(o) && (d = o.getNext(t.isRelevant));)c = Math.abs(i(t, o, d) - t.mouse.y), l > c && (l = c, h = o, p = d), o = d, y(t, o); return h && p && r(t.mouse.y, h.size.top, p.size.bottom) ? (a.upper = h, a.lower = p, a.set(N, 8)) : null } function n(e, t) { return !(t && t.type == CKEDITOR.NODE_TEXT || X(t) || h(t) || d(e, t) || t.type == CKEDITOR.NODE_ELEMENT && t.$ && t.is("br")) } return function (n) { var i, o = t(n); if (i = o) { i = o.upper; var r = o.lower; i = !i || !r || h(r) || h(i) || r.equals(i) || i.equals(r) || r.contains(i) || i.contains(r) ? !1 : !!(f(n, i) && f(n, r) && e(n, i, r)) } return i ? o : null } }(), Z = ["top", "left", "right", "bottom"]
204        }(), CKEDITOR.config.magicline_keystrokePrevious = CKEDITOR.CTRL + CKEDITOR.SH
204IFT + 51, CKEDITOR.config.magicline_keystrokeNext = CKEDITOR.CTRL + CKEDITOR.SHIFT + 52, function () { function e(e) { if (!e || e.type != CKEDITOR.NODE_ELEMENT || "form" != e.getName()) return []; for (var t = [], n = ["style", "className"], i = 0; i < n.length; i++) { var o = e.$.elements.namedItem(n[i]); o && (o = new CKEDITOR.dom.element(o), t.push([o, o.nextSibling]), o.remove()) } return t } function t(e, t) { if (e && e.type == CKEDITOR.NODE_ELEMENT && "form" == e.getName() && 0 < t.length) for (var n = t.length - 1; n >= 0; n--) { var i = t[n][0], o = t[n][1]; o ? i.insertBefore(o) : i.appendTo(e) } } function n(n, i) { var o = e(n), r = {}, s = n.$; return i || (r["class"] = s.className || "", s.className = ""), r.inline = s.style.cssText || "", i || (s.style.cssText = "position: static; overflow: visible"), t(o), r } function i(n, i) { var o = e(n), r = n.$; "class" in i && (r.className = i["class"]), "inline" in i && (r.style.cssText = i.inline), t(o) } function o(e) { if (!e.editable().isInline()) { var t, n = CKEDITOR.instances; for (t in n) { var i = n[t]; "wysiwyg" != i.mode || i.readOnly || (i = i.document.getBody(), i.setAttribute("contentEditable", !1), i.setAttribute("contentEditable", !0)) } e.editable().hasFocus && (e.toolbox.focus(), e.focus()) } } CKEDITOR.plugins.add("maximize", { init: function (e) { function t() { var t = d.getViewPaneSize(); e.resize(t.width, t.height, null, !0) } if (e.elementMode != CKEDITOR.ELEMENT_MODE_INLINE) { var r, s, a, l = e.lang, c = CKEDITOR.document, d = c.getWindow(), u = CKEDITOR.TRISTATE_OFF; e.addCommand("maximize", { modes: { wysiwyg: !CKEDITOR.env.iOS, source: !CKEDITOR.env.iOS }, readOnly: 1, editorFocus: !1, exec: function () { var h = e.container.getFirst(function (e) { return e.type == CKEDITOR.NODE_ELEMENT && e.hasClass("cke_inner") }), p = e.ui.space("contents"); if ("wysiwyg" == e.mode) { var f = e.getSelection(); r = f && f.getRanges(), s = d.getScrollPosition() } else { var m = e.editable().$; r = !CKEDITOR.env.ie && [m.selectionStart, m.selectionEnd], s = [m.scrollLeft, m.scrollTop] } if (this.state == CKEDITOR.TRISTATE_OFF) { for (d.on("resize", t), a = d.getScrollPosition(), f = e.container; f = f.getParent();)f.setCustomData("maximize_saved_styles", n(f)), f.setStyle("z-index", e.config.baseFloatZIndex - 5); p.setCustomData("maximize_saved_styles", n(p, !0)), h.setCustomData("maximize_saved_styles", n(h, !0)), p = { overflow: CKEDITOR.env.webkit ? "" : "hidden", width: 0, height: 0 }, c.getDocumentElement().setStyles(p), !CKEDITOR.env.gecko && c.getDocumentElement().setStyle("position", "fixed"), CKEDITOR.env.gecko && CKEDITOR.env.quirks || c.getBody().setStyles(p), CKEDITOR.env.ie ? setTimeout(function () { d.$.scrollTo(0, 0) }, 0) : d.$.scrollTo(0, 0), h.setStyle("position", CKEDITOR.env.gecko && CKEDITOR.env.quirks ? "fixed" : "absolute"), h.$.offsetLeft, h.setStyles({ "z-index": e.config.baseFloatZIndex - 5, left: "0px", top: "0px" }), h.addClass("cke_maximized"), t(), p = h.getDocumentPosition(), h.setStyles({ left: -1 * p.x + "px", top: -1 * p.y + "px" }), CKEDITOR.env.gecko && o(e) } else if (this.state == CKEDITOR.TRISTATE_ON) { d.removeListener("resize", t); for (var f = [p, h], g = 0; g < f.length; g++)i(f[g], f[g].getCustomData("maximize_saved_styles")), f[g].removeCustomData("maximize_saved_styles"); for (f = e.container; f = f.getParent();)i(f, f.getCustomData("maximize_saved_styles")), f.removeCustomData("maximize_saved_styles"); CKEDITOR.env.ie ? setTimeout(function () { d.$.scrollTo(a.x, a.y) }, 0) : d.$.scrollTo(a.x, a.y), h.removeClass("cke_maximized"), CKEDITOR.env.webkit && (h.setStyle("display", "inline"), setTimeout(function () { h.setStyle("display", "block") }, 0)), e.fire("resize", { outerHeight: e.container.$.offsetHeight, contentsHeight: p.$.offsetHeight, outerWidth: e.container.$.offsetWidth }) } this.toggleState(), (f = this.uiItems[0]) && (p = this.state == CKEDITOR.TRISTATE_OFF ? l.maximize.maximize : l.maximize.minimize, f = CKEDITOR.document.getById(f._.id), f.getChild(1).setHtml(p), f.setAttribute("title", p), f.setAttribute("href", 'javascript:void("' + p + '");')), "wysiwyg" == e.mode ? r ? (CKEDITOR.env.gecko && o(e), e.getSelection().selectRanges(r), (m = e.getSelection().getStartElement()) && m.scrollIntoView(!0)) : d.$.scrollTo(s.x, s.y) : (r && (m.selectionStart = r[0], m.selectionEnd = r[1]), m.scrollLeft = s[0], m.scrollTop = s[
2041]), r = s = null, u = this.state, e.fire("maximize", this.state) }, canUndo: !1 }), e.ui.addButton && e.ui.addButton("Maximize", { label: l.maximize.maximize, command: "maximize", toolbar: "tools,10" }), e.on("mode", function () { var t = e.getCommand("maximize"); t.setState(t.state == CKEDITOR.TRISTATE_DISABLED ? CKEDITOR.TRISTATE_DISABLED : u) }, null, null, 100) } } }) }(), CKEDITOR.plugins.add("newpage", { init: function (e) { e.addCommand("newpage", { modes: { wysiwyg: 1, source: 1 }, exec: function (e) { var t = this; e.setData(e.config.newpage_html || "", function () { e.focus(), setTimeout(function () { e.fire("afterCommandExec", { name: "newpage", command: t }), e.selectionChange() }, 200) }) }, async: !0 }), e.ui.addButton && e.ui.addButton("NewPage", { label: e.lang.newpage.toolbar, command: "newpage", toolbar: "document,20" }) } }), function () { function e(e) { return { "aria-label": e, "class": "cke_pagebreak", contenteditable: "false", "data-cke-display-name": "pagebreak", "data-cke-pagebreak": 1, style: "page-break-after: always", title: e } } CKEDITOR.plugins.add("pagebreak", { requires: "fakeobjects", onLoad: function () { var e = ("background:url(" + CKEDITOR.getUrl(this.path + "images/pagebreak.gif") + ") no-repeat center center;clear:both;width:100%;border-top:#999 1px dotted;border-bottom:#999 1px dotted;padding:0;height:7px;cursor:default;").replace(/;/g, " !important;"); CKEDITOR.addCss("div.cke_pagebreak{" + e + "}") }, init: function (e) { e.blockless || (e.addCommand("pagebreak", CKEDITOR.plugins.pagebreakCmd), e.ui.addButton && e.ui.addButton("PageBreak", { label: e.lang.pagebreak.toolbar, command: "pagebreak", toolbar: "insert,70" }), CKEDITOR.env.webkit && e.on("contentDom", function () { e.document.on("click", function (t) { t = t.data.getTarget(), t.is("div") && t.hasClass("cke_pagebreak") && e.getSelection().selectElement(t) }) })) }, afterInit: function (t) { function n(n) { CKEDITOR.tools.extend(n.attributes, e(t.lang.pagebreak.alt), !0), n.children.length = 0 } var i = t.dataProcessor, o = i && i.dataFilter, i = i && i.htmlFilter, r = /page-break-after\s*:\s*always/i, s = /display\s*:\s*none/i; i && i.addRules({ attributes: { "class": function (e, t) { var n = e.replace("cke_pagebreak", ""); if (n != e) { var i = CKEDITOR.htmlParser.fragment.fromHtml('<span style="display: none;">&nbsp;</span>').children[0]; t.children.length = 0, t.add(i), i = t.attributes, delete i["aria-label"], delete i.contenteditable, delete i.title } return n } } }, { applyToAll: !0, priority: 5 }), o && o.addRules({ elements: { div: function (e) { if (e.attributes["data-cke-pagebreak"]) n(e); else if (r.test(e.attributes.style)) { var t = e.children[0]; t && "span" == t.name && s.test(t.attributes.style) && n(e) } } } }) } }), CKEDITOR.plugins.pagebreakCmd = { exec: function (t) { var n = t.document.createElement("div", { attributes: e(t.lang.pagebreak.alt) }); t.insertElement(n) }, context: "div", allowedContent: { div: { styles: "!page-break-after" }, span: { match: function (e) { return (e = e.parent) && "div" == e.name && e.styles && e.styles["page-break-after"] }, styles: "display" } }, requiredContent: "div{page-break-after}" } }(), function () { var e = { canUndo: !1, async: !0, exec: function (t) { t.getClipboardData({ title: t.lang.pastetext.title }, function (n) { n && t.fire("paste", { type: "text", dataValue: n.dataValue, method: "paste", dataTransfer: CKEDITOR.plugins.clipboard.initPasteDataTransfer() }), t.fire("afterCommandExec", { name: "pastetext", command: e, returnValue: !!n }) }) } }; CKEDITOR.plugins.add("pastetext", { requires: "clipboard", init: function (t) { t.addCommand("pastetext", e), t.ui.addButton && t.ui.addButton("PasteText", { label: t.lang.pastetext.button, command: "pastetext", toolbar: "clipboard,40" }), t.config.forcePasteAsPlainText && t.on("beforePaste", function (e) { "html" != e.data.type && (e.data.type = "text") }), t.on("pasteState", function (e) { t.getCommand("pastetext").setState(e.data) }) } }) }(), function () { function e(e, t, n) { var i = CKEDITOR.cleanWord; return i ? n() : (e = CKEDITOR.getUrl(e.config.pasteFromWordCleanupFile || t + "filter/default.js"), CKEDITOR.scriptLoader.load(e, n, null, !0)), !i } function t(e) { e.data.type = "html" } CKEDITOR.plugins.add("pastefromword", { requires: "clipboard", init: function (n) { var i = 0, o = this.path; n.addCommand("pastefromword", { canUndo: !1, async: !0, exec: function (e) { var n = this; i = 1, e.once("beforePaste", t), e.getClipboardData({ title: e.lang.pastefromword.title }, function (t) { t && e.fire("paste", { type: "html", dataValue: t.dataValue, method: "paste", dataTransfer: CKEDITOR.plugins.clipboard.initPasteDataTransfer() }), e.fire("afterCommandExec", { name: "pastefromword", command: n, returnValue: !!t }) }) } }), n.ui.addButton && n.ui.addButton("PasteFromWord", { label: n.lang.pastefromword.toolbar, command: "pastefromword", toolbar: "clipboard,50" }), n.on("pasteState", function (e) { n.getCommand("pastefromword").setState(e.data) }), n.on("paste", function (t) { var r = t.data, s = r.dataValue, a = /(class=\"?Mso|style=\"[^\"]*\bmso\-|w:WordDocument|<o:\w+>|<\/font>)/, l = { dataValue: s }; if (s && (i || a.test(s)) && (!1 !== n.fire("pasteFromWord", l) || i)) { r.dontFilter = !0; var c = e(n, o, function () { c ? n.fire("paste", r) : (!n.config.pasteFromWordPromptCleanup || i || confirm(n.lang.pastefromword.confirmCleanup)) && (l.dataValue = CKEDITOR.cleanWord(l.dataValue, n), n.fire("afterPasteFromWord", l), r.dataValue = l.dataValue), i = 0 }); c && t.cancel() } }, null, null, 3) } }) }(), function () { var e, t = { modes: { wysiwyg: 1, source: 1 }, canUndo: !1, readOnly: 1, exec: function (t) { var n, i = t.config, o = i.baseHref ? '<base href="' + i.baseHref + '"/>' : ""; if (i.fullPage) n = t.getData().replace(/<head>/, "$&" + o).replace(/[^>]*(?=<\/title>)/, "$& &mdash; " + t.lang.preview.preview); else { var i = "<body ", r = t.document && t.document.getBody(); r && (r.getAttribute("id") && (i += 'id="' + r.getAttribute("id") + '" '), r.getAttribute("class") && (i += 'class="' + r.getAttribute("class") + '" ')), i += ">", n = t.config.docType + '<html dir="' + t.config.contentsLangDirection + '"><head>' + o + "<title>" + t.lang.preview.preview + "</title>" + CKEDITOR.tools.buildStyleHtml(t.config.contentsCss) + "</head>" + i + t.getData() + "</body></html>" } o = 640, i = 420, r = 80; try { var s = window.screen, o = Math.round(.8 * s.width), i = Math.round(.7 * s.height), r = Math.round(.1 * s.width) } catch (a) { } if (!1 === t.fire("contentPreview", t = { dataValue: n })) return !1; var l, s = ""; return CKEDITOR.env.ie && (window._cke_htmlToLoad = t.dataValue, l = "javascript:void( (function(){document.open();" + ("(" + CKEDITOR.tools.fixDomain + ")();").replace(/\/\/.*?\n/g, "").replace(/parent\./g, "window.opener.") + "document.write( window.opener._cke_htmlToLoad );document.close();window.opener._cke_htmlToLoad = null;})() )", s = ""), CKEDITOR.env.gecko && (window._cke_htmlToLoad = t.dataValue, s = CKEDITOR.getUrl(e + "preview.html")), s = window.open(s, null, "toolbar=yes,location=no,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width=" 
204+ o + ",height=" + i + ",left=" + r), CKEDITOR.env.ie && s && (s.location = l), CKEDITOR.env.ie || CKEDITOR.env.gecko || (l = s.document, l.open(), l.write(t.dataValue), l.close()), !0 } }; CKEDITOR.plugins.add("preview", { init: function (n) { n.elementMode != CKEDITOR.ELEMENT_MODE_INLINE && (e = this.path, n.addCommand("preview", t), n.ui.addButton && n.ui.addButton("Preview", { label: n.lang.preview.preview, command: "preview", toolbar: "document,40" })) } }) }(), CKEDITOR.plugins.add("print", { init: function (e) { e.elementMode != CKEDITOR.ELEMENT_MODE_INLINE && (e.addCommand("print", CKEDITOR.plugins.print), e.ui.addButton && e.ui.addButton("Print", { label: e.lang.print.toolbar, command: "print", toolbar: "document,50" })) } }), CKEDITOR.plugins.print = { exec: function (e) { CKEDITOR.env.gecko ? e.window.$.print() : e.document.$.execCommand("Print") }, canUndo: !1, readOnly: 1, modes: { wysiwyg: 1 } }, CKEDITOR.plugins.add("removeformat", { init: function (e) { e.addCommand("removeFormat", CKEDITOR.plugins.removeformat.commands.removeformat), e.ui.addButton && e.ui.addButton("RemoveFormat", { label: e.lang.removeformat.toolbar, command: "removeFormat", toolbar: "cleanup,10" }) } }), CKEDITOR.plugins.removeformat = { commands: { removeformat: { exec: function (e) { for (var t, n = e._.removeFormatRegex || (e._.removeFormatRegex = new RegExp("^(?:" + e.config.removeFormatTags.replace(/,/g, "|") + ")$", "i")), i = e._.removeAttributes || (e._.removeAttributes = e.config.removeFormatAttributes.split(",")), o = CKEDITOR.plugins.removeformat.filter, r = e.getSelection().getRanges(), s = r.createIterator(), a = function (e) { return e.type == CKEDITOR.NODE_ELEMENT }; t = s.getNextRange();) { t.collapsed || t.enlarge(CKEDITOR.ENLARGE_ELEMENT); var l = t.createBookmark(), c = l.startNode, d = l.endNode, u = function (t) { for (var i, r = e.elementPath(t), s = r.elements, a = 1; (i = s[a]) && !i.equals(r.block) && !i.equals(r.blockLimit); a++)n.test(i.getName()) && o(e, i) && t.breakParent(i) }; if (u(c), d) for (u(d), c = c.getNextSourceNode(!0, CKEDITOR.NODE_ELEMENT); c && !c.equals(d);)if (c.isReadOnly()) { if (c.getPosition(d) & CKEDITOR.POSITION_CONTAINS) break; c = c.getNext(a) } else u = c.getNextSourceNode(!1, CKEDITOR.NODE_ELEMENT), "img" == c.getName() && c.data("cke-realelement") || !o(e, c) || (n.test(c.getName()) ? c.remove(1) : (c.removeAttributes(i), e.fire("removeFormatCleanup", c))), c = u; t.moveToBookmark(l) } e.forceNextSelectionCheck(), e.getSelection().selectRanges(r) } } }, filter: function (e, t) { for (var n = e._.removeFormatFilters || [], i = 0; i < n.length; i++)if (!1 === n[i](t)) return !1; return !0 } }, CKEDITOR.editor.prototype.addRemoveFormatFilter = function (e) { this._.removeFormatFilters || (this._.removeFormatFilters = []), this._.removeFormatFilters.push(e) }, CKEDITOR.config.removeFormatTags = "b,big,cite,code,del,dfn,em,font,i,ins,kbd,q,s,samp,small,span,strike,strong,sub,sup,tt,u,var", CKEDITOR.config.removeFormatAttributes = "class,style,lang,width,height,align,hspace,valign", function () { var e = { readOnly: 1, exec: function (e) { if (e.fire("save") && (e = e.element.$.form)) try { e.submit() } catch (t) { e.submit.click && e.submit.click() } } }; CKEDITOR.plugins.add("save", { init: function (t) { t.elementMode == CKEDITOR.ELEMENT_MODE_REPLACE && (t.addCommand("save", e).modes = { wysiwyg: !!t.element.$.form }, t.ui.addButton && t.ui.addButton("Save", { label: t.lang.save.toolbar, command: "save", toolbar: "document,10" })) } }) }(), function () { CKEDITOR.plugins.add("selectall", { init: function (e) { e.addCommand("selectAll", { modes: { wysiwyg: 1, source: 1 }, exec: function (e) { var t = e.editable(); if (t.is("textarea")) e = t.$, CKEDITOR.env.ie ? e.createTextRange().execCommand("SelectAll") : (e.selectionStart = 0, e.selectionEnd = e.value.length), e.focus(); else { if (t.is("body")) e.document.$.execCommand("SelectAll", !1, null); else { var n = e.createRange(); n.selectNodeContents(t), n.select() } e.forceNextSelectionCheck(), e.selectionChange() } }, canUndo: !1 }), e.ui.addButton && e.ui.addButton("SelectAll", { label: e.lang.selectall.toolbar, command: "selectAll", toolbar: "selection,10" }) } }) }(), function () { var e = { readOnly: 1, preserveState: !0, editorFocus: !1, exec: function (e) { this.toggleState(), this.refresh(e) }, refresh: function (e) { if (e.document) { var t = this.state != CKEDITOR.TRISTATE_ON || e.elementMode == CKEDITOR.ELEMENT_MODE_INLINE && !e.focusManager.hasFocus ? "removeClass" : "attachClass"; e.editable()[t]("cke_show_blocks") } } }; CKEDITOR.plugins.add("showblocks", { onLoad: function () { var e, t, n, i, o, r, s = "p div pre address blockquote h1 h2 h3 h4 h5 h6".split(" "), a = CKEDITOR.getUrl(this.path), l = !(CKEDITOR.env.ie && 9 > CKEDITOR.env.version), c = l ? ":not([contenteditable=false]):not(.cke_show_blocks_off)" : ""; for (e = t = n = i = ""; o = s.pop();)r = s.length ? "," : "", e += ".cke_show_blocks " + o + c + r, n += ".cke_show_blocks.cke_contents_ltr " + o + c + r, i += ".cke_show_blocks.cke_contents_rtl " + o + c + r, t += ".cke_show_blocks " + o + c + "{background-image:url(" + CKEDITOR.getUrl(a + "images/block_" + o + ".png") + ")}"; CKEDITOR.addCss((e + "{background-repeat:no-repeat;border:1px dotted gray;padding-top:8px}").concat(t, n + "{background-position:top left;padding-left:8px}", i + "{background-position:top right;padding-right:8px}")), l || CKEDITOR.addCss(".cke_show_blocks [contenteditable=false],.cke_show_blocks .cke_show_blocks_off{border:none;padding-top:0;background-image:none}.cke_show_blocks.cke_contents_rtl [contenteditable=false],.cke_show_blocks.cke_contents_rtl .cke_show_blocks_off{padding-right:0}.cke_show_blocks.cke_contents_ltr [contenteditable=false],.cke_show_blocks.cke_contents_ltr .cke_show_blocks_off{padding-left:0}") }, init: function (t) { function n() { i.refresh(t) } if (!t.blockless) { var i = t.addCommand("showblocks", e); i.canUndo = !1, t.config.startupOutlineBlocks && i.setState(CKEDITOR.TRISTATE_ON), t.ui.addButton && t.ui.addButton("ShowBlocks", { label: t.lang.showblocks.toolbar, command: "showblocks", toolbar: "tools,20" }), t.on("mode", function () { i.state != CKEDITOR.TRISTATE_DISABLED && i.refresh(t) }), t.elementMode == CKEDITOR.ELEMENT_MODE_INLINE && (t.on("focus", n), t.on("blur", n)), t.on("contentDom", function () { i.state != CKEDITOR.TRISTATE_DISABLED && i.refresh(t) }) } } }) }(), function () { var e = { preserveState: !0, editorFocus: !1, readOnly: 1, exec: function (e) { this.toggleState(), this.refresh(e) }, refresh: function (e) { if (e.document) { var t = this.state == CKEDITOR.TRISTATE_ON ? "attachClass" : "removeClass"; e.editable()[t]("cke_show_borders") } } }; CKEDITOR.plugins.add("showborders", { modes: { wysiwyg: 1 }, onLoad: function () { var e; e = (CKEDITOR.env.ie6Compat ? [".%1 table.%2,", ".%1 table.%2 td, .%1 table.%2 th", "{", "border : #d3d3d3 1px dotted", "}"] : ".%1 table.%2,;.%1 table.%2 > tr > td, .%1 table.%2 > tr > th,;.%1 table.%2 > tbody > tr > td, .%1 table.%2 > tbody > tr > th,;.%1 table.%2 > thead > tr > td, .%1 table.%2 > thead > tr > th,;.%1 table.%2 > tfoot > tr > td, .%1 table.%2 > tfoot > tr > th;{;border : #d3d3d3 1px dotted;}".split(";")).join("").replace(/%2/g, "cke_show_border").replace(/%1/g, "cke_show_borders "), CKEDITOR.addCss(e) }, init: function (t) { var n = t.addCommand("showborders", e); n.canUndo = !1, !1 !== t.config.startupShowBorders && n.setState(CKEDITOR.TRISTATE_ON), t.on("mode", function () { n.state != CKEDITOR.TRISTATE_DISABLED && n.refresh(t) }, null, null, 100), t.on("contentDom", function () { n.state != CKEDITOR.TRISTATE_DISABLED && n.refresh(t) }), t.on("removeFormatCleanup", function (e) { e = e.data, t.getCommand("showborders").state == CKEDITOR.TRISTATE_ON && e.is("table") && (!e.hasAttribute("border") || 0 >= parseInt(e.getAttribute("border"), 10)) && e.addClass("cke_show_border") }) }, afterInit: function (e) { var t = e.dataProcessor; e = t && t.dataFilter, t = t && t.htmlFilter, e && e.addRules({ elements: { table: function (e) { e = e.attributes; var t = e["class"], n = parseInt(e.border, 10); n && !(0 >= n) || t && -1 != t.indexOf("cke_show_border") || (e["class"] = (t || "") + " cke_show_border") } } }), t && t.addRules({ elements: { table: function (e) { e = e.attributes; var t = e["class"]; t && (e["class"] = t.replace("cke_show_border", "").replace(/\s{2}/, " ").replace(/^\s+|\s+$/, "")) } } }) } }), CKEDITOR.on("dialogDefinition", function (e) { var t = e.data.name; "table" != t && "tableProperties" != t || (e = e.data.definition, t = e.getContents("info").get("txtBorder"), t.commit = CKEDITOR.tools.override(t.commit, function (e) { return function (t, n) { e.apply(this, arguments); var i = parseInt(this.getValue(), 10); n[!i || 0 >= i ? "addClass" : "removeClass"]("cke_show_border") } }
204), (e = (e = e.getContents("advanced")) && e.get("advCSSClasses")) && (e.setup = CKEDITOR.tools.override(e.setup, function (e) { return function () { e.apply(this, arguments), this.setValue(this.getValue().replace(/cke_show_border/, "")) } }), e.commit = CKEDITOR.tools.override(e.commit, function (e) { return function (t, n) { e.apply(this, arguments), parseInt(n.getAttribute("border"), 10) || n.addClass("cke_show_border") } }))) }) }(), function () { CKEDITOR.plugins.add("sourcearea", { init: function (t) { function n() { var e = o && this.equals(CKEDITOR.document.getActive()); this.hide(), this.setStyle("height", this.getParent().$.clientHeight + "px"), this.setStyle("width", this.getParent().$.clientWidth + "px"), this.show(), e && this.focus() } if (t.elementMode != CKEDITOR.ELEMENT_MODE_INLINE) { var i = CKEDITOR.plugins.sourcearea; t.addMode("source", function (i) { var o = t.ui.space("contents").getDocument().createElement("textarea"); o.setStyles(CKEDITOR.tools.extend({ width: CKEDITOR.env.ie7Compat ? "99%" : "100%", height: "100%", resize: "none", outline: "none", "text-align": "left" }, CKEDITOR.tools.cssVendorPrefix("tab-size", t.config.sourceAreaTabSize || 4))), o.setAttribute("dir", "ltr"), o.addClass("cke_source").addClass("cke_reset").addClass("cke_enable_context_menu"), t.ui.space("contents").append(o), o = t.editable(new e(t, o)), o.setData(t.getData(1)), CKEDITOR.env.ie && (o.attachListener(t, "resize", n, o), o.attachListener(CKEDITOR.document.getWindow(), "resize", n, o), CKEDITOR.tools.setTimeout(n, 0, o)), t.fire("ariaWidget", this), i() }), t.addCommand("source", i.commands.source), t.ui.addButton && t.ui.addButton("Source", { label: t.lang.sourcearea.toolbar, command: "source", toolbar: "mode,10" }), t.on("mode", function () { t.getCommand("source").setState("source" == t.mode ? CKEDITOR.TRISTATE_ON : CKEDITOR.TRISTATE_OFF) }); var o = CKEDITOR.env.ie && 9 == CKEDITOR.env.version } } }); var e = CKEDITOR.tools.createClass({ base: CKEDITOR.editable, proto: { setData: function (e) { this.setValue(e), this.status = "ready", this.editor.fire("dataReady") }, getData: function () { return this.getValue() }, insertHtml: function () { }, insertElement: function () { }, insertText: function () { }, setReadOnly: function (e) { this[(e ? "set" : "remove") + "Attribute"]("readOnly", "readonly") }, detach: function () { e.baseProto.detach.call(this), this.clearCustomData(), this.remove() } } }) }(), CKEDITOR.plugins.sourcearea = { commands: { source: { modes: { wysiwyg: 1, source: 1 }, editorFocus: !1, readOnly: 1, exec: function (e) { "wysiwyg" == e.mode && e.fire("saveSnapshot"), e.getCommand("source").setState(CKEDITOR.TRISTATE_DISABLED), e.setMode("source" == e.mode ? "wysiwyg" : "source") }, canUndo: !1 } } }, CKEDITOR.plugins.add("specialchar", { availableLangs: { af: 1, ar: 1, bg: 1, ca: 1, cs: 1, cy: 1, da: 1, de: 1, "de-ch": 1, el: 1, en: 1, "en-gb": 1, eo: 1, es: 1, et: 1, eu: 1, fa: 1, fi: 1, fr: 1, "fr-ca": 1, gl: 1, he: 1, hr: 1, hu: 1, id: 1, it: 1, ja: 1, km: 1, ko: 1, ku: 1, lt: 1, lv: 1, nb: 1, nl: 1, no: 1, oc: 1, pl: 1, pt: 1, "pt-br": 1, ru: 1, si: 1, sk: 1, sl: 1, sq: 1, sv: 1, th: 1, tr: 1, tt: 1, ug: 1, uk: 1, vi: 1, zh: 1, "zh-cn": 1 }, requires: "dialog", init: function (e) { var t = this; CKEDITOR.dialog.add("specialchar", this.path + "dialogs/specialchar.js"), e.addCommand("specialchar", { exec: function () { var n = e.langCode, n = t.availableLangs[n] ? n : t.availableLangs[n.replace(/-.*/, "")] ? n.replace(/-.*/, "") : "en"; CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(t.path + "dialogs/lang/" + n + ".js"), function () { CKEDITOR.tools.extend(e.lang.specialchar, t.langEntries[n]), e.openDialog("specialchar") }) }, modes: { wysiwyg: 1 }, canUndo: !1 }), e.ui.addButton && e.ui.addButton("SpecialChar", { label: e.lang.specialchar.toolbar, command: "specialchar", toolbar: "insert,50" }) } }), CKEDITOR.config.specialChars = "! &quot; # $ % &amp; ' ( ) * + - . / 0 1 2 3 4 5 6 7 8 9 : ; &lt; = &gt; ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~ &euro; &lsquo; &rsquo; &ldquo; &rdquo; &ndash; &mdash; &iexcl; &cent; &pound; &curren; &yen; &brvbar; &sect; &uml; &copy; &ordf; &laquo; &not; &reg; &macr; &deg; &sup2; &sup3; &acute; &micro; &para; &middot; &cedil; &sup1; &ordm; &raquo; &frac14; &frac12; &frac34; &iquest; &Agrave; &Aacute; &Acirc; &Atilde; &Auml; &Aring; &AElig; &Ccedil; &Egrave; &Eacute; &Ecirc; &Euml; &Igrave; &Iacute; &Icirc; &Iuml; &ETH; &Ntilde; &Ograve; &Oacute; &Ocirc; &Otilde; &Ouml; &times; &Oslash; &Ugrave; &Uacute; &Ucirc; &Uuml; &Yacute; &THORN; &szlig; &agrave; &aacute; &acirc; &atilde; &auml; &aring; &aelig; &ccedil; &egrave; &eacute; &ecirc; &euml; &igrave; &iacute; &icirc; &iuml; &eth; &ntilde; &ograve; &oacute; &ocirc; &otilde; &ouml; &divide; &oslash; &ugrave; &uacute; &ucirc; &uuml; &yacute; &thorn; &yuml; &OElig; &oelig; &#372; &#374 &#373 &#375; &sbquo; &#8219; &bdquo; &hellip; &trade; &#9658; &bull; &rarr; &rArr; &hArr; &diams; &asymp;".split(" "), CKEDITOR.plugins.add("scayt", {
205            requires: "menubutton,dialog", tabToOpen: null, dialogName: "scaytDialog", onLoad: function (e) { CKEDITOR.plugins.scayt.onLoadTimestamp = (new Date).getTime(), "moono-lisa" == (CKEDITOR.skinName || e.config.skin) && CKEDITOR.document.appendStyleSheet(this.path + "skins/" + CKEDITOR.skin.name + "/scayt.css") }, init: function (e) {
206                var t = this, n = CKEDITOR.plugins.scayt; this.bindEvents(e), this.parseConfig(e), this.addRule(e), CKEDITOR.dialog.add(this.dialogName, CKEDITOR.getUrl(this.path + "dialogs/options.js")), this.addMenuItems(e); var i = e.lang.scayt, o = CKEDITOR.env; e.ui.add("Scayt", CKEDITOR.UI_MENUBUTTON, {
207                    label: i.text_title, title: e.plugins.wsc ? e.lang.wsc.title : i.text_title, modes: { wysiwyg: !(o.ie && (8 > o.version || o.quirks)) }, toolbar: "spellchecker,20", refresh: function () { var t = e.ui.instances.Scayt.getState(); e.scayt && (t = n.state.scayt[e.name] ? CKEDITOR.TRISTATE_ON : CKEDITOR.TRISTATE_OFF), e.fire("scaytButtonState", t) }, onRender: function () {
208                        var t = this; e.on("scaytButtonState", function (e) { void 0 !== typeof e.data && t.setState(e.data) })
209                    }, onMenu: function () { var t = e.scayt; return e.getMenuItem("scaytToggle").label = e.lang.scayt[t && n.state.scayt[e.name] ? "btn_disable" : "btn_enable"], t = { scaytToggle: CKEDITOR.TRISTATE_OFF, scaytOptions: t ? CKEDITOR.TRISTATE_OFF : CKEDITOR.TRISTATE_DISABLED, scaytLangs: t ? CKEDITOR.TRISTATE_OFF : CKEDITOR.TRISTATE_DISABLED, scaytDict: t ? CKEDITOR.TRISTATE_OFF : CKEDITOR.TRISTATE_DISABLED, scaytAbout: t ? CKEDITOR.TRISTATE_OFF : CKEDITOR.TRISTATE_DISABLED, WSC: e.plugins.wsc ? CKEDITOR.TRISTATE_OFF : CKEDITOR.TRISTATE_DISABLED }, e.config.scayt_uiTabs[0] || delete t.scaytOptions, e.config.scayt_uiTabs[1] || delete t.scaytLangs, e.config.scayt_uiTabs[2] || delete t.scaytDict, t }
210                }), e.contextMenu && e.addMenuItems && (e.contextMenu.addListener(function () { var n, i, o = e.scayt; return o && (i = o.getSelectionNode()) && (n = t.menuGenerator(e, i), o.showBanner("." + e.contextMenu._.definition.panel.className.split(" ").join(" ."))), n }), e.contextMenu._.onHide = CKEDITOR.tools.override(e.contextMenu._.onHide, function (t) { return function () { var n = e.scayt; return n && n.hideBanner(), t.apply(this) } }))
211            }, addMenuItems: function (e) { var t = this, n = CKEDITOR.plugins.scayt; e.addMenuGroup("scaytButton"); for (var i = e.config.scayt_contextMenuItemsOrder.split("|"), o = 0; o < i.length; o++)i[o] = "scayt_" + i[o];
211 if ((i = ["grayt_description", "grayt_suggest", "grayt_control"].concat(i)) && i.length) for (o = 0; o < i.length; o++)e.addMenuGroup(i[o], o - 10); e.addCommand("scaytToggle", { exec: function (e) { var t = e.scayt; n.state.scayt[e.name] = !n.state.scayt[e.name], !0 === n.state.scayt[e.name] ? t || n.createScayt(e) : t && n.destroy(e) } }), e.addCommand("scaytAbout", { exec: function (e) { e.scayt.tabToOpen = "about", e.lockSelection(), e.openDialog(t.dialogName) } }), e.addCommand("scaytOptions", { exec: function (e) { e.scayt.tabToOpen = "options", e.lockSelection(), e.openDialog(t.dialogName) } }), e.addCommand("scaytLangs", { exec: function (e) { e.scayt.tabToOpen = "langs", e.lockSelection(), e.openDialog(t.dialogName) } }), e.addCommand("scaytDict", { exec: function (e) { e.scayt.tabToOpen = "dictionaries", e.lockSelection(), e.openDialog(t.dialogName) } }), i = { scaytToggle: { label: e.lang.scayt.btn_enable, group: "scaytButton", command: "scaytToggle" }, scaytAbout: { label: e.lang.scayt.btn_about, group: "scaytButton", command: "scaytAbout" }, scaytOptions: { label: e.lang.scayt.btn_options, group: "scaytButton", command: "scaytOptions" }, scaytLangs: { label: e.lang.scayt.btn_langs, group: "scaytButton", command: "scaytLangs" }, scaytDict: { label: e.lang.scayt.btn_dictionaries, group: "scaytButton", command: "scaytDict" } }, e.plugins.wsc && (i.WSC = { label: e.lang.wsc.toolbar, group: "scaytButton", onClick: function () { var t = CKEDITOR.plugins.scayt, n = e.scayt, i = e.elementMode == CKEDITOR.ELEMENT_MODE_INLINE ? e.container.getText() : e.document.getBody().getText(); (i = i.replace(/\s/g, "")) ? (n && t.state.scayt[e.name] && n.setMarkupPaused && n.setMarkupPaused(!0), e.lockSelection(), e.execCommand("checkspell")) : alert("Nothing to check!") } }), e.addMenuItems(i) }, bindEvents: function (e) { var t = CKEDITOR.plugins.scayt, n = e.elementMode == CKEDITOR.ELEMENT_MODE_INLINE, i = function () { t.destroy(e) }, o = function () { !t.state.scayt[e.name] || e.readOnly || e.scayt || t.createScayt(e) }, r = function () { var t = e.editable(); t.attachListener(t, "focus", function (t) { CKEDITOR.plugins.scayt && !e.scayt && setTimeout(o, 0), t = CKEDITOR.plugins.scayt && CKEDITOR.plugins.scayt.state.scayt[e.name] && e.scayt; var i, r; if ((n || t) && e._.savedSelection) { t = e._.savedSelection.getSelectedElement(), t = !t && e._.savedSelection.getRanges(); for (var s = 0; s < t.length; s++)r = t[s], "string" == typeof r.startContainer.$.nodeValue && (i = r.startContainer.getText().length, (i < r.startOffset || i < r.endOffset) && e.unlockSelection(!1)) } }, this, null, -10) }, s = function () { n ? e.config.scayt_inlineModeImmediateMarkup ? o() : (e.on("blur", function () { setTimeout(i, 0) }), e.on("focus", o), e.focusManager.hasFocus && o()) : o(), r(); var t = e.editable(); t.attachListener(t, "mousedown", function (t) { t = t.data.getTarget(); var n = e.widgets && e.widgets.getByElement(t); n && (n.wrapper = t.getAscendant(function (e) { return e.hasAttribute("data-cke-widget-wrapper") }, !0)) }, this, null, -10) }; e.on("contentDom", s), e.on("beforeCommandExec", function (n) { var i = e.scayt, o = null, r = !1, s = !0; n.data.name in t.options.disablingCommandExec && "wysiwyg" == e.mode ? i && (t.destroy(e), e.fire("scaytButtonState", CKEDITOR.TRISTATE_DISABLED)) : "bold" !== n.data.name && "italic" !== n.data.name && "underline" !== n.data.name && "strike" !== n.data.name && "subscript" !== n.data.name && "superscript" !== n.data.name && "enter" !== n.data.name && "cut" !== n.data.name && "language" !== n.data.name || !i || ("cut" === n.data.name && (s = !1, r = !0), "language" === n.data.name && (o = (o = e.plugins.language.getCurrentLangElement(e)) && o.$, r = !0), e.fire("reloadMarkupScayt", { removeOptions: { removeInside: s, forceBookmark: r, selectionNode: o }, timeout: 0 })) }), e.on("beforeSetMode", function (n) { "source" == n.data && ((n = e.scayt) && (t.destroy(e), e.fire("scaytButtonState", CKEDITOR.TRISTATE_DISABLED)), e.document && e.document.getBody().removeAttribute("_jquid")) }), e.on("afterCommandExec", function (n) { "wysiwyg" != e.mode || "undo" != n.data.name && "redo" != n.data.name || setTimeout(function () { t.reloadMarkup(e.scayt) }, 250) }), e.on("readOnly", function (n) { var i; n && (i = e.scayt, !0 === n.editor.readOnly ? i && i.fire("removeMarkupInDocument", {}) : i ? t.reloadMarkup(i) : "wysiwyg" == n.editor.mode && !0 === t.state.scayt[n.editor.name] && (t.createScayt(e), n.editor.fire("scaytButtonState", CKEDITOR.TRISTATE_ON))) }), e.on("beforeDestroy", i), e.on("setData", function () { i(), (e.elementMode == CKEDITOR.ELEMENT_MODE_INLINE || e.plugins.divarea) && s() }, this, null, 50), e.on("reloadMarkupScayt", function (n) { var i = n.data && n.data.removeOptions; n = n.data && n.data.timeout; var o = e.scayt; o && setTimeout(function () { o.removeMarkupInSelectionNode(i), t.reloadMarkup(o) }, n || 0) }), e.on("insertElement", function () { e.fire("reloadMarkupScayt", { removeOptions: { forceBookmark: !0 } }) }, this, null, 50), e.on("insertHtml", function () { e.fire("reloadMarkupScayt") }, this, null, 50), e.on("insertText", function () { e.fire("reloadMarkupScayt") }, this, null, 50), e.on("scaytDialogShown", function (t) { t.data.selectPage(e.scayt.tabToOpen) }) }, parseConfig: function (e) { var t = CKEDITOR.plugins.scayt; if (t.replaceOldOptionsNames(e.config), "boolean" != typeof e.config.scayt_autoStartup && (e.config.scayt_autoStartup = !1), t.state.scayt[e.name] = e.config.scayt_autoStartup, "boolean" != typeof e.config.grayt_autoStartup && (e.config.grayt_autoStartup = !1), "boolean" != typeof e.config.scayt_inlineModeImmediateMarkup && (e.config.scayt_inlineModeImmediateMarkup = !1), t.state.grayt[e.name] = e.config.grayt_autoStartup, e.config.scayt_contextCommands || (e.config.scayt_contextCommands = "ignore|ignoreall|add"), e.config.scayt_contextMenuItemsOrder || (e.config.scayt_contextMenuItemsOrder = "suggest|moresuggest|control"), e.config.scayt_sLang || (e.config.scayt_sLang = "en_US"), (void 0 === e.config.scayt_maxSuggestions || "number" != typeof e.config.scayt_maxSuggestions || 0 > e.config.scayt_maxSuggestions) && (e.config.scayt_maxSuggestions = 5), (void 0 === e.config.scayt_minWordLength || "number" != typeof e.config.scayt_minWordLength || 1 > e.config.scayt_minWordLength) && (e.config.scayt_minWordLength = 4), void 0 !== e.config.scayt_customDictionaryIds && "string" == typeof e.config.scayt_customDictionaryIds || (e.config.scayt_customDictionaryIds = ""), void 0 !== e.config.scayt_userDictionaryName && "string" == typeof e.config.scayt_userDictionaryName || (e.config.scayt_userDictionaryName = null), "string" == typeof e.config.scayt_uiTabs && 3 === e.config.scayt_uiTabs.split(",").length) { var n = [], i = []; e.config.scayt_uiTabs = e.config.scayt_uiTabs.split(","), CKEDITOR.tools.search(e.config.scayt_uiTabs, function (e) { 1 === Number(e) || 0 === Number(e) ? (i.push(!0), n.push(Number(e))) : i.push(!1) }), null === CKEDITOR.tools.search(i, !1) ? e.config.scayt_uiTabs = n : e.config.scayt_uiTabs = [1, 1, 1] } else e.config.scayt_uiTabs = [1, 1, 1]; if ("string" != typeof e.config.scayt_serviceProtocol && (e.config.scayt_serviceProtocol = null), "string" != typeof e.config.scayt_serviceHost && (e.config.scayt_serviceHost = null), "string" != typeof e.config.scayt_servicePort && (e.config.scayt_servicePort = null), "string" != typeof e.config.scayt_servicePath && (e.config.scayt_servicePath = null), e.config.scayt_moreSuggestions || (e.config.scayt_moreSuggestions = "on"), "string" != typeof e.config.scayt_customerId && (e.config.scayt_customerId = "1:WvF0D4-UtPqN1-43nkD4-NKvUm2-daQqk3-LmNiI-z7Ysb4-mwry24-T8YrS3-Q2tpq2"), "string" != typeof e.config.scayt_srcUrl && (t = document.location.protocol, t = -1 != t.search(/https?:/) ? t : "http:", e.config.scayt_srcUrl = t + "//svc.webspellchecker.net/spellcheck31/lf/scayt3/ckscayt/ckscayt.js"), "boolean" != typeof CKEDITOR.config.scayt_handleCheckDirty && (CKEDITOR.config.scayt_handleCheckDirty = !0), "boolean" != typeof CKEDITOR.config.scayt_handleUndoRedo && (CKEDITOR.config.scayt_handleUndoRedo = !0), CKEDITOR.config.scayt_handleUndoRedo = CKEDITOR.plugins.undo ? CKEDITOR.config.scayt_handleUndoRedo : !1, "boolean" != typeof e.config.scayt_multiLanguageMode && (e.config.scayt_multiLanguageMode = !1), "object" != typeof e.config.scayt_multiLanguageStyles && (e.config.scayt_multiLanguageStyles = {}), e.config.scayt_ignoreAllCapsWords && "boolean" != typeof e.config.scayt_ignoreAllCapsWords && (e.config.scayt_ignoreAllCapsWords = !1), e.config.scayt_ignoreDomainNames && "boolean" != typeof e.config.scayt_ignoreDomainNames && (e.config.scayt_ignoreDomainNames = !1), e.config.scayt_ignoreWordsWithMixedCases && "boolean" != typeof e.config.scayt_ignoreWordsWithMixedCases && (e.config.scayt_ignoreWordsWithMixedCases = !1), e.config.scayt_ignoreWordsWithNumbers && "boolean" != typeof e.config.scayt_ignoreWordsWithNumbers && (e.config.scayt_ignoreWordsWithNumbers = !1), e.config.scayt_disableOptionsStorage) { var t = CKEDITOR.tools.isArray(e.config.scayt_disableOptionsStorage) ? e.config.scayt_disableOptionsStorage : "string" == typeof e.config.scayt_disableOptionsStorage ? [e.config.scayt_disableOptionsStorage] : void 0, o = "all options lang ignore-all-caps-words ignore-domain-names ignore-words-with-mixed-cases ignore-words-with-numbers".split(" "), r = ["lang", "ignore-all-caps-words", "ignore-domain-names", "ignore-words-with-mixed-cases", "ignore-words-with-numbers"], s = CKEDITOR.tools.search, a = CKEDITOR.tools.indexOf; e.config.scayt_disableOptionsStorage = function (e) { for (var t = [], n = 0; n < e.length; n++) { var i = e[n], l = !!s(e, "options"); if (!s(o, i) || l && s(r, function (e) { return "lang" === e ? !1 : void 0 })) return; if (s(r, i) && r.splice(a(r, i), 1), "all" === i || l && s(e, "lang")) return []; "options" === i && (r = ["lang"]) } return t = t.concat(r) }(t) } }, addRule: function (e) { var t = CKEDITOR.plugins.scayt, n = e.dataProcessor, i = n && n.htmlFilter, o = e._.elementsPath && e._.elementsPath.filters, n = n && n.dataFilter, r = e.addRemoveFormatFilter, s = function (n) { return e.scayt && (n.hasAttribute(t.options.data_attribute_name) || n.hasAttribute(t.options.problem_grammar_data_attribute)) ? !1 : void 0 }, a = function (n) { var i = !0; return e.scayt && (n.hasAttribute(t.options.data_attribute_name) || n.hasAttribute(t.options.problem_grammar_data_attribute)) && (i = !1), i }; o && o.push(s), n && n.addRules({ elements: { span: function (e) { var n = e.hasClass(t.o
211ptions.misspelled_word_class) && e.attributes[t.options.data_attribute_name], i = e.hasClass(t.options.problem_grammar_class) && e.attributes[t.options.problem_grammar_data_attribute]; return t && (n || i) && delete e.name, e } } }), i && i.addRules({ elements: { span: function (e) { var n = e.hasClass(t.options.misspelled_word_class) && e.attributes[t.options.data_attribute_name], i = e.hasClass(t.options.problem_grammar_class) && e.attributes[t.options.problem_grammar_data_attribute]; return t && (n || i) && delete e.name, e } } }), r && r.call(e, a) }, scaytMenuDefinition: function (e) { var t = this; return e = e.scayt, { scayt: { scayt_ignore: { label: e.getLocal("btn_ignore"), group: "scayt_control", order: 1, exec: function (e) { e.scayt.ignoreWord() } }, scayt_ignoreall: { label: e.getLocal("btn_ignoreAll"), group: "scayt_control", order: 2, exec: function (e) { e.scayt.ignoreAllWords() } }, scayt_add: { label: e.getLocal("btn_addWord"), group: "scayt_control", order: 3, exec: function (e) { var t = e.scayt; setTimeout(function () { t.addWordToUserDictionary() }, 10) } }, scayt_option: { label: e.getLocal("btn_options"), group: "scayt_control", order: 4, exec: function (e) { e.scayt.tabToOpen = "options", e.lockSelection(), e.openDialog(t.dialogName) }, verification: function (e) { return 1 == e.config.scayt_uiTabs[0] } }, scayt_language: { label: e.getLocal("btn_langs"), group: "scayt_control", order: 5, exec: function (e) { e.scayt.tabToOpen = "langs", e.lockSelection(), e.openDialog(t.dialogName) }, verification: function (e) { return 1 == e.config.scayt_uiTabs[1] } }, scayt_dictionary: { label: e.getLocal("btn_dictionaries"), group: "scayt_control", order: 6, exec: function (e) { e.scayt.tabToOpen = "dictionaries", e.lockSelection(), e.openDialog(t.dialogName) }, verification: function (e) { return 1 == e.config.scayt_uiTabs[2] } }, scayt_about: { label: e.getLocal("btn_about"), group: "scayt_control", order: 7, exec: function (e) { e.scayt.tabToOpen = "about", e.lockSelection(), e.openDialog(t.dialogName) } } }, grayt: { grayt_problemdescription: { label: "Grammar problem description", group: "grayt_description", order: 1, state: CKEDITOR.TRISTATE_DISABLED, exec: function () { } }, grayt_ignore: { label: e.getLocal("btn_ignore"), group: "grayt_control", order: 2, exec: function (e) { e.scayt.ignorePhrase() } } } } }, buildSuggestionMenuItems: function (e, t, n) { var i = {}, o = {}, r = n ? "word" : "phrase", s = n ? "startGrammarCheck" : "startSpellCheck", a = e.scayt; if (0 < t.length && "no_any_suggestions" !== t[0]) if (n) for (n = 0; n < t.length; n++) { var l = "scayt_suggest_" + CKEDITOR.plugins.scayt.suggestions[n].replace(" ", "_"); e.addCommand(l, this.createCommand(CKEDITOR.plugins.scayt.suggestions[n], r, s)), n < e.config.scayt_maxSuggestions ? (e.addMenuItem(l, { label: t[n], command: l, group: "scayt_suggest", order: n + 1 }), i[l] = CKEDITOR.TRISTATE_OFF) : (e.addMenuItem(l, { label: t[n], command: l, group: "scayt_moresuggest", order: n + 1 }), o[l] = CKEDITOR.TRISTATE_OFF, "on" === e.config.scayt_moreSuggestions && (e.addMenuItem("scayt_moresuggest", { label: a.getLocal("btn_moreSuggestions"), group: "scayt_moresuggest", order: 10, getItems: function () { return o } }), i.scayt_moresuggest = CKEDITOR.TRISTATE_OFF)) } else for (n = 0; n < t.length; n++)l = "grayt_suggest_" + CKEDITOR.plugins.scayt.suggestions[n].replace(" ", "_"), e.addCommand(l, this.createCommand(CKEDITOR.plugins.scayt.suggestions[n], r, s)), e.addMenuItem(l, { label: t[n], command: l, group: "grayt_suggest", order: n + 1 }), i[l] = CKEDITOR.TRISTATE_OFF; else i.no_scayt_suggest = CKEDITOR.TRISTATE_DISABLED, e.addCommand("no_scayt_suggest", { exec: function () { } }), e.addMenuItem("no_scayt_suggest", { label: a.getLocal("btn_noSuggestions") || "no_scayt_suggest", command: "no_scayt_suggest", group: "scayt_suggest", order: 0 }); return i }, menuGenerator: function (e, t) { var n, i, o = e.scayt, r = this.scaytMenuDefinition(e), s = {}, a = e.config.scayt_contextCommands.split("|"), l = t.getAttribute(o.getLangAttribute()) || o.getLang(); if (n = o.isScaytNode(t), i = o.isGraytNode(t), n ? (r = r.scayt, s = t.getAttribute(o.getScaytNodeAttributeName()), o.fire("getSuggestionsList", { lang: l, word: s }), s = this.buildSuggestionMenuItems(e, CKEDITOR.plugins.scayt.suggestions, n)) : i && (r = r.grayt, s = t.getAttribute(o.getGraytNodeAttributeName()), i = o.getProblemDescriptionText(s, l), r.grayt_problemdescription && i && (r.grayt_problemdescription.label = i), o.fire("getGrammarSuggestionsList", { lang: l, phrase: s }), s = this.buildSuggestionMenuItems(e, CKEDITOR.plugins.scayt.suggestions, n)), n && "off" == e.config.scayt_contextCommands) return s; for (var c in r) n && -1 == CKEDITOR.tools.indexOf(a, c.replace("scayt_", "")) && "all" != e.config.scayt_contextCommands || (s[c] = "undefined" != typeof r[c].state ? r[c].state : CKEDITOR.TRISTATE_OFF, "function" != typeof r[c].verification || r[c].verification(e) || delete s[c], e.addCommand(c, { exec: r[c].exec }), e.addMenuItem(c, { label: e.lang.scayt[r[c].label] || r[c].label, command: c, group: r[c].group, order: r[c].order })); return s }, createCommand: function (e, t, n) { return { exec: function (i) { i = i.scayt; var o = {}; o[t] = e, i.replaceSelectionNode(o), "startGrammarCheck" === n && i.removeMarkupInSelectionNode({ grammarOnly: !0 }), i.fire(n) } } }
212        }), CKEDITOR.plugins.scayt = { charsToObserve: [{ charName: "cke-fillingChar", charCode: function () { var e, t = CKEDITOR.version.match(/^\d(\.\d*)*/), t = t && t[0]; if (t) { e = "4.5.7"; var n, t = t.replace(/\./g, ""); e = e.replace(/\./g, ""), n = t.length - e.length, n = n >= 0 ? n : 0, e = parseInt(t) >= parseInt(e) * Math.pow(10, n) } return e ? Array(7).join(String.fromCharCode(8203)) : String.fromCharCode(8203) }() }], onLoadTimestamp: "", state: { scayt: {}, grayt: {} }, warningCounter: 0, suggestions: [], options: { disablingCommandExec: { source: !0, newpage: !0, templates: !0 }, data_attribute_name: "data-scayt-word", misspelled_word_class: "scayt-misspell-word", problem_grammar_data_attribute: "data-grayt-phrase", problem_grammar_class: "gramm-problem" }, backCompatibilityMap: { scayt_service_protocol: "scayt_serviceProtocol", scayt_service_host: "scayt_serviceHost", scayt_service_port: "scayt_servicePort", scayt_service_path: "scayt_servicePath", scayt_customerid: "scayt_customerId" }, alarmCompatibilityMessage: function () { 5 > this.warningCounter && (console.warn("Note: You are using latest version of SCAYT plug-in. It is recommended to upgrade WebSpell
212Checker.net application to version v4.8.3.Contact us by e-mail at [email protected]."), this.warningCounter += 1) }, reloadMarkup: function (e) { var t; e && (t = e.getScaytLangList(), e.reloadMarkup ? e.reloadMarkup() : (this.alarmCompatibilityMessage(), t && t.ltr && t.rtl && e.fire("startSpellCheck, startGrammarCheck"))) }, replaceOldOptionsNames: function (e) { for (var t in e) t in this.backCompatibilityMap && (e[this.backCompatibilityMap[t]] = e[t], delete e[t]) }, createScayt: function (e) { var t = this, n = CKEDITOR.plugins.scayt; this.loadScaytLibrary(e, function (e) { function i(e) { return new SCAYT.CKSCAYT(e, function () { }, function () { }) } var o = e.window && e.window.getFrame() || e.editable(); if (o) { o = { lang: e.config.scayt_sLang, container: o.$, customDictionary: e.config.scayt_customDictionaryIds, userDictionaryName: e.config.scayt_userDictionaryName, localization: e.langCode, customer_id: e.config.scayt_customerId, debug: e.config.scayt_debug, data_attribute_name: t.options.data_attribute_name, misspelled_word_class: t.options.misspelled_word_class, problem_grammar_data_attribute: t.options.problem_grammar_data_attribute, problem_grammar_class: t.options.problem_grammar_class, "options-to-restore": e.config.scayt_disableOptionsStorage, focused: e.editable().hasFocus, ignoreElementsRegex: e.config.scayt_elementsToIgnore, minWordLength: e.config.scayt_minWordLength, multiLanguageMode: e.config.scayt_multiLanguageMode, multiLanguageStyles: e.config.scayt_multiLanguageStyles, graytAutoStartup: n.state.grayt[e.name], charsToObserve: n.charsToObserve }, e.config.scayt_serviceProtocol && (o.service_protocol = e.config.scayt_serviceProtocol), e.config.scayt_serviceHost && (o.service_host = e.config.scayt_serviceHost), e.config.scayt_servicePort && (o.service_port = e.config.scayt_servicePort), e.config.scayt_servicePath && (o.service_path = e.config.scayt_servicePath), "boolean" == typeof e.config.scayt_ignoreAllCapsWords && (o["ignore-all-caps-words"] = e.config.scayt_ignoreAllCapsWords), "boolean" == typeof e.config.scayt_ignoreDomainNames && (o["ignore-domain-names"] = e.config.scayt_ignoreDomainNames), "boolean" == typeof e.config.scayt_ignoreWordsWithMixedCases && (o["ignore-words-with-mixed-cases"] = e.config.scayt_ignoreWordsWithMixedCases), "boolean" == typeof e.config.scayt_ignoreWordsWithNumbers && (o["ignore-words-with-numbers"] = e.config.scayt_ignoreWordsWithNumbers); var r; try { r = i(o) } catch (s) { t.alarmCompatibilityMessage(), delete o.charsToObserve, r = i(o) } r.subscribe("suggestionListSend", function (e) { for (var t = {}, n = [], i = 0; i < e.suggestionList.length; i++)t["word_" + e.suggestionList[i]] || (t["word_" + e.suggestionList[i]] = e.suggestionList[i], n.push(e.suggestionList[i])); CKEDITOR.plugins.scayt.suggestions = n }), r.subscribe("selectionIsChanged", function () { e.getSelection().isLocked && e.lockSelection() }), r.subscribe("graytStateChanged", function (t) { n.state.grayt[e.name] = t.state }), r.addMarkupHandler && r.addMarkupHandler(function (t) { var n = e.editable(), i = n.getCustomData(t.charName); i && (i.$ = t.node, n.setCustomData(t.charName, i)) }), e.scayt = r, e.fire("scaytButtonState", e.readOnly ? CKEDITOR.TRISTATE_DISABLED : CKEDITOR.TRISTATE_ON) } else n.state.scayt[e.name] = !1 }) }, destroy: function (e) { e.scayt && e.scayt.destroy(), delete e.scayt, e.fire("scaytButtonState", CKEDITOR.TRISTATE_OFF) }, loadScaytLibrary: function (e, t) { var n, i = function () { CKEDITOR.fireOnce("scaytReady"), e.scayt || "function" == typeof t && t(e) }; "undefined" == typeof window.SCAYT || "function" != typeof window.SCAYT.CKSCAYT ? (n = e.config.scayt_srcUrl + "?" + this.onLoadTimestamp, CKEDITOR.scriptLoader.load(n, function (e) { e && i() })) : window.SCAYT && "function" == typeof window.SCAYT.CKSCAYT && i() } }, CKEDITOR.on("dialogDefinition", function (e) { var t = e.data.name; e = e.data.definition.dialog, "scaytDialog" === t && e.on("cancel", function () { return !1 }, this, null, -1), "checkspell" === t && e.on("cancel", function (e) { e = e.sender && e.sender.getParentEditor(); var t = CKEDITOR.plugins.scayt, n = e.scayt; n && t.state.scayt[e.name] && n.setMarkupPaused && n.setMarkupPaused(!1), e.unlockSelection() }, this, null, -2), "link" === t && e.on("ok", function (e) { var t = e.sender && e.sender.getParentEditor(); t && setTimeout(function () { t.fire("reloadMarkupScayt", { removeOptions: { removeInside: !0, forceBookmark: !0 }, timeout: 0 }) }, 0) }) }), CKEDITOR.on("scaytReady", function () { if (!0 === CKEDITOR.config.scayt_handleCheckDirty) { var e = CKEDITOR.editor.prototype; e.checkDirty = CKEDITOR.tools.override(e.checkDirty, function (e) { return function () { var t = null, n = this.scayt; if (CKEDITOR.plugins.scayt && CKEDITOR.plugins.scayt.state.scayt[this.name] && this.scayt) { if (t = "ready" == this.status) var i = n.removeMarkupFromString(this.getSnapshot()), n = n.removeMarkupFromString(this._.previousValue), t = t && n !== i } else t = e.call(this); return t } }), e.resetDirty = CKEDITOR.tools.override(e.resetDirty, function (e) { return function () { var t = this.scayt; CKEDITOR.plugins.scayt && CKEDITOR.plugins.scayt.state.scayt[this.name] && this.scayt ? this._.previousValue = t.removeMarkupFromString(this.getSnapshot()) : e.call(this) } }) } if (!0 === CKEDITOR.config.scayt_handleUndoRedo) { var e = CKEDITOR.plugins.undo.Image.prototype, t = "function" == typeof e.equalsContent ? "equalsContent" : "equals"; e[t] = CKEDITOR.tools.override(e[t], function (e) { return function (t) { var n = t.editor.scayt, i = this.contents, o = t.contents, r = null; return CKEDITOR.plugins.scayt && CKEDITOR.plugins.scayt.state.scayt[t.editor.name] && t.editor.scayt && (this.contents = n.removeMarkupFromString(i) || "", t.contents = n.removeMarkupFromString(o) || ""), r = e.apply(this, arguments), this.contents = i, t.contents = o, r } }) } }), function () { CKEDITOR.plugins.add("stylescombo", { requires: "richcombo", init: function (e) { var t = e.config, n = e.lang.stylescombo, i = {}, o = [], r = []; e.on("stylesSet", function (n) { if (n = n.data.styles) { for (var s, a, l, c = 0, d = n.length; d > c; c++)s = n[c], e.blockless && s.element in CKEDITOR.dtd.$block || "string" == typeof s.type && !CKEDITOR.style.customHandlers[s.type] || (a = s.name, s = new CKEDITOR.style(s), e.filter.customConfig && !e.filter.check(s)) || (s._name = a, s._.enterMode = t.enterMode, s._.type = l = s.assignedTo || s.type, s._.weight = c + 1e3 * (l == CKEDITOR.STYLE_OBJECT ? 1 : l == CKEDITOR.STYLE_BLOCK ? 2 : 3), i[a] = s, o.push(s), r.push(s)); o.sort(function (e, t) { return e._.weight - t._.weight }) } }), e.ui.addRichCombo("Styles", { label: n.label, title: n.panelTitle, toolbar: "styles,10", allowedContent: r, panel: { css: [CKEDITOR.skin.getPath("editor")].concat(t.contentsCss), multiSelect: !0, attributes: { "aria-label": n.panelTitle } }, init: function () { var e, t, i, r, s, a; for (s = 0, a = o.length; a > s; s++)e = o[s], t = e._name, r = e._.type, r != i && (this.startGroup(n["panelTitle" + String(r)]), i = r), this.add(t, e.type == CKEDITOR.STYLE_OBJECT ? t : e.buildPreview(), t); this.commit() }, onClick: function (t) { e.focus(), e.fire("saveSnapshot"), t = i[t]; var n = e.elementPath(); e[t.checkActive(n, e) ? "removeStyle" : "applyStyle"](t), e.fire("saveSnapshot") }, onRender: function () { e.on("selectionChange", function (t) { var n = this.getValue(); t = t.data.path.elements; for (var o, r = 0, s = t.length; s > r; r++) { o = t[r]; for (var a in i) if (i[a].checkElementRemovable(o, !0, e)) return void (a != n && this.setValue(a)) } this.setValue("") }, this) }, onOpen: function () { var t = e.getSelection().getSelectedElement(), t = e.elementPath(t), o = [0, 0, 0, 0]; this.showAll(), this.unmarkAll(); for (var r in i) { var s = i[r], a = s._.type; s.checkApplicable(t, e, e.activeFilter) ? o[a]++ : this.hideItem(r), s.checkActive(t, e) && this.mark(r) } o[CKEDITOR.STYLE_BLOCK] || this.hideGroup(n["panelTitle" + String(CKEDITOR.STYLE_BLOCK)]), o[CKEDITOR.STYLE_INLINE] || this.hideGroup(n["panelTitle" + String(CKEDITOR.STYLE_INLINE)]), o[CKEDITOR.STYLE_OBJECT] || this.hideGroup(n["panelTitle" + String(CKEDITOR.STYLE_OBJECT)]) }, refresh: function () { var t = e.elementPath(); if (t) { for (var n in i) if (i[n].checkApplicable(t, e, e.activeFilter)) return; this.setState(CKEDITOR.TRISTATE_DISABLED) } }, reset: function () { i = {}, o = [] } }) } }) }(), function () { function e(e) { return { editorFocus: !1, canUndo: !1, modes: { wysiwyg: 1 }, exec: function (t) { if (t.editable().hasFocus) { var n, i = t.getSelection(); if (n = new CKEDITOR.dom.elementPath(i.getCommonAncestor(), i.root).contains({ td: 1, th: 1 }, 1)) { var i = t.createRange(), o = CKEDITOR.tools.tryThese(function () { var t = n.getParent().$.cells[n.$.cellIndex + (e ? -1 : 1)]; return t.parentNode.parentNode, t }, function () { var t = n.getParent(), t = t.getAscendant("table").$.rows[t.$.rowIndex + (e ? -1 : 1)]; return t.cells[e ? t.cells.length - 1 : 0] }); if (o || e) { if (!o) return !0; o = new CKEDITOR.dom.element(o), i.moveToElementEditStart(o), i.checkStartOfBlock() && i.checkEndOfBlock() || i.selectNodeContents(o) } else { for (var r = n.getAscendant("table").$, o = n.getParent().$.cells, r = new CKEDITOR.dom.element(r.insertRow(-1), t.document), s = 0, a = o.length; a > s; s++)r.append(new CKEDITOR.dom.element(o[s], t.document).clone(!1, !1)).appendBogus(); i.moveToElementEditStart(r) } return i.select(!0), !0 } } return !1 } } } var t = { editorFocus: !1, modes: { wysiwyg: 1, source: 1 } }, n = { exec: function (e) { e.container.focusNext(!0, e.tabIndex) } }, i = { exec: function (e) { e.container.focusPrevious(!0, e.tabIndex) } }; CKEDITOR.plugins.add("tab", { init: function (o) { for (var r = !1 !== o.config.enableTabKeyTools, s = o.config.tabSpaces || 0, a = ""; s--;)a += "\xa0"; a && o.on("key", function (e) { 9 == e.data.keyCode && (o.insertText(a), e.cancel()) }), r && o.on("key", function (e) { (9 == e.data.keyCode && o.execCommand("selectNextCell") || e.data.keyCode == CKEDITOR.SH
212IFT + 9 && o.execCommand("selectPreviousCell")) && e.cancel() }), o.addCommand("blur", CKEDITOR.tools.extend(n, t)), o.addCommand("blurBack", CKEDITOR.tools.extend(i, t)), o.addCommand("selectNextCell", e()), o.addCommand("selectPreviousCell", e(!0)) } }) }(), CKEDITOR.dom.element.prototype.focusNext = function (e, t) { var n, i, o, r, s, a, l = void 0 === t ? this.getTabIndex() : t; if (0 >= l) for (s = this.getNextSourceNode(e, CKEDITOR.NODE_ELEMENT); s;) { if (s.isVisible() && 0 === s.getTabIndex()) { o = s; break } s = s.getNextSourceNode(!1, CKEDITOR.NODE_ELEMENT) } else for (s = this.getDocument().getBody().getFirst(); s = s.getNextSourceNode(!1, CKEDITOR.NODE_ELEMENT);) { if (!n) if (!i && s.equals(this)) { if (i = !0, e) { if (!(s = s.getNextSourceNode(!0, CKEDITOR.NODE_ELEMENT))) break; n = 1 } } else i && !this.contains(s) && (n = 1); if (s.isVisible() && !(0 > (a = s.getTabIndex()))) { if (n && a == l) { o = s; break } a > l && (!o || !r || r > a) ? (o = s, r = a) : o || 0 !== a || (o = s, r = a) } } o && o.focus() }, CKEDITOR.dom.element.prototype.focusPrevious = function (e, t) { for (var n, i, o, r, s = void 0 === t ? this.getTabIndex() : t, a = 0, l = this.getDocument().getBody().getLast(); l = l.getPreviousSourceNode(!1, CKEDITOR.NODE_ELEMENT);) { if (!n) if (!i && l.equals(this)) { if (i = !0, e) { if (!(l = l.getPreviousSourceNode(!0, CKEDITOR.NODE_ELEMENT))) break; n = 1 } } else i && !this.contains(l) && (n = 1); if (l.isVisible() && !(0 > (r = l.getTabIndex()))) if (0 >= s) { if (n && 0 === r) { o = l; break } r > a && (o = l, a = r) } else { if (n && r == s) { o = l; break } s > r && (!o || r > a) && (o = l, a = r) } } o && o.focus() }, CKEDITOR.plugins.add("table", { requires: "dialog", init: function (e) { function t(e) { return CKEDITOR.tools.extend(e || {}, { contextSensitive: 1, refresh: function (e, t) { this.setState(t.contains("table", 1) ? CKEDITOR.TRISTATE_OFF : CKEDITOR.TRISTATE_DISABLED) } }) } if (!e.blockless) { var n = e.lang.table; e.addCommand("table", new CKEDITOR.dialogCommand("table", { context: "table", allowedContent: "table{width,height}[align,border,cellpadding,cellspacing,summary];caption tbody thead tfoot;th td tr[scope];" + (e.plugins.dialogadvtab ? "table" + e.plugins.dialogadvtab.allowedContent() : ""), requiredContent: "table", contentTransformations: [["table{width}: sizeToStyle", "table[width]: sizeToAttribute"], ["td: splitBorderShorthand"], [{ element: "table", right: function (e) { e.styles && (e.styles.border && e.styles.border.match(/solid/) && (e.attributes.border = 1), "collapse" == e.styles["border-collapse"] && (e.attributes.cellspacing = 0)) } }]] })), e.addCommand("tableProperties", new CKEDITOR.dialogCommand("tableProperties", t())), e.addCommand("tableDelete", t({ exec: function (e) { var t = e.elementPath().contains("table", 1); if (t) { var n = t.getParent(), i = e.editable(); 1 != n.getChildCount() || n.is("td", "th") || n.equals(i) || (t = n), e = e.createRange(), e.moveToPosition(t, CKEDITOR.POSITION_BEFORE_START), t.remove(), e.select() } } })), e.ui.addButton && e.ui.addButton("Table", { label: n.toolbar, command: "table", toolbar: "insert,30" }), CKEDITOR.dialog.add("table", this.path + "dialogs/table.js"), CKEDITOR.dialog.add("tableProperties", this.path + "dialogs/table.js"), e.addMenuItems && e.addMenuItems({ table: { label: n.menu, command: "tableProperties", group: "table", order: 5 }, tabledelete: { label: n.deleteTable, command: "tableDelete", group: "table", order: 1 } }), e.on("doubleclick", function (e) { e.data.element.is("table") && (e.data.dialog = "tableProperties") }), e.contextMenu && e.contextMenu.addListener(function () { return { tabledelete: CKEDITOR.TRISTATE_OFF, table: CKEDITOR.TRISTATE_OFF } }) } } }), function () {
213            function e(e) { function t(e) { 0 < n.length || e.type != CKEDITOR.NODE_ELEMENT || !h.test(e.getName()) || e.getCustomData("selected_cell") || (CKEDITOR.dom.element.setMarker(i, e, "selected_cell", !0), n.push(e)) } e = e.getRanges(); for (var n = [], i = {}, o = 0; o < e.length; o++) { var r = e[o]; if (r.collapsed) r = r.getCommonAncestor(), (r = r.getAscendant("td", !0) || r.getAscendant("th", !0)) && n.push(r); else { var s, r = new CKEDITOR.dom.walker(r); for (r.guard = t; s = r.next();)s.type == CKEDITOR.NODE_ELEMENT && s.is(CKEDITOR.dtd.table) || (s = s.getAscendant("td", !0) || s.getAscendant("th", !0)) && !s.getCustomData("selected_cell") && (CKEDITOR.dom.element.setMarker(i, s, "selected_cell", !0), n.push(s)) } } return CKEDITOR.dom.element.clearAllMarkers(i), n } function t(t, n) { for (var i = e(t), o = i[0], r = o.getAscendant("table"), o = o.getDocument(), s = i[0].getParent(), a = s.$.rowIndex, i = i[i.length - 1], l = i.getParent().$.rowIndex + i.$.rowSpan - 1, i = new CKEDITOR.dom.element(r.$.rows[l]), a = n ? a : l, s = n ? s : i, i = CKEDITOR.tools.buildTableMap(r), r = i[a], a = n ? i[a - 1] : i[a + 1], i = i[0].length, o = o.createElement("tr"), l = 0; r[l] && i > l; l++) { var c; 1 < r[l].rowSpan && a && r[l] == a[l] ? (c = r[l], c.rowSpan += 1) : (c = new CKEDITOR.dom.element(r[l]).clone(), c.removeAttribute("rowSpan"), c.appendBogus(), o.append(c), c = c.$), l += c.colSpan - 1 } n ? o.insertBefore(s) : o.insertAfter(s) } function n(t) { if (t instanceof CKEDITOR.dom.selection) { var i = e(t), o = i[0].getAscendant("table"), r = CKEDITOR.tools.buildTableMap(o); t = i[0].getParent().$.rowIndex; for (var i = i[i.length - 1], s = i.getParent().$.rowIndex + i.$.rowSpan - 1, i = [], a = t; s >= a; a++) { for (var l = r[a], c = new CKEDITOR.dom.element(o.$.rows[a]), d = 0; d < l.length; d++) { var u = new CKEDITOR.dom.element(l[d]), h = u.getParent().$.rowIndex; 1 == u.$.rowSpan ? u.remove() : (--u.$.rowSpan, h == a && (h = r[a + 1], h[d - 1] ? u.insertAfter(new CKEDITOR.dom.element(h[d - 1])) : new CKEDITOR.dom.element(o.$.rows[a + 1]).append(u, 1))), d += u.$.colSpan - 1 } i.push(c) } for (r = o.$.rows, o = new CKEDITOR.dom.element(r[s + 1] || (t > 0 ? r[t - 1] : null) || o.$.parentNode), a = i.length; a >= 0; a--)n(i[a]); return o } return t instanceof CKEDITOR.dom.element && (o = t.getAscendant("table"), 1 == o.$.rows.length ? o.remove() : t.remove()), null } function i(e, t) { for (var n = t ? 1 / 0 : 0, i = 0; i < e.length; i++) { var o; o = e[i]; for (var r = t, s = o.getParent().$.cells, a = 0, l = 0; l < s.length; l++) { var c = s[l], a = a + (r ? 1 : c.colSpan); if (c == o.$) break } o = a - 1, (t ? n > o : o > n) && (n = o) } return n } function o(t, n) { for (var o = e(t), r = o[0].getAscendant("table"), s = i(o, 1), o = i(o), s = n ? s : o, a = CKEDITOR.tools.buildTableMap(r), r = [], o = [], l = a.length, c = 0; l > c; c++)r.push(a[c][s]), o.push(n ? a[c][s - 1] : a[c][s + 1]); for (c = 0; l > c; c++)r[c] && (1 < r[c].colSpan && o[c] == r[c] ? (s = r[c], s.colSpan += 1) : (s = new CKEDITOR.dom.element(r[c]).clone(), s.removeAttribute("colSpan"), s.appendBogus(), s[n ? "insertBefore" : "insertAfter"].call(s, new CKEDITOR.dom.element(r[c])), s = s.$), c += s.rowSpan - 1) } function r(e, t) { var n = e.getStartElement(); if (n = n.getAscendant("td", 1) || n.getAscendant("th", 1)) { var i = n.clone(); i.appendBogus(), t ? i.insertBefore(n) : i.insertAfter(n) } } function s(t) { if (t instanceof CKEDITOR.dom.selection) { t = e(t); var n, i = t[0] && t[0].getAscendant("table"); e: { var o = 0; n = t.length - 1; for (var r, l, c = {}; r = t[o++];)CKEDITOR.dom.element.setMarker(c, r, "delete_cell", !0); for (o = 0; r = t[o++];)if ((l = r.getPrevious()) && !l.getCustomData("delete_cell") || (l = r.getNext()) && !l.getCustomData("delete_cell")) { CKEDITOR.dom.element.clearAllMarkers(c), n = l; break e } CKEDITOR.dom.element.clearAllMarkers(c), l = t[0].getParent(), (l = l.getPrevious()) ? n = l.getLast() : (l = t[n].getParent(), n = (l = l.getNext()) ? l.getChild(0) : null) } for (l = t.length - 1; l >= 0; l--)s(t[l]); n ? a(n, !0) : i && i.remove() } else t instanceof CKEDITOR.dom.element && (i = t.getParent(), 1 == i.getChildCount() ? i.remove() : t.remove()) } function a(e, t) {
214                var n = e.getDocument(), i = CKEDITOR.document; CKEDITOR.env.ie && 10 == CKEDITOR.env.version && (i.focus(), n.focus()), n = new CKEDITOR.dom.range(n), n["moveToElementEdit" + (t ? "End" : "Start")](e) || (n.selectNodeContents(e),
215                    n.collapse(!t)), n.select(!0)
216            } function l(e, t, n) { if (e = e[t], "undefined" == typeof n) return e; for (t = 0; e && t < e.length; t++) { if (n.is && e[t] == n.$) return t; if (t == n) return new CKEDITOR.dom.element(e[t]) } return n.is ? -1 : null } function c(t, n, i) { var o, r = e(t); if ((n ? 1 != r.length : 2 > r.length) || (o = t.getCommonAncestor()) && o.type == CKEDITOR.NODE_ELEMENT && o.is("table")) return !1; var s; t = r[0], o = t.getAscendant("table"); var a = CKEDITOR.tools.buildTableMap(o), c = a.length, d = a[0].length, u = t.getParent().$.rowIndex, h = l(a, u, t); if (n) { var p; try { var f = parseInt(t.getAttribute("rowspan"), 10) || 1; s = parseInt(t.getAttribute("colspan"), 10) || 1, p = a["up" == n ? u - f : "down" == n ? u + f : u]["left" == n ? h - s : "right" == n ? h + s : h] } catch (m) { return !1 } if (!p || t.$ == p) return !1; r["up" == n || "left" == n ? "unshift" : "push"](new CKEDITOR.dom.element(p)) } n = t.getDocument(); var g = u, f = p = 0, v = !i && new CKEDITOR.dom.documentFragment(n), E = 0; for (n = 0; n < r.length; n++) { s = r[n]; var T = s.getParent(), y = s.getFirst(), b = s.$.colSpan, C = s.$.rowSpan, T = T.$.rowIndex, _ = l(a, T, s), E = E + b * C, f = Math.max(f, _ - h + b); p = Math.max(p, T - u + C), i || (b = s, (C = b.getBogus()) && C.remove(), b.trim(), s.getChildren().count() && (T == g || !y || y.isBlockBoundary && y.isBlockBoundary({ br: 1 }
216) || (g = v.getLast(CKEDITOR.dom.walker.whitespaces(!0)), !g || g.is && g.is("br") || v.append("br")), s.moveChildren(v)), n ? s.remove() : s.setHtml("")), g = T } if (i) return p * f == E; for (v.moveChildren(t), t.appendBogus(), f >= d ? t.removeAttribute("rowSpan") : t.$.rowSpan = p, p >= c ? t.removeAttribute("colSpan") : t.$.colSpan = f, i = new CKEDITOR.dom.nodeList(o.$.rows), r = i.count(), n = r - 1; n >= 0; n--)o = i.getItem(n), o.$.cells.length || (o.remove(), r++); return t } function d(t, n) { var i = e(t); if (1 < i.length) return !1; if (n) return !0; var o, i = i[0], r = i.getParent(), s = r.getAscendant("table"), a = CKEDITOR.tools.buildTableMap(s), c = r.$.rowIndex, d = l(a, c, i), u = i.$.rowSpan; if (u > 1) { o = Math.ceil(u / 2); for (var h, u = Math.floor(u / 2), r = c + o, s = new CKEDITOR.dom.element(s.$.rows[r]), a = l(a, r), r = i.clone(), c = 0; c < a.length; c++) { if (h = a[c], h.parentNode == s.$ && c > d) { r.insertBefore(new CKEDITOR.dom.element(h)); break } h = null } h || s.append(r) } else for (u = o = 1, s = r.clone(), s.insertAfter(r), s.append(r = i.clone()), h = l(a, c), d = 0; d < h.length; d++)h[d].rowSpan++; return r.appendBogus(), i.$.rowSpan = o, r.$.rowSpan = u, 1 == o && i.removeAttribute("rowSpan"), 1 == u && r.removeAttribute("rowSpan"), r } function u(t, n) { var i = e(t); if (1 < i.length) return !1; if (n) return !0; var i = i[0], o = i.getParent(), r = o.getAscendant("table"), r = CKEDITOR.tools.buildTableMap(r), s = l(r, o.$.rowIndex, i), a = i.$.colSpan; if (a > 1) o = Math.ceil(a / 2), a = Math.floor(a / 2); else { for (var a = o = 1, c = [], d = 0; d < r.length; d++) { var u = r[d]; c.push(u[s]), 1 < u[s].rowSpan && (d += u[s].rowSpan - 1) } for (r = 0; r < c.length; r++)c[r].colSpan++ } return r = i.clone(), r.insertAfter(i), r.appendBogus(), i.$.colSpan = o, r.$.colSpan = a, 1 == o && i.removeAttribute("colSpan"), 1 == a && r.removeAttribute("colSpan"), r } var h = /^(?:td|th)$/; CKEDITOR.plugins.tabletools = { requires: "table,dialog,contextmenu", init: function (i) { function l(e) { return CKEDITOR.tools.extend(e || {}, { contextSensitive: 1, refresh: function (e, t) { this.setState(t.contains({ td: 1, th: 1 }, 1) ? CKEDITOR.TRISTATE_OFF : CKEDITOR.TRISTATE_DISABLED) } }) } function h(e, t) { var n = i.addCommand(e, t); i.addFeature(n) } var p = i.lang.table; h("cellProperties", new CKEDITOR.dialogCommand("cellProperties", l({ allowedContent: "td th{width,height,border-color,background-color,white-space,vertical-align,text-align}[colspan,rowspan]", requiredContent: "table", contentTransformations: [[{ element: "td", left: function (e) { return e.styles.background && e.styles.background.match(/^(#[a-fA-F0-9]{3,6}|rgb\([\d, ]+\)|\w+)$/) }, right: function (e) { e.styles["background-color"] = e.styles.background } }]] }))), CKEDITOR.dialog.add("cellProperties", this.path + "dialogs/tableCell.js"), h("rowDelete", l({ requiredContent: "table", exec: function (e) { e = e.getSelection(), a(n(e)) } })), h("rowInsertBefore", l({ requiredContent: "table", exec: function (e) { e = e.getSelection(), t(e, !0) } })), h("rowInsertAfter", l({ requiredContent: "table", exec: function (e) { e = e.getSelection(), t(e) } })), h("columnDelete", l({ requiredContent: "table", exec: function (t) { t = t.getSelection(), t = e(t); var n = t[0], i = t[t.length - 1]; t = n.getAscendant("table"); for (var o, r, s = CKEDITOR.tools.buildTableMap(t), l = [], c = 0, d = s.length; d > c; c++)for (var u = 0, h = s[c].length; h > u; u++)s[c][u] == n.$ && (o = u), s[c][u] == i.$ && (r = u); for (c = o; r >= c; c++)for (u = 0; u < s.length; u++)i = s[u], n = new CKEDITOR.dom.element(t.$.rows[u]), i = new CKEDITOR.dom.element(i[c]), i.$ && (1 == i.$.colSpan ? i.remove() : --i.$.colSpan, u += i.$.rowSpan - 1, n.$.cells.length || l.push(n)); r = t.$.rows[0] && t.$.rows[0].cells, o = new CKEDITOR.dom.element(r[o] || (o ? r[o - 1] : t.$.parentNode)), l.length == d && t.remove(), o && a(o, !0) } })), h("columnInsertBefore", l({ requiredContent: "table", exec: function (e) { e = e.getSelection(), o(e, !0) } })), h("columnInsertAfter", l({ requiredContent: "table", exec: function (e) { e = e.getSelection(), o(e) } })), h("cellDelete", l({ requiredContent: "table", exec: function (e) { e = e.getSelection(), s(e) } })), h("cellMerge", l({ allowedContent: "td[colspan,rowspan]", requiredContent: "td[colspan,rowspan]", exec: function (e) { a(c(e.getSelection()), !0) } })), h("cellMergeRight", l({ allowedContent: "td[colspan]", requiredContent: "td[colspan]", exec: function (e) { a(c(e.getSelection(), "right"), !0) } })), h("cellMergeDown", l({ allowedContent: "td[rowspan]", requiredContent: "td[rowspan]", exec: function (e) { a(c(e.getSelection(), "down"), !0) } })), h("cellVerticalSplit", l({ allowedContent: "td[rowspan]", requiredContent: "td[rowspan]", exec: function (e) { a(u(e.getSelection())) } })), h("cellHorizontalSplit", l({ allowedContent: "td[colspan]", requiredContent: "td[colspan]", exec: function (e) { a(d(e.getSelection())) } })), h("cellInsertBefore", l({ requiredContent: "table", exec: function (e) { e = e.getSelection(), r(e, !0) } })), h("cellInsertAfter", l({ requiredContent: "table", exec: function (e) { e = e.getSelection(), r(e) } })), i.addMenuItems && i.addMenuItems({ tablecell: { label: p.cell.menu, group: "tablecell", order: 1, getItems: function () { var t = i.getSelection(), n = e(t); return { tablecell_insertBefore: CKEDITOR.TRISTATE_OFF, tablecell_insertAfter: CKEDITOR.TRISTATE_OFF, tablecell_delete: CKEDITOR.TRISTATE_OFF, tablecell_merge: c(t, null, !0) ? CKEDITOR.TRISTATE_OFF : CKEDITOR.TRISTATE_DISABLED, tablecell_merge_right: c(t, "right", !0) ? CKEDITOR.TRISTATE_OFF : CKEDITOR.TRISTATE_DISABLED, tablecell_merge_down: c(t, "down", !0) ? CKEDITOR.TRISTATE_OFF : CKEDITOR.TRISTATE_DISABLED, tablecell_split_vertical: u(t, !0) ? CKEDITOR.TRISTATE_OFF : CKEDITOR.TRISTATE_DISABLED, tablecell_split_horizontal: d(t, !0) ? CKEDITOR.TRISTATE_OFF : CKEDITOR.TRISTATE_DISABLED, tablecell_properties: 0 < n.length ? CKEDITOR.TRISTATE_OFF : CKEDITOR.TRISTATE_DISABLED } } }, tablecell_insertBefore: { label: p.cell.insertBefore, group: "tablecell", command: "cellInsertBefore", order: 5 }, tablecell_insertAfter: { label: p.cell.insertAfter, group: "tablecell", command: "cellInsertAfter", order: 10 }, tablecell_delete: { label: p.cell.deleteCell, group: "tablecell", command: "cellDelete", order: 15 }, tablecell_merge: { label: p.cell.merge, group: "tablecell", command: "cellMerge", order: 16 }, tablecell_merge_right: { label: p.cell.mergeRight, group: "tablecell", command: "cellMergeRight", order: 17 }, tablecell_merge_down: { label: p.cell.mergeDown, group: "tablecell", command: "cellMergeDown", order: 18 }, tablecell_split_horizontal: { label: p.cell.splitHorizontal, group: "tablecell", command: "cellHorizontalSplit", order: 19 }, tablecell_split_vertical: { label: p.cell.splitVertical, group: "tablecell", command: "cellVerticalSplit", order: 20 }, tablecell_properties: { label: p.cell.title, group: "tablecellproperties", command: "cellProperties", order: 21 }, tablerow: { label: p.row.menu, group: "tablerow", order: 1, getItems: function () { return { tablerow_insertBefore: CKEDITOR.TRISTATE_OFF, tablerow_insertAfter: CKEDITOR.TRISTATE_OFF, tablerow_delete: CKEDITOR.TRISTATE_OFF } } }, tablerow_insertBefore: { label: p.row.insertBefore, group: "tablerow", command: "rowInsertBefore", order: 5 }, tablerow_insertAfter: { label: p.row.insertAfter, group: "tablerow", command: "rowInsertAfter", order: 10 }, tablerow_delete: { label: p.row.deleteRow, group: "tablerow", command: "rowDelete", order: 15 }, tablecolumn: { label: p.column.menu, group: "tablecolumn", order: 1, getItems: function () { return { tablecolumn_insertBefore: CKEDITOR.TRISTATE_OFF, tablecolumn_insertAfter: CKEDITOR.TRISTATE_OFF, tablecolumn_delete: CKEDITOR.TRISTATE_OFF } } }, tablecolumn_insertBefore: { label: p.column.insertBefore, group: "tablecolumn", command: "columnInsertBefore", order: 5 }, tablecolumn_insertAfter: { label: p.column.insertAfter, group: "tablecolumn", command: "columnInsertAfter", order: 10 }, tablecolumn_delete: { label: p.column.deleteColumn, group: "tablecolumn", command: "columnDelete", order: 15 } }), i.contextMenu && i.contextMenu.addListener(function (e, t, n) { return (e = n.contains({ td: 1, th: 1 }, 1)) && !e.isReadOnly() ? { tablecell: CKEDITOR.TRISTATE_OFF, tablerow: CKEDITOR.TRISTATE_OFF, tablecolumn: CKEDITOR.TRISTATE_OFF } : null }) }, getSelectedCells: e }, CKEDITOR.plugins.add("tabletools", CKEDITOR.plugins.tabletools)
217        }(), CKEDITOR.tools.buildTableMap = function (e) { e = e.$.rows; for (var t = -1, n = [], i = 0; i < e.length; i++) { t++, !n[t] && (n[t] = []); for (var o = -1, r = 0; r < e[i].cells.length; r++) { var s = e[i].cells[r]; for (o++; n[t][o];)o++; for (var a = isNaN(s.colSpan) ? 1 : s.colSpan, s = isNaN(s.rowSpan) ? 1 : s.rowSpan, l = 0; s > l; l++) { n[t + l] || (n[t + l] = []); for (var c = 0; a > c; c++)n[t + l][o + c] = e[i].cells[r] } o += a - 1 } } return n }, function () { var e = [CKEDITOR.CTRL + 90, CKEDITOR.CTRL + 89, CKEDITOR.CTRL + CKEDITOR.SH
217IFT + 90], t = { 8: 1, 46: 1 }; CKEDITOR.plugins.add("undo", { init: function (t) { function i(e) { s.enabled && !1 !== e.data.command.canUndo && s.save() } function o() { s.enabled = t.readOnly ? !1 : "wysiwyg" == t.mode, s.onChange() } var s = t.undoManager = new n(t), a = s.editingHandler = new r(s), l = t.addCommand("undo", { exec: function () { s.undo() && (t.selectionChange(), this.fire("afterUndo")) }, startDisabled: !0, canUndo: !1 }), c = t.addCommand("redo", { exec: function () { s.redo() && (t.selectionChange(), this.fire("afterRedo")) }, startDisabled: !0, canUndo: !1 }); t.setKeystroke([[e[0], "undo"], [e[1], "redo"], [e[2], "redo"]]), s.onChange = function () { l.setState(s.undoable() ? CKEDITOR.TRISTATE_OFF : CKEDITOR.TRISTATE_DISABLED), c.setState(s.redoable() ? CKEDITOR.TRISTATE_OFF : CKEDITOR.TRISTATE_DISABLED) }, t.on("beforeCommandExec", i), t.on("afterCommandExec", i), t.on("saveSnapshot", function (e) { s.save(e.data && e.data.contentOnly) }), t.on("contentDom", a.attachListeners, a), t.on("instanceReady", function () { t.fire("saveSnapshot") }), t.on("beforeModeUnload", function () { "wysiwyg" == t.mode && s.save(!0) }), t.on("mode", o), t.on("readOnly", o), t.ui.addButton && (t.ui.addButton("Undo", { label: t.lang.undo.undo, command: "undo", toolbar: "undo,10" }), t.ui.addButton("Redo", { label: t.lang.undo.redo, command: "redo", toolbar: "undo,20" })), t.resetUndo = function () { s.reset(), t.fire("saveSnapshot") }, t.on("updateSnapshot", function () { s.currentImage && s.update() }), t.on("lockSnapshot", function (e) { e = e.data, s.lock(e && e.dontUpdate, e && e.forceUpdate) }), t.on("unlockSnapshot", s.unlock, s) } }), CKEDITOR.plugins.undo = {}; var n = CKEDITOR.plugins.undo.UndoManager = function (e) { this.strokesRecorded = [0, 0], this.locked = null, this.previousKeyGroup = -1, this.limit = e.config.undoStackSize || 20, this.strokesLimit = 25, this.editor = e, this.reset() }; n.prototype = { type: function (e, t) { var i = n.getKeyGroup(e), o = this.strokesRecorded[i] + 1; t = t || o >= this.strokesLimit, this.typing || (this.hasUndo = this.typing = !0, this.hasRedo = !1, this.onChange()), t ? (o = 0, this.editor.fire("saveSnapshot")) : this.editor.fire("change"), this.strokesRecorded[i] = o, this.previousKeyGroup = i }, keyGroupChanged: function (e) { return n.getKeyGroup(e) != this.previousKeyGroup }, reset: function () { this.snapshots = [], this.index = -1, this.currentImage = null, this.hasRedo = this.hasUndo = !1, this.locked = null, this.resetType() }, resetType: function () { this.strokesRecorded = [0, 0], this.typing = !1, this.previousKeyGroup = -1 }, refreshState: function () { this.hasUndo = !!this.getNextImage(!0), this.hasRedo = !!this.getNextImage(!1), this.resetType(), this.onChange() }, save: function (e, t, n) { var o = this.editor; if (this.locked || "ready" != o.status || "wysiwyg" != o.mode) return !1; var r = o.editable(); if (!r || "ready" != r.status) return !1; if (r = this.snapshots, t || (t = new i(o)), !1 === t.contents) return !1; if (this.currentImage) if (t.equalsContent(this.currentImage)) { if (e || t.equalsSelection(this.currentImage)) return !1 } else !1 !== n && o.fire("change"); return r.splice(this.index + 1, r.length - this.index - 1), r.length == this.limit && r.shift(), this.index = r.push(t) - 1, this.currentImage = t, !1 !== n && this.refreshState(), !0 }, restoreImage: function (e) { var t, n = this.editor; e.bookmarks && (n.focus(), t = n.getSelection()), this.locked = { level: 999 }, this.editor.loadSnapshot(e.contents), e.bookmarks ? t.selectBookmarks(e.bookmarks) : CKEDITOR.env.ie && (t = this.editor.document.getBody().$.createTextRange(), t.collapse(!0), t.select()), this.locked = null, this.index = e.index, this.currentImage = this.snapshots[this.index], this.update(), this.refreshState(), n.fire("change") }, getNextImage: function (e) { var t, n = this.snapshots, i = this.currentImage; if (i) if (e) { for (t = this.index - 1; t >= 0; t--)if (e = n[t], !i.equalsContent(e)) return e.index = t, e } else for (t = this.index + 1; t < n.length; t++)if (e = n[t], !i.equalsContent(e)) return e.index = t, e; return null }, redoable: function () { return this.enabled && this.hasRedo }, undoable: function () { return this.enabled && this.hasUndo }, undo: function () { if (this.undoable()) { this.save(!0); var e = this.getNextImage(!0); if (e) return this.restoreImage(e), !0 } return !1 }, redo: function () { if (this.redoable() && (this.save(!0), this.redoable())) { var e = this.getNextImage(!1); if (e) return this.restoreImage(e), !0 } return !1 }, update: function (e) { if (!this.locked) { e || (e = new i(this.editor)); for (var t = this.index, n = this.snapshots; t > 0 && this.currentImage.equalsContent(n[t - 1]);)--t; n.splice(t, this.index - t + 1, e), this.index = t, this.currentImage = e } }, updateSelection: function (e) { if (!this.snapshots.length) return !1; var t = this.snapshots, n = t[t.length - 1]; return n.equalsContent(e) && !n.equalsSelection(e) ? (this.currentImage = t[t.length - 1] = e, !0) : !1 }, lock: function (e, t) { if (this.locked) this.locked.level++; else if (e) this.locked = { level: 1 }; else { var n = null; if (t) n = !0; else { var o = new i(this.editor, !0); this.currentImage && this.currentImage.equalsContent(o) && (n = o) } this.locked = { update: n, level: 1 } } }, unlock: function () { if (this.locked && !--this.locked.level) { var e = this.locked.update; if (this.locked = null, !0 === e) this.update(); else if (e) { var t = new i(this.editor, !0); e.equalsContent(t) || this.update() } } } }, n.navigationKeyCodes = { 37: 1, 38: 1, 39: 1, 40: 1, 36: 1, 35: 1, 33: 1, 34: 1 }, n.keyGroups = { PRINTABLE: 0, FUNCTIONAL: 1 }, n.isNavigationKey = function (e) { return !!n.navigationKeyCodes[e] }, n.getKeyGroup = function (e) { var i = n.keyGroups; return t[e] ? i.FUNCTIONAL : i.PRINTABLE }, n.getOppositeKeyGroup = function (e) { var t = n.keyGroups; return e == t.FUNCTIONAL ? t.PRINTABLE : t.FUNCTIONAL }, n.ieFunctionalKeysBug = function (e) { return CKEDITOR.env.ie && n.getKeyGroup(e) == n.keyGroups.FUNCTIONAL }; var i = CKEDITOR.plugins.undo.Image = function (e, t) { this.editor = e, e.fire("beforeUndoImage"); var n = e.getSnapshot(); CKEDITOR.env.ie && n && (n = n.replace(/\s+data-cke-expando=".*?"/g, "")), this.contents = n, t || (this.bookmarks = (n = n && e.getSelection()) && n.createBookmarks2(!0)), e.fire("afterUndoImage") }, o = /\b(?:href|src|name)="[^"]*?"/gi; i.prototype = { equalsContent: function (e) { var t = this.contents; return e = e.contents, CKEDITOR.env.ie && (CKEDITOR.env.ie7Compat || CKEDITOR.env.quirks) && (t = t.replace(o, ""), e = e.replace(o, "")), t == e }, equalsSelection: function (e) { var t = this.bookmarks; if (e = e.bookmarks, t || e) { if (!t || !e || t.length != e.length) return !1; for (var n = 0; n < t.length; n++) { var i = t[n], o = e[n]; if (i.startOffset != o.startOffset || i.endOffset != o.endOffset || !CKEDITOR.tools.arrayCompare(i.start, o.start) || !CKEDITOR.tools.arrayCompare(i.end, o.end)) return !1 } } return !0 } }; var r = CKEDITOR.plugins.undo.NativeEditingHandler = function (e) { this.undoManager = e, this.ignoreInputEvent = !1, this.keyEventsStack = new s, this.lastKeydownImage = null }; r.prototype = { onKeydown: function (t) { var o = t.data.getKey(); 229 !== o && (-1 < CKEDITOR.tools.indexOf(e, t.data.getKeystroke()) ? t.data.preventDefault() : (this.keyEventsStack.cleanUp(t), t = this.undoManager, this.keyEventsStack.getLast(o) || this.keyEventsStack.push(o), this.lastKeydownImage = new i(t.editor), (n.isNavigationKey(o) || this.undoManager.keyGroupChanged(o)) && (t.strokesRecorded[0] || t.strokesRecorded[1]) && (t.save(!1, this.lastKeydownImage, !1), t.resetType()))) }, onInput: function () { if (this.ignoreInputEvent) this.ignoreInputEvent = !1; else { var e = this.keyEventsStack.getLast(); e || (e = this.keyEventsStack.push(0)), this.keyEventsStack.increment(e.keyCode), this.keyEventsStack.getTotalInputs() >= this.undoManager.strokesLimit && (this.undoManager.type(e.keyCode, !0), this.keyEventsStack.resetInputs()) } }, onKeyup: function (e) { var t = this.undoManager; e = e.data.getKey(); var o = this.keyEventsStack.getTotalInputs(); this.keyEventsStack.remove(e), n.ieFunctionalKeysBug(e) && this.lastKeydownImage && this.lastKeydownImage.equalsContent(new i(t.editor, !0)) || (o > 0 ? t.type(e) : n.isNavigationKey(e) && this.onNavigationKey(!0)) }, onNavigationKey: function (e) { var t = this.undoManager; !e && t.save(!0, null, !1) || t.updateSelection(new i(t.editor)), t.resetType() }, ignoreInputEventListener: function () { this.ignoreInputEvent = !0 }, attachListeners: function () { var e = this.undoManager.editor, t = e.editable(), i = this; t.attachListener(t, "keydown", function (e) { i.onKeydown(e), n.ieFunctionalKeysBug(e.data.getKey()) && i.onInput() }
217, null, null, 999), t.attachListener(t, CKEDITOR.env.ie ? "keypress" : "input", i.onInput, i, null, 999), t.attachListener(t, "keyup", i.onKeyup, i, null, 999), t.attachListener(t, "paste", i.ignoreInputEventListener, i, null, 999), t.attachListener(t, "drop", i.ignoreInputEventListener, i, null, 999), t.attachListener(t.isInline() ? t : e.document.getDocumentElement(), "click", function () { i.onNavigationKey() }, null, null, 999), t.attachListener(this.undoManager.editor, "blur", function () { i.keyEventsStack.remove(9) }, null, null, 999) } }; var s = CKEDITOR.plugins.undo.KeyEventsStack = function () { this.stack = [] }; s.prototype = { push: function (e) { return e = this.stack.push({ keyCode: e, inputs: 0 }), this.stack[e - 1] }, getLastIndex: function (e) { if ("number" != typeof e) return this.stack.length - 1; for (var t = this.stack.length; t--;)if (this.stack[t].keyCode == e) return t; return -1 }, getLast: function (e) { return e = this.getLastIndex(e), -1 != e ? this.stack[e] : null }, increment: function (e) { this.getLast(e).inputs++ }, remove: function (e) { e = this.getLastIndex(e), -1 != e && this.stack.splice(e, 1) }, resetInputs: function (e) { if ("number" == typeof e) this.getLast(e).inputs = 0; else for (e = this.stack.length; e--;)this.stack[e].inputs = 0 }, getTotalInputs: function () { for (var e = this.stack.length, t = 0; e--;)t += this.stack[e].inputs; return t }, cleanUp: function (e) { e = e.data.$, e.ctrlKey || e.metaKey || this.remove(17), e.shiftKey || this.remove(16), e.altKey || this.remove(18) } } }(), CKEDITOR.plugins.add("wsc", { requires: "dialog", parseApi: function (e) { e.config.wsc_onFinish = "function" == typeof e.config.wsc_onFinish ? e.config.wsc_onFinish : function () { }, e.config.wsc_onClose = "function" == typeof e.config.wsc_onClose ? e.config.wsc_onClose : function () { } }, parseConfig: function (e) { e.config.wsc_customerId = e.config.wsc_customerId || CKEDITOR.config.wsc_customerId || "1:ua3xw1-2XyGJ3-GWruD3-6OFNT1-oXcuB1-nR6Bp4-hgQHc-EcYng3-sdRXG3-NOfFk", e.config.wsc_customDictionaryIds = e.config.wsc_customDictionaryIds || CKEDITOR.config.wsc_customDictionaryIds || "", e.config.wsc_userDictionaryName = e.config.wsc_userDictionaryName || CKEDITOR.config.wsc_userDictionaryName || "", e.config.wsc_customLoaderScript = e.config.wsc_customLoaderScript || CKEDITOR.config.wsc_customLoaderScript, e.config.wsc_interfaceLang = e.config.wsc_interfaceLang, CKEDITOR.config.wsc_cmd = e.config.wsc_cmd || CKEDITOR.config.wsc_cmd || "spell", CKEDITOR.config.wsc_version = "v4.3.0-master-d769233", CKEDITOR.config.wsc_removeGlobalVariable = !0 }, onLoad: function (e) { "moono-lisa" == (CKEDITOR.skinName || e.config.skin) && CKEDITOR.document.appendStyleSheet(this.path + "skins/" + CKEDITOR.skin.name + "/wsc.css") }, init: function (e) { var t = CKEDITOR.env; this.parseConfig(e), this.parseApi(e), e.addCommand("checkspell", new CKEDITOR.dialogCommand("checkspell")).modes = { wysiwyg: !(CKEDITOR.env.opera || CKEDITOR.env.air || document.domain != window.location.hostname || t.ie && (8 > t.version || t.quirks)) }, "undefined" == typeof e.plugins.scayt && e.ui.addButton && e.ui.addButton("SpellChecker", { label: e.lang.wsc.toolbar, click: function (e) { var t = e.elementMode == CKEDITOR.ELEMENT_MODE_INLINE ? e.container.getText() : e.document.getBody().getText(); (t = t.replace(/\s/g, "")) ? e.execCommand("checkspell") : alert("Nothing to check!") }, toolbar: "spellchecker,10" }), CKEDITOR.dialog.add("checkspell", this.path + (CKEDITOR.env.ie && 7 >= CKEDITOR.env.version ? "dialogs/wsc_ie.js" : window.postMessage ? "dialogs/wsc.js" : "dialogs/wsc_ie.js")) } }), CKEDITOR.config.plugins = "dialogui,dialog,about,a11yhelp,dialogadvtab,basicstyles,bidi,blockquote,clipboard,button,panelbutton,panel,floatpanel,colorbutton,colordialog,templates,menu,contextmenu,copyformatting,div,resize,toolbar,elementspath,enterkey,entities,popup,filebrowser,find,fakeobjects,flash,floatingspace,listblock,richcombo,font,forms,format,horizontalrule,htmlwriter,iframe,wysiwygarea,image,indent,indentblock,indentlist,smiley,justify,menubutton,language,link,list,liststyle,magicline,maximize,newpage,pagebreak,pastetext,pastefromword,preview,print,removeformat,save,selectall,showblocks,showborders,sourcearea,specialchar,
217scayt,stylescombo,tab,table,tabletools,undo,wsc", CKEDITOR.config.skin = "moono-lisa", function () { var e = function (e, t) { var n = CKEDITOR.getUrl("plugins/" + t); e = e.split(","); for (var i = 0; i < e.length; i++)CKEDITOR.skin.icons[e[i]] = { path: n, offset: -e[++i], bgsize: e[++i] } }; CKEDITOR.env.hidpi ? e("about,0,,bold,24,,italic,48,,strike,72,,subscript,96,,superscript,120,,underline,144,,bidiltr,168,,bidirtl,192,,blockquote,216,,copy-rtl,240,,copy,264,,cut-rtl,288,,cut,312,,paste-rtl,336,,paste,360,,bgcolor,384,,textcolor,408,,templates-rtl,432,,templates,456,,copyformatting,480,,creatediv,504,,find-rtl,528,,find,552,,replace,576,,flash,600,,button,624,,checkbox,648,,form,672,,hiddenfield,696,,imagebutton,720,,radio,744,,select-rtl,768,,select,792,,textarea-rtl,816,,textarea,840,,textfield-rtl,864,,textfield,888,,horizontalrule,912,,iframe,936,,image,960,,indent-rtl,984,,indent,1008,,outdent-rtl,1032,,outdent,1056,,smiley,1080,,justifyblock,1104,,justifycenter,1128,,justifyleft,1152,,justifyright,1176,,language,1200,,anchor-rtl,1224,,anchor,1248,,link,1272,,unlink,1296,,bulletedlist-rtl,1320,,bulletedlist,1344,,numberedlist-rtl,1368,,numberedlist,1392,,maximize,1416,,newpage-rtl,1440,,newpage,1464,,pagebreak-rtl,1488,,pagebreak,1512,,pastetext-rtl,1536,,pastetext,1560,,pastefromword-rtl,1584,,pastefromword,1608,,preview-rtl,1632,,preview,1656,,print,1680,,removeformat,1704,,save,1728,,selectall,1752,,showblocks-rtl,1776,,showblocks,1800,,source-rtl,1824,,source,1848,,specialchar,1872,,scayt,1896,,table,1920,,redo-rtl,1944,,redo,1968,,undo-rtl,1992,,undo,2016,,spellchecker,2040,", "icons_hidpi.png") : e("about,0,auto,bold,24,auto,italic,48,auto,strike,72,auto,subscript,96,auto,superscript,120,auto,underline,144,auto,bidiltr,168,auto,bidirtl,192,auto,blockquote,216,auto,copy-rtl,240,auto,copy,264,auto,cut-rtl,288,auto,cut,312,auto,paste-rtl,336,auto,paste,360,auto,bgcolor,384,auto,textcolor,408,auto,templates-rtl,432,auto,templates,456,auto,copyformatting,480,auto,creatediv,504,auto,find-rtl,528,auto,find,552,auto,replace,576,auto,flash,600,auto,button,624,auto,checkbox,648,auto,form,672,auto,hiddenfield,696,auto,imagebutton,720,auto,radio,744,auto,select-rtl,768,auto,select,792,auto,textarea-rtl,816,auto,textarea,840,auto,textfield-rtl,864,auto,textfield,888,auto,horizontalrule,912,auto,iframe,936,auto,image,960,auto,indent-rtl,984,auto,indent,1008,auto,outdent-rtl,1032,auto,outdent,1056,auto,smiley,1080,auto,justifyblock,1104,auto,justifycenter,1128,auto,justifyleft,1152,auto,justifyright,1176,auto,language,1200,auto,anchor-rtl,1224,auto,anchor,1248,auto,link,1272,auto,unlink,1296,auto,bulletedlist-rtl,1320,auto,bulletedlist,1344,auto,numberedlist-rtl,1368,auto,numberedlist,1392,auto,maximize,1416,auto,newpage-rtl,1440,auto,newpage,1464,auto,pagebreak-rtl,1488,auto,pagebreak,1512,auto,pastetext-rtl,1536,auto,pastetext,1560,auto,pastefromword-rtl,1584,auto,pastefromword,1608,auto,preview-rtl,1632,auto,preview,1656,auto,print,1680,auto,removeformat,1704,auto,save,1728,auto,selectall,1752,auto,showblocks-rtl,1776,auto,showblocks,1800,auto,source-rtl,1824,auto,source,1848,auto,specialchar,1872,auto,scayt,1896,auto,table,1920,auto,redo-rtl,1944,auto,redo,1968,auto,undo-rtl,1992,auto,undo,2016,auto,spellchecker,2040,auto", "icons.png") }(), CKEDITOR.lang.languages = { af: 1, sq: 1, ar: 1, eu: 1, bn: 1, bs: 1, bg: 1, ca: 1, "zh-cn": 1, zh: 1, hr: 1, cs: 1, da: 1, nl: 1, en: 1, "en-au": 1, "en-ca": 1, "en-gb": 1, eo: 1, et: 1, fo: 1, fi: 1, fr: 1, "fr-ca": 1, gl: 1, ka: 1, de: 1, "de-ch": 1, el: 1, gu: 1, he: 1, hi: 1, hu: 1, is: 1, id: 1, it: 1, ja: 1, km: 1, ko: 1, ku: 1, lv: 1, lt: 1, mk: 1, ms: 1, mn: 1, no: 1, nb: 1, oc: 1, fa: 1, pl: 1, "pt-br": 1, pt: 1, ro: 1, ru: 1, sr: 1, "sr-latn": 1, si: 1, sk: 1, sl: 1, es: 1, sv: 1, tt: 1, th: 1, tr: 1, ug: 1, uk: 1, vi: 1, cy: 1 })
218}(), function () { var e = function (e, n) { function i() { this.constructor = e } for (var o in n) t.call(n, o) && (e[o] = n[o]); return i.prototype = n.prototype, e.prototype = new i, e.__super__ = n.prototype, e }, t = {}.hasOwnProperty; this.RichEditor = function (t) { function n() { return n.__super__.constructor.apply(this, arguments) } return e(n, t), n.prototype.init = function () { return CKEDITOR.replace(this.$dom.attr("id"), { contentsLangDirection: $(this.dom).data("text-direction") }) }, n }(Behaviour) }.call(this), function () { var e = function (e, n) { function i() { this.constructor = e } for (var o in n) t.call(n, o) && (e[o] = n[o]); return i.prototype = n.prototype, e.prototype = new i, e.__super__ = n.prototype, e }, t = {}.hasOwnProperty; this.ScrollGutter = function (t) { function n() { return n.__super__.constructor.apply(this, arguments) } var i; return e(n, t), n.prototype.init = function () { }, i = $(window).scrollTop(), window.addEventListener("scroll", function () { var e; e = $(window).scrollTop(), $(".block__list__section").each(function () { var t, n, o, r; e > i ? (o = $(this).find(".block__list__gutter:first").css("transform").split(","), r = $(this).find(".block__list__gutter:last").css("transform").split(","), t = parseInt(o[5]) + 1, n = parseInt(r[5]) - 2, o[5] = " " + t + ")", r[5] = " " + n + ")", $(this).find(".block__list__gutter:first").css({ transform: o.join() }), $(this).find(".block__list__gutter:last").css({ transform: r.join() })) : (o = $(this).find(".block__list__gutter:first").css("transform").split(","), r = $(this).find(".block__list__gutter:last").css("transform").split(","), t = parseInt(o[5]) - 1, n = parseInt(r[5]) + 2, o[5] = " " + t + ")", r[5] = " " + n + ")", $(this).find(".block__list__gutter:first").css({ transform: o.join() }), $(this).find(".block__list__gutter:last").css({ transform: r.join() })) }), i = e }), n }(Behaviour) }.call(this), function () { var e = function (e, n) { function i() { this.constructor = e } for (var o in n) t.call(n, o) && (e[o] = n[o]); return i.prototype = n.prototype, e.prototype = new i, e.__super__ = n.prototype, e }, t = {}.hasOwnProperty; this.Select = function (t) { function n() { return n.__super__.constructor.apply(this, arguments) } return e(n, t), n.prototype.init = function () { var e; return e = { width: "100%", allowClear: this.data("allowClear") || !1 }, this.$dom.attr("multiple") && (e.multiple = !0), this.data("autoWidth") && (e.width = null), this.data("tagsMode") && (e.tags = !0), this.data("placeholder") ? e.placeholder = this.data("placeholder") : this.$dom.attr("placeholder") ? e.placeholder = this.$dom.attr("placeholder") : e.placeholder = "Type here", this.$dom.data("maxlenght") && (e.maximumSelectionLength = this.$dom.data("maxlenght")), this.$dom.select2(e) }, n }(Behaviour) }.call(this), function () { var e = function (e, n) { function i() { this.constructor = e } for (var o in n) t.call(n, o) && (e[o] = n[o]); return i.prototype = n.prototype, e.prototype = new i, e.__super__ = n.prototype, e }, t = {}.hasOwnProperty; this.SendEvent = function (t) { function n() { return n.__super__.constructor.apply(this, arguments) } return e(n, t), n.prototype.init = function () { var e, t, n; return t = this.data("category"), e = this.data("action"), n = this.data("label"), this.$dom.click(function () { return window.ga("partner.send", { hitType: "event", eventCategory: t, eventAction: e, eventLabel: n, transport: "beacon" }) }) }, n }(Behaviour) }.call(this), function () { var e = function (e, n) { function i() { this.constructor = e } for (var o in n) t.call(n, o) && (e[o] = n[o]); return i.prototype = n.prototype, e.prototype = new i, e.__super__ = n.prototype, e }, t = {}.hasOwnProperty; this.SendRtmpConfigMail = function (t) { function n() { return n.__super__.constructor.apply(this, arguments) } return e(n, t), n.prototype.init = function () { return this.$submitButton = this.$dom.find("button"), this.$submitButton.click(this.handleSubmit.bind(this)), this.url = this.data("url"), this.liveBlockId = this.$dom.find("[name$='live_block_id]']").val(), this.postId = this.$dom.find("[name$='post_id]']").val(), this.$notice = $("<div style='color: green;'>Email sent successfully</div>"), this.$alert = $("<div style='color: red;'>Email not valid</div>"), this.$notice.hide(), this.$alert.hide(), this.$dom.append(this.$alert), this.$dom.append(this.$notice) }, n.prototype.handleSubmit = function (e) { return this.mailTo = this.$dom.find("[name$='to]']").val(), this.validEmail(this.mailTo) ? $.ajax({ method: "post", url: this.url, data: { live_block_id: this.liveBlockId, to: this.mailTo } }).then(function (e) { return function () { return e.$notice.show() } }(this)) : this.$alert.show(), e.preventDefault() }, n.prototype.validEmail = function (e) { var t; return t = /^([a-zA-Z0-9_.+-])+\@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/, t.test(e) }, n }(Behaviour) }.call(this), function () { var e = function (e, n) { function i() { this.constructor = e } for (var o in n) t.call(n, o) && (e[o] = n[o]); return i.prototype = n.prototype, e.prototype = new i, e.__super__ = n.prototype, e }, t = {}.hasOwnProperty; this.SlideDownElement = function (t) { function n() { return n.__super__.constructor.apply(this, arguments) } return e(n, t), n.prototype.init = function () { return this.$toggler = this.$dom.find(this.data("toggler")), this.$target = this.$dom.find(this.data("target")), this.$target.hide(), this.$toggler.click(function (e) { return function () { return e.$target.is(":hidden") ? (e.$target.slideDown(), e.$toggler.removeClass("icon--arrow-right"), e.$toggler.addClass("icon--arrow-down")) : (e.$target.slideUp(), e.$toggler.removeClass("icon--arrow-down"), e.$toggler.addClass("icon--arrow-right")) } }(this)) }, n }(Behaviour) }.call(this), function (e) { "use strict"; "function" == typeof define && define.amd ? define(["jquery"], e) : "undefined" != typeof exports ? module.exports = e(require("jquery")) : e(jQuery) }(function (e) {
219    "use strict"; var t = window.Slick || {}; t = function () { function t(t, i) { var o, r = this; r.defaults = { accessibility: !0, adaptiveHeight: !1, appendArrows: e
vendor: 12,733 bytes, lines 219-221
219(t), appendDots: e(t), arrows: !0, asNavFor: null, prevArrow: '<button class="slick-prev" aria-label="Previous" type="button">Previous</button>', nextArrow: '<button class="slick-next" aria-label="Next" type="button">Next</button>', autoplay: !1, autoplaySpeed: 3e3, centerMode: !1, centerPadding: "50px", cssEase: "ease", customPaging: function (t, n) { return e('<button type="button" />').text(n + 1) }, dots: !1, dotsClass: "slick-dots", draggable: !0, easing: "linear", edgeFriction: .35, fade: !1, focusOnSelect: !1, focusOnChange: !1, infinite: !0, initialSlide: 0, lazyLoad: "ondemand", mobileFirst: !1, pauseOnHover: !0, pauseOnFocus: !0, pauseOnDotsHover: !1, respondTo: "window", responsive: null, rows: 1, rtl: !1, slide: "", slidesPerRow: 1, slidesToShow: 1, slidesToScroll: 1, speed: 500, swipe: !0, swipeToSlide: !1, touchMove: !0, touchThreshold: 5, useCSS: !0, useTransform: !0, variableWidth: !1, vertical: !1, verticalSwiping: !1, waitForAnimate: !0, zIndex: 1e3 }, r.initials = { animating: !1, dragging: !1, autoPlayTimer: null, currentDirection: 0, currentLeft: null, currentSlide: 0, direction: 1, $dots: null, listWidth: null, listHeight: null, loadIndex: 0, $nextArrow: null, $prevArrow: null, scrolling: !1, slideCount: null, slideWidth: null, $slideTrack: null, $slides: null, sliding: !1, slideOffset: 0, swipeLeft: null, swiping: !1, $list: null, touchObject: {}, transformsEnabled: !1, unslicked: !1 }, e.extend(r, r.initials), r.activeBreakpoint = null, r.animType = null, r.animProp = null, r.breakpoints = [], r.breakpointSettings = [], r.cssTransitions = !1, r.focussed = !1, r.interrupted = !1, r.hidden = "hidden", r.paused = !0, r.positionProp = null, r.respondTo = null, r.rowCount = 1, r.shouldClick = !0, r.$slider = e(t), r.$slidesCache = null, r.transformType = null, r.transitionType = null, r.visibilityChange = "visibilitychange", r.windowWidth = 0, r.windowTimer = null, o = e(t).data("slick") || {}, r.options = e.extend({}, r.defaults, i, o), r.currentSlide = r.options.initialSlide, r.originalSettings = r.options, "undefined" != typeof document.mozHidden ? (r.hidden = "mozHidden", r.visibilityChange = "mozvisibilitychange") : "undefined" != typeof document.webkitHidden && (r.hidden = "webkitHidden", r.visibilityChange = "webkitvisibilitychange"), r.autoPlay = e.proxy(r.autoPlay, r), r.autoPlayClear = e.proxy(r.autoPlayClear, r), r.autoPlayIterator = e.proxy(r.autoPlayIterator, r), r.changeSlide = e.proxy(r.changeSlide, r), r.clickHandler = e.proxy(r.clickHandler, r), r.selectHandler = e.proxy(r.selectHandler, r), r.setPosition = e.proxy(r.setPosition, r), r.swipeHandler = e.proxy(r.swipeHandler, r), r.dragHandler = e.proxy(r.dragHandler, r), r.keyHandler = e.proxy(r.keyHandler, r), r.instanceUid = n++, r.htmlExpr = /^(?:\s*(<[\w\W]+>)[^>]*)$/, r.registerBreakpoints(), r.init(!0) } var n = 0; return t }(), t.prototype.activateADA = function () { var e = this; e.$slideTrack.find(".slick-active").attr({ "aria-hidden": "false" }).find("a, input, button, select").attr({ tabindex: "0" }) }, t.prototype.addSlide = t.prototype.slickAdd = function (t, n, i) {
220        var o = this; if ("boolean" == typeof n) i = n, n = null; else if (0 > n || n >= o.slideCount) return !1; o.unload(), "number" == typeof n ? 0 === n && 0 === o.$slides.length ? e(t).appendTo(o.$slideTrack) : i ? e(t).insertBefore(o.$slides.eq(n)) : e(t).insertAfter(o.$slides.eq(n)) : i === !0 ? e(t).prependTo(o.$slideTrack) : e(t).appendTo(o.$slideTrack), o.$slides = o.$slideTrack.children(this.options.slide), o.$slideTrack.children(this.options.slide).detach(), o.$slideTrack.append(o.$slides), o.$slides.each(function (t, n) { e(n).attr("data-slick-index", t) }), o.$slidesCache = o.$slides, o.reinit()
221    }, t.prototype.animateHeight = function () { var e = this; if (1 === e.options.slidesToShow && e.options.adaptiveHeight === !0 && e.options.vertical === !1) { var t = e.$slides.eq(e.currentSlide).outerHeight(!0); e.$list.animate({ height: t }, e.options.speed) } }, t.prototype.animateSlide = function (t, n) { var i = {}, o = this; o.animateHeight(), o.options.rtl === !0 && o.options.vertical === !1 && (t = -t), o.transformsEnabled === !1 ? o.options.vertical === !1 ? o.$slideTrack.animate({ left: t }, o.options.speed, o.options.easing, n) : o.$slideTrack.animate({ top: t }, o.options.speed, o.options.easing, n) : o.cssTransitions === !1 ? (o.options.rtl === !0 && (o.currentLeft = -o.currentLeft), e({ animStart: o.currentLeft }).animate({ animStart: t }, { duration: o.options.speed, easing: o.options.easing, step: function (e) { e = Math.ceil(e), o.options.vertical === !1 ? (i[o.animType] = "translate(" + e + "px, 0px)", o.$slideTrack.css(i)) : (i[o.animType] = "translate(0px," + e + "px)", o.$slideTrack.css(i)) }, complete: function () { n && n.call() } })) : (o.applyTransition(), t = Math.ceil(t), o.options.vertical === !1 ? i[o.animType] = "translate3d(" + t + "px, 0px, 0px)" : i[o.animType] = "translate3d(0px," + t + "px, 0px)", o.$slideTrack.css(i), n && setTimeout(function () { o.disableTransition(), n.call() }, o.options.speed)) }, t.prototype.getNavTarget = function () { var t = this, n = t.options.asNavFor; return n && null !== n && (n = e(n).not(t.$slider)), n }, t.prototype.asNavFor = function (t) { var n = this, i = n.getNavTarget(); null !== i && "object" == typeof i && i.each(function () { var n = e(this).slick("getSlick"); n.unslicked || n.slideHandler(t, !0) }) }, t.prototype.applyTransition = function (e) { var t = this, n = {}; t.options.fade === !1 ? n[t.transitionType] = t.transformType + " " + t.options.speed + "ms " + t.options.cssEase : n[t.transitionType] = "opacity " + t.options.speed + "ms " + t.options.cssEase, t.options.fade === !1 ? t.$slideTrack.css(n) : t.$slides.eq(e).css(n) }, t.prototype.autoPlay = function () { var e = this; e.autoPlayClear(), e.slideCount > e.options.slidesToShow && (e.autoPlayTimer = setInterval(e.autoPlayIterator, e.options.autoplaySpeed)) }, t.prototype.autoPlayClear = function () { var e = this; e.autoPlayTimer && clearInterval(e.autoPlayTimer) }, t.prototype.autoPlayIterator = function () { var e = this, t = e.currentSlide + e.options.slidesToScroll; e.paused || e.interrupted || e.focussed || (e.options.infinite === !1 && (1 === e.direction && e.currentSlide + 1 === e.slideCount - 1 ? e.direction = 0 : 0 === e.direction && (t = e.currentSlide - e.options.slidesToScroll, e.currentSlide - 1 === 0 && (e.direction = 1))), e.slideHandler(t)) }, t.prototype.buildArrows = function () { var t = this; t.options.arrows === !0 && (t.$prevArrow = e(t.options.prevArrow).addClass("slick-arrow"), t.$nextArrow = e(t.options.nextArrow).addClass("slick-arrow"), t.slideCount > t.options.slidesToShow ? (t.$prevArrow.removeClass("slick-hidden").removeAttr("aria-hidden tabindex"), t.$nextArrow.removeClass("slick-hidden").removeAttr("aria-hidden tabindex"), t.htmlExpr.test(t.options.prevArrow) && t.$prevArrow.prependTo(t.options.appendArrows), t.htmlExpr.test(t.options.nextArrow) && t.$nextArrow.appendTo(t.options.appendArrows), t.options.infinite !== !0 && t.$prevArrow.addClass("slick-disabled").attr("aria-disabled", "true")) : t.$prevArrow.add(t.$nextArrow).addClass("slick-hidden").attr({ "aria-disabled": "true", tabindex: "-1" })) }, t.prototype.buildDots = function () { var t, n, i = this; if (i.options.dots === !0 && i.slideCount > i.options.slidesToShow) { for (i.$slider.addClass("slick-dotted"), n = e("<ul />").addClass(i.options.dotsClass), t = 0; t <= i.getDotCount(); t += 1)n.append(e("<li />").append(i.options.customPaging.call(this, i, t))); i.$dots = n.appendTo(i.options.appendDots), i.$dots.find("li").first().addClass("slick-active") } }, t.prototype.buildOut = function () { var t = this; t.$slides = t.$slider.children(t.options.slide + ":not(.slick-cloned)").addClass("slick-slide"), t.slideCount = t.$slides.length, t.$slides.each(function (t, n) { e(n).attr("data-slick-index", t).data("originalStyling", e(n).attr("style") || "") }), t.$slider.addClass("slick-slider"), t.$slideTrack = 0 === t.slideCount ? e('<div class="slick-track"/>').appendTo(t.$slider) : t.$slides.wrapAll('<div class="slick-track"/>').parent(), t.$list = t.$slideTrack.wrap('<div class="slick-list"/>').parent(), t.$slideTrack.css("opacity", 0), t.options.centerMode !== !0 && t.options.swipeToSlide !== !0 || (t.options.slidesToScroll = 1), e("img[data-lazy]", t.$slider).not("[src]").addClass("slick-loading"), t.setupInfinite(), t.buildArrows(), t.buildDots(), t.updateDots(), t.setSlideClasses("number" == typeof t.currentSlide ? t.currentSlide : 0), t.options.draggable === !0 && t.$list.addClass("draggable") }, t.prototype.buildRows = function () { var e, t, n, i, o, r, s, a = this; if (i = document.createDocumentFragment(), r = a.$slider.children(), a.options.rows > 0) { for (s = a.options.slidesPerRow * a.options.rows, o = Math.ceil(r.length / s), e = 0; o > e; e++) { var l = document.createElement("div"); for (t = 0; t < a.options.rows; t++) { var c = document.createElement("div"); for (n = 0; n < a.options.slidesPerRow; n++) { var d = e * s + (t * a.options.slidesPerRow + n); r.get(d) && c.appendChild(r.get(d)) } l.appendChild(c) } i.appendChild(l) } a.$slider.empty().append(i), a.$slider.children().children().children().css({ width: 100 / a.options.slidesPerRow + "%", display: "inline-block" }) } }, t.prototype.checkResponsive = function (t, n) { var i, o, r, s = this, a = !1, l = s.$slider.width(), c = window.innerWidth || e(window).width(); if ("window" === s.respondTo ? r = c : "slider" === s.respondTo ? r = l : "min" === s.respondTo && (r = Math.min(c, l)), s.options.responsive && s.options.responsive.length && null !== s.options.responsive) { o = null; for (i in s.breakpoints) s.breakpoints.hasOwnProperty(i) && (s.originalSettings.mobileFirst === !1 ? r < s.breakpoints[i] && (o = s.breakpoints[i]) : r > s.breakpoints[i] && (o = s.breakpoints[i])); null !== o ? null !== s.activeBreakpoint ? (o !== s.activeBreakpoint || n) && (s.activeBreakpoint = o, "unslick" === s.breakpointSettings[o] ? s.unslick(o) : (s.options = e.extend({}, s.originalSettings, s.breakpointSettings[o]), t === !0 && (s.currentSlide = s.options.initialSlide), s.refresh(t)), a = o) : (s.activeBreakpoint = o, "unslick" === s.breakpointSettings[o] ? s.unslick(o) : (s.options = e.extend({}, s.originalSettings, s.breakpointSettings[o]), t === !0 && (s.currentSlide = s.options.initialSlide), s.refresh(t)), a = o) : null !== s.activeBreakpoint && (s.activeBreakpoint = null, s.options = s.originalSettings, t === !0 && (s.currentSlide = s.options.initialSlide), s.refresh(t), a = o), t || a === !1 || s.$slider.trigger("breakpoint", [s, a]) } }, t.prototype.changeSlide = function (t, n) { var i, o, r, s = this, a = e(t.currentTarget); switch (a.is("a") && t.preventDefault(), a.is("li") || (a = a.closest("li")), r = s.slideCount % s.options.slidesToScroll !== 0, i = r ? 0 : (s.slideCount - s.currentSlide) % s.options.slidesToScroll, t.data.message) { case "previous": o = 0 === i ? s.options.slidesToScroll : s.options.slidesToShow - i, s.slideCount > s.options.slidesToShow && s.slideHandler(s.currentSlide - o, !1, n); break; case "next": o = 0 === i ? s.options.slidesToScroll : i, s.slideCount > s.options.slidesToShow && s.slideHandler(s.currentSlide + o, !1, n); break; case "index": var l = 0 === t.data.index ? 0 : t.data.index || a.index() * s.options.slidesToScroll; s.slideHandler(s.checkNavigable(l), !1, n), a.children().trigger("focus"); break; default: return } }, t.prototype.checkNavigable = function (e) { var t, n, i = this; if (t = i.getNavigableIndexes(), n = 0, e > t[t.length - 1]) e = t[t.length - 1]; else for (var o in t) { if (e < t[o]) { e = n; break } n = t[o] } return e }, t.prototype.cleanUpEvents = function () { var t = this; t.options.dots && null !== t.$dots && (e("li", t.$dots).off("click.slick", t.changeSlide).off("mouseenter.slick", e.proxy(t.interrupt, t, !0)).off("mouseleave.slick", e.proxy(t.interrupt, t, !1)), t.options.accessibility === !0 && t.$dots.off("keydown.slick", t.keyHandler)), t.$slider.off("focus.slick blur.slick"), t.options.arrows === !0 && t.slideCount > t.options.slidesToShow && (t.$prevArrow && t.$prevArrow.off("click.slick", t.changeSlide), t.$nextArrow && t.$nextArrow.off("click.slick", t.changeSlide), t.options.accessibility === !0 && (t.$prevArrow && t.$prevArrow.off("keydown.slick", t.keyHandler), t.$nextArrow && t.$nextArrow.off("keydown.slick", t.keyHandler))), t.$list.off("touchstart.slick mousedown.slick", t.swipeHandler), t.$list.off("touchmove.slick mousemove.slick", t.swipeHandler), t.$list.off("touchend.slick mouseup.slick", t.swipeHandler), t.$list.off("touchcancel.slick mouseleave.
221slick", t.swipeHandler), t.$list.off("click.slick", t.clickHandler), e(document).off(t.visibilityChange, t.visibility), t.cleanUpSlideEvents(), t.options.accessibility === !0 && t.$list.off("keydown.slick", t.keyHandler), t.options.focusOnSelect === !0 && e(t.$slideTrack).children().off("click.slick", t.selectHandler), e(window).off("orientationchange.slick.slick-" + t.instanceUid, t.orientationChange), e(window).off("resize.slick.slick-" + t.instanceUid, t.resize), e("[draggable!=true]", t.$slideTrack).off("dragstart", t.preventDefault), e(window).off("load.slick.slick-" + t.instanceUid, t.setPosition) }, t.prototype.cleanUpSlideEvents = function () { var t = this; t.$list.off("mouseenter.slick", e.proxy(t.interrupt, t, !0)), t.$list.off("mouseleave.slick", e.proxy(t.interrupt, t, !1)) }, t.prototype.cleanUpRows = function () { var e, t = this; t.options.rows > 0 && (e = t.$slides.children().children(), e.removeAttr("style"), t.$slider.empty().append(e)) }, t.prototype.clickHandler = function (e) { var t = this; t.shouldClick === !1 && (e.stopImmediatePropagation(), e.stopPropagation(), e.preventDefault()) }, t.prototype.destroy = function (t) { var n = this; n.autoPlayClear(), n.touchObject = {}, n.cleanUpEvents(), e(".slick-cloned", n.$slider).detach(), n.$dots && n.$dots.remove(), n.$prevArrow && n.$prevArrow.length && (n.$prevArrow.removeClass("slick-disabled slick-arrow slick-hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display", ""), n.htmlExpr.test(n.options.prevArrow) && n.$prevArrow.remove()), n.$nextArrow && n.$nextArrow.length && (n.$nextArrow.removeClass("slick-disabled slick-arrow slick-hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display", ""), n.htmlExpr.test(n.options.nextArrow) && n.$nextArrow.remove()), n.$slides && (n.$slides.removeClass("slick-slide slick-active slick-center slick-visible slick-current").removeAttr("aria-hidden").removeAttr("data-slick-index").each(function () { e(this).attr("style", e(this).data("originalStyling")) }), n.$slideTrack.children(this.options.slide).detach(), n.$slideTrack.detach(), n.$list.detach(), n.$slider.append(n.$slides)), n.cleanUpRows(), n.$slider.removeClass("slick-slider"), n.$slider.removeClass("slick-initialized"), n.$slider.removeClass("slick-dotted"), n.unslicked = !0, t || n.$slider.trigger("destroy", [n]) }, t.prototype.disableTransition = function (e) { var t = this, n = {}; n[t.transitionType] = "", t.options.fade === !1 ? t.$slideTrack.css(n) : t.$slides.eq(e).css(n) }, t.prototype.fadeSlide = function (e, t) { var n = this; n.cssTransitions === !1 ? (n.$slides.eq(e).css({ zIndex: n.options.zIndex }), n.$slides.eq(e).animate({ opacity: 1 }, n.options.speed, n.options.easing, t)) : (n.applyTransition(e), n.$slides.eq(e).css({ opacity: 1, zIndex: n.options.zIndex }), t && setTimeout(function () { n.disableTransition(e), t.call() }, n.options.speed)) }, t.prototype.fadeSlideOut = function (e) { var t = this; t.cssTransitions === !1 ? t.$slides.eq(e).animate({ opacity: 0, zIndex: t.options.zIndex - 2 }, t.options.speed, t.options.easing) : (t.applyTransition(e), t.$slides.eq(e).css({ opacity: 0, zIndex: t.options.zIndex - 2 })) }, t.prototype.filterSlides = t.prototype.slickFilter = function (e) { var t = this; null !== e && (t.$slidesCache = t.$slides, t.unload(), t.$slideTrack.children(this.options.slide).detach(), t.$slidesCache.filter(e).appendTo(t.$slideTrack), t.reinit()) }, t.prototype.focusHandler = function () { var t = this; t.$slider.off("focus.slick blur.slick").on("focus.slick blur.slick", "*", function (n) { n.stopImmediatePropagation(); var i = e(this); setTimeout(function () { t.options.pauseOnFocus && (t.focussed = i.is(":focus"), t.autoPlay()) }, 0) }) }, t.prototype.getCurrent = t.prototype.slickCurrentSlide = function () { var e = this; return e.currentSlide }, t.prototype.getDotCount = function () { var e = this, t = 0, n = 0, i = 0; if (e.options.infinite === !0) if (e.slideCount <= e.options.slidesToShow) ++i; else for (; t < e.slideCount;)++i, t = n + e.options.slidesToScroll, n += e.options.slidesToScroll <= e.options.slidesToShow ? e.options.slidesToScroll : e.options.slidesToShow; else if (e.options.centerMode === !0) i = e.slideCount; else if (e.options.asNavFor) for (; t < e.slideCount;)++i, t = n + e.options.slidesToScroll, n += e.options.slidesToScroll <= e.options.slidesToShow ? e.options.slidesToScroll : e.options.slidesToShow;
vendor: 25,846 bytes, lines 221-224
221 else i = 1 + Math.ceil((e.slideCount - e.options.slidesToShow) / e.options.slidesToScroll); return i - 1 }, t.prototype.getLeft = function (e) { var t, n, i, o, r = this, s = 0; return r.slideOffset = 0, n = r.$slides.first().outerHeight(!0), r.options.infinite === !0 ? (r.slideCount > r.options.slidesToShow && (r.slideOffset = r.slideWidth * r.options.slidesToShow * -1, o = -1, r.options.vertical === !0 && r.options.centerMode === !0 && (2 === r.options.slidesToShow ? o = -1.5 : 1 === r.options.slidesToShow && (o = -2)), s = n * r.options.slidesToShow * o), r.slideCount % r.options.slidesToScroll !== 0 && e + r.options.slidesToScroll > r.slideCount && r.slideCount > r.options.slidesToShow && (e > r.slideCount ? (r.slideOffset = (r.options.slidesToShow - (e - r.slideCount)) * r.slideWidth * -1, s = (r.options.slidesToShow - (e - r.slideCount)) * n * -1) : (r.slideOffset = r.slideCount % r.options.slidesToScroll * r.slideWidth * -1, s = r.slideCount % r.options.slidesToScroll * n * -1))) : e + r.options.slidesToShow > r.slideCount && (r.slideOffset = (e + r.options.slidesToShow - r.slideCount) * r.slideWidth, s = (e + r.options.slidesToShow - r.slideCount) * n), r.slideCount <= r.options.slidesToShow && (r.slideOffset = 0, s = 0), r.options.centerMode === !0 && r.slideCount <= r.options.slidesToShow ? r.slideOffset = r.slideWidth * Math.floor(r.options.slidesToShow) / 2 - r.slideWidth * r.slideCount / 2 : r.options.centerMode === !0 && r.options.infinite === !0 ? r.slideOffset += r.slideWidth * Math.floor(r.options.slidesToShow / 2) - r.slideWidth : r.options.centerMode === !0 && (r.slideOffset = 0, r.slideOffset += r.slideWidth * Math.floor(r.options.slidesToShow / 2)), t = r.options.vertical === !1 ? e * r.slideWidth * -1 + r.slideOffset : e * n * -1 + s, r.options.variableWidth === !0 && (i = r.slideCount <= r.options.slidesToShow || r.options.infinite === !1 ? r.$slideTrack.children(".slick-slide").eq(e) : r.$slideTrack.children(".slick-slide").eq(e + r.options.slidesToShow), t = r.options.rtl === !0 ? i[0] ? -1 * (r.$slideTrack.width() - i[0].offsetLeft - i.width()) : 0 : i[0] ? -1 * i[0].offsetLeft : 0, r.options.centerMode === !0 && (i = r.slideCount <= r.options.slidesToShow || r.options.infinite === !1 ? r.$slideTrack.children(".slick-slide").eq(e) : r.$slideTrack.children(".slick-slide").eq(e + r.options.slidesToShow + 1), t = r.options.rtl === !0 ? i[0] ? -1 * (r.$slideTrack.width() - i[0].offsetLeft - i.width()) : 0 : i[0] ? -1 * i[0].offsetLeft : 0, t += (r.$list.width() - i.outerWidth()) / 2)), t }, t.prototype.getOption = t.prototype.slickGetOption = function (e) { var t = this; return t.options[e] }, t.prototype.getNavigableIndexes = function () { var e, t = this, n = 0, i = 0, o = []; for (t.options.infinite === !1 ? e = t.slideCount : (n = -1 * t.options.slidesToScroll, i = -1 * t.options.slidesToScroll, e = 2 * t.slideCount); e > n;)o.push(n), n = i + t.options.slidesToScroll, i += t.options.slidesToScroll <= t.options.slidesToShow ? t.options.slidesToScroll : t.options.slidesToShow; return o }, t.prototype.getSlick = function () { return this }, t.prototype.getSlideCount = function () { var t, n, i, o = this; return i = o.options.centerMode === !0 ? o.slideWidth * Math.floor(o.options.slidesToShow / 2) : 0, o.options.swipeToSlide === !0 ? (o.$slideTrack.find(".slick-slide").each(function (t, r) { return r.offsetLeft - i + e(r).outerWidth() / 2 > -1 * o.swipeLeft ? (n = r, !1) : void 0 }), t = Math.abs(e(n).attr("data-slick-index") - o.currentSlide) || 1) : o.options.slidesToScroll }, t.prototype.goTo = t.prototype.slickGoTo = function (e, t) { var n = this; n.changeSlide({ data: { message: "index", index: parseInt(e) } }, t) }, t.prototype.init = function (t) { var n = this; e(n.$slider).hasClass("slick-initialized") || (e(n.$slider).addClass("slick-initialized"), n.buildRows(), n.buildOut(), n.setProps(), n.startLoad(), n.loadSlider(), n.initializeEvents(), n.updateArrows(), n.updateDots(), n.checkResponsive(!0), n.focusHandler()), t && n.$slider.trigger("init", [n]), n.options.accessibility === !0 && n.initADA(), n.options.autoplay && (n.paused = !1, n.autoPlay()) }, t.prototype.initADA = function () { var t = this, n = Math.ceil(t.slideCount / t.options.slidesToShow), i = t.getNavigableIndexes().filter(function (e) { return e >= 0 && e < t.slideCount }); t.$slides.add(t.$slideTrack.find(".slick-cloned")).attr({ "aria-hidden": "true", tabindex: "-1" }).find("a, input, button, select").attr({ tabindex: "-1" }), null !== t.$dots && (t.$slides.not(t.$slideTrack.find(".slick-cloned")).each(function (n) { var o = i.indexOf(n); if (e(this).attr({ role: "tabpanel", id: "slick-slide" + t.instanceUid + n, tabindex: -1 }), -1 !== o) { var r = "slick-slide-control" + t.instanceUid + o; e("#" + r).length && e(this).attr({ "aria-describedby": r }) } }), t.$dots.attr("role", "tablist").find("li").each(function (o) { var r = i[o]; e(this).attr({ role: "presentation" }), e(this).find("button").first().attr({ role: "tab", id: "slick-slide-control" + t.instanceUid + o, "aria-controls": "slick-slide" + t.instanceUid + r, "aria-label": o + 1 + " of " + n, "aria-selected": null, tabindex: "-1" }) }).eq(t.currentSlide).find("button").attr({ "aria-selected": "true", tabindex: "0" }).end()); for (var o = t.currentSlide, r = o + t.options.slidesToShow; r > o; o++)t.options.focusOnChange ? t.$slides.eq(o).attr({ tabindex: "0" }) : t.$slides.eq(o).removeAttr("tabindex"); t.activateADA() }, t.prototype.initArrowEvents = function () { var e = this; e.options.arrows === !0 && e.slideCount > e.options.slidesToShow && (e.$prevArrow.off("click.slick").on("click.slick", { message: "previous" }, e.changeSlide), e.$nextArrow.off("click.slick").on("click.slick", { message: "next" }, e.changeSlide), e.options.accessibility === !0 && (e.$prevArrow.on("keydown.slick", e.keyHandler), e.$nextArrow.on("keydown.slick", e.keyHandler))) }, t.prototype.initDotEvents = function () { var t = this; t.options.dots === !0 && t.slideCount > t.options.slidesToShow && (e("li", t.$dots).on("click.slick", { message: "index" }, t.changeSlide), t.options.accessibility === !0 && t.$dots.on("keydown.slick", t.keyHandler)), t.options.dots === !0 && t.options.pauseOnDotsHover === !0 && t.slideCount > t.options.slidesToShow && e("li", t.$dots).on("mouseenter.slick", e.proxy(t.interrupt, t, !0)).on("mouseleave.slick", e.proxy(t.interrupt, t, !1)) }, t.prototype.initSlideEvents = function () { var t = this; t.options.pauseOnHover && (t.$list.on("mouseenter.slick", e.proxy(t.interrupt, t, !0)), t.$list.on("mouseleave.slick", e.proxy(t.interrupt, t, !1))) }, t.prototype.initializeEvents = function () { var t = this; t.initArrowEvents(), t.initDotEvents(), t.initSlideEvents(), t.$list.on("touchstart.slick mousedown.slick", { action: "start" }, t.swipeHandler), t.$list.on("touchmove.slick mousemove.slick", { action: "move" }, t.swipeHandler), t.$list.on("touchend.slick mouseup.slick", { action: "end" }, t.swipeHandler), t.$list.on("touchcancel.slick mouseleave.slick", { action: "end" }, t.swipeHandler), t.$list.on("click.slick", t.clickHandler), e(document).on(t.visibilityChange, e.proxy(t.visibility, t)), t.options.accessibility === !0 && t.$list.on("keydown.slick", t.keyHandler), t.options.focusOnSelect === !0 && e(t.$slideTrack).children().on("click.slick", t.selectHandler), e(window).on("orientationchange.slick.slick-" + t.instanceUid, e.proxy(t.orientationChange, t)), e(window).on("resize.slick.slick-" + t.instanceUid, e.proxy(t.resize, t)), e("[draggable!=true]", t.$slideTrack).on("dragstart", t.preventDefault), e(window).on("load.slick.slick-" + t.instanceUid, t.setPosition), e(t.setPosition) }, t.prototype.initUI = function () { var e = this; e.options.arrows === !0 && e.slideCount > e.options.slidesToShow && (e.$prevArrow.show(), e.$nextArrow.show()), e.options.dots === !0 && e.slideCount > e.options.slidesToShow && e.$dots.show() }, t.prototype.keyHandler = function (e) { var t = this; e.target.tagName.match("TEXTAREA|INPUT|SELECT") || (37 === e.keyCode && t.options.accessibility === !0 ? t.changeSlide({ data: { message: t.options.rtl === !0 ? "next" : "previous" } }) : 39 === e.keyCode && t.options.accessibility === !0 && t.changeSlide({ data: { message: t.options.rtl === !0 ? "previous" : "next" } })) }, t.prototype.lazyLoad = function () { function t(t) { e("img[data-lazy]", t).each(function () { var t = e(this), n = e(this).attr("data-lazy"), i = e(this).attr("data-srcset"), o = e(this).attr("data-sizes") || s.$slider.attr("data-sizes"), r = document.createElement("img"); r.onload = function () { t.animate({ opacity: 0 }, 100, function () { i && (t.attr("srcset", i), o && t.attr("sizes", o)), t.attr("src", n).animate({ opacity: 1 }, 200, function () { t.removeAttr("data-lazy data-srcset data-sizes").removeClass("slick-loading") }), s.$slider.trigger("lazyLoaded", [s, t, n]) }) }, r.onerror = function () { t.removeAttr("data-lazy").removeClass("slick-loading").addClass("slick-lazyload-error"), s.$slider.trigger("lazyLoadError", [s, t, n]) }, r.src = n }) } var n, i, o, r, s = this; if (s.options.centerMode === !0 ? s.options.infinite === !0 ? (o = s.currentSlide + (s.options.slidesToShow / 2 + 1), r = o + s.options.slidesToShow + 2) : (o = Math.max(0, s.currentSlide - (s.options.slidesToShow / 2 + 1)), r = 2 + (s.options.slidesToShow / 2 + 1) + s.currentSlide) : (o = s.options.infinite ? s.options.slidesToShow + s.currentSlide : s.currentSlide, r = Math.ceil(o + s.options.slidesToShow), s.options.fade === !0 && (o > 0 && o--, r <= s.slideCount && r++)), n = s.$slider.find(".slick-slide").slice(o, r), "anticipated" === s.options.lazyLoad) for (var a = o - 1, l = r, c = s.$slider.find(".slick-slide"), d = 0; d < s.options.slidesToScroll; d++)0 > a && (a = s.slideCount - 1), n = n.add(c.eq(a)), n = n.add(c.eq(l)), a--, l++; t(n), s.slideCount <= s.options.slidesToShow ? (i = s.$slider.find(".slick-slide"), t(i)) : s.currentSlide >= s.slideCount - s.options.slidesToShow ? (i = s.$slider.find(".slick-cloned").slice(0, s.options.slidesToShow), t(i)) : 0 === s.currentSlide && (i = s.$slider.find(".slick-cloned").slice(-1 * s.options.slidesToShow), t(i)) }, t.prototype.loadSlider = function () { var e = this; e.setPosition(), e.$slideTrack.css({ opacity: 1 }), e.$slider.removeClass("slick-loading"), e.initUI(), "progressive" === e.options.lazyLoad && e.progressiveLazyLoad() }, t.prototype.next = t.prototype.slickNext = function () { var e = this; e.changeSlide({ data: { message: "next" } }) }, t.prototype.orientationChange = function () { var e = this; e.checkResponsive(), e.setPosition() }, t.prototype.pause = t.prototype.slickPause = function () { var e = this; e.autoPlayClear(), e.paused = !0 }, t.prototype.play = t.prototype.slickPlay = function () { var e = this; e.autoPlay(), e.options.autoplay = !0, e.paused = !1, e.focussed = !1, e.interrupted = !1 }, t.prototype.postSlide = function (t) { var n = this; if (!n.unslicked && (n.$slider.trigger("afterChange", [n, t]), n.animating = !1, n.slideCount > n.options.slidesToShow && n.setPosition(), n.swipeLeft = null, n.options.autoplay && n.autoPlay(), n.options.accessibility === !0 && (n.initADA(), n.options.focusOnChange))) { var i = e(n.$slides.get(n.currentSlide)); i.attr("tabindex", 0).focus() } }, t.prototype.prev = t.prototype.slickPrev = function () { var e = this; e.changeSlide({ data: { message: "previous" } }) }, t.prototype.preventDefault = function (e) { e.preventDefault() }, t.prototype.progressiveLazyLoad = function (t) { t = t || 1; var n, i, o, r, s, a = this, l = e("img[data-lazy]", a.$slider); l.length ? (n = l.first(), i = n.attr("data-lazy"), o = n.attr("data-srcset"), r = n.attr("data-sizes") || a.$slider.attr("data-sizes"), s = document.createElement("img"), s.onload = function () { o && (n.attr("srcset", o), r && n.attr("sizes", r)), n.attr("src", i).removeAttr("data-lazy data-srcset data-sizes").removeClass("slick-loading"), a.options.adaptiveHeight === !0 && a.setPosition(), a.$slider.trigger("lazyLoaded", [a, n, i]), a.progressiveLazyLoad() }, s.onerror = function () { 3 > t ? setTimeout(function () { a.progressiveLazyLoad(t + 1) }, 500) : (n.removeAttr("data-lazy").removeClass("slick-loading").addClass("slick-lazyload-error"), a.$slider.trigger("lazyLoadError", [a, n, i]), a.progressiveLazyLoad()) }, s.src = i) : a.$slider.trigger("allImagesLoaded", [a]) }, t.prototype.refresh = function (t) { var n, i, o = this; i = o.slideCount - o.options.slidesToShow, !o.options.infinite && o.currentSlide > i && (o.currentSlide = i), o.slideCount <= o.options.slidesToShow && (o.currentSlide = 0), n = o.currentSlide, o.destroy(!0), e.extend(o, o.initials, { currentSlide: n }), o.init(), t || o.changeSlide({ data: { message: "index", index: n } }, !1) }, t.prototype.registerBreakpoints = function () { var t, n, i, o = this, r = o.options.responsive || null; if ("array" === e.type(r) && r.length) { o.respondTo = o.options.respondTo || "window"; for (t in r) if (i = o.breakpoints.length - 1, r.hasOwnProperty(t)) { for (n = r[t].breakpoint; i >= 0;)o.breakpoints[i] && o.breakpoints[i] === n && o.breakpoints.splice(i, 1), i--; o.breakpoints.push(n), o.breakpointSettings[n] = r[t].settings } o.breakpoints.sort(function (e, t) { return o.options.mobileFirst ? e - t : t - e }) } }, t.prototype.reinit = function () { var t = this; t.$slides = t.$slideTrack.children(t.options.slide).addClass("slick-slide"), t.slideCount = t.$slides.length, t.currentSlide >= t.slideCount && 0 !== t.currentSlide && (t.currentSlide = t.currentSlide - t.options.slidesToScroll), t.slideCount <= t.options.slidesToShow && (t.currentSlide = 0), t.registerBreakpoints(), t.setProps(), t.setupInfinite(), t.buildArrows(), t.updateArrows(), t.initArrowEvents(), t.buildDots(), t.updateDots(), t.initDotEvents(), t.cleanUpSlideEvents(), t.initSlideEvents(), t.checkResponsive(!1, !0), t.options.focusOnSelect === !0 && e(t.$slideTrack).children().on("click.slick", t.selectHandler), t.setSlideClasses("number" == typeof t.currentSlide ? t.currentSlide : 0), t.setPosition(), t.focusHandler(), t.paused = !t.options.autoplay, t.autoPlay(), t.$slider.trigger("reInit", [t]) }, t.prototype.resize = function () { var t = this; e(window).width() !== t.windowWidth && (clearTimeout(t.windowDelay), t.windowDelay = window.setTimeout(function () { t.windowWidth = e(window).width(), t.checkResponsive(), t.unslicked || t.setPosition() }, 50)) }, t.prototype.removeSlide = t.prototype.slickRemove = function (e, t, n) { var i = this; return "boolean" == typeof e ? (t = e, e = t === !0 ? 0 : i.slideCount - 1) : e = t === !0 ? --e : e, i.slideCount < 1 || 0 > e || e > i.slideCount - 1 ? !1 : (i.unload(), n === !0 ? i.$slideTrack.children().remove() : i.$slideTrack.children(this.options.slide).eq(e).remove(), i.$slides = i.$slideTrack.children(this.options.slide), i.$slideTrack.children(this.options.slide).detach(), i.$slideTrack.append(i.$slides), i.$slidesCache = i.$slides, void i.reinit()) }, t.prototype.setCSS = function (e) { var t, n, i = this, o = {}; i.options.rtl === !0 && (e = -e), t = "left" == i.positionProp ? Math.ceil(e) + "px" : "0px", n = "top" == i.positionProp ? Math.ceil(e) + "px" : "0px", o[i.positionProp] = e, i.transformsEnabled === !1 ? i.$slideTrack.css(o) : (o = {}, i.cssTransitions === !1 ? (o[i.animType] = "translate(" + t + ", " + n + ")", i.$slideTrack.css(o)) : (o[i.animType] = "translate3d(" + t + ", " + n + ", 0px)", i.$slideTrack.css(o))) }, t.prototype.setDimensions = function () { var e = this; e.options.vertical === !1 ? e.options.centerMode === !0 && e.$list.css({ padding: "0px " + e.options.centerPadding }) : (e.$list.height(e.$slides.first().outerHeight(!0) * e.options.slidesToShow), e.options.centerMode === !0 && e.$list.css({ padding: e.options.centerPadding + " 0px" })), e.listWidth = e.$list.width(), e.listHeight = e.$list.height(), e.options.vertical === !1 && e.options.variableWidth === !1 ? (e.slideWidth = Math.ceil(e.listWidth / e.options.slidesToShow), e.$slideTrack.width(Math.ceil(e.slideWidth * e.$slideTrack.children(".slick-slide").length))) : e.options.variableWidth === !0 ? e.$slideTrack.width(5e3 * e.slideCount) : (e.slideWidth = Math.ceil(e.listWidth), e.$slideTrack.height(Math.ceil(e.$slides.first().outerHeight(!0) * e.$slideTrack.children(".slick-slide").length))); var t = e.$slides.first().outerWidth(!0) - e.$slides.first().width(); e.options.variableWidth === !1 && e.$slideTrack.children(".slick-slide").width(e.slideWidth - t) }, t.prototype.setFade = function () { var t, n = this; n.$slides.each(function (i, o) { t = n.slideWidth * i * -1, n.options.rtl === !0 ? e(o).css({ position: "relative", right: t, top: 0, zIndex: n.options.zIndex - 2, opacity: 0 }) : e(o).css({ position: "relative", left: t, top: 0, zIndex: n.options.zIndex - 2, opacity: 0 }) }), n.$slides.eq(n.currentSlide).css({ zIndex: n.options.zIndex - 1, opacity: 1 }) }, t.prototype.setHeight = function () { var e = this; if (1 === e.options.slidesToShow && e.options.adaptiveHeight === !0 && e.options.vertical === !1) { var t = e.$slides.eq(e.currentSlide).outerHeight(!0); e.$list.css("height", t) } }, t.prototype.setOption = t.prototype.slickSetOption = function () { var t, n, i, o, r, s = this, a = !1; if ("object" === e.type(arguments[0]) ? (i = arguments[0], a = arguments[1], r = "multiple") : "string" === e.type(arguments[0]) && (i = arguments[0], o = arguments[1], a = arguments[2], "responsive" === arguments[0] && "array" === e.type(arguments[1]) ? r = "responsive" : "undefined" != typeof arguments[1] && (r = "single")), "single" === r) s.options[i] = o; else if ("multiple" === r) e.each(i, function (e, t) { s.options[e] = t }); else if ("responsive" === r) for (n in o) if ("array" !== e.type(s.options.responsive)) s.options.responsive = [o[n]]; else { for (t = s.options.responsive.length - 1; t >= 0;)s.options.responsive[t].breakpoint === o[n].breakpoint && s.options.responsive.splice(t, 1), t--; s.options.responsive.push(o[n]) } a && (s.unload(), s.reinit()) }, t.prototype.setPosition = function () { var e = this; e.setDimensions(), e.setHeight(), e.options.fade === !1 ? e.setCSS(e.getLeft(e.currentSlide)) : e.setFade(), e.$slider.trigger("setPosition", [e]) }, t.prototype.setProps = function () { var e = this, t = document.body.style; e.positionProp = e.options.vertical === !0 ? "top" : "left", "top" === e.positionProp ? e.$slider.addClass("slick-vertical") : e.$slider.removeClass("slick-vertical"), void 0 === t.WebkitTransition && void 0 === t.MozTransition && void 0 === t.msTransition || e.options.useCSS === !0 && (e.cssTransitions = !0), e.options.fade && ("number" == typeof e.options.zIndex ? e.options.zIndex < 3 && (e.options.zIndex = 3) : e.options.zIndex = e.defaults.zIndex), void 0 !== t.OTransform && (e.animType = "OTransform", e.transformType = "-o-transform", e.transitionType = "OTransition", void 0 === t.perspectiveProperty && void 0 === t.webkitPerspective && (e.animType = !1)), void 0 !== t.MozTransform && (e.animType = "MozTransform", e.transformType = "-moz-transform", e.transitionType = "MozTransition", void 0 === t.perspectiveProperty && void 0 === t.MozPerspective && (e.animType = !1)), void 0 !== t.webkitTransform && (e.animType = "webkitTransform", e.transformType = "-webkit-transform", e.transitionType = "webkitTransition", void 0 === t.perspectiveProperty && void 0 === t.webkitPerspective && (e.animType = !1)), void 0 !== t.msTransform && (e.animType = "msTransform", e.transformType = "-ms-transform", e.transitionType = "msTransition", void 0 === t.msTransform && (e.animType = !1)), void 0 !== t.transform && e.animType !== !1 && (e.animType = "transform", e.transformType = "transform", e.transitionType = "transition"), e.transformsEnabled = e.options.useTransform && null !== e.animType && e.animType !== !1 }, t.prototype.setSlideClasses = function (e) { var t, n, i, o, r = this; if (n = r.$slider.find(".slick-slide").removeClass("slick-active slick-center slick-current").attr("aria-hidden", "true"), r.$slides.eq(e).addClass("slick-current"), r.options.centerMode === !0) { var s = r.options.slidesToShow % 2 === 0 ? 1 : 0; t = Math.floor(r.options.slidesToShow / 2), r.options.infinite === !0 && (e >= t && e <= r.slideCount - 1 - t ? r.$slides.slice(e - t + s, e + t + 1).addClass("slick-active").attr("aria-hidden", "false") : (i = r.options.slidesToShow + e, n.slice(i - t + 1 + s, i + t + 2).addClass("slick-active").attr("aria-hidden", "false")), 0 === e ? n.eq(n.length - 1 - r.options.slidesToShow).addClass("slick-center") : e === r.slideCount - 1 && n.eq(r.options.slidesToShow).addClass("slick-center")), r.$slides.eq(e).addClass("slick-center") } else e >= 0 && e <= r.slideCount - r.options.slidesToShow ? r.$slides.slice(e, e + r.options.slidesToShow).addClass("slick-active").attr("aria-hidden", "false") : n.length <= r.options.slidesToShow ? n.addClass("slick-active").attr("aria-hidden", "false") : (o = r.slideCount % r.options.slidesToShow, i = r.options.infinite === !0 ? r.options.slidesToShow + e : e, r.options.slidesToShow == r.options.slidesToScroll && r.slideCount - e < r.options.slidesToShow ? n.slice(i - (r.options.slidesToShow - o), i + o).addClass("slick-active").attr("aria-hidden", "false") : n.slice(i, i + r.options.slidesToShow).addClass("slick-active").attr("aria-hidden", "false")); "ondemand" !== r.options.lazyLoad && "anticipated" !== r.options.lazyLoad || r.lazyLoad() }, t.prototype.setupInfinite = function () { var t, n, i, o = this; if (o.options.fade === !0 && (o.options.centerMode = !1), o.options.infinite === !0 && o.options.fade === !1 && (n = null, o.slideCount > o.options.slidesToShow)) { for (i = o.options.centerMode === !0 ? o.options.slidesToShow + 1 : o.options.slidesToShow, t = o.slideCount; t > o.slideCount - i; t -= 1)n = t - 1, e(o.$slides[n]).clone(!0).attr("id", "").attr("data-slick-index", n - o.slideCount).prependTo(o.$slideTrack).addClass("slick-cloned"); for (t = 0; t < i + o.slideCount; t += 1)n = t, e(o.$slides[n]).clone(!0).attr("id", "").attr("data-slick-index", n + o.slideCount).appendTo(o.$slideTrack).addClass("slick-cloned"); o.$slideTrack.find(".slick-cloned").find("[id]").each(function () { e(this).attr("id", "") }) } }, t.prototype.interrupt = function (e) { var t = this; e || t.autoPlay(), t.interrupted = e }, t.prototype.selectHandler = function (t) { var n = this, i = e(t.target).is(".slick-slide") ? e(t.target) : e(t.target).parents(".slick-slide"), o = parseInt(i.attr("data-slick-index")); return o || (o = 0), n.slideCount <= n.options.slidesToShow ? void n.slideHandler(o, !1, !0) : void n.slideHandler(o) }, t.prototype.slideHandler = function (e, t, n) {
222        var i, o, r, s, a, l = null, c = this; return t = t || !1, c.animating === !0 && c.options.waitForAnimate === !0 || c.options.fade === !0 && c.currentSlide === e ? void 0 : (t === !1 && c.asNavFor(e),
223            i = e, l = c.getLeft(i), s = c.getLeft(c.currentSlide), c.currentLeft = null === c.swipeLeft ? s : c.swipeLeft, c.options.infinite === !1 && c.options.centerMode === !1 && (0 > e || e > c.getDotCount() * c.options.slidesToScroll) ? void (c.options.fade === !1 && (i = c.currentSlide, n !== !0 && c.slideCount > c.options.slidesToShow ? c.animateSlide(s, function () { c.postSlide(i) }) : c.postSlide(i))) : c.options.infinite === !1 && c.options.centerMode === !0 && (0 > e || e > c.slideCount - c.options.slidesToScroll) ? void (c.options.fade === !1 && (i = c.currentSlide, n !== !0 && c.slideCount > c.options.slidesToShow ? c.animateSlide(s, function () { c.postSlide(i) }) : c.postSlide(i))) : (c.options.autoplay && clearInterval(c.autoPlayTimer), o = 0 > i ? c.slideCount % c.options.slidesToScroll !== 0 ? c.slideCount - c.slideCount % c.options.slidesToScroll : c.slideCount + i : i >= c.slideCount ? c.slideCount % c.options.slidesToScroll !== 0 ? 0 : i - c.slideCount : i, c.animating = !0, c.$slider.trigger("beforeChange", [c, c.currentSlide, o]), r = c.currentSlide, c.currentSlide = o, c.setSlideClasses(c.currentSlide), c.options.asNavFor && (a = c.getNavTarget(), a = a.slick("getSlick"), a.slideCount <= a.options.slidesToShow && a.setSlideClasses(c.currentSlide)), c.updateDots(), c.updateArrows(), c.options.fade === !0 ? (n !== !0 ? (c.fadeSlideOut(r), c.fadeSlide(o, function () { c.postSlide(o) })) : c.postSlide(o), void c.animateHeight()) : void (n !== !0 && c.slideCount > c.options.slidesToShow ? c.animateSlide(l, function () { c.postSlide(o) }) : c.postSlide(o))))
224    }, t.prototype.startLoad = function () { var e = this; e.options.arrows === !0 && e.slideCount > e.options.slidesToShow && (e.$prevArrow.hide(), e.$nextArrow.hide()), e.options.dots === !0 && e.slideCount > e.options.slidesToShow && e.$dots.hide(), e.$slider.addClass("slick-loading") }, t.prototype.swipeDirection = function () { var e, t, n, i, o = this; return e = o.touchObject.startX - o.touchObject.curX, t = o.touchObject.startY - o.touchObject.curY, n = Math.atan2(t, e), i = Math.round(180 * n / Math.PI), 0 > i && (i = 360 - Math.abs(i)), 45 >= i && i >= 0 ? o.options.rtl === !1 ? "left" : "right" : 360 >= i && i >= 315 ? o.options.rtl === !1 ? "left" : "right" : i >= 135 && 225 >= i ? o.options.rtl === !1 ? "right" : "left" : o.options.verticalSwiping === !0 ? i >= 35 && 135 >= i ? "down" : "up" : "vertical" }, t.prototype.swipeEnd = function () { var e, t, n = this; if (n.dragging = !1, n.swiping = !1, n.scrolling) return n.scrolling = !1, !1; if (n.interrupted = !1, n.shouldClick = !(n.touchObject.swipeLength > 10), void 0 === n.touchObject.curX) return !1; if (n.touchObject.edgeHit === !0 && n.$slider.trigger("edge", [n, n.swipeDirection()]), n.touchObject.swipeLength >= n.touchObject.minSwipe) { switch (t = n.swipeDirection()) { case "left"
224: case "down": e = n.options.swipeToSlide ? n.checkNavigable(n.currentSlide + n.getSlideCount()) : n.currentSlide + n.getSlideCount(), n.currentDirection = 0; break; case "right": case "up": e = n.options.swipeToSlide ? n.checkNavigable(n.currentSlide - n.getSlideCount()) : n.currentSlide - n.getSlideCount(), n.currentDirection = 1 }"vertical" != t && (n.slideHandler(e), n.touchObject = {}, n.$slider.trigger("swipe", [n, t])) } else n.touchObject.startX !== n.touchObject.curX && (n.slideHandler(n.currentSlide), n.touchObject = {}) }, t.prototype.swipeHandler = function (e) { var t = this; if (!(t.options.swipe === !1 || "ontouchend" in document && t.options.swipe === !1 || t.options.draggable === !1 && -1 !== e.type.indexOf("mouse"))) switch (t.touchObject.fingerCount = e.originalEvent && void 0 !== e.originalEvent.touches ? e.originalEvent.touches.length : 1, t.touchObject.minSwipe = t.listWidth / t.options.touchThreshold, t.options.verticalSwiping === !0 && (t.touchObject.minSwipe = t.listHeight / t.options.touchThreshold), e.data.action) { case "start": t.swipeStart(e); break; case "move": t.swipeMove(e); break; case "end": t.swipeEnd(e) } }, t.prototype.swipeMove = function (e) { var t, n, i, o, r, s, a = this; return r = void 0 !== e.originalEvent ? e.originalEvent.touches : null, !a.dragging || a.scrolling || r && 1 !== r.length ? !1 : (t = a.getLeft(a.currentSlide), a.touchObject.curX = void 0 !== r ? r[0].pageX : e.clientX, a.touchObject.curY = void 0 !== r ? r[0].pageY : e.clientY, a.touchObject.swipeLength = Math.round(Math.sqrt(Math.pow(a.touchObject.curX - a.touchObject.startX, 2))), s = Math.round(Math.sqrt(Math.pow(a.touchObject.curY - a.touchObject.startY, 2))), !a.options.verticalSwiping && !a.swiping && s > 4 ? (a.scrolling = !0, !1) : (a.options.verticalSwiping === !0 && (a.touchObject.swipeLength = s), n = a.swipeDirection(), void 0 !== e.originalEvent && a.touchObject.swipeLength > 4 && (a.swiping = !0, e.preventDefault()), o = (a.options.rtl === !1 ? 1 : -1) * (a.touchObject.curX > a.touchObject.startX ? 1 : -1), a.options.verticalSwiping === !0 && (o = a.touchObject.curY > a.touchObject.startY ? 1 : -1), i = a.touchObject.swipeLength, a.touchObject.edgeHit = !1, a.options.infinite === !1 && (0 === a.currentSlide && "right" === n || a.currentSlide >= a.getDotCount() && "left" === n) && (i = a.touchObject.swipeLength * a.options.edgeFriction, a.touchObject.edgeHit = !0), a.options.vertical === !1 ? a.swipeLeft = t + i * o : a.swipeLeft = t + i * (a.$list.height() / a.listWidth) * o, a.options.verticalSwiping === !0 && (a.swipeLeft = t + i * o), a.options.fade === !0 || a.options.touchMove === !1 ? !1 : a.animating === !0 ? (a.swipeLeft = null, !1) : void a.setCSS(a.swipeLeft))) }, t.prototype.swipeStart = function (e) { var t, n = this; return n.interrupted = !0, 1 !== n.touchObject.fingerCount || n.slideCount <= n.options.slidesToShow ? (n.touchObject = {}, !1) : (void 0 !== e.originalEvent && void 0 !== e.originalEvent.touches && (t = e.originalEvent.touches[0]), n.touchObject.startX = n.touchObject.curX = void 0 !== t ? t.pageX : e.clientX, n.touchObject.startY = n.touchObject.curY = void 0 !== t ? t.pageY : e.clientY, void (n.dragging = !0)) }, t.prototype.unfilterSlides = t.prototype.slickUnfilter = function () { var e = this; null !== e.$slidesCache && (e.unload(), e.$slideTrack.children(this.options.slide).detach(), e.$slidesCache.appendTo(e.$slideTrack), e.reinit()) }, t.prototype.unload = function () { var t = this; e(".slick-cloned", t.$slider).remove(), t.$dots && t.$dots.remove(), t.$prevArrow && t.htmlExpr.test(t.options.prevArrow) && t.$prevArrow.remove(), t.$nextArrow && t.htmlExpr.test(t.options.nextArrow) && t.$nextArrow.remove(), t.$slides.removeClass("slick-slide slick-active slick-visible slick-current").attr("aria-hidden", "true").css("width", "") }, t.prototype.unslick = function (e) { var t = this; t.$slider.trigger("unslick", [t, e]), t.destroy() }, t.prototype.updateArrows = function () { var e, t = this; e = Math.floor(t.options.slidesToShow / 2), t.options.arrows === !0 && t.slideCount > t.options.slidesToShow && !t.options.infinite && (t.$prevArrow.removeClass("slick-disabled").attr("aria-disabled", "false"), t.$nextArrow.removeClass("slick-disabled").attr("aria-disabled", "false"), 0 === t.currentSlide ? (t.$prevArrow.addClass("slick-disabled").attr("aria-disabled", "true"), t.$nextArrow.removeClass("slick-disabled").attr("aria-disabled", "false")) : t.currentSlide >= t.slideCount - t.options.slidesToShow && t.options.centerMode === !1 ? (t.$nextArrow.addClass("slick-disabled").attr("aria-disabled", "true"), t.$prevArrow.removeClass("slick-disabled").attr("aria-disabled", "false")) : t.currentSlide >= t.slideCount - 1 && t.options.centerMode === !0 && (t.$nextArrow.addClass("slick-disabled").attr("aria-disabled", "true"), t.$prevArrow.removeClass("slick-disabled").attr("aria-disabled", "false"))) }, t.prototype.updateDots = function () { var e = this; null !== e.$dots && (e.$dots.find("li").removeClass("slick-active").end(), e.$dots.find("li").eq(Math.floor(e.currentSlide / e.options.slidesToScroll)).addClass("slick-active")) }, t.prototype.visibility = function () { var e = this; e.options.autoplay && (document[e.hidden] ? e.interrupted = !0 : e.interrupted = !1) }, e.fn.slick = function () { var e, n, i = this, o = arguments[0], r = Array.prototype.slice.call(arguments, 1), s = i.length; for (e = 0; s > e; e++)if ("object" == typeof o || "undefined" == typeof o ? i[e].slick = new t(i[e], o) : n = i[e].slick[o].apply(i[e].slick, r), "undefined" != typeof n) return n; return i }
225}), function () { var e = function (e, n) { function i() { this.constructor = e } for (var o in n) t.call(n, o) && (e[o] = n[o]); return i.prototype = n.prototype, e.prototype = new i, e.__super__ = n.prototype, e }, t = {}.hasOwnProperty; this.SliderProductBlock = function (t) { function n() { return n.__super__.constructor.apply(this, arguments) } return e(n, t), n.prototype.init = function () { var e; return e = this.$dom, e.slick({ mobileFirst: !0, arrows: !1, rows: 0, centerMode: !1, infinite: !1, slidesToShow: 1, slidesToScroll: 1, responsive: [{ breakpoint: 1920, settings: { slidesToShow: 2, slidesToScroll: 2, centerMode: !1 } }, { breakpoint: 1500, settings: { slidesToShow: 2, slidesToScroll: 2, centerMode: !1 } }, { breakpoint: 1200, settings: { slidesToShow: 2, slidesToScroll: 2, centerMode: !1 } }, { breakpoint: 1024, settings: { slidesToShow: 2, slidesToScroll: 2, centerMode: !1 } }, { breakpoint: 720, settings: { slidesToShow: 1, slidesToScroll: 1, centerMode: !0 } }] }) }, n }(Behaviour) }.call(this), function () { var e = function (e, n) { function i() { this.constructor = e } for (var o in n) t.call(n, o) && (e[o] = n[o]); return i.prototype = n.prototype, e.prototype = new i, e.__super__ = n.prototype, e }, t = {}.hasOwnProperty; this.SliderWelcome = function (t) { function n() { return n.__super__.constructor.apply(this, arguments) } return e(n, t), n.prototype.init = function () { var e; return e = this.$dom, e.slick({ infinite: !1, dots: !0, arrows: !1, rows: 0, slidesToShow: 1, slidesToScroll: 1 }) }, n }(Behaviour) }.call(this), function () { var e = function (e, n) { function i() { this.constructor = e } for (var o in n) t.call(n, o) && (e[o] = n[o]); return i.prototype = n.prototype, e.prototype = new i, e.__super__ = n.prototype, e }, t = {}.hasOwnProperty; this.SortHomePageBlocks = function (t) { function n() { return n.__super__.constructor.apply(this, arguments) } return e(n, t), n.prototype.init = function () { var e; return this.$sortBox = $(this.data("target-box")), this.$formActions = this.$dom.closest("form").find(".form__actions"), e = { draggable: this.data("target-item"), dataIdAttr: "position", disabled: !0, onSort: this.calculateOrder.bind(this) }, this.sortable = Sortable.create(this.$sortBox.get(0), e), $(document).on("cocoon:after-insert", this.calculateOrder.bind(this)), this.$dom.click(this.toggleSortMode.bind(this)), this.$formActions.hide() }, n.prototype.items = function () { return this.$sortBox.find(this.data("targetItem")) }, n.prototype.headings = function () { return this.items().find(".panel__heading") }, n.prototype.contents = function () { return this.$dom.closest("form").find(".panel__body") }, n.prototype.toggleSortMode = function () { return this.$dom.hasClass("js-sort-enabled") ? (this.$dom.removeClass("js-sort-enabled"), this.sortable.o
225ption("disabled", !0), this.contents().slideDown({ complete: function (e) { return function () { return e.headings().removeClass("is-sortable"), e.$formActions.hide() } }(this) })) : (this.$dom.addClass("js-sort-enabled"), this.sortable.option("disabled", !1), this.contents().slideUp({ complete: function (e) { return function () { return e.headings().addClass("is-sortable"), e.$formActions.show() } }(this) })) }, n.prototype.calculateOrder = function () { var e, t, n, i, o, r; for (o = this.items(), r = [], t = e = 0, i = o.length; i > e; t = ++e)n = o[t], r.push($(n).find('input[name$="[position]"]').val(t)); return r }, n }(Behaviour) }.call(this), function () { var e = function (e, n) { function i() { this.constructor = e } for (var o in n) t.call(n, o) && (e[o] = n[o]); return i.prototype = n.prototype, e.prototype = new i, e.__super__ = n.prototype, e }, t = {}.hasOwnProperty; this.SortPostBlocks = function (t) { function n() { return n.__super__.constructor.apply(this, arguments) } return e(n, t), n.prototype.init = function () { var e; return this.$sortBox = $(this.data("target-box")), this.$formActions = this.$dom.closest("form").find(".form__actions"), e = { draggable: this.data("target-item"), dataIdAttr: "block_position", disabled: !0, onSort: this.calculateOrder.bind(this) }, this.sortable = Sortable.create(this.$sortBox.get(0), e), $(document).on("cocoon:after-insert", this.calculateOrder.bind(this)), this.$dom.click(this.toggleSortMode.bind(this)), this.$formActions.hide() }, n.prototype.items = function () { return this.$sortBox.find(this.data("targetItem")) }, n.prototype.headings = function () { return this.items().find(".panel__heading") }, n.prototype.contents = function () { return this.$dom.closest("form").find(".panel__body") }, n.prototype.toggleSortMode = function () { return this.$dom.hasClass("js-sort-enabled") ? (this.$dom.removeClass("js-sort-enabled"), this.sortable.option("disabled", !0), this.contents().slideDown({ complete: function (e) { return function () { return e.headings().removeClass("is-sortable"), e.$formActions.hide() } }(this) })) : (this.$dom.addClass("js-sort-enabled"), this.sortable.option("disabled", !1), this.contents().slideUp({ complete: function (e) { return function () { return e.headings().addClass("is-sortable"), e.$formActions.show() } }(this) })) }, n.prototype.calculateOrder = function () { var e, t, n, i, o, r; for (o = this.items(), r = [], t = e = 0, i = o.length; i > e; t = ++e)n = o[t], r.push($(n).find('input[name$="[block_position]"]').val(t)); return r }, n }(Behaviour) }.call(this), function () { var e = function (e, n) { function i() { this.constructor = e } for (var o in n) t.call(n, o) && (e[o] = n[o]); return i.prototype = n.prototype, e.prototype = new i, e.__super__ = n.prototype, e }, t = {}.hasOwnProperty; this.SortableHandler = function (t) { function n() { return n.__super__.constructor.apply(this, arguments) } return e(n, t), n.prototype.init = function () { var e; return this.target = this.data("sortable-target"), this.handle = this.data("sortable-handle"), this.$items = $(this.target), this.$items.css("cursor", "move"), e = { draggable: this.target, dataIdAttr: "position", onSort: function (e) { return function () { return e.calculateOrder() } }(this) }, this.handle && (e.handle = this.handle), Sortable.create(this.dom, e), $(document).on("cocoon:after-insert", this.calculateOrder.bind(this)) }, n.prototype.calculateOrder = function () { var e, t, n, i, o, r; for (e = this.$dom.find(this.target), r = [], n = t = 0, o = e.length; o > t; n = ++t)i = e[n], r.push($(i).find('input[name$="[position]"]').val(n)); return r }, n }(Behaviour) }.call(this), function () { var e = function (e, n) { function i() { this.constructor = e } for (var o in n) t.call(n, o) && (e[o] = n[o]); return i.prototype = n.prototype, e.prototype = new i, e.__super__ = n.prototype, e }, t = {}.hasOwnProperty; this.SortableSelect = function (t) { function n() { return n.__super__.constructor.apply(this, arguments) } return e(n, t), n.prototype.init = function () { return 1 }, n }(Behaviour) }.call(this), function (e) { "function" == typeof define && define.amd ? define(["picker", "jquery"], e) : "object" == typeof exports ? module.exports = e(require("./picker.js"), require("jquery")) : e(Picker, jQuery) }(function (e, t) { function n(e, t) { var n = this, i = e.$node[0].value, o = e.$node.data("value"), r = o || i, s = o ? t.formatSubmit : t.format; n.settings = t, n.$node = e.$node, n.queue = { interval: "i", min: "measure create", max: "measure create", now: "now create", select: "parse create validate", highlight: "parse create validate", view: "parse create validate", disable: "deactivate", enable: "activate" }, n.item = {}, n.item.clear = null, n.item.interval = t.interval || 30, n.item.disable = (t.disable || []).slice(0), n.item.enable = -function (e) { return e[0] === !0 ? e.shift() : -1 }(n.item.disable), n.set("min", t.min).set("max", t.max).set("now"), r ? n.set("select", r, { format: s }) : n.set("select", null).set("highlight", n.item.now), n.key = { 40: 1, 38: -1, 39: 1, 37: -1, go: function (e) { n.set("highlight", n.item.highlight.pick + e * n.item.interval, { interval: e * n.item.interval }), this.render() } }, e.on("render", function () { var n = e.$root.children(), i = n.find("." + t.klass.viewset), o = function (e) { return ["webkit", "moz", "ms", "o", ""].map(function (t) { return (t ? "-" + t + "-" : "") + e }) }, r = function (e, t) { o("transform").map(function (n) { e.css(n, t) }), o("transition").map(function (n) { e.css(n, t) }) }; i.length && (r(n, "none"), n[0].scrollTop = ~~i.position().top - 2 * i[0].clientHeight, r(n, "")) }, 1).on("open", function () { e.$root.find("button").attr("disabled", !1) }, 1).on("close", function () { e.$root.find("button").attr("disabled", !0) }, 1) } var i = 24, o = 60, r = 12, s = i * o, a = e._; n.prototype.set = function (e, t, n) { var i = this, o = i.item; return null === t ? ("clear" == e && (e = "select"), o[e] = t, i) : (o["enable" == e ? "disable" : "flip" == e ? "enable" : e] = i.queue[e].split(" ").map(function (o) { return t = i[o](e, t, n) }).pop(), "select" == e ? i.set("highlight", o.select, n) : "highlight" == e ? i.set("view", o.highlight, n) : "interval" == e ? i.set("min", o.min, n).set("max", o.max, n) : e.match(/^(flip|min|max|disable|enable)$/) && (o.select && i.disabled(o.select) && i.set("select", t, n), o.highlight && i.disabled(o.highlight) && i.set("highlight", t, n), "min" == e && i.set("max", o.max, n)), i) }, n.prototype.get = function (e) { return this.item[e] }, n.prototype.create = function (e, n, r) { var l = this; return n = void 0 === n ? e : n, a.isDate(n) && (n = [n.getHours(), n.getMinutes()]), t.isPlainObject(n) && a.isInteger(n.pick) ? n = n.pick : t.isArray(n) ? n = +n[0] * o + +n[1] : a.isInteger(n) || (n = l.now(e, n, r)), "max" == e && n < l.item.min.pick && (n += s), "min" != e && "max" != e && (n - l.item.min.pick) % l.item.interval !== 0 && (n += l.item.interval), n = l.normalize(e, n, r), { hour: ~~(i + n / o) % i, mins: (o + n % o) % o, time: (s + n) % s, pick: n % s } }, n.prototype.createRange = function (e, n) { var i = this, o = function (e) { return e === !0 || t.isArray(e) || a.isDate(e) ? i.create(e) : e }; return a.isInteger(e) || (e = o(e)), a.isInteger(n) || (n = o(n)), a.isInteger(e) && t.isPlainObject(n) ? e = [n.hour, n.mins + e * i.settings.interval] : a.isInteger(n) && t.isPlainObject(e) && (n = [e.hour, e.mins + n * i.settings.interval]), { from: o(e), to: o(n) } }, n.prototype.withinRange = function (e, t) { return e = this.createRange(e.from, e.to), t.pick >= e.from.pick && t.pick <= e.to.pick }, n.prototype.overlapRanges = function (e, t) { var n = this; return e = n.createRange(e.from, e.to), t = n.createRange(t.from, t.to), n.withinRange(e, t.from) || n.withinRange(e, t.to) || n.withinRange(t, e.from) || n.withinRange(t, e.to) }, n.prototype.now = function (e, t) { var n, i = this.item.interval, r = new Date, s = r.getHours() * o + r.getMinutes(), l = a.isInteger(t); return s -= s % i, n = 0 > t && -i >= i * t + s, s += "min" == e && n ? 0 : i, l && (s += i * (n && "max" != e ? t + 1 : t)), s }, n.prototype.normalize = function (e, t) { var n = this.item.interval, i = this.item.min && this.item.min.pick || 0; return t -= "min" == e ? 0 : (t - i) % n }, n.prototype.measure = function (e, n, r) { var s = this; return n || (n = "min" == e ? [0, 0] : [i - 1, o - 1]), "string" == typeof n ? n = s.parse(e, n) : n === !0 || a.isInteger(n) ? n = s.now(e, n, r) : t.isPlainObject(n) && a.isInteger(n.pick) && (n = s.normalize(e, n.pick, r)), n }, n.prototype.validate = function (e, t, n) { var i = this, o = n && n.interval ? n.interval : i.item.interval; return i.disabled(t) && (t = i.shift(t, o)), t = i.scope(t), i.disabled(t) && (t = i.shift(t, -1 * o)), t }, n.prototype.disabled = function (e) { var n = this, i = n.item.disable.filter(function (i) { return a.isInteger(i) ? e.hour == i : t.isArray(i) || a.isDate(i) ? e.pick == n.create(i).pick : t.isPlainObject(i) ? n.withinRange(i, e) : void 0 }); return i = i.length && !i.filter(function (e) { return t.isArray(e) && "inverted" == e[2] || t.isPlainObject(e) && e.inverted }).length, -1 === n.item.enable ? !i : i || e.pick < n.item.min.pick || e.pick > n.item.max.pick }, n.prototype.shift = function (e, t) { var n = this, i = n.item.min.pick, o = n.item.max.pick; for (t = t || n.item.interval; n.disabled(e) && (e = n.create(e.pick += t), !(e.pick <= i || e.pick >= o));); return e }, n.prototype.scope = function (e) { var t = this.item.min.pick, n = this.item.max.pick; return this.create(e.pick > n ? n : e.pick < t ? t : e) }, n.prototype.parse = function (e, t, n) { var i, r, s, l, c, d = this, u = {}; if (!t || "string" != typeof t) return t; n && n.format || (n = n || {}, n.format = d.settings.format), d.formats.toArray(n.format).map(function (e) { var n, i = d.formats[e], o = i ? a.trigger(i, d, [t, u]) : e.replace(/^!/, "").length; i && (n = t.substr(0, o), u[e] = n.match(/^\d+$/) ? +n : n), t = t.substr(o) }); for (l in u) c = u[l], a.isInteger(c) ? l.match(/^(h|hh)$/i) ? (i = c, "h" != l && "hh" != l || (i %= 12)) : "i" == l && (r = c) : l.match(/^a$/i) && c.match(/^p/i) && ("h" in u || "hh" in u) && (s = !0); return (s ? i + 12 : i) * o + r }, n.prototype.formats = { h: function (e, t) { return e ? a.digits(e) : t.hour % r || r }, hh: function (e, t) { return e ? 2 : a.lead(t.hour % r || r) }, H: function (e, t) { return e ? a.digits(e) : "" + t.hour % 24 }, HH: function (e, t) { return e ? a.digits(e) : a.lead(t.hour % 24) }, i: function (e, t) { return e ? 2 : a.lead(t.mins) }, a: function (e, t) { return e ? 4 : s / 2 > t.time % s ? "a.m." : "p.m." }, A: function (e, t) { return e ? 2 : s / 2 > t.time % s ? "AM" : "PM" }, toArray: function (e) { return e.split(/(h{1,2}|H{1,2}|i|a|A|!.)/g) }, toString: function (e, t) { var n = this; return n.formats.toArray(e).map(function (e) { return a.trigger(n.formats[e], n, [0, t]) || e.replace(/^!/, "") }).join("") } }, n.prototype.isTimeExact = function (e, n) { var i = this; return a.isInteger(e) && a.isInteger(n) || "boolean" == typeof e && "boolean" == typeof n ? e === n : (a.isDate(e) || t.isArray(e)) && (a.isDate(n) || t.isArray(n)) ? i.create(e).pick === i.create(n).pick : t.isPlainObject(e) && t.isPlainObject(n) ? i.isTimeExact(e.from, n.from) && i.isTimeExact(e.to, n.to) : !1 }, n.prototype.isTimeOverlap = function (e, n) { var i = this; return a.isInteger(e) && (a.isDate(n) || t.isArray(n)) ? e === i.create(n).hour : a.isInteger(n) && (a.isDate(e) || t.isArray(e)) ? n === i.create(e).hour : t.isPlainObject(e) && t.isPlainObject(n) ? i.overlapRanges(e, n) : !1 }, n.prototype.flipEnable = function (e) { var t = this.item; t.enable = e || (-1 == t.enable ? 1 : -1) }, n.prototype.deactivate = function (e, n) { var i = this, o = i.item.disable.slice(0); return "flip" == n ? i.flipEnable() : n === !1 ? (i.flipEnable(1), o = []) : n === !0 ? (i.flipEnable(-1), o = []) : n.map(function (e) { for (var n, r = 0; r < o.length; r += 1)if (i.isTimeExact(e, o[r])) { n = !0; break } n || (a.isInteger(e) || a.isDate(e) || t.isArray(e) || t.isPlainObject(e) && e.from && e.to) && o.push(e) }), o }, n.prototype.activate = function (e, n) { var i = this, o = i.item.disable, r = o.length; return "flip" == n ? i.flipEnable() : n === !0 ? (i.flipEnable(1), o = []) : n === !1 ? (i.flipEnable(-1), o = []) : n.map(function (e) { var n, s, l, c; for (l = 0; r > l; l += 1) { if (s = o[l], i.isTimeExact(s, e)) { n = o[l] = null, c = !0; break } if (i.isTimeOverlap(s, e)) { t.isPlainObject(e) ? (e.inverted = !0, n = e) : t.isArray(e) ? (n = e, n[2] || n.push("inverted")) : a.isDate(e) && (n = [e.getFullYear(), e.getMonth(), e.getDate(), "inverted"]); break } } if (n) for (l = 0; r > l; l += 1)if (i.isTimeExact(o[l], e)) { o[l] = null; break } if (c) for (l = 0; r > l; l += 1)if (i.isTimeOverlap(o[l], e)) { o[l] = null; break } n && o.push(n) }), o.filter(function (e) { return null != e }) }, n.prototype.i = function (e, t) { return a.isInteger(t) && t > 0 ? t : this.item.interval }, n.prototype.nodes = function (e) { var t = this, n = t.settings, i = t.item.select, o = t.item.highlight, r = t.item.view, s = t.item.disable; return a.node("ul", a.group({ min: t.item.min.pick, max: t.item.max.pick, i: t.item.interval, node: "li", item: function (e) { e = t.create(e); var l = e.pick, c = i && i.pick == l, d = o && o.pick == l, u = s && t.disabled(e), h = a.trigger(t.formats.toString, t, [n.format, e]); return [a.trigger(t.formats.toString, t, [a.trigger(n.formatLabel, t, [e]) || n.format, e]), function (e) { return c && e.push(n.klass.selected), d && e.push(n.klass.highlighted), r && r.pick == l && e.push(n.klass.viewset), u && e.push(n.klass.disabled), e.join(" ") }([n.klass.listItem]), "data-pick=" + e.pick + " " + a.ariaAttr({ role: "option", label: h, selected: c && t.$node.val() === h ? !0 : null, activedescendant: d ? !0 : null, disabled: u ? !0 : null })] } }) + a.node("li", a.node("button", n.clear, n.klass.buttonClear, "type=button data-clear=1" + (e ? "" : " disabled") + " " + a.ariaAttr({ controls: t.$node[0].id })), "", a.ariaAttr({ role: "presentation" })), n.klass.list, a.ariaAttr({ role: "listbox", controls: t.$node[0].id })) }, n.defaults = function (e) { return { clear: "Clear", format: "h:i A", interval: 30, closeOnSelect: !0, closeOnClear: !0, klass: { picker: e + " " + e + "--time", holder: e + "__holder", list: e + "__list", listItem: e + "__list-item", disabled: e + "__list-item--disabled", selected: e + "__list-item--selected", highlighted: e + "__list-item--highlighted", viewset: e + "__list-item--viewset", now: e + "__list-item--now", buttonClear: e + "__button--clear" } } }(e.klasses().picker), e.extend("pickatime", n) }), function () { var e = function (e, n) { function i() { this.constructor = e } for (var o in n) t.call(n, o) && (e[o] = n[o]); return i.prototype = n.prototype, e.prototype = new i, e.__super__ = n.prototype, e }, t = {}.hasOwnProperty;
225 this.StripeTopup = function (t) { function n() { return n.__super__.constructor.apply(this, arguments) } return e(n, t), n.prototype.init = function () { return this.handler = StripeCheckout.configure({ key: "pk_test_xLAO77Q66M5fr9UnLSsnYwXE", image: this.$dom.data("image"), locale: "auto", token: this.after_payment.bind(this) }), this.$dom.click(function (e) { return function (t) { return e.handler.open({ name: e.$dom.data("name"), description: e.$dom.data("title"), currency: "eur", amount: e.$dom.data("amount"), email: e.$dom.data("email") }), t.preventDefault() } }(this)) }, n.prototype.after_payment = function (e) { this.$dom.parent().find(".js-stripe-token").val(e.id), this.$dom.closest("form").submit() }, n }(Behaviour) }.call(this), function () { var e = function (e, n) { function i() { this.constructor = e } for (var o in n) t.call(n, o) && (e[o] = n[o]); return i.prototype = n.prototype, e.prototype = new i, e.__super__ = n.prototype, e }, t = {}.hasOwnProperty; this.SubmitOnChange = function (t) { function n() { return n.__super__.constructor.apply(this, arguments) } return e(n, t), n.prototype.init = function () { return this.$dom.change(function (e) { return function (t) { return console.log("change"), t.preventDefault(), e.submit() } }(this)) }, n.prototype.submit = function () { return this.$dom.closest("form").submit() }, n }(Behaviour) }.call(this), function () { var e = function (e, n) { function i() { this.constructor = e } for (var o in n) t.call(n, o) && (e[o] = n[o]); return i.prototype = n.prototype, e.prototype = new i, e.__super__ = n.prototype, e }, t = {}.hasOwnProperty; this.SubscriptionsSlider = function (t) { function n() { return n.__super__.constructor.apply(this, arguments) } return e(n, t), n.prototype.init = function () { return this.$dom.addClass("owl-carousel"), this.$dom.imagesLoaded(function (e) { return function () { return e.$dom.owlCarousel({ navText: ["", ""], nav: !0, margin: 5, items: 1, responsive: { 720: { items: 2 }, 1024: { items: 3 } } }) } }(this)) }, n }(Behaviour) }.call(this), function () { var e = function (e, n) { function i() { this.constructor = e } for (var o in n) t.call(n, o) && (e[o] = n[o]); return i.prototype = n.prototype, e.prototype = new i, e.__super__ = n.prototype, e }, t = {}.hasOwnProperty; this.SuggestedPosts = function (t) { function n() { return n.__super__.constructor.apply(this, arguments) } return e(n, t), n.prototype.init = function () { return $.ajax({ type: "GET", url: this.data("url"), data: { block_id: this.data("blockId"), exclude_ids: this.data("excludeIds") } }).done(function (e) { return function (t) { return e.$dom.html(t) } }(this)) }, n }(Behaviour) }.call(this), function () { var e = function (e, n) { function i() { this.constructor = e } for (var o in n) t.call(n, o) && (e[o] = n[o]); return i.prototype = n.prototype, e.prototype = new i, e.__super__ = n.prototype, e }, t = {}.hasOwnProperty; this.Tags = function (t) { function n() { return n.__super__.constructor.apply(this, arguments) } return e(n, t), n.prototype.init = function () { return this.$dom.select2({ width: "100%", multiple: !0, tags: !0, tokenSeparators: [",", " "], sorter: function () { return function (e) { return e.sort(function (e, t) { return e.id.length - t.id.length }) } }(this) }) }, n }(Behaviour) }.call(this), function () { var e = function (e, n) { function i() { this.constructor = e } for (var o in n) t.call(n, o) && (e[o] = n[o]); return i.prototype = n.prototype, e.prototype = new i, e.__super__ = n.prototype, e }, t = {}.hasOwnProperty; this.TenantsNavToggler = function (t) { function n() { return n.__super__.constructor.apply(this, arguments) } return e(n, t), n.prototype.init = function () { return this.$dom.click(function () { return function (e) { return e.preventDefault(), $("#tenants-nav").toggleClass("is-visible"), $(".overlay").toggleClass("is-visible") } }(this)), $(".overlay, .aside-nav__header__closer").click(function () { return function (e) { return e.preventDefault(), $("#tenants-nav").removeClass("is-visible"), $(".overlay").removeClass("is-visible") } }(this)) }, n }(Behaviour) }.call(this), function () { var e = function (e, n) { function i() { this.constructor = e } for (var o in n) t.call(n, o) && (e[o] = n[o]); return i.prototype = n.prototype, e.prototype = new i, e.__super__ = n.prototype, e }, t = {}.hasOwnProperty; this.Timepicker = function (t) { function n() { return n.__super__.constructor.apply(this, arguments) } return e(n, t), n.prototype.init = function () { return this.$dom.pickatime({ format: "H:i", formatSubmit: "H:i", hiddenName: !0, clear: "" }) }, n }(Behaviour) }.call(this), function () { var e = function (e, n) { function i() { this.constructor = e } for (var o in n) t.call(n, o) && (e[o] = n[o]); return i.prototype = n.prototype, e.prototype = new i, e.__super__ = n.prototype, e }, t = {}.hasOwnProperty; this.VideoHero = function (t) { function n() { return n.__super__.constructor.apply(this, arguments) } return e(n, t), n.prototype.init = function () { return this.playerDefaults = { autoplay: 0, autohide: 1, modestbranding: 0, rel: 0, showinfo: 0, controls: 0, disablekb: 1, enablejsapi: 0, iv_load_policy: 3 }, this.vid = this.data("videoAttr"), this.itemId = "video-player-" + n.getIndex(), this.$screen = this.$dom.find(".video-hero__screen"), this.$screen.attr("id", this.itemId), this.tv = new YT.Player(this.itemId, { events: { onReady: this.onPlayerReady.bind(this), onStateChange: this.onPlayerStateChange.bind(this) }, playerVars: this.playerDefaults }), $(window).on("load resize", this.vidRescale.bind(this)), this.$screen = $("#" + this.itemId), this.vidRescale() }, n.prototype.handleVideoScroll = function () { if (this.isInViewport()) { if (1 !== this.tv.getPlayerState()) return this.tv.playVideo() } else if (1 === this.tv.getPlayerState()) return this.tv.pauseVideo() }, n.prototype.isInViewport = function () { var e, t, n, i, o;
225 return e = this.$dom.closest(".js-video-hero"), n = $(e).offset().top, t = n + $(e).outerHeight(), o = $(window).scrollTop(), i = o + $(window).height(), t > o && i > n }, n.prototype.onPlayerReady = function () { return $(window).scroll(this.handleVideoScroll.bind(this)), this.tv.loadVideoById(this.vid), this.tv.mute(), this.handleVideoScroll() }, n.prototype.onPlayerStateChange = function (e) { return 0 === e.data ? (this.tv.pauseVideo(), this.tv.seekTo(this.vid.startSeconds), this.tv.playVideo()) : void 0 }, n.prototype.vidRescale = function () { var e, t; return t = this.$dom.width() + 250, e = this.$dom.height() + 250, t / e > 16 / 9 ? (this.tv.setSize(t, t / 16 * 9), this.$screen.css({ left: "0px" })) : (this.tv.setSize(e / 9 * 16, e), this.$screen.css({ left: -(this.$screen.outerWidth() - t) / 2 })) }, n.getIndex = function () { return this.index = this.index || 0, this.index += 1, this.index }, n }(LazyBehaviour) }.call(this), function () { $(function () { return $("tr[data-href-row]").click(function (e) { return "destroy" !== $(e.target.closest("a")).attr("role") ? location.href = $(this).data("href-row") : void 0 }) }) }.call(this), function () {
226    window.SocialShareButton = {
227        openUrl: function (e, t, n) { var i, o, r; return null == t && (t = 640), null == n && (n = 480), i = screen.width / 2 - t / 2, r = .3 * screen.height - n / 2, o = "width=" + t + ",height=" + n + ",left=" + i + ",top=" + r + ",menubar=no,status=no,location=no", window.open(e, "popup", o), !1 }, share: function (e) {
228            var t, n, i, o, r, s, a, l, c, d, u, h, p; switch (l = $(e).data("site"), n = $(e).data("appkey") || "", t = $(e).parent(), c = encodeURIComponent($(e).data(l + "-title") || t.data("title") || ""), a = encodeURIComponent(t.data("img") || ""), u = encodeURIComponent(t.data("url") || ""), h = encodeURIComponent(t.data("via") || ""), i = encodeURIComponent(t.data("desc") || " "), o = window[window.GoogleAnalyticsObject || "ga"], "function" == typeof o && o("send", "event", "Social Share Button", "click", l), 0 === u.length && (u = encodeURIComponent(location.href)), l) {
229                case "email": location.href = "mailto:?to=&subject=" + c + "&body=" + u; break; case "weibo": SocialShareButton.openUrl("http://service.weibo.com/share/share.php?url=" + u + "&type=3&pic=" + a + "&title=" + c + "&appkey=" + n, 620, 370); break; case "twitter": s = encodeURIComponent($(e).data(l + "-hashtags") || t.data("hashtags") || ""), p = "", h.length > 0 && (p = "&via=" + h), SocialShareButton.openUrl("https://twitter.com/intent/tweet?url=" + u + "&text=" + c + "&hashtags=" + s + p, 650, 300); break; case "douban": SocialShareButton.openUrl("http://shuo.douban.com/!service/share?href=" + u + "&name=" + c + "&image=" + a + "&sel=" + i, 770, 470); break; case "facebook": SocialShareButton.openUrl("http://www.facebook.com/sharer/sharer.php?u=" + u + "&display=popup&quote=" + i, 555, 400); break; case "qq": SocialShareButton.openUrl("http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url=" + u + "&title=" + c + "&pics=" + a + "&summary=" + i + "&site=" + n); break; case "google_plus": SocialShareButton.openUrl("https://plus.google.com/share?url=" + u); break; case "google_bookmark": SocialShareButton.openUrl("https://www.google.com/bookmarks/mark?op=edit&output=popup&bkmk=" + u + "&title=" + c); break; case "delicious": SocialShareButton.openUrl("https://del.icio.us/save?url=" + u + "&title=" + c + "&jump=yes&pic=" + a); break; case "pinterest": SocialShareButton.openUrl("http://www.pinterest.com/pin/create/button/?url=" + u + "&media=" + a + "&description=" + c); break; case "linkedin": SocialShareButton.openUrl("https://www.linkedin.com/shareArticle?mini=true&url=" + u + "&title=" + c + "&summary=" + i); break; case "xing": SocialShareButton.openUrl("https://www.xing.com/spi/shares/new?url=" + u); break; case "vkontakte": SocialShareButton.openUrl("http://vk.com/share.php?url=" + u + "&title=" + c + "&image=" + a); break; case "odnoklassniki": SocialShareButton.openUrl("https://connect.ok.ru/offer?url=" + u + "&title=" + c + "&description=" + i + "&imageUrl=" + a); break; case "wechat": if (!window.SocialShareWeChatButton) throw new Error("You should require social-share-button/wechat to your application.js"); window.SocialShareWeChatButton.qrcode({ url: decodeURIComponent(u), header: $(e).attr("title"), footer: $(e).data("wechat-footer") }); break; case "tumblr": r = function (t) { var n; return n = $(e).attr("data-" + t), n ? encodeURIComponent(n) : void 0 }, d = function () { var e, t, n, i; return t = r("type") || "link", e = function () { switch (t) { case "text": return c = r("title") || c, "title=" + c; case "photo": return c = r("caption") || c, i = r("source") || a, "caption=" + c + "&source=" + i; case "quote": return n = r("quote") || c, i = r("source") || "", "quote=" + n + "&source=" + i; default: return c = r("title") || c, u = r("url") || u, "name=" + c + "&url=" + u } }(), "/" + t + "?" + e }, SocialShareButton.openUrl("http://www.tumblr.com/share" + d()); break; case "reddit": SocialShareButton.openUrl("http://www.reddit.com/submit?url=" + u + "&newwindow=1", 555, 400); break; case "hacker_news": SocialShareButton.openUrl("http://news.ycombinator.com/submitlink?u=" + u + "&t=" + c, 770, 500); break; case "telegram": SocialShareButton.openUrl("https://telegram.me/share/url?text=" + c + "&url=" + u);
230            }return !1
231        }
232    }
233}.call(this), function () { $(document).on("cocoon:after-insert", function (e, t) { var n, i, o; return o = $(e.target), i = o.data("limit"), n = o.data("insertion-node"), void 0 !== i && void 0 !== n && $(n).length > i ? $(t).remove() : void 0 }), $.ready(function () { var e; return e = function () { var t, n; return t = $(".site-header").find("#sasIabBill_close"), n = $(".site-header").find("#sasIabBill_open"), t.length > 0 ? (t.click(function () { return $("body").addClass("masthead-is-closed") }), n.click(function () { return $("body").removeClass("masthead-is-closed") })) : setTimeout(function () { return e() }, 1e3) }, setTimeout(function () { return e() }, 1e3) }) }.call(this);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.