Stackedit/public/res-min/main.js
Benoit Schweblin b6db0e24fe Prepare release
2017-09-29 20:16:41 +01:00

28617 lines
1.3 MiB
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

function diff_match_patch() {
this.Diff_Timeout = 1, this.Diff_EditCost = 4, this.Match_Threshold = .5, this.Match_Distance = 1e3,
this.Patch_DeleteThreshold = .5, this.Patch_Margin = 4, this.Match_MaxBits = 32;
}
!function(e, t) {
function n(e) {
var t = e.length, n = rt.type(e);
return !rt.isWindow(e) && (!(1 !== e.nodeType || !t) || "array" === n || "function" !== n && (0 === t || "number" == typeof t && t > 0 && t - 1 in e));
}
function i(e) {
var t = ht[e] = {};
return rt.each(e.match(at) || [], function(e, n) {
t[n] = !0;
}), t;
}
function r() {
Object.defineProperty(this.cache = {}, 0, {
get: function() {
return {};
}
}), this.expando = rt.expando + Math.random();
}
function o(e, n, i) {
var r;
if (i === t && 1 === e.nodeType) if (r = "data-" + n.replace(vt, "-$1").toLowerCase(),
"string" == typeof (i = e.getAttribute(r))) {
try {
i = "true" === i || "false" !== i && ("null" === i ? null : +i + "" === i ? +i : gt.test(i) ? JSON.parse(i) : i);
} catch (e) {}
ft.set(e, n, i);
} else i = t;
return i;
}
function a() {
return !0;
}
function s() {
return !1;
}
function l() {
try {
return z.activeElement;
} catch (e) {}
}
function c(e, t) {
for (;(e = e[t]) && 1 !== e.nodeType; ) ;
return e;
}
function u(e, t, n) {
if (rt.isFunction(t)) return rt.grep(e, function(e, i) {
return !!t.call(e, i, e) !== n;
});
if (t.nodeType) return rt.grep(e, function(e) {
return e === t !== n;
});
if ("string" == typeof t) {
if (Et.test(t)) return rt.filter(t, e, n);
t = rt.filter(t, e);
}
return rt.grep(e, function(e) {
return et.call(t, e) >= 0 !== n;
});
}
function d(e, t) {
return rt.nodeName(e, "table") && rt.nodeName(1 === t.nodeType ? t : t.firstChild, "tr") ? e.getElementsByTagName("tbody")[0] || e.appendChild(e.ownerDocument.createElement("tbody")) : e;
}
function p(e) {
return e.type = (null !== e.getAttribute("type")) + "/" + e.type, e;
}
function h(e) {
var t = Ft.exec(e.type);
return t ? e.type = t[1] : e.removeAttribute("type"), e;
}
function f(e, t) {
for (var n = e.length, i = 0; n > i; i++) mt.set(e[i], "globalEval", !t || mt.get(t[i], "globalEval"));
}
function m(e, t) {
var n, i, r, o, a, s, l, c;
if (1 === t.nodeType) {
if (mt.hasData(e) && (o = mt.access(e), a = mt.set(t, o), c = o.events)) {
delete a.handle, a.events = {};
for (r in c) for (n = 0, i = c[r].length; i > n; n++) rt.event.add(t, r, c[r][n]);
}
ft.hasData(e) && (s = ft.access(e), l = rt.extend({}, s), ft.set(t, l));
}
}
function g(e, n) {
var i = e.getElementsByTagName ? e.getElementsByTagName(n || "*") : e.querySelectorAll ? e.querySelectorAll(n || "*") : [];
return n === t || n && rt.nodeName(e, n) ? rt.merge([ e ], i) : i;
}
function v(e, t) {
var n = t.nodeName.toLowerCase();
"input" === n && Rt.test(e.type) ? t.checked = e.checked : "input" !== n && "textarea" !== n || (t.defaultValue = e.defaultValue);
}
function b(e, t) {
if (t in e) return t;
for (var n = t.charAt(0).toUpperCase() + t.slice(1), i = t, r = Kt.length; r--; ) if ((t = Kt[r] + n) in e) return t;
return i;
}
function y(e, t) {
return e = t || e, "none" === rt.css(e, "display") || !rt.contains(e.ownerDocument, e);
}
function x(t) {
return e.getComputedStyle(t, null);
}
function w(e, t) {
for (var n, i, r, o = [], a = 0, s = e.length; s > a; a++) i = e[a], i.style && (o[a] = mt.get(i, "olddisplay"),
n = i.style.display, t ? (o[a] || "none" !== n || (i.style.display = ""), "" === i.style.display && y(i) && (o[a] = mt.access(i, "olddisplay", k(i.nodeName)))) : o[a] || (r = y(i),
(n && "none" !== n || !r) && mt.set(i, "olddisplay", r ? n : rt.css(i, "display"))));
for (a = 0; s > a; a++) i = e[a], i.style && (t && "none" !== i.style.display && "" !== i.style.display || (i.style.display = t ? o[a] || "" : "none"));
return e;
}
function S(e, t, n) {
var i = Ut.exec(t);
return i ? Math.max(0, i[1] - (n || 0)) + (i[2] || "px") : t;
}
function C(e, t, n, i, r) {
for (var o = n === (i ? "border" : "content") ? 4 : "width" === t ? 1 : 0, a = 0; 4 > o; o += 2) "margin" === n && (a += rt.css(e, n + Yt[o], !0, r)),
i ? ("content" === n && (a -= rt.css(e, "padding" + Yt[o], !0, r)), "margin" !== n && (a -= rt.css(e, "border" + Yt[o] + "Width", !0, r))) : (a += rt.css(e, "padding" + Yt[o], !0, r),
"padding" !== n && (a += rt.css(e, "border" + Yt[o] + "Width", !0, r)));
return a;
}
function _(e, t, n) {
var i = !0, r = "width" === t ? e.offsetWidth : e.offsetHeight, o = x(e), a = rt.support.boxSizing && "border-box" === rt.css(e, "boxSizing", !1, o);
if (0 >= r || null == r) {
if (r = $t(e, t, o), (0 > r || null == r) && (r = e.style[t]), zt.test(r)) return r;
i = a && (rt.support.boxSizingReliable || r === e.style[t]), r = parseFloat(r) || 0;
}
return r + C(e, t, n || (a ? "border" : "content"), i, o) + "px";
}
function k(e) {
var t = z, n = Wt[e];
return n || (n = E(e, t), "none" !== n && n || (Gt = (Gt || rt("<iframe frameborder='0' width='0' height='0'/>").css("cssText", "display:block !important")).appendTo(t.documentElement),
t = (Gt[0].contentWindow || Gt[0].contentDocument).document, t.write("<!doctype html><html><body>"),
t.close(), n = E(e, t), Gt.detach()), Wt[e] = n), n;
}
function E(e, t) {
var n = rt(t.createElement(e)).appendTo(t.body), i = rt.css(n[0], "display");
return n.remove(), i;
}
function T(e, t, n, i) {
var r;
if (rt.isArray(t)) rt.each(t, function(t, r) {
n || Zt.test(e) ? i(e, r) : T(e + "[" + ("object" == typeof r ? t : "") + "]", r, n, i);
}); else if (n || "object" !== rt.type(t)) i(e, t); else for (r in t) T(e + "[" + r + "]", t[r], n, i);
}
function I(e) {
return function(t, n) {
"string" != typeof t && (n = t, t = "*");
var i, r = 0, o = t.toLowerCase().match(at) || [];
if (rt.isFunction(n)) for (;i = o[r++]; ) "+" === i[0] ? (i = i.slice(1) || "*",
(e[i] = e[i] || []).unshift(n)) : (e[i] = e[i] || []).push(n);
};
}
function D(e, t, n, i) {
function r(s) {
var l;
return o[s] = !0, rt.each(e[s] || [], function(e, s) {
var c = s(t, n, i);
return "string" != typeof c || a || o[c] ? a ? !(l = c) : void 0 : (t.dataTypes.unshift(c),
r(c), !1);
}), l;
}
var o = {}, a = e === vn;
return r(t.dataTypes[0]) || !o["*"] && r("*");
}
function N(e, n) {
var i, r, o = rt.ajaxSettings.flatOptions || {};
for (i in n) n[i] !== t && ((o[i] ? e : r || (r = {}))[i] = n[i]);
return r && rt.extend(!0, e, r), e;
}
function M(e, n, i) {
for (var r, o, a, s, l = e.contents, c = e.dataTypes; "*" === c[0]; ) c.shift(),
r === t && (r = e.mimeType || n.getResponseHeader("Content-Type"));
if (r) for (o in l) if (l[o] && l[o].test(r)) {
c.unshift(o);
break;
}
if (c[0] in i) a = c[0]; else {
for (o in i) {
if (!c[0] || e.converters[o + " " + c[0]]) {
a = o;
break;
}
s || (s = o);
}
a = a || s;
}
return a ? (a !== c[0] && c.unshift(a), i[a]) : void 0;
}
function L(e, t, n, i) {
var r, o, a, s, l, c = {}, u = e.dataTypes.slice();
if (u[1]) for (a in e.converters) c[a.toLowerCase()] = e.converters[a];
for (o = u.shift(); o; ) if (e.responseFields[o] && (n[e.responseFields[o]] = t),
!l && i && e.dataFilter && (t = e.dataFilter(t, e.dataType)), l = o, o = u.shift()) if ("*" === o) o = l; else if ("*" !== l && l !== o) {
if (!(a = c[l + " " + o] || c["* " + o])) for (r in c) if (s = r.split(" "), s[1] === o && (a = c[l + " " + s[0]] || c["* " + s[0]])) {
!0 === a ? a = c[r] : !0 !== c[r] && (o = s[0], u.unshift(s[1]));
break;
}
if (!0 !== a) if (a && e["throws"]) t = a(t); else try {
t = a(t);
} catch (e) {
return {
state: "parsererror",
error: a ? e : "No conversion from " + l + " to " + o
};
}
}
return {
state: "success",
data: t
};
}
function A() {
return setTimeout(function() {
kn = t;
}), kn = rt.now();
}
function R(e, t, n) {
for (var i, r = (Mn[t] || []).concat(Mn["*"]), o = 0, a = r.length; a > o; o++) if (i = r[o].call(n, t, e)) return i;
}
function P(e, t, n) {
var i, r, o = 0, a = Nn.length, s = rt.Deferred().always(function() {
delete l.elem;
}), l = function() {
if (r) return !1;
for (var t = kn || A(), n = Math.max(0, c.startTime + c.duration - t), i = n / c.duration || 0, o = 1 - i, a = 0, l = c.tweens.length; l > a; a++) c.tweens[a].run(o);
return s.notifyWith(e, [ c, o, n ]), 1 > o && l ? n : (s.resolveWith(e, [ c ]),
!1);
}, c = s.promise({
elem: e,
props: rt.extend({}, t),
opts: rt.extend(!0, {
specialEasing: {}
}, n),
originalProperties: t,
originalOptions: n,
startTime: kn || A(),
duration: n.duration,
tweens: [],
createTween: function(t, n) {
var i = rt.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 (r) return this;
for (r = !0; i > n; n++) c.tweens[n].run(1);
return t ? s.resolveWith(e, [ c, t ]) : s.rejectWith(e, [ c, t ]), this;
}
}), u = c.props;
for (O(u, c.opts.specialEasing); a > o; o++) if (i = Nn[o].call(c, e, u, c.opts)) return i;
return rt.map(u, R, c), rt.isFunction(c.opts.start) && c.opts.start.call(e, c),
rt.fx.timer(rt.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 O(e, t) {
var n, i, r, o, a;
for (n in e) if (i = rt.camelCase(n), r = t[i], o = e[n], rt.isArray(o) && (r = o[1],
o = e[n] = o[0]), n !== i && (e[i] = o, delete e[n]), (a = rt.cssHooks[i]) && "expand" in a) {
o = a.expand(o), delete e[i];
for (n in o) n in e || (e[n] = o[n], t[n] = r);
} else t[i] = r;
}
function F(e, n, i) {
var r, o, a, s, l, c, u = this, d = {}, p = e.style, h = e.nodeType && y(e), f = mt.get(e, "fxshow");
i.queue || (l = rt._queueHooks(e, "fx"), null == l.unqueued && (l.unqueued = 0,
c = l.empty.fire, l.empty.fire = function() {
l.unqueued || c();
}), l.unqueued++, u.always(function() {
u.always(function() {
l.unqueued--, rt.queue(e, "fx").length || l.empty.fire();
});
})), 1 === e.nodeType && ("height" in n || "width" in n) && (i.overflow = [ p.overflow, p.overflowX, p.overflowY ],
"inline" === rt.css(e, "display") && "none" === rt.css(e, "float") && (p.display = "inline-block")),
i.overflow && (p.overflow = "hidden", u.always(function() {
p.overflow = i.overflow[0], p.overflowX = i.overflow[1], p.overflowY = i.overflow[2];
}));
for (r in n) if (o = n[r], Tn.exec(o)) {
if (delete n[r], a = a || "toggle" === o, o === (h ? "hide" : "show")) {
if ("show" !== o || !f || f[r] === t) continue;
h = !0;
}
d[r] = f && f[r] || rt.style(e, r);
}
if (!rt.isEmptyObject(d)) {
f ? "hidden" in f && (h = f.hidden) : f = mt.access(e, "fxshow", {}), a && (f.hidden = !h),
h ? rt(e).show() : u.done(function() {
rt(e).hide();
}), u.done(function() {
var t;
mt.remove(e, "fxshow");
for (t in d) rt.style(e, t, d[t]);
});
for (r in d) s = R(h ? f[r] : 0, r, u), r in f || (f[r] = s.start, h && (s.end = s.start,
s.start = "width" === r || "height" === r ? 1 : 0));
}
}
function B(e, t, n, i, r) {
return new B.prototype.init(e, t, n, i, r);
}
function j(e, t) {
var n, i = {
height: e
}, r = 0;
for (t = t ? 1 : 0; 4 > r; r += 2 - t) n = Yt[r], i["margin" + n] = i["padding" + n] = e;
return t && (i.opacity = i.width = e), i;
}
function $(e) {
return rt.isWindow(e) ? e : 9 === e.nodeType && e.defaultView;
}
var G, q, H = typeof t, U = e.location, z = e.document, V = z.documentElement, W = e.jQuery, X = e.$, Q = {}, Y = [], K = Y.concat, J = Y.push, Z = Y.slice, et = Y.indexOf, tt = Q.toString, nt = Q.hasOwnProperty, it = "2.0.3".trim, rt = function(e, t) {
return new rt.fn.init(e, t, G);
}, ot = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source, at = /\S+/g, st = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/, lt = /^<(\w+)\s*\/?>(?:<\/\1>|)$/, ct = /^-ms-/, ut = /-([\da-z])/gi, dt = function(e, t) {
return t.toUpperCase();
}, pt = function() {
z.removeEventListener("DOMContentLoaded", pt, !1), e.removeEventListener("load", pt, !1),
rt.ready();
};
rt.fn = rt.prototype = {
jquery: "2.0.3",
constructor: rt,
init: function(e, n, i) {
var r, o;
if (!e) return this;
if ("string" == typeof e) {
if (!(r = "<" === e.charAt(0) && ">" === e.charAt(e.length - 1) && e.length >= 3 ? [ null, e, null ] : st.exec(e)) || !r[1] && n) return !n || n.jquery ? (n || i).find(e) : this.constructor(n).find(e);
if (r[1]) {
if (n = n instanceof rt ? n[0] : n, rt.merge(this, rt.parseHTML(r[1], n && n.nodeType ? n.ownerDocument || n : z, !0)),
lt.test(r[1]) && rt.isPlainObject(n)) for (r in n) rt.isFunction(this[r]) ? this[r](n[r]) : this.attr(r, n[r]);
return this;
}
return o = z.getElementById(r[2]), o && o.parentNode && (this.length = 1, this[0] = o),
this.context = z, this.selector = e, this;
}
return e.nodeType ? (this.context = this[0] = e, this.length = 1, this) : rt.isFunction(e) ? i.ready(e) : (e.selector !== t && (this.selector = e.selector,
this.context = e.context), rt.makeArray(e, this));
},
selector: "",
length: 0,
toArray: function() {
return Z.call(this);
},
get: function(e) {
return null == e ? this.toArray() : 0 > e ? this[this.length + e] : this[e];
},
pushStack: function(e) {
var t = rt.merge(this.constructor(), e);
return t.prevObject = this, t.context = this.context, t;
},
each: function(e, t) {
return rt.each(this, e, t);
},
ready: function(e) {
return rt.ready.promise().done(e), this;
},
slice: function() {
return this.pushStack(Z.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] ] : []);
},
map: function(e) {
return this.pushStack(rt.map(this, function(t, n) {
return e.call(t, n, t);
}));
},
end: function() {
return this.prevObject || this.constructor(null);
},
push: J,
sort: [].sort,
splice: [].splice
}, rt.fn.init.prototype = rt.fn, rt.extend = rt.fn.extend = function() {
var e, n, i, r, o, a, s = arguments[0] || {}, l = 1, c = arguments.length, u = !1;
for ("boolean" == typeof s && (u = s, s = arguments[1] || {}, l = 2), "object" == typeof s || rt.isFunction(s) || (s = {}),
c === l && (s = this, --l); c > l; l++) if (null != (e = arguments[l])) for (n in e) i = s[n],
r = e[n], s !== r && (u && r && (rt.isPlainObject(r) || (o = rt.isArray(r))) ? (o ? (o = !1,
a = i && rt.isArray(i) ? i : []) : a = i && rt.isPlainObject(i) ? i : {}, s[n] = rt.extend(u, a, r)) : r !== t && (s[n] = r));
return s;
}, rt.extend({
expando: "jQuery" + ("2.0.3" + Math.random()).replace(/\D/g, ""),
noConflict: function(t) {
return e.$ === rt && (e.$ = X), t && e.jQuery === rt && (e.jQuery = W), rt;
},
isReady: !1,
readyWait: 1,
holdReady: function(e) {
e ? rt.readyWait++ : rt.ready(!0);
},
ready: function(e) {
(!0 === e ? --rt.readyWait : rt.isReady) || (rt.isReady = !0, !0 !== e && --rt.readyWait > 0 || (q.resolveWith(z, [ rt ]),
rt.fn.trigger && rt(z).trigger("ready").off("ready")));
},
isFunction: function(e) {
return "function" === rt.type(e);
},
isArray: Array.isArray,
isWindow: function(e) {
return null != e && e === e.window;
},
isNumeric: function(e) {
return !isNaN(parseFloat(e)) && isFinite(e);
},
type: function(e) {
return null == e ? String(e) : "object" == typeof e || "function" == typeof e ? Q[tt.call(e)] || "object" : typeof e;
},
isPlainObject: function(e) {
if ("object" !== rt.type(e) || e.nodeType || rt.isWindow(e)) return !1;
try {
if (e.constructor && !nt.call(e.constructor.prototype, "isPrototypeOf")) return !1;
} catch (e) {
return !1;
}
return !0;
},
isEmptyObject: function(e) {
var t;
for (t in e) return !1;
return !0;
},
error: function(e) {
throw new Error(e);
},
parseHTML: function(e, t, n) {
if (!e || "string" != typeof e) return null;
"boolean" == typeof t && (n = t, t = !1), t = t || z;
var i = lt.exec(e), r = !n && [];
return i ? [ t.createElement(i[1]) ] : (i = rt.buildFragment([ e ], t, r), r && rt(r).remove(),
rt.merge([], i.childNodes));
},
parseJSON: JSON.parse,
parseXML: function(e) {
var n, i;
if (!e || "string" != typeof e) return null;
try {
i = new DOMParser(), n = i.parseFromString(e, "text/xml");
} catch (e) {
n = t;
}
return n && !n.getElementsByTagName("parsererror").length || rt.error("Invalid XML: " + e),
n;
},
noop: function() {},
globalEval: function(e) {
var t, n = eval;
(e = rt.trim(e)) && (1 === e.indexOf("use strict") ? (t = z.createElement("script"),
t.text = e, z.head.appendChild(t).parentNode.removeChild(t)) : n(e));
},
camelCase: function(e) {
return e.replace(ct, "ms-").replace(ut, dt);
},
nodeName: function(e, t) {
return e.nodeName && e.nodeName.toLowerCase() === t.toLowerCase();
},
each: function(e, t, i) {
var r = 0, o = e.length, a = n(e);
if (i) {
if (a) for (;o > r && !1 !== t.apply(e[r], i); r++) ; else for (r in e) if (!1 === t.apply(e[r], i)) break;
} else if (a) for (;o > r && !1 !== t.call(e[r], r, e[r]); r++) ; else for (r in e) if (!1 === t.call(e[r], r, e[r])) break;
return e;
},
trim: function(e) {
return null == e ? "" : it.call(e);
},
makeArray: function(e, t) {
var i = t || [];
return null != e && (n(Object(e)) ? rt.merge(i, "string" == typeof e ? [ e ] : e) : J.call(i, e)),
i;
},
inArray: function(e, t, n) {
return null == t ? -1 : et.call(t, e, n);
},
merge: function(e, n) {
var i = n.length, r = e.length, o = 0;
if ("number" == typeof i) for (;i > o; o++) e[r++] = n[o]; else for (;n[o] !== t; ) e[r++] = n[o++];
return e.length = r, e;
},
grep: function(e, t, n) {
var i, r = [], o = 0, a = e.length;
for (n = !!n; a > o; o++) i = !!t(e[o], o), n !== i && r.push(e[o]);
return r;
},
map: function(e, t, i) {
var r, o = 0, a = e.length, s = n(e), l = [];
if (s) for (;a > o; o++) null != (r = t(e[o], o, i)) && (l[l.length] = r); else for (o in e) null != (r = t(e[o], o, i)) && (l[l.length] = r);
return K.apply([], l);
},
guid: 1,
proxy: function(e, n) {
var i, r, o;
return "string" == typeof n && (i = e[n], n = e, e = i), rt.isFunction(e) ? (r = Z.call(arguments, 2),
o = function() {
return e.apply(n || this, r.concat(Z.call(arguments)));
}, o.guid = e.guid = e.guid || rt.guid++, o) : t;
},
access: function(e, n, i, r, o, a, s) {
var l = 0, c = e.length, u = null == i;
if ("object" === rt.type(i)) {
o = !0;
for (l in i) rt.access(e, n, l, i[l], !0, a, s);
} else if (r !== t && (o = !0, rt.isFunction(r) || (s = !0), u && (s ? (n.call(e, r),
n = null) : (u = n, n = function(e, t, n) {
return u.call(rt(e), n);
})), n)) for (;c > l; l++) n(e[l], i, s ? r : r.call(e[l], l, n(e[l], i)));
return o ? e : u ? n.call(e) : c ? n(e[0], i) : a;
},
now: Date.now,
swap: function(e, t, n, i) {
var r, o, a = {};
for (o in t) a[o] = e.style[o], e.style[o] = t[o];
r = n.apply(e, i || []);
for (o in t) e.style[o] = a[o];
return r;
}
}), rt.ready.promise = function(t) {
return q || (q = rt.Deferred(), "complete" === z.readyState ? setTimeout(rt.ready) : (z.addEventListener("DOMContentLoaded", pt, !1),
e.addEventListener("load", pt, !1))), q.promise(t);
}, rt.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(e, t) {
Q["[object " + t + "]"] = t.toLowerCase();
}), G = rt(z), function(e) {
function t(e, t, n, i) {
var r, o, a, s, l, d, p, h, f, m;
if ((t ? t.ownerDocument || t : F) !== D && I(t), t = t || D, n = n || [], !e || "string" != typeof e) return n;
if (1 !== (s = t.nodeType) && 9 !== s) return [];
if (M && !i) {
if (r = mt.exec(e)) if (a = r[1]) {
if (9 === s) {
if (!(o = t.getElementById(a)) || !o.parentNode) return n;
if (o.id === a) return n.push(o), n;
} else if (t.ownerDocument && (o = t.ownerDocument.getElementById(a)) && P(t, o) && o.id === a) return n.push(o),
n;
} else {
if (r[2]) return Y.apply(n, t.getElementsByTagName(e)), n;
if ((a = r[3]) && x.getElementsByClassName && t.getElementsByClassName) return Y.apply(n, t.getElementsByClassName(a)),
n;
}
if (x.qsa && (!L || !L.test(e))) {
if (h = p = O, f = t, m = 9 === s && e, 1 === s && "object" !== t.nodeName.toLowerCase()) {
for (d = c(e), (p = t.getAttribute("id")) ? h = p.replace(bt, "\\$&") : t.setAttribute("id", h),
h = "[id='" + h + "'] ", l = d.length; l--; ) d[l] = h + u(d[l]);
f = ct.test(e) && t.parentNode || t, m = d.join(",");
}
if (m) try {
return Y.apply(n, f.querySelectorAll(m)), n;
} catch (e) {} finally {
p || t.removeAttribute("id");
}
}
}
return b(e.replace(at, "$1"), t, n, i);
}
function n() {
function e(n, i) {
return t.push(n += " ") > S.cacheLength && delete e[t.shift()], e[n] = i;
}
var t = [];
return e;
}
function i(e) {
return e[O] = !0, e;
}
function r(e) {
var t = D.createElement("div");
try {
return !!e(t);
} catch (e) {
return !1;
} finally {
t.parentNode && t.parentNode.removeChild(t), t = null;
}
}
function o(e, t) {
for (var n = e.split("|"), i = e.length; i--; ) S.attrHandle[n[i]] = t;
}
function a(e, t) {
var n = t && e, i = n && 1 === e.nodeType && 1 === t.nodeType && (~t.sourceIndex || z) - (~e.sourceIndex || z);
if (i) return i;
if (n) for (;n = n.nextSibling; ) if (n === t) return -1;
return e ? 1 : -1;
}
function s(e) {
return i(function(t) {
return t = +t, i(function(n, i) {
for (var r, o = e([], n.length, t), a = o.length; a--; ) n[r = o[a]] && (n[r] = !(i[r] = n[r]));
});
});
}
function l() {}
function c(e, n) {
var i, r, o, a, s, l, c, u = G[e + " "];
if (u) return n ? 0 : u.slice(0);
for (s = e, l = [], c = S.preFilter; s; ) {
i && !(r = st.exec(s)) || (r && (s = s.slice(r[0].length) || s), l.push(o = [])),
i = !1, (r = lt.exec(s)) && (i = r.shift(), o.push({
value: i,
type: r[0].replace(at, " ")
}), s = s.slice(i.length));
for (a in S.filter) !(r = ht[a].exec(s)) || c[a] && !(r = c[a](r)) || (i = r.shift(),
o.push({
value: i,
type: a,
matches: r
}), s = s.slice(i.length));
if (!i) break;
}
return n ? s.length : s ? t.error(e) : G(e, l).slice(0);
}
function u(e) {
for (var t = 0, n = e.length, i = ""; n > t; t++) i += e[t].value;
return i;
}
function d(e, t, n) {
var i = t.dir, r = n && "parentNode" === i, o = j++;
return t.first ? function(t, n, o) {
for (;t = t[i]; ) if (1 === t.nodeType || r) return e(t, n, o);
} : function(t, n, a) {
var s, l, c, u = B + " " + o;
if (a) {
for (;t = t[i]; ) if ((1 === t.nodeType || r) && e(t, n, a)) return !0;
} else for (;t = t[i]; ) if (1 === t.nodeType || r) if (c = t[O] || (t[O] = {}),
(l = c[i]) && l[0] === u) {
if (!0 === (s = l[1]) || s === w) return !0 === s;
} else if (l = c[i] = [ u ], l[1] = e(t, n, a) || w, !0 === l[1]) return !0;
};
}
function p(e) {
return e.length > 1 ? function(t, n, i) {
for (var r = e.length; r--; ) if (!e[r](t, n, i)) return !1;
return !0;
} : e[0];
}
function h(e, t, n, i, r) {
for (var o, a = [], s = 0, l = e.length, c = null != t; l > s; s++) (o = e[s]) && (n && !n(o, i, r) || (a.push(o),
c && t.push(s)));
return a;
}
function f(e, t, n, r, o, a) {
return r && !r[O] && (r = f(r)), o && !o[O] && (o = f(o, a)), i(function(i, a, s, l) {
var c, u, d, p = [], f = [], m = a.length, g = i || v(t || "*", s.nodeType ? [ s ] : s, []), b = !e || !i && t ? g : h(g, p, e, s, l), y = n ? o || (i ? e : m || r) ? [] : a : b;
if (n && n(b, y, s, l), r) for (c = h(y, f), r(c, [], s, l), u = c.length; u--; ) (d = c[u]) && (y[f[u]] = !(b[f[u]] = d));
if (i) {
if (o || e) {
if (o) {
for (c = [], u = y.length; u--; ) (d = y[u]) && c.push(b[u] = d);
o(null, y = [], c, l);
}
for (u = y.length; u--; ) (d = y[u]) && (c = o ? J.call(i, d) : p[u]) > -1 && (i[c] = !(a[c] = d));
}
} else y = h(y === a ? y.splice(m, y.length) : y), o ? o(null, a, y, l) : Y.apply(a, y);
});
}
function m(e) {
for (var t, n, i, r = e.length, o = S.relative[e[0].type], a = o || S.relative[" "], s = o ? 1 : 0, l = d(function(e) {
return e === t;
}, a, !0), c = d(function(e) {
return J.call(t, e) > -1;
}, a, !0), h = [ function(e, n, i) {
return !o && (i || n !== E) || ((t = n).nodeType ? l(e, n, i) : c(e, n, i));
} ]; r > s; s++) if (n = S.relative[e[s].type]) h = [ d(p(h), n) ]; else {
if (n = S.filter[e[s].type].apply(null, e[s].matches), n[O]) {
for (i = ++s; r > i && !S.relative[e[i].type]; i++) ;
return f(s > 1 && p(h), s > 1 && u(e.slice(0, s - 1).concat({
value: " " === e[s - 2].type ? "*" : ""
})).replace(at, "$1"), n, i > s && m(e.slice(s, i)), r > i && m(e = e.slice(i)), r > i && u(e));
}
h.push(n);
}
return p(h);
}
function g(e, n) {
var r = 0, o = n.length > 0, a = e.length > 0, s = function(i, s, l, c, u) {
var d, p, f, m = [], g = 0, v = "0", b = i && [], y = null != u, x = E, C = i || a && S.find.TAG("*", u && s.parentNode || s), _ = B += null == x ? 1 : Math.random() || .1;
for (y && (E = s !== D && s, w = r); null != (d = C[v]); v++) {
if (a && d) {
for (p = 0; f = e[p++]; ) if (f(d, s, l)) {
c.push(d);
break;
}
y && (B = _, w = ++r);
}
o && ((d = !f && d) && g--, i && b.push(d));
}
if (g += v, o && v !== g) {
for (p = 0; f = n[p++]; ) f(b, m, s, l);
if (i) {
if (g > 0) for (;v--; ) b[v] || m[v] || (m[v] = X.call(c));
m = h(m);
}
Y.apply(c, m), y && !i && m.length > 0 && g + n.length > 1 && t.uniqueSort(c);
}
return y && (B = _, E = x), b;
};
return o ? i(s) : s;
}
function v(e, n, i) {
for (var r = 0, o = n.length; o > r; r++) t(e, n[r], i);
return i;
}
function b(e, t, n, i) {
var r, o, a, s, l, d = c(e);
if (!i && 1 === d.length) {
if (o = d[0] = d[0].slice(0), o.length > 2 && "ID" === (a = o[0]).type && x.getById && 9 === t.nodeType && M && S.relative[o[1].type]) {
if (!(t = (S.find.ID(a.matches[0].replace(yt, xt), t) || [])[0])) return n;
e = e.slice(o.shift().value.length);
}
for (r = ht.needsContext.test(e) ? 0 : o.length; r-- && (a = o[r], !S.relative[s = a.type]); ) if ((l = S.find[s]) && (i = l(a.matches[0].replace(yt, xt), ct.test(o[0].type) && t.parentNode || t))) {
if (o.splice(r, 1), !(e = i.length && u(o))) return Y.apply(n, i), n;
break;
}
}
return k(e, d)(i, t, !M, n, ct.test(e)), n;
}
var y, x, w, S, C, _, k, E, T, I, D, N, M, L, A, R, P, O = "sizzle" + -new Date(), F = e.document, B = 0, j = 0, $ = n(), G = n(), q = n(), H = !1, U = function(e, t) {
return e === t ? (H = !0, 0) : 0;
}, z = 1 << 31, V = {}.hasOwnProperty, W = [], X = W.pop, Q = W.push, Y = W.push, K = W.slice, J = W.indexOf || function(e) {
for (var t = 0, n = this.length; n > t; t++) if (this[t] === e) return t;
return -1;
}, Z = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped", et = "[\\x20\\t\\r\\n\\f]", tt = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+", nt = tt.replace("w", "w#"), it = "\\[" + et + "*(" + tt + ")" + et + "*(?:([*^$|!~]?=)" + et + "*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|(" + nt + ")|)|)" + et + "*\\]", ot = ":(" + tt + ")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|" + it.replace(3, 8) + ")*)|.*)\\)|)", at = new RegExp("^" + et + "+|((?:^|[^\\\\])(?:\\\\.)*)" + et + "+$", "g"), st = new RegExp("^" + et + "*," + et + "*"), lt = new RegExp("^" + et + "*([>+~]|" + et + ")" + et + "*"), ct = new RegExp(et + "*[+~]"), ut = new RegExp("=" + et + "*([^\\]'\"]*)" + et + "*\\]", "g"), dt = new RegExp(ot), pt = new RegExp("^" + nt + "$"), ht = {
ID: new RegExp("^#(" + tt + ")"),
CLASS: new RegExp("^\\.(" + tt + ")"),
TAG: new RegExp("^(" + tt.replace("w", "w*") + ")"),
ATTR: new RegExp("^" + it),
PSEUDO: new RegExp("^" + ot),
CHILD: new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + et + "*(even|odd|(([+-]|)(\\d*)n|)" + et + "*(?:([+-]|)" + et + "*(\\d+)|))" + et + "*\\)|)", "i"),
bool: new RegExp("^(?:" + Z + ")$", "i"),
needsContext: new RegExp("^" + et + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + et + "*((?:-\\d)?\\d*)" + et + "*\\)|)(?=[^-]|$)", "i")
}, ft = /^[^{]+\{\s*\[native \w/, mt = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, gt = /^(?:input|select|textarea|button)$/i, vt = /^h\d$/i, bt = /'|\\/g, yt = new RegExp("\\\\([\\da-f]{1,6}" + et + "?|(" + et + ")|.)", "ig"), xt = 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);
};
try {
Y.apply(W = K.call(F.childNodes), F.childNodes), W[F.childNodes.length].nodeType;
} catch (e) {
Y = {
apply: W.length ? function(e, t) {
Q.apply(e, K.call(t));
} : function(e, t) {
for (var n = e.length, i = 0; e[n++] = t[i++]; ) ;
e.length = n - 1;
}
};
}
_ = t.isXML = function(e) {
var t = e && (e.ownerDocument || e).documentElement;
return !!t && "HTML" !== t.nodeName;
}, x = t.support = {}, I = t.setDocument = function(e) {
var t = e ? e.ownerDocument || e : F, n = t.defaultView;
return t !== D && 9 === t.nodeType && t.documentElement ? (D = t, N = t.documentElement,
M = !_(t), n && n.attachEvent && n !== n.top && n.attachEvent("onbeforeunload", function() {
I();
}), x.attributes = r(function(e) {
return e.className = "i", !e.getAttribute("className");
}), x.getElementsByTagName = r(function(e) {
return e.appendChild(t.createComment("")), !e.getElementsByTagName("*").length;
}), x.getElementsByClassName = r(function(e) {
return e.innerHTML = "<div class='a'></div><div class='a i'></div>", e.firstChild.className = "i",
2 === e.getElementsByClassName("i").length;
}), x.getById = r(function(e) {
return N.appendChild(e).id = O, !t.getElementsByName || !t.getElementsByName(O).length;
}), x.getById ? (S.find.ID = function(e, t) {
if (void 0 !== t.getElementById && M) {
var n = t.getElementById(e);
return n && n.parentNode ? [ n ] : [];
}
}, S.filter.ID = function(e) {
var t = e.replace(yt, xt);
return function(e) {
return e.getAttribute("id") === t;
};
}) : (delete S.find.ID, S.filter.ID = function(e) {
var t = e.replace(yt, xt);
return function(e) {
var n = void 0 !== e.getAttributeNode && e.getAttributeNode("id");
return n && n.value === t;
};
}), S.find.TAG = x.getElementsByTagName ? function(e, t) {
return void 0 !== t.getElementsByTagName ? t.getElementsByTagName(e) : void 0;
} : function(e, t) {
var n, i = [], r = 0, o = t.getElementsByTagName(e);
if ("*" === e) {
for (;n = o[r++]; ) 1 === n.nodeType && i.push(n);
return i;
}
return o;
}, S.find.CLASS = x.getElementsByClassName && function(e, t) {
return void 0 !== t.getElementsByClassName && M ? t.getElementsByClassName(e) : void 0;
}, A = [], L = [], (x.qsa = ft.test(t.querySelectorAll)) && (r(function(e) {
e.innerHTML = "<select><option selected=''></option></select>", e.querySelectorAll("[selected]").length || L.push("\\[" + et + "*(?:value|" + Z + ")"),
e.querySelectorAll(":checked").length || L.push(":checked");
}), r(function(e) {
var n = t.createElement("input");
n.setAttribute("type", "hidden"), e.appendChild(n).setAttribute("t", ""), e.querySelectorAll("[t^='']").length && L.push("[*^$]=" + et + "*(?:''|\"\")"),
e.querySelectorAll(":enabled").length || L.push(":enabled", ":disabled"), e.querySelectorAll("*,:x"),
L.push(",.*:");
})), (x.matchesSelector = ft.test(R = N.webkitMatchesSelector || N.mozMatchesSelector || N.oMatchesSelector || N.msMatchesSelector)) && r(function(e) {
x.disconnectedMatch = R.call(e, "div"), R.call(e, "[s!='']:x"), A.push("!=", ot);
}), L = L.length && new RegExp(L.join("|")), A = A.length && new RegExp(A.join("|")),
P = ft.test(N.contains) || N.compareDocumentPosition ? 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;
}, U = N.compareDocumentPosition ? function(e, n) {
if (e === n) return H = !0, 0;
var i = n.compareDocumentPosition && e.compareDocumentPosition && e.compareDocumentPosition(n);
return i ? 1 & i || !x.sortDetached && n.compareDocumentPosition(e) === i ? e === t || P(F, e) ? -1 : n === t || P(F, n) ? 1 : T ? J.call(T, e) - J.call(T, n) : 0 : 4 & i ? -1 : 1 : e.compareDocumentPosition ? -1 : 1;
} : function(e, n) {
var i, r = 0, o = e.parentNode, s = n.parentNode, l = [ e ], c = [ n ];
if (e === n) return H = !0, 0;
if (!o || !s) return e === t ? -1 : n === t ? 1 : o ? -1 : s ? 1 : T ? J.call(T, e) - J.call(T, n) : 0;
if (o === s) return a(e, n);
for (i = e; i = i.parentNode; ) l.unshift(i);
for (i = n; i = i.parentNode; ) c.unshift(i);
for (;l[r] === c[r]; ) r++;
return r ? a(l[r], c[r]) : l[r] === F ? -1 : c[r] === F ? 1 : 0;
}, t) : D;
}, t.matches = function(e, n) {
return t(e, null, null, n);
}, t.matchesSelector = function(e, n) {
if ((e.ownerDocument || e) !== D && I(e), n = n.replace(ut, "='$1']"), !(!x.matchesSelector || !M || A && A.test(n) || L && L.test(n))) try {
var i = R.call(e, n);
if (i || x.disconnectedMatch || e.document && 11 !== e.document.nodeType) return i;
} catch (e) {}
return t(n, D, null, [ e ]).length > 0;
}, t.contains = function(e, t) {
return (e.ownerDocument || e) !== D && I(e), P(e, t);
}, t.attr = function(e, t) {
(e.ownerDocument || e) !== D && I(e);
var n = S.attrHandle[t.toLowerCase()], i = n && V.call(S.attrHandle, t.toLowerCase()) ? n(e, t, !M) : void 0;
return void 0 === i ? x.attributes || !M ? e.getAttribute(t) : (i = e.getAttributeNode(t)) && i.specified ? i.value : null : i;
}, t.error = function(e) {
throw new Error("Syntax error, unrecognized expression: " + e);
}, t.uniqueSort = function(e) {
var t, n = [], i = 0, r = 0;
if (H = !x.detectDuplicates, T = !x.sortStable && e.slice(0), e.sort(U), H) {
for (;t = e[r++]; ) t === e[r] && (i = n.push(r));
for (;i--; ) e.splice(n[i], 1);
}
return e;
}, C = t.getText = function(e) {
var t, n = "", i = 0, r = e.nodeType;
if (r) {
if (1 === r || 9 === r || 11 === r) {
if ("string" == typeof e.textContent) return e.textContent;
for (e = e.firstChild; e; e = e.nextSibling) n += C(e);
} else if (3 === r || 4 === r) return e.nodeValue;
} else for (;t = e[i]; i++) n += C(t);
return n;
}, S = t.selectors = {
cacheLength: 50,
createPseudo: i,
match: ht,
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(yt, xt), e[3] = (e[4] || e[5] || "").replace(yt, xt),
"~=" === 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[5] && e[2];
return ht.CHILD.test(e[0]) ? null : (e[3] && void 0 !== e[4] ? e[2] = e[4] : n && dt.test(n) && (t = c(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(yt, xt).toLowerCase();
return "*" === e ? function() {
return !0;
} : function(e) {
return e.nodeName && e.nodeName.toLowerCase() === t;
};
},
CLASS: function(e) {
var t = $[e + " "];
return t || (t = new RegExp("(^|" + et + ")" + e + "(" + et + "|$)")) && $(e, function(e) {
return t.test("string" == typeof e.className && e.className || void 0 !== e.getAttribute && e.getAttribute("class") || "");
});
},
ATTR: function(e, n, i) {
return function(r) {
var o = t.attr(r, e);
return null == o ? "!=" === n : !n || (o += "", "=" === n ? o === i : "!=" === n ? o !== i : "^=" === n ? i && 0 === o.indexOf(i) : "*=" === n ? i && o.indexOf(i) > -1 : "$=" === n ? i && o.slice(-i.length) === i : "~=" === n ? (" " + o + " ").indexOf(i) > -1 : "|=" === n && (o === i || o.slice(0, i.length + 1) === i + "-"));
};
},
CHILD: function(e, t, n, i, r) {
var o = "nth" !== e.slice(0, 3), a = "last" !== e.slice(-4), s = "of-type" === t;
return 1 === i && 0 === r ? function(e) {
return !!e.parentNode;
} : function(t, n, l) {
var c, u, d, p, h, f, m = o !== a ? "nextSibling" : "previousSibling", g = t.parentNode, v = s && t.nodeName.toLowerCase(), b = !l && !s;
if (g) {
if (o) {
for (;m; ) {
for (d = t; d = d[m]; ) if (s ? d.nodeName.toLowerCase() === v : 1 === d.nodeType) return !1;
f = m = "only" === e && !f && "nextSibling";
}
return !0;
}
if (f = [ a ? g.firstChild : g.lastChild ], a && b) {
for (u = g[O] || (g[O] = {}), c = u[e] || [], h = c[0] === B && c[1], p = c[0] === B && c[2],
d = h && g.childNodes[h]; d = ++h && d && d[m] || (p = h = 0) || f.pop(); ) if (1 === d.nodeType && ++p && d === t) {
u[e] = [ B, h, p ];
break;
}
} else if (b && (c = (t[O] || (t[O] = {}))[e]) && c[0] === B) p = c[1]; else for (;(d = ++h && d && d[m] || (p = h = 0) || f.pop()) && ((s ? d.nodeName.toLowerCase() !== v : 1 !== d.nodeType) || !++p || (b && ((d[O] || (d[O] = {}))[e] = [ B, p ]),
d !== t)); ) ;
return (p -= r) === i || p % i == 0 && p / i >= 0;
}
};
},
PSEUDO: function(e, n) {
var r, o = S.pseudos[e] || S.setFilters[e.toLowerCase()] || t.error("unsupported pseudo: " + e);
return o[O] ? o(n) : o.length > 1 ? (r = [ e, e, "", n ], S.setFilters.hasOwnProperty(e.toLowerCase()) ? i(function(e, t) {
for (var i, r = o(e, n), a = r.length; a--; ) i = J.call(e, r[a]), e[i] = !(t[i] = r[a]);
}) : function(e) {
return o(e, 0, r);
}) : o;
}
},
pseudos: {
not: i(function(e) {
var t = [], n = [], r = k(e.replace(at, "$1"));
return r[O] ? i(function(e, t, n, i) {
for (var o, a = r(e, null, i, []), s = e.length; s--; ) (o = a[s]) && (e[s] = !(t[s] = o));
}) : function(e, i, o) {
return t[0] = e, r(t, null, o, n), !n.pop();
};
}),
has: i(function(e) {
return function(n) {
return t(e, n).length > 0;
};
}),
contains: i(function(e) {
return function(t) {
return (t.textContent || t.innerText || C(t)).indexOf(e) > -1;
};
}),
lang: i(function(e) {
return pt.test(e || "") || t.error("unsupported lang: " + e), e = e.replace(yt, xt).toLowerCase(),
function(t) {
var n;
do if (n = M ? t.lang : t.getAttribute("xml:lang") || t.getAttribute("lang")) return (n = n.toLowerCase()) === 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 === N;
},
focus: function(e) {
return e === D.activeElement && (!D.hasFocus || D.hasFocus()) && !!(e.type || e.href || ~e.tabIndex);
},
enabled: function(e) {
return !1 === e.disabled;
},
disabled: function(e) {
return !0 === e.disabled;
},
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, !0 === e.selected;
},
empty: function(e) {
for (e = e.firstChild; e; e = e.nextSibling) if (e.nodeName > "@" || 3 === e.nodeType || 4 === e.nodeType) return !1;
return !0;
},
parent: function(e) {
return !S.pseudos.empty(e);
},
header: function(e) {
return vt.test(e.nodeName);
},
input: function(e) {
return gt.test(e.nodeName);
},
button: function(e) {
var t = e.nodeName.toLowerCase();
return "input" === t && "button" === e.type || "button" === t;
},
text: function(e) {
var t;
return "input" === e.nodeName.toLowerCase() && "text" === e.type && (null == (t = e.getAttribute("type")) || t.toLowerCase() === e.type);
},
first: s(function() {
return [ 0 ];
}),
last: s(function(e, t) {
return [ t - 1 ];
}),
eq: s(function(e, t, n) {
return [ 0 > n ? n + t : n ];
}),
even: s(function(e, t) {
for (var n = 0; t > n; n += 2) e.push(n);
return e;
}),
odd: s(function(e, t) {
for (var n = 1; t > n; n += 2) e.push(n);
return e;
}),
lt: s(function(e, t, n) {
for (var i = 0 > n ? n + t : n; --i >= 0; ) e.push(i);
return e;
}),
gt: s(function(e, t, n) {
for (var i = 0 > n ? n + t : n; ++i < t; ) e.push(i);
return e;
})
}
}, S.pseudos.nth = S.pseudos.eq;
for (y in {
radio: !0,
checkbox: !0,
file: !0,
password: !0,
image: !0
}) S.pseudos[y] = function(e) {
return function(t) {
return "input" === t.nodeName.toLowerCase() && t.type === e;
};
}(y);
for (y in {
submit: !0,
reset: !0
}) S.pseudos[y] = function(e) {
return function(t) {
var n = t.nodeName.toLowerCase();
return ("input" === n || "button" === n) && t.type === e;
};
}(y);
l.prototype = S.filters = S.pseudos, S.setFilters = new l(), k = t.compile = function(e, t) {
var n, i = [], r = [], o = q[e + " "];
if (!o) {
for (t || (t = c(e)), n = t.length; n--; ) o = m(t[n]), o[O] ? i.push(o) : r.push(o);
o = q(e, g(r, i));
}
return o;
}, x.sortStable = O.split("").sort(U).join("") === O, x.detectDuplicates = H, I(),
x.sortDetached = r(function(e) {
return 1 & e.compareDocumentPosition(D.createElement("div"));
}), r(function(e) {
return e.innerHTML = "<a href='#'></a>", "#" === e.firstChild.getAttribute("href");
}) || o("type|href|height|width", function(e, t, n) {
return n ? void 0 : e.getAttribute(t, "type" === t.toLowerCase() ? 1 : 2);
}), x.attributes && r(function(e) {
return e.innerHTML = "<input/>", e.firstChild.setAttribute("value", ""), "" === e.firstChild.getAttribute("value");
}) || o("value", function(e, t, n) {
return n || "input" !== e.nodeName.toLowerCase() ? void 0 : e.defaultValue;
}), r(function(e) {
return null == e.getAttribute("disabled");
}) || o(Z, function(e, t, n) {
var i;
return n ? void 0 : (i = e.getAttributeNode(t)) && i.specified ? i.value : !0 === e[t] ? t.toLowerCase() : null;
}), rt.find = t, rt.expr = t.selectors, rt.expr[":"] = rt.expr.pseudos, rt.unique = t.uniqueSort,
rt.text = t.getText, rt.isXMLDoc = t.isXML, rt.contains = t.contains;
}(e);
var ht = {};
rt.Callbacks = function(e) {
e = "string" == typeof e ? ht[e] || i(e) : rt.extend({}, e);
var n, r, o, a, s, l, c = [], u = !e.once && [], d = function(t) {
for (n = e.memory && t, r = !0, l = a || 0, a = 0, s = c.length, o = !0; c && s > l; l++) if (!1 === c[l].apply(t[0], t[1]) && e.stopOnFalse) {
n = !1;
break;
}
o = !1, c && (u ? u.length && d(u.shift()) : n ? c = [] : p.disable());
}, p = {
add: function() {
if (c) {
var t = c.length;
!function i(t) {
rt.each(t, function(t, n) {
var r = rt.type(n);
"function" === r ? e.unique && p.has(n) || c.push(n) : n && n.length && "string" !== r && i(n);
});
}(arguments), o ? s = c.length : n && (a = t, d(n));
}
return this;
},
remove: function() {
return c && rt.each(arguments, function(e, t) {
for (var n; (n = rt.inArray(t, c, n)) > -1; ) c.splice(n, 1), o && (s >= n && s--,
l >= n && l--);
}), this;
},
has: function(e) {
return e ? rt.inArray(e, c) > -1 : !(!c || !c.length);
},
empty: function() {
return c = [], s = 0, this;
},
disable: function() {
return c = u = n = t, this;
},
disabled: function() {
return !c;
},
lock: function() {
return u = t, n || p.disable(), this;
},
locked: function() {
return !u;
},
fireWith: function(e, t) {
return !c || r && !u || (t = t || [], t = [ e, t.slice ? t.slice() : t ], o ? u.push(t) : d(t)),
this;
},
fire: function() {
return p.fireWith(this, arguments), this;
},
fired: function() {
return !!r;
}
};
return p;
}, rt.extend({
Deferred: function(e) {
var t = [ [ "resolve", "done", rt.Callbacks("once memory"), "resolved" ], [ "reject", "fail", rt.Callbacks("once memory"), "rejected" ], [ "notify", "progress", rt.Callbacks("memory") ] ], n = "pending", i = {
state: function() {
return n;
},
always: function() {
return r.done(arguments).fail(arguments), this;
},
then: function() {
var e = arguments;
return rt.Deferred(function(n) {
rt.each(t, function(t, o) {
var a = o[0], s = rt.isFunction(e[t]) && e[t];
r[o[1]](function() {
var e = s && s.apply(this, arguments);
e && rt.isFunction(e.promise) ? e.promise().done(n.resolve).fail(n.reject).progress(n.notify) : n[a + "With"](this === i ? n.promise() : this, s ? [ e ] : arguments);
});
}), e = null;
}).promise();
},
promise: function(e) {
return null != e ? rt.extend(e, i) : i;
}
}, r = {};
return i.pipe = i.then, rt.each(t, function(e, o) {
var a = o[2], s = o[3];
i[o[1]] = a.add, s && a.add(function() {
n = s;
}, t[1 ^ e][2].disable, t[2][2].lock), r[o[0]] = function() {
return r[o[0] + "With"](this === r ? i : this, arguments), this;
}, r[o[0] + "With"] = a.fireWith;
}), i.promise(r), e && e.call(r, r), r;
},
when: function(e) {
var t, n, i, r = 0, o = Z.call(arguments), a = o.length, s = 1 !== a || e && rt.isFunction(e.promise) ? a : 0, l = 1 === s ? e : rt.Deferred(), c = function(e, n, i) {
return function(r) {
n[e] = this, i[e] = arguments.length > 1 ? Z.call(arguments) : r, i === t ? l.notifyWith(n, i) : --s || l.resolveWith(n, i);
};
};
if (a > 1) for (t = new Array(a), n = new Array(a), i = new Array(a); a > r; r++) o[r] && rt.isFunction(o[r].promise) ? o[r].promise().done(c(r, i, o)).fail(l.reject).progress(c(r, n, t)) : --s;
return s || l.resolveWith(i, o), l.promise();
}
}), rt.support = function(t) {
var n = z.createElement("input"), i = z.createDocumentFragment(), r = z.createElement("div"), o = z.createElement("select"), a = o.appendChild(z.createElement("option"));
return n.type ? (n.type = "checkbox", t.checkOn = "" !== n.value, t.optSelected = a.selected,
t.reliableMarginRight = !0, t.boxSizingReliable = !0, t.pixelPosition = !1, n.checked = !0,
t.noCloneChecked = n.cloneNode(!0).checked, o.disabled = !0, t.optDisabled = !a.disabled,
n = z.createElement("input"), n.value = "t", n.type = "radio", t.radioValue = "t" === n.value,
n.setAttribute("checked", "t"), n.setAttribute("name", "t"), i.appendChild(n), t.checkClone = i.cloneNode(!0).cloneNode(!0).lastChild.checked,
t.focusinBubbles = "onfocusin" in e, r.style.backgroundClip = "content-box", r.cloneNode(!0).style.backgroundClip = "",
t.clearCloneStyle = "content-box" === r.style.backgroundClip, rt(function() {
var n, i, o = z.getElementsByTagName("body")[0];
o && (n = z.createElement("div"), n.style.cssText = "border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",
o.appendChild(n).appendChild(r), r.innerHTML = "", r.style.cssText = "-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%",
rt.swap(o, null != o.style.zoom ? {
zoom: 1
} : {}, function() {
t.boxSizing = 4 === r.offsetWidth;
}), e.getComputedStyle && (t.pixelPosition = "1%" !== (e.getComputedStyle(r, null) || {}).top,
t.boxSizingReliable = "4px" === (e.getComputedStyle(r, null) || {
width: "4px"
}).width, i = r.appendChild(z.createElement("div")), i.style.cssText = r.style.cssText = "padding:0;margin:0;border:0;display:block;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box",
i.style.marginRight = i.style.width = "0", r.style.width = "1px", t.reliableMarginRight = !parseFloat((e.getComputedStyle(i, null) || {}).marginRight)),
o.removeChild(n));
}), t) : t;
}({});
var ft, mt, gt = /(?:\{[\s\S]*\}|\[[\s\S]*\])$/, vt = /([A-Z])/g;
r.uid = 1, r.accepts = function(e) {
return !e.nodeType || 1 === e.nodeType || 9 === e.nodeType;
}, r.prototype = {
key: function(e) {
if (!r.accepts(e)) return 0;
var t = {}, n = e[this.expando];
if (!n) {
n = r.uid++;
try {
t[this.expando] = {
value: n
}, Object.defineProperties(e, t);
} catch (i) {
t[this.expando] = n, rt.extend(e, t);
}
}
return this.cache[n] || (this.cache[n] = {}), n;
},
set: function(e, t, n) {
var i, r = this.key(e), o = this.cache[r];
if ("string" == typeof t) o[t] = n; else if (rt.isEmptyObject(o)) rt.extend(this.cache[r], t); else for (i in t) o[i] = t[i];
return o;
},
get: function(e, n) {
var i = this.cache[this.key(e)];
return n === t ? i : i[n];
},
access: function(e, n, i) {
var r;
return n === t || n && "string" == typeof n && i === t ? (r = this.get(e, n), r !== t ? r : this.get(e, rt.camelCase(n))) : (this.set(e, n, i),
i !== t ? i : n);
},
remove: function(e, n) {
var i, r, o, a = this.key(e), s = this.cache[a];
if (n === t) this.cache[a] = {}; else {
rt.isArray(n) ? r = n.concat(n.map(rt.camelCase)) : (o = rt.camelCase(n), n in s ? r = [ n, o ] : (r = o,
r = r in s ? [ r ] : r.match(at) || [])), i = r.length;
for (;i--; ) delete s[r[i]];
}
},
hasData: function(e) {
return !rt.isEmptyObject(this.cache[e[this.expando]] || {});
},
discard: function(e) {
e[this.expando] && delete this.cache[e[this.expando]];
}
}, ft = new r(), mt = new r(), rt.extend({
acceptData: r.accepts,
hasData: function(e) {
return ft.hasData(e) || mt.hasData(e);
},
data: function(e, t, n) {
return ft.access(e, t, n);
},
removeData: function(e, t) {
ft.remove(e, t);
},
_data: function(e, t, n) {
return mt.access(e, t, n);
},
_removeData: function(e, t) {
mt.remove(e, t);
}
}), rt.fn.extend({
data: function(e, n) {
var i, r, a = this[0], s = 0, l = null;
if (e === t) {
if (this.length && (l = ft.get(a), 1 === a.nodeType && !mt.get(a, "hasDataAttrs"))) {
for (i = a.attributes; s < i.length; s++) r = i[s].name, 0 === r.indexOf("data-") && (r = rt.camelCase(r.slice(5)),
o(a, r, l[r]));
mt.set(a, "hasDataAttrs", !0);
}
return l;
}
return "object" == typeof e ? this.each(function() {
ft.set(this, e);
}) : rt.access(this, function(n) {
var i, r = rt.camelCase(e);
if (a && n === t) {
if ((i = ft.get(a, e)) !== t) return i;
if ((i = ft.get(a, r)) !== t) return i;
if ((i = o(a, r, t)) !== t) return i;
} else this.each(function() {
var i = ft.get(this, r);
ft.set(this, r, n), -1 !== e.indexOf("-") && i !== t && ft.set(this, e, n);
});
}, null, n, arguments.length > 1, null, !0);
},
removeData: function(e) {
return this.each(function() {
ft.remove(this, e);
});
}
}), rt.extend({
queue: function(e, t, n) {
var i;
return e ? (t = (t || "fx") + "queue", i = mt.get(e, t), n && (!i || rt.isArray(n) ? i = mt.access(e, t, rt.makeArray(n)) : i.push(n)),
i || []) : void 0;
},
dequeue: function(e, t) {
t = t || "fx";
var n = rt.queue(e, t), i = n.length, r = n.shift(), o = rt._queueHooks(e, t), a = function() {
rt.dequeue(e, t);
};
"inprogress" === r && (r = n.shift(), i--), r && ("fx" === t && n.unshift("inprogress"),
delete o.stop, r.call(e, a, o)), !i && o && o.empty.fire();
},
_queueHooks: function(e, t) {
var n = t + "queueHooks";
return mt.get(e, n) || mt.access(e, n, {
empty: rt.Callbacks("once memory").add(function() {
mt.remove(e, [ t + "queue", n ]);
})
});
}
}), rt.fn.extend({
queue: function(e, n) {
var i = 2;
return "string" != typeof e && (n = e, e = "fx", i--), arguments.length < i ? rt.queue(this[0], e) : n === t ? this : this.each(function() {
var t = rt.queue(this, e, n);
rt._queueHooks(this, e), "fx" === e && "inprogress" !== t[0] && rt.dequeue(this, e);
});
},
dequeue: function(e) {
return this.each(function() {
rt.dequeue(this, e);
});
},
delay: function(e, t) {
return e = rt.fx ? rt.fx.speeds[e] || e : e, t = t || "fx", this.queue(t, function(t, n) {
var i = setTimeout(t, e);
n.stop = function() {
clearTimeout(i);
};
});
},
clearQueue: function(e) {
return this.queue(e || "fx", []);
},
promise: function(e, n) {
var i, r = 1, o = rt.Deferred(), a = this, s = this.length, l = function() {
--r || o.resolveWith(a, [ a ]);
};
for ("string" != typeof e && (n = e, e = t), e = e || "fx"; s--; ) (i = mt.get(a[s], e + "queueHooks")) && i.empty && (r++,
i.empty.add(l));
return l(), o.promise(n);
}
});
var bt, yt = /[\t\r\n\f]/g, xt = /\r/g, wt = /^(?:input|select|textarea|button)$/i;
rt.fn.extend({
attr: function(e, t) {
return rt.access(this, rt.attr, e, t, arguments.length > 1);
},
removeAttr: function(e) {
return this.each(function() {
rt.removeAttr(this, e);
});
},
prop: function(e, t) {
return rt.access(this, rt.prop, e, t, arguments.length > 1);
},
removeProp: function(e) {
return this.each(function() {
delete this[rt.propFix[e] || e];
});
},
addClass: function(e) {
var t, n, i, r, o, a = 0, s = this.length, l = "string" == typeof e && e;
if (rt.isFunction(e)) return this.each(function(t) {
rt(this).addClass(e.call(this, t, this.className));
});
if (l) for (t = (e || "").match(at) || []; s > a; a++) if (n = this[a], i = 1 === n.nodeType && (n.className ? (" " + n.className + " ").replace(yt, " ") : " ")) {
for (o = 0; r = t[o++]; ) i.indexOf(" " + r + " ") < 0 && (i += r + " ");
n.className = rt.trim(i);
}
return this;
},
removeClass: function(e) {
var t, n, i, r, o, a = 0, s = this.length, l = 0 === arguments.length || "string" == typeof e && e;
if (rt.isFunction(e)) return this.each(function(t) {
rt(this).removeClass(e.call(this, t, this.className));
});
if (l) for (t = (e || "").match(at) || []; s > a; a++) if (n = this[a], i = 1 === n.nodeType && (n.className ? (" " + n.className + " ").replace(yt, " ") : "")) {
for (o = 0; r = t[o++]; ) for (;i.indexOf(" " + r + " ") >= 0; ) i = i.replace(" " + r + " ", " ");
n.className = e ? rt.trim(i) : "";
}
return this;
},
toggleClass: function(e, t) {
var n = typeof e;
return "boolean" == typeof t && "string" === n ? t ? this.addClass(e) : this.removeClass(e) : this.each(rt.isFunction(e) ? function(n) {
rt(this).toggleClass(e.call(this, n, this.className, t), t);
} : function() {
if ("string" === n) for (var t, i = 0, r = rt(this), o = e.match(at) || []; t = o[i++]; ) r.hasClass(t) ? r.removeClass(t) : r.addClass(t); else n !== H && "boolean" !== n || (this.className && mt.set(this, "__className__", this.className),
this.className = this.className || !1 === e ? "" : mt.get(this, "__className__") || "");
});
},
hasClass: function(e) {
for (var t = " " + e + " ", n = 0, i = this.length; i > n; n++) if (1 === this[n].nodeType && (" " + this[n].className + " ").replace(yt, " ").indexOf(t) >= 0) return !0;
return !1;
},
val: function(e) {
var n, i, r, o = this[0];
return arguments.length ? (r = rt.isFunction(e), this.each(function(i) {
var o;
1 === this.nodeType && (o = r ? e.call(this, i, rt(this).val()) : e, null == o ? o = "" : "number" == typeof o ? o += "" : rt.isArray(o) && (o = rt.map(o, function(e) {
return null == e ? "" : e + "";
})), (n = rt.valHooks[this.type] || rt.valHooks[this.nodeName.toLowerCase()]) && "set" in n && n.set(this, o, "value") !== t || (this.value = o));
})) : o ? (n = rt.valHooks[o.type] || rt.valHooks[o.nodeName.toLowerCase()]) && "get" in n && (i = n.get(o, "value")) !== t ? i : (i = o.value,
"string" == typeof i ? i.replace(xt, "") : null == i ? "" : i) : void 0;
}
}), rt.extend({
valHooks: {
option: {
get: function(e) {
var t = e.attributes.value;
return !t || t.specified ? e.value : e.text;
}
},
select: {
get: function(e) {
for (var t, n, i = e.options, r = e.selectedIndex, o = "select-one" === e.type || 0 > r, a = o ? null : [], s = o ? r + 1 : i.length, l = 0 > r ? s : o ? r : 0; s > l; l++) if (n = i[l],
!(!n.selected && l !== r || (rt.support.optDisabled ? n.disabled : null !== n.getAttribute("disabled")) || n.parentNode.disabled && rt.nodeName(n.parentNode, "optgroup"))) {
if (t = rt(n).val(), o) return t;
a.push(t);
}
return a;
},
set: function(e, t) {
for (var n, i, r = e.options, o = rt.makeArray(t), a = r.length; a--; ) i = r[a],
(i.selected = rt.inArray(rt(i).val(), o) >= 0) && (n = !0);
return n || (e.selectedIndex = -1), o;
}
}
},
attr: function(e, n, i) {
var r, o, a = e.nodeType;
return e && 3 !== a && 8 !== a && 2 !== a ? typeof e.getAttribute === H ? rt.prop(e, n, i) : (1 === a && rt.isXMLDoc(e) || (n = n.toLowerCase(),
r = rt.attrHooks[n] || (rt.expr.match.bool.test(n) ? bt : void 0)), i === t ? r && "get" in r && null !== (o = r.get(e, n)) ? o : (o = rt.find.attr(e, n),
null == o ? t : o) : null !== i ? r && "set" in r && (o = r.set(e, i, n)) !== t ? o : (e.setAttribute(n, i + ""),
i) : void rt.removeAttr(e, n)) : void 0;
},
removeAttr: function(e, t) {
var n, i, r = 0, o = t && t.match(at);
if (o && 1 === e.nodeType) for (;n = o[r++]; ) i = rt.propFix[n] || n, rt.expr.match.bool.test(n) && (e[i] = !1),
e.removeAttribute(n);
},
attrHooks: {
type: {
set: function(e, t) {
if (!rt.support.radioValue && "radio" === t && rt.nodeName(e, "input")) {
var n = e.value;
return e.setAttribute("type", t), n && (e.value = n), t;
}
}
}
},
propFix: {
"for": "htmlFor",
"class": "className"
},
prop: function(e, n, i) {
var r, o, a, s = e.nodeType;
return e && 3 !== s && 8 !== s && 2 !== s ? (a = 1 !== s || !rt.isXMLDoc(e), a && (n = rt.propFix[n] || n,
o = rt.propHooks[n]), i !== t ? o && "set" in o && (r = o.set(e, i, n)) !== t ? r : e[n] = i : o && "get" in o && null !== (r = o.get(e, n)) ? r : e[n]) : void 0;
},
propHooks: {
tabIndex: {
get: function(e) {
return e.hasAttribute("tabindex") || wt.test(e.nodeName) || e.href ? e.tabIndex : -1;
}
}
}
}), bt = {
set: function(e, t, n) {
return !1 === t ? rt.removeAttr(e, n) : e.setAttribute(n, n), n;
}
}, rt.each(rt.expr.match.bool.source.match(/\w+/g), function(e, n) {
var i = rt.expr.attrHandle[n] || rt.find.attr;
rt.expr.attrHandle[n] = function(e, n, r) {
var o = rt.expr.attrHandle[n], a = r ? t : (rt.expr.attrHandle[n] = t) != i(e, n, r) ? n.toLowerCase() : null;
return rt.expr.attrHandle[n] = o, a;
};
}), rt.support.optSelected || (rt.propHooks.selected = {
get: function(e) {
var t = e.parentNode;
return t && t.parentNode && t.parentNode.selectedIndex, null;
}
}), rt.each([ "tabIndex", "readOnly", "maxLength", "cellSpacing", "cellPadding", "rowSpan", "colSpan", "useMap", "frameBorder", "contentEditable" ], function() {
rt.propFix[this.toLowerCase()] = this;
}), rt.each([ "radio", "checkbox" ], function() {
rt.valHooks[this] = {
set: function(e, t) {
return rt.isArray(t) ? e.checked = rt.inArray(rt(e).val(), t) >= 0 : void 0;
}
}, rt.support.checkOn || (rt.valHooks[this].get = function(e) {
return null === e.getAttribute("value") ? "on" : e.value;
});
});
var St = /^key/, Ct = /^(?:mouse|contextmenu)|click/, _t = /^(?:focusinfocus|focusoutblur)$/, kt = /^([^.]*)(?:\.(.+)|)$/;
rt.event = {
global: {},
add: function(e, n, i, r, o) {
var a, s, l, c, u, d, p, h, f, m, g, v = mt.get(e);
if (v) {
for (i.handler && (a = i, i = a.handler, o = a.selector), i.guid || (i.guid = rt.guid++),
(c = v.events) || (c = v.events = {}), (s = v.handle) || (s = v.handle = function(e) {
return typeof rt === H || e && rt.event.triggered === e.type ? t : rt.event.dispatch.apply(s.elem, arguments);
}, s.elem = e), n = (n || "").match(at) || [ "" ], u = n.length; u--; ) l = kt.exec(n[u]) || [],
f = g = l[1], m = (l[2] || "").split(".").sort(), f && (p = rt.event.special[f] || {},
f = (o ? p.delegateType : p.bindType) || f, p = rt.event.special[f] || {}, d = rt.extend({
type: f,
origType: g,
data: r,
handler: i,
guid: i.guid,
selector: o,
needsContext: o && rt.expr.match.needsContext.test(o),
namespace: m.join(".")
}, a), (h = c[f]) || (h = c[f] = [], h.delegateCount = 0, p.setup && !1 !== p.setup.call(e, r, m, s) || e.addEventListener && e.addEventListener(f, s, !1)),
p.add && (p.add.call(e, d), d.handler.guid || (d.handler.guid = i.guid)), o ? h.splice(h.delegateCount++, 0, d) : h.push(d),
rt.event.global[f] = !0);
e = null;
}
},
remove: function(e, t, n, i, r) {
var o, a, s, l, c, u, d, p, h, f, m, g = mt.hasData(e) && mt.get(e);
if (g && (l = g.events)) {
for (t = (t || "").match(at) || [ "" ], c = t.length; c--; ) if (s = kt.exec(t[c]) || [],
h = m = s[1], f = (s[2] || "").split(".").sort(), h) {
for (d = rt.event.special[h] || {}, h = (i ? d.delegateType : d.bindType) || h,
p = l[h] || [], s = s[2] && new RegExp("(^|\\.)" + f.join("\\.(?:.*\\.|)") + "(\\.|$)"),
a = o = p.length; o--; ) u = p[o], !r && m !== u.origType || n && n.guid !== u.guid || s && !s.test(u.namespace) || i && i !== u.selector && ("**" !== i || !u.selector) || (p.splice(o, 1),
u.selector && p.delegateCount--, d.remove && d.remove.call(e, u));
a && !p.length && (d.teardown && !1 !== d.teardown.call(e, f, g.handle) || rt.removeEvent(e, h, g.handle),
delete l[h]);
} else for (h in l) rt.event.remove(e, h + t[c], n, i, !0);
rt.isEmptyObject(l) && (delete g.handle, mt.remove(e, "events"));
}
},
trigger: function(n, i, r, o) {
var a, s, l, c, u, d, p, h = [ r || z ], f = nt.call(n, "type") ? n.type : n, m = nt.call(n, "namespace") ? n.namespace.split(".") : [];
if (s = l = r = r || z, 3 !== r.nodeType && 8 !== r.nodeType && !_t.test(f + rt.event.triggered) && (f.indexOf(".") >= 0 && (m = f.split("."),
f = m.shift(), m.sort()), u = f.indexOf(":") < 0 && "on" + f, n = n[rt.expando] ? n : new rt.Event(f, "object" == typeof n && n),
n.isTrigger = o ? 2 : 3, n.namespace = m.join("."), n.namespace_re = n.namespace ? new RegExp("(^|\\.)" + m.join("\\.(?:.*\\.|)") + "(\\.|$)") : null,
n.result = t, n.target || (n.target = r), i = null == i ? [ n ] : rt.makeArray(i, [ n ]),
p = rt.event.special[f] || {}, o || !p.trigger || !1 !== p.trigger.apply(r, i))) {
if (!o && !p.noBubble && !rt.isWindow(r)) {
for (c = p.delegateType || f, _t.test(c + f) || (s = s.parentNode); s; s = s.parentNode) h.push(s),
l = s;
l === (r.ownerDocument || z) && h.push(l.defaultView || l.parentWindow || e);
}
for (a = 0; (s = h[a++]) && !n.isPropagationStopped(); ) n.type = a > 1 ? c : p.bindType || f,
d = (mt.get(s, "events") || {})[n.type] && mt.get(s, "handle"), d && d.apply(s, i),
(d = u && s[u]) && rt.acceptData(s) && d.apply && !1 === d.apply(s, i) && n.preventDefault();
return n.type = f, o || n.isDefaultPrevented() || p._default && !1 !== p._default.apply(h.pop(), i) || !rt.acceptData(r) || u && rt.isFunction(r[f]) && !rt.isWindow(r) && (l = r[u],
l && (r[u] = null), rt.event.triggered = f, r[f](), rt.event.triggered = t, l && (r[u] = l)),
n.result;
}
},
dispatch: function(e) {
e = rt.event.fix(e);
var n, i, r, o, a, s = [], l = Z.call(arguments), c = (mt.get(this, "events") || {})[e.type] || [], u = rt.event.special[e.type] || {};
if (l[0] = e, e.delegateTarget = this, !u.preDispatch || !1 !== u.preDispatch.call(this, e)) {
for (s = rt.event.handlers.call(this, e, c), n = 0; (o = s[n++]) && !e.isPropagationStopped(); ) for (e.currentTarget = o.elem,
i = 0; (a = o.handlers[i++]) && !e.isImmediatePropagationStopped(); ) e.namespace_re && !e.namespace_re.test(a.namespace) || (e.handleObj = a,
e.data = a.data, (r = ((rt.event.special[a.origType] || {}).handle || a.handler).apply(o.elem, l)) !== t && !1 === (e.result = r) && (e.preventDefault(),
e.stopPropagation()));
return u.postDispatch && u.postDispatch.call(this, e), e.result;
}
},
handlers: function(e, n) {
var i, r, o, a, s = [], l = n.delegateCount, c = e.target;
if (l && c.nodeType && (!e.button || "click" !== e.type)) for (;c !== this; c = c.parentNode || this) if (!0 !== c.disabled || "click" !== e.type) {
for (r = [], i = 0; l > i; i++) a = n[i], o = a.selector + " ", r[o] === t && (r[o] = a.needsContext ? rt(o, this).index(c) >= 0 : rt.find(o, this, null, [ c ]).length),
r[o] && r.push(a);
r.length && s.push({
elem: c,
handlers: r
});
}
return l < n.length && s.push({
elem: this,
handlers: n.slice(l)
}), s;
},
props: "altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),
fixHooks: {},
keyHooks: {
props: "char charCode key keyCode".split(" "),
filter: function(e, t) {
return null == e.which && (e.which = null != t.charCode ? t.charCode : t.keyCode),
e;
}
},
mouseHooks: {
props: "button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),
filter: function(e, n) {
var i, r, o, a = n.button;
return null == e.pageX && null != n.clientX && (i = e.target.ownerDocument || z,
r = i.documentElement, o = i.body, e.pageX = n.clientX + (r && r.scrollLeft || o && o.scrollLeft || 0) - (r && r.clientLeft || o && o.clientLeft || 0),
e.pageY = n.clientY + (r && r.scrollTop || o && o.scrollTop || 0) - (r && r.clientTop || o && o.clientTop || 0)),
e.which || a === t || (e.which = 1 & a ? 1 : 2 & a ? 3 : 4 & a ? 2 : 0), e;
}
},
fix: function(e) {
if (e[rt.expando]) return e;
var t, n, i, r = e.type, o = e, a = this.fixHooks[r];
for (a || (this.fixHooks[r] = a = Ct.test(r) ? this.mouseHooks : St.test(r) ? this.keyHooks : {}),
i = a.props ? this.props.concat(a.props) : this.props, e = new rt.Event(o), t = i.length; t--; ) n = i[t],
e[n] = o[n];
return e.target || (e.target = z), 3 === e.target.nodeType && (e.target = e.target.parentNode),
a.filter ? a.filter(e, o) : e;
},
special: {
load: {
noBubble: !0
},
focus: {
trigger: function() {
return this !== l() && this.focus ? (this.focus(), !1) : void 0;
},
delegateType: "focusin"
},
blur: {
trigger: function() {
return this === l() && this.blur ? (this.blur(), !1) : void 0;
},
delegateType: "focusout"
},
click: {
trigger: function() {
return "checkbox" === this.type && this.click && rt.nodeName(this, "input") ? (this.click(),
!1) : void 0;
},
_default: function(e) {
return rt.nodeName(e.target, "a");
}
},
beforeunload: {
postDispatch: function(e) {
e.result !== t && (e.originalEvent.returnValue = e.result);
}
}
},
simulate: function(e, t, n, i) {
var r = rt.extend(new rt.Event(), n, {
type: e,
isSimulated: !0,
originalEvent: {}
});
i ? rt.event.trigger(r, null, t) : rt.event.dispatch.call(t, r), r.isDefaultPrevented() && n.preventDefault();
}
}, rt.removeEvent = function(e, t, n) {
e.removeEventListener && e.removeEventListener(t, n, !1);
}, rt.Event = function(e, t) {
return this instanceof rt.Event ? (e && e.type ? (this.originalEvent = e, this.type = e.type,
this.isDefaultPrevented = e.defaultPrevented || e.getPreventDefault && e.getPreventDefault() ? a : s) : this.type = e,
t && rt.extend(this, t), this.timeStamp = e && e.timeStamp || rt.now(), this[rt.expando] = !0,
void 0) : new rt.Event(e, t);
}, rt.Event.prototype = {
isDefaultPrevented: s,
isPropagationStopped: s,
isImmediatePropagationStopped: s,
preventDefault: function() {
var e = this.originalEvent;
this.isDefaultPrevented = a, e && e.preventDefault && e.preventDefault();
},
stopPropagation: function() {
var e = this.originalEvent;
this.isPropagationStopped = a, e && e.stopPropagation && e.stopPropagation();
},
stopImmediatePropagation: function() {
this.isImmediatePropagationStopped = a, this.stopPropagation();
}
}, rt.each({
mouseenter: "mouseover",
mouseleave: "mouseout"
}, function(e, t) {
rt.event.special[e] = {
delegateType: t,
bindType: t,
handle: function(e) {
var n, i = this, r = e.relatedTarget, o = e.handleObj;
return r && (r === i || rt.contains(i, r)) || (e.type = o.origType, n = o.handler.apply(this, arguments),
e.type = t), n;
}
};
}), rt.support.focusinBubbles || rt.each({
focus: "focusin",
blur: "focusout"
}, function(e, t) {
var n = 0, i = function(e) {
rt.event.simulate(t, e.target, rt.event.fix(e), !0);
};
rt.event.special[t] = {
setup: function() {
0 == n++ && z.addEventListener(e, i, !0);
},
teardown: function() {
0 == --n && z.removeEventListener(e, i, !0);
}
};
}), rt.fn.extend({
on: function(e, n, i, r, o) {
var a, l;
if ("object" == typeof e) {
"string" != typeof n && (i = i || n, n = t);
for (l in e) this.on(l, n, i, e[l], o);
return this;
}
if (null == i && null == r ? (r = n, i = n = t) : null == r && ("string" == typeof n ? (r = i,
i = t) : (r = i, i = n, n = t)), !1 === r) r = s; else if (!r) return this;
return 1 === o && (a = r, r = function(e) {
return rt().off(e), a.apply(this, arguments);
}, r.guid = a.guid || (a.guid = rt.guid++)), this.each(function() {
rt.event.add(this, e, r, i, n);
});
},
one: function(e, t, n, i) {
return this.on(e, t, n, i, 1);
},
off: function(e, n, i) {
var r, o;
if (e && e.preventDefault && e.handleObj) return r = e.handleObj, rt(e.delegateTarget).off(r.namespace ? r.origType + "." + r.namespace : r.origType, r.selector, r.handler),
this;
if ("object" == typeof e) {
for (o in e) this.off(o, n, e[o]);
return this;
}
return !1 !== n && "function" != typeof n || (i = n, n = t), !1 === i && (i = s),
this.each(function() {
rt.event.remove(this, e, i, n);
});
},
trigger: function(e, t) {
return this.each(function() {
rt.event.trigger(e, t, this);
});
},
triggerHandler: function(e, t) {
var n = this[0];
return n ? rt.event.trigger(e, t, n, !0) : void 0;
}
});
var Et = /^.[^:#\[\.,]*$/, Tt = /^(?:parents|prev(?:Until|All))/, It = rt.expr.match.needsContext, Dt = {
children: !0,
contents: !0,
next: !0,
prev: !0
};
rt.fn.extend({
find: function(e) {
var t, n = [], i = this, r = i.length;
if ("string" != typeof e) return this.pushStack(rt(e).filter(function() {
for (t = 0; r > t; t++) if (rt.contains(i[t], this)) return !0;
}));
for (t = 0; r > t; t++) rt.find(e, i[t], n);
return n = this.pushStack(r > 1 ? rt.unique(n) : n), n.selector = this.selector ? this.selector + " " + e : e,
n;
},
has: function(e) {
var t = rt(e, this), n = t.length;
return this.filter(function() {
for (var e = 0; n > e; e++) if (rt.contains(this, t[e])) return !0;
});
},
not: function(e) {
return this.pushStack(u(this, e || [], !0));
},
filter: function(e) {
return this.pushStack(u(this, e || [], !1));
},
is: function(e) {
return !!u(this, "string" == typeof e && It.test(e) ? rt(e) : e || [], !1).length;
},
closest: function(e, t) {
for (var n, i = 0, r = this.length, o = [], a = It.test(e) || "string" != typeof e ? rt(e, t || this.context) : 0; r > i; i++) for (n = this[i]; n && n !== t; n = n.parentNode) if (n.nodeType < 11 && (a ? a.index(n) > -1 : 1 === n.nodeType && rt.find.matchesSelector(n, e))) {
n = o.push(n);
break;
}
return this.pushStack(o.length > 1 ? rt.unique(o) : o);
},
index: function(e) {
return e ? "string" == typeof e ? et.call(rt(e), this[0]) : et.call(this, e.jquery ? e[0] : e) : this[0] && this[0].parentNode ? this.first().prevAll().length : -1;
},
add: function(e, t) {
var n = "string" == typeof e ? rt(e, t) : rt.makeArray(e && e.nodeType ? [ e ] : e), i = rt.merge(this.get(), n);
return this.pushStack(rt.unique(i));
},
addBack: function(e) {
return this.add(null == e ? this.prevObject : this.prevObject.filter(e));
}
}), rt.each({
parent: function(e) {
var t = e.parentNode;
return t && 11 !== t.nodeType ? t : null;
},
parents: function(e) {
return rt.dir(e, "parentNode");
},
parentsUntil: function(e, t, n) {
return rt.dir(e, "parentNode", n);
},
next: function(e) {
return c(e, "nextSibling");
},
prev: function(e) {
return c(e, "previousSibling");
},
nextAll: function(e) {
return rt.dir(e, "nextSibling");
},
prevAll: function(e) {
return rt.dir(e, "previousSibling");
},
nextUntil: function(e, t, n) {
return rt.dir(e, "nextSibling", n);
},
prevUntil: function(e, t, n) {
return rt.dir(e, "previousSibling", n);
},
siblings: function(e) {
return rt.sibling((e.parentNode || {}).firstChild, e);
},
children: function(e) {
return rt.sibling(e.firstChild);
},
contents: function(e) {
return e.contentDocument || rt.merge([], e.childNodes);
}
}, function(e, t) {
rt.fn[e] = function(n, i) {
var r = rt.map(this, t, n);
return "Until" !== e.slice(-5) && (i = n), i && "string" == typeof i && (r = rt.filter(i, r)),
this.length > 1 && (Dt[e] || rt.unique(r), Tt.test(e) && r.reverse()), this.pushStack(r);
};
}), rt.extend({
filter: function(e, t, n) {
var i = t[0];
return n && (e = ":not(" + e + ")"), 1 === t.length && 1 === i.nodeType ? rt.find.matchesSelector(i, e) ? [ i ] : [] : rt.find.matches(e, rt.grep(t, function(e) {
return 1 === e.nodeType;
}));
},
dir: function(e, n, i) {
for (var r = [], o = i !== t; (e = e[n]) && 9 !== e.nodeType; ) if (1 === e.nodeType) {
if (o && rt(e).is(i)) break;
r.push(e);
}
return r;
},
sibling: function(e, t) {
for (var n = []; e; e = e.nextSibling) 1 === e.nodeType && e !== t && n.push(e);
return n;
}
});
var Nt = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi, Mt = /<([\w:]+)/, Lt = /<|&#?\w+;/, At = /<(?:script|style|link)/i, Rt = /^(?:checkbox|radio)$/i, Pt = /checked\s*(?:[^=]|=\s*.checked.)/i, Ot = /^$|\/(?:java|ecma)script/i, Ft = /^true\/(.*)/, Bt = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g, jt = {
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, "", "" ]
};
jt.optgroup = jt.option, jt.tbody = jt.tfoot = jt.colgroup = jt.caption = jt.thead,
jt.th = jt.td, rt.fn.extend({
text: function(e) {
return rt.access(this, function(e) {
return e === t ? rt.text(this) : this.empty().append((this[0] && this[0].ownerDocument || z).createTextNode(e));
}, null, e, arguments.length);
},
append: function() {
return this.domManip(arguments, function(e) {
(1 === this.nodeType || 11 === this.nodeType || 9 === this.nodeType) && d(this, e).appendChild(e);
});
},
prepend: function() {
return this.domManip(arguments, function(e) {
if (1 === this.nodeType || 11 === this.nodeType || 9 === this.nodeType) {
var t = d(this, e);
t.insertBefore(e, t.firstChild);
}
});
},
before: function() {
return this.domManip(arguments, function(e) {
this.parentNode && this.parentNode.insertBefore(e, this);
});
},
after: function() {
return this.domManip(arguments, function(e) {
this.parentNode && this.parentNode.insertBefore(e, this.nextSibling);
});
},
remove: function(e, t) {
for (var n, i = e ? rt.filter(e, this) : this, r = 0; null != (n = i[r]); r++) t || 1 !== n.nodeType || rt.cleanData(g(n)),
n.parentNode && (t && rt.contains(n.ownerDocument, n) && f(g(n, "script")), n.parentNode.removeChild(n));
return this;
},
empty: function() {
for (var e, t = 0; null != (e = this[t]); t++) 1 === e.nodeType && (rt.cleanData(g(e, !1)),
e.textContent = "");
return this;
},
clone: function(e, t) {
return e = null != e && e, t = null == t ? e : t, this.map(function() {
return rt.clone(this, e, t);
});
},
html: function(e) {
return rt.access(this, function(e) {
var n = this[0] || {}, i = 0, r = this.length;
if (e === t && 1 === n.nodeType) return n.innerHTML;
if ("string" == typeof e && !At.test(e) && !jt[(Mt.exec(e) || [ "", "" ])[1].toLowerCase()]) {
e = e.replace(Nt, "<$1></$2>");
try {
for (;r > i; i++) n = this[i] || {}, 1 === n.nodeType && (rt.cleanData(g(n, !1)),
n.innerHTML = e);
n = 0;
} catch (e) {}
}
n && this.empty().append(e);
}, null, e, arguments.length);
},
replaceWith: function() {
var e = rt.map(this, function(e) {
return [ e.nextSibling, e.parentNode ];
}), t = 0;
return this.domManip(arguments, function(n) {
var i = e[t++], r = e[t++];
r && (i && i.parentNode !== r && (i = this.nextSibling), rt(this).remove(), r.insertBefore(n, i));
}, !0), t ? this : this.remove();
},
detach: function(e) {
return this.remove(e, !0);
},
domManip: function(e, t, n) {
e = K.apply([], e);
var i, r, o, a, s, l, c = 0, u = this.length, d = this, f = u - 1, m = e[0], v = rt.isFunction(m);
if (v || !(1 >= u || "string" != typeof m || rt.support.checkClone) && Pt.test(m)) return this.each(function(i) {
var r = d.eq(i);
v && (e[0] = m.call(this, i, r.html())), r.domManip(e, t, n);
});
if (u && (i = rt.buildFragment(e, this[0].ownerDocument, !1, !n && this), r = i.firstChild,
1 === i.childNodes.length && (i = r), r)) {
for (o = rt.map(g(i, "script"), p), a = o.length; u > c; c++) s = i, c !== f && (s = rt.clone(s, !0, !0),
a && rt.merge(o, g(s, "script"))), t.call(this[c], s, c);
if (a) for (l = o[o.length - 1].ownerDocument, rt.map(o, h), c = 0; a > c; c++) s = o[c],
Ot.test(s.type || "") && !mt.access(s, "globalEval") && rt.contains(l, s) && (s.src ? rt._evalUrl(s.src) : rt.globalEval(s.textContent.replace(Bt, "")));
}
return this;
}
}), rt.each({
appendTo: "append",
prependTo: "prepend",
insertBefore: "before",
insertAfter: "after",
replaceAll: "replaceWith"
}, function(e, t) {
rt.fn[e] = function(e) {
for (var n, i = [], r = rt(e), o = r.length - 1, a = 0; o >= a; a++) n = a === o ? this : this.clone(!0),
rt(r[a])[t](n), J.apply(i, n.get());
return this.pushStack(i);
};
}), rt.extend({
clone: function(e, t, n) {
var i, r, o, a, s = e.cloneNode(!0), l = rt.contains(e.ownerDocument, e);
if (!(rt.support.noCloneChecked || 1 !== e.nodeType && 11 !== e.nodeType || rt.isXMLDoc(e))) for (a = g(s),
o = g(e), i = 0, r = o.length; r > i; i++) v(o[i], a[i]);
if (t) if (n) for (o = o || g(e), a = a || g(s), i = 0, r = o.length; r > i; i++) m(o[i], a[i]); else m(e, s);
return a = g(s, "script"), a.length > 0 && f(a, !l && g(e, "script")), s;
},
buildFragment: function(e, t, n, i) {
for (var r, o, a, s, l, c, u = 0, d = e.length, p = t.createDocumentFragment(), h = []; d > u; u++) if ((r = e[u]) || 0 === r) if ("object" === rt.type(r)) rt.merge(h, r.nodeType ? [ r ] : r); else if (Lt.test(r)) {
for (o = o || p.appendChild(t.createElement("div")), a = (Mt.exec(r) || [ "", "" ])[1].toLowerCase(),
s = jt[a] || jt._default, o.innerHTML = s[1] + r.replace(Nt, "<$1></$2>") + s[2],
c = s[0]; c--; ) o = o.lastChild;
rt.merge(h, o.childNodes), o = p.firstChild, o.textContent = "";
} else h.push(t.createTextNode(r));
for (p.textContent = "", u = 0; r = h[u++]; ) if ((!i || -1 === rt.inArray(r, i)) && (l = rt.contains(r.ownerDocument, r),
o = g(p.appendChild(r), "script"), l && f(o), n)) for (c = 0; r = o[c++]; ) Ot.test(r.type || "") && n.push(r);
return p;
},
cleanData: function(e) {
for (var n, i, o, a, s, l, c = rt.event.special, u = 0; (i = e[u]) !== t; u++) {
if (r.accepts(i) && (s = i[mt.expando]) && (n = mt.cache[s])) {
if (o = Object.keys(n.events || {}), o.length) for (l = 0; (a = o[l]) !== t; l++) c[a] ? rt.event.remove(i, a) : rt.removeEvent(i, a, n.handle);
mt.cache[s] && delete mt.cache[s];
}
delete ft.cache[i[ft.expando]];
}
},
_evalUrl: function(e) {
return rt.ajax({
url: e,
type: "GET",
dataType: "script",
async: !1,
global: !1,
"throws": !0
});
}
}), rt.fn.extend({
wrapAll: function(e) {
var t;
return rt.isFunction(e) ? this.each(function(t) {
rt(this).wrapAll(e.call(this, t));
}) : (this[0] && (t = rt(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 this.each(rt.isFunction(e) ? function(t) {
rt(this).wrapInner(e.call(this, t));
} : function() {
var t = rt(this), n = t.contents();
n.length ? n.wrapAll(e) : t.append(e);
});
},
wrap: function(e) {
var t = rt.isFunction(e);
return this.each(function(n) {
rt(this).wrapAll(t ? e.call(this, n) : e);
});
},
unwrap: function() {
return this.parent().each(function() {
rt.nodeName(this, "body") || rt(this).replaceWith(this.childNodes);
}).end();
}
});
var $t, Gt, qt = /^(none|table(?!-c[ea]).+)/, Ht = /^margin/, Ut = new RegExp("^(" + ot + ")(.*)$", "i"), zt = new RegExp("^(" + ot + ")(?!px)[a-z%]+$", "i"), Vt = new RegExp("^([+-])=(" + ot + ")", "i"), Wt = {
BODY: "block"
}, Xt = {
position: "absolute",
visibility: "hidden",
display: "block"
}, Qt = {
letterSpacing: 0,
fontWeight: 400
}, Yt = [ "Top", "Right", "Bottom", "Left" ], Kt = [ "Webkit", "O", "Moz", "ms" ];
rt.fn.extend({
css: function(e, n) {
return rt.access(this, function(e, n, i) {
var r, o, a = {}, s = 0;
if (rt.isArray(n)) {
for (r = x(e), o = n.length; o > s; s++) a[n[s]] = rt.css(e, n[s], !1, r);
return a;
}
return i !== t ? rt.style(e, n, i) : rt.css(e, n);
}, e, n, arguments.length > 1);
},
show: function() {
return w(this, !0);
},
hide: function() {
return w(this);
},
toggle: function(e) {
return "boolean" == typeof e ? e ? this.show() : this.hide() : this.each(function() {
y(this) ? rt(this).show() : rt(this).hide();
});
}
}), rt.extend({
cssHooks: {
opacity: {
get: function(e, t) {
if (t) {
var n = $t(e, "opacity");
return "" === n ? "1" : n;
}
}
}
},
cssNumber: {
columnCount: !0,
fillOpacity: !0,
fontWeight: !0,
lineHeight: !0,
opacity: !0,
order: !0,
orphans: !0,
widows: !0,
zIndex: !0,
zoom: !0
},
cssProps: {
"float": "cssFloat"
},
style: function(e, n, i, r) {
if (e && 3 !== e.nodeType && 8 !== e.nodeType && e.style) {
var o, a, s, l = rt.camelCase(n), c = e.style;
if (n = rt.cssProps[l] || (rt.cssProps[l] = b(c, l)), s = rt.cssHooks[n] || rt.cssHooks[l],
i === t) return s && "get" in s && (o = s.get(e, !1, r)) !== t ? o : c[n];
a = typeof i, "string" === a && (o = Vt.exec(i)) && (i = (o[1] + 1) * o[2] + parseFloat(rt.css(e, n)),
a = "number"), null == i || "number" === a && isNaN(i) || ("number" !== a || rt.cssNumber[l] || (i += "px"),
rt.support.clearCloneStyle || "" !== i || 0 !== n.indexOf("background") || (c[n] = "inherit"),
s && "set" in s && (i = s.set(e, i, r)) === t || (c[n] = i));
}
},
css: function(e, n, i, r) {
var o, a, s, l = rt.camelCase(n);
return n = rt.cssProps[l] || (rt.cssProps[l] = b(e.style, l)), s = rt.cssHooks[n] || rt.cssHooks[l],
s && "get" in s && (o = s.get(e, !0, i)), o === t && (o = $t(e, n, r)), "normal" === o && n in Qt && (o = Qt[n]),
"" === i || i ? (a = parseFloat(o), !0 === i || rt.isNumeric(a) ? a || 0 : o) : o;
}
}), $t = function(e, n, i) {
var r, o, a, s = i || x(e), l = s ? s.getPropertyValue(n) || s[n] : t, c = e.style;
return s && ("" !== l || rt.contains(e.ownerDocument, e) || (l = rt.style(e, n)),
zt.test(l) && Ht.test(n) && (r = c.width, o = c.minWidth, a = c.maxWidth, c.minWidth = c.maxWidth = c.width = l,
l = s.width, c.width = r, c.minWidth = o, c.maxWidth = a)), l;
}, rt.each([ "height", "width" ], function(e, t) {
rt.cssHooks[t] = {
get: function(e, n, i) {
return n ? 0 === e.offsetWidth && qt.test(rt.css(e, "display")) ? rt.swap(e, Xt, function() {
return _(e, t, i);
}) : _(e, t, i) : void 0;
},
set: function(e, n, i) {
var r = i && x(e);
return S(e, n, i ? C(e, t, i, rt.support.boxSizing && "border-box" === rt.css(e, "boxSizing", !1, r), r) : 0);
}
};
}), rt(function() {
rt.support.reliableMarginRight || (rt.cssHooks.marginRight = {
get: function(e, t) {
return t ? rt.swap(e, {
display: "inline-block"
}, $t, [ e, "marginRight" ]) : void 0;
}
}), !rt.support.pixelPosition && rt.fn.position && rt.each([ "top", "left" ], function(e, t) {
rt.cssHooks[t] = {
get: function(e, n) {
return n ? (n = $t(e, t), zt.test(n) ? rt(e).position()[t] + "px" : n) : void 0;
}
};
});
}), rt.expr && rt.expr.filters && (rt.expr.filters.hidden = function(e) {
return e.offsetWidth <= 0 && e.offsetHeight <= 0;
}, rt.expr.filters.visible = function(e) {
return !rt.expr.filters.hidden(e);
}), rt.each({
margin: "",
padding: "",
border: "Width"
}, function(e, t) {
rt.cssHooks[e + t] = {
expand: function(n) {
for (var i = 0, r = {}, o = "string" == typeof n ? n.split(" ") : [ n ]; 4 > i; i++) r[e + Yt[i] + t] = o[i] || o[i - 2] || o[0];
return r;
}
}, Ht.test(e) || (rt.cssHooks[e + t].set = S);
});
var Jt = /%20/g, Zt = /\[\]$/, en = /\r?\n/g, tn = /^(?:submit|button|image|reset|file)$/i, nn = /^(?:input|select|textarea|keygen)/i;
rt.fn.extend({
serialize: function() {
return rt.param(this.serializeArray());
},
serializeArray: function() {
return this.map(function() {
var e = rt.prop(this, "elements");
return e ? rt.makeArray(e) : this;
}).filter(function() {
var e = this.type;
return this.name && !rt(this).is(":disabled") && nn.test(this.nodeName) && !tn.test(e) && (this.checked || !Rt.test(e));
}).map(function(e, t) {
var n = rt(this).val();
return null == n ? null : rt.isArray(n) ? rt.map(n, function(e) {
return {
name: t.name,
value: e.replace(en, "\r\n")
};
}) : {
name: t.name,
value: n.replace(en, "\r\n")
};
}).get();
}
}), rt.param = function(e, n) {
var i, r = [], o = function(e, t) {
t = rt.isFunction(t) ? t() : null == t ? "" : t, r[r.length] = encodeURIComponent(e) + "=" + encodeURIComponent(t);
};
if (n === t && (n = rt.ajaxSettings && rt.ajaxSettings.traditional), rt.isArray(e) || e.jquery && !rt.isPlainObject(e)) rt.each(e, function() {
o(this.name, this.value);
}); else for (i in e) T(i, e[i], n, o);
return r.join("&").replace(Jt, "+");
}, rt.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "), function(e, t) {
rt.fn[t] = function(e, n) {
return arguments.length > 0 ? this.on(t, null, e, n) : this.trigger(t);
};
}), rt.fn.extend({
hover: function(e, t) {
return this.mouseenter(e).mouseleave(t || e);
},
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);
}
});
var rn, on, an = rt.now(), sn = /\?/, ln = /#.*$/, cn = /([?&])_=[^&]*/, un = /^(.*?):[ \t]*([^\r\n]*)$/gm, dn = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/, pn = /^(?:GET|HEAD)$/, hn = /^\/\//, fn = /^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/, mn = rt.fn.load, gn = {}, vn = {}, bn = "*/".concat("*");
try {
on = U.href;
} catch (e) {
on = z.createElement("a"), on.href = "", on = on.href;
}
rn = fn.exec(on.toLowerCase()) || [], rt.fn.load = function(e, n, i) {
if ("string" != typeof e && mn) return mn.apply(this, arguments);
var r, o, a, s = this, l = e.indexOf(" ");
return l >= 0 && (r = e.slice(l), e = e.slice(0, l)), rt.isFunction(n) ? (i = n,
n = t) : n && "object" == typeof n && (o = "POST"), s.length > 0 && rt.ajax({
url: e,
type: o,
dataType: "html",
data: n
}).done(function(e) {
a = arguments, s.html(r ? rt("<div>").append(rt.parseHTML(e)).find(r) : e);
}).complete(i && function(e, t) {
s.each(i, a || [ e.responseText, t, e ]);
}), this;
}, rt.each([ "ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend" ], function(e, t) {
rt.fn[t] = function(e) {
return this.on(t, e);
};
}), rt.extend({
active: 0,
lastModified: {},
etag: {},
ajaxSettings: {
url: on,
type: "GET",
isLocal: dn.test(rn[1]),
global: !0,
processData: !0,
async: !0,
contentType: "application/x-www-form-urlencoded; charset=UTF-8",
accepts: {
"*": bn,
text: "text/plain",
html: "text/html",
xml: "application/xml, text/xml",
json: "application/json, text/javascript"
},
contents: {
xml: /xml/,
html: /html/,
json: /json/
},
responseFields: {
xml: "responseXML",
text: "responseText",
json: "responseJSON"
},
converters: {
"* text": String,
"text html": !0,
"text json": rt.parseJSON,
"text xml": rt.parseXML
},
flatOptions: {
url: !0,
context: !0
}
},
ajaxSetup: function(e, t) {
return t ? N(N(e, rt.ajaxSettings), t) : N(rt.ajaxSettings, e);
},
ajaxPrefilter: I(gn),
ajaxTransport: I(vn),
ajax: function(e, n) {
function i(e, n, i, s) {
var c, d, b, y, w, C = n;
2 !== x && (x = 2, l && clearTimeout(l), r = t, a = s || "", S.readyState = e > 0 ? 4 : 0,
c = e >= 200 && 300 > e || 304 === e, i && (y = M(p, S, i)), y = L(p, y, S, c),
c ? (p.ifModified && (w = S.getResponseHeader("Last-Modified"), w && (rt.lastModified[o] = w),
(w = S.getResponseHeader("etag")) && (rt.etag[o] = w)), 204 === e || "HEAD" === p.type ? C = "nocontent" : 304 === e ? C = "notmodified" : (C = y.state,
d = y.data, b = y.error, c = !b)) : (b = C, !e && C || (C = "error", 0 > e && (e = 0))),
S.status = e, S.statusText = (n || C) + "", c ? m.resolveWith(h, [ d, C, S ]) : m.rejectWith(h, [ S, C, b ]),
S.statusCode(v), v = t, u && f.trigger(c ? "ajaxSuccess" : "ajaxError", [ S, p, c ? d : b ]),
g.fireWith(h, [ S, C ]), u && (f.trigger("ajaxComplete", [ S, p ]), --rt.active || rt.event.trigger("ajaxStop")));
}
"object" == typeof e && (n = e, e = t), n = n || {};
var r, o, a, s, l, c, u, d, p = rt.ajaxSetup({}, n), h = p.context || p, f = p.context && (h.nodeType || h.jquery) ? rt(h) : rt.event, m = rt.Deferred(), g = rt.Callbacks("once memory"), v = p.statusCode || {}, b = {}, y = {}, x = 0, w = "canceled", S = {
readyState: 0,
getResponseHeader: function(e) {
var t;
if (2 === x) {
if (!s) for (s = {}; t = un.exec(a); ) s[t[1].toLowerCase()] = t[2];
t = s[e.toLowerCase()];
}
return null == t ? null : t;
},
getAllResponseHeaders: function() {
return 2 === x ? a : null;
},
setRequestHeader: function(e, t) {
var n = e.toLowerCase();
return x || (e = y[n] = y[n] || e, b[e] = t), this;
},
overrideMimeType: function(e) {
return x || (p.mimeType = e), this;
},
statusCode: function(e) {
var t;
if (e) if (2 > x) for (t in e) v[t] = [ v[t], e[t] ]; else S.always(e[S.status]);
return this;
},
abort: function(e) {
var t = e || w;
return r && r.abort(t), i(0, t), this;
}
};
if (m.promise(S).complete = g.add, S.success = S.done, S.error = S.fail, p.url = ((e || p.url || on) + "").replace(ln, "").replace(hn, rn[1] + "//"),
p.type = n.method || n.type || p.method || p.type, p.dataTypes = rt.trim(p.dataType || "*").toLowerCase().match(at) || [ "" ],
null == p.crossDomain && (c = fn.exec(p.url.toLowerCase()), p.crossDomain = !(!c || c[1] === rn[1] && c[2] === rn[2] && (c[3] || ("http:" === c[1] ? "80" : "443")) === (rn[3] || ("http:" === rn[1] ? "80" : "443")))),
p.data && p.processData && "string" != typeof p.data && (p.data = rt.param(p.data, p.traditional)),
D(gn, p, n, S), 2 === x) return S;
u = p.global, u && 0 == rt.active++ && rt.event.trigger("ajaxStart"), p.type = p.type.toUpperCase(),
p.hasContent = !pn.test(p.type), o = p.url, p.hasContent || (p.data && (o = p.url += (sn.test(o) ? "&" : "?") + p.data,
delete p.data), !1 === p.cache && (p.url = cn.test(o) ? o.replace(cn, "$1_=" + an++) : o + (sn.test(o) ? "&" : "?") + "_=" + an++)),
p.ifModified && (rt.lastModified[o] && S.setRequestHeader("If-Modified-Since", rt.lastModified[o]),
rt.etag[o] && S.setRequestHeader("If-None-Match", rt.etag[o])), (p.data && p.hasContent && !1 !== p.contentType || n.contentType) && S.setRequestHeader("Content-Type", p.contentType),
S.setRequestHeader("Accept", p.dataTypes[0] && p.accepts[p.dataTypes[0]] ? p.accepts[p.dataTypes[0]] + ("*" !== p.dataTypes[0] ? ", " + bn + "; q=0.01" : "") : p.accepts["*"]);
for (d in p.headers) S.setRequestHeader(d, p.headers[d]);
if (p.beforeSend && (!1 === p.beforeSend.call(h, S, p) || 2 === x)) return S.abort();
w = "abort";
for (d in {
success: 1,
error: 1,
complete: 1
}) S[d](p[d]);
if (r = D(vn, p, n, S)) {
S.readyState = 1, u && f.trigger("ajaxSend", [ S, p ]), p.async && p.timeout > 0 && (l = setTimeout(function() {
S.abort("timeout");
}, p.timeout));
try {
x = 1, r.send(b, i);
} catch (e) {
if (!(2 > x)) throw e;
i(-1, e);
}
} else i(-1, "No Transport");
return S;
},
getJSON: function(e, t, n) {
return rt.get(e, t, n, "json");
},
getScript: function(e, n) {
return rt.get(e, t, n, "script");
}
}), rt.each([ "get", "post" ], function(e, n) {
rt[n] = function(e, i, r, o) {
return rt.isFunction(i) && (o = o || r, r = i, i = t), rt.ajax({
url: e,
type: n,
dataType: o,
data: i,
success: r
});
};
}), rt.ajaxSetup({
accepts: {
script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"
},
contents: {
script: /(?:java|ecma)script/
},
converters: {
"text script": function(e) {
return rt.globalEval(e), e;
}
}
}), rt.ajaxPrefilter("script", function(e) {
e.cache === t && (e.cache = !1), e.crossDomain && (e.type = "GET");
}), rt.ajaxTransport("script", function(e) {
if (e.crossDomain) {
var t, n;
return {
send: function(i, r) {
t = rt("<script>").prop({
async: !0,
charset: e.scriptCharset,
src: e.url
}).on("load error", n = function(e) {
t.remove(), n = null, e && r("error" === e.type ? 404 : 200, e.type);
}), z.head.appendChild(t[0]);
},
abort: function() {
n && n();
}
};
}
});
var yn = [], xn = /(=)\?(?=&|$)|\?\?/;
rt.ajaxSetup({
jsonp: "callback",
jsonpCallback: function() {
var e = yn.pop() || rt.expando + "_" + an++;
return this[e] = !0, e;
}
}), rt.ajaxPrefilter("json jsonp", function(n, i, r) {
var o, a, s, l = !1 !== n.jsonp && (xn.test(n.url) ? "url" : "string" == typeof n.data && !(n.contentType || "").indexOf("application/x-www-form-urlencoded") && xn.test(n.data) && "data");
return l || "jsonp" === n.dataTypes[0] ? (o = n.jsonpCallback = rt.isFunction(n.jsonpCallback) ? n.jsonpCallback() : n.jsonpCallback,
l ? n[l] = n[l].replace(xn, "$1" + o) : !1 !== n.jsonp && (n.url += (sn.test(n.url) ? "&" : "?") + n.jsonp + "=" + o),
n.converters["script json"] = function() {
return s || rt.error(o + " was not called"), s[0];
}, n.dataTypes[0] = "json", a = e[o], e[o] = function() {
s = arguments;
}, r.always(function() {
e[o] = a, n[o] && (n.jsonpCallback = i.jsonpCallback, yn.push(o)), s && rt.isFunction(a) && a(s[0]),
s = a = t;
}), "script") : void 0;
}), rt.ajaxSettings.xhr = function() {
try {
return new XMLHttpRequest();
} catch (e) {}
};
var wn = rt.ajaxSettings.xhr(), Sn = {
0: 200,
1223: 204
}, Cn = 0, _n = {};
e.ActiveXObject && rt(e).on("unload", function() {
for (var e in _n) _n[e]();
_n = t;
}), rt.support.cors = !!wn && "withCredentials" in wn, rt.support.ajax = wn = !!wn,
rt.ajaxTransport(function(e) {
var n;
return rt.support.cors || wn && !e.crossDomain ? {
send: function(i, r) {
var o, a, s = e.xhr();
if (s.open(e.type, e.url, e.async, e.username, e.password), e.xhrFields) for (o in e.xhrFields) s[o] = e.xhrFields[o];
e.mimeType && s.overrideMimeType && s.overrideMimeType(e.mimeType), e.crossDomain || i["X-Requested-With"] || (i["X-Requested-With"] = "XMLHttpRequest");
for (o in i) s.setRequestHeader(o, i[o]);
n = function(e) {
return function() {
n && (delete _n[a], n = s.onload = s.onerror = null, "abort" === e ? s.abort() : "error" === e ? r(s.status || 404, s.statusText) : r(Sn[s.status] || s.status, s.statusText, "string" == typeof s.responseText ? {
text: s.responseText
} : t, s.getAllResponseHeaders()));
};
}, s.onload = n(), s.onerror = n("error"), n = _n[a = Cn++] = n("abort"), s.send(e.hasContent && e.data || null);
},
abort: function() {
n && n();
}
} : void 0;
});
var kn, En, Tn = /^(?:toggle|show|hide)$/, In = new RegExp("^(?:([+-])=|)(" + ot + ")([a-z%]*)$", "i"), Dn = /queueHooks$/, Nn = [ F ], Mn = {
"*": [ function(e, t) {
var n = this.createTween(e, t), i = n.cur(), r = In.exec(t), o = r && r[3] || (rt.cssNumber[e] ? "" : "px"), a = (rt.cssNumber[e] || "px" !== o && +i) && In.exec(rt.css(n.elem, e)), s = 1, l = 20;
if (a && a[3] !== o) {
o = o || a[3], r = r || [], a = +i || 1;
do s = s || ".5", a /= s, rt.style(n.elem, e, a + o); while (s !== (s = n.cur() / i) && 1 !== s && --l);
}
return r && (a = n.start = +a || +i || 0, n.unit = o, n.end = r[1] ? a + (r[1] + 1) * r[2] : +r[2]),
n;
} ]
};
rt.Animation = rt.extend(P, {
tweener: function(e, t) {
rt.isFunction(e) ? (t = e, e = [ "*" ]) : e = e.split(" ");
for (var n, i = 0, r = e.length; r > i; i++) n = e[i], Mn[n] = Mn[n] || [], Mn[n].unshift(t);
},
prefilter: function(e, t) {
t ? Nn.unshift(e) : Nn.push(e);
}
}), rt.Tween = B, B.prototype = {
constructor: B,
init: function(e, t, n, i, r, o) {
this.elem = e, this.prop = n, this.easing = r || "swing", this.options = t, this.start = this.now = this.cur(),
this.end = i, this.unit = o || (rt.cssNumber[n] ? "" : "px");
},
cur: function() {
var e = B.propHooks[this.prop];
return e && e.get ? e.get(this) : B.propHooks._default.get(this);
},
run: function(e) {
var t, n = B.propHooks[this.prop];
return this.pos = t = this.options.duration ? rt.easing[this.easing](e, this.options.duration * e, 0, 1, this.options.duration) : 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) : B.propHooks._default.set(this), this;
}
}, B.prototype.init.prototype = B.prototype, B.propHooks = {
_default: {
get: function(e) {
var t;
return null == e.elem[e.prop] || e.elem.style && null != e.elem.style[e.prop] ? (t = rt.css(e.elem, e.prop, ""),
t && "auto" !== t ? t : 0) : e.elem[e.prop];
},
set: function(e) {
rt.fx.step[e.prop] ? rt.fx.step[e.prop](e) : e.elem.style && (null != e.elem.style[rt.cssProps[e.prop]] || rt.cssHooks[e.prop]) ? rt.style(e.elem, e.prop, e.now + e.unit) : e.elem[e.prop] = e.now;
}
}
}, B.propHooks.scrollTop = B.propHooks.scrollLeft = {
set: function(e) {
e.elem.nodeType && e.elem.parentNode && (e.elem[e.prop] = e.now);
}
}, rt.each([ "toggle", "show", "hide" ], function(e, t) {
var n = rt.fn[t];
rt.fn[t] = function(e, i, r) {
return null == e || "boolean" == typeof e ? n.apply(this, arguments) : this.animate(j(t, !0), e, i, r);
};
}), rt.fn.extend({
fadeTo: function(e, t, n, i) {
return this.filter(y).css("opacity", 0).show().end().animate({
opacity: t
}, e, n, i);
},
animate: function(e, t, n, i) {
var r = rt.isEmptyObject(e), o = rt.speed(t, n, i), a = function() {
var t = P(this, rt.extend({}, e), o);
(r || mt.get(this, "finish")) && t.stop(!0);
};
return a.finish = a, r || !1 === o.queue ? this.each(a) : this.queue(o.queue, a);
},
stop: function(e, n, i) {
var r = function(e) {
var t = e.stop;
delete e.stop, t(i);
};
return "string" != typeof e && (i = n, n = e, e = t), n && !1 !== e && this.queue(e || "fx", []),
this.each(function() {
var t = !0, n = null != e && e + "queueHooks", o = rt.timers, a = mt.get(this);
if (n) a[n] && a[n].stop && r(a[n]); else for (n in a) a[n] && a[n].stop && Dn.test(n) && r(a[n]);
for (n = o.length; n--; ) o[n].elem !== this || null != e && o[n].queue !== e || (o[n].anim.stop(i),
t = !1, o.splice(n, 1));
!t && i || rt.dequeue(this, e);
});
},
finish: function(e) {
return !1 !== e && (e = e || "fx"), this.each(function() {
var t, n = mt.get(this), i = n[e + "queue"], r = n[e + "queueHooks"], o = rt.timers, a = i ? i.length : 0;
for (n.finish = !0, rt.queue(this, e, []), r && r.stop && r.stop.call(this, !0),
t = o.length; t--; ) o[t].elem === this && o[t].queue === e && (o[t].anim.stop(!0),
o.splice(t, 1));
for (t = 0; a > t; t++) i[t] && i[t].finish && i[t].finish.call(this);
delete n.finish;
});
}
}), rt.each({
slideDown: j("show"),
slideUp: j("hide"),
slideToggle: j("toggle"),
fadeIn: {
opacity: "show"
},
fadeOut: {
opacity: "hide"
},
fadeToggle: {
opacity: "toggle"
}
}, function(e, t) {
rt.fn[e] = function(e, n, i) {
return this.animate(t, e, n, i);
};
}), rt.speed = function(e, t, n) {
var i = e && "object" == typeof e ? rt.extend({}, e) : {
complete: n || !n && t || rt.isFunction(e) && e,
duration: e,
easing: n && t || t && !rt.isFunction(t) && t
};
return i.duration = rt.fx.off ? 0 : "number" == typeof i.duration ? i.duration : i.duration in rt.fx.speeds ? rt.fx.speeds[i.duration] : rt.fx.speeds._default,
null != i.queue && !0 !== i.queue || (i.queue = "fx"), i.old = i.complete, i.complete = function() {
rt.isFunction(i.old) && i.old.call(this), i.queue && rt.dequeue(this, i.queue);
}, i;
}, rt.easing = {
linear: function(e) {
return e;
},
swing: function(e) {
return .5 - Math.cos(e * Math.PI) / 2;
}
}, rt.timers = [], rt.fx = B.prototype.init, rt.fx.tick = function() {
var e, n = rt.timers, i = 0;
for (kn = rt.now(); i < n.length; i++) (e = n[i])() || n[i] !== e || n.splice(i--, 1);
n.length || rt.fx.stop(), kn = t;
}, rt.fx.timer = function(e) {
e() && rt.timers.push(e) && rt.fx.start();
}, rt.fx.interval = 13, rt.fx.start = function() {
En || (En = setInterval(rt.fx.tick, rt.fx.interval));
}, rt.fx.stop = function() {
clearInterval(En), En = null;
}, rt.fx.speeds = {
slow: 600,
fast: 200,
_default: 400
}, rt.fx.step = {}, rt.expr && rt.expr.filters && (rt.expr.filters.animated = function(e) {
return rt.grep(rt.timers, function(t) {
return e === t.elem;
}).length;
}), rt.fn.offset = function(e) {
if (arguments.length) return e === t ? this : this.each(function(t) {
rt.offset.setOffset(this, e, t);
});
var n, i, r = this[0], o = {
top: 0,
left: 0
}, a = r && r.ownerDocument;
return a ? (n = a.documentElement, rt.contains(n, r) ? (typeof r.getBoundingClientRect !== H && (o = r.getBoundingClientRect()),
i = $(a), {
top: o.top + i.pageYOffset - n.clientTop,
left: o.left + i.pageXOffset - n.clientLeft
}) : o) : void 0;
}, rt.offset = {
setOffset: function(e, t, n) {
var i, r, o, a, s, l, c, u = rt.css(e, "position"), d = rt(e), p = {};
"static" === u && (e.style.position = "relative"), s = d.offset(), o = rt.css(e, "top"),
l = rt.css(e, "left"), c = ("absolute" === u || "fixed" === u) && (o + l).indexOf("auto") > -1,
c ? (i = d.position(), a = i.top, r = i.left) : (a = parseFloat(o) || 0, r = parseFloat(l) || 0),
rt.isFunction(t) && (t = t.call(e, n, s)), null != t.top && (p.top = t.top - s.top + a),
null != t.left && (p.left = t.left - s.left + r), "using" in t ? t.using.call(e, p) : d.css(p);
}
}, rt.fn.extend({
position: function() {
if (this[0]) {
var e, t, n = this[0], i = {
top: 0,
left: 0
};
return "fixed" === rt.css(n, "position") ? t = n.getBoundingClientRect() : (e = this.offsetParent(),
t = this.offset(), rt.nodeName(e[0], "html") || (i = e.offset()), i.top += rt.css(e[0], "borderTopWidth", !0),
i.left += rt.css(e[0], "borderLeftWidth", !0)), {
top: t.top - i.top - rt.css(n, "marginTop", !0),
left: t.left - i.left - rt.css(n, "marginLeft", !0)
};
}
},
offsetParent: function() {
return this.map(function() {
for (var e = this.offsetParent || V; e && !rt.nodeName(e, "html") && "static" === rt.css(e, "position"); ) e = e.offsetParent;
return e || V;
});
}
}), rt.each({
scrollLeft: "pageXOffset",
scrollTop: "pageYOffset"
}, function(n, i) {
var r = "pageYOffset" === i;
rt.fn[n] = function(o) {
return rt.access(this, function(n, o, a) {
var s = $(n);
return a === t ? s ? s[i] : n[o] : void (s ? s.scrollTo(r ? e.pageXOffset : a, r ? a : e.pageYOffset) : n[o] = a);
}, n, o, arguments.length, null);
};
}), rt.each({
Height: "height",
Width: "width"
}, function(e, n) {
rt.each({
padding: "inner" + e,
content: n,
"": "outer" + e
}, function(i, r) {
rt.fn[r] = function(r, o) {
var a = arguments.length && (i || "boolean" != typeof r), s = i || (!0 === r || !0 === o ? "margin" : "border");
return rt.access(this, function(n, i, r) {
var o;
return rt.isWindow(n) ? n.document.documentElement["client" + e] : 9 === n.nodeType ? (o = n.documentElement,
Math.max(n.body["scroll" + e], o["scroll" + e], n.body["offset" + e], o["offset" + e], o["client" + e])) : r === t ? rt.css(n, i, s) : rt.style(n, i, r, s);
}, n, a ? r : t, a, null);
};
});
}), rt.fn.size = function() {
return this.length;
}, rt.fn.andSelf = rt.fn.addBack, "object" == typeof module && module && "object" == typeof module.exports ? module.exports = rt : "function" == typeof define && define.amd && define("jquery", [], function() {
return rt;
}), "object" == typeof e && "object" == typeof e.document && (e.jQuery = e.$ = rt);
}(window), window.rangy = function() {
function e(e, t) {
var n = typeof e[t];
return n == d || !(n != u || !e[t]) || "unknown" == n;
}
function t(e, t) {
return !(typeof e[t] != u || !e[t]);
}
function n(e, t) {
return typeof e[t] != p;
}
function i(e) {
return function(t, n) {
for (var i = n.length; i--; ) if (!e(t, n[i])) return !1;
return !0;
};
}
function r(e) {
return e && v(e, g) && y(e, m);
}
function o(e) {
window.alert("Rangy not supported in your browser. Reason: " + e), x.initialized = !0,
x.supported = !1;
}
function a(e) {
var t = "Rangy warning: " + e;
x.config.alertOnWarn ? window.alert(t) : typeof window.console != p && typeof window.console.log != p && window.console.log(t);
}
function s() {
if (!x.initialized) {
var n, i = !1, a = !1;
e(document, "createRange") && (n = document.createRange(), v(n, f) && y(n, h) && (i = !0),
n.detach());
var s = t(document, "body") ? document.body : document.getElementsByTagName("body")[0];
s && e(s, "createTextRange") && (n = s.createTextRange(), r(n) && (a = !0)), i || a || o("Neither Range nor TextRange are implemented"),
x.initialized = !0, x.features = {
implementsDomRange: i,
implementsTextRange: a
};
for (var l = S.concat(w), c = 0, u = l.length; u > c; ++c) try {
l[c](x);
} catch (n) {
t(window, "console") && e(window.console, "log") && window.console.log("Init listener threw an exception. Continuing.", n);
}
}
}
function l(e) {
e = e || window, s();
for (var t = 0, n = C.length; n > t; ++t) C[t](e);
}
function c(e) {
this.name = e, this.initialized = !1, this.supported = !1;
}
var u = "object", d = "function", p = "undefined", h = [ "startContainer", "startOffset", "endContainer", "endOffset", "collapsed", "commonAncestorContainer", "START_TO_START", "START_TO_END", "END_TO_START", "END_TO_END" ], f = [ "setStart", "setStartBefore", "setStartAfter", "setEnd", "setEndBefore", "setEndAfter", "collapse", "selectNode", "selectNodeContents", "compareBoundaryPoints", "deleteContents", "extractContents", "cloneContents", "insertNode", "surroundContents", "cloneRange", "toString", "detach" ], m = [ "boundingHeight", "boundingLeft", "boundingTop", "boundingWidth", "htmlText", "text" ], g = [ "collapse", "compareEndPoints", "duplicate", "getBookmark", "moveToBookmark", "moveToElementText", "parentElement", "pasteHTML", "select", "setEndPoint", "getBoundingClientRect" ], v = i(e), b = i(t), y = i(n), x = {
version: "1.2.3",
initialized: !1,
supported: !0,
util: {
isHostMethod: e,
isHostObject: t,
isHostProperty: n,
areHostMethods: v,
areHostObjects: b,
areHostProperties: y,
isTextRange: r
},
features: {},
modules: {},
config: {
alertOnWarn: !1,
preferTextRange: !1
}
};
x.fail = o, x.warn = a, {}.hasOwnProperty ? x.util.extend = function(e, t) {
for (var n in t) t.hasOwnProperty(n) && (e[n] = t[n]);
} : o("hasOwnProperty not supported");
var w = [], S = [];
x.init = s, x.addInitListener = function(e) {
x.initialized ? e(x) : w.push(e);
};
var C = [];
x.addCreateMissingNativeApiListener = function(e) {
C.push(e);
}, x.createMissingNativeApi = l, c.prototype.fail = function(e) {
throw this.initialized = !0, this.supported = !1, new Error("Module '" + this.name + "' failed to load: " + e);
}, c.prototype.warn = function(e) {
x.warn("Module " + this.name + ": " + e);
}, c.prototype.createError = function(e) {
return new Error("Error in Rangy " + this.name + " module: " + e);
}, x.createModule = function(e, t) {
var n = new c(e);
x.modules[e] = n, S.push(function(e) {
t(e, n), n.initialized = !0, n.supported = !0;
});
}, x.requireModules = function(e) {
for (var t, n, i = 0, r = e.length; r > i; ++i) {
if (n = e[i], !((t = x.modules[n]) && t instanceof c)) throw new Error("Module '" + n + "' not found");
if (!t.supported) throw new Error("Module '" + n + "' not supported");
}
};
var _ = !1, k = function() {
_ || (_ = !0, x.initialized || s());
};
return typeof window == p ? void o("No window found") : typeof document == p ? void o("No document found") : (e(document, "addEventListener") && document.addEventListener("DOMContentLoaded", k, !1),
e(window, "addEventListener") ? window.addEventListener("load", k, !1) : e(window, "attachEvent") ? window.attachEvent("onload", k) : o("Window does not have required addEventListener or attachEvent method"),
x);
}(), rangy.createModule("DomUtil", function(e, t) {
function n(e) {
var t;
return typeof e.namespaceURI == k || null === (t = e.namespaceURI) || "http://www.w3.org/1999/xhtml" == t;
}
function i(e) {
var t = e.parentNode;
return 1 == t.nodeType ? t : null;
}
function r(e) {
for (var t = 0; e = e.previousSibling; ) t++;
return t;
}
function o(e) {
var t;
return c(e) ? e.length : (t = e.childNodes) ? t.length : 0;
}
function a(e, t) {
var n, i = [];
for (n = e; n; n = n.parentNode) i.push(n);
for (n = t; n; n = n.parentNode) if (D(i, n)) return n;
return null;
}
function s(e, t, n) {
for (var i = n ? t : t.parentNode; i; ) {
if (i === e) return !0;
i = i.parentNode;
}
return !1;
}
function l(e, t, n) {
for (var i, r = n ? e : e.parentNode; r; ) {
if ((i = r.parentNode) === t) return r;
r = i;
}
return null;
}
function c(e) {
var t = e.nodeType;
return 3 == t || 4 == t || 8 == t;
}
function u(e, t) {
var n = t.nextSibling, i = t.parentNode;
return n ? i.insertBefore(e, n) : i.appendChild(e), e;
}
function d(e, t) {
var n = e.cloneNode(!1);
return n.deleteData(0, t), e.deleteData(t, e.length - t), u(n, e), n;
}
function p(e) {
if (9 == e.nodeType) return e;
if (typeof e.ownerDocument != k) return e.ownerDocument;
if (typeof e.document != k) return e.document;
if (e.parentNode) return p(e.parentNode);
throw new Error("getDocument: no document found for node");
}
function h(e) {
var t = p(e);
if (typeof t.defaultView != k) return t.defaultView;
if (typeof t.parentWindow != k) return t.parentWindow;
throw new Error("Cannot get a window object for node");
}
function f(e) {
if (typeof e.contentDocument != k) return e.contentDocument;
if (typeof e.contentWindow != k) return e.contentWindow.document;
throw new Error("getIframeWindow: No Document object found for iframe element");
}
function m(e) {
if (typeof e.contentWindow != k) return e.contentWindow;
if (typeof e.contentDocument != k) return e.contentDocument.defaultView;
throw new Error("getIframeWindow: No Window object found for iframe element");
}
function g(e) {
return E.isHostObject(e, "body") ? e.body : e.getElementsByTagName("body")[0];
}
function v(e) {
for (var t; t = e.parentNode; ) e = t;
return e;
}
function b(e, t, n, i) {
var o, s, c, u, d;
if (e == n) return t === i ? 0 : i > t ? -1 : 1;
if (o = l(n, e, !0)) return t <= r(o) ? -1 : 1;
if (o = l(e, n, !0)) return r(o) < i ? -1 : 1;
if (s = a(e, n), c = e === s ? s : l(e, s, !0), u = n === s ? s : l(n, s, !0), c === u) throw new Error("comparePoints got to case 4 and childA and childB are the same!");
for (d = s.firstChild; d; ) {
if (d === c) return -1;
if (d === u) return 1;
d = d.nextSibling;
}
throw new Error("Should not be here!");
}
function y(e) {
for (var t, n = p(e).createDocumentFragment(); t = e.firstChild; ) n.appendChild(t);
return n;
}
function x(e) {
if (!e) return "[No node]";
if (c(e)) return '"' + e.data + '"';
if (1 == e.nodeType) {
var t = e.id ? ' id="' + e.id + '"' : "";
return "<" + e.nodeName + t + ">[" + e.childNodes.length + "]";
}
return e.nodeName;
}
function w(e) {
this.root = e, this._next = e;
}
function S(e) {
return new w(e);
}
function C(e, t) {
this.node = e, this.offset = t;
}
function _(e) {
this.code = this[e], this.codeName = e, this.message = "DOMException: " + this.codeName;
}
var k = "undefined", E = e.util;
E.areHostMethods(document, [ "createDocumentFragment", "createElement", "createTextNode" ]) || t.fail("document missing a Node creation method"),
E.isHostMethod(document, "getElementsByTagName") || t.fail("document missing getElementsByTagName method");
var T = document.createElement("div");
E.areHostMethods(T, [ "insertBefore", "appendChild", "cloneNode" ] || !E.areHostObjects(T, [ "previousSibling", "nextSibling", "childNodes", "parentNode" ])) || t.fail("Incomplete Element implementation"),
E.isHostProperty(T, "innerHTML") || t.fail("Element is missing innerHTML property");
var I = document.createTextNode("test");
E.areHostMethods(I, [ "splitText", "deleteData", "insertData", "appendData", "cloneNode" ] || !E.areHostObjects(T, [ "previousSibling", "nextSibling", "childNodes", "parentNode" ]) || !E.areHostProperties(I, [ "data" ])) || t.fail("Incomplete Text Node implementation");
var D = function(e, t) {
for (var n = e.length; n--; ) if (e[n] === t) return !0;
return !1;
};
w.prototype = {
_current: null,
hasNext: function() {
return !!this._next;
},
next: function() {
var e, t, n = this._current = this._next;
if (this._current) if (e = n.firstChild) this._next = e; else {
for (t = null; n !== this.root && !(t = n.nextSibling); ) n = n.parentNode;
this._next = t;
}
return this._current;
},
detach: function() {
this._current = this._next = this.root = null;
}
}, C.prototype = {
equals: function(e) {
return this.node === e.node & this.offset == e.offset;
},
inspect: function() {
return "[DomPosition(" + x(this.node) + ":" + this.offset + ")]";
}
}, _.prototype = {
INDEX_SIZE_ERR: 1,
HIERARCHY_REQUEST_ERR: 3,
WRONG_DOCUMENT_ERR: 4,
NO_MODIFICATION_ALLOWED_ERR: 7,
NOT_FOUND_ERR: 8,
NOT_SUPPORTED_ERR: 9,
INVALID_STATE_ERR: 11
}, _.prototype.toString = function() {
return this.message;
}, e.dom = {
arrayContains: D,
isHtmlNamespace: n,
parentElement: i,
getNodeIndex: r,
getNodeLength: o,
getCommonAncestor: a,
isAncestorOf: s,
getClosestAncestorIn: l,
isCharacterDataNode: c,
insertAfter: u,
splitDataNode: d,
getDocument: p,
getWindow: h,
getIframeWindow: m,
getIframeDocument: f,
getBody: g,
getRootContainer: v,
comparePoints: b,
inspectNode: x,
fragmentFromNodeChildren: y,
createIterator: S,
DomPosition: C
}, e.DOMException = _;
}), rangy.createModule("DomRange", function(e) {
function t(e, t) {
return 3 != e.nodeType && (F.isAncestorOf(e, t.startContainer, !0) || F.isAncestorOf(e, t.endContainer, !0));
}
function n(e) {
return F.getDocument(e.startContainer);
}
function i(e, t, n) {
var i = e._listeners[t];
if (i) for (var r = 0, o = i.length; o > r; ++r) i[r].call(e, {
target: e,
args: n
});
}
function r(e) {
return new B(e.parentNode, F.getNodeIndex(e));
}
function o(e) {
return new B(e.parentNode, F.getNodeIndex(e) + 1);
}
function a(e, t, n) {
var i = 11 == e.nodeType ? e.firstChild : e;
return F.isCharacterDataNode(t) ? n == t.length ? F.insertAfter(e, t) : t.parentNode.insertBefore(e, 0 == n ? t : F.splitDataNode(t, n)) : n >= t.childNodes.length ? t.appendChild(e) : t.insertBefore(e, t.childNodes[n]),
i;
}
function s(e) {
for (var t, i, r, o = n(e.range).createDocumentFragment(); i = e.next(); ) {
if (t = e.isPartiallySelectedSubtree(), i = i.cloneNode(!t), t && (r = e.getSubtreeIterator(),
i.appendChild(s(r)), r.detach(!0)), 10 == i.nodeType) throw new j("HIERARCHY_REQUEST_ERR");
o.appendChild(i);
}
return o;
}
function l(e, t, n) {
var i, r;
n = n || {
stop: !1
};
for (var o, a; o = e.next(); ) if (e.isPartiallySelectedSubtree()) {
if (!1 === t(o)) return void (n.stop = !0);
if (a = e.getSubtreeIterator(), l(a, t, n), a.detach(!0), n.stop) return;
} else for (i = F.createIterator(o); r = i.next(); ) if (!1 === t(r)) return void (n.stop = !0);
}
function c(e) {
for (var t; e.next(); ) e.isPartiallySelectedSubtree() ? (t = e.getSubtreeIterator(),
c(t), t.detach(!0)) : e.remove();
}
function u(e) {
for (var t, i, r = n(e.range).createDocumentFragment(); t = e.next(); ) {
if (e.isPartiallySelectedSubtree() ? (t = t.cloneNode(!1), i = e.getSubtreeIterator(),
t.appendChild(u(i)), i.detach(!0)) : e.remove(), 10 == t.nodeType) throw new j("HIERARCHY_REQUEST_ERR");
r.appendChild(t);
}
return r;
}
function d(e, t, n) {
var i, r = !(!t || !t.length), o = !!n;
r && (i = new RegExp("^(" + t.join("|") + ")$"));
var a = [];
return l(new h(e, !1), function(e) {
r && !i.test(e.nodeType) || o && !n(e) || a.push(e);
}), a;
}
function p(e) {
return "[" + (void 0 === e.getName ? "Range" : e.getName()) + "(" + F.inspectNode(e.startContainer) + ":" + e.startOffset + ", " + F.inspectNode(e.endContainer) + ":" + e.endOffset + ")]";
}
function h(e, t) {
if (this.range = e, this.clonePartiallySelectedTextNodes = t, !e.collapsed) {
this.sc = e.startContainer, this.so = e.startOffset, this.ec = e.endContainer, this.eo = e.endOffset;
var n = e.commonAncestorContainer;
this.sc === this.ec && F.isCharacterDataNode(this.sc) ? (this.isSingleCharacterDataNode = !0,
this._first = this._last = this._next = this.sc) : (this._first = this._next = this.sc !== n || F.isCharacterDataNode(this.sc) ? F.getClosestAncestorIn(this.sc, n, !0) : this.sc.childNodes[this.so],
this._last = this.ec !== n || F.isCharacterDataNode(this.ec) ? F.getClosestAncestorIn(this.ec, n, !0) : this.ec.childNodes[this.eo - 1]);
}
}
function f(e) {
this.code = this[e], this.codeName = e, this.message = "RangeException: " + this.codeName;
}
function m(e, t, n) {
this.nodes = d(e, t, n), this._next = this.nodes[0], this._position = 0;
}
function g(e) {
return function(t, n) {
for (var i, r = n ? t : t.parentNode; r; ) {
if (i = r.nodeType, F.arrayContains(e, i)) return r;
r = r.parentNode;
}
return null;
};
}
function v(e, t) {
if (X(e, t)) throw new f("INVALID_NODE_TYPE_ERR");
}
function b(e) {
if (!e.startContainer) throw new j("INVALID_STATE_ERR");
}
function y(e, t) {
if (!F.arrayContains(t, e.nodeType)) throw new f("INVALID_NODE_TYPE_ERR");
}
function x(e, t) {
if (0 > t || t > (F.isCharacterDataNode(e) ? e.length : e.childNodes.length)) throw new j("INDEX_SIZE_ERR");
}
function w(e, t) {
if (V(e, !0) !== V(t, !0)) throw new j("WRONG_DOCUMENT_ERR");
}
function S(e) {
if (W(e, !0)) throw new j("NO_MODIFICATION_ALLOWED_ERR");
}
function C(e, t) {
if (!e) throw new j(t);
}
function _(e) {
return !F.arrayContains(G, e.nodeType) && !V(e, !0);
}
function k(e, t) {
return t <= (F.isCharacterDataNode(e) ? e.length : e.childNodes.length);
}
function E(e) {
return !!e.startContainer && !!e.endContainer && !_(e.startContainer) && !_(e.endContainer) && k(e.startContainer, e.startOffset) && k(e.endContainer, e.endOffset);
}
function T(e) {
if (b(e), !E(e)) throw new Error("Range error: Range is no longer valid after DOM mutation (" + e.inspect() + ")");
}
function I() {}
function D(e) {
e.START_TO_START = Z, e.START_TO_END = et, e.END_TO_END = tt, e.END_TO_START = nt,
e.NODE_BEFORE = it, e.NODE_AFTER = rt, e.NODE_BEFORE_AND_AFTER = ot, e.NODE_INSIDE = at;
}
function N(e) {
D(e), D(e.prototype);
}
function M(e, t) {
return function() {
T(this);
var n, i, r = this.startContainer, a = this.startOffset, s = this.commonAncestorContainer, c = new h(this, !0);
r !== s && (n = F.getClosestAncestorIn(r, s, !0), i = o(n), r = i.node, a = i.offset),
l(c, S), c.reset();
var u = e(c);
return c.detach(), t(this, r, a, r, a), u;
};
}
function L(n, i, a) {
function s(e, t) {
return function(n) {
b(this), y(n, $), y(z(n), G);
var i = (e ? r : o)(n);
(t ? l : d)(this, i.node, i.offset);
};
}
function l(e, t, n) {
var r = e.endContainer, o = e.endOffset;
t === e.startContainer && n === e.startOffset || (z(t) == z(r) && 1 != F.comparePoints(t, n, r, o) || (r = t,
o = n), i(e, t, n, r, o));
}
function d(e, t, n) {
var r = e.startContainer, o = e.startOffset;
t === e.endContainer && n === e.endOffset || (z(t) == z(r) && -1 != F.comparePoints(t, n, r, o) || (r = t,
o = n), i(e, r, o, t, n));
}
function p(e, t, n) {
t === e.startContainer && n === e.startOffset && t === e.endContainer && n === e.endOffset || i(e, t, n, t, n);
}
n.prototype = new I(), e.util.extend(n.prototype, {
setStart: function(e, t) {
b(this), v(e, !0), x(e, t), l(this, e, t);
},
setEnd: function(e, t) {
b(this), v(e, !0), x(e, t), d(this, e, t);
},
setStartBefore: s(!0, !0),
setStartAfter: s(!1, !0),
setEndBefore: s(!0, !1),
setEndAfter: s(!1, !1),
collapse: function(e) {
T(this), e ? i(this, this.startContainer, this.startOffset, this.startContainer, this.startOffset) : i(this, this.endContainer, this.endOffset, this.endContainer, this.endOffset);
},
selectNodeContents: function(e) {
b(this), v(e, !0), i(this, e, 0, e, F.getNodeLength(e));
},
selectNode: function(e) {
b(this), v(e, !1), y(e, $);
var t = r(e), n = o(e);
i(this, t.node, t.offset, n.node, n.offset);
},
extractContents: M(u, i),
deleteContents: M(c, i),
canSurroundContents: function() {
T(this), S(this.startContainer), S(this.endContainer);
var e = new h(this, !0), n = e._first && t(e._first, this) || e._last && t(e._last, this);
return e.detach(), !n;
},
detach: function() {
a(this);
},
splitBoundaries: function() {
T(this);
var e = this.startContainer, t = this.startOffset, n = this.endContainer, r = this.endOffset, o = e === n;
F.isCharacterDataNode(n) && r > 0 && r < n.length && F.splitDataNode(n, r), F.isCharacterDataNode(e) && t > 0 && t < e.length && (e = F.splitDataNode(e, t),
o ? (r -= t, n = e) : n == e.parentNode && r >= F.getNodeIndex(e) && r++, t = 0),
i(this, e, t, n, r);
},
normalizeBoundaries: function() {
T(this);
var e = this.startContainer, t = this.startOffset, n = this.endContainer, r = this.endOffset, o = function(e) {
var t = e.nextSibling;
t && t.nodeType == e.nodeType && (n = e, r = e.length, e.appendData(t.data), t.parentNode.removeChild(t));
}, a = function(i) {
var o = i.previousSibling;
if (o && o.nodeType == i.nodeType) {
e = i;
var a = i.length;
if (t = o.length, i.insertData(0, o.data), o.parentNode.removeChild(o), e == n) r += t,
n = e; else if (n == i.parentNode) {
var s = F.getNodeIndex(i);
r == s ? (n = i, r = a) : r > s && r--;
}
}
}, s = !0;
if (F.isCharacterDataNode(n)) n.length == r && o(n); else {
if (r > 0) {
var l = n.childNodes[r - 1];
l && F.isCharacterDataNode(l) && o(l);
}
s = !this.collapsed;
}
if (s) {
if (F.isCharacterDataNode(e)) 0 == t && a(e); else if (t < e.childNodes.length) {
var c = e.childNodes[t];
c && F.isCharacterDataNode(c) && a(c);
}
} else e = n, t = r;
i(this, e, t, n, r);
},
collapseToPoint: function(e, t) {
b(this), v(e, !0), x(e, t), p(this, e, t);
}
}), N(n);
}
function A(e) {
e.collapsed = e.startContainer === e.endContainer && e.startOffset === e.endOffset,
e.commonAncestorContainer = e.collapsed ? e.startContainer : F.getCommonAncestor(e.startContainer, e.endContainer);
}
function R(e, t, n, r, o) {
var a = e.startContainer !== t || e.startOffset !== n, s = e.endContainer !== r || e.endOffset !== o;
e.startContainer = t, e.startOffset = n, e.endContainer = r, e.endOffset = o, A(e),
i(e, "boundarychange", {
startMoved: a,
endMoved: s
});
}
function P(e) {
b(e), e.startContainer = e.startOffset = e.endContainer = e.endOffset = null, e.collapsed = e.commonAncestorContainer = null,
i(e, "detach", null), e._listeners = null;
}
function O(e) {
this.startContainer = e, this.startOffset = 0, this.endContainer = e, this.endOffset = 0,
this._listeners = {
boundarychange: [],
detach: []
}, A(this);
}
e.requireModules([ "DomUtil" ]);
var F = e.dom, B = F.DomPosition, j = e.DOMException;
h.prototype = {
_current: null,
_next: null,
_first: null,
_last: null,
isSingleCharacterDataNode: !1,
reset: function() {
this._current = null, this._next = this._first;
},
hasNext: function() {
return !!this._next;
},
next: function() {
var e = this._current = this._next;
return e && (this._next = e !== this._last ? e.nextSibling : null, F.isCharacterDataNode(e) && this.clonePartiallySelectedTextNodes && (e === this.ec && (e = e.cloneNode(!0)).deleteData(this.eo, e.length - this.eo),
this._current === this.sc && (e = e.cloneNode(!0)).deleteData(0, this.so))), e;
},
remove: function() {
var e, t, n = this._current;
!F.isCharacterDataNode(n) || n !== this.sc && n !== this.ec ? n.parentNode && n.parentNode.removeChild(n) : (e = n === this.sc ? this.so : 0,
t = n === this.ec ? this.eo : n.length, e != t && n.deleteData(e, t - e));
},
isPartiallySelectedSubtree: function() {
return t(this._current, this.range);
},
getSubtreeIterator: function() {
var e;
if (this.isSingleCharacterDataNode) e = this.range.cloneRange(), e.collapse(); else {
e = new O(n(this.range));
var t = this._current, i = t, r = 0, o = t, a = F.getNodeLength(t);
F.isAncestorOf(t, this.sc, !0) && (i = this.sc, r = this.so), F.isAncestorOf(t, this.ec, !0) && (o = this.ec,
a = this.eo), R(e, i, r, o, a);
}
return new h(e, this.clonePartiallySelectedTextNodes);
},
detach: function(e) {
e && this.range.detach(), this.range = this._current = this._next = this._first = this._last = this.sc = this.so = this.ec = this.eo = null;
}
}, f.prototype = {
BAD_BOUNDARYPOINTS_ERR: 1,
INVALID_NODE_TYPE_ERR: 2
}, f.prototype.toString = function() {
return this.message;
}, m.prototype = {
_current: null,
hasNext: function() {
return !!this._next;
},
next: function() {
return this._current = this._next, this._next = this.nodes[++this._position], this._current;
},
detach: function() {
this._current = this._next = this.nodes = null;
}
};
var $ = [ 1, 3, 4, 5, 7, 8, 10 ], G = [ 2, 9, 11 ], q = [ 5, 6, 10, 12 ], H = [ 1, 3, 4, 5, 7, 8, 10, 11 ], U = [ 1, 3, 4, 5, 7, 8 ], z = F.getRootContainer, V = g([ 9, 11 ]), W = g(q), X = g([ 6, 10, 12 ]), Q = document.createElement("style"), Y = !1;
try {
Q.innerHTML = "<b>x</b>", Y = 3 == Q.firstChild.nodeType;
} catch (e) {}
e.features.htmlParsingConforms = Y;
var K = Y ? function(e) {
var t = this.startContainer, n = F.getDocument(t);
if (!t) throw new j("INVALID_STATE_ERR");
var i = null;
return 1 == t.nodeType ? i = t : F.isCharacterDataNode(t) && (i = F.parentElement(t)),
i = null === i || "HTML" == i.nodeName && F.isHtmlNamespace(F.getDocument(i).documentElement) && F.isHtmlNamespace(i) ? n.createElement("body") : i.cloneNode(!1),
i.innerHTML = e, F.fragmentFromNodeChildren(i);
} : function(e) {
b(this);
var t = n(this), i = t.createElement("body");
return i.innerHTML = e, F.fragmentFromNodeChildren(i);
}, J = [ "startContainer", "startOffset", "endContainer", "endOffset", "collapsed", "commonAncestorContainer" ], Z = 0, et = 1, tt = 2, nt = 3, it = 0, rt = 1, ot = 2, at = 3;
I.prototype = {
attachListener: function(e, t) {
this._listeners[e].push(t);
},
compareBoundaryPoints: function(e, t) {
T(this), w(this.startContainer, t.startContainer);
var n, i, r, o, a = e == nt || e == Z ? "start" : "end", s = e == et || e == Z ? "start" : "end";
return n = this[a + "Container"], i = this[a + "Offset"], r = t[s + "Container"],
o = t[s + "Offset"], F.comparePoints(n, i, r, o);
},
insertNode: function(e) {
if (T(this), y(e, H), S(this.startContainer), F.isAncestorOf(e, this.startContainer, !0)) throw new j("HIERARCHY_REQUEST_ERR");
var t = a(e, this.startContainer, this.startOffset);
this.setStartBefore(t);
},
cloneContents: function() {
T(this);
var e, t;
if (this.collapsed) return n(this).createDocumentFragment();
if (this.startContainer === this.endContainer && F.isCharacterDataNode(this.startContainer)) return e = this.startContainer.cloneNode(!0),
e.data = e.data.slice(this.startOffset, this.endOffset), t = n(this).createDocumentFragment(),
t.appendChild(e), t;
var i = new h(this, !0);
return e = s(i), i.detach(), e;
},
canSurroundContents: function() {
T(this), S(this.startContainer), S(this.endContainer);
var e = new h(this, !0), n = e._first && t(e._first, this) || e._last && t(e._last, this);
return e.detach(), !n;
},
surroundContents: function(e) {
if (y(e, U), !this.canSurroundContents()) throw new f("BAD_BOUNDARYPOINTS_ERR");
var t = this.extractContents();
if (e.hasChildNodes()) for (;e.lastChild; ) e.removeChild(e.lastChild);
a(e, this.startContainer, this.startOffset), e.appendChild(t), this.selectNode(e);
},
cloneRange: function() {
T(this);
for (var e, t = new O(n(this)), i = J.length; i--; ) e = J[i], t[e] = this[e];
return t;
},
toString: function() {
T(this);
var e = this.startContainer;
if (e === this.endContainer && F.isCharacterDataNode(e)) return 3 == e.nodeType || 4 == e.nodeType ? e.data.slice(this.startOffset, this.endOffset) : "";
var t = [], n = new h(this, !0);
return l(n, function(e) {
3 != e.nodeType && 4 != e.nodeType || t.push(e.data);
}), n.detach(), t.join("");
},
compareNode: function(e) {
T(this);
var t = e.parentNode, n = F.getNodeIndex(e);
if (!t) throw new j("NOT_FOUND_ERR");
var i = this.comparePoint(t, n), r = this.comparePoint(t, n + 1);
return 0 > i ? r > 0 ? ot : it : r > 0 ? rt : at;
},
comparePoint: function(e, t) {
return T(this), C(e, "HIERARCHY_REQUEST_ERR"), w(e, this.startContainer), F.comparePoints(e, t, this.startContainer, this.startOffset) < 0 ? -1 : F.comparePoints(e, t, this.endContainer, this.endOffset) > 0 ? 1 : 0;
},
createContextualFragment: K,
toHtml: function() {
T(this);
var e = n(this).createElement("div");
return e.appendChild(this.cloneContents()), e.innerHTML;
},
intersectsNode: function(e, t) {
if (T(this), C(e, "NOT_FOUND_ERR"), F.getDocument(e) !== n(this)) return !1;
var i = e.parentNode, r = F.getNodeIndex(e);
C(i, "NOT_FOUND_ERR");
var o = F.comparePoints(i, r, this.endContainer, this.endOffset), a = F.comparePoints(i, r + 1, this.startContainer, this.startOffset);
return t ? 0 >= o && a >= 0 : 0 > o && a > 0;
},
isPointInRange: function(e, t) {
return T(this), C(e, "HIERARCHY_REQUEST_ERR"), w(e, this.startContainer), F.comparePoints(e, t, this.startContainer, this.startOffset) >= 0 && F.comparePoints(e, t, this.endContainer, this.endOffset) <= 0;
},
intersectsRange: function(e, t) {
if (T(this), n(e) != n(this)) throw new j("WRONG_DOCUMENT_ERR");
var i = F.comparePoints(this.startContainer, this.startOffset, e.endContainer, e.endOffset), r = F.comparePoints(this.endContainer, this.endOffset, e.startContainer, e.startOffset);
return t ? 0 >= i && r >= 0 : 0 > i && r > 0;
},
intersection: function(e) {
if (this.intersectsRange(e)) {
var t = F.comparePoints(this.startContainer, this.startOffset, e.startContainer, e.startOffset), n = F.comparePoints(this.endContainer, this.endOffset, e.endContainer, e.endOffset), i = this.cloneRange();
return -1 == t && i.setStart(e.startContainer, e.startOffset), 1 == n && i.setEnd(e.endContainer, e.endOffset),
i;
}
return null;
},
union: function(e) {
if (this.intersectsRange(e, !0)) {
var t = this.cloneRange();
return -1 == F.comparePoints(e.startContainer, e.startOffset, this.startContainer, this.startOffset) && t.setStart(e.startContainer, e.startOffset),
1 == F.comparePoints(e.endContainer, e.endOffset, this.endContainer, this.endOffset) && t.setEnd(e.endContainer, e.endOffset),
t;
}
throw new f("Ranges do not intersect");
},
containsNode: function(e, t) {
return t ? this.intersectsNode(e, !1) : this.compareNode(e) == at;
},
containsNodeContents: function(e) {
return this.comparePoint(e, 0) >= 0 && this.comparePoint(e, F.getNodeLength(e)) <= 0;
},
containsRange: function(e) {
return this.intersection(e).equals(e);
},
containsNodeText: function(e) {
var t = this.cloneRange();
t.selectNode(e);
var n = t.getNodes([ 3 ]);
if (n.length > 0) {
t.setStart(n[0], 0);
var i = n.pop();
t.setEnd(i, i.length);
var r = this.containsRange(t);
return t.detach(), r;
}
return this.containsNodeContents(e);
},
createNodeIterator: function(e, t) {
return T(this), new m(this, e, t);
},
getNodes: function(e, t) {
return T(this), d(this, e, t);
},
getDocument: function() {
return n(this);
},
collapseBefore: function(e) {
b(this), this.setEndBefore(e), this.collapse(!1);
},
collapseAfter: function(e) {
b(this), this.setStartAfter(e), this.collapse(!0);
},
getName: function() {
return "DomRange";
},
equals: function(e) {
return O.rangesEqual(this, e);
},
isValid: function() {
return E(this);
},
inspect: function() {
return p(this);
}
}, L(O, R, P), e.rangePrototype = I.prototype, O.rangeProperties = J, O.RangeIterator = h,
O.copyComparisonConstants = N, O.createPrototypeRange = L, O.inspect = p, O.getRangeDocument = n,
O.rangesEqual = function(e, t) {
return e.startContainer === t.startContainer && e.startOffset === t.startOffset && e.endContainer === t.endContainer && e.endOffset === t.endOffset;
}, e.DomRange = O, e.RangeException = f;
}), rangy.createModule("WrappedRange", function(e) {
function t(e) {
var t = e.parentElement(), n = e.duplicate();
n.collapse(!0);
var i = n.parentElement();
n = e.duplicate(), n.collapse(!1);
var r = n.parentElement(), o = i == r ? i : a.getCommonAncestor(i, r);
return o == t ? o : a.getCommonAncestor(t, o);
}
function n(e) {
return 0 == e.compareEndPoints("StartToEnd", e);
}
function i(e, t, n, i) {
var r = e.duplicate();
r.collapse(n);
var o = r.parentElement();
if (a.isAncestorOf(t, o, !0) || (o = t), !o.canHaveHTML) return new s(o.parentNode, a.getNodeIndex(o));
var l, c, u, d, p, h = a.getDocument(o).createElement("span"), f = n ? "StartToStart" : "StartToEnd";
do o.insertBefore(h, h.previousSibling), r.moveToElementText(h); while ((l = r.compareEndPoints(f, e)) > 0 && h.previousSibling);
if (p = h.nextSibling, -1 == l && p && a.isCharacterDataNode(p)) {
r.setEndPoint(n ? "EndToStart" : "EndToEnd", e);
var m;
if (/[\r\n]/.test(p.data)) {
var g = r.duplicate(), v = g.text.replace(/\r\n/g, "\r").length;
for (m = g.moveStart("character", v); -1 == (l = g.compareEndPoints("StartToEnd", g)); ) m++,
g.moveStart("character", 1);
} else m = r.text.length;
d = new s(p, m);
} else c = (i || !n) && h.previousSibling, u = (i || n) && h.nextSibling, d = u && a.isCharacterDataNode(u) ? new s(u, 0) : c && a.isCharacterDataNode(c) ? new s(c, c.length) : new s(o, a.getNodeIndex(h));
return h.parentNode.removeChild(h), d;
}
function r(e, t) {
var n, i, r, o, s = e.offset, l = a.getDocument(e.node), c = l.body.createTextRange(), u = a.isCharacterDataNode(e.node);
return u ? (n = e.node, i = n.parentNode) : (o = e.node.childNodes, n = s < o.length ? o[s] : null,
i = e.node), r = l.createElement("span"), r.innerHTML = "&#feff;", n ? i.insertBefore(r, n) : i.appendChild(r),
c.moveToElementText(r), c.collapse(!t), i.removeChild(r), u && c[t ? "moveStart" : "moveEnd"]("character", s),
c;
}
e.requireModules([ "DomUtil", "DomRange" ]);
var o, a = e.dom, s = a.DomPosition, l = e.DomRange;
if (!e.features.implementsDomRange || e.features.implementsTextRange && e.config.preferTextRange) {
if (e.features.implementsTextRange) {
o = function(e) {
this.textRange = e, this.refresh();
}, o.prototype = new l(document), o.prototype.refresh = function() {
var e, r, o = t(this.textRange);
n(this.textRange) ? r = e = i(this.textRange, o, !0, !0) : (e = i(this.textRange, o, !0, !1),
r = i(this.textRange, o, !1, !1)), this.setStart(e.node, e.offset), this.setEnd(r.node, r.offset);
}, l.copyComparisonConstants(o);
var c = function() {
return this;
}();
void 0 === c.Range && (c.Range = o), e.createNativeRange = function(e) {
return e = e || document, e.body.createTextRange();
};
}
} else !function() {
function e(e) {
for (var t, n = s.length; n--; ) t = s[n], e[t] = e.nativeRange[t];
}
function t(e, t, n, i, r) {
var o = e.startContainer !== t || e.startOffset != n, a = e.endContainer !== i || e.endOffset != r;
(o || a) && (e.setEnd(i, r), e.setStart(t, n));
}
function n(e) {
e.nativeRange.detach(), e.detached = !0;
for (var t, n = s.length; n--; ) t = s[n], e[t] = null;
}
var i, r, s = l.rangeProperties;
o = function(t) {
if (!t) throw new Error("Range must be specified");
this.nativeRange = t, e(this);
}, l.createPrototypeRange(o, t, n), i = o.prototype, i.selectNode = function(t) {
this.nativeRange.selectNode(t), e(this);
}, i.deleteContents = function() {
this.nativeRange.deleteContents(), e(this);
}, i.extractContents = function() {
var t = this.nativeRange.extractContents();
return e(this), t;
}, i.cloneContents = function() {
return this.nativeRange.cloneContents();
}, i.surroundContents = function(t) {
this.nativeRange.surroundContents(t), e(this);
}, i.collapse = function(t) {
this.nativeRange.collapse(t), e(this);
}, i.cloneRange = function() {
return new o(this.nativeRange.cloneRange());
}, i.refresh = function() {
e(this);
}, i.toString = function() {
return this.nativeRange.toString();
};
var c = document.createTextNode("test");
a.getBody(document).appendChild(c);
var u = document.createRange();
u.setStart(c, 0), u.setEnd(c, 0);
try {
u.setStart(c, 1), i.setStart = function(t, n) {
this.nativeRange.setStart(t, n), e(this);
}, i.setEnd = function(t, n) {
this.nativeRange.setEnd(t, n), e(this);
}, r = function(t) {
return function(n) {
this.nativeRange[t](n), e(this);
};
};
} catch (d) {
i.setStart = function(e, t) {
try {
this.nativeRange.setStart(e, t);
} catch (n) {
this.nativeRange.setEnd(e, t), this.nativeRange.setStart(e, t);
}
n(this);
}, i.setEnd = function(e, t) {
try {
this.nativeRange.setEnd(e, t);
} catch (n) {
this.nativeRange.setStart(e, t), this.nativeRange.setEnd(e, t);
}
n(this);
}, r = function(e, t) {
return function(n) {
try {
this.nativeRange[e](n);
} catch (i) {
this.nativeRange[t](n), this.nativeRange[e](n);
}
i(this);
};
};
}
i.setStartBefore = r("setStartBefore", "setEndBefore"), i.setStartAfter = r("setStartAfter", "setEndAfter"),
i.setEndBefore = r("setEndBefore", "setStartBefore"), i.setEndAfter = r("setEndAfter", "setStartAfter"),
u.selectNodeContents(c), i.selectNodeContents = u.startContainer == c && u.endContainer == c && 0 == u.startOffset && u.endOffset == c.length ? function(t) {
this.nativeRange.selectNodeContents(t), e(this);
} : function(e) {
this.setStart(e, 0), this.setEnd(e, l.getEndOffset(e));
}, u.selectNodeContents(c), u.setEnd(c, 3);
var p = document.createRange();
p.selectNodeContents(c), p.setEnd(c, 4), p.setStart(c, 2), i.compareBoundaryPoints = -1 == u.compareBoundaryPoints(u.START_TO_END, p) & 1 == u.compareBoundaryPoints(u.END_TO_START, p) ? function(e, t) {
return t = t.nativeRange || t, e == t.START_TO_END ? e = t.END_TO_START : e == t.END_TO_START && (e = t.START_TO_END),
this.nativeRange.compareBoundaryPoints(e, t);
} : function(e, t) {
return this.nativeRange.compareBoundaryPoints(e, t.nativeRange || t);
}, d.util.isHostMethod(u, "createContextualFragment") && (i.createContextualFragment = function(e) {
return this.nativeRange.createContextualFragment(e);
}), a.getBody(document).removeChild(c), u.detach(), p.detach();
}(), e.createNativeRange = function(e) {
return e = e || document, e.createRange();
};
e.features.implementsTextRange && (o.rangeToTextRange = function(e) {
if (e.collapsed) return r(new s(e.startContainer, e.startOffset), !0);
var t = r(new s(e.startContainer, e.startOffset), !0), n = r(new s(e.endContainer, e.endOffset), !1), i = a.getDocument(e.startContainer).body.createTextRange();
return i.setEndPoint("StartToStart", t), i.setEndPoint("EndToEnd", n), i;
}), o.prototype.getName = function() {
return "WrappedRange";
}, e.WrappedRange = o, e.createRange = function(t) {
return t = t || document, new o(e.createNativeRange(t));
}, e.createRangyRange = function(e) {
return e = e || document, new l(e);
}, e.createIframeRange = function(t) {
return e.createRange(a.getIframeDocument(t));
}, e.createIframeRangyRange = function(t) {
return e.createRangyRange(a.getIframeDocument(t));
}, e.addCreateMissingNativeApiListener(function(t) {
var n = t.document;
void 0 === n.createRange && (n.createRange = function() {
return e.createRange(this);
}), n = t = null;
});
}), rangy.createModule("WrappedSelection", function(e, t) {
function n(e) {
return (e || window).getSelection();
}
function i(e) {
return (e || window).document.selection;
}
function r(e, t, n) {
var i = n ? "end" : "start", r = n ? "start" : "end";
e.anchorNode = t[i + "Container"], e.anchorOffset = t[i + "Offset"], e.focusNode = t[r + "Container"],
e.focusOffset = t[r + "Offset"];
}
function o(e) {
var t = e.nativeSelection;
e.anchorNode = t.anchorNode, e.anchorOffset = t.anchorOffset, e.focusNode = t.focusNode,
e.focusOffset = t.focusOffset;
}
function a(e) {
e.anchorNode = e.focusNode = null, e.anchorOffset = e.focusOffset = 0, e.rangeCount = 0,
e.isCollapsed = !0, e._ranges.length = 0;
}
function s(t) {
var n;
return t instanceof S ? (n = t._selectionNativeRange) || (n = e.createNativeRange(x.getDocument(t.startContainer)),
n.setEnd(t.endContainer, t.endOffset), n.setStart(t.startContainer, t.startOffset),
t._selectionNativeRange = n, t.attachListener("detach", function() {
this._selectionNativeRange = null;
})) : t instanceof C ? n = t.nativeRange : e.features.implementsDomRange && t instanceof x.getWindow(t.startContainer).Range && (n = t),
n;
}
function l(e) {
if (!e.length || 1 != e[0].nodeType) return !1;
for (var t = 1, n = e.length; n > t; ++t) if (!x.isAncestorOf(e[0], e[t])) return !1;
return !0;
}
function c(e) {
var t = e.getNodes();
if (!l(t)) throw new Error("getSingleElementFromRange: range " + e.inspect() + " did not consist of a single element");
return t[0];
}
function u(e) {
return !!e && void 0 !== e.text;
}
function d(e, t) {
var n = new C(t);
e._ranges = [ n ], r(e, n, !1), e.rangeCount = 1, e.isCollapsed = n.collapsed;
}
function p(t) {
if (t._ranges.length = 0, "None" == t.docSelection.type) a(t); else {
var n = t.docSelection.createRange();
if (u(n)) d(t, n); else {
t.rangeCount = n.length;
for (var i, o = x.getDocument(n.item(0)), s = 0; s < t.rangeCount; ++s) i = e.createRange(o),
i.selectNode(n.item(s)), t._ranges.push(i);
t.isCollapsed = 1 == t.rangeCount && t._ranges[0].collapsed, r(t, t._ranges[t.rangeCount - 1], !1);
}
}
}
function h(e, t) {
for (var n = e.docSelection.createRange(), i = c(t), r = x.getDocument(n.item(0)), o = x.getBody(r).createControlRange(), a = 0, s = n.length; s > a; ++a) o.add(n.item(a));
try {
o.add(i);
} catch (e) {
throw new Error("addRange(): Element within the specified Range could not be added to control selection (does it have layout?)");
}
o.select(), p(e);
}
function f(e, t, n) {
this.nativeSelection = e, this.docSelection = t, this._ranges = [], this.win = n,
this.refresh();
}
function m(e, t) {
for (var n, i = x.getDocument(t[0].startContainer), r = x.getBody(i).createControlRange(), o = 0; o < rangeCount; ++o) {
n = c(t[o]);
try {
r.add(n);
} catch (e) {
throw new Error("setRanges(): Element within the one of the specified Ranges could not be added to control selection (does it have layout?)");
}
}
r.select(), p(e);
}
function g(e, t) {
if (e.anchorNode && x.getDocument(e.anchorNode) !== x.getDocument(t)) throw new _("WRONG_DOCUMENT_ERR");
}
function v(e) {
var t = [], n = new k(e.anchorNode, e.anchorOffset), i = new k(e.focusNode, e.focusOffset), r = "function" == typeof e.getName ? e.getName() : "Selection";
if (void 0 !== e.rangeCount) for (var o = 0, a = e.rangeCount; a > o; ++o) t[o] = S.inspect(e.getRangeAt(o));
return "[" + r + "(Ranges: " + t.join(", ") + ")(anchor: " + n.inspect() + ", focus: " + i.inspect() + "]";
}
e.requireModules([ "DomUtil", "DomRange", "WrappedRange" ]), e.config.checkSelectionRanges = !0;
var b, y, x = e.dom, w = e.util, S = e.DomRange, C = e.WrappedRange, _ = e.DOMException, k = x.DomPosition, E = e.util.isHostMethod(window, "getSelection"), T = e.util.isHostObject(document, "selection"), I = T && (!E || e.config.preferTextRange);
I ? (b = i, e.isSelectionValid = function(e) {
var t = (e || window).document, n = t.selection;
return "None" != n.type || x.getDocument(n.createRange().parentElement()) == t;
}) : E ? (b = n, e.isSelectionValid = function() {
return !0;
}) : t.fail("Neither document.selection or window.getSelection() detected."), e.getNativeSelection = b;
var D = b(), N = e.createNativeRange(document), M = x.getBody(document), L = w.areHostObjects(D, [ "anchorNode", "focusNode" ] && w.areHostProperties(D, [ "anchorOffset", "focusOffset" ]));
e.features.selectionHasAnchorAndFocus = L;
var A = w.isHostMethod(D, "extend");
e.features.selectionHasExtend = A;
var R = "number" == typeof D.rangeCount;
e.features.selectionHasRangeCount = R;
var P = !1, O = !0;
w.areHostMethods(D, [ "addRange", "getRangeAt", "removeAllRanges" ]) && "number" == typeof D.rangeCount && e.features.implementsDomRange && function() {
var e = document.createElement("iframe");
e.frameBorder = 0, e.style.position = "absolute", e.style.left = "-10000px", M.appendChild(e);
var t = x.getIframeDocument(e);
t.open(), t.write("<html><head></head><body>12</body></html>"), t.close();
var n = x.getIframeWindow(e).getSelection(), i = t.documentElement, r = i.lastChild, o = r.firstChild, a = t.createRange();
a.setStart(o, 1), a.collapse(!0), n.addRange(a), O = 1 == n.rangeCount, n.removeAllRanges();
var s = a.cloneRange();
a.setStart(o, 0), s.setEnd(o, 2), n.addRange(a), n.addRange(s), P = 2 == n.rangeCount,
a.detach(), s.detach(), M.removeChild(e);
}(), e.features.selectionSupportsMultipleRanges = P, e.features.collapsedNonEditableSelectionsSupported = O;
var F, B = !1;
M && w.isHostMethod(M, "createControlRange") && (F = M.createControlRange(), w.areHostProperties(F, [ "item", "add" ]) && (B = !0)),
e.features.implementsControlRange = B, y = L ? function(e) {
return e.anchorNode === e.focusNode && e.anchorOffset === e.focusOffset;
} : function(e) {
return !!e.rangeCount && e.getRangeAt(e.rangeCount - 1).collapsed;
};
var j;
w.isHostMethod(D, "getRangeAt") ? j = function(e, t) {
try {
return e.getRangeAt(t);
} catch (e) {
return null;
}
} : L && (j = function(t) {
var n = x.getDocument(t.anchorNode), i = e.createRange(n);
return i.setStart(t.anchorNode, t.anchorOffset), i.setEnd(t.focusNode, t.focusOffset),
i.collapsed !== this.isCollapsed && (i.setStart(t.focusNode, t.focusOffset), i.setEnd(t.anchorNode, t.anchorOffset)),
i;
}), e.getSelection = function(e) {
e = e || window;
var t = e._rangySelection, n = b(e), r = T ? i(e) : null;
return t ? (t.nativeSelection = n, t.docSelection = r, t.refresh(e)) : (t = new f(n, r, e),
e._rangySelection = t), t;
}, e.getIframeSelection = function(t) {
return e.getSelection(x.getIframeWindow(t));
};
var $ = f.prototype;
if (!I && L && w.areHostMethods(D, [ "removeAllRanges", "addRange" ])) {
$.removeAllRanges = function() {
this.nativeSelection.removeAllRanges(), a(this);
};
var G = function(t, n) {
var i = S.getRangeDocument(n), r = e.createRange(i);
r.collapseToPoint(n.endContainer, n.endOffset), t.nativeSelection.addRange(s(r)),
t.nativeSelection.extend(n.startContainer, n.startOffset), t.refresh();
};
$.addRange = R ? function(t, n) {
if (B && T && "Control" == this.docSelection.type) h(this, t); else if (n && A) G(this, t); else {
var i;
if (P ? i = this.rangeCount : (this.removeAllRanges(), i = 0), this.nativeSelection.addRange(s(t)),
this.rangeCount = this.nativeSelection.rangeCount, this.rangeCount == i + 1) {
if (e.config.checkSelectionRanges) {
var o = j(this.nativeSelection, this.rangeCount - 1);
o && !S.rangesEqual(o, t) && (t = new C(o));
}
this._ranges[this.rangeCount - 1] = t, r(this, t, U(this.nativeSelection)), this.isCollapsed = y(this);
} else this.refresh();
}
} : function(e, t) {
t && A ? G(this, e) : (this.nativeSelection.addRange(s(e)), this.refresh());
}, $.setRanges = function(e) {
if (B && e.length > 1) m(this, e); else {
this.removeAllRanges();
for (var t = 0, n = e.length; n > t; ++t) this.addRange(e[t]);
}
};
} else {
if (!(w.isHostMethod(D, "empty") && w.isHostMethod(N, "select") && B && I)) return t.fail("No means of selecting a Range or TextRange was found"),
!1;
$.removeAllRanges = function() {
try {
if (this.docSelection.empty(), "None" != this.docSelection.type) {
var e;
if (this.anchorNode) e = x.getDocument(this.anchorNode); else if ("Control" == this.docSelection.type) {
var t = this.docSelection.createRange();
t.length && (e = x.getDocument(t.item(0)).body.createTextRange());
}
e && (e.body.createTextRange().select(), this.docSelection.empty());
}
} catch (e) {}
a(this);
}, $.addRange = function(e) {
"Control" == this.docSelection.type ? h(this, e) : (C.rangeToTextRange(e).select(),
this._ranges[0] = e, this.rangeCount = 1, this.isCollapsed = this._ranges[0].collapsed,
r(this, e, !1));
}, $.setRanges = function(e) {
this.removeAllRanges();
var t = e.length;
t > 1 ? m(this, e) : t && this.addRange(e[0]);
};
}
$.getRangeAt = function(e) {
if (0 > e || e >= this.rangeCount) throw new _("INDEX_SIZE_ERR");
return this._ranges[e];
};
var q;
if (I) q = function(t) {
var n;
e.isSelectionValid(t.win) ? n = t.docSelection.createRange() : (n = x.getBody(t.win.document).createTextRange(),
n.collapse(!0)), "Control" == t.docSelection.type ? p(t) : u(n) ? d(t, n) : a(t);
}; else if (w.isHostMethod(D, "getRangeAt") && "number" == typeof D.rangeCount) q = function(t) {
if (B && T && "Control" == t.docSelection.type) p(t); else if (t._ranges.length = t.rangeCount = t.nativeSelection.rangeCount,
t.rangeCount) {
for (var n = 0, i = t.rangeCount; i > n; ++n) t._ranges[n] = new e.WrappedRange(t.nativeSelection.getRangeAt(n));
r(t, t._ranges[t.rangeCount - 1], U(t.nativeSelection)), t.isCollapsed = y(t);
} else a(t);
}; else {
if (!L || "boolean" != typeof D.isCollapsed || "boolean" != typeof N.collapsed || !e.features.implementsDomRange) return t.fail("No means of obtaining a Range or TextRange from the user's selection was found"),
!1;
q = function(e) {
var t, n = e.nativeSelection;
n.anchorNode ? (t = j(n, 0), e._ranges = [ t ], e.rangeCount = 1, o(e), e.isCollapsed = y(e)) : a(e);
};
}
$.refresh = function(e) {
var t = e ? this._ranges.slice(0) : null;
if (q(this), e) {
var n = t.length;
if (n != this._ranges.length) return !1;
for (;n--; ) if (!S.rangesEqual(t[n], this._ranges[n])) return !1;
return !0;
}
};
var H = function(e, t) {
var n = e.getAllRanges(), i = !1;
e.removeAllRanges();
for (var r = 0, o = n.length; o > r; ++r) i || t !== n[r] ? e.addRange(n[r]) : i = !0;
e.rangeCount || a(e);
};
$.removeRange = B ? function(e) {
if ("Control" == this.docSelection.type) {
for (var t, n = this.docSelection.createRange(), i = c(e), r = x.getDocument(n.item(0)), o = x.getBody(r).createControlRange(), a = !1, s = 0, l = n.length; l > s; ++s) t = n.item(s),
t !== i || a ? o.add(n.item(s)) : a = !0;
o.select(), p(this);
} else H(this, e);
} : function(e) {
H(this, e);
};
var U;
!I && L && e.features.implementsDomRange ? (U = function(e) {
var t = !1;
return e.anchorNode && (t = 1 == x.comparePoints(e.anchorNode, e.anchorOffset, e.focusNode, e.focusOffset)),
t;
}, $.isBackwards = function() {
return U(this);
}) : U = $.isBackwards = function() {
return !1;
}, $.toString = function() {
for (var e = [], t = 0, n = this.rangeCount; n > t; ++t) e[t] = "" + this._ranges[t];
return e.join("");
}, $.collapse = function(t, n) {
g(this, t);
var i = e.createRange(x.getDocument(t));
i.collapseToPoint(t, n), this.removeAllRanges(), this.addRange(i), this.isCollapsed = !0;
}, $.collapseToStart = function() {
if (!this.rangeCount) throw new _("INVALID_STATE_ERR");
var e = this._ranges[0];
this.collapse(e.startContainer, e.startOffset);
}, $.collapseToEnd = function() {
if (!this.rangeCount) throw new _("INVALID_STATE_ERR");
var e = this._ranges[this.rangeCount - 1];
this.collapse(e.endContainer, e.endOffset);
}, $.selectAllChildren = function(t) {
g(this, t);
var n = e.createRange(x.getDocument(t));
n.selectNodeContents(t), this.removeAllRanges(), this.addRange(n);
}, $.deleteFromDocument = function() {
if (B && T && "Control" == this.docSelection.type) {
for (var e, t = this.docSelection.createRange(); t.length; ) e = t.item(0), t.remove(e),
e.parentNode.removeChild(e);
this.refresh();
} else if (this.rangeCount) {
var n = this.getAllRanges();
this.removeAllRanges();
for (var i = 0, r = n.length; r > i; ++i) n[i].deleteContents();
this.addRange(n[r - 1]);
}
}, $.getAllRanges = function() {
return this._ranges.slice(0);
}, $.setSingleRange = function(e) {
this.setRanges([ e ]);
}, $.containsNode = function(e, t) {
for (var n = 0, i = this._ranges.length; i > n; ++n) if (this._ranges[n].containsNode(e, t)) return !0;
return !1;
}, $.toHtml = function() {
var e = "";
if (this.rangeCount) {
for (var t = S.getRangeDocument(this._ranges[0]).createElement("div"), n = 0, i = this._ranges.length; i > n; ++n) t.appendChild(this._ranges[n].cloneContents());
e = t.innerHTML;
}
return e;
}, $.getName = function() {
return "WrappedSelection";
}, $.inspect = function() {
return v(this);
}, $.detach = function() {
this.win._rangySelection = null, this.win = this.anchorNode = this.focusNode = null;
}, f.inspect = v, e.Selection = f, e.selectionPrototype = $, e.addCreateMissingNativeApiListener(function(t) {
void 0 === t.getSelection && (t.getSelection = function() {
return e.getSelection(this);
}), t = null;
});
}), define("rangy", function(e) {
return function() {
return e.rangy;
};
}(this)), function() {
var e = this, t = e._, n = {}, i = Array.prototype, r = Object.prototype, o = Function.prototype, a = i.push, s = i.slice, l = i.concat, c = r.toString, u = r.hasOwnProperty, d = i.forEach, p = i.map, h = i.reduce, f = i.reduceRight, m = i.filter, g = i.every, v = i.some, b = i.indexOf, y = i.lastIndexOf, x = Array.isArray, w = Object.keys, S = o.bind, C = function(e) {
return e instanceof C ? e : this instanceof C ? void (this._wrapped = e) : new C(e);
};
"undefined" != typeof exports ? ("undefined" != typeof module && module.exports && (exports = module.exports = C),
exports._ = C) : e._ = C, C.VERSION = "1.5.1";
var _ = C.each = C.forEach = function(e, t, i) {
if (null != e) if (d && e.forEach === d) e.forEach(t, i); else if (e.length === +e.length) {
for (var r = 0, o = e.length; o > r; r++) if (t.call(i, e[r], r, e) === n) return;
} else for (var a in e) if (C.has(e, a) && t.call(i, e[a], a, e) === n) return;
};
C.map = C.collect = function(e, t, n) {
var i = [];
return null == e ? i : p && e.map === p ? e.map(t, n) : (_(e, function(e, r, o) {
i.push(t.call(n, e, r, o));
}), i);
};
var k = "Reduce of empty array with no initial value";
C.reduce = C.foldl = C.inject = function(e, t, n, i) {
var r = arguments.length > 2;
if (null == e && (e = []), h && e.reduce === h) return i && (t = C.bind(t, i)),
r ? e.reduce(t, n) : e.reduce(t);
if (_(e, function(e, o, a) {
r ? n = t.call(i, n, e, o, a) : (n = e, r = !0);
}), !r) throw new TypeError(k);
return n;
}, C.reduceRight = C.foldr = function(e, t, n, i) {
var r = arguments.length > 2;
if (null == e && (e = []), f && e.reduceRight === f) return i && (t = C.bind(t, i)),
r ? e.reduceRight(t, n) : e.reduceRight(t);
var o = e.length;
if (o !== +o) {
var a = C.keys(e);
o = a.length;
}
if (_(e, function(s, l, c) {
l = a ? a[--o] : --o, r ? n = t.call(i, n, e[l], l, c) : (n = e[l], r = !0);
}), !r) throw new TypeError(k);
return n;
}, C.find = C.detect = function(e, t, n) {
var i;
return E(e, function(e, r, o) {
return t.call(n, e, r, o) ? (i = e, !0) : void 0;
}), i;
}, C.filter = C.select = function(e, t, n) {
var i = [];
return null == e ? i : m && e.filter === m ? e.filter(t, n) : (_(e, function(e, r, o) {
t.call(n, e, r, o) && i.push(e);
}), i);
}, C.reject = function(e, t, n) {
return C.filter(e, function(e, i, r) {
return !t.call(n, e, i, r);
}, n);
}, C.every = C.all = function(e, t, i) {
t || (t = C.identity);
var r = !0;
return null == e ? r : g && e.every === g ? e.every(t, i) : (_(e, function(e, o, a) {
return (r = r && t.call(i, e, o, a)) ? void 0 : n;
}), !!r);
};
var E = C.some = C.any = function(e, t, i) {
t || (t = C.identity);
var r = !1;
return null == e ? r : v && e.some === v ? e.some(t, i) : (_(e, function(e, o, a) {
return r || (r = t.call(i, e, o, a)) ? n : void 0;
}), !!r);
};
C.contains = C.include = function(e, t) {
return null != e && (b && e.indexOf === b ? -1 != e.indexOf(t) : E(e, function(e) {
return e === t;
}));
}, C.invoke = function(e, t) {
var n = s.call(arguments, 2), i = C.isFunction(t);
return C.map(e, function(e) {
return (i ? t : e[t]).apply(e, n);
});
}, C.pluck = function(e, t) {
return C.map(e, function(e) {
return e[t];
});
}, C.where = function(e, t, n) {
return C.isEmpty(t) ? n ? void 0 : [] : C[n ? "find" : "filter"](e, function(e) {
for (var n in t) if (t[n] !== e[n]) return !1;
return !0;
});
}, C.findWhere = function(e, t) {
return C.where(e, t, !0);
}, C.max = function(e, t, n) {
if (!t && C.isArray(e) && e[0] === +e[0] && e.length < 65535) return Math.max.apply(Math, e);
if (!t && C.isEmpty(e)) return -1 / 0;
var i = {
computed: -1 / 0,
value: -1 / 0
};
return _(e, function(e, r, o) {
var a = t ? t.call(n, e, r, o) : e;
a > i.computed && (i = {
value: e,
computed: a
});
}), i.value;
}, C.min = function(e, t, n) {
if (!t && C.isArray(e) && e[0] === +e[0] && e.length < 65535) return Math.min.apply(Math, e);
if (!t && C.isEmpty(e)) return 1 / 0;
var i = {
computed: 1 / 0,
value: 1 / 0
};
return _(e, function(e, r, o) {
var a = t ? t.call(n, e, r, o) : e;
a < i.computed && (i = {
value: e,
computed: a
});
}), i.value;
}, C.shuffle = function(e) {
var t, n = 0, i = [];
return _(e, function(e) {
t = C.random(n++), i[n - 1] = i[t], i[t] = e;
}), i;
};
var T = function(e) {
return C.isFunction(e) ? e : function(t) {
return t[e];
};
};
C.sortBy = function(e, t, n) {
var i = T(t);
return C.pluck(C.map(e, function(e, t, r) {
return {
value: e,
index: t,
criteria: i.call(n, e, t, r)
};
}).sort(function(e, t) {
var n = e.criteria, i = t.criteria;
if (n !== i) {
if (n > i || void 0 === n) return 1;
if (i > n || void 0 === i) return -1;
}
return e.index < t.index ? -1 : 1;
}), "value");
};
var I = function(e, t, n, i) {
var r = {}, o = T(null == t ? C.identity : t);
return _(e, function(t, a) {
var s = o.call(n, t, a, e);
i(r, s, t);
}), r;
};
C.groupBy = function(e, t, n) {
return I(e, t, n, function(e, t, n) {
(C.has(e, t) ? e[t] : e[t] = []).push(n);
});
}, C.countBy = function(e, t, n) {
return I(e, t, n, function(e, t) {
C.has(e, t) || (e[t] = 0), e[t]++;
});
}, C.sortedIndex = function(e, t, n, i) {
n = null == n ? C.identity : T(n);
for (var r = n.call(i, t), o = 0, a = e.length; a > o; ) {
var s = o + a >>> 1;
n.call(i, e[s]) < r ? o = s + 1 : a = s;
}
return o;
}, C.toArray = function(e) {
return e ? C.isArray(e) ? s.call(e) : e.length === +e.length ? C.map(e, C.identity) : C.values(e) : [];
}, C.size = function(e) {
return null == e ? 0 : e.length === +e.length ? e.length : C.keys(e).length;
}, C.first = C.head = C.take = function(e, t, n) {
return null != e ? null == t || n ? e[0] : s.call(e, 0, t) : void 0;
}, C.initial = function(e, t, n) {
return s.call(e, 0, e.length - (null == t || n ? 1 : t));
}, C.last = function(e, t, n) {
return null != e ? null == t || n ? e[e.length - 1] : s.call(e, Math.max(e.length - t, 0)) : void 0;
}, C.rest = C.tail = C.drop = function(e, t, n) {
return s.call(e, null == t || n ? 1 : t);
}, C.compact = function(e) {
return C.filter(e, C.identity);
};
var D = function(e, t, n) {
return t && C.every(e, C.isArray) ? l.apply(n, e) : (_(e, function(e) {
C.isArray(e) || C.isArguments(e) ? t ? a.apply(n, e) : D(e, t, n) : n.push(e);
}), n);
};
C.flatten = function(e, t) {
return D(e, t, []);
}, C.without = function(e) {
return C.difference(e, s.call(arguments, 1));
}, C.uniq = C.unique = function(e, t, n, i) {
C.isFunction(t) && (i = n, n = t, t = !1);
var r = n ? C.map(e, n, i) : e, o = [], a = [];
return _(r, function(n, i) {
(t ? i && a[a.length - 1] === n : C.contains(a, n)) || (a.push(n), o.push(e[i]));
}), o;
}, C.union = function() {
return C.uniq(C.flatten(arguments, !0));
}, C.intersection = function(e) {
var t = s.call(arguments, 1);
return C.filter(C.uniq(e), function(e) {
return C.every(t, function(t) {
return C.indexOf(t, e) >= 0;
});
});
}, C.difference = function(e) {
var t = l.apply(i, s.call(arguments, 1));
return C.filter(e, function(e) {
return !C.contains(t, e);
});
}, C.zip = function() {
for (var e = C.max(C.pluck(arguments, "length").concat(0)), t = new Array(e), n = 0; e > n; n++) t[n] = C.pluck(arguments, "" + n);
return t;
}, C.object = function(e, t) {
if (null == e) return {};
for (var n = {}, i = 0, r = e.length; r > i; i++) t ? n[e[i]] = t[i] : n[e[i][0]] = e[i][1];
return n;
}, C.indexOf = function(e, t, n) {
if (null == e) return -1;
var i = 0, r = e.length;
if (n) {
if ("number" != typeof n) return i = C.sortedIndex(e, t), e[i] === t ? i : -1;
i = 0 > n ? Math.max(0, r + n) : n;
}
if (b && e.indexOf === b) return e.indexOf(t, n);
for (;r > i; i++) if (e[i] === t) return i;
return -1;
}, C.lastIndexOf = function(e, t, n) {
if (null == e) return -1;
var i = null != n;
if (y && e.lastIndexOf === y) return i ? e.lastIndexOf(t, n) : e.lastIndexOf(t);
for (var r = i ? n : e.length; r--; ) if (e[r] === t) return r;
return -1;
}, C.range = function(e, t, n) {
arguments.length <= 1 && (t = e || 0, e = 0), n = arguments[2] || 1;
for (var i = Math.max(Math.ceil((t - e) / n), 0), r = 0, o = new Array(i); i > r; ) o[r++] = e,
e += n;
return o;
};
var N = function() {};
C.bind = function(e, t) {
var n, i;
if (S && e.bind === S) return S.apply(e, s.call(arguments, 1));
if (!C.isFunction(e)) throw new TypeError();
return n = s.call(arguments, 2), i = function() {
if (!(this instanceof i)) return e.apply(t, n.concat(s.call(arguments)));
N.prototype = e.prototype;
var r = new N();
N.prototype = null;
var o = e.apply(r, n.concat(s.call(arguments)));
return Object(o) === o ? o : r;
};
}, C.partial = function(e) {
var t = s.call(arguments, 1);
return function() {
return e.apply(this, t.concat(s.call(arguments)));
};
}, C.bindAll = function(e) {
var t = s.call(arguments, 1);
if (0 === t.length) throw new Error("bindAll must be passed function names");
return _(t, function(t) {
e[t] = C.bind(e[t], e);
}), e;
}, C.memoize = function(e, t) {
var n = {};
return t || (t = C.identity), function() {
var i = t.apply(this, arguments);
return C.has(n, i) ? n[i] : n[i] = e.apply(this, arguments);
};
}, C.delay = function(e, t) {
var n = s.call(arguments, 2);
return setTimeout(function() {
return e.apply(null, n);
}, t);
}, C.defer = function(e) {
return C.delay.apply(C, [ e, 1 ].concat(s.call(arguments, 1)));
}, C.throttle = function(e, t, n) {
var i, r, o, a = null, s = 0;
n || (n = {});
var l = function() {
s = !1 === n.leading ? 0 : new Date(), a = null, o = e.apply(i, r);
};
return function() {
var c = new Date();
s || !1 !== n.leading || (s = c);
var u = t - (c - s);
return i = this, r = arguments, 0 >= u ? (clearTimeout(a), a = null, s = c, o = e.apply(i, r)) : a || !1 === n.trailing || (a = setTimeout(l, u)),
o;
};
}, C.debounce = function(e, t, n) {
var i, r = null;
return function() {
var o = this, a = arguments, s = function() {
r = null, n || (i = e.apply(o, a));
}, l = n && !r;
return clearTimeout(r), r = setTimeout(s, t), l && (i = e.apply(o, a)), i;
};
}, C.once = function(e) {
var t, n = !1;
return function() {
return n ? t : (n = !0, t = e.apply(this, arguments), e = null, t);
};
}, C.wrap = function(e, t) {
return function() {
var n = [ e ];
return a.apply(n, arguments), t.apply(this, n);
};
}, C.compose = function() {
var e = arguments;
return function() {
for (var t = arguments, n = e.length - 1; n >= 0; n--) t = [ e[n].apply(this, t) ];
return t[0];
};
}, C.after = function(e, t) {
return function() {
return --e < 1 ? t.apply(this, arguments) : void 0;
};
}, C.keys = w || function(e) {
if (e !== Object(e)) throw new TypeError("Invalid object");
var t = [];
for (var n in e) C.has(e, n) && t.push(n);
return t;
}, C.values = function(e) {
var t = [];
for (var n in e) C.has(e, n) && t.push(e[n]);
return t;
}, C.pairs = function(e) {
var t = [];
for (var n in e) C.has(e, n) && t.push([ n, e[n] ]);
return t;
}, C.invert = function(e) {
var t = {};
for (var n in e) C.has(e, n) && (t[e[n]] = n);
return t;
}, C.functions = C.methods = function(e) {
var t = [];
for (var n in e) C.isFunction(e[n]) && t.push(n);
return t.sort();
}, C.extend = function(e) {
return _(s.call(arguments, 1), function(t) {
if (t) for (var n in t) e[n] = t[n];
}), e;
}, C.pick = function(e) {
var t = {}, n = l.apply(i, s.call(arguments, 1));
return _(n, function(n) {
n in e && (t[n] = e[n]);
}), t;
}, C.omit = function(e) {
var t = {}, n = l.apply(i, s.call(arguments, 1));
for (var r in e) C.contains(n, r) || (t[r] = e[r]);
return t;
}, C.defaults = function(e) {
return _(s.call(arguments, 1), function(t) {
if (t) for (var n in t) void 0 === e[n] && (e[n] = t[n]);
}), e;
}, C.clone = function(e) {
return C.isObject(e) ? C.isArray(e) ? e.slice() : C.extend({}, e) : e;
}, C.tap = function(e, t) {
return t(e), e;
};
var M = function(e, t, n, i) {
if (e === t) return 0 !== e || 1 / e == 1 / t;
if (null == e || null == t) return e === t;
e instanceof C && (e = e._wrapped), t instanceof C && (t = t._wrapped);
var r = c.call(e);
if (r != c.call(t)) return !1;
switch (r) {
case "[object String]":
return e == String(t);
case "[object Number]":
return e != +e ? t != +t : 0 == e ? 1 / e == 1 / t : e == +t;
case "[object Date]":
case "[object Boolean]":
return +e == +t;
case "[object RegExp]":
return e.source == t.source && e.global == t.global && e.multiline == t.multiline && e.ignoreCase == t.ignoreCase;
}
if ("object" != typeof e || "object" != typeof t) return !1;
for (var o = n.length; o--; ) if (n[o] == e) return i[o] == t;
var a = e.constructor, s = t.constructor;
if (a !== s && !(C.isFunction(a) && a instanceof a && C.isFunction(s) && s instanceof s)) return !1;
n.push(e), i.push(t);
var l = 0, u = !0;
if ("[object Array]" == r) {
if (l = e.length, u = l == t.length) for (;l-- && (u = M(e[l], t[l], n, i)); ) ;
} else {
for (var d in e) if (C.has(e, d) && (l++, !(u = C.has(t, d) && M(e[d], t[d], n, i)))) break;
if (u) {
for (d in t) if (C.has(t, d) && !l--) break;
u = !l;
}
}
return n.pop(), i.pop(), u;
};
C.isEqual = function(e, t) {
return M(e, t, [], []);
}, C.isEmpty = function(e) {
if (null == e) return !0;
if (C.isArray(e) || C.isString(e)) return 0 === e.length;
for (var t in e) if (C.has(e, t)) return !1;
return !0;
}, C.isElement = function(e) {
return !(!e || 1 !== e.nodeType);
}, C.isArray = x || function(e) {
return "[object Array]" == c.call(e);
}, C.isObject = function(e) {
return e === Object(e);
}, _([ "Arguments", "Function", "String", "Number", "Date", "RegExp" ], function(e) {
C["is" + e] = function(t) {
return c.call(t) == "[object " + e + "]";
};
}), C.isArguments(arguments) || (C.isArguments = function(e) {
return !(!e || !C.has(e, "callee"));
}), "function" != typeof /./ && (C.isFunction = function(e) {
return "function" == typeof e;
}), C.isFinite = function(e) {
return isFinite(e) && !isNaN(parseFloat(e));
}, C.isNaN = function(e) {
return C.isNumber(e) && e != +e;
}, C.isBoolean = function(e) {
return !0 === e || !1 === e || "[object Boolean]" == c.call(e);
}, C.isNull = function(e) {
return null === e;
}, C.isUndefined = function(e) {
return void 0 === e;
}, C.has = function(e, t) {
return u.call(e, t);
}, C.noConflict = function() {
return e._ = t, this;
}, C.identity = function(e) {
return e;
}, C.times = function(e, t, n) {
for (var i = Array(Math.max(0, e)), r = 0; e > r; r++) i[r] = t.call(n, r);
return i;
}, C.random = function(e, t) {
return null == t && (t = e, e = 0), e + Math.floor(Math.random() * (t - e + 1));
};
var L = {
escape: {
"&": "&amp;",
"<": "&lt;",
">": "&gt;",
'"': "&quot;",
"'": "&#x27;",
"/": "&#x2F;"
}
};
L.unescape = C.invert(L.escape);
var A = {
escape: new RegExp("[" + C.keys(L.escape).join("") + "]", "g"),
unescape: new RegExp("(" + C.keys(L.unescape).join("|") + ")", "g")
};
C.each([ "escape", "unescape" ], function(e) {
C[e] = function(t) {
return null == t ? "" : ("" + t).replace(A[e], function(t) {
return L[e][t];
});
};
}), C.result = function(e, t) {
if (null != e) {
var n = e[t];
return C.isFunction(n) ? n.call(e) : n;
}
}, C.mixin = function(e) {
_(C.functions(e), function(t) {
var n = C[t] = e[t];
C.prototype[t] = function() {
var e = [ this._wrapped ];
return a.apply(e, arguments), B.call(this, n.apply(C, e));
};
});
};
var R = 0;
C.uniqueId = function(e) {
var t = ++R + "";
return e ? e + t : t;
}, C.templateSettings = {
evaluate: /<%([\s\S]+?)%>/g,
interpolate: /<%=([\s\S]+?)%>/g,
escape: /<%-([\s\S]+?)%>/g
};
var P = /(.)^/, O = {
"'": "'",
"\\": "\\",
"\r": "r",
"\n": "n",
" ": "t",
"\u2028": "u2028",
"\u2029": "u2029"
}, F = /\\|'|\r|\n|\t|\u2028|\u2029/g;
C.template = function(e, t, n) {
var i;
n = C.defaults({}, n, C.templateSettings);
var r = new RegExp([ (n.escape || P).source, (n.interpolate || P).source, (n.evaluate || P).source ].join("|") + "|$", "g"), o = 0, a = "__p+='";
e.replace(r, function(t, n, i, r, s) {
return a += e.slice(o, s).replace(F, function(e) {
return "\\" + O[e];
}), n && (a += "'+\n((__t=(" + n + "))==null?'':_.escape(__t))+\n'"), i && (a += "'+\n((__t=(" + i + "))==null?'':__t)+\n'"),
r && (a += "';\n" + r + "\n__p+='"), o = s + t.length, t;
}), a += "';\n", n.variable || (a = "with(obj||{}){\n" + a + "}\n"), a = "var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n" + a + "return __p;\n";
try {
i = new Function(n.variable || "obj", "_", a);
} catch (e) {
throw e.source = a, e;
}
if (t) return i(t, C);
var s = function(e) {
return i.call(this, e, C);
};
return s.source = "function(" + (n.variable || "obj") + "){\n" + a + "}", s;
}, C.chain = function(e) {
return C(e).chain();
};
var B = function(e) {
return this._chain ? C(e).chain() : e;
};
C.mixin(C), _([ "pop", "push", "reverse", "shift", "sort", "splice", "unshift" ], function(e) {
var t = i[e];
C.prototype[e] = function() {
var n = this._wrapped;
return t.apply(n, arguments), "shift" != e && "splice" != e || 0 !== n.length || delete n[0],
B.call(this, n);
};
}), _([ "concat", "join", "slice" ], function(e) {
var t = i[e];
C.prototype[e] = function() {
return B.call(this, t.apply(this._wrapped, arguments));
};
}), C.extend(C.prototype, {
chain: function() {
return this._chain = !0, this;
},
value: function() {
return this._wrapped;
}
});
}.call(this), define("underscore", function(e) {
return function() {
return e._;
};
}(this)), function(e, t) {
"object" == typeof exports ? module.exports = t() : "function" == typeof define && define.amd ? define("crel", t) : e.crel = t();
}(this, function() {
function e() {
var n, i = window.document, r = arguments, o = i.createElement(r[0]), a = r[1], s = 2, l = r.length, c = e.attrMap;
if (1 === l) return o;
if (("object" != typeof a || t(a)) && (--s, a = null), l - s == 1 && "string" == typeof r[s] && void 0 !== o.textContent) o.textContent = r[s]; else for (;l > s; ++s) null != (n = r[s]) && (t(n) || (n = i.createTextNode(n)),
o.appendChild(n));
for (var u in a) if (c[u]) {
var d = e.attrMap[u];
"function" == typeof d ? d(o, a[u]) : o.setAttribute(d, a[u]);
} else o.setAttribute(u, a[u]);
return o;
}
var t = "object" == typeof Node ? function(e) {
return e instanceof Node;
} : function(e) {
return e && "object" == typeof e && "number" == typeof e.nodeType && "string" == typeof e.nodeName;
};
return e.attrMap = {}, e.isNode = t, e;
}), define("storage", [ "underscore" ], function(e) {
function t(e) {
try {
return t.compact(localStorage[e].split(";"));
} catch (t) {
return localStorage[e] = ";", [];
}
}
var n, i, r = t("file.list"), o = localStorage.version;
if (void 0 === o && (localStorage.removeItem("sync.queue"), localStorage.removeItem("sync.current"),
localStorage.removeItem("file.counter"), e.each(r, function(n) {
localStorage[n + ".publish"] = ";";
var i = t(n + ".sync");
e.each(i, function(e) {
localStorage[e + ".contentCRC"] = "0", void 0 !== localStorage[e + ".etag"] && (localStorage[e + ".titleCRC"] = "0");
});
}), o = "v1"), "v1" == o) {
var a = localStorage["sync.gdrive.lastChangeId"];
a && (localStorage["gdrive.lastChangeId"] = a, localStorage.removeItem("sync.gdrive.lastChangeId"));
var s = localStorage["sync.dropbox.lastChangeId"];
s && (localStorage["dropbox.lastChangeId"] = s, localStorage.removeItem("sync.dropbox.lastChangeId")),
e.each(r, function(n) {
var i = t(n + ".sync");
e.each(i, function(e) {
var t = {};
0 === e.indexOf("sync.gdrive.") ? (t.provider = "gdrive", t.id = e.substring("sync.gdrive.".length),
t.etag = localStorage[e + ".etag"], t.contentCRC = localStorage[e + ".contentCRC"],
t.titleCRC = localStorage[e + ".titleCRC"]) : 0 === e.indexOf("sync.dropbox.") && (t.provider = "dropbox",
t.path = decodeURIComponent(e.substring("sync.dropbox.".length)), t.version = localStorage[e + ".version"],
t.contentCRC = localStorage[e + ".contentCRC"]), localStorage[e] = JSON.stringify(t),
localStorage.removeItem(e + ".etag"), localStorage.removeItem(e + ".version"), localStorage.removeItem(e + ".contentCRC"),
localStorage.removeItem(e + ".titleCRC");
});
}), o = "v2";
}
return "v2" == o && (e.each(r, function(t) {
e.has(localStorage, t + ".sync") || (localStorage.removeItem(t + ".title"), localStorage.removeItem(t + ".publish"),
localStorage.removeItem(t + ".content"), localStorage["file.list"].replace(";" + t + ";", ";"));
}), o = "v3"), "v3" == o && (n = localStorage["file.current"], void 0 !== n && -1 === localStorage["file.list"].indexOf(";" + n + ";") && localStorage.removeItem("file.current"),
o = "v4"), "v4" == o && (localStorage.removeItem("githubToken"), o = "v5"), "v5" == o && (e.each(r, function(n) {
var i = t(n + ".publish");
e.each(i, function(e) {
var t = JSON.parse(localStorage[e]);
"gdrive" == t.provider && (t.id = t.fileId, t.fileId = void 0, localStorage[e] = JSON.stringify(t));
});
}), o = "v6"), "v6" == o && (n = localStorage["file.current"], void 0 !== n && (localStorage[n + ".selectTime"] = new Date().getTime(),
localStorage.removeItem("file.current")), o = "v7"), "v7" != o && "v8" != o && "v9" != o || (e.has(localStorage, "settings") && (i = JSON.parse(localStorage.settings),
delete i.editorFontFamily, delete i.editorFontSize, i.template && (i.template = i.template.replace("http://benweet.github.io/stackedit/css/main-min.css", "http://benweet.github.io/stackedit/res-min/themes/default.css")),
localStorage.settings = JSON.stringify(i)), o = "v10"), "v10" == o && (e.has(localStorage, "settings") && (i = JSON.parse(localStorage.settings),
((i.extensionSettings || {}).markdownExtra || {}).extensions && i.extensionSettings.markdownExtra.extensions.push("smartypants"),
"http://stackedit-ssh-proxy.herokuapp.com/" == i.sshProxy && (i.sshProxy = "https://stackedit-ssh-proxy.herokuapp.com/"),
i.template && (i.template = i.template.replace("http://benweet.github.io/stackedit/lib/", "https://stackedit.io/libs/")),
i.template && (i.template = i.template.replace("http://benweet.github.io/stackedit/", "https://stackedit.io/")),
i.pdfTemplate && (i.pdfTemplate = i.pdfTemplate.replace("http://benweet.github.io/stackedit/lib/", "https://stackedit.io/libs/")),
i.pdfTemplate && (i.pdfTemplate = i.pdfTemplate.replace("http://benweet.github.io/stackedit/", "https://stackedit.io/")),
i.defaultContent && (i.defaultContent = i.defaultContent.replace("http://benweet.github.io/stackedit/", "https://stackedit.io/")),
i.commitMsg && (i.commitMsg = i.commitMsg.replace("http://benweet.github.io/stackedit/", "https://stackedit.io/")),
localStorage.settings = JSON.stringify(i)), o = "v11"), "v11" == o && (localStorage.removeItem("theme"),
e.has(localStorage, "settings") && (i = JSON.parse(localStorage.settings), delete i.editorFontFamily,
delete i.editorFontSize, i.template && (i.template = i.template.replace("https://stackedit.io/res-min/themes/default.css", "https://stackedit.io/res-min/themes/base.css")),
i.pdfTemplate && (i.pdfTemplate = i.pdfTemplate.replace("https://stackedit.io/res-min/themes/default.css", "https://stackedit.io/res-min/themes/base.css")),
localStorage.settings = JSON.stringify(i)), o = "v12"), "v12" != o && "v13" != o || (e.has(localStorage, "settings") && (i = JSON.parse(localStorage.settings),
delete i.editorFontFamily, localStorage.settings = JSON.stringify(i)), o = "v14"),
"v14" == o && (e.has(localStorage, "settings") && (i = JSON.parse(localStorage.settings),
i.template && (i.template = i.template.replace("https://stackedit.io/res-min/themes/default.css", "https://stackedit.io/res-min/themes/base.css")),
i.pdfTemplate && (i.pdfTemplate = i.pdfTemplate.replace("https://stackedit.io/res-min/themes/default.css", "https://stackedit.io/res-min/themes/base.css")),
localStorage.settings = JSON.stringify(i)), o = "v15"), "v15" == o && (localStorage.removeItem("gdrivePermissions"),
e.has(localStorage, "gdrive.lastChangeId") && (localStorage["google.gdrive0.gdrive.lastChangeId"] = localStorage["gdrive.lastChangeId"],
localStorage.removeItem("gdrive.lastChangeId")), e.has(localStorage, "settings") && (i = JSON.parse(localStorage.settings),
((i.extensionSettings || {}).markdownExtra || {}).extensions && (i.extensionSettings.markdownExtra.extensions.push("newlines"),
i.extensionSettings.markdownExtra.extensions.push("strikethrough")), localStorage.settings = JSON.stringify(i)),
o = "v16"), "v16" != o && "v17" != o || (localStorage.removeItem("focusMode"), localStorage.removeItem("mode"),
localStorage.removeItem("gdrive.state"), localStorage.removeItem("google.picasa0.permissions"),
localStorage.removeItem("google.picasa0.userId"), e.has(localStorage, "settings") && (i = JSON.parse(localStorage.settings),
delete i.shortcuts, delete i.editorFontFamily, delete i.editorFontSize, delete i.maxWidth,
localStorage.settings = JSON.stringify(i)), o = "v18"), "v18" == o && (e.has(localStorage, "settings") && (i = JSON.parse(localStorage.settings),
((i.extensionSettings || {}).markdownExtra || {}).diagrams = !0, localStorage.settings = JSON.stringify(i)),
o = "v19"), "v19" == o && (localStorage.removeItem("themeV3"), localStorage.removeItem("welcomeTour"),
e.has(localStorage, "settings") && (i = JSON.parse(localStorage.settings), delete i.pdfTemplate,
delete i.pdfPageSize, delete i.sshProxy, localStorage.settings = JSON.stringify(i)),
o = "v20"), "v20" == o && (e.has(localStorage, "settings") && (i = JSON.parse(localStorage.settings),
delete i.markdownMimeType, localStorage.settings = JSON.stringify(i)), o = "v21"),
"v21" == o && (e.has(localStorage, "settings") && (i = JSON.parse(localStorage.settings),
i.template && (i.template = i.template.replace("https://stackedit.io/libs/MathJax/", "https://cdn.mathjax.org/mathjax/latest/")),
i.pdfTemplate && (i.pdfTemplate = i.pdfTemplate.replace("/libs/MathJax/", "/res/bower-libs/MathJax/")),
localStorage.settings = JSON.stringify(i)), o = "v22"), "v22" == o && (e.has(localStorage, "settings") && (i = JSON.parse(localStorage.settings),
i.couchdbUrl && (i.couchdbUrl = i.couchdbUrl.replace("https://stackedit.couchappy.com/documents", "https://stackedit.smileupps.com/documents")),
localStorage.settings = JSON.stringify(i)), o = "v23"), localStorage.version = o,
localStorage;
}), function(e) {
if ("object" == typeof exports && "undefined" != typeof module) module.exports = e(); else if ("function" == typeof define && define.amd) define("xregexp", [], e); else {
var t;
t = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : this,
t.XRegExp = e();
}
}(function() {
return function e(t, n, i) {
function r(a, s) {
if (!n[a]) {
if (!t[a]) {
var l = "function" == typeof require && require;
if (!s && l) return l(a, !0);
if (o) return o(a, !0);
var c = new Error("Cannot find module '" + a + "'");
throw c.code = "MODULE_NOT_FOUND", c;
}
var u = n[a] = {
exports: {}
};
t[a][0].call(u.exports, function(e) {
var n = t[a][1][e];
return r(n || e);
}, u, u.exports, e, t, n, i);
}
return n[a].exports;
}
for (var o = "function" == typeof require && require, a = 0; a < i.length; a++) r(i[a]);
return r;
}({
1: [ function(e, t) {
t.exports = function(e) {
"use strict";
function t(e) {
var t = /^\^/, n = /\$$/;
return t.test(e) && n.test(e.replace(/\\[\s\S]/g, "")) ? e.replace(t, "").replace(n, "") : e;
}
function n(t) {
return e.isRegExp(t) ? t[i] && t[i].captureNames ? t : e(t.source) : e(t);
}
var i = "xregexp", r = /(\()(?!\?)|\\([1-9]\d*)|\\[\s\S]|\[(?:[^\\\]]|\\[\s\S])*]/g, o = e.union([ /\({{([\w$]+)}}\)|{{([\w$]+)}}/, r ], "g");
e.build = function(a, s, l) {
var c, u, d, p, h = /^\(\?([\w$]+)\)/.exec(a), f = {}, m = 0, g = 0, v = [ 0 ];
h && (l = l || "", h[1].replace(/./g, function(e) {
l += l.indexOf(e) > -1 ? "" : e;
}));
for (p in s) s.hasOwnProperty(p) && (d = n(s[p]), f[p] = {
pattern: t(d.source),
names: d[i].captureNames || []
});
return a = n(a), u = a[i].captureNames || [], a = a.source.replace(o, function(e, t, n, i, o) {
var a, s, l = t || n;
if (l) {
if (!f.hasOwnProperty(l)) throw new ReferenceError("Undefined property " + e);
return t ? (a = u[g], v[++g] = ++m, s = "(?<" + (a || l) + ">") : s = "(?:", c = m,
s + f[l].pattern.replace(r, function(e, t, n) {
if (t) {
if (a = f[l].names[m - c], ++m, a) return "(?<" + a + ">";
} else if (n) return "\\" + (+n + c);
return e;
}) + ")";
}
if (i) {
if (a = u[g], v[++g] = ++m, a) return "(?<" + a + ">";
} else if (o) return "\\" + v[+o];
return e;
}), e(a, l);
};
};
}, {} ],
2: [ function(e, t) {
t.exports = function(e) {
"use strict";
function t(e, t, n, i) {
return {
name: e,
value: t,
start: n,
end: i
};
}
e.matchRecursive = function(n, i, r, o, a) {
o = o || "", a = a || {};
var s, l, c, u, d, p = o.indexOf("g") > -1, h = o.indexOf("y") > -1, f = o.replace(/y/g, ""), m = a.escapeChar, g = a.valueNames, v = [], b = 0, y = 0, x = 0, w = 0;
if (i = e(i, f), r = e(r, f), m) {
if (m.length > 1) throw new Error("Cannot use more than one escape character");
m = e.escape(m), d = new RegExp("(?:" + m + "[\\S\\s]|(?:(?!" + e.union([ i, r ]).source + ")[^" + m + "])+)+", o.replace(/[^imu]+/g, ""));
}
for (;;) {
if (m && (x += (e.exec(n, d, x, "sticky") || [ "" ])[0].length), c = e.exec(n, i, x),
u = e.exec(n, r, x), c && u && (c.index <= u.index ? u = null : c = null), c || u) y = (c || u).index,
x = y + (c || u)[0].length; else if (!b) break;
if (h && !b && y > w) break;
if (c) b || (s = y, l = x), ++b; else {
if (!u || !b) throw new Error("Unbalanced delimiter found in string");
if (!--b && (g ? (g[0] && s > w && v.push(t(g[0], n.slice(w, s), w, s)), g[1] && v.push(t(g[1], n.slice(s, l), s, l)),
g[2] && v.push(t(g[2], n.slice(l, y), l, y)), g[3] && v.push(t(g[3], n.slice(y, x), y, x))) : v.push(n.slice(l, y)),
w = x, !p)) break;
}
y === x && ++x;
}
return p && !h && g && g[0] && n.length > w && v.push(t(g[0], n.slice(w), w, n.length)),
v;
};
};
}, {} ],
3: [ function(e, t) {
t.exports = function(e) {
"use strict";
function t(e) {
return e.replace(/[- _]+/g, "").toLowerCase();
}
function n(e) {
for (;e.length < 4; ) e = "0" + e;
return e;
}
function i(e) {
return parseInt(e, 16);
}
function r(e) {
return parseInt(e, 10).toString(16);
}
function o(e) {
var t = /^\\[xu](.+)/.exec(e);
return t ? i(t[1]) : e.charCodeAt("\\" === e.charAt(0) ? 1 : 0);
}
function a(t) {
var i, a = "", s = -1;
return e.forEach(t, /(\\x..|\\u....|\\?[\s\S])(?:-(\\x..|\\u....|\\?[\s\S]))?/, function(e) {
i = o(e[1]), i > s + 1 && (a += "\\u" + n(r(s + 1)), i > s + 2 && (a += "-\\u" + n(r(i - 1)))),
s = o(e[2] || e[1]);
}), 65535 > s && (a += "\\u" + n(r(s + 1)), 65534 > s && (a += "-\\uFFFF")), a;
}
function s(e) {
return u[e]["b!"] || (u[e]["b!"] = a(u[e].bmp));
}
function l(e, t) {
var n = u[e], i = "";
return n.bmp && !n.isBmpLast && (i = "[" + n.bmp + "]" + (n.astral ? "|" : "")),
n.astral && (i += n.astral), n.isBmpLast && n.bmp && (i += (n.astral ? "|" : "") + "[" + n.bmp + "]"),
t ? "(?:(?!" + i + ")(?:[\ufffd-\ufffd][\ufffd-\ufffd]|[\x00-\uffff]))" : "(?:" + i + ")";
}
function c(e, t) {
var n = t ? "a!" : "a=";
return u[e][n] || (u[e][n] = l(e, t));
}
var u = {};
e.addToken(/\\([pP])(?:{(\^?)([^}]*)}|([A-Za-z]))/, function(e, n, i) {
var r = "P" === e[1] || !!e[2], o = i.indexOf("A") > -1, a = t(e[4] || e[3]), l = u[a];
if ("P" === e[1] && e[2]) throw new SyntaxError("Invalid double negation " + e[0]);
if (!u.hasOwnProperty(a)) throw new SyntaxError("Unknown Unicode token " + e[0]);
if (l.inverseOf) {
if (a = t(l.inverseOf), !u.hasOwnProperty(a)) throw new ReferenceError("Unicode token missing data " + e[0] + " -> " + l.inverseOf);
l = u[a], r = !r;
}
if (!l.bmp && !o) throw new SyntaxError("Astral mode required for Unicode token " + e[0]);
if (o) {
if ("class" === n) throw new SyntaxError("Astral mode does not support Unicode tokens within character classes");
return c(a, r);
}
return "class" === n ? r ? s(a) : l.bmp : (r ? "[^" : "[") + l.bmp + "]";
}, {
scope: "all",
optionalFlags: "A",
leadChar: "\\"
}), e.addUnicodeData = function(n) {
var i, r;
for (r = 0; r < n.length; ++r) {
if (i = n[r], !i.name) throw new Error("Unicode token requires name");
if (!(i.inverseOf || i.bmp || i.astral)) throw new Error("Unicode token has no character data " + i.name);
u[t(i.name)] = i, i.alias && (u[t(i.alias)] = i);
}
e.cache.flush("patterns");
};
};
}, {} ],
4: [ function(e, t) {
t.exports = function(e) {
"use strict";
if (!e.addUnicodeData) throw new ReferenceError("Unicode Base must be loaded before Unicode Blocks");
e.addUnicodeData([ {
name: "InAegean_Numbers",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "InAhom",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "InAlchemical_Symbols",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "InAlphabetic_Presentation_Forms",
bmp: "\ufb00-\ufb4f"
}, {
name: "InAnatolian_Hieroglyphs",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "InAncient_Greek_Musical_Notation",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "InAncient_Greek_Numbers",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "InAncient_Symbols",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "InArabic",
bmp: "\u0600-\u06ff"
}, {
name: "InArabic_Extended_A",
bmp: "\u08a0-\u08ff"
}, {
name: "InArabic_Mathematical_Alphabetic_Symbols",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "InArabic_Presentation_Forms_A",
bmp: "\ufb50-\ufdff"
}, {
name: "InArabic_Presentation_Forms_B",
bmp: "\ufe70-\ufeff"
}, {
name: "InArabic_Supplement",
bmp: "\u0750-\u077f"
}, {
name: "InArmenian",
bmp: "\u0530-\u058f"
}, {
name: "InArrows",
bmp: "\u2190-\u21ff"
}, {
name: "InAvestan",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "InBalinese",
bmp: "\u1b00-\u1b7f"
}, {
name: "InBamum",
bmp: "\ua6a0-\ua6ff"
}, {
name: "InBamum_Supplement",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "InBasic_Latin",
bmp: "\x00-"
}, {
name: "InBassa_Vah",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "InBatak",
bmp: "\u1bc0-\u1bff"
}, {
name: "InBengali",
bmp: "\u0980-\u09ff"
}, {
name: "InBlock_Elements",
bmp: "\u2580-\u259f"
}, {
name: "InBopomofo",
bmp: "\u3100-\u312f"
}, {
name: "InBopomofo_Extended",
bmp: "\u31a0-\u31bf"
}, {
name: "InBox_Drawing",
bmp: "\u2500-\u257f"
}, {
name: "InBrahmi",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "InBraille_Patterns",
bmp: "\u2800-\u28ff"
}, {
name: "InBuginese",
bmp: "\u1a00-\u1a1f"
}, {
name: "InBuhid",
bmp: "\u1740-\u175f"
}, {
name: "InByzantine_Musical_Symbols",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "InCJK_Compatibility",
bmp: "\u3300-\u33ff"
}, {
name: "InCJK_Compatibility_Forms",
bmp: "\ufe30-\ufe4f"
}, {
name: "InCJK_Compatibility_Ideographs",
bmp: "\uf900-\ufaff"
}, {
name: "InCJK_Compatibility_Ideographs_Supplement",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "InCJK_Radicals_Supplement",
bmp: "\u2e80-\u2eff"
}, {
name: "InCJK_Strokes",
bmp: "\u31c0-\u31ef"
}, {
name: "InCJK_Symbols_and_Punctuation",
bmp: "\u3000-\u303f"
}, {
name: "InCJK_Unified_Ideographs",
bmp: "\u4e00-\u9fff"
}, {
name: "InCJK_Unified_Ideographs_Extension_A",
bmp: "\u3400-\u4dbf"
}, {
name: "InCJK_Unified_Ideographs_Extension_B",
astral: "[\ufffd-\ufffd][\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd]"
}, {
name: "InCJK_Unified_Ideographs_Extension_C",
astral: "\ufffd[\ufffd-\ufffd]|[\ufffd-\ufffd][\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd]"
}, {
name: "InCJK_Unified_Ideographs_Extension_D",
astral: "\ufffd[\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd]"
}, {
name: "InCJK_Unified_Ideographs_Extension_E",
astral: "[\ufffd-\ufffd][\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd]"
}, {
name: "InCarian",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "InCaucasian_Albanian",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "InChakma",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "InCham",
bmp: "\uaa00-\uaa5f"
}, {
name: "InCherokee",
bmp: "\u13a0-\u13ff"
}, {
name: "InCherokee_Supplement",
bmp: "\uab70-\uabbf"
}, {
name: "InCombining_Diacritical_Marks",
bmp: "\u0300-\u036f"
}, {
name: "InCombining_Diacritical_Marks_Extended",
bmp: "\u1ab0-\u1aff"
}, {
name: "InCombining_Diacritical_Marks_Supplement",
bmp: "\u1dc0-\u1dff"
}, {
name: "InCombining_Diacritical_Marks_for_Symbols",
bmp: "\u20d0-\u20ff"
}, {
name: "InCombining_Half_Marks",
bmp: "\ufe20-\ufe2f"
}, {
name: "InCommon_Indic_Number_Forms",
bmp: "\ua830-\ua83f"
}, {
name: "InControl_Pictures",
bmp: "\u2400-\u243f"
}, {
name: "InCoptic",
bmp: "\u2c80-\u2cff"
}, {
name: "InCoptic_Epact_Numbers",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "InCounting_Rod_Numerals",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "InCuneiform",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "InCuneiform_Numbers_and_Punctuation",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "InCurrency_Symbols",
bmp: "\u20a0-\u20cf"
}, {
name: "InCypriot_Syllabary",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "InCyrillic",
bmp: "\u0400-\u04ff"
}, {
name: "InCyrillic_Extended_A",
bmp: "\u2de0-\u2dff"
}, {
name: "InCyrillic_Extended_B",
bmp: "\ua640-\ua69f"
}, {
name: "InCyrillic_Supplement",
bmp: "\u0500-\u052f"
}, {
name: "InDeseret",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "InDevanagari",
bmp: "\u0900-\u097f"
}, {
name: "InDevanagari_Extended",
bmp: "\ua8e0-\ua8ff"
}, {
name: "InDingbats",
bmp: "\u2700-\u27bf"
}, {
name: "InDomino_Tiles",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "InDuployan",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "InEarly_Dynastic_Cuneiform",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "InEgyptian_Hieroglyphs",
astral: "\ufffd[\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd]"
}, {
name: "InElbasan",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "InEmoticons",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "InEnclosed_Alphanumeric_Supplement",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "InEnclosed_Alphanumerics",
bmp: "\u2460-\u24ff"
}, {
name: "InEnclosed_CJK_Letters_and_Months",
bmp: "\u3200-\u32ff"
}, {
name: "InEnclosed_Ideographic_Supplement",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "InEthiopic",
bmp: "\u1200-\u137f"
}, {
name: "InEthiopic_Extended",
bmp: "\u2d80-\u2ddf"
}, {
name: "InEthiopic_Extended_A",
bmp: "\uab00-\uab2f"
}, {
name: "InEthiopic_Supplement",
bmp: "\u1380-\u139f"
}, {
name: "InGeneral_Punctuation",
bmp: "\u2000-\u206f"
}, {
name: "InGeometric_Shapes",
bmp: "\u25a0-\u25ff"
}, {
name: "InGeometric_Shapes_Extended",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "InGeorgian",
bmp: "\u10a0-\u10ff"
}, {
name: "InGeorgian_Supplement",
bmp: "\u2d00-\u2d2f"
}, {
name: "InGlagolitic",
bmp: "\u2c00-\u2c5f"
}, {
name: "InGothic",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "InGrantha",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "InGreek_Extended",
bmp: "\u1f00-\u1fff"
}, {
name: "InGreek_and_Coptic",
bmp: "\u0370-\u03ff"
}, {
name: "InGujarati",
bmp: "\u0a80-\u0aff"
}, {
name: "InGurmukhi",
bmp: "\u0a00-\u0a7f"
}, {
name: "InHalfwidth_and_Fullwidth_Forms",
bmp: "\uff00-\uffef"
}, {
name: "InHangul_Compatibility_Jamo",
bmp: "\u3130-\u318f"
}, {
name: "InHangul_Jamo",
bmp: "\u1100-\u11ff"
}, {
name: "InHangul_Jamo_Extended_A",
bmp: "\ua960-\ua97f"
}, {
name: "InHangul_Jamo_Extended_B",
bmp: "\ud7b0-\ud7ff"
}, {
name: "InHangul_Syllables",
bmp: "\uac00-\ud7af"
}, {
name: "InHanunoo",
bmp: "\u1720-\u173f"
}, {
name: "InHatran",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "InHebrew",
bmp: "\u0590-\u05ff"
}, {
name: "InHigh_Private_Use_Surrogates",
bmp: "\ufffd-\ufffd"
}, {
name: "InHigh_Surrogates",
bmp: "\ufffd-\ufffd"
}, {
name: "InHiragana",
bmp: "\u3040-\u309f"
}, {
name: "InIPA_Extensions",
bmp: "\u0250-\u02af"
}, {
name: "InIdeographic_Description_Characters",
bmp: "\u2ff0-\u2fff"
}, {
name: "InImperial_Aramaic",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "InInscriptional_Pahlavi",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "InInscriptional_Parthian",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "InJavanese",
bmp: "\ua980-\ua9df"
}, {
name: "InKaithi",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "InKana_Supplement",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "InKanbun",
bmp: "\u3190-\u319f"
}, {
name: "InKangxi_Radicals",
bmp: "\u2f00-\u2fdf"
}, {
name: "InKannada",
bmp: "\u0c80-\u0cff"
}, {
name: "InKatakana",
bmp: "\u30a0-\u30ff"
}, {
name: "InKatakana_Phonetic_Extensions",
bmp: "\u31f0-\u31ff"
}, {
name: "InKayah_Li",
bmp: "\ua900-\ua92f"
}, {
name: "InKharoshthi",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "InKhmer",
bmp: "\u1780-\u17ff"
}, {
name: "InKhmer_Symbols",
bmp: "\u19e0-\u19ff"
}, {
name: "InKhojki",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "InKhudawadi",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "InLao",
bmp: "\u0e80-\u0eff"
}, {
name: "InLatin_Extended_Additional",
bmp: "\u1e00-\u1eff"
}, {
name: "InLatin_Extended_A",
bmp: "\u0100-\u017f"
}, {
name: "InLatin_Extended_B",
bmp: "\u0180-\u024f"
}, {
name: "InLatin_Extended_C",
bmp: "\u2c60-\u2c7f"
}, {
name: "InLatin_Extended_D",
bmp: "\ua720-\ua7ff"
}, {
name: "InLatin_Extended_E",
bmp: "\uab30-\uab6f"
}, {
name: "InLatin_1_Supplement",
bmp: "\x80-\xff"
}, {
name: "InLepcha",
bmp: "\u1c00-\u1c4f"
}, {
name: "InLetterlike_Symbols",
bmp: "\u2100-\u214f"
}, {
name: "InLimbu",
bmp: "\u1900-\u194f"
}, {
name: "InLinear_A",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "InLinear_B_Ideograms",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "InLinear_B_Syllabary",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "InLisu",
bmp: "\ua4d0-\ua4ff"
}, {
name: "InLow_Surrogates",
bmp: "\ufffd-\ufffd"
}, {
name: "InLycian",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "InLydian",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "InMahajani",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "InMahjong_Tiles",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "InMalayalam",
bmp: "\u0d00-\u0d7f"
}, {
name: "InMandaic",
bmp: "\u0840-\u085f"
}, {
name: "InManichaean",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "InMathematical_Alphanumeric_Symbols",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "InMathematical_Operators",
bmp: "\u2200-\u22ff"
}, {
name: "InMeetei_Mayek",
bmp: "\uabc0-\uabff"
}, {
name: "InMeetei_Mayek_Extensions",
bmp: "\uaae0-\uaaff"
}, {
name: "InMende_Kikakui",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "InMeroitic_Cursive",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "InMeroitic_Hieroglyphs",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "InMiao",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "InMiscellaneous_Mathematical_Symbols_A",
bmp: "\u27c0-\u27ef"
}, {
name: "InMiscellaneous_Mathematical_Symbols_B",
bmp: "\u2980-\u29ff"
}, {
name: "InMiscellaneous_Symbols",
bmp: "\u2600-\u26ff"
}, {
name: "InMiscellaneous_Symbols_and_Arrows",
bmp: "\u2b00-\u2bff"
}, {
name: "InMiscellaneous_Symbols_and_Pictographs",
astral: "\ufffd[\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd]"
}, {
name: "InMiscellaneous_Technical",
bmp: "\u2300-\u23ff"
}, {
name: "InModi",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "InModifier_Tone_Letters",
bmp: "\ua700-\ua71f"
}, {
name: "InMongolian",
bmp: "\u1800-\u18af"
}, {
name: "InMro",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "InMultani",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "InMusical_Symbols",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "InMyanmar",
bmp: "\u1000-\u109f"
}, {
name: "InMyanmar_Extended_A",
bmp: "\uaa60-\uaa7f"
}, {
name: "InMyanmar_Extended_B",
bmp: "\ua9e0-\ua9ff"
}, {
name: "InNKo",
bmp: "\u07c0-\u07ff"
}, {
name: "InNabataean",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "InNew_Tai_Lue",
bmp: "\u1980-\u19df"
}, {
name: "InNumber_Forms",
bmp: "\u2150-\u218f"
}, {
name: "InOgham",
bmp: "\u1680-\u169f"
}, {
name: "InOl_Chiki",
bmp: "\u1c50-\u1c7f"
}, {
name: "InOld_Hungarian",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "InOld_Italic",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "InOld_North_Arabian",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "InOld_Permic",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "InOld_Persian",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "InOld_South_Arabian",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "InOld_Turkic",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "InOptical_Character_Recognition",
bmp: "\u2440-\u245f"
}, {
name: "InOriya",
bmp: "\u0b00-\u0b7f"
}, {
name: "InOrnamental_Dingbats",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "InOsmanya",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "InPahawh_Hmong",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "InPalmyrene",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "InPau_Cin_Hau",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "InPhags_pa",
bmp: "\ua840-\ua87f"
}, {
name: "InPhaistos_Disc",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "InPhoenician",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "InPhonetic_Extensions",
bmp: "\u1d00-\u1d7f"
}, {
name: "InPhonetic_Extensions_Supplement",
bmp: "\u1d80-\u1dbf"
}, {
name: "InPlaying_Cards",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "InPrivate_Use_Area",
bmp: "\ue000-\uf8ff"
}, {
name: "InPsalter_Pahlavi",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "InRejang",
bmp: "\ua930-\ua95f"
}, {
name: "InRumi_Numeral_Symbols",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "InRunic",
bmp: "\u16a0-\u16ff"
}, {
name: "InSamaritan",
bmp: "\u0800-\u083f"
}, {
name: "InSaurashtra",
bmp: "\ua880-\ua8df"
}, {
name: "InSharada",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "InShavian",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "InShorthand_Format_Controls",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "InSiddham",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "InSinhala",
bmp: "\u0d80-\u0dff"
}, {
name: "InSinhala_Archaic_Numbers",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "InSmall_Form_Variants",
bmp: "\ufe50-\ufe6f"
}, {
name: "InSora_Sompeng",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "InSpacing_Modifier_Letters",
bmp: "\u02b0-\u02ff"
}, {
name: "InSpecials",
bmp: "\ufff0-\uffff"
}, {
name: "InSundanese",
bmp: "\u1b80-\u1bbf"
}, {
name: "InSundanese_Supplement",
bmp: "\u1cc0-\u1ccf"
}, {
name: "InSuperscripts_and_Subscripts",
bmp: "\u2070-\u209f"
}, {
name: "InSupplemental_Arrows_A",
bmp: "\u27f0-\u27ff"
}, {
name: "InSupplemental_Arrows_B",
bmp: "\u2900-\u297f"
}, {
name: "InSupplemental_Arrows_C",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "InSupplemental_Mathematical_Operators",
bmp: "\u2a00-\u2aff"
}, {
name: "InSupplemental_Punctuation",
bmp: "\u2e00-\u2e7f"
}, {
name: "InSupplemental_Symbols_and_Pictographs",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "InSupplementary_Private_Use_Area_A",
astral: "[\ufffd-\ufffd][\ufffd-\ufffd]"
}, {
name: "InSupplementary_Private_Use_Area_B",
astral: "[\ufffd-\ufffd][\ufffd-\ufffd]"
}, {
name: "InSutton_SignWriting",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "InSyloti_Nagri",
bmp: "\ua800-\ua82f"
}, {
name: "InSyriac",
bmp: "\u0700-\u074f"
}, {
name: "InTagalog",
bmp: "\u1700-\u171f"
}, {
name: "InTagbanwa",
bmp: "\u1760-\u177f"
}, {
name: "InTags",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "InTai_Le",
bmp: "\u1950-\u197f"
}, {
name: "InTai_Tham",
bmp: "\u1a20-\u1aaf"
}, {
name: "InTai_Viet",
bmp: "\uaa80-\uaadf"
}, {
name: "InTai_Xuan_Jing_Symbols",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "InTakri",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "InTamil",
bmp: "\u0b80-\u0bff"
}, {
name: "InTelugu",
bmp: "\u0c00-\u0c7f"
}, {
name: "InThaana",
bmp: "\u0780-\u07bf"
}, {
name: "InThai",
bmp: "\u0e00-\u0e7f"
}, {
name: "InTibetan",
bmp: "\u0f00-\u0fff"
}, {
name: "InTifinagh",
bmp: "\u2d30-\u2d7f"
}, {
name: "InTirhuta",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "InTransport_and_Map_Symbols",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "InUgaritic",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "InUnified_Canadian_Aboriginal_Syllabics",
bmp: "\u1400-\u167f"
}, {
name: "InUnified_Canadian_Aboriginal_Syllabics_Extended",
bmp: "\u18b0-\u18ff"
}, {
name: "InVai",
bmp: "\ua500-\ua63f"
}, {
name: "InVariation_Selectors",
bmp: "\ufe00-\ufe0f"
}, {
name: "InVariation_Selectors_Supplement",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "InVedic_Extensions",
bmp: "\u1cd0-\u1cff"
}, {
name: "InVertical_Forms",
bmp: "\ufe10-\ufe1f"
}, {
name: "InWarang_Citi",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "InYi_Radicals",
bmp: "\ua490-\ua4cf"
}, {
name: "InYi_Syllables",
bmp: "\ua000-\ua48f"
}, {
name: "InYijing_Hexagram_Symbols",
bmp: "\u4dc0-\u4dff"
} ]);
};
}, {} ],
5: [ function(e, t) {
t.exports = function(e) {
"use strict";
if (!e.addUnicodeData) throw new ReferenceError("Unicode Base must be loaded before Unicode Categories");
e.addUnicodeData([ {
name: "C",
alias: "Other",
isBmpLast: !0,
bmp: "\x00--\x9f\xad\u0378\u0379\u0380-\u0383\u038b\u038d\u03a2\u0530\u0557\u0558\u0560\u0588\u058b\u058c\u0590\u05c8-\u05cf\u05eb-\u05ef\u05f5-\u0605\u061c\u061d\u06dd\u070e\u070f\u074b\u074c\u07b2-\u07bf\u07fb-\u07ff\u082e\u082f\u083f\u085c\u085d\u085f-\u089f\u08b5-\u08e2\u0984\u098d\u098e\u0991\u0992\u09a9\u09b1\u09b3-\u09b5\u09ba\u09bb\u09c5\u09c6\u09c9\u09ca\u09cf-\u09d6\u09d8-\u09db\u09de\u09e4\u09e5\u09fc-\u0a00\u0a04\u0a0b-\u0a0e\u0a11\u0a12\u0a29\u0a31\u0a34\u0a37\u0a3a\u0a3b\u0a3d\u0a43-\u0a46\u0a49\u0a4a\u0a4e-\u0a50\u0a52-\u0a58\u0a5d\u0a5f-\u0a65\u0a76-\u0a80\u0a84\u0a8e\u0a92\u0aa9\u0ab1\u0ab4\u0aba\u0abb\u0ac6\u0aca\u0ace\u0acf\u0ad1-\u0adf\u0ae4\u0ae5\u0af2-\u0af8\u0afa-\u0b00\u0b04\u0b0d\u0b0e\u0b11\u0b12\u0b29\u0b31\u0b34\u0b3a\u0b3b\u0b45\u0b46\u0b49\u0b4a\u0b4e-\u0b55\u0b58-\u0b5b\u0b5e\u0b64\u0b65\u0b78-\u0b81\u0b84\u0b8b-\u0b8d\u0b91\u0b96-\u0b98\u0b9b\u0b9d\u0ba0-\u0ba2\u0ba5-\u0ba7\u0bab-\u0bad\u0bba-\u0bbd\u0bc3-\u0bc5\u0bc9\u0bce\u0bcf\u0bd1-\u0bd6\u0bd8-\u0be5\u0bfb-\u0bff\u0c04\u0c0d\u0c11\u0c29\u0c3a-\u0c3c\u0c45\u0c49\u0c4e-\u0c54\u0c57\u0c5b-\u0c5f\u0c64\u0c65\u0c70-\u0c77\u0c80\u0c84\u0c8d\u0c91\u0ca9\u0cb4\u0cba\u0cbb\u0cc5\u0cc9\u0cce-\u0cd4\u0cd7-\u0cdd\u0cdf\u0ce4\u0ce5\u0cf0\u0cf3-\u0d00\u0d04\u0d0d\u0d11\u0d3b\u0d3c\u0d45\u0d49\u0d4f-\u0d56\u0d58-\u0d5e\u0d64\u0d65\u0d76-\u0d78\u0d80\u0d81\u0d84\u0d97-\u0d99\u0db2\u0dbc\u0dbe\u0dbf\u0dc7-\u0dc9\u0dcb-\u0dce\u0dd5\u0dd7\u0de0-\u0de5\u0df0\u0df1\u0df5-\u0e00\u0e3b-\u0e3e\u0e5c-\u0e80\u0e83\u0e85\u0e86\u0e89\u0e8b\u0e8c\u0e8e-\u0e93\u0e98\u0ea0\u0ea4\u0ea6\u0ea8\u0ea9\u0eac\u0eba\u0ebe\u0ebf\u0ec5\u0ec7\u0ece\u0ecf\u0eda\u0edb\u0ee0-\u0eff\u0f48\u0f6d-\u0f70\u0f98\u0fbd\u0fcd\u0fdb-\u0fff\u10c6\u10c8-\u10cc\u10ce\u10cf\u1249\u124e\u124f\u1257\u1259\u125e\u125f\u1289\u128e\u128f\u12b1\u12b6\u12b7\u12bf\u12c1\u12c6\u12c7\u12d7\u1311\u1316\u1317\u135b\u135c\u137d-\u137f\u139a-\u139f\u13f6\u13f7\u13fe\u13ff\u169d-\u169f\u16f9-\u16ff\u170d\u1715-\u171f\u1737-\u173f\u1754-\u175f\u176d\u1771\u1774-\u177f\u17de\u17df\u17ea-\u17ef\u17fa-\u17ff\u180e\u180f\u181a-\u181f\u1878-\u187f\u18ab-\u18af\u18f6-\u18ff\u191f\u192c-\u192f\u193c-\u193f\u1941-\u1943\u196e\u196f\u1975-\u197f\u19ac-\u19af\u19ca-\u19cf\u19db-\u19dd\u1a1c\u1a1d\u1a5f\u1a7d\u1a7e\u1a8a-\u1a8f\u1a9a-\u1a9f\u1aae\u1aaf\u1abf-\u1aff\u1b4c-\u1b4f\u1b7d-\u1b7f\u1bf4-\u1bfb\u1c38-\u1c3a\u1c4a-\u1c4c\u1c80-\u1cbf\u1cc8-\u1ccf\u1cf7\u1cfa-\u1cff\u1df6-\u1dfb\u1f16\u1f17\u1f1e\u1f1f\u1f46\u1f47\u1f4e\u1f4f\u1f58\u1f5a\u1f5c\u1f5e\u1f7e\u1f7f\u1fb5\u1fc5\u1fd4\u1fd5\u1fdc\u1ff0\u1ff1\u1ff5\u1fff\u200b-\u200f\u202a-\u202e\u2060-\u206f\u2072\u2073\u208f\u209d-\u209f\u20bf-\u20cf\u20f1-\u20ff\u218c-\u218f\u23fb-\u23ff\u2427-\u243f\u244b-\u245f\u2b74\u2b75\u2b96\u2b97\u2bba-\u2bbc\u2bc9\u2bd2-\u2beb\u2bf0-\u2bff\u2c2f\u2c5f\u2cf4-\u2cf8\u2d26\u2d28-\u2d2c\u2d2e\u2d2f\u2d68-\u2d6e\u2d71-\u2d7e\u2d97-\u2d9f\u2da7\u2daf\u2db7\u2dbf\u2dc7\u2dcf\u2dd7\u2ddf\u2e43-\u2e7f\u2e9a\u2ef4-\u2eff\u2fd6-\u2fef\u2ffc-\u2fff\u3040\u3097\u3098\u3100-\u3104\u312e-\u3130\u318f\u31bb-\u31bf\u31e4-\u31ef\u321f\u32ff\u4db6-\u4dbf\u9fd6-\u9fff\ua48d-\ua48f\ua4c7-\ua4cf\ua62c-\ua63f\ua6f8-\ua6ff\ua7ae\ua7af\ua7b8-\ua7f6\ua82c-\ua82f\ua83a-\ua83f\ua878-\ua87f\ua8c5-\ua8cd\ua8da-\ua8df\ua8fe\ua8ff\ua954-\ua95e\ua97d-\ua97f\ua9ce\ua9da-\ua9dd\ua9ff\uaa37-\uaa3f\uaa4e\uaa4f\uaa5a\uaa5b\uaac3-\uaada\uaaf7-\uab00\uab07\uab08\uab0f\uab10\uab17-\uab1f\uab27\uab2f\uab66-\uab6f\uabee\uabef\uabfa-\uabff\ud7a4-\ud7af\ud7c7-\ud7ca\ud7fc-\uf8ff\ufa6e\ufa6f\ufada-\ufaff\ufb07-\ufb12\ufb18-\ufb1c\ufb37\ufb3d\ufb3f\ufb42\ufb45\ufbc2-\ufbd2\ufd40-\ufd4f\ufd90\ufd91\ufdc8-\ufdef\ufdfe\ufdff\ufe1a-\ufe1f\ufe53\ufe67\ufe6c-\ufe6f\ufe75\ufefd-\uff00\uffbf-\uffc1\uffc8\uffc9\uffd0\uffd1\uffd8\uffd9\uffdd-\uffdf\uffe7\uffef-\ufffb\ufffe\uffff",
astral: "\ufffd[\ufffd-\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd\ufffd\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd]|\ufffd[\ufffd\ufffd-\ufffd\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd]|\ufffd[\ufffd\ufffd]|\ufffd[\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd]|\ufffd[\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd]|\ufffd[\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd]|\ufffd[\ufffd\ufffd\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd]|[\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd][\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd]|\ufffd[\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd]|\ufffd[\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd]|\ufffd[\ufffd\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd]"
}, {
name: "Cc",
alias: "Control",
bmp: "\x00--\x9f"
}, {
name: "Cf",
alias: "Format",
bmp: "\xad\u0600-\u0605\u061c\u06dd\u070f\u180e\u200b-\u200f\u202a-\u202e\u2060-\u2064\u2066-\u206f\ufeff\ufff9-\ufffb",
astral: "\ufffd[\ufffd\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd]|\ud804\udcbd"
}, {
name: "Cn",
alias: "Unassigned",
bmp: "\u0378\u0379\u0380-\u0383\u038b\u038d\u03a2\u0530\u0557\u0558\u0560\u0588\u058b\u058c\u0590\u05c8-\u05cf\u05eb-\u05ef\u05f5-\u05ff\u061d\u070e\u074b\u074c\u07b2-\u07bf\u07fb-\u07ff\u082e\u082f\u083f\u085c\u085d\u085f-\u089f\u08b5-\u08e2\u0984\u098d\u098e\u0991\u0992\u09a9\u09b1\u09b3-\u09b5\u09ba\u09bb\u09c5\u09c6\u09c9\u09ca\u09cf-\u09d6\u09d8-\u09db\u09de\u09e4\u09e5\u09fc-\u0a00\u0a04\u0a0b-\u0a0e\u0a11\u0a12\u0a29\u0a31\u0a34\u0a37\u0a3a\u0a3b\u0a3d\u0a43-\u0a46\u0a49\u0a4a\u0a4e-\u0a50\u0a52-\u0a58\u0a5d\u0a5f-\u0a65\u0a76-\u0a80\u0a84\u0a8e\u0a92\u0aa9\u0ab1\u0ab4\u0aba\u0abb\u0ac6\u0aca\u0ace\u0acf\u0ad1-\u0adf\u0ae4\u0ae5\u0af2-\u0af8\u0afa-\u0b00\u0b04\u0b0d\u0b0e\u0b11\u0b12\u0b29\u0b31\u0b34\u0b3a\u0b3b\u0b45\u0b46\u0b49\u0b4a\u0b4e-\u0b55\u0b58-\u0b5b\u0b5e\u0b64\u0b65\u0b78-\u0b81\u0b84\u0b8b-\u0b8d\u0b91\u0b96-\u0b98\u0b9b\u0b9d\u0ba0-\u0ba2\u0ba5-\u0ba7\u0bab-\u0bad\u0bba-\u0bbd\u0bc3-\u0bc5\u0bc9\u0bce\u0bcf\u0bd1-\u0bd6\u0bd8-\u0be5\u0bfb-\u0bff\u0c04\u0c0d\u0c11\u0c29\u0c3a-\u0c3c\u0c45\u0c49\u0c4e-\u0c54\u0c57\u0c5b-\u0c5f\u0c64\u0c65\u0c70-\u0c77\u0c80\u0c84\u0c8d\u0c91\u0ca9\u0cb4\u0cba\u0cbb\u0cc5\u0cc9\u0cce-\u0cd4\u0cd7-\u0cdd\u0cdf\u0ce4\u0ce5\u0cf0\u0cf3-\u0d00\u0d04\u0d0d\u0d11\u0d3b\u0d3c\u0d45\u0d49\u0d4f-\u0d56\u0d58-\u0d5e\u0d64\u0d65\u0d76-\u0d78\u0d80\u0d81\u0d84\u0d97-\u0d99\u0db2\u0dbc\u0dbe\u0dbf\u0dc7-\u0dc9\u0dcb-\u0dce\u0dd5\u0dd7\u0de0-\u0de5\u0df0\u0df1\u0df5-\u0e00\u0e3b-\u0e3e\u0e5c-\u0e80\u0e83\u0e85\u0e86\u0e89\u0e8b\u0e8c\u0e8e-\u0e93\u0e98\u0ea0\u0ea4\u0ea6\u0ea8\u0ea9\u0eac\u0eba\u0ebe\u0ebf\u0ec5\u0ec7\u0ece\u0ecf\u0eda\u0edb\u0ee0-\u0eff\u0f48\u0f6d-\u0f70\u0f98\u0fbd\u0fcd\u0fdb-\u0fff\u10c6\u10c8-\u10cc\u10ce\u10cf\u1249\u124e\u124f\u1257\u1259\u125e\u125f\u1289\u128e\u128f\u12b1\u12b6\u12b7\u12bf\u12c1\u12c6\u12c7\u12d7\u1311\u1316\u1317\u135b\u135c\u137d-\u137f\u139a-\u139f\u13f6\u13f7\u13fe\u13ff\u169d-\u169f\u16f9-\u16ff\u170d\u1715-\u171f\u1737-\u173f\u1754-\u175f\u176d\u1771\u1774-\u177f\u17de\u17df\u17ea-\u17ef\u17fa-\u17ff\u180f\u181a-\u181f\u1878-\u187f\u18ab-\u18af\u18f6-\u18ff\u191f\u192c-\u192f\u193c-\u193f\u1941-\u1943\u196e\u196f\u1975-\u197f\u19ac-\u19af\u19ca-\u19cf\u19db-\u19dd\u1a1c\u1a1d\u1a5f\u1a7d\u1a7e\u1a8a-\u1a8f\u1a9a-\u1a9f\u1aae\u1aaf\u1abf-\u1aff\u1b4c-\u1b4f\u1b7d-\u1b7f\u1bf4-\u1bfb\u1c38-\u1c3a\u1c4a-\u1c4c\u1c80-\u1cbf\u1cc8-\u1ccf\u1cf7\u1cfa-\u1cff\u1df6-\u1dfb\u1f16\u1f17\u1f1e\u1f1f\u1f46\u1f47\u1f4e\u1f4f\u1f58\u1f5a\u1f5c\u1f5e\u1f7e\u1f7f\u1fb5\u1fc5\u1fd4\u1fd5\u1fdc\u1ff0\u1ff1\u1ff5\u1fff\u2065\u2072\u2073\u208f\u209d-\u209f\u20bf-\u20cf\u20f1-\u20ff\u218c-\u218f\u23fb-\u23ff\u2427-\u243f\u244b-\u245f\u2b74\u2b75\u2b96\u2b97\u2bba-\u2bbc\u2bc9\u2bd2-\u2beb\u2bf0-\u2bff\u2c2f\u2c5f\u2cf4-\u2cf8\u2d26\u2d28-\u2d2c\u2d2e\u2d2f\u2d68-\u2d6e\u2d71-\u2d7e\u2d97-\u2d9f\u2da7\u2daf\u2db7\u2dbf\u2dc7\u2dcf\u2dd7\u2ddf\u2e43-\u2e7f\u2e9a\u2ef4-\u2eff\u2fd6-\u2fef\u2ffc-\u2fff\u3040\u3097\u3098\u3100-\u3104\u312e-\u3130\u318f\u31bb-\u31bf\u31e4-\u31ef\u321f\u32ff\u4db6-\u4dbf\u9fd6-\u9fff\ua48d-\ua48f\ua4c7-\ua4cf\ua62c-\ua63f\ua6f8-\ua6ff\ua7ae\ua7af\ua7b8-\ua7f6\ua82c-\ua82f\ua83a-\ua83f\ua878-\ua87f\ua8c5-\ua8cd\ua8da-\ua8df\ua8fe\ua8ff\ua954-\ua95e\ua97d-\ua97f\ua9ce\ua9da-\ua9dd\ua9ff\uaa37-\uaa3f\uaa4e\uaa4f\uaa5a\uaa5b\uaac3-\uaada\uaaf7-\uab00\uab07\uab08\uab0f\uab10\uab17-\uab1f\uab27\uab2f\uab66-\uab6f\uabee\uabef\uabfa-\uabff\ud7a4-\ud7af\ud7c7-\ud7ca\ud7fc-\ud7ff\ufa6e\ufa6f\ufada-\ufaff\ufb07-\ufb12\ufb18-\ufb1c\ufb37\ufb3d\ufb3f\ufb42\ufb45\ufbc2-\ufbd2\ufd40-\ufd4f\ufd90\ufd91\ufdc8-\ufdef\ufdfe\ufdff\ufe1a-\ufe1f\ufe53\ufe67\ufe6c-\ufe6f\ufe75\ufefd\ufefe\uff00\uffbf-\uffc1\uffc8\uffc9\uffd0\uffd1\uffd8\uffd9\uffdd-\uffdf\uffe7\uffef-\ufff8\ufffe\uffff",
astral: "\ufffd[\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd]|\ufffd[\ufffd\ufffd-\ufffd\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd]|\ufffd[\ufffd\ufffd]|\ufffd[\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd]|\ufffd[\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd]|\ufffd[\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd]|[\ufffd\ufffd][\ufffd\ufffd]|\ufffd[\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd-\ufffd]|\ufffd[\ufffd\ufffd\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd]|[\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd][\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd]|\ufffd[\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd]|\ufffd[\ufffd-\ufffd\ufffd\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd]|\ufffd[\ufffd\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd]"
}, {
name: "Co",
alias: "Private_Use",
bmp: "\ue000-\uf8ff",
astral: "[\ufffd-\ufffd\ufffd-\ufffd][\ufffd-\ufffd]|[\ufffd\ufffd][\ufffd-\ufffd]"
}, {
name: "Cs",
alias: "Surrogate",
bmp: "\ufffd-\ufffd"
}, {
name: "L",
alias: "Letter",
bmp: "A-Za-z\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u037f\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u052f\u0531-\u0556\u0559\u0561-\u0587\u05d0-\u05ea\u05f0-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u08a0-\u08b4\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0af9\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d\u0c58-\u0c5a\u0c60\u0c61\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d5f-\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f5\u13f8-\u13fd\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16f1-\u16f8\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191e\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1ce9-\u1cec\u1cee-\u1cf1\u1cf5\u1cf6\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2183\u2184\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2e2f\u3005\u3006\u3031-\u3035\u303b\u303c\u3041-\u3096\u309d-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fd5\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua69d\ua6a0-\ua6e5\ua717-\ua71f\ua722-\ua788\ua78b-\ua7ad\ua7b0-\ua7b7\ua7f7-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua8fd\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\ua9e0-\ua9e4\ua9e6-\ua9ef\ua9fa-\ua9fe\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa7e-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uab30-\uab5a\uab5c-\uab65\uab70-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc",
astral: "\ufffd[\ufffd-\ufffd\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd\ufffd\ufffd-\ufffd]|[\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd][\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd\ufffd\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd]|\ufffd[\ufffd\ufffd]|\ufffd[\ufffd-\ufffd]"
}, {
name: "Ll",
alias: "Lowercase_Letter",
bmp: "a-z\xb5\xdf-\xf6\xf8-\xff\u0101\u0103\u0105\u0107\u0109\u010b\u010d\u010f\u0111\u0113\u0115\u0117\u0119\u011b\u011d\u011f\u0121\u0123\u0125\u0127\u0129\u012b\u012d\u012f\u0131\u0133\u0135\u0137\u0138\u013a\u013c\u013e\u0140\u0142\u0144\u0146\u0148\u0149\u014b\u014d\u014f\u0151\u0153\u0155\u0157\u0159\u015b\u015d\u015f\u0161\u0163\u0165\u0167\u0169\u016b\u016d\u016f\u0171\u0173\u0175\u0177\u017a\u017c\u017e-\u0180\u0183\u0185\u0188\u018c\u018d\u0192\u0195\u0199-\u019b\u019e\u01a1\u01a3\u01a5\u01a8\u01aa\u01ab\u01ad\u01b0\u01b4\u01b6\u01b9\u01ba\u01bd-\u01bf\u01c6\u01c9\u01cc\u01ce\u01d0\u01d2\u01d4\u01d6\u01d8\u01da\u01dc\u01dd\u01df\u01e1\u01e3\u01e5\u01e7\u01e9\u01eb\u01ed\u01ef\u01f0\u01f3\u01f5\u01f9\u01fb\u01fd\u01ff\u0201\u0203\u0205\u0207\u0209\u020b\u020d\u020f\u0211\u0213\u0215\u0217\u0219\u021b\u021d\u021f\u0221\u0223\u0225\u0227\u0229\u022b\u022d\u022f\u0231\u0233-\u0239\u023c\u023f\u0240\u0242\u0247\u0249\u024b\u024d\u024f-\u0293\u0295-\u02af\u0371\u0373\u0377\u037b-\u037d\u0390\u03ac-\u03ce\u03d0\u03d1\u03d5-\u03d7\u03d9\u03db\u03dd\u03df\u03e1\u03e3\u03e5\u03e7\u03e9\u03eb\u03ed\u03ef-\u03f3\u03f5\u03f8\u03fb\u03fc\u0430-\u045f\u0461\u0463\u0465\u0467\u0469\u046b\u046d\u046f\u0471\u0473\u0475\u0477\u0479\u047b\u047d\u047f\u0481\u048b\u048d\u048f\u0491\u0493\u0495\u0497\u0499\u049b\u049d\u049f\u04a1\u04a3\u04a5\u04a7\u04a9\u04ab\u04ad\u04af\u04b1\u04b3\u04b5\u04b7\u04b9\u04bb\u04bd\u04bf\u04c2\u04c4\u04c6\u04c8\u04ca\u04cc\u04ce\u04cf\u04d1\u04d3\u04d5\u04d7\u04d9\u04db\u04dd\u04df\u04e1\u04e3\u04e5\u04e7\u04e9\u04eb\u04ed\u04ef\u04f1\u04f3\u04f5\u04f7\u04f9\u04fb\u04fd\u04ff\u0501\u0503\u0505\u0507\u0509\u050b\u050d\u050f\u0511\u0513\u0515\u0517\u0519\u051b\u051d\u051f\u0521\u0523\u0525\u0527\u0529\u052b\u052d\u052f\u0561-\u0587\u13f8-\u13fd\u1d00-\u1d2b\u1d6b-\u1d77\u1d79-\u1d9a\u1e01\u1e03\u1e05\u1e07\u1e09\u1e0b\u1e0d\u1e0f\u1e11\u1e13\u1e15\u1e17\u1e19\u1e1b\u1e1d\u1e1f\u1e21\u1e23\u1e25\u1e27\u1e29\u1e2b\u1e2d\u1e2f\u1e31\u1e33\u1e35\u1e37\u1e39\u1e3b\u1e3d\u1e3f\u1e41\u1e43\u1e45\u1e47\u1e49\u1e4b\u1e4d\u1e4f\u1e51\u1e53\u1e55\u1e57\u1e59\u1e5b\u1e5d\u1e5f\u1e61\u1e63\u1e65\u1e67\u1e69\u1e6b\u1e6d\u1e6f\u1e71\u1e73\u1e75\u1e77\u1e79\u1e7b\u1e7d\u1e7f\u1e81\u1e83\u1e85\u1e87\u1e89\u1e8b\u1e8d\u1e8f\u1e91\u1e93\u1e95-\u1e9d\u1e9f\u1ea1\u1ea3\u1ea5\u1ea7\u1ea9\u1eab\u1ead\u1eaf\u1eb1\u1eb3\u1eb5\u1eb7\u1eb9\u1ebb\u1ebd\u1ebf\u1ec1\u1ec3\u1ec5\u1ec7\u1ec9\u1ecb\u1ecd\u1ecf\u1ed1\u1ed3\u1ed5\u1ed7\u1ed9\u1edb\u1edd\u1edf\u1ee1\u1ee3\u1ee5\u1ee7\u1ee9\u1eeb\u1eed\u1eef\u1ef1\u1ef3\u1ef5\u1ef7\u1ef9\u1efb\u1efd\u1eff-\u1f07\u1f10-\u1f15\u1f20-\u1f27\u1f30-\u1f37\u1f40-\u1f45\u1f50-\u1f57\u1f60-\u1f67\u1f70-\u1f7d\u1f80-\u1f87\u1f90-\u1f97\u1fa0-\u1fa7\u1fb0-\u1fb4\u1fb6\u1fb7\u1fbe\u1fc2-\u1fc4\u1fc6\u1fc7\u1fd0-\u1fd3\u1fd6\u1fd7\u1fe0-\u1fe7\u1ff2-\u1ff4\u1ff6\u1ff7\u210a\u210e\u210f\u2113\u212f\u2134\u2139\u213c\u213d\u2146-\u2149\u214e\u2184\u2c30-\u2c5e\u2c61\u2c65\u2c66\u2c68\u2c6a\u2c6c\u2c71\u2c73\u2c74\u2c76-\u2c7b\u2c81\u2c83\u2c85\u2c87\u2c89\u2c8b\u2c8d\u2c8f\u2c91\u2c93\u2c95\u2c97\u2c99\u2c9b\u2c9d\u2c9f\u2ca1\u2ca3\u2ca5\u2ca7\u2ca9\u2cab\u2cad\u2caf\u2cb1\u2cb3\u2cb5\u2cb7\u2cb9\u2cbb\u2cbd\u2cbf\u2cc1\u2cc3\u2cc5\u2cc7\u2cc9\u2ccb\u2ccd\u2ccf\u2cd1\u2cd3\u2cd5\u2cd7\u2cd9\u2cdb\u2cdd\u2cdf\u2ce1\u2ce3\u2ce4\u2cec\u2cee\u2cf3\u2d00-\u2d25\u2d27\u2d2d\ua641\ua643\ua645\ua647\ua649\ua64b\ua64d\ua64f\ua651\ua653\ua655\ua657\ua659\ua65b\ua65d\ua65f\ua661\ua663\ua665\ua667\ua669\ua66b\ua66d\ua681\ua683\ua685\ua687\ua689\ua68b\ua68d\ua68f\ua691\ua693\ua695\ua697\ua699\ua69b\ua723\ua725\ua727\ua729\ua72b\ua72d\ua72f-\ua731\ua733\ua735\ua737\ua739\ua73b\ua73d\ua73f\ua741\ua743\ua745\ua747\ua749\ua74b\ua74d\ua74f\ua751\ua753\ua755\ua757\ua759\ua75b\ua75d\ua75f\ua761\ua763\ua765\ua767\ua769\ua76b\ua76d\ua76f\ua771-\ua778\ua77a\ua77c\ua77f\ua781\ua783\ua785\ua787\ua78c\ua78e\ua791\ua793-\ua795\ua797\ua799\ua79b\ua79d\ua79f\ua7a1\ua7a3\ua7a5\ua7a7\ua7a9\ua7b5\ua7b7\ua7fa\uab30-\uab5a\uab60-\uab65\uab70-\uabbf\ufb00-\ufb06\ufb13-\ufb17\uff41-\uff5a",
astral: "\ufffd[\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd]|\ufffd[\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd]"
}, {
name: "Lm",
alias: "Modifier_Letter",
bmp: "\u02b0-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0374\u037a\u0559\u0640\u06e5\u06e6\u07f4\u07f5\u07fa\u081a\u0824\u0828\u0971\u0e46\u0ec6\u10fc\u17d7\u1843\u1aa7\u1c78-\u1c7d\u1d2c-\u1d6a\u1d78\u1d9b-\u1dbf\u2071\u207f\u2090-\u209c\u2c7c\u2c7d\u2d6f\u2e2f\u3005\u3031-\u3035\u303b\u309d\u309e\u30fc-\u30fe\ua015\ua4f8-\ua4fd\ua60c\ua67f\ua69c\ua69d\ua717-\ua71f\ua770\ua788\ua7f8\ua7f9\ua9cf\ua9e6\uaa70\uaadd\uaaf3\uaaf4\uab5c-\uab5f\uff70\uff9e\uff9f",
astral: "\ufffd[\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd]"
}, {
name: "Lo",
alias: "Other_Letter",
bmp: "\xaa\xba\u01bb\u01c0-\u01c3\u0294\u05d0-\u05ea\u05f0-\u05f2\u0620-\u063f\u0641-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u0800-\u0815\u0840-\u0858\u08a0-\u08b4\u0904-\u0939\u093d\u0950\u0958-\u0961\u0972-\u0980\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0af9\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d\u0c58-\u0c5a\u0c60\u0c61\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d5f-\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e45\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10d0-\u10fa\u10fd-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16f1-\u16f8\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17dc\u1820-\u1842\u1844-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191e\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u1a00-\u1a16\u1a20-\u1a54\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c77\u1ce9-\u1cec\u1cee-\u1cf1\u1cf5\u1cf6\u2135-\u2138\u2d30-\u2d67\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u3006\u303c\u3041-\u3096\u309f\u30a1-\u30fa\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fd5\ua000-\ua014\ua016-\ua48c\ua4d0-\ua4f7\ua500-\ua60b\ua610-\ua61f\ua62a\ua62b\ua66e\ua6a0-\ua6e5\ua78f\ua7f7\ua7fb-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua8fd\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9e0-\ua9e4\ua9e7-\ua9ef\ua9fa-\ua9fe\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa6f\uaa71-\uaa76\uaa7a\uaa7e-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb\uaadc\uaae0-\uaaea\uaaf2\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uabc0-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff66-\uff6f\uff71-\uff9d\uffa0-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc",
astral: "\ufffd[\ufffd-\ufffd\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd\ufffd]|[\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd][\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd]|\ufffd[\ufffd\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd]|\ufffd[\ufffd\ufffd]|\ufffd[\ufffd-\ufffd]"
}, {
name: "Lt",
alias: "Titlecase_Letter",
bmp: "\u01c5\u01c8\u01cb\u01f2\u1f88-\u1f8f\u1f98-\u1f9f\u1fa8-\u1faf\u1fbc\u1fcc\u1ffc"
}, {
name: "Lu",
alias: "Uppercase_Letter",
bmp: "A-Z\xc0-\xd6\xd8-\xde\u0100\u0102\u0104\u0106\u0108\u010a\u010c\u010e\u0110\u0112\u0114\u0116\u0118\u011a\u011c\u011e\u0120\u0122\u0124\u0126\u0128\u012a\u012c\u012e\u0130\u0132\u0134\u0136\u0139\u013b\u013d\u013f\u0141\u0143\u0145\u0147\u014a\u014c\u014e\u0150\u0152\u0154\u0156\u0158\u015a\u015c\u015e\u0160\u0162\u0164\u0166\u0168\u016a\u016c\u016e\u0170\u0172\u0174\u0176\u0178\u0179\u017b\u017d\u0181\u0182\u0184\u0186\u0187\u0189-\u018b\u018e-\u0191\u0193\u0194\u0196-\u0198\u019c\u019d\u019f\u01a0\u01a2\u01a4\u01a6\u01a7\u01a9\u01ac\u01ae\u01af\u01b1-\u01b3\u01b5\u01b7\u01b8\u01bc\u01c4\u01c7\u01ca\u01cd\u01cf\u01d1\u01d3\u01d5\u01d7\u01d9\u01db\u01de\u01e0\u01e2\u01e4\u01e6\u01e8\u01ea\u01ec\u01ee\u01f1\u01f4\u01f6-\u01f8\u01fa\u01fc\u01fe\u0200\u0202\u0204\u0206\u0208\u020a\u020c\u020e\u0210\u0212\u0214\u0216\u0218\u021a\u021c\u021e\u0220\u0222\u0224\u0226\u0228\u022a\u022c\u022e\u0230\u0232\u023a\u023b\u023d\u023e\u0241\u0243-\u0246\u0248\u024a\u024c\u024e\u0370\u0372\u0376\u037f\u0386\u0388-\u038a\u038c\u038e\u038f\u0391-\u03a1\u03a3-\u03ab\u03cf\u03d2-\u03d4\u03d8\u03da\u03dc\u03de\u03e0\u03e2\u03e4\u03e6\u03e8\u03ea\u03ec\u03ee\u03f4\u03f7\u03f9\u03fa\u03fd-\u042f\u0460\u0462\u0464\u0466\u0468\u046a\u046c\u046e\u0470\u0472\u0474\u0476\u0478\u047a\u047c\u047e\u0480\u048a\u048c\u048e\u0490\u0492\u0494\u0496\u0498\u049a\u049c\u049e\u04a0\u04a2\u04a4\u04a6\u04a8\u04aa\u04ac\u04ae\u04b0\u04b2\u04b4\u04b6\u04b8\u04ba\u04bc\u04be\u04c0\u04c1\u04c3\u04c5\u04c7\u04c9\u04cb\u04cd\u04d0\u04d2\u04d4\u04d6\u04d8\u04da\u04dc\u04de\u04e0\u04e2\u04e4\u04e6\u04e8\u04ea\u04ec\u04ee\u04f0\u04f2\u04f4\u04f6\u04f8\u04fa\u04fc\u04fe\u0500\u0502\u0504\u0506\u0508\u050a\u050c\u050e\u0510\u0512\u0514\u0516\u0518\u051a\u051c\u051e\u0520\u0522\u0524\u0526\u0528\u052a\u052c\u052e\u0531-\u0556\u10a0-\u10c5\u10c7\u10cd\u13a0-\u13f5\u1e00\u1e02\u1e04\u1e06\u1e08\u1e0a\u1e0c\u1e0e\u1e10\u1e12\u1e14\u1e16\u1e18\u1e1a\u1e1c\u1e1e\u1e20\u1e22\u1e24\u1e26\u1e28\u1e2a\u1e2c\u1e2e\u1e30\u1e32\u1e34\u1e36\u1e38\u1e3a\u1e3c\u1e3e\u1e40\u1e42\u1e44\u1e46\u1e48\u1e4a\u1e4c\u1e4e\u1e50\u1e52\u1e54\u1e56\u1e58\u1e5a\u1e5c\u1e5e\u1e60\u1e62\u1e64\u1e66\u1e68\u1e6a\u1e6c\u1e6e\u1e70\u1e72\u1e74\u1e76\u1e78\u1e7a\u1e7c\u1e7e\u1e80\u1e82\u1e84\u1e86\u1e88\u1e8a\u1e8c\u1e8e\u1e90\u1e92\u1e94\u1e9e\u1ea0\u1ea2\u1ea4\u1ea6\u1ea8\u1eaa\u1eac\u1eae\u1eb0\u1eb2\u1eb4\u1eb6\u1eb8\u1eba\u1ebc\u1ebe\u1ec0\u1ec2\u1ec4\u1ec6\u1ec8\u1eca\u1ecc\u1ece\u1ed0\u1ed2\u1ed4\u1ed6\u1ed8\u1eda\u1edc\u1ede\u1ee0\u1ee2\u1ee4\u1ee6\u1ee8\u1eea\u1eec\u1eee\u1ef0\u1ef2\u1ef4\u1ef6\u1ef8\u1efa\u1efc\u1efe\u1f08-\u1f0f\u1f18-\u1f1d\u1f28-\u1f2f\u1f38-\u1f3f\u1f48-\u1f4d\u1f59\u1f5b\u1f5d\u1f5f\u1f68-\u1f6f\u1fb8-\u1fbb\u1fc8-\u1fcb\u1fd8-\u1fdb\u1fe8-\u1fec\u1ff8-\u1ffb\u2102\u2107\u210b-\u210d\u2110-\u2112\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u2130-\u2133\u213e\u213f\u2145\u2183\u2c00-\u2c2e\u2c60\u2c62-\u2c64\u2c67\u2c69\u2c6b\u2c6d-\u2c70\u2c72\u2c75\u2c7e-\u2c80\u2c82\u2c84\u2c86\u2c88\u2c8a\u2c8c\u2c8e\u2c90\u2c92\u2c94\u2c96\u2c98\u2c9a\u2c9c\u2c9e\u2ca0\u2ca2\u2ca4\u2ca6\u2ca8\u2caa\u2cac\u2cae\u2cb0\u2cb2\u2cb4\u2cb6\u2cb8\u2cba\u2cbc\u2cbe\u2cc0\u2cc2\u2cc4\u2cc6\u2cc8\u2cca\u2ccc\u2cce\u2cd0\u2cd2\u2cd4\u2cd6\u2cd8\u2cda\u2cdc\u2cde\u2ce0\u2ce2\u2ceb\u2ced\u2cf2\ua640\ua642\ua644\ua646\ua648\ua64a\ua64c\ua64e\ua650\ua652\ua654\ua656\ua658\ua65a\ua65c\ua65e\ua660\ua662\ua664\ua666\ua668\ua66a\ua66c\ua680\ua682\ua684\ua686\ua688\ua68a\ua68c\ua68e\ua690\ua692\ua694\ua696\ua698\ua69a\ua722\ua724\ua726\ua728\ua72a\ua72c\ua72e\ua732\ua734\ua736\ua738\ua73a\ua73c\ua73e\ua740\ua742\ua744\ua746\ua748\ua74a\ua74c\ua74e\ua750\ua752\ua754\ua756\ua758\ua75a\ua75c\ua75e\ua760\ua762\ua764\ua766\ua768\ua76a\ua76c\ua76e\ua779\ua77b\ua77d\ua77e\ua780\ua782\ua784\ua786\ua78b\ua78d\ua790\ua792\ua796\ua798\ua79a\ua79c\ua79e\ua7a0\ua7a2\ua7a4\ua7a6\ua7a8\ua7aa-\ua7ad\ua7b0-\ua7b4\ua7b6\uff21-\uff3a",
astral: "\ufffd[\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd]"
}, {
name: "M",
alias: "Mark",
bmp: "\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065f\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08e3-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0c00-\u0c03\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c81-\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d01-\u0d03\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d82\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f\u109a-\u109d\u135d-\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u192b\u1930-\u193b\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f\u1ab0-\u1abe\u1b00-\u1b04\u1b34-\u1b44\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1bad\u1be6-\u1bf3\u1c24-\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf2-\u1cf4\u1cf8\u1cf9\u1dc0-\u1df5\u1dfc-\u1dff\u20d0-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua674-\ua67d\ua69e\ua69f\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua880\ua881\ua8b4-\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\ua9e5\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa7b-\uaa7d\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uaaeb-\uaaef\uaaf5\uaaf6\uabe3-\uabea\uabec\uabed\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f",
astral: "\ufffd[\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd\ufffd-\ufffd]|\ufffd[\ufffd\ufffd]|\ufffd[\ufffd\ufffd\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd]|\ufffd[\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd]"
}, {
name: "Mc",
alias: "Spacing_Mark",
bmp: "\u0903\u093b\u093e-\u0940\u0949-\u094c\u094e\u094f\u0982\u0983\u09be-\u09c0\u09c7\u09c8\u09cb\u09cc\u09d7\u0a03\u0a3e-\u0a40\u0a83\u0abe-\u0ac0\u0ac9\u0acb\u0acc\u0b02\u0b03\u0b3e\u0b40\u0b47\u0b48\u0b4b\u0b4c\u0b57\u0bbe\u0bbf\u0bc1\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcc\u0bd7\u0c01-\u0c03\u0c41-\u0c44\u0c82\u0c83\u0cbe\u0cc0-\u0cc4\u0cc7\u0cc8\u0cca\u0ccb\u0cd5\u0cd6\u0d02\u0d03\u0d3e-\u0d40\u0d46-\u0d48\u0d4a-\u0d4c\u0d57\u0d82\u0d83\u0dcf-\u0dd1\u0dd8-\u0ddf\u0df2\u0df3\u0f3e\u0f3f\u0f7f\u102b\u102c\u1031\u1038\u103b\u103c\u1056\u1057\u1062-\u1064\u1067-\u106d\u1083\u1084\u1087-\u108c\u108f\u109a-\u109c\u17b6\u17be-\u17c5\u17c7\u17c8\u1923-\u1926\u1929-\u192b\u1930\u1931\u1933-\u1938\u1a19\u1a1a\u1a55\u1a57\u1a61\u1a63\u1a64\u1a6d-\u1a72\u1b04\u1b35\u1b3b\u1b3d-\u1b41\u1b43\u1b44\u1b82\u1ba1\u1ba6\u1ba7\u1baa\u1be7\u1bea-\u1bec\u1bee\u1bf2\u1bf3\u1c24-\u1c2b\u1c34\u1c35\u1ce1\u1cf2\u1cf3\u302e\u302f\ua823\ua824\ua827\ua880\ua881\ua8b4-\ua8c3\ua952\ua953\ua983\ua9b4\ua9b5\ua9ba\ua9bb\ua9bd-\ua9c0\uaa2f\uaa30\uaa33\uaa34\uaa4d\uaa7b\uaa7d\uaaeb\uaaee\uaaef\uaaf5\uabe3\uabe4\uabe6\uabe7\uabe9\uabea\uabec",
astral: "\ufffd[\ufffd\ufffd\ufffd-\ufffd]|\ufffd[\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd]|\ufffd[\ufffd-\ufffd\ufffd\ufffd-\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd]|\ufffd[\ufffd-\ufffd]"
}, {
name: "Me",
alias: "Enclosing_Mark",
bmp: "\u0488\u0489\u1abe\u20dd-\u20e0\u20e2-\u20e4\ua670-\ua672"
}, {
name: "Mn",
alias: "Nonspacing_Mark",
bmp: "\u0300-\u036f\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065f\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08e3-\u0902\u093a\u093c\u0941-\u0948\u094d\u0951-\u0957\u0962\u0963\u0981\u09bc\u09c1-\u09c4\u09cd\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b62\u0b63\u0b82\u0bc0\u0bcd\u0c00\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c81\u0cbc\u0cbf\u0cc6\u0ccc\u0ccd\u0ce2\u0ce3\u0d01\u0d41-\u0d44\u0d4d\u0d62\u0d63\u0dca\u0dd2-\u0dd4\u0dd6\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135d-\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4\u17b5\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a1b\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1ab0-\u1abd\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1bab-\u1bad\u1be6\u1be8\u1be9\u1bed\u1bef-\u1bf1\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1cf4\u1cf8\u1cf9\u1dc0-\u1df5\u1dfc-\u1dff\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302d\u3099\u309a\ua66f\ua674-\ua67d\ua69e\ua69f\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\ua9e5\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaa7c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uaaec\uaaed\uaaf6\uabe5\uabe8\uabed\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f",
astral: "\ufffd[\ufffd-\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd]|\ufffd[\ufffd\ufffd]|\ufffd[\ufffd\ufffd\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd]|\ufffd[\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd]"
}, {
name: "N",
alias: "Number",
bmp: "0-9\xb2\xb3\xb9\xbc-\xbe\u0660-\u0669\u06f0-\u06f9\u07c0-\u07c9\u0966-\u096f\u09e6-\u09ef\u09f4-\u09f9\u0a66-\u0a6f\u0ae6-\u0aef\u0b66-\u0b6f\u0b72-\u0b77\u0be6-\u0bf2\u0c66-\u0c6f\u0c78-\u0c7e\u0ce6-\u0cef\u0d66-\u0d75\u0de6-\u0def\u0e50-\u0e59\u0ed0-\u0ed9\u0f20-\u0f33\u1040-\u1049\u1090-\u1099\u1369-\u137c\u16ee-\u16f0\u17e0-\u17e9\u17f0-\u17f9\u1810-\u1819\u1946-\u194f\u19d0-\u19da\u1a80-\u1a89\u1a90-\u1a99\u1b50-\u1b59\u1bb0-\u1bb9\u1c40-\u1c49\u1c50-\u1c59\u2070\u2074-\u2079\u2080-\u2089\u2150-\u2182\u2185-\u2189\u2460-\u249b\u24ea-\u24ff\u2776-\u2793\u2cfd\u3007\u3021-\u3029\u3038-\u303a\u3192-\u3195\u3220-\u3229\u3248-\u324f\u3251-\u325f\u3280-\u3289\u32b1-\u32bf\ua620-\ua629\ua6e6-\ua6ef\ua830-\ua835\ua8d0-\ua8d9\ua900-\ua909\ua9d0-\ua9d9\ua9f0-\ua9f9\uaa50-\uaa59\uabf0-\uabf9\uff10-\uff19",
astral: "\ufffd[\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd]"
}, {
name: "Nd",
alias: "Decimal_Number",
bmp: "0-9\u0660-\u0669\u06f0-\u06f9\u07c0-\u07c9\u0966-\u096f\u09e6-\u09ef\u0a66-\u0a6f\u0ae6-\u0aef\u0b66-\u0b6f\u0be6-\u0bef\u0c66-\u0c6f\u0ce6-\u0cef\u0d66-\u0d6f\u0de6-\u0def\u0e50-\u0e59\u0ed0-\u0ed9\u0f20-\u0f29\u1040-\u1049\u1090-\u1099\u17e0-\u17e9\u1810-\u1819\u1946-\u194f\u19d0-\u19d9\u1a80-\u1a89\u1a90-\u1a99\u1b50-\u1b59\u1bb0-\u1bb9\u1c40-\u1c49\u1c50-\u1c59\ua620-\ua629\ua8d0-\ua8d9\ua900-\ua909\ua9d0-\ua9d9\ua9f0-\ua9f9\uaa50-\uaa59\uabf0-\uabf9\uff10-\uff19",
astral: "\ufffd[\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd\ufffd-\ufffd]"
}, {
name: "Nl",
alias: "Letter_Number",
bmp: "\u16ee-\u16f0\u2160-\u2182\u2185-\u2188\u3007\u3021-\u3029\u3038-\u303a\ua6e6-\ua6ef",
astral: "\ufffd[\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd\ufffd\ufffd\ufffd-\ufffd]"
}, {
name: "No",
alias: "Other_Number",
bmp: "\xb2\xb3\xb9\xbc-\xbe\u09f4-\u09f9\u0b72-\u0b77\u0bf0-\u0bf2\u0c78-\u0c7e\u0d70-\u0d75\u0f2a-\u0f33\u1369-\u137c\u17f0-\u17f9\u19da\u2070\u2074-\u2079\u2080-\u2089\u2150-\u215f\u2189\u2460-\u249b\u24ea-\u24ff\u2776-\u2793\u2cfd\u3192-\u3195\u3220-\u3229\u3248-\u324f\u3251-\u325f\u3280-\u3289\u32b1-\u32bf\ua830-\ua835",
astral: "\ufffd[\ufffd-\ufffd\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd]|\ufffd[\ufffd\ufffd]|\ufffd[\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd]"
}, {
name: "P",
alias: "Punctuation",
bmp: "!-#%-\\x2A,-/:;\\x3F@\\x5B-\\x5D_\\x7B}\xa1\xa7\xab\xb6\xb7\xbb\xbf\u037e\u0387\u055a-\u055f\u0589\u058a\u05be\u05c0\u05c3\u05c6\u05f3\u05f4\u0609\u060a\u060c\u060d\u061b\u061e\u061f\u066a-\u066d\u06d4\u0700-\u070d\u07f7-\u07f9\u0830-\u083e\u085e\u0964\u0965\u0970\u0af0\u0df4\u0e4f\u0e5a\u0e5b\u0f04-\u0f12\u0f14\u0f3a-\u0f3d\u0f85\u0fd0-\u0fd4\u0fd9\u0fda\u104a-\u104f\u10fb\u1360-\u1368\u1400\u166d\u166e\u169b\u169c\u16eb-\u16ed\u1735\u1736\u17d4-\u17d6\u17d8-\u17da\u1800-\u180a\u1944\u1945\u1a1e\u1a1f\u1aa0-\u1aa6\u1aa8-\u1aad\u1b5a-\u1b60\u1bfc-\u1bff\u1c3b-\u1c3f\u1c7e\u1c7f\u1cc0-\u1cc7\u1cd3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205e\u207d\u207e\u208d\u208e\u2308-\u230b\u2329\u232a\u2768-\u2775\u27c5\u27c6\u27e6-\u27ef\u2983-\u2998\u29d8-\u29db\u29fc\u29fd\u2cf9-\u2cfc\u2cfe\u2cff\u2d70\u2e00-\u2e2e\u2e30-\u2e42\u3001-\u3003\u3008-\u3011\u3014-\u301f\u3030\u303d\u30a0\u30fb\ua4fe\ua4ff\ua60d-\ua60f\ua673\ua67e\ua6f2-\ua6f7\ua874-\ua877\ua8ce\ua8cf\ua8f8-\ua8fa\ua8fc\ua92e\ua92f\ua95f\ua9c1-\ua9cd\ua9de\ua9df\uaa5c-\uaa5f\uaade\uaadf\uaaf0\uaaf1\uabeb\ufd3e\ufd3f\ufe10-\ufe19\ufe30-\ufe52\ufe54-\ufe61\ufe63\ufe68\ufe6a\ufe6b\uff01-\uff03\uff05-\uff0a\uff0c-\uff0f\uff1a\uff1b\uff1f\uff20\uff3b-\uff3d\uff3f\uff5b\uff5d\uff5f-\uff65",
astral: "\ufffd[\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd]|\ufffd[\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd]|\ud801\udd6f|\ud82f\udc9f|\ufffd[\ufffd-\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd]|\ufffd[\ufffd-\ufffd\ufffd\ufffd]|\ufffd[\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd]"
}, {
name: "Pc",
alias: "Connector_Punctuation",
bmp: "_\u203f\u2040\u2054\ufe33\ufe34\ufe4d-\ufe4f\uff3f"
}, {
name: "Pd",
alias: "Dash_Punctuation",
bmp: "\\x2D\u058a\u05be\u1400\u1806\u2010-\u2015\u2e17\u2e1a\u2e3a\u2e3b\u2e40\u301c\u3030\u30a0\ufe31\ufe32\ufe58\ufe63\uff0d"
}, {
name: "Pe",
alias: "Close_Punctuation",
bmp: "\\x29\\x5D}\u0f3b\u0f3d\u169c\u2046\u207e\u208e\u2309\u230b\u232a\u2769\u276b\u276d\u276f\u2771\u2773\u2775\u27c6\u27e7\u27e9\u27eb\u27ed\u27ef\u2984\u2986\u2988\u298a\u298c\u298e\u2990\u2992\u2994\u2996\u2998\u29d9\u29db\u29fd\u2e23\u2e25\u2e27\u2e29\u3009\u300b\u300d\u300f\u3011\u3015\u3017\u3019\u301b\u301e\u301f\ufd3e\ufe18\ufe36\ufe38\ufe3a\ufe3c\ufe3e\ufe40\ufe42\ufe44\ufe48\ufe5a\ufe5c\ufe5e\uff09\uff3d\uff5d\uff60\uff63"
}, {
name: "Pf",
alias: "Final_Punctuation",
bmp: "\xbb\u2019\u201d\u203a\u2e03\u2e05\u2e0a\u2e0d\u2e1d\u2e21"
}, {
name: "Pi",
alias: "Initial_Punctuation",
bmp: "\xab\u2018\u201b\u201c\u201f\u2039\u2e02\u2e04\u2e09\u2e0c\u2e1c\u2e20"
}, {
name: "Po",
alias: "Other_Punctuation",
bmp: "!-#%-'\\x2A,\\x2E/:;\\x3F@\\x5C\xa1\xa7\xb6\xb7\xbf\u037e\u0387\u055a-\u055f\u0589\u05c0\u05c3\u05c6\u05f3\u05f4\u0609\u060a\u060c\u060d\u061b\u061e\u061f\u066a-\u066d\u06d4\u0700-\u070d\u07f7-\u07f9\u0830-\u083e\u085e\u0964\u0965\u0970\u0af0\u0df4\u0e4f\u0e5a\u0e5b\u0f04-\u0f12\u0f14\u0f85\u0fd0-\u0fd4\u0fd9\u0fda\u104a-\u104f\u10fb\u1360-\u1368\u166d\u166e\u16eb-\u16ed\u1735\u1736\u17d4-\u17d6\u17d8-\u17da\u1800-\u1805\u1807-\u180a\u1944\u1945\u1a1e\u1a1f\u1aa0-\u1aa6\u1aa8-\u1aad\u1b5a-\u1b60\u1bfc-\u1bff\u1c3b-\u1c3f\u1c7e\u1c7f\u1cc0-\u1cc7\u1cd3\u2016\u2017\u2020-\u2027\u2030-\u2038\u203b-\u203e\u2041-\u2043\u2047-\u2051\u2053\u2055-\u205e\u2cf9-\u2cfc\u2cfe\u2cff\u2d70\u2e00\u2e01\u2e06-\u2e08\u2e0b\u2e0e-\u2e16\u2e18\u2e19\u2e1b\u2e1e\u2e1f\u2e2a-\u2e2e\u2e30-\u2e39\u2e3c-\u2e3f\u2e41\u3001-\u3003\u303d\u30fb\ua4fe\ua4ff\ua60d-\ua60f\ua673\ua67e\ua6f2-\ua6f7\ua874-\ua877\ua8ce\ua8cf\ua8f8-\ua8fa\ua8fc\ua92e\ua92f\ua95f\ua9c1-\ua9cd\ua9de\ua9df\uaa5c-\uaa5f\uaade\uaadf\uaaf0\uaaf1\uabeb\ufe10-\ufe16\ufe19\ufe30\ufe45\ufe46\ufe49-\ufe4c\ufe50-\ufe52\ufe54-\ufe57\ufe5f-\ufe61\ufe68\ufe6a\ufe6b\uff01-\uff03\uff05-\uff07\uff0a\uff0c\uff0e\uff0f\uff1a\uff1b\uff1f\uff20\uff3c\uff61\uff64\uff65",
astral: "\ufffd[\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd]|\ufffd[\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd]|\ud801\udd6f|\ud82f\udc9f|\ufffd[\ufffd-\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd]|\ufffd[\ufffd-\ufffd\ufffd\ufffd]|\ufffd[\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd]"
}, {
name: "Ps",
alias: "Open_Punctuation",
bmp: "\\x28\\x5B\\x7B\u0f3a\u0f3c\u169b\u201a\u201e\u2045\u207d\u208d\u2308\u230a\u2329\u2768\u276a\u276c\u276e\u2770\u2772\u2774\u27c5\u27e6\u27e8\u27ea\u27ec\u27ee\u2983\u2985\u2987\u2989\u298b\u298d\u298f\u2991\u2993\u2995\u2997\u29d8\u29da\u29fc\u2e22\u2e24\u2e26\u2e28\u2e42\u3008\u300a\u300c\u300e\u3010\u3014\u3016\u3018\u301a\u301d\ufd3f\ufe17\ufe35\ufe37\ufe39\ufe3b\ufe3d\ufe3f\ufe41\ufe43\ufe47\ufe59\ufe5b\ufe5d\uff08\uff3b\uff5b\uff5f\uff62"
}, {
name: "S",
alias: "Symbol",
bmp: "\\x24\\x2B<->\\x5E`\\x7C~\xa2-\xa6\xa8\xa9\xac\xae-\xb1\xb4\xb8\xd7\xf7\u02c2-\u02c5\u02d2-\u02df\u02e5-\u02eb\u02ed\u02ef-\u02ff\u0375\u0384\u0385\u03f6\u0482\u058d-\u058f\u0606-\u0608\u060b\u060e\u060f\u06de\u06e9\u06fd\u06fe\u07f6\u09f2\u09f3\u09fa\u09fb\u0af1\u0b70\u0bf3-\u0bfa\u0c7f\u0d79\u0e3f\u0f01-\u0f03\u0f13\u0f15-\u0f17\u0f1a-\u0f1f\u0f34\u0f36\u0f38\u0fbe-\u0fc5\u0fc7-\u0fcc\u0fce\u0fcf\u0fd5-\u0fd8\u109e\u109f\u1390-\u1399\u17db\u1940\u19de-\u19ff\u1b61-\u1b6a\u1b74-\u1b7c\u1fbd\u1fbf-\u1fc1\u1fcd-\u1fcf\u1fdd-\u1fdf\u1fed-\u1fef\u1ffd\u1ffe\u2044\u2052\u207a-\u207c\u208a-\u208c\u20a0-\u20be\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211e-\u2123\u2125\u2127\u2129\u212e\u213a\u213b\u2140-\u2144\u214a-\u214d\u214f\u218a\u218b\u2190-\u2307\u230c-\u2328\u232b-\u23fa\u2400-\u2426\u2440-\u244a\u249c-\u24e9\u2500-\u2767\u2794-\u27c4\u27c7-\u27e5\u27f0-\u2982\u2999-\u29d7\u29dc-\u29fb\u29fe-\u2b73\u2b76-\u2b95\u2b98-\u2bb9\u2bbd-\u2bc8\u2bca-\u2bd1\u2bec-\u2bef\u2ce5-\u2cea\u2e80-\u2e99\u2e9b-\u2ef3\u2f00-\u2fd5\u2ff0-\u2ffb\u3004\u3012\u3013\u3020\u3036\u3037\u303e\u303f\u309b\u309c\u3190\u3191\u3196-\u319f\u31c0-\u31e3\u3200-\u321e\u322a-\u3247\u3250\u3260-\u327f\u328a-\u32b0\u32c0-\u32fe\u3300-\u33ff\u4dc0-\u4dff\ua490-\ua4c6\ua700-\ua716\ua720\ua721\ua789\ua78a\ua828-\ua82b\ua836-\ua839\uaa77-\uaa79\uab5b\ufb29\ufbb2-\ufbc1\ufdfc\ufdfd\ufe62\ufe64-\ufe66\ufe69\uff04\uff0b\uff1c-\uff1e\uff3e\uff40\uff5c\uff5e\uffe0-\uffe6\uffe8-\uffee\ufffc\ufffd",
astral: "\ufffd[\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd]|\ufffd[\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd]|\ufffd[\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd]|\ufffd[\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd-\ufffd\ufffd\ufffd-\ufffd]|\ud82f\udc9c|\ud805\udf3f|\ufffd[\ufffd\ufffd\ufffd]|\ufffd[\ufffd-\ufffd\ufffd]|\ufffd[\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd]|\ufffd[\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd-\ufffd]|\ufffd[\ufffd\ufffd]"
}, {
name: "Sc",
alias: "Currency_Symbol",
bmp: "\\x24\xa2-\xa5\u058f\u060b\u09f2\u09f3\u09fb\u0af1\u0bf9\u0e3f\u17db\u20a0-\u20be\ua838\ufdfc\ufe69\uff04\uffe0\uffe1\uffe5\uffe6"
}, {
name: "Sk",
alias: "Modifier_Symbol",
bmp: "\\x5E`\xa8\xaf\xb4\xb8\u02c2-\u02c5\u02d2-\u02df\u02e5-\u02eb\u02ed\u02ef-\u02ff\u0375\u0384\u0385\u1fbd\u1fbf-\u1fc1\u1fcd-\u1fcf\u1fdd-\u1fdf\u1fed-\u1fef\u1ffd\u1ffe\u309b\u309c\ua700-\ua716\ua720\ua721\ua789\ua78a\uab5b\ufbb2-\ufbc1\uff3e\uff40\uffe3",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "Sm",
alias: "Math_Symbol",
bmp: "\\x2B<->\\x7C~\xac\xb1\xd7\xf7\u03f6\u0606-\u0608\u2044\u2052\u207a-\u207c\u208a-\u208c\u2118\u2140-\u2144\u214b\u2190-\u2194\u219a\u219b\u21a0\u21a3\u21a6\u21ae\u21ce\u21cf\u21d2\u21d4\u21f4-\u22ff\u2320\u2321\u237c\u239b-\u23b3\u23dc-\u23e1\u25b7\u25c1\u25f8-\u25ff\u266f\u27c0-\u27c4\u27c7-\u27e5\u27f0-\u27ff\u2900-\u2982\u2999-\u29d7\u29dc-\u29fb\u29fe-\u2aff\u2b30-\u2b44\u2b47-\u2b4c\ufb29\ufe62\ufe64-\ufe66\uff0b\uff1c-\uff1e\uff5c\uff5e\uffe2\uffe9-\uffec",
astral: "\ufffd[\ufffd\ufffd]|\ufffd[\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd]"
}, {
name: "So",
alias: "Other_Symbol",
bmp: "\xa6\xa9\xae\xb0\u0482\u058d\u058e\u060e\u060f\u06de\u06e9\u06fd\u06fe\u07f6\u09fa\u0b70\u0bf3-\u0bf8\u0bfa\u0c7f\u0d79\u0f01-\u0f03\u0f13\u0f15-\u0f17\u0f1a-\u0f1f\u0f34\u0f36\u0f38\u0fbe-\u0fc5\u0fc7-\u0fcc\u0fce\u0fcf\u0fd5-\u0fd8\u109e\u109f\u1390-\u1399\u1940\u19de-\u19ff\u1b61-\u1b6a\u1b74-\u1b7c\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116\u2117\u211e-\u2123\u2125\u2127\u2129\u212e\u213a\u213b\u214a\u214c\u214d\u214f\u218a\u218b\u2195-\u2199\u219c-\u219f\u21a1\u21a2\u21a4\u21a5\u21a7-\u21ad\u21af-\u21cd\u21d0\u21d1\u21d3\u21d5-\u21f3\u2300-\u2307\u230c-\u231f\u2322-\u2328\u232b-\u237b\u237d-\u239a\u23b4-\u23db\u23e2-\u23fa\u2400-\u2426\u2440-\u244a\u249c-\u24e9\u2500-\u25b6\u25b8-\u25c0\u25c2-\u25f7\u2600-\u266e\u2670-\u2767\u2794-\u27bf\u2800-\u28ff\u2b00-\u2b2f\u2b45\u2b46\u2b4d-\u2b73\u2b76-\u2b95\u2b98-\u2bb9\u2bbd-\u2bc8\u2bca-\u2bd1\u2bec-\u2bef\u2ce5-\u2cea\u2e80-\u2e99\u2e9b-\u2ef3\u2f00-\u2fd5\u2ff0-\u2ffb\u3004\u3012\u3013\u3020\u3036\u3037\u303e\u303f\u3190\u3191\u3196-\u319f\u31c0-\u31e3\u3200-\u321e\u322a-\u3247\u3250\u3260-\u327f\u328a-\u32b0\u32c0-\u32fe\u3300-\u33ff\u4dc0-\u4dff\ua490-\ua4c6\ua828-\ua82b\ua836\ua837\ua839\uaa77-\uaa79\ufdfd\uffe4\uffe8\uffed\uffee\ufffc\ufffd",
astral: "\ufffd[\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd]|\ufffd[\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd-\ufffd\ufffd\ufffd-\ufffd]|\ud82f\udc9c|\ud805\udf3f|\ufffd[\ufffd\ufffd\ufffd]|\ufffd[\ufffd-\ufffd\ufffd]|\ufffd[\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd]|\ufffd[\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd-\ufffd]"
}, {
name: "Z",
alias: "Separator",
bmp: " \xa0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000"
}, {
name: "Zl",
alias: "Line_Separator",
bmp: "\u2028"
}, {
name: "Zp",
alias: "Paragraph_Separator",
bmp: "\u2029"
}, {
name: "Zs",
alias: "Space_Separator",
bmp: " \xa0\u1680\u2000-\u200a\u202f\u205f\u3000"
} ]);
};
}, {} ],
6: [ function(e, t) {
t.exports = function(e) {
"use strict";
if (!e.addUnicodeData) throw new ReferenceError("Unicode Base must be loaded before Unicode Properties");
var t = [ {
name: "ASCII",
bmp: "\x00-"
}, {
name: "Alphabetic",
bmp: "A-Za-z\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0345\u0370-\u0374\u0376\u0377\u037a-\u037d\u037f\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u052f\u0531-\u0556\u0559\u0561-\u0587\u05b0-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u05d0-\u05ea\u05f0-\u05f2\u0610-\u061a\u0620-\u0657\u0659-\u065f\u066e-\u06d3\u06d5-\u06dc\u06e1-\u06e8\u06ed-\u06ef\u06fa-\u06fc\u06ff\u0710-\u073f\u074d-\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0817\u081a-\u082c\u0840-\u0858\u08a0-\u08b4\u08e3-\u08e9\u08f0-\u093b\u093d-\u094c\u094e-\u0950\u0955-\u0963\u0971-\u0983\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd-\u09c4\u09c7\u09c8\u09cb\u09cc\u09ce\u09d7\u09dc\u09dd\u09df-\u09e3\u09f0\u09f1\u0a01-\u0a03\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a3e-\u0a42\u0a47\u0a48\u0a4b\u0a4c\u0a51\u0a59-\u0a5c\u0a5e\u0a70-\u0a75\u0a81-\u0a83\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd-\u0ac5\u0ac7-\u0ac9\u0acb\u0acc\u0ad0\u0ae0-\u0ae3\u0af9\u0b01-\u0b03\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d-\u0b44\u0b47\u0b48\u0b4b\u0b4c\u0b56\u0b57\u0b5c\u0b5d\u0b5f-\u0b63\u0b71\u0b82\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcc\u0bd0\u0bd7\u0c00-\u0c03\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d-\u0c44\u0c46-\u0c48\u0c4a-\u0c4c\u0c55\u0c56\u0c58-\u0c5a\u0c60-\u0c63\u0c81-\u0c83\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccc\u0cd5\u0cd6\u0cde\u0ce0-\u0ce3\u0cf1\u0cf2\u0d01-\u0d03\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d-\u0d44\u0d46-\u0d48\u0d4a-\u0d4c\u0d4e\u0d57\u0d5f-\u0d63\u0d7a-\u0d7f\u0d82\u0d83\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0df2\u0df3\u0e01-\u0e3a\u0e40-\u0e46\u0e4d\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb9\u0ebb-\u0ebd\u0ec0-\u0ec4\u0ec6\u0ecd\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f71-\u0f81\u0f88-\u0f97\u0f99-\u0fbc\u1000-\u1036\u1038\u103b-\u103f\u1050-\u1062\u1065-\u1068\u106e-\u1086\u108e\u109c\u109d\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u135f\u1380-\u138f\u13a0-\u13f5\u13f8-\u13fd\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f8\u1700-\u170c\u170e-\u1713\u1720-\u1733\u1740-\u1753\u1760-\u176c\u176e-\u1770\u1772\u1773\u1780-\u17b3\u17b6-\u17c8\u17d7\u17dc\u1820-\u1877\u1880-\u18aa\u18b0-\u18f5\u1900-\u191e\u1920-\u192b\u1930-\u1938\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u1a00-\u1a1b\u1a20-\u1a5e\u1a61-\u1a74\u1aa7\u1b00-\u1b33\u1b35-\u1b43\u1b45-\u1b4b\u1b80-\u1ba9\u1bac-\u1baf\u1bba-\u1be5\u1be7-\u1bf1\u1c00-\u1c35\u1c4d-\u1c4f\u1c5a-\u1c7d\u1ce9-\u1cec\u1cee-\u1cf3\u1cf5\u1cf6\u1d00-\u1dbf\u1de7-\u1df4\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u24b6-\u24e9\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2de0-\u2dff\u2e2f\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309d-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fd5\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua674-\ua67b\ua67f-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua7ad\ua7b0-\ua7b7\ua7f7-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua827\ua840-\ua873\ua880-\ua8c3\ua8f2-\ua8f7\ua8fb\ua8fd\ua90a-\ua92a\ua930-\ua952\ua960-\ua97c\ua980-\ua9b2\ua9b4-\ua9bf\ua9cf\ua9e0-\ua9e4\ua9e6-\ua9ef\ua9fa-\ua9fe\uaa00-\uaa36\uaa40-\uaa4d\uaa60-\uaa76\uaa7a\uaa7e-\uaabe\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaef\uaaf2-\uaaf5\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uab30-\uab5a\uab5c-\uab65\uab70-\uabea\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc",
astral: "\ufffd[\ufffd-\ufffd\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd-\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd]|[\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd][\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd]|\ufffd[\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd\ufffd\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd]|\ufffd[\ufffd\ufffd]|\ufffd[\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd]"
}, {
name: "Any",
isBmpLast: !0,
bmp: "\x00-\uffff",
astral: "[\ufffd-\ufffd][\ufffd-\ufffd]"
}, {
name: "Default_Ignorable_Code_Point",
bmp: "\xad\u034f\u061c\u115f\u1160\u17b4\u17b5\u180b-\u180e\u200b-\u200f\u202a-\u202e\u2060-\u206f\u3164\ufe00-\ufe0f\ufeff\uffa0\ufff0-\ufff8",
astral: "[\ufffd-\ufffd][\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd]"
}, {
name: "Lowercase",
bmp: "a-z\xaa\xb5\xba\xdf-\xf6\xf8-\xff\u0101\u0103\u0105\u0107\u0109\u010b\u010d\u010f\u0111\u0113\u0115\u0117\u0119\u011b\u011d\u011f\u0121\u0123\u0125\u0127\u0129\u012b\u012d\u012f\u0131\u0133\u0135\u0137\u0138\u013a\u013c\u013e\u0140\u0142\u0144\u0146\u0148\u0149\u014b\u014d\u014f\u0151\u0153\u0155\u0157\u0159\u015b\u015d\u015f\u0161\u0163\u0165\u0167\u0169\u016b\u016d\u016f\u0171\u0173\u0175\u0177\u017a\u017c\u017e-\u0180\u0183\u0185\u0188\u018c\u018d\u0192\u0195\u0199-\u019b\u019e\u01a1\u01a3\u01a5\u01a8\u01aa\u01ab\u01ad\u01b0\u01b4\u01b6\u01b9\u01ba\u01bd-\u01bf\u01c6\u01c9\u01cc\u01ce\u01d0\u01d2\u01d4\u01d6\u01d8\u01da\u01dc\u01dd\u01df\u01e1\u01e3\u01e5\u01e7\u01e9\u01eb\u01ed\u01ef\u01f0\u01f3\u01f5\u01f9\u01fb\u01fd\u01ff\u0201\u0203\u0205\u0207\u0209\u020b\u020d\u020f\u0211\u0213\u0215\u0217\u0219\u021b\u021d\u021f\u0221\u0223\u0225\u0227\u0229\u022b\u022d\u022f\u0231\u0233-\u0239\u023c\u023f\u0240\u0242\u0247\u0249\u024b\u024d\u024f-\u0293\u0295-\u02b8\u02c0\u02c1\u02e0-\u02e4\u0345\u0371\u0373\u0377\u037a-\u037d\u0390\u03ac-\u03ce\u03d0\u03d1\u03d5-\u03d7\u03d9\u03db\u03dd\u03df\u03e1\u03e3\u03e5\u03e7\u03e9\u03eb\u03ed\u03ef-\u03f3\u03f5\u03f8\u03fb\u03fc\u0430-\u045f\u0461\u0463\u0465\u0467\u0469\u046b\u046d\u046f\u0471\u0473\u0475\u0477\u0479\u047b\u047d\u047f\u0481\u048b\u048d\u048f\u0491\u0493\u0495\u0497\u0499\u049b\u049d\u049f\u04a1\u04a3\u04a5\u04a7\u04a9\u04ab\u04ad\u04af\u04b1\u04b3\u04b5\u04b7\u04b9\u04bb\u04bd\u04bf\u04c2\u04c4\u04c6\u04c8\u04ca\u04cc\u04ce\u04cf\u04d1\u04d3\u04d5\u04d7\u04d9\u04db\u04dd\u04df\u04e1\u04e3\u04e5\u04e7\u04e9\u04eb\u04ed\u04ef\u04f1\u04f3\u04f5\u04f7\u04f9\u04fb\u04fd\u04ff\u0501\u0503\u0505\u0507\u0509\u050b\u050d\u050f\u0511\u0513\u0515\u0517\u0519\u051b\u051d\u051f\u0521\u0523\u0525\u0527\u0529\u052b\u052d\u052f\u0561-\u0587\u13f8-\u13fd\u1d00-\u1dbf\u1e01\u1e03\u1e05\u1e07\u1e09\u1e0b\u1e0d\u1e0f\u1e11\u1e13\u1e15\u1e17\u1e19\u1e1b\u1e1d\u1e1f\u1e21\u1e23\u1e25\u1e27\u1e29\u1e2b\u1e2d\u1e2f\u1e31\u1e33\u1e35\u1e37\u1e39\u1e3b\u1e3d\u1e3f\u1e41\u1e43\u1e45\u1e47\u1e49\u1e4b\u1e4d\u1e4f\u1e51\u1e53\u1e55\u1e57\u1e59\u1e5b\u1e5d\u1e5f\u1e61\u1e63\u1e65\u1e67\u1e69\u1e6b\u1e6d\u1e6f\u1e71\u1e73\u1e75\u1e77\u1e79\u1e7b\u1e7d\u1e7f\u1e81\u1e83\u1e85\u1e87\u1e89\u1e8b\u1e8d\u1e8f\u1e91\u1e93\u1e95-\u1e9d\u1e9f\u1ea1\u1ea3\u1ea5\u1ea7\u1ea9\u1eab\u1ead\u1eaf\u1eb1\u1eb3\u1eb5\u1eb7\u1eb9\u1ebb\u1ebd\u1ebf\u1ec1\u1ec3\u1ec5\u1ec7\u1ec9\u1ecb\u1ecd\u1ecf\u1ed1\u1ed3\u1ed5\u1ed7\u1ed9\u1edb\u1edd\u1edf\u1ee1\u1ee3\u1ee5\u1ee7\u1ee9\u1eeb\u1eed\u1eef\u1ef1\u1ef3\u1ef5\u1ef7\u1ef9\u1efb\u1efd\u1eff-\u1f07\u1f10-\u1f15\u1f20-\u1f27\u1f30-\u1f37\u1f40-\u1f45\u1f50-\u1f57\u1f60-\u1f67\u1f70-\u1f7d\u1f80-\u1f87\u1f90-\u1f97\u1fa0-\u1fa7\u1fb0-\u1fb4\u1fb6\u1fb7\u1fbe\u1fc2-\u1fc4\u1fc6\u1fc7\u1fd0-\u1fd3\u1fd6\u1fd7\u1fe0-\u1fe7\u1ff2-\u1ff4\u1ff6\u1ff7\u2071\u207f\u2090-\u209c\u210a\u210e\u210f\u2113\u212f\u2134\u2139\u213c\u213d\u2146-\u2149\u214e\u2170-\u217f\u2184\u24d0-\u24e9\u2c30-\u2c5e\u2c61\u2c65\u2c66\u2c68\u2c6a\u2c6c\u2c71\u2c73\u2c74\u2c76-\u2c7d\u2c81\u2c83\u2c85\u2c87\u2c89\u2c8b\u2c8d\u2c8f\u2c91\u2c93\u2c95\u2c97\u2c99\u2c9b\u2c9d\u2c9f\u2ca1\u2ca3\u2ca5\u2ca7\u2ca9\u2cab\u2cad\u2caf\u2cb1\u2cb3\u2cb5\u2cb7\u2cb9\u2cbb\u2cbd\u2cbf\u2cc1\u2cc3\u2cc5\u2cc7\u2cc9\u2ccb\u2ccd\u2ccf\u2cd1\u2cd3\u2cd5\u2cd7\u2cd9\u2cdb\u2cdd\u2cdf\u2ce1\u2ce3\u2ce4\u2cec\u2cee\u2cf3\u2d00-\u2d25\u2d27\u2d2d\ua641\ua643\ua645\ua647\ua649\ua64b\ua64d\ua64f\ua651\ua653\ua655\ua657\ua659\ua65b\ua65d\ua65f\ua661\ua663\ua665\ua667\ua669\ua66b\ua66d\ua681\ua683\ua685\ua687\ua689\ua68b\ua68d\ua68f\ua691\ua693\ua695\ua697\ua699\ua69b-\ua69d\ua723\ua725\ua727\ua729\ua72b\ua72d\ua72f-\ua731\ua733\ua735\ua737\ua739\ua73b\ua73d\ua73f\ua741\ua743\ua745\ua747\ua749\ua74b\ua74d\ua74f\ua751\ua753\ua755\ua757\ua759\ua75b\ua75d\ua75f\ua761\ua763\ua765\ua767\ua769\ua76b\ua76d\ua76f-\ua778\ua77a\ua77c\ua77f\ua781\ua783\ua785\ua787\ua78c\ua78e\ua791\ua793-\ua795\ua797\ua799\ua79b\ua79d\ua79f\ua7a1\ua7a3\ua7a5\ua7a7\ua7a9\ua7b5\ua7b7\ua7f8-\ua7fa\uab30-\uab5a\uab5c-\uab65\uab70-\uabbf\ufb00-\ufb06\ufb13-\ufb17\uff41-\uff5a",
astral: "\ufffd[\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd]|\ufffd[\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd]"
}, {
name: "Noncharacter_Code_Point",
bmp: "\ufdd0-\ufdef\ufffe\uffff",
astral: "[\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd][\ufffd\ufffd]"
}, {
name: "Uppercase",
bmp: "A-Z\xc0-\xd6\xd8-\xde\u0100\u0102\u0104\u0106\u0108\u010a\u010c\u010e\u0110\u0112\u0114\u0116\u0118\u011a\u011c\u011e\u0120\u0122\u0124\u0126\u0128\u012a\u012c\u012e\u0130\u0132\u0134\u0136\u0139\u013b\u013d\u013f\u0141\u0143\u0145\u0147\u014a\u014c\u014e\u0150\u0152\u0154\u0156\u0158\u015a\u015c\u015e\u0160\u0162\u0164\u0166\u0168\u016a\u016c\u016e\u0170\u0172\u0174\u0176\u0178\u0179\u017b\u017d\u0181\u0182\u0184\u0186\u0187\u0189-\u018b\u018e-\u0191\u0193\u0194\u0196-\u0198\u019c\u019d\u019f\u01a0\u01a2\u01a4\u01a6\u01a7\u01a9\u01ac\u01ae\u01af\u01b1-\u01b3\u01b5\u01b7\u01b8\u01bc\u01c4\u01c7\u01ca\u01cd\u01cf\u01d1\u01d3\u01d5\u01d7\u01d9\u01db\u01de\u01e0\u01e2\u01e4\u01e6\u01e8\u01ea\u01ec\u01ee\u01f1\u01f4\u01f6-\u01f8\u01fa\u01fc\u01fe\u0200\u0202\u0204\u0206\u0208\u020a\u020c\u020e\u0210\u0212\u0214\u0216\u0218\u021a\u021c\u021e\u0220\u0222\u0224\u0226\u0228\u022a\u022c\u022e\u0230\u0232\u023a\u023b\u023d\u023e\u0241\u0243-\u0246\u0248\u024a\u024c\u024e\u0370\u0372\u0376\u037f\u0386\u0388-\u038a\u038c\u038e\u038f\u0391-\u03a1\u03a3-\u03ab\u03cf\u03d2-\u03d4\u03d8\u03da\u03dc\u03de\u03e0\u03e2\u03e4\u03e6\u03e8\u03ea\u03ec\u03ee\u03f4\u03f7\u03f9\u03fa\u03fd-\u042f\u0460\u0462\u0464\u0466\u0468\u046a\u046c\u046e\u0470\u0472\u0474\u0476\u0478\u047a\u047c\u047e\u0480\u048a\u048c\u048e\u0490\u0492\u0494\u0496\u0498\u049a\u049c\u049e\u04a0\u04a2\u04a4\u04a6\u04a8\u04aa\u04ac\u04ae\u04b0\u04b2\u04b4\u04b6\u04b8\u04ba\u04bc\u04be\u04c0\u04c1\u04c3\u04c5\u04c7\u04c9\u04cb\u04cd\u04d0\u04d2\u04d4\u04d6\u04d8\u04da\u04dc\u04de\u04e0\u04e2\u04e4\u04e6\u04e8\u04ea\u04ec\u04ee\u04f0\u04f2\u04f4\u04f6\u04f8\u04fa\u04fc\u04fe\u0500\u0502\u0504\u0506\u0508\u050a\u050c\u050e\u0510\u0512\u0514\u0516\u0518\u051a\u051c\u051e\u0520\u0522\u0524\u0526\u0528\u052a\u052c\u052e\u0531-\u0556\u10a0-\u10c5\u10c7\u10cd\u13a0-\u13f5\u1e00\u1e02\u1e04\u1e06\u1e08\u1e0a\u1e0c\u1e0e\u1e10\u1e12\u1e14\u1e16\u1e18\u1e1a\u1e1c\u1e1e\u1e20\u1e22\u1e24\u1e26\u1e28\u1e2a\u1e2c\u1e2e\u1e30\u1e32\u1e34\u1e36\u1e38\u1e3a\u1e3c\u1e3e\u1e40\u1e42\u1e44\u1e46\u1e48\u1e4a\u1e4c\u1e4e\u1e50\u1e52\u1e54\u1e56\u1e58\u1e5a\u1e5c\u1e5e\u1e60\u1e62\u1e64\u1e66\u1e68\u1e6a\u1e6c\u1e6e\u1e70\u1e72\u1e74\u1e76\u1e78\u1e7a\u1e7c\u1e7e\u1e80\u1e82\u1e84\u1e86\u1e88\u1e8a\u1e8c\u1e8e\u1e90\u1e92\u1e94\u1e9e\u1ea0\u1ea2\u1ea4\u1ea6\u1ea8\u1eaa\u1eac\u1eae\u1eb0\u1eb2\u1eb4\u1eb6\u1eb8\u1eba\u1ebc\u1ebe\u1ec0\u1ec2\u1ec4\u1ec6\u1ec8\u1eca\u1ecc\u1ece\u1ed0\u1ed2\u1ed4\u1ed6\u1ed8\u1eda\u1edc\u1ede\u1ee0\u1ee2\u1ee4\u1ee6\u1ee8\u1eea\u1eec\u1eee\u1ef0\u1ef2\u1ef4\u1ef6\u1ef8\u1efa\u1efc\u1efe\u1f08-\u1f0f\u1f18-\u1f1d\u1f28-\u1f2f\u1f38-\u1f3f\u1f48-\u1f4d\u1f59\u1f5b\u1f5d\u1f5f\u1f68-\u1f6f\u1fb8-\u1fbb\u1fc8-\u1fcb\u1fd8-\u1fdb\u1fe8-\u1fec\u1ff8-\u1ffb\u2102\u2107\u210b-\u210d\u2110-\u2112\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u2130-\u2133\u213e\u213f\u2145\u2160-\u216f\u2183\u24b6-\u24cf\u2c00-\u2c2e\u2c60\u2c62-\u2c64\u2c67\u2c69\u2c6b\u2c6d-\u2c70\u2c72\u2c75\u2c7e-\u2c80\u2c82\u2c84\u2c86\u2c88\u2c8a\u2c8c\u2c8e\u2c90\u2c92\u2c94\u2c96\u2c98\u2c9a\u2c9c\u2c9e\u2ca0\u2ca2\u2ca4\u2ca6\u2ca8\u2caa\u2cac\u2cae\u2cb0\u2cb2\u2cb4\u2cb6\u2cb8\u2cba\u2cbc\u2cbe\u2cc0\u2cc2\u2cc4\u2cc6\u2cc8\u2cca\u2ccc\u2cce\u2cd0\u2cd2\u2cd4\u2cd6\u2cd8\u2cda\u2cdc\u2cde\u2ce0\u2ce2\u2ceb\u2ced\u2cf2\ua640\ua642\ua644\ua646\ua648\ua64a\ua64c\ua64e\ua650\ua652\ua654\ua656\ua658\ua65a\ua65c\ua65e\ua660\ua662\ua664\ua666\ua668\ua66a\ua66c\ua680\ua682\ua684\ua686\ua688\ua68a\ua68c\ua68e\ua690\ua692\ua694\ua696\ua698\ua69a\ua722\ua724\ua726\ua728\ua72a\ua72c\ua72e\ua732\ua734\ua736\ua738\ua73a\ua73c\ua73e\ua740\ua742\ua744\ua746\ua748\ua74a\ua74c\ua74e\ua750\ua752\ua754\ua756\ua758\ua75a\ua75c\ua75e\ua760\ua762\ua764\ua766\ua768\ua76a\ua76c\ua76e\ua779\ua77b\ua77d\ua77e\ua780\ua782\ua784\ua786\ua78b\ua78d\ua790\ua792\ua796\ua798\ua79a\ua79c\ua79e\ua7a0\ua7a2\ua7a4\ua7a6\ua7a8\ua7aa-\ua7ad\ua7b0-\ua7b4\ua7b6\uff21-\uff3a",
astral: "\ufffd[\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd]|\ufffd[\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd]"
}, {
name: "White_Space",
bmp: " -\r \x85\xa0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000"
} ];
t.push({
name: "Assigned",
inverseOf: "Cn"
}), e.addUnicodeData(t);
};
}, {} ],
7: [ function(e, t) {
t.exports = function(e) {
"use strict";
if (!e.addUnicodeData) throw new ReferenceError("Unicode Base must be loaded before Unicode Scripts");
e.addUnicodeData([ {
name: "Ahom",
astral: "\ufffd[\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd]"
}, {
name: "Anatolian_Hieroglyphs",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "Arabic",
bmp: "\u0600-\u0604\u0606-\u060b\u060d-\u061a\u061e\u0620-\u063f\u0641-\u064a\u0656-\u066f\u0671-\u06dc\u06de-\u06ff\u0750-\u077f\u08a0-\u08b4\u08e3-\u08ff\ufb50-\ufbc1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfd\ufe70-\ufe74\ufe76-\ufefc",
astral: "\ufffd[\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd]"
}, {
name: "Armenian",
bmp: "\u0531-\u0556\u0559-\u055f\u0561-\u0587\u058a\u058d-\u058f\ufb13-\ufb17"
}, {
name: "Avestan",
astral: "\ufffd[\ufffd-\ufffd\ufffd-\ufffd]"
}, {
name: "Balinese",
bmp: "\u1b00-\u1b4b\u1b50-\u1b7c"
}, {
name: "Bamum",
bmp: "\ua6a0-\ua6f7",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "Bassa_Vah",
astral: "\ufffd[\ufffd-\ufffd\ufffd-\ufffd]"
}, {
name: "Batak",
bmp: "\u1bc0-\u1bf3\u1bfc-\u1bff"
}, {
name: "Bengali",
bmp: "\u0980-\u0983\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bc-\u09c4\u09c7\u09c8\u09cb-\u09ce\u09d7\u09dc\u09dd\u09df-\u09e3\u09e6-\u09fb"
}, {
name: "Bopomofo",
bmp: "\u02ea\u02eb\u3105-\u312d\u31a0-\u31ba"
}, {
name: "Brahmi",
astral: "\ufffd[\ufffd-\ufffd\ufffd-\ufffd\ufffd]"
}, {
name: "Braille",
bmp: "\u2800-\u28ff"
}, {
name: "Buginese",
bmp: "\u1a00-\u1a1b\u1a1e\u1a1f"
}, {
name: "Buhid",
bmp: "\u1740-\u1753"
}, {
name: "Canadian_Aboriginal",
bmp: "\u1400-\u167f\u18b0-\u18f5"
}, {
name: "Carian",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "Caucasian_Albanian",
astral: "\ufffd[\ufffd-\ufffd\ufffd]"
}, {
name: "Chakma",
astral: "\ufffd[\ufffd-\ufffd\ufffd-\ufffd]"
}, {
name: "Cham",
bmp: "\uaa00-\uaa36\uaa40-\uaa4d\uaa50-\uaa59\uaa5c-\uaa5f"
}, {
name: "Cherokee",
bmp: "\u13a0-\u13f5\u13f8-\u13fd\uab70-\uabbf"
}, {
name: "Common",
bmp: "\x00-@\\x5B-`\\x7B-\xa9\xab-\xb9\xbb-\xbf\xd7\xf7\u02b9-\u02df\u02e5-\u02e9\u02ec-\u02ff\u0374\u037e\u0385\u0387\u0589\u0605\u060c\u061b\u061c\u061f\u0640\u06dd\u0964\u0965\u0e3f\u0fd5-\u0fd8\u10fb\u16eb-\u16ed\u1735\u1736\u1802\u1803\u1805\u1cd3\u1ce1\u1ce9-\u1cec\u1cee-\u1cf3\u1cf5\u1cf6\u2000-\u200b\u200e-\u2064\u2066-\u2070\u2074-\u207e\u2080-\u208e\u20a0-\u20be\u2100-\u2125\u2127-\u2129\u212c-\u2131\u2133-\u214d\u214f-\u215f\u2189-\u218b\u2190-\u23fa\u2400-\u2426\u2440-\u244a\u2460-\u27ff\u2900-\u2b73\u2b76-\u2b95\u2b98-\u2bb9\u2bbd-\u2bc8\u2bca-\u2bd1\u2bec-\u2bef\u2e00-\u2e42\u2ff0-\u2ffb\u3000-\u3004\u3006\u3008-\u3020\u3030-\u3037\u303c-\u303f\u309b\u309c\u30a0\u30fb\u30fc\u3190-\u319f\u31c0-\u31e3\u3220-\u325f\u327f-\u32cf\u3358-\u33ff\u4dc0-\u4dff\ua700-\ua721\ua788-\ua78a\ua830-\ua839\ua92e\ua9cf\uab5b\ufd3e\ufd3f\ufe10-\ufe19\ufe30-\ufe52\ufe54-\ufe66\ufe68-\ufe6b\ufeff\uff01-\uff20\uff3b-\uff40\uff5b-\uff65\uff70\uff9e\uff9f\uffe0-\uffe6\uffe8-\uffee\ufff9-\ufffd",
astral: "\ufffd[\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd]|\ufffd[\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd]|\ufffd[\ufffd\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd-\ufffd]"
}, {
name: "Coptic",
bmp: "\u03e2-\u03ef\u2c80-\u2cf3\u2cf9-\u2cff"
}, {
name: "Cuneiform",
astral: "\ufffd[\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd]"
}, {
name: "Cypriot",
astral: "\ufffd[\ufffd-\ufffd\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd\ufffd]"
}, {
name: "Cyrillic",
bmp: "\u0400-\u0484\u0487-\u052f\u1d2b\u1d78\u2de0-\u2dff\ua640-\ua69f\ufe2e\ufe2f"
}, {
name: "Deseret",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "Devanagari",
bmp: "\u0900-\u0950\u0953-\u0963\u0966-\u097f\ua8e0-\ua8fd"
}, {
name: "Duployan",
astral: "\ufffd[\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd]"
}, {
name: "Egyptian_Hieroglyphs",
astral: "\ufffd[\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd]"
}, {
name: "Elbasan",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "Ethiopic",
bmp: "\u1200-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u135d-\u137c\u1380-\u1399\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e"
}, {
name: "Georgian",
bmp: "\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u10ff\u2d00-\u2d25\u2d27\u2d2d"
}, {
name: "Glagolitic",
bmp: "\u2c00-\u2c2e\u2c30-\u2c5e"
}, {
name: "Gothic",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "Grantha",
astral: "\ufffd[\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd]"
}, {
name: "Greek",
bmp: "\u0370-\u0373\u0375-\u0377\u037a-\u037d\u037f\u0384\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03e1\u03f0-\u03ff\u1d26-\u1d2a\u1d5d-\u1d61\u1d66-\u1d6a\u1dbf\u1f00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fc4\u1fc6-\u1fd3\u1fd6-\u1fdb\u1fdd-\u1fef\u1ff2-\u1ff4\u1ff6-\u1ffe\u2126\uab65",
astral: "\ufffd[\ufffd-\ufffd\ufffd]|\ufffd[\ufffd-\ufffd]"
}, {
name: "Gujarati",
bmp: "\u0a81-\u0a83\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abc-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ad0\u0ae0-\u0ae3\u0ae6-\u0af1\u0af9"
}, {
name: "Gurmukhi",
bmp: "\u0a01-\u0a03\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a59-\u0a5c\u0a5e\u0a66-\u0a75"
}, {
name: "Han",
bmp: "\u2e80-\u2e99\u2e9b-\u2ef3\u2f00-\u2fd5\u3005\u3007\u3021-\u3029\u3038-\u303b\u3400-\u4db5\u4e00-\u9fd5\uf900-\ufa6d\ufa70-\ufad9",
astral: "\ufffd[\ufffd-\ufffd\ufffd-\ufffd]|[\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd][\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd\ufffd-\ufffd]|\ufffd[\ufffd-\ufffd]"
}, {
name: "Hangul",
bmp: "\u1100-\u11ff\u302e\u302f\u3131-\u318e\u3200-\u321e\u3260-\u327e\ua960-\ua97c\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uffa0-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc"
}, {
name: "Hanunoo",
bmp: "\u1720-\u1734"
}, {
name: "Hatran",
astral: "\ufffd[\ufffd-\ufffd\ufffd\ufffd\ufffd-\ufffd]"
}, {
name: "Hebrew",
bmp: "\u0591-\u05c7\u05d0-\u05ea\u05f0-\u05f4\ufb1d-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufb4f"
}, {
name: "Hiragana",
bmp: "\u3041-\u3096\u309d-\u309f",
astral: "\ud82c\udc01|\ud83c\ude00"
}, {
name: "Imperial_Aramaic",
astral: "\ufffd[\ufffd-\ufffd\ufffd-\ufffd]"
}, {
name: "Inherited",
bmp: "\u0300-\u036f\u0485\u0486\u064b-\u0655\u0670\u0951\u0952\u1ab0-\u1abe\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1cf4\u1cf8\u1cf9\u1dc0-\u1df5\u1dfc-\u1dff\u200c\u200d\u20d0-\u20f0\u302a-\u302d\u3099\u309a\ufe00-\ufe0f\ufe20-\ufe2d",
astral: "\ufffd[\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd]|\ufffd[\ufffd\ufffd]|\ufffd[\ufffd-\ufffd]"
}, {
name: "Inscriptional_Pahlavi",
astral: "\ufffd[\ufffd-\ufffd\ufffd-\ufffd]"
}, {
name: "Inscriptional_Parthian",
astral: "\ufffd[\ufffd-\ufffd\ufffd-\ufffd]"
}, {
name: "Javanese",
bmp: "\ua980-\ua9cd\ua9d0-\ua9d9\ua9de\ua9df"
}, {
name: "Kaithi",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "Kannada",
bmp: "\u0c81-\u0c83\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbc-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0cde\u0ce0-\u0ce3\u0ce6-\u0cef\u0cf1\u0cf2"
}, {
name: "Katakana",
bmp: "\u30a1-\u30fa\u30fd-\u30ff\u31f0-\u31ff\u32d0-\u32fe\u3300-\u3357\uff66-\uff6f\uff71-\uff9d",
astral: "\ud82c\udc00"
}, {
name: "Kayah_Li",
bmp: "\ua900-\ua92d\ua92f"
}, {
name: "Kharoshthi",
astral: "\ufffd[\ufffd-\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd]"
}, {
name: "Khmer",
bmp: "\u1780-\u17dd\u17e0-\u17e9\u17f0-\u17f9\u19e0-\u19ff"
}, {
name: "Khojki",
astral: "\ufffd[\ufffd-\ufffd\ufffd-\ufffd]"
}, {
name: "Khudawadi",
astral: "\ufffd[\ufffd-\ufffd\ufffd-\ufffd]"
}, {
name: "Lao",
bmp: "\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb9\u0ebb-\u0ebd\u0ec0-\u0ec4\u0ec6\u0ec8-\u0ecd\u0ed0-\u0ed9\u0edc-\u0edf"
}, {
name: "Latin",
bmp: "A-Za-z\xaa\xba\xc0-\xd6\xd8-\xf6\xf8-\u02b8\u02e0-\u02e4\u1d00-\u1d25\u1d2c-\u1d5c\u1d62-\u1d65\u1d6b-\u1d77\u1d79-\u1dbe\u1e00-\u1eff\u2071\u207f\u2090-\u209c\u212a\u212b\u2132\u214e\u2160-\u2188\u2c60-\u2c7f\ua722-\ua787\ua78b-\ua7ad\ua7b0-\ua7b7\ua7f7-\ua7ff\uab30-\uab5a\uab5c-\uab64\ufb00-\ufb06\uff21-\uff3a\uff41-\uff5a"
}, {
name: "Lepcha",
bmp: "\u1c00-\u1c37\u1c3b-\u1c49\u1c4d-\u1c4f"
}, {
name: "Limbu",
bmp: "\u1900-\u191e\u1920-\u192b\u1930-\u193b\u1940\u1944-\u194f"
}, {
name: "Linear_A",
astral: "\ufffd[\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd]"
}, {
name: "Linear_B",
astral: "\ufffd[\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd]"
}, {
name: "Lisu",
bmp: "\ua4d0-\ua4ff"
}, {
name: "Lycian",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "Lydian",
astral: "\ufffd[\ufffd-\ufffd\ufffd]"
}, {
name: "Mahajani",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "Malayalam",
bmp: "\u0d01-\u0d03\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d-\u0d44\u0d46-\u0d48\u0d4a-\u0d4e\u0d57\u0d5f-\u0d63\u0d66-\u0d75\u0d79-\u0d7f"
}, {
name: "Mandaic",
bmp: "\u0840-\u085b\u085e"
}, {
name: "Manichaean",
astral: "\ufffd[\ufffd-\ufffd\ufffd-\ufffd]"
}, {
name: "Meetei_Mayek",
bmp: "\uaae0-\uaaf6\uabc0-\uabed\uabf0-\uabf9"
}, {
name: "Mende_Kikakui",
astral: "\ufffd[\ufffd-\ufffd\ufffd-\ufffd]"
}, {
name: "Meroitic_Cursive",
astral: "\ufffd[\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd]"
}, {
name: "Meroitic_Hieroglyphs",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "Miao",
astral: "\ufffd[\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd]"
}, {
name: "Modi",
astral: "\ufffd[\ufffd-\ufffd\ufffd-\ufffd]"
}, {
name: "Mongolian",
bmp: "\u1800\u1801\u1804\u1806-\u180e\u1810-\u1819\u1820-\u1877\u1880-\u18aa"
}, {
name: "Mro",
astral: "\ufffd[\ufffd-\ufffd\ufffd-\ufffd\ufffd\ufffd]"
}, {
name: "Multani",
astral: "\ufffd[\ufffd-\ufffd\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd]"
}, {
name: "Myanmar",
bmp: "\u1000-\u109f\ua9e0-\ua9fe\uaa60-\uaa7f"
}, {
name: "Nabataean",
astral: "\ufffd[\ufffd-\ufffd\ufffd-\ufffd]"
}, {
name: "New_Tai_Lue",
bmp: "\u1980-\u19ab\u19b0-\u19c9\u19d0-\u19da\u19de\u19df"
}, {
name: "Nko",
bmp: "\u07c0-\u07fa"
}, {
name: "Ogham",
bmp: "\u1680-\u169c"
}, {
name: "Ol_Chiki",
bmp: "\u1c50-\u1c7f"
}, {
name: "Old_Hungarian",
astral: "\ufffd[\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd]"
}, {
name: "Old_Italic",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "Old_North_Arabian",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "Old_Permic",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "Old_Persian",
astral: "\ufffd[\ufffd-\ufffd\ufffd-\ufffd]"
}, {
name: "Old_South_Arabian",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "Old_Turkic",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "Oriya",
bmp: "\u0b01-\u0b03\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3c-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b5c\u0b5d\u0b5f-\u0b63\u0b66-\u0b77"
}, {
name: "Osmanya",
astral: "\ufffd[\ufffd-\ufffd\ufffd-\ufffd]"
}, {
name: "Pahawh_Hmong",
astral: "\ufffd[\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd]"
}, {
name: "Palmyrene",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "Pau_Cin_Hau",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "Phags_Pa",
bmp: "\ua840-\ua877"
}, {
name: "Phoenician",
astral: "\ufffd[\ufffd-\ufffd\ufffd]"
}, {
name: "Psalter_Pahlavi",
astral: "\ufffd[\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd]"
}, {
name: "Rejang",
bmp: "\ua930-\ua953\ua95f"
}, {
name: "Runic",
bmp: "\u16a0-\u16ea\u16ee-\u16f8"
}, {
name: "Samaritan",
bmp: "\u0800-\u082d\u0830-\u083e"
}, {
name: "Saurashtra",
bmp: "\ua880-\ua8c4\ua8ce-\ua8d9"
}, {
name: "Sharada",
astral: "\ufffd[\ufffd-\ufffd\ufffd-\ufffd]"
}, {
name: "Shavian",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "Siddham",
astral: "\ufffd[\ufffd-\ufffd\ufffd-\ufffd]"
}, {
name: "SignWriting",
astral: "\ufffd[\ufffd-\ufffd\ufffd-\ufffd\ufffd-\ufffd]"
}, {
name: "Sinhala",
bmp: "\u0d82\u0d83\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0de6-\u0def\u0df2-\u0df4",
astral: "\ufffd[\ufffd-\ufffd]"
}, {
name: "Sora_Sompeng",
astral: "\ufffd[\ufffd-\ufffd\ufffd-\ufffd]"
}, {
name: "Sundanese",
bmp: "\u1b80-\u1bbf\u1cc0-\u1cc7"
}, {
name: "Syloti_Nagri",
bmp: "\ua800-\ua82b"
}, {
name: "Syriac",
bmp: "\u0700-\u070d\u070f-\u074a\u074d-\u074f"
}, {
name: "Tagalog",
bmp: "\u1700-\u170c\u170e-\u1714"
}, {
name: "Tagbanwa",
bmp: "\u1760-\u176c\u176e-\u1770\u1772\u1773"
}, {
name: "Tai_Le",
bmp: "\u1950-\u196d\u1970-\u1974"
}, {
name: "Tai_Tham",
bmp: "\u1a20-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1aa0-\u1aad"
}, {
name: "Tai_Viet",
bmp: "\uaa80-\uaac2\uaadb-\uaadf"
}, {
name: "Takri",
astral: "\ufffd[\ufffd-\ufffd\ufffd-\ufffd]"
}, {
name: "Tamil",
bmp: "\u0b82\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd0\u0bd7\u0be6-\u0bfa"
}, {
name: "Telugu",
bmp: "\u0c00-\u0c03\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c58-\u0c5a\u0c60-\u0c63\u0c66-\u0c6f\u0c78-\u0c7f"
}, {
name: "Thaana",
bmp: "\u0780-\u07b1"
}, {
name: "Thai",
bmp: "\u0e01-\u0e3a\u0e40-\u0e5b"
}, {
name: "Tibetan",
bmp: "\u0f00-\u0f47\u0f49-\u0f6c\u0f71-\u0f97\u0f99-\u0fbc\u0fbe-\u0fcc\u0fce-\u0fd4\u0fd9\u0fda"
}, {
name: "Tifinagh",
bmp: "\u2d30-\u2d67\u2d6f\u2d70\u2d7f"
}, {
name: "Tirhuta",
astral: "\ufffd[\ufffd-\ufffd\ufffd-\ufffd]"
}, {
name: "Ugaritic",
astral: "\ufffd[\ufffd-\ufffd\ufffd]"
}, {
name: "Vai",
bmp: "\ua500-\ua62b"
}, {
name: "Warang_Citi",
astral: "\ufffd[\ufffd-\ufffd\ufffd]"
}, {
name: "Yi",
bmp: "\ua000-\ua48c\ua490-\ua4c6"
} ]);
};
}, {} ],
8: [ function(e, t) {
var n = e("./xregexp");
e("./addons/build")(n), e("./addons/matchrecursive")(n), e("./addons/unicode-base")(n),
e("./addons/unicode-blocks")(n), e("./addons/unicode-categories")(n), e("./addons/unicode-properties")(n),
e("./addons/unicode-scripts")(n), t.exports = n;
}, {
"./addons/build": 1,
"./addons/matchrecursive": 2,
"./addons/unicode-base": 3,
"./addons/unicode-blocks": 4,
"./addons/unicode-categories": 5,
"./addons/unicode-properties": 6,
"./addons/unicode-scripts": 7,
"./xregexp": 9
} ],
9: [ function(e, t) {
"use strict";
function n(e, t, n, i, r) {
var o;
if (e[w] = {
captureNames: t
}, r) return e;
if (e.__proto__) e.__proto__ = x.prototype; else for (o in x.prototype) e[o] = x.prototype[o];
return e[w].source = n, e[w].flags = i ? i.split("").sort().join("") : i, e;
}
function i(e) {
return C.replace.call(e, /([\s\S])(?=[\s\S]*\1)/g, "");
}
function r(e, t) {
if (!x.isRegExp(e)) throw new TypeError("Type RegExp expected");
var r = e[w] || {}, o = a(e), l = "", c = "", u = null, d = null;
return t = t || {}, t.removeG && (c += "g"), t.removeY && (c += "y"), c && (o = C.replace.call(o, new RegExp("[" + c + "]+", "g"), "")),
t.addG && (l += "g"), t.addY && (l += "y"), l && (o = i(o + l)), t.isInternalOnly || (void 0 !== r.source && (u = r.source),
null != r.flags && (d = l ? i(r.flags + l) : r.flags)), e = n(new RegExp(e.source, o), s(e) ? r.captureNames.slice(0) : null, u, d, t.isInternalOnly);
}
function o(e) {
return parseInt(e, 16);
}
function a(e) {
return P ? e.flags : C.exec.call(/\/([a-z]*)$/i, RegExp.prototype.toString.call(e))[1];
}
function s(e) {
return !(!e[w] || !e[w].captureNames);
}
function l(e) {
return parseInt(e, 10).toString(16);
}
function c(e, t) {
var n, i = e.length;
for (n = 0; i > n; ++n) if (e[n] === t) return n;
return -1;
}
function u(e, t) {
return F.call(e) === "[object " + t + "]";
}
function d(e, t, n) {
return C.test.call(n.indexOf("x") > -1 ? /^(?:\s+|#.*|\(\?#[^)]*\))*(?:[?*+]|{\d+(?:,\d*)?})/ : /^(?:\(\?#[^)]*\))*(?:[?*+]|{\d+(?:,\d*)?})/, e.slice(t));
}
function p(e) {
for (;e.length < 4; ) e = "0" + e;
return e;
}
function h(e, t) {
var n;
if (i(t) !== t) throw new SyntaxError("Invalid duplicate regex flag " + t);
for (e = C.replace.call(e, /^\(\?([\w$]+)\)/, function(e, n) {
if (C.test.call(/[gy]/, n)) throw new SyntaxError("Cannot use flag g or y in mode modifier " + e);
return t = i(t + n), "";
}), n = 0; n < t.length; ++n) if (!O[t.charAt(n)]) throw new SyntaxError("Unknown regex flag " + t.charAt(n));
return {
pattern: e,
flags: t
};
}
function f(e) {
var t = {};
return u(e, "String") ? (x.forEach(e, /[^\s,]+/, function(e) {
t[e] = !0;
}), t) : e;
}
function m(e) {
if (!/^[\w$]$/.test(e)) throw new Error("Flag must be a single character A-Za-z0-9_$");
O[e] = !0;
}
function g(e, t, n, i, r) {
for (var o, a, s = T.length, l = e.charAt(n), c = null; s--; ) if (a = T[s], !(a.leadChar && a.leadChar !== l || a.scope !== i && "all" !== a.scope || a.flag && -1 === t.indexOf(a.flag)) && (o = x.exec(e, a.regex, n, "sticky"))) {
c = {
matchLength: o[0].length,
output: a.handler.call(r, o, i, t),
reparse: a.reparse
};
break;
}
return c;
}
function v(e) {
S.astral = e;
}
function b(e) {
RegExp.prototype.exec = (e ? _ : C).exec, RegExp.prototype.test = (e ? _ : C).test,
String.prototype.match = (e ? _ : C).match, String.prototype.replace = (e ? _ : C).replace,
String.prototype.split = (e ? _ : C).split, S.natives = e;
}
function y(e) {
if (null == e) throw new TypeError("Cannot convert null or undefined to object");
return e;
}
function x(e, t) {
var i, o, a, s, l, c = {
hasNamedCapture: !1,
captureNames: []
}, u = I, d = "", p = 0;
if (x.isRegExp(e)) {
if (void 0 !== t) throw new TypeError("Cannot supply flags when copying a RegExp");
return r(e);
}
if (e = void 0 === e ? "" : String(e), t = void 0 === t ? "" : String(t), x.isInstalled("astral") && -1 === t.indexOf("A") && (t += "A"),
E[e] || (E[e] = {}), !E[e][t]) {
for (i = h(e, t), s = i.pattern, l = i.flags; p < s.length; ) {
do (i = g(s, l, p, u, c)) && i.reparse && (s = s.slice(0, p) + i.output + s.slice(p + i.matchLength)); while (i && i.reparse);
i ? (d += i.output, p += i.matchLength || 1) : (o = x.exec(s, N[u], p, "sticky")[0],
d += o, p += o.length, "[" === o && u === I ? u = D : "]" === o && u === D && (u = I));
}
E[e][t] = {
pattern: C.replace.call(d, /\(\?:\)(?:[*+?]|\{\d+(?:,\d*)?})?\??(?=\(\?:\))|^\(\?:\)(?:[*+?]|\{\d+(?:,\d*)?})?\??|\(\?:\)(?:[*+?]|\{\d+(?:,\d*)?})?\??$/g, ""),
flags: C.replace.call(l, /[^gimuy]+/g, ""),
captures: c.hasNamedCapture ? c.captureNames : null
};
}
return a = E[e][t], n(new RegExp(a.pattern, a.flags), a.captures, e, t);
}
var w = "xregexp", S = {
astral: !1,
natives: !1
}, C = {
exec: RegExp.prototype.exec,
test: RegExp.prototype.test,
match: String.prototype.match,
replace: String.prototype.replace,
split: String.prototype.split
}, _ = {}, k = {}, E = {}, T = [], I = "default", D = "class", N = {
"default": /\\(?:0(?:[0-3][0-7]{0,2}|[4-7][0-7]?)?|[1-9]\d*|x[\dA-Fa-f]{2}|u(?:[\dA-Fa-f]{4}|{[\dA-Fa-f]+})|c[A-Za-z]|[\s\S])|\(\?[:=!]|[?*+]\?|{\d+(?:,\d*)?}\??|[\s\S]/,
"class": /\\(?:[0-3][0-7]{0,2}|[4-7][0-7]?|x[\dA-Fa-f]{2}|u(?:[\dA-Fa-f]{4}|{[\dA-Fa-f]+})|c[A-Za-z]|[\s\S])|[\s\S]/
}, M = /\$(?:{([\w$]+)}|(\d\d?|[\s\S]))/g, L = void 0 === C.exec.call(/()??/, "")[1], A = function() {
var e = !0;
try {
new RegExp("", "u");
} catch (t) {
e = !1;
}
return e;
}(), R = function() {
var e = !0;
try {
new RegExp("", "y");
} catch (t) {
e = !1;
}
return e;
}(), P = void 0 !== /a/.flags, O = {
g: !0,
i: !0,
m: !0,
u: A,
y: R
}, F = {}.toString;
x.prototype = new RegExp(), x.version = "3.1.0-dev", x.addToken = function(e, t, n) {
n = n || {};
var i, o = n.optionalFlags;
if (n.flag && m(n.flag), o) for (o = C.split.call(o, ""), i = 0; i < o.length; ++i) m(o[i]);
T.push({
regex: r(e, {
addG: !0,
addY: R,
isInternalOnly: !0
}),
handler: t,
scope: n.scope || I,
flag: n.flag,
reparse: n.reparse,
leadChar: n.leadChar
}), x.cache.flush("patterns");
}, x.cache = function(e, t) {
return k[e] || (k[e] = {}), k[e][t] || (k[e][t] = x(e, t));
}, x.cache.flush = function(e) {
"patterns" === e ? E = {} : k = {};
}, x.escape = function(e) {
return C.replace.call(y(e), /[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
}, x.exec = function(e, t, n, i) {
var o, a, s = "g", l = !1;
return l = R && !!(i || t.sticky && !1 !== i), l && (s += "y"), t[w] = t[w] || {},
a = t[w][s] || (t[w][s] = r(t, {
addG: !0,
addY: l,
removeY: !1 === i,
isInternalOnly: !0
})), a.lastIndex = n = n || 0, o = _.exec.call(a, e), i && o && o.index !== n && (o = null),
t.global && (t.lastIndex = o ? a.lastIndex : 0), o;
}, x.forEach = function(e, t, n) {
for (var i, r = 0, o = -1; i = x.exec(e, t, r); ) n(i, ++o, e, t), r = i.index + (i[0].length || 1);
}, x.globalize = function(e) {
return r(e, {
addG: !0
});
}, x.install = function(e) {
e = f(e), !S.astral && e.astral && v(!0), !S.natives && e.natives && b(!0);
}, x.isInstalled = function(e) {
return !!S[e];
}, x.isRegExp = function(e) {
return "[object RegExp]" === F.call(e);
}, x.match = function(e, t, n) {
var i, o, a = t.global && "one" !== n || "all" === n, s = (a ? "g" : "") + (t.sticky ? "y" : "") || "noGY";
return t[w] = t[w] || {}, o = t[w][s] || (t[w][s] = r(t, {
addG: !!a,
addY: !!t.sticky,
removeG: "one" === n,
isInternalOnly: !0
})), i = C.match.call(y(e), o), t.global && (t.lastIndex = "one" === n && i ? i.index + i[0].length : 0),
a ? i || [] : i && i[0];
}, x.matchChain = function(e, t) {
return function n(e, i) {
var r, o = t[i].regex ? t[i] : {
regex: t[i]
}, a = [], s = function(e) {
if (o.backref) {
if (!(e.hasOwnProperty(o.backref) || +o.backref < e.length)) throw new ReferenceError("Backreference to undefined group: " + o.backref);
a.push(e[o.backref] || "");
} else a.push(e[0]);
};
for (r = 0; r < e.length; ++r) x.forEach(e[r], o.regex, s);
return i !== t.length - 1 && a.length ? n(a, i + 1) : a;
}([ e ], 0);
}, x.replace = function(e, t, n, i) {
var o, a = x.isRegExp(t), s = t.global && "one" !== i || "all" === i, l = (s ? "g" : "") + (t.sticky ? "y" : "") || "noGY", c = t;
return a ? (t[w] = t[w] || {}, c = t[w][l] || (t[w][l] = r(t, {
addG: !!s,
addY: !!t.sticky,
removeG: "one" === i,
isInternalOnly: !0
}))) : s && (c = new RegExp(x.escape(String(t)), "g")), o = _.replace.call(y(e), c, n),
a && t.global && (t.lastIndex = 0), o;
}, x.replaceEach = function(e, t) {
var n, i;
for (n = 0; n < t.length; ++n) i = t[n], e = x.replace(e, i[0], i[1], i[2]);
return e;
}, x.split = function(e, t, n) {
return _.split.call(y(e), t, n);
}, x.test = function(e, t, n, i) {
return !!x.exec(e, t, n, i);
}, x.uninstall = function(e) {
e = f(e), S.astral && e.astral && v(!1), S.natives && e.natives && b(!1);
}, x.union = function(e, t) {
var n, i, r, o, a = /(\()(?!\?)|\\([1-9]\d*)|\\[\s\S]|\[(?:[^\\\]]|\\[\s\S])*]/g, s = [], l = 0, c = function(e, t, r) {
var o = i[l - n];
if (t) {
if (++l, o) return "(?<" + o + ">";
} else if (r) return "\\" + (+r + n);
return e;
};
if (!u(e, "Array") || !e.length) throw new TypeError("Must provide a nonempty array of patterns to merge");
for (o = 0; o < e.length; ++o) r = e[o], x.isRegExp(r) ? (n = l, i = r[w] && r[w].captureNames || [],
s.push(C.replace.call(x(r.source).source, a, c))) : s.push(x.escape(r));
return x(s.join("|"), t);
}, _.exec = function(e) {
var t, n, i, o = this.lastIndex, a = C.exec.apply(this, arguments);
if (a) {
if (!L && a.length > 1 && c(a, "") > -1 && (n = r(this, {
removeG: !0,
isInternalOnly: !0
}), C.replace.call(String(e).slice(a.index), n, function() {
var e, t = arguments.length;
for (e = 1; t - 2 > e; ++e) void 0 === arguments[e] && (a[e] = void 0);
})), this[w] && this[w].captureNames) for (i = 1; i < a.length; ++i) (t = this[w].captureNames[i - 1]) && (a[t] = a[i]);
this.global && !a[0].length && this.lastIndex > a.index && (this.lastIndex = a.index);
}
return this.global || (this.lastIndex = o), a;
}, _.test = function(e) {
return !!_.exec.call(this, e);
}, _.match = function(e) {
var t;
if (x.isRegExp(e)) {
if (e.global) return t = C.match.apply(this, arguments), e.lastIndex = 0, t;
} else e = new RegExp(e);
return _.exec.call(e, y(this));
}, _.replace = function(e, t) {
var n, i, r, o = x.isRegExp(e);
return o ? (e[w] && (i = e[w].captureNames), n = e.lastIndex) : e += "", r = u(t, "Function") ? C.replace.call(String(this), e, function() {
var n, r = arguments;
if (i) for (r[0] = new String(r[0]), n = 0; n < i.length; ++n) i[n] && (r[0][i[n]] = r[n + 1]);
return o && e.global && (e.lastIndex = r[r.length - 2] + r[0].length), t.apply(void 0, r);
}) : C.replace.call(null == this ? this : String(this), e, function() {
var e = arguments;
return C.replace.call(String(t), M, function(t, n, r) {
var o;
if (n) {
if ((o = +n) <= e.length - 3) return e[o] || "";
if ((o = i ? c(i, n) : -1) < 0) throw new SyntaxError("Backreference to undefined group " + t);
return e[o + 1] || "";
}
if ("$" === r) return "$";
if ("&" === r || 0 == +r) return e[0];
if ("`" === r) return e[e.length - 1].slice(0, e[e.length - 2]);
if ("'" === r) return e[e.length - 1].slice(e[e.length - 2] + e[0].length);
if (r = +r, !isNaN(r)) {
if (r > e.length - 3) throw new SyntaxError("Backreference to undefined group " + t);
return e[r] || "";
}
throw new SyntaxError("Invalid token " + t);
});
}), o && (e.lastIndex = e.global ? 0 : n), r;
}, _.split = function(e, t) {
if (!x.isRegExp(e)) return C.split.apply(this, arguments);
var n, i = String(this), r = [], o = e.lastIndex, a = 0;
return t = (void 0 === t ? -1 : t) >>> 0, x.forEach(i, e, function(e) {
e.index + e[0].length > a && (r.push(i.slice(a, e.index)), e.length > 1 && e.index < i.length && Array.prototype.push.apply(r, e.slice(1)),
n = e[0].length, a = e.index + n);
}), a === i.length ? C.test.call(e, "") && !n || r.push("") : r.push(i.slice(a)),
e.lastIndex = o, r.length > t ? r.slice(0, t) : r;
}, x.addToken(/\\([ABCE-RTUVXYZaeg-mopqyz]|c(?![A-Za-z])|u(?![\dA-Fa-f]{4}|{[\dA-Fa-f]+})|x(?![\dA-Fa-f]{2}))/, function(e, t) {
if ("B" === e[1] && t === I) return e[0];
throw new SyntaxError("Invalid escape " + e[0]);
}, {
scope: "all",
leadChar: "\\"
}), x.addToken(/\\u{([\dA-Fa-f]+)}/, function(e, t, n) {
var i = o(e[1]);
if (i > 1114111) throw new SyntaxError("Invalid Unicode code point " + e[0]);
if (65535 >= i) return "\\u" + p(l(i));
if (A && n.indexOf("u") > -1) return e[0];
throw new SyntaxError("Cannot use Unicode code point above \\u{FFFF} without flag u");
}, {
scope: "all",
leadChar: "\\"
}), x.addToken(/\[(\^?)]/, function(e) {
return e[1] ? "[\\s\\S]" : "\\b\\B";
}, {
leadChar: "["
}), x.addToken(/\(\?#[^)]*\)/, function(e, t, n) {
return d(e.input, e.index + e[0].length, n) ? "" : "(?:)";
}, {
leadChar: "("
}), x.addToken(/\s+|#.*/, function(e, t, n) {
return d(e.input, e.index + e[0].length, n) ? "" : "(?:)";
}, {
flag: "x"
}), x.addToken(/\./, function() {
return "[\\s\\S]";
}, {
flag: "s",
leadChar: "."
}), x.addToken(/\\k<([\w$]+)>/, function(e) {
var t = isNaN(e[1]) ? c(this.captureNames, e[1]) + 1 : +e[1], n = e.index + e[0].length;
if (!t || t > this.captureNames.length) throw new SyntaxError("Backreference to undefined group " + e[0]);
return "\\" + t + (n === e.input.length || isNaN(e.input.charAt(n)) ? "" : "(?:)");
}, {
leadChar: "\\"
}), x.addToken(/\\(\d+)/, function(e, t) {
if (!(t === I && /^[1-9]/.test(e[1]) && +e[1] <= this.captureNames.length) && "0" !== e[1]) throw new SyntaxError("Cannot use octal escape or backreference to undefined group " + e[0]);
return e[0];
}, {
scope: "all",
leadChar: "\\"
}), x.addToken(/\(\?P?<([\w$]+)>/, function(e) {
if (!isNaN(e[1])) throw new SyntaxError("Cannot use integer as capture name " + e[0]);
if ("length" === e[1] || "__proto__" === e[1]) throw new SyntaxError("Cannot use reserved word as capture name " + e[0]);
if (c(this.captureNames, e[1]) > -1) throw new SyntaxError("Cannot use same name for multiple groups " + e[0]);
return this.captureNames.push(e[1]), this.hasNamedCapture = !0, "(";
}, {
leadChar: "("
}), x.addToken(/\((?!\?)/, function(e, t, n) {
return n.indexOf("n") > -1 ? "(?:" : (this.captureNames.push(null), "(");
}, {
optionalFlags: "n",
leadChar: "("
}), t.exports = x;
}, {} ]
}, {}, [ 8 ])(8);
}), function(e, t) {
"object" == typeof exports ? module.exports = t() : "function" == typeof define && define.amd ? define("stacktrace", t) : e.printStackTrace = t();
}(this, function() {
function e(t) {
t = t || {
guess: !0
};
var n = t.e || null, i = !!t.guess, r = t.mode || null, o = new e.implementation(), a = o.run(n, r);
return i ? o.guessAnonymousFunctions(a) : a;
}
return e.implementation = function() {}, e.implementation.prototype = {
run: function(e, t) {
return e = e || this.createException(), t = t || this.mode(e), "other" === t ? this.other(arguments.callee) : this[t](e);
},
createException: function() {
try {
this.undef();
} catch (e) {
return e;
}
},
mode: function(e) {
return "undefined" != typeof window && window.navigator.userAgent.indexOf("PhantomJS") > -1 ? "phantomjs" : e.arguments && e.stack ? "chrome" : e.stack && e.sourceURL ? "safari" : e.stack && e.number ? "ie" : e.stack && e.fileName ? "firefox" : e.message && e["opera#sourceloc"] ? e.stacktrace ? e.message.indexOf("\n") > -1 && e.message.split("\n").length > e.stacktrace.split("\n").length ? "opera9" : "opera10a" : "opera9" : e.message && e.stack && e.stacktrace ? e.stacktrace.indexOf("called from line") < 0 ? "opera10b" : "opera11" : e.stack && !e.fileName ? "chrome" : "other";
},
instrumentFunction: function(t, n, i) {
t = t || window;
var r = t[n];
t[n] = function() {
return i.call(this, e().slice(4)), t[n]._instrumented.apply(this, arguments);
}, t[n]._instrumented = r;
},
deinstrumentFunction: function(e, t) {
e[t].constructor === Function && e[t]._instrumented && e[t]._instrumented.constructor === Function && (e[t] = e[t]._instrumented);
},
chrome: function(e) {
return (e.stack + "\n").replace(/^[\s\S]+?\s+at\s+/, " at ").replace(/^\s+(at eval )?at\s+/gm, "").replace(/^([^\(]+?)([\n$])/gm, "{anonymous}() ($1)$2").replace(/^Object.<anonymous>\s*\(([^\)]+)\)/gm, "{anonymous}() ($1)").replace(/^(.+) \((.+)\)$/gm, "$1@$2").split("\n").slice(0, -1);
},
safari: function(e) {
return e.stack.replace(/\[native code\]\n/m, "").replace(/^(?=\w+Error\:).*$\n/m, "").replace(/^@/gm, "{anonymous}()@").split("\n");
},
ie: function(e) {
return e.stack.replace(/^\s*at\s+(.*)$/gm, "$1").replace(/^Anonymous function\s+/gm, "{anonymous}() ").replace(/^(.+)\s+\((.+)\)$/gm, "$1@$2").split("\n").slice(1);
},
firefox: function(e) {
return e.stack.replace(/(?:\n@:0)?\s+$/m, "").replace(/^(?:\((\S*)\))?@/gm, "{anonymous}($1)@").split("\n");
},
opera11: function(e) {
for (var t = /^.*line (\d+), column (\d+)(?: in (.+))? in (\S+):$/, n = e.stacktrace.split("\n"), i = [], r = 0, o = n.length; o > r; r += 2) {
var a = t.exec(n[r]);
if (a) {
var s = a[4] + ":" + a[1] + ":" + a[2], l = a[3] || "global code";
l = l.replace(/<anonymous function: (\S+)>/, "$1").replace(/<anonymous function>/, "{anonymous}"),
i.push(l + "@" + s + " -- " + n[r + 1].replace(/^\s+/, ""));
}
}
return i;
},
opera10b: function(e) {
for (var t = /^(.*)@(.+):(\d+)$/, n = e.stacktrace.split("\n"), i = [], r = 0, o = n.length; o > r; r++) {
var a = t.exec(n[r]);
if (a) {
var s = a[1] ? a[1] + "()" : "global code";
i.push(s + "@" + a[2] + ":" + a[3]);
}
}
return i;
},
opera10a: function(e) {
for (var t = /Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i, n = e.stacktrace.split("\n"), i = [], r = 0, o = n.length; o > r; r += 2) {
var a = t.exec(n[r]);
if (a) {
var s = a[3] || "{anonymous}";
i.push(s + "()@" + a[2] + ":" + a[1] + " -- " + n[r + 1].replace(/^\s+/, ""));
}
}
return i;
},
opera9: function(e) {
for (var t = /Line (\d+).*script (?:in )?(\S+)/i, n = e.message.split("\n"), i = [], r = 2, o = n.length; o > r; r += 2) {
var a = t.exec(n[r]);
a && i.push("{anonymous}()@" + a[2] + ":" + a[1] + " -- " + n[r + 1].replace(/^\s+/, ""));
}
return i;
},
phantomjs: function(e) {
for (var t = /(\S+) \((\S+)\)/i, n = e.stack.split("\n"), i = [], r = 1, o = n.length; o > r; r++) {
n[r] = n[r].replace(/^\s+at\s+/gm, "");
var a = t.exec(n[r]);
i.push(a ? a[1] + "()@" + a[2] : "{anonymous}()@" + n[r]);
}
return i;
},
other: function(e) {
for (var t, n, i = /function(?:\s+([\w$]+))?\s*\(/, r = [], o = Array.prototype.slice; e && r.length < 10; ) {
t = i.test(e.toString()) ? RegExp.$1 || "{anonymous}" : "{anonymous}";
try {
n = o.call(e.arguments || []);
} catch (e) {
n = [ "Cannot access arguments: " + e ];
}
r[r.length] = t + "(" + this.stringifyArguments(n) + ")";
try {
e = e.caller;
} catch (e) {
r[r.length] = "Cannot access caller: " + e;
break;
}
}
return r;
},
stringifyArguments: function(e) {
for (var t = [], n = Array.prototype.slice, i = 0; i < e.length; ++i) {
var r = e[i];
void 0 === r ? t[i] = "undefined" : null === r ? t[i] = "null" : r.constructor && (t[i] = r.constructor === Array ? r.length < 3 ? "[" + this.stringifyArguments(r) + "]" : "[" + this.stringifyArguments(n.call(r, 0, 1)) + "..." + this.stringifyArguments(n.call(r, -1)) + "]" : r.constructor === Object ? "#object" : r.constructor === Function ? "#function" : r.constructor === String ? '"' + r + '"' : r.constructor === Number ? r : "?");
}
return t.join(",");
},
sourceCache: {},
ajax: function(e) {
var t = this.createXMLHTTPObject();
if (t) try {
return t.open("GET", e, !1), t.send(null), t.responseText;
} catch (e) {}
return "";
},
createXMLHTTPObject: function() {
for (var e, t = [ function() {
return new XMLHttpRequest();
}, function() {
return new ActiveXObject("Msxml2.XMLHTTP");
}, function() {
return new ActiveXObject("Msxml3.XMLHTTP");
}, function() {
return new ActiveXObject("Microsoft.XMLHTTP");
} ], n = 0; n < t.length; n++) try {
return e = t[n](), this.createXMLHTTPObject = t[n], e;
} catch (e) {}
},
isSameDomain: function(e) {
return "undefined" != typeof location && -1 !== e.indexOf(location.hostname);
},
getSource: function(e) {
return e in this.sourceCache || (this.sourceCache[e] = this.ajax(e).split("\n")),
this.sourceCache[e];
},
guessAnonymousFunctions: function(e) {
for (var t = 0; t < e.length; ++t) {
var n = /\{anonymous\}\(.*\)@(.*)/, i = /^(.*?)(?::(\d+))(?::(\d+))?(?: -- .+)?$/, r = e[t], o = n.exec(r);
if (o) {
var a = i.exec(o[1]);
if (a) {
var s = a[1], l = a[2], c = a[3] || 0;
if (s && this.isSameDomain(s) && l) {
var u = this.guessAnonymousFunction(s, l, c);
e[t] = r.replace("{anonymous}", u);
}
}
}
}
return e;
},
guessAnonymousFunction: function(e, t) {
var n;
try {
n = this.findFunctionName(this.getSource(e), t);
} catch (t) {
n = "getSource failed with url: " + e + ", exception: " + t.toString();
}
return n;
},
findFunctionName: function(e, t) {
for (var n, i, r, o = /function\s+([^(]*?)\s*\(([^)]*)\)/, a = /['"]?([$_A-Za-z][$_A-Za-z0-9]*)['"]?\s*[:=]\s*function\b/, s = /['"]?([$_A-Za-z][$_A-Za-z0-9]*)['"]?\s*[:=]\s*(?:eval|new Function)\b/, l = "", c = Math.min(t, 20), u = 0; c > u; ++u) if (n = e[t - u - 1],
r = n.indexOf("//"), r >= 0 && (n = n.substr(0, r)), n) {
if (l = n + l, (i = a.exec(l)) && i[1]) return i[1];
if ((i = o.exec(l)) && i[1]) return i[1];
if ((i = s.exec(l)) && i[1]) return i[1];
}
return "(?)";
}
}, e;
});
var saveAs = saveAs || function(e) {
"use strict";
if (!(void 0 === e || "undefined" != typeof navigator && /MSIE [1-9]\./.test(navigator.userAgent))) {
var t = e.document, n = function() {
return e.URL || e.webkitURL || e;
}, i = t.createElementNS("http://www.w3.org/1999/xhtml", "a"), r = "download" in i, o = function(e) {
var t = new MouseEvent("click");
e.dispatchEvent(t);
}, a = /constructor/i.test(e.HTMLElement) || e.safari, s = /CriOS\/[\d]+/.test(navigator.userAgent), l = function(t) {
(e.setImmediate || e.setTimeout)(function() {
throw t;
}, 0);
}, c = function(e) {
var t = function() {
"string" == typeof e ? n().revokeObjectURL(e) : e.remove();
};
setTimeout(t, 4e4);
}, u = function(e, t, n) {
t = [].concat(t);
for (var i = t.length; i--; ) {
var r = e["on" + t[i]];
if ("function" == typeof r) try {
r.call(e, n || e);
} catch (e) {
l(e);
}
}
}, d = function(e) {
return /^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type) ? new Blob([ String.fromCharCode(65279), e ], {
type: e.type
}) : e;
}, p = function(t, l, p) {
p || (t = d(t));
var h, f = this, m = t.type, g = "application/octet-stream" === m, v = function() {
u(f, "writestart progress write writeend".split(" "));
};
return f.readyState = f.INIT, r ? (h = n().createObjectURL(t), void setTimeout(function() {
i.href = h, i.download = l, o(i), v(), c(h), f.readyState = f.DONE;
})) : void !function() {
if ((s || g && a) && e.FileReader) {
var i = new FileReader();
return i.onloadend = function() {
var t = s ? i.result : i.result.replace(/^data:[^;]*;/, "data:attachment/file;");
e.open(t, "_blank") || (e.location.href = t), t = void 0, f.readyState = f.DONE,
v();
}, i.readAsDataURL(t), void (f.readyState = f.INIT);
}
h || (h = n().createObjectURL(t)), g ? e.location.href = h : e.open(h, "_blank") || (e.location.href = h),
f.readyState = f.DONE, v(), c(h);
}();
}, h = p.prototype, f = function(e, t, n) {
return new p(e, t || e.name || "download", n);
};
return "undefined" != typeof navigator && navigator.msSaveOrOpenBlob ? function(e, t, n) {
return t = t || e.name || "download", n || (e = d(e)), navigator.msSaveOrOpenBlob(e, t);
} : (h.abort = function() {}, h.readyState = h.INIT = 0, h.WRITING = 1, h.DONE = 2,
h.error = h.onwritestart = h.onprogress = h.onwrite = h.onabort = h.onerror = h.onwriteend = null,
f);
}
}("undefined" != typeof self && self || "undefined" != typeof window && window || this.content);
"undefined" != typeof module && module.exports ? module.exports.saveAs = saveAs : "undefined" != typeof define && null !== define && null !== define.amd && define("FileSaver.js", [], function() {
return saveAs;
}), define("FileSaver", function(e) {
return function() {
return e.saveAs;
};
}(this)), define("utils", [ "jquery", "underscore", "storage", "crel", "xregexp", "stacktrace", "FileSaver" ], function($, _, storage, crel, XRegExp, printStackTrace, saveAs) {
function jqElt(e) {
return _.isString(e) || !e.val ? $(e) : e;
}
function inputError(e, t) {
void 0 !== t && (e.stop(!0, !0).addClass("error").delay(3e3).queue(function() {
$(this).removeClass("error"), $(this).dequeue();
}), t.stopPropagation());
}
function getInputNumValue(e, t, n, i, r) {
t = jqElt(t);
var o = utils.getInputTextValue(t, n);
return void 0 !== o ? (o = e ? parseFloat(o) : parseInt(o, 10), isNaN(o) || void 0 !== i && i > o || void 0 !== r && o > r ? void inputError(t, n) : o) : void 0;
}
function padNumber(e, t, n) {
var i = "";
for (0 > e && (i = "-", e = -e), e = "" + e; e.length < t; ) e = "0" + e;
return n && (e = e.substr(e.length - t)), i + e;
}
function dateGetter(e, t, n, i) {
return n = n || 0, function(r) {
var o = r["get" + e]();
return (n > 0 || o > -n) && (o += n), 0 === o && -12 == n && (o = 12), padNumber(o, t, i);
};
}
function dateStrGetter(e, t) {
return function(n, i) {
var r = n["get" + e]();
return i[(t ? "SHORT" + e : e).toUpperCase()][r];
};
}
var utils = {};
utils.msie = function() {
var e = parseInt((/msie (\d+)/.exec(navigator.userAgent.toLowerCase()) || [])[1], 10);
return isNaN(e) && (e = parseInt((/trident\/.*; rv:(\d+)/.exec(navigator.userAgent.toLowerCase()) || [])[1], 10)),
e;
}(), utils.urlResolve = function() {
var e = document.createElement("a");
return function(t) {
var n = t;
return utils.msie && (e.setAttribute("href", n), n = e.href), e.setAttribute("href", n),
{
href: e.href,
protocol: e.protocol ? e.protocol.replace(/:$/, "") : "",
host: e.host,
search: e.search ? e.search.replace(/^\?/, "") : "",
hash: e.hash ? e.hash.replace(/^#/, "") : "",
hostname: e.hostname,
port: e.port,
pathname: "/" === e.pathname.charAt(0) ? e.pathname : "/" + e.pathname
};
};
}(), utils.defer = function() {
var e = [];
return window.addEventListener("message", function(t) {
t.source == window && "deferMsg" == t.data && (t.stopPropagation(), e.length > 0 && e.shift()());
}, !0), function(t) {
e.push(t), window.postMessage("deferMsg", "*");
};
}(), utils.debounce = function(e, t) {
function n() {
i = !1, e.call(t);
}
var i = !1;
return function() {
!0 !== i && (i = !0, utils.defer(n));
};
};
var idAlphabet = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
utils.id = function() {
for (var e = [], t = 0; 24 > t; t++) e.push(idAlphabet[Math.random() * idAlphabet.length | 0]);
return e.join("");
}, utils.getURLParameter = function(e) {
var t = new RegExp("(?:\\?|\\#\\!|&)" + e + "=(.+?)(?:&|\\#|$)");
try {
return decodeURIComponent(t.exec(location.search + location.hash)[1]);
} catch (e) {
return;
}
}, utils.getInputValue = function(e) {
return e = jqElt(e), e.val();
}, utils.setInputValue = function(e, t) {
e = jqElt(e), e.val(t);
}, utils.getInputTextValue = function(e, t, n) {
e = jqElt(e);
var i = e.val();
return void 0 === i ? void inputError(e, t) : (i = utils.trim(i), 0 === i.length || void 0 !== n && !i.match(n) ? void inputError(e, t) : i);
}, utils.getInputIntValue = _.partial(getInputNumValue, !1), utils.getInputFloatValue = _.partial(getInputNumValue, !0),
utils.getInputRegExpValue = function(e, t) {
e = jqElt(e);
var n = utils.getInputTextValue(e, t);
if (void 0 !== n) {
try {
new RegExp(n);
} catch (n) {
return void inputError(e, t);
}
return n;
}
}, utils.getInputJsValue = function(element, event) {
element = jqElt(element);
var value = utils.getInputTextValue(element, event);
if (void 0 !== value) {
try {
eval("var test=" + value);
} catch (t) {
return void inputError(element, event);
}
return value;
}
}, utils.getInputJSONValue = function(e, t) {
e = jqElt(e);
var n = utils.getInputTextValue(e, t);
if (void 0 !== n) {
try {
JSON.parse(n);
} catch (n) {
return void inputError(e, t);
}
return n;
}
}, utils.getInputChecked = function(e) {
return e = jqElt(e), e.prop("checked");
}, utils.setInputChecked = function(e, t) {
e = jqElt(e), e.prop("checked", t).change();
}, utils.getInputRadio = function(e) {
return $("input:radio[name=" + e + "]:checked").prop("value");
}, utils.setInputRadio = function(e, t) {
$("input:radio[name=" + e + "][value=" + t + "]").prop("checked", !0).change();
}, utils.resetModalInputs = function() {
$(".modal input[type=text]:not([disabled]), .modal input[type=password], .modal textarea").val(""),
$(".modal input[type=checkbox]").prop("checked", !1).change();
}, utils.trim = function(e) {
return $.trim(e);
};
var nonWordChars = XRegExp("[^\\p{L}\\p{N}-]", "g");
utils.slugify = function(e) {
return e.toLowerCase().replace(/\s/g, "-").replace(nonWordChars, "").replace(/\-\-+/g, "-").replace(/^-+/, "").replace(/-+$/, "");
}, utils.checkUrl = function(e, t) {
return e ? (0 !== e.indexOf("http") && (e = "http://" + e), t && -1 === e.indexOf("/", e.length - 1) && (e += "/"),
e) : e;
}, utils.addModal = function(e, t) {
var n = crel("div", {
"class": "modal " + e
});
n.innerHTML = t, document.body.appendChild(n);
}, utils.createBackdrop = function(e) {
var t = crel("div", {
"class": "modal-backdrop fade"
});
return e = e || document.body, e.appendChild(t), t.offsetWidth, t.className = t.className + " in",
t.removeBackdrop = function() {
t.className = "modal-backdrop fade", setTimeout(function() {
t.parentNode.removeChild(t);
}, 150);
}, t;
};
var openedTooltip;
utils.createTooltip = function(e, t) {
_.each(document.querySelectorAll(e), function(e) {
var n = $(e);
n.tooltip({
html: !0,
container: n.parents(".modal-content"),
placement: "right",
trigger: "manual",
title: t
}).click(function() {
var e = this;
openedTooltip && openedTooltip[0] === e || utils.defer(function() {
openedTooltip = $(e).tooltip("show");
});
});
});
}, utils.popupWindow = function(e, t, n, i) {
var r = screen.width / 2 - n / 2, o = screen.height / 2 - i / 2;
return window.open(e, t, [ "toolbar=no, ", "location=no, ", "directories=no, ", "status=no, ", "menubar=no, ", "scrollbars=no, ", "resizable=no, ", "copyhistory=no, ", "width=" + n + ", ", "height=" + i + ", ", "top=" + o + ", ", "left=" + r ].join(""));
};
var $windowElt = $(window);
utils.iframe = function(e, t, n) {
function i() {
var e = window.innerWidth - 20;
e > t && (e = t);
var i = window.innerHeight - 50;
i > n && (i = n), a.setAttribute("width", e), a.setAttribute("height", i);
}
function r() {
o.off("click.backdrop"), o[0].removeBackdrop(), $windowElt.off("resize.iframe"),
a.parentNode.removeChild(a);
}
var o = $(utils.createBackdrop()), a = crel("iframe", {
src: e,
frameborder: 0,
"class": "modal-content modal-iframe"
});
return document.body.appendChild(a), i(), $windowElt.on("resize.iframe", i), a.removeIframe = r,
o.on("click.backdrop", r), a;
};
var redirectCallbackConfirm, redirectCallbackCancel;
utils.redirectConfirm = function(e, t, n) {
redirectCallbackConfirm = t, redirectCallbackCancel = n, $(".modal-redirect-confirm .redirect-msg").html(e),
$(".modal-redirect-confirm").modal("show");
}, utils.init = function() {
$(".action-redirect-confirm").click(function() {
redirectCallbackCancel = void 0, redirectCallbackConfirm();
}), $(".modal-redirect-confirm").on("hidden.bs.modal", function() {
_.defer(function() {
redirectCallbackCancel && redirectCallbackCancel();
});
}), $(document).on("click", function() {
openedTooltip && openedTooltip.tooltip("hide"), openedTooltip = void 0;
}), $(document).on("click", ".tooltip", function(e) {
e.stopPropagation();
});
}, utils.lockUI = function(e) {
var t = $([ "#wmd-input", "#preview-contents", ".navbar .file-title-navbar", ".navbar .left-buttons", ".navbar .right-buttons", ".navbar .buttons-dropdown" ].join(",")).hide();
return function() {
t.show(), e && e.apply(null, arguments);
};
};
var entityMap = {
"&": "&amp;",
"<": "&lt;",
'"': "&quot;",
"'": "&#39;",
"/": "&#x2F;",
"\xa0": " "
};
utils.escape = function(e) {
return String(e).replace(/[&<"'\/\u00a0]/g, function(e) {
return entityMap[e];
});
}, utils.saveAs = function(e, t) {
if (void 0 === saveAs || /constructor/i.test(window.HTMLElement)) if (_.isString(e)) {
var n = "data:application/octet-stream;base64," + utils.encodeBase64(e);
window.open(n, "file");
} else {
var i = new FileReader();
i.onload = function(e) {
utils.redirectConfirm("You are opening a PDF document.", function() {
var t = "data:application/pdf;" + e.target.result.substring(e.target.result.indexOf("base64"));
window.open(t, "file");
});
}, i.readAsDataURL(e);
} else _.isString(e) && (e = new Blob([ e ], {
type: "text/plain;charset=utf-8"
})), saveAs(e, t);
}, utils.updateCurrentTime = function() {
utils.currentTime = Date.now();
}, utils.updateCurrentTime(), utils.storeAttributes = function(e) {
var t = e.syncIndex || e.publishIndex, n = _.omit(e, "syncIndex", "publishIndex", "provider");
n.provider = e.provider.providerId, storage[t] = JSON.stringify(n);
}, utils.retrieveIndexArray = function(e) {
try {
return _.compact(storage[e].split(";"));
} catch (t) {
return storage[e] = ";", [];
}
}, utils.appendIndexToArray = function(e, t) {
storage[e] += t + ";";
}, utils.removeIndexFromArray = function(e, t) {
storage[e] = storage[e].replace(";" + t + ";", ";");
}, utils.retrieveIgnoreError = function(e) {
try {
return JSON.parse(storage[e]);
} catch (e) {
return;
}
};
var eventList = [];
utils.logValue = function(e) {
eventList.unshift(e), eventList.length > 5 && eventList.pop();
}, utils.logStackTrace = function() {
eventList.unshift(printStackTrace()), eventList.length > 5 && eventList.pop();
}, utils.formatEventList = function() {
var e = [];
return _.each(eventList, function(t) {
e.push("\n"), _.isString(t) ? e.push(t) : _.isArray(t) && (e.push(t[5] || ""), e.push(t[6] || ""));
}), e.join("");
};
var DATE_FORMATS_SPLIT = /((?:[^yMdHhmsaZE']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+|H+|h+|m+|s+|a|Z))(.*)/, DATE_FORMATS = {
yyyy: dateGetter("FullYear", 4),
yy: dateGetter("FullYear", 2, 0, !0),
y: dateGetter("FullYear", 1),
MMMM: dateStrGetter("Month"),
MMM: dateStrGetter("Month", !0),
MM: dateGetter("Month", 2, 1),
M: dateGetter("Month", 1, 1),
dd: dateGetter("Date", 2),
d: dateGetter("Date", 1),
HH: dateGetter("Hours", 2),
H: dateGetter("Hours", 1),
hh: dateGetter("Hours", 2, -12),
h: dateGetter("Hours", 1, -12),
mm: dateGetter("Minutes", 2),
m: dateGetter("Minutes", 1),
ss: dateGetter("Seconds", 2),
s: dateGetter("Seconds", 1),
sss: dateGetter("Milliseconds", 3),
EEEE: dateStrGetter("Day"),
EEE: dateStrGetter("Day", !0)
}, DATETIME_FORMATS = {
MONTH: "January,February,March,April,May,June,July,August,September,October,November,December".split(","),
SHORTMONTH: "Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),
DAY: "Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),
SHORTDAY: "Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(","),
AMPMS: [ "AM", "PM" ],
medium: "MMM d, y h:mm:ss a",
"short": "M/d/yy h:mm a",
fullDate: "EEEE, MMMM d, y",
longDate: "MMMM d, y",
mediumDate: "MMM d, y",
shortDate: "M/d/yy",
mediumTime: "h:mm:ss a",
shortTime: "h:mm a"
};
utils.formatDate = function(e) {
var t, n, i = "", r = [], o = Date.now() - e, a = "HH:mm";
for (o > 3155694e4 ? a = "y" : o > 864e5 && (a = "MMM d"), e = new Date(e); a; ) n = DATE_FORMATS_SPLIT.exec(a),
n ? (r = r.concat(n.slice(1)), a = r.pop()) : (r.push(a), a = null);
return r.forEach(function(n) {
t = DATE_FORMATS[n], i += t ? t(e, DATETIME_FORMATS) : n.replace(/(^'|'$)/g, "").replace(/''/g, "'");
}), i;
}, utils.encodeBase64 = function(e) {
if (0 === e.length) return "";
var t, n, i = [], r = 0;
for (e = encodeURI(e), t = e.length; t > r; ) n = e[r], r += 1, "%" !== n ? i.push(n.charCodeAt(0)) : (n = e[r] + e[r + 1],
i.push(parseInt(n, 16)), r += 2);
var o, a, s = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", l = [], c = i.length - i.length % 3;
for (o = 0; c > o; o += 3) a = i[o] << 16 | i[o + 1] << 8 | i[o + 2], l.push(s.charAt(a >> 18)),
l.push(s.charAt(a >> 12 & 63)), l.push(s.charAt(a >> 6 & 63)), l.push(s.charAt(63 & a));
switch (i.length - c) {
case 1:
a = i[o] << 16, l.push(s.charAt(a >> 18) + s.charAt(a >> 12 & 63) + "==");
break;
case 2:
a = i[o] << 16 | i[o + 1] << 8, l.push(s.charAt(a >> 18) + s.charAt(a >> 12 & 63) + s.charAt(a >> 6 & 63) + "=");
}
return l.join("");
}, utils.decodeBase64 = function(e) {
return decodeURIComponent(window.escape(window.atob(e)));
};
var mHash = [ 0, 1996959894, 3993919788, 2567524794, 124634137, 1886057615, 3915621685, 2657392035, 249268274, 2044508324, 3772115230, 2547177864, 162941995, 2125561021, 3887607047, 2428444049, 498536548, 1789927666, 4089016648, 2227061214, 450548861, 1843258603, 4107580753, 2211677639, 325883990, 1684777152, 4251122042, 2321926636, 335633487, 1661365465, 4195302755, 2366115317, 997073096, 1281953886, 3579855332, 2724688242, 1006888145, 1258607687, 3524101629, 2768942443, 901097722, 1119000684, 3686517206, 2898065728, 853044451, 1172266101, 3705015759, 2882616665, 651767980, 1373503546, 3369554304, 3218104598, 565507253, 1454621731, 3485111705, 3099436303, 671266974, 1594198024, 3322730930, 2970347812, 795835527, 1483230225, 3244367275, 3060149565, 1994146192, 31158534, 2563907772, 4023717930, 1907459465, 112637215, 2680153253, 3904427059, 2013776290, 251722036, 2517215374, 3775830040, 2137656763, 141376813, 2439277719, 3865271297, 1802195444, 476864866, 2238001368, 4066508878, 1812370925, 453092731, 2181625025, 4111451223, 1706088902, 314042704, 2344532202, 4240017532, 1658658271, 366619977, 2362670323, 4224994405, 1303535960, 984961486, 2747007092, 3569037538, 1256170817, 1037604311, 2765210733, 3554079995, 1131014506, 879679996, 2909243462, 3663771856, 1141124467, 855842277, 2852801631, 3708648649, 1342533948, 654459306, 3188396048, 3373015174, 1466479909, 544179635, 3110523913, 3462522015, 1591671054, 702138776, 2966460450, 3352799412, 1504918807, 783551873, 3082640443, 3233442989, 3988292384, 2596254646, 62317068, 1957810842, 3939845945, 2647816111, 81470997, 1943803523, 3814918930, 2489596804, 225274430, 2053790376, 3826175755, 2466906013, 167816743, 2097651377, 4027552580, 2265490386, 503444072, 1762050814, 4150417245, 2154129355, 426522225, 1852507879, 4275313526, 2312317920, 282753626, 1742555852, 4189708143, 2394877945, 397917763, 1622183637, 3604390888, 2714866558, 953729732, 1340076626, 3518719985, 2797360999, 1068828381, 1219638859, 3624741850, 2936675148, 906185462, 1090812512, 3747672003, 2825379669, 829329135, 1181335161, 3412177804, 3160834842, 628085408, 1382605366, 3423369109, 3138078467, 570562233, 1426400815, 3317316542, 2998733608, 733239954, 1555261956, 3268935591, 3050360625, 752459403, 1541320221, 2607071920, 3965973030, 1969922972, 40735498, 2617837225, 3943577151, 1913087877, 83908371, 2512341634, 3803740692, 2075208622, 213261112, 2463272603, 3855990285, 2094854071, 198958881, 2262029012, 4057260610, 1759359992, 534414190, 2176718541, 4139329115, 1873836001, 414664567, 2282248934, 4279200368, 1711684554, 285281116, 2405801727, 4167216745, 1634467795, 376229701, 2685067896, 3608007406, 1308918612, 956543938, 2808555105, 3495958263, 1231636301, 1047427035, 2932959818, 3654703836, 1088359270, 936918e3, 2847714899, 3736837829, 1202900863, 817233897, 3183342108, 3401237130, 1404277552, 615818150, 3134207493, 3453421203, 1423857449, 601450431, 3009837614, 3294710456, 1567103746, 711928724, 3020668471, 3272380065, 1510334235, 755167117 ];
return utils.crc32 = function(e) {
var t = 0, n = -1;
return e.split("").forEach(function(e) {
t = 255 & (n ^ e.charCodeAt(0)), n = n >>> 8 ^ mHash[t];
}), n ^= -1, 0 > n && (n = 4294967295 + n + 1), n.toString(16);
}, window.perfTest = function(e) {
for (var t = Date.now(), n = 0; 1e4 > n; n++) e();
console.log("Run 10,000 times in " + (Date.now() - t) + "ms");
}, utils;
}), define("constants", [], function() {
var e = {};
return e.VERSION = "4.3.18", e.MAIN_URL = "https://stackedit.io/", e.GOOGLE_ANALYTICS_ACCOUNT_ID = "UA-39556145-1",
e.GOOGLE_API_KEY = "AIzaSyAeCU8CGcSkn0z9js6iocHuPBX4f_mMWkw", e.GOOGLE_DRIVE_APP_ID = "241271498917",
e.DROPBOX_APP_KEY = "lq6mwopab8wskas", e.DROPBOX_APP_SECRET = "851fgnucpezy84t",
e.DROPBOX_RESTRICTED_APP_KEY = "sw0hlixhr8q1xk0", e.DROPBOX_RESTRICTED_APP_SECRET = "1r808p2xygs6lbg",
e.BITLY_ACCESS_TOKEN = "317e033bfd48cf31155a68a536b1860013b09c4c", e.DEFAULT_FILE_TITLE = "Title",
e.DEFAULT_FOLDER_NAME = "New folder", e.GDRIVE_DEFAULT_FILE_TITLE = "New Markdown document",
e.EDITOR_DEFAULT_PADDING = 35, e.CHECK_ONLINE_PERIOD = 12e4, e.AJAX_TIMEOUT = 3e4,
e.ASYNC_TASK_DEFAULT_TIMEOUT = 6e4, e.ASYNC_TASK_LONG_TIMEOUT = 18e4, e.USER_IDLE_THRESHOLD = 3e5,
e.IMPORT_FILE_MAX_CONTENT_SIZE = 1e5, e.IMPORT_IMG_MAX_CONTENT_SIZE = 1e7, e.COUCHDB_PAGE_SIZE = 25,
e.TEMPORARY_FILE_INDEX = "file.tempIndex", e.WELCOME_DOCUMENT_TITLE = "Hello!",
e.DOWNLOAD_IMPORT_URL = "/downloadImport", e.PICASA_IMPORT_IMG_URL = "/picasaImportImg",
e.SSH_PUBLISH_URL = "/sshPublish", e.PDF_EXPORT_URL = "/pdfExport", e.COUCHDB_URL = "https://stackedit.smileupps.com/documents",
e.BASE_URL = "http://localhost/", e.GOOGLE_CLIENT_ID = "241271498917-lev37kef013q85avc91am1gccg5g8lrb.apps.googleusercontent.com",
e.GITHUB_CLIENT_ID = "e47fef6055344579799d", e.GATEKEEPER_URL = "https://stackedit-gatekeeper-localhost.herokuapp.com/",
e.TUMBLR_PROXY_URL = "https://stackedit-tumblr-proxy-local.herokuapp.com/", e.WORDPRESS_CLIENT_ID = "23361",
e.WORDPRESS_PROXY_URL = "https://stackedit-io-wordpress-proxy.herokuapp.com/", 0 === location.hostname.indexOf("stackedit.io") ? (e.BASE_URL = e.MAIN_URL,
e.GOOGLE_CLIENT_ID = "241271498917-t4t7d07qis7oc0ahaskbif3ft6tk63cd.apps.googleusercontent.com",
e.GITHUB_CLIENT_ID = "710fc67886ab1ae8fee6", e.GATEKEEPER_URL = "https://stackedit-io-gatekeeper.herokuapp.com/",
e.TUMBLR_PROXY_URL = "https://stackedit-io-tumblr-proxy.herokuapp.com/") : 0 === location.hostname.indexOf("benweet.github.io") ? (e.BASE_URL = "http://benweet.github.io/stackedit/",
e.GOOGLE_CLIENT_ID = "241271498917-jpto9lls9fqnem1e4h6ppds9uob8rpvu.apps.googleusercontent.com",
e.GITHUB_CLIENT_ID = "fa0d09514da8377ee32e", e.GATEKEEPER_URL = "https://stackedit-gatekeeper.herokuapp.com/",
e.TUMBLR_PROXY_URL = "https://stackedit-tumblr-proxy.herokuapp.com/", e.WORDPRESS_CLIENT_ID = "3185",
e.WORDPRESS_PROXY_URL = "https://stackedit-wordpress-proxy.herokuapp.com/") : 0 === location.hostname.indexOf("stackedit-beta.herokuapp.com") ? (e.BASE_URL = "https://stackedit-beta.herokuapp.com/",
e.GOOGLE_CLIENT_ID = "241271498917-9bbplknkt0ljv5gaudhoiogp13hd18be.apps.googleusercontent.com",
e.GITHUB_CLIENT_ID = "e9034ae191c3a8a1c5ed", e.GATEKEEPER_URL = "https://stackedit-beta-gatekeeper.herokuapp.com/",
e.TUMBLR_PROXY_URL = "https://stackedit-beta-tumblr-proxy.herokuapp.com/", e.WORDPRESS_CLIENT_ID = "34786",
e.WORDPRESS_PROXY_URL = "https://stackedit-beta-wordpress-proxy.herokuapp.com/") : 0 === location.hostname.indexOf("benweet.insomnia247.nl") && (e.BASE_URL = "http://benweet.insomnia247.nl/stackedit/",
e.GOOGLE_CLIENT_ID = "241271498917-52hae7a08hv7ltenv7km8h7lghno9sk3.apps.googleusercontent.com",
e.GITHUB_CLIENT_ID = "d2943d6074b2d9c4a830", e.GATEKEEPER_URL = "https://stackedit-gatekeeper-insomnia.herokuapp.com/",
e.TUMBLR_PROXY_URL = "https://stackedit-tumblr-proxy-beta.herokuapp.com/"), e.THEME_LIST = {
blue: "Blue",
"default": "Default",
gray: "Gray",
night: "Night",
school: "School",
"solarized-light": "Solarized Light",
"solarized-dark": "Solarized Dark"
}, e;
}), define("settings", [ "underscore", "constants", "storage" ], function(e, t, n) {
var i = {
layoutOrientation: "horizontal",
editMode: "ltr",
lazyRendering: !0,
editorFontClass: "font-rich",
fontSizeRatio: 1,
maxWidthRatio: 1,
cursorFocusRatio: .5,
defaultContent: "\n\n\n> Written with [StackEdit](" + t.MAIN_URL + ").",
commitMsg: "Published with " + t.MAIN_URL,
conflictMode: "merge",
markdownMimeType: "text/plain",
gdriveMultiAccount: 1,
gdriveFullAccess: !0,
dropboxFullAccess: !0,
githubFullAccess: !0,
template: [ "<!DOCTYPE html>", "<html>", "<head>", '<meta charset="utf-8">', '<meta name="viewport" content="width=device-width, initial-scale=1.0">', "<title><%= documentTitle %></title>", '<link rel="stylesheet" href="' + t.MAIN_URL + 'res-min/themes/base.css" />', '<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML"></script>', "</head>", '<body><div class="container"><%= documentHTML %></div></body>', "</html>" ].join("\n"),
pdfTemplate: [ "<!DOCTYPE html>", "<html>", "<head>", '<meta charset="utf-8">', "<title><%= documentTitle %></title>", '<link rel="stylesheet" href="http://localhost/res-min/themes/base.css" />', '<script type="text/x-mathjax-config">', 'MathJax.Hub.Config({ messageStyle: "none" });', "</script>", '<script type="text/javascript" src="http://localhost/res/bower-libs/MathJax/MathJax.js?config=TeX-AMS_HTML"></script>', "</head>", "<body><%= documentHTML %></body>", "</html>" ].join("\n"),
pdfOptions: [ "{", ' "marginTop": 25,', ' "marginRight": 25,', ' "marginBottom": 25,', ' "marginLeft": 25,', ' "pageSize": "A4"', "}" ].join("\n"),
couchdbUrl: t.COUCHDB_URL,
extensionSettings: {}
};
try {
e.extend(i, JSON.parse(n.settings));
} catch (e) {}
return i;
}), function(e, t) {
function n(e, t, n) {
return e.addEventListener ? void e.addEventListener(t, n, !1) : void e.attachEvent("on" + t, n);
}
function i(e) {
if ("keypress" == e.type) {
var t = String.fromCharCode(e.which);
return e.shiftKey || (t = t.toLowerCase()), t;
}
return _[e.which] ? _[e.which] : k[e.which] ? k[e.which] : String.fromCharCode(e.which).toLowerCase();
}
function r(e, t) {
return e.sort().join(",") === t.sort().join(",");
}
function o(e) {
e = e || {};
var t, n = !1;
for (t in N) e[t] ? n = !0 : N[t] = 0;
n || (A = !1);
}
function a(e, t, n, i, o, a) {
var s, l, c = [], u = n.type;
if (!I[e]) return [];
for ("keyup" == u && h(e) && (t = [ e ]), s = 0; s < I[e].length; ++s) if (l = I[e][s],
(i || !l.seq || N[l.seq] == l.level) && u == l.action && ("keypress" == u && !n.metaKey && !n.ctrlKey || r(t, l.modifiers))) {
var d = !i && l.combo == o, p = i && l.seq == i && l.level == a;
(d || p) && I[e].splice(s, 1), c.push(l);
}
return c;
}
function s(e) {
var t = [];
return e.shiftKey && t.push("shift"), e.altKey && t.push("alt"), e.ctrlKey && t.push("ctrl"),
e.metaKey && t.push("meta"), t;
}
function l(e) {
return e.preventDefault ? void e.preventDefault() : void (e.returnValue = !1);
}
function c(e) {
return e.stopPropagation ? void e.stopPropagation() : void (e.cancelBubble = !0);
}
function u(e, t, n, i) {
P.stopCallback(t, t.target || t.srcElement, n, i) || !1 === e(t, n) && (l(t), c(t));
}
function d(e, t, n) {
var i, r = a(e, t, n), s = {}, l = 0, c = !1;
for (i = 0; i < r.length; ++i) r[i].seq && (l = Math.max(l, r[i].level));
for (i = 0; i < r.length; ++i) if (r[i].seq) {
if (r[i].level != l) continue;
c = !0, s[r[i].seq] = 1, u(r[i].callback, n, r[i].combo, r[i].seq);
} else c || u(r[i].callback, n, r[i].combo);
var d = "keypress" == n.type && L;
n.type != A || h(e) || d || o(s), L = c && "keydown" == n.type;
}
function p(e) {
"number" != typeof e.which && (e.which = e.keyCode);
var t = i(e);
return t ? "keyup" == e.type && M === t ? void (M = !1) : void P.handleKey(t, s(e), e) : void 0;
}
function h(e) {
return "shift" == e || "ctrl" == e || "alt" == e || "meta" == e;
}
function f() {
clearTimeout(C), C = setTimeout(o, 1e3);
}
function m() {
if (!S) {
S = {};
for (var e in _) e > 95 && 112 > e || _.hasOwnProperty(e) && (S[_[e]] = e);
}
return S;
}
function g(e, t, n) {
return n || (n = m()[e] ? "keydown" : "keypress"), "keypress" == n && t.length && (n = "keydown"),
n;
}
function v(e, t, n, r) {
function a(t) {
u(n, t, e), "keyup" !== r && (M = i(t)), setTimeout(o, 10);
}
N[e] = 0;
for (var s = 0; s < t.length; ++s) {
var l = s + 1 === t.length, c = l ? a : function(t) {
return function() {
A = t, ++N[e], f();
};
}(r || y(t[s + 1]).action);
x(t[s], c, r, e, s);
}
}
function b(e) {
return "+" === e ? [ "+" ] : e.split("+");
}
function y(e, t) {
var n, i, r, o = [];
for (n = b(e), r = 0; r < n.length; ++r) i = n[r], T[i] && (i = T[i]), t && "keypress" != t && E[i] && (i = E[i],
o.push("shift")), h(i) && o.push(i);
return t = g(i, o, t), {
key: i,
modifiers: o,
action: t
};
}
function x(e, t, n, i, r) {
D[e + ":" + n] = t, e = e.replace(/\s+/g, " ");
var o, s = e.split(" ");
return s.length > 1 ? void v(e, s, t, n) : (o = y(e, n), I[o.key] = I[o.key] || [],
a(o.key, o.modifiers, {
type: o.action
}, i, e, r), I[o.key][i ? "unshift" : "push"]({
callback: t,
modifiers: o.modifiers,
action: o.action,
seq: i,
level: r,
combo: e
}), void 0);
}
function w(e, t, n) {
for (var i = 0; i < e.length; ++i) x(e[i], t, n);
}
for (var S, C, _ = {
8: "backspace",
9: "tab",
13: "enter",
16: "shift",
17: "ctrl",
18: "alt",
20: "capslock",
27: "esc",
32: "space",
33: "pageup",
34: "pagedown",
35: "end",
36: "home",
37: "left",
38: "up",
39: "right",
40: "down",
45: "ins",
46: "del",
91: "meta",
93: "meta",
224: "meta"
}, k = {
106: "*",
107: "+",
109: "-",
110: ".",
111: "/",
186: ";",
187: "=",
188: ",",
189: "-",
190: ".",
191: "/",
192: "`",
219: "[",
220: "\\",
221: "]",
222: "'"
}, E = {
"~": "`",
"!": "1",
"@": "2",
"#": "3",
$: "4",
"%": "5",
"^": "6",
"&": "7",
"*": "8",
"(": "9",
")": "0",
_: "-",
"+": "=",
":": ";",
'"': "'",
"<": ",",
">": ".",
"?": "/",
"|": "\\"
}, T = {
option: "alt",
command: "meta",
"return": "enter",
escape: "esc",
mod: /Mac|iPod|iPhone|iPad/.test(navigator.platform) ? "meta" : "ctrl"
}, I = {}, D = {}, N = {}, M = !1, L = !1, A = !1, R = 1; 20 > R; ++R) _[111 + R] = "f" + R;
for (R = 0; 9 >= R; ++R) _[R + 96] = R;
n(t, "keypress", p), n(t, "keydown", p), n(t, "keyup", p);
var P = {
bind: function(e, t, n) {
return e = e instanceof Array ? e : [ e ], w(e, t, n), this;
},
unbind: function(e, t) {
return P.bind(e, function() {}, t);
},
trigger: function(e, t) {
return D[e + ":" + t] && D[e + ":" + t]({}, e), this;
},
reset: function() {
return I = {}, D = {}, this;
},
stopCallback: function(e, t) {
return !((" " + t.className + " ").indexOf(" mousetrap ") > -1 || "INPUT" != t.tagName && "SELECT" != t.tagName && "TEXTAREA" != t.tagName && !t.isContentEditable);
},
handleKey: d
};
e.Mousetrap = P, "function" == typeof define && define.amd && define("mousetrap", P);
}(window, document), define("logger", [], function() {
var e = {
log: function() {},
info: function() {},
warn: function() {},
error: function() {}
};
return /(\?|&)console($|&)/.test(location.search) ? console : e;
}), define("classes/Extension", [], function() {
function e(e, t, n, i) {
this.extensionId = e, this.extensionName = t, this.isOptional = n, this.disableInViewer = i;
}
return e;
}), define("text", [ "module" ], function(e) {
"use strict";
function t(e, t) {
return void 0 === e || "" === e ? t : e;
}
function n(e, n, i, r) {
if (n === r) return !0;
if (e === i) {
if ("http" === e) return t(n, "80") === t(r, "80");
if ("https" === e) return t(n, "443") === t(r, "443");
}
return !1;
}
var i, r, o, a, s, l = [ "Msxml2.XMLHTTP", "Microsoft.XMLHTTP", "Msxml2.XMLHTTP.4.0" ], c = /^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im, u = /<body[^>]*>\s*([\s\S]+)\s*<\/body>/im, d = "undefined" != typeof location && location.href, p = d && location.protocol && location.protocol.replace(/\:/, ""), h = d && location.hostname, f = d && (location.port || void 0), m = {}, g = e.config && e.config() || {};
return i = {
version: "2.0.15",
strip: function(e) {
if (e) {
e = e.replace(c, "");
var t = e.match(u);
t && (e = t[1]);
} else e = "";
return e;
},
jsEscape: function(e) {
return e.replace(/(['\\])/g, "\\$1").replace(/[\f]/g, "\\f").replace(/[\b]/g, "\\b").replace(/[\n]/g, "\\n").replace(/[\t]/g, "\\t").replace(/[\r]/g, "\\r").replace(/[\u2028]/g, "\\u2028").replace(/[\u2029]/g, "\\u2029");
},
createXhr: g.createXhr || function() {
var e, t, n;
if ("undefined" != typeof XMLHttpRequest) return new XMLHttpRequest();
if ("undefined" != typeof ActiveXObject) for (t = 0; 3 > t; t += 1) {
n = l[t];
try {
e = new ActiveXObject(n);
} catch (e) {}
if (e) {
l = [ n ];
break;
}
}
return e;
},
parseName: function(e) {
var t, n, i, r = !1, o = e.lastIndexOf("."), a = 0 === e.indexOf("./") || 0 === e.indexOf("../");
return -1 !== o && (!a || o > 1) ? (t = e.substring(0, o), n = e.substring(o + 1)) : t = e,
i = n || t, o = i.indexOf("!"), -1 !== o && (r = "strip" === i.substring(o + 1),
i = i.substring(0, o), n ? n = i : t = i), {
moduleName: t,
ext: n,
strip: r
};
},
xdRegExp: /^((\w+)\:)?\/\/([^\/\\]+)/,
useXhr: function(e, t, r, o) {
var a, s, l, c = i.xdRegExp.exec(e);
return !(c && (a = c[2], s = c[3], s = s.split(":"), l = s[1], s = s[0], a && a !== t || s && s.toLowerCase() !== r.toLowerCase() || (l || s) && !n(a, l, t, o)));
},
finishLoad: function(e, t, n, r) {
n = t ? i.strip(n) : n, g.isBuild && (m[e] = n), r(n);
},
load: function(e, t, n, r) {
if (r && r.isBuild && !r.inlineText) return void n();
g.isBuild = r && r.isBuild;
var o = i.parseName(e), a = o.moduleName + (o.ext ? "." + o.ext : ""), s = t.toUrl(a), l = g.useXhr || i.useXhr;
return 0 === s.indexOf("empty:") ? void n() : void (!d || l(s, p, h, f) ? i.get(s, function(t) {
i.finishLoad(e, o.strip, t, n);
}, function(e) {
n.error && n.error(e);
}) : t([ a ], function(e) {
i.finishLoad(o.moduleName + "." + o.ext, o.strip, e, n);
}));
},
write: function(e, t, n) {
if (m.hasOwnProperty(t)) {
var r = i.jsEscape(m[t]);
n.asModule(e + "!" + t, "define(function () { return '" + r + "';});\n");
}
},
writeFile: function(e, t, n, r, o) {
var a = i.parseName(t), s = a.ext ? "." + a.ext : "", l = a.moduleName + s, c = n.toUrl(a.moduleName + s) + ".js";
i.load(l, n, function() {
var t = function(e) {
return r(c, e);
};
t.asModule = function(e, t) {
return r.asModule(e, c, t);
}, i.write(e, l, t, o);
}, o);
}
}, "node" === g.env || !g.env && "undefined" != typeof process && process.versions && process.versions.node && !process.versions["node-webkit"] && !process.versions["atom-shell"] ? (r = require.nodeRequire("fs"),
i.get = function(e, t, n) {
try {
var i = r.readFileSync(e, "utf8");
"\ufeff" === i[0] && (i = i.substring(1)), t(i);
} catch (e) {
n && n(e);
}
}) : "xhr" === g.env || !g.env && i.createXhr() ? i.get = function(e, t, n, r) {
var o, a = i.createXhr();
if (a.open("GET", e, !0), r) for (o in r) r.hasOwnProperty(o) && a.setRequestHeader(o.toLowerCase(), r[o]);
g.onXhr && g.onXhr(a, e), a.onreadystatechange = function() {
var i, r;
4 === a.readyState && (i = a.status || 0, i > 399 && 600 > i ? (r = new Error(e + " HTTP status: " + i),
r.xhr = a, n && n(r)) : t(a.responseText), g.onXhrComplete && g.onXhrComplete(a, e));
}, a.send(null);
} : "rhino" === g.env || !g.env && "undefined" != typeof Packages && "undefined" != typeof java ? i.get = function(e, t) {
var n, i, r = new java.io.File(e), o = java.lang.System.getProperty("line.separator"), a = new java.io.BufferedReader(new java.io.InputStreamReader(new java.io.FileInputStream(r), "utf-8")), s = "";
try {
for (n = new java.lang.StringBuffer(), i = a.readLine(), i && i.length() && 65279 === i.charAt(0) && (i = i.substring(1)),
null !== i && n.append(i); null !== (i = a.readLine()); ) n.append(o), n.append(i);
s = String(n.toString());
} finally {
a.close();
}
t(s);
} : ("xpconnect" === g.env || !g.env && "undefined" != typeof Components && Components.classes && Components.interfaces) && (o = Components.classes,
a = Components.interfaces, Components.utils["import"]("resource://gre/modules/FileUtils.jsm"),
s = "@mozilla.org/windows-registry-key;1" in o, i.get = function(e, t) {
var n, i, r, l = {};
s && (e = e.replace(/\//g, "\\")), r = new FileUtils.File(e);
try {
n = o["@mozilla.org/network/file-input-stream;1"].createInstance(a.nsIFileInputStream),
n.init(r, 1, 0, !1), i = o["@mozilla.org/intl/converter-input-stream;1"].createInstance(a.nsIConverterInputStream),
i.init(n, "utf-8", n.available(), a.nsIConverterInputStream.DEFAULT_REPLACEMENT_CHARACTER),
i.readString(n.available(), l), i.close(), n.close(), t(l.value);
} catch (e) {
throw new Error((r && r.path || "") + ": " + e);
}
}), i;
}), define("text!html/settingsExtensionsAccordion.html", [], function() {
return '<div class="panel">\n <div class="accordion-heading">\n <div class="checkbox pull-right">\n <label> <input id="input-enable-extension-<%= extensionId %>"\n type="checkbox"<% if(!isOptional) print(\'disabled\') %>>\n enabled\n </label>\n </div>\n <a data-toggle="collapse" data-parent=".accordion-extensions"\n class="accordion-toggle collapsed" href="#accordion-extensions-collapse-<%= extensionId %>">\n <%= extensionName %> <i class="icon-up-dir"></i></a>\n </div>\n <div id="accordion-extensions-collapse-<%= extensionId %>" class="collapse">\n <div class="accordion-inner clearfix"><%= settingsBlock %></div>\n </div>\n</div>\n';
}), function() {
var e = function(e, t, n, i) {
this.rawMessage = e, this.parsedLine = void 0 !== t ? t : -1, this.snippet = void 0 !== n ? n : null,
this.parsedFile = void 0 !== i ? i : null, this.updateRepr(), this.message = e;
};
e.prototype = {
name: "YamlParseException",
message: null,
parsedFile: null,
parsedLine: -1,
snippet: null,
rawMessage: null,
isDefined: function(e) {
return void 0 != e && null != e;
},
getSnippet: function() {
return this.snippet;
},
setSnippet: function(e) {
this.snippet = e, this.updateRepr();
},
getParsedFile: function() {
return this.parsedFile;
},
setParsedFile: function(e) {
this.parsedFile = e, this.updateRepr();
},
getParsedLine: function() {
return this.parsedLine;
},
setParsedLine: function(e) {
this.parsedLine = e, this.updateRepr();
},
updateRepr: function() {
this.message = this.rawMessage;
var e = !1;
"." === this.message.charAt(this.message.length - 1) && (this.message = this.message.substring(0, this.message.length - 1),
e = !0), null !== this.parsedFile && (this.message += " in " + JSON.stringify(this.parsedFile)),
this.parsedLine >= 0 && (this.message += " at line " + this.parsedLine), this.snippet && (this.message += ' (near "' + this.snippet + '")'),
e && (this.message += ".");
}
};
var t = !1, n = function() {};
n.prototype = {
parseFile: function(t, n) {
if (null == n) {
var i = this.getFileContents(t), r = null;
try {
r = this.parse(i);
} catch (o) {
throw o instanceof e && o.setParsedFile(t), o;
}
return r;
}
this.getFileContents(t, function(e) {
n(new o().parse(e));
});
},
parse: function(e) {
return new o().parse(e);
},
dump: function(e, t, n) {
null == t && (t = 2);
var i = new s();
return n && (i.numSpacesForIndentation = n), i.dump(e, t);
},
getXHR: function() {
if (window.XMLHttpRequest) return new XMLHttpRequest();
if (window.ActiveXObject) for (var e = [ "Msxml2.XMLHTTP.6.0", "Msxml2.XMLHTTP.3.0", "Msxml2.XMLHTTP", "Microsoft.XMLHTTP" ], t = 0; 4 > t; t++) try {
return new ActiveXObject(e[t]);
} catch (e) {}
return null;
},
getFileContents: function(e, n) {
if (t) {
var i = require("fs");
if (null == n) {
var r = i.readFileSync(e);
return null == r ? null : "" + r;
}
i.readFile(e, function(e, t) {
n(e ? null : t);
});
} else {
var o = this.getXHR();
if (null == n) return o.open("GET", e, !1), o.send(null), 200 == o.status || 0 == o.status ? o.responseText : null;
o.onreadystatechange = function() {
4 == o.readyState && n(200 == o.status || 0 == o.status ? o.responseText : null);
}, o.open("GET", e, !0), o.send(null);
}
}
};
var i = {
stringify: function(e, t, i) {
return new n().dump(e, t, i);
},
parse: function(e) {
return new n().parse(e);
},
load: function(e, t) {
return new n().parseFile(e, t);
}
};
"undefined" != typeof exports && "undefined" != typeof module && module.exports && (exports = module.exports = i,
t = !0, function() {
var e = function(e, t) {
e.exports = i.load(t);
};
void 0 !== require.extensions && (require.extensions[".yml"] = e, require.extensions[".yaml"] = e);
}()), "undefined" != typeof window && (window.YAML = i);
var r = function() {};
r.prototype = {
i: null,
parse: function(t) {
var n = null;
if (t = this.trim(t), 0 == t.length) return "";
switch (t.charAt(0)) {
case "[":
n = this.parseSequence(t);
break;
case "{":
n = this.parseMapping(t);
break;
default:
n = this.parseScalar(t);
}
if ("" != t.substr(this.i + 1).replace(/^\s*#.*$/, "")) throw console.log("oups " + t.substr(this.i + 1)),
new e('Unexpected characters near "' + t.substr(this.i) + '".');
return n;
},
dump: function(e) {
if (void 0 == e || null == e) return "null";
if (e instanceof Date) return e.toISOString();
if ("object" == typeof e) return this.dumpObject(e);
if ("boolean" == typeof e) return e ? "true" : "false";
if (/^\d+$/.test(e)) return "string" == typeof e ? "'" + e + "'" : parseInt(e);
if (this.isNumeric(e)) return "string" == typeof e ? "'" + e + "'" : parseFloat(e);
if ("number" == typeof e) return e == 1 / 0 ? ".Inf" : e == -1 / 0 ? "-.Inf" : isNaN(e) ? ".NAN" : e;
var t = new YamlEscaper();
return t.requiresDoubleQuoting(e) ? t.escapeWithDoubleQuotes(e) : t.requiresSingleQuoting(e) ? t.escapeWithSingleQuotes(e) : "" == e ? '""' : this.getTimestampRegex().test(e) ? "'" + e + "'" : this.inArray(e.toLowerCase(), [ "null", "~", "true", "false" ]) ? "'" + e + "'" : e;
},
dumpObject: function(e) {
var t, n = this.getKeys(e), i = null, r = n.length;
if (e instanceof Array) {
for (i = [], t = 0; r > t; t++) i.push(this.dump(e[n[t]]));
return "[" + i.join(", ") + "]";
}
for (i = [], t = 0; r > t; t++) i.push(this.dump(n[t]) + ": " + this.dump(e[n[t]]));
return "{ " + i.join(", ") + " }";
},
parseScalar: function(t, n, i, r, o) {
void 0 == n && (n = null), void 0 == i && (i = [ '"', "'" ]), void 0 == r && (r = 0),
void 0 == o && (o = !0);
var a = null, s = null, l = null;
if (this.inArray(t[r], i)) {
if (a = this.parseQuotedScalar(t, r), r = this.i, null !== n) {
var c = t.substr(r).replace(/^\s+/, "");
if (!this.inArray(c.charAt(0), n)) throw new e("Unexpected characters (" + t.substr(r) + ").");
}
} else {
if (n) {
if (!(l = new RegExp("^(.+?)(" + n.join("|") + ")").exec((t + "").substring(r)))) throw new e("Malformed inline YAML string (" + t + ").");
a = l[1], r += a.length;
} else a = (t + "").substring(r), r += a.length, -1 != (s = a.indexOf(" #")) && (a = a.substr(0, s).replace(/\s+$/g, ""));
a = o ? this.evaluateScalar(a) : a;
}
return this.i = r, a;
},
parseQuotedScalar: function(t, n) {
var i = null;
if (!(i = new RegExp("^" + r.REGEX_QUOTED_STRING).exec((t + "").substring(n)))) throw new e("Malformed inline YAML string (" + (t + "").substring(n) + ").");
var o = i[0].substr(1, i[0].length - 2), s = new a();
return o = '"' == (t + "").charAt(n) ? s.unescapeDoubleQuotedString(o) : s.unescapeSingleQuotedString(o),
n += i[0].length, this.i = n, o;
},
parseSequence: function(t, n) {
void 0 == n && (n = 0);
var i = [], r = t.length;
for (n += 1; r > n; ) {
switch (t.charAt(n)) {
case "[":
i.push(this.parseSequence(t, n)), n = this.i;
break;
case "{":
i.push(this.parseMapping(t, n)), n = this.i;
break;
case "]":
return this.i = n, i;
case ",":
case " ":
break;
default:
var o = this.inArray(t.charAt(n), [ '"', "'" ]), a = this.parseScalar(t, [ ",", "]" ], [ '"', "'" ], n);
if (n = this.i, !o && -1 != (a + "").indexOf(": ")) try {
a = this.parseMapping("{" + a + "}");
} catch (t) {
if (!(t instanceof e)) throw t;
}
i.push(a), n--;
}
n++;
}
throw new e('Malformed inline YAML string "' + t + '"');
},
parseMapping: function(t, n) {
void 0 == n && (n = 0);
var i = {}, r = t.length;
n += 1;
for (var o = !1, a = !1; r > n; ) {
switch (a = !1, t.charAt(n)) {
case " ":
case ",":
n++, a = !0;
break;
case "}":
return this.i = n, i;
}
if (!a) {
var s = this.parseScalar(t, [ ":", " " ], [ '"', "'" ], n, !1);
for (n = this.i, o = !1; r > n; ) {
switch (t.charAt(n)) {
case "[":
i[s] = this.parseSequence(t, n), n = this.i, o = !0;
break;
case "{":
i[s] = this.parseMapping(t, n), n = this.i, o = !0;
break;
case ":":
case " ":
break;
default:
i[s] = this.parseScalar(t, [ ",", "}" ], [ '"', "'" ], n), n = this.i, o = !0, n--;
}
if (++n, o) {
a = !0;
break;
}
}
}
}
throw new e('Malformed inline YAML string "' + t + '"');
},
evaluateScalar: function(e) {
e = this.trim(e);
var t = null, n = null;
return "null" == e.toLowerCase() || "" == e || "~" == e ? null : 0 == (e + "").indexOf("!str ") ? ("" + e).substring(5) : 0 == (e + "").indexOf("! ") ? parseInt(this.parseScalar((e + "").substr(2))) : /^\d+$/.test(e) ? (t = e,
n = parseInt(e), "0" == e.charAt(0) ? this.octdec(e) : "" + t == "" + n ? n : t) : "true" == (e + "").toLowerCase() || "false" != (e + "").toLowerCase() && (this.isNumeric(e) ? "0x" == (e + "").substr(0, 2) ? this.hexdec(e) : parseFloat(e) : ".inf" == e.toLowerCase() ? 1 / 0 : ".nan" == e.toLowerCase() ? 0/0 : "-.inf" == e.toLowerCase() ? -1 / 0 : /^(-|\+)?[0-9,]+(\.[0-9]+)?$/.test(e) ? parseFloat(e.split(",").join("")) : this.getTimestampRegex().test(e) ? new Date(this.strtotime(e)) : "" + e);
},
getTimestampRegex: function() {
return new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:(?:[Tt]|[ ]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:.([0-9]*))?(?:[ ]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?)?$", "gi");
},
trim: function(e) {
return (e + "").replace(/^\s+/, "").replace(/\s+$/, "");
},
isNumeric: function(e) {
return e - 0 == e && e.length > 0 && "" != e.replace(/\s+/g, "");
},
inArray: function(e, t) {
var n, i = t.length;
for (n = 0; i > n; n++) if (e == t[n]) return !0;
return !1;
},
getKeys: function(e) {
var t = [];
for (var n in e) e.hasOwnProperty(n) && t.push(n);
return t;
},
octdec: function(e) {
return parseInt((e + "").replace(/[^0-7]/gi, ""), 8);
},
hexdec: function(e) {
return e = this.trim(e), "0x" == (e + "").substr(0, 2) && (e = (e + "").substring(2)),
parseInt((e + "").replace(/[^a-f0-9]/gi, ""), 16);
},
strtotime: function(e, t) {
var n, i, r, o, a = "";
if ("now" === (e = (e + "").replace(/\s{2,}|^\s|\s$/g, " ").replace(/[\t\r\n]/g, ""))) return null === t || isNaN(t) ? new Date().getTime() || 0 : t || 0;
if (!isNaN(a = Date.parse(e))) return a || 0;
t = t ? new Date(t) : new Date(), e = e.toLowerCase();
var s = {
day: {
sun: 0,
mon: 1,
tue: 2,
wed: 3,
thu: 4,
fri: 5,
sat: 6
},
mon: [ "jan", "feb", "mar", "apr", "may", "jun", "jul", "aug", "sep", "oct", "nov", "dec" ]
};
if (null !== (r = e.match(/^(\d{2,4}-\d{2}-\d{2})(?:\s(\d{1,2}:\d{2}(:\d{2})?)?(?:\.(\d+))?)?$/))) return r[2] ? r[3] || (r[2] += ":00") : r[2] = "00:00:00",
o = r[1].split(/-/g), o[1] = s.mon[o[1] - 1] || o[1], o[0] = +o[0], o[0] = o[0] >= 0 && o[0] <= 69 ? "20" + (o[0] < 10 ? "0" + o[0] : o[0] + "") : o[0] >= 70 && o[0] <= 99 ? "19" + o[0] : o[0] + "",
parseInt(this.strtotime(o[2] + " " + o[1] + " " + o[0] + " " + r[2]) + (r[4] ? r[4] : ""), 10);
if (null === (r = e.match(new RegExp("([+-]?\\d+\\s(years?|months?|weeks?|days?|hours?|min|minutes?|sec|seconds?|sun\\.?|sunday|mon\\.?|monday|tue\\.?|tuesday|wed\\.?|wednesday|thu\\.?|thursday|fri\\.?|friday|sat\\.?|saturday)|(last|next)\\s(years?|months?|weeks?|days?|hours?|min|minutes?|sec|seconds?|sun\\.?|sunday|mon\\.?|monday|tue\\.?|tuesday|wed\\.?|wednesday|thu\\.?|thursday|fri\\.?|friday|sat\\.?|saturday))(\\sago)?", "gi")))) return !1;
for (n = 0, i = r.length; i > n; n++) if (!function(e) {
var n = e[2] && "ago" === e[2], i = (i = "last" === e[0] ? -1 : 1) * (n ? -1 : 1);
switch (e[0]) {
case "last":
case "next":
switch (e[1].substring(0, 3)) {
case "yea":
t.setFullYear(t.getFullYear() + i);
break;
case "wee":
t.setDate(t.getDate() + 7 * i);
break;
case "day":
t.setDate(t.getDate() + i);
break;
case "hou":
t.setHours(t.getHours() + i);
break;
case "min":
t.setMinutes(t.getMinutes() + i);
break;
case "sec":
t.setSeconds(t.getSeconds() + i);
break;
case "mon":
if ("month" === e[1]) {
t.setMonth(t.getMonth() + i);
break;
}
default:
var r = s.day[e[1].substring(0, 3)];
if (void 0 !== r) {
var o = r - t.getDay();
0 === o ? o = 7 * i : o > 0 ? "last" === e[0] && (o -= 7) : "next" === e[0] && (o += 7),
t.setDate(t.getDate() + o), t.setHours(0, 0, 0, 0);
}
}
break;
default:
if (!/\d+/.test(e[0])) return !1;
switch (i *= parseInt(e[0], 10), e[1].substring(0, 3)) {
case "yea":
t.setFullYear(t.getFullYear() + i);
break;
case "mon":
t.setMonth(t.getMonth() + i);
break;
case "wee":
t.setDate(t.getDate() + 7 * i);
break;
case "day":
t.setDate(t.getDate() + i);
break;
case "hou":
t.setHours(t.getHours() + i);
break;
case "min":
t.setMinutes(t.getMinutes() + i);
break;
case "sec":
t.setSeconds(t.getSeconds() + i);
}
}
return !0;
}(r[n].split(" "))) return !1;
return t.getTime() || 0;
}
}, r.REGEX_QUOTED_STRING = "(?:\"(?:[^\"\\\\]*(?:\\\\.[^\"\\\\]*)*)\"|'(?:[^']*(?:''[^']*)*)')";
var o = function(e) {
this.offset = void 0 !== e ? e : 0;
};
o.prototype = {
offset: 0,
lines: [],
currentLineNb: -1,
currentLine: "",
refs: {},
parse: function(t) {
this.currentLineNb = -1, this.currentLine = "", this.lines = this.cleanup(t).split("\n");
for (var n = null, i = null; this.moveToNextLine(); ) if (!this.isCurrentLineEmpty()) {
if (" " == this.currentLine.charAt(0)) throw new e("A YAML file cannot contain tabs as indentation.", this.getRealCurrentLineNb() + 1, this.currentLine);
var a = !1, s = !1, l = !1, c = null, u = null, d = null, p = null, h = null, f = null, m = null, g = null, v = null;
if (c = /^\-((\s+)(.+?))?\s*$/.exec(this.currentLine)) {
if (i && "mapping" == i) throw new e("You cannot define a sequence item when in a mapping", this.getRealCurrentLineNb() + 1, this.currentLine);
i = "sequence", this.isDefined(n) || (n = []), c = {
leadspaces: c[2],
value: c[3]
}, this.isDefined(c.value) && (u = /^&([^ ]+) *(.*)/.exec(c.value)) && (u = {
ref: u[1],
value: u[2]
}, a = u.ref, c.value = u.value), this.isDefined(c.value) && "" != this.trim(c.value) && "#" != c.value.replace(/^ +/, "").charAt(0) ? this.isDefined(c.leadspaces) && " " == c.leadspaces && (u = new RegExp("^(" + r.REGEX_QUOTED_STRING + "|[^ '\"{[].*?) *:(\\s+(.+?))?\\s*$").exec(c.value)) ? (u = {
key: u[1],
value: u[3]
}, d = this.getRealCurrentLineNb(), p = new o(d), p.refs = this.refs, h = c.value,
this.isNextLineIndented() || (h += "\n" + this.getNextEmbedBlock(this.getCurrentLineIndentation() + 2)),
n.push(p.parse(h)), this.refs = p.refs) : n.push(this.parseValue(c.value)) : (d = this.getRealCurrentLineNb() + 1,
p = new o(d), p.refs = this.refs, n.push(p.parse(this.getNextEmbedBlock())), this.refs = p.refs);
} else {
if (!(c = new RegExp("^(" + r.REGEX_QUOTED_STRING + "|[^ '\"[{].*?) *:(\\s+(.+?))?\\s*$").exec(this.currentLine))) {
if (2 == this.lines.length && this.isEmpty(this.lines[1])) {
try {
t = new r().parse(this.lines[0]);
} catch (t) {
throw t instanceof e && (t.setParsedLine(this.getRealCurrentLineNb() + 1), t.setSnippet(this.currentLine)),
t;
}
if (this.isObject(t)) {
var b = t[0];
if ("string" == typeof t && "*" == b.charAt(0)) {
n = [], g = t.length;
for (var y = 0; g > y; y++) n.push(this.refs[t[y].substr(1)]);
t = n;
}
}
return t;
}
throw new e("Unable to parse.", this.getRealCurrentLineNb() + 1, this.currentLine);
}
if (this.isDefined(n) || (n = {}), i && "sequence" == i) throw new e("You cannot define a mapping item when in a sequence", this.getRealCurrentLineNb() + 1, this.currentLine);
i = "mapping", c = {
key: c[1],
value: c[3]
};
try {
f = new r().parseScalar(c.key);
} catch (t) {
throw t instanceof e && (t.setParsedLine(this.getRealCurrentLineNb() + 1), t.setSnippet(this.currentLine)),
t;
}
if ("<<" == f) if (this.isDefined(c.value) && "*" == (c.value + "").charAt(0)) {
if (s = c.value.substr(1), void 0 == this.refs[s]) throw new e('Reference "' + t + '" does not exist', this.getRealCurrentLineNb() + 1, this.currentLine);
} else {
t = this.isDefined(c.value) && "" != c.value ? c.value : this.getNextEmbedBlock(),
d = this.getRealCurrentLineNb() + 1, p = new o(d), p.refs = this.refs, m = p.parse(t),
this.refs = p.refs;
var x = [];
if (!this.isObject(m)) throw new e("YAML merge keys used with a scalar value instead of an array", this.getRealCurrentLineNb() + 1, this.currentLine);
if (this.isDefined(m[0])) {
v = this.reverseArray(m), g = v.length;
for (var y = 0; g > y; y++) {
if (v[y], !this.isObject(v[y])) throw new e("Merge items must be arrays", this.getRealCurrentLineNb() + 1, this.currentLine);
x = this.mergeObject(v[y], x);
}
} else x = this.mergeObject(x, m);
l = x;
} else this.isDefined(c.value) && (u = /^&([^ ]+) *(.*)/.exec(c.value)) && (u = {
ref: u[1],
value: u[2]
}, a = u.ref, c.value = u.value);
l ? n = l : this.isDefined(c.value) && "" != this.trim(c.value) && "#" != this.trim(c.value).charAt(0) ? s ? n = this.refs[s] : n[f] = this.parseValue(c.value) : this.isNextLineIndented() && !this.isNextLineUnIndentedCollection() ? n[f] = null : (d = this.getRealCurrentLineNb() + 1,
p = new o(d), p.refs = this.refs, n[f] = p.parse(this.getNextEmbedBlock()), this.refs = p.refs);
}
if (a) if (n instanceof Array) this.refs[a] = n[n.length - 1]; else {
for (var w in n) n.hasOwnProperty(w) && w;
this.refs[a] = n[w];
}
}
return this.isEmpty(n) ? null : n;
},
getRealCurrentLineNb: function() {
return this.currentLineNb + this.offset;
},
getCurrentLineIndentation: function() {
return this.currentLine.length - this.currentLine.replace(/^ +/g, "").length;
},
getNextEmbedBlock: function(t) {
this.moveToNextLine();
var n = null, i = null;
if (this.isDefined(t)) n = t; else {
n = this.getCurrentLineIndentation();
var r = this.isStringUnIndentedCollectionItem(this.currentLine);
if (!this.isCurrentLineEmpty() && 0 == n && !r) throw new e("Indentation problem A", this.getRealCurrentLineNb() + 1, this.currentLine);
}
var o = [ this.currentLine.substr(n) ], a = this.isStringUnIndentedCollectionItem(this.currentLine), s = -1;
for (!0 === a && (s = 1 + /^\-((\s+)(.+?))?\s*$/.exec(this.currentLine)[2].length); this.moveToNextLine(); ) {
if (a && !this.isStringUnIndentedCollectionItem(this.currentLine) && this.getCurrentLineIndentation() != s) {
this.moveToPreviousLine();
break;
}
if (this.isCurrentLineEmpty()) this.isCurrentLineBlank() && o.push(this.currentLine.substr(n)); else {
i = this.getCurrentLineIndentation();
var l;
if (l = /^( *)$/.exec(this.currentLine)) o.push(l[1]); else {
if (!(i >= n)) {
if (0 == i) {
this.moveToPreviousLine();
break;
}
throw new e("Indentation problem B", this.getRealCurrentLineNb() + 1, this.currentLine);
}
o.push(this.currentLine.substr(n));
}
}
}
return o.join("\n");
},
moveToNextLine: function() {
return !(this.currentLineNb >= this.lines.length - 1 || (this.currentLineNb++, this.currentLine = this.lines[this.currentLineNb],
0));
},
moveToPreviousLine: function() {
this.currentLineNb--, this.currentLine = this.lines[this.currentLineNb];
},
parseValue: function(t) {
if ("*" == (t + "").charAt(0)) {
if (t = "#" == this.trim(t).charAt(0) ? (t + "").substr(1, t.indexOf("#") - 2) : (t + "").substr(1),
void 0 == this.refs[t]) throw new e('Reference "' + t + '" does not exist', this.getRealCurrentLineNb() + 1, this.currentLine);
return this.refs[t];
}
var n = null;
if (n = /^(\||>)(\+|\-|\d+|\+\d+|\-\d+|\d+\+|\d+\-)?( +#.*)?$/.exec(t)) {
n = {
separator: n[1],
modifiers: n[2],
comments: n[3]
};
var i = this.isDefined(n.modifiers) ? n.modifiers : "";
return this.parseFoldedScalar(n.separator, i.replace(/\d+/g, ""), Math.abs(parseInt(i)));
}
try {
return new r().parse(t);
} catch (t) {
throw t instanceof e && (t.setParsedLine(this.getRealCurrentLineNb() + 1), t.setSnippet(this.currentLine)),
t;
}
},
parseFoldedScalar: function(e, t, n) {
void 0 == t && (t = ""), void 0 == n && (n = 0), e = "|" == e ? "\n" : " ";
for (var i = "", r = null, o = this.moveToNextLine(); o && this.isCurrentLineBlank(); ) i += "\n",
o = this.moveToNextLine();
if (!o) return "";
var a = null;
if (!(a = new RegExp("^(" + (n ? this.strRepeat(" ", n) : " +") + ")(.*)$").exec(this.currentLine))) return this.moveToPreviousLine(),
"";
a = {
indent: a[1],
text: a[2]
};
var s = a.indent, l = 0;
for (i += a.text + e; this.currentLineNb + 1 < this.lines.length; ) if (this.moveToNextLine(),
a = new RegExp("^( {" + s.length + ",})(.+)$").exec(this.currentLine)) a = {
indent: a[1],
text: a[2]
}, " " == e && l != a.indent && (i = i.substr(0, i.length - 1) + "\n"), l = a.indent,
r = a.indent.length - s.length, i += this.strRepeat(" ", r) + a.text + (0 != r ? "\n" : e); else {
if (!(a = /^( *)$/.exec(this.currentLine))) {
this.moveToPreviousLine();
break;
}
i += a[1].replace(new RegExp("^ {1," + s.length + "}", "g"), "") + "\n";
}
switch (" " == e && (i = i.replace(/ (\n*)$/g, "\n$1")), t) {
case "":
i = i.replace(/\n+$/g, "\n");
break;
case "+":
break;
case "-":
i = i.replace(/\n+$/g, "");
}
return i;
},
isNextLineIndented: function() {
for (var e = this.getCurrentLineIndentation(), t = this.moveToNextLine(); t && this.isCurrentLineEmpty(); ) t = this.moveToNextLine();
if (0 == t) return !1;
var n = !1;
return this.getCurrentLineIndentation() <= e && (n = !0), this.moveToPreviousLine(),
n;
},
isCurrentLineEmpty: function() {
return this.isCurrentLineBlank() || this.isCurrentLineComment();
},
isCurrentLineBlank: function() {
return "" == this.trim(this.currentLine);
},
isCurrentLineComment: function() {
return "#" == this.currentLine.replace(/^ +/g, "").charAt(0);
},
cleanup: function(e) {
e = e.split("\r\n").join("\n").split("\r").join("\n"), /\n$/.test(e) || (e += "\n");
for (var t = 0, n = /^\%YAML[: ][\d\.]+.*\n/; n.test(e); ) e = e.replace(n, ""),
t++;
if (this.offset += t, n = /^(#.*?\n)+/, n.test(e)) {
var i = e.replace(n, "");
this.offset += this.subStrCount(e, "\n") - this.subStrCount(i, "\n"), e = i;
}
return n = /^\-\-\-.*?\n/, n.test(e) && (i = e.replace(n, ""), this.offset += this.subStrCount(e, "\n") - this.subStrCount(i, "\n"),
e = i, e = e.replace(/\.\.\.\s*$/g, "")), e;
},
isNextLineUnIndentedCollection: function() {
for (var e = this.getCurrentLineIndentation(), t = this.moveToNextLine(); t && this.isCurrentLineEmpty(); ) t = this.moveToNextLine();
if (!1 === t) return !1;
var n = !1;
return this.getCurrentLineIndentation() == e && this.isStringUnIndentedCollectionItem(this.currentLine) && (n = !0),
this.moveToPreviousLine(), n;
},
isStringUnIndentedCollectionItem: function() {
return 0 === this.currentLine.indexOf("- ");
},
isObject: function(e) {
return "object" == typeof e && this.isDefined(e);
},
isEmpty: function(e) {
return void 0 == e || null == e || "" == e || 0 == e || "0" == e || 0 == e;
},
isDefined: function(e) {
return void 0 != e && null != e;
},
reverseArray: function(e) {
for (var t = [], n = e.length, i = n - 1; i >= 0; i--) t.push(e[i]);
return t;
},
merge: function(e, t) {
var n, i = {};
for (n in e) e.hasOwnProperty(n) && (/^\d+$/.test(n) ? i.push(e) : i[n] = e[n]);
for (n in t) t.hasOwnProperty(n) && (/^\d+$/.test(n) ? i.push(t) : i[n] = t[n]);
return i;
},
strRepeat: function(e, t) {
var n, i = "";
for (n = 0; t > n; n++) i += e;
return i;
},
subStrCount: function(e, t, n, i) {
var r = 0;
e = "" + e, t = "" + t, void 0 != n && (e = e.substr(n)), void 0 != i && (e = e.substr(0, i));
for (var o = e.length, a = t.length, s = 0; o > s; s++) t == e.substr(s, a) && r++,
s += a - 1;
return r;
},
trim: function(e) {
return (e + "").replace(/^ +/, "").replace(/ +$/, "");
}
}, YamlEscaper = function() {}, YamlEscaper.prototype = {
requiresDoubleQuoting: function(e) {
return new RegExp(YamlEscaper.REGEX_CHARACTER_TO_ESCAPE).test(e);
},
escapeWithDoubleQuotes: function(e) {
e += "";
for (var t = YamlEscaper.escapees.length, n = YamlEscaper.escaped.length, i = YamlEscaper.escaped, r = 0; t > r; ++r) r >= n && i.push("");
return '"' + e.replace(new RegExp(YamlEscaper.escapees.join("|"), "g"), function(e) {
for (var n = 0; t > n; ++n) if (e == YamlEscaper.escapees[n]) return i[n];
}) + '"';
},
requiresSingleQuoting: function(e) {
return /[\s'":{}[\],&*#?]|^[-?|<>=!%@`]/.test(e);
},
escapeWithSingleQuotes: function(e) {
return "'" + e.replace(/'/g, "''") + "'";
}
}, YamlEscaper.REGEX_CHARACTER_TO_ESCAPE = "[\\x00-\\x1f]|\xc2\x85|\xc2\xa0|\xe2\x80\xa8|\xe2\x80\xa9",
YamlEscaper.escapees = [ "\\\\", '\\"', '"', "\x00", "", "", "", "", "", "", "", "\b", " ", "\n", " ", "\f", "\r", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "\xc2\x85", "\xc2\xa0", "\xe2\x80\xa8", "\xe2\x80\xa9" ],
YamlEscaper.escaped = [ '\\"', "\\\\", '\\"', "\\0", "\\x01", "\\x02", "\\x03", "\\x04", "\\x05", "\\x06", "\\a", "\\b", "\\t", "\\n", "\\v", "\\f", "\\r", "\\x0e", "\\x0f", "\\x10", "\\x11", "\\x12", "\\x13", "\\x14", "\\x15", "\\x16", "\\x17", "\\x18", "\\x19", "\\x1a", "\\e", "\\x1c", "\\x1d", "\\x1e", "\\x1f", "\\N", "\\_", "\\L", "\\P" ];
var a = function() {};
a.prototype = {
unescapeSingleQuotedString: function(e) {
return e.replace(/''/g, "'");
},
unescapeDoubleQuotedString: function(e) {
var t = function(e) {
return new a().unescapeCharacter(e);
};
return e.replace(new RegExp(a.REGEX_ESCAPED_CHARACTER, "g"), t);
},
unescapeCharacter: function(e) {
switch (e.charAt(1)) {
case "0":
return String.fromCharCode(0);
case "a":
return String.fromCharCode(7);
case "b":
return String.fromCharCode(8);
case "t":
case " ":
return " ";
case "n":
return "\n";
case "v":
return String.fromCharCode(11);
case "f":
return String.fromCharCode(12);
case "r":
return String.fromCharCode(13);
case "e":
return "";
case " ":
return " ";
case '"':
return '"';
case "/":
return "/";
case "\\":
return "\\";
case "N":
return "\x00\x85";
case "_":
return "\x00\xa0";
case "L":
return " (";
case "P":
return " )";
case "x":
return this.pack("n", new r().hexdec(e.substr(2, 2)));
case "u":
return this.pack("n", new r().hexdec(e.substr(2, 4)));
case "U":
return this.pack("N", new r().hexdec(e.substr(2, 8)));
}
},
pack: function(e) {
for (var t, n, i = 0, r = 1, o = "", a = 0; i < e.length; ) {
for (t = e.charAt(i), n = "", i++; i < e.length && null !== e.charAt(i).match(/[\d\*]/); ) n += e.charAt(i),
i++;
switch ("" === n && (n = "1"), t) {
case "n":
if ("*" === n && (n = arguments.length - r), n > arguments.length - r) throw new Error("Warning: pack() Type " + t + ": too few arguments");
for (a = 0; n > a; a++) o += String.fromCharCode(arguments[r] >> 8 & 255), o += String.fromCharCode(255 & arguments[r]),
r++;
break;
case "N":
if ("*" === n && (n = arguments.length - r), n > arguments.length - r) throw new Error("Warning: pack() Type " + t + ": too few arguments");
for (a = 0; n > a; a++) o += String.fromCharCode(arguments[r] >> 24 & 255), o += String.fromCharCode(arguments[r] >> 16 & 255),
o += String.fromCharCode(arguments[r] >> 8 & 255), o += String.fromCharCode(255 & arguments[r]),
r++;
break;
default:
throw new Error("Warning: pack() Type " + t + ": unknown format code");
}
}
if (r < arguments.length) throw new Error("Warning: pack(): " + (arguments.length - r) + " arguments unused");
return o;
}
}, a.REGEX_ESCAPED_CHARACTER = '\\\\([0abt nvfre "\\/\\\\N_LP]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|U[0-9a-fA-F]{8})';
var s = function() {};
s.prototype = {
dump: function(e, t, n) {
null == t && (t = 0), null == n && (n = 0);
var i, o = "", a = n ? this.strRepeat(" ", n) : "";
if (this.numSpacesForIndentation || (this.numSpacesForIndentation = 2), 0 >= t || !this.isObject(e) || this.isEmpty(e)) i = new r(),
o += a + i.dump(e); else {
var s, l = !this.arrayEquals(this.getKeys(e), this.range(0, e.length - 1));
for (var c in e) e.hasOwnProperty(c) && (s = 0 >= t - 1 || !this.isObject(e[c]) || this.isEmpty(e[c]),
l && (i = new r()), o += a + "" + (l ? i.dump(c) + ":" : "-") + (s ? " " : "\n") + this.dump(e[c], t - 1, s ? 0 : n + this.numSpacesForIndentation) + (s ? "\n" : ""));
}
return o;
},
strRepeat: function(e, t) {
var n, i = "";
for (n = 0; t > n; n++) i += e;
return i;
},
isObject: function(e) {
return this.isDefined(e) && "object" == typeof e;
},
isEmpty: function(e) {
var t = void 0 == e || null == e || "" == e || 0 == e || "0" == e || 0 == e;
if (!(t || "object" != typeof e || e instanceof Array)) {
var n = 0;
for (var i in e) e.hasOwnProperty(i) && n++;
t = !n;
}
return t;
},
isDefined: function(e) {
return void 0 != e && null != e;
},
getKeys: function(e) {
var t = [];
for (var n in e) e.hasOwnProperty(n) && t.push(n);
return t;
},
range: function(e, t) {
if (e > t) return [];
for (var n = [], i = e; t >= i; i++) n.push(i);
return n;
},
arrayEquals: function(e, t) {
if (e.length != t.length) return !1;
for (var n = e.length, i = 0; n > i; i++) if (e[i] != t[i]) return !1;
return !0;
}
};
}(), define("yaml-js", function(e) {
return function() {
return e.YAML;
};
}(this)), define("extensions/yamlFrontMatterParser", [ "underscore", "classes/Extension", "yaml-js" ], function(e, t, n) {
function i(e, t) {
if (e === a) {
var i = s.exec(t), r = i[1], o = i[2];
if (o) {
if (!a.frontMatter || a.frontMatter._frontMatter != r) {
a.frontMatter = void 0;
try {
a.frontMatter = n.parse(o), l.isObject(a.frontMatter) || (a.frontMatter = void 0),
a.frontMatter._yaml = o, a.frontMatter._frontMatter = r;
} catch (l) {}
}
} else a.frontMatter = void 0;
}
}
var r, o = new t("yamlFrontMatterParser", "YAML front matter");
o.onEventMgrCreated = function(e) {
r = e;
};
var a;
o.onFileSelected = function(e) {
a = e;
};
var s = /^(\s*-{3}\s*\n([\w\W]+?)\n\s*-{3}\s*?\n)?([\w\W]*)$/;
return o.onFileOpen = i, o.onContentChanged = i, o;
}), define("text!html/markdownExtraSettingsBlock.html", [], function() {
return '<p>Adds extra features to the original Markdown syntax.</p>\n<div class="form-horizontal">\n <div class="form-group">\n <label class="col-sm-4 control-label" for="input-markdownextra-tables">Tables</label>\n <div class="col-sm-7">\n <div class="checkbox">\n <input type="checkbox" id="input-markdownextra-tables">\n </div>\n </div>\n </div>\n <div class="form-group">\n <label class="col-sm-4 control-label"\n for="input-markdownextra-deflist">Definition lists</label>\n <div class="col-sm-7">\n <div class="checkbox">\n <input type="checkbox" id="input-markdownextra-deflist">\n </div>\n </div>\n </div>\n <div class="form-group">\n <label class="col-sm-4 control-label"\n for="input-markdownextra-attrlist">Special attributes</label>\n <div class="col-sm-7">\n <div class="checkbox">\n <input type="checkbox" id="input-markdownextra-attrlist">\n </div>\n </div>\n </div>\n <div class="form-group">\n <label class="col-sm-4 control-label"\n for="input-markdownextra-footnotes">Footnotes</label>\n <div class="col-sm-7">\n <div class="checkbox">\n <input type="checkbox" id="input-markdownextra-footnotes">\n </div>\n </div>\n </div>\n <div class="form-group">\n <label class="col-sm-4 control-label"\n for="input-markdownextra-comments">Comments</label>\n <div class="col-sm-7">\n <div class="checkbox">\n <input type="checkbox" id="input-markdownextra-comments">\n </div>\n </div>\n </div>\n <div class="form-group">\n <label class="col-sm-4 control-label"\n for="input-markdownextra-smartypants">SmartyPants</label>\n <div class="col-sm-7">\n <div class="checkbox">\n <input type="checkbox" id="input-markdownextra-smartypants">\n </div>\n </div>\n </div>\n <div class="form-group">\n <label class="col-sm-4 control-label"\n for="input-markdownextra-newlines">GFM newlines</label>\n <div class="col-sm-7">\n <div class="checkbox">\n <input type="checkbox" id="input-markdownextra-newlines">\n </div>\n </div>\n </div>\n <div class="form-group">\n <label class="col-sm-4 control-label"\n for="input-markdownextra-intraword">GFM intra-word stars/underscores</label>\n <div class="col-sm-7">\n <div class="checkbox">\n <input type="checkbox" id="input-markdownextra-intraword">\n </div>\n </div>\n </div>\n <div class="form-group">\n <label class="col-sm-4 control-label"\n for="input-markdownextra-strikethrough">GFM strikethrough</label>\n <div class="col-sm-7">\n <div class="checkbox">\n <input type="checkbox" id="input-markdownextra-strikethrough">\n </div>\n </div>\n </div>\n <div class="form-group">\n <label class="col-sm-4 control-label"\n for="input-markdownextra-fencedcodegfm">GFM fenced code\n blocks</label>\n <div class="col-sm-7">\n <div class="checkbox">\n <input type="checkbox" id="input-markdownextra-fencedcodegfm">\n </div>\n </div>\n </div>\n <div class="form-group">\n <label class="col-sm-4 control-label"\n for="input-markdownextra-highlighter">Syntax highlighter</label>\n <div class="col-sm-7">\n <select id="input-markdownextra-highlighter" class="form-control"><option>None</option>\n <option value="prettify">Prettify</option>\n <option value="highlight">Highlight.js</option>\n </select>\n </div>\n </div>\n</div>\n<span class="help-block pull-right"><a target="_blank"\n href="https://github.com/jmcmanus/pagedown-extra">More info</a></span>';
});
var IN_GLOBAL_SCOPE = !0;
window.PR_SHOULD_USE_CONTINUATION = !0;
var prettyPrintOne, prettyPrint;
!function() {
function e(e) {
function t(e) {
var t = e.charCodeAt(0);
if (92 !== t) return t;
var n = e.charAt(1);
return (t = u[n]) || (n >= "0" && "7" >= n ? parseInt(e.substring(1), 8) : "u" === n || "x" === n ? parseInt(e.substring(2), 16) : e.charCodeAt(1));
}
function n(e) {
if (32 > e) return (16 > e ? "\\x0" : "\\x") + e.toString(16);
var t = String.fromCharCode(e);
return "\\" === t || "-" === t || "]" === t || "^" === t ? "\\" + t : t;
}
function i(e) {
var i = e.substring(1, e.length - 1).match(new RegExp("\\\\u[0-9A-Fa-f]{4}|\\\\x[0-9A-Fa-f]{2}|\\\\[0-3][0-7]{0,2}|\\\\[0-7]{1,2}|\\\\[\\s\\S]|-|[^-\\\\]", "g")), r = [], o = "^" === i[0], a = [ "[" ];
o && a.push("^");
for (var s = o ? 1 : 0, l = i.length; l > s; ++s) {
var c = i[s];
if (/\\[bdsw]/i.test(c)) a.push(c); else {
var u, d = t(c);
l > s + 2 && "-" === i[s + 1] ? (u = t(i[s + 2]), s += 2) : u = d, r.push([ d, u ]),
65 > u || d > 122 || (65 > u || d > 90 || r.push([ 32 | Math.max(65, d), 32 | Math.min(u, 90) ]),
97 > u || d > 122 || r.push([ -33 & Math.max(97, d), -33 & Math.min(u, 122) ]));
}
}
r.sort(function(e, t) {
return e[0] - t[0] || t[1] - e[1];
});
for (var p = [], h = [], s = 0; s < r.length; ++s) {
var f = r[s];
f[0] <= h[1] + 1 ? h[1] = Math.max(h[1], f[1]) : p.push(h = f);
}
for (var s = 0; s < p.length; ++s) {
var f = p[s];
a.push(n(f[0])), f[1] > f[0] && (f[1] + 1 > f[0] && a.push("-"), a.push(n(f[1])));
}
return a.push("]"), a.join("");
}
for (var r = 0, o = !1, a = !1, s = 0, l = e.length; l > s; ++s) {
var c = e[s];
if (c.ignoreCase) a = !0; else if (/[a-z]/i.test(c.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi, ""))) {
o = !0, a = !1;
break;
}
}
for (var u = {
b: 8,
t: 9,
n: 10,
v: 11,
f: 12,
r: 13
}, d = [], s = 0, l = e.length; l > s; ++s) {
var c = e[s];
if (c.global || c.multiline) throw new Error("" + c);
d.push("(?:" + function(e) {
for (var t = e.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)", "g")), a = t.length, s = [], l = 0, c = 0; a > l; ++l) {
var u = t[l];
if ("(" === u) ++c; else if ("\\" === u.charAt(0)) {
var d = +u.substring(1);
d && (c >= d ? s[d] = -1 : t[l] = n(d));
}
}
for (var l = 1; l < s.length; ++l) -1 === s[l] && (s[l] = ++r);
for (var l = 0, c = 0; a > l; ++l) {
var u = t[l];
if ("(" === u) ++c, s[c] || (t[l] = "(?:"); else if ("\\" === u.charAt(0)) {
var d = +u.substring(1);
d && c >= d && (t[l] = "\\" + s[d]);
}
}
for (var l = 0; a > l; ++l) "^" === t[l] && "^" !== t[l + 1] && (t[l] = "");
if (e.ignoreCase && o) for (var l = 0; a > l; ++l) {
var u = t[l], p = u.charAt(0);
u.length >= 2 && "[" === p ? t[l] = i(u) : "\\" !== p && (t[l] = u.replace(/[a-zA-Z]/g, function(e) {
var t = e.charCodeAt(0);
return "[" + String.fromCharCode(-33 & t, 32 | t) + "]";
}));
}
return t.join("");
}(c) + ")");
}
return new RegExp(d.join("|"), a ? "gi" : "g");
}
function t(e, t) {
function n(e) {
var l = e.nodeType;
if (1 == l) {
if (i.test(e.className)) return;
for (var c = e.firstChild; c; c = c.nextSibling) n(c);
var u = e.nodeName.toLowerCase();
"br" !== u && "li" !== u || (r[s] = "\n", a[s << 1] = o++, a[s++ << 1 | 1] = e);
} else if (3 == l || 4 == l) {
var d = e.nodeValue;
d.length && (d = t ? d.replace(/\r\n?/g, "\n") : d.replace(/[ \t\r\n]+/g, " "),
r[s] = d, a[s << 1] = o, o += d.length, a[s++ << 1 | 1] = e);
}
}
var i = /(?:^|\s)nocode(?:\s|$)/, r = [], o = 0, a = [], s = 0;
return n(e), {
sourceCode: r.join("").replace(/\n$/, ""),
spans: a
};
}
function n(e, t, n, i) {
if (t) {
var r = {
sourceCode: t,
basePos: e
};
n(r), i.push.apply(i, r.decorations);
}
}
function i(e) {
for (var t = void 0, n = e.firstChild; n; n = n.nextSibling) {
var i = n.nodeType;
t = 1 === i ? t ? e : n : 3 === i && F.test(n.nodeValue) ? e : t;
}
return t === e ? void 0 : t;
}
function r(t, i) {
var r, o = {};
!function() {
for (var n = t.concat(i), a = [], s = {}, l = 0, c = n.length; c > l; ++l) {
var u = n[l], d = u[3];
if (d) for (var p = d.length; --p >= 0; ) o[d.charAt(p)] = u;
var h = u[1], f = "" + h;
s.hasOwnProperty(f) || (a.push(h), s[f] = null);
}
a.push(/[\0-\uffff]/), r = e(a);
}();
var a = i.length, s = function(e) {
for (var t = e.sourceCode, l = e.basePos, u = [ l, R ], d = 0, p = t.match(r) || [], h = {}, f = 0, m = p.length; m > f; ++f) {
var g, v = p[f], b = h[v], y = void 0;
if ("string" == typeof b) g = !1; else {
var x = o[v.charAt(0)];
if (x) y = v.match(x[1]), b = x[0]; else {
for (var w = 0; a > w; ++w) if (x = i[w], y = v.match(x[1])) {
b = x[0];
break;
}
y || (b = R);
}
g = b.length >= 5 && "lang-" === b.substring(0, 5), !g || y && "string" == typeof y[1] || (g = !1,
b = P), g || (h[v] = b);
}
var S = d;
if (d += v.length, g) {
var C = y[1], _ = v.indexOf(C), k = _ + C.length;
y[2] && (k = v.length - y[2].length, _ = k - C.length);
var E = b.substring(5);
n(l + S, v.substring(0, _), s, u), n(l + S + _, C, c(E, C), u), n(l + S + k, v.substring(k), s, u);
} else u.push(l + S, b);
}
e.decorations = u;
};
return s;
}
function o(e) {
var t = [], n = [];
t.push(e.tripleQuotedStrings ? [ I, /^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/, null, "'\"" ] : e.multiLineStrings ? [ I, /^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/, null, "'\"`" ] : [ I, /^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/, null, "\"'" ]),
e.verbatimStrings && n.push([ I, /^@\"(?:[^\"]|\"\")*(?:\"|$)/, null ]);
var i = e.hashComments;
i && (e.cStyleComments ? (t.push(i > 1 ? [ N, /^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/, null, "#" ] : [ N, /^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/, null, "#" ]),
n.push([ I, /^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/, null ])) : t.push([ N, /^#[^\r\n]*/, null, "#" ])),
e.cStyleComments && (n.push([ N, /^\/\/[^\r\n]*/, null ]), n.push([ N, /^\/\*[\s\S]*?(?:\*\/|$)/, null ]));
var o = e.regexLiterals;
if (o) {
var a = o > 1 ? "" : "\n\r", s = a ? "." : "[\\S\\s]", l = "/(?=[^/*" + a + "])(?:[^/\\x5B\\x5C" + a + "]|\\x5C" + s + "|\\x5B(?:[^\\x5C\\x5D" + a + "]|\\x5C" + s + ")*(?:\\x5D|$))+/";
n.push([ "lang-regex", RegExp("^" + O + "(" + l + ")") ]);
}
var c = e.types;
c && n.push([ M, c ]);
var u = ("" + e.keywords).replace(/^ | $/g, "");
u.length && n.push([ D, new RegExp("^(?:" + u.replace(/[\s,]+/g, "|") + ")\\b"), null ]),
t.push([ R, /^\s+/, null, " \r\n \xa0" ]);
var d = "^.[^\\s\\w.$@'\"`/\\\\]*";
return e.regexLiterals && (d += "(?!s*/)"), n.push([ L, /^@[a-z_$][a-z_$@0-9]*/i, null ], [ M, /^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/, null ], [ R, /^[a-z_$][a-z_$@0-9]*/i, null ], [ L, new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*", "i"), null, "0123456789" ], [ R, /^\\[\s\S]?/, null ], [ A, new RegExp(d), null ]),
r(t, n);
}
function a(e, t, n) {
function i(e) {
var t = e.nodeType;
if (1 != t || o.test(e.className)) {
if ((3 == t || 4 == t) && n) {
var l = e.nodeValue, c = l.match(a);
if (c) {
var u = l.substring(0, c.index);
e.nodeValue = u;
var d = l.substring(c.index + c[0].length);
if (d) {
var p = e.parentNode;
p.insertBefore(s.createTextNode(d), e.nextSibling);
}
r(e), u || e.parentNode.removeChild(e);
}
}
} else if ("br" === e.nodeName) r(e), e.parentNode && e.parentNode.removeChild(e); else for (var h = e.firstChild; h; h = h.nextSibling) i(h);
}
function r(e) {
function t(e, n) {
var i = n ? e.cloneNode(!1) : e, r = e.parentNode;
if (r) {
var o = t(r, 1), a = e.nextSibling;
o.appendChild(i);
for (var s = a; s; s = a) a = s.nextSibling, o.appendChild(s);
}
return i;
}
for (;!e.nextSibling; ) if (!(e = e.parentNode)) return;
for (var n, i = t(e.nextSibling, 0); (n = i.parentNode) && 1 === n.nodeType; ) i = n;
c.push(i);
}
for (var o = /(?:^|\s)nocode(?:\s|$)/, a = /\r\n?|\n/, s = e.ownerDocument, l = s.createElement("li"); e.firstChild; ) l.appendChild(e.firstChild);
for (var c = [ l ], u = 0; u < c.length; ++u) i(c[u]);
t === (0 | t) && c[0].setAttribute("value", t);
var d = s.createElement("ol");
d.className = "linenums";
for (var p = Math.max(0, t - 1 | 0) || 0, u = 0, h = c.length; h > u; ++u) l = c[u],
l.className = "L" + (u + p) % 10, l.firstChild || l.appendChild(s.createTextNode("\xa0")),
d.appendChild(l);
e.appendChild(d);
}
function s(e) {
var t = /\bMSIE\s(\d+)/.exec(navigator.userAgent);
t = t && +t[1] <= 8;
var n = /\n/g, i = e.sourceCode, r = i.length, o = 0, a = e.spans, s = a.length, l = 0, c = e.decorations, u = c.length, d = 0;
c[u] = r;
var p, h;
for (h = p = 0; u > h; ) c[h] !== c[h + 2] ? (c[p++] = c[h++], c[p++] = c[h++]) : h += 2;
for (u = p, h = p = 0; u > h; ) {
for (var f = c[h], m = c[h + 1], g = h + 2; u >= g + 2 && c[g + 1] === m; ) g += 2;
c[p++] = f, c[p++] = m, h = g;
}
u = c.length = p;
var v, b = e.sourceNode;
b && (v = b.style.display, b.style.display = "none");
try {
for (;s > l; ) {
var y, x = (a[l], a[l + 2] || r), w = c[d + 2] || r, g = Math.min(x, w), S = a[l + 1];
if (1 !== S.nodeType && (y = i.substring(o, g))) {
t && (y = y.replace(n, "\r")), S.nodeValue = y;
var C = S.ownerDocument, _ = C.createElement("span");
_.className = c[d + 1];
var k = S.parentNode;
k.replaceChild(_, S), _.appendChild(S), x > o && (a[l + 1] = S = C.createTextNode(i.substring(g, x)),
k.insertBefore(S, _.nextSibling));
}
o = g, o >= x && (l += 2), o >= w && (d += 2);
}
} finally {
b && (b.style.display = v);
}
}
function l(e, t) {
for (var n = t.length; --n >= 0; ) {
var i = t[n];
j.hasOwnProperty(i) ? h.console && console.warn("cannot override language handler %s", i) : j[i] = e;
}
}
function c(e, t) {
return e && j.hasOwnProperty(e) || (e = /^\s*</.test(t) ? "default-markup" : "default-code"),
j[e];
}
function u(e) {
var n = e.langExtension;
try {
var i = t(e.sourceNode, e.pre), r = i.sourceCode;
e.sourceCode = r, e.spans = i.spans, e.basePos = 0, c(n, r)(e), s(e);
} catch (e) {
h.console && console.log(e && e.stack || e);
}
}
function d(e, t, n) {
var i = document.createElement("div");
return i.innerHTML = "<pre>" + e + "</pre>", i = i.firstChild, n && a(i, n, !0),
u({
langExtension: t,
numberLines: n,
sourceNode: i,
pre: 1
}), i.innerHTML;
}
function p(e, t) {
function n(e) {
return o.getElementsByTagName(e);
}
function r() {
for (var t = h.PR_SHOULD_USE_CONTINUATION ? m.now() + 250 : 1 / 0; v < c.length && m.now() < t; v++) {
for (var n = c[v], o = _, l = n; l = l.previousSibling; ) {
var d = l.nodeType, p = (7 === d || 8 === d) && l.nodeValue;
if (p ? !/^\??prettify\b/.test(p) : 3 !== d || /\S/.test(l.nodeValue)) break;
if (p) {
o = {}, p.replace(/\b(\w+)=([\w:.%+-]+)/g, function(e, t, n) {
o[t] = n;
});
break;
}
}
var f = n.className;
if ((o !== _ || y.test(f)) && !x.test(f)) {
for (var k = !1, E = n.parentNode; E; E = E.parentNode) {
var T = E.tagName;
if (C.test(T) && E.className && y.test(E.className)) {
k = !0;
break;
}
}
if (!k) {
n.className += " prettyprinted";
var I = o.lang;
if (!I) {
I = f.match(b);
var D;
!I && (D = i(n)) && S.test(D.tagName) && (I = D.className.match(b)), I && (I = I[1]);
}
var N;
if (w.test(n.tagName)) N = 1; else {
var M = n.currentStyle, L = s.defaultView, A = M ? M.whiteSpace : L && L.getComputedStyle ? L.getComputedStyle(n, null).getPropertyValue("white-space") : 0;
N = A && "pre" === A.substring(0, 3);
}
var R = o.linenums;
(R = "true" === R || +R) || (R = f.match(/\blinenums\b(?::(\d+))?/), R = !(!R || R[1] && R[1].length && !+R[1])),
R && a(n, R, N), g = {
langExtension: I,
sourceNode: n,
numberLines: R,
pre: N
}, u(g);
}
}
}
v < c.length ? setTimeout(r, 250) : "function" == typeof e && e();
}
for (var o = t || document.body, s = o.ownerDocument || document, l = [ n("pre"), n("code"), n("xmp") ], c = [], d = 0; d < l.length; ++d) for (var p = 0, f = l[d].length; f > p; ++p) c.push(l[d][p]);
l = null;
var m = Date;
m.now || (m = {
now: function() {
return +new Date();
}
});
var g, v = 0, b = /\blang(?:uage)?-([\w.]+)(?!\S)/, y = /\bprettyprint\b/, x = /\bprettyprinted\b/, w = /pre|xmp/i, S = /^code$/i, C = /^(?:pre|code|xmp)$/i, _ = {};
r();
}
var h = window, f = [ "break,continue,do,else,for,if,return,while" ], m = [ f, "auto,case,char,const,default,double,enum,extern,float,goto,inline,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile" ], g = [ m, "catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof" ], v = [ g, "alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,delegate,dynamic_cast,explicit,export,friend,generic,late_check,mutable,namespace,nullptr,property,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where" ], b = [ g, "abstract,assert,boolean,byte,extends,final,finally,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient" ], y = [ b, "as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,internal,into,is,let,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var,virtual,where" ], x = [ g, "debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN" ], w = "caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END", S = [ f, "and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None" ], C = [ f, "alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END" ], _ = [ f, "as,assert,const,copy,drop,enum,extern,fail,false,fn,impl,let,log,loop,match,mod,move,mut,priv,pub,pure,ref,self,static,struct,true,trait,type,unsafe,use" ], k = [ f, "case,done,elif,esac,eval,fi,function,in,local,set,then,until" ], E = [ v, y, x, w, S, C, k ], T = /^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)\b/, I = "str", D = "kwd", N = "com", M = "typ", L = "lit", A = "pun", R = "pln", P = "src", O = "(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*", F = /\S/, B = o({
keywords: E,
hashComments: !0,
cStyleComments: !0,
multiLineStrings: !0,
regexLiterals: !0
}), j = {};
l(B, [ "default-code" ]), l(r([], [ [ R, /^[^<?]+/ ], [ "dec", /^<!\w[^>]*(?:>|$)/ ], [ N, /^<\!--[\s\S]*?(?:-\->|$)/ ], [ "lang-", /^<\?([\s\S]+?)(?:\?>|$)/ ], [ "lang-", /^<%([\s\S]+?)(?:%>|$)/ ], [ A, /^(?:<[%?]|[%?]>)/ ], [ "lang-", /^<xmp\b[^>]*>([\s\S]+?)<\/xmp\b[^>]*>/i ], [ "lang-js", /^<script\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i ], [ "lang-css", /^<style\b[^>]*>([\s\S]*?)(<\/style\b[^>]*>)/i ], [ "lang-in.tag", /^(<\/?[a-z][^<>]*>)/i ] ]), [ "default-markup", "htm", "html", "mxml", "xhtml", "xml", "xsl" ]),
l(r([ [ R, /^[\s]+/, null, " \r\n" ], [ "atv", /^(?:\"[^\"]*\"?|\'[^\']*\'?)/, null, "\"'" ] ], [ [ "tag", /^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i ], [ "atn", /^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i ], [ "lang-uq.val", /^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/ ], [ A, /^[=<>\/]+/ ], [ "lang-js", /^on\w+\s*=\s*\"([^\"]+)\"/i ], [ "lang-js", /^on\w+\s*=\s*\'([^\']+)\'/i ], [ "lang-js", /^on\w+\s*=\s*([^\"\'>\s]+)/i ], [ "lang-css", /^style\s*=\s*\"([^\"]+)\"/i ], [ "lang-css", /^style\s*=\s*\'([^\']+)\'/i ], [ "lang-css", /^style\s*=\s*([^\"\'>\s]+)/i ] ]), [ "in.tag" ]),
l(r([], [ [ "atv", /^[\s\S]+/ ] ]), [ "uq.val" ]), l(o({
keywords: v,
hashComments: !0,
cStyleComments: !0,
types: T
}), [ "c", "cc", "cpp", "cxx", "cyc", "m" ]), l(o({
keywords: "null,true,false"
}), [ "json" ]), l(o({
keywords: y,
hashComments: !0,
cStyleComments: !0,
verbatimStrings: !0,
types: T
}), [ "cs" ]), l(o({
keywords: b,
cStyleComments: !0
}), [ "java" ]), l(o({
keywords: k,
hashComments: !0,
multiLineStrings: !0
}), [ "bash", "bsh", "csh", "sh" ]), l(o({
keywords: S,
hashComments: !0,
multiLineStrings: !0,
tripleQuotedStrings: !0
}), [ "cv", "py", "python" ]), l(o({
keywords: w,
hashComments: !0,
multiLineStrings: !0,
regexLiterals: 2
}), [ "perl", "pl", "pm" ]), l(o({
keywords: C,
hashComments: !0,
multiLineStrings: !0,
regexLiterals: !0
}), [ "rb", "ruby" ]), l(o({
keywords: x,
cStyleComments: !0,
regexLiterals: !0
}), [ "javascript", "js" ]), l(o({
keywords: "all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes",
hashComments: 3,
cStyleComments: !0,
multilineStrings: !0,
tripleQuotedStrings: !0,
regexLiterals: !0
}), [ "coffee" ]), l(o({
keywords: _,
cStyleComments: !0,
multilineStrings: !0
}), [ "rc", "rs", "rust" ]), l(r([], [ [ I, /^[\s\S]+/ ] ]), [ "regex" ]);
var $ = h.PR = {
createSimpleLexer: r,
registerLangHandler: l,
sourceDecorator: o,
PR_ATTRIB_NAME: "atn",
PR_ATTRIB_VALUE: "atv",
PR_COMMENT: N,
PR_DECLARATION: "dec",
PR_KEYWORD: D,
PR_LITERAL: L,
PR_NOCODE: "nocode",
PR_PLAIN: R,
PR_PUNCTUATION: A,
PR_SOURCE: P,
PR_STRING: I,
PR_TAG: "tag",
PR_TYPE: M,
prettyPrintOne: IN_GLOBAL_SCOPE ? h.prettyPrintOne = d : prettyPrintOne = d,
prettyPrint: prettyPrint = IN_GLOBAL_SCOPE ? h.prettyPrint = p : prettyPrint = p
};
"function" == typeof define && define.amd && define("google-code-prettify", [], function() {
return $;
});
}();
var hljs = new function() {
function e(e) {
return e.replace(/&/gm, "&amp;").replace(/</gm, "&lt;").replace(/>/gm, "&gt;");
}
function t(e) {
return e.nodeName.toLowerCase();
}
function n(e, t) {
var n = e && e.exec(t);
return n && 0 == n.index;
}
function i(e) {
return Array.prototype.map.call(e.childNodes, function(e) {
return 3 == e.nodeType ? b.useBR ? e.nodeValue.replace(/\n/g, "") : e.nodeValue : "br" == t(e) ? "\n" : i(e);
}).join("");
}
function r(e) {
var t = (e.className + " " + (e.parentNode ? e.parentNode.className : "")).split(/\s+/);
return t = t.map(function(e) {
return e.replace(/^language-/, "");
}), t.filter(function(e) {
return v(e) || "no-highlight" == e;
})[0];
}
function o(e, t) {
var n = {};
for (var i in e) n[i] = e[i];
if (t) for (var i in t) n[i] = t[i];
return n;
}
function a(e) {
var n = [];
return function i(e, r) {
for (var o = e.firstChild; o; o = o.nextSibling) 3 == o.nodeType ? r += o.nodeValue.length : "br" == t(o) ? r += 1 : 1 == o.nodeType && (n.push({
event: "start",
offset: r,
node: o
}), r = i(o, r), n.push({
event: "stop",
offset: r,
node: o
}));
return r;
}(e, 0), n;
}
function s(n, i, r) {
function o() {
return n.length && i.length ? n[0].offset != i[0].offset ? n[0].offset < i[0].offset ? n : i : "start" == i[0].event ? n : i : n.length ? n : i;
}
function a(n) {
function i(t) {
return " " + t.nodeName + '="' + e(t.value) + '"';
}
u += "<" + t(n) + Array.prototype.map.call(n.attributes, i).join("") + ">";
}
function s(e) {
u += "</" + t(e) + ">";
}
function l(e) {
("start" == e.event ? a : s)(e.node);
}
for (var c = 0, u = "", d = []; n.length || i.length; ) {
var p = o();
if (u += e(r.substr(c, p[0].offset - c)), c = p[0].offset, p == n) {
d.reverse().forEach(s);
do l(p.splice(0, 1)[0]), p = o(); while (p == n && p.length && p[0].offset == c);
d.reverse().forEach(a);
} else "start" == p[0].event ? d.push(p[0].node) : d.pop(), l(p.splice(0, 1)[0]);
}
return u + e(r.substr(c));
}
function l(e) {
function t(e) {
return e && e.source || e;
}
function n(n, i) {
return RegExp(t(n), "m" + (e.cI ? "i" : "") + (i ? "g" : ""));
}
function i(r, a) {
function s(t, n) {
e.cI && (n = n.toLowerCase()), n.split(" ").forEach(function(e) {
var n = e.split("|");
l[n[0]] = [ t, n[1] ? Number(n[1]) : 1 ];
});
}
if (!r.compiled) {
if (r.compiled = !0, r.k = r.k || r.bK, r.k) {
var l = {};
"string" == typeof r.k ? s("keyword", r.k) : Object.keys(r.k).forEach(function(e) {
s(e, r.k[e]);
}), r.k = l;
}
r.lR = n(r.l || /\b[A-Za-z0-9_]+\b/, !0), a && (r.bK && (r.b = r.bK.split(" ").join("|")),
r.b || (r.b = /\B|\b/), r.bR = n(r.b), r.e || r.eW || (r.e = /\B|\b/), r.e && (r.eR = n(r.e)),
r.tE = t(r.e) || "", r.eW && a.tE && (r.tE += (r.e ? "|" : "") + a.tE)), r.i && (r.iR = n(r.i)),
void 0 === r.r && (r.r = 1), r.c || (r.c = []);
var c = [];
r.c.forEach(function(e) {
e.v ? e.v.forEach(function(t) {
c.push(o(e, t));
}) : c.push("self" == e ? r : e);
}), r.c = c, r.c.forEach(function(e) {
i(e, r);
}), r.starts && i(r.starts, a);
var u = r.c.map(function(e) {
return e.bK ? "\\.?\\b(" + e.b + ")\\b\\.?" : e.b;
}).concat([ r.tE ]).concat([ r.i ]).map(t).filter(Boolean);
r.t = u.length ? n(u.join("|"), !0) : {
exec: function() {
return null;
}
}, r.continuation = {};
}
}
i(e);
}
function c(t, i, r, o) {
function a(e, t) {
for (var i = 0; i < t.c.length; i++) if (n(t.c[i].bR, e)) return t.c[i];
}
function s(e, t) {
return n(e.eR, t) ? e : e.eW ? s(e.parent, t) : void 0;
}
function d(e, t) {
return !r && n(t.iR, e);
}
function p(e, t) {
var n = S.cI ? t[0].toLowerCase() : t[0];
return e.k.hasOwnProperty(n) && e.k[n];
}
function h(e, t, n, i) {
var r = i ? "" : b.classPrefix, o = '<span class="' + r, a = n ? "" : "</span>";
return (o += e + '">') + t + a;
}
function f() {
var t = e(E);
if (!C.k) return t;
var n = "", i = 0;
C.lR.lastIndex = 0;
for (var r = C.lR.exec(t); r; ) {
n += t.substr(i, r.index - i);
var o = p(C, r);
o ? (T += o[1], n += h(o[0], r[0])) : n += r[0], i = C.lR.lastIndex, r = C.lR.exec(t);
}
return n + t.substr(i);
}
function m() {
if (C.sL && !y[C.sL]) return e(E);
var t = C.sL ? c(C.sL, E, !0, C.continuation.top) : u(E);
return C.r > 0 && (T += t.r), "continuous" == C.subLanguageMode && (C.continuation.top = t.top),
h(t.language, t.value, !1, !0);
}
function g() {
return void 0 !== C.sL ? m() : f();
}
function x(t, n) {
var i = t.cN ? h(t.cN, "", !0) : "";
t.rB ? (_ += i, E = "") : t.eB ? (_ += e(n) + i, E = "") : (_ += i, E = n), C = Object.create(t, {
parent: {
value: C
}
});
}
function w(t, n) {
if (E += t, void 0 === n) return _ += g(), 0;
var i = a(n, C);
if (i) return _ += g(), x(i, n), i.rB ? 0 : n.length;
var r = s(C, n);
if (r) {
var o = C;
o.rE || o.eE || (E += n), _ += g();
do C.cN && (_ += "</span>"), T += C.r, C = C.parent; while (C != r.parent);
return o.eE && (_ += e(n)), E = "", r.starts && x(r.starts, ""), o.rE ? 0 : n.length;
}
if (d(n, C)) throw new Error('Illegal lexeme "' + n + '" for mode "' + (C.cN || "<unnamed>") + '"');
return E += n, n.length || 1;
}
var S = v(t);
if (!S) throw new Error('Unknown language: "' + t + '"');
l(S);
for (var C = o || S, _ = "", k = C; k != S; k = k.parent) k.cN && (_ = h(k.cN, _, !0));
var E = "", T = 0;
try {
for (var I, D, N = 0; C.t.lastIndex = N, I = C.t.exec(i); ) D = w(i.substr(N, I.index - N), I[0]),
N = I.index + D;
w(i.substr(N));
for (var k = C; k.parent; k = k.parent) k.cN && (_ += "</span>");
return {
r: T,
value: _,
language: t,
top: C
};
} catch (t) {
if (-1 != t.message.indexOf("Illegal")) return {
r: 0,
value: e(i)
};
throw t;
}
}
function u(t, n) {
n = n || b.languages || Object.keys(y);
var i = {
r: 0,
value: e(t)
}, r = i;
return n.forEach(function(e) {
if (v(e)) {
var n = c(e, t, !1);
n.language = e, n.r > r.r && (r = n), n.r > i.r && (r = i, i = n);
}
}), r.language && (i.second_best = r), i;
}
function d(e) {
return b.tabReplace && (e = e.replace(/^((<[^>]+>|\t)+)/gm, function(e, t) {
return t.replace(/\t/g, b.tabReplace);
})), b.useBR && (e = e.replace(/\n/g, "<br>")), e;
}
function p(e) {
var t = i(e), n = r(e);
if ("no-highlight" != n) {
var o = n ? c(n, t, !0) : u(t), l = a(e);
if (l.length) {
var p = document.createElementNS("http://www.w3.org/1999/xhtml", "pre");
p.innerHTML = o.value, o.value = s(l, a(p), t);
}
o.value = d(o.value), e.innerHTML = o.value, e.className += " hljs " + (!n && o.language || ""),
e.result = {
language: o.language,
re: o.r
}, o.second_best && (e.second_best = {
language: o.second_best.language,
re: o.second_best.r
});
}
}
function h(e) {
b = o(b, e);
}
function f() {
if (!f.called) {
f.called = !0;
var e = document.querySelectorAll("pre code");
Array.prototype.forEach.call(e, p);
}
}
function m() {
addEventListener("DOMContentLoaded", f, !1), addEventListener("load", f, !1);
}
function g(e, t) {
var n = y[e] = t(this);
n.aliases && n.aliases.forEach(function(t) {
x[t] = e;
});
}
function v(e) {
return y[e] || y[x[e]];
}
var b = {
classPrefix: "hljs-",
tabReplace: null,
useBR: !1,
languages: void 0
}, y = {}, x = {};
this.highlight = c, this.highlightAuto = u, this.fixMarkup = d, this.highlightBlock = p,
this.configure = h, this.initHighlighting = f, this.initHighlightingOnLoad = m,
this.registerLanguage = g, this.getLanguage = v, this.inherit = o, this.IR = "[a-zA-Z][a-zA-Z0-9_]*",
this.UIR = "[a-zA-Z_][a-zA-Z0-9_]*", this.NR = "\\b\\d+(\\.\\d+)?", this.CNR = "(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",
this.BNR = "\\b(0b[01]+)", this.RSR = "!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",
this.BE = {
b: "\\\\[\\s\\S]",
r: 0
}, this.ASM = {
cN: "string",
b: "'",
e: "'",
i: "\\n",
c: [ this.BE ]
}, this.QSM = {
cN: "string",
b: '"',
e: '"',
i: "\\n",
c: [ this.BE ]
}, this.CLCM = {
cN: "comment",
b: "//",
e: "$"
}, this.CBLCLM = {
cN: "comment",
b: "/\\*",
e: "\\*/"
}, this.HCM = {
cN: "comment",
b: "#",
e: "$"
}, this.NM = {
cN: "number",
b: this.NR,
r: 0
}, this.CNM = {
cN: "number",
b: this.CNR,
r: 0
}, this.BNM = {
cN: "number",
b: this.BNR,
r: 0
}, this.REGEXP_MODE = {
cN: "regexp",
b: /\//,
e: /\/[gim]*/,
i: /\n/,
c: [ this.BE, {
b: /\[/,
e: /\]/,
r: 0,
c: [ this.BE ]
} ]
}, this.TM = {
cN: "title",
b: this.IR,
r: 0
}, this.UTM = {
cN: "title",
b: this.UIR,
r: 0
};
}();
hljs.registerLanguage("bash", function(e) {
var t = {
cN: "variable",
v: [ {
b: /\$[\w\d#@][\w\d_]*/
}, {
b: /\$\{(.*?)\}/
} ]
}, n = {
cN: "string",
b: /"/,
e: /"/,
c: [ e.BE, t, {
cN: "variable",
b: /\$\(/,
e: /\)/,
c: [ e.BE ]
} ]
}, i = {
cN: "string",
b: /'/,
e: /'/
};
return {
l: /-?[a-z\.]+/,
k: {
keyword: "if then else elif fi for break continue while in do done exit return set declare case esac export exec",
literal: "true false",
built_in: "printf echo read cd pwd pushd popd dirs let eval unset typeset readonly getopts source shopt caller type hash bind help sudo",
operator: "-ne -eq -lt -gt -f -d -e -s -l -a"
},
c: [ {
cN: "shebang",
b: /^#![^\n]+sh\s*$/,
r: 10
}, {
cN: "function",
b: /\w[\w\d_]*\s*\(\s*\)\s*\{/,
rB: !0,
c: [ e.inherit(e.TM, {
b: /\w[\w\d_]*/
}) ],
r: 0
}, e.HCM, e.NM, n, i, t ]
};
}), hljs.registerLanguage("fix", function() {
return {
c: [ {
b: /[^\u2401\u0001]+/,
e: /[\u2401\u0001]/,
eE: !0,
rB: !0,
rE: !1,
c: [ {
b: /([^\u2401\u0001=]+)/,
e: /=([^\u2401\u0001=]+)/,
rE: !0,
rB: !1,
cN: "attribute"
}, {
b: /=/,
e: /([\u2401\u0001])/,
eE: !0,
eB: !0,
cN: "string"
} ]
} ],
cI: !0
};
}), hljs.registerLanguage("erlang", function(e) {
var t = "[a-z'][a-zA-Z0-9_']*", n = "(" + t + ":" + t + "|" + t + ")", i = {
keyword: "after and andalso|10 band begin bnot bor bsl bzr bxor case catch cond div end fun let not of orelse|10 query receive rem try when xor",
literal: "false true"
}, r = {
cN: "comment",
b: "%",
e: "$",
r: 0
}, o = {
cN: "number",
b: "\\b(\\d+#[a-fA-F0-9]+|\\d+(\\.\\d+)?([eE][-+]?\\d+)?)",
r: 0
}, a = {
b: "fun\\s+" + t + "/\\d+"
}, s = {
b: n + "\\(",
e: "\\)",
rB: !0,
r: 0,
c: [ {
cN: "function_name",
b: n,
r: 0
}, {
b: "\\(",
e: "\\)",
eW: !0,
rE: !0,
r: 0
} ]
}, l = {
cN: "tuple",
b: "{",
e: "}",
r: 0
}, c = {
cN: "variable",
b: "\\b_([A-Z][A-Za-z0-9_]*)?",
r: 0
}, u = {
cN: "variable",
b: "[A-Z][a-zA-Z0-9_]*",
r: 0
}, d = {
b: "#" + e.UIR,
r: 0,
rB: !0,
c: [ {
cN: "record_name",
b: "#" + e.UIR,
r: 0
}, {
b: "{",
e: "}",
r: 0
} ]
}, p = {
bK: "fun receive if try case",
e: "end",
k: i
};
p.c = [ r, a, e.inherit(e.ASM, {
cN: ""
}), p, s, e.QSM, o, l, c, u, d ];
var h = [ r, a, p, s, e.QSM, o, l, c, u, d ];
s.c[1].c = h, l.c = h, d.c[1].c = h;
var f = {
cN: "params",
b: "\\(",
e: "\\)",
c: h
};
return {
k: i,
i: "(</|\\*=|\\+=|-=|/=|/\\*|\\*/|\\(\\*|\\*\\))",
c: [ {
cN: "function",
b: "^" + t + "\\s*\\(",
e: "->",
rB: !0,
i: "\\(|#|//|/\\*|\\\\|:|;",
c: [ f, e.inherit(e.TM, {
b: t
}) ],
starts: {
e: ";|\\.",
k: i,
c: h
}
}, r, {
cN: "pp",
b: "^-",
e: "\\.",
r: 0,
eE: !0,
rB: !0,
l: "-" + e.IR,
k: "-module -record -undef -export -ifdef -ifndef -author -copyright -doc -vsn -import -include -include_lib -compile -define -else -endif -file -behaviour -behavior",
c: [ f ]
}, o, e.QSM, d, c, u, l ]
};
}), hljs.registerLanguage("cs", function(e) {
var t = "abstract as base bool break byte case catch char checked const continue decimal default delegate do double else enum event explicit extern false finally fixed float for foreach goto if implicit in int interface internal is lock long new null object operator out override params private protected public readonly ref return sbyte sealed short sizeof stackalloc static string struct switch this throw true try typeof uint ulong unchecked unsafe ushort using virtual volatile void while async await ascending descending from get group into join let orderby partial select set value var where yield";
return {
k: t,
c: [ {
cN: "comment",
b: "///",
e: "$",
rB: !0,
c: [ {
cN: "xmlDocTag",
b: "///|<!--|-->"
}, {
cN: "xmlDocTag",
b: "</?",
e: ">"
} ]
}, e.CLCM, e.CBLCLM, {
cN: "preprocessor",
b: "#",
e: "$",
k: "if else elif endif define undef warning error line region endregion pragma checksum"
}, {
cN: "string",
b: '@"',
e: '"',
c: [ {
b: '""'
} ]
}, e.ASM, e.QSM, e.CNM, {
bK: "protected public private internal",
e: /[{;=]/,
k: t,
c: [ {
bK: "class namespace interface",
starts: {
c: [ e.TM ]
}
}, {
b: e.IR + "\\s*\\(",
rB: !0,
c: [ e.TM ]
} ]
} ]
};
}), hljs.registerLanguage("brainfuck", function() {
var e = {
cN: "literal",
b: "[\\+\\-]",
r: 0
};
return {
c: [ {
cN: "comment",
b: "[^\\[\\]\\.,\\+\\-<> \r\n]",
rE: !0,
e: "[\\[\\]\\.,\\+\\-<> \r\n]",
r: 0
}, {
cN: "title",
b: "[\\[\\]]",
r: 0
}, {
cN: "string",
b: "[\\.,]",
r: 0
}, {
b: /\+\+|\-\-/,
rB: !0,
c: [ e ]
}, e ]
};
}), hljs.registerLanguage("ruby", function(e) {
var t = "[a-zA-Z_]\\w*[!?=]?|[-+~]\\@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?", n = "and false then defined module in return redo if BEGIN retry end for true self when next until do begin unless END rescue nil else break undef not super class case require yield alias while ensure elsif or include attr_reader attr_writer attr_accessor", i = {
cN: "yardoctag",
b: "@[A-Za-z]+"
}, r = {
cN: "comment",
v: [ {
b: "#",
e: "$",
c: [ i ]
}, {
b: "^\\=begin",
e: "^\\=end",
c: [ i ],
r: 10
}, {
b: "^__END__",
e: "\\n$"
} ]
}, o = {
cN: "subst",
b: "#\\{",
e: "}",
k: n
}, a = {
cN: "string",
c: [ e.BE, o ],
v: [ {
b: /'/,
e: /'/
}, {
b: /"/,
e: /"/
}, {
b: "%[qw]?\\(",
e: "\\)"
}, {
b: "%[qw]?\\[",
e: "\\]"
}, {
b: "%[qw]?{",
e: "}"
}, {
b: "%[qw]?<",
e: ">",
r: 10
}, {
b: "%[qw]?/",
e: "/",
r: 10
}, {
b: "%[qw]?%",
e: "%",
r: 10
}, {
b: "%[qw]?-",
e: "-",
r: 10
}, {
b: "%[qw]?\\|",
e: "\\|",
r: 10
}, {
b: /\B\?(\\\d{1,3}|\\x[A-Fa-f0-9]{1,2}|\\u[A-Fa-f0-9]{4}|\\?\S)\b/
} ]
}, s = {
cN: "params",
b: "\\(",
e: "\\)",
k: n
}, l = [ a, r, {
cN: "class",
bK: "class module",
e: "$|;",
i: /=/,
c: [ e.inherit(e.TM, {
b: "[A-Za-z_]\\w*(::\\w+)*(\\?|\\!)?"
}), {
cN: "inheritance",
b: "<\\s*",
c: [ {
cN: "parent",
b: "(" + e.IR + "::)?" + e.IR
} ]
}, r ]
}, {
cN: "function",
bK: "def",
e: " |$|;",
r: 0,
c: [ e.inherit(e.TM, {
b: t
}), s, r ]
}, {
cN: "constant",
b: "(::)?(\\b[A-Z]\\w*(::)?)+",
r: 0
}, {
cN: "symbol",
b: ":",
c: [ a, {
b: t
} ],
r: 0
}, {
cN: "symbol",
b: e.UIR + "(\\!|\\?)?:",
r: 0
}, {
cN: "number",
b: "(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",
r: 0
}, {
cN: "variable",
b: "(\\$\\W)|((\\$|\\@\\@?)(\\w+))"
}, {
b: "(" + e.RSR + ")\\s*",
c: [ r, {
cN: "regexp",
c: [ e.BE, o ],
i: /\n/,
v: [ {
b: "/",
e: "/[a-z]*"
}, {
b: "%r{",
e: "}[a-z]*"
}, {
b: "%r\\(",
e: "\\)[a-z]*"
}, {
b: "%r!",
e: "![a-z]*"
}, {
b: "%r\\[",
e: "\\][a-z]*"
} ]
} ],
r: 0
} ];
return o.c = l, s.c = l, {
k: n,
c: l
};
}), hljs.registerLanguage("rust", function(e) {
var t = {
cN: "number",
b: "\\b(0[xb][A-Za-z0-9_]+|[0-9_]+(\\.[0-9_]+)?([uif](8|16|32|64)?)?)",
r: 0
};
return {
k: "assert bool break char check claim comm const cont copy dir do drop else enum extern export f32 f64 fail false float fn for i16 i32 i64 i8 if impl int let log loop match mod move mut priv pub pure ref return self static str struct task true trait type u16 u32 u64 u8 uint unsafe use vec while",
i: "</",
c: [ e.CLCM, e.CBLCLM, e.inherit(e.QSM, {
i: null
}), e.ASM, t, {
cN: "function",
bK: "fn",
e: "(\\(|<)",
c: [ e.UTM ]
}, {
cN: "preprocessor",
b: "#\\[",
e: "\\]"
}, {
bK: "type",
e: "(=|<)",
c: [ e.UTM ],
i: "\\S"
}, {
bK: "trait enum",
e: "({|<)",
c: [ e.UTM ],
i: "\\S"
} ]
};
}), hljs.registerLanguage("ruleslanguage", function(e) {
return {
k: {
keyword: "BILL_PERIOD BILL_START BILL_STOP RS_EFFECTIVE_START RS_EFFECTIVE_STOP RS_JURIS_CODE RS_OPCO_CODE INTDADDATTRIBUTE|5 INTDADDVMSG|5 INTDBLOCKOP|5 INTDBLOCKOPNA|5 INTDCLOSE|5 INTDCOUNT|5 INTDCOUNTSTATUSCODE|5 INTDCREATEMASK|5 INTDCREATEDAYMASK|5 INTDCREATEFACTORMASK|5 INTDCREATEHANDLE|5 INTDCREATEOVERRIDEDAYMASK|5 INTDCREATEOVERRIDEMASK|5 INTDCREATESTATUSCODEMASK|5 INTDCREATETOUPERIOD|5 INTDDELETE|5 INTDDIPTEST|5 INTDEXPORT|5 INTDGETERRORCODE|5 INTDGETERRORMESSAGE|5 INTDISEQUAL|5 INTDJOIN|5 INTDLOAD|5 INTDLOADACTUALCUT|5 INTDLOADDATES|5 INTDLOADHIST|5 INTDLOADLIST|5 INTDLOADLISTDATES|5 INTDLOADLISTENERGY|5 INTDLOADLISTHIST|5 INTDLOADRELATEDCHANNEL|5 INTDLOADSP|5 INTDLOADSTAGING|5 INTDLOADUOM|5 INTDLOADUOMDATES|5 INTDLOADUOMHIST|5 INTDLOADVERSION|5 INTDOPEN|5 INTDREADFIRST|5 INTDREADNEXT|5 INTDRECCOUNT|5 INTDRELEASE|5 INTDREPLACE|5 INTDROLLAVG|5 INTDROLLPEAK|5 INTDSCALAROP|5 INTDSCALE|5 INTDSETATTRIBUTE|5 INTDSETDSTPARTICIPANT|5 INTDSETSTRING|5 INTDSETVALUE|5 INTDSETVALUESTATUS|5 INTDSHIFTSTARTTIME|5 INTDSMOOTH|5 INTDSORT|5 INTDSPIKETEST|5 INTDSUBSET|5 INTDTOU|5 INTDTOURELEASE|5 INTDTOUVALUE|5 INTDUPDATESTATS|5 INTDVALUE|5 STDEV INTDDELETEEX|5 INTDLOADEXACTUAL|5 INTDLOADEXCUT|5 INTDLOADEXDATES|5 INTDLOADEX|5 INTDLOADEXRELATEDCHANNEL|5 INTDSAVEEX|5 MVLOAD|5 MVLOADACCT|5 MVLOADACCTDATES|5 MVLOADACCTHIST|5 MVLOADDATES|5 MVLOADHIST|5 MVLOADLIST|5 MVLOADLISTDATES|5 MVLOADLISTHIST|5 IF FOR NEXT DONE SELECT END CALL ABORT CLEAR CHANNEL FACTOR LIST NUMBER OVERRIDE SET WEEK DISTRIBUTIONNODE ELSE WHEN THEN OTHERWISE IENUM CSV INCLUDE LEAVE RIDER SAVE DELETE NOVALUE SECTION WARN SAVE_UPDATE DETERMINANT LABEL REPORT REVENUE EACH IN FROM TOTAL CHARGE BLOCK AND OR CSV_FILE RATE_CODE AUXILIARY_DEMAND UIDACCOUNT RS BILL_PERIOD_SELECT HOURS_PER_MONTH INTD_ERROR_STOP SEASON_SCHEDULE_NAME ACCOUNTFACTOR ARRAYUPPERBOUND CALLSTOREDPROC GETADOCONNECTION GETCONNECT GETDATASOURCE GETQUALIFIER GETUSERID HASVALUE LISTCOUNT LISTOP LISTUPDATE LISTVALUE PRORATEFACTOR RSPRORATE SETBINPATH SETDBMONITOR WQ_OPEN BILLINGHOURS DATE DATEFROMFLOAT DATETIMEFROMSTRING DATETIMETOSTRING DATETOFLOAT DAY DAYDIFF DAYNAME DBDATETIME HOUR MINUTE MONTH MONTHDIFF MONTHHOURS MONTHNAME ROUNDDATE SAMEWEEKDAYLASTYEAR SECOND WEEKDAY WEEKDIFF YEAR YEARDAY YEARSTR COMPSUM HISTCOUNT HISTMAX HISTMIN HISTMINNZ HISTVALUE MAXNRANGE MAXRANGE MINRANGE COMPIKVA COMPKVA COMPKVARFROMKQKW COMPLF IDATTR FLAG LF2KW LF2KWH MAXKW POWERFACTOR READING2USAGE AVGSEASON MAXSEASON MONTHLYMERGE SEASONVALUE SUMSEASON ACCTREADDATES ACCTTABLELOAD CONFIGADD CONFIGGET CREATEOBJECT CREATEREPORT EMAILCLIENT EXPBLKMDMUSAGE EXPMDMUSAGE EXPORT_USAGE FACTORINEFFECT GETUSERSPECIFIEDSTOP INEFFECT ISHOLIDAY RUNRATE SAVE_PROFILE SETREPORTTITLE USEREXIT WATFORRUNRATE TO TABLE ACOS ASIN ATAN ATAN2 BITAND CEIL COS COSECANT COSH COTANGENT DIVQUOT DIVREM EXP FABS FLOOR FMOD FREPM FREXPN LOG LOG10 MAX MAXN MIN MINNZ MODF POW ROUND ROUND2VALUE ROUNDINT SECANT SIN SINH SQROOT TAN TANH FLOAT2STRING FLOAT2STRINGNC INSTR LEFT LEN LTRIM MID RIGHT RTRIM STRING STRINGNC TOLOWER TOUPPER TRIM NUMDAYS READ_DATE STAGING",
built_in: "IDENTIFIER OPTIONS XML_ELEMENT XML_OP XML_ELEMENT_OF DOMDOCCREATE DOMDOCLOADFILE DOMDOCLOADXML DOMDOCSAVEFILE DOMDOCGETROOT DOMDOCADDPI DOMNODEGETNAME DOMNODEGETTYPE DOMNODEGETVALUE DOMNODEGETCHILDCT DOMNODEGETFIRSTCHILD DOMNODEGETSIBLING DOMNODECREATECHILDELEMENT DOMNODESETATTRIBUTE DOMNODEGETCHILDELEMENTCT DOMNODEGETFIRSTCHILDELEMENT DOMNODEGETSIBLINGELEMENT DOMNODEGETATTRIBUTECT DOMNODEGETATTRIBUTEI DOMNODEGETATTRIBUTEBYNAME DOMNODEGETBYNAME"
},
c: [ e.CLCM, e.CBLCLM, e.ASM, e.QSM, e.CNM, {
cN: "array",
b: "#[a-zA-Z .]+"
} ]
};
}), hljs.registerLanguage("rib", function(e) {
return {
k: "ArchiveRecord AreaLightSource Atmosphere Attribute AttributeBegin AttributeEnd Basis Begin Blobby Bound Clipping ClippingPlane Color ColorSamples ConcatTransform Cone CoordinateSystem CoordSysTransform CropWindow Curves Cylinder DepthOfField Detail DetailRange Disk Displacement Display End ErrorHandler Exposure Exterior Format FrameAspectRatio FrameBegin FrameEnd GeneralPolygon GeometricApproximation Geometry Hider Hyperboloid Identity Illuminate Imager Interior LightSource MakeCubeFaceEnvironment MakeLatLongEnvironment MakeShadow MakeTexture Matte MotionBegin MotionEnd NuPatch ObjectBegin ObjectEnd ObjectInstance Opacity Option Orientation Paraboloid Patch PatchMesh Perspective PixelFilter PixelSamples PixelVariance Points PointsGeneralPolygons PointsPolygons Polygon Procedural Projection Quantize ReadArchive RelativeDetail ReverseOrientation Rotate Scale ScreenWindow ShadingInterpolation ShadingRate Shutter Sides Skew SolidBegin SolidEnd Sphere SubdivisionMesh Surface TextureCoordinates Torus Transform TransformBegin TransformEnd TransformPoints Translate TrimCurve WorldBegin WorldEnd",
i: "</",
c: [ e.HCM, e.CNM, e.ASM, e.QSM ]
};
}), hljs.registerLanguage("diff", function() {
return {
c: [ {
cN: "chunk",
r: 10,
v: [ {
b: /^\@\@ +\-\d+,\d+ +\+\d+,\d+ +\@\@$/
}, {
b: /^\*\*\* +\d+,\d+ +\*\*\*\*$/
}, {
b: /^\-\-\- +\d+,\d+ +\-\-\-\-$/
} ]
}, {
cN: "header",
v: [ {
b: /Index: /,
e: /$/
}, {
b: /=====/,
e: /=====$/
}, {
b: /^\-\-\-/,
e: /$/
}, {
b: /^\*{3} /,
e: /$/
}, {
b: /^\+\+\+/,
e: /$/
}, {
b: /\*{5}/,
e: /\*{5}$/
} ]
}, {
cN: "addition",
b: "^\\+",
e: "$"
}, {
cN: "deletion",
b: "^\\-",
e: "$"
}, {
cN: "change",
b: "^\\!",
e: "$"
} ]
};
}), hljs.registerLanguage("haml", function() {
return {
cI: !0,
c: [ {
cN: "doctype",
b: "^!!!( (5|1\\.1|Strict|Frameset|Basic|Mobile|RDFa|XML\\b.*))?$",
r: 10
}, {
cN: "comment",
b: "^\\s*(!=#|=#|-#|/).*$",
r: 0
}, {
b: "^\\s*(-|=|!=)(?!#)",
starts: {
e: "\\n",
sL: "ruby"
}
}, {
cN: "tag",
b: "^\\s*%",
c: [ {
cN: "title",
b: "\\w+"
}, {
cN: "value",
b: "[#\\.]\\w+"
}, {
b: "{\\s*",
e: "\\s*}",
eE: !0,
c: [ {
b: ":\\w+\\s*=>",
e: ",\\s+",
rB: !0,
eW: !0,
c: [ {
cN: "symbol",
b: ":\\w+"
}, {
cN: "string",
b: '"',
e: '"'
}, {
cN: "string",
b: "'",
e: "'"
}, {
b: "\\w+",
r: 0
} ]
} ]
}, {
b: "\\(\\s*",
e: "\\s*\\)",
eE: !0,
c: [ {
b: "\\w+\\s*=",
e: "\\s+",
rB: !0,
eW: !0,
c: [ {
cN: "attribute",
b: "\\w+",
r: 0
}, {
cN: "string",
b: '"',
e: '"'
}, {
cN: "string",
b: "'",
e: "'"
}, {
b: "\\w+",
r: 0
} ]
} ]
} ]
}, {
cN: "bullet",
b: "^\\s*[=~]\\s*",
r: 0
}, {
b: "#{",
starts: {
e: "}",
sL: "ruby"
}
} ]
};
}), hljs.registerLanguage("javascript", function(e) {
return {
aliases: [ "js" ],
k: {
keyword: "in if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const class",
literal: "true false null undefined NaN Infinity",
built_in: "eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError Number Math Date String RegExp Array Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require"
},
c: [ {
cN: "pi",
b: /^\s*('|")use strict('|")/,
r: 10
}, e.ASM, e.QSM, e.CLCM, e.CBLCLM, e.CNM, {
b: "(" + e.RSR + "|\\b(case|return|throw)\\b)\\s*",
k: "return throw case",
c: [ e.CLCM, e.CBLCLM, e.REGEXP_MODE, {
b: /</,
e: />;/,
r: 0,
sL: "xml"
} ],
r: 0
}, {
cN: "function",
bK: "function",
e: /\{/,
c: [ e.inherit(e.TM, {
b: /[A-Za-z$_][0-9A-Za-z$_]*/
}), {
cN: "params",
b: /\(/,
e: /\)/,
c: [ e.CLCM, e.CBLCLM ],
i: /["'\(]/
} ],
i: /\[|%/
}, {
b: /\$[(.]/
}, {
b: "\\." + e.IR,
r: 0
} ]
};
}), hljs.registerLanguage("glsl", function(e) {
return {
k: {
keyword: "atomic_uint attribute bool break bvec2 bvec3 bvec4 case centroid coherent const continue default discard dmat2 dmat2x2 dmat2x3 dmat2x4 dmat3 dmat3x2 dmat3x3 dmat3x4 dmat4 dmat4x2 dmat4x3 dmat4x4 do double dvec2 dvec3 dvec4 else flat float for highp if iimage1D iimage1DArray iimage2D iimage2DArray iimage2DMS iimage2DMSArray iimage2DRect iimage3D iimageBuffer iimageCube iimageCubeArray image1D image1DArray image2D image2DArray image2DMS image2DMSArray image2DRect image3D imageBuffer imageCube imageCubeArray in inout int invariant isampler1D isampler1DArray isampler2D isampler2DArray isampler2DMS isampler2DMSArray isampler2DRect isampler3D isamplerBuffer isamplerCube isamplerCubeArray ivec2 ivec3 ivec4 layout lowp mat2 mat2x2 mat2x3 mat2x4 mat3 mat3x2 mat3x3 mat3x4 mat4 mat4x2 mat4x3 mat4x4 mediump noperspective out patch precision readonly restrict return sample sampler1D sampler1DArray sampler1DArrayShadow sampler1DShadow sampler2D sampler2DArray sampler2DArrayShadow sampler2DMS sampler2DMSArray sampler2DRect sampler2DRectShadow sampler2DShadow sampler3D samplerBuffer samplerCube samplerCubeArray samplerCubeArrayShadow samplerCubeShadow smooth struct subroutine switch uimage1D uimage1DArray uimage2D uimage2DArray uimage2DMS uimage2DMSArray uimage2DRect uimage3D uimageBuffer uimageCube uimageCubeArray uint uniform usampler1D usampler1DArray usampler2D usampler2DArray usampler2DMS usampler2DMSArray usampler2DRect usampler3D usamplerBuffer usamplerCube usamplerCubeArray uvec2 uvec3 uvec4 varying vec2 vec3 vec4 void volatile while writeonly",
built_in: "gl_BackColor gl_BackLightModelProduct gl_BackLightProduct gl_BackMaterial gl_BackSecondaryColor gl_ClipDistance gl_ClipPlane gl_ClipVertex gl_Color gl_DepthRange gl_EyePlaneQ gl_EyePlaneR gl_EyePlaneS gl_EyePlaneT gl_Fog gl_FogCoord gl_FogFragCoord gl_FragColor gl_FragCoord gl_FragData gl_FragDepth gl_FrontColor gl_FrontFacing gl_FrontLightModelProduct gl_FrontLightProduct gl_FrontMaterial gl_FrontSecondaryColor gl_InstanceID gl_InvocationID gl_Layer gl_LightModel gl_LightSource gl_MaxAtomicCounterBindings gl_MaxAtomicCounterBufferSize gl_MaxClipDistances gl_MaxClipPlanes gl_MaxCombinedAtomicCounterBuffers gl_MaxCombinedAtomicCounters gl_MaxCombinedImageUniforms gl_MaxCombinedImageUnitsAndFragmentOutputs gl_MaxCombinedTextureImageUnits gl_MaxDrawBuffers gl_MaxFragmentAtomicCounterBuffers gl_MaxFragmentAtomicCounters gl_MaxFragmentImageUniforms gl_MaxFragmentInputComponents gl_MaxFragmentUniformComponents gl_MaxFragmentUniformVectors gl_MaxGeometryAtomicCounterBuffers gl_MaxGeometryAtomicCounters gl_MaxGeometryImageUniforms gl_MaxGeometryInputComponents gl_MaxGeometryOutputComponents gl_MaxGeometryOutputVertices gl_MaxGeometryTextureImageUnits gl_MaxGeometryTotalOutputComponents gl_MaxGeometryUniformComponents gl_MaxGeometryVaryingComponents gl_MaxImageSamples gl_MaxImageUnits gl_MaxLights gl_MaxPatchVertices gl_MaxProgramTexelOffset gl_MaxTessControlAtomicCounterBuffers gl_MaxTessControlAtomicCounters gl_MaxTessControlImageUniforms gl_MaxTessControlInputComponents gl_MaxTessControlOutputComponents gl_MaxTessControlTextureImageUnits gl_MaxTessControlTotalOutputComponents gl_MaxTessControlUniformComponents gl_MaxTessEvaluationAtomicCounterBuffers gl_MaxTessEvaluationAtomicCounters gl_MaxTessEvaluationImageUniforms gl_MaxTessEvaluationInputComponents gl_MaxTessEvaluationOutputComponents gl_MaxTessEvaluationTextureImageUnits gl_MaxTessEvaluationUniformComponents gl_MaxTessGenLevel gl_MaxTessPatchComponents gl_MaxTextureCoords gl_MaxTextureImageUnits gl_MaxTextureUnits gl_MaxVaryingComponents gl_MaxVaryingFloats gl_MaxVaryingVectors gl_MaxVertexAtomicCounterBuffers gl_MaxVertexAtomicCounters gl_MaxVertexAttribs gl_MaxVertexImageUniforms gl_MaxVertexOutputComponents gl_MaxVertexTextureImageUnits gl_MaxVertexUniformComponents gl_MaxVertexUniformVectors gl_MaxViewports gl_MinProgramTexelOffsetgl_ModelViewMatrix gl_ModelViewMatrixInverse gl_ModelViewMatrixInverseTranspose gl_ModelViewMatrixTranspose gl_ModelViewProjectionMatrix gl_ModelViewProjectionMatrixInverse gl_ModelViewProjectionMatrixInverseTranspose gl_ModelViewProjectionMatrixTranspose gl_MultiTexCoord0 gl_MultiTexCoord1 gl_MultiTexCoord2 gl_MultiTexCoord3 gl_MultiTexCoord4 gl_MultiTexCoord5 gl_MultiTexCoord6 gl_MultiTexCoord7 gl_Normal gl_NormalMatrix gl_NormalScale gl_ObjectPlaneQ gl_ObjectPlaneR gl_ObjectPlaneS gl_ObjectPlaneT gl_PatchVerticesIn gl_PerVertex gl_Point gl_PointCoord gl_PointSize gl_Position gl_PrimitiveID gl_PrimitiveIDIn gl_ProjectionMatrix gl_ProjectionMatrixInverse gl_ProjectionMatrixInverseTranspose gl_ProjectionMatrixTranspose gl_SampleID gl_SampleMask gl_SampleMaskIn gl_SamplePosition gl_SecondaryColor gl_TessCoord gl_TessLevelInner gl_TessLevelOuter gl_TexCoord gl_TextureEnvColor gl_TextureMatrixInverseTranspose gl_TextureMatrixTranspose gl_Vertex gl_VertexID gl_ViewportIndex gl_in gl_out EmitStreamVertex EmitVertex EndPrimitive EndStreamPrimitive abs acos acosh all any asin asinh atan atanh atomicCounter atomicCounterDecrement atomicCounterIncrement barrier bitCount bitfieldExtract bitfieldInsert bitfieldReverse ceil clamp cos cosh cross dFdx dFdy degrees determinant distance dot equal exp exp2 faceforward findLSB findMSB floatBitsToInt floatBitsToUint floor fma fract frexp ftransform fwidth greaterThan greaterThanEqual imageAtomicAdd imageAtomicAnd imageAtomicCompSwap imageAtomicExchange imageAtomicMax imageAtomicMin imageAtomicOr imageAtomicXor imageLoad imageStore imulExtended intBitsToFloat interpolateAtCentroid interpolateAtOffset interpolateAtSample inverse inversesqrt isinf isnan ldexp length lessThan lessThanEqual log log2 matrixCompMult max memoryBarrier min mix mod modf noise1 noise2 noise3 noise4 normalize not notEqual outerProduct packDouble2x32 packHalf2x16 packSnorm2x16 packSnorm4x8 packUnorm2x16 packUnorm4x8 pow radians reflect refract round roundEven shadow1D shadow1DLod shadow1DProj shadow1DProjLod shadow2D shadow2DLod shadow2DProj shadow2DProjLod sign sin sinh smoothstep sqrt step tan tanh texelFetch texelFetchOffset texture texture1D texture1DLod texture1DProj texture1DProjLod texture2D texture2DLod texture2DProj texture2DProjLod texture3D texture3DLod texture3DProj texture3DProjLod textureCube textureCubeLod textureGather textureGatherOffset textureGatherOffsets textureGrad textureGradOffset textureLod textureLodOffset textureOffset textureProj textureProjGrad textureProjGradOffset textureProjLod textureProjLodOffset textureProjOffset textureQueryLod textureSize transpose trunc uaddCarry uintBitsToFloat umulExtended unpackDouble2x32 unpackHalf2x16 unpackSnorm2x16 unpackSnorm4x8 unpackUnorm2x16 unpackUnorm4x8 usubBorrow gl_TextureMatrix gl_TextureMatrixInverse",
literal: "true false"
},
i: '"',
c: [ e.CLCM, e.CBLCLM, e.CNM, {
cN: "preprocessor",
b: "#",
e: "$"
} ]
};
}), hljs.registerLanguage("rsl", function(e) {
return {
k: {
keyword: "float color point normal vector matrix while for if do return else break extern continue",
built_in: "abs acos ambient area asin atan atmosphere attribute calculatenormal ceil cellnoise clamp comp concat cos degrees depth Deriv diffuse distance Du Dv environment exp faceforward filterstep floor format fresnel incident length lightsource log match max min mod noise normalize ntransform opposite option phong pnoise pow printf ptlined radians random reflect refract renderinfo round setcomp setxcomp setycomp setzcomp shadow sign sin smoothstep specular specularbrdf spline sqrt step tan texture textureinfo trace transform vtransform xcomp ycomp zcomp"
},
i: "</",
c: [ e.CLCM, e.CBLCLM, e.QSM, e.ASM, e.CNM, {
cN: "preprocessor",
b: "#",
e: "$"
}, {
cN: "shader",
bK: "surface displacement light volume imager",
e: "\\("
}, {
cN: "shading",
bK: "illuminate illuminance gather",
e: "\\("
} ]
};
}), hljs.registerLanguage("lua", function(e) {
var t = "\\[=*\\[", n = "\\]=*\\]", i = {
b: t,
e: n,
c: [ "self" ]
}, r = [ {
cN: "comment",
b: "--(?!" + t + ")",
e: "$"
}, {
cN: "comment",
b: "--" + t,
e: n,
c: [ i ],
r: 10
} ];
return {
l: e.UIR,
k: {
keyword: "and break do else elseif end false for if in local nil not or repeat return then true until while",
built_in: "_G _VERSION assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall coroutine debug io math os package string table"
},
c: r.concat([ {
cN: "function",
bK: "function",
e: "\\)",
c: [ e.inherit(e.TM, {
b: "([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"
}), {
cN: "params",
b: "\\(",
eW: !0,
c: r
} ].concat(r)
}, e.CNM, e.ASM, e.QSM, {
cN: "string",
b: t,
e: n,
c: [ i ],
r: 10
} ])
};
}), hljs.registerLanguage("xml", function() {
var e = {
b: /<\?(php)?(?!\w)/,
e: /\?>/,
sL: "php",
subLanguageMode: "continuous"
}, t = {
eW: !0,
i: /</,
r: 0,
c: [ e, {
cN: "attribute",
b: "[A-Za-z0-9\\._:-]+",
r: 0
}, {
b: "=",
r: 0,
c: [ {
cN: "value",
v: [ {
b: /"/,
e: /"/
}, {
b: /'/,
e: /'/
}, {
b: /[^\s\/>]+/
} ]
} ]
} ]
};
return {
aliases: [ "html" ],
cI: !0,
c: [ {
cN: "doctype",
b: "<!DOCTYPE",
e: ">",
r: 10,
c: [ {
b: "\\[",
e: "\\]"
} ]
}, {
cN: "comment",
b: "<!--",
e: "-->",
r: 10
}, {
cN: "cdata",
b: "<\\!\\[CDATA\\[",
e: "\\]\\]>",
r: 10
}, {
cN: "tag",
b: "<style(?=\\s|>|$)",
e: ">",
k: {
title: "style"
},
c: [ t ],
starts: {
e: "</style>",
rE: !0,
sL: "css"
}
}, {
cN: "tag",
b: "<script(?=\\s|>|$)",
e: ">",
k: {
title: "script"
},
c: [ t ],
starts: {
e: "</script>",
rE: !0,
sL: "javascript"
}
}, {
b: "<%",
e: "%>",
sL: "vbscript"
}, e, {
cN: "pi",
b: /<\?\w+/,
e: /\?>/,
r: 10
}, {
cN: "tag",
b: "</?",
e: "/?>",
c: [ {
cN: "title",
b: "[^ /><]+",
r: 0
}, t ]
} ]
};
}), hljs.registerLanguage("markdown", function() {
return {
c: [ {
cN: "header",
v: [ {
b: "^#{1,6}",
e: "$"
}, {
b: "^.+?\\n[=-]{2,}$"
} ]
}, {
b: "<",
e: ">",
sL: "xml",
r: 0
}, {
cN: "bullet",
b: "^([*+-]|(\\d+\\.))\\s+"
}, {
cN: "strong",
b: "[*_]{2}.+?[*_]{2}"
}, {
cN: "emphasis",
v: [ {
b: "\\*.+?\\*"
}, {
b: "_.+?_",
r: 0
} ]
}, {
cN: "blockquote",
b: "^>\\s+",
e: "$"
}, {
cN: "code",
v: [ {
b: "`.+?`"
}, {
b: "^( {4}| )",
e: "$",
r: 0
} ]
}, {
cN: "horizontal_rule",
b: "^[-\\*]{3,}",
e: "$"
}, {
b: "\\[.+?\\][\\(\\[].+?[\\)\\]]",
rB: !0,
c: [ {
cN: "link_label",
b: "\\[",
e: "\\]",
eB: !0,
rE: !0,
r: 0
}, {
cN: "link_url",
b: "\\]\\(",
e: "\\)",
eB: !0,
eE: !0
}, {
cN: "link_reference",
b: "\\]\\[",
e: "\\]",
eB: !0,
eE: !0
} ],
r: 10
}, {
b: "^\\[.+\\]:",
e: "$",
rB: !0,
c: [ {
cN: "link_reference",
b: "\\[",
e: "\\]",
eB: !0,
eE: !0
}, {
cN: "link_url",
b: "\\s",
e: "$"
} ]
} ]
};
}), hljs.registerLanguage("css", function(e) {
var t = "[a-zA-Z-][a-zA-Z0-9_-]*", n = {
cN: "function",
b: t + "\\(",
e: "\\)",
c: [ "self", e.NM, e.ASM, e.QSM ]
};
return {
cI: !0,
i: "[=/|']",
c: [ e.CBLCLM, {
cN: "id",
b: "\\#[A-Za-z0-9_-]+"
}, {
cN: "class",
b: "\\.[A-Za-z0-9_-]+",
r: 0
}, {
cN: "attr_selector",
b: "\\[",
e: "\\]",
i: "$"
}, {
cN: "pseudo",
b: ":(:)?[a-zA-Z0-9\\_\\-\\+\\(\\)\\\"\\']+"
}, {
cN: "at_rule",
b: "@(font-face|page)",
l: "[a-z-]+",
k: "font-face page"
}, {
cN: "at_rule",
b: "@",
e: "[{;]",
c: [ {
cN: "keyword",
b: /\S+/
}, {
b: /\s/,
eW: !0,
eE: !0,
r: 0,
c: [ n, e.ASM, e.QSM, e.NM ]
} ]
}, {
cN: "tag",
b: t,
r: 0
}, {
cN: "rules",
b: "{",
e: "}",
i: "[^\\s]",
r: 0,
c: [ e.CBLCLM, {
cN: "rule",
b: "[^\\s]",
rB: !0,
e: ";",
eW: !0,
c: [ {
cN: "attribute",
b: "[A-Z\\_\\.\\-]+",
e: ":",
eE: !0,
i: "[^\\s]",
starts: {
cN: "value",
eW: !0,
eE: !0,
c: [ n, e.NM, e.QSM, e.ASM, e.CBLCLM, {
cN: "hexcolor",
b: "#[0-9A-Fa-f]+"
}, {
cN: "important",
b: "!important"
} ]
}
} ]
} ]
} ]
};
}), hljs.registerLanguage("lisp", function(e) {
var t = "[a-zA-Z_\\-\\+\\*\\/\\<\\=\\>\\&\\#][a-zA-Z0-9_\\-\\+\\*\\/\\<\\=\\>\\&\\#!]*", n = "(\\-|\\+)?\\d+(\\.\\d+|\\/\\d+)?((d|e|f|l|s)(\\+|\\-)?\\d+)?", i = {
cN: "shebang",
b: "^#!",
e: "$"
}, r = {
cN: "literal",
b: "\\b(t{1}|nil)\\b"
}, o = {
cN: "number",
v: [ {
b: n,
r: 0
}, {
b: "#b[0-1]+(/[0-1]+)?"
}, {
b: "#o[0-7]+(/[0-7]+)?"
}, {
b: "#x[0-9a-f]+(/[0-9a-f]+)?"
}, {
b: "#c\\(" + n + " +" + n,
e: "\\)"
} ]
}, a = e.inherit(e.QSM, {
i: null
}), s = {
cN: "comment",
b: ";",
e: "$"
}, l = {
cN: "variable",
b: "\\*",
e: "\\*"
}, c = {
cN: "keyword",
b: "[:&]" + t
}, u = {
b: "\\(",
e: "\\)",
c: [ "self", r, a, o ]
}, d = {
cN: "quoted",
c: [ o, a, l, c, u ],
v: [ {
b: "['`]\\(",
e: "\\)"
}, {
b: "\\(quote ",
e: "\\)",
k: {
title: "quote"
}
} ]
}, p = {
cN: "list",
b: "\\(",
e: "\\)"
}, h = {
eW: !0,
r: 0
};
return p.c = [ {
cN: "title",
b: t
}, h ], h.c = [ d, p, r, o, a, s, l, c ], {
i: /\S/,
c: [ o, i, r, a, s, d, p ]
};
}), hljs.registerLanguage("profile", function(e) {
return {
c: [ e.CNM, {
cN: "built_in",
b: "{",
e: "}$",
eB: !0,
eE: !0,
c: [ e.ASM, e.QSM ],
r: 0
}, {
cN: "filename",
b: "[a-zA-Z_][\\da-zA-Z_]+\\.[\\da-zA-Z_]{1,3}",
e: ":",
eE: !0
}, {
cN: "header",
b: "(ncalls|tottime|cumtime)",
e: "$",
k: "ncalls tottime|10 cumtime|10 filename",
r: 10
}, {
cN: "summary",
b: "function calls",
e: "$",
c: [ e.CNM ],
r: 10
}, e.ASM, e.QSM, {
cN: "function",
b: "\\(",
e: "\\)$",
c: [ e.UTM ],
r: 0
} ]
};
}), hljs.registerLanguage("http", function() {
return {
i: "\\S",
c: [ {
cN: "status",
b: "^HTTP/[0-9\\.]+",
e: "$",
c: [ {
cN: "number",
b: "\\b\\d{3}\\b"
} ]
}, {
cN: "request",
b: "^[A-Z]+ (.*?) HTTP/[0-9\\.]+$",
rB: !0,
e: "$",
c: [ {
cN: "string",
b: " ",
e: " ",
eB: !0,
eE: !0
} ]
}, {
cN: "attribute",
b: "^\\w",
e: ": ",
eE: !0,
i: "\\n|\\s|=",
starts: {
cN: "string",
e: "$"
}
}, {
b: "\\n\\n",
starts: {
sL: "",
eW: !0
}
} ]
};
}), hljs.registerLanguage("java", function(e) {
var t = "false synchronized int abstract float private char boolean static null if const for true while long throw strictfp finally protected import native final return void enum else break transient new catch instanceof byte super volatile case assert short package default double public try this switch continue throws";
return {
k: t,
i: /<\//,
c: [ {
cN: "javadoc",
b: "/\\*\\*",
e: "\\*/",
c: [ {
cN: "javadoctag",
b: "(^|\\s)@[A-Za-z]+"
} ],
r: 10
}, e.CLCM, e.CBLCLM, e.ASM, e.QSM, {
bK: "protected public private",
e: /[{;=]/,
k: t,
c: [ {
cN: "class",
bK: "class interface",
eW: !0,
i: /[:"<>]/,
c: [ {
bK: "extends implements",
r: 10
}, e.UTM ]
}, {
b: e.UIR + "\\s*\\(",
rB: !0,
c: [ e.UTM ]
} ]
}, e.CNM, {
cN: "annotation",
b: "@[A-Za-z]+"
} ]
};
}), hljs.registerLanguage("fsharp", function(e) {
return {
k: "abstract and as assert base begin class default delegate do done downcast downto elif else end exception extern false finally for fun function global if in inherit inline interface internal lazy let match member module mutable namespace new null of open or override private public rec return sig static struct then to true try type upcast use val void when while with yield",
c: [ {
cN: "string",
b: '@"',
e: '"',
c: [ {
b: '""'
} ]
}, {
cN: "string",
b: '"""',
e: '"""'
}, {
cN: "comment",
b: "\\(\\*",
e: "\\*\\)"
}, {
cN: "class",
bK: "type",
e: "\\(|=|$",
c: [ e.UTM ]
}, {
cN: "annotation",
b: "\\[<",
e: ">\\]"
}, {
cN: "attribute",
b: "\\B('[A-Za-z])\\b",
c: [ e.BE ]
}, e.CLCM, e.inherit(e.QSM, {
i: null
}), e.CNM ]
};
}), hljs.registerLanguage("mathematica", function(e) {
return {
aliases: [ "mma" ],
l: "(\\$|\\b)" + e.IR + "\\b",
k: "AbelianGroup Abort AbortKernels AbortProtect Above Abs Absolute AbsoluteCorrelation AbsoluteCorrelationFunction AbsoluteCurrentValue AbsoluteDashing AbsoluteFileName AbsoluteOptions AbsolutePointSize AbsoluteThickness AbsoluteTime AbsoluteTiming AccountingForm Accumulate Accuracy AccuracyGoal ActionDelay ActionMenu ActionMenuBox ActionMenuBoxOptions Active ActiveItem ActiveStyle AcyclicGraphQ AddOnHelpPath AddTo AdjacencyGraph AdjacencyList AdjacencyMatrix AdjustmentBox AdjustmentBoxOptions AdjustTimeSeriesForecast AffineTransform After AiryAi AiryAiPrime AiryAiZero AiryBi AiryBiPrime AiryBiZero AlgebraicIntegerQ AlgebraicNumber AlgebraicNumberDenominator AlgebraicNumberNorm AlgebraicNumberPolynomial AlgebraicNumberTrace AlgebraicRules AlgebraicRulesData Algebraics AlgebraicUnitQ Alignment AlignmentMarker AlignmentPoint All AllowedDimensions AllowGroupClose AllowInlineCells AllowKernelInitialization AllowReverseGroupClose AllowScriptLevelChange AlphaChannel AlternatingGroup AlternativeHypothesis Alternatives AmbientLight Analytic AnchoredSearch And AndersonDarlingTest AngerJ AngleBracket AngularGauge Animate AnimationCycleOffset AnimationCycleRepetitions AnimationDirection AnimationDisplayTime AnimationRate AnimationRepetitions AnimationRunning Animator AnimatorBox AnimatorBoxOptions AnimatorElements Annotation Annuity AnnuityDue Antialiasing Antisymmetric Apart ApartSquareFree Appearance AppearanceElements AppellF1 Append AppendTo Apply ArcCos ArcCosh ArcCot ArcCoth ArcCsc ArcCsch ArcSec ArcSech ArcSin ArcSinDistribution ArcSinh ArcTan ArcTanh Arg ArgMax ArgMin ArgumentCountQ ARIMAProcess ArithmeticGeometricMean ARMAProcess ARProcess Array ArrayComponents ArrayDepth ArrayFlatten ArrayPad ArrayPlot ArrayQ ArrayReshape ArrayRules Arrays Arrow Arrow3DBox ArrowBox Arrowheads AspectRatio AspectRatioFixed Assert Assuming Assumptions AstronomicalData Asynchronous AsynchronousTaskObject AsynchronousTasks AtomQ Attributes AugmentedSymmetricPolynomial AutoAction AutoDelete AutoEvaluateEvents AutoGeneratedPackage AutoIndent AutoIndentSpacings AutoItalicWords AutoloadPath AutoMatch Automatic AutomaticImageSize AutoMultiplicationSymbol AutoNumberFormatting AutoOpenNotebooks AutoOpenPalettes AutorunSequencing AutoScaling AutoScroll AutoSpacing AutoStyleOptions AutoStyleWords Axes AxesEdge AxesLabel AxesOrigin AxesStyle Axis BabyMonsterGroupB Back Background BackgroundTasksSettings Backslash Backsubstitution Backward Band BandpassFilter BandstopFilter BarabasiAlbertGraphDistribution BarChart BarChart3D BarLegend BarlowProschanImportance BarnesG BarOrigin BarSpacing BartlettHannWindow BartlettWindow BaseForm Baseline BaselinePosition BaseStyle BatesDistribution BattleLemarieWavelet Because BeckmannDistribution Beep Before Begin BeginDialogPacket BeginFrontEndInteractionPacket BeginPackage BellB BellY Below BenfordDistribution BeniniDistribution BenktanderGibratDistribution BenktanderWeibullDistribution BernoulliB BernoulliDistribution BernoulliGraphDistribution BernoulliProcess BernsteinBasis BesselFilterModel BesselI BesselJ BesselJZero BesselK BesselY BesselYZero Beta BetaBinomialDistribution BetaDistribution BetaNegativeBinomialDistribution BetaPrimeDistribution BetaRegularized BetweennessCentrality BezierCurve BezierCurve3DBox BezierCurve3DBoxOptions BezierCurveBox BezierCurveBoxOptions BezierFunction BilateralFilter Binarize BinaryFormat BinaryImageQ BinaryRead BinaryReadList BinaryWrite BinCounts BinLists Binomial BinomialDistribution BinomialProcess BinormalDistribution BiorthogonalSplineWavelet BipartiteGraphQ BirnbaumImportance BirnbaumSaundersDistribution BitAnd BitClear BitGet BitLength BitNot BitOr BitSet BitShiftLeft BitShiftRight BitXor Black BlackmanHarrisWindow BlackmanNuttallWindow BlackmanWindow Blank BlankForm BlankNullSequence BlankSequence Blend Block BlockRandom BlomqvistBeta BlomqvistBetaTest Blue Blur BodePlot BohmanWindow Bold Bookmarks Boole BooleanConsecutiveFunction BooleanConvert BooleanCountingFunction BooleanFunction BooleanGraph BooleanMaxterms BooleanMinimize BooleanMinterms Booleans BooleanTable BooleanVariables BorderDimensions BorelTannerDistribution Bottom BottomHatTransform BoundaryStyle Bounds Box BoxBaselineShift BoxData BoxDimensions Boxed Boxes BoxForm BoxFormFormatTypes BoxFrame BoxID BoxMargins BoxMatrix BoxRatios BoxRotation BoxRotationPoint BoxStyle BoxWhiskerChart Bra BracketingBar BraKet BrayCurtisDistance BreadthFirstScan Break Brown BrownForsytheTest BrownianBridgeProcess BrowserCategory BSplineBasis BSplineCurve BSplineCurve3DBox BSplineCurveBox BSplineCurveBoxOptions BSplineFunction BSplineSurface BSplineSurface3DBox BubbleChart BubbleChart3D BubbleScale BubbleSizes BulletGauge BusinessDayQ ButterflyGraph ButterworthFilterModel Button ButtonBar ButtonBox ButtonBoxOptions ButtonCell ButtonContents ButtonData ButtonEvaluator ButtonExpandable ButtonFrame ButtonFunction ButtonMargins ButtonMinHeight ButtonNote ButtonNotebook ButtonSource ButtonStyle ButtonStyleMenuListing Byte ByteCount ByteOrdering C CachedValue CacheGraphics CalendarData CalendarType CallPacket CanberraDistance Cancel CancelButton CandlestickChart Cap CapForm CapitalDifferentialD CardinalBSplineBasis CarmichaelLambda Cases Cashflow Casoratian Catalan CatalanNumber Catch CauchyDistribution CauchyWindow CayleyGraph CDF CDFDeploy CDFInformation CDFWavelet Ceiling Cell CellAutoOverwrite CellBaseline CellBoundingBox CellBracketOptions CellChangeTimes CellContents CellContext CellDingbat CellDynamicExpression CellEditDuplicate CellElementsBoundingBox CellElementSpacings CellEpilog CellEvaluationDuplicate CellEvaluationFunction CellEventActions CellFrame CellFrameColor CellFrameLabelMargins CellFrameLabels CellFrameMargins CellGroup CellGroupData CellGrouping CellGroupingRules CellHorizontalScrolling CellID CellLabel CellLabelAutoDelete CellLabelMargins CellLabelPositioning CellMargins CellObject CellOpen CellPrint CellProlog Cells CellSize CellStyle CellTags CellularAutomaton CensoredDistribution Censoring Center CenterDot CentralMoment CentralMomentGeneratingFunction CForm ChampernowneNumber ChanVeseBinarize Character CharacterEncoding CharacterEncodingsPath CharacteristicFunction CharacteristicPolynomial CharacterRange Characters ChartBaseStyle ChartElementData ChartElementDataFunction ChartElementFunction ChartElements ChartLabels ChartLayout ChartLegends ChartStyle Chebyshev1FilterModel Chebyshev2FilterModel ChebyshevDistance ChebyshevT ChebyshevU Check CheckAbort CheckAll Checkbox CheckboxBar CheckboxBox CheckboxBoxOptions ChemicalData ChessboardDistance ChiDistribution ChineseRemainder ChiSquareDistribution ChoiceButtons ChoiceDialog CholeskyDecomposition Chop Circle CircleBox CircleDot CircleMinus CirclePlus CircleTimes CirculantGraph CityData Clear ClearAll ClearAttributes ClearSystemCache ClebschGordan ClickPane Clip ClipboardNotebook ClipFill ClippingStyle ClipPlanes ClipRange Clock ClockGauge ClockwiseContourIntegral Close Closed CloseKernels ClosenessCentrality Closing ClosingAutoSave ClosingEvent ClusteringComponents CMYKColor Coarse Coefficient CoefficientArrays CoefficientDomain CoefficientList CoefficientRules CoifletWavelet Collect Colon ColonForm ColorCombine ColorConvert ColorData ColorDataFunction ColorFunction ColorFunctionScaling Colorize ColorNegate ColorOutput ColorProfileData ColorQuantize ColorReplace ColorRules ColorSelectorSettings ColorSeparate ColorSetter ColorSetterBox ColorSetterBoxOptions ColorSlider ColorSpace Column ColumnAlignments ColumnBackgrounds ColumnForm ColumnLines ColumnsEqual ColumnSpacings ColumnWidths CommonDefaultFormatTypes Commonest CommonestFilter CommonUnits CommunityBoundaryStyle CommunityGraphPlot CommunityLabels CommunityRegionStyle CompatibleUnitQ CompilationOptions CompilationTarget Compile Compiled CompiledFunction Complement CompleteGraph CompleteGraphQ CompleteKaryTree CompletionsListPacket Complex Complexes ComplexExpand ComplexInfinity ComplexityFunction ComponentMeasurements ComponentwiseContextMenu Compose ComposeList ComposeSeries Composition CompoundExpression CompoundPoissonDistribution CompoundPoissonProcess CompoundRenewalProcess Compress CompressedData Condition ConditionalExpression Conditioned Cone ConeBox ConfidenceLevel ConfidenceRange ConfidenceTransform ConfigurationPath Congruent Conjugate ConjugateTranspose Conjunction Connect ConnectedComponents ConnectedGraphQ ConnesWindow ConoverTest ConsoleMessage ConsoleMessagePacket ConsolePrint Constant ConstantArray Constants ConstrainedMax ConstrainedMin ContentPadding ContentsBoundingBox ContentSelectable ContentSize Context ContextMenu Contexts ContextToFilename ContextToFileName Continuation Continue ContinuedFraction ContinuedFractionK ContinuousAction ContinuousMarkovProcess ContinuousTimeModelQ ContinuousWaveletData ContinuousWaveletTransform ContourDetect ContourGraphics ContourIntegral ContourLabels ContourLines ContourPlot ContourPlot3D Contours ContourShading ContourSmoothing ContourStyle ContraharmonicMean Control ControlActive ControlAlignment ControllabilityGramian ControllabilityMatrix ControllableDecomposition ControllableModelQ ControllerDuration ControllerInformation ControllerInformationData ControllerLinking ControllerManipulate ControllerMethod ControllerPath ControllerState ControlPlacement ControlsRendering ControlType Convergents ConversionOptions ConversionRules ConvertToBitmapPacket ConvertToPostScript ConvertToPostScriptPacket Convolve ConwayGroupCo1 ConwayGroupCo2 ConwayGroupCo3 CoordinateChartData CoordinatesToolOptions CoordinateTransform CoordinateTransformData CoprimeQ Coproduct CopulaDistribution Copyable CopyDirectory CopyFile CopyTag CopyToClipboard CornerFilter CornerNeighbors Correlation CorrelationDistance CorrelationFunction CorrelationTest Cos Cosh CoshIntegral CosineDistance CosineWindow CosIntegral Cot Coth Count CounterAssignments CounterBox CounterBoxOptions CounterClockwiseContourIntegral CounterEvaluator CounterFunction CounterIncrements CounterStyle CounterStyleMenuListing CountRoots CountryData Covariance CovarianceEstimatorFunction CovarianceFunction CoxianDistribution CoxIngersollRossProcess CoxModel CoxModelFit CramerVonMisesTest CreateArchive CreateDialog CreateDirectory CreateDocument CreateIntermediateDirectories CreatePalette CreatePalettePacket CreateScheduledTask CreateTemporary CreateWindow CriticalityFailureImportance CriticalitySuccessImportance CriticalSection Cross CrossingDetect CrossMatrix Csc Csch CubeRoot Cubics Cuboid CuboidBox Cumulant CumulantGeneratingFunction Cup CupCap Curl CurlyDoubleQuote CurlyQuote CurrentImage CurrentlySpeakingPacket CurrentValue CurvatureFlowFilter CurveClosed Cyan CycleGraph CycleIndexPolynomial Cycles CyclicGroup Cyclotomic Cylinder CylinderBox CylindricalDecomposition D DagumDistribution DamerauLevenshteinDistance DampingFactor Darker Dashed Dashing DataCompression DataDistribution DataRange DataReversed Date DateDelimiters DateDifference DateFunction DateList DateListLogPlot DateListPlot DatePattern DatePlus DateRange DateString DateTicksFormat DaubechiesWavelet DavisDistribution DawsonF DayCount DayCountConvention DayMatchQ DayName DayPlus DayRange DayRound DeBruijnGraph Debug DebugTag Decimal DeclareKnownSymbols DeclarePackage Decompose Decrement DedekindEta Default DefaultAxesStyle DefaultBaseStyle DefaultBoxStyle DefaultButton DefaultColor DefaultControlPlacement DefaultDuplicateCellStyle DefaultDuration DefaultElement DefaultFaceGridsStyle DefaultFieldHintStyle DefaultFont DefaultFontProperties DefaultFormatType DefaultFormatTypeForStyle DefaultFrameStyle DefaultFrameTicksStyle DefaultGridLinesStyle DefaultInlineFormatType DefaultInputFormatType DefaultLabelStyle DefaultMenuStyle DefaultNaturalLanguage DefaultNewCellStyle DefaultNewInlineCellStyle DefaultNotebook DefaultOptions DefaultOutputFormatType DefaultStyle DefaultStyleDefinitions DefaultTextFormatType DefaultTextInlineFormatType DefaultTicksStyle DefaultTooltipStyle DefaultValues Defer DefineExternal DefineInputStreamMethod DefineOutputStreamMethod Definition Degree DegreeCentrality DegreeGraphDistribution DegreeLexicographic DegreeReverseLexicographic Deinitialization Del Deletable Delete DeleteBorderComponents DeleteCases DeleteContents DeleteDirectory DeleteDuplicates DeleteFile DeleteSmallComponents DeleteWithContents DeletionWarning Delimiter DelimiterFlashTime DelimiterMatching Delimiters Denominator DensityGraphics DensityHistogram DensityPlot DependentVariables Deploy Deployed Depth DepthFirstScan Derivative DerivativeFilter DescriptorStateSpace DesignMatrix Det DGaussianWavelet DiacriticalPositioning Diagonal DiagonalMatrix Dialog DialogIndent DialogInput DialogLevel DialogNotebook DialogProlog DialogReturn DialogSymbols Diamond DiamondMatrix DiceDissimilarity DictionaryLookup DifferenceDelta DifferenceOrder DifferenceRoot DifferenceRootReduce Differences DifferentialD DifferentialRoot DifferentialRootReduce DifferentiatorFilter DigitBlock DigitBlockMinimum DigitCharacter DigitCount DigitQ DihedralGroup Dilation Dimensions DiracComb DiracDelta DirectedEdge DirectedEdges DirectedGraph DirectedGraphQ DirectedInfinity Direction Directive Directory DirectoryName DirectoryQ DirectoryStack DirichletCharacter DirichletConvolve DirichletDistribution DirichletL DirichletTransform DirichletWindow DisableConsolePrintPacket DiscreteChirpZTransform DiscreteConvolve DiscreteDelta DiscreteHadamardTransform DiscreteIndicator DiscreteLQEstimatorGains DiscreteLQRegulatorGains DiscreteLyapunovSolve DiscreteMarkovProcess DiscretePlot DiscretePlot3D DiscreteRatio DiscreteRiccatiSolve DiscreteShift DiscreteTimeModelQ DiscreteUniformDistribution DiscreteVariables DiscreteWaveletData DiscreteWaveletPacketTransform DiscreteWaveletTransform Discriminant Disjunction Disk DiskBox DiskMatrix Dispatch DispersionEstimatorFunction Display DisplayAllSteps DisplayEndPacket DisplayFlushImagePacket DisplayForm DisplayFunction DisplayPacket DisplayRules DisplaySetSizePacket DisplayString DisplayTemporary DisplayWith DisplayWithRef DisplayWithVariable DistanceFunction DistanceTransform Distribute Distributed DistributedContexts DistributeDefinitions DistributionChart DistributionDomain DistributionFitTest DistributionParameterAssumptions DistributionParameterQ Dithering Div Divergence Divide DivideBy Dividers Divisible Divisors DivisorSigma DivisorSum DMSList DMSString Do DockedCells DocumentNotebook DominantColors DOSTextFormat Dot DotDashed DotEqual Dotted DoubleBracketingBar DoubleContourIntegral DoubleDownArrow DoubleLeftArrow DoubleLeftRightArrow DoubleLeftTee DoubleLongLeftArrow DoubleLongLeftRightArrow DoubleLongRightArrow DoubleRightArrow DoubleRightTee DoubleUpArrow DoubleUpDownArrow DoubleVerticalBar DoublyInfinite Down DownArrow DownArrowBar DownArrowUpArrow DownLeftRightVector DownLeftTeeVector DownLeftVector DownLeftVectorBar DownRightTeeVector DownRightVector DownRightVectorBar Downsample DownTee DownTeeArrow DownValues DragAndDrop DrawEdges DrawFrontFaces DrawHighlighted Drop DSolve Dt DualLinearProgramming DualSystemsModel DumpGet DumpSave DuplicateFreeQ Dynamic DynamicBox DynamicBoxOptions DynamicEvaluationTimeout DynamicLocation DynamicModule DynamicModuleBox DynamicModuleBoxOptions DynamicModuleParent DynamicModuleValues DynamicName DynamicNamespace DynamicReference DynamicSetting DynamicUpdating DynamicWrapper DynamicWrapperBox DynamicWrapperBoxOptions E EccentricityCentrality EdgeAdd EdgeBetweennessCentrality EdgeCapacity EdgeCapForm EdgeColor EdgeConnectivity EdgeCost EdgeCount EdgeCoverQ EdgeDashing EdgeDelete EdgeDetect EdgeForm EdgeIndex EdgeJoinForm EdgeLabeling EdgeLabels EdgeLabelStyle EdgeList EdgeOpacity EdgeQ EdgeRenderingFunction EdgeRules EdgeShapeFunction EdgeStyle EdgeThickness EdgeWeight Editable EditButtonSettings EditCellTagsSettings EditDistance EffectiveInterest Eigensystem Eigenvalues EigenvectorCentrality Eigenvectors Element ElementData Eliminate EliminationOrder EllipticE EllipticExp EllipticExpPrime EllipticF EllipticFilterModel EllipticK EllipticLog EllipticNomeQ EllipticPi EllipticReducedHalfPeriods EllipticTheta EllipticThetaPrime EmitSound EmphasizeSyntaxErrors EmpiricalDistribution Empty EmptyGraphQ EnableConsolePrintPacket Enabled Encode End EndAdd EndDialogPacket EndFrontEndInteractionPacket EndOfFile EndOfLine EndOfString EndPackage EngineeringForm Enter EnterExpressionPacket EnterTextPacket Entropy EntropyFilter Environment Epilog Equal EqualColumns EqualRows EqualTilde EquatedTo Equilibrium EquirippleFilterKernel Equivalent Erf Erfc Erfi ErlangB ErlangC ErlangDistribution Erosion ErrorBox ErrorBoxOptions ErrorNorm ErrorPacket ErrorsDialogSettings EstimatedDistribution EstimatedProcess EstimatorGains EstimatorRegulator EuclideanDistance EulerE EulerGamma EulerianGraphQ EulerPhi Evaluatable Evaluate Evaluated EvaluatePacket EvaluationCell EvaluationCompletionAction EvaluationElements EvaluationMode EvaluationMonitor EvaluationNotebook EvaluationObject EvaluationOrder Evaluator EvaluatorNames EvenQ EventData EventEvaluator EventHandler EventHandlerTag EventLabels ExactBlackmanWindow ExactNumberQ ExactRootIsolation ExampleData Except ExcludedForms ExcludePods Exclusions ExclusionsStyle Exists Exit ExitDialog Exp Expand ExpandAll ExpandDenominator ExpandFileName ExpandNumerator Expectation ExpectationE ExpectedValue ExpGammaDistribution ExpIntegralE ExpIntegralEi Exponent ExponentFunction ExponentialDistribution ExponentialFamily ExponentialGeneratingFunction ExponentialMovingAverage ExponentialPowerDistribution ExponentPosition ExponentStep Export ExportAutoReplacements ExportPacket ExportString Expression ExpressionCell ExpressionPacket ExpToTrig ExtendedGCD Extension ExtentElementFunction ExtentMarkers ExtentSize ExternalCall ExternalDataCharacterEncoding Extract ExtractArchive ExtremeValueDistribution FaceForm FaceGrids FaceGridsStyle Factor FactorComplete Factorial Factorial2 FactorialMoment FactorialMomentGeneratingFunction FactorialPower FactorInteger FactorList FactorSquareFree FactorSquareFreeList FactorTerms FactorTermsList Fail FailureDistribution False FARIMAProcess FEDisableConsolePrintPacket FeedbackSector FeedbackSectorStyle FeedbackType FEEnableConsolePrintPacket Fibonacci FieldHint FieldHintStyle FieldMasked FieldSize File FileBaseName FileByteCount FileDate FileExistsQ FileExtension FileFormat FileHash FileInformation FileName FileNameDepth FileNameDialogSettings FileNameDrop FileNameJoin FileNames FileNameSetter FileNameSplit FileNameTake FilePrint FileType FilledCurve FilledCurveBox Filling FillingStyle FillingTransform FilterRules FinancialBond FinancialData FinancialDerivative FinancialIndicator Find FindArgMax FindArgMin FindClique FindClusters FindCurvePath FindDistributionParameters FindDivisions FindEdgeCover FindEdgeCut FindEulerianCycle FindFaces FindFile FindFit FindGeneratingFunction FindGeoLocation FindGeometricTransform FindGraphCommunities FindGraphIsomorphism FindGraphPartition FindHamiltonianCycle FindIndependentEdgeSet FindIndependentVertexSet FindInstance FindIntegerNullVector FindKClan FindKClique FindKClub FindKPlex FindLibrary FindLinearRecurrence FindList FindMaximum FindMaximumFlow FindMaxValue FindMinimum FindMinimumCostFlow FindMinimumCut FindMinValue FindPermutation FindPostmanTour FindProcessParameters FindRoot FindSequenceFunction FindSettings FindShortestPath FindShortestTour FindThreshold FindVertexCover FindVertexCut Fine FinishDynamic FiniteAbelianGroupCount FiniteGroupCount FiniteGroupData First FirstPassageTimeDistribution FischerGroupFi22 FischerGroupFi23 FischerGroupFi24Prime FisherHypergeometricDistribution FisherRatioTest FisherZDistribution Fit FitAll FittedModel FixedPoint FixedPointList FlashSelection Flat Flatten FlattenAt FlatTopWindow FlipView Floor FlushPrintOutputPacket Fold FoldList Font FontColor FontFamily FontForm FontName FontOpacity FontPostScriptName FontProperties FontReencoding FontSize FontSlant FontSubstitutions FontTracking FontVariations FontWeight For ForAll Format FormatRules FormatType FormatTypeAutoConvert FormatValues FormBox FormBoxOptions FortranForm Forward ForwardBackward Fourier FourierCoefficient FourierCosCoefficient FourierCosSeries FourierCosTransform FourierDCT FourierDCTFilter FourierDCTMatrix FourierDST FourierDSTMatrix FourierMatrix FourierParameters FourierSequenceTransform FourierSeries FourierSinCoefficient FourierSinSeries FourierSinTransform FourierTransform FourierTrigSeries FractionalBrownianMotionProcess FractionalPart FractionBox FractionBoxOptions FractionLine Frame FrameBox FrameBoxOptions Framed FrameInset FrameLabel Frameless FrameMargins FrameStyle FrameTicks FrameTicksStyle FRatioDistribution FrechetDistribution FreeQ FrequencySamplingFilterKernel FresnelC FresnelS Friday FrobeniusNumber FrobeniusSolve FromCharacterCode FromCoefficientRules FromContinuedFraction FromDate FromDigits FromDMS Front FrontEndDynamicExpression FrontEndEventActions FrontEndExecute FrontEndObject FrontEndResource FrontEndResourceString FrontEndStackSize FrontEndToken FrontEndTokenExecute FrontEndValueCache FrontEndVersion FrontFaceColor FrontFaceOpacity Full FullAxes FullDefinition FullForm FullGraphics FullOptions FullSimplify Function FunctionExpand FunctionInterpolation FunctionSpace FussellVeselyImportance GaborFilter GaborMatrix GaborWavelet GainMargins GainPhaseMargins Gamma GammaDistribution GammaRegularized GapPenalty Gather GatherBy GaugeFaceElementFunction GaugeFaceStyle GaugeFrameElementFunction GaugeFrameSize GaugeFrameStyle GaugeLabels GaugeMarkers GaugeStyle GaussianFilter GaussianIntegers GaussianMatrix GaussianWindow GCD GegenbauerC General GeneralizedLinearModelFit GenerateConditions GeneratedCell GeneratedParameters GeneratingFunction Generic GenericCylindricalDecomposition GenomeData GenomeLookup GeodesicClosing GeodesicDilation GeodesicErosion GeodesicOpening GeoDestination GeodesyData GeoDirection GeoDistance GeoGridPosition GeometricBrownianMotionProcess GeometricDistribution GeometricMean GeometricMeanFilter GeometricTransformation GeometricTransformation3DBox GeometricTransformation3DBoxOptions GeometricTransformationBox GeometricTransformationBoxOptions GeoPosition GeoPositionENU GeoPositionXYZ GeoProjectionData GestureHandler GestureHandlerTag Get GetBoundingBoxSizePacket GetContext GetEnvironment GetFileName GetFrontEndOptionsDataPacket GetLinebreakInformationPacket GetMenusPacket GetPageBreakInformationPacket Glaisher GlobalClusteringCoefficient GlobalPreferences GlobalSession Glow GoldenRatio GompertzMakehamDistribution GoodmanKruskalGamma GoodmanKruskalGammaTest Goto Grad Gradient GradientFilter GradientOrientationFilter Graph GraphAssortativity GraphCenter GraphComplement GraphData GraphDensity GraphDiameter GraphDifference GraphDisjointUnion GraphDistance GraphDistanceMatrix GraphElementData GraphEmbedding GraphHighlight GraphHighlightStyle GraphHub Graphics Graphics3D Graphics3DBox Graphics3DBoxOptions GraphicsArray GraphicsBaseline GraphicsBox GraphicsBoxOptions GraphicsColor GraphicsColumn GraphicsComplex GraphicsComplex3DBox GraphicsComplex3DBoxOptions GraphicsComplexBox GraphicsComplexBoxOptions GraphicsContents GraphicsData GraphicsGrid GraphicsGridBox GraphicsGroup GraphicsGroup3DBox GraphicsGroup3DBoxOptions GraphicsGroupBox GraphicsGroupBoxOptions GraphicsGrouping GraphicsHighlightColor GraphicsRow GraphicsSpacing GraphicsStyle GraphIntersection GraphLayout GraphLinkEfficiency GraphPeriphery GraphPlot GraphPlot3D GraphPower GraphPropertyDistribution GraphQ GraphRadius GraphReciprocity GraphRoot GraphStyle GraphUnion Gray GrayLevel GreatCircleDistance Greater GreaterEqual GreaterEqualLess GreaterFullEqual GreaterGreater GreaterLess GreaterSlantEqual GreaterTilde Green Grid GridBaseline GridBox GridBoxAlignment GridBoxBackground GridBoxDividers GridBoxFrame GridBoxItemSize GridBoxItemStyle GridBoxOptions GridBoxSpacings GridCreationSettings GridDefaultElement GridElementStyleOptions GridFrame GridFrameMargins GridGraph GridLines GridLinesStyle GroebnerBasis GroupActionBase GroupCentralizer GroupElementFromWord GroupElementPosition GroupElementQ GroupElements GroupElementToWord GroupGenerators GroupMultiplicationTable GroupOrbits GroupOrder GroupPageBreakWithin GroupSetwiseStabilizer GroupStabilizer GroupStabilizerChain Gudermannian GumbelDistribution HaarWavelet HadamardMatrix HalfNormalDistribution HamiltonianGraphQ HammingDistance HammingWindow HankelH1 HankelH2 HankelMatrix HannPoissonWindow HannWindow HaradaNortonGroupHN HararyGraph HarmonicMean HarmonicMeanFilter HarmonicNumber Hash HashTable Haversine HazardFunction Head HeadCompose Heads HeavisideLambda HeavisidePi HeavisideTheta HeldGroupHe HeldPart HelpBrowserLookup HelpBrowserNotebook HelpBrowserSettings HermiteDecomposition HermiteH HermitianMatrixQ HessenbergDecomposition Hessian HexadecimalCharacter Hexahedron HexahedronBox HexahedronBoxOptions HiddenSurface HighlightGraph HighlightImage HighpassFilter HigmanSimsGroupHS HilbertFilter HilbertMatrix Histogram Histogram3D HistogramDistribution HistogramList HistogramTransform HistogramTransformInterpolation HitMissTransform HITSCentrality HodgeDual HoeffdingD HoeffdingDTest Hold HoldAll HoldAllComplete HoldComplete HoldFirst HoldForm HoldPattern HoldRest HolidayCalendar HomeDirectory HomePage Horizontal HorizontalForm HorizontalGauge HorizontalScrollPosition HornerForm HotellingTSquareDistribution HoytDistribution HTMLSave Hue HumpDownHump HumpEqual HurwitzLerchPhi HurwitzZeta HyperbolicDistribution HypercubeGraph HyperexponentialDistribution Hyperfactorial Hypergeometric0F1 Hypergeometric0F1Regularized Hypergeometric1F1 Hypergeometric1F1Regularized Hypergeometric2F1 Hypergeometric2F1Regularized HypergeometricDistribution HypergeometricPFQ HypergeometricPFQRegularized HypergeometricU Hyperlink HyperlinkCreationSettings Hyphenation HyphenationOptions HypoexponentialDistribution HypothesisTestData I Identity IdentityMatrix If IgnoreCase Im Image Image3D Image3DSlices ImageAccumulate ImageAdd ImageAdjust ImageAlign ImageApply ImageAspectRatio ImageAssemble ImageCache ImageCacheValid ImageCapture ImageChannels ImageClip ImageColorSpace ImageCompose ImageConvolve ImageCooccurrence ImageCorners ImageCorrelate ImageCorrespondingPoints ImageCrop ImageData ImageDataPacket ImageDeconvolve ImageDemosaic ImageDifference ImageDimensions ImageDistance ImageEffect ImageFeatureTrack ImageFileApply ImageFileFilter ImageFileScan ImageFilter ImageForestingComponents ImageForwardTransformation ImageHistogram ImageKeypoints ImageLevels ImageLines ImageMargins ImageMarkers ImageMeasurements ImageMultiply ImageOffset ImagePad ImagePadding ImagePartition ImagePeriodogram ImagePerspectiveTransformation ImageQ ImageRangeCache ImageReflect ImageRegion ImageResize ImageResolution ImageRotate ImageRotated ImageScaled ImageScan ImageSize ImageSizeAction ImageSizeCache ImageSizeMultipliers ImageSizeRaw ImageSubtract ImageTake ImageTransformation ImageTrim ImageType ImageValue ImageValuePositions Implies Import ImportAutoReplacements ImportString ImprovementImportance In IncidenceGraph IncidenceList IncidenceMatrix IncludeConstantBasis IncludeFileExtension IncludePods IncludeSingularTerm Increment Indent IndentingNewlineSpacings IndentMaxFraction IndependenceTest IndependentEdgeSetQ IndependentUnit IndependentVertexSetQ Indeterminate IndexCreationOptions Indexed IndexGraph IndexTag Inequality InexactNumberQ InexactNumbers Infinity Infix Information Inherited InheritScope Initialization InitializationCell InitializationCellEvaluation InitializationCellWarning InlineCounterAssignments InlineCounterIncrements InlineRules Inner Inpaint Input InputAliases InputAssumptions InputAutoReplacements InputField InputFieldBox InputFieldBoxOptions InputForm InputGrouping InputNamePacket InputNotebook InputPacket InputSettings InputStream InputString InputStringPacket InputToBoxFormPacket Insert InsertionPointObject InsertResults Inset Inset3DBox Inset3DBoxOptions InsetBox InsetBoxOptions Install InstallService InString Integer IntegerDigits IntegerExponent IntegerLength IntegerPart IntegerPartitions IntegerQ Integers IntegerString Integral Integrate Interactive InteractiveTradingChart Interlaced Interleaving InternallyBalancedDecomposition InterpolatingFunction InterpolatingPolynomial Interpolation InterpolationOrder InterpolationPoints InterpolationPrecision Interpretation InterpretationBox InterpretationBoxOptions InterpretationFunction InterpretTemplate InterquartileRange Interrupt InterruptSettings Intersection Interval IntervalIntersection IntervalMemberQ IntervalUnion Inverse InverseBetaRegularized InverseCDF InverseChiSquareDistribution InverseContinuousWaveletTransform InverseDistanceTransform InverseEllipticNomeQ InverseErf InverseErfc InverseFourier InverseFourierCosTransform InverseFourierSequenceTransform InverseFourierSinTransform InverseFourierTransform InverseFunction InverseFunctions InverseGammaDistribution InverseGammaRegularized InverseGaussianDistribution InverseGudermannian InverseHaversine InverseJacobiCD InverseJacobiCN InverseJacobiCS InverseJacobiDC InverseJacobiDN InverseJacobiDS InverseJacobiNC InverseJacobiND InverseJacobiNS InverseJacobiSC InverseJacobiSD InverseJacobiSN InverseLaplaceTransform InversePermutation InverseRadon InverseSeries InverseSurvivalFunction InverseWaveletTransform InverseWeierstrassP InverseZTransform Invisible InvisibleApplication InvisibleTimes IrreduciblePolynomialQ IsolatingInterval IsomorphicGraphQ IsotopeData Italic Item ItemBox ItemBoxOptions ItemSize ItemStyle ItoProcess JaccardDissimilarity JacobiAmplitude Jacobian JacobiCD JacobiCN JacobiCS JacobiDC JacobiDN JacobiDS JacobiNC JacobiND JacobiNS JacobiP JacobiSC JacobiSD JacobiSN JacobiSymbol JacobiZeta JankoGroupJ1 JankoGroupJ2 JankoGroupJ3 JankoGroupJ4 JarqueBeraALMTest JohnsonDistribution Join Joined JoinedCurve JoinedCurveBox JoinForm JordanDecomposition JordanModelDecomposition K KagiChart KaiserBesselWindow KaiserWindow KalmanEstimator KalmanFilter KarhunenLoeveDecomposition KaryTree KatzCentrality KCoreComponents KDistribution KelvinBei KelvinBer KelvinKei KelvinKer KendallTau KendallTauTest KernelExecute KernelMixtureDistribution KernelObject Kernels Ket Khinchin KirchhoffGraph KirchhoffMatrix KleinInvariantJ KnightTourGraph KnotData KnownUnitQ KolmogorovSmirnovTest KroneckerDelta KroneckerModelDecomposition KroneckerProduct KroneckerSymbol KuiperTest KumaraswamyDistribution Kurtosis KuwaharaFilter Label Labeled LabeledSlider LabelingFunction LabelStyle LaguerreL LambdaComponents LambertW LanczosWindow LandauDistribution Language LanguageCategory LaplaceDistribution LaplaceTransform Laplacian LaplacianFilter LaplacianGaussianFilter Large Larger Last Latitude LatitudeLongitude LatticeData LatticeReduce Launch LaunchKernels LayeredGraphPlot LayerSizeFunction LayoutInformation LCM LeafCount LeapYearQ LeastSquares LeastSquaresFilterKernel Left LeftArrow LeftArrowBar LeftArrowRightArrow LeftDownTeeVector LeftDownVector LeftDownVectorBar LeftRightArrow LeftRightVector LeftTee LeftTeeArrow LeftTeeVector LeftTriangle LeftTriangleBar LeftTriangleEqual LeftUpDownVector LeftUpTeeVector LeftUpVector LeftUpVectorBar LeftVector LeftVectorBar LegendAppearance Legended LegendFunction LegendLabel LegendLayout LegendMargins LegendMarkers LegendMarkerSize LegendreP LegendreQ LegendreType Length LengthWhile LerchPhi Less LessEqual LessEqualGreater LessFullEqual LessGreater LessLess LessSlantEqual LessTilde LetterCharacter LetterQ Level LeveneTest LeviCivitaTensor LevyDistribution Lexicographic LibraryFunction LibraryFunctionError LibraryFunctionInformation LibraryFunctionLoad LibraryFunctionUnload LibraryLoad LibraryUnload LicenseID LiftingFilterData LiftingWaveletTransform LightBlue LightBrown LightCyan Lighter LightGray LightGreen Lighting LightingAngle LightMagenta LightOrange LightPink LightPurple LightRed LightSources LightYellow Likelihood Limit LimitsPositioning LimitsPositioningTokens LindleyDistribution Line Line3DBox LinearFilter LinearFractionalTransform LinearModelFit LinearOffsetFunction LinearProgramming LinearRecurrence LinearSolve LinearSolveFunction LineBox LineBreak LinebreakAdjustments LineBreakChart LineBreakWithin LineColor LineForm LineGraph LineIndent LineIndentMaxFraction LineIntegralConvolutionPlot LineIntegralConvolutionScale LineLegend LineOpacity LineSpacing LineWrapParts LinkActivate LinkClose LinkConnect LinkConnectedQ LinkCreate LinkError LinkFlush LinkFunction LinkHost LinkInterrupt LinkLaunch LinkMode LinkObject LinkOpen LinkOptions LinkPatterns LinkProtocol LinkRead LinkReadHeld LinkReadyQ Links LinkWrite LinkWriteHeld LiouvilleLambda List Listable ListAnimate ListContourPlot ListContourPlot3D ListConvolve ListCorrelate ListCurvePathPlot ListDeconvolve ListDensityPlot Listen ListFourierSequenceTransform ListInterpolation ListLineIntegralConvolutionPlot ListLinePlot ListLogLinearPlot ListLogLogPlot ListLogPlot ListPicker ListPickerBox ListPickerBoxBackground ListPickerBoxOptions ListPlay ListPlot ListPlot3D ListPointPlot3D ListPolarPlot ListQ ListStreamDensityPlot ListStreamPlot ListSurfacePlot3D ListVectorDensityPlot ListVectorPlot ListVectorPlot3D ListZTransform Literal LiteralSearch LocalClusteringCoefficient LocalizeVariables LocationEquivalenceTest LocationTest Locator LocatorAutoCreate LocatorBox LocatorBoxOptions LocatorCentering LocatorPane LocatorPaneBox LocatorPaneBoxOptions LocatorRegion Locked Log Log10 Log2 LogBarnesG LogGamma LogGammaDistribution LogicalExpand LogIntegral LogisticDistribution LogitModelFit LogLikelihood LogLinearPlot LogLogisticDistribution LogLogPlot LogMultinormalDistribution LogNormalDistribution LogPlot LogRankTest LogSeriesDistribution LongEqual Longest LongestAscendingSequence LongestCommonSequence LongestCommonSequencePositions LongestCommonSubsequence LongestCommonSubsequencePositions LongestMatch LongForm Longitude LongLeftArrow LongLeftRightArrow LongRightArrow Loopback LoopFreeGraphQ LowerCaseQ LowerLeftArrow LowerRightArrow LowerTriangularize LowpassFilter LQEstimatorGains LQGRegulator LQOutputRegulatorGains LQRegulatorGains LUBackSubstitution LucasL LuccioSamiComponents LUDecomposition LyapunovSolve LyonsGroupLy MachineID MachineName MachineNumberQ MachinePrecision MacintoshSystemPageSetup Magenta Magnification Magnify MainSolve MaintainDynamicCaches Majority MakeBoxes MakeExpression MakeRules MangoldtLambda ManhattanDistance Manipulate Manipulator MannWhitneyTest MantissaExponent Manual Map MapAll MapAt MapIndexed MAProcess MapThread MarcumQ MardiaCombinedTest MardiaKurtosisTest MardiaSkewnessTest MarginalDistribution MarkovProcessProperties Masking MatchingDissimilarity MatchLocalNameQ MatchLocalNames MatchQ Material MathematicaNotation MathieuC MathieuCharacteristicA MathieuCharacteristicB MathieuCharacteristicExponent MathieuCPrime MathieuGroupM11 MathieuGroupM12 MathieuGroupM22 MathieuGroupM23 MathieuGroupM24 MathieuS MathieuSPrime MathMLForm MathMLText Matrices MatrixExp MatrixForm MatrixFunction MatrixLog MatrixPlot MatrixPower MatrixQ MatrixRank Max MaxBend MaxDetect MaxExtraBandwidths MaxExtraConditions MaxFeatures MaxFilter Maximize MaxIterations MaxMemoryUsed MaxMixtureKernels MaxPlotPoints MaxPoints MaxRecursion MaxStableDistribution MaxStepFraction MaxSteps MaxStepSize MaxValue MaxwellDistribution McLaughlinGroupMcL Mean MeanClusteringCoefficient MeanDegreeConnectivity MeanDeviation MeanFilter MeanGraphDistance MeanNeighborDegree MeanShift MeanShiftFilter Median MedianDeviation MedianFilter Medium MeijerG MeixnerDistribution MemberQ MemoryConstrained MemoryInUse Menu MenuAppearance MenuCommandKey MenuEvaluator MenuItem MenuPacket MenuSortingValue MenuStyle MenuView MergeDifferences Mesh MeshFunctions MeshRange MeshShading MeshStyle Message MessageDialog MessageList MessageName MessageOptions MessagePacket Messages MessagesNotebook MetaCharacters MetaInformation Method MethodOptions MexicanHatWavelet MeyerWavelet Min MinDetect MinFilter MinimalPolynomial MinimalStateSpaceModel Minimize Minors MinRecursion MinSize MinStableDistribution Minus MinusPlus MinValue Missing MissingDataMethod MittagLefflerE MixedRadix MixedRadixQuantity MixtureDistribution Mod Modal Mode Modular ModularLambda Module Modulus MoebiusMu Moment Momentary MomentConvert MomentEvaluate MomentGeneratingFunction Monday Monitor MonomialList MonomialOrder MonsterGroupM MorletWavelet MorphologicalBinarize MorphologicalBranchPoints MorphologicalComponents MorphologicalEulerNumber MorphologicalGraph MorphologicalPerimeter MorphologicalTransform Most MouseAnnotation MouseAppearance MouseAppearanceTag MouseButtons Mouseover MousePointerNote MousePosition MovingAverage MovingMedian MoyalDistribution MultiedgeStyle MultilaunchWarning MultiLetterItalics MultiLetterStyle MultilineFunction Multinomial MultinomialDistribution MultinormalDistribution MultiplicativeOrder Multiplicity Multiselection MultivariateHypergeometricDistribution MultivariatePoissonDistribution MultivariateTDistribution N NakagamiDistribution NameQ Names NamespaceBox Nand NArgMax NArgMin NBernoulliB NCache NDSolve NDSolveValue Nearest NearestFunction NeedCurrentFrontEndPackagePacket NeedCurrentFrontEndSymbolsPacket NeedlemanWunschSimilarity Needs Negative NegativeBinomialDistribution NegativeMultinomialDistribution NeighborhoodGraph Nest NestedGreaterGreater NestedLessLess NestedScriptRules NestList NestWhile NestWhileList NevilleThetaC NevilleThetaD NevilleThetaN NevilleThetaS NewPrimitiveStyle NExpectation Next NextPrime NHoldAll NHoldFirst NHoldRest NicholsGridLines NicholsPlot NIntegrate NMaximize NMaxValue NMinimize NMinValue NominalVariables NonAssociative NoncentralBetaDistribution NoncentralChiSquareDistribution NoncentralFRatioDistribution NoncentralStudentTDistribution NonCommutativeMultiply NonConstants None NonlinearModelFit NonlocalMeansFilter NonNegative NonPositive Nor NorlundB Norm Normal NormalDistribution NormalGrouping Normalize NormalizedSquaredEuclideanDistance NormalsFunction NormFunction Not NotCongruent NotCupCap NotDoubleVerticalBar Notebook NotebookApply NotebookAutoSave NotebookClose NotebookConvertSettings NotebookCreate NotebookCreateReturnObject NotebookDefault NotebookDelete NotebookDirectory NotebookDynamicExpression NotebookEvaluate NotebookEventActions NotebookFileName NotebookFind NotebookFindReturnObject NotebookGet NotebookGetLayoutInformationPacket NotebookGetMisspellingsPacket NotebookInformation NotebookInterfaceObject NotebookLocate NotebookObject NotebookOpen NotebookOpenReturnObject NotebookPath NotebookPrint NotebookPut NotebookPutReturnObject NotebookRead NotebookResetGeneratedCells Notebooks NotebookSave NotebookSaveAs NotebookSelection NotebookSetupLayoutInformationPacket NotebooksMenu NotebookWrite NotElement NotEqualTilde NotExists NotGreater NotGreaterEqual NotGreaterFullEqual NotGreaterGreater NotGreaterLess NotGreaterSlantEqual NotGreaterTilde NotHumpDownHump NotHumpEqual NotLeftTriangle NotLeftTriangleBar NotLeftTriangleEqual NotLess NotLessEqual NotLessFullEqual NotLessGreater NotLessLess NotLessSlantEqual NotLessTilde NotNestedGreaterGreater NotNestedLessLess NotPrecedes NotPrecedesEqual NotPrecedesSlantEqual NotPrecedesTilde NotReverseElement NotRightTriangle NotRightTriangleBar NotRightTriangleEqual NotSquareSubset NotSquareSubsetEqual NotSquareSuperset NotSquareSupersetEqual NotSubset NotSubsetEqual NotSucceeds NotSucceedsEqual NotSucceedsSlantEqual NotSucceedsTilde NotSuperset NotSupersetEqual NotTilde NotTildeEqual NotTildeFullEqual NotTildeTilde NotVerticalBar NProbability NProduct NProductFactors NRoots NSolve NSum NSumTerms Null NullRecords NullSpace NullWords Number NumberFieldClassNumber NumberFieldDiscriminant NumberFieldFundamentalUnits NumberFieldIntegralBasis NumberFieldNormRepresentatives NumberFieldRegulator NumberFieldRootsOfUnity NumberFieldSignature NumberForm NumberFormat NumberMarks NumberMultiplier NumberPadding NumberPoint NumberQ NumberSeparator NumberSigns NumberString Numerator NumericFunction NumericQ NuttallWindow NValues NyquistGridLines NyquistPlot O ObservabilityGramian ObservabilityMatrix ObservableDecomposition ObservableModelQ OddQ Off Offset OLEData On ONanGroupON OneIdentity Opacity Open OpenAppend Opener OpenerBox OpenerBoxOptions OpenerView OpenFunctionInspectorPacket Opening OpenRead OpenSpecialOptions OpenTemporary OpenWrite Operate OperatingSystem OptimumFlowData Optional OptionInspectorSettings OptionQ Options OptionsPacket OptionsPattern OptionValue OptionValueBox OptionValueBoxOptions Or Orange Order OrderDistribution OrderedQ Ordering Orderless OrnsteinUhlenbeckProcess Orthogonalize Out Outer OutputAutoOverwrite OutputControllabilityMatrix OutputControllableModelQ OutputForm OutputFormData OutputGrouping OutputMathEditExpression OutputNamePacket OutputResponse OutputSizeLimit OutputStream Over OverBar OverDot Overflow OverHat Overlaps Overlay OverlayBox OverlayBoxOptions Overscript OverscriptBox OverscriptBoxOptions OverTilde OverVector OwenT OwnValues PackingMethod PaddedForm Padding PadeApproximant PadLeft PadRight PageBreakAbove PageBreakBelow PageBreakWithin PageFooterLines PageFooters PageHeaderLines PageHeaders PageHeight PageRankCentrality PageWidth PairedBarChart PairedHistogram PairedSmoothHistogram PairedTTest PairedZTest PaletteNotebook PalettePath Pane PaneBox PaneBoxOptions Panel PanelBox PanelBoxOptions Paneled PaneSelector PaneSelectorBox PaneSelectorBoxOptions PaperWidth ParabolicCylinderD ParagraphIndent ParagraphSpacing ParallelArray ParallelCombine ParallelDo ParallelEvaluate Parallelization Parallelize ParallelMap ParallelNeeds ParallelProduct ParallelSubmit ParallelSum ParallelTable ParallelTry Parameter ParameterEstimator ParameterMixtureDistribution ParameterVariables ParametricFunction ParametricNDSolve ParametricNDSolveValue ParametricPlot ParametricPlot3D ParentConnect ParentDirectory ParentForm Parenthesize ParentList ParetoDistribution Part PartialCorrelationFunction PartialD ParticleData Partition PartitionsP PartitionsQ ParzenWindow PascalDistribution PassEventsDown PassEventsUp Paste PasteBoxFormInlineCells PasteButton Path PathGraph PathGraphQ Pattern PatternSequence PatternTest PauliMatrix PaulWavelet Pause PausedTime PDF PearsonChiSquareTest PearsonCorrelationTest PearsonDistribution PerformanceGoal PeriodicInterpolation Periodogram PeriodogramArray PermutationCycles PermutationCyclesQ PermutationGroup PermutationLength PermutationList PermutationListQ PermutationMax PermutationMin PermutationOrder PermutationPower PermutationProduct PermutationReplace Permutations PermutationSupport Permute PeronaMalikFilter Perpendicular PERTDistribution PetersenGraph PhaseMargins Pi Pick PIDData PIDDerivativeFilter PIDFeedforward PIDTune Piecewise PiecewiseExpand PieChart PieChart3D PillaiTrace PillaiTraceTest Pink Pivoting PixelConstrained PixelValue PixelValuePositions Placed Placeholder PlaceholderReplace Plain PlanarGraphQ Play PlayRange Plot Plot3D Plot3Matrix PlotDivision PlotJoined PlotLabel PlotLayout PlotLegends PlotMarkers PlotPoints PlotRange PlotRangeClipping PlotRangePadding PlotRegion PlotStyle Plus PlusMinus Pochhammer PodStates PodWidth Point Point3DBox PointBox PointFigureChart PointForm PointLegend PointSize PoissonConsulDistribution PoissonDistribution PoissonProcess PoissonWindow PolarAxes PolarAxesOrigin PolarGridLines PolarPlot PolarTicks PoleZeroMarkers PolyaAeppliDistribution PolyGamma Polygon Polygon3DBox Polygon3DBoxOptions PolygonBox PolygonBoxOptions PolygonHoleScale PolygonIntersections PolygonScale PolyhedronData PolyLog PolynomialExtendedGCD PolynomialForm PolynomialGCD PolynomialLCM PolynomialMod PolynomialQ PolynomialQuotient PolynomialQuotientRemainder PolynomialReduce PolynomialRemainder Polynomials PopupMenu PopupMenuBox PopupMenuBoxOptions PopupView PopupWindow Position Positive PositiveDefiniteMatrixQ PossibleZeroQ Postfix PostScript Power PowerDistribution PowerExpand PowerMod PowerModList PowerSpectralDensity PowersRepresentations PowerSymmetricPolynomial Precedence PrecedenceForm Precedes PrecedesEqual PrecedesSlantEqual PrecedesTilde Precision PrecisionGoal PreDecrement PredictionRoot PreemptProtect PreferencesPath Prefix PreIncrement Prepend PrependTo PreserveImageOptions Previous PriceGraphDistribution PrimaryPlaceholder Prime PrimeNu PrimeOmega PrimePi PrimePowerQ PrimeQ Primes PrimeZetaP PrimitiveRoot PrincipalComponents PrincipalValue Print PrintAction PrintForm PrintingCopies PrintingOptions PrintingPageRange PrintingStartingPageNumber PrintingStyleEnvironment PrintPrecision PrintTemporary Prism PrismBox PrismBoxOptions PrivateCellOptions PrivateEvaluationOptions PrivateFontOptions PrivateFrontEndOptions PrivateNotebookOptions PrivatePaths Probability ProbabilityDistribution ProbabilityPlot ProbabilityPr ProbabilityScalePlot ProbitModelFit ProcessEstimator ProcessParameterAssumptions ProcessParameterQ ProcessStateDomain ProcessTimeDomain Product ProductDistribution ProductLog ProgressIndicator ProgressIndicatorBox ProgressIndicatorBoxOptions Projection Prolog PromptForm Properties Property PropertyList PropertyValue Proportion Proportional Protect Protected ProteinData Pruning PseudoInverse Purple Put PutAppend Pyramid PyramidBox PyramidBoxOptions QBinomial QFactorial QGamma QHypergeometricPFQ QPochhammer QPolyGamma QRDecomposition QuadraticIrrationalQ Quantile QuantilePlot Quantity QuantityForm QuantityMagnitude QuantityQ QuantityUnit Quartics QuartileDeviation Quartiles QuartileSkewness QueueingNetworkProcess QueueingProcess QueueProperties Quiet Quit Quotient QuotientRemainder RadialityCentrality RadicalBox RadicalBoxOptions RadioButton RadioButtonBar RadioButtonBox RadioButtonBoxOptions Radon RamanujanTau RamanujanTauL RamanujanTauTheta RamanujanTauZ Random RandomChoice RandomComplex RandomFunction RandomGraph RandomImage RandomInteger RandomPermutation RandomPrime RandomReal RandomSample RandomSeed RandomVariate RandomWalkProcess Range RangeFilter RangeSpecification RankedMax RankedMin Raster Raster3D Raster3DBox Raster3DBoxOptions RasterArray RasterBox RasterBoxOptions Rasterize RasterSize Rational RationalFunctions Rationalize Rationals Ratios Raw RawArray RawBoxes RawData RawMedium RayleighDistribution Re Read ReadList ReadProtected Real RealBlockDiagonalForm RealDigits RealExponent Reals Reap Record RecordLists RecordSeparators Rectangle RectangleBox RectangleBoxOptions RectangleChart RectangleChart3D RecurrenceFilter RecurrenceTable RecurringDigitsForm Red Reduce RefBox ReferenceLineStyle ReferenceMarkers ReferenceMarkerStyle Refine ReflectionMatrix ReflectionTransform Refresh RefreshRate RegionBinarize RegionFunction RegionPlot RegionPlot3D RegularExpression Regularization Reinstall Release ReleaseHold ReliabilityDistribution ReliefImage ReliefPlot Remove RemoveAlphaChannel RemoveAsynchronousTask Removed RemoveInputStreamMethod RemoveOutputStreamMethod RemoveProperty RemoveScheduledTask RenameDirectory RenameFile RenderAll RenderingOptions RenewalProcess RenkoChart Repeated RepeatedNull RepeatedString Replace ReplaceAll ReplaceHeldPart ReplaceImageValue ReplaceList ReplacePart ReplacePixelValue ReplaceRepeated Resampling Rescale RescalingTransform ResetDirectory ResetMenusPacket ResetScheduledTask Residue Resolve Rest Resultant ResumePacket Return ReturnExpressionPacket ReturnInputFormPacket ReturnPacket ReturnTextPacket Reverse ReverseBiorthogonalSplineWavelet ReverseElement ReverseEquilibrium ReverseGraph ReverseUpEquilibrium RevolutionAxis RevolutionPlot3D RGBColor RiccatiSolve RiceDistribution RidgeFilter RiemannR RiemannSiegelTheta RiemannSiegelZ Riffle Right RightArrow RightArrowBar RightArrowLeftArrow RightCosetRepresentative RightDownTeeVector RightDownVector RightDownVectorBar RightTee RightTeeArrow RightTeeVector RightTriangle RightTriangleBar RightTriangleEqual RightUpDownVector RightUpTeeVector RightUpVector RightUpVectorBar RightVector RightVectorBar RiskAchievementImportance RiskReductionImportance RogersTanimotoDissimilarity Root RootApproximant RootIntervals RootLocusPlot RootMeanSquare RootOfUnityQ RootReduce Roots RootSum Rotate RotateLabel RotateLeft RotateRight RotationAction RotationBox RotationBoxOptions RotationMatrix RotationTransform Round RoundImplies RoundingRadius Row RowAlignments RowBackgrounds RowBox RowHeights RowLines RowMinHeight RowReduce RowsEqual RowSpacings RSolve RudvalisGroupRu Rule RuleCondition RuleDelayed RuleForm RulerUnits Run RunScheduledTask RunThrough RuntimeAttributes RuntimeOptions RussellRaoDissimilarity SameQ SameTest SampleDepth SampledSoundFunction SampledSoundList SampleRate SamplingPeriod SARIMAProcess SARMAProcess SatisfiabilityCount SatisfiabilityInstances SatisfiableQ Saturday Save Saveable SaveAutoDelete SaveDefinitions SawtoothWave Scale Scaled ScaleDivisions ScaledMousePosition ScaleOrigin ScalePadding ScaleRanges ScaleRangeStyle ScalingFunctions ScalingMatrix ScalingTransform Scan ScheduledTaskActiveQ ScheduledTaskData ScheduledTaskObject ScheduledTasks SchurDecomposition ScientificForm ScreenRectangle ScreenStyleEnvironment ScriptBaselineShifts ScriptLevel ScriptMinSize ScriptRules ScriptSizeMultipliers Scrollbars ScrollingOptions ScrollPosition Sec Sech SechDistribution SectionGrouping SectorChart SectorChart3D SectorOrigin SectorSpacing SeedRandom Select Selectable SelectComponents SelectedCells SelectedNotebook Selection SelectionAnimate SelectionCell SelectionCellCreateCell SelectionCellDefaultStyle SelectionCellParentStyle SelectionCreateCell SelectionDebuggerTag SelectionDuplicateCell SelectionEvaluate SelectionEvaluateCreateCell SelectionMove SelectionPlaceholder SelectionSetStyle SelectWithContents SelfLoops SelfLoopStyle SemialgebraicComponentInstances SendMail Sequence SequenceAlignment SequenceForm SequenceHold SequenceLimit Series SeriesCoefficient SeriesData SessionTime Set SetAccuracy SetAlphaChannel SetAttributes Setbacks SetBoxFormNamesPacket SetDelayed SetDirectory SetEnvironment SetEvaluationNotebook SetFileDate SetFileLoadingContext SetNotebookStatusLine SetOptions SetOptionsPacket SetPrecision SetProperty SetSelectedNotebook SetSharedFunction SetSharedVariable SetSpeechParametersPacket SetStreamPosition SetSystemOptions Setter SetterBar SetterBox SetterBoxOptions Setting SetValue Shading Shallow ShannonWavelet ShapiroWilkTest Share Sharpen ShearingMatrix ShearingTransform ShenCastanMatrix Short ShortDownArrow Shortest ShortestMatch ShortestPathFunction ShortLeftArrow ShortRightArrow ShortUpArrow Show ShowAutoStyles ShowCellBracket ShowCellLabel ShowCellTags ShowClosedCellArea ShowContents ShowControls ShowCursorTracker ShowGroupOpenCloseIcon ShowGroupOpener ShowInvisibleCharacters ShowPageBreaks ShowPredictiveInterface ShowSelection ShowShortBoxForm ShowSpecialCharacters ShowStringCharacters ShowSyntaxStyles ShrinkingDelay ShrinkWrapBoundingBox SiegelTheta SiegelTukeyTest Sign Signature SignedRankTest SignificanceLevel SignPadding SignTest SimilarityRules SimpleGraph SimpleGraphQ Simplify Sin Sinc SinghMaddalaDistribution SingleEvaluation SingleLetterItalics SingleLetterStyle SingularValueDecomposition SingularValueList SingularValuePlot SingularValues Sinh SinhIntegral SinIntegral SixJSymbol Skeleton SkeletonTransform SkellamDistribution Skewness SkewNormalDistribution Skip SliceDistribution Slider Slider2D Slider2DBox Slider2DBoxOptions SliderBox SliderBoxOptions SlideView Slot SlotSequence Small SmallCircle Smaller SmithDelayCompensator SmithWatermanSimilarity SmoothDensityHistogram SmoothHistogram SmoothHistogram3D SmoothKernelDistribution SocialMediaData Socket SokalSneathDissimilarity Solve SolveAlways SolveDelayed Sort SortBy Sound SoundAndGraphics SoundNote SoundVolume Sow Space SpaceForm Spacer Spacings Span SpanAdjustments SpanCharacterRounding SpanFromAbove SpanFromBoth SpanFromLeft SpanLineThickness SpanMaxSize SpanMinSize SpanningCharacters SpanSymmetric SparseArray SpatialGraphDistribution Speak SpeakTextPacket SpearmanRankTest SpearmanRho Spectrogram SpectrogramArray Specularity SpellingCorrection SpellingDictionaries SpellingDictionariesPath SpellingOptions SpellingSuggestionsPacket Sphere SphereBox SphericalBesselJ SphericalBesselY SphericalHankelH1 SphericalHankelH2 SphericalHarmonicY SphericalPlot3D SphericalRegion SpheroidalEigenvalue SpheroidalJoiningFactor SpheroidalPS SpheroidalPSPrime SpheroidalQS SpheroidalQSPrime SpheroidalRadialFactor SpheroidalS1 SpheroidalS1Prime SpheroidalS2 SpheroidalS2Prime Splice SplicedDistribution SplineClosed SplineDegree SplineKnots SplineWeights Split SplitBy SpokenString Sqrt SqrtBox SqrtBoxOptions Square SquaredEuclideanDistance SquareFreeQ SquareIntersection SquaresR SquareSubset SquareSubsetEqual SquareSuperset SquareSupersetEqual SquareUnion SquareWave StabilityMargins StabilityMarginsStyle StableDistribution Stack StackBegin StackComplete StackInhibit StandardDeviation StandardDeviationFilter StandardForm Standardize StandbyDistribution Star StarGraph StartAsynchronousTask StartingStepSize StartOfLine StartOfString StartScheduledTask StartupSound StateDimensions StateFeedbackGains StateOutputEstimator StateResponse StateSpaceModel StateSpaceRealization StateSpaceTransform StationaryDistribution StationaryWaveletPacketTransform StationaryWaveletTransform StatusArea StatusCentrality StepMonitor StieltjesGamma StirlingS1 StirlingS2 StopAsynchronousTask StopScheduledTask StrataVariables StratonovichProcess StreamColorFunction StreamColorFunctionScaling StreamDensityPlot StreamPlot StreamPoints StreamPosition Streams StreamScale StreamStyle String StringBreak StringByteCount StringCases StringCount StringDrop StringExpression StringForm StringFormat StringFreeQ StringInsert StringJoin StringLength StringMatchQ StringPosition StringQ StringReplace StringReplaceList StringReplacePart StringReverse StringRotateLeft StringRotateRight StringSkeleton StringSplit StringTake StringToStream StringTrim StripBoxes StripOnInput StripWrapperBoxes StrokeForm StructuralImportance StructuredArray StructuredSelection StruveH StruveL Stub StudentTDistribution Style StyleBox StyleBoxAutoDelete StyleBoxOptions StyleData StyleDefinitions StyleForm StyleKeyMapping StyleMenuListing StyleNameDialogSettings StyleNames StylePrint StyleSheetPath Subfactorial Subgraph SubMinus SubPlus SubresultantPolynomialRemainders SubresultantPolynomials Subresultants Subscript SubscriptBox SubscriptBoxOptions Subscripted Subset SubsetEqual Subsets SubStar Subsuperscript SubsuperscriptBox SubsuperscriptBoxOptions Subtract SubtractFrom SubValues Succeeds SucceedsEqual SucceedsSlantEqual SucceedsTilde SuchThat Sum SumConvergence Sunday SuperDagger SuperMinus SuperPlus Superscript SuperscriptBox SuperscriptBoxOptions Superset SupersetEqual SuperStar Surd SurdForm SurfaceColor SurfaceGraphics SurvivalDistribution SurvivalFunction SurvivalModel SurvivalModelFit SuspendPacket SuzukiDistribution SuzukiGroupSuz SwatchLegend Switch Symbol SymbolName SymletWavelet Symmetric SymmetricGroup SymmetricMatrixQ SymmetricPolynomial SymmetricReduction Symmetrize SymmetrizedArray SymmetrizedArrayRules SymmetrizedDependentComponents SymmetrizedIndependentComponents SymmetrizedReplacePart SynchronousInitialization SynchronousUpdating Syntax SyntaxForm SyntaxInformation SyntaxLength SyntaxPacket SyntaxQ SystemDialogInput SystemException SystemHelpPath SystemInformation SystemInformationData SystemOpen SystemOptions SystemsModelDelay SystemsModelDelayApproximate SystemsModelDelete SystemsModelDimensions SystemsModelExtract SystemsModelFeedbackConnect SystemsModelLabels SystemsModelOrder SystemsModelParallelConnect SystemsModelSeriesConnect SystemsModelStateFeedbackConnect SystemStub Tab TabFilling Table TableAlignments TableDepth TableDirections TableForm TableHeadings TableSpacing TableView TableViewBox TabSpacings TabView TabViewBox TabViewBoxOptions TagBox TagBoxNote TagBoxOptions TaggingRules TagSet TagSetDelayed TagStyle TagUnset Take TakeWhile Tally Tan Tanh TargetFunctions TargetUnits TautologyQ TelegraphProcess TemplateBox TemplateBoxOptions TemplateSlotSequence TemporalData Temporary TemporaryVariable TensorContract TensorDimensions TensorExpand TensorProduct TensorQ TensorRank TensorReduce TensorSymmetry TensorTranspose TensorWedge Tetrahedron TetrahedronBox TetrahedronBoxOptions TeXForm TeXSave Text Text3DBox Text3DBoxOptions TextAlignment TextBand TextBoundingBox TextBox TextCell TextClipboardType TextData TextForm TextJustification TextLine TextPacket TextParagraph TextRecognize TextRendering TextStyle Texture TextureCoordinateFunction TextureCoordinateScaling Therefore ThermometerGauge Thick Thickness Thin Thinning ThisLink ThompsonGroupTh Thread ThreeJSymbol Threshold Through Throw Thumbnail Thursday Ticks TicksStyle Tilde TildeEqual TildeFullEqual TildeTilde TimeConstrained TimeConstraint Times TimesBy TimeSeriesForecast TimeSeriesInvertibility TimeUsed TimeValue TimeZone Timing Tiny TitleGrouping TitsGroupT ToBoxes ToCharacterCode ToColor ToContinuousTimeModel ToDate ToDiscreteTimeModel ToeplitzMatrix ToExpression ToFileName Together Toggle ToggleFalse Toggler TogglerBar TogglerBox TogglerBoxOptions ToHeldExpression ToInvertibleTimeSeries TokenWords Tolerance ToLowerCase ToNumberField TooBig Tooltip TooltipBox TooltipBoxOptions TooltipDelay TooltipStyle Top TopHatTransform TopologicalSort ToRadicals ToRules ToString Total TotalHeight TotalVariationFilter TotalWidth TouchscreenAutoZoom TouchscreenControlPlacement ToUpperCase Tr Trace TraceAbove TraceAction TraceBackward TraceDepth TraceDialog TraceForward TraceInternal TraceLevel TraceOff TraceOn TraceOriginal TracePrint TraceScan TrackedSymbols TradingChart TraditionalForm TraditionalFunctionNotation TraditionalNotation TraditionalOrder TransferFunctionCancel TransferFunctionExpand TransferFunctionFactor TransferFunctionModel TransferFunctionPoles TransferFunctionTransform TransferFunctionZeros TransformationFunction TransformationFunctions TransformationMatrix TransformedDistribution TransformedField Translate TranslationTransform TransparentColor Transpose TreeForm TreeGraph TreeGraphQ TreePlot TrendStyle TriangleWave TriangularDistribution Trig TrigExpand TrigFactor TrigFactorList Trigger TrigReduce TrigToExp TrimmedMean True TrueQ TruncatedDistribution TsallisQExponentialDistribution TsallisQGaussianDistribution TTest Tube TubeBezierCurveBox TubeBezierCurveBoxOptions TubeBox TubeBSplineCurveBox TubeBSplineCurveBoxOptions Tuesday TukeyLambdaDistribution TukeyWindow Tuples TuranGraph TuringMachine Transparent UnateQ Uncompress Undefined UnderBar Underflow Underlined Underoverscript UnderoverscriptBox UnderoverscriptBoxOptions Underscript UnderscriptBox UnderscriptBoxOptions UndirectedEdge UndirectedGraph UndirectedGraphQ UndocumentedTestFEParserPacket UndocumentedTestGetSelectionPacket Unequal Unevaluated UniformDistribution UniformGraphDistribution UniformSumDistribution Uninstall Union UnionPlus Unique UnitBox UnitConvert UnitDimensions Unitize UnitRootTest UnitSimplify UnitStep UnitTriangle UnitVector Unprotect UnsameQ UnsavedVariables Unset UnsetShared UntrackedVariables Up UpArrow UpArrowBar UpArrowDownArrow Update UpdateDynamicObjects UpdateDynamicObjectsSynchronous UpdateInterval UpDownArrow UpEquilibrium UpperCaseQ UpperLeftArrow UpperRightArrow UpperTriangularize Upsample UpSet UpSetDelayed UpTee UpTeeArrow UpValues URL URLFetch URLFetchAsynchronous URLSave URLSaveAsynchronous UseGraphicsRange Using UsingFrontEnd V2Get ValidationLength Value ValueBox ValueBoxOptions ValueForm ValueQ ValuesData Variables Variance VarianceEquivalenceTest VarianceEstimatorFunction VarianceGammaDistribution VarianceTest VectorAngle VectorColorFunction VectorColorFunctionScaling VectorDensityPlot VectorGlyphData VectorPlot VectorPlot3D VectorPoints VectorQ Vectors VectorScale VectorStyle Vee Verbatim Verbose VerboseConvertToPostScriptPacket VerifyConvergence VerifySolutions VerifyTestAssumptions Version VersionNumber VertexAdd VertexCapacity VertexColors VertexComponent VertexConnectivity VertexCoordinateRules VertexCoordinates VertexCorrelationSimilarity VertexCosineSimilarity VertexCount VertexCoverQ VertexDataCoordinates VertexDegree VertexDelete VertexDiceSimilarity VertexEccentricity VertexInComponent VertexInDegree VertexIndex VertexJaccardSimilarity VertexLabeling VertexLabels VertexLabelStyle VertexList VertexNormals VertexOutComponent VertexOutDegree VertexQ VertexRenderingFunction VertexReplace VertexShape VertexShapeFunction VertexSize VertexStyle VertexTextureCoordinates VertexWeight Vertical VerticalBar VerticalForm VerticalGauge VerticalSeparator VerticalSlider VerticalTilde ViewAngle ViewCenter ViewMatrix ViewPoint ViewPointSelectorSettings ViewPort ViewRange ViewVector ViewVertical VirtualGroupData Visible VisibleCell VoigtDistribution VonMisesDistribution WaitAll WaitAsynchronousTask WaitNext WaitUntil WakebyDistribution WalleniusHypergeometricDistribution WaringYuleDistribution WatershedComponents WatsonUSquareTest WattsStrogatzGraphDistribution WaveletBestBasis WaveletFilterCoefficients WaveletImagePlot WaveletListPlot WaveletMapIndexed WaveletMatrixPlot WaveletPhi WaveletPsi WaveletScale WaveletScalogram WaveletThreshold WeaklyConnectedComponents WeaklyConnectedGraphQ WeakStationarity WeatherData WeberE Wedge Wednesday WeibullDistribution WeierstrassHalfPeriods WeierstrassInvariants WeierstrassP WeierstrassPPrime WeierstrassSigma WeierstrassZeta WeightedAdjacencyGraph WeightedAdjacencyMatrix WeightedData WeightedGraphQ Weights WelchWindow WheelGraph WhenEvent Which While White Whitespace WhitespaceCharacter WhittakerM WhittakerW WienerFilter WienerProcess WignerD WignerSemicircleDistribution WilksW WilksWTest WindowClickSelect WindowElements WindowFloating WindowFrame WindowFrameElements WindowMargins WindowMovable WindowOpacity WindowSelected WindowSize WindowStatusArea WindowTitle WindowToolbars WindowWidth With WolframAlpha WolframAlphaDate WolframAlphaQuantity WolframAlphaResult Word WordBoundary WordCharacter WordData WordSearch WordSeparators WorkingPrecision Write WriteString Wronskian XMLElement XMLObject Xnor Xor Yellow YuleDissimilarity ZernikeR ZeroSymmetric ZeroTest ZeroWidthTimes Zeta ZetaZero ZipfDistribution ZTest ZTransform $Aborted $ActivationGroupID $ActivationKey $ActivationUserRegistered $AddOnsDirectory $AssertFunction $Assumptions $AsynchronousTask $BaseDirectory $BatchInput $BatchOutput $BoxForms $ByteOrdering $Canceled $CharacterEncoding $CharacterEncodings $CommandLine $CompilationTarget $ConditionHold $ConfiguredKernels $Context $ContextPath $ControlActiveSetting $CreationDate $CurrentLink $DateStringFormat $DefaultFont $DefaultFrontEnd $DefaultImagingDevice $DefaultPath $Display $DisplayFunction $DistributedContexts $DynamicEvaluation $Echo $Epilog $ExportFormats $Failed $FinancialDataSource $FormatType $FrontEnd $FrontEndSession $GeoLocation $HistoryLength $HomeDirectory $HTTPCookies $IgnoreEOF $ImagingDevices $ImportFormats $InitialDirectory $Input $InputFileName $InputStreamMethods $Inspector $InstallationDate $InstallationDirectory $InterfaceEnvironment $IterationLimit $KernelCount $KernelID $Language $LaunchDirectory $LibraryPath $LicenseExpirationDate $LicenseID $LicenseProcesses $LicenseServer $LicenseSubprocesses $LicenseType $Line $Linked $LinkSupported $LoadedFiles $MachineAddresses $MachineDomain $MachineDomains $MachineEpsilon $MachineID $MachineName $MachinePrecision $MachineType $MaxExtraPrecision $MaxLicenseProcesses $MaxLicenseSubprocesses $MaxMachineNumber $MaxNumber $MaxPiecewiseCases $MaxPrecision $MaxRootDegree $MessageGroups $MessageList $MessagePrePrint $Messages $MinMachineNumber $MinNumber $MinorReleaseNumber $MinPrecision $ModuleNumber $NetworkLicense $NewMessage $NewSymbol $Notebooks $NumberMarks $Off $OperatingSystem $Output $OutputForms $OutputSizeLimit $OutputStreamMethods $Packages $ParentLink $ParentProcessID $PasswordFile $PatchLevelID $Path $PathnameSeparator $PerformanceGoal $PipeSupported $Post $Pre $PreferencesDirectory $PrePrint $PreRead $PrintForms $PrintLiteral $ProcessID $ProcessorCount $ProcessorType $ProductInformation $ProgramName $RandomState $RecursionLimit $ReleaseNumber $RootDirectory $ScheduledTask $ScriptCommandLine $SessionID $SetParentLink $SharedFunctions $SharedVariables $SoundDisplay $SoundDisplayFunction $SuppressInputFormHeads $SynchronousEvaluation $SyntaxHandler $System $SystemCharacterEncoding $SystemID $SystemWordLength $TemporaryDirectory $TemporaryPrefix $TextStyle $TimedOut $TimeUnit $TimeZone $TopDirectory $TraceOff $TraceOn $TracePattern $TracePostAction $TracePreAction $Urgent $UserAddOnsDirectory $UserBaseDirectory $UserDocumentsDirectory $UserName $Version $VersionNumber",
c: [ {
cN: "comment",
b: /\(\*/,
e: /\*\)/
}, e.ASM, e.QSM, e.CNM, {
cN: "list",
b: /\{/,
e: /\}/,
i: /:/
} ]
};
}), hljs.registerLanguage("php", function(e) {
var t = {
cN: "variable",
b: "\\$+[a-zA-Z_-\xff][a-zA-Z0-9_-\xff]*"
}, n = {
cN: "preprocessor",
b: /<\?(php)?|\?>/
}, i = {
cN: "string",
c: [ e.BE, n ],
v: [ {
b: 'b"',
e: '"'
}, {
b: "b'",
e: "'"
}, e.inherit(e.ASM, {
i: null
}), e.inherit(e.QSM, {
i: null
}) ]
}, r = {
v: [ e.BNM, e.CNM ]
};
return {
cI: !0,
k: "and include_once list abstract global private echo interface as static endswitch array null if endwhile or const for endforeach self var while isset public protected exit foreach throw elseif include __FILE__ empty require_once do xor return parent clone use __CLASS__ __LINE__ else break print eval new catch __METHOD__ case exception default die require __FUNCTION__ enddeclare final try switch continue endfor endif declare unset true false trait goto instanceof insteadof __DIR__ __NAMESPACE__ yield finally",
c: [ e.CLCM, e.HCM, {
cN: "comment",
b: "/\\*",
e: "\\*/",
c: [ {
cN: "phpdoc",
b: "\\s@[A-Za-z]+"
}, n ]
}, {
cN: "comment",
b: "__halt_compiler.+?;",
eW: !0,
k: "__halt_compiler",
l: e.UIR
}, {
cN: "string",
b: "<<<['\"]?\\w+['\"]?$",
e: "^\\w+;",
c: [ e.BE ]
}, n, t, {
cN: "function",
bK: "function",
e: /[;{]/,
i: "\\$|\\[|%",
c: [ e.UTM, {
cN: "params",
b: "\\(",
e: "\\)",
c: [ "self", t, e.CBLCLM, i, r ]
} ]
}, {
cN: "class",
bK: "class interface",
e: "{",
i: /[:\(\$"]/,
c: [ {
bK: "extends implements",
r: 10
}, e.UTM ]
}, {
bK: "namespace",
e: ";",
i: /[\.']/,
c: [ e.UTM ]
}, {
bK: "use",
e: ";",
c: [ e.UTM ]
}, {
b: "=>"
}, i, r ]
};
}), hljs.registerLanguage("haskell", function(e) {
var t = {
cN: "comment",
v: [ {
b: "--",
e: "$"
}, {
b: "{-",
e: "-}",
c: [ "self" ]
} ]
}, n = {
cN: "pragma",
b: "{-#",
e: "#-}"
}, i = {
cN: "preprocessor",
b: "^#",
e: "$"
}, r = {
cN: "type",
b: "\\b[A-Z][\\w']*",
r: 0
}, o = {
cN: "container",
b: "\\(",
e: "\\)",
i: '"',
c: [ n, t, i, {
cN: "type",
b: "\\b[A-Z][\\w]*(\\((\\.\\.|,|\\w+)\\))?"
}, e.inherit(e.TM, {
b: "[_a-z][\\w']*"
}) ]
};
return {
k: "let in if then else case of where do module import hiding qualified type data newtype deriving class instance as default infix infixl infixr foreign export ccall stdcall cplusplus jvm dotnet safe unsafe family forall mdo proc rec",
c: [ {
cN: "module",
b: "\\bmodule\\b",
e: "where",
k: "module where",
c: [ o, t ],
i: "\\W\\.|;"
}, {
cN: "import",
b: "\\bimport\\b",
e: "$",
k: "import|0 qualified as hiding",
c: [ o, t ],
i: "\\W\\.|;"
}, {
cN: "class",
b: "^(\\s*)?(class|instance)\\b",
e: "where",
k: "class family instance where",
c: [ r, o, t ]
}, {
cN: "typedef",
b: "\\b(data|(new)?type)\\b",
e: "$",
k: "data family type newtype deriving",
c: [ n, t, r, o, {
cN: "container",
b: "{",
e: "}",
c: o.c
} ]
}, {
cN: "default",
bK: "default",
e: "$",
c: [ r, o, t ]
}, {
cN: "infix",
bK: "infix infixl infixr",
e: "$",
c: [ e.CNM, t ]
}, {
cN: "foreign",
b: "\\bforeign\\b",
e: "$",
k: "foreign import export ccall stdcall cplusplus jvm dotnet safe unsafe",
c: [ r, e.QSM, t ]
}, {
cN: "shebang",
b: "#!\\/usr\\/bin\\/env runhaskell",
e: "$"
}, n, t, i, e.QSM, e.CNM, r, e.inherit(e.TM, {
b: "^[_a-z][\\w']*"
}), {
b: "->|<-"
} ]
};
}), hljs.registerLanguage("1c", function(e) {
var t = "[a-zA-Z\u0430-\u044f\u0410-\u042f][a-zA-Z0-9_\u0430-\u044f\u0410-\u042f]*", n = {
cN: "dquote",
b: '""'
}, i = {
cN: "string",
b: '"',
e: '"|$',
c: [ n ]
}, r = {
cN: "string",
b: "\\|",
e: '"|$',
c: [ n ]
};
return {
cI: !0,
l: t,
k: {
keyword: "\u0432\u043e\u0437\u0432\u0440\u0430\u0442 \u0434\u0430\u0442\u0430 \u0434\u043b\u044f \u0435\u0441\u043b\u0438 \u0438 \u0438\u043b\u0438 \u0438\u043d\u0430\u0447\u0435 \u0438\u043d\u0430\u0447\u0435\u0435\u0441\u043b\u0438 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a\u043e\u043d\u0435\u0446\u0435\u0441\u043b\u0438 \u043a\u043e\u043d\u0435\u0446\u043f\u043e\u043f\u044b\u0442\u043a\u0438 \u043a\u043e\u043d\u0435\u0446\u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u044b \u043a\u043e\u043d\u0435\u0446\u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043a\u043e\u043d\u0435\u0446\u0446\u0438\u043a\u043b\u0430 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0430 \u043d\u0435 \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043f\u0435\u0440\u0435\u043c \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 \u043f\u043e \u043f\u043e\u043a\u0430 \u043f\u043e\u043f\u044b\u0442\u043a\u0430 \u043f\u0440\u0435\u0440\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 \u0441\u0442\u0440\u043e\u043a\u0430 \u0442\u043e\u0433\u0434\u0430 \u0444\u0441 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0446\u0438\u043a\u043b \u0447\u0438\u0441\u043b\u043e \u044d\u043a\u0441\u043f\u043e\u0440\u0442",
built_in: "ansitooem oemtoansi \u0432\u0432\u0435\u0441\u0442\u0438\u0432\u0438\u0434\u0441\u0443\u0431\u043a\u043e\u043d\u0442\u043e \u0432\u0432\u0435\u0441\u0442\u0438\u0434\u0430\u0442\u0443 \u0432\u0432\u0435\u0441\u0442\u0438\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432\u0432\u0435\u0441\u0442\u0438\u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 \u0432\u0432\u0435\u0441\u0442\u0438\u043f\u0435\u0440\u0438\u043e\u0434 \u0432\u0432\u0435\u0441\u0442\u0438\u043f\u043b\u0430\u043d\u0441\u0447\u0435\u0442\u043e\u0432 \u0432\u0432\u0435\u0441\u0442\u0438\u0441\u0442\u0440\u043e\u043a\u0443 \u0432\u0432\u0435\u0441\u0442\u0438\u0447\u0438\u0441\u043b\u043e \u0432\u043e\u043f\u0440\u043e\u0441 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432\u0440\u0435\u0433 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0439\u043f\u043b\u0430\u043d\u0441\u0447\u0435\u0442\u043e\u0432 \u0432\u044b\u0437\u0432\u0430\u0442\u044c\u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0434\u0430\u0442\u0430\u0433\u043e\u0434 \u0434\u0430\u0442\u0430\u043c\u0435\u0441\u044f\u0446 \u0434\u0430\u0442\u0430\u0447\u0438\u0441\u043b\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c\u043c\u0435\u0441\u044f\u0446 \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u044c\u0440\u0430\u0431\u043e\u0442\u0443\u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a\u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0437\u0430\u043f\u0438\u0441\u044c\u0436\u0443\u0440\u043d\u0430\u043b\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0437\u0430\u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u0432\u0441\u0442\u0440\u043e\u043a\u0443 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u0432\u0441\u0442\u0440\u043e\u043a\u0443\u0432\u043d\u0443\u0442\u0440 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u0432\u0444\u0430\u0439\u043b \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u0438\u0437\u0441\u0442\u0440\u043e\u043a\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u0438\u0437\u0441\u0442\u0440\u043e\u043a\u0438\u0432\u043d\u0443\u0442\u0440 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u0438\u0437\u0444\u0430\u0439\u043b\u0430 \u0438\u043c\u044f\u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430 \u0438\u043c\u044f\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445\u0444\u0430\u0439\u043b\u043e\u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0438\u0431 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u043a\u043e\u0434\u0441\u0438\u043c\u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u0430\u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043a\u043e\u043d\u0433\u043e\u0434\u0430 \u043a\u043e\u043d\u0435\u0446\u043f\u0435\u0440\u0438\u043e\u0434\u0430\u0431\u0438 \u043a\u043e\u043d\u0435\u0446\u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u043d\u043d\u043e\u0433\u043e\u043f\u0435\u0440\u0438\u043e\u0434\u0430\u0431\u0438 \u043a\u043e\u043d\u0435\u0446\u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0433\u043e\u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u0430 \u043a\u043e\u043d\u043a\u0432\u0430\u0440\u0442\u0430\u043b\u0430 \u043a\u043e\u043d\u043c\u0435\u0441\u044f\u0446\u0430 \u043a\u043e\u043d\u043d\u0435\u0434\u0435\u043b\u0438 \u043b\u0435\u0432 \u043b\u043e\u0433 \u043b\u043e\u043310 \u043c\u0430\u043a\u0441 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435\u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u0441\u0443\u0431\u043a\u043e\u043d\u0442\u043e \u043c\u0438\u043d \u043c\u043e\u043d\u043e\u043f\u043e\u043b\u044c\u043d\u044b\u0439\u0440\u0435\u0436\u0438\u043c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043d\u0430\u0431\u043e\u0440\u0430\u043f\u0440\u0430\u0432 \u043d\u0430\u0437\u043d\u0430\u0447\u0438\u0442\u044c\u0432\u0438\u0434 \u043d\u0430\u0437\u043d\u0430\u0447\u0438\u0442\u044c\u0441\u0447\u0435\u0442 \u043d\u0430\u0439\u0442\u0438 \u043d\u0430\u0439\u0442\u0438\u043f\u043e\u043c\u0435\u0447\u0435\u043d\u043d\u044b\u0435\u043d\u0430\u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043d\u0430\u0439\u0442\u0438\u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430\u0447\u0430\u043b\u043e\u043f\u0435\u0440\u0438\u043e\u0434\u0430\u0431\u0438 \u043d\u0430\u0447\u0430\u043b\u043e\u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0433\u043e\u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u0430 \u043d\u0430\u0447\u0430\u0442\u044c\u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044e \u043d\u0430\u0447\u0433\u043e\u0434\u0430 \u043d\u0430\u0447\u043a\u0432\u0430\u0440\u0442\u0430\u043b\u0430 \u043d\u0430\u0447\u043c\u0435\u0441\u044f\u0446\u0430 \u043d\u0430\u0447\u043d\u0435\u0434\u0435\u043b\u0438 \u043d\u043e\u043c\u0435\u0440\u0434\u043d\u044f\u0433\u043e\u0434\u0430 \u043d\u043e\u043c\u0435\u0440\u0434\u043d\u044f\u043d\u0435\u0434\u0435\u043b\u0438 \u043d\u043e\u043c\u0435\u0440\u043d\u0435\u0434\u0435\u043b\u0438\u0433\u043e\u0434\u0430 \u043d\u0440\u0435\u0433 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430\u043e\u0436\u0438\u0434\u0430\u043d\u0438\u044f \u043e\u043a\u0440 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043e\u0448\u0438\u0431\u043a\u0438 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439\u0436\u0443\u0440\u043d\u0430\u043b\u0440\u0430\u0441\u0447\u0435\u0442\u043e\u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439\u043f\u043b\u0430\u043d\u0441\u0447\u0435\u0442\u043e\u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439\u044f\u0437\u044b\u043a \u043e\u0442\u043a\u0440\u044b\u0442\u044c\u0444\u043e\u0440\u043c\u0443 \u043e\u0442\u043a\u0440\u044b\u0442\u044c\u0444\u043e\u0440\u043c\u0443\u043c\u043e\u0434\u0430\u043b\u044c\u043d\u043e \u043e\u0442\u043c\u0435\u043d\u0438\u0442\u044c\u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044e \u043e\u0447\u0438\u0441\u0442\u0438\u0442\u044c\u043e\u043a\u043d\u043e\u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u043f\u0435\u0440\u0438\u043e\u0434\u0441\u0442\u0440 \u043f\u043e\u043b\u043d\u043e\u0435\u0438\u043c\u044f\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c\u0432\u0440\u0435\u043c\u044f\u0442\u0430 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c\u0434\u0430\u0442\u0443\u0442\u0430 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0442\u0430 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043e\u0442\u0431\u043e\u0440\u0430 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c\u043f\u043e\u0437\u0438\u0446\u0438\u044e\u0442\u0430 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c\u043f\u0443\u0441\u0442\u043e\u0435\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c\u0442\u0430 \u043f\u0440\u0430\u0432 \u043f\u0440\u0430\u0432\u043e\u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u0430\u0432\u0442\u043e\u043d\u0443\u043c\u0435\u0440\u0430\u0446\u0438\u0438 \u043f\u0443\u0441\u0442\u0430\u044f\u0441\u0442\u0440\u043e\u043a\u0430 \u043f\u0443\u0441\u0442\u043e\u0435\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0440\u0430\u0431\u043e\u0447\u0430\u044f\u0434\u0430\u0442\u0442\u044c\u043f\u0443\u0441\u0442\u043e\u0435\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0440\u0430\u0431\u043e\u0447\u0430\u044f\u0434\u0430\u0442\u0430 \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044c\u0441\u0442\u0440\u0430\u043d\u0438\u0446 \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044c\u0441\u0442\u0440\u043e\u043a \u0440\u0430\u0437\u043c \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u043f\u043e\u0437\u0438\u0446\u0438\u044e\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u0442\u044c\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u044b\u043d\u0430 \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u0442\u044c\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u044b\u043f\u043e \u0441\u0438\u0433\u043d\u0430\u043b \u0441\u0438\u043c\u0432 \u0441\u0438\u043c\u0432\u043e\u043b\u0442\u0430\u0431\u0443\u043b\u044f\u0446\u0438\u0438 \u0441\u043e\u0437\u0434\u0430\u0442\u044c\u043e\u0431\u044a\u0435\u043a\u0442 \u0441\u043e\u043a\u0440\u043b \u0441\u043e\u043a\u0440\u043b\u043f \u0441\u043e\u043a\u0440\u043f \u0441\u043e\u043e\u0431\u0449\u0438\u0442\u044c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441\u0440\u0435\u0434 \u0441\u0442\u0430\u0442\u0443\u0441\u0432\u043e\u0437\u0432\u0440\u0430\u0442\u0430 \u0441\u0442\u0440\u0434\u043b\u0438\u043d\u0430 \u0441\u0442\u0440\u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u0441\u0442\u0440\u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u0441\u0442\u0440\u043e\u043a \u0441\u0442\u0440\u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c\u0441\u0442\u0440\u043e\u043a\u0443 \u0441\u0442\u0440\u0447\u0438\u0441\u043b\u043e\u0432\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0439 \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u043f\u043e\u0437\u0438\u0446\u0438\u044e\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 \u0441\u0447\u0435\u0442\u043f\u043e\u043a\u043e\u0434\u0443 \u0442\u0435\u043a\u0443\u0449\u0430\u044f\u0434\u0430\u0442\u0430 \u0442\u0435\u043a\u0443\u0449\u0435\u0435\u0432\u0440\u0435\u043c\u044f \u0442\u0438\u043f\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0442\u0438\u043f\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u0441\u0442\u0440 \u0443\u0434\u0430\u043b\u0438\u0442\u044c\u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c\u0442\u0430\u043d\u0430 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c\u0442\u0430\u043f\u043e \u0444\u0438\u043a\u0441\u0448\u0430\u0431\u043b\u043e\u043d \u0444\u043e\u0440\u043c\u0430\u0442 \u0446\u0435\u043b \u0448\u0430\u0431\u043b\u043e\u043d"
},
c: [ e.CLCM, e.NM, i, r, {
cN: "function",
b: "(\u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430|\u0444\u0443\u043d\u043a\u0446\u0438\u044f)",
e: "$",
l: t,
k: "\u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f",
c: [ e.inherit(e.TM, {
b: t
}), {
cN: "tail",
eW: !0,
c: [ {
cN: "params",
b: "\\(",
e: "\\)",
l: t,
k: "\u0437\u043d\u0430\u0447",
c: [ i, r ]
}, {
cN: "export",
b: "\u044d\u043a\u0441\u043f\u043e\u0440\u0442",
eW: !0,
l: t,
k: "\u044d\u043a\u0441\u043f\u043e\u0440\u0442",
c: [ e.CLCM ]
} ]
}, e.CLCM ]
}, {
cN: "preprocessor",
b: "#",
e: "$"
}, {
cN: "date",
b: "'\\d{2}\\.\\d{2}\\.(\\d{2}|\\d{4})'"
} ]
};
}), hljs.registerLanguage("python", function(e) {
var t = {
cN: "prompt",
b: /^(>>>|\.\.\.) /
}, n = {
cN: "string",
c: [ e.BE ],
v: [ {
b: /(u|b)?r?'''/,
e: /'''/,
c: [ t ],
r: 10
}, {
b: /(u|b)?r?"""/,
e: /"""/,
c: [ t ],
r: 10
}, {
b: /(u|r|ur)'/,
e: /'/,
r: 10
}, {
b: /(u|r|ur)"/,
e: /"/,
r: 10
}, {
b: /(b|br)'/,
e: /'/
}, {
b: /(b|br)"/,
e: /"/
}, e.ASM, e.QSM ]
}, i = {
cN: "number",
r: 0,
v: [ {
b: e.BNR + "[lLjJ]?"
}, {
b: "\\b(0o[0-7]+)[lLjJ]?"
}, {
b: e.CNR + "[lLjJ]?"
} ]
}, r = {
cN: "params",
b: /\(/,
e: /\)/,
c: [ "self", t, i, n ]
}, o = {
e: /:/,
i: /[${=;\n]/,
c: [ e.UTM, r ]
};
return {
k: {
keyword: "and elif is global as in if from raise for except finally print import pass return exec else break not with class assert yield try while continue del or def lambda nonlocal|10 None True False",
built_in: "Ellipsis NotImplemented"
},
i: /(<\/|->|\?)/,
c: [ t, i, n, e.HCM, e.inherit(o, {
cN: "function",
bK: "def",
r: 10
}), e.inherit(o, {
cN: "class",
bK: "class"
}), {
cN: "decorator",
b: /@/,
e: /$/
}, {
b: /\b(print|exec)\(/
} ]
};
}), hljs.registerLanguage("smalltalk", function(e) {
var t = "[a-z][a-zA-Z0-9_]*", n = {
cN: "char",
b: "\\$.{1}"
}, i = {
cN: "symbol",
b: "#" + e.UIR
};
return {
k: "self super nil true false thisContext",
c: [ {
cN: "comment",
b: '"',
e: '"'
}, e.ASM, {
cN: "class",
b: "\\b[A-Z][A-Za-z0-9_]*",
r: 0
}, {
cN: "method",
b: t + ":",
r: 0
}, e.CNM, i, n, {
cN: "localvars",
b: "\\|[ ]*" + t + "([ ]+" + t + ")*[ ]*\\|",
rB: !0,
e: /\|/,
i: /\S/,
c: [ {
b: "(\\|[ ]*)?" + t
} ]
}, {
cN: "array",
b: "\\#\\(",
e: "\\)",
c: [ e.ASM, n, e.CNM, i ]
} ]
};
}), hljs.registerLanguage("tex", function() {
var e = {
cN: "command",
b: "\\\\[a-zA-Z\u0430-\u044f\u0410-\u044f]+[\\*]?"
}, t = {
cN: "command",
b: "\\\\[^a-zA-Z\u0430-\u044f\u0410-\u044f0-9]"
}, n = {
cN: "special",
b: "[{}\\[\\]\\&#~]",
r: 0
};
return {
c: [ {
b: "\\\\[a-zA-Z\u0430-\u044f\u0410-\u044f]+[\\*]? *= *-?\\d*\\.?\\d+(pt|pc|mm|cm|in|dd|cc|ex|em)?",
rB: !0,
c: [ e, t, {
cN: "number",
b: " *=",
e: "-?\\d*\\.?\\d+(pt|pc|mm|cm|in|dd|cc|ex|em)?",
eB: !0
} ],
r: 10
}, e, t, n, {
cN: "formula",
b: "\\$\\$",
e: "\\$\\$",
c: [ e, t, n ],
r: 0
}, {
cN: "formula",
b: "\\$",
e: "\\$",
c: [ e, t, n ],
r: 0
}, {
cN: "comment",
b: "%",
e: "$",
r: 0
} ]
};
}), hljs.registerLanguage("actionscript", function(e) {
var t = {
cN: "rest_arg",
b: "[.]{3}",
e: "[a-zA-Z_$][a-zA-Z0-9_$]*",
r: 10
};
return {
k: {
keyword: "as break case catch class const continue default delete do dynamic each else extends final finally for function get if implements import in include instanceof interface internal is namespace native new override package private protected public return set static super switch this throw try typeof use var void while with",
literal: "true false null undefined"
},
c: [ e.ASM, e.QSM, e.CLCM, e.CBLCLM, e.CNM, {
cN: "package",
bK: "package",
e: "{",
c: [ e.TM ]
}, {
cN: "class",
bK: "class interface",
e: "{",
c: [ {
bK: "extends implements"
}, e.TM ]
}, {
cN: "preprocessor",
bK: "import include",
e: ";"
}, {
cN: "function",
bK: "function",
e: "[{;]",
i: "\\S",
c: [ e.TM, {
cN: "params",
b: "\\(",
e: "\\)",
c: [ e.ASM, e.QSM, e.CLCM, e.CBLCLM, t ]
}, {
cN: "type",
b: ":",
e: "([*]|[a-zA-Z_$][a-zA-Z0-9_$]*)",
r: 10
} ]
} ]
};
}), hljs.registerLanguage("sql", function(e) {
return {
cI: !0,
i: /[<>]/,
c: [ {
cN: "operator",
b: "\\b(begin|end|start|commit|rollback|savepoint|lock|alter|create|drop|rename|call|delete|do|handler|insert|load|replace|select|truncate|update|set|show|pragma|grant|merge)\\b(?!:)",
e: ";",
eW: !0,
k: {
keyword: "all partial global month current_timestamp using go revoke smallint indicator end-exec disconnect zone with character assertion to add current_user usage input local alter match collate real then rollback get read timestamp session_user not integer bit unique day minute desc insert execute like ilike|2 level decimal drop continue isolation found where constraints domain right national some module transaction relative second connect escape close system_user for deferred section cast current sqlstate allocate intersect deallocate numeric public preserve full goto initially asc no key output collation group by union session both last language constraint column of space foreign deferrable prior connection unknown action commit view or first into float year primary cascaded except restrict set references names table outer open select size are rows from prepare distinct leading create only next inner authorization schema corresponding option declare precision immediate else timezone_minute external varying translation true case exception join hour default double scroll value cursor descriptor values dec fetch procedure delete and false int is describe char as at in varchar null trailing any absolute current_time end grant privileges when cross check write current_date pad begin temporary exec time update catalog user sql date on identity timezone_hour natural whenever interval work order cascade diagnostics nchar having left call do handler load replace truncate start lock show pragma exists number trigger if before after each row merge matched database",
aggregate: "count sum min max avg"
},
c: [ {
cN: "string",
b: "'",
e: "'",
c: [ e.BE, {
b: "''"
} ]
}, {
cN: "string",
b: '"',
e: '"',
c: [ e.BE, {
b: '""'
} ]
}, {
cN: "string",
b: "`",
e: "`",
c: [ e.BE ]
}, e.CNM ]
}, e.CBLCLM, {
cN: "comment",
b: "--",
e: "$"
} ]
};
}), hljs.registerLanguage("handlebars", function() {
var e = "each in with if else unless bindattr action collection debugger log outlet template unbound view yield";
return {
cI: !0,
sL: "xml",
subLanguageMode: "continuous",
c: [ {
cN: "expression",
b: "{{",
e: "}}",
c: [ {
cN: "begin-block",
b: "#[a-zA-Z- .]+",
k: e
}, {
cN: "string",
b: '"',
e: '"'
}, {
cN: "end-block",
b: "\\/[a-zA-Z- .]+",
k: e
}, {
cN: "variable",
b: "[a-zA-Z-.]+",
k: e
} ]
} ]
};
}), hljs.registerLanguage("vala", function(e) {
return {
k: {
keyword: "char uchar unichar int uint long ulong short ushort int8 int16 int32 int64 uint8 uint16 uint32 uint64 float double bool struct enum string void weak unowned owned async signal static abstract interface override while do for foreach else switch case break default return try catch public private protected internal using new this get set const stdout stdin stderr var",
built_in: "DBus GLib CCode Gee Object",
literal: "false true null"
},
c: [ {
cN: "class",
bK: "class interface delegate namespace",
e: "{",
i: "[^,:\\n\\s\\.]",
c: [ e.UTM ]
}, e.CLCM, e.CBLCLM, {
cN: "string",
b: '"""',
e: '"""',
r: 5
}, e.ASM, e.QSM, e.CNM, {
cN: "preprocessor",
b: "^#",
e: "$",
r: 2
}, {
cN: "constant",
b: " [A-Z_]+ ",
r: 0
} ]
};
}), hljs.registerLanguage("ini", function(e) {
return {
cI: !0,
i: /\S/,
c: [ {
cN: "comment",
b: ";",
e: "$"
}, {
cN: "title",
b: "^\\[",
e: "\\]"
}, {
cN: "setting",
b: "^[a-z0-9\\[\\]_-]+[ \\t]*=[ \\t]*",
e: "$",
c: [ {
cN: "value",
eW: !0,
k: "on off true false yes no",
c: [ e.QSM, e.NM ],
r: 0
} ]
} ]
};
}), hljs.registerLanguage("livecodeserver", function(e) {
var t = {
cN: "variable",
b: "\\b[gtps][A-Z]+[A-Za-z0-9_\\-]*\\b|\\$_[A-Z]+",
r: 0
}, n = {
cN: "comment",
e: "$",
v: [ e.CBLCLM, e.HCM, {
b: "--"
}, {
b: "[^:]//"
} ]
}, i = e.inherit(e.TM, {
v: [ {
b: "\\b_*rig[A-Z]+[A-Za-z0-9_\\-]*"
}, {
b: "\\b_[a-z0-9\\-]+"
} ]
}), r = e.inherit(e.TM, {
b: "\\b([A-Za-z0-9_\\-]+)\\b"
});
return {
cI: !1,
k: {
keyword: "after byte bytes english the until http forever descending using line real8 with seventh for stdout finally element word fourth before black ninth sixth characters chars stderr uInt1 uInt1s uInt2 uInt2s stdin string lines relative rel any fifth items from middle mid at else of catch then third it file milliseconds seconds second secs sec int1 int1s int4 int4s internet int2 int2s normal text item last long detailed effective uInt4 uInt4s repeat end repeat URL in try into switch to words https token binfile each tenth as ticks tick system real4 by dateItems without char character ascending eighth whole dateTime numeric short first ftp integer abbreviated abbr abbrev private case while if",
constant: "SIX TEN FORMFEED NINE ZERO NONE SPACE FOUR FALSE COLON CRLF PI COMMA ENDOFFILE EOF EIGHT FIVE QUOTE EMPTY ONE TRUE RETURN CR LINEFEED RIGHT BACKSLASH NULL SEVEN TAB THREE TWO six ten formfeed nine zero none space four false colon crlf pi comma endoffile eof eight five quote empty one true return cr linefeed right backslash null seven tab three two RIVERSION RISTATE FILE_READ_MODE FILE_WRITE_MODE FILE_WRITE_MODE DIR_WRITE_MODE FILE_READ_UMASK FILE_WRITE_UMASK DIR_READ_UMASK DIR_WRITE_UMASK",
operator: "div mod wrap and or bitAnd bitNot bitOr bitXor among not in a an within contains ends with begins the keys of keys",
built_in: "put abs acos aliasReference annuity arrayDecode arrayEncode asin atan atan2 average avg base64Decode base64Encode baseConvert binaryDecode binaryEncode byteToNum cachedURL cachedURLs charToNum cipherNames commandNames compound compress constantNames cos date dateFormat decompress directories diskSpace DNSServers exp exp1 exp2 exp10 extents files flushEvents folders format functionNames global globals hasMemory hostAddress hostAddressToName hostName hostNameToAddress isNumber ISOToMac itemOffset keys len length libURLErrorData libUrlFormData libURLftpCommand libURLLastHTTPHeaders libURLLastRHHeaders libUrlMultipartFormAddPart libUrlMultipartFormData libURLVersion lineOffset ln ln1 localNames log log2 log10 longFilePath lower macToISO matchChunk matchText matrixMultiply max md5Digest median merge millisec millisecs millisecond milliseconds min monthNames num number numToByte numToChar offset open openfiles openProcesses openProcessIDs openSockets paramCount param params peerAddress pendingMessages platform processID random randomBytes replaceText result revCreateXMLTree revCreateXMLTreeFromFile revCurrentRecord revCurrentRecordIsFirst revCurrentRecordIsLast revDatabaseColumnCount revDatabaseColumnIsNull revDatabaseColumnLengths revDatabaseColumnNames revDatabaseColumnNamed revDatabaseColumnNumbered revDatabaseColumnTypes revDatabaseConnectResult revDatabaseCursors revDatabaseID revDatabaseTableNames revDatabaseType revDataFromQuery revdb_closeCursor revdb_columnbynumber revdb_columncount revdb_columnisnull revdb_columnlengths revdb_columnnames revdb_columntypes revdb_commit revdb_connect revdb_connections revdb_connectionerr revdb_currentrecord revdb_cursorconnection revdb_cursorerr revdb_cursors revdb_dbtype revdb_disconnect revdb_execute revdb_iseof revdb_isbof revdb_movefirst revdb_movelast revdb_movenext revdb_moveprev revdb_query revdb_querylist revdb_recordcount revdb_rollback revdb_tablenames revGetDatabaseDriverPath revNumberOfRecords revOpenDatabase revOpenDatabases revQueryDatabase revQueryDatabaseBlob revQueryResult revQueryIsAtStart revQueryIsAtEnd revUnixFromMacPath revXMLAttribute revXMLAttributes revXMLAttributeValues revXMLChildContents revXMLChildNames revXMLFirstChild revXMLMatchingNode revXMLNextSibling revXMLNodeContents revXMLNumberOfChildren revXMLParent revXMLPreviousSibling revXMLRootNode revXMLRPC_CreateRequest revXMLRPC_Documents revXMLRPC_Error revXMLRPC_Execute revXMLRPC_GetHost revXMLRPC_GetMethod revXMLRPC_GetParam revXMLText revXMLRPC_GetParamCount revXMLRPC_GetParamNode revXMLRPC_GetParamType revXMLRPC_GetPath revXMLRPC_GetPort revXMLRPC_GetProtocol revXMLRPC_GetRequest revXMLRPC_GetResponse revXMLRPC_GetSocket revXMLTree revXMLTrees revXMLValidateDTD revZipDescribeItem revZipEnumerateItems revZipOpenArchives round sec secs seconds sha1Digest shell shortFilePath sin specialFolderPath sqrt standardDeviation statRound stdDev sum sysError systemVersion tan tempName tick ticks time to toLower toUpper transpose trunc uniDecode uniEncode upper URLDecode URLEncode URLStatus value variableNames version waitDepth weekdayNames wordOffset add breakpoint cancel clear local variable file word line folder directory URL close socket process combine constant convert create new alias folder directory decrypt delete variable word line folder directory URL dispatch divide do encrypt filter get include intersect kill libURLDownloadToFile libURLFollowHttpRedirects libURLftpUpload libURLftpUploadFile libURLresetAll libUrlSetAuthCallback libURLSetCustomHTTPHeaders libUrlSetExpect100 libURLSetFTPListCommand libURLSetFTPMode libURLSetFTPStopTime libURLSetStatusCallback load multiply socket process post seek rel relative read from process rename replace require resetAll revAddXMLNode revAppendXML revCloseCursor revCloseDatabase revCommitDatabase revCopyFile revCopyFolder revCopyXMLNode revDeleteFolder revDeleteXMLNode revDeleteAllXMLTrees revDeleteXMLTree revExecuteSQL revGoURL revInsertXMLNode revMoveFolder revMoveToFirstRecord revMoveToLastRecord revMoveToNextRecord revMoveToPreviousRecord revMoveToRecord revMoveXMLNode revPutIntoXMLNode revRollBackDatabase revSetDatabaseDriverPath revSetXMLAttribute revXMLRPC_AddParam revXMLRPC_DeleteAllDocuments revXMLAddDTD revXMLRPC_Free revXMLRPC_FreeAll revXMLRPC_DeleteDocument revXMLRPC_DeleteParam revXMLRPC_SetHost revXMLRPC_SetMethod revXMLRPC_SetPort revXMLRPC_SetProtocol revXMLRPC_SetSocket revZipAddItemWithData revZipAddItemWithFile revZipAddUncompressedItemWithData revZipAddUncompressedItemWithFile revZipCancel revZipCloseArchive revZipDeleteItem revZipExtractItemToFile revZipExtractItemToVariable revZipSetProgressCallback revZipRenameItem revZipReplaceItemWithData revZipReplaceItemWithFile revZipOpenArchive send set sort split subtract union unload wait write"
},
c: [ t, {
cN: "keyword",
b: "\\bend\\sif\\b"
}, {
cN: "function",
bK: "function",
e: "$",
c: [ t, r, e.ASM, e.QSM, e.BNM, e.CNM, i ]
}, {
cN: "function",
bK: "end",
e: "$",
c: [ r, i ]
}, {
cN: "command",
bK: "command on",
e: "$",
c: [ t, r, e.ASM, e.QSM, e.BNM, e.CNM, i ]
}, {
cN: "command",
bK: "end",
e: "$",
c: [ r, i ]
}, {
cN: "preprocessor",
b: "<\\?rev|<\\?lc|<\\?livecode",
r: 10
}, {
cN: "preprocessor",
b: "<\\?"
}, {
cN: "preprocessor",
b: "\\?>"
}, n, e.ASM, e.QSM, e.BNM, e.CNM, i ],
i: ";$|^\\[|^="
};
}), hljs.registerLanguage("d", function(e) {
var t = {
keyword: "abstract alias align asm assert auto body break byte case cast catch class const continue debug default delete deprecated do else enum export extern final finally for foreach foreach_reverse|10 goto if immutable import in inout int interface invariant is lazy macro mixin module new nothrow out override package pragma private protected public pure ref return scope shared static struct super switch synchronized template this throw try typedef typeid typeof union unittest version void volatile while with __FILE__ __LINE__ __gshared|10 __thread __traits __DATE__ __EOF__ __TIME__ __TIMESTAMP__ __VENDOR__ __VERSION__",
built_in: "bool cdouble cent cfloat char creal dchar delegate double dstring float function idouble ifloat ireal long real short string ubyte ucent uint ulong ushort wchar wstring",
literal: "false null true"
}, n = "(0|[1-9][\\d_]*)", i = "(" + n + "|0[bB][01_]+|0[xX]([\\da-fA-F][\\da-fA-F_]*|_[\\da-fA-F][\\da-fA-F_]*))", r = "\\\\(['\"\\?\\\\abfnrtv]|u[\\dA-Fa-f]{4}|[0-7]{1,3}|x[\\dA-Fa-f]{2}|U[\\dA-Fa-f]{8})|&[a-zA-Z\\d]{2,};", o = {
cN: "number",
b: "\\b" + i + "(L|u|U|Lu|LU|uL|UL)?",
r: 0
}, a = {
cN: "number",
b: "\\b(((0[xX](([\\da-fA-F][\\da-fA-F_]*|_[\\da-fA-F][\\da-fA-F_]*)\\.([\\da-fA-F][\\da-fA-F_]*|_[\\da-fA-F][\\da-fA-F_]*)|\\.?([\\da-fA-F][\\da-fA-F_]*|_[\\da-fA-F][\\da-fA-F_]*))[pP][+-]?(0|[1-9][\\d_]*|\\d[\\d_]*|[\\d_]+?\\d))|((0|[1-9][\\d_]*|\\d[\\d_]*|[\\d_]+?\\d)(\\.\\d*|([eE][+-]?(0|[1-9][\\d_]*|\\d[\\d_]*|[\\d_]+?\\d)))|\\d+\\.(0|[1-9][\\d_]*|\\d[\\d_]*|[\\d_]+?\\d)(0|[1-9][\\d_]*|\\d[\\d_]*|[\\d_]+?\\d)|\\.(0|[1-9][\\d_]*)([eE][+-]?(0|[1-9][\\d_]*|\\d[\\d_]*|[\\d_]+?\\d))?))([fF]|L|i|[fF]i|Li)?|" + i + "(i|[fF]i|Li))",
r: 0
}, s = {
cN: "string",
b: "'(" + r + "|.)",
e: "'",
i: "."
}, l = {
b: r,
r: 0
}, c = {
cN: "string",
b: '"',
c: [ l ],
e: '"[cwd]?'
}, u = {
cN: "string",
b: '[rq]"',
e: '"[cwd]?',
r: 5
}, d = {
cN: "string",
b: "`",
e: "`[cwd]?"
}, p = {
cN: "string",
b: 'x"[\\da-fA-F\\s\\n\\r]*"[cwd]?',
r: 10
}, h = {
cN: "string",
b: 'q"\\{',
e: '\\}"'
}, f = {
cN: "shebang",
b: "^#!",
e: "$",
r: 5
}, m = {
cN: "preprocessor",
b: "#(line)",
e: "$",
r: 5
}, g = {
cN: "keyword",
b: "@[a-zA-Z_][a-zA-Z_\\d]*"
}, v = {
cN: "comment",
b: "\\/\\+",
c: [ "self" ],
e: "\\+\\/",
r: 10
};
return {
l: e.UIR,
k: t,
c: [ e.CLCM, e.CBLCLM, v, p, c, u, d, h, a, o, s, f, m, g ]
};
}), hljs.registerLanguage("vbnet", function(e) {
return {
cI: !0,
k: {
keyword: "addhandler addressof alias and andalso aggregate ansi as assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into is isfalse isnot istrue join key let lib like loop me mid mod module mustinherit mustoverride mybase myclass namespace narrowing new next not notinheritable notoverridable of off on operator option optional or order orelse overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim rem removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly xor",
built_in: "boolean byte cbool cbyte cchar cdate cdec cdbl char cint clng cobj csbyte cshort csng cstr ctype date decimal directcast double gettype getxmlnamespace iif integer long object sbyte short single string trycast typeof uinteger ulong ushort",
literal: "true false nothing"
},
i: "//|{|}|endif|gosub|variant|wend",
c: [ e.inherit(e.QSM, {
c: [ {
b: '""'
} ]
}), {
cN: "comment",
b: "'",
e: "$",
rB: !0,
c: [ {
cN: "xmlDocTag",
b: "'''|<!--|-->"
}, {
cN: "xmlDocTag",
b: "</?",
e: ">"
} ]
}, e.CNM, {
cN: "preprocessor",
b: "#",
e: "$",
k: "if else elseif end region externalsource"
} ]
};
}), hljs.registerLanguage("axapta", function(e) {
return {
k: "false int abstract private char boolean static null if for true while long throw finally protected final return void enum else break new catch byte super case short default double public try this switch continue reverse firstfast firstonly forupdate nofetch sum avg minof maxof count order group by asc desc index hint like dispaly edit client server ttsbegin ttscommit str real date container anytype common div mod",
c: [ e.CLCM, e.CBLCLM, e.ASM, e.QSM, e.CNM, {
cN: "preprocessor",
b: "#",
e: "$"
}, {
cN: "class",
bK: "class interface",
e: "{",
i: ":",
c: [ {
cN: "inheritance",
bK: "extends implements",
r: 10
}, e.UTM ]
} ]
};
}), hljs.registerLanguage("perl", function(e) {
var t = "getpwent getservent quotemeta msgrcv scalar kill dbmclose undef lc ma syswrite tr send umask sysopen shmwrite vec qx utime local oct semctl localtime readpipe do return format read sprintf dbmopen pop getpgrp not getpwnam rewinddir qqfileno qw endprotoent wait sethostent bless s|0 opendir continue each sleep endgrent shutdown dump chomp connect getsockname die socketpair close flock exists index shmgetsub for endpwent redo lstat msgctl setpgrp abs exit select print ref gethostbyaddr unshift fcntl syscall goto getnetbyaddr join gmtime symlink semget splice x|0 getpeername recv log setsockopt cos last reverse gethostbyname getgrnam study formline endhostent times chop length gethostent getnetent pack getprotoent getservbyname rand mkdir pos chmod y|0 substr endnetent printf next open msgsnd readdir use unlink getsockopt getpriority rindex wantarray hex system getservbyport endservent int chr untie rmdir prototype tell listen fork shmread ucfirst setprotoent else sysseek link getgrgid shmctl waitpid unpack getnetbyname reset chdir grep split require caller lcfirst until warn while values shift telldir getpwuid my getprotobynumber delete and sort uc defined srand accept package seekdir getprotobyname semop our rename seek if q|0 chroot sysread setpwent no crypt getc chown sqrt write setnetent setpriority foreach tie sin msgget map stat getlogin unless elsif truncate exec keys glob tied closedirioctl socket readlink eval xor readline binmode setservent eof ord bind alarm pipe atan2 getgrent exp time push setgrent gt lt or ne m|0 break given say state when", n = {
cN: "subst",
b: "[$@]\\{",
e: "\\}",
k: t
}, i = {
b: "->{",
e: "}"
}, r = {
cN: "variable",
v: [ {
b: /\$\d/
}, {
b: /[\$\%\@\*](\^\w\b|#\w+(\:\:\w+)*|{\w+}|\w+(\:\:\w*)*)/
}, {
b: /[\$\%\@\*][^\s\w{]/,
r: 0
} ]
}, o = {
cN: "comment",
b: "^(__END__|__DATA__)",
e: "\\n$",
r: 5
}, a = [ e.BE, n, r ], s = [ r, e.HCM, o, {
cN: "comment",
b: "^\\=\\w",
e: "\\=cut",
eW: !0
}, i, {
cN: "string",
c: a,
v: [ {
b: "q[qwxr]?\\s*\\(",
e: "\\)",
r: 5
}, {
b: "q[qwxr]?\\s*\\[",
e: "\\]",
r: 5
}, {
b: "q[qwxr]?\\s*\\{",
e: "\\}",
r: 5
}, {
b: "q[qwxr]?\\s*\\|",
e: "\\|",
r: 5
}, {
b: "q[qwxr]?\\s*\\<",
e: "\\>",
r: 5
}, {
b: "qw\\s+q",
e: "q",
r: 5
}, {
b: "'",
e: "'",
c: [ e.BE ]
}, {
b: '"',
e: '"'
}, {
b: "`",
e: "`",
c: [ e.BE ]
}, {
b: "{\\w+}",
c: [],
r: 0
}, {
b: "-?\\w+\\s*\\=\\>",
c: [],
r: 0
} ]
}, {
cN: "number",
b: "(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",
r: 0
}, {
b: "(\\/\\/|" + e.RSR + "|\\b(split|return|print|reverse|grep)\\b)\\s*",
k: "split return print reverse grep",
r: 0,
c: [ e.HCM, o, {
cN: "regexp",
b: "(s|tr|y)/(\\\\.|[^/])*/(\\\\.|[^/])*/[a-z]*",
r: 10
}, {
cN: "regexp",
b: "(m|qr)?/",
e: "/[a-z]*",
c: [ e.BE ],
r: 0
} ]
}, {
cN: "sub",
bK: "sub",
e: "(\\s*\\(.*?\\))?[;{]",
r: 5
}, {
cN: "operator",
b: "-\\w\\b",
r: 0
} ];
return n.c = s, i.c = s, {
k: t,
c: s
};
}), hljs.registerLanguage("scala", function(e) {
var t = {
cN: "annotation",
b: "@[A-Za-z]+"
}, n = {
cN: "string",
b: 'u?r?"""',
e: '"""',
r: 10
};
return {
k: "type yield lazy override def with val var false true sealed abstract private trait object null if for while throw finally protected extends import final return else break new catch super class case package default try this match continue throws",
c: [ {
cN: "javadoc",
b: "/\\*\\*",
e: "\\*/",
c: [ {
cN: "javadoctag",
b: "@[A-Za-z]+"
} ],
r: 10
}, e.CLCM, e.CBLCLM, n, e.ASM, e.QSM, {
cN: "class",
b: "((case )?class |object |trait )",
e: "({|$)",
i: ":",
k: "case class trait object",
c: [ {
bK: "extends with",
r: 10
}, e.UTM, {
cN: "params",
b: "\\(",
e: "\\)",
c: [ e.ASM, e.QSM, n, t ]
} ]
}, e.CNM, t ]
};
}), hljs.registerLanguage("cmake", function(e) {
return {
cI: !0,
k: {
keyword: "add_custom_command add_custom_target add_definitions add_dependencies add_executable add_library add_subdirectory add_test aux_source_directory break build_command cmake_minimum_required cmake_policy configure_file create_test_sourcelist define_property else elseif enable_language enable_testing endforeach endfunction endif endmacro endwhile execute_process export find_file find_library find_package find_path find_program fltk_wrap_ui foreach function get_cmake_property get_directory_property get_filename_component get_property get_source_file_property get_target_property get_test_property if include include_directories include_external_msproject include_regular_expression install link_directories load_cache load_command macro mark_as_advanced message option output_required_files project qt_wrap_cpp qt_wrap_ui remove_definitions return separate_arguments set set_directory_properties set_property set_source_files_properties set_target_properties set_tests_properties site_name source_group string target_link_libraries try_compile try_run unset variable_watch while build_name exec_program export_library_dependencies install_files install_programs install_targets link_libraries make_directory remove subdir_depends subdirs use_mangled_mesa utility_source variable_requires write_file qt5_use_modules qt5_use_package qt5_wrap_cpp on off true false and or",
operator: "equal less greater strless strgreater strequal matches"
},
c: [ {
cN: "envvar",
b: "\\${",
e: "}"
}, e.HCM, e.QSM, e.NM ]
};
}), hljs.registerLanguage("ocaml", function(e) {
return {
k: {
keyword: "and as assert asr begin class constraint do done downto else end exception external false for fun function functor if in include inherit initializer land lazy let lor lsl lsr lxor match method mod module mutable new object of open or private rec ref sig struct then to true try type val virtual when while with parser value",
built_in: "bool char float int list unit array exn option int32 int64 nativeint format4 format6 lazy_t in_channel out_channel string"
},
i: /\/\//,
c: [ {
cN: "string",
b: '"""',
e: '"""'
}, {
cN: "comment",
b: "\\(\\*",
e: "\\*\\)",
c: [ "self" ]
}, {
cN: "class",
bK: "type",
e: "\\(|=|$",
c: [ e.UTM ]
}, {
cN: "annotation",
b: "\\[<",
e: ">\\]"
}, e.CBLCLM, e.inherit(e.ASM, {
i: null
}), e.inherit(e.QSM, {
i: null
}), e.CNM ]
};
}), hljs.registerLanguage("autohotkey", function(e) {
var t = {
cN: "escape",
b: "`[\\s\\S]"
}, n = {
cN: "comment",
b: ";",
e: "$",
r: 0
};
return {
cI: !0,
k: {
keyword: "Break Continue Else Gosub If Loop Return While",
literal: "A true false NOT AND OR"
},
c: [ {
cN: "built_in",
b: "A_[a-zA-Z0-9]+"
}, {
cN: "built_in",
bK: "ComSpec Clipboard ClipboardAll ErrorLevel"
} ].concat([ t, e.inherit(e.QSM, {
c: [ t ]
}), n, {
cN: "number",
b: e.NR,
r: 0
}, {
cN: "var_expand",
b: "%",
e: "%",
i: "\\n",
c: [ t ]
}, {
cN: "label",
c: [ t ],
v: [ {
b: '^[^\\n";]+::(?!=)'
}, {
b: '^[^\\n";]+:(?!=)',
r: 0
} ]
}, {
b: ",\\s*,",
r: 10
} ])
};
}), hljs.registerLanguage("objectivec", function(e) {
var t = {
keyword: "int float while char export sizeof typedef const struct for union unsigned long volatile static bool mutable if do return goto void enum else break extern asm case short default double register explicit signed typename this switch continue wchar_t inline readonly assign self synchronized id nonatomic super unichar IBOutlet IBAction strong weak @private @protected @public @try @property @end @throw @catch @finally @synthesize @dynamic @selector @optional @required",
literal: "false true FALSE TRUE nil YES NO NULL",
built_in: "NSString NSDictionary CGRect CGPoint UIButton UILabel UITextView UIWebView MKMapView UISegmentedControl NSObject UITableViewDelegate UITableViewDataSource NSThread UIActivityIndicator UITabbar UIToolBar UIBarButtonItem UIImageView NSAutoreleasePool UITableView BOOL NSInteger CGFloat NSException NSLog NSMutableString NSMutableArray NSMutableDictionary NSURL NSIndexPath CGSize UITableViewCell UIView UIViewController UINavigationBar UINavigationController UITabBarController UIPopoverController UIPopoverControllerDelegate UIImage NSNumber UISearchBar NSFetchedResultsController NSFetchedResultsChangeType UIScrollView UIScrollViewDelegate UIEdgeInsets UIColor UIFont UIApplication NSNotFound NSNotificationCenter NSNotification UILocalNotification NSBundle NSFileManager NSTimeInterval NSDate NSCalendar NSUserDefaults UIWindow NSRange NSArray NSError NSURLRequest NSURLConnection UIInterfaceOrientation MPMoviePlayerController dispatch_once_t dispatch_queue_t dispatch_sync dispatch_async dispatch_once"
}, n = /[a-zA-Z@][a-zA-Z0-9_]*/, i = "@interface @class @protocol @implementation";
return {
k: t,
l: n,
i: "</",
c: [ e.CLCM, e.CBLCLM, e.CNM, e.QSM, {
cN: "string",
b: "'",
e: "[^\\\\]'",
i: "[^\\\\][^']"
}, {
cN: "preprocessor",
b: "#import",
e: "$",
c: [ {
cN: "title",
b: '"',
e: '"'
}, {
cN: "title",
b: "<",
e: ">"
} ]
}, {
cN: "preprocessor",
b: "#",
e: "$"
}, {
cN: "class",
b: "(" + i.split(" ").join("|") + ")\\b",
e: "({|$)",
k: i,
l: n,
c: [ e.UTM ]
}, {
cN: "variable",
b: "\\." + e.UIR,
r: 0
} ]
};
}), hljs.registerLanguage("avrasm", function(e) {
return {
cI: !0,
k: {
keyword: "adc add adiw and andi asr bclr bld brbc brbs brcc brcs break breq brge brhc brhs brid brie brlo brlt brmi brne brpl brsh brtc brts brvc brvs bset bst call cbi cbr clc clh cli cln clr cls clt clv clz com cp cpc cpi cpse dec eicall eijmp elpm eor fmul fmuls fmulsu icall ijmp in inc jmp ld ldd ldi lds lpm lsl lsr mov movw mul muls mulsu neg nop or ori out pop push rcall ret reti rjmp rol ror sbc sbr sbrc sbrs sec seh sbi sbci sbic sbis sbiw sei sen ser ses set sev sez sleep spm st std sts sub subi swap tst wdr",
built_in: "r0 r1 r2 r3 r4 r5 r6 r7 r8 r9 r10 r11 r12 r13 r14 r15 r16 r17 r18 r19 r20 r21 r22 r23 r24 r25 r26 r27 r28 r29 r30 r31 x|0 xh xl y|0 yh yl z|0 zh zl ucsr1c udr1 ucsr1a ucsr1b ubrr1l ubrr1h ucsr0c ubrr0h tccr3c tccr3a tccr3b tcnt3h tcnt3l ocr3ah ocr3al ocr3bh ocr3bl ocr3ch ocr3cl icr3h icr3l etimsk etifr tccr1c ocr1ch ocr1cl twcr twdr twar twsr twbr osccal xmcra xmcrb eicra spmcsr spmcr portg ddrg ping portf ddrf sreg sph spl xdiv rampz eicrb eimsk gimsk gicr eifr gifr timsk tifr mcucr mcucsr tccr0 tcnt0 ocr0 assr tccr1a tccr1b tcnt1h tcnt1l ocr1ah ocr1al ocr1bh ocr1bl icr1h icr1l tccr2 tcnt2 ocr2 ocdr wdtcr sfior eearh eearl eedr eecr porta ddra pina portb ddrb pinb portc ddrc pinc portd ddrd pind spdr spsr spcr udr0 ucsr0a ucsr0b ubrr0l acsr admux adcsr adch adcl porte ddre pine pinf"
},
c: [ e.CBLCLM, {
cN: "comment",
b: ";",
e: "$",
r: 0
}, e.CNM, e.BNM, {
cN: "number",
b: "\\b(\\$[a-zA-Z0-9]+|0o[0-7]+)"
}, e.QSM, {
cN: "string",
b: "'",
e: "[^\\\\]'",
i: "[^\\\\][^']"
}, {
cN: "label",
b: "^[A-Za-z0-9_.$]+:"
}, {
cN: "preprocessor",
b: "#",
e: "$"
}, {
cN: "preprocessor",
b: "\\.[a-zA-Z]+"
}, {
cN: "localvars",
b: "@[0-9]+"
} ]
};
}), hljs.registerLanguage("vhdl", function(e) {
return {
cI: !0,
k: {
keyword: "abs access after alias all and architecture array assert attribute begin block body buffer bus case component configuration constant context cover disconnect downto default else elsif end entity exit fairness file for force function generate generic group guarded if impure in inertial inout is label library linkage literal loop map mod nand new next nor not null of on open or others out package port postponed procedure process property protected pure range record register reject release rem report restrict restrict_guarantee return rol ror select sequence severity shared signal sla sll sra srl strong subtype then to transport type unaffected units until use variable vmode vprop vunit wait when while with xnor xor",
typename: "boolean bit character severity_level integer time delay_length natural positive string bit_vector file_open_kind file_open_status std_ulogic std_ulogic_vector std_logic std_logic_vector unsigned signed boolean_vector integer_vector real_vector time_vector"
},
i: "{",
c: [ e.CBLCLM, {
cN: "comment",
b: "--",
e: "$"
}, e.QSM, e.CNM, {
cN: "literal",
b: "'(U|X|0|1|Z|W|L|H|-)'",
c: [ e.BE ]
}, {
cN: "attribute",
b: "'[A-Za-z](_?[A-Za-z0-9])*",
c: [ e.BE ]
} ]
};
}), hljs.registerLanguage("coffeescript", function(e) {
var t = {
keyword: "in if for while finally new do return else break catch instanceof throw try this switch continue typeof delete debugger super then unless until loop of by when and or is isnt not",
literal: "true false null undefined yes no on off",
reserved: "case default function var void with const let enum export import native __hasProp __extends __slice __bind __indexOf",
built_in: "npm require console print module exports global window document"
}, n = "[A-Za-z$_][0-9A-Za-z$_]*", i = e.inherit(e.TM, {
b: n
}), r = {
cN: "subst",
b: /#\{/,
e: /}/,
k: t
}, o = [ e.BNM, e.inherit(e.CNM, {
starts: {
e: "(\\s*/)?",
r: 0
}
}), {
cN: "string",
v: [ {
b: /'''/,
e: /'''/,
c: [ e.BE ]
}, {
b: /'/,
e: /'/,
c: [ e.BE ]
}, {
b: /"""/,
e: /"""/,
c: [ e.BE, r ]
}, {
b: /"/,
e: /"/,
c: [ e.BE, r ]
} ]
}, {
cN: "regexp",
v: [ {
b: "///",
e: "///",
c: [ r, e.HCM ]
}, {
b: "//[gim]*",
r: 0
}, {
b: "/\\S(\\\\.|[^\\n])*?/[gim]*(?=\\s|\\W|$)"
} ]
}, {
cN: "property",
b: "@" + n
}, {
b: "`",
e: "`",
eB: !0,
eE: !0,
sL: "javascript"
} ];
return r.c = o, {
k: t,
c: o.concat([ {
cN: "comment",
b: "###",
e: "###"
}, e.HCM, {
cN: "function",
b: "(" + n + "\\s*=\\s*)?(\\(.*\\))?\\s*\\B[-=]>",
e: "[-=]>",
rB: !0,
c: [ i, {
cN: "params",
b: "\\(",
rB: !0,
c: [ {
b: /\(/,
e: /\)/,
k: t,
c: [ "self" ].concat(o)
} ]
} ]
}, {
cN: "class",
bK: "class",
e: "$",
i: /[:="\[\]]/,
c: [ {
bK: "extends",
eW: !0,
i: /[:="\[\]]/,
c: [ i ]
}, i ]
}, {
cN: "attribute",
b: n + ":",
e: ":",
rB: !0,
eE: !0,
r: 0
} ])
};
}), hljs.registerLanguage("mizar", function() {
return {
k: [ "environ vocabularies notations constructors definitions registrations theorems schemes requirements", "begin end definition registration cluster existence pred func defpred deffunc theorem proof", "let take assume then thus hence ex for st holds consider reconsider such that and in provided of as from", "be being by means equals implies iff redefine define now not or attr is mode suppose per cases set", "thesis contradiction scheme reserve struct", "correctness compatibility coherence symmetry assymetry reflexivity irreflexivity", "connectedness uniqueness commutativity idempotence involutiveness projectivity" ].join(" "),
c: [ {
cN: "comment",
b: "::",
e: "$"
} ]
};
}), hljs.registerLanguage("nginx", function(e) {
var t = {
cN: "variable",
v: [ {
b: /\$\d+/
}, {
b: /\$\{/,
e: /}/
}, {
b: "[\\$\\@]" + e.UIR
} ]
}, n = {
eW: !0,
l: "[a-z/_]+",
k: {
built_in: "on off yes no true false none blocked debug info notice warn error crit select break last permanent redirect kqueue rtsig epoll poll /dev/poll"
},
r: 0,
i: "=>",
c: [ e.HCM, {
cN: "string",
c: [ e.BE, t ],
v: [ {
b: /"/,
e: /"/
}, {
b: /'/,
e: /'/
} ]
}, {
cN: "url",
b: "([a-z]+):/",
e: "\\s",
eW: !0,
eE: !0
}, {
cN: "regexp",
c: [ e.BE, t ],
v: [ {
b: "\\s\\^",
e: "\\s|{|;",
rE: !0
}, {
b: "~\\*?\\s+",
e: "\\s|{|;",
rE: !0
}, {
b: "\\*(\\.[a-z\\-]+)+"
}, {
b: "([a-z\\-]+\\.)+\\*"
} ]
}, {
cN: "number",
b: "\\b\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(:\\d{1,5})?\\b"
}, {
cN: "number",
b: "\\b\\d+[kKmMgGdshdwy]*\\b",
r: 0
}, t ]
};
return {
c: [ e.HCM, {
b: e.UIR + "\\s",
e: ";|{",
rB: !0,
c: [ e.inherit(e.UTM, {
starts: n
}) ],
r: 0
} ],
i: "[^\\s\\}]"
};
}), hljs.registerLanguage("erlang-repl", function(e) {
return {
k: {
special_functions: "spawn spawn_link self",
reserved: "after and andalso|10 band begin bnot bor bsl bsr bxor case catch cond div end fun if let not of or orelse|10 query receive rem try when xor"
},
c: [ {
cN: "prompt",
b: "^[0-9]+> ",
r: 10
}, {
cN: "comment",
b: "%",
e: "$"
}, {
cN: "number",
b: "\\b(\\d+#[a-fA-F0-9]+|\\d+(\\.\\d+)?([eE][-+]?\\d+)?)",
r: 0
}, e.ASM, e.QSM, {
cN: "constant",
b: "\\?(::)?([A-Z]\\w*(::)?)+"
}, {
cN: "arrow",
b: "->"
}, {
cN: "ok",
b: "ok"
}, {
cN: "exclamation_mark",
b: "!"
}, {
cN: "function_or_atom",
b: "(\\b[a-z'][a-zA-Z0-9_']*:[a-z'][a-zA-Z0-9_']*)|(\\b[a-z'][a-zA-Z0-9_']*)",
r: 0
}, {
cN: "variable",
b: "[A-Z][a-zA-Z0-9_']*",
r: 0
} ]
};
}), hljs.registerLanguage("r", function(e) {
var t = "([a-zA-Z]|\\.[a-zA-Z.])[a-zA-Z0-9._]*";
return {
c: [ e.HCM, {
b: t,
l: t,
k: {
keyword: "function if in break next repeat else for return switch while try tryCatch|10 stop warning require library attach detach source setMethod setGeneric setGroupGeneric setClass ...|10",
literal: "NULL NA TRUE FALSE T F Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10"
},
r: 0
}, {
cN: "number",
b: "0[xX][0-9a-fA-F]+[Li]?\\b",
r: 0
}, {
cN: "number",
b: "\\d+(?:[eE][+\\-]?\\d*)?L\\b",
r: 0
}, {
cN: "number",
b: "\\d+\\.(?!\\d)(?:i\\b)?",
r: 0
}, {
cN: "number",
b: "\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d*)?i?\\b",
r: 0
}, {
cN: "number",
b: "\\.\\d+(?:[eE][+\\-]?\\d*)?i?\\b",
r: 0
}, {
b: "`",
e: "`",
r: 0
}, {
cN: "string",
c: [ e.BE ],
v: [ {
b: '"',
e: '"'
}, {
b: "'",
e: "'"
} ]
} ]
};
}), hljs.registerLanguage("json", function(e) {
var t = {
literal: "true false null"
}, n = [ e.QSM, e.CNM ], i = {
cN: "value",
e: ",",
eW: !0,
eE: !0,
c: n,
k: t
}, r = {
b: "{",
e: "}",
c: [ {
cN: "attribute",
b: '\\s*"',
e: '"\\s*:\\s*',
eB: !0,
eE: !0,
c: [ e.BE ],
i: "\\n",
starts: i
} ],
i: "\\S"
}, o = {
b: "\\[",
e: "\\]",
c: [ e.inherit(i, {
cN: null
}) ],
i: "\\S"
};
return n.splice(n.length, 0, r, o), {
c: n,
k: t,
i: "\\S"
};
}), hljs.registerLanguage("django", function() {
var e = {
cN: "filter",
b: /\|[A-Za-z]+\:?/,
k: "truncatewords removetags linebreaksbr yesno get_digit timesince random striptags filesizeformat escape linebreaks length_is ljust rjust cut urlize fix_ampersands title floatformat capfirst pprint divisibleby add make_list unordered_list urlencode timeuntil urlizetrunc wordcount stringformat linenumbers slice date dictsort dictsortreversed default_if_none pluralize lower join center default truncatewords_html upper length phone2numeric wordwrap time addslashes slugify first escapejs force_escape iriencode last safe safeseq truncatechars localize unlocalize localtime utc timezone",
c: [ {
cN: "argument",
b: /"/,
e: /"/
}, {
cN: "argument",
b: /'/,
e: /'/
} ]
};
return {
cI: !0,
sL: "xml",
subLanguageMode: "continuous",
c: [ {
cN: "template_comment",
b: /\{%\s*comment\s*%}/,
e: /\{%\s*endcomment\s*%}/
}, {
cN: "template_comment",
b: /\{#/,
e: /#}/
}, {
cN: "template_tag",
b: /\{%/,
e: /%}/,
k: "comment endcomment load templatetag ifchanged endifchanged if endif firstof for endfor in ifnotequal endifnotequal widthratio extends include spaceless endspaceless regroup by as ifequal endifequal ssi now with cycle url filter endfilter debug block endblock else autoescape endautoescape csrf_token empty elif endwith static trans blocktrans endblocktrans get_static_prefix get_media_prefix plural get_current_language language get_available_languages get_current_language_bidi get_language_info get_language_info_list localize endlocalize localtime endlocaltime timezone endtimezone get_current_timezone verbatim",
c: [ e ]
}, {
cN: "variable",
b: /\{\{/,
e: /}}/,
c: [ e ]
} ]
};
}), hljs.registerLanguage("delphi", function(e) {
var t = "exports register file shl array record property for mod while set ally label uses raise not stored class safecall var interface or private static exit index inherited to else stdcall override shr asm far resourcestring finalization packed virtual out and protected library do xorwrite goto near function end div overload object unit begin string on inline repeat until destructor write message program with read initialization except default nil if case cdecl in downto threadvar of try pascal const external constructor type public then implementation finally published procedure", n = {
cN: "comment",
v: [ {
b: /\{/,
e: /\}/,
r: 0
}, {
b: /\(\*/,
e: /\*\)/,
r: 10
} ]
}, i = {
cN: "string",
b: /'/,
e: /'/,
c: [ {
b: /''/
} ]
}, r = {
cN: "string",
b: /(#\d+)+/
}, o = {
b: e.IR + "\\s*=\\s*class\\s*\\(",
rB: !0,
c: [ e.TM ]
}, a = {
cN: "function",
bK: "function constructor destructor procedure",
e: /[:;]/,
k: "function constructor|10 destructor|10 procedure|10",
c: [ e.TM, {
cN: "params",
b: /\(/,
e: /\)/,
k: t,
c: [ i, r ]
}, n ]
};
return {
cI: !0,
k: t,
i: /("|\$[G-Zg-z]|\/\*|<\/)/,
c: [ n, e.CLCM, i, r, e.NM, o, a ]
};
}), hljs.registerLanguage("vbscript", function(e) {
return {
cI: !0,
k: {
keyword: "call class const dim do loop erase execute executeglobal exit for each next function if then else on error option explicit new private property let get public randomize redim rem select case set stop sub while wend with end to elseif is or xor and not class_initialize class_terminate default preserve in me byval byref step resume goto",
built_in: "lcase month vartype instrrev ubound setlocale getobject rgb getref string weekdayname rnd dateadd monthname now day minute isarray cbool round formatcurrency conversions csng timevalue second year space abs clng timeserial fixs len asc isempty maths dateserial atn timer isobject filter weekday datevalue ccur isdate instr datediff formatdatetime replace isnull right sgn array snumeric log cdbl hex chr lbound msgbox ucase getlocale cos cdate cbyte rtrim join hour oct typename trim strcomp int createobject loadpicture tan formatnumber mid scriptenginebuildversion scriptengine split scriptengineminorversion cint sin datepart ltrim sqr scriptenginemajorversion time derived eval date formatpercent exp inputbox left ascw chrw regexp server response request cstr err",
literal: "true false null nothing empty"
},
i: "//",
c: [ e.inherit(e.QSM, {
c: [ {
b: '""'
} ]
}), {
cN: "comment",
b: /'/,
e: /$/,
r: 0
}, e.CNM ]
};
}), hljs.registerLanguage("oxygene", function(e) {
var t = "abstract add and array as asc aspect assembly async begin break block by case class concat const copy constructor continue create default delegate desc distinct div do downto dynamic each else empty end ensure enum equals event except exit extension external false final finalize finalizer finally flags for forward from function future global group has if implementation implements implies in index inherited inline interface into invariants is iterator join locked locking loop matching method mod module namespace nested new nil not notify nullable of old on operator or order out override parallel params partial pinned private procedure property protected public queryable raise read readonly record reintroduce remove repeat require result reverse sealed select self sequence set shl shr skip static step soft take then to true try tuple type union unit unsafe until uses using var virtual raises volatile where while with write xor yield await mapped deprecated stdcall cdecl pascal register safecall overload library platform reference packed strict published autoreleasepool selector strong weak unretained", n = {
cN: "comment",
b: "{",
e: "}",
r: 0
}, i = {
cN: "comment",
b: "\\(\\*",
e: "\\*\\)",
r: 10
}, r = {
cN: "string",
b: "'",
e: "'",
c: [ {
b: "''"
} ]
}, o = {
cN: "string",
b: "(#\\d+)+"
}, a = {
cN: "function",
bK: "function constructor destructor procedure method",
e: "[:;]",
k: "function constructor|10 destructor|10 procedure|10 method|10",
c: [ e.TM, {
cN: "params",
b: "\\(",
e: "\\)",
k: t,
c: [ r, o ]
}, n, i ]
};
return {
cI: !0,
k: t,
i: '("|\\$[G-Zg-z]|\\/\\*|</)',
c: [ n, i, e.CLCM, r, o, e.NM, a, {
cN: "class",
b: "=\\bclass\\b",
e: "end;",
k: t,
c: [ r, o, n, i, e.CLCM, a ]
} ]
};
}), hljs.registerLanguage("mel", function(e) {
return {
k: "int float string vector matrix if else switch case default while do for in break continue global proc return about abs addAttr addAttributeEditorNodeHelp addDynamic addNewShelfTab addPP addPanelCategory addPrefixToName advanceToNextDrivenKey affectedNet affects aimConstraint air alias aliasAttr align alignCtx alignCurve alignSurface allViewFit ambientLight angle angleBetween animCone animCurveEditor animDisplay animView annotate appendStringArray applicationName applyAttrPreset applyTake arcLenDimContext arcLengthDimension arclen arrayMapper art3dPaintCtx artAttrCtx artAttrPaintVertexCtx artAttrSkinPaintCtx artAttrTool artBuildPaintMenu artFluidAttrCtx artPuttyCtx artSelectCtx artSetPaintCtx artUserPaintCtx assignCommand assignInputDevice assignViewportFactories attachCurve attachDeviceAttr attachSurface attrColorSliderGrp attrCompatibility attrControlGrp attrEnumOptionMenu attrEnumOptionMenuGrp attrFieldGrp attrFieldSliderGrp attrNavigationControlGrp attrPresetEditWin attributeExists attributeInfo attributeMenu attributeQuery autoKeyframe autoPlace bakeClip bakeFluidShading bakePartialHistory bakeResults bakeSimulation basename basenameEx batchRender bessel bevel bevelPlus binMembership bindSkin blend2 blendShape blendShapeEditor blendShapePanel blendTwoAttr blindDataType boneLattice boundary boxDollyCtx boxZoomCtx bufferCurve buildBookmarkMenu buildKeyframeMenu button buttonManip CBG cacheFile cacheFileCombine cacheFileMerge cacheFileTrack camera cameraView canCreateManip canvas capitalizeString catch catchQuiet ceil changeSubdivComponentDisplayLevel changeSubdivRegion channelBox character characterMap characterOutlineEditor characterize chdir checkBox checkBoxGrp checkDefaultRenderGlobals choice circle circularFillet clamp clear clearCache clip clipEditor clipEditorCurrentTimeCtx clipSchedule clipSchedulerOutliner clipTrimBefore closeCurve closeSurface cluster cmdFileOutput cmdScrollFieldExecuter cmdScrollFieldReporter cmdShell coarsenSubdivSelectionList collision color colorAtPoint colorEditor colorIndex colorIndexSliderGrp colorSliderButtonGrp colorSliderGrp columnLayout commandEcho commandLine commandPort compactHairSystem componentEditor compositingInterop computePolysetVolume condition cone confirmDialog connectAttr connectControl connectDynamic connectJoint connectionInfo constrain constrainValue constructionHistory container containsMultibyte contextInfo control convertFromOldLayers convertIffToPsd convertLightmap convertSolidTx convertTessellation convertUnit copyArray copyFlexor copyKey copySkinWeights cos cpButton cpCache cpClothSet cpCollision cpConstraint cpConvClothToMesh cpForces cpGetSolverAttr cpPanel cpProperty cpRigidCollisionFilter cpSeam cpSetEdit cpSetSolverAttr cpSolver cpSolverTypes cpTool cpUpdateClothUVs createDisplayLayer createDrawCtx createEditor createLayeredPsdFile createMotionField createNewShelf createNode createRenderLayer createSubdivRegion cross crossProduct ctxAbort ctxCompletion ctxEditMode ctxTraverse currentCtx currentTime currentTimeCtx currentUnit curve curveAddPtCtx curveCVCtx curveEPCtx curveEditorCtx curveIntersect curveMoveEPCtx curveOnSurface curveSketchCtx cutKey cycleCheck cylinder dagPose date defaultLightListCheckBox defaultNavigation defineDataServer defineVirtualDevice deformer deg_to_rad delete deleteAttr deleteShadingGroupsAndMaterials deleteShelfTab deleteUI deleteUnusedBrushes delrandstr detachCurve detachDeviceAttr detachSurface deviceEditor devicePanel dgInfo dgdirty dgeval dgtimer dimWhen directKeyCtx directionalLight dirmap dirname disable disconnectAttr disconnectJoint diskCache displacementToPoly displayAffected displayColor displayCull displayLevelOfDetail displayPref displayRGBColor displaySmoothness displayStats displayString displaySurface distanceDimContext distanceDimension doBlur dolly dollyCtx dopeSheetEditor dot dotProduct doubleProfileBirailSurface drag dragAttrContext draggerContext dropoffLocator duplicate duplicateCurve duplicateSurface dynCache dynControl dynExport dynExpression dynGlobals dynPaintEditor dynParticleCtx dynPref dynRelEdPanel dynRelEditor dynamicLoad editAttrLimits editDisplayLayerGlobals editDisplayLayerMembers editRenderLayerAdjustment editRenderLayerGlobals editRenderLayerMembers editor editorTemplate effector emit emitter enableDevice encodeString endString endsWith env equivalent equivalentTol erf error eval evalDeferred evalEcho event exactWorldBoundingBox exclusiveLightCheckBox exec executeForEachObject exists exp expression expressionEditorListen extendCurve extendSurface extrude fcheck fclose feof fflush fgetline fgetword file fileBrowserDialog fileDialog fileExtension fileInfo filetest filletCurve filter filterCurve filterExpand filterStudioImport findAllIntersections findAnimCurves findKeyframe findMenuItem findRelatedSkinCluster finder firstParentOf fitBspline flexor floatEq floatField floatFieldGrp floatScrollBar floatSlider floatSlider2 floatSliderButtonGrp floatSliderGrp floor flow fluidCacheInfo fluidEmitter fluidVoxelInfo flushUndo fmod fontDialog fopen formLayout format fprint frameLayout fread freeFormFillet frewind fromNativePath fwrite gamma gauss geometryConstraint getApplicationVersionAsFloat getAttr getClassification getDefaultBrush getFileList getFluidAttr getInputDeviceRange getMayaPanelTypes getModifiers getPanel getParticleAttr getPluginResource getenv getpid glRender glRenderEditor globalStitch gmatch goal gotoBindPose grabColor gradientControl gradientControlNoAttr graphDollyCtx graphSelectContext graphTrackCtx gravity grid gridLayout group groupObjectsByName HfAddAttractorToAS HfAssignAS HfBuildEqualMap HfBuildFurFiles HfBuildFurImages HfCancelAFR HfConnectASToHF HfCreateAttractor HfDeleteAS HfEditAS HfPerformCreateAS HfRemoveAttractorFromAS HfSelectAttached HfSelectAttractors HfUnAssignAS hardenPointCurve hardware hardwareRenderPanel headsUpDisplay headsUpMessage help helpLine hermite hide hilite hitTest hotBox hotkey hotkeyCheck hsv_to_rgb hudButton hudSlider hudSliderButton hwReflectionMap hwRender hwRenderLoad hyperGraph hyperPanel hyperShade hypot iconTextButton iconTextCheckBox iconTextRadioButton iconTextRadioCollection iconTextScrollList iconTextStaticLabel ikHandle ikHandleCtx ikHandleDisplayScale ikSolver ikSplineHandleCtx ikSystem ikSystemInfo ikfkDisplayMethod illustratorCurves image imfPlugins inheritTransform insertJoint insertJointCtx insertKeyCtx insertKnotCurve insertKnotSurface instance instanceable instancer intField intFieldGrp intScrollBar intSlider intSliderGrp interToUI internalVar intersect iprEngine isAnimCurve isConnected isDirty isParentOf isSameObject isTrue isValidObjectName isValidString isValidUiName isolateSelect itemFilter itemFilterAttr itemFilterRender itemFilterType joint jointCluster jointCtx jointDisplayScale jointLattice keyTangent keyframe keyframeOutliner keyframeRegionCurrentTimeCtx keyframeRegionDirectKeyCtx keyframeRegionDollyCtx keyframeRegionInsertKeyCtx keyframeRegionMoveKeyCtx keyframeRegionScaleKeyCtx keyframeRegionSelectKeyCtx keyframeRegionSetKeyCtx keyframeRegionTrackCtx keyframeStats lassoContext lattice latticeDeformKeyCtx launch launchImageEditor layerButton layeredShaderPort layeredTexturePort layout layoutDialog lightList lightListEditor lightListPanel lightlink lineIntersection linearPrecision linstep listAnimatable listAttr listCameras listConnections listDeviceAttachments listHistory listInputDeviceAxes listInputDeviceButtons listInputDevices listMenuAnnotation listNodeTypes listPanelCategories listRelatives listSets listTransforms listUnselected listerEditor loadFluid loadNewShelf loadPlugin loadPluginLanguageResources loadPrefObjects localizedPanelLabel lockNode loft log longNameOf lookThru ls lsThroughFilter lsType lsUI Mayatomr mag makeIdentity makeLive makePaintable makeRoll makeSingleSurface makeTubeOn makebot manipMoveContext manipMoveLimitsCtx manipOptions manipRotateContext manipRotateLimitsCtx manipScaleContext manipScaleLimitsCtx marker match max memory menu menuBarLayout menuEditor menuItem menuItemToShelf menuSet menuSetPref messageLine min minimizeApp mirrorJoint modelCurrentTimeCtx modelEditor modelPanel mouse movIn movOut move moveIKtoFK moveKeyCtx moveVertexAlongDirection multiProfileBirailSurface mute nParticle nameCommand nameField namespace namespaceInfo newPanelItems newton nodeCast nodeIconButton nodeOutliner nodePreset nodeType noise nonLinear normalConstraint normalize nurbsBoolean nurbsCopyUVSet nurbsCube nurbsEditUV nurbsPlane nurbsSelect nurbsSquare nurbsToPoly nurbsToPolygonsPref nurbsToSubdiv nurbsToSubdivPref nurbsUVSet nurbsViewDirectionVector objExists objectCenter objectLayer objectType objectTypeUI obsoleteProc oceanNurbsPreviewPlane offsetCurve offsetCurveOnSurface offsetSurface openGLExtension openMayaPref optionMenu optionMenuGrp optionVar orbit orbitCtx orientConstraint outlinerEditor outlinerPanel overrideModifier paintEffectsDisplay pairBlend palettePort paneLayout panel panelConfiguration panelHistory paramDimContext paramDimension paramLocator parent parentConstraint particle particleExists particleInstancer particleRenderInfo partition pasteKey pathAnimation pause pclose percent performanceOptions pfxstrokes pickWalk picture pixelMove planarSrf plane play playbackOptions playblast plugAttr plugNode pluginInfo pluginResourceUtil pointConstraint pointCurveConstraint pointLight pointMatrixMult pointOnCurve pointOnSurface pointPosition poleVectorConstraint polyAppend polyAppendFacetCtx polyAppendVertex polyAutoProjection polyAverageNormal polyAverageVertex polyBevel polyBlendColor polyBlindData polyBoolOp polyBridgeEdge polyCacheMonitor polyCheck polyChipOff polyClipboard polyCloseBorder polyCollapseEdge polyCollapseFacet polyColorBlindData polyColorDel polyColorPerVertex polyColorSet polyCompare polyCone polyCopyUV polyCrease polyCreaseCtx polyCreateFacet polyCreateFacetCtx polyCube polyCut polyCutCtx polyCylinder polyCylindricalProjection polyDelEdge polyDelFacet polyDelVertex polyDuplicateAndConnect polyDuplicateEdge polyEditUV polyEditUVShell polyEvaluate polyExtrudeEdge polyExtrudeFacet polyExtrudeVertex polyFlipEdge polyFlipUV polyForceUV polyGeoSampler polyHelix polyInfo polyInstallAction polyLayoutUV polyListComponentConversion polyMapCut polyMapDel polyMapSew polyMapSewMove polyMergeEdge polyMergeEdgeCtx polyMergeFacet polyMergeFacetCtx polyMergeUV polyMergeVertex polyMirrorFace polyMoveEdge polyMoveFacet polyMoveFacetUV polyMoveUV polyMoveVertex polyNormal polyNormalPerVertex polyNormalizeUV polyOptUvs polyOptions polyOutput polyPipe polyPlanarProjection polyPlane polyPlatonicSolid polyPoke polyPrimitive polyPrism polyProjection polyPyramid polyQuad polyQueryBlindData polyReduce polySelect polySelectConstraint polySelectConstraintMonitor polySelectCtx polySelectEditCtx polySeparate polySetToFaceNormal polySewEdge polyShortestPathCtx polySmooth polySoftEdge polySphere polySphericalProjection polySplit polySplitCtx polySplitEdge polySplitRing polySplitVertex polyStraightenUVBorder polySubdivideEdge polySubdivideFacet polyToSubdiv polyTorus polyTransfer polyTriangulate polyUVSet polyUnite polyWedgeFace popen popupMenu pose pow preloadRefEd print progressBar progressWindow projFileViewer projectCurve projectTangent projectionContext projectionManip promptDialog propModCtx propMove psdChannelOutliner psdEditTextureFile psdExport psdTextureFile putenv pwd python querySubdiv quit rad_to_deg radial radioButton radioButtonGrp radioCollection radioMenuItemCollection rampColorPort rand randomizeFollicles randstate rangeControl readTake rebuildCurve rebuildSurface recordAttr recordDevice redo reference referenceEdit referenceQuery refineSubdivSelectionList refresh refreshAE registerPluginResource rehash reloadImage removeJoint removeMultiInstance removePanelCategory rename renameAttr renameSelectionList renameUI render renderGlobalsNode renderInfo renderLayerButton renderLayerParent renderLayerPostProcess renderLayerUnparent renderManip renderPartition renderQualityNode renderSettings renderThumbnailUpdate renderWindowEditor renderWindowSelectContext renderer reorder reorderDeformers requires reroot resampleFluid resetAE resetPfxToPolyCamera resetTool resolutionNode retarget reverseCurve reverseSurface revolve rgb_to_hsv rigidBody rigidSolver roll rollCtx rootOf rot rotate rotationInterpolation roundConstantRadius rowColumnLayout rowLayout runTimeCommand runup sampleImage saveAllShelves saveAttrPreset saveFluid saveImage saveInitialState saveMenu savePrefObjects savePrefs saveShelf saveToolSettings scale scaleBrushBrightness scaleComponents scaleConstraint scaleKey scaleKeyCtx sceneEditor sceneUIReplacement scmh scriptCtx scriptEditorInfo scriptJob scriptNode scriptTable scriptToShelf scriptedPanel scriptedPanelType scrollField scrollLayout sculpt searchPathArray seed selLoadSettings select selectContext selectCurveCV selectKey selectKeyCtx selectKeyframeRegionCtx selectMode selectPref selectPriority selectType selectedNodes selectionConnection separator setAttr setAttrEnumResource setAttrMapping setAttrNiceNameResource setConstraintRestPosition setDefaultShadingGroup setDrivenKeyframe setDynamic setEditCtx setEditor setFluidAttr setFocus setInfinity setInputDeviceMapping setKeyCtx setKeyPath setKeyframe setKeyframeBlendshapeTargetWts setMenuMode setNodeNiceNameResource setNodeTypeFlag setParent setParticleAttr setPfxToPolyCamera setPluginResource setProject setStampDensity setStartupMessage setState setToolTo setUITemplate setXformManip sets shadingConnection shadingGeometryRelCtx shadingLightRelCtx shadingNetworkCompare shadingNode shapeCompare shelfButton shelfLayout shelfTabLayout shellField shortNameOf showHelp showHidden showManipCtx showSelectionInTitle showShadingGroupAttrEditor showWindow sign simplify sin singleProfileBirailSurface size sizeBytes skinCluster skinPercent smoothCurve smoothTangentSurface smoothstep snap2to2 snapKey snapMode snapTogetherCtx snapshot soft softMod softModCtx sort sound soundControl source spaceLocator sphere sphrand spotLight spotLightPreviewPort spreadSheetEditor spring sqrt squareSurface srtContext stackTrace startString startsWith stitchAndExplodeShell stitchSurface stitchSurfacePoints strcmp stringArrayCatenate stringArrayContains stringArrayCount stringArrayInsertAtIndex stringArrayIntersector stringArrayRemove stringArrayRemoveAtIndex stringArrayRemoveDuplicates stringArrayRemoveExact stringArrayToString stringToStringArray strip stripPrefixFromName stroke subdAutoProjection subdCleanTopology subdCollapse subdDuplicateAndConnect subdEditUV subdListComponentConversion subdMapCut subdMapSewMove subdMatchTopology subdMirror subdToBlind subdToPoly subdTransferUVsToCache subdiv subdivCrease subdivDisplaySmoothness substitute substituteAllString substituteGeometry substring surface surfaceSampler surfaceShaderList swatchDisplayPort switchTable symbolButton symbolCheckBox sysFile system tabLayout tan tangentConstraint texLatticeDeformContext texManipContext texMoveContext texMoveUVShellContext texRotateContext texScaleContext texSelectContext texSelectShortestPathCtx texSmudgeUVContext texWinToolCtx text textCurves textField textFieldButtonGrp textFieldGrp textManip textScrollList textToShelf textureDisplacePlane textureHairColor texturePlacementContext textureWindow threadCount threePointArcCtx timeControl timePort timerX toNativePath toggle toggleAxis toggleWindowVisibility tokenize tokenizeList tolerance tolower toolButton toolCollection toolDropped toolHasOptions toolPropertyWindow torus toupper trace track trackCtx transferAttributes transformCompare transformLimits translator trim trunc truncateFluidCache truncateHairCache tumble tumbleCtx turbulence twoPointArcCtx uiRes uiTemplate unassignInputDevice undo undoInfo ungroup uniform unit unloadPlugin untangleUV untitledFileName untrim upAxis updateAE userCtx uvLink uvSnapshot validateShelfName vectorize view2dToolCtx viewCamera viewClipPlane viewFit viewHeadOn viewLookAt viewManip viewPlace viewSet visor volumeAxis vortex waitCursor warning webBrowser webBrowserPrefs whatIs window windowPref wire wireContext workspace wrinkle wrinkleContext writeTake xbmLangPathList xform",
i: "</",
c: [ e.CNM, e.ASM, e.QSM, {
cN: "string",
b: "`",
e: "`",
c: [ e.BE ]
}, {
cN: "variable",
v: [ {
b: "\\$\\d"
}, {
b: "[\\$\\%\\@](\\^\\w\\b|#\\w+|[^\\s\\w{]|{\\w+}|\\w+)"
}, {
b: "\\*(\\^\\w\\b|#\\w+|[^\\s\\w{]|{\\w+}|\\w+)",
r: 0
} ]
}, e.CLCM, e.CBLCLM ]
};
}), hljs.registerLanguage("dos", function() {
return {
cI: !0,
k: {
flow: "if else goto for in do call exit not exist errorlevel defined equ neq lss leq gtr geq",
keyword: "shift cd dir echo setlocal endlocal set pause copy",
stream: "prn nul lpt3 lpt2 lpt1 con com4 com3 com2 com1 aux",
winutils: "ping net ipconfig taskkill xcopy ren del"
},
c: [ {
cN: "envvar",
b: "%%[^ ]"
}, {
cN: "envvar",
b: "%[^ ]+?%"
}, {
cN: "envvar",
b: "![^ ]+?!"
}, {
cN: "number",
b: "\\b\\d+",
r: 0
}, {
cN: "comment",
b: "@?rem",
e: "$"
} ]
};
}), hljs.registerLanguage("apache", function(e) {
var t = {
cN: "number",
b: "[\\$%]\\d+"
};
return {
cI: !0,
c: [ e.HCM, {
cN: "tag",
b: "</?",
e: ">"
}, {
cN: "keyword",
b: /\w+/,
r: 0,
k: {
common: "order deny allow setenv rewriterule rewriteengine rewritecond documentroot sethandler errordocument loadmodule options header listen serverroot servername"
},
starts: {
e: /$/,
r: 0,
k: {
literal: "on off all"
},
c: [ {
cN: "sqbracket",
b: "\\s\\[",
e: "\\]$"
}, {
cN: "cbracket",
b: "[\\$%]\\{",
e: "\\}",
c: [ "self", t ]
}, t, e.QSM ]
}
} ],
i: /\S/
};
}), hljs.registerLanguage("scss", function(e) {
var t = "[a-zA-Z-][a-zA-Z0-9_-]*", n = {
cN: "function",
b: t + "\\(",
e: "\\)",
c: [ "self", e.NM, e.ASM, e.QSM ]
}, i = {
cN: "hexcolor",
b: "#[0-9A-Fa-f]+"
};
return e.NM, e.QSM, e.ASM, e.CBLCLM, {
cI: !0,
i: "[=/|']",
c: [ e.CLCM, e.CBLCLM, {
cN: "function",
b: t + "\\(",
e: "\\)",
c: [ "self", e.NM, e.ASM, e.QSM ]
}, {
cN: "id",
b: "\\#[A-Za-z0-9_-]+",
r: 0
}, {
cN: "class",
b: "\\.[A-Za-z0-9_-]+",
r: 0
}, {
cN: "attr_selector",
b: "\\[",
e: "\\]",
i: "$"
}, {
cN: "tag",
b: "\\b(a|abbr|acronym|address|area|article|aside|audio|b|base|big|blockquote|body|br|button|canvas|caption|cite|code|col|colgroup|command|datalist|dd|del|details|dfn|div|dl|dt|em|embed|fieldset|figcaption|figure|footer|form|frame|frameset|(h[1-6])|head|header|hgroup|hr|html|i|iframe|img|input|ins|kbd|keygen|label|legend|li|link|map|mark|meta|meter|nav|noframes|noscript|object|ol|optgroup|option|output|p|param|pre|progress|q|rp|rt|ruby|samp|script|section|select|small|span|strike|strong|style|sub|sup|table|tbody|td|textarea|tfoot|th|thead|time|title|tr|tt|ul|var|video)\\b",
r: 0
}, {
cN: "pseudo",
b: ":(visited|valid|root|right|required|read-write|read-only|out-range|optional|only-of-type|only-child|nth-of-type|nth-last-of-type|nth-last-child|nth-child|not|link|left|last-of-type|last-child|lang|invalid|indeterminate|in-range|hover|focus|first-of-type|first-line|first-letter|first-child|first|enabled|empty|disabled|default|checked|before|after|active)"
}, {
cN: "pseudo",
b: "::(after|before|choices|first-letter|first-line|repeat-index|repeat-item|selection|value)"
}, {
cN: "attribute",
b: "\\b(z-index|word-wrap|word-spacing|word-break|width|widows|white-space|visibility|vertical-align|unicode-bidi|transition-timing-function|transition-property|transition-duration|transition-delay|transition|transform-style|transform-origin|transform|top|text-underline-position|text-transform|text-shadow|text-rendering|text-overflow|text-indent|text-decoration-style|text-decoration-line|text-decoration-color|text-decoration|text-align-last|text-align|tab-size|table-layout|right|resize|quotes|position|pointer-events|perspective-origin|perspective|page-break-inside|page-break-before|page-break-after|padding-top|padding-right|padding-left|padding-bottom|padding|overflow-y|overflow-x|overflow-wrap|overflow|outline-width|outline-style|outline-offset|outline-color|outline|orphans|order|opacity|object-position|object-fit|normal|none|nav-up|nav-right|nav-left|nav-index|nav-down|min-width|min-height|max-width|max-height|mask|marks|margin-top|margin-right|margin-left|margin-bottom|margin|list-style-type|list-style-position|list-style-image|list-style|line-height|letter-spacing|left|justify-content|initial|inherit|ime-mode|image-orientation|image-resolution|image-rendering|icon|hyphens|height|font-weight|font-variant-ligatures|font-variant|font-style|font-stretch|font-size-adjust|font-size|font-language-override|font-kerning|font-feature-settings|font-family|font|float|flex-wrap|flex-shrink|flex-grow|flex-flow|flex-direction|flex-basis|flex|filter|empty-cells|display|direction|cursor|counter-reset|counter-increment|content|column-width|column-span|column-rule-width|column-rule-style|column-rule-color|column-rule|column-gap|column-fill|column-count|columns|color|clip-path|clip|clear|caption-side|break-inside|break-before|break-after|box-sizing|box-shadow|box-decoration-break|bottom|border-width|border-top-width|border-top-style|border-top-right-radius|border-top-left-radius|border-top-color|border-top|border-style|border-spacing|border-right-width|border-right-style|border-right-color|border-right|border-radius|border-left-width|border-left-style|border-left-color|border-left|border-image-width|border-image-source|border-image-slice|border-image-repeat|border-image-outset|border-image|border-color|border-collapse|border-bottom-width|border-bottom-style|border-bottom-right-radius|border-bottom-left-radius|border-bottom-color|border-bottom|border|background-size|background-repeat|background-position|background-origin|background-image|background-color|background-clip|background-attachment|background|backface-visibility|auto|animation-timing-function|animation-play-state|animation-name|animation-iteration-count|animation-fill-mode|animation-duration|animation-direction|animation-delay|animation|align-self|align-items|align-content)\\b",
i: "[^\\s]"
}, {
cN: "value",
b: "\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"
}, {
cN: "value",
b: ":",
e: ";",
c: [ i, e.NM, e.QSM, e.ASM, {
cN: "important",
b: "!important"
} ]
}, {
cN: "at_rule",
b: "@",
e: "[{;]",
k: "mixin include extend for if else each while charset import debug media page content font-face namespace warn",
c: [ n, e.QSM, e.ASM, i, e.NM, {
cN: "preprocessor",
b: "\\s[A-Za-z0-9_.-]+",
r: 0
} ]
} ]
};
}), hljs.registerLanguage("applescript", function(e) {
var t = e.inherit(e.QSM, {
i: ""
}), n = {
cN: "params",
b: "\\(",
e: "\\)",
c: [ "self", e.CNM, t ]
}, i = [ {
cN: "comment",
b: "--",
e: "$"
}, {
cN: "comment",
b: "\\(\\*",
e: "\\*\\)",
c: [ "self", {
b: "--",
e: "$"
} ]
}, e.HCM ];
return {
k: {
keyword: "about above after against and around as at back before beginning behind below beneath beside between but by considering contain contains continue copy div does eighth else end equal equals error every exit fifth first for fourth from front get given global if ignoring in into is it its last local me middle mod my ninth not of on onto or over prop property put ref reference repeat returning script second set seventh since sixth some tell tenth that the then third through thru timeout times to transaction try until where while whose with without",
constant: "AppleScript false linefeed return pi quote result space tab true",
type: "alias application boolean class constant date file integer list number real record string text",
command: "activate beep count delay launch log offset read round run say summarize write",
property: "character characters contents day frontmost id item length month name paragraph paragraphs rest reverse running time version weekday word words year"
},
c: [ t, e.CNM, {
cN: "type",
b: "\\bPOSIX file\\b"
}, {
cN: "command",
b: "\\b(clipboard info|the clipboard|info for|list (disks|folder)|mount volume|path to|(close|open for) access|(get|set) eof|current date|do shell script|get volume settings|random number|set volume|system attribute|system info|time to GMT|(load|run|store) script|scripting components|ASCII (character|number)|localized string|choose (application|color|file|file name|folder|from list|remote application|URL)|display (alert|dialog))\\b|^\\s*return\\b"
}, {
cN: "constant",
b: "\\b(text item delimiters|current application|missing value)\\b"
}, {
cN: "keyword",
b: "\\b(apart from|aside from|instead of|out of|greater than|isn't|(doesn't|does not) (equal|come before|come after|contain)|(greater|less) than( or equal)?|(starts?|ends|begins?) with|contained by|comes (before|after)|a (ref|reference))\\b"
}, {
cN: "property",
b: "\\b(POSIX path|(date|time) string|quoted form)\\b"
}, {
cN: "function_start",
bK: "on",
i: "[${=;\\n]",
c: [ e.UTM, n ]
} ].concat(i),
i: "//"
};
}), hljs.registerLanguage("lasso", function(e) {
var t = "[a-zA-Z_][a-zA-Z0-9_.]*", n = "<\\?(lasso(script)?|=)", i = "\\]|\\?>", r = {
literal: "true false none minimal full all void and or not bw nbw ew new cn ncn lt lte gt gte eq neq rx nrx ft",
built_in: "array date decimal duration integer map pair string tag xml null bytes list queue set stack staticarray tie local var variable global data self inherited",
keyword: "error_code error_msg error_pop error_push error_reset cache database_names database_schemanames database_tablenames define_tag define_type email_batch encode_set html_comment handle handle_error header if inline iterate ljax_target link link_currentaction link_currentgroup link_currentrecord link_detail link_firstgroup link_firstrecord link_lastgroup link_lastrecord link_nextgroup link_nextrecord link_prevgroup link_prevrecord log loop namespace_using output_none portal private protect records referer referrer repeating resultset rows search_args search_arguments select sort_args sort_arguments thread_atomic value_list while abort case else if_empty if_false if_null if_true loop_abort loop_continue loop_count params params_up return return_value run_children soap_definetag soap_lastrequest soap_lastresponse tag_name ascending average by define descending do equals frozen group handle_failure import in into join let match max min on order parent protected provide public require returnhome skip split_thread sum take thread to trait type where with yield yieldhome"
}, o = {
cN: "comment",
b: "<!--",
e: "-->",
r: 0
}, a = {
cN: "preprocessor",
b: "\\[noprocess\\]",
starts: {
cN: "markup",
e: "\\[/noprocess\\]",
rE: !0,
c: [ o ]
}
}, s = {
cN: "preprocessor",
b: "\\[/noprocess|" + n
}, l = {
cN: "variable",
b: "'" + t + "'"
}, c = [ e.CLCM, {
cN: "javadoc",
b: "/\\*\\*!",
e: "\\*/"
}, e.CBLCLM, e.inherit(e.CNM, {
b: e.CNR + "|-?(infinity|nan)\\b"
}), e.inherit(e.ASM, {
i: null
}), e.inherit(e.QSM, {
i: null
}), {
cN: "string",
b: "`",
e: "`"
}, {
cN: "variable",
v: [ {
b: "[#$]" + t
}, {
b: "#",
e: "\\d+",
i: "\\W"
} ]
}, {
cN: "tag",
b: "::\\s*",
e: t,
i: "\\W"
}, {
cN: "attribute",
b: "\\.\\.\\.|-" + e.UIR
}, {
cN: "subst",
v: [ {
b: "->\\s*",
c: [ l ]
}, {
b: ":=|/(?!\\w)=?|[-+*%=<>&|!?\\\\]+",
r: 0
} ]
}, {
cN: "built_in",
b: "\\.\\.?",
r: 0,
c: [ l ]
}, {
cN: "class",
bK: "define",
rE: !0,
e: "\\(|=>",
c: [ e.inherit(e.TM, {
b: e.UIR + "(=(?!>))?"
}) ]
} ];
return {
aliases: [ "ls", "lassoscript" ],
cI: !0,
l: t + "|&[lg]t;",
k: r,
c: [ {
cN: "preprocessor",
b: i,
r: 0,
starts: {
cN: "markup",
e: "\\[|" + n,
rE: !0,
r: 0,
c: [ o ]
}
}, a, s, {
cN: "preprocessor",
b: "\\[no_square_brackets",
starts: {
e: "\\[/no_square_brackets\\]",
l: t + "|&[lg]t;",
k: r,
c: [ {
cN: "preprocessor",
b: i,
r: 0,
starts: {
cN: "markup",
e: n,
rE: !0,
c: [ o ]
}
}, a, s ].concat(c)
}
}, {
cN: "preprocessor",
b: "\\[",
r: 0
}, {
cN: "shebang",
b: "^#!.+lasso9\\b",
r: 10
} ].concat(c)
};
}), hljs.registerLanguage("cpp", function(e) {
var t = {
keyword: "false int float while private char catch export virtual operator sizeof dynamic_cast|10 typedef const_cast|10 const struct for static_cast|10 union namespace unsigned long throw volatile static protected bool template mutable if public friend do return goto auto void enum else break new extern using true class asm case typeid short reinterpret_cast|10 default double register explicit signed typename try this switch continue wchar_t inline delete alignof char16_t char32_t constexpr decltype noexcept nullptr static_assert thread_local restrict _Bool complex _Complex _Imaginary",
built_in: "std string cin cout cerr clog stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap array shared_ptr abort abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf"
};
return {
aliases: [ "c" ],
k: t,
i: "</",
c: [ e.CLCM, e.CBLCLM, e.QSM, {
cN: "string",
b: "'\\\\?.",
e: "'",
i: "."
}, {
cN: "number",
b: "\\b(\\d+(\\.\\d*)?|\\.\\d+)(u|U|l|L|ul|UL|f|F)"
}, e.CNM, {
cN: "preprocessor",
b: "#",
e: "$",
c: [ {
b: "include\\s*<",
e: ">",
i: "\\n"
}, e.CLCM ]
}, {
cN: "stl_container",
b: "\\b(deque|list|queue|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array)\\s*<",
e: ">",
k: t,
r: 10,
c: [ "self" ]
} ]
};
}), hljs.registerLanguage("matlab", function(e) {
var t = [ e.CNM, {
cN: "string",
b: "'",
e: "'",
c: [ e.BE, {
b: "''"
} ]
} ];
return {
k: {
keyword: "break case catch classdef continue else elseif end enumerated events for function global if methods otherwise parfor persistent properties return spmd switch try while",
built_in: "sin sind sinh asin asind asinh cos cosd cosh acos acosd acosh tan tand tanh atan atand atan2 atanh sec secd sech asec asecd asech csc cscd csch acsc acscd acsch cot cotd coth acot acotd acoth hypot exp expm1 log log1p log10 log2 pow2 realpow reallog realsqrt sqrt nthroot nextpow2 abs angle complex conj imag real unwrap isreal cplxpair fix floor ceil round mod rem sign airy besselj bessely besselh besseli besselk beta betainc betaln ellipj ellipke erf erfc erfcx erfinv expint gamma gammainc gammaln psi legendre cross dot factor isprime primes gcd lcm rat rats perms nchoosek factorial cart2sph cart2pol pol2cart sph2cart hsv2rgb rgb2hsv zeros ones eye repmat rand randn linspace logspace freqspace meshgrid accumarray size length ndims numel disp isempty isequal isequalwithequalnans cat reshape diag blkdiag tril triu fliplr flipud flipdim rot90 find sub2ind ind2sub bsxfun ndgrid permute ipermute shiftdim circshift squeeze isscalar isvector ans eps realmax realmin pi i inf nan isnan isinf isfinite j why compan gallery hadamard hankel hilb invhilb magic pascal rosser toeplitz vander wilkinson"
},
i: '(//|"|#|/\\*|\\s+/\\w+)',
c: [ {
cN: "function",
bK: "function",
e: "$",
c: [ e.UTM, {
cN: "params",
b: "\\(",
e: "\\)"
}, {
cN: "params",
b: "\\[",
e: "\\]"
} ]
}, {
cN: "transposed_variable",
b: "[a-zA-Z_][a-zA-Z_0-9]*('+[\\.']*|[\\.']+)",
e: "",
r: 0
}, {
cN: "matrix",
b: "\\[",
e: "\\]'*[\\.']*",
c: t,
r: 0
}, {
cN: "cell",
b: "\\{",
e: "\\}'*[\\.']*",
c: t,
i: /:/
}, {
cN: "comment",
b: "\\%",
e: "$"
} ].concat(t)
};
}), hljs.registerLanguage("scilab", function(e) {
var t = [ e.CNM, {
cN: "string",
b: "'|\"",
e: "'|\"",
c: [ e.BE, {
b: "''"
} ]
} ];
return {
k: {
keyword: "abort break case clear catch continue do elseif else endfunction end for functionglobal if pause return resume select try then while%f %F %t %T %pi %eps %inf %nan %e %i %z %s",
built_in: "abs and acos asin atan ceil cd chdir clearglobal cosh cos cumprod deff disp errorexec execstr exists exp eye gettext floor fprintf fread fsolve imag isdef isemptyisinfisnan isvector lasterror length load linspace list listfiles log10 log2 logmax min msprintf mclose mopen ones or pathconvert poly printf prod pwd rand realround sinh sin size gsort sprintf sqrt strcat strcmps tring sum system tanh tantype typename warning zeros matrix"
},
i: '("|#|/\\*|\\s+/\\w+)',
c: [ {
cN: "function",
bK: "function endfunction",
e: "$",
k: "function endfunction|10",
c: [ e.UTM, {
cN: "params",
b: "\\(",
e: "\\)"
} ]
}, {
cN: "transposed_variable",
b: "[a-zA-Z_][a-zA-Z_0-9]*('+[\\.']*|[\\.']+)",
e: "",
r: 0
}, {
cN: "matrix",
b: "\\[",
e: "\\]'*[\\.']*",
r: 0,
c: t
}, {
cN: "comment",
b: "//",
e: "$"
} ].concat(t)
};
}), hljs.registerLanguage("makefile", function(e) {
var t = {
cN: "variable",
b: /\$\(/,
e: /\)/,
c: [ e.BE ]
};
return {
c: [ e.HCM, {
b: /^\w+\s*\W*=/,
rB: !0,
r: 0,
starts: {
cN: "constant",
e: /\s*\W*=/,
eE: !0,
starts: {
e: /$/,
r: 0,
c: [ t ]
}
}
}, {
cN: "title",
b: /^[\w]+:\s*$/
}, {
cN: "phony",
b: /^\.PHONY:/,
e: /$/,
k: ".PHONY",
l: /[\.\w]+/
}, {
b: /^\t+/,
e: /$/,
c: [ e.QSM, t ]
} ]
};
}), hljs.registerLanguage("asciidoc", function() {
return {
c: [ {
cN: "comment",
b: "^/{4,}\\n",
e: "\\n/{4,}$",
r: 10
}, {
cN: "comment",
b: "^//",
e: "$",
r: 0
}, {
cN: "title",
b: "^\\.\\w.*$"
}, {
b: "^[=\\*]{4,}\\n",
e: "\\n^[=\\*]{4,}$",
r: 10
}, {
cN: "header",
b: "^(={1,5}) .+?( \\1)?$",
r: 10
}, {
cN: "header",
b: "^[^\\[\\]\\n]+?\\n[=\\-~\\^\\+]{2,}$",
r: 10
}, {
cN: "attribute",
b: "^:.+?:",
e: "\\s",
eE: !0,
r: 10
}, {
cN: "attribute",
b: "^\\[.+?\\]$",
r: 0
}, {
cN: "blockquote",
b: "^_{4,}\\n",
e: "\\n_{4,}$",
r: 10
}, {
cN: "code",
b: "^[\\-\\.]{4,}\\n",
e: "\\n[\\-\\.]{4,}$",
r: 10
}, {
b: "^\\+{4,}\\n",
e: "\\n\\+{4,}$",
c: [ {
b: "<",
e: ">",
sL: "xml",
r: 0
} ],
r: 10
}, {
cN: "bullet",
b: "^(\\*+|\\-+|\\.+|[^\\n]+?::)\\s+"
}, {
cN: "label",
b: "^(NOTE|TIP|IMPORTANT|WARNING|CAUTION):\\s+",
r: 10
}, {
cN: "strong",
b: "\\B\\*(?![\\*\\s])",
e: "(\\n{2}|\\*)",
c: [ {
b: "\\\\*\\w",
r: 0
} ]
}, {
cN: "emphasis",
b: "\\B'(?!['\\s])",
e: "(\\n{2}|')",
c: [ {
b: "\\\\'\\w",
r: 0
} ],
r: 0
}, {
cN: "emphasis",
b: "_(?![_\\s])",
e: "(\\n{2}|_)",
r: 0
}, {
cN: "smartquote",
b: "``.+?''",
r: 10
}, {
cN: "smartquote",
b: "`.+?'",
r: 10
}, {
cN: "code",
b: "(`.+?`|\\+.+?\\+)",
r: 0
}, {
cN: "code",
b: "^[ \\t]",
e: "$",
r: 0
}, {
cN: "horizontal_rule",
b: "^'{3,}[ \\t]*$",
r: 10
}, {
b: "(link:)?(http|https|ftp|file|irc|image:?):\\S+\\[.*?\\]",
rB: !0,
c: [ {
b: "(link|image:?):",
r: 0
}, {
cN: "link_url",
b: "\\w",
e: "[^\\[]+",
r: 0
}, {
cN: "link_label",
b: "\\[",
e: "\\]",
eB: !0,
eE: !0,
r: 0
} ],
r: 10
} ]
};
}), hljs.registerLanguage("parser3", function(e) {
return {
sL: "xml",
r: 0,
c: [ {
cN: "comment",
b: "^#",
e: "$"
}, {
cN: "comment",
b: "\\^rem{",
e: "}",
r: 10,
c: [ {
b: "{",
e: "}",
c: [ "self" ]
} ]
}, {
cN: "preprocessor",
b: "^@(?:BASE|USE|CLASS|OPTIONS)$",
r: 10
}, {
cN: "title",
b: "@[\\w\\-]+\\[[\\w^;\\-]*\\](?:\\[[\\w^;\\-]*\\])?(?:.*)$"
}, {
cN: "variable",
b: "\\$\\{?[\\w\\-\\.\\:]+\\}?"
}, {
cN: "keyword",
b: "\\^[\\w\\-\\.\\:]+"
}, {
cN: "number",
b: "\\^#[0-9a-fA-F]+"
}, e.CNM ]
};
}), hljs.registerLanguage("clojure", function(e) {
var t = {
built_in: "def cond apply if-not if-let if not not= = &lt; < > &lt;= <= >= == + / * - rem quot neg? pos? delay? symbol? keyword? true? false? integer? empty? coll? list? set? ifn? fn? associative? sequential? sorted? counted? reversible? number? decimal? class? distinct? isa? float? rational? reduced? ratio? odd? even? char? seq? vector? string? map? nil? contains? zero? instance? not-every? not-any? libspec? -> ->> .. . inc compare do dotimes mapcat take remove take-while drop letfn drop-last take-last drop-while while intern condp case reduced cycle split-at split-with repeat replicate iterate range merge zipmap declare line-seq sort comparator sort-by dorun doall nthnext nthrest partition eval doseq await await-for let agent atom send send-off release-pending-sends add-watch mapv filterv remove-watch agent-error restart-agent set-error-handler error-handler set-error-mode! error-mode shutdown-agents quote var fn loop recur throw try monitor-enter monitor-exit defmacro defn defn- macroexpand macroexpand-1 for dosync and or when when-not when-let comp juxt partial sequence memoize constantly complement identity assert peek pop doto proxy defstruct first rest cons defprotocol cast coll deftype defrecord last butlast sigs reify second ffirst fnext nfirst nnext defmulti defmethod meta with-meta ns in-ns create-ns import refer keys select-keys vals key val rseq name namespace promise into transient persistent! conj! assoc! dissoc! pop! disj! use class type num float double short byte boolean bigint biginteger bigdec print-method print-dup throw-if printf format load compile get-in update-in pr pr-on newline flush read slurp read-line subvec with-open memfn time re-find re-groups rand-int rand mod locking assert-valid-fdecl alias resolve ref deref refset swap! reset! set-validator! compare-and-set! alter-meta! reset-meta! commute get-validator alter ref-set ref-history-count ref-min-history ref-max-history ensure sync io! new next conj set! to-array future future-call into-array aset gen-class reduce map filter find empty hash-map hash-set sorted-map sorted-map-by sorted-set sorted-set-by vec vector seq flatten reverse assoc dissoc list disj get union difference intersection extend extend-type extend-protocol int nth delay count concat chunk chunk-buffer chunk-append chunk-first chunk-rest max min dec unchecked-inc-int unchecked-inc unchecked-dec-inc unchecked-dec unchecked-negate unchecked-add-int unchecked-add unchecked-subtract-int unchecked-subtract chunk-next chunk-cons chunked-seq? prn vary-meta lazy-seq spread list* str find-keyword keyword symbol gensym force rationalize"
}, n = "[a-zA-Z_0-9\\!\\.\\?\\-\\+\\*\\/\\<\\=\\>\\&\\#\\$';]+", i = {
cN: "number",
b: "[\\s:\\(\\{]+\\d+(\\.\\d+)?",
r: 0
}, r = e.inherit(e.QSM, {
i: null
}), o = {
cN: "comment",
b: ";",
e: "$",
r: 0
}, a = {
cN: "collection",
b: "[\\[\\{]",
e: "[\\]\\}]"
}, s = {
cN: "comment",
b: "\\^" + n
}, l = {
cN: "comment",
b: "\\^\\{",
e: "\\}"
}, c = {
cN: "attribute",
b: "[:]" + n
}, u = {
cN: "list",
b: "\\(",
e: "\\)"
}, d = {
eW: !0,
k: {
literal: "true false nil"
},
r: 0
}, p = {
k: t,
l: n,
cN: "title",
b: n,
starts: d
};
return u.c = [ {
cN: "comment",
b: "comment"
}, p, d ], d.c = [ u, r, s, l, o, c, a, i ], a.c = [ u, r, s, o, c, a, i ], {
i: /\S/,
c: [ o, u, {
cN: "prompt",
b: /^=> /,
starts: {
e: /\n\n|\Z/
}
} ]
};
}), hljs.registerLanguage("go", function(e) {
return {
aliases: [ "golang" ],
k: {
keyword: "break default func interface select case map struct chan else goto package switch const fallthrough if range type continue for import return var go defer",
constant: "true false iota nil",
typename: "bool byte complex64 complex128 float32 float64 int8 int16 int32 int64 string uint8 uint16 uint32 uint64 int uint uintptr rune",
built_in: "append cap close complex copy imag len make new panic print println real recover delete"
},
i: "</",
c: [ e.CLCM, e.CBLCLM, e.QSM, {
cN: "string",
b: "'",
e: "[^\\\\]'"
}, {
cN: "string",
b: "`",
e: "`"
}, {
cN: "number",
b: "[^a-zA-Z_0-9](\\-|\\+)?\\d+(\\.\\d+|\\/\\d+)?((d|e|f|l|s)(\\+|\\-)?\\d+)?",
r: 0
}, e.CNM ]
};
}), define("highlightjs", function(e) {
return function() {
return e.hljs;
};
}(this));
var Markdown;
if (Markdown = "object" == typeof exports && "function" == typeof require ? exports : {},
function() {
function e(e) {
return e;
}
function t() {
return !1;
}
function n() {}
function i() {}
n.prototype = {
chain: function(t, n) {
var i = this[t];
if (!i) throw new Error("unknown hook " + t);
this[t] = i === e ? n : function() {
var e = Array.prototype.slice.call(arguments, 0);
return e[0] = i.apply(null, e), n.apply(null, e);
};
},
set: function(e, t) {
if (!this[e]) throw new Error("unknown hook " + e);
this[e] = t;
},
addNoop: function(t) {
this[t] = e;
},
addFalse: function(e) {
this[e] = t;
}
}, Markdown.HookCollection = n, i.prototype = {
set: function(e, t) {
this["s_" + e] = t;
},
get: function(e) {
return this["s_" + e];
}
}, Markdown.Converter = function() {
function e(e) {
return e = e.replace(/^[ ]{0,3}\[(.+)\]:[ \t]*\n?[ \t]*<?(\S+?)>?(?=\s|$)[ \t]*\n?[ \t]*((\n*)["(](.+?)[")][ \t]*)?(?:\n+)/gm, function(e, t, n, i, r, o) {
return t = t.toLowerCase(), P.set(t, C(n)), r ? i : (o && O.set(t, o.replace(/"/g, "&quot;")),
"");
});
}
function t(e) {
return e = e.replace(/^(<(p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math|ins|del)\b[^\r]*?\n<\/\2>[ \t]*(?=\n+))/gm, r),
e = e.replace(/^(<(p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math)\b[^\r]*?<\/\2>[ \t]*(?=\n+)\n)/gm, r),
e = e.replace(/\n[ ]{0,3}((<(hr)\b([^<>])*?\/?>)[ \t]*(?=\n{2,}))/g, r), e = e.replace(/\n\n[ ]{0,3}(<!(--(?:|(?:[^>-]|-[^>])(?:[^-]|-[^-])*)--)>[ \t]*(?=\n{2,}))/g, r),
e = e.replace(/(?:\n\n)([ ]{0,3}(?:<([?%])[^\r]*?\2>)[ \t]*(?=\n{2,}))/g, r);
}
function r(e, t) {
var n = t;
return n = n.replace(/^\n+/, ""), n = n.replace(/\n+$/g, ""), n = "\n\n~K" + (F.push(n) - 1) + "K\n\n";
}
function o(e, n) {
return e = R.preBlockGamut(e, j), e = h(e), e = e.replace(/^[ ]{0,2}([ ]?\*[ ]?){3,}[ \t]*$/gm, "<hr />\n"),
e = e.replace(/^[ ]{0,2}([ ]?-[ ]?){3,}[ \t]*$/gm, "<hr />\n"), e = e.replace(/^[ ]{0,2}([ ]?_[ ]?){3,}[ \t]*$/gm, "<hr />\n"),
e = f(e), e = g(e), e = w(e), e = R.postBlockGamut(e, j), e = t(e), e = S(e, n);
}
function a(e) {
return e = R.preSpanGamut(e), e = b(e), e = s(e), e = _(e), e = u(e), e = l(e),
e = E(e), e = e.replace(/~P/g, "://"), e = C(e), e = A._DoItalicsAndBold ? A._DoItalicsAndBold(e) : x(e),
e = e.replace(/ +\n/g, " <br>\n"), e = R.postSpanGamut(e);
}
function s(e) {
var t = /(<[a-z\/!$]("[^"]*"|'[^']*'|[^'">])*>|<!(--(?:|(?:[^>-]|-[^>])(?:[^-]|-[^-])*)--)>)/gi;
return e = e.replace(t, function(e) {
var t = e.replace(/(.)<\/?code>(?=.)/g, "$1`");
return t = M(t, "!" == e.charAt(1) ? "\\`*_/" : "\\`*_");
});
}
function l(e) {
return e = e.replace(/(\[((?:\[[^\]]*\]|[^\[\]])*)\][ ]?(?:\n[ ]*)?\[(.*?)\])()()()()/g, c),
e = e.replace(/(\[((?:\[[^\]]*\]|[^\[\]])*)\]\([ \t]*()<?((?:\([^)]*\)|[^()\s])*?)>?[ \t]*((['"])(.*?)\6[ \t]*)?\))/g, c),
e = e.replace(/(\[([^\[\]]+)\])()()()()()/g, c);
}
function c(e, t, n, i, r, o, a, s) {
void 0 == s && (s = "");
var l = t, c = n.replace(/:\/\//g, "~P"), u = i.toLowerCase(), p = r, h = s;
if ("" == p) if ("" == u && (u = c.toLowerCase().replace(/ ?\n/g, " ")), p = "#" + u,
void 0 != P.get(u)) p = P.get(u), void 0 != O.get(u) && (h = O.get(u)); else {
if (!(l.search(/\(\s*\)$/m) > -1)) return l;
p = "";
}
p = N(p), p = M(p, "*_");
var f = '<a href="' + p + '"';
return "" != h && (h = d(h), h = M(h, "*_"), f += ' title="' + h + '"'), f += ">" + c + "</a>";
}
function u(e) {
return e = e.replace(/(!\[(.*?)\][ ]?(?:\n[ ]*)?\[(.*?)\])()()()()/g, p), e = e.replace(/(!\[(.*?)\]\s?\([ \t]*()<?(\S+?)>?[ \t]*((['"])(.*?)\6[ \t]*)?\))/g, p);
}
function d(e) {
return e.replace(/>/g, "&gt;").replace(/</g, "&lt;").replace(/"/g, "&quot;");
}
function p(e, t, n, i, r, o, a, s) {
var l = t, c = n, u = i.toLowerCase(), p = r, h = s;
if (h || (h = ""), "" == p) {
if ("" == u && (u = c.toLowerCase().replace(/ ?\n/g, " ")), p = "#" + u, void 0 == P.get(u)) return l;
p = P.get(u), void 0 != O.get(u) && (h = O.get(u));
}
c = M(d(c), "*_[]()"), p = M(p, "*_");
var f = '<img src="' + p + '" alt="' + c + '"';
return h = d(h), h = M(h, "*_"), f += ' title="' + h + '"', f += " />";
}
function h(e) {
return e = e.replace(/^(.+)[ \t]*\n=+[ \t]*\n+/gm, function(e, t) {
return "<h1>" + a(t) + "</h1>\n\n";
}), e = e.replace(/^(.+)[ \t]*\n-+[ \t]*\n+/gm, function(e, t) {
return "<h2>" + a(t) + "</h2>\n\n";
}), e = e.replace(/^(\#{1,6})[ \t]*(.+?)[ \t]*\#*\n+/gm, function(e, t, n) {
var i = t.length;
return "<h" + i + ">" + a(n) + "</h" + i + ">\n\n";
});
}
function f(e, t) {
e += "~0";
var n = /^(([ ]{0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(~0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm;
return B ? e = e.replace(n, function(e, n, i) {
var r = n, o = i.search(/[*+-]/g) > -1 ? "ul" : "ol", a = m(r, o, t);
return a = a.replace(/\s+$/, ""), a = "<" + o + ">" + a + "</" + o + ">\n";
}) : (n = /(\n\n|^\n?)(([ ]{0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(~0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/g,
e = e.replace(n, function(e, t, n, i) {
var r = t, o = n, a = i.search(/[*+-]/g) > -1 ? "ul" : "ol", s = m(o, a);
return s = r + "<" + a + ">\n" + s + "</" + a + ">\n";
})), e = e.replace(/~0/, "");
}
function m(e, t, n) {
B++, e = e.replace(/\n{2,}$/, "\n"), e += "~0";
var i = $[t], r = new RegExp("(^[ \\t]*)(" + i + ")[ \\t]+([^\\r]+?(\\n+))(?=(~0|\\1(" + i + ")[ \\t]+))", "gm"), s = !1;
return e = e.replace(r, function(e, t, i, r) {
var l = r, c = /\n\n$/.test(l);
return c || l.search(/\n{2,}/) > -1 || s ? l = o(I(l), !0) : (l = f(I(l), !0), l = l.replace(/\n$/, ""),
n || (l = a(l))), s = c, "<li>" + l + "</li>\n";
}), e = e.replace(/~0/g, ""), B--, e;
}
function g(e) {
return e += "~0", e = e.replace(/(?:\n\n|^\n?)((?:(?:[ ]{4}|\t).*\n+)+)(\n*[ ]{0,3}[^ \t\n]|(?=~0))/g, function(e, t, n) {
var i = t, r = n;
return i = y(I(i)), i = D(i), i = i.replace(/^\n+/g, ""), i = i.replace(/\n+$/g, ""),
"\n\n" + (i = "<pre><code>" + i + "\n</code></pre>") + "\n\n" + r;
}), e = e.replace(/~0/, "");
}
function v(e) {
return e = e.replace(/(^\n+|\n+$)/g, ""), "\n\n~K" + (F.push(e) - 1) + "K\n\n";
}
function b(e) {
return e = e.replace(/(^|[^\\])(`+)([^\r]*?[^`])\2(?!`)/gm, function(e, t, n, i) {
var r = i;
return r = r.replace(/^([ \t]*)/g, ""), r = r.replace(/[ \t]*$/g, ""), r = y(r),
r = r.replace(/:\/\//g, "~P"), t + "<code>" + r + "</code>";
});
}
function y(e) {
return e = e.replace(/&/g, "&amp;"), e = e.replace(/</g, "&lt;"), e = e.replace(/>/g, "&gt;"),
e = M(e, "*_{}[]\\", !1);
}
function x(e) {
return e = e.replace(/([\W_]|^)(\*\*|__)(?=\S)([^\r]*?\S[\*_]*)\2([\W_]|$)/g, "$1<strong>$3</strong>$4"),
e = e.replace(/([\W_]|^)(\*|_)(?=\S)([^\r\*_]*?\S)\2([\W_]|$)/g, "$1<em>$3</em>$4");
}
function w(e) {
return e = e.replace(/((^[ \t]*>[ \t]?.+\n(.+\n)*\n*)+)/gm, function(e, t) {
var n = t;
return n = n.replace(/^[ \t]*>[ \t]?/gm, "~0"), n = n.replace(/~0/g, ""), n = n.replace(/^[ \t]+$/gm, ""),
n = o(n), n = n.replace(/(^|\n)/g, "$1 "), n = n.replace(/(\s*<pre>[^\r]+?<\/pre>)/gm, function(e, t) {
var n = t;
return n = n.replace(/^ /gm, "~0"), n = n.replace(/~0/g, "");
}), v("<blockquote>\n" + n + "\n</blockquote>");
});
}
function S(e, t) {
e = e.replace(/^\n+/g, ""), e = e.replace(/\n+$/g, "");
for (var n = e.split(/\n{2,}/g), i = [], r = /~K(\d+)K/, o = n.length, s = 0; o > s; s++) {
var l = n[s];
r.test(l) ? i.push(l) : /\S/.test(l) && (l = a(l), l = l.replace(/^([ \t]*)/g, "<p>"),
l += "</p>", i.push(l));
}
if (!t) {
o = i.length;
for (var s = 0; o > s; s++) for (var c = !0; c; ) c = !1, i[s] = i[s].replace(/~K(\d+)K/g, function(e, t) {
return c = !0, F[t];
});
}
return i.join("\n\n");
}
function C(e) {
return e = e.replace(/&(?!#?[xX]?(?:[0-9a-fA-F]+|\w+);)/g, "&amp;"), e = e.replace(/<(?![a-z\/?!]|~D)/gi, "&lt;");
}
function _(e) {
return e = e.replace(/\\(\\)/g, L), e = e.replace(/\\([`*_{}\[\]()>#+-.!])/g, L);
}
function k(e, t, n, i) {
if (t) return e;
if (")" !== i.charAt(i.length - 1)) return "<" + n + i + ">";
for (var r = i.match(/[()]/g), o = 0, a = 0; a < r.length; a++) "(" === r[a] ? 0 >= o ? o = 1 : o++ : o--;
var s = "";
if (0 > o) {
var l = new RegExp("\\){1," + -o + "}$");
i = i.replace(l, function(e) {
return s = e, "";
});
}
if (s) {
var c = i.charAt(i.length - 1);
q.test(c) || (s = c + s, i = i.substr(0, i.length - 1));
}
return "<" + n + i + ">" + s;
}
function E(e) {
e = e.replace(G, k);
var t = function(e, t) {
return '<a href="' + t + '">' + R.plainLinkText(t) + "</a>";
};
return e = e.replace(/<((https?|ftp):[^'">\s]+)>/gi, t);
}
function T(e) {
return e = e.replace(/~E(\d+)E/g, function(e, t) {
var n = parseInt(t);
return String.fromCharCode(n);
});
}
function I(e) {
return e = e.replace(/^(\t|[ ]{1,4})/gm, "~0"), e = e.replace(/~0/g, "");
}
function D(e) {
if (!/\t/.test(e)) return e;
var t, n = [ " ", " ", " ", " " ], i = 0;
return e.replace(/[\n\t]/g, function(e, r) {
return "\n" === e ? (i = r + 1, e) : (t = (r - i) % 4, i = r + 1, n[t]);
});
}
function N(e) {
return e ? (e.length, e.replace(H, function(e) {
return "~D" == e ? "%24" : ":" == e ? ":" : "%" + e.charCodeAt(0).toString(16);
})) : "";
}
function M(e, t, n) {
var i = "([" + t.replace(/([\[\]\\])/g, "\\$1") + "])";
n && (i = "\\\\" + i);
var r = new RegExp(i, "g");
return e = e.replace(r, L);
}
function L(e, t) {
return "~E" + t.charCodeAt(0) + "E";
}
var A = {};
this.setOptions = function(e) {
A = e;
};
var R = this.hooks = new n();
R.addNoop("plainLinkText"), R.addNoop("preConversion"), R.addNoop("postNormalization"),
R.addNoop("preBlockGamut"), R.addNoop("postBlockGamut"), R.addNoop("preSpanGamut"),
R.addNoop("postSpanGamut"), R.addNoop("postConversion");
var P, O, F, B;
this.makeHtml = function(n) {
if (P) throw new Error("Recursive call to converter.makeHtml");
return P = new i(), O = new i(), F = [], B = 0, n = R.preConversion(n), n = n.replace(/~/g, "~T"),
n = n.replace(/\$/g, "~D"), n = n.replace(/\r\n/g, "\n"), n = n.replace(/\r/g, "\n"),
n = "\n\n" + n + "\n\n", n = D(n), n = n.replace(/^[ \t]+$/gm, ""), n = R.postNormalization(n),
n = t(n), n = e(n), n = o(n), n = T(n), n = n.replace(/~D/g, "$$"), n = n.replace(/~T/g, "~"),
n = R.postConversion(n), F = O = P = null, n;
};
var j = function(e) {
return o(e);
}, $ = {
ol: "\\d+[.]",
ul: "[*+-]"
}, G = new RegExp('(="|<)?\\b(https?|ftp)(://[-A-Z0-9+&@#/%?=~_|[\\]()!:,.;]*[-A-Z0-9+&@#/%=~_|[\\])])(?=$|\\W)', "gi"), q = new RegExp("[-A-Z0-9+&@#/%=~_|[\\])]", "i"), H = /(?:["'*()[\]:]|~D)/g;
};
}(), define("libs/Markdown.Converter", function() {}), function() {
function e(e) {
return e.replace(/^\s+|\s+$/g, "");
}
function t(e) {
return e.replace(/\s+$/g, "");
}
function n(e) {
return e.replace(new RegExp("^(\\t|[ ]{1,4})", "gm"), "");
}
function i(e, t) {
return -1 != e.indexOf(t);
}
function r(e, t) {
return e.replace(/<[^>]*>?/gi, function(e) {
return e.match(t) ? e : "";
});
}
function o(e, t) {
for (var n = {}, i = 0; i < e.length; i++) n[e[i]] = e[i];
for (i = 0; i < t.length; i++) n[t[i]] = t[i];
var r = [];
for (var o in n) n.hasOwnProperty(o) && r.push(n[o]);
return r;
}
function a(e) {
return "" != e.charAt(0) && (e = "" + e), "" != e.charAt(e.length - 1) && (e += ""),
e;
}
function s(e) {
return "" == e.charAt(0) && (e = e.substr(1)), "" == e.charAt(e.length - 1) && (e = e.substr(0, e.length - 1)),
e;
}
function l(e, t) {
return r(c(e, t), m);
}
function c(e, t) {
var n = t.blockGamutHookCallback(e);
return n = p(n), n = n.replace(/~D/g, "$$").replace(/~T/g, "~"), n = t.previousPostConversion(n);
}
function u(e) {
return e.replace(/\\\|/g, "~I").replace(/\\:/g, "~i");
}
function d(e) {
return e.replace(/~I/g, "|").replace(/~i/g, ":");
}
function p(e) {
return e = e.replace(/~E(\d+)E/g, function(e, t) {
var n = parseInt(t);
return String.fromCharCode(n);
});
}
function h(e) {
return e.toLowerCase().replace(/\s+/g, "-").replace(/[^\w\-]+/g, "").replace(/\-\-+/g, "-").replace(/^-+/, "").replace(/-+$/, "");
}
function f(e, t) {
var n = t;
return n = n.replace(/&\#8220;/g, '"'), n = n.replace(/&\#8221;/g, '"'), n = n.replace(/&\#8216;/g, "'"),
n = n.replace(/&\#8217;/g, "'"), n = n.replace(/&\#8212;/g, "---"), n = n.replace(/&\#8211;/g, "--"),
n = n.replace(/&\#8230;/g, "...");
}
var m = new RegExp([ "^(<\\/?(a|abbr|acronym|applet|area|b|basefont|", "bdo|big|button|cite|code|del|dfn|em|figcaption|", "font|i|iframe|img|input|ins|kbd|label|map|", "mark|meter|object|param|progress|q|ruby|rp|rt|s|", "samp|script|select|small|span|strike|strong|", "sub|sup|textarea|time|tt|u|var|wbr)[^>]*>|", "<(br)\\s?\\/?>)$" ].join(""), "i");
Array.indexOf || (Array.prototype.indexOf = function(e) {
for (var t = 0; t < this.length; t++) if (this[t] == e) return t;
return -1;
}), Markdown.Extra = function() {
this.converter = null, this.hashBlocks = [], this.footnotes = {}, this.usedFootnotes = [],
this.attributeBlocks = !1, this.googleCodePrettify = !1, this.highlightJs = !1,
this.tableClass = "", this.tabWidth = 4;
}, Markdown.Extra.init = function(e, t) {
var n = new Markdown.Extra(), r = [], o = [], a = [], s = [ "unHashExtraBlocks" ];
return t = t || {}, t.extensions = t.extensions || [ "all" ], i(t.extensions, "all") && (t.extensions = [ "tables", "fenced_code_gfm", "def_list", "attr_list", "footnotes", "smartypants", "strikethrough", "newlines" ]),
o.push("wrapHeaders"), i(t.extensions, "attr_list") && (r.push("hashFcbAttributeBlocks"),
o.push("hashHeaderAttributeBlocks"), s.push("applyAttributeBlocks"), n.attributeBlocks = !0),
i(t.extensions, "fenced_code_gfm") && (o.push("fencedCodeBlocks"), r.push("fencedCodeBlocks")),
i(t.extensions, "tables") && o.push("tables"), i(t.extensions, "def_list") && o.push("definitionLists"),
i(t.extensions, "footnotes") && (r.push("stripFootnoteDefinitions"), o.push("doFootnotes"),
s.push("printFootnotes")), i(t.extensions, "smartypants") && s.push("runSmartyPants"),
i(t.extensions, "strikethrough") && a.push("strikethrough"), i(t.extensions, "newlines") && a.push("newlines"),
e.hooks.chain("postNormalization", function(e) {
return n.doTransform(r, e) + "\n";
}), e.hooks.chain("preBlockGamut", function(e, t) {
return n.blockGamutHookCallback = t, e = u(e), e = n.doTransform(o, e) + "\n", e = d(e);
}), e.hooks.chain("postSpanGamut", function(e) {
return n.doTransform(a, e);
}), n.previousPostConversion = e.hooks.postConversion, e.hooks.chain("postConversion", function(e) {
return e = n.doTransform(s, e), n.hashBlocks = [], n.footnotes = {}, n.usedFootnotes = [],
e;
}), "highlighter" in t && (n.googleCodePrettify = "prettify" === t.highlighter,
n.highlightJs = "highlight" === t.highlighter), "table_class" in t && (n.tableClass = t.table_class),
n.converter = e, n;
}, Markdown.Extra.prototype.doTransform = function(e, t) {
for (var n = 0; n < e.length; n++) t = this[e[n]](t);
return t;
}, Markdown.Extra.prototype.hashExtraBlock = function(e) {
return "\n<p>~X" + (this.hashBlocks.push(e) - 1) + "X</p>\n";
}, Markdown.Extra.prototype.hashExtraInline = function(e) {
return "~X" + (this.hashBlocks.push(e) - 1) + "X";
}, Markdown.Extra.prototype.unHashExtraBlocks = function(e) {
function t() {
var i = !1;
e = e.replace(/(?:<p>)?~X(\d+)X(?:<\/p>)?/g, function(e, t) {
i = !0;
var r = parseInt(t, 10);
return n.hashBlocks[r];
}), !0 === i && t();
}
var n = this;
return t(), e;
}, Markdown.Extra.prototype.wrapHeaders = function(e) {
function t(e) {
return "\n" + e + "\n";
}
return e = e.replace(/^.+[ \t]*\n=+[ \t]*\n+/gm, t), e = e.replace(/^.+[ \t]*\n-+[ \t]*\n+/gm, t),
e = e.replace(/^\#{1,6}[ \t]*.+?[ \t]*\#*\n+/gm, t);
};
var g = "\\{[ \\t]*((?:[#.][-_:a-zA-Z0-9]+[ \\t]*)+)\\}", v = new RegExp("^(#{1,6}.*#{0,6})[ \\t]+" + g + "[ \\t]*(?:\\n|0x03)", "gm"), b = new RegExp("^(.*)[ \\t]+" + g + "[ \\t]*\\n(?=[\\-|=]+\\s*(?:\\n|0x03))", "gm"), y = new RegExp("^(```[^`\\n]*)[ \\t]+" + g + "[ \\t]*\\n(?=([\\s\\S]*?)\\n```[ \\t]*(\\n|0x03))", "gm");
Markdown.Extra.prototype.hashHeaderAttributeBlocks = function(e) {
function t(e, t, i) {
return "<p>~XX" + (n.hashBlocks.push(i) - 1) + "XX</p>\n" + t + "\n";
}
var n = this;
return e = e.replace(v, t), e = e.replace(b, t);
}, Markdown.Extra.prototype.hashFcbAttributeBlocks = function(e) {
function t(e, t, i) {
return "<p>~XX" + (n.hashBlocks.push(i) - 1) + "XX</p>\n" + t + "\n";
}
var n = this;
return e.replace(y, t);
}, Markdown.Extra.prototype.applyAttributeBlocks = function(e) {
var t = this, n = new RegExp('<p>~XX(\\d+)XX</p>[\\s]*(?:<(h[1-6]|pre)(?: +class="(\\S+)")?(>[\\s\\S]*?</\\2>))', "gm");
return e = e.replace(n, function(e, n, i, r, a) {
if (!i) return "";
for (var s = parseInt(n, 10), l = t.hashBlocks[s], c = l.match(/#[^\s#.]+/g) || [], u = c[0] ? ' id="' + c[0].substr(1, c[0].length - 1) + '"' : "", d = l.match(/\.[^\s#.]+/g) || [], p = 0; p < d.length; p++) d[p] = d[p].substr(1, d[p].length - 1);
var h = "";
return r && (d = o(d, [ r ])), d.length > 0 && (h = ' class="' + d.join(" ") + '"'),
"<" + i + u + h + a;
});
}, Markdown.Extra.prototype.tables = function(t) {
function n(t, n, r, o) {
n = n.replace(/^ *[|]/m, ""), r = r.replace(/^ *[|]/m, ""), o = o.replace(/^ *[|]/gm, ""),
n = n.replace(/[|] *$/m, ""), r = r.replace(/[|] *$/m, ""), o = o.replace(/[|] *$/gm, ""),
alignspecs = r.split(/ *[|] */), align = [];
for (var a = 0; a < alignspecs.length; a++) {
var s = alignspecs[a];
align[a] = s.match(/^ *-+: *$/m) ? ' align="right"' : s.match(/^ *:-+: *$/m) ? ' align="center"' : s.match(/^ *:-+ *$/m) ? ' align="left"' : "";
}
var c = n.split(/ *[|] */), u = c.length, d = i.tableClass ? ' class="' + i.tableClass + '"' : "", p = [ "<table", d, ">\n", "<thead>\n", "<tr>\n" ].join("");
for (a = 0; u > a; a++) {
var h = l(e(c[a]), i);
p += [ " <th", align[a], ">", h, "</th>\n" ].join("");
}
p += "</tr>\n</thead>\n";
var f = o.split("\n");
for (a = 0; a < f.length; a++) if (!f[a].match(/^\s*$/)) {
for (var m = f[a].split(/ *[|] */), g = u - m.length, v = 0; g > v; v++) m.push("");
for (p += "<tr>\n", v = 0; u > v; v++) {
var b = l(e(m[v]), i);
p += [ " <td", align[v], ">", b, "</td>\n" ].join("");
}
p += "</tr>\n";
}
return p += "</table>\n", i.hashExtraBlock(p);
}
var i = this, r = new RegExp([ "^", "[ ]{0,3}", "[|]", "(.+)\\n", "[ ]{0,3}", "[|]([ ]*[-:]+[-| :]*)\\n", "(", "(?:[ ]*[|].*\\n?)*", ")", "(?:\\n|$)" ].join(""), "gm"), o = new RegExp([ "^", "[ ]{0,3}", "(\\S.*[|].*)\\n", "[ ]{0,3}", "([-:]+[ ]*[|][-| :]*)\\n", "(", "(?:.*[|].*\\n?)*", ")", "(?:\\n|$)" ].join(""), "gm");
return t = t.replace(r, n), t = t.replace(o, n);
}, Markdown.Extra.prototype.stripFootnoteDefinitions = function(e) {
var t = this;
return e = e.replace(/\n[ ]{0,3}\[\^(.+?)\]\:[ \t]*\n?([\s\S]*?)\n{1,2}((?=\n[ ]{0,3}\S)|$)/g, function(e, n, i) {
return n = h(n), i += "\n", i = i.replace(/^[ ]{0,3}/g, ""), t.footnotes[n] = i,
"\n";
});
}, Markdown.Extra.prototype.doFootnotes = function(e) {
var t = this;
if (!0 === t.isConvertingFootnote) return e;
var n = 0;
return e = e.replace(/\[\^(.+?)\]/g, function(e, i) {
var r = h(i);
if (void 0 === t.footnotes[r]) return e;
n++, t.usedFootnotes.push(r);
var o = '<a href="#fn:' + r + '" id="fnref:' + r + '" title="See footnote" class="footnote">' + n + "</a>";
return t.hashExtraInline(o);
});
}, Markdown.Extra.prototype.printFootnotes = function(e) {
var t = this;
if (0 === t.usedFootnotes.length) return e;
e += '\n\n<div class="footnotes">\n<hr>\n<ol>\n\n';
for (var n = 0; n < t.usedFootnotes.length; n++) {
var i = t.usedFootnotes[n], r = t.footnotes[i];
t.isConvertingFootnote = !0;
var o = l(r, t);
delete t.isConvertingFootnote, e += '<li id="fn:' + i + '">' + o + ' <a href="#fnref:' + i + '" title="Return to article" class="reversefootnote">&#8617;</a></li>\n\n';
}
return e += "</ol>\n</div>";
}, Markdown.Extra.prototype.fencedCodeBlocks = function(t) {
function n(e) {
return e = e.replace(/&/g, "&amp;"), e = e.replace(/</g, "&lt;"), e = e.replace(/>/g, "&gt;"),
e = e.replace(/~D/g, "$$"), e = e.replace(/~T/g, "~");
}
var i = this;
return t = t.replace(/(?:^|\n)```([^`\n]*)\n([\s\S]*?)\n```[ \t]*(?=\n)/g, function(t, r, o) {
var a = e(r), s = o, l = i.googleCodePrettify ? ' class="prettyprint"' : "", c = "";
a && (c = i.googleCodePrettify || i.highlightJs ? ' class="language-' + a + '"' : ' class="' + a + '"');
var u = [ "<pre", l, "><code", c, ">", n(s), "</code></pre>" ].join("");
return i.hashExtraBlock(u);
});
}, Markdown.Extra.prototype.educatePants = function(e) {
var t = this, n = "", i = 0;
e.replace(/(?:<!--[\s\S]*?-->)|(<)([a-zA-Z1-6]+)([^\n]*?>)([\s\S]*?)(<\/\2>)/g, function(r, o, a, s, l, c, u) {
var d = e.substring(i, u);
return n += t.applyPants(d), t.smartyPantsLastChar = n.substring(n.length - 1),
i = u + r.length, o ? (/code|kbd|pre|script|noscript|iframe|math|ins|del|pre/i.test(a) ? t.smartyPantsLastChar = l.substring(l.length - 1) : l = t.educatePants(l),
void (n += o + a + s + l + c)) : void (n += r);
});
var r = e.substring(i);
return n += t.applyPants(r), t.smartyPantsLastChar = n.substring(n.length - 1),
n;
}, Markdown.Extra.prototype.applyPants = function(e) {
return e = e.replace(/---/g, "&#8212;").replace(/--/g, "&#8211;"), e = e.replace(/\.\.\./g, "&#8230;").replace(/\.\s\.\s\./g, "&#8230;"),
e = e.replace(/``/g, "&#8220;").replace(/''/g, "&#8221;"), /^'$/.test(e) ? /\S/.test(this.smartyPantsLastChar) ? "&#8217;" : "&#8216;" : /^"$/.test(e) ? /\S/.test(this.smartyPantsLastChar) ? "&#8221;" : "&#8220;" : (e = e.replace(/^'(?=[!"#\$\%'()*+,\-.\/:;<=>?\@\[\\]\^_`{|}~]\B)/, "&#8217;"),
e = e.replace(/^"(?=[!"#\$\%'()*+,\-.\/:;<=>?\@\[\\]\^_`{|}~]\B)/, "&#8221;"), e = e.replace(/"'(?=\w)/g, "&#8220;&#8216;"),
e = e.replace(/'"(?=\w)/g, "&#8216;&#8220;"), e = e.replace(/'(?=\d{2}s)/g, "&#8217;"),
e = e.replace(/(\s|&nbsp;|--|&[mn]dash;|&\#8211;|&\#8212;|&\#x201[34];)'(?=\w)/g, "$1&#8216;"),
e = e.replace(/([^\s\[\{\(\-])'/g, "$1&#8217;"), e = e.replace(/'(?=\s|s\b)/g, "&#8217;"),
e = e.replace(/'/g, "&#8216;"), e = e.replace(/(\s|&nbsp;|--|&[mn]dash;|&\#8211;|&\#8212;|&\#x201[34];)"(?=\w)/g, "$1&#8220;"),
e = e.replace(/([^\s\[\{\(\-])"/g, "$1&#8221;"), e = e.replace(/"(?=\s)/g, "&#8221;"),
e = e.replace(/"/gi, "&#8220;"));
}, Markdown.Extra.prototype.runSmartyPants = function(e) {
return this.smartyPantsLastChar = "", e = this.educatePants(e), e = e.replace(/(<([a-zA-Z1-6]+)\b([^\n>]*?)(\/)?>)/g, f);
}, Markdown.Extra.prototype.definitionLists = function(t) {
var n = new RegExp([ "(\\x02\\n?|\\n\\n)", "(?:", "(", "(", "[ ]{0,3}", "((?:[ \\t]*\\S.*\\n)+)", "\\n?", "[ ]{0,3}:[ ]+", ")", "([\\s\\S]+?)", "(", "(?=\\0x03)", "|", "(?=", "\\n{2,}", "(?=\\S)", "(?!", "[ ]{0,3}", "(?:\\S.*\\n)+?", "\\n?", "[ ]{0,3}:[ ]+", ")", "(?!", "[ ]{0,3}:[ ]+", ")", ")", ")", ")", ")" ].join(""), "gm"), i = this;
return t = a(t), t = t.replace(n, function(t, n, r) {
var o = e(i.processDefListItems(r));
return o = "<dl>\n" + o + "\n</dl>", n + i.hashExtraBlock(o) + "\n\n";
}), s(t);
}, Markdown.Extra.prototype.processDefListItems = function(i) {
var r = this, o = new RegExp([ "(\\x02\\n?|\\n\\n+)", "(", "[ ]{0,3}", "(?![:][ ]|[ ])", "(?:\\S.*\\n)+?", ")", "(?=\\n?[ ]{0,3}:[ ])" ].join(""), "gm"), u = new RegExp([ "\\n(\\n+)?", "(", "[ ]{0,3}", "[:][ ]+", ")", "([\\s\\S]+?)", "(?=\\n*", "(?:", "\\n[ ]{0,3}[:][ ]|", "<dt>|\\x03", ")", ")" ].join(""), "gm");
return i = a(i), i = i.replace(/\n{2,}(?=\\x03)/, "\n"), i = i.replace(o, function(t, n, i) {
for (var o = e(i).split("\n"), a = "", s = 0; s < o.length; s++) {
var c = o[s];
c = l(e(c), r), a += "\n<dt>" + c + "</dt>";
}
return a + "\n";
}), i = i.replace(u, function(e, i, o, a) {
return i || a.match(/\n{2,}/) ? (a = Array(o.length + 1).join(" ") + a, a = n(a) + "\n\n",
a = "\n" + c(a, r) + "\n") : (a = t(a), a = l(n(a), r)), "\n<dd>" + a + "</dd>\n";
}), s(i);
}, Markdown.Extra.prototype.strikethrough = function(e) {
return e.replace(/([\W_]|^)~T~T(?=\S)([^\r]*?\S[\*_]*)~T~T([\W_]|$)/g, "$1<del>$2</del>$3");
}, Markdown.Extra.prototype.newlines = function(e) {
return e.replace(/(<(?:br|\/li)>)?\n/g, function(e, t) {
return t ? e : " <br>\n";
});
};
}(), define("pagedownExtra", [ "libs/Markdown.Converter" ], function() {}), define("extensions/markdownExtra", [ "jquery", "underscore", "utils", "logger", "classes/Extension", "text!html/markdownExtraSettingsBlock.html", "google-code-prettify", "highlightjs", "crel", "pagedownExtra" ], function(e, t, n, i, r, o, a, s) {
var l = new r("markdownExtra", "Markdown Extra", !0);
l.settingsBlock = o, l.defaultConfig = {
extensions: [ "fenced_code_gfm", "tables", "def_list", "attr_list", "footnotes", "smartypants", "strikethrough", "newlines" ],
intraword: !0,
comments: !0,
highlighter: "highlight"
}, l.onLoadSettings = function() {
function e(e) {
return t.some(l.config.extensions, function(t) {
return t == e;
});
}
n.setInputChecked("#input-markdownextra-fencedcodegfm", e("fenced_code_gfm")), n.setInputChecked("#input-markdownextra-tables", e("tables")),
n.setInputChecked("#input-markdownextra-deflist", e("def_list")), n.setInputChecked("#input-markdownextra-attrlist", e("attr_list")),
n.setInputChecked("#input-markdownextra-footnotes", e("footnotes")), n.setInputChecked("#input-markdownextra-smartypants", e("smartypants")),
n.setInputChecked("#input-markdownextra-strikethrough", e("strikethrough")), n.setInputChecked("#input-markdownextra-newlines", e("newlines")),
n.setInputChecked("#input-markdownextra-intraword", l.config.intraword), n.setInputChecked("#input-markdownextra-comments", l.config.comments),
n.setInputValue("#input-markdownextra-highlighter", l.config.highlighter);
}, l.onSaveSettings = function(e) {
e.extensions = [], n.getInputChecked("#input-markdownextra-fencedcodegfm") && e.extensions.push("fenced_code_gfm"),
n.getInputChecked("#input-markdownextra-tables") && e.extensions.push("tables"),
n.getInputChecked("#input-markdownextra-deflist") && e.extensions.push("def_list"),
n.getInputChecked("#input-markdownextra-attrlist") && e.extensions.push("attr_list"),
n.getInputChecked("#input-markdownextra-footnotes") && e.extensions.push("footnotes"),
n.getInputChecked("#input-markdownextra-smartypants") && e.extensions.push("smartypants"),
n.getInputChecked("#input-markdownextra-strikethrough") && e.extensions.push("strikethrough"),
n.getInputChecked("#input-markdownextra-newlines") && e.extensions.push("newlines"),
e.intraword = n.getInputChecked("#input-markdownextra-intraword"), e.comments = n.getInputChecked("#input-markdownextra-comments"),
e.highlighter = n.getInputValue("#input-markdownextra-highlighter");
};
var c;
l.onEventMgrCreated = function(e) {
c = e;
};
var u;
return l.onReady = function() {
u = document.getElementById("preview-contents");
}, l.onPagedownConfigure = function(e) {
var n = e.getConverter(), i = {
extensions: l.config.extensions,
highlighter: "prettify"
};
if (!0 === l.config.intraword) {
var r = {
_DoItalicsAndBold: function(e) {
return e = e.replace(/([^\w*]|^)(\*\*|__)(?=\S)(.+?[*_]*)(?=\S)\2(?=[^\w*]|$)/g, "$1<strong>$3</strong>"),
e = e.replace(/([^\w*]|^)(\*|_)(?=\S)(.+?)(?=\S)\2(?=[^\w*]|$)/g, "$1<em>$3</em>"),
e = e.replace(/([^\w*]|^)(\*\*|__)(?=\S)(.+?[*_]*)(?=\S)\2(?=[^\w*]|$)/g, "$1<strong>$3</strong>");
}
};
n.setOptions(r);
}
if (!0 === l.config.comments && n.hooks.chain("postConversion", function(e) {
return e.replace(/<!--.*?-->/g, function(e) {
return e.replace(/^<!---(.+?)-?-->$/, ' <span class="comment label label-danger">$1</span> ');
});
}), "highlight" == l.config.highlighter) {
var o = document.getElementById("preview-contents");
e.hooks.chain("onPreviewRefresh", function() {
t.each(o.querySelectorAll(".prettyprint > code"), function(e) {
!e.highlighted && s.highlightBlock(e), e.highlighted = !0;
});
});
} else "prettify" == l.config.highlighter && e.hooks.chain("onPreviewRefresh", a.prettyPrint);
Markdown.Extra.init(n, i);
}, l;
}), define("text!html/mathJaxSettingsBlock.html", [], function() {
return '<p>Allows StackEdit to interpret LaTeX mathematical expressions.</p>\n<div class="form-horizontal">\n <div class="form-group">\n <label class="col-sm-4 control-label"\n for="input-mathjax-config-tex">TeX configuration</label>\n <div class="col-sm-7">\n <input type="text" id="input-mathjax-config-tex" class="form-control">\n </div>\n </div>\n <div class="form-group">\n <label class="col-sm-4 control-label"\n for="input-mathjax-config-tex2jax">tex2jax configuration</label>\n <div class="col-sm-7">\n <input type="text" id="input-mathjax-config-tex2jax" class="form-control">\n </div>\n </div>\n</div>\n<span class="help-block pull-right"><a target="_blank" href="http://docs.mathjax.org/en/latest/options/index.html">More info</a></span>';
}), define("text!libs/mathjax_config.js", [], function() {
return 'MathJax.Hub.Config({\n skipStartupTypeset: true,\n "HTML-CSS": {\n preferredFont: "TeX",\n availableFonts: [\n "TeX"\n ],\n linebreaks: {\n automatic: true\n },\n EqnChunk: 10,\n imageFont: null\n },\n tex2jax: <%= tex2jax || \'{ inlineMath: [["$","$"],["\\\\\\\\\\\\\\\\(","\\\\\\\\\\\\\\\\)"]], displayMath: [["$$","$$"],["\\\\\\\\[","\\\\\\\\]"]], processEscapes: true }\' %>,\n TeX: $.extend({\n noUndefined: {\n attributes: {\n mathcolor: "red",\n mathbackground: "#FFEEEE",\n mathsize: "90%"\n }\n },\n Safe: {\n allow: {\n URLs: "safe",\n classes: "safe",\n cssIDs: "safe",\n styles: "safe",\n fontsize: "all"\n }\n }\n }, <%= tex %>),\n messageStyle: "none"\n});\n';
}), define("libs/mathjax_init", [ "settings", "text!libs/mathjax_config.js" ], function(e, t) {
var n = document.createElement("script");
n.type = "text/x-mathjax-config", n.innerHTML = _.template(t, {
tex: e.extensionSettings.mathJax ? e.extensionSettings.mathJax.tex : "undefined",
tex2jax: e.extensionSettings.mathJax ? e.extensionSettings.mathJax.tex2jax : void 0
}), document.getElementsByTagName("head")[0].appendChild(n);
}), define("extensions/mathJax", [ "utils", "classes/Extension", "text!html/mathJaxSettingsBlock.html", "mathjax" ], function(e, t, n) {
function i(e, t, n) {
var i = u.slice(e, t + 1).join("").replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
for (x.Browser.isMSIE && (i = i.replace(/(%[^\n]*)\n/g, "$1<br/>\n")); t > e; ) u[t] = "",
t--;
u[e] = "@@" + m.length + "@@", n && (i = n(i)), m.push(i), d = p = h = null;
}
function r(e) {
d = p = h = null, m = [];
var t;
/`/.test(e) ? (e = e.replace(/~/g, "~T").replace(/(^|[^\\])(`+)([^\n]*?[^`\n])\2(?!`)/gm, function(e) {
return e.replace(/\$/g, "~D");
}), t = function(e) {
return e.replace(/~([TD])/g, function(e, t) {
return {
T: "~",
D: "$"
}[t];
});
}) : t = function(e) {
return e;
}, u = w(e.replace(/\r\n?/g, "\n"), S);
for (var n = 1, r = u.length; r > n; n += 2) {
var o = u[n];
"@" === o.charAt(0) ? (u[n] = "@@" + m.length + "@@", m.push(o)) : d ? p == y && "\n" == o.charAt(0) ? (h && (n = h,
i(d, n, t)), d = p = h = null, f = 0) : o === p ? f ? h = n : i(d, n, t) : o.match(/\n.*\n/) ? (h && (n = h,
i(d, n, t)), d = p = h = null, f = 0) : "{" === o ? f++ : "}" === o && f && f-- : o === y || "$$" === o ? (d = n,
p = o, f = 0) : "begin" === o.substr(1, 5) && (d = n, p = "\\end" + o.substr(6),
f = 0);
}
return h && i(d, h, t), t(u.join(""));
}
function o(e) {
return e = e.replace(/@@(\d+)@@/g, function(e, t) {
return m[t];
}), m = null, e;
}
function a() {
v = !1, x.cancelTypeset = !1, x.Queue([ "Typeset", x, b ]), x.Queue(c);
}
function s() {
v || (v = !0, x.Cancel(), x.Queue(a));
}
var l = new t("mathJax", "MathJax", !0);
l.settingsBlock = n, l.defaultConfig = {
tex: "{}",
tex2jax: '{ inlineMath: [["$","$"],["\\\\\\\\(","\\\\\\\\)"]], displayMath: [["$$","$$"],["\\\\[","\\\\]"]], processEscapes: true }'
}, l.onLoadSettings = function() {
e.setInputValue("#input-mathjax-config-tex", l.config.tex), e.setInputValue("#input-mathjax-config-tex2jax", l.config.tex2jax);
}, l.onSaveSettings = function(t, n) {
t.tex = e.getInputJsValue("#input-mathjax-config-tex", n), t.tex2jax = e.getInputJsValue("#input-mathjax-config-tex2jax", n);
}, l.onPagedownConfigure = function(e) {
b = document.getElementById("preview-contents");
var t = e.getConverter();
t.hooks.chain("preConversion", r), t.hooks.chain("postConversion", o);
};
var c;
l.onAsyncPreview = function(e) {
c = e, s();
};
var u, d, p, h, f, m, g = !1, v = !1, b = null, y = "$", x = MathJax.Hub;
x.Queue(function() {
g = !0, x.processUpdateTime = 50, x.Config({
"HTML-CSS": {
EqnChunk: 10,
EqnChunkFactor: 1
},
SVG: {
EqnChunk: 10,
EqnChunkFactor: 1
}
});
});
var w, S = /(\$\$?|\\(?:begin|end)\{[a-z]*\*?\}|\\[\\{}$]|[{}]|(?:\n\s*)+|@@\d+@@)/i;
return w = 3 === "aba".split(/(b)/).length ? function(e, t) {
return e.split(t);
} : function(e, t) {
var n, i = [];
if (!t.global) {
n = t.toString();
var r = "";
n = n.replace(/^\/(.*)\/([im]*)$/, function(e, t, n) {
return r = n, t;
}), t = RegExp(n, r + "g");
}
for (var o = t.lastIndex = 0; n = t.exec(e); ) i.push(e.substring(o, n.index)),
i.push.apply(i, n.slice(1)), o = n.index + n[0].length;
return i.push(e.substring(o)), i;
}, function() {
var e = MathJax.Hub;
if (!e.Cancel) {
e.cancelTypeset = !1, e.Register.StartupHook("HTML-CSS Jax Config", function() {
var t = MathJax.OutputJax["HTML-CSS"], n = t.Translate;
t.Augment({
Translate: function(i, r) {
if (e.cancelTypeset || r.cancelled) throw Error("MathJax Canceled");
return n.call(t, i, r);
}
});
}), e.Register.StartupHook("SVG Jax Config", function() {
var t = MathJax.OutputJax.SVG, n = t.Translate;
t.Augment({
Translate: function(i, r) {
if (e.cancelTypeset || r.cancelled) throw Error("MathJax Canceled");
return n.call(t, i, r);
}
});
}), e.Register.StartupHook("TeX Jax Config", function() {
var t = MathJax.InputJax.TeX, n = t.Translate;
t.Augment({
Translate: function(i, r) {
if (e.cancelTypeset || r.cancelled) throw Error("MathJax Canceled");
return n.call(t, i, r);
}
});
});
var t = e.processError;
e.processError = function(n, i, r) {
return "MathJax Canceled" !== n.message ? t.call(e, n, i, r) : (MathJax.Message.Clear(0, 0),
i.jaxIDs = [], i.jax = {}, i.scripts = [], i.i = i.j = 0, i.cancelled = !0, null);
}, e.Cancel = function() {
this.cancelTypeset = !0;
};
}
}(), l;
}), define("text!html/partialRenderingSettingsBlock.html", [], function() {
return "<p>Renders modified sections only.</p>\n<blockquote>\n <p><b>Note:</b> Document sections are based on title elements (h1, h2...). Therefore if\n your document does not contain any title, performance will not be increased.</p>\n</blockquote>";
}), define("extensions/partialRendering", [ "underscore", "crel", "extensions/markdownExtra", "classes/Extension", "text!html/partialRenderingSettingsBlock.html" ], function(e, t, n, i, r) {
function o() {
var t = [], n = "\n";
if (m = !1, e.each(g, function(e) {
var i = '\n<div class="se-preview-section-delimiter"></div>\n\n' + e.text + "\n\n";
f && (i = i.replace(/^```.*\n[\s\S]*?\n```|\n[ ]{0,3}\[\^(.+?)\]\:[ \t]*\n?([\s\S]*?)\n{1,2}((?=\n[ ]{0,3}\S)|$)/gm, function(e, t) {
return t ? (m = !0, n += e.replace(/^\s*\n/gm, "") + "\n", "") : e;
})), i = i.replace(/^```.*\n[\s\S]*?\n```|^[ ]{0,3}\[(.+)\]:[ \t]*\n?[ \t]*<?(\S+?)>?(?=\s|$)[ \t]*\n?[ \t]*((\n*)["(](.+?)[")][ \t]*)?(?:\n+)/gm, function(e, t) {
return t ? (n += e.replace(/^\s*\n/gm, "") + "\n", "") : e;
}), t.push({
id: e.id,
text: i + "\n"
});
}), y = [], b = [], d = void 0, !0 === x || u != n) return x = !1, u = n, b = v,
v = t, void (y = t);
var i = v.length;
e.some(v, function(e, n) {
return n >= t.length || e.text != t[n].text ? (i = n, !0) : void 0;
});
var r = -v.length;
e.some(v.slice().reverse(), function(e, n) {
return n >= t.length || e.text != t[t.length - n - 1].text ? (r = -n, !0) : void 0;
}), i - r > v.length && (r = i - v.length);
var o = v.slice(0, i);
y = t.slice(i, t.length + r);
var a = v.slice(v.length + r, v.length);
d = e.first(a), b = v.slice(i, v.length + r), v = o.concat(y).concat(a);
}
function a(e) {
var t = e.id.substring(3), n = w[t];
n && S.removeChild(n), w[t] = e, S.appendChild(e);
}
function s() {
function n(n) {
for (var i = t("div", {
id: "wmd-preview-section-" + n.id,
"class": "wmd-preview-section preview-content"
}), o = !1; r; ) {
var s = r.nextSibling, l = "se-preview-section-delimiter" == r.className;
if (!0 === o && "DIV" == r.tagName && l) break;
o = !0, "DIV" == r.tagName && "footnotes" == r.className ? e.each(r.querySelectorAll("ol > li"), a) : l || i.appendChild(r),
r = s;
}
return i;
}
e.each(b, function(e) {
var t = document.getElementById("wmd-preview-section-" + e.id);
h.removeChild(t);
});
var i = document.getElementById("wmd-preview"), r = i.firstChild, o = document.createDocumentFragment();
e.each(y, function(e) {
o.appendChild(n(e));
}), i.innerHTML = "";
var s = p;
void 0 !== d && (s = document.getElementById("wmd-preview-section-" + d.id)), h.insertBefore(o, s),
p.innerHTML = "", delete p.exportableHtml;
var l = [];
if (!0 === m) {
var c = t("ol");
e.each(h.querySelectorAll("a.footnote"), function(e, t) {
e.textContent = t + 1;
var n = e.id.substring(6);
l.push(n);
var i = w[n];
i && c.appendChild(i.cloneNode(!0));
}), l.length > 0 && p.appendChild(t("div", {
"class": "footnotes"
}, t("hr"), c)), Object.keys(w).forEach(function(e) {
-1 === l.indexOf(e) && (S.removeChild(w[e]), delete w[e]);
});
}
}
var l = new i("partialRendering", "Partial Rendering", !0);
l.settingsBlock = r;
var c, u, d, p, h, f = !1, m = !1, g = [], v = [], b = [], y = [], x = !1, w = {}, S = document.createDocumentFragment();
return l.onSectionsCreated = function(e) {
g = e;
}, l.onPagedownConfigure = function(t) {
c = t.getConverter(), c.hooks.chain("preConversion", function() {
o();
var t = e.map(y, function(e) {
return e.text;
});
return t.push(u + "\n\n"), t.join("");
}), t.hooks.chain("onPreviewRefresh", function() {
s();
});
}, l.onInit = function() {
n.enabled && e.some(n.config.extensions, function(e) {
return "footnotes" == e;
}) && (f = !0);
}, l.onReady = function() {
p = t("div", {
id: "wmd-preview-section-footnotes",
"class": "preview-content"
}), h = document.getElementById("preview-contents"), h.appendChild(p);
}, l.onFileSelected = function() {
x = !0;
}, l;
}), define("extensions/markdownSectionParser", [ "underscore", "extensions/markdownExtra", "extensions/mathJax", "extensions/partialRendering", "classes/Extension", "crel" ], function(e, t, n, i, r, o) {
function a(e, t) {
function n(e, t) {
var n = o.substring(a, t);
u.push({
id: ++h,
text: n,
textWithFrontMatter: i + n
}), i = "";
}
if (e === p) {
var i = (p.frontMatter || {})._frontMatter || "", r = t.substring(i.length), o = r + "\n\n";
u = [];
var a = 0;
o.replace(d, function(e, t) {
n(a, t), a = t;
}), n(a, r.length), s.onSectionsCreated(u);
}
}
var s, l = new r("markdownSectionParser", "Markdown section parser");
l.onEventMgrCreated = function(e) {
s = e;
};
var c, u = [], d = "^.+[ \\t]*\\n=+[ \\t]*\\n+|^.+[ \\t]*\\n-+[ \\t]*\\n+|^\\#{1,6}[ \\t]*.+?[ \\t]*\\#*\\n+";
l.onPagedownConfigure = function(r) {
t.enabled && e.some(t.config.extensions, function(e) {
return "fenced_code_gfm" == e;
}) && (d = "^```[^`\\n]*\\n[\\s\\S]*?\\n```|" + d), n.enabled && (d = "^[ \\t]*\\n\\$\\$[\\s\\S]*?\\$\\$|" + d,
d = "^[ \\t]*\\n\\\\\\\\[[\\s\\S]*?\\\\\\\\]|" + d, d = "^[ \\t]*\\n\\\\?\\\\begin\\{[a-z]*\\*?\\}[\\s\\S]*?\\\\end\\{[a-z]*\\*?\\}|" + d),
d = new RegExp(d, "gm");
var a = r.getConverter();
i.enabled || (a.hooks.chain("preConversion", function() {
return e.reduce(u, function(e, t) {
return e + '\n<div class="se-preview-section-delimiter"></div>\n\n' + t.text + "\n\n";
}, "");
}), r.hooks.chain("onPreviewRefresh", function() {
function e() {
for (var e = o("div", {
"class": "wmd-preview-section preview-content"
}), t = !1; n; ) {
var i = n.nextSibling, r = "se-preview-section-delimiter" == n.className;
if (!0 === t && "DIV" == n.tagName && r) break;
t = !0, r || e.appendChild(n), n = i;
}
return e;
}
var t = document.getElementById("wmd-preview"), n = t.firstChild, i = document.createDocumentFragment();
u.forEach(function() {
i.appendChild(e());
}), c.innerHTML = "", c.appendChild(t), c.appendChild(i);
}));
}, l.onReady = function() {
c = document.getElementById("preview-contents");
};
var p;
l.onFileSelected = function(e) {
p = e;
};
var h = 0;
return l.onFileOpen = a, l.onContentChanged = a, l;
}), define("text!html/buttonMarkdownSyntax.html", [], function() {
return '<button class="btn btn-success dropdown-toggle button-markdown-syntax" title="Markdown syntax" data-toggle="dropdown">\n <i class="icon-help-circled"></i>\n</button>\n<div class="dropdown-menu pull-right">\n <h3>Markdown syntax</h3>\n <hr>\n <div class="markdown-syntax">\n<h4>Phrase Emphasis</h4>\n\n<pre><code>*italic* **bold**\n_italic_ __bold__\n</code></pre>\n\n<h4>Links</h4>\n\n<p>Inline:</p>\n\n<pre><code>An [example](http://url.com/ "Title")\n</code></pre>\n\n<p>Reference-style labels (titles are optional):</p>\n\n<pre><code>An [example][id]. Then, anywhere\nelse in the doc, define the link:\n\n [id]: http://example.com/ "Title"\n</code></pre>\n\n<h4>Images</h4>\n\n<p>Inline (titles are optional):</p>\n\n<pre><code>![alt text](/path/img.jpg "Title")\n</code></pre>\n\n<p>Reference-style:</p>\n\n<pre><code>![alt text][id]\n\n[id]: /url/to/img.jpg "Title"\n</code></pre>\n\n<h4>Headers</h4>\n\n<p>Setext-style:</p>\n\n<pre><code>Header 1\n========\n\nHeader 2\n--------\n</code></pre>\n\n<p>atx-style (closing #\'s are optional):</p>\n\n<pre><code># Header 1 #\n\n## Header 2 ##\n\n###### Header 6\n</code></pre>\n\n<h4>Lists</h4>\n\n<p>Ordered, without paragraphs:</p>\n\n<pre><code>1. Foo\n2. Bar\n</code></pre>\n\n<p>Unordered, with paragraphs:</p>\n\n<pre><code>* A list item.\n\n With multiple paragraphs.\n\n* Bar\n</code></pre>\n\n<p>You can nest them:</p>\n\n<pre><code>* Abacus\n * answer\n* Bubbles\n 1. bunk\n 2. bupkis\n * BELITTLER\n 3. burper\n* Cunning\n</code></pre>\n\n<h4>Blockquotes</h4>\n\n<pre><code>&gt; Email-style angle brackets\n&gt; are used for blockquotes.\n\n&gt; &gt; And, they can be nested.\n\n&gt; #### Headers in blockquotes\n&gt;\n&gt; * You can quote a list.\n&gt; * Etc.\n</code></pre>\n\n<h4>Code Spans</h4>\n\n<pre><code>`&lt;code&gt;` spans are delimited\nby backticks.\n\nYou can include literal backticks\nlike `` `this` ``.\n</code></pre>\n\n<h4>Preformatted Code Blocks</h4>\n\n<p>Indent every line of a code block by at least 4 spaces or 1 tab.</p>\n\n<pre><code>This is a normal paragraph.\n\n This is a preformatted\n code block.\n</code></pre>\n\n<h4>Horizontal Rules</h4>\n\n<p>Three or more dashes or asterisks:</p>\n\n<pre><code>---\n\n* * *\n\n- - - -\n</code></pre>\n\n<h4>Manual Line Breaks</h4>\n\n<p>End a line with two or more spaces:</p>\n\n<pre><code>Roses are red,\nViolets are blue.\n</code></pre>\n\n<blockquote>Based on the <a target="_blank" href="https://github.com/fletcher/MultiMarkdown/blob/master/Documentation/Markdown%20Syntax.md">Markdown syntax guide</a>, by Fletcher T. Penney.</blockquote>\n </div>\n <hr>\n</div>\n';
}), define("extensions/buttonMarkdownSyntax", [ "jquery", "classes/Extension", "text!html/buttonMarkdownSyntax.html" ], function(e, t, n) {
var i = new t("buttonMarkdownSyntax", 'Button "Markdown syntax', !0, !0);
return i.settingsBlock = '<p>Adds a "Markdown syntax" button over the preview.</p>',
i.onCreatePreviewButton = function() {
return n;
}, i;
}), define("extensions/googleAnalytics", [ "jquery", "underscore", "constants", "utils", "classes/Extension", "settings" ], function(e, t, n, i, r, o) {
function a() {
i.currentTime - d > 18e4 && (_gaq.push([ "_trackPageview" ]), d = i.currentTime);
}
var s = new r("googleAnalytics", "Google Analytics", !0);
s.settingsBlock = "<p>Sends anonymous statistics about usage and errors to help improve StackEdit.</p>";
var l = !1, c = !1;
window._gaq = [];
var u = function() {
if (!1 === l && !1 === c) {
var t = "/ga.js";
location.search.match(/(\?|&)console/) && (t = "/u/ga_debug.js"), e.ajax({
url: "https://ssl.google-analytics.com" + t,
dataType: "script"
}).done(function() {
l = !0;
});
}
}, d = 0;
s.onPeriodicRun = function() {
a();
}, s.onReady = function() {
_gaq.push([ "_setAccount", n.GOOGLE_ANALYTICS_ACCOUNT_ID ]), a(), _gaq.push([ "_trackEvent", "About", "version", n.VERSION ]),
_gaq.push([ "_trackEvent", "Settings", "layoutOrientation", "" + o.layoutOrientation ]),
_gaq.push([ "_trackEvent", "Settings", "editMode", "" + o.editMode ]), _gaq.push([ "_trackEvent", "Settings", "theme", "" + window.themeV4 ]),
_gaq.push([ "_trackEvent", "Settings", "lazyRendering", "" + o.lazyRendering ]),
_gaq.push([ "_trackEvent", "Settings", "editorFontClass", "" + o.editorFontClass ]),
_gaq.push([ "_trackEvent", "Settings", "fontSizeRatio", "" + o.fontSizeRatio ]),
_gaq.push([ "_trackEvent", "Settings", "maxWidthRatio", "" + o.maxWidthRatio ]),
_gaq.push([ "_trackEvent", "Settings", "cursorFocusRatio", "" + o.cursorFocusRatio ]),
_gaq.push([ "_trackEvent", "Settings", "defaultContent backlink", "" + (-1 !== o.defaultContent.indexOf(n.MAIN_URL)) ]),
_gaq.push([ "_trackEvent", "Settings", "commitMsg backlink", "" + (-1 !== o.commitMsg.indexOf(n.MAIN_URL)) ]),
t.each(o.extensionSettings, function(e, t) {
_gaq.push([ "_trackEvent", "Extensions", t + " enabled", "" + (!0 === e.enabled) ]);
}), window.onerror = function(e, t, n) {
_gaq.push([ "_trackEvent", "Error", e, t + ":" + n + i.formatEventList() ]);
}, u();
}, s.onOfflineChanged = function(e) {
c = e, u();
};
var p = 0;
return s.onSyncRunning = function(e) {
!0 === e && (p = new Date().getTime());
}, s.onPublishRunning = function(e) {
!0 === e && (p = new Date().getTime());
}, s.onSyncSuccess = function() {
var e = new Date().getTime();
_gaq.push([ "_trackTiming", "Sync", "SyncTime", e - p ]);
}, s.onSyncImportSuccess = function(e, t) {
_gaq.push([ "_trackEvent", "Sync", "SyncImport" ]), _gaq.push([ "_trackEvent", "Sync", "SyncImport provider", t.providerId ]);
}, s.onSyncExportSuccess = function(e, t) {
_gaq.push([ "_trackEvent", "Sync", "SyncExport" ]), _gaq.push([ "_trackEvent", "Sync", "SyncExport provider", t.provider.providerId ]);
}, s.onPublishSuccess = function(e) {
var n = new Date().getTime();
_gaq.push([ "_trackTiming", "Publish", "PublishSuccess", n - p ]), t.each(e.publishLocations, function(e) {
_gaq.push([ "_trackEvent", "Publish", "PublishSuccess provider", e.provider.providerId ]);
});
}, s.onNewPublishSuccess = function(e, t) {
_gaq.push([ "_trackEvent", "Publish", "NewPublish provider", t.provider.providerId ]);
}, s.onError = function(e) {
!t.isString(e) && e.message && _gaq.push([ "_trackEvent", "Error", "message", e.message + i.formatEventList() ]);
}, s;
}), define("extensions/twitter", [ "jquery", "underscore", "constants", "utils", "classes/Extension" ], function(e, t, n, i, r) {
var o = new r("twitter", "Twitter", !1, !0), a = !1, s = !1, l = function() {
!1 === a && !1 === s && e.ajax({
url: "https://platform.twitter.com/widgets.js",
dataType: "script"
}).done(function() {
a = !0;
});
};
return o.onReady = function() {
l();
}, o.onOfflineChanged = function(e) {
s = e, l();
}, o.onTweet = function() {
a && window.twttr.widgets.load();
}, o;
}), function() {
function e() {
if (u) return u;
var e = {
width: "1px",
height: "1px",
position: "absolute",
top: "-100px"
};
return u = document.createElement("iframe"), u.setAttribute("style", Object.keys(e).map(function(t) {
return t + ":" + e[t];
}).join(";")), document.body.appendChild(u), u.onerror = u.onload = function() {
setTimeout(function() {
p && p({
error: _
});
}, 10);
}, u;
}
function t(e, t) {
var n = y + e;
return t.q = Date.now(), t = t && Object.keys(t).map(function(e) {
return e + "=" + encodeURIComponent(t[e]);
}).join("&"), t ? n + "?" + t : n;
}
function n(n, i) {
p = function(e) {
p = void 0, i(e);
};
var r = {
immediate: !0,
response_type: "token",
client_id: n.applicationID,
redirect_uri: n.redirectURL
};
b(function() {
e().src = t("/authorize", r), clearTimeout(g), g = setTimeout(function() {
p && p({
error: C
});
}, S);
});
}
function i(e, t) {
t.pricingOptions && t.pricingOptions.length && (e.pricing_options = t.pricingOptions.join ? t.pricingOptions.join(",") : t.pricingOptions),
t.summary && (e.summary = !0);
}
function r(e, n) {
h = function(e) {
h = void 0, n(e);
};
var r = {
popup: !0,
response_type: "token",
client_id: e.applicationID,
redirect_uri: e.redirectURL
};
i(r, e);
var o = {
toolbar: "no",
location: "no",
directories: "no",
status: "no",
menubar: "no",
scrollbars: "no",
resizable: "no",
copyhistory: "no",
width: x,
height: w,
left: (screen.width - x) / 2,
top: (screen.height - w) / 2
};
window.open(t("/authorize", r), void 0, Object.keys(o).map(function(e) {
return e + "=" + o[e];
}).join(","));
}
function o() {
return d && document.body.removeChild(d), d = document.createElement("script"),
d.onerror = d.onload = function() {
setTimeout(function() {
f && f({
error: _
});
}, 10);
}, document.body.appendChild(d), d;
}
function a(e) {
f = function(t) {
f = void 0, e(t);
};
var n = {
access_token: m.token,
callback: "_monetizeJsonpCallback"
};
b(function() {
o().src = t("/api/payments", n), clearTimeout(v), v = setTimeout(function() {
f && f({
error: C
});
}, S);
});
}
function s(e) {
var n = {
client_id: e.applicationID,
redirect_uri: e.redirectURL
};
i(n, e), window.location = t("/authorize", n);
}
function l(e, t) {
for (var n in t) e[n] = t[n];
}
function c(e) {
function t(e) {
return function(t, n) {
"function" == typeof t && (n = t, t = {});
var r = {};
l(r, i), l(r, t || {}), e(r, n);
};
}
var i = {};
l(i, k), l(i, e || {});
var o = {};
return o.getTokenImmediate = t(function(e, t) {
return m && m.token && m.refreshDate > Date.now() ? t(void 0, m.token) : void n(e, function(e) {
t(e.error, e.token);
});
}), o.getPaymentsImmediate = t(function(e, t) {
return m && m.token && m.refreshDate > Date.now() ? a(function(e) {
t(e.error, e.payments);
}) : void n(e, function(e) {
t(e.error, e.payments);
});
}), o.getTokenInteractive = t(function(e, t) {
return t ? void r(e, function(e) {
t(e.error, e.token);
}) : s(e);
}), o.getPaymentsInteractive = t(function(e, t) {
return t ? void r(e, function(e) {
t(e.error, e.payments);
}) : s(e);
}), o.getToken = t(function(e, t) {
return (e.immeditate ? o.getTokenImmediate : o.getTokenInteractive)(e, t);
}), o.getPayments = t(function(e, t) {
return (e.immeditate ? o.getPaymentsImmediate : o.getPaymentsInteractive)(e, t);
}), o;
}
var u, d, p, h, f, m, g, v, b = function() {
var e, t = [], n = /^loaded|c/.test(document.readyState);
return document.addEventListener("DOMContentLoaded", e = function() {
for (document.removeEventListener("DOMContentLoaded", e, !1), n = 1; e = t.shift(); ) e();
}, !1), function(e) {
n ? e() : t.push(e);
};
}(), y = "https://monetizejs.com", x = 1e3, w = 700, S = 3e4, C = "Request timeout", _ = "Please check your JS console";
window.addEventListener("message", function(e) {
e.origin == y && (m = e.data, m.expiresIn && (m.refreshDate = Date.now() + m.expiresIn - 3e5),
m.popup ? h && h(m) : (clearTimeout(g), p && p(m)));
}), window._monetizeJsonpCallback = function E(e) {
return window._monetizeJsonpCallback !== E ? f && f({
error: "Callback replaced!"
}) : (clearTimeout(v), void (f && f({
payments: e
})));
};
var k = {
redirectURL: window.location.href
};
window.MonetizeJS = c, "function" == typeof define && define.amd && define("monetizejs", [], function() {
return c;
});
}(), define("text!html/dialogAbout.html", [], function() {
return '<div class="modal-dialog">\n <div class="modal-content">\n <div class="modal-header">\n <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>\n <img height="64" data-stackedit-src="logo.svg" />\n </div>\n <div class="modal-body">\n <div class="pull-right">\n <a href="https://twitter.com/share" class="twitter-share-button" data-url="https://stackedit.io" data-text="Great #markdown editor!" data-via="stackedit" data-size="large"></a>\n </div>\n <dl>\n <dt>About:</dt>\n <dd>\n <a target="_blank" href="https://github.com/benweet/stackedit/">GitHub\n project</a> /\n <a target="_blank" href="https://github.com/benweet/stackedit/issues">issue\n tracker</a>\n <br />\n <a target="_blank" href="https://chrome.google.com/webstore/detail/stackedit/iiooodelglhkcpgbajoejffhijaclcdg">Chrome\n app</a> (thanks for your review!)\n <br />\n <a target="_blank" href="https://twitter.com/stackedit/">Follow on Twitter</a>\n <br />\n <a target="_blank" href="https://www.facebook.com/stackedit/">Follow\n on Facebook</a>\n <br />\n <a target="_blank" href="https://plus.google.com/110816046787593496375"\n rel="publisher">Follow on Google+</a>\n <br />\n </dd>\n </dl>\n <dl>\n <dt>Developers:</dt>\n <dd>\n <a target="_blank" href="https://twitter.com/benweet">Benoit Schweblin</a><br />\n Pete Eigel (contributor)<br />\n wiibaa (contributor)<br />\n <a target="_blank" href="http://www.hugwebdesign.com/">Daniel Hug</a> (contributor)<br />\n <a target="_blank" href="https://github.com/kmb32123">Kevin Brey</a> (themer)<br />\n </dd>\n </dl>\n <p>\n With special thanks to <a target="blank" href="http://www.smileupps.com/">Smileupps</a> for CouchDB hosting.\n </p>\n <dl>\n <dt>Sponsorship:</dt>\n <dd>\n <a href="#" class="sponsorship-button"><img height="30" data-stackedit-src="button.svg" /></a>\n </dd>\n </dl>\n <p>\n StackEdit <%= version %> &ndash; <a target="_blank" href="privacy_policy.html">Privacy Policy</a><br /> Copyright 2013-2014 <a\n target="_blank" href="https://twitter.com/benweet">Benoit\n Schweblin</a><br /> Licensed under an <a target="_blank"\n href="http://www.apache.org/licenses/LICENSE-2.0">Apache\n License</a>\n </p>\n </div>\n <div class="modal-footer">\n <a href="#" class="btn btn-primary" data-dismiss="modal">Close</a>\n </div>\n </div>\n</div>\n';
}), define("extensions/dialogAbout", [ "jquery", "underscore", "constants", "utils", "classes/Extension", "monetizejs", "text!html/dialogAbout.html" ], function(e, t, n, i, r, o, a) {
var s, l = new r("dialogAbout", 'Dialog "About"');
l.onEventMgrCreated = function(e) {
s = e;
};
var c = new o({
applicationID: "ESTHdCYOi18iLhhO"
});
return l.onReady = function() {
i.addModal("modal-about", t.template(a, {
version: n.VERSION
})), e(".modal-about .sponsorship-button").click(function() {
c.getPayments({
summary: !0
}, function() {
s.onMessage("Please refresh the page for your sponsorship to take effect.");
});
});
}, l;
}), define("text!html/dialogManagePublicationLocation.html", [], function() {
return '<div class="entry">\n <div class="input-group">\n <span class="input-group-addon" title="<%= publishAttributes.provider.providerName %>">\n <i class="icon-provider-<%= publishAttributes.provider.providerId %>"></i>\n </span> <input class="form-control" type="text"\n value="<%= publishDesc %>" disabled/>\n </div>\n <div class="text-right">\n <a class="btn btn-link btn-sm open-location<%- publishLocationLink ? \'\' : \' hide\' %>"\n target="_blank" href="<%- publishLocationLink %>">\n <i class="icon-link-ext-alt"></i> Open in <%= publishAttributes.provider.providerName %>\n </a>\n <a class="btn btn-link btn-sm remove-button"\n data-publish-index="<%= publishAttributes.publishIndex %>"><i class="icon-trash"></i> Remove location</a>\n </div>\n</div>\n';
}), define("extensions/dialogManagePublication", [ "jquery", "underscore", "classes/Extension", "text!html/dialogManagePublicationLocation.html" ], function(e, t, n, i) {
var r, o = new n("dialogManagePublication", 'Dialog "Manage publication"', !1, !0);
o.onEventMgrCreated = function(e) {
r = e;
};
var a, s, l, c = function(e) {
if (void 0 === e || e === a) {
l.toggleClass("hide", 0 === t.size(a.publishLocations));
var n = t.reduce(a.publishLocations, function(e, n) {
var r = t.omit(n, "provider", "publishIndex");
return r.password && (r.password = "********"), r = JSON.stringify(r).replace(/{|}|"/g, "").replace(/,/g, ", "),
e + t.template(i, {
publishAttributes: n,
publishDesc: r,
publishLocationLink: n.provider.getPublishLocationLink && n.provider.getPublishLocationLink(n)
});
}, "");
s.innerHTML = n;
}
};
return o.onFileSelected = function(e) {
a = e, c(e);
}, o.onNewPublishSuccess = c, o.onPublishRemoved = c, o.onReady = function() {
var t = document.querySelector(".modal-manage-publish");
s = t.querySelector(".publish-list"), l = e(document.querySelectorAll(".show-already-published")),
e(s).on("click", ".remove-button", function() {
var t = e(this), n = a.publishLocations[t.data("publishIndex")];
a.removePublishLocation(n), r.onPublishRemoved(a, n);
});
}, o;
}), define("text!html/dialogManageSynchronizationLocation.html", [], function() {
return '<div class="entry">\n <div class="input-group">\n <span class="input-group-addon"\n title="<%= syncAttributes.provider.providerName %>">\n <i class="icon-provider-<%= syncAttributes.provider.providerId %>"></i>\n </span> <input class="form-control" type="text" value="<%= syncDesc %>" disabled/>\n </div>\n <div class="text-right">\n <a class="btn btn-link btn-sm open-location<%- syncLocationLink ? \'\' : \' hide\' %>"\n target="_blank" href="<%- syncLocationLink %>">\n <i class="icon-link-ext-alt"></i> Open in <%= syncAttributes.provider.providerName %>\n </a>\n <a class="btn btn-link btn-sm remove-button"\n data-sync-index="<%= syncAttributes.syncIndex %>"><i class="icon-trash"></i> Remove location</a>\n </div>\n</div>\n';
}), define("extensions/dialogManageSynchronization", [ "jquery", "underscore", "classes/Extension", "text!html/dialogManageSynchronizationLocation.html" ], function(e, t, n, i) {
var r, o = new n("dialogManageSynchronization", 'Dialog "Manage synchronization"', !1, !0);
o.onEventMgrCreated = function(e) {
r = e;
};
var a;
o.onSynchronizerCreated = function(e) {
a = e;
};
var s, l, c, u = function(e) {
if (void 0 === e || e === s) {
c.toggleClass("hide", 0 === t.size(s.syncLocations));
var n = t.reduce(s.syncLocations, function(e, n) {
return e + t.template(i, {
syncAttributes: n,
syncDesc: n.id || n.path,
syncLocationLink: n.provider.getSyncLocationLink && n.provider.getSyncLocationLink(n)
});
}, "");
l.innerHTML = n;
}
};
return o.onFileSelected = function(e) {
s = e, u(e);
}, o.onSyncExportSuccess = u, o.onSyncRemoved = u, o.onReady = function() {
var t = document.querySelector(".modal-manage-sync");
l = t.querySelector(".sync-list"), c = e(document.querySelectorAll(".show-already-synchronized")),
e(l).on("click", ".remove-button", function() {
var t = e(this), n = s.syncLocations[t.data("syncIndex")];
s.removeSyncLocation(n), r.onSyncRemoved(s, n);
});
}, o;
}), define("text!html/dialogManageSharingLocation.html", [], function() {
return '<div class="entry">\n <div class="input-group">\n <a href="<%= link %>" class="input-group-addon" title="Sharing location"><i\n class="icon-link"></i></a> <input class="form-control" type="text"\n data-value="<%= link %>">\n </div>\n</div>';
}), define("extensions/dialogManageSharing", [ "jquery", "underscore", "constants", "classes/Extension", "text!html/dialogManageSharingLocation.html" ], function(e, t, n, i, r) {
var o, a = new i("dialogManageSharing", 'Button "Share"', !1, !0);
a.onEventMgrCreated = function(e) {
o = e;
};
var s;
a.onSharingCreated = function(e) {
s = e;
};
var l, c, u, d, p, h = function(i) {
if (void 0 === i || i === l) {
var o = t.reduce(l.syncLocations, function(i, o) {
var a = s.getEditorParams(o);
if (a) {
var l = n.MAIN_URL + "editor#!" + e.param(a);
i += t.template(r, {
link: l
});
}
return i;
}, "");
c.innerHTML = o, d.toggleClass("hide", 0 !== o.length);
var a = t.reduce(l.publishLocations, function(i, o) {
var a = s.getViewerParams(o);
if (a) {
var l = n.MAIN_URL + "viewer#!" + e.param(a);
i += t.template(r, {
link: l
});
}
return i;
}, "");
u.innerHTML = a, p.toggleClass("hide", 0 !== a.length);
}
};
return a.onFileSelected = function(e) {
l = e, h(e);
}, a.onSyncExportSuccess = h, a.onSyncRemoved = h, a.onNewPublishSuccess = h, a.onPublishRemoved = h,
a.onReady = function() {
var t = document.querySelector(".modal-manage-sharing");
c = t.querySelector(".share-editor-list"), u = t.querySelector(".share-viewer-list"),
d = e(t.querySelectorAll(".msg-no-share-editor")), p = e(t.querySelectorAll(".msg-no-share-viewer")),
e(t).on("show.bs.modal", function() {
e(t.querySelector("input")).each(function() {
this.value = e(this).data("value");
});
});
}, a;
}), function() {
var e = this, t = {}, n = !1;
"undefined" != typeof module && module.exports ? (module.exports = t, e.toMarkdown = t,
n = !0) : e.toMarkdown = t, t.converter = function(e) {
e && e.elements && $.isArray(e.elements) && (c = c.concat(e.elements)), this.makeMd = function(e, t) {
var r;
return n ? require("jsdom").env({
html: e,
scripts: [ "http://code.jquery.com/jquery-1.6.4.min.js" ],
done: function(n, r) {
"function" == typeof t && t(i(e, r.$));
}
}) : r = i(e, $), r;
};
};
var i = function(e, t) {
e = e.replace(/(\d+)\. /g, "$1\\. ");
var n = t("<div/>"), i = n.html(e);
i.find("*:not(pre, code)").contents().filter(function() {
return 3 === this.nodeType && /^\s+$/.test(this.nodeValue);
}).remove();
for (var r = [], o = 0, s = c.length; s > o; o++) r.push(c[o].selector);
for (r = r.join(","); i.find(r).length; ) for (var o = 0, s = c.length; s > o; o++) $matches = i.find(c[o].selector + ':not(:has("' + r + '"))'),
$matches.each(function(e, n) {
var i = t(n);
i.before(c[o].replacement(i.html(), i)).remove();
});
return a(i.html());
}, r = function(e) {
return e.replace(/^[\n\r\f]+|[\n\r\f]+$/g, "");
}, o = function(e) {
return String(e).replace(/&amp;/g, "&").replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&quot;/g, '"');
}, a = function(e) {
return e = e.replace(/^[\t\r\n]+|[\t\r\n]+$/g, ""), e = e.replace(/\n\s+\n/g, "\n\n"),
e = e.replace(/\n{3,}/g, "\n\n"), e = o(e);
}, s = function(e) {
return e = r(e), e ? "**" + e + "**" : "";
}, l = function(e) {
return e = r(e), e ? "_" + e + "_" : "";
}, c = [ {
selector: "p",
replacement: function(e) {
return e = $.trim(e), e ? "\n\n" + e + "\n\n" : "";
}
}, {
selector: "br",
replacement: function() {
return "\n";
}
}, {
selector: "h1,h2,h3,h4,h5,h6",
replacement: function(e, t) {
e = $.trim(e);
for (var n = t.prop("nodeName").charAt(1), i = "", r = 0; n > r; r++) i += "#";
return e ? "\n\n" + i + " " + e + "\n\n" : "";
}
}, {
selector: "hr",
replacement: function() {
return "\n\n* * *\n\n";
}
}, {
selector: "a[href]",
replacement: function(e, t) {
if (e) {
e = r(e);
var n = t.attr("href"), i = t.attr("title") || "";
return "[" + e + "](" + n + (i ? ' "' + i + '"' : "") + ")";
}
return !1;
}
}, {
selector: "b",
replacement: s
}, {
selector: "strong",
replacement: s
}, {
selector: "i",
replacement: l
}, {
selector: "em",
replacement: l
}, {
selector: "code",
replacement: function(e) {
return e = r(e), e ? "`" + e + "`" : "";
}
}, {
selector: "img",
replacement: function(e, t) {
var n = t.attr("alt") || "", i = t.attr("src") || "", r = t.attr("title") || "";
return "![" + n + "](" + i + (r ? ' "' + r + '"' : "") + ")";
}
}, {
selector: "pre",
replacement: function(e) {
return /^\s*\`/.test(e) ? (e = e.replace(/\`/g, ""), " " + e.replace(/\n/g, "\n ")) : "";
}
}, {
selector: "li",
replacement: function(e, t) {
e = e.replace(/^\s+|\s+$/, "").replace(/\n/gm, "\n ");
var n = "* ", i = "", r = t.parent(), o = r.contents().filter(function() {
return 1 === this.nodeType && "LI" === this.nodeName || 3 === this.nodeType;
}), a = o.index(t) + 1;
return n = r.is("ol") ? a + ". " : "* ", a == o.length && (t.parents("li").length || (i = "\n"),
e = e.replace(/\s+$/, ""), t.unwrap()), n + e + i + "\n";
}
}, {
selector: "blockquote",
replacement: function(e) {
return e = e = $.trim(e).replace(/\n{3,}/g, "\n\n"), "&gt; " + (e = e.replace(/\n/g, "\n&gt; "));
}
} ];
}(), define("toMarkdown", [ "jquery" ], function(e) {
return function() {
return e.toMarkdown;
};
}(this)), define("extensions/dialogOpenHarddrive", [ "jquery", "underscore", "constants", "utils", "classes/Extension", "toMarkdown" ], function(e, t, n, i, r, o) {
function a(i) {
i.stopPropagation(), i.preventDefault();
var r = (i.dataTransfer || i.target).files;
e(".modal-import-harddrive-markdown, .modal-import-harddrive-html").modal("hide"),
t.each(r, function(t) {
if (!e(i.target).is("#wmd-input *") || !t.name.match(/.(jpe?g|png|gif)$/i)) {
var r = new FileReader();
r.onload = function(e) {
return function(t) {
var n = t.target.result;
if (n.match(/\uFFFD/)) return void p.onError(e.name + " is a binary file.");
if (void 0 === (n = h ? h(n) : n)) return void p.onError(e.name + " is not a valid HTML file.");
var i = e.name, r = i.lastIndexOf(".");
i = -1 !== r ? i.substring(0, r) : i;
var o = u.createFile(i, n);
u.selectFile(o);
};
}(t);
var o = t.slice(0, n.IMPORT_FILE_MAX_CONTENT_SIZE);
r.readAsText(o);
}
});
}
function s(e) {
h = void 0, a(e);
}
function l(e) {
h = m, a(e);
}
function c(e) {
e.stopPropagation(), e.preventDefault(), e.dataTransfer.dropEffect = "copy";
}
var u, d = new r("dialogOpenHarddrive", 'Dialog "Open from"');
d.onFileMgrCreated = function(e) {
u = e;
};
var p;
d.onEventMgrCreated = function(e) {
p = e;
};
var h, f, m = function(e) {
return f.makeMd(e);
};
return d.onReady = function() {
f = new o.converter(), e("#input-file-import-harddrive-markdown").change(s), e("#dropzone-import-harddrive-markdown, #wmd-input").each(function() {
this.addEventListener("dragover", c, !1), this.addEventListener("drop", s, !1);
}), e("#input-file-import-harddrive-html").change(l), e("#dropzone-import-harddrive-html").each(function() {
this.addEventListener("dragover", c, !1), this.addEventListener("drop", l, !1);
}), e(".action-convert-html").click(function(e) {
var t = i.getInputTextValue("#input-convert-html", e);
if (void 0 !== t) {
if (void 0 === (t = f.makeMd(t))) return void p.onError("Invalid HTML code.");
var n = u.createFile(void 0, t);
u.selectFile(n);
}
});
}, d;
}), define("extensions/documentTitle", [ "jquery", "underscore", "classes/Extension" ], function(e, t, n) {
var i, r, o = new n("documentTitle", "Document Title"), a = t.debounce(function(t) {
if (t === i) {
var n = i.title;
r.html(i.composeTitle(!0)), e(".file-title").text(n), e(".input-file-title").val(n);
}
}, 50);
return o.onFileSelected = function(e) {
i = e, a(e);
}, o.onTitleChanged = a, o.onSyncExportSuccess = a, o.onSyncRemoved = a, o.onNewPublishSuccess = a,
o.onPublishRemoved = a, o.onReady = a, o.onReady = function() {
r = e(".file-title-navbar"), r.hover(function() {
var e = r[0].scrollWidth - r.outerWidth();
r.stop(!0, !0).animate({
scrollLeft: e
}, 15 * e, "linear");
}, function() {
r.stop(!0, !0).scrollLeft(0);
}).click(function() {
r.stop(!0, !0).scrollLeft(0);
});
}, o;
}), define("classes/FileDescriptor", [ "underscore", "utils", "storage" ], function(e, t, n) {
function i(e, t, i, r) {
this.fileIndex = e, this._title = t || n[e + ".title"], this._editorScrollTop = parseInt(n[e + ".editorScrollTop"]) || 0,
this._editorStart = parseInt(n[e + ".editorEnd"]) || 0, this._editorEnd = parseInt(n[e + ".editorEnd"]) || 0,
this._previewScrollTop = parseInt(n[e + ".previewScrollTop"]) || 0, this._selectTime = parseInt(n[e + ".selectTime"]) || 0,
this._discussionList = JSON.parse(n[e + ".discussionList"] || "{}"), this.syncLocations = i || {},
this.publishLocations = r || {}, Object.defineProperty(this, "title", {
get: function() {
return this._title;
},
set: function(e) {
this._title = e, n[this.fileIndex + ".title"] = e;
}
}), Object.defineProperty(this, "content", {
get: function() {
return n[this.fileIndex + ".content"];
},
set: function(e) {
n[this.fileIndex + ".content"] = e;
}
}), Object.defineProperty(this, "editorScrollTop", {
get: function() {
return this._editorScrollTop;
},
set: function(e) {
this._editorScrollTop = e, n[this.fileIndex + ".editorScrollTop"] = e;
}
}), Object.defineProperty(this, "editorStart", {
get: function() {
return this._editorStart;
},
set: function(e) {
this._editorStart = e, n[this.fileIndex + ".editorStart"] = e;
}
}), Object.defineProperty(this, "editorEnd", {
get: function() {
return this._editorEnd;
},
set: function(e) {
this._editorEnd = e, n[this.fileIndex + ".editorEnd"] = e;
}
}), Object.defineProperty(this, "previewScrollTop", {
get: function() {
return this._previewScrollTop;
},
set: function(e) {
this._previewScrollTop = e, n[this.fileIndex + ".previewScrollTop"] = e;
}
}), Object.defineProperty(this, "selectTime", {
get: function() {
return this._selectTime;
},
set: function(e) {
this._selectTime = e, n[this.fileIndex + ".selectTime"] = e;
}
}), Object.defineProperty(this, "discussionList", {
get: function() {
return this._discussionList;
},
set: function(e) {
this._discussionList = e, n[this.fileIndex + ".discussionList"] = JSON.stringify(e);
}
}), Object.defineProperty(this, "discussionListJSON", {
get: function() {
return n[this.fileIndex + ".discussionList"] || "{}";
},
set: function(e) {
this._discussionList = JSON.parse(e), n[this.fileIndex + ".discussionList"] = e;
}
});
}
function r(e, t) {
e.push('<i class="icon-provider-' + t.provider.providerId + '"></i>');
}
function o(e, t) {
if (t.provider.getSyncLocationLink) {
var n = t.provider.getSyncLocationLink(t);
e.push([ '<a href="', n, '" target="_blank" title="Open in ', t.provider.providerName, '"><i class="icon-provider-', t.provider.providerId, '"></i><i class="icon-link-ext-alt"></i></a>' ].join(""));
} else r(e, t);
}
function a(e, t) {
if (t.provider.getPublishLocationLink) {
var n = t.provider.getPublishLocationLink(t);
e.push([ '<a href="', n, '" target="_blank" title="Open in ', t.provider.providerName, '"><i class="icon-provider-', t.provider.providerId, '"></i><i class="icon-link-ext-alt"></i></a>' ].join(""));
} else r(e, t);
}
return i.prototype.addSyncLocation = function(e) {
t.storeAttributes(e), t.appendIndexToArray(this.fileIndex + ".sync", e.syncIndex),
this.syncLocations[e.syncIndex] = e;
}, i.prototype.removeSyncLocation = function(e) {
t.removeIndexFromArray(this.fileIndex + ".sync", e.syncIndex), delete this.syncLocations[e.syncIndex];
}, i.prototype.addPublishLocation = function(e) {
t.storeAttributes(e), t.appendIndexToArray(this.fileIndex + ".publish", e.publishIndex),
this.publishLocations[e.publishIndex] = e;
}, i.prototype.removePublishLocation = function(e) {
t.removeIndexFromArray(this.fileIndex + ".publish", e.publishIndex), delete this.publishLocations[e.publishIndex];
}, i.prototype.composeTitle = function(t) {
var n = [], i = t ? o : r, s = t ? a : r;
return e.chain(this.syncLocations).sortBy(function(e) {
return e.provider.providerId;
}).each(function(e) {
i(n, e);
}), 0 !== e.size(this.syncLocations) && n.push('<i class="icon-refresh title-icon-category"></i>'),
e.chain(this.publishLocations).sortBy(function(e) {
return e.provider.providerId;
}).each(function(e) {
s(n, e);
}), 0 !== e.size(this.publishLocations) && n.push('<i class="icon-upload title-icon-category"></i>'),
n.push(e.escape(this.title)), n.join("");
}, i;
}), define("fileSystem", [ "underscore", "utils", "classes/FileDescriptor", "storage" ], function(e, t, n, i) {
var r = {};
return t.retrieveIndexArray("file.list").forEach(function(e) {
r[e] = new n(e);
}), Object.keys(i).forEach(function(e) {
var t = e.match(/(file\.\S+?)\.\S+/);
t && !r.hasOwnProperty(t[1]) && i.removeItem(e);
}), r;
}), define("text!html/documentSelectorSettingsBlock.html", [], function() {
return '<p>Allows toggling document with keyboard shortcuts.</p>\n<div class="form-horizontal">\n <div class="form-group">\n <label class="col-sm-5 control-label" for="select-document-selector-orderby">Order\n by</label>\n <div class="col-sm-6">\n <select id="select-document-selector-orderby" class="form-control">\n <option value="title">Document title</option>\n <option value="mru">Most recently used</option>\n </select>\n </div>\n </div>\n <div class="form-group">\n <label class="col-sm-5 control-label"\n for="input-document-selector-shortcut-previous">"Previous"\n shortcut <a href="http://craig.is/killing/mice#keys" target="_blank">(?)</a></label>\n <div class="col-sm-6">\n <input type="text" id="input-document-selector-shortcut-previous"\n class="form-control">\n </div>\n </div>\n <div class="form-group">\n <label class="col-sm-5 control-label"\n for="input-document-selector-shortcut-next">"Next"\n shortcut <a href="http://craig.is/killing/mice#keys" target="_blank">(?)</a></label>\n <div class="col-sm-6">\n <input type="text" id="input-document-selector-shortcut-next"\n class="form-control">\n </div>\n </div>\n</div>';
}), define("extensions/documentSelector", [ "jquery", "underscore", "crel", "utils", "classes/Extension", "mousetrap", "fileSystem", "text!html/documentSelectorSettingsBlock.html" ], function(e, t, n, i, r, o, a, s) {
var l = new r("documentSelector", "Document Selector", !0);
l.settingsBlock = s, l.defaultConfig = {
orderBy: "mru",
shortcutPrevious: "Ctrl+[",
shortcutNext: "Ctrl+]"
}, l.onLoadSettings = function() {
i.setInputValue("#select-document-selector-orderby", l.config.orderBy), i.setInputValue("#input-document-selector-shortcut-previous", l.config.shortcutPrevious),
i.setInputValue("#input-document-selector-shortcut-next", l.config.shortcutNext);
}, l.onSaveSettings = function(e, t) {
e.orderBy = i.getInputValue("#select-document-selector-orderby"), e.shortcutPrevious = i.getInputTextValue("#input-document-selector-shortcut-previous", t),
e.shortcutNext = i.getInputTextValue("#input-document-selector-shortcut-next", t);
};
var c;
l.onFileMgrCreated = function(e) {
c = e;
};
var u, d, p, h, f, m, g, v = [ '<li class="<%= isCurrent ? "disabled" : "" %>" data-file-index="<%= fileDesc.fileIndex %>">', ' <a href="#">', " <%= fileDesc.composeTitle() %>", " </a>", "</li>" ].join(""), b = t.debounce(function() {
var n = t.chain(a).sortBy(h).reduce(function(e, n) {
return e + t.template(v, {
fileDesc: n,
isCurrent: n === f
});
}, "").value();
u.innerHTML = n, p = [], d = {}, t.each(u.querySelectorAll("li"), function(t) {
var n = e(t);
p.push(n);
var i = a[n.data("fileIndex")];
d[i.fileIndex] = n;
});
}, 50);
return l.onFileSelected = function(e) {
f = e, b();
}, l.onFileCreated = b, l.onFileDeleted = b, l.onTitleChanged = b, l.onSyncExportSuccess = b,
l.onSyncRemoved = b, l.onNewPublishSuccess = b, l.onPublishRemoved = b, l.onReady = function() {
g = e("#wmd-input"), "title" == l.config.orderBy ? h = function(e) {
return e.title.toLowerCase();
} : "mru" == l.config.orderBy && (h = function(e) {
return -e.selectTime;
}), u = n("ul", {
"class": "dropdown-menu dropdown-file-selector"
}), document.querySelector(".navbar").appendChild(n("div", n("div", {
"data-toggle": "dropdown"
}), u));
var i = e(u).dropdown(), r = e(".document-panel .collapse-button");
r.prop("title", t.template("<%= title %> <%= shortcutPrevious %> <%= shortcutNext %>", {
title: r.prop("title"),
shortcutPrevious: l.config.shortcutPrevious,
shortcutNext: l.config.shortcutNext
}));
var s = l.config.shortcutPrevious.toLowerCase();
o.bind(s, function() {
void 0 === m && (i.dropdown("toggle"), m = d[f.fileIndex]);
var e = t.indexOf(p, m) - 1;
return -2 === e && (e = -1), m = p[(e + p.length) % p.length], setTimeout(function() {
m.find("a").focus();
}, 10), !1;
});
var v = l.config.shortcutNext.toLowerCase();
o.bind(l.config.shortcutNext.toLowerCase(), function() {
void 0 === m && (i.dropdown("toggle"), m = d[f.fileIndex]);
var e = t.indexOf(p, m) + 1;
return m = p[e % p.length], setTimeout(function() {
m.find("a").focus();
}, 10), !1;
});
var b = s.indexOf("+"), y = -1 === b ? s : s.substring(0, b), x = v.indexOf("+"), w = -1 === x ? v : v.substring(0, x);
o.bind([ y, w ], function() {
void 0 !== m && m.find("a").click();
}, "keyup"), i.on("click", "a", function() {
m = void 0;
var t = e(this.parentNode), n = a[t.data("fileIndex")];
t.hasClass("disabled") ? g.focus() : c.selectFile(n);
});
}, l;
}), define("classes/FolderDescriptor", [ "underscore", "utils", "storage", "fileSystem" ], function(e, t, n, i) {
function r(r, o) {
this.folderIndex = r, this._name = o || n[r + ".name"], this.fileList = {}, e.each(t.retrieveIndexArray(r + ".files"), function(e) {
try {
var n = i[e];
n.folder = this, this.fileList[e] = n;
} catch (n) {
t.removeIndexFromArray(r + ".files", e);
}
}, this), Object.defineProperty(this, "name", {
get: function() {
return this._name;
},
set: function(e) {
this._name = e, n[this.folderIndex + ".name"] = e;
}
});
}
return r.prototype.addFile = function(e) {
e.folder = this, t.appendIndexToArray(this.folderIndex + ".files", e.fileIndex),
this.fileList[e.fileIndex] = e;
}, r.prototype.removeFile = function(e) {
e.folder = void 0, t.removeIndexFromArray(this.folderIndex + ".files", e.fileIndex),
delete this.fileList[e.fileIndex];
}, r;
}), define("folderList", [ "underscore", "utils", "storage", "classes/FolderDescriptor", "storage" ], function(e, t, n, i) {
var r = {};
return t.retrieveIndexArray("folder.list").forEach(function(e) {
r[e] = new i(e);
}), Object.keys(n).forEach(function(e) {
var t = e.match(/(folder\.\S+?)\.\S+/);
t && !r.hasOwnProperty(t[1]) && n.removeItem(e);
}), r;
}), define("extensions/documentPanel", [ "jquery", "underscore", "utils", "classes/Extension", "folderList", "fileSystem" ], function(e, t, n, i, r, o) {
function a(n) {
if (n != y) {
if (y = n, b.scrollTop = 0, !n) return h.addClass("hide"), void d.removeClass("hide");
var i = n.toLowerCase().split(/\s+/);
t.each(p.querySelectorAll(".file"), function(n) {
var r = e(n), o = r.text().toLowerCase();
r.toggle(!t.some(i, function(e) {
return -1 === o.indexOf(e);
}));
}), h.removeClass("hide"), d.addClass("hide");
}
}
var s, l = new i("documentPanel", "Document Panel");
l.onFileMgrCreated = function(e) {
s = e;
};
var c, u, d, p, h, f, m = [ '<a href="#"', ' class="list-group-item folder clearfix"', ' data-folder-index="<%= folderDesc.folderIndex %>"', ' data-toggle="collapse"', ' data-target=".file-list.<%= id %>">', ' <div class="pull-right file-count">', " <%= _.size(folderDesc.fileList) %>", " </div>", ' <i class="icon-folder"></i> <%= folderDesc.name %>', "</a>", '<div class="file-list collapse <%= id %> clearfix">', " <%= fileListHtml %>", "</div>" ].join(""), g = [ '<a href="#"', ' class="list-group-item file<%= fileDesc === selectedFileDesc ? " active" : "" %>"', ' data-file-index="<%= fileDesc.fileIndex %>">', " <%= fileDesc.composeTitle() %>", "</a>" ].join(""), v = t.debounce(function() {
var e = t.filter(o, function(e) {
return void 0 === e.folder;
}), n = t.chain(e).sortBy(function(e) {
return e.title.toLowerCase();
}).reduce(function(e, n) {
return e + "<li>" + t.template(g, {
fileDesc: n,
selectedFileDesc: f
}) + "</li>";
}, "").value();
n = n && '<ul class="nav">' + n + "</ul>", t.chain(r).sortBy(function(e) {
return e.name.toLowerCase();
}).each(function(e) {
var i = t.chain(e.fileList).sortBy(function(e) {
return e.title.toLowerCase();
}).reduce(function(e, n) {
return e + "<li>" + t.template(g, {
fileDesc: n,
selectedFileDesc: f
}) + "</li>";
}, "").value();
i = i && '<ul class="nav">' + i + "</ul>", n += t.template(m, {
folderDesc: e,
fileListHtml: i,
id: e.folderIndex.replace(".", "")
});
}), u.innerHTML = n;
var i = t.chain(o).sortBy(function(e) {
return e.title.toLowerCase();
}).reduce(function(e, n) {
return e + "<li>" + t.template(g, {
fileDesc: n,
selectedFileDesc: f
}) + "</li>";
}, "").value();
i = '<ul class="nav">' + i + "</ul>", p.innerHTML = i;
}, 50);
l.onFileSelected = function(e) {
f = e, v();
}, l.onFileCreated = v, l.onFileDeleted = v, l.onTitleChanged = v, l.onSyncExportSuccess = v,
l.onSyncRemoved = v, l.onNewPublishSuccess = v, l.onPublishRemoved = v, l.onFoldersChanged = v;
var b, y = "";
return l.onReady = function() {
c = document.querySelector(".document-panel"), b = c.querySelector(".panel-content"),
u = c.querySelector(".document-list"), d = e(u), p = c.querySelector(".document-list-filtered"),
h = e(p), e(c).on("show.layout.toggle", function() {
var t = f.folder;
void 0 !== t && e(c.querySelector(".file-list." + t.folderIndex.replace(".", ""))).collapse("show");
}).on("shown.layout.toggle", function() {
var e = u.querySelector(".file.active");
e && (b.scrollTop += e.getBoundingClientRect().top - 240);
}).on("hidden.layout.toggle", function() {
t.val(""), a("");
}).on("click", ".file", function() {
var t = e(this), n = o[t.data("fileIndex")];
n && n !== f && s.selectFile(n);
});
var t = e(c.querySelector(".search-bar .form-control"));
t.bind("propertychange keyup input paste", function() {
a(t.val());
});
}, l;
}), define("extensions/documentManager", [ "jquery", "underscore", "constants", "utils", "storage", "classes/Extension", "classes/FolderDescriptor", "folderList", "fileSystem" ], function(e, t, n, i, r, o, a, s, l) {
function c() {
D = [], I = [], t.each(v.querySelectorAll('input[type="checkbox"]:checked'), function(t) {
var n = e(t.parentNode.parentNode), i = s[n.data("folderIndex")], r = l[n.data("fileIndex")];
void 0 !== i ? D.push(i) : void 0 !== r && I.push(r);
});
}
function u() {
if (0 === t.size(I)) return void d();
var n = t.chain(I).sortBy(function(e) {
return e.title.toLowerCase();
}).reduce(function(e, n) {
return e + t.template(T, {
fileDesc: n
});
}, "").value();
b.innerHTML = '<ul class="file-list nav">' + n + "</ul>", e(g.querySelectorAll(".document-list")).addClass("hide"),
e(g.querySelectorAll(".confirm-delete, .selected-document-list")).removeClass("hide");
}
function d() {
t.each(I, function(e) {
e.folder && e.folder.removeFile(e), p.deleteFile(e);
}), t.each(D, function(e) {
i.removeIndexFromArray("folder.list", e.folderIndex), delete s[e.folderIndex];
}), f.onFoldersChanged();
}
var p, h = new o("documentManager", "Document Manager", !1, !0);
h.onFileMgrCreated = function(e) {
p = e;
};
var f;
h.onEventMgrCreated = function(e) {
f = e;
};
var m, g, v, b, y, x, w, S, C, _ = [ '<a href="#" class="list-group-item folder clearfix" data-folder-index="<%= folderDesc.folderIndex %>" data-toggle="collapse" data-target=".modal-document-manager .file-list.<%= id %>">', '<label class="checkbox" title="Select"><input type="checkbox"></label>', '<button class="btn btn-default button-delete" title="Delete"><i class="icon-trash"></i></button>', '<button class="btn btn-default button-rename" title="Rename"><i class="icon-pencil"></i></button>', '<div class="pull-right file-count"><%= _.size(folderDesc.fileList) %></div>', '<div class="name"><i class="icon-folder"></i> ', "<%= folderDesc.name %></div>", '<input type="text" class="input-rename form-control hide"></a>', '<div class="file-list collapse <%= id %> clearfix"><%= fileListHtml %></div>' ].join(""), k = [ '<li class="list-group-item file clearfix" data-file-index="<%= fileDesc.fileIndex %>">', '<label class="checkbox" title="Select"><input type="checkbox"></label>', '<button class="btn btn-default button-delete" title="Delete"><i class="icon-trash"></i></button>', '<button class="btn btn-default button-rename" title="Rename"><i class="icon-pencil"></i></button>', '<div class="name"><%= fileDesc.composeTitle() %></div>', '<input type="text" class="input-rename form-control hide"></li>' ].join(""), E = [ '<a href="#" class="list-group-item folder clearfix" data-folder-index="<%= folderDesc.folderIndex %>">', '<div class="pull-right file-count"><%= _.size(folderDesc.fileList) %></div>', '<div class="name"><i class="icon-forward"></i> ', "<%= folderDesc.name %></div></a>" ].join(""), T = [ '<li class="list-group-item file clearfix">', '<div class="name"><%= fileDesc.composeTitle() %></div></li>' ].join(""), I = [], D = [], N = t.debounce(function() {
c(), y.toggleClass("disabled", 0 === t.size(s) || 0 === t.size(I)), x.toggleClass("disabled", 0 === t.size(D) && 0 === t.size(I));
}, 50), M = t.debounce(function() {
if (!1 !== m) {
N(), S.text(t.size(l)), C.text(t.size(s) + 1), w = t.filter(l, function(e) {
return void 0 === e.folder;
});
var e = [ '<a href="#" class="list-group-item folder root-folder clearfix" data-toggle="collapse" data-target=".modal-document-manager .file-list.root-folder">', '<label class="checkbox" title="Select"><input type="checkbox"></label>', '<div class="pull-right file-count">', t.size(w), "</div>", '<div class="name"><i class="icon-folder"></i> ', "ROOT folder</div></a>" ].join(""), n = t.chain(w).sortBy(function(e) {
return e.title.toLowerCase();
}).reduce(function(e, n) {
return e + t.template(k, {
fileDesc: n
});
}, "").value();
n = n && '<ul class="nav">' + n + "</ul>", e += '<div class="file-list collapse root-folder clearfix">' + n + "</div>",
t.chain(s).sortBy(function(e) {
return e.name.toLowerCase();
}).each(function(n) {
var i = t.chain(n.fileList).sortBy(function(e) {
return e.title.toLowerCase();
}).reduce(function(e, n) {
return e + t.template(k, {
fileDesc: n
});
}, "").value();
i = i && '<ul class="nav">' + i + "</ul>", e += t.template(_, {
folderDesc: n,
fileListHtml: i,
id: n.folderIndex.replace(".", "")
});
}), v.innerHTML = e;
}
}, 50);
return h.onFileCreated = M, h.onFileDeleted = M, h.onSyncExportSuccess = M, h.onSyncRemoved = M,
h.onNewPublishSuccess = M, h.onPublishRemoved = M, h.onFoldersChanged = M, h.onTitleChanged = function(t) {
!1 !== m && (e(v).find('[data-file-index="' + t.fileIndex + '"] .name').html(t.composeTitle()).removeClass("hide"),
e(v.querySelectorAll(".input-rename")).addClass("hide"));
}, h.onReady = function() {
g = document.querySelector(".modal-document-manager"), v = g.querySelector(".list-group.document-list"),
S = e(g.querySelectorAll(".document-count")), C = e(g.querySelectorAll(".folder-count")),
b = g.querySelector(".list-group.selected-document-list");
var o = g.querySelector(".list-group.select-folder-list");
e(g).on("show.bs.modal", function() {
m = !0, M(), setTimeout(function() {
e(v.querySelectorAll(".root-folder")).click();
}, 250);
}).on("hide.bs.modal", function() {
m = !1, v.innerHTML = "";
}), e(g.querySelectorAll(".action-create-folder")).click(function() {
var o;
do o = "folder." + i.id(); while (t.has(s, o));
r[o + ".name"] = n.DEFAULT_FOLDER_NAME;
var l = new a(o, n.DEFAULT_FOLDER_NAME);
i.appendIndexToArray("folder.list", o), s[o] = l, f.onFoldersChanged(), setTimeout(function() {
var t = e(g.querySelector('[data-folder-index="' + o + '"] .button-rename')).click();
g.scrollTop += t.offset().top - 50;
}, 60);
}), e(g.querySelectorAll(".action-select-all")).click(function() {
e(v.querySelectorAll('.folder input[type="checkbox"]')).prop("checked", !0).change();
}), e(g.querySelectorAll(".action-unselect-all")).click(function() {
e(v.querySelectorAll('.folder input[type="checkbox"]')).prop("checked", !1).change();
});
var p = e(g.querySelectorAll(".action-delete-items")).click(function() {
x.hasClass("disabled") || (c(), u());
});
x = p.parent(), e(g.querySelectorAll(".action-delete-items-confirm")).click(function() {
d(), e(g.querySelectorAll(".document-list")).removeClass("hide"), e(g.querySelectorAll(".confirm-delete, .selected-document-list")).addClass("hide");
});
var h = e(g.querySelectorAll(".action-move-items")).click(function() {
if (!y.hasClass("disabled")) {
c();
var n = [ '<a href="#" class="list-group-item folder clearfix">', '<div class="pull-right file-count">', t.size(w), "</div>", '<div class="name"><i class="icon-forward"></i> ', "ROOT folder</div></a>" ].join("");
n += t.chain(s).sortBy(function(e) {
return e.name.toLowerCase();
}).reduce(function(e, n) {
return e + t.template(E, {
folderDesc: n
});
}, "").value(), o.innerHTML = n, t.each(o.querySelectorAll(".folder"), function(n) {
n = e(n), n.click(function() {
var i = s[n.data("folderIndex")];
t.each(I, function(e) {
e.folder && e.folder.removeFile(e), i && i.addFile(e);
}), f.onFoldersChanged(), e(g.querySelectorAll(".document-list")).removeClass("hide"),
e(g.querySelectorAll(".choose-folder, .select-folder-list")).addClass("hide");
});
}), e(g.querySelectorAll(".document-list")).addClass("hide"), e(g.querySelectorAll(".choose-folder, .select-folder-list")).removeClass("hide");
}
});
y = h.parent(), e(g.querySelectorAll(".action-cancel")).click(function() {
e(g.querySelectorAll(".document-list")).removeClass("hide"), e(g.querySelectorAll(".confirm-delete, .choose-folder, .selected-document-list, .select-folder-list")).addClass("hide");
}), e(v).on("click", ".button-delete", function(t) {
t.stopPropagation();
var n = e(this), i = n.parent(), r = s[i.data("folderIndex")], o = l[i.data("fileIndex")];
I = [], D = [], r ? (D.push(r), I = r.fileList) : o && I.push(o), u();
}).on("click", ".button-rename", function(t) {
t.stopPropagation();
var n, i = e(this.parentNode), r = s[i.data("folderIndex")], o = l[i.data("fileIndex")];
r ? n = r.name : o && (n = o.title), i.find(".name").addClass("hide"), i.find(".input-rename").removeClass("hide").val(n)[0].select();
}).on("blur keyup", ".input-rename", function(t) {
function n() {
var t = i.parent(), n = e.trim(i.val()), r = s[t.data("folderIndex")], o = l[t.data("fileIndex")];
n && r && n != r.name ? (r.name = n, f.onFoldersChanged()) : n && o && n != o.title ? (o.title = n,
f.onTitleChanged(o)) : (i.addClass("hide"), t.find(".name").removeClass("hide"));
}
var i = e(this);
void 0 === t.keyCode ? n() : 13 == t.keyCode ? (n(), t.stopPropagation()) : 27 == t.keyCode && (i.val(""),
n(), t.stopPropagation());
}).on("click", ".file .checkbox", function(e) {
e.stopPropagation();
}).on("change", ".file .checkbox input", function() {
e(this).parents(".file-list").prev().find(".checkbox input").prop("checked", !1),
N();
}).on("click", ".folder .checkbox", function(e) {
e.stopPropagation();
}).on("change", ".folder .checkbox input", function() {
e(this).parents(".folder").next().find(".checkbox input").prop("checked", this.checked),
N();
});
}, h;
}), define("extensions/workingIndicator", [ "jquery", "underscore", "crel", "classes/Extension" ], function(e, t, n, i) {
var r, o, a = new i("workingIndicator", "Working Indicator"), s = [ "@<%= prefix %>keyframes <%= name %> {", " 0% { opacity:<%= z %>; }", " <%= start %>.01% { opacity:<%= alpha %>; }", " <%= start %>.02% { opacity:1; }", " <%= ((start + trail) % 100) %>.01% { opacity:<%= alpha %>; }", " 100% { opacity:<%= z %>; }", "}" ].join("\n");
return a.onAsyncRunning = function(e) {
r.toggleClass("working", e), o.toggleClass("hide", !e);
}, a.onReady = function() {
var i = "";
r = e(document.body), o = e('<div class="hide">'), e(".working-indicator").append(o);
for (var a = 0; 3 > a; a++) {
var l = "working-indicator-bar" + a;
!function(e) {
e.z = Math.max(1 - (1 - e.alpha) / e.trail * (100 - e.start), e.alpha), i += t.template(s, t.extend({
prefix: ""
}, e)), i += t.template(s, t.extend({
prefix: "-webkit-"
}, e));
}({
name: l,
alpha: .25,
start: 20 * a,
trail: 50
});
var c = l + " 0.7s linear infinite";
o.append(e('<div class="bar">').css({
animation: c,
"-webkit-animation": c
}));
}
var u = n("style", {
type: "text/css"
});
document.head.appendChild(u), u.innerHTML = i;
}, a;
}), function(e) {
var t = function() {
return !1 === e.support.boxModel && e.support.objectAll && e.support.leadingWhitespace;
}();
e.jGrowl = function(t, n) {
0 == e("#jGrowl").size() && e('<div id="jGrowl"></div>').addClass(n && n.position ? n.position : e.jGrowl.defaults.position).appendTo("body"),
e("#jGrowl").jGrowl(t, n);
}, e.fn.jGrowl = function(t, n) {
if (e.isFunction(this.each)) {
var i = arguments;
return this.each(function() {
void 0 == e(this).data("jGrowl.instance") && (e(this).data("jGrowl.instance", e.extend(new e.fn.jGrowl(), {
notifications: [],
element: null,
interval: null
})), e(this).data("jGrowl.instance").startup(this)), e.isFunction(e(this).data("jGrowl.instance")[t]) ? e(this).data("jGrowl.instance")[t].apply(e(this).data("jGrowl.instance"), e.makeArray(i).slice(1)) : e(this).data("jGrowl.instance").create(t, n);
});
}
}, e.extend(e.fn.jGrowl.prototype, {
defaults: {
pool: 0,
header: "",
group: "",
sticky: !1,
position: "top-right",
glue: "after",
theme: "default",
themeState: "highlight",
corners: "10px",
check: 250,
life: 3e3,
closeDuration: "normal",
openDuration: "normal",
easing: "swing",
closer: !0,
closeTemplate: "&times;",
closerTemplate: "<div>[ close all ]</div>",
log: function() {},
beforeOpen: function() {},
afterOpen: function() {},
open: function() {},
beforeClose: function() {},
close: function() {},
animateOpen: {
opacity: "show"
},
animateClose: {
opacity: "hide"
}
},
notifications: [],
element: null,
interval: null,
create: function(t, n) {
var n = e.extend({}, this.defaults, n);
void 0 !== n.speed && (n.openDuration = n.speed, n.closeDuration = n.speed), this.notifications.push({
message: t,
options: n
}), n.log.apply(this.element, [ this.element, t, n ]);
},
render: function(t) {
var n = this, i = t.message, r = t.options;
r.themeState = "" == r.themeState ? "" : "ui-state-" + r.themeState;
var t = e("<div/>").addClass("jGrowl-notification " + r.themeState + " ui-corner-all" + (void 0 != r.group && "" != r.group ? " " + r.group : "")).append(e("<div/>").addClass("jGrowl-close").html(r.closeTemplate)).append(e("<div/>").addClass("jGrowl-header").html(r.header)).append(e("<div/>").addClass("jGrowl-message").html(i)).data("jGrowl", r).addClass(r.theme).children("div.jGrowl-close").bind("click.jGrowl", function() {
e(this).parent().trigger("jGrowl.beforeClose");
}).parent();
e(t).bind("mouseover.jGrowl", function() {
e("div.jGrowl-notification", n.element).data("jGrowl.pause", !0);
}).bind("mouseout.jGrowl", function() {
e("div.jGrowl-notification", n.element).data("jGrowl.pause", !1);
}).bind("jGrowl.beforeOpen", function() {
!1 !== r.beforeOpen.apply(t, [ t, i, r, n.element ]) && e(this).trigger("jGrowl.open");
}).bind("jGrowl.open", function() {
!1 !== r.open.apply(t, [ t, i, r, n.element ]) && ("after" == r.glue ? e("div.jGrowl-notification:last", n.element).after(t) : e("div.jGrowl-notification:first", n.element).before(t),
e(this).animate(r.animateOpen, r.openDuration, r.easing, function() {
!1 === e.support.opacity && this.style.removeAttribute("filter"), null !== e(this).data("jGrowl") && (e(this).data("jGrowl").created = new Date()),
e(this).trigger("jGrowl.afterOpen");
}));
}).bind("jGrowl.afterOpen", function() {
r.afterOpen.apply(t, [ t, i, r, n.element ]);
}).bind("jGrowl.beforeClose", function() {
!1 !== r.beforeClose.apply(t, [ t, i, r, n.element ]) && e(this).trigger("jGrowl.close");
}).bind("jGrowl.close", function() {
e(this).data("jGrowl.pause", !0), e(this).animate(r.animateClose, r.closeDuration, r.easing, function() {
e.isFunction(r.close) ? !1 !== r.close.apply(t, [ t, i, r, n.element ]) && e(this).remove() : e(this).remove();
});
}).trigger("jGrowl.beforeOpen"), "" != r.corners && void 0 != e.fn.corner && e(t).corner(r.corners),
e("div.jGrowl-notification:parent", n.element).size() > 1 && 0 == e("div.jGrowl-closer", n.element).size() && !1 !== this.defaults.closer && e(this.defaults.closerTemplate).addClass("jGrowl-closer " + this.defaults.themeState + " ui-corner-all").addClass(this.defaults.theme).appendTo(n.element).animate(this.defaults.animateOpen, this.defaults.speed, this.defaults.easing).bind("click.jGrowl", function() {
e(this).siblings().trigger("jGrowl.beforeClose"), e.isFunction(n.defaults.closer) && n.defaults.closer.apply(e(this).parent()[0], [ e(this).parent()[0] ]);
});
},
update: function() {
e(this.element).find("div.jGrowl-notification:parent").each(function() {
void 0 != e(this).data("jGrowl") && void 0 !== e(this).data("jGrowl").created && e(this).data("jGrowl").created.getTime() + parseInt(e(this).data("jGrowl").life) < new Date().getTime() && !0 !== e(this).data("jGrowl").sticky && (void 0 == e(this).data("jGrowl.pause") || !0 !== e(this).data("jGrowl.pause")) && e(this).trigger("jGrowl.beforeClose");
}), this.notifications.length > 0 && (0 == this.defaults.pool || e(this.element).find("div.jGrowl-notification:parent").size() < this.defaults.pool) && this.render(this.notifications.shift()),
e(this.element).find("div.jGrowl-notification:parent").size() < 2 && e(this.element).find("div.jGrowl-closer").animate(this.defaults.animateClose, this.defaults.speed, this.defaults.easing, function() {
e(this).remove();
});
},
startup: function(n) {
this.element = e(n).addClass("jGrowl").append('<div class="jGrowl-notification"></div>'),
this.interval = setInterval(function() {
e(n).data("jGrowl.instance").update();
}, parseInt(this.defaults.check)), t && e(this.element).addClass("ie6");
},
shutdown: function() {
e(this.element).removeClass("jGrowl").find("div.jGrowl-notification").trigger("jGrowl.close").parent().empty(),
clearInterval(this.interval);
},
close: function() {
e(this.element).find("div.jGrowl-notification").each(function() {
e(this).trigger("jGrowl.beforeClose");
});
}
}), e.jGrowl.defaults = e.fn.jGrowl.prototype.defaults;
}(jQuery), define("jgrowl", [ "jquery" ], function(e) {
return function() {
return e.jQuery.jGrowl;
};
}(this)), define("text!html/notificationsSettingsBlock.html", [], function() {
return '<p>Shows notification messages in the bottom-right corner of the\n screen.</p>\n<div class="form-horizontal">\n <div class="form-group">\n <label class="col-sm-4 control-label" for="input-notifications-timeout">Timeout</label>\n <div class="col-sm-7 form-inline">\n <input type="text" id="input-notifications-timeout"\n class="col-sm-5 form-control"> <span class="help-inline">ms</span>\n </div>\n </div>\n</div>';
}), define("extensions/notifications", [ "jquery", "underscore", "utils", "logger", "classes/Extension", "jgrowl", "text!html/notificationsSettingsBlock.html" ], function(e, t, n, i, r, o, a) {
function s() {
!1 === h && (o.defaults.life = u.config.timeout, o.defaults.closer = !1, o.defaults.closeTemplate = "",
o.defaults.position = "bottom-right", h = !0);
}
function l(e, n, r) {
if (i.info(e), s(), e) {
var a = e.indexOf("|");
(-1 === a || (e = e.substring(0, a))) && (r = r || {}, n = n || "icon-info-circled",
o("<i class='icon-white " + n + "'></i> " + t.escape(e).replace(/\n/g, "<br/>"), r));
}
}
function c() {
!1 !== f && (d.toggleClass("hide", !m), p.toggleClass("hide", m));
}
var u = new r("notifications", "Notifications");
u.settingsBlock = a, u.defaultConfig = {
timeout: 8e3
}, u.onLoadSettings = function() {
n.setInputValue("#input-notifications-timeout", u.config.timeout);
}, u.onSaveSettings = function(e, t) {
e.timeout = n.getInputIntValue("#input-notifications-timeout", t, 1, 6e4);
};
var d, p, h = !1, f = !1;
u.onReady = function() {
f = !0, d = e(".navbar .offline-status"), p = e(".navbar .extension-buttons"), c();
}, u.onMessage = function(e) {
l(e);
}, u.onError = function(e) {
i.error(e), t.isString(e) ? l(e, "icon-attention") : t.isObject(e) && l(e.message, "icon-attention");
};
var m = !1;
return u.onOfflineChanged = function(e) {
m = e, c(), !0 === m ? l("You are offline.", "icon-attention-circled msg-offline") : l("You are back online!", "icon-signal");
}, u.onSyncImportSuccess = function(e, n) {
l(t.map(e, function(e) {
return e.title;
}).join(", ") + " imported successfully from " + n.providerName + ".");
}, u.onSyncExportSuccess = function(e, t) {
l('"' + e.title + '" will now be synchronized on ' + t.provider.providerName + ".");
}, u.onSyncRemoved = function(e, t) {
l(t.provider.providerName + " synchronized location has been removed.");
}, u.onPublishSuccess = function(e) {
l('"' + e.title + '" successfully published.');
}, u.onNewPublishSuccess = function(e, t) {
l('"' + e.title + '" is now published on ' + t.provider.providerName + ".");
}, u.onPublishRemoved = function(e, t) {
l(t.provider.providerName + " publish location has been removed.");
}, u;
}), define("text!html/umlDiagramsSettingsBlock.html", [], function() {
return '<p>Creates UML diagrams from plain text description.</p>\n\n<div class="form-horizontal">\n <div class="form-group">\n <label class="col-sm-4 control-label" for="textarea-umldiagram-flowchart-options">Flow charts options (JSON)\n </label>\n <div class="col-sm-7">\n <textarea id="textarea-umldiagram-flowchart-options" class="form-control"></textarea>\n </div>\n </div>\n</div>\n<br>\n<p>Sequence diagrams:</p>\n<pre><div class="help-block pull-right"><a target="_blank" href="http://bramp.github.io/js-sequence-diagrams/">More info</a></div><code>```sequence\nAlice->Bob: Hello Bob, how are you?\nBob-->Alice: I am good thanks!\n```</code>\n</pre>\n\n<p>Flow charts:</p>\n<pre><div class="help-block pull-right"><a target="_blank" href="http://adrai.github.io/flowchart.js/">More info</a></div><code>```flow\nst=>start: Start\ne=>end\nop=>operation: My Operation\ncond=>condition: Yes or No?\nst->op->cond\ncond(yes)->e\ncond(no)->op\n```</code>\n</pre>\n<blockquote>\n <p><b>Note:</b> Markdown Extra extension has to be enabled with GFM fenced code blocks option.</p>\n</blockquote>\n';
}), function(e) {
var t, n, i = "hasOwnProperty", r = /[\.\/]/, o = function() {}, a = function(e, t) {
return e - t;
}, s = {
n: {}
}, l = function(e, i) {
e = String(e);
var r, o = n, s = Array.prototype.slice.call(arguments, 2), c = l.listeners(e), u = 0, d = [], p = {}, h = [], f = t;
t = e, n = 0;
for (var m = 0, g = c.length; g > m; m++) "zIndex" in c[m] && (d.push(c[m].zIndex),
c[m].zIndex < 0 && (p[c[m].zIndex] = c[m]));
for (d.sort(a); d[u] < 0; ) if (r = p[d[u++]], h.push(r.apply(i, s)), n) return n = o,
h;
for (m = 0; g > m; m++) if ("zIndex" in (r = c[m])) if (r.zIndex == d[u]) {
if (h.push(r.apply(i, s)), n) break;
do if (u++, r = p[d[u]], r && h.push(r.apply(i, s)), n) break; while (r);
} else p[r.zIndex] = r; else if (h.push(r.apply(i, s)), n) break;
return n = o, t = f, h.length ? h : null;
};
l._events = s, l.listeners = function(e) {
var t, n, i, o, a, l, c, u, d = e.split(r), p = s, h = [ p ], f = [];
for (o = 0, a = d.length; a > o; o++) {
for (u = [], l = 0, c = h.length; c > l; l++) for (p = h[l].n, n = [ p[d[o]], p["*"] ],
i = 2; i--; ) (t = n[i]) && (u.push(t), f = f.concat(t.f || []));
h = u;
}
return f;
}, l.on = function(e, t) {
if (e = String(e), "function" != typeof t) return function() {};
for (var n = e.split(r), i = s, a = 0, l = n.length; l > a; a++) i = i.n, i = i.hasOwnProperty(n[a]) && i[n[a]] || (i[n[a]] = {
n: {}
});
for (i.f = i.f || [], a = 0, l = i.f.length; l > a; a++) if (i.f[a] == t) return o;
return i.f.push(t), function(e) {
+e == +e && (t.zIndex = +e);
};
}, l.f = function(e) {
var t = [].slice.call(arguments, 1);
return function() {
l.apply(null, [ e, null ].concat(t).concat([].slice.call(arguments, 0)));
};
}, l.stop = function() {
n = 1;
}, l.nt = function(e) {
return e ? new RegExp("(?:\\.|\\/|^)" + e + "(?:\\.|\\/|$)").test(t) : t;
}, l.nts = function() {
return t.split(r);
}, l.off = l.unbind = function(e, t) {
if (!e) return void (l._events = s = {
n: {}
});
var n, o, a, c, u, d, p, h = e.split(r), f = [ s ];
for (c = 0, u = h.length; u > c; c++) for (d = 0; d < f.length; d += a.length - 2) {
if (a = [ d, 1 ], n = f[d].n, "*" != h[c]) n[h[c]] && a.push(n[h[c]]); else for (o in n) n[i](o) && a.push(n[o]);
f.splice.apply(f, a);
}
for (c = 0, u = f.length; u > c; c++) for (n = f[c]; n.n; ) {
if (t) {
if (n.f) {
for (d = 0, p = n.f.length; p > d; d++) if (n.f[d] == t) {
n.f.splice(d, 1);
break;
}
!n.f.length && delete n.f;
}
for (o in n.n) if (n.n[i](o) && n.n[o].f) {
var m = n.n[o].f;
for (d = 0, p = m.length; p > d; d++) if (m[d] == t) {
m.splice(d, 1);
break;
}
!m.length && delete n.n[o].f;
}
} else {
delete n.f;
for (o in n.n) n.n[i](o) && n.n[o].f && delete n.n[o].f;
}
n = n.n;
}
}, l.once = function(e, t) {
var n = function() {
return l.unbind(e, n), t.apply(this, arguments);
};
return l.on(e, n);
}, l.version = "0.4.2", l.toString = function() {
return "You are running Eve 0.4.2";
}, "undefined" != typeof module && module.exports ? module.exports = l : "undefined" != typeof define ? define("eve", [], function() {
return l;
}) : e.eve = l;
}(window || this), function(e, t) {
"function" == typeof define && define.amd ? define("raphael", [ "eve" ], function(n) {
return t(e, n);
}) : t(e, e.eve || "function" == typeof require && require("eve"));
}(this, function(e, t) {
function n(e) {
if (n.is(e, "function")) return x ? e() : t.on("raphael.DOMload", e);
if (n.is(e, V)) return n._engine.create[D](n, e.splice(0, 3 + n.is(e[0], z))).add(e);
var i = Array.prototype.slice.call(arguments, 0);
if (n.is(i[i.length - 1], "function")) {
var r = i.pop();
return x ? r.call(n._engine.create[D](n, i)) : t.on("raphael.DOMload", function() {
r.call(n._engine.create[D](n, i));
});
}
return n._engine.create[D](n, arguments);
}
function i(e) {
if ("function" == typeof e || Object(e) !== e) return e;
var t = new e.constructor();
for (var n in e) e[k](n) && (t[n] = i(e[n]));
return t;
}
function r(e, t) {
for (var n = 0, i = e.length; i > n; n++) if (e[n] === t) return e.push(e.splice(n, 1)[0]);
}
function o(e, t, n) {
function i() {
var o = Array.prototype.slice.call(arguments, 0), a = o.join("\u2400"), s = i.cache = i.cache || {}, l = i.count = i.count || [];
return s[k](a) ? (r(l, a), n ? n(s[a]) : s[a]) : (l.length >= 1e3 && delete s[l.shift()],
l.push(a), s[a] = e[D](t, o), n ? n(s[a]) : s[a]);
}
return i;
}
function a() {
return this.hex;
}
function s(e, t) {
for (var n = [], i = 0, r = e.length; r - 2 * !t > i; i += 2) {
var o = [ {
x: +e[i - 2],
y: +e[i - 1]
}, {
x: +e[i],
y: +e[i + 1]
}, {
x: +e[i + 2],
y: +e[i + 3]
}, {
x: +e[i + 4],
y: +e[i + 5]
} ];
t ? i ? r - 4 == i ? o[3] = {
x: +e[0],
y: +e[1]
} : r - 2 == i && (o[2] = {
x: +e[0],
y: +e[1]
}, o[3] = {
x: +e[2],
y: +e[3]
}) : o[0] = {
x: +e[r - 2],
y: +e[r - 1]
} : r - 4 == i ? o[3] = o[2] : i || (o[0] = {
x: +e[i],
y: +e[i + 1]
}), n.push([ "C", (-o[0].x + 6 * o[1].x + o[2].x) / 6, (-o[0].y + 6 * o[1].y + o[2].y) / 6, (o[1].x + 6 * o[2].x - o[3].x) / 6, (o[1].y + 6 * o[2].y - o[3].y) / 6, o[2].x, o[2].y ]);
}
return n;
}
function l(e, t, n, i, r) {
return e * (e * (-3 * t + 9 * n - 9 * i + 3 * r) + 6 * t - 12 * n + 6 * i) - 3 * t + 3 * n;
}
function c(e, t, n, i, r, o, a, s, c) {
null == c && (c = 1), c = c > 1 ? 1 : 0 > c ? 0 : c;
for (var u = c / 2, d = [ -.1252, .1252, -.3678, .3678, -.5873, .5873, -.7699, .7699, -.9041, .9041, -.9816, .9816 ], p = [ .2491, .2491, .2335, .2335, .2032, .2032, .1601, .1601, .1069, .1069, .0472, .0472 ], h = 0, f = 0; 12 > f; f++) {
var m = u * d[f] + u, g = l(m, e, n, r, a), v = l(m, t, i, o, s), b = g * g + v * v;
h += p[f] * j.sqrt(b);
}
return u * h;
}
function u(e, t, n, i, r, o, a, s, l) {
if (!(0 > l || c(e, t, n, i, r, o, a, s) < l)) {
var u, d = .5, p = 1 - d;
for (u = c(e, t, n, i, r, o, a, s, p); q(u - l) > .01; ) d /= 2, p += (l > u ? 1 : -1) * d,
u = c(e, t, n, i, r, o, a, s, p);
return p;
}
}
function d(e, t, n, i, r, o, a, s) {
if (!($(e, n) < G(r, a) || G(e, n) > $(r, a) || $(t, i) < G(o, s) || G(t, i) > $(o, s))) {
var l = (e * i - t * n) * (r - a) - (e - n) * (r * s - o * a), c = (e * i - t * n) * (o - s) - (t - i) * (r * s - o * a), u = (e - n) * (o - s) - (t - i) * (r - a);
if (u) {
var d = l / u, p = c / u, h = +d.toFixed(2), f = +p.toFixed(2);
if (!(h < +G(e, n).toFixed(2) || h > +$(e, n).toFixed(2) || h < +G(r, a).toFixed(2) || h > +$(r, a).toFixed(2) || f < +G(t, i).toFixed(2) || f > +$(t, i).toFixed(2) || f < +G(o, s).toFixed(2) || f > +$(o, s).toFixed(2))) return {
x: d,
y: p
};
}
}
}
function p(e, t, i) {
var r = n.bezierBBox(e), o = n.bezierBBox(t);
if (!n.isBBoxIntersect(r, o)) return i ? 0 : [];
for (var a = c.apply(0, e), s = c.apply(0, t), l = $(~~(a / 5), 1), u = $(~~(s / 5), 1), p = [], h = [], f = {}, m = i ? 0 : [], g = 0; l + 1 > g; g++) {
var v = n.findDotsAtSegment.apply(n, e.concat(g / l));
p.push({
x: v.x,
y: v.y,
t: g / l
});
}
for (g = 0; u + 1 > g; g++) v = n.findDotsAtSegment.apply(n, t.concat(g / u)), h.push({
x: v.x,
y: v.y,
t: g / u
});
for (g = 0; l > g; g++) for (var b = 0; u > b; b++) {
var y = p[g], x = p[g + 1], w = h[b], S = h[b + 1], C = q(x.x - y.x) < .001 ? "y" : "x", _ = q(S.x - w.x) < .001 ? "y" : "x", k = d(y.x, y.y, x.x, x.y, w.x, w.y, S.x, S.y);
if (k) {
if (f[k.x.toFixed(4)] == k.y.toFixed(4)) continue;
f[k.x.toFixed(4)] = k.y.toFixed(4);
var E = y.t + q((k[C] - y[C]) / (x[C] - y[C])) * (x.t - y.t), T = w.t + q((k[_] - w[_]) / (S[_] - w[_])) * (S.t - w.t);
E >= 0 && 1.001 >= E && T >= 0 && 1.001 >= T && (i ? m++ : m.push({
x: k.x,
y: k.y,
t1: G(E, 1),
t2: G(T, 1)
}));
}
}
return m;
}
function h(e, t, i) {
e = n._path2curve(e), t = n._path2curve(t);
for (var r, o, a, s, l, c, u, d, h, f, m = i ? 0 : [], g = 0, v = e.length; v > g; g++) {
var b = e[g];
if ("M" == b[0]) r = l = b[1], o = c = b[2]; else {
"C" == b[0] ? (h = [ r, o ].concat(b.slice(1)), r = h[6], o = h[7]) : (h = [ r, o, r, o, l, c, l, c ],
r = l, o = c);
for (var y = 0, x = t.length; x > y; y++) {
var w = t[y];
if ("M" == w[0]) a = u = w[1], s = d = w[2]; else {
"C" == w[0] ? (f = [ a, s ].concat(w.slice(1)), a = f[6], s = f[7]) : (f = [ a, s, a, s, u, d, u, d ],
a = u, s = d);
var S = p(h, f, i);
if (i) m += S; else {
for (var C = 0, _ = S.length; _ > C; C++) S[C].segment1 = g, S[C].segment2 = y,
S[C].bez1 = h, S[C].bez2 = f;
m = m.concat(S);
}
}
}
}
}
return m;
}
function f(e, t, n, i, r, o) {
null != e ? (this.a = +e, this.b = +t, this.c = +n, this.d = +i, this.e = +r, this.f = +o) : (this.a = 1,
this.b = 0, this.c = 0, this.d = 1, this.e = 0, this.f = 0);
}
function m() {
return this.x + A + this.y + A + this.width + " \xd7 " + this.height;
}
function g(e, t, n, i, r, o) {
function a(e) {
return ((u * e + c) * e + l) * e;
}
function s(e, t) {
var n, i, r, o, s, d;
for (r = e, d = 0; 8 > d; d++) {
if (o = a(r) - e, q(o) < t) return r;
if (s = (3 * u * r + 2 * c) * r + l, q(s) < 1e-6) break;
r -= o / s;
}
if (n = 0, i = 1, (r = e) < n) return n;
if (r > i) return i;
for (;i > n; ) {
if (o = a(r), q(o - e) < t) return r;
e > o ? n = r : i = r, r = (i - n) / 2 + n;
}
return r;
}
var l = 3 * t, c = 3 * (i - t) - l, u = 1 - l - c, d = 3 * n, p = 3 * (r - n) - d, h = 1 - d - p;
return function(e, t) {
var n = s(e, t);
return ((h * n + p) * n + d) * n;
}(e, 1 / (200 * o));
}
function v(e, t) {
var n = [], i = {};
if (this.ms = t, this.times = 1, e) {
for (var r in e) e[k](r) && (i[J(r)] = e[r], n.push(J(r)));
n.sort(ut);
}
this.anim = i, this.top = n[n.length - 1], this.percents = n;
}
function b(e, i, r, o, a, s) {
r = J(r);
var l, c, u, d, p, h, m = e.ms, v = {}, b = {}, y = {};
if (o) for (w = 0, C = ln.length; C > w; w++) {
var x = ln[w];
if (x.el.id == i.id && x.anim == e) {
x.percent != r ? (ln.splice(w, 1), u = 1) : c = x, i.attr(x.totalOrigin);
break;
}
} else o = +b;
for (var w = 0, C = e.percents.length; C > w; w++) {
if (e.percents[w] == r || e.percents[w] > o * e.top) {
r = e.percents[w], p = e.percents[w - 1] || 0, m = m / e.top * (r - p), d = e.percents[w + 1],
l = e.anim[r];
break;
}
o && i.attr(e.anim[e.percents[w]]);
}
if (l) {
if (c) c.initstatus = o, c.start = new Date() - c.ms * o; else {
for (var _ in l) if (l[k](_) && (nt[k](_) || i.paper.customAttributes[k](_))) switch (v[_] = i.attr(_),
null == v[_] && (v[_] = tt[_]), b[_] = l[_], nt[_]) {
case z:
y[_] = (b[_] - v[_]) / m;
break;
case "colour":
v[_] = n.getRGB(v[_]);
var E = n.getRGB(b[_]);
y[_] = {
r: (E.r - v[_].r) / m,
g: (E.g - v[_].g) / m,
b: (E.b - v[_].b) / m
};
break;
case "path":
var T = Pt(v[_], b[_]), I = T[1];
for (v[_] = T[0], y[_] = [], w = 0, C = v[_].length; C > w; w++) {
y[_][w] = [ 0 ];
for (var D = 1, M = v[_][w].length; M > D; D++) y[_][w][D] = (I[w][D] - v[_][w][D]) / m;
}
break;
case "transform":
var L = i._, A = $t(L[_], b[_]);
if (A) for (v[_] = A.from, b[_] = A.to, y[_] = [], y[_].real = !0, w = 0, C = v[_].length; C > w; w++) for (y[_][w] = [ v[_][w][0] ],
D = 1, M = v[_][w].length; M > D; D++) y[_][w][D] = (b[_][w][D] - v[_][w][D]) / m; else {
var O = i.matrix || new f(), F = {
_: {
transform: L.transform
},
getBBox: function() {
return i.getBBox(1);
}
};
v[_] = [ O.a, O.b, O.c, O.d, O.e, O.f ], Bt(F, b[_]), b[_] = F._.transform, y[_] = [ (F.matrix.a - O.a) / m, (F.matrix.b - O.b) / m, (F.matrix.c - O.c) / m, (F.matrix.d - O.d) / m, (F.matrix.e - O.e) / m, (F.matrix.f - O.f) / m ];
}
break;
case "csv":
var B = R(l[_])[P](S), j = R(v[_])[P](S);
if ("clip-rect" == _) for (v[_] = j, y[_] = [], w = j.length; w--; ) y[_][w] = (B[w] - v[_][w]) / m;
b[_] = B;
break;
default:
for (B = [][N](l[_]), j = [][N](v[_]), y[_] = [], w = i.paper.customAttributes[_].length; w--; ) y[_][w] = ((B[w] || 0) - (j[w] || 0)) / m;
}
var $ = l.easing, G = n.easing_formulas[$];
if (!G) if ((G = R($).match(Y)) && 5 == G.length) {
var q = G;
G = function(e) {
return g(e, +q[1], +q[2], +q[3], +q[4], m);
};
} else G = pt;
if (h = l.start || e.start || +new Date(), x = {
anim: e,
percent: r,
timestamp: h,
start: h + (e.del || 0),
status: 0,
initstatus: o || 0,
stop: !1,
ms: m,
easing: G,
from: v,
diff: y,
to: b,
el: i,
callback: l.callback,
prev: p,
next: d,
repeat: s || e.times,
origin: i.attr(),
totalOrigin: a
}, ln.push(x), o && !c && !u && (x.stop = !0, x.start = new Date() - m * o, 1 == ln.length)) return un();
u && (x.start = new Date() - x.ms * o), 1 == ln.length && cn(un);
}
t("raphael.anim.start." + i.id, i, e);
}
}
function y(e) {
for (var t = 0; t < ln.length; t++) ln[t].el.paper == e && ln.splice(t--, 1);
}
n.version = "2.1.2", n.eve = t;
var x, w, S = /[, ]+/, C = {
circle: 1,
rect: 1,
path: 1,
ellipse: 1,
text: 1,
image: 1
}, _ = /\{(\d+)\}/g, k = "hasOwnProperty", E = {
doc: document,
win: e
}, T = {
was: Object.prototype[k].call(E.win, "Raphael"),
is: E.win.Raphael
}, I = function() {
this.ca = this.customAttributes = {};
}, D = "apply", N = "concat", M = "ontouchstart" in E.win || E.win.DocumentTouch && E.doc instanceof DocumentTouch, L = "", A = " ", R = String, P = "split", O = "click dblclick mousedown mousemove mouseout mouseover mouseup touchstart touchmove touchend touchcancel"[P](A), F = {
mousedown: "touchstart",
mousemove: "touchmove",
mouseup: "touchend"
}, B = R.prototype.toLowerCase, j = Math, $ = j.max, G = j.min, q = j.abs, H = j.pow, U = j.PI, z = "number", V = "array", W = Object.prototype.toString, X = (n._ISURL = /^url\(['"]?(.+?)['"]?\)$/i,
/^\s*((#[a-f\d]{6})|(#[a-f\d]{3})|rgba?\(\s*([\d\.]+%?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+%?(?:\s*,\s*[\d\.]+%?)?)\s*\)|hsba?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\)|hsla?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\))\s*$/i), Q = {
NaN: 1,
Infinity: 1,
"-Infinity": 1
}, Y = /^(?:cubic-)?bezier\(([^,]+),([^,]+),([^,]+),([^\)]+)\)/, K = j.round, J = parseFloat, Z = parseInt, et = R.prototype.toUpperCase, tt = n._availableAttrs = {
"arrow-end": "none",
"arrow-start": "none",
blur: 0,
"clip-rect": "0 0 1e9 1e9",
cursor: "default",
cx: 0,
cy: 0,
fill: "#fff",
"fill-opacity": 1,
font: '10px "Arial"',
"font-family": '"Arial"',
"font-size": "10",
"font-style": "normal",
"font-weight": 400,
gradient: 0,
height: 0,
href: "http://raphaeljs.com/",
"letter-spacing": 0,
opacity: 1,
path: "M0,0",
r: 0,
rx: 0,
ry: 0,
src: "",
stroke: "#000",
"stroke-dasharray": "",
"stroke-linecap": "butt",
"stroke-linejoin": "butt",
"stroke-miterlimit": 0,
"stroke-opacity": 1,
"stroke-width": 1,
target: "_blank",
"text-anchor": "middle",
title: "Raphael",
transform: "",
width: 0,
x: 0,
y: 0
}, nt = n._availableAnimAttrs = {
blur: z,
"clip-rect": "csv",
cx: z,
cy: z,
fill: "colour",
"fill-opacity": z,
"font-size": z,
height: z,
opacity: z,
path: "path",
r: z,
rx: z,
ry: z,
stroke: "colour",
"stroke-opacity": z,
"stroke-width": z,
transform: "transform",
width: z,
x: z,
y: z
}, it = /[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*/, rt = {
hs: 1,
rg: 1
}, ot = /,?([achlmqrstvxz]),?/gi, at = /([achlmrqstvz])[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*)+)/gi, st = /([rstm])[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*)+)/gi, lt = /(-?\d*\.?\d*(?:e[\-+]?\d+)?)[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*/gi, ct = (n._radial_gradient = /^r(?:\(([^,]+?)[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*([^\)]+?)\))?/,
{}), ut = function(e, t) {
return J(e) - J(t);
}, dt = function() {}, pt = function(e) {
return e;
}, ht = n._rectPath = function(e, t, n, i, r) {
return r ? [ [ "M", e + r, t ], [ "l", n - 2 * r, 0 ], [ "a", r, r, 0, 0, 1, r, r ], [ "l", 0, i - 2 * r ], [ "a", r, r, 0, 0, 1, -r, r ], [ "l", 2 * r - n, 0 ], [ "a", r, r, 0, 0, 1, -r, -r ], [ "l", 0, 2 * r - i ], [ "a", r, r, 0, 0, 1, r, -r ], [ "z" ] ] : [ [ "M", e, t ], [ "l", n, 0 ], [ "l", 0, i ], [ "l", -n, 0 ], [ "z" ] ];
}, ft = function(e, t, n, i) {
return null == i && (i = n), [ [ "M", e, t ], [ "m", 0, -i ], [ "a", n, i, 0, 1, 1, 0, 2 * i ], [ "a", n, i, 0, 1, 1, 0, -2 * i ], [ "z" ] ];
}, mt = n._getPath = {
path: function(e) {
return e.attr("path");
},
circle: function(e) {
var t = e.attrs;
return ft(t.cx, t.cy, t.r);
},
ellipse: function(e) {
var t = e.attrs;
return ft(t.cx, t.cy, t.rx, t.ry);
},
rect: function(e) {
var t = e.attrs;
return ht(t.x, t.y, t.width, t.height, t.r);
},
image: function(e) {
var t = e.attrs;
return ht(t.x, t.y, t.width, t.height);
},
text: function(e) {
var t = e._getBBox();
return ht(t.x, t.y, t.width, t.height);
},
set: function(e) {
var t = e._getBBox();
return ht(t.x, t.y, t.width, t.height);
}
}, gt = n.mapPath = function(e, t) {
if (!t) return e;
var n, i, r, o, a, s, l;
for (e = Pt(e), r = 0, a = e.length; a > r; r++) for (l = e[r], o = 1, s = l.length; s > o; o += 2) n = t.x(l[o], l[o + 1]),
i = t.y(l[o], l[o + 1]), l[o] = n, l[o + 1] = i;
return e;
};
if (n._g = E, n.type = E.win.SVGAngle || E.doc.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1") ? "SVG" : "VML",
"VML" == n.type) {
var vt, bt = E.doc.createElement("div");
if (bt.innerHTML = '<v:shape adj="1"/>', vt = bt.firstChild, vt.style.behavior = "url(#default#VML)",
!vt || "object" != typeof vt.adj) return n.type = L;
bt = null;
}
n.svg = !(n.vml = "VML" == n.type), n._Paper = I, n.fn = w = I.prototype = n.prototype,
n._id = 0, n._oid = 0, n.is = function(e, t) {
return t = B.call(t), "finite" == t ? !Q[k](+e) : "array" == t ? e instanceof Array : "null" == t && null === e || t == typeof e && null !== e || "object" == t && e === Object(e) || "array" == t && Array.isArray && Array.isArray(e) || W.call(e).slice(8, -1).toLowerCase() == t;
}, n.angle = function(e, t, i, r, o, a) {
if (null == o) {
var s = e - i, l = t - r;
return s || l ? (180 + 180 * j.atan2(-l, -s) / U + 360) % 360 : 0;
}
return n.angle(e, t, o, a) - n.angle(i, r, o, a);
}, n.rad = function(e) {
return e % 360 * U / 180;
}, n.deg = function(e) {
return Math.round(180 * e / U % 360 * 1e3) / 1e3;
}, n.snapTo = function(e, t, i) {
if (i = n.is(i, "finite") ? i : 10, n.is(e, V)) {
for (var r = e.length; r--; ) if (q(e[r] - t) <= i) return e[r];
} else {
e = +e;
var o = t % e;
if (i > o) return t - o;
if (o > e - i) return t - o + e;
}
return t;
}, n.createUUID = function(e, t) {
return function() {
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(e, t).toUpperCase();
};
}(/[xy]/g, function(e) {
var t = 16 * j.random() | 0;
return ("x" == e ? t : 3 & t | 8).toString(16);
}), n.setWindow = function(e) {
t("raphael.setWindow", n, E.win, e), E.win = e, E.doc = E.win.document, n._engine.initWin && n._engine.initWin(E.win);
};
var yt = function(e) {
if (n.vml) {
var t, i = /^\s+|\s+$/g;
try {
var r = new ActiveXObject("htmlfile");
r.write("<body>"), r.close(), t = r.body;
} catch (e) {
t = createPopup().document.body;
}
var a = t.createTextRange();
yt = o(function(e) {
try {
t.style.color = R(e).replace(i, L);
var n = a.queryCommandValue("ForeColor");
return n = (255 & n) << 16 | 65280 & n | (16711680 & n) >>> 16, "#" + ("000000" + n.toString(16)).slice(-6);
} catch (e) {
return "none";
}
});
} else {
var s = E.doc.createElement("i");
s.title = "Rapha\xebl Colour Picker", s.style.display = "none", E.doc.body.appendChild(s),
yt = o(function(e) {
return s.style.color = e, E.doc.defaultView.getComputedStyle(s, L).getPropertyValue("color");
});
}
return yt(e);
}, xt = function() {
return "hsb(" + [ this.h, this.s, this.b ] + ")";
}, wt = function() {
return "hsl(" + [ this.h, this.s, this.l ] + ")";
}, St = function() {
return this.hex;
}, Ct = function(e, t, i) {
if (null == t && n.is(e, "object") && "r" in e && "g" in e && "b" in e && (i = e.b,
t = e.g, e = e.r), null == t && n.is(e, "string")) {
var r = n.getRGB(e);
e = r.r, t = r.g, i = r.b;
}
return (e > 1 || t > 1 || i > 1) && (e /= 255, t /= 255, i /= 255), [ e, t, i ];
}, _t = function(e, t, i, r) {
e *= 255, t *= 255, i *= 255;
var o = {
r: e,
g: t,
b: i,
hex: n.rgb(e, t, i),
toString: St
};
return n.is(r, "finite") && (o.opacity = r), o;
};
n.color = function(e) {
var t;
return n.is(e, "object") && "h" in e && "s" in e && "b" in e ? (t = n.hsb2rgb(e),
e.r = t.r, e.g = t.g, e.b = t.b, e.hex = t.hex) : n.is(e, "object") && "h" in e && "s" in e && "l" in e ? (t = n.hsl2rgb(e),
e.r = t.r, e.g = t.g, e.b = t.b, e.hex = t.hex) : (n.is(e, "string") && (e = n.getRGB(e)),
n.is(e, "object") && "r" in e && "g" in e && "b" in e ? (t = n.rgb2hsl(e), e.h = t.h,
e.s = t.s, e.l = t.l, t = n.rgb2hsb(e), e.v = t.b) : (e = {
hex: "none"
}, e.r = e.g = e.b = e.h = e.s = e.v = e.l = -1)), e.toString = St, e;
}, n.hsb2rgb = function(e, t, n, i) {
this.is(e, "object") && "h" in e && "s" in e && "b" in e && (n = e.b, t = e.s, i = e.o,
e = e.h), e *= 360;
var r, o, a, s, l;
return e = e % 360 / 60, l = n * t, s = l * (1 - q(e % 2 - 1)), r = o = a = n - l,
e = ~~e, r += [ l, s, 0, 0, s, l ][e], o += [ s, l, l, s, 0, 0 ][e], a += [ 0, 0, s, l, l, s ][e],
_t(r, o, a, i);
}, n.hsl2rgb = function(e, t, n, i) {
this.is(e, "object") && "h" in e && "s" in e && "l" in e && (n = e.l, t = e.s, e = e.h),
(e > 1 || t > 1 || n > 1) && (e /= 360, t /= 100, n /= 100), e *= 360;
var r, o, a, s, l;
return e = e % 360 / 60, l = 2 * t * (.5 > n ? n : 1 - n), s = l * (1 - q(e % 2 - 1)),
r = o = a = n - l / 2, e = ~~e, r += [ l, s, 0, 0, s, l ][e], o += [ s, l, l, s, 0, 0 ][e],
a += [ 0, 0, s, l, l, s ][e], _t(r, o, a, i);
}, n.rgb2hsb = function(e, t, n) {
n = Ct(e, t, n), e = n[0], t = n[1], n = n[2];
var i, r, o, a;
return o = $(e, t, n), a = o - G(e, t, n), i = 0 == a ? null : o == e ? (t - n) / a : o == t ? (n - e) / a + 2 : (e - t) / a + 4,
i = (i + 360) % 6 * 60 / 360, r = 0 == a ? 0 : a / o, {
h: i,
s: r,
b: o,
toString: xt
};
}, n.rgb2hsl = function(e, t, n) {
n = Ct(e, t, n), e = n[0], t = n[1], n = n[2];
var i, r, o, a, s, l;
return a = $(e, t, n), s = G(e, t, n), l = a - s, i = 0 == l ? null : a == e ? (t - n) / l : a == t ? (n - e) / l + 2 : (e - t) / l + 4,
i = (i + 360) % 6 * 60 / 360, o = (a + s) / 2, r = 0 == l ? 0 : .5 > o ? l / (2 * o) : l / (2 - 2 * o),
{
h: i,
s: r,
l: o,
toString: wt
};
}, n._path2string = function() {
return this.join(",").replace(ot, "$1");
}, n._preload = function(e, t) {
var n = E.doc.createElement("img");
n.style.cssText = "position:absolute;left:-9999em;top:-9999em", n.onload = function() {
t.call(this), this.onload = null, E.doc.body.removeChild(this);
}, n.onerror = function() {
E.doc.body.removeChild(this);
}, E.doc.body.appendChild(n), n.src = e;
}, n.getRGB = o(function(e) {
if (!e || (e = R(e)).indexOf("-") + 1) return {
r: -1,
g: -1,
b: -1,
hex: "none",
error: 1,
toString: a
};
if ("none" == e) return {
r: -1,
g: -1,
b: -1,
hex: "none",
toString: a
};
!(rt[k](e.toLowerCase().substring(0, 2)) || "#" == e.charAt()) && (e = yt(e));
var t, i, r, o, s, l, c = e.match(X);
return c ? (c[2] && (r = Z(c[2].substring(5), 16), i = Z(c[2].substring(3, 5), 16),
t = Z(c[2].substring(1, 3), 16)), c[3] && (r = Z((s = c[3].charAt(3)) + s, 16),
i = Z((s = c[3].charAt(2)) + s, 16), t = Z((s = c[3].charAt(1)) + s, 16)), c[4] && (l = c[4][P](it),
t = J(l[0]), "%" == l[0].slice(-1) && (t *= 2.55), i = J(l[1]), "%" == l[1].slice(-1) && (i *= 2.55),
r = J(l[2]), "%" == l[2].slice(-1) && (r *= 2.55), "rgba" == c[1].toLowerCase().slice(0, 4) && (o = J(l[3])),
l[3] && "%" == l[3].slice(-1) && (o /= 100)), c[5] ? (l = c[5][P](it), t = J(l[0]),
"%" == l[0].slice(-1) && (t *= 2.55), i = J(l[1]), "%" == l[1].slice(-1) && (i *= 2.55),
r = J(l[2]), "%" == l[2].slice(-1) && (r *= 2.55), ("deg" == l[0].slice(-3) || "\xb0" == l[0].slice(-1)) && (t /= 360),
"hsba" == c[1].toLowerCase().slice(0, 4) && (o = J(l[3])), l[3] && "%" == l[3].slice(-1) && (o /= 100),
n.hsb2rgb(t, i, r, o)) : c[6] ? (l = c[6][P](it), t = J(l[0]), "%" == l[0].slice(-1) && (t *= 2.55),
i = J(l[1]), "%" == l[1].slice(-1) && (i *= 2.55), r = J(l[2]), "%" == l[2].slice(-1) && (r *= 2.55),
("deg" == l[0].slice(-3) || "\xb0" == l[0].slice(-1)) && (t /= 360), "hsla" == c[1].toLowerCase().slice(0, 4) && (o = J(l[3])),
l[3] && "%" == l[3].slice(-1) && (o /= 100), n.hsl2rgb(t, i, r, o)) : (c = {
r: t,
g: i,
b: r,
toString: a
}, c.hex = "#" + (16777216 | r | i << 8 | t << 16).toString(16).slice(1), n.is(o, "finite") && (c.opacity = o),
c)) : {
r: -1,
g: -1,
b: -1,
hex: "none",
error: 1,
toString: a
};
}, n), n.hsb = o(function(e, t, i) {
return n.hsb2rgb(e, t, i).hex;
}), n.hsl = o(function(e, t, i) {
return n.hsl2rgb(e, t, i).hex;
}), n.rgb = o(function(e, t, n) {
return "#" + (16777216 | n | t << 8 | e << 16).toString(16).slice(1);
}), n.getColor = function(e) {
var t = this.getColor.start = this.getColor.start || {
h: 0,
s: 1,
b: e || .75
}, n = this.hsb2rgb(t.h, t.s, t.b);
return t.h += .075, t.h > 1 && (t.h = 0, t.s -= .2, t.s <= 0 && (this.getColor.start = {
h: 0,
s: 1,
b: t.b
})), n.hex;
}, n.getColor.reset = function() {
delete this.start;
}, n.parsePathString = function(e) {
if (!e) return null;
var t = kt(e);
if (t.arr) return Tt(t.arr);
var i = {
a: 7,
c: 6,
h: 1,
l: 2,
m: 2,
r: 4,
q: 4,
s: 4,
t: 2,
v: 1,
z: 0
}, r = [];
return n.is(e, V) && n.is(e[0], V) && (r = Tt(e)), r.length || R(e).replace(at, function(e, t, n) {
var o = [], a = t.toLowerCase();
if (n.replace(lt, function(e, t) {
t && o.push(+t);
}), "m" == a && o.length > 2 && (r.push([ t ][N](o.splice(0, 2))), a = "l", t = "m" == t ? "l" : "L"),
"r" == a) r.push([ t ][N](o)); else for (;o.length >= i[a] && (r.push([ t ][N](o.splice(0, i[a]))),
i[a]); ) ;
}), r.toString = n._path2string, t.arr = Tt(r), r;
}, n.parseTransformString = o(function(e) {
if (!e) return null;
var t = [];
return n.is(e, V) && n.is(e[0], V) && (t = Tt(e)), t.length || R(e).replace(st, function(e, n, i) {
var r = [];
B.call(n), i.replace(lt, function(e, t) {
t && r.push(+t);
}), t.push([ n ][N](r));
}), t.toString = n._path2string, t;
});
var kt = function(e) {
var t = kt.ps = kt.ps || {};
return t[e] ? t[e].sleep = 100 : t[e] = {
sleep: 100
}, setTimeout(function() {
for (var n in t) t[k](n) && n != e && !--t[n].sleep && delete t[n];
}), t[e];
};
n.findDotsAtSegment = function(e, t, n, i, r, o, a, s, l) {
var c = 1 - l, u = H(c, 3), d = H(c, 2), p = l * l, h = p * l, f = u * e + 3 * d * l * n + 3 * c * l * l * r + h * a, m = u * t + 3 * d * l * i + 3 * c * l * l * o + h * s, g = e + 2 * l * (n - e) + p * (r - 2 * n + e), v = t + 2 * l * (i - t) + p * (o - 2 * i + t), b = n + 2 * l * (r - n) + p * (a - 2 * r + n), y = i + 2 * l * (o - i) + p * (s - 2 * o + i), x = c * e + l * n, w = c * t + l * i, S = c * r + l * a, C = c * o + l * s, _ = 90 - 180 * j.atan2(g - b, v - y) / U;
return (g > b || y > v) && (_ += 180), {
x: f,
y: m,
m: {
x: g,
y: v
},
n: {
x: b,
y: y
},
start: {
x: x,
y: w
},
end: {
x: S,
y: C
},
alpha: _
};
}, n.bezierBBox = function(e, t, i, r, o, a, s, l) {
n.is(e, "array") || (e = [ e, t, i, r, o, a, s, l ]);
var c = Rt.apply(null, e);
return {
x: c.min.x,
y: c.min.y,
x2: c.max.x,
y2: c.max.y,
width: c.max.x - c.min.x,
height: c.max.y - c.min.y
};
}, n.isPointInsideBBox = function(e, t, n) {
return t >= e.x && t <= e.x2 && n >= e.y && n <= e.y2;
}, n.isBBoxIntersect = function(e, t) {
var i = n.isPointInsideBBox;
return i(t, e.x, e.y) || i(t, e.x2, e.y) || i(t, e.x, e.y2) || i(t, e.x2, e.y2) || i(e, t.x, t.y) || i(e, t.x2, t.y) || i(e, t.x, t.y2) || i(e, t.x2, t.y2) || (e.x < t.x2 && e.x > t.x || t.x < e.x2 && t.x > e.x) && (e.y < t.y2 && e.y > t.y || t.y < e.y2 && t.y > e.y);
}, n.pathIntersection = function(e, t) {
return h(e, t);
}, n.pathIntersectionNumber = function(e, t) {
return h(e, t, 1);
}, n.isPointInsidePath = function(e, t, i) {
var r = n.pathBBox(e);
return n.isPointInsideBBox(r, t, i) && h(e, [ [ "M", t, i ], [ "H", r.x2 + 10 ] ], 1) % 2 == 1;
}, n._removedFactory = function(e) {
return function() {
t("raphael.log", null, "Rapha\xebl: you are calling to method \u201c" + e + "\u201d of removed object", e);
};
};
var Et = n.pathBBox = function(e) {
var t = kt(e);
if (t.bbox) return i(t.bbox);
if (!e) return {
x: 0,
y: 0,
width: 0,
height: 0,
x2: 0,
y2: 0
};
e = Pt(e);
for (var n, r = 0, o = 0, a = [], s = [], l = 0, c = e.length; c > l; l++) if (n = e[l],
"M" == n[0]) r = n[1], o = n[2], a.push(r), s.push(o); else {
var u = Rt(r, o, n[1], n[2], n[3], n[4], n[5], n[6]);
a = a[N](u.min.x, u.max.x), s = s[N](u.min.y, u.max.y), r = n[5], o = n[6];
}
var d = G[D](0, a), p = G[D](0, s), h = $[D](0, a), f = $[D](0, s), m = h - d, g = f - p, v = {
x: d,
y: p,
x2: h,
y2: f,
width: m,
height: g,
cx: d + m / 2,
cy: p + g / 2
};
return t.bbox = i(v), v;
}, Tt = function(e) {
var t = i(e);
return t.toString = n._path2string, t;
}, It = n._pathToRelative = function(e) {
var t = kt(e);
if (t.rel) return Tt(t.rel);
n.is(e, V) && n.is(e && e[0], V) || (e = n.parsePathString(e));
var i = [], r = 0, o = 0, a = 0, s = 0, l = 0;
"M" == e[0][0] && (r = e[0][1], o = e[0][2], a = r, s = o, l++, i.push([ "M", r, o ]));
for (var c = l, u = e.length; u > c; c++) {
var d = i[c] = [], p = e[c];
if (p[0] != B.call(p[0])) switch (d[0] = B.call(p[0]), d[0]) {
case "a":
d[1] = p[1], d[2] = p[2], d[3] = p[3], d[4] = p[4], d[5] = p[5], d[6] = +(p[6] - r).toFixed(3),
d[7] = +(p[7] - o).toFixed(3);
break;
case "v":
d[1] = +(p[1] - o).toFixed(3);
break;
case "m":
a = p[1], s = p[2];
default:
for (var h = 1, f = p.length; f > h; h++) d[h] = +(p[h] - (h % 2 ? r : o)).toFixed(3);
} else {
d = i[c] = [], "m" == p[0] && (a = p[1] + r, s = p[2] + o);
for (var m = 0, g = p.length; g > m; m++) i[c][m] = p[m];
}
var v = i[c].length;
switch (i[c][0]) {
case "z":
r = a, o = s;
break;
case "h":
r += +i[c][v - 1];
break;
case "v":
o += +i[c][v - 1];
break;
default:
r += +i[c][v - 2], o += +i[c][v - 1];
}
}
return i.toString = n._path2string, t.rel = Tt(i), i;
}, Dt = n._pathToAbsolute = function(e) {
var t = kt(e);
if (t.abs) return Tt(t.abs);
if (n.is(e, V) && n.is(e && e[0], V) || (e = n.parsePathString(e)), !e || !e.length) return [ [ "M", 0, 0 ] ];
var i = [], r = 0, o = 0, a = 0, l = 0, c = 0;
"M" == e[0][0] && (r = +e[0][1], o = +e[0][2], a = r, l = o, c++, i[0] = [ "M", r, o ]);
for (var u, d, p = 3 == e.length && "M" == e[0][0] && "R" == e[1][0].toUpperCase() && "Z" == e[2][0].toUpperCase(), h = c, f = e.length; f > h; h++) {
if (i.push(u = []), d = e[h], d[0] != et.call(d[0])) switch (u[0] = et.call(d[0]),
u[0]) {
case "A":
u[1] = d[1], u[2] = d[2], u[3] = d[3], u[4] = d[4], u[5] = d[5], u[6] = +(d[6] + r),
u[7] = +(d[7] + o);
break;
case "V":
u[1] = +d[1] + o;
break;
case "H":
u[1] = +d[1] + r;
break;
case "R":
for (var m = [ r, o ][N](d.slice(1)), g = 2, v = m.length; v > g; g++) m[g] = +m[g] + r,
m[++g] = +m[g] + o;
i.pop(), i = i[N](s(m, p));
break;
case "M":
a = +d[1] + r, l = +d[2] + o;
default:
for (g = 1, v = d.length; v > g; g++) u[g] = +d[g] + (g % 2 ? r : o);
} else if ("R" == d[0]) m = [ r, o ][N](d.slice(1)), i.pop(), i = i[N](s(m, p)),
u = [ "R" ][N](d.slice(-2)); else for (var b = 0, y = d.length; y > b; b++) u[b] = d[b];
switch (u[0]) {
case "Z":
r = a, o = l;
break;
case "H":
r = u[1];
break;
case "V":
o = u[1];
break;
case "M":
a = u[u.length - 2], l = u[u.length - 1];
default:
r = u[u.length - 2], o = u[u.length - 1];
}
}
return i.toString = n._path2string, t.abs = Tt(i), i;
}, Nt = function(e, t, n, i) {
return [ e, t, n, i, n, i ];
}, Mt = function(e, t, n, i, r, o) {
return [ 1 / 3 * e + 2 / 3 * n, 1 / 3 * t + 2 / 3 * i, 1 / 3 * r + 2 / 3 * n, 1 / 3 * o + 2 / 3 * i, r, o ];
}, Lt = function(e, t, n, i, r, a, s, l, c, u) {
var d, p = 120 * U / 180, h = U / 180 * (+r || 0), f = [], m = o(function(e, t, n) {
return {
x: e * j.cos(n) - t * j.sin(n),
y: e * j.sin(n) + t * j.cos(n)
};
});
if (u) _ = u[0], k = u[1], S = u[2], C = u[3]; else {
d = m(e, t, -h), e = d.x, t = d.y, d = m(l, c, -h), l = d.x, c = d.y;
var g = (j.cos(U / 180 * r), j.sin(U / 180 * r), (e - l) / 2), v = (t - c) / 2, b = g * g / (n * n) + v * v / (i * i);
b > 1 && (b = j.sqrt(b), n *= b, i *= b);
var y = n * n, x = i * i, w = (a == s ? -1 : 1) * j.sqrt(q((y * x - y * v * v - x * g * g) / (y * v * v + x * g * g))), S = w * n * v / i + (e + l) / 2, C = w * -i * g / n + (t + c) / 2, _ = j.asin(((t - C) / i).toFixed(9)), k = j.asin(((c - C) / i).toFixed(9));
_ = S > e ? U - _ : _, k = S > l ? U - k : k, 0 > _ && (_ = 2 * U + _), 0 > k && (k = 2 * U + k),
s && _ > k && (_ -= 2 * U), !s && k > _ && (k -= 2 * U);
}
var E = k - _;
if (q(E) > p) {
var T = k, I = l, D = c;
k = _ + p * (s && k > _ ? 1 : -1), l = S + n * j.cos(k), c = C + i * j.sin(k), f = Lt(l, c, n, i, r, 0, s, I, D, [ k, T, S, C ]);
}
E = k - _;
var M = j.cos(_), L = j.sin(_), A = j.cos(k), R = j.sin(k), O = j.tan(E / 4), F = 4 / 3 * n * O, B = 4 / 3 * i * O, $ = [ e, t ], G = [ e + F * L, t - B * M ], H = [ l + F * R, c - B * A ], z = [ l, c ];
if (G[0] = 2 * $[0] - G[0], G[1] = 2 * $[1] - G[1], u) return [ G, H, z ][N](f);
f = [ G, H, z ][N](f).join()[P](",");
for (var V = [], W = 0, X = f.length; X > W; W++) V[W] = W % 2 ? m(f[W - 1], f[W], h).y : m(f[W], f[W + 1], h).x;
return V;
}, At = function(e, t, n, i, r, o, a, s, l) {
var c = 1 - l;
return {
x: H(c, 3) * e + 3 * H(c, 2) * l * n + 3 * c * l * l * r + H(l, 3) * a,
y: H(c, 3) * t + 3 * H(c, 2) * l * i + 3 * c * l * l * o + H(l, 3) * s
};
}, Rt = o(function(e, t, n, i, r, o, a, s) {
var l, c = r - 2 * n + e - (a - 2 * r + n), u = 2 * (n - e) - 2 * (r - n), d = e - n, p = (-u + j.sqrt(u * u - 4 * c * d)) / 2 / c, h = (-u - j.sqrt(u * u - 4 * c * d)) / 2 / c, f = [ t, s ], m = [ e, a ];
return q(p) > "1e12" && (p = .5), q(h) > "1e12" && (h = .5), p > 0 && 1 > p && (l = At(e, t, n, i, r, o, a, s, p),
m.push(l.x), f.push(l.y)), h > 0 && 1 > h && (l = At(e, t, n, i, r, o, a, s, h),
m.push(l.x), f.push(l.y)), c = o - 2 * i + t - (s - 2 * o + i), u = 2 * (i - t) - 2 * (o - i),
d = t - i, p = (-u + j.sqrt(u * u - 4 * c * d)) / 2 / c, h = (-u - j.sqrt(u * u - 4 * c * d)) / 2 / c,
q(p) > "1e12" && (p = .5), q(h) > "1e12" && (h = .5), p > 0 && 1 > p && (l = At(e, t, n, i, r, o, a, s, p),
m.push(l.x), f.push(l.y)), h > 0 && 1 > h && (l = At(e, t, n, i, r, o, a, s, h),
m.push(l.x), f.push(l.y)), {
min: {
x: G[D](0, m),
y: G[D](0, f)
},
max: {
x: $[D](0, m),
y: $[D](0, f)
}
};
}), Pt = n._path2curve = o(function(e, t) {
var n = !t && kt(e);
if (!t && n.curve) return Tt(n.curve);
for (var i = Dt(e), r = t && Dt(t), o = {
x: 0,
y: 0,
bx: 0,
by: 0,
X: 0,
Y: 0,
qx: null,
qy: null
}, a = {
x: 0,
y: 0,
bx: 0,
by: 0,
X: 0,
Y: 0,
qx: null,
qy: null
}, s = (function(e, t, n) {
var i, r, o = {
T: 1,
Q: 1
};
if (!e) return [ "C", t.x, t.y, t.x, t.y, t.x, t.y ];
switch (!(e[0] in o) && (t.qx = t.qy = null), e[0]) {
case "M":
t.X = e[1], t.Y = e[2];
break;
case "A":
e = [ "C" ][N](Lt[D](0, [ t.x, t.y ][N](e.slice(1))));
break;
case "S":
"C" == n || "S" == n ? (i = 2 * t.x - t.bx, r = 2 * t.y - t.by) : (i = t.x, r = t.y),
e = [ "C", i, r ][N](e.slice(1));
break;
case "T":
"Q" == n || "T" == n ? (t.qx = 2 * t.x - t.qx, t.qy = 2 * t.y - t.qy) : (t.qx = t.x,
t.qy = t.y), e = [ "C" ][N](Mt(t.x, t.y, t.qx, t.qy, e[1], e[2]));
break;
case "Q":
t.qx = e[1], t.qy = e[2], e = [ "C" ][N](Mt(t.x, t.y, e[1], e[2], e[3], e[4]));
break;
case "L":
e = [ "C" ][N](Nt(t.x, t.y, e[1], e[2]));
break;
case "H":
e = [ "C" ][N](Nt(t.x, t.y, e[1], t.y));
break;
case "V":
e = [ "C" ][N](Nt(t.x, t.y, t.x, e[1]));
break;
case "Z":
e = [ "C" ][N](Nt(t.x, t.y, t.X, t.Y));
}
return e;
}), l = function(e, t) {
if (e[t].length > 7) {
e[t].shift();
for (var n = e[t]; n.length; ) u[t] = "A", r && (d[t] = "A"), e.splice(t++, 0, [ "C" ][N](n.splice(0, 6)));
e.splice(t, 1), m = $(i.length, r && r.length || 0);
}
}, c = function(e, t, n, o, a) {
e && t && "M" == e[a][0] && "M" != t[a][0] && (t.splice(a, 0, [ "M", o.x, o.y ]),
n.bx = 0, n.by = 0, n.x = e[a][1], n.y = e[a][2], m = $(i.length, r && r.length || 0));
}, u = [], d = [], p = "", h = "", f = 0, m = $(i.length, r && r.length || 0); m > f; f++) {
i[f] && (p = i[f][0]), "C" != p && (u[f] = p, f && (h = u[f - 1])), i[f] = s(i[f], o, h),
"A" != u[f] && "C" == p && (u[f] = "C"), l(i, f), r && (r[f] && (p = r[f][0]), "C" != p && (d[f] = p,
f && (h = d[f - 1])), r[f] = s(r[f], a, h), "A" != d[f] && "C" == p && (d[f] = "C"),
l(r, f)), c(i, r, o, a, f), c(r, i, a, o, f);
var g = i[f], v = r && r[f], b = g.length, y = r && v.length;
o.x = g[b - 2], o.y = g[b - 1], o.bx = J(g[b - 4]) || o.x, o.by = J(g[b - 3]) || o.y,
a.bx = r && (J(v[y - 4]) || a.x), a.by = r && (J(v[y - 3]) || a.y), a.x = r && v[y - 2],
a.y = r && v[y - 1];
}
return r || (n.curve = Tt(i)), r ? [ i, r ] : i;
}, null, Tt), Ot = (n._parseDots = o(function(e) {
for (var t = [], i = 0, r = e.length; r > i; i++) {
var o = {}, a = e[i].match(/^([^:]*):?([\d\.]*)/);
if (o.color = n.getRGB(a[1]), o.color.error) return null;
o.color = o.color.hex, a[2] && (o.offset = a[2] + "%"), t.push(o);
}
for (i = 1, r = t.length - 1; r > i; i++) if (!t[i].offset) {
for (var s = J(t[i - 1].offset || 0), l = 0, c = i + 1; r > c; c++) if (t[c].offset) {
l = t[c].offset;
break;
}
l || (l = 100, c = r), l = J(l);
for (var u = (l - s) / (c - i + 1); c > i; i++) s += u, t[i].offset = s + "%";
}
return t;
}), n._tear = function(e, t) {
e == t.top && (t.top = e.prev), e == t.bottom && (t.bottom = e.next), e.next && (e.next.prev = e.prev),
e.prev && (e.prev.next = e.next);
}), Ft = (n._tofront = function(e, t) {
t.top !== e && (Ot(e, t), e.next = null, e.prev = t.top, t.top.next = e, t.top = e);
}, n._toback = function(e, t) {
t.bottom !== e && (Ot(e, t), e.next = t.bottom, e.prev = null, t.bottom.prev = e,
t.bottom = e);
}, n._insertafter = function(e, t, n) {
Ot(e, n), t == n.top && (n.top = e), t.next && (t.next.prev = e), e.next = t.next,
e.prev = t, t.next = e;
}, n._insertbefore = function(e, t, n) {
Ot(e, n), t == n.bottom && (n.bottom = e), t.prev && (t.prev.next = e), e.prev = t.prev,
t.prev = e, e.next = t;
}, n.toMatrix = function(e, t) {
var n = Et(e), i = {
_: {
transform: L
},
getBBox: function() {
return n;
}
};
return Bt(i, t), i.matrix;
}), Bt = (n.transformPath = function(e, t) {
return gt(e, Ft(e, t));
}, n._extractTransform = function(e, t) {
if (null == t) return e._.transform;
t = R(t).replace(/\.{3}|\u2026/g, e._.transform || L);
var i = n.parseTransformString(t), r = 0, o = 0, a = 0, s = 1, l = 1, c = e._, u = new f();
if (c.transform = i || [], i) for (var d = 0, p = i.length; p > d; d++) {
var h, m, g, v, b, y = i[d], x = y.length, w = R(y[0]).toLowerCase(), S = y[0] != w, C = S ? u.invert() : 0;
"t" == w && 3 == x ? S ? (h = C.x(0, 0), m = C.y(0, 0), g = C.x(y[1], y[2]), v = C.y(y[1], y[2]),
u.translate(g - h, v - m)) : u.translate(y[1], y[2]) : "r" == w ? 2 == x ? (b = b || e.getBBox(1),
u.rotate(y[1], b.x + b.width / 2, b.y + b.height / 2), r += y[1]) : 4 == x && (S ? (g = C.x(y[2], y[3]),
v = C.y(y[2], y[3]), u.rotate(y[1], g, v)) : u.rotate(y[1], y[2], y[3]), r += y[1]) : "s" == w ? 2 == x || 3 == x ? (b = b || e.getBBox(1),
u.scale(y[1], y[x - 1], b.x + b.width / 2, b.y + b.height / 2), s *= y[1], l *= y[x - 1]) : 5 == x && (S ? (g = C.x(y[3], y[4]),
v = C.y(y[3], y[4]), u.scale(y[1], y[2], g, v)) : u.scale(y[1], y[2], y[3], y[4]),
s *= y[1], l *= y[2]) : "m" == w && 7 == x && u.add(y[1], y[2], y[3], y[4], y[5], y[6]),
c.dirtyT = 1, e.matrix = u;
}
e.matrix = u, c.sx = s, c.sy = l, c.deg = r, c.dx = o = u.e, c.dy = a = u.f, 1 == s && 1 == l && !r && c.bbox ? (c.bbox.x += +o,
c.bbox.y += +a) : c.dirtyT = 1;
}), jt = function(e) {
var t = e[0];
switch (t.toLowerCase()) {
case "t":
return [ t, 0, 0 ];
case "m":
return [ t, 1, 0, 0, 1, 0, 0 ];
case "r":
return 4 == e.length ? [ t, 0, e[2], e[3] ] : [ t, 0 ];
case "s":
return 5 == e.length ? [ t, 1, 1, e[3], e[4] ] : 3 == e.length ? [ t, 1, 1 ] : [ t, 1 ];
}
}, $t = n._equaliseTransform = function(e, t) {
t = R(t).replace(/\.{3}|\u2026/g, e), e = n.parseTransformString(e) || [], t = n.parseTransformString(t) || [];
for (var i, r, o, a, s = $(e.length, t.length), l = [], c = [], u = 0; s > u; u++) {
if (o = e[u] || jt(t[u]), a = t[u] || jt(o), o[0] != a[0] || "r" == o[0].toLowerCase() && (o[2] != a[2] || o[3] != a[3]) || "s" == o[0].toLowerCase() && (o[3] != a[3] || o[4] != a[4])) return;
for (l[u] = [], c[u] = [], i = 0, r = $(o.length, a.length); r > i; i++) i in o && (l[u][i] = o[i]),
i in a && (c[u][i] = a[i]);
}
return {
from: l,
to: c
};
};
n._getContainer = function(e, t, i, r) {
var o;
return null != (o = null != r || n.is(e, "object") ? e : E.doc.getElementById(e)) ? o.tagName ? null == t ? {
container: o,
width: o.style.pixelWidth || o.offsetWidth,
height: o.style.pixelHeight || o.offsetHeight
} : {
container: o,
width: t,
height: i
} : {
container: 1,
x: e,
y: t,
width: i,
height: r
} : void 0;
}, n.pathToRelative = It, n._engine = {}, n.path2curve = Pt, n.matrix = function(e, t, n, i, r, o) {
return new f(e, t, n, i, r, o);
}, function(e) {
function t(e) {
return e[0] * e[0] + e[1] * e[1];
}
function i(e) {
var n = j.sqrt(t(e));
e[0] && (e[0] /= n), e[1] && (e[1] /= n);
}
e.add = function(e, t, n, i, r, o) {
var a, s, l, c, u = [ [], [], [] ], d = [ [ this.a, this.c, this.e ], [ this.b, this.d, this.f ], [ 0, 0, 1 ] ], p = [ [ e, n, r ], [ t, i, o ], [ 0, 0, 1 ] ];
for (e && e instanceof f && (p = [ [ e.a, e.c, e.e ], [ e.b, e.d, e.f ], [ 0, 0, 1 ] ]),
a = 0; 3 > a; a++) for (s = 0; 3 > s; s++) {
for (c = 0, l = 0; 3 > l; l++) c += d[a][l] * p[l][s];
u[a][s] = c;
}
this.a = u[0][0], this.b = u[1][0], this.c = u[0][1], this.d = u[1][1], this.e = u[0][2],
this.f = u[1][2];
}, e.invert = function() {
var e = this, t = e.a * e.d - e.b * e.c;
return new f(e.d / t, -e.b / t, -e.c / t, e.a / t, (e.c * e.f - e.d * e.e) / t, (e.b * e.e - e.a * e.f) / t);
}, e.clone = function() {
return new f(this.a, this.b, this.c, this.d, this.e, this.f);
}, e.translate = function(e, t) {
this.add(1, 0, 0, 1, e, t);
}, e.scale = function(e, t, n, i) {
null == t && (t = e), (n || i) && this.add(1, 0, 0, 1, n, i), this.add(e, 0, 0, t, 0, 0),
(n || i) && this.add(1, 0, 0, 1, -n, -i);
}, e.rotate = function(e, t, i) {
e = n.rad(e), t = t || 0, i = i || 0;
var r = +j.cos(e).toFixed(9), o = +j.sin(e).toFixed(9);
this.add(r, o, -o, r, t, i), this.add(1, 0, 0, 1, -t, -i);
}, e.x = function(e, t) {
return e * this.a + t * this.c + this.e;
}, e.y = function(e, t) {
return e * this.b + t * this.d + this.f;
}, e.get = function(e) {
return +this[R.fromCharCode(97 + e)].toFixed(4);
}, e.toString = function() {
return n.svg ? "matrix(" + [ this.get(0), this.get(1), this.get(2), this.get(3), this.get(4), this.get(5) ].join() + ")" : [ this.get(0), this.get(2), this.get(1), this.get(3), 0, 0 ].join();
}, e.toFilter = function() {
return "progid:DXImageTransform.Microsoft.Matrix(M11=" + this.get(0) + ", M12=" + this.get(2) + ", M21=" + this.get(1) + ", M22=" + this.get(3) + ", Dx=" + this.get(4) + ", Dy=" + this.get(5) + ", sizingmethod='auto expand')";
}, e.offset = function() {
return [ this.e.toFixed(4), this.f.toFixed(4) ];
}, e.split = function() {
var e = {};
e.dx = this.e, e.dy = this.f;
var r = [ [ this.a, this.c ], [ this.b, this.d ] ];
e.scalex = j.sqrt(t(r[0])), i(r[0]), e.shear = r[0][0] * r[1][0] + r[0][1] * r[1][1],
r[1] = [ r[1][0] - r[0][0] * e.shear, r[1][1] - r[0][1] * e.shear ], e.scaley = j.sqrt(t(r[1])),
i(r[1]), e.shear /= e.scaley;
var o = -r[0][1], a = r[1][1];
return 0 > a ? (e.rotate = n.deg(j.acos(a)), 0 > o && (e.rotate = 360 - e.rotate)) : e.rotate = n.deg(j.asin(o)),
e.isSimple = !(+e.shear.toFixed(9) || e.scalex.toFixed(9) != e.scaley.toFixed(9) && e.rotate),
e.isSuperSimple = !+e.shear.toFixed(9) && e.scalex.toFixed(9) == e.scaley.toFixed(9) && !e.rotate,
e.noRotation = !+e.shear.toFixed(9) && !e.rotate, e;
}, e.toTransformString = function(e) {
var t = e || this[P]();
return t.isSimple ? (t.scalex = +t.scalex.toFixed(4), t.scaley = +t.scaley.toFixed(4),
t.rotate = +t.rotate.toFixed(4), (t.dx || t.dy ? "t" + [ t.dx, t.dy ] : L) + (1 != t.scalex || 1 != t.scaley ? "s" + [ t.scalex, t.scaley, 0, 0 ] : L) + (t.rotate ? "r" + [ t.rotate, 0, 0 ] : L)) : "m" + [ this.get(0), this.get(1), this.get(2), this.get(3), this.get(4), this.get(5) ];
};
}(f.prototype);
var Gt = navigator.userAgent.match(/Version\/(.*?)\s/) || navigator.userAgent.match(/Chrome\/(\d+)/);
w.safari = "Apple Computer, Inc." == navigator.vendor && (Gt && Gt[1] < 4 || "iP" == navigator.platform.slice(0, 2)) || "Google Inc." == navigator.vendor && Gt && Gt[1] < 8 ? function() {
var e = this.rect(-99, -99, this.width + 99, this.height + 99).attr({
stroke: "none"
});
setTimeout(function() {
e.remove();
});
} : dt;
for (var qt = function() {
this.returnValue = !1;
}, Ht = function() {
return this.originalEvent.preventDefault();
}, Ut = function() {
this.cancelBubble = !0;
}, zt = function() {
return this.originalEvent.stopPropagation();
}, Vt = function(e) {
var t = E.doc.documentElement.scrollTop || E.doc.body.scrollTop, n = E.doc.documentElement.scrollLeft || E.doc.body.scrollLeft;
return {
x: e.clientX + n,
y: e.clientY + t
};
}, Wt = function() {
return E.doc.addEventListener ? function(e, t, n, i) {
var r = function(e) {
var t = Vt(e);
return n.call(i, e, t.x, t.y);
};
if (e.addEventListener(t, r, !1), M && F[t]) {
var o = function(t) {
for (var r = Vt(t), o = t, a = 0, s = t.targetTouches && t.targetTouches.length; s > a; a++) if (t.targetTouches[a].target == e) {
t = t.targetTouches[a], t.originalEvent = o, t.preventDefault = Ht, t.stopPropagation = zt;
break;
}
return n.call(i, t, r.x, r.y);
};
e.addEventListener(F[t], o, !1);
}
return function() {
return e.removeEventListener(t, r, !1), M && F[t] && e.removeEventListener(F[t], o, !1),
!0;
};
} : E.doc.attachEvent ? function(e, t, n, i) {
var r = function(e) {
e = e || E.win.event;
var t = E.doc.documentElement.scrollTop || E.doc.body.scrollTop, r = E.doc.documentElement.scrollLeft || E.doc.body.scrollLeft, o = e.clientX + r, a = e.clientY + t;
return e.preventDefault = e.preventDefault || qt, e.stopPropagation = e.stopPropagation || Ut,
n.call(i, e, o, a);
};
return e.attachEvent("on" + t, r), function() {
return e.detachEvent("on" + t, r), !0;
};
} : void 0;
}(), Xt = [], Qt = function(e) {
for (var n, i = e.clientX, r = e.clientY, o = E.doc.documentElement.scrollTop || E.doc.body.scrollTop, a = E.doc.documentElement.scrollLeft || E.doc.body.scrollLeft, s = Xt.length; s--; ) {
if (n = Xt[s], M && e.touches) {
for (var l, c = e.touches.length; c--; ) if (l = e.touches[c], l.identifier == n.el._drag.id) {
i = l.clientX, r = l.clientY, (e.originalEvent ? e.originalEvent : e).preventDefault();
break;
}
} else e.preventDefault();
var u, d = n.el.node, p = d.nextSibling, h = d.parentNode, f = d.style.display;
E.win.opera && h.removeChild(d), d.style.display = "none", u = n.el.paper.getElementByPoint(i, r),
d.style.display = f, E.win.opera && (p ? h.insertBefore(d, p) : h.appendChild(d)),
u && t("raphael.drag.over." + n.el.id, n.el, u), i += a, r += o, t("raphael.drag.move." + n.el.id, n.move_scope || n.el, i - n.el._drag.x, r - n.el._drag.y, i, r, e);
}
}, Yt = function(e) {
n.unmousemove(Qt).unmouseup(Yt);
for (var i, r = Xt.length; r--; ) i = Xt[r], i.el._drag = {}, t("raphael.drag.end." + i.el.id, i.end_scope || i.start_scope || i.move_scope || i.el, e);
Xt = [];
}, Kt = n.el = {}, Jt = O.length; Jt--; ) !function(e) {
n[e] = Kt[e] = function(t, i) {
return n.is(t, "function") && (this.events = this.events || [], this.events.push({
name: e,
f: t,
unbind: Wt(this.shape || this.node || E.doc, e, t, i || this)
})), this;
}, n["un" + e] = Kt["un" + e] = function(t) {
for (var i = this.events || [], r = i.length; r--; ) i[r].name != e || !n.is(t, "undefined") && i[r].f != t || (i[r].unbind(),
i.splice(r, 1), !i.length && delete this.events);
return this;
};
}(O[Jt]);
Kt.data = function(e, i) {
var r = ct[this.id] = ct[this.id] || {};
if (0 == arguments.length) return r;
if (1 == arguments.length) {
if (n.is(e, "object")) {
for (var o in e) e[k](o) && this.data(o, e[o]);
return this;
}
return t("raphael.data.get." + this.id, this, r[e], e), r[e];
}
return r[e] = i, t("raphael.data.set." + this.id, this, i, e), this;
}, Kt.removeData = function(e) {
return null == e ? ct[this.id] = {} : ct[this.id] && delete ct[this.id][e], this;
}, Kt.getData = function() {
return i(ct[this.id] || {});
}, Kt.hover = function(e, t, n, i) {
return this.mouseover(e, n).mouseout(t, i || n);
}, Kt.unhover = function(e, t) {
return this.unmouseover(e).unmouseout(t);
};
var Zt = [];
Kt.drag = function(e, i, r, o, a, s) {
function l(l) {
(l.originalEvent || l).preventDefault();
var c = l.clientX, u = l.clientY, d = E.doc.documentElement.scrollTop || E.doc.body.scrollTop, p = E.doc.documentElement.scrollLeft || E.doc.body.scrollLeft;
if (this._drag.id = l.identifier, M && l.touches) for (var h, f = l.touches.length; f--; ) if (h = l.touches[f],
this._drag.id = h.identifier, h.identifier == this._drag.id) {
c = h.clientX, u = h.clientY;
break;
}
this._drag.x = c + p, this._drag.y = u + d, !Xt.length && n.mousemove(Qt).mouseup(Yt),
Xt.push({
el: this,
move_scope: o,
start_scope: a,
end_scope: s
}), i && t.on("raphael.drag.start." + this.id, i), e && t.on("raphael.drag.move." + this.id, e),
r && t.on("raphael.drag.end." + this.id, r), t("raphael.drag.start." + this.id, a || o || this, l.clientX + p, l.clientY + d, l);
}
return this._drag = {}, Zt.push({
el: this,
start: l
}), this.mousedown(l), this;
}, Kt.onDragOver = function(e) {
e ? t.on("raphael.drag.over." + this.id, e) : t.unbind("raphael.drag.over." + this.id);
}, Kt.undrag = function() {
for (var e = Zt.length; e--; ) Zt[e].el == this && (this.unmousedown(Zt[e].start),
Zt.splice(e, 1), t.unbind("raphael.drag.*." + this.id));
!Zt.length && n.unmousemove(Qt).unmouseup(Yt), Xt = [];
}, w.circle = function(e, t, i) {
var r = n._engine.circle(this, e || 0, t || 0, i || 0);
return this.__set__ && this.__set__.push(r), r;
}, w.rect = function(e, t, i, r, o) {
var a = n._engine.rect(this, e || 0, t || 0, i || 0, r || 0, o || 0);
return this.__set__ && this.__set__.push(a), a;
}, w.ellipse = function(e, t, i, r) {
var o = n._engine.ellipse(this, e || 0, t || 0, i || 0, r || 0);
return this.__set__ && this.__set__.push(o), o;
}, w.path = function(e) {
e && !n.is(e, "string") && !n.is(e[0], V) && (e += L);
var t = n._engine.path(n.format[D](n, arguments), this);
return this.__set__ && this.__set__.push(t), t;
}, w.image = function(e, t, i, r, o) {
var a = n._engine.image(this, e || "about:blank", t || 0, i || 0, r || 0, o || 0);
return this.__set__ && this.__set__.push(a), a;
}, w.text = function(e, t, i) {
var r = n._engine.text(this, e || 0, t || 0, R(i));
return this.__set__ && this.__set__.push(r), r;
}, w.set = function(e) {
!n.is(e, "array") && (e = Array.prototype.splice.call(arguments, 0, arguments.length));
var t = new pn(e);
return this.__set__ && this.__set__.push(t), t.paper = this, t.type = "set", t;
}, w.setStart = function(e) {
this.__set__ = e || this.set();
}, w.setFinish = function() {
var e = this.__set__;
return delete this.__set__, e;
}, w.getSize = function() {
var e = this.canvas.parentNode;
return {
width: e.offsetWidth,
height: e.offsetHeight
};
}, w.setSize = function(e, t) {
return n._engine.setSize.call(this, e, t);
}, w.setViewBox = function(e, t, i, r, o) {
return n._engine.setViewBox.call(this, e, t, i, r, o);
}, w.top = w.bottom = null, w.raphael = n;
var en = function(e) {
var t = e.getBoundingClientRect(), n = e.ownerDocument, i = n.body, r = n.documentElement, o = r.clientTop || i.clientTop || 0, a = r.clientLeft || i.clientLeft || 0;
return {
y: t.top + (E.win.pageYOffset || r.scrollTop || i.scrollTop) - o,
x: t.left + (E.win.pageXOffset || r.scrollLeft || i.scrollLeft) - a
};
};
w.getElementByPoint = function(e, t) {
var n = this, i = n.canvas, r = E.doc.elementFromPoint(e, t);
if (E.win.opera && "svg" == r.tagName) {
var o = en(i), a = i.createSVGRect();
a.x = e - o.x, a.y = t - o.y, a.width = a.height = 1;
var s = i.getIntersectionList(a, null);
s.length && (r = s[s.length - 1]);
}
if (!r) return null;
for (;r.parentNode && r != i.parentNode && !r.raphael; ) r = r.parentNode;
return r == n.canvas.parentNode && (r = i), r = r && r.raphael ? n.getById(r.raphaelid) : null;
}, w.getElementsByBBox = function(e) {
var t = this.set();
return this.forEach(function(i) {
n.isBBoxIntersect(i.getBBox(), e) && t.push(i);
}), t;
}, w.getById = function(e) {
for (var t = this.bottom; t; ) {
if (t.id == e) return t;
t = t.next;
}
return null;
}, w.forEach = function(e, t) {
for (var n = this.bottom; n; ) {
if (!1 === e.call(t, n)) return this;
n = n.next;
}
return this;
}, w.getElementsByPoint = function(e, t) {
var n = this.set();
return this.forEach(function(i) {
i.isPointInside(e, t) && n.push(i);
}), n;
}, Kt.isPointInside = function(e, t) {
var i = this.realPath = mt[this.type](this);
return this.attr("transform") && this.attr("transform").length && (i = n.transformPath(i, this.attr("transform"))),
n.isPointInsidePath(i, e, t);
}, Kt.getBBox = function(e) {
if (this.removed) return {};
var t = this._;
return e ? (!t.dirty && t.bboxwt || (this.realPath = mt[this.type](this), t.bboxwt = Et(this.realPath),
t.bboxwt.toString = m, t.dirty = 0), t.bboxwt) : ((t.dirty || t.dirtyT || !t.bbox) && (!t.dirty && this.realPath || (t.bboxwt = 0,
this.realPath = mt[this.type](this)), t.bbox = Et(gt(this.realPath, this.matrix)),
t.bbox.toString = m, t.dirty = t.dirtyT = 0), t.bbox);
}, Kt.clone = function() {
if (this.removed) return null;
var e = this.paper[this.type]().attr(this.attr());
return this.__set__ && this.__set__.push(e), e;
}, Kt.glow = function(e) {
if ("text" == this.type) return null;
e = e || {};
var t = {
width: (e.width || 10) + (+this.attr("stroke-width") || 1),
fill: e.fill || !1,
opacity: e.opacity || .5,
offsetx: e.offsetx || 0,
offsety: e.offsety || 0,
color: e.color || "#000"
}, n = t.width / 2, i = this.paper, r = i.set(), o = this.realPath || mt[this.type](this);
o = this.matrix ? gt(o, this.matrix) : o;
for (var a = 1; n + 1 > a; a++) r.push(i.path(o).attr({
stroke: t.color,
fill: t.fill ? t.color : "none",
"stroke-linejoin": "round",
"stroke-linecap": "round",
"stroke-width": +(t.width / n * a).toFixed(3),
opacity: +(t.opacity / n).toFixed(3)
}));
return r.insertBefore(this).translate(t.offsetx, t.offsety);
};
var tn = function(e, t, i, r, o, a, s, l, d) {
return null == d ? c(e, t, i, r, o, a, s, l) : n.findDotsAtSegment(e, t, i, r, o, a, s, l, u(e, t, i, r, o, a, s, l, d));
}, nn = function(e, t) {
return function(i, r, o) {
i = Pt(i);
for (var a, s, l, c, u, d = "", p = {}, h = 0, f = 0, m = i.length; m > f; f++) {
if (l = i[f], "M" == l[0]) a = +l[1], s = +l[2]; else {
if (c = tn(a, s, l[1], l[2], l[3], l[4], l[5], l[6]), h + c > r) {
if (t && !p.start) {
if (u = tn(a, s, l[1], l[2], l[3], l[4], l[5], l[6], r - h), d += [ "C" + u.start.x, u.start.y, u.m.x, u.m.y, u.x, u.y ],
o) return d;
p.start = d, d = [ "M" + u.x, u.y + "C" + u.n.x, u.n.y, u.end.x, u.end.y, l[5], l[6] ].join(),
h += c, a = +l[5], s = +l[6];
continue;
}
if (!e && !t) return u = tn(a, s, l[1], l[2], l[3], l[4], l[5], l[6], r - h), {
x: u.x,
y: u.y,
alpha: u.alpha
};
}
h += c, a = +l[5], s = +l[6];
}
d += l.shift() + l;
}
return p.end = d, u = e ? h : t ? p : n.findDotsAtSegment(a, s, l[0], l[1], l[2], l[3], l[4], l[5], 1),
u.alpha && (u = {
x: u.x,
y: u.y,
alpha: u.alpha
}), u;
};
}, rn = nn(1), on = nn(), an = nn(0, 1);
n.getTotalLength = rn, n.getPointAtLength = on, n.getSubpath = function(e, t, n) {
if (this.getTotalLength(e) - n < 1e-6) return an(e, t).end;
var i = an(e, n, 1);
return t ? an(i, t).end : i;
}, Kt.getTotalLength = function() {
var e = this.getPath();
return e ? this.node.getTotalLength ? this.node.getTotalLength() : rn(e) : void 0;
}, Kt.getPointAtLength = function(e) {
var t = this.getPath();
return t ? on(t, e) : void 0;
}, Kt.getPath = function() {
var e, t = n._getPath[this.type];
return "text" != this.type && "set" != this.type ? (t && (e = t(this)), e) : void 0;
}, Kt.getSubpath = function(e, t) {
var i = this.getPath();
return i ? n.getSubpath(i, e, t) : void 0;
};
var sn = n.easing_formulas = {
linear: function(e) {
return e;
},
"<": function(e) {
return H(e, 1.7);
},
">": function(e) {
return H(e, .48);
},
"<>": function(e) {
var t = .48 - e / 1.04, n = j.sqrt(.1734 + t * t), i = n - t, r = H(q(i), 1 / 3) * (0 > i ? -1 : 1), o = -n - t, a = H(q(o), 1 / 3) * (0 > o ? -1 : 1), s = r + a + .5;
return 3 * (1 - s) * s * s + s * s * s;
},
backIn: function(e) {
var t = 1.70158;
return e * e * ((t + 1) * e - t);
},
backOut: function(e) {
e -= 1;
var t = 1.70158;
return e * e * ((t + 1) * e + t) + 1;
},
elastic: function(e) {
return e == !!e ? e : H(2, -10 * e) * j.sin(2 * U * (e - .075) / .3) + 1;
},
bounce: function(e) {
var t, n = 7.5625, i = 2.75;
return 1 / i > e ? t = n * e * e : 2 / i > e ? (e -= 1.5 / i, t = n * e * e + .75) : 2.5 / i > e ? (e -= 2.25 / i,
t = n * e * e + .9375) : (e -= 2.625 / i, t = n * e * e + .984375), t;
}
};
sn.easeIn = sn["ease-in"] = sn["<"], sn.easeOut = sn["ease-out"] = sn[">"], sn.easeInOut = sn["ease-in-out"] = sn["<>"],
sn["back-in"] = sn.backIn, sn["back-out"] = sn.backOut;
var ln = [], cn = e.requestAnimationFrame || e.webkitRequestAnimationFrame || e.mozRequestAnimationFrame || e.oRequestAnimationFrame || e.msRequestAnimationFrame || function(e) {
setTimeout(e, 16);
}, un = function() {
for (var e = +new Date(), i = 0; i < ln.length; i++) {
var r = ln[i];
if (!r.el.removed && !r.paused) {
var o, a, s = e - r.start, l = r.ms, c = r.easing, u = r.from, d = r.diff, p = r.to, h = (r.t,
r.el), f = {}, m = {};
if (r.initstatus ? (s = (r.initstatus * r.anim.top - r.prev) / (r.percent - r.prev) * l,
r.status = r.initstatus, delete r.initstatus, r.stop && ln.splice(i--, 1)) : r.status = (r.prev + (r.percent - r.prev) * (s / l)) / r.anim.top,
!(0 > s)) if (l > s) {
var g = c(s / l);
for (var v in u) if (u[k](v)) {
switch (nt[v]) {
case z:
o = +u[v] + g * l * d[v];
break;
case "colour":
o = "rgb(" + [ dn(K(u[v].r + g * l * d[v].r)), dn(K(u[v].g + g * l * d[v].g)), dn(K(u[v].b + g * l * d[v].b)) ].join(",") + ")";
break;
case "path":
o = [];
for (var y = 0, x = u[v].length; x > y; y++) {
o[y] = [ u[v][y][0] ];
for (var w = 1, S = u[v][y].length; S > w; w++) o[y][w] = +u[v][y][w] + g * l * d[v][y][w];
o[y] = o[y].join(A);
}
o = o.join(A);
break;
case "transform":
if (d[v].real) for (o = [], y = 0, x = u[v].length; x > y; y++) for (o[y] = [ u[v][y][0] ],
w = 1, S = u[v][y].length; S > w; w++) o[y][w] = u[v][y][w] + g * l * d[v][y][w]; else {
var C = function(e) {
return +u[v][e] + g * l * d[v][e];
};
o = [ [ "m", C(0), C(1), C(2), C(3), C(4), C(5) ] ];
}
break;
case "csv":
if ("clip-rect" == v) for (o = [], y = 4; y--; ) o[y] = +u[v][y] + g * l * d[v][y];
break;
default:
var _ = [][N](u[v]);
for (o = [], y = h.paper.customAttributes[v].length; y--; ) o[y] = +_[y] + g * l * d[v][y];
}
f[v] = o;
}
h.attr(f), function(e, n, i) {
setTimeout(function() {
t("raphael.anim.frame." + e, n, i);
});
}(h.id, h, r.anim);
} else {
if (function(e, i, r) {
setTimeout(function() {
t("raphael.anim.frame." + i.id, i, r), t("raphael.anim.finish." + i.id, i, r), n.is(e, "function") && e.call(i);
});
}(r.callback, h, r.anim), h.attr(p), ln.splice(i--, 1), r.repeat > 1 && !r.next) {
for (a in p) p[k](a) && (m[a] = r.totalOrigin[a]);
r.el.attr(m), b(r.anim, r.el, r.anim.percents[0], null, r.totalOrigin, r.repeat - 1);
}
r.next && !r.stop && b(r.anim, r.el, r.next, null, r.totalOrigin, r.repeat);
}
}
}
n.svg && h && h.paper && h.paper.safari(), ln.length && cn(un);
}, dn = function(e) {
return e > 255 ? 255 : 0 > e ? 0 : e;
};
Kt.animateWith = function(e, t, i, r, o, a) {
var s = this;
if (s.removed) return a && a.call(s), s;
var l = i instanceof v ? i : n.animation(i, r, o, a);
b(l, s, l.percents[0], null, s.attr());
for (var c = 0, u = ln.length; u > c; c++) if (ln[c].anim == t && ln[c].el == e) {
ln[u - 1].start = ln[c].start;
break;
}
return s;
}, Kt.onAnimation = function(e) {
return e ? t.on("raphael.anim.frame." + this.id, e) : t.unbind("raphael.anim.frame." + this.id),
this;
}, v.prototype.delay = function(e) {
var t = new v(this.anim, this.ms);
return t.times = this.times, t.del = +e || 0, t;
}, v.prototype.repeat = function(e) {
var t = new v(this.anim, this.ms);
return t.del = this.del, t.times = j.floor($(e, 0)) || 1, t;
}, n.animation = function(e, t, i, r) {
if (e instanceof v) return e;
!n.is(i, "function") && i || (r = r || i || null, i = null), e = Object(e), t = +t || 0;
var o, a, s = {};
for (a in e) e[k](a) && J(a) != a && J(a) + "%" != a && (o = !0, s[a] = e[a]);
if (o) return i && (s.easing = i), r && (s.callback = r), new v({
100: s
}, t);
if (r) {
var l = 0;
for (var c in e) {
var u = Z(c);
e[k](c) && u > l && (l = u);
}
l += "%", !e[l].callback && (e[l].callback = r);
}
return new v(e, t);
}, Kt.animate = function(e, t, i, r) {
var o = this;
if (o.removed) return r && r.call(o), o;
var a = e instanceof v ? e : n.animation(e, t, i, r);
return b(a, o, a.percents[0], null, o.attr()), o;
}, Kt.setTime = function(e, t) {
return e && null != t && this.status(e, G(t, e.ms) / e.ms), this;
}, Kt.status = function(e, t) {
var n, i, r = [], o = 0;
if (null != t) return b(e, this, -1, G(t, 1)), this;
for (n = ln.length; n > o; o++) if (i = ln[o], i.el.id == this.id && (!e || i.anim == e)) {
if (e) return i.status;
r.push({
anim: i.anim,
status: i.status
});
}
return e ? 0 : r;
}, Kt.pause = function(e) {
for (var n = 0; n < ln.length; n++) ln[n].el.id != this.id || e && ln[n].anim != e || !1 !== t("raphael.anim.pause." + this.id, this, ln[n].anim) && (ln[n].paused = !0);
return this;
}, Kt.resume = function(e) {
for (var n = 0; n < ln.length; n++) if (ln[n].el.id == this.id && (!e || ln[n].anim == e)) {
var i = ln[n];
!1 !== t("raphael.anim.resume." + this.id, this, i.anim) && (delete i.paused, this.status(i.anim, i.status));
}
return this;
}, Kt.stop = function(e) {
for (var n = 0; n < ln.length; n++) ln[n].el.id != this.id || e && ln[n].anim != e || !1 !== t("raphael.anim.stop." + this.id, this, ln[n].anim) && ln.splice(n--, 1);
return this;
}, t.on("raphael.remove", y), t.on("raphael.clear", y), Kt.toString = function() {
return "Rapha\xebl\u2019s object";
};
var pn = function(e) {
if (this.items = [], this.length = 0, this.type = "set", e) for (var t = 0, n = e.length; n > t; t++) !e[t] || e[t].constructor != Kt.constructor && e[t].constructor != pn || (this[this.items.length] = this.items[this.items.length] = e[t],
this.length++);
}, hn = pn.prototype;
hn.push = function() {
for (var e, t, n = 0, i = arguments.length; i > n; n++) !(e = arguments[n]) || e.constructor != Kt.constructor && e.constructor != pn || (t = this.items.length,
this[t] = this.items[t] = e, this.length++);
return this;
}, hn.pop = function() {
return this.length && delete this[this.length--], this.items.pop();
}, hn.forEach = function(e, t) {
for (var n = 0, i = this.items.length; i > n; n++) if (!1 === e.call(t, this.items[n], n)) return this;
return this;
};
for (var fn in Kt) Kt[k](fn) && (hn[fn] = function(e) {
return function() {
var t = arguments;
return this.forEach(function(n) {
n[e][D](n, t);
});
};
}(fn));
return hn.attr = function(e, t) {
if (e && n.is(e, V) && n.is(e[0], "object")) for (var i = 0, r = e.length; r > i; i++) this.items[i].attr(e[i]); else for (var o = 0, a = this.items.length; a > o; o++) this.items[o].attr(e, t);
return this;
}, hn.clear = function() {
for (;this.length; ) this.pop();
}, hn.splice = function(e, t) {
e = 0 > e ? $(this.length + e, 0) : e, t = $(0, G(this.length - e, t));
var n, i = [], r = [], o = [];
for (n = 2; n < arguments.length; n++) o.push(arguments[n]);
for (n = 0; t > n; n++) r.push(this[e + n]);
for (;n < this.length - e; n++) i.push(this[e + n]);
var a = o.length;
for (n = 0; n < a + i.length; n++) this.items[e + n] = this[e + n] = a > n ? o[n] : i[n - a];
for (n = this.items.length = this.length -= t - a; this[n]; ) delete this[n++];
return new pn(r);
}, hn.exclude = function(e) {
for (var t = 0, n = this.length; n > t; t++) if (this[t] == e) return this.splice(t, 1),
!0;
}, hn.animate = function(e, t, i, r) {
(n.is(i, "function") || !i) && (r = i || null);
var o, a, s = this.items.length, l = s, c = this;
if (!s) return this;
r && (a = function() {
!--s && r.call(c);
}), i = n.is(i, "string") ? i : a;
var u = n.animation(e, t, i, a);
for (o = this.items[--l].animate(u); l--; ) this.items[l] && !this.items[l].removed && this.items[l].animateWith(o, u, u),
this.items[l] && !this.items[l].removed || s--;
return this;
}, hn.insertAfter = function(e) {
for (var t = this.items.length; t--; ) this.items[t].insertAfter(e);
return this;
}, hn.getBBox = function() {
for (var e = [], t = [], n = [], i = [], r = this.items.length; r--; ) if (!this.items[r].removed) {
var o = this.items[r].getBBox();
e.push(o.x), t.push(o.y), n.push(o.x + o.width), i.push(o.y + o.height);
}
return e = G[D](0, e), t = G[D](0, t), n = $[D](0, n), i = $[D](0, i), {
x: e,
y: t,
x2: n,
y2: i,
width: n - e,
height: i - t
};
}, hn.clone = function(e) {
e = this.paper.set();
for (var t = 0, n = this.items.length; n > t; t++) e.push(this.items[t].clone());
return e;
}, hn.toString = function() {
return "Rapha\xebl\u2018s set";
}, hn.glow = function(e) {
var t = this.paper.set();
return this.forEach(function(n) {
var i = n.glow(e);
null != i && i.forEach(function(e) {
t.push(e);
});
}), t;
}, hn.isPointInside = function(e, t) {
var n = !1;
return this.forEach(function(i) {
return i.isPointInside(e, t) ? (n = !0, !1) : void 0;
}), n;
}, n.registerFont = function(e) {
if (!e.face) return e;
this.fonts = this.fonts || {};
var t = {
w: e.w,
face: {},
glyphs: {}
}, n = e.face["font-family"];
for (var i in e.face) e.face[k](i) && (t.face[i] = e.face[i]);
if (this.fonts[n] ? this.fonts[n].push(t) : this.fonts[n] = [ t ], !e.svg) {
t.face["units-per-em"] = Z(e.face["units-per-em"], 10);
for (var r in e.glyphs) if (e.glyphs[k](r)) {
var o = e.glyphs[r];
if (t.glyphs[r] = {
w: o.w,
k: {},
d: o.d && "M" + o.d.replace(/[mlcxtrv]/g, function(e) {
return {
l: "L",
c: "C",
x: "z",
t: "m",
r: "l",
v: "c"
}[e] || "M";
}) + "z"
}, o.k) for (var a in o.k) o[k](a) && (t.glyphs[r].k[a] = o.k[a]);
}
}
return e;
}, w.getFont = function(e, t, i, r) {
if (r = r || "normal", i = i || "normal", t = +t || {
normal: 400,
bold: 700,
lighter: 300,
bolder: 800
}[t] || 400, n.fonts) {
var o = n.fonts[e];
if (!o) {
var a = new RegExp("(^|\\s)" + e.replace(/[^\w\d\s+!~.:_-]/g, L) + "(\\s|$)", "i");
for (var s in n.fonts) if (n.fonts[k](s) && a.test(s)) {
o = n.fonts[s];
break;
}
}
var l;
if (o) for (var c = 0, u = o.length; u > c && (l = o[c], l.face["font-weight"] != t || l.face["font-style"] != i && l.face["font-style"] || l.face["font-stretch"] != r); c++) ;
return l;
}
}, w.print = function(e, t, i, r, o, a, s, l) {
a = a || "middle", s = $(G(s || 0, 1), -1), l = $(G(l || 1, 3), 1);
var c, u = R(i)[P](L), d = 0, p = 0, h = L;
if (n.is(r, "string") && (r = this.getFont(r)), r) {
c = (o || 16) / r.face["units-per-em"];
for (var f = r.face.bbox[P](S), m = +f[0], g = f[3] - f[1], v = 0, b = +f[1] + ("baseline" == a ? g + +r.face.descent : g / 2), y = 0, x = u.length; x > y; y++) {
if ("\n" == u[y]) d = 0, C = 0, p = 0, v += g * l; else {
var w = p && r.glyphs[u[y - 1]] || {}, C = r.glyphs[u[y]];
d += p ? (w.w || r.w) + (w.k && w.k[u[y]] || 0) + r.w * s : 0, p = 1;
}
C && C.d && (h += n.transformPath(C.d, [ "t", d * c, v * c, "s", c, c, m, b, "t", (e - m) / c, (t - b) / c ]));
}
}
return this.path(h).attr({
fill: "#000",
stroke: "none"
});
}, w.add = function(e) {
if (n.is(e, "array")) for (var t, i = this.set(), r = 0, o = e.length; o > r; r++) t = e[r] || {},
C[k](t.type) && i.push(this[t.type]().attr(t));
return i;
}, n.format = function(e, t) {
var i = n.is(t, V) ? [ 0 ][N](t) : arguments;
return e && n.is(e, "string") && i.length - 1 && (e = e.replace(_, function(e, t) {
return null == i[++t] ? L : i[t];
})), e || L;
}, n.fullfill = function() {
var e = /\{([^\}]+)\}/g, t = /(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g, n = function(e, n, i) {
var r = i;
return n.replace(t, function(e, t, n, i, o) {
t = t || i, r && (t in r && (r = r[t]), "function" == typeof r && o && (r = r()));
}), r = (null == r || r == i ? e : r) + "";
};
return function(t, i) {
return String(t).replace(e, function(e, t) {
return n(e, t, i);
});
};
}(), n.ninja = function() {
return T.was ? E.win.Raphael = T.is : delete Raphael, n;
}, n.st = hn, t.on("raphael.DOMload", function() {
x = !0;
}), function(e, t, i) {
function r() {
/in/.test(e.readyState) ? setTimeout(r, 9) : n.eve("raphael.DOMload");
}
null == e.readyState && e.addEventListener && (e.addEventListener("DOMContentLoaded", i = function() {
e.removeEventListener("DOMContentLoaded", i, !1), e.readyState = "complete";
}, !1), e.readyState = "loading"), r();
}(document), function() {
if (n.svg) {
var e = "hasOwnProperty", t = String, i = parseFloat, r = parseInt, o = Math, a = o.max, s = o.abs, l = o.pow, c = /[, ]+/, u = n.eve, d = "", p = " ", h = "http://www.w3.org/1999/xlink", f = {
block: "M5,0 0,2.5 5,5z",
classic: "M5,0 0,2.5 5,5 3.5,3 3.5,2z",
diamond: "M2.5,0 5,2.5 2.5,5 0,2.5z",
open: "M6,1 1,3.5 6,6",
oval: "M2.5,0A2.5,2.5,0,0,1,2.5,5 2.5,2.5,0,0,1,2.5,0z"
}, m = {};
n.toString = function() {
return "Your browser supports SVG.\nYou are running Rapha\xebl " + this.version;
};
var g = function(i, r) {
if (r) {
"string" == typeof i && (i = g(i));
for (var o in r) r[e](o) && ("xlink:" == o.substring(0, 6) ? i.setAttributeNS(h, o.substring(6), t(r[o])) : i.setAttribute(o, t(r[o])));
} else i = n._g.doc.createElementNS("http://www.w3.org/2000/svg", i), i.style && (i.style.webkitTapHighlightColor = "rgba(0,0,0,0)");
return i;
}, v = function(e, r) {
var c = "linear", u = e.id + r, p = .5, h = .5, f = e.node, m = e.paper, v = f.style, b = n._g.doc.getElementById(u);
if (!b) {
if (r = t(r).replace(n._radial_gradient, function(e, t, n) {
if (c = "radial", t && n) {
p = i(t), h = i(n);
var r = 2 * (h > .5) - 1;
l(p - .5, 2) + l(h - .5, 2) > .25 && (h = o.sqrt(.25 - l(p - .5, 2)) * r + .5) && .5 != h && (h = h.toFixed(5) - 1e-5 * r);
}
return d;
}), r = r.split(/\s*\-\s*/), "linear" == c) {
var y = r.shift();
if (y = -i(y), isNaN(y)) return null;
var x = [ 0, 0, o.cos(n.rad(y)), o.sin(n.rad(y)) ], w = 1 / (a(s(x[2]), s(x[3])) || 1);
x[2] *= w, x[3] *= w, x[2] < 0 && (x[0] = -x[2], x[2] = 0), x[3] < 0 && (x[1] = -x[3],
x[3] = 0);
}
var S = n._parseDots(r);
if (!S) return null;
if (u = u.replace(/[\(\)\s,\xb0#]/g, "_"), e.gradient && u != e.gradient.id && (m.defs.removeChild(e.gradient),
delete e.gradient), !e.gradient) {
b = g(c + "Gradient", {
id: u
}), e.gradient = b, g(b, "radial" == c ? {
fx: p,
fy: h
} : {
x1: x[0],
y1: x[1],
x2: x[2],
y2: x[3],
gradientTransform: e.matrix.invert()
}), m.defs.appendChild(b);
for (var C = 0, _ = S.length; _ > C; C++) b.appendChild(g("stop", {
offset: S[C].offset ? S[C].offset : C ? "100%" : "0%",
"stop-color": S[C].color || "#fff"
}));
}
}
return g(f, {
fill: "url('" + document.location + "#" + u + "')",
opacity: 1,
"fill-opacity": 1
}), v.fill = d, v.opacity = 1, v.fillOpacity = 1, 1;
}, b = function(e) {
var t = e.getBBox(1);
g(e.pattern, {
patternTransform: e.matrix.invert() + " translate(" + t.x + "," + t.y + ")"
});
}, y = function(i, r, o) {
if ("path" == i.type) {
for (var a, s, l, c, u, p = t(r).toLowerCase().split("-"), h = i.paper, v = o ? "end" : "start", b = i.node, y = i.attrs, x = y["stroke-width"], w = p.length, S = "classic", C = 3, _ = 3, k = 5; w--; ) switch (p[w]) {
case "block":
case "classic":
case "oval":
case "diamond":
case "open":
case "none":
S = p[w];
break;
case "wide":
_ = 5;
break;
case "narrow":
_ = 2;
break;
case "long":
C = 5;
break;
case "short":
C = 2;
}
if ("open" == S ? (C += 2, _ += 2, k += 2, l = 1, c = o ? 4 : 1, u = {
fill: "none",
stroke: y.stroke
}) : (c = l = C / 2, u = {
fill: y.stroke,
stroke: "none"
}), i._.arrows ? o ? (i._.arrows.endPath && m[i._.arrows.endPath]--, i._.arrows.endMarker && m[i._.arrows.endMarker]--) : (i._.arrows.startPath && m[i._.arrows.startPath]--,
i._.arrows.startMarker && m[i._.arrows.startMarker]--) : i._.arrows = {}, "none" != S) {
var E = "raphael-marker-" + S, T = "raphael-marker-" + v + S + C + _ + "-obj" + i.id;
n._g.doc.getElementById(E) ? m[E]++ : (h.defs.appendChild(g(g("path"), {
"stroke-linecap": "round",
d: f[S],
id: E
})), m[E] = 1);
var I, D = n._g.doc.getElementById(T);
D ? (m[T]++, I = D.getElementsByTagName("use")[0]) : (D = g(g("marker"), {
id: T,
markerHeight: _,
markerWidth: C,
orient: "auto",
refX: c,
refY: _ / 2
}), I = g(g("use"), {
"xlink:href": "#" + E,
transform: (o ? "rotate(180 " + C / 2 + " " + _ / 2 + ") " : d) + "scale(" + C / k + "," + _ / k + ")",
"stroke-width": (1 / ((C / k + _ / k) / 2)).toFixed(4)
}), D.appendChild(I), h.defs.appendChild(D), m[T] = 1), g(I, u);
var N = l * ("diamond" != S && "oval" != S);
o ? (a = i._.arrows.startdx * x || 0, s = n.getTotalLength(y.path) - N * x) : (a = N * x,
s = n.getTotalLength(y.path) - (i._.arrows.enddx * x || 0)), u = {}, u["marker-" + v] = "url(#" + T + ")",
(s || a) && (u.d = n.getSubpath(y.path, a, s)), g(b, u), i._.arrows[v + "Path"] = E,
i._.arrows[v + "Marker"] = T, i._.arrows[v + "dx"] = N, i._.arrows[v + "Type"] = S,
i._.arrows[v + "String"] = r;
} else o ? (a = i._.arrows.startdx * x || 0, s = n.getTotalLength(y.path) - a) : (a = 0,
s = n.getTotalLength(y.path) - (i._.arrows.enddx * x || 0)), i._.arrows[v + "Path"] && g(b, {
d: n.getSubpath(y.path, a, s)
}), delete i._.arrows[v + "Path"], delete i._.arrows[v + "Marker"], delete i._.arrows[v + "dx"],
delete i._.arrows[v + "Type"], delete i._.arrows[v + "String"];
for (u in m) if (m[e](u) && !m[u]) {
var M = n._g.doc.getElementById(u);
M && M.parentNode.removeChild(M);
}
}
}, x = {
"": [ 0 ],
none: [ 0 ],
"-": [ 3, 1 ],
".": [ 1, 1 ],
"-.": [ 3, 1, 1, 1 ],
"-..": [ 3, 1, 1, 1, 1, 1 ],
". ": [ 1, 3 ],
"- ": [ 4, 3 ],
"--": [ 8, 3 ],
"- .": [ 4, 3, 1, 3 ],
"--.": [ 8, 3, 1, 3 ],
"--..": [ 8, 3, 1, 3, 1, 3 ]
}, w = function(e, n, i) {
if (n = x[t(n).toLowerCase()]) {
for (var r = e.attrs["stroke-width"] || "1", o = {
round: r,
square: r,
butt: 0
}[e.attrs["stroke-linecap"] || i["stroke-linecap"]] || 0, a = [], s = n.length; s--; ) a[s] = n[s] * r + (s % 2 ? 1 : -1) * o;
g(e.node, {
"stroke-dasharray": a.join(",")
});
}
}, S = function(i, o) {
var l = i.node, u = i.attrs, p = l.style.visibility;
l.style.visibility = "hidden";
for (var f in o) if (o[e](f)) {
if (!n._availableAttrs[e](f)) continue;
var m = o[f];
switch (u[f] = m, f) {
case "blur":
i.blur(m);
break;
case "title":
var x = l.getElementsByTagName("title");
if (x.length && (x = x[0])) x.firstChild.nodeValue = m; else {
x = g("title");
var S = n._g.doc.createTextNode(m);
x.appendChild(S), l.appendChild(x);
}
break;
case "href":
case "target":
var _ = l.parentNode;
if ("a" != _.tagName.toLowerCase()) {
var k = g("a");
_.insertBefore(k, l), k.appendChild(l), _ = k;
}
"target" == f ? _.setAttributeNS(h, "show", "blank" == m ? "new" : m) : _.setAttributeNS(h, f, m);
break;
case "cursor":
l.style.cursor = m;
break;
case "transform":
i.transform(m);
break;
case "arrow-start":
y(i, m);
break;
case "arrow-end":
y(i, m, 1);
break;
case "clip-rect":
var E = t(m).split(c);
if (4 == E.length) {
i.clip && i.clip.parentNode.parentNode.removeChild(i.clip.parentNode);
var T = g("clipPath"), I = g("rect");
T.id = n.createUUID(), g(I, {
x: E[0],
y: E[1],
width: E[2],
height: E[3]
}), T.appendChild(I), i.paper.defs.appendChild(T), g(l, {
"clip-path": "url(#" + T.id + ")"
}), i.clip = I;
}
if (!m) {
var D = l.getAttribute("clip-path");
if (D) {
var N = n._g.doc.getElementById(D.replace(/(^url\(#|\)$)/g, d));
N && N.parentNode.removeChild(N), g(l, {
"clip-path": d
}), delete i.clip;
}
}
break;
case "path":
"path" == i.type && (g(l, {
d: m ? u.path = n._pathToAbsolute(m) : "M0,0"
}), i._.dirty = 1, i._.arrows && ("startString" in i._.arrows && y(i, i._.arrows.startString),
"endString" in i._.arrows && y(i, i._.arrows.endString, 1)));
break;
case "width":
if (l.setAttribute(f, m), i._.dirty = 1, !u.fx) break;
f = "x", m = u.x;
case "x":
u.fx && (m = -u.x - (u.width || 0));
case "rx":
if ("rx" == f && "rect" == i.type) break;
case "cx":
l.setAttribute(f, m), i.pattern && b(i), i._.dirty = 1;
break;
case "height":
if (l.setAttribute(f, m), i._.dirty = 1, !u.fy) break;
f = "y", m = u.y;
case "y":
u.fy && (m = -u.y - (u.height || 0));
case "ry":
if ("ry" == f && "rect" == i.type) break;
case "cy":
l.setAttribute(f, m), i.pattern && b(i), i._.dirty = 1;
break;
case "r":
"rect" == i.type ? g(l, {
rx: m,
ry: m
}) : l.setAttribute(f, m), i._.dirty = 1;
break;
case "src":
"image" == i.type && l.setAttributeNS(h, "href", m);
break;
case "stroke-width":
1 == i._.sx && 1 == i._.sy || (m /= a(s(i._.sx), s(i._.sy)) || 1), l.setAttribute(f, m),
u["stroke-dasharray"] && w(i, u["stroke-dasharray"], o), i._.arrows && ("startString" in i._.arrows && y(i, i._.arrows.startString),
"endString" in i._.arrows && y(i, i._.arrows.endString, 1));
break;
case "stroke-dasharray":
w(i, m, o);
break;
case "fill":
var M = t(m).match(n._ISURL);
if (M) {
T = g("pattern");
var L = g("image");
T.id = n.createUUID(), g(T, {
x: 0,
y: 0,
patternUnits: "userSpaceOnUse",
height: 1,
width: 1
}), g(L, {
x: 0,
y: 0,
"xlink:href": M[1]
}), T.appendChild(L), function(e) {
n._preload(M[1], function() {
var t = this.offsetWidth, n = this.offsetHeight;
g(e, {
width: t,
height: n
}), g(L, {
width: t,
height: n
}), i.paper.safari();
});
}(T), i.paper.defs.appendChild(T), g(l, {
fill: "url(#" + T.id + ")"
}), i.pattern = T, i.pattern && b(i);
break;
}
var A = n.getRGB(m);
if (A.error) {
if (("circle" == i.type || "ellipse" == i.type || "r" != t(m).charAt()) && v(i, m)) {
if ("opacity" in u || "fill-opacity" in u) {
var R = n._g.doc.getElementById(l.getAttribute("fill").replace(/^url\(#|\)$/g, d));
if (R) {
var P = R.getElementsByTagName("stop");
g(P[P.length - 1], {
"stop-opacity": ("opacity" in u ? u.opacity : 1) * ("fill-opacity" in u ? u["fill-opacity"] : 1)
});
}
}
u.gradient = m, u.fill = "none";
break;
}
} else delete o.gradient, delete u.gradient, !n.is(u.opacity, "undefined") && n.is(o.opacity, "undefined") && g(l, {
opacity: u.opacity
}), !n.is(u["fill-opacity"], "undefined") && n.is(o["fill-opacity"], "undefined") && g(l, {
"fill-opacity": u["fill-opacity"]
});
A[e]("opacity") && g(l, {
"fill-opacity": A.opacity > 1 ? A.opacity / 100 : A.opacity
});
case "stroke":
A = n.getRGB(m), l.setAttribute(f, A.hex), "stroke" == f && A[e]("opacity") && g(l, {
"stroke-opacity": A.opacity > 1 ? A.opacity / 100 : A.opacity
}), "stroke" == f && i._.arrows && ("startString" in i._.arrows && y(i, i._.arrows.startString),
"endString" in i._.arrows && y(i, i._.arrows.endString, 1));
break;
case "gradient":
("circle" == i.type || "ellipse" == i.type || "r" != t(m).charAt()) && v(i, m);
break;
case "opacity":
u.gradient && !u[e]("stroke-opacity") && g(l, {
"stroke-opacity": m > 1 ? m / 100 : m
});
case "fill-opacity":
if (u.gradient) {
R = n._g.doc.getElementById(l.getAttribute("fill").replace(/^url\(#|\)$/g, d)),
R && (P = R.getElementsByTagName("stop"), g(P[P.length - 1], {
"stop-opacity": m
}));
break;
}
default:
"font-size" == f && (m = r(m, 10) + "px");
var O = f.replace(/(\-.)/g, function(e) {
return e.substring(1).toUpperCase();
});
l.style[O] = m, i._.dirty = 1, l.setAttribute(f, m);
}
}
C(i, o), l.style.visibility = p;
}, C = function(i, o) {
if ("text" == i.type && (o[e]("text") || o[e]("font") || o[e]("font-size") || o[e]("x") || o[e]("y"))) {
var a = i.attrs, s = i.node, l = s.firstChild ? r(n._g.doc.defaultView.getComputedStyle(s.firstChild, d).getPropertyValue("font-size"), 10) : 10;
if (o[e]("text")) {
for (a.text = o.text; s.firstChild; ) s.removeChild(s.firstChild);
for (var c, u = t(o.text).split("\n"), p = [], h = 0, f = u.length; f > h; h++) c = g("tspan"),
h && g(c, {
dy: 1.2 * l,
x: a.x
}), c.appendChild(n._g.doc.createTextNode(u[h])), s.appendChild(c), p[h] = c;
} else for (p = s.getElementsByTagName("tspan"), h = 0, f = p.length; f > h; h++) h ? g(p[h], {
dy: 1.2 * l,
x: a.x
}) : g(p[0], {
dy: 0
});
g(s, {
x: a.x,
y: a.y
}), i._.dirty = 1;
var m = i._getBBox(), v = a.y - (m.y + m.height / 2);
v && n.is(v, "finite") && g(p[0], {
dy: v
});
}
}, _ = function(e) {
return e.parentNode && "a" === e.parentNode.tagName.toLowerCase() ? e.parentNode : e;
}, k = function(e, t) {
this[0] = this.node = e, e.raphael = !0, this.id = n._oid++, e.raphaelid = this.id,
this.matrix = n.matrix(), this.realPath = null, this.paper = t, this.attrs = this.attrs || {},
this._ = {
transform: [],
sx: 1,
sy: 1,
deg: 0,
dx: 0,
dy: 0,
dirty: 1
}, !t.bottom && (t.bottom = this), this.prev = t.top, t.top && (t.top.next = this),
t.top = this, this.next = null;
}, E = n.el;
k.prototype = E, E.constructor = k, n._engine.path = function(e, t) {
var n = g("path");
t.canvas && t.canvas.appendChild(n);
var i = new k(n, t);
return i.type = "path", S(i, {
fill: "none",
stroke: "#000",
path: e
}), i;
}, E.rotate = function(e, n, r) {
if (this.removed) return this;
if (e = t(e).split(c), e.length - 1 && (n = i(e[1]), r = i(e[2])), e = i(e[0]),
null == r && (n = r), null == n || null == r) {
var o = this.getBBox(1);
n = o.x + o.width / 2, r = o.y + o.height / 2;
}
return this.transform(this._.transform.concat([ [ "r", e, n, r ] ])), this;
}, E.scale = function(e, n, r, o) {
if (this.removed) return this;
if (e = t(e).split(c), e.length - 1 && (n = i(e[1]), r = i(e[2]), o = i(e[3])),
e = i(e[0]), null == n && (n = e), null == o && (r = o), null == r || null == o) var a = this.getBBox(1);
return r = null == r ? a.x + a.width / 2 : r, o = null == o ? a.y + a.height / 2 : o,
this.transform(this._.transform.concat([ [ "s", e, n, r, o ] ])), this;
}, E.translate = function(e, n) {
return this.removed ? this : (e = t(e).split(c), e.length - 1 && (n = i(e[1])),
e = i(e[0]) || 0, n = +n || 0, this.transform(this._.transform.concat([ [ "t", e, n ] ])),
this);
}, E.transform = function(t) {
var i = this._;
if (null == t) return i.transform;
if (n._extractTransform(this, t), this.clip && g(this.clip, {
transform: this.matrix.invert()
}), this.pattern && b(this), this.node && g(this.node, {
transform: this.matrix
}), 1 != i.sx || 1 != i.sy) {
var r = this.attrs[e]("stroke-width") ? this.attrs["stroke-width"] : 1;
this.attr({
"stroke-width": r
});
}
return this;
}, E.hide = function() {
return !this.removed && this.paper.safari(this.node.style.display = "none"), this;
}, E.show = function() {
return !this.removed && this.paper.safari(this.node.style.display = ""), this;
}, E.remove = function() {
var e = _(this.node);
if (!this.removed && e.parentNode) {
var t = this.paper;
t.__set__ && t.__set__.exclude(this), u.unbind("raphael.*.*." + this.id), this.gradient && t.defs.removeChild(this.gradient),
n._tear(this, t), e.parentNode.removeChild(e), this.removeData();
for (var i in this) this[i] = "function" == typeof this[i] ? n._removedFactory(i) : null;
this.removed = !0;
}
}, E._getBBox = function() {
if ("none" == this.node.style.display) {
this.show();
var e = !0;
}
var t, n = !1;
this.paper.canvas.parentElement ? t = this.paper.canvas.parentElement.style : this.paper.canvas.parentNode && (t = this.paper.canvas.parentNode.style),
t && "none" == t.display && (n = !0, t.display = "");
var i = {};
try {
i = this.node.getBBox();
} catch (e) {
i = {
x: this.node.clientLeft,
y: this.node.clientTop,
width: this.node.clientWidth,
height: this.node.clientHeight
};
} finally {
i = i || {}, n && (t.display = "none");
}
return e && this.hide(), i;
}, E.attr = function(t, i) {
if (this.removed) return this;
if (null == t) {
var r = {};
for (var o in this.attrs) this.attrs[e](o) && (r[o] = this.attrs[o]);
return r.gradient && "none" == r.fill && (r.fill = r.gradient) && delete r.gradient,
r.transform = this._.transform, r;
}
if (null == i && n.is(t, "string")) {
if ("fill" == t && "none" == this.attrs.fill && this.attrs.gradient) return this.attrs.gradient;
if ("transform" == t) return this._.transform;
for (var a = t.split(c), s = {}, l = 0, d = a.length; d > l; l++) t = a[l], s[t] = t in this.attrs ? this.attrs[t] : n.is(this.paper.customAttributes[t], "function") ? this.paper.customAttributes[t].def : n._availableAttrs[t];
return d - 1 ? s : s[a[0]];
}
if (null == i && n.is(t, "array")) {
for (s = {}, l = 0, d = t.length; d > l; l++) s[t[l]] = this.attr(t[l]);
return s;
}
if (null != i) {
var p = {};
p[t] = i;
} else null != t && n.is(t, "object") && (p = t);
for (var h in p) u("raphael.attr." + h + "." + this.id, this, p[h]);
for (h in this.paper.customAttributes) if (this.paper.customAttributes[e](h) && p[e](h) && n.is(this.paper.customAttributes[h], "function")) {
var f = this.paper.customAttributes[h].apply(this, [].concat(p[h]));
this.attrs[h] = p[h];
for (var m in f) f[e](m) && (p[m] = f[m]);
}
return S(this, p), this;
}, E.toFront = function() {
if (this.removed) return this;
var e = _(this.node);
e.parentNode.appendChild(e);
var t = this.paper;
return t.top != this && n._tofront(this, t), this;
}, E.toBack = function() {
if (this.removed) return this;
var e = _(this.node), t = e.parentNode;
return t.insertBefore(e, t.firstChild), n._toback(this, this.paper), this.paper,
this;
}, E.insertAfter = function(e) {
if (this.removed || !e) return this;
var t = _(this.node), i = _(e.node || e[e.length - 1].node);
return i.nextSibling ? i.parentNode.insertBefore(t, i.nextSibling) : i.parentNode.appendChild(t),
n._insertafter(this, e, this.paper), this;
}, E.insertBefore = function(e) {
if (this.removed || !e) return this;
var t = _(this.node), i = _(e.node || e[0].node);
return i.parentNode.insertBefore(t, i), n._insertbefore(this, e, this.paper), this;
}, E.blur = function(e) {
var t = this;
if (0 != +e) {
var i = g("filter"), r = g("feGaussianBlur");
t.attrs.blur = e, i.id = n.createUUID(), g(r, {
stdDeviation: +e || 1.5
}), i.appendChild(r), t.paper.defs.appendChild(i), t._blur = i, g(t.node, {
filter: "url(#" + i.id + ")"
});
} else t._blur && (t._blur.parentNode.removeChild(t._blur), delete t._blur, delete t.attrs.blur),
t.node.removeAttribute("filter");
return t;
}, n._engine.circle = function(e, t, n, i) {
var r = g("circle");
e.canvas && e.canvas.appendChild(r);
var o = new k(r, e);
return o.attrs = {
cx: t,
cy: n,
r: i,
fill: "none",
stroke: "#000"
}, o.type = "circle", g(r, o.attrs), o;
}, n._engine.rect = function(e, t, n, i, r, o) {
var a = g("rect");
e.canvas && e.canvas.appendChild(a);
var s = new k(a, e);
return s.attrs = {
x: t,
y: n,
width: i,
height: r,
rx: o || 0,
ry: o || 0,
fill: "none",
stroke: "#000"
}, s.type = "rect", g(a, s.attrs), s;
}, n._engine.ellipse = function(e, t, n, i, r) {
var o = g("ellipse");
e.canvas && e.canvas.appendChild(o);
var a = new k(o, e);
return a.attrs = {
cx: t,
cy: n,
rx: i,
ry: r,
fill: "none",
stroke: "#000"
}, a.type = "ellipse", g(o, a.attrs), a;
}, n._engine.image = function(e, t, n, i, r, o) {
var a = g("image");
g(a, {
x: n,
y: i,
width: r,
height: o,
preserveAspectRatio: "none"
}), a.setAttributeNS(h, "href", t), e.canvas && e.canvas.appendChild(a);
var s = new k(a, e);
return s.attrs = {
x: n,
y: i,
width: r,
height: o,
src: t
}, s.type = "image", s;
}, n._engine.text = function(e, t, i, r) {
var o = g("text");
e.canvas && e.canvas.appendChild(o);
var a = new k(o, e);
return a.attrs = {
x: t,
y: i,
"text-anchor": "middle",
text: r,
"font-family": n._availableAttrs["font-family"],
"font-size": n._availableAttrs["font-size"],
stroke: "none",
fill: "#000"
}, a.type = "text", S(a, a.attrs), a;
}, n._engine.setSize = function(e, t) {
return this.width = e || this.width, this.height = t || this.height, this.canvas.setAttribute("width", this.width),
this.canvas.setAttribute("height", this.height), this._viewBox && this.setViewBox.apply(this, this._viewBox),
this;
}, n._engine.create = function() {
var e = n._getContainer.apply(0, arguments), t = e && e.container, i = e.x, r = e.y, o = e.width, a = e.height;
if (!t) throw new Error("SVG container not found.");
var s, l = g("svg"), c = "overflow:hidden;";
return i = i || 0, r = r || 0, o = o || 512, a = a || 342, g(l, {
height: a,
version: 1.1,
width: o,
xmlns: "http://www.w3.org/2000/svg",
"xmlns:xlink": "http://www.w3.org/1999/xlink"
}), 1 == t ? (l.style.cssText = c + "position:absolute;left:" + i + "px;top:" + r + "px",
n._g.doc.body.appendChild(l), s = 1) : (l.style.cssText = c + "position:relative",
t.firstChild ? t.insertBefore(l, t.firstChild) : t.appendChild(l)), t = new n._Paper(),
t.width = o, t.height = a, t.canvas = l, t.clear(), t._left = t._top = 0, s && (t.renderfix = function() {}),
t.renderfix(), t;
}, n._engine.setViewBox = function(e, t, n, i, r) {
u("raphael.setViewBox", this, this._viewBox, [ e, t, n, i, r ]);
var o, s, l = this.getSize(), c = a(n / l.width, i / l.height), d = this.top, h = r ? "xMidYMid meet" : "xMinYMin";
for (null == e ? (this._vbSize && (c = 1), delete this._vbSize, o = "0 0 " + this.width + p + this.height) : (this._vbSize = c,
o = e + p + t + p + n + p + i), g(this.canvas, {
viewBox: o,
preserveAspectRatio: h
}); c && d; ) s = "stroke-width" in d.attrs ? d.attrs["stroke-width"] : 1, d.attr({
"stroke-width": s
}), d._.dirty = 1, d._.dirtyT = 1, d = d.prev;
return this._viewBox = [ e, t, n, i, !!r ], this;
}, n.prototype.renderfix = function() {
var e, t = this.canvas, n = t.style;
try {
e = t.getScreenCTM() || t.createSVGMatrix();
} catch (n) {
e = t.createSVGMatrix();
}
var i = -e.e % 1, r = -e.f % 1;
(i || r) && (i && (this._left = (this._left + i) % 1, n.left = this._left + "px"),
r && (this._top = (this._top + r) % 1, n.top = this._top + "px"));
}, n.prototype.clear = function() {
n.eve("raphael.clear", this);
for (var e = this.canvas; e.firstChild; ) e.removeChild(e.firstChild);
this.bottom = this.top = null, (this.desc = g("desc")).appendChild(n._g.doc.createTextNode("Created with Rapha\xebl " + n.version)),
e.appendChild(this.desc), e.appendChild(this.defs = g("defs"));
}, n.prototype.remove = function() {
u("raphael.remove", this), this.canvas.parentNode && this.canvas.parentNode.removeChild(this.canvas);
for (var e in this) this[e] = "function" == typeof this[e] ? n._removedFactory(e) : null;
};
var T = n.st;
for (var I in E) E[e](I) && !T[e](I) && (T[I] = function(e) {
return function() {
var t = arguments;
return this.forEach(function(n) {
n[e].apply(n, t);
});
};
}(I));
}
}(), function() {
if (n.vml) {
var e = "hasOwnProperty", t = String, i = parseFloat, r = Math, o = r.round, a = r.max, s = r.min, l = r.abs, c = /[, ]+/, u = n.eve, d = " ", p = "", h = {
M: "m",
L: "l",
C: "c",
Z: "x",
m: "t",
l: "r",
c: "v",
z: "x"
}, f = /([clmz]),?([^clmz]*)/gi, m = / progid:\S+Blur\([^\)]+\)/g, g = /-?[^,\s-]+/g, v = "position:absolute;left:0;top:0;width:1px;height:1px;behavior:url(#default#VML)", b = 21600, y = {
path: 1,
rect: 1,
image: 1
}, x = {
circle: 1,
ellipse: 1
}, w = function(e) {
var i = /[ahqstv]/gi, r = n._pathToAbsolute;
if (t(e).match(i) && (r = n._path2curve), i = /[clmz]/g, r == n._pathToAbsolute && !t(e).match(i)) {
var a = t(e).replace(f, function(e, t, n) {
var i = [], r = "m" == t.toLowerCase(), a = h[t];
return n.replace(g, function(e) {
r && 2 == i.length && (a += i + h["m" == t ? "l" : "L"], i = []), i.push(o(e * b));
}), a + i;
});
return a;
}
var s, l, c = r(e);
a = [];
for (var u = 0, m = c.length; m > u; u++) {
s = c[u], l = c[u][0].toLowerCase(), "z" == l && (l = "x");
for (var v = 1, y = s.length; y > v; v++) l += o(s[v] * b) + (v != y - 1 ? "," : p);
a.push(l);
}
return a.join(d);
}, S = function(e, t, i) {
var r = n.matrix();
return r.rotate(-e, .5, .5), {
dx: r.x(t, i),
dy: r.y(t, i)
};
}, C = function(e, t, n, i, r, o) {
var a = e._, s = e.matrix, c = a.fillpos, u = e.node, p = u.style, h = 1, f = "", m = b / t, g = b / n;
if (p.visibility = "hidden", t && n) {
if (u.coordsize = l(m) + d + l(g), p.rotation = o * (0 > t * n ? -1 : 1), o) {
var v = S(o, i, r);
i = v.dx, r = v.dy;
}
if (0 > t && (f += "x"), 0 > n && (f += " y") && (h = -1), p.flip = f, u.coordorigin = i * -m + d + r * -g,
c || a.fillsize) {
var y = u.getElementsByTagName("fill");
y = y && y[0], u.removeChild(y), c && (v = S(o, s.x(c[0], c[1]), s.y(c[0], c[1])),
y.position = v.dx * h + d + v.dy * h), a.fillsize && (y.size = a.fillsize[0] * l(t) + d + a.fillsize[1] * l(n)),
u.appendChild(y);
}
p.visibility = "visible";
}
};
n.toString = function() {
return "Your browser doesn\u2019t support SVG. Falling down to VML.\nYou are running Rapha\xebl " + this.version;
};
var _ = function(e, n, i) {
for (var r = t(n).toLowerCase().split("-"), o = i ? "end" : "start", a = r.length, s = "classic", l = "medium", c = "medium"; a--; ) switch (r[a]) {
case "block":
case "classic":
case "oval":
case "diamond":
case "open":
case "none":
s = r[a];
break;
case "wide":
case "narrow":
c = r[a];
break;
case "long":
case "short":
l = r[a];
}
var u = e.node.getElementsByTagName("stroke")[0];
u[o + "arrow"] = s, u[o + "arrowlength"] = l, u[o + "arrowwidth"] = c;
}, k = function(r, l) {
r.attrs = r.attrs || {};
var u = r.node, h = r.attrs, f = u.style, m = y[r.type] && (l.x != h.x || l.y != h.y || l.width != h.width || l.height != h.height || l.cx != h.cx || l.cy != h.cy || l.rx != h.rx || l.ry != h.ry || l.r != h.r), g = x[r.type] && (h.cx != l.cx || h.cy != l.cy || h.r != l.r || h.rx != l.rx || h.ry != l.ry), v = r;
for (var S in l) l[e](S) && (h[S] = l[S]);
if (m && (h.path = n._getPath[r.type](r), r._.dirty = 1), l.href && (u.href = l.href),
l.title && (u.title = l.title), l.target && (u.target = l.target), l.cursor && (f.cursor = l.cursor),
"blur" in l && r.blur(l.blur), (l.path && "path" == r.type || m) && (u.path = w(~t(h.path).toLowerCase().indexOf("r") ? n._pathToAbsolute(h.path) : h.path),
r._.dirty = 1, "image" == r.type && (r._.fillpos = [ h.x, h.y ], r._.fillsize = [ h.width, h.height ],
C(r, 1, 1, 0, 0, 0))), "transform" in l && r.transform(l.transform), g) {
var k = +h.cx, T = +h.cy, I = +h.rx || +h.r || 0, N = +h.ry || +h.r || 0;
u.path = n.format("ar{0},{1},{2},{3},{4},{1},{4},{1}x", o((k - I) * b), o((T - N) * b), o((k + I) * b), o((T + N) * b), o(k * b)),
r._.dirty = 1;
}
if ("clip-rect" in l) {
var M = t(l["clip-rect"]).split(c);
if (4 == M.length) {
M[2] = +M[2] + +M[0], M[3] = +M[3] + +M[1];
var L = u.clipRect || n._g.doc.createElement("div"), A = L.style;
A.clip = n.format("rect({1}px {2}px {3}px {0}px)", M), u.clipRect || (A.position = "absolute",
A.top = 0, A.left = 0, A.width = r.paper.width + "px", A.height = r.paper.height + "px",
u.parentNode.insertBefore(L, u), L.appendChild(u), u.clipRect = L);
}
l["clip-rect"] || u.clipRect && (u.clipRect.style.clip = "auto");
}
if (r.textpath) {
var R = r.textpath.style;
l.font && (R.font = l.font), l["font-family"] && (R.fontFamily = '"' + l["font-family"].split(",")[0].replace(/^['"]+|['"]+$/g, p) + '"'),
l["font-size"] && (R.fontSize = l["font-size"]), l["font-weight"] && (R.fontWeight = l["font-weight"]),
l["font-style"] && (R.fontStyle = l["font-style"]);
}
if ("arrow-start" in l && _(v, l["arrow-start"]), "arrow-end" in l && _(v, l["arrow-end"], 1),
null != l.opacity || null != l["stroke-width"] || null != l.fill || null != l.src || null != l.stroke || null != l["stroke-width"] || null != l["stroke-opacity"] || null != l["fill-opacity"] || null != l["stroke-dasharray"] || null != l["stroke-miterlimit"] || null != l["stroke-linejoin"] || null != l["stroke-linecap"]) {
var P = u.getElementsByTagName("fill");
if (P = P && P[0], !P && (P = D("fill")), "image" == r.type && l.src && (P.src = l.src),
l.fill && (P.on = !0), null != P.on && "none" != l.fill && null !== l.fill || (P.on = !1),
P.on && l.fill) {
var O = t(l.fill).match(n._ISURL);
if (O) {
P.parentNode == u && u.removeChild(P), P.rotate = !0, P.src = O[1], P.type = "tile";
var F = r.getBBox(1);
P.position = F.x + d + F.y, r._.fillpos = [ F.x, F.y ], n._preload(O[1], function() {
r._.fillsize = [ this.offsetWidth, this.offsetHeight ];
});
} else P.color = n.getRGB(l.fill).hex, P.src = p, P.type = "solid", n.getRGB(l.fill).error && (v.type in {
circle: 1,
ellipse: 1
} || "r" != t(l.fill).charAt()) && E(v, l.fill, P) && (h.fill = "none", h.gradient = l.fill,
P.rotate = !1);
}
if ("fill-opacity" in l || "opacity" in l) {
var B = ((+h["fill-opacity"] + 1 || 2) - 1) * ((+h.opacity + 1 || 2) - 1) * ((+n.getRGB(l.fill).o + 1 || 2) - 1);
B = s(a(B, 0), 1), P.opacity = B, P.src && (P.color = "none");
}
u.appendChild(P);
var j = u.getElementsByTagName("stroke") && u.getElementsByTagName("stroke")[0], $ = !1;
!j && ($ = j = D("stroke")), (l.stroke && "none" != l.stroke || l["stroke-width"] || null != l["stroke-opacity"] || l["stroke-dasharray"] || l["stroke-miterlimit"] || l["stroke-linejoin"] || l["stroke-linecap"]) && (j.on = !0),
("none" == l.stroke || null === l.stroke || null == j.on || 0 == l.stroke || 0 == l["stroke-width"]) && (j.on = !1);
var G = n.getRGB(l.stroke);
j.on && l.stroke && (j.color = G.hex), B = ((+h["stroke-opacity"] + 1 || 2) - 1) * ((+h.opacity + 1 || 2) - 1) * ((+G.o + 1 || 2) - 1);
var q = .75 * (i(l["stroke-width"]) || 1);
if (B = s(a(B, 0), 1), null == l["stroke-width"] && (q = h["stroke-width"]), l["stroke-width"] && (j.weight = q),
q && 1 > q && (B *= q) && (j.weight = 1), j.opacity = B, l["stroke-linejoin"] && (j.joinstyle = l["stroke-linejoin"] || "miter"),
j.miterlimit = l["stroke-miterlimit"] || 8, l["stroke-linecap"] && (j.endcap = "butt" == l["stroke-linecap"] ? "flat" : "square" == l["stroke-linecap"] ? "square" : "round"),
"stroke-dasharray" in l) {
var H = {
"-": "shortdash",
".": "shortdot",
"-.": "shortdashdot",
"-..": "shortdashdotdot",
". ": "dot",
"- ": "dash",
"--": "longdash",
"- .": "dashdot",
"--.": "longdashdot",
"--..": "longdashdotdot"
};
j.dashstyle = H[e](l["stroke-dasharray"]) ? H[l["stroke-dasharray"]] : p;
}
$ && u.appendChild(j);
}
if ("text" == v.type) {
v.paper.canvas.style.display = p;
var U = v.paper.span, z = h.font && h.font.match(/\d+(?:\.\d*)?(?=px)/);
f = U.style, h.font && (f.font = h.font), h["font-family"] && (f.fontFamily = h["font-family"]),
h["font-weight"] && (f.fontWeight = h["font-weight"]), h["font-style"] && (f.fontStyle = h["font-style"]),
z = i(h["font-size"] || z && z[0]) || 10, f.fontSize = 100 * z + "px", v.textpath.string && (U.innerHTML = t(v.textpath.string).replace(/</g, "&#60;").replace(/&/g, "&#38;").replace(/\n/g, "<br>"));
var V = U.getBoundingClientRect();
v.W = h.w = (V.right - V.left) / 100, v.H = h.h = (V.bottom - V.top) / 100, v.X = h.x,
v.Y = h.y + v.H / 2, ("x" in l || "y" in l) && (v.path.v = n.format("m{0},{1}l{2},{1}", o(h.x * b), o(h.y * b), o(h.x * b) + 1));
for (var W = [ "x", "y", "text", "font", "font-family", "font-weight", "font-style", "font-size" ], X = 0, Q = W.length; Q > X; X++) if (W[X] in l) {
v._.dirty = 1;
break;
}
switch (h["text-anchor"]) {
case "start":
v.textpath.style["v-text-align"] = "left", v.bbx = v.W / 2;
break;
case "end":
v.textpath.style["v-text-align"] = "right", v.bbx = -v.W / 2;
break;
default:
v.textpath.style["v-text-align"] = "center", v.bbx = 0;
}
v.textpath.style["v-text-kern"] = !0;
}
}, E = function(e, o, a) {
e.attrs = e.attrs || {};
var s = (e.attrs, Math.pow), l = "linear", c = ".5 .5";
if (e.attrs.gradient = o, o = t(o).replace(n._radial_gradient, function(e, t, n) {
return l = "radial", t && n && (t = i(t), n = i(n), s(t - .5, 2) + s(n - .5, 2) > .25 && (n = r.sqrt(.25 - s(t - .5, 2)) * (2 * (n > .5) - 1) + .5),
c = t + d + n), p;
}), o = o.split(/\s*\-\s*/), "linear" == l) {
var u = o.shift();
if (u = -i(u), isNaN(u)) return null;
}
var h = n._parseDots(o);
if (!h) return null;
if (e = e.shape || e.node, h.length) {
e.removeChild(a), a.on = !0, a.method = "none", a.color = h[0].color, a.color2 = h[h.length - 1].color;
for (var f = [], m = 0, g = h.length; g > m; m++) h[m].offset && f.push(h[m].offset + d + h[m].color);
a.colors = f.length ? f.join() : "0% " + a.color, "radial" == l ? (a.type = "gradientTitle",
a.focus = "100%", a.focussize = "0 0", a.focusposition = c, a.angle = 0) : (a.type = "gradient",
a.angle = (270 - u) % 360), e.appendChild(a);
}
return 1;
}, T = function(e, t) {
this[0] = this.node = e, e.raphael = !0, this.id = n._oid++, e.raphaelid = this.id,
this.X = 0, this.Y = 0, this.attrs = {}, this.paper = t, this.matrix = n.matrix(),
this._ = {
transform: [],
sx: 1,
sy: 1,
dx: 0,
dy: 0,
deg: 0,
dirty: 1,
dirtyT: 1
}, !t.bottom && (t.bottom = this), this.prev = t.top, t.top && (t.top.next = this),
t.top = this, this.next = null;
}, I = n.el;
T.prototype = I, I.constructor = T, I.transform = function(e) {
if (null == e) return this._.transform;
var i, r = this.paper._viewBoxShift, o = r ? "s" + [ r.scale, r.scale ] + "-1-1t" + [ r.dx, r.dy ] : p;
r && (i = e = t(e).replace(/\.{3}|\u2026/g, this._.transform || p)), n._extractTransform(this, o + e);
var a, s = this.matrix.clone(), l = this.skew, c = this.node, u = ~t(this.attrs.fill).indexOf("-"), h = !t(this.attrs.fill).indexOf("url(");
if (s.translate(1, 1), h || u || "image" == this.type) if (l.matrix = "1 0 0 1",
l.offset = "0 0", a = s.split(), u && a.noRotation || !a.isSimple) {
c.style.filter = s.toFilter();
var f = this.getBBox(), m = this.getBBox(1), g = f.x - m.x, v = f.y - m.y;
c.coordorigin = g * -b + d + v * -b, C(this, 1, 1, g, v, 0);
} else c.style.filter = p, C(this, a.scalex, a.scaley, a.dx, a.dy, a.rotate); else c.style.filter = p,
l.matrix = t(s), l.offset = s.offset();
return null !== i && (this._.transform = i, n._extractTransform(this, i)), this;
}, I.rotate = function(e, n, r) {
if (this.removed) return this;
if (null != e) {
if (e = t(e).split(c), e.length - 1 && (n = i(e[1]), r = i(e[2])), e = i(e[0]),
null == r && (n = r), null == n || null == r) {
var o = this.getBBox(1);
n = o.x + o.width / 2, r = o.y + o.height / 2;
}
return this._.dirtyT = 1, this.transform(this._.transform.concat([ [ "r", e, n, r ] ])),
this;
}
}, I.translate = function(e, n) {
return this.removed ? this : (e = t(e).split(c), e.length - 1 && (n = i(e[1])),
e = i(e[0]) || 0, n = +n || 0, this._.bbox && (this._.bbox.x += e, this._.bbox.y += n),
this.transform(this._.transform.concat([ [ "t", e, n ] ])), this);
}, I.scale = function(e, n, r, o) {
if (this.removed) return this;
if (e = t(e).split(c), e.length - 1 && (n = i(e[1]), r = i(e[2]), o = i(e[3]), isNaN(r) && (r = null),
isNaN(o) && (o = null)), e = i(e[0]), null == n && (n = e), null == o && (r = o),
null == r || null == o) var a = this.getBBox(1);
return r = null == r ? a.x + a.width / 2 : r, o = null == o ? a.y + a.height / 2 : o,
this.transform(this._.transform.concat([ [ "s", e, n, r, o ] ])), this._.dirtyT = 1,
this;
}, I.hide = function() {
return !this.removed && (this.node.style.display = "none"), this;
}, I.show = function() {
return !this.removed && (this.node.style.display = p), this;
}, I.auxGetBBox = n.el.getBBox, I.getBBox = function() {
var e = this.auxGetBBox();
if (this.paper && this.paper._viewBoxShift) {
var t = {}, n = 1 / this.paper._viewBoxShift.scale;
return t.x = e.x - this.paper._viewBoxShift.dx, t.x *= n, t.y = e.y - this.paper._viewBoxShift.dy,
t.y *= n, t.width = e.width * n, t.height = e.height * n, t.x2 = t.x + t.width,
t.y2 = t.y + t.height, t;
}
return e;
}, I._getBBox = function() {
return this.removed ? {} : {
x: this.X + (this.bbx || 0) - this.W / 2,
y: this.Y - this.H,
width: this.W,
height: this.H
};
}, I.remove = function() {
if (!this.removed && this.node.parentNode) {
this.paper.__set__ && this.paper.__set__.exclude(this), n.eve.unbind("raphael.*.*." + this.id),
n._tear(this, this.paper), this.node.parentNode.removeChild(this.node), this.shape && this.shape.parentNode.removeChild(this.shape);
for (var e in this) this[e] = "function" == typeof this[e] ? n._removedFactory(e) : null;
this.removed = !0;
}
}, I.attr = function(t, i) {
if (this.removed) return this;
if (null == t) {
var r = {};
for (var o in this.attrs) this.attrs[e](o) && (r[o] = this.attrs[o]);
return r.gradient && "none" == r.fill && (r.fill = r.gradient) && delete r.gradient,
r.transform = this._.transform, r;
}
if (null == i && n.is(t, "string")) {
if ("fill" == t && "none" == this.attrs.fill && this.attrs.gradient) return this.attrs.gradient;
for (var a = t.split(c), s = {}, l = 0, d = a.length; d > l; l++) t = a[l], s[t] = t in this.attrs ? this.attrs[t] : n.is(this.paper.customAttributes[t], "function") ? this.paper.customAttributes[t].def : n._availableAttrs[t];
return d - 1 ? s : s[a[0]];
}
if (this.attrs && null == i && n.is(t, "array")) {
for (s = {}, l = 0, d = t.length; d > l; l++) s[t[l]] = this.attr(t[l]);
return s;
}
var p;
null != i && (p = {}, p[t] = i), null == i && n.is(t, "object") && (p = t);
for (var h in p) u("raphael.attr." + h + "." + this.id, this, p[h]);
if (p) {
for (h in this.paper.customAttributes) if (this.paper.customAttributes[e](h) && p[e](h) && n.is(this.paper.customAttributes[h], "function")) {
var f = this.paper.customAttributes[h].apply(this, [].concat(p[h]));
this.attrs[h] = p[h];
for (var m in f) f[e](m) && (p[m] = f[m]);
}
p.text && "text" == this.type && (this.textpath.string = p.text), k(this, p);
}
return this;
}, I.toFront = function() {
return !this.removed && this.node.parentNode.appendChild(this.node), this.paper && this.paper.top != this && n._tofront(this, this.paper),
this;
}, I.toBack = function() {
return this.removed ? this : (this.node.parentNode.firstChild != this.node && (this.node.parentNode.insertBefore(this.node, this.node.parentNode.firstChild),
n._toback(this, this.paper)), this);
}, I.insertAfter = function(e) {
return this.removed ? this : (e.constructor == n.st.constructor && (e = e[e.length - 1]),
e.node.nextSibling ? e.node.parentNode.insertBefore(this.node, e.node.nextSibling) : e.node.parentNode.appendChild(this.node),
n._insertafter(this, e, this.paper), this);
}, I.insertBefore = function(e) {
return this.removed ? this : (e.constructor == n.st.constructor && (e = e[0]), e.node.parentNode.insertBefore(this.node, e.node),
n._insertbefore(this, e, this.paper), this);
}, I.blur = function(e) {
var t = this.node.runtimeStyle, i = t.filter;
return i = i.replace(m, p), 0 != +e ? (this.attrs.blur = e, t.filter = i + d + " progid:DXImageTransform.Microsoft.Blur(pixelradius=" + (+e || 1.5) + ")",
t.margin = n.format("-{0}px 0 0 -{0}px", o(+e || 1.5))) : (t.filter = i, t.margin = 0,
delete this.attrs.blur), this;
}, n._engine.path = function(e, t) {
var n = D("shape");
n.style.cssText = v, n.coordsize = b + d + b, n.coordorigin = t.coordorigin;
var i = new T(n, t), r = {
fill: "none",
stroke: "#000"
};
e && (r.path = e), i.type = "path", i.path = [], i.Path = p, k(i, r), t.canvas.appendChild(n);
var o = D("skew");
return o.on = !0, n.appendChild(o), i.skew = o, i.transform(p), i;
}, n._engine.rect = function(e, t, i, r, o, a) {
var s = n._rectPath(t, i, r, o, a), l = e.path(s), c = l.attrs;
return l.X = c.x = t, l.Y = c.y = i, l.W = c.width = r, l.H = c.height = o, c.r = a,
c.path = s, l.type = "rect", l;
}, n._engine.ellipse = function(e, t, n, i, r) {
var o = e.path();
return o.attrs, o.X = t - i, o.Y = n - r, o.W = 2 * i, o.H = 2 * r, o.type = "ellipse",
k(o, {
cx: t,
cy: n,
rx: i,
ry: r
}), o;
}, n._engine.circle = function(e, t, n, i) {
var r = e.path();
return r.attrs, r.X = t - i, r.Y = n - i, r.W = r.H = 2 * i, r.type = "circle",
k(r, {
cx: t,
cy: n,
r: i
}), r;
}, n._engine.image = function(e, t, i, r, o, a) {
var s = n._rectPath(i, r, o, a), l = e.path(s).attr({
stroke: "none"
}), c = l.attrs, u = l.node, d = u.getElementsByTagName("fill")[0];
return c.src = t, l.X = c.x = i, l.Y = c.y = r, l.W = c.width = o, l.H = c.height = a,
c.path = s, l.type = "image", d.parentNode == u && u.removeChild(d), d.rotate = !0,
d.src = t, d.type = "tile", l._.fillpos = [ i, r ], l._.fillsize = [ o, a ], u.appendChild(d),
C(l, 1, 1, 0, 0, 0), l;
}, n._engine.text = function(e, i, r, a) {
var s = D("shape"), l = D("path"), c = D("textpath");
i = i || 0, r = r || 0, a = a || "", l.v = n.format("m{0},{1}l{2},{1}", o(i * b), o(r * b), o(i * b) + 1),
l.textpathok = !0, c.string = t(a), c.on = !0, s.style.cssText = v, s.coordsize = b + d + b,
s.coordorigin = "0 0";
var u = new T(s, e), h = {
fill: "#000",
stroke: "none",
font: n._availableAttrs.font,
text: a
};
u.shape = s, u.path = l, u.textpath = c, u.type = "text", u.attrs.text = t(a), u.attrs.x = i,
u.attrs.y = r, u.attrs.w = 1, u.attrs.h = 1, k(u, h), s.appendChild(c), s.appendChild(l),
e.canvas.appendChild(s);
var f = D("skew");
return f.on = !0, s.appendChild(f), u.skew = f, u.transform(p), u;
}, n._engine.setSize = function(e, t) {
var i = this.canvas.style;
return this.width = e, this.height = t, e == +e && (e += "px"), t == +t && (t += "px"),
i.width = e, i.height = t, i.clip = "rect(0 " + e + " " + t + " 0)", this._viewBox && n._engine.setViewBox.apply(this, this._viewBox),
this;
}, n._engine.setViewBox = function(e, t, i, r, o) {
n.eve("raphael.setViewBox", this, this._viewBox, [ e, t, i, r, o ]);
var a, s, l = this.getSize(), c = l.width, u = l.height;
return o && (a = u / r, s = c / i, c > i * a && (e -= (c - i * a) / 2 / a), u > r * s && (t -= (u - r * s) / 2 / s)),
this._viewBox = [ e, t, i, r, !!o ], this._viewBoxShift = {
dx: -e,
dy: -t,
scale: l
}, this.forEach(function(e) {
e.transform("...");
}), this;
};
var D;
n._engine.initWin = function(e) {
var t = e.document;
t.styleSheets.length < 31 ? t.createStyleSheet().addRule(".rvml", "behavior:url(#default#VML)") : t.styleSheets[0].addRule(".rvml", "behavior:url(#default#VML)");
try {
!t.namespaces.rvml && t.namespaces.add("rvml", "urn:schemas-microsoft-com:vml"),
D = function(e) {
return t.createElement("<rvml:" + e + ' class="rvml">');
};
} catch (e) {
D = function(e) {
return t.createElement("<" + e + ' xmlns="urn:schemas-microsoft.com:vml" class="rvml">');
};
}
}, n._engine.initWin(n._g.win), n._engine.create = function() {
var e = n._getContainer.apply(0, arguments), t = e.container, i = e.height, r = e.width, o = e.x, a = e.y;
if (!t) throw new Error("VML container not found.");
var s = new n._Paper(), l = s.canvas = n._g.doc.createElement("div"), c = l.style;
return o = o || 0, a = a || 0, r = r || 512, i = i || 342, s.width = r, s.height = i,
r == +r && (r += "px"), i == +i && (i += "px"), s.coordsize = 216e5 + d + 216e5,
s.coordorigin = "0 0", s.span = n._g.doc.createElement("span"), s.span.style.cssText = "position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;",
l.appendChild(s.span), c.cssText = n.format("top:0;left:0;width:{0};height:{1};display:inline-block;position:relative;clip:rect(0 {0} {1} 0);overflow:hidden", r, i),
1 == t ? (n._g.doc.body.appendChild(l), c.left = o + "px", c.top = a + "px", c.position = "absolute") : t.firstChild ? t.insertBefore(l, t.firstChild) : t.appendChild(l),
s.renderfix = function() {}, s;
}, n.prototype.clear = function() {
n.eve("raphael.clear", this), this.canvas.innerHTML = p, this.span = n._g.doc.createElement("span"),
this.span.style.cssText = "position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;",
this.canvas.appendChild(this.span), this.bottom = this.top = null;
}, n.prototype.remove = function() {
n.eve("raphael.remove", this), this.canvas.parentNode.removeChild(this.canvas);
for (var e in this) this[e] = "function" == typeof this[e] ? n._removedFactory(e) : null;
return !0;
};
var N = n.st;
for (var M in I) I[e](M) && !N[e](M) && (N[M] = function(e) {
return function() {
var t = arguments;
return this.forEach(function(n) {
n[e].apply(n, t);
});
};
}(M));
}
}(), T.was ? E.win.Raphael = n : Raphael = n, "object" == typeof exports && (module.exports = n),
n;
}), function() {
"use strict";
function e() {
this.title = void 0, this.actors = [], this.signals = [];
}
function t(e, t) {
_.extend(this, t), this.name = "ParseError", this.message = e || "";
}
e.prototype.getActor = function(t) {
var n = /^(.+) as (\S+)$/i.exec(t.trim());
n ? (name = n[1].trim(), t = n[2].trim()) : name = t.trim(), name = name.replace(/\\n/gm, "\n");
var i, r = this.actors;
for (i in r) if (r[i].alias == t) return r[i];
return i = r.push(new e.Actor(t, name, r.length)), r[i - 1];
}, e.prototype.setTitle = function(e) {
this.title = e;
}, e.prototype.addSignal = function(e) {
this.signals.push(e);
}, e.Actor = function(e, t, n) {
this.alias = e, this.name = t, this.index = n;
}, e.Signal = function(e, t, n, i) {
this.type = "Signal", this.actorA = e, this.actorB = n, this.linetype = 3 & t, this.arrowtype = t >> 2 & 3,
this.message = i;
}, e.Signal.prototype.isSelf = function() {
return this.actorA.index == this.actorB.index;
}, e.Note = function(e, t, n) {
if (this.type = "Note", this.actor = e, this.placement = t, this.message = n, this.hasManyActors() && e[0] == e[1]) throw new Error("Note should be over two different actors");
}, e.Note.prototype.hasManyActors = function() {
return _.isArray(this.actor);
}, e.LINETYPE = {
SOLID: 0,
DOTTED: 1
}, e.ARROWTYPE = {
FILLED: 0,
OPEN: 1
}, e.PLACEMENT = {
LEFTOF: 0,
RIGHTOF: 1,
OVER: 2
};
var n = function() {
function t() {
this.yy = {};
}
var n = {
trace: function() {},
yy: {},
symbols_: {
error: 2,
start: 3,
document: 4,
EOF: 5,
line: 6,
statement: 7,
NL: 8,
participant: 9,
actor: 10,
signal: 11,
note_statement: 12,
title: 13,
message: 14,
note: 15,
placement: 16,
over: 17,
actor_pair: 18,
",": 19,
left_of: 20,
right_of: 21,
signaltype: 22,
ACTOR: 23,
linetype: 24,
arrowtype: 25,
LINE: 26,
DOTLINE: 27,
ARROW: 28,
OPENARROW: 29,
MESSAGE: 30,
$accept: 0,
$end: 1
},
terminals_: {
2: "error",
5: "EOF",
8: "NL",
9: "participant",
13: "title",
15: "note",
17: "over",
19: ",",
20: "left_of",
21: "right_of",
23: "ACTOR",
26: "LINE",
27: "DOTLINE",
28: "ARROW",
29: "OPENARROW",
30: "MESSAGE"
},
productions_: [ 0, [ 3, 2 ], [ 4, 0 ], [ 4, 2 ], [ 6, 1 ], [ 6, 1 ], [ 7, 2 ], [ 7, 1 ], [ 7, 1 ], [ 7, 2 ], [ 12, 4 ], [ 12, 4 ], [ 18, 1 ], [ 18, 3 ], [ 16, 1 ], [ 16, 1 ], [ 11, 4 ], [ 10, 1 ], [ 22, 2 ], [ 22, 1 ], [ 24, 1 ], [ 24, 1 ], [ 25, 1 ], [ 25, 1 ], [ 14, 1 ] ],
performAction: function(t, n, i, r, o, a) {
var s = a.length - 1;
switch (o) {
case 1:
return r;
case 4:
break;
case 6:
a[s];
break;
case 7:
case 8:
r.addSignal(a[s]);
break;
case 9:
r.setTitle(a[s]);
break;
case 10:
this.$ = new e.Note(a[s - 1], a[s - 2], a[s]);
break;
case 11:
this.$ = new e.Note(a[s - 1], e.PLACEMENT.OVER, a[s]);
break;
case 12:
this.$ = a[s];
break;
case 13:
this.$ = [ a[s - 2], a[s] ];
break;
case 14:
this.$ = e.PLACEMENT.LEFTOF;
break;
case 15:
this.$ = e.PLACEMENT.RIGHTOF;
break;
case 16:
this.$ = new e.Signal(a[s - 3], a[s - 2], a[s - 1], a[s]);
break;
case 17:
this.$ = r.getActor(a[s]);
break;
case 18:
this.$ = a[s - 1] | a[s] << 2;
break;
case 19:
this.$ = a[s];
break;
case 20:
this.$ = e.LINETYPE.SOLID;
break;
case 21:
this.$ = e.LINETYPE.DOTTED;
break;
case 22:
this.$ = e.ARROWTYPE.FILLED;
break;
case 23:
this.$ = e.ARROWTYPE.OPEN;
break;
case 24:
this.$ = a[s].substring(1).trim().replace(/\\n/gm, "\n");
}
},
table: [ {
3: 1,
4: 2,
5: [ 2, 2 ],
8: [ 2, 2 ],
9: [ 2, 2 ],
13: [ 2, 2 ],
15: [ 2, 2 ],
23: [ 2, 2 ]
}, {
1: [ 3 ]
}, {
5: [ 1, 3 ],
6: 4,
7: 5,
8: [ 1, 6 ],
9: [ 1, 7 ],
10: 11,
11: 8,
12: 9,
13: [ 1, 10 ],
15: [ 1, 12 ],
23: [ 1, 13 ]
}, {
1: [ 2, 1 ]
}, {
5: [ 2, 3 ],
8: [ 2, 3 ],
9: [ 2, 3 ],
13: [ 2, 3 ],
15: [ 2, 3 ],
23: [ 2, 3 ]
}, {
5: [ 2, 4 ],
8: [ 2, 4 ],
9: [ 2, 4 ],
13: [ 2, 4 ],
15: [ 2, 4 ],
23: [ 2, 4 ]
}, {
5: [ 2, 5 ],
8: [ 2, 5 ],
9: [ 2, 5 ],
13: [ 2, 5 ],
15: [ 2, 5 ],
23: [ 2, 5 ]
}, {
10: 14,
23: [ 1, 13 ]
}, {
5: [ 2, 7 ],
8: [ 2, 7 ],
9: [ 2, 7 ],
13: [ 2, 7 ],
15: [ 2, 7 ],
23: [ 2, 7 ]
}, {
5: [ 2, 8 ],
8: [ 2, 8 ],
9: [ 2, 8 ],
13: [ 2, 8 ],
15: [ 2, 8 ],
23: [ 2, 8 ]
}, {
14: 15,
30: [ 1, 16 ]
}, {
22: 17,
24: 18,
26: [ 1, 19 ],
27: [ 1, 20 ]
}, {
16: 21,
17: [ 1, 22 ],
20: [ 1, 23 ],
21: [ 1, 24 ]
}, {
5: [ 2, 17 ],
8: [ 2, 17 ],
9: [ 2, 17 ],
13: [ 2, 17 ],
15: [ 2, 17 ],
19: [ 2, 17 ],
23: [ 2, 17 ],
26: [ 2, 17 ],
27: [ 2, 17 ],
30: [ 2, 17 ]
}, {
5: [ 2, 6 ],
8: [ 2, 6 ],
9: [ 2, 6 ],
13: [ 2, 6 ],
15: [ 2, 6 ],
23: [ 2, 6 ]
}, {
5: [ 2, 9 ],
8: [ 2, 9 ],
9: [ 2, 9 ],
13: [ 2, 9 ],
15: [ 2, 9 ],
23: [ 2, 9 ]
}, {
5: [ 2, 24 ],
8: [ 2, 24 ],
9: [ 2, 24 ],
13: [ 2, 24 ],
15: [ 2, 24 ],
23: [ 2, 24 ]
}, {
10: 25,
23: [ 1, 13 ]
}, {
23: [ 2, 19 ],
25: 26,
28: [ 1, 27 ],
29: [ 1, 28 ]
}, {
23: [ 2, 20 ],
28: [ 2, 20 ],
29: [ 2, 20 ]
}, {
23: [ 2, 21 ],
28: [ 2, 21 ],
29: [ 2, 21 ]
}, {
10: 29,
23: [ 1, 13 ]
}, {
10: 31,
18: 30,
23: [ 1, 13 ]
}, {
23: [ 2, 14 ]
}, {
23: [ 2, 15 ]
}, {
14: 32,
30: [ 1, 16 ]
}, {
23: [ 2, 18 ]
}, {
23: [ 2, 22 ]
}, {
23: [ 2, 23 ]
}, {
14: 33,
30: [ 1, 16 ]
}, {
14: 34,
30: [ 1, 16 ]
}, {
19: [ 1, 35 ],
30: [ 2, 12 ]
}, {
5: [ 2, 16 ],
8: [ 2, 16 ],
9: [ 2, 16 ],
13: [ 2, 16 ],
15: [ 2, 16 ],
23: [ 2, 16 ]
}, {
5: [ 2, 10 ],
8: [ 2, 10 ],
9: [ 2, 10 ],
13: [ 2, 10 ],
15: [ 2, 10 ],
23: [ 2, 10 ]
}, {
5: [ 2, 11 ],
8: [ 2, 11 ],
9: [ 2, 11 ],
13: [ 2, 11 ],
15: [ 2, 11 ],
23: [ 2, 11 ]
}, {
10: 36,
23: [ 1, 13 ]
}, {
30: [ 2, 13 ]
} ],
defaultActions: {
3: [ 2, 1 ],
23: [ 2, 14 ],
24: [ 2, 15 ],
26: [ 2, 18 ],
27: [ 2, 22 ],
28: [ 2, 23 ],
36: [ 2, 13 ]
},
parseError: function(e, t) {
if (!t.recoverable) throw new Error(e);
this.trace(e);
},
parse: function(e) {
var t = this, n = [ 0 ], i = [ null ], r = [], o = this.table, a = "", s = 0, l = 0, c = 0, u = 1;
this.lexer.setInput(e), this.lexer.yy = this.yy, this.yy.lexer = this.lexer, this.yy.parser = this,
void 0 === this.lexer.yylloc && (this.lexer.yylloc = {});
var d = this.lexer.yylloc;
r.push(d);
var p = this.lexer.options && this.lexer.options.ranges;
this.parseError = "function" == typeof this.yy.parseError ? this.yy.parseError : Object.getPrototypeOf(this).parseError;
for (var h, f, m, g, v, b, y, x, w, S = {}; ;) {
if (m = n[n.length - 1], this.defaultActions[m] ? g = this.defaultActions[m] : (null !== h && void 0 !== h || (h = function() {
var e;
return e = t.lexer.lex() || u, "number" != typeof e && (e = t.symbols_[e] || e),
e;
}()), g = o[m] && o[m][h]), void 0 === g || !g.length || !g[0]) {
var C = "";
w = [];
for (b in o[m]) this.terminals_[b] && b > 2 && w.push("'" + this.terminals_[b] + "'");
C = this.lexer.showPosition ? "Parse error on line " + (s + 1) + ":\n" + this.lexer.showPosition() + "\nExpecting " + w.join(", ") + ", got '" + (this.terminals_[h] || h) + "'" : "Parse error on line " + (s + 1) + ": Unexpected " + (h == u ? "end of input" : "'" + (this.terminals_[h] || h) + "'"),
this.parseError(C, {
text: this.lexer.match,
token: this.terminals_[h] || h,
line: this.lexer.yylineno,
loc: d,
expected: w
});
}
if (g[0] instanceof Array && g.length > 1) throw new Error("Parse Error: multiple actions possible at state: " + m + ", token: " + h);
switch (g[0]) {
case 1:
n.push(h), i.push(this.lexer.yytext), r.push(this.lexer.yylloc), n.push(g[1]), h = null,
f ? (h = f, f = null) : (l = this.lexer.yyleng, a = this.lexer.yytext, s = this.lexer.yylineno,
d = this.lexer.yylloc, c > 0 && c--);
break;
case 2:
if (y = this.productions_[g[1]][1], S.$ = i[i.length - y], S._$ = {
first_line: r[r.length - (y || 1)].first_line,
last_line: r[r.length - 1].last_line,
first_column: r[r.length - (y || 1)].first_column,
last_column: r[r.length - 1].last_column
}, p && (S._$.range = [ r[r.length - (y || 1)].range[0], r[r.length - 1].range[1] ]),
void 0 !== (v = this.performAction.call(S, a, l, s, this.yy, g[1], i, r))) return v;
y && (n = n.slice(0, -1 * y * 2), i = i.slice(0, -1 * y), r = r.slice(0, -1 * y)),
n.push(this.productions_[g[1]][0]), i.push(S.$), r.push(S._$), x = o[n[n.length - 2]][n[n.length - 1]],
n.push(x);
break;
case 3:
return !0;
}
}
return !0;
}
}, i = function() {
return {
EOF: 1,
parseError: function(e, t) {
if (!this.yy.parser) throw new Error(e);
this.yy.parser.parseError(e, t);
},
setInput: function(e) {
return this._input = e, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0,
this.yytext = this.matched = this.match = "", this.conditionStack = [ "INITIAL" ],
this.yylloc = {
first_line: 1,
first_column: 0,
last_line: 1,
last_column: 0
}, this.options.ranges && (this.yylloc.range = [ 0, 0 ]), this.offset = 0, this;
},
input: function() {
var e = this._input[0];
return this.yytext += e, this.yyleng++, this.offset++, this.match += e, this.matched += e,
e.match(/(?:\r\n?|\n).*/g) ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++,
this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1),
e;
},
unput: function(e) {
var t = e.length, n = e.split(/(?:\r\n?|\n)/g);
this._input = e + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - t - 1),
this.offset -= t;
var i = this.match.split(/(?:\r\n?|\n)/g);
this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1),
n.length - 1 && (this.yylineno -= n.length - 1);
var r = this.yylloc.range;
return this.yylloc = {
first_line: this.yylloc.first_line,
last_line: this.yylineno + 1,
first_column: this.yylloc.first_column,
last_column: n ? (n.length === i.length ? this.yylloc.first_column : 0) + i[i.length - n.length].length - n[0].length : this.yylloc.first_column - t
}, this.options.ranges && (this.yylloc.range = [ r[0], r[0] + this.yyleng - t ]),
this.yyleng = this.yytext.length, this;
},
more: function() {
return this._more = !0, this;
},
reject: function() {
return this.options.backtrack_lexer ? (this._backtrack = !0, this) : this.parseError("Lexical error on line " + (this.yylineno + 1) + ". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n" + this.showPosition(), {
text: "",
token: null,
line: this.yylineno
});
},
less: function(e) {
this.unput(this.match.slice(e));
},
pastInput: function() {
var e = this.matched.substr(0, this.matched.length - this.match.length);
return (e.length > 20 ? "..." : "") + e.substr(-20).replace(/\n/g, "");
},
upcomingInput: function() {
var e = this.match;
return e.length < 20 && (e += this._input.substr(0, 20 - e.length)), (e.substr(0, 20) + (e.length > 20 ? "..." : "")).replace(/\n/g, "");
},
showPosition: function() {
var e = this.pastInput(), t = new Array(e.length + 1).join("-");
return e + this.upcomingInput() + "\n" + t + "^";
},
test_match: function(e, t) {
var n, i, r;
if (this.options.backtrack_lexer && (r = {
yylineno: this.yylineno,
yylloc: {
first_line: this.yylloc.first_line,
last_line: this.last_line,
first_column: this.yylloc.first_column,
last_column: this.yylloc.last_column
},
yytext: this.yytext,
match: this.match,
matches: this.matches,
matched: this.matched,
yyleng: this.yyleng,
offset: this.offset,
_more: this._more,
_input: this._input,
yy: this.yy,
conditionStack: this.conditionStack.slice(0),
done: this.done
}, this.options.ranges && (r.yylloc.range = this.yylloc.range.slice(0))), i = e[0].match(/(?:\r\n?|\n).*/g),
i && (this.yylineno += i.length), this.yylloc = {
first_line: this.yylloc.last_line,
last_line: this.yylineno + 1,
first_column: this.yylloc.last_column,
last_column: i ? i[i.length - 1].length - i[i.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + e[0].length
}, this.yytext += e[0], this.match += e[0], this.matches = e, this.yyleng = this.yytext.length,
this.options.ranges && (this.yylloc.range = [ this.offset, this.offset += this.yyleng ]),
this._more = !1, this._backtrack = !1, this._input = this._input.slice(e[0].length),
this.matched += e[0], n = this.performAction.call(this, this.yy, this, t, this.conditionStack[this.conditionStack.length - 1]),
this.done && this._input && (this.done = !1), n) return n;
if (this._backtrack) {
for (var o in r) this[o] = r[o];
return !1;
}
return !1;
},
next: function() {
if (this.done) return this.EOF;
this._input || (this.done = !0);
var e, t, n, i;
this._more || (this.yytext = "", this.match = "");
for (var r = this._currentRules(), o = 0; o < r.length; o++) if ((n = this._input.match(this.rules[r[o]])) && (!t || n[0].length > t[0].length)) {
if (t = n, i = o, this.options.backtrack_lexer) {
if (!1 !== (e = this.test_match(n, r[o]))) return e;
if (this._backtrack) {
t = !1;
continue;
}
return !1;
}
if (!this.options.flex) break;
}
return t ? !1 !== (e = this.test_match(t, r[i])) && e : "" === this._input ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), {
text: "",
token: null,
line: this.yylineno
});
},
lex: function() {
var e = this.next();
return e || this.lex();
},
begin: function(e) {
this.conditionStack.push(e);
},
popState: function() {
return this.conditionStack.length - 1 > 0 ? this.conditionStack.pop() : this.conditionStack[0];
},
_currentRules: function() {
return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
},
topState: function(e) {
return e = this.conditionStack.length - 1 - Math.abs(e || 0), e >= 0 ? this.conditionStack[e] : "INITIAL";
},
pushState: function(e) {
this.begin(e);
},
stateStackSize: function() {
return this.conditionStack.length;
},
options: {
"case-insensitive": !0
},
performAction: function(e, t, n) {
switch (n) {
case 0:
return 8;
case 1:
case 2:
break;
case 3:
return 9;
case 4:
return 20;
case 5:
return 21;
case 6:
return 17;
case 7:
return 15;
case 8:
return 13;
case 9:
return 19;
case 10:
return 23;
case 11:
return 27;
case 12:
return 26;
case 13:
return 29;
case 14:
return 28;
case 15:
return 30;
case 16:
return 5;
case 17:
return "INVALID";
}
},
rules: [ /^(?:[\n]+)/i, /^(?:\s+)/i, /^(?:#[^\n]*)/i, /^(?:participant\b)/i, /^(?:left of\b)/i, /^(?:right of\b)/i, /^(?:over\b)/i, /^(?:note\b)/i, /^(?:title\b)/i, /^(?:,)/i, /^(?:[^\->:\n,]+)/i, /^(?:--)/i, /^(?:-)/i, /^(?:>>)/i, /^(?:>)/i, /^(?:[^#\n]+)/i, /^(?:$)/i, /^(?:.)/i ],
conditions: {
INITIAL: {
rules: [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17 ],
inclusive: !0
}
}
};
}();
return n.lexer = i, t.prototype = n, n.Parser = t, new t();
}();
"undefined" != typeof require && "undefined" != typeof exports && (exports.parser = n,
exports.Parser = n.Parser, exports.parse = function() {
return n.parse.apply(n, arguments);
}, exports.main = function(e) {
e[1] || (console.log("Usage: " + e[0] + " FILE"), process.exit(1));
var t = require("fs").readFileSync(require("path").normalize(e[1]), "utf8");
return exports.parser.parse(t);
}, "undefined" != typeof module && require.main === module && exports.main(process.argv.slice(1))),
t.prototype = new Error(), e.ParseError = t, n.parseError = function(e, n) {
throw new t(e, n);
}, e.parse = function(t) {
return n.yy = new e(), n.parse(t);
}, this.Diagram = e;
}.call(this), define("diagram-grammar", [ "underscore" ], function() {}), function(e) {
"function" == typeof define && define.amd ? define("Diagram", [ "raphael" ], function(t) {
return e(t), Diagram;
}) : e(Raphael);
}(function(e) {
"use strict";
function t(e) {
this.message = e;
}
function n(e, n) {
if (!e) throw new t(n);
}
function i(e) {
return e.x + e.width / 2;
}
function r(e) {
return e.y + e.height / 2;
}
var o = Diagram.PLACEMENT, a = Diagram.LINETYPE, s = Diagram.ARROWTYPE, l = {
stroke: "#000",
"stroke-width": 2
}, c = {
fill: "#fff"
};
t.prototype.toString = function() {
return "AssertException: " + this.message;
}, String.prototype.trim || (String.prototype.trim = function() {
return this.replace(/^\s+|\s+$/g, "");
}), e.fn.line = function(e, t, i, r) {
return n(_.all([ e, i, t, r ], _.isFinite), "x1,x2,y1,y2 must be numeric"), this.path("M{0},{1} L{2},{3}", e, t, i, r);
}, e.fn.wobble = function(e, t, i, r) {
n(_.all([ e, i, t, r ], _.isFinite), "x1,x2,y1,y2 must be numeric");
var o = Math.sqrt((i - e) * (i - e) + (r - t) * (r - t)) / 25, a = Math.random(), s = Math.random(), l = Math.random() > .5 ? o : -o, c = Math.random() > .5 ? o : -o, u = {
x: (i - e) * a + e + l,
y: (r - t) * a + t + c
}, d = {
x: (i - e) * s + e - l,
y: (r - t) * s + t - c
};
return "C" + u.x + "," + u.y + " " + d.x + "," + d.y + " " + i + "," + r;
}, e.fn.text_bbox = function(e, t) {
var n;
t._obj ? n = this.print_center(0, 0, e, t._obj, t["font-size"]) : (n = this.text(0, 0, e),
n.attr(t));
var i = n.getBBox();
return n.remove(), i;
}, e.fn.handRect = function(e, t, i, r) {
return n(_.all([ e, t, i, r ], _.isFinite), "x, y, w, h must be numeric"), this.path("M" + e + "," + t + this.wobble(e, t, e + i, t) + this.wobble(e + i, t, e + i, t + r) + this.wobble(e + i, t + r, e, t + r) + this.wobble(e, t + r, e, t)).attr(c);
}, e.fn.handLine = function(e, t, i, r) {
return n(_.all([ e, i, t, r ], _.isFinite), "x1,x2,y1,y2 must be numeric"), this.path("M" + e + "," + t + this.wobble(e, t, i, r));
}, e.fn.print_center = function(t, n, i, r, o, a) {
var s = this.print(t, n, i, r, o, "baseline", a), l = s.getBBox(), c = t - l.x - l.width / 2, u = n - l.y - l.height / 2, d = new e.matrix();
return d.translate(c, u), s.attr("path", e.mapPath(s.attr("path"), d));
};
var u = function(e) {
this.init(e);
};
_.extend(u.prototype, {
init: function(e) {
this.diagram = e, this._paper = void 0, this._font = void 0, this._title = void 0,
this._actors_height = 0, this._signals_height = 0;
var t = this.arrow_types = {};
t[s.FILLED] = "block", t[s.OPEN] = "open";
var n = this.line_types = {};
n[a.SOLID] = "", n[a.DOTTED] = "-";
},
init_paper: function(t) {
this._paper = new e(t, 320, 200);
},
init_font: function() {},
draw_line: function(e, t, n, i) {
return this._paper.line(e, t, n, i);
},
draw_rect: function(e, t, n, i) {
return this._paper.rect(e, t, n, i);
},
draw: function(e) {
var t = this.diagram;
this.init_paper(e), this.init_font(), this.layout();
var n = this._title ? this._title.height : 0;
this._paper.setStart(), this._paper.setSize(t.width, t.height);
var i = 10 + n;
this.draw_title(), this.draw_actors(i), this.draw_signals(i + this._actors_height),
this._paper.setFinish();
},
layout: function() {
function e(e, t, i) {
n(t > e, "a must be less than or equal to b"), 0 > e ? (t = a[t], t.x = Math.max(i - t.width / 2, t.x)) : t >= a.length ? (e = a[e],
e.padding_right = Math.max(i, e.padding_right)) : (e = a[e], e.distances[t] = Math.max(i, e.distances[t] ? e.distances[t] : 0));
}
var t = this.diagram, i = this._paper, r = this._font, a = t.actors, s = t.signals;
if (t.width = 0, t.height = 0, t.title) {
var l = this._title = {}, c = i.text_bbox(t.title, r);
l.text_bb = c, l.message = t.title, l.width = c.width + 10, l.height = c.height + 10,
l.x = 10, l.y = 10, t.width += l.width, t.height += l.height;
}
_.each(a, function(e) {
var t = i.text_bbox(e.name, r);
e.text_bb = t, e.x = 0, e.y = 0, e.width = t.width + 40, e.height = t.height + 40,
e.distances = [], e.padding_right = 0, this._actors_height = Math.max(e.height, this._actors_height);
}, this), _.each(s, function(t) {
var n, a, s = i.text_bbox(t.message, r);
t.text_bb = s, t.width = s.width, t.height = s.height;
var l = 0;
if ("Signal" == t.type) t.width += 20, t.height += 20, t.isSelf() ? (n = t.actorA.index,
a = n + 1, t.width += 20) : (n = Math.min(t.actorA.index, t.actorB.index), a = Math.max(t.actorA.index, t.actorB.index)); else {
if ("Note" != t.type) throw new Error("Unhandled signal type:" + t.type);
if (t.width += 30, t.height += 30, l = 20, t.placement == o.LEFTOF) a = t.actor.index,
n = a - 1; else if (t.placement == o.RIGHTOF) n = t.actor.index, a = n + 1; else if (t.placement == o.OVER && t.hasManyActors()) n = Math.min(t.actor[0].index, t.actor[1].index),
a = Math.max(t.actor[0].index, t.actor[1].index), l = -40; else if (t.placement == o.OVER) return n = t.actor.index,
e(n - 1, n, t.width / 2), e(n, n + 1, t.width / 2), void (this._signals_height += t.height);
}
e(n, a, t.width + l), this._signals_height += t.height;
}, this);
var u = 0;
return _.each(a, function(e) {
e.x = Math.max(u, e.x), _.each(e.distances, function(t, n) {
void 0 !== t && (n = a[n], t = Math.max(t, e.width / 2, n.width / 2), n.x = Math.max(n.x, e.x + e.width / 2 + t - n.width / 2));
}), u = e.x + e.width + e.padding_right;
}, this), t.width = Math.max(u, t.width), t.width += 20, t.height += 20 + 2 * this._actors_height + this._signals_height,
this;
},
draw_title: function() {
var e = this._title;
e && this.draw_text_box(e, e.message, 0, 5, this._font);
},
draw_actors: function(e) {
var t = e;
_.each(this.diagram.actors, function(e) {
this.draw_actor(e, t, this._actors_height), this.draw_actor(e, t + this._actors_height + this._signals_height, this._actors_height);
var n = i(e);
this.draw_line(n, t + this._actors_height - 10, n, t + this._actors_height + 10 + this._signals_height).attr(l);
}, this);
},
draw_actor: function(e, t, n) {
e.y = t, e.height = n, this.draw_text_box(e, e.name, 10, 10, this._font);
},
draw_signals: function(e) {
var t = e;
_.each(this.diagram.signals, function(e) {
"Signal" == e.type ? e.isSelf() ? this.draw_self_signal(e, t) : this.draw_signal(e, t) : "Note" == e.type && this.draw_note(e, t),
t += e.height;
}, this);
},
draw_self_signal: function(e, t) {
n(e.isSelf(), "signal must be a self signal");
var r = e.text_bb, o = i(e.actorA), a = o + 20 + 5 - r.x, s = t + e.height / 2;
this.draw_text(a, s, e.message, this._font);
var c, u = _.extend({}, l, {
"stroke-dasharray": this.line_types[e.linetype]
}), d = t + 5, p = d + e.height - 5;
c = this.draw_line(o, d, o + 20, d), c.attr(u), c = this.draw_line(o + 20, d, o + 20, p),
c.attr(u), c = this.draw_line(o + 20, p, o, p), u["arrow-end"] = this.arrow_types[e.arrowtype] + "-wide-long",
c.attr(u);
},
draw_signal: function(e, t) {
var n = i(e.actorA), r = i(e.actorB), o = (r - n) / 2 + n, a = t + 5 + 10;
this.draw_text(o, a, e.message, this._font), a = t + e.height - 5 - 5;
var s = this.draw_line(n, a, r, a);
s.attr(l), s.attr({
"arrow-end": this.arrow_types[e.arrowtype] + "-wide-long",
"stroke-dasharray": this.line_types[e.linetype]
});
},
draw_note: function(e, t) {
e.y = t;
var n = e.hasManyActors() ? e.actor[0] : e.actor, r = i(n);
switch (e.placement) {
case o.RIGHTOF:
e.x = r + 10;
break;
case o.LEFTOF:
e.x = r - 10 - e.width;
break;
case o.OVER:
if (e.hasManyActors()) {
var a = i(e.actor[1]);
e.x = r - 20, e.width = a + 20 - e.x;
} else e.x = r - e.width / 2;
break;
default:
throw new Error("Unhandled note placement:" + e.placement);
}
this.draw_text_box(e, e.message, 10, 5, this._font);
},
draw_text: function(e, t, n, i) {
var r, o = this._paper, a = i || {};
a._obj ? r = o.print_center(e, t, n, a._obj, a["font-size"]) : (r = o.text(e, t, n),
r.attr(a));
var s = r.getBBox();
o.rect(s.x, s.y, s.width, s.height).attr({
fill: "#fff",
stroke: "none"
}), r.toFront();
},
draw_text_box: function(e, t, n, o, a) {
var s = e.x + n, c = e.y + n, u = e.width - 2 * n, d = e.height - 2 * n;
this.draw_rect(s, c, u, d).attr(l), s = i(e), c = r(e), this.draw_text(s, c, t, a);
}
});
var d = function(e) {
this.init(e);
};
_.extend(d.prototype, u.prototype, {
init_font: function() {
this._font = {
"font-size": 16,
"font-family": "Andale Mono, monospace"
};
}
});
var p = function(e) {
this.init(e);
};
_.extend(p.prototype, u.prototype, {
init_font: function() {
this._font = {
"font-size": 16,
"font-family": "daniel"
}, this._font._obj = this._paper.getFont("daniel");
},
draw_line: function(e, t, n, i) {
return this._paper.handLine(e, t, n, i);
},
draw_rect: function(e, t, n, i) {
return this._paper.handRect(e, t, n, i);
}
});
var h = {
simple: d,
hand: p
};
Diagram.prototype.drawSVG = function(e, t) {
var n = {
theme: "hand"
};
if (t = _.defaults(t || {}, n), !(t.theme in h)) throw new Error("Unsupported theme: " + t.theme);
new h[t.theme](this).draw(e);
};
}), function(e, t) {
"object" == typeof exports ? module.exports = t() : "function" == typeof define && define.amd && define("flow-chart", [], t);
}(0, function() {
function e(t, n) {
if (!t || "function" == typeof t) return n;
var i = {};
for (var r in n) i[r] = n[r];
for (r in t) t[r] && (i[r] = "object" == typeof i[r] ? e(i[r], t[r]) : t[r]);
return i;
}
function t(e, t) {
if ("function" == typeof Object.create) e.super_ = t, e.prototype = Object.create(t.prototype, {
constructor: {
value: e,
enumerable: !1,
writable: !0,
configurable: !0
}
}); else {
e.super_ = t;
var n = function() {};
n.prototype = t.prototype, e.prototype = new n(), e.prototype.constructor = e;
}
}
function n(e, t, n) {
var i, r, o = "M{0},{1}";
for (i = 2, r = 2 * n.length + 2; r > i; i += 2) o += " L{" + i + "},{" + (i + 1) + "}";
var a = [ t.x, t.y ];
for (i = 0, r = n.length; r > i; i++) a.push(n[i].x), a.push(n[i].y);
var s = e.paper.path(o, a);
s.attr("stroke", e.options["element-color"]), s.attr("stroke-width", e.options["line-width"]);
var l = e.options.font, c = e.options["font-family"], u = e.options["font-weight"];
return l && s.attr({
font: l
}), c && s.attr({
"font-family": c
}), u && s.attr({
"font-weight": u
}), s;
}
function i(e, t, n, i) {
var r, o;
"[object Array]" !== Object.prototype.toString.call(n) && (n = [ n ]);
var a = "M{0},{1}";
for (r = 2, o = 2 * n.length + 2; o > r; r += 2) a += " L{" + r + "},{" + (r + 1) + "}";
var s = [ t.x, t.y ];
for (r = 0, o = n.length; o > r; r++) s.push(n[r].x), s.push(n[r].y);
var l = e.paper.path(a, s);
l.attr({
stroke: e.options["line-color"],
"stroke-width": e.options["line-width"],
"arrow-end": e.options["arrow-end"]
});
var c = e.options.font, u = e.options["font-family"], d = e.options["font-weight"];
if (c && l.attr({
font: c
}), u && l.attr({
"font-family": u
}), d && l.attr({
"font-weight": d
}), i) {
var p = e.paper.text(0, 0, i), h = !1, f = n[0];
t.y === f.y && (h = !0);
var m = 0, g = 0;
m = t.x, g = t.y, h ? (m += e.options["text-margin"] / 2, g -= e.options["text-margin"]) : (m += e.options["text-margin"] / 2,
g += e.options["text-margin"]), p.attr({
"text-anchor": "start",
"font-size": e.options["font-size"],
fill: e.options["font-color"],
x: m,
y: g
}), c && p.attr({
font: c
}), u && p.attr({
"font-family": u
}), d && p.attr({
"font-weight": d
});
}
return l;
}
function r(e, t, n, i, r, o, a, s) {
var l, c, u, d, p, h = {
x: null,
y: null,
onLine1: !1,
onLine2: !1
};
return l = (s - o) * (n - e) - (a - r) * (i - t), 0 === l ? h : (c = t - o, u = e - r,
d = (a - r) * c - (s - o) * u, p = (n - e) * c - (i - t) * u, c = d / l, u = p / l,
h.x = e + c * (n - e), h.y = t + c * (i - t), c > 0 && 1 > c && (h.onLine1 = !0),
u > 0 && 1 > u && (h.onLine2 = !0), h);
}
function o(e, t) {
t = t || {}, this.paper = new Raphael(e), this.options = g.defaults(t, m), this.symbols = [],
this.lines = [], this.start = null;
}
function a(e, t, n) {
this.chart = e, this.group = this.chart.paper.set(), this.symbol = n, this.connectedTo = [],
this.symbolType = t.symbolType, this.flowstate = t.flowstate || "future", this.next_direction = t.next && t.direction_next ? t.direction_next : void 0,
this.text = this.chart.paper.text(0, 0, t.text), t.key && (this.text.node.id = t.key + "t"),
this.text.node.setAttribute("class", this.getAttr("class") + "t"), this.text.attr({
"text-anchor": "start",
x: this.getAttr("text-margin"),
fill: this.getAttr("font-color"),
"font-size": this.getAttr("font-size")
});
var i = this.getAttr("font"), r = this.getAttr("font-family"), o = this.getAttr("font-weight");
i && this.text.attr({
font: i
}), r && this.text.attr({
"font-family": r
}), o && this.text.attr({
"font-weight": o
}), t.link && this.text.attr("href", t.link), t.target && this.text.attr("target", t.target);
var a = this.getAttr("maxWidth");
if (a) {
for (var s = t.text.split(" "), l = "", c = 0, u = s.length; u > c; c++) {
var d = s[c];
this.text.attr("text", l + " " + d), l += this.text.getBBox().width > a ? "\n" + d : " " + d;
}
this.text.attr("text", l.substring(1));
}
if (this.group.push(this.text), n) {
var p = this.getAttr("text-margin");
n.attr({
fill: this.getAttr("fill"),
stroke: this.getAttr("element-color"),
"stroke-width": this.getAttr("line-width"),
width: this.text.getBBox().width + 2 * p,
height: this.text.getBBox().height + 2 * p
}), n.node.setAttribute("class", this.getAttr("class")), t.link && n.attr("href", t.link),
t.target && n.attr("target", t.target), t.key && (n.node.id = t.key), this.group.push(n),
n.insertBefore(this.text), this.text.attr({
y: n.getBBox().height / 2
}), this.initialize();
}
}
function s(e, t) {
var n = e.paper.rect(0, 0, 0, 0, 20);
t = t || {}, t.text = t.text || "Start", a.call(this, e, t, n);
}
function l(e, t) {
var n = e.paper.rect(0, 0, 0, 0, 20);
t = t || {}, t.text = t.text || "End", a.call(this, e, t, n);
}
function c(e, t) {
var n = e.paper.rect(0, 0, 0, 0);
t = t || {}, a.call(this, e, t, n);
}
function u(e, t) {
var n = e.paper.rect(0, 0, 0, 0);
t = t || {}, a.call(this, e, t, n), n.attr({
width: this.text.getBBox().width + 4 * this.getAttr("text-margin")
}), this.text.attr({
x: 2 * this.getAttr("text-margin")
});
var i = e.paper.rect(0, 0, 0, 0);
i.attr({
x: this.getAttr("text-margin"),
stroke: this.getAttr("element-color"),
"stroke-width": this.getAttr("line-width"),
width: this.text.getBBox().width + 2 * this.getAttr("text-margin"),
height: this.text.getBBox().height + 2 * this.getAttr("text-margin"),
fill: this.getAttr("fill")
}), t.key && (i.node.id = t.key + "i");
var r = this.getAttr("font"), o = this.getAttr("font-family"), s = this.getAttr("font-weight");
r && i.attr({
font: r
}), o && i.attr({
"font-family": o
}), s && i.attr({
"font-weight": s
}), t.link && i.attr("href", t.link), t.target && i.attr("target", t.target), this.group.push(i),
i.insertBefore(this.text), this.initialize();
}
function d(e, t) {
t = t || {}, a.call(this, e, t), this.textMargin = this.getAttr("text-margin"),
this.text.attr({
x: 3 * this.textMargin
});
var i = this.text.getBBox().width + 4 * this.textMargin, r = this.text.getBBox().height + 2 * this.textMargin, o = this.textMargin, s = r / 2, l = {
x: o,
y: s
}, c = [ {
x: o - this.textMargin,
y: r
}, {
x: o - this.textMargin + i,
y: r
}, {
x: o - this.textMargin + i + 2 * this.textMargin,
y: 0
}, {
x: o - this.textMargin + 2 * this.textMargin,
y: 0
}, {
x: o,
y: s
} ], u = n(e, l, c);
u.attr({
stroke: this.getAttr("element-color"),
"stroke-width": this.getAttr("line-width"),
fill: this.getAttr("fill")
}), t.link && u.attr("href", t.link), t.target && u.attr("target", t.target), t.key && (u.node.id = t.key),
u.node.setAttribute("class", this.getAttr("class")), this.text.attr({
y: u.getBBox().height / 2
}), this.group.push(u), u.insertBefore(this.text), this.initialize();
}
function p(e, t) {
t = t || {}, a.call(this, e, t), this.textMargin = this.getAttr("text-margin"),
this.yes_direction = "bottom", this.no_direction = "right", t.yes && t.direction_yes && t.no && !t.direction_no ? "right" === t.direction_yes ? (this.no_direction = "bottom",
this.yes_direction = "right") : (this.no_direction = "right", this.yes_direction = "bottom") : t.yes && !t.direction_yes && t.no && t.direction_no ? "right" === t.direction_no ? (this.yes_direction = "bottom",
this.no_direction = "right") : (this.yes_direction = "right", this.no_direction = "bottom") : (this.yes_direction = "bottom",
this.no_direction = "right"), this.yes_direction = this.yes_direction || "bottom",
this.no_direction = this.no_direction || "right", this.text.attr({
x: 2 * this.textMargin
});
var i = this.text.getBBox().width + 3 * this.textMargin;
i += i / 2;
var r = this.text.getBBox().height + 2 * this.textMargin;
r += r / 2, r = Math.max(.5 * i, r);
var o = i / 4, s = r / 4;
this.text.attr({
x: o + this.textMargin / 2
});
var l = {
x: o,
y: s
}, c = [ {
x: o - i / 4,
y: s + r / 4
}, {
x: o - i / 4 + i / 2,
y: s + r / 4 + r / 2
}, {
x: o - i / 4 + i,
y: s + r / 4
}, {
x: o - i / 4 + i / 2,
y: s + r / 4 - r / 2
}, {
x: o - i / 4,
y: s + r / 4
} ], u = n(e, l, c);
u.attr({
stroke: this.getAttr("element-color"),
"stroke-width": this.getAttr("line-width"),
fill: this.getAttr("fill")
}), t.link && u.attr("href", t.link), t.target && u.attr("target", t.target), t.key && (u.node.id = t.key),
u.node.setAttribute("class", this.getAttr("class")), this.text.attr({
y: u.getBBox().height / 2
}), this.group.push(u), u.insertBefore(this.text), this.initialize();
}
function h(e) {
function t(e) {
var t = e.indexOf("(") + 1, i = e.indexOf(")");
return t >= 0 && i >= 0 ? n.symbols[e.substring(0, t - 1)] : n.symbols[e];
}
e = e || "", e = e.trim();
for (var n = {
symbols: {},
start: null,
drawSVG: function(e, t) {
function n(e) {
if (a[e.key]) return a[e.key];
switch (e.symbolType) {
case "start":
a[e.key] = new s(r, e);
break;
case "end":
a[e.key] = new l(r, e);
break;
case "operation":
a[e.key] = new c(r, e);
break;
case "inputoutput":
a[e.key] = new d(r, e);
break;
case "subroutine":
a[e.key] = new u(r, e);
break;
case "condition":
a[e.key] = new p(r, e);
break;
default:
return new Error("Wrong symbol type!");
}
return a[e.key];
}
var i = this;
this.diagram && this.diagram.clean();
var r = new o(e, t);
this.diagram = r;
var a = {};
!function h(e, t, o) {
var a = n(e);
return i.start === e ? r.startWith(a) : t && o && !t.pathOk && (t instanceof p ? (o.yes === e && t.yes(a),
o.no === e && t.no(a)) : t.then(a)), a.pathOk ? a : (a instanceof p ? (e.yes && h(e.yes, a, e),
e.no && h(e.no, a, e)) : e.next && h(e.next, a, e), a);
}(this.start), r.render();
},
clean: function() {
this.diagram.clean();
}
}, i = [], r = 0, a = 1, h = e.length; h > a; a++) if ("\n" === e[a] && "\\" !== e[a - 1]) {
var f = e.substring(r, a);
r = a + 1, i.push(f.replace(/\\\n/g, "\n"));
}
r < e.length && i.push(e.substr(r));
for (var m = 1, g = i.length; g > m; ) {
var v = i[m];
v.indexOf(": ") < 0 && v.indexOf("(") < 0 && v.indexOf(")") < 0 && v.indexOf("->") < 0 && v.indexOf("=>") < 0 ? (i[m - 1] += "\n" + v,
i.splice(m, 1), g--) : m++;
}
for (;i.length > 0; ) {
var b = i.splice(0, 1)[0];
if (b.indexOf("=>") >= 0) {
var y, x = b.split("=>"), w = {
key: x[0],
symbolType: x[1],
text: null,
link: null,
target: null,
flowstate: null
};
if (w.symbolType.indexOf(": ") >= 0 && (y = w.symbolType.split(": "), w.symbolType = y[0],
w.text = y[1]), w.text && w.text.indexOf(":>") >= 0 ? (y = w.text.split(":>"), w.text = y[0],
w.link = y[1]) : w.symbolType.indexOf(":>") >= 0 && (y = w.symbolType.split(":>"),
w.symbolType = y[0], w.link = y[1]), w.symbolType.indexOf("\n") >= 0 && (w.symbolType = w.symbolType.split("\n")[0]),
w.link) {
var S = w.link.indexOf("[") + 1, C = w.link.indexOf("]");
S >= 0 && C >= 0 && (w.target = w.link.substring(S, C), w.link = w.link.substring(0, S - 1));
}
if (w.text && w.text.indexOf("|") >= 0) {
var _ = w.text.split("|");
w.text = _[0], w.flowstate = _[1].trim();
}
n.symbols[w.key] = w;
} else if (b.indexOf("->") >= 0) for (var k = b.split("->"), E = 0, T = k.length; T > E; E++) {
var I = k[E], D = t(I), N = function(e) {
var t = "next", n = e.indexOf("(") + 1, i = e.indexOf(")");
return n >= 0 && i >= 0 && (t = I.substring(n, i), t.indexOf(",") < 0 && "yes" !== t && "no" !== t && (t = "next, " + t)),
t;
}(I), M = null;
if (N.indexOf(",") >= 0) {
var L = N.split(",");
N = L[0], M = L[1].trim();
}
if (n.start || (n.start = D), T > E + 1) {
var A = k[E + 1];
D[N] = t(A), D["direction_" + N] = M, M = null;
}
}
}
return n;
}
Array.prototype.indexOf || (Array.prototype.indexOf = function(e) {
"use strict";
if (null === this) throw new TypeError();
var t = Object(this), n = t.length >>> 0;
if (0 === n) return -1;
var i = 0;
if (arguments.length > 0 && (i = Number(arguments[1]), i != i ? i = 0 : 0 !== i && 1 / 0 != i && i != -1 / 0 && (i = (i > 0 || -1) * Math.floor(Math.abs(i)))),
i >= n) return -1;
for (var r = i >= 0 ? i : Math.max(n - Math.abs(i), 0); n > r; r++) if (r in t && t[r] === e) return r;
return -1;
}), Array.prototype.lastIndexOf || (Array.prototype.lastIndexOf = function(e) {
"use strict";
if (null === this) throw new TypeError();
var t = Object(this), n = t.length >>> 0;
if (0 === n) return -1;
var i = n;
arguments.length > 1 && (i = Number(arguments[1]), i != i ? i = 0 : 0 !== i && i != 1 / 0 && i != -1 / 0 && (i = (i > 0 || -1) * Math.floor(Math.abs(i))));
for (var r = i >= 0 ? Math.min(i, n - 1) : n - Math.abs(i); r >= 0; r--) if (r in t && t[r] === e) return r;
return -1;
}), String.prototype.trim || (String.prototype.trim = function() {
return this.replace(/^\s+|\s+$/g, "");
});
var f = {}, m = {
x: 0,
y: 0,
"line-width": 3,
"line-length": 50,
"text-margin": 10,
"font-size": 14,
"font-color": "black",
"line-color": "black",
"element-color": "black",
fill: "white",
"yes-text": "yes",
"no-text": "no",
"arrow-end": "block",
"class": "flowchart",
symbols: {
start: {},
end: {},
condition: {},
inputoutput: {},
operation: {},
subroutine: {}
}
}, g = {
defaults: e,
inherits: t
};
return o.prototype.handle = function(e) {
this.symbols.indexOf(e) <= -1 && this.symbols.push(e);
var t = this;
return e instanceof p ? (e.yes = function(n) {
return e.yes_symbol = n, e.no_symbol && (e.pathOk = !0), t.handle(n);
}, e.no = function(n) {
return e.no_symbol = n, e.yes_symbol && (e.pathOk = !0), t.handle(n);
}) : e.then = function(n) {
return e.next = n, e.pathOk = !0, t.handle(n);
}, e;
}, o.prototype.startWith = function(e) {
return this.start = e, this.handle(e);
}, o.prototype.render = function() {
var e, t = 0, n = 0, i = 0, r = 0, o = 0, a = 0;
for (i = 0, r = this.symbols.length; r > i; i++) e = this.symbols[i], e.width > t && (t = e.width),
e.height > n && (n = e.height);
for (i = 0, r = this.symbols.length; r > i; i++) e = this.symbols[i], e.shiftX(this.options.x + (t - e.width) / 2 + this.options["line-width"]),
e.shiftY(this.options.y + (n - e.height) / 2 + this.options["line-width"]);
for (this.start.render(), i = 0, r = this.symbols.length; r > i; i++) e = this.symbols[i],
e.renderLines();
for (o = this.maxXFromLine, i = 0, r = this.symbols.length; r > i; i++) {
e = this.symbols[i];
var s = e.getX() + e.width, l = e.getY() + e.height;
s > o && (o = s), l > a && (a = l);
}
this.paper.setSize(o + this.options["line-width"], a + this.options["line-width"]);
}, o.prototype.clean = function() {
if (this.paper) {
var e = this.paper.canvas;
e.parentNode.removeChild(e);
}
}, a.prototype.getAttr = function(e) {
if (this.chart) {
var t, n = this.chart.options ? this.chart.options[e] : void 0, i = this.chart.options.symbols ? this.chart.options.symbols[this.symbolType][e] : void 0;
return this.chart.options.flowstate && this.chart.options.flowstate[this.flowstate] && (t = this.chart.options.flowstate[this.flowstate][e]),
t || i || n;
}
}, a.prototype.initialize = function() {
this.group.transform("t" + this.getAttr("line-width") + "," + this.getAttr("line-width")),
this.width = this.group.getBBox().width, this.height = this.group.getBBox().height;
}, a.prototype.getCenter = function() {
return {
x: this.getX() + this.width / 2,
y: this.getY() + this.height / 2
};
}, a.prototype.getX = function() {
return this.group.getBBox().x;
}, a.prototype.getY = function() {
return this.group.getBBox().y;
}, a.prototype.shiftX = function(e) {
this.group.transform("t" + (this.getX() + e) + "," + this.getY());
}, a.prototype.setX = function(e) {
this.group.transform("t" + e + "," + this.getY());
}, a.prototype.shiftY = function(e) {
this.group.transform("t" + this.getX() + "," + (this.getY() + e));
}, a.prototype.setY = function(e) {
this.group.transform("t" + this.getX() + "," + e);
}, a.prototype.getTop = function() {
var e = this.getY();
return {
x: this.getX() + this.width / 2,
y: e
};
}, a.prototype.getBottom = function() {
var e = this.getY() + this.height;
return {
x: this.getX() + this.width / 2,
y: e
};
}, a.prototype.getLeft = function() {
var e = this.getY() + this.group.getBBox().height / 2;
return {
x: this.getX(),
y: e
};
}, a.prototype.getRight = function() {
var e = this.getY() + this.group.getBBox().height / 2;
return {
x: this.getX() + this.group.getBBox().width,
y: e
};
}, a.prototype.render = function() {
if (this.next) {
var e = this.getAttr("line-length");
if ("right" === this.next_direction) {
var t = this.getRight();
if (this.next.getLeft(), !this.next.isPositioned) {
this.next.setY(t.y - this.next.height / 2), this.next.shiftX(this.group.getBBox().x + this.width + e);
var n = this;
!function r() {
for (var t, i = !1, o = 0, a = n.chart.symbols.length; a > o; o++) {
t = n.chart.symbols[o];
var s = Math.abs(t.getCenter().x - n.next.getCenter().x);
if (t.getCenter().y > n.next.getCenter().y && s <= n.next.width / 2) {
i = !0;
break;
}
}
i && (n.next.setX(t.getX() + t.width + e), r());
}(), this.next.isPositioned = !0, this.next.render();
}
} else {
var i = this.getBottom();
this.next.getTop(), this.next.isPositioned || (this.next.shiftY(this.getY() + this.height + e),
this.next.setX(i.x - this.next.width / 2), this.next.isPositioned = !0, this.next.render());
}
}
}, a.prototype.renderLines = function() {
this.next && (this.next_direction ? this.drawLineTo(this.next, "", this.next_direction) : this.drawLineTo(this.next));
}, a.prototype.drawLineTo = function(e, t, n) {
this.connectedTo.indexOf(e) < 0 && this.connectedTo.push(e);
var o, a = this.getCenter().x, s = this.getCenter().y, l = (this.getTop(), this.getRight()), c = this.getBottom(), u = this.getLeft(), d = e.getCenter().x, p = e.getCenter().y, h = e.getTop(), f = e.getRight(), m = (e.getBottom(),
e.getLeft()), g = a === d, v = s === p, b = p > s, y = s > p, x = a > d, w = d > a, S = 0, C = this.getAttr("line-length"), _ = this.getAttr("line-width");
if (n && "bottom" !== n || !g || !b) if (n && "right" !== n || !v || !w) if (n && "left" !== n || !v || !x) if (n && "right" !== n || !g || !y) if (n && "right" !== n || !g || !b) if (n && "bottom" !== n || !x) if (n && "bottom" !== n || !w) if (n && "right" === n && x) o = i(this.chart, l, [ {
x: l.x + C / 2,
y: l.y
}, {
x: l.x + C / 2,
y: h.y - C / 2
}, {
x: h.x,
y: h.y - C / 2
}, {
x: h.x,
y: h.y
} ], t), this.rightStart = !0, e.topEnd = !0, S = l.x + C / 2; else if (n && "right" === n && w) o = i(this.chart, l, [ {
x: h.x,
y: l.y
}, {
x: h.x,
y: h.y
} ], t), this.rightStart = !0, e.topEnd = !0, S = l.x + C / 2; else if (n && "bottom" === n && g && y) o = i(this.chart, c, [ {
x: c.x,
y: c.y + C / 2
}, {
x: l.x + C / 2,
y: c.y + C / 2
}, {
x: l.x + C / 2,
y: h.y - C / 2
}, {
x: h.x,
y: h.y - C / 2
}, {
x: h.x,
y: h.y
} ], t), this.bottomStart = !0, e.topEnd = !0, S = c.x + C / 2; else if ("left" === n && g && y) {
var k = u.x - C / 2;
m.x < u.x && (k = m.x - C / 2), o = i(this.chart, u, [ {
x: k,
y: u.y
}, {
x: k,
y: h.y - C / 2
}, {
x: h.x,
y: h.y - C / 2
}, {
x: h.x,
y: h.y
} ], t), this.leftStart = !0, e.topEnd = !0, S = u.x;
} else "left" === n && (o = i(this.chart, u, [ {
x: h.x + (u.x - h.x) / 2,
y: u.y
}, {
x: h.x + (u.x - h.x) / 2,
y: h.y - C / 2
}, {
x: h.x,
y: h.y - C / 2
}, {
x: h.x,
y: h.y
} ], t), this.leftStart = !0, e.topEnd = !0, S = u.x); else o = i(this.chart, c, [ {
x: c.x,
y: c.y + C / 2
}, {
x: c.x + (c.x - h.x) / 2,
y: c.y + C / 2
}, {
x: c.x + (c.x - h.x) / 2,
y: h.y - C / 2
}, {
x: h.x,
y: h.y - C / 2
}, {
x: h.x,
y: h.y
} ], t), this.bottomStart = !0, e.topEnd = !0, S = c.x + (c.x - h.x) / 2; else o = this.leftEnd && y ? i(this.chart, c, [ {
x: c.x,
y: c.y + C / 2
}, {
x: c.x + (c.x - h.x) / 2,
y: c.y + C / 2
}, {
x: c.x + (c.x - h.x) / 2,
y: h.y - C / 2
}, {
x: h.x,
y: h.y - C / 2
}, {
x: h.x,
y: h.y
} ], t) : i(this.chart, c, [ {
x: c.x,
y: h.y - C / 2
}, {
x: h.x,
y: h.y - C / 2
}, {
x: h.x,
y: h.y
} ], t), this.bottomStart = !0, e.topEnd = !0, S = c.x + (c.x - h.x) / 2; else o = i(this.chart, l, [ {
x: l.x + C / 2,
y: l.y
}, {
x: l.x + C / 2,
y: h.y - C / 2
}, {
x: h.x,
y: h.y - C / 2
}, {
x: h.x,
y: h.y
} ], t), this.rightStart = !0, e.topEnd = !0, S = l.x + C / 2; else o = i(this.chart, l, [ {
x: l.x + C / 2,
y: l.y
}, {
x: l.x + C / 2,
y: h.y - C / 2
}, {
x: h.x,
y: h.y - C / 2
}, {
x: h.x,
y: h.y
} ], t), this.rightStart = !0, e.topEnd = !0, S = l.x + C / 2; else o = i(this.chart, u, f, t),
this.leftStart = !0, e.rightEnd = !0, S = f.x; else o = i(this.chart, l, m, t),
this.rightStart = !0, e.leftEnd = !0, S = m.x; else o = i(this.chart, c, h, t),
this.bottomStart = !0, e.topEnd = !0, S = c.x;
if (o) {
for (var E = 0, T = this.chart.lines.length; T > E; E++) for (var I, D = this.chart.lines[E], N = D.attr("path"), M = o.attr("path"), L = 0, A = N.length - 1; A > L; L++) {
var R = [];
R.push([ "M", N[L][1], N[L][2] ]), R.push([ "L", N[L + 1][1], N[L + 1][2] ]);
for (var P = R[0][1], O = R[0][2], F = R[1][1], B = R[1][2], j = 0, $ = M.length - 1; $ > j; j++) {
var G = [];
G.push([ "M", M[j][1], M[j][2] ]), G.push([ "L", M[j + 1][1], M[j + 1][2] ]);
var q = G[0][1], H = G[0][2], U = G[1][1], z = G[1][2], V = r(P, O, F, B, q, H, U, z);
if (V.onLine1 && V.onLine2) {
var W;
H === z ? q > U ? (W = [ "L", V.x + 2 * _, H ], M.splice(j + 1, 0, W), W = [ "C", V.x + 2 * _, H, V.x, H - 4 * _, V.x - 2 * _, H ],
M.splice(j + 2, 0, W), o.attr("path", M)) : (W = [ "L", V.x - 2 * _, H ], M.splice(j + 1, 0, W),
W = [ "C", V.x - 2 * _, H, V.x, H - 4 * _, V.x + 2 * _, H ], M.splice(j + 2, 0, W),
o.attr("path", M)) : H > z ? (W = [ "L", q, V.y + 2 * _ ], M.splice(j + 1, 0, W),
W = [ "C", q, V.y + 2 * _, q + 4 * _, V.y, q, V.y - 2 * _ ], M.splice(j + 2, 0, W),
o.attr("path", M)) : (W = [ "L", q, V.y - 2 * _ ], M.splice(j + 1, 0, W), W = [ "C", q, V.y - 2 * _, q + 4 * _, V.y, q, V.y + 2 * _ ],
M.splice(j + 2, 0, W), o.attr("path", M)), j += 2, I += 2;
}
}
}
this.chart.lines.push(o);
}
(!this.chart.maxXFromLine || this.chart.maxXFromLine && S > this.chart.maxXFromLine) && (this.chart.maxXFromLine = S);
}, g.inherits(s, a), g.inherits(l, a), g.inherits(c, a), g.inherits(u, a), g.inherits(d, a),
d.prototype.getLeft = function() {
var e = this.getY() + this.group.getBBox().height / 2;
return {
x: this.getX() + this.textMargin,
y: e
};
}, d.prototype.getRight = function() {
var e = this.getY() + this.group.getBBox().height / 2;
return {
x: this.getX() + this.group.getBBox().width - this.textMargin,
y: e
};
}, g.inherits(p, a), p.prototype.render = function() {
this.yes_direction && (this[this.yes_direction + "_symbol"] = this.yes_symbol),
this.no_direction && (this[this.no_direction + "_symbol"] = this.no_symbol);
var e = this.getAttr("line-length");
if (this.bottom_symbol) {
var t = this.getBottom();
this.bottom_symbol.getTop(), this.bottom_symbol.isPositioned || (this.bottom_symbol.shiftY(this.getY() + this.height + e),
this.bottom_symbol.setX(t.x - this.bottom_symbol.width / 2), this.bottom_symbol.isPositioned = !0,
this.bottom_symbol.render());
}
if (this.right_symbol) {
var n = this.getRight();
if (this.right_symbol.getLeft(), !this.right_symbol.isPositioned) {
this.right_symbol.setY(n.y - this.right_symbol.height / 2), this.right_symbol.shiftX(this.group.getBBox().x + this.width + e);
var i = this;
!function r() {
for (var t, n = !1, o = 0, a = i.chart.symbols.length; a > o; o++) {
t = i.chart.symbols[o];
var s = Math.abs(t.getCenter().x - i.right_symbol.getCenter().x);
if (t.getCenter().y > i.right_symbol.getCenter().y && s <= i.right_symbol.width / 2) {
n = !0;
break;
}
}
n && (i.right_symbol.setX(t.getX() + t.width + e), r());
}(), this.right_symbol.isPositioned = !0, this.right_symbol.render();
}
}
}, p.prototype.renderLines = function() {
this.yes_symbol && this.drawLineTo(this.yes_symbol, this.getAttr("yes-text"), this.yes_direction),
this.no_symbol && this.drawLineTo(this.no_symbol, this.getAttr("no-text"), this.no_direction);
}, f.parse = h, f;
}), define("extensions/umlDiagrams", [ "jquery", "underscore", "utils", "logger", "classes/Extension", "text!html/umlDiagramsSettingsBlock.html", "crel", "Diagram", "flow-chart" ], function(e, t, n, i, r, o, a, s, l) {
var c = new r("umlDiagrams", "UML Diagrams", !0);
return c.settingsBlock = o, c.defaultConfig = {
flowchartOptions: [ "{", ' "line-width": 2,', ' "font-family": "sans-serif",', ' "font-weight": "normal"', "}" ].join("\n")
}, c.onLoadSettings = function() {
n.setInputValue("#textarea-umldiagram-flowchart-options", c.config.flowchartOptions);
}, c.onSaveSettings = function(e, t) {
e.flowchartOptions = n.getInputJSONValue("#textarea-umldiagram-flowchart-options", t);
}, c.onPagedownConfigure = function(e) {
var n = document.getElementById("preview-contents");
e.hooks.chain("onPreviewRefresh", function() {
t.each(n.querySelectorAll(".prettyprint > .language-sequence"), function(e) {
try {
var t = s.parse(e.textContent), n = e.parentNode, i = a("div", {
"class": "sequence-diagram"
});
n.parentNode.replaceChild(i, n), t.drawSVG(i, {
theme: "simple"
});
} catch (e) {}
}), t.each(n.querySelectorAll(".prettyprint > .language-flow"), function(e) {
try {
var t = l.parse(e.textContent), n = e.parentNode, i = a("div", {
"class": "flow-chart"
});
n.parentNode.replaceChild(i, n), t.drawSVG(i, JSON.parse(c.config.flowchartOptions));
} catch (e) {}
});
});
}, c;
}), define("text!html/buttonToc.html", [], function() {
return '<button class="btn btn-success dropdown-toggle" title="Table of contents" data-toggle="dropdown">\n <i class="icon-list"></i>\n</button>\n<div class="dropdown-menu pull-right">\n <h3>Table of contents</h3>\n <hr>\n <div class="table-of-contents">\n </div>\n <hr>\n</div>\n';
}), define("text!html/tocSettingsBlock.html", [], function() {
return '<p>Generates a table of contents when a [TOC] marker is found.</p>\n<div class="form-horizontal">\n <div class="form-group">\n <label class="col-sm-4 control-label" for="input-toc-marker">Marker\n RegExp</label>\n <div class="col-sm-7">\n \n <input type="text" id="input-toc-marker" class="col-sm-4 form-control">\n </div>\n </div>\n <div class="form-group">\n <label class="col-sm-4 control-label" for="input-toc-maxdepth">Max depth</label>\n <div class="col-sm-7 form-inline">\n <input type="text" id="input-toc-maxdepth"\n class="col-sm-5 form-control" placeholder="6">\n </div>\n </div>\n <div class="form-group">\n <label class="col-sm-4 control-label" for="input-toc-button">Button over preview</label>\n <div class="col-sm-7">\n <div class="checkbox">\n <input type="checkbox" id="input-toc-button">\n </div>\n </div>\n </div>\n \n</div>';
}), define("extensions/toc", [ "jquery", "underscore", "utils", "classes/Extension", "text!html/buttonToc.html", "text!html/tocSettingsBlock.html" ], function(e, t, n, i, r, o) {
function a(e, t, n) {
this.tagName = e, this.anchor = t, this.text = n, this.children = [];
}
function s(e, n) {
function i() {
void 0 !== r && (r.children.length > 0 && (r.children = s(r.children, n + 1)), l.push(r));
}
n = n || 1;
var r, o = "H" + n, l = [];
return t.each(e, function(e) {
e.tagName != o ? n !== c.config.maxDepth && (void 0 === r && (r = new a()), r.children.push(e)) : (i(),
r = e);
}), i(), l;
}
function l() {
function e(e) {
for (var r = e.id || n.slugify(e.textContent) || "title", o = r, a = 0; t.has(i, o); ) o = r + "-" + ++a;
return i[o] = !0, e.id = o, o;
}
var i = {}, r = [];
return t.each(u.querySelectorAll("h1, h2, h3, h4, h5, h6"), function(t) {
r.push(new a(t.tagName, e(t), t.textContent));
}), r = s(r), '<div class="toc">\n<ul>\n' + r.join("") + "</ul>\n</div>\n";
}
var c = new i("toc", "Table of Contents", !0);
c.settingsBlock = o, c.defaultConfig = {
marker: "\\[(TOC|toc)\\]",
maxDepth: 6,
button: !0
}, c.onLoadSettings = function() {
n.setInputValue("#input-toc-marker", c.config.marker), n.setInputValue("#input-toc-maxdepth", c.config.maxDepth),
n.setInputChecked("#input-toc-button", c.config.button);
}, c.onSaveSettings = function(e, t) {
e.marker = n.getInputRegExpValue("#input-toc-marker", t), e.maxDepth = n.getInputIntValue("#input-toc-maxdepth"),
e.button = n.getInputChecked("#input-toc-button");
}, c.onCreatePreviewButton = function() {
return c.config.button ? r : void 0;
}, a.prototype.childrenToString = function() {
if (0 === this.children.length) return "";
var e = "<ul>\n";
return t.each(this.children, function(t) {
e += t.toString();
}), e += "</ul>\n";
}, a.prototype.toString = function() {
var e = "<li>";
return this.anchor && this.text && (e += '<a href="#' + this.anchor + '">' + this.text + "</a>"),
e += this.childrenToString() + "</li>\n";
};
var u;
return c.onPagedownConfigure = function(e) {
u = document.getElementById("preview-contents");
var n = new RegExp("^\\s*" + c.config.marker + "\\s*$");
e.hooks.chain("onPreviewRefresh", function() {
var e = document.querySelectorAll(".table-of-contents, .toc"), i = l();
t.each(u.getElementsByTagName("p"), function(e) {
n.test(e.innerHTML) && (e.innerHTML = i);
}), t.each(e, function(e) {
e.innerHTML = i;
});
});
}, c.onReady = function() {
var t = !0;
e(".preview-panel").on("hide.layout.toggle", function() {
t = !1;
}).on("shown.layout.toggle", function() {
t = !0;
}), e(".extension-preview-buttons .table-of-contents").on("click", "a", function(e) {
!t && e.preventDefault();
});
}, c;
}), define("extensions/emailConverter", [ "classes/Extension" ], function(e) {
var t = new e("emailConverter", "Markdown Email", !0);
return t.settingsBlock = "<p>Converts email addresses in the form &lt;email@example.com&gt; into clickable links.</p>",
t.onPagedownConfigure = function(e) {
e.getConverter().hooks.chain("postConversion", function(e) {
return e.replace(/<(mailto\:)?([^\s>]+@[^\s>]+\.\S+?)>/g, function(e, t, n) {
return '<a href="mailto:' + n + '">' + n + "</a>";
});
});
}, t;
}), define("text!html/scrollSyncSettingsBlock.html", [], function() {
return "<p>Binds together editor and preview scrollbars.</p>\n<blockquote>\n <p><b>Note:</b> The mapping between Markdown and HTML is based on the\n position of the title elements (h1, h2...) in the page. Therefore if\n your document does not contain any title, the mapping will be linear and\n consequently less accurate.</p>\n</blockquote>";
}), define("extensions/scrollSync", [ "jquery", "underscore", "classes/Extension", "text!html/scrollSyncSettingsBlock.html" ], function(e, t, n, i) {
function r(e, n, i) {
var r, o = t.find(n, function(t, n) {
return r = n, e < t.endOffset;
});
if (void 0 !== o) {
var a = (e - o.startOffset) / (o.height || 1), s = i[r];
return s.startOffset + s.height * a;
}
}
function o(e, t, n, i, r) {
function o() {
var l = Date.now(), c = (l - s) / 200;
if (1 > c) {
var u = t + a * Math.cos((1 - c) * Math.PI / 2);
e.scrollTop = u, i(u), p = setTimeout(o, 1);
} else h = void 0, e.scrollTop = n, setTimeout(r, 100);
}
h && (clearTimeout(p), h()), h = r;
var a = n - t, s = Date.now();
o();
}
var a = new n("scrollSync", "Scroll Sync", !0, !0);
a.settingsBlock = i;
var s;
a.onSectionsCreated = function(e) {
s = e;
};
var l, c, u, d, p, h, f = [], m = [], g = t.debounce(function() {
f = [];
var e, n;
t.each(l.querySelectorAll(".wmd-input-section"), function(t) {
if (void 0 === e) return void (e = 0);
t = t.firstChild;
var n = t.offsetTop;
f.push({
startOffset: e,
endOffset: n,
height: n - e
}), e = n;
}), n = l.scrollHeight, f.push({
startOffset: e,
endOffset: n,
height: n - e
}), m = [];
var i;
t.each(c.querySelectorAll(".wmd-preview-section"), function(e) {
if (void 0 === i) return void (i = 0);
var t = e.offsetTop;
m.push({
startOffset: i,
endOffset: t,
height: t - i
}), i = t;
}), n = c.scrollHeight, m.push({
startOffset: i,
endOffset: n,
height: n - i
}), u = -10, d = -10, S();
}, 500), v = !0, b = !1, y = !1, x = !1, w = !1, S = t.throttle(function() {
if (v && 0 !== f.length && f.length === m.length) {
var e = l.scrollTop;
0 > e && (e = 0);
var n, i = c.scrollTop;
if (!0 === b) {
if (Math.abs(e - u) <= 9) return;
if (b = !1, u = e, n = r(e, f, m), n = t.min([ n, c.scrollHeight - c.offsetHeight ]),
Math.abs(n - i) <= 9) return void (d = i);
o(c, i, n, function(e) {
w = !0, d = e;
}, function() {
w = !1;
});
} else if (!0 === y) {
if (Math.abs(i - d) <= 9) return;
if (y = !1, d = i, n = r(i, m, f), n = t.min([ n, l.scrollHeight - l.offsetHeight ]),
Math.abs(n - e) <= 9) return void (u = e);
o(l, e, n, function(e) {
x = !0, u = e;
}, function() {
x = !1;
});
}
}
}, 100);
a.onLayoutResize = function() {
b = !0, g();
}, a.onFileClosed = function() {
f = [];
};
var C = !1;
a.onReady = function() {
c = document.querySelector(".preview-container"), l = document.querySelector("#wmd-input"),
e(c).scroll(function() {
!1 === w && !1 === C && (y = !0, b = !1, S()), C = !1;
}), e(l).scroll(function() {
!1 === x && (b = !0, y = !1, S());
}), e(".preview-panel").on("hide.layout.toggle", function() {
v = !1;
}).on("shown.layout.toggle", function() {
v = !0;
}), e(".extension-preview-buttons .table-of-contents").on("click", "a", function(t) {
t.preventDefault();
var n = this.hash, i = e(n);
if (i.length) {
var o = i[0].getBoundingClientRect().top - c.getBoundingClientRect().top + c.scrollTop;
c.scrollTop = o;
var a = r(o, m, f);
l.scrollTop = a;
}
});
};
var _, k;
return a.onPagedownConfigure = function(e) {
_ = document.getElementById("preview-contents"), e.getConverter().hooks.chain("postConversion", function(e) {
return k = _.offsetHeight, _.style.height = k + "px", e;
});
}, a.onPreviewFinished = function() {
_.style.removeProperty("height");
var e = _.offsetHeight;
b = !0, k > e && (C = !0), g();
}, a;
}), define("text!html/buttonSyncSettingsBlock.html", [], function() {
return '<p>Adds a "Synchronize documents" button in the navigation bar.</p>\n<div class="form-horizontal">\n <div class="form-group">\n <label class="col-sm-5 control-label" for="input-sync-period">Sync\n period (0: manual)</label>\n <div class="col-sm-6 form-inline">\n <input type="text" id="input-sync-period"\n class="col-sm-5 form-control" placeholder="180000"> ms\n </div>\n </div>\n <div class="form-group">\n <label class="col-sm-5 control-label"\n for="input-sync-shortcut">Sync\n shortcut <a href="http://craig.is/killing/mice#keys" target="_blank">(?)</a></label>\n <div class="col-sm-6">\n <input type="text" id="input-sync-shortcut"\n class="form-control">\n </div>\n </div>\n</div>';
}), define("extensions/buttonSync", [ "jquery", "underscore", "crel", "utils", "classes/Extension", "mousetrap", "text!html/buttonSyncSettingsBlock.html" ], function(e, t, n, i, r, o, a) {
var s = new r("buttonSync", 'Button "Synchronize"', !1, !0);
s.settingsBlock = a, s.defaultConfig = {
syncPeriod: 18e4,
syncShortcut: "mod+s"
}, s.onLoadSettings = function() {
i.setInputValue("#input-sync-period", s.config.syncPeriod), i.setInputValue("#input-sync-shortcut", s.config.syncShortcut);
}, s.onSaveSettings = function(e, t) {
e.syncPeriod = i.getInputIntValue("#input-sync-period", t, 0), e.syncShortcut = i.getInputTextValue("#input-sync-shortcut", t);
};
var l;
s.onSynchronizerCreated = function(e) {
l = e;
};
var c, u = !1, d = !1, p = function() {
void 0 !== c && (!0 === u || !1 === l.hasSync() || d ? c.addClass("disabled") : c.removeClass("disabled"));
}, h = 0;
return s.onPeriodicRun = function() {
!s.config.syncPeriod || h + s.config.syncPeriod > i.currentTime || l.sync() && (h = i.currentTime);
}, s.onCreateButton = function() {
var t = n("a", {
"class": "btn btn-success button-synchronize",
title: "Force synchronization Ctrl/Cmd+S"
}, n("i", {
"class": "icon-refresh"
}));
return c = e(t), c.click(function() {
c.hasClass("disabled") || l.sync() && (h = i.currentTime);
}), t;
}, s.onReady = p, s.onFileCreated = p, s.onFileDeleted = p, s.onSyncImportSuccess = p,
s.onSyncExportSuccess = p, s.onSyncRemoved = p, s.onSyncRunning = function(e) {
u = e, p();
}, s.onOfflineChanged = function(e) {
d = e, p();
}, s.onReady = function() {
o.bind(s.config.syncShortcut, function(e) {
l.sync() && (h = i.currentTime), e.preventDefault();
}), e(".action-force-synchronization").click(function() {
l.sync() && (h = i.currentTime);
});
}, s;
}), define("extensions/buttonPublish", [ "jquery", "underscore", "crel", "classes/Extension" ], function(e, t, n, i) {
function r() {
void 0 !== o && (!0 === c || !1 === u || !0 === d ? o.addClass("disabled") : o.removeClass("disabled"));
}
var o, a, s, l = new i("buttonPublish", 'Button "Publish"'), c = !1, u = !1, d = !1;
l.onPublisherCreated = function(e) {
s = e;
}, l.onCreateButton = function() {
var t = n("a", {
"class": "btn btn-success button-publish",
title: "Update document publication"
}, n("i", {
"class": "icon-upload"
}));
return o = e(t).click(function() {
o.hasClass("disabled") || s.publish();
}), t;
}, l.onPublishRunning = function(e) {
c = e, r();
}, l.onOfflineChanged = function(e) {
d = e, r();
};
var p = function() {
u = 0 !== t.size(a.publishLocations), r();
};
return l.onFileSelected = function(e) {
a = e, p();
}, l.onReady = function() {
e(".action-update-publication").click(s.publish);
}, l.onPublishRemoved = p, l.onNewPublishSuccess = p, l;
}), define("text!html/buttonStat.html", [], function() {
return '<button class="btn btn-success dropdown-toggle stat-button" title="Document statistics" data-toggle="dropdown">\n <i class="icon-chart-bar"></i>\n <span class="value"></span>\n</button>\n<div class="dropdown-menu pull-right stat-button-dropdown">\n <h3>Statistics</h3>\n <hr>\n <div class="stat">\n <div>\n <%= name1 %>: <span class="value1"></span>\n </div>\n <div>\n <%= name2 %>: <span class="value2"></span>\n </div>\n <div>\n <%= name3 %>: <span class="value3"></span>\n </div>\n </div>\n</div>\n';
}), define("text!html/buttonStatSettingsBlock.html", [], function() {
return '<p>Adds a "Document statistics" button over the preview.</p>\n<div class="form-horizontal">\n <div class="form-group form-inline">\n <label class="label-text" for="input-stat-name1">Title</label> <input\n id="input-stat-name1" type="text" class="form-control col-sm-3"> <label\n class="label-text" for="input-stat-value1">RegExp</label> <input\n id="input-stat-value1" type="text" class="form-control col-sm-4">\n </div>\n <div class="form-group form-inline">\n <label class="label-text" for="input-stat-name2">Title</label> <input\n id="input-stat-name2" type="text" class="form-control col-sm-3"> <label\n class="label-text" for="input-stat-value2">RegExp</label> <input\n id="input-stat-value2" type="text" class="form-control col-sm-4">\n </div>\n <div class="form-group form-inline">\n <label class="label-text" for="input-stat-name3">Title</label> <input\n id="input-stat-name3" type="text" class="form-control col-sm-3"> <label\n class="label-text" for="input-stat-value3">RegExp</label> <input\n id="input-stat-value3" type="text" class="form-control col-sm-4">\n </div>\n</div>\n';
}), define("extensions/buttonStat", [ "jquery", "underscore", "utils", "classes/Extension", "text!html/buttonStat.html", "text!html/buttonStatSettingsBlock.html" ], function(e, t, n, i, r, o) {
var a = new i("buttonStat", 'Button "Statistics"', !0);
a.settingsBlock = o, a.defaultConfig = {
name1: "Characters",
value1: "\\S",
name2: "Words",
value2: "\\S+",
name3: "Paragraphs",
value3: "\\S.*"
};
var s;
a.onEventMgrCreated = function(e) {
s = e;
}, a.onLoadSettings = function() {
t.each([ 1, 2, 3 ], function(e) {
n.setInputValue("#input-stat-name" + e, a.config["name" + e]), n.setInputValue("#input-stat-value" + e, a.config["value" + e]);
});
}, a.onSaveSettings = function(e, i) {
t.each([ 1, 2, 3 ], function(t) {
e["name" + t] = n.getInputTextValue("#input-stat-name" + t, i), e["value" + t] = n.getInputRegExpValue("#input-stat-value" + t, i);
});
}, a.onCreatePreviewButton = function() {
return t.template(r, a.config);
};
var l, c, u, d, p;
a.onReady = function() {
l = document.getElementById("preview-contents"), c = document.querySelector(".stat-button .value"),
u = document.querySelector(".stat-button-dropdown .value1"), d = document.querySelector(".stat-button-dropdown .value2"),
p = document.querySelector(".stat-button-dropdown .value3");
};
var h, f, m;
return a.onInit = function() {
h = new RegExp(a.config.value1, "g"), f = new RegExp(a.config.value2, "g"), m = new RegExp(a.config.value3, "g");
}, a.onPreviewFinished = function() {
for (var e = l.cloneNode(!0), t = e.getElementsByTagName("script"), n = t.length - 1; n >= 0; n--) {
var i = t[n];
i.parentNode.removeChild(i);
}
var r = e.textContent;
c.textContent = u.textContent = (r.match(h) || []).length, d.textContent = (r.match(f) || []).length,
p.textContent = (r.match(m) || []).length, s.onExtensionButtonResize();
}, a;
}), define("text!html/buttonHtmlCode.html", [], function() {
return '<button class="btn btn-success dropdown-toggle action-html-code" title="HTML code" data-toggle="dropdown">\n <i class="icon-code"></i>\n</button>\n<div class="dropdown-menu pull-right">\n <h3>HTML code</h3>\n <textarea id="input-html-code" class="form-control"></textarea>\n</div>\n';
}), define("text!html/buttonHtmlCodeSettingsBlock.html", [], function() {
return '<p>Adds a "HTML code" button over the preview.</p>\n<div class="form-horizontal">\n <div class="form-group">\n <label class="col-sm-4 control-label" for="textarea-html-code-template">Template\n <a href="#" class="tooltip-template">(?)</a>\n </label>\n <div class="col-sm-7">\n <textarea id="textarea-html-code-template" class="form-control"></textarea>\n </div>\n </div>\n</div>';
}), define("extensions/buttonHtmlCode", [ "jquery", "underscore", "utils", "classes/Extension", "text!html/buttonHtmlCode.html", "text!html/buttonHtmlCodeSettingsBlock.html" ], function(e, t, n, i, r, o) {
var a = new i("buttonHtmlCode", 'Button "HTML code"', !0);
a.settingsBlock = o, a.defaultConfig = {
template: "<%= documentHTML %>"
}, a.onLoadSettings = function() {
n.setInputValue("#textarea-html-code-template", a.config.template);
}, a.onSaveSettings = function(e) {
e.template = n.getInputValue("#textarea-html-code-template");
};
var s;
a.onEventMgrCreated = function(e) {
s = e;
}, a.onCreatePreviewButton = function() {
return r;
};
var l;
a.onFileSelected = function(e) {
l = e;
};
var c, u;
return a.onPreviewFinished = function(e, t) {
c = e, u = t;
}, a.onReady = function() {
var n = document.getElementById("input-html-code");
e(".action-html-code").click(function() {
setTimeout(function() {
e("#input-html-code").each(function() {
e(this).is(":hidden") || this.select();
});
}, 10);
}).parent().on("show.bs.dropdown", function() {
try {
var e = t.template(a.config.template, {
documentTitle: l.title,
documentMarkdown: l.content,
strippedDocumentMarkdown: l.content.substring(l.frontMatter ? l.frontMatter._frontMatter.length : 0),
documentHTML: u,
documentHTMLWithFrontMatter: (l.frontMatter ? l.frontMatter._frontMatter : "") + u,
documentHTMLWithComments: c,
frontMatter: l.frontMatter,
publishAttributes: void 0
});
n.value = e;
} catch (e) {
s.onError(e);
}
});
}, a;
}), define("text!html/buttonViewer.html", [], function() {
return '<a href="viewer" class="btn btn-success dropdown-toggle"\n title="Open in viewer">\n <i class="icon-resize-full"></i>\n</a>\n';
}), define("extensions/buttonViewer", [ "jquery", "classes/Extension", "text!html/buttonViewer.html" ], function(e, t, n) {
var i = new t("buttonViewer", 'Button "Viewer"', !0, !0);
return i.settingsBlock = '<p>Adds a "Viewer" button over the preview.</p>', i.onCreatePreviewButton = function() {
return n;
}, i;
}), "undefined" == typeof jQuery) throw new Error("Bootstrap requires jQuery");
+function(e) {
"use strict";
function t() {
var e = document.createElement("bootstrap"), t = {
WebkitTransition: "webkitTransitionEnd",
MozTransition: "transitionend",
OTransition: "oTransitionEnd otransitionend",
transition: "transitionend"
};
for (var n in t) if (void 0 !== e.style[n]) return {
end: t[n]
};
}
e.fn.emulateTransitionEnd = function(t) {
var n = !1, i = this;
e(this).one(e.support.transition.end, function() {
n = !0;
});
var r = function() {
n || e(i).trigger(e.support.transition.end);
};
return setTimeout(r, t), this;
}, e(function() {
e.support.transition = t();
});
}(jQuery), function(e) {
"use strict";
var t = '[data-dismiss="alert"]', n = function(n) {
e(n).on("click", t, this.close);
};
n.prototype.close = function(t) {
function n() {
o.trigger("closed.bs.alert").remove();
}
var i = e(this), r = i.attr("data-target");
r || (r = i.attr("href"), r = r && r.replace(/.*(?=#[^\s]*$)/, ""));
var o = e(r);
t && t.preventDefault(), o.length || (o = i.hasClass("alert") ? i : i.parent()),
o.trigger(t = e.Event("close.bs.alert")), t.isDefaultPrevented() || (o.removeClass("in"),
e.support.transition && o.hasClass("fade") ? o.one(e.support.transition.end, n).emulateTransitionEnd(150) : n());
};
var i = e.fn.alert;
e.fn.alert = function(t) {
return this.each(function() {
var i = e(this), r = i.data("bs.alert");
r || i.data("bs.alert", r = new n(this)), "string" == typeof t && r[t].call(i);
});
}, e.fn.alert.Constructor = n, e.fn.alert.noConflict = function() {
return e.fn.alert = i, this;
}, e(document).on("click.bs.alert.data-api", t, n.prototype.close);
}(jQuery), function(e) {
"use strict";
var t = function(n, i) {
this.$element = e(n), this.options = e.extend({}, t.DEFAULTS, i);
};
t.DEFAULTS = {
loadingText: "loading..."
}, t.prototype.setState = function(e) {
var t = "disabled", n = this.$element, i = n.is("input") ? "val" : "html", r = n.data();
e += "Text", r.resetText || n.data("resetText", n[i]()), n[i](r[e] || this.options[e]),
setTimeout(function() {
"loadingText" == e ? n.addClass(t).attr(t, t) : n.removeClass(t).removeAttr(t);
}, 0);
}, t.prototype.toggle = function() {
var e = this.$element.closest('[data-toggle="buttons"]'), t = !0;
if (e.length) {
var n = this.$element.find("input");
"radio" === n.prop("type") && (n.prop("checked") && this.$element.hasClass("active") ? t = !1 : e.find(".active").removeClass("active")),
t && n.prop("checked", !this.$element.hasClass("active")).trigger("change");
}
t && this.$element.toggleClass("active");
};
var n = e.fn.button;
e.fn.button = function(n) {
return this.each(function() {
var i = e(this), r = i.data("bs.button"), o = "object" == typeof n && n;
r || i.data("bs.button", r = new t(this, o)), "toggle" == n ? r.toggle() : n && r.setState(n);
});
}, e.fn.button.Constructor = t, e.fn.button.noConflict = function() {
return e.fn.button = n, this;
}, e(document).on("click.bs.button.data-api", "[data-toggle^=button]", function(t) {
var n = e(t.target);
n.hasClass("btn") || (n = n.closest(".btn")), n.button("toggle"), t.preventDefault();
});
}(jQuery), function(e) {
"use strict";
var t = function(t, n) {
this.$element = e(t), this.$indicators = this.$element.find(".carousel-indicators"),
this.options = n, this.paused = this.sliding = this.interval = this.$active = this.$items = null,
"hover" == this.options.pause && this.$element.on("mouseenter", e.proxy(this.pause, this)).on("mouseleave", e.proxy(this.cycle, this));
};
t.DEFAULTS = {
interval: 5e3,
pause: "hover",
wrap: !0
}, t.prototype.cycle = function(t) {
return t || (this.paused = !1), this.interval && clearInterval(this.interval), this.options.interval && !this.paused && (this.interval = setInterval(e.proxy(this.next, this), this.options.interval)),
this;
}, t.prototype.getActiveIndex = function() {
return this.$active = this.$element.find(".item.active"), this.$items = this.$active.parent().children(),
this.$items.index(this.$active);
}, t.prototype.to = function(t) {
var n = this, i = this.getActiveIndex();
return t > this.$items.length - 1 || 0 > t ? void 0 : this.sliding ? this.$element.one("slid.bs.carousel", function() {
n.to(t);
}) : i == t ? this.pause().cycle() : this.slide(t > i ? "next" : "prev", e(this.$items[t]));
}, t.prototype.pause = function(t) {
return t || (this.paused = !0), this.$element.find(".next, .prev").length && e.support.transition.end && (this.$element.trigger(e.support.transition.end),
this.cycle(!0)), this.interval = clearInterval(this.interval), this;
}, t.prototype.next = function() {
return this.sliding ? void 0 : this.slide("next");
}, t.prototype.prev = function() {
return this.sliding ? void 0 : this.slide("prev");
}, t.prototype.slide = function(t, n) {
var i = this.$element.find(".item.active"), r = n || i[t](), o = this.interval, a = "next" == t ? "left" : "right", s = "next" == t ? "first" : "last", l = this;
if (!r.length) {
if (!this.options.wrap) return;
r = this.$element.find(".item")[s]();
}
this.sliding = !0, o && this.pause();
var c = e.Event("slide.bs.carousel", {
relatedTarget: r[0],
direction: a
});
if (!r.hasClass("active")) {
if (this.$indicators.length && (this.$indicators.find(".active").removeClass("active"),
this.$element.one("slid.bs.carousel", function() {
var t = e(l.$indicators.children()[l.getActiveIndex()]);
t && t.addClass("active");
})), e.support.transition && this.$element.hasClass("slide")) {
if (this.$element.trigger(c), c.isDefaultPrevented()) return;
r.addClass(t), r[0].offsetWidth, i.addClass(a), r.addClass(a), i.one(e.support.transition.end, function() {
r.removeClass([ t, a ].join(" ")).addClass("active"), i.removeClass([ "active", a ].join(" ")),
l.sliding = !1, setTimeout(function() {
l.$element.trigger("slid.bs.carousel");
}, 0);
}).emulateTransitionEnd(600);
} else {
if (this.$element.trigger(c), c.isDefaultPrevented()) return;
i.removeClass("active"), r.addClass("active"), this.sliding = !1, this.$element.trigger("slid.bs.carousel");
}
return o && this.cycle(), this;
}
};
var n = e.fn.carousel;
e.fn.carousel = function(n) {
return this.each(function() {
var i = e(this), r = i.data("bs.carousel"), o = e.extend({}, t.DEFAULTS, i.data(), "object" == typeof n && n), a = "string" == typeof n ? n : o.slide;
r || i.data("bs.carousel", r = new t(this, o)), "number" == typeof n ? r.to(n) : a ? r[a]() : o.interval && r.pause().cycle();
});
}, e.fn.carousel.Constructor = t, e.fn.carousel.noConflict = function() {
return e.fn.carousel = n, this;
}, e(document).on("click.bs.carousel.data-api", "[data-slide], [data-slide-to]", function(t) {
var n, i = e(this), r = e(i.attr("data-target") || (n = i.attr("href")) && n.replace(/.*(?=#[^\s]+$)/, "")), o = e.extend({}, r.data(), i.data()), a = i.attr("data-slide-to");
a && (o.interval = !1), r.carousel(o), (a = i.attr("data-slide-to")) && r.data("bs.carousel").to(a),
t.preventDefault();
}), e(window).on("load", function() {
e('[data-ride="carousel"]').each(function() {
var t = e(this);
t.carousel(t.data());
});
});
}(jQuery), function(e) {
"use strict";
var t = function(n, i) {
this.$element = e(n), this.options = e.extend({}, t.DEFAULTS, i), this.transitioning = null,
this.options.parent && (this.$parent = e(this.options.parent)), this.options.toggle && this.toggle();
};
t.DEFAULTS = {
toggle: !0
}, t.prototype.dimension = function() {
return this.$element.hasClass("width") ? "width" : "height";
}, t.prototype.show = function() {
if (!this.transitioning && !this.$element.hasClass("in")) {
var t = e.Event("show.bs.collapse");
if (this.$element.trigger(t), !t.isDefaultPrevented()) {
var n = this.$parent && this.$parent.find("> .panel > .in");
if (n && n.length) {
var i = n.data("bs.collapse");
if (i && i.transitioning) return;
n.collapse("hide"), i || n.data("bs.collapse", null);
}
var r = this.dimension();
this.$element.removeClass("collapse").addClass("collapsing")[r](0), this.transitioning = 1;
var o = function() {
this.$element.removeClass("collapsing").addClass("in")[r]("auto"), this.transitioning = 0,
this.$element.trigger("shown.bs.collapse");
};
if (!e.support.transition) return o.call(this);
var a = e.camelCase([ "scroll", r ].join("-"));
this.$element.one(e.support.transition.end, e.proxy(o, this)).emulateTransitionEnd(350)[r](this.$element[0][a]);
}
}
}, t.prototype.hide = function() {
if (!this.transitioning && this.$element.hasClass("in")) {
var t = e.Event("hide.bs.collapse");
if (this.$element.trigger(t), !t.isDefaultPrevented()) {
var n = this.dimension();
this.$element[n](this.$element[n]())[0].offsetHeight, this.$element.addClass("collapsing").removeClass("collapse").removeClass("in"),
this.transitioning = 1;
var i = function() {
this.transitioning = 0, this.$element.trigger("hidden.bs.collapse").removeClass("collapsing").addClass("collapse");
};
if (!e.support.transition) return i.call(this);
this.$element[n](0).one(e.support.transition.end, e.proxy(i, this)).emulateTransitionEnd(350);
}
}
}, t.prototype.toggle = function() {
this[this.$element.hasClass("in") ? "hide" : "show"]();
};
var n = e.fn.collapse;
e.fn.collapse = function(n) {
return this.each(function() {
var i = e(this), r = i.data("bs.collapse"), o = e.extend({}, t.DEFAULTS, i.data(), "object" == typeof n && n);
r || i.data("bs.collapse", r = new t(this, o)), "string" == typeof n && r[n]();
});
}, e.fn.collapse.Constructor = t, e.fn.collapse.noConflict = function() {
return e.fn.collapse = n, this;
}, e(document).on("click.bs.collapse.data-api", "[data-toggle=collapse]", function(t) {
var n, i = e(this), r = i.attr("data-target") || t.preventDefault() || (n = i.attr("href")) && n.replace(/.*(?=#[^\s]+$)/, ""), o = e(r), a = o.data("bs.collapse"), s = a ? "toggle" : i.data(), l = i.attr("data-parent"), c = l && e(l);
a && a.transitioning || (c && c.find('[data-toggle=collapse][data-parent="' + l + '"]').not(i).addClass("collapsed"),
i[o.hasClass("in") ? "addClass" : "removeClass"]("collapsed")), o.collapse(s);
});
}(jQuery), function(e) {
"use strict";
function t() {
e(i).remove(), e(r).each(function(t) {
var i = n(e(this));
i.hasClass("open") && (i.trigger(t = e.Event("hide.bs.dropdown")), t.isDefaultPrevented() || i.removeClass("open").trigger("hidden.bs.dropdown"));
});
}
function n(t) {
var n = t.attr("data-target");
n || (n = t.attr("href"), n = n && /#/.test(n) && n.replace(/.*(?=#[^\s]*$)/, ""));
var i = n && e(n);
return i && i.length ? i : t.parent();
}
var i = ".dropdown-backdrop", r = "[data-toggle=dropdown]", o = function(t) {
e(t).on("click.bs.dropdown", this.toggle);
};
o.prototype.toggle = function(i) {
var r = e(this);
if (!r.is(".disabled, :disabled")) {
var o = n(r), a = o.hasClass("open");
if (t(), !a) {
if ("ontouchstart" in document.documentElement && !o.closest(".navbar-nav").length && e('<div class="dropdown-backdrop"/>').insertAfter(e(this)).on("click", t),
o.trigger(i = e.Event("show.bs.dropdown")), i.isDefaultPrevented()) return;
o.toggleClass("open").trigger("shown.bs.dropdown"), r.focus();
}
return !1;
}
}, o.prototype.keydown = function(t) {
if (/(38|40|27)/.test(t.keyCode)) {
var i = e(this);
if (t.preventDefault(), t.stopPropagation(), !i.is(".disabled, :disabled")) {
var o = n(i), a = o.hasClass("open");
if (!a || a && 27 == t.keyCode) return 27 == t.which && o.find(r).focus(), i.click();
var s = e("[role=menu] li:not(.divider):visible a", o);
if (s.length) {
var l = s.index(s.filter(":focus"));
38 == t.keyCode && l > 0 && l--, 40 == t.keyCode && l < s.length - 1 && l++, ~l || (l = 0),
s.eq(l).focus();
}
}
}
};
var a = e.fn.dropdown;
e.fn.dropdown = function(t) {
return this.each(function() {
var n = e(this), i = n.data("bs.dropdown");
i || n.data("bs.dropdown", i = new o(this)), "string" == typeof t && i[t].call(n);
});
}, e.fn.dropdown.Constructor = o, e.fn.dropdown.noConflict = function() {
return e.fn.dropdown = a, this;
}, e(document).on("click.bs.dropdown.data-api", t).on("click.bs.dropdown.data-api", ".dropdown form", function(e) {
e.stopPropagation();
}).on("click.bs.dropdown.data-api", r, o.prototype.toggle).on("keydown.bs.dropdown.data-api", r + ", [role=menu]", o.prototype.keydown);
}(jQuery), function(e) {
"use strict";
var t = function(t, n) {
this.options = n, this.$element = e(t), this.$backdrop = this.isShown = null, this.options.remote && this.$element.load(this.options.remote);
};
t.DEFAULTS = {
backdrop: !0,
keyboard: !0,
show: !0
}, t.prototype.toggle = function(e) {
return this[this.isShown ? "hide" : "show"](e);
}, t.prototype.show = function(t) {
var n = this, i = e.Event("show.bs.modal", {
relatedTarget: t
});
this.$element.trigger(i), this.isShown || i.isDefaultPrevented() || (this.isShown = !0,
this.escape(), this.$element.on("click.dismiss.modal", '[data-dismiss="modal"]', e.proxy(this.hide, this)),
this.backdrop(function() {
var i = e.support.transition && n.$element.hasClass("fade");
n.$element.parent().length || n.$element.appendTo(document.body), n.$element.show(),
i && n.$element[0].offsetWidth, n.$element.addClass("in").attr("aria-hidden", !1),
n.enforceFocus();
var r = e.Event("shown.bs.modal", {
relatedTarget: t
});
i ? n.$element.find(".modal-dialog").one(e.support.transition.end, function() {
n.$element.focus().trigger(r);
}).emulateTransitionEnd(300) : n.$element.focus().trigger(r);
}));
}, t.prototype.hide = function(t) {
t && t.preventDefault(), t = e.Event("hide.bs.modal"), this.$element.trigger(t),
this.isShown && !t.isDefaultPrevented() && (this.isShown = !1, this.escape(), e(document).off("focusin.bs.modal"),
this.$element.removeClass("in").attr("aria-hidden", !0).off("click.dismiss.modal"),
e.support.transition && this.$element.hasClass("fade") ? this.$element.one(e.support.transition.end, e.proxy(this.hideModal, this)).emulateTransitionEnd(300) : this.hideModal());
}, t.prototype.enforceFocus = function() {
e(document).off("focusin.bs.modal").on("focusin.bs.modal", e.proxy(function(e) {
this.$element[0] === e.target || this.$element.has(e.target).length || this.$element.focus();
}, this));
}, t.prototype.escape = function() {
this.isShown && this.options.keyboard ? this.$element.on("keyup.dismiss.bs.modal", e.proxy(function(e) {
27 == e.which && this.hide();
}, this)) : this.isShown || this.$element.off("keyup.dismiss.bs.modal");
}, t.prototype.hideModal = function() {
var e = this;
this.$element.hide(), this.backdrop(function() {
e.removeBackdrop(), e.$element.trigger("hidden.bs.modal");
});
}, t.prototype.removeBackdrop = function() {
this.$backdrop && this.$backdrop.remove(), this.$backdrop = null;
}, t.prototype.backdrop = function(t) {
var n = this.$element.hasClass("fade") ? "fade" : "";
if (this.isShown && this.options.backdrop) {
var i = e.support.transition && n;
if (this.$backdrop = e('<div class="modal-backdrop ' + n + '" />').appendTo(document.body),
this.$element.on("click.dismiss.modal", e.proxy(function(e) {
e.target === e.currentTarget && ("static" == this.options.backdrop ? this.$element[0].focus.call(this.$element[0]) : this.hide.call(this));
}, this)), i && this.$backdrop[0].offsetWidth, this.$backdrop.addClass("in"), !t) return;
i ? this.$backdrop.one(e.support.transition.end, t).emulateTransitionEnd(150) : t();
} else !this.isShown && this.$backdrop ? (this.$backdrop.removeClass("in"), e.support.transition && this.$element.hasClass("fade") ? this.$backdrop.one(e.support.transition.end, t).emulateTransitionEnd(150) : t()) : t && t();
};
var n = e.fn.modal;
e.fn.modal = function(n, i) {
return this.each(function() {
var r = e(this), o = r.data("bs.modal"), a = e.extend({}, t.DEFAULTS, r.data(), "object" == typeof n && n);
o || r.data("bs.modal", o = new t(this, a)), "string" == typeof n ? o[n](i) : a.show && o.show(i);
});
}, e.fn.modal.Constructor = t, e.fn.modal.noConflict = function() {
return e.fn.modal = n, this;
}, e(document).on("click.bs.modal.data-api", '[data-toggle="modal"]', function(t) {
var n = e(this), i = n.attr("href"), r = e(n.attr("data-target") || i && i.replace(/.*(?=#[^\s]+$)/, "")), o = r.data("modal") ? "toggle" : e.extend({
remote: !/#/.test(i) && i
}, r.data(), n.data());
t.preventDefault(), r.modal(o, this).one("hide", function() {
n.is(":visible") && n.focus();
});
}), e(document).on("show.bs.modal", ".modal", function() {
e(document.body).addClass("modal-open");
}).on("hidden.bs.modal", ".modal", function() {
e(document.body).removeClass("modal-open");
});
}(jQuery), function(e) {
"use strict";
var t = function(e, t) {
this.type = this.options = this.enabled = this.timeout = this.hoverState = this.$element = null,
this.init("tooltip", e, t);
};
t.DEFAULTS = {
animation: !0,
placement: "top",
selector: !1,
template: '<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',
trigger: "hover focus",
title: "",
delay: 0,
html: !1,
container: !1
}, t.prototype.init = function(t, n, i) {
this.enabled = !0, this.type = t, this.$element = e(n), this.options = this.getOptions(i);
for (var r = this.options.trigger.split(" "), o = r.length; o--; ) {
var a = r[o];
if ("click" == a) this.$element.on("click." + this.type, this.options.selector, e.proxy(this.toggle, this)); else if ("manual" != a) {
var s = "hover" == a ? "mouseenter" : "focus", l = "hover" == a ? "mouseleave" : "blur";
this.$element.on(s + "." + this.type, this.options.selector, e.proxy(this.enter, this)),
this.$element.on(l + "." + this.type, this.options.selector, e.proxy(this.leave, this));
}
}
this.options.selector ? this._options = e.extend({}, this.options, {
trigger: "manual",
selector: ""
}) : this.fixTitle();
}, t.prototype.getDefaults = function() {
return t.DEFAULTS;
}, t.prototype.getOptions = function(t) {
return t = e.extend({}, this.getDefaults(), this.$element.data(), t), t.delay && "number" == typeof t.delay && (t.delay = {
show: t.delay,
hide: t.delay
}), t;
}, t.prototype.getDelegateOptions = function() {
var t = {}, n = this.getDefaults();
return this._options && e.each(this._options, function(e, i) {
n[e] != i && (t[e] = i);
}), t;
}, t.prototype.enter = function(t) {
var n = t instanceof this.constructor ? t : e(t.currentTarget)[this.type](this.getDelegateOptions()).data("bs." + this.type);
return clearTimeout(n.timeout), n.hoverState = "in", n.options.delay && n.options.delay.show ? void (n.timeout = setTimeout(function() {
"in" == n.hoverState && n.show();
}, n.options.delay.show)) : n.show();
}, t.prototype.leave = function(t) {
var n = t instanceof this.constructor ? t : e(t.currentTarget)[this.type](this.getDelegateOptions()).data("bs." + this.type);
return clearTimeout(n.timeout), n.hoverState = "out", n.options.delay && n.options.delay.hide ? void (n.timeout = setTimeout(function() {
"out" == n.hoverState && n.hide();
}, n.options.delay.hide)) : n.hide();
}, t.prototype.show = function() {
var t = e.Event("show.bs." + this.type);
if (this.hasContent() && this.enabled) {
if (this.$element.trigger(t), t.isDefaultPrevented()) return;
var n = this.tip();
this.setContent(), this.options.animation && n.addClass("fade");
var i = "function" == typeof this.options.placement ? this.options.placement.call(this, n[0], this.$element[0]) : this.options.placement, r = /\s?auto?\s?/i, o = r.test(i);
o && (i = i.replace(r, "") || "top"), n.detach().css({
top: 0,
left: 0,
display: "block"
}).addClass(i), this.options.container ? n.appendTo(this.options.container) : n.insertAfter(this.$element);
var a = this.getPosition(), s = n[0].offsetWidth, l = n[0].offsetHeight;
if (o) {
var c = this.$element.parent(), u = i, d = document.documentElement.scrollTop || document.body.scrollTop, p = "body" == this.options.container ? window.innerWidth : c.outerWidth(), h = "body" == this.options.container ? window.innerHeight : c.outerHeight(), f = "body" == this.options.container ? 0 : c.offset().left;
i = "bottom" == i && a.top + a.height + l - d > h ? "top" : "top" == i && a.top - d - l < 0 ? "bottom" : "right" == i && a.right + s > p ? "left" : "left" == i && a.left - s < f ? "right" : i,
n.removeClass(u).addClass(i);
}
var m = this.getCalculatedOffset(i, a, s, l);
this.applyPlacement(m, i), this.$element.trigger("shown.bs." + this.type);
}
}, t.prototype.applyPlacement = function(e, t) {
var n, i = this.tip(), r = i[0].offsetWidth, o = i[0].offsetHeight, a = parseInt(i.css("margin-top"), 10), s = parseInt(i.css("margin-left"), 10);
isNaN(a) && (a = 0), isNaN(s) && (s = 0), e.top = e.top + a, e.left = e.left + s,
i.offset(e).addClass("in");
var l = i[0].offsetWidth, c = i[0].offsetHeight;
if ("top" == t && c != o && (n = !0, e.top = e.top + o - c), /bottom|top/.test(t)) {
var u = 0;
e.left < 0 && (u = -2 * e.left, e.left = 0, i.offset(e), l = i[0].offsetWidth, c = i[0].offsetHeight),
this.replaceArrow(u - r + l, l, "left");
} else this.replaceArrow(c - o, c, "top");
n && i.offset(e);
}, t.prototype.replaceArrow = function(e, t, n) {
this.arrow().css(n, e ? 50 * (1 - e / t) + "%" : "");
}, t.prototype.setContent = function() {
var e = this.tip(), t = this.getTitle();
e.find(".tooltip-inner")[this.options.html ? "html" : "text"](t), e.removeClass("fade in top bottom left right");
}, t.prototype.hide = function() {
function t() {
"in" != n.hoverState && i.detach();
}
var n = this, i = this.tip(), r = e.Event("hide.bs." + this.type);
return this.$element.trigger(r), r.isDefaultPrevented() ? void 0 : (i.removeClass("in"),
e.support.transition && this.$tip.hasClass("fade") ? i.one(e.support.transition.end, t).emulateTransitionEnd(150) : t(),
this.$element.trigger("hidden.bs." + this.type), this);
}, t.prototype.fixTitle = function() {
var e = this.$element;
(e.attr("title") || "string" != typeof e.attr("data-original-title")) && e.attr("data-original-title", e.attr("title") || "").attr("title", "");
}, t.prototype.hasContent = function() {
return this.getTitle();
}, t.prototype.getPosition = function() {
var t = this.$element[0];
return e.extend({}, "function" == typeof t.getBoundingClientRect ? t.getBoundingClientRect() : {
width: t.offsetWidth,
height: t.offsetHeight
}, this.$element.offset());
}, t.prototype.getCalculatedOffset = function(e, t, n, i) {
return "bottom" == e ? {
top: t.top + t.height,
left: t.left + t.width / 2 - n / 2
} : "top" == e ? {
top: t.top - i,
left: t.left + t.width / 2 - n / 2
} : "left" == e ? {
top: t.top + t.height / 2 - i / 2,
left: t.left - n
} : {
top: t.top + t.height / 2 - i / 2,
left: t.left + t.width
};
}, t.prototype.getTitle = function() {
var e = this.$element, t = this.options;
return e.attr("data-original-title") || ("function" == typeof t.title ? t.title.call(e[0]) : t.title);
}, t.prototype.tip = function() {
return this.$tip = this.$tip || e(this.options.template);
}, t.prototype.arrow = function() {
return this.$arrow = this.$arrow || this.tip().find(".tooltip-arrow");
}, t.prototype.validate = function() {
this.$element[0].parentNode || (this.hide(), this.$element = null, this.options = null);
}, t.prototype.enable = function() {
this.enabled = !0;
}, t.prototype.disable = function() {
this.enabled = !1;
}, t.prototype.toggleEnabled = function() {
this.enabled = !this.enabled;
}, t.prototype.toggle = function(t) {
var n = t ? e(t.currentTarget)[this.type](this.getDelegateOptions()).data("bs." + this.type) : this;
n.tip().hasClass("in") ? n.leave(n) : n.enter(n);
}, t.prototype.destroy = function() {
this.hide().$element.off("." + this.type).removeData("bs." + this.type);
};
var n = e.fn.tooltip;
e.fn.tooltip = function(n) {
return this.each(function() {
var i = e(this), r = i.data("bs.tooltip"), o = "object" == typeof n && n;
r || i.data("bs.tooltip", r = new t(this, o)), "string" == typeof n && r[n]();
});
}, e.fn.tooltip.Constructor = t, e.fn.tooltip.noConflict = function() {
return e.fn.tooltip = n, this;
};
}(jQuery), function(e) {
"use strict";
var t = function(e, t) {
this.init("popover", e, t);
};
if (!e.fn.tooltip) throw new Error("Popover requires tooltip.js");
t.DEFAULTS = e.extend({}, e.fn.tooltip.Constructor.DEFAULTS, {
placement: "right",
trigger: "click",
content: "",
template: '<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'
}), t.prototype = e.extend({}, e.fn.tooltip.Constructor.prototype), t.prototype.constructor = t,
t.prototype.getDefaults = function() {
return t.DEFAULTS;
}, t.prototype.setContent = function() {
var e = this.tip(), t = this.getTitle(), n = this.getContent();
e.find(".popover-title")[this.options.html ? "html" : "text"](t), e.find(".popover-content")[this.options.html ? "html" : "text"](n),
e.removeClass("fade top bottom left right in"), e.find(".popover-title").html() || e.find(".popover-title").hide();
}, t.prototype.hasContent = function() {
return this.getTitle() || this.getContent();
}, t.prototype.getContent = function() {
var e = this.$element, t = this.options;
return e.attr("data-content") || ("function" == typeof t.content ? t.content.call(e[0]) : t.content);
}, t.prototype.arrow = function() {
return this.$arrow = this.$arrow || this.tip().find(".arrow");
}, t.prototype.tip = function() {
return this.$tip || (this.$tip = e(this.options.template)), this.$tip;
};
var n = e.fn.popover;
e.fn.popover = function(n) {
return this.each(function() {
var i = e(this), r = i.data("bs.popover"), o = "object" == typeof n && n;
r || i.data("bs.popover", r = new t(this, o)), "string" == typeof n && r[n]();
});
}, e.fn.popover.Constructor = t, e.fn.popover.noConflict = function() {
return e.fn.popover = n, this;
};
}(jQuery), function(e) {
"use strict";
function t(n, i) {
var r, o = e.proxy(this.process, this);
this.$element = e(e(n).is("body") ? window : n), this.$body = e("body"), this.$scrollElement = this.$element.on("scroll.bs.scroll-spy.data-api", o),
this.options = e.extend({}, t.DEFAULTS, i), this.selector = (this.options.target || (r = e(n).attr("href")) && r.replace(/.*(?=#[^\s]+$)/, "") || "") + " .nav li > a",
this.offsets = e([]), this.targets = e([]), this.activeTarget = null, this.refresh(),
this.process();
}
t.DEFAULTS = {
offset: 10
}, t.prototype.refresh = function() {
var t = this.$element[0] == window ? "offset" : "position";
this.offsets = e([]), this.targets = e([]);
var n = this;
this.$body.find(this.selector).map(function() {
var i = e(this), r = i.data("target") || i.attr("href"), o = /^#\w/.test(r) && e(r);
return o && o.length && [ [ o[t]().top + (!e.isWindow(n.$scrollElement.get(0)) && n.$scrollElement.scrollTop()), r ] ] || null;
}).sort(function(e, t) {
return e[0] - t[0];
}).each(function() {
n.offsets.push(this[0]), n.targets.push(this[1]);
});
}, t.prototype.process = function() {
var e, t = this.$scrollElement.scrollTop() + this.options.offset, n = this.$scrollElement[0].scrollHeight || this.$body[0].scrollHeight, i = n - this.$scrollElement.height(), r = this.offsets, o = this.targets, a = this.activeTarget;
if (t >= i) return a != (e = o.last()[0]) && this.activate(e);
for (e = r.length; e--; ) a != o[e] && t >= r[e] && (!r[e + 1] || t <= r[e + 1]) && this.activate(o[e]);
}, t.prototype.activate = function(t) {
this.activeTarget = t, e(this.selector).parents(".active").removeClass("active");
var n = this.selector + '[data-target="' + t + '"],' + this.selector + '[href="' + t + '"]', i = e(n).parents("li").addClass("active");
i.parent(".dropdown-menu").length && (i = i.closest("li.dropdown").addClass("active")),
i.trigger("activate.bs.scrollspy");
};
var n = e.fn.scrollspy;
e.fn.scrollspy = function(n) {
return this.each(function() {
var i = e(this), r = i.data("bs.scrollspy"), o = "object" == typeof n && n;
r || i.data("bs.scrollspy", r = new t(this, o)), "string" == typeof n && r[n]();
});
}, e.fn.scrollspy.Constructor = t, e.fn.scrollspy.noConflict = function() {
return e.fn.scrollspy = n, this;
}, e(window).on("load", function() {
e('[data-spy="scroll"]').each(function() {
var t = e(this);
t.scrollspy(t.data());
});
});
}(jQuery), function(e) {
"use strict";
var t = function(t) {
this.element = e(t);
};
t.prototype.show = function() {
var t = this.element, n = t.closest("ul:not(.dropdown-menu)"), i = t.data("target");
if (i || (i = t.attr("href"), i = i && i.replace(/.*(?=#[^\s]*$)/, "")), !t.parent("li").hasClass("active")) {
var r = n.find(".active:last a")[0], o = e.Event("show.bs.tab", {
relatedTarget: r
});
if (t.trigger(o), !o.isDefaultPrevented()) {
var a = e(i);
this.activate(t.parent("li"), n), this.activate(a, a.parent(), function() {
t.trigger({
type: "shown.bs.tab",
relatedTarget: r
});
});
}
}
}, t.prototype.activate = function(t, n, i) {
function r() {
o.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),
t.addClass("active"), a ? (t[0].offsetWidth, t.addClass("in")) : t.removeClass("fade"),
t.parent(".dropdown-menu") && t.closest("li.dropdown").addClass("active"), i && i();
}
var o = n.find("> .active"), a = i && e.support.transition && o.hasClass("fade");
a ? o.one(e.support.transition.end, r).emulateTransitionEnd(150) : r(), o.removeClass("in");
};
var n = e.fn.tab;
e.fn.tab = function(n) {
return this.each(function() {
var i = e(this), r = i.data("bs.tab");
r || i.data("bs.tab", r = new t(this)), "string" == typeof n && r[n]();
});
}, e.fn.tab.Constructor = t, e.fn.tab.noConflict = function() {
return e.fn.tab = n, this;
}, e(document).on("click.bs.tab.data-api", '[data-toggle="tab"], [data-toggle="pill"]', function(t) {
t.preventDefault(), e(this).tab("show");
});
}(jQuery), function(e) {
"use strict";
var t = function(n, i) {
this.options = e.extend({}, t.DEFAULTS, i), this.$window = e(window).on("scroll.bs.affix.data-api", e.proxy(this.checkPosition, this)).on("click.bs.affix.data-api", e.proxy(this.checkPositionWithEventLoop, this)),
this.$element = e(n), this.affixed = this.unpin = null, this.checkPosition();
};
t.RESET = "affix affix-top affix-bottom", t.DEFAULTS = {
offset: 0
}, t.prototype.checkPositionWithEventLoop = function() {
setTimeout(e.proxy(this.checkPosition, this), 1);
}, t.prototype.checkPosition = function() {
if (this.$element.is(":visible")) {
var n = e(document).height(), i = this.$window.scrollTop(), r = this.$element.offset(), o = this.options.offset, a = o.top, s = o.bottom;
"object" != typeof o && (s = a = o), "function" == typeof a && (a = o.top()), "function" == typeof s && (s = o.bottom());
var l = !(null != this.unpin && i + this.unpin <= r.top) && (null != s && r.top + this.$element.height() >= n - s ? "bottom" : null != a && a >= i && "top");
this.affixed !== l && (this.unpin && this.$element.css("top", ""), this.affixed = l,
this.unpin = "bottom" == l ? r.top - i : null, this.$element.removeClass(t.RESET).addClass("affix" + (l ? "-" + l : "")),
"bottom" == l && this.$element.offset({
top: document.body.offsetHeight - s - this.$element.height()
}));
}
};
var n = e.fn.affix;
e.fn.affix = function(n) {
return this.each(function() {
var i = e(this), r = i.data("bs.affix"), o = "object" == typeof n && n;
r || i.data("bs.affix", r = new t(this, o)), "string" == typeof n && r[n]();
});
}, e.fn.affix.Constructor = t, e.fn.affix.noConflict = function() {
return e.fn.affix = n, this;
}, e(window).on("load", function() {
e('[data-spy="affix"]').each(function() {
var t = e(this), n = t.data();
n.offset = n.offset || {}, n.offsetBottom && (n.offset.bottom = n.offsetBottom),
n.offsetTop && (n.offset.top = n.offsetTop), t.affix(n);
});
});
}(jQuery), define("bootstrap", [ "jquery" ], function() {}), function(e, t) {
var n, i;
i = t.document, n = function() {
function n(n) {
this._options = e.extend({
name: "tour",
container: "body",
keyboard: !0,
storage: t.localStorage,
debug: !1,
backdrop: !1,
redirect: !0,
orphan: !1,
duration: !1,
basePath: "",
template: "<div class='popover'> <div class='arrow'></div> <h3 class='popover-title'></h3> <div class='popover-content'></div> <div class='popover-navigation'> <div class='btn-group'> <button class='btn btn-sm btn-default' data-role='prev'>&laquo; Prev</button> <button class='btn btn-sm btn-default' data-role='next'>Next &raquo;</button> <button class='btn btn-sm btn-default' data-role='pause-resume' data-pause-text='Pause' data-resume-text='Resume' >Pause</button> </div> <button class='btn btn-sm btn-default' data-role='end'>End tour</button> </div> </div>",
afterSetState: function() {},
afterGetState: function() {},
afterRemoveState: function() {},
onStart: function() {},
onEnd: function() {},
onShow: function() {},
onShown: function() {},
onHide: function() {},
onHidden: function() {},
onNext: function() {},
onPrev: function() {},
onPause: function() {},
onResume: function() {}
}, n), this._force = !1, this._inited = !1, this._steps = [], this.backdrop = {
overlay: null,
$element: null,
$background: null,
backgroundShown: !1,
overlayElementShown: !1
};
}
return n.prototype.setState = function(e, t) {
var n, i;
if (this._options.storage) {
i = this._options.name + "_" + e;
try {
this._options.storage.setItem(i, t);
} catch (e) {
n = e, n.code === DOMException.QUOTA_EXCEEDED_ERR && this.debug("LocalStorage quota exceeded. setState failed.");
}
return this._options.afterSetState(i, t);
}
return null == this._state && (this._state = {}), this._state[e] = t;
}, n.prototype.removeState = function(e) {
var t;
return this._options.storage ? (t = this._options.name + "_" + e, this._options.storage.removeItem(t),
this._options.afterRemoveState(t)) : null != this._state ? delete this._state[e] : void 0;
}, n.prototype.getState = function(e) {
var t, n;
return this._options.storage ? (t = this._options.name + "_" + e, n = this._options.storage.getItem(t)) : null != this._state && (n = this._state[e]),
void 0 !== n && "null" !== n || (n = null), this._options.afterGetState(e, n), n;
}, n.prototype.addSteps = function(e) {
var t, n, i, r;
for (r = [], n = 0, i = e.length; i > n; n++) t = e[n], r.push(this.addStep(t));
return r;
}, n.prototype.addStep = function(e) {
return this._steps.push(e);
}, n.prototype.getStep = function(t) {
return null != this._steps[t] ? e.extend({
id: "step-" + t,
path: "",
placement: "right",
title: "",
content: "<p></p>",
next: t === this._steps.length - 1 ? -1 : t + 1,
prev: t - 1,
animation: !0,
container: this._options.container,
backdrop: this._options.backdrop,
redirect: this._options.redirect,
orphan: this._options.orphan,
duration: this._options.duration,
template: this._options.template,
onShow: this._options.onShow,
onShown: this._options.onShown,
onHide: this._options.onHide,
onHidden: this._options.onHidden,
onNext: this._options.onNext,
onPrev: this._options.onPrev,
onPause: this._options.onPause,
onResume: this._options.onResume
}, this._steps[t]) : void 0;
}, n.prototype.init = function(e) {
var t = this;
return this._force = e, this.ended() ? this._debug("Tour ended, init prevented.") : (this.setCurrentStep(),
this._setupMouseNavigation(), this._setupKeyboardNavigation(), this._onResize(function() {
return t.showStep(t._current);
}), null !== this._current && this.showStep(this._current), this._inited = !0, this);
}, n.prototype.start = function(e) {
var t;
return null == e && (e = !1), this._inited || this.init(e), null === this._current ? (t = this._makePromise(null != this._options.onStart ? this._options.onStart(this) : void 0),
this._callOnPromiseDone(t, this.showStep, 0)) : void 0;
}, n.prototype.next = function() {
var e;
return this.ended() ? this._debug("Tour ended, next prevented.") : (e = this.hideStep(this._current),
this._callOnPromiseDone(e, this._showNextStep));
}, n.prototype.prev = function() {
var e;
return this.ended() ? this._debug("Tour ended, prev prevented.") : (e = this.hideStep(this._current),
this._callOnPromiseDone(e, this._showPrevStep));
}, n.prototype.goTo = function(e) {
var t;
return this.ended() ? this._debug("Tour ended, goTo prevented.") : (t = this.hideStep(this._current),
this._callOnPromiseDone(t, this.showStep, e));
}, n.prototype.end = function() {
var n, r, o = this;
return n = function() {
return e(i).off("click.tour-" + o._options.name), e(i).off("keyup.tour-" + o._options.name),
e(t).off("resize.tour-" + o._options.name), o.setState("end", "yes"), o._inited = !1,
o._force = !1, o._clearTimer(), null != o._options.onEnd ? o._options.onEnd(o) : void 0;
}, r = this.hideStep(this._current), this._callOnPromiseDone(r, n);
}, n.prototype.ended = function() {
return !this.force && !!this.getState("end");
}, n.prototype.restart = function() {
return this.removeState("current_step"), this.removeState("end"), this.setCurrentStep(0),
this.start();
}, n.prototype.pause = function() {
var e;
return (e = this.getStep(this._current)) && e.duration ? (this._paused = !0, this._duration -= new Date().getTime() - this._start,
t.clearTimeout(this._timer), this._debug("Paused/Stopped step " + (this._current + 1) + " timer (" + this._duration + " remaining)."),
null != e.onPause ? e.onPause(this, this._duration) : void 0) : void 0;
}, n.prototype.resume = function() {
var e, n = this;
return (e = this.getStep(this._current)) && e.duration ? (this._paused = !1, this._start = new Date().getTime(),
this._duration = this._duration || e.duration, this._timer = t.setTimeout(function() {
return n._isLast() ? n.next() : n.end();
}, this._duration), this._debug("Started step " + (this._current + 1) + " timer with duration " + this._duration),
null != e.onResume && this._duration !== e.duration ? e.onResume(this, this._duration) : void 0) : void 0;
}, n.prototype.hideStep = function(t) {
var n, i, r, o = this;
return (r = this.getStep(t)) ? (this._clearTimer(), i = this._makePromise(null != r.onHide ? r.onHide(this, t) : void 0),
n = function() {
var t;
return t = e(r.element), t.data("bs.popover") || t.data("popover") || (t = e("body")),
t.popover("destroy"), r.reflex && t.css("cursor", "").off("click.tour-" + o._options.name),
r.backdrop && o._hideBackdrop(), null != r.onHidden ? r.onHidden(o) : void 0;
}, this._callOnPromiseDone(i, n), i) : void 0;
}, n.prototype.showStep = function(t) {
var n, r, o, a, s = this;
return (a = this.getStep(t)) ? (o = t < this._current, n = this._makePromise(null != a.onShow ? a.onShow(this, t) : void 0),
r = function() {
var n, r;
if (s.setCurrentStep(t), r = e.isFunction(a.path) ? a.path.call() : s._options.basePath + a.path,
n = [ i.location.pathname, i.location.hash ].join(""), s._isRedirect(r, n)) return void s._redirect(a, r);
if (s._isOrphan(a)) {
if (!a.orphan) return s._debug("Skip the orphan step " + (s._current + 1) + ". Orphan option is false and the element doesn't exist or is hidden."),
void (o ? s._showPrevStep() : s._showNextStep());
s._debug("Show the orphan step " + (s._current + 1) + ". Orphans option is true.");
}
return a.backdrop && s._showBackdrop(s._isOrphan(a) ? void 0 : a.element), s._scrollIntoView(a.element, function() {
return null != a.element && a.backdrop && s._showOverlayElement(a.element), s._showPopover(a, t),
null != a.onShown && a.onShown(s), s._debug("Step " + (s._current + 1) + " of " + s._steps.length);
}), a.duration ? s.resume() : void 0;
}, this._callOnPromiseDone(n, r), n) : void 0;
}, n.prototype.setCurrentStep = function(e) {
return null != e ? (this._current = e, this.setState("current_step", e)) : (this._current = this.getState("current_step"),
this._current = null === this._current ? null : parseInt(this._current, 10)), this;
}, n.prototype._showNextStep = function() {
var e, t, n, i = this;
return n = this.getStep(this._current), t = function() {
return i.showStep(n.next);
}, e = this._makePromise(null != n.onNext ? n.onNext(this) : void 0), this._callOnPromiseDone(e, t);
}, n.prototype._showPrevStep = function() {
var e, t, n, i = this;
return n = this.getStep(this._current), t = function() {
return i.showStep(n.prev);
}, e = this._makePromise(null != n.onPrev ? n.onPrev(this) : void 0), this._callOnPromiseDone(e, t);
}, n.prototype._debug = function(e) {
return this._options.debug ? t.console.log("Bootstrap Tour '" + this._options.name + "' | " + e) : void 0;
}, n.prototype._isRedirect = function(e, t) {
return null != e && "" !== e && e.replace(/\?.*$/, "").replace(/\/?$/, "") !== t.replace(/\/?$/, "");
}, n.prototype._redirect = function(t, n) {
return e.isFunction(t.redirect) ? t.redirect.call(this, n) : !0 === t.redirect ? (this._debug("Redirect to " + n),
i.location.href = n) : void 0;
}, n.prototype._isOrphan = function(t) {
return null == t.element || !e(t.element).length || e(t.element).is(":hidden") && "http://www.w3.org/2000/svg" !== e(t.element)[0].namespaceURI;
}, n.prototype._isLast = function() {
return this._current < this._steps.length - 1;
}, n.prototype._showPopover = function(t, n) {
var i, r, o, a, s, l, c = this;
return l = e.extend({}, this._options), o = e(e.isFunction(t.template) ? t.template(n, t) : t.template),
r = o.find(".popover-navigation"), s = this._isOrphan(t), s && (t.element = "body",
t.placement = "top", o = o.addClass("orphan")), i = e(t.element), o.addClass("tour-" + this._options.name),
t.options && e.extend(l, t.options), t.reflex && i.css("cursor", "pointer").on("click.tour-" + this._options.name, function() {
return c._isLast() ? c.next() : c.end();
}), t.prev < 0 && r.find("*[data-role=prev]").addClass("disabled"), t.next < 0 && r.find("*[data-role=next]").addClass("disabled"),
t.duration || r.find("*[data-role='pause-resume']").remove(), t.template = o.clone().wrap("<div>").parent().html(),
i.popover({
placement: t.placement,
trigger: "manual",
title: t.title,
content: t.content,
html: !0,
animation: t.animation,
container: t.container,
template: t.template,
selector: t.element
}).popover("show"), a = i.data("bs.popover") ? i.data("bs.popover").tip() : i.data("popover").tip(),
a.attr("id", t.id), this._reposition(a, t), s ? this._center(a) : void 0;
}, n.prototype._reposition = function(t, n) {
var r, o, a, s, l, c, u;
if (s = t[0].offsetWidth, o = t[0].offsetHeight, u = t.offset(), l = u.left, c = u.top,
r = e(i).outerHeight() - u.top - t.outerHeight(), 0 > r && (u.top = u.top + r),
a = e("html").outerWidth() - u.left - t.outerWidth(), 0 > a && (u.left = u.left + a),
u.top < 0 && (u.top = 0), u.left < 0 && (u.left = 0), t.offset(u), "bottom" === n.placement || "top" === n.placement) {
if (l !== u.left) return this._replaceArrow(t, 2 * (u.left - l), s, "left");
} else if (c !== u.top) return this._replaceArrow(t, 2 * (u.top - c), o, "top");
}, n.prototype._center = function(n) {
return n.css("top", e(t).outerHeight() / 2 - n.outerHeight() / 2);
}, n.prototype._replaceArrow = function(e, t, n, i) {
return e.find(".arrow").css(i, t ? 50 * (1 - t / n) + "%" : "");
}, n.prototype._scrollIntoView = function(n, i) {
var r, o, a, s, l, c = this;
return n ? (r = e(n), o = e(t), a = r.offset().top, l = o.height(), s = Math.max(0, a - l / 2),
this._debug("Scroll into view. ScrollTop: " + s + ". Element offset: " + a + ". Window height: " + l + "."),
e("body").stop().animate({
scrollTop: Math.ceil(s)
}, function() {
return i(), c._debug("Scroll into view. Animation end element offset: " + r.offset().top + ". Window height: " + o.height() + ".");
})) : i();
}, n.prototype._onResize = function(n, i) {
return e(t).on("resize.tour-" + this._options.name, function() {
return clearTimeout(i), i = setTimeout(n, 100);
});
}, n.prototype._setupMouseNavigation = function() {
var t = this;
return t = this, e(i).off("click.tour-" + this._options.name, ".popover.tour-" + this._options.name + " *[data-role=next]:not(.disabled)").on("click.tour-" + this._options.name, ".popover.tour-" + this._options.name + " *[data-role=next]:not(.disabled)", function(e) {
return e.preventDefault(), t.next();
}), e(i).off("click.tour-" + this._options.name, ".popover.tour-" + this._options.name + " *[data-role=prev]:not(.disabled)").on("click.tour-" + this._options.name, ".popover.tour-" + this._options.name + " *[data-role=prev]:not(.disabled)", function(e) {
return e.preventDefault(), t.prev();
}), e(i).off("click.tour-" + this._options.name, ".popover.tour-" + this._options.name + " *[data-role=end]").on("click.tour-" + this._options.name, ".popover.tour-" + this._options.name + " *[data-role=end]", function(e) {
return e.preventDefault(), t.end();
}), e(i).off("click.tour-" + this._options.name, ".popover.tour-" + this._options.name + " *[data-role=pause-resume]").on("click.tour-" + this._options.name, ".popover.tour-" + this._options.name + " *[data-role=pause-resume]", function(n) {
var i;
return n.preventDefault(), i = e(this), i.text(i.data(t._paused ? "pause-text" : "resume-text")),
t._paused ? t.resume() : t.pause();
});
}, n.prototype._setupKeyboardNavigation = function() {
var t = this;
return this._options.keyboard ? e(i).on("keyup.tour-" + this._options.name, function(e) {
if (e.which) switch (e.which) {
case 39:
return e.preventDefault(), t._isLast() ? t.next() : t.end();
case 37:
if (e.preventDefault(), t._current > 0) return t.prev();
break;
case 27:
return e.preventDefault(), t.end();
}
}) : void 0;
}, n.prototype._makePromise = function(t) {
return t && e.isFunction(t.then) ? t : null;
}, n.prototype._callOnPromiseDone = function(e, t, n) {
var i = this;
return e ? e.then(function() {
return t.call(i, n);
}) : t.call(this, n);
}, n.prototype._showBackdrop = function() {
return this.backdrop.backgroundShown ? void 0 : (this.backdrop = e("<div/>", {
"class": "tour-backdrop"
}), this.backdrop.backgroundShown = !0, e("body").append(this.backdrop));
}, n.prototype._hideBackdrop = function() {
return this._hideOverlayElement(), this._hideBackground();
}, n.prototype._hideBackground = function() {
return this.backdrop.remove(), this.backdrop.overlay = null, this.backdrop.backgroundShown = !1;
}, n.prototype._showOverlayElement = function(t) {
var n, i, r;
return this.backdrop.overlayElementShown ? void 0 : (this.backdrop.overlayElementShown = !0,
i = e(t), n = e("<div/>"), r = i.offset(), r.top = r.top, r.left = r.left, n.width(i.innerWidth()).height(i.innerHeight()).addClass("tour-step-background").offset(r),
i.addClass("tour-step-backdrop"), e("body").append(n), this.backdrop.$element = i,
this.backdrop.$background = n);
}, n.prototype._hideOverlayElement = function() {
return this.backdrop.overlayElementShown ? (this.backdrop.$element.removeClass("tour-step-backdrop"),
this.backdrop.$background.remove(), this.backdrop.$element = null, this.backdrop.$background = null,
this.backdrop.overlayElementShown = !1) : void 0;
}, n.prototype._clearTimer = function() {
return t.clearTimeout(this._timer), this._timer = null, this._duration = null;
}, n;
}(), t.Tour = n;
}(jQuery, window), define("bootstrap-tour", [ "bootstrap" ], function(e) {
return function() {
return e.Tour;
};
}(this)), define("extensions/welcomeTour", [ "underscore", "jquery", "storage", "classes/Extension", "bootstrap-tour" ], function(e, t, n, i, r) {
var o, a = new i("welcomeTour", "Welcome tour", !1, !0);
return a.onEventMgrCreated = function(e) {
o = e;
}, a.onReady = function() {
function i(e, n, i) {
var r = t(e).tooltip({
html: !0,
placement: i,
trigger: "manual",
title: n
}).tooltip("show").addClass("info-tooltip");
r.parent().addClass("info-tooltip-container"), r.one("click", function() {
r.tooltip("hide").removeClass("info-tooltip").parent().removeClass("info-tooltip-container");
}), setTimeout(function() {
r.tooltip("hide").removeClass("info-tooltip").parent().removeClass("info-tooltip-container");
}, 3e4);
}
var a = new r({
keyboard: !1,
storage: {
getItem: function() {},
setItem: function() {},
removeItem: function() {}
},
onEnd: function() {
n.welcomeTour_1 = "done", i(".drag-me", "Drag me!", "left"), i(".layout-toggler-preview", "Toggle preview", "right");
},
template: [ '<div class="popover tour">', ' <div class="arrow"></div>', ' <h3 class="popover-title"></h3>', ' <div class="popover-content"></div>', ' <nav class="popover-navigation">', ' <button class="btn btn-primary" data-role="next">Next</button>', ' <button class="btn btn-default" data-role="end">Got it!</button>', " </nav>", "</div>" ].join("")
});
a.addSteps([ {
element: ".navbar-inner",
title: "StackEdit 5 is coming...",
content: [ '<p>A new version of StackEdit is on its way and <a href="app" target="_blank">you can try it here</a>!</p>', "<p>It's still in beta. Some of the features may not be available just yet.</p>", "You can always click <b>Next</b> to go through the StackEdit 4 tour." ].join(""),
placement: "bottom"
}, {
element: ".document-panel .toggle-button",
title: "Documents",
content: [ '<p>The <i class="icon-folder-open"></i> <b>document panel</b> allows you to manage your local documents.</p>', "<b>Tip:</b> Use <kbd>Ctrl+[</kbd> and <kbd>Ctrl+]</kbd> to toggle documents." ].join(""),
placement: "left",
reflex: !0
}, {
element: ".menu-panel .toggle-button",
title: "Menu",
content: [ '<p>The <i class="icon-provider-stackedit"></i> <b>menu panel</b> allows you to synchronize your documents on <i class="icon-provider-gdrive"></i> Google Drive, <i class="icon-provider-dropbox"></i> Dropbox or to publish them on <i class="icon-provider-github"></i> GitHub, <i class="icon-provider-blogger"></i> Blogger...</p>', '<b>Tip:</b> Use the <i class="icon-provider-stackedit"></i> <b>menu panel</b> to access the settings.' ].join(""),
placement: "right",
reflex: !0
}, {
element: ".navbar-inner > .nav .button-open-discussion, .navbar .buttons-dropdown > .nav > .btn:not(:hidden)",
title: "Comments/discussions",
content: [ '<p>New in StackEdit 4: the <i class="icon-comment-alt"></i> <b>comments</b> button lets you create inline discussions!</p>', "<b>Tip:</b> Reopen the Hello! document from Settings>Utils to discover other new features." ].join(""),
placement: "right",
reflex: !0
}, {
element: ".navbar-inner",
title: "Happy StackWriting!",
content: [ '<p>Enjoy, and don\'t forget to rate 5 stars on the <a target="_blank" href="https://chrome.google.com/webstore/detail/stackedit/iiooodelglhkcpgbajoejffhijaclcdg/reviews">Chrome Web Store</a>...</p>', '<a href="https://twitter.com/share" class="twitter-share-button" data-url="https://stackedit.io" data-text="Great #markdown editor!" data-via="stackedit" data-size="large"></a>' ].join(""),
placement: "bottom",
onShown: function() {
o.onTweet();
}
} ]), e.has(n, "welcomeTour_1") || a.start(), t(".action-welcome-tour").click(function() {
a.restart();
});
}, a;
}), define("text!extensions/shortcutsDefaultMapping.settings", [], function() {
return "{\n 'mod+b': bindPagedownButton('bold'),\n 'mod+i': bindPagedownButton('italic'),\n 'mod+l': bindPagedownButton('link'),\n 'mod+q': bindPagedownButton('quote'),\n 'mod+k': bindPagedownButton('code'),\n 'mod+g': bindPagedownButton('image'),\n 'mod+o': bindPagedownButton('olist'),\n 'mod+u': bindPagedownButton('ulist'),\n 'mod+h': bindPagedownButton('heading'),\n 'mod+r': bindPagedownButton('hr'),\n 'mod+z': bindPagedownButton('undo'),\n 'mod+y': bindPagedownButton('redo'),\n 'mod+shift+z': bindPagedownButton('redo'),\n 'mod+m': function(evt) {\n $('.button-open-discussion').click();\n evt.preventDefault();\n },\n '= = > space': function() {\n expand('==> ', '\u21d2 ');\n },\n '< = = space': function() {\n expand('<== ', '\u21d0 ');\n },\n 'S t a c k E d i t': function() {\n eventMgr.onMessage(\"You are stunned!!! Aren't you?\");\n }\n}\n";
}), define("text!html/shortcutsSettingsBlock.html", [], function() {
return '<p>Maps keyboard shortcuts to JavaScript functions.</p>\n<div class="form-horizontal">\n <div class="form-group">\n <label class="col-sm-3 control-label" for="textarea-shortcuts-mapping">Mapping\n <a href="#" class="tooltip-shortcuts-extension">(?)</a>\n </label>\n <div class="col-sm-8">\n <textarea id="textarea-shortcuts-mapping" class="form-control"></textarea>\n </div>\n </div>\n</div>\n';
}), define("text!html/tooltipSettingsShortcutsExtension.html", [], function() {
return 'You can create expanding macros like this:\n<br />\n<br />\n\'- - > space\': function() {\n<br />\n expand(\'--> \', \'\u2192 \');\n<br />\n}\n<br />\n<br />\n<a target="_blank"\n href="http://craig.is/killing/mice">More\n info</a>\n<br />\n<br />\n<b class="text-danger"><i class="icon-attention"></i> Careful! This is subject to malicious code. Don\'t copy/paste untrusted content.</b>\n';
}), define("extensions/shortcuts", [ "jquery", "underscore", "utils", "mousetrap", "classes/Extension", "text!extensions/shortcutsDefaultMapping.settings", "text!html/shortcutsSettingsBlock.html", "text!html/tooltipSettingsShortcutsExtension.html" ], function($, _, utils, mousetrap, Extension, shortcutsDefaultMapping, shortcutsSettingsBlockHTML, tooltipSettingsShortcutsExtensionHTML) {
function bindPagedownButton(e) {
return function(t) {
pagedownEditor.uiManager.doClick(pagedownEditor.uiManager.buttons[e]), t.preventDefault();
};
}
function expand(e, t) {
utils.defer(function() {
require("editor").replacePreviousText(e, t);
});
}
var shortcuts = new Extension("shortcuts", "Shortcuts", !0, !0);
shortcuts.settingsBlock = shortcutsSettingsBlockHTML, shortcuts.defaultConfig = {
mapping: shortcutsDefaultMapping
};
var eventMgr, pagedownEditor;
return shortcuts.onEventMgrCreated = function(e) {
eventMgr = e, eventMgr.addListener("onPagedownConfigure", function(e) {
pagedownEditor = e;
});
}, shortcuts.onLoadSettings = function() {
utils.setInputValue("#textarea-shortcuts-mapping", shortcuts.config.mapping);
}, shortcuts.onSaveSettings = function(newConfig, event) {
newConfig.code = utils.getInputValue("#textarea-shortcuts-mapping");
try {
eval("var test = " + newConfig.code);
} catch (t) {
eventMgr.onError(t), utils.getInputTextValue("#textarea-shortcuts-mapping", event, /^$/);
}
}, shortcuts.onInit = function() {
try {
var shortcutMap;
eval("shortcutMap = " + shortcuts.config.mapping), _.each(shortcutMap, function(e, t) {
mousetrap.bind(t, e);
});
} catch (t) {
console.error(t);
}
}, shortcuts.onReady = function() {
utils.createTooltip(".tooltip-shortcuts-extension", tooltipSettingsShortcutsExtensionHTML);
}, shortcuts;
}), define("text!html/userCustomSettingsBlock.html", [], function() {
return '<p>Allows users to implement their own extension.</p>\n<div class="form-horizontal">\n <div class="form-group">\n <label class="col-sm-4 control-label" for="textarea-usercustom-code">JavaScript code\n <a href="#" class="tooltip-usercustom-extension">(?)</a>\n </label>\n <div class="col-sm-7">\n <textarea id="textarea-usercustom-code" class="form-control"></textarea>\n </div>\n </div>\n</div>\n<span class="help-block pull-right"><a target="_blank" href="https://github.com/benweet/stackedit/blob/master/doc/developer-guide.md#developer-guide">More info</a></span>';
}), define("text!html/tooltipUserCustomExtension.html", [], function() {
return 'Extension variable name:\n<b>userCustom</b>\n<br>\n<br>\n<b>Example:</b>\n<br />\nuserCustom.onPreviewFinished = function() {\n<br />\n&nbsp;&nbsp;eventMgr.onMessage(&quot;Finished!&quot;);\n<br />\n};\n<br />\n<br />\n<a target="_blank"\n href="https://github.com/benweet/stackedit/blob/master/doc/developer-guide.md#architecture">More\n info</a>\n<br />\n<br />\n<b class="text-danger"><i class="icon-attention"></i> Careful! This is subject to malicious code. Don\'t copy/paste untrusted content.</b>';
}), define("extensions/userCustom", [ "jquery", "underscore", "utils", "classes/Extension", "fileSystem", "settings", "text!html/userCustomSettingsBlock.html", "text!html/tooltipUserCustomExtension.html" ], function($, _, utils, Extension, fileSystem, settings, userCustomSettingsBlockHTML, tooltipUserCustomExtensionHTML) {
var userCustom = new Extension("userCustom", "UserCustom extension", !0);
userCustom.settingsBlock = userCustomSettingsBlockHTML, userCustom.defaultConfig = {
code: ""
};
var fileMgr;
userCustom.onFileMgrCreated = function(e) {
fileMgr = e;
};
var synchronizer;
userCustom.onSynchronizerCreated = function(e) {
synchronizer = e;
};
var publisher;
userCustom.onPublisherCreated = function(e) {
publisher = e;
};
var eventMgr;
return userCustom.onEventMgrCreated = function(e) {
eventMgr = e, eventMgr.addListener("onReady", function() {
utils.createTooltip(".tooltip-usercustom-extension", tooltipUserCustomExtensionHTML);
});
}, userCustom.onLoadSettings = function() {
utils.setInputValue("#textarea-usercustom-code", userCustom.config.code);
}, userCustom.onSaveSettings = function(newConfig, event) {
newConfig.code = utils.getInputValue("#textarea-usercustom-code");
try {
eval(newConfig.code);
} catch (t) {
eventMgr.onError(t), utils.getInputTextValue("#textarea-usercustom-code", event, /^$/);
}
}, userCustom.onInit = function() {
try {
eval(userCustom.config.code);
} catch (t) {
console.error(t);
}
}, userCustom;
}), define("text!html/commentsPopoverContent.html", [], function() {
return '<div class="scrollport">\n <div class="discussion-comment-list"><%= commentList %></div>\n <div class="new-comment-block">\n <div class="form-group">\n <i class="icon-comment"></i> <input class="form-control input-comment-author" placeholder="Your name here!"></input>\n <textarea class="form-control input-comment-content"></textarea>\n </div>\n <div class="form-group text-right">\n <button class="btn btn-primary action-add-comment">Add</button>\n </div>\n </div>\n</div>\n<hr/>\n';
}), define("extensions/comments", [ "jquery", "underscore", "utils", "storage", "crel", "rangy", "classes/Extension", "text!html/commentsPopoverContent.html", "bootstrap" ], function(e, t, n, i, r, o, a, s) {
function l(e, t, n) {
t = Math.round(t);
for (var i = t - 21; t + 22 > i; ) S[i] && (t = i + 22), i++;
!n && (S[t] = 1);
var r = -8;
-1 !== e.className.indexOf(" icon-split") && (r = -12);
var o = t + r;
e.style.top = o + "px", e.style.right = "12px";
}
function c(t, n) {
this.commentElt = t, this.$commentElt = e(t).addClass("active"), this.fileDesc = n,
this.discussionIndex = t.discussionIndex;
}
function u(e) {
var t = _.getPopoverElt(), n = 0;
t.offsetWidth < x.offsetWidth - 10 && (n = x.offsetWidth - 10 - t.offsetWidth),
t.style.left = n + "px", t.querySelector(".arrow").style.left = x.offsetWidth - parseInt(e.style.right) - e.offsetWidth / 2 - n + "px";
var i = window.innerHeight - _.hr.getBoundingClientRect().top;
0 > i && (t.style.top = parseInt(t.style.top) + i + "px");
}
function d() {
_ && _.$commentElt.popover("toggle").popover("destroy");
}
function p() {
var e = _.getDiscussion(), n = i["author.name"], r = [];
return e.commentList && (r = e.commentList.map(function(e) {
var i = e.author || "Anonymous";
return t.template(m, {
author: i,
content: e.content,
reply: e.author != n
});
})), "conflict" == e.type && r.unshift(t.template(m, {
author: "StackEdit",
content: "Conflicting changes have been detected.",
reply: !0
})), r.join("");
}
var h, f = new a("comments", "Comments", !1, !0), m = [ "<div class=\"comment-block<%= reply ? ' reply' : '' %>\">", ' <div class="comment-author"><i class="icon-comment"></i> <%= author %></div>', ' <div class="comment-content"><%= content %></div>', "</div>" ].join(""), g = [ '<span class="clearfix">', ' <a href="#" class="action-remove-discussion pull-right">', ' <i class="icon-trash"></i>', " </a>", " \u201c<%- title %>\u201d", "</span>" ].join("");
f.onEventMgrCreated = function(e) {
h = e;
};
var v, b;
f.onEditorCreated = function(e) {
v = e, b = v.selectionMgr;
};
var y, x, w, S = [], C = r("a", {
"class": "discussion icon-comment new"
});
c.prototype.getDiscussion = function() {
return this.discussionIndex ? this.fileDesc.discussionList[this.discussionIndex] : this.fileDesc.newDiscussion;
}, c.prototype.getPopoverElt = function() {
return document.querySelector(".comments-popover .popover:last-child");
};
var _, k, E, T, I, D, N = {}, M = [], L = !1, A = t.debounce(function() {
function e() {
var i;
if (0 === o.length) return t.filter(N, function(e, n) {
return !t.has(E.discussionList, n);
}).forEach(function(e) {
x.removeChild(e), delete N[e.discussionIndex];
}), l(C, w, !0), _ && !_.discussionIndex && (y.scrollTop += parseInt(C.style.top) - y.scrollTop - 3 * y.offsetHeight / 4,
u(C)), M = t.sortBy(N, function(e) {
return e.selectionEnd;
}), I.toggleClass("some", 0 !== M.length), I.toggleClass("replied", L), void D.toggleClass("icon-chat", 0 !== M.length);
var a = o.shift(), s = N[a.discussionIndex];
s || (s = r("a"));
var c = "discussion", d = !a.commentList || !n || t.last(a.commentList).author != n;
d && (L = !0), c += "conflict" == a.type ? " icon-split" : " icon-comment", c += d ? " replied" : " added",
s.className = c, s.discussionIndex = a.discussionIndex, s.selectionEnd = a.selectionEnd,
i = b.getCoordinates(a.selectionEnd), l(s, i.y), x.appendChild(s), N[a.discussionIndex] = s,
_ && _.getDiscussion() === a && (y.scrollTop += parseInt(s.style.top) - y.scrollTop - 3 * y.offsetHeight / 4,
u(s)), T = setTimeout(e, 5);
}
if (void 0 !== E) {
L = !1, M = [];
var n = i["author.name"];
S = [];
var o = t.sortBy(E.discussionList, function(e) {
return e.selectionEnd;
});
clearTimeout(T), T = setTimeout(e, 5);
}
}, 50);
return f.onLayoutResize = A, f.onFileOpen = function(e) {
E = e, A();
}, f.onContentChanged = function(e) {
E === e && A();
}, f.onCursorCoordinates = function(e, t) {
w = t, l(C, t, !0);
}, f.onCommentsChanged = function(e) {
if (E === e) {
if (void 0 !== _) {
var t = _;
t.discussionIndex && (t.getPopoverElt().querySelector(".discussion-comment-list").innerHTML = p());
try {
k.undoToRange(t.rangyRange);
} catch (e) {}
var n = t.getDiscussion();
t.selectionRange = b.createRange(n.selectionStart, n.selectionEnd), t.rangyRange = o.createRange(),
t.rangyRange.setStart(t.selectionRange.startContainer, t.selectionRange.startOffset),
t.rangyRange.setEnd(t.selectionRange.endContainer, t.selectionRange.endOffset),
setTimeout(function() {
_ === t && k.applyToRange(t.rangyRange);
}, 50);
}
A();
}
}, f.onEditorPopover = function() {
d();
}, f.onDiscussionCreated = function(e) {
E === e && A();
}, f.onDiscussionRemoved = function(e, t) {
E === e && (void 0 !== _ && _.discussionIndex == t.discussionIndex && d(), A());
}, f.onReady = function() {
k = o.createCssClassApplier("comment-highlight", {
normalize: !1
});
var a = "";
y = document.getElementById("wmd-input"), x = document.querySelector("#wmd-input > .editor-margin"),
x.appendChild(C);
var l = e(r("div", {
"class": "comments-popover"
}));
e(document.body).append(l).on("click", function(e) {
_ && _.$commentElt[0] !== e.target && d();
}).popover({
placement: "auto top",
container: ".comments-popover",
html: !0,
title: function() {
if (!_) return !0;
var e = _.getDiscussion(), n = e.selectionEnd - e.selectionStart, i = v.getValue().substr(e.selectionStart, n > 20 ? 20 : n);
return n > 20 && (i += "..."), t.template(g, {
title: i
});
},
content: function() {
return t.template(s, {
commentList: p()
});
},
selector: "#wmd-input > .editor-margin > .discussion"
}), e(x).on("show.bs.popover", function(e) {
h.onEditorPopover();
var t = new c(e.target, E);
_ = t;
var n = t.getDiscussion();
if (!n) {
var i = Math.min(b.selectionStart, b.selectionEnd), r = Math.max(b.selectionStart, b.selectionEnd);
if (i === r) {
var o = b.getClosestWordOffset(i);
i = o.start, r = o.end;
}
n = {
selectionStart: i,
selectionEnd: r,
commentList: []
}, E.newDiscussion = n;
}
t.selectionRange = b.createRange(n.selectionStart, n.selectionEnd), y.scrollTop += parseInt(e.target.style.top) - y.scrollTop - 3 * y.offsetHeight / 4;
}).on("shown.bs.popover", function(r) {
var s = _, l = s.getPopoverElt();
s.$authorInputElt = e(l.querySelector(".input-comment-author")).val(i["author.name"]),
s.$contentInputElt = e(l.querySelector(".input-comment-content")), s.hr = l.querySelector("hr"),
u(s.commentElt), l.querySelector(".scrollport").scrollTop = 9999999;
var c = e(l.querySelector(".action-add-comment"));
e().add(s.$contentInputElt).add(s.$authorInputElt).keydown(function(e) {
13 === e.which && (e.preventDefault(), c.click());
}), c.click(function(e) {
var i = n.getInputTextValue(s.$authorInputElt), r = n.getInputTextValue(s.$contentInputElt, e);
if (!e.isPropagationStopped()) {
var o = s.getDiscussion();
s.$contentInputElt.val(""), d(), o.commentList = o.commentList || [], o.commentList.push({
author: i,
content: r
});
var a = s.fileDesc.discussionList || {};
if (o.discussionIndex) s.fileDesc.discussionList = a, h.onCommentsChanged(s.fileDesc); else {
var l;
do l = n.id(); while (t.has(a, l));
o.discussionIndex = l, a[l] = o, s.fileDesc.discussionList = a, h.onDiscussionCreated(s.fileDesc, o);
}
y.focus();
}
});
var p = e(l.querySelector(".action-remove-discussion"));
r.target.discussionIndex ? p.click(function() {
d();
var e = s.getDiscussion();
delete s.fileDesc.discussionList[e.discussionIndex], s.fileDesc.discussionList = s.fileDesc.discussionList,
h.onDiscussionRemoved(s.fileDesc, e), y.focus();
}) : p.hide(), s.rangyRange = o.createRange(), s.rangyRange.setStart(s.selectionRange.startContainer, s.selectionRange.startOffset),
s.rangyRange.setEnd(s.selectionRange.endContainer, s.selectionRange.endOffset),
setTimeout(function() {
_ === s && k.applyToRange(s.rangyRange);
}, 50), s.$contentInputElt.focus().val(a);
}).on("hide.bs.popover", function() {
if (_) {
_.$commentElt.removeClass("active"), a = _.$contentInputElt.val(), i["author.name"] = _.$authorInputElt.val();
try {
k.undoToRange(_.rangyRange);
} catch (e) {}
_ = void 0, delete E.newDiscussion;
}
}), l.on("click", ".popover", function(e) {
e.stopPropagation();
});
var f = e(C);
I = e(".button-open-discussion").click(function(n) {
var i = f;
if (_) if (_.discussionIndex) {
var r = -1;
M.some(function(e, t) {
return e === _.commentElt ? (r = t, !0) : void 0;
}), i = e(M[r + 1]);
} else i = e(t.first(M)); else b.selectionStart === b.selectionEnd && M.length && (i = e(t.first(M)));
0 === i.length ? (d(), v.focus(), v.adjustCursorPosition(!0)) : i.click(), n.stopPropagation();
}), D = I.find("i");
}, f;
}), define("text!html/findReplace.html", [], function() {
return '<button type="button" class="close button-find-replace-dismiss">\xd7</button>\n<div class="form-inline">\n <div class="form-group">\n <label for="input-find-replace-search-for">Search for</label>\n <input class="form-control" id="input-find-replace-search-for" placeholder="Search for">\n </div>\n <div class="form-group">\n <label for="input-find-replace-replace-with">Replace with</label>\n <input class="form-control" id="input-find-replace-replace-with" placeholder="Replace with">\n </div>\n</div>\n<div class="pull-right">\n <div class="help-block text-right">\n <span class="found-counter">0</span> found\n </div>\n <div>\n <button type="button" class="btn btn-primary search-button">Search</button>\n <button type="button" class="btn btn-default replace-button">Replace</button>\n <button type="button" class="btn btn-default replace-all-button">All</button>\n </div>\n</div>\n<div class="pull-left">\n <div class="checkbox">\n <label>\n <input type="checkbox" class="checkbox-case-sensitive"> Case sensitive\n </label>\n </div>\n <div class="checkbox">\n <label>\n <input type="checkbox" class="checkbox-regexp"> Regular expression\n </label>\n </div>\n</div>\n';
}), define("text!html/findReplaceSettingsBlock.html", [], function() {
return '<p>Helps find and replace text in the current document.</p>\n<div class="form-horizontal">\n <div class="form-group">\n <label class="col-sm-5 control-label"\n for="input-find-replace-shortcut">Shortcut <a href="http://craig.is/killing/mice#keys" target="_blank">(?)</a></label>\n <div class="col-sm-6">\n <input type="text" id="input-find-replace-shortcut"\n class="form-control">\n </div>\n </div>\n</div>';
}), define("extensions/findReplace", [ "jquery", "underscore", "crel", "utils", "classes/Extension", "mousetrap", "rangy", "text!html/findReplace.html", "text!html/findReplaceSettingsBlock.html" ], function(e, t, n, i, r, o, a, s, l) {
function c() {
u(), M.forEach(function(e) {
try {
x.undoToRange(e);
} catch (e) {}
}), M = [];
}
function u() {
if (S) {
try {
S && w.undoToRange(S);
} catch (e) {}
S = void 0;
}
}
function d(e) {
function t(e) {
return e.container === s.container ? {
container: o.endContainer.parentElement.nextSibling,
offsetInContainer: e.offsetInContainer - s.offsetInContainer,
offset: e.offset
} : e;
}
if (O) {
var n = k.val(), i = I.prop("checked"), r = D.prop("checked");
if (e || n != A || i != R || r != P) {
A = n, R = i, P = r, c();
var o, s = {};
L = [];
var l = 0;
if (n.length) try {
var u = i ? "gm" : "gmi";
if (n = r ? n : n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"), N = new RegExp(n, u),
b.getValue().replace(N, function(e, t) {
L.push({
start: t,
end: t + e.length
});
}), l = L.length, L.length < 200) {
var d = [];
L.forEach(function(e) {
d.push(e.start), d.push(e.end);
}), d = b.selectionMgr.findOffsets(d);
for (var p = 0; p < d.length; p += 2) {
var h = d[p], f = d[p + 1], m = t(h), g = t(f), v = a.createRange();
v.setStart(m.container, m.offsetInContainer), v.setEnd(g.container, g.offsetInContainer),
s = f, o = v, x.applyToRange(v), M[h.offset] = v;
}
b.selectionMgr.hasFocus && b.selectionMgr.updateSelectionRange();
}
} catch (e) {}
T.innerHTML = l;
}
}
}
function p() {
y.onEditorPopover(), O = !0, _.show(), k.focus()[0].setSelectionRange(0, k.val().length),
b.selectionMgr.adjustTop = 50, b.selectionMgr.adjustBottom = 220, d(!0);
}
function h() {
O = !1, _.hide(), c(), b.selectionMgr.adjustTop = 0, b.selectionMgr.adjustBottom = 0,
b.focus();
}
function f() {
u();
var e = Math.min(b.selectionMgr.selectionStart, b.selectionMgr.selectionEnd), n = t.find(L, function(t) {
return t.start > e;
});
if (n || (n = t.first(L)), n) {
if (!(S = M[n.start])) {
var i = b.selectionMgr.createRange(n.start, n.end);
S = a.createRange(), S.setStart(i.startContainer, i.startOffset), S.setEnd(i.endContainer, i.endOffset);
}
w.applyToRange(S), S.start = n.start, S.end = n.end, b.selectionMgr.setSelectionStartEnd(n.start, n.end),
b.selectionMgr.updateCursorCoordinates(!0);
}
}
function m() {
if (!S) return f();
var e = E.val();
b.replace(S.start, S.end, e), setTimeout(function() {
f(), E.focus();
}, 1);
}
function g() {
var e = E.val();
b.replaceAll(N, e);
}
var v = new r("findReplace", "Find and Replace", !0, !0);
v.settingsBlock = l, v.defaultConfig = {
findReplaceShortcut: "mod+f"
}, v.onLoadSettings = function() {
i.setInputValue("#input-find-replace-shortcut", v.config.findReplaceShortcut);
}, v.onSaveSettings = function(e, t) {
e.findReplaceShortcut = i.getInputTextValue("#input-find-replace-shortcut", t);
};
var b;
v.onEditorCreated = function(e) {
b = e;
};
var y;
v.onEventMgrCreated = function(e) {
y = e;
};
var x, w, S, C, _, k, E, T, I, D, N, M = [], L = [], A = "", R = !1, P = !1, O = !1;
return v.onEditorPopover = function() {
h();
}, v.onContentChanged = t.bind(d, null, !0), v.onFileOpen = t.bind(d, null, !0),
v.onReady = function() {
x = a.createCssClassApplier("find-replace-highlight", {
normalize: !1
}), w = a.createCssClassApplier("find-replace-select", {
normalize: !1
}), C = document.querySelector("#wmd-input .editor-content");
var i = n("div", {
"class": "find-replace"
});
_ = e(i).hide(), i.innerHTML = s, document.querySelector(".layout-wrapper-l2").appendChild(i),
e(".button-find-replace-dismiss").click(function() {
h();
}), T = i.querySelector(".found-counter"), I = _.find(".checkbox-case-sensitive").change(t.bind(d, null, !1)),
D = _.find(".checkbox-regexp").change(t.bind(d, null, !1)), _.find(".search-button").click(f),
k = e("#input-find-replace-search-for").keyup(t.bind(d, null, !1)), _.find(".replace-button").click(m),
E = e("#input-find-replace-replace-with"), _.find(".replace-all-button").click(g),
e().add(k).add(E).keydown(function(e) {
13 === e.which && (e.preventDefault(), f());
}), o.bind(v.config.findReplaceShortcut, function(e) {
var t = b.selectionMgr.getSelectedText();
t && k.val(t), p(), e.preventDefault();
});
}, v;
}), define("text!html/htmlSanitizerSettingsBlock.html", [], function() {
return '<p>Prevents cross-site-scripting attacks (XSS).</p>\n<p class="alert alert-danger"><i class="icon-attention"></i> <b>Careful:</b> Disable at your own risk!</p>\n';
}), define("extensions/htmlSanitizer", [ "jquery", "underscore", "utils", "logger", "classes/Extension", "text!html/htmlSanitizerSettingsBlock.html" ], function(e, t, n, i, r, o) {
function a(e, t) {
var i, r = t ? m : f;
return "" === (i = n.urlResolve(e).href) || i.match(r) ? void 0 : "unsafe:" + i;
}
function s(e) {
var t, n = {}, i = e.split(",");
for (t = 0; t < i.length; t++) n[i[t]] = !0;
return n;
}
function l(e, t) {
function n(e, n, r, o) {
if (n = n && n.toLowerCase(), D[n]) for (;s.last() && N[s.last()]; ) i("", s.last());
I[n] && s.last() == n && i("", n), (o = k[n] || !!o) || s.push(n);
var a = {};
r.replace(b, function(e, t, n, i, r) {
var o = n || i || r || "";
a[t] = c(o);
}), t.start && t.start(n, a, o);
}
function i(e, n) {
var i, r = 0;
if (n = n && n.toLowerCase()) for (r = s.length - 1; r >= 0 && s[r] != n; r--) ;
if (r >= 0) {
for (i = s.length - 1; i >= r; i--) t.end && t.end(s[i]);
s.length = r;
}
}
var r, o, a, s = [], l = e;
for (s.last = function() {
return s[s.length - 1];
}; e; ) {
if (o = !0, s.last() && M[s.last()]) e = e.replace(new RegExp("(.*)<\\s*\\/\\s*" + s.last() + "[^>]*>", "i"), function(e, n) {
return n = n.replace(w, "$1").replace(C, "$1"), t.chars && t.chars(c(n)), "";
}), i("", s.last()); else if (0 === e.indexOf("<!--") ? (r = e.indexOf("--", 4)) >= 0 && e.lastIndexOf("-->", r) === r && (t.comment && t.comment(e.substring(4, r)),
e = e.substring(r + 3), o = !1) : S.test(e) ? (a = e.match(S)) && (e = e.replace(a[0], ""),
o = !1) : x.test(e) ? (a = e.match(v)) && (e = e.substring(a[0].length), a[0].replace(v, i),
o = !1) : y.test(e) && (a = e.match(g)) && (e = e.substring(a[0].length), a[0].replace(g, n),
o = !1), o) {
r = e.indexOf("<");
var u = 0 > r ? e : e.substring(0, r);
e = 0 > r ? "" : e.substring(r), t.chars && t.chars(c(u));
}
if (e == l) return s.reverse(), s.forEach(function(e) {
h.push("</"), h.push(e), h.push(">");
});
l = e;
}
i();
}
function c(e) {
if (!e) return "";
var t = O.exec(e), n = t[1], i = t[3], r = t[2];
return r && (P.innerHTML = r.replace(/</g, "&lt;"), r = "textContent" in P ? P.textContent : P.innerText),
n + r + i;
}
function u(e) {
return e.replace(/&/g, "&amp;").replace(_, function(e) {
return "&#" + e.charCodeAt(0) + ";";
}).replace(/</g, "&lt;").replace(/>/g, "&gt;");
}
function d(e, n) {
var i = !1, r = t.bind(e.push, e);
return {
start: function(e, o, a) {
e = e && e.toLowerCase(), !i && M[e] && (i = e), i || !0 !== L[e] || (r("<"), r(e),
t.forEach(o, function(t, i) {
var o = i && i.toLowerCase(), a = "img" === e && "src" === o || "background" === o;
!0 !== R[o] || !0 === A[o] && !n(t, a) || (r(" "), r(i), r('="'), r(u(t)), r('"'));
}), r(a ? "/>" : ">"));
},
end: function(e) {
e = e && e.toLowerCase(), i || !0 !== L[e] || (r("</"), r(e), r(">")), e == i && (i = !1);
},
chars: function(e) {
i || r(u(e));
},
comment: function(e) {
i || (r("<!--"), r(u(e)), r("-->"));
}
};
}
var p = new r("htmlSanitizer", "HTML Sanitizer", !0);
p.settingsBlock = o;
var h;
p.onPagedownConfigure = function(e) {
e.getConverter().hooks.chain("postConversion", function(e) {
return h = [], e.split('<div class="se-preview-section-delimiter"></div>').forEach(function(e) {
l(e, d(h, function(e, t) {
return !/^unsafe/.test(a(e, t));
})), h.push('<div class="se-preview-section-delimiter"></div>');
}), h.slice(0, -1).join("");
});
};
var f = /^\s*(https?|ftp|mailto|tel|file):/, m = /^\s*(https?|ftp|file):|data:image\//, g = /^<\s*([\w:-]+)((?:\s+[\w:-]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)\s*>/, v = /^<\s*\/\s*([\w:-]+)[^>]*>/, b = /([\w:-]+)(?:\s*=\s*(?:(?:"((?:[^"])*)")|(?:'((?:[^'])*)')|([^>\s]+)))?/g, y = /^</, x = /^<\s*\//, w = /<!--(.*?)-->/g, S = /<!DOCTYPE([^>]*?)>/i, C = /<!\[CDATA\[(.*?)]]>/g, _ = /([^\#-~| |!])/g, k = s("area,br,col,hr,img,wbr"), E = s("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"), T = s("rp,rt"), I = t.extend({}, T, E), D = t.extend({}, E, s("address,article,aside,blockquote,caption,center,del,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,map,menu,nav,ol,pre,script,section,table,ul")), N = t.extend({}, T, s("a,abbr,acronym,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,q,ruby,rp,rt,s,samp,small,span,strike,strong,sub,sup,time,tt,u,var")), M = s("script,style");
D.iframe = !0;
var L = t.extend({}, k, D, N, I), A = s("background,cite,href,longdesc,src,usemap"), R = t.extend({}, A, s("abbr,align,alt,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,coords,dir,face,headers,height,hreflang,hspace,ismap,lang,language,nohref,nowrap,rel,rev,rows,rowspan,rules,scope,scrolling,shape,size,span,start,summary,target,title,type,valign,value,vspace,width"));
R.id = !0, R.allowfullscreen = !0;
var P = document.createElement("pre"), O = /^(\s*)([\s\S]*?)(\s*)$/;
return p;
}), function(e) {
e.waitForImages = {
hasImageProperties: [ "backgroundImage", "listStyleImage", "borderImage", "borderCornerImage" ]
}, e.expr[":"].uncached = function(t) {
if (!e(t).is('img[src!=""]')) return !1;
var n = new Image();
return n.src = t.src, !n.complete;
}, e.fn.waitForImages = function(t, n, i) {
var r = 0, o = 0;
if (e.isPlainObject(arguments[0]) && (i = arguments[0].waitForAll, n = arguments[0].each,
t = arguments[0].finished), t = t || e.noop, n = n || e.noop, i = !!i, !e.isFunction(t) || !e.isFunction(n)) throw new TypeError("An invalid callback was supplied.");
return this.each(function() {
var a = e(this), s = [], l = e.waitForImages.hasImageProperties || [], c = /url\(\s*(['"]?)(.*?)\1\s*\)/g;
i ? a.find("*").andSelf().each(function() {
var t = e(this);
t.is("img:uncached") && s.push({
src: t.attr("src"),
element: t[0]
}), e.each(l, function(e, n) {
var i, r = t.css(n);
if (!r) return !0;
for (;i = c.exec(r); ) s.push({
src: i[2],
element: t[0]
});
});
}) : a.find("img:uncached").each(function() {
s.push({
src: this.src,
element: this
});
}), r = s.length, o = 0, 0 === r && t.call(a[0]), e.each(s, function(i, s) {
var l = new Image();
e(l).bind("load.waitForImages error.waitForImages", function(e) {
return o++, n.call(s.element, o, r, "load" == e.type), o == r ? (t.call(a[0]), !1) : void 0;
}), l.src = s.src;
});
});
};
}(jQuery), define("jquery-waitforimages", [ "jquery" ], function() {}), define("eventMgr", [ "jquery", "underscore", "crel", "mousetrap", "utils", "logger", "classes/Extension", "settings", "text!html/settingsExtensionsAccordion.html", "extensions/yamlFrontMatterParser", "extensions/markdownSectionParser", "extensions/partialRendering", "extensions/buttonMarkdownSyntax", "extensions/googleAnalytics", "extensions/twitter", "extensions/dialogAbout", "extensions/dialogManagePublication", "extensions/dialogManageSynchronization", "extensions/dialogManageSharing", "extensions/dialogOpenHarddrive", "extensions/documentTitle", "extensions/documentSelector", "extensions/documentPanel", "extensions/documentManager", "extensions/workingIndicator", "extensions/notifications", "extensions/umlDiagrams", "extensions/markdownExtra", "extensions/toc", "extensions/mathJax", "extensions/emailConverter", "extensions/scrollSync", "extensions/buttonSync", "extensions/buttonPublish", "extensions/buttonStat", "extensions/buttonHtmlCode", "extensions/buttonViewer", "extensions/welcomeTour", "extensions/shortcuts", "extensions/userCustom", "extensions/comments", "extensions/findReplace", "extensions/htmlSanitizer", "bootstrap", "jquery-waitforimages" ], function(e, t, n, i, r, o, a, s, l) {
function c(e) {
return t.chain(h).map(function(t) {
return t.enabled && t[e];
}).compact().value();
}
function u(e) {
return m[e] = c(e), function() {
o.log(e, arguments);
var n = arguments;
t.each(m[e], function(e) {
try {
e.apply(null, n);
} catch (e) {
console.error(t.isObject(e) ? e.stack : e);
}
});
};
}
function d(e) {
p[e] = u(e);
}
var p = {}, h = t.chain(arguments).map(function(e) {
return e instanceof a && e;
}).compact().value(), f = s.extensionSettings || {};
t.each(h, function(e) {
e.config = t.extend({}, e.defaultConfig, f[e.extensionId]), e.enabled = !0 === window.viewerMode && !0 === e.disableInViewer ? !1 : !e.isOptional || void 0 === e.config.enabled || !0 === e.config.enabled;
});
var m = {};
p.addListener = function(e, t) {
try {
m[e].push(t);
} catch (t) {
console.error("No event listener called " + e);
}
}, u("onInit")(), p.onLoadSettings = function() {
o.log("onLoadSettings"), t.each(h, function(e) {
var t = !e.isOptional || void 0 === e.config.enabled || !0 === e.config.enabled;
r.setInputChecked("#input-enable-extension-" + e.extensionId, t), "markdownExtra" == e.extensionId ? r.setInputChecked("#input-settings-markdown-extra", t) : "mathJax" == e.extensionId && r.setInputChecked("#input-settings-mathjax", t);
var n = e.onLoadSettings;
n && n();
});
}, p.onSaveSettings = function(e, n) {
o.log("onSaveSettings"), t.each(h, function(i) {
var o = t.extend({}, i.defaultConfig);
o.enabled = r.getInputChecked("#input-enable-extension-" + i.extensionId);
var a;
"markdownExtra" == i.extensionId ? (a = r.getInputChecked("#input-settings-markdown-extra")) != i.enabled && (o.enabled = a) : "mathJax" == i.extensionId && (a = r.getInputChecked("#input-settings-mathjax")) != i.enabled && (o.enabled = a);
var s = i.onSaveSettings;
s && s(o, n), e[i.extensionId] = o;
});
}, d("onMessage"), d("onError"), d("onOfflineChanged"), d("onUserActive"), d("onAsyncRunning"),
d("onPeriodicRun"), d("onEditorCreated"), d("onFileMgrCreated"), d("onSynchronizerCreated"),
d("onPublisherCreated"), d("onSharingCreated"), d("onEventMgrCreated"), d("onFileCreated"),
d("onFileDeleted"), d("onFileSelected"), d("onFileOpen"), d("onFileClosed"), d("onContentChanged"),
d("onTitleChanged"), d("onFoldersChanged"), d("onSyncRunning"), d("onSyncSuccess"),
d("onSyncImportSuccess"), d("onSyncExportSuccess"), d("onSyncRemoved"), d("onPublishRunning"),
d("onPublishSuccess"), d("onNewPublishSuccess"), d("onPublishRemoved"), d("onLayoutCreated"),
d("onLayoutResize"), d("onExtensionButtonResize"), d("onPagedownConfigure"), d("onSectionsCreated"),
d("onCursorCoordinates"), d("onEditorPopover"), d("onDiscussionCreated"), d("onDiscussionRemoved"),
d("onCommentsChanged"), d("onTweet");
var g, v, b = u("onPreviewFinished"), y = c("onAsyncPreview");
p.onAsyncPreview = function() {
function e(n) {
(n.length ? n.shift() : function() {
setTimeout(function() {
var e = "";
t.each(g.children, function(n) {
if (!n.exportableHtml) {
var i = n.cloneNode(!0);
t.each(i.querySelectorAll(".MathJax_SVG, .MathJax_SVG_Display, .MathJax_Preview"), function(e) {
e.parentNode.removeChild(e);
}), n.exportableHtml = i.innerHTML;
}
e += n.exportableHtml;
});
var n = r.trim(e), i = n.replace(/ <span class="comment label label-danger">.*?<\/span> /g, "");
b(n, i);
}, 10);
})(function() {
e(n);
});
}
o.log("onAsyncPreview"), e(y.concat([ function(e) {
v.waitForImages(e);
} ]));
};
var x = u("onReady");
return p.onReady = function() {
g = document.getElementById("preview-contents"), v = e(g);
var r = function(e) {
var i = n("div", {
"class": "btn-group"
}), r = e();
return t.isString(r) ? i.innerHTML = r : t.isElement(r) && i.appendChild(r), i;
};
if (!1 === window.viewerMode) {
var a = t.chain(h).sortBy(function(e) {
return e.extensionName.toLowerCase();
}).reduce(function(e, n) {
return e + (n.settingsBlock ? t.template(l, {
extensionId: n.extensionId,
extensionName: n.extensionName,
isOptional: n.isOptional,
settingsBlock: n.settingsBlock
}) : "");
}, "").value();
document.querySelector(".accordion-extensions").innerHTML = a, o.log("onCreateButton");
var s = c("onCreateButton"), u = document.createDocumentFragment();
t.each(s, function(e) {
u.appendChild(r(e));
}), document.querySelector(".extension-buttons").appendChild(u);
}
o.log("onCreatePreviewButton");
var d = c("onCreatePreviewButton"), f = document.createDocumentFragment();
t.each(d, function(e) {
f.appendChild(r(e));
}), document.querySelector(".extension-preview-buttons").appendChild(f), i.bind("escape", function() {
p.onEditorPopover();
}), x();
}, p.onEventMgrCreated(p), p;
}), function() {
var e = /\blang(?:uage)?-(?!\*)(\w+)\b/i, t = self.Prism = {
util: {
type: function(e) {
return Object.prototype.toString.call(e).match(/\[object (\w+)\]/)[1];
},
clone: function(e) {
switch (t.util.type(e)) {
case "Object":
var n = {};
for (var i in e) e.hasOwnProperty(i) && (n[i] = t.util.clone(e[i]));
return n;
case "Array":
return e.slice();
}
return e;
}
},
languages: {
extend: function(e, n) {
var i = t.util.clone(t.languages[e]);
for (var r in n) i[r] = n[r];
return i;
},
insertBefore: function(e, n, i, r) {
r = r || t.languages;
var o = r[e], a = {};
for (var s in o) if (o.hasOwnProperty(s)) {
if (s == n) for (var l in i) i.hasOwnProperty(l) && (a[l] = i[l]);
a[s] = o[s];
}
return r[e] = a;
},
DFS: function(e, n) {
for (var i in e) n.call(e, i, e[i]), "Object" === t.util.type(e) && t.languages.DFS(e[i], n);
}
},
highlightAll: function(e, n) {
for (var i, r = document.querySelectorAll('code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'), o = 0; i = r[o++]; ) t.highlightElement(i, !0 === e, n);
},
highlightElement: function(i, r, o) {
for (var a, s, l = i; l && !e.test(l.className); ) l = l.parentNode;
if (l && (a = (l.className.match(e) || [ , "" ])[1], s = t.languages[a]), s) {
i.className = i.className.replace(e, "").replace(/\s+/g, " ") + " language-" + a,
l = i.parentNode, /pre/i.test(l.nodeName) && (l.className = l.className.replace(e, "").replace(/\s+/g, " ") + " language-" + a);
var c = i.textContent;
if (c) {
c = c.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/\u00a0/g, " ");
var u = {
element: i,
language: a,
grammar: s,
code: c
};
if (t.hooks.run("before-highlight", u), r && self.Worker) {
var d = new Worker(t.filename);
d.onmessage = function(e) {
u.highlightedCode = n.stringify(JSON.parse(e.data), a), t.hooks.run("before-insert", u),
u.element.innerHTML = u.highlightedCode, o && o.call(u.element), t.hooks.run("after-highlight", u);
}, d.postMessage(JSON.stringify({
language: u.language,
code: u.code
}));
} else u.highlightedCode = t.highlight(u.code, u.grammar, u.language), t.hooks.run("before-insert", u),
u.element.innerHTML = u.highlightedCode, o && o.call(i), t.hooks.run("after-highlight", u);
}
}
},
highlight: function(e, i, r) {
return n.stringify(t.tokenize(e, i), r);
},
tokenize: function(e, n) {
var i = t.Token, r = [ e ], o = n.rest;
if (o) {
for (var a in o) n[a] = o[a];
delete n.rest;
}
e: for (var a in n) if (n.hasOwnProperty(a) && n[a]) {
var s = n[a], l = s.inside, c = !!s.lookbehind, u = 0;
s = s.pattern || s;
for (var d = 0; d < r.length; d++) {
var p = r[d];
if (r.length > e.length) break e;
if (!(p instanceof i)) {
s.lastIndex = 0;
var h = s.exec(p);
if (h) {
c && (u = h[1].length);
var f = h.index - 1 + u, h = h[0].slice(u), m = h.length, g = f + m, v = p.slice(0, f + 1), b = p.slice(g + 1), y = [ d, 1 ];
v && y.push(v);
var x = new i(a, l ? t.tokenize(h, l) : h);
y.push(x), b && y.push(b), Array.prototype.splice.apply(r, y);
}
}
}
}
return r;
},
hooks: {
all: {},
add: function(e, n) {
var i = t.hooks.all;
i[e] = i[e] || [], i[e].push(n);
},
run: function(e, n) {
var i = t.hooks.all[e];
if (i && i.length) for (var r, o = 0; r = i[o++]; ) r(n);
}
}
}, n = t.Token = function(e, t) {
this.type = e, this.content = t;
};
if (n.stringify = function(e, i, r) {
if ("string" == typeof e) return e;
if ("[object Array]" == Object.prototype.toString.call(e)) return e.map(function(t) {
return n.stringify(t, i, e);
}).join("");
var o = {
type: e.type,
content: n.stringify(e.content, i, r),
tag: "span",
classes: [ "token", e.type ],
attributes: {},
language: i,
parent: r
};
"comment" == o.type && (o.attributes.spellcheck = "true"), t.hooks.run("wrap", o);
var a = "";
for (var s in o.attributes) a += s + '="' + (o.attributes[s] || "") + '"';
return "<" + o.tag + ' class="' + o.classes.join(" ") + '" ' + a + ">" + o.content + "</" + o.tag + ">";
}, !self.document) return void self.addEventListener("message", function(e) {
var n = JSON.parse(e.data), i = n.language, r = n.code;
self.postMessage(JSON.stringify(t.tokenize(r, t.languages[i]))), self.close();
}, !1);
var i = document.getElementsByTagName("script");
(i = i[i.length - 1]) && (t.filename = i.src, document.addEventListener && !i.hasAttribute("data-manual") && document.addEventListener("DOMContentLoaded", t.highlightAll));
}(), define("prism-core", function(e) {
return function() {
return e.Prism;
};
}(this));
var DIFF_DELETE = -1, DIFF_INSERT = 1, DIFF_EQUAL = 0;
diff_match_patch.Diff, diff_match_patch.prototype.diff_main = function(e, t, n, i) {
void 0 === i && (i = this.Diff_Timeout <= 0 ? Number.MAX_VALUE : new Date().getTime() + 1e3 * this.Diff_Timeout);
var r = i;
if (null == e || null == t) throw new Error("Null input. (diff_main)");
if (e == t) return e ? [ [ DIFF_EQUAL, e ] ] : [];
void 0 === n && (n = !0);
var o = n, a = this.diff_commonPrefix(e, t), s = e.substring(0, a);
e = e.substring(a), t = t.substring(a), a = this.diff_commonSuffix(e, t);
var l = e.substring(e.length - a);
e = e.substring(0, e.length - a), t = t.substring(0, t.length - a);
var c = this.diff_compute_(e, t, o, r);
return s && c.unshift([ DIFF_EQUAL, s ]), l && c.push([ DIFF_EQUAL, l ]), this.diff_cleanupMerge(c),
c;
}, diff_match_patch.prototype.diff_compute_ = function(e, t, n, i) {
var r;
if (!e) return [ [ DIFF_INSERT, t ] ];
if (!t) return [ [ DIFF_DELETE, e ] ];
var o = e.length > t.length ? e : t, a = e.length > t.length ? t : e, s = o.indexOf(a);
if (-1 != s) return r = [ [ DIFF_INSERT, o.substring(0, s) ], [ DIFF_EQUAL, a ], [ DIFF_INSERT, o.substring(s + a.length) ] ],
e.length > t.length && (r[0][0] = r[2][0] = DIFF_DELETE), r;
if (1 == a.length) return [ [ DIFF_DELETE, e ], [ DIFF_INSERT, t ] ];
var l = this.diff_halfMatch_(e, t);
if (l) {
var c = l[0], u = l[1], d = l[2], p = l[3], h = l[4], f = this.diff_main(c, d, n, i), m = this.diff_main(u, p, n, i);
return f.concat([ [ DIFF_EQUAL, h ] ], m);
}
return n && e.length > 100 && t.length > 100 ? this.diff_lineMode_(e, t, i) : this.diff_bisect_(e, t, i);
}, diff_match_patch.prototype.diff_lineMode_ = function(e, t, n) {
var i = this.diff_linesToChars_(e, t);
e = i.chars1, t = i.chars2;
var r = i.lineArray, o = this.diff_main(e, t, !1, n);
this.diff_charsToLines_(o, r), this.diff_cleanupSemantic(o), o.push([ DIFF_EQUAL, "" ]);
for (var a = 0, s = 0, l = 0, c = "", u = ""; a < o.length; ) {
switch (o[a][0]) {
case DIFF_INSERT:
l++, u += o[a][1];
break;
case DIFF_DELETE:
s++, c += o[a][1];
break;
case DIFF_EQUAL:
if (s >= 1 && l >= 1) {
o.splice(a - s - l, s + l), a = a - s - l;
for (var i = this.diff_main(c, u, !1, n), d = i.length - 1; d >= 0; d--) o.splice(a, 0, i[d]);
a += i.length;
}
l = 0, s = 0, c = "", u = "";
}
a++;
}
return o.pop(), o;
}, diff_match_patch.prototype.diff_bisect_ = function(e, t, n) {
for (var i = e.length, r = t.length, o = Math.ceil((i + r) / 2), a = o, s = 2 * o, l = new Array(s), c = new Array(s), u = 0; s > u; u++) l[u] = -1,
c[u] = -1;
l[a + 1] = 0, c[a + 1] = 0;
for (var d = i - r, p = d % 2 != 0, h = 0, f = 0, m = 0, g = 0, v = 0; o > v && !(new Date().getTime() > n); v++) {
for (var b = -v + h; v - f >= b; b += 2) {
var y, x = a + b;
y = b == -v || b != v && l[x - 1] < l[x + 1] ? l[x + 1] : l[x - 1] + 1;
for (var w = y - b; i > y && r > w && e.charAt(y) == t.charAt(w); ) y++, w++;
if (l[x] = y, y > i) f += 2; else if (w > r) h += 2; else if (p) {
var S = a + d - b;
if (S >= 0 && s > S && -1 != c[S]) {
var C = i - c[S];
if (y >= C) return this.diff_bisectSplit_(e, t, y, w, n);
}
}
}
for (var _ = -v + m; v - g >= _; _ += 2) {
var C, S = a + _;
C = _ == -v || _ != v && c[S - 1] < c[S + 1] ? c[S + 1] : c[S - 1] + 1;
for (var k = C - _; i > C && r > k && e.charAt(i - C - 1) == t.charAt(r - k - 1); ) C++,
k++;
if (c[S] = C, C > i) g += 2; else if (k > r) m += 2; else if (!p) {
var x = a + d - _;
if (x >= 0 && s > x && -1 != l[x]) {
var y = l[x], w = a + y - x;
if (C = i - C, y >= C) return this.diff_bisectSplit_(e, t, y, w, n);
}
}
}
}
return [ [ DIFF_DELETE, e ], [ DIFF_INSERT, t ] ];
}, diff_match_patch.prototype.diff_bisectSplit_ = function(e, t, n, i, r) {
var o = e.substring(0, n), a = t.substring(0, i), s = e.substring(n), l = t.substring(i), c = this.diff_main(o, a, !1, r), u = this.diff_main(s, l, !1, r);
return c.concat(u);
}, diff_match_patch.prototype.diff_linesToChars_ = function(e, t) {
function n(e) {
for (var t = "", n = 0, o = -1, a = i.length; o < e.length - 1; ) {
o = e.indexOf("\n", n), -1 == o && (o = e.length - 1);
var s = e.substring(n, o + 1);
n = o + 1, (r.hasOwnProperty ? r.hasOwnProperty(s) : void 0 !== r[s]) ? t += String.fromCharCode(r[s]) : (t += String.fromCharCode(a),
r[s] = a, i[a++] = s);
}
return t;
}
var i = [], r = {};
return i[0] = "", {
chars1: n(e),
chars2: n(t),
lineArray: i
};
}, diff_match_patch.prototype.diff_charsToLines_ = function(e, t) {
for (var n = 0; n < e.length; n++) {
for (var i = e[n][1], r = [], o = 0; o < i.length; o++) r[o] = t[i.charCodeAt(o)];
e[n][1] = r.join("");
}
}, diff_match_patch.prototype.diff_commonPrefix = function(e, t) {
if (!e || !t || e.charAt(0) != t.charAt(0)) return 0;
for (var n = 0, i = Math.min(e.length, t.length), r = i, o = 0; r > n; ) e.substring(o, r) == t.substring(o, r) ? (n = r,
o = n) : i = r, r = Math.floor((i - n) / 2 + n);
return r;
}, diff_match_patch.prototype.diff_commonSuffix = function(e, t) {
if (!e || !t || e.charAt(e.length - 1) != t.charAt(t.length - 1)) return 0;
for (var n = 0, i = Math.min(e.length, t.length), r = i, o = 0; r > n; ) e.substring(e.length - r, e.length - o) == t.substring(t.length - r, t.length - o) ? (n = r,
o = n) : i = r, r = Math.floor((i - n) / 2 + n);
return r;
}, diff_match_patch.prototype.diff_commonOverlap_ = function(e, t) {
var n = e.length, i = t.length;
if (0 == n || 0 == i) return 0;
n > i ? e = e.substring(n - i) : i > n && (t = t.substring(0, n));
var r = Math.min(n, i);
if (e == t) return r;
for (var o = 0, a = 1; ;) {
var s = e.substring(r - a), l = t.indexOf(s);
if (-1 == l) return o;
a += l, 0 != l && e.substring(r - a) != t.substring(0, a) || (o = a, a++);
}
}, diff_match_patch.prototype.diff_halfMatch_ = function(e, t) {
function n(e, t, n) {
for (var i, r, o, s, l = e.substring(n, n + Math.floor(e.length / 4)), c = -1, u = ""; -1 != (c = t.indexOf(l, c + 1)); ) {
var d = a.diff_commonPrefix(e.substring(n), t.substring(c)), p = a.diff_commonSuffix(e.substring(0, n), t.substring(0, c));
u.length < p + d && (u = t.substring(c - p, c) + t.substring(c, c + d), i = e.substring(0, n - p),
r = e.substring(n + d), o = t.substring(0, c - p), s = t.substring(c + d));
}
return 2 * u.length >= e.length ? [ i, r, o, s, u ] : null;
}
if (this.Diff_Timeout <= 0) return null;
var i = e.length > t.length ? e : t, r = e.length > t.length ? t : e;
if (i.length < 4 || 2 * r.length < i.length) return null;
var o, a = this, s = n(i, r, Math.ceil(i.length / 4)), l = n(i, r, Math.ceil(i.length / 2));
if (!s && !l) return null;
o = l ? s && s[4].length > l[4].length ? s : l : s;
var c, u, d, p;
return e.length > t.length ? (c = o[0], u = o[1], d = o[2], p = o[3]) : (d = o[0],
p = o[1], c = o[2], u = o[3]), [ c, u, d, p, o[4] ];
}, diff_match_patch.prototype.diff_cleanupSemantic = function(e) {
for (var t = !1, n = [], i = 0, r = null, o = 0, a = 0, s = 0, l = 0, c = 0; o < e.length; ) e[o][0] == DIFF_EQUAL ? (n[i++] = o,
a = l, s = c, l = 0, c = 0, r = e[o][1]) : (e[o][0] == DIFF_INSERT ? l += e[o][1].length : c += e[o][1].length,
r && r.length <= Math.max(a, s) && r.length <= Math.max(l, c) && (e.splice(n[i - 1], 0, [ DIFF_DELETE, r ]),
e[n[i - 1] + 1][0] = DIFF_INSERT, i--, i--, o = i > 0 ? n[i - 1] : -1, a = 0, s = 0,
l = 0, c = 0, r = null, t = !0)), o++;
for (t && this.diff_cleanupMerge(e), this.diff_cleanupSemanticLossless(e), o = 1; o < e.length; ) {
if (e[o - 1][0] == DIFF_DELETE && e[o][0] == DIFF_INSERT) {
var u = e[o - 1][1], d = e[o][1], p = this.diff_commonOverlap_(u, d), h = this.diff_commonOverlap_(d, u);
p >= h ? (p >= u.length / 2 || p >= d.length / 2) && (e.splice(o, 0, [ DIFF_EQUAL, d.substring(0, p) ]),
e[o - 1][1] = u.substring(0, u.length - p), e[o + 1][1] = d.substring(p), o++) : (h >= u.length / 2 || h >= d.length / 2) && (e.splice(o, 0, [ DIFF_EQUAL, u.substring(0, h) ]),
e[o - 1][0] = DIFF_INSERT, e[o - 1][1] = d.substring(0, d.length - h), e[o + 1][0] = DIFF_DELETE,
e[o + 1][1] = u.substring(h), o++), o++;
}
o++;
}
}, diff_match_patch.prototype.diff_cleanupSemanticLossless = function(e) {
function t(e, t) {
if (!e || !t) return 6;
var n = e.charAt(e.length - 1), i = t.charAt(0), r = n.match(diff_match_patch.nonAlphaNumericRegex_), o = i.match(diff_match_patch.nonAlphaNumericRegex_), a = r && n.match(diff_match_patch.whitespaceRegex_), s = o && i.match(diff_match_patch.whitespaceRegex_), l = a && n.match(diff_match_patch.linebreakRegex_), c = s && i.match(diff_match_patch.linebreakRegex_), u = l && e.match(diff_match_patch.blanklineEndRegex_), d = c && t.match(diff_match_patch.blanklineStartRegex_);
return u || d ? 5 : l || c ? 4 : r && !a && s ? 3 : a || s ? 2 : r || o ? 1 : 0;
}
for (var n = 1; n < e.length - 1; ) {
if (e[n - 1][0] == DIFF_EQUAL && e[n + 1][0] == DIFF_EQUAL) {
var i = e[n - 1][1], r = e[n][1], o = e[n + 1][1], a = this.diff_commonSuffix(i, r);
if (a) {
var s = r.substring(r.length - a);
i = i.substring(0, i.length - a), r = s + r.substring(0, r.length - a), o = s + o;
}
for (var l = i, c = r, u = o, d = t(i, r) + t(r, o); r.charAt(0) === o.charAt(0); ) {
i += r.charAt(0), r = r.substring(1) + o.charAt(0), o = o.substring(1);
var p = t(i, r) + t(r, o);
p >= d && (d = p, l = i, c = r, u = o);
}
e[n - 1][1] != l && (l ? e[n - 1][1] = l : (e.splice(n - 1, 1), n--), e[n][1] = c,
u ? e[n + 1][1] = u : (e.splice(n + 1, 1), n--));
}
n++;
}
}, diff_match_patch.nonAlphaNumericRegex_ = /[^a-zA-Z0-9]/, diff_match_patch.whitespaceRegex_ = /\s/,
diff_match_patch.linebreakRegex_ = /[\r\n]/, diff_match_patch.blanklineEndRegex_ = /\n\r?\n$/,
diff_match_patch.blanklineStartRegex_ = /^\r?\n\r?\n/, diff_match_patch.prototype.diff_cleanupEfficiency = function(e) {
for (var t = !1, n = [], i = 0, r = null, o = 0, a = !1, s = !1, l = !1, c = !1; o < e.length; ) e[o][0] == DIFF_EQUAL ? (e[o][1].length < this.Diff_EditCost && (l || c) ? (n[i++] = o,
a = l, s = c, r = e[o][1]) : (i = 0, r = null), l = c = !1) : (e[o][0] == DIFF_DELETE ? c = !0 : l = !0,
r && (a && s && l && c || r.length < this.Diff_EditCost / 2 && a + s + l + c == 3) && (e.splice(n[i - 1], 0, [ DIFF_DELETE, r ]),
e[n[i - 1] + 1][0] = DIFF_INSERT, i--, r = null, a && s ? (l = c = !0, i = 0) : (i--,
o = i > 0 ? n[i - 1] : -1, l = c = !1), t = !0)), o++;
t && this.diff_cleanupMerge(e);
}, diff_match_patch.prototype.diff_cleanupMerge = function(e) {
e.push([ DIFF_EQUAL, "" ]);
for (var t, n = 0, i = 0, r = 0, o = "", a = ""; n < e.length; ) switch (e[n][0]) {
case DIFF_INSERT:
r++, a += e[n][1], n++;
break;
case DIFF_DELETE:
i++, o += e[n][1], n++;
break;
case DIFF_EQUAL:
i + r > 1 ? (0 !== i && 0 !== r && (t = this.diff_commonPrefix(a, o), 0 !== t && (n - i - r > 0 && e[n - i - r - 1][0] == DIFF_EQUAL ? e[n - i - r - 1][1] += a.substring(0, t) : (e.splice(0, 0, [ DIFF_EQUAL, a.substring(0, t) ]),
n++), a = a.substring(t), o = o.substring(t)), 0 !== (t = this.diff_commonSuffix(a, o)) && (e[n][1] = a.substring(a.length - t) + e[n][1],
a = a.substring(0, a.length - t), o = o.substring(0, o.length - t))), 0 === i ? e.splice(n - r, i + r, [ DIFF_INSERT, a ]) : 0 === r ? e.splice(n - i, i + r, [ DIFF_DELETE, o ]) : e.splice(n - i - r, i + r, [ DIFF_DELETE, o ], [ DIFF_INSERT, a ]),
n = n - i - r + (i ? 1 : 0) + (r ? 1 : 0) + 1) : 0 !== n && e[n - 1][0] == DIFF_EQUAL ? (e[n - 1][1] += e[n][1],
e.splice(n, 1)) : n++, r = 0, i = 0, o = "", a = "";
}
"" === e[e.length - 1][1] && e.pop();
var s = !1;
for (n = 1; n < e.length - 1; ) e[n - 1][0] == DIFF_EQUAL && e[n + 1][0] == DIFF_EQUAL && (e[n][1].substring(e[n][1].length - e[n - 1][1].length) == e[n - 1][1] ? (e[n][1] = e[n - 1][1] + e[n][1].substring(0, e[n][1].length - e[n - 1][1].length),
e[n + 1][1] = e[n - 1][1] + e[n + 1][1], e.splice(n - 1, 1), s = !0) : e[n][1].substring(0, e[n + 1][1].length) == e[n + 1][1] && (e[n - 1][1] += e[n + 1][1],
e[n][1] = e[n][1].substring(e[n + 1][1].length) + e[n + 1][1], e.splice(n + 1, 1),
s = !0)), n++;
s && this.diff_cleanupMerge(e);
}, diff_match_patch.prototype.diff_xIndex = function(e, t) {
var n, i = 0, r = 0, o = 0, a = 0;
for (n = 0; n < e.length && (e[n][0] !== DIFF_INSERT && (i += e[n][1].length), e[n][0] !== DIFF_DELETE && (r += e[n][1].length),
!(i > t)); n++) o = i, a = r;
return e.length != n && e[n][0] === DIFF_DELETE ? a : a + (t - o);
}, diff_match_patch.prototype.diff_prettyHtml = function(e) {
for (var t = [], n = /&/g, i = /</g, r = />/g, o = /\n/g, a = 0; a < e.length; a++) {
var s = e[a][0], l = e[a][1], c = l.replace(n, "&amp;").replace(i, "&lt;").replace(r, "&gt;").replace(o, "&para;<br>");
switch (s) {
case DIFF_INSERT:
t[a] = '<ins style="background:#e6ffe6;">' + c + "</ins>";
break;
case DIFF_DELETE:
t[a] = '<del style="background:#ffe6e6;">' + c + "</del>";
break;
case DIFF_EQUAL:
t[a] = "<span>" + c + "</span>";
}
}
return t.join("");
}, diff_match_patch.prototype.diff_text1 = function(e) {
for (var t = [], n = 0; n < e.length; n++) e[n][0] !== DIFF_INSERT && (t[n] = e[n][1]);
return t.join("");
}, diff_match_patch.prototype.diff_text2 = function(e) {
for (var t = [], n = 0; n < e.length; n++) e[n][0] !== DIFF_DELETE && (t[n] = e[n][1]);
return t.join("");
}, diff_match_patch.prototype.diff_levenshtein = function(e) {
for (var t = 0, n = 0, i = 0, r = 0; r < e.length; r++) {
var o = e[r][0], a = e[r][1];
switch (o) {
case DIFF_INSERT:
n += a.length;
break;
case DIFF_DELETE:
i += a.length;
break;
case DIFF_EQUAL:
t += Math.max(n, i), n = 0, i = 0;
}
}
return t += Math.max(n, i);
}, diff_match_patch.prototype.diff_toDelta = function(e) {
for (var t = [], n = 0; n < e.length; n++) switch (e[n][0]) {
case DIFF_INSERT:
t[n] = "+" + encodeURI(e[n][1]);
break;
case DIFF_DELETE:
t[n] = "-" + e[n][1].length;
break;
case DIFF_EQUAL:
t[n] = "=" + e[n][1].length;
}
return t.join(" ").replace(/%20/g, " ");
}, diff_match_patch.prototype.diff_fromDelta = function(e, t) {
for (var n = [], i = 0, r = 0, o = t.split(/\t/g), a = 0; a < o.length; a++) {
var s = o[a].substring(1);
switch (o[a].charAt(0)) {
case "+":
try {
n[i++] = [ DIFF_INSERT, decodeURI(s) ];
} catch (e) {
throw new Error("Illegal escape in diff_fromDelta: " + s);
}
break;
case "-":
case "=":
var l = parseInt(s, 10);
if (isNaN(l) || 0 > l) throw new Error("Invalid number in diff_fromDelta: " + s);
var c = e.substring(r, r += l);
n[i++] = "=" == o[a].charAt(0) ? [ DIFF_EQUAL, c ] : [ DIFF_DELETE, c ];
break;
default:
if (o[a]) throw new Error("Invalid diff operation in diff_fromDelta: " + o[a]);
}
}
if (r != e.length) throw new Error("Delta length (" + r + ") does not equal source text length (" + e.length + ").");
return n;
}, diff_match_patch.prototype.match_main = function(e, t, n) {
if (null == e || null == t || null == n) throw new Error("Null input. (match_main)");
return n = Math.max(0, Math.min(n, e.length)), e == t ? 0 : e.length ? e.substring(n, n + t.length) == t ? n : this.match_bitap_(e, t, n) : -1;
}, diff_match_patch.prototype.match_bitap_ = function(e, t, n) {
function i(e, i) {
var r = e / t.length, a = Math.abs(n - i);
return o.Match_Distance ? r + a / o.Match_Distance : a ? 1 : r;
}
if (t.length > this.Match_MaxBits) throw new Error("Pattern too long for this browser.");
var r = this.match_alphabet_(t), o = this, a = this.Match_Threshold, s = e.indexOf(t, n);
-1 != s && (a = Math.min(i(0, s), a), -1 != (s = e.lastIndexOf(t, n + t.length)) && (a = Math.min(i(0, s), a)));
var l = 1 << t.length - 1;
s = -1;
for (var c, u, d, p = t.length + e.length, h = 0; h < t.length; h++) {
for (c = 0, u = p; u > c; ) i(h, n + u) <= a ? c = u : p = u, u = Math.floor((p - c) / 2 + c);
p = u;
var f = Math.max(1, n - u + 1), m = Math.min(n + u, e.length) + t.length, g = Array(m + 2);
g[m + 1] = (1 << h) - 1;
for (var v = m; v >= f; v--) {
var b = r[e.charAt(v - 1)];
if (g[v] = 0 === h ? (g[v + 1] << 1 | 1) & b : (g[v + 1] << 1 | 1) & b | (d[v + 1] | d[v]) << 1 | 1 | d[v + 1],
g[v] & l) {
var y = i(h, v - 1);
if (a >= y) {
if (a = y, !((s = v - 1) > n)) break;
f = Math.max(1, 2 * n - s);
}
}
}
if (i(h + 1, n) > a) break;
d = g;
}
return s;
}, diff_match_patch.prototype.match_alphabet_ = function(e) {
for (var t = {}, n = 0; n < e.length; n++) t[e.charAt(n)] = 0;
for (var n = 0; n < e.length; n++) t[e.charAt(n)] |= 1 << e.length - n - 1;
return t;
}, diff_match_patch.prototype.patch_addContext_ = function(e, t) {
if (0 != t.length) {
for (var n = t.substring(e.start2, e.start2 + e.length1), i = 0; t.indexOf(n) != t.lastIndexOf(n) && n.length < this.Match_MaxBits - this.Patch_Margin - this.Patch_Margin; ) i += this.Patch_Margin,
n = t.substring(e.start2 - i, e.start2 + e.length1 + i);
i += this.Patch_Margin;
var r = t.substring(e.start2 - i, e.start2);
r && e.diffs.unshift([ DIFF_EQUAL, r ]);
var o = t.substring(e.start2 + e.length1, e.start2 + e.length1 + i);
o && e.diffs.push([ DIFF_EQUAL, o ]), e.start1 -= r.length, e.start2 -= r.length,
e.length1 += r.length + o.length, e.length2 += r.length + o.length;
}
}, diff_match_patch.prototype.patch_make = function(e, t, n) {
var i, r;
if ("string" == typeof e && "string" == typeof t && void 0 === n) i = e, r = this.diff_main(i, t, !0),
r.length > 2 && (this.diff_cleanupSemantic(r), this.diff_cleanupEfficiency(r)); else if (e && "object" == typeof e && void 0 === t && void 0 === n) r = e,
i = this.diff_text1(r); else if ("string" == typeof e && t && "object" == typeof t && void 0 === n) i = e,
r = t; else {
if ("string" != typeof e || "string" != typeof t || !n || "object" != typeof n) throw new Error("Unknown call format to patch_make.");
i = e, r = n;
}
if (0 === r.length) return [];
for (var o = [], a = new diff_match_patch.patch_obj(), s = 0, l = 0, c = 0, u = i, d = i, p = 0; p < r.length; p++) {
var h = r[p][0], f = r[p][1];
switch (s || h === DIFF_EQUAL || (a.start1 = l, a.start2 = c), h) {
case DIFF_INSERT:
a.diffs[s++] = r[p], a.length2 += f.length, d = d.substring(0, c) + f + d.substring(c);
break;
case DIFF_DELETE:
a.length1 += f.length, a.diffs[s++] = r[p], d = d.substring(0, c) + d.substring(c + f.length);
break;
case DIFF_EQUAL:
f.length <= 2 * this.Patch_Margin && s && r.length != p + 1 ? (a.diffs[s++] = r[p],
a.length1 += f.length, a.length2 += f.length) : f.length >= 2 * this.Patch_Margin && s && (this.patch_addContext_(a, u),
o.push(a), a = new diff_match_patch.patch_obj(), s = 0, u = d, l = c);
}
h !== DIFF_INSERT && (l += f.length), h !== DIFF_DELETE && (c += f.length);
}
return s && (this.patch_addContext_(a, u), o.push(a)), o;
}, diff_match_patch.prototype.patch_deepCopy = function(e) {
for (var t = [], n = 0; n < e.length; n++) {
var i = e[n], r = new diff_match_patch.patch_obj();
r.diffs = [];
for (var o = 0; o < i.diffs.length; o++) r.diffs[o] = i.diffs[o].slice();
r.start1 = i.start1, r.start2 = i.start2, r.length1 = i.length1, r.length2 = i.length2,
t[n] = r;
}
return t;
}, diff_match_patch.prototype.patch_apply = function(e, t) {
if (0 == e.length) return [ t, [] ];
e = this.patch_deepCopy(e);
var n = this.patch_addPadding(e);
t = n + t + n, this.patch_splitMax(e);
for (var i = 0, r = [], o = 0; o < e.length; o++) {
var a, s = e[o].start2 + i, l = this.diff_text1(e[o].diffs), c = -1;
if (l.length > this.Match_MaxBits ? -1 != (a = this.match_main(t, l.substring(0, this.Match_MaxBits), s)) && (-1 == (c = this.match_main(t, l.substring(l.length - this.Match_MaxBits), s + l.length - this.Match_MaxBits)) || a >= c) && (a = -1) : a = this.match_main(t, l, s),
-1 == a) r[o] = !1, i -= e[o].length2 - e[o].length1; else {
r[o] = !0, i = a - s;
var u;
if (u = -1 == c ? t.substring(a, a + l.length) : t.substring(a, c + this.Match_MaxBits),
l == u) t = t.substring(0, a) + this.diff_text2(e[o].diffs) + t.substring(a + l.length); else {
var d = this.diff_main(l, u, !1);
if (l.length > this.Match_MaxBits && this.diff_levenshtein(d) / l.length > this.Patch_DeleteThreshold) r[o] = !1; else {
this.diff_cleanupSemanticLossless(d);
for (var p, h = 0, f = 0; f < e[o].diffs.length; f++) {
var m = e[o].diffs[f];
m[0] !== DIFF_EQUAL && (p = this.diff_xIndex(d, h)), m[0] === DIFF_INSERT ? t = t.substring(0, a + p) + m[1] + t.substring(a + p) : m[0] === DIFF_DELETE && (t = t.substring(0, a + p) + t.substring(a + this.diff_xIndex(d, h + m[1].length))),
m[0] !== DIFF_DELETE && (h += m[1].length);
}
}
}
}
}
return t = t.substring(n.length, t.length - n.length), [ t, r ];
}, diff_match_patch.prototype.patch_addPadding = function(e) {
for (var t = this.Patch_Margin, n = "", i = 1; t >= i; i++) n += String.fromCharCode(i);
for (var i = 0; i < e.length; i++) e[i].start1 += t, e[i].start2 += t;
var r = e[0], o = r.diffs;
if (0 == o.length || o[0][0] != DIFF_EQUAL) o.unshift([ DIFF_EQUAL, n ]), r.start1 -= t,
r.start2 -= t, r.length1 += t, r.length2 += t; else if (t > o[0][1].length) {
var a = t - o[0][1].length;
o[0][1] = n.substring(o[0][1].length) + o[0][1], r.start1 -= a, r.start2 -= a, r.length1 += a,
r.length2 += a;
}
if (r = e[e.length - 1], o = r.diffs, 0 == o.length || o[o.length - 1][0] != DIFF_EQUAL) o.push([ DIFF_EQUAL, n ]),
r.length1 += t, r.length2 += t; else if (t > o[o.length - 1][1].length) {
var a = t - o[o.length - 1][1].length;
o[o.length - 1][1] += n.substring(0, a), r.length1 += a, r.length2 += a;
}
return n;
}, diff_match_patch.prototype.patch_splitMax = function(e) {
for (var t = this.Match_MaxBits, n = 0; n < e.length; n++) if (!(e[n].length1 <= t)) {
var i = e[n];
e.splice(n--, 1);
for (var r = i.start1, o = i.start2, a = ""; 0 !== i.diffs.length; ) {
var s = new diff_match_patch.patch_obj(), l = !0;
for (s.start1 = r - a.length, s.start2 = o - a.length, "" !== a && (s.length1 = s.length2 = a.length,
s.diffs.push([ DIFF_EQUAL, a ])); 0 !== i.diffs.length && s.length1 < t - this.Patch_Margin; ) {
var c = i.diffs[0][0], u = i.diffs[0][1];
c === DIFF_INSERT ? (s.length2 += u.length, o += u.length, s.diffs.push(i.diffs.shift()),
l = !1) : c === DIFF_DELETE && 1 == s.diffs.length && s.diffs[0][0] == DIFF_EQUAL && u.length > 2 * t ? (s.length1 += u.length,
r += u.length, l = !1, s.diffs.push([ c, u ]), i.diffs.shift()) : (u = u.substring(0, t - s.length1 - this.Patch_Margin),
s.length1 += u.length, r += u.length, c === DIFF_EQUAL ? (s.length2 += u.length,
o += u.length) : l = !1, s.diffs.push([ c, u ]), u == i.diffs[0][1] ? i.diffs.shift() : i.diffs[0][1] = i.diffs[0][1].substring(u.length));
}
a = this.diff_text2(s.diffs), a = a.substring(a.length - this.Patch_Margin);
var d = this.diff_text1(i.diffs).substring(0, this.Patch_Margin);
"" !== d && (s.length1 += d.length, s.length2 += d.length, 0 !== s.diffs.length && s.diffs[s.diffs.length - 1][0] === DIFF_EQUAL ? s.diffs[s.diffs.length - 1][1] += d : s.diffs.push([ DIFF_EQUAL, d ])),
l || e.splice(++n, 0, s);
}
}
}, diff_match_patch.prototype.patch_toText = function(e) {
for (var t = [], n = 0; n < e.length; n++) t[n] = e[n];
return t.join("");
}, diff_match_patch.prototype.patch_fromText = function(e) {
var t = [];
if (!e) return t;
for (var n = e.split("\n"), i = 0, r = /^@@ -(\d+),?(\d*) \+(\d+),?(\d*) @@$/; i < n.length; ) {
var o = n[i].match(r);
if (!o) throw new Error("Invalid patch string: " + n[i]);
var a = new diff_match_patch.patch_obj();
for (t.push(a), a.start1 = parseInt(o[1], 10), "" === o[2] ? (a.start1--, a.length1 = 1) : "0" == o[2] ? a.length1 = 0 : (a.start1--,
a.length1 = parseInt(o[2], 10)), a.start2 = parseInt(o[3], 10), "" === o[4] ? (a.start2--,
a.length2 = 1) : "0" == o[4] ? a.length2 = 0 : (a.start2--, a.length2 = parseInt(o[4], 10)),
i++; i < n.length; ) {
var s = n[i].charAt(0);
try {
var l = decodeURI(n[i].substring(1));
} catch (e) {
throw new Error("Illegal escape in patch_fromText: " + l);
}
if ("-" == s) a.diffs.push([ DIFF_DELETE, l ]); else if ("+" == s) a.diffs.push([ DIFF_INSERT, l ]); else if (" " == s) a.diffs.push([ DIFF_EQUAL, l ]); else {
if ("@" == s) break;
if ("" !== s) throw new Error('Invalid patch mode "' + s + '" in: ' + l);
}
i++;
}
}
return t;
}, diff_match_patch.patch_obj = function() {
this.diffs = [], this.start1 = null, this.start2 = null, this.length1 = 0, this.length2 = 0;
}, diff_match_patch.patch_obj.prototype.toString = function() {
var e, t;
e = 0 === this.length1 ? this.start1 + ",0" : 1 == this.length1 ? this.start1 + 1 : this.start1 + 1 + "," + this.length1,
t = 0 === this.length2 ? this.start2 + ",0" : 1 == this.length2 ? this.start2 + 1 : this.start2 + 1 + "," + this.length2;
for (var n, i = [ "@@ -" + e + " +" + t + " @@\n" ], r = 0; r < this.diffs.length; r++) {
switch (this.diffs[r][0]) {
case DIFF_INSERT:
n = "+";
break;
case DIFF_DELETE:
n = "-";
break;
case DIFF_EQUAL:
n = " ";
}
i[r + 1] = n + encodeURI(this.diffs[r][1]) + "\n";
}
return i.join("").replace(/%20/g, " ");
}, this.diff_match_patch = diff_match_patch, this.DIFF_DELETE = DIFF_DELETE, this.DIFF_INSERT = DIFF_INSERT,
this.DIFF_EQUAL = DIFF_EQUAL, define("diff_match_patch_uncompressed", function(e) {
return function() {
return e.diff_match_patch;
};
}(this)), function(e) {
if ("object" == typeof exports) module.exports = e(); else if ("function" == typeof define && define.amd) define("jsondiffpatch", e); else {
var t;
"undefined" != typeof window ? t = window : "undefined" != typeof global ? t = global : "undefined" != typeof self && (t = self),
t.jsondiffpatch = e();
}
}(function() {
return function e(t, n, i) {
function r(a, s) {
if (!n[a]) {
if (!t[a]) {
var l = "function" == typeof require && require;
if (!s && l) return l(a, !0);
if (o) return o(a, !0);
throw new Error("Cannot find module '" + a + "'");
}
var c = n[a] = {
exports: {}
};
t[a][0].call(c.exports, function(e) {
var n = t[a][1][e];
return r(n || e);
}, c, c.exports, e, t, n, i);
}
return n[a].exports;
}
for (var o = "function" == typeof require && require, a = 0; a < i.length; a++) r(i[a]);
return r;
}({
1: [ function(e, t) {
var n = t.exports = {};
n.nextTick = function() {
var e = "undefined" != typeof window && window.setImmediate, t = "undefined" != typeof window && window.postMessage && window.addEventListener;
if (e) return function(e) {
return window.setImmediate(e);
};
if (t) {
var n = [];
return window.addEventListener("message", function(e) {
var t = e.source;
(t === window || null === t) && "process-tick" === e.data && (e.stopPropagation(),
n.length > 0) && n.shift()();
}, !0), function(e) {
n.push(e), window.postMessage("process-tick", "*");
};
}
return function(e) {
setTimeout(e, 0);
};
}(), n.title = "browser", n.browser = !0, n.env = {}, n.argv = [], n.binding = function() {
throw new Error("process.binding is not supported");
}, n.cwd = function() {
return "/";
}, n.chdir = function() {
throw new Error("process.chdir is not supported");
};
}, {} ],
2: [ function(e, t, n) {
var i = e("../pipe").Pipe, r = function() {};
r.prototype.setResult = function(e) {
return this.result = e, this.hasResult = !0, this;
}, r.prototype.exit = function() {
return this.exiting = !0, this;
}, r.prototype.switchTo = function(e, t) {
return "string" == typeof e || e instanceof i ? this.nextPipe = e : (this.next = e,
t && (this.nextPipe = t)), this;
}, r.prototype.push = function(e, t) {
return e.parent = this, void 0 !== t && (e.childName = t), e.root = this.root || this,
e.options = e.options || this.options, this.children ? (this.children[this.children.length - 1].next = e,
this.children.push(e)) : (this.children = [ e ], this.nextAfterChildren = this.next || null,
this.next = e), e.next = this, this;
}, n.Context = r;
}, {
"../pipe": 15
} ],
3: [ function(e, t, n) {
var i = e("./context").Context, r = function(e, t) {
this.left = e, this.right = t, this.pipe = "diff";
};
r.prototype = new i(), n.DiffContext = r;
}, {
"./context": 2
} ],
4: [ function(e, t, n) {
var i = e("./context").Context, r = function(e, t) {
this.left = e, this.delta = t, this.pipe = "patch";
};
r.prototype = new i(), n.PatchContext = r;
}, {
"./context": 2
} ],
5: [ function(e, t, n) {
var i = e("./context").Context, r = function(e) {
this.delta = e, this.pipe = "reverse";
};
r.prototype = new i(), n.ReverseContext = r;
}, {
"./context": 2
} ],
6: [ function(e, t) {
t.exports = function(e, t) {
var n;
return "string" == typeof t && (n = /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}(?:\.\d*)?)(Z|([+\-])(\d{2}):(\d{2}))$/.exec(t)) ? new Date(Date.UTC(+n[1], +n[2] - 1, +n[3], +n[4], +n[5], +n[6])) : t;
};
}, {} ],
7: [ function(e, t, n) {
var i = e("./processor").Processor, r = e("./pipe").Pipe, o = e("./contexts/diff").DiffContext, a = e("./contexts/patch").PatchContext, s = e("./contexts/reverse").ReverseContext, l = e("./filters/trivial"), c = e("./filters/nested"), u = e("./filters/arrays"), d = e("./filters/dates"), p = e("./filters/texts"), h = function(e) {
this.processor = new i(e), this.processor.pipe(new r("diff").append(c.collectChildrenDiffFilter, l.diffFilter, d.diffFilter, p.diffFilter, c.objectsDiffFilter, u.diffFilter).shouldHaveResult()),
this.processor.pipe(new r("patch").append(c.collectChildrenPatchFilter, u.collectChildrenPatchFilter, l.patchFilter, p.patchFilter, c.patchFilter, u.patchFilter).shouldHaveResult()),
this.processor.pipe(new r("reverse").append(c.collectChildrenReverseFilter, u.collectChildrenReverseFilter, l.reverseFilter, p.reverseFilter, c.reverseFilter, u.reverseFilter).shouldHaveResult());
};
h.prototype.options = function() {
return this.processor.options.apply(this.processor, arguments);
}, h.prototype.diff = function(e, t) {
return this.processor.process(new o(e, t));
}, h.prototype.patch = function(e, t) {
return this.processor.process(new a(e, t));
}, h.prototype.reverse = function(e) {
return this.processor.process(new s(e));
}, h.prototype.unpatch = function(e, t) {
return this.patch(e, this.reverse(t));
}, n.DiffPatcher = h;
}, {
"./contexts/diff": 3,
"./contexts/patch": 4,
"./contexts/reverse": 5,
"./filters/arrays": 9,
"./filters/dates": 10,
"./filters/nested": 12,
"./filters/texts": 13,
"./filters/trivial": 14,
"./pipe": 15,
"./processor": 16
} ],
8: [ function(e, t, n) {
(function(t) {
var i = e("./diffpatcher").DiffPatcher;
n.DiffPatcher = i, n.create = function(e) {
return new i(e);
}, n.dateReviver = e("./date-reviver");
var r;
if (n.diff = function() {
return r || (r = new i()), r.diff.apply(r, arguments);
}, n.patch = function() {
return r || (r = new i()), r.patch.apply(r, arguments);
}, n.unpatch = function() {
return r || (r = new i()), r.unpatch.apply(r, arguments);
}, n.reverse = function() {
return r || (r = new i()), r.reverse.apply(r, arguments);
}, void 0 !== t && "string" == typeof t.execPath) {
var o = e("./formatters/index");
n.formatters = o, n.console = o.console;
} else n.homepage = "https://github.com/benjamine/jsondiffpatch", n.version = "0.1.5";
}).call(this, e("/home/sheila/proj/JsonDiffPatch/node_modules/gulp-browserify/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js"));
}, {
"./date-reviver": 6,
"./diffpatcher": 7,
"/home/sheila/proj/JsonDiffPatch/node_modules/gulp-browserify/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js": 1
} ],
9: [ function(e, t, n) {
var i = e("../contexts/diff").DiffContext, r = e("../contexts/patch").PatchContext, o = e("../contexts/reverse").ReverseContext, a = e("./lcs"), s = "function" == typeof Array.isArray ? Array.isArray : function(e) {
return e instanceof Array;
}, l = "function" == typeof Array.prototype.indexOf ? function(e, t) {
return e.indexOf(t);
} : function(e, t) {
for (var n = e.length, i = 0; n > i; i++) if (e[i] === t) return i;
return -1;
}, c = function(e) {
if (e.leftIsArray) {
for (var t, n, r, o, s = e.options && e.options.objectHash, c = function(e, t, n, i, r) {
var o = e[n], a = t[i];
if (o === a) return !0;
if ("object" != typeof o || "object" != typeof a) return !1;
if (!s) return !1;
var l, c;
return "number" == typeof n ? (r.hashCache1 = r.hashCache1 || [], void 0 === (l = r.hashCache1[n]) && (r.hashCache1[n] = l = s(o, n))) : l = s(o),
void 0 !== l && ("number" == typeof i ? (r.hashCache2 = r.hashCache2 || [], void 0 === (c = r.hashCache2[i]) && (r.hashCache2[i] = c = s(a, i))) : c = s(a),
void 0 !== c && l === c);
}, u = {}, d = 0, p = 0, h = e.left, f = e.right, m = h.length, g = f.length; m > d && g > d && c(h, f, d, d, u); ) t = d,
o = new i(e.left[t], e.right[t]), e.push(o, t), d++;
for (;m > p + d && g > p + d && c(h, f, m - 1 - p, g - 1 - p, u); ) n = m - 1 - p,
r = g - 1 - p, o = new i(e.left[n], e.right[r]), e.push(o, r), p++;
var v;
if (d + p === m) {
if (m === g) return void e.setResult(void 0).exit();
for (v = v || {
_t: "a"
}, t = d; g - p > t; t++) v[t] = [ f[t] ];
return void e.setResult(v).exit();
}
if (d + p === g) {
for (v = v || {
_t: "a"
}, t = d; m - p > t; t++) v["_" + t] = [ h[t], 0, 0 ];
return void e.setResult(v).exit();
}
u = {};
var b = h.slice(d, m - p), y = f.slice(d, g - p), x = a.get(b, y, c, u), w = [];
for (v = v || {
_t: "a"
}, t = d; m - p > t; t++) l(x.indices1, t - d) < 0 && (v["_" + t] = [ h[t], 0, 0 ],
w.push(t));
var S = !0;
e.options && e.options.arrays && !1 === e.options.arrays.detectMove && (S = !1);
var C = !1;
e.options && e.options.arrays && e.options.arrays.includeValueOnMove && (C = !0);
var _ = w.length;
for (t = d; g - p > t; t++) {
var k = l(x.indices2, t - d);
if (0 > k) {
var E = !1;
if (S && _ > 0) for (n = 0; _ > n; n++) if (c(b, y, w[n] - d, t - d, u)) {
v["_" + w[n]].splice(1, 2, t, 3), C || (v["_" + w[n]][0] = ""), n = w[n], r = t,
o = new i(e.left[n], e.right[r]), e.push(o, r), w.splice(n, 1), E = !0;
break;
}
E || (v[t] = [ f[t] ]);
} else n = x.indices1[k] + d, r = x.indices2[k] + d, o = new i(e.left[n], e.right[r]),
e.push(o, r);
}
e.setResult(v).exit();
}
};
c.filterName = "arrays";
var u = {
numerically: function(e, t) {
return e - t;
},
numericallyBy: function(e) {
return function(t, n) {
return t[e] - n[e];
};
}
}, d = function(e) {
if (e.nested && "a" === e.delta._t) {
var t, n, i = e.delta, o = e.left, a = [], s = [], l = [];
for (t in i) if ("_t" !== t) if ("_" === t[0]) {
if (0 !== i[t][2] && 3 !== i[t][2]) throw new Error("only removal or move can be applied at original array indices, invalid diff type: " + i[t][2]);
a.push(parseInt(t.slice(1), 10));
} else 1 === i[t].length ? s.push({
index: parseInt(t, 10),
value: i[t][0]
}) : l.push({
index: parseInt(t, 10),
delta: i[t]
});
for (a = a.sort(u.numerically), t = a.length - 1; t >= 0; t--) {
n = a[t];
var c = i["_" + n], d = o.splice(n, 1)[0];
3 === c[2] && s.push({
index: c[1],
value: d
});
}
s = s.sort(u.numericallyBy("index"));
var p = s.length;
for (t = 0; p > t; t++) {
var h = s[t];
o.splice(h.index, 0, h.value);
}
var f, m = l.length;
if (m > 0) for (t = 0; m > t; t++) {
var g = l[t];
f = new r(e.left[g.index], g.delta), e.push(f, g.index);
}
if (!e.children) return void e.setResult(e.left).exit();
e.exit();
}
};
d.filterName = "arrays";
var p = function(e) {
if (e && e.children && "a" === e.delta._t) {
for (var t, n = e.children.length, i = 0; n > i; i++) t = e.children[i], e.left[t.childName] = t.result;
e.setResult(e.left).exit();
}
};
p.filterName = "arraysCollectChildren";
var h = function(e) {
if (!e.nested) return void (3 === e.delta[2] && (e.newName = "_" + e.delta[1], e.setResult([ e.delta[0], parseInt(e.childName.substr(1), 10), 3 ]).exit()));
if ("a" === e.delta._t) {
var t, n;
for (t in e.delta) "_t" !== t && (n = new o(e.delta[t]), e.push(n, t));
e.exit();
}
};
h.filterName = "arrays";
var f = function(e, t, n) {
var i = t;
if ("string" == typeof t && "_" === t[0]) i = parseInt(t.substr(1), 10); else {
var r = "_" + t;
if (s(n) && 0 === n[2]) i = r; else for (var o in e) {
var a = e[o];
s(a) && 3 === a[2] && a[1].toString() === t && (i = o.substr(1));
}
}
return i;
}, m = function(e) {
if (e && e.children && "a" === e.delta._t) {
for (var t, n = e.children.length, i = {
_t: "a"
}, r = 0; n > r; r++) {
t = e.children[r];
var o = t.newName;
void 0 === o && (o = f(e.delta, t.childName, t.result)), i[o] !== t.result && (i[o] = t.result);
}
e.setResult(i).exit();
}
};
m.filterName = "arraysCollectChildren", n.diffFilter = c, n.patchFilter = d, n.collectChildrenPatchFilter = p,
n.reverseFilter = h, n.collectChildrenReverseFilter = m;
}, {
"../contexts/diff": 3,
"../contexts/patch": 4,
"../contexts/reverse": 5,
"./lcs": 11
} ],
10: [ function(e, t, n) {
var i = function(e) {
e.left instanceof Date ? (e.setResult(e.right instanceof Date ? e.left.getTime() !== e.right.getTime() ? [ e.left, e.right ] : void 0 : [ e.left, e.right ]),
e.exit()) : e.right instanceof Date && e.setResult([ e.left, e.right ]).exit();
};
i.filterName = "dates", n.diffFilter = i;
}, {} ],
11: [ function(e, t, n) {
var i = function(e, t, n, i) {
return e[n] === t[i];
}, r = function(e, t, n, i) {
var r, o, a = e.length, s = t.length, l = [ a + 1 ];
for (r = 0; a + 1 > r; r++) for (l[r] = [ s + 1 ], o = 0; s + 1 > o; o++) l[r][o] = 0;
for (l.match = n, r = 1; a + 1 > r; r++) for (o = 1; s + 1 > o; o++) l[r][o] = n(e, t, r - 1, o - 1, i) ? l[r - 1][o - 1] + 1 : Math.max(l[r - 1][o], l[r][o - 1]);
return l;
}, o = function(e, t, n, i, r, a) {
if (0 === i || 0 === r) return {
sequence: [],
indices1: [],
indices2: []
};
if (e.match(t, n, i - 1, r - 1, a)) {
var s = o(e, t, n, i - 1, r - 1, a);
return s.sequence.push(t[i - 1]), s.indices1.push(i - 1), s.indices2.push(r - 1),
s;
}
return e[i][r - 1] > e[i - 1][r] ? o(e, t, n, i, r - 1, a) : o(e, t, n, i - 1, r, a);
}, a = function(e, t, n, a) {
a = a || {};
var s = r(e, t, n || i, a), l = o(s, e, t, e.length, t.length, a);
return "string" == typeof e && "string" == typeof t && (l.sequence = l.sequence.join("")),
l;
};
n.get = a;
}, {} ],
12: [ function(e, t, n) {
var i = e("../contexts/diff").DiffContext, r = e("../contexts/patch").PatchContext, o = e("../contexts/reverse").ReverseContext, a = function(e) {
if (e && e.children) {
for (var t, n = e.children.length, i = e.result, r = 0; n > r; r++) t = e.children[r],
void 0 !== t.result && (i = i || {}, i[t.childName] = t.result);
i && e.leftIsArray && (i._t = "a"), e.setResult(i).exit();
}
};
a.filterName = "collectChildren";
var s = function(e) {
if (!e.leftIsArray && "object" === e.leftType) {
var t, n;
for (t in e.left) n = new i(e.left[t], e.right[t]), e.push(n, t);
for (t in e.right) void 0 === e.left[t] && (n = new i(void 0, e.right[t]), e.push(n, t));
if (!e.children || 0 === e.children.length) return void e.setResult(void 0).exit();
e.exit();
}
};
s.filterName = "objects";
var l = function(e) {
if (e.nested && !e.delta._t) {
var t, n;
for (t in e.delta) n = new r(e.left[t], e.delta[t]), e.push(n, t);
e.exit();
}
};
l.filterName = "objects";
var c = function(e) {
if (e && e.children && !e.delta._t) {
for (var t, n = e.children.length, i = 0; n > i; i++) t = e.children[i], e.left[t.childName] !== t.result && (e.left[t.childName] = t.result);
e.setResult(e.left).exit();
}
};
c.filterName = "collectChildren";
var u = function(e) {
if (e.nested && !e.delta._t) {
var t, n;
for (t in e.delta) n = new o(e.delta[t]), e.push(n, t);
e.exit();
}
};
u.filterName = "objects";
var d = function(e) {
if (e && e.children && !e.delta._t) {
for (var t, n = e.children.length, i = {}, r = 0; n > r; r++) t = e.children[r],
i[t.childName] !== t.result && (i[t.childName] = t.result);
e.setResult(i).exit();
}
};
d.filterName = "collectChildren", n.collectChildrenDiffFilter = a, n.objectsDiffFilter = s,
n.patchFilter = l, n.collectChildrenPatchFilter = c, n.reverseFilter = u, n.collectChildrenReverseFilter = d;
}, {
"../contexts/diff": 3,
"../contexts/patch": 4,
"../contexts/reverse": 5
} ],
13: [ function(e, t, n) {
var i = null, r = function() {
if (!i) {
var t;
if (void 0 !== diff_match_patch) t = new diff_match_patch(); else if ("function" == typeof e) {
var n = e("../../external/diff_match_patch_uncompressed");
t = new n.diff_match_patch();
}
if (!t) {
var r = new Error("text diff_match_patch library not found");
throw r.diff_match_patch_not_found = !0, r;
}
i = {
diff: function(e, n) {
return t.patch_toText(t.patch_make(e, n));
},
patch: function(e, n) {
for (var i = t.patch_apply(t.patch_fromText(n), e), r = 0; r < i[1].length; r++) if (!i[1][r]) {
var o = new Error("text patch failed");
o.textPatchFailed = !0;
}
return i[0];
}
};
}
return i;
}, o = function(e) {
if ("string" === e.leftType) {
var t = e.options && e.options.textDiff && e.options.textDiff.minLength || 60;
if (e.left.length < t || e.right.length < t) return void e.setResult([ e.left, e.right ]).exit();
var n = r().diff;
e.setResult([ n(e.left, e.right), 0, 2 ]).exit();
}
};
o.filterName = "texts";
var a = function(e) {
if (!e.nested && 2 === e.delta[2]) {
var t = r().patch;
e.setResult(t(e.left, e.delta[0])).exit();
}
};
a.filterName = "texts";
var s = function(e) {
var t, n, i, r, o, a, s = null, l = /^@@ +\-(\d+),(\d+) +\+(\d+),(\d+) +@@$/;
for (i = e.split("\n"), t = 0, n = i.length; n > t; t++) {
r = i[t];
var c = r.slice(0, 1);
"@" === c ? (s = l.exec(r), a = t, i[a] = "@@ -" + s[3] + "," + s[4] + " +" + s[1] + "," + s[2] + " @@") : "+" === c ? (i[t] = "-" + i[t].slice(1),
"+" === i[t - 1].slice(0, 1) && (o = i[t], i[t] = i[t - 1], i[t - 1] = o)) : "-" === c && (i[t] = "+" + i[t].slice(1));
}
return i.join("\n");
}, l = function(e) {
e.nested || 2 === e.delta[2] && e.setResult([ s(e.delta[0]), 0, 2 ]).exit();
};
l.filterName = "texts", n.diffFilter = o, n.patchFilter = a, n.reverseFilter = l;
}, {} ],
14: [ function(e, t, n) {
var i = "function" == typeof Array.isArray ? Array.isArray : function(e) {
return e instanceof Array;
}, r = function(e) {
if (e.left === e.right) return void e.setResult(void 0).exit();
if (void 0 === e.left) {
if ("function" == typeof e.right) throw new Error("functions are not supported");
return void e.setResult([ e.right ]).exit();
}
if (void 0 === e.right) return void e.setResult([ e.left, 0, 0 ]).exit();
if ("function" == typeof e.left || "function" == typeof e.right) throw new Error("functions are not supported");
return e.leftType = null === e.left ? "null" : typeof e.left, e.rightType = null === e.right ? "null" : typeof e.right,
e.leftType !== e.rightType ? void e.setResult([ e.left, e.right ]).exit() : "boolean" === e.leftType || "number" === e.leftType ? void e.setResult([ e.left, e.right ]).exit() : ("object" === e.leftType && (e.leftIsArray = i(e.left)),
"object" === e.rightType && (e.rightIsArray = i(e.right)), e.leftIsArray !== e.rightIsArray ? void e.setResult([ e.left, e.right ]).exit() : void 0);
};
r.filterName = "trivial";
var o = function(e) {
return void 0 === e.delta ? void e.setResult(e.left).exit() : (e.nested = !i(e.delta),
e.nested ? void 0 : 1 === e.delta.length ? void e.setResult(e.delta[0]).exit() : 2 === e.delta.length ? void e.setResult(e.delta[1]).exit() : 3 === e.delta.length && 0 === e.delta[2] ? void e.setResult(void 0).exit() : void 0);
};
o.filterName = "trivial";
var a = function(e) {
return void 0 === e.delta ? void e.setResult(e.delta).exit() : (e.nested = !i(e.delta),
e.nested ? void 0 : 1 === e.delta.length ? void e.setResult([ e.delta[0], 0, 0 ]).exit() : 2 === e.delta.length ? void e.setResult([ e.delta[1], e.delta[0] ]).exit() : 3 === e.delta.length && 0 === e.delta[2] ? void e.setResult([ e.delta[0] ]).exit() : void 0);
};
a.filterName = "trivial", n.diffFilter = r, n.patchFilter = o, n.reverseFilter = a;
}, {} ],
15: [ function(e, t, n) {
var i = function(e) {
this.name = e, this.filters = [];
};
i.prototype.process = function(e) {
if (!this.processor) throw new Error("add this pipe to a processor before using it");
for (var t = this.debug, n = this.filters.length, i = e, r = 0; n > r; r++) {
var o = this.filters[r];
if (t && this.log("filter: " + o.filterName), o(i), "object" == typeof i && i.exiting) {
i.exiting = !1;
break;
}
}
!i.next && this.resultCheck && this.resultCheck(i);
}, i.prototype.log = function(e) {
console.log("[jsondiffpatch] " + this.name + " pipe, " + e);
}, i.prototype.append = function() {
return this.filters.push.apply(this.filters, arguments), this;
}, i.prototype.prepend = function() {
return this.filters.unshift.apply(this.filters, arguments), this;
}, i.prototype.indexOf = function(e) {
if (!e) throw new Error("a filter name is required");
for (var t = 0; t < this.filters.length; t++) if (this.filters[t].filterName === e) return t;
throw new Error("filter not found: " + e);
}, i.prototype.list = function() {
for (var e = [], t = 0; t < this.filters.length; t++) {
var n = this.filters[t];
e.push(n.filterName);
}
return e;
}, i.prototype.after = function(e) {
var t = this.indexOf(e), n = Array.prototype.slice.call(arguments, 1);
if (!n.length) throw new Error("a filter is required");
return n.unshift(t + 1, 0), Array.prototype.splice.apply(this.filters, n), this;
}, i.prototype.before = function(e) {
var t = this.indexOf(e), n = Array.prototype.slice.call(arguments, 1);
if (!n.length) throw new Error("a filter is required");
return n.unshift(t, 0), Array.prototype.splice.apply(this.filters, n), this;
}, i.prototype.clear = function() {
return this.filters.length = 0, this;
}, i.prototype.shouldHaveResult = function(e) {
if (!1 === e) return void (this.resultCheck = null);
if (!this.resultCheck) {
var t = this;
return this.resultCheck = function(e) {
if (!e.hasResult) {
console.log(e);
var n = new Error(t.name + " failed");
throw n.noResult = !0, n;
}
}, this;
}
}, n.Pipe = i;
}, {} ],
16: [ function(e, t, n) {
var i = function(e) {
this.selfOptions = e, this.pipes = {};
};
i.prototype.options = function(e) {
return e && (this.selfOptions = e), this.selfOptions;
}, i.prototype.pipe = function(e, t) {
if ("string" == typeof e) {
if (void 0 === t) return this.pipes[e];
this.pipes[e] = t;
}
if (e && e.name) {
if (t = e, t.processor === this) return t;
this.pipes[t.name] = t;
}
return t.processor = this, t;
}, i.prototype.process = function(e, t) {
var n = e;
n.options = this.options();
for (var i, r, o = t || e.pipe || "default"; o; ) void 0 !== n.nextAfterChildren && (n.next = n.nextAfterChildren,
n.nextAfterChildren = null), "string" == typeof o && (o = this.pipe(o)), o.process(n),
r = n, i = o, o = null, n && n.next && (n = n.next, o = r.nextPipe || n.pipe || i);
return n.hasResult ? n.result : void 0;
}, n.Processor = i;
}, {} ]
}, {}, [ 8 ])(8);
}), "undefined" == typeof WeakMap && function() {
var e = Object.defineProperty, t = Date.now() % 1e9, n = function() {
this.name = "__st" + (1e9 * Math.random() >>> 0) + t++ + "__";
};
n.prototype = {
set: function(t, n) {
var i = t[this.name];
i && i[0] === t ? i[1] = n : e(t, this.name, {
value: [ t, n ],
writable: !0
});
},
get: function(e) {
var t;
return (t = e[this.name]) && t[0] === e ? t[1] : void 0;
},
"delete": function(e) {
this.set(e, void 0);
}
}, window.WeakMap = n;
}(), define("WeakMap", function() {}), function(e) {
function t(e) {
x.push(e), y || (y = !0, g(i));
}
function n(e) {
return window.ShadowDOMPolyfill && window.ShadowDOMPolyfill.wrapIfNeeded(e) || e;
}
function i() {
y = !1;
var e = x;
x = [], e.sort(function(e, t) {
return e.uid_ - t.uid_;
});
var t = !1;
e.forEach(function(e) {
var n = e.takeRecords();
r(e), n.length && (e.callback_(n, e), t = !0);
}), t && i();
}
function r(e) {
e.nodes_.forEach(function(t) {
var n = m.get(t);
n && n.forEach(function(t) {
t.observer === e && t.removeTransientObservers();
});
});
}
function o(e, t) {
for (var n = e; n; n = n.parentNode) {
var i = m.get(n);
if (i) for (var r = 0; r < i.length; r++) {
var o = i[r], a = o.options;
if (n === e || a.subtree) {
var s = t(a);
s && o.enqueue(s);
}
}
}
}
function a(e) {
this.callback_ = e, this.nodes_ = [], this.records_ = [], this.uid_ = ++w;
}
function s(e, t) {
this.type = e, this.target = t, this.addedNodes = [], this.removedNodes = [], this.previousSibling = null,
this.nextSibling = null, this.attributeName = null, this.attributeNamespace = null,
this.oldValue = null;
}
function l(e) {
var t = new s(e.type, e.target);
return t.addedNodes = e.addedNodes.slice(), t.removedNodes = e.removedNodes.slice(),
t.previousSibling = e.previousSibling, t.nextSibling = e.nextSibling, t.attributeName = e.attributeName,
t.attributeNamespace = e.attributeNamespace, t.oldValue = e.oldValue, t;
}
function c(e, t) {
return S = new s(e, t);
}
function u(e) {
return C || (C = l(S), C.oldValue = e, C);
}
function d() {
S = C = void 0;
}
function p(e) {
return e === C || e === S;
}
function h(e, t) {
return e === t ? e : C && p(e) ? C : null;
}
function f(e, t, n) {
this.observer = e, this.target = t, this.options = n, this.transientObservedNodes = [];
}
var m = new WeakMap(), g = window.msSetImmediate;
if (!g) {
var v = [], b = String(Math.random());
window.addEventListener("message", function(e) {
if (e.data === b) {
var t = v;
v = [], t.forEach(function(e) {
e();
});
}
}), g = function(e) {
v.push(e), window.postMessage(b, "*");
};
}
var y = !1, x = [], w = 0;
a.prototype = {
observe: function(e, t) {
if (e = n(e), !t.childList && !t.attributes && !t.characterData || t.attributeOldValue && !t.attributes || t.attributeFilter && t.attributeFilter.length && !t.attributes || t.characterDataOldValue && !t.characterData) throw new SyntaxError();
var i = m.get(e);
i || m.set(e, i = []);
for (var r, o = 0; o < i.length; o++) if (i[o].observer === this) {
r = i[o], r.removeListeners(), r.options = t;
break;
}
r || (r = new f(this, e, t), i.push(r), this.nodes_.push(e)), r.addListeners();
},
disconnect: function() {
this.nodes_.forEach(function(e) {
for (var t = m.get(e), n = 0; n < t.length; n++) {
var i = t[n];
if (i.observer === this) {
i.removeListeners(), t.splice(n, 1);
break;
}
}
}, this), this.records_ = [];
},
takeRecords: function() {
var e = this.records_;
return this.records_ = [], e;
}
};
var S, C;
f.prototype = {
enqueue: function(e) {
var n = this.observer.records_, i = n.length;
if (n.length > 0) {
var r = n[i - 1], o = h(r, e);
if (o) return void (n[i - 1] = o);
} else t(this.observer);
n[i] = e;
},
addListeners: function() {
this.addListeners_(this.target);
},
addListeners_: function(e) {
var t = this.options;
t.attributes && e.addEventListener("DOMAttrModified", this, !0), t.characterData && e.addEventListener("DOMCharacterDataModified", this, !0),
t.childList && e.addEventListener("DOMNodeInserted", this, !0), (t.childList || t.subtree) && e.addEventListener("DOMNodeRemoved", this, !0);
},
removeListeners: function() {
this.removeListeners_(this.target);
},
removeListeners_: function(e) {
var t = this.options;
t.attributes && e.removeEventListener("DOMAttrModified", this, !0), t.characterData && e.removeEventListener("DOMCharacterDataModified", this, !0),
t.childList && e.removeEventListener("DOMNodeInserted", this, !0), (t.childList || t.subtree) && e.removeEventListener("DOMNodeRemoved", this, !0);
},
addTransientObserver: function(e) {
if (e !== this.target) {
this.addListeners_(e), this.transientObservedNodes.push(e);
var t = m.get(e);
t || m.set(e, t = []), t.push(this);
}
},
removeTransientObservers: function() {
var e = this.transientObservedNodes;
this.transientObservedNodes = [], e.forEach(function(e) {
this.removeListeners_(e);
for (var t = m.get(e), n = 0; n < t.length; n++) if (t[n] === this) {
t.splice(n, 1);
break;
}
}, this);
},
handleEvent: function(e) {
switch (e.stopImmediatePropagation(), e.type) {
case "DOMAttrModified":
var t = e.attrName, n = e.relatedNode.namespaceURI, i = e.target, r = new c("attributes", i);
r.attributeName = t, r.attributeNamespace = n;
var a = e.attrChange === MutationEvent.ADDITION ? null : e.prevValue;
o(i, function(e) {
return !e.attributes || e.attributeFilter && e.attributeFilter.length && -1 === e.attributeFilter.indexOf(t) && -1 === e.attributeFilter.indexOf(n) ? void 0 : e.attributeOldValue ? u(a) : r;
});
break;
case "DOMCharacterDataModified":
var i = e.target, r = c("characterData", i), a = e.prevValue;
o(i, function(e) {
return e.characterData ? e.characterDataOldValue ? u(a) : r : void 0;
});
break;
case "DOMNodeRemoved":
this.addTransientObserver(e.target);
case "DOMNodeInserted":
var s, l, i = e.relatedNode, p = e.target;
"DOMNodeInserted" === e.type ? (s = [ p ], l = []) : (s = [], l = [ p ]);
var h = p.previousSibling, f = p.nextSibling, r = c("childList", i);
r.addedNodes = s, r.removedNodes = l, r.previousSibling = h, r.nextSibling = f,
o(i, function(e) {
return e.childList ? r : void 0;
});
}
d();
}
}, e.JsMutationObserver = a, e.MutationObserver || (e.MutationObserver = a);
}(this), define("MutationObservers", [ "WeakMap" ], function() {}), Prism.languages.markup = {
comment: /&lt;!--[\w\W]*?-->/g,
prolog: /&lt;\?.+?\?>/,
doctype: /&lt;!DOCTYPE.+?>/,
cdata: /&lt;!\[CDATA\[[\w\W]*?]]>/i,
tag: {
pattern: /&lt;\/?[\w:-]+\s*(?:\s+[\w:-]+(?:=(?:("|')(\\?[\w\W])*?\1|[^\s'">=]+))?\s*)*\/?>/gi,
inside: {
tag: {
pattern: /^&lt;\/?[\w:-]+/i,
inside: {
punctuation: /^&lt;\/?/,
namespace: /^[\w-]+?:/
}
},
"attr-value": {
pattern: /=(?:('|")[\w\W]*?(\1)|[^\s>]+)/gi,
inside: {
punctuation: /=|>|"/g
}
},
punctuation: /\/?>/g,
"attr-name": {
pattern: /[\w:-]+/g,
inside: {
namespace: /^[\w-]+?:/
}
}
}
},
entity: /&amp;#?[\da-z]{1,8};/gi
}, Prism.hooks.add("wrap", function(e) {
"entity" === e.type && (e.attributes.title = e.content.replace(/&amp;/, "&"));
}), define("bower-libs/prism/components/prism-markup", [ "prism-core" ], function() {}),
Prism.languages.latex = {
keyword: /\\(?:[^a-zA-Z]|[a-zA-Z]+)/g,
lparen: /[[({]/g,
rparen: /[\])}]/g,
comment: /%.*/g
}, define("libs/prism-latex", [ "prism-core" ], function() {}), Prism.languages.md = function() {
var e = new RegExp("(https?|ftp)(://(&amp;|[-A-Z0-9+@#/%?=~_|[\\]()!:,.;])*(&amp;|[-A-Z0-9+@#/%=~_|[\\])]))(?=$|\\W)", "gi"), t = /(?:mailto:)?([-.\w]+\@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)/gi, n = Prism.languages.latex, i = /\n/gm, r = {};
r["pre gfm"] = {
pattern: /^`{3}.*\n(?:[\s\S]*?)\n`{3} *$/gm,
inside: {
"md md-pre": /`{3}/,
lf: i
}
}, r["h1 alt"] = {
pattern: /^(.+)[ \t]*\n=+[ \t]*$/gm,
inside: {}
}, r["h2 alt"] = {
pattern: /^(.+)[ \t]*\n-+[ \t]*$/gm,
inside: {}
};
for (var o = 6; o >= 1; o--) r["h" + o] = {
pattern: new RegExp("^#{" + o + "}.+$", "gm"),
inside: {
"md md-hash": new RegExp("^#{" + o + "}")
}
};
r.li = {
pattern: /^[ \t]*([*+\-]|\d+\.)[ \t].+(?:\n|[ \t].*\n)*/gm,
inside: {
"md md-li": /^[ \t]*([*+\-]|\d+\.)[ \t]/m,
"pre gfm": {
pattern: /^((?: {4}|\t)+)`{3}.*\n(?:[\s\S]*?)\n\1`{3} *$/gm,
inside: {
"md md-pre": /`{3}/,
lf: i
}
},
lf: i
}
}, r.pre = {
pattern: /(^|(?:^|(?:^|\n)(?![ \t]*([*+\-]|\d+\.)[ \t]).*\n)\s*?\n)(\s*(?: {4}|\t).*(?:\n|$))+/g,
lookbehind: !0,
inside: {
lf: i
}
}, r.table = {
pattern: new RegExp([ "^", "[ ]{0,3}", "[|]", "(.+)\\n", "[ ]{0,3}", "[|]([ ]*[-:]+[-| :]*)\\n", "(", "(?:[ ]*[|].*\\n?)*", ")", "(?:\\n|$)" ].join(""), "gm"),
inside: {
lf: i
}
}, r["table alt"] = {
pattern: new RegExp([ "^", "[ ]{0,3}", "(\\S.*[|].*)\\n", "[ ]{0,3}", "([-:]+[ ]*[|][-| :]*)\\n", "(", "(?:.*[|].*\\n?)*", ")", "(?:\\n|$)" ].join(""), "gm"),
inside: {
lf: i
}
}, r.hr = {
pattern: /^([*\-_] *){3,}$/gm
}, r.blockquote = {
pattern: /^ {0,3}> *[^\n]+$/gm,
inside: {
"md md-gt": /^ {0,3}> */,
li: r.li
}
}, r["math block"] = {
pattern: /(\$\$|\\\\\[|\\\\\\\\\()[\s\S]*?(\$\$|\\\\\]|\\\\\\\\\))/g,
inside: {
"md md-bracket-start": /^(\$\$|\\\\\[|\\\\\\\\\()/,
"md md-bracket-end": /(\$\$|\\\\\]|\\\\\\\\\))/,
lf: i,
rest: n
}
}, r["latex block"] = {
pattern: /\\?\\begin\{([a-z]*\*?)\}[\s\S]*?\\?\\end\{\1\}/g,
inside: {
keyword: /\\?\\(begin|end)/,
lf: i,
rest: n
}
}, r.fndef = {
pattern: /^ {0,3}\[\^.*?\]:[ \t]+.*$/gm,
inside: {
"ref-id": {
pattern: /\[\^.*?\]/,
inside: {
"md md-bracket-start": /\[/,
"md md-bracket-end": /\]/
}
}
}
}, r.linkdef = {
pattern: /^ {0,3}\[.*?\]:[ \t]+.*$/gm,
inside: {
"link-id": {
pattern: /\[.*?\]/,
inside: {
"md md-bracket-start": /\[/,
"md md-bracket-end": /\]/
}
},
url: e,
linktitle: /['\"\(][^\'\"\)]*['\"\)]/
}
}, r.p = {
pattern: /.+/g,
inside: {
"md md-toc": /^\s*\[(toc|TOC)\]\s*$/g
}
}, r.lf = /^\n$/gm, r.img = {
pattern: /!\[[^\]]*\]\([^\)]+\)/g,
inside: {
"md md-bang": /^!/,
"md md-bracket-start": /\[/,
"md md-alt": /[^\[]+(?=\])/,
"md md-bracket-end": /\](?=\()/,
"md img-parens": {
pattern: /\([^\)]+\)/,
inside: {
"md md-paren-start": /^\(/,
"md md-title": /(['\u2018][^'\u2019]*['\u2019]|["\u201c][^"\u201d]*["\u201d])(?=\)$)/,
"md md-src": /[^\('" \t]+(?=[\)'" \t])/,
"md md-paren-end": /\)$/
}
}
}
}, r.link = {
pattern: /\[(?:(\\.)|[^\[\]])*\]\([^\(\)\s]+(\(\S*?\))??[^\(\)\s]*?(\s(['\u2018][^'\u2019]*['\u2019]|["\u201c][^"\u201d]*["\u201d]))?\)/gm,
inside: {
"md md-bracket-start": {
pattern: /(^|[^\\])\[/,
lookbehind: !0
},
"md md-underlined-text": {
pattern: /(?:(\\.)|[^\[\]])+(?=\])/
},
"md md-bracket-end": /\]\s?\(/,
"md md-paren-end": /\)$/,
"md md-href": /.*/
}
}, r.fn = {
pattern: /\[\^(.*?)\]/g,
inside: {
ref: {
pattern: /^\[[^\[\]]+\] ?/,
inside: {
"md md-bracket-start": /\[/,
"md md-ref": /^[^\[\]]+/,
"md md-bracket-end": /\]/
}
}
}
}, r.imgref = {
pattern: /!\[(.*?)\] ?\[(.*?)\]/g,
inside: {
"md md-bang": /^!/,
"ref-end": {
pattern: /\[[^\[\]]+\]$/,
inside: {
"md md-bracket-start": /\[/,
"md md-href": /[^\[\]]+(?=]$)/,
"md md-bracket-end": /\]/
}
},
"ref-start": {
pattern: /^\[[^\[\]]+\] ?/,
inside: {
"md md-bracket-start": /\[/,
"md md-alt": /^[^\[\]]+/,
"md md-bracket-end": /\]/
}
}
}
}, r.linkref = {
pattern: /\[(.*?)\] ?\[(.*?)\]/g,
inside: {
"ref-end": {
pattern: /\[[^\[\]]+\]$/,
inside: {
"md md-bracket-start": /\[/,
"md md-href": /[^\[\]]+(?=]$)/,
"md md-bracket-end": /\]/
}
},
"ref-start": {
pattern: /^\[[^\[\]]+\] ?/,
inside: {
"md md-bracket-start": /\[/,
"md md-underlined-text": /^[^\[\]]+/,
"md md-bracket-end": /\]/
}
}
}
}, r.code = {
pattern: /(^|[^\\])(`+)([^\r]*?[^`])\2(?!`)/g,
lookbehind: !0,
inside: {
"md md-code": /`/
}
}, r.math = {
pattern: /\$.*?\$/g,
inside: {
"md md-bracket-start": /^\$/,
"md md-bracket-end": /\$$/,
rest: n
}
}, r.strong = {
pattern: /([_\*])\1((?!\1{2}).)*\1{2}/g,
inside: {
"md md-strong": /([_\*])\1/g
}
}, r.em = {
pattern: /(^|[^\\])(\*|_)(\S[^\2]*?)??[^\s\\]+?\2/g,
lookbehind: !0,
inside: {
"md md-em md-start": /^(\*|_)/,
"md md-em md-close": /(\*|_)$/
}
}, r.strike = {
pattern: /(^|\n|\W)(~~)(?=\S)([^\r]*?\S)\2/gm,
lookbehind: !0,
inside: {
"md md-s": /(~~)/,
"md-strike-text": /[^~]+/
}
};
for (var a = {
code: r.code,
math: r.math,
fn: r.fn,
img: r.img,
link: r.link,
imgref: r.imgref,
linkref: r.linkref,
url: e,
email: t,
strong: r.strong,
em: r.em,
strike: r.strike,
conflict: /\u29f8\u29f8/g,
comment: Prism.languages.markup.comment,
tag: Prism.languages.markup.tag,
entity: Prism.languages.markup.entity
}, s = 6; s >= 1; s--) r["h" + s].inside.rest = a;
r["h1 alt"].inside.rest = a, r["h2 alt"].inside.rest = a, r.table.inside.rest = a,
r["table alt"].inside.rest = a, r.p.inside.rest = a, r.blockquote.inside.rest = a,
r.li.inside.rest = a, r.fndef.inside.rest = a, a = {
code: r.code,
fn: r.fn,
link: r.link,
linkref: r.linkref,
conflict: /\u29f8\u29f8/g
}, r.strong.inside.rest = a, r.em.inside.rest = a, r.strike.inside.rest = a;
var l = {
code: r.code,
strong: r.strong,
em: r.em,
strike: r.strike,
conflict: /\u29f8\u29f8/g,
comment: Prism.languages.markup.comment,
tag: Prism.languages.markup.tag,
entity: Prism.languages.markup.entity
};
return r.link.inside["md md-underlined-text"].inside = l, r.linkref.inside["ref-start"].inside["md md-underlined-text"].inside = l,
r;
}(), define("libs/prism-markdown", [ "bower-libs/prism/components/prism-markup", "libs/prism-latex" ], function() {}),
define("editor", [ "jquery", "underscore", "utils", "settings", "eventMgr", "prism-core", "diff_match_patch_uncompressed", "jsondiffpatch", "crel", "rangy", "MutationObservers", "libs/prism-markdown" ], function(e, t, n, i, r, o, a, s, l, c) {
function u() {
this.isWatching = !1;
var e;
this.startWatching = function() {
this.isWatching = !0, e = e || new MutationObserver(S), e.observe(N, {
childList: !0,
subtree: !0,
characterData: !0
});
}, this.stopWatching = function() {
e.disconnect(), this.isWatching = !1;
}, this.noWatch = function(e) {
!0 === this.isWatching ? (this.stopWatching(), e(), this.startWatching()) : e();
};
}
function d() {
var e = this, o = 0, a = 0;
this.selectionStart = 0, this.selectionEnd = 0, this.cursorY = 0, this.adjustTop = 0,
this.adjustBottom = 0, this.findOffsets = function(e) {
var t = [];
if (!e.length) return t;
for (var n = e.shift(), i = document.createTreeWalker(N, 4, null, !1), r = "", o = 0; i.nextNode(); ) {
r = i.currentNode.nodeValue || "";
for (var a = o + r.length; a > n; ) {
if (t.push({
container: i.currentNode,
offsetInContainer: n - o,
offset: n
}), !e.length) return t;
n = e.shift();
}
o = a;
}
do t.push({
container: i.currentNode,
offsetInContainer: r.length,
offset: n
}), n = e.shift(); while (n);
return t;
}, this.createRange = function(e, n) {
e = 0 > e ? 0 : e, n = 0 > n ? 0 : n;
var i, r, o = document.createRange(), a = [];
t.isNumber(e) && (a.push(e), i = a.length - 1), t.isNumber(n) && (a.push(n), r = a.length - 1),
a = this.findOffsets(a);
var s = t.isObject(e) ? e : a[i];
o.setStart(s.container, s.offsetInContainer);
var l = s;
return n && n != e && (l = t.isObject(n) ? n : a[r]), o.setEnd(l.container, l.offsetInContainer),
o;
};
var s, l = n.debounce(function() {
D.toggleClass("has-selection", this.selectionStart !== this.selectionEnd);
var e = this.getCoordinates(this.selectionEnd, this.selectionEndContainer, this.selectionEndOffset);
if (this.cursorY !== e.y && (this.cursorY = e.y, r.onCursorCoordinates(e.x, e.y)),
s) {
var t, n;
if (t = n = I.offsetHeight / 2 * i.cursorFocusRatio, t = this.adjustTop || t, n = this.adjustBottom || t,
t && n) {
var o = I.scrollTop + t, a = I.scrollTop + I.offsetHeight - n;
V.cursorY < o ? I.scrollTop += V.cursorY - o : V.cursorY > a && (I.scrollTop += V.cursorY - a);
}
}
s = !1;
}, this);
this.updateCursorCoordinates = function(e) {
s = s || e, l();
}, this.updateSelectionRange = function() {
var e = Math.min(this.selectionStart, this.selectionEnd), t = Math.max(this.selectionStart, this.selectionEnd), n = this.createRange(e, t), i = c.getSelection();
i.removeAllRanges(), i.addRange(n, this.selectionStart > this.selectionEnd);
};
var u = t.debounce(function() {
o = e.selectionStart, a = e.selectionEnd;
}, 50);
this.setSelectionStartEnd = function(e, t) {
void 0 === e && (e = this.selectionStart), 0 > e && (e = 0), void 0 === t && (t = this.selectionEnd),
0 > t && (t = 0), this.selectionStart = e, this.selectionEnd = t, G.editorStart = e,
G.editorEnd = t, u();
}, this.saveSelectionState = function() {
function t() {
if (!1 === q) {
var t = e.selectionStart, n = e.selectionEnd, i = c.getSelection();
if (i.rangeCount > 0) {
var r = i.getRangeAt(0), o = r.startContainer;
if (N.compareDocumentPosition(o) & Node.DOCUMENT_POSITION_CONTAINED_BY || N === o) {
var a = r.startOffset;
o.hasChildNodes() && a > 0 && (o = o.childNodes[a - 1], a = o.textContent.length);
for (var s = o; o != N; ) {
for (;o = o.previousSibling; ) o.textContent && (a += o.textContent.length);
o = s = s.parentNode;
}
i.isBackwards() ? (t = a + r.toString().length, n = a) : (t = a, n = a + r.toString().length),
t === n && "\n" == r.startContainer.textContent && 1 == r.startOffset && (t = --n,
e.setSelectionStartEnd(t, n), e.updateSelectionRange());
}
}
e.setSelectionStartEnd(t, n);
}
X.saveSelectionState();
}
var i = !1, r = n.debounce(function() {
t(), e.updateCursorCoordinates(i), s();
}), s = n.debounce(function() {
t(), o === e.selectionStart && a === e.selectionEnd && (i = !1), e.updateCursorCoordinates(i),
i = !1;
}, 10);
return function(e, n, s) {
return s && (o = void 0, a = void 0), e ? (i = i || n, r()) : void t();
};
}(), this.getSelectedText = function() {
var e = Math.min(this.selectionStart, this.selectionEnd), t = Math.max(this.selectionStart, this.selectionEnd);
return W.substring(e, t);
}, this.getCoordinates = function(e, t, n) {
if (!t) {
var i = this.findOffsets([ e ])[0];
t = i.container, n = i.offsetInContainer;
}
var r = 0;
if ("\n" == t.textContent) r = t.parentNode.offsetTop + t.parentNode.offsetHeight / 2; else {
var o = W[e], a = {
container: t,
offsetInContainer: n,
offset: e
}, s = {
container: t,
offsetInContainer: n,
offset: e
};
e > 0 && (void 0 === o || "\n" == o) ? 0 === a.offset ? a = e - 1 : a.offsetInContainer -= 1 : s.offset === t.textContent.length ? s = e + 1 : s.offsetInContainer += 1;
var l = this.createRange(a, s), c = l.getBoundingClientRect();
r = c.top + c.height / 2 - I.getBoundingClientRect().top + I.scrollTop;
}
return {
x: 0,
y: r
};
}, this.getClosestWordOffset = function(e) {
var t = 0, n = 0, i = 0;
return W.split(/\s/).some(function(r) {
return r && (t = i, (n = i + r.length) > e) ? !0 : void (i += r.length + 1);
}), {
start: t,
end: n
};
};
}
function p(e) {
void 0 !== I && V.saveSelectionState(!0, !0, e);
}
function h(e) {
var t = U.diff_commonPrefix(W, e);
t === W.length && t--;
var n = Math.min(U.diff_commonSuffix(W, e), W.length - t, e.length - t), i = e.substring(t, e.length - n), r = V.createRange(t, W.length - n);
return r.deleteContents(), r.insertNode(document.createTextNode(i)), {
start: t,
end: e.length - n
};
}
function f(e, t, n) {
X.currentMode = X.currentMode || "replace";
var i = V.createRange(Math.min(e, t), Math.max(e, t));
"" + i != n && (i.deleteContents(), i.insertNode(document.createTextNode(n)));
var r = e + n.length;
V.setSelectionStartEnd(r, r), V.updateSelectionRange(), V.updateCursorCoordinates(!0);
}
function m(e, t) {
X.currentMode = X.currentMode || "replace";
var n = W.replace(e, t);
if (n != W) {
var i = F.setValue(n);
V.setSelectionStartEnd(i.end, i.end), V.updateSelectionRange(), V.updateCursorCoordinates(!0);
}
}
function g(e, t) {
var n = V.selectionStart;
if (n !== V.selectionEnd) return !1;
var i = V.createRange(n - e.length, n);
return "" + i == e && (i.deleteContents(), i.insertNode(document.createTextNode(t)),
n = n - e.length + t.length, V.setSelectionStartEnd(n, n), V.updateSelectionRange(),
V.updateCursorCoordinates(!0), !0);
}
function v(e) {
h(e), W = e;
}
function b() {
return W;
}
function y() {
M.focus(), V.updateSelectionRange(), I.scrollTop = B;
}
function x() {
function e(e, n, i) {
H.noWatch(function() {
if (W != e.content && (v(e.content), G.content = e.content, r.onContentChanged(G, e.content)),
V.setSelectionStartEnd(n, i), V.updateSelectionRange(), V.updateCursorCoordinates(!0),
G.discussionListJSON != e.discussionListJSON) {
var o = G.discussionList;
G.discussionListJSON = e.discussionListJSON;
var a = G.discussionList, s = z.diff(o, a), l = !1;
t.each(s, function(e, n) {
t.isArray(e) ? 1 === e.length ? r.onDiscussionCreated(G, a[n]) : r.onDiscussionRemoved(G, o[n]) : l = !0;
}), l && r.onCommentsChanged(G);
}
}), s = n, l = i, a = e, this.currentMode = void 0, o = void 0, this.onButtonStateChange(),
p();
}
var i, o, a, s, l, c = [], u = [];
this.setCommandMode = function() {
this.currentMode = "command";
}, this.setMode = function() {}, this.onButtonStateChange = function() {}, this.saveState = n.debounce(function() {
u = [];
var e = Date.now();
if ("comment" == this.currentMode || "replace" == this.currentMode || "newlines" == o || this.currentMode != o || e - i > 1e3) for (c.push(a); c.length > 100; ) c.shift(); else s = a.selectionStartBefore,
l = a.selectionEndBefore;
a = {
selectionStartBefore: s,
selectionEndBefore: l,
selectionStartAfter: V.selectionStart,
selectionEndAfter: V.selectionEnd,
content: W,
discussionListJSON: G.discussionListJSON
}, i = e, o = this.currentMode, this.currentMode = void 0, this.onButtonStateChange();
}, this), this.saveSelectionState = t.debounce(function() {
void 0 === this.currentMode && (s = V.selectionStart, l = V.selectionEnd);
}, 50), this.canUndo = function() {
return c.length;
}, this.canRedo = function() {
return u.length;
}, this.undo = function() {
var t = c.pop();
t && (u.push(a), e.call(this, t, a.selectionStartBefore, a.selectionEndBefore));
}, this.redo = function() {
var t = u.pop();
t && (c.push(a), e.call(this, t, t.selectionStartAfter, t.selectionEndAfter));
}, this.init = function() {
var e = G.content;
c = [], u = [], i = 0, a = {
selectionStartAfter: G.selectionStart,
selectionEndAfter: G.selectionEnd,
content: e,
discussionListJSON: G.discussionListJSON
}, this.currentMode = void 0, o = void 0, N.textContent = e, S();
};
}
function w() {
!0 === H.isWatching && (X.currentMode = X.currentMode || "comment", X.saveState());
}
function S() {
var e = I.textContent;
if (N.lastChild === O && "\n" == O.textContent.slice(-1) && (e = e.slice(0, -1)),
e = e.replace(/\r\n?/g, "\n"), !1 === q) {
if (e == W) return void (0 === N.children.length && (N.innerHTML = "", K.forEach(function(e) {
N.appendChild(e.elt);
}), E()));
X.currentMode = X.currentMode || "typing";
var n = t.values(G.discussionList);
G.newDiscussion && n.push(G.newDiscussion);
var i = C(W, e, n);
W = e, !0 === i && (G.discussionList = G.discussionList), G.content = W, V.saveSelectionState(),
r.onContentChanged(G, W), i && r.onCommentsChanged(G), X.saveState(), Q();
} else W = e, G.content = W, V.setSelectionStartEnd(G.editorStart, G.editorEnd),
V.updateSelectionRange(), V.updateCursorCoordinates(), X.saveSelectionState(), r.onFileOpen(G, W),
R.scrollTop = G.previewScrollTop, B = G.editorScrollTop, I.scrollTop = B, q = !1;
}
function C(e, t, n) {
if (n.length) {
var i = U.diff_main(e, t), r = !1, o = 0;
return i.forEach(function(e) {
var t = e[0], i = e[1];
if (0 === t) return void (o += i.length);
var a = o, s = i.length;
-1 === t && (a += s, s = -s), n.forEach(function(e) {
e.selectionEnd > a ? (e.selectionEnd += s, e.discussionIndex && (r = !0)) : e.selectionEnd > o && (e.selectionEnd = o,
e.discussionIndex && (r = !0)), e.selectionStart >= a ? (e.selectionStart += s,
e.discussionIndex && (r = !0)) : e.selectionStart > o && (e.selectionStart = o,
e.discussionIndex && (r = !0));
}), 1 === t && (o += i.length);
}), r;
}
}
function _(e) {
if (Z = [], J = [], Y = void 0, !0 === q) return J = K, K = e, void (Z = e);
var n = K.length;
t.some(K, function(t, i) {
var r = e[i];
return i >= e.length || t.textWithFrontMatter != r.textWithFrontMatter || t.elt.parentNode !== N || t.elt.textContent != r.textWithFrontMatter ? (n = i,
!0) : void 0;
});
var i = -K.length;
t.some(K.slice().reverse(), function(t, n) {
var r = e[e.length - n - 1];
return n >= e.length || t.textWithFrontMatter != r.textWithFrontMatter || t.elt.parentNode !== N || t.elt.textContent != r.textWithFrontMatter ? (i = -n,
!0) : void 0;
}), n - i > K.length && (i = n - K.length);
var r = K.slice(0, n);
Z = e.slice(n, e.length + i);
var o = K.slice(K.length + i, K.length);
Y = t.first(o), J = K.slice(n, K.length + i), K = r.concat(Z).concat(o);
}
function k() {
var e = document.createDocumentFragment();
Z.forEach(function(t) {
T(t), e.appendChild(t.elt);
}), H.noWatch(function() {
if (!0 === q) N.innerHTML = "", N.appendChild(e); else {
J.forEach(function(e) {
e.elt.parentNode === N && N.removeChild(e.elt), e.elt.generated = !1;
}), void 0 !== Y ? N.insertBefore(e, Y.elt) : N.appendChild(e);
for (var t = N.firstChild; t; ) {
var n = t.nextSibling;
t.generated || N.removeChild(t), t = n;
}
}
E(), V.updateSelectionRange(), V.updateCursorCoordinates();
});
}
function E() {
O = l("span", {
"class": "token lf"
}), O.textContent = "\n", N.appendChild(O);
}
function T(e) {
var t = et(e.text);
window.viewerMode || (t = o.highlight(t, o.languages.md));
var n = e.textWithFrontMatter.substring(0, e.textWithFrontMatter.length - e.text.length);
n.length && (n = et(n), n = n.replace(/\n/g, '<span class="token lf">\n</span>'),
t = '<span class="token md">' + n + "</span>" + t);
var i = l("span", {
id: "wmd-input-section-" + e.id,
"class": "wmd-input-section"
});
i.generated = !0, i.innerHTML = t, e.elt = i;
}
var I, D, N, M, L, A, R, P, O, F = {}, B = 0, j = function() {
var e, n = 0, r = function() {
var e = Date.now();
P.refreshPreview(), n = Date.now() - e;
};
return !0 === i.lazyRendering ? t.debounce(r, 500) : function() {
clearTimeout(e), e = setTimeout(r, 2e3 > n ? n : 2e3);
};
}();
r.addListener("onPagedownConfigure", function(e) {
P = e;
});
var $ = 0;
r.addListener("onSectionsCreated", function(e) {
$ || (_(e), k()), !0 === q ? P.refreshPreview() : j();
});
var G, q = !0;
r.addListener("onFileSelected", function(e) {
q = !0, G = e;
});
var H = new u();
F.watcher = H;
var U = new a(), z = s.create({
objectHash: function(e) {
return JSON.stringify(e);
},
arrays: {
detectMove: !1
},
textDiff: {
minLength: 9999999
}
}), V = new d();
F.selectionMgr = V, e(document).on("selectionchange", ".editor-content", t.bind(V.saveSelectionState, V, !0, !1)),
F.adjustCursorPosition = p;
var W;
F.setValue = h, F.replace = f, F.replaceAll = m, F.replacePreviousText = g, F.setValueNoWatch = v,
F.getValue = b, F.focus = y;
var X = new x();
F.undoMgr = X, r.addListener("onDiscussionCreated", w), r.addListener("onDiscussionRemoved", w),
r.addListener("onCommentsChanged", w);
var Q = t.debounce(function() {
var e = window.getSelection();
V.hasFocus && !$ && V.selectionStart === V.selectionEnd && e.modify && (V.selectionStart ? (e.modify("move", "backward", "character"),
e.modify("move", "forward", "character")) : (e.modify("move", "forward", "character"),
e.modify("move", "backward", "character")));
}, 10);
F.adjustCommentOffsets = C, F.init = function() {
if (I = document.getElementById("wmd-input"), D = e(I), N = I.querySelector(".editor-content"),
M = e(N), L = I.querySelector(".editor-margin"), A = e(L), R = document.querySelector(".preview-container"),
D.addClass(i.editorFontClass), H.startWatching(), e(I).scroll(function() {
B = I.scrollTop, !1 === q && (G.editorScrollTop = B);
}), e(R).scroll(function() {
!1 === q && (G.previewScrollTop = R.scrollTop);
}), /AppleWebKit\/([\d.]+)/.exec(navigator.userAgent)) {
var n = e('<input style="width:1px;height:1px;border:none;margin:0;padding:0;" tabIndex="-1">').appendTo("html");
M.blur(function() {
n[0].setSelectionRange(0, 0), n.blur();
});
}
I.focus = y, I.adjustCursorPosition = p, Object.defineProperty(I, "value", {
get: function() {
return W;
},
set: h
}), Object.defineProperty(I, "selectionStart", {
get: function() {
return Math.min(V.selectionStart, V.selectionEnd);
},
set: function(e) {
V.setSelectionStartEnd(e), V.updateSelectionRange(), V.updateCursorCoordinates();
},
enumerable: !0,
configurable: !0
}), Object.defineProperty(I, "selectionEnd", {
get: function() {
return Math.max(V.selectionStart, V.selectionEnd);
},
set: function(e) {
V.setSelectionStartEnd(void 0, e), V.updateSelectionRange(), V.updateCursorCoordinates();
},
enumerable: !0,
configurable: !0
});
var r = !1;
M.on("keydown", function(e) {
if (17 !== e.which && 91 !== e.which && 18 !== e.which && 16 !== e.which) {
V.saveSelectionState(), p();
var t = e.metaKey || e.ctrlKey;
switch (e.which) {
case 9:
t || (o("indent", {
inverse: e.shiftKey
}), e.preventDefault());
break;
case 13:
o("newline"), e.preventDefault();
}
13 !== e.which && (r = !1);
}
}).on("compositionstart", function() {
$++;
}).on("compositionend", function() {
setTimeout(function() {
$--;
}, 0);
}).on("mouseup", t.bind(V.saveSelectionState, V, !0, !1)).on("paste", function(e) {
X.currentMode = "paste", e.preventDefault();
var t, n = (e.originalEvent || e).clipboardData;
n ? t = n.getData("text/plain") : (n = window.clipboardData, t = n && n.getData("Text")),
t && (f(V.selectionStart, V.selectionEnd, t), p());
}).on("cut", function() {
X.currentMode = "cut", p();
}).on("focus", function() {
V.hasFocus = !0;
}).on("blur", function() {
V.hasFocus = !1;
});
var o = function(e, t) {
var n = b(), i = Math.min(V.selectionStart, V.selectionEnd), r = Math.max(V.selectionStart, V.selectionEnd), o = {
selectionStart: i,
selectionEnd: r,
before: n.slice(0, i),
after: n.slice(r),
selection: n.slice(i, r)
};
s[e](o, t || {}), h(o.before + o.selection + o.after), V.setSelectionStartEnd(o.selectionStart, o.selectionEnd),
V.updateSelectionRange();
}, a = /^ {0,3}>[ ]*|^[ \t]*(?:[*+\-]|(\d+)\.)[ \t]|^\s+/, s = {
indent: function(e, t) {
function n(e, t, n, i) {
return n = +n || 0, i = i || "", e.slice(0, t) + i + e.slice(t + n);
}
var i = e.before.lastIndexOf("\n") + 1;
if (t.inverse) /\s/.test(e.before.charAt(i)) && (e.before = n(e.before, i, 1), e.selectionStart--,
e.selectionEnd--), e.selection = e.selection.replace(/^[ \t]/gm, ""); else {
var r = e.before.slice(i);
if (!e.selection && !r.match(a)) return e.before += " ", e.selectionStart++, void e.selectionEnd++;
e.before = n(e.before, i, 0, " "), e.selection = e.selection.replace(/\r?\n(?=[\s\S])/g, "\n "),
e.selectionStart++, e.selectionEnd++;
}
e.selectionEnd = e.selectionStart + e.selection.length;
},
newline: function(e) {
var t = e.before.lastIndexOf("\n") + 1;
if (r) return e.before = e.before.substring(0, t), e.selection = "", e.selectionStart = t,
e.selectionEnd = t, void (r = !1);
r = !1;
var n = e.before.slice(t), i = n.match(a), o = (i || [ "" ])[0];
if (i && i[1]) {
var s = parseInt(i[1], 10);
o = o.replace(/\d+/, s + 1);
}
o.length && (r = !0), X.currentMode = "newlines", e.before += "\n" + o, e.selection = "",
e.selectionStart += o.length + 1, e.selectionEnd = e.selectionStart;
}
};
};
var Y, K = [], J = [], Z = [], et = function() {
var e = {
"&": "&amp;",
"<": "&lt;",
"\xa0": " "
};
return function(t) {
return t.replace(/[&<\u00a0]/g, function(t) {
return e[t];
});
};
}();
return r.onEditorCreated(F), F;
}), function(e) {
"use strict";
function t() {
n.READY || (v.determineEventTypes(), h.each(n.gestures, function(e) {
y.register(e);
}), v.onTouch(n.DOCUMENT, d, y.detect), v.onTouch(n.DOCUMENT, p, y.detect), n.READY = !0);
}
var n = function(e, t) {
return new n.Instance(e, t || {});
};
n.VERSION = "1.0.11", n.defaults = {
stop_browser_behavior: {
userSelect: "none",
touchAction: "pan-y",
touchCallout: "none",
contentZooming: "none",
userDrag: "none",
tapHighlightColor: "rgba(0,0,0,0)"
}
}, n.HAS_POINTEREVENTS = e.navigator.pointerEnabled || e.navigator.msPointerEnabled,
n.HAS_TOUCHEVENTS = "ontouchstart" in e, n.MOBILE_REGEX = /mobile|tablet|ip(ad|hone|od)|android|silk/i,
n.NO_MOUSEEVENTS = n.HAS_TOUCHEVENTS && e.navigator.userAgent.match(n.MOBILE_REGEX),
n.EVENT_TYPES = {}, n.UPDATE_VELOCITY_INTERVAL = 16, n.DOCUMENT = e.document;
var i = n.DIRECTION_DOWN = "down", r = n.DIRECTION_LEFT = "left", o = n.DIRECTION_UP = "up", a = n.DIRECTION_RIGHT = "right", s = n.POINTER_MOUSE = "mouse", l = n.POINTER_TOUCH = "touch", c = n.POINTER_PEN = "pen", u = n.EVENT_START = "start", d = n.EVENT_MOVE = "move", p = n.EVENT_END = "end";
n.plugins = n.plugins || {}, n.gestures = n.gestures || {}, n.READY = !1;
var h = n.utils = {
extend: function(e, t, n) {
for (var i in t) void 0 !== e[i] && n || (e[i] = t[i]);
return e;
},
each: function(e, t, n) {
var i, r;
if ("forEach" in e) e.forEach(t, n); else if (void 0 !== e.length) {
for (i = -1; r = e[++i]; ) if (!1 === t.call(n, r, i, e)) return;
} else for (i in e) if (e.hasOwnProperty(i) && !1 === t.call(n, e[i], i, e)) return;
},
inStr: function(e, t) {
return e.indexOf(t) > -1;
},
hasParent: function(e, t) {
for (;e; ) {
if (e == t) return !0;
e = e.parentNode;
}
return !1;
},
getCenter: function(e) {
var t = [], n = [], i = [], r = [], o = Math.min, a = Math.max;
return 1 === e.length ? {
pageX: e[0].pageX,
pageY: e[0].pageY,
clientX: e[0].clientX,
clientY: e[0].clientY
} : (h.each(e, function(e) {
t.push(e.pageX), n.push(e.pageY), i.push(e.clientX), r.push(e.clientY);
}), {
pageX: (o.apply(Math, t) + a.apply(Math, t)) / 2,
pageY: (o.apply(Math, n) + a.apply(Math, n)) / 2,
clientX: (o.apply(Math, i) + a.apply(Math, i)) / 2,
clientY: (o.apply(Math, r) + a.apply(Math, r)) / 2
});
},
getVelocity: function(e, t, n) {
return {
x: Math.abs(t / e) || 0,
y: Math.abs(n / e) || 0
};
},
getAngle: function(e, t) {
var n = t.clientX - e.clientX, i = t.clientY - e.clientY;
return 180 * Math.atan2(i, n) / Math.PI;
},
getDirection: function(e, t) {
return Math.abs(e.clientX - t.clientX) >= Math.abs(e.clientY - t.clientY) ? e.clientX - t.clientX > 0 ? r : a : e.clientY - t.clientY > 0 ? o : i;
},
getDistance: function(e, t) {
var n = t.clientX - e.clientX, i = t.clientY - e.clientY;
return Math.sqrt(n * n + i * i);
},
getScale: function(e, t) {
return e.length >= 2 && t.length >= 2 ? this.getDistance(t[0], t[1]) / this.getDistance(e[0], e[1]) : 1;
},
getRotation: function(e, t) {
return e.length >= 2 && t.length >= 2 ? this.getAngle(t[1], t[0]) - this.getAngle(e[1], e[0]) : 0;
},
isVertical: function(e) {
return e == o || e == i;
},
toggleDefaultBehavior: function(e, t, n) {
if (t && e && e.style) {
h.each([ "webkit", "moz", "Moz", "ms", "o", "" ], function(i) {
h.each(t, function(t, r) {
i && (r = i + r.substring(0, 1).toUpperCase() + r.substring(1)), r in e.style && (e.style[r] = !n && t);
});
});
var i = function() {
return !1;
};
"none" == t.userSelect && (e.onselectstart = !n && i), "none" == t.userDrag && (e.ondragstart = !n && i);
}
}
};
n.Instance = function(e, i) {
var r = this;
return t(), this.element = e, this.enabled = !0, this.options = h.extend(h.extend({}, n.defaults), i || {}),
this.options.stop_browser_behavior && h.toggleDefaultBehavior(this.element, this.options.stop_browser_behavior, !1),
this.eventStartHandler = v.onTouch(e, u, function(e) {
r.enabled && y.startDetect(r, e);
}), this.eventHandlers = [], this;
}, n.Instance.prototype = {
on: function(e, t) {
var n = e.split(" ");
return h.each(n, function(e) {
this.element.addEventListener(e, t, !1), this.eventHandlers.push({
gesture: e,
handler: t
});
}, this), this;
},
off: function(e, t) {
var n, i, r = e.split(" ");
return h.each(r, function(e) {
for (this.element.removeEventListener(e, t, !1), n = -1; i = this.eventHandlers[++n]; ) i.gesture === e && i.handler === t && this.eventHandlers.splice(n, 1);
}, this), this;
},
trigger: function(e, t) {
t || (t = {});
var i = n.DOCUMENT.createEvent("Event");
i.initEvent(e, !0, !0), i.gesture = t;
var r = this.element;
return h.hasParent(t.target, r) && (r = t.target), r.dispatchEvent(i), this;
},
enable: function(e) {
return this.enabled = e, this;
},
dispose: function() {
var e, t;
for (this.options.stop_browser_behavior && h.toggleDefaultBehavior(this.element, this.options.stop_browser_behavior, !0),
e = -1; t = this.eventHandlers[++e]; ) this.element.removeEventListener(t.gesture, t.handler, !1);
return this.eventHandlers = [], v.unbindDom(this.element, n.EVENT_TYPES[u], this.eventStartHandler),
null;
}
};
var f = null, m = !1, g = !1, v = n.event = {
bindDom: function(e, t, n) {
var i = t.split(" ");
h.each(i, function(t) {
e.addEventListener(t, n, !1);
});
},
unbindDom: function(e, t, n) {
var i = t.split(" ");
h.each(i, function(t) {
e.removeEventListener(t, n, !1);
});
},
onTouch: function(e, t, i) {
var r = this, o = function(o) {
var a = o.type.toLowerCase();
if (!h.inStr(a, "mouse") || !g) {
h.inStr(a, "touch") || h.inStr(a, "pointerdown") || h.inStr(a, "mouse") && 1 === o.which ? m = !0 : h.inStr(a, "mouse") && !o.which && (m = !1),
(h.inStr(a, "touch") || h.inStr(a, "pointer")) && (g = !0);
var s = 0;
m && (n.HAS_POINTEREVENTS && t != p ? s = b.updatePointer(t, o) : h.inStr(a, "touch") ? s = o.touches.length : g || (s = h.inStr(a, "up") ? 0 : 1),
s > 0 && t == p ? t = d : s || (t = p), (s || null === f) && (f = o), i.call(y, r.collectEventData(e, t, r.getTouchList(f, t), o)),
n.HAS_POINTEREVENTS && t == p && (s = b.updatePointer(t, o))), s || (f = null, m = !1,
g = !1, b.reset());
}
};
return this.bindDom(e, n.EVENT_TYPES[t], o), o;
},
determineEventTypes: function() {
var e;
e = n.HAS_POINTEREVENTS ? b.getEvents() : n.NO_MOUSEEVENTS ? [ "touchstart", "touchmove", "touchend touchcancel" ] : [ "touchstart mousedown", "touchmove mousemove", "touchend touchcancel mouseup" ],
n.EVENT_TYPES[u] = e[0], n.EVENT_TYPES[d] = e[1], n.EVENT_TYPES[p] = e[2];
},
getTouchList: function(e) {
return n.HAS_POINTEREVENTS ? b.getTouchList() : e.touches ? e.touches : (e.identifier = 1,
[ e ]);
},
collectEventData: function(e, t, n, i) {
var r = l;
return (h.inStr(i.type, "mouse") || b.matchType(s, i)) && (r = s), {
center: h.getCenter(n),
timeStamp: Date.now(),
target: i.target,
touches: n,
eventType: t,
pointerType: r,
srcEvent: i,
preventDefault: function() {
var e = this.srcEvent;
e.preventManipulation && e.preventManipulation(), e.preventDefault && e.preventDefault();
},
stopPropagation: function() {
this.srcEvent.stopPropagation();
},
stopDetect: function() {
return y.stopDetect();
}
};
}
}, b = n.PointerEvent = {
pointers: {},
getTouchList: function() {
var e = [];
return h.each(this.pointers, function(t) {
e.push(t);
}), e;
},
updatePointer: function(e, t) {
return e == p ? delete this.pointers[t.pointerId] : (t.identifier = t.pointerId,
this.pointers[t.pointerId] = t), Object.keys(this.pointers).length;
},
matchType: function(e, t) {
if (!t.pointerType) return !1;
var n = t.pointerType, i = {};
return i[s] = n === s, i[l] = n === l, i[c] = n === c, i[e];
},
getEvents: function() {
return [ "pointerdown MSPointerDown", "pointermove MSPointerMove", "pointerup pointercancel MSPointerUp MSPointerCancel" ];
},
reset: function() {
this.pointers = {};
}
}, y = n.detection = {
gestures: [],
current: null,
previous: null,
stopped: !1,
startDetect: function(e, t) {
this.current || (this.stopped = !1, this.current = {
inst: e,
startEvent: h.extend({}, t),
lastEvent: !1,
lastVelocityEvent: !1,
velocity: !1,
name: ""
}, this.detect(t));
},
detect: function(e) {
if (this.current && !this.stopped) {
e = this.extendEventData(e);
var t = this.current.inst, n = t.options;
return h.each(this.gestures, function(i) {
return this.stopped || !1 === n[i.name] || !1 === t.enabled || !1 !== i.handler.call(i, e, t) ? void 0 : (this.stopDetect(),
!1);
}, this), this.current && (this.current.lastEvent = e), e.eventType == p && !e.touches.length - 1 && this.stopDetect(),
e;
}
},
stopDetect: function() {
this.previous = h.extend({}, this.current), this.current = null, this.stopped = !0;
},
getVelocityData: function(e, t, i, r) {
var o = this.current, a = o.lastVelocityEvent, s = o.velocity;
a && e.timeStamp - a.timeStamp > n.UPDATE_VELOCITY_INTERVAL ? (s = h.getVelocity(e.timeStamp - a.timeStamp, e.center.clientX - a.center.clientX, e.center.clientY - a.center.clientY),
o.lastVelocityEvent = e) : o.velocity || (s = h.getVelocity(t, i, r), o.lastVelocityEvent = e),
o.velocity = s, e.velocityX = s.x, e.velocityY = s.y;
},
getInterimData: function(e) {
var t, n, i = this.current.lastEvent;
e.eventType == p ? (t = i && i.interimAngle, n = i && i.interimDirection) : (t = i && h.getAngle(i.center, e.center),
n = i && h.getDirection(i.center, e.center)), e.interimAngle = t, e.interimDirection = n;
},
extendEventData: function(e) {
var t = this.current, n = t.startEvent;
e.touches.length == n.touches.length && e.touches !== n.touches || (n.touches = [],
h.each(e.touches, function(e) {
n.touches.push(h.extend({}, e));
}));
var i = e.timeStamp - n.timeStamp, r = e.center.clientX - n.center.clientX, o = e.center.clientY - n.center.clientY;
return this.getVelocityData(e, i, r, o), this.getInterimData(e), h.extend(e, {
startEvent: n,
deltaTime: i,
deltaX: r,
deltaY: o,
distance: h.getDistance(n.center, e.center),
angle: h.getAngle(n.center, e.center),
direction: h.getDirection(n.center, e.center),
scale: h.getScale(n.touches, e.touches),
rotation: h.getRotation(n.touches, e.touches)
}), e;
},
register: function(e) {
var t = e.defaults || {};
return void 0 === t[e.name] && (t[e.name] = !0), h.extend(n.defaults, t, !0), e.index = e.index || 1e3,
this.gestures.push(e), this.gestures.sort(function(e, t) {
return e.index < t.index ? -1 : e.index > t.index ? 1 : 0;
}), this.gestures;
}
};
n.gestures.Drag = {
name: "drag",
index: 50,
defaults: {
drag_min_distance: 10,
correct_for_drag_min_distance: !0,
drag_max_touches: 1,
drag_block_horizontal: !1,
drag_block_vertical: !1,
drag_lock_to_axis: !1,
drag_lock_min_distance: 25
},
triggered: !1,
handler: function(e, t) {
var n = y.current;
if (n.name != this.name && this.triggered) return t.trigger(this.name + "end", e),
void (this.triggered = !1);
if (!(t.options.drag_max_touches > 0 && e.touches.length > t.options.drag_max_touches)) switch (e.eventType) {
case u:
this.triggered = !1;
break;
case d:
if (e.distance < t.options.drag_min_distance && n.name != this.name) return;
var s = n.startEvent.center;
if (n.name != this.name && (n.name = this.name, t.options.correct_for_drag_min_distance && e.distance > 0)) {
var l = Math.abs(t.options.drag_min_distance / e.distance);
s.pageX += e.deltaX * l, s.pageY += e.deltaY * l, s.clientX += e.deltaX * l, s.clientY += e.deltaY * l,
e = y.extendEventData(e);
}
(n.lastEvent.drag_locked_to_axis || t.options.drag_lock_to_axis && t.options.drag_lock_min_distance <= e.distance) && (e.drag_locked_to_axis = !0);
var c = n.lastEvent.direction;
e.drag_locked_to_axis && c !== e.direction && (e.direction = h.isVertical(c) ? e.deltaY < 0 ? o : i : e.deltaX < 0 ? r : a),
this.triggered || (t.trigger(this.name + "start", e), this.triggered = !0), t.trigger(this.name, e),
t.trigger(this.name + e.direction, e);
var f = h.isVertical(e.direction);
(t.options.drag_block_vertical && f || t.options.drag_block_horizontal && !f) && e.preventDefault();
break;
case p:
this.triggered && t.trigger(this.name + "end", e), this.triggered = !1;
}
}
}, n.gestures.Hold = {
name: "hold",
index: 10,
defaults: {
hold_timeout: 500,
hold_threshold: 2
},
timer: null,
handler: function(e, t) {
switch (e.eventType) {
case u:
clearTimeout(this.timer), y.current.name = this.name, this.timer = setTimeout(function() {
"hold" == y.current.name && t.trigger("hold", e);
}, t.options.hold_timeout);
break;
case d:
e.distance > t.options.hold_threshold && clearTimeout(this.timer);
break;
case p:
clearTimeout(this.timer);
}
}
}, n.gestures.Release = {
name: "release",
index: 1 / 0,
handler: function(e, t) {
e.eventType == p && t.trigger(this.name, e);
}
}, n.gestures.Swipe = {
name: "swipe",
index: 40,
defaults: {
swipe_min_touches: 1,
swipe_max_touches: 1,
swipe_velocity: .7
},
handler: function(e, t) {
if (e.eventType == p) {
if (e.touches.length < t.options.swipe_min_touches || e.touches.length > t.options.swipe_max_touches) return;
(e.velocityX > t.options.swipe_velocity || e.velocityY > t.options.swipe_velocity) && (t.trigger(this.name, e),
t.trigger(this.name + e.direction, e));
}
}
}, n.gestures.Tap = {
name: "tap",
index: 100,
defaults: {
tap_max_touchtime: 250,
tap_max_distance: 10,
tap_always: !0,
doubletap_distance: 20,
doubletap_interval: 300
},
has_moved: !1,
handler: function(e, t) {
var n, i, r;
e.eventType == u ? this.has_moved = !1 : e.eventType != d || this.moved ? e.eventType == p && "touchcancel" != e.srcEvent.type && e.deltaTime < t.options.tap_max_touchtime && !this.has_moved && (n = y.previous,
i = n && n.lastEvent && e.timeStamp - n.lastEvent.timeStamp, r = !1, n && "tap" == n.name && i && i < t.options.doubletap_interval && e.distance < t.options.doubletap_distance && (t.trigger("doubletap", e),
r = !0), r && !t.options.tap_always || (y.current.name = "tap", t.trigger(y.current.name, e))) : this.has_moved = e.distance > t.options.tap_max_distance;
}
}, n.gestures.Touch = {
name: "touch",
index: -1 / 0,
defaults: {
prevent_default: !1,
prevent_mouseevents: !1
},
handler: function(e, t) {
return t.options.prevent_mouseevents && e.pointerType == s ? void e.stopDetect() : (t.options.prevent_default && e.preventDefault(),
void (e.eventType == u && t.trigger(this.name, e)));
}
}, n.gestures.Transform = {
name: "transform",
index: 45,
defaults: {
transform_min_scale: .01,
transform_min_rotation: 1,
transform_always_block: !1,
transform_within_instance: !1
},
triggered: !1,
handler: function(e, t) {
if (y.current.name != this.name && this.triggered) return t.trigger(this.name + "end", e),
void (this.triggered = !1);
if (!(e.touches.length < 2)) {
if (t.options.transform_always_block && e.preventDefault(), t.options.transform_within_instance) for (var n = -1; e.touches[++n]; ) if (!h.hasParent(e.touches[n].target, t.element)) return;
switch (e.eventType) {
case u:
this.triggered = !1;
break;
case d:
var i = Math.abs(1 - e.scale), r = Math.abs(e.rotation);
if (i < t.options.transform_min_scale && r < t.options.transform_min_rotation) return;
y.current.name = this.name, this.triggered || (t.trigger(this.name + "start", e),
this.triggered = !0), t.trigger(this.name, e), r > t.options.transform_min_rotation && t.trigger("rotate", e),
i > t.options.transform_min_scale && (t.trigger("pinch", e), t.trigger("pinch" + (e.scale < 1 ? "in" : "out"), e));
break;
case p:
this.triggered && t.trigger(this.name + "end", e), this.triggered = !1;
}
}
}
}, "function" == typeof define && define.amd ? define("hammerjs", [], function() {
return n;
}) : "object" == typeof module && module.exports ? module.exports = n : e.Hammer = n;
}(window), define("layout", [ "jquery", "underscore", "utils", "constants", "settings", "eventMgr", "crel", "mousetrap", "hammerjs" ], function(e, t, n, i, r, o, a, s, l) {
function c() {
H = !0, b.$elt.addClass("layout-animate");
}
function u() {
H = !1, b.$elt.removeClass("layout-animate");
}
function d(t) {
this.selector = t, this.elt = document.querySelector(t), this.$elt = e(this.elt);
}
function p(e) {
e && e.target !== b.elt && e.target !== y.elt && e.target !== k.elt || (U.forEach(function(e) {
e();
}), u(), 0 !== U.length && f(), U = []);
}
function h() {
return t.find(et, function(e) {
return v.width > e.screenWidth;
}).maxWidth;
}
function f() {
var e = x.height - 60, t = (_.elt.offsetWidth - h()) / 2;
t < i.EDITOR_DEFAULT_PADDING && (t = i.EDITOR_DEFAULT_PADDING), z.style.paddingLeft = t + "px",
z.style.paddingRight = t + "px", z.style.paddingBottom = e + "px", W.style.width = t + "px";
var n = (E.elt.offsetWidth - h()) / 2;
n < i.EDITOR_DEFAULT_PADDING && (n = i.EDITOR_DEFAULT_PADDING), V.style.paddingLeft = n + "px",
V.style.paddingRight = n + "px", V.style.paddingBottom = e + "px";
var r = it + at + $ + rt;
window.viewerMode && (r = it + at + $ + ot);
var a = v.width - r + $;
tt.forEach(function(e, t) {
r += e.width, t === tt.length - 1 && (r -= rt), v.width < r ? Q.appendChild(e.elt) : (X.insertBefore(e.elt, K),
a = v.width - r + $);
}), J.css({
maxWidth: a
}), Y.toggleClass("hide", 0 === Q.children.length), o.onLayoutResize();
}
function m() {
b.width = v.width + B + (C.isShown ? j : 0), b.elt.style.width = b.width + "px",
C.right = C.isShown ? 0 : -j, C.elt.style.right = C.right + "px";
}
function g() {
for (v = {
width: window.innerWidth,
height: window.innerHeight
}; ;) {
if (b.y = w.isOpen ? 0 : -P, b.x = S.isOpen ? 0 : C.isOpen ? -(B + j) : -B, b.width = v.width + B + j,
b.height = v.height - b.y, y.left = B, y.width = v.width, y.height = b.height, x.top = P,
x.width = v.width, x.height = b.height - P, b.applyCss(), y.applyCss(), x.applyCss(),
window.viewerMode) return k.width = x.width, k.height = x.height, E.width = x.width,
E.height = x.height, k.applyCss(), E.applyCss(), f();
if (!(w.isOpen && x.height < O.height + A)) {
if (st) {
if (k.isOpen) {
if (k.halfSize && (k.height = (x.height + A) / 2), k.height < F.height && (k.height = F.height),
k.y = x.height - k.height, k.y < O.height) {
var e = x.height - O.height;
if (e < F.height) {
k.isOpen = !1, k.$elt.trigger("hide.layout.toggle").trigger("hidden.layout.toggle");
continue;
}
k.height = e, k.y = x.height - k.height;
}
} else k.y = x.height - A;
k.width = x.width, _.height = k.y, _.width = x.width, E.top = A, E.height = k.height - A,
E.width = k.width, T.width = R, I.width = R, I.x = (k.width - R) / 2, D.width = E.width;
} else {
if (k.isOpen) {
if (k.halfSize && (k.width = (x.width + A) / 2), k.width < F.width && (k.width = F.width),
k.x = x.width - k.width, k.x < O.width) {
var t = x.width - O.width;
if (t < F.width) {
k.isOpen = !1, k.$elt.trigger("hide.layout.toggle").trigger("hidden.layout.toggle");
continue;
}
k.width = t, k.x = x.width - k.width;
}
} else k.x = x.width - A;
k.height = x.height, _.width = k.x, _.height = x.height, E.left = A, E.width = k.width - A,
E.height = k.height, T.height = R, I.height = R, I.y = (k.height - R) / 2, D.height = E.height;
}
break;
}
w.isOpen = !1, w.$elt.trigger("hide.layout.toggle").trigger("hidden.layout.toggle");
}
T.$elt.toggleClass("open", w.isOpen), I.$elt.toggleClass("open", k.isOpen), D.$elt.toggleClass("open", k.isOpen),
_.applyCss(), k.applyCss(), E.applyCss(), I.applyCss(), D.applyCss(), T.applyCss(),
m(), N.adjustPosition(), f();
}
var v, b, y, x, w, S, C, _, k, E, T, I, D, N, M, L = {}, A = 32, R = 60, P = 50, O = {
width: 250,
height: 140
}, F = {
width: 330,
height: 160
}, B = 280, j = 320, $ = 200, G = 18, q = {
x: -45,
y: -6
}, H = !1, U = [];
d.prototype.applyCss = function() {
void 0 !== this.top && (this.elt.style.top = this.top + "px"), void 0 !== this.left && (this.elt.style.left = this.left + "px"),
void 0 !== this.bottom && (this.elt.style.bottom = this.bottom + "px"), void 0 !== this.right && (this.elt.style.right = this.right + "px"),
void 0 === this.x && void 0 === this.y || (this.x = this.x || 0, this.y = this.y || 0,
this.elt.style["-webkit-transform"] = "translate(" + this.x + "px, " + this.y + "px)",
this.elt.style["-ms-transform"] = "translate(" + this.x + "px, " + this.y + "px)",
this.elt.style.transform = "translate(" + this.x + "px, " + this.y + "px)"), H && this.width < this.oldWidth ? U.push(t.bind(function() {
this.elt.style.width = this.width + "px";
}, this)) : void 0 !== this.width && (this.elt.style.width = this.width + "px"),
this.oldWidth = this.width, H && this.height < this.oldHeight ? U.push(t.bind(function() {
this.elt.style.height = this.height + "px";
}, this)) : void 0 !== this.height && (this.elt.style.height = this.height + "px"),
this.oldHeight = this.height, clearTimeout(M), H && (M = setTimeout(p, 800));
}, d.prototype.createToggler = function(i) {
var r, o = 0;
this.toggle = function(a) {
a !== this.isOpen && (this.isOpen = t.isBoolean(a) ? a : !this.isOpen, this.isOpen ? (this.isShown = !0,
this.$elt.addClass("panel-open").trigger("show.layout.toggle"), i && (r = e(n.createBackdrop(b.elt)).on("click.backdrop", t.bind(function() {
this.toggle(!1);
}, this)), this.$elt.addClass("bring-to-front")), U.push(t.bind(function() {
0 == --o && this.isOpen && this.$elt.trigger("shown.layout.toggle");
}, this))) : (this.$elt.trigger("hide.layout.toggle"), r && (r.off("click.backdrop"),
r[0].removeBackdrop(), r = void 0), U.push(t.bind(function() {
0 == --o && (this.isOpen || (this.isShown = !1, this.$elt.removeClass("panel-open bring-to-front").trigger("hidden.layout.toggle")));
}, this))), o++, c(), g());
};
}, d.prototype.initHammer = function(e) {
this.hammer = l(this.elt, {
drag: !!e,
drag_max_touches: 0,
gesture: !1,
hold: !1,
release: !1,
swipe: !e,
tap: !1,
touch: !1,
transform: !1
});
};
var z, V, W, X, Q, Y, K, J, Z = [ {
screenWidth: 0,
maxWidth: 600 * r.maxWidthRatio
}, {
screenWidth: 1e3,
maxWidth: 700 * r.maxWidthRatio
}, {
screenWidth: 1200,
maxWidth: 800 * r.maxWidthRatio
}, {
screenWidth: 1400,
maxWidth: 900 * r.maxWidthRatio
} ], et = Z.slice(0).reverse(), tt = [], nt = [ 80, 80, 160, 160, 80, 40 ].map(function(e) {
return e + 18;
}), it = 86, rt = 40, ot = 100, at = 88, st = "vertical" == r.layoutOrientation;
return L.init = function() {
function n(e, t) {
t = t || 0, c += [ "@media (min-width: " + t + "px) {", "#wmd-input {", " font-size: " + e + "px;", "}", "#preview-contents {", " font-size: " + e + "px;", "}", "}" ].join("\n");
}
var i = 0;
if (e(document.body).on("show.bs.modal", ".modal", function() {
S.toggle(!1), C.toggle(!1), i++;
}).on("hidden.bs.modal", ".modal", function() {
i--;
}), function(e) {
e.position = "absolute", e.top = 0, e.left = 0, e.bottom = 0, e.right = 0, e.overflow = "hidden";
}(document.body.style), document.documentElement.style.overflow = "hidden", b = new d(".layout-wrapper-l1"),
y = new d(".layout-wrapper-l2"), x = new d(".layout-wrapper-l3"), w = new d(".navbar"),
S = new d(".menu-panel"), C = new d(".document-panel"), _ = new d("#wmd-input"),
k = new d(".preview-panel"), E = new d(".preview-container"), T = new d(".layout-toggler-navbar"),
I = new d(".layout-toggler-preview"), D = new d(".layout-resizer-preview"), N = new d(".extension-preview-buttons"),
z = _.elt.querySelector(".editor-content"), V = document.getElementById("preview-contents"),
W = _.elt.querySelector(".editor-margin"), X = w.elt.querySelector(".navbar-inner"),
Q = w.elt.querySelector(".buttons-dropdown .dropdown-menu"), Y = w.$elt.find(".buttons-dropdown"),
K = w.elt.querySelector(".title-container"), J = w.$elt.find(".file-title-navbar, .input-file-title"),
e([ b.elt, y.elt, x.elt ]).on("scroll", function() {
this.scrollLeft = 0;
}), t.each(w.elt.querySelectorAll(".right-buttons"), function(e) {
tt.push({
elt: e,
width: nt.shift()
});
}), t.each(w.elt.querySelectorAll(".left-buttons"), function(e) {
tt.push({
elt: e,
width: nt.shift()
});
}), b.$elt.toggleClass("layout-vertical", st), b.$elt.on("webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend", p),
w.isOpen = !0, w.createToggler(), T.$elt.click(t.bind(w.toggle, w)), k.isOpen = !0,
k.createToggler(), k.halfSize = !0, I.$elt.click(t.bind(k.toggle, k)), k.$elt.on("show.layout.toggle", function() {
t.defer(function() {
k.isOpen || (window.location.href = "viewer");
});
}), C.isOpen = !1, C.createToggler(!0), C.$elt.find(".toggle-button").click(t.bind(C.toggle, C)),
C.$elt.on("click", "a[data-toggle!=collapse]", t.bind(C.toggle, C, !1)), C.$elt.on("hidden.layout.toggle", function() {
m(), i || _.elt.focus();
}), S.isOpen = !1, !window.viewerMode) {
S.createToggler(!0), S.$elt.find(".toggle-button").click(t.bind(S.toggle, S)), S.$elt.on("click", "a[data-toggle!=collapse]", t.bind(S.toggle, S, !1)),
S.$elt.on("show.bs.collapse hidden.layout.toggle", function() {
S.$elt.find(".in").collapse("hide");
}), S.$elt.on("hidden.layout.toggle", function() {
i || _.elt.focus();
}), D.initHammer(!0);
var o;
D.hammer.on("dragstart", function() {
o = {
width: k.width,
height: k.height
};
}).on("drag", function(e) {
st ? k.height = o.height - e.gesture.deltaY : k.width = o.width - e.gesture.deltaX,
e.gesture.preventDefault(), k.halfSize = !1, g();
});
}
N.initHammer(!0), N.adjustPosition = function() {
if (N.isDragged) {
var e = -v.width + N.elt.offsetWidth, t = -v.height + N.elt.offsetHeight;
this.x < e && (this.x = e), this.y < t && (this.y = t), this.x > 0 && (this.x = 0),
this.y > 0 && (this.y = 0), this.applyCss();
}
};
var l;
N.hammer.on("dragstart", function() {
N.isOpen = !0, N.isDragged = !0, N.$elt.removeClass("closed animate"), y.$elt.addClass("dragging"),
l = {
x: N.x,
y: N.y
};
}).on("drag", function(e) {
N.x = l.x + e.gesture.deltaX, N.y = l.y + e.gesture.deltaY, N.adjustPosition(),
e.gesture.preventDefault();
}).on("dragend", function() {
y.$elt.removeClass("dragging"), N.$elt.find(".btn-group").toggleClass("dropup", v.height / 2 > -N.y);
}), s.stopCallback = function() {
return S.isOpen || C.isOpen || i;
}, e(window).resize(g).focus(function() {
S.isOpen || C.isOpen || i || _.elt.focus();
});
var c = "";
n(16 * r.fontSizeRatio), n(17 * r.fontSizeRatio, 600), n(18 * r.fontSizeRatio, 1200);
var u = a("style", {
type: "text/css"
});
u.innerHTML = c, document.head.appendChild(u), g();
}, o.addListener("onReady", function() {
function n() {
clearTimeout(r), N.isDragged || (N.isOpen = !0, N.x = q.x, N.applyCss(), N.$elt.removeClass("closed"));
}
function i() {
clearTimeout(r), r = setTimeout(function() {
N.isDragged || o || (N.isOpen = !1, N.x = q.x + N.elt.offsetWidth + G, N.applyCss(),
N.$elt.addClass("closed"));
}, 3e3);
}
N.x = q.x, N.y = q.y, N.applyCss(), setTimeout(function() {
N.$elt.addClass("animate");
}, 0);
var r, o = !1;
n(), i(), N.$elt.hover(n, i).on("show.bs.dropdown", function() {
o = !0;
}).on("hidden.bs.dropdown", function() {
o = !1, i();
}), t.each(N.elt.querySelectorAll(".btn-group"), function(t) {
var n = e(t);
n.on("shown.bs.dropdown", function() {
n.find(".dropdown-menu").css({
right: -N.elt.offsetWidth + n.width() + n.position().left
});
var e = -N.y - 130;
v.height / 2 > -N.y && (e = v.height + N.y - N.elt.offsetHeight - 130), n.find(".markdown-syntax, .table-of-contents").css({
maxHeight: e
});
}).addClass("dropup");
});
}), o.addListener("onExtensionButtonResize", function() {
N.isDragged ? N.adjustPosition() : N.isOpen || (N.$elt.removeClass("animate"), N.x = q.x + N.elt.offsetWidth + G,
N.applyCss(), setTimeout(function() {
N.$elt.addClass("animate");
}, 0));
}), o.onLayoutCreated(L), L;
}), define("text!html/bodyEditor.html", [], function() {
return '<div class="layout-wrapper-l1">\n <div class="layout-wrapper-l2">\n <div class="navbar navbar-default">\n <div class="navbar-inner">\n <div class="nav left-space"></div>\n <div class="nav right-space pull-right"></div>\n <div class="buttons-dropdown dropdown">\n <div class="nav">\n <button class="btn btn-success" data-toggle="dropdown"\n title="Show buttons">\n <i class="icon-th-large"></i>\n </button>\n <div class="dropdown-menu">\n </div>\n </div>\n </div>\n <ul class="nav left-buttons">\n <li class="wmd-button-group1 btn-group"></li>\n </ul>\n <ul class="nav left-buttons">\n <li class="wmd-button-group2 btn-group"></li>\n </ul>\n <ul class="nav left-buttons">\n <li class="wmd-button-group3 btn-group"></li>\n </ul>\n <ul class="nav left-buttons">\n <li class="wmd-button-group5 btn-group"></li>\n </ul>\n <ul class="nav left-buttons">\n <li class="wmd-button-group4 btn-group">\n <a class="btn btn-success button-open-discussion" title="Comments Ctrl/Cmd+M"><i class="icon-comment-alt"></i></a>\n </li>\n </ul>\n <ul class="nav pull-right right-buttons">\n <li class="offline-status hide">\n <div class="text-danger">\n <i class="icon-attention-circled"></i>offline\n </div>\n </li>\n <li class="extension-buttons"></li>\n </ul>\n <ul class="nav pull-right title-container">\n <li><div class="working-indicator"></div></li>\n <li><a class="btn btn-success file-title-navbar" href="#"\n title="Rename document"> </a></li>\n <li><div class="input-file-title-container"><input type="text"\n class="col-sm-4 form-control hide input-file-title"\n placeholder="Document title" /></div></li>\n </ul>\n </div>\n </div>\n <div class="layout-wrapper-l3">\n <pre id="wmd-input" class="form-control"><div class="editor-content" contenteditable=true></div><div class="editor-margin"></div></pre>\n <div class="preview-panel">\n <div class="layout-resizer layout-resizer-preview"></div>\n <div class="layout-toggler layout-toggler-navbar btn btn-info" title="Toggle navigation bar"><i class="icon-th"></i></div>\n <div class="layout-toggler layout-toggler-preview btn btn-info" title="Toggle preview"><i class="icon-none"></i></div>\n <div class="preview-container">\n <div id="preview-contents">\n <div id="wmd-preview" class="preview-content"></div>\n </div>\n </div>\n </div>\n </div>\n <div class="extension-preview-buttons">\n <div class="btn-group drag-me" title="Drag me!">\n <i class="icon-ellipsis-vert"></i>\n </div>\n </div>\n </div>\n <div id="wmd-button-bar" class="hide"></div>\n\n <div class="menu-panel">\n <button class="btn toggle-button" title="Menu">\n <img\n data-stackedit-src="menu-icon.png" width="24" height="24" />\n </button>\n <div class="panel-content">\n <div class="list-group">\n\n <a href="viewer" title="StackEdit Viewer"\n class="list-group-item">\n <i class="icon-resize-full"></i> StackEdit Viewer\n </a>\n\n </div>\n <div class="list-group">\n\n <a href="#" data-toggle="collapse" data-target=".collapse-synchronize"\n class="list-group-item">\n <div><i class="icon-refresh"></i> Synchronize</div>\n <small>Open, save, collaborate in the Cloud</small>\n </a>\n <div class="sub-menu collapse collapse-synchronize clearfix">\n <ul class="nav alert alert-danger show-already-synchronized">\n <li><div>"<span class="file-title"></span>" is already synchronized.</div></li>\n <li><a href="#" class="action-force-synchronization"><i class="icon-refresh"></i>\n Force synchronization</a></li>\n <li><a href="#" data-toggle="modal" data-target=".modal-manage-sync"\n class="action-reset-input"><i\n class="icon-refresh"></i> Manage synchronization</a></li>\n </ul>\n <ul class="nav">\n <li><a href="#" class="action-sync-import-dialog-couchdb"><i\n class="icon-provider-couchdb"></i> Open from CouchDB <sup class="text-danger">new</sup></a></li>\n <li><a href="#" class="action-sync-export-dialog-couchdb"><i\n class="icon-provider-couchdb"></i> Save on CouchDB <sup class="text-danger">new</sup></a></li>\n <li><a href="#" class="action-sync-import-dropbox"><i\n class="icon-provider-dropbox"></i> Open from Dropbox</a></li>\n <li><a href="#" class="action-sync-export-dialog-dropbox"><i\n class="icon-provider-dropbox"></i> Save on Dropbox</a></li>\n <li><a href="#" class="submenu-sync-gdrive action-sync-import-gdrive"><i\n class="icon-provider-gdrive"></i> Open from Google Drive</a></li>\n <li><a href="#" class="submenu-sync-gdrive action-sync-export-dialog-gdrive"><i\n class="icon-provider-gdrive"></i> Save on Google Drive</a></li>\n <li><a href="#" class="submenu-sync-gdrivesec action-sync-import-gdrivesec"><i\n class="icon-provider-gdrive"></i> Open from Google Drive<br><small>(2nd account)</small></a></li>\n <li><a href="#" class="submenu-sync-gdrivesec action-sync-export-dialog-gdrivesec"><i\n class="icon-provider-gdrive"></i> Save on Google Drive<br><small>(2nd account)</small></a></li>\n <li><a href="#" class="submenu-sync-gdriveter action-sync-import-gdriveter"><i\n class="icon-provider-gdrive"></i> Open from Google Drive<br><small>(3rd account)</small></a></li>\n <li><a href="#" class="submenu-sync-gdriveter action-sync-export-dialog-gdriveter"><i\n class="icon-provider-gdrive"></i> Save on Google Drive<br><small>(3rd account)</small></a></li>\n </ul>\n </div>\n <a href="#" data-toggle="collapse" data-target=".collapse-publish-on"\n class="list-group-item">\n <div><i class="icon-upload"></i>Publish</div>\n <small>Export to the web</small>\n </a>\n <div class="sub-menu collapse collapse-publish-on clearfix">\n <ul class="nav alert alert-danger show-already-published">\n <li><div>"<span class="file-title"></span>" is already published.</div></li>\n <li><a href="#" class="action-update-publication"><i class="icon-upload"></i>\n Update publication</a></li>\n <li><a href="#" data-toggle="modal" data-target=".modal-manage-publish"\n class="action-reset-input"><i class="icon-upload"></i>\n Manage publication</a></li>\n </ul>\n <ul class="nav publish-on-provider-list">\n </ul>\n </div>\n <a href="#" data-toggle="modal" data-target=".modal-manage-sharing"\n class="action-reset-input list-group-item">\n <div><i class="icon-link"></i>Sharing</div>\n <small>Share document links</small>\n </a>\n </div>\n <div class="list-group">\n\n <a data-toggle="modal"\n data-target=".modal-import-harddrive-markdown"\n class="list-group-item action-reset-input" href="#"><i\n class="icon-hdd"></i> Import from disk</a>\n <a href="#" data-toggle="collapse" data-target=".collapse-save-as"\n class="list-group-item"><i class="icon-hdd"></i> Export to disk</a>\n <div class="sub-menu collapse collapse-save-as clearfix">\n <ul class="nav">\n <li><a class="action-download-md" href="#"><i\n class="icon-download"></i> As Markdown</a></li>\n <li><a class="action-download-html" href="#"><i\n class="icon-download"></i> As HTML</a></li>\n <li><a class="action-download-template" href="#"><i\n class="icon-download"></i> Using template</a></li>\n <li><a class="action-download-pdf" href="#"><i\n class="icon-download"></i> As PDF <sup class="text-danger">sponsor</sup></a></li>\n </ul>\n </div>\n\n <a data-toggle="modal" data-target=".modal-import-url"\n class="list-group-item action-reset-input" href="#"><i\n class="icon-globe"></i> Import from URL</a>\n <a data-toggle="modal"\n data-target=".modal-import-harddrive-html"\n class="list-group-item action-reset-input" href="#"><i\n class="icon-code"></i> Convert HTML to Markdown</a>\n </div>\n <ul class="nav">\n <li><a href="#" data-toggle="modal"\n data-target=".modal-settings" class="action-load-settings"><i\n class="icon-cog"></i> Settings</a></li>\n <li><a href="#" data-toggle="modal" data-target=".modal-about"><i\n class="icon-help-circled"></i> About</a></li>\n </ul>\n\n </div>\n </div>\n\n\n <div class="document-panel">\n <button class="btn toggle-button" title="Select document Ctrl+[ Ctrl+]">\n <i class="icon-folder-open"></i>\n </button>\n <div class="search-bar clearfix">\n <ul class="nav">\n <li><a href="#" class="action-create-file"><i\n class="icon-file"></i> New document</a></li>\n <li><a href="#" class="action-remove-file-confirm"><i\n class="icon-trash"></i> Delete document</a></li>\n <li><a href="#" data-toggle="modal" data-target=".modal-document-manager"><i\n class="icon-layers"></i> Manage documents</a></li>\n </ul>\n <div class="input-group">\n <span class="input-group-addon"><i class="icon-search"></i></span><input\n type="text" class="form-control" placeholder="Find document" />\n </div>\n </div>\n <div class="panel-content">\n <div class="list-group document-list"></div>\n <div class="list-group document-list-filtered hide"></div>\n </div>\n </div>\n</div>\n\n<div class="modal fade modal-document-manager">\n <div class="modal-dialog">\n <div class="modal-content">\n\n <div class="modal-header">\n <button type="button" class="close" data-dismiss="modal"\n aria-hidden="true">&times;</button>\n <h2 class="modal-title">Manage documents</h2>\n </div>\n <div class="modal-body">\n <div></div>\n <ul class="nav nav-pills document-list">\n <li class="pull-right dropdown"><a href="#"\n data-toggle="dropdown"><i class="icon-check"></i> Selection <b\n class="caret"></b></a>\n <ul class="dropdown-menu">\n <li><a href="#" class="action-select-all"><i\n class="icon-check"></i> Select all</a></li>\n <li><a href="#" class="action-unselect-all"><i\n class="icon-check-empty"></i> Unselect all</a></li>\n <li class="divider"></li>\n <li><a href="#" class="action-move-items"><i\n class="icon-forward"></i> Move to folder</a></li>\n <li><a href="#" class="action-delete-items"><i\n class="icon-trash"></i> Delete</a></li>\n </ul></li>\n <li class="pull-right"><a href="#"\n class="action-create-folder"> <i class="icon-folder"></i>\n Create folder\n </a></li>\n <li class="disabled"><a><i class="icon-file"></i> <span\n class="document-count"></span></a></li>\n <li class="disabled"><a><i class="icon-folder"></i> <span\n class="folder-count"></span></a></li>\n </ul>\n <div class="list-group document-list"></div>\n <p class="confirm-delete hide">The following documents will be\n deleted locally:</p>\n <p class="choose-folder hide">Please choose a destination\n folder:</p>\n <div class="list-group selected-document-list hide"></div>\n <div class="list-group select-folder-list hide"></div>\n </div>\n <div class="modal-footer">\n <a href="#"\n class="btn btn-default confirm-delete choose-folder action-cancel hide">Cancel</a>\n <a href="#"\n class="btn btn-primary confirm-delete action-delete-items-confirm hide">OK</a>\n <a href="#" class="btn btn-primary document-list"\n data-dismiss="modal">Close</a>\n </div>\n </div>\n </div>\n</div>\n\n\n<div class="modal fade modal-insert-link">\n <div class="modal-dialog">\n <div class="modal-content">\n\n <div class="modal-header">\n <button type="button" class="close" data-dismiss="modal"\n aria-hidden="true">&times;</button>\n <h2 class="modal-title">Hyperlink</h2>\n </div>\n <div class="modal-body">\n <p>Please provide the link URL and an optional title:</p>\n <div class="input-group">\n <span class="input-group-addon"><i class="icon-globe"></i></span><input\n id="input-insert-link" type="text" class="col-sm-5 form-control"\n placeholder=\'http://example.com/ "optional title"\' />\n </div>\n </div>\n <div class="modal-footer">\n <a href="#" class="btn btn-default" data-dismiss="modal">Cancel</a>\n <a href="#" class="btn btn-primary action-insert-link"\n data-dismiss="modal">OK</a>\n </div>\n </div>\n </div>\n</div>\n\n\n<div class="modal fade modal-insert-image">\n <div class="modal-dialog">\n <div class="modal-content">\n\n <div class="modal-header">\n <button type="button" class="close" data-dismiss="modal"\n aria-hidden="true">&times;</button>\n <h2 class="modal-title">Image</h2>\n </div>\n <div class="modal-body">\n <p>Please provide the image URL and an optional title:</p>\n <div class="input-group">\n <span class="input-group-addon"><i class="icon-picture"></i></span><input\n id="input-insert-image" type="text" class="col-sm-5 form-control"\n placeholder=\'http://example.com/image.jpg "optional title"\' />\n </div>\n </div>\n <div class="modal-footer">\n <a href="#" class="btn btn-default pull-left action-import-image-gplus"\n data-dismiss="modal"><i class="icon-provider-gplus"></i> Import\n from Google+</a> <a href="#" class="btn btn-default"\n data-dismiss="modal">Cancel</a> <a href="#"\n class="btn btn-primary action-insert-image" data-dismiss="modal">OK</a>\n </div>\n </div>\n </div>\n</div>\n\n\n<div class="modal fade modal-import-image">\n <div class="modal-dialog">\n <div class="modal-content">\n\n <div class="modal-header">\n <button type="button" class="close" data-dismiss="modal"\n aria-hidden="true">&times;</button>\n <h2 class="modal-title">Google+ image import</h2>\n </div>\n <div class="modal-body">\n <div class="form-horizontal">\n <div class="form-group">\n <div class="col-sm-7">\n <img>\n </div>\n </div>\n <div class="form-group">\n <label class="col-sm-4 control-label"\n for="input-import-image-title">Title (optional)</label>\n <div class="col-sm-7">\n <input type="text" id="input-import-image-title"\n placeholder="Image title" class="form-control">\n </div>\n </div>\n <div class="form-group">\n <label class="col-sm-4 control-label"\n for="input-import-image-size">Size limit (optional)</label>\n <div class="col-sm-7 form-inline">\n <input type="text" id="input-import-image-size" placeholder="0"\n class="col-sm-3 form-control"> px\n </div>\n </div>\n </div>\n </div>\n <div class="modal-footer">\n <a href="#" class="btn btn-default" data-dismiss="modal">Cancel</a>\n <a href="#" class="btn btn-primary action-import-image"\n data-dismiss="modal">OK</a>\n </div>\n </div>\n </div>\n</div>\n\n\n<div class="modal fade modal-remove-file-confirm">\n <div class="modal-dialog">\n <div class="modal-content">\n\n <div class="modal-header">\n <button type="button" class="close" data-dismiss="modal"\n aria-hidden="true">&times;</button>\n <h2 class="modal-title">Delete</h2>\n </div>\n <div class="modal-body">\n <p>\n Are you sure you want to delete "<span class="file-title"></span>"?\n </p>\n <blockquote>\n <p><b>Note:</b> It won\'t delete the file on synchronized locations.</p>\n </blockquote>\n </div>\n <div class="modal-footer">\n <a href="#" class="btn btn-default" data-dismiss="modal">Cancel</a>\n <a href="#" class="btn btn-primary action-remove-file"\n data-dismiss="modal">Delete</a>\n </div>\n </div>\n </div>\n</div>\n\n\n<div class="modal fade modal-import-url">\n <div class="modal-dialog">\n <div class="modal-content">\n\n <div class="modal-header">\n <button type="button" class="close" data-dismiss="modal"\n aria-hidden="true">&times;</button>\n <h2 class="modal-title">Import from URL</h2>\n </div>\n <div class="modal-body">\n <p>Please provide a link to a Markdown document.</p>\n <div class="form-horizontal">\n <div class="form-group">\n <label class="col-sm-3 control-label" for="input-import-url">URL</label>\n <div class="col-sm-8">\n <input type="text" id="input-import-url"\n placeholder="http://www.abc.com/xyz.md" class="form-control">\n </div>\n </div>\n </div>\n </div>\n <div class="modal-footer">\n <a href="#" class="btn btn-default" data-dismiss="modal">Cancel</a>\n <a href="#" data-dismiss="modal"\n class="btn btn-primary action-import-url">OK</a>\n </div>\n </div>\n </div>\n</div>\n\n\n<div class="modal fade modal-import-harddrive-markdown">\n <div class="modal-dialog">\n <div class="modal-content">\n\n <div class="modal-header">\n <button type="button" class="close" data-dismiss="modal"\n aria-hidden="true">&times;</button>\n <h2 class="modal-title">Import from disk</h2>\n </div>\n <div class="modal-body">\n <p>Please select your Markdown files here:</p>\n <p>\n <input type="file" id="input-file-import-harddrive-markdown"\n multiple class="form-control" />\n </p>\n <p>Or drag and drop your Markdown files here:</p>\n <p id="dropzone-import-harddrive-markdown" class="drop-zone">Drop\n files here</p>\n </div>\n <div class="modal-footer">\n <a href="#" class="btn btn-primary" data-dismiss="modal">Close</a>\n </div>\n </div>\n </div>\n</div>\n\n\n<div class="modal fade modal-import-harddrive-html">\n <div class="modal-dialog">\n <div class="modal-content">\n\n <div class="modal-header">\n <button type="button" class="close" data-dismiss="modal"\n aria-hidden="true">&times;</button>\n <h2 class="modal-title">Convert HTML to Markdown</h2>\n </div>\n <div class="modal-body">\n <p>Please select your HTML files here:</p>\n <p>\n <input type="file" id="input-file-import-harddrive-html" multiple\n class="form-control" />\n </p>\n <p>Or drag and drop your HTML files here:</p>\n <p id="dropzone-import-harddrive-html" class="drop-zone">Drop\n files here</p>\n <p>Or insert your HTML code here:</p>\n <textarea id="input-convert-html" class="form-control"></textarea>\n </div>\n <div class="modal-footer">\n <a href="#" class="btn btn-default" data-dismiss="modal">Close</a> <a\n href="#" class="btn btn-primary action-convert-html"\n data-dismiss="modal">OK</a>\n </div>\n </div>\n </div>\n</div>\n\n\n<div class="modal fade modal-upload-gdrive">\n</div>\n<div class="modal fade modal-upload-gdrivesec">\n</div>\n<div class="modal fade modal-upload-gdriveter">\n</div>\n\n\n<div class="modal fade modal-autosync-gdrive">\n</div>\n<div class="modal fade modal-autosync-gdrivesec">\n</div>\n<div class="modal fade modal-autosync-gdriveter">\n</div>\n\n\n<div class="modal fade modal-upload-dropbox">\n <div class="modal-dialog">\n <div class="modal-content">\n\n <div class="modal-header">\n <button type="button" class="close" data-dismiss="modal"\n aria-hidden="true">&times;</button>\n <h2 class="modal-title">Save on Dropbox</h2>\n </div>\n <div class="modal-body">\n <p>\n This will save "<span class="file-title"></span>" to your <i\n class="icon-provider-dropbox"></i>\n <code>Dropbox</code>\n account and keep it synchronized.\n </p>\n <div class="form-horizontal">\n <div class="form-group">\n <label class="col-sm-3 control-label"\n for="input-sync-export-dropbox-path">File path</label>\n <div class="col-sm-8">\n <input type="text" id="input-sync-export-dropbox-path"\n placeholder="/path/to/My Document.md" class="form-control">\n <span class="help-block"> File path is composed of both\n folder and filename. </span>\n </div>\n </div>\n </div>\n <blockquote>\n <b>Note:</b>\n <ul>\n <li>Dropbox file path does not depend on document title.</li>\n <li>The title of your document will not be synchronized.</li>\n <li>Destination folder must exist.</li>\n <li>Any existing file at this location will be overwritten.</li>\n </ul>\n </blockquote>\n </div>\n <div class="modal-footer">\n <a href="#" class="btn btn-default" data-dismiss="modal">Cancel</a>\n <a href="#" data-dismiss="modal"\n class="btn btn-primary action-sync-export-dropbox">OK</a>\n </div>\n </div>\n </div>\n</div>\n\n\n<div class="modal fade modal-download-couchdb">\n <div class="modal-dialog">\n <div class="modal-content">\n\n <div class="modal-header">\n <button type="button" class="close" data-dismiss="modal"\n aria-hidden="true">&times;</button>\n <h2 class="modal-title">Open from CouchDB</h2>\n <div class="form-horizontal list-mode">\n <br>\n <div class="form-group form-inline">\n <label for="input-sync-import-couchdb-tag" class="col-sm-3 control-label">Filter by tag</label>\n <select id="input-sync-import-couchdb-tag" class="col-sm-4 form-control">\n </select>\n <span class="col-sm-5">\n <a class="btn btn-link action-add-tag"><i class="icon-tag"></i> Add\n </a>\n <a class="btn btn-link action-remove-tag"><i class="icon-tag"></i> Remove\n </a>\n </span>\n </div>\n </div>\n </div>\n <div class="modal-body">\n <p class="msg-default-couchdb hide alert alert-danger"><i class="icon-attention"></i> <b>Careful:</b>\n You\'re using the public CouchDB instance.\n <b>Anybody can open, edit and delete your files there!</b> To setup your own CouchDB instance <a\n target="blank" href="https://github.com/benweet/stackedit/blob/master/doc/couchdb-setup.md">click\n here</a>.\n </p>\n\n <div class="form-horizontal byid-mode">\n <div class="form-group">\n <label for="input-sync-import-couchdb-documentid" class="col-sm-3 control-label">Document\n ID</label>\n\n <div class="col-sm-9">\n <input id="input-sync-import-couchdb-documentid" class="form-control"\n placeholder="DocumentID">\n <span class="help-block">Multiple IDs can be provided (space separated)</span>\n </div>\n </div>\n </div>\n <ul class="list-mode nav nav-pills">\n <li class="pull-right dropdown"><a href="#"\n data-toggle="dropdown"><i class="icon-check"></i> Selection\n <b class="caret"></b></a>\n <ul class="dropdown-menu">\n <li><a href="#" class="action-unselect-all"><i\n class="icon-check-empty"></i> Unselect all</a></li>\n <li class="divider"></li>\n <li><a href="#" class="action-delete-items"><i\n class="icon-trash"></i> Delete</a></li>\n </ul>\n </li>\n </ul>\n <p class="list-mode">\n </p>\n <div class="list-group document-list list-mode"></div>\n <div class="list-mode text-center">\n <div class="please-wait"><b>Please wait...</b></div>\n <div class="no-document"><b>No document.</b></div>\n <button class="more-documents btn btn-link"><i class="icon-angle-double-down"></i> More documents!</button>\n </div>\n <p class="delete-mode hide">The following documents will be\n removed from CouchDB:</p>\n\n <div class="delete-mode list-group selected-document-list hide"></div>\n </div>\n <div class="modal-footer">\n <a href="#" class="btn btn-default pull-left list-mode action-byid-mode">Open by ID...</a>\n <a href="#"\n class="btn btn-default delete-mode action-cancel hide">Cancel</a>\n <a href="#"\n class="btn btn-primary delete-mode action-delete-items-confirm hide">Delete</a>\n <a href="#" class="btn btn-default byid-mode action-cancel">Cancel</a>\n <a href="#" data-dismiss="modal"\n class="btn btn-primary action-sync-import-couchdb byid-mode">Open</a>\n <a href="#" class="btn btn-default list-mode" data-dismiss="modal">Cancel</a>\n <a href="#" data-dismiss="modal"\n class="btn btn-primary action-sync-import-couchdb list-mode">Open</a>\n </div>\n </div>\n </div>\n</div>\n\n\n<div class="modal fade modal-upload-couchdb">\n <div class="modal-dialog">\n <div class="modal-content">\n\n <div class="modal-header">\n <button type="button" class="close" data-dismiss="modal"\n aria-hidden="true">&times;</button>\n <h2 class="modal-title">Save on CouchDB</h2>\n </div>\n <div class="modal-body">\n <p class="msg-default-couchdb hide alert alert-danger"><i class="icon-attention"></i> <b>Careful:</b>\n You\'re using the public CouchDB instance.\n <b>Anybody can open, edit and delete your files there!</b> To setup your own CouchDB instance <a\n target="blank" href="https://github.com/benweet/stackedit/blob/master/doc/couchdb-setup.md">click\n here</a>.\n </p>\n\n <p>\n This will save "<span class="file-title"></span>" to CouchDB and keep it synchronized.\n </p>\n <blockquote>\n <p><b>Tip:</b> You can use a\n <a href="http://jekyllrb.com/docs/frontmatter/"\n target="_blank">YAML front matter</a> to specify tags for your document.</p>\n <p>Alternatively, you can place comma separated tags in square brackets at the beginning of the document title.</p>\n </blockquote>\n </div>\n <div class="modal-footer">\n <a href="#" class="btn btn-default" data-dismiss="modal">Cancel</a>\n <a href="#" data-dismiss="modal"\n class="btn btn-primary action-sync-export-couchdb">OK</a>\n </div>\n </div>\n </div>\n</div>\n\n\n<div class="modal fade modal-manage-sync">\n <div class="modal-dialog">\n <div class="modal-content">\n\n <div class="modal-header">\n <button type="button" class="close" data-dismiss="modal"\n aria-hidden="true">&times;</button>\n <h2 class="modal-title">Synchronization</h2>\n </div>\n <div class="modal-body">\n <p>\n "<span class="file-title"></span>" is synchronized with the\n following location(s):\n </p>\n <div class="sync-list"></div>\n <blockquote>\n <p><b>Note:</b> Removing a synchronized location will not delete any\n file.</p>\n </blockquote>\n </div>\n <div class="modal-footer">\n <a href="#" class="btn btn-primary" data-dismiss="modal">Close</a>\n </div>\n </div>\n </div>\n</div>\n\n\n<div class="modal fade modal-publish">\n <div class="modal-dialog">\n <div class="modal-content">\n\n <div class="modal-header">\n <button type="button" class="close" data-dismiss="modal"\n aria-hidden="true">&times;</button>\n <h2 class="modal-title">\n Publish on <span class="publish-provider-name"></span>\n </h2>\n </div>\n <div class="modal-body">\n <div class="form-horizontal">\n <div class="form-group modal-publish-ssh">\n <label class="col-sm-4 control-label" for="input-publish-ssh-host">Host</label>\n <div class="col-sm-7">\n <input type="text" id="input-publish-ssh-host"\n placeholder="hostname.or.ip" class="form-control"> <span\n class="help-block"> Host must be accessible publicly,\n unless you\'re hosting your own StackEdit instance.\n </span>\n </div>\n </div>\n <div class="form-group modal-publish-ssh">\n <label class="col-sm-4 control-label" for="input-publish-ssh-port">Port\n (optional)</label>\n <div class="col-sm-2">\n <input type="text" id="input-publish-ssh-port" placeholder="22"\n class="form-control">\n </div>\n </div>\n <div class="form-group modal-publish-ssh">\n <label class="col-sm-4 control-label"\n for="input-publish-ssh-username">Username</label>\n <div class="col-sm-7">\n <input type="text" id="input-publish-ssh-username"\n placeholder="username" class="form-control">\n </div>\n </div>\n <div class="form-group modal-publish-ssh">\n <label class="col-sm-4 control-label"\n for="input-publish-ssh-password">Password</label>\n <div class="col-sm-7">\n <input type="password" id="input-publish-ssh-password"\n placeholder="password" class="form-control">\n </div>\n </div>\n <div class="form-group modal-publish-github">\n <label class="col-sm-4 control-label"\n for="input-publish-github-repo">Repository</label>\n <div class="col-sm-7">\n <input type="text" id="input-publish-github-repo"\n placeholder="Repository name or URL" class="form-control">\n </div>\n </div>\n <div class="form-group modal-publish-github">\n <label class="col-sm-4 control-label"\n for="input-publish-github-branch">Branch</label>\n <div class="col-sm-7">\n <input type="text" id="input-publish-github-branch"\n placeholder="branch-name" class="form-control">\n </div>\n </div>\n <div class="form-group modal-publish-ssh modal-publish-github">\n <label class="col-sm-4 control-label"\n for="input-publish-file-path">File path</label>\n <div class="col-sm-7">\n <input type="text" id="input-publish-file-path"\n placeholder="path/to/file.md" class="form-control">\n <span class="help-block"> File path is composed of both\n folder and filename. </span>\n </div>\n </div>\n <div class="form-group modal-publish-gist">\n <label class="col-sm-4 control-label" for="input-publish-filename">Filename</label>\n <div class="col-sm-7">\n <input type="text" id="input-publish-filename"\n placeholder="filename" class="form-control">\n </div>\n </div>\n <div class="form-group modal-publish-gist">\n <label class="col-sm-4 control-label" for="input-publish-gist-id">Existing\n ID (optional)</label>\n <div class="col-sm-7">\n <input type="text" id="input-publish-gist-id"\n placeholder="GistID" class="form-control">\n </div>\n </div>\n <div class="form-group modal-publish-gist">\n <label class="col-sm-4 control-label"\n for="input-publish-gist-public">Public</label>\n <div class="col-sm-7">\n <div class="checkbox">\n <input type="checkbox" id="input-publish-gist-public"\n checked="checked" />\n </div>\n </div>\n </div>\n <div class="form-group modal-publish-blogger modal-publish-bloggerpage">\n <label class="col-sm-4 control-label"\n for="input-publish-blogger-url">Blog URL</label>\n <div class="col-sm-7">\n <input type="text" id="input-publish-blogger-url"\n placeholder="http://exemple.blogger.com/" class="form-control">\n </div>\n </div>\n <div class="form-group modal-publish-tumblr">\n <label class="col-sm-4 control-label"\n for="input-publish-tumblr-hostname">Blog hostname</label>\n <div class="col-sm-7">\n <input type="text" id="input-publish-tumblr-hostname"\n placeholder="exemple.tumblr.com" class="form-control">\n </div>\n </div>\n <div class="form-group modal-publish-wordpress">\n <label class="col-sm-4 control-label"\n for="input-publish-tumblr-hostname">WordPress site</label>\n <div class="col-sm-7">\n <input type="text" id="input-publish-wordpress-site"\n placeholder="exemple.wordpress.com" class="form-control">\n <span class="help-block"> <a target="_blank"\n href="http://jetpack.me/">Jetpack plugin</a> is required for\n self-hosted sites.\n </span>\n </div>\n </div>\n <div\n class="form-group modal-publish-blogger modal-publish-tumblr modal-publish-wordpress">\n <label class="col-sm-4 control-label" for="input-publish-postid">Update\n existing post ID (optional)</label>\n <div class="col-sm-7">\n <input type="text" id="input-publish-postid" placeholder="PostID"\n class="form-control">\n </div>\n </div>\n <div\n class="form-group modal-publish-bloggerpage">\n <label class="col-sm-4 control-label" for="input-publish-pageid">Update\n existing page ID (optional)</label>\n <div class="col-sm-7">\n <input type="text" id="input-publish-pageid" placeholder="PageID"\n class="form-control">\n </div>\n </div>\n <div class="form-group modal-publish-dropbox">\n <label class="col-sm-4 control-label"\n for="input-publish-dropbox-path">File path</label>\n <div class="col-sm-7">\n <input type="text" id="input-publish-dropbox-path"\n placeholder="/path/to/My Document.html" class="form-control">\n <span class="help-block"> File path is composed of both\n folder and filename. </span>\n </div>\n </div>\n <div class="form-group modal-publish-gdrive">\n <label class="col-sm-4 control-label"\n for="input-publish-gdrive-fileid">File ID (optional)</label>\n <div class="col-sm-7">\n <input type="text" id="input-publish-gdrive-fileid"\n placeholder="FileID" class="form-control"> <span\n class="help-block">If no file ID is supplied, a new file\n will be created in your Google Drive root folder. You can move\n the file afterwards within Google Drive.</span>\n </div>\n </div>\n <div class="form-group modal-publish-gdrive">\n <label class="col-sm-4 control-label"\n for="input-publish-gdrive-filename">Force filename\n (optional)</label>\n <div class="col-sm-7">\n <input type="text" id="input-publish-gdrive-filename"\n placeholder="Filename" class="form-control"> <span\n class="help-block">If no file name is supplied, the\n document title will be used.</span>\n </div>\n </div>\n\n <div class="form-group">\n <label class="col-sm-4 control-label">Format</label>\n <div class="col-sm-7">\n <div class="radio">\n <label> <input type="radio" name="radio-publish-format"\n value="markdown"> Markdown\n </label>\n </div>\n <div class="radio">\n <label> <input type="radio" name="radio-publish-format"\n value="html"> HTML\n </label>\n </div>\n <div class="radio">\n <label> <input type="radio" name="radio-publish-format"\n value="template"> Template\n </label>\n </div>\n </div>\n </div>\n <div class="collapse publish-custom-template-collapse">\n <div class="form-group">\n <div class="col-sm-4"></div>\n <div class="col-sm-7">\n <div class="checkbox">\n <label> <input type="checkbox"\n id="checkbox-publish-custom-template"> Custom template\n </label> <a href="#" class="tooltip-template">(?)</a>\n </div>\n </div>\n </div>\n <div class="form-group">\n <div class="col-sm-4"></div>\n <div class="col-sm-7">\n <textarea class="form-control"\n id="textarea-publish-custom-template"></textarea>\n </div>\n </div>\n </div>\n </div>\n <blockquote class="front-matter-info modal-publish-blogger modal-publish-tumblr modal-publish-wordpress">\n <p><b>Tip:</b> You can use a\n <a href="http://jekyllrb.com/docs/frontmatter/"\n target="_blank">YAML front matter</a> to specify the title and the tags/labels of your publication.</p>\n <p><b>Interpreted variables:</b> <code>title</code>, <code>tags</code>, <code>published</code>, <code>date</code>.</p>\n </blockquote>\n <blockquote class="front-matter-info modal-publish-bloggerpage">\n <p><b>Tip:</b> You can use a\n <a href="http://jekyllrb.com/docs/frontmatter/"\n target="_blank">YAML front matter</a> to specify the title of your page.</p>\n <p><b>Interpreted variables:</b> <code>title</code>.</p>\n </blockquote>\n <blockquote class="url-info modal-publish-bloggerpage">\n <p><b>About URL:</b> For newly created page , Blogger API will append a generated number to the url like <code>about-me-1234.html</code>, if you deeply care about your URL naming, you should first create the page on Blogger and then update them with StackEdit specifying the pageId when publishing.\n </p>\n <p><b>About page visibility:</b> Blogger API does not respect published status for pages.When publishing the page to Blogger, the page will be <strong>live</strong> but not added to the page listing. You should arrange the page listing from Blogger dashboard.\n </p>\n </blockquote>\n </div>\n <div class="modal-footer">\n <a href="#" class="btn btn-default" data-dismiss="modal">Cancel</a>\n <a href="#" data-dismiss="modal"\n class="btn btn-primary action-process-publish">OK</a>\n </div>\n </div>\n </div>\n</div>\n\n\n<div class="modal fade modal-manage-publish">\n <div class="modal-dialog">\n <div class="modal-content">\n\n <div class="modal-header">\n <button type="button" class="close" data-dismiss="modal"\n aria-hidden="true">&times;</button>\n <h2 class="modal-title">Publication</h2>\n </div>\n <div class="modal-body">\n <p>\n "<span class="file-title"></span>" is published on the following\n location(s):\n </p>\n <div class="publish-list"></div>\n <blockquote>\n <p><b>Note:</b> Removing a publish location will not delete the actual publication.</p>\n </blockquote>\n </div>\n <div class="modal-footer">\n <a href="#" class="btn btn-primary" data-dismiss="modal">Close</a>\n </div>\n </div>\n </div>\n</div>\n\n\n<div class="modal fade modal-manage-sharing">\n <div class="modal-dialog">\n <div class="modal-content">\n\n <div class="modal-header">\n <button type="button" class="close" data-dismiss="modal"\n aria-hidden="true">&times;</button>\n <h2 class="modal-title">Sharing</h2>\n </div>\n <div class="modal-body">\n <p>Collaborate on "<span class="file-title"></span>" using the following link(s):</p>\n <p class="msg-no-share-editor"><b>No sharing link yet!</b>\n </p>\n <div class="share-editor-list"></div>\n <blockquote>\n <p><b>Note:</b> To collaborate on this document, just <a\n href="#" class="action-sync-export-dialog-couchdb" data-dismiss="modal">save it on CouchDB</a>.\n To collaborate via Google Drive or Dropbox, you have to share the file manually from Google Drive/Dropbox websites.</p>\n </blockquote>\n <hr>\n <p>Share a read-only version of "<span class="file-title"></span>" using the following link(s):</p>\n <p class="msg-no-share-viewer"><b>No sharing link yet!</b>\n </p>\n <div class="share-viewer-list"></div>\n <blockquote>\n <p><b>Note:</b> To share a read-only version of this document, just <a\n href="#" class="action-publish-gist" data-dismiss="modal">publish it as a Gist</a> in\n Markdown format.</p>\n </blockquote>\n <blockquote>\n <p><b>Tip:</b> You can open any markdown URL within StackEdit Viewer using <a\n href="viewer#!url=https://raw.github.com/benweet/stackedit/master/README.md"\n title="Sharing example"><code>viewer#!url=</code></a>.</p>\n </blockquote>\n </div>\n <div class="modal-footer">\n <a href="#" class="btn btn-primary" data-dismiss="modal">Close</a>\n </div>\n </div>\n </div>\n</div>\n\n\n<div class="modal fade modal-settings">\n <div class="modal-dialog">\n <div class="modal-content">\n\n <div class="modal-header">\n <button type="button" class="close" data-dismiss="modal"\n aria-hidden="true">&times;</button>\n <h2 class="modal-title">Settings</h2>\n <ul class="nav nav-tabs">\n <li class="active"><a class="action-load-settings"\n href="#tabpane-settings-basic" data-toggle="tab">Basic</a></li>\n <li><a class="action-load-settings"\n href="#tabpane-settings-advanced" data-toggle="tab">Advanced</a></li>\n <li><a class="action-load-settings"\n href="#tabpane-settings-extensions" data-toggle="tab">Extensions</a></li>\n <li><a class="action-load-settings"\n href="#tabpane-settings-utils" data-toggle="tab">Utils</a></li>\n </ul>\n </div>\n <div class="modal-body">\n\n <div class="tab-content clearfix">\n <div class="tab-pane active" id="tabpane-settings-basic">\n <div class="form-horizontal">\n <div class="form-group">\n <label class="col-sm-4 control-label">Layout orientation</label>\n <div class="col-sm-7">\n <div class="radio">\n <label> <input type="radio"\n name="radio-layout-orientation" value="horizontal">\n Horizontal\n </label>\n </div>\n <div class="radio">\n <label> <input type="radio"\n name="radio-layout-orientation" value="vertical">\n Vertical\n </label>\n </div>\n </div>\n </div>\n <div class="form-group">\n <label class="col-sm-4 control-label" for="input-settings-theme">Theme</label>\n <div class="col-sm-7">\n <select id="input-settings-theme" class="form-control">\n </select>\n </div>\n </div>\n <div class="form-group">\n <div class="col-sm-4"></div>\n <div class="col-sm-7">\n <div class="checkbox">\n <label>\n <input type="checkbox" id="input-settings-markdown-extra" />\n <b>Markdown Extra/GitHub Flavored Markdown</b> syntax\n </label>\n </div>\n </div>\n </div>\n <div class="form-group">\n <div class="col-sm-4"></div>\n <div class="col-sm-7">\n <div class="checkbox">\n <label>\n <input type="checkbox" id="input-settings-mathjax" />\n <b>LaTeX mathematical expressions</b> using <code>$</code> and <code>$$</code> delimiters\n </label>\n </div>\n </div>\n </div>\n <div class="form-group">\n <label class="col-sm-4 control-label"\n for="input-settings-gdrive-multiaccount">Google Drive multi-accounts\n </label>\n <div class="col-sm-7">\n <select id="input-settings-gdrive-multiaccount" class="form-control">\n <option value="1">1 account</option>\n <option value="2">2 accounts</option>\n <option value="3">3 accounts</option>\n </select>\n <span class="help-block"><b>Please sign in first with Google.</b> Once linked with your Google accounts, changing account is not possible unless you reset the application.</span>\n </div>\n </div>\n </div>\n </div>\n <div class="tab-pane" id="tabpane-settings-advanced">\n <div class="form-horizontal">\n <div class="form-group">\n <label class="col-sm-4 control-label">Edit mode</label>\n <div class="col-sm-7">\n <div class="radio">\n <label> <input type="radio"\n name="radio-settings-edit-mode" value="ltr">\n Left-To-Right\n </label>\n </div>\n <div class="radio">\n <label> <input type="radio"\n name="radio-settings-edit-mode" value="rtl">\n Right-To-Left\n </label>\n </div>\n </div>\n </div>\n <div class="form-group">\n <label class="col-sm-4 control-label">Editor\'s font style</label>\n <div class="col-sm-7">\n <div class="radio">\n <label> <input type="radio"\n name="radio-settings-editor-font-class" value="font-rich">\n Rich\n </label>\n </div>\n <div class="radio">\n <label> <input type="radio"\n name="radio-settings-editor-font-class" value="font-rich-monospaced">\n Rich Monospaced\n </label>\n </div>\n <div class="radio">\n <label> <input type="radio"\n name="radio-settings-editor-font-class" value="font-monospaced">\n Monospaced\n </label>\n </div>\n </div>\n </div>\n <div class="form-group">\n <label class="col-sm-4 control-label"\n for="input-settings-font-size">Font size ratio</label>\n <div class="col-sm-8 form-inline">\n <input type="text" id="input-settings-font-size"\n class="form-control col-sm-2">\n </div>\n </div>\n <div class="form-group">\n <label class="col-sm-4 control-label"\n for="input-settings-max-width">Max width ratio</label>\n <div class="col-sm-8 form-inline">\n <input type="text" id="input-settings-max-width"\n class="form-control col-sm-2">\n </div>\n </div>\n <div class="form-group">\n <label class="col-sm-4 control-label"\n for="input-settings-cursor-focus">Cursor focus ratio</label>\n <div class="col-sm-8 form-inline">\n <input type="text" id="input-settings-cursor-focus"\n class="form-control col-sm-2">\n </div>\n </div>\n <div class="form-group">\n <label class="col-sm-4 control-label"\n for="input-settings-lazy-rendering">Lazy rendering <a\n href="#" class="tooltip-lazy-rendering">(?)</a>\n </label>\n <div class="col-sm-7">\n <div class="checkbox">\n <input type="checkbox" id="input-settings-lazy-rendering" />\n </div>\n </div>\n </div>\n <div class="form-group">\n <label class="col-sm-4 control-label"\n for="textarea-settings-default-content">Default content\n <a href="#" class="tooltip-default-content">(?)</a>\n </label>\n <div class="col-sm-7">\n <textarea id="textarea-settings-default-content"\n class="form-control"></textarea>\n </div>\n </div>\n <div class="form-group">\n <label class="col-sm-4 control-label"\n for="textarea-settings-publish-template">Default\n template <a href="#" class="tooltip-template">(?)</a>\n </label>\n <div class="col-sm-7">\n <textarea id="textarea-settings-publish-template"\n class="form-control"></textarea>\n </div>\n </div>\n <div class="form-group">\n <label class="col-sm-4 control-label"\n for="textarea-settings-pdf-template">PDF\n template <a href="#" class="tooltip-template">(?)</a>\n </label>\n <div class="col-sm-7">\n <textarea id="textarea-settings-pdf-template"\n class="form-control"></textarea>\n </div>\n </div>\n <div class="form-group">\n <label class="col-sm-4 control-label" for="textarea-settings-pdf-options">PDF options\n <a href="#" class="tooltip-pdf-options">(?)</a>\n </label>\n <div class="col-sm-7">\n <textarea id="textarea-settings-pdf-options"\n class="form-control"></textarea>\n </div>\n </div>\n <div class="form-group">\n <label class="col-sm-4 control-label"\n for="input-settings-markdown-mime-type">Markdown MIME type\n </label>\n <div class="col-sm-7">\n <select id="input-settings-markdown-mime-type" class="form-control">\n <option value="text/plain">text/plain</option>\n <option value="text/x-markdown">text/x-markdown</option>\n </select>\n </div>\n </div>\n <div class="form-group">\n <label class="col-sm-4 control-label">Permissions</label>\n <div class="col-sm-7">\n <div class="checkbox">\n <label>\n <input type="checkbox" id="input-settings-gdrive-full-access" />\n Allow StackEdit to open any document in Google Drive\n </label> <span class="help-block">Existing authorization has to be revoked in\n <a href="https://www.google.com/settings/dashboard" target="_blank">Google Dashboard</a>\n for this change to take effect.</span>\n </div>\n </div>\n </div>\n <div class="form-group">\n <div class="col-sm-4"></div>\n <div class="col-sm-7">\n <div class="checkbox">\n <label>\n <input type="checkbox" id="input-settings-dropbox-full-access" />\n Allow StackEdit to open any document in Dropbox\n </label> <span class="help-block">If unchecked, access will be restricted to folder\n <b>/Applications/StackEdit</b> for existing files.</span>\n </div>\n </div>\n </div>\n <div class="form-group">\n <div class="col-sm-4"></div>\n <div class="col-sm-7">\n <div class="checkbox">\n <label>\n <input type="checkbox" id="input-settings-github-full-access" />\n Allow StackEdit to access private repositories in GitHub\n </label> <span class="help-block">Existing authorization has to be revoked in\n <a href="https://github.com/settings/applications" target="_blank">GitHub settings</a>\n for this change to take effect.</span>\n </div>\n </div>\n </div>\n <div class="form-group">\n <label class="col-sm-4 control-label"\n for="input-settings-publish-commit-msg">GitHub commit message</label>\n <div class="col-sm-7">\n <input type="text" id="input-settings-publish-commit-msg"\n class="form-control">\n </div>\n </div>\n <div class="form-group">\n <label class="col-sm-4 control-label"\n for="input-settings-couchdb-url">CouchDB URL</label>\n <div class="col-sm-7">\n <input type="text" id="input-settings-couchdb-url"\n class="form-control">\n <span class="help-block pull-right"><a\n target="blank"\n href="https://github.com/benweet/stackedit/blob/master/doc/couchdb-setup.md">Setup\n your own CouchDB...</a></span>\n </div>\n </div>\n </div>\n </div>\n <div class="tab-pane" id="tabpane-settings-extensions">\n <div class="panel-group accordion-extensions"></div>\n <span class="help-block pull-right"><a target="_blank"\n href="https://github.com/benweet/stackedit/blob/master/doc/developer-guide.md#developer-guide">Create\n your own extension...</a></span>\n </div>\n <div class="tab-pane" id="tabpane-settings-utils">\n <div class="tab-pane-button-container">\n <a href="#" class="btn btn-block btn-default action-welcome-file"\n data-dismiss="modal"><i class="icon-help-circled"></i>\n Hello! document</a> <a href="#"\n class="btn btn-block btn-default action-welcome-tour"\n data-dismiss="modal"><i\n class="icon-help-circled"></i> Welcome tour</a>\n </div>\n <div class="tab-pane-button-container">\n <a href="#"\n class="btn btn-block btn-default action-import-docs-settings"><i\n class="icon-cog-alt"></i> Import docs & settings</a> <a href="#"\n class="btn btn-block btn-default action-export-docs-settings"\n data-dismiss="modal"><i class="icon-cog-alt"></i>\n Export docs & settings</a> <input type="file"\n id="input-file-import-docs-settings" class="hide">\n </div>\n <div class="tab-pane-button-container">\n <a href="#"\n class="btn btn-block btn-default action-default-settings"\n data-dismiss="modal"><i class="icon-wrench"></i>\n Load default settings</a> <a href="#" class="btn btn-block btn-default"\n data-dismiss="modal" data-toggle="modal"\n data-target=".modal-app-reset"><i\n class="icon-fire"></i> Reset application</a> <a target="_blank" href="recovery.html" class="btn btn-block btn-default"><i\n class="icon-medkit"></i> StackEdit recovery</a>\n </div>\n </div>\n </div>\n\n </div>\n <div class="modal-footer">\n <a href="#" class="btn btn-default" data-dismiss="modal">Cancel</a>\n <a href="#" class="btn btn-primary action-apply-settings"\n data-dismiss="modal">OK</a>\n </div>\n </div>\n </div>\n</div>\n\n\n<div class="modal fade modal-non-unique">\n <div class="modal-dialog">\n <div class="modal-content">\n\n <div class="modal-header">\n <h2 class="modal-title">Ooops...</h2>\n </div>\n <div class="modal-body">\n <p>StackEdit has stopped because another instance was running in\n the same browser.</p>\n <blockquote>\n <p>If you want to reopen StackEdit, click on\n "Reload".</p>\n </blockquote>\n </div>\n <div class="modal-footer">\n <a href="javascript:window.location.reload();"\n class="btn btn-primary">Reload</a>\n </div>\n </div>\n </div>\n</div>\n\n\n<div class="modal fade modal-redirect-confirm">\n <div class="modal-dialog">\n <div class="modal-content">\n\n <div class="modal-header">\n <h2 class="modal-title">Redirection</h2>\n </div>\n <div class="modal-body">\n <p class="redirect-msg"></p>\n <blockquote>\n <p>Please click <b>OK</b> to proceed.</p>\n </blockquote>\n </div>\n <div class="modal-footer">\n <a class="btn btn-default" data-dismiss="modal">Cancel</a>\n <a class="btn btn-primary action-redirect-confirm" data-dismiss="modal">OK</a>\n </div>\n </div>\n </div>\n</div>\n\n\n<div class="modal fade modal-app-reset">\n <div class="modal-dialog">\n <div class="modal-content">\n\n <div class="modal-header">\n <h2 class="modal-title">Reset application</h2>\n </div>\n <div class="modal-body">\n <p>This will delete all your local documents.</p>\n <blockquote><b>Are you sure?</b></blockquote>\n </div>\n <div class="modal-footer">\n <a href="#" class="btn btn-default" data-dismiss="modal">Cancel</a>\n <a href="#" class="btn btn-primary action-app-reset"\n data-dismiss="modal">OK</a>\n </div>\n </div>\n </div>\n</div>\n\n\n<div class="modal fade modal-import-docs-settings">\n <div class="modal-dialog">\n <div class="modal-content">\n\n <div class="modal-header">\n <h2 class="modal-title">Import documents and settings</h2>\n </div>\n <div class="modal-body">\n <p>This will delete all existing local documents.</p>\n <blockquote><b>Are you sure?</b></blockquote>\n </div>\n <div class="modal-footer">\n <a href="#" class="btn btn-default" data-dismiss="modal">Cancel</a>\n <a href="#" class="btn btn-primary action-import-docs-settings-confirm"\n data-dismiss="modal">OK</a>\n </div>\n </div>\n </div>\n</div>\n\n\n<div class="modal fade modal-add-google-drive-account">\n <div class="modal-dialog">\n <div class="modal-content">\n\n <div class="modal-header">\n <h2 class="modal-title">Add Google Drive account</h2>\n </div>\n <div class="modal-body">\n <p>To perform this request, you need to configure another Google Drive account in StackEdit.</p>\n <blockquote><b>Do you want to proceed?</b></blockquote>\n </div>\n <div class="modal-footer">\n <a href="#" class="btn btn-default action-remove-google-drive-state"\n data-dismiss="modal">No</a>\n <a href="#" class="btn btn-primary action-add-google-drive-account"\n data-dismiss="modal">Yes</a>\n </div>\n </div>\n </div>\n</div>\n\n\n<div class="modal fade modal-sponsor-only">\n <div class="modal-dialog">\n <div class="modal-content">\n\n <div class="modal-header">\n <h2 class="modal-title">Sponsor only!</h2>\n </div>\n <div class="modal-body">\n <p>This feature is restricted to sponsor users as it\'s a web service hosted on Amazon EC2.\n Note that sponsoring StackEdit would cost you only $5/year.</p>\n <p>To see how a PDF looks <a target="_blank" href="/Welcome%20document.pdf">click here</a>.</p>\n <blockquote>\n <p><b>Tip:</b> PDFs are fully customizable via Settings>Advanced>PDF template/options.</p>\n </blockquote>\n </div>\n <div class="modal-footer">\n <a href="#" class="btn btn-primary"\n data-dismiss="modal">Close</a>\n </div>\n </div>\n </div>\n</div>\n\n\n<div id="dropboxjs" data-app-key="x0k2l8puemfvg0o"></div>\n';
}), define("text!html/bodyViewer.html", [], function() {
return '<div class="layout-wrapper-l1">\n <div class="layout-wrapper-l2">\n <div class="navbar navbar-default">\n <div class="navbar-inner">\n <div class="nav left-space"></div>\n <div class="nav right-space pull-right"></div>\n <div class="buttons-dropdown dropdown">\n <div class="nav">\n <button class="btn btn-success" data-toggle="dropdown"\n title="Show buttons">\n <i class="icon-th-large"></i>\n </button>\n <div class="dropdown-menu">\n </div>\n </div>\n </div>\n <ul class="nav pull-right">\n <li class="btn-group">\n <button class="btn btn-success action-edit-document hide"\n title="Edit this document">\n <i class="icon-pencil"></i>\n </button>\n </li>\n <li class="btn-group">\n <button class="btn btn-success dropdown-toggle"\n data-toggle="dropdown" title="Save this document">\n <i class="icon-download"></i>\n </button>\n <ul class="dropdown-menu">\n <li><a class="action-download-md" href="#"><i\n class="icon-download"></i> Export as Markdown</a></li>\n <li><a class="action-download-html" href="#"><i\n class="icon-download"></i> Export as HTML</a></li>\n <li><a class="action-download-template" href="#"><i\n class="icon-download"></i> Export using template</a></li>\n </ul>\n </li>\n </ul>\n <ul class="nav pull-right title-container">\n <li><div class="working-indicator"></div></li>\n <li><span class="btn btn-success file-title-navbar"></span></li>\n </ul>\n </div>\n </div>\n <div class="layout-wrapper-l3">\n <pre id="wmd-input" class="form-control"><div class="editor-content"></div><div class="editor-margin"></div></pre>\n <div class="preview-panel">\n <div class="preview-container">\n <div id="preview-contents">\n <div id="wmd-preview" class="preview-content"></div>\n </div>\n </div>\n </div>\n </div>\n <div class="extension-preview-buttons">\n <div class="btn-group drag-me" title="Drag me!">\n <i class="icon-ellipsis-vert"></i>\n </div>\n </div>\n </div>\n <div id="wmd-button-bar" class="hide"></div>\n\n <div class="menu-panel">\n <button class="btn toggle-button action-open-stackedit"\n title="Open StackEdit">\n <img\n data-stackedit-src="menu-icon.png" width="24" height="24" />\n </button>\n </div>\n\n\n <div class="document-panel">\n <button class="btn toggle-button" title="Select document Ctrl+[ Ctrl+]">\n <i class="icon-folder-open"></i>\n </button>\n <div class="search-bar clearfix">\n <div class="input-group">\n <span class="input-group-addon"><i class="icon-search"></i></span><input\n type="text" class="form-control" placeholder="Find document"></input>\n </div>\n </div>\n <div class="panel-content">\n <div class="list-group document-list"></div>\n <div class="list-group document-list-filtered hide"></div>\n </div>\n </div>\n</div>\n<div id="wmd-button-bar" class="hide"></div>\n\n<div class="modal modal-non-unique">\n <div class="modal-dialog">\n <div class="modal-content">\n\n <div class="modal-header">\n <h3 class="modal-title">Ooops...</h3>\n </div>\n <div class="modal-body">\n <p>StackEdit has stopped because another instance was running in\n the same browser.</p>\n <blockquote>\n <p>If you want to reopen StackEdit, click on\n "Reload".</p>\n </blockquote>\n </div>\n <div class="modal-footer">\n <a href="javascript:window.location.reload();"\n class="btn btn-primary">Reload</a>\n </div>\n </div>\n </div>\n</div>\n';
}), define("text!html/tooltipSettingsTemplate.html", [], function() {
return 'Available variables:\n<br>\n<ul>\n <li>\n <b>documentTitle</b>: document title</li>\n <li>\n <b>documentMarkdown</b>: document in Markdown format</li>\n <li>\n <b>strippedDocumentMarkdown</b>: document without front matter</li>\n <li>\n <b>documentHTML</b>: document in HTML format</li>\n <li>\n <b>documentHTMLWithFrontMatter</b></li>\n <li>\n <b>frontMatter</b>: undefined if no front matter</li>\n <li>\n <b>publishAttributes</b>: undefined if\n not publishing</li>\n</ul>\n<b>Examples:</b>\n<br />&lt;title&gt;&lt;%= documentTitle %&gt;&lt;&#x2F;title&gt;\n<br />&lt;div&gt;&lt;%- documentHTML %&gt;&lt;&#x2F;div&gt;\n<br />&lt;%\n<br />if(publishAttributes.provider.providerId == &quot;github&quot;) print(documentMarkdown);\n<br\n/>%&gt;\n<br />\n<br />\n<a target="_blank" href="http://underscorejs.org/#template">More\n info</a>\n<br />\n<br />\n<b class="text-danger">\n <i class="icon-attention"></i>Careful! Template is subject to malicious code. Don\'t copy/paste untrusted\n content.</b>\n';
}), define("text!html/tooltipSettingsPdfOptions.html", [], function() {
return 'Option object in JSON format. Possible attributes:\n<br><br>\n<b>marginTop</b>,\n<b>marginRight</b>,\n<b>marginBottom</b>,\n<b>marginLeft</b>,<br>\n<b>headerCenter</b>,\n<b>headerLeft</b>,\n<b>headerRight</b>,\n<b>headerFontName</b>,\n<b>headerFontSize</b>,<br>\n<b>footerCenter</b>,\n<b>footerLeft</b>,\n<b>footerRight</b>,\n<b>footerFontName</b>,\n<b>footerFontSize</b><br>\n<b>pageSize</b><br><br>\nPlease check out the\n<a target="_blank" href="http://wkhtmltopdf.org/usage/wkhtmltopdf.txt">wkhtmltopdf documentation</a> for more info.\n';
}), function() {
function e() {}
function t(e) {
this.buttonBar = d.getElementById("wmd-button-bar" + e), this.preview = d.getElementById("wmd-preview" + e),
this.input = d.getElementById("wmd-input" + e);
}
function n(e, t) {
var n, r, o, a = this, s = [], c = 0, u = "none", d = function(e, t) {
u != e && (u = e, t || h()), m.isIE && "moving" == u ? o = null : r = setTimeout(p, 1);
}, p = function(e) {
o = new i(t, e), r = void 0;
};
this.setCommandMode = function() {
u = "command", h(), r = setTimeout(p, 0);
}, this.canUndo = function() {
return c > 1;
}, this.canRedo = function() {
return !!s[c + 1];
}, this.undo = function() {
a.canUndo() && (n ? (n.restore(), n = null) : (s[c] = new i(t), s[--c].restore(),
e && e())), u = "none", t.input.focus(), p();
}, this.redo = function() {
a.canRedo() && (s[++c].restore(), e && e()), u = "none", t.input.focus(), p();
};
var h = function() {
var r = o || new i(t);
return !!r && ("moving" == u ? void (n || (n = r)) : (n && (s[c - 1].text != n.text && (s[c++] = n),
n = null), s[c++] = r, s[c + 1] = null, void (e && e())));
}, f = function(e) {
if (!e.ctrlKey && !e.metaKey) {
var t = e.keyCode;
t >= 33 && 40 >= t || t >= 63232 && 63235 >= t ? d("moving") : 8 == t || 46 == t || 127 == t ? d("deleting") : 13 == t ? d("newlines") : 27 == t ? d("escape") : (16 > t || t > 20) && 91 != t && d("typing");
}
}, g = function() {
l.addEvent(t.input, "keypress", function(e) {
!e.ctrlKey && !e.metaKey || e.altKey || 89 != e.keyCode && 90 != e.keyCode || e.preventDefault();
});
var e = function() {
(m.isIE || o && o.text != t.input.value) && void 0 == r && (u = "paste", h(), p());
};
l.addEvent(t.input, "keydown", f), l.addEvent(t.input, "mousedown", function() {
d("moving");
}), t.input.onpaste = e, t.input.ondrop = e;
};
this.reinit = function(e, t, i, a) {
s = [], c = 0, u = "none", n = void 0, r = void 0, p(), o.text = e, o.start = t,
o.end = i, o.scrollTop = a, o.setInputAreaSelection(), h();
}, this.setMode = d, function() {
g(), p(!0);
}();
}
function i(t) {
var n = this, i = t.input;
this.init = function() {
l.isVisible(i) && (this.setInputAreaSelectionStartEnd(), this.scrollTop = i.scrollTop,
(!this.text && i.selectionStart || 0 === i.selectionStart) && (this.text = i.value));
}, this.setInputAreaSelection = function() {
l.isVisible(i) && (i.focus(), i.selectionStart = n.start, i.selectionEnd = n.end);
}, this.setInputAreaSelectionStartEnd = function() {
n.start = i.selectionStart, n.end = i.selectionEnd;
}, this.restore = function() {
void 0 != n.text && n.text != i.value && (i.value = n.text), this.setInputAreaSelection();
}, this.getChunks = function() {
var t = new e();
return t.before = l.fixEolChars(n.text.substring(0, n.start)), t.startTag = "",
t.selection = l.fixEolChars(n.text.substring(n.start, n.end)), t.endTag = "", t.after = l.fixEolChars(n.text.substring(n.end)),
t.scrollTop = n.scrollTop, t;
}, this.setChunks = function(e) {
e.before = e.before + e.startTag, e.after = e.endTag + e.after, this.start = e.before.length,
this.end = e.before.length + e.selection.length, this.text = e.before + e.selection + e.after,
this.scrollTop = e.scrollTop;
}, this.init();
}
function r(e, t, n) {
var i, r, o, a = function(e, t) {
l.addEvent(e, "input", t), e.onpaste = t, e.ondrop = t, l.addEvent(e, "keypress", t),
l.addEvent(e, "keydown", t);
}, s = function() {
if (t.preview) {
var n = t.input.value;
if (!n || n != o) {
o = n;
var i = new Date().getTime();
n = e.makeHtml(n);
var a = new Date().getTime();
r = a - i, f(n);
}
}
}, c = function() {
i && (clearTimeout(i), i = void 0);
};
this.refresh = function(e) {
e ? (o = "", s()) : c();
}, this.processingTime = function() {
return r;
};
var u, d = function(e) {
var n = t.preview, i = n.parentNode, r = n.nextSibling;
i.removeChild(n), n.innerHTML = e, r ? i.insertBefore(n, r) : i.appendChild(n);
}, p = function(e) {
t.preview.innerHTML = e;
}, h = function(e) {
if (u) return u(e);
try {
p(e), u = p;
} catch (t) {
(u = d)(e);
}
}, f = function(e) {
t.preview && (h(e), n());
};
!function() {
a(t.input, c), t.preview && (t.preview.scrollTop = 0);
}();
}
function o(e, t, n, r, o, a, s) {
function l(e) {
p.focus();
var o = "wmd-link-button" == e.id || "wmd-image-button" == e.id;
if (e.textOp) {
n && !o && n.setCommandMode();
var a = new i(t);
if (!a) return;
var s = a.getChunks(), l = function() {
p.focus(), s && a.setChunks(s), a.restore(), r.refresh();
};
e.textOp(s, l) || (l(), o || p.adjustCursorPosition());
}
e.execute && e.execute(n);
}
function c(e, n) {
var i = e.getElementsByTagName("span")[0];
e.className = e.className.replace(/ disabled/g, ""), n ? (i.style.backgroundPosition = e.XShift + " 0px",
e.onmouseover = function() {
i.style.backgroundPosition = this.XShift + " -40px";
}, e.onmouseout = function() {
i.style.backgroundPosition = this.XShift + " 0px";
}, m.isIE && (e.onmousedown = function() {
t.ieCachedRange = document.selection.createRange(), t.ieCachedScrollTop = t.input.scrollTop;
}), e.isHelp || (e.onclick = function() {
return this.onmouseout && this.onmouseout(), l(this), !1;
})) : (i.style.backgroundPosition = e.XShift + " -20px", e.onmouseover = e.onmouseout = e.onclick = function() {},
e.className += " disabled");
}
function u(e) {
return "string" == typeof e && (e = o[e]), function() {
e.apply(o, arguments);
};
}
function d() {
n && (c(h.undo, n.canUndo()), c(h.redo, n.canRedo()));
}
var p = t.input, h = {};
!function() {
var n = t.buttonBar, i = document.createElement("ul");
i.id = "wmd-button-row" + e, i.className = "wmd-button-row", i = n.appendChild(i);
var r = 0, o = function(t, n, o, a) {
var s = document.createElement("li");
s.className = "wmd-button", s.style.left = r + "px", r += 25;
var l = document.createElement("span");
return s.id = t + e, s.appendChild(l), s.title = n, s.XShift = o, a && (s.textOp = a),
c(s, !0), i.appendChild(s), s;
}, l = function(t) {
var n = document.createElement("li");
n.className = "wmd-spacer wmd-spacer" + t, n.id = "wmd-spacer" + t + e, i.appendChild(n),
r += 25;
};
if (h.bold = o("wmd-bold-button", s("bold"), "0px", u("doBold")), h.italic = o("wmd-italic-button", s("italic"), "-20px", u("doItalic")),
l(1), h.link = o("wmd-link-button", s("link"), "-40px", u(function(e, t) {
return this.doLinkOrImage(e, t, !1);
})), h.quote = o("wmd-quote-button", s("quote"), "-60px", u("doBlockquote")), h.code = o("wmd-code-button", s("code"), "-80px", u("doCode")),
h.image = o("wmd-image-button", s("image"), "-100px", u(function(e, t) {
return this.doLinkOrImage(e, t, !0);
})), l(2), h.olist = o("wmd-olist-button", s("olist"), "-120px", u(function(e, t) {
this.doList(e, t, !0);
})), h.ulist = o("wmd-ulist-button", s("ulist"), "-140px", u(function(e, t) {
this.doList(e, t, !1);
})), h.heading = o("wmd-heading-button", s("heading"), "-160px", u("doHeading")),
h.hr = o("wmd-hr-button", s("hr"), "-180px", u("doHorizontalRule")), l(3), h.undo = o("wmd-undo-button", s("undo"), "-200px", null),
h.undo.execute = function(e) {
e && e.undo();
}, h.redo = o("wmd-redo-button", s("redo"), "-220px", null), h.redo.execute = function(e) {
e && e.redo();
}, a) {
var p = document.createElement("li"), f = document.createElement("span");
p.appendChild(f), p.className = "wmd-button wmd-help-button", p.id = "wmd-help-button" + e,
p.XShift = "-240px", p.isHelp = !0, p.style.right = "0px", p.title = s("help"),
p.onclick = a.handler, c(p, !0), i.appendChild(p), h.help = p;
}
d();
}(), m.isOpera, this.setUndoRedoButtonStates = d, this.buttons = h, this.doClick = l;
}
function a(e, t) {
this.hooks = e, this.getString = t;
}
function s(e) {
return e.replace(/^\s*(.*?)(?:\s+"(.+)")?\s*$/, function(e, t, n) {
return t = t.replace(/\?.*$/, function(e) {
return e.replace(/\+/g, " ");
}), t = decodeURIComponent(t), t = encodeURI(t).replace(/'/g, "%27").replace(/\(/g, "%28").replace(/\)/g, "%29"),
t = t.replace(/\?.*$/, function(e) {
return e.replace(/\+/g, "%2b");
}), n && (n = n.trim ? n.trim() : n.replace(/^\s*/, "").replace(/\s*$/, ""), n = n.replace(/"/g, "quot;").replace(/\(/g, "&#40;").replace(/\)/g, "&#41;").replace(/</g, "&lt;").replace(/>/g, "&gt;")),
n ? t + ' "' + n + '"' : t;
});
}
var l = {}, c = {}, u = {}, d = window.document, p = window.RegExp, h = window.navigator, f = {
lineLength: 72
}, m = {
isIE: /msie/.test(h.userAgent.toLowerCase()),
isIE_5or6: /msie 6/.test(h.userAgent.toLowerCase()) || /msie 5/.test(h.userAgent.toLowerCase()),
isOpera: /opera/.test(h.userAgent.toLowerCase())
}, g = {
bold: "Strong <strong> Ctrl/Cmd+B",
boldexample: "strong text",
italic: "Emphasis <em> Ctrl/Cmd+I",
italicexample: "emphasized text",
link: "Hyperlink <a> Ctrl/Cmd+L",
linkdescription: "enter link description here",
linkdialog: '<p><b>Insert Hyperlink</b></p><p>http://example.com/ "optional title"</p>',
quote: "Blockquote <blockquote> Ctrl/Cmd+Q",
quoteexample: "Blockquote",
code: "Code Sample <pre><code> Ctrl/Cmd+K",
codeexample: "enter code here",
image: "Image <img> Ctrl/Cmd+G",
imagedescription: "enter image description here",
imagedialog: "<p><b>Insert Image</b></p><p>http://example.com/images/diagram.jpg \"optional title\"<br><br>Need <a href='http://www.google.com/search?q=free+image+hosting' target='_blank'>free image hosting?</a></p>",
olist: "Numbered List <ol> Ctrl/Cmd+O",
ulist: "Bulleted List <ul> Ctrl/Cmd+U",
litem: "List item",
heading: "Heading <h1>/<h2> Ctrl/Cmd+H",
headingexample: "Heading",
hr: "Horizontal Rule <hr> Ctrl/Cmd+R",
undo: "Undo - Ctrl/Cmd+Z",
redo: "Redo - Ctrl/Cmd+Y",
help: "Markdown Editing Help"
};
Markdown.Editor = function(e, i, s) {
s = s || {}, "function" == typeof s.handler && (s = {
helpButton: s
}), s.strings = s.strings || {}, s.helpButton && (s.strings.help = s.strings.help || s.helpButton.title);
var l = function(e) {
return s.strings[e] || g[e];
};
i = i || "";
var c = this.hooks = new Markdown.HookCollection();
c.addNoop("onPreviewRefresh"), c.addNoop("postBlockquoteCreation"), c.addFalse("insertImageDialog"),
c.addFalse("insertLinkDialog"), this.getConverter = function() {
return e;
};
var u, p, h = this;
this.run = function() {
if (!u) {
u = new t(i);
var f, m = new a(c, l), g = new r(e, u, function() {
c.onPreviewRefresh();
});
s.undoManager ? (p = s.undoManager, p.onButtonStateChange = function() {
f.setUndoRedoButtonStates();
}, f && f.setUndoRedoButtonStates()) : /\?noundo/.test(d.location.href) || (p = new n(function() {
g.refresh(), f && f.setUndoRedoButtonStates();
}, u), this.textOperation = function(e) {
p.setCommandMode(), e(), h.refreshPreview();
}), f = new o(i, u, p, g, m, s.helpButton, l), f.setUndoRedoButtonStates(), h.refreshPreview = function() {
g.refresh(!0);
}, h.undoManager = p, h.uiManager = f;
}
};
}, e.prototype.findTags = function(e, t) {
var n, i = this;
e && (n = l.extendRegExp(e, "", "$"), this.before = this.before.replace(n, function(e) {
return i.startTag = i.startTag + e, "";
}), n = l.extendRegExp(e, "^", ""), this.selection = this.selection.replace(n, function(e) {
return i.startTag = i.startTag + e, "";
})), t && (n = l.extendRegExp(t, "", "$"), this.selection = this.selection.replace(n, function(e) {
return i.endTag = e + i.endTag, "";
}), n = l.extendRegExp(t, "^", ""), this.after = this.after.replace(n, function(e) {
return i.endTag = e + i.endTag, "";
}));
}, e.prototype.trimWhitespace = function(e) {
var t, n, i = this;
e ? t = n = "" : (t = function(e) {
return i.before += e, "";
}, n = function(e) {
return i.after = e + i.after, "";
}), this.selection = this.selection.replace(/^(\s*)/, t).replace(/(\s*)$/, n);
}, e.prototype.skipLines = function(e, t, n) {
void 0 === e && (e = 1), void 0 === t && (t = 1), e++, t++;
var i, r;
if (navigator.userAgent.match(/Chrome/) && "X".match(/()./), this.selection = this.selection.replace(/(^\n*)/, ""),
this.startTag = this.startTag + p.$1, this.selection = this.selection.replace(/(\n*$)/, ""),
this.endTag = this.endTag + p.$1, this.startTag = this.startTag.replace(/(^\n*)/, ""),
this.before = this.before + p.$1, this.endTag = this.endTag.replace(/(\n*$)/, ""),
this.after = this.after + p.$1, this.before) {
for (i = r = ""; e--; ) i += "\\n?", r += "\n";
n && (i = "\\n*"), this.before = this.before.replace(new p(i + "$", ""), r);
}
if (this.after) {
for (i = r = ""; t--; ) i += "\\n?", r += "\n";
n && (i = "\\n*"), this.after = this.after.replace(new p(i, ""), r);
}
}, l.isVisible = function(e) {
return window.getComputedStyle ? "none" !== window.getComputedStyle(e, null).getPropertyValue("display") : e.currentStyle ? "none" !== e.currentStyle.display : void 0;
}, l.addEvent = function(e, t, n) {
e.attachEvent ? e.attachEvent("on" + t, n) : e.addEventListener(t, n, !1);
}, l.removeEvent = function(e, t, n) {
e.detachEvent ? e.detachEvent("on" + t, n) : e.removeEventListener(t, n, !1);
}, l.fixEolChars = function(e) {
return e = e.replace(/\r\n/g, "\n"), e = e.replace(/\r/g, "\n");
}, l.extendRegExp = function(e, t, n) {
null !== t && void 0 !== t || (t = ""), null !== n && void 0 !== n || (n = "");
var i, r = e.toString();
return r = r.replace(/\/([gim]*)$/, function(e, t) {
return i = t, "";
}), r = r.replace(/(^\/|\/$)/g, ""), r = t + r + n, new p(r, i);
}, c.getTop = function(e, t) {
var n = e.offsetTop;
if (!t) for (;e = e.offsetParent; ) n += e.offsetTop;
return n;
}, c.getHeight = function(e) {
return e.offsetHeight || e.scrollHeight;
}, c.getWidth = function(e) {
return e.offsetWidth || e.scrollWidth;
}, c.getPageSize = function() {
var e, t, n, i;
return self.innerHeight && self.scrollMaxY ? (e = d.body.scrollWidth, t = self.innerHeight + self.scrollMaxY) : d.body.scrollHeight > d.body.offsetHeight ? (e = d.body.scrollWidth,
t = d.body.scrollHeight) : (e = d.body.offsetWidth, t = d.body.offsetHeight), self.innerHeight ? (n = self.innerWidth,
i = self.innerHeight) : d.documentElement && d.documentElement.clientHeight ? (n = d.documentElement.clientWidth,
i = d.documentElement.clientHeight) : d.body && (n = d.body.clientWidth, i = d.body.clientHeight),
[ Math.max(e, n), Math.max(t, i), n, i ];
}, u.createBackground = function() {
var e = d.createElement("div"), t = e.style;
e.className = "wmd-prompt-background", t.position = "absolute", t.top = "0", t.zIndex = "1000",
m.isIE ? t.filter = "alpha(opacity=50)" : t.opacity = "0.5";
var n = c.getPageSize();
return t.height = n[1] + "px", m.isIE ? (t.left = d.documentElement.scrollLeft,
t.width = d.documentElement.clientWidth) : (t.left = "0", t.width = "100%"), d.body.appendChild(e),
e;
}, u.prompt = function(e, t, n) {
var i, r;
void 0 === t && (t = "");
var o = function(e) {
27 === (e.charCode || e.keyCode) && a(!0);
}, a = function(e) {
l.removeEvent(d.body, "keydown", o);
var t = r.value;
return e ? t = null : (t = t.replace(/^http:\/\/(https?|ftp):\/\//, "$1://"), /^(?:https?|ftp):\/\//.test(t) || (t = "http://" + t)),
i.parentNode.removeChild(i), n(t), !1;
}, s = function() {
i = d.createElement("div"), i.className = "wmd-prompt-dialog", i.style.padding = "10px;",
i.style.position = "fixed", i.style.width = "400px", i.style.zIndex = "1001";
var n = d.createElement("div");
n.innerHTML = e, n.style.padding = "5px", i.appendChild(n);
var s = d.createElement("form"), u = s.style;
s.onsubmit = function() {
return a(!1);
}, u.padding = "0", u.margin = "0", u.cssFloat = "left", u.width = "100%", u.textAlign = "center",
u.position = "relative", i.appendChild(s), r = d.createElement("input"), r.type = "text",
r.value = t, u = r.style, u.display = "block", u.width = "80%", u.marginLeft = u.marginRight = "auto",
s.appendChild(r);
var p = d.createElement("input");
p.type = "button", p.onclick = function() {
return a(!1);
}, p.value = "OK", u = p.style, u.margin = "10px", u.display = "inline", u.width = "7em";
var h = d.createElement("input");
h.type = "button", h.onclick = function() {
return a(!0);
}, h.value = "Cancel", u = h.style, u.margin = "10px", u.display = "inline", u.width = "7em",
s.appendChild(p), s.appendChild(h), l.addEvent(d.body, "keydown", o), i.style.top = "50%",
i.style.left = "50%", i.style.display = "block", m.isIE_5or6 && (i.style.position = "absolute",
i.style.top = d.documentElement.scrollTop + 200 + "px", i.style.left = "50%"), d.body.appendChild(i),
i.style.marginTop = -c.getHeight(i) / 2 + "px", i.style.marginLeft = -c.getWidth(i) / 2 + "px";
};
setTimeout(function() {
s();
var e = t.length;
if (void 0 !== r.selectionStart) r.selectionStart = 0, r.selectionEnd = e; else if (r.createTextRange) {
var n = r.createTextRange();
n.collapse(!1), n.moveStart("character", -e), n.moveEnd("character", e), n.select();
}
r.focus();
}, 0);
};
var v = a.prototype;
v.prefixes = "(?:\\s{4,}|\\s*>|\\s*-\\s+|\\s*\\d+\\.|=|\\+|-|_|\\*|#|\\s*\\[[^\n]]+\\]:)",
v.unwrap = function(e) {
var t = new p("([^\\n])\\n(?!(\\n|" + this.prefixes + "))", "g");
e.selection = e.selection.replace(t, "$1 $2");
}, v.wrap = function(e, t) {
this.unwrap(e);
var n = new p("(.{1," + t + "})( +|$\\n?)", "gm"), i = this;
e.selection = e.selection.replace(n, function(e, t) {
return new p("^" + i.prefixes, "").test(e) ? e : t + "\n";
}), e.selection = e.selection.replace(/\s+$/, "");
}, v.doBold = function(e, t) {
return this.doBorI(e, t, 2, this.getString("boldexample"));
}, v.doItalic = function(e, t) {
return this.doBorI(e, t, 1, this.getString("italicexample"));
}, v.doBorI = function(e, t, n, i) {
e.trimWhitespace(), e.selection = e.selection.replace(/\n{2,}/g, "\n");
var r = /(\**$)/.exec(e.before)[0], o = /(^\**)/.exec(e.after)[0], a = Math.min(r.length, o.length);
if (a >= n && (2 != a || 1 != n)) e.before = e.before.replace(p("[*]{" + n + "}$", ""), ""),
e.after = e.after.replace(p("^[*]{" + n + "}", ""), ""); else if (!e.selection && o) {
e.after = e.after.replace(/^([*_]*)/, ""), e.before = e.before.replace(/(\s?)$/, "");
var s = p.$1;
e.before = e.before + o + s;
} else {
e.selection || o || (e.selection = i);
var l = 1 >= n ? "*" : "**";
e.before = e.before + l, e.after = l + e.after;
}
}, v.stripLinkDefs = function(e, t) {
return e = e.replace(/^[ ]{0,3}\[(\d+)\]:[ \t]*\n?[ \t]*<?(\S+?)>?[ \t]*\n?[ \t]*(?:(\n*)["(](.+?)[")][ \t]*)?(?:\n+|$)/gm, function(e, n, i, r, o) {
return t[n] = e.replace(/\s*$/, ""), r ? (t[n] = e.replace(/["(](.+?)[")]$/, ""),
r + o) : "";
});
}, v.addLinkDef = function(e, t) {
var n = 0, i = {};
e.before = this.stripLinkDefs(e.before, i), e.selection = this.stripLinkDefs(e.selection, i),
e.after = this.stripLinkDefs(e.after, i);
var r = "", o = /(\[)((?:\[[^\]]*\]|[^\[\]])*)(\][ ]?(?:\n[ ]*)?\[)(\d+)(\])/g, a = function(e) {
n++, e = e.replace(/^[ ]{0,3}\[(\d+)\]:/, " [" + n + "]:"), r += "\n" + e;
}, s = function(e, t, r, l, c, u) {
return r = r.replace(o, s), i[c] ? (a(i[c]), t + r + l + n + u) : e;
};
e.before = e.before.replace(o, s), t ? a(t) : e.selection = e.selection.replace(o, s);
var l = n;
return e.after = e.after.replace(o, s), e.after && (e.after = e.after.replace(/\n*$/, "")),
e.after || (e.selection = e.selection.replace(/\n*$/, "")), e.after += "\n\n" + r,
l;
}, v.doLinkOrImage = function(e, t, n) {
e.trimWhitespace(), e.findTags(/\s*!?\[/, /\][ ]?(?:\n[ ]*)?(\(.*?\))?/);
var i;
if (!(e.endTag.length > 1 && e.startTag.length > 0)) {
if (e.selection = e.startTag + e.selection + e.endTag, e.startTag = e.endTag = "",
/\n\n/.test(e.selection)) return void this.addLinkDef(e, null);
var r = this, o = function(o) {
i.parentNode.removeChild(i), null !== o && (e.selection = (" " + e.selection).replace(/([^\\](?:\\\\)*)(?=[[\]])/g, "$1\\").substr(1),
e.startTag = n ? "![" : "[", e.endTag = "](" + s(o) + ")", e.selection || (e.selection = r.getString(n ? "imagedescription" : "linkdescription"))),
t();
};
return i = u.createBackground(), n ? this.hooks.insertImageDialog(o) || u.prompt(this.getString("imagedialog"), "http://", o) : this.hooks.insertLinkDialog(o) || u.prompt(this.getString("linkdialog"), "http://", o),
!0;
}
e.startTag = e.startTag.replace(/!?\[/, ""), e.endTag = "", this.addLinkDef(e, null);
}, v.doAutoindent = function(e) {
var t = this, n = !1;
e.before = e.before.replace(/(\n|^)[ ]{0,3}([*+-]|\d+[.])[ \t]*\n$/, "\n\n"), e.before = e.before.replace(/(\n|^)[ ]{0,3}>[ \t]*\n$/, "\n\n"),
e.before = e.before.replace(/(\n|^)[ \t]+\n$/, "\n\n"), e.selection || /^[ \t]*(?:\n|$)/.test(e.after) || (e.after = e.after.replace(/^[^\n]*/, function(t) {
return e.selection = t, "";
}), n = !0), /(\n|^)[ ]{0,3}([*+-]|\d+[.])[ \t]+.*\n$/.test(e.before) && t.doList && t.doList(e),
/(\n|^)[ ]{0,3}>[ \t]+.*\n$/.test(e.before) && t.doBlockquote && t.doBlockquote(e),
/(\n|^)(\t|[ ]{4,}).*\n$/.test(e.before) && t.doCode && t.doCode(e), n && (e.after = e.selection + e.after,
e.selection = "");
}, v.doBlockquote = function(e) {
e.selection = e.selection.replace(/^(\n*)([^\r]+?)(\n*)$/, function(t, n, i, r) {
return e.before += n, e.after = r + e.after, i;
}), e.before = e.before.replace(/(>[ \t]*)$/, function(t, n) {
return e.selection = n + e.selection, "";
}), e.selection = e.selection.replace(/^(\s|>)+$/, ""), e.selection = e.selection || this.getString("quoteexample");
var t, n = "", i = "";
if (e.before) {
for (var r = e.before.replace(/\n$/, "").split("\n"), o = !1, a = 0; a < r.length; a++) {
var s = !1;
t = r[a], o = o && t.length > 0, /^>/.test(t) ? (s = !0, !o && t.length > 1 && (o = !0)) : s = !!/^[ \t]*$/.test(t) || o,
s ? n += t + "\n" : (i += n + t, n = "\n");
}
/(^|\n)>/.test(n) || (i += n, n = "");
}
e.startTag = n, e.before = i, e.after && (e.after = e.after.replace(/^\n?/, "\n")),
e.after = e.after.replace(/^(((\n|^)(\n[ \t]*)*>(.+\n)*.*)+(\n[ \t]*)*)/, function(t) {
return e.endTag = t, "";
});
var l = function(t) {
var n = t ? "> " : "";
e.startTag && (e.startTag = e.startTag.replace(/\n((>|\s)*)\n$/, function(e, t) {
return "\n" + t.replace(/^[ ]{0,3}>?[ \t]*$/gm, n) + "\n";
})), e.endTag && (e.endTag = e.endTag.replace(/^\n((>|\s)*)\n/, function(e, t) {
return "\n" + t.replace(/^[ ]{0,3}>?[ \t]*$/gm, n) + "\n";
}));
};
/^(?![ ]{0,3}>)/m.test(e.selection) ? (this.wrap(e, f.lineLength - 2), e.selection = e.selection.replace(/^/gm, "> "),
l(!0), e.skipLines()) : (e.selection = e.selection.replace(/^[ ]{0,3}> ?/gm, ""),
this.unwrap(e), l(!1), !/^(\n|^)[ ]{0,3}>/.test(e.selection) && e.startTag && (e.startTag = e.startTag.replace(/\n{0,2}$/, "\n\n")),
!/(\n|^)[ ]{0,3}>.*$/.test(e.selection) && e.endTag && (e.endTag = e.endTag.replace(/^\n{0,2}/, "\n\n"))),
e.selection = this.hooks.postBlockquoteCreation(e.selection), /\n/.test(e.selection) || (e.selection = e.selection.replace(/^(> *)/, function(t, n) {
return e.startTag += n, "";
}));
}, v.doCode = function(e) {
var t = /\S[ ]*$/.test(e.before);
if (!/^[ ]*\S/.test(e.after) && !t || /\n/.test(e.selection)) {
e.before = e.before.replace(/[ ]{4}$/, function(t) {
return e.selection = t + e.selection, "";
});
var n = 1, i = 1;
/(\n|^)(\t|[ ]{4,}).*\n$/.test(e.before) && (n = 0), /^\n(\t|[ ]{4,})/.test(e.after) && (i = 0),
e.skipLines(n, i), e.selection ? /^[ ]{0,3}\S/m.test(e.selection) ? /\n/.test(e.selection) ? e.selection = e.selection.replace(/^/gm, " ") : e.before += " " : e.selection = e.selection.replace(/^(?:[ ]{4}|[ ]{0,3}\t)/gm, "") : (e.startTag = " ",
e.selection = this.getString("codeexample"));
} else e.trimWhitespace(), e.findTags(/`/, /`/), e.startTag || e.endTag ? e.endTag && !e.startTag ? (e.before += e.endTag,
e.endTag = "") : e.startTag = e.endTag = "" : (e.startTag = e.endTag = "`", e.selection || (e.selection = this.getString("codeexample")));
}, v.doList = function(e, t, n) {
var i = /(\n|^)(([ ]{0,3}([*+-]|\d+[.])[ \t]+.*)(\n.+|\n{2,}([*+-].*|\d+[.])[ \t]+.*|\n{2,}[ \t]+\S.*)*)\n*$/, r = /^\n*(([ ]{0,3}([*+-]|\d+[.])[ \t]+.*)(\n.+|\n{2,}([*+-].*|\d+[.])[ \t]+.*|\n{2,}[ \t]+\S.*)*)\n*/, o = "-", a = 1, s = function() {
var e;
return n ? (e = " " + a + ". ", a++) : e = " " + o + " ", e;
}, l = function(e) {
return void 0 === n && (n = /^\s*\d/.test(e)), e = e.replace(/^[ ]{0,3}([*+-]|\d+[.])\s/gm, function() {
return s();
});
};
if (e.findTags(/(\n|^)*[ ]{0,3}([*+-]|\d+[.])\s+/, null), !e.before || /\n$/.test(e.before) || /^\n/.test(e.startTag) || (e.before += e.startTag,
e.startTag = ""), e.startTag) {
var c = /\d+[.]/.test(e.startTag);
if (e.startTag = "", e.selection = e.selection.replace(/\n[ ]{4}/g, "\n"), this.unwrap(e),
e.skipLines(), c && (e.after = e.after.replace(r, l)), n == c) return;
}
var u = 1;
e.before = e.before.replace(i, function(e) {
return /^\s*([*+-])/.test(e) && (o = p.$1), u = /[^\n]\n\n[^\n]/.test(e) ? 1 : 0,
l(e);
}), e.selection || (e.selection = this.getString("litem"));
var d = s(), h = 1;
e.after = e.after.replace(r, function(e) {
return h = /[^\n]\n\n[^\n]/.test(e) ? 1 : 0, l(e);
}), e.trimWhitespace(!0), e.skipLines(u, h, !0), e.startTag = d;
var m = d.replace(/./g, " ");
this.wrap(e, f.lineLength - m.length), e.selection = e.selection.replace(/\n/g, "\n" + m);
}, v.doHeading = function(e) {
if (e.selection = e.selection.replace(/\s+/g, " "), e.selection = e.selection.replace(/(^\s+|\s+$)/g, ""),
!e.selection) return e.startTag = "## ", e.selection = this.getString("headingexample"),
void (e.endTag = " ##");
var t = 0;
e.findTags(/#+[ ]*/, /[ ]*#+/), /#+/.test(e.startTag) && (t = p.lastMatch.length),
e.startTag = e.endTag = "", e.findTags(null, /\s?(-+|=+)/), /=+/.test(e.endTag) && (t = 1),
/-+/.test(e.endTag) && (t = 2), e.startTag = e.endTag = "", e.skipLines(1, 1);
var n = 0 == t ? 2 : t - 1;
if (n > 0) {
var i = n >= 2 ? "-" : "=", r = e.selection.length;
for (r > f.lineLength && (r = f.lineLength), e.endTag = "\n"; r--; ) e.endTag += i;
}
}, v.doHorizontalRule = function(e) {
e.startTag = "----------\n", e.selection = "", e.skipLines(2, 1, !0);
};
}(), define("pagedown", [ "libs/Markdown.Converter" ], function() {}), define("core", [ "jquery", "underscore", "crel", "editor", "layout", "constants", "utils", "storage", "settings", "eventMgr", "monetizejs", "text!html/bodyEditor.html", "text!html/bodyViewer.html", "text!html/tooltipSettingsTemplate.html", "text!html/tooltipSettingsPdfOptions.html", "storage", "pagedown" ], function(e, t, n, i, r, o, a, s, l, c, u, d, p, h, f) {
function m() {
I = !0, D = !0;
var e = a.currentTime;
e > M + 1e3 && (M = e, c.onUserActive());
}
function g() {
return a.currentTime - M > o.USER_IDLE_THRESHOLD && (D = !1), D && N;
}
function v() {
!1 !== I && !1 !== N && (void 0 === E && (E = a.id(), s.frontWindowId = E), s.frontWindowId != E && (N = !1,
void 0 !== k && clearInterval(k), e(".modal").modal("hide"), e(".modal-non-unique").modal("show"),
window.close()));
}
function b() {
!0 === L && (L = !1, c.onOfflineChanged(!1));
}
function y() {
!0 === L && !0 === navigator.onLine && A + o.CHECK_ONLINE_PERIOD < a.currentTime && (A = a.currentTime,
e.ajax({
url: "//www.google.com/jsapi",
timeout: o.AJAX_TIMEOUT,
dataType: "script"
}).done(function() {
b();
}));
}
function x() {
a.setInputRadio("radio-layout-orientation", l.layoutOrientation), a.setInputValue(R, window.theme),
R.change(), a.setInputChecked("#input-settings-lazy-rendering", l.lazyRendering),
a.setInputRadio("radio-settings-editor-font-class", l.editorFontClass), a.setInputValue("#input-settings-font-size", l.fontSizeRatio),
a.setInputValue("#input-settings-max-width", l.maxWidthRatio), a.setInputValue("#input-settings-cursor-focus", l.cursorFocusRatio),
a.setInputValue("#textarea-settings-default-content", l.defaultContent), a.setInputRadio("radio-settings-edit-mode", l.editMode),
a.setInputValue("#input-settings-publish-commit-msg", l.commitMsg), a.setInputValue("#input-settings-markdown-mime-type", l.markdownMimeType),
a.setInputValue("#input-settings-gdrive-multiaccount", l.gdriveMultiAccount), a.setInputChecked("#input-settings-gdrive-full-access", l.gdriveFullAccess),
a.setInputChecked("#input-settings-dropbox-full-access", l.dropboxFullAccess), a.setInputChecked("#input-settings-github-full-access", l.githubFullAccess),
a.setInputValue("#textarea-settings-publish-template", l.template), a.setInputValue("#textarea-settings-pdf-template", l.pdfTemplate),
a.setInputValue("#textarea-settings-pdf-options", l.pdfOptions), a.setInputValue("#input-settings-couchdb-url", l.couchdbUrl),
c.onLoadSettings();
}
function w(t) {
var n = {};
n.layoutOrientation = a.getInputRadio("radio-layout-orientation");
var i = a.getInputValue(R);
n.lazyRendering = a.getInputChecked("#input-settings-lazy-rendering"), n.editorFontClass = a.getInputRadio("radio-settings-editor-font-class"),
n.fontSizeRatio = a.getInputFloatValue("#input-settings-font-size", t, .1, 10),
n.maxWidthRatio = a.getInputFloatValue("#input-settings-max-width", t, .1, 10),
n.cursorFocusRatio = a.getInputFloatValue("#input-settings-cursor-focus", t, 0, 1),
n.defaultContent = a.getInputValue("#textarea-settings-default-content"), n.editMode = a.getInputRadio("radio-settings-edit-mode"),
n.commitMsg = a.getInputTextValue("#input-settings-publish-commit-msg", t), n.gdriveMultiAccount = a.getInputIntValue("#input-settings-gdrive-multiaccount"),
n.markdownMimeType = a.getInputValue("#input-settings-markdown-mime-type"), n.gdriveFullAccess = a.getInputChecked("#input-settings-gdrive-full-access"),
n.dropboxFullAccess = a.getInputChecked("#input-settings-dropbox-full-access"),
n.githubFullAccess = a.getInputChecked("#input-settings-github-full-access"), n.template = a.getInputTextValue("#textarea-settings-publish-template", t),
n.pdfTemplate = a.getInputTextValue("#textarea-settings-pdf-template", t), n.pdfOptions = a.getInputJSONValue("#textarea-settings-pdf-options", t),
n.couchdbUrl = a.getInputValue("#input-settings-couchdb-url", t), n.extensionSettings = {},
c.onSaveSettings(n.extensionSettings, t), t.isPropagationStopped() || (l.dropboxFullAccess !== n.dropboxFullAccess && s.removeItem("dropbox.lastChangeId"),
e.extend(l, n), s.settings = JSON.stringify(l), s.themeV4 = i);
}
function S(e) {
var t = e && e.app == F && (e.chargeOption && "once" == e.chargeOption.alias || e.subscriptionOption && "yearly" == e.subscriptionOption.alias);
return c.isSponsor = t, t;
}
function C() {
j.remove(), j = e();
}
function _() {
B.getPayments({
pricingOptions: [ "once", "yearly" ]
}, function(e, t) {
S(t) && (c.onMessage("Thank you for sponsoring StackEdit!"), C());
});
}
var k, E, T = {}, I = !1, D = !1, N = !0, M = 0, L = !1, A = a.currentTime;
T.setOffline = function() {
A = a.currentTime, !1 === L && (L = !0, c.onOfflineChanged(!0));
};
var R, P, O;
T.initEditor = function(t) {
if (void 0 !== O && c.onFileClosed(O), O = t, void 0 !== P) return i.undoMgr.init(),
P.uiManager.setUndoRedoButtonStates();
var n = new Markdown.Converter(), r = {
_DoItalicsAndBold: function(e) {
return e = e.replace(/(\*\*|__)(?=\S)(.+?[*_]*)(?=\S)\1/g, "<strong>$2</strong>"),
e = e.replace(/(\*|_)(?=\S)(.+?)(?=\S)\1/g, "<em>$2</em>");
}
};
n.setOptions(r), P = new Markdown.Editor(n, void 0, {
undoManager: i.undoMgr
}), P.hooks.set("insertLinkDialog", function(t) {
return T.insertLinkCallback = t, a.resetModalInputs(), e(".modal-insert-link").modal(),
!0;
}), P.hooks.set("insertImageDialog", function(t) {
return T.insertLinkCallback = t, !!T.catchModal || (a.resetModalInputs(), e(".modal-insert-image").modal(),
!0);
}), c.onPagedownConfigure(P), P.hooks.chain("onPreviewRefresh", c.onAsyncPreview),
P.run(), i.undoMgr.init(), e(".wmd-button-row li").addClass("btn btn-success").css("left", 0).find("span").hide();
var o = e(".wmd-button-group1");
e("#wmd-bold-button").append(e('<i class="icon-bold">')).appendTo(o), e("#wmd-italic-button").append(e('<i class="icon-italic">')).appendTo(o),
o = e(".wmd-button-group2"), e("#wmd-link-button").append(e('<i class="icon-globe">')).appendTo(o),
e("#wmd-quote-button").append(e('<i class="icon-indent-right">')).appendTo(o), e("#wmd-code-button").append(e('<i class="icon-code">')).appendTo(o),
e("#wmd-image-button").append(e('<i class="icon-picture">')).appendTo(o), o = e(".wmd-button-group3"),
e("#wmd-olist-button").append(e('<i class="icon-list-numbered">')).appendTo(o),
e("#wmd-ulist-button").append(e('<i class="icon-list-bullet">')).appendTo(o), e("#wmd-heading-button").append(e('<i class="icon-text-height">')).appendTo(o),
e("#wmd-hr-button").append(e('<i class="icon-ellipsis">')).appendTo(o), o = e(".wmd-button-group5"),
e("#wmd-undo-button").append(e('<i class="icon-reply">')).appendTo(o), e("#wmd-redo-button").append(e('<i class="icon-forward">')).appendTo(o);
}, T.onReady = function() {
document.body.className += " " + l.editMode, document.body.innerHTML = !0 === window.viewerMode ? p : d,
a.init(), e(window).on("offline", T.setOffline), e(window).on("online", b), !1 === navigator.onLine && T.setOffline(),
e(document).mousemove(m).keypress(m), r.init(), i.init(), k = window.setInterval(function() {
a.updateCurrentTime(), v(), !0 !== g() && !0 !== window.viewerMode || (c.onPeriodicRun(),
y());
}, 1e3), c.onReady();
};
var F = "ESTHdCYOi18iLhhO", B = new u({
applicationID: F
}), j = e(), $ = t.debounce(function() {
L || B.getPaymentsImmediate(function(n, i) {
C(), S(i) || t.each(document.querySelectorAll(".modal-body"), function(t) {
var n = e('<div class="alert alert-danger">Please consider <a href="#">sponsoring StackEdit</a> for $5/year (or <a href="#">sign in</a> if you\'re already a sponsor).</div>');
n.find("a").click(_), t.insertBefore(n[0], t.firstChild), j = j.add(n);
});
});
}, 3e3);
return c.addListener("onOfflineChanged", $), c.addListener("onReady", function() {
function n(e) {
if (e = e || "default", r != e) {
var t = "less!themes/" + e;
-1 !== window.baseDir.indexOf("-min") && (t = "css!themes/" + e), requirejs.undef(t),
require([ t ]), r = e;
}
}
e(document.body).on("shown.bs.modal", ".modal", function() {
var t = e(this);
setTimeout(function() {
t.find(".btn:first").focus(), t.find("button:first").focus(), t.find("input:enabled:visible:first").focus();
}, 50);
}).on("hidden.bs.modal", ".modal", function() {
i.focus(), n(window.theme);
}).on("keypress", ".modal", function(t) {
13 != t.which || e(t.target).is("textarea") || e(this).find(".modal-footer a:last").click();
}), e(".action-insert-link").click(function(t) {
var n = a.getInputTextValue(e("#input-insert-link"), t);
void 0 !== n && (T.insertLinkCallback(n), T.insertLinkCallback = void 0);
}), e(".action-insert-image").click(function(t) {
var n = a.getInputTextValue(e("#input-insert-image"), t);
void 0 !== n && (T.insertLinkCallback(n), T.insertLinkCallback = void 0);
}), e(".modal-insert-link, .modal-insert-image").on("hidden.bs.modal", function() {
void 0 !== T.insertLinkCallback && (T.insertLinkCallback(null), T.insertLinkCallback = void 0);
}), e(".action-load-settings").click(function() {
x();
}), e(".action-apply-settings").click(function(e) {
w(e), e.isPropagationStopped() || window.location.reload();
}), e(".action-add-google-drive-account").click(function() {
3 !== l.gdriveMultiAccount && (l.gdriveMultiAccount++, s.settings = JSON.stringify(l),
window.location.reload());
});
var r = window.theme;
R = e("#input-settings-theme"), R.on("change", function() {
n(this.value);
}), e(".action-import-docs-settings").click(function() {
e("#input-file-import-docs-settings").click();
});
var u;
if (e("#input-file-import-docs-settings").change(function(n) {
var i = (n.dataTransfer || n.target).files;
e(".modal-settings").modal("hide"), t.each(i, function(e) {
var t = new FileReader();
t.onload = function(e) {
return function(t) {
try {
u = JSON.parse(t.target.result), parseInt(u.version.match(/^v(\d+)$/)[1], 10) > parseInt(s.version.match(/^v(\d+)$/)[1], 10) ? c.onError("Incompatible version. Please upgrade StackEdit.") : n(".modal-import-docs-settings").modal("show");
} catch (n) {
c.onError("Wrong format: " + e.name);
}
n("#input-file-import-docs-settings").val("");
};
}(e), t.readAsText(e);
});
}), e(".action-import-docs-settings-confirm").click(function() {
s.clear();
var e = /^file\.|^folder\.|^publish\.|^settings$|^sync\.|^google\.|^author\.|^themeV4$|^version$/;
t.each(u, function(t, n) {
e.test(n) && (s[n] = t);
}), window.location.reload();
}), e(".action-export-docs-settings").click(function() {
a.saveAs(JSON.stringify(s), "StackEdit local storage.json");
}), e(".action-default-settings").click(function() {
s.removeItem("settings"), s.removeItem("theme"), l.dropboxFullAccess || s.removeItem("dropbox.lastChangeId"),
window.location.reload();
}), e(".action-app-reset").click(function() {
s.clear(), window.location.reload();
}), e(".action-reset-input").click(function() {
a.resetModalInputs();
}), a.createTooltip(".tooltip-lazy-rendering", "Disable preview rendering while typing in order to offload CPU. Refresh preview after 500 ms of inactivity."),
a.createTooltip(".tooltip-default-content", [ "Thanks for supporting StackEdit by adding a backlink in your documents!<br/><br/>", '<b class="text-danger">NOTE: Backlinks in Stack Exchange Q/A are not welcome.</b>' ].join("")),
a.createTooltip(".tooltip-template", h), a.createTooltip(".tooltip-pdf-options", f),
e("div.dropdown-menu").click(function(e) {
e.stopPropagation();
}), e(".modal-non-unique").modal({
backdrop: "static",
keyboard: !1,
show: !1
}), t.each(document.querySelectorAll("img"), function(t) {
var n = e(t), i = n.data("stackeditSrc");
i && n.attr("src", window.baseDir + "/img/" + i);
}), !1 === window.viewerMode) {
var d = t.reduce(o.THEME_LIST, function(e, t, n) {
return e + '<option value="' + n + '">' + t + "</option>";
}, "");
document.getElementById("input-settings-theme").innerHTML = d;
}
e(".modal-header").append('<a class="dialog-header-message" href="app" target="_blank"><i class="icon-megaphone"></i> Try StackEdit 5!</a>'),
$();
}), T;
}), define("text!WELCOME.md", [], function() {
return 'Welcome to StackEdit!\n===================\n\n\nHey! I\'m your first Markdown document in **StackEdit**[^stackedit]. Don\'t delete me, I\'m very helpful! I can be recovered anyway in the **Utils** tab of the <i class="icon-cog"></i> **Settings** dialog.\n\n----------\n\n\nDocuments\n-------------\n\nStackEdit stores your documents in your browser, which means all your documents are automatically saved locally and are accessible **offline!**\n\n> **Note:**\n\n> - StackEdit is accessible offline after the application has been loaded for the first time.\n> - Your local documents are not shared between different browsers or computers.\n> - Clearing your browser\'s data may **delete all your local documents!** Make sure your documents are synchronized with **Google Drive** or **Dropbox** (check out the [<i class="icon-refresh"></i> Synchronization](#synchronization) section).\n\n#### <i class="icon-file"></i> Create a document\n\nThe document panel is accessible using the <i class="icon-folder-open"></i> button in the navigation bar. You can create a new document by clicking <i class="icon-file"></i> **New document** in the document panel.\n\n#### <i class="icon-folder-open"></i> Switch to another document\n\nAll your local documents are listed in the document panel. You can switch from one to another by clicking a document in the list or you can toggle documents using <kbd>Ctrl+[</kbd> and <kbd>Ctrl+]</kbd>.\n\n#### <i class="icon-pencil"></i> Rename a document\n\nYou can rename the current document by clicking the document title in the navigation bar.\n\n#### <i class="icon-trash"></i> Delete a document\n\nYou can delete the current document by clicking <i class="icon-trash"></i> **Delete document** in the document panel.\n\n#### <i class="icon-hdd"></i> Export a document\n\nYou can save the current document to a file by clicking <i class="icon-hdd"></i> **Export to disk** from the <i class="icon-provider-stackedit"></i> menu panel.\n\n> **Tip:** Check out the [<i class="icon-upload"></i> Publish a document](#publish-a-document) section for a description of the different output formats.\n\n\n----------\n\n\nSynchronization\n-------------------\n\nStackEdit can be combined with <i class="icon-provider-gdrive"></i> **Google Drive** and <i class="icon-provider-dropbox"></i> **Dropbox** to have your documents saved in the *Cloud*. The synchronization mechanism takes care of uploading your modifications or downloading the latest version of your documents.\n\n> **Note:**\n\n> - Full access to **Google Drive** or **Dropbox** is required to be able to import any document in StackEdit. Permission restrictions can be configured in the settings.\n> - Imported documents are downloaded in your browser and are not transmitted to a server.\n> - If you experience problems saving your documents on Google Drive, check and optionally disable browser extensions, such as Disconnect.\n\n#### <i class="icon-refresh"></i> Open a document\n\nYou can open a document from <i class="icon-provider-gdrive"></i> **Google Drive** or the <i class="icon-provider-dropbox"></i> **Dropbox** by opening the <i class="icon-refresh"></i> **Synchronize** sub-menu and by clicking **Open from...**. Once opened, any modification in your document will be automatically synchronized with the file in your **Google Drive** / **Dropbox** account.\n\n#### <i class="icon-refresh"></i> Save a document\n\nYou can save any document by opening the <i class="icon-refresh"></i> **Synchronize** sub-menu and by clicking **Save on...**. Even if your document is already synchronized with **Google Drive** or **Dropbox**, you can export it to a another location. StackEdit can synchronize one document with multiple locations and accounts.\n\n#### <i class="icon-refresh"></i> Synchronize a document\n\nOnce your document is linked to a <i class="icon-provider-gdrive"></i> **Google Drive** or a <i class="icon-provider-dropbox"></i> **Dropbox** file, StackEdit will periodically (every 3 minutes) synchronize it by downloading/uploading any modification. A merge will be performed if necessary and conflicts will be detected.\n\nIf you just have modified your document and you want to force the synchronization, click the <i class="icon-refresh"></i> button in the navigation bar.\n\n> **Note:** The <i class="icon-refresh"></i> button is disabled when you have no document to synchronize.\n\n#### <i class="icon-refresh"></i> Manage document synchronization\n\nSince one document can be synchronized with multiple locations, you can list and manage synchronized locations by clicking <i class="icon-refresh"></i> **Manage synchronization** in the <i class="icon-refresh"></i> **Synchronize** sub-menu. This will let you remove synchronization locations that are associated to your document.\n\n> **Note:** If you delete the file from **Google Drive** or from **Dropbox**, the document will no longer be synchronized with that location.\n\n----------\n\n\nPublication\n-------------\n\nOnce you are happy with your document, you can publish it on different websites directly from StackEdit. As for now, StackEdit can publish on **Blogger**, **Dropbox**, **Gist**, **GitHub**, **Google Drive**, **Tumblr**, **WordPress** and on any SSH server.\n\n#### <i class="icon-upload"></i> Publish a document\n\nYou can publish your document by opening the <i class="icon-upload"></i> **Publish** sub-menu and by choosing a website. In the dialog box, you can choose the publication format:\n\n- Markdown, to publish the Markdown text on a website that can interpret it (**GitHub** for instance),\n- HTML, to publish the document converted into HTML (on a blog for example),\n- Template, to have a full control of the output.\n\n> **Note:** The default template is a simple webpage wrapping your document in HTML format. You can customize it in the **Advanced** tab of the <i class="icon-cog"></i> **Settings** dialog.\n\n#### <i class="icon-upload"></i> Update a publication\n\nAfter publishing, StackEdit will keep your document linked to that publication which makes it easy for you to update it. Once you have modified your document and you want to update your publication, click on the <i class="icon-upload"></i> button in the navigation bar.\n\n> **Note:** The <i class="icon-upload"></i> button is disabled when your document has not been published yet.\n\n#### <i class="icon-upload"></i> Manage document publication\n\nSince one document can be published on multiple locations, you can list and manage publish locations by clicking <i class="icon-upload"></i> **Manage publication** in the <i class="icon-provider-stackedit"></i> menu panel. This will let you remove publication locations that are associated to your document.\n\n> **Note:** If the file has been removed from the website or the blog, the document will no longer be published on that location.\n\n----------\n\n\nMarkdown Extra\n--------------------\n\nStackEdit supports **Markdown Extra**, which extends **Markdown** syntax with some nice features.\n\n> **Tip:** You can disable any **Markdown Extra** feature in the **Extensions** tab of the <i class="icon-cog"></i> **Settings** dialog.\n\n> **Note:** You can find more information about **Markdown** syntax [here][2] and **Markdown Extra** extension [here][3].\n\n\n### Tables\n\n**Markdown Extra** has a special syntax for tables:\n\nItem | Value\n-------- | ---\nComputer | $1600\nPhone | $12\nPipe | $1\n\nYou can specify column alignment with one or two colons:\n\n| Item | Value | Qty |\n| :------- | ----: | :---: |\n| Computer | $1600 | 5 |\n| Phone | $12 | 12 |\n| Pipe | $1 | 234 |\n\n\n### Definition Lists\n\n**Markdown Extra** has a special syntax for definition lists too:\n\nTerm 1\nTerm 2\n: Definition A\n: Definition B\n\nTerm 3\n\n: Definition C\n\n: Definition D\n\n > part of definition D\n\n\n### Fenced code blocks\n\nGitHub\'s fenced code blocks are also supported with **Highlight.js** syntax highlighting:\n\n```\n// Foo\nvar bar = 0;\n```\n\n> **Tip:** To use **Prettify** instead of **Highlight.js**, just configure the **Markdown Extra** extension in the <i class="icon-cog"></i> **Settings** dialog.\n\n> **Note:** You can find more information:\n\n> - about **Prettify** syntax highlighting [here][5],\n> - about **Highlight.js** syntax highlighting [here][6].\n\n\n### Footnotes\n\nYou can create footnotes like this[^footnote].\n\n [^footnote]: Here is the *text* of the **footnote**.\n\n\n### SmartyPants\n\nSmartyPants converts ASCII punctuation characters into "smart" typographic punctuation HTML entities. For example:\n\n| | ASCII | HTML |\n ----------------- | ---------------------------- | ------------------\n| Single backticks | `\'Isn\'t this fun?\'` | \'Isn\'t this fun?\' |\n| Quotes | `"Isn\'t this fun?"` | "Isn\'t this fun?" |\n| Dashes | `-- is en-dash, --- is em-dash` | -- is en-dash, --- is em-dash |\n\n\n### Table of contents\n\nYou can insert a table of contents using the marker `[TOC]`:\n\n[TOC]\n\n\n### MathJax\n\nYou can render *LaTeX* mathematical expressions using **MathJax**, as on [math.stackexchange.com][1]:\n\nThe *Gamma function* satisfying $\\Gamma(n) = (n-1)!\\quad\\forall n\\in\\mathbb N$ is via the Euler integral\n\n$$\n\\Gamma(z) = \\int_0^\\infty t^{z-1}e^{-t}dt\\,.\n$$\n\n> **Tip:** To make sure mathematical expressions are rendered properly on your website, include **MathJax** into your template:\n\n```\n<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML"></script>\n```\n\n> **Note:** You can find more information about **LaTeX** mathematical expressions [here][4].\n\n\n### UML diagrams\n\nYou can also render sequence diagrams like this:\n\n```sequence\nAlice->Bob: Hello Bob, how are you?\nNote right of Bob: Bob thinks\nBob-->Alice: I am good thanks!\n```\n\nAnd flow charts like this:\n\n```flow\nst=>start: Start\ne=>end\nop=>operation: My Operation\ncond=>condition: Yes or No?\n\nst->op->cond\ncond(yes)->e\ncond(no)->op\n```\n\n> **Note:** You can find more information:\n\n> - about **Sequence diagrams** syntax [here][7],\n> - about **Flow charts** syntax [here][8].\n\n### Support StackEdit\n\n[![](https://cdn.monetizejs.com/resources/button-32.png)](https://monetizejs.com/authorize?client_id=ESTHdCYOi18iLhhO&summary=true)\n\n [^stackedit]: [StackEdit](https://stackedit.io/) is a full-featured, open-source Markdown editor based on PageDown, the Markdown library used by Stack Overflow and the other Stack Exchange sites.\n\n\n [1]: http://math.stackexchange.com/\n [2]: http://daringfireball.net/projects/markdown/syntax "Markdown"\n [3]: https://github.com/jmcmanus/pagedown-extra "Pagedown Extra"\n [4]: http://meta.math.stackexchange.com/questions/5020/mathjax-basic-tutorial-and-quick-reference\n [5]: https://code.google.com/p/google-code-prettify/\n [6]: http://highlightjs.org/\n [7]: http://bramp.github.io/js-sequence-diagrams/\n [8]: http://adrai.github.io/flowchart.js/\n';
}), define("fileMgr", [ "jquery", "underscore", "constants", "core", "utils", "storage", "settings", "eventMgr", "fileSystem", "classes/FileDescriptor", "text!WELCOME.md" ], function(e, t, n, i, r, o, a, s, l, c, u) {
var d = {};
return d.currentFile = void 0, d.selectFile = function(r) {
void 0 === (r = r || d.currentFile) && (r = 0 === t.size(l) ? d.createFile(n.WELCOME_DOCUMENT_TITLE, u) : t.max(l, function(e) {
return e.selectTime || 0;
})), d.currentFile !== r && (d.currentFile = r, r.selectTime = new Date().getTime(),
s.onFileSelected(r), e(".action-edit-document").toggleClass("hide", r.fileIndex != n.TEMPORARY_FILE_INDEX)),
i.initEditor(r);
}, d.createFile = function(e, i, u, d, p) {
if (i = void 0 !== i ? i : a.defaultContent, !e) {
e = n.DEFAULT_FILE_TITLE;
for (var h = 2, f = function(t) {
return t.title == e;
}; t.some(l, f); ) e = n.DEFAULT_FILE_TITLE + h++;
}
var m = n.TEMPORARY_FILE_INDEX;
if (!p) do m = "file." + r.id(); while (t.has(l, m));
d = d || {};
var g = t.reduce(d, function(e, t) {
return r.storeAttributes(t), e + t.syncIndex + ";";
}, ";");
o[m + ".title"] = e, o[m + ".content"] = i, o[m + ".sync"] = g, o[m + ".publish"] = ";";
var v = new c(m, e, d);
return u && (v.discussionListJSON = u), p || (r.appendIndexToArray("file.list", m),
l[m] = v, s.onFileCreated(v)), v;
}, d.deleteFile = function(e) {
e = e || d.currentFile, e.folder && (e.folder.removeFile(e), s.onFoldersChanged()),
r.removeIndexFromArray("file.list", e.fileIndex), delete l[e.fileIndex], d.currentFile === e && (d.currentFile = void 0,
d.selectFile()), s.onFileDeleted(e);
}, d.getFileFromSyncIndex = function(e) {
return t.find(l, function(n) {
return t.has(n.syncLocations, e);
});
}, d.getFileFromPublishIndex = function(e) {
return t.find(l, function(n) {
return t.has(n.publishLocations, e);
});
}, s.addListener("onReady", function() {
function t() {
if (a) {
o.addClass("hide"), r.removeClass("hide");
var t = e.trim(o.val()), n = d.currentFile;
t && t != n.title && (n.title = t, s.onTitleChanged(n)), o.val(n.title), i.focus(),
a = !1;
}
}
var i = e("#wmd-input");
d.selectFile();
var r = e(".file-title-navbar"), o = e(".input-file-title");
e(".action-create-file").click(function() {
setTimeout(function() {
var e = d.createFile();
d.selectFile(e), r.click();
}, 400);
}), e(".action-remove-file-confirm").click(function() {
e(".modal-remove-file-confirm").modal("show");
}), e(".action-remove-file").click(function() {
d.deleteFile();
});
var a;
r.click(function() {
if (!0 !== window.viewerMode) {
r.addClass("hide");
var e = o.removeClass("hide");
a = !0, setTimeout(function() {
e.focus().get(0).select();
}, 10);
}
}), o.blur(function() {
setTimeout(function() {
t();
}, 0);
}).keypress(function(e) {
13 == e.keyCode && (t(), e.preventDefault()), 27 == e.keyCode && (o.val(""), t());
}), e(".action-open-stackedit").click(function() {
window.location.href = "editor";
}), e(".action-edit-document").click(function() {
var e = i.val(), t = d.currentFile.title, n = d.createFile(t, e);
d.selectFile(n), window.location.href = "editor";
}), e(".action-welcome-file").click(function() {
var e = d.createFile(n.WELCOME_DOCUMENT_TITLE, u);
d.selectFile(e);
});
}), s.onFileMgrCreated(d), d;
}), define("classes/Provider", [ "underscore", "utils", "settings", "eventMgr", "fileMgr", "editor", "diff_match_patch_uncompressed", "jsondiffpatch" ], function(e, t, n, i, r, o, a, s) {
function l(e, t) {
this.providerId = e, this.providerName = t, this.isPublishEnabled = !0;
}
l.prototype.parseDiscussionList = function(e) {
try {
var t = JSON.parse(e);
return n.each(t, function(e, t) {
if (e.discussionIndex != t || !n.isNumber(e.selectionStart) || !n.isNumber(e.selectionEnd)) throw "invalid";
e.commentList && e.commentList.forEach(function(e) {
if (e.author && !n.isString(e.author) || !n.isString(e.content)) throw "invalid";
});
}), t;
} catch (n) {}
}, l.prototype.serializeContent = function(e, t) {
return t.length > 2 ? e + "<!--se_discussion_list:" + t + "-->" : e;
}, l.prototype.parseContent = function(e) {
var t, n = "{}", i = /<!--se_discussion_list:([\s\S]+)-->$/.exec(e);
return i && (t = this.parseDiscussionList(i[1])) && (e = e.substring(0, i.index),
n = i[1]), {
content: e,
discussionList: t || {},
discussionListJSON: n
};
};
var c = new a();
c.Match_Threshold = 0, c.Patch_DeleteThreshold = 0;
var u = s.create({
objectHash: function(e) {
return JSON.stringify(e);
},
textDiff: {
minLength: 9999999
}
}), d = "merge" == n.conflictMode;
return l.prototype.syncMerge = function(n, a, s, l, p, h) {
var f = n.content, m = n.title, g = n.discussionListJSON, v = n.discussionList, b = t.crc32(f), y = t.crc32(m), x = t.crc32(g), w = t.crc32(s), S = t.crc32(l), C = t.crc32(h), _ = a.contentCRC != b, k = a.contentCRC != w, E = f != s && k, T = E && _;
a.titleCRC = a.titleCRC || y;
var I, D, N = a.titleCRC != y, M = a.titleCRC != S, L = m != l && M, A = L && N, R = a.discussionListCRC != x, P = a.discussionListCRC != C, O = g != h && P, F = O && R, B = [], j = s, $ = l, G = p, q = !1, H = !1, U = !1;
if (!d && (T || A || F) || T && void 0 === a.content || A && void 0 === a.title || F && void 0 === a.discussionList) r.createFile(m + " (backup)", f, g),
i.onMessage('Conflict detected on "' + m + '". A backup has been created locally.'); else {
if (T) {
var z = a.content;
I = c.diff_main(z, f), c.diff_cleanupSemantic(I), D = c.patch_make(z, I);
var V = c.patch_apply(D, s);
if (j = V[0], !V[1].every(e.identity)) {
I = c.diff_main(f, j), I = function(e) {
function t() {
(i[1] || r[1]) && (i[1] && r[1] ? (i[1] = "\u29f8\u29f8" + i[1] + "\u29f8\u29f8",
r[1] += "\u29f8\u29f8", n.push(i), n.push(r)) : n.push([ 0, i[1] + r[1] ]), i = [ -1, "" ],
r = [ 1, "" ]);
}
var n = [], i = [ -1, "" ], r = [ 1, "" ];
return e.forEach(function(o, a) {
function s() {
return 0 === a || a === e.length - 1;
}
var l = o[0], c = o[1];
if (0 === l) if (s() || c.length > 20) {
if (i[1] || r[1]) {
var u = /\s/.exec(c);
if (u) {
var d = u.index, p = c.substring(0, d);
c = c.substring(d), i[1] += p, r[1] += p;
}
}
if (c) {
for (var h = c.length; h && /\S/.test(c[h - 1]); ) h--;
var f = c.substring(h);
c = c.substring(0, h), s() || c.length > 20 ? (t(), n.push([ 0, c ])) : (i[1] += c,
r[1] += c), i[1] += f, r[1] += f;
}
} else i[1] += c, r[1] += c; else -1 === l ? i[1] += c : 1 === l && (r[1] += c);
}), i[1] == r[1] ? n.push([ 0, r[1] ]) : t(), n;
}(I), j = "";
var W;
I.forEach(function(e) {
var t = e[0], n = e[1];
0 === t || W ? 0 === t && W && (W.selectionEnd = j.length, B.push(W), W = void 0) : W = {
selectionStart: j.length,
type: "conflict"
}, j += n;
}), W && (W.selectionEnd = j.length, B.push(W));
}
}
E && (R && (q = !0), P ? H = !0 : (q = !0, G = v)), F && (U = !0), A && (D = c.patch_make(a.title, m),
$ = c.patch_apply(D, l)[0]);
}
var X;
if (E) {
var Q = [];
r.currentFile === n && (X = {
selectionStart: o.selectionMgr.selectionStart,
selectionEnd: o.selectionMgr.selectionEnd
}, Q.push(X), n.newDiscussion && Q.push(n.newDiscussion)), q && (Q = Q.concat(e.values(v))),
O |= o.adjustCommentOffsets(f, j, Q);
}
if (H) {
var Y = e.values(p);
o.adjustCommentOffsets(s, j, Y);
}
if (U) {
var K = JSON.parse(a.discussionList);
I = u.diff(K, v), u.patch(p, I), e.each(p, function(e, t) {
e || delete p[t];
});
}
return B.length && (O = !0, B.forEach(function(n) {
var i;
do i = t.id(); while (e.has(G, i));
n.discussionIndex = i, G[i] = n;
})), L && (n.title = $, i.onTitleChanged(n), i.onMessage('"' + m + '" has been renamed to "' + $ + '" on ' + this.providerName + ".")),
(E || O) && o.watcher.noWatch(e.bind(function() {
if (E && (r.currentFile === n && (o.setValueNoWatch(j), X && o.selectionMgr.setSelectionStartEnd(X.selectionStart, X.selectionEnd)),
n.content = j, i.onContentChanged(n, j)), O) {
n.discussionList = G;
var t = u.diff(v, G), a = !1;
e.each(t, function(t, r) {
e.isArray(t) ? 1 === t.length ? i.onDiscussionCreated(n, G[r]) : i.onDiscussionRemoved(n, v[r]) : a = !0;
}), a && i.onCommentsChanged(n);
}
o.undoMgr.currentMode = "sync", o.undoMgr.saveState(), i.onMessage('"' + l + '" has been updated from ' + this.providerName + "."),
B.length && i.onMessage('"' + l + '" has conflicts that you have to review.');
}, this)), {
contentCRC: w,
titleCRC: S,
discussionListCRC: C
};
}, l;
}), define("classes/AsyncTask", [ "underscore", "constants", "utils", "eventMgr" ], function(e, t, n, i) {
function r(e) {
this.finished = !1, this.timeout = t.ASYNC_TASK_DEFAULT_TIMEOUT, this.retryCounter = 0,
this.runCallbacks = [], this.successCallbacks = [], this.errorCallbacks = [], this.force = e;
}
function o() {
if (!0 === c) return void (l + u.timeout < n.currentTime && u.error(new Error("A timeout occurred.")));
if (void 0 === u) {
if (0 === s.length || !s[0].force && !1 === p) return;
u = s.shift(), l = n.currentTime, !1 === d && (d = !0, i.onAsyncRunning(!0));
}
l <= n.currentTime && (c = !0, u.chain());
}
function a(t, n, r) {
try {
e.each(n, function(e) {
e(r);
});
} finally {
t.finished = !0, u === t && (u = void 0, c = !1), 0 === s.length ? (d = !1, i.onAsyncRunning(!1)) : o();
}
}
var s = [];
r.prototype.onRun = function(e) {
this.runCallbacks.push(e);
}, r.prototype.onSuccess = function(e) {
this.successCallbacks.push(e);
}, r.prototype.onError = function(e) {
this.errorCallbacks.push(e);
};
var l = 0;
r.prototype.chain = function(e) {
if (l = n.currentTime, n.logStackTrace(), !0 !== this.finished) {
if (void 0 === this.queue && (this.queue = this.runCallbacks.slice()), void 0 !== e) return void e();
if (0 === this.queue.length) return void a(this, this.successCallbacks);
this.queue.shift()();
}
}, r.prototype.error = function(e) {
if (n.logStackTrace(), !0 !== this.finished) throw e = e || new Error("Unknown error"),
e.message && i.onError(e), a(this, this.errorCallbacks, e), e;
};
var c = !1;
r.prototype.retry = function(e, t) {
if (!0 !== this.finished) {
if (t = t || 5, this.queue = void 0, this.retryCounter >= t) return void this.error(e);
var i = 1e3 * Math.pow(2, this.retryCounter++);
l = n.currentTime + i, c = !1, o();
}
}, r.prototype.enqueue = function() {
s.push(this), o();
};
var u, d = !1, p = !1;
return i.addListener("onUserActive", function() {
p = !0;
}), i.addListener("onPeriodicRun", o), r;
}), define("helpers/dropboxHelper", [ "jquery", "underscore", "constants", "core", "utils", "storage", "logger", "settings", "eventMgr", "classes/AsyncTask" ], function(e, t, n, i, r, o, a, s, l, c) {
function u(t) {
t.onRun(function() {
return !0 === v ? (f = void 0, t.error(new Error("Operation not available in offline mode.|stopPublish"))) : void 0 !== f ? t.chain() : void e.ajax({
url: "libs/dropbox.min.js",
dataType: "script",
timeout: n.AJAX_TIMEOUT
}).done(function() {
f = new Dropbox.Client({
key: !0 === s.dropboxFullAccess ? n.DROPBOX_APP_KEY : n.DROPBOX_RESTRICTED_APP_KEY,
secret: !0 === s.dropboxFullAccess ? n.DROPBOX_APP_SECRET : n.DROPBOX_RESTRICTED_APP_SECRET
}), f.authDriver(new Dropbox.AuthDriver.Popup({
receiverUrl: n.BASE_URL + "html/dropbox-oauth-receiver.html",
rememberUser: !0
})), t.chain();
}).fail(function(e) {
p({
status: e.status,
responseText: e.statusText
}, t);
});
});
}
function d(e) {
e.onRun(function() {
function t() {
r.redirectConfirm("You are being redirected to <strong>Dropbox</strong> authorization page.", function() {
e.chain(i);
}, function() {
e.error(new Error("Operation canceled."));
});
}
function i() {
!1 === o ? e.timeout = n.ASYNC_TASK_LONG_TIMEOUT : f.reset(), f.authenticate({
interactive: !o
}, function(n, i) {
return !0 === i.isAuthenticated() ? (m = !0, e.chain()) : !0 === o ? (o = !1, e.chain(t)) : void e.error(new Error("Access to Dropbox account is not authorized."));
});
}
if (!0 === m) return e.chain();
var o = !0;
e.chain(i);
});
}
function p(e, n) {
var r = !0;
if (e) if (a.error(e), "string" == typeof e) r = e; else {
if (r = "Dropbox error (" + e.status + ": " + e.responseText + ").", 401 === e.status || 403 === e.status) return m = !1,
r = "Access to Dropbox account is not authorized.", n.retry(new Error(r), 1);
if (400 === e.status && -1 !== e.responseText.indexOf("oauth_nonce")) return t.each(t.keys(o), function(e) {
0 === e.indexOf("dropbox-auth") && o.removeItem(e);
}), m = !1, n.retry(new Error(r), 1);
e.status <= 0 && (f = void 0, m = !1, i.setOffline(), r = "|stopPublish");
}
n.error(new Error(r));
}
function h(t) {
t.onRun(function() {
function i() {
r.redirectConfirm("You are being redirected to <strong>Dropbox Chooser</strong> page.", function() {
t.chain();
}, function() {
t.error(new Error("Operation canceled."));
});
}
return !0 === b ? t.chain() : void e.ajax({
url: "https://www.dropbox.com/static/api/1/dropbox.js",
dataType: "script",
timeout: n.AJAX_TIMEOUT
}).done(function() {
b = !0, t.chain(i);
}).fail(function(e) {
p({
status: e.status,
responseText: e.statusText
}, t);
});
});
}
var f, m = !1, g = {}, v = !1;
l.addListener("onOfflineChanged", function(e) {
v = e;
}), g.upload = function(e, t, n) {
var i, r = new c();
u(r), d(r), r.onRun(function() {
f.writeFile(e, t, function(t, n) {
return t ? (400 === t.status && (t = 'Could not upload document into path "' + e + '".'),
void p(t, r)) : (i = n, r.chain());
});
}), r.onSuccess(function() {
n(void 0, i);
}), r.onError(function(e) {
n(e);
}), r.enqueue();
}, g.checkChanges = function(e, t) {
var n = [], i = e || 0, r = new c();
u(r), d(r), r.onRun(function() {
function e() {
f.pullChanges(i, function(t, o) {
return t ? p(t, r) : (i = o.cursor(), void 0 !== o.changes && (n = n.concat(o.changes)),
o.shouldPullAgain ? r.chain(e) : r.chain(), void 0);
});
}
r.chain(e);
}), r.onSuccess(function() {
t(void 0, n, i);
}), r.onError(function(e) {
t(e);
}), r.enqueue();
}, g.downloadMetadata = function(e, t) {
var n = [], i = new c();
u(i), d(i), i.onRun(function() {
function t() {
if (0 === e.length) return i.chain();
var r = e[0];
f.stat(r, function(r, o) {
return o ? (n.push(o), e.shift(), i.chain(t)) : void p(r, i);
});
}
i.chain(t);
}), i.onSuccess(function() {
t(void 0, n);
}), i.onError(function(e) {
t(e);
}), i.enqueue();
}, g.downloadContent = function(e, n) {
var i = [], r = new c();
u(r), d(r), r.onRun(function() {
function n() {
if (0 === e.length) return r.chain();
var o = e[0];
i.push(o);
var a;
return !0 === o.isFile ? a = o : void 0 !== o.wasRemoved && (a = o.stat), a ? void f.readFile(a.path, function(i, o) {
return t.isString(o) ? (a.content = o, e.shift(), r.chain(n)) : void p(i, r);
}) : (e.shift(), r.chain(n));
}
r.chain(n);
}), r.onSuccess(function() {
n(void 0, i);
}), r.onError(function(e) {
n(e);
}), r.enqueue();
};
var b = !1;
return g.picker = function(e) {
var t = [], i = new c();
i.timeout = n.ASYNC_TASK_LONG_TIMEOUT, u(i), h(i), i.onRun(function() {
var e = {};
e.multiselect = !0, e.linkType = "direct", e.success = function(e) {
for (var n = 0; n < e.length; n++) {
var r = e[n].link;
r = r.replace(/.*\/view\/[^\/]*/, ""), t.push(decodeURI(r));
}
i.chain();
}, e.cancel = function() {
i.chain();
}, Dropbox.choose(e);
}), i.onSuccess(function() {
e(void 0, t);
}), i.onError(function(t) {
e(t);
}), i.enqueue();
}, g;
}), define("providers/dropboxProvider", [ "underscore", "utils", "storage", "settings", "classes/Provider", "eventMgr", "fileMgr", "helpers/dropboxHelper" ], function(e, t, n, i, r, o, a, s) {
function l(e) {
return void 0 !== e ? e.match(/^[^\\<>:"\|?\*]+$/) ? 0 !== e.indexOf("/") ? "/" + e : e : void o.onError('"' + e + '" contains invalid characters.') : void 0;
}
function c(e) {
return "sync." + p + "." + encodeURIComponent(e.toLowerCase());
}
function u(e, n, i, r) {
r = r || "{}";
var o = {};
return o.provider = h, o.path = e, o.version = n, o.contentCRC = t.crc32(i), o.discussionListCRC = t.crc32(r),
o.syncIndex = c(e), !0 === f && (o.content = i, o.discussionList = r), o;
}
function d(t) {
s.downloadMetadata(t, function(t, n) {
t || s.downloadContent(n, function(t, n) {
if (!t) {
var i = [];
e.each(n, function(e) {
var t = h.parseContent(e.content), n = u(e.path, e.versionTag, t.content, t.discussionListJSON), r = {};
r[n.syncIndex] = n;
var o = a.createFile(e.name, t.content, t.discussionListJSON, r);
a.selectFile(o), i.push(o);
}), 0 !== i.length && o.onSyncImportSuccess(i, h);
}
});
});
}
var p = "dropbox", h = new r(p, "Dropbox");
h.defaultPublishFormat = "template", h.getSyncLocationLink = h.getPublishLocationLink = function(e) {
var t = e.path.split("/").map(encodeURIComponent), n = t.pop();
return [ "https://www.dropbox.com/home", t.join("/"), "?select=", n ].join("");
};
var f = "merge" == i.conflictMode;
return h.importFiles = function() {
s.picker(function(t, n) {
if (!t && 0 !== n.length) {
var i = [];
e.each(n, function(e) {
var t = c(e), n = a.getFileFromSyncIndex(t);
return void 0 !== n ? o.onError('"' + n.title + '" is already in your local documents.') : void i.push(e);
}), d(i);
}
});
}, h.exportFile = function(e, n, i, r, d, p) {
var f = t.getInputTextValue("#input-sync-export-dropbox-path", e);
if (void 0 === (f = l(f))) return p(!0);
var m = c(f), g = a.getFileFromSyncIndex(m);
if (void 0 !== g) {
var v = g.title;
return o.onError('File path is already synchronized with "' + v + '".'), p(!0);
}
var b = h.serializeContent(i, r);
s.upload(f, b, function(e, t) {
if (e) return p(e);
var n = u(t.path, t.versionTag, i, r);
p(void 0, n);
});
}, h.syncUp = function(e, t, n, i, r, o, a, l, c) {
if (l.contentCRC == t && l.discussionListCRC == o) return c(void 0, !1);
var u = h.serializeContent(e, r);
s.upload(l.path, u, function(n, a) {
return n ? c(n, !0) : (l.version = a.versionTag, !0 === f && (l.content = e, l.discussionList = r),
l.contentCRC = t, l.titleCRC = i, l.discussionListCRC = o, c(void 0, !0), void 0);
});
}, h.syncDown = function(i) {
var r = n[p + ".lastChangeId"];
s.checkChanges(r, function(r, l, u) {
if (r) return i(r);
var d = [];
e.each(l, function(e) {
var t = c(e.path), n = a.getFileFromSyncIndex(t), i = n && n.syncLocations[t];
if (i) {
if (e.fileDesc = n, e.syncAttributes = i, !0 === e.wasRemoved) return void d.push(e);
i.version != e.stat.versionTag && d.push(e);
}
}), s.downloadContent(d, function(e, r) {
function a() {
if (0 === r.length) return n[p + ".lastChangeId"] = u, i();
var e = r.pop(), s = e.fileDesc, l = e.syncAttributes;
if (!0 === e.wasRemoved) return o.onError('"' + s.title + '" has been removed from Dropbox.'),
s.removeSyncLocation(l), o.onSyncRemoved(s, l);
var c = e.stat, d = h.parseContent(c.content), m = d.content, g = d.discussionListJSON, v = d.discussionList, b = h.syncMerge(s, l, m, s.title, v, g);
l.version = c.versionTag, !0 === f && (l.content = m, l.discussionList = v), l.contentCRC = b.contentCRC,
l.discussionListCRC = b.discussionListCRC, t.storeAttributes(l), setTimeout(a, 5);
}
return e ? void i(e) : void setTimeout(a, 5);
});
});
}, h.publish = function(e, t, n, i, r) {
var o = l(e.path);
return void 0 === o ? r(!0) : void s.upload(o, i, r);
}, h.newPublishAttributes = function(e) {
var n = {};
return n.path = t.getInputTextValue("#input-publish-dropbox-path", e), e.isPropagationStopped() ? void 0 : n;
}, h;
}), function(e) {
"use strict";
var t, n = e.document;
t = function() {
var t, i, r, o, a, s, l, c, u, d, p, h, f, m = {}, g = {}, v = !1, b = {
ENTER: 13,
ESC: 27,
SPACE: 32
}, y = [];
return g = {
buttons: {
holder: '<nav class="alertify-buttons">{{buttons}}</nav>',
submit: '<button type="submit" class="alertify-button alertify-button-ok" id="alertify-ok">{{ok}}</button>',
ok: '<button class="alertify-button alertify-button-ok" id="alertify-ok">{{ok}}</button>',
cancel: '<button class="alertify-button alertify-button-cancel" id="alertify-cancel">{{cancel}}</button>'
},
input: '<div class="alertify-text-wrapper"><input type="text" class="alertify-text" id="alertify-text"></div>',
message: '<p class="alertify-message">{{message}}</p>',
log: '<article class="alertify-log{{class}}">{{message}}</article>'
}, f = function() {
var e, t, i = !1, r = n.createElement("fakeelement"), o = {
WebkitTransition: "webkitTransitionEnd",
MozTransition: "transitionend",
OTransition: "otransitionend",
transition: "transitionend"
};
for (e in o) if (void 0 !== r.style[e]) {
t = o[e], i = !0;
break;
}
return {
type: t,
supported: i
};
}, t = function(e) {
return n.getElementById(e);
}, m = {
labels: {
ok: "OK",
cancel: "Cancel"
},
delay: 5e3,
buttonReverse: !1,
buttonFocus: "ok",
transition: void 0,
addListeners: function(e) {
var t, s, l, c, u, d = void 0 !== r, p = void 0 !== i, f = void 0 !== h, m = "", g = this;
t = function(t) {
return void 0 !== t.preventDefault && t.preventDefault(), l(t), void 0 !== h && (m = h.value),
"function" == typeof e && (void 0 !== h ? e(!0, m) : e(!0)), !1;
}, s = function(t) {
return void 0 !== t.preventDefault && t.preventDefault(), l(t), "function" == typeof e && e(!1),
!1;
}, l = function() {
g.hide(), g.unbind(n.body, "keyup", c), g.unbind(o, "focus", u), d && g.unbind(r, "click", t),
p && g.unbind(i, "click", s);
}, c = function(e) {
var n = e.keyCode;
(n === b.SPACE && !f || f && n === b.ENTER) && t(e), n === b.ESC && p && s(e);
}, u = function() {
f ? h.focus() : !p || g.buttonReverse ? r.focus() : i.focus();
}, this.bind(o, "focus", u), this.bind(a, "focus", u), d && this.bind(r, "click", t),
p && this.bind(i, "click", s), this.bind(n.body, "keyup", c), this.transition.supported || this.setFocus();
},
bind: function(e, t, n) {
"function" == typeof e.addEventListener ? e.addEventListener(t, n, !1) : e.attachEvent && e.attachEvent("on" + t, n);
},
handleErrors: function() {
if (void 0 !== e.onerror) {
var t = this;
return e.onerror = function(e, n, i) {
t.error("[" + e + " on line " + i + " of " + n + "]", 0);
}, !0;
}
return !1;
},
appendButtons: function(e, t) {
return this.buttonReverse ? t + e : e + t;
},
build: function(e) {
var t = "", n = e.type, i = e.message, r = e.cssClass || "";
switch (t += '<div class="alertify-dialog">', t += '<a id="alertify-resetFocusBack" class="alertify-resetFocus" href="#">Reset Focus</a>',
"none" === m.buttonFocus && (t += '<a href="#" id="alertify-noneFocus" class="alertify-hidden"></a>'),
"prompt" === n && (t += '<div id="alertify-form">'), t += '<article class="alertify-inner">',
t += g.message.replace("{{message}}", i), "prompt" === n && (t += g.input), t += g.buttons.holder,
t += "</article>", "prompt" === n && (t += "</div>"), t += '<a id="alertify-resetFocus" class="alertify-resetFocus" href="#">Reset Focus</a>',
t += "</div>", n) {
case "confirm":
t = t.replace("{{buttons}}", this.appendButtons(g.buttons.cancel, g.buttons.ok)),
t = t.replace("{{ok}}", this.labels.ok).replace("{{cancel}}", this.labels.cancel);
break;
case "prompt":
t = t.replace("{{buttons}}", this.appendButtons(g.buttons.cancel, g.buttons.submit)),
t = t.replace("{{ok}}", this.labels.ok).replace("{{cancel}}", this.labels.cancel);
break;
case "alert":
t = t.replace("{{buttons}}", g.buttons.ok), t = t.replace("{{ok}}", this.labels.ok);
}
return u.className = "alertify alertify-" + n + " " + r, c.className = "alertify-cover",
t;
},
close: function(e, t) {
var n, i, r = t && !isNaN(t) ? +t : this.delay, o = this;
this.bind(e, "click", function() {
n(e);
}), i = function(e) {
e.stopPropagation(), o.unbind(this, o.transition.type, i), d.removeChild(this),
d.hasChildNodes() || (d.className += " alertify-logs-hidden");
}, n = function(e) {
void 0 !== e && e.parentNode === d && (o.transition.supported ? (o.bind(e, o.transition.type, i),
e.className += " alertify-log-hide") : (d.removeChild(e), d.hasChildNodes() || (d.className += " alertify-logs-hidden")));
}, 0 !== t && setTimeout(function() {
n(e);
}, r);
},
dialog: function(e, t, i, r, o) {
l = n.activeElement;
var a = function() {
d && null !== d.scrollTop && c && null !== c.scrollTop || a();
};
if ("string" != typeof e) throw new Error("message must be a string");
if ("string" != typeof t) throw new Error("type must be a string");
if (void 0 !== i && "function" != typeof i) throw new Error("fn must be a function");
return this.init(), a(), y.push({
type: t,
message: e,
callback: i,
placeholder: r,
cssClass: o
}), v || this.setup(), this;
},
extend: function(e) {
if ("string" != typeof e) throw new Error("extend method must have exactly one paramter");
return function(t, n) {
return this.log(t, e, n), this;
};
},
hide: function() {
var e, t = this;
y.splice(0, 1), y.length > 0 ? this.setup(!0) : (v = !1, e = function(n) {
n.stopPropagation(), t.unbind(u, t.transition.type, e);
}, this.transition.supported ? (this.bind(u, this.transition.type, e), u.className = "alertify alertify-hide alertify-hidden") : u.className = "alertify alertify-hide alertify-hidden alertify-isHidden",
c.className = "alertify-cover alertify-cover-hidden", l.focus());
},
init: function() {
n.createElement("nav"), n.createElement("article"), n.createElement("section"),
null == t("alertify-cover") && (c = n.createElement("div"), c.setAttribute("id", "alertify-cover"),
c.className = "alertify-cover alertify-cover-hidden", n.body.appendChild(c)), null == t("alertify") && (v = !1,
y = [], u = n.createElement("section"), u.setAttribute("id", "alertify"), u.className = "alertify alertify-hidden",
n.body.appendChild(u)), null == t("alertify-logs") && (d = n.createElement("section"),
d.setAttribute("id", "alertify-logs"), d.className = "alertify-logs alertify-logs-hidden",
n.body.appendChild(d)), n.body.setAttribute("tabindex", "0"), this.transition = f();
},
log: function(e, t, n) {
var i = function() {
d && null !== d.scrollTop || i();
};
return this.init(), i(), d.className = "alertify-logs", this.notify(e, t, n), this;
},
notify: function(e, t, i) {
var r = n.createElement("article");
r.className = "alertify-log" + ("string" == typeof t && "" !== t ? " alertify-log-" + t : ""),
r.innerHTML = e, d.appendChild(r), setTimeout(function() {
r.className = r.className + " alertify-log-show";
}, 50), this.close(r, i);
},
set: function(e) {
var t;
if ("object" != typeof e && e instanceof Array) throw new Error("args must be an object");
for (t in e) e.hasOwnProperty(t) && (this[t] = e[t]);
},
setFocus: function() {
h ? (h.focus(), h.select()) : s.focus();
},
setup: function(e) {
var n, l = y[0], c = this;
v = !0, n = function(e) {
e.stopPropagation(), c.setFocus(), c.unbind(u, c.transition.type, n);
}, this.transition.supported && !e && this.bind(u, this.transition.type, n), u.innerHTML = this.build(l),
o = t("alertify-resetFocus"), a = t("alertify-resetFocusBack"), r = t("alertify-ok") || void 0,
i = t("alertify-cancel") || void 0, s = "cancel" === m.buttonFocus ? i : "none" === m.buttonFocus ? t("alertify-noneFocus") : r,
h = t("alertify-text") || void 0, p = t("alertify-form") || void 0, "string" == typeof l.placeholder && "" !== l.placeholder && (h.value = l.placeholder),
e && this.setFocus(), this.addListeners(l.callback);
},
unbind: function(e, t, n) {
"function" == typeof e.removeEventListener ? e.removeEventListener(t, n, !1) : e.detachEvent && e.detachEvent("on" + t, n);
}
}, {
alert: function(e, t, n) {
return m.dialog(e, "alert", t, "", n), this;
},
confirm: function(e, t, n) {
return m.dialog(e, "confirm", t, "", n), this;
},
extend: m.extend,
init: m.init,
log: function(e, t, n) {
return m.log(e, t, n), this;
},
prompt: function(e, t, n, i) {
return m.dialog(e, "prompt", t, n, i), this;
},
success: function(e, t) {
return m.log(e, "success", t), this;
},
error: function(e, t) {
return m.log(e, "error", t), this;
},
set: function(e) {
m.set(e);
},
labels: m.labels,
debug: m.handleErrors
};
}, "function" == typeof define ? define("alertify", [], function() {
return new t();
}) : void 0 === e.alertify && (e.alertify = new t());
}(this), define("helpers/couchdbHelper", [ "jquery", "underscore", "core", "utils", "storage", "logger", "constants", "settings", "eventMgr", "classes/AsyncTask" ], function(e, t, n, i, r, o, a, s, l, c) {
function u(e, t) {
var n, i = {
code: e.status,
message: e.statusText,
reason: (e.responseJSON || {}).reason
};
i && (o.error(i), n = "string" == typeof i ? i : "Error " + i.code + ": " + (i.reason || i.message)),
t.error(new Error(n));
}
var d = {}, p = !1;
return l.addListener("onOfflineChanged", function(e) {
p = e;
}), d.uploadDocument = function(n, r, o, a, l, d) {
var p, h = new c();
h.onRun(function() {
a ? (t.isArray(a) || (a = t.chain(("" + a).split(/,/)).compact().unique().value()),
a = a.filter(function(e) {
return t.isString(e) && e.length < 32;
}), a = a.slice(0, 16)) : a = void 0, e.ajax({
type: "POST",
url: s.couchdbUrl,
contentType: "application/json",
dataType: "json",
data: JSON.stringify({
_id: n || i.id(),
title: r,
tags: a,
updated: Date.now(),
_rev: l,
_attachments: {
content: {
content_type: "text/plain",
data: i.encodeBase64(o)
}
}
})
}).done(function(e) {
p = e, h.chain();
}).fail(function(e) {
u(e, h);
});
}), h.onSuccess(function() {
d(void 0, p);
}), h.onError(function(e) {
d(e);
}), h.enqueue();
}, d.checkChanges = function(n, i, r) {
var o, a = n || 0, l = new c();
l.onRun(function() {
e.ajax({
type: "POST",
url: s.couchdbUrl + "/_changes?" + e.param({
filter: "_doc_ids",
since: a,
include_docs: !0,
attachments: !0
}),
contentType: "application/json",
dataType: "json",
data: JSON.stringify({
doc_ids: Object.keys(i)
})
}).done(function(e) {
a = e.last_seq, o = t.map(e.results, function(e) {
return e.deleted ? {
_id: e.id,
deleted: !0
} : e.doc;
}), l.chain();
}).fail(function(e) {
u(e, l);
});
}), l.onSuccess(function() {
r(void 0, o, a);
}), l.onError(function(e) {
r(e);
}), l.enqueue();
}, d.downloadContent = function(n, i) {
var r = [], o = new c();
o.onRun(function() {
function i() {
if (0 === n.length) return o.chain();
var a = n[0];
return r.push(a), a.deleted || void 0 !== ((a._attachments || {}).content || {}).data ? (n.shift(),
o.chain(i)) : void e.ajax({
url: s.couchdbUrl + "/" + encodeURIComponent(a._id),
headers: {
Accept: "application/json"
},
contentType: "application/json",
dataType: "json",
data: {
attachments: !0
}
}).done(function(e) {
n.shift(), t.extend(a, e), o.chain(i);
}).fail(function(e) {
u(e, o);
});
}
o.chain(i);
}), o.onSuccess(function() {
i(void 0, r);
}), o.onError(function(e) {
i(e);
}), o.enqueue();
}, d.listDocuments = function(n, i, r) {
var o, l = new c();
l.onRun(function() {
var r = "/_design/by_" + (n ? "tag_and_" : "") + "update/_view/default", c = n ? JSON.stringify([ n, i || [] ]) : i, d = n ? JSON.stringify([ n ]) : void 0;
e.ajax({
url: s.couchdbUrl + r,
data: {
start_key: c,
end_key: d,
descending: !0,
include_docs: !0,
limit: a.COUCHDB_PAGE_SIZE,
reduce: !1
},
dataType: "json"
}).done(function(e) {
o = t.pluck(e.rows, "doc"), l.chain();
}).fail(function(e) {
u(e, l);
});
}), l.onSuccess(function() {
r(void 0, o);
}), l.onError(function(e) {
r(e);
}), l.enqueue();
}, d.deleteDocuments = function(t) {
var n = new c();
n.onRun(function() {
e.ajax({
type: "POST",
url: s.couchdbUrl + "/_bulk_docs",
data: JSON.stringify({
docs: t.map(function(e) {
return {
_id: e._id,
_rev: e._rev,
_deleted: !0
};
})
}),
contentType: "application/json",
dataType: "json"
}).done(function() {
n.chain();
}).fail(function(e) {
u(e, n);
});
}), n.enqueue();
}, d;
}), define("providers/couchdbProvider", [ "jquery", "underscore", "crel", "alertify", "constants", "utils", "storage", "logger", "classes/Provider", "settings", "eventMgr", "fileMgr", "fileSystem", "editor", "helpers/couchdbHelper" ], function(e, t, n, i, r, o, a, s, l, c, u, d, p, h, f) {
function m(e) {
return "sync." + y + "." + e;
}
function g(e, t, n, i, r) {
r = r || "{}";
var a = {};
return a.provider = x, a.id = e, a.rev = t, a.contentCRC = o.crc32(n), a.titleCRC = o.crc32(i),
a.discussionListCRC = o.crc32(r), a.syncIndex = m(e), !0 === S && (a.content = n,
a.title = i, a.discussionList = r), a;
}
function v(e, n) {
var i = [];
return t.each(e, function(e) {
var t = m(e), n = d.getFileFromSyncIndex(t);
return void 0 !== n ? u.onError('"' + n.title + '" is already in your local documents.') : void i.push(e);
}), 0 === e.length ? n && n() : void f.downloadContent(i.map(function(e) {
return {
_id: e
};
}), function(e, i) {
if (e) return n && n(e);
var r, a = [];
t.each(i, function(e) {
var t, n = o.decodeBase64(e._attachments.content.data), i = x.parseContent(n), s = g(e._id, e._rev, i.content, e.title, i.discussionListJSON);
t = {}, t[s.syncIndex] = s, r = d.createFile(e.title, i.content, i.discussionListJSON, t),
a.push(r);
}), void 0 !== r && (u.onSyncImportSuccess(a, x), d.selectFile(r)), n && n();
});
}
function b(e, t) {
var n = e && e.tags, i = t.match(/^\s*\[(.*?)\]/);
return i && (n = i[1]), n;
}
var y = "couchdb", x = new l(y, "CouchDB");
x.importPreferencesInputIds = [ y + "-tag" ], x.editorSharingAttributes = [ "id" ],
x.getSyncLocationLink = function(e) {
return [ c.couchdbUrl, "/", e.id, "/content" ].join("");
};
var w, S = "merge" == c.conflictMode;
return x.importFiles = function() {
e("#select-sync-import-couchdb-tag").val() || v(t.chain((w.val() || "").split(/\s+/)).compact().unique().value());
}, x.exportFile = function(e, t, n, i, r, o) {
var a = x.serializeContent(n, i), s = b(r, t);
f.uploadDocument(void 0, t, a, s, void 0, function(e, r) {
if (e) return o(e);
var a = g(r.id, r.rev, n, t, i);
o(void 0, a);
});
}, x.syncUp = function(e, t, n, i, r, o, a, s, l) {
if (s.contentCRC == t && s.titleCRC == i && s.discussionListCRC == o) return l(void 0, !1);
var c = x.serializeContent(e, r), u = b(a, n);
f.uploadDocument(s.id, n, c, u, s.rev, function(a, c) {
return a ? l(a, !0) : (s.rev = c.rev, !0 === S && (s.content = e, s.title = n, s.discussionList = r),
s.contentCRC = t, s.titleCRC = i, s.discussionListCRC = o, l(void 0, !0), void 0);
});
}, x.syncDown = function(e) {
var n = parseInt(a[y + ".lastChangeId"], 10), i = {};
t.each(p, function(e) {
t.each(e.syncLocations, function(e) {
e.provider === x && (i[e.id] = e);
});
}), f.checkChanges(n, i, function(n, i, r) {
if (n) return e(n);
var s = [];
t.each(i, function(e) {
var t = m(e._id), n = d.getFileFromSyncIndex(t), i = n && n.syncLocations[t];
i && (e.fileDesc = n, e.syncAttributes = i, s.push(e));
}), f.downloadContent(s, function(t, n) {
function i() {
if (0 === n.length) return a[y + ".lastChangeId"] = r, e();
var t = n.pop(), s = t.fileDesc, l = t.syncAttributes;
if (!0 === t.deleted) return u.onError('"' + s.title + '" has been removed from CouchDB.'),
s.removeSyncLocation(l), u.onSyncRemoved(s, l);
var c = t, d = o.decodeBase64(c._attachments.content.data), p = x.parseContent(d), h = p.content, f = c.title, m = p.discussionListJSON, g = p.discussionList, v = x.syncMerge(s, l, h, f, g, m);
l.rev = c._rev, !0 === S && (l.content = h, l.title = f, l.discussionList = m),
l.contentCRC = v.contentCRC, l.titleCRC = v.titleCRC, l.discussionListCRC = v.discussionListCRC,
o.storeAttributes(l), setTimeout(i, 5);
}
return t ? e(t) : void setTimeout(i, 5);
});
});
}, x.importPrivate = function(e, t) {
v([ e.id ], t);
}, u.addListener("onReady", function() {
function s() {
v = x.children(".active").clone(), g = [];
var t = [];
v.each(function() {
var n = e(this).data("documentId");
t.push(n), g.push(h[n]);
}), w.val(t.join(" ")), S.empty().append(v), e(b.querySelectorAll(".action-delete-items")).parent().toggleClass("disabled", 0 === g.length);
}
function l() {
h = {}, m = void 0, x.empty(), s();
}
function u(t) {
e(b.querySelectorAll(".list-mode")).toggleClass("hide", "list" != t), e(b.querySelectorAll(".delete-mode")).toggleClass("hide", "delete" != t),
e(b.querySelectorAll(".byid-mode")).toggleClass("hide", "byid" != t);
}
function d() {
I.empty().append(n("option", {
value: ""
}, "none")), t.sortBy(T, function(e) {
return e.toLowerCase();
}).forEach(function(e) {
I.append(n("option", {
value: e
}, e));
});
}
r.COUCHDB_URL == c.couchdbUrl && e(".msg-default-couchdb").removeClass("hide");
var p = [ '<a href="#" class="list-group-item document clearfix" data-document-id="<%= document._id %>">', '<div class="date pull-right"><%= date %></div></div>', '<div class="name"><i class="icon-file"></i> ', "<%= document.title %></div>", "</a>" ].join("");
w = e("#input-sync-import-couchdb-documentid");
var h, m, g, v, b = document.querySelector(".modal-download-couchdb"), x = e(b.querySelector(".document-list")), S = e(b.querySelector(".selected-document-list")), C = e(b.querySelector(".please-wait")), _ = e(b.querySelector(".no-document")), k = e(b.querySelector(".more-documents"));
l();
var E = t.debounce(function() {
C.removeClass("hide"), _.addClass("hide"), k.addClass("hide"), f.listDocuments(I.val(), m && m.updated, function(e, n) {
if (C.addClass("hide"), e) return void k.removeClass("hide");
n.length === r.COUCHDB_PAGE_SIZE && (k.removeClass("hide"), m = n.pop());
var i = t.reduce(n, function(e, n) {
return h[n._id] = n, e + t.template(p, {
document: n,
date: o.formatDate(n.updated)
});
}, "");
x.append(i), 0 === x.children().length && _.removeClass("hide");
}), u("list");
}, 10, !0), T = o.retrieveIgnoreError(y + ".tagList") || [], I = e("#input-sync-import-couchdb-tag").on("change", function() {
l(), E();
});
d(), e(b).on("show.bs.modal", function() {
l(), E();
}).on("click", ".document-list .document", function() {
e(this).toggleClass("active"), s();
}).on("click", ".more-documents", E).on("click", ".action-unselect-all", function() {
x.children().removeClass("active"), s();
}).on("click", ".action-byid-mode", function() {
u("byid");
}).on("click", ".action-add-tag", function() {
i.prompt("Enter a tag (case sensitive):", function(e, n) {
e && n && (T.push(n), T = t.chain(T).sortBy(function(e) {
return e.toLowerCase();
}).unique(!0).value(), a[y + ".tagList"] = JSON.stringify(T), d(), I.val(n).change());
}, "Tag");
}).on("click", ".action-remove-tag", function() {
var e = I.val();
e && i.confirm("You are removing <b>" + I.val() + "</b> from your list of filters.", function(n) {
n && (T = t.without(T, e), a[y + ".tagList"] = JSON.stringify(T), d(), I.val("").change());
});
}).on("click", ".action-delete-items", function() {
v.length && u("delete");
}).on("click", ".action-delete-items-confirm", function() {
f.deleteDocuments(g), l(), E();
}).on("click", ".action-cancel", function() {
u("list");
});
}), x;
}), define("helpers/googleHelper", [ "underscore", "jquery", "constants", "core", "utils", "storage", "logger", "settings", "eventMgr", "classes/AsyncTask" ], function(e, t, n, i, r, o, a, s, l, c) {
function u(t) {
var n = {
profile: !0
}, i = !0;
e.each((o[t + ".permissions"] || "").split(";"), function(e) {
e && (n[e] = !0);
}), this.setRefreshFlag = function() {
i = !0;
}, this.isAuthorized = function(t) {
return !1 === i && e.has(n, t);
}, this.add = function(r) {
n[r] = !0, o[t + ".permissions"] = e.keys(n).join(";"), i = !1;
}, this.getListWithNew = function(t) {
var i = e.keys(n);
return e.has(n, t) || i.push(t), i;
};
var r = o[t + ".userId"];
this.setUserId = function(e) {
r = e, o[t + ".userId"] = r;
}, this.getUserId = function() {
return r;
};
var a = parseInt(o[t + ".authUser"] || 0);
this.setAuthUser = function(e) {
a = e, o[t + ".authUser"] = a;
}, this.getAuthUser = function() {
return a;
};
}
function d(e) {
e.onRun(function() {
return !0 === y ? (g = !1, e.error(new Error("Operation not available in offline mode.|stopPublish"))) : !0 === g ? e.chain() : (window.delayedFunction = function() {
gapi.load("client", function() {
gapi.client.load("drive", "v2", function() {
g = !0, e.chain();
});
});
}, void t.ajax({
url: "https://apis.google.com/js/api.js?onload=runDelayedFunction",
dataType: "script",
timeout: n.AJAX_TIMEOUT
}).fail(function(t) {
f({
code: t.status,
message: t.statusText
}, e);
}));
});
}
function p(i, o, a) {
var s = b.getAuthorizationMgr(a);
i.onRun(function() {
function a() {
t.ajax({
url: "https://www.googleapis.com/oauth2/v1/tokeninfo",
data: {
access_token: d.access_token
},
timeout: n.AJAX_TIMEOUT,
type: "GET"
}).done(function(e) {
s.getUserId() && s.getUserId() != e.user_id ? u() : (s.setUserId(e.user_id), s.add(o),
s.token = d, i.chain());
}).fail(function(e) {
f({
code: e.status,
message: e.statusText
}, i);
});
}
function l() {
if (m > 5) return i.error(new Error("Unable to authenticate user " + s.getUserId() + ", please sign in with Google."));
!1 === p && (i.timeout = n.ASYNC_TASK_LONG_TIMEOUT);
var t = e.chain(x).pick(s.getListWithNew(o)).flatten().value();
gapi.auth.authorize({
client_id: n.GOOGLE_CLIENT_ID,
scope: t,
immediate: p,
authuser: !1 === p ? "" : m
}, function(e) {
d = gapi.auth.getToken(), gapi.auth.setToken(h), !e || e.error ? !0 === g && !0 === p ? (5 > m && s.getUserId() ? m++ : p = !1,
i.chain(c)) : i.error(new Error("Access to Google account is not authorized.")) : (s.setAuthUser(m),
!0 === p && m++, i.chain(a));
});
}
function c() {
return !0 === p ? i.chain(l) : void r.redirectConfirm("You are being redirected to <strong>Google</strong> authorization page.", function() {
i.chain(l);
}, function() {
i.error(new Error("Operation canceled."));
});
}
function u() {
return p = !0, s.token && s.isAuthorized(o) ? i.chain() : (s.getUserId() || (p = !1),
void i.chain(c));
}
var d, p, h = gapi.auth.getToken(), m = 0;
u();
});
}
function h(e, t) {
var n = gapi.auth.getToken(), i = v[e];
gapi.auth.setToken(i.token), t(), gapi.auth.setToken(n);
}
function f(t, n) {
var r;
if (t) if (a.error(t), "string" == typeof t) r = t; else {
if (r = "Google error (" + t.code + ": " + t.message + ").", t.code >= 500 && t.code < 600) return n.retry(new Error(r));
if (401 === t.code || 403 === t.code || "token_refresh_required" == t.code) return e.each(v, function(e) {
e.setRefreshFlag();
}), r = "Access to Google account is not authorized.", n.retry(new Error(r), 1);
0 !== t.code && -1 !== t.code || (g = !1, e.each(v, function(e) {
e.setRefreshFlag();
}), i.setOffline(), r = "|stopPublish");
}
n.error(new Error(r));
}
function m(e) {
e.onRun(function() {
return !0 === w ? e.chain() : void t.ajax({
url: "//www.google.com/jsapi",
data: {
key: n.GOOGLE_API_KEY
},
dataType: "script",
timeout: n.AJAX_TIMEOUT
}).done(function() {
google.load("picker", "1", {
callback: function() {
e.chain();
}
}), w = !0;
}).fail(function(t) {
f({
code: t.status,
message: t.statusText
}, e);
});
});
}
var g = !1, v = {}, b = {}, y = !1;
l.addListener("onOfflineChanged", function(e) {
y = e;
});
var x = {
profile: [ "https://www.googleapis.com/auth/userinfo.profile" ],
gdrive: [ "https://www.googleapis.com/auth/drive.install", !0 === s.gdriveFullAccess ? "https://www.googleapis.com/auth/drive" : "https://www.googleapis.com/auth/drive.file" ],
blogger: [ "https://www.googleapis.com/auth/blogger" ],
picasa: [ "https://www.googleapis.com/auth/photos" ]
};
b.getAuthorizationMgr = function(e) {
var t = v[e];
return t || (t = new u(e), v[e] = t), t;
}, b.refreshGdriveToken = function(e) {
var t = new c();
d(t);
var n = v[e];
n && n.setRefreshFlag(), p(t, "gdrive", e), t.enqueue();
}, b.upload = function(e, t, n, i, a, l, u, m) {
var g, v = new c();
d(v), p(v, "gdrive", u), v.onRun(function() {
var l = "-------314159265358979323846", c = "\r\n--" + l + "\r\n";
a = a || s.markdownMimeType;
var d = {
title: n,
mimeType: a
};
t && (d.parents = [ {
kind: "drive#fileLink",
id: t
} ]);
var p = "/upload/drive/v2/files", m = "POST";
e && (p += "/" + e, m = "PUT");
var b = {
"Content-Type": 'multipart/mixed; boundary="' + l + '"'
}, y = r.encodeBase64(i), x = [ c, "Content-Type: application/json\r\n\r\n", JSON.stringify(d), c, "Content-Type: ", a, "\r\n", "Content-Transfer-Encoding: base64\r\n", "\r\n", y, "\r\n---------314159265358979323846--" ].join("");
h(u, function() {
gapi.client.request({
path: p,
method: m,
params: {
uploadType: "multipart"
},
headers: b,
body: x
}).execute(function(t) {
if (t && t.id) return g = t, g.content = i, v.chain();
var n = t.error;
void 0 !== n && void 0 !== e && (404 === n.code ? n = 'File ID "' + e + '" not found on Google Drive.|removePublish' : 412 === n.code && (o.removeItem(u + ".gdrive.lastChangeId"),
n = 'Conflict on file ID "' + e + '". Please restart the synchronization.')), f(n, v);
});
});
}), v.onSuccess(function() {
m(void 0, g);
}), v.onError(function(e) {
m(e);
}), v.enqueue();
}, b.rename = function(e, t, n, i) {
var r, o = new c();
d(o), p(o, "gdrive", n), o.onRun(function() {
var i = {
title: t
};
h(n, function() {
gapi.client.drive.files.patch({
fileId: e,
resource: i
}).execute(function(t) {
if (t && t.id) return r = t, o.chain();
var n = t.error;
void 0 !== n && void 0 !== e && 404 === n.code && (n = 'File ID "' + e + '" not found on Google Drive.|removePublish'),
f(n, o);
});
});
}), o.onSuccess(function() {
i(void 0, r);
}), o.onError(function(e) {
i(e);
}), o.enqueue();
}, b.checkChanges = function(e, t, n) {
var i = [], r = e || 0, o = new c();
d(o), p(o, "gdrive", t), o.onRun(function() {
function e() {
h(t, function() {
var t;
t = gapi.client.drive.changes.list(void 0 === n ? {
startChangeId: r + 1
} : {
pageToken: n
}), t.execute(function(t) {
return t && t.largestChangeId ? (r = t.largestChangeId, n = t.nextPageToken, void 0 !== t.items && (i = i.concat(t.items)),
void 0 !== n ? o.chain(e) : o.chain(), void 0) : f(t.error, o);
});
});
}
var n;
o.chain(e);
}), o.onSuccess(function() {
n(void 0, i, r);
}), o.onError(function(e) {
n(e);
}), o.enqueue();
}, b.downloadMetadata = function(e, i, r, o) {
var a = [], s = new c();
d(s), o || p(s, "gdrive", i), s.onRun(function() {
function r() {
if (0 === e.length) return s.chain();
var o = e[0], l = {}, c = v[i];
c && c.token && (l.Authorization = "Bearer " + c.token.access_token), t.ajax({
url: "https://www.googleapis.com/drive/v2/files/" + o,
headers: l,
data: {
key: n.GOOGLE_API_KEY
},
dataType: "json",
timeout: n.AJAX_TIMEOUT
}).done(function(t) {
a.push(t), e.shift(), s.chain(r);
}).fail(function(e) {
var t = {
code: e.status,
message: e.statusText
};
404 === t.code && (t = 'File ID "' + o + '" not found on Google Drive.'), f(t, s);
});
}
s.chain(r);
}), s.onSuccess(function() {
r(void 0, a);
}), s.onError(function(e) {
r(e);
}), s.enqueue();
}, b.downloadContent = function(e, i, r, o) {
var a = [], s = new c();
s.timeout = n.ASYNC_TASK_LONG_TIMEOUT, d(s), o || p(s, "gdrive", i), s.onRun(function() {
function r() {
if (0 === e.length) return s.chain();
var o = e[0];
a.push(o);
var l;
if ("drive#file" == o.kind ? l = o : "drive#change" == o.kind && (l = o.file), !l) return e.shift(),
s.chain(r);
var c = l.downloadUrl;
0 === l.mimeType.indexOf("application/vnd.google-apps.drive-sdk") && (l.isRealtime = !0,
c = "https://www.googleapis.com/drive/v2/files/" + l.id + "/realtime");
var u = {}, d = v[i];
d && d.token && (u.Authorization = "Bearer " + d.token.access_token), t.ajax({
url: c,
headers: u,
data: {
key: n.GOOGLE_API_KEY
},
dataType: l.isRealtime ? "json" : "text",
timeout: n.AJAX_TIMEOUT
}).done(function(t) {
l.content = l.isRealtime ? t.data.value.content.value : t, e.shift(), s.chain(r);
}).fail(function(e) {
f({
code: e.status,
message: e.statusText
}, s);
});
}
s.chain(r);
}), s.onSuccess(function() {
r(void 0, a);
}), s.onError(function(e) {
r(e);
}), s.enqueue();
}, b.uploadImg = function(e, i, r, o) {
var a, s = new c();
d(s), p(s, "picasa", "google.picasa0"), s.onRun(function() {
var o = {
Slug: e
};
e.match(/.jpe?g$/i) ? o["Content-Type"] = "image/jpeg" : e.match(/.png$/i) ? o["Content-Type"] = "image/png" : e.match(/.gif$/i) && (o["Content-Type"] = "image/gif");
var l = v["google.picasa0"];
l && l.token && (o.Authorization = "Bearer " + l.token.access_token), t.ajax({
url: n.PICASA_IMPORT_IMG_URL + "?" + t.param({
albumId: r
}),
headers: o,
data: i,
processData: !1,
dataType: "xml",
timeout: n.AJAX_TIMEOUT,
type: "POST"
}).done(function(e) {
a = e, s.chain();
}).fail(function(e) {
var t = {
code: e.status,
message: e.statusText
};
200 == t.code && (t.message = e.responseText), f(t, s);
});
}), s.onSuccess(function() {
o(void 0, a);
}), s.onError(function(e) {
o(e);
}), s.enqueue();
};
var w = !1;
return b.picker = function(e, i, o) {
function a() {
void 0 !== s && (s.setVisible(!1), t(".modal-backdrop, .picker").remove());
}
var s, l = [], u = new c();
u.timeout = n.ASYNC_TASK_LONG_TIMEOUT, d(u), "doc" == i || "folder" == i ? p(u, "gdrive", o) : (o = "google.picasa0",
p(u, "picasa", o)), m(u), u.onRun(function() {
var e = v[o], c = new google.picker.PickerBuilder();
c.setAppId(n.GOOGLE_DRIVE_APP_ID);
var d;
"doc" == i ? (d = new google.picker.DocsView(google.picker.ViewId.DOCS), d.setParent("root"),
d.setIncludeFolders(!0), d.setMimeTypes([ "text/x-markdown", "text/plain", "application/octet-stream", "application/vnd.google-apps.drive-sdk." + n.GOOGLE_DRIVE_APP_ID ].join(",")),
c.enableFeature(google.picker.Feature.NAV_HIDDEN), c.enableFeature(google.picker.Feature.MULTISELECT_ENABLED),
c.addView(d), e && e.token && c.setOAuthToken(e.token.access_token)) : "folder" == i ? (d = new google.picker.DocsView(google.picker.ViewId.FOLDERS),
d.setParent("root"), d.setIncludeFolders(!0), d.setSelectFolderEnabled(!0), d.setMimeTypes("application/vnd.google-apps.folder"),
c.enableFeature(google.picker.Feature.NAV_HIDDEN), c.addView(d), e && e.token && c.setOAuthToken(e.token.access_token)) : "img" == i && (d = new google.picker.PhotosView(),
d.setType("flat"), c.addView(d), d = new google.picker.PhotosView(), d.setType("ofuser"),
c.addView(d), c.addView(google.picker.ViewId.PHOTO_UPLOAD), e && e.token && c.setOAuthToken(e.token.access_token)),
c.setCallback(function(e) {
e.action != google.picker.Action.PICKED && e.action != google.picker.Action.CANCEL || (e.action == google.picker.Action.PICKED && (l = e.docs),
a(), u.chain());
}), s = c.build(), t(r.createBackdrop()).on("click.backdrop", function() {
a(), u.chain();
}), s.setVisible(!0);
}), u.onSuccess(function() {
e(void 0, l);
}), u.onError(function(t) {
a(), e(t);
}), u.enqueue();
}, b.uploadBlogger = function(e, i, r, o, a, s, l, u, h) {
var m = new c();
d(m), p(m, "blogger", "google.blogger0"), m.onRun(function() {
function c() {
var e = "https://www.googleapis.com/blogger/v3/blogs/" + i + "/posts/", a = {
kind: "blogger#post",
blog: {
id: i
},
labels: o,
title: l,
content: u
};
s && (a.published = s.toISOString());
var c = "POST";
void 0 !== r && (e += r, a.id = r, c = "PUT"), t.ajax({
url: e,
data: JSON.stringify(a),
headers: h,
type: c,
contentType: "application/json",
dataType: "json",
timeout: n.AJAX_TIMEOUT
}).done(function(e) {
r = e.id, m.chain(d);
}).fail(function(e) {
var t = {
code: e.status,
message: e.statusText
};
404 === t.code && void 0 !== r && (t = "Post " + r + " not found on Blogger.|removePublish"),
f(t, m);
});
}
function d() {
var e = "https://www.googleapis.com/blogger/v3/blogs/" + i + "/posts/" + r;
a ? e += "/revert" : (e += "/publish", s && (e += "?publishDate=" + s.toISOString())),
t.ajax({
url: e,
headers: h,
type: "POST",
dataType: "json",
timeout: n.AJAX_TIMEOUT
}).done(function() {
m.chain();
}).fail(function(e) {
var t = {
code: e.status,
message: e.statusText
};
404 === t.code && (t = "Post " + r + " not found on Blogger.|removePublish"), f(t, m);
});
}
function p() {
return void 0 !== i ? void m.chain(c) : void t.ajax({
url: "https://www.googleapis.com/blogger/v3/blogs/byurl",
data: {
url: e
},
headers: h,
dataType: "json",
timeout: n.AJAX_TIMEOUT
}).done(function(e) {
i = e.id, m.chain(c);
}).fail(function(t) {
var n = {
code: t.status,
message: t.statusText
};
404 === n.code && (n = 'Blog "' + e + '" not found on Blogger.|removePublish'),
f(n, m);
});
}
var h = {}, g = v["google.blogger0"];
g && g.token && (h.Authorization = "Bearer " + g.token.access_token), m.chain(p);
}), m.onSuccess(function() {
h(void 0, i, r);
}), m.onError(function(e) {
h(e);
}), m.enqueue();
}, b.uploadBloggerPage = function(e, i, r, o, a, s, l, u) {
var h = new c();
d(h), p(h, "blogger", "google.blogger0"), h.onRun(function() {
function o() {
var e = "https://www.googleapis.com/blogger/v3/blogs/" + i + "/pages/", o = {
kind: "blogger#page",
blog: {
id: i
},
title: s,
content: l
}, a = "POST";
void 0 !== r && (e += r, o.id = r, a = "PUT"), t.ajax({
url: e,
data: JSON.stringify(o),
headers: c,
type: a,
contentType: "application/json",
dataType: "json",
timeout: n.AJAX_TIMEOUT
}).done(function(e) {
r = e.id, h.chain();
}).fail(function(e) {
var t = {
code: e.status,
message: e.statusText
};
404 === t.code && void 0 !== r && (t = "Page " + r + " not found on Blogger.|removePublish"),
f(t, h);
});
}
function a() {
return void 0 !== i ? void h.chain(o) : void t.ajax({
url: "https://www.googleapis.com/blogger/v3/blogs/byurl",
data: {
url: e
},
headers: c,
dataType: "json",
timeout: n.AJAX_TIMEOUT
}).done(function(e) {
i = e.id, h.chain(o);
}).fail(function(t) {
var n = {
code: t.status,
message: t.statusText
};
404 === n.code && (n = 'Blog "' + e + '" not found on Blogger.|removePublish'),
f(n, h);
});
}
var c = {}, u = v["google.blogger0"];
u && u.token && (c.Authorization = "Bearer " + u.token.access_token), h.chain(a);
}), h.onSuccess(function() {
u(void 0, i, r);
}), h.onError(function(e) {
u(e);
}), h.enqueue();
}, window.delayedFunction = void 0, window.runDelayedFunction = function() {
void 0 !== window.delayedFunction && window.delayedFunction();
}, b;
}), define("text!html/dialogExportGdrive.html", [], function() {
return '<div class="modal-dialog">\n <div class="modal-content">\n\n <div class="modal-header">\n <button type="button" class="close" data-dismiss="modal"\n aria-hidden="true">&times;</button>\n <h2 class="modal-title">Save on <%= providerName %></h2>\n </div>\n <div class="modal-body">\n <p>\n This will save "<span class="file-title"></span>" to your <i\n class="icon-provider-<%= providerId %>"></i>\n <b>Google Drive</b>\n account and keep it synchronized.\n </p>\n <div class="collapse form-horizontal sync-export-<%= providerId %>-options-collapse">\n <div class="form-group">\n <label class="col-lg-3 control-label"\n for="input-sync-export-<%= providerId %>-parentid">Folder ID\n (optional)</label>\n <div class="col-lg-8">\n <input type="text" id="input-sync-export-<%= providerId %>-parentid"\n placeholder="FolderID" class="form-control">\n <div class="text-right">\n <a class="btn btn-link btn-sm action-export-<%= providerId %>-choose-folder"\n title="Choose folder" data-dismiss="modal"><i\n class="icon-folder-open"></i> Open folder</a>\n </div>\n <span class="help-block"> If no folder ID is supplied, the\n file will be created in your root folder. </span>\n </div>\n </div>\n <div class="form-group">\n <label class="col-lg-3 control-label"\n for="input-sync-export-<%= providerId %>-fileid">Existing file ID\n (optional)</label>\n <div class="col-lg-8">\n <input type="text" id="input-sync-export-<%= providerId %>-fileid"\n placeholder="FileID" class="form-control"> <span\n class="help-block"> This will overwrite the existing file\n on the server. </span>\n </div>\n </div>\n </div>\n <p class="align-right">\n <a href="#" data-toggle="collapse" data-target=".sync-export-<%= providerId %>-options-collapse" class="collapsed">\n Options <i class="icon-up-dir"></i>\n </a>\n </p>\n <blockquote>\n <p><b>Tip:</b> You can move or rename the file afterwards within Google\n Drive.</p>\n </blockquote>\n </div>\n <div class="modal-footer">\n <a href="#" class="btn btn-default pull-left action-autosync-dialog-<%= providerId %>" data-dismiss="modal"><i\n class="icon-provider-gdrive"></i> Setup AutoSync</a>\n <a href="#" class="btn btn-default" data-dismiss="modal">Cancel</a>\n <a href="#" data-dismiss="modal"\n class="btn btn-primary action-sync-export-<%= providerId %>">OK</a>\n </div>\n </div>\n</div>\n';
}), define("text!html/dialogAutoSyncGdrive.html", [], function() {
return '<div class="modal-dialog">\n <div class="modal-content">\n\n <div class="modal-header">\n <button type="button" class="close" data-dismiss="modal"\n aria-hidden="true">&times;</button>\n <h2 class="modal-title">AutoSync to <%= providerName %></h2>\n </div>\n <div class="modal-body">\n <p>\n <b>AutoSync</b> feature automatically saves all documents to your <i\n class="icon-provider-<%= providerId %>"></i>\n <b>Google Drive</b>\n account and keep them synchronized.\n </p>\n <div class="form-horizontal">\n <div class="form-group">\n <div class="col-lg-3 control-label"></div>\n <div class="col-lg-8">\n <div class="radio">\n <label> <input type="radio"\n name="radio-autosync-<%= providerId %>-mode" value="off">\n Disabled\n </label>\n </div>\n <div class="radio">\n <label> <input type="radio"\n name="radio-autosync-<%= providerId %>-mode" value="new">\n New documents (not current)\n </label>\n </div>\n <div class="radio">\n <label> <input type="radio"\n name="radio-autosync-<%= providerId %>-mode" value="all">\n Every document not yet synchronized\n </label>\n </div>\n </div>\n </div>\n <br/>\n <div class="form-group">\n <label class="col-lg-3 control-label"\n for="input-autosync-<%= providerId %>-parentid">Folder ID\n (optional)</label>\n <div class="col-lg-8">\n <div class="input-group">\n <input type="text" id="input-autosync-<%= providerId %>-parentid"\n placeholder="FolderID" class="form-control">\n <div class="input-group-btn">\n <a class="btn btn-link action-autosync-<%= providerId %>-choose-folder"\n title="Choose folder" data-dismiss="modal"><i\n class="icon-folder-open"></i></a>\n </div>\n </div>\n <span class="help-block"> If no folder ID is supplied,\n files will be created in your root folder. </span>\n </div>\n </div>\n </div>\n <blockquote>\n <p><b>Note:</b> Removing a local document will not delete the linked file on Google\n Drive.</p>\n </blockquote>\n </div>\n <div class="modal-footer">\n <a href="#" class="btn btn-default" data-dismiss="modal">Cancel</a>\n <a href="#" data-dismiss="modal"\n class="btn btn-primary action-autosync-<%= providerId %>">OK</a>\n </div>\n </div>\n</div>\n';
}), define("providers/gdriveProviderBuilder", [ "jquery", "underscore", "constants", "utils", "storage", "logger", "classes/Provider", "settings", "eventMgr", "fileMgr", "editor", "helpers/googleHelper", "text!html/dialogExportGdrive.html", "text!html/dialogAutoSyncGdrive.html" ], function(e, t, n, i, r, o, a, s, l, c, u, d, p, h) {
return function(o, u, f) {
function m(e) {
return "sync." + o + "." + e;
}
function g(e, t, n, r, o) {
o = o || "{}";
var a = {};
return a.provider = y, a.id = e, a.etag = t, a.contentCRC = i.crc32(n), a.titleCRC = i.crc32(r),
a.discussionListCRC = i.crc32(o), a.syncIndex = m(e), !0 === x && (a.content = n,
a.title = r, a.discussionList = o), a;
}
function v(e, n) {
d.downloadMetadata(e, b, function(e, i) {
return e ? n && n(e) : void d.downloadContent(i, b, function(e, i) {
if (e) return n && n(e);
var r, o = [];
t.each(i, function(e) {
var t, n = y.parseContent(e.content);
if (e.isRealtime) l.onError("Real time synchronization is not supported anymore. Please use standard synchronization."); else {
var i = g(e.id, e.etag, n.content, e.title, n.discussionListJSON);
t = {}, t[i.syncIndex] = i;
}
r = c.createFile(e.title, n.content, n.discussionListJSON, t), o.push(r);
}), void 0 !== r && (l.onSyncImportSuccess(o, y), c.selectFile(r)), n && n();
});
});
}
var b = "google.gdrive" + f, y = new a(o, u);
y.defaultPublishFormat = "template", y.exportPreferencesInputIds = [ o + "-parentid" ],
y.getSyncLocationLink = y.getPublishLocationLink = function(e) {
var t = d.getAuthorizationMgr(b).getAuthUser();
return [ "https://docs.google.com/file/d/", e.id, "/edit", t ? "?authuser=" + t : "" ].join("");
};
var x = "merge" == s.conflictMode;
return y.importFiles = function() {
d.picker(function(e, n) {
if (!e && 0 !== n.length) {
var i = [];
t.each(n, function(e) {
var t = m(e.id), n = c.getFileFromSyncIndex(t);
return void 0 !== n ? l.onError('"' + n.title + '" is already in your local documents.') : void i.push(e.id);
}), v(i);
}
}, "doc", b);
}, y.exportFile = function(e, t, n, r, a, s) {
var u = i.getInputTextValue("#input-sync-export-" + o + "-fileid");
if (u) {
var p = m(u), h = c.getFileFromSyncIndex(p);
if (void 0 !== h) return l.onError('File ID is already synchronized with "' + h.title + '".'),
s(!0);
}
var f = i.getInputTextValue("#input-sync-export-" + o + "-parentid"), v = y.serializeContent(n, r);
d.upload(u, f, t, v, void 0, void 0, b, function(e, i) {
if (e) return s(e);
var o = g(i.id, i.etag, n, t, r);
s(void 0, o);
});
}, y.syncUp = function(e, t, n, i, r, o, a, s, u) {
if (s.contentCRC == t && s.titleCRC == i && s.discussionListCRC == o) return u(void 0, !1);
if (s.isRealtime) {
var p = c.getFileFromSyncIndex(s.syncIndex);
return p.removeSyncLocation(s), l.onSyncRemoved(p, s), l.onError("Real time synchronization is not supported anymore. Please use standard synchronization.");
}
var h = y.serializeContent(e, r);
d.upload(s.id, void 0, n, h, void 0, s.etag, b, function(a, l) {
return a ? u(a, !0) : (s.etag = l.etag, delete s.isRealtime, !0 === x && (s.content = e,
s.title = n, s.discussionList = r), s.contentCRC = t, s.titleCRC = i, s.discussionListCRC = o,
u(void 0, !0), void 0);
});
}, y.syncDown = function(e) {
var n = parseInt(r[b + ".gdrive.lastChangeId"], 10);
d.checkChanges(n, b, function(n, o, a) {
if (n) return e(n);
var s = [];
t.each(o, function(e) {
var t = m(e.fileId), n = c.getFileFromSyncIndex(t), i = n && n.syncLocations[t];
if (i) {
if (e.fileDesc = n, e.syncAttributes = i, !0 === e.deleted) return void s.push(e);
i.etag != e.file.etag && s.push(e);
}
}), d.downloadContent(s, b, function(t, n) {
function o() {
if (0 === n.length) return r[b + ".gdrive.lastChangeId"] = a, e();
var t = n.pop(), s = t.fileDesc, c = t.syncAttributes;
if (!0 === t.deleted) return l.onError('"' + s.title + '" has been removed from ' + u + "."),
s.removeSyncLocation(c), l.onSyncRemoved(s, c);
var d = t.file, p = y.parseContent(d.content), h = p.content, f = d.title, m = p.discussionListJSON, g = p.discussionList, v = y.syncMerge(s, c, h, f, g, m);
c.etag = d.etag, !0 === x && (c.content = h, c.title = f, c.discussionList = m),
c.contentCRC = v.contentCRC, c.titleCRC = v.titleCRC, c.discussionListCRC = v.discussionListCRC,
i.storeAttributes(c), setTimeout(o, 5);
}
return t ? void e(t) : void setTimeout(o, 5);
});
});
}, y.publish = function(e, t, n, i, r) {
var o = "markdown" != e.format ? "text/html" : void 0;
d.upload(e.id, void 0, e.fileName || n, i, o, void 0, b, function(t, n) {
return t ? void r(t) : (e.id = n.id, void r());
});
}, y.newPublishAttributes = function(e) {
var t = {};
return t.id = i.getInputTextValue("#input-publish-" + o + "-fileid"), t.fileName = i.getInputTextValue("#input-publish-" + o + "-filename"),
e.isPropagationStopped() ? void 0 : t;
}, y.setAutosyncDialogConfig = function() {
var e = y.autosyncConfig;
i.setInputRadio("radio-autosync-" + o + "-mode", e.mode || "off"), i.setInputValue("#input-autosync-" + o + "-parentid", e.parentId);
}, y.getAutosyncDialogConfig = function() {
var e = {};
return e.mode = i.getInputRadio("radio-autosync-" + o + "-mode"), e.parentId = i.getInputTextValue("#input-autosync-" + o + "-parentid"),
e;
}, y.autosyncFile = function(e, t, n, i, r) {
var o = i.parentId;
d.upload(void 0, o, e, t, void 0, void 0, b, function(i, o) {
if (i) return void r(i);
var a = g(o.id, o.etag, t, e, n);
r(void 0, a);
});
}, y.isPublishEnabled = s.gdriveMultiAccount > f, l.addListener("onReady", function() {
e(".submenu-sync-" + o).toggle(s.gdriveMultiAccount > f);
var a = document.querySelector(".modal-upload-" + o);
a && (a.innerHTML = t.template(p, {
providerId: o,
providerName: u
}));
var y = document.querySelector(".modal-autosync-" + o);
if (y && (y.innerHTML = t.template(h, {
providerId: o,
providerName: u
})), e(".action-export-" + o + "-choose-folder").click(function() {
d.picker(function(t, n) {
t || 0 === n.length || (e(".modal-upload-" + o).modal(), i.setInputValue("#input-sync-export-" + o + "-parentid", n[0].id));
}, "folder", b);
}), e(".action-autosync-" + o + "-choose-folder").click(function() {
d.picker(function(t, n) {
t || 0 === n.length || (e(".modal-autosync-" + o).modal(), i.setInputValue("#input-autosync-" + o + "-parentid", n[0].id));
}, "folder", b);
}), e(".action-remove-google-drive-state").click(function() {
r.removeItem("gdrive.state");
}), !(f >= s.gdriveMultiAccount)) {
var x = i.retrieveIgnoreError("gdrive.state"), w = r[b + ".userId"];
if (void 0 !== x) {
if (w && x.userId != w) return void (f === s.gdriveMultiAccount - 1 && (3 === s.gdriveMultiAccount ? (l.onError("None of your 3 Google Drive accounts is able to perform this request."),
r.removeItem("gdrive.state")) : e(".modal-add-google-drive-account").modal()));
if (r.removeItem("gdrive.state"), "create" == x.action) d.upload(void 0, x.folderId, n.GDRIVE_DEFAULT_FILE_TITLE, s.defaultContent, void 0, void 0, b, i.lockUI(function(e, t) {
if (!e) {
var n = g(t.id, t.etag, t.content, t.title), i = {};
i[n.syncIndex] = n;
var r = c.createFile(t.title, t.content, void 0, i);
c.selectFile(r), l.onMessage('"' + t.title + '" created successfully on ' + u + ".");
}
})); else if ("open" == x.action) {
var S = [];
t.each(x.ids, function(e) {
var t = m(e), n = c.getFileFromSyncIndex(t);
void 0 !== n ? n !== c.currentFile && c.selectFile(n) : S.push(e);
}), v(S, i.lockUI());
}
}
}
}), y;
};
}), define("providers/gdriveProvider", [ "providers/gdriveProviderBuilder" ], function(e) {
return e("gdrive", "Google Drive", 0);
}), define("providers/gdrivesecProvider", [ "providers/gdriveProviderBuilder" ], function(e) {
return e("gdrivesec", "Google Drive (2nd account)", 1);
}), define("providers/gdriveterProvider", [ "providers/gdriveProviderBuilder" ], function(e) {
return e("gdriveter", "Google Drive (3rd account)", 2);
}), define("synchronizer", [ "jquery", "underscore", "utils", "storage", "eventMgr", "fileSystem", "fileMgr", "classes/Provider", "providers/dropboxProvider", "providers/couchdbProvider", "providers/gdriveProvider", "providers/gdrivesecProvider", "providers/gdriveterProvider" ], function(e, t, n, i, r, o, a, s) {
function l(e) {
function i() {
function o() {
if (0 === s.length) return i();
var t = s.pop();
t.provider.syncUp(c, u, d, p, h, f, m, t, function(i, r) {
return !0 === r && (g = !0), i ? e(i) : (r && n.storeAttributes(t), void o());
});
}
if (0 === r.length) return l(e);
var a = r.pop(), s = t.values(a.syncLocations);
if (0 === s.length) return i();
var c = a.content, u = n.crc32(c), d = a.title, p = n.crc32(d), h = a.discussionListJSON, f = n.crc32(h), m = a.frontMatter;
o();
}
var r = [];
!0 === g ? (g = !1, r = t.values(o), i()) : e();
}
function c(e) {
function n() {
if (0 === i.length) return e();
var t = i.pop();
return f.hasSync(t) ? void t.syncDown(function(t) {
return t ? e(t) : void n();
}) : n();
}
var i = t.values(m);
n();
}
function u(e) {
function n() {
function o() {
if (0 === s.length) return n();
var t = s.pop();
t.autosyncFile(a.title, a.content, a.discussionListJSON, t.autosyncConfig, function(t, n) {
return t ? e(t) : (a.addSyncLocation(n), r.onSyncExportSuccess(a, n), o(), void 0);
});
}
if (0 === i.length) return e();
var a = i.pop(), s = t.filter(m, function(e) {
return "all" == e.autosyncConfig.mode;
});
o();
}
var i = t.filter(o, function(e) {
return 0 === t.size(e.syncLocations);
});
n();
}
function d(e, i) {
n.resetModalInputs();
var r = n.retrieveIgnoreError(e.providerId + "." + i + "Preferences");
r && t.each(e[i + "PreferencesInputIds"], function(e) {
var o = r[e], a = n.setInputValue;
t.isBoolean(o) && (a = n.setInputChecked), a("#input-sync-" + i + "-" + e, o);
});
}
function p(t) {
d(t, "import"), e(".modal-download-" + t.providerId).modal();
}
function h(t) {
d(t, "export"), e(".modal-upload-" + t.providerId).modal();
}
var f = {}, m = t.chain(arguments).map(function(e) {
return e instanceof s && [ e.providerId, e ];
}).compact().object().value();
!function() {
var e = {};
t.each(o, function(e) {
n.retrieveIndexArray(e.fileIndex + ".sync").forEach(function(t) {
try {
var o = JSON.parse(i[t]);
o.syncIndex = t;
var a = m[o.provider];
if (!a) throw new Error("Invalid provider ID: " + o.provider);
o.provider = a, e.syncLocations[t] = o, s[t] = o;
} catch (s) {
r.onError(s), n.removeIndexFromArray(e.fileIndex + ".sync", t);
}
});
}), Object.keys(i).forEach(function(t) {
var n = t.match(/sync\.\S+/);
n && !e.hasOwnProperty(n[0]) && i.removeItem(t);
});
}(), t.each(m, function(e) {
e.autosyncConfig = n.retrieveIgnoreError(e.providerId + ".autosyncConfig") || {};
}), f.hasSync = function(e) {
return t.some(o, function(n) {
return t.some(n.syncLocations, function(t) {
return void 0 === e || t.provider === e;
});
});
};
var g = !1, v = !1;
r.addListener("onOfflineChanged", function(e) {
v = e;
});
var b = !1;
return f.sync = function() {
function e(e) {
return void 0 !== e && (b = !1, r.onSyncRunning(!1), !0);
}
return !0 !== b && !0 !== v && (b = !0, r.onSyncRunning(!0), g = !0, u(function(t) {
e(t) || c(function(t) {
e(t) || l(function(t) {
e(t) || (b = !1, r.onSyncRunning(!1), r.onSyncSuccess());
});
});
}), !0);
}, r.addListener("onFileCreated", function(e) {
0 === t.size(e.syncLocations) && t.each(m, function(t) {
"new" == t.autosyncConfig.mode && t.autosyncFile(e.title, e.content, e.discussionListJSON, t.autosyncConfig, function(t, n) {
t || (e.addSyncLocation(n), r.onSyncExportSuccess(e, n));
});
});
}), r.addListener("onReady", function() {
t.each(m, function(o) {
e(".action-sync-import-" + o.providerId).click(function(e) {
o.importFiles(e);
var n = {};
t.each(o.importPreferencesInputIds, function(e) {
var t = document.getElementById("input-sync-import-" + e);
n[e] = "checkbox" == t.type ? t.checked : t.value;
}), i[o.providerId + ".importPreferences"] = JSON.stringify(n);
}), e(".action-sync-import-dialog-" + o.providerId).click(function() {
p(o);
}), e(".action-sync-export-dialog-" + o.providerId).click(function() {
h(o);
}), e(".action-autosync-dialog-" + o.providerId).click(function() {
n.resetModalInputs(), o.setAutosyncDialogConfig(o), e(".modal-autosync-" + o.providerId).modal();
}), e(".action-sync-export-" + o.providerId).click(function(e) {
var n = a.currentFile;
o.exportFile(e, n.title, n.content, n.discussionListJSON, n.frontMatter, function(e, t) {
e || (n.addSyncLocation(t), r.onSyncExportSuccess(n, t));
});
var s = {};
t.each(o.exportPreferencesInputIds, function(e) {
var t = document.getElementById("input-sync-export-" + e);
s[e] = "checkbox" == t.type ? t.checked : t.value;
}), i[o.providerId + ".exportPreferences"] = JSON.stringify(s);
}), e(".action-autosync-" + o.providerId).click(function(e) {
var t = o.getAutosyncDialogConfig(e);
void 0 !== t && (i[o.providerId + ".autosyncConfig"] = JSON.stringify(t), o.autosyncConfig = t);
});
});
}), r.onSynchronizerCreated(f), f;
}), define("providers/bloggerProvider", [ "underscore", "utils", "classes/Provider", "helpers/googleHelper" ], function(e, t, n, i) {
var r = new n("blogger", "Blogger");
return r.defaultPublishFormat = "html", r.publishPreferencesInputIds = [ "blogger-url" ],
r.getPublishLocationLink = function(e) {
return [ "https://www.blogger.com/blogger.g?blogID=", e.blogId, "#editor/target=post;postID=", e.postId ].join("");
}, r.publish = function(t, n, r, o, a) {
var s = t.labelList || [];
n && void 0 !== n.tags && (s = n.tags), e.isString(s) && (s = e.compact(s.split(/[\s,]/)));
var l = n && !1 === n.published, c = n && n.date;
i.uploadBlogger(t.blogUrl, t.blogId, t.postId, s, l, c, r, o, function(e, n, i) {
return e ? void a(e) : (t.blogId = n, t.postId = i, a(), void 0);
});
}, r.newPublishAttributes = function(e) {
var n = {}, i = t.getInputTextValue("#input-publish-blogger-url", e);
return void 0 !== i && (n.blogUrl = t.checkUrl(i)), n.postId = t.getInputTextValue("#input-publish-postid"),
e.isPropagationStopped() ? void 0 : n;
}, r;
}), define("providers/bloggerPageProvider", [ "underscore", "utils", "classes/Provider", "helpers/googleHelper" ], function(e, t, n, i) {
var r = new n("bloggerpage", "Blogger Page");
return r.defaultPublishFormat = "html", r.publishPreferencesInputIds = [ "blogger-url" ],
r.getPublishLocationLink = function(e) {
return [ "https://www.blogger.com/blogger.g?blogID=", e.blogId, "#editor/target=page;pageID=", e.pageId ].join("");
}, r.publish = function(e, t, n, r, o) {
var a = t && !1 === t.published, s = t && t.date;
i.uploadBloggerPage(e.blogUrl, e.blogId, e.pageId, a, s, n, r, function(t, n, i) {
return t ? void o(t) : (e.blogId = n, e.pageId = i, o(), void 0);
});
}, r.newPublishAttributes = function(e) {
var n = {}, i = t.getInputTextValue("#input-publish-blogger-url", e);
return void 0 !== i && (n.blogUrl = t.checkUrl(i)), n.pageId = t.getInputTextValue("#input-publish-pageid"),
e.isPropagationStopped() ? void 0 : n;
}, r;
}), define("helpers/githubHelper", [ "jquery", "constants", "core", "utils", "storage", "logger", "settings", "eventMgr", "classes/AsyncTask" ], function(e, t, n, i, r, o, a, s, l) {
function c(n) {
n.onRun(function() {
return !0 === m ? (p = !1, void n.error(new Error("Operation not available in offline mode.|stopPublish"))) : !0 === p ? void n.chain() : void e.ajax({
url: "libs/github.js",
dataType: "script",
timeout: t.AJAX_TIMEOUT
}).done(function() {
p = !0, n.chain();
}).fail(function(e) {
d({
error: e.status,
message: e.statusText
}, n);
});
});
}
function u(n) {
var o, s;
n.onRun(function() {
function l() {
i.redirectConfirm("You are being redirected to <strong>GitHub</strong> authorization page.", function() {
n.chain(c);
}, function() {
n.error(new Error("Operation canceled."));
});
}
function c() {
r.removeItem("githubCode");
var e = a.githubFullAccess ? "repo,gist" : "public_repo,gist";
o = i.popupWindow("html/github-oauth-client.html?client_id=" + t.GITHUB_CLIENT_ID + "&scope=" + e, "stackedit-github-oauth", 960, 600),
o.focus(), s = setInterval(function() {
if (!0 === o.closed) {
if (clearInterval(s), o = void 0, s = void 0, void 0 === (f = r.githubCode)) return void n.error(new Error(p));
r.removeItem("githubCode"), n.chain(u);
}
}, 500);
}
function u() {
e.getJSON(t.GATEKEEPER_URL + "authenticate/" + f, function(e) {
void 0 !== e.token ? (d = e.token, r.githubToken = d, h = new Github({
token: d,
auth: "oauth"
}), n.chain()) : n.error(new Error(p));
});
}
if (void 0 !== h) return void n.chain();
var d = r.githubToken;
if (void 0 !== d) return h = new Github({
token: d,
auth: "oauth"
}), void n.chain();
var p = "Failed to retrieve a token from GitHub.";
n.timeout = t.ASYNC_TASK_LONG_TIMEOUT;
var f;
n.chain(l);
}), n.onError(function() {
void 0 !== s && clearInterval(s), void 0 !== o && o.close();
});
}
function d(e, t) {
var i;
if (e) if (o.error(e), "string" == typeof e) i = e; else {
if (i = "Could not publish on GitHub.", 401 === e.error || 403 === e.error) return h = void 0,
r.removeItem("githubToken"), i = "Access to GitHub account is not authorized.",
void t.retry(new Error(i), 1);
e.error <= 0 && (p = !1, h = void 0, n.setOffline(), i = "|stopPublish");
}
t.error(new Error(i));
}
var p, h, f = {}, m = !1;
return s.addListener("onOfflineChanged", function(e) {
m = e;
}), f.upload = function(e, t, n, i, r, o, a) {
var s = new l();
c(s), u(s), s.onRun(function() {
function a() {
h.getUser().show(void 0, function(e, n) {
return e ? void d(e, s) : (t = n.login, void s.chain(l));
});
}
function l() {
h.getRepo(t, e).write(n, i, r, o, function(e) {
return e ? void d(e, s) : void s.chain();
});
}
s.chain(t ? l : a);
}), s.onSuccess(function() {
a(void 0, t);
}), s.onError(function(e) {
a(e);
}), s.enqueue();
}, f.uploadGist = function(e, t, n, i, r, o) {
var a = new l();
c(a), u(a), a.onRun(function() {
var o = h.getGist(e), s = {};
s[t] = {
content: r
};
var l = o.update;
void 0 === e && (l = o.create), l({
description: i,
"public": n,
files: s
}, function(t, n) {
return t ? (404 === t.error && void 0 !== e && (t = "Gist " + e + " not found on GitHub.|removePublish"),
void d(t, a)) : (e = n.id, void a.chain());
});
}), a.onSuccess(function() {
o(void 0, e);
}), a.onError(function(e) {
o(e);
}), a.enqueue();
}, f.downloadGist = function(e, t, n) {
var i = new l(!0);
c(i);
var r, o;
i.onRun(function() {
new Github({}).getGist(e).read(function(n, a) {
if (n) return void i.error(new Error("Error trying to access Gist " + e + "."));
r = a.description;
var s = a.files[t];
return void 0 === s ? void i.error(new Error("Gist " + e + ' does not contain "' + t + '".')) : (o = s.content,
void i.chain());
});
}), i.onSuccess(function() {
n(void 0, r, o);
}), i.onError(function(e) {
n(e);
}), i.enqueue();
}, f;
}), define("providers/gistProvider", [ "utils", "classes/Provider", "helpers/githubHelper" ], function(e, t, n) {
var i = new t("gist", "Gist");
return i.publishPreferencesInputIds = [ "gist-public" ], i.viewerSharingAttributes = [ "gistId", "filename" ],
i.getPublishLocationLink = function(e) {
return [ "https://gist.github.com/", e.gistId ].join("");
}, i.publish = function(e, t, i, r, o) {
n.uploadGist(e.gistId, e.filename, e.isPublic, i, r, function(t, n) {
return t ? void o(t) : (e.gistId = n, void o());
});
}, i.newPublishAttributes = function(t) {
var n = {};
return n.gistId = e.getInputTextValue("#input-publish-gist-id"), n.filename = e.getInputTextValue("#input-publish-filename", t),
n.isPublic = e.getInputChecked("#input-publish-gist-public"), t.isPropagationStopped() ? void 0 : n;
}, i.importPublic = function(e, t) {
n.downloadGist(e.gistId, e.filename, t);
}, i;
}), define("providers/githubProvider", [ "utils", "classes/Provider", "settings", "helpers/githubHelper" ], function(e, t, n, i) {
var r = new t("github", "GitHub");
return r.publishPreferencesInputIds = [ "github-repo", "github-branch" ], r.getPublishLocationLink = function(e) {
return [ "https://github.com", e.username, e.repository, "blob", e.branch ].concat(e.path.split("/").map(encodeURIComponent)).join("/");
}, r.publish = function(e, t, r, o, a) {
var s = n.commitMsg;
i.upload(e.repository, e.username, e.branch, e.path, o, s, function(t, n) {
e.username = n, a(t);
});
}, r.newPublishAttributes = function(t) {
var n = {};
if (n.repository = e.getInputTextValue("#input-publish-github-repo", t), n.branch = e.getInputTextValue("#input-publish-github-branch", t),
n.path = e.getInputTextValue("#input-publish-file-path", t), !t.isPropagationStopped()) {
var i = n.repository.match(/[\/:]?([^\/:]+)\/([^\/]+?)(?:\.git)?$/);
return i && (n.repository = i[2], n.username = i[1]), n;
}
}, r;
}), define("helpers/sshHelper", [ "jquery", "constants", "core", "logger", "eventMgr", "settings", "classes/AsyncTask" ], function(e, t, n, i, r, o, a) {
function s(e) {
e.onRun(function() {
return !0 === u ? e.error(new Error("Operation not available in offline mode.|stopPublish")) : void e.chain();
});
}
function l(e, t) {
var r;
e && (i.error(e), "string" == typeof e ? r = "SSH error: " + e + "." : (r = "Could not publish on SSH server.",
e.code <= 0 && (n.setOffline(), r = "|stopPublish"))), t.error(new Error(r));
}
var c = {}, u = !1;
return r.addListener("onOfflineChanged", function(e) {
u = e;
}), c.upload = function(n, i, r, o, c, u, d, p) {
var h = new a();
s(h), h.onRun(function() {
var a = t.SSH_PUBLISH_URL + "?" + e.param({
host: n,
port: i,
username: r,
password: o,
path: c,
title: u
});
e.ajax({
url: a,
data: d,
type: "POST",
timeout: t.AJAX_TIMEOUT
}).done(function(e) {
return void 0 === e.error ? h.chain() : void l(e.error, h);
}).fail(function(e) {
l({
code: e.status,
message: e.statusText
}, h);
});
}), h.onSuccess(function() {
p();
}), h.onError(function(e) {
p(e);
}), h.enqueue();
}, c;
}), define("providers/sshProvider", [ "utils", "classes/Provider", "helpers/sshHelper" ], function(e, t, n) {
var i = new t("ssh", "SSH server");
return i.publishPreferencesInputIds = [ "ssh-host", "ssh-port", "ssh-username", "ssh-password" ],
i.publish = function(e, t, i, r, o) {
n.upload(e.host, e.port, e.username, e.password, e.path, i, r, o);
}, i.newPublishAttributes = function(t) {
var n = {};
return n.host = e.getInputTextValue("#input-publish-ssh-host", t, /^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9])$/),
n.port = e.getInputIntValue("#input-publish-ssh-port", void 0, 0), n.username = e.getInputTextValue("#input-publish-ssh-username", t),
n.password = e.getInputTextValue("#input-publish-ssh-password", t), n.path = e.getInputTextValue("#input-publish-file-path", t),
t.isPropagationStopped() ? void 0 : n;
}, i;
}), define("helpers/tumblrHelper", [ "jquery", "constants", "core", "utils", "storage", "logger", "eventMgr", "classes/AsyncTask" ], function(e, t, n, i, r, o, a, s) {
function l(e) {
e.onRun(function() {
return !0 === h ? void e.error(new Error("Operation not available in offline mode.|stopPublish")) : void e.chain();
});
}
function c(n) {
var o, a;
n.onRun(function() {
function s() {
e.getJSON(t.TUMBLR_PROXY_URL + "request_token", function(e) {
void 0 !== e.oauth_token ? (f = e, n.chain(l)) : n.error(new Error(h));
});
}
function l() {
i.redirectConfirm("You are being redirected to <strong>Tumblr</strong> authorization page.", function() {
n.chain(c);
}, function() {
n.error(new Error("Operation canceled."));
});
}
function c() {
r.removeItem("tumblrVerifier"), o = i.popupWindow("html/tumblr-oauth-client.html?oauth_token=" + f.oauth_token, "stackedit-tumblr-oauth", 800, 600),
o.focus(), a = setInterval(function() {
if (!0 === o.closed) {
if (clearInterval(a), o = void 0, a = void 0, f.oauth_verifier = r.tumblrVerifier,
void 0 === f.oauth_verifier) return void n.error(new Error(h));
r.removeItem("tumblrVerifier"), n.chain(u);
}
}, 500);
}
function u() {
e.getJSON(t.TUMBLR_PROXY_URL + "access_token", f, function(e) {
void 0 !== e.access_token && void 0 !== e.access_token_secret ? (r.tumblrOauthParams = JSON.stringify(e),
d = e, n.chain()) : n.error(new Error(h));
});
}
if (void 0 !== d) return void n.chain();
var p = r.tumblrOauthParams;
if (void 0 !== p) return d = JSON.parse(p), void n.chain();
var h = "Failed to retrieve a token from Tumblr.";
n.timeout = t.ASYNC_TASK_LONG_TIMEOUT;
var f;
n.chain(s);
}), n.onError(function() {
void 0 !== a && clearInterval(a), void 0 !== o && o.close();
});
}
function u(e, t) {
var i;
if (e) if (o.error(e), "string" == typeof e) i = e; else {
if (i = "Could not publish on Tumblr.", 401 === e.code || 403 === e.code) return d = void 0,
r.removeItem("tumblrOauthParams"), i = "Access to Tumblr account is not authorized.",
void t.retry(new Error(i), 1);
e.code <= 0 && (n.setOffline(), i = "|stopPublish");
}
t.error(new Error(i));
}
var d, p = {}, h = !1;
return a.addListener("onOfflineChanged", function(e) {
h = e;
}), p.upload = function(n, i, r, o, a, p, h, f, m) {
var g = new s();
l(g), c(g), g.onRun(function() {
var s = e.extend({
blog_hostname: n,
post_id: i,
tags: r,
format: o,
state: a,
date: p,
title: h,
content: f
}, d);
e.ajax({
url: t.TUMBLR_PROXY_URL + "post",
data: s,
type: "POST",
dataType: "json",
timeout: t.AJAX_TIMEOUT
}).done(function(e) {
i = e.id, g.chain();
}).fail(function(e) {
var t = {
code: e.status,
message: e.statusText
};
404 === t.code && void 0 !== i && (t = "Post " + i + " not found on Tumblr.|removePublish"),
u(t, g);
});
}), g.onSuccess(function() {
m(void 0, i);
}), g.onError(function(e) {
m(e);
}), g.enqueue();
}, p;
}), define("providers/tumblrProvider", [ "underscore", "settings", "utils", "classes/Provider", "helpers/tumblrHelper" ], function(e, t, n, i, r) {
var o = new i("tumblr", "Tumblr");
return o.publishPreferencesInputIds = [ "tumblr-hostname" ], o.getPublishLocationLink = function(e) {
return [ "http://", e.blogHostname, "/post/", e.postId ].join("");
}, o.publish = function(n, i, o, a, s) {
var l = n.tags || [];
i && void 0 !== i.tags && (l = i.tags), e.isString(l) && (l = e.compact(l.split(/[\s,]/)));
var c = function() {
return "html" == n.format ? "html" : "template" == n.format && -1 !== (n.customTmpl || t.template).indexOf("documentHTML") ? "html" : "markdown";
}(), u = i && !1 === i.published ? "draft" : "published", d = i && i.date;
r.upload(n.blogHostname, n.postId, l.join(","), c, u, d, o, a, function(e, t) {
return e ? void s(e) : (n.postId = t, void s());
});
}, o.newPublishAttributes = function(e) {
var t = {};
return t.blogHostname = n.getInputTextValue("#input-publish-tumblr-hostname", e, /^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9])$/),
t.postId = n.getInputTextValue("#input-publish-postid"), e.isPropagationStopped() ? void 0 : t;
}, o;
}), define("helpers/wordpressHelper", [ "jquery", "constants", "core", "utils", "storage", "logger", "eventMgr", "classes/AsyncTask" ], function(e, t, n, i, r, o, a, s) {
function l(e) {
e.onRun(function() {
return !0 === h ? e.error(new Error("Operation not available in offline mode.|stopPublish")) : void e.chain();
});
}
function c(n) {
var o, a;
n.onRun(function() {
function s() {
i.redirectConfirm("You are being redirected to <strong>WordPress</strong> authorization page.", function() {
n.chain(l);
}, function() {
n.error(new Error("Operation canceled."));
});
}
function l() {
r.removeItem("wordpressCode"), o = i.popupWindow("html/wordpress-oauth-client.html?client_id=" + t.WORDPRESS_CLIENT_ID, "stackedit-wordpress-oauth", 960, 600),
o.focus(), a = setInterval(function() {
if (!0 === o.closed) {
if (clearInterval(a), o = void 0, a = void 0, void 0 === (p = r.wordpressCode)) return n.error(new Error(u));
r.removeItem("wordpressCode"), n.chain(c);
}
}, 500);
}
function c() {
e.getJSON(t.WORDPRESS_PROXY_URL + "authenticate/" + p, function(e) {
void 0 !== e.token ? (d = e.token, r.wordpressToken = d, n.chain()) : n.error(new Error(u));
});
}
if (void 0 !== (d = r.wordpressToken)) return n.chain();
var u = "Failed to retrieve a token from Wordpress.";
n.timeout = t.ASYNC_TASK_LONG_TIMEOUT;
var p;
n.chain(s);
}), n.onError(function() {
void 0 !== a && clearInterval(a), void 0 !== o && o.close();
});
}
function u(e, t) {
var i;
if (e) if (o.error(e), "string" == typeof e) i = e; else {
if (i = "Could not publish on WordPress.", 400 === e.code && "invalid_token" == e.message || 401 === e.code || 403 === e.code) return r.removeItem("wordpressToken"),
i = "Access to WordPress account is not authorized.", t.retry(new Error(i), 1);
e.code <= 0 && (n.setOffline(), i = "|stopPublish");
}
t.error(new Error(i));
}
var d, p = {}, h = !1;
return a.addListener("onOfflineChanged", function(e) {
h = e;
}), p.upload = function(n, i, r, o, a, p, h, f) {
var m = new s();
l(m), c(m);
var g;
m.onRun(function() {
var s = t.WORDPRESS_PROXY_URL + "post", l = {
token: d,
site: n,
postId: i,
tags: r,
status: o,
date: a,
title: p,
content: h
};
e.ajax({
url: s,
data: l,
type: "POST",
dataType: "json",
timeout: t.AJAX_TIMEOUT
}).done(function(e) {
if (e.body.ID) return i = e.body.ID, g = e.body.site_ID, m.chain();
var t = {
code: e.code,
message: e.body.error
};
404 === t.code && ("unknown_blog" == t.message ? t = 'Site "' + n + '" not found on WordPress.|removePublish' : "unknown_post" == t.message && (t = "Post " + i + " not found on WordPress.|removePublish")),
u(t, m);
}).fail(function(e) {
u({
code: e.status,
message: e.statusText
}, m);
});
}), m.onSuccess(function() {
f(void 0, g, i);
}), m.onError(function(e) {
f(e);
}), m.enqueue();
}, p;
}), define("providers/wordpressProvider", [ "underscore", "utils", "classes/Provider", "helpers/wordpressHelper" ], function(e, t, n, i) {
var r = new n("wordpress", "WordPress");
return r.defaultPublishFormat = "html", r.publishPreferencesInputIds = [ "wordpress-site" ],
r.getPublishLocationLink = function(e) {
return e.siteId && [ "https://wordpress.com/post", e.siteId, e.postId ].join("/");
}, r.publish = function(t, n, r, o, a) {
var s = t.tags || [];
n && void 0 !== n.tags && (s = n.tags);
var l = n && !1 === n.published ? "draft" : "publish", c = n && n.date;
e.isString(s) && (s = e.compact(s.split(/[\s,]/))), i.upload(t.site, t.postId, s.join(","), l, c, r, o, function(e, n, i) {
return e ? a(e) : (t.siteId = n, t.postId = i, a(), void 0);
});
}, r.newPublishAttributes = function(e) {
var n = {};
return n.site = t.getInputTextValue("#input-publish-wordpress-site", e, /^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9])$/),
n.postId = t.getInputTextValue("#input-publish-postid"), e.isPropagationStopped() ? void 0 : n;
}, r;
}), define("publisher", [ "jquery", "underscore", "constants", "utils", "storage", "settings", "eventMgr", "fileSystem", "fileMgr", "monetizejs", "classes/Provider", "classes/AsyncTask", "providers/bloggerProvider", "providers/bloggerPageProvider", "providers/dropboxProvider", "providers/gistProvider", "providers/githubProvider", "providers/gdriveProvider", "providers/gdrivesecProvider", "providers/gdriveterProvider", "providers/sshProvider", "providers/tumblrProvider", "providers/wordpressProvider" ], function(e, t, n, i, r, o, a, s, l, c, u, d) {
function p(e, t, n) {
return void 0 === t.format && (t.format = i.getInputRadio("radio-publish-format"),
"template" == t.format && i.getInputChecked("#checkbox-publish-custom-template") && (t.customTmpl = i.getInputValue("#textarea-publish-custom-template"))),
"markdown" == t.format ? e.content : "html" == t.format ? n.withoutComments : v.applyTemplate(e, t, n);
}
function h(e, t) {
if (0 === S.length) return void e(t);
var n = S.pop(), i = p(y, n, x), r = (y.frontMatter || {}).title || y.title;
n.provider.publish(n, y.frontMatter, r, i, function(i) {
if (void 0 !== i) {
var r = i.toString();
if (-1 !== r.indexOf("|removePublish") && (y.removePublishLocation(n), a.onPublishRemoved(y, n)),
-1 !== r.indexOf("|stopPublish")) return void e(i);
}
h(e, t || i);
});
}
function f(e, n) {
var o;
do o = "publish." + i.id(); while (t.has(r, o));
n.publishIndex = o, e.addPublishLocation(n), a.onNewPublishSuccess(e, n);
}
function m(n) {
var r = n.defaultPublishFormat || "markdown";
k = n, e(".publish-provider-name").text(n.providerName), e('.modal-publish [class*=" modal-publish-"]').hide().filter(".modal-publish-" + n.providerId).show(),
i.resetModalInputs(), i.setInputRadio("radio-publish-format", r), i.setInputChecked("#checkbox-publish-custom-template", !1),
i.setInputValue("#textarea-publish-custom-template", o.template);
var a = i.retrieveIgnoreError(n.providerId + ".publishPreferences");
a && (t.each(n.publishPreferencesInputIds, function(e) {
var n = a[e];
t.isBoolean(n) ? i.setInputChecked("#input-publish-" + e, n) : i.setInputValue("#input-publish-" + e, n);
}), i.setInputRadio("radio-publish-format", a.format), i.setInputChecked("#checkbox-publish-custom-template", void 0 !== a.customTmpl),
i.setInputValue("#textarea-publish-custom-template", a.customTmpl || o.template)),
e(".modal-publish").modal();
}
function g(e) {
var n = k, i = n.newPublishAttributes(e);
if (void 0 !== i) {
var o = l.currentFile, a = p(o, i, w), s = o.frontMatter && o.frontMatter.title || o.title;
n.publish(i, o.frontMatter, s, a, function(e) {
void 0 === e && (i.provider = n, f(o, i));
});
var c = {};
t.each(n.publishPreferencesInputIds, function(e) {
var t = document.getElementById("input-publish-" + e);
c[e] = "checkbox" == t.type ? t.checked : t.value;
}), c.format = i.format, c.customTmpl = i.customTmpl, r[n.providerId + ".publishPreferences"] = JSON.stringify(c);
}
}
var v = {}, b = t.chain(arguments).map(function(e) {
return e instanceof u && !0 === e.isPublishEnabled && [ e.providerId, e ];
}).compact().object().value();
!function() {
var e = {};
t.each(s, function(e) {
i.retrieveIndexArray(e.fileIndex + ".publish").forEach(function(t) {
try {
var n = JSON.parse(r[t]);
n.publishIndex = t;
var o = b[n.provider];
if (!o) throw new Error("Invalid provider ID: " + n.provider);
n.provider = o, e.publishLocations[t] = n, s[t] = n;
} catch (s) {
a.onError(s), i.removeIndexFromArray(e.fileIndex + ".publish", t);
}
});
}), Object.keys(r).forEach(function(t) {
var n = t.match(/publish\.\S+/);
n && !e.hasOwnProperty(n[0]) && r.removeItem(t);
});
}(), v.applyTemplate = function(e, n, i) {
try {
var r = n && n.customTmpl || o.template;
return t.template(r, {
documentTitle: e.title,
documentMarkdown: e.content,
strippedDocumentMarkdown: e.content.substring(e.frontMatter ? e.frontMatter._frontMatter.length : 0),
documentHTML: i.withoutComments,
documentHTMLWithFrontMatter: (e.frontMatter ? e.frontMatter._frontMatter : "") + i.withoutComments,
documentHTMLWithComments: i.withComments,
frontMatter: e.frontMatter,
publishAttributes: n
});
} catch (e) {
return a.onError(e), e.message;
}
};
var y, x, w, S = [];
a.addListener("onPreviewFinished", function(e, t) {
w = {
withComments: e,
withoutComments: t
};
});
var C = !1;
a.addListener("onOfflineChanged", function(e) {
C = e;
});
var _ = !1;
v.publish = function() {
!0 !== _ && !0 !== C && (_ = !0, a.onPublishRunning(!0), y = l.currentFile, x = w,
S = t.values(y.publishLocations), h(function(e) {
_ = !1, a.onPublishRunning(!1), void 0 === e && a.onPublishSuccess(y);
}));
};
var k, E = [ "<li>", ' <a href="#"', ' class="action-init-publish-<%= provider.providerId %>">', ' <i class="icon-provider-<%= provider.providerId %>"></i> <%= provider.providerName %>', " </a>", "</li>" ].join("");
return a.addListener("onReady", function() {
if (!1 === window.viewerMode) {
var r = document.querySelector(".menu-panel .publish-on-provider-list"), s = t.reduce(b, function(e, n) {
return e + t.template(E, {
provider: n
});
}, "");
r.innerHTML = s, t.each(b, function(t) {
e(r.querySelector(".action-init-publish-" + t.providerId)).click(function() {
m(t);
}), e(".action-publish-" + t.providerId).click(function() {
m(t);
});
});
}
e(".action-process-publish").click(g);
var u = e(".publish-custom-template-collapse").collapse({
toggle: !1
}), p = e("#textarea-publish-custom-template"), h = t.debounce(function() {
u.collapse("template" == i.getInputRadio("radio-publish-format") ? "show" : "hide");
}, 100);
e("#checkbox-publish-custom-template").change(function() {
p.prop("disabled", !this.checked);
}), e("input:radio[name=radio-publish-format]").change(function() {
h();
}), e(".modal-publish").on("hidden.bs.modal", function() {
u.collapse("hide");
}), e(".action-download-md").click(function() {
var e = l.currentFile.content, t = l.currentFile.title;
i.saveAs(e, t + ".md");
}), e(".action-download-html").click(function() {
var e = l.currentFile.title;
i.saveAs(w.withoutComments, e + ".html");
}), e(".action-download-template").click(function() {
var e = l.currentFile, t = v.applyTemplate(e, void 0, w);
i.saveAs(t, e.title + (-1 === o.template.indexOf("documentHTML") ? ".md" : ".html"));
});
var f = new c({
applicationID: "ESTHdCYOi18iLhhO"
});
e(".action-download-pdf").click(function() {
var t, r, s = l.currentFile, c = v.applyTemplate(s, {
customTmpl: o.pdfTemplate
}, w), u = new d();
u.onRun(function() {
return !0 === C ? (a.onError("Operation not available in offline mode."), u.chain()) : a.isSponsor ? void f.getTokenImmediate(function(e, t) {
r = t, u.chain();
}) : (e(".modal-sponsor-only").modal("show"), u.chain());
}), u.onRun(function() {
if (!r) return u.chain();
var i = new XMLHttpRequest();
i.open("POST", n.PDF_EXPORT_URL + "?" + e.param({
token: r,
options: o.pdfOptions
}), !0), i.setRequestHeader("Content-type", "application/x-www-form-urlencoded"),
i.responseType = "blob", i.onreadystatechange = function() {
4 == this.readyState && (200 == this.status ? t = this.response : a.onError("Error when trying to generate PDF: " + this.statusText),
u.chain());
}, i.send(c);
}), u.onSuccess(function() {
t && i.saveAs(t, l.currentFile.title + ".pdf");
}), u.enqueue();
});
}), a.onPublisherCreated(v), v;
}), define("providers/downloadProvider", [ "jquery", "constants", "eventMgr", "utils", "fileMgr", "classes/Provider", "classes/AsyncTask" ], function(e, t, n, i, r, o, a) {
var s = new o("download");
return s.viewerSharingAttributes = [ "url" ], s.importPublic = function(n, i) {
var r, o, s = new a(!0);
s.onRun(function() {
var i = n.url, a = i.lastIndexOf("/");
return -1 === a ? void s.error(new Error("Invalid URL parameter.")) : (r = i.substring(a + 1),
void e.ajax({
url: t.DOWNLOAD_IMPORT_URL + "?" + e.param({
url: i
}),
dataType: "text",
timeout: t.AJAX_TIMEOUT
}).done(function(e) {
o = e, s.chain();
}).fail(function() {
s.error(new Error("Unable to access URL " + i));
}));
}), s.onSuccess(function() {
i(void 0, r, o);
}), s.onError(function(e) {
i(e);
}), s.enqueue();
}, n.addListener("onReady", function() {
e(".action-import-url").click(function(e) {
var t = i.getInputTextValue("#input-import-url", e);
t && s.importPublic({
url: t
}, function(e, t, n) {
if (!e) {
var i = r.createFile(t, n);
r.selectFile(i);
}
});
});
}), s;
}), define("sharing", [ "jquery", "underscore", "constants", "utils", "eventMgr", "fileMgr", "classes/AsyncTask", "classes/Provider", "providers/couchdbProvider", "providers/downloadProvider", "providers/gistProvider" ], function(e, t, n, i, r, o, a, s) {
var l = {}, c = t.chain(arguments).map(function(e) {
return e instanceof s && [ e.providerId, e ];
}).compact().object().value(), u = !1;
return r.addListener("onOfflineChanged", function(e) {
u = e;
}), l.getEditorParams = function(e) {
var n = e.provider, i = {
provider: n.providerId
};
return n.editorSharingAttributes ? (t.each(n.editorSharingAttributes, function(t) {
i[t] = e[t];
}), i) : void 0;
}, l.getViewerParams = function(e) {
var n = e.provider;
if ("markdown" == e.format) {
var i = {
provider: n.providerId
};
if (n.viewerSharingAttributes) return t.each(n.viewerSharingAttributes, function(t) {
i[t] = e[t];
}), i;
}
}, r.addListener("onReady", function() {
var e, n, r = i.getURLParameter("provider");
if (window.viewerMode) {
if (void 0 === r && (r = "download"), void 0 === (n = c[r])) return;
if (e = {}, t.some(n.viewerSharingAttributes, function(t) {
var n = i.getURLParameter(t);
return n ? void (e[t] = n) : 1;
})) return;
n.importPublic(e, i.lockUI(function(e, t, n) {
if (!e) {
var i = o.createFile(t, n, void 0, void 0, !0);
o.selectFile(i);
}
}));
} else if (r) {
if (void 0 === (n = c[r])) return;
if (e = {}, t.some(n.editorSharingAttributes, function(t) {
var n = i.getURLParameter(t);
return n ? void (e[t] = n) : 1;
})) return;
n.importPrivate(e, i.lockUI());
}
}), r.onSharingCreated(l), l;
}), define("providers/gplusProvider", [ "jquery", "underscore", "utils", "storage", "classes/Provider", "eventMgr", "helpers/googleHelper" ], function(e, t, n, i, r, o, a) {
function s(e, n) {
var i;
return t.find(e.thumbnails, function(e) {
var t = !1;
return e.url.replace(/^(.*[\/=]s)\d.*?(\/[^\/]+)?$/, function(e, r, o) {
i = r + n + (o || ""), t = !0;
}), t;
}), i;
}
function l() {
return c.thumbnails ? (n.resetModalInputs(), e(".modal-import-image img").prop("src", s(c, 128)),
n.setInputValue("#input-import-image-title", c.name), p && n.setInputValue("#input-import-image-size", p.size),
e(".modal-import-image").modal(), void 0) : (o.onError("Image " + c.name + " is not accessible."),
void u(!0));
}
var c, u, d = new r("gplus", "Google+"), p = n.retrieveIgnoreError("gplus.importImagePreferences");
return d.importImage = function(e) {
u = e, a.picker(function(t, n) {
return t || 0 === n.length ? void e(t) : (c = n[0], void l());
}, "img");
}, d.uploadImage = function(t, n, i) {
u = i, a.uploadImg(t, n, "default", function(n, r) {
return n || !r ? void i(n) : (c = {
name: t,
thumbnails: []
}, e(r).find("thumbnail").each(function() {
c.thumbnails.push({
url: e(this).attr("url")
});
}), l(), void 0);
});
}, o.addListener("onReady", function() {
e(".action-import-image").click(function() {
var e = n.getInputIntValue("#input-import-image-size", void 0, 0) || 0, t = n.getInputTextValue("#input-import-image-title"), r = s(c, e);
t && (r += ' "' + t + '"'), u(void 0, r), p = {}, e && (p.size = e), i["gplus.importImagePreferences"] = JSON.stringify(p);
});
}), d;
}), define("mediaImporter", [ "jquery", "underscore", "constants", "classes/Provider", "core", "eventMgr", "providers/gplusProvider" ], function(e, t, n, i, r, o) {
var a = {}, s = t.chain(arguments).map(function(e) {
return e instanceof i && [ e.providerId, e ];
}).compact().object().value();
return o.addListener("onReady", function() {
function i(i) {
var o = (i.dataTransfer || i.target).files, a = t.first(o);
if (a.name.match(/.(jpe?g|png|gif)$/i)) {
i.stopPropagation(), i.preventDefault();
var l = new FileReader();
l.onload = function(t) {
return function(n) {
var i = new Uint8Array(n.target.result);
s.gplus.uploadImage(t.name, i, function(t, n) {
if (!t) {
r.catchModal = !0, e("#wmd-image-button").click(), r.catchModal = !1;
var i = r.insertLinkCallback;
r.insertLinkCallback = void 0, i(n || null);
}
});
};
}(a);
var c = a.slice(0, n.IMPORT_IMG_MAX_CONTENT_SIZE);
l.readAsArrayBuffer(c);
}
}
function o(e) {
e.stopPropagation(), e.preventDefault(), e.dataTransfer.dropEffect = "copy";
}
t.each(s, function(t) {
e(".action-import-image-" + t.providerId).click(function() {
var e = r.insertLinkCallback;
r.insertLinkCallback = void 0, t.importImage(function(t, n) {
return t ? void e(null) : void e(n || null);
});
});
}), !window.viewerMode && function(e) {
e.addEventListener("dragover", o, !1), e.addEventListener("drop", i, !1);
}(document.querySelector(".layout-wrapper-l3"));
}), a;
}), define("css/css", [], function() {
if ("undefined" == typeof window) return {
load: function(e, t, n) {
n();
}
};
var e = document.getElementsByTagName("head")[0], t = window.navigator.userAgent.match(/Trident\/([^ ;]*)|AppleWebKit\/([^ ;]*)|Opera\/([^ ;]*)|rv\:([^ ;]*)(.*?)Gecko\/([^ ;]*)|MSIE\s([^ ;]*)/) || 0, n = !1, i = !0;
t[1] || t[7] ? n = parseInt(t[1]) < 6 || parseInt(t[7]) <= 9 : t[2] ? i = !1 : t[4] && (n = parseInt(t[4]) < 18);
var r = {};
r.pluginBuilder = "./css-builder";
var o, a, s, l = function() {
o = document.createElement("style"), e.appendChild(o), a = o.styleSheet || o.sheet;
}, c = 0, u = [], d = function(e) {
c++, 32 == c && (l(), c = 0), a.addImport(e), o.onload = function() {
p();
};
}, p = function() {
s();
var e = u.shift();
return e ? (s = e[1], void d(e[0])) : void (s = null);
}, h = function(e, t) {
if (a && a.addImport || l(), a && a.addImport) s ? u.push([ e, t ]) : (d(e), s = t); else {
o.textContent = '@import "' + e + '";';
var n = setInterval(function() {
try {
o.sheet.cssRules, clearInterval(n), t();
} catch (e) {}
}, 10);
}
}, f = function(t, n) {
var r = document.createElement("link");
if (r.type = "text/css", r.rel = "stylesheet", i) r.onload = function() {
r.onload = function() {}, setTimeout(n, 7);
}; else var o = setInterval(function() {
for (var e = 0; e < document.styleSheets.length; e++) if (document.styleSheets[e].href == r.href) return clearInterval(o),
n();
}, 10);
r.href = t, e.appendChild(r);
};
return r.normalize = function(e, t) {
return ".css" == e.substr(e.length - 4, 4) && (e = e.substr(0, e.length - 4)), t(e);
}, r.load = function(e, t, i) {
(n ? h : f)(t.toUrl(e + ".css"), i);
}, r;
}), define("css", [ "css/css" ], function(e) {
return e;
}), rangy.createModule("CssClassApplier", function(e, t) {
function n(e) {
return e.replace(/^\s\s*/, "").replace(/\s\s*$/, "");
}
function i(e, t) {
return e.className && new RegExp("(?:^|\\s)" + t + "(?:\\s|$)").test(e.className);
}
function r(e, t) {
e.className ? i(e, t) || (e.className += " " + t) : e.className = t;
}
function o(e) {
return e.split(/\s+/).sort().join(" ");
}
function a(e) {
return o(e.className);
}
function s(e, t) {
return a(e) == a(t);
}
function l(e) {
for (var t = e.parentNode; e.hasChildNodes(); ) t.insertBefore(e.firstChild, e);
t.removeChild(e);
}
function c(e, t) {
var n = e.cloneRange();
n.selectNodeContents(t);
var i = n.intersection(e), r = i ? i.toString() : "";
return n.detach(), "" != r;
}
function u(e) {
return e.getNodes([ 3 ], function(t) {
return c(e, t);
});
}
function d(e, t) {
if (e.attributes.length != t.attributes.length) return !1;
for (var n, i, r, o = 0, a = e.attributes.length; a > o; ++o) if (n = e.attributes[o],
"class" != (r = n.name)) {
if (i = t.attributes.getNamedItem(r), n.specified != i.specified) return !1;
if (n.specified && n.nodeValue !== i.nodeValue) return !1;
}
return !0;
}
function p(e, t) {
for (var n, i = 0, r = e.attributes.length; r > i; ++i) if (n = e.attributes[i].name,
(!t || !E.arrayContains(t, n)) && e.attributes[i].specified && "class" != n) return !0;
return !1;
}
function h(e, t) {
for (var n in t) if (t.hasOwnProperty(n) && e[n] !== t[n]) return !1;
return !0;
}
function f(e) {
var t;
return e && 1 == e.nodeType && ((t = e.parentNode) && 9 == t.nodeType && "on" == t.designMode || I(e) && !I(e.parentNode));
}
function m(e) {
return (I(e) || 1 != e.nodeType && I(e.parentNode)) && !f(e);
}
function g(e) {
return e && 1 == e.nodeType && !D.test(k(e, "display"));
}
function v(e) {
if (0 == e.data.length) return !0;
if (N.test(e.data)) return !1;
switch (k(e.parentNode, "whiteSpace")) {
case "pre":
case "pre-wrap":
case "-moz-pre-wrap":
return !1;
case "pre-line":
if (/[\r\n]/.test(e.data)) return !1;
}
return g(e.previousSibling) || g(e.nextSibling);
}
function b(e, t) {
return E.isCharacterDataNode(e) ? 0 == t ? !!e.previousSibling : t != e.length || !!e.nextSibling : t > 0 && t < e.childNodes.length;
}
function y(e, n, i, r) {
var o, a = 0 == i;
if (E.isAncestorOf(n, e)) return e;
if (E.isCharacterDataNode(n)) if (0 == i) i = E.getNodeIndex(n), n = n.parentNode; else {
if (i != n.length) throw t.createError("splitNodeAt should not be called with offset in the middle of a data node (" + i + " in " + n.data);
i = E.getNodeIndex(n) + 1, n = n.parentNode;
}
if (b(n, i)) {
if (!o) {
o = n.cloneNode(!1), o.id && o.removeAttribute("id");
for (var s; s = n.childNodes[i]; ) o.appendChild(s);
E.insertAfter(o, n);
}
return n == e ? o : y(e, o.parentNode, E.getNodeIndex(o), r);
}
if (e != n) {
o = n.parentNode;
var l = E.getNodeIndex(n);
return a || l++, y(e, o, l, r);
}
return e;
}
function x(e, t) {
return e.tagName == t.tagName && s(e, t) && d(e, t);
}
function w(e) {
var t = e ? "nextSibling" : "previousSibling";
return function(n, i) {
var r = n.parentNode, o = n[t];
if (o) {
if (o && 3 == o.nodeType) return o;
} else if (i && (o = r[t]) && 1 == o.nodeType && x(r, o)) return o[e ? "firstChild" : "lastChild"];
return null;
};
}
function S(e) {
this.isElementMerge = 1 == e.nodeType, this.firstTextNode = this.isElementMerge ? e.lastChild : e,
this.textNodes = [ this.firstTextNode ];
}
function C(e, t, i) {
this.cssClass = e;
var r, a, s, l, c = null;
if ("object" == typeof t && null !== t) {
for (i = t.tagNames, c = t.elementProperties, a = 0; l = A[a++]; ) t.hasOwnProperty(l) && (this[l] = t[l]);
r = t.normalize;
} else r = t;
this.normalize = void 0 === r || r, this.attrExceptions = [];
var u = document.createElement(this.elementTagName);
this.elementProperties = {};
for (var d in c) c.hasOwnProperty(d) && (R.hasOwnProperty(d) && (d = R[d]), u[d] = c[d],
this.elementProperties[d] = u[d], this.attrExceptions.push(d));
this.elementSortedClassName = this.elementProperties.hasOwnProperty("className") ? o(this.elementProperties.className + " " + e) : e,
this.applyToAnyTagName = !1;
var p = typeof i;
if ("string" == p) "*" == i ? this.applyToAnyTagName = !0 : this.tagNames = n(i.toLowerCase()).split(/\s*,\s*/); else if ("object" == p && "number" == typeof i.length) for (this.tagNames = [],
a = 0, s = i.length; s > a; ++a) "*" == i[a] ? this.applyToAnyTagName = !0 : this.tagNames.push(i[a].toLowerCase()); else this.tagNames = [ this.elementTagName ];
}
function _(e, t, n) {
return new C(e, t, n);
}
e.requireModules([ "WrappedSelection", "WrappedRange" ]);
var k, E = e.dom, T = function() {
function e(e, t, n) {
return t && n ? " " : "";
}
return function(t, n) {
t.className && (t.className = t.className.replace(new RegExp("(?:^|\\s)" + n + "(?:\\s|$)"), e));
};
}();
void 0 !== window.getComputedStyle ? k = function(e, t) {
return E.getWindow(e).getComputedStyle(e, null)[t];
} : void 0 !== document.documentElement.currentStyle ? k = function(e, t) {
return e.currentStyle[t];
} : t.fail("No means of obtaining computed style properties found");
var I;
!function() {
var e = document.createElement("div");
I = "boolean" == typeof e.isContentEditable ? function(e) {
return e && 1 == e.nodeType && e.isContentEditable;
} : function(e) {
return !(!e || 1 != e.nodeType || "false" == e.contentEditable || "true" != e.contentEditable && !I(e.parentNode));
};
}();
var D = /^inline(-block|-table)?$/i, N = /[^\r\n\t\f \u200B]/, M = w(!1), L = w(!0);
S.prototype = {
doMerge: function() {
for (var e, t, n, i = [], r = 0, o = this.textNodes.length; o > r; ++r) e = this.textNodes[r],
t = e.parentNode, i[r] = e.data, r && (t.removeChild(e), t.hasChildNodes() || t.parentNode.removeChild(t));
return this.firstTextNode.data = n = i.join(""), n;
},
getLength: function() {
for (var e = this.textNodes.length, t = 0; e--; ) t += this.textNodes[e].length;
return t;
},
toString: function() {
for (var e = [], t = 0, n = this.textNodes.length; n > t; ++t) e[t] = "'" + this.textNodes[t].data + "'";
return "[Merge(" + e.join(",") + ")]";
}
};
var A = [ "elementTagName", "ignoreWhiteSpace", "applyToEditableOnly" ], R = {
"class": "className"
};
C.prototype = {
elementTagName: "span",
elementProperties: {},
ignoreWhiteSpace: !0,
applyToEditableOnly: !1,
hasClass: function(e) {
return 1 == e.nodeType && E.arrayContains(this.tagNames, e.tagName.toLowerCase()) && i(e, this.cssClass);
},
getSelfOrAncestorWithClass: function(e) {
for (;e; ) {
if (this.hasClass(e, this.cssClass)) return e;
e = e.parentNode;
}
return null;
},
isModifiable: function(e) {
return !this.applyToEditableOnly || m(e);
},
isIgnorableWhiteSpaceNode: function(e) {
return this.ignoreWhiteSpace && e && 3 == e.nodeType && v(e);
},
postApply: function(e, t, n) {
for (var i, r, o, a = e[0], s = e[e.length - 1], l = [], c = a, u = s, d = 0, p = s.length, h = 0, f = e.length; f > h; ++h) r = e[h],
o = M(r, !n), o ? (i || (i = new S(o), l.push(i)), i.textNodes.push(r), r === a && (c = i.firstTextNode,
d = c.length), r === s && (u = i.firstTextNode, p = i.getLength())) : i = null;
var m = L(s, !n);
if (m && (i || (i = new S(s), l.push(i)), i.textNodes.push(m)), l.length) {
for (h = 0, f = l.length; f > h; ++h) l[h].doMerge();
t.setStart(c, d), t.setEnd(u, p);
}
},
createContainer: function(t) {
var n = t.createElement(this.elementTagName);
return e.util.extend(n, this.elementProperties), r(n, this.cssClass), n;
},
applyToTextNode: function(e) {
var t = e.parentNode;
if (1 == t.childNodes.length && E.arrayContains(this.tagNames, t.tagName.toLowerCase())) r(t, this.cssClass); else {
var n = this.createContainer(E.getDocument(e));
e.parentNode.insertBefore(n, e), n.appendChild(e);
}
},
isRemovable: function(e) {
return e.tagName.toLowerCase() == this.elementTagName && a(e) == this.elementSortedClassName && h(e, this.elementProperties) && !p(e, this.attrExceptions) && this.isModifiable(e);
},
undoToTextNode: function(e, t, n) {
if (!t.containsNode(n)) {
var i = t.cloneRange();
i.selectNode(n), i.isPointInRange(t.endContainer, t.endOffset) && (y(n, t.endContainer, t.endOffset, [ t ]),
t.setEndAfter(n)), i.isPointInRange(t.startContainer, t.startOffset) && (n = y(n, t.startContainer, t.startOffset, [ t ]));
}
this.isRemovable(n) ? l(n) : T(n, this.cssClass);
},
applyToRange: function(e) {
e.splitBoundaries();
var t = u(e);
if (t.length) {
for (var n, i = 0, r = t.length; r > i; ++i) n = t[i], this.isIgnorableWhiteSpaceNode(n) || this.getSelfOrAncestorWithClass(n) || !this.isModifiable(n) || this.applyToTextNode(n);
e.setStart(t[0], 0), n = t[t.length - 1], e.setEnd(n, n.length), this.normalize && this.postApply(t, e, !1);
}
},
applyToSelection: function(t) {
t = t || window;
var n, i = e.getSelection(t), r = i.getAllRanges();
i.removeAllRanges();
for (var o = r.length; o--; ) n = r[o], this.applyToRange(n), i.addRange(n);
},
undoToRange: function(e) {
e.splitBoundaries();
var t, n, i = u(e), r = i[i.length - 1];
if (i.length) {
for (var o = 0, a = i.length; a > o; ++o) t = i[o], n = this.getSelfOrAncestorWithClass(t),
n && this.isModifiable(t) && this.undoToTextNode(t, e, n), e.setStart(i[0], 0),
e.setEnd(r, r.length);
this.normalize && this.postApply(i, e, !0);
}
},
undoToSelection: function(t) {
t = t || window;
var n, i = e.getSelection(t), r = i.getAllRanges();
i.removeAllRanges();
for (var o = 0, a = r.length; a > o; ++o) n = r[o], this.undoToRange(n), i.addRange(n);
},
getTextSelectedByRange: function(e, t) {
var n = t.cloneRange();
n.selectNodeContents(e);
var i = n.intersection(t), r = i ? i.toString() : "";
return n.detach(), r;
},
isAppliedToRange: function(e) {
if (e.collapsed) return !!this.getSelfOrAncestorWithClass(e.commonAncestorContainer);
for (var t, n = e.getNodes([ 3 ]), i = 0; t = n[i++]; ) if (!this.isIgnorableWhiteSpaceNode(t) && c(e, t) && this.isModifiable(t) && !this.getSelfOrAncestorWithClass(t)) return !1;
return !0;
},
isAppliedToSelection: function(t) {
t = t || window;
for (var n = e.getSelection(t), i = n.getAllRanges(), r = i.length; r--; ) if (!this.isAppliedToRange(i[r])) return !1;
return !0;
},
toggleRange: function(e) {
this.isAppliedToRange(e) ? this.undoToRange(e) : this.applyToRange(e);
},
toggleSelection: function(e) {
this.isAppliedToSelection(e) ? this.undoToSelection(e) : this.applyToSelection(e);
},
detach: function() {}
}, C.util = {
hasClass: i,
addClass: r,
removeClass: T,
hasSameClasses: s,
replaceWithOwnChildren: l,
elementsHaveSameNonClassAttributes: d,
elementHasNonClassAttributes: p,
splitNodeAt: y,
isEditableElement: I,
isEditingHost: f,
isEditable: m
}, e.CssClassApplier = C, e.createCssClassApplier = _;
}), define("rangy-cssclassapplier", [ "rangy" ], function() {}), requirejs.config({
waitSeconds: 0,
packages: [ {
name: "css",
location: "bower-libs/require-css",
main: "css"
}, {
name: "less",
location: "bower-libs/require-less",
main: "less"
} ],
paths: {
jquery: "bower-libs/jquery/jquery",
underscore: "bower-libs/underscore/underscore",
crel: "bower-libs/crel/crel",
jgrowl: "bower-libs/jgrowl/jquery.jgrowl",
mousetrap: "bower-libs/mousetrap/mousetrap",
"mousetrap-record": "bower-libs/mousetrap/plugins/record/mousetrap-record",
toMarkdown: "bower-libs/to-markdown/src/to-markdown",
text: "bower-libs/requirejs-text/text",
mathjax: "../res/bower-libs/MathJax/MathJax.js?config=TeX-AMS_SVG",
bootstrap: "bower-libs/bootstrap/dist/js/bootstrap",
requirejs: "bower-libs/requirejs/require",
"google-code-prettify": "bower-libs/google-code-prettify/src/prettify",
highlightjs: "libs/highlight/highlight.pack",
"jquery-waitforimages": "bower-libs/waitForImages/src/jquery.waitforimages",
"jquery-ui": "bower-libs/jquery-ui/ui/jquery-ui",
"jquery-ui-core": "bower-libs/jquery-ui/ui/jquery.ui.core",
"jquery-ui-widget": "bower-libs/jquery-ui/ui/jquery.ui.widget",
"jquery-ui-mouse": "bower-libs/jquery-ui/ui/jquery.ui.mouse",
"jquery-ui-draggable": "bower-libs/jquery-ui/ui/jquery.ui.draggable",
"jquery-ui-effect": "bower-libs/jquery-ui/ui/jquery.ui.effect",
"jquery-ui-effect-slide": "bower-libs/jquery-ui/ui/jquery.ui.effect-slide",
FileSaver: "bower-libs/FileSaver/FileSaver",
stacktrace: "bower-libs/stacktrace/stacktrace",
"requirejs-text": "bower-libs/requirejs-text/text",
"bootstrap-tour": "bower-libs/bootstrap-tour/build/js/bootstrap-tour",
css_browser_selector: "bower-libs/css_browser_selector/css_browser_selector",
"pagedown-extra": "bower-libs/pagedown-extra/node-pagedown-extra",
pagedownExtra: "bower-libs/pagedown-extra/Markdown.Extra",
pagedown: "libs/Markdown.Editor",
"require-css": "bower-libs/require-css/css",
xregexp: "bower-libs/xregexp/xregexp-all",
yaml: "bower-libs/yaml.js/bin/yaml",
"yaml.js": "bower-libs/yaml.js",
"yaml-js": "bower-libs/yaml.js/bin/yaml",
css: "bower-libs/require-css/css",
"css-builder": "bower-libs/require-css/css-builder",
normalize: "bower-libs/require-css/normalize",
prism: "bower-libs/prism/prism",
"prism-core": "bower-libs/prism/components/prism-core",
MutationObservers: "bower-libs/MutationObservers/MutationObserver",
WeakMap: "bower-libs/WeakMap/weakmap",
rangy: "bower-libs/rangy/rangy-core",
"rangy-cssclassapplier": "bower-libs/rangy/rangy-cssclassapplier",
diff_match_patch: "bower-libs/google-diff-match-patch-js/diff_match_patch",
diff_match_patch_uncompressed: "bower-libs/google-diff-match-patch-js/diff_match_patch_uncompressed",
jsondiffpatch: "bower-libs/jsondiffpatch/build/bundle",
hammerjs: "bower-libs/hammerjs/hammer",
Diagram: "bower-libs/js-sequence-diagrams/src/sequence-diagram",
"diagram-grammar": "bower-libs/js-sequence-diagrams/build/diagram-grammar",
raphael: "bower-libs/raphael/raphael",
"flow-chart": "bower-libs/flowchart/release/flowchart.amd-1.3.4.min",
flowchart: "bower-libs/flowchart/release/flowchart-1.3.4.min",
monetizejs: "bower-libs/monetizejs/src/monetize",
"to-markdown": "bower-libs/to-markdown/src/to-markdown",
waitForImages: "bower-libs/waitForImages/dist/jquery.waitforimages",
MathJax: "bower-libs/MathJax/MathJax",
alertify: "bower-libs/alertify.js/lib/alertify"
},
shim: {
underscore: {
exports: "_"
},
mathjax: [ "libs/mathjax_init" ],
jgrowl: {
deps: [ "jquery" ],
exports: "jQuery.jGrowl"
},
diff_match_patch_uncompressed: {
exports: "diff_match_patch"
},
jsondiffpatch: [ "diff_match_patch_uncompressed" ],
rangy: {
exports: "rangy"
},
"rangy-cssclassapplier": [ "rangy" ],
mousetrap: {
exports: "Mousetrap"
},
"yaml-js": {
exports: "YAML"
},
"prism-core": {
exports: "Prism"
},
"bower-libs/prism/components/prism-markup": [ "prism-core" ],
"libs/prism-latex": [ "prism-core" ],
"libs/prism-markdown": [ "bower-libs/prism/components/prism-markup", "libs/prism-latex" ],
"bootstrap-record": [ "mousetrap" ],
toMarkdown: {
deps: [ "jquery" ],
exports: "toMarkdown"
},
stacktrace: {
exports: "printStackTrace"
},
FileSaver: {
exports: "saveAs"
},
MutationObservers: [ "WeakMap" ],
highlightjs: {
exports: "hljs"
},
"bootstrap-tour": {
deps: [ "bootstrap" ],
exports: "Tour"
},
bootstrap: [ "jquery" ],
"jquery-waitforimages": [ "jquery" ],
pagedown: [ "libs/Markdown.Converter" ],
pagedownExtra: [ "libs/Markdown.Converter" ],
"flow-chart": [ "raphael" ],
"diagram-grammar": [ "underscore" ],
Diagram: [ "raphael", "diagram-grammar" ]
}
});
try {
var test = "seLocalStorageCheck";
localStorage.setItem(test, test), localStorage.removeItem(test);
var obj = {};
Object.defineProperty(obj, "prop", {
get: function() {},
set: function() {}
});
} catch (t) {
throw alert("Your browser is not supported, sorry!"), t;
}
window.viewerMode = /(^| )viewer($| )/.test(document.body.className), window.theme = localStorage.themeV4 || "default";
var themeModule = "less!themes/" + window.theme;
-1 !== window.baseDir.indexOf("-min") && (themeModule = "css!themes/" + window.theme),
require([ "jquery", "rangy", "core", "eventMgr", "synchronizer", "publisher", "sharing", "mediaImporter", "css", "rangy-cssclassapplier", themeModule ], function(e, t, n, i) {
window.noStart || e(function() {
t.init(), n.onReady(), window.applicationCache && window.applicationCache.addEventListener("updateready", function() {
window.applicationCache.status === window.applicationCache.UPDATEREADY && (window.applicationCache.swapCache(),
i.onMessage("New version available!\nJust refresh the page to upgrade."));
}, !1);
});
}), define("main", function() {});