Stackedit/public/res-min/main.js
Benoit Schweblin 7c59056421 Prepare release
2018-01-07 16:26:10 +00:00

28583 lines
1.3 MiB

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(t, e) {
function n(t) {
var e = t.length, n = rt.type(t);
return !rt.isWindow(t) && (!(1 !== t.nodeType || !e) || "array" === n || "function" !== n && (0 === e || "number" == typeof e && e > 0 && e - 1 in t));
}
function i(t) {
var e = ht[t] = {};
return rt.each(t.match(at) || [], function(t, n) {
e[n] = !0;
}), e;
}
function r() {
Object.defineProperty(this.cache = {}, 0, {
get: function() {
return {};
}
}), this.expando = rt.expando + Math.random();
}
function o(t, n, i) {
var r;
if (i === e && 1 === t.nodeType) if (r = "data-" + n.replace(vt, "-$1").toLowerCase(),
"string" == typeof (i = t.getAttribute(r))) {
try {
i = "true" === i || "false" !== i && ("null" === i ? null : +i + "" === i ? +i : gt.test(i) ? JSON.parse(i) : i);
} catch (t) {}
ft.set(t, n, i);
} else i = e;
return i;
}
function a() {
return !0;
}
function s() {
return !1;
}
function l() {
try {
return z.activeElement;
} catch (t) {}
}
function c(t, e) {
for (;(t = t[e]) && 1 !== t.nodeType; ) ;
return t;
}
function u(t, e, n) {
if (rt.isFunction(e)) return rt.grep(t, function(t, i) {
return !!e.call(t, i, t) !== n;
});
if (e.nodeType) return rt.grep(t, function(t) {
return t === e !== n;
});
if ("string" == typeof e) {
if (Et.test(e)) return rt.filter(e, t, n);
e = rt.filter(e, t);
}
return rt.grep(t, function(t) {
return tt.call(e, t) >= 0 !== n;
});
}
function d(t, e) {
return rt.nodeName(t, "table") && rt.nodeName(1 === e.nodeType ? e : e.firstChild, "tr") ? t.getElementsByTagName("tbody")[0] || t.appendChild(t.ownerDocument.createElement("tbody")) : t;
}
function p(t) {
return t.type = (null !== t.getAttribute("type")) + "/" + t.type, t;
}
function h(t) {
var e = Ft.exec(t.type);
return e ? t.type = e[1] : t.removeAttribute("type"), t;
}
function f(t, e) {
for (var n = t.length, i = 0; i < n; i++) mt.set(t[i], "globalEval", !e || mt.get(e[i], "globalEval"));
}
function m(t, e) {
var n, i, r, o, a, s, l, c;
if (1 === e.nodeType) {
if (mt.hasData(t) && (o = mt.access(t), a = mt.set(e, o), c = o.events)) {
delete a.handle, a.events = {};
for (r in c) for (n = 0, i = c[r].length; n < i; n++) rt.event.add(e, r, c[r][n]);
}
ft.hasData(t) && (s = ft.access(t), l = rt.extend({}, s), ft.set(e, l));
}
}
function g(t, n) {
var i = t.getElementsByTagName ? t.getElementsByTagName(n || "*") : t.querySelectorAll ? t.querySelectorAll(n || "*") : [];
return n === e || n && rt.nodeName(t, n) ? rt.merge([ t ], i) : i;
}
function v(t, e) {
var n = e.nodeName.toLowerCase();
"input" === n && Rt.test(t.type) ? e.checked = t.checked : "input" !== n && "textarea" !== n || (e.defaultValue = t.defaultValue);
}
function b(t, e) {
if (e in t) return e;
for (var n = e.charAt(0).toUpperCase() + e.slice(1), i = e, r = Kt.length; r--; ) if ((e = Kt[r] + n) in t) return e;
return i;
}
function y(t, e) {
return t = e || t, "none" === rt.css(t, "display") || !rt.contains(t.ownerDocument, t);
}
function x(e) {
return t.getComputedStyle(e, null);
}
function w(t, e) {
for (var n, i, r, o = [], a = 0, s = t.length; a < s; a++) i = t[a], i.style && (o[a] = mt.get(i, "olddisplay"),
n = i.style.display, e ? (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; a < s; a++) i = t[a], i.style && (e && "none" !== i.style.display && "" !== i.style.display || (i.style.display = e ? o[a] || "" : "none"));
return t;
}
function S(t, e, n) {
var i = Ut.exec(e);
return i ? Math.max(0, i[1] - (n || 0)) + (i[2] || "px") : e;
}
function C(t, e, n, i, r) {
for (var o = n === (i ? "border" : "content") ? 4 : "width" === e ? 1 : 0, a = 0; o < 4; o += 2) "margin" === n && (a += rt.css(t, n + Yt[o], !0, r)),
i ? ("content" === n && (a -= rt.css(t, "padding" + Yt[o], !0, r)), "margin" !== n && (a -= rt.css(t, "border" + Yt[o] + "Width", !0, r))) : (a += rt.css(t, "padding" + Yt[o], !0, r),
"padding" !== n && (a += rt.css(t, "border" + Yt[o] + "Width", !0, r)));
return a;
}
function _(t, e, n) {
var i = !0, r = "width" === e ? t.offsetWidth : t.offsetHeight, o = x(t), a = rt.support.boxSizing && "border-box" === rt.css(t, "boxSizing", !1, o);
if (r <= 0 || null == r) {
if (r = $t(t, e, o), (r < 0 || null == r) && (r = t.style[e]), zt.test(r)) return r;
i = a && (rt.support.boxSizingReliable || r === t.style[e]), r = parseFloat(r) || 0;
}
return r + C(t, e, n || (a ? "border" : "content"), i, o) + "px";
}
function k(t) {
var e = z, n = Wt[t];
return n || (n = E(t, e), "none" !== n && n || (qt = (qt || rt("<iframe frameborder='0' width='0' height='0'/>").css("cssText", "display:block !important")).appendTo(e.documentElement),
e = (qt[0].contentWindow || qt[0].contentDocument).document, e.write("<!doctype html><html><body>"),
e.close(), n = E(t, e), qt.detach()), Wt[t] = n), n;
}
function E(t, e) {
var n = rt(e.createElement(t)).appendTo(e.body), i = rt.css(n[0], "display");
return n.remove(), i;
}
function T(t, e, n, i) {
var r;
if (rt.isArray(e)) rt.each(e, function(e, r) {
n || Zt.test(t) ? i(t, r) : T(t + "[" + ("object" == typeof r ? e : "") + "]", r, n, i);
}); else if (n || "object" !== rt.type(e)) i(t, e); else for (r in e) T(t + "[" + r + "]", e[r], n, i);
}
function I(t) {
return function(e, n) {
"string" != typeof e && (n = e, e = "*");
var i, r = 0, o = e.toLowerCase().match(at) || [];
if (rt.isFunction(n)) for (;i = o[r++]; ) "+" === i[0] ? (i = i.slice(1) || "*",
(t[i] = t[i] || []).unshift(n)) : (t[i] = t[i] || []).push(n);
};
}
function D(t, e, n, i) {
function r(s) {
var l;
return o[s] = !0, rt.each(t[s] || [], function(t, s) {
var c = s(e, n, i);
return "string" != typeof c || a || o[c] ? a ? !(l = c) : void 0 : (e.dataTypes.unshift(c),
r(c), !1);
}), l;
}
var o = {}, a = t === ge;
return r(e.dataTypes[0]) || !o["*"] && r("*");
}
function N(t, n) {
var i, r, o = rt.ajaxSettings.flatOptions || {};
for (i in n) n[i] !== e && ((o[i] ? t : r || (r = {}))[i] = n[i]);
return r && rt.extend(!0, t, r), t;
}
function M(t, n, i) {
for (var r, o, a, s, l = t.contents, c = t.dataTypes; "*" === c[0]; ) c.shift(),
r === e && (r = t.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] || t.converters[o + " " + c[0]]) {
a = o;
break;
}
s || (s = o);
}
a = a || s;
}
if (a) return a !== c[0] && c.unshift(a), i[a];
}
function L(t, e, n, i) {
var r, o, a, s, l, c = {}, u = t.dataTypes.slice();
if (u[1]) for (a in t.converters) c[a.toLowerCase()] = t.converters[a];
for (o = u.shift(); o; ) if (t.responseFields[o] && (n[t.responseFields[o]] = e),
!l && i && t.dataFilter && (e = t.dataFilter(e, t.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 && t["throws"]) e = a(e); else try {
e = a(e);
} catch (t) {
return {
state: "parsererror",
error: a ? t : "No conversion from " + l + " to " + o
};
}
}
return {
state: "success",
data: e
};
}
function A() {
return setTimeout(function() {
_e = e;
}), _e = rt.now();
}
function R(t, e, n) {
for (var i, r = (Ne[e] || []).concat(Ne["*"]), o = 0, a = r.length; o < a; o++) if (i = r[o].call(n, e, t)) return i;
}
function P(t, e, n) {
var i, r, o = 0, a = De.length, s = rt.Deferred().always(function() {
delete l.elem;
}), l = function() {
if (r) return !1;
for (var e = _e || A(), n = Math.max(0, c.startTime + c.duration - e), i = n / c.duration || 0, o = 1 - i, a = 0, l = c.tweens.length; a < l; a++) c.tweens[a].run(o);
return s.notifyWith(t, [ c, o, n ]), o < 1 && l ? n : (s.resolveWith(t, [ c ]),
!1);
}, c = s.promise({
elem: t,
props: rt.extend({}, e),
opts: rt.extend(!0, {
specialEasing: {}
}, n),
originalProperties: e,
originalOptions: n,
startTime: _e || A(),
duration: n.duration,
tweens: [],
createTween: function(e, n) {
var i = rt.Tween(t, c.opts, e, n, c.opts.specialEasing[e] || c.opts.easing);
return c.tweens.push(i), i;
},
stop: function(e) {
var n = 0, i = e ? c.tweens.length : 0;
if (r) return this;
for (r = !0; n < i; n++) c.tweens[n].run(1);
return e ? s.resolveWith(t, [ c, e ]) : s.rejectWith(t, [ c, e ]), this;
}
}), u = c.props;
for (O(u, c.opts.specialEasing); o < a; o++) if (i = De[o].call(c, t, u, c.opts)) return i;
return rt.map(u, R, c), rt.isFunction(c.opts.start) && c.opts.start.call(t, c),
rt.fx.timer(rt.extend(l, {
elem: t,
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(t, e) {
var n, i, r, o, a;
for (n in t) if (i = rt.camelCase(n), r = e[i], o = t[n], rt.isArray(o) && (r = o[1],
o = t[n] = o[0]), n !== i && (t[i] = o, delete t[n]), (a = rt.cssHooks[i]) && "expand" in a) {
o = a.expand(o), delete t[i];
for (n in o) n in t || (t[n] = o[n], e[n] = r);
} else e[i] = r;
}
function F(t, n, i) {
var r, o, a, s, l, c, u = this, d = {}, p = t.style, h = t.nodeType && y(t), f = mt.get(t, "fxshow");
i.queue || (l = rt._queueHooks(t, "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(t, "fx").length || l.empty.fire();
});
})), 1 === t.nodeType && ("height" in n || "width" in n) && (i.overflow = [ p.overflow, p.overflowX, p.overflowY ],
"inline" === rt.css(t, "display") && "none" === rt.css(t, "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], Ee.exec(o)) {
if (delete n[r], a = a || "toggle" === o, o === (h ? "hide" : "show")) {
if ("show" !== o || !f || f[r] === e) continue;
h = !0;
}
d[r] = f && f[r] || rt.style(t, r);
}
if (!rt.isEmptyObject(d)) {
f ? "hidden" in f && (h = f.hidden) : f = mt.access(t, "fxshow", {}), a && (f.hidden = !h),
h ? rt(t).show() : u.done(function() {
rt(t).hide();
}), u.done(function() {
var e;
mt.remove(t, "fxshow");
for (e in d) rt.style(t, e, d[e]);
});
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(t, e, n, i, r) {
return new B.prototype.init(t, e, n, i, r);
}
function j(t, e) {
var n, i = {
height: t
}, r = 0;
for (e = e ? 1 : 0; r < 4; r += 2 - e) n = Yt[r], i["margin" + n] = i["padding" + n] = t;
return e && (i.opacity = i.width = t), i;
}
function $(t) {
return rt.isWindow(t) ? t : 9 === t.nodeType && t.defaultView;
}
var q, G, H = typeof e, U = t.location, z = t.document, V = z.documentElement, W = t.jQuery, X = t.$, Q = {}, Y = [], K = Y.concat, J = Y.push, Z = Y.slice, tt = Y.indexOf, et = Q.toString, nt = Q.hasOwnProperty, it = "2.0.3".trim, rt = function(t, e) {
return new rt.fn.init(t, e, q);
}, 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(t, e) {
return e.toUpperCase();
}, pt = function() {
z.removeEventListener("DOMContentLoaded", pt, !1), t.removeEventListener("load", pt, !1),
rt.ready();
};
rt.fn = rt.prototype = {
jquery: "2.0.3",
constructor: rt,
init: function(t, n, i) {
var r, o;
if (!t) return this;
if ("string" == typeof t) {
if (!(r = "<" === t.charAt(0) && ">" === t.charAt(t.length - 1) && t.length >= 3 ? [ null, t, null ] : st.exec(t)) || !r[1] && n) return !n || n.jquery ? (n || i).find(t) : this.constructor(n).find(t);
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 = t, this;
}
return t.nodeType ? (this.context = this[0] = t, this.length = 1, this) : rt.isFunction(t) ? i.ready(t) : (t.selector !== e && (this.selector = t.selector,
this.context = t.context), rt.makeArray(t, this));
},
selector: "",
length: 0,
toArray: function() {
return Z.call(this);
},
get: function(t) {
return null == t ? this.toArray() : t < 0 ? this[this.length + t] : this[t];
},
pushStack: function(t) {
var e = rt.merge(this.constructor(), t);
return e.prevObject = this, e.context = this.context, e;
},
each: function(t, e) {
return rt.each(this, t, e);
},
ready: function(t) {
return rt.ready.promise().done(t), this;
},
slice: function() {
return this.pushStack(Z.apply(this, arguments));
},
first: function() {
return this.eq(0);
},
last: function() {
return this.eq(-1);
},
eq: function(t) {
var e = this.length, n = +t + (t < 0 ? e : 0);
return this.pushStack(n >= 0 && n < e ? [ this[n] ] : []);
},
map: function(t) {
return this.pushStack(rt.map(this, function(e, n) {
return t.call(e, n, e);
}));
},
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 t, 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); l < c; l++) if (null != (t = arguments[l])) for (n in t) i = s[n],
r = t[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 !== e && (s[n] = r));
return s;
}, rt.extend({
expando: "jQuery" + ("2.0.3" + Math.random()).replace(/\D/g, ""),
noConflict: function(e) {
return t.$ === rt && (t.$ = X), e && t.jQuery === rt && (t.jQuery = W), rt;
},
isReady: !1,
readyWait: 1,
holdReady: function(t) {
t ? rt.readyWait++ : rt.ready(!0);
},
ready: function(t) {
(!0 === t ? --rt.readyWait : rt.isReady) || (rt.isReady = !0, !0 !== t && --rt.readyWait > 0 || (G.resolveWith(z, [ rt ]),
rt.fn.trigger && rt(z).trigger("ready").off("ready")));
},
isFunction: function(t) {
return "function" === rt.type(t);
},
isArray: Array.isArray,
isWindow: function(t) {
return null != t && t === t.window;
},
isNumeric: function(t) {
return !isNaN(parseFloat(t)) && isFinite(t);
},
type: function(t) {
return null == t ? String(t) : "object" == typeof t || "function" == typeof t ? Q[et.call(t)] || "object" : typeof t;
},
isPlainObject: function(t) {
if ("object" !== rt.type(t) || t.nodeType || rt.isWindow(t)) return !1;
try {
if (t.constructor && !nt.call(t.constructor.prototype, "isPrototypeOf")) return !1;
} catch (t) {
return !1;
}
return !0;
},
isEmptyObject: function(t) {
var e;
for (e in t) return !1;
return !0;
},
error: function(t) {
throw new Error(t);
},
parseHTML: function(t, e, n) {
if (!t || "string" != typeof t) return null;
"boolean" == typeof e && (n = e, e = !1), e = e || z;
var i = lt.exec(t), r = !n && [];
return i ? [ e.createElement(i[1]) ] : (i = rt.buildFragment([ t ], e, r), r && rt(r).remove(),
rt.merge([], i.childNodes));
},
parseJSON: JSON.parse,
parseXML: function(t) {
var n, i;
if (!t || "string" != typeof t) return null;
try {
i = new DOMParser(), n = i.parseFromString(t, "text/xml");
} catch (t) {
n = e;
}
return n && !n.getElementsByTagName("parsererror").length || rt.error("Invalid XML: " + t),
n;
},
noop: function() {},
globalEval: function(t) {
var e, n = eval;
(t = rt.trim(t)) && (1 === t.indexOf("use strict") ? (e = z.createElement("script"),
e.text = t, z.head.appendChild(e).parentNode.removeChild(e)) : n(t));
},
camelCase: function(t) {
return t.replace(ct, "ms-").replace(ut, dt);
},
nodeName: function(t, e) {
return t.nodeName && t.nodeName.toLowerCase() === e.toLowerCase();
},
each: function(t, e, i) {
var r = 0, o = t.length, a = n(t);
if (i) {
if (a) for (;r < o && !1 !== e.apply(t[r], i); r++) ; else for (r in t) if (!1 === e.apply(t[r], i)) break;
} else if (a) for (;r < o && !1 !== e.call(t[r], r, t[r]); r++) ; else for (r in t) if (!1 === e.call(t[r], r, t[r])) break;
return t;
},
trim: function(t) {
return null == t ? "" : it.call(t);
},
makeArray: function(t, e) {
var i = e || [];
return null != t && (n(Object(t)) ? rt.merge(i, "string" == typeof t ? [ t ] : t) : J.call(i, t)),
i;
},
inArray: function(t, e, n) {
return null == e ? -1 : tt.call(e, t, n);
},
merge: function(t, n) {
var i = n.length, r = t.length, o = 0;
if ("number" == typeof i) for (;o < i; o++) t[r++] = n[o]; else for (;n[o] !== e; ) t[r++] = n[o++];
return t.length = r, t;
},
grep: function(t, e, n) {
var i, r = [], o = 0, a = t.length;
for (n = !!n; o < a; o++) i = !!e(t[o], o), n !== i && r.push(t[o]);
return r;
},
map: function(t, e, i) {
var r, o = 0, a = t.length, s = n(t), l = [];
if (s) for (;o < a; o++) null != (r = e(t[o], o, i)) && (l[l.length] = r); else for (o in t) null != (r = e(t[o], o, i)) && (l[l.length] = r);
return K.apply([], l);
},
guid: 1,
proxy: function(t, n) {
var i, r, o;
return "string" == typeof n && (i = t[n], n = t, t = i), rt.isFunction(t) ? (r = Z.call(arguments, 2),
o = function() {
return t.apply(n || this, r.concat(Z.call(arguments)));
}, o.guid = t.guid = t.guid || rt.guid++, o) : e;
},
access: function(t, n, i, r, o, a, s) {
var l = 0, c = t.length, u = null == i;
if ("object" === rt.type(i)) {
o = !0;
for (l in i) rt.access(t, n, l, i[l], !0, a, s);
} else if (r !== e && (o = !0, rt.isFunction(r) || (s = !0), u && (s ? (n.call(t, r),
n = null) : (u = n, n = function(t, e, n) {
return u.call(rt(t), n);
})), n)) for (;l < c; l++) n(t[l], i, s ? r : r.call(t[l], l, n(t[l], i)));
return o ? t : u ? n.call(t) : c ? n(t[0], i) : a;
},
now: Date.now,
swap: function(t, e, n, i) {
var r, o, a = {};
for (o in e) a[o] = t.style[o], t.style[o] = e[o];
r = n.apply(t, i || []);
for (o in e) t.style[o] = a[o];
return r;
}
}), rt.ready.promise = function(e) {
return G || (G = rt.Deferred(), "complete" === z.readyState ? setTimeout(rt.ready) : (z.addEventListener("DOMContentLoaded", pt, !1),
t.addEventListener("load", pt, !1))), G.promise(e);
}, rt.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(t, e) {
Q["[object " + e + "]"] = e.toLowerCase();
}), q = rt(z), function(t, e) {
function n(t, e, n, i) {
var r, o, a, s, l, c, p, h, f, m;
if ((e ? e.ownerDocument || e : B) !== N && D(e), e = e || N, n = n || [], !t || "string" != typeof t) return n;
if (1 !== (s = e.nodeType) && 9 !== s) return [];
if (L && !i) {
if (r = gt.exec(t)) if (a = r[1]) {
if (9 === s) {
if (!(o = e.getElementById(a)) || !o.parentNode) return n;
if (o.id === a) return n.push(o), n;
} else if (e.ownerDocument && (o = e.ownerDocument.getElementById(a)) && O(e, o) && o.id === a) return n.push(o),
n;
} else {
if (r[2]) return K.apply(n, e.getElementsByTagName(t)), n;
if ((a = r[3]) && w.getElementsByClassName && e.getElementsByClassName) return K.apply(n, e.getElementsByClassName(a)),
n;
}
if (w.qsa && (!A || !A.test(t))) {
if (h = p = F, f = e, m = 9 === s && t, 1 === s && "object" !== e.nodeName.toLowerCase()) {
for (c = u(t), (p = e.getAttribute("id")) ? h = p.replace(yt, "\\$&") : e.setAttribute("id", h),
h = "[id='" + h + "'] ", l = c.length; l--; ) c[l] = h + d(c[l]);
f = ut.test(t) && e.parentNode || e, m = c.join(",");
}
if (m) try {
return K.apply(n, f.querySelectorAll(m)), n;
} catch (t) {} finally {
p || e.removeAttribute("id");
}
}
}
return y(t.replace(st, "$1"), e, n, i);
}
function i() {
function t(n, i) {
return e.push(n += " ") > C.cacheLength && delete t[e.shift()], t[n] = i;
}
var e = [];
return t;
}
function r(t) {
return t[F] = !0, t;
}
function o(t) {
var e = N.createElement("div");
try {
return !!t(e);
} catch (t) {
return !1;
} finally {
e.parentNode && e.parentNode.removeChild(e), e = null;
}
}
function a(t, e) {
for (var n = t.split("|"), i = t.length; i--; ) C.attrHandle[n[i]] = e;
}
function s(t, e) {
var n = e && t, i = n && 1 === t.nodeType && 1 === e.nodeType && (~e.sourceIndex || V) - (~t.sourceIndex || V);
if (i) return i;
if (n) for (;n = n.nextSibling; ) if (n === e) return -1;
return t ? 1 : -1;
}
function l(t) {
return r(function(e) {
return e = +e, r(function(n, i) {
for (var r, o = t([], n.length, e), a = o.length; a--; ) n[r = o[a]] && (n[r] = !(i[r] = n[r]));
});
});
}
function c() {}
function u(t, e) {
var i, r, o, a, s, l, c, u = G[t + " "];
if (u) return e ? 0 : u.slice(0);
for (s = t, l = [], c = C.preFilter; s; ) {
i && !(r = lt.exec(s)) || (r && (s = s.slice(r[0].length) || s), l.push(o = [])),
i = !1, (r = ct.exec(s)) && (i = r.shift(), o.push({
value: i,
type: r[0].replace(st, " ")
}), s = s.slice(i.length));
for (a in C.filter) !(r = ft[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 e ? s.length : s ? n.error(t) : G(t, l).slice(0);
}
function d(t) {
for (var e = 0, n = t.length, i = ""; e < n; e++) i += t[e].value;
return i;
}
function p(t, e, n) {
var i = e.dir, r = n && "parentNode" === i, o = $++;
return e.first ? function(e, n, o) {
for (;e = e[i]; ) if (1 === e.nodeType || r) return t(e, n, o);
} : function(e, n, a) {
var s, l, c, u = j + " " + o;
if (a) {
for (;e = e[i]; ) if ((1 === e.nodeType || r) && t(e, n, a)) return !0;
} else for (;e = e[i]; ) if (1 === e.nodeType || r) if (c = e[F] || (e[F] = {}),
(l = c[i]) && l[0] === u) {
if (!0 === (s = l[1]) || s === S) return !0 === s;
} else if (l = c[i] = [ u ], l[1] = t(e, n, a) || S, !0 === l[1]) return !0;
};
}
function h(t) {
return t.length > 1 ? function(e, n, i) {
for (var r = t.length; r--; ) if (!t[r](e, n, i)) return !1;
return !0;
} : t[0];
}
function f(t, e, n, i, r) {
for (var o, a = [], s = 0, l = t.length, c = null != e; s < l; s++) (o = t[s]) && (n && !n(o, i, r) || (a.push(o),
c && e.push(s)));
return a;
}
function m(t, e, n, i, o, a) {
return i && !i[F] && (i = m(i)), o && !o[F] && (o = m(o, a)), r(function(r, a, s, l) {
var c, u, d, p = [], h = [], m = a.length, g = r || b(e || "*", s.nodeType ? [ s ] : s, []), v = !t || !r && e ? g : f(g, p, t, s, l), y = n ? o || (r ? t : m || i) ? [] : a : v;
if (n && n(v, y, s, l), i) for (c = f(y, h), i(c, [], s, l), u = c.length; u--; ) (d = c[u]) && (y[h[u]] = !(v[h[u]] = d));
if (r) {
if (o || t) {
if (o) {
for (c = [], u = y.length; u--; ) (d = y[u]) && c.push(v[u] = d);
o(null, y = [], c, l);
}
for (u = y.length; u--; ) (d = y[u]) && (c = o ? Z.call(r, d) : p[u]) > -1 && (r[c] = !(a[c] = d));
}
} else y = f(y === a ? y.splice(m, y.length) : y), o ? o(null, a, y, l) : K.apply(a, y);
});
}
function g(t) {
for (var e, n, i, r = t.length, o = C.relative[t[0].type], a = o || C.relative[" "], s = o ? 1 : 0, l = p(function(t) {
return t === e;
}, a, !0), c = p(function(t) {
return Z.call(e, t) > -1;
}, a, !0), u = [ function(t, n, i) {
return !o && (i || n !== T) || ((e = n).nodeType ? l(t, n, i) : c(t, n, i));
} ]; s < r; s++) if (n = C.relative[t[s].type]) u = [ p(h(u), n) ]; else {
if (n = C.filter[t[s].type].apply(null, t[s].matches), n[F]) {
for (i = ++s; i < r && !C.relative[t[i].type]; i++) ;
return m(s > 1 && h(u), s > 1 && d(t.slice(0, s - 1).concat({
value: " " === t[s - 2].type ? "*" : ""
})).replace(st, "$1"), n, s < i && g(t.slice(s, i)), i < r && g(t = t.slice(i)), i < r && d(t));
}
u.push(n);
}
return h(u);
}
function v(t, e) {
var i = 0, o = e.length > 0, a = t.length > 0, s = function(r, s, l, c, u) {
var d, p, h, m = [], g = 0, v = "0", b = r && [], y = null != u, x = T, w = r || a && C.find.TAG("*", u && s.parentNode || s), _ = j += null == x ? 1 : Math.random() || .1;
for (y && (T = s !== N && s, S = i); null != (d = w[v]); v++) {
if (a && d) {
for (p = 0; h = t[p++]; ) if (h(d, s, l)) {
c.push(d);
break;
}
y && (j = _, S = ++i);
}
o && ((d = !h && d) && g--, r && b.push(d));
}
if (g += v, o && v !== g) {
for (p = 0; h = e[p++]; ) h(b, m, s, l);
if (r) {
if (g > 0) for (;v--; ) b[v] || m[v] || (m[v] = Q.call(c));
m = f(m);
}
K.apply(c, m), y && !r && m.length > 0 && g + e.length > 1 && n.uniqueSort(c);
}
return y && (j = _, T = x), b;
};
return o ? r(s) : s;
}
function b(t, e, i) {
for (var r = 0, o = e.length; r < o; r++) n(t, e[r], i);
return i;
}
function y(t, e, n, i) {
var r, o, a, s, l, c = u(t);
if (!i && 1 === c.length) {
if (o = c[0] = c[0].slice(0), o.length > 2 && "ID" === (a = o[0]).type && w.getById && 9 === e.nodeType && L && C.relative[o[1].type]) {
if (!(e = (C.find.ID(a.matches[0].replace(xt, wt), e) || [])[0])) return n;
t = t.slice(o.shift().value.length);
}
for (r = ft.needsContext.test(t) ? 0 : o.length; r-- && (a = o[r], !C.relative[s = a.type]); ) if ((l = C.find[s]) && (i = l(a.matches[0].replace(xt, wt), ut.test(o[0].type) && e.parentNode || e))) {
if (o.splice(r, 1), !(t = i.length && d(o))) return K.apply(n, i), n;
break;
}
}
return E(t, c)(i, e, !L, n, ut.test(t)), n;
}
var x, w, S, C, _, k, E, T, I, D, N, M, L, A, R, P, O, F = "sizzle" + -new Date(), B = t.document, j = 0, $ = 0, q = i(), G = i(), H = i(), U = !1, z = function(t, e) {
return t === e ? (U = !0, 0) : 0;
}, V = 1 << 31, W = {}.hasOwnProperty, X = [], Q = X.pop, Y = X.push, K = X.push, J = X.slice, Z = X.indexOf || function(t) {
for (var e = 0, n = this.length; e < n; e++) if (this[e] === t) return e;
return -1;
}, tt = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped", et = "[\\x20\\t\\r\\n\\f]", nt = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+", it = nt.replace("w", "w#"), ot = "\\[" + et + "*(" + nt + ")" + et + "*(?:([*^$|!~]?=)" + et + "*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|(" + it + ")|)|)" + et + "*\\]", at = ":(" + nt + ")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|" + ot.replace(3, 8) + ")*)|.*)\\)|)", st = new RegExp("^" + et + "+|((?:^|[^\\\\])(?:\\\\.)*)" + et + "+$", "g"), lt = new RegExp("^" + et + "*," + et + "*"), ct = new RegExp("^" + et + "*([>+~]|" + et + ")" + et + "*"), ut = new RegExp(et + "*[+~]"), dt = new RegExp("=" + et + "*([^\\]'\"]*)" + et + "*\\]", "g"), pt = new RegExp(at), ht = new RegExp("^" + it + "$"), ft = {
ID: new RegExp("^#(" + nt + ")"),
CLASS: new RegExp("^\\.(" + nt + ")"),
TAG: new RegExp("^(" + nt.replace("w", "w*") + ")"),
ATTR: new RegExp("^" + ot),
PSEUDO: new RegExp("^" + at),
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("^(?:" + tt + ")$", "i"),
needsContext: new RegExp("^" + et + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + et + "*((?:-\\d)?\\d*)" + et + "*\\)|)(?=[^-]|$)", "i")
}, mt = /^[^{]+\{\s*\[native \w/, gt = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, vt = /^(?:input|select|textarea|button)$/i, bt = /^h\d$/i, yt = /'|\\/g, xt = new RegExp("\\\\([\\da-f]{1,6}" + et + "?|(" + et + ")|.)", "ig"), wt = function(t, e, n) {
var i = "0x" + e - 65536;
return i !== i || n ? e : i < 0 ? String.fromCharCode(i + 65536) : String.fromCharCode(i >> 10 | 55296, 1023 & i | 56320);
};
try {
K.apply(X = J.call(B.childNodes), B.childNodes), X[B.childNodes.length].nodeType;
} catch (t) {
K = {
apply: X.length ? function(t, e) {
Y.apply(t, J.call(e));
} : function(t, e) {
for (var n = t.length, i = 0; t[n++] = e[i++]; ) ;
t.length = n - 1;
}
};
}
k = n.isXML = function(t) {
var e = t && (t.ownerDocument || t).documentElement;
return !!e && "HTML" !== e.nodeName;
}, w = n.support = {}, D = n.setDocument = function(t) {
var e = t ? t.ownerDocument || t : B, n = e.defaultView;
return e !== N && 9 === e.nodeType && e.documentElement ? (N = e, M = e.documentElement,
L = !k(e), n && n.attachEvent && n !== n.top && n.attachEvent("onbeforeunload", function() {
D();
}), w.attributes = o(function(t) {
return t.className = "i", !t.getAttribute("className");
}), w.getElementsByTagName = o(function(t) {
return t.appendChild(e.createComment("")), !t.getElementsByTagName("*").length;
}), w.getElementsByClassName = o(function(t) {
return t.innerHTML = "<div class='a'></div><div class='a i'></div>", t.firstChild.className = "i",
2 === t.getElementsByClassName("i").length;
}), w.getById = o(function(t) {
return M.appendChild(t).id = F, !e.getElementsByName || !e.getElementsByName(F).length;
}), w.getById ? (C.find.ID = function(t, e) {
if (void 0 !== e.getElementById && L) {
var n = e.getElementById(t);
return n && n.parentNode ? [ n ] : [];
}
}, C.filter.ID = function(t) {
var e = t.replace(xt, wt);
return function(t) {
return t.getAttribute("id") === e;
};
}) : (delete C.find.ID, C.filter.ID = function(t) {
var e = t.replace(xt, wt);
return function(t) {
var n = void 0 !== t.getAttributeNode && t.getAttributeNode("id");
return n && n.value === e;
};
}), C.find.TAG = w.getElementsByTagName ? function(t, e) {
if (void 0 !== e.getElementsByTagName) return e.getElementsByTagName(t);
} : function(t, e) {
var n, i = [], r = 0, o = e.getElementsByTagName(t);
if ("*" === t) {
for (;n = o[r++]; ) 1 === n.nodeType && i.push(n);
return i;
}
return o;
}, C.find.CLASS = w.getElementsByClassName && function(t, e) {
if (void 0 !== e.getElementsByClassName && L) return e.getElementsByClassName(t);
}, R = [], A = [], (w.qsa = mt.test(e.querySelectorAll)) && (o(function(t) {
t.innerHTML = "<select><option selected=''></option></select>", t.querySelectorAll("[selected]").length || A.push("\\[" + et + "*(?:value|" + tt + ")"),
t.querySelectorAll(":checked").length || A.push(":checked");
}), o(function(t) {
var n = e.createElement("input");
n.setAttribute("type", "hidden"), t.appendChild(n).setAttribute("t", ""), t.querySelectorAll("[t^='']").length && A.push("[*^$]=" + et + "*(?:''|\"\")"),
t.querySelectorAll(":enabled").length || A.push(":enabled", ":disabled"), t.querySelectorAll("*,:x"),
A.push(",.*:");
})), (w.matchesSelector = mt.test(P = M.webkitMatchesSelector || M.mozMatchesSelector || M.oMatchesSelector || M.msMatchesSelector)) && o(function(t) {
w.disconnectedMatch = P.call(t, "div"), P.call(t, "[s!='']:x"), R.push("!=", at);
}), A = A.length && new RegExp(A.join("|")), R = R.length && new RegExp(R.join("|")),
O = mt.test(M.contains) || M.compareDocumentPosition ? function(t, e) {
var n = 9 === t.nodeType ? t.documentElement : t, i = e && e.parentNode;
return t === i || !(!i || 1 !== i.nodeType || !(n.contains ? n.contains(i) : t.compareDocumentPosition && 16 & t.compareDocumentPosition(i)));
} : function(t, e) {
if (e) for (;e = e.parentNode; ) if (e === t) return !0;
return !1;
}, z = M.compareDocumentPosition ? function(t, n) {
if (t === n) return U = !0, 0;
var i = n.compareDocumentPosition && t.compareDocumentPosition && t.compareDocumentPosition(n);
return i ? 1 & i || !w.sortDetached && n.compareDocumentPosition(t) === i ? t === e || O(B, t) ? -1 : n === e || O(B, n) ? 1 : I ? Z.call(I, t) - Z.call(I, n) : 0 : 4 & i ? -1 : 1 : t.compareDocumentPosition ? -1 : 1;
} : function(t, n) {
var i, r = 0, o = t.parentNode, a = n.parentNode, l = [ t ], c = [ n ];
if (t === n) return U = !0, 0;
if (!o || !a) return t === e ? -1 : n === e ? 1 : o ? -1 : a ? 1 : I ? Z.call(I, t) - Z.call(I, n) : 0;
if (o === a) return s(t, n);
for (i = t; i = i.parentNode; ) l.unshift(i);
for (i = n; i = i.parentNode; ) c.unshift(i);
for (;l[r] === c[r]; ) r++;
return r ? s(l[r], c[r]) : l[r] === B ? -1 : c[r] === B ? 1 : 0;
}, e) : N;
}, n.matches = function(t, e) {
return n(t, null, null, e);
}, n.matchesSelector = function(t, e) {
if ((t.ownerDocument || t) !== N && D(t), e = e.replace(dt, "='$1']"), w.matchesSelector && L && (!R || !R.test(e)) && (!A || !A.test(e))) try {
var i = P.call(t, e);
if (i || w.disconnectedMatch || t.document && 11 !== t.document.nodeType) return i;
} catch (t) {}
return n(e, N, null, [ t ]).length > 0;
}, n.contains = function(t, e) {
return (t.ownerDocument || t) !== N && D(t), O(t, e);
}, n.attr = function(t, e) {
(t.ownerDocument || t) !== N && D(t);
var n = C.attrHandle[e.toLowerCase()], i = n && W.call(C.attrHandle, e.toLowerCase()) ? n(t, e, !L) : void 0;
return void 0 === i ? w.attributes || !L ? t.getAttribute(e) : (i = t.getAttributeNode(e)) && i.specified ? i.value : null : i;
}, n.error = function(t) {
throw new Error("Syntax error, unrecognized expression: " + t);
}, n.uniqueSort = function(t) {
var e, n = [], i = 0, r = 0;
if (U = !w.detectDuplicates, I = !w.sortStable && t.slice(0), t.sort(z), U) {
for (;e = t[r++]; ) e === t[r] && (i = n.push(r));
for (;i--; ) t.splice(n[i], 1);
}
return t;
}, _ = n.getText = function(t) {
var e, n = "", i = 0, r = t.nodeType;
if (r) {
if (1 === r || 9 === r || 11 === r) {
if ("string" == typeof t.textContent) return t.textContent;
for (t = t.firstChild; t; t = t.nextSibling) n += _(t);
} else if (3 === r || 4 === r) return t.nodeValue;
} else for (;e = t[i]; i++) n += _(e);
return n;
}, C = n.selectors = {
cacheLength: 50,
createPseudo: r,
match: ft,
attrHandle: {},
find: {},
relative: {
">": {
dir: "parentNode",
first: !0
},
" ": {
dir: "parentNode"
},
"+": {
dir: "previousSibling",
first: !0
},
"~": {
dir: "previousSibling"
}
},
preFilter: {
ATTR: function(t) {
return t[1] = t[1].replace(xt, wt), t[3] = (t[4] || t[5] || "").replace(xt, wt),
"~=" === t[2] && (t[3] = " " + t[3] + " "), t.slice(0, 4);
},
CHILD: function(t) {
return t[1] = t[1].toLowerCase(), "nth" === t[1].slice(0, 3) ? (t[3] || n.error(t[0]),
t[4] = +(t[4] ? t[5] + (t[6] || 1) : 2 * ("even" === t[3] || "odd" === t[3])), t[5] = +(t[7] + t[8] || "odd" === t[3])) : t[3] && n.error(t[0]),
t;
},
PSEUDO: function(t) {
var e, n = !t[5] && t[2];
return ft.CHILD.test(t[0]) ? null : (t[3] && void 0 !== t[4] ? t[2] = t[4] : n && pt.test(n) && (e = u(n, !0)) && (e = n.indexOf(")", n.length - e) - n.length) && (t[0] = t[0].slice(0, e),
t[2] = n.slice(0, e)), t.slice(0, 3));
}
},
filter: {
TAG: function(t) {
var e = t.replace(xt, wt).toLowerCase();
return "*" === t ? function() {
return !0;
} : function(t) {
return t.nodeName && t.nodeName.toLowerCase() === e;
};
},
CLASS: function(t) {
var e = q[t + " "];
return e || (e = new RegExp("(^|" + et + ")" + t + "(" + et + "|$)")) && q(t, function(t) {
return e.test("string" == typeof t.className && t.className || void 0 !== t.getAttribute && t.getAttribute("class") || "");
});
},
ATTR: function(t, e, i) {
return function(r) {
var o = n.attr(r, t);
return null == o ? "!=" === e : !e || (o += "", "=" === e ? o === i : "!=" === e ? o !== i : "^=" === e ? i && 0 === o.indexOf(i) : "*=" === e ? i && o.indexOf(i) > -1 : "$=" === e ? i && o.slice(-i.length) === i : "~=" === e ? (" " + o + " ").indexOf(i) > -1 : "|=" === e && (o === i || o.slice(0, i.length + 1) === i + "-"));
};
},
CHILD: function(t, e, n, i, r) {
var o = "nth" !== t.slice(0, 3), a = "last" !== t.slice(-4), s = "of-type" === e;
return 1 === i && 0 === r ? function(t) {
return !!t.parentNode;
} : function(e, n, l) {
var c, u, d, p, h, f, m = o !== a ? "nextSibling" : "previousSibling", g = e.parentNode, v = s && e.nodeName.toLowerCase(), b = !l && !s;
if (g) {
if (o) {
for (;m; ) {
for (d = e; d = d[m]; ) if (s ? d.nodeName.toLowerCase() === v : 1 === d.nodeType) return !1;
f = m = "only" === t && !f && "nextSibling";
}
return !0;
}
if (f = [ a ? g.firstChild : g.lastChild ], a && b) {
for (u = g[F] || (g[F] = {}), c = u[t] || [], h = c[0] === j && c[1], p = c[0] === j && c[2],
d = h && g.childNodes[h]; d = ++h && d && d[m] || (p = h = 0) || f.pop(); ) if (1 === d.nodeType && ++p && d === e) {
u[t] = [ j, h, p ];
break;
}
} else if (b && (c = (e[F] || (e[F] = {}))[t]) && c[0] === j) 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[F] || (d[F] = {}))[t] = [ j, p ]),
d !== e)); ) ;
return (p -= r) === i || p % i == 0 && p / i >= 0;
}
};
},
PSEUDO: function(t, e) {
var i, o = C.pseudos[t] || C.setFilters[t.toLowerCase()] || n.error("unsupported pseudo: " + t);
return o[F] ? o(e) : o.length > 1 ? (i = [ t, t, "", e ], C.setFilters.hasOwnProperty(t.toLowerCase()) ? r(function(t, n) {
for (var i, r = o(t, e), a = r.length; a--; ) i = Z.call(t, r[a]), t[i] = !(n[i] = r[a]);
}) : function(t) {
return o(t, 0, i);
}) : o;
}
},
pseudos: {
not: r(function(t) {
var e = [], n = [], i = E(t.replace(st, "$1"));
return i[F] ? r(function(t, e, n, r) {
for (var o, a = i(t, null, r, []), s = t.length; s--; ) (o = a[s]) && (t[s] = !(e[s] = o));
}) : function(t, r, o) {
return e[0] = t, i(e, null, o, n), !n.pop();
};
}),
has: r(function(t) {
return function(e) {
return n(t, e).length > 0;
};
}),
contains: r(function(t) {
return function(e) {
return (e.textContent || e.innerText || _(e)).indexOf(t) > -1;
};
}),
lang: r(function(t) {
return ht.test(t || "") || n.error("unsupported lang: " + t), t = t.replace(xt, wt).toLowerCase(),
function(e) {
var n;
do if (n = L ? e.lang : e.getAttribute("xml:lang") || e.getAttribute("lang")) return (n = n.toLowerCase()) === t || 0 === n.indexOf(t + "-"); while ((e = e.parentNode) && 1 === e.nodeType);
return !1;
};
}),
target: function(e) {
var n = t.location && t.location.hash;
return n && n.slice(1) === e.id;
},
root: function(t) {
return t === M;
},
focus: function(t) {
return t === N.activeElement && (!N.hasFocus || N.hasFocus()) && !!(t.type || t.href || ~t.tabIndex);
},
enabled: function(t) {
return !1 === t.disabled;
},
disabled: function(t) {
return !0 === t.disabled;
},
checked: function(t) {
var e = t.nodeName.toLowerCase();
return "input" === e && !!t.checked || "option" === e && !!t.selected;
},
selected: function(t) {
return t.parentNode && t.parentNode.selectedIndex, !0 === t.selected;
},
empty: function(t) {
for (t = t.firstChild; t; t = t.nextSibling) if (t.nodeName > "@" || 3 === t.nodeType || 4 === t.nodeType) return !1;
return !0;
},
parent: function(t) {
return !C.pseudos.empty(t);
},
header: function(t) {
return bt.test(t.nodeName);
},
input: function(t) {
return vt.test(t.nodeName);
},
button: function(t) {
var e = t.nodeName.toLowerCase();
return "input" === e && "button" === t.type || "button" === e;
},
text: function(t) {
var e;
return "input" === t.nodeName.toLowerCase() && "text" === t.type && (null == (e = t.getAttribute("type")) || e.toLowerCase() === t.type);
},
first: l(function() {
return [ 0 ];
}),
last: l(function(t, e) {
return [ e - 1 ];
}),
eq: l(function(t, e, n) {
return [ n < 0 ? n + e : n ];
}),
even: l(function(t, e) {
for (var n = 0; n < e; n += 2) t.push(n);
return t;
}),
odd: l(function(t, e) {
for (var n = 1; n < e; n += 2) t.push(n);
return t;
}),
lt: l(function(t, e, n) {
for (var i = n < 0 ? n + e : n; --i >= 0; ) t.push(i);
return t;
}),
gt: l(function(t, e, n) {
for (var i = n < 0 ? n + e : n; ++i < e; ) t.push(i);
return t;
})
}
}, C.pseudos.nth = C.pseudos.eq;
for (x in {
radio: !0,
checkbox: !0,
file: !0,
password: !0,
image: !0
}) C.pseudos[x] = function(t) {
return function(e) {
return "input" === e.nodeName.toLowerCase() && e.type === t;
};
}(x);
for (x in {
submit: !0,
reset: !0
}) C.pseudos[x] = function(t) {
return function(e) {
var n = e.nodeName.toLowerCase();
return ("input" === n || "button" === n) && e.type === t;
};
}(x);
c.prototype = C.filters = C.pseudos, C.setFilters = new c(), E = n.compile = function(t, e) {
var n, i = [], r = [], o = H[t + " "];
if (!o) {
for (e || (e = u(t)), n = e.length; n--; ) o = g(e[n]), o[F] ? i.push(o) : r.push(o);
o = H(t, v(r, i));
}
return o;
}, w.sortStable = F.split("").sort(z).join("") === F, w.detectDuplicates = U, D(),
w.sortDetached = o(function(t) {
return 1 & t.compareDocumentPosition(N.createElement("div"));
}), o(function(t) {
return t.innerHTML = "<a href='#'></a>", "#" === t.firstChild.getAttribute("href");
}) || a("type|href|height|width", function(t, e, n) {
if (!n) return t.getAttribute(e, "type" === e.toLowerCase() ? 1 : 2);
}), w.attributes && o(function(t) {
return t.innerHTML = "<input/>", t.firstChild.setAttribute("value", ""), "" === t.firstChild.getAttribute("value");
}) || a("value", function(t, e, n) {
if (!n && "input" === t.nodeName.toLowerCase()) return t.defaultValue;
}), o(function(t) {
return null == t.getAttribute("disabled");
}) || a(tt, function(t, e, n) {
var i;
if (!n) return (i = t.getAttributeNode(e)) && i.specified ? i.value : !0 === t[e] ? e.toLowerCase() : null;
}), rt.find = n, rt.expr = n.selectors, rt.expr[":"] = rt.expr.pseudos, rt.unique = n.uniqueSort,
rt.text = n.getText, rt.isXMLDoc = n.isXML, rt.contains = n.contains;
}(t);
var ht = {};
rt.Callbacks = function(t) {
t = "string" == typeof t ? ht[t] || i(t) : rt.extend({}, t);
var n, r, o, a, s, l, c = [], u = !t.once && [], d = function(e) {
for (n = t.memory && e, r = !0, l = a || 0, a = 0, s = c.length, o = !0; c && l < s; l++) if (!1 === c[l].apply(e[0], e[1]) && t.stopOnFalse) {
n = !1;
break;
}
o = !1, c && (u ? u.length && d(u.shift()) : n ? c = [] : p.disable());
}, p = {
add: function() {
if (c) {
var e = c.length;
!function i(e) {
rt.each(e, function(e, n) {
var r = rt.type(n);
"function" === r ? t.unique && p.has(n) || c.push(n) : n && n.length && "string" !== r && i(n);
});
}(arguments), o ? s = c.length : n && (a = e, d(n));
}
return this;
},
remove: function() {
return c && rt.each(arguments, function(t, e) {
for (var n; (n = rt.inArray(e, c, n)) > -1; ) c.splice(n, 1), o && (n <= s && s--,
n <= l && l--);
}), this;
},
has: function(t) {
return t ? rt.inArray(t, c) > -1 : !(!c || !c.length);
},
empty: function() {
return c = [], s = 0, this;
},
disable: function() {
return c = u = n = e, this;
},
disabled: function() {
return !c;
},
lock: function() {
return u = e, n || p.disable(), this;
},
locked: function() {
return !u;
},
fireWith: function(t, e) {
return !c || r && !u || (e = e || [], e = [ t, e.slice ? e.slice() : e ], o ? u.push(e) : d(e)),
this;
},
fire: function() {
return p.fireWith(this, arguments), this;
},
fired: function() {
return !!r;
}
};
return p;
}, rt.extend({
Deferred: function(t) {
var e = [ [ "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 t = arguments;
return rt.Deferred(function(n) {
rt.each(e, function(e, o) {
var a = o[0], s = rt.isFunction(t[e]) && t[e];
r[o[1]](function() {
var t = s && s.apply(this, arguments);
t && rt.isFunction(t.promise) ? t.promise().done(n.resolve).fail(n.reject).progress(n.notify) : n[a + "With"](this === i ? n.promise() : this, s ? [ t ] : arguments);
});
}), t = null;
}).promise();
},
promise: function(t) {
return null != t ? rt.extend(t, i) : i;
}
}, r = {};
return i.pipe = i.then, rt.each(e, function(t, o) {
var a = o[2], s = o[3];
i[o[1]] = a.add, s && a.add(function() {
n = s;
}, e[1 ^ t][2].disable, e[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), t && t.call(r, r), r;
},
when: function(t) {
var e, n, i, r = 0, o = Z.call(arguments), a = o.length, s = 1 !== a || t && rt.isFunction(t.promise) ? a : 0, l = 1 === s ? t : rt.Deferred(), c = function(t, n, i) {
return function(r) {
n[t] = this, i[t] = arguments.length > 1 ? Z.call(arguments) : r, i === e ? l.notifyWith(n, i) : --s || l.resolveWith(n, i);
};
};
if (a > 1) for (e = new Array(a), n = new Array(a), i = new Array(a); r < a; r++) o[r] && rt.isFunction(o[r].promise) ? o[r].promise().done(c(r, i, o)).fail(l.reject).progress(c(r, n, e)) : --s;
return s || l.resolveWith(i, o), l.promise();
}
}), rt.support = function(e) {
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", e.checkOn = "" !== n.value, e.optSelected = a.selected,
e.reliableMarginRight = !0, e.boxSizingReliable = !0, e.pixelPosition = !1, n.checked = !0,
e.noCloneChecked = n.cloneNode(!0).checked, o.disabled = !0, e.optDisabled = !a.disabled,
n = z.createElement("input"), n.value = "t", n.type = "radio", e.radioValue = "t" === n.value,
n.setAttribute("checked", "t"), n.setAttribute("name", "t"), i.appendChild(n), e.checkClone = i.cloneNode(!0).cloneNode(!0).lastChild.checked,
e.focusinBubbles = "onfocusin" in t, r.style.backgroundClip = "content-box", r.cloneNode(!0).style.backgroundClip = "",
e.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() {
e.boxSizing = 4 === r.offsetWidth;
}), t.getComputedStyle && (e.pixelPosition = "1%" !== (t.getComputedStyle(r, null) || {}).top,
e.boxSizingReliable = "4px" === (t.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", e.reliableMarginRight = !parseFloat((t.getComputedStyle(i, null) || {}).marginRight)),
o.removeChild(n));
}), e) : e;
}({});
var ft, mt, gt = /(?:\{[\s\S]*\}|\[[\s\S]*\])$/, vt = /([A-Z])/g;
r.uid = 1, r.accepts = function(t) {
return !t.nodeType || 1 === t.nodeType || 9 === t.nodeType;
}, r.prototype = {
key: function(t) {
if (!r.accepts(t)) return 0;
var e = {}, n = t[this.expando];
if (!n) {
n = r.uid++;
try {
e[this.expando] = {
value: n
}, Object.defineProperties(t, e);
} catch (i) {
e[this.expando] = n, rt.extend(t, e);
}
}
return this.cache[n] || (this.cache[n] = {}), n;
},
set: function(t, e, n) {
var i, r = this.key(t), o = this.cache[r];
if ("string" == typeof e) o[e] = n; else if (rt.isEmptyObject(o)) rt.extend(this.cache[r], e); else for (i in e) o[i] = e[i];
return o;
},
get: function(t, n) {
var i = this.cache[this.key(t)];
return n === e ? i : i[n];
},
access: function(t, n, i) {
var r;
return n === e || n && "string" == typeof n && i === e ? (r = this.get(t, n), r !== e ? r : this.get(t, rt.camelCase(n))) : (this.set(t, n, i),
i !== e ? i : n);
},
remove: function(t, n) {
var i, r, o, a = this.key(t), s = this.cache[a];
if (n === e) 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(t) {
return !rt.isEmptyObject(this.cache[t[this.expando]] || {});
},
discard: function(t) {
t[this.expando] && delete this.cache[t[this.expando]];
}
}, ft = new r(), mt = new r(), rt.extend({
acceptData: r.accepts,
hasData: function(t) {
return ft.hasData(t) || mt.hasData(t);
},
data: function(t, e, n) {
return ft.access(t, e, n);
},
removeData: function(t, e) {
ft.remove(t, e);
},
_data: function(t, e, n) {
return mt.access(t, e, n);
},
_removeData: function(t, e) {
mt.remove(t, e);
}
}), rt.fn.extend({
data: function(t, n) {
var i, r, a = this[0], s = 0, l = null;
if (t === e) {
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 t ? this.each(function() {
ft.set(this, t);
}) : rt.access(this, function(n) {
var i, r = rt.camelCase(t);
if (a && n === e) {
if ((i = ft.get(a, t)) !== e) return i;
if ((i = ft.get(a, r)) !== e) return i;
if ((i = o(a, r, e)) !== e) return i;
} else this.each(function() {
var i = ft.get(this, r);
ft.set(this, r, n), -1 !== t.indexOf("-") && i !== e && ft.set(this, t, n);
});
}, null, n, arguments.length > 1, null, !0);
},
removeData: function(t) {
return this.each(function() {
ft.remove(this, t);
});
}
}), rt.extend({
queue: function(t, e, n) {
var i;
if (t) return e = (e || "fx") + "queue", i = mt.get(t, e), n && (!i || rt.isArray(n) ? i = mt.access(t, e, rt.makeArray(n)) : i.push(n)),
i || [];
},
dequeue: function(t, e) {
e = e || "fx";
var n = rt.queue(t, e), i = n.length, r = n.shift(), o = rt._queueHooks(t, e), a = function() {
rt.dequeue(t, e);
};
"inprogress" === r && (r = n.shift(), i--), r && ("fx" === e && n.unshift("inprogress"),
delete o.stop, r.call(t, a, o)), !i && o && o.empty.fire();
},
_queueHooks: function(t, e) {
var n = e + "queueHooks";
return mt.get(t, n) || mt.access(t, n, {
empty: rt.Callbacks("once memory").add(function() {
mt.remove(t, [ e + "queue", n ]);
})
});
}
}), rt.fn.extend({
queue: function(t, n) {
var i = 2;
return "string" != typeof t && (n = t, t = "fx", i--), arguments.length < i ? rt.queue(this[0], t) : n === e ? this : this.each(function() {
var e = rt.queue(this, t, n);
rt._queueHooks(this, t), "fx" === t && "inprogress" !== e[0] && rt.dequeue(this, t);
});
},
dequeue: function(t) {
return this.each(function() {
rt.dequeue(this, t);
});
},
delay: function(t, e) {
return t = rt.fx ? rt.fx.speeds[t] || t : t, e = e || "fx", this.queue(e, function(e, n) {
var i = setTimeout(e, t);
n.stop = function() {
clearTimeout(i);
};
});
},
clearQueue: function(t) {
return this.queue(t || "fx", []);
},
promise: function(t, n) {
var i, r = 1, o = rt.Deferred(), a = this, s = this.length, l = function() {
--r || o.resolveWith(a, [ a ]);
};
for ("string" != typeof t && (n = t, t = e), t = t || "fx"; s--; ) (i = mt.get(a[s], t + "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(t, e) {
return rt.access(this, rt.attr, t, e, arguments.length > 1);
},
removeAttr: function(t) {
return this.each(function() {
rt.removeAttr(this, t);
});
},
prop: function(t, e) {
return rt.access(this, rt.prop, t, e, arguments.length > 1);
},
removeProp: function(t) {
return this.each(function() {
delete this[rt.propFix[t] || t];
});
},
addClass: function(t) {
var e, n, i, r, o, a = 0, s = this.length, l = "string" == typeof t && t;
if (rt.isFunction(t)) return this.each(function(e) {
rt(this).addClass(t.call(this, e, this.className));
});
if (l) for (e = (t || "").match(at) || []; a < s; a++) if (n = this[a], i = 1 === n.nodeType && (n.className ? (" " + n.className + " ").replace(yt, " ") : " ")) {
for (o = 0; r = e[o++]; ) i.indexOf(" " + r + " ") < 0 && (i += r + " ");
n.className = rt.trim(i);
}
return this;
},
removeClass: function(t) {
var e, n, i, r, o, a = 0, s = this.length, l = 0 === arguments.length || "string" == typeof t && t;
if (rt.isFunction(t)) return this.each(function(e) {
rt(this).removeClass(t.call(this, e, this.className));
});
if (l) for (e = (t || "").match(at) || []; a < s; a++) if (n = this[a], i = 1 === n.nodeType && (n.className ? (" " + n.className + " ").replace(yt, " ") : "")) {
for (o = 0; r = e[o++]; ) for (;i.indexOf(" " + r + " ") >= 0; ) i = i.replace(" " + r + " ", " ");
n.className = t ? rt.trim(i) : "";
}
return this;
},
toggleClass: function(t, e) {
var n = typeof t;
return "boolean" == typeof e && "string" === n ? e ? this.addClass(t) : this.removeClass(t) : rt.isFunction(t) ? this.each(function(n) {
rt(this).toggleClass(t.call(this, n, this.className, e), e);
}) : this.each(function() {
if ("string" === n) for (var e, i = 0, r = rt(this), o = t.match(at) || []; e = o[i++]; ) r.hasClass(e) ? r.removeClass(e) : r.addClass(e); else n !== H && "boolean" !== n || (this.className && mt.set(this, "__className__", this.className),
this.className = this.className || !1 === t ? "" : mt.get(this, "__className__") || "");
});
},
hasClass: function(t) {
for (var e = " " + t + " ", n = 0, i = this.length; n < i; n++) if (1 === this[n].nodeType && (" " + this[n].className + " ").replace(yt, " ").indexOf(e) >= 0) return !0;
return !1;
},
val: function(t) {
var n, i, r, o = this[0];
return arguments.length ? (r = rt.isFunction(t), this.each(function(i) {
var o;
1 === this.nodeType && (o = r ? t.call(this, i, rt(this).val()) : t, null == o ? o = "" : "number" == typeof o ? o += "" : rt.isArray(o) && (o = rt.map(o, function(t) {
return null == t ? "" : t + "";
})), (n = rt.valHooks[this.type] || rt.valHooks[this.nodeName.toLowerCase()]) && "set" in n && n.set(this, o, "value") !== e || (this.value = o));
})) : o ? (n = rt.valHooks[o.type] || rt.valHooks[o.nodeName.toLowerCase()]) && "get" in n && (i = n.get(o, "value")) !== e ? i : (i = o.value,
"string" == typeof i ? i.replace(xt, "") : null == i ? "" : i) : void 0;
}
}), rt.extend({
valHooks: {
option: {
get: function(t) {
var e = t.attributes.value;
return !e || e.specified ? t.value : t.text;
}
},
select: {
get: function(t) {
for (var e, n, i = t.options, r = t.selectedIndex, o = "select-one" === t.type || r < 0, a = o ? null : [], s = o ? r + 1 : i.length, l = r < 0 ? s : o ? r : 0; l < s; 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 (e = rt(n).val(), o) return e;
a.push(e);
}
return a;
},
set: function(t, e) {
for (var n, i, r = t.options, o = rt.makeArray(e), a = r.length; a--; ) i = r[a],
(i.selected = rt.inArray(rt(i).val(), o) >= 0) && (n = !0);
return n || (t.selectedIndex = -1), o;
}
}
},
attr: function(t, n, i) {
var r, o, a = t.nodeType;
if (t && 3 !== a && 8 !== a && 2 !== a) return typeof t.getAttribute === H ? rt.prop(t, n, i) : (1 === a && rt.isXMLDoc(t) || (n = n.toLowerCase(),
r = rt.attrHooks[n] || (rt.expr.match.bool.test(n) ? bt : void 0)), i === e ? r && "get" in r && null !== (o = r.get(t, n)) ? o : (o = rt.find.attr(t, n),
null == o ? e : o) : null !== i ? r && "set" in r && (o = r.set(t, i, n)) !== e ? o : (t.setAttribute(n, i + ""),
i) : void rt.removeAttr(t, n));
},
removeAttr: function(t, e) {
var n, i, r = 0, o = e && e.match(at);
if (o && 1 === t.nodeType) for (;n = o[r++]; ) i = rt.propFix[n] || n, rt.expr.match.bool.test(n) && (t[i] = !1),
t.removeAttribute(n);
},
attrHooks: {
type: {
set: function(t, e) {
if (!rt.support.radioValue && "radio" === e && rt.nodeName(t, "input")) {
var n = t.value;
return t.setAttribute("type", e), n && (t.value = n), e;
}
}
}
},
propFix: {
"for": "htmlFor",
"class": "className"
},
prop: function(t, n, i) {
var r, o, a, s = t.nodeType;
if (t && 3 !== s && 8 !== s && 2 !== s) return a = 1 !== s || !rt.isXMLDoc(t), a && (n = rt.propFix[n] || n,
o = rt.propHooks[n]), i !== e ? o && "set" in o && (r = o.set(t, i, n)) !== e ? r : t[n] = i : o && "get" in o && null !== (r = o.get(t, n)) ? r : t[n];
},
propHooks: {
tabIndex: {
get: function(t) {
return t.hasAttribute("tabindex") || wt.test(t.nodeName) || t.href ? t.tabIndex : -1;
}
}
}
}), bt = {
set: function(t, e, n) {
return !1 === e ? rt.removeAttr(t, n) : t.setAttribute(n, n), n;
}
}, rt.each(rt.expr.match.bool.source.match(/\w+/g), function(t, n) {
var i = rt.expr.attrHandle[n] || rt.find.attr;
rt.expr.attrHandle[n] = function(t, n, r) {
var o = rt.expr.attrHandle[n], a = r ? e : (rt.expr.attrHandle[n] = e) != i(t, n, r) ? n.toLowerCase() : null;
return rt.expr.attrHandle[n] = o, a;
};
}), rt.support.optSelected || (rt.propHooks.selected = {
get: function(t) {
var e = t.parentNode;
return e && e.parentNode && e.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(t, e) {
if (rt.isArray(e)) return t.checked = rt.inArray(rt(t).val(), e) >= 0;
}
}, rt.support.checkOn || (rt.valHooks[this].get = function(t) {
return null === t.getAttribute("value") ? "on" : t.value;
});
});
var St = /^key/, Ct = /^(?:mouse|contextmenu)|click/, _t = /^(?:focusinfocus|focusoutblur)$/, kt = /^([^.]*)(?:\.(.+)|)$/;
rt.event = {
global: {},
add: function(t, n, i, r, o) {
var a, s, l, c, u, d, p, h, f, m, g, v = mt.get(t);
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(t) {
return typeof rt === H || t && rt.event.triggered === t.type ? e : rt.event.dispatch.apply(s.elem, arguments);
}, s.elem = t), 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(t, r, m, s) || t.addEventListener && t.addEventListener(f, s, !1)),
p.add && (p.add.call(t, d), d.handler.guid || (d.handler.guid = i.guid)), o ? h.splice(h.delegateCount++, 0, d) : h.push(d),
rt.event.global[f] = !0);
t = null;
}
},
remove: function(t, e, n, i, r) {
var o, a, s, l, c, u, d, p, h, f, m, g = mt.hasData(t) && mt.get(t);
if (g && (l = g.events)) {
for (e = (e || "").match(at) || [ "" ], c = e.length; c--; ) if (s = kt.exec(e[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(t, u));
a && !p.length && (d.teardown && !1 !== d.teardown.call(t, f, g.handle) || rt.removeEvent(t, h, g.handle),
delete l[h]);
} else for (h in l) rt.event.remove(t, h + e[c], n, i, !0);
rt.isEmptyObject(l) && (delete g.handle, mt.remove(t, "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 = e, 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 || t);
}
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 = e, l && (r[u] = l)),
n.result;
}
},
dispatch: function(t) {
t = rt.event.fix(t);
var n, i, r, o, a, s = [], l = Z.call(arguments), c = (mt.get(this, "events") || {})[t.type] || [], u = rt.event.special[t.type] || {};
if (l[0] = t, t.delegateTarget = this, !u.preDispatch || !1 !== u.preDispatch.call(this, t)) {
for (s = rt.event.handlers.call(this, t, c), n = 0; (o = s[n++]) && !t.isPropagationStopped(); ) for (t.currentTarget = o.elem,
i = 0; (a = o.handlers[i++]) && !t.isImmediatePropagationStopped(); ) t.namespace_re && !t.namespace_re.test(a.namespace) || (t.handleObj = a,
t.data = a.data, (r = ((rt.event.special[a.origType] || {}).handle || a.handler).apply(o.elem, l)) !== e && !1 === (t.result = r) && (t.preventDefault(),
t.stopPropagation()));
return u.postDispatch && u.postDispatch.call(this, t), t.result;
}
},
handlers: function(t, n) {
var i, r, o, a, s = [], l = n.delegateCount, c = t.target;
if (l && c.nodeType && (!t.button || "click" !== t.type)) for (;c !== this; c = c.parentNode || this) if (!0 !== c.disabled || "click" !== t.type) {
for (r = [], i = 0; i < l; i++) a = n[i], o = a.selector + " ", r[o] === e && (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(t, e) {
return null == t.which && (t.which = null != e.charCode ? e.charCode : e.keyCode),
t;
}
},
mouseHooks: {
props: "button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),
filter: function(t, n) {
var i, r, o, a = n.button;
return null == t.pageX && null != n.clientX && (i = t.target.ownerDocument || z,
r = i.documentElement, o = i.body, t.pageX = n.clientX + (r && r.scrollLeft || o && o.scrollLeft || 0) - (r && r.clientLeft || o && o.clientLeft || 0),
t.pageY = n.clientY + (r && r.scrollTop || o && o.scrollTop || 0) - (r && r.clientTop || o && o.clientTop || 0)),
t.which || a === e || (t.which = 1 & a ? 1 : 2 & a ? 3 : 4 & a ? 2 : 0), t;
}
},
fix: function(t) {
if (t[rt.expando]) return t;
var e, n, i, r = t.type, o = t, 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, t = new rt.Event(o), e = i.length; e--; ) n = i[e],
t[n] = o[n];
return t.target || (t.target = z), 3 === t.target.nodeType && (t.target = t.target.parentNode),
a.filter ? a.filter(t, o) : t;
},
special: {
load: {
noBubble: !0
},
focus: {
trigger: function() {
if (this !== l() && this.focus) return this.focus(), !1;
},
delegateType: "focusin"
},
blur: {
trigger: function() {
if (this === l() && this.blur) return this.blur(), !1;
},
delegateType: "focusout"
},
click: {
trigger: function() {
if ("checkbox" === this.type && this.click && rt.nodeName(this, "input")) return this.click(),
!1;
},
_default: function(t) {
return rt.nodeName(t.target, "a");
}
},
beforeunload: {
postDispatch: function(t) {
t.result !== e && (t.originalEvent.returnValue = t.result);
}
}
},
simulate: function(t, e, n, i) {
var r = rt.extend(new rt.Event(), n, {
type: t,
isSimulated: !0,
originalEvent: {}
});
i ? rt.event.trigger(r, null, e) : rt.event.dispatch.call(e, r), r.isDefaultPrevented() && n.preventDefault();
}
}, rt.removeEvent = function(t, e, n) {
t.removeEventListener && t.removeEventListener(e, n, !1);
}, rt.Event = function(t, e) {
return this instanceof rt.Event ? (t && t.type ? (this.originalEvent = t, this.type = t.type,
this.isDefaultPrevented = t.defaultPrevented || t.getPreventDefault && t.getPreventDefault() ? a : s) : this.type = t,
e && rt.extend(this, e), this.timeStamp = t && t.timeStamp || rt.now(), this[rt.expando] = !0,
void 0) : new rt.Event(t, e);
}, rt.Event.prototype = {
isDefaultPrevented: s,
isPropagationStopped: s,
isImmediatePropagationStopped: s,
preventDefault: function() {
var t = this.originalEvent;
this.isDefaultPrevented = a, t && t.preventDefault && t.preventDefault();
},
stopPropagation: function() {
var t = this.originalEvent;
this.isPropagationStopped = a, t && t.stopPropagation && t.stopPropagation();
},
stopImmediatePropagation: function() {
this.isImmediatePropagationStopped = a, this.stopPropagation();
}
}, rt.each({
mouseenter: "mouseover",
mouseleave: "mouseout"
}, function(t, e) {
rt.event.special[t] = {
delegateType: e,
bindType: e,
handle: function(t) {
var n, i = this, r = t.relatedTarget, o = t.handleObj;
return r && (r === i || rt.contains(i, r)) || (t.type = o.origType, n = o.handler.apply(this, arguments),
t.type = e), n;
}
};
}), rt.support.focusinBubbles || rt.each({
focus: "focusin",
blur: "focusout"
}, function(t, e) {
var n = 0, i = function(t) {
rt.event.simulate(e, t.target, rt.event.fix(t), !0);
};
rt.event.special[e] = {
setup: function() {
0 == n++ && z.addEventListener(t, i, !0);
},
teardown: function() {
0 == --n && z.removeEventListener(t, i, !0);
}
};
}), rt.fn.extend({
on: function(t, n, i, r, o) {
var a, l;
if ("object" == typeof t) {
"string" != typeof n && (i = i || n, n = e);
for (l in t) this.on(l, n, i, t[l], o);
return this;
}
if (null == i && null == r ? (r = n, i = n = e) : null == r && ("string" == typeof n ? (r = i,
i = e) : (r = i, i = n, n = e)), !1 === r) r = s; else if (!r) return this;
return 1 === o && (a = r, r = function(t) {
return rt().off(t), a.apply(this, arguments);
}, r.guid = a.guid || (a.guid = rt.guid++)), this.each(function() {
rt.event.add(this, t, r, i, n);
});
},
one: function(t, e, n, i) {
return this.on(t, e, n, i, 1);
},
off: function(t, n, i) {
var r, o;
if (t && t.preventDefault && t.handleObj) return r = t.handleObj, rt(t.delegateTarget).off(r.namespace ? r.origType + "." + r.namespace : r.origType, r.selector, r.handler),
this;
if ("object" == typeof t) {
for (o in t) this.off(o, n, t[o]);
return this;
}
return !1 !== n && "function" != typeof n || (i = n, n = e), !1 === i && (i = s),
this.each(function() {
rt.event.remove(this, t, i, n);
});
},
trigger: function(t, e) {
return this.each(function() {
rt.event.trigger(t, e, this);
});
},
triggerHandler: function(t, e) {
var n = this[0];
if (n) return rt.event.trigger(t, e, n, !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(t) {
var e, n = [], i = this, r = i.length;
if ("string" != typeof t) return this.pushStack(rt(t).filter(function() {
for (e = 0; e < r; e++) if (rt.contains(i[e], this)) return !0;
}));
for (e = 0; e < r; e++) rt.find(t, i[e], n);
return n = this.pushStack(r > 1 ? rt.unique(n) : n), n.selector = this.selector ? this.selector + " " + t : t,
n;
},
has: function(t) {
var e = rt(t, this), n = e.length;
return this.filter(function() {
for (var t = 0; t < n; t++) if (rt.contains(this, e[t])) return !0;
});
},
not: function(t) {
return this.pushStack(u(this, t || [], !0));
},
filter: function(t) {
return this.pushStack(u(this, t || [], !1));
},
is: function(t) {
return !!u(this, "string" == typeof t && It.test(t) ? rt(t) : t || [], !1).length;
},
closest: function(t, e) {
for (var n, i = 0, r = this.length, o = [], a = It.test(t) || "string" != typeof t ? rt(t, e || this.context) : 0; i < r; i++) for (n = this[i]; n && n !== e; n = n.parentNode) if (n.nodeType < 11 && (a ? a.index(n) > -1 : 1 === n.nodeType && rt.find.matchesSelector(n, t))) {
n = o.push(n);
break;
}
return this.pushStack(o.length > 1 ? rt.unique(o) : o);
},
index: function(t) {
return t ? "string" == typeof t ? tt.call(rt(t), this[0]) : tt.call(this, t.jquery ? t[0] : t) : this[0] && this[0].parentNode ? this.first().prevAll().length : -1;
},
add: function(t, e) {
var n = "string" == typeof t ? rt(t, e) : rt.makeArray(t && t.nodeType ? [ t ] : t), i = rt.merge(this.get(), n);
return this.pushStack(rt.unique(i));
},
addBack: function(t) {
return this.add(null == t ? this.prevObject : this.prevObject.filter(t));
}
}), rt.each({
parent: function(t) {
var e = t.parentNode;
return e && 11 !== e.nodeType ? e : null;
},
parents: function(t) {
return rt.dir(t, "parentNode");
},
parentsUntil: function(t, e, n) {
return rt.dir(t, "parentNode", n);
},
next: function(t) {
return c(t, "nextSibling");
},
prev: function(t) {
return c(t, "previousSibling");
},
nextAll: function(t) {
return rt.dir(t, "nextSibling");
},
prevAll: function(t) {
return rt.dir(t, "previousSibling");
},
nextUntil: function(t, e, n) {
return rt.dir(t, "nextSibling", n);
},
prevUntil: function(t, e, n) {
return rt.dir(t, "previousSibling", n);
},
siblings: function(t) {
return rt.sibling((t.parentNode || {}).firstChild, t);
},
children: function(t) {
return rt.sibling(t.firstChild);
},
contents: function(t) {
return t.contentDocument || rt.merge([], t.childNodes);
}
}, function(t, e) {
rt.fn[t] = function(n, i) {
var r = rt.map(this, e, n);
return "Until" !== t.slice(-5) && (i = n), i && "string" == typeof i && (r = rt.filter(i, r)),
this.length > 1 && (Dt[t] || rt.unique(r), Tt.test(t) && r.reverse()), this.pushStack(r);
};
}), rt.extend({
filter: function(t, e, n) {
var i = e[0];
return n && (t = ":not(" + t + ")"), 1 === e.length && 1 === i.nodeType ? rt.find.matchesSelector(i, t) ? [ i ] : [] : rt.find.matches(t, rt.grep(e, function(t) {
return 1 === t.nodeType;
}));
},
dir: function(t, n, i) {
for (var r = [], o = i !== e; (t = t[n]) && 9 !== t.nodeType; ) if (1 === t.nodeType) {
if (o && rt(t).is(i)) break;
r.push(t);
}
return r;
},
sibling: function(t, e) {
for (var n = []; t; t = t.nextSibling) 1 === t.nodeType && t !== e && n.push(t);
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(t) {
return rt.access(this, function(t) {
return t === e ? rt.text(this) : this.empty().append((this[0] && this[0].ownerDocument || z).createTextNode(t));
}, null, t, arguments.length);
},
append: function() {
return this.domManip(arguments, function(t) {
1 !== this.nodeType && 11 !== this.nodeType && 9 !== this.nodeType || d(this, t).appendChild(t);
});
},
prepend: function() {
return this.domManip(arguments, function(t) {
if (1 === this.nodeType || 11 === this.nodeType || 9 === this.nodeType) {
var e = d(this, t);
e.insertBefore(t, e.firstChild);
}
});
},
before: function() {
return this.domManip(arguments, function(t) {
this.parentNode && this.parentNode.insertBefore(t, this);
});
},
after: function() {
return this.domManip(arguments, function(t) {
this.parentNode && this.parentNode.insertBefore(t, this.nextSibling);
});
},
remove: function(t, e) {
for (var n, i = t ? rt.filter(t, this) : this, r = 0; null != (n = i[r]); r++) e || 1 !== n.nodeType || rt.cleanData(g(n)),
n.parentNode && (e && rt.contains(n.ownerDocument, n) && f(g(n, "script")), n.parentNode.removeChild(n));
return this;
},
empty: function() {
for (var t, e = 0; null != (t = this[e]); e++) 1 === t.nodeType && (rt.cleanData(g(t, !1)),
t.textContent = "");
return this;
},
clone: function(t, e) {
return t = null != t && t, e = null == e ? t : e, this.map(function() {
return rt.clone(this, t, e);
});
},
html: function(t) {
return rt.access(this, function(t) {
var n = this[0] || {}, i = 0, r = this.length;
if (t === e && 1 === n.nodeType) return n.innerHTML;
if ("string" == typeof t && !At.test(t) && !jt[(Mt.exec(t) || [ "", "" ])[1].toLowerCase()]) {
t = t.replace(Nt, "<$1></$2>");
try {
for (;i < r; i++) n = this[i] || {}, 1 === n.nodeType && (rt.cleanData(g(n, !1)),
n.innerHTML = t);
n = 0;
} catch (t) {}
}
n && this.empty().append(t);
}, null, t, arguments.length);
},
replaceWith: function() {
var t = rt.map(this, function(t) {
return [ t.nextSibling, t.parentNode ];
}), e = 0;
return this.domManip(arguments, function(n) {
var i = t[e++], r = t[e++];
r && (i && i.parentNode !== r && (i = this.nextSibling), rt(this).remove(), r.insertBefore(n, i));
}, !0), e ? this : this.remove();
},
detach: function(t) {
return this.remove(t, !0);
},
domManip: function(t, e, n) {
t = K.apply([], t);
var i, r, o, a, s, l, c = 0, u = this.length, d = this, f = u - 1, m = t[0], v = rt.isFunction(m);
if (v || !(u <= 1 || "string" != typeof m || rt.support.checkClone) && Pt.test(m)) return this.each(function(i) {
var r = d.eq(i);
v && (t[0] = m.call(this, i, r.html())), r.domManip(t, e, n);
});
if (u && (i = rt.buildFragment(t, 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; c < u; c++) s = i, c !== f && (s = rt.clone(s, !0, !0),
a && rt.merge(o, g(s, "script"))), e.call(this[c], s, c);
if (a) for (l = o[o.length - 1].ownerDocument, rt.map(o, h), c = 0; c < a; 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(t, e) {
rt.fn[t] = function(t) {
for (var n, i = [], r = rt(t), o = r.length - 1, a = 0; a <= o; a++) n = a === o ? this : this.clone(!0),
rt(r[a])[e](n), J.apply(i, n.get());
return this.pushStack(i);
};
}), rt.extend({
clone: function(t, e, n) {
var i, r, o, a, s = t.cloneNode(!0), l = rt.contains(t.ownerDocument, t);
if (!(rt.support.noCloneChecked || 1 !== t.nodeType && 11 !== t.nodeType || rt.isXMLDoc(t))) for (a = g(s),
o = g(t), i = 0, r = o.length; i < r; i++) v(o[i], a[i]);
if (e) if (n) for (o = o || g(t), a = a || g(s), i = 0, r = o.length; i < r; i++) m(o[i], a[i]); else m(t, s);
return a = g(s, "script"), a.length > 0 && f(a, !l && g(t, "script")), s;
},
buildFragment: function(t, e, n, i) {
for (var r, o, a, s, l, c, u = 0, d = t.length, p = e.createDocumentFragment(), h = []; u < d; u++) if ((r = t[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(e.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(e.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(t) {
for (var n, i, o, a, s, l, c = rt.event.special, u = 0; (i = t[u]) !== e; 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]) !== e; 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(t) {
return rt.ajax({
url: t,
type: "GET",
dataType: "script",
async: !1,
global: !1,
"throws": !0
});
}
}), rt.fn.extend({
wrapAll: function(t) {
var e;
return rt.isFunction(t) ? this.each(function(e) {
rt(this).wrapAll(t.call(this, e));
}) : (this[0] && (e = rt(t, this[0].ownerDocument).eq(0).clone(!0), this[0].parentNode && e.insertBefore(this[0]),
e.map(function() {
for (var t = this; t.firstElementChild; ) t = t.firstElementChild;
return t;
}).append(this)), this);
},
wrapInner: function(t) {
return rt.isFunction(t) ? this.each(function(e) {
rt(this).wrapInner(t.call(this, e));
}) : this.each(function() {
var e = rt(this), n = e.contents();
n.length ? n.wrapAll(t) : e.append(t);
});
},
wrap: function(t) {
var e = rt.isFunction(t);
return this.each(function(n) {
rt(this).wrapAll(e ? t.call(this, n) : t);
});
},
unwrap: function() {
return this.parent().each(function() {
rt.nodeName(this, "body") || rt(this).replaceWith(this.childNodes);
}).end();
}
});
var $t, qt, Gt = /^(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(t, n) {
return rt.access(this, function(t, n, i) {
var r, o, a = {}, s = 0;
if (rt.isArray(n)) {
for (r = x(t), o = n.length; s < o; s++) a[n[s]] = rt.css(t, n[s], !1, r);
return a;
}
return i !== e ? rt.style(t, n, i) : rt.css(t, n);
}, t, n, arguments.length > 1);
},
show: function() {
return w(this, !0);
},
hide: function() {
return w(this);
},
toggle: function(t) {
return "boolean" == typeof t ? t ? this.show() : this.hide() : this.each(function() {
y(this) ? rt(this).show() : rt(this).hide();
});
}
}), rt.extend({
cssHooks: {
opacity: {
get: function(t, e) {
if (e) {
var n = $t(t, "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(t, n, i, r) {
if (t && 3 !== t.nodeType && 8 !== t.nodeType && t.style) {
var o, a, s, l = rt.camelCase(n), c = t.style;
if (n = rt.cssProps[l] || (rt.cssProps[l] = b(c, l)), s = rt.cssHooks[n] || rt.cssHooks[l],
i === e) return s && "get" in s && (o = s.get(t, !1, r)) !== e ? o : c[n];
a = typeof i, "string" === a && (o = Vt.exec(i)) && (i = (o[1] + 1) * o[2] + parseFloat(rt.css(t, 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(t, i, r)) === e || (c[n] = i));
}
},
css: function(t, n, i, r) {
var o, a, s, l = rt.camelCase(n);
return n = rt.cssProps[l] || (rt.cssProps[l] = b(t.style, l)), s = rt.cssHooks[n] || rt.cssHooks[l],
s && "get" in s && (o = s.get(t, !0, i)), o === e && (o = $t(t, 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(t, n, i) {
var r, o, a, s = i || x(t), l = s ? s.getPropertyValue(n) || s[n] : e, c = t.style;
return s && ("" !== l || rt.contains(t.ownerDocument, t) || (l = rt.style(t, 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(t, e) {
rt.cssHooks[e] = {
get: function(t, n, i) {
if (n) return 0 === t.offsetWidth && Gt.test(rt.css(t, "display")) ? rt.swap(t, Xt, function() {
return _(t, e, i);
}) : _(t, e, i);
},
set: function(t, n, i) {
var r = i && x(t);
return S(t, n, i ? C(t, e, i, rt.support.boxSizing && "border-box" === rt.css(t, "boxSizing", !1, r), r) : 0);
}
};
}), rt(function() {
rt.support.reliableMarginRight || (rt.cssHooks.marginRight = {
get: function(t, e) {
if (e) return rt.swap(t, {
display: "inline-block"
}, $t, [ t, "marginRight" ]);
}
}), !rt.support.pixelPosition && rt.fn.position && rt.each([ "top", "left" ], function(t, e) {
rt.cssHooks[e] = {
get: function(t, n) {
if (n) return n = $t(t, e), zt.test(n) ? rt(t).position()[e] + "px" : n;
}
};
});
}), rt.expr && rt.expr.filters && (rt.expr.filters.hidden = function(t) {
return t.offsetWidth <= 0 && t.offsetHeight <= 0;
}, rt.expr.filters.visible = function(t) {
return !rt.expr.filters.hidden(t);
}), rt.each({
margin: "",
padding: "",
border: "Width"
}, function(t, e) {
rt.cssHooks[t + e] = {
expand: function(n) {
for (var i = 0, r = {}, o = "string" == typeof n ? n.split(" ") : [ n ]; i < 4; i++) r[t + Yt[i] + e] = o[i] || o[i - 2] || o[0];
return r;
}
}, Ht.test(t) || (rt.cssHooks[t + e].set = S);
});
var Jt = /%20/g, Zt = /\[\]$/, te = /\r?\n/g, ee = /^(?:submit|button|image|reset|file)$/i, ne = /^(?:input|select|textarea|keygen)/i;
rt.fn.extend({
serialize: function() {
return rt.param(this.serializeArray());
},
serializeArray: function() {
return this.map(function() {
var t = rt.prop(this, "elements");
return t ? rt.makeArray(t) : this;
}).filter(function() {
var t = this.type;
return this.name && !rt(this).is(":disabled") && ne.test(this.nodeName) && !ee.test(t) && (this.checked || !Rt.test(t));
}).map(function(t, e) {
var n = rt(this).val();
return null == n ? null : rt.isArray(n) ? rt.map(n, function(t) {
return {
name: e.name,
value: t.replace(te, "\r\n")
};
}) : {
name: e.name,
value: n.replace(te, "\r\n")
};
}).get();
}
}), rt.param = function(t, n) {
var i, r = [], o = function(t, e) {
e = rt.isFunction(e) ? e() : null == e ? "" : e, r[r.length] = encodeURIComponent(t) + "=" + encodeURIComponent(e);
};
if (n === e && (n = rt.ajaxSettings && rt.ajaxSettings.traditional), rt.isArray(t) || t.jquery && !rt.isPlainObject(t)) rt.each(t, function() {
o(this.name, this.value);
}); else for (i in t) T(i, t[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(t, e) {
rt.fn[e] = function(t, n) {
return arguments.length > 0 ? this.on(e, null, t, n) : this.trigger(e);
};
}), rt.fn.extend({
hover: function(t, e) {
return this.mouseenter(t).mouseleave(e || t);
},
bind: function(t, e, n) {
return this.on(t, null, e, n);
},
unbind: function(t, e) {
return this.off(t, null, e);
},
delegate: function(t, e, n, i) {
return this.on(e, t, n, i);
},
undelegate: function(t, e, n) {
return 1 === arguments.length ? this.off(t, "**") : this.off(e, t || "**", n);
}
});
var ie, re, oe = rt.now(), ae = /\?/, se = /#.*$/, le = /([?&])_=[^&]*/, ce = /^(.*?):[ \t]*([^\r\n]*)$/gm, ue = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/, de = /^(?:GET|HEAD)$/, pe = /^\/\//, he = /^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/, fe = rt.fn.load, me = {}, ge = {}, ve = "*/".concat("*");
try {
re = U.href;
} catch (t) {
re = z.createElement("a"), re.href = "", re = re.href;
}
ie = he.exec(re.toLowerCase()) || [], rt.fn.load = function(t, n, i) {
if ("string" != typeof t && fe) return fe.apply(this, arguments);
var r, o, a, s = this, l = t.indexOf(" ");
return l >= 0 && (r = t.slice(l), t = t.slice(0, l)), rt.isFunction(n) ? (i = n,
n = e) : n && "object" == typeof n && (o = "POST"), s.length > 0 && rt.ajax({
url: t,
type: o,
dataType: "html",
data: n
}).done(function(t) {
a = arguments, s.html(r ? rt("<div>").append(rt.parseHTML(t)).find(r) : t);
}).complete(i && function(t, e) {
s.each(i, a || [ t.responseText, e, t ]);
}), this;
}, rt.each([ "ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend" ], function(t, e) {
rt.fn[e] = function(t) {
return this.on(e, t);
};
}), rt.extend({
active: 0,
lastModified: {},
etag: {},
ajaxSettings: {
url: re,
type: "GET",
isLocal: ue.test(ie[1]),
global: !0,
processData: !0,
async: !0,
contentType: "application/x-www-form-urlencoded; charset=UTF-8",
accepts: {
"*": ve,
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(t, e) {
return e ? N(N(t, rt.ajaxSettings), e) : N(rt.ajaxSettings, t);
},
ajaxPrefilter: I(me),
ajaxTransport: I(ge),
ajax: function(t, n) {
function i(t, n, i, s) {
var c, d, b, y, w, C = n;
2 !== x && (x = 2, l && clearTimeout(l), r = e, a = s || "", S.readyState = t > 0 ? 4 : 0,
c = t >= 200 && t < 300 || 304 === t, 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 === t || "HEAD" === p.type ? C = "nocontent" : 304 === t ? C = "notmodified" : (C = y.state,
d = y.data, b = y.error, c = !b)) : (b = C, !t && C || (C = "error", t < 0 && (t = 0))),
S.status = t, S.statusText = (n || C) + "", c ? m.resolveWith(h, [ d, C, S ]) : m.rejectWith(h, [ S, C, b ]),
S.statusCode(v), v = e, 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 t && (n = t, t = e), 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(t) {
var e;
if (2 === x) {
if (!s) for (s = {}; e = ce.exec(a); ) s[e[1].toLowerCase()] = e[2];
e = s[t.toLowerCase()];
}
return null == e ? null : e;
},
getAllResponseHeaders: function() {
return 2 === x ? a : null;
},
setRequestHeader: function(t, e) {
var n = t.toLowerCase();
return x || (t = y[n] = y[n] || t, b[t] = e), this;
},
overrideMimeType: function(t) {
return x || (p.mimeType = t), this;
},
statusCode: function(t) {
var e;
if (t) if (x < 2) for (e in t) v[e] = [ v[e], t[e] ]; else S.always(t[S.status]);
return this;
},
abort: function(t) {
var e = t || w;
return r && r.abort(e), i(0, e), this;
}
};
if (m.promise(S).complete = g.add, S.success = S.done, S.error = S.fail, p.url = ((t || p.url || re) + "").replace(se, "").replace(pe, ie[1] + "//"),
p.type = n.method || n.type || p.method || p.type, p.dataTypes = rt.trim(p.dataType || "*").toLowerCase().match(at) || [ "" ],
null == p.crossDomain && (c = he.exec(p.url.toLowerCase()), p.crossDomain = !(!c || c[1] === ie[1] && c[2] === ie[2] && (c[3] || ("http:" === c[1] ? "80" : "443")) === (ie[3] || ("http:" === ie[1] ? "80" : "443")))),
p.data && p.processData && "string" != typeof p.data && (p.data = rt.param(p.data, p.traditional)),
D(me, 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 = !de.test(p.type), o = p.url, p.hasContent || (p.data && (o = p.url += (ae.test(o) ? "&" : "?") + p.data,
delete p.data), !1 === p.cache && (p.url = le.test(o) ? o.replace(le, "$1_=" + oe++) : o + (ae.test(o) ? "&" : "?") + "_=" + oe++)),
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] ? ", " + ve + "; 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(ge, 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 (t) {
if (!(x < 2)) throw t;
i(-1, t);
}
} else i(-1, "No Transport");
return S;
},
getJSON: function(t, e, n) {
return rt.get(t, e, n, "json");
},
getScript: function(t, n) {
return rt.get(t, e, n, "script");
}
}), rt.each([ "get", "post" ], function(t, n) {
rt[n] = function(t, i, r, o) {
return rt.isFunction(i) && (o = o || r, r = i, i = e), rt.ajax({
url: t,
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(t) {
return rt.globalEval(t), t;
}
}
}), rt.ajaxPrefilter("script", function(t) {
t.cache === e && (t.cache = !1), t.crossDomain && (t.type = "GET");
}), rt.ajaxTransport("script", function(t) {
if (t.crossDomain) {
var e, n;
return {
send: function(i, r) {
e = rt("<script>").prop({
async: !0,
charset: t.scriptCharset,
src: t.url
}).on("load error", n = function(t) {
e.remove(), n = null, t && r("error" === t.type ? 404 : 200, t.type);
}), z.head.appendChild(e[0]);
},
abort: function() {
n && n();
}
};
}
});
var be = [], ye = /(=)\?(?=&|$)|\?\?/;
rt.ajaxSetup({
jsonp: "callback",
jsonpCallback: function() {
var t = be.pop() || rt.expando + "_" + oe++;
return this[t] = !0, t;
}
}), rt.ajaxPrefilter("json jsonp", function(n, i, r) {
var o, a, s, l = !1 !== n.jsonp && (ye.test(n.url) ? "url" : "string" == typeof n.data && !(n.contentType || "").indexOf("application/x-www-form-urlencoded") && ye.test(n.data) && "data");
if (l || "jsonp" === n.dataTypes[0]) return o = n.jsonpCallback = rt.isFunction(n.jsonpCallback) ? n.jsonpCallback() : n.jsonpCallback,
l ? n[l] = n[l].replace(ye, "$1" + o) : !1 !== n.jsonp && (n.url += (ae.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 = t[o], t[o] = function() {
s = arguments;
}, r.always(function() {
t[o] = a, n[o] && (n.jsonpCallback = i.jsonpCallback, be.push(o)), s && rt.isFunction(a) && a(s[0]),
s = a = e;
}), "script";
}), rt.ajaxSettings.xhr = function() {
try {
return new XMLHttpRequest();
} catch (t) {}
};
var xe = rt.ajaxSettings.xhr(), we = {
0: 200,
1223: 204
}, Se = 0, Ce = {};
t.ActiveXObject && rt(t).on("unload", function() {
for (var t in Ce) Ce[t]();
Ce = e;
}), rt.support.cors = !!xe && "withCredentials" in xe, rt.support.ajax = xe = !!xe,
rt.ajaxTransport(function(t) {
var n;
if (rt.support.cors || xe && !t.crossDomain) return {
send: function(i, r) {
var o, a, s = t.xhr();
if (s.open(t.type, t.url, t.async, t.username, t.password), t.xhrFields) for (o in t.xhrFields) s[o] = t.xhrFields[o];
t.mimeType && s.overrideMimeType && s.overrideMimeType(t.mimeType), t.crossDomain || i["X-Requested-With"] || (i["X-Requested-With"] = "XMLHttpRequest");
for (o in i) s.setRequestHeader(o, i[o]);
n = function(t) {
return function() {
n && (delete Ce[a], n = s.onload = s.onerror = null, "abort" === t ? s.abort() : "error" === t ? r(s.status || 404, s.statusText) : r(we[s.status] || s.status, s.statusText, "string" == typeof s.responseText ? {
text: s.responseText
} : e, s.getAllResponseHeaders()));
};
}, s.onload = n(), s.onerror = n("error"), n = Ce[a = Se++] = n("abort"), s.send(t.hasContent && t.data || null);
},
abort: function() {
n && n();
}
};
});
var _e, ke, Ee = /^(?:toggle|show|hide)$/, Te = new RegExp("^(?:([+-])=|)(" + ot + ")([a-z%]*)$", "i"), Ie = /queueHooks$/, De = [ F ], Ne = {
"*": [ function(t, e) {
var n = this.createTween(t, e), i = n.cur(), r = Te.exec(e), o = r && r[3] || (rt.cssNumber[t] ? "" : "px"), a = (rt.cssNumber[t] || "px" !== o && +i) && Te.exec(rt.css(n.elem, t)), 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, t, 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(t, e) {
rt.isFunction(t) ? (e = t, t = [ "*" ]) : t = t.split(" ");
for (var n, i = 0, r = t.length; i < r; i++) n = t[i], Ne[n] = Ne[n] || [], Ne[n].unshift(e);
},
prefilter: function(t, e) {
e ? De.unshift(t) : De.push(t);
}
}), rt.Tween = B, B.prototype = {
constructor: B,
init: function(t, e, n, i, r, o) {
this.elem = t, this.prop = n, this.easing = r || "swing", this.options = e, this.start = this.now = this.cur(),
this.end = i, this.unit = o || (rt.cssNumber[n] ? "" : "px");
},
cur: function() {
var t = B.propHooks[this.prop];
return t && t.get ? t.get(this) : B.propHooks._default.get(this);
},
run: function(t) {
var e, n = B.propHooks[this.prop];
return this.options.duration ? this.pos = e = rt.easing[this.easing](t, this.options.duration * t, 0, 1, this.options.duration) : this.pos = e = t,
this.now = (this.end - this.start) * e + 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(t) {
var e;
return null == t.elem[t.prop] || t.elem.style && null != t.elem.style[t.prop] ? (e = rt.css(t.elem, t.prop, ""),
e && "auto" !== e ? e : 0) : t.elem[t.prop];
},
set: function(t) {
rt.fx.step[t.prop] ? rt.fx.step[t.prop](t) : t.elem.style && (null != t.elem.style[rt.cssProps[t.prop]] || rt.cssHooks[t.prop]) ? rt.style(t.elem, t.prop, t.now + t.unit) : t.elem[t.prop] = t.now;
}
}
}, B.propHooks.scrollTop = B.propHooks.scrollLeft = {
set: function(t) {
t.elem.nodeType && t.elem.parentNode && (t.elem[t.prop] = t.now);
}
}, rt.each([ "toggle", "show", "hide" ], function(t, e) {
var n = rt.fn[e];
rt.fn[e] = function(t, i, r) {
return null == t || "boolean" == typeof t ? n.apply(this, arguments) : this.animate(j(e, !0), t, i, r);
};
}), rt.fn.extend({
fadeTo: function(t, e, n, i) {
return this.filter(y).css("opacity", 0).show().end().animate({
opacity: e
}, t, n, i);
},
animate: function(t, e, n, i) {
var r = rt.isEmptyObject(t), o = rt.speed(e, n, i), a = function() {
var e = P(this, rt.extend({}, t), o);
(r || mt.get(this, "finish")) && e.stop(!0);
};
return a.finish = a, r || !1 === o.queue ? this.each(a) : this.queue(o.queue, a);
},
stop: function(t, n, i) {
var r = function(t) {
var e = t.stop;
delete t.stop, e(i);
};
return "string" != typeof t && (i = n, n = t, t = e), n && !1 !== t && this.queue(t || "fx", []),
this.each(function() {
var e = !0, n = null != t && t + "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 && Ie.test(n) && r(a[n]);
for (n = o.length; n--; ) o[n].elem !== this || null != t && o[n].queue !== t || (o[n].anim.stop(i),
e = !1, o.splice(n, 1));
!e && i || rt.dequeue(this, t);
});
},
finish: function(t) {
return !1 !== t && (t = t || "fx"), this.each(function() {
var e, n = mt.get(this), i = n[t + "queue"], r = n[t + "queueHooks"], o = rt.timers, a = i ? i.length : 0;
for (n.finish = !0, rt.queue(this, t, []), r && r.stop && r.stop.call(this, !0),
e = o.length; e--; ) o[e].elem === this && o[e].queue === t && (o[e].anim.stop(!0),
o.splice(e, 1));
for (e = 0; e < a; e++) i[e] && i[e].finish && i[e].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(t, e) {
rt.fn[t] = function(t, n, i) {
return this.animate(e, t, n, i);
};
}), rt.speed = function(t, e, n) {
var i = t && "object" == typeof t ? rt.extend({}, t) : {
complete: n || !n && e || rt.isFunction(t) && t,
duration: t,
easing: n && e || e && !rt.isFunction(e) && e
};
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(t) {
return t;
},
swing: function(t) {
return .5 - Math.cos(t * Math.PI) / 2;
}
}, rt.timers = [], rt.fx = B.prototype.init, rt.fx.tick = function() {
var t, n = rt.timers, i = 0;
for (_e = rt.now(); i < n.length; i++) (t = n[i])() || n[i] !== t || n.splice(i--, 1);
n.length || rt.fx.stop(), _e = e;
}, rt.fx.timer = function(t) {
t() && rt.timers.push(t) && rt.fx.start();
}, rt.fx.interval = 13, rt.fx.start = function() {
ke || (ke = setInterval(rt.fx.tick, rt.fx.interval));
}, rt.fx.stop = function() {
clearInterval(ke), ke = null;
}, rt.fx.speeds = {
slow: 600,
fast: 200,
_default: 400
}, rt.fx.step = {}, rt.expr && rt.expr.filters && (rt.expr.filters.animated = function(t) {
return rt.grep(rt.timers, function(e) {
return t === e.elem;
}).length;
}), rt.fn.offset = function(t) {
if (arguments.length) return t === e ? this : this.each(function(e) {
rt.offset.setOffset(this, t, e);
});
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(t, e, n) {
var i, r, o, a, s, l, c, u = rt.css(t, "position"), d = rt(t), p = {};
"static" === u && (t.style.position = "relative"), s = d.offset(), o = rt.css(t, "top"),
l = rt.css(t, "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(e) && (e = e.call(t, n, s)), null != e.top && (p.top = e.top - s.top + a),
null != e.left && (p.left = e.left - s.left + r), "using" in e ? e.using.call(t, p) : d.css(p);
}
}, rt.fn.extend({
position: function() {
if (this[0]) {
var t, e, n = this[0], i = {
top: 0,
left: 0
};
return "fixed" === rt.css(n, "position") ? e = n.getBoundingClientRect() : (t = this.offsetParent(),
e = this.offset(), rt.nodeName(t[0], "html") || (i = t.offset()), i.top += rt.css(t[0], "borderTopWidth", !0),
i.left += rt.css(t[0], "borderLeftWidth", !0)), {
top: e.top - i.top - rt.css(n, "marginTop", !0),
left: e.left - i.left - rt.css(n, "marginLeft", !0)
};
}
},
offsetParent: function() {
return this.map(function() {
for (var t = this.offsetParent || V; t && !rt.nodeName(t, "html") && "static" === rt.css(t, "position"); ) t = t.offsetParent;
return t || 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 === e ? s ? s[i] : n[o] : void (s ? s.scrollTo(r ? t.pageXOffset : a, r ? a : t.pageYOffset) : n[o] = a);
}, n, o, arguments.length, null);
};
}), rt.each({
Height: "height",
Width: "width"
}, function(t, n) {
rt.each({
padding: "inner" + t,
content: n,
"": "outer" + t
}, 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" + t] : 9 === n.nodeType ? (o = n.documentElement,
Math.max(n.body["scroll" + t], o["scroll" + t], n.body["offset" + t], o["offset" + t], o["client" + t])) : r === e ? rt.css(n, i, s) : rt.style(n, i, r, s);
}, n, a ? r : e, 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 t && "object" == typeof t.document && (t.jQuery = t.$ = rt);
}(window), window.rangy = function() {
function t(t, e) {
var n = typeof t[e];
return n == d || !(n != u || !t[e]) || "unknown" == n;
}
function e(t, e) {
return !(typeof t[e] != u || !t[e]);
}
function n(t, e) {
return typeof t[e] != p;
}
function i(t) {
return function(e, n) {
for (var i = n.length; i--; ) if (!t(e, n[i])) return !1;
return !0;
};
}
function r(t) {
return t && v(t, g) && y(t, m);
}
function o(t) {
window.alert("Rangy not supported in your browser. Reason: " + t), x.initialized = !0,
x.supported = !1;
}
function a(t) {
var e = "Rangy warning: " + t;
x.config.alertOnWarn ? window.alert(e) : typeof window.console != p && typeof window.console.log != p && window.console.log(e);
}
function s() {
if (!x.initialized) {
var n, i = !1, a = !1;
t(document, "createRange") && (n = document.createRange(), v(n, f) && y(n, h) && (i = !0),
n.detach());
var s = e(document, "body") ? document.body : document.getElementsByTagName("body")[0];
s && t(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; c < u; ++c) try {
l[c](x);
} catch (n) {
e(window, "console") && t(window.console, "log") && window.console.log("Init listener threw an exception. Continuing.", n);
}
}
}
function l(t) {
t = t || window, s();
for (var e = 0, n = C.length; e < n; ++e) C[e](t);
}
function c(t) {
this.name = t, 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(t), b = i(e), y = i(n), x = {
version: "1.2.3",
initialized: !1,
supported: !0,
util: {
isHostMethod: t,
isHostObject: e,
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(t, e) {
for (var n in e) e.hasOwnProperty(n) && (t[n] = e[n]);
} : o("hasOwnProperty not supported");
var w = [], S = [];
x.init = s, x.addInitListener = function(t) {
x.initialized ? t(x) : w.push(t);
};
var C = [];
x.addCreateMissingNativeApiListener = function(t) {
C.push(t);
}, x.createMissingNativeApi = l, c.prototype.fail = function(t) {
throw this.initialized = !0, this.supported = !1, new Error("Module '" + this.name + "' failed to load: " + t);
}, c.prototype.warn = function(t) {
x.warn("Module " + this.name + ": " + t);
}, c.prototype.createError = function(t) {
return new Error("Error in Rangy " + this.name + " module: " + t);
}, x.createModule = function(t, e) {
var n = new c(t);
x.modules[t] = n, S.push(function(t) {
e(t, n), n.initialized = !0, n.supported = !0;
});
}, x.requireModules = function(t) {
for (var e, n, i = 0, r = t.length; i < r; ++i) {
if (n = t[i], !((e = x.modules[n]) && e instanceof c)) throw new Error("Module '" + n + "' not found");
if (!e.supported) throw new Error("Module '" + n + "' not supported");
}
};
var _ = !1, k = function(t) {
_ || (_ = !0, x.initialized || s());
};
return typeof window == p ? void o("No window found") : typeof document == p ? void o("No document found") : (t(document, "addEventListener") && document.addEventListener("DOMContentLoaded", k, !1),
t(window, "addEventListener") ? window.addEventListener("load", k, !1) : t(window, "attachEvent") ? window.attachEvent("onload", k) : o("Window does not have required addEventListener or attachEvent method"),
x);
}(), rangy.createModule("DomUtil", function(t, e) {
function n(t) {
var e;
return typeof t.namespaceURI == k || null === (e = t.namespaceURI) || "http://www.w3.org/1999/xhtml" == e;
}
function i(t) {
var e = t.parentNode;
return 1 == e.nodeType ? e : null;
}
function r(t) {
for (var e = 0; t = t.previousSibling; ) e++;
return e;
}
function o(t) {
var e;
return c(t) ? t.length : (e = t.childNodes) ? e.length : 0;
}
function a(t, e) {
var n, i = [];
for (n = t; n; n = n.parentNode) i.push(n);
for (n = e; n; n = n.parentNode) if (D(i, n)) return n;
return null;
}
function s(t, e, n) {
for (var i = n ? e : e.parentNode; i; ) {
if (i === t) return !0;
i = i.parentNode;
}
return !1;
}
function l(t, e, n) {
for (var i, r = n ? t : t.parentNode; r; ) {
if ((i = r.parentNode) === e) return r;
r = i;
}
return null;
}
function c(t) {
var e = t.nodeType;
return 3 == e || 4 == e || 8 == e;
}
function u(t, e) {
var n = e.nextSibling, i = e.parentNode;
return n ? i.insertBefore(t, n) : i.appendChild(t), t;
}
function d(t, e) {
var n = t.cloneNode(!1);
return n.deleteData(0, e), t.deleteData(e, t.length - e), u(n, t), n;
}
function p(t) {
if (9 == t.nodeType) return t;
if (typeof t.ownerDocument != k) return t.ownerDocument;
if (typeof t.document != k) return t.document;
if (t.parentNode) return p(t.parentNode);
throw new Error("getDocument: no document found for node");
}
function h(t) {
var e = p(t);
if (typeof e.defaultView != k) return e.defaultView;
if (typeof e.parentWindow != k) return e.parentWindow;
throw new Error("Cannot get a window object for node");
}
function f(t) {
if (typeof t.contentDocument != k) return t.contentDocument;
if (typeof t.contentWindow != k) return t.contentWindow.document;
throw new Error("getIframeWindow: No Document object found for iframe element");
}
function m(t) {
if (typeof t.contentWindow != k) return t.contentWindow;
if (typeof t.contentDocument != k) return t.contentDocument.defaultView;
throw new Error("getIframeWindow: No Window object found for iframe element");
}
function g(t) {
return E.isHostObject(t, "body") ? t.body : t.getElementsByTagName("body")[0];
}
function v(t) {
for (var e; e = t.parentNode; ) t = e;
return t;
}
function b(t, e, n, i) {
var o, s, c, u, d;
if (t == n) return e === i ? 0 : e < i ? -1 : 1;
if (o = l(n, t, !0)) return e <= r(o) ? -1 : 1;
if (o = l(t, n, !0)) return r(o) < i ? -1 : 1;
if (s = a(t, n), c = t === s ? s : l(t, 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(t) {
for (var e, n = p(t).createDocumentFragment(); e = t.firstChild; ) n.appendChild(e);
return n;
}
function x(t) {
if (!t) return "[No node]";
if (c(t)) return '"' + t.data + '"';
if (1 == t.nodeType) {
var e = t.id ? ' id="' + t.id + '"' : "";
return "<" + t.nodeName + e + ">[" + t.childNodes.length + "]";
}
return t.nodeName;
}
function w(t) {
this.root = t, this._next = t;
}
function S(t) {
return new w(t);
}
function C(t, e) {
this.node = t, this.offset = e;
}
function _(t) {
this.code = this[t], this.codeName = t, this.message = "DOMException: " + this.codeName;
}
var k = "undefined", E = t.util;
E.areHostMethods(document, [ "createDocumentFragment", "createElement", "createTextNode" ]) || e.fail("document missing a Node creation method"),
E.isHostMethod(document, "getElementsByTagName") || e.fail("document missing getElementsByTagName method");
var T = document.createElement("div");
E.areHostMethods(T, [ "insertBefore", "appendChild", "cloneNode" ] || !E.areHostObjects(T, [ "previousSibling", "nextSibling", "childNodes", "parentNode" ])) || e.fail("Incomplete Element implementation"),
E.isHostProperty(T, "innerHTML") || e.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" ])) || e.fail("Incomplete Text Node implementation");
var D = function(t, e) {
for (var n = t.length; n--; ) if (t[n] === e) return !0;
return !1;
};
w.prototype = {
_current: null,
hasNext: function() {
return !!this._next;
},
next: function() {
var t, e, n = this._current = this._next;
if (this._current) if (t = n.firstChild) this._next = t; else {
for (e = null; n !== this.root && !(e = n.nextSibling); ) n = n.parentNode;
this._next = e;
}
return this._current;
},
detach: function() {
this._current = this._next = this.root = null;
}
}, C.prototype = {
equals: function(t) {
return this.node === t.node & this.offset == t.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;
}, t.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
}, t.DOMException = _;
}), rangy.createModule("DomRange", function(t, e) {
function n(t, e) {
return 3 != t.nodeType && (B.isAncestorOf(t, e.startContainer, !0) || B.isAncestorOf(t, e.endContainer, !0));
}
function i(t) {
return B.getDocument(t.startContainer);
}
function r(t, e, n) {
var i = t._listeners[e];
if (i) for (var r = 0, o = i.length; r < o; ++r) i[r].call(t, {
target: t,
args: n
});
}
function o(t) {
return new j(t.parentNode, B.getNodeIndex(t));
}
function a(t) {
return new j(t.parentNode, B.getNodeIndex(t) + 1);
}
function s(t, e, n) {
var i = 11 == t.nodeType ? t.firstChild : t;
return B.isCharacterDataNode(e) ? n == e.length ? B.insertAfter(t, e) : e.parentNode.insertBefore(t, 0 == n ? e : B.splitDataNode(e, n)) : n >= e.childNodes.length ? e.appendChild(t) : e.insertBefore(t, e.childNodes[n]),
i;
}
function l(t) {
for (var e, n, r, o = i(t.range).createDocumentFragment(); n = t.next(); ) {
if (e = t.isPartiallySelectedSubtree(), n = n.cloneNode(!e), e && (r = t.getSubtreeIterator(),
n.appendChild(l(r)), r.detach(!0)), 10 == n.nodeType) throw new $("HIERARCHY_REQUEST_ERR");
o.appendChild(n);
}
return o;
}
function c(t, e, n) {
var i, r;
n = n || {
stop: !1
};
for (var o, a; o = t.next(); ) if (t.isPartiallySelectedSubtree()) {
if (!1 === e(o)) return void (n.stop = !0);
if (a = t.getSubtreeIterator(), c(a, e, n), a.detach(!0), n.stop) return;
} else for (i = B.createIterator(o); r = i.next(); ) if (!1 === e(r)) return void (n.stop = !0);
}
function u(t) {
for (var e; t.next(); ) t.isPartiallySelectedSubtree() ? (e = t.getSubtreeIterator(),
u(e), e.detach(!0)) : t.remove();
}
function d(t) {
for (var e, n, r = i(t.range).createDocumentFragment(); e = t.next(); ) {
if (t.isPartiallySelectedSubtree() ? (e = e.cloneNode(!1), n = t.getSubtreeIterator(),
e.appendChild(d(n)), n.detach(!0)) : t.remove(), 10 == e.nodeType) throw new $("HIERARCHY_REQUEST_ERR");
r.appendChild(e);
}
return r;
}
function p(t, e, n) {
var i, r = !(!e || !e.length), o = !!n;
r && (i = new RegExp("^(" + e.join("|") + ")$"));
var a = [];
return c(new f(t, (!1)), function(t) {
r && !i.test(t.nodeType) || o && !n(t) || a.push(t);
}), a;
}
function h(t) {
return "[" + (void 0 === t.getName ? "Range" : t.getName()) + "(" + B.inspectNode(t.startContainer) + ":" + t.startOffset + ", " + B.inspectNode(t.endContainer) + ":" + t.endOffset + ")]";
}
function f(t, e) {
if (this.range = t, this.clonePartiallySelectedTextNodes = e, !t.collapsed) {
this.sc = t.startContainer, this.so = t.startOffset, this.ec = t.endContainer, this.eo = t.endOffset;
var n = t.commonAncestorContainer;
this.sc === this.ec && B.isCharacterDataNode(this.sc) ? (this.isSingleCharacterDataNode = !0,
this._first = this._last = this._next = this.sc) : (this._first = this._next = this.sc !== n || B.isCharacterDataNode(this.sc) ? B.getClosestAncestorIn(this.sc, n, !0) : this.sc.childNodes[this.so],
this._last = this.ec !== n || B.isCharacterDataNode(this.ec) ? B.getClosestAncestorIn(this.ec, n, !0) : this.ec.childNodes[this.eo - 1]);
}
}
function m(t) {
this.code = this[t], this.codeName = t, this.message = "RangeException: " + this.codeName;
}
function g(t, e, n) {
this.nodes = p(t, e, n), this._next = this.nodes[0], this._position = 0;
}
function v(t) {
return function(e, n) {
for (var i, r = n ? e : e.parentNode; r; ) {
if (i = r.nodeType, B.arrayContains(t, i)) return r;
r = r.parentNode;
}
return null;
};
}
function b(t, e) {
if (Q(t, e)) throw new m("INVALID_NODE_TYPE_ERR");
}
function y(t) {
if (!t.startContainer) throw new $("INVALID_STATE_ERR");
}
function x(t, e) {
if (!B.arrayContains(e, t.nodeType)) throw new m("INVALID_NODE_TYPE_ERR");
}
function w(t, e) {
if (e < 0 || e > (B.isCharacterDataNode(t) ? t.length : t.childNodes.length)) throw new $("INDEX_SIZE_ERR");
}
function S(t, e) {
if (W(t, !0) !== W(e, !0)) throw new $("WRONG_DOCUMENT_ERR");
}
function C(t) {
if (X(t, !0)) throw new $("NO_MODIFICATION_ALLOWED_ERR");
}
function _(t, e) {
if (!t) throw new $(e);
}
function k(t) {
return !B.arrayContains(G, t.nodeType) && !W(t, !0);
}
function E(t, e) {
return e <= (B.isCharacterDataNode(t) ? t.length : t.childNodes.length);
}
function T(t) {
return !!t.startContainer && !!t.endContainer && !k(t.startContainer) && !k(t.endContainer) && E(t.startContainer, t.startOffset) && E(t.endContainer, t.endOffset);
}
function I(t) {
if (y(t), !T(t)) throw new Error("Range error: Range is no longer valid after DOM mutation (" + t.inspect() + ")");
}
function D() {}
function N(t) {
t.START_TO_START = tt, t.START_TO_END = et, t.END_TO_END = nt, t.END_TO_START = it,
t.NODE_BEFORE = rt, t.NODE_AFTER = ot, t.NODE_BEFORE_AND_AFTER = at, t.NODE_INSIDE = st;
}
function M(t) {
N(t), N(t.prototype);
}
function L(t, e) {
return function() {
I(this);
var n, i, r = this.startContainer, o = this.startOffset, s = this.commonAncestorContainer, l = new f(this, (!0));
r !== s && (n = B.getClosestAncestorIn(r, s, !0), i = a(n), r = i.node, o = i.offset),
c(l, C), l.reset();
var u = t(l);
return l.detach(), e(this, r, o, r, o), u;
};
}
function A(e, i, r) {
function s(t, e) {
return function(n) {
y(this), x(n, q), x(V(n), G);
var i = (t ? o : a)(n);
(e ? l : c)(this, i.node, i.offset);
};
}
function l(t, e, n) {
var r = t.endContainer, o = t.endOffset;
e === t.startContainer && n === t.startOffset || (V(e) == V(r) && 1 != B.comparePoints(e, n, r, o) || (r = e,
o = n), i(t, e, n, r, o));
}
function c(t, e, n) {
var r = t.startContainer, o = t.startOffset;
e === t.endContainer && n === t.endOffset || (V(e) == V(r) && -1 != B.comparePoints(e, n, r, o) || (r = e,
o = n), i(t, r, o, e, n));
}
function p(t, e, n) {
e === t.startContainer && n === t.startOffset && e === t.endContainer && n === t.endOffset || i(t, e, n, e, n);
}
e.prototype = new D(), t.util.extend(e.prototype, {
setStart: function(t, e) {
y(this), b(t, !0), w(t, e), l(this, t, e);
},
setEnd: function(t, e) {
y(this), b(t, !0), w(t, e), c(this, t, e);
},
setStartBefore: s(!0, !0),
setStartAfter: s(!1, !0),
setEndBefore: s(!0, !1),
setEndAfter: s(!1, !1),
collapse: function(t) {
I(this), t ? i(this, this.startContainer, this.startOffset, this.startContainer, this.startOffset) : i(this, this.endContainer, this.endOffset, this.endContainer, this.endOffset);
},
selectNodeContents: function(t) {
y(this), b(t, !0), i(this, t, 0, t, B.getNodeLength(t));
},
selectNode: function(t) {
y(this), b(t, !1), x(t, q);
var e = o(t), n = a(t);
i(this, e.node, e.offset, n.node, n.offset);
},
extractContents: L(d, i),
deleteContents: L(u, i),
canSurroundContents: function() {
I(this), C(this.startContainer), C(this.endContainer);
var t = new f(this, (!0)), e = t._first && n(t._first, this) || t._last && n(t._last, this);
return t.detach(), !e;
},
detach: function() {
r(this);
},
splitBoundaries: function() {
I(this);
var t = this.startContainer, e = this.startOffset, n = this.endContainer, r = this.endOffset, o = t === n;
B.isCharacterDataNode(n) && r > 0 && r < n.length && B.splitDataNode(n, r), B.isCharacterDataNode(t) && e > 0 && e < t.length && (t = B.splitDataNode(t, e),
o ? (r -= e, n = t) : n == t.parentNode && r >= B.getNodeIndex(t) && r++, e = 0),
i(this, t, e, n, r);
},
normalizeBoundaries: function() {
I(this);
var t = this.startContainer, e = this.startOffset, n = this.endContainer, r = this.endOffset, o = function(t) {
var e = t.nextSibling;
e && e.nodeType == t.nodeType && (n = t, r = t.length, t.appendData(e.data), e.parentNode.removeChild(e));
}, a = function(i) {
var o = i.previousSibling;
if (o && o.nodeType == i.nodeType) {
t = i;
var a = i.length;
if (e = o.length, i.insertData(0, o.data), o.parentNode.removeChild(o), t == n) r += e,
n = t; else if (n == i.parentNode) {
var s = B.getNodeIndex(i);
r == s ? (n = i, r = a) : r > s && r--;
}
}
}, s = !0;
if (B.isCharacterDataNode(n)) n.length == r && o(n); else {
if (r > 0) {
var l = n.childNodes[r - 1];
l && B.isCharacterDataNode(l) && o(l);
}
s = !this.collapsed;
}
if (s) {
if (B.isCharacterDataNode(t)) 0 == e && a(t); else if (e < t.childNodes.length) {
var c = t.childNodes[e];
c && B.isCharacterDataNode(c) && a(c);
}
} else t = n, e = r;
i(this, t, e, n, r);
},
collapseToPoint: function(t, e) {
y(this), b(t, !0), w(t, e), p(this, t, e);
}
}), M(e);
}
function R(t) {
t.collapsed = t.startContainer === t.endContainer && t.startOffset === t.endOffset,
t.commonAncestorContainer = t.collapsed ? t.startContainer : B.getCommonAncestor(t.startContainer, t.endContainer);
}
function P(t, e, n, i, o) {
var a = t.startContainer !== e || t.startOffset !== n, s = t.endContainer !== i || t.endOffset !== o;
t.startContainer = e, t.startOffset = n, t.endContainer = i, t.endOffset = o, R(t),
r(t, "boundarychange", {
startMoved: a,
endMoved: s
});
}
function O(t) {
y(t), t.startContainer = t.startOffset = t.endContainer = t.endOffset = null, t.collapsed = t.commonAncestorContainer = null,
r(t, "detach", null), t._listeners = null;
}
function F(t) {
this.startContainer = t, this.startOffset = 0, this.endContainer = t, this.endOffset = 0,
this._listeners = {
boundarychange: [],
detach: []
}, R(this);
}
t.requireModules([ "DomUtil" ]);
var B = t.dom, j = B.DomPosition, $ = t.DOMException;
f.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 t = this._current = this._next;
return t && (this._next = t !== this._last ? t.nextSibling : null, B.isCharacterDataNode(t) && this.clonePartiallySelectedTextNodes && (t === this.ec && (t = t.cloneNode(!0)).deleteData(this.eo, t.length - this.eo),
this._current === this.sc && (t = t.cloneNode(!0)).deleteData(0, this.so))), t;
},
remove: function() {
var t, e, n = this._current;
!B.isCharacterDataNode(n) || n !== this.sc && n !== this.ec ? n.parentNode && n.parentNode.removeChild(n) : (t = n === this.sc ? this.so : 0,
e = n === this.ec ? this.eo : n.length, t != e && n.deleteData(t, e - t));
},
isPartiallySelectedSubtree: function() {
return n(this._current, this.range);
},
getSubtreeIterator: function() {
var t;
if (this.isSingleCharacterDataNode) t = this.range.cloneRange(), t.collapse(); else {
t = new F(i(this.range));
var e = this._current, n = e, r = 0, o = e, a = B.getNodeLength(e);
B.isAncestorOf(e, this.sc, !0) && (n = this.sc, r = this.so), B.isAncestorOf(e, this.ec, !0) && (o = this.ec,
a = this.eo), P(t, n, r, o, a);
}
return new f(t, this.clonePartiallySelectedTextNodes);
},
detach: function(t) {
t && this.range.detach(), this.range = this._current = this._next = this._first = this._last = this.sc = this.so = this.ec = this.eo = null;
}
}, m.prototype = {
BAD_BOUNDARYPOINTS_ERR: 1,
INVALID_NODE_TYPE_ERR: 2
}, m.prototype.toString = function() {
return this.message;
}, g.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 q = [ 1, 3, 4, 5, 7, 8, 10 ], G = [ 2, 9, 11 ], H = [ 5, 6, 10, 12 ], U = [ 1, 3, 4, 5, 7, 8, 10, 11 ], z = [ 1, 3, 4, 5, 7, 8 ], V = B.getRootContainer, W = v([ 9, 11 ]), X = v(H), Q = v([ 6, 10, 12 ]), Y = document.createElement("style"), K = !1;
try {
Y.innerHTML = "<b>x</b>", K = 3 == Y.firstChild.nodeType;
} catch (t) {}
t.features.htmlParsingConforms = K;
var J = K ? function(t) {
var e = this.startContainer, n = B.getDocument(e);
if (!e) throw new $("INVALID_STATE_ERR");
var i = null;
return 1 == e.nodeType ? i = e : B.isCharacterDataNode(e) && (i = B.parentElement(e)),
i = null === i || "HTML" == i.nodeName && B.isHtmlNamespace(B.getDocument(i).documentElement) && B.isHtmlNamespace(i) ? n.createElement("body") : i.cloneNode(!1),
i.innerHTML = t, B.fragmentFromNodeChildren(i);
} : function(t) {
y(this);
var e = i(this), n = e.createElement("body");
return n.innerHTML = t, B.fragmentFromNodeChildren(n);
}, Z = [ "startContainer", "startOffset", "endContainer", "endOffset", "collapsed", "commonAncestorContainer" ], tt = 0, et = 1, nt = 2, it = 3, rt = 0, ot = 1, at = 2, st = 3;
D.prototype = {
attachListener: function(t, e) {
this._listeners[t].push(e);
},
compareBoundaryPoints: function(t, e) {
I(this), S(this.startContainer, e.startContainer);
var n, i, r, o, a = t == it || t == tt ? "start" : "end", s = t == et || t == tt ? "start" : "end";
return n = this[a + "Container"], i = this[a + "Offset"], r = e[s + "Container"],
o = e[s + "Offset"], B.comparePoints(n, i, r, o);
},
insertNode: function(t) {
if (I(this), x(t, U), C(this.startContainer), B.isAncestorOf(t, this.startContainer, !0)) throw new $("HIERARCHY_REQUEST_ERR");
var e = s(t, this.startContainer, this.startOffset);
this.setStartBefore(e);
},
cloneContents: function() {
I(this);
var t, e;
if (this.collapsed) return i(this).createDocumentFragment();
if (this.startContainer === this.endContainer && B.isCharacterDataNode(this.startContainer)) return t = this.startContainer.cloneNode(!0),
t.data = t.data.slice(this.startOffset, this.endOffset), e = i(this).createDocumentFragment(),
e.appendChild(t), e;
var n = new f(this, (!0));
return t = l(n), n.detach(), t;
},
canSurroundContents: function() {
I(this), C(this.startContainer), C(this.endContainer);
var t = new f(this, (!0)), e = t._first && n(t._first, this) || t._last && n(t._last, this);
return t.detach(), !e;
},
surroundContents: function(t) {
if (x(t, z), !this.canSurroundContents()) throw new m("BAD_BOUNDARYPOINTS_ERR");
var e = this.extractContents();
if (t.hasChildNodes()) for (;t.lastChild; ) t.removeChild(t.lastChild);
s(t, this.startContainer, this.startOffset), t.appendChild(e), this.selectNode(t);
},
cloneRange: function() {
I(this);
for (var t, e = new F(i(this)), n = Z.length; n--; ) t = Z[n], e[t] = this[t];
return e;
},
toString: function() {
I(this);
var t = this.startContainer;
if (t === this.endContainer && B.isCharacterDataNode(t)) return 3 == t.nodeType || 4 == t.nodeType ? t.data.slice(this.startOffset, this.endOffset) : "";
var e = [], n = new f(this, (!0));
return c(n, function(t) {
3 != t.nodeType && 4 != t.nodeType || e.push(t.data);
}), n.detach(), e.join("");
},
compareNode: function(t) {
I(this);
var e = t.parentNode, n = B.getNodeIndex(t);
if (!e) throw new $("NOT_FOUND_ERR");
var i = this.comparePoint(e, n), r = this.comparePoint(e, n + 1);
return i < 0 ? r > 0 ? at : rt : r > 0 ? ot : st;
},
comparePoint: function(t, e) {
return I(this), _(t, "HIERARCHY_REQUEST_ERR"), S(t, this.startContainer), B.comparePoints(t, e, this.startContainer, this.startOffset) < 0 ? -1 : B.comparePoints(t, e, this.endContainer, this.endOffset) > 0 ? 1 : 0;
},
createContextualFragment: J,
toHtml: function() {
I(this);
var t = i(this).createElement("div");
return t.appendChild(this.cloneContents()), t.innerHTML;
},
intersectsNode: function(t, e) {
if (I(this), _(t, "NOT_FOUND_ERR"), B.getDocument(t) !== i(this)) return !1;
var n = t.parentNode, r = B.getNodeIndex(t);
_(n, "NOT_FOUND_ERR");
var o = B.comparePoints(n, r, this.endContainer, this.endOffset), a = B.comparePoints(n, r + 1, this.startContainer, this.startOffset);
return e ? o <= 0 && a >= 0 : o < 0 && a > 0;
},
isPointInRange: function(t, e) {
return I(this), _(t, "HIERARCHY_REQUEST_ERR"), S(t, this.startContainer), B.comparePoints(t, e, this.startContainer, this.startOffset) >= 0 && B.comparePoints(t, e, this.endContainer, this.endOffset) <= 0;
},
intersectsRange: function(t, e) {
if (I(this), i(t) != i(this)) throw new $("WRONG_DOCUMENT_ERR");
var n = B.comparePoints(this.startContainer, this.startOffset, t.endContainer, t.endOffset), r = B.comparePoints(this.endContainer, this.endOffset, t.startContainer, t.startOffset);
return e ? n <= 0 && r >= 0 : n < 0 && r > 0;
},
intersection: function(t) {
if (this.intersectsRange(t)) {
var e = B.comparePoints(this.startContainer, this.startOffset, t.startContainer, t.startOffset), n = B.comparePoints(this.endContainer, this.endOffset, t.endContainer, t.endOffset), i = this.cloneRange();
return -1 == e && i.setStart(t.startContainer, t.startOffset), 1 == n && i.setEnd(t.endContainer, t.endOffset),
i;
}
return null;
},
union: function(t) {
if (this.intersectsRange(t, !0)) {
var e = this.cloneRange();
return -1 == B.comparePoints(t.startContainer, t.startOffset, this.startContainer, this.startOffset) && e.setStart(t.startContainer, t.startOffset),
1 == B.comparePoints(t.endContainer, t.endOffset, this.endContainer, this.endOffset) && e.setEnd(t.endContainer, t.endOffset),
e;
}
throw new m("Ranges do not intersect");
},
containsNode: function(t, e) {
return e ? this.intersectsNode(t, !1) : this.compareNode(t) == st;
},
containsNodeContents: function(t) {
return this.comparePoint(t, 0) >= 0 && this.comparePoint(t, B.getNodeLength(t)) <= 0;
},
containsRange: function(t) {
return this.intersection(t).equals(t);
},
containsNodeText: function(t) {
var e = this.cloneRange();
e.selectNode(t);
var n = e.getNodes([ 3 ]);
if (n.length > 0) {
e.setStart(n[0], 0);
var i = n.pop();
e.setEnd(i, i.length);
var r = this.containsRange(e);
return e.detach(), r;
}
return this.containsNodeContents(t);
},
createNodeIterator: function(t, e) {
return I(this), new g(this, t, e);
},
getNodes: function(t, e) {
return I(this), p(this, t, e);
},
getDocument: function() {
return i(this);
},
collapseBefore: function(t) {
y(this), this.setEndBefore(t), this.collapse(!1);
},
collapseAfter: function(t) {
y(this), this.setStartAfter(t), this.collapse(!0);
},
getName: function() {
return "DomRange";
},
equals: function(t) {
return F.rangesEqual(this, t);
},
isValid: function() {
return T(this);
},
inspect: function() {
return h(this);
}
}, A(F, P, O), t.rangePrototype = D.prototype, F.rangeProperties = Z, F.RangeIterator = f,
F.copyComparisonConstants = M, F.createPrototypeRange = A, F.inspect = h, F.getRangeDocument = i,
F.rangesEqual = function(t, e) {
return t.startContainer === e.startContainer && t.startOffset === e.startOffset && t.endContainer === e.endContainer && t.endOffset === e.endOffset;
}, t.DomRange = F, t.RangeException = m;
}), rangy.createModule("WrappedRange", function(t, e) {
function n(t) {
var e = t.parentElement(), n = t.duplicate();
n.collapse(!0);
var i = n.parentElement();
n = t.duplicate(), n.collapse(!1);
var r = n.parentElement(), o = i == r ? i : s.getCommonAncestor(i, r);
return o == e ? o : s.getCommonAncestor(e, o);
}
function i(t) {
return 0 == t.compareEndPoints("StartToEnd", t);
}
function r(t, e, n, i) {
var r = t.duplicate();
r.collapse(n);
var o = r.parentElement();
if (s.isAncestorOf(e, o, !0) || (o = e), !o.canHaveHTML) return new l(o.parentNode, s.getNodeIndex(o));
var a, c, u, d, p, h = s.getDocument(o).createElement("span"), f = n ? "StartToStart" : "StartToEnd";
do o.insertBefore(h, h.previousSibling), r.moveToElementText(h); while ((a = r.compareEndPoints(f, t)) > 0 && h.previousSibling);
if (p = h.nextSibling, -1 == a && p && s.isCharacterDataNode(p)) {
r.setEndPoint(n ? "EndToStart" : "EndToEnd", t);
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 == (a = g.compareEndPoints("StartToEnd", g)); ) m++,
g.moveStart("character", 1);
} else m = r.text.length;
d = new l(p, m);
} else c = (i || !n) && h.previousSibling, u = (i || n) && h.nextSibling, d = u && s.isCharacterDataNode(u) ? new l(u, 0) : c && s.isCharacterDataNode(c) ? new l(c, c.length) : new l(o, s.getNodeIndex(h));
return h.parentNode.removeChild(h), d;
}
function o(t, e) {
var n, i, r, o, a = t.offset, l = s.getDocument(t.node), c = l.body.createTextRange(), u = s.isCharacterDataNode(t.node);
return u ? (n = t.node, i = n.parentNode) : (o = t.node.childNodes, n = a < o.length ? o[a] : null,
i = t.node), r = l.createElement("span"), r.innerHTML = "&#feff;", n ? i.insertBefore(r, n) : i.appendChild(r),
c.moveToElementText(r), c.collapse(!e), i.removeChild(r), u && c[e ? "moveStart" : "moveEnd"]("character", a),
c;
}
t.requireModules([ "DomUtil", "DomRange" ]);
var a, s = t.dom, l = s.DomPosition, c = t.DomRange;
if (!t.features.implementsDomRange || t.features.implementsTextRange && t.config.preferTextRange) {
if (t.features.implementsTextRange) {
a = function(t) {
this.textRange = t, this.refresh();
}, a.prototype = new c(document), a.prototype.refresh = function() {
var t, e, o = n(this.textRange);
i(this.textRange) ? e = t = r(this.textRange, o, !0, !0) : (t = r(this.textRange, o, !0, !1),
e = r(this.textRange, o, !1, !1)), this.setStart(t.node, t.offset), this.setEnd(e.node, e.offset);
}, c.copyComparisonConstants(a);
var u = function() {
return this;
}();
void 0 === u.Range && (u.Range = a), t.createNativeRange = function(t) {
return t = t || document, t.body.createTextRange();
};
}
} else !function() {
function t(t) {
for (var e, n = o.length; n--; ) e = o[n], t[e] = t.nativeRange[e];
}
function e(t, e, n, i, r) {
var o = t.startContainer !== e || t.startOffset != n, a = t.endContainer !== i || t.endOffset != r;
(o || a) && (t.setEnd(i, r), t.setStart(e, n));
}
function n(t) {
t.nativeRange.detach(), t.detached = !0;
for (var e, n = o.length; n--; ) e = o[n], t[e] = null;
}
var i, r, o = c.rangeProperties;
a = function(e) {
if (!e) throw new Error("Range must be specified");
this.nativeRange = e, t(this);
}, c.createPrototypeRange(a, e, n), i = a.prototype, i.selectNode = function(e) {
this.nativeRange.selectNode(e), t(this);
}, i.deleteContents = function() {
this.nativeRange.deleteContents(), t(this);
}, i.extractContents = function() {
var e = this.nativeRange.extractContents();
return t(this), e;
}, i.cloneContents = function() {
return this.nativeRange.cloneContents();
}, i.surroundContents = function(e) {
this.nativeRange.surroundContents(e), t(this);
}, i.collapse = function(e) {
this.nativeRange.collapse(e), t(this);
}, i.cloneRange = function() {
return new a(this.nativeRange.cloneRange());
}, i.refresh = function() {
t(this);
}, i.toString = function() {
return this.nativeRange.toString();
};
var l = document.createTextNode("test");
s.getBody(document).appendChild(l);
var u = document.createRange();
u.setStart(l, 0), u.setEnd(l, 0);
try {
u.setStart(l, 1), i.setStart = function(e, n) {
this.nativeRange.setStart(e, n), t(this);
}, i.setEnd = function(e, n) {
this.nativeRange.setEnd(e, n), t(this);
}, r = function(e) {
return function(n) {
this.nativeRange[e](n), t(this);
};
};
} catch (d) {
i.setStart = function(t, e) {
try {
this.nativeRange.setStart(t, e);
} catch (n) {
this.nativeRange.setEnd(t, e), this.nativeRange.setStart(t, e);
}
n(this);
}, i.setEnd = function(t, e) {
try {
this.nativeRange.setEnd(t, e);
} catch (n) {
this.nativeRange.setStart(t, e), this.nativeRange.setEnd(t, e);
}
n(this);
}, r = function(t, e) {
return function(n) {
try {
this.nativeRange[t](n);
} catch (i) {
this.nativeRange[e](n), this.nativeRange[t](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(l), u.startContainer == l && u.endContainer == l && 0 == u.startOffset && u.endOffset == l.length ? i.selectNodeContents = function(e) {
this.nativeRange.selectNodeContents(e), t(this);
} : i.selectNodeContents = function(t) {
this.setStart(t, 0), this.setEnd(t, c.getEndOffset(t));
}, u.selectNodeContents(l), u.setEnd(l, 3);
var p = document.createRange();
p.selectNodeContents(l), p.setEnd(l, 4), p.setStart(l, 2), -1 == u.compareBoundaryPoints(u.START_TO_END, p) & 1 == u.compareBoundaryPoints(u.END_TO_START, p) ? i.compareBoundaryPoints = function(t, e) {
return e = e.nativeRange || e, t == e.START_TO_END ? t = e.END_TO_START : t == e.END_TO_START && (t = e.START_TO_END),
this.nativeRange.compareBoundaryPoints(t, e);
} : i.compareBoundaryPoints = function(t, e) {
return this.nativeRange.compareBoundaryPoints(t, e.nativeRange || e);
}, d.util.isHostMethod(u, "createContextualFragment") && (i.createContextualFragment = function(t) {
return this.nativeRange.createContextualFragment(t);
}), s.getBody(document).removeChild(l), u.detach(), p.detach();
}(), t.createNativeRange = function(t) {
return t = t || document, t.createRange();
};
t.features.implementsTextRange && (a.rangeToTextRange = function(t) {
if (t.collapsed) return o(new l(t.startContainer, t.startOffset), !0);
var e = o(new l(t.startContainer, t.startOffset), !0), n = o(new l(t.endContainer, t.endOffset), !1), i = s.getDocument(t.startContainer).body.createTextRange();
return i.setEndPoint("StartToStart", e), i.setEndPoint("EndToEnd", n), i;
}), a.prototype.getName = function() {
return "WrappedRange";
}, t.WrappedRange = a, t.createRange = function(e) {
return e = e || document, new a(t.createNativeRange(e));
}, t.createRangyRange = function(t) {
return t = t || document, new c(t);
}, t.createIframeRange = function(e) {
return t.createRange(s.getIframeDocument(e));
}, t.createIframeRangyRange = function(e) {
return t.createRangyRange(s.getIframeDocument(e));
}, t.addCreateMissingNativeApiListener(function(e) {
var n = e.document;
void 0 === n.createRange && (n.createRange = function() {
return t.createRange(this);
}), n = e = null;
});
}), rangy.createModule("WrappedSelection", function(t, e) {
function n(t) {
return (t || window).getSelection();
}
function i(t) {
return (t || window).document.selection;
}
function r(t, e, n) {
var i = n ? "end" : "start", r = n ? "start" : "end";
t.anchorNode = e[i + "Container"], t.anchorOffset = e[i + "Offset"], t.focusNode = e[r + "Container"],
t.focusOffset = e[r + "Offset"];
}
function o(t) {
var e = t.nativeSelection;
t.anchorNode = e.anchorNode, t.anchorOffset = e.anchorOffset, t.focusNode = e.focusNode,
t.focusOffset = e.focusOffset;
}
function a(t) {
t.anchorNode = t.focusNode = null, t.anchorOffset = t.focusOffset = 0, t.rangeCount = 0,
t.isCollapsed = !0, t._ranges.length = 0;
}
function s(e) {
var n;
return e instanceof S ? (n = e._selectionNativeRange) || (n = t.createNativeRange(x.getDocument(e.startContainer)),
n.setEnd(e.endContainer, e.endOffset), n.setStart(e.startContainer, e.startOffset),
e._selectionNativeRange = n, e.attachListener("detach", function() {
this._selectionNativeRange = null;
})) : e instanceof C ? n = e.nativeRange : t.features.implementsDomRange && e instanceof x.getWindow(e.startContainer).Range && (n = e),
n;
}
function l(t) {
if (!t.length || 1 != t[0].nodeType) return !1;
for (var e = 1, n = t.length; e < n; ++e) if (!x.isAncestorOf(t[0], t[e])) return !1;
return !0;
}
function c(t) {
var e = t.getNodes();
if (!l(e)) throw new Error("getSingleElementFromRange: range " + t.inspect() + " did not consist of a single element");
return e[0];
}
function u(t) {
return !!t && void 0 !== t.text;
}
function d(t, e) {
var n = new C(e);
t._ranges = [ n ], r(t, n, !1), t.rangeCount = 1, t.isCollapsed = n.collapsed;
}
function p(e) {
if (e._ranges.length = 0, "None" == e.docSelection.type) a(e); else {
var n = e.docSelection.createRange();
if (u(n)) d(e, n); else {
e.rangeCount = n.length;
for (var i, o = x.getDocument(n.item(0)), s = 0; s < e.rangeCount; ++s) i = t.createRange(o),
i.selectNode(n.item(s)), e._ranges.push(i);
e.isCollapsed = 1 == e.rangeCount && e._ranges[0].collapsed, r(e, e._ranges[e.rangeCount - 1], !1);
}
}
}
function h(t, e) {
for (var n = t.docSelection.createRange(), i = c(e), r = x.getDocument(n.item(0)), o = x.getBody(r).createControlRange(), a = 0, s = n.length; a < s; ++a) o.add(n.item(a));
try {
o.add(i);
} catch (t) {
throw new Error("addRange(): Element within the specified Range could not be added to control selection (does it have layout?)");
}
o.select(), p(t);
}
function f(t, e, n) {
this.nativeSelection = t, this.docSelection = e, this._ranges = [], this.win = n,
this.refresh();
}
function m(t, e) {
for (var n, i = x.getDocument(e[0].startContainer), r = x.getBody(i).createControlRange(), o = 0; o < rangeCount; ++o) {
n = c(e[o]);
try {
r.add(n);
} catch (t) {
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(t);
}
function g(t, e) {
if (t.anchorNode && x.getDocument(t.anchorNode) !== x.getDocument(e)) throw new _("WRONG_DOCUMENT_ERR");
}
function v(t) {
var e = [], n = new k(t.anchorNode, t.anchorOffset), i = new k(t.focusNode, t.focusOffset), r = "function" == typeof t.getName ? t.getName() : "Selection";
if (void 0 !== t.rangeCount) for (var o = 0, a = t.rangeCount; o < a; ++o) e[o] = S.inspect(t.getRangeAt(o));
return "[" + r + "(Ranges: " + e.join(", ") + ")(anchor: " + n.inspect() + ", focus: " + i.inspect() + "]";
}
t.requireModules([ "DomUtil", "DomRange", "WrappedRange" ]), t.config.checkSelectionRanges = !0;
var b, y, x = t.dom, w = t.util, S = t.DomRange, C = t.WrappedRange, _ = t.DOMException, k = x.DomPosition, E = t.util.isHostMethod(window, "getSelection"), T = t.util.isHostObject(document, "selection"), I = T && (!E || t.config.preferTextRange);
I ? (b = i, t.isSelectionValid = function(t) {
var e = (t || window).document, n = e.selection;
return "None" != n.type || x.getDocument(n.createRange().parentElement()) == e;
}) : E ? (b = n, t.isSelectionValid = function() {
return !0;
}) : e.fail("Neither document.selection or window.getSelection() detected."), t.getNativeSelection = b;
var D = b(), N = t.createNativeRange(document), M = x.getBody(document), L = w.areHostObjects(D, [ "anchorNode", "focusNode" ] && w.areHostProperties(D, [ "anchorOffset", "focusOffset" ]));
t.features.selectionHasAnchorAndFocus = L;
var A = w.isHostMethod(D, "extend");
t.features.selectionHasExtend = A;
var R = "number" == typeof D.rangeCount;
t.features.selectionHasRangeCount = R;
var P = !1, O = !0;
w.areHostMethods(D, [ "addRange", "getRangeAt", "removeAllRanges" ]) && "number" == typeof D.rangeCount && t.features.implementsDomRange && function() {
var t = document.createElement("iframe");
t.frameBorder = 0, t.style.position = "absolute", t.style.left = "-10000px", M.appendChild(t);
var e = x.getIframeDocument(t);
e.open(), e.write("<html><head></head><body>12</body></html>"), e.close();
var n = x.getIframeWindow(t).getSelection(), i = e.documentElement, r = i.lastChild, o = r.firstChild, a = e.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(t);
}(), t.features.selectionSupportsMultipleRanges = P, t.features.collapsedNonEditableSelectionsSupported = O;
var F, B = !1;
M && w.isHostMethod(M, "createControlRange") && (F = M.createControlRange(), w.areHostProperties(F, [ "item", "add" ]) && (B = !0)),
t.features.implementsControlRange = B, y = L ? function(t) {
return t.anchorNode === t.focusNode && t.anchorOffset === t.focusOffset;
} : function(t) {
return !!t.rangeCount && t.getRangeAt(t.rangeCount - 1).collapsed;
};
var j;
w.isHostMethod(D, "getRangeAt") ? j = function(t, e) {
try {
return t.getRangeAt(e);
} catch (t) {
return null;
}
} : L && (j = function(e) {
var n = x.getDocument(e.anchorNode), i = t.createRange(n);
return i.setStart(e.anchorNode, e.anchorOffset), i.setEnd(e.focusNode, e.focusOffset),
i.collapsed !== this.isCollapsed && (i.setStart(e.focusNode, e.focusOffset), i.setEnd(e.anchorNode, e.anchorOffset)),
i;
}), t.getSelection = function(t) {
t = t || window;
var e = t._rangySelection, n = b(t), r = T ? i(t) : null;
return e ? (e.nativeSelection = n, e.docSelection = r, e.refresh(t)) : (e = new f(n, r, t),
t._rangySelection = e), e;
}, t.getIframeSelection = function(e) {
return t.getSelection(x.getIframeWindow(e));
};
var $ = f.prototype;
if (!I && L && w.areHostMethods(D, [ "removeAllRanges", "addRange" ])) {
$.removeAllRanges = function() {
this.nativeSelection.removeAllRanges(), a(this);
};
var q = function(e, n) {
var i = S.getRangeDocument(n), r = t.createRange(i);
r.collapseToPoint(n.endContainer, n.endOffset), e.nativeSelection.addRange(s(r)),
e.nativeSelection.extend(n.startContainer, n.startOffset), e.refresh();
};
$.addRange = R ? function(e, n) {
if (B && T && "Control" == this.docSelection.type) h(this, e); else if (n && A) q(this, e); else {
var i;
if (P ? i = this.rangeCount : (this.removeAllRanges(), i = 0), this.nativeSelection.addRange(s(e)),
this.rangeCount = this.nativeSelection.rangeCount, this.rangeCount == i + 1) {
if (t.config.checkSelectionRanges) {
var o = j(this.nativeSelection, this.rangeCount - 1);
o && !S.rangesEqual(o, e) && (e = new C(o));
}
this._ranges[this.rangeCount - 1] = e, r(this, e, U(this.nativeSelection)), this.isCollapsed = y(this);
} else this.refresh();
}
} : function(t, e) {
e && A ? q(this, t) : (this.nativeSelection.addRange(s(t)), this.refresh());
}, $.setRanges = function(t) {
if (B && t.length > 1) m(this, t); else {
this.removeAllRanges();
for (var e = 0, n = t.length; e < n; ++e) this.addRange(t[e]);
}
};
} else {
if (!(w.isHostMethod(D, "empty") && w.isHostMethod(N, "select") && B && I)) return e.fail("No means of selecting a Range or TextRange was found"),
!1;
$.removeAllRanges = function() {
try {
if (this.docSelection.empty(), "None" != this.docSelection.type) {
var t;
if (this.anchorNode) t = x.getDocument(this.anchorNode); else if ("Control" == this.docSelection.type) {
var e = this.docSelection.createRange();
e.length && (t = x.getDocument(e.item(0)).body.createTextRange());
}
t && (t.body.createTextRange().select(), this.docSelection.empty());
}
} catch (t) {}
a(this);
}, $.addRange = function(t) {
"Control" == this.docSelection.type ? h(this, t) : (C.rangeToTextRange(t).select(),
this._ranges[0] = t, this.rangeCount = 1, this.isCollapsed = this._ranges[0].collapsed,
r(this, t, !1));
}, $.setRanges = function(t) {
this.removeAllRanges();
var e = t.length;
e > 1 ? m(this, t) : e && this.addRange(t[0]);
};
}
$.getRangeAt = function(t) {
if (t < 0 || t >= this.rangeCount) throw new _("INDEX_SIZE_ERR");
return this._ranges[t];
};
var G;
if (I) G = function(e) {
var n;
t.isSelectionValid(e.win) ? n = e.docSelection.createRange() : (n = x.getBody(e.win.document).createTextRange(),
n.collapse(!0)), "Control" == e.docSelection.type ? p(e) : u(n) ? d(e, n) : a(e);
}; else if (w.isHostMethod(D, "getRangeAt") && "number" == typeof D.rangeCount) G = function(e) {
if (B && T && "Control" == e.docSelection.type) p(e); else if (e._ranges.length = e.rangeCount = e.nativeSelection.rangeCount,
e.rangeCount) {
for (var n = 0, i = e.rangeCount; n < i; ++n) e._ranges[n] = new t.WrappedRange(e.nativeSelection.getRangeAt(n));
r(e, e._ranges[e.rangeCount - 1], U(e.nativeSelection)), e.isCollapsed = y(e);
} else a(e);
}; else {
if (!L || "boolean" != typeof D.isCollapsed || "boolean" != typeof N.collapsed || !t.features.implementsDomRange) return e.fail("No means of obtaining a Range or TextRange from the user's selection was found"),
!1;
G = function(t) {
var e, n = t.nativeSelection;
n.anchorNode ? (e = j(n, 0), t._ranges = [ e ], t.rangeCount = 1, o(t), t.isCollapsed = y(t)) : a(t);
};
}
$.refresh = function(t) {
var e = t ? this._ranges.slice(0) : null;
if (G(this), t) {
var n = e.length;
if (n != this._ranges.length) return !1;
for (;n--; ) if (!S.rangesEqual(e[n], this._ranges[n])) return !1;
return !0;
}
};
var H = function(t, e) {
var n = t.getAllRanges(), i = !1;
t.removeAllRanges();
for (var r = 0, o = n.length; r < o; ++r) i || e !== n[r] ? t.addRange(n[r]) : i = !0;
t.rangeCount || a(t);
};
$.removeRange = B ? function(t) {
if ("Control" == this.docSelection.type) {
for (var e, n = this.docSelection.createRange(), i = c(t), r = x.getDocument(n.item(0)), o = x.getBody(r).createControlRange(), a = !1, s = 0, l = n.length; s < l; ++s) e = n.item(s),
e !== i || a ? o.add(n.item(s)) : a = !0;
o.select(), p(this);
} else H(this, t);
} : function(t) {
H(this, t);
};
var U;
!I && L && t.features.implementsDomRange ? (U = function(t) {
var e = !1;
return t.anchorNode && (e = 1 == x.comparePoints(t.anchorNode, t.anchorOffset, t.focusNode, t.focusOffset)),
e;
}, $.isBackwards = function() {
return U(this);
}) : U = $.isBackwards = function() {
return !1;
}, $.toString = function() {
for (var t = [], e = 0, n = this.rangeCount; e < n; ++e) t[e] = "" + this._ranges[e];
return t.join("");
}, $.collapse = function(e, n) {
g(this, e);
var i = t.createRange(x.getDocument(e));
i.collapseToPoint(e, n), this.removeAllRanges(), this.addRange(i), this.isCollapsed = !0;
}, $.collapseToStart = function() {
if (!this.rangeCount) throw new _("INVALID_STATE_ERR");
var t = this._ranges[0];
this.collapse(t.startContainer, t.startOffset);
}, $.collapseToEnd = function() {
if (!this.rangeCount) throw new _("INVALID_STATE_ERR");
var t = this._ranges[this.rangeCount - 1];
this.collapse(t.endContainer, t.endOffset);
}, $.selectAllChildren = function(e) {
g(this, e);
var n = t.createRange(x.getDocument(e));
n.selectNodeContents(e), this.removeAllRanges(), this.addRange(n);
}, $.deleteFromDocument = function() {
if (B && T && "Control" == this.docSelection.type) {
for (var t, e = this.docSelection.createRange(); e.length; ) t = e.item(0), e.remove(t),
t.parentNode.removeChild(t);
this.refresh();
} else if (this.rangeCount) {
var n = this.getAllRanges();
this.removeAllRanges();
for (var i = 0, r = n.length; i < r; ++i) n[i].deleteContents();
this.addRange(n[r - 1]);
}
}, $.getAllRanges = function() {
return this._ranges.slice(0);
}, $.setSingleRange = function(t) {
this.setRanges([ t ]);
}, $.containsNode = function(t, e) {
for (var n = 0, i = this._ranges.length; n < i; ++n) if (this._ranges[n].containsNode(t, e)) return !0;
return !1;
}, $.toHtml = function() {
var t = "";
if (this.rangeCount) {
for (var e = S.getRangeDocument(this._ranges[0]).createElement("div"), n = 0, i = this._ranges.length; n < i; ++n) e.appendChild(this._ranges[n].cloneContents());
t = e.innerHTML;
}
return t;
}, $.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, t.Selection = f, t.selectionPrototype = $, t.addCreateMissingNativeApiListener(function(e) {
void 0 === e.getSelection && (e.getSelection = function() {
return t.getSelection(this);
}), e = null;
});
}), define("rangy", function(t) {
return function() {
return t.rangy;
};
}(this)), function() {
var t = this, e = t._, 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(t) {
return t instanceof C ? t : this instanceof C ? void (this._wrapped = t) : new C(t);
};
"undefined" != typeof exports ? ("undefined" != typeof module && module.exports && (exports = module.exports = C),
exports._ = C) : t._ = C, C.VERSION = "1.5.1";
var _ = C.each = C.forEach = function(t, e, i) {
if (null != t) if (d && t.forEach === d) t.forEach(e, i); else if (t.length === +t.length) {
for (var r = 0, o = t.length; r < o; r++) if (e.call(i, t[r], r, t) === n) return;
} else for (var a in t) if (C.has(t, a) && e.call(i, t[a], a, t) === n) return;
};
C.map = C.collect = function(t, e, n) {
var i = [];
return null == t ? i : p && t.map === p ? t.map(e, n) : (_(t, function(t, r, o) {
i.push(e.call(n, t, r, o));
}), i);
};
var k = "Reduce of empty array with no initial value";
C.reduce = C.foldl = C.inject = function(t, e, n, i) {
var r = arguments.length > 2;
if (null == t && (t = []), h && t.reduce === h) return i && (e = C.bind(e, i)),
r ? t.reduce(e, n) : t.reduce(e);
if (_(t, function(t, o, a) {
r ? n = e.call(i, n, t, o, a) : (n = t, r = !0);
}), !r) throw new TypeError(k);
return n;
}, C.reduceRight = C.foldr = function(t, e, n, i) {
var r = arguments.length > 2;
if (null == t && (t = []), f && t.reduceRight === f) return i && (e = C.bind(e, i)),
r ? t.reduceRight(e, n) : t.reduceRight(e);
var o = t.length;
if (o !== +o) {
var a = C.keys(t);
o = a.length;
}
if (_(t, function(s, l, c) {
l = a ? a[--o] : --o, r ? n = e.call(i, n, t[l], l, c) : (n = t[l], r = !0);
}), !r) throw new TypeError(k);
return n;
}, C.find = C.detect = function(t, e, n) {
var i;
return E(t, function(t, r, o) {
if (e.call(n, t, r, o)) return i = t, !0;
}), i;
}, C.filter = C.select = function(t, e, n) {
var i = [];
return null == t ? i : m && t.filter === m ? t.filter(e, n) : (_(t, function(t, r, o) {
e.call(n, t, r, o) && i.push(t);
}), i);
}, C.reject = function(t, e, n) {
return C.filter(t, function(t, i, r) {
return !e.call(n, t, i, r);
}, n);
}, C.every = C.all = function(t, e, i) {
e || (e = C.identity);
var r = !0;
return null == t ? r : g && t.every === g ? t.every(e, i) : (_(t, function(t, o, a) {
if (!(r = r && e.call(i, t, o, a))) return n;
}), !!r);
};
var E = C.some = C.any = function(t, e, i) {
e || (e = C.identity);
var r = !1;
return null == t ? r : v && t.some === v ? t.some(e, i) : (_(t, function(t, o, a) {
if (r || (r = e.call(i, t, o, a))) return n;
}), !!r);
};
C.contains = C.include = function(t, e) {
return null != t && (b && t.indexOf === b ? -1 != t.indexOf(e) : E(t, function(t) {
return t === e;
}));
}, C.invoke = function(t, e) {
var n = s.call(arguments, 2), i = C.isFunction(e);
return C.map(t, function(t) {
return (i ? e : t[e]).apply(t, n);
});
}, C.pluck = function(t, e) {
return C.map(t, function(t) {
return t[e];
});
}, C.where = function(t, e, n) {
return C.isEmpty(e) ? n ? void 0 : [] : C[n ? "find" : "filter"](t, function(t) {
for (var n in e) if (e[n] !== t[n]) return !1;
return !0;
});
}, C.findWhere = function(t, e) {
return C.where(t, e, !0);
}, C.max = function(t, e, n) {
if (!e && C.isArray(t) && t[0] === +t[0] && t.length < 65535) return Math.max.apply(Math, t);
if (!e && C.isEmpty(t)) return -1 / 0;
var i = {
computed: -1 / 0,
value: -1 / 0
};
return _(t, function(t, r, o) {
var a = e ? e.call(n, t, r, o) : t;
a > i.computed && (i = {
value: t,
computed: a
});
}), i.value;
}, C.min = function(t, e, n) {
if (!e && C.isArray(t) && t[0] === +t[0] && t.length < 65535) return Math.min.apply(Math, t);
if (!e && C.isEmpty(t)) return 1 / 0;
var i = {
computed: 1 / 0,
value: 1 / 0
};
return _(t, function(t, r, o) {
var a = e ? e.call(n, t, r, o) : t;
a < i.computed && (i = {
value: t,
computed: a
});
}), i.value;
}, C.shuffle = function(t) {
var e, n = 0, i = [];
return _(t, function(t) {
e = C.random(n++), i[n - 1] = i[e], i[e] = t;
}), i;
};
var T = function(t) {
return C.isFunction(t) ? t : function(e) {
return e[t];
};
};
C.sortBy = function(t, e, n) {
var i = T(e);
return C.pluck(C.map(t, function(t, e, r) {
return {
value: t,
index: e,
criteria: i.call(n, t, e, r)
};
}).sort(function(t, e) {
var n = t.criteria, i = e.criteria;
if (n !== i) {
if (n > i || void 0 === n) return 1;
if (n < i || void 0 === i) return -1;
}
return t.index < e.index ? -1 : 1;
}), "value");
};
var I = function(t, e, n, i) {
var r = {}, o = T(null == e ? C.identity : e);
return _(t, function(e, a) {
var s = o.call(n, e, a, t);
i(r, s, e);
}), r;
};
C.groupBy = function(t, e, n) {
return I(t, e, n, function(t, e, n) {
(C.has(t, e) ? t[e] : t[e] = []).push(n);
});
}, C.countBy = function(t, e, n) {
return I(t, e, n, function(t, e) {
C.has(t, e) || (t[e] = 0), t[e]++;
});
}, C.sortedIndex = function(t, e, n, i) {
n = null == n ? C.identity : T(n);
for (var r = n.call(i, e), o = 0, a = t.length; o < a; ) {
var s = o + a >>> 1;
n.call(i, t[s]) < r ? o = s + 1 : a = s;
}
return o;
}, C.toArray = function(t) {
return t ? C.isArray(t) ? s.call(t) : t.length === +t.length ? C.map(t, C.identity) : C.values(t) : [];
}, C.size = function(t) {
return null == t ? 0 : t.length === +t.length ? t.length : C.keys(t).length;
}, C.first = C.head = C.take = function(t, e, n) {
if (null != t) return null == e || n ? t[0] : s.call(t, 0, e);
}, C.initial = function(t, e, n) {
return s.call(t, 0, t.length - (null == e || n ? 1 : e));
}, C.last = function(t, e, n) {
if (null != t) return null == e || n ? t[t.length - 1] : s.call(t, Math.max(t.length - e, 0));
}, C.rest = C.tail = C.drop = function(t, e, n) {
return s.call(t, null == e || n ? 1 : e);
}, C.compact = function(t) {
return C.filter(t, C.identity);
};
var D = function(t, e, n) {
return e && C.every(t, C.isArray) ? l.apply(n, t) : (_(t, function(t) {
C.isArray(t) || C.isArguments(t) ? e ? a.apply(n, t) : D(t, e, n) : n.push(t);
}), n);
};
C.flatten = function(t, e) {
return D(t, e, []);
}, C.without = function(t) {
return C.difference(t, s.call(arguments, 1));
}, C.uniq = C.unique = function(t, e, n, i) {
C.isFunction(e) && (i = n, n = e, e = !1);
var r = n ? C.map(t, n, i) : t, o = [], a = [];
return _(r, function(n, i) {
(e ? i && a[a.length - 1] === n : C.contains(a, n)) || (a.push(n), o.push(t[i]));
}), o;
}, C.union = function() {
return C.uniq(C.flatten(arguments, !0));
}, C.intersection = function(t) {
var e = s.call(arguments, 1);
return C.filter(C.uniq(t), function(t) {
return C.every(e, function(e) {
return C.indexOf(e, t) >= 0;
});
});
}, C.difference = function(t) {
var e = l.apply(i, s.call(arguments, 1));
return C.filter(t, function(t) {
return !C.contains(e, t);
});
}, C.zip = function() {
for (var t = C.max(C.pluck(arguments, "length").concat(0)), e = new Array(t), n = 0; n < t; n++) e[n] = C.pluck(arguments, "" + n);
return e;
}, C.object = function(t, e) {
if (null == t) return {};
for (var n = {}, i = 0, r = t.length; i < r; i++) e ? n[t[i]] = e[i] : n[t[i][0]] = t[i][1];
return n;
}, C.indexOf = function(t, e, n) {
if (null == t) return -1;
var i = 0, r = t.length;
if (n) {
if ("number" != typeof n) return i = C.sortedIndex(t, e), t[i] === e ? i : -1;
i = n < 0 ? Math.max(0, r + n) : n;
}
if (b && t.indexOf === b) return t.indexOf(e, n);
for (;i < r; i++) if (t[i] === e) return i;
return -1;
}, C.lastIndexOf = function(t, e, n) {
if (null == t) return -1;
var i = null != n;
if (y && t.lastIndexOf === y) return i ? t.lastIndexOf(e, n) : t.lastIndexOf(e);
for (var r = i ? n : t.length; r--; ) if (t[r] === e) return r;
return -1;
}, C.range = function(t, e, n) {
arguments.length <= 1 && (e = t || 0, t = 0), n = arguments[2] || 1;
for (var i = Math.max(Math.ceil((e - t) / n), 0), r = 0, o = new Array(i); r < i; ) o[r++] = t,
t += n;
return o;
};
var N = function() {};
C.bind = function(t, e) {
var n, i;
if (S && t.bind === S) return S.apply(t, s.call(arguments, 1));
if (!C.isFunction(t)) throw new TypeError();
return n = s.call(arguments, 2), i = function() {
if (!(this instanceof i)) return t.apply(e, n.concat(s.call(arguments)));
N.prototype = t.prototype;
var r = new N();
N.prototype = null;
var o = t.apply(r, n.concat(s.call(arguments)));
return Object(o) === o ? o : r;
};
}, C.partial = function(t) {
var e = s.call(arguments, 1);
return function() {
return t.apply(this, e.concat(s.call(arguments)));
};
}, C.bindAll = function(t) {
var e = s.call(arguments, 1);
if (0 === e.length) throw new Error("bindAll must be passed function names");
return _(e, function(e) {
t[e] = C.bind(t[e], t);
}), t;
}, C.memoize = function(t, e) {
var n = {};
return e || (e = C.identity), function() {
var i = e.apply(this, arguments);
return C.has(n, i) ? n[i] : n[i] = t.apply(this, arguments);
};
}, C.delay = function(t, e) {
var n = s.call(arguments, 2);
return setTimeout(function() {
return t.apply(null, n);
}, e);
}, C.defer = function(t) {
return C.delay.apply(C, [ t, 1 ].concat(s.call(arguments, 1)));
}, C.throttle = function(t, e, n) {
var i, r, o, a = null, s = 0;
n || (n = {});
var l = function() {
s = !1 === n.leading ? 0 : new Date(), a = null, o = t.apply(i, r);
};
return function() {
var c = new Date();
s || !1 !== n.leading || (s = c);
var u = e - (c - s);
return i = this, r = arguments, u <= 0 ? (clearTimeout(a), a = null, s = c, o = t.apply(i, r)) : a || !1 === n.trailing || (a = setTimeout(l, u)),
o;
};
}, C.debounce = function(t, e, n) {
var i, r = null;
return function() {
var o = this, a = arguments, s = function() {
r = null, n || (i = t.apply(o, a));
}, l = n && !r;
return clearTimeout(r), r = setTimeout(s, e), l && (i = t.apply(o, a)), i;
};
}, C.once = function(t) {
var e, n = !1;
return function() {
return n ? e : (n = !0, e = t.apply(this, arguments), t = null, e);
};
}, C.wrap = function(t, e) {
return function() {
var n = [ t ];
return a.apply(n, arguments), e.apply(this, n);
};
}, C.compose = function() {
var t = arguments;
return function() {
for (var e = arguments, n = t.length - 1; n >= 0; n--) e = [ t[n].apply(this, e) ];
return e[0];
};
}, C.after = function(t, e) {
return function() {
if (--t < 1) return e.apply(this, arguments);
};
}, C.keys = w || function(t) {
if (t !== Object(t)) throw new TypeError("Invalid object");
var e = [];
for (var n in t) C.has(t, n) && e.push(n);
return e;
}, C.values = function(t) {
var e = [];
for (var n in t) C.has(t, n) && e.push(t[n]);
return e;
}, C.pairs = function(t) {
var e = [];
for (var n in t) C.has(t, n) && e.push([ n, t[n] ]);
return e;
}, C.invert = function(t) {
var e = {};
for (var n in t) C.has(t, n) && (e[t[n]] = n);
return e;
}, C.functions = C.methods = function(t) {
var e = [];
for (var n in t) C.isFunction(t[n]) && e.push(n);
return e.sort();
}, C.extend = function(t) {
return _(s.call(arguments, 1), function(e) {
if (e) for (var n in e) t[n] = e[n];
}), t;
}, C.pick = function(t) {
var e = {}, n = l.apply(i, s.call(arguments, 1));
return _(n, function(n) {
n in t && (e[n] = t[n]);
}), e;
}, C.omit = function(t) {
var e = {}, n = l.apply(i, s.call(arguments, 1));
for (var r in t) C.contains(n, r) || (e[r] = t[r]);
return e;
}, C.defaults = function(t) {
return _(s.call(arguments, 1), function(e) {
if (e) for (var n in e) void 0 === t[n] && (t[n] = e[n]);
}), t;
}, C.clone = function(t) {
return C.isObject(t) ? C.isArray(t) ? t.slice() : C.extend({}, t) : t;
}, C.tap = function(t, e) {
return e(t), t;
};
var M = function(t, e, n, i) {
if (t === e) return 0 !== t || 1 / t == 1 / e;
if (null == t || null == e) return t === e;
t instanceof C && (t = t._wrapped), e instanceof C && (e = e._wrapped);
var r = c.call(t);
if (r != c.call(e)) return !1;
switch (r) {
case "[object String]":
return t == String(e);
case "[object Number]":
return t != +t ? e != +e : 0 == t ? 1 / t == 1 / e : t == +e;
case "[object Date]":
case "[object Boolean]":
return +t == +e;
case "[object RegExp]":
return t.source == e.source && t.global == e.global && t.multiline == e.multiline && t.ignoreCase == e.ignoreCase;
}
if ("object" != typeof t || "object" != typeof e) return !1;
for (var o = n.length; o--; ) if (n[o] == t) return i[o] == e;
var a = t.constructor, s = e.constructor;
if (a !== s && !(C.isFunction(a) && a instanceof a && C.isFunction(s) && s instanceof s)) return !1;
n.push(t), i.push(e);
var l = 0, u = !0;
if ("[object Array]" == r) {
if (l = t.length, u = l == e.length) for (;l-- && (u = M(t[l], e[l], n, i)); ) ;
} else {
for (var d in t) if (C.has(t, d) && (l++, !(u = C.has(e, d) && M(t[d], e[d], n, i)))) break;
if (u) {
for (d in e) if (C.has(e, d) && !l--) break;
u = !l;
}
}
return n.pop(), i.pop(), u;
};
C.isEqual = function(t, e) {
return M(t, e, [], []);
}, C.isEmpty = function(t) {
if (null == t) return !0;
if (C.isArray(t) || C.isString(t)) return 0 === t.length;
for (var e in t) if (C.has(t, e)) return !1;
return !0;
}, C.isElement = function(t) {
return !(!t || 1 !== t.nodeType);
}, C.isArray = x || function(t) {
return "[object Array]" == c.call(t);
}, C.isObject = function(t) {
return t === Object(t);
}, _([ "Arguments", "Function", "String", "Number", "Date", "RegExp" ], function(t) {
C["is" + t] = function(e) {
return c.call(e) == "[object " + t + "]";
};
}), C.isArguments(arguments) || (C.isArguments = function(t) {
return !(!t || !C.has(t, "callee"));
}), "function" != typeof /./ && (C.isFunction = function(t) {
return "function" == typeof t;
}), C.isFinite = function(t) {
return isFinite(t) && !isNaN(parseFloat(t));
}, C.isNaN = function(t) {
return C.isNumber(t) && t != +t;
}, C.isBoolean = function(t) {
return !0 === t || !1 === t || "[object Boolean]" == c.call(t);
}, C.isNull = function(t) {
return null === t;
}, C.isUndefined = function(t) {
return void 0 === t;
}, C.has = function(t, e) {
return u.call(t, e);
}, C.noConflict = function() {
return t._ = e, this;
}, C.identity = function(t) {
return t;
}, C.times = function(t, e, n) {
for (var i = Array(Math.max(0, t)), r = 0; r < t; r++) i[r] = e.call(n, r);
return i;
}, C.random = function(t, e) {
return null == e && (e = t, t = 0), t + Math.floor(Math.random() * (e - t + 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(t) {
C[t] = function(e) {
return null == e ? "" : ("" + e).replace(A[t], function(e) {
return L[t][e];
});
};
}), C.result = function(t, e) {
if (null != t) {
var n = t[e];
return C.isFunction(n) ? n.call(t) : n;
}
}, C.mixin = function(t) {
_(C.functions(t), function(e) {
var n = C[e] = t[e];
C.prototype[e] = function() {
var t = [ this._wrapped ];
return a.apply(t, arguments), B.call(this, n.apply(C, t));
};
});
};
var R = 0;
C.uniqueId = function(t) {
var e = ++R + "";
return t ? t + e : e;
}, C.templateSettings = {
evaluate: /<%([\s\S]+?)%>/g,
interpolate: /<%=([\s\S]+?)%>/g,
escape: /<%-([\s\S]+?)%>/g
};
var P = /(.)^/, O = {
"'": "'",
"\\": "\\",
"\r": "r",
"\n": "n",
"\t": "t",
"\u2028": "u2028",
"\u2029": "u2029"
}, F = /\\|'|\r|\n|\t|\u2028|\u2029/g;
C.template = function(t, e, 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+='";
t.replace(r, function(e, n, i, r, s) {
return a += t.slice(o, s).replace(F, function(t) {
return "\\" + O[t];
}), 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 + e.length, e;
}), 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 (t) {
throw t.source = a, t;
}
if (e) return i(e, C);
var s = function(t) {
return i.call(this, t, C);
};
return s.source = "function(" + (n.variable || "obj") + "){\n" + a + "}", s;
}, C.chain = function(t) {
return C(t).chain();
};
var B = function(t) {
return this._chain ? C(t).chain() : t;
};
C.mixin(C), _([ "pop", "push", "reverse", "shift", "sort", "splice", "unshift" ], function(t) {
var e = i[t];
C.prototype[t] = function() {
var n = this._wrapped;
return e.apply(n, arguments), "shift" != t && "splice" != t || 0 !== n.length || delete n[0],
B.call(this, n);
};
}), _([ "concat", "join", "slice" ], function(t) {
var e = i[t];
C.prototype[t] = function() {
return B.call(this, e.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(t) {
return function() {
return t._;
};
}(this)), function(t, e) {
"object" == typeof exports ? module.exports = e() : "function" == typeof define && define.amd ? define("crel", e) : t.crel = e();
}(this, function() {
function t() {
var n, i = window.document, r = arguments, o = i.createElement(r[0]), a = r[1], s = 2, l = r.length, c = t.attrMap;
if (1 === l) return o;
if (("object" != typeof a || e(a)) && (--s, a = null), l - s == 1 && "string" == typeof r[s] && void 0 !== o.textContent) o.textContent = r[s]; else for (;s < l; ++s) null != (n = r[s]) && (e(n) || (n = i.createTextNode(n)),
o.appendChild(n));
for (var u in a) if (c[u]) {
var d = t.attrMap[u];
"function" == typeof d ? d(o, a[u]) : o.setAttribute(d, a[u]);
} else o.setAttribute(u, a[u]);
return o;
}
var e = "object" == typeof Node ? function(t) {
return t instanceof Node;
} : function(t) {
return t && "object" == typeof t && "number" == typeof t.nodeType && "string" == typeof t.nodeName;
};
return t.attrMap = {}, t.isNode = e, t;
}), define("storage", [ "underscore" ], function(t) {
function e(t) {
try {
return e.compact(localStorage[t].split(";"));
} catch (e) {
return localStorage[t] = ";", [];
}
}
var n, i, r = e("file.list"), o = localStorage.version;
if (void 0 === o && (localStorage.removeItem("sync.queue"), localStorage.removeItem("sync.current"),
localStorage.removeItem("file.counter"), t.each(r, function(n) {
localStorage[n + ".publish"] = ";";
var i = e(n + ".sync");
t.each(i, function(t) {
localStorage[t + ".contentCRC"] = "0", void 0 !== localStorage[t + ".etag"] && (localStorage[t + ".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")),
t.each(r, function(n) {
var i = e(n + ".sync");
t.each(i, function(t) {
var e = {};
0 === t.indexOf("sync.gdrive.") ? (e.provider = "gdrive", e.id = t.substring("sync.gdrive.".length),
e.etag = localStorage[t + ".etag"], e.contentCRC = localStorage[t + ".contentCRC"],
e.titleCRC = localStorage[t + ".titleCRC"]) : 0 === t.indexOf("sync.dropbox.") && (e.provider = "dropbox",
e.path = decodeURIComponent(t.substring("sync.dropbox.".length)), e.version = localStorage[t + ".version"],
e.contentCRC = localStorage[t + ".contentCRC"]), localStorage[t] = JSON.stringify(e),
localStorage.removeItem(t + ".etag"), localStorage.removeItem(t + ".version"), localStorage.removeItem(t + ".contentCRC"),
localStorage.removeItem(t + ".titleCRC");
});
}), o = "v2";
}
return "v2" == o && (t.each(r, function(e) {
t.has(localStorage, e + ".sync") || (localStorage.removeItem(e + ".title"), localStorage.removeItem(e + ".publish"),
localStorage.removeItem(e + ".content"), localStorage["file.list"].replace(";" + e + ";", ";"));
}), 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 && (t.each(r, function(n) {
var i = e(n + ".publish");
t.each(i, function(t) {
var e = JSON.parse(localStorage[t]);
"gdrive" == e.provider && (e.id = e.fileId, e.fileId = void 0, localStorage[t] = JSON.stringify(e));
});
}), 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 || (t.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 && (t.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"),
t.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 || (t.has(localStorage, "settings") && (i = JSON.parse(localStorage.settings),
delete i.editorFontFamily, localStorage.settings = JSON.stringify(i)), o = "v14"),
"v14" == o && (t.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"),
t.has(localStorage, "gdrive.lastChangeId") && (localStorage["google.gdrive0.gdrive.lastChangeId"] = localStorage["gdrive.lastChangeId"],
localStorage.removeItem("gdrive.lastChangeId")), t.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"), t.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 && (t.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"),
t.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 && (t.has(localStorage, "settings") && (i = JSON.parse(localStorage.settings),
delete i.markdownMimeType, localStorage.settings = JSON.stringify(i)), o = "v21"),
"v21" == o && (t.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 && (t.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"), "v23" == o && (localStorage.removeItem("welcomeTour"),
localStorage.removeItem("welcomeTour_1"), o = "v24"), localStorage.version = o,
localStorage;
}), function(t) {
if ("object" == typeof exports && "undefined" != typeof module) module.exports = t(); else if ("function" == typeof define && define.amd) define("xregexp", [], t); else {
var e;
e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : this,
e.XRegExp = t();
}
}(function() {
return function t(e, n, i) {
function r(a, s) {
if (!n[a]) {
if (!e[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: {}
};
e[a][0].call(u.exports, function(t) {
var n = e[a][1][t];
return r(n || t);
}, u, u.exports, t, e, 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(t, e, n) {
e.exports = function(t) {
"use strict";
function e(t) {
var e = /^\^/, n = /\$$/;
return e.test(t) && n.test(t.replace(/\\[\s\S]/g, "")) ? t.replace(e, "").replace(n, "") : t;
}
function n(e) {
return t.isRegExp(e) ? e[i] && e[i].captureNames ? e : t(e.source) : t(e);
}
var i = "xregexp", r = /(\()(?!\?)|\\([1-9]\d*)|\\[\s\S]|\[(?:[^\\\]]|\\[\s\S])*]/g, o = t.union([ /\({{([\w$]+)}}\)|{{([\w$]+)}}/, r ], "g");
t.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(t) {
l += l.indexOf(t) > -1 ? "" : t;
}));
for (p in s) s.hasOwnProperty(p) && (d = n(s[p]), f[p] = {
pattern: e(d.source),
names: d[i].captureNames || []
});
return a = n(a), u = a[i].captureNames || [], a = a.source.replace(o, function(t, e, n, i, o) {
var a, s, l = e || n;
if (l) {
if (!f.hasOwnProperty(l)) throw new ReferenceError("Undefined property " + t);
return e ? (a = u[g], v[++g] = ++m, s = "(?<" + (a || l) + ">") : s = "(?:", c = m,
s + f[l].pattern.replace(r, function(t, e, n) {
if (e) {
if (a = f[l].names[m - c], ++m, a) return "(?<" + a + ">";
} else if (n) return "\\" + (+n + c);
return t;
}) + ")";
}
if (i) {
if (a = u[g], v[++g] = ++m, a) return "(?<" + a + ">";
} else if (o) return "\\" + v[+o];
return t;
}), t(a, l);
};
};
}, {} ],
2: [ function(t, e, n) {
e.exports = function(t) {
"use strict";
function e(t, e, n, i) {
return {
name: t,
value: e,
start: n,
end: i
};
}
t.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 = t(i, f), r = t(r, f), m) {
if (m.length > 1) throw new Error("Cannot use more than one escape character");
m = t.escape(m), d = new RegExp("(?:" + m + "[\\S\\s]|(?:(?!" + t.union([ i, r ]).source + ")[^" + m + "])+)+", o.replace(/[^imu]+/g, ""));
}
for (;;) {
if (m && (x += (t.exec(n, d, x, "sticky") || [ "" ])[0].length), c = t.exec(n, i, x),
u = t.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(e(g[0], n.slice(w, s), w, s)), g[1] && v.push(e(g[1], n.slice(s, l), s, l)),
g[2] && v.push(e(g[2], n.slice(l, y), l, y)), g[3] && v.push(e(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(e(g[0], n.slice(w), w, n.length)),
v;
};
};
}, {} ],
3: [ function(t, e, n) {
e.exports = function(t) {
"use strict";
function e(t) {
return t.replace(/[- _]+/g, "").toLowerCase();
}
function n(t) {
for (;t.length < 4; ) t = "0" + t;
return t;
}
function i(t) {
return parseInt(t, 16);
}
function r(t) {
return parseInt(t, 10).toString(16);
}
function o(t) {
var e = /^\\[xu](.+)/.exec(t);
return e ? i(e[1]) : t.charCodeAt("\\" === t.charAt(0) ? 1 : 0);
}
function a(e) {
var i, a = "", s = -1;
return t.forEach(e, /(\\x..|\\u....|\\?[\s\S])(?:-(\\x..|\\u....|\\?[\s\S]))?/, function(t) {
i = o(t[1]), i > s + 1 && (a += "\\u" + n(r(s + 1)), i > s + 2 && (a += "-\\u" + n(r(i - 1)))),
s = o(t[2] || t[1]);
}), s < 65535 && (a += "\\u" + n(r(s + 1)), s < 65534 && (a += "-\\uFFFF")), a;
}
function s(t) {
return u[t]["b!"] || (u[t]["b!"] = a(u[t].bmp));
}
function l(t, e) {
var n = u[t], 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 + "]"),
e ? "(?:(?!" + i + ")(?:[\ufffd-\ufffd][\ufffd-\ufffd]|[\0-\uffff]))" : "(?:" + i + ")";
}
function c(t, e) {
var n = e ? "a!" : "a=";
return u[t][n] || (u[t][n] = l(t, e));
}
var u = {};
t.addToken(/\\([pP])(?:{(\^?)([^}]*)}|([A-Za-z]))/, function(t, n, i) {
var r = "P" === t[1] || !!t[2], o = i.indexOf("A") > -1, a = e(t[4] || t[3]), l = u[a];
if ("P" === t[1] && t[2]) throw new SyntaxError("Invalid double negation " + t[0]);
if (!u.hasOwnProperty(a)) throw new SyntaxError("Unknown Unicode token " + t[0]);
if (l.inverseOf) {
if (a = e(l.inverseOf), !u.hasOwnProperty(a)) throw new ReferenceError("Unicode token missing data " + t[0] + " -> " + l.inverseOf);
l = u[a], r = !r;
}
if (!l.bmp && !o) throw new SyntaxError("Astral mode required for Unicode token " + t[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: "\\"
}), t.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[e(i.name)] = i, i.alias && (u[e(i.alias)] = i);
}
t.cache.flush("patterns");
};
};
}, {} ],
4: [ function(t, e, n) {
e.exports = function(t) {
"use strict";
if (!t.addUnicodeData) throw new ReferenceError("Unicode Base must be loaded before Unicode Blocks");
t.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: "\0-\x7f"
}, {
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(t, e, n) {
e.exports = function(t) {
"use strict";
if (!t.addUnicodeData) throw new ReferenceError("Unicode Base must be loaded before Unicode Categories");
t.addUnicodeData([ {
name: "C",
alias: "Other",
isBmpLast: !0,
bmp: "\0-\x1f\x7f-\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: "\0-\x1f\x7f-\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(t, e, n) {
e.exports = function(t) {
"use strict";
if (!t.addUnicodeData) throw new ReferenceError("Unicode Base must be loaded before Unicode Properties");
var e = [ {
name: "ASCII",
bmp: "\0-\x7f"
}, {
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: "\0-\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: "\t-\r \x85\xa0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000"
} ];
e.push({
name: "Assigned",
inverseOf: "Cn"
}), t.addUnicodeData(e);
};
}, {} ],
7: [ function(t, e, n) {
e.exports = function(t) {
"use strict";
if (!t.addUnicodeData) throw new ReferenceError("Unicode Base must be loaded before Unicode Scripts");
t.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: "\0-@\\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(t, e, n) {
var i = t("./xregexp");
t("./addons/build")(i), t("./addons/matchrecursive")(i), t("./addons/unicode-base")(i),
t("./addons/unicode-blocks")(i), t("./addons/unicode-categories")(i), t("./addons/unicode-properties")(i),
t("./addons/unicode-scripts")(i), e.exports = i;
}, {
"./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(t, e, n) {
"use strict";
function i(t, e, n, i, r) {
var o;
if (t[S] = {
captureNames: e
}, r) return t;
if (t.__proto__) t.__proto__ = w.prototype; else for (o in w.prototype) t[o] = w.prototype[o];
return t[S].source = n, t[S].flags = i ? i.split("").sort().join("") : i, t;
}
function r(t) {
return _.replace.call(t, /([\s\S])(?=[\s\S]*\1)/g, "");
}
function o(t, e) {
if (!w.isRegExp(t)) throw new TypeError("Type RegExp expected");
var n = t[S] || {}, o = s(t), a = "", c = "", u = null, d = null;
return e = e || {}, e.removeG && (c += "g"), e.removeY && (c += "y"), c && (o = _.replace.call(o, new RegExp("[" + c + "]+", "g"), "")),
e.addG && (a += "g"), e.addY && (a += "y"), a && (o = r(o + a)), e.isInternalOnly || (void 0 !== n.source && (u = n.source),
null != n.flags && (d = a ? r(n.flags + a) : n.flags)), t = i(new RegExp(t.source, o), l(t) ? n.captureNames.slice(0) : null, u, d, e.isInternalOnly);
}
function a(t) {
return parseInt(t, 16);
}
function s(t) {
return O ? t.flags : _.exec.call(/\/([a-z]*)$/i, RegExp.prototype.toString.call(t))[1];
}
function l(t) {
return !(!t[S] || !t[S].captureNames);
}
function c(t) {
return parseInt(t, 10).toString(16);
}
function u(t, e) {
var n, i = t.length;
for (n = 0; n < i; ++n) if (t[n] === e) return n;
return -1;
}
function d(t, e) {
return B.call(t) === "[object " + e + "]";
}
function p(t, e, n) {
return _.test.call(n.indexOf("x") > -1 ? /^(?:\s+|#.*|\(\?#[^)]*\))*(?:[?*+]|{\d+(?:,\d*)?})/ : /^(?:\(\?#[^)]*\))*(?:[?*+]|{\d+(?:,\d*)?})/, t.slice(e));
}
function h(t) {
for (;t.length < 4; ) t = "0" + t;
return t;
}
function f(t, e) {
var n;
if (r(e) !== e) throw new SyntaxError("Invalid duplicate regex flag " + e);
for (t = _.replace.call(t, /^\(\?([\w$]+)\)/, function(t, n) {
if (_.test.call(/[gy]/, n)) throw new SyntaxError("Cannot use flag g or y in mode modifier " + t);
return e = r(e + n), "";
}), n = 0; n < e.length; ++n) if (!F[e.charAt(n)]) throw new SyntaxError("Unknown regex flag " + e.charAt(n));
return {
pattern: t,
flags: e
};
}
function m(t) {
var e = {};
return d(t, "String") ? (w.forEach(t, /[^\s,]+/, function(t) {
e[t] = !0;
}), e) : t;
}
function g(t) {
if (!/^[\w$]$/.test(t)) throw new Error("Flag must be a single character A-Za-z0-9_$");
F[t] = !0;
}
function v(t, e, n, i, r) {
for (var o, a, s = I.length, l = t.charAt(n), c = null; s--; ) if (a = I[s], !(a.leadChar && a.leadChar !== l || a.scope !== i && "all" !== a.scope || a.flag && -1 === e.indexOf(a.flag)) && (o = w.exec(t, a.regex, n, "sticky"))) {
c = {
matchLength: o[0].length,
output: a.handler.call(r, o, i, e),
reparse: a.reparse
};
break;
}
return c;
}
function b(t) {
C.astral = t;
}
function y(t) {
RegExp.prototype.exec = (t ? k : _).exec, RegExp.prototype.test = (t ? k : _).test,
String.prototype.match = (t ? k : _).match, String.prototype.replace = (t ? k : _).replace,
String.prototype.split = (t ? k : _).split, C.natives = t;
}
function x(t) {
if (null == t) throw new TypeError("Cannot convert null or undefined to object");
return t;
}
function w(t, e) {
var n, r, a, s, l, c = {
hasNamedCapture: !1,
captureNames: []
}, u = D, d = "", p = 0;
if (w.isRegExp(t)) {
if (void 0 !== e) throw new TypeError("Cannot supply flags when copying a RegExp");
return o(t);
}
if (t = void 0 === t ? "" : String(t), e = void 0 === e ? "" : String(e), w.isInstalled("astral") && -1 === e.indexOf("A") && (e += "A"),
T[t] || (T[t] = {}), !T[t][e]) {
for (n = f(t, e), s = n.pattern, l = n.flags; p < s.length; ) {
do (n = v(s, l, p, u, c)) && n.reparse && (s = s.slice(0, p) + n.output + s.slice(p + n.matchLength)); while (n && n.reparse);
n ? (d += n.output, p += n.matchLength || 1) : (r = w.exec(s, M[u], p, "sticky")[0],
d += r, p += r.length, "[" === r && u === D ? u = N : "]" === r && u === N && (u = D));
}
T[t][e] = {
pattern: _.replace.call(d, /\(\?:\)(?:[*+?]|\{\d+(?:,\d*)?})?\??(?=\(\?:\))|^\(\?:\)(?:[*+?]|\{\d+(?:,\d*)?})?\??|\(\?:\)(?:[*+?]|\{\d+(?:,\d*)?})?\??$/g, ""),
flags: _.replace.call(l, /[^gimuy]+/g, ""),
captures: c.hasNamedCapture ? c.captureNames : null
};
}
return a = T[t][e], i(new RegExp(a.pattern, a.flags), a.captures, t, e);
}
var S = "xregexp", C = {
astral: !1,
natives: !1
}, _ = {
exec: RegExp.prototype.exec,
test: RegExp.prototype.test,
match: String.prototype.match,
replace: String.prototype.replace,
split: String.prototype.split
}, k = {}, E = {}, T = {}, I = [], D = "default", N = "class", M = {
"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]/
}, L = /\$(?:{([\w$]+)}|(\d\d?|[\s\S]))/g, A = void 0 === _.exec.call(/()??/, "")[1], R = function() {
var t = !0;
try {
new RegExp("", "u");
} catch (e) {
t = !1;
}
return t;
}(), P = function() {
var t = !0;
try {
new RegExp("", "y");
} catch (e) {
t = !1;
}
return t;
}(), O = void 0 !== /a/.flags, F = {
g: !0,
i: !0,
m: !0,
u: R,
y: P
}, B = {}.toString;
w.prototype = new RegExp(), w.version = "3.1.0-dev", w.addToken = function(t, e, n) {
n = n || {};
var i, r = n.optionalFlags;
if (n.flag && g(n.flag), r) for (r = _.split.call(r, ""), i = 0; i < r.length; ++i) g(r[i]);
I.push({
regex: o(t, {
addG: !0,
addY: P,
isInternalOnly: !0
}),
handler: e,
scope: n.scope || D,
flag: n.flag,
reparse: n.reparse,
leadChar: n.leadChar
}), w.cache.flush("patterns");
}, w.cache = function(t, e) {
return E[t] || (E[t] = {}), E[t][e] || (E[t][e] = w(t, e));
}, w.cache.flush = function(t) {
"patterns" === t ? T = {} : E = {};
}, w.escape = function(t) {
return _.replace.call(x(t), /[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
}, w.exec = function(t, e, n, i) {
var r, a, s = "g", l = !1;
return l = P && !!(i || e.sticky && !1 !== i), l && (s += "y"), e[S] = e[S] || {},
a = e[S][s] || (e[S][s] = o(e, {
addG: !0,
addY: l,
removeY: !1 === i,
isInternalOnly: !0
})), a.lastIndex = n = n || 0, r = k.exec.call(a, t), i && r && r.index !== n && (r = null),
e.global && (e.lastIndex = r ? a.lastIndex : 0), r;
}, w.forEach = function(t, e, n) {
for (var i, r = 0, o = -1; i = w.exec(t, e, r); ) n(i, ++o, t, e), r = i.index + (i[0].length || 1);
}, w.globalize = function(t) {
return o(t, {
addG: !0
});
}, w.install = function(t) {
t = m(t), !C.astral && t.astral && b(!0), !C.natives && t.natives && y(!0);
}, w.isInstalled = function(t) {
return !!C[t];
}, w.isRegExp = function(t) {
return "[object RegExp]" === B.call(t);
}, w.match = function(t, e, n) {
var i, r, a = e.global && "one" !== n || "all" === n, s = (a ? "g" : "") + (e.sticky ? "y" : "") || "noGY";
return e[S] = e[S] || {}, r = e[S][s] || (e[S][s] = o(e, {
addG: !!a,
addY: !!e.sticky,
removeG: "one" === n,
isInternalOnly: !0
})), i = _.match.call(x(t), r), e.global && (e.lastIndex = "one" === n && i ? i.index + i[0].length : 0),
a ? i || [] : i && i[0];
}, w.matchChain = function(t, e) {
return function n(t, i) {
var r, o = e[i].regex ? e[i] : {
regex: e[i]
}, a = [], s = function(t) {
if (o.backref) {
if (!(t.hasOwnProperty(o.backref) || +o.backref < t.length)) throw new ReferenceError("Backreference to undefined group: " + o.backref);
a.push(t[o.backref] || "");
} else a.push(t[0]);
};
for (r = 0; r < t.length; ++r) w.forEach(t[r], o.regex, s);
return i !== e.length - 1 && a.length ? n(a, i + 1) : a;
}([ t ], 0);
}, w.replace = function(t, e, n, i) {
var r, a = w.isRegExp(e), s = e.global && "one" !== i || "all" === i, l = (s ? "g" : "") + (e.sticky ? "y" : "") || "noGY", c = e;
return a ? (e[S] = e[S] || {}, c = e[S][l] || (e[S][l] = o(e, {
addG: !!s,
addY: !!e.sticky,
removeG: "one" === i,
isInternalOnly: !0
}))) : s && (c = new RegExp(w.escape(String(e)), "g")), r = k.replace.call(x(t), c, n),
a && e.global && (e.lastIndex = 0), r;
}, w.replaceEach = function(t, e) {
var n, i;
for (n = 0; n < e.length; ++n) i = e[n], t = w.replace(t, i[0], i[1], i[2]);
return t;
}, w.split = function(t, e, n) {
return k.split.call(x(t), e, n);
}, w.test = function(t, e, n, i) {
return !!w.exec(t, e, n, i);
}, w.uninstall = function(t) {
t = m(t), C.astral && t.astral && b(!1), C.natives && t.natives && y(!1);
}, w.union = function(t, e) {
var n, i, r, o, a = /(\()(?!\?)|\\([1-9]\d*)|\\[\s\S]|\[(?:[^\\\]]|\\[\s\S])*]/g, s = [], l = 0, c = function(t, e, r) {
var o = i[l - n];
if (e) {
if (++l, o) return "(?<" + o + ">";
} else if (r) return "\\" + (+r + n);
return t;
};
if (!d(t, "Array") || !t.length) throw new TypeError("Must provide a nonempty array of patterns to merge");
for (o = 0; o < t.length; ++o) r = t[o], w.isRegExp(r) ? (n = l, i = r[S] && r[S].captureNames || [],
s.push(_.replace.call(w(r.source).source, a, c))) : s.push(w.escape(r));
return w(s.join("|"), e);
}, k.exec = function(t) {
var e, n, i, r = this.lastIndex, a = _.exec.apply(this, arguments);
if (a) {
if (!A && a.length > 1 && u(a, "") > -1 && (n = o(this, {
removeG: !0,
isInternalOnly: !0
}), _.replace.call(String(t).slice(a.index), n, function() {
var t, e = arguments.length;
for (t = 1; t < e - 2; ++t) void 0 === arguments[t] && (a[t] = void 0);
})), this[S] && this[S].captureNames) for (i = 1; i < a.length; ++i) (e = this[S].captureNames[i - 1]) && (a[e] = a[i]);
this.global && !a[0].length && this.lastIndex > a.index && (this.lastIndex = a.index);
}
return this.global || (this.lastIndex = r), a;
}, k.test = function(t) {
return !!k.exec.call(this, t);
}, k.match = function(t) {
var e;
if (w.isRegExp(t)) {
if (t.global) return e = _.match.apply(this, arguments), t.lastIndex = 0, e;
} else t = new RegExp(t);
return k.exec.call(t, x(this));
}, k.replace = function(t, e) {
var n, i, r, o = w.isRegExp(t);
return o ? (t[S] && (i = t[S].captureNames), n = t.lastIndex) : t += "", r = d(e, "Function") ? _.replace.call(String(this), t, 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 && t.global && (t.lastIndex = r[r.length - 2] + r[0].length), e.apply(void 0, r);
}) : _.replace.call(null == this ? this : String(this), t, function() {
var t = arguments;
return _.replace.call(String(e), L, function(e, n, r) {
var o;
if (n) {
if ((o = +n) <= t.length - 3) return t[o] || "";
if ((o = i ? u(i, n) : -1) < 0) throw new SyntaxError("Backreference to undefined group " + e);
return t[o + 1] || "";
}
if ("$" === r) return "$";
if ("&" === r || 0 == +r) return t[0];
if ("`" === r) return t[t.length - 1].slice(0, t[t.length - 2]);
if ("'" === r) return t[t.length - 1].slice(t[t.length - 2] + t[0].length);
if (r = +r, !isNaN(r)) {
if (r > t.length - 3) throw new SyntaxError("Backreference to undefined group " + e);
return t[r] || "";
}
throw new SyntaxError("Invalid token " + e);
});
}), o && (t.global ? t.lastIndex = 0 : t.lastIndex = n), r;
}, k.split = function(t, e) {
if (!w.isRegExp(t)) return _.split.apply(this, arguments);
var n, i = String(this), r = [], o = t.lastIndex, a = 0;
return e = (void 0 === e ? -1 : e) >>> 0, w.forEach(i, t, function(t) {
t.index + t[0].length > a && (r.push(i.slice(a, t.index)), t.length > 1 && t.index < i.length && Array.prototype.push.apply(r, t.slice(1)),
n = t[0].length, a = t.index + n);
}), a === i.length ? _.test.call(t, "") && !n || r.push("") : r.push(i.slice(a)),
t.lastIndex = o, r.length > e ? r.slice(0, e) : r;
}, w.addToken(/\\([ABCE-RTUVXYZaeg-mopqyz]|c(?![A-Za-z])|u(?![\dA-Fa-f]{4}|{[\dA-Fa-f]+})|x(?![\dA-Fa-f]{2}))/, function(t, e) {
if ("B" === t[1] && e === D) return t[0];
throw new SyntaxError("Invalid escape " + t[0]);
}, {
scope: "all",
leadChar: "\\"
}), w.addToken(/\\u{([\dA-Fa-f]+)}/, function(t, e, n) {
var i = a(t[1]);
if (i > 1114111) throw new SyntaxError("Invalid Unicode code point " + t[0]);
if (i <= 65535) return "\\u" + h(c(i));
if (R && n.indexOf("u") > -1) return t[0];
throw new SyntaxError("Cannot use Unicode code point above \\u{FFFF} without flag u");
}, {
scope: "all",
leadChar: "\\"
}), w.addToken(/\[(\^?)]/, function(t) {
return t[1] ? "[\\s\\S]" : "\\b\\B";
}, {
leadChar: "["
}), w.addToken(/\(\?#[^)]*\)/, function(t, e, n) {
return p(t.input, t.index + t[0].length, n) ? "" : "(?:)";
}, {
leadChar: "("
}), w.addToken(/\s+|#.*/, function(t, e, n) {
return p(t.input, t.index + t[0].length, n) ? "" : "(?:)";
}, {
flag: "x"
}), w.addToken(/\./, function() {
return "[\\s\\S]";
}, {
flag: "s",
leadChar: "."
}), w.addToken(/\\k<([\w$]+)>/, function(t) {
var e = isNaN(t[1]) ? u(this.captureNames, t[1]) + 1 : +t[1], n = t.index + t[0].length;
if (!e || e > this.captureNames.length) throw new SyntaxError("Backreference to undefined group " + t[0]);
return "\\" + e + (n === t.input.length || isNaN(t.input.charAt(n)) ? "" : "(?:)");
}, {
leadChar: "\\"
}), w.addToken(/\\(\d+)/, function(t, e) {
if (!(e === D && /^[1-9]/.test(t[1]) && +t[1] <= this.captureNames.length) && "0" !== t[1]) throw new SyntaxError("Cannot use octal escape or backreference to undefined group " + t[0]);
return t[0];
}, {
scope: "all",
leadChar: "\\"
}), w.addToken(/\(\?P?<([\w$]+)>/, function(t) {
if (!isNaN(t[1])) throw new SyntaxError("Cannot use integer as capture name " + t[0]);
if ("length" === t[1] || "__proto__" === t[1]) throw new SyntaxError("Cannot use reserved word as capture name " + t[0]);
if (u(this.captureNames, t[1]) > -1) throw new SyntaxError("Cannot use same name for multiple groups " + t[0]);
return this.captureNames.push(t[1]), this.hasNamedCapture = !0, "(";
}, {
leadChar: "("
}), w.addToken(/\((?!\?)/, function(t, e, n) {
return n.indexOf("n") > -1 ? "(?:" : (this.captureNames.push(null), "(");
}, {
optionalFlags: "n",
leadChar: "("
}), e.exports = w;
}, {} ]
}, {}, [ 8 ])(8);
}), function(t, e) {
"object" == typeof exports ? module.exports = e() : "function" == typeof define && define.amd ? define("stacktrace", e) : t.printStackTrace = e();
}(this, function() {
function t(e) {
e = e || {
guess: !0
};
var n = e.e || null, i = !!e.guess, r = e.mode || null, o = new t.implementation(), a = o.run(n, r);
return i ? o.guessAnonymousFunctions(a) : a;
}
return t.implementation = function() {}, t.implementation.prototype = {
run: function(t, e) {
return t = t || this.createException(), e = e || this.mode(t), "other" === e ? this.other(arguments.callee) : this[e](t);
},
createException: function() {
try {
this.undef();
} catch (t) {
return t;
}
},
mode: function(t) {
return "undefined" != typeof window && window.navigator.userAgent.indexOf("PhantomJS") > -1 ? "phantomjs" : t.arguments && t.stack ? "chrome" : t.stack && t.sourceURL ? "safari" : t.stack && t.number ? "ie" : t.stack && t.fileName ? "firefox" : t.message && t["opera#sourceloc"] ? t.stacktrace ? t.message.indexOf("\n") > -1 && t.message.split("\n").length > t.stacktrace.split("\n").length ? "opera9" : "opera10a" : "opera9" : t.message && t.stack && t.stacktrace ? t.stacktrace.indexOf("called from line") < 0 ? "opera10b" : "opera11" : t.stack && !t.fileName ? "chrome" : "other";
},
instrumentFunction: function(e, n, i) {
e = e || window;
var r = e[n];
e[n] = function() {
return i.call(this, t().slice(4)), e[n]._instrumented.apply(this, arguments);
}, e[n]._instrumented = r;
},
deinstrumentFunction: function(t, e) {
t[e].constructor === Function && t[e]._instrumented && t[e]._instrumented.constructor === Function && (t[e] = t[e]._instrumented);
},
chrome: function(t) {
return (t.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(t) {
return t.stack.replace(/\[native code\]\n/m, "").replace(/^(?=\w+Error\:).*$\n/m, "").replace(/^@/gm, "{anonymous}()@").split("\n");
},
ie: function(t) {
return t.stack.replace(/^\s*at\s+(.*)$/gm, "$1").replace(/^Anonymous function\s+/gm, "{anonymous}() ").replace(/^(.+)\s+\((.+)\)$/gm, "$1@$2").split("\n").slice(1);
},
firefox: function(t) {
return t.stack.replace(/(?:\n@:0)?\s+$/m, "").replace(/^(?:\((\S*)\))?@/gm, "{anonymous}($1)@").split("\n");
},
opera11: function(t) {
for (var e = /^.*line (\d+), column (\d+)(?: in (.+))? in (\S+):$/, n = t.stacktrace.split("\n"), i = [], r = 0, o = n.length; r < o; r += 2) {
var a = e.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(t) {
for (var e = /^(.*)@(.+):(\d+)$/, n = t.stacktrace.split("\n"), i = [], r = 0, o = n.length; r < o; r++) {
var a = e.exec(n[r]);
if (a) {
var s = a[1] ? a[1] + "()" : "global code";
i.push(s + "@" + a[2] + ":" + a[3]);
}
}
return i;
},
opera10a: function(t) {
for (var e = /Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i, n = t.stacktrace.split("\n"), i = [], r = 0, o = n.length; r < o; r += 2) {
var a = e.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(t) {
for (var e = /Line (\d+).*script (?:in )?(\S+)/i, n = t.message.split("\n"), i = [], r = 2, o = n.length; r < o; r += 2) {
var a = e.exec(n[r]);
a && i.push("{anonymous}()@" + a[2] + ":" + a[1] + " -- " + n[r + 1].replace(/^\s+/, ""));
}
return i;
},
phantomjs: function(t) {
for (var e = /(\S+) \((\S+)\)/i, n = t.stack.split("\n"), i = [], r = 1, o = n.length; r < o; r++) {
n[r] = n[r].replace(/^\s+at\s+/gm, "");
var a = e.exec(n[r]);
a ? i.push(a[1] + "()@" + a[2]) : i.push("{anonymous}()@" + n[r]);
}
return i;
},
other: function(t) {
for (var e, n, i = /function(?:\s+([\w$]+))?\s*\(/, r = [], o = Array.prototype.slice; t && r.length < 10; ) {
e = i.test(t.toString()) ? RegExp.$1 || "{anonymous}" : "{anonymous}";
try {
n = o.call(t.arguments || []);
} catch (t) {
n = [ "Cannot access arguments: " + t ];
}
r[r.length] = e + "(" + this.stringifyArguments(n) + ")";
try {
t = t.caller;
} catch (t) {
r[r.length] = "Cannot access caller: " + t;
break;
}
}
return r;
},
stringifyArguments: function(t) {
for (var e = [], n = Array.prototype.slice, i = 0; i < t.length; ++i) {
var r = t[i];
void 0 === r ? e[i] = "undefined" : null === r ? e[i] = "null" : r.constructor && (r.constructor === Array ? r.length < 3 ? e[i] = "[" + this.stringifyArguments(r) + "]" : e[i] = "[" + this.stringifyArguments(n.call(r, 0, 1)) + "..." + this.stringifyArguments(n.call(r, -1)) + "]" : r.constructor === Object ? e[i] = "#object" : r.constructor === Function ? e[i] = "#function" : r.constructor === String ? e[i] = '"' + r + '"' : r.constructor === Number ? e[i] = r : e[i] = "?");
}
return e.join(",");
},
sourceCache: {},
ajax: function(t) {
var e = this.createXMLHTTPObject();
if (e) try {
return e.open("GET", t, !1), e.send(null), e.responseText;
} catch (t) {}
return "";
},
createXMLHTTPObject: function() {
for (var t, e = [ 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 < e.length; n++) try {
return t = e[n](), this.createXMLHTTPObject = e[n], t;
} catch (t) {}
},
isSameDomain: function(t) {
return "undefined" != typeof location && -1 !== t.indexOf(location.hostname);
},
getSource: function(t) {
return t in this.sourceCache || (this.sourceCache[t] = this.ajax(t).split("\n")),
this.sourceCache[t];
},
guessAnonymousFunctions: function(t) {
for (var e = 0; e < t.length; ++e) {
var n = /\{anonymous\}\(.*\)@(.*)/, i = /^(.*?)(?::(\d+))(?::(\d+))?(?: -- .+)?$/, r = t[e], 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);
t[e] = r.replace("{anonymous}", u);
}
}
}
}
return t;
},
guessAnonymousFunction: function(t, e, n) {
var i;
try {
i = this.findFunctionName(this.getSource(t), e);
} catch (e) {
i = "getSource failed with url: " + t + ", exception: " + e.toString();
}
return i;
},
findFunctionName: function(t, e) {
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(e, 20), u = 0; u < c; ++u) if (n = t[e - 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 "(?)";
}
}, t;
});
var saveAs = saveAs || function(t) {
"use strict";
if (!(void 0 === t || "undefined" != typeof navigator && /MSIE [1-9]\./.test(navigator.userAgent))) {
var e = t.document, n = function() {
return t.URL || t.webkitURL || t;
}, i = e.createElementNS("http://www.w3.org/1999/xhtml", "a"), r = "download" in i, o = function(t) {
var e = new MouseEvent("click");
t.dispatchEvent(e);
}, a = /constructor/i.test(t.HTMLElement) || t.safari, s = /CriOS\/[\d]+/.test(navigator.userAgent), l = function(e) {
(t.setImmediate || t.setTimeout)(function() {
throw e;
}, 0);
}, c = function(t) {
var e = function() {
"string" == typeof t ? n().revokeObjectURL(t) : t.remove();
};
setTimeout(e, 4e4);
}, u = function(t, e, n) {
e = [].concat(e);
for (var i = e.length; i--; ) {
var r = t["on" + e[i]];
if ("function" == typeof r) try {
r.call(t, n || t);
} catch (t) {
l(t);
}
}
}, d = function(t) {
return /^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(t.type) ? new Blob([ String.fromCharCode(65279), t ], {
type: t.type
}) : t;
}, p = function(e, l, p) {
p || (e = d(e));
var h, f = this, m = e.type, g = "application/octet-stream" === m, v = function() {
u(f, "writestart progress write writeend".split(" "));
};
return f.readyState = f.INIT, r ? (h = n().createObjectURL(e), void setTimeout(function() {
i.href = h, i.download = l, o(i), v(), c(h), f.readyState = f.DONE;
})) : void !function() {
if ((s || g && a) && t.FileReader) {
var i = new FileReader();
return i.onloadend = function() {
var e = s ? i.result : i.result.replace(/^data:[^;]*;/, "data:attachment/file;");
t.open(e, "_blank") || (t.location.href = e), e = void 0, f.readyState = f.DONE,
v();
}, i.readAsDataURL(e), void (f.readyState = f.INIT);
}
h || (h = n().createObjectURL(e)), g ? t.location.href = h : t.open(h, "_blank") || (t.location.href = h),
f.readyState = f.DONE, v(), c(h);
}();
}, h = p.prototype, f = function(t, e, n) {
return new p(t, e || t.name || "download", n);
};
return "undefined" != typeof navigator && navigator.msSaveOrOpenBlob ? function(t, e, n) {
return e = e || t.name || "download", n || (t = d(t)), navigator.msSaveOrOpenBlob(t, e);
} : (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(t) {
return function() {
return t.saveAs;
};
}(this)), define("utils", [ "jquery", "underscore", "storage", "crel", "xregexp", "stacktrace", "FileSaver" ], function($, _, storage, crel, XRegExp, printStackTrace, saveAs) {
function jqElt(t) {
return _.isString(t) || !t.val ? $(t) : t;
}
function inputError(t, e) {
void 0 !== e && (t.stop(!0, !0).addClass("error").delay(3e3).queue(function() {
$(this).removeClass("error"), $(this).dequeue();
}), e.stopPropagation());
}
function getInputNumValue(t, e, n, i, r) {
e = jqElt(e);
var o = utils.getInputTextValue(e, n);
if (void 0 !== o) return o = t ? parseFloat(o) : parseInt(o, 10), isNaN(o) || void 0 !== i && o < i || void 0 !== r && o > r ? void inputError(e, n) : o;
}
function padNumber(t, e, n) {
var i = "";
for (t < 0 && (i = "-", t = -t), t = "" + t; t.length < e; ) t = "0" + t;
return n && (t = t.substr(t.length - e)), i + t;
}
function dateGetter(t, e, n, i) {
return n = n || 0, function(r) {
var o = r["get" + t]();
return (n > 0 || o > -n) && (o += n), 0 === o && -12 == n && (o = 12), padNumber(o, e, i);
};
}
function dateStrGetter(t, e) {
return function(n, i) {
var r = n["get" + t]();
return i[(e ? "SHORT" + t : t).toUpperCase()][r];
};
}
var utils = {};
utils.msie = function() {
var t = parseInt((/msie (\d+)/.exec(navigator.userAgent.toLowerCase()) || [])[1], 10);
return isNaN(t) && (t = parseInt((/trident\/.*; rv:(\d+)/.exec(navigator.userAgent.toLowerCase()) || [])[1], 10)),
t;
}(), utils.urlResolve = function() {
var t = document.createElement("a");
return function(e) {
var n = e;
return utils.msie && (t.setAttribute("href", n), n = t.href), t.setAttribute("href", n),
{
href: t.href,
protocol: t.protocol ? t.protocol.replace(/:$/, "") : "",
host: t.host,
search: t.search ? t.search.replace(/^\?/, "") : "",
hash: t.hash ? t.hash.replace(/^#/, "") : "",
hostname: t.hostname,
port: t.port,
pathname: "/" === t.pathname.charAt(0) ? t.pathname : "/" + t.pathname
};
};
}(), utils.defer = function() {
var t = [];
return window.addEventListener("message", function(e) {
e.source == window && "deferMsg" == e.data && (e.stopPropagation(), t.length > 0 && t.shift()());
}, !0), function(e) {
t.push(e), window.postMessage("deferMsg", "*");
};
}(), utils.debounce = function(t, e) {
function n() {
i = !1, t.call(e);
}
var i = !1;
return function() {
!0 !== i && (i = !0, utils.defer(n));
};
};
var idAlphabet = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
utils.id = function() {
for (var t = [], e = 0; e < 24; e++) t.push(idAlphabet[Math.random() * idAlphabet.length | 0]);
return t.join("");
}, utils.getURLParameter = function(t) {
var e = new RegExp("(?:\\?|\\#\\!|&)" + t + "=(.+?)(?:&|\\#|$)");
try {
return decodeURIComponent(e.exec(location.search + location.hash)[1]);
} catch (t) {
return;
}
}, utils.getInputValue = function(t) {
return t = jqElt(t), t.val();
}, utils.setInputValue = function(t, e) {
t = jqElt(t), t.val(e);
}, utils.getInputTextValue = function(t, e, n) {
t = jqElt(t);
var i = t.val();
return void 0 === i ? void inputError(t, e) : (i = utils.trim(i), 0 === i.length || void 0 !== n && !i.match(n) ? void inputError(t, e) : i);
}, utils.getInputIntValue = _.partial(getInputNumValue, !1), utils.getInputFloatValue = _.partial(getInputNumValue, !0),
utils.getInputRegExpValue = function(t, e) {
t = jqElt(t);
var n = utils.getInputTextValue(t, e);
if (void 0 !== n) {
try {
new RegExp(n);
} catch (n) {
return void inputError(t, e);
}
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(t, e) {
t = jqElt(t);
var n = utils.getInputTextValue(t, e);
if (void 0 !== n) {
try {
JSON.parse(n);
} catch (n) {
return void inputError(t, e);
}
return n;
}
}, utils.getInputChecked = function(t) {
return t = jqElt(t), t.prop("checked");
}, utils.setInputChecked = function(t, e) {
t = jqElt(t), t.prop("checked", e).change();
}, utils.getInputRadio = function(t) {
return $("input:radio[name=" + t + "]:checked").prop("value");
}, utils.setInputRadio = function(t, e) {
$("input:radio[name=" + t + "][value=" + e + "]").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(t) {
return $.trim(t);
};
var nonWordChars = XRegExp("[^\\p{L}\\p{N}-]", "g");
utils.slugify = function(t) {
return t.toLowerCase().replace(/\s/g, "-").replace(nonWordChars, "").replace(/\-\-+/g, "-").replace(/^-+/, "").replace(/-+$/, "");
}, utils.checkUrl = function(t, e) {
return t ? (0 !== t.indexOf("http") && (t = "http://" + t), e && -1 === t.indexOf("/", t.length - 1) && (t += "/"),
t) : t;
}, utils.addModal = function(t, e) {
var n = crel("div", {
"class": "modal " + t
});
n.innerHTML = e, document.body.appendChild(n);
}, utils.createBackdrop = function(t) {
var e = crel("div", {
"class": "modal-backdrop fade"
});
return t = t || document.body, t.appendChild(e), e.offsetWidth, e.className = e.className + " in",
e.removeBackdrop = function() {
e.className = "modal-backdrop fade", setTimeout(function() {
e.parentNode.removeChild(e);
}, 150);
}, e;
};
var openedTooltip;
utils.createTooltip = function(t, e) {
_.each(document.querySelectorAll(t), function(t) {
var n = $(t);
n.tooltip({
html: !0,
container: n.parents(".modal-content"),
placement: "right",
trigger: "manual",
title: e
}).click(function() {
var t = this;
openedTooltip && openedTooltip[0] === t || utils.defer(function() {
openedTooltip = $(t).tooltip("show");
});
});
});
}, utils.popupWindow = function(t, e, n, i) {
var r = screen.width / 2 - n / 2, o = screen.height / 2 - i / 2;
return window.open(t, e, [ "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(t, e, n) {
function i() {
var t = window.innerWidth - 20;
t > e && (t = e);
var i = window.innerHeight - 50;
i > n && (i = n), a.setAttribute("width", t), 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: t,
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(t, e, n) {
redirectCallbackConfirm = e, redirectCallbackCancel = n, $(".modal-redirect-confirm .redirect-msg").html(t),
$(".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(t) {
t.stopPropagation();
});
}, utils.lockUI = function(t) {
var e = $([ "#wmd-input", "#preview-contents", ".navbar .file-title-navbar", ".navbar .left-buttons", ".navbar .right-buttons", ".navbar .buttons-dropdown" ].join(",")).hide();
return function() {
e.show(), t && t.apply(null, arguments);
};
};
var entityMap = {
"&": "&amp;",
"<": "&lt;",
'"': "&quot;",
"'": "&#39;",
"/": "&#x2F;",
"\xa0": " "
};
utils.escape = function(t) {
return String(t).replace(/[&<"'\/\u00a0]/g, function(t) {
return entityMap[t];
});
}, utils.saveAs = function(t, e) {
if (void 0 === saveAs || /constructor/i.test(window.HTMLElement)) if (_.isString(t)) {
var n = "data:application/octet-stream;base64," + utils.encodeBase64(t);
window.open(n, "file");
} else {
var i = new FileReader();
i.onload = function(t) {
utils.redirectConfirm("You are opening a PDF document.", function() {
var e = "data:application/pdf;" + t.target.result.substring(t.target.result.indexOf("base64"));
window.open(e, "file");
});
}, i.readAsDataURL(t);
} else _.isString(t) && (t = new Blob([ t ], {
type: "text/plain;charset=utf-8"
})), saveAs(t, e);
}, utils.updateCurrentTime = function() {
utils.currentTime = Date.now();
}, utils.updateCurrentTime(), utils.storeAttributes = function(t) {
var e = t.syncIndex || t.publishIndex, n = _.omit(t, "syncIndex", "publishIndex", "provider");
n.provider = t.provider.providerId, storage[e] = JSON.stringify(n);
}, utils.retrieveIndexArray = function(t) {
try {
return _.compact(storage[t].split(";"));
} catch (e) {
return storage[t] = ";", [];
}
}, utils.appendIndexToArray = function(t, e) {
storage[t] += e + ";";
}, utils.removeIndexFromArray = function(t, e) {
storage[t] = storage[t].replace(";" + e + ";", ";");
}, utils.retrieveIgnoreError = function(t) {
try {
return JSON.parse(storage[t]);
} catch (t) {
return;
}
};
var eventList = [];
utils.logValue = function(t) {
eventList.unshift(t), eventList.length > 5 && eventList.pop();
}, utils.logStackTrace = function() {
eventList.unshift(printStackTrace()), eventList.length > 5 && eventList.pop();
}, utils.formatEventList = function() {
var t = [];
return _.each(eventList, function(e) {
t.push("\n"), _.isString(e) ? t.push(e) : _.isArray(e) && (t.push(e[5] || ""), t.push(e[6] || ""));
}), t.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(t) {
var e, n, i = "", r = [], o = Date.now() - t, a = "HH:mm";
for (o > 3155694e4 ? a = "y" : o > 864e5 && (a = "MMM d"), t = new Date(t); 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) {
e = DATE_FORMATS[n], i += e ? e(t, DATETIME_FORMATS) : n.replace(/(^'|'$)/g, "").replace(/''/g, "'");
}), i;
}, utils.encodeBase64 = function(t) {
if (0 === t.length) return "";
var e, n, i = [], r = 0;
for (t = encodeURI(t), e = t.length; r < e; ) n = t[r], r += 1, "%" !== n ? i.push(n.charCodeAt(0)) : (n = t[r] + t[r + 1],
i.push(parseInt(n, 16)), r += 2);
var o, a, s = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", l = [], c = i.length - i.length % 3;
for (o = 0; o < c; 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(t) {
return decodeURIComponent(window.escape(window.atob(t)));
};
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(t) {
var e = 0, n = -1;
return t.split("").forEach(function(t) {
e = 255 & (n ^ t.charCodeAt(0)), n = n >>> 8 ^ mHash[e];
}), n ^= -1, n < 0 && (n = 4294967295 + n + 1), n.toString(16);
}, window.perfTest = function(t) {
for (var e = Date.now(), n = 0; n < 1e4; n++) t();
console.log("Run 10,000 times in " + (Date.now() - e) + "ms");
}, utils;
}), define("constants", [], function() {
var t = {};
return t.VERSION = "4.3.20", t.MAIN_URL = "https://stackedit.io/", t.GOOGLE_ANALYTICS_ACCOUNT_ID = "UA-39556145-1",
t.GOOGLE_API_KEY = "AIzaSyAeCU8CGcSkn0z9js6iocHuPBX4f_mMWkw", t.GOOGLE_DRIVE_APP_ID = "241271498917",
t.DROPBOX_APP_KEY = "lq6mwopab8wskas", t.DROPBOX_APP_SECRET = "851fgnucpezy84t",
t.DROPBOX_RESTRICTED_APP_KEY = "sw0hlixhr8q1xk0", t.DROPBOX_RESTRICTED_APP_SECRET = "1r808p2xygs6lbg",
t.BITLY_ACCESS_TOKEN = "317e033bfd48cf31155a68a536b1860013b09c4c", t.DEFAULT_FILE_TITLE = "Title",
t.DEFAULT_FOLDER_NAME = "New folder", t.GDRIVE_DEFAULT_FILE_TITLE = "New Markdown document",
t.EDITOR_DEFAULT_PADDING = 35, t.CHECK_ONLINE_PERIOD = 12e4, t.AJAX_TIMEOUT = 3e4,
t.ASYNC_TASK_DEFAULT_TIMEOUT = 6e4, t.ASYNC_TASK_LONG_TIMEOUT = 18e4, t.USER_IDLE_THRESHOLD = 3e5,
t.IMPORT_FILE_MAX_CONTENT_SIZE = 1e5, t.IMPORT_IMG_MAX_CONTENT_SIZE = 1e7, t.COUCHDB_PAGE_SIZE = 25,
t.TEMPORARY_FILE_INDEX = "file.tempIndex", t.WELCOME_DOCUMENT_TITLE = "Hello!",
t.DOWNLOAD_IMPORT_URL = "/downloadImport", t.PICASA_IMPORT_IMG_URL = "/picasaImportImg",
t.SSH_PUBLISH_URL = "/sshPublish", t.PDF_EXPORT_URL = "/pdfExport", t.COUCHDB_URL = "https://stackedit.smileupps.com/documents",
t.BASE_URL = "http://localhost/", t.GOOGLE_CLIENT_ID = "241271498917-lev37kef013q85avc91am1gccg5g8lrb.apps.googleusercontent.com",
t.GITHUB_CLIENT_ID = "e47fef6055344579799d", t.GATEKEEPER_URL = "https://stackedit-gatekeeper-localhost.herokuapp.com/",
t.TUMBLR_PROXY_URL = "https://stackedit-tumblr-proxy-local.herokuapp.com/", t.WORDPRESS_CLIENT_ID = "23361",
t.WORDPRESS_PROXY_URL = "https://stackedit-io-wordpress-proxy.herokuapp.com/", 0 === location.hostname.indexOf("stackedit.io") ? (t.BASE_URL = t.MAIN_URL,
t.GOOGLE_CLIENT_ID = "241271498917-t4t7d07qis7oc0ahaskbif3ft6tk63cd.apps.googleusercontent.com",
t.GITHUB_CLIENT_ID = "710fc67886ab1ae8fee6", t.GATEKEEPER_URL = "https://stackedit-io-gatekeeper.herokuapp.com/",
t.TUMBLR_PROXY_URL = "https://stackedit-io-tumblr-proxy.herokuapp.com/") : 0 === location.hostname.indexOf("benweet.github.io") ? (t.BASE_URL = "http://benweet.github.io/stackedit/",
t.GOOGLE_CLIENT_ID = "241271498917-jpto9lls9fqnem1e4h6ppds9uob8rpvu.apps.googleusercontent.com",
t.GITHUB_CLIENT_ID = "fa0d09514da8377ee32e", t.GATEKEEPER_URL = "https://stackedit-gatekeeper.herokuapp.com/",
t.TUMBLR_PROXY_URL = "https://stackedit-tumblr-proxy.herokuapp.com/", t.WORDPRESS_CLIENT_ID = "3185",
t.WORDPRESS_PROXY_URL = "https://stackedit-wordpress-proxy.herokuapp.com/") : 0 === location.hostname.indexOf("stackedit-beta.herokuapp.com") ? (t.BASE_URL = "https://stackedit-beta.herokuapp.com/",
t.GOOGLE_CLIENT_ID = "241271498917-9bbplknkt0ljv5gaudhoiogp13hd18be.apps.googleusercontent.com",
t.GITHUB_CLIENT_ID = "e9034ae191c3a8a1c5ed", t.GATEKEEPER_URL = "https://stackedit-beta-gatekeeper.herokuapp.com/",
t.TUMBLR_PROXY_URL = "https://stackedit-beta-tumblr-proxy.herokuapp.com/", t.WORDPRESS_CLIENT_ID = "34786",
t.WORDPRESS_PROXY_URL = "https://stackedit-beta-wordpress-proxy.herokuapp.com/") : 0 === location.hostname.indexOf("benweet.insomnia247.nl") && (t.BASE_URL = "http://benweet.insomnia247.nl/stackedit/",
t.GOOGLE_CLIENT_ID = "241271498917-52hae7a08hv7ltenv7km8h7lghno9sk3.apps.googleusercontent.com",
t.GITHUB_CLIENT_ID = "d2943d6074b2d9c4a830", t.GATEKEEPER_URL = "https://stackedit-gatekeeper-insomnia.herokuapp.com/",
t.TUMBLR_PROXY_URL = "https://stackedit-tumblr-proxy-beta.herokuapp.com/"), t.THEME_LIST = {
blue: "Blue",
"default": "Default",
gray: "Gray",
night: "Night",
school: "School",
"solarized-light": "Solarized Light",
"solarized-dark": "Solarized Dark"
}, t;
}), define("settings", [ "underscore", "constants", "storage" ], function(t, e, 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](" + e.MAIN_URL + ").",
commitMsg: "Published with " + e.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="' + e.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: e.COUCHDB_URL,
extensionSettings: {}
};
try {
t.extend(i, JSON.parse(n.settings));
} catch (t) {}
return i;
}), function(t, e, n) {
function i(t, e, n) {
return t.addEventListener ? void t.addEventListener(e, n, !1) : void t.attachEvent("on" + e, n);
}
function r(t) {
if ("keypress" == t.type) {
var e = String.fromCharCode(t.which);
return t.shiftKey || (e = e.toLowerCase()), e;
}
return k[t.which] ? k[t.which] : E[t.which] ? E[t.which] : String.fromCharCode(t.which).toLowerCase();
}
function o(t, e) {
return t.sort().join(",") === e.sort().join(",");
}
function a(t) {
t = t || {};
var e, n = !1;
for (e in M) t[e] ? n = !0 : M[e] = 0;
n || (R = !1);
}
function s(t, e, n, i, r, a) {
var s, l, c = [], u = n.type;
if (!D[t]) return [];
for ("keyup" == u && f(t) && (e = [ t ]), s = 0; s < D[t].length; ++s) if (l = D[t][s],
(i || !l.seq || M[l.seq] == l.level) && u == l.action && ("keypress" == u && !n.metaKey && !n.ctrlKey || o(e, l.modifiers))) {
var d = !i && l.combo == r, p = i && l.seq == i && l.level == a;
(d || p) && D[t].splice(s, 1), c.push(l);
}
return c;
}
function l(t) {
var e = [];
return t.shiftKey && e.push("shift"), t.altKey && e.push("alt"), t.ctrlKey && e.push("ctrl"),
t.metaKey && e.push("meta"), e;
}
function c(t) {
return t.preventDefault ? void t.preventDefault() : void (t.returnValue = !1);
}
function u(t) {
return t.stopPropagation ? void t.stopPropagation() : void (t.cancelBubble = !0);
}
function d(t, e, n, i) {
O.stopCallback(e, e.target || e.srcElement, n, i) || !1 === t(e, n) && (c(e), u(e));
}
function p(t, e, n) {
var i, r = s(t, e, n), o = {}, 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, o[r[i].seq] = 1, d(r[i].callback, n, r[i].combo, r[i].seq);
} else c || d(r[i].callback, n, r[i].combo);
var u = "keypress" == n.type && A;
n.type != R || f(t) || u || a(o), A = c && "keydown" == n.type;
}
function h(t) {
"number" != typeof t.which && (t.which = t.keyCode);
var e = r(t);
if (e) return "keyup" == t.type && L === e ? void (L = !1) : void O.handleKey(e, l(t), t);
}
function f(t) {
return "shift" == t || "ctrl" == t || "alt" == t || "meta" == t;
}
function m() {
clearTimeout(_), _ = setTimeout(a, 1e3);
}
function g() {
if (!C) {
C = {};
for (var t in k) t > 95 && t < 112 || k.hasOwnProperty(t) && (C[k[t]] = t);
}
return C;
}
function v(t, e, n) {
return n || (n = g()[t] ? "keydown" : "keypress"), "keypress" == n && e.length && (n = "keydown"),
n;
}
function b(t, e, n, i) {
function o(e) {
d(n, e, t), "keyup" !== i && (L = r(e)), setTimeout(a, 10);
}
M[t] = 0;
for (var s = 0; s < e.length; ++s) {
var l = s + 1 === e.length, c = l ? o : function(e) {
return function() {
R = e, ++M[t], m();
};
}(i || x(e[s + 1]).action);
w(e[s], c, i, t, s);
}
}
function y(t) {
return "+" === t ? [ "+" ] : t.split("+");
}
function x(t, e) {
var n, i, r, o = [];
for (n = y(t), r = 0; r < n.length; ++r) i = n[r], I[i] && (i = I[i]), e && "keypress" != e && T[i] && (i = T[i],
o.push("shift")), f(i) && o.push(i);
return e = v(i, o, e), {
key: i,
modifiers: o,
action: e
};
}
function w(t, e, n, i, r) {
N[t + ":" + n] = e, t = t.replace(/\s+/g, " ");
var o, a = t.split(" ");
return a.length > 1 ? void b(t, a, e, n) : (o = x(t, n), D[o.key] = D[o.key] || [],
s(o.key, o.modifiers, {
type: o.action
}, i, t, r), D[o.key][i ? "unshift" : "push"]({
callback: e,
modifiers: o.modifiers,
action: o.action,
seq: i,
level: r,
combo: t
}), void 0);
}
function S(t, e, n) {
for (var i = 0; i < t.length; ++i) w(t[i], e, n);
}
for (var C, _, k = {
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"
}, E = {
106: "*",
107: "+",
109: "-",
110: ".",
111: "/",
186: ";",
187: "=",
188: ",",
189: "-",
190: ".",
191: "/",
192: "`",
219: "[",
220: "\\",
221: "]",
222: "'"
}, T = {
"~": "`",
"!": "1",
"@": "2",
"#": "3",
$: "4",
"%": "5",
"^": "6",
"&": "7",
"*": "8",
"(": "9",
")": "0",
_: "-",
"+": "=",
":": ";",
'"': "'",
"<": ",",
">": ".",
"?": "/",
"|": "\\"
}, I = {
option: "alt",
command: "meta",
"return": "enter",
escape: "esc",
mod: /Mac|iPod|iPhone|iPad/.test(navigator.platform) ? "meta" : "ctrl"
}, D = {}, N = {}, M = {}, L = !1, A = !1, R = !1, P = 1; P < 20; ++P) k[111 + P] = "f" + P;
for (P = 0; P <= 9; ++P) k[P + 96] = P;
i(e, "keypress", h), i(e, "keydown", h), i(e, "keyup", h);
var O = {
bind: function(t, e, n) {
return t = t instanceof Array ? t : [ t ], S(t, e, n), this;
},
unbind: function(t, e) {
return O.bind(t, function() {}, e);
},
trigger: function(t, e) {
return N[t + ":" + e] && N[t + ":" + e]({}, t), this;
},
reset: function() {
return D = {}, N = {}, this;
},
stopCallback: function(t, e) {
return !((" " + e.className + " ").indexOf(" mousetrap ") > -1) && ("INPUT" == e.tagName || "SELECT" == e.tagName || "TEXTAREA" == e.tagName || e.isContentEditable);
},
handleKey: p
};
t.Mousetrap = O, "function" == typeof define && define.amd && define("mousetrap", O);
}(window, document), define("logger", [], function() {
var t = {
log: function() {},
info: function() {},
warn: function() {},
error: function() {}
};
return /(\?|&)console($|&)/.test(location.search) ? console : t;
}), define("classes/Extension", [], function() {
function t(t, e, n, i) {
this.extensionId = t, this.extensionName = e, this.isOptional = n, this.disableInViewer = i;
}
return t;
}), define("text", [ "module" ], function(t) {
"use strict";
function e(t, e) {
return void 0 === t || "" === t ? e : t;
}
function n(t, n, i, r) {
if (n === r) return !0;
if (t === i) {
if ("http" === t) return e(n, "80") === e(r, "80");
if ("https" === t) return e(n, "443") === e(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 = t.config && t.config() || {};
return i = {
version: "2.0.15",
strip: function(t) {
if (t) {
t = t.replace(c, "");
var e = t.match(u);
e && (t = e[1]);
} else t = "";
return t;
},
jsEscape: function(t) {
return t.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 t, e, n;
if ("undefined" != typeof XMLHttpRequest) return new XMLHttpRequest();
if ("undefined" != typeof ActiveXObject) for (e = 0; e < 3; e += 1) {
n = l[e];
try {
t = new ActiveXObject(n);
} catch (t) {}
if (t) {
l = [ n ];
break;
}
}
return t;
},
parseName: function(t) {
var e, n, i, r = !1, o = t.lastIndexOf("."), a = 0 === t.indexOf("./") || 0 === t.indexOf("../");
return -1 !== o && (!a || o > 1) ? (e = t.substring(0, o), n = t.substring(o + 1)) : e = t,
i = n || e, o = i.indexOf("!"), -1 !== o && (r = "strip" === i.substring(o + 1),
i = i.substring(0, o), n ? n = i : e = i), {
moduleName: e,
ext: n,
strip: r
};
},
xdRegExp: /^((\w+)\:)?\/\/([^\/\\]+)/,
useXhr: function(t, e, r, o) {
var a, s, l, c = i.xdRegExp.exec(t);
return !c || (a = c[2], s = c[3], s = s.split(":"), l = s[1], s = s[0], (!a || a === e) && (!s || s.toLowerCase() === r.toLowerCase()) && (!l && !s || n(a, l, e, o)));
},
finishLoad: function(t, e, n, r) {
n = e ? i.strip(n) : n, g.isBuild && (m[t] = n), r(n);
},
load: function(t, e, n, r) {
if (r && r.isBuild && !r.inlineText) return void n();
g.isBuild = r && r.isBuild;
var o = i.parseName(t), a = o.moduleName + (o.ext ? "." + o.ext : ""), s = e.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(e) {
i.finishLoad(t, o.strip, e, n);
}, function(t) {
n.error && n.error(t);
}) : e([ a ], function(t) {
i.finishLoad(o.moduleName + "." + o.ext, o.strip, t, n);
}));
},
write: function(t, e, n, r) {
if (m.hasOwnProperty(e)) {
var o = i.jsEscape(m[e]);
n.asModule(t + "!" + e, "define(function () { return '" + o + "';});\n");
}
},
writeFile: function(t, e, n, r, o) {
var a = i.parseName(e), s = a.ext ? "." + a.ext : "", l = a.moduleName + s, c = n.toUrl(a.moduleName + s) + ".js";
i.load(l, n, function(e) {
var n = function(t) {
return r(c, t);
};
n.asModule = function(t, e) {
return r.asModule(t, c, e);
}, i.write(t, l, n, 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(t, e, n) {
try {
var i = r.readFileSync(t, "utf8");
"\ufeff" === i[0] && (i = i.substring(1)), e(i);
} catch (t) {
n && n(t);
}
}) : "xhr" === g.env || !g.env && i.createXhr() ? i.get = function(t, e, n, r) {
var o, a = i.createXhr();
if (a.open("GET", t, !0), r) for (o in r) r.hasOwnProperty(o) && a.setRequestHeader(o.toLowerCase(), r[o]);
g.onXhr && g.onXhr(a, t), a.onreadystatechange = function(i) {
var r, o;
4 === a.readyState && (r = a.status || 0, r > 399 && r < 600 ? (o = new Error(t + " HTTP status: " + r),
o.xhr = a, n && n(o)) : e(a.responseText), g.onXhrComplete && g.onXhrComplete(a, t));
}, a.send(null);
} : "rhino" === g.env || !g.env && "undefined" != typeof Packages && "undefined" != typeof java ? i.get = function(t, e) {
var n, i, r = new java.io.File(t), 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();
}
e(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(t, e) {
var n, i, r, l = {};
s && (t = t.replace(/\//g, "\\")), r = new FileUtils.File(t);
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(), e(l.value);
} catch (t) {
throw new Error((r && r.path || "") + ": " + t);
}
}), i;
}), define("text!html/settingsExtensionsAccordion.html", [], function() {
return '<div class="panel">\n\t<div class="accordion-heading">\n\t\t<div class="checkbox pull-right">\n\t\t\t<label> <input id="input-enable-extension-<%= extensionId %>"\n\t\t\t\ttype="checkbox"<% if(!isOptional) print(\'disabled\') %>>\n\t\t\t\tenabled\n\t\t\t</label>\n\t\t</div>\n\t\t<a data-toggle="collapse" data-parent=".accordion-extensions"\n\t\t\tclass="accordion-toggle collapsed" href="#accordion-extensions-collapse-<%= extensionId %>">\n\t\t\t<%= extensionName %> <i class="icon-up-dir"></i></a>\n\t</div>\n\t<div id="accordion-extensions-collapse-<%= extensionId %>" class="collapse">\n\t\t<div class="accordion-inner clearfix"><%= settingsBlock %></div>\n\t</div>\n</div>\n';
}), function() {
var t = function(t, e, n, i) {
this.rawMessage = t, this.parsedLine = void 0 !== e ? e : -1, this.snippet = void 0 !== n ? n : null,
this.parsedFile = void 0 !== i ? i : null, this.updateRepr(), this.message = t;
};
t.prototype = {
name: "YamlParseException",
message: null,
parsedFile: null,
parsedLine: -1,
snippet: null,
rawMessage: null,
isDefined: function(t) {
return void 0 != t && null != t;
},
getSnippet: function() {
return this.snippet;
},
setSnippet: function(t) {
this.snippet = t, this.updateRepr();
},
getParsedFile: function() {
return this.parsedFile;
},
setParsedFile: function(t) {
this.parsedFile = t, this.updateRepr();
},
getParsedLine: function() {
return this.parsedLine;
},
setParsedLine: function(t) {
this.parsedLine = t, this.updateRepr();
},
updateRepr: function() {
this.message = this.rawMessage;
var t = !1;
"." === this.message.charAt(this.message.length - 1) && (this.message = this.message.substring(0, this.message.length - 1),
t = !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 + '")'),
t && (this.message += ".");
}
};
var e = !1, n = function() {};
n.prototype = {
parseFile: function(e, n) {
if (null == n) {
var i = this.getFileContents(e), r = null;
try {
r = this.parse(i);
} catch (o) {
throw o instanceof t && o.setParsedFile(e), o;
}
return r;
}
this.getFileContents(e, function(t) {
n(new o().parse(t));
});
},
parse: function(t) {
return new o().parse(t);
},
dump: function(t, e, n) {
null == e && (e = 2);
var i = new s();
return n && (i.numSpacesForIndentation = n), i.dump(t, e);
},
getXHR: function() {
if (window.XMLHttpRequest) return new XMLHttpRequest();
if (window.ActiveXObject) for (var t = [ "Msxml2.XMLHTTP.6.0", "Msxml2.XMLHTTP.3.0", "Msxml2.XMLHTTP", "Microsoft.XMLHTTP" ], e = 0; e < 4; e++) try {
return new ActiveXObject(t[e]);
} catch (t) {}
return null;
},
getFileContents: function(t, n) {
if (e) {
var i = require("fs");
if (null == n) {
var r = i.readFileSync(t);
return null == r ? null : "" + r;
}
i.readFile(t, function(t, e) {
n(t ? null : e);
});
} else {
var o = this.getXHR();
if (null == n) return o.open("GET", t, !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", t, !0), o.send(null);
}
}
};
var i = {
stringify: function(t, e, i) {
return new n().dump(t, e, i);
},
parse: function(t) {
return new n().parse(t);
},
load: function(t, e) {
return new n().parseFile(t, e);
}
};
"undefined" != typeof exports && "undefined" != typeof module && module.exports && (exports = module.exports = i,
e = !0, function() {
var t = function(t, e) {
t.exports = i.load(e);
};
void 0 !== require.extensions && (require.extensions[".yml"] = t, require.extensions[".yaml"] = t);
}()), "undefined" != typeof window && (window.YAML = i);
var r = function() {};
r.prototype = {
i: null,
parse: function(e) {
var n = null;
if (e = this.trim(e), 0 == e.length) return "";
switch (e.charAt(0)) {
case "[":
n = this.parseSequence(e);
break;
case "{":
n = this.parseMapping(e);
break;
default:
n = this.parseScalar(e);
}
if ("" != e.substr(this.i + 1).replace(/^\s*#.*$/, "")) throw console.log("oups " + e.substr(this.i + 1)),
new t('Unexpected characters near "' + e.substr(this.i) + '".');
return n;
},
dump: function(t) {
if (void 0 == t || null == t) return "null";
if (t instanceof Date) return t.toISOString();
if ("object" == typeof t) return this.dumpObject(t);
if ("boolean" == typeof t) return t ? "true" : "false";
if (/^\d+$/.test(t)) return "string" == typeof t ? "'" + t + "'" : parseInt(t);
if (this.isNumeric(t)) return "string" == typeof t ? "'" + t + "'" : parseFloat(t);
if ("number" == typeof t) return t == 1 / 0 ? ".Inf" : t == -1 / 0 ? "-.Inf" : isNaN(t) ? ".NAN" : t;
var e = new YamlEscaper();
return e.requiresDoubleQuoting(t) ? e.escapeWithDoubleQuotes(t) : e.requiresSingleQuoting(t) ? e.escapeWithSingleQuotes(t) : "" == t ? '""' : this.getTimestampRegex().test(t) ? "'" + t + "'" : this.inArray(t.toLowerCase(), [ "null", "~", "true", "false" ]) ? "'" + t + "'" : t;
},
dumpObject: function(t) {
var e, n = this.getKeys(t), i = null, r = n.length;
if (t instanceof Array) {
for (i = [], e = 0; e < r; e++) i.push(this.dump(t[n[e]]));
return "[" + i.join(", ") + "]";
}
for (i = [], e = 0; e < r; e++) i.push(this.dump(n[e]) + ": " + this.dump(t[n[e]]));
return "{ " + i.join(", ") + " }";
},
parseScalar: function(e, 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(e[r], i)) {
if (a = this.parseQuotedScalar(e, r), r = this.i, null !== n) {
var c = e.substr(r).replace(/^\s+/, "");
if (!this.inArray(c.charAt(0), n)) throw new t("Unexpected characters (" + e.substr(r) + ").");
}
} else {
if (n) {
if (!(l = new RegExp("^(.+?)(" + n.join("|") + ")").exec((e + "").substring(r)))) throw new t("Malformed inline YAML string (" + e + ").");
a = l[1], r += a.length;
} else a = (e + "").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(e, n) {
var i = null;
if (!(i = new RegExp("^" + r.REGEX_QUOTED_STRING).exec((e + "").substring(n)))) throw new t("Malformed inline YAML string (" + (e + "").substring(n) + ").");
var o = i[0].substr(1, i[0].length - 2), s = new a();
return o = '"' == (e + "").charAt(n) ? s.unescapeDoubleQuotedString(o) : s.unescapeSingleQuotedString(o),
n += i[0].length, this.i = n, o;
},
parseSequence: function(e, n) {
void 0 == n && (n = 0);
var i = [], r = e.length;
for (n += 1; n < r; ) {
switch (e.charAt(n)) {
case "[":
i.push(this.parseSequence(e, n)), n = this.i;
break;
case "{":
i.push(this.parseMapping(e, n)), n = this.i;
break;
case "]":
return this.i = n, i;
case ",":
case " ":
break;
default:
var o = this.inArray(e.charAt(n), [ '"', "'" ]), a = this.parseScalar(e, [ ",", "]" ], [ '"', "'" ], n);
if (n = this.i, !o && -1 != (a + "").indexOf(": ")) try {
a = this.parseMapping("{" + a + "}");
} catch (e) {
if (!(e instanceof t)) throw e;
}
i.push(a), n--;
}
n++;
}
throw new t('Malformed inline YAML string "' + e + '"');
},
parseMapping: function(e, n) {
void 0 == n && (n = 0);
var i = {}, r = e.length;
n += 1;
for (var o = !1, a = !1; n < r; ) {
switch (a = !1, e.charAt(n)) {
case " ":
case ",":
n++, a = !0;
break;
case "}":
return this.i = n, i;
}
if (!a) {
var s = this.parseScalar(e, [ ":", " " ], [ '"', "'" ], n, !1);
for (n = this.i, o = !1; n < r; ) {
switch (e.charAt(n)) {
case "[":
i[s] = this.parseSequence(e, n), n = this.i, o = !0;
break;
case "{":
i[s] = this.parseMapping(e, n), n = this.i, o = !0;
break;
case ":":
case " ":
break;
default:
i[s] = this.parseScalar(e, [ ",", "}" ], [ '"', "'" ], n), n = this.i, o = !0, n--;
}
if (++n, o) {
a = !0;
break;
}
}
}
}
throw new t('Malformed inline YAML string "' + e + '"');
},
evaluateScalar: function(t) {
t = this.trim(t);
var e = null, n = null;
return "null" == t.toLowerCase() || "" == t || "~" == t ? null : 0 == (t + "").indexOf("!str ") ? ("" + t).substring(5) : 0 == (t + "").indexOf("! ") ? parseInt(this.parseScalar((t + "").substr(2))) : /^\d+$/.test(t) ? (e = t,
n = parseInt(t), "0" == t.charAt(0) ? this.octdec(t) : "" + e == "" + n ? n : e) : "true" == (t + "").toLowerCase() || "false" != (t + "").toLowerCase() && (this.isNumeric(t) ? "0x" == (t + "").substr(0, 2) ? this.hexdec(t) : parseFloat(t) : ".inf" == t.toLowerCase() ? 1 / 0 : ".nan" == t.toLowerCase() ? NaN : "-.inf" == t.toLowerCase() ? -1 / 0 : /^(-|\+)?[0-9,]+(\.[0-9]+)?$/.test(t) ? parseFloat(t.split(",").join("")) : this.getTimestampRegex().test(t) ? new Date(this.strtotime(t)) : "" + t);
},
getTimestampRegex: function() {
return new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:(?:[Tt]|[ \t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:.([0-9]*))?(?:[ \t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?)?$", "gi");
},
trim: function(t) {
return (t + "").replace(/^\s+/, "").replace(/\s+$/, "");
},
isNumeric: function(t) {
return t - 0 == t && t.length > 0 && "" != t.replace(/\s+/g, "");
},
inArray: function(t, e) {
var n, i = e.length;
for (n = 0; n < i; n++) if (t == e[n]) return !0;
return !1;
},
getKeys: function(t) {
var e = [];
for (var n in t) t.hasOwnProperty(n) && e.push(n);
return e;
},
octdec: function(t) {
return parseInt((t + "").replace(/[^0-7]/gi, ""), 8);
},
hexdec: function(t) {
return t = this.trim(t), "0x" == (t + "").substr(0, 2) && (t = (t + "").substring(2)),
parseInt((t + "").replace(/[^a-f0-9]/gi, ""), 16);
},
strtotime: function(t, e) {
var n, i, r, o, a = "";
if ("now" === (t = (t + "").replace(/\s{2,}|^\s|\s$/g, " ").replace(/[\t\r\n]/g, ""))) return null === e || isNaN(e) ? new Date().getTime() || 0 : e || 0;
if (!isNaN(a = Date.parse(t))) return a || 0;
e = e ? new Date(e) : new Date(), t = t.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 = t.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 = t.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; n < i; n++) if (!function(t) {
var n = t[2] && "ago" === t[2], i = (i = "last" === t[0] ? -1 : 1) * (n ? -1 : 1);
switch (t[0]) {
case "last":
case "next":
switch (t[1].substring(0, 3)) {
case "yea":
e.setFullYear(e.getFullYear() + i);
break;
case "wee":
e.setDate(e.getDate() + 7 * i);
break;
case "day":
e.setDate(e.getDate() + i);
break;
case "hou":
e.setHours(e.getHours() + i);
break;
case "min":
e.setMinutes(e.getMinutes() + i);
break;
case "sec":
e.setSeconds(e.getSeconds() + i);
break;
case "mon":
if ("month" === t[1]) {
e.setMonth(e.getMonth() + i);
break;
}
default:
var r = s.day[t[1].substring(0, 3)];
if (void 0 !== r) {
var o = r - e.getDay();
0 === o ? o = 7 * i : o > 0 ? "last" === t[0] && (o -= 7) : "next" === t[0] && (o += 7),
e.setDate(e.getDate() + o), e.setHours(0, 0, 0, 0);
}
}
break;
default:
if (!/\d+/.test(t[0])) return !1;
switch (i *= parseInt(t[0], 10), t[1].substring(0, 3)) {
case "yea":
e.setFullYear(e.getFullYear() + i);
break;
case "mon":
e.setMonth(e.getMonth() + i);
break;
case "wee":
e.setDate(e.getDate() + 7 * i);
break;
case "day":
e.setDate(e.getDate() + i);
break;
case "hou":
e.setHours(e.getHours() + i);
break;
case "min":
e.setMinutes(e.getMinutes() + i);
break;
case "sec":
e.setSeconds(e.getSeconds() + i);
}
}
return !0;
}(r[n].split(" "))) return !1;
return e.getTime() || 0;
}
}, r.REGEX_QUOTED_STRING = "(?:\"(?:[^\"\\\\]*(?:\\\\.[^\"\\\\]*)*)\"|'(?:[^']*(?:''[^']*)*)')";
var o = function(t) {
this.offset = void 0 !== t ? t : 0;
};
o.prototype = {
offset: 0,
lines: [],
currentLineNb: -1,
currentLine: "",
refs: {},
parse: function(e) {
this.currentLineNb = -1, this.currentLine = "", this.lines = this.cleanup(e).split("\n");
for (var n = null, i = null; this.moveToNextLine(); ) if (!this.isCurrentLineEmpty()) {
if ("\t" == this.currentLine.charAt(0)) throw new t("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 t("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 {
e = new r().parse(this.lines[0]);
} catch (e) {
throw e instanceof t && (e.setParsedLine(this.getRealCurrentLineNb() + 1), e.setSnippet(this.currentLine)),
e;
}
if (this.isObject(e)) {
var b = e[0];
if ("string" == typeof e && "*" == b.charAt(0)) {
n = [], g = e.length;
for (var y = 0; y < g; y++) n.push(this.refs[e[y].substr(1)]);
e = n;
}
}
return e;
}
throw new t("Unable to parse.", this.getRealCurrentLineNb() + 1, this.currentLine);
}
if (this.isDefined(n) || (n = {}), i && "sequence" == i) throw new t("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 (e) {
throw e instanceof t && (e.setParsedLine(this.getRealCurrentLineNb() + 1), e.setSnippet(this.currentLine)),
e;
}
if ("<<" == f) if (this.isDefined(c.value) && "*" == (c.value + "").charAt(0)) {
if (s = c.value.substr(1), void 0 == this.refs[s]) throw new t('Reference "' + e + '" does not exist', this.getRealCurrentLineNb() + 1, this.currentLine);
} else {
e = 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(e),
this.refs = p.refs;
var x = [];
if (!this.isObject(m)) throw new t("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; y < g; y++) {
if (v[y], !this.isObject(v[y])) throw new t("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(e) {
this.moveToNextLine();
var n = null, i = null;
if (this.isDefined(e)) n = e; else {
n = this.getCurrentLineIndentation();
var r = this.isStringUnIndentedCollectionItem(this.currentLine);
if (!this.isCurrentLineEmpty() && 0 == n && !r) throw new t("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 t("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(e) {
if ("*" == (e + "").charAt(0)) {
if (e = "#" == this.trim(e).charAt(0) ? (e + "").substr(1, e.indexOf("#") - 2) : (e + "").substr(1),
void 0 == this.refs[e]) throw new t('Reference "' + e + '" does not exist', this.getRealCurrentLineNb() + 1, this.currentLine);
return this.refs[e];
}
var n = null;
if (n = /^(\||>)(\+|\-|\d+|\+\d+|\-\d+|\d+\+|\d+\-)?( +#.*)?$/.exec(e)) {
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(e);
} catch (e) {
throw e instanceof t && (e.setParsedLine(this.getRealCurrentLineNb() + 1), e.setSnippet(this.currentLine)),
e;
}
},
parseFoldedScalar: function(t, e, n) {
void 0 == e && (e = ""), void 0 == n && (n = 0), t = "|" == t ? "\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 + t; this.currentLineNb + 1 < this.lines.length; ) if (this.moveToNextLine(),
a = new RegExp("^( {" + s.length + ",})(.+)$").exec(this.currentLine)) a = {
indent: a[1],
text: a[2]
}, " " == t && 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" : t); else {
if (!(a = /^( *)$/.exec(this.currentLine))) {
this.moveToPreviousLine();
break;
}
i += a[1].replace(new RegExp("^ {1," + s.length + "}", "g"), "") + "\n";
}
switch (" " == t && (i = i.replace(/ (\n*)$/g, "\n$1")), e) {
case "":
i = i.replace(/\n+$/g, "\n");
break;
case "+":
break;
case "-":
i = i.replace(/\n+$/g, "");
}
return i;
},
isNextLineIndented: function() {
for (var t = this.getCurrentLineIndentation(), e = this.moveToNextLine(); e && this.isCurrentLineEmpty(); ) e = this.moveToNextLine();
if (0 == e) return !1;
var n = !1;
return this.getCurrentLineIndentation() <= t && (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(t) {
t = t.split("\r\n").join("\n").split("\r").join("\n"), /\n$/.test(t) || (t += "\n");
for (var e = 0, n = /^\%YAML[: ][\d\.]+.*\n/; n.test(t); ) t = t.replace(n, ""),
e++;
if (this.offset += e, n = /^(#.*?\n)+/, n.test(t)) {
var i = t.replace(n, "");
this.offset += this.subStrCount(t, "\n") - this.subStrCount(i, "\n"), t = i;
}
return n = /^\-\-\-.*?\n/, n.test(t) && (i = t.replace(n, ""), this.offset += this.subStrCount(t, "\n") - this.subStrCount(i, "\n"),
t = i, t = t.replace(/\.\.\.\s*$/g, "")), t;
},
isNextLineUnIndentedCollection: function() {
for (var t = this.getCurrentLineIndentation(), e = this.moveToNextLine(); e && this.isCurrentLineEmpty(); ) e = this.moveToNextLine();
if (!1 === e) return !1;
var n = !1;
return this.getCurrentLineIndentation() == t && this.isStringUnIndentedCollectionItem(this.currentLine) && (n = !0),
this.moveToPreviousLine(), n;
},
isStringUnIndentedCollectionItem: function(t) {
return 0 === this.currentLine.indexOf("- ");
},
isObject: function(t) {
return "object" == typeof t && this.isDefined(t);
},
isEmpty: function(t) {
return void 0 == t || null == t || "" == t || 0 == t || "0" == t || 0 == t;
},
isDefined: function(t) {
return void 0 != t && null != t;
},
reverseArray: function(t) {
for (var e = [], n = t.length, i = n - 1; i >= 0; i--) e.push(t[i]);
return e;
},
merge: function(t, e) {
var n, i = {};
for (n in t) t.hasOwnProperty(n) && (/^\d+$/.test(n) ? i.push(t) : i[n] = t[n]);
for (n in e) e.hasOwnProperty(n) && (/^\d+$/.test(n) ? i.push(e) : i[n] = e[n]);
return i;
},
strRepeat: function(t, e) {
var n, i = "";
for (n = 0; n < e; n++) i += t;
return i;
},
subStrCount: function(t, e, n, i) {
var r = 0;
t = "" + t, e = "" + e, void 0 != n && (t = t.substr(n)), void 0 != i && (t = t.substr(0, i));
for (var o = t.length, a = e.length, s = 0; s < o; s++) e == t.substr(s, a) && r++,
s += a - 1;
return r;
},
trim: function(t) {
return (t + "").replace(/^ +/, "").replace(/ +$/, "");
}
}, YamlEscaper = function() {}, YamlEscaper.prototype = {
requiresDoubleQuoting: function(t) {
return new RegExp(YamlEscaper.REGEX_CHARACTER_TO_ESCAPE).test(t);
},
escapeWithDoubleQuotes: function(t) {
t += "";
for (var e = YamlEscaper.escapees.length, n = YamlEscaper.escaped.length, i = YamlEscaper.escaped, r = 0; r < e; ++r) r >= n && i.push("");
return '"' + t.replace(new RegExp(YamlEscaper.escapees.join("|"), "g"), function(t) {
for (var n = 0; n < e; ++n) if (t == YamlEscaper.escapees[n]) return i[n];
}) + '"';
},
requiresSingleQuoting: function(t) {
return /[\s'":{}[\],&*#?]|^[-?|<>=!%@`]/.test(t);
},
escapeWithSingleQuotes: function(t) {
return "'" + t.replace(/'/g, "''") + "'";
}
}, YamlEscaper.REGEX_CHARACTER_TO_ESCAPE = "[\\x00-\\x1f]|\xc2\x85|\xc2\xa0|\xe2\x80\xa8|\xe2\x80\xa9",
YamlEscaper.escapees = [ "\\\\", '\\"', '"', "\0", "\x01", "\x02", "\x03", "\x04", "\x05", "\x06", "\x07", "\b", "\t", "\n", "\x0B", "\f", "\r", "\x0e", "\x0f", "\x10", "\x11", "\x12", "\x13", "\x14", "\x15", "\x16", "\x17", "\x18", "\x19", "\x1a", "\x1b", "\x1c", "\x1d", "\x1e", "\x1f", "\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(t) {
return t.replace(/''/g, "'");
},
unescapeDoubleQuotedString: function(t) {
var e = function(t) {
return new a().unescapeCharacter(t);
};
return t.replace(new RegExp(a.REGEX_ESCAPED_CHARACTER, "g"), e);
},
unescapeCharacter: function(t) {
switch (t.charAt(1)) {
case "0":
return String.fromCharCode(0);
case "a":
return String.fromCharCode(7);
case "b":
return String.fromCharCode(8);
case "t":
case "\t":
return "\t";
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 "\x1b";
case " ":
return " ";
case '"':
return '"';
case "/":
return "/";
case "\\":
return "\\";
case "N":
return "\0\x85";
case "_":
return "\0\xa0";
case "L":
return " (";
case "P":
return " )";
case "x":
return this.pack("n", new r().hexdec(t.substr(2, 2)));
case "u":
return this.pack("n", new r().hexdec(t.substr(2, 4)));
case "U":
return this.pack("N", new r().hexdec(t.substr(2, 8)));
}
},
pack: function(t) {
for (var e, n, i = 0, r = 1, o = "", a = 0; i < t.length; ) {
for (e = t.charAt(i), n = "", i++; i < t.length && null !== t.charAt(i).match(/[\d\*]/); ) n += t.charAt(i),
i++;
switch ("" === n && (n = "1"), e) {
case "n":
if ("*" === n && (n = arguments.length - r), n > arguments.length - r) throw new Error("Warning: pack() Type " + e + ": too few arguments");
for (a = 0; a < n; 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 " + e + ": too few arguments");
for (a = 0; a < n; 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 " + e + ": unknown format code");
}
}
if (r < arguments.length) throw new Error("Warning: pack(): " + (arguments.length - r) + " arguments unused");
return o;
}
}, a.REGEX_ESCAPED_CHARACTER = '\\\\([0abt\tnvfre "\\/\\\\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(t, e, n) {
null == e && (e = 0), null == n && (n = 0);
var i, o = "", a = n ? this.strRepeat(" ", n) : "";
if (this.numSpacesForIndentation || (this.numSpacesForIndentation = 2), e <= 0 || !this.isObject(t) || this.isEmpty(t)) i = new r(),
o += a + i.dump(t); else {
var s, l = !this.arrayEquals(this.getKeys(t), this.range(0, t.length - 1));
for (var c in t) t.hasOwnProperty(c) && (s = e - 1 <= 0 || !this.isObject(t[c]) || this.isEmpty(t[c]),
l && (i = new r()), o += a + "" + (l ? i.dump(c) + ":" : "-") + (s ? " " : "\n") + this.dump(t[c], e - 1, s ? 0 : n + this.numSpacesForIndentation) + (s ? "\n" : ""));
}
return o;
},
strRepeat: function(t, e) {
var n, i = "";
for (n = 0; n < e; n++) i += t;
return i;
},
isObject: function(t) {
return this.isDefined(t) && "object" == typeof t;
},
isEmpty: function(t) {
var e = void 0 == t || null == t || "" == t || 0 == t || "0" == t || 0 == t;
if (!(e || "object" != typeof t || t instanceof Array)) {
var n = 0;
for (var i in t) t.hasOwnProperty(i) && n++;
e = !n;
}
return e;
},
isDefined: function(t) {
return void 0 != t && null != t;
},
getKeys: function(t) {
var e = [];
for (var n in t) t.hasOwnProperty(n) && e.push(n);
return e;
},
range: function(t, e) {
if (t > e) return [];
for (var n = [], i = t; i <= e; i++) n.push(i);
return n;
},
arrayEquals: function(t, e) {
if (t.length != e.length) return !1;
for (var n = t.length, i = 0; i < n; i++) if (t[i] != e[i]) return !1;
return !0;
}
};
}(), define("yaml-js", function(t) {
return function() {
return t.YAML;
};
}(this)), define("extensions/yamlFrontMatterParser", [ "underscore", "classes/Extension", "yaml-js" ], function(t, e, n) {
function i(t, e) {
if (t === a) {
var i = s.exec(e), 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 e("yamlFrontMatterParser", "YAML front matter");
o.onEventMgrCreated = function(t) {
r = t;
};
var a;
o.onFileSelected = function(t) {
a = t;
};
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\t<div class="form-group">\n\t\t<label class="col-sm-4 control-label" for="input-markdownextra-tables">Tables</label>\n\t\t<div class="col-sm-7">\n\t\t\t<div class="checkbox">\n\t\t\t\t<input type="checkbox" id="input-markdownextra-tables">\n\t\t\t</div>\n\t\t</div>\n\t</div>\n\t<div class="form-group">\n\t\t<label class="col-sm-4 control-label"\n\t\t\tfor="input-markdownextra-deflist">Definition lists</label>\n\t\t<div class="col-sm-7">\n\t\t\t<div class="checkbox">\n\t\t\t\t<input type="checkbox" id="input-markdownextra-deflist">\n\t\t\t</div>\n\t\t</div>\n\t</div>\n\t<div class="form-group">\n\t\t<label class="col-sm-4 control-label"\n\t\t\tfor="input-markdownextra-attrlist">Special attributes</label>\n\t\t<div class="col-sm-7">\n\t\t\t<div class="checkbox">\n\t\t\t\t<input type="checkbox" id="input-markdownextra-attrlist">\n\t\t\t</div>\n\t\t</div>\n\t</div>\n\t<div class="form-group">\n\t\t<label class="col-sm-4 control-label"\n\t\t\tfor="input-markdownextra-footnotes">Footnotes</label>\n\t\t<div class="col-sm-7">\n\t\t\t<div class="checkbox">\n\t\t\t\t<input type="checkbox" id="input-markdownextra-footnotes">\n\t\t\t</div>\n\t\t</div>\n\t</div>\n\t<div class="form-group">\n\t\t<label class="col-sm-4 control-label"\n\t\t\tfor="input-markdownextra-comments">Comments</label>\n\t\t<div class="col-sm-7">\n\t\t\t<div class="checkbox">\n\t\t\t\t<input type="checkbox" id="input-markdownextra-comments">\n\t\t\t</div>\n\t\t</div>\n\t</div>\n\t<div class="form-group">\n\t\t<label class="col-sm-4 control-label"\n\t\t\tfor="input-markdownextra-smartypants">SmartyPants</label>\n\t\t<div class="col-sm-7">\n\t\t\t<div class="checkbox">\n\t\t\t\t<input type="checkbox" id="input-markdownextra-smartypants">\n\t\t\t</div>\n\t\t</div>\n\t</div>\n\t<div class="form-group">\n\t\t<label class="col-sm-4 control-label"\n\t\t\tfor="input-markdownextra-newlines">GFM newlines</label>\n\t\t<div class="col-sm-7">\n\t\t\t<div class="checkbox">\n\t\t\t\t<input type="checkbox" id="input-markdownextra-newlines">\n\t\t\t</div>\n\t\t</div>\n\t</div>\n\t<div class="form-group">\n\t\t<label class="col-sm-4 control-label"\n\t\t\tfor="input-markdownextra-intraword">GFM intra-word stars/underscores</label>\n\t\t<div class="col-sm-7">\n\t\t\t<div class="checkbox">\n\t\t\t\t<input type="checkbox" id="input-markdownextra-intraword">\n\t\t\t</div>\n\t\t</div>\n\t</div>\n\t<div class="form-group">\n\t\t<label class="col-sm-4 control-label"\n\t\t\tfor="input-markdownextra-strikethrough">GFM strikethrough</label>\n\t\t<div class="col-sm-7">\n\t\t\t<div class="checkbox">\n\t\t\t\t<input type="checkbox" id="input-markdownextra-strikethrough">\n\t\t\t</div>\n\t\t</div>\n\t</div>\n\t<div class="form-group">\n\t\t<label class="col-sm-4 control-label"\n\t\t\tfor="input-markdownextra-fencedcodegfm">GFM fenced code\n\t\t\tblocks</label>\n\t\t<div class="col-sm-7">\n\t\t\t<div class="checkbox">\n\t\t\t\t<input type="checkbox" id="input-markdownextra-fencedcodegfm">\n\t\t\t</div>\n\t\t</div>\n\t</div>\n\t<div class="form-group">\n\t\t<label class="col-sm-4 control-label"\n\t\t\tfor="input-markdownextra-highlighter">Syntax highlighter</label>\n\t\t<div class="col-sm-7">\n\t\t\t<select id="input-markdownextra-highlighter" class="form-control"><option>None</option>\n\t\t\t\t<option value="prettify">Prettify</option>\n\t\t\t\t<option value="highlight">Highlight.js</option>\n\t\t\t</select>\n\t\t</div>\n\t</div>\n</div>\n<span class="help-block pull-right"><a target="_blank"\n\thref="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 t(t) {
function e(t) {
var e = t.charCodeAt(0);
if (92 !== e) return e;
var n = t.charAt(1);
return (e = u[n]) || ("0" <= n && n <= "7" ? parseInt(t.substring(1), 8) : "u" === n || "x" === n ? parseInt(t.substring(2), 16) : t.charCodeAt(1));
}
function n(t) {
if (t < 32) return (t < 16 ? "\\x0" : "\\x") + t.toString(16);
var e = String.fromCharCode(t);
return "\\" === e || "-" === e || "]" === e || "^" === e ? "\\" + e : e;
}
function i(t) {
var i = t.substring(1, t.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; s < l; ++s) {
var c = i[s];
if (/\\[bdsw]/i.test(c)) a.push(c); else {
var u, d = e(c);
s + 2 < l && "-" === i[s + 1] ? (u = e(i[s + 2]), s += 2) : u = d, r.push([ d, u ]),
u < 65 || d > 122 || (u < 65 || d > 90 || r.push([ 32 | Math.max(65, d), 32 | Math.min(u, 90) ]),
u < 97 || d > 122 || r.push([ -33 & Math.max(97, d), -33 & Math.min(u, 122) ]));
}
}
r.sort(function(t, e) {
return t[0] - e[0] || e[1] - t[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 = t.length; s < l; ++s) {
var c = t[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 = t.length; s < l; ++s) {
var c = t[s];
if (c.global || c.multiline) throw new Error("" + c);
d.push("(?:" + function(t) {
for (var e = t.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 = e.length, s = [], l = 0, c = 0; l < a; ++l) {
var u = e[l];
if ("(" === u) ++c; else if ("\\" === u.charAt(0)) {
var d = +u.substring(1);
d && (d <= c ? s[d] = -1 : e[l] = n(d));
}
}
for (var l = 1; l < s.length; ++l) -1 === s[l] && (s[l] = ++r);
for (var l = 0, c = 0; l < a; ++l) {
var u = e[l];
if ("(" === u) ++c, s[c] || (e[l] = "(?:"); else if ("\\" === u.charAt(0)) {
var d = +u.substring(1);
d && d <= c && (e[l] = "\\" + s[d]);
}
}
for (var l = 0; l < a; ++l) "^" === e[l] && "^" !== e[l + 1] && (e[l] = "");
if (t.ignoreCase && o) for (var l = 0; l < a; ++l) {
var u = e[l], p = u.charAt(0);
u.length >= 2 && "[" === p ? e[l] = i(u) : "\\" !== p && (e[l] = u.replace(/[a-zA-Z]/g, function(t) {
var e = t.charCodeAt(0);
return "[" + String.fromCharCode(-33 & e, 32 | e) + "]";
}));
}
return e.join("");
}(c) + ")");
}
return new RegExp(d.join("|"), a ? "gi" : "g");
}
function e(t, e) {
function n(t) {
var l = t.nodeType;
if (1 == l) {
if (i.test(t.className)) return;
for (var c = t.firstChild; c; c = c.nextSibling) n(c);
var u = t.nodeName.toLowerCase();
"br" !== u && "li" !== u || (r[s] = "\n", a[s << 1] = o++, a[s++ << 1 | 1] = t);
} else if (3 == l || 4 == l) {
var d = t.nodeValue;
d.length && (d = e ? 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] = t);
}
}
var i = /(?:^|\s)nocode(?:\s|$)/, r = [], o = 0, a = [], s = 0;
return n(t), {
sourceCode: r.join("").replace(/\n$/, ""),
spans: a
};
}
function n(t, e, n, i) {
if (e) {
var r = {
sourceCode: e,
basePos: t
};
n(r), i.push.apply(i, r.decorations);
}
}
function i(t) {
for (var e = void 0, n = t.firstChild; n; n = n.nextSibling) {
var i = n.nodeType;
e = 1 === i ? e ? t : n : 3 === i && F.test(n.nodeValue) ? t : e;
}
return e === t ? void 0 : e;
}
function r(e, i) {
var r, o = {};
!function() {
for (var n = e.concat(i), a = [], s = {}, l = 0, c = n.length; l < c; ++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 = t(a);
}();
var a = i.length, s = function(t) {
for (var e = t.sourceCode, l = t.basePos, u = [ l, R ], d = 0, p = e.match(r) || [], h = {}, f = 0, m = p.length; f < m; ++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; w < a; ++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);
}
t.decorations = u;
};
return s;
}
function o(t) {
var e = [], n = [];
t.tripleQuotedStrings ? e.push([ I, /^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/, null, "'\"" ]) : t.multiLineStrings ? e.push([ I, /^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/, null, "'\"`" ]) : e.push([ I, /^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/, null, "\"'" ]),
t.verbatimStrings && n.push([ I, /^@\"(?:[^\"]|\"\")*(?:\"|$)/, null ]);
var i = t.hashComments;
i && (t.cStyleComments ? (i > 1 ? e.push([ N, /^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/, null, "#" ]) : e.push([ 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 ])) : e.push([ N, /^#[^\r\n]*/, null, "#" ])),
t.cStyleComments && (n.push([ N, /^\/\/[^\r\n]*/, null ]), n.push([ N, /^\/\*[\s\S]*?(?:\*\/|$)/, null ]));
var o = t.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 = t.types;
c && n.push([ M, c ]);
var u = ("" + t.keywords).replace(/^ | $/g, "");
u.length && n.push([ D, new RegExp("^(?:" + u.replace(/[\s,]+/g, "|") + ")\\b"), null ]),
e.push([ R, /^\s+/, null, " \r\n\t\xa0" ]);
var d = "^.[^\\s\\w.$@'\"`/\\\\]*";
return t.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(e, n);
}
function a(t, e, n) {
function i(t) {
var e = t.nodeType;
if (1 != e || o.test(t.className)) {
if ((3 == e || 4 == e) && n) {
var l = t.nodeValue, c = l.match(a);
if (c) {
var u = l.substring(0, c.index);
t.nodeValue = u;
var d = l.substring(c.index + c[0].length);
if (d) {
var p = t.parentNode;
p.insertBefore(s.createTextNode(d), t.nextSibling);
}
r(t), u || t.parentNode.removeChild(t);
}
}
} else if ("br" === t.nodeName) r(t), t.parentNode && t.parentNode.removeChild(t); else for (var h = t.firstChild; h; h = h.nextSibling) i(h);
}
function r(t) {
function e(t, n) {
var i = n ? t.cloneNode(!1) : t, r = t.parentNode;
if (r) {
var o = e(r, 1), a = t.nextSibling;
o.appendChild(i);
for (var s = a; s; s = a) a = s.nextSibling, o.appendChild(s);
}
return i;
}
for (;!t.nextSibling; ) if (!(t = t.parentNode)) return;
for (var n, i = e(t.nextSibling, 0); (n = i.parentNode) && 1 === n.nodeType; ) i = n;
c.push(i);
}
for (var o = /(?:^|\s)nocode(?:\s|$)/, a = /\r\n?|\n/, s = t.ownerDocument, l = s.createElement("li"); t.firstChild; ) l.appendChild(t.firstChild);
for (var c = [ l ], u = 0; u < c.length; ++u) i(c[u]);
e === (0 | e) && c[0].setAttribute("value", e);
var d = s.createElement("ol");
d.className = "linenums";
for (var p = Math.max(0, e - 1 | 0) || 0, u = 0, h = c.length; u < h; ++u) l = c[u],
l.className = "L" + (u + p) % 10, l.firstChild || l.appendChild(s.createTextNode("\xa0")),
d.appendChild(l);
t.appendChild(d);
}
function s(t) {
var e = /\bMSIE\s(\d+)/.exec(navigator.userAgent);
e = e && +e[1] <= 8;
var n = /\n/g, i = t.sourceCode, r = i.length, o = 0, a = t.spans, s = a.length, l = 0, c = t.decorations, u = c.length, d = 0;
c[u] = r;
var p, h;
for (h = p = 0; h < u; ) c[h] !== c[h + 2] ? (c[p++] = c[h++], c[p++] = c[h++]) : h += 2;
for (u = p, h = p = 0; h < u; ) {
for (var f = c[h], m = c[h + 1], g = h + 2; g + 2 <= u && c[g + 1] === m; ) g += 2;
c[p++] = f, c[p++] = m, h = g;
}
u = c.length = p;
var v, b = t.sourceNode;
b && (v = b.style.display, b.style.display = "none");
try {
for (;l < s; ) {
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))) {
e && (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), o < x && (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(t, e) {
for (var n = e.length; --n >= 0; ) {
var i = e[n];
j.hasOwnProperty(i) ? h.console && console.warn("cannot override language handler %s", i) : j[i] = t;
}
}
function c(t, e) {
return t && j.hasOwnProperty(t) || (t = /^\s*</.test(e) ? "default-markup" : "default-code"),
j[t];
}
function u(t) {
var n = t.langExtension;
try {
var i = e(t.sourceNode, t.pre), r = i.sourceCode;
t.sourceCode = r, t.spans = i.spans, t.basePos = 0, c(n, r)(t), s(t);
} catch (t) {
h.console && console.log(t && t.stack || t);
}
}
function d(t, e, n) {
var i = document.createElement("div");
return i.innerHTML = "<pre>" + t + "</pre>", i = i.firstChild, n && a(i, n, !0),
u({
langExtension: e,
numberLines: n,
sourceNode: i,
pre: 1
}), i.innerHTML;
}
function p(t, e) {
function n(t) {
return o.getElementsByTagName(t);
}
function r() {
for (var e = h.PR_SHOULD_USE_CONTINUATION ? m.now() + 250 : 1 / 0; v < c.length && m.now() < e; 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(t, e, n) {
o[e] = 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 t && t();
}
for (var o = e || 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; p < f; ++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, " \t\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 t(t) {
return t.replace(/&/gm, "&amp;").replace(/</gm, "&lt;").replace(/>/gm, "&gt;");
}
function e(t) {
return t.nodeName.toLowerCase();
}
function n(t, e) {
var n = t && t.exec(e);
return n && 0 == n.index;
}
function i(t) {
return Array.prototype.map.call(t.childNodes, function(t) {
return 3 == t.nodeType ? b.useBR ? t.nodeValue.replace(/\n/g, "") : t.nodeValue : "br" == e(t) ? "\n" : i(t);
}).join("");
}
function r(t) {
var e = (t.className + " " + (t.parentNode ? t.parentNode.className : "")).split(/\s+/);
return e = e.map(function(t) {
return t.replace(/^language-/, "");
}), e.filter(function(t) {
return v(t) || "no-highlight" == t;
})[0];
}
function o(t, e) {
var n = {};
for (var i in t) n[i] = t[i];
if (e) for (var i in e) n[i] = e[i];
return n;
}
function a(t) {
var n = [];
return function i(t, r) {
for (var o = t.firstChild; o; o = o.nextSibling) 3 == o.nodeType ? r += o.nodeValue.length : "br" == e(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;
}(t, 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(e) {
return " " + e.nodeName + '="' + t(e.value) + '"';
}
u += "<" + e(n) + Array.prototype.map.call(n.attributes, i).join("") + ">";
}
function s(t) {
u += "</" + e(t) + ">";
}
function l(t) {
("start" == t.event ? a : s)(t.node);
}
for (var c = 0, u = "", d = []; n.length || i.length; ) {
var p = o();
if (u += t(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 + t(r.substr(c));
}
function l(t) {
function e(t) {
return t && t.source || t;
}
function n(n, i) {
return RegExp(e(n), "m" + (t.cI ? "i" : "") + (i ? "g" : ""));
}
function i(r, a) {
function s(e, n) {
t.cI && (n = n.toLowerCase()), n.split(" ").forEach(function(t) {
var n = t.split("|");
l[n[0]] = [ e, 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(t) {
s(t, r.k[t]);
}), 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 = e(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(t) {
t.v ? t.v.forEach(function(e) {
c.push(o(t, e));
}) : c.push("self" == t ? r : t);
}), r.c = c, r.c.forEach(function(t) {
i(t, r);
}), r.starts && i(r.starts, a);
var u = r.c.map(function(t) {
return t.bK ? "\\.?\\b(" + t.b + ")\\b\\.?" : t.b;
}).concat([ r.tE ]).concat([ r.i ]).map(e).filter(Boolean);
r.t = u.length ? n(u.join("|"), !0) : {
exec: function(t) {
return null;
}
}, r.continuation = {};
}
}
i(t);
}
function c(e, i, r, o) {
function a(t, e) {
for (var i = 0; i < e.c.length; i++) if (n(e.c[i].bR, t)) return e.c[i];
}
function s(t, e) {
return n(t.eR, e) ? t : t.eW ? s(t.parent, e) : void 0;
}
function d(t, e) {
return !r && n(e.iR, t);
}
function p(t, e) {
var n = S.cI ? e[0].toLowerCase() : e[0];
return t.k.hasOwnProperty(n) && t.k[n];
}
function h(t, e, n, i) {
var r = i ? "" : b.classPrefix, o = '<span class="' + r, a = n ? "" : "</span>";
return (o += t + '">') + e + a;
}
function f() {
var e = t(E);
if (!C.k) return e;
var n = "", i = 0;
C.lR.lastIndex = 0;
for (var r = C.lR.exec(e); r; ) {
n += e.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(e);
}
return n + e.substr(i);
}
function m() {
if (C.sL && !y[C.sL]) return t(E);
var e = C.sL ? c(C.sL, E, !0, C.continuation.top) : u(E);
return C.r > 0 && (T += e.r), "continuous" == C.subLanguageMode && (C.continuation.top = e.top),
h(e.language, e.value, !1, !0);
}
function g() {
return void 0 !== C.sL ? m() : f();
}
function x(e, n) {
var i = e.cN ? h(e.cN, "", !0) : "";
e.rB ? (_ += i, E = "") : e.eB ? (_ += t(n) + i, E = "") : (_ += i, E = n), C = Object.create(e, {
parent: {
value: C
}
});
}
function w(e, n) {
if (E += e, 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 && (_ += t(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(e);
if (!S) throw new Error('Unknown language: "' + e + '"');
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: e,
top: C
};
} catch (e) {
if (-1 != e.message.indexOf("Illegal")) return {
r: 0,
value: t(i)
};
throw e;
}
}
function u(e, n) {
n = n || b.languages || Object.keys(y);
var i = {
r: 0,
value: t(e)
}, r = i;
return n.forEach(function(t) {
if (v(t)) {
var n = c(t, e, !1);
n.language = t, n.r > r.r && (r = n), n.r > i.r && (r = i, i = n);
}
}), r.language && (i.second_best = r), i;
}
function d(t) {
return b.tabReplace && (t = t.replace(/^((<[^>]+>|\t)+)/gm, function(t, e, n, i) {
return e.replace(/\t/g, b.tabReplace);
})), b.useBR && (t = t.replace(/\n/g, "<br>")), t;
}
function p(t) {
var e = i(t), n = r(t);
if ("no-highlight" != n) {
var o = n ? c(n, e, !0) : u(e), l = a(t);
if (l.length) {
var p = document.createElementNS("http://www.w3.org/1999/xhtml", "pre");
p.innerHTML = o.value, o.value = s(l, a(p), e);
}
o.value = d(o.value), t.innerHTML = o.value, t.className += " hljs " + (!n && o.language || ""),
t.result = {
language: o.language,
re: o.r
}, o.second_best && (t.second_best = {
language: o.second_best.language,
re: o.second_best.r
});
}
}
function h(t) {
b = o(b, t);
}
function f() {
if (!f.called) {
f.called = !0;
var t = document.querySelectorAll("pre code");
Array.prototype.forEach.call(t, p);
}
}
function m() {
addEventListener("DOMContentLoaded", f, !1), addEventListener("load", f, !1);
}
function g(t, e) {
var n = y[t] = e(this);
n.aliases && n.aliases.forEach(function(e) {
x[e] = t;
});
}
function v(t) {
return y[t] || y[x[t]];
}
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(t) {
var e = {
cN: "variable",
v: [ {
b: /\$[\w\d#@][\w\d_]*/
}, {
b: /\$\{(.*?)\}/
} ]
}, n = {
cN: "string",
b: /"/,
e: /"/,
c: [ t.BE, e, {
cN: "variable",
b: /\$\(/,
e: /\)/,
c: [ t.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: [ t.inherit(t.TM, {
b: /\w[\w\d_]*/
}) ],
r: 0
}, t.HCM, t.NM, n, i, e ]
};
}), hljs.registerLanguage("fix", function(t) {
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(t) {
var e = "[a-z'][a-zA-Z0-9_']*", n = "(" + e + ":" + e + "|" + e + ")", 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+" + e + "/\\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: "#" + t.UIR,
r: 0,
rB: !0,
c: [ {
cN: "record_name",
b: "#" + t.UIR,
r: 0
}, {
b: "{",
e: "}",
r: 0
} ]
}, p = {
bK: "fun receive if try case",
e: "end",
k: i
};
p.c = [ r, a, t.inherit(t.ASM, {
cN: ""
}), p, s, t.QSM, o, l, c, u, d ];
var h = [ r, a, p, s, t.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: "^" + e + "\\s*\\(",
e: "->",
rB: !0,
i: "\\(|#|//|/\\*|\\\\|:|;",
c: [ f, t.inherit(t.TM, {
b: e
}) ],
starts: {
e: ";|\\.",
k: i,
c: h
}
}, r, {
cN: "pp",
b: "^-",
e: "\\.",
r: 0,
eE: !0,
rB: !0,
l: "-" + t.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, t.QSM, d, c, u, l ]
};
}), hljs.registerLanguage("cs", function(t) {
var e = "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: e,
c: [ {
cN: "comment",
b: "///",
e: "$",
rB: !0,
c: [ {
cN: "xmlDocTag",
b: "///|<!--|-->"
}, {
cN: "xmlDocTag",
b: "</?",
e: ">"
} ]
}, t.CLCM, t.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: '""'
} ]
}, t.ASM, t.QSM, t.CNM, {
bK: "protected public private internal",
e: /[{;=]/,
k: e,
c: [ {
bK: "class namespace interface",
starts: {
c: [ t.TM ]
}
}, {
b: t.IR + "\\s*\\(",
rB: !0,
c: [ t.TM ]
} ]
} ]
};
}), hljs.registerLanguage("brainfuck", function(t) {
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(t) {
var e = "[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: [ t.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: [ t.inherit(t.TM, {
b: "[A-Za-z_]\\w*(::\\w+)*(\\?|\\!)?"
}), {
cN: "inheritance",
b: "<\\s*",
c: [ {
cN: "parent",
b: "(" + t.IR + "::)?" + t.IR
} ]
}, r ]
}, {
cN: "function",
bK: "def",
e: " |$|;",
r: 0,
c: [ t.inherit(t.TM, {
b: e
}), s, r ]
}, {
cN: "constant",
b: "(::)?(\\b[A-Z]\\w*(::)?)+",
r: 0
}, {
cN: "symbol",
b: ":",
c: [ a, {
b: e
} ],
r: 0
}, {
cN: "symbol",
b: t.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: "(" + t.RSR + ")\\s*",
c: [ r, {
cN: "regexp",
c: [ t.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(t) {
var e = {
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: [ t.CLCM, t.CBLCLM, t.inherit(t.QSM, {
i: null
}), t.ASM, e, {
cN: "function",
bK: "fn",
e: "(\\(|<)",
c: [ t.UTM ]
}, {
cN: "preprocessor",
b: "#\\[",
e: "\\]"
}, {
bK: "type",
e: "(=|<)",
c: [ t.UTM ],
i: "\\S"
}, {
bK: "trait enum",
e: "({|<)",
c: [ t.UTM ],
i: "\\S"
} ]
};
}), hljs.registerLanguage("ruleslanguage", function(t) {
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: [ t.CLCM, t.CBLCLM, t.ASM, t.QSM, t.CNM, {
cN: "array",
b: "#[a-zA-Z .]+"
} ]
};
}), hljs.registerLanguage("rib", function(t) {
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: [ t.HCM, t.CNM, t.ASM, t.QSM ]
};
}), hljs.registerLanguage("diff", function(t) {
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(t) {
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(t) {
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
}, t.ASM, t.QSM, t.CLCM, t.CBLCLM, t.CNM, {
b: "(" + t.RSR + "|\\b(case|return|throw)\\b)\\s*",
k: "return throw case",
c: [ t.CLCM, t.CBLCLM, t.REGEXP_MODE, {
b: /</,
e: />;/,
r: 0,
sL: "xml"
} ],
r: 0
}, {
cN: "function",
bK: "function",
e: /\{/,
c: [ t.inherit(t.TM, {
b: /[A-Za-z$_][0-9A-Za-z$_]*/
}), {
cN: "params",
b: /\(/,
e: /\)/,
c: [ t.CLCM, t.CBLCLM ],
i: /["'\(]/
} ],
i: /\[|%/
}, {
b: /\$[(.]/
}, {
b: "\\." + t.IR,
r: 0
} ]
};
}), hljs.registerLanguage("glsl", function(t) {
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: [ t.CLCM, t.CBLCLM, t.CNM, {
cN: "preprocessor",
b: "#",
e: "$"
} ]
};
}), hljs.registerLanguage("rsl", function(t) {
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: [ t.CLCM, t.CBLCLM, t.QSM, t.ASM, t.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(t) {
var e = "\\[=*\\[", n = "\\]=*\\]", i = {
b: e,
e: n,
c: [ "self" ]
}, r = [ {
cN: "comment",
b: "--(?!" + e + ")",
e: "$"
}, {
cN: "comment",
b: "--" + e,
e: n,
c: [ i ],
r: 10
} ];
return {
l: t.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: [ t.inherit(t.TM, {
b: "([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"
}), {
cN: "params",
b: "\\(",
eW: !0,
c: r
} ].concat(r)
}, t.CNM, t.ASM, t.QSM, {
cN: "string",
b: e,
e: n,
c: [ i ],
r: 10
} ])
};
}), hljs.registerLanguage("xml", function(t) {
var e = {
b: /<\?(php)?(?!\w)/,
e: /\?>/,
sL: "php",
subLanguageMode: "continuous"
}, n = {
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: [ n ],
starts: {
e: "</style>",
rE: !0,
sL: "css"
}
}, {
cN: "tag",
b: "<script(?=\\s|>|$)",
e: ">",
k: {
title: "script"
},
c: [ n ],
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
}, n ]
} ]
};
}), hljs.registerLanguage("markdown", function(t) {
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}|\t)",
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(t) {
var e = "[a-zA-Z-][a-zA-Z0-9_-]*", n = {
cN: "function",
b: e + "\\(",
e: "\\)",
c: [ "self", t.NM, t.ASM, t.QSM ]
};
return {
cI: !0,
i: "[=/|']",
c: [ t.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, t.ASM, t.QSM, t.NM ]
} ]
}, {
cN: "tag",
b: e,
r: 0
}, {
cN: "rules",
b: "{",
e: "}",
i: "[^\\s]",
r: 0,
c: [ t.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, t.NM, t.QSM, t.ASM, t.CBLCLM, {
cN: "hexcolor",
b: "#[0-9A-Fa-f]+"
}, {
cN: "important",
b: "!important"
} ]
}
} ]
} ]
} ]
};
}), hljs.registerLanguage("lisp", function(t) {
var e = "[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 = t.inherit(t.QSM, {
i: null
}), s = {
cN: "comment",
b: ";",
e: "$"
}, l = {
cN: "variable",
b: "\\*",
e: "\\*"
}, c = {
cN: "keyword",
b: "[:&]" + e
}, 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: e
}, 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(t) {
return {
c: [ t.CNM, {
cN: "built_in",
b: "{",
e: "}$",
eB: !0,
eE: !0,
c: [ t.ASM, t.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: [ t.CNM ],
r: 10
}, t.ASM, t.QSM, {
cN: "function",
b: "\\(",
e: "\\)$",
c: [ t.UTM ],
r: 0
} ]
};
}), hljs.registerLanguage("http", function(t) {
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(t) {
var e = "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: e,
i: /<\//,
c: [ {
cN: "javadoc",
b: "/\\*\\*",
e: "\\*/",
c: [ {
cN: "javadoctag",
b: "(^|\\s)@[A-Za-z]+"
} ],
r: 10
}, t.CLCM, t.CBLCLM, t.ASM, t.QSM, {
bK: "protected public private",
e: /[{;=]/,
k: e,
c: [ {
cN: "class",
bK: "class interface",
eW: !0,
i: /[:"<>]/,
c: [ {
bK: "extends implements",
r: 10
}, t.UTM ]
}, {
b: t.UIR + "\\s*\\(",
rB: !0,
c: [ t.UTM ]
} ]
}, t.CNM, {
cN: "annotation",
b: "@[A-Za-z]+"
} ]
};
}), hljs.registerLanguage("fsharp", function(t) {
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: [ t.UTM ]
}, {
cN: "annotation",
b: "\\[<",
e: ">\\]"
}, {
cN: "attribute",
b: "\\B('[A-Za-z])\\b",
c: [ t.BE ]
}, t.CLCM, t.inherit(t.QSM, {
i: null
}), t.CNM ]
};
}), hljs.registerLanguage("mathematica", function(t) {
return {
aliases: [ "mma" ],
l: "(\\$|\\b)" + t.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: /\*\)/
}, t.ASM, t.QSM, t.CNM, {
cN: "list",
b: /\{/,
e: /\}/,
i: /:/
} ]
};
}), hljs.registerLanguage("php", function(t) {
var e = {
cN: "variable",
b: "\\$+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*"
}, n = {
cN: "preprocessor",
b: /<\?(php)?|\?>/
}, i = {
cN: "string",
c: [ t.BE, n ],
v: [ {
b: 'b"',
e: '"'
}, {
b: "b'",
e: "'"
}, t.inherit(t.ASM, {
i: null
}), t.inherit(t.QSM, {
i: null
}) ]
}, r = {
v: [ t.BNM, t.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: [ t.CLCM, t.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: t.UIR
}, {
cN: "string",
b: "<<<['\"]?\\w+['\"]?$",
e: "^\\w+;",
c: [ t.BE ]
}, n, e, {
cN: "function",
bK: "function",
e: /[;{]/,
i: "\\$|\\[|%",
c: [ t.UTM, {
cN: "params",
b: "\\(",
e: "\\)",
c: [ "self", e, t.CBLCLM, i, r ]
} ]
}, {
cN: "class",
bK: "class interface",
e: "{",
i: /[:\(\$"]/,
c: [ {
bK: "extends implements",
r: 10
}, t.UTM ]
}, {
bK: "namespace",
e: ";",
i: /[\.']/,
c: [ t.UTM ]
}, {
bK: "use",
e: ";",
c: [ t.UTM ]
}, {
b: "=>"
}, i, r ]
};
}), hljs.registerLanguage("haskell", function(t) {
var e = {
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, e, i, {
cN: "type",
b: "\\b[A-Z][\\w]*(\\((\\.\\.|,|\\w+)\\))?"
}, t.inherit(t.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, e ],
i: "\\W\\.|;"
}, {
cN: "import",
b: "\\bimport\\b",
e: "$",
k: "import|0 qualified as hiding",
c: [ o, e ],
i: "\\W\\.|;"
}, {
cN: "class",
b: "^(\\s*)?(class|instance)\\b",
e: "where",
k: "class family instance where",
c: [ r, o, e ]
}, {
cN: "typedef",
b: "\\b(data|(new)?type)\\b",
e: "$",
k: "data family type newtype deriving",
c: [ n, e, r, o, {
cN: "container",
b: "{",
e: "}",
c: o.c
} ]
}, {
cN: "default",
bK: "default",
e: "$",
c: [ r, o, e ]
}, {
cN: "infix",
bK: "infix infixl infixr",
e: "$",
c: [ t.CNM, e ]
}, {
cN: "foreign",
b: "\\bforeign\\b",
e: "$",
k: "foreign import export ccall stdcall cplusplus jvm dotnet safe unsafe",
c: [ r, t.QSM, e ]
}, {
cN: "shebang",
b: "#!\\/usr\\/bin\\/env runhaskell",
e: "$"
}, n, e, i, t.QSM, t.CNM, r, t.inherit(t.TM, {
b: "^[_a-z][\\w']*"
}), {
b: "->|<-"
} ]
};
}), hljs.registerLanguage("1c", function(t) {
var e = "[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: e,
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: [ t.CLCM, t.NM, i, r, {
cN: "function",
b: "(\u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430|\u0444\u0443\u043d\u043a\u0446\u0438\u044f)",
e: "$",
l: e,
k: "\u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f",
c: [ t.inherit(t.TM, {
b: e
}), {
cN: "tail",
eW: !0,
c: [ {
cN: "params",
b: "\\(",
e: "\\)",
l: e,
k: "\u0437\u043d\u0430\u0447",
c: [ i, r ]
}, {
cN: "export",
b: "\u044d\u043a\u0441\u043f\u043e\u0440\u0442",
eW: !0,
l: e,
k: "\u044d\u043a\u0441\u043f\u043e\u0440\u0442",
c: [ t.CLCM ]
} ]
}, t.CLCM ]
}, {
cN: "preprocessor",
b: "#",
e: "$"
}, {
cN: "date",
b: "'\\d{2}\\.\\d{2}\\.(\\d{2}|\\d{4})'"
} ]
};
}), hljs.registerLanguage("python", function(t) {
var e = {
cN: "prompt",
b: /^(>>>|\.\.\.) /
}, n = {
cN: "string",
c: [ t.BE ],
v: [ {
b: /(u|b)?r?'''/,
e: /'''/,
c: [ e ],
r: 10
}, {
b: /(u|b)?r?"""/,
e: /"""/,
c: [ e ],
r: 10
}, {
b: /(u|r|ur)'/,
e: /'/,
r: 10
}, {
b: /(u|r|ur)"/,
e: /"/,
r: 10
}, {
b: /(b|br)'/,
e: /'/
}, {
b: /(b|br)"/,
e: /"/
}, t.ASM, t.QSM ]
}, i = {
cN: "number",
r: 0,
v: [ {
b: t.BNR + "[lLjJ]?"
}, {
b: "\\b(0o[0-7]+)[lLjJ]?"
}, {
b: t.CNR + "[lLjJ]?"
} ]
}, r = {
cN: "params",
b: /\(/,
e: /\)/,
c: [ "self", e, i, n ]
}, o = {
e: /:/,
i: /[${=;\n]/,
c: [ t.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: [ e, i, n, t.HCM, t.inherit(o, {
cN: "function",
bK: "def",
r: 10
}), t.inherit(o, {
cN: "class",
bK: "class"
}), {
cN: "decorator",
b: /@/,
e: /$/
}, {
b: /\b(print|exec)\(/
} ]
};
}), hljs.registerLanguage("smalltalk", function(t) {
var e = "[a-z][a-zA-Z0-9_]*", n = {
cN: "char",
b: "\\$.{1}"
}, i = {
cN: "symbol",
b: "#" + t.UIR
};
return {
k: "self super nil true false thisContext",
c: [ {
cN: "comment",
b: '"',
e: '"'
}, t.ASM, {
cN: "class",
b: "\\b[A-Z][A-Za-z0-9_]*",
r: 0
}, {
cN: "method",
b: e + ":",
r: 0
}, t.CNM, i, n, {
cN: "localvars",
b: "\\|[ ]*" + e + "([ ]+" + e + ")*[ ]*\\|",
rB: !0,
e: /\|/,
i: /\S/,
c: [ {
b: "(\\|[ ]*)?" + e
} ]
}, {
cN: "array",
b: "\\#\\(",
e: "\\)",
c: [ t.ASM, n, t.CNM, i ]
} ]
};
}), hljs.registerLanguage("tex", function(t) {
var e = {
cN: "command",
b: "\\\\[a-zA-Z\u0430-\u044f\u0410-\u044f]+[\\*]?"
}, n = {
cN: "command",
b: "\\\\[^a-zA-Z\u0430-\u044f\u0410-\u044f0-9]"
}, i = {
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, n, {
cN: "number",
b: " *=",
e: "-?\\d*\\.?\\d+(pt|pc|mm|cm|in|dd|cc|ex|em)?",
eB: !0
} ],
r: 10
}, e, n, i, {
cN: "formula",
b: "\\$\\$",
e: "\\$\\$",
c: [ e, n, i ],
r: 0
}, {
cN: "formula",
b: "\\$",
e: "\\$",
c: [ e, n, i ],
r: 0
}, {
cN: "comment",
b: "%",
e: "$",
r: 0
} ]
};
}), hljs.registerLanguage("actionscript", function(t) {
var e = {
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: [ t.ASM, t.QSM, t.CLCM, t.CBLCLM, t.CNM, {
cN: "package",
bK: "package",
e: "{",
c: [ t.TM ]
}, {
cN: "class",
bK: "class interface",
e: "{",
c: [ {
bK: "extends implements"
}, t.TM ]
}, {
cN: "preprocessor",
bK: "import include",
e: ";"
}, {
cN: "function",
bK: "function",
e: "[{;]",
i: "\\S",
c: [ t.TM, {
cN: "params",
b: "\\(",
e: "\\)",
c: [ t.ASM, t.QSM, t.CLCM, t.CBLCLM, e ]
}, {
cN: "type",
b: ":",
e: "([*]|[a-zA-Z_$][a-zA-Z0-9_$]*)",
r: 10
} ]
} ]
};
}), hljs.registerLanguage("sql", function(t) {
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: [ t.BE, {
b: "''"
} ]
}, {
cN: "string",
b: '"',
e: '"',
c: [ t.BE, {
b: '""'
} ]
}, {
cN: "string",
b: "`",
e: "`",
c: [ t.BE ]
}, t.CNM ]
}, t.CBLCLM, {
cN: "comment",
b: "--",
e: "$"
} ]
};
}), hljs.registerLanguage("handlebars", function(t) {
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(t) {
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: [ t.UTM ]
}, t.CLCM, t.CBLCLM, {
cN: "string",
b: '"""',
e: '"""',
r: 5
}, t.ASM, t.QSM, t.CNM, {
cN: "preprocessor",
b: "^#",
e: "$",
r: 2
}, {
cN: "constant",
b: " [A-Z_]+ ",
r: 0
} ]
};
}), hljs.registerLanguage("ini", function(t) {
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: [ t.QSM, t.NM ],
r: 0
} ]
} ]
};
}), hljs.registerLanguage("livecodeserver", function(t) {
var e = {
cN: "variable",
b: "\\b[gtps][A-Z]+[A-Za-z0-9_\\-]*\\b|\\$_[A-Z]+",
r: 0
}, n = {
cN: "comment",
e: "$",
v: [ t.CBLCLM, t.HCM, {
b: "--"
}, {
b: "[^:]//"
} ]
}, i = t.inherit(t.TM, {
v: [ {
b: "\\b_*rig[A-Z]+[A-Za-z0-9_\\-]*"
}, {
b: "\\b_[a-z0-9\\-]+"
} ]
}), r = t.inherit(t.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: [ e, {
cN: "keyword",
b: "\\bend\\sif\\b"
}, {
cN: "function",
bK: "function",
e: "$",
c: [ e, r, t.ASM, t.QSM, t.BNM, t.CNM, i ]
}, {
cN: "function",
bK: "end",
e: "$",
c: [ r, i ]
}, {
cN: "command",
bK: "command on",
e: "$",
c: [ e, r, t.ASM, t.QSM, t.BNM, t.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, t.ASM, t.QSM, t.BNM, t.CNM, i ],
i: ";$|^\\[|^="
};
}), hljs.registerLanguage("d", function(t) {
var e = {
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: t.UIR,
k: e,
c: [ t.CLCM, t.CBLCLM, v, p, c, u, d, h, a, o, s, f, m, g ]
};
}), hljs.registerLanguage("vbnet", function(t) {
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: [ t.inherit(t.QSM, {
c: [ {
b: '""'
} ]
}), {
cN: "comment",
b: "'",
e: "$",
rB: !0,
c: [ {
cN: "xmlDocTag",
b: "'''|<!--|-->"
}, {
cN: "xmlDocTag",
b: "</?",
e: ">"
} ]
}, t.CNM, {
cN: "preprocessor",
b: "#",
e: "$",
k: "if else elseif end region externalsource"
} ]
};
}), hljs.registerLanguage("axapta", function(t) {
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: [ t.CLCM, t.CBLCLM, t.ASM, t.QSM, t.CNM, {
cN: "preprocessor",
b: "#",
e: "$"
}, {
cN: "class",
bK: "class interface",
e: "{",
i: ":",
c: [ {
cN: "inheritance",
bK: "extends implements",
r: 10
}, t.UTM ]
} ]
};
}), hljs.registerLanguage("perl", function(t) {
var e = "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: e
}, 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 = [ t.BE, n, r ], s = [ r, t.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: [ t.BE ]
}, {
b: '"',
e: '"'
}, {
b: "`",
e: "`",
c: [ t.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: "(\\/\\/|" + t.RSR + "|\\b(split|return|print|reverse|grep)\\b)\\s*",
k: "split return print reverse grep",
r: 0,
c: [ t.HCM, o, {
cN: "regexp",
b: "(s|tr|y)/(\\\\.|[^/])*/(\\\\.|[^/])*/[a-z]*",
r: 10
}, {
cN: "regexp",
b: "(m|qr)?/",
e: "/[a-z]*",
c: [ t.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: e,
c: s
};
}), hljs.registerLanguage("scala", function(t) {
var e = {
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
}, t.CLCM, t.CBLCLM, n, t.ASM, t.QSM, {
cN: "class",
b: "((case )?class |object |trait )",
e: "({|$)",
i: ":",
k: "case class trait object",
c: [ {
bK: "extends with",
r: 10
}, t.UTM, {
cN: "params",
b: "\\(",
e: "\\)",
c: [ t.ASM, t.QSM, n, e ]
} ]
}, t.CNM, e ]
};
}), hljs.registerLanguage("cmake", function(t) {
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: "}"
}, t.HCM, t.QSM, t.NM ]
};
}), hljs.registerLanguage("ocaml", function(t) {
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: [ t.UTM ]
}, {
cN: "annotation",
b: "\\[<",
e: ">\\]"
}, t.CBLCLM, t.inherit(t.ASM, {
i: null
}), t.inherit(t.QSM, {
i: null
}), t.CNM ]
};
}), hljs.registerLanguage("autohotkey", function(t) {
var e = {
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([ e, t.inherit(t.QSM, {
c: [ e ]
}), n, {
cN: "number",
b: t.NR,
r: 0
}, {
cN: "var_expand",
b: "%",
e: "%",
i: "\\n",
c: [ e ]
}, {
cN: "label",
c: [ e ],
v: [ {
b: '^[^\\n";]+::(?!=)'
}, {
b: '^[^\\n";]+:(?!=)',
r: 0
} ]
}, {
b: ",\\s*,",
r: 10
} ])
};
}), hljs.registerLanguage("objectivec", function(t) {
var e = {
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: e,
l: n,
i: "</",
c: [ t.CLCM, t.CBLCLM, t.CNM, t.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: [ t.UTM ]
}, {
cN: "variable",
b: "\\." + t.UIR,
r: 0
} ]
};
}), hljs.registerLanguage("avrasm", function(t) {
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: [ t.CBLCLM, {
cN: "comment",
b: ";",
e: "$",
r: 0
}, t.CNM, t.BNM, {
cN: "number",
b: "\\b(\\$[a-zA-Z0-9]+|0o[0-7]+)"
}, t.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(t) {
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: [ t.CBLCLM, {
cN: "comment",
b: "--",
e: "$"
}, t.QSM, t.CNM, {
cN: "literal",
b: "'(U|X|0|1|Z|W|L|H|-)'",
c: [ t.BE ]
}, {
cN: "attribute",
b: "'[A-Za-z](_?[A-Za-z0-9])*",
c: [ t.BE ]
} ]
};
}), hljs.registerLanguage("coffeescript", function(t) {
var e = {
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 = t.inherit(t.TM, {
b: n
}), r = {
cN: "subst",
b: /#\{/,
e: /}/,
k: e
}, o = [ t.BNM, t.inherit(t.CNM, {
starts: {
e: "(\\s*/)?",
r: 0
}
}), {
cN: "string",
v: [ {
b: /'''/,
e: /'''/,
c: [ t.BE ]
}, {
b: /'/,
e: /'/,
c: [ t.BE ]
}, {
b: /"""/,
e: /"""/,
c: [ t.BE, r ]
}, {
b: /"/,
e: /"/,
c: [ t.BE, r ]
} ]
}, {
cN: "regexp",
v: [ {
b: "///",
e: "///",
c: [ r, t.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: e,
c: o.concat([ {
cN: "comment",
b: "###",
e: "###"
}, t.HCM, {
cN: "function",
b: "(" + n + "\\s*=\\s*)?(\\(.*\\))?\\s*\\B[-=]>",
e: "[-=]>",
rB: !0,
c: [ i, {
cN: "params",
b: "\\(",
rB: !0,
c: [ {
b: /\(/,
e: /\)/,
k: e,
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(t) {
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(t) {
var e = {
cN: "variable",
v: [ {
b: /\$\d+/
}, {
b: /\$\{/,
e: /}/
}, {
b: "[\\$\\@]" + t.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: [ t.HCM, {
cN: "string",
c: [ t.BE, e ],
v: [ {
b: /"/,
e: /"/
}, {
b: /'/,
e: /'/
} ]
}, {
cN: "url",
b: "([a-z]+):/",
e: "\\s",
eW: !0,
eE: !0
}, {
cN: "regexp",
c: [ t.BE, e ],
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
}, e ]
};
return {
c: [ t.HCM, {
b: t.UIR + "\\s",
e: ";|{",
rB: !0,
c: [ t.inherit(t.UTM, {
starts: n
}) ],
r: 0
} ],
i: "[^\\s\\}]"
};
}), hljs.registerLanguage("erlang-repl", function(t) {
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
}, t.ASM, t.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(t) {
var e = "([a-zA-Z]|\\.[a-zA-Z.])[a-zA-Z0-9._]*";
return {
c: [ t.HCM, {
b: e,
l: e,
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: [ t.BE ],
v: [ {
b: '"',
e: '"'
}, {
b: "'",
e: "'"
} ]
} ]
};
}), hljs.registerLanguage("json", function(t) {
var e = {
literal: "true false null"
}, n = [ t.QSM, t.CNM ], i = {
cN: "value",
e: ",",
eW: !0,
eE: !0,
c: n,
k: e
}, r = {
b: "{",
e: "}",
c: [ {
cN: "attribute",
b: '\\s*"',
e: '"\\s*:\\s*',
eB: !0,
eE: !0,
c: [ t.BE ],
i: "\\n",
starts: i
} ],
i: "\\S"
}, o = {
b: "\\[",
e: "\\]",
c: [ t.inherit(i, {
cN: null
}) ],
i: "\\S"
};
return n.splice(n.length, 0, r, o), {
c: n,
k: e,
i: "\\S"
};
}), hljs.registerLanguage("django", function(t) {
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(t) {
var e = "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: t.IR + "\\s*=\\s*class\\s*\\(",
rB: !0,
c: [ t.TM ]
}, a = {
cN: "function",
bK: "function constructor destructor procedure",
e: /[:;]/,
k: "function constructor|10 destructor|10 procedure|10",
c: [ t.TM, {
cN: "params",
b: /\(/,
e: /\)/,
k: e,
c: [ i, r ]
}, n ]
};
return {
cI: !0,
k: e,
i: /("|\$[G-Zg-z]|\/\*|<\/)/,
c: [ n, t.CLCM, i, r, t.NM, o, a ]
};
}), hljs.registerLanguage("vbscript", function(t) {
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: [ t.inherit(t.QSM, {
c: [ {
b: '""'
} ]
}), {
cN: "comment",
b: /'/,
e: /$/,
r: 0
}, t.CNM ]
};
}), hljs.registerLanguage("oxygene", function(t) {
var e = "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: [ t.TM, {
cN: "params",
b: "\\(",
e: "\\)",
k: e,
c: [ r, o ]
}, n, i ]
};
return {
cI: !0,
k: e,
i: '("|\\$[G-Zg-z]|\\/\\*|</)',
c: [ n, i, t.CLCM, r, o, t.NM, a, {
cN: "class",
b: "=\\bclass\\b",
e: "end;",
k: e,
c: [ r, o, n, i, t.CLCM, a ]
} ]
};
}), hljs.registerLanguage("mel", function(t) {
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: [ t.CNM, t.ASM, t.QSM, {
cN: "string",
b: "`",
e: "`",
c: [ t.BE ]
}, {
cN: "variable",
v: [ {
b: "\\$\\d"
}, {
b: "[\\$\\%\\@](\\^\\w\\b|#\\w+|[^\\s\\w{]|{\\w+}|\\w+)"
}, {
b: "\\*(\\^\\w\\b|#\\w+|[^\\s\\w{]|{\\w+}|\\w+)",
r: 0
} ]
}, t.CLCM, t.CBLCLM ]
};
}), hljs.registerLanguage("dos", function(t) {
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(t) {
var e = {
cN: "number",
b: "[\\$%]\\d+"
};
return {
cI: !0,
c: [ t.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", e ]
}, e, t.QSM ]
}
} ],
i: /\S/
};
}), hljs.registerLanguage("scss", function(t) {
var e = "[a-zA-Z-][a-zA-Z0-9_-]*", n = {
cN: "function",
b: e + "\\(",
e: "\\)",
c: [ "self", t.NM, t.ASM, t.QSM ]
}, i = {
cN: "hexcolor",
b: "#[0-9A-Fa-f]+"
};
return t.NM, t.QSM, t.ASM, t.CBLCLM, {
cI: !0,
i: "[=/|']",
c: [ t.CLCM, t.CBLCLM, {
cN: "function",
b: e + "\\(",
e: "\\)",
c: [ "self", t.NM, t.ASM, t.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, t.NM, t.QSM, t.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, t.QSM, t.ASM, i, t.NM, {
cN: "preprocessor",
b: "\\s[A-Za-z0-9_.-]+",
r: 0
} ]
} ]
};
}), hljs.registerLanguage("applescript", function(t) {
var e = t.inherit(t.QSM, {
i: ""
}), n = {
cN: "params",
b: "\\(",
e: "\\)",
c: [ "self", t.CNM, e ]
}, i = [ {
cN: "comment",
b: "--",
e: "$"
}, {
cN: "comment",
b: "\\(\\*",
e: "\\*\\)",
c: [ "self", {
b: "--",
e: "$"
} ]
}, t.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: [ e, t.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: [ t.UTM, n ]
} ].concat(i),
i: "//"
};
}), hljs.registerLanguage("lasso", function(t) {
var e = "[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: "'" + e + "'"
}, c = [ t.CLCM, {
cN: "javadoc",
b: "/\\*\\*!",
e: "\\*/"
}, t.CBLCLM, t.inherit(t.CNM, {
b: t.CNR + "|-?(infinity|nan)\\b"
}), t.inherit(t.ASM, {
i: null
}), t.inherit(t.QSM, {
i: null
}), {
cN: "string",
b: "`",
e: "`"
}, {
cN: "variable",
v: [ {
b: "[#$]" + e
}, {
b: "#",
e: "\\d+",
i: "\\W"
} ]
}, {
cN: "tag",
b: "::\\s*",
e: e,
i: "\\W"
}, {
cN: "attribute",
b: "\\.\\.\\.|-" + t.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: [ t.inherit(t.TM, {
b: t.UIR + "(=(?!>))?"
}) ]
} ];
return {
aliases: [ "ls", "lassoscript" ],
cI: !0,
l: e + "|&[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: e + "|&[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(t) {
var e = {
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: e,
i: "</",
c: [ t.CLCM, t.CBLCLM, t.QSM, {
cN: "string",
b: "'\\\\?.",
e: "'",
i: "."
}, {
cN: "number",
b: "\\b(\\d+(\\.\\d*)?|\\.\\d+)(u|U|l|L|ul|UL|f|F)"
}, t.CNM, {
cN: "preprocessor",
b: "#",
e: "$",
c: [ {
b: "include\\s*<",
e: ">",
i: "\\n"
}, t.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: e,
r: 10,
c: [ "self" ]
} ]
};
}), hljs.registerLanguage("matlab", function(t) {
var e = [ t.CNM, {
cN: "string",
b: "'",
e: "'",
c: [ t.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: [ t.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: e,
r: 0
}, {
cN: "cell",
b: "\\{",
e: "\\}'*[\\.']*",
c: e,
i: /:/
}, {
cN: "comment",
b: "\\%",
e: "$"
} ].concat(e)
};
}), hljs.registerLanguage("scilab", function(t) {
var e = [ t.CNM, {
cN: "string",
b: "'|\"",
e: "'|\"",
c: [ t.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: [ t.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: e
}, {
cN: "comment",
b: "//",
e: "$"
} ].concat(e)
};
}), hljs.registerLanguage("makefile", function(t) {
var e = {
cN: "variable",
b: /\$\(/,
e: /\)/,
c: [ t.BE ]
};
return {
c: [ t.HCM, {
b: /^\w+\s*\W*=/,
rB: !0,
r: 0,
starts: {
cN: "constant",
e: /\s*\W*=/,
eE: !0,
starts: {
e: /$/,
r: 0,
c: [ e ]
}
}
}, {
cN: "title",
b: /^[\w]+:\s*$/
}, {
cN: "phony",
b: /^\.PHONY:/,
e: /$/,
k: ".PHONY",
l: /[\.\w]+/
}, {
b: /^\t+/,
e: /$/,
c: [ t.QSM, e ]
} ]
};
}), hljs.registerLanguage("asciidoc", function(t) {
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(t) {
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]+"
}, t.CNM ]
};
}), hljs.registerLanguage("clojure", function(t) {
var e = {
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 = t.inherit(t.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: e,
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(t) {
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: [ t.CLCM, t.CBLCLM, t.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
}, t.CNM ]
};
}), define("highlightjs", function(t) {
return function() {
return t.hljs;
};
}(this));
var Markdown;
if (Markdown = "object" == typeof exports && "function" == typeof require ? exports : {},
function() {
function t(t) {
return t;
}
function e(t) {
return !1;
}
function n() {}
function i() {}
n.prototype = {
chain: function(e, n) {
var i = this[e];
if (!i) throw new Error("unknown hook " + e);
this[e] = i === t ? n : function(t) {
var e = Array.prototype.slice.call(arguments, 0);
return e[0] = i.apply(null, e), n.apply(null, e);
};
},
set: function(t, e) {
if (!this[t]) throw new Error("unknown hook " + t);
this[t] = e;
},
addNoop: function(e) {
this[e] = t;
},
addFalse: function(t) {
this[t] = e;
}
}, Markdown.HookCollection = n, i.prototype = {
set: function(t, e) {
this["s_" + t] = e;
},
get: function(t) {
return this["s_" + t];
}
}, Markdown.Converter = function() {
function t(t) {
return t = t.replace(/^[ ]{0,3}\[(.+)\]:[ \t]*\n?[ \t]*<?(\S+?)>?(?=\s|$)[ \t]*\n?[ \t]*((\n*)["(](.+?)[")][ \t]*)?(?:\n+)/gm, function(t, e, n, i, r, o) {
return e = e.toLowerCase(), P.set(e, C(n)), r ? i : (o && O.set(e, o.replace(/"/g, "&quot;")),
"");
});
}
function e(t) {
return t = t.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),
t = t.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),
t = t.replace(/\n[ ]{0,3}((<(hr)\b([^<>])*?\/?>)[ \t]*(?=\n{2,}))/g, r), t = t.replace(/\n\n[ ]{0,3}(<!(--(?:|(?:[^>-]|-[^>])(?:[^-]|-[^-])*)--)>[ \t]*(?=\n{2,}))/g, r),
t = t.replace(/(?:\n\n)([ ]{0,3}(?:<([?%])[^\r]*?\2>)[ \t]*(?=\n{2,}))/g, r);
}
function r(t, e) {
var n = e;
return n = n.replace(/^\n+/, ""), n = n.replace(/\n+$/g, ""), n = "\n\n~K" + (F.push(n) - 1) + "K\n\n";
}
function o(t, n) {
return t = R.preBlockGamut(t, j), t = h(t), t = t.replace(/^[ ]{0,2}([ ]?\*[ ]?){3,}[ \t]*$/gm, "<hr />\n"),
t = t.replace(/^[ ]{0,2}([ ]?-[ ]?){3,}[ \t]*$/gm, "<hr />\n"), t = t.replace(/^[ ]{0,2}([ ]?_[ ]?){3,}[ \t]*$/gm, "<hr />\n"),
t = f(t), t = g(t), t = w(t), t = R.postBlockGamut(t, j), t = e(t), t = S(t, n);
}
function a(t) {
return t = R.preSpanGamut(t), t = b(t), t = s(t), t = _(t), t = u(t), t = l(t),
t = E(t), t = t.replace(/~P/g, "://"), t = C(t), t = A._DoItalicsAndBold ? A._DoItalicsAndBold(t) : x(t),
t = t.replace(/ +\n/g, " <br>\n"), t = R.postSpanGamut(t);
}
function s(t) {
var e = /(<[a-z\/!$]("[^"]*"|'[^']*'|[^'">])*>|<!(--(?:|(?:[^>-]|-[^>])(?:[^-]|-[^-])*)--)>)/gi;
return t = t.replace(e, function(t) {
var e = t.replace(/(.)<\/?code>(?=.)/g, "$1`");
return e = M(e, "!" == t.charAt(1) ? "\\`*_/" : "\\`*_");
});
}
function l(t) {
return t = t.replace(/(\[((?:\[[^\]]*\]|[^\[\]])*)\][ ]?(?:\n[ ]*)?\[(.*?)\])()()()()/g, c),
t = t.replace(/(\[((?:\[[^\]]*\]|[^\[\]])*)\]\([ \t]*()<?((?:\([^)]*\)|[^()\s])*?)>?[ \t]*((['"])(.*?)\6[ \t]*)?\))/g, c),
t = t.replace(/(\[([^\[\]]+)\])()()()()()/g, c);
}
function c(t, e, n, i, r, o, a, s) {
void 0 == s && (s = "");
var l = e, 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(t) {
return t = t.replace(/(!\[(.*?)\][ ]?(?:\n[ ]*)?\[(.*?)\])()()()()/g, p), t = t.replace(/(!\[(.*?)\]\s?\([ \t]*()<?(\S+?)>?[ \t]*((['"])(.*?)\6[ \t]*)?\))/g, p);
}
function d(t) {
return t.replace(/>/g, "&gt;").replace(/</g, "&lt;").replace(/"/g, "&quot;");
}
function p(t, e, n, i, r, o, a, s) {
var l = e, 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(t) {
return t = t.replace(/^(.+)[ \t]*\n=+[ \t]*\n+/gm, function(t, e) {
return "<h1>" + a(e) + "</h1>\n\n";
}), t = t.replace(/^(.+)[ \t]*\n-+[ \t]*\n+/gm, function(t, e) {
return "<h2>" + a(e) + "</h2>\n\n";
}), t = t.replace(/^(\#{1,6})[ \t]*(.+?)[ \t]*\#*\n+/gm, function(t, e, n) {
var i = e.length;
return "<h" + i + ">" + a(n) + "</h" + i + ">\n\n";
});
}
function f(t, e) {
t += "~0";
var n = /^(([ ]{0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(~0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm;
return B ? t = t.replace(n, function(t, n, i) {
var r = n, o = i.search(/[*+-]/g) > -1 ? "ul" : "ol", a = m(r, o, e);
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,
t = t.replace(n, function(t, e, n, i) {
var r = e, o = n, a = i.search(/[*+-]/g) > -1 ? "ul" : "ol", s = m(o, a);
return s = r + "<" + a + ">\n" + s + "</" + a + ">\n";
})), t = t.replace(/~0/, "");
}
function m(t, e, n) {
B++, t = t.replace(/\n{2,}$/, "\n"), t += "~0";
var i = $[e], r = new RegExp("(^[ \\t]*)(" + i + ")[ \\t]+([^\\r]+?(\\n+))(?=(~0|\\1(" + i + ")[ \\t]+))", "gm"), s = !1;
return t = t.replace(r, function(t, e, 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";
}), t = t.replace(/~0/g, ""), B--, t;
}
function g(t) {
return t += "~0", t = t.replace(/(?:\n\n|^\n?)((?:(?:[ ]{4}|\t).*\n+)+)(\n*[ ]{0,3}[^ \t\n]|(?=~0))/g, function(t, e, n) {
var i = e, 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;
}), t = t.replace(/~0/, "");
}
function v(t) {
return t = t.replace(/(^\n+|\n+$)/g, ""), "\n\n~K" + (F.push(t) - 1) + "K\n\n";
}
function b(t) {
return t = t.replace(/(^|[^\\])(`+)([^\r]*?[^`])\2(?!`)/gm, function(t, e, n, i, r) {
var o = i;
return o = o.replace(/^([ \t]*)/g, ""), o = o.replace(/[ \t]*$/g, ""), o = y(o),
o = o.replace(/:\/\//g, "~P"), e + "<code>" + o + "</code>";
});
}
function y(t) {
return t = t.replace(/&/g, "&amp;"), t = t.replace(/</g, "&lt;"), t = t.replace(/>/g, "&gt;"),
t = M(t, "*_{}[]\\", !1);
}
function x(t) {
return t = t.replace(/([\W_]|^)(\*\*|__)(?=\S)([^\r]*?\S[\*_]*)\2([\W_]|$)/g, "$1<strong>$3</strong>$4"),
t = t.replace(/([\W_]|^)(\*|_)(?=\S)([^\r\*_]*?\S)\2([\W_]|$)/g, "$1<em>$3</em>$4");
}
function w(t) {
return t = t.replace(/((^[ \t]*>[ \t]?.+\n(.+\n)*\n*)+)/gm, function(t, e) {
var n = e;
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(t, e) {
var n = e;
return n = n.replace(/^ /gm, "~0"), n = n.replace(/~0/g, "");
}), v("<blockquote>\n" + n + "\n</blockquote>");
});
}
function S(t, e) {
t = t.replace(/^\n+/g, ""), t = t.replace(/\n+$/g, "");
for (var n = t.split(/\n{2,}/g), i = [], r = /~K(\d+)K/, o = n.length, s = 0; s < o; 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 (!e) {
o = i.length;
for (var s = 0; s < o; s++) for (var c = !0; c; ) c = !1, i[s] = i[s].replace(/~K(\d+)K/g, function(t, e) {
return c = !0, F[e];
});
}
return i.join("\n\n");
}
function C(t) {
return t = t.replace(/&(?!#?[xX]?(?:[0-9a-fA-F]+|\w+);)/g, "&amp;"), t = t.replace(/<(?![a-z\/?!]|~D)/gi, "&lt;");
}
function _(t) {
return t = t.replace(/\\(\\)/g, L), t = t.replace(/\\([`*_{}\[\]()>#+-.!])/g, L);
}
function k(t, e, n, i) {
if (e) return t;
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] ? o <= 0 ? o = 1 : o++ : o--;
var s = "";
if (o < 0) {
var l = new RegExp("\\){1," + -o + "}$");
i = i.replace(l, function(t) {
return s = t, "";
});
}
if (s) {
var c = i.charAt(i.length - 1);
G.test(c) || (s = c + s, i = i.substr(0, i.length - 1));
}
return "<" + n + i + ">" + s;
}
function E(t) {
t = t.replace(q, k);
var e = function(t, e) {
return '<a href="' + e + '">' + R.plainLinkText(e) + "</a>";
};
return t = t.replace(/<((https?|ftp):[^'">\s]+)>/gi, e);
}
function T(t) {
return t = t.replace(/~E(\d+)E/g, function(t, e) {
var n = parseInt(e);
return String.fromCharCode(n);
});
}
function I(t) {
return t = t.replace(/^(\t|[ ]{1,4})/gm, "~0"), t = t.replace(/~0/g, "");
}
function D(t) {
if (!/\t/.test(t)) return t;
var e, n = [ " ", " ", " ", " " ], i = 0;
return t.replace(/[\n\t]/g, function(t, r) {
return "\n" === t ? (i = r + 1, t) : (e = (r - i) % 4, i = r + 1, n[e]);
});
}
function N(t) {
return t ? (t.length, t.replace(H, function(t, e) {
return "~D" == t ? "%24" : ":" == t ? ":" : "%" + t.charCodeAt(0).toString(16);
})) : "";
}
function M(t, e, n) {
var i = "([" + e.replace(/([\[\]\\])/g, "\\$1") + "])";
n && (i = "\\\\" + i);
var r = new RegExp(i, "g");
return t = t.replace(r, L);
}
function L(t, e) {
return "~E" + e.charCodeAt(0) + "E";
}
var A = {};
this.setOptions = function(t) {
A = t;
};
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 = e(n), n = t(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(t) {
return o(t);
}, $ = {
ol: "\\d+[.]",
ul: "[*+-]"
}, q = new RegExp('(="|<)?\\b(https?|ftp)(://[-A-Z0-9+&@#/%?=~_|[\\]()!:,.;]*[-A-Z0-9+&@#/%=~_|[\\])])(?=$|\\W)', "gi"), G = new RegExp("[-A-Z0-9+&@#/%=~_|[\\])]", "i"), H = /(?:["'*()[\]:]|~D)/g;
};
}(), define("libs/Markdown.Converter", function() {}), function() {
function t(t) {
return t.replace(/^\s+|\s+$/g, "");
}
function e(t) {
return t.replace(/\s+$/g, "");
}
function n(t) {
return t.replace(new RegExp("^(\\t|[ ]{1,4})", "gm"), "");
}
function i(t, e) {
return -1 != t.indexOf(e);
}
function r(t, e) {
return t.replace(/<[^>]*>?/gi, function(t) {
return t.match(e) ? t : "";
});
}
function o(t, e) {
for (var n = {}, i = 0; i < t.length; i++) n[t[i]] = t[i];
for (i = 0; i < e.length; i++) n[e[i]] = e[i];
var r = [];
for (var o in n) n.hasOwnProperty(o) && r.push(n[o]);
return r;
}
function a(t) {
return "\x02" != t.charAt(0) && (t = "\x02" + t), "\x03" != t.charAt(t.length - 1) && (t += "\x03"),
t;
}
function s(t) {
return "\x02" == t.charAt(0) && (t = t.substr(1)), "\x03" == t.charAt(t.length - 1) && (t = t.substr(0, t.length - 1)),
t;
}
function l(t, e) {
return r(c(t, e), m);
}
function c(t, e) {
var n = e.blockGamutHookCallback(t);
return n = p(n), n = n.replace(/~D/g, "$$").replace(/~T/g, "~"), n = e.previousPostConversion(n);
}
function u(t) {
return t.replace(/\\\|/g, "~I").replace(/\\:/g, "~i");
}
function d(t) {
return t.replace(/~I/g, "|").replace(/~i/g, ":");
}
function p(t) {
return t = t.replace(/~E(\d+)E/g, function(t, e) {
var n = parseInt(e);
return String.fromCharCode(n);
});
}
function h(t) {
return t.toLowerCase().replace(/\s+/g, "-").replace(/[^\w\-]+/g, "").replace(/\-\-+/g, "-").replace(/^-+/, "").replace(/-+$/, "");
}
function f(t, e) {
var n = e;
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(t) {
for (var e = 0; e < this.length; e++) if (this[e] == t) return e;
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(t, e) {
var n = new Markdown.Extra(), r = [], o = [], a = [], s = [ "unHashExtraBlocks" ];
return e = e || {}, e.extensions = e.extensions || [ "all" ], i(e.extensions, "all") && (e.extensions = [ "tables", "fenced_code_gfm", "def_list", "attr_list", "footnotes", "smartypants", "strikethrough", "newlines" ]),
o.push("wrapHeaders"), i(e.extensions, "attr_list") && (r.push("hashFcbAttributeBlocks"),
o.push("hashHeaderAttributeBlocks"), s.push("applyAttributeBlocks"), n.attributeBlocks = !0),
i(e.extensions, "fenced_code_gfm") && (o.push("fencedCodeBlocks"), r.push("fencedCodeBlocks")),
i(e.extensions, "tables") && o.push("tables"), i(e.extensions, "def_list") && o.push("definitionLists"),
i(e.extensions, "footnotes") && (r.push("stripFootnoteDefinitions"), o.push("doFootnotes"),
s.push("printFootnotes")), i(e.extensions, "smartypants") && s.push("runSmartyPants"),
i(e.extensions, "strikethrough") && a.push("strikethrough"), i(e.extensions, "newlines") && a.push("newlines"),
t.hooks.chain("postNormalization", function(t) {
return n.doTransform(r, t) + "\n";
}), t.hooks.chain("preBlockGamut", function(t, e) {
return n.blockGamutHookCallback = e, t = u(t), t = n.doTransform(o, t) + "\n", t = d(t);
}), t.hooks.chain("postSpanGamut", function(t) {
return n.doTransform(a, t);
}), n.previousPostConversion = t.hooks.postConversion, t.hooks.chain("postConversion", function(t) {
return t = n.doTransform(s, t), n.hashBlocks = [], n.footnotes = {}, n.usedFootnotes = [],
t;
}), "highlighter" in e && (n.googleCodePrettify = "prettify" === e.highlighter,
n.highlightJs = "highlight" === e.highlighter), "table_class" in e && (n.tableClass = e.table_class),
n.converter = t, n;
}, Markdown.Extra.prototype.doTransform = function(t, e) {
for (var n = 0; n < t.length; n++) e = this[t[n]](e);
return e;
}, Markdown.Extra.prototype.hashExtraBlock = function(t) {
return "\n<p>~X" + (this.hashBlocks.push(t) - 1) + "X</p>\n";
}, Markdown.Extra.prototype.hashExtraInline = function(t) {
return "~X" + (this.hashBlocks.push(t) - 1) + "X";
}, Markdown.Extra.prototype.unHashExtraBlocks = function(t) {
function e() {
var i = !1;
t = t.replace(/(?:<p>)?~X(\d+)X(?:<\/p>)?/g, function(t, e) {
i = !0;
var r = parseInt(e, 10);
return n.hashBlocks[r];
}), !0 === i && e();
}
var n = this;
return e(), t;
}, Markdown.Extra.prototype.wrapHeaders = function(t) {
function e(t) {
return "\n" + t + "\n";
}
return t = t.replace(/^.+[ \t]*\n=+[ \t]*\n+/gm, e), t = t.replace(/^.+[ \t]*\n-+[ \t]*\n+/gm, e),
t = t.replace(/^\#{1,6}[ \t]*.+?[ \t]*\#*\n+/gm, e);
};
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(t) {
function e(t, e, i) {
return "<p>~XX" + (n.hashBlocks.push(i) - 1) + "XX</p>\n" + e + "\n";
}
var n = this;
return t = t.replace(v, e), t = t.replace(b, e);
}, Markdown.Extra.prototype.hashFcbAttributeBlocks = function(t) {
function e(t, e, i) {
return "<p>~XX" + (n.hashBlocks.push(i) - 1) + "XX</p>\n" + e + "\n";
}
var n = this;
return t.replace(y, e);
}, Markdown.Extra.prototype.applyAttributeBlocks = function(t) {
var e = this, n = new RegExp('<p>~XX(\\d+)XX</p>[\\s]*(?:<(h[1-6]|pre)(?: +class="(\\S+)")?(>[\\s\\S]*?</\\2>))', "gm");
return t = t.replace(n, function(t, n, i, r, a) {
if (!i) return "";
for (var s = parseInt(n, 10), l = e.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(e) {
function n(e, n, r, o, a, s) {
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 c = 0; c < alignspecs.length; c++) {
var u = alignspecs[c];
u.match(/^ *-+: *$/m) ? align[c] = ' align="right"' : u.match(/^ *:-+: *$/m) ? align[c] = ' align="center"' : u.match(/^ *:-+ *$/m) ? align[c] = ' align="left"' : align[c] = "";
}
var d = n.split(/ *[|] */), p = d.length, h = i.tableClass ? ' class="' + i.tableClass + '"' : "", f = [ "<table", h, ">\n", "<thead>\n", "<tr>\n" ].join("");
for (c = 0; c < p; c++) {
var m = l(t(d[c]), i);
f += [ " <th", align[c], ">", m, "</th>\n" ].join("");
}
f += "</tr>\n</thead>\n";
var g = o.split("\n");
for (c = 0; c < g.length; c++) if (!g[c].match(/^\s*$/)) {
for (var v = g[c].split(/ *[|] */), b = p - v.length, y = 0; y < b; y++) v.push("");
for (f += "<tr>\n", y = 0; y < p; y++) {
var x = l(t(v[y]), i);
f += [ " <td", align[y], ">", x, "</td>\n" ].join("");
}
f += "</tr>\n";
}
return f += "</table>\n", i.hashExtraBlock(f);
}
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 e = e.replace(r, n), e = e.replace(o, n);
}, Markdown.Extra.prototype.stripFootnoteDefinitions = function(t) {
var e = this;
return t = t.replace(/\n[ ]{0,3}\[\^(.+?)\]\:[ \t]*\n?([\s\S]*?)\n{1,2}((?=\n[ ]{0,3}\S)|$)/g, function(t, n, i) {
return n = h(n), i += "\n", i = i.replace(/^[ ]{0,3}/g, ""), e.footnotes[n] = i,
"\n";
});
}, Markdown.Extra.prototype.doFootnotes = function(t) {
var e = this;
if (!0 === e.isConvertingFootnote) return t;
var n = 0;
return t = t.replace(/\[\^(.+?)\]/g, function(t, i) {
var r = h(i);
if (void 0 === e.footnotes[r]) return t;
n++, e.usedFootnotes.push(r);
var o = '<a href="#fn:' + r + '" id="fnref:' + r + '" title="See footnote" class="footnote">' + n + "</a>";
return e.hashExtraInline(o);
});
}, Markdown.Extra.prototype.printFootnotes = function(t) {
var e = this;
if (0 === e.usedFootnotes.length) return t;
t += '\n\n<div class="footnotes">\n<hr>\n<ol>\n\n';
for (var n = 0; n < e.usedFootnotes.length; n++) {
var i = e.usedFootnotes[n], r = e.footnotes[i];
e.isConvertingFootnote = !0;
var o = l(r, e);
delete e.isConvertingFootnote, t += '<li id="fn:' + i + '">' + o + ' <a href="#fnref:' + i + '" title="Return to article" class="reversefootnote">&#8617;</a></li>\n\n';
}
return t += "</ol>\n</div>";
}, Markdown.Extra.prototype.fencedCodeBlocks = function(e) {
function n(t) {
return t = t.replace(/&/g, "&amp;"), t = t.replace(/</g, "&lt;"), t = t.replace(/>/g, "&gt;"),
t = t.replace(/~D/g, "$$"), t = t.replace(/~T/g, "~");
}
var i = this;
return e = e.replace(/(?:^|\n)```([^`\n]*)\n([\s\S]*?)\n```[ \t]*(?=\n)/g, function(e, r, o) {
var a = t(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(t) {
var e = this, n = "", i = 0;
t.replace(/(?:<!--[\s\S]*?-->)|(<)([a-zA-Z1-6]+)([^\n]*?>)([\s\S]*?)(<\/\2>)/g, function(r, o, a, s, l, c, u) {
var d = t.substring(i, u);
return n += e.applyPants(d), e.smartyPantsLastChar = n.substring(n.length - 1),
i = u + r.length, o ? (/code|kbd|pre|script|noscript|iframe|math|ins|del|pre/i.test(a) ? e.smartyPantsLastChar = l.substring(l.length - 1) : l = e.educatePants(l),
void (n += o + a + s + l + c)) : void (n += r);
});
var r = t.substring(i);
return n += e.applyPants(r), e.smartyPantsLastChar = n.substring(n.length - 1),
n;
}, Markdown.Extra.prototype.applyPants = function(t) {
return t = t.replace(/---/g, "&#8212;").replace(/--/g, "&#8211;"), t = t.replace(/\.\.\./g, "&#8230;").replace(/\.\s\.\s\./g, "&#8230;"),
t = t.replace(/``/g, "&#8220;").replace(/''/g, "&#8221;"), /^'$/.test(t) ? /\S/.test(this.smartyPantsLastChar) ? "&#8217;" : "&#8216;" : /^"$/.test(t) ? /\S/.test(this.smartyPantsLastChar) ? "&#8221;" : "&#8220;" : (t = t.replace(/^'(?=[!"#\$\%'()*+,\-.\/:;<=>?\@\[\\]\^_`{|}~]\B)/, "&#8217;"),
t = t.replace(/^"(?=[!"#\$\%'()*+,\-.\/:;<=>?\@\[\\]\^_`{|}~]\B)/, "&#8221;"), t = t.replace(/"'(?=\w)/g, "&#8220;&#8216;"),
t = t.replace(/'"(?=\w)/g, "&#8216;&#8220;"), t = t.replace(/'(?=\d{2}s)/g, "&#8217;"),
t = t.replace(/(\s|&nbsp;|--|&[mn]dash;|&\#8211;|&\#8212;|&\#x201[34];)'(?=\w)/g, "$1&#8216;"),
t = t.replace(/([^\s\[\{\(\-])'/g, "$1&#8217;"), t = t.replace(/'(?=\s|s\b)/g, "&#8217;"),
t = t.replace(/'/g, "&#8216;"), t = t.replace(/(\s|&nbsp;|--|&[mn]dash;|&\#8211;|&\#8212;|&\#x201[34];)"(?=\w)/g, "$1&#8220;"),
t = t.replace(/([^\s\[\{\(\-])"/g, "$1&#8221;"), t = t.replace(/"(?=\s)/g, "&#8221;"),
t = t.replace(/"/gi, "&#8220;"));
}, Markdown.Extra.prototype.runSmartyPants = function(t) {
return this.smartyPantsLastChar = "", t = this.educatePants(t), t = t.replace(/(<([a-zA-Z1-6]+)\b([^\n>]*?)(\/)?>)/g, f);
}, Markdown.Extra.prototype.definitionLists = function(e) {
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 e = a(e), e = e.replace(n, function(e, n, r) {
var o = t(i.processDefListItems(r));
return o = "<dl>\n" + o + "\n</dl>", n + i.hashExtraBlock(o) + "\n\n";
}), s(e);
}, 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(e, n, i) {
for (var o = t(i).split("\n"), a = "", s = 0; s < o.length; s++) {
var c = o[s];
c = l(t(c), r), a += "\n<dt>" + c + "</dt>";
}
return a + "\n";
}), i = i.replace(u, function(t, 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 = e(a), a = l(n(a), r)), "\n<dd>" + a + "</dd>\n";
}), s(i);
}, Markdown.Extra.prototype.strikethrough = function(t) {
return t.replace(/([\W_]|^)~T~T(?=\S)([^\r]*?\S[\*_]*)~T~T([\W_]|$)/g, "$1<del>$2</del>$3");
}, Markdown.Extra.prototype.newlines = function(t) {
return t.replace(/(<(?:br|\/li)>)?\n/g, function(t, e) {
return e ? t : " <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(t, e, 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 t(t) {
return e.some(l.config.extensions, function(e) {
return e == t;
});
}
n.setInputChecked("#input-markdownextra-fencedcodegfm", t("fenced_code_gfm")), n.setInputChecked("#input-markdownextra-tables", t("tables")),
n.setInputChecked("#input-markdownextra-deflist", t("def_list")), n.setInputChecked("#input-markdownextra-attrlist", t("attr_list")),
n.setInputChecked("#input-markdownextra-footnotes", t("footnotes")), n.setInputChecked("#input-markdownextra-smartypants", t("smartypants")),
n.setInputChecked("#input-markdownextra-strikethrough", t("strikethrough")), n.setInputChecked("#input-markdownextra-newlines", t("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(t) {
t.extensions = [], n.getInputChecked("#input-markdownextra-fencedcodegfm") && t.extensions.push("fenced_code_gfm"),
n.getInputChecked("#input-markdownextra-tables") && t.extensions.push("tables"),
n.getInputChecked("#input-markdownextra-deflist") && t.extensions.push("def_list"),
n.getInputChecked("#input-markdownextra-attrlist") && t.extensions.push("attr_list"),
n.getInputChecked("#input-markdownextra-footnotes") && t.extensions.push("footnotes"),
n.getInputChecked("#input-markdownextra-smartypants") && t.extensions.push("smartypants"),
n.getInputChecked("#input-markdownextra-strikethrough") && t.extensions.push("strikethrough"),
n.getInputChecked("#input-markdownextra-newlines") && t.extensions.push("newlines"),
t.intraword = n.getInputChecked("#input-markdownextra-intraword"), t.comments = n.getInputChecked("#input-markdownextra-comments"),
t.highlighter = n.getInputValue("#input-markdownextra-highlighter");
};
var c;
l.onEventMgrCreated = function(t) {
c = t;
};
var u;
return l.onReady = function() {
u = document.getElementById("preview-contents");
}, l.onPagedownConfigure = function(t) {
var n = t.getConverter(), i = {
extensions: l.config.extensions,
highlighter: "prettify"
};
if (!0 === l.config.intraword) {
var r = {
_DoItalicsAndBold: function(t) {
return t = t.replace(/([^\w*]|^)(\*\*|__)(?=\S)(.+?[*_]*)(?=\S)\2(?=[^\w*]|$)/g, "$1<strong>$3</strong>"),
t = t.replace(/([^\w*]|^)(\*|_)(?=\S)(.+?)(?=\S)\2(?=[^\w*]|$)/g, "$1<em>$3</em>"),
t = t.replace(/([^\w*]|^)(\*\*|__)(?=\S)(.+?[*_]*)(?=\S)\2(?=[^\w*]|$)/g, "$1<strong>$3</strong>");
}
};
n.setOptions(r);
}
if (!0 === l.config.comments && n.hooks.chain("postConversion", function(t) {
return t.replace(/<!--.*?-->/g, function(t) {
return t.replace(/^<!---(.+?)-?-->$/, ' <span class="comment label label-danger">$1</span> ');
});
}), "highlight" == l.config.highlighter) {
var o = document.getElementById("preview-contents");
t.hooks.chain("onPreviewRefresh", function() {
e.each(o.querySelectorAll(".prettyprint > code"), function(t) {
!t.highlighted && s.highlightBlock(t), t.highlighted = !0;
});
});
} else "prettify" == l.config.highlighter && t.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\tskipStartupTypeset: 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(t, e) {
var n = document.createElement("script");
n.type = "text/x-mathjax-config", n.innerHTML = _.template(e, {
tex: t.extensionSettings.mathJax ? t.extensionSettings.mathJax.tex : "undefined",
tex2jax: t.extensionSettings.mathJax ? t.extensionSettings.mathJax.tex2jax : void 0
}), document.getElementsByTagName("head")[0].appendChild(n);
}), define("extensions/mathJax", [ "utils", "classes/Extension", "text!html/mathJaxSettingsBlock.html", "mathjax" ], function(t, e, n) {
function i(t, e, n) {
var i = u.slice(t, e + 1).join("").replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
for (x.Browser.isMSIE && (i = i.replace(/(%[^\n]*)\n/g, "$1<br/>\n")); e > t; ) u[e] = "",
e--;
u[t] = "@@" + m.length + "@@", n && (i = n(i)), m.push(i), d = p = h = null;
}
function r(t) {
d = p = h = null, m = [];
var e;
/`/.test(t) ? (t = t.replace(/~/g, "~T").replace(/(^|[^\\])(`+)([^\n]*?[^`\n])\2(?!`)/gm, function(t) {
return t.replace(/\$/g, "~D");
}), e = function(t) {
return t.replace(/~([TD])/g, function(t, e) {
return {
T: "~",
D: "$"
}[e];
});
}) : e = function(t) {
return t;
}, u = w(t.replace(/\r\n?/g, "\n"), S);
for (var n = 1, r = u.length; n < r; 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, e)), d = p = h = null, f = 0) : o === p ? f ? h = n : i(d, n, e) : o.match(/\n.*\n/) ? (h && (n = h,
i(d, n, e)), 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, e), e(u.join(""));
}
function o(t) {
return t = t.replace(/@@(\d+)@@/g, function(t, e) {
return m[e];
}), m = null, t;
}
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 e("mathJax", "MathJax", (!0));
l.settingsBlock = n, l.defaultConfig = {
tex: "{}",
tex2jax: '{ inlineMath: [["$","$"],["\\\\\\\\(","\\\\\\\\)"]], displayMath: [["$$","$$"],["\\\\[","\\\\]"]], processEscapes: true }'
}, l.onLoadSettings = function() {
t.setInputValue("#input-mathjax-config-tex", l.config.tex), t.setInputValue("#input-mathjax-config-tex2jax", l.config.tex2jax);
}, l.onSaveSettings = function(e, n) {
e.tex = t.getInputJsValue("#input-mathjax-config-tex", n), e.tex2jax = t.getInputJsValue("#input-mathjax-config-tex2jax", n);
}, l.onPagedownConfigure = function(t) {
b = document.getElementById("preview-contents");
var e = t.getConverter();
e.hooks.chain("preConversion", r), e.hooks.chain("postConversion", o);
};
var c;
l.onAsyncPreview = function(t) {
c = t, 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(t, e) {
return t.split(e);
} : function(t, e) {
var n, i = [];
if (!e.global) {
n = e.toString();
var r = "";
n = n.replace(/^\/(.*)\/([im]*)$/, function(t, e, n) {
return r = n, e;
}), e = RegExp(n, r + "g");
}
for (var o = e.lastIndex = 0; n = e.exec(t); ) i.push(t.substring(o, n.index)),
i.push.apply(i, n.slice(1)), o = n.index + n[0].length;
return i.push(t.substring(o)), i;
}, function() {
var t = MathJax.Hub;
if (!t.Cancel) {
t.cancelTypeset = !1, t.Register.StartupHook("HTML-CSS Jax Config", function() {
var e = MathJax.OutputJax["HTML-CSS"], n = e.Translate;
e.Augment({
Translate: function(i, r) {
if (t.cancelTypeset || r.cancelled) throw Error("MathJax Canceled");
return n.call(e, i, r);
}
});
}), t.Register.StartupHook("SVG Jax Config", function() {
var e = MathJax.OutputJax.SVG, n = e.Translate;
e.Augment({
Translate: function(i, r) {
if (t.cancelTypeset || r.cancelled) throw Error("MathJax Canceled");
return n.call(e, i, r);
}
});
}), t.Register.StartupHook("TeX Jax Config", function() {
var e = MathJax.InputJax.TeX, n = e.Translate;
e.Augment({
Translate: function(i, r) {
if (t.cancelTypeset || r.cancelled) throw Error("MathJax Canceled");
return n.call(e, i, r);
}
});
});
var e = t.processError;
t.processError = function(n, i, r) {
return "MathJax Canceled" !== n.message ? e.call(t, n, i, r) : (MathJax.Message.Clear(0, 0),
i.jaxIDs = [], i.jax = {}, i.scripts = [], i.i = i.j = 0, i.cancelled = !0, null);
}, t.Cancel = function() {
this.cancelTypeset = !0;
};
}
}(), l;
}), define("text!html/partialRenderingSettingsBlock.html", [], function() {
return "<p>Renders modified sections only.</p>\n<blockquote>\n\t<p><b>Note:</b> Document sections are based on title elements (h1, h2...). Therefore if\n\tyour 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(t, e, n, i, r) {
function o() {
var e = [], n = "\n";
if (m = !1, t.each(g, function(t) {
var i = '\n<div class="se-preview-section-delimiter"></div>\n\n' + t.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(t, e) {
return e ? (m = !0, n += t.replace(/^\s*\n/gm, "") + "\n", "") : t;
})), i = i.replace(/^```.*\n[\s\S]*?\n```|^[ ]{0,3}\[(.+)\]:[ \t]*\n?[ \t]*<?(\S+?)>?(?=\s|$)[ \t]*\n?[ \t]*((\n*)["(](.+?)[")][ \t]*)?(?:\n+)/gm, function(t, e) {
return e ? (n += t.replace(/^\s*\n/gm, "") + "\n", "") : t;
}), e.push({
id: t.id,
text: i + "\n"
});
}), y = [], b = [], d = void 0, !0 === x || u != n) return x = !1, u = n, b = v,
v = e, void (y = e);
var i = v.length;
t.some(v, function(t, n) {
if (n >= e.length || t.text != e[n].text) return i = n, !0;
});
var r = -v.length;
t.some(v.slice().reverse(), function(t, n) {
if (n >= e.length || t.text != e[e.length - n - 1].text) return r = -n, !0;
}), i - r > v.length && (r = i - v.length);
var o = v.slice(0, i);
y = e.slice(i, e.length + r);
var a = v.slice(v.length + r, v.length);
d = t.first(a), b = v.slice(i, v.length + r), v = o.concat(y).concat(a);
}
function a(t) {
var e = t.id.substring(3), n = w[e];
n && S.removeChild(n), w[e] = t, S.appendChild(t);
}
function s() {
function n(n) {
for (var i = e("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 ? t.each(r.querySelectorAll("ol > li"), a) : l || i.appendChild(r),
r = s;
}
return i;
}
t.each(b, function(t) {
var e = document.getElementById("wmd-preview-section-" + t.id);
h.removeChild(e);
});
var i = document.getElementById("wmd-preview"), r = i.firstChild, o = document.createDocumentFragment();
t.each(y, function(t) {
o.appendChild(n(t));
}), 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 = e("ol");
t.each(h.querySelectorAll("a.footnote"), function(t, e) {
t.textContent = e + 1;
var n = t.id.substring(6);
l.push(n);
var i = w[n];
i && c.appendChild(i.cloneNode(!0));
}), l.length > 0 && p.appendChild(e("div", {
"class": "footnotes"
}, e("hr"), c)), Object.keys(w).forEach(function(t) {
-1 === l.indexOf(t) && (S.removeChild(w[t]), delete w[t]);
});
}
}
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(t) {
g = t;
}, l.onPagedownConfigure = function(e) {
c = e.getConverter(), c.hooks.chain("preConversion", function() {
o();
var e = t.map(y, function(t) {
return t.text;
});
return e.push(u + "\n\n"), e.join("");
}), e.hooks.chain("onPreviewRefresh", function() {
s();
});
}, l.onInit = function() {
n.enabled && t.some(n.config.extensions, function(t) {
return "footnotes" == t;
}) && (f = !0);
}, l.onReady = function() {
p = e("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(t, e, n, i, r, o) {
function a(t, e) {
function n(t, e) {
var n = o.substring(a, e);
u.push({
id: ++h,
text: n,
textWithFrontMatter: i + n
}), i = "";
}
if (t === p) {
var i = (p.frontMatter || {})._frontMatter || "", r = e.substring(i.length), o = r + "\n\n";
u = [];
var a = 0;
o.replace(d, function(t, e) {
n(a, e), a = e;
}), n(a, r.length), s.onSectionsCreated(u);
}
}
var s, l = new r("markdownSectionParser", "Markdown section parser");
l.onEventMgrCreated = function(t) {
s = t;
};
var c, u = [], d = "^.+[ \\t]*\\n=+[ \\t]*\\n+|^.+[ \\t]*\\n-+[ \\t]*\\n+|^\\#{1,6}[ \\t]*.+?[ \\t]*\\#*\\n+";
l.onPagedownConfigure = function(r) {
e.enabled && t.some(e.config.extensions, function(t) {
return "fenced_code_gfm" == t;
}) && (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 t.reduce(u, function(t, e) {
return t + '\n<div class="se-preview-section-delimiter"></div>\n\n' + e.text + "\n\n";
}, "");
}), r.hooks.chain("onPreviewRefresh", function() {
function t() {
for (var t = o("div", {
"class": "wmd-preview-section preview-content"
}), e = !1; n; ) {
var i = n.nextSibling, r = "se-preview-section-delimiter" == n.className;
if (!0 === e && "DIV" == n.tagName && r) break;
e = !0, r || t.appendChild(n), n = i;
}
return t;
}
var e = document.getElementById("wmd-preview"), n = e.firstChild, i = document.createDocumentFragment();
u.forEach(function(e) {
i.appendChild(t());
}), c.innerHTML = "", c.appendChild(e), c.appendChild(i);
}));
}, l.onReady = function() {
c = document.getElementById("preview-contents");
};
var p;
l.onFileSelected = function(t) {
p = t;
};
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\t<i class="icon-help-circled"></i>\n</button>\n<div class="dropdown-menu pull-right">\n\t<h3>Markdown syntax</h3>\n <hr>\n\t<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(t, e, n) {
var i = new e("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(t, e, 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 e = "/ga.js";
location.search.match(/(\?|&)console/) && (e = "/u/ga_debug.js"), t.ajax({
url: "https://ssl.google-analytics.com" + e,
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)) ]),
e.each(o.extensionSettings, function(t, e) {
_gaq.push([ "_trackEvent", "Extensions", e + " enabled", "" + (!0 === t.enabled) ]);
}), window.onerror = function(t, e, n) {
_gaq.push([ "_trackEvent", "Error", t, e + ":" + n + i.formatEventList() ]);
}, u();
}, s.onOfflineChanged = function(t) {
c = t, u();
};
var p = 0;
return s.onSyncRunning = function(t) {
!0 === t && (p = new Date().getTime());
}, s.onPublishRunning = function(t) {
!0 === t && (p = new Date().getTime());
}, s.onSyncSuccess = function() {
var t = new Date().getTime();
_gaq.push([ "_trackTiming", "Sync", "SyncTime", t - p ]);
}, s.onSyncImportSuccess = function(t, e) {
_gaq.push([ "_trackEvent", "Sync", "SyncImport" ]), _gaq.push([ "_trackEvent", "Sync", "SyncImport provider", e.providerId ]);
}, s.onSyncExportSuccess = function(t, e) {
_gaq.push([ "_trackEvent", "Sync", "SyncExport" ]), _gaq.push([ "_trackEvent", "Sync", "SyncExport provider", e.provider.providerId ]);
}, s.onPublishSuccess = function(t) {
var n = new Date().getTime();
_gaq.push([ "_trackTiming", "Publish", "PublishSuccess", n - p ]), e.each(t.publishLocations, function(t) {
_gaq.push([ "_trackEvent", "Publish", "PublishSuccess provider", t.provider.providerId ]);
});
}, s.onNewPublishSuccess = function(t, e) {
_gaq.push([ "_trackEvent", "Publish", "NewPublish provider", e.provider.providerId ]);
}, s.onError = function(t) {
!e.isString(t) && t.message && _gaq.push([ "_trackEvent", "Error", "message", t.message + i.formatEventList() ]);
}, s;
}), define("extensions/twitter", [ "jquery", "underscore", "constants", "utils", "classes/Extension" ], function(t, e, n, i, r) {
var o = new r("twitter", "Twitter", (!1), (!0)), a = !1, s = !1, l = function() {
!1 === a && !1 === s && t.ajax({
url: "https://platform.twitter.com/widgets.js",
dataType: "script"
}).done(function() {
a = !0;
});
};
return o.onReady = function() {
l();
}, o.onOfflineChanged = function(t) {
s = t, l();
}, o.onTweet = function() {
a && window.twttr.widgets.load();
}, o;
}), function() {
function t() {
if (u) return u;
var t = {
width: "1px",
height: "1px",
position: "absolute",
top: "-100px"
};
return u = document.createElement("iframe"), u.setAttribute("style", Object.keys(t).map(function(e) {
return e + ":" + t[e];
}).join(";")), document.body.appendChild(u), u.onerror = u.onload = function() {
setTimeout(function() {
p && p({
error: _
});
}, 10);
}, u;
}
function e(t, e) {
var n = y + t;
return e.q = Date.now(), e = e && Object.keys(e).map(function(t) {
return t + "=" + encodeURIComponent(e[t]);
}).join("&"), e ? n + "?" + e : n;
}
function n(n, i) {
p = function(t) {
p = void 0, i(t);
};
var r = {
immediate: !0,
response_type: "token",
client_id: n.applicationID,
redirect_uri: n.redirectURL
};
b(function() {
t().src = e("/authorize", r), clearTimeout(g), g = setTimeout(function() {
p && p({
error: C
});
}, S);
});
}
function i(t, e) {
e.pricingOptions && e.pricingOptions.length && (t.pricing_options = e.pricingOptions.join ? e.pricingOptions.join(",") : e.pricingOptions),
e.summary && (t.summary = !0);
}
function r(t, n) {
h = function(t) {
h = void 0, n(t);
};
var r = {
popup: !0,
response_type: "token",
client_id: t.applicationID,
redirect_uri: t.redirectURL
};
i(r, t);
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(e("/authorize", r), void 0, Object.keys(o).map(function(t) {
return t + "=" + o[t];
}).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(t) {
f = function(e) {
f = void 0, t(e);
};
var n = {
access_token: m.token,
callback: "_monetizeJsonpCallback"
};
b(function() {
o().src = e("/api/payments", n), clearTimeout(v), v = setTimeout(function() {
f && f({
error: C
});
}, S);
});
}
function s(t) {
var n = {
client_id: t.applicationID,
redirect_uri: t.redirectURL
};
i(n, t), window.location = e("/authorize", n);
}
function l(t, e) {
for (var n in e) t[n] = e[n];
}
function c(t) {
function e(t) {
return function(e, n) {
"function" == typeof e && (n = e, e = {});
var r = {};
l(r, i), l(r, e || {}), t(r, n);
};
}
var i = {};
l(i, k), l(i, t || {});
var o = {};
return o.getTokenImmediate = e(function(t, e) {
return m && m.token && m.refreshDate > Date.now() ? e(void 0, m.token) : void n(t, function(t) {
e(t.error, t.token);
});
}), o.getPaymentsImmediate = e(function(t, e) {
return m && m.token && m.refreshDate > Date.now() ? a(function(t) {
e(t.error, t.payments);
}) : void n(t, function(t) {
e(t.error, t.payments);
});
}), o.getTokenInteractive = e(function(t, e) {
return e ? void r(t, function(t) {
e(t.error, t.token);
}) : s(t);
}), o.getPaymentsInteractive = e(function(t, e) {
return e ? void r(t, function(t) {
e(t.error, t.payments);
}) : s(t);
}), o.getToken = e(function(t, e) {
return (t.immeditate ? o.getTokenImmediate : o.getTokenInteractive)(t, e);
}), o.getPayments = e(function(t, e) {
return (t.immeditate ? o.getPaymentsImmediate : o.getPaymentsInteractive)(t, e);
}), o;
}
var u, d, p, h, f, m, g, v, b = function() {
var t, e = [], n = /^loaded|c/.test(document.readyState);
return document.addEventListener("DOMContentLoaded", t = function() {
for (document.removeEventListener("DOMContentLoaded", t, !1), n = 1; t = e.shift(); ) t();
}, !1), function(t) {
n ? t() : e.push(t);
};
}(), y = "https://monetizejs.com", x = 1e3, w = 700, S = 3e4, C = "Request timeout", _ = "Please check your JS console";
window.addEventListener("message", function(t) {
t.origin == y && (m = t.data, m.expiresIn && (m.refreshDate = Date.now() + m.expiresIn - 3e5),
m.popup ? h && h(m) : (clearTimeout(g), p && p(m)));
}), window._monetizeJsonpCallback = function E(t) {
return window._monetizeJsonpCallback !== E ? f && f({
error: "Callback replaced!"
}) : (clearTimeout(v), void (f && f({
payments: t
})));
};
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\t\t\t\t\t\tproject</a> /\n <a target="_blank" href="https://github.com/benweet/stackedit/issues">issue\n\t\t\t\t\t\ttracker</a>\n <br />\n <a target="_blank" href="https://chrome.google.com/webstore/detail/stackedit/iiooodelglhkcpgbajoejffhijaclcdg">Chrome\n\t\t\t\t\t\tapp</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\t\t\t\t\t\ton Facebook</a>\n <br />\n <a target="_blank" href="https://plus.google.com/110816046787593496375"\n rel="publisher">Follow on Google+</a>\n <br />\n\t\t\t\t</dd>\n\t\t\t</dl>\n\t\t\t<dl>\n\t\t\t\t<dt>Developers:</dt>\n\t\t\t\t<dd>\n\t\t\t\t\t<a target="_blank" href="https://twitter.com/benweet">Benoit Schweblin</a><br />\n\t\t\t\t\tPete Eigel (contributor)<br />\n\t\t\t\t\twiibaa (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\t\t\t</dl>\n <p>\n With special thanks to <a target="blank" href="http://www.smileupps.com/">Smileupps</a> for CouchDB hosting.\n </p>\n\t\t\t<dl>\n\t\t\t\t<dt>Sponsorship:</dt>\n\t\t\t\t<dd>\n <a href="#" class="sponsorship-button"><img height="30" data-stackedit-src="button.svg" /></a>\n\t\t\t\t</dd>\n\t\t\t</dl>\n\t\t\t<p>\n\t\t\t\tStackEdit <%= version %> &ndash; <a target="_blank" href="privacy_policy.html">Privacy Policy</a><br /> Copyright 2013-2014 <a\n\t\t\t\t\ttarget="_blank" href="https://twitter.com/benweet">Benoit\n\t\t\t\t\tSchweblin</a><br /> Licensed under an <a target="_blank"\n\t\t\t\t\thref="http://www.apache.org/licenses/LICENSE-2.0">Apache\n\t\t\t\t\tLicense</a>\n\t\t\t</p>\n\t\t</div>\n\t\t<div class="modal-footer">\n\t\t\t<a href="#" class="btn btn-primary" data-dismiss="modal">Close</a>\n\t\t</div>\n\t</div>\n</div>\n';
}), define("extensions/dialogAbout", [ "jquery", "underscore", "constants", "utils", "classes/Extension", "monetizejs", "text!html/dialogAbout.html" ], function(t, e, n, i, r, o, a) {
var s, l = new r("dialogAbout", 'Dialog "About"');
l.onEventMgrCreated = function(t) {
s = t;
};
var c = new o({
applicationID: "ESTHdCYOi18iLhhO"
});
return l.onReady = function() {
i.addModal("modal-about", e.template(a, {
version: n.VERSION
})), t(".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\t<span class="input-group-addon" title="<%= publishAttributes.provider.providerName %>">\n\t\t<i class="icon-provider-<%= publishAttributes.provider.providerId %>"></i>\n\t</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(t, e, n, i) {
var r, o = new n("dialogManagePublication", 'Dialog "Manage publication"', (!1), (!0));
o.onEventMgrCreated = function(t) {
r = t;
};
var a, s, l, c = function(t) {
if (void 0 === t || t === a) {
l.toggleClass("hide", 0 === e.size(a.publishLocations));
var n = e.reduce(a.publishLocations, function(t, n) {
var r = e.omit(n, "provider", "publishIndex");
return r.password && (r.password = "********"), r = JSON.stringify(r).replace(/{|}|"/g, "").replace(/,/g, ", "),
t + e.template(i, {
publishAttributes: n,
publishDesc: r,
publishLocationLink: n.provider.getPublishLocationLink && n.provider.getPublishLocationLink(n)
});
}, "");
s.innerHTML = n;
}
};
return o.onFileSelected = function(t) {
a = t, c(t);
}, o.onNewPublishSuccess = c, o.onPublishRemoved = c, o.onReady = function() {
var e = document.querySelector(".modal-manage-publish");
s = e.querySelector(".publish-list"), l = t(document.querySelectorAll(".show-already-published")),
t(s).on("click", ".remove-button", function() {
var e = t(this), n = a.publishLocations[e.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\t<span class="input-group-addon"\n title="<%= syncAttributes.provider.providerName %>">\n\t\t<i class="icon-provider-<%= syncAttributes.provider.providerId %>"></i>\n\t</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(t, e, n, i) {
var r, o = new n("dialogManageSynchronization", 'Dialog "Manage synchronization"', (!1), (!0));
o.onEventMgrCreated = function(t) {
r = t;
};
var a;
o.onSynchronizerCreated = function(t) {
a = t;
};
var s, l, c, u = function(t) {
if (void 0 === t || t === s) {
c.toggleClass("hide", 0 === e.size(s.syncLocations));
var n = e.reduce(s.syncLocations, function(t, n) {
return t + e.template(i, {
syncAttributes: n,
syncDesc: n.id || n.path,
syncLocationLink: n.provider.getSyncLocationLink && n.provider.getSyncLocationLink(n)
});
}, "");
l.innerHTML = n;
}
};
return o.onFileSelected = function(t) {
s = t, u(t);
}, o.onSyncExportSuccess = u, o.onSyncRemoved = u, o.onReady = function() {
var e = document.querySelector(".modal-manage-sync");
l = e.querySelector(".sync-list"), c = t(document.querySelectorAll(".show-already-synchronized")),
t(l).on("click", ".remove-button", function() {
var e = t(this), n = s.syncLocations[e.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(t, e, n, i, r) {
var o, a = new i("dialogManageSharing", 'Button "Share"', (!1), (!0));
a.onEventMgrCreated = function(t) {
o = t;
};
var s;
a.onSharingCreated = function(t) {
s = t;
};
var l, c, u, d, p, h = function(i) {
if (void 0 === i || i === l) {
var o = e.reduce(l.syncLocations, function(i, o) {
var a = s.getEditorParams(o);
if (a) {
var l = n.MAIN_URL + "editor#!" + t.param(a);
i += e.template(r, {
link: l
});
}
return i;
}, "");
c.innerHTML = o, d.toggleClass("hide", 0 !== o.length);
var a = e.reduce(l.publishLocations, function(i, o) {
var a = s.getViewerParams(o);
if (a) {
var l = n.MAIN_URL + "viewer#!" + t.param(a);
i += e.template(r, {
link: l
});
}
return i;
}, "");
u.innerHTML = a, p.toggleClass("hide", 0 !== a.length);
}
};
return a.onFileSelected = function(t) {
l = t, h(t);
}, a.onSyncExportSuccess = h, a.onSyncRemoved = h, a.onNewPublishSuccess = h, a.onPublishRemoved = h,
a.onReady = function() {
var e = document.querySelector(".modal-manage-sharing");
c = e.querySelector(".share-editor-list"), u = e.querySelector(".share-viewer-list"),
d = t(e.querySelectorAll(".msg-no-share-editor")), p = t(e.querySelectorAll(".msg-no-share-viewer")),
t(e).on("show.bs.modal", function() {
t(e.querySelector("input")).each(function() {
this.value = t(this).data("value");
});
});
}, a;
}), function() {
var t = this, e = {}, n = !1;
"undefined" != typeof module && module.exports ? (module.exports = e, t.toMarkdown = e,
n = !0) : t.toMarkdown = e, e.converter = function(t) {
t && t.elements && $.isArray(t.elements) && (c = c.concat(t.elements)), this.makeMd = function(t, e) {
var r;
return n ? require("jsdom").env({
html: t,
scripts: [ "http://code.jquery.com/jquery-1.6.4.min.js" ],
done: function(n, r) {
"function" == typeof e && e(i(t, r.$));
}
}) : r = i(t, $), r;
};
};
var i = function(t, e) {
t = t.replace(/(\d+)\. /g, "$1\\. ");
var n = e("<div/>"), i = n.html(t);
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; o < s; o++) r.push(c[o].selector);
for (r = r.join(","); i.find(r).length; ) for (var o = 0, s = c.length; o < s; o++) $matches = i.find(c[o].selector + ':not(:has("' + r + '"))'),
$matches.each(function(t, n) {
var i = e(n);
i.before(c[o].replacement(i.html(), i)).remove();
});
return a(i.html());
}, r = function(t) {
return t.replace(/^[\n\r\f]+|[\n\r\f]+$/g, "");
}, o = function(t) {
return String(t).replace(/&amp;/g, "&").replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&quot;/g, '"');
}, a = function(t) {
return t = t.replace(/^[\t\r\n]+|[\t\r\n]+$/g, ""), t = t.replace(/\n\s+\n/g, "\n\n"),
t = t.replace(/\n{3,}/g, "\n\n"), t = o(t);
}, s = function(t) {
return t = r(t), t ? "**" + t + "**" : "";
}, l = function(t) {
return t = r(t), t ? "_" + t + "_" : "";
}, c = [ {
selector: "p",
replacement: function(t, e) {
return t = $.trim(t), t ? "\n\n" + t + "\n\n" : "";
}
}, {
selector: "br",
replacement: function(t, e) {
return "\n";
}
}, {
selector: "h1,h2,h3,h4,h5,h6",
replacement: function(t, e) {
t = $.trim(t);
for (var n = e.prop("nodeName").charAt(1), i = "", r = 0; r < n; r++) i += "#";
return t ? "\n\n" + i + " " + t + "\n\n" : "";
}
}, {
selector: "hr",
replacement: function(t, e) {
return "\n\n* * *\n\n";
}
}, {
selector: "a[href]",
replacement: function(t, e) {
if (t) {
t = r(t);
var n = e.attr("href"), i = e.attr("title") || "";
return "[" + t + "](" + 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(t, e) {
return t = r(t), t ? "`" + t + "`" : "";
}
}, {
selector: "img",
replacement: function(t, e) {
var n = e.attr("alt") || "", i = e.attr("src") || "", r = e.attr("title") || "";
return "![" + n + "](" + i + (r ? ' "' + r + '"' : "") + ")";
}
}, {
selector: "pre",
replacement: function(t, e) {
return /^\s*\`/.test(t) ? (t = t.replace(/\`/g, ""), " " + t.replace(/\n/g, "\n ")) : "";
}
}, {
selector: "li",
replacement: function(t, e) {
t = t.replace(/^\s+|\s+$/, "").replace(/\n/gm, "\n ");
var n = "* ", i = "", r = e.parent(), o = r.contents().filter(function() {
return 1 === this.nodeType && "LI" === this.nodeName || 3 === this.nodeType;
}), a = o.index(e) + 1;
return n = r.is("ol") ? a + ". " : "* ", a == o.length && (e.parents("li").length || (i = "\n"),
t = t.replace(/\s+$/, ""), e.unwrap()), n + t + i + "\n";
}
}, {
selector: "blockquote",
replacement: function(t, e) {
return t = t = $.trim(t).replace(/\n{3,}/g, "\n\n"), "&gt; " + (t = t.replace(/\n/g, "\n&gt; "));
}
} ];
}(), define("toMarkdown", [ "jquery" ], function(t) {
return function() {
return t.toMarkdown;
};
}(this)), define("extensions/dialogOpenHarddrive", [ "jquery", "underscore", "constants", "utils", "classes/Extension", "toMarkdown" ], function(t, e, n, i, r, o) {
function a(i) {
i.stopPropagation(), i.preventDefault();
var r = (i.dataTransfer || i.target).files;
t(".modal-import-harddrive-markdown, .modal-import-harddrive-html").modal("hide"),
e.each(r, function(e) {
if (!t(i.target).is("#wmd-input *") || !e.name.match(/.(jpe?g|png|gif)$/i)) {
var r = new FileReader();
r.onload = function(t) {
return function(e) {
var n = e.target.result;
if (n.match(/\uFFFD/)) return void p.onError(t.name + " is a binary file.");
if (void 0 === (n = h ? h(n) : n)) return void p.onError(t.name + " is not a valid HTML file.");
var i = t.name, r = i.lastIndexOf(".");
i = -1 !== r ? i.substring(0, r) : i;
var o = u.createFile(i, n);
u.selectFile(o);
};
}(e);
var o = e.slice(0, n.IMPORT_FILE_MAX_CONTENT_SIZE);
r.readAsText(o);
}
});
}
function s(t) {
h = void 0, a(t);
}
function l(t) {
h = m, a(t);
}
function c(t) {
t.stopPropagation(), t.preventDefault(), t.dataTransfer.dropEffect = "copy";
}
var u, d = new r("dialogOpenHarddrive", 'Dialog "Open from"');
d.onFileMgrCreated = function(t) {
u = t;
};
var p;
d.onEventMgrCreated = function(t) {
p = t;
};
var h, f, m = function(t) {
return f.makeMd(t);
};
return d.onReady = function() {
f = new o.converter(), t("#input-file-import-harddrive-markdown").change(s), t("#dropzone-import-harddrive-markdown, #wmd-input").each(function() {
this.addEventListener("dragover", c, !1), this.addEventListener("drop", s, !1);
}), t("#input-file-import-harddrive-html").change(l), t("#dropzone-import-harddrive-html").each(function() {
this.addEventListener("dragover", c, !1), this.addEventListener("drop", l, !1);
}), t(".action-convert-html").click(function(t) {
var e = i.getInputTextValue("#input-convert-html", t);
if (void 0 !== e) {
if (void 0 === (e = f.makeMd(e))) return void p.onError("Invalid HTML code.");
var n = u.createFile(void 0, e);
u.selectFile(n);
}
});
}, d;
}), define("extensions/documentTitle", [ "jquery", "underscore", "classes/Extension" ], function(t, e, n) {
var i, r, o = new n("documentTitle", "Document Title"), a = e.debounce(function(e) {
if (e === i) {
var n = i.title;
r.html(i.composeTitle(!0)), t(".file-title").text(n), t(".input-file-title").val(n);
}
}, 50);
return o.onFileSelected = function(t) {
i = t, a(t);
}, o.onTitleChanged = a, o.onSyncExportSuccess = a, o.onSyncRemoved = a, o.onNewPublishSuccess = a,
o.onPublishRemoved = a, o.onReady = a, o.onReady = function() {
r = t(".file-title-navbar"), r.hover(function() {
var t = r[0].scrollWidth - r.outerWidth();
r.stop(!0, !0).animate({
scrollLeft: t
}, 15 * t, "linear");
}, function() {
r.stop(!0, !0).scrollLeft(0);
}).click(function() {
r.stop(!0, !0).scrollLeft(0);
});
}, o;
}), define("classes/FileDescriptor", [ "underscore", "utils", "storage" ], function(t, e, n) {
function i(t, e, i, r) {
this.fileIndex = t, this._title = e || n[t + ".title"], this._editorScrollTop = parseInt(n[t + ".editorScrollTop"]) || 0,
this._editorStart = parseInt(n[t + ".editorEnd"]) || 0, this._editorEnd = parseInt(n[t + ".editorEnd"]) || 0,
this._previewScrollTop = parseInt(n[t + ".previewScrollTop"]) || 0, this._selectTime = parseInt(n[t + ".selectTime"]) || 0,
this._discussionList = JSON.parse(n[t + ".discussionList"] || "{}"), this.syncLocations = i || {},
this.publishLocations = r || {}, Object.defineProperty(this, "title", {
get: function() {
return this._title;
},
set: function(t) {
this._title = t, n[this.fileIndex + ".title"] = t;
}
}), Object.defineProperty(this, "content", {
get: function() {
return n[this.fileIndex + ".content"];
},
set: function(t) {
n[this.fileIndex + ".content"] = t;
}
}), Object.defineProperty(this, "editorScrollTop", {
get: function() {
return this._editorScrollTop;
},
set: function(t) {
this._editorScrollTop = t, n[this.fileIndex + ".editorScrollTop"] = t;
}
}), Object.defineProperty(this, "editorStart", {
get: function() {
return this._editorStart;
},
set: function(t) {
this._editorStart = t, n[this.fileIndex + ".editorStart"] = t;
}
}), Object.defineProperty(this, "editorEnd", {
get: function() {
return this._editorEnd;
},
set: function(t) {
this._editorEnd = t, n[this.fileIndex + ".editorEnd"] = t;
}
}), Object.defineProperty(this, "previewScrollTop", {
get: function() {
return this._previewScrollTop;
},
set: function(t) {
this._previewScrollTop = t, n[this.fileIndex + ".previewScrollTop"] = t;
}
}), Object.defineProperty(this, "selectTime", {
get: function() {
return this._selectTime;
},
set: function(t) {
this._selectTime = t, n[this.fileIndex + ".selectTime"] = t;
}
}), Object.defineProperty(this, "discussionList", {
get: function() {
return this._discussionList;
},
set: function(t) {
this._discussionList = t, n[this.fileIndex + ".discussionList"] = JSON.stringify(t);
}
}), Object.defineProperty(this, "discussionListJSON", {
get: function() {
return n[this.fileIndex + ".discussionList"] || "{}";
},
set: function(t) {
this._discussionList = JSON.parse(t), n[this.fileIndex + ".discussionList"] = t;
}
});
}
function r(t, e) {
t.push('<i class="icon-provider-' + e.provider.providerId + '"></i>');
}
function o(t, e) {
if (e.provider.getSyncLocationLink) {
var n = e.provider.getSyncLocationLink(e);
t.push([ '<a href="', n, '" target="_blank" title="Open in ', e.provider.providerName, '"><i class="icon-provider-', e.provider.providerId, '"></i><i class="icon-link-ext-alt"></i></a>' ].join(""));
} else r(t, e);
}
function a(t, e) {
if (e.provider.getPublishLocationLink) {
var n = e.provider.getPublishLocationLink(e);
t.push([ '<a href="', n, '" target="_blank" title="Open in ', e.provider.providerName, '"><i class="icon-provider-', e.provider.providerId, '"></i><i class="icon-link-ext-alt"></i></a>' ].join(""));
} else r(t, e);
}
return i.prototype.addSyncLocation = function(t) {
e.storeAttributes(t), e.appendIndexToArray(this.fileIndex + ".sync", t.syncIndex),
this.syncLocations[t.syncIndex] = t;
}, i.prototype.removeSyncLocation = function(t) {
e.removeIndexFromArray(this.fileIndex + ".sync", t.syncIndex), delete this.syncLocations[t.syncIndex];
}, i.prototype.addPublishLocation = function(t) {
e.storeAttributes(t), e.appendIndexToArray(this.fileIndex + ".publish", t.publishIndex),
this.publishLocations[t.publishIndex] = t;
}, i.prototype.removePublishLocation = function(t) {
e.removeIndexFromArray(this.fileIndex + ".publish", t.publishIndex), delete this.publishLocations[t.publishIndex];
}, i.prototype.composeTitle = function(e) {
var n = [], i = e ? o : r, s = e ? a : r;
return t.chain(this.syncLocations).sortBy(function(t) {
return t.provider.providerId;
}).each(function(t) {
i(n, t);
}), 0 !== t.size(this.syncLocations) && n.push('<i class="icon-refresh title-icon-category"></i>'),
t.chain(this.publishLocations).sortBy(function(t) {
return t.provider.providerId;
}).each(function(t) {
s(n, t);
}), 0 !== t.size(this.publishLocations) && n.push('<i class="icon-upload title-icon-category"></i>'),
n.push(t.escape(this.title)), n.join("");
}, i;
}), define("fileSystem", [ "underscore", "utils", "classes/FileDescriptor", "storage" ], function(t, e, n, i) {
var r = {};
return e.retrieveIndexArray("file.list").forEach(function(t) {
r[t] = new n(t);
}), Object.keys(i).forEach(function(t) {
var e = t.match(/(file\.\S+?)\.\S+/);
e && !r.hasOwnProperty(e[1]) && i.removeItem(t);
}), r;
}), define("text!html/documentSelectorSettingsBlock.html", [], function() {
return '<p>Allows toggling document with keyboard shortcuts.</p>\n<div class="form-horizontal">\n\t<div class="form-group">\n\t\t<label class="col-sm-5 control-label" for="select-document-selector-orderby">Order\n\t\t\tby</label>\n\t\t<div class="col-sm-6">\n\t\t\t<select id="select-document-selector-orderby" class="form-control">\n\t\t\t\t<option value="title">Document title</option>\n\t\t\t\t<option value="mru">Most recently used</option>\n\t\t\t</select>\n\t\t</div>\n\t</div>\n\t<div class="form-group">\n\t\t<label class="col-sm-5 control-label"\n\t\t\tfor="input-document-selector-shortcut-previous">"Previous"\n\t\t\tshortcut <a href="http://craig.is/killing/mice#keys" target="_blank">(?)</a></label>\n\t\t<div class="col-sm-6">\n\t\t\t<input type="text" id="input-document-selector-shortcut-previous"\n\t\t\t\tclass="form-control">\n\t\t</div>\n\t</div>\n\t<div class="form-group">\n\t\t<label class="col-sm-5 control-label"\n\t\t\tfor="input-document-selector-shortcut-next">"Next"\n\t\t\tshortcut <a href="http://craig.is/killing/mice#keys" target="_blank">(?)</a></label>\n\t\t<div class="col-sm-6">\n\t\t\t<input type="text" id="input-document-selector-shortcut-next"\n\t\t\t\tclass="form-control">\n\t\t</div>\n\t</div>\n</div>';
}), define("extensions/documentSelector", [ "jquery", "underscore", "crel", "utils", "classes/Extension", "mousetrap", "fileSystem", "text!html/documentSelectorSettingsBlock.html" ], function(t, e, 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(t, e) {
t.orderBy = i.getInputValue("#select-document-selector-orderby"), t.shortcutPrevious = i.getInputTextValue("#input-document-selector-shortcut-previous", e),
t.shortcutNext = i.getInputTextValue("#input-document-selector-shortcut-next", e);
};
var c;
l.onFileMgrCreated = function(t) {
c = t;
};
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 = e.debounce(function() {
var n = e.chain(a).sortBy(h).reduce(function(t, n) {
return t + e.template(v, {
fileDesc: n,
isCurrent: n === f
});
}, "").value();
u.innerHTML = n, p = [], d = {}, e.each(u.querySelectorAll("li"), function(e) {
var n = t(e);
p.push(n);
var i = a[n.data("fileIndex")];
d[i.fileIndex] = n;
});
}, 50);
return l.onFileSelected = function(t) {
f = t, 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 = t("#wmd-input"), "title" == l.config.orderBy ? h = function(t) {
return t.title.toLowerCase();
} : "mru" == l.config.orderBy && (h = function(t) {
return -t.selectTime;
}), u = n("ul", {
"class": "dropdown-menu dropdown-file-selector"
}), document.querySelector(".navbar").appendChild(n("div", n("div", {
"data-toggle": "dropdown"
}), u));
var i = t(u).dropdown(), r = t(".document-panel .collapse-button");
r.prop("title", e.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 t = e.indexOf(p, m) - 1;
return -2 === t && (t = -1), m = p[(t + 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 t = e.indexOf(p, m) + 1;
return m = p[t % 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 e = t(this.parentNode), n = a[e.data("fileIndex")];
e.hasClass("disabled") ? g.focus() : c.selectFile(n);
});
}, l;
}), define("classes/FolderDescriptor", [ "underscore", "utils", "storage", "fileSystem" ], function(t, e, n, i) {
function r(r, o) {
this.folderIndex = r, this._name = o || n[r + ".name"], this.fileList = {}, t.each(e.retrieveIndexArray(r + ".files"), function(t) {
try {
var n = i[t];
n.folder = this, this.fileList[t] = n;
} catch (n) {
e.removeIndexFromArray(r + ".files", t);
}
}, this), Object.defineProperty(this, "name", {
get: function() {
return this._name;
},
set: function(t) {
this._name = t, n[this.folderIndex + ".name"] = t;
}
});
}
return r.prototype.addFile = function(t) {
t.folder = this, e.appendIndexToArray(this.folderIndex + ".files", t.fileIndex),
this.fileList[t.fileIndex] = t;
}, r.prototype.removeFile = function(t) {
t.folder = void 0, e.removeIndexFromArray(this.folderIndex + ".files", t.fileIndex),
delete this.fileList[t.fileIndex];
}, r;
}), define("folderList", [ "underscore", "utils", "storage", "classes/FolderDescriptor", "storage" ], function(t, e, n, i) {
var r = {};
return e.retrieveIndexArray("folder.list").forEach(function(t) {
r[t] = new i(t);
}), Object.keys(n).forEach(function(t) {
var e = t.match(/(folder\.\S+?)\.\S+/);
e && !r.hasOwnProperty(e[1]) && n.removeItem(t);
}), r;
}), define("extensions/documentPanel", [ "jquery", "underscore", "utils", "classes/Extension", "folderList", "fileSystem" ], function(t, e, 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+/);
e.each(p.querySelectorAll(".file"), function(n) {
var r = t(n), o = r.text().toLowerCase();
r.toggle(!e.some(i, function(t) {
return -1 === o.indexOf(t);
}));
}), h.removeClass("hide"), d.addClass("hide");
}
}
var s, l = new i("documentPanel", "Document Panel");
l.onFileMgrCreated = function(t) {
s = t;
};
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 = e.debounce(function() {
var t = e.filter(o, function(t) {
return void 0 === t.folder;
}), n = e.chain(t).sortBy(function(t) {
return t.title.toLowerCase();
}).reduce(function(t, n) {
return t + "<li>" + e.template(g, {
fileDesc: n,
selectedFileDesc: f
}) + "</li>";
}, "").value();
n = n && '<ul class="nav">' + n + "</ul>", e.chain(r).sortBy(function(t) {
return t.name.toLowerCase();
}).each(function(t) {
var i = e.chain(t.fileList).sortBy(function(t) {
return t.title.toLowerCase();
}).reduce(function(t, n) {
return t + "<li>" + e.template(g, {
fileDesc: n,
selectedFileDesc: f
}) + "</li>";
}, "").value();
i = i && '<ul class="nav">' + i + "</ul>", n += e.template(m, {
folderDesc: t,
fileListHtml: i,
id: t.folderIndex.replace(".", "")
});
}), u.innerHTML = n;
var i = e.chain(o).sortBy(function(t) {
return t.title.toLowerCase();
}).reduce(function(t, n) {
return t + "<li>" + e.template(g, {
fileDesc: n,
selectedFileDesc: f
}) + "</li>";
}, "").value();
i = '<ul class="nav">' + i + "</ul>", p.innerHTML = i;
}, 50);
l.onFileSelected = function(t) {
f = t, 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 = t(u), p = c.querySelector(".document-list-filtered"),
h = t(p), t(c).on("show.layout.toggle", function() {
var e = f.folder;
void 0 !== e && t(c.querySelector(".file-list." + e.folderIndex.replace(".", ""))).collapse("show");
}).on("shown.layout.toggle", function() {
var t = u.querySelector(".file.active");
t && (b.scrollTop += t.getBoundingClientRect().top - 240);
}).on("hidden.layout.toggle", function() {
e.val(""), a("");
}).on("click", ".file", function() {
var e = t(this), n = o[e.data("fileIndex")];
n && n !== f && s.selectFile(n);
});
var e = t(c.querySelector(".search-bar .form-control"));
e.bind("propertychange keyup input paste", function() {
a(e.val());
});
}, l;
}), define("extensions/documentManager", [ "jquery", "underscore", "constants", "utils", "storage", "classes/Extension", "classes/FolderDescriptor", "folderList", "fileSystem" ], function(t, e, n, i, r, o, a, s, l) {
function c() {
D = [], I = [], e.each(v.querySelectorAll('input[type="checkbox"]:checked'), function(e) {
var n = t(e.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 === e.size(I)) return void d();
var n = e.chain(I).sortBy(function(t) {
return t.title.toLowerCase();
}).reduce(function(t, n) {
return t + e.template(T, {
fileDesc: n
});
}, "").value();
b.innerHTML = '<ul class="file-list nav">' + n + "</ul>", t(g.querySelectorAll(".document-list")).addClass("hide"),
t(g.querySelectorAll(".confirm-delete, .selected-document-list")).removeClass("hide");
}
function d() {
e.each(I, function(t) {
t.folder && t.folder.removeFile(t), p.deleteFile(t);
}), e.each(D, function(t) {
i.removeIndexFromArray("folder.list", t.folderIndex), delete s[t.folderIndex];
}), f.onFoldersChanged();
}
var p, h = new o("documentManager", "Document Manager", (!1), (!0));
h.onFileMgrCreated = function(t) {
p = t;
};
var f;
h.onEventMgrCreated = function(t) {
f = t;
};
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 = e.debounce(function() {
c(), y.toggleClass("disabled", 0 === e.size(s) || 0 === e.size(I)), x.toggleClass("disabled", 0 === e.size(D) && 0 === e.size(I));
}, 50), M = e.debounce(function() {
if (!1 !== m) {
N(), S.text(e.size(l)), C.text(e.size(s) + 1), w = e.filter(l, function(t) {
return void 0 === t.folder;
});
var t = [ '<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">', e.size(w), "</div>", '<div class="name"><i class="icon-folder"></i> ', "ROOT folder</div></a>" ].join(""), n = e.chain(w).sortBy(function(t) {
return t.title.toLowerCase();
}).reduce(function(t, n) {
return t + e.template(k, {
fileDesc: n
});
}, "").value();
n = n && '<ul class="nav">' + n + "</ul>", t += '<div class="file-list collapse root-folder clearfix">' + n + "</div>",
e.chain(s).sortBy(function(t) {
return t.name.toLowerCase();
}).each(function(n) {
var i = e.chain(n.fileList).sortBy(function(t) {
return t.title.toLowerCase();
}).reduce(function(t, n) {
return t + e.template(k, {
fileDesc: n
});
}, "").value();
i = i && '<ul class="nav">' + i + "</ul>", t += e.template(_, {
folderDesc: n,
fileListHtml: i,
id: n.folderIndex.replace(".", "")
});
}), v.innerHTML = t;
}
}, 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(e) {
!1 !== m && (t(v).find('[data-file-index="' + e.fileIndex + '"] .name').html(e.composeTitle()).removeClass("hide"),
t(v.querySelectorAll(".input-rename")).addClass("hide"));
}, h.onReady = function() {
g = document.querySelector(".modal-document-manager"), v = g.querySelector(".list-group.document-list"),
S = t(g.querySelectorAll(".document-count")), C = t(g.querySelectorAll(".folder-count")),
b = g.querySelector(".list-group.selected-document-list");
var o = g.querySelector(".list-group.select-folder-list");
t(g).on("show.bs.modal", function() {
m = !0, M(), setTimeout(function() {
t(v.querySelectorAll(".root-folder")).click();
}, 250);
}).on("hide.bs.modal", function() {
m = !1, v.innerHTML = "";
}), t(g.querySelectorAll(".action-create-folder")).click(function() {
var o;
do o = "folder." + i.id(); while (e.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 e = t(g.querySelector('[data-folder-index="' + o + '"] .button-rename')).click();
g.scrollTop += e.offset().top - 50;
}, 60);
}), t(g.querySelectorAll(".action-select-all")).click(function() {
t(v.querySelectorAll('.folder input[type="checkbox"]')).prop("checked", !0).change();
}), t(g.querySelectorAll(".action-unselect-all")).click(function() {
t(v.querySelectorAll('.folder input[type="checkbox"]')).prop("checked", !1).change();
});
var p = t(g.querySelectorAll(".action-delete-items")).click(function() {
x.hasClass("disabled") || (c(), u());
});
x = p.parent(), t(g.querySelectorAll(".action-delete-items-confirm")).click(function() {
d(), t(g.querySelectorAll(".document-list")).removeClass("hide"), t(g.querySelectorAll(".confirm-delete, .selected-document-list")).addClass("hide");
});
var h = t(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">', e.size(w), "</div>", '<div class="name"><i class="icon-forward"></i> ', "ROOT folder</div></a>" ].join("");
n += e.chain(s).sortBy(function(t) {
return t.name.toLowerCase();
}).reduce(function(t, n) {
return t + e.template(E, {
folderDesc: n
});
}, "").value(), o.innerHTML = n, e.each(o.querySelectorAll(".folder"), function(n) {
n = t(n), n.click(function() {
var i = s[n.data("folderIndex")];
e.each(I, function(t) {
t.folder && t.folder.removeFile(t), i && i.addFile(t);
}), f.onFoldersChanged(), t(g.querySelectorAll(".document-list")).removeClass("hide"),
t(g.querySelectorAll(".choose-folder, .select-folder-list")).addClass("hide");
});
}), t(g.querySelectorAll(".document-list")).addClass("hide"), t(g.querySelectorAll(".choose-folder, .select-folder-list")).removeClass("hide");
}
});
y = h.parent(), t(g.querySelectorAll(".action-cancel")).click(function() {
t(g.querySelectorAll(".document-list")).removeClass("hide"), t(g.querySelectorAll(".confirm-delete, .choose-folder, .selected-document-list, .select-folder-list")).addClass("hide");
}), t(v).on("click", ".button-delete", function(e) {
e.stopPropagation();
var n = t(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(e) {
e.stopPropagation();
var n, i = t(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(e) {
function n() {
var e = i.parent(), n = t.trim(i.val()), r = s[e.data("folderIndex")], o = l[e.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"), e.find(".name").removeClass("hide"));
}
var i = t(this);
void 0 === e.keyCode ? n() : 13 == e.keyCode ? (n(), e.stopPropagation()) : 27 == e.keyCode && (i.val(""),
n(), e.stopPropagation());
}).on("click", ".file .checkbox", function(t) {
t.stopPropagation();
}).on("change", ".file .checkbox input", function() {
t(this).parents(".file-list").prev().find(".checkbox input").prop("checked", !1),
N();
}).on("click", ".folder .checkbox", function(t) {
t.stopPropagation();
}).on("change", ".folder .checkbox input", function() {
t(this).parents(".folder").next().find(".checkbox input").prop("checked", this.checked),
N();
});
}, h;
}), define("extensions/workingIndicator", [ "jquery", "underscore", "crel", "classes/Extension" ], function(t, e, 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(t) {
r.toggleClass("working", t), o.toggleClass("hide", !t);
}, a.onReady = function() {
var i = "";
r = t(document.body), o = t('<div class="hide">'), t(".working-indicator").append(o);
for (var a = 0; a < 3; a++) {
var l = "working-indicator-bar" + a;
!function(t) {
t.z = Math.max(1 - (1 - t.alpha) / t.trail * (100 - t.start), t.alpha), i += e.template(s, e.extend({
prefix: ""
}, t)), i += e.template(s, e.extend({
prefix: "-webkit-"
}, t));
}({
name: l,
alpha: .25,
start: 20 * a,
trail: 50
});
var c = l + " 0.7s linear infinite";
o.append(t('<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(t) {
var e = function() {
return !1 === t.support.boxModel && t.support.objectAll && t.support.leadingWhitespace;
}();
t.jGrowl = function(e, n) {
0 == t("#jGrowl").size() && t('<div id="jGrowl"></div>').addClass(n && n.position ? n.position : t.jGrowl.defaults.position).appendTo("body"),
t("#jGrowl").jGrowl(e, n);
}, t.fn.jGrowl = function(e, n) {
if (t.isFunction(this.each)) {
var i = arguments;
return this.each(function() {
void 0 == t(this).data("jGrowl.instance") && (t(this).data("jGrowl.instance", t.extend(new t.fn.jGrowl(), {
notifications: [],
element: null,
interval: null
})), t(this).data("jGrowl.instance").startup(this)), t.isFunction(t(this).data("jGrowl.instance")[e]) ? t(this).data("jGrowl.instance")[e].apply(t(this).data("jGrowl.instance"), t.makeArray(i).slice(1)) : t(this).data("jGrowl.instance").create(e, n);
});
}
}, t.extend(t.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(e, n) {
var n = t.extend({}, this.defaults, n);
void 0 !== n.speed && (n.openDuration = n.speed, n.closeDuration = n.speed), this.notifications.push({
message: e,
options: n
}), n.log.apply(this.element, [ this.element, e, n ]);
},
render: function(e) {
var n = this, i = e.message, r = e.options;
r.themeState = "" == r.themeState ? "" : "ui-state-" + r.themeState;
var e = t("<div/>").addClass("jGrowl-notification " + r.themeState + " ui-corner-all" + (void 0 != r.group && "" != r.group ? " " + r.group : "")).append(t("<div/>").addClass("jGrowl-close").html(r.closeTemplate)).append(t("<div/>").addClass("jGrowl-header").html(r.header)).append(t("<div/>").addClass("jGrowl-message").html(i)).data("jGrowl", r).addClass(r.theme).children("div.jGrowl-close").bind("click.jGrowl", function() {
t(this).parent().trigger("jGrowl.beforeClose");
}).parent();
t(e).bind("mouseover.jGrowl", function() {
t("div.jGrowl-notification", n.element).data("jGrowl.pause", !0);
}).bind("mouseout.jGrowl", function() {
t("div.jGrowl-notification", n.element).data("jGrowl.pause", !1);
}).bind("jGrowl.beforeOpen", function() {
!1 !== r.beforeOpen.apply(e, [ e, i, r, n.element ]) && t(this).trigger("jGrowl.open");
}).bind("jGrowl.open", function() {
!1 !== r.open.apply(e, [ e, i, r, n.element ]) && ("after" == r.glue ? t("div.jGrowl-notification:last", n.element).after(e) : t("div.jGrowl-notification:first", n.element).before(e),
t(this).animate(r.animateOpen, r.openDuration, r.easing, function() {
!1 === t.support.opacity && this.style.removeAttribute("filter"), null !== t(this).data("jGrowl") && (t(this).data("jGrowl").created = new Date()),
t(this).trigger("jGrowl.afterOpen");
}));
}).bind("jGrowl.afterOpen", function() {
r.afterOpen.apply(e, [ e, i, r, n.element ]);
}).bind("jGrowl.beforeClose", function() {
!1 !== r.beforeClose.apply(e, [ e, i, r, n.element ]) && t(this).trigger("jGrowl.close");
}).bind("jGrowl.close", function() {
t(this).data("jGrowl.pause", !0), t(this).animate(r.animateClose, r.closeDuration, r.easing, function() {
t.isFunction(r.close) ? !1 !== r.close.apply(e, [ e, i, r, n.element ]) && t(this).remove() : t(this).remove();
});
}).trigger("jGrowl.beforeOpen"), "" != r.corners && void 0 != t.fn.corner && t(e).corner(r.corners),
t("div.jGrowl-notification:parent", n.element).size() > 1 && 0 == t("div.jGrowl-closer", n.element).size() && !1 !== this.defaults.closer && t(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() {
t(this).siblings().trigger("jGrowl.beforeClose"), t.isFunction(n.defaults.closer) && n.defaults.closer.apply(t(this).parent()[0], [ t(this).parent()[0] ]);
});
},
update: function() {
t(this.element).find("div.jGrowl-notification:parent").each(function() {
void 0 != t(this).data("jGrowl") && void 0 !== t(this).data("jGrowl").created && t(this).data("jGrowl").created.getTime() + parseInt(t(this).data("jGrowl").life) < new Date().getTime() && !0 !== t(this).data("jGrowl").sticky && (void 0 == t(this).data("jGrowl.pause") || !0 !== t(this).data("jGrowl.pause")) && t(this).trigger("jGrowl.beforeClose");
}), this.notifications.length > 0 && (0 == this.defaults.pool || t(this.element).find("div.jGrowl-notification:parent").size() < this.defaults.pool) && this.render(this.notifications.shift()),
t(this.element).find("div.jGrowl-notification:parent").size() < 2 && t(this.element).find("div.jGrowl-closer").animate(this.defaults.animateClose, this.defaults.speed, this.defaults.easing, function() {
t(this).remove();
});
},
startup: function(n) {
this.element = t(n).addClass("jGrowl").append('<div class="jGrowl-notification"></div>'),
this.interval = setInterval(function() {
t(n).data("jGrowl.instance").update();
}, parseInt(this.defaults.check)), e && t(this.element).addClass("ie6");
},
shutdown: function() {
t(this.element).removeClass("jGrowl").find("div.jGrowl-notification").trigger("jGrowl.close").parent().empty(),
clearInterval(this.interval);
},
close: function() {
t(this.element).find("div.jGrowl-notification").each(function() {
t(this).trigger("jGrowl.beforeClose");
});
}
}), t.jGrowl.defaults = t.fn.jGrowl.prototype.defaults;
}(jQuery), define("jgrowl", [ "jquery" ], function(t) {
return function() {
return t.jQuery.jGrowl;
};
}(this)), define("text!html/notificationsSettingsBlock.html", [], function() {
return '<p>Shows notification messages in the bottom-right corner of the\n\tscreen.</p>\n<div class="form-horizontal">\n\t<div class="form-group">\n\t\t<label class="col-sm-4 control-label" for="input-notifications-timeout">Timeout</label>\n\t\t<div class="col-sm-7 form-inline">\n\t\t\t<input type="text" id="input-notifications-timeout"\n\t\t\t\tclass="col-sm-5 form-control"> <span class="help-inline">ms</span>\n\t\t</div>\n\t</div>\n</div>';
}), define("extensions/notifications", [ "jquery", "underscore", "utils", "logger", "classes/Extension", "jgrowl", "text!html/notificationsSettingsBlock.html" ], function(t, e, 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(t, n, r) {
if (i.info(t), s(), t) {
var a = t.indexOf("|");
(-1 === a || (t = t.substring(0, a))) && (r = r || {}, n = n || "icon-info-circled",
o("<i class='icon-white " + n + "'></i> " + e.escape(t).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(t, e) {
t.timeout = n.getInputIntValue("#input-notifications-timeout", e, 1, 6e4);
};
var d, p, h = !1, f = !1;
u.onReady = function() {
f = !0, d = t(".navbar .offline-status"), p = t(".navbar .extension-buttons"), c();
}, u.onMessage = function(t) {
l(t);
}, u.onError = function(t) {
i.error(t), e.isString(t) ? l(t, "icon-attention") : e.isObject(t) && l(t.message, "icon-attention");
};
var m = !1;
return u.onOfflineChanged = function(t) {
m = t, c(), !0 === m ? l("You are offline.", "icon-attention-circled msg-offline") : l("You are back online!", "icon-signal");
}, u.onSyncImportSuccess = function(t, n) {
l(e.map(t, function(t) {
return t.title;
}).join(", ") + " imported successfully from " + n.providerName + ".");
}, u.onSyncExportSuccess = function(t, e) {
l('"' + t.title + '" will now be synchronized on ' + e.provider.providerName + ".");
}, u.onSyncRemoved = function(t, e) {
l(e.provider.providerName + " synchronized location has been removed.");
}, u.onPublishSuccess = function(t) {
l('"' + t.title + '" successfully published.');
}, u.onNewPublishSuccess = function(t, e) {
l('"' + t.title + '" is now published on ' + e.provider.providerName + ".");
}, u.onPublishRemoved = function(t, e) {
l(e.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(t) {
var e, n, i = "hasOwnProperty", r = /[\.\/]/, o = function() {}, a = function(t, e) {
return t - e;
}, s = {
n: {}
}, l = function(t, i) {
t = String(t);
var r, o = n, s = Array.prototype.slice.call(arguments, 2), c = l.listeners(t), u = 0, d = [], p = {}, h = [], f = e;
e = t, n = 0;
for (var m = 0, g = c.length; m < g; 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; m < g; 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, e = f, h.length ? h : null;
};
l._events = s, l.listeners = function(t) {
var e, n, i, o, a, l, c, u, d = t.split(r), p = s, h = [ p ], f = [];
for (o = 0, a = d.length; o < a; o++) {
for (u = [], l = 0, c = h.length; l < c; l++) for (p = h[l].n, n = [ p[d[o]], p["*"] ],
i = 2; i--; ) (e = n[i]) && (u.push(e), f = f.concat(e.f || []));
h = u;
}
return f;
}, l.on = function(t, e) {
if (t = String(t), "function" != typeof e) return function() {};
for (var n = t.split(r), i = s, a = 0, l = n.length; a < l; 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; a < l; a++) if (i.f[a] == e) return o;
return i.f.push(e), function(t) {
+t == +t && (e.zIndex = +t);
};
}, l.f = function(t) {
var e = [].slice.call(arguments, 1);
return function() {
l.apply(null, [ t, null ].concat(e).concat([].slice.call(arguments, 0)));
};
}, l.stop = function() {
n = 1;
}, l.nt = function(t) {
return t ? new RegExp("(?:\\.|\\/|^)" + t + "(?:\\.|\\/|$)").test(e) : e;
}, l.nts = function() {
return e.split(r);
}, l.off = l.unbind = function(t, e) {
if (!t) return void (l._events = s = {
n: {}
});
var n, o, a, c, u, d, p, h = t.split(r), f = [ s ];
for (c = 0, u = h.length; c < u; 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; c < u; c++) for (n = f[c]; n.n; ) {
if (e) {
if (n.f) {
for (d = 0, p = n.f.length; d < p; d++) if (n.f[d] == e) {
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; d < p; d++) if (m[d] == e) {
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(t, e) {
var n = function() {
return l.unbind(t, n), e.apply(this, arguments);
};
return l.on(t, 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;
}) : t.eve = l;
}(window || this), function(t, e) {
"function" == typeof define && define.amd ? define("raphael", [ "eve" ], function(n) {
return e(t, n);
}) : e(t, t.eve || "function" == typeof require && require("eve"));
}(this, function(t, e) {
function n(t) {
if (n.is(t, "function")) return x ? t() : e.on("raphael.DOMload", t);
if (n.is(t, V)) return n._engine.create[D](n, t.splice(0, 3 + n.is(t[0], z))).add(t);
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)) : e.on("raphael.DOMload", function() {
r.call(n._engine.create[D](n, i));
});
}
return n._engine.create[D](n, arguments);
}
function i(t) {
if ("function" == typeof t || Object(t) !== t) return t;
var e = new t.constructor();
for (var n in t) t[k](n) && (e[n] = i(t[n]));
return e;
}
function r(t, e) {
for (var n = 0, i = t.length; n < i; n++) if (t[n] === e) return t.push(t.splice(n, 1)[0]);
}
function o(t, e, 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] = t[D](e, o), n ? n(s[a]) : s[a]);
}
return i;
}
function a() {
return this.hex;
}
function s(t, e) {
for (var n = [], i = 0, r = t.length; r - 2 * !e > i; i += 2) {
var o = [ {
x: +t[i - 2],
y: +t[i - 1]
}, {
x: +t[i],
y: +t[i + 1]
}, {
x: +t[i + 2],
y: +t[i + 3]
}, {
x: +t[i + 4],
y: +t[i + 5]
} ];
e ? i ? r - 4 == i ? o[3] = {
x: +t[0],
y: +t[1]
} : r - 2 == i && (o[2] = {
x: +t[0],
y: +t[1]
}, o[3] = {
x: +t[2],
y: +t[3]
}) : o[0] = {
x: +t[r - 2],
y: +t[r - 1]
} : r - 4 == i ? o[3] = o[2] : i || (o[0] = {
x: +t[i],
y: +t[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(t, e, n, i, r) {
return t * (t * (-3 * e + 9 * n - 9 * i + 3 * r) + 6 * e - 12 * n + 6 * i) - 3 * e + 3 * n;
}
function c(t, e, n, i, r, o, a, s, c) {
null == c && (c = 1), c = c > 1 ? 1 : c < 0 ? 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; f < 12; f++) {
var m = u * d[f] + u, g = l(m, t, n, r, a), v = l(m, e, i, o, s), b = g * g + v * v;
h += p[f] * j.sqrt(b);
}
return u * h;
}
function u(t, e, n, i, r, o, a, s, l) {
if (!(l < 0 || c(t, e, n, i, r, o, a, s) < l)) {
var u, d = .5, p = 1 - d;
for (u = c(t, e, n, i, r, o, a, s, p); G(u - l) > .01; ) d /= 2, p += (u < l ? 1 : -1) * d,
u = c(t, e, n, i, r, o, a, s, p);
return p;
}
}
function d(t, e, n, i, r, o, a, s) {
if (!($(t, n) < q(r, a) || q(t, n) > $(r, a) || $(e, i) < q(o, s) || q(e, i) > $(o, s))) {
var l = (t * i - e * n) * (r - a) - (t - n) * (r * s - o * a), c = (t * i - e * n) * (o - s) - (e - i) * (r * s - o * a), u = (t - n) * (o - s) - (e - i) * (r - a);
if (u) {
var d = l / u, p = c / u, h = +d.toFixed(2), f = +p.toFixed(2);
if (!(h < +q(t, n).toFixed(2) || h > +$(t, n).toFixed(2) || h < +q(r, a).toFixed(2) || h > +$(r, a).toFixed(2) || f < +q(e, i).toFixed(2) || f > +$(e, i).toFixed(2) || f < +q(o, s).toFixed(2) || f > +$(o, s).toFixed(2))) return {
x: d,
y: p
};
}
}
}
function p(t, e, i) {
var r = n.bezierBBox(t), o = n.bezierBBox(e);
if (!n.isBBoxIntersect(r, o)) return i ? 0 : [];
for (var a = c.apply(0, t), s = c.apply(0, e), l = $(~~(a / 5), 1), u = $(~~(s / 5), 1), p = [], h = [], f = {}, m = i ? 0 : [], g = 0; g < l + 1; g++) {
var v = n.findDotsAtSegment.apply(n, t.concat(g / l));
p.push({
x: v.x,
y: v.y,
t: g / l
});
}
for (g = 0; g < u + 1; g++) v = n.findDotsAtSegment.apply(n, e.concat(g / u)), h.push({
x: v.x,
y: v.y,
t: g / u
});
for (g = 0; g < l; g++) for (var b = 0; b < u; b++) {
var y = p[g], x = p[g + 1], w = h[b], S = h[b + 1], C = G(x.x - y.x) < .001 ? "y" : "x", _ = G(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 + G((k[C] - y[C]) / (x[C] - y[C])) * (x.t - y.t), T = w.t + G((k[_] - w[_]) / (S[_] - w[_])) * (S.t - w.t);
E >= 0 && E <= 1.001 && T >= 0 && T <= 1.001 && (i ? m++ : m.push({
x: k.x,
y: k.y,
t1: q(E, 1),
t2: q(T, 1)
}));
}
}
return m;
}
function h(t, e, i) {
t = n._path2curve(t), e = n._path2curve(e);
for (var r, o, a, s, l, c, u, d, h, f, m = i ? 0 : [], g = 0, v = t.length; g < v; g++) {
var b = t[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 = e.length; y < x; y++) {
var w = e[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(t, e, n, i, r, o) {
null != t ? (this.a = +t, this.b = +e, 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(t, e, n, i, r, o) {
function a(t) {
return ((u * t + c) * t + l) * t;
}
function s(t, e) {
var n, i, r, o, s, d;
for (r = t, d = 0; d < 8; d++) {
if (o = a(r) - t, G(o) < e) return r;
if (s = (3 * u * r + 2 * c) * r + l, G(s) < 1e-6) break;
r -= o / s;
}
if (n = 0, i = 1, (r = t) < n) return n;
if (r > i) return i;
for (;n < i; ) {
if (o = a(r), G(o - t) < e) return r;
t > o ? n = r : i = r, r = (i - n) / 2 + n;
}
return r;
}
var l = 3 * e, c = 3 * (i - e) - l, u = 1 - l - c, d = 3 * n, p = 3 * (r - n) - d, h = 1 - d - p;
return function(t, e) {
var n = s(t, e);
return ((h * n + p) * n + d) * n;
}(t, 1 / (200 * o));
}
function v(t, e) {
var n = [], i = {};
if (this.ms = e, this.times = 1, t) {
for (var r in t) t[k](r) && (i[J(r)] = t[r], n.push(J(r)));
n.sort(ut);
}
this.anim = i, this.top = n[n.length - 1], this.percents = n;
}
function b(t, i, r, o, a, s) {
r = J(r);
var l, c, u, d, p, h, m = t.ms, v = {}, b = {}, y = {};
if (o) for (w = 0, C = se.length; w < C; w++) {
var x = se[w];
if (x.el.id == i.id && x.anim == t) {
x.percent != r ? (se.splice(w, 1), u = 1) : c = x, i.attr(x.totalOrigin);
break;
}
} else o = +b;
for (var w = 0, C = t.percents.length; w < C; w++) {
if (t.percents[w] == r || t.percents[w] > o * t.top) {
r = t.percents[w], p = t.percents[w - 1] || 0, m = m / t.top * (r - p), d = t.percents[w + 1],
l = t.anim[r];
break;
}
o && i.attr(t.anim[t.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[_] = et[_]), 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; w < C; w++) {
y[_][w] = [ 0 ];
for (var D = 1, M = v[_][w].length; D < M; 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; w < C; w++) for (y[_][w] = [ v[_][w][0] ],
D = 1, M = v[_][w].length; D < M; 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, q = n.easing_formulas[$];
if (!q) if ((q = R($).match(Y)) && 5 == q.length) {
var G = q;
q = function(t) {
return g(t, +G[1], +G[2], +G[3], +G[4], m);
};
} else q = pt;
if (h = l.start || t.start || +new Date(), x = {
anim: t,
percent: r,
timestamp: h,
start: h + (t.del || 0),
status: 0,
initstatus: o || 0,
stop: !1,
ms: m,
easing: q,
from: v,
diff: y,
to: b,
el: i,
callback: l.callback,
prev: p,
next: d,
repeat: s || t.times,
origin: i.attr(),
totalOrigin: a
}, se.push(x), o && !c && !u && (x.stop = !0, x.start = new Date() - m * o, 1 == se.length)) return ce();
u && (x.start = new Date() - x.ms * o), 1 == se.length && le(ce);
}
e("raphael.anim.start." + i.id, i, t);
}
}
function y(t) {
for (var e = 0; e < se.length; e++) se[e].el.paper == t && se.splice(e--, 1);
}
n.version = "2.1.2", n.eve = e;
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: t
}, 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, q = j.min, G = 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, tt = R.prototype.toUpperCase, et = 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(t, e) {
return J(t) - J(e);
}, dt = function() {}, pt = function(t) {
return t;
}, ht = n._rectPath = function(t, e, n, i, r) {
return r ? [ [ "M", t + r, e ], [ "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", t, e ], [ "l", n, 0 ], [ "l", 0, i ], [ "l", -n, 0 ], [ "z" ] ];
}, ft = function(t, e, n, i) {
return null == i && (i = n), [ [ "M", t, e ], [ "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(t) {
return t.attr("path");
},
circle: function(t) {
var e = t.attrs;
return ft(e.cx, e.cy, e.r);
},
ellipse: function(t) {
var e = t.attrs;
return ft(e.cx, e.cy, e.rx, e.ry);
},
rect: function(t) {
var e = t.attrs;
return ht(e.x, e.y, e.width, e.height, e.r);
},
image: function(t) {
var e = t.attrs;
return ht(e.x, e.y, e.width, e.height);
},
text: function(t) {
var e = t._getBBox();
return ht(e.x, e.y, e.width, e.height);
},
set: function(t) {
var e = t._getBBox();
return ht(e.x, e.y, e.width, e.height);
}
}, gt = n.mapPath = function(t, e) {
if (!e) return t;
var n, i, r, o, a, s, l;
for (t = Pt(t), r = 0, a = t.length; r < a; r++) for (l = t[r], o = 1, s = l.length; o < s; o += 2) n = e.x(l[o], l[o + 1]),
i = e.y(l[o], l[o + 1]), l[o] = n, l[o + 1] = i;
return t;
};
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(t, e) {
return e = B.call(e), "finite" == e ? !Q[k](+t) : "array" == e ? t instanceof Array : "null" == e && null === t || e == typeof t && null !== t || "object" == e && t === Object(t) || "array" == e && Array.isArray && Array.isArray(t) || W.call(t).slice(8, -1).toLowerCase() == e;
}, n.angle = function(t, e, i, r, o, a) {
if (null == o) {
var s = t - i, l = e - r;
return s || l ? (180 + 180 * j.atan2(-l, -s) / U + 360) % 360 : 0;
}
return n.angle(t, e, o, a) - n.angle(i, r, o, a);
}, n.rad = function(t) {
return t % 360 * U / 180;
}, n.deg = function(t) {
return Math.round(180 * t / U % 360 * 1e3) / 1e3;
}, n.snapTo = function(t, e, i) {
if (i = n.is(i, "finite") ? i : 10, n.is(t, V)) {
for (var r = t.length; r--; ) if (G(t[r] - e) <= i) return t[r];
} else {
t = +t;
var o = e % t;
if (o < i) return e - o;
if (o > t - i) return e - o + t;
}
return e;
}, n.createUUID = function(t, e) {
return function() {
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(t, e).toUpperCase();
};
}(/[xy]/g, function(t) {
var e = 16 * j.random() | 0;
return ("x" == t ? e : 3 & e | 8).toString(16);
}), n.setWindow = function(t) {
e("raphael.setWindow", n, E.win, t), E.win = t, E.doc = E.win.document, n._engine.initWin && n._engine.initWin(E.win);
};
var yt = function(t) {
if (n.vml) {
var e, i = /^\s+|\s+$/g;
try {
var r = new ActiveXObject("htmlfile");
r.write("<body>"), r.close(), e = r.body;
} catch (t) {
e = createPopup().document.body;
}
var a = e.createTextRange();
yt = o(function(t) {
try {
e.style.color = R(t).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 (t) {
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(t) {
return s.style.color = t, E.doc.defaultView.getComputedStyle(s, L).getPropertyValue("color");
});
}
return yt(t);
}, 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(t, e, i) {
if (null == e && n.is(t, "object") && "r" in t && "g" in t && "b" in t && (i = t.b,
e = t.g, t = t.r), null == e && n.is(t, "string")) {
var r = n.getRGB(t);
t = r.r, e = r.g, i = r.b;
}
return (t > 1 || e > 1 || i > 1) && (t /= 255, e /= 255, i /= 255), [ t, e, i ];
}, _t = function(t, e, i, r) {
t *= 255, e *= 255, i *= 255;
var o = {
r: t,
g: e,
b: i,
hex: n.rgb(t, e, i),
toString: St
};
return n.is(r, "finite") && (o.opacity = r), o;
};
n.color = function(t) {
var e;
return n.is(t, "object") && "h" in t && "s" in t && "b" in t ? (e = n.hsb2rgb(t),
t.r = e.r, t.g = e.g, t.b = e.b, t.hex = e.hex) : n.is(t, "object") && "h" in t && "s" in t && "l" in t ? (e = n.hsl2rgb(t),
t.r = e.r, t.g = e.g, t.b = e.b, t.hex = e.hex) : (n.is(t, "string") && (t = n.getRGB(t)),
n.is(t, "object") && "r" in t && "g" in t && "b" in t ? (e = n.rgb2hsl(t), t.h = e.h,
t.s = e.s, t.l = e.l, e = n.rgb2hsb(t), t.v = e.b) : (t = {
hex: "none"
}, t.r = t.g = t.b = t.h = t.s = t.v = t.l = -1)), t.toString = St, t;
}, n.hsb2rgb = function(t, e, n, i) {
this.is(t, "object") && "h" in t && "s" in t && "b" in t && (n = t.b, e = t.s, i = t.o,
t = t.h), t *= 360;
var r, o, a, s, l;
return t = t % 360 / 60, l = n * e, s = l * (1 - G(t % 2 - 1)), r = o = a = n - l,
t = ~~t, r += [ l, s, 0, 0, s, l ][t], o += [ s, l, l, s, 0, 0 ][t], a += [ 0, 0, s, l, l, s ][t],
_t(r, o, a, i);
}, n.hsl2rgb = function(t, e, n, i) {
this.is(t, "object") && "h" in t && "s" in t && "l" in t && (n = t.l, e = t.s, t = t.h),
(t > 1 || e > 1 || n > 1) && (t /= 360, e /= 100, n /= 100), t *= 360;
var r, o, a, s, l;
return t = t % 360 / 60, l = 2 * e * (n < .5 ? n : 1 - n), s = l * (1 - G(t % 2 - 1)),
r = o = a = n - l / 2, t = ~~t, r += [ l, s, 0, 0, s, l ][t], o += [ s, l, l, s, 0, 0 ][t],
a += [ 0, 0, s, l, l, s ][t], _t(r, o, a, i);
}, n.rgb2hsb = function(t, e, n) {
n = Ct(t, e, n), t = n[0], e = n[1], n = n[2];
var i, r, o, a;
return o = $(t, e, n), a = o - q(t, e, n), i = 0 == a ? null : o == t ? (e - n) / a : o == e ? (n - t) / a + 2 : (t - e) / 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(t, e, n) {
n = Ct(t, e, n), t = n[0], e = n[1], n = n[2];
var i, r, o, a, s, l;
return a = $(t, e, n), s = q(t, e, n), l = a - s, i = 0 == l ? null : a == t ? (e - n) / l : a == e ? (n - t) / l + 2 : (t - e) / l + 4,
i = (i + 360) % 6 * 60 / 360, o = (a + s) / 2, r = 0 == l ? 0 : o < .5 ? 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(t, e) {
var n = E.doc.createElement("img");
n.style.cssText = "position:absolute;left:-9999em;top:-9999em", n.onload = function() {
e.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 = t;
}, n.getRGB = o(function(t) {
if (!t || (t = R(t)).indexOf("-") + 1) return {
r: -1,
g: -1,
b: -1,
hex: "none",
error: 1,
toString: a
};
if ("none" == t) return {
r: -1,
g: -1,
b: -1,
hex: "none",
toString: a
};
!(rt[k](t.toLowerCase().substring(0, 2)) || "#" == t.charAt()) && (t = yt(t));
var e, i, r, o, s, l, c = t.match(X);
return c ? (c[2] && (r = Z(c[2].substring(5), 16), i = Z(c[2].substring(3, 5), 16),
e = 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), e = Z((s = c[3].charAt(1)) + s, 16)), c[4] && (l = c[4][P](it),
e = J(l[0]), "%" == l[0].slice(-1) && (e *= 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), e = J(l[0]),
"%" == l[0].slice(-1) && (e *= 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)) && (e /= 360),
"hsba" == c[1].toLowerCase().slice(0, 4) && (o = J(l[3])), l[3] && "%" == l[3].slice(-1) && (o /= 100),
n.hsb2rgb(e, i, r, o)) : c[6] ? (l = c[6][P](it), e = J(l[0]), "%" == l[0].slice(-1) && (e *= 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)) && (e /= 360), "hsla" == c[1].toLowerCase().slice(0, 4) && (o = J(l[3])),
l[3] && "%" == l[3].slice(-1) && (o /= 100), n.hsl2rgb(e, i, r, o)) : (c = {
r: e,
g: i,
b: r,
toString: a
}, c.hex = "#" + (16777216 | r | i << 8 | e << 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(t, e, i) {
return n.hsb2rgb(t, e, i).hex;
}), n.hsl = o(function(t, e, i) {
return n.hsl2rgb(t, e, i).hex;
}), n.rgb = o(function(t, e, n) {
return "#" + (16777216 | n | e << 8 | t << 16).toString(16).slice(1);
}), n.getColor = function(t) {
var e = this.getColor.start = this.getColor.start || {
h: 0,
s: 1,
b: t || .75
}, n = this.hsb2rgb(e.h, e.s, e.b);
return e.h += .075, e.h > 1 && (e.h = 0, e.s -= .2, e.s <= 0 && (this.getColor.start = {
h: 0,
s: 1,
b: e.b
})), n.hex;
}, n.getColor.reset = function() {
delete this.start;
}, n.parsePathString = function(t) {
if (!t) return null;
var e = kt(t);
if (e.arr) return Tt(e.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(t, V) && n.is(t[0], V) && (r = Tt(t)), r.length || R(t).replace(at, function(t, e, n) {
var o = [], a = e.toLowerCase();
if (n.replace(lt, function(t, e) {
e && o.push(+e);
}), "m" == a && o.length > 2 && (r.push([ e ][N](o.splice(0, 2))), a = "l", e = "m" == e ? "l" : "L"),
"r" == a) r.push([ e ][N](o)); else for (;o.length >= i[a] && (r.push([ e ][N](o.splice(0, i[a]))),
i[a]); ) ;
}), r.toString = n._path2string, e.arr = Tt(r), r;
}, n.parseTransformString = o(function(t) {
if (!t) return null;
var e = [];
return n.is(t, V) && n.is(t[0], V) && (e = Tt(t)), e.length || R(t).replace(st, function(t, n, i) {
var r = [];
B.call(n), i.replace(lt, function(t, e) {
e && r.push(+e);
}), e.push([ n ][N](r));
}), e.toString = n._path2string, e;
});
var kt = function(t) {
var e = kt.ps = kt.ps || {};
return e[t] ? e[t].sleep = 100 : e[t] = {
sleep: 100
}, setTimeout(function() {
for (var n in e) e[k](n) && n != t && !--e[n].sleep && delete e[n];
}), e[t];
};
n.findDotsAtSegment = function(t, e, 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 * t + 3 * d * l * n + 3 * c * l * l * r + h * a, m = u * e + 3 * d * l * i + 3 * c * l * l * o + h * s, g = t + 2 * l * (n - t) + p * (r - 2 * n + t), v = e + 2 * l * (i - e) + p * (o - 2 * i + e), b = n + 2 * l * (r - n) + p * (a - 2 * r + n), y = i + 2 * l * (o - i) + p * (s - 2 * o + i), x = c * t + l * n, w = c * e + l * i, S = c * r + l * a, C = c * o + l * s, _ = 90 - 180 * j.atan2(g - b, v - y) / U;
return (g > b || v < y) && (_ += 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(t, e, i, r, o, a, s, l) {
n.is(t, "array") || (t = [ t, e, i, r, o, a, s, l ]);
var c = Rt.apply(null, t);
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(t, e, n) {
return e >= t.x && e <= t.x2 && n >= t.y && n <= t.y2;
}, n.isBBoxIntersect = function(t, e) {
var i = n.isPointInsideBBox;
return i(e, t.x, t.y) || i(e, t.x2, t.y) || i(e, t.x, t.y2) || i(e, t.x2, t.y2) || i(t, e.x, e.y) || i(t, e.x2, e.y) || i(t, e.x, e.y2) || i(t, e.x2, e.y2) || (t.x < e.x2 && t.x > e.x || e.x < t.x2 && e.x > t.x) && (t.y < e.y2 && t.y > e.y || e.y < t.y2 && e.y > t.y);
}, n.pathIntersection = function(t, e) {
return h(t, e);
}, n.pathIntersectionNumber = function(t, e) {
return h(t, e, 1);
}, n.isPointInsidePath = function(t, e, i) {
var r = n.pathBBox(t);
return n.isPointInsideBBox(r, e, i) && h(t, [ [ "M", e, i ], [ "H", r.x2 + 10 ] ], 1) % 2 == 1;
}, n._removedFactory = function(t) {
return function() {
e("raphael.log", null, "Rapha\xebl: you are calling to method \u201c" + t + "\u201d of removed object", t);
};
};
var Et = n.pathBBox = function(t) {
var e = kt(t);
if (e.bbox) return i(e.bbox);
if (!t) return {
x: 0,
y: 0,
width: 0,
height: 0,
x2: 0,
y2: 0
};
t = Pt(t);
for (var n, r = 0, o = 0, a = [], s = [], l = 0, c = t.length; l < c; l++) if (n = t[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 = q[D](0, a), p = q[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 e.bbox = i(v), v;
}, Tt = function(t) {
var e = i(t);
return e.toString = n._path2string, e;
}, It = n._pathToRelative = function(t) {
var e = kt(t);
if (e.rel) return Tt(e.rel);
n.is(t, V) && n.is(t && t[0], V) || (t = n.parsePathString(t));
var i = [], r = 0, o = 0, a = 0, s = 0, l = 0;
"M" == t[0][0] && (r = t[0][1], o = t[0][2], a = r, s = o, l++, i.push([ "M", r, o ]));
for (var c = l, u = t.length; c < u; c++) {
var d = i[c] = [], p = t[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; h < f; 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; m < g; 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, e.rel = Tt(i), i;
}, Dt = n._pathToAbsolute = function(t) {
var e = kt(t);
if (e.abs) return Tt(e.abs);
if (n.is(t, V) && n.is(t && t[0], V) || (t = n.parsePathString(t)), !t || !t.length) return [ [ "M", 0, 0 ] ];
var i = [], r = 0, o = 0, a = 0, l = 0, c = 0;
"M" == t[0][0] && (r = +t[0][1], o = +t[0][2], a = r, l = o, c++, i[0] = [ "M", r, o ]);
for (var u, d, p = 3 == t.length && "M" == t[0][0] && "R" == t[1][0].toUpperCase() && "Z" == t[2][0].toUpperCase(), h = c, f = t.length; h < f; h++) {
if (i.push(u = []), d = t[h], d[0] != tt.call(d[0])) switch (u[0] = tt.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; g < v; 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; g < v; 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; b < y; 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, e.abs = Tt(i), i;
}, Nt = function(t, e, n, i) {
return [ t, e, n, i, n, i ];
}, Mt = function(t, e, n, i, r, o) {
return [ 1 / 3 * t + 2 / 3 * n, 1 / 3 * e + 2 / 3 * i, 1 / 3 * r + 2 / 3 * n, 1 / 3 * o + 2 / 3 * i, r, o ];
}, Lt = function(t, e, n, i, r, a, s, l, c, u) {
var d, p = 120 * U / 180, h = U / 180 * (+r || 0), f = [], m = o(function(t, e, n) {
return {
x: t * j.cos(n) - e * j.sin(n),
y: t * j.sin(n) + e * j.cos(n)
};
});
if (u) _ = u[0], k = u[1], S = u[2], C = u[3]; else {
d = m(t, e, -h), t = d.x, e = 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), (t - l) / 2), v = (e - 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(G((y * x - y * v * v - x * g * g) / (y * v * v + x * g * g))), S = w * n * v / i + (t + l) / 2, C = w * -i * g / n + (e + c) / 2, _ = j.asin(((e - C) / i).toFixed(9)), k = j.asin(((c - C) / i).toFixed(9));
_ = t < S ? U - _ : _, k = l < S ? U - k : k, _ < 0 && (_ = 2 * U + _), k < 0 && (k = 2 * U + k),
s && _ > k && (_ -= 2 * U), !s && k > _ && (k -= 2 * U);
}
var E = k - _;
if (G(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, $ = [ t, e ], q = [ t + F * L, e - B * M ], H = [ l + F * R, c - B * A ], z = [ l, c ];
if (q[0] = 2 * $[0] - q[0], q[1] = 2 * $[1] - q[1], u) return [ q, H, z ][N](f);
f = [ q, H, z ][N](f).join()[P](",");
for (var V = [], W = 0, X = f.length; W < X; 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(t, e, n, i, r, o, a, s, l) {
var c = 1 - l;
return {
x: H(c, 3) * t + 3 * H(c, 2) * l * n + 3 * c * l * l * r + H(l, 3) * a,
y: H(c, 3) * e + 3 * H(c, 2) * l * i + 3 * c * l * l * o + H(l, 3) * s
};
}, Rt = o(function(t, e, n, i, r, o, a, s) {
var l, c = r - 2 * n + t - (a - 2 * r + n), u = 2 * (n - t) - 2 * (r - n), d = t - n, p = (-u + j.sqrt(u * u - 4 * c * d)) / 2 / c, h = (-u - j.sqrt(u * u - 4 * c * d)) / 2 / c, f = [ e, s ], m = [ t, a ];
return G(p) > "1e12" && (p = .5), G(h) > "1e12" && (h = .5), p > 0 && p < 1 && (l = At(t, e, n, i, r, o, a, s, p),
m.push(l.x), f.push(l.y)), h > 0 && h < 1 && (l = At(t, e, n, i, r, o, a, s, h),
m.push(l.x), f.push(l.y)), c = o - 2 * i + e - (s - 2 * o + i), u = 2 * (i - e) - 2 * (o - i),
d = e - i, p = (-u + j.sqrt(u * u - 4 * c * d)) / 2 / c, h = (-u - j.sqrt(u * u - 4 * c * d)) / 2 / c,
G(p) > "1e12" && (p = .5), G(h) > "1e12" && (h = .5), p > 0 && p < 1 && (l = At(t, e, n, i, r, o, a, s, p),
m.push(l.x), f.push(l.y)), h > 0 && h < 1 && (l = At(t, e, n, i, r, o, a, s, h),
m.push(l.x), f.push(l.y)), {
min: {
x: q[D](0, m),
y: q[D](0, f)
},
max: {
x: $[D](0, m),
y: $[D](0, f)
}
};
}), Pt = n._path2curve = o(function(t, e) {
var n = !e && kt(t);
if (!e && n.curve) return Tt(n.curve);
for (var i = Dt(t), r = e && Dt(e), 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(t, e, n) {
var i, r, o = {
T: 1,
Q: 1
};
if (!t) return [ "C", e.x, e.y, e.x, e.y, e.x, e.y ];
switch (!(t[0] in o) && (e.qx = e.qy = null), t[0]) {
case "M":
e.X = t[1], e.Y = t[2];
break;
case "A":
t = [ "C" ][N](Lt[D](0, [ e.x, e.y ][N](t.slice(1))));
break;
case "S":
"C" == n || "S" == n ? (i = 2 * e.x - e.bx, r = 2 * e.y - e.by) : (i = e.x, r = e.y),
t = [ "C", i, r ][N](t.slice(1));
break;
case "T":
"Q" == n || "T" == n ? (e.qx = 2 * e.x - e.qx, e.qy = 2 * e.y - e.qy) : (e.qx = e.x,
e.qy = e.y), t = [ "C" ][N](Mt(e.x, e.y, e.qx, e.qy, t[1], t[2]));
break;
case "Q":
e.qx = t[1], e.qy = t[2], t = [ "C" ][N](Mt(e.x, e.y, t[1], t[2], t[3], t[4]));
break;
case "L":
t = [ "C" ][N](Nt(e.x, e.y, t[1], t[2]));
break;
case "H":
t = [ "C" ][N](Nt(e.x, e.y, t[1], e.y));
break;
case "V":
t = [ "C" ][N](Nt(e.x, e.y, e.x, t[1]));
break;
case "Z":
t = [ "C" ][N](Nt(e.x, e.y, e.X, e.Y));
}
return t;
}), l = function(t, e) {
if (t[e].length > 7) {
t[e].shift();
for (var n = t[e]; n.length; ) u[e] = "A", r && (d[e] = "A"), t.splice(e++, 0, [ "C" ][N](n.splice(0, 6)));
t.splice(e, 1), m = $(i.length, r && r.length || 0);
}
}, c = function(t, e, n, o, a) {
t && e && "M" == t[a][0] && "M" != e[a][0] && (e.splice(a, 0, [ "M", o.x, o.y ]),
n.bx = 0, n.by = 0, n.x = t[a][1], n.y = t[a][2], m = $(i.length, r && r.length || 0));
}, u = [], d = [], p = "", h = "", f = 0, m = $(i.length, r && r.length || 0); f < m; 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(t) {
for (var e = [], i = 0, r = t.length; i < r; i++) {
var o = {}, a = t[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] + "%"), e.push(o);
}
for (i = 1, r = e.length - 1; i < r; i++) if (!e[i].offset) {
for (var s = J(e[i - 1].offset || 0), l = 0, c = i + 1; c < r; c++) if (e[c].offset) {
l = e[c].offset;
break;
}
l || (l = 100, c = r), l = J(l);
for (var u = (l - s) / (c - i + 1); i < c; i++) s += u, e[i].offset = s + "%";
}
return e;
}), n._tear = function(t, e) {
t == e.top && (e.top = t.prev), t == e.bottom && (e.bottom = t.next), t.next && (t.next.prev = t.prev),
t.prev && (t.prev.next = t.next);
}), Ft = (n._tofront = function(t, e) {
e.top !== t && (Ot(t, e), t.next = null, t.prev = e.top, e.top.next = t, e.top = t);
}, n._toback = function(t, e) {
e.bottom !== t && (Ot(t, e), t.next = e.bottom, t.prev = null, e.bottom.prev = t,
e.bottom = t);
}, n._insertafter = function(t, e, n) {
Ot(t, n), e == n.top && (n.top = t), e.next && (e.next.prev = t), t.next = e.next,
t.prev = e, e.next = t;
}, n._insertbefore = function(t, e, n) {
Ot(t, n), e == n.bottom && (n.bottom = t), e.prev && (e.prev.next = t), t.prev = e.prev,
e.prev = t, t.next = e;
}, n.toMatrix = function(t, e) {
var n = Et(t), i = {
_: {
transform: L
},
getBBox: function() {
return n;
}
};
return Bt(i, e), i.matrix;
}), Bt = (n.transformPath = function(t, e) {
return gt(t, Ft(t, e));
}, n._extractTransform = function(t, e) {
if (null == e) return t._.transform;
e = R(e).replace(/\.{3}|\u2026/g, t._.transform || L);
var i = n.parseTransformString(e), r = 0, o = 0, a = 0, s = 1, l = 1, c = t._, u = new f();
if (c.transform = i || [], i) for (var d = 0, p = i.length; d < p; 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 || t.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 || t.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, t.matrix = u;
}
t.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(t) {
var e = t[0];
switch (e.toLowerCase()) {
case "t":
return [ e, 0, 0 ];
case "m":
return [ e, 1, 0, 0, 1, 0, 0 ];
case "r":
return 4 == t.length ? [ e, 0, t[2], t[3] ] : [ e, 0 ];
case "s":
return 5 == t.length ? [ e, 1, 1, t[3], t[4] ] : 3 == t.length ? [ e, 1, 1 ] : [ e, 1 ];
}
}, $t = n._equaliseTransform = function(t, e) {
e = R(e).replace(/\.{3}|\u2026/g, t), t = n.parseTransformString(t) || [], e = n.parseTransformString(e) || [];
for (var i, r, o, a, s = $(t.length, e.length), l = [], c = [], u = 0; u < s; u++) {
if (o = t[u] || jt(e[u]), a = e[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); i < r; 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(t, e, i, r) {
var o;
if (null != (o = null != r || n.is(t, "object") ? t : E.doc.getElementById(t))) return o.tagName ? null == e ? {
container: o,
width: o.style.pixelWidth || o.offsetWidth,
height: o.style.pixelHeight || o.offsetHeight
} : {
container: o,
width: e,
height: i
} : {
container: 1,
x: t,
y: e,
width: i,
height: r
};
}, n.pathToRelative = It, n._engine = {}, n.path2curve = Pt, n.matrix = function(t, e, n, i, r, o) {
return new f(t, e, n, i, r, o);
}, function(t) {
function e(t) {
return t[0] * t[0] + t[1] * t[1];
}
function i(t) {
var n = j.sqrt(e(t));
t[0] && (t[0] /= n), t[1] && (t[1] /= n);
}
t.add = function(t, e, 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 = [ [ t, n, r ], [ e, i, o ], [ 0, 0, 1 ] ];
for (t && t instanceof f && (p = [ [ t.a, t.c, t.e ], [ t.b, t.d, t.f ], [ 0, 0, 1 ] ]),
a = 0; a < 3; a++) for (s = 0; s < 3; s++) {
for (c = 0, l = 0; l < 3; 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];
}, t.invert = function() {
var t = this, e = t.a * t.d - t.b * t.c;
return new f(t.d / e, -t.b / e, -t.c / e, t.a / e, (t.c * t.f - t.d * t.e) / e, (t.b * t.e - t.a * t.f) / e);
}, t.clone = function() {
return new f(this.a, this.b, this.c, this.d, this.e, this.f);
}, t.translate = function(t, e) {
this.add(1, 0, 0, 1, t, e);
}, t.scale = function(t, e, n, i) {
null == e && (e = t), (n || i) && this.add(1, 0, 0, 1, n, i), this.add(t, 0, 0, e, 0, 0),
(n || i) && this.add(1, 0, 0, 1, -n, -i);
}, t.rotate = function(t, e, i) {
t = n.rad(t), e = e || 0, i = i || 0;
var r = +j.cos(t).toFixed(9), o = +j.sin(t).toFixed(9);
this.add(r, o, -o, r, e, i), this.add(1, 0, 0, 1, -e, -i);
}, t.x = function(t, e) {
return t * this.a + e * this.c + this.e;
}, t.y = function(t, e) {
return t * this.b + e * this.d + this.f;
}, t.get = function(t) {
return +this[R.fromCharCode(97 + t)].toFixed(4);
}, t.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();
}, t.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')";
}, t.offset = function() {
return [ this.e.toFixed(4), this.f.toFixed(4) ];
}, t.split = function() {
var t = {};
t.dx = this.e, t.dy = this.f;
var r = [ [ this.a, this.c ], [ this.b, this.d ] ];
t.scalex = j.sqrt(e(r[0])), i(r[0]), t.shear = r[0][0] * r[1][0] + r[0][1] * r[1][1],
r[1] = [ r[1][0] - r[0][0] * t.shear, r[1][1] - r[0][1] * t.shear ], t.scaley = j.sqrt(e(r[1])),
i(r[1]), t.shear /= t.scaley;
var o = -r[0][1], a = r[1][1];
return a < 0 ? (t.rotate = n.deg(j.acos(a)), o < 0 && (t.rotate = 360 - t.rotate)) : t.rotate = n.deg(j.asin(o)),
t.isSimple = !(+t.shear.toFixed(9) || t.scalex.toFixed(9) != t.scaley.toFixed(9) && t.rotate),
t.isSuperSimple = !+t.shear.toFixed(9) && t.scalex.toFixed(9) == t.scaley.toFixed(9) && !t.rotate,
t.noRotation = !+t.shear.toFixed(9) && !t.rotate, t;
}, t.toTransformString = function(t) {
var e = t || this[P]();
return e.isSimple ? (e.scalex = +e.scalex.toFixed(4), e.scaley = +e.scaley.toFixed(4),
e.rotate = +e.rotate.toFixed(4), (e.dx || e.dy ? "t" + [ e.dx, e.dy ] : L) + (1 != e.scalex || 1 != e.scaley ? "s" + [ e.scalex, e.scaley, 0, 0 ] : L) + (e.rotate ? "r" + [ e.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 qt = navigator.userAgent.match(/Version\/(.*?)\s/) || navigator.userAgent.match(/Chrome\/(\d+)/);
"Apple Computer, Inc." == navigator.vendor && (qt && qt[1] < 4 || "iP" == navigator.platform.slice(0, 2)) || "Google Inc." == navigator.vendor && qt && qt[1] < 8 ? w.safari = function() {
var t = this.rect(-99, -99, this.width + 99, this.height + 99).attr({
stroke: "none"
});
setTimeout(function() {
t.remove();
});
} : w.safari = dt;
for (var Gt = function() {
this.returnValue = !1;
}, Ht = function() {
return this.originalEvent.preventDefault();
}, Ut = function() {
this.cancelBubble = !0;
}, zt = function() {
return this.originalEvent.stopPropagation();
}, Vt = function(t) {
var e = E.doc.documentElement.scrollTop || E.doc.body.scrollTop, n = E.doc.documentElement.scrollLeft || E.doc.body.scrollLeft;
return {
x: t.clientX + n,
y: t.clientY + e
};
}, Wt = function() {
return E.doc.addEventListener ? function(t, e, n, i) {
var r = function(t) {
var e = Vt(t);
return n.call(i, t, e.x, e.y);
};
if (t.addEventListener(e, r, !1), M && F[e]) {
var o = function(e) {
for (var r = Vt(e), o = e, a = 0, s = e.targetTouches && e.targetTouches.length; a < s; a++) if (e.targetTouches[a].target == t) {
e = e.targetTouches[a], e.originalEvent = o, e.preventDefault = Ht, e.stopPropagation = zt;
break;
}
return n.call(i, e, r.x, r.y);
};
t.addEventListener(F[e], o, !1);
}
return function() {
return t.removeEventListener(e, r, !1), M && F[e] && t.removeEventListener(F[e], o, !1),
!0;
};
} : E.doc.attachEvent ? function(t, e, n, i) {
var r = function(t) {
t = t || E.win.event;
var e = E.doc.documentElement.scrollTop || E.doc.body.scrollTop, r = E.doc.documentElement.scrollLeft || E.doc.body.scrollLeft, o = t.clientX + r, a = t.clientY + e;
return t.preventDefault = t.preventDefault || Gt, t.stopPropagation = t.stopPropagation || Ut,
n.call(i, t, o, a);
};
return t.attachEvent("on" + e, r), function() {
return t.detachEvent("on" + e, r), !0;
};
} : void 0;
}(), Xt = [], Qt = function(t) {
for (var n, i = t.clientX, r = t.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 && t.touches) {
for (var l, c = t.touches.length; c--; ) if (l = t.touches[c], l.identifier == n.el._drag.id) {
i = l.clientX, r = l.clientY, (t.originalEvent ? t.originalEvent : t).preventDefault();
break;
}
} else t.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 && e("raphael.drag.over." + n.el.id, n.el, u), i += a, r += o, e("raphael.drag.move." + n.el.id, n.move_scope || n.el, i - n.el._drag.x, r - n.el._drag.y, i, r, t);
}
}, Yt = function(t) {
n.unmousemove(Qt).unmouseup(Yt);
for (var i, r = Xt.length; r--; ) i = Xt[r], i.el._drag = {}, e("raphael.drag.end." + i.el.id, i.end_scope || i.start_scope || i.move_scope || i.el, t);
Xt = [];
}, Kt = n.el = {}, Jt = O.length; Jt--; ) !function(t) {
n[t] = Kt[t] = function(e, i) {
return n.is(e, "function") && (this.events = this.events || [], this.events.push({
name: t,
f: e,
unbind: Wt(this.shape || this.node || E.doc, t, e, i || this)
})), this;
}, n["un" + t] = Kt["un" + t] = function(e) {
for (var i = this.events || [], r = i.length; r--; ) i[r].name != t || !n.is(e, "undefined") && i[r].f != e || (i[r].unbind(),
i.splice(r, 1), !i.length && delete this.events);
return this;
};
}(O[Jt]);
Kt.data = function(t, i) {
var r = ct[this.id] = ct[this.id] || {};
if (0 == arguments.length) return r;
if (1 == arguments.length) {
if (n.is(t, "object")) {
for (var o in t) t[k](o) && this.data(o, t[o]);
return this;
}
return e("raphael.data.get." + this.id, this, r[t], t), r[t];
}
return r[t] = i, e("raphael.data.set." + this.id, this, i, t), this;
}, Kt.removeData = function(t) {
return null == t ? ct[this.id] = {} : ct[this.id] && delete ct[this.id][t], this;
}, Kt.getData = function() {
return i(ct[this.id] || {});
}, Kt.hover = function(t, e, n, i) {
return this.mouseover(t, n).mouseout(e, i || n);
}, Kt.unhover = function(t, e) {
return this.unmouseover(t).unmouseout(e);
};
var Zt = [];
Kt.drag = function(t, 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 && e.on("raphael.drag.start." + this.id, i), t && e.on("raphael.drag.move." + this.id, t),
r && e.on("raphael.drag.end." + this.id, r), e("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(t) {
t ? e.on("raphael.drag.over." + this.id, t) : e.unbind("raphael.drag.over." + this.id);
}, Kt.undrag = function() {
for (var t = Zt.length; t--; ) Zt[t].el == this && (this.unmousedown(Zt[t].start),
Zt.splice(t, 1), e.unbind("raphael.drag.*." + this.id));
!Zt.length && n.unmousemove(Qt).unmouseup(Yt), Xt = [];
}, w.circle = function(t, e, i) {
var r = n._engine.circle(this, t || 0, e || 0, i || 0);
return this.__set__ && this.__set__.push(r), r;
}, w.rect = function(t, e, i, r, o) {
var a = n._engine.rect(this, t || 0, e || 0, i || 0, r || 0, o || 0);
return this.__set__ && this.__set__.push(a), a;
}, w.ellipse = function(t, e, i, r) {
var o = n._engine.ellipse(this, t || 0, e || 0, i || 0, r || 0);
return this.__set__ && this.__set__.push(o), o;
}, w.path = function(t) {
t && !n.is(t, "string") && !n.is(t[0], V) && (t += L);
var e = n._engine.path(n.format[D](n, arguments), this);
return this.__set__ && this.__set__.push(e), e;
}, w.image = function(t, e, i, r, o) {
var a = n._engine.image(this, t || "about:blank", e || 0, i || 0, r || 0, o || 0);
return this.__set__ && this.__set__.push(a), a;
}, w.text = function(t, e, i) {
var r = n._engine.text(this, t || 0, e || 0, R(i));
return this.__set__ && this.__set__.push(r), r;
}, w.set = function(t) {
!n.is(t, "array") && (t = Array.prototype.splice.call(arguments, 0, arguments.length));
var e = new de(t);
return this.__set__ && this.__set__.push(e), e.paper = this, e.type = "set", e;
}, w.setStart = function(t) {
this.__set__ = t || this.set();
}, w.setFinish = function(t) {
var e = this.__set__;
return delete this.__set__, e;
}, w.getSize = function() {
var t = this.canvas.parentNode;
return {
width: t.offsetWidth,
height: t.offsetHeight
};
}, w.setSize = function(t, e) {
return n._engine.setSize.call(this, t, e);
}, w.setViewBox = function(t, e, i, r, o) {
return n._engine.setViewBox.call(this, t, e, i, r, o);
}, w.top = w.bottom = null, w.raphael = n;
var te = function(t) {
var e = t.getBoundingClientRect(), n = t.ownerDocument, i = n.body, r = n.documentElement, o = r.clientTop || i.clientTop || 0, a = r.clientLeft || i.clientLeft || 0;
return {
y: e.top + (E.win.pageYOffset || r.scrollTop || i.scrollTop) - o,
x: e.left + (E.win.pageXOffset || r.scrollLeft || i.scrollLeft) - a
};
};
w.getElementByPoint = function(t, e) {
var n = this, i = n.canvas, r = E.doc.elementFromPoint(t, e);
if (E.win.opera && "svg" == r.tagName) {
var o = te(i), a = i.createSVGRect();
a.x = t - o.x, a.y = e - 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(t) {
var e = this.set();
return this.forEach(function(i) {
n.isBBoxIntersect(i.getBBox(), t) && e.push(i);
}), e;
}, w.getById = function(t) {
for (var e = this.bottom; e; ) {
if (e.id == t) return e;
e = e.next;
}
return null;
}, w.forEach = function(t, e) {
for (var n = this.bottom; n; ) {
if (!1 === t.call(e, n)) return this;
n = n.next;
}
return this;
}, w.getElementsByPoint = function(t, e) {
var n = this.set();
return this.forEach(function(i) {
i.isPointInside(t, e) && n.push(i);
}), n;
}, Kt.isPointInside = function(t, e) {
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, t, e);
}, Kt.getBBox = function(t) {
if (this.removed) return {};
var e = this._;
return t ? (!e.dirty && e.bboxwt || (this.realPath = mt[this.type](this), e.bboxwt = Et(this.realPath),
e.bboxwt.toString = m, e.dirty = 0), e.bboxwt) : ((e.dirty || e.dirtyT || !e.bbox) && (!e.dirty && this.realPath || (e.bboxwt = 0,
this.realPath = mt[this.type](this)), e.bbox = Et(gt(this.realPath, this.matrix)),
e.bbox.toString = m, e.dirty = e.dirtyT = 0), e.bbox);
}, Kt.clone = function() {
if (this.removed) return null;
var t = this.paper[this.type]().attr(this.attr());
return this.__set__ && this.__set__.push(t), t;
}, Kt.glow = function(t) {
if ("text" == this.type) return null;
t = t || {};
var e = {
width: (t.width || 10) + (+this.attr("stroke-width") || 1),
fill: t.fill || !1,
opacity: t.opacity || .5,
offsetx: t.offsetx || 0,
offsety: t.offsety || 0,
color: t.color || "#000"
}, n = e.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; a < n + 1; a++) r.push(i.path(o).attr({
stroke: e.color,
fill: e.fill ? e.color : "none",
"stroke-linejoin": "round",
"stroke-linecap": "round",
"stroke-width": +(e.width / n * a).toFixed(3),
opacity: +(e.opacity / n).toFixed(3)
}));
return r.insertBefore(this).translate(e.offsetx, e.offsety);
};
var ee = function(t, e, i, r, o, a, s, l, d) {
return null == d ? c(t, e, i, r, o, a, s, l) : n.findDotsAtSegment(t, e, i, r, o, a, s, l, u(t, e, i, r, o, a, s, l, d));
}, ne = function(t, e) {
return function(i, r, o) {
i = Pt(i);
for (var a, s, l, c, u, d = "", p = {}, h = 0, f = 0, m = i.length; f < m; f++) {
if (l = i[f], "M" == l[0]) a = +l[1], s = +l[2]; else {
if (c = ee(a, s, l[1], l[2], l[3], l[4], l[5], l[6]), h + c > r) {
if (e && !p.start) {
if (u = ee(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 (!t && !e) return u = ee(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 = t ? h : e ? 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;
};
}, ie = ne(1), re = ne(), oe = ne(0, 1);
n.getTotalLength = ie, n.getPointAtLength = re, n.getSubpath = function(t, e, n) {
if (this.getTotalLength(t) - n < 1e-6) return oe(t, e).end;
var i = oe(t, n, 1);
return e ? oe(i, e).end : i;
}, Kt.getTotalLength = function() {
var t = this.getPath();
if (t) return this.node.getTotalLength ? this.node.getTotalLength() : ie(t);
}, Kt.getPointAtLength = function(t) {
var e = this.getPath();
if (e) return re(e, t);
}, Kt.getPath = function() {
var t, e = n._getPath[this.type];
if ("text" != this.type && "set" != this.type) return e && (t = e(this)), t;
}, Kt.getSubpath = function(t, e) {
var i = this.getPath();
if (i) return n.getSubpath(i, t, e);
};
var ae = n.easing_formulas = {
linear: function(t) {
return t;
},
"<": function(t) {
return H(t, 1.7);
},
">": function(t) {
return H(t, .48);
},
"<>": function(t) {
var e = .48 - t / 1.04, n = j.sqrt(.1734 + e * e), i = n - e, r = H(G(i), 1 / 3) * (i < 0 ? -1 : 1), o = -n - e, a = H(G(o), 1 / 3) * (o < 0 ? -1 : 1), s = r + a + .5;
return 3 * (1 - s) * s * s + s * s * s;
},
backIn: function(t) {
var e = 1.70158;
return t * t * ((e + 1) * t - e);
},
backOut: function(t) {
t -= 1;
var e = 1.70158;
return t * t * ((e + 1) * t + e) + 1;
},
elastic: function(t) {
return t == !!t ? t : H(2, -10 * t) * j.sin(2 * U * (t - .075) / .3) + 1;
},
bounce: function(t) {
var e, n = 7.5625, i = 2.75;
return t < 1 / i ? e = n * t * t : t < 2 / i ? (t -= 1.5 / i, e = n * t * t + .75) : t < 2.5 / i ? (t -= 2.25 / i,
e = n * t * t + .9375) : (t -= 2.625 / i, e = n * t * t + .984375), e;
}
};
ae.easeIn = ae["ease-in"] = ae["<"], ae.easeOut = ae["ease-out"] = ae[">"], ae.easeInOut = ae["ease-in-out"] = ae["<>"],
ae["back-in"] = ae.backIn, ae["back-out"] = ae.backOut;
var se = [], le = t.requestAnimationFrame || t.webkitRequestAnimationFrame || t.mozRequestAnimationFrame || t.oRequestAnimationFrame || t.msRequestAnimationFrame || function(t) {
setTimeout(t, 16);
}, ce = function() {
for (var t = +new Date(), i = 0; i < se.length; i++) {
var r = se[i];
if (!r.el.removed && !r.paused) {
var o, a, s = t - 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 && se.splice(i--, 1)) : r.status = (r.prev + (r.percent - r.prev) * (s / l)) / r.anim.top,
!(s < 0)) if (s < l) {
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(" + [ ue(K(u[v].r + g * l * d[v].r)), ue(K(u[v].g + g * l * d[v].g)), ue(K(u[v].b + g * l * d[v].b)) ].join(",") + ")";
break;
case "path":
o = [];
for (var y = 0, x = u[v].length; y < x; y++) {
o[y] = [ u[v][y][0] ];
for (var w = 1, S = u[v][y].length; w < S; 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; y < x; y++) for (o[y] = [ u[v][y][0] ],
w = 1, S = u[v][y].length; w < S; w++) o[y][w] = u[v][y][w] + g * l * d[v][y][w]; else {
var C = function(t) {
return +u[v][t] + g * l * d[v][t];
};
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(t, n, i) {
setTimeout(function() {
e("raphael.anim.frame." + t, n, i);
});
}(h.id, h, r.anim);
} else {
if (function(t, i, r) {
setTimeout(function() {
e("raphael.anim.frame." + i.id, i, r), e("raphael.anim.finish." + i.id, i, r), n.is(t, "function") && t.call(i);
});
}(r.callback, h, r.anim), h.attr(p), se.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(), se.length && le(ce);
}, ue = function(t) {
return t > 255 ? 255 : t < 0 ? 0 : t;
};
Kt.animateWith = function(t, e, 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 = se.length; c < u; c++) if (se[c].anim == e && se[c].el == t) {
se[u - 1].start = se[c].start;
break;
}
return s;
}, Kt.onAnimation = function(t) {
return t ? e.on("raphael.anim.frame." + this.id, t) : e.unbind("raphael.anim.frame." + this.id),
this;
}, v.prototype.delay = function(t) {
var e = new v(this.anim, this.ms);
return e.times = this.times, e.del = +t || 0, e;
}, v.prototype.repeat = function(t) {
var e = new v(this.anim, this.ms);
return e.del = this.del, e.times = j.floor($(t, 0)) || 1, e;
}, n.animation = function(t, e, i, r) {
if (t instanceof v) return t;
!n.is(i, "function") && i || (r = r || i || null, i = null), t = Object(t), e = +e || 0;
var o, a, s = {};
for (a in t) t[k](a) && J(a) != a && J(a) + "%" != a && (o = !0, s[a] = t[a]);
if (o) return i && (s.easing = i), r && (s.callback = r), new v({
100: s
}, e);
if (r) {
var l = 0;
for (var c in t) {
var u = Z(c);
t[k](c) && u > l && (l = u);
}
l += "%", !t[l].callback && (t[l].callback = r);
}
return new v(t, e);
}, Kt.animate = function(t, e, i, r) {
var o = this;
if (o.removed) return r && r.call(o), o;
var a = t instanceof v ? t : n.animation(t, e, i, r);
return b(a, o, a.percents[0], null, o.attr()), o;
}, Kt.setTime = function(t, e) {
return t && null != e && this.status(t, q(e, t.ms) / t.ms), this;
}, Kt.status = function(t, e) {
var n, i, r = [], o = 0;
if (null != e) return b(t, this, -1, q(e, 1)), this;
for (n = se.length; o < n; o++) if (i = se[o], i.el.id == this.id && (!t || i.anim == t)) {
if (t) return i.status;
r.push({
anim: i.anim,
status: i.status
});
}
return t ? 0 : r;
}, Kt.pause = function(t) {
for (var n = 0; n < se.length; n++) se[n].el.id != this.id || t && se[n].anim != t || !1 !== e("raphael.anim.pause." + this.id, this, se[n].anim) && (se[n].paused = !0);
return this;
}, Kt.resume = function(t) {
for (var n = 0; n < se.length; n++) if (se[n].el.id == this.id && (!t || se[n].anim == t)) {
var i = se[n];
!1 !== e("raphael.anim.resume." + this.id, this, i.anim) && (delete i.paused, this.status(i.anim, i.status));
}
return this;
}, Kt.stop = function(t) {
for (var n = 0; n < se.length; n++) se[n].el.id != this.id || t && se[n].anim != t || !1 !== e("raphael.anim.stop." + this.id, this, se[n].anim) && se.splice(n--, 1);
return this;
}, e.on("raphael.remove", y), e.on("raphael.clear", y), Kt.toString = function() {
return "Rapha\xebl\u2019s object";
};
var de = function(t) {
if (this.items = [], this.length = 0, this.type = "set", t) for (var e = 0, n = t.length; e < n; e++) !t[e] || t[e].constructor != Kt.constructor && t[e].constructor != de || (this[this.items.length] = this.items[this.items.length] = t[e],
this.length++);
}, pe = de.prototype;
pe.push = function() {
for (var t, e, n = 0, i = arguments.length; n < i; n++) !(t = arguments[n]) || t.constructor != Kt.constructor && t.constructor != de || (e = this.items.length,
this[e] = this.items[e] = t, this.length++);
return this;
}, pe.pop = function() {
return this.length && delete this[this.length--], this.items.pop();
}, pe.forEach = function(t, e) {
for (var n = 0, i = this.items.length; n < i; n++) if (!1 === t.call(e, this.items[n], n)) return this;
return this;
};
for (var he in Kt) Kt[k](he) && (pe[he] = function(t) {
return function() {
var e = arguments;
return this.forEach(function(n) {
n[t][D](n, e);
});
};
}(he));
return pe.attr = function(t, e) {
if (t && n.is(t, V) && n.is(t[0], "object")) for (var i = 0, r = t.length; i < r; i++) this.items[i].attr(t[i]); else for (var o = 0, a = this.items.length; o < a; o++) this.items[o].attr(t, e);
return this;
}, pe.clear = function() {
for (;this.length; ) this.pop();
}, pe.splice = function(t, e, n) {
t = t < 0 ? $(this.length + t, 0) : t, e = $(0, q(this.length - t, e));
var i, r = [], o = [], a = [];
for (i = 2; i < arguments.length; i++) a.push(arguments[i]);
for (i = 0; i < e; i++) o.push(this[t + i]);
for (;i < this.length - t; i++) r.push(this[t + i]);
var s = a.length;
for (i = 0; i < s + r.length; i++) this.items[t + i] = this[t + i] = i < s ? a[i] : r[i - s];
for (i = this.items.length = this.length -= e - s; this[i]; ) delete this[i++];
return new de(o);
}, pe.exclude = function(t) {
for (var e = 0, n = this.length; e < n; e++) if (this[e] == t) return this.splice(e, 1),
!0;
}, pe.animate = function(t, e, 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(t, e, 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;
}, pe.insertAfter = function(t) {
for (var e = this.items.length; e--; ) this.items[e].insertAfter(t);
return this;
}, pe.getBBox = function() {
for (var t = [], e = [], n = [], i = [], r = this.items.length; r--; ) if (!this.items[r].removed) {
var o = this.items[r].getBBox();
t.push(o.x), e.push(o.y), n.push(o.x + o.width), i.push(o.y + o.height);
}
return t = q[D](0, t), e = q[D](0, e), n = $[D](0, n), i = $[D](0, i), {
x: t,
y: e,
x2: n,
y2: i,
width: n - t,
height: i - e
};
}, pe.clone = function(t) {
t = this.paper.set();
for (var e = 0, n = this.items.length; e < n; e++) t.push(this.items[e].clone());
return t;
}, pe.toString = function() {
return "Rapha\xebl\u2018s set";
}, pe.glow = function(t) {
var e = this.paper.set();
return this.forEach(function(n, i) {
var r = n.glow(t);
null != r && r.forEach(function(t, n) {
e.push(t);
});
}), e;
}, pe.isPointInside = function(t, e) {
var n = !1;
return this.forEach(function(i) {
if (i.isPointInside(t, e)) return n = !0, !1;
}), n;
}, n.registerFont = function(t) {
if (!t.face) return t;
this.fonts = this.fonts || {};
var e = {
w: t.w,
face: {},
glyphs: {}
}, n = t.face["font-family"];
for (var i in t.face) t.face[k](i) && (e.face[i] = t.face[i]);
if (this.fonts[n] ? this.fonts[n].push(e) : this.fonts[n] = [ e ], !t.svg) {
e.face["units-per-em"] = Z(t.face["units-per-em"], 10);
for (var r in t.glyphs) if (t.glyphs[k](r)) {
var o = t.glyphs[r];
if (e.glyphs[r] = {
w: o.w,
k: {},
d: o.d && "M" + o.d.replace(/[mlcxtrv]/g, function(t) {
return {
l: "L",
c: "C",
x: "z",
t: "m",
r: "l",
v: "c"
}[t] || "M";
}) + "z"
}, o.k) for (var a in o.k) o[k](a) && (e.glyphs[r].k[a] = o.k[a]);
}
}
return t;
}, w.getFont = function(t, e, i, r) {
if (r = r || "normal", i = i || "normal", e = +e || {
normal: 400,
bold: 700,
lighter: 300,
bolder: 800
}[e] || 400, n.fonts) {
var o = n.fonts[t];
if (!o) {
var a = new RegExp("(^|\\s)" + t.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; c < u && (l = o[c], l.face["font-weight"] != e || l.face["font-style"] != i && l.face["font-style"] || l.face["font-stretch"] != r); c++) ;
return l;
}
}, w.print = function(t, e, i, r, o, a, s, l) {
a = a || "middle", s = $(q(s || 0, 1), -1), l = $(q(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; y < x; 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", (t - m) / c, (e - b) / c ]));
}
}
return this.path(h).attr({
fill: "#000",
stroke: "none"
});
}, w.add = function(t) {
if (n.is(t, "array")) for (var e, i = this.set(), r = 0, o = t.length; r < o; r++) e = t[r] || {},
C[k](e.type) && i.push(this[e.type]().attr(e));
return i;
}, n.format = function(t, e) {
var i = n.is(e, V) ? [ 0 ][N](e) : arguments;
return t && n.is(t, "string") && i.length - 1 && (t = t.replace(_, function(t, e) {
return null == i[++e] ? L : i[e];
})), t || L;
}, n.fullfill = function() {
var t = /\{([^\}]+)\}/g, e = /(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g, n = function(t, n, i) {
var r = i;
return n.replace(e, function(t, e, n, i, o) {
e = e || i, r && (e in r && (r = r[e]), "function" == typeof r && o && (r = r()));
}), r = (null == r || r == i ? t : r) + "";
};
return function(e, i) {
return String(e).replace(t, function(t, e) {
return n(t, e, i);
});
};
}(), n.ninja = function() {
return T.was ? E.win.Raphael = T.is : delete Raphael, n;
}, n.st = pe, e.on("raphael.DOMload", function() {
x = !0;
}), function(t, e, i) {
function r() {
/in/.test(t.readyState) ? setTimeout(r, 9) : n.eve("raphael.DOMload");
}
null == t.readyState && t.addEventListener && (t.addEventListener("DOMContentLoaded", i = function() {
t.removeEventListener("DOMContentLoaded", i, !1), t.readyState = "complete";
}, !1), t.readyState = "loading"), r();
}(document), function() {
if (n.svg) {
var t = "hasOwnProperty", e = 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[t](o) && ("xlink:" == o.substring(0, 6) ? i.setAttributeNS(h, o.substring(6), e(r[o])) : i.setAttribute(o, e(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(t, r) {
var c = "linear", u = t.id + r, p = .5, h = .5, f = t.node, m = t.paper, v = f.style, b = n._g.doc.getElementById(u);
if (!b) {
if (r = e(r).replace(n._radial_gradient, function(t, e, n) {
if (c = "radial", e && n) {
p = i(e), 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, "_"), t.gradient && u != t.gradient.id && (m.defs.removeChild(t.gradient),
delete t.gradient), !t.gradient) {
b = g(c + "Gradient", {
id: u
}), t.gradient = b, g(b, "radial" == c ? {
fx: p,
fy: h
} : {
x1: x[0],
y1: x[1],
x2: x[2],
y2: x[3],
gradientTransform: t.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(t) {
var e = t.getBBox(1);
g(t.pattern, {
patternTransform: t.matrix.invert() + " translate(" + e.x + "," + e.y + ")"
});
}, y = function(i, r, o) {
if ("path" == i.type) {
for (var a, s, l, c, u, p = e(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[t](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(t, n, i) {
if (n = x[e(n).toLowerCase()]) {
for (var r = t.attrs["stroke-width"] || "1", o = {
round: r,
square: r,
butt: 0
}[t.attrs["stroke-linecap"] || i["stroke-linecap"]] || 0, a = [], s = n.length; s--; ) a[s] = n[s] * r + (s % 2 ? 1 : -1) * o;
g(t.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[t](f)) {
if (!n._availableAttrs[t](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 = e(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 = e(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(t) {
n._preload(M[1], function() {
var e = this.offsetWidth, n = this.offsetHeight;
g(t, {
width: e,
height: n
}), g(L, {
width: e,
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" != e(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[t]("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[t]("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" != e(m).charAt()) && v(i, m);
break;
case "opacity":
u.gradient && !u[t]("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(t) {
return t.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[t]("text") || o[t]("font") || o[t]("font-size") || o[t]("x") || o[t]("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[t]("text")) {
for (a.text = o.text; s.firstChild; ) s.removeChild(s.firstChild);
for (var c, u = e(o.text).split("\n"), p = [], h = 0, f = u.length; h < f; 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; h < f; 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(t) {
return t.parentNode && "a" === t.parentNode.tagName.toLowerCase() ? t.parentNode : t;
}, k = function(t, e) {
this[0] = this.node = t, t.raphael = !0, this.id = n._oid++, t.raphaelid = this.id,
this.matrix = n.matrix(), this.realPath = null, this.paper = e, this.attrs = this.attrs || {},
this._ = {
transform: [],
sx: 1,
sy: 1,
deg: 0,
dx: 0,
dy: 0,
dirty: 1
}, !e.bottom && (e.bottom = this), this.prev = e.top, e.top && (e.top.next = this),
e.top = this, this.next = null;
}, E = n.el;
k.prototype = E, E.constructor = k, n._engine.path = function(t, e) {
var n = g("path");
e.canvas && e.canvas.appendChild(n);
var i = new k(n, e);
return i.type = "path", S(i, {
fill: "none",
stroke: "#000",
path: t
}), i;
}, E.rotate = function(t, n, r) {
if (this.removed) return this;
if (t = e(t).split(c), t.length - 1 && (n = i(t[1]), r = i(t[2])), t = i(t[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", t, n, r ] ])), this;
}, E.scale = function(t, n, r, o) {
if (this.removed) return this;
if (t = e(t).split(c), t.length - 1 && (n = i(t[1]), r = i(t[2]), o = i(t[3])),
t = i(t[0]), null == n && (n = t), 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", t, n, r, o ] ])), this;
}, E.translate = function(t, n) {
return this.removed ? this : (t = e(t).split(c), t.length - 1 && (n = i(t[1])),
t = i(t[0]) || 0, n = +n || 0, this.transform(this._.transform.concat([ [ "t", t, n ] ])),
this);
}, E.transform = function(e) {
var i = this._;
if (null == e) return i.transform;
if (n._extractTransform(this, e), 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[t]("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 t = _(this.node);
if (!this.removed && t.parentNode) {
var e = this.paper;
e.__set__ && e.__set__.exclude(this), u.unbind("raphael.*.*." + this.id), this.gradient && e.defs.removeChild(this.gradient),
n._tear(this, e), t.parentNode.removeChild(t), 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 t = !0;
}
var e, n = !1;
this.paper.canvas.parentElement ? e = this.paper.canvas.parentElement.style : this.paper.canvas.parentNode && (e = this.paper.canvas.parentNode.style),
e && "none" == e.display && (n = !0, e.display = "");
var i = {};
try {
i = this.node.getBBox();
} catch (t) {
i = {
x: this.node.clientLeft,
y: this.node.clientTop,
width: this.node.clientWidth,
height: this.node.clientHeight
};
} finally {
i = i || {}, n && (e.display = "none");
}
return t && this.hide(), i;
}, E.attr = function(e, i) {
if (this.removed) return this;
if (null == e) {
var r = {};
for (var o in this.attrs) this.attrs[t](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(e, "string")) {
if ("fill" == e && "none" == this.attrs.fill && this.attrs.gradient) return this.attrs.gradient;
if ("transform" == e) return this._.transform;
for (var a = e.split(c), s = {}, l = 0, d = a.length; l < d; l++) e = a[l], e in this.attrs ? s[e] = this.attrs[e] : n.is(this.paper.customAttributes[e], "function") ? s[e] = this.paper.customAttributes[e].def : s[e] = n._availableAttrs[e];
return d - 1 ? s : s[a[0]];
}
if (null == i && n.is(e, "array")) {
for (s = {}, l = 0, d = e.length; l < d; l++) s[e[l]] = this.attr(e[l]);
return s;
}
if (null != i) {
var p = {};
p[e] = i;
} else null != e && n.is(e, "object") && (p = e);
for (var h in p) u("raphael.attr." + h + "." + this.id, this, p[h]);
for (h in this.paper.customAttributes) if (this.paper.customAttributes[t](h) && p[t](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[t](m) && (p[m] = f[m]);
}
return S(this, p), this;
}, E.toFront = function() {
if (this.removed) return this;
var t = _(this.node);
t.parentNode.appendChild(t);
var e = this.paper;
return e.top != this && n._tofront(this, e), this;
}, E.toBack = function() {
if (this.removed) return this;
var t = _(this.node), e = t.parentNode;
return e.insertBefore(t, e.firstChild), n._toback(this, this.paper), this.paper,
this;
}, E.insertAfter = function(t) {
if (this.removed || !t) return this;
var e = _(this.node), i = _(t.node || t[t.length - 1].node);
return i.nextSibling ? i.parentNode.insertBefore(e, i.nextSibling) : i.parentNode.appendChild(e),
n._insertafter(this, t, this.paper), this;
}, E.insertBefore = function(t) {
if (this.removed || !t) return this;
var e = _(this.node), i = _(t.node || t[0].node);
return i.parentNode.insertBefore(e, i), n._insertbefore(this, t, this.paper), this;
}, E.blur = function(t) {
var e = this;
if (0 != +t) {
var i = g("filter"), r = g("feGaussianBlur");
e.attrs.blur = t, i.id = n.createUUID(), g(r, {
stdDeviation: +t || 1.5
}), i.appendChild(r), e.paper.defs.appendChild(i), e._blur = i, g(e.node, {
filter: "url(#" + i.id + ")"
});
} else e._blur && (e._blur.parentNode.removeChild(e._blur), delete e._blur, delete e.attrs.blur),
e.node.removeAttribute("filter");
return e;
}, n._engine.circle = function(t, e, n, i) {
var r = g("circle");
t.canvas && t.canvas.appendChild(r);
var o = new k(r, t);
return o.attrs = {
cx: e,
cy: n,
r: i,
fill: "none",
stroke: "#000"
}, o.type = "circle", g(r, o.attrs), o;
}, n._engine.rect = function(t, e, n, i, r, o) {
var a = g("rect");
t.canvas && t.canvas.appendChild(a);
var s = new k(a, t);
return s.attrs = {
x: e,
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(t, e, n, i, r) {
var o = g("ellipse");
t.canvas && t.canvas.appendChild(o);
var a = new k(o, t);
return a.attrs = {
cx: e,
cy: n,
rx: i,
ry: r,
fill: "none",
stroke: "#000"
}, a.type = "ellipse", g(o, a.attrs), a;
}, n._engine.image = function(t, e, n, i, r, o) {
var a = g("image");
g(a, {
x: n,
y: i,
width: r,
height: o,
preserveAspectRatio: "none"
}), a.setAttributeNS(h, "href", e), t.canvas && t.canvas.appendChild(a);
var s = new k(a, t);
return s.attrs = {
x: n,
y: i,
width: r,
height: o,
src: e
}, s.type = "image", s;
}, n._engine.text = function(t, e, i, r) {
var o = g("text");
t.canvas && t.canvas.appendChild(o);
var a = new k(o, t);
return a.attrs = {
x: e,
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(t, e) {
return this.width = t || this.width, this.height = e || 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 t = n._getContainer.apply(0, arguments), e = t && t.container, i = t.x, r = t.y, o = t.width, a = t.height;
if (!e) 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 == e ? (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",
e.firstChild ? e.insertBefore(l, e.firstChild) : e.appendChild(l)), e = new n._Paper(),
e.width = o, e.height = a, e.canvas = l, e.clear(), e._left = e._top = 0, s && (e.renderfix = function() {}),
e.renderfix(), e;
}, n._engine.setViewBox = function(t, e, n, i, r) {
u("raphael.setViewBox", this, this._viewBox, [ t, e, 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 == t ? (this._vbSize && (c = 1), delete this._vbSize, o = "0 0 " + this.width + p + this.height) : (this._vbSize = c,
o = t + p + e + 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 = [ t, e, n, i, !!r ], this;
}, n.prototype.renderfix = function() {
var t, e = this.canvas, n = e.style;
try {
t = e.getScreenCTM() || e.createSVGMatrix();
} catch (n) {
t = e.createSVGMatrix();
}
var i = -t.e % 1, r = -t.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 t = this.canvas; t.firstChild; ) t.removeChild(t.firstChild);
this.bottom = this.top = null, (this.desc = g("desc")).appendChild(n._g.doc.createTextNode("Created with Rapha\xebl " + n.version)),
t.appendChild(this.desc), t.appendChild(this.defs = g("defs"));
}, n.prototype.remove = function() {
u("raphael.remove", this), this.canvas.parentNode && this.canvas.parentNode.removeChild(this.canvas);
for (var t in this) this[t] = "function" == typeof this[t] ? n._removedFactory(t) : null;
};
var T = n.st;
for (var I in E) E[t](I) && !T[t](I) && (T[I] = function(t) {
return function() {
var e = arguments;
return this.forEach(function(n) {
n[t].apply(n, e);
});
};
}(I));
}
}(), function() {
if (n.vml) {
var t = "hasOwnProperty", e = 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(t) {
var i = /[ahqstv]/gi, r = n._pathToAbsolute;
if (e(t).match(i) && (r = n._path2curve), i = /[clmz]/g, r == n._pathToAbsolute && !e(t).match(i)) {
var a = e(t).replace(f, function(t, e, n) {
var i = [], r = "m" == e.toLowerCase(), a = h[e];
return n.replace(g, function(t) {
r && 2 == i.length && (a += i + h["m" == e ? "l" : "L"], i = []), i.push(o(t * b));
}), a + i;
});
return a;
}
var s, l, c = r(t);
a = [];
for (var u = 0, m = c.length; u < m; u++) {
s = c[u], l = c[u][0].toLowerCase(), "z" == l && (l = "x");
for (var v = 1, y = s.length; v < y; v++) l += o(s[v] * b) + (v != y - 1 ? "," : p);
a.push(l);
}
return a.join(d);
}, S = function(t, e, i) {
var r = n.matrix();
return r.rotate(-t, .5, .5), {
dx: r.x(e, i),
dy: r.y(e, i)
};
}, C = function(t, e, n, i, r, o) {
var a = t._, s = t.matrix, c = a.fillpos, u = t.node, p = u.style, h = 1, f = "", m = b / e, g = b / n;
if (p.visibility = "hidden", e && n) {
if (u.coordsize = l(m) + d + l(g), p.rotation = o * (e * n < 0 ? -1 : 1), o) {
var v = S(o, i, r);
i = v.dx, r = v.dy;
}
if (e < 0 && (f += "x"), n < 0 && (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(e) + 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(t, n, i) {
for (var r = e(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 = t.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[t](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(~e(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 = e(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 = e(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" != e(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 q = n.getRGB(l.stroke);
j.on && l.stroke && (j.color = q.hex), B = ((+h["stroke-opacity"] + 1 || 2) - 1) * ((+h.opacity + 1 || 2) - 1) * ((+q.o + 1 || 2) - 1);
var G = .75 * (i(l["stroke-width"]) || 1);
if (B = s(a(B, 0), 1), null == l["stroke-width"] && (G = h["stroke-width"]), l["stroke-width"] && (j.weight = G),
G && G < 1 && (B *= G) && (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[t](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 = e(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; X < Q; 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(t, o, a) {
t.attrs = t.attrs || {};
var s = (t.attrs, Math.pow), l = "linear", c = ".5 .5";
if (t.attrs.gradient = o, o = e(o).replace(n._radial_gradient, function(t, e, n) {
return l = "radial", e && n && (e = i(e), n = i(n), s(e - .5, 2) + s(n - .5, 2) > .25 && (n = r.sqrt(.25 - s(e - .5, 2)) * (2 * (n > .5) - 1) + .5),
c = e + 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 (t = t.shape || t.node, h.length) {
t.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; m < g; 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), t.appendChild(a);
}
return 1;
}, T = function(t, e) {
this[0] = this.node = t, t.raphael = !0, this.id = n._oid++, t.raphaelid = this.id,
this.X = 0, this.Y = 0, this.attrs = {}, this.paper = e, this.matrix = n.matrix(),
this._ = {
transform: [],
sx: 1,
sy: 1,
dx: 0,
dy: 0,
deg: 0,
dirty: 1,
dirtyT: 1
}, !e.bottom && (e.bottom = this), this.prev = e.top, e.top && (e.top.next = this),
e.top = this, this.next = null;
}, I = n.el;
T.prototype = I, I.constructor = T, I.transform = function(t) {
if (null == t) 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 = t = e(t).replace(/\.{3}|\u2026/g, this._.transform || p)), n._extractTransform(this, o + t);
var a, s = this.matrix.clone(), l = this.skew, c = this.node, u = ~e(this.attrs.fill).indexOf("-"), h = !e(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 = e(s), l.offset = s.offset();
return null !== i && (this._.transform = i, n._extractTransform(this, i)), this;
}, I.rotate = function(t, n, r) {
if (this.removed) return this;
if (null != t) {
if (t = e(t).split(c), t.length - 1 && (n = i(t[1]), r = i(t[2])), t = i(t[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", t, n, r ] ])),
this;
}
}, I.translate = function(t, n) {
return this.removed ? this : (t = e(t).split(c), t.length - 1 && (n = i(t[1])),
t = i(t[0]) || 0, n = +n || 0, this._.bbox && (this._.bbox.x += t, this._.bbox.y += n),
this.transform(this._.transform.concat([ [ "t", t, n ] ])), this);
}, I.scale = function(t, n, r, o) {
if (this.removed) return this;
if (t = e(t).split(c), t.length - 1 && (n = i(t[1]), r = i(t[2]), o = i(t[3]), isNaN(r) && (r = null),
isNaN(o) && (o = null)), t = i(t[0]), null == n && (n = t), 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", t, 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 t = this.auxGetBBox();
if (this.paper && this.paper._viewBoxShift) {
var e = {}, n = 1 / this.paper._viewBoxShift.scale;
return e.x = t.x - this.paper._viewBoxShift.dx, e.x *= n, e.y = t.y - this.paper._viewBoxShift.dy,
e.y *= n, e.width = t.width * n, e.height = t.height * n, e.x2 = e.x + e.width,
e.y2 = e.y + e.height, e;
}
return t;
}, 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 t in this) this[t] = "function" == typeof this[t] ? n._removedFactory(t) : null;
this.removed = !0;
}
}, I.attr = function(e, i) {
if (this.removed) return this;
if (null == e) {
var r = {};
for (var o in this.attrs) this.attrs[t](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(e, "string")) {
if ("fill" == e && "none" == this.attrs.fill && this.attrs.gradient) return this.attrs.gradient;
for (var a = e.split(c), s = {}, l = 0, d = a.length; l < d; l++) e = a[l], e in this.attrs ? s[e] = this.attrs[e] : n.is(this.paper.customAttributes[e], "function") ? s[e] = this.paper.customAttributes[e].def : s[e] = n._availableAttrs[e];
return d - 1 ? s : s[a[0]];
}
if (this.attrs && null == i && n.is(e, "array")) {
for (s = {}, l = 0, d = e.length; l < d; l++) s[e[l]] = this.attr(e[l]);
return s;
}
var p;
null != i && (p = {}, p[e] = i), null == i && n.is(e, "object") && (p = e);
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[t](h) && p[t](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[t](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(t) {
return this.removed ? this : (t.constructor == n.st.constructor && (t = t[t.length - 1]),
t.node.nextSibling ? t.node.parentNode.insertBefore(this.node, t.node.nextSibling) : t.node.parentNode.appendChild(this.node),
n._insertafter(this, t, this.paper), this);
}, I.insertBefore = function(t) {
return this.removed ? this : (t.constructor == n.st.constructor && (t = t[0]), t.node.parentNode.insertBefore(this.node, t.node),
n._insertbefore(this, t, this.paper), this);
}, I.blur = function(t) {
var e = this.node.runtimeStyle, i = e.filter;
return i = i.replace(m, p), 0 != +t ? (this.attrs.blur = t, e.filter = i + d + " progid:DXImageTransform.Microsoft.Blur(pixelradius=" + (+t || 1.5) + ")",
e.margin = n.format("-{0}px 0 0 -{0}px", o(+t || 1.5))) : (e.filter = i, e.margin = 0,
delete this.attrs.blur), this;
}, n._engine.path = function(t, e) {
var n = D("shape");
n.style.cssText = v, n.coordsize = b + d + b, n.coordorigin = e.coordorigin;
var i = new T(n, e), r = {
fill: "none",
stroke: "#000"
};
t && (r.path = t), i.type = "path", i.path = [], i.Path = p, k(i, r), e.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(t, e, i, r, o, a) {
var s = n._rectPath(e, i, r, o, a), l = t.path(s), c = l.attrs;
return l.X = c.x = e, 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(t, e, n, i, r) {
var o = t.path();
return o.attrs, o.X = e - i, o.Y = n - r, o.W = 2 * i, o.H = 2 * r, o.type = "ellipse",
k(o, {
cx: e,
cy: n,
rx: i,
ry: r
}), o;
}, n._engine.circle = function(t, e, n, i) {
var r = t.path();
return r.attrs, r.X = e - i, r.Y = n - i, r.W = r.H = 2 * i, r.type = "circle",
k(r, {
cx: e,
cy: n,
r: i
}), r;
}, n._engine.image = function(t, e, i, r, o, a) {
var s = n._rectPath(i, r, o, a), l = t.path(s).attr({
stroke: "none"
}), c = l.attrs, u = l.node, d = u.getElementsByTagName("fill")[0];
return c.src = e, 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 = e, 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(t, 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 = e(a), c.on = !0, s.style.cssText = v, s.coordsize = b + d + b,
s.coordorigin = "0 0";
var u = new T(s, t), 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 = e(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),
t.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(t, e) {
var i = this.canvas.style;
return this.width = t, this.height = e, t == +t && (t += "px"), e == +e && (e += "px"),
i.width = t, i.height = e, i.clip = "rect(0 " + t + " " + e + " 0)", this._viewBox && n._engine.setViewBox.apply(this, this._viewBox),
this;
}, n._engine.setViewBox = function(t, e, i, r, o) {
n.eve("raphael.setViewBox", this, this._viewBox, [ t, e, i, r, o ]);
var a, s, l = this.getSize(), c = l.width, u = l.height;
return o && (a = u / r, s = c / i, i * a < c && (t -= (c - i * a) / 2 / a), r * s < u && (e -= (u - r * s) / 2 / s)),
this._viewBox = [ t, e, i, r, !!o ], this._viewBoxShift = {
dx: -t,
dy: -e,
scale: l
}, this.forEach(function(t) {
t.transform("...");
}), this;
};
var D;
n._engine.initWin = function(t) {
var e = t.document;
e.styleSheets.length < 31 ? e.createStyleSheet().addRule(".rvml", "behavior:url(#default#VML)") : e.styleSheets[0].addRule(".rvml", "behavior:url(#default#VML)");
try {
!e.namespaces.rvml && e.namespaces.add("rvml", "urn:schemas-microsoft-com:vml"),
D = function(t) {
return e.createElement("<rvml:" + t + ' class="rvml">');
};
} catch (t) {
D = function(t) {
return e.createElement("<" + t + ' xmlns="urn:schemas-microsoft.com:vml" class="rvml">');
};
}
}, n._engine.initWin(n._g.win), n._engine.create = function() {
var t = n._getContainer.apply(0, arguments), e = t.container, i = t.height, r = t.width, o = t.x, a = t.y;
if (!e) 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 == e ? (n._g.doc.body.appendChild(l), c.left = o + "px", c.top = a + "px", c.position = "absolute") : e.firstChild ? e.insertBefore(l, e.firstChild) : e.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 t in this) this[t] = "function" == typeof this[t] ? n._removedFactory(t) : null;
return !0;
};
var N = n.st;
for (var M in I) I[t](M) && !N[t](M) && (N[M] = function(t) {
return function() {
var e = arguments;
return this.forEach(function(n) {
n[t].apply(n, e);
});
};
}(M));
}
}(), T.was ? E.win.Raphael = n : Raphael = n, "object" == typeof exports && (module.exports = n),
n;
}), function() {
"use strict";
function t() {
this.title = void 0, this.actors = [], this.signals = [];
}
function e(t, e) {
_.extend(this, e), this.name = "ParseError", this.message = t || "";
}
t.prototype.getActor = function(e) {
var n = /^(.+) as (\S+)$/i.exec(e.trim());
n ? (name = n[1].trim(), e = n[2].trim()) : name = e.trim(), name = name.replace(/\\n/gm, "\n");
var i, r = this.actors;
for (i in r) if (r[i].alias == e) return r[i];
return i = r.push(new t.Actor(e, name, r.length)), r[i - 1];
}, t.prototype.setTitle = function(t) {
this.title = t;
}, t.prototype.addSignal = function(t) {
this.signals.push(t);
}, t.Actor = function(t, e, n) {
this.alias = t, this.name = e, this.index = n;
}, t.Signal = function(t, e, n, i) {
this.type = "Signal", this.actorA = t, this.actorB = n, this.linetype = 3 & e, this.arrowtype = e >> 2 & 3,
this.message = i;
}, t.Signal.prototype.isSelf = function() {
return this.actorA.index == this.actorB.index;
}, t.Note = function(t, e, n) {
if (this.type = "Note", this.actor = t, this.placement = e, this.message = n, this.hasManyActors() && t[0] == t[1]) throw new Error("Note should be over two different actors");
}, t.Note.prototype.hasManyActors = function() {
return _.isArray(this.actor);
}, t.LINETYPE = {
SOLID: 0,
DOTTED: 1
}, t.ARROWTYPE = {
FILLED: 0,
OPEN: 1
}, t.PLACEMENT = {
LEFTOF: 0,
RIGHTOF: 1,
OVER: 2
};
var n = function() {
function e() {
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(e, n, i, r, o, a, s) {
var l = a.length - 1;
switch (o) {
case 1:
return r;
case 4:
break;
case 6:
a[l];
break;
case 7:
case 8:
r.addSignal(a[l]);
break;
case 9:
r.setTitle(a[l]);
break;
case 10:
this.$ = new t.Note(a[l - 1], a[l - 2], a[l]);
break;
case 11:
this.$ = new t.Note(a[l - 1], t.PLACEMENT.OVER, a[l]);
break;
case 12:
this.$ = a[l];
break;
case 13:
this.$ = [ a[l - 2], a[l] ];
break;
case 14:
this.$ = t.PLACEMENT.LEFTOF;
break;
case 15:
this.$ = t.PLACEMENT.RIGHTOF;
break;
case 16:
this.$ = new t.Signal(a[l - 3], a[l - 2], a[l - 1], a[l]);
break;
case 17:
this.$ = r.getActor(a[l]);
break;
case 18:
this.$ = a[l - 1] | a[l] << 2;
break;
case 19:
this.$ = a[l];
break;
case 20:
this.$ = t.LINETYPE.SOLID;
break;
case 21:
this.$ = t.LINETYPE.DOTTED;
break;
case 22:
this.$ = t.ARROWTYPE.FILLED;
break;
case 23:
this.$ = t.ARROWTYPE.OPEN;
break;
case 24:
this.$ = a[l].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(t, e) {
if (!e.recoverable) throw new Error(t);
this.trace(t);
},
parse: function(t) {
var e = this, n = [ 0 ], i = [ null ], r = [], o = this.table, a = "", s = 0, l = 0, c = 0, u = 1;
this.lexer.setInput(t), 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;
"function" == typeof this.yy.parseError ? this.parseError = this.yy.parseError : this.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 t;
return t = e.lexer.lex() || u, "number" != typeof t && (t = e.symbols_[t] || t),
t;
}()), 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(t, e) {
if (!this.yy.parser) throw new Error(t);
this.yy.parser.parseError(t, e);
},
setInput: function(t) {
return this._input = t, 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 t = this._input[0];
return this.yytext += t, this.yyleng++, this.offset++, this.match += t, this.matched += t,
t.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),
t;
},
unput: function(t) {
var e = t.length, n = t.split(/(?:\r\n?|\n)/g);
this._input = t + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - e - 1),
this.offset -= e;
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 - e
}, this.options.ranges && (this.yylloc.range = [ r[0], r[0] + this.yyleng - e ]),
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(t) {
this.unput(this.match.slice(t));
},
pastInput: function() {
var t = this.matched.substr(0, this.matched.length - this.match.length);
return (t.length > 20 ? "..." : "") + t.substr(-20).replace(/\n/g, "");
},
upcomingInput: function() {
var t = this.match;
return t.length < 20 && (t += this._input.substr(0, 20 - t.length)), (t.substr(0, 20) + (t.length > 20 ? "..." : "")).replace(/\n/g, "");
},
showPosition: function() {
var t = this.pastInput(), e = new Array(t.length + 1).join("-");
return t + this.upcomingInput() + "\n" + e + "^";
},
test_match: function(t, e) {
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 = t[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 + t[0].length
}, this.yytext += t[0], this.match += t[0], this.matches = t, 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(t[0].length),
this.matched += t[0], n = this.performAction.call(this, this.yy, this, e, 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 t, e, 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]])) && (!e || n[0].length > e[0].length)) {
if (e = n, i = o, this.options.backtrack_lexer) {
if (!1 !== (t = this.test_match(n, r[o]))) return t;
if (this._backtrack) {
e = !1;
continue;
}
return !1;
}
if (!this.options.flex) break;
}
return e ? !1 !== (t = this.test_match(e, r[i])) && t : "" === 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 t = this.next();
return t || this.lex();
},
begin: function(t) {
this.conditionStack.push(t);
},
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(t) {
return t = this.conditionStack.length - 1 - Math.abs(t || 0), t >= 0 ? this.conditionStack[t] : "INITIAL";
},
pushState: function(t) {
this.begin(t);
},
stateStackSize: function() {
return this.conditionStack.length;
},
options: {
"case-insensitive": !0
},
performAction: function(t, e, n, i) {
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, e.prototype = n, n.Parser = e, new e();
}();
"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(t) {
t[1] || (console.log("Usage: " + t[0] + " FILE"), process.exit(1));
var e = require("fs").readFileSync(require("path").normalize(t[1]), "utf8");
return exports.parser.parse(e);
}, "undefined" != typeof module && require.main === module && exports.main(process.argv.slice(1))),
e.prototype = new Error(), t.ParseError = e, n.parseError = function(t, n) {
throw new e(t, n);
}, t.parse = function(e) {
return n.yy = new t(), n.parse(e);
}, this.Diagram = t;
}.call(this), define("diagram-grammar", [ "underscore" ], function() {}), function(t) {
"function" == typeof define && define.amd ? define("Diagram", [ "raphael" ], function(e) {
return t(e), Diagram;
}) : t(Raphael);
}(function(t) {
"use strict";
function e(t) {
this.message = t;
}
function n(t, n) {
if (!t) throw new e(n);
}
function i(t) {
return t.x + t.width / 2;
}
function r(t) {
return t.y + t.height / 2;
}
var o = Diagram.PLACEMENT, a = Diagram.LINETYPE, s = Diagram.ARROWTYPE, l = {
stroke: "#000",
"stroke-width": 2
}, c = {
fill: "#fff"
};
e.prototype.toString = function() {
return "AssertException: " + this.message;
}, String.prototype.trim || (String.prototype.trim = function() {
return this.replace(/^\s+|\s+$/g, "");
}), t.fn.line = function(t, e, i, r) {
return n(_.all([ t, i, e, r ], _.isFinite), "x1,x2,y1,y2 must be numeric"), this.path("M{0},{1} L{2},{3}", t, e, i, r);
}, t.fn.wobble = function(t, e, i, r) {
n(_.all([ t, i, e, r ], _.isFinite), "x1,x2,y1,y2 must be numeric");
var o = Math.sqrt((i - t) * (i - t) + (r - e) * (r - e)) / 25, a = Math.random(), s = Math.random(), l = Math.random() > .5 ? o : -o, c = Math.random() > .5 ? o : -o, u = {
x: (i - t) * a + t + l,
y: (r - e) * a + e + c
}, d = {
x: (i - t) * s + t - l,
y: (r - e) * s + e - c
};
return "C" + u.x + "," + u.y + " " + d.x + "," + d.y + " " + i + "," + r;
}, t.fn.text_bbox = function(t, e) {
var n;
e._obj ? n = this.print_center(0, 0, t, e._obj, e["font-size"]) : (n = this.text(0, 0, t),
n.attr(e));
var i = n.getBBox();
return n.remove(), i;
}, t.fn.handRect = function(t, e, i, r) {
return n(_.all([ t, e, i, r ], _.isFinite), "x, y, w, h must be numeric"), this.path("M" + t + "," + e + this.wobble(t, e, t + i, e) + this.wobble(t + i, e, t + i, e + r) + this.wobble(t + i, e + r, t, e + r) + this.wobble(t, e + r, t, e)).attr(c);
}, t.fn.handLine = function(t, e, i, r) {
return n(_.all([ t, i, e, r ], _.isFinite), "x1,x2,y1,y2 must be numeric"), this.path("M" + t + "," + e + this.wobble(t, e, i, r));
}, t.fn.print_center = function(e, n, i, r, o, a) {
var s = this.print(e, n, i, r, o, "baseline", a), l = s.getBBox(), c = e - l.x - l.width / 2, u = n - l.y - l.height / 2, d = new t.matrix();
return d.translate(c, u), s.attr("path", t.mapPath(s.attr("path"), d));
};
var u = function(t) {
this.init(t);
};
_.extend(u.prototype, {
init: function(t) {
this.diagram = t, this._paper = void 0, this._font = void 0, this._title = void 0,
this._actors_height = 0, this._signals_height = 0;
var e = this.arrow_types = {};
e[s.FILLED] = "block", e[s.OPEN] = "open";
var n = this.line_types = {};
n[a.SOLID] = "", n[a.DOTTED] = "-";
},
init_paper: function(e) {
this._paper = new t(e, 320, 200);
},
init_font: function() {},
draw_line: function(t, e, n, i) {
return this._paper.line(t, e, n, i);
},
draw_rect: function(t, e, n, i) {
return this._paper.rect(t, e, n, i);
},
draw: function(t) {
var e = this.diagram;
this.init_paper(t), this.init_font(), this.layout();
var n = this._title ? this._title.height : 0;
this._paper.setStart(), this._paper.setSize(e.width, e.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 t(t, e, i) {
n(t < e, "a must be less than or equal to b"), t < 0 ? (e = a[e], e.x = Math.max(i - e.width / 2, e.x)) : e >= a.length ? (t = a[t],
t.padding_right = Math.max(i, t.padding_right)) : (t = a[t], t.distances[e] = Math.max(i, t.distances[e] ? t.distances[e] : 0));
}
var e = this.diagram, i = this._paper, r = this._font, a = e.actors, s = e.signals;
if (e.width = 0, e.height = 0, e.title) {
var l = this._title = {}, c = i.text_bbox(e.title, r);
l.text_bb = c, l.message = e.title, l.width = c.width + 10, l.height = c.height + 10,
l.x = 10, l.y = 10, e.width += l.width, e.height += l.height;
}
_.each(a, function(t) {
var e = i.text_bbox(t.name, r);
t.text_bb = e, t.x = 0, t.y = 0, t.width = e.width + 40, t.height = e.height + 40,
t.distances = [], t.padding_right = 0, this._actors_height = Math.max(t.height, this._actors_height);
}, this), _.each(s, function(e) {
var n, a, s = i.text_bbox(e.message, r);
e.text_bb = s, e.width = s.width, e.height = s.height;
var l = 0;
if ("Signal" == e.type) e.width += 20, e.height += 20, e.isSelf() ? (n = e.actorA.index,
a = n + 1, e.width += 20) : (n = Math.min(e.actorA.index, e.actorB.index), a = Math.max(e.actorA.index, e.actorB.index)); else {
if ("Note" != e.type) throw new Error("Unhandled signal type:" + e.type);
if (e.width += 30, e.height += 30, l = 20, e.placement == o.LEFTOF) a = e.actor.index,
n = a - 1; else if (e.placement == o.RIGHTOF) n = e.actor.index, a = n + 1; else if (e.placement == o.OVER && e.hasManyActors()) n = Math.min(e.actor[0].index, e.actor[1].index),
a = Math.max(e.actor[0].index, e.actor[1].index), l = -40; else if (e.placement == o.OVER) return n = e.actor.index,
t(n - 1, n, e.width / 2), t(n, n + 1, e.width / 2), void (this._signals_height += e.height);
}
t(n, a, e.width + l), this._signals_height += e.height;
}, this);
var u = 0;
return _.each(a, function(t) {
t.x = Math.max(u, t.x), _.each(t.distances, function(e, n) {
void 0 !== e && (n = a[n], e = Math.max(e, t.width / 2, n.width / 2), n.x = Math.max(n.x, t.x + t.width / 2 + e - n.width / 2));
}), u = t.x + t.width + t.padding_right;
}, this), e.width = Math.max(u, e.width), e.width += 20, e.height += 20 + 2 * this._actors_height + this._signals_height,
this;
},
draw_title: function() {
var t = this._title;
t && this.draw_text_box(t, t.message, 0, 5, this._font);
},
draw_actors: function(t) {
var e = t;
_.each(this.diagram.actors, function(t) {
this.draw_actor(t, e, this._actors_height), this.draw_actor(t, e + this._actors_height + this._signals_height, this._actors_height);
var n = i(t);
this.draw_line(n, e + this._actors_height - 10, n, e + this._actors_height + 10 + this._signals_height).attr(l);
}, this);
},
draw_actor: function(t, e, n) {
t.y = e, t.height = n, this.draw_text_box(t, t.name, 10, 10, this._font);
},
draw_signals: function(t) {
var e = t;
_.each(this.diagram.signals, function(t) {
"Signal" == t.type ? t.isSelf() ? this.draw_self_signal(t, e) : this.draw_signal(t, e) : "Note" == t.type && this.draw_note(t, e),
e += t.height;
}, this);
},
draw_self_signal: function(t, e) {
n(t.isSelf(), "signal must be a self signal");
var r = t.text_bb, o = i(t.actorA), a = o + 20 + 5 - r.x, s = e + t.height / 2;
this.draw_text(a, s, t.message, this._font);
var c, u = _.extend({}, l, {
"stroke-dasharray": this.line_types[t.linetype]
}), d = e + 5, p = d + t.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[t.arrowtype] + "-wide-long",
c.attr(u);
},
draw_signal: function(t, e) {
var n = i(t.actorA), r = i(t.actorB), o = (r - n) / 2 + n, a = e + 5 + 10;
this.draw_text(o, a, t.message, this._font), a = e + t.height - 5 - 5;
var s = this.draw_line(n, a, r, a);
s.attr(l), s.attr({
"arrow-end": this.arrow_types[t.arrowtype] + "-wide-long",
"stroke-dasharray": this.line_types[t.linetype]
});
},
draw_note: function(t, e) {
t.y = e;
var n = t.hasManyActors() ? t.actor[0] : t.actor, r = i(n);
switch (t.placement) {
case o.RIGHTOF:
t.x = r + 10;
break;
case o.LEFTOF:
t.x = r - 10 - t.width;
break;
case o.OVER:
if (t.hasManyActors()) {
var a = i(t.actor[1]);
t.x = r - 20, t.width = a + 20 - t.x;
} else t.x = r - t.width / 2;
break;
default:
throw new Error("Unhandled note placement:" + t.placement);
}
this.draw_text_box(t, t.message, 10, 5, this._font);
},
draw_text: function(t, e, n, i) {
var r, o = this._paper, a = i || {};
a._obj ? r = o.print_center(t, e, n, a._obj, a["font-size"]) : (r = o.text(t, e, 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(t, e, n, o, a) {
var s = t.x + n, c = t.y + n, u = t.width - 2 * n, d = t.height - 2 * n;
this.draw_rect(s, c, u, d).attr(l), s = i(t), c = r(t), this.draw_text(s, c, e, a);
}
});
var d = function(t) {
this.init(t);
};
_.extend(d.prototype, u.prototype, {
init_font: function() {
this._font = {
"font-size": 16,
"font-family": "Andale Mono, monospace"
};
}
});
var p = function(t) {
this.init(t);
};
_.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(t, e, n, i) {
return this._paper.handLine(t, e, n, i);
},
draw_rect: function(t, e, n, i) {
return this._paper.handRect(t, e, n, i);
}
});
var h = {
simple: d,
hand: p
};
Diagram.prototype.drawSVG = function(t, e) {
var n = {
theme: "hand"
};
if (e = _.defaults(e || {}, n), !(e.theme in h)) throw new Error("Unsupported theme: " + e.theme);
new h[e.theme](this).draw(t);
};
}), function(t, e) {
"object" == typeof exports ? module.exports = e() : "function" == typeof define && define.amd && define("flow-chart", [], e);
}(0, function() {
function t(e, n) {
if (!e || "function" == typeof e) return n;
var i = {};
for (var r in n) i[r] = n[r];
for (r in e) e[r] && (i[r] = "object" == typeof i[r] ? t(i[r], e[r]) : e[r]);
return i;
}
function e(t, e) {
if ("function" == typeof Object.create) t.super_ = e, t.prototype = Object.create(e.prototype, {
constructor: {
value: t,
enumerable: !1,
writable: !0,
configurable: !0
}
}); else {
t.super_ = e;
var n = function() {};
n.prototype = e.prototype, t.prototype = new n(), t.prototype.constructor = t;
}
}
function n(t, e, 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 = [ e.x, e.y ];
for (i = 0, r = n.length; r > i; i++) a.push(n[i].x), a.push(n[i].y);
var s = t.paper.path(o, a);
s.attr("stroke", t.options["element-color"]), s.attr("stroke-width", t.options["line-width"]);
var l = t.options.font, c = t.options["font-family"], u = t.options["font-weight"];
return l && s.attr({
font: l
}), c && s.attr({
"font-family": c
}), u && s.attr({
"font-weight": u
}), s;
}
function i(t, e, 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 = [ e.x, e.y ];
for (r = 0, o = n.length; o > r; r++) s.push(n[r].x), s.push(n[r].y);
var l = t.paper.path(a, s);
l.attr({
stroke: t.options["line-color"],
"stroke-width": t.options["line-width"],
"arrow-end": t.options["arrow-end"]
});
var c = t.options.font, u = t.options["font-family"], d = t.options["font-weight"];
if (c && l.attr({
font: c
}), u && l.attr({
"font-family": u
}), d && l.attr({
"font-weight": d
}), i) {
var p = t.paper.text(0, 0, i), h = !1, f = n[0];
e.y === f.y && (h = !0);
var m = 0, g = 0;
m = e.x, g = e.y, h ? (m += t.options["text-margin"] / 2, g -= t.options["text-margin"]) : (m += t.options["text-margin"] / 2,
g += t.options["text-margin"]), p.attr({
"text-anchor": "start",
"font-size": t.options["font-size"],
fill: t.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(t, e, 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 - t) - (a - r) * (i - e), 0 === l ? h : (c = e - o, u = t - r,
d = (a - r) * c - (s - o) * u, p = (n - t) * c - (i - e) * u, c = d / l, u = p / l,
h.x = t + c * (n - t), h.y = e + c * (i - e), c > 0 && 1 > c && (h.onLine1 = !0),
u > 0 && 1 > u && (h.onLine2 = !0), h);
}
function o(t, e) {
e = e || {}, this.paper = new Raphael(t), this.options = g.defaults(e, m), this.symbols = [],
this.lines = [], this.start = null;
}
function a(t, e, n) {
this.chart = t, this.group = this.chart.paper.set(), this.symbol = n, this.connectedTo = [],
this.symbolType = e.symbolType, this.flowstate = e.flowstate || "future", this.next_direction = e.next && e.direction_next ? e.direction_next : void 0,
this.text = this.chart.paper.text(0, 0, e.text), e.key && (this.text.node.id = e.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
}), e.link && this.text.attr("href", e.link), e.target && this.text.attr("target", e.target);
var a = this.getAttr("maxWidth");
if (a) {
for (var s = e.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")), e.link && n.attr("href", e.link),
e.target && n.attr("target", e.target), e.key && (n.node.id = e.key), this.group.push(n),
n.insertBefore(this.text), this.text.attr({
y: n.getBBox().height / 2
}), this.initialize();
}
}
function s(t, e) {
var n = t.paper.rect(0, 0, 0, 0, 20);
e = e || {}, e.text = e.text || "Start", a.call(this, t, e, n);
}
function l(t, e) {
var n = t.paper.rect(0, 0, 0, 0, 20);
e = e || {}, e.text = e.text || "End", a.call(this, t, e, n);
}
function c(t, e) {
var n = t.paper.rect(0, 0, 0, 0);
e = e || {}, a.call(this, t, e, n);
}
function u(t, e) {
var n = t.paper.rect(0, 0, 0, 0);
e = e || {}, a.call(this, t, e, n), n.attr({
width: this.text.getBBox().width + 4 * this.getAttr("text-margin")
}), this.text.attr({
x: 2 * this.getAttr("text-margin")
});
var i = t.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")
}), e.key && (i.node.id = e.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
}), e.link && i.attr("href", e.link), e.target && i.attr("target", e.target), this.group.push(i),
i.insertBefore(this.text), this.initialize();
}
function d(t, e) {
e = e || {}, a.call(this, t, e), 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(t, l, c);
u.attr({
stroke: this.getAttr("element-color"),
"stroke-width": this.getAttr("line-width"),
fill: this.getAttr("fill")
}), e.link && u.attr("href", e.link), e.target && u.attr("target", e.target), e.key && (u.node.id = e.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(t, e) {
e = e || {}, a.call(this, t, e), this.textMargin = this.getAttr("text-margin"),
this.yes_direction = "bottom", this.no_direction = "right", e.yes && e.direction_yes && e.no && !e.direction_no ? "right" === e.direction_yes ? (this.no_direction = "bottom",
this.yes_direction = "right") : (this.no_direction = "right", this.yes_direction = "bottom") : e.yes && !e.direction_yes && e.no && e.direction_no ? "right" === e.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(t, l, c);
u.attr({
stroke: this.getAttr("element-color"),
"stroke-width": this.getAttr("line-width"),
fill: this.getAttr("fill")
}), e.link && u.attr("href", e.link), e.target && u.attr("target", e.target), e.key && (u.node.id = e.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(t) {
function e(t) {
var e = t.indexOf("(") + 1, i = t.indexOf(")");
return e >= 0 && i >= 0 ? n.symbols[t.substring(0, e - 1)] : n.symbols[t];
}
t = t || "", t = t.trim();
for (var n = {
symbols: {},
start: null,
drawSVG: function(t, e) {
function n(t) {
if (a[t.key]) return a[t.key];
switch (t.symbolType) {
case "start":
a[t.key] = new s(r, t);
break;
case "end":
a[t.key] = new l(r, t);
break;
case "operation":
a[t.key] = new c(r, t);
break;
case "inputoutput":
a[t.key] = new d(r, t);
break;
case "subroutine":
a[t.key] = new u(r, t);
break;
case "condition":
a[t.key] = new p(r, t);
break;
default:
return new Error("Wrong symbol type!");
}
return a[t.key];
}
var i = this;
this.diagram && this.diagram.clean();
var r = new o(t, e);
this.diagram = r;
var a = {};
!function h(t, e, o) {
var a = n(t);
return i.start === t ? r.startWith(a) : e && o && !e.pathOk && (e instanceof p ? (o.yes === t && e.yes(a),
o.no === t && e.no(a)) : e.then(a)), a.pathOk ? a : (a instanceof p ? (t.yes && h(t.yes, a, t),
t.no && h(t.no, a, t)) : t.next && h(t.next, a, t), a);
}(this.start), r.render();
},
clean: function() {
this.diagram.clean();
}
}, i = [], r = 0, a = 1, h = t.length; h > a; a++) if ("\n" === t[a] && "\\" !== t[a - 1]) {
var f = t.substring(r, a);
r = a + 1, i.push(f.replace(/\\\n/g, "\n"));
}
r < t.length && i.push(t.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 = e(I), N = function(t) {
var e = "next", n = t.indexOf("(") + 1, i = t.indexOf(")");
return n >= 0 && i >= 0 && (e = I.substring(n, i), e.indexOf(",") < 0 && "yes" !== e && "no" !== e && (e = "next, " + e)),
e;
}(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] = e(A), D["direction_" + N] = M, M = null;
}
}
}
return n;
}
Array.prototype.indexOf || (Array.prototype.indexOf = function(t) {
"use strict";
if (null === this) throw new TypeError();
var e = Object(this), n = e.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 e && e[r] === t) return r;
return -1;
}), Array.prototype.lastIndexOf || (Array.prototype.lastIndexOf = function(t) {
"use strict";
if (null === this) throw new TypeError();
var e = Object(this), n = e.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 e && e[r] === t) 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: t,
inherits: e
};
return o.prototype.handle = function(t) {
this.symbols.indexOf(t) <= -1 && this.symbols.push(t);
var e = this;
return t instanceof p ? (t.yes = function(n) {
return t.yes_symbol = n, t.no_symbol && (t.pathOk = !0), e.handle(n);
}, t.no = function(n) {
return t.no_symbol = n, t.yes_symbol && (t.pathOk = !0), e.handle(n);
}) : t.then = function(n) {
return t.next = n, t.pathOk = !0, e.handle(n);
}, t;
}, o.prototype.startWith = function(t) {
return this.start = t, this.handle(t);
}, o.prototype.render = function() {
var t, e = 0, n = 0, i = 0, r = 0, o = 0, a = 0;
for (i = 0, r = this.symbols.length; r > i; i++) t = this.symbols[i], t.width > e && (e = t.width),
t.height > n && (n = t.height);
for (i = 0, r = this.symbols.length; r > i; i++) t = this.symbols[i], t.shiftX(this.options.x + (e - t.width) / 2 + this.options["line-width"]),
t.shiftY(this.options.y + (n - t.height) / 2 + this.options["line-width"]);
for (this.start.render(), i = 0, r = this.symbols.length; r > i; i++) t = this.symbols[i],
t.renderLines();
for (o = this.maxXFromLine, i = 0, r = this.symbols.length; r > i; i++) {
t = this.symbols[i];
var s = t.getX() + t.width, l = t.getY() + t.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 t = this.paper.canvas;
t.parentNode.removeChild(t);
}
}, a.prototype.getAttr = function(t) {
if (this.chart) {
var e, n = this.chart.options ? this.chart.options[t] : void 0, i = this.chart.options.symbols ? this.chart.options.symbols[this.symbolType][t] : void 0;
return this.chart.options.flowstate && this.chart.options.flowstate[this.flowstate] && (e = this.chart.options.flowstate[this.flowstate][t]),
e || 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(t) {
this.group.transform("t" + (this.getX() + t) + "," + this.getY());
}, a.prototype.setX = function(t) {
this.group.transform("t" + t + "," + this.getY());
}, a.prototype.shiftY = function(t) {
this.group.transform("t" + this.getX() + "," + (this.getY() + t));
}, a.prototype.setY = function(t) {
this.group.transform("t" + this.getX() + "," + t);
}, a.prototype.getTop = function() {
var t = this.getY();
return {
x: this.getX() + this.width / 2,
y: t
};
}, a.prototype.getBottom = function() {
var t = this.getY() + this.height;
return {
x: this.getX() + this.width / 2,
y: t
};
}, a.prototype.getLeft = function() {
var t = this.getY() + this.group.getBBox().height / 2;
return {
x: this.getX(),
y: t
};
}, a.prototype.getRight = function() {
var t = this.getY() + this.group.getBBox().height / 2;
return {
x: this.getX() + this.group.getBBox().width,
y: t
};
}, a.prototype.render = function() {
if (this.next) {
var t = this.getAttr("line-length");
if ("right" === this.next_direction) {
var e = this.getRight();
if (this.next.getLeft(), !this.next.isPositioned) {
this.next.setY(e.y - this.next.height / 2), this.next.shiftX(this.group.getBBox().x + this.width + t);
var n = this;
!function r() {
for (var e, i = !1, o = 0, a = n.chart.symbols.length; a > o; o++) {
e = n.chart.symbols[o];
var s = Math.abs(e.getCenter().x - n.next.getCenter().x);
if (e.getCenter().y > n.next.getCenter().y && s <= n.next.width / 2) {
i = !0;
break;
}
}
i && (n.next.setX(e.getX() + e.width + t), 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 + t),
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(t, e, n) {
this.connectedTo.indexOf(t) < 0 && this.connectedTo.push(t);
var o, a = this.getCenter().x, s = this.getCenter().y, l = (this.getTop(), this.getRight()), c = this.getBottom(), u = this.getLeft(), d = t.getCenter().x, p = t.getCenter().y, h = t.getTop(), f = t.getRight(), m = (t.getBottom(),
t.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
} ], e), this.rightStart = !0, t.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
} ], e), this.rightStart = !0, t.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
} ], e), this.bottomStart = !0, t.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
} ], e), this.leftStart = !0, t.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
} ], e), this.leftStart = !0, t.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
} ], e), this.bottomStart = !0, t.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
} ], e) : 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
} ], e), this.bottomStart = !0, t.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
} ], e), this.rightStart = !0, t.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
} ], e), this.rightStart = !0, t.topEnd = !0, S = l.x + C / 2; else o = i(this.chart, u, f, e),
this.leftStart = !0, t.rightEnd = !0, S = f.x; else o = i(this.chart, l, m, e),
this.rightStart = !0, t.leftEnd = !0, S = m.x; else o = i(this.chart, c, h, e),
this.bottomStart = !0, t.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 q = [];
q.push([ "M", M[j][1], M[j][2] ]), q.push([ "L", M[j + 1][1], M[j + 1][2] ]);
var G = q[0][1], H = q[0][2], U = q[1][1], z = q[1][2], V = r(P, O, F, B, G, H, U, z);
if (V.onLine1 && V.onLine2) {
var W;
H === z ? G > 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", G, V.y + 2 * _ ], M.splice(j + 1, 0, W),
W = [ "C", G, V.y + 2 * _, G + 4 * _, V.y, G, V.y - 2 * _ ], M.splice(j + 2, 0, W),
o.attr("path", M)) : (W = [ "L", G, V.y - 2 * _ ], M.splice(j + 1, 0, W), W = [ "C", G, V.y - 2 * _, G + 4 * _, V.y, G, 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 t = this.getY() + this.group.getBBox().height / 2;
return {
x: this.getX() + this.textMargin,
y: t
};
}, d.prototype.getRight = function() {
var t = this.getY() + this.group.getBBox().height / 2;
return {
x: this.getX() + this.group.getBBox().width - this.textMargin,
y: t
};
}, 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 t = this.getAttr("line-length");
if (this.bottom_symbol) {
var e = this.getBottom();
this.bottom_symbol.getTop(), this.bottom_symbol.isPositioned || (this.bottom_symbol.shiftY(this.getY() + this.height + t),
this.bottom_symbol.setX(e.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 + t);
var i = this;
!function r() {
for (var e, n = !1, o = 0, a = i.chart.symbols.length; a > o; o++) {
e = i.chart.symbols[o];
var s = Math.abs(e.getCenter().x - i.right_symbol.getCenter().x);
if (e.getCenter().y > i.right_symbol.getCenter().y && s <= i.right_symbol.width / 2) {
n = !0;
break;
}
}
n && (i.right_symbol.setX(e.getX() + e.width + t), 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(t, e, 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(t, e) {
t.flowchartOptions = n.getInputJSONValue("#textarea-umldiagram-flowchart-options", e);
}, c.onPagedownConfigure = function(t) {
var n = document.getElementById("preview-contents");
t.hooks.chain("onPreviewRefresh", function() {
e.each(n.querySelectorAll(".prettyprint > .language-sequence"), function(t) {
try {
var e = s.parse(t.textContent), n = t.parentNode, i = a("div", {
"class": "sequence-diagram"
});
n.parentNode.replaceChild(i, n), e.drawSVG(i, {
theme: "simple"
});
} catch (t) {}
}), e.each(n.querySelectorAll(".prettyprint > .language-flow"), function(t) {
try {
var e = l.parse(t.textContent), n = t.parentNode, i = a("div", {
"class": "flow-chart"
});
n.parentNode.replaceChild(i, n), e.drawSVG(i, JSON.parse(c.config.flowchartOptions));
} catch (t) {}
});
});
}, 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\t<div class="form-group">\n\t\t<label class="col-sm-4 control-label" for="input-toc-marker">Marker\n\t\t\tRegExp</label>\n\t\t<div class="col-sm-7">\n\t\t\n\t\t\t<input type="text" id="input-toc-marker" class="col-sm-4 form-control">\n\t\t</div>\n\t</div>\n\t<div class="form-group">\n\t\t<label class="col-sm-4 control-label" for="input-toc-maxdepth">Max depth</label>\n\t\t<div class="col-sm-7 form-inline">\n\t\t\t<input type="text" id="input-toc-maxdepth"\n\t\t\t\tclass="col-sm-5 form-control" placeholder="6">\n\t\t</div>\n\t</div>\n\t<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\t\n</div>';
}), define("extensions/toc", [ "jquery", "underscore", "utils", "classes/Extension", "text!html/buttonToc.html", "text!html/tocSettingsBlock.html" ], function(t, e, n, i, r, o) {
function a(t, e, n) {
this.tagName = t, this.anchor = e, this.text = n, this.children = [];
}
function s(t, 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 e.each(t, function(t) {
t.tagName != o ? n !== c.config.maxDepth && (void 0 === r && (r = new a()), r.children.push(t)) : (i(),
r = t);
}), i(), l;
}
function l() {
function t(t) {
for (var r = t.id || n.slugify(t.textContent) || "title", o = r, a = 0; e.has(i, o); ) o = r + "-" + ++a;
return i[o] = !0, t.id = o, o;
}
var i = {}, r = [];
return e.each(u.querySelectorAll("h1, h2, h3, h4, h5, h6"), function(e) {
r.push(new a(e.tagName, t(e), e.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(t, e) {
t.marker = n.getInputRegExpValue("#input-toc-marker", e), t.maxDepth = n.getInputIntValue("#input-toc-maxdepth"),
t.button = n.getInputChecked("#input-toc-button");
}, c.onCreatePreviewButton = function() {
if (c.config.button) return r;
}, a.prototype.childrenToString = function() {
if (0 === this.children.length) return "";
var t = "<ul>\n";
return e.each(this.children, function(e) {
t += e.toString();
}), t += "</ul>\n";
}, a.prototype.toString = function() {
var t = "<li>";
return this.anchor && this.text && (t += '<a href="#' + this.anchor + '">' + this.text + "</a>"),
t += this.childrenToString() + "</li>\n";
};
var u;
return c.onPagedownConfigure = function(t) {
u = document.getElementById("preview-contents");
var n = new RegExp("^\\s*" + c.config.marker + "\\s*$");
t.hooks.chain("onPreviewRefresh", function() {
var t = document.querySelectorAll(".table-of-contents, .toc"), i = l();
e.each(u.getElementsByTagName("p"), function(t) {
n.test(t.innerHTML) && (t.innerHTML = i);
}), e.each(t, function(t) {
t.innerHTML = i;
});
});
}, c.onReady = function() {
var e = !0;
t(".preview-panel").on("hide.layout.toggle", function() {
e = !1;
}).on("shown.layout.toggle", function() {
e = !0;
}), t(".extension-preview-buttons .table-of-contents").on("click", "a", function(t) {
!e && t.preventDefault();
});
}, c;
}), define("extensions/emailConverter", [ "classes/Extension" ], function(t) {
var e = new t("emailConverter", "Markdown Email", (!0));
return e.settingsBlock = "<p>Converts email addresses in the form &lt;email@example.com&gt; into clickable links.</p>",
e.onPagedownConfigure = function(t) {
t.getConverter().hooks.chain("postConversion", function(t) {
return t.replace(/<(mailto\:)?([^\s>]+@[^\s>]+\.\S+?)>/g, function(t, e, n) {
return '<a href="mailto:' + n + '">' + n + "</a>";
});
});
}, e;
}), define("text!html/scrollSyncSettingsBlock.html", [], function() {
return "<p>Binds together editor and preview scrollbars.</p>\n<blockquote>\n\t<p><b>Note:</b> The mapping between Markdown and HTML is based on the\n\tposition of the title elements (h1, h2...) in the page. Therefore if\n\tyour document does not contain any title, the mapping will be linear and\n\tconsequently less accurate.</p>\n</blockquote>";
}), define("extensions/scrollSync", [ "jquery", "underscore", "classes/Extension", "text!html/scrollSyncSettingsBlock.html" ], function(t, e, n, i) {
function r(t, n, i) {
var r, o = e.find(n, function(e, n) {
return r = n, t < e.endOffset;
});
if (void 0 !== o) {
var a = (t - o.startOffset) / (o.height || 1), s = i[r];
return s.startOffset + s.height * a;
}
}
function o(t, e, n, i, r) {
function o() {
var l = Date.now(), c = (l - s) / 200;
if (c < 1) {
var u = e + a * Math.cos((1 - c) * Math.PI / 2);
t.scrollTop = u, i(u), p = setTimeout(o, 1);
} else h = void 0, t.scrollTop = n, setTimeout(r, 100);
}
h && (clearTimeout(p), h()), h = r;
var a = n - e, s = Date.now();
o();
}
var a = new n("scrollSync", "Scroll Sync", (!0), (!0));
a.settingsBlock = i;
var s;
a.onSectionsCreated = function(t) {
s = t;
};
var l, c, u, d, p, h, f = [], m = [], g = e.debounce(function() {
f = [];
var t, n;
e.each(l.querySelectorAll(".wmd-input-section"), function(e) {
if (void 0 === t) return void (t = 0);
e = e.firstChild;
var n = e.offsetTop;
f.push({
startOffset: t,
endOffset: n,
height: n - t
}), t = n;
}), n = l.scrollHeight, f.push({
startOffset: t,
endOffset: n,
height: n - t
}), m = [];
var i;
e.each(c.querySelectorAll(".wmd-preview-section"), function(t) {
if (void 0 === i) return void (i = 0);
var e = t.offsetTop;
m.push({
startOffset: i,
endOffset: e,
height: e - i
}), i = e;
}), 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 = e.throttle(function() {
if (v && 0 !== f.length && f.length === m.length) {
var t = l.scrollTop;
t < 0 && (t = 0);
var n, i = c.scrollTop;
if (!0 === b) {
if (Math.abs(t - u) <= 9) return;
if (b = !1, u = t, n = r(t, f, m), n = e.min([ n, c.scrollHeight - c.offsetHeight ]),
Math.abs(n - i) <= 9) return void (d = i);
o(c, i, n, function(t) {
w = !0, d = t;
}, 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 = e.min([ n, l.scrollHeight - l.offsetHeight ]),
Math.abs(n - t) <= 9) return void (u = t);
o(l, t, n, function(t) {
x = !0, u = t;
}, 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"),
t(c).scroll(function() {
!1 === w && !1 === C && (y = !0, b = !1, S()), C = !1;
}), t(l).scroll(function() {
!1 === x && (b = !0, y = !1, S());
}), t(".preview-panel").on("hide.layout.toggle", function() {
v = !1;
}).on("shown.layout.toggle", function() {
v = !0;
}), t(".extension-preview-buttons .table-of-contents").on("click", "a", function(e) {
e.preventDefault();
var n = this.hash, i = t(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(t) {
_ = document.getElementById("preview-contents"), t.getConverter().hooks.chain("postConversion", function(t) {
return k = _.offsetHeight, _.style.height = k + "px", t;
});
}, a.onPreviewFinished = function() {
_.style.removeProperty("height");
var t = _.offsetHeight;
b = !0, t < k && (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\t<div class="form-group">\n\t\t<label class="col-sm-5 control-label" for="input-sync-period">Sync\n\t\t\tperiod (0: manual)</label>\n\t\t<div class="col-sm-6 form-inline">\n\t\t\t<input type="text" id="input-sync-period"\n\t\t\t\tclass="col-sm-5 form-control" placeholder="180000"> ms\n\t\t</div>\n\t</div>\n\t<div class="form-group">\n\t\t<label class="col-sm-5 control-label"\n\t\t\tfor="input-sync-shortcut">Sync\n\t\t\tshortcut <a href="http://craig.is/killing/mice#keys" target="_blank">(?)</a></label>\n\t\t<div class="col-sm-6">\n\t\t\t<input type="text" id="input-sync-shortcut"\n\t\t\t\tclass="form-control">\n\t\t</div>\n\t</div>\n</div>';
}), define("extensions/buttonSync", [ "jquery", "underscore", "crel", "utils", "classes/Extension", "mousetrap", "text!html/buttonSyncSettingsBlock.html" ], function(t, e, 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(t, e) {
t.syncPeriod = i.getInputIntValue("#input-sync-period", e, 0), t.syncShortcut = i.getInputTextValue("#input-sync-shortcut", e);
};
var l;
s.onSynchronizerCreated = function(t) {
l = t;
};
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 e = n("a", {
"class": "btn btn-success button-synchronize",
title: "Force synchronization Ctrl/Cmd+S"
}, n("i", {
"class": "icon-refresh"
}));
return c = t(e), c.click(function() {
c.hasClass("disabled") || l.sync() && (h = i.currentTime);
}), e;
}, s.onReady = p, s.onFileCreated = p, s.onFileDeleted = p, s.onSyncImportSuccess = p,
s.onSyncExportSuccess = p, s.onSyncRemoved = p, s.onSyncRunning = function(t) {
u = t, p();
}, s.onOfflineChanged = function(t) {
d = t, p();
}, s.onReady = function() {
o.bind(s.config.syncShortcut, function(t) {
l.sync() && (h = i.currentTime), t.preventDefault();
}), t(".action-force-synchronization").click(function() {
l.sync() && (h = i.currentTime);
});
}, s;
}), define("extensions/buttonPublish", [ "jquery", "underscore", "crel", "classes/Extension" ], function(t, e, 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(t) {
s = t;
}, l.onCreateButton = function() {
var e = n("a", {
"class": "btn btn-success button-publish",
title: "Update document publication"
}, n("i", {
"class": "icon-upload"
}));
return o = t(e).click(function() {
o.hasClass("disabled") || s.publish();
}), e;
}, l.onPublishRunning = function(t) {
c = t, r();
}, l.onOfflineChanged = function(t) {
d = t, r();
};
var p = function() {
u = 0 !== e.size(a.publishLocations), r();
};
return l.onFileSelected = function(t) {
a = t, p();
}, l.onReady = function() {
t(".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\t<i class="icon-chart-bar"></i>\n\t<span class="value"></span>\n</button>\n<div class="dropdown-menu pull-right stat-button-dropdown">\n\t<h3>Statistics</h3>\n <hr>\n\t<div class="stat">\n\t\t<div>\n\t\t\t<%= name1 %>: <span class="value1"></span>\n\t\t</div>\n\t\t<div>\n\t\t\t<%= name2 %>: <span class="value2"></span>\n\t\t</div>\n\t\t<div>\n\t\t\t<%= name3 %>: <span class="value3"></span>\n\t\t</div>\n\t</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\t<div class="form-group form-inline">\n\t\t<label class="label-text" for="input-stat-name1">Title</label> <input\n\t\t\tid="input-stat-name1" type="text" class="form-control col-sm-3"> <label\n\t\t\tclass="label-text" for="input-stat-value1">RegExp</label> <input\n\t\t\tid="input-stat-value1" type="text" class="form-control col-sm-4">\n\t</div>\n\t<div class="form-group form-inline">\n\t\t<label class="label-text" for="input-stat-name2">Title</label> <input\n\t\t\tid="input-stat-name2" type="text" class="form-control col-sm-3"> <label\n\t\t\tclass="label-text" for="input-stat-value2">RegExp</label> <input\n\t\t\tid="input-stat-value2" type="text" class="form-control col-sm-4">\n\t</div>\n\t<div class="form-group form-inline">\n\t\t<label class="label-text" for="input-stat-name3">Title</label> <input\n\t\t\tid="input-stat-name3" type="text" class="form-control col-sm-3"> <label\n\t\t\tclass="label-text" for="input-stat-value3">RegExp</label> <input\n\t\t\tid="input-stat-value3" type="text" class="form-control col-sm-4">\n\t</div>\n</div>\n';
}), define("extensions/buttonStat", [ "jquery", "underscore", "utils", "classes/Extension", "text!html/buttonStat.html", "text!html/buttonStatSettingsBlock.html" ], function(t, e, 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(t) {
s = t;
}, a.onLoadSettings = function() {
e.each([ 1, 2, 3 ], function(t) {
n.setInputValue("#input-stat-name" + t, a.config["name" + t]), n.setInputValue("#input-stat-value" + t, a.config["value" + t]);
});
}, a.onSaveSettings = function(t, i) {
e.each([ 1, 2, 3 ], function(e) {
t["name" + e] = n.getInputTextValue("#input-stat-name" + e, i), t["value" + e] = n.getInputRegExpValue("#input-stat-value" + e, i);
});
}, a.onCreatePreviewButton = function() {
return e.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 t = l.cloneNode(!0), e = t.getElementsByTagName("script"), n = e.length - 1; n >= 0; n--) {
var i = e[n];
i.parentNode.removeChild(i);
}
var r = t.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\t<i class="icon-code"></i>\n</button>\n<div class="dropdown-menu pull-right">\n\t<h3>HTML code</h3>\n\t<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\t<div class="form-group">\n\t\t<label class="col-sm-4 control-label" for="textarea-html-code-template">Template\n\t\t\t<a href="#" class="tooltip-template">(?)</a>\n\t\t</label>\n\t\t<div class="col-sm-7">\n\t\t\t<textarea id="textarea-html-code-template" class="form-control"></textarea>\n\t\t</div>\n\t</div>\n</div>';
}), define("extensions/buttonHtmlCode", [ "jquery", "underscore", "utils", "classes/Extension", "text!html/buttonHtmlCode.html", "text!html/buttonHtmlCodeSettingsBlock.html" ], function(t, e, 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(t) {
t.template = n.getInputValue("#textarea-html-code-template");
};
var s;
a.onEventMgrCreated = function(t) {
s = t;
}, a.onCreatePreviewButton = function() {
return r;
};
var l;
a.onFileSelected = function(t) {
l = t;
};
var c, u;
return a.onPreviewFinished = function(t, e) {
c = t, u = e;
}, a.onReady = function() {
var n = document.getElementById("input-html-code");
t(".action-html-code").click(function() {
setTimeout(function() {
t("#input-html-code").each(function() {
t(this).is(":hidden") || this.select();
});
}, 10);
}).parent().on("show.bs.dropdown", function() {
try {
var t = e.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 = t;
} catch (t) {
s.onError(t);
}
});
}, a;
}), define("text!html/buttonViewer.html", [], function() {
return '<a href="viewer" class="btn btn-success dropdown-toggle"\n\ttitle="Open in viewer">\n\t<i class="icon-resize-full"></i>\n</a>\n';
}), define("extensions/buttonViewer", [ "jquery", "classes/Extension", "text!html/buttonViewer.html" ], function(t, e, n) {
var i = new e("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(t) {
"use strict";
function e() {
var t = document.createElement("bootstrap"), e = {
WebkitTransition: "webkitTransitionEnd",
MozTransition: "transitionend",
OTransition: "oTransitionEnd otransitionend",
transition: "transitionend"
};
for (var n in e) if (void 0 !== t.style[n]) return {
end: e[n]
};
}
t.fn.emulateTransitionEnd = function(e) {
var n = !1, i = this;
t(this).one(t.support.transition.end, function() {
n = !0;
});
var r = function() {
n || t(i).trigger(t.support.transition.end);
};
return setTimeout(r, e), this;
}, t(function() {
t.support.transition = e();
});
}(jQuery), function(t) {
"use strict";
var e = '[data-dismiss="alert"]', n = function(n) {
t(n).on("click", e, this.close);
};
n.prototype.close = function(e) {
function n() {
o.trigger("closed.bs.alert").remove();
}
var i = t(this), r = i.attr("data-target");
r || (r = i.attr("href"), r = r && r.replace(/.*(?=#[^\s]*$)/, ""));
var o = t(r);
e && e.preventDefault(), o.length || (o = i.hasClass("alert") ? i : i.parent()),
o.trigger(e = t.Event("close.bs.alert")), e.isDefaultPrevented() || (o.removeClass("in"),
t.support.transition && o.hasClass("fade") ? o.one(t.support.transition.end, n).emulateTransitionEnd(150) : n());
};
var i = t.fn.alert;
t.fn.alert = function(e) {
return this.each(function() {
var i = t(this), r = i.data("bs.alert");
r || i.data("bs.alert", r = new n(this)), "string" == typeof e && r[e].call(i);
});
}, t.fn.alert.Constructor = n, t.fn.alert.noConflict = function() {
return t.fn.alert = i, this;
}, t(document).on("click.bs.alert.data-api", e, n.prototype.close);
}(jQuery), function(t) {
"use strict";
var e = function(n, i) {
this.$element = t(n), this.options = t.extend({}, e.DEFAULTS, i);
};
e.DEFAULTS = {
loadingText: "loading..."
}, e.prototype.setState = function(t) {
var e = "disabled", n = this.$element, i = n.is("input") ? "val" : "html", r = n.data();
t += "Text", r.resetText || n.data("resetText", n[i]()), n[i](r[t] || this.options[t]),
setTimeout(function() {
"loadingText" == t ? n.addClass(e).attr(e, e) : n.removeClass(e).removeAttr(e);
}, 0);
}, e.prototype.toggle = function() {
var t = this.$element.closest('[data-toggle="buttons"]'), e = !0;
if (t.length) {
var n = this.$element.find("input");
"radio" === n.prop("type") && (n.prop("checked") && this.$element.hasClass("active") ? e = !1 : t.find(".active").removeClass("active")),
e && n.prop("checked", !this.$element.hasClass("active")).trigger("change");
}
e && this.$element.toggleClass("active");
};
var n = t.fn.button;
t.fn.button = function(n) {
return this.each(function() {
var i = t(this), r = i.data("bs.button"), o = "object" == typeof n && n;
r || i.data("bs.button", r = new e(this, o)), "toggle" == n ? r.toggle() : n && r.setState(n);
});
}, t.fn.button.Constructor = e, t.fn.button.noConflict = function() {
return t.fn.button = n, this;
}, t(document).on("click.bs.button.data-api", "[data-toggle^=button]", function(e) {
var n = t(e.target);
n.hasClass("btn") || (n = n.closest(".btn")), n.button("toggle"), e.preventDefault();
});
}(jQuery), function(t) {
"use strict";
var e = function(e, n) {
this.$element = t(e), 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", t.proxy(this.pause, this)).on("mouseleave", t.proxy(this.cycle, this));
};
e.DEFAULTS = {
interval: 5e3,
pause: "hover",
wrap: !0
}, e.prototype.cycle = function(e) {
return e || (this.paused = !1), this.interval && clearInterval(this.interval), this.options.interval && !this.paused && (this.interval = setInterval(t.proxy(this.next, this), this.options.interval)),
this;
}, e.prototype.getActiveIndex = function() {
return this.$active = this.$element.find(".item.active"), this.$items = this.$active.parent().children(),
this.$items.index(this.$active);
}, e.prototype.to = function(e) {
var n = this, i = this.getActiveIndex();
if (!(e > this.$items.length - 1 || e < 0)) return this.sliding ? this.$element.one("slid.bs.carousel", function() {
n.to(e);
}) : i == e ? this.pause().cycle() : this.slide(e > i ? "next" : "prev", t(this.$items[e]));
}, e.prototype.pause = function(e) {
return e || (this.paused = !0), this.$element.find(".next, .prev").length && t.support.transition.end && (this.$element.trigger(t.support.transition.end),
this.cycle(!0)), this.interval = clearInterval(this.interval), this;
}, e.prototype.next = function() {
if (!this.sliding) return this.slide("next");
}, e.prototype.prev = function() {
if (!this.sliding) return this.slide("prev");
}, e.prototype.slide = function(e, n) {
var i = this.$element.find(".item.active"), r = n || i[e](), o = this.interval, a = "next" == e ? "left" : "right", s = "next" == e ? "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 = t.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 e = t(l.$indicators.children()[l.getActiveIndex()]);
e && e.addClass("active");
})), t.support.transition && this.$element.hasClass("slide")) {
if (this.$element.trigger(c), c.isDefaultPrevented()) return;
r.addClass(e), r[0].offsetWidth, i.addClass(a), r.addClass(a), i.one(t.support.transition.end, function() {
r.removeClass([ e, 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 = t.fn.carousel;
t.fn.carousel = function(n) {
return this.each(function() {
var i = t(this), r = i.data("bs.carousel"), o = t.extend({}, e.DEFAULTS, i.data(), "object" == typeof n && n), a = "string" == typeof n ? n : o.slide;
r || i.data("bs.carousel", r = new e(this, o)), "number" == typeof n ? r.to(n) : a ? r[a]() : o.interval && r.pause().cycle();
});
}, t.fn.carousel.Constructor = e, t.fn.carousel.noConflict = function() {
return t.fn.carousel = n, this;
}, t(document).on("click.bs.carousel.data-api", "[data-slide], [data-slide-to]", function(e) {
var n, i = t(this), r = t(i.attr("data-target") || (n = i.attr("href")) && n.replace(/.*(?=#[^\s]+$)/, "")), o = t.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),
e.preventDefault();
}), t(window).on("load", function() {
t('[data-ride="carousel"]').each(function() {
var e = t(this);
e.carousel(e.data());
});
});
}(jQuery), function(t) {
"use strict";
var e = function(n, i) {
this.$element = t(n), this.options = t.extend({}, e.DEFAULTS, i), this.transitioning = null,
this.options.parent && (this.$parent = t(this.options.parent)), this.options.toggle && this.toggle();
};
e.DEFAULTS = {
toggle: !0
}, e.prototype.dimension = function() {
return this.$element.hasClass("width") ? "width" : "height";
}, e.prototype.show = function() {
if (!this.transitioning && !this.$element.hasClass("in")) {
var e = t.Event("show.bs.collapse");
if (this.$element.trigger(e), !e.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 (!t.support.transition) return o.call(this);
var a = t.camelCase([ "scroll", r ].join("-"));
this.$element.one(t.support.transition.end, t.proxy(o, this)).emulateTransitionEnd(350)[r](this.$element[0][a]);
}
}
}, e.prototype.hide = function() {
if (!this.transitioning && this.$element.hasClass("in")) {
var e = t.Event("hide.bs.collapse");
if (this.$element.trigger(e), !e.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 (!t.support.transition) return i.call(this);
this.$element[n](0).one(t.support.transition.end, t.proxy(i, this)).emulateTransitionEnd(350);
}
}
}, e.prototype.toggle = function() {
this[this.$element.hasClass("in") ? "hide" : "show"]();
};
var n = t.fn.collapse;
t.fn.collapse = function(n) {
return this.each(function() {
var i = t(this), r = i.data("bs.collapse"), o = t.extend({}, e.DEFAULTS, i.data(), "object" == typeof n && n);
r || i.data("bs.collapse", r = new e(this, o)), "string" == typeof n && r[n]();
});
}, t.fn.collapse.Constructor = e, t.fn.collapse.noConflict = function() {
return t.fn.collapse = n, this;
}, t(document).on("click.bs.collapse.data-api", "[data-toggle=collapse]", function(e) {
var n, i = t(this), r = i.attr("data-target") || e.preventDefault() || (n = i.attr("href")) && n.replace(/.*(?=#[^\s]+$)/, ""), o = t(r), a = o.data("bs.collapse"), s = a ? "toggle" : i.data(), l = i.attr("data-parent"), c = l && t(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(t) {
"use strict";
function e() {
t(i).remove(), t(r).each(function(e) {
var i = n(t(this));
i.hasClass("open") && (i.trigger(e = t.Event("hide.bs.dropdown")), e.isDefaultPrevented() || i.removeClass("open").trigger("hidden.bs.dropdown"));
});
}
function n(e) {
var n = e.attr("data-target");
n || (n = e.attr("href"), n = n && /#/.test(n) && n.replace(/.*(?=#[^\s]*$)/, ""));
var i = n && t(n);
return i && i.length ? i : e.parent();
}
var i = ".dropdown-backdrop", r = "[data-toggle=dropdown]", o = function(e) {
t(e).on("click.bs.dropdown", this.toggle);
};
o.prototype.toggle = function(i) {
var r = t(this);
if (!r.is(".disabled, :disabled")) {
var o = n(r), a = o.hasClass("open");
if (e(), !a) {
if ("ontouchstart" in document.documentElement && !o.closest(".navbar-nav").length && t('<div class="dropdown-backdrop"/>').insertAfter(t(this)).on("click", e),
o.trigger(i = t.Event("show.bs.dropdown")), i.isDefaultPrevented()) return;
o.toggleClass("open").trigger("shown.bs.dropdown"), r.focus();
}
return !1;
}
}, o.prototype.keydown = function(e) {
if (/(38|40|27)/.test(e.keyCode)) {
var i = t(this);
if (e.preventDefault(), e.stopPropagation(), !i.is(".disabled, :disabled")) {
var o = n(i), a = o.hasClass("open");
if (!a || a && 27 == e.keyCode) return 27 == e.which && o.find(r).focus(), i.click();
var s = t("[role=menu] li:not(.divider):visible a", o);
if (s.length) {
var l = s.index(s.filter(":focus"));
38 == e.keyCode && l > 0 && l--, 40 == e.keyCode && l < s.length - 1 && l++, ~l || (l = 0),
s.eq(l).focus();
}
}
}
};
var a = t.fn.dropdown;
t.fn.dropdown = function(e) {
return this.each(function() {
var n = t(this), i = n.data("bs.dropdown");
i || n.data("bs.dropdown", i = new o(this)), "string" == typeof e && i[e].call(n);
});
}, t.fn.dropdown.Constructor = o, t.fn.dropdown.noConflict = function() {
return t.fn.dropdown = a, this;
}, t(document).on("click.bs.dropdown.data-api", e).on("click.bs.dropdown.data-api", ".dropdown form", function(t) {
t.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(t) {
"use strict";
var e = function(e, n) {
this.options = n, this.$element = t(e), this.$backdrop = this.isShown = null, this.options.remote && this.$element.load(this.options.remote);
};
e.DEFAULTS = {
backdrop: !0,
keyboard: !0,
show: !0
}, e.prototype.toggle = function(t) {
return this[this.isShown ? "hide" : "show"](t);
}, e.prototype.show = function(e) {
var n = this, i = t.Event("show.bs.modal", {
relatedTarget: e
});
this.$element.trigger(i), this.isShown || i.isDefaultPrevented() || (this.isShown = !0,
this.escape(), this.$element.on("click.dismiss.modal", '[data-dismiss="modal"]', t.proxy(this.hide, this)),
this.backdrop(function() {
var i = t.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 = t.Event("shown.bs.modal", {
relatedTarget: e
});
i ? n.$element.find(".modal-dialog").one(t.support.transition.end, function() {
n.$element.focus().trigger(r);
}).emulateTransitionEnd(300) : n.$element.focus().trigger(r);
}));
}, e.prototype.hide = function(e) {
e && e.preventDefault(), e = t.Event("hide.bs.modal"), this.$element.trigger(e),
this.isShown && !e.isDefaultPrevented() && (this.isShown = !1, this.escape(), t(document).off("focusin.bs.modal"),
this.$element.removeClass("in").attr("aria-hidden", !0).off("click.dismiss.modal"),
t.support.transition && this.$element.hasClass("fade") ? this.$element.one(t.support.transition.end, t.proxy(this.hideModal, this)).emulateTransitionEnd(300) : this.hideModal());
}, e.prototype.enforceFocus = function() {
t(document).off("focusin.bs.modal").on("focusin.bs.modal", t.proxy(function(t) {
this.$element[0] === t.target || this.$element.has(t.target).length || this.$element.focus();
}, this));
}, e.prototype.escape = function() {
this.isShown && this.options.keyboard ? this.$element.on("keyup.dismiss.bs.modal", t.proxy(function(t) {
27 == t.which && this.hide();
}, this)) : this.isShown || this.$element.off("keyup.dismiss.bs.modal");
}, e.prototype.hideModal = function() {
var t = this;
this.$element.hide(), this.backdrop(function() {
t.removeBackdrop(), t.$element.trigger("hidden.bs.modal");
});
}, e.prototype.removeBackdrop = function() {
this.$backdrop && this.$backdrop.remove(), this.$backdrop = null;
}, e.prototype.backdrop = function(e) {
var n = this.$element.hasClass("fade") ? "fade" : "";
if (this.isShown && this.options.backdrop) {
var i = t.support.transition && n;
if (this.$backdrop = t('<div class="modal-backdrop ' + n + '" />').appendTo(document.body),
this.$element.on("click.dismiss.modal", t.proxy(function(t) {
t.target === t.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"), !e) return;
i ? this.$backdrop.one(t.support.transition.end, e).emulateTransitionEnd(150) : e();
} else !this.isShown && this.$backdrop ? (this.$backdrop.removeClass("in"), t.support.transition && this.$element.hasClass("fade") ? this.$backdrop.one(t.support.transition.end, e).emulateTransitionEnd(150) : e()) : e && e();
};
var n = t.fn.modal;
t.fn.modal = function(n, i) {
return this.each(function() {
var r = t(this), o = r.data("bs.modal"), a = t.extend({}, e.DEFAULTS, r.data(), "object" == typeof n && n);
o || r.data("bs.modal", o = new e(this, a)), "string" == typeof n ? o[n](i) : a.show && o.show(i);
});
}, t.fn.modal.Constructor = e, t.fn.modal.noConflict = function() {
return t.fn.modal = n, this;
}, t(document).on("click.bs.modal.data-api", '[data-toggle="modal"]', function(e) {
var n = t(this), i = n.attr("href"), r = t(n.attr("data-target") || i && i.replace(/.*(?=#[^\s]+$)/, "")), o = r.data("modal") ? "toggle" : t.extend({
remote: !/#/.test(i) && i
}, r.data(), n.data());
e.preventDefault(), r.modal(o, this).one("hide", function() {
n.is(":visible") && n.focus();
});
}), t(document).on("show.bs.modal", ".modal", function() {
t(document.body).addClass("modal-open");
}).on("hidden.bs.modal", ".modal", function() {
t(document.body).removeClass("modal-open");
});
}(jQuery), function(t) {
"use strict";
var e = function(t, e) {
this.type = this.options = this.enabled = this.timeout = this.hoverState = this.$element = null,
this.init("tooltip", t, e);
};
e.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
}, e.prototype.init = function(e, n, i) {
this.enabled = !0, this.type = e, this.$element = t(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, t.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, t.proxy(this.enter, this)),
this.$element.on(l + "." + this.type, this.options.selector, t.proxy(this.leave, this));
}
}
this.options.selector ? this._options = t.extend({}, this.options, {
trigger: "manual",
selector: ""
}) : this.fixTitle();
}, e.prototype.getDefaults = function() {
return e.DEFAULTS;
}, e.prototype.getOptions = function(e) {
return e = t.extend({}, this.getDefaults(), this.$element.data(), e), e.delay && "number" == typeof e.delay && (e.delay = {
show: e.delay,
hide: e.delay
}), e;
}, e.prototype.getDelegateOptions = function() {
var e = {}, n = this.getDefaults();
return this._options && t.each(this._options, function(t, i) {
n[t] != i && (e[t] = i);
}), e;
}, e.prototype.enter = function(e) {
var n = e instanceof this.constructor ? e : t(e.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();
}, e.prototype.leave = function(e) {
var n = e instanceof this.constructor ? e : t(e.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();
}, e.prototype.show = function() {
var e = t.Event("show.bs." + this.type);
if (this.hasContent() && this.enabled) {
if (this.$element.trigger(e), e.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);
}
}, e.prototype.applyPlacement = function(t, e) {
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), t.top = t.top + a, t.left = t.left + s,
i.offset(t).addClass("in");
var l = i[0].offsetWidth, c = i[0].offsetHeight;
if ("top" == e && c != o && (n = !0, t.top = t.top + o - c), /bottom|top/.test(e)) {
var u = 0;
t.left < 0 && (u = -2 * t.left, t.left = 0, i.offset(t), 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(t);
}, e.prototype.replaceArrow = function(t, e, n) {
this.arrow().css(n, t ? 50 * (1 - t / e) + "%" : "");
}, e.prototype.setContent = function() {
var t = this.tip(), e = this.getTitle();
t.find(".tooltip-inner")[this.options.html ? "html" : "text"](e), t.removeClass("fade in top bottom left right");
}, e.prototype.hide = function() {
function e() {
"in" != n.hoverState && i.detach();
}
var n = this, i = this.tip(), r = t.Event("hide.bs." + this.type);
if (this.$element.trigger(r), !r.isDefaultPrevented()) return i.removeClass("in"),
t.support.transition && this.$tip.hasClass("fade") ? i.one(t.support.transition.end, e).emulateTransitionEnd(150) : e(),
this.$element.trigger("hidden.bs." + this.type), this;
}, e.prototype.fixTitle = function() {
var t = this.$element;
(t.attr("title") || "string" != typeof t.attr("data-original-title")) && t.attr("data-original-title", t.attr("title") || "").attr("title", "");
}, e.prototype.hasContent = function() {
return this.getTitle();
}, e.prototype.getPosition = function() {
var e = this.$element[0];
return t.extend({}, "function" == typeof e.getBoundingClientRect ? e.getBoundingClientRect() : {
width: e.offsetWidth,
height: e.offsetHeight
}, this.$element.offset());
}, e.prototype.getCalculatedOffset = function(t, e, n, i) {
return "bottom" == t ? {
top: e.top + e.height,
left: e.left + e.width / 2 - n / 2
} : "top" == t ? {
top: e.top - i,
left: e.left + e.width / 2 - n / 2
} : "left" == t ? {
top: e.top + e.height / 2 - i / 2,
left: e.left - n
} : {
top: e.top + e.height / 2 - i / 2,
left: e.left + e.width
};
}, e.prototype.getTitle = function() {
var t = this.$element, e = this.options;
return t.attr("data-original-title") || ("function" == typeof e.title ? e.title.call(t[0]) : e.title);
}, e.prototype.tip = function() {
return this.$tip = this.$tip || t(this.options.template);
}, e.prototype.arrow = function() {
return this.$arrow = this.$arrow || this.tip().find(".tooltip-arrow");
}, e.prototype.validate = function() {
this.$element[0].parentNode || (this.hide(), this.$element = null, this.options = null);
}, e.prototype.enable = function() {
this.enabled = !0;
}, e.prototype.disable = function() {
this.enabled = !1;
}, e.prototype.toggleEnabled = function() {
this.enabled = !this.enabled;
}, e.prototype.toggle = function(e) {
var n = e ? t(e.currentTarget)[this.type](this.getDelegateOptions()).data("bs." + this.type) : this;
n.tip().hasClass("in") ? n.leave(n) : n.enter(n);
}, e.prototype.destroy = function() {
this.hide().$element.off("." + this.type).removeData("bs." + this.type);
};
var n = t.fn.tooltip;
t.fn.tooltip = function(n) {
return this.each(function() {
var i = t(this), r = i.data("bs.tooltip"), o = "object" == typeof n && n;
r || i.data("bs.tooltip", r = new e(this, o)), "string" == typeof n && r[n]();
});
}, t.fn.tooltip.Constructor = e, t.fn.tooltip.noConflict = function() {
return t.fn.tooltip = n, this;
};
}(jQuery), function(t) {
"use strict";
var e = function(t, e) {
this.init("popover", t, e);
};
if (!t.fn.tooltip) throw new Error("Popover requires tooltip.js");
e.DEFAULTS = t.extend({}, t.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>'
}), e.prototype = t.extend({}, t.fn.tooltip.Constructor.prototype), e.prototype.constructor = e,
e.prototype.getDefaults = function() {
return e.DEFAULTS;
}, e.prototype.setContent = function() {
var t = this.tip(), e = this.getTitle(), n = this.getContent();
t.find(".popover-title")[this.options.html ? "html" : "text"](e), t.find(".popover-content")[this.options.html ? "html" : "text"](n),
t.removeClass("fade top bottom left right in"), t.find(".popover-title").html() || t.find(".popover-title").hide();
}, e.prototype.hasContent = function() {
return this.getTitle() || this.getContent();
}, e.prototype.getContent = function() {
var t = this.$element, e = this.options;
return t.attr("data-content") || ("function" == typeof e.content ? e.content.call(t[0]) : e.content);
}, e.prototype.arrow = function() {
return this.$arrow = this.$arrow || this.tip().find(".arrow");
}, e.prototype.tip = function() {
return this.$tip || (this.$tip = t(this.options.template)), this.$tip;
};
var n = t.fn.popover;
t.fn.popover = function(n) {
return this.each(function() {
var i = t(this), r = i.data("bs.popover"), o = "object" == typeof n && n;
r || i.data("bs.popover", r = new e(this, o)), "string" == typeof n && r[n]();
});
}, t.fn.popover.Constructor = e, t.fn.popover.noConflict = function() {
return t.fn.popover = n, this;
};
}(jQuery), function(t) {
"use strict";
function e(n, i) {
var r, o = t.proxy(this.process, this);
this.$element = t(t(n).is("body") ? window : n), this.$body = t("body"), this.$scrollElement = this.$element.on("scroll.bs.scroll-spy.data-api", o),
this.options = t.extend({}, e.DEFAULTS, i), this.selector = (this.options.target || (r = t(n).attr("href")) && r.replace(/.*(?=#[^\s]+$)/, "") || "") + " .nav li > a",
this.offsets = t([]), this.targets = t([]), this.activeTarget = null, this.refresh(),
this.process();
}
e.DEFAULTS = {
offset: 10
}, e.prototype.refresh = function() {
var e = this.$element[0] == window ? "offset" : "position";
this.offsets = t([]), this.targets = t([]);
var n = this;
this.$body.find(this.selector).map(function() {
var i = t(this), r = i.data("target") || i.attr("href"), o = /^#\w/.test(r) && t(r);
return o && o.length && [ [ o[e]().top + (!t.isWindow(n.$scrollElement.get(0)) && n.$scrollElement.scrollTop()), r ] ] || null;
}).sort(function(t, e) {
return t[0] - e[0];
}).each(function() {
n.offsets.push(this[0]), n.targets.push(this[1]);
});
}, e.prototype.process = function() {
var t, e = 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 (e >= i) return a != (t = o.last()[0]) && this.activate(t);
for (t = r.length; t--; ) a != o[t] && e >= r[t] && (!r[t + 1] || e <= r[t + 1]) && this.activate(o[t]);
}, e.prototype.activate = function(e) {
this.activeTarget = e, t(this.selector).parents(".active").removeClass("active");
var n = this.selector + '[data-target="' + e + '"],' + this.selector + '[href="' + e + '"]', i = t(n).parents("li").addClass("active");
i.parent(".dropdown-menu").length && (i = i.closest("li.dropdown").addClass("active")),
i.trigger("activate.bs.scrollspy");
};
var n = t.fn.scrollspy;
t.fn.scrollspy = function(n) {
return this.each(function() {
var i = t(this), r = i.data("bs.scrollspy"), o = "object" == typeof n && n;
r || i.data("bs.scrollspy", r = new e(this, o)), "string" == typeof n && r[n]();
});
}, t.fn.scrollspy.Constructor = e, t.fn.scrollspy.noConflict = function() {
return t.fn.scrollspy = n, this;
}, t(window).on("load", function() {
t('[data-spy="scroll"]').each(function() {
var e = t(this);
e.scrollspy(e.data());
});
});
}(jQuery), function(t) {
"use strict";
var e = function(e) {
this.element = t(e);
};
e.prototype.show = function() {
var e = this.element, n = e.closest("ul:not(.dropdown-menu)"), i = e.data("target");
if (i || (i = e.attr("href"), i = i && i.replace(/.*(?=#[^\s]*$)/, "")), !e.parent("li").hasClass("active")) {
var r = n.find(".active:last a")[0], o = t.Event("show.bs.tab", {
relatedTarget: r
});
if (e.trigger(o), !o.isDefaultPrevented()) {
var a = t(i);
this.activate(e.parent("li"), n), this.activate(a, a.parent(), function() {
e.trigger({
type: "shown.bs.tab",
relatedTarget: r
});
});
}
}
}, e.prototype.activate = function(e, n, i) {
function r() {
o.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),
e.addClass("active"), a ? (e[0].offsetWidth, e.addClass("in")) : e.removeClass("fade"),
e.parent(".dropdown-menu") && e.closest("li.dropdown").addClass("active"), i && i();
}
var o = n.find("> .active"), a = i && t.support.transition && o.hasClass("fade");
a ? o.one(t.support.transition.end, r).emulateTransitionEnd(150) : r(), o.removeClass("in");
};
var n = t.fn.tab;
t.fn.tab = function(n) {
return this.each(function() {
var i = t(this), r = i.data("bs.tab");
r || i.data("bs.tab", r = new e(this)), "string" == typeof n && r[n]();
});
}, t.fn.tab.Constructor = e, t.fn.tab.noConflict = function() {
return t.fn.tab = n, this;
}, t(document).on("click.bs.tab.data-api", '[data-toggle="tab"], [data-toggle="pill"]', function(e) {
e.preventDefault(), t(this).tab("show");
});
}(jQuery), function(t) {
"use strict";
var e = function(n, i) {
this.options = t.extend({}, e.DEFAULTS, i), this.$window = t(window).on("scroll.bs.affix.data-api", t.proxy(this.checkPosition, this)).on("click.bs.affix.data-api", t.proxy(this.checkPositionWithEventLoop, this)),
this.$element = t(n), this.affixed = this.unpin = null, this.checkPosition();
};
e.RESET = "affix affix-top affix-bottom", e.DEFAULTS = {
offset: 0
}, e.prototype.checkPositionWithEventLoop = function() {
setTimeout(t.proxy(this.checkPosition, this), 1);
}, e.prototype.checkPosition = function() {
if (this.$element.is(":visible")) {
var n = t(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 && i <= a && "top");
this.affixed !== l && (this.unpin && this.$element.css("top", ""), this.affixed = l,
this.unpin = "bottom" == l ? r.top - i : null, this.$element.removeClass(e.RESET).addClass("affix" + (l ? "-" + l : "")),
"bottom" == l && this.$element.offset({
top: document.body.offsetHeight - s - this.$element.height()
}));
}
};
var n = t.fn.affix;
t.fn.affix = function(n) {
return this.each(function() {
var i = t(this), r = i.data("bs.affix"), o = "object" == typeof n && n;
r || i.data("bs.affix", r = new e(this, o)), "string" == typeof n && r[n]();
});
}, t.fn.affix.Constructor = e, t.fn.affix.noConflict = function() {
return t.fn.affix = n, this;
}, t(window).on("load", function() {
t('[data-spy="affix"]').each(function() {
var e = t(this), n = e.data();
n.offset = n.offset || {}, n.offsetBottom && (n.offset.bottom = n.offsetBottom),
n.offsetTop && (n.offset.top = n.offsetTop), e.affix(n);
});
});
}(jQuery), define("bootstrap", [ "jquery" ], function() {}), function(t, e) {
var n, i;
i = e.document, n = function() {
function n(n) {
this._options = t.extend({
name: "tour",
container: "body",
keyboard: !0,
storage: e.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(t, e) {},
afterGetState: function(t, e) {},
afterRemoveState: function(t) {},
onStart: function(t) {},
onEnd: function(t) {},
onShow: function(t) {},
onShown: function(t) {},
onHide: function(t) {},
onHidden: function(t) {},
onNext: function(t) {},
onPrev: function(t) {},
onPause: function(t, e) {},
onResume: function(t, e) {}
}, 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(t, e) {
var n, i;
if (this._options.storage) {
i = this._options.name + "_" + t;
try {
this._options.storage.setItem(i, e);
} catch (t) {
n = t, n.code === DOMException.QUOTA_EXCEEDED_ERR && this.debug("LocalStorage quota exceeded. setState failed.");
}
return this._options.afterSetState(i, e);
}
return null == this._state && (this._state = {}), this._state[t] = e;
}, n.prototype.removeState = function(t) {
var e;
return this._options.storage ? (e = this._options.name + "_" + t, this._options.storage.removeItem(e),
this._options.afterRemoveState(e)) : null != this._state ? delete this._state[t] : void 0;
}, n.prototype.getState = function(t) {
var e, n;
return this._options.storage ? (e = this._options.name + "_" + t, n = this._options.storage.getItem(e)) : null != this._state && (n = this._state[t]),
void 0 !== n && "null" !== n || (n = null), this._options.afterGetState(t, n), n;
}, n.prototype.addSteps = function(t) {
var e, n, i, r;
for (r = [], n = 0, i = t.length; n < i; n++) e = t[n], r.push(this.addStep(e));
return r;
}, n.prototype.addStep = function(t) {
return this._steps.push(t);
}, n.prototype.getStep = function(e) {
if (null != this._steps[e]) return t.extend({
id: "step-" + e,
path: "",
placement: "right",
title: "",
content: "<p></p>",
next: e === this._steps.length - 1 ? -1 : e + 1,
prev: e - 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[e]);
}, n.prototype.init = function(t) {
var e = this;
return this._force = t, this.ended() ? this._debug("Tour ended, init prevented.") : (this.setCurrentStep(),
this._setupMouseNavigation(), this._setupKeyboardNavigation(), this._onResize(function() {
return e.showStep(e._current);
}), null !== this._current && this.showStep(this._current), this._inited = !0, this);
}, n.prototype.start = function(t) {
var e;
if (null == t && (t = !1), this._inited || this.init(t), null === this._current) return e = this._makePromise(null != this._options.onStart ? this._options.onStart(this) : void 0),
this._callOnPromiseDone(e, this.showStep, 0);
}, n.prototype.next = function() {
var t;
return this.ended() ? this._debug("Tour ended, next prevented.") : (t = this.hideStep(this._current),
this._callOnPromiseDone(t, this._showNextStep));
}, n.prototype.prev = function() {
var t;
return this.ended() ? this._debug("Tour ended, prev prevented.") : (t = this.hideStep(this._current),
this._callOnPromiseDone(t, this._showPrevStep));
}, n.prototype.goTo = function(t) {
var e;
return this.ended() ? this._debug("Tour ended, goTo prevented.") : (e = this.hideStep(this._current),
this._callOnPromiseDone(e, this.showStep, t));
}, n.prototype.end = function() {
var n, r, o = this;
return n = function(n) {
if (t(i).off("click.tour-" + o._options.name), t(i).off("keyup.tour-" + o._options.name),
t(e).off("resize.tour-" + o._options.name), o.setState("end", "yes"), o._inited = !1,
o._force = !1, o._clearTimer(), null != o._options.onEnd) return o._options.onEnd(o);
}, 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 t;
if ((t = this.getStep(this._current)) && t.duration) return this._paused = !0, this._duration -= new Date().getTime() - this._start,
e.clearTimeout(this._timer), this._debug("Paused/Stopped step " + (this._current + 1) + " timer (" + this._duration + " remaining)."),
null != t.onPause ? t.onPause(this, this._duration) : void 0;
}, n.prototype.resume = function() {
var t, n = this;
if ((t = this.getStep(this._current)) && t.duration) return this._paused = !1, this._start = new Date().getTime(),
this._duration = this._duration || t.duration, this._timer = e.setTimeout(function() {
return n._isLast() ? n.next() : n.end();
}, this._duration), this._debug("Started step " + (this._current + 1) + " timer with duration " + this._duration),
null != t.onResume && this._duration !== t.duration ? t.onResume(this, this._duration) : void 0;
}, n.prototype.hideStep = function(e) {
var n, i, r, o = this;
if (r = this.getStep(e)) return this._clearTimer(), i = this._makePromise(null != r.onHide ? r.onHide(this, e) : void 0),
n = function(e) {
var n;
if (n = t(r.element), n.data("bs.popover") || n.data("popover") || (n = t("body")),
n.popover("destroy"), r.reflex && n.css("cursor", "").off("click.tour-" + o._options.name),
r.backdrop && o._hideBackdrop(), null != r.onHidden) return r.onHidden(o);
}, this._callOnPromiseDone(i, n), i;
}, n.prototype.showStep = function(e) {
var n, r, o, a, s = this;
if (a = this.getStep(e)) return o = e < this._current, n = this._makePromise(null != a.onShow ? a.onShow(this, e) : void 0),
r = function(n) {
var r, l;
if (s.setCurrentStep(e), l = t.isFunction(a.path) ? a.path.call() : s._options.basePath + a.path,
r = [ i.location.pathname, i.location.hash ].join(""), s._isRedirect(l, r)) return void s._redirect(a, l);
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, e),
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;
}, n.prototype.setCurrentStep = function(t) {
return null != t ? (this._current = t, this.setState("current_step", t)) : (this._current = this.getState("current_step"),
this._current = null === this._current ? null : parseInt(this._current, 10)), this;
}, n.prototype._showNextStep = function() {
var t, e, n, i = this;
return n = this.getStep(this._current), e = function(t) {
return i.showStep(n.next);
}, t = this._makePromise(null != n.onNext ? n.onNext(this) : void 0), this._callOnPromiseDone(t, e);
}, n.prototype._showPrevStep = function() {
var t, e, n, i = this;
return n = this.getStep(this._current), e = function(t) {
return i.showStep(n.prev);
}, t = this._makePromise(null != n.onPrev ? n.onPrev(this) : void 0), this._callOnPromiseDone(t, e);
}, n.prototype._debug = function(t) {
if (this._options.debug) return e.console.log("Bootstrap Tour '" + this._options.name + "' | " + t);
}, n.prototype._isRedirect = function(t, e) {
return null != t && "" !== t && t.replace(/\?.*$/, "").replace(/\/?$/, "") !== e.replace(/\/?$/, "");
}, n.prototype._redirect = function(e, n) {
return t.isFunction(e.redirect) ? e.redirect.call(this, n) : !0 === e.redirect ? (this._debug("Redirect to " + n),
i.location.href = n) : void 0;
}, n.prototype._isOrphan = function(e) {
return null == e.element || !t(e.element).length || t(e.element).is(":hidden") && "http://www.w3.org/2000/svg" !== t(e.element)[0].namespaceURI;
}, n.prototype._isLast = function() {
return this._current < this._steps.length - 1;
}, n.prototype._showPopover = function(e, n) {
var i, r, o, a, s, l, c = this;
if (l = t.extend({}, this._options), o = t(t.isFunction(e.template) ? e.template(n, e) : e.template),
r = o.find(".popover-navigation"), s = this._isOrphan(e), s && (e.element = "body",
e.placement = "top", o = o.addClass("orphan")), i = t(e.element), o.addClass("tour-" + this._options.name),
e.options && t.extend(l, e.options), e.reflex && i.css("cursor", "pointer").on("click.tour-" + this._options.name, function() {
return c._isLast() ? c.next() : c.end();
}), e.prev < 0 && r.find("*[data-role=prev]").addClass("disabled"), e.next < 0 && r.find("*[data-role=next]").addClass("disabled"),
e.duration || r.find("*[data-role='pause-resume']").remove(), e.template = o.clone().wrap("<div>").parent().html(),
i.popover({
placement: e.placement,
trigger: "manual",
title: e.title,
content: e.content,
html: !0,
animation: e.animation,
container: e.container,
template: e.template,
selector: e.element
}).popover("show"), a = i.data("bs.popover") ? i.data("bs.popover").tip() : i.data("popover").tip(),
a.attr("id", e.id), this._reposition(a, e), s) return this._center(a);
}, n.prototype._reposition = function(e, n) {
var r, o, a, s, l, c, u;
if (s = e[0].offsetWidth, o = e[0].offsetHeight, u = e.offset(), l = u.left, c = u.top,
r = t(i).outerHeight() - u.top - e.outerHeight(), r < 0 && (u.top = u.top + r),
a = t("html").outerWidth() - u.left - e.outerWidth(), a < 0 && (u.left = u.left + a),
u.top < 0 && (u.top = 0), u.left < 0 && (u.left = 0), e.offset(u), "bottom" === n.placement || "top" === n.placement) {
if (l !== u.left) return this._replaceArrow(e, 2 * (u.left - l), s, "left");
} else if (c !== u.top) return this._replaceArrow(e, 2 * (u.top - c), o, "top");
}, n.prototype._center = function(n) {
return n.css("top", t(e).outerHeight() / 2 - n.outerHeight() / 2);
}, n.prototype._replaceArrow = function(t, e, n, i) {
return t.find(".arrow").css(i, e ? 50 * (1 - e / n) + "%" : "");
}, n.prototype._scrollIntoView = function(n, i) {
var r, o, a, s, l, c = this;
return n ? (r = t(n), o = t(e), 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 + "."),
t("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 t(e).on("resize.tour-" + this._options.name, function() {
return clearTimeout(i), i = setTimeout(n, 100);
});
}, n.prototype._setupMouseNavigation = function() {
var e = this;
return e = this, t(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(t) {
return t.preventDefault(), e.next();
}), t(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(t) {
return t.preventDefault(), e.prev();
}), t(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(t) {
return t.preventDefault(), e.end();
}), t(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 = t(this), i.text(e._paused ? i.data("pause-text") : i.data("resume-text")),
e._paused ? e.resume() : e.pause();
});
}, n.prototype._setupKeyboardNavigation = function() {
var e = this;
if (this._options.keyboard) return t(i).on("keyup.tour-" + this._options.name, function(t) {
if (t.which) switch (t.which) {
case 39:
return t.preventDefault(), e._isLast() ? e.next() : e.end();
case 37:
if (t.preventDefault(), e._current > 0) return e.prev();
break;
case 27:
return t.preventDefault(), e.end();
}
});
}, n.prototype._makePromise = function(e) {
return e && t.isFunction(e.then) ? e : null;
}, n.prototype._callOnPromiseDone = function(t, e, n) {
var i = this;
return t ? t.then(function(t) {
return e.call(i, n);
}) : e.call(this, n);
}, n.prototype._showBackdrop = function(e) {
if (!this.backdrop.backgroundShown) return this.backdrop = t("<div/>", {
"class": "tour-backdrop"
}), this.backdrop.backgroundShown = !0, t("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(e) {
var n, i, r;
if (!this.backdrop.overlayElementShown) return this.backdrop.overlayElementShown = !0,
i = t(e), n = t("<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"), t("body").append(n), this.backdrop.$element = i,
this.backdrop.$background = n;
}, n.prototype._hideOverlayElement = function() {
if (this.backdrop.overlayElementShown) return this.backdrop.$element.removeClass("tour-step-backdrop"),
this.backdrop.$background.remove(), this.backdrop.$element = null, this.backdrop.$background = null,
this.backdrop.overlayElementShown = !1;
}, n.prototype._clearTimer = function() {
return e.clearTimeout(this._timer), this._timer = null, this._duration = null;
}, n;
}(), e.Tour = n;
}(jQuery, window), define("bootstrap-tour", [ "bootstrap" ], function(t) {
return function() {
return t.Tour;
};
}(this)), define("extensions/welcomeTour", [ "underscore", "jquery", "storage", "utils", "classes/Extension", "bootstrap-tour" ], function(t, e, n, i, r, o) {
var a, s = new r("welcomeTour", "Welcome tour", (!1), (!0));
return s.onEventMgrCreated = function(t) {
a = t;
}, s.onReady = function() {
var t = new o({
keyboard: !1,
storage: {
getItem: function() {},
setItem: function() {},
removeItem: function() {}
},
onEnd: function() {},
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">OK</button>', " </nav>", "</div>" ].join("")
});
t.addSteps([ {
element: ".navbar-inner",
title: "StackEdit 4 is deprecated",
content: [ "<p><b>StackEdit 5</b> is now ready for production!</p>", '<p>If you want to migrate, <a href="#" class="action-export-docs-tour">click here</a> to export a backup of your files.</p>', "<p>To import the backup in StackEdit 5, go to Menu > More > Import workspace backup.</p>", '<p><a href="app" target="_blank">Click here</a> to open StackEdit 5 now!</p>', "You can always click <b>OK</b> to continue with StackEdit 4." ].join(""),
placement: "bottom",
onShown: function() {
e(".action-export-docs-tour").click(function() {
i.saveAs(JSON.stringify(n), "StackEdit local storage.json");
});
}
} ]), t.start(), e(".action-welcome-tour").click(function() {
t.restart();
});
}, s;
}), 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\t<div class="form-group">\n\t\t<label class="col-sm-3 control-label" for="textarea-shortcuts-mapping">Mapping\n\t\t\t<a href="#" class="tooltip-shortcuts-extension">(?)</a>\n\t\t</label>\n\t\t<div class="col-sm-8">\n\t\t\t<textarea id="textarea-shortcuts-mapping" class="form-control"></textarea>\n\t\t</div>\n\t</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\texpand(\'--> \', \'\u2192 \');\n<br />\n}\n<br />\n<br />\n<a target="_blank"\n\thref="http://craig.is/killing/mice">More\n\tinfo</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(t) {
return function(e) {
pagedownEditor.uiManager.doClick(pagedownEditor.uiManager.buttons[t]), e.preventDefault();
};
}
function expand(t, e) {
utils.defer(function() {
require("editor").replacePreviousText(t, e);
});
}
var shortcuts = new Extension("shortcuts", "Shortcuts", (!0), (!0));
shortcuts.settingsBlock = shortcutsSettingsBlockHTML, shortcuts.defaultConfig = {
mapping: shortcutsDefaultMapping
};
var eventMgr, pagedownEditor;
return shortcuts.onEventMgrCreated = function(t) {
eventMgr = t, eventMgr.addListener("onPagedownConfigure", function(t) {
pagedownEditor = t;
});
}, 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(t, e) {
mousetrap.bind(e, t);
});
} 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\t<div class="form-group">\n\t\t<label class="col-sm-4 control-label" for="textarea-usercustom-code">JavaScript code\n\t\t\t<a href="#" class="tooltip-usercustom-extension">(?)</a>\n\t\t</label>\n\t\t<div class="col-sm-7">\n\t\t\t<textarea id="textarea-usercustom-code" class="form-control"></textarea>\n\t\t</div>\n\t</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\thref="https://github.com/benweet/stackedit/blob/master/doc/developer-guide.md#architecture">More\n\tinfo</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(t) {
fileMgr = t;
};
var synchronizer;
userCustom.onSynchronizerCreated = function(t) {
synchronizer = t;
};
var publisher;
userCustom.onPublisherCreated = function(t) {
publisher = t;
};
var eventMgr;
return userCustom.onEventMgrCreated = function(t) {
eventMgr = t, 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(t, e, n, i, r, o, a, s) {
function l(t, e, n) {
e = Math.round(e);
for (var i = e - 21; i < e + 22; ) S[i] && (e = i + 22), i++;
!n && (S[e] = 1);
var r = -8;
-1 !== t.className.indexOf(" icon-split") && (r = -12);
var o = e + r;
t.style.top = o + "px", t.style.right = "12px";
}
function c(e, n) {
this.commentElt = e, this.$commentElt = t(e).addClass("active"), this.fileDesc = n,
this.discussionIndex = e.discussionIndex;
}
function u(t) {
var e = _.getPopoverElt(), n = 0;
e.offsetWidth < x.offsetWidth - 10 && (n = x.offsetWidth - 10 - e.offsetWidth),
e.style.left = n + "px", e.querySelector(".arrow").style.left = x.offsetWidth - parseInt(t.style.right) - t.offsetWidth / 2 - n + "px";
var i = window.innerHeight - _.hr.getBoundingClientRect().top;
i < 0 && (e.style.top = parseInt(e.style.top) + i + "px");
}
function d() {
_ && _.$commentElt.popover("toggle").popover("destroy");
}
function p() {
var t = _.getDiscussion(), n = i["author.name"], r = [];
return t.commentList && (r = t.commentList.map(function(t) {
var i = t.author || "Anonymous";
return e.template(m, {
author: i,
content: t.content,
reply: t.author != n
});
})), "conflict" == t.type && r.unshift(e.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(t) {
h = t;
};
var v, b;
f.onEditorCreated = function(t) {
v = t, 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 = e.debounce(function() {
function t() {
var i;
if (0 === o.length) return e.filter(N, function(t, n) {
return !e.has(E.discussionList, n);
}).forEach(function(t) {
x.removeChild(t), delete N[t.discussionIndex];
}), l(C, w, !0), _ && !_.discussionIndex && (y.scrollTop += parseInt(C.style.top) - y.scrollTop - 3 * y.offsetHeight / 4,
u(C)), M = e.sortBy(N, function(t) {
return t.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 || e.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(t, 5);
}
if (void 0 !== E) {
L = !1, M = [];
var n = i["author.name"];
S = [];
var o = e.sortBy(E.discussionList, function(t) {
return t.selectionEnd;
});
clearTimeout(T), T = setTimeout(t, 5);
}
}, 50);
return f.onLayoutResize = A, f.onFileOpen = function(t) {
E = t, A();
}, f.onContentChanged = function(t) {
E === t && A();
}, f.onCursorCoordinates = function(t, e) {
w = e, l(C, e, !0);
}, f.onCommentsChanged = function(t) {
if (E === t) {
if (void 0 !== _) {
var e = _;
e.discussionIndex && (e.getPopoverElt().querySelector(".discussion-comment-list").innerHTML = p());
try {
k.undoToRange(e.rangyRange);
} catch (t) {}
var n = e.getDiscussion();
e.selectionRange = b.createRange(n.selectionStart, n.selectionEnd), e.rangyRange = o.createRange(),
e.rangyRange.setStart(e.selectionRange.startContainer, e.selectionRange.startOffset),
e.rangyRange.setEnd(e.selectionRange.endContainer, e.selectionRange.endOffset),
setTimeout(function() {
_ === e && k.applyToRange(e.rangyRange);
}, 50);
}
A();
}
}, f.onEditorPopover = function() {
d();
}, f.onDiscussionCreated = function(t) {
E === t && A();
}, f.onDiscussionRemoved = function(t, e) {
E === t && (void 0 !== _ && _.discussionIndex == e.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 = t(r("div", {
"class": "comments-popover"
}));
t(document.body).append(l).on("click", function(t) {
_ && _.$commentElt[0] !== t.target && d();
}).popover({
placement: "auto top",
container: ".comments-popover",
html: !0,
title: function() {
if (!_) return !0;
var t = _.getDiscussion(), n = t.selectionEnd - t.selectionStart, i = v.getValue().substr(t.selectionStart, n > 20 ? 20 : n);
return n > 20 && (i += "..."), e.template(g, {
title: i
});
},
content: function() {
return e.template(s, {
commentList: p()
});
},
selector: "#wmd-input > .editor-margin > .discussion"
}), t(x).on("show.bs.popover", function(t) {
h.onEditorPopover();
var e = new c(t.target, E);
_ = e;
var n = e.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;
}
e.selectionRange = b.createRange(n.selectionStart, n.selectionEnd), y.scrollTop += parseInt(t.target.style.top) - y.scrollTop - 3 * y.offsetHeight / 4;
}).on("shown.bs.popover", function(r) {
var s = _, l = s.getPopoverElt();
s.$authorInputElt = t(l.querySelector(".input-comment-author")).val(i["author.name"]),
s.$contentInputElt = t(l.querySelector(".input-comment-content")), s.hr = l.querySelector("hr"),
u(s.commentElt), l.querySelector(".scrollport").scrollTop = 9999999;
var c = t(l.querySelector(".action-add-comment"));
t().add(s.$contentInputElt).add(s.$authorInputElt).keydown(function(t) {
13 === t.which && (t.preventDefault(), c.click());
}), c.click(function(t) {
var i = n.getInputTextValue(s.$authorInputElt), r = n.getInputTextValue(s.$contentInputElt, t);
if (!t.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 (e.has(a, l));
o.discussionIndex = l, a[l] = o, s.fileDesc.discussionList = a, h.onDiscussionCreated(s.fileDesc, o);
}
y.focus();
}
});
var p = t(l.querySelector(".action-remove-discussion"));
r.target.discussionIndex ? p.click(function() {
d();
var t = s.getDiscussion();
delete s.fileDesc.discussionList[t.discussionIndex], s.fileDesc.discussionList = s.fileDesc.discussionList,
h.onDiscussionRemoved(s.fileDesc, t), 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 (t) {}
_ = void 0, delete E.newDiscussion;
}
}), l.on("click", ".popover", function(t) {
t.stopPropagation();
});
var f = t(C);
I = t(".button-open-discussion").click(function(n) {
var i = f;
if (_) if (_.discussionIndex) {
var r = -1;
M.some(function(t, e) {
if (t === _.commentElt) return r = e, !0;
}), i = t(M[r + 1]);
} else i = t(e.first(M)); else b.selectionStart === b.selectionEnd && M.length && (i = t(e.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\t<div class="form-group">\n\t\t<label class="col-sm-5 control-label"\n\t\t\tfor="input-find-replace-shortcut">Shortcut <a href="http://craig.is/killing/mice#keys" target="_blank">(?)</a></label>\n\t\t<div class="col-sm-6">\n\t\t\t<input type="text" id="input-find-replace-shortcut"\n\t\t\t\tclass="form-control">\n\t\t</div>\n\t</div>\n</div>';
}), define("extensions/findReplace", [ "jquery", "underscore", "crel", "utils", "classes/Extension", "mousetrap", "rangy", "text!html/findReplace.html", "text!html/findReplaceSettingsBlock.html" ], function(t, e, n, i, r, o, a, s, l) {
function c() {
u(), M.forEach(function(t) {
try {
x.undoToRange(t);
} catch (t) {}
}), M = [];
}
function u() {
if (S) {
try {
S && w.undoToRange(S);
} catch (t) {}
S = void 0;
}
}
function d(t) {
function e(t) {
return t.container === s.container ? {
container: o.endContainer.parentElement.nextSibling,
offsetInContainer: t.offsetInContainer - s.offsetInContainer,
offset: t.offset
} : t;
}
if (O) {
var n = k.val(), i = I.prop("checked"), r = D.prop("checked");
if (t || 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(t, e) {
L.push({
start: e,
end: e + t.length
});
}), l = L.length, L.length < 200) {
var d = [];
L.forEach(function(t) {
d.push(t.start), d.push(t.end);
}), d = b.selectionMgr.findOffsets(d);
for (var p = 0; p < d.length; p += 2) {
var h = d[p], f = d[p + 1], m = e(h), g = e(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 (t) {}
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 t = Math.min(b.selectionMgr.selectionStart, b.selectionMgr.selectionEnd), n = e.find(L, function(e) {
return e.start > t;
});
if (n || (n = e.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 t = E.val();
b.replace(S.start, S.end, t), setTimeout(function() {
f(), E.focus();
}, 1);
}
function g() {
var t = E.val();
b.replaceAll(N, t);
}
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(t, e) {
t.findReplaceShortcut = i.getInputTextValue("#input-find-replace-shortcut", e);
};
var b;
v.onEditorCreated = function(t) {
b = t;
};
var y;
v.onEventMgrCreated = function(t) {
y = t;
};
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 = e.bind(d, null, !0), v.onFileOpen = e.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"
});
_ = t(i).hide(), i.innerHTML = s, document.querySelector(".layout-wrapper-l2").appendChild(i),
t(".button-find-replace-dismiss").click(function() {
h();
}), T = i.querySelector(".found-counter"), I = _.find(".checkbox-case-sensitive").change(e.bind(d, null, !1)),
D = _.find(".checkbox-regexp").change(e.bind(d, null, !1)), _.find(".search-button").click(f),
k = t("#input-find-replace-search-for").keyup(e.bind(d, null, !1)), _.find(".replace-button").click(m),
E = t("#input-find-replace-replace-with"), _.find(".replace-all-button").click(g),
t().add(k).add(E).keydown(function(t) {
13 === t.which && (t.preventDefault(), f());
}), o.bind(v.config.findReplaceShortcut, function(t) {
var e = b.selectionMgr.getSelectedText();
e && k.val(e), p(), t.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(t, e, n, i, r, o) {
function a(t, e) {
var i, r = e ? m : f;
if ("" !== (i = n.urlResolve(t).href) && !i.match(r)) return "unsafe:" + i;
}
function s(t) {
var e, n = {}, i = t.split(",");
for (e = 0; e < i.length; e++) n[i[e]] = !0;
return n;
}
function l(t, e) {
function n(t, 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(t, e, n, i, r) {
var o = n || i || r || "";
a[e] = c(o);
}), e.start && e.start(n, a, o);
}
function i(t, 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--) e.end && e.end(s[i]);
s.length = r;
}
}
var r, o, a, s = [], l = t;
for (s.last = function() {
return s[s.length - 1];
}; t; ) {
if (o = !0, s.last() && M[s.last()]) t = t.replace(new RegExp("(.*)<\\s*\\/\\s*" + s.last() + "[^>]*>", "i"), function(t, n) {
return n = n.replace(w, "$1").replace(C, "$1"), e.chars && e.chars(c(n)), "";
}), i("", s.last()); else if (0 === t.indexOf("<!--") ? (r = t.indexOf("--", 4)) >= 0 && t.lastIndexOf("-->", r) === r && (e.comment && e.comment(t.substring(4, r)),
t = t.substring(r + 3), o = !1) : S.test(t) ? (a = t.match(S)) && (t = t.replace(a[0], ""),
o = !1) : x.test(t) ? (a = t.match(v)) && (t = t.substring(a[0].length), a[0].replace(v, i),
o = !1) : y.test(t) && (a = t.match(g)) && (t = t.substring(a[0].length), a[0].replace(g, n),
o = !1), o) {
r = t.indexOf("<");
var u = r < 0 ? t : t.substring(0, r);
t = r < 0 ? "" : t.substring(r), e.chars && e.chars(c(u));
}
if (t == l) return s.reverse(), s.forEach(function(t) {
h.push("</"), h.push(t), h.push(">");
});
l = t;
}
i();
}
function c(t) {
if (!t) return "";
var e = O.exec(t), n = e[1], i = e[3], r = e[2];
return r && (P.innerHTML = r.replace(/</g, "&lt;"), r = "textContent" in P ? P.textContent : P.innerText),
n + r + i;
}
function u(t) {
return t.replace(/&/g, "&amp;").replace(_, function(t) {
return "&#" + t.charCodeAt(0) + ";";
}).replace(/</g, "&lt;").replace(/>/g, "&gt;");
}
function d(t, n) {
var i = !1, r = e.bind(t.push, t);
return {
start: function(t, o, a) {
t = t && t.toLowerCase(), !i && M[t] && (i = t), i || !0 !== L[t] || (r("<"), r(t),
e.forEach(o, function(e, i) {
var o = i && i.toLowerCase(), a = "img" === t && "src" === o || "background" === o;
!0 !== R[o] || !0 === A[o] && !n(e, a) || (r(" "), r(i), r('="'), r(u(e)), r('"'));
}), r(a ? "/>" : ">"));
},
end: function(t) {
t = t && t.toLowerCase(), i || !0 !== L[t] || (r("</"), r(t), r(">")), t == i && (i = !1);
},
chars: function(t) {
i || r(u(t));
},
comment: function(t) {
i || (r("<!--"), r(u(t)), r("-->"));
}
};
}
var p = new r("htmlSanitizer", "HTML Sanitizer", (!0));
p.settingsBlock = o;
var h;
p.onPagedownConfigure = function(t) {
t.getConverter().hooks.chain("postConversion", function(t) {
return h = [], t.split('<div class="se-preview-section-delimiter"></div>').forEach(function(t) {
l(t, d(h, function(t, e) {
return !/^unsafe/.test(a(t, e));
})), 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 = e.extend({}, T, E), D = e.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 = e.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 = e.extend({}, k, D, N, I), A = s("background,cite,href,longdesc,src,usemap"), R = e.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(t) {
t.waitForImages = {
hasImageProperties: [ "backgroundImage", "listStyleImage", "borderImage", "borderCornerImage" ]
}, t.expr[":"].uncached = function(e) {
if (!t(e).is('img[src!=""]')) return !1;
var n = new Image();
return n.src = e.src, !n.complete;
}, t.fn.waitForImages = function(e, n, i) {
var r = 0, o = 0;
if (t.isPlainObject(arguments[0]) && (i = arguments[0].waitForAll, n = arguments[0].each,
e = arguments[0].finished), e = e || t.noop, n = n || t.noop, i = !!i, !t.isFunction(e) || !t.isFunction(n)) throw new TypeError("An invalid callback was supplied.");
return this.each(function() {
var a = t(this), s = [], l = t.waitForImages.hasImageProperties || [], c = /url\(\s*(['"]?)(.*?)\1\s*\)/g;
i ? a.find("*").andSelf().each(function() {
var e = t(this);
e.is("img:uncached") && s.push({
src: e.attr("src"),
element: e[0]
}), t.each(l, function(t, n) {
var i, r = e.css(n);
if (!r) return !0;
for (;i = c.exec(r); ) s.push({
src: i[2],
element: e[0]
});
});
}) : a.find("img:uncached").each(function() {
s.push({
src: this.src,
element: this
});
}), r = s.length, o = 0, 0 === r && e.call(a[0]), t.each(s, function(i, s) {
var l = new Image();
t(l).bind("load.waitForImages error.waitForImages", function(t) {
if (o++, n.call(s.element, o, r, "load" == t.type), o == r) return e.call(a[0]),
!1;
}), 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(t, e, n, i, r, o, a, s, l) {
function c(t) {
return e.chain(h).map(function(e) {
return e.enabled && e[t];
}).compact().value();
}
function u(t) {
return m[t] = c(t), function() {
o.log(t, arguments);
var n = arguments;
e.each(m[t], function(t) {
try {
t.apply(null, n);
} catch (t) {
console.error(e.isObject(t) ? t.stack : t);
}
});
};
}
function d(t) {
p[t] = u(t);
}
var p = {}, h = e.chain(arguments).map(function(t) {
return t instanceof a && t;
}).compact().value(), f = s.extensionSettings || {};
e.each(h, function(t) {
t.config = e.extend({}, t.defaultConfig, f[t.extensionId]), !0 === window.viewerMode && !0 === t.disableInViewer ? t.enabled = !1 : t.enabled = !t.isOptional || void 0 === t.config.enabled || !0 === t.config.enabled;
});
var m = {};
p.addListener = function(t, e) {
try {
m[t].push(e);
} catch (e) {
console.error("No event listener called " + t);
}
}, u("onInit")(), p.onLoadSettings = function() {
o.log("onLoadSettings"), e.each(h, function(t) {
var e = !t.isOptional || void 0 === t.config.enabled || !0 === t.config.enabled;
r.setInputChecked("#input-enable-extension-" + t.extensionId, e), "markdownExtra" == t.extensionId ? r.setInputChecked("#input-settings-markdown-extra", e) : "mathJax" == t.extensionId && r.setInputChecked("#input-settings-mathjax", e);
var n = t.onLoadSettings;
n && n();
});
}, p.onSaveSettings = function(t, n) {
o.log("onSaveSettings"), e.each(h, function(i) {
var o = e.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), t[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 t(n) {
(n.length ? n.shift() : function() {
setTimeout(function() {
var t = "";
e.each(g.children, function(n) {
if (!n.exportableHtml) {
var i = n.cloneNode(!0);
e.each(i.querySelectorAll(".MathJax_SVG, .MathJax_SVG_Display, .MathJax_Preview"), function(t) {
t.parentNode.removeChild(t);
}), n.exportableHtml = i.innerHTML;
}
t += n.exportableHtml;
});
var n = r.trim(t), i = n.replace(/ <span class="comment label label-danger">.*?<\/span> /g, "");
b(n, i);
}, 10);
})(function() {
t(n);
});
}
o.log("onAsyncPreview"), t(y.concat([ function(t) {
v.waitForImages(t);
} ]));
};
var x = u("onReady");
return p.onReady = function() {
g = document.getElementById("preview-contents"), v = t(g);
var r = function(t) {
var i = n("div", {
"class": "btn-group"
}), r = t();
return e.isString(r) ? i.innerHTML = r : e.isElement(r) && i.appendChild(r), i;
};
if (!1 === window.viewerMode) {
var a = e.chain(h).sortBy(function(t) {
return t.extensionName.toLowerCase();
}).reduce(function(t, n) {
return t + (n.settingsBlock ? e.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();
e.each(s, function(t) {
u.appendChild(r(t));
}), document.querySelector(".extension-buttons").appendChild(u);
}
o.log("onCreatePreviewButton");
var d = c("onCreatePreviewButton"), f = document.createDocumentFragment();
e.each(d, function(t) {
f.appendChild(r(t));
}), document.querySelector(".extension-preview-buttons").appendChild(f), i.bind("escape", function() {
p.onEditorPopover();
}), x();
}, p.onEventMgrCreated(p), p;
}), function() {
var t = /\blang(?:uage)?-(?!\*)(\w+)\b/i, e = self.Prism = {
util: {
type: function(t) {
return Object.prototype.toString.call(t).match(/\[object (\w+)\]/)[1];
},
clone: function(t) {
switch (e.util.type(t)) {
case "Object":
var n = {};
for (var i in t) t.hasOwnProperty(i) && (n[i] = e.util.clone(t[i]));
return n;
case "Array":
return t.slice();
}
return t;
}
},
languages: {
extend: function(t, n) {
var i = e.util.clone(e.languages[t]);
for (var r in n) i[r] = n[r];
return i;
},
insertBefore: function(t, n, i, r) {
r = r || e.languages;
var o = r[t], 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[t] = a;
},
DFS: function(t, n) {
for (var i in t) n.call(t, i, t[i]), "Object" === e.util.type(t) && e.languages.DFS(t[i], n);
}
},
highlightAll: function(t, n) {
for (var i, r = document.querySelectorAll('code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'), o = 0; i = r[o++]; ) e.highlightElement(i, !0 === t, n);
},
highlightElement: function(i, r, o) {
for (var a, s, l = i; l && !t.test(l.className); ) l = l.parentNode;
if (l && (a = (l.className.match(t) || [ , "" ])[1], s = e.languages[a]), s) {
i.className = i.className.replace(t, "").replace(/\s+/g, " ") + " language-" + a,
l = i.parentNode, /pre/i.test(l.nodeName) && (l.className = l.className.replace(t, "").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 (e.hooks.run("before-highlight", u), r && self.Worker) {
var d = new Worker(e.filename);
d.onmessage = function(t) {
u.highlightedCode = n.stringify(JSON.parse(t.data), a), e.hooks.run("before-insert", u),
u.element.innerHTML = u.highlightedCode, o && o.call(u.element), e.hooks.run("after-highlight", u);
}, d.postMessage(JSON.stringify({
language: u.language,
code: u.code
}));
} else u.highlightedCode = e.highlight(u.code, u.grammar, u.language), e.hooks.run("before-insert", u),
u.element.innerHTML = u.highlightedCode, o && o.call(i), e.hooks.run("after-highlight", u);
}
}
},
highlight: function(t, i, r) {
return n.stringify(e.tokenize(t, i), r);
},
tokenize: function(t, n, i) {
var r = e.Token, o = [ t ], a = n.rest;
if (a) {
for (var s in a) n[s] = a[s];
delete n.rest;
}
t: for (var s in n) if (n.hasOwnProperty(s) && n[s]) {
var l = n[s], c = l.inside, u = !!l.lookbehind, d = 0;
l = l.pattern || l;
for (var p = 0; p < o.length; p++) {
var h = o[p];
if (o.length > t.length) break t;
if (!(h instanceof r)) {
l.lastIndex = 0;
var f = l.exec(h);
if (f) {
u && (d = f[1].length);
var m = f.index - 1 + d, f = f[0].slice(d), g = f.length, v = m + g, b = h.slice(0, m + 1), y = h.slice(v + 1), x = [ p, 1 ];
b && x.push(b);
var w = new r(s, c ? e.tokenize(f, c) : f);
x.push(w), y && x.push(y), Array.prototype.splice.apply(o, x);
}
}
}
}
return o;
},
hooks: {
all: {},
add: function(t, n) {
var i = e.hooks.all;
i[t] = i[t] || [], i[t].push(n);
},
run: function(t, n) {
var i = e.hooks.all[t];
if (i && i.length) for (var r, o = 0; r = i[o++]; ) r(n);
}
}
}, n = e.Token = function(t, e) {
this.type = t, this.content = e;
};
if (n.stringify = function(t, i, r) {
if ("string" == typeof t) return t;
if ("[object Array]" == Object.prototype.toString.call(t)) return t.map(function(e) {
return n.stringify(e, i, t);
}).join("");
var o = {
type: t.type,
content: n.stringify(t.content, i, r),
tag: "span",
classes: [ "token", t.type ],
attributes: {},
language: i,
parent: r
};
"comment" == o.type && (o.attributes.spellcheck = "true"), e.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(t) {
var n = JSON.parse(t.data), i = n.language, r = n.code;
self.postMessage(JSON.stringify(e.tokenize(r, e.languages[i]))), self.close();
}, !1);
var i = document.getElementsByTagName("script");
(i = i[i.length - 1]) && (e.filename = i.src, document.addEventListener && !i.hasAttribute("data-manual") && document.addEventListener("DOMContentLoaded", e.highlightAll));
}(), define("prism-core", function(t) {
return function() {
return t.Prism;
};
}(this));
var DIFF_DELETE = -1, DIFF_INSERT = 1, DIFF_EQUAL = 0;
diff_match_patch.Diff, diff_match_patch.prototype.diff_main = function(t, e, 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 == t || null == e) throw new Error("Null input. (diff_main)");
if (t == e) return t ? [ [ DIFF_EQUAL, t ] ] : [];
void 0 === n && (n = !0);
var o = n, a = this.diff_commonPrefix(t, e), s = t.substring(0, a);
t = t.substring(a), e = e.substring(a), a = this.diff_commonSuffix(t, e);
var l = t.substring(t.length - a);
t = t.substring(0, t.length - a), e = e.substring(0, e.length - a);
var c = this.diff_compute_(t, e, 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(t, e, n, i) {
var r;
if (!t) return [ [ DIFF_INSERT, e ] ];
if (!e) return [ [ DIFF_DELETE, t ] ];
var o = t.length > e.length ? t : e, a = t.length > e.length ? e : t, 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) ] ],
t.length > e.length && (r[0][0] = r[2][0] = DIFF_DELETE), r;
if (1 == a.length) return [ [ DIFF_DELETE, t ], [ DIFF_INSERT, e ] ];
var l = this.diff_halfMatch_(t, e);
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 && t.length > 100 && e.length > 100 ? this.diff_lineMode_(t, e, i) : this.diff_bisect_(t, e, i);
}, diff_match_patch.prototype.diff_lineMode_ = function(t, e, n) {
var i = this.diff_linesToChars_(t, e);
t = i.chars1, e = i.chars2;
var r = i.lineArray, o = this.diff_main(t, e, !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(t, e, n) {
for (var i = t.length, r = e.length, o = Math.ceil((i + r) / 2), a = o, s = 2 * o, l = new Array(s), c = new Array(s), u = 0; u < s; 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; v < o && !(new Date().getTime() > n); v++) {
for (var b = -v + h; b <= v - f; 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; y < i && w < r && t.charAt(y) == e.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_(t, e, 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 - _; C < i && k < r && t.charAt(i - C - 1) == e.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 && x < s && -1 != l[x]) {
var y = l[x], w = a + y - x;
if (C = i - C, y >= C) return this.diff_bisectSplit_(t, e, y, w, n);
}
}
}
}
return [ [ DIFF_DELETE, t ], [ DIFF_INSERT, e ] ];
}, diff_match_patch.prototype.diff_bisectSplit_ = function(t, e, n, i, r) {
var o = t.substring(0, n), a = e.substring(0, i), s = t.substring(n), l = e.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(t, e) {
function n(t) {
for (var e = "", n = 0, o = -1, a = i.length; o < t.length - 1; ) {
o = t.indexOf("\n", n), -1 == o && (o = t.length - 1);
var s = t.substring(n, o + 1);
n = o + 1, (r.hasOwnProperty ? r.hasOwnProperty(s) : void 0 !== r[s]) ? e += String.fromCharCode(r[s]) : (e += String.fromCharCode(a),
r[s] = a, i[a++] = s);
}
return e;
}
var i = [], r = {};
return i[0] = "", {
chars1: n(t),
chars2: n(e),
lineArray: i
};
}, diff_match_patch.prototype.diff_charsToLines_ = function(t, e) {
for (var n = 0; n < t.length; n++) {
for (var i = t[n][1], r = [], o = 0; o < i.length; o++) r[o] = e[i.charCodeAt(o)];
t[n][1] = r.join("");
}
}, diff_match_patch.prototype.diff_commonPrefix = function(t, e) {
if (!t || !e || t.charAt(0) != e.charAt(0)) return 0;
for (var n = 0, i = Math.min(t.length, e.length), r = i, o = 0; n < r; ) t.substring(o, r) == e.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(t, e) {
if (!t || !e || t.charAt(t.length - 1) != e.charAt(e.length - 1)) return 0;
for (var n = 0, i = Math.min(t.length, e.length), r = i, o = 0; n < r; ) t.substring(t.length - r, t.length - o) == e.substring(e.length - r, e.length - o) ? (n = r,
o = n) : i = r, r = Math.floor((i - n) / 2 + n);
return r;
}, diff_match_patch.prototype.diff_commonOverlap_ = function(t, e) {
var n = t.length, i = e.length;
if (0 == n || 0 == i) return 0;
n > i ? t = t.substring(n - i) : n < i && (e = e.substring(0, n));
var r = Math.min(n, i);
if (t == e) return r;
for (var o = 0, a = 1; ;) {
var s = t.substring(r - a), l = e.indexOf(s);
if (-1 == l) return o;
a += l, 0 != l && t.substring(r - a) != e.substring(0, a) || (o = a, a++);
}
}, diff_match_patch.prototype.diff_halfMatch_ = function(t, e) {
function n(t, e, n) {
for (var i, r, o, s, l = t.substring(n, n + Math.floor(t.length / 4)), c = -1, u = ""; -1 != (c = e.indexOf(l, c + 1)); ) {
var d = a.diff_commonPrefix(t.substring(n), e.substring(c)), p = a.diff_commonSuffix(t.substring(0, n), e.substring(0, c));
u.length < p + d && (u = e.substring(c - p, c) + e.substring(c, c + d), i = t.substring(0, n - p),
r = t.substring(n + d), o = e.substring(0, c - p), s = e.substring(c + d));
}
return 2 * u.length >= t.length ? [ i, r, o, s, u ] : null;
}
if (this.Diff_Timeout <= 0) return null;
var i = t.length > e.length ? t : e, r = t.length > e.length ? e : t;
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 t.length > e.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(t) {
for (var e = !1, n = [], i = 0, r = null, o = 0, a = 0, s = 0, l = 0, c = 0; o < t.length; ) t[o][0] == DIFF_EQUAL ? (n[i++] = o,
a = l, s = c, l = 0, c = 0, r = t[o][1]) : (t[o][0] == DIFF_INSERT ? l += t[o][1].length : c += t[o][1].length,
r && r.length <= Math.max(a, s) && r.length <= Math.max(l, c) && (t.splice(n[i - 1], 0, [ DIFF_DELETE, r ]),
t[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, e = !0)), o++;
for (e && this.diff_cleanupMerge(t), this.diff_cleanupSemanticLossless(t), o = 1; o < t.length; ) {
if (t[o - 1][0] == DIFF_DELETE && t[o][0] == DIFF_INSERT) {
var u = t[o - 1][1], d = t[o][1], p = this.diff_commonOverlap_(u, d), h = this.diff_commonOverlap_(d, u);
p >= h ? (p >= u.length / 2 || p >= d.length / 2) && (t.splice(o, 0, [ DIFF_EQUAL, d.substring(0, p) ]),
t[o - 1][1] = u.substring(0, u.length - p), t[o + 1][1] = d.substring(p), o++) : (h >= u.length / 2 || h >= d.length / 2) && (t.splice(o, 0, [ DIFF_EQUAL, u.substring(0, h) ]),
t[o - 1][0] = DIFF_INSERT, t[o - 1][1] = d.substring(0, d.length - h), t[o + 1][0] = DIFF_DELETE,
t[o + 1][1] = u.substring(h), o++), o++;
}
o++;
}
}, diff_match_patch.prototype.diff_cleanupSemanticLossless = function(t) {
function e(t, e) {
if (!t || !e) return 6;
var n = t.charAt(t.length - 1), i = e.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 && t.match(diff_match_patch.blanklineEndRegex_), d = c && e.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 < t.length - 1; ) {
if (t[n - 1][0] == DIFF_EQUAL && t[n + 1][0] == DIFF_EQUAL) {
var i = t[n - 1][1], r = t[n][1], o = t[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 = e(i, r) + e(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 = e(i, r) + e(r, o);
p >= d && (d = p, l = i, c = r, u = o);
}
t[n - 1][1] != l && (l ? t[n - 1][1] = l : (t.splice(n - 1, 1), n--), t[n][1] = c,
u ? t[n + 1][1] = u : (t.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(t) {
for (var e = !1, n = [], i = 0, r = null, o = 0, a = !1, s = !1, l = !1, c = !1; o < t.length; ) t[o][0] == DIFF_EQUAL ? (t[o][1].length < this.Diff_EditCost && (l || c) ? (n[i++] = o,
a = l, s = c, r = t[o][1]) : (i = 0, r = null), l = c = !1) : (t[o][0] == DIFF_DELETE ? c = !0 : l = !0,
r && (a && s && l && c || r.length < this.Diff_EditCost / 2 && a + s + l + c == 3) && (t.splice(n[i - 1], 0, [ DIFF_DELETE, r ]),
t[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), e = !0)), o++;
e && this.diff_cleanupMerge(t);
}, diff_match_patch.prototype.diff_cleanupMerge = function(t) {
t.push([ DIFF_EQUAL, "" ]);
for (var e, n = 0, i = 0, r = 0, o = "", a = ""; n < t.length; ) switch (t[n][0]) {
case DIFF_INSERT:
r++, a += t[n][1], n++;
break;
case DIFF_DELETE:
i++, o += t[n][1], n++;
break;
case DIFF_EQUAL:
i + r > 1 ? (0 !== i && 0 !== r && (e = this.diff_commonPrefix(a, o), 0 !== e && (n - i - r > 0 && t[n - i - r - 1][0] == DIFF_EQUAL ? t[n - i - r - 1][1] += a.substring(0, e) : (t.splice(0, 0, [ DIFF_EQUAL, a.substring(0, e) ]),
n++), a = a.substring(e), o = o.substring(e)), 0 !== (e = this.diff_commonSuffix(a, o)) && (t[n][1] = a.substring(a.length - e) + t[n][1],
a = a.substring(0, a.length - e), o = o.substring(0, o.length - e))), 0 === i ? t.splice(n - r, i + r, [ DIFF_INSERT, a ]) : 0 === r ? t.splice(n - i, i + r, [ DIFF_DELETE, o ]) : t.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 && t[n - 1][0] == DIFF_EQUAL ? (t[n - 1][1] += t[n][1],
t.splice(n, 1)) : n++, r = 0, i = 0, o = "", a = "";
}
"" === t[t.length - 1][1] && t.pop();
var s = !1;
for (n = 1; n < t.length - 1; ) t[n - 1][0] == DIFF_EQUAL && t[n + 1][0] == DIFF_EQUAL && (t[n][1].substring(t[n][1].length - t[n - 1][1].length) == t[n - 1][1] ? (t[n][1] = t[n - 1][1] + t[n][1].substring(0, t[n][1].length - t[n - 1][1].length),
t[n + 1][1] = t[n - 1][1] + t[n + 1][1], t.splice(n - 1, 1), s = !0) : t[n][1].substring(0, t[n + 1][1].length) == t[n + 1][1] && (t[n - 1][1] += t[n + 1][1],
t[n][1] = t[n][1].substring(t[n + 1][1].length) + t[n + 1][1], t.splice(n + 1, 1),
s = !0)), n++;
s && this.diff_cleanupMerge(t);
}, diff_match_patch.prototype.diff_xIndex = function(t, e) {
var n, i = 0, r = 0, o = 0, a = 0;
for (n = 0; n < t.length && (t[n][0] !== DIFF_INSERT && (i += t[n][1].length), t[n][0] !== DIFF_DELETE && (r += t[n][1].length),
!(i > e)); n++) o = i, a = r;
return t.length != n && t[n][0] === DIFF_DELETE ? a : a + (e - o);
}, diff_match_patch.prototype.diff_prettyHtml = function(t) {
for (var e = [], n = /&/g, i = /</g, r = />/g, o = /\n/g, a = 0; a < t.length; a++) {
var s = t[a][0], l = t[a][1], c = l.replace(n, "&amp;").replace(i, "&lt;").replace(r, "&gt;").replace(o, "&para;<br>");
switch (s) {
case DIFF_INSERT:
e[a] = '<ins style="background:#e6ffe6;">' + c + "</ins>";
break;
case DIFF_DELETE:
e[a] = '<del style="background:#ffe6e6;">' + c + "</del>";
break;
case DIFF_EQUAL:
e[a] = "<span>" + c + "</span>";
}
}
return e.join("");
}, diff_match_patch.prototype.diff_text1 = function(t) {
for (var e = [], n = 0; n < t.length; n++) t[n][0] !== DIFF_INSERT && (e[n] = t[n][1]);
return e.join("");
}, diff_match_patch.prototype.diff_text2 = function(t) {
for (var e = [], n = 0; n < t.length; n++) t[n][0] !== DIFF_DELETE && (e[n] = t[n][1]);
return e.join("");
}, diff_match_patch.prototype.diff_levenshtein = function(t) {
for (var e = 0, n = 0, i = 0, r = 0; r < t.length; r++) {
var o = t[r][0], a = t[r][1];
switch (o) {
case DIFF_INSERT:
n += a.length;
break;
case DIFF_DELETE:
i += a.length;
break;
case DIFF_EQUAL:
e += Math.max(n, i), n = 0, i = 0;
}
}
return e += Math.max(n, i);
}, diff_match_patch.prototype.diff_toDelta = function(t) {
for (var e = [], n = 0; n < t.length; n++) switch (t[n][0]) {
case DIFF_INSERT:
e[n] = "+" + encodeURI(t[n][1]);
break;
case DIFF_DELETE:
e[n] = "-" + t[n][1].length;
break;
case DIFF_EQUAL:
e[n] = "=" + t[n][1].length;
}
return e.join("\t").replace(/%20/g, " ");
}, diff_match_patch.prototype.diff_fromDelta = function(t, e) {
for (var n = [], i = 0, r = 0, o = e.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 (t) {
throw new Error("Illegal escape in diff_fromDelta: " + s);
}
break;
case "-":
case "=":
var l = parseInt(s, 10);
if (isNaN(l) || l < 0) throw new Error("Invalid number in diff_fromDelta: " + s);
var c = t.substring(r, r += l);
"=" == o[a].charAt(0) ? n[i++] = [ DIFF_EQUAL, c ] : n[i++] = [ DIFF_DELETE, c ];
break;
default:
if (o[a]) throw new Error("Invalid diff operation in diff_fromDelta: " + o[a]);
}
}
if (r != t.length) throw new Error("Delta length (" + r + ") does not equal source text length (" + t.length + ").");
return n;
}, diff_match_patch.prototype.match_main = function(t, e, n) {
if (null == t || null == e || null == n) throw new Error("Null input. (match_main)");
return n = Math.max(0, Math.min(n, t.length)), t == e ? 0 : t.length ? t.substring(n, n + e.length) == e ? n : this.match_bitap_(t, e, n) : -1;
}, diff_match_patch.prototype.match_bitap_ = function(t, e, n) {
function i(t, i) {
var r = t / e.length, a = Math.abs(n - i);
return o.Match_Distance ? r + a / o.Match_Distance : a ? 1 : r;
}
if (e.length > this.Match_MaxBits) throw new Error("Pattern too long for this browser.");
var r = this.match_alphabet_(e), o = this, a = this.Match_Threshold, s = t.indexOf(e, n);
-1 != s && (a = Math.min(i(0, s), a), -1 != (s = t.lastIndexOf(e, n + e.length)) && (a = Math.min(i(0, s), a)));
var l = 1 << e.length - 1;
s = -1;
for (var c, u, d, p = e.length + t.length, h = 0; h < e.length; h++) {
for (c = 0, u = p; c < u; ) 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, t.length) + e.length, g = Array(m + 2);
g[m + 1] = (1 << h) - 1;
for (var v = m; v >= f; v--) {
var b = r[t.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 (y <= a) {
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(t) {
for (var e = {}, n = 0; n < t.length; n++) e[t.charAt(n)] = 0;
for (var n = 0; n < t.length; n++) e[t.charAt(n)] |= 1 << t.length - n - 1;
return e;
}, diff_match_patch.prototype.patch_addContext_ = function(t, e) {
if (0 != e.length) {
for (var n = e.substring(t.start2, t.start2 + t.length1), i = 0; e.indexOf(n) != e.lastIndexOf(n) && n.length < this.Match_MaxBits - this.Patch_Margin - this.Patch_Margin; ) i += this.Patch_Margin,
n = e.substring(t.start2 - i, t.start2 + t.length1 + i);
i += this.Patch_Margin;
var r = e.substring(t.start2 - i, t.start2);
r && t.diffs.unshift([ DIFF_EQUAL, r ]);
var o = e.substring(t.start2 + t.length1, t.start2 + t.length1 + i);
o && t.diffs.push([ DIFF_EQUAL, o ]), t.start1 -= r.length, t.start2 -= r.length,
t.length1 += r.length + o.length, t.length2 += r.length + o.length;
}
}, diff_match_patch.prototype.patch_make = function(t, e, n) {
var i, r;
if ("string" == typeof t && "string" == typeof e && void 0 === n) i = t, r = this.diff_main(i, e, !0),
r.length > 2 && (this.diff_cleanupSemantic(r), this.diff_cleanupEfficiency(r)); else if (t && "object" == typeof t && void 0 === e && void 0 === n) r = t,
i = this.diff_text1(r); else if ("string" == typeof t && e && "object" == typeof e && void 0 === n) i = t,
r = e; else {
if ("string" != typeof t || "string" != typeof e || !n || "object" != typeof n) throw new Error("Unknown call format to patch_make.");
i = t, 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(t) {
for (var e = [], n = 0; n < t.length; n++) {
var i = t[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,
e[n] = r;
}
return e;
}, diff_match_patch.prototype.patch_apply = function(t, e) {
if (0 == t.length) return [ e, [] ];
t = this.patch_deepCopy(t);
var n = this.patch_addPadding(t);
e = n + e + n, this.patch_splitMax(t);
for (var i = 0, r = [], o = 0; o < t.length; o++) {
var a, s = t[o].start2 + i, l = this.diff_text1(t[o].diffs), c = -1;
if (l.length > this.Match_MaxBits ? -1 != (a = this.match_main(e, l.substring(0, this.Match_MaxBits), s)) && (-1 == (c = this.match_main(e, l.substring(l.length - this.Match_MaxBits), s + l.length - this.Match_MaxBits)) || a >= c) && (a = -1) : a = this.match_main(e, l, s),
-1 == a) r[o] = !1, i -= t[o].length2 - t[o].length1; else {
r[o] = !0, i = a - s;
var u;
if (u = -1 == c ? e.substring(a, a + l.length) : e.substring(a, c + this.Match_MaxBits),
l == u) e = e.substring(0, a) + this.diff_text2(t[o].diffs) + e.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 < t[o].diffs.length; f++) {
var m = t[o].diffs[f];
m[0] !== DIFF_EQUAL && (p = this.diff_xIndex(d, h)), m[0] === DIFF_INSERT ? e = e.substring(0, a + p) + m[1] + e.substring(a + p) : m[0] === DIFF_DELETE && (e = e.substring(0, a + p) + e.substring(a + this.diff_xIndex(d, h + m[1].length))),
m[0] !== DIFF_DELETE && (h += m[1].length);
}
}
}
}
}
return e = e.substring(n.length, e.length - n.length), [ e, r ];
}, diff_match_patch.prototype.patch_addPadding = function(t) {
for (var e = this.Patch_Margin, n = "", i = 1; i <= e; i++) n += String.fromCharCode(i);
for (var i = 0; i < t.length; i++) t[i].start1 += e, t[i].start2 += e;
var r = t[0], o = r.diffs;
if (0 == o.length || o[0][0] != DIFF_EQUAL) o.unshift([ DIFF_EQUAL, n ]), r.start1 -= e,
r.start2 -= e, r.length1 += e, r.length2 += e; else if (e > o[0][1].length) {
var a = e - 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 = t[t.length - 1], o = r.diffs, 0 == o.length || o[o.length - 1][0] != DIFF_EQUAL) o.push([ DIFF_EQUAL, n ]),
r.length1 += e, r.length2 += e; else if (e > o[o.length - 1][1].length) {
var a = e - 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(t) {
for (var e = this.Match_MaxBits, n = 0; n < t.length; n++) if (!(t[n].length1 <= e)) {
var i = t[n];
t.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 < e - 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 * e ? (s.length1 += u.length,
r += u.length, l = !1, s.diffs.push([ c, u ]), i.diffs.shift()) : (u = u.substring(0, e - 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 || t.splice(++n, 0, s);
}
}
}, diff_match_patch.prototype.patch_toText = function(t) {
for (var e = [], n = 0; n < t.length; n++) e[n] = t[n];
return e.join("");
}, diff_match_patch.prototype.patch_fromText = function(t) {
var e = [];
if (!t) return e;
for (var n = t.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 (e.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 (t) {
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 e;
}, 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 t, e;
t = 0 === this.length1 ? this.start1 + ",0" : 1 == this.length1 ? this.start1 + 1 : this.start1 + 1 + "," + this.length1,
e = 0 === this.length2 ? this.start2 + ",0" : 1 == this.length2 ? this.start2 + 1 : this.start2 + 1 + "," + this.length2;
for (var n, i = [ "@@ -" + t + " +" + e + " @@\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(t) {
return function() {
return t.diff_match_patch;
};
}(this)), function(t) {
if ("object" == typeof exports) module.exports = t(); else if ("function" == typeof define && define.amd) define("jsondiffpatch", t); else {
var e;
"undefined" != typeof window ? e = window : "undefined" != typeof global ? e = global : "undefined" != typeof self && (e = self),
e.jsondiffpatch = t();
}
}(function() {
return function t(e, n, i) {
function r(a, s) {
if (!n[a]) {
if (!e[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: {}
};
e[a][0].call(c.exports, function(t) {
var n = e[a][1][t];
return r(n || t);
}, c, c.exports, t, e, 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(t, e, n) {
var i = e.exports = {};
i.nextTick = function() {
var t = "undefined" != typeof window && window.setImmediate, e = "undefined" != typeof window && window.postMessage && window.addEventListener;
if (t) return function(t) {
return window.setImmediate(t);
};
if (e) {
var n = [];
return window.addEventListener("message", function(t) {
var e = t.source;
(e === window || null === e) && "process-tick" === t.data && (t.stopPropagation(),
n.length > 0) && n.shift()();
}, !0), function(t) {
n.push(t), window.postMessage("process-tick", "*");
};
}
return function(t) {
setTimeout(t, 0);
};
}(), i.title = "browser", i.browser = !0, i.env = {}, i.argv = [], i.binding = function(t) {
throw new Error("process.binding is not supported");
}, i.cwd = function() {
return "/";
}, i.chdir = function(t) {
throw new Error("process.chdir is not supported");
};
}, {} ],
2: [ function(t, e, n) {
var i = t("../pipe").Pipe, r = function() {};
r.prototype.setResult = function(t) {
return this.result = t, this.hasResult = !0, this;
}, r.prototype.exit = function() {
return this.exiting = !0, this;
}, r.prototype.switchTo = function(t, e) {
return "string" == typeof t || t instanceof i ? this.nextPipe = t : (this.next = t,
e && (this.nextPipe = e)), this;
}, r.prototype.push = function(t, e) {
return t.parent = this, void 0 !== e && (t.childName = e), t.root = this.root || this,
t.options = t.options || this.options, this.children ? (this.children[this.children.length - 1].next = t,
this.children.push(t)) : (this.children = [ t ], this.nextAfterChildren = this.next || null,
this.next = t), t.next = this, this;
}, n.Context = r;
}, {
"../pipe": 15
} ],
3: [ function(t, e, n) {
var i = t("./context").Context, r = function(t, e) {
this.left = t, this.right = e, this.pipe = "diff";
};
r.prototype = new i(), n.DiffContext = r;
}, {
"./context": 2
} ],
4: [ function(t, e, n) {
var i = t("./context").Context, r = function(t, e) {
this.left = t, this.delta = e, this.pipe = "patch";
};
r.prototype = new i(), n.PatchContext = r;
}, {
"./context": 2
} ],
5: [ function(t, e, n) {
var i = t("./context").Context, r = function(t) {
this.delta = t, this.pipe = "reverse";
};
r.prototype = new i(), n.ReverseContext = r;
}, {
"./context": 2
} ],
6: [ function(t, e, n) {
e.exports = function(t, e) {
var n;
return "string" == typeof e && (n = /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}(?:\.\d*)?)(Z|([+\-])(\d{2}):(\d{2}))$/.exec(e)) ? new Date(Date.UTC(+n[1], +n[2] - 1, +n[3], +n[4], +n[5], +n[6])) : e;
};
}, {} ],
7: [ function(t, e, n) {
var i = t("./processor").Processor, r = t("./pipe").Pipe, o = t("./contexts/diff").DiffContext, a = t("./contexts/patch").PatchContext, s = t("./contexts/reverse").ReverseContext, l = t("./filters/trivial"), c = t("./filters/nested"), u = t("./filters/arrays"), d = t("./filters/dates"), p = t("./filters/texts"), h = function(t) {
this.processor = new i(t), 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(t, e) {
return this.processor.process(new o(t, e));
}, h.prototype.patch = function(t, e) {
return this.processor.process(new a(t, e));
}, h.prototype.reverse = function(t) {
return this.processor.process(new s(t));
}, h.prototype.unpatch = function(t, e) {
return this.patch(t, this.reverse(e));
}, 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(t, e, n) {
(function(e) {
var i = t("./diffpatcher").DiffPatcher;
n.DiffPatcher = i, n.create = function(t) {
return new i(t);
}, n.dateReviver = t("./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 !== e && "string" == typeof e.execPath) {
var o = t("./formatters/index");
n.formatters = o, n.console = o.console;
} else n.homepage = "https://github.com/benjamine/jsondiffpatch", n.version = "0.1.5";
}).call(this, t("/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(t, e, n) {
var i = t("../contexts/diff").DiffContext, r = t("../contexts/patch").PatchContext, o = t("../contexts/reverse").ReverseContext, a = t("./lcs"), s = "function" == typeof Array.isArray ? Array.isArray : function(t) {
return t instanceof Array;
}, l = "function" == typeof Array.prototype.indexOf ? function(t, e) {
return t.indexOf(e);
} : function(t, e) {
for (var n = t.length, i = 0; i < n; i++) if (t[i] === e) return i;
return -1;
}, c = function(t) {
if (t.leftIsArray) {
for (var e, n, r, o, s = t.options && t.options.objectHash, c = function(t, e, n, i, r) {
var o = t[n], a = e[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 = t.left, f = t.right, m = h.length, g = f.length; d < m && d < g && c(h, f, d, d, u); ) e = d,
o = new i(t.left[e], t.right[e]), t.push(o, e), d++;
for (;p + d < m && p + d < g && c(h, f, m - 1 - p, g - 1 - p, u); ) n = m - 1 - p,
r = g - 1 - p, o = new i(t.left[n], t.right[r]), t.push(o, r), p++;
var v;
if (d + p === m) {
if (m === g) return void t.setResult(void 0).exit();
for (v = v || {
_t: "a"
}, e = d; e < g - p; e++) v[e] = [ f[e] ];
return void t.setResult(v).exit();
}
if (d + p === g) {
for (v = v || {
_t: "a"
}, e = d; e < m - p; e++) v["_" + e] = [ h[e], 0, 0 ];
return void t.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"
}, e = d; e < m - p; e++) l(x.indices1, e - d) < 0 && (v["_" + e] = [ h[e], 0, 0 ],
w.push(e));
var S = !0;
t.options && t.options.arrays && !1 === t.options.arrays.detectMove && (S = !1);
var C = !1;
t.options && t.options.arrays && t.options.arrays.includeValueOnMove && (C = !0);
var _ = w.length;
for (e = d; e < g - p; e++) {
var k = l(x.indices2, e - d);
if (k < 0) {
var E = !1;
if (S && _ > 0) for (n = 0; n < _; n++) if (c(b, y, w[n] - d, e - d, u)) {
v["_" + w[n]].splice(1, 2, e, 3), C || (v["_" + w[n]][0] = ""), n = w[n], r = e,
o = new i(t.left[n], t.right[r]), t.push(o, r), w.splice(n, 1), E = !0;
break;
}
E || (v[e] = [ f[e] ]);
} else n = x.indices1[k] + d, r = x.indices2[k] + d, o = new i(t.left[n], t.right[r]),
t.push(o, r);
}
t.setResult(v).exit();
}
};
c.filterName = "arrays";
var u = {
numerically: function(t, e) {
return t - e;
},
numericallyBy: function(t) {
return function(e, n) {
return e[t] - n[t];
};
}
}, d = function(t) {
if (t.nested && "a" === t.delta._t) {
var e, n, i = t.delta, o = t.left, a = [], s = [], l = [];
for (e in i) if ("_t" !== e) if ("_" === e[0]) {
if (0 !== i[e][2] && 3 !== i[e][2]) throw new Error("only removal or move can be applied at original array indices, invalid diff type: " + i[e][2]);
a.push(parseInt(e.slice(1), 10));
} else 1 === i[e].length ? s.push({
index: parseInt(e, 10),
value: i[e][0]
}) : l.push({
index: parseInt(e, 10),
delta: i[e]
});
for (a = a.sort(u.numerically), e = a.length - 1; e >= 0; e--) {
n = a[e];
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 (e = 0; e < p; e++) {
var h = s[e];
o.splice(h.index, 0, h.value);
}
var f, m = l.length;
if (m > 0) for (e = 0; e < m; e++) {
var g = l[e];
f = new r(t.left[g.index], g.delta), t.push(f, g.index);
}
if (!t.children) return void t.setResult(t.left).exit();
t.exit();
}
};
d.filterName = "arrays";
var p = function(t) {
if (t && t.children && "a" === t.delta._t) {
for (var e, n = t.children.length, i = 0; i < n; i++) e = t.children[i], t.left[e.childName] = e.result;
t.setResult(t.left).exit();
}
};
p.filterName = "arraysCollectChildren";
var h = function(t) {
if (!t.nested) return void (3 === t.delta[2] && (t.newName = "_" + t.delta[1], t.setResult([ t.delta[0], parseInt(t.childName.substr(1), 10), 3 ]).exit()));
if ("a" === t.delta._t) {
var e, n;
for (e in t.delta) "_t" !== e && (n = new o(t.delta[e]), t.push(n, e));
t.exit();
}
};
h.filterName = "arrays";
var f = function(t, e, n) {
var i = e;
if ("string" == typeof e && "_" === e[0]) i = parseInt(e.substr(1), 10); else {
var r = "_" + e;
if (s(n) && 0 === n[2]) i = r; else for (var o in t) {
var a = t[o];
s(a) && 3 === a[2] && a[1].toString() === e && (i = o.substr(1));
}
}
return i;
}, m = function(t) {
if (t && t.children && "a" === t.delta._t) {
for (var e, n = t.children.length, i = {
_t: "a"
}, r = 0; r < n; r++) {
e = t.children[r];
var o = e.newName;
void 0 === o && (o = f(t.delta, e.childName, e.result)), i[o] !== e.result && (i[o] = e.result);
}
t.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(t, e, n) {
var i = function(t) {
t.left instanceof Date ? (t.right instanceof Date ? t.left.getTime() !== t.right.getTime() ? t.setResult([ t.left, t.right ]) : t.setResult(void 0) : t.setResult([ t.left, t.right ]),
t.exit()) : t.right instanceof Date && t.setResult([ t.left, t.right ]).exit();
};
i.filterName = "dates", n.diffFilter = i;
}, {} ],
11: [ function(t, e, n) {
var i = function(t, e, n, i) {
return t[n] === e[i];
}, r = function(t, e, n, i) {
var r, o, a = t.length, s = e.length, l = [ a + 1 ];
for (r = 0; r < a + 1; r++) for (l[r] = [ s + 1 ], o = 0; o < s + 1; o++) l[r][o] = 0;
for (l.match = n, r = 1; r < a + 1; r++) for (o = 1; o < s + 1; o++) n(t, e, r - 1, o - 1, i) ? l[r][o] = l[r - 1][o - 1] + 1 : l[r][o] = Math.max(l[r - 1][o], l[r][o - 1]);
return l;
}, o = function(t, e, n, i, r, a) {
if (0 === i || 0 === r) return {
sequence: [],
indices1: [],
indices2: []
};
if (t.match(e, n, i - 1, r - 1, a)) {
var s = o(t, e, n, i - 1, r - 1, a);
return s.sequence.push(e[i - 1]), s.indices1.push(i - 1), s.indices2.push(r - 1),
s;
}
return t[i][r - 1] > t[i - 1][r] ? o(t, e, n, i, r - 1, a) : o(t, e, n, i - 1, r, a);
}, a = function(t, e, n, a) {
a = a || {};
var s = r(t, e, n || i, a), l = o(s, t, e, t.length, e.length, a);
return "string" == typeof t && "string" == typeof e && (l.sequence = l.sequence.join("")),
l;
};
n.get = a;
}, {} ],
12: [ function(t, e, n) {
var i = t("../contexts/diff").DiffContext, r = t("../contexts/patch").PatchContext, o = t("../contexts/reverse").ReverseContext, a = function(t) {
if (t && t.children) {
for (var e, n = t.children.length, i = t.result, r = 0; r < n; r++) e = t.children[r],
void 0 !== e.result && (i = i || {}, i[e.childName] = e.result);
i && t.leftIsArray && (i._t = "a"), t.setResult(i).exit();
}
};
a.filterName = "collectChildren";
var s = function(t) {
if (!t.leftIsArray && "object" === t.leftType) {
var e, n;
for (e in t.left) n = new i(t.left[e], t.right[e]), t.push(n, e);
for (e in t.right) void 0 === t.left[e] && (n = new i((void 0), t.right[e]), t.push(n, e));
if (!t.children || 0 === t.children.length) return void t.setResult(void 0).exit();
t.exit();
}
};
s.filterName = "objects";
var l = function(t) {
if (t.nested && !t.delta._t) {
var e, n;
for (e in t.delta) n = new r(t.left[e], t.delta[e]), t.push(n, e);
t.exit();
}
};
l.filterName = "objects";
var c = function(t) {
if (t && t.children && !t.delta._t) {
for (var e, n = t.children.length, i = 0; i < n; i++) e = t.children[i], t.left[e.childName] !== e.result && (t.left[e.childName] = e.result);
t.setResult(t.left).exit();
}
};
c.filterName = "collectChildren";
var u = function(t) {
if (t.nested && !t.delta._t) {
var e, n;
for (e in t.delta) n = new o(t.delta[e]), t.push(n, e);
t.exit();
}
};
u.filterName = "objects";
var d = function(t) {
if (t && t.children && !t.delta._t) {
for (var e, n = t.children.length, i = {}, r = 0; r < n; r++) e = t.children[r],
i[e.childName] !== e.result && (i[e.childName] = e.result);
t.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(t, e, n) {
var i = null, r = function() {
if (!i) {
var e;
if (void 0 !== diff_match_patch) e = new diff_match_patch(); else if ("function" == typeof t) {
var n = t("../../external/diff_match_patch_uncompressed");
e = new n.diff_match_patch();
}
if (!e) {
var r = new Error("text diff_match_patch library not found");
throw r.diff_match_patch_not_found = !0, r;
}
i = {
diff: function(t, n) {
return e.patch_toText(e.patch_make(t, n));
},
patch: function(t, n) {
for (var i = e.patch_apply(e.patch_fromText(n), t), 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(t) {
if ("string" === t.leftType) {
var e = t.options && t.options.textDiff && t.options.textDiff.minLength || 60;
if (t.left.length < e || t.right.length < e) return void t.setResult([ t.left, t.right ]).exit();
var n = r().diff;
t.setResult([ n(t.left, t.right), 0, 2 ]).exit();
}
};
o.filterName = "texts";
var a = function(t) {
if (!t.nested && 2 === t.delta[2]) {
var e = r().patch;
t.setResult(e(t.left, t.delta[0])).exit();
}
};
a.filterName = "texts";
var s = function(t) {
var e, n, i, r, o, a, s = null, l = /^@@ +\-(\d+),(\d+) +\+(\d+),(\d+) +@@$/;
for (i = t.split("\n"), e = 0, n = i.length; e < n; e++) {
r = i[e];
var c = r.slice(0, 1);
"@" === c ? (s = l.exec(r), a = e, i[a] = "@@ -" + s[3] + "," + s[4] + " +" + s[1] + "," + s[2] + " @@") : "+" === c ? (i[e] = "-" + i[e].slice(1),
"+" === i[e - 1].slice(0, 1) && (o = i[e], i[e] = i[e - 1], i[e - 1] = o)) : "-" === c && (i[e] = "+" + i[e].slice(1));
}
return i.join("\n");
}, l = function(t) {
t.nested || 2 === t.delta[2] && t.setResult([ s(t.delta[0]), 0, 2 ]).exit();
};
l.filterName = "texts", n.diffFilter = o, n.patchFilter = a, n.reverseFilter = l;
}, {} ],
14: [ function(t, e, n) {
var i = "function" == typeof Array.isArray ? Array.isArray : function(t) {
return t instanceof Array;
}, r = function(t) {
if (t.left === t.right) return void t.setResult(void 0).exit();
if (void 0 === t.left) {
if ("function" == typeof t.right) throw new Error("functions are not supported");
return void t.setResult([ t.right ]).exit();
}
if (void 0 === t.right) return void t.setResult([ t.left, 0, 0 ]).exit();
if ("function" == typeof t.left || "function" == typeof t.right) throw new Error("functions are not supported");
return t.leftType = null === t.left ? "null" : typeof t.left, t.rightType = null === t.right ? "null" : typeof t.right,
t.leftType !== t.rightType ? void t.setResult([ t.left, t.right ]).exit() : "boolean" === t.leftType || "number" === t.leftType ? void t.setResult([ t.left, t.right ]).exit() : ("object" === t.leftType && (t.leftIsArray = i(t.left)),
"object" === t.rightType && (t.rightIsArray = i(t.right)), t.leftIsArray !== t.rightIsArray ? void t.setResult([ t.left, t.right ]).exit() : void 0);
};
r.filterName = "trivial";
var o = function(t) {
return void 0 === t.delta ? void t.setResult(t.left).exit() : (t.nested = !i(t.delta),
t.nested ? void 0 : 1 === t.delta.length ? void t.setResult(t.delta[0]).exit() : 2 === t.delta.length ? void t.setResult(t.delta[1]).exit() : 3 === t.delta.length && 0 === t.delta[2] ? void t.setResult(void 0).exit() : void 0);
};
o.filterName = "trivial";
var a = function(t) {
return void 0 === t.delta ? void t.setResult(t.delta).exit() : (t.nested = !i(t.delta),
t.nested ? void 0 : 1 === t.delta.length ? void t.setResult([ t.delta[0], 0, 0 ]).exit() : 2 === t.delta.length ? void t.setResult([ t.delta[1], t.delta[0] ]).exit() : 3 === t.delta.length && 0 === t.delta[2] ? void t.setResult([ t.delta[0] ]).exit() : void 0);
};
a.filterName = "trivial", n.diffFilter = r, n.patchFilter = o, n.reverseFilter = a;
}, {} ],
15: [ function(t, e, n) {
var i = function(t) {
this.name = t, this.filters = [];
};
i.prototype.process = function(t) {
if (!this.processor) throw new Error("add this pipe to a processor before using it");
for (var e = this.debug, n = this.filters.length, i = t, r = 0; r < n; r++) {
var o = this.filters[r];
if (e && 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(t) {
console.log("[jsondiffpatch] " + this.name + " pipe, " + t);
}, 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(t) {
if (!t) throw new Error("a filter name is required");
for (var e = 0; e < this.filters.length; e++) if (this.filters[e].filterName === t) return e;
throw new Error("filter not found: " + t);
}, i.prototype.list = function() {
for (var t = [], e = 0; e < this.filters.length; e++) {
var n = this.filters[e];
t.push(n.filterName);
}
return t;
}, i.prototype.after = function(t) {
var e = this.indexOf(t), n = Array.prototype.slice.call(arguments, 1);
if (!n.length) throw new Error("a filter is required");
return n.unshift(e + 1, 0), Array.prototype.splice.apply(this.filters, n), this;
}, i.prototype.before = function(t) {
var e = this.indexOf(t), n = Array.prototype.slice.call(arguments, 1);
if (!n.length) throw new Error("a filter is required");
return n.unshift(e, 0), Array.prototype.splice.apply(this.filters, n), this;
}, i.prototype.clear = function() {
return this.filters.length = 0, this;
}, i.prototype.shouldHaveResult = function(t) {
if (!1 === t) return void (this.resultCheck = null);
if (!this.resultCheck) {
var e = this;
return this.resultCheck = function(t) {
if (!t.hasResult) {
console.log(t);
var n = new Error(e.name + " failed");
throw n.noResult = !0, n;
}
}, this;
}
}, n.Pipe = i;
}, {} ],
16: [ function(t, e, n) {
var i = function(t) {
this.selfOptions = t, this.pipes = {};
};
i.prototype.options = function(t) {
return t && (this.selfOptions = t), this.selfOptions;
}, i.prototype.pipe = function(t, e) {
if ("string" == typeof t) {
if (void 0 === e) return this.pipes[t];
this.pipes[t] = e;
}
if (t && t.name) {
if (e = t, e.processor === this) return e;
this.pipes[e.name] = e;
}
return e.processor = this, e;
}, i.prototype.process = function(t, e) {
var n = t;
n.options = this.options();
for (var i, r, o = e || t.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 t = Object.defineProperty, e = Date.now() % 1e9, n = function() {
this.name = "__st" + (1e9 * Math.random() >>> 0) + e++ + "__";
};
n.prototype = {
set: function(e, n) {
var i = e[this.name];
i && i[0] === e ? i[1] = n : t(e, this.name, {
value: [ e, n ],
writable: !0
});
},
get: function(t) {
var e;
return (e = t[this.name]) && e[0] === t ? e[1] : void 0;
},
"delete": function(t) {
this.set(t, void 0);
}
}, window.WeakMap = n;
}(), define("WeakMap", function() {}), function(t) {
function e(t) {
x.push(t), y || (y = !0, g(i));
}
function n(t) {
return window.ShadowDOMPolyfill && window.ShadowDOMPolyfill.wrapIfNeeded(t) || t;
}
function i() {
y = !1;
var t = x;
x = [], t.sort(function(t, e) {
return t.uid_ - e.uid_;
});
var e = !1;
t.forEach(function(t) {
var n = t.takeRecords();
r(t), n.length && (t.callback_(n, t), e = !0);
}), e && i();
}
function r(t) {
t.nodes_.forEach(function(e) {
var n = m.get(e);
n && n.forEach(function(e) {
e.observer === t && e.removeTransientObservers();
});
});
}
function o(t, e) {
for (var n = t; 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 === t || a.subtree) {
var s = e(a);
s && o.enqueue(s);
}
}
}
}
function a(t) {
this.callback_ = t, this.nodes_ = [], this.records_ = [], this.uid_ = ++w;
}
function s(t, e) {
this.type = t, this.target = e, this.addedNodes = [], this.removedNodes = [], this.previousSibling = null,
this.nextSibling = null, this.attributeName = null, this.attributeNamespace = null,
this.oldValue = null;
}
function l(t) {
var e = new s(t.type, t.target);
return e.addedNodes = t.addedNodes.slice(), e.removedNodes = t.removedNodes.slice(),
e.previousSibling = t.previousSibling, e.nextSibling = t.nextSibling, e.attributeName = t.attributeName,
e.attributeNamespace = t.attributeNamespace, e.oldValue = t.oldValue, e;
}
function c(t, e) {
return S = new s(t, e);
}
function u(t) {
return C || (C = l(S), C.oldValue = t, C);
}
function d() {
S = C = void 0;
}
function p(t) {
return t === C || t === S;
}
function h(t, e) {
return t === e ? t : C && p(t) ? C : null;
}
function f(t, e, n) {
this.observer = t, this.target = e, this.options = n, this.transientObservedNodes = [];
}
var m = new WeakMap(), g = window.msSetImmediate;
if (!g) {
var v = [], b = String(Math.random());
window.addEventListener("message", function(t) {
if (t.data === b) {
var e = v;
v = [], e.forEach(function(t) {
t();
});
}
}), g = function(t) {
v.push(t), window.postMessage(b, "*");
};
}
var y = !1, x = [], w = 0;
a.prototype = {
observe: function(t, e) {
if (t = n(t), !e.childList && !e.attributes && !e.characterData || e.attributeOldValue && !e.attributes || e.attributeFilter && e.attributeFilter.length && !e.attributes || e.characterDataOldValue && !e.characterData) throw new SyntaxError();
var i = m.get(t);
i || m.set(t, i = []);
for (var r, o = 0; o < i.length; o++) if (i[o].observer === this) {
r = i[o], r.removeListeners(), r.options = e;
break;
}
r || (r = new f(this, t, e), i.push(r), this.nodes_.push(t)), r.addListeners();
},
disconnect: function() {
this.nodes_.forEach(function(t) {
for (var e = m.get(t), n = 0; n < e.length; n++) {
var i = e[n];
if (i.observer === this) {
i.removeListeners(), e.splice(n, 1);
break;
}
}
}, this), this.records_ = [];
},
takeRecords: function() {
var t = this.records_;
return this.records_ = [], t;
}
};
var S, C;
f.prototype = {
enqueue: function(t) {
var n = this.observer.records_, i = n.length;
if (n.length > 0) {
var r = n[i - 1], o = h(r, t);
if (o) return void (n[i - 1] = o);
} else e(this.observer);
n[i] = t;
},
addListeners: function() {
this.addListeners_(this.target);
},
addListeners_: function(t) {
var e = this.options;
e.attributes && t.addEventListener("DOMAttrModified", this, !0), e.characterData && t.addEventListener("DOMCharacterDataModified", this, !0),
e.childList && t.addEventListener("DOMNodeInserted", this, !0), (e.childList || e.subtree) && t.addEventListener("DOMNodeRemoved", this, !0);
},
removeListeners: function() {
this.removeListeners_(this.target);
},
removeListeners_: function(t) {
var e = this.options;
e.attributes && t.removeEventListener("DOMAttrModified", this, !0), e.characterData && t.removeEventListener("DOMCharacterDataModified", this, !0),
e.childList && t.removeEventListener("DOMNodeInserted", this, !0), (e.childList || e.subtree) && t.removeEventListener("DOMNodeRemoved", this, !0);
},
addTransientObserver: function(t) {
if (t !== this.target) {
this.addListeners_(t), this.transientObservedNodes.push(t);
var e = m.get(t);
e || m.set(t, e = []), e.push(this);
}
},
removeTransientObservers: function() {
var t = this.transientObservedNodes;
this.transientObservedNodes = [], t.forEach(function(t) {
this.removeListeners_(t);
for (var e = m.get(t), n = 0; n < e.length; n++) if (e[n] === this) {
e.splice(n, 1);
break;
}
}, this);
},
handleEvent: function(t) {
switch (t.stopImmediatePropagation(), t.type) {
case "DOMAttrModified":
var e = t.attrName, n = t.relatedNode.namespaceURI, i = t.target, r = new c("attributes", i);
r.attributeName = e, r.attributeNamespace = n;
var a = t.attrChange === MutationEvent.ADDITION ? null : t.prevValue;
o(i, function(t) {
if (t.attributes && (!t.attributeFilter || !t.attributeFilter.length || -1 !== t.attributeFilter.indexOf(e) || -1 !== t.attributeFilter.indexOf(n))) return t.attributeOldValue ? u(a) : r;
});
break;
case "DOMCharacterDataModified":
var i = t.target, r = c("characterData", i), a = t.prevValue;
o(i, function(t) {
if (t.characterData) return t.characterDataOldValue ? u(a) : r;
});
break;
case "DOMNodeRemoved":
this.addTransientObserver(t.target);
case "DOMNodeInserted":
var s, l, i = t.relatedNode, p = t.target;
"DOMNodeInserted" === t.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(t) {
if (t.childList) return r;
});
}
d();
}
}, t.JsMutationObserver = a, t.MutationObserver || (t.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(t) {
"entity" === t.type && (t.attributes.title = t.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 t = new RegExp("(https?|ftp)(://(&amp;|[-A-Z0-9+@#/%?=~_|[\\]()!:,.;])*(&amp;|[-A-Z0-9+@#/%=~_|[\\])]))(?=$|\\W)", "gi"), e = /(?: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: t,
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: t,
email: e,
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(t, e, n, i, r, o, a, s, l, c) {
function u() {
this.isWatching = !1;
var t;
this.startWatching = function() {
this.isWatching = !0, t = t || new MutationObserver(S), t.observe(N, {
childList: !0,
subtree: !0,
characterData: !0
});
}, this.stopWatching = function() {
t.disconnect(), this.isWatching = !1;
}, this.noWatch = function(t) {
!0 === this.isWatching ? (this.stopWatching(), t(), this.startWatching()) : t();
};
}
function d() {
var t = this, o = 0, a = 0;
this.selectionStart = 0, this.selectionEnd = 0, this.cursorY = 0, this.adjustTop = 0,
this.adjustBottom = 0, this.findOffsets = function(t) {
var e = [];
if (!t.length) return e;
for (var n = t.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 (e.push({
container: i.currentNode,
offsetInContainer: n - o,
offset: n
}), !t.length) return e;
n = t.shift();
}
o = a;
}
do e.push({
container: i.currentNode,
offsetInContainer: r.length,
offset: n
}), n = t.shift(); while (n);
return e;
}, this.createRange = function(t, n) {
t = t < 0 ? 0 : t, n = n < 0 ? 0 : n;
var i, r, o = document.createRange(), a = [];
e.isNumber(t) && (a.push(t), i = a.length - 1), e.isNumber(n) && (a.push(n), r = a.length - 1),
a = this.findOffsets(a);
var s = e.isObject(t) ? t : a[i];
o.setStart(s.container, s.offsetInContainer);
var l = s;
return n && n != t && (l = e.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 t = this.getCoordinates(this.selectionEnd, this.selectionEndContainer, this.selectionEndOffset);
if (this.cursorY !== t.y && (this.cursorY = t.y, r.onCursorCoordinates(t.x, t.y)),
s) {
var e, n;
if (e = n = I.offsetHeight / 2 * i.cursorFocusRatio, e = this.adjustTop || e, n = this.adjustBottom || e,
e && n) {
var o = I.scrollTop + e, 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(t) {
s = s || t, l();
}, this.updateSelectionRange = function() {
var t = Math.min(this.selectionStart, this.selectionEnd), e = Math.max(this.selectionStart, this.selectionEnd), n = this.createRange(t, e), i = c.getSelection();
i.removeAllRanges(), i.addRange(n, this.selectionStart > this.selectionEnd);
};
var u = e.debounce(function() {
o = t.selectionStart, a = t.selectionEnd;
}, 50);
this.setSelectionStartEnd = function(t, e) {
void 0 === t && (t = this.selectionStart), t < 0 && (t = 0), void 0 === e && (e = this.selectionEnd),
e < 0 && (e = 0), this.selectionStart = t, this.selectionEnd = e, q.editorStart = t,
q.editorEnd = e, u();
}, this.saveSelectionState = function() {
function e() {
if (!1 === G) {
var e = t.selectionStart, n = t.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() ? (e = a + r.toString().length, n = a) : (e = a, n = a + r.toString().length),
e === n && "\n" == r.startContainer.textContent && 1 == r.startOffset && (e = --n,
t.setSelectionStartEnd(e, n), t.updateSelectionRange());
}
}
t.setSelectionStartEnd(e, n);
}
X.saveSelectionState();
}
var i = !1, r = n.debounce(function() {
e(), t.updateCursorCoordinates(i), s();
}), s = n.debounce(function() {
e(), o === t.selectionStart && a === t.selectionEnd && (i = !1), t.updateCursorCoordinates(i),
i = !1;
}, 10);
return function(t, n, s) {
return s && (o = void 0, a = void 0), t ? (i = i || n, r()) : void e();
};
}(), this.getSelectedText = function() {
var t = Math.min(this.selectionStart, this.selectionEnd), e = Math.max(this.selectionStart, this.selectionEnd);
return W.substring(t, e);
}, this.getCoordinates = function(t, e, n) {
if (!e) {
var i = this.findOffsets([ t ])[0];
e = i.container, n = i.offsetInContainer;
}
var r = 0;
if ("\n" == e.textContent) r = e.parentNode.offsetTop + e.parentNode.offsetHeight / 2; else {
var o = W[t], a = {
container: e,
offsetInContainer: n,
offset: t
}, s = {
container: e,
offsetInContainer: n,
offset: t
};
t > 0 && (void 0 === o || "\n" == o) ? 0 === a.offset ? a = t - 1 : a.offsetInContainer -= 1 : s.offset === e.textContent.length ? s = t + 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(t) {
var e = 0, n = 0, i = 0;
return W.split(/\s/).some(function(r) {
return !!(r && (e = i, (n = i + r.length) > t)) || void (i += r.length + 1);
}), {
start: e,
end: n
};
};
}
function p(t) {
void 0 !== I && V.saveSelectionState(!0, !0, t);
}
function h(t) {
var e = U.diff_commonPrefix(W, t);
e === W.length && e--;
var n = Math.min(U.diff_commonSuffix(W, t), W.length - e, t.length - e), i = t.substring(e, t.length - n), r = V.createRange(e, W.length - n);
return r.deleteContents(), r.insertNode(document.createTextNode(i)), {
start: e,
end: t.length - n
};
}
function f(t, e, n) {
X.currentMode = X.currentMode || "replace";
var i = V.createRange(Math.min(t, e), Math.max(t, e));
"" + i != n && (i.deleteContents(), i.insertNode(document.createTextNode(n)));
var r = t + n.length;
V.setSelectionStartEnd(r, r), V.updateSelectionRange(), V.updateCursorCoordinates(!0);
}
function m(t, e) {
X.currentMode = X.currentMode || "replace";
var n = W.replace(t, e);
if (n != W) {
var i = F.setValue(n);
V.setSelectionStartEnd(i.end, i.end), V.updateSelectionRange(), V.updateCursorCoordinates(!0);
}
}
function g(t, e) {
var n = V.selectionStart;
if (n !== V.selectionEnd) return !1;
var i = V.createRange(n - t.length, n);
return "" + i == t && (i.deleteContents(), i.insertNode(document.createTextNode(e)),
n = n - t.length + e.length, V.setSelectionStartEnd(n, n), V.updateSelectionRange(),
V.updateCursorCoordinates(!0), !0);
}
function v(t) {
h(t), W = t;
}
function b() {
return W;
}
function y() {
M.focus(), V.updateSelectionRange(), I.scrollTop = B;
}
function x() {
function t(t, n, i) {
H.noWatch(function() {
if (W != t.content && (v(t.content), q.content = t.content, r.onContentChanged(q, t.content)),
V.setSelectionStartEnd(n, i), V.updateSelectionRange(), V.updateCursorCoordinates(!0),
q.discussionListJSON != t.discussionListJSON) {
var o = q.discussionList;
q.discussionListJSON = t.discussionListJSON;
var a = q.discussionList, s = z.diff(o, a), l = !1;
e.each(s, function(t, n) {
e.isArray(t) ? 1 === t.length ? r.onDiscussionCreated(q, a[n]) : r.onDiscussionRemoved(q, o[n]) : l = !0;
}), l && r.onCommentsChanged(q);
}
}), s = n, l = i, a = t, 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 t = Date.now();
if ("comment" == this.currentMode || "replace" == this.currentMode || "newlines" == o || this.currentMode != o || t - 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: q.discussionListJSON
}, i = t, o = this.currentMode, this.currentMode = void 0, this.onButtonStateChange();
}, this), this.saveSelectionState = e.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 e = c.pop();
e && (u.push(a), t.call(this, e, a.selectionStartBefore, a.selectionEndBefore));
}, this.redo = function() {
var e = u.pop();
e && (c.push(a), t.call(this, e, e.selectionStartAfter, e.selectionEndAfter));
}, this.init = function() {
var t = q.content;
c = [], u = [], i = 0, a = {
selectionStartAfter: q.selectionStart,
selectionEndAfter: q.selectionEnd,
content: t,
discussionListJSON: q.discussionListJSON
}, this.currentMode = void 0, o = void 0, N.textContent = t, S();
};
}
function w() {
!0 === H.isWatching && (X.currentMode = X.currentMode || "comment", X.saveState());
}
function S() {
var t = I.textContent;
if (N.lastChild === O && "\n" == O.textContent.slice(-1) && (t = t.slice(0, -1)),
t = t.replace(/\r\n?/g, "\n"), !1 === G) {
if (t == W) return void (0 === N.children.length && (N.innerHTML = "", K.forEach(function(t) {
N.appendChild(t.elt);
}), E()));
X.currentMode = X.currentMode || "typing";
var n = e.values(q.discussionList);
q.newDiscussion && n.push(q.newDiscussion);
var i = C(W, t, n);
W = t, !0 === i && (q.discussionList = q.discussionList), q.content = W, V.saveSelectionState(),
r.onContentChanged(q, W), i && r.onCommentsChanged(q), X.saveState(), Q();
} else W = t, q.content = W, V.setSelectionStartEnd(q.editorStart, q.editorEnd),
V.updateSelectionRange(), V.updateCursorCoordinates(), X.saveSelectionState(), r.onFileOpen(q, W),
R.scrollTop = q.previewScrollTop, B = q.editorScrollTop, I.scrollTop = B, G = !1;
}
function C(t, e, n) {
if (n.length) {
var i = U.diff_main(t, e), r = !1, o = 0;
return i.forEach(function(t) {
var e = t[0], i = t[1];
if (0 === e) return void (o += i.length);
var a = o, s = i.length;
-1 === e && (a += s, s = -s), n.forEach(function(t) {
t.selectionEnd > a ? (t.selectionEnd += s, t.discussionIndex && (r = !0)) : t.selectionEnd > o && (t.selectionEnd = o,
t.discussionIndex && (r = !0)), t.selectionStart >= a ? (t.selectionStart += s,
t.discussionIndex && (r = !0)) : t.selectionStart > o && (t.selectionStart = o,
t.discussionIndex && (r = !0));
}), 1 === e && (o += i.length);
}), r;
}
}
function _(t) {
if (Z = [], J = [], Y = void 0, !0 === G) return J = K, K = t, void (Z = t);
var n = K.length;
e.some(K, function(e, i) {
var r = t[i];
if (i >= t.length || e.textWithFrontMatter != r.textWithFrontMatter || e.elt.parentNode !== N || e.elt.textContent != r.textWithFrontMatter) return n = i,
!0;
});
var i = -K.length;
e.some(K.slice().reverse(), function(e, n) {
var r = t[t.length - n - 1];
if (n >= t.length || e.textWithFrontMatter != r.textWithFrontMatter || e.elt.parentNode !== N || e.elt.textContent != r.textWithFrontMatter) return i = -n,
!0;
}), n - i > K.length && (i = n - K.length);
var r = K.slice(0, n);
Z = t.slice(n, t.length + i);
var o = K.slice(K.length + i, K.length);
Y = e.first(o), J = K.slice(n, K.length + i), K = r.concat(Z).concat(o);
}
function k() {
var t = document.createDocumentFragment();
Z.forEach(function(e) {
T(e), t.appendChild(e.elt);
}), H.noWatch(function() {
if (!0 === G) N.innerHTML = "", N.appendChild(t); else {
J.forEach(function(t) {
t.elt.parentNode === N && N.removeChild(t.elt), t.elt.generated = !1;
}), void 0 !== Y ? N.insertBefore(t, Y.elt) : N.appendChild(t);
for (var e = N.firstChild; e; ) {
var n = e.nextSibling;
e.generated || N.removeChild(e), e = n;
}
}
E(), V.updateSelectionRange(), V.updateCursorCoordinates();
});
}
function E() {
O = l("span", {
"class": "token lf"
}), O.textContent = "\n", N.appendChild(O);
}
function T(t) {
var e = tt(t.text);
window.viewerMode || (e = o.highlight(e, o.languages.md));
var n = t.textWithFrontMatter.substring(0, t.textWithFrontMatter.length - t.text.length);
n.length && (n = tt(n), n = n.replace(/\n/g, '<span class="token lf">\n</span>'),
e = '<span class="token md">' + n + "</span>" + e);
var i = l("span", {
id: "wmd-input-section-" + t.id,
"class": "wmd-input-section"
});
i.generated = !0, i.innerHTML = e, t.elt = i;
}
var I, D, N, M, L, A, R, P, O, F = {}, B = 0, j = function() {
var t, n = 0, r = function() {
var t = Date.now();
P.refreshPreview(), n = Date.now() - t;
};
return !0 === i.lazyRendering ? e.debounce(r, 500) : function() {
clearTimeout(t), t = setTimeout(r, n < 2e3 ? n : 2e3);
};
}();
r.addListener("onPagedownConfigure", function(t) {
P = t;
});
var $ = 0;
r.addListener("onSectionsCreated", function(t) {
$ || (_(t), k()), !0 === G ? P.refreshPreview() : j();
});
var q, G = !0;
r.addListener("onFileSelected", function(t) {
G = !0, q = t;
});
var H = new u();
F.watcher = H;
var U = new a(), z = s.create({
objectHash: function(t) {
return JSON.stringify(t);
},
arrays: {
detectMove: !1
},
textDiff: {
minLength: 9999999
}
}), V = new d();
F.selectionMgr = V, t(document).on("selectionchange", ".editor-content", e.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 = e.debounce(function() {
var t = window.getSelection();
V.hasFocus && !$ && V.selectionStart === V.selectionEnd && t.modify && (V.selectionStart ? (t.modify("move", "backward", "character"),
t.modify("move", "forward", "character")) : (t.modify("move", "forward", "character"),
t.modify("move", "backward", "character")));
}, 10);
F.adjustCommentOffsets = C, F.init = function() {
if (I = document.getElementById("wmd-input"), D = t(I), N = I.querySelector(".editor-content"),
M = t(N), L = I.querySelector(".editor-margin"), A = t(L), R = document.querySelector(".preview-container"),
D.addClass(i.editorFontClass), H.startWatching(), t(I).scroll(function() {
B = I.scrollTop, !1 === G && (q.editorScrollTop = B);
}), t(R).scroll(function() {
!1 === G && (q.previewScrollTop = R.scrollTop);
}), /AppleWebKit\/([\d.]+)/.exec(navigator.userAgent)) {
var n = t('<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(t) {
V.setSelectionStartEnd(t), V.updateSelectionRange(), V.updateCursorCoordinates();
},
enumerable: !0,
configurable: !0
}), Object.defineProperty(I, "selectionEnd", {
get: function() {
return Math.max(V.selectionStart, V.selectionEnd);
},
set: function(t) {
V.setSelectionStartEnd(void 0, t), V.updateSelectionRange(), V.updateCursorCoordinates();
},
enumerable: !0,
configurable: !0
});
var r = !1;
M.on("keydown", function(t) {
if (17 !== t.which && 91 !== t.which && 18 !== t.which && 16 !== t.which) {
V.saveSelectionState(), p();
var e = t.metaKey || t.ctrlKey;
switch (t.which) {
case 9:
e || (o("indent", {
inverse: t.shiftKey
}), t.preventDefault());
break;
case 13:
o("newline"), t.preventDefault();
}
13 !== t.which && (r = !1);
}
}).on("compositionstart", function() {
$++;
}).on("compositionend", function() {
setTimeout(function() {
$--;
}, 0);
}).on("mouseup", e.bind(V.saveSelectionState, V, !0, !1)).on("paste", function(t) {
X.currentMode = "paste", t.preventDefault();
var e, n = (t.originalEvent || t).clipboardData;
n ? e = n.getData("text/plain") : (n = window.clipboardData, e = n && n.getData("Text")),
e && (f(V.selectionStart, V.selectionEnd, e), p());
}).on("cut", function() {
X.currentMode = "cut", p();
}).on("focus", function() {
V.hasFocus = !0;
}).on("blur", function() {
V.hasFocus = !1;
});
var o = function(t, e) {
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[t](o, e || {}), 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(t, e) {
function n(t, e, n, i) {
return n = +n || 0, i = i || "", t.slice(0, e) + i + t.slice(e + n);
}
var i = t.before.lastIndexOf("\n") + 1;
if (e.inverse) /\s/.test(t.before.charAt(i)) && (t.before = n(t.before, i, 1), t.selectionStart--,
t.selectionEnd--), t.selection = t.selection.replace(/^[ \t]/gm, ""); else {
var r = t.before.slice(i);
if (!t.selection && !r.match(a)) return t.before += "\t", t.selectionStart++, void t.selectionEnd++;
t.before = n(t.before, i, 0, "\t"), t.selection = t.selection.replace(/\r?\n(?=[\s\S])/g, "\n\t"),
t.selectionStart++, t.selectionEnd++;
}
t.selectionEnd = t.selectionStart + t.selection.length;
},
newline: function(t) {
var e = t.before.lastIndexOf("\n") + 1;
if (r) return t.before = t.before.substring(0, e), t.selection = "", t.selectionStart = e,
t.selectionEnd = e, void (r = !1);
r = !1;
var n = t.before.slice(e), 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", t.before += "\n" + o, t.selection = "",
t.selectionStart += o.length + 1, t.selectionEnd = t.selectionStart;
}
};
};
var Y, K = [], J = [], Z = [], tt = function() {
var t = {
"&": "&amp;",
"<": "&lt;",
"\xa0": " "
};
return function(e) {
return e.replace(/[&<\u00a0]/g, function(e) {
return t[e];
});
};
}();
return r.onEditorCreated(F), F;
}), function(t, e) {
"use strict";
function n() {
i.READY || (b.determineEventTypes(), f.each(i.gestures, function(t) {
x.register(t);
}), b.onTouch(i.DOCUMENT, p, x.detect), b.onTouch(i.DOCUMENT, h, x.detect), i.READY = !0);
}
var i = function(t, e) {
return new i.Instance(t, e || {});
};
i.VERSION = "1.0.11", i.defaults = {
stop_browser_behavior: {
userSelect: "none",
touchAction: "pan-y",
touchCallout: "none",
contentZooming: "none",
userDrag: "none",
tapHighlightColor: "rgba(0,0,0,0)"
}
}, i.HAS_POINTEREVENTS = t.navigator.pointerEnabled || t.navigator.msPointerEnabled,
i.HAS_TOUCHEVENTS = "ontouchstart" in t, i.MOBILE_REGEX = /mobile|tablet|ip(ad|hone|od)|android|silk/i,
i.NO_MOUSEEVENTS = i.HAS_TOUCHEVENTS && t.navigator.userAgent.match(i.MOBILE_REGEX),
i.EVENT_TYPES = {}, i.UPDATE_VELOCITY_INTERVAL = 16, i.DOCUMENT = t.document;
var r = i.DIRECTION_DOWN = "down", o = i.DIRECTION_LEFT = "left", a = i.DIRECTION_UP = "up", s = i.DIRECTION_RIGHT = "right", l = i.POINTER_MOUSE = "mouse", c = i.POINTER_TOUCH = "touch", u = i.POINTER_PEN = "pen", d = i.EVENT_START = "start", p = i.EVENT_MOVE = "move", h = i.EVENT_END = "end";
i.plugins = i.plugins || {}, i.gestures = i.gestures || {}, i.READY = !1;
var f = i.utils = {
extend: function(t, e, n) {
for (var i in e) void 0 !== t[i] && n || (t[i] = e[i]);
return t;
},
each: function(t, e, n) {
var i, r;
if ("forEach" in t) t.forEach(e, n); else if (void 0 !== t.length) {
for (i = -1; r = t[++i]; ) if (!1 === e.call(n, r, i, t)) return;
} else for (i in t) if (t.hasOwnProperty(i) && !1 === e.call(n, t[i], i, t)) return;
},
inStr: function(t, e) {
return t.indexOf(e) > -1;
},
hasParent: function(t, e) {
for (;t; ) {
if (t == e) return !0;
t = t.parentNode;
}
return !1;
},
getCenter: function(t) {
var e = [], n = [], i = [], r = [], o = Math.min, a = Math.max;
return 1 === t.length ? {
pageX: t[0].pageX,
pageY: t[0].pageY,
clientX: t[0].clientX,
clientY: t[0].clientY
} : (f.each(t, function(t) {
e.push(t.pageX), n.push(t.pageY), i.push(t.clientX), r.push(t.clientY);
}), {
pageX: (o.apply(Math, e) + a.apply(Math, e)) / 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(t, e, n) {
return {
x: Math.abs(e / t) || 0,
y: Math.abs(n / t) || 0
};
},
getAngle: function(t, e) {
var n = e.clientX - t.clientX, i = e.clientY - t.clientY;
return 180 * Math.atan2(i, n) / Math.PI;
},
getDirection: function(t, e) {
return Math.abs(t.clientX - e.clientX) >= Math.abs(t.clientY - e.clientY) ? t.clientX - e.clientX > 0 ? o : s : t.clientY - e.clientY > 0 ? a : r;
},
getDistance: function(t, e) {
var n = e.clientX - t.clientX, i = e.clientY - t.clientY;
return Math.sqrt(n * n + i * i);
},
getScale: function(t, e) {
return t.length >= 2 && e.length >= 2 ? this.getDistance(e[0], e[1]) / this.getDistance(t[0], t[1]) : 1;
},
getRotation: function(t, e) {
return t.length >= 2 && e.length >= 2 ? this.getAngle(e[1], e[0]) - this.getAngle(t[1], t[0]) : 0;
},
isVertical: function(t) {
return t == a || t == r;
},
toggleDefaultBehavior: function(t, e, n) {
if (e && t && t.style) {
f.each([ "webkit", "moz", "Moz", "ms", "o", "" ], function(i) {
f.each(e, function(e, r) {
i && (r = i + r.substring(0, 1).toUpperCase() + r.substring(1)), r in t.style && (t.style[r] = !n && e);
});
});
var i = function() {
return !1;
};
"none" == e.userSelect && (t.onselectstart = !n && i), "none" == e.userDrag && (t.ondragstart = !n && i);
}
}
};
i.Instance = function(t, e) {
var r = this;
return n(), this.element = t, this.enabled = !0, this.options = f.extend(f.extend({}, i.defaults), e || {}),
this.options.stop_browser_behavior && f.toggleDefaultBehavior(this.element, this.options.stop_browser_behavior, !1),
this.eventStartHandler = b.onTouch(t, d, function(t) {
r.enabled && x.startDetect(r, t);
}), this.eventHandlers = [], this;
}, i.Instance.prototype = {
on: function(t, e) {
var n = t.split(" ");
return f.each(n, function(t) {
this.element.addEventListener(t, e, !1), this.eventHandlers.push({
gesture: t,
handler: e
});
}, this), this;
},
off: function(t, e) {
var n, i, r = t.split(" ");
return f.each(r, function(t) {
for (this.element.removeEventListener(t, e, !1), n = -1; i = this.eventHandlers[++n]; ) i.gesture === t && i.handler === e && this.eventHandlers.splice(n, 1);
}, this), this;
},
trigger: function(t, e) {
e || (e = {});
var n = i.DOCUMENT.createEvent("Event");
n.initEvent(t, !0, !0), n.gesture = e;
var r = this.element;
return f.hasParent(e.target, r) && (r = e.target), r.dispatchEvent(n), this;
},
enable: function(t) {
return this.enabled = t, this;
},
dispose: function() {
var t, e;
for (this.options.stop_browser_behavior && f.toggleDefaultBehavior(this.element, this.options.stop_browser_behavior, !0),
t = -1; e = this.eventHandlers[++t]; ) this.element.removeEventListener(e.gesture, e.handler, !1);
return this.eventHandlers = [], b.unbindDom(this.element, i.EVENT_TYPES[d], this.eventStartHandler),
null;
}
};
var m = null, g = !1, v = !1, b = i.event = {
bindDom: function(t, e, n) {
var i = e.split(" ");
f.each(i, function(e) {
t.addEventListener(e, n, !1);
});
},
unbindDom: function(t, e, n) {
var i = e.split(" ");
f.each(i, function(e) {
t.removeEventListener(e, n, !1);
});
},
onTouch: function(t, e, n) {
var r = this, o = function(o) {
var a = o.type.toLowerCase();
if (!f.inStr(a, "mouse") || !v) {
f.inStr(a, "touch") || f.inStr(a, "pointerdown") || f.inStr(a, "mouse") && 1 === o.which ? g = !0 : f.inStr(a, "mouse") && !o.which && (g = !1),
(f.inStr(a, "touch") || f.inStr(a, "pointer")) && (v = !0);
var s = 0;
g && (i.HAS_POINTEREVENTS && e != h ? s = y.updatePointer(e, o) : f.inStr(a, "touch") ? s = o.touches.length : v || (s = f.inStr(a, "up") ? 0 : 1),
s > 0 && e == h ? e = p : s || (e = h), (s || null === m) && (m = o), n.call(x, r.collectEventData(t, e, r.getTouchList(m, e), o)),
i.HAS_POINTEREVENTS && e == h && (s = y.updatePointer(e, o))), s || (m = null, g = !1,
v = !1, y.reset());
}
};
return this.bindDom(t, i.EVENT_TYPES[e], o), o;
},
determineEventTypes: function() {
var t;
t = i.HAS_POINTEREVENTS ? y.getEvents() : i.NO_MOUSEEVENTS ? [ "touchstart", "touchmove", "touchend touchcancel" ] : [ "touchstart mousedown", "touchmove mousemove", "touchend touchcancel mouseup" ],
i.EVENT_TYPES[d] = t[0], i.EVENT_TYPES[p] = t[1], i.EVENT_TYPES[h] = t[2];
},
getTouchList: function(t) {
return i.HAS_POINTEREVENTS ? y.getTouchList() : t.touches ? t.touches : (t.identifier = 1,
[ t ]);
},
collectEventData: function(t, e, n, i) {
var r = c;
return (f.inStr(i.type, "mouse") || y.matchType(l, i)) && (r = l), {
center: f.getCenter(n),
timeStamp: Date.now(),
target: i.target,
touches: n,
eventType: e,
pointerType: r,
srcEvent: i,
preventDefault: function() {
var t = this.srcEvent;
t.preventManipulation && t.preventManipulation(), t.preventDefault && t.preventDefault();
},
stopPropagation: function() {
this.srcEvent.stopPropagation();
},
stopDetect: function() {
return x.stopDetect();
}
};
}
}, y = i.PointerEvent = {
pointers: {},
getTouchList: function() {
var t = [];
return f.each(this.pointers, function(e) {
t.push(e);
}), t;
},
updatePointer: function(t, e) {
return t == h ? delete this.pointers[e.pointerId] : (e.identifier = e.pointerId,
this.pointers[e.pointerId] = e), Object.keys(this.pointers).length;
},
matchType: function(t, e) {
if (!e.pointerType) return !1;
var n = e.pointerType, i = {};
return i[l] = n === l, i[c] = n === c, i[u] = n === u, i[t];
},
getEvents: function() {
return [ "pointerdown MSPointerDown", "pointermove MSPointerMove", "pointerup pointercancel MSPointerUp MSPointerCancel" ];
},
reset: function() {
this.pointers = {};
}
}, x = i.detection = {
gestures: [],
current: null,
previous: null,
stopped: !1,
startDetect: function(t, e) {
this.current || (this.stopped = !1, this.current = {
inst: t,
startEvent: f.extend({}, e),
lastEvent: !1,
lastVelocityEvent: !1,
velocity: !1,
name: ""
}, this.detect(e));
},
detect: function(t) {
if (this.current && !this.stopped) {
t = this.extendEventData(t);
var e = this.current.inst, n = e.options;
return f.each(this.gestures, function(i) {
if (!this.stopped && !1 !== n[i.name] && !1 !== e.enabled && !1 === i.handler.call(i, t, e)) return this.stopDetect(),
!1;
}, this), this.current && (this.current.lastEvent = t), t.eventType == h && !t.touches.length - 1 && this.stopDetect(),
t;
}
},
stopDetect: function() {
this.previous = f.extend({}, this.current), this.current = null, this.stopped = !0;
},
getVelocityData: function(t, e, n, r) {
var o = this.current, a = o.lastVelocityEvent, s = o.velocity;
a && t.timeStamp - a.timeStamp > i.UPDATE_VELOCITY_INTERVAL ? (s = f.getVelocity(t.timeStamp - a.timeStamp, t.center.clientX - a.center.clientX, t.center.clientY - a.center.clientY),
o.lastVelocityEvent = t) : o.velocity || (s = f.getVelocity(e, n, r), o.lastVelocityEvent = t),
o.velocity = s, t.velocityX = s.x, t.velocityY = s.y;
},
getInterimData: function(t) {
var e, n, i = this.current.lastEvent;
t.eventType == h ? (e = i && i.interimAngle, n = i && i.interimDirection) : (e = i && f.getAngle(i.center, t.center),
n = i && f.getDirection(i.center, t.center)), t.interimAngle = e, t.interimDirection = n;
},
extendEventData: function(t) {
var e = this.current, n = e.startEvent;
t.touches.length == n.touches.length && t.touches !== n.touches || (n.touches = [],
f.each(t.touches, function(t) {
n.touches.push(f.extend({}, t));
}));
var i = t.timeStamp - n.timeStamp, r = t.center.clientX - n.center.clientX, o = t.center.clientY - n.center.clientY;
return this.getVelocityData(t, i, r, o), this.getInterimData(t), f.extend(t, {
startEvent: n,
deltaTime: i,
deltaX: r,
deltaY: o,
distance: f.getDistance(n.center, t.center),
angle: f.getAngle(n.center, t.center),
direction: f.getDirection(n.center, t.center),
scale: f.getScale(n.touches, t.touches),
rotation: f.getRotation(n.touches, t.touches)
}), t;
},
register: function(t) {
var e = t.defaults || {};
return void 0 === e[t.name] && (e[t.name] = !0), f.extend(i.defaults, e, !0), t.index = t.index || 1e3,
this.gestures.push(t), this.gestures.sort(function(t, e) {
return t.index < e.index ? -1 : t.index > e.index ? 1 : 0;
}), this.gestures;
}
};
i.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(t, e) {
var n = x.current;
if (n.name != this.name && this.triggered) return e.trigger(this.name + "end", t),
void (this.triggered = !1);
if (!(e.options.drag_max_touches > 0 && t.touches.length > e.options.drag_max_touches)) switch (t.eventType) {
case d:
this.triggered = !1;
break;
case p:
if (t.distance < e.options.drag_min_distance && n.name != this.name) return;
var i = n.startEvent.center;
if (n.name != this.name && (n.name = this.name, e.options.correct_for_drag_min_distance && t.distance > 0)) {
var l = Math.abs(e.options.drag_min_distance / t.distance);
i.pageX += t.deltaX * l, i.pageY += t.deltaY * l, i.clientX += t.deltaX * l, i.clientY += t.deltaY * l,
t = x.extendEventData(t);
}
(n.lastEvent.drag_locked_to_axis || e.options.drag_lock_to_axis && e.options.drag_lock_min_distance <= t.distance) && (t.drag_locked_to_axis = !0);
var c = n.lastEvent.direction;
t.drag_locked_to_axis && c !== t.direction && (f.isVertical(c) ? t.direction = t.deltaY < 0 ? a : r : t.direction = t.deltaX < 0 ? o : s),
this.triggered || (e.trigger(this.name + "start", t), this.triggered = !0), e.trigger(this.name, t),
e.trigger(this.name + t.direction, t);
var u = f.isVertical(t.direction);
(e.options.drag_block_vertical && u || e.options.drag_block_horizontal && !u) && t.preventDefault();
break;
case h:
this.triggered && e.trigger(this.name + "end", t), this.triggered = !1;
}
}
}, i.gestures.Hold = {
name: "hold",
index: 10,
defaults: {
hold_timeout: 500,
hold_threshold: 2
},
timer: null,
handler: function(t, e) {
switch (t.eventType) {
case d:
clearTimeout(this.timer), x.current.name = this.name, this.timer = setTimeout(function() {
"hold" == x.current.name && e.trigger("hold", t);
}, e.options.hold_timeout);
break;
case p:
t.distance > e.options.hold_threshold && clearTimeout(this.timer);
break;
case h:
clearTimeout(this.timer);
}
}
}, i.gestures.Release = {
name: "release",
index: 1 / 0,
handler: function(t, e) {
t.eventType == h && e.trigger(this.name, t);
}
}, i.gestures.Swipe = {
name: "swipe",
index: 40,
defaults: {
swipe_min_touches: 1,
swipe_max_touches: 1,
swipe_velocity: .7
},
handler: function(t, e) {
if (t.eventType == h) {
if (t.touches.length < e.options.swipe_min_touches || t.touches.length > e.options.swipe_max_touches) return;
(t.velocityX > e.options.swipe_velocity || t.velocityY > e.options.swipe_velocity) && (e.trigger(this.name, t),
e.trigger(this.name + t.direction, t));
}
}
}, i.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(t, e) {
var n, i, r;
t.eventType == d ? this.has_moved = !1 : t.eventType != p || this.moved ? t.eventType == h && "touchcancel" != t.srcEvent.type && t.deltaTime < e.options.tap_max_touchtime && !this.has_moved && (n = x.previous,
i = n && n.lastEvent && t.timeStamp - n.lastEvent.timeStamp, r = !1, n && "tap" == n.name && i && i < e.options.doubletap_interval && t.distance < e.options.doubletap_distance && (e.trigger("doubletap", t),
r = !0), r && !e.options.tap_always || (x.current.name = "tap", e.trigger(x.current.name, t))) : this.has_moved = t.distance > e.options.tap_max_distance;
}
}, i.gestures.Touch = {
name: "touch",
index: -1 / 0,
defaults: {
prevent_default: !1,
prevent_mouseevents: !1
},
handler: function(t, e) {
return e.options.prevent_mouseevents && t.pointerType == l ? void t.stopDetect() : (e.options.prevent_default && t.preventDefault(),
void (t.eventType == d && e.trigger(this.name, t)));
}
}, i.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(t, e) {
if (x.current.name != this.name && this.triggered) return e.trigger(this.name + "end", t),
void (this.triggered = !1);
if (!(t.touches.length < 2)) {
if (e.options.transform_always_block && t.preventDefault(), e.options.transform_within_instance) for (var n = -1; t.touches[++n]; ) if (!f.hasParent(t.touches[n].target, e.element)) return;
switch (t.eventType) {
case d:
this.triggered = !1;
break;
case p:
var i = Math.abs(1 - t.scale), r = Math.abs(t.rotation);
if (i < e.options.transform_min_scale && r < e.options.transform_min_rotation) return;
x.current.name = this.name, this.triggered || (e.trigger(this.name + "start", t),
this.triggered = !0), e.trigger(this.name, t), r > e.options.transform_min_rotation && e.trigger("rotate", t),
i > e.options.transform_min_scale && (e.trigger("pinch", t), e.trigger("pinch" + (t.scale < 1 ? "in" : "out"), t));
break;
case h:
this.triggered && e.trigger(this.name + "end", t), this.triggered = !1;
}
}
}
}, "function" == typeof define && define.amd ? define("hammerjs", [], function() {
return i;
}) : "object" == typeof module && module.exports ? module.exports = i : t.Hammer = i;
}(window), define("layout", [ "jquery", "underscore", "utils", "constants", "settings", "eventMgr", "crel", "mousetrap", "hammerjs" ], function(t, e, 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(e) {
this.selector = e, this.elt = document.querySelector(e), this.$elt = t(this.elt);
}
function p(t) {
t && t.target !== b.elt && t.target !== y.elt && t.target !== k.elt || (U.forEach(function(t) {
t();
}), u(), 0 !== U.length && f(), U = []);
}
function h() {
return e.find(tt, function(t) {
return v.width > t.screenWidth;
}).maxWidth;
}
function f() {
var t = x.height - 60, e = (_.elt.offsetWidth - h()) / 2;
e < i.EDITOR_DEFAULT_PADDING && (e = i.EDITOR_DEFAULT_PADDING), z.style.paddingLeft = e + "px",
z.style.paddingRight = e + "px", z.style.paddingBottom = t + "px", W.style.width = e + "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 = t + "px";
var r = it + at + $ + rt;
window.viewerMode && (r = it + at + $ + ot);
var a = v.width - r + $;
et.forEach(function(t, e) {
r += t.width, e === et.length - 1 && (r -= rt), v.width < r ? Q.appendChild(t.elt) : (X.insertBefore(t.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 t = x.height - O.height;
if (t < F.height) {
k.isOpen = !1, k.$elt.trigger("hide.layout.toggle").trigger("hidden.layout.toggle");
continue;
}
k.height = t, 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 e = x.width - O.width;
if (e < F.width) {
k.isOpen = !1, k.$elt.trigger("hide.layout.toggle").trigger("hidden.layout.toggle");
continue;
}
k.width = e, 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, q = 18, G = {
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(e.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(e.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 = e.isBoolean(a) ? a : !this.isOpen, this.isOpen ? (this.isShown = !0,
this.$elt.addClass("panel-open").trigger("show.layout.toggle"), i && (r = t(n.createBackdrop(b.elt)).on("click.backdrop", e.bind(function() {
this.toggle(!1);
}, this)), this.$elt.addClass("bring-to-front")), U.push(e.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(e.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(t) {
this.hammer = l(this.elt, {
drag: !!t,
drag_max_touches: 0,
gesture: !1,
hold: !1,
release: !1,
swipe: !t,
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
} ], tt = Z.slice(0).reverse(), et = [], nt = [ 80, 80, 160, 160, 80, 40 ].map(function(t) {
return t + 18;
}), it = 86, rt = 40, ot = 100, at = 88, st = "vertical" == r.layoutOrientation;
return L.init = function() {
function n(t, e) {
e = e || 0, c += [ "@media (min-width: " + e + "px) {", "#wmd-input {", " font-size: " + t + "px;", "}", "#preview-contents {", " font-size: " + t + "px;", "}", "}" ].join("\n");
}
var i = 0;
if (t(document.body).on("show.bs.modal", ".modal", function() {
S.toggle(!1), C.toggle(!1), i++;
}).on("hidden.bs.modal", ".modal", function() {
i--;
}), function(t) {
t.position = "absolute", t.top = 0, t.left = 0, t.bottom = 0, t.right = 0, t.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"),
t([ b.elt, y.elt, x.elt ]).on("scroll", function() {
this.scrollLeft = 0;
}), e.each(w.elt.querySelectorAll(".right-buttons"), function(t) {
et.push({
elt: t,
width: nt.shift()
});
}), e.each(w.elt.querySelectorAll(".left-buttons"), function(t) {
et.push({
elt: t,
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(e.bind(w.toggle, w)), k.isOpen = !0,
k.createToggler(), k.halfSize = !0, I.$elt.click(e.bind(k.toggle, k)), k.$elt.on("show.layout.toggle", function() {
e.defer(function() {
k.isOpen || (window.location.href = "viewer");
});
}), C.isOpen = !1, C.createToggler(!0), C.$elt.find(".toggle-button").click(e.bind(C.toggle, C)),
C.$elt.on("click", "a[data-toggle!=collapse]", e.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(e.bind(S.toggle, S)), S.$elt.on("click", "a[data-toggle!=collapse]", e.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(t) {
st ? k.height = o.height - t.gesture.deltaY : k.width = o.width - t.gesture.deltaX,
t.gesture.preventDefault(), k.halfSize = !1, g();
});
}
N.initHammer(!0), N.adjustPosition = function() {
if (N.isDragged) {
var t = -v.width + N.elt.offsetWidth, e = -v.height + N.elt.offsetHeight;
this.x < t && (this.x = t), this.y < e && (this.y = e), 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(t) {
N.x = l.x + t.gesture.deltaX, N.y = l.y + t.gesture.deltaY, N.adjustPosition(),
t.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;
}, t(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 = G.x, N.applyCss(), N.$elt.removeClass("closed"));
}
function i() {
clearTimeout(r), r = setTimeout(function() {
N.isDragged || o || (N.isOpen = !1, N.x = G.x + N.elt.offsetWidth + q, N.applyCss(),
N.$elt.addClass("closed"));
}, 3e3);
}
N.x = G.x, N.y = G.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();
}), e.each(N.elt.querySelectorAll(".btn-group"), function(e) {
var n = t(e);
n.on("shown.bs.dropdown", function() {
n.find(".dropdown-menu").css({
right: -N.elt.offsetWidth + n.width() + n.position().left
});
var t = -N.y - 130;
v.height / 2 > -N.y && (t = v.height + N.y - N.elt.offsetHeight - 130), n.find(".markdown-syntax, .table-of-contents").css({
maxHeight: t
});
}).addClass("dropup");
});
}), o.addListener("onExtensionButtonResize", function() {
N.isDragged ? N.adjustPosition() : N.isOpen || (N.$elt.removeClass("animate"), N.x = G.x + N.elt.offsetWidth + q,
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\t<div class="layout-wrapper-l2">\n\t\t<div class="navbar navbar-default">\n\t\t\t<div class="navbar-inner">\n\t\t\t\t<div class="nav left-space"></div>\n\t\t\t\t<div class="nav right-space pull-right"></div>\n\t\t\t\t<div class="buttons-dropdown dropdown">\n\t\t \t\t<div class="nav">\n\t\t \t\t<button class="btn btn-success" data-toggle="dropdown"\n\t\t \t\ttitle="Show buttons">\n\t\t \t\t<i class="icon-th-large"></i>\n\t\t \t</button>\n\t\t \t\t <div class="dropdown-menu">\n\t\t \t\t</div>\n\t\t \t</div>\n\t\t\t\t</div>\n\t\t\t\t<ul class="nav left-buttons">\n\t\t\t\t\t<li class="wmd-button-group1 btn-group"></li>\n\t\t\t\t</ul>\n\t\t\t\t<ul class="nav left-buttons">\n\t\t\t\t\t<li class="wmd-button-group2 btn-group"></li>\n\t\t\t\t</ul>\n\t\t\t\t<ul class="nav left-buttons">\n\t\t\t\t\t<li class="wmd-button-group3 btn-group"></li>\n\t\t\t\t</ul>\n\t\t\t\t<ul class="nav left-buttons">\n\t\t\t\t\t<li class="wmd-button-group5 btn-group"></li>\n\t\t\t\t</ul>\n\t\t\t\t<ul class="nav left-buttons">\n\t\t\t\t\t<li class="wmd-button-group4 btn-group">\n\t\t\t\t\t\t<a class="btn btn-success button-open-discussion" title="Comments Ctrl/Cmd+M"><i class="icon-comment-alt"></i></a>\n\t\t\t\t\t</li>\n\t\t\t\t</ul>\n\t\t\t\t<ul class="nav pull-right right-buttons">\n\t\t\t\t\t<li class="offline-status hide">\n\t\t\t\t\t <div class="text-danger">\n\t\t\t\t\t <i class="icon-attention-circled"></i>offline\n\t\t\t\t\t </div>\n\t\t\t\t\t</li>\n\t\t\t\t\t<li class="extension-buttons"></li>\n\t\t\t\t</ul>\n\t\t\t\t<ul class="nav pull-right title-container">\n\t\t\t\t\t<li><div class="working-indicator"></div></li>\n\t\t\t\t\t<li><a class="btn btn-success file-title-navbar" href="#"\n\t\t\t\t\t\ttitle="Rename document"> </a></li>\n\t\t\t\t\t<li><div class="input-file-title-container"><input type="text"\n\t\t\t\t\t\tclass="col-sm-4 form-control hide input-file-title"\n\t\t\t\t\t\tplaceholder="Document title" /></div></li>\n\t\t\t\t</ul>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class="layout-wrapper-l3">\n\t\t\t<pre id="wmd-input" class="form-control"><div class="editor-content" contenteditable=true></div><div class="editor-margin"></div></pre>\n\t\t\t<div class="preview-panel">\n\t\t\t\t<div class="layout-resizer layout-resizer-preview"></div>\n\t\t\t\t<div class="layout-toggler layout-toggler-navbar btn btn-info" title="Toggle navigation bar"><i class="icon-th"></i></div>\n\t\t\t\t<div class="layout-toggler layout-toggler-preview btn btn-info" title="Toggle preview"><i class="icon-none"></i></div>\n\t\t\t\t<div class="preview-container">\n\t\t\t\t\t<div id="preview-contents">\n\t\t\t\t\t\t<div id="wmd-preview" class="preview-content"></div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class="extension-preview-buttons">\n\t\t\t<div class="btn-group drag-me" title="Drag me!">\n\t\t\t\t<i class="icon-ellipsis-vert"></i>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n\t<div id="wmd-button-bar" class="hide"></div>\n\n\t<div class="menu-panel">\n\t\t<button class="btn toggle-button" title="Menu">\n\t\t\t<img\n\t\t\t\tdata-stackedit-src="menu-icon.png" width="24" height="24" />\n\t\t</button>\n\t\t<div class="panel-content">\n\t\t\t<div class="list-group">\n\n\t\t\t\t<a href="viewer" title="StackEdit Viewer"\n\t\t\t\t\tclass="list-group-item">\n\t\t\t\t\t<i class="icon-resize-full"></i> StackEdit Viewer\n\t\t\t\t</a>\n\n\t\t\t</div>\n\t\t\t<div class="list-group">\n\n\t\t\t\t<a href="#" data-toggle="collapse" data-target=".collapse-synchronize"\n\t\t\t\t\tclass="list-group-item">\n\t\t\t\t\t<div><i class="icon-refresh"></i> Synchronize</div>\n\t\t\t\t\t<small>Open, save, collaborate in the Cloud</small>\n\t\t\t\t</a>\n\t\t\t\t<div class="sub-menu collapse collapse-synchronize clearfix">\n\t\t\t\t\t<ul class="nav alert alert-danger show-already-synchronized">\n\t\t\t\t\t\t<li><div>"<span class="file-title"></span>" is already synchronized.</div></li>\n\t\t\t\t\t\t<li><a href="#" class="action-force-synchronization"><i class="icon-refresh"></i>\n\t\t\t\t\t\t\tForce synchronization</a></li>\n\t <li><a href="#" data-toggle="modal" data-target=".modal-manage-sync"\n\t class="action-reset-input"><i\n\t class="icon-refresh"></i> Manage synchronization</a></li>\n\t </ul>\n\t\t\t\t\t<ul class="nav">\n\t\t\t\t\t\t<li><a href="#" class="action-sync-import-dialog-couchdb"><i\n\t\t\t\t\t\t\tclass="icon-provider-couchdb"></i> Open from CouchDB <sup class="text-danger">new</sup></a></li>\n\t\t\t\t\t\t<li><a href="#" class="action-sync-export-dialog-couchdb"><i\n\t\t\t\t\t class="icon-provider-couchdb"></i> Save on CouchDB <sup class="text-danger">new</sup></a></li>\n\t\t\t\t\t\t<li><a href="#" class="action-sync-import-dropbox"><i\n\t\t\t\t\t\t\tclass="icon-provider-dropbox"></i> Open from Dropbox</a></li>\n\t\t\t\t\t\t<li><a href="#" class="action-sync-export-dialog-dropbox"><i\n\t\t\t\t\t class="icon-provider-dropbox"></i> Save on Dropbox</a></li>\n\t\t\t\t\t\t<li><a href="#" class="submenu-sync-gdrive action-sync-import-gdrive"><i\n\t\t\t\t\t\t\tclass="icon-provider-gdrive"></i> Open from Google Drive</a></li>\n\t\t\t\t\t\t<li><a href="#" class="submenu-sync-gdrive action-sync-export-dialog-gdrive"><i\n\t\t\t\t\t\t\tclass="icon-provider-gdrive"></i> Save on Google Drive</a></li>\n\t\t\t\t\t\t<li><a href="#" class="submenu-sync-gdrivesec action-sync-import-gdrivesec"><i\n\t\t\t\t\t\t\tclass="icon-provider-gdrive"></i> Open from Google Drive<br><small>(2nd account)</small></a></li>\n\t\t\t\t\t\t<li><a href="#" class="submenu-sync-gdrivesec action-sync-export-dialog-gdrivesec"><i\n\t\t\t\t\t\t\tclass="icon-provider-gdrive"></i> Save on Google Drive<br><small>(2nd account)</small></a></li>\n\t\t\t\t\t\t<li><a href="#" class="submenu-sync-gdriveter action-sync-import-gdriveter"><i\n\t\t\t\t\t\t\tclass="icon-provider-gdrive"></i> Open from Google Drive<br><small>(3rd account)</small></a></li>\n\t\t\t\t\t\t<li><a href="#" class="submenu-sync-gdriveter action-sync-export-dialog-gdriveter"><i\n\t\t\t\t\t\t\tclass="icon-provider-gdrive"></i> Save on Google Drive<br><small>(3rd account)</small></a></li>\n\t\t\t\t\t</ul>\n\t\t\t\t</div>\n\t\t\t\t<a href="#" data-toggle="collapse" data-target=".collapse-publish-on"\n\t\t\t\t\tclass="list-group-item">\n\t\t\t\t\t<div><i class="icon-upload"></i>Publish</div>\n\t\t\t\t\t<small>Export to the web</small>\n\t\t\t\t</a>\n\t\t\t\t<div class="sub-menu collapse collapse-publish-on clearfix">\n\t\t\t\t\t<ul class="nav alert alert-danger show-already-published">\n\t <li><div>"<span class="file-title"></span>" is already published.</div></li>\n\t <li><a href="#" class="action-update-publication"><i class="icon-upload"></i>\n\t Update publication</a></li>\n\t <li><a href="#" data-toggle="modal" data-target=".modal-manage-publish"\n\t class="action-reset-input"><i class="icon-upload"></i>\n\t Manage publication</a></li>\n\t\t\t\t\t</ul>\n\t\t\t\t\t<ul class="nav publish-on-provider-list">\n\t\t\t\t\t</ul>\n\t\t\t\t</div>\n\t\t\t\t<a href="#" data-toggle="modal" data-target=".modal-manage-sharing"\n\t\t\t\t\tclass="action-reset-input list-group-item">\n\t\t\t\t\t<div><i class="icon-link"></i>Sharing</div>\n\t\t\t\t\t<small>Share document links</small>\n\t\t\t\t</a>\n\t\t\t</div>\n\t\t\t<div class="list-group">\n\n\t\t\t\t<a data-toggle="modal"\n\t\t\t\t\tdata-target=".modal-import-harddrive-markdown"\n\t\t\t\t\tclass="list-group-item action-reset-input" href="#"><i\n\t\t\t\t\tclass="icon-hdd"></i> Import from disk</a>\n\t\t\t\t<a href="#" data-toggle="collapse" data-target=".collapse-save-as"\n\t\t\t\t\tclass="list-group-item"><i class="icon-hdd"></i> Export to disk</a>\n\t\t\t\t<div class="sub-menu collapse collapse-save-as clearfix">\n\t\t\t\t\t<ul class="nav">\n\t\t\t\t\t\t<li><a class="action-download-md" href="#"><i\n\t\t\t\t\t class="icon-download"></i> As Markdown</a></li>\n\t\t\t\t\t\t<li><a class="action-download-html" href="#"><i\n\t\t\t\t\t class="icon-download"></i> As HTML</a></li>\n\t\t\t\t\t\t<li><a class="action-download-template" href="#"><i\n\t\t\t\t\t class="icon-download"></i> Using template</a></li>\n\t\t\t\t\t\t<li><a class="action-download-pdf" href="#"><i\n\t\t\t\t\t class="icon-download"></i> As PDF <sup class="text-danger">sponsor</sup></a></li>\n\t\t\t\t\t</ul>\n\t\t\t\t</div>\n\n\t <a data-toggle="modal" data-target=".modal-import-url"\n\t class="list-group-item action-reset-input" href="#"><i\n\t\t\t\t\tclass="icon-globe"></i> Import from URL</a>\n\t <a data-toggle="modal"\n\t\t\t\t\tdata-target=".modal-import-harddrive-html"\n\t\t\t\t\tclass="list-group-item action-reset-input" href="#"><i\n\t\t\t\t\tclass="icon-code"></i> Convert HTML to Markdown</a>\n\t\t\t</div>\n\t\t\t<ul class="nav">\n\t\t\t\t<li><a href="#" data-toggle="modal"\n\t\t\t\t\tdata-target=".modal-settings" class="action-load-settings"><i\n\t\t\t\t\t\tclass="icon-cog"></i> Settings</a></li>\n\t\t\t\t<li><a href="#" data-toggle="modal" data-target=".modal-about"><i\n\t\t\t\t\t\tclass="icon-help-circled"></i> About</a></li>\n\t\t\t</ul>\n\n\t\t</div>\n\t</div>\n\n\n\t<div class="document-panel">\n\t\t<button class="btn toggle-button" title="Select document Ctrl+[ Ctrl+]">\n\t\t\t<i class="icon-folder-open"></i>\n\t\t</button>\n\t\t<div class="search-bar clearfix">\n\t\t\t<ul class="nav">\n\t\t\t\t<li><a href="#" class="action-create-file"><i\n\t\t\t\t\t\tclass="icon-file"></i> New document</a></li>\n\t\t\t\t<li><a href="#" class="action-remove-file-confirm"><i\n\t\t\t\t\t\tclass="icon-trash"></i> Delete document</a></li>\n\t\t\t\t<li><a href="#" data-toggle="modal" data-target=".modal-document-manager"><i\n\t\t\t\t\t\tclass="icon-layers"></i> Manage documents</a></li>\n\t </ul>\n\t\t\t<div class="input-group">\n\t\t\t\t<span class="input-group-addon"><i class="icon-search"></i></span><input\n\t\t\t\t\ttype="text" class="form-control" placeholder="Find document" />\n\t\t\t</div>\n\t\t</div>\n\t\t<div class="panel-content">\n\t\t\t<div class="list-group document-list"></div>\n\t\t\t<div class="list-group document-list-filtered hide"></div>\n\t\t</div>\n\t</div>\n</div>\n\n<div class="modal fade modal-document-manager">\n\t<div class="modal-dialog">\n\t\t<div class="modal-content">\n\n\t\t\t<div class="modal-header">\n\t\t\t\t<button type="button" class="close" data-dismiss="modal"\n\t\t\t\t\taria-hidden="true">&times;</button>\n\t\t\t\t<h2 class="modal-title">Manage documents</h2>\n\t\t\t</div>\n\t\t\t<div class="modal-body">\n\t\t\t\t<div></div>\n\t\t\t\t<ul class="nav nav-pills document-list">\n\t\t\t\t\t<li class="pull-right dropdown"><a href="#"\n\t\t\t\t\t\tdata-toggle="dropdown"><i class="icon-check"></i> Selection <b\n\t\t\t\t\t\t\tclass="caret"></b></a>\n\t\t\t\t\t\t<ul class="dropdown-menu">\n\t\t\t\t\t\t\t<li><a href="#" class="action-select-all"><i\n\t\t\t\t\t\t\t\t\tclass="icon-check"></i> Select all</a></li>\n\t\t\t\t\t\t\t<li><a href="#" class="action-unselect-all"><i\n\t\t\t\t\t\t\t\t\tclass="icon-check-empty"></i> Unselect all</a></li>\n\t\t\t\t\t\t\t<li class="divider"></li>\n\t\t\t\t\t\t\t<li><a href="#" class="action-move-items"><i\n\t\t\t\t\t\t\t\t\tclass="icon-forward"></i> Move to folder</a></li>\n\t\t\t\t\t\t\t<li><a href="#" class="action-delete-items"><i\n\t\t\t\t\t\t\t\t\tclass="icon-trash"></i> Delete</a></li>\n\t\t\t\t\t\t</ul></li>\n\t\t\t\t\t<li class="pull-right"><a href="#"\n\t\t\t\t\t\tclass="action-create-folder"> <i class="icon-folder"></i>\n\t\t\t\t\t\t\tCreate folder\n\t\t\t\t\t</a></li>\n\t\t\t\t\t<li class="disabled"><a><i class="icon-file"></i> <span\n\t\t\t\t\t\t\tclass="document-count"></span></a></li>\n\t\t\t\t\t<li class="disabled"><a><i class="icon-folder"></i> <span\n\t\t\t\t\t\t\tclass="folder-count"></span></a></li>\n\t\t\t\t</ul>\n\t\t\t\t<div class="list-group document-list"></div>\n\t\t\t\t<p class="confirm-delete hide">The following documents will be\n\t\t\t\t\tdeleted locally:</p>\n\t\t\t\t<p class="choose-folder hide">Please choose a destination\n\t\t\t\t\tfolder:</p>\n\t\t\t\t<div class="list-group selected-document-list hide"></div>\n\t\t\t\t<div class="list-group select-folder-list hide"></div>\n\t\t\t</div>\n\t\t\t<div class="modal-footer">\n\t\t\t\t<a href="#"\n\t\t\t\t\tclass="btn btn-default confirm-delete choose-folder action-cancel hide">Cancel</a>\n\t\t\t\t<a href="#"\n\t\t\t\t\tclass="btn btn-primary confirm-delete action-delete-items-confirm hide">OK</a>\n\t\t\t\t<a href="#" class="btn btn-primary document-list"\n\t\t\t\t\tdata-dismiss="modal">Close</a>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>\n\n\n<div class="modal fade modal-insert-link">\n\t<div class="modal-dialog">\n\t\t<div class="modal-content">\n\n\t\t\t<div class="modal-header">\n\t\t\t\t<button type="button" class="close" data-dismiss="modal"\n\t\t\t\t\taria-hidden="true">&times;</button>\n\t\t\t\t<h2 class="modal-title">Hyperlink</h2>\n\t\t\t</div>\n\t\t\t<div class="modal-body">\n\t\t\t\t<p>Please provide the link URL and an optional title:</p>\n\t\t\t\t<div class="input-group">\n\t\t\t\t\t<span class="input-group-addon"><i class="icon-globe"></i></span><input\n\t\t\t\t\t\tid="input-insert-link" type="text" class="col-sm-5 form-control"\n\t\t\t\t\t\tplaceholder=\'http://example.com/ "optional title"\' />\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class="modal-footer">\n\t\t\t\t<a href="#" class="btn btn-default" data-dismiss="modal">Cancel</a>\n\t\t\t\t<a href="#" class="btn btn-primary action-insert-link"\n\t\t\t\t\tdata-dismiss="modal">OK</a>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>\n\n\n<div class="modal fade modal-insert-image">\n\t<div class="modal-dialog">\n\t\t<div class="modal-content">\n\n\t\t\t<div class="modal-header">\n\t\t\t\t<button type="button" class="close" data-dismiss="modal"\n\t\t\t\t\taria-hidden="true">&times;</button>\n\t\t\t\t<h2 class="modal-title">Image</h2>\n\t\t\t</div>\n\t\t\t<div class="modal-body">\n\t\t\t\t<p>Please provide the image URL and an optional title:</p>\n\t\t\t\t<div class="input-group">\n\t\t\t\t\t<span class="input-group-addon"><i class="icon-picture"></i></span><input\n\t\t\t\t\t\tid="input-insert-image" type="text" class="col-sm-5 form-control"\n\t\t\t\t\t\tplaceholder=\'http://example.com/image.jpg "optional title"\' />\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class="modal-footer">\n\t\t\t\t<a href="#" class="btn btn-default pull-left action-import-image-gplus"\n\t\t\t\t\tdata-dismiss="modal"><i class="icon-provider-gplus"></i> Import\n\t\t\t\t\tfrom Google+</a> <a href="#" class="btn btn-default"\n\t\t\t\t\tdata-dismiss="modal">Cancel</a> <a href="#"\n\t\t\t\t\tclass="btn btn-primary action-insert-image" data-dismiss="modal">OK</a>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>\n\n\n<div class="modal fade modal-import-image">\n\t<div class="modal-dialog">\n\t\t<div class="modal-content">\n\n\t\t\t<div class="modal-header">\n\t\t\t\t<button type="button" class="close" data-dismiss="modal"\n\t\t\t\t\taria-hidden="true">&times;</button>\n\t\t\t\t<h2 class="modal-title">Google+ image import</h2>\n\t\t\t</div>\n\t\t\t<div class="modal-body">\n\t\t\t\t<div class="form-horizontal">\n\t\t\t\t\t<div class="form-group">\n\t\t\t\t\t\t<div class="col-sm-7">\n\t\t\t\t\t\t\t<img>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="form-group">\n\t\t\t\t\t\t<label class="col-sm-4 control-label"\n\t\t\t\t\t\t\tfor="input-import-image-title">Title (optional)</label>\n\t\t\t\t\t\t<div class="col-sm-7">\n\t\t\t\t\t\t\t<input type="text" id="input-import-image-title"\n\t\t\t\t\t\t\t\tplaceholder="Image title" class="form-control">\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="form-group">\n\t\t\t\t\t\t<label class="col-sm-4 control-label"\n\t\t\t\t\t\t\tfor="input-import-image-size">Size limit (optional)</label>\n\t\t\t\t\t\t<div class="col-sm-7 form-inline">\n\t\t\t\t\t\t\t<input type="text" id="input-import-image-size" placeholder="0"\n\t\t\t\t\t\t\t\tclass="col-sm-3 form-control"> px\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class="modal-footer">\n\t\t\t\t<a href="#" class="btn btn-default" data-dismiss="modal">Cancel</a>\n\t\t\t\t<a href="#" class="btn btn-primary action-import-image"\n\t\t\t\t\tdata-dismiss="modal">OK</a>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>\n\n\n<div class="modal fade modal-remove-file-confirm">\n\t<div class="modal-dialog">\n\t\t<div class="modal-content">\n\n\t\t\t<div class="modal-header">\n\t\t\t\t<button type="button" class="close" data-dismiss="modal"\n\t\t\t\t\taria-hidden="true">&times;</button>\n\t\t\t\t<h2 class="modal-title">Delete</h2>\n\t\t\t</div>\n\t\t\t<div class="modal-body">\n\t\t\t\t<p>\n\t\t\t\t\tAre you sure you want to delete "<span class="file-title"></span>"?\n\t\t\t\t</p>\n\t\t\t\t<blockquote>\n\t\t\t\t\t<p><b>Note:</b> It won\'t delete the file on synchronized locations.</p>\n\t\t\t\t</blockquote>\n\t\t\t</div>\n\t\t\t<div class="modal-footer">\n\t\t\t\t<a href="#" class="btn btn-default" data-dismiss="modal">Cancel</a>\n\t\t\t\t<a href="#" class="btn btn-primary action-remove-file"\n\t\t\t\t\tdata-dismiss="modal">Delete</a>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>\n\n\n<div class="modal fade modal-import-url">\n\t<div class="modal-dialog">\n\t\t<div class="modal-content">\n\n\t\t\t<div class="modal-header">\n\t\t\t\t<button type="button" class="close" data-dismiss="modal"\n\t\t\t\t\taria-hidden="true">&times;</button>\n\t\t\t\t<h2 class="modal-title">Import from URL</h2>\n\t\t\t</div>\n\t\t\t<div class="modal-body">\n\t\t\t\t<p>Please provide a link to a Markdown document.</p>\n\t\t\t\t<div class="form-horizontal">\n\t\t\t\t\t<div class="form-group">\n\t\t\t\t\t\t<label class="col-sm-3 control-label" for="input-import-url">URL</label>\n\t\t\t\t\t\t<div class="col-sm-8">\n\t\t\t\t\t\t\t<input type="text" id="input-import-url"\n\t\t\t\t\t\t\t\tplaceholder="http://www.abc.com/xyz.md" class="form-control">\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class="modal-footer">\n\t\t\t\t<a href="#" class="btn btn-default" data-dismiss="modal">Cancel</a>\n\t\t\t\t<a href="#" data-dismiss="modal"\n\t\t\t\t\tclass="btn btn-primary action-import-url">OK</a>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>\n\n\n<div class="modal fade modal-import-harddrive-markdown">\n\t<div class="modal-dialog">\n\t\t<div class="modal-content">\n\n\t\t\t<div class="modal-header">\n\t\t\t\t<button type="button" class="close" data-dismiss="modal"\n\t\t\t\t\taria-hidden="true">&times;</button>\n\t\t\t\t<h2 class="modal-title">Import from disk</h2>\n\t\t\t</div>\n\t\t\t<div class="modal-body">\n\t\t\t\t<p>Please select your Markdown files here:</p>\n\t\t\t\t<p>\n\t\t\t\t\t<input type="file" id="input-file-import-harddrive-markdown"\n\t\t\t\t\t\tmultiple class="form-control" />\n\t\t\t\t</p>\n\t\t\t\t<p>Or drag and drop your Markdown files here:</p>\n\t\t\t\t<p id="dropzone-import-harddrive-markdown" class="drop-zone">Drop\n\t\t\t\t\tfiles here</p>\n\t\t\t</div>\n\t\t\t<div class="modal-footer">\n\t\t\t\t<a href="#" class="btn btn-primary" data-dismiss="modal">Close</a>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>\n\n\n<div class="modal fade modal-import-harddrive-html">\n\t<div class="modal-dialog">\n\t\t<div class="modal-content">\n\n\t\t\t<div class="modal-header">\n\t\t\t\t<button type="button" class="close" data-dismiss="modal"\n\t\t\t\t\taria-hidden="true">&times;</button>\n\t\t\t\t<h2 class="modal-title">Convert HTML to Markdown</h2>\n\t\t\t</div>\n\t\t\t<div class="modal-body">\n\t\t\t\t<p>Please select your HTML files here:</p>\n\t\t\t\t<p>\n\t\t\t\t\t<input type="file" id="input-file-import-harddrive-html" multiple\n\t\t\t\t\t\tclass="form-control" />\n\t\t\t\t</p>\n\t\t\t\t<p>Or drag and drop your HTML files here:</p>\n\t\t\t\t<p id="dropzone-import-harddrive-html" class="drop-zone">Drop\n\t\t\t\t\tfiles here</p>\n\t\t\t\t<p>Or insert your HTML code here:</p>\n\t\t\t\t<textarea id="input-convert-html" class="form-control"></textarea>\n\t\t\t</div>\n\t\t\t<div class="modal-footer">\n\t\t\t\t<a href="#" class="btn btn-default" data-dismiss="modal">Close</a> <a\n\t\t\t\t\thref="#" class="btn btn-primary action-convert-html"\n\t\t\t\t\tdata-dismiss="modal">OK</a>\n\t\t\t</div>\n\t\t</div>\n\t</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\t<div class="modal-dialog">\n\t\t<div class="modal-content">\n\n\t\t\t<div class="modal-header">\n\t\t\t\t<button type="button" class="close" data-dismiss="modal"\n\t\t\t\t\taria-hidden="true">&times;</button>\n\t\t\t\t<h2 class="modal-title">Save on Dropbox</h2>\n\t\t\t</div>\n\t\t\t<div class="modal-body">\n\t\t\t\t<p>\n\t\t\t\t\tThis will save "<span class="file-title"></span>" to your <i\n\t\t\t\t\t\tclass="icon-provider-dropbox"></i>\n\t\t\t\t\t<code>Dropbox</code>\n\t\t\t\t\taccount and keep it synchronized.\n\t\t\t\t</p>\n\t\t\t\t<div class="form-horizontal">\n\t\t\t\t\t<div class="form-group">\n\t\t\t\t\t\t<label class="col-sm-3 control-label"\n\t\t\t\t\t\t\tfor="input-sync-export-dropbox-path">File path</label>\n\t\t\t\t\t\t<div class="col-sm-8">\n\t\t\t\t\t\t\t<input type="text" id="input-sync-export-dropbox-path"\n\t\t\t\t\t\t\t\tplaceholder="/path/to/My Document.md" class="form-control">\n\t\t\t\t\t\t\t<span class="help-block"> File path is composed of both\n\t\t\t\t\t\t\t\tfolder and filename. </span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<blockquote>\n\t\t\t\t\t<b>Note:</b>\n\t\t\t\t\t<ul>\n\t\t\t\t\t\t<li>Dropbox file path does not depend on document title.</li>\n\t\t\t\t\t\t<li>The title of your document will not be synchronized.</li>\n\t\t\t\t\t\t<li>Destination folder must exist.</li>\n\t\t\t\t\t\t<li>Any existing file at this location will be overwritten.</li>\n\t\t\t\t\t</ul>\n\t\t\t\t</blockquote>\n\t\t\t</div>\n\t\t\t<div class="modal-footer">\n\t\t\t\t<a href="#" class="btn btn-default" data-dismiss="modal">Cancel</a>\n\t\t\t\t<a href="#" data-dismiss="modal"\n\t\t\t\t\tclass="btn btn-primary action-sync-export-dropbox">OK</a>\n\t\t\t</div>\n\t\t</div>\n\t</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\t<div class="modal-dialog">\n\t\t<div class="modal-content">\n\n\t\t\t<div class="modal-header">\n\t\t\t\t<button type="button" class="close" data-dismiss="modal"\n\t\t\t\t\taria-hidden="true">&times;</button>\n\t\t\t\t<h2 class="modal-title">Synchronization</h2>\n\t\t\t</div>\n\t\t\t<div class="modal-body">\n\t\t\t\t<p>\n\t\t\t\t\t"<span class="file-title"></span>" is synchronized with the\n\t\t\t\t\tfollowing location(s):\n\t\t\t\t</p>\n\t\t\t\t<div class="sync-list"></div>\n\t\t\t\t<blockquote>\n\t\t\t\t\t<p><b>Note:</b> Removing a synchronized location will not delete any\n\t\t\t\t\tfile.</p>\n\t\t\t\t</blockquote>\n\t\t\t</div>\n\t\t\t<div class="modal-footer">\n\t\t\t\t<a href="#" class="btn btn-primary" data-dismiss="modal">Close</a>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>\n\n\n<div class="modal fade modal-publish">\n\t<div class="modal-dialog">\n\t\t<div class="modal-content">\n\n\t\t\t<div class="modal-header">\n\t\t\t\t<button type="button" class="close" data-dismiss="modal"\n\t\t\t\t\taria-hidden="true">&times;</button>\n\t\t\t\t<h2 class="modal-title">\n\t\t\t\t\tPublish on <span class="publish-provider-name"></span>\n\t\t\t\t</h2>\n\t\t\t</div>\n\t\t\t<div class="modal-body">\n\t\t\t\t<div class="form-horizontal">\n\t\t\t\t\t<div class="form-group modal-publish-ssh">\n\t\t\t\t\t\t<label class="col-sm-4 control-label" for="input-publish-ssh-host">Host</label>\n\t\t\t\t\t\t<div class="col-sm-7">\n\t\t\t\t\t\t\t<input type="text" id="input-publish-ssh-host"\n\t\t\t\t\t\t\t\tplaceholder="hostname.or.ip" class="form-control"> <span\n\t\t\t\t\t\t\t\tclass="help-block"> Host must be accessible publicly,\n\t\t\t\t\t\t\t\tunless you\'re hosting your own StackEdit instance.\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="form-group modal-publish-ssh">\n\t\t\t\t\t\t<label class="col-sm-4 control-label" for="input-publish-ssh-port">Port\n\t\t\t\t\t\t\t(optional)</label>\n\t\t\t\t\t\t<div class="col-sm-2">\n\t\t\t\t\t\t\t<input type="text" id="input-publish-ssh-port" placeholder="22"\n\t\t\t\t\t\t\t\tclass="form-control">\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="form-group modal-publish-ssh">\n\t\t\t\t\t\t<label class="col-sm-4 control-label"\n\t\t\t\t\t\t\tfor="input-publish-ssh-username">Username</label>\n\t\t\t\t\t\t<div class="col-sm-7">\n\t\t\t\t\t\t\t<input type="text" id="input-publish-ssh-username"\n\t\t\t\t\t\t\t\tplaceholder="username" class="form-control">\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="form-group modal-publish-ssh">\n\t\t\t\t\t\t<label class="col-sm-4 control-label"\n\t\t\t\t\t\t\tfor="input-publish-ssh-password">Password</label>\n\t\t\t\t\t\t<div class="col-sm-7">\n\t\t\t\t\t\t\t<input type="password" id="input-publish-ssh-password"\n\t\t\t\t\t\t\t\tplaceholder="password" class="form-control">\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="form-group modal-publish-github">\n\t\t\t\t\t\t<label class="col-sm-4 control-label"\n\t\t\t\t\t\t\tfor="input-publish-github-repo">Repository</label>\n\t\t\t\t\t\t<div class="col-sm-7">\n\t\t\t\t\t\t\t<input type="text" id="input-publish-github-repo"\n\t\t\t\t\t\t\t\tplaceholder="Repository name or URL" class="form-control">\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="form-group modal-publish-github">\n\t\t\t\t\t\t<label class="col-sm-4 control-label"\n\t\t\t\t\t\t\tfor="input-publish-github-branch">Branch</label>\n\t\t\t\t\t\t<div class="col-sm-7">\n\t\t\t\t\t\t\t<input type="text" id="input-publish-github-branch"\n\t\t\t\t\t\t\t\tplaceholder="branch-name" class="form-control">\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="form-group modal-publish-ssh modal-publish-github">\n\t\t\t\t\t\t<label class="col-sm-4 control-label"\n\t\t\t\t\t\t\tfor="input-publish-file-path">File path</label>\n\t\t\t\t\t\t<div class="col-sm-7">\n\t\t\t\t\t\t\t<input type="text" id="input-publish-file-path"\n\t\t\t\t\t\t\t\tplaceholder="path/to/file.md" class="form-control">\n\t\t\t\t\t\t\t<span class="help-block"> File path is composed of both\n\t\t\t\t\t\t\t\tfolder and filename. </span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="form-group modal-publish-gist">\n\t\t\t\t\t\t<label class="col-sm-4 control-label" for="input-publish-filename">Filename</label>\n\t\t\t\t\t\t<div class="col-sm-7">\n\t\t\t\t\t\t\t<input type="text" id="input-publish-filename"\n\t\t\t\t\t\t\t\tplaceholder="filename" class="form-control">\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="form-group modal-publish-gist">\n\t\t\t\t\t\t<label class="col-sm-4 control-label" for="input-publish-gist-id">Existing\n\t\t\t\t\t\t\tID (optional)</label>\n\t\t\t\t\t\t<div class="col-sm-7">\n\t\t\t\t\t\t\t<input type="text" id="input-publish-gist-id"\n\t\t\t\t\t\t\t\tplaceholder="GistID" class="form-control">\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="form-group modal-publish-gist">\n\t\t\t\t\t\t<label class="col-sm-4 control-label"\n\t\t\t\t\t\t\tfor="input-publish-gist-public">Public</label>\n\t\t\t\t\t\t<div class="col-sm-7">\n\t\t\t\t\t\t\t<div class="checkbox">\n\t\t\t\t\t\t\t\t<input type="checkbox" id="input-publish-gist-public"\n\t\t\t\t\t\t\t\t\tchecked="checked" />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="form-group modal-publish-blogger modal-publish-bloggerpage">\n\t\t\t\t\t\t<label class="col-sm-4 control-label"\n\t\t\t\t\t\t\tfor="input-publish-blogger-url">Blog URL</label>\n\t\t\t\t\t\t<div class="col-sm-7">\n\t\t\t\t\t\t\t<input type="text" id="input-publish-blogger-url"\n\t\t\t\t\t\t\t\tplaceholder="http://exemple.blogger.com/" class="form-control">\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="form-group modal-publish-tumblr">\n\t\t\t\t\t\t<label class="col-sm-4 control-label"\n\t\t\t\t\t\t\tfor="input-publish-tumblr-hostname">Blog hostname</label>\n\t\t\t\t\t\t<div class="col-sm-7">\n\t\t\t\t\t\t\t<input type="text" id="input-publish-tumblr-hostname"\n\t\t\t\t\t\t\t\tplaceholder="exemple.tumblr.com" class="form-control">\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="form-group modal-publish-wordpress">\n\t\t\t\t\t\t<label class="col-sm-4 control-label"\n\t\t\t\t\t\t\tfor="input-publish-tumblr-hostname">WordPress site</label>\n\t\t\t\t\t\t<div class="col-sm-7">\n\t\t\t\t\t\t\t<input type="text" id="input-publish-wordpress-site"\n\t\t\t\t\t\t\t\tplaceholder="exemple.wordpress.com" class="form-control">\n\t\t\t\t\t\t\t<span class="help-block"> <a target="_blank"\n\t\t\t\t\t\t\t\thref="http://jetpack.me/">Jetpack plugin</a> is required for\n\t\t\t\t\t\t\t\tself-hosted sites.\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div\n\t\t\t\t\t\tclass="form-group modal-publish-blogger modal-publish-tumblr modal-publish-wordpress">\n\t\t\t\t\t\t<label class="col-sm-4 control-label" for="input-publish-postid">Update\n\t\t\t\t\t\t\texisting post ID (optional)</label>\n\t\t\t\t\t\t<div class="col-sm-7">\n\t\t\t\t\t\t\t<input type="text" id="input-publish-postid" placeholder="PostID"\n\t\t\t\t\t\t\t\tclass="form-control">\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div\n\t\t\t\t\t\tclass="form-group modal-publish-bloggerpage">\n\t\t\t\t\t\t<label class="col-sm-4 control-label" for="input-publish-pageid">Update\n\t\t\t\t\t\t\texisting page ID (optional)</label>\n\t\t\t\t\t\t<div class="col-sm-7">\n\t\t\t\t\t\t\t<input type="text" id="input-publish-pageid" placeholder="PageID"\n\t\t\t\t\t\t\t\tclass="form-control">\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="form-group modal-publish-dropbox">\n\t\t\t\t\t\t<label class="col-sm-4 control-label"\n\t\t\t\t\t\t\tfor="input-publish-dropbox-path">File path</label>\n\t\t\t\t\t\t<div class="col-sm-7">\n\t\t\t\t\t\t\t<input type="text" id="input-publish-dropbox-path"\n\t\t\t\t\t\t\t\tplaceholder="/path/to/My Document.html" class="form-control">\n\t\t\t\t\t\t\t<span class="help-block"> File path is composed of both\n\t\t\t\t\t\t\t\tfolder and filename. </span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="form-group modal-publish-gdrive">\n\t\t\t\t\t\t<label class="col-sm-4 control-label"\n\t\t\t\t\t\t\tfor="input-publish-gdrive-fileid">File ID (optional)</label>\n\t\t\t\t\t\t<div class="col-sm-7">\n\t\t\t\t\t\t\t<input type="text" id="input-publish-gdrive-fileid"\n\t\t\t\t\t\t\t\tplaceholder="FileID" class="form-control"> <span\n\t\t\t\t\t\t\t\tclass="help-block">If no file ID is supplied, a new file\n\t\t\t\t\t\t\t\twill be created in your Google Drive root folder. You can move\n\t\t\t\t\t\t\t\tthe file afterwards within Google Drive.</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="form-group modal-publish-gdrive">\n\t\t\t\t\t\t<label class="col-sm-4 control-label"\n\t\t\t\t\t\t\tfor="input-publish-gdrive-filename">Force filename\n\t\t\t\t\t\t\t(optional)</label>\n\t\t\t\t\t\t<div class="col-sm-7">\n\t\t\t\t\t\t\t<input type="text" id="input-publish-gdrive-filename"\n\t\t\t\t\t\t\t\tplaceholder="Filename" class="form-control"> <span\n\t\t\t\t\t\t\t\tclass="help-block">If no file name is supplied, the\n\t\t\t\t\t\t\t\tdocument title will be used.</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div class="form-group">\n\t\t\t\t\t\t<label class="col-sm-4 control-label">Format</label>\n\t\t\t\t\t\t<div class="col-sm-7">\n\t\t\t\t\t\t\t<div class="radio">\n\t\t\t\t\t\t\t\t<label> <input type="radio" name="radio-publish-format"\n\t\t\t\t\t\t\t\t\tvalue="markdown"> Markdown\n\t\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class="radio">\n\t\t\t\t\t\t\t\t<label> <input type="radio" name="radio-publish-format"\n\t\t\t\t\t\t\t\t\tvalue="html"> HTML\n\t\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class="radio">\n\t\t\t\t\t\t\t\t<label> <input type="radio" name="radio-publish-format"\n\t\t\t\t\t\t\t\t\tvalue="template"> Template\n\t\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="collapse publish-custom-template-collapse">\n\t\t\t\t\t\t<div class="form-group">\n\t\t\t\t\t\t\t<div class="col-sm-4"></div>\n\t\t\t\t\t\t\t<div class="col-sm-7">\n\t\t\t\t\t\t\t\t<div class="checkbox">\n\t\t\t\t\t\t\t\t\t<label> <input type="checkbox"\n\t\t\t\t\t\t\t\t\t\tid="checkbox-publish-custom-template"> Custom template\n\t\t\t\t\t\t\t\t\t</label> <a href="#" class="tooltip-template">(?)</a>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class="form-group">\n\t\t\t\t\t\t\t<div class="col-sm-4"></div>\n\t\t\t\t\t\t\t<div class="col-sm-7">\n\t\t\t\t\t\t\t\t<textarea class="form-control"\n\t\t\t\t\t\t\t\t\tid="textarea-publish-custom-template"></textarea>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<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\t\t\t\t</blockquote>\n\t\t\t\t<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\t\t\t\t</blockquote>\n\t\t\t\t<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\t\t\t\t</blockquote>\n\t\t\t</div>\n\t\t\t<div class="modal-footer">\n\t\t\t\t<a href="#" class="btn btn-default" data-dismiss="modal">Cancel</a>\n\t\t\t\t<a href="#" data-dismiss="modal"\n\t\t\t\t\tclass="btn btn-primary action-process-publish">OK</a>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>\n\n\n<div class="modal fade modal-manage-publish">\n\t<div class="modal-dialog">\n\t\t<div class="modal-content">\n\n\t\t\t<div class="modal-header">\n\t\t\t\t<button type="button" class="close" data-dismiss="modal"\n\t\t\t\t\taria-hidden="true">&times;</button>\n\t\t\t\t<h2 class="modal-title">Publication</h2>\n\t\t\t</div>\n\t\t\t<div class="modal-body">\n\t\t\t\t<p>\n\t\t\t\t\t"<span class="file-title"></span>" is published on the following\n\t\t\t\t\tlocation(s):\n\t\t\t\t</p>\n\t\t\t\t<div class="publish-list"></div>\n\t\t\t\t<blockquote>\n\t\t\t\t\t<p><b>Note:</b> Removing a publish location will not delete the actual publication.</p>\n\t\t\t\t</blockquote>\n\t\t\t</div>\n\t\t\t<div class="modal-footer">\n\t\t\t\t<a href="#" class="btn btn-primary" data-dismiss="modal">Close</a>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>\n\n\n<div class="modal fade modal-manage-sharing">\n\t<div class="modal-dialog">\n\t\t<div class="modal-content">\n\n\t\t\t<div class="modal-header">\n\t\t\t\t<button type="button" class="close" data-dismiss="modal"\n\t\t\t\t\taria-hidden="true">&times;</button>\n\t\t\t\t<h2 class="modal-title">Sharing</h2>\n\t\t\t</div>\n\t\t\t<div class="modal-body">\n <p>Collaborate on "<span class="file-title"></span>" using the following link(s):</p>\n \t<p class="msg-no-share-editor"><b>No sharing link yet!</b>\n \t</p>\n <div class="share-editor-list"></div>\n \t<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 \t</blockquote>\n <hr>\n <p>Share a read-only version of "<span class="file-title"></span>" using the following link(s):</p>\n \t<p class="msg-no-share-viewer"><b>No sharing link yet!</b>\n \t</p>\n <div class="share-viewer-list"></div>\n \t<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 \t</blockquote>\n \t<blockquote>\n \t\t<p><b>Tip:</b> You can open any markdown URL within StackEdit Viewer using <a\n \t\t\thref="viewer#!url=https://raw.github.com/benweet/stackedit/master/README.md"\n \t\t\ttitle="Sharing example"><code>viewer#!url=</code></a>.</p>\n \t</blockquote>\n\t\t\t</div>\n\t\t\t<div class="modal-footer">\n\t\t\t\t<a href="#" class="btn btn-primary" data-dismiss="modal">Close</a>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>\n\n\n<div class="modal fade modal-settings">\n\t<div class="modal-dialog">\n\t\t<div class="modal-content">\n\n\t\t\t<div class="modal-header">\n\t\t\t\t<button type="button" class="close" data-dismiss="modal"\n\t\t\t\t\taria-hidden="true">&times;</button>\n\t\t\t\t<h2 class="modal-title">Settings</h2>\n\t\t\t\t<ul class="nav nav-tabs">\n\t\t\t\t\t<li class="active"><a class="action-load-settings"\n\t\t\t\t\t\thref="#tabpane-settings-basic" data-toggle="tab">Basic</a></li>\n\t\t\t\t\t<li><a class="action-load-settings"\n\t\t\t\t\t\thref="#tabpane-settings-advanced" data-toggle="tab">Advanced</a></li>\n\t\t\t\t\t<li><a class="action-load-settings"\n\t\t\t\t\t\thref="#tabpane-settings-extensions" data-toggle="tab">Extensions</a></li>\n\t\t\t\t\t<li><a class="action-load-settings"\n\t\t\t\t\t\thref="#tabpane-settings-utils" data-toggle="tab">Utils</a></li>\n\t\t\t\t</ul>\n\t\t\t</div>\n\t\t\t<div class="modal-body">\n\n\t\t\t\t<div class="tab-content clearfix">\n\t\t\t\t\t<div class="tab-pane active" id="tabpane-settings-basic">\n\t\t\t\t\t\t<div class="form-horizontal">\n\t\t\t\t\t\t\t<div class="form-group">\n\t\t\t\t\t\t\t\t<label class="col-sm-4 control-label">Layout orientation</label>\n\t\t\t\t\t\t\t\t<div class="col-sm-7">\n\t\t\t\t\t\t\t\t\t<div class="radio">\n\t\t\t\t\t\t\t\t\t\t<label> <input type="radio"\n\t\t\t\t\t\t\t\t\t\t\tname="radio-layout-orientation" value="horizontal">\n\t\t\t\t\t\t\t\t\t\t\tHorizontal\n\t\t\t\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class="radio">\n\t\t\t\t\t\t\t\t\t\t<label> <input type="radio"\n\t\t\t\t\t\t\t\t\t\t\tname="radio-layout-orientation" value="vertical">\n\t\t\t\t\t\t\t\t\t\t\tVertical\n\t\t\t\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class="form-group">\n\t\t\t\t\t\t\t\t<label class="col-sm-4 control-label" for="input-settings-theme">Theme</label>\n\t\t\t\t\t\t\t\t<div class="col-sm-7">\n\t\t\t\t\t\t\t\t\t<select id="input-settings-theme" class="form-control">\n\t\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class="form-group">\n\t\t\t\t\t\t\t\t<div class="col-sm-4"></div>\n\t\t\t\t\t\t\t\t<div class="col-sm-7">\n\t\t\t\t\t\t\t\t\t<div class="checkbox">\n\t\t\t\t\t\t\t\t\t <label>\n\t\t\t\t\t\t\t\t\t\t <input type="checkbox" id="input-settings-markdown-extra" />\n\t\t\t\t\t\t\t\t\t\t <b>Markdown Extra/GitHub Flavored Markdown</b> syntax\n\t\t\t\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class="form-group">\n\t\t\t\t\t\t\t\t<div class="col-sm-4"></div>\n\t\t\t\t\t\t\t\t<div class="col-sm-7">\n\t\t\t\t\t\t\t\t\t<div class="checkbox">\n\t\t\t\t\t\t\t\t\t <label>\n\t\t\t\t\t\t\t\t\t\t <input type="checkbox" id="input-settings-mathjax" />\n\t\t\t\t\t\t\t\t\t\t <b>LaTeX mathematical expressions</b> using <code>$</code> and <code>$$</code> delimiters\n\t\t\t\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class="form-group">\n\t\t\t\t\t\t\t\t<label class="col-sm-4 control-label"\n\t\t\t\t\t\t\t\t\tfor="input-settings-gdrive-multiaccount">Google Drive multi-accounts\n\t\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t\t\t<div class="col-sm-7">\n\t\t\t\t\t\t\t\t\t<select id="input-settings-gdrive-multiaccount" class="form-control">\n \t\t\t\t\t\t\t\t\t<option value="1">1 account</option>\n \t\t\t\t\t\t\t\t\t<option value="2">2 accounts</option>\n \t\t\t\t\t\t\t\t\t<option value="3">3 accounts</option>\n\t\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t\t\t<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\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="tab-pane" id="tabpane-settings-advanced">\n\t\t\t\t\t\t<div class="form-horizontal">\n\t\t\t\t\t\t\t<div class="form-group">\n\t\t\t\t\t\t\t\t<label class="col-sm-4 control-label">Edit mode</label>\n\t\t\t\t\t\t\t\t<div class="col-sm-7">\n\t\t\t\t\t\t\t\t\t<div class="radio">\n\t\t\t\t\t\t\t\t\t\t<label> <input type="radio"\n\t\t\t\t\t\t\t\t\t\t\tname="radio-settings-edit-mode" value="ltr">\n\t\t\t\t\t\t\t\t\t\t\tLeft-To-Right\n\t\t\t\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class="radio">\n\t\t\t\t\t\t\t\t\t\t<label> <input type="radio"\n\t\t\t\t\t\t\t\t\t\t\tname="radio-settings-edit-mode" value="rtl">\n\t\t\t\t\t\t\t\t\t\t\tRight-To-Left\n\t\t\t\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class="form-group">\n\t\t\t\t\t\t\t\t<label class="col-sm-4 control-label">Editor\'s font style</label>\n\t\t\t\t\t\t\t\t<div class="col-sm-7">\n\t\t\t\t\t\t\t\t\t<div class="radio">\n\t\t\t\t\t\t\t\t\t\t<label> <input type="radio"\n\t\t\t\t\t\t\t\t\t\t\tname="radio-settings-editor-font-class" value="font-rich">\n\t\t\t\t\t\t\t\t\t\t\tRich\n\t\t\t\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class="radio">\n\t\t\t\t\t\t\t\t\t\t<label> <input type="radio"\n\t\t\t\t\t\t\t\t\t\t\tname="radio-settings-editor-font-class" value="font-rich-monospaced">\n\t\t\t\t\t\t\t\t\t\t\tRich Monospaced\n\t\t\t\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class="radio">\n\t\t\t\t\t\t\t\t\t\t<label> <input type="radio"\n\t\t\t\t\t\t\t\t\t\t\tname="radio-settings-editor-font-class" value="font-monospaced">\n\t\t\t\t\t\t\t\t\t\t\tMonospaced\n\t\t\t\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class="form-group">\n\t\t\t\t\t\t\t\t<label class="col-sm-4 control-label"\n\t\t\t\t\t\t\t\t\tfor="input-settings-font-size">Font size ratio</label>\n\t\t\t\t\t\t\t\t<div class="col-sm-8 form-inline">\n\t\t\t\t\t\t\t\t\t<input type="text" id="input-settings-font-size"\n\t\t\t\t\t\t\t\t\t\tclass="form-control col-sm-2">\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class="form-group">\n\t\t\t\t\t\t\t\t<label class="col-sm-4 control-label"\n\t\t\t\t\t\t\t\t\tfor="input-settings-max-width">Max width ratio</label>\n\t\t\t\t\t\t\t\t<div class="col-sm-8 form-inline">\n\t\t\t\t\t\t\t\t\t<input type="text" id="input-settings-max-width"\n\t\t\t\t\t\t\t\t\t\tclass="form-control col-sm-2">\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class="form-group">\n\t\t\t\t\t\t\t\t<label class="col-sm-4 control-label"\n\t\t\t\t\t\t\t\t\tfor="input-settings-cursor-focus">Cursor focus ratio</label>\n\t\t\t\t\t\t\t\t<div class="col-sm-8 form-inline">\n\t\t\t\t\t\t\t\t\t<input type="text" id="input-settings-cursor-focus"\n\t\t\t\t\t\t\t\t\t\tclass="form-control col-sm-2">\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class="form-group">\n\t\t\t\t\t\t\t\t<label class="col-sm-4 control-label"\n\t\t\t\t\t\t\t\t\tfor="input-settings-lazy-rendering">Lazy rendering <a\n\t\t\t\t\t\t\t\t\thref="#" class="tooltip-lazy-rendering">(?)</a>\n\t\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t\t\t<div class="col-sm-7">\n\t\t\t\t\t\t\t\t\t<div class="checkbox">\n\t\t\t\t\t\t\t\t\t\t<input type="checkbox" id="input-settings-lazy-rendering" />\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class="form-group">\n\t\t\t\t\t\t\t\t<label class="col-sm-4 control-label"\n\t\t\t\t\t\t\t\t\tfor="textarea-settings-default-content">Default content\n\t\t\t\t\t\t\t\t\t<a href="#" class="tooltip-default-content">(?)</a>\n\t\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t\t\t<div class="col-sm-7">\n\t\t\t\t\t\t\t\t\t<textarea id="textarea-settings-default-content"\n\t\t\t\t\t\t\t\t\t\tclass="form-control"></textarea>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class="form-group">\n\t\t\t\t\t\t\t\t<label class="col-sm-4 control-label"\n\t\t\t\t\t\t\t\t\tfor="textarea-settings-publish-template">Default\n\t\t\t\t\t\t\t\t\ttemplate <a href="#" class="tooltip-template">(?)</a>\n\t\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t\t\t<div class="col-sm-7">\n\t\t\t\t\t\t\t\t\t<textarea id="textarea-settings-publish-template"\n\t\t\t\t\t\t\t\t\t\tclass="form-control"></textarea>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class="form-group">\n\t\t\t\t\t\t\t\t<label class="col-sm-4 control-label"\n\t\t\t\t\t\t\t\t\tfor="textarea-settings-pdf-template">PDF\n\t\t\t\t\t\t\t\t\ttemplate <a href="#" class="tooltip-template">(?)</a>\n\t\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t\t\t<div class="col-sm-7">\n\t\t\t\t\t\t\t\t\t<textarea id="textarea-settings-pdf-template"\n\t\t\t\t\t\t\t\t\t\tclass="form-control"></textarea>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class="form-group">\n\t\t\t\t\t\t\t\t<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\t\t\t\t\t\t\t\t<div class="col-sm-7">\n <textarea id="textarea-settings-pdf-options"\n class="form-control"></textarea>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class="form-group">\n\t\t\t\t\t\t\t\t<label class="col-sm-4 control-label"\n\t\t\t\t\t\t\t\t\tfor="input-settings-markdown-mime-type">Markdown MIME type\n\t\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t\t\t<div class="col-sm-7">\n\t\t\t\t\t\t\t\t\t<select id="input-settings-markdown-mime-type" class="form-control">\n\t\t\t\t\t\t\t\t\t\t<option value="text/plain">text/plain</option>\n\t\t\t\t\t\t\t\t\t\t<option value="text/x-markdown">text/x-markdown</option>\n\t\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class="form-group">\n\t\t\t\t\t\t\t\t<label class="col-sm-4 control-label">Permissions</label>\n\t\t\t\t\t\t\t\t<div class="col-sm-7">\n\t\t\t\t\t\t\t\t\t<div class="checkbox">\n\t\t\t\t\t\t\t\t\t <label>\n\t\t\t\t\t\t\t\t\t\t <input type="checkbox" id="input-settings-gdrive-full-access" />\n\t\t\t\t\t\t\t\t\t\t Allow StackEdit to open any document in Google Drive\n\t\t\t\t\t\t\t\t\t\t</label> <span class="help-block">Existing authorization has to be revoked in\n\t\t\t\t\t\t\t\t\t\t<a href="https://www.google.com/settings/dashboard" target="_blank">Google Dashboard</a>\n\t\t\t\t\t\t\t\t\t\tfor this change to take effect.</span>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class="form-group">\n\t\t\t\t\t\t\t\t<div class="col-sm-4"></div>\n\t\t\t\t\t\t\t\t<div class="col-sm-7">\n\t\t\t\t\t\t\t\t\t<div class="checkbox">\n\t\t\t\t\t\t\t\t\t <label>\n\t\t\t\t\t\t\t\t\t\t <input type="checkbox" id="input-settings-dropbox-full-access" />\n\t\t\t\t\t\t\t\t\t\t Allow StackEdit to open any document in Dropbox\n\t\t\t\t\t\t\t\t\t\t</label> <span class="help-block">If unchecked, access will be restricted to folder\n\t\t\t\t\t\t\t\t\t\t<b>/Applications/StackEdit</b> for existing files.</span>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class="form-group">\n\t\t\t\t\t\t\t\t<div class="col-sm-4"></div>\n\t\t\t\t\t\t\t\t<div class="col-sm-7">\n\t\t\t\t\t\t\t\t\t<div class="checkbox">\n\t\t\t\t\t\t\t\t\t <label>\n\t\t\t\t\t\t\t\t\t\t <input type="checkbox" id="input-settings-github-full-access" />\n\t\t\t\t\t\t\t\t\t\t Allow StackEdit to access private repositories in GitHub\n\t\t\t\t\t\t\t\t\t\t</label> <span class="help-block">Existing authorization has to be revoked in\n\t\t\t\t\t\t\t\t\t\t<a href="https://github.com/settings/applications" target="_blank">GitHub settings</a>\n\t\t\t\t\t\t\t\t\t\tfor this change to take effect.</span>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class="form-group">\n\t\t\t\t\t\t\t\t<label class="col-sm-4 control-label"\n\t\t\t\t\t\t\t\t\tfor="input-settings-publish-commit-msg">GitHub commit message</label>\n\t\t\t\t\t\t\t\t<div class="col-sm-7">\n\t\t\t\t\t\t\t\t\t<input type="text" id="input-settings-publish-commit-msg"\n\t\t\t\t\t\t\t\t\t\tclass="form-control">\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class="form-group">\n\t\t\t\t\t\t\t\t<label class="col-sm-4 control-label"\n\t\t\t\t\t\t\t\t\tfor="input-settings-couchdb-url">CouchDB URL</label>\n\t\t\t\t\t\t\t\t<div class="col-sm-7">\n\t\t\t\t\t\t\t\t\t<input type="text" id="input-settings-couchdb-url"\n\t\t\t\t\t\t\t\t\t\tclass="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\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="tab-pane" id="tabpane-settings-extensions">\n\t\t\t\t\t\t<div class="panel-group accordion-extensions"></div>\n\t\t\t\t\t\t<span class="help-block pull-right"><a target="_blank"\n\t\t\t\t\t\t\thref="https://github.com/benweet/stackedit/blob/master/doc/developer-guide.md#developer-guide">Create\n\t\t\t\t\t\t\t\tyour own extension...</a></span>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="tab-pane" id="tabpane-settings-utils">\n\t\t\t\t\t\t<div class="tab-pane-button-container">\n\t\t\t\t\t\t\t<a href="#" class="btn btn-block btn-default action-welcome-file"\n\t\t\t\t\t\t\t\tdata-dismiss="modal"><i class="icon-help-circled"></i>\n\t\t\t\t\t\t\t\tHello! document</a> <a href="#"\n\t\t\t\t\t\t\t\tclass="btn btn-block btn-default action-welcome-tour"\n\t\t\t\t\t\t\t\tdata-dismiss="modal"><i\n\t\t\t\t\t\t\t\tclass="icon-help-circled"></i> Welcome tour</a>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class="tab-pane-button-container">\n\t\t\t\t\t\t\t<a href="#"\n\t\t\t\t\t\t\t\tclass="btn btn-block btn-default action-import-docs-settings"><i\n\t\t\t\t\t\t\t\tclass="icon-cog-alt"></i> Import docs & settings</a> <a href="#"\n\t\t\t\t\t\t\t\tclass="btn btn-block btn-default action-export-docs-settings"\n\t\t\t\t\t\t\t\tdata-dismiss="modal"><i class="icon-cog-alt"></i>\n\t\t\t\t\t\t\t\tExport docs & settings</a> <input type="file"\n\t\t\t\t\t\t\t\tid="input-file-import-docs-settings" class="hide">\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class="tab-pane-button-container">\n\t\t\t\t\t\t\t<a href="#"\n\t\t\t\t\t\t\t\tclass="btn btn-block btn-default action-default-settings"\n\t\t\t\t\t\t\t\tdata-dismiss="modal"><i class="icon-wrench"></i>\n\t\t\t\t\t\t\t\tLoad default settings</a> <a href="#" class="btn btn-block btn-default"\n\t\t\t\t\t\t\t\tdata-dismiss="modal" data-toggle="modal"\n\t\t\t\t\t\t\t\tdata-target=".modal-app-reset"><i\n\t\t\t\t\t\t\t\tclass="icon-fire"></i> Reset application</a> <a target="_blank" href="recovery.html" class="btn btn-block btn-default"><i\n\t\t\t\t\t\t\t\tclass="icon-medkit"></i> StackEdit recovery</a>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\n\t\t\t</div>\n\t\t\t<div class="modal-footer">\n\t\t\t\t<a href="#" class="btn btn-default" data-dismiss="modal">Cancel</a>\n\t\t\t\t<a href="#" class="btn btn-primary action-apply-settings"\n\t\t\t\t\tdata-dismiss="modal">OK</a>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>\n\n\n<div class="modal fade modal-non-unique">\n\t<div class="modal-dialog">\n\t\t<div class="modal-content">\n\n\t\t\t<div class="modal-header">\n\t\t\t\t<h2 class="modal-title">Ooops...</h2>\n\t\t\t</div>\n\t\t\t<div class="modal-body">\n\t\t\t\t<p>StackEdit has stopped because another instance was running in\n\t\t\t\t\tthe same browser.</p>\n\t\t\t\t<blockquote>\n <p>If you want to reopen StackEdit, click on\n\t\t\t\t\t"Reload".</p>\n </blockquote>\n\t\t\t</div>\n\t\t\t<div class="modal-footer">\n\t\t\t\t<a href="javascript:window.location.reload();"\n\t\t\t\t\tclass="btn btn-primary">Reload</a>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>\n\n\n<div class="modal fade modal-redirect-confirm">\n\t<div class="modal-dialog">\n\t\t<div class="modal-content">\n\n\t\t\t<div class="modal-header">\n\t\t\t\t<h2 class="modal-title">Redirection</h2>\n\t\t\t</div>\n\t\t\t<div class="modal-body">\n\t\t\t <p class="redirect-msg"></p>\n\t\t\t\t<blockquote>\n <p>Please click <b>OK</b> to proceed.</p>\n </blockquote>\n\t\t\t</div>\n\t\t\t<div class="modal-footer">\n\t\t\t\t<a class="btn btn-default" data-dismiss="modal">Cancel</a>\n\t\t\t\t<a class="btn btn-primary action-redirect-confirm" data-dismiss="modal">OK</a>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>\n\n\n<div class="modal fade modal-app-reset">\n\t<div class="modal-dialog">\n\t\t<div class="modal-content">\n\n\t\t\t<div class="modal-header">\n\t\t\t\t<h2 class="modal-title">Reset application</h2>\n\t\t\t</div>\n\t\t\t<div class="modal-body">\n\t\t\t\t<p>This will delete all your local documents.</p>\n\t\t\t\t<blockquote><b>Are you sure?</b></blockquote>\n\t\t\t</div>\n\t\t\t<div class="modal-footer">\n\t\t\t\t<a href="#" class="btn btn-default" data-dismiss="modal">Cancel</a>\n\t\t\t\t<a href="#" class="btn btn-primary action-app-reset"\n\t\t\t\t\tdata-dismiss="modal">OK</a>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>\n\n\n<div class="modal fade modal-import-docs-settings">\n\t<div class="modal-dialog">\n\t\t<div class="modal-content">\n\n\t\t\t<div class="modal-header">\n\t\t\t\t<h2 class="modal-title">Import documents and settings</h2>\n\t\t\t</div>\n\t\t\t<div class="modal-body">\n\t\t\t\t<p>This will delete all existing local documents.</p>\n\t\t\t\t<blockquote><b>Are you sure?</b></blockquote>\n\t\t\t</div>\n\t\t\t<div class="modal-footer">\n\t\t\t\t<a href="#" class="btn btn-default" data-dismiss="modal">Cancel</a>\n\t\t\t\t<a href="#" class="btn btn-primary action-import-docs-settings-confirm"\n\t\t\t\t\tdata-dismiss="modal">OK</a>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>\n\n\n<div class="modal fade modal-add-google-drive-account">\n\t<div class="modal-dialog">\n\t\t<div class="modal-content">\n\n\t\t\t<div class="modal-header">\n\t\t\t\t<h2 class="modal-title">Add Google Drive account</h2>\n\t\t\t</div>\n\t\t\t<div class="modal-body">\n\t\t\t\t<p>To perform this request, you need to configure another Google Drive account in StackEdit.</p>\n\t\t\t\t<blockquote><b>Do you want to proceed?</b></blockquote>\n\t\t\t</div>\n\t\t\t<div class="modal-footer">\n\t\t\t\t<a href="#" class="btn btn-default action-remove-google-drive-state"\n\t\t\t\t\tdata-dismiss="modal">No</a>\n\t\t\t\t<a href="#" class="btn btn-primary action-add-google-drive-account"\n\t\t\t\t\tdata-dismiss="modal">Yes</a>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>\n\n\n<div class="modal fade modal-sponsor-only">\n\t<div class="modal-dialog">\n\t\t<div class="modal-content">\n\n\t\t\t<div class="modal-header">\n\t\t\t\t<h2 class="modal-title">Sponsor only!</h2>\n\t\t\t</div>\n\t\t\t<div class="modal-body">\n\t\t\t\t<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\t\t\t\t<p>To see how a PDF looks <a target="_blank" href="/Welcome%20document.pdf">click here</a>.</p>\n\t\t\t\t<blockquote>\n <p><b>Tip:</b> PDFs are fully customizable via Settings>Advanced>PDF template/options.</p>\n </blockquote>\n\t\t\t</div>\n\t\t\t<div class="modal-footer">\n\t\t\t\t<a href="#" class="btn btn-primary"\n\t\t\t\t\tdata-dismiss="modal">Close</a>\n\t\t\t</div>\n\t\t</div>\n\t</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\t<div class="layout-wrapper-l2">\n\t\t<div class="navbar navbar-default">\n\t\t\t<div class="navbar-inner">\n\t\t\t\t<div class="nav left-space"></div>\n\t\t\t\t<div class="nav right-space pull-right"></div>\n\t\t\t\t<div class="buttons-dropdown dropdown">\n\t\t\t\t\t<div class="nav">\n\t\t\t\t\t\t<button class="btn btn-success" data-toggle="dropdown"\n\t\t\t\t\t\t\ttitle="Show buttons">\n\t\t\t\t\t\t\t<i class="icon-th-large"></i>\n\t\t\t\t\t\t</button>\n\t\t\t\t\t\t<div class="dropdown-menu">\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<ul class="nav pull-right">\n\t\t\t\t\t<li class="btn-group">\n\t\t\t\t\t\t<button class="btn btn-success action-edit-document hide"\n\t\t\t\t\t\t\ttitle="Edit this document">\n\t\t\t\t\t\t\t<i class="icon-pencil"></i>\n\t\t\t\t\t\t</button>\n\t\t\t\t\t</li>\n\t\t\t\t\t<li class="btn-group">\n\t\t\t\t\t\t<button class="btn btn-success dropdown-toggle"\n\t\t\t\t\t\t\tdata-toggle="dropdown" title="Save this document">\n\t\t\t\t\t\t\t<i class="icon-download"></i>\n\t\t\t\t\t\t</button>\n\t\t\t\t\t\t<ul class="dropdown-menu">\n\t\t\t\t\t\t\t<li><a class="action-download-md" href="#"><i\n\t\t\t\t\t\t\t\tclass="icon-download"></i> Export as Markdown</a></li>\n\t\t\t\t\t\t\t<li><a class="action-download-html" href="#"><i\n\t\t\t\t\t\t\t\tclass="icon-download"></i> Export as HTML</a></li>\n\t\t\t\t\t\t\t<li><a class="action-download-template" href="#"><i\n\t\t\t\t\t\t\t\tclass="icon-download"></i> Export using template</a></li>\n\t\t\t\t\t\t</ul>\n\t\t\t\t\t</li>\n\t\t\t\t</ul>\n\t\t\t\t<ul class="nav pull-right title-container">\n\t\t\t\t\t<li><div class="working-indicator"></div></li>\n\t\t\t\t\t<li><span class="btn btn-success file-title-navbar"></span></li>\n\t\t\t\t</ul>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class="layout-wrapper-l3">\n\t\t\t<pre id="wmd-input" class="form-control"><div class="editor-content"></div><div class="editor-margin"></div></pre>\n\t\t\t<div class="preview-panel">\n\t\t\t\t<div class="preview-container">\n\t\t\t\t\t<div id="preview-contents">\n\t\t\t\t\t\t<div id="wmd-preview" class="preview-content"></div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class="extension-preview-buttons">\n\t\t\t<div class="btn-group drag-me" title="Drag me!">\n\t\t\t\t<i class="icon-ellipsis-vert"></i>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n\t<div id="wmd-button-bar" class="hide"></div>\n\n\t<div class="menu-panel">\n\t\t<button class="btn toggle-button action-open-stackedit"\n\t\t\ttitle="Open StackEdit">\n\t\t\t<img\n\t\t\t\tdata-stackedit-src="menu-icon.png" width="24" height="24" />\n\t\t</button>\n\t</div>\n\n\n\t<div class="document-panel">\n\t\t<button class="btn toggle-button" title="Select document Ctrl+[ Ctrl+]">\n\t\t\t<i class="icon-folder-open"></i>\n\t\t</button>\n\t\t<div class="search-bar clearfix">\n\t\t\t<div class="input-group">\n\t\t\t\t<span class="input-group-addon"><i class="icon-search"></i></span><input\n\t\t\t\t\ttype="text" class="form-control" placeholder="Find document"></input>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class="panel-content">\n\t\t\t<div class="list-group document-list"></div>\n\t\t\t<div class="list-group document-list-filtered hide"></div>\n\t\t</div>\n\t</div>\n</div>\n<div id="wmd-button-bar" class="hide"></div>\n\n<div class="modal modal-non-unique">\n\t<div class="modal-dialog">\n\t\t<div class="modal-content">\n\n\t\t\t<div class="modal-header">\n\t\t\t\t<h3 class="modal-title">Ooops...</h3>\n\t\t\t</div>\n\t\t\t<div class="modal-body">\n\t\t\t\t<p>StackEdit has stopped because another instance was running in\n\t\t\t\t\tthe same browser.</p>\n\t\t\t\t<blockquote>\n <p>If you want to reopen StackEdit, click on\n\t\t\t\t\t"Reload".</p>\n </blockquote>\n\t\t\t</div>\n\t\t\t<div class="modal-footer">\n\t\t\t\t<a href="javascript:window.location.reload();"\n\t\t\t\t\tclass="btn btn-primary">Reload</a>\n\t\t\t</div>\n\t\t</div>\n\t</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\tinfo</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 t() {}
function e(t) {
this.buttonBar = d.getElementById("wmd-button-bar" + t), this.preview = d.getElementById("wmd-preview" + t),
this.input = d.getElementById("wmd-input" + t);
}
function n(t, e) {
var n, r, o, a = this, s = [], c = 0, u = "none", d = function(t, e) {
u != t && (u = t, e || h()), m.isIE && "moving" == u ? o = null : r = setTimeout(p, 1);
}, p = function(t) {
o = new i(e, t), 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(e), s[--c].restore(),
t && t())), u = "none", e.input.focus(), p();
}, this.redo = function() {
a.canRedo() && (s[++c].restore(), t && t()), u = "none", e.input.focus(), p();
};
var h = function() {
var r = o || new i(e);
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 (t && t())));
}, f = function(t) {
if (!t.ctrlKey && !t.metaKey) {
var e = t.keyCode;
e >= 33 && e <= 40 || e >= 63232 && e <= 63235 ? d("moving") : 8 == e || 46 == e || 127 == e ? d("deleting") : 13 == e ? d("newlines") : 27 == e ? d("escape") : (e < 16 || e > 20) && 91 != e && d("typing");
}
}, g = function() {
l.addEvent(e.input, "keypress", function(t) {
!t.ctrlKey && !t.metaKey || t.altKey || 89 != t.keyCode && 90 != t.keyCode || t.preventDefault();
});
var t = function() {
(m.isIE || o && o.text != e.input.value) && void 0 == r && (u = "paste", h(), p());
};
l.addEvent(e.input, "keydown", f), l.addEvent(e.input, "mousedown", function() {
d("moving");
}), e.input.onpaste = t, e.input.ondrop = t;
};
this.reinit = function(t, e, i, a) {
s = [], c = 0, u = "none", n = void 0, r = void 0, p(), o.text = t, o.start = e,
o.end = i, o.scrollTop = a, o.setInputAreaSelection(), h();
}, this.setMode = d, function() {
g(), p(!0);
}();
}
function i(e, n) {
var i = this, r = e.input;
this.init = function() {
l.isVisible(r) && (this.setInputAreaSelectionStartEnd(), this.scrollTop = r.scrollTop,
(!this.text && r.selectionStart || 0 === r.selectionStart) && (this.text = r.value));
}, this.setInputAreaSelection = function() {
l.isVisible(r) && (r.focus(), r.selectionStart = i.start, r.selectionEnd = i.end);
}, this.setInputAreaSelectionStartEnd = function() {
i.start = r.selectionStart, i.end = r.selectionEnd;
}, this.restore = function() {
void 0 != i.text && i.text != r.value && (r.value = i.text), this.setInputAreaSelection();
}, this.getChunks = function() {
var e = new t();
return e.before = l.fixEolChars(i.text.substring(0, i.start)), e.startTag = "",
e.selection = l.fixEolChars(i.text.substring(i.start, i.end)), e.endTag = "", e.after = l.fixEolChars(i.text.substring(i.end)),
e.scrollTop = i.scrollTop, e;
}, this.setChunks = function(t) {
t.before = t.before + t.startTag, t.after = t.endTag + t.after, this.start = t.before.length,
this.end = t.before.length + t.selection.length, this.text = t.before + t.selection + t.after,
this.scrollTop = t.scrollTop;
}, this.init();
}
function r(t, e, n) {
var i, r, o, a = function(t, e) {
l.addEvent(t, "input", e), t.onpaste = e, t.ondrop = e, l.addEvent(t, "keypress", e),
l.addEvent(t, "keydown", e);
}, s = function() {
if (e.preview) {
var n = e.input.value;
if (!n || n != o) {
o = n;
var i = new Date().getTime();
n = t.makeHtml(n);
var a = new Date().getTime();
r = a - i, f(n);
}
}
}, c = function() {
i && (clearTimeout(i), i = void 0);
};
this.refresh = function(t) {
t ? (o = "", s()) : c();
}, this.processingTime = function() {
return r;
};
var u, d = function(t) {
var n = e.preview, i = n.parentNode, r = n.nextSibling;
i.removeChild(n), n.innerHTML = t, r ? i.insertBefore(n, r) : i.appendChild(n);
}, p = function(t) {
e.preview.innerHTML = t;
}, h = function(t) {
if (u) return u(t);
try {
p(t), u = p;
} catch (e) {
(u = d)(t);
}
}, f = function(t) {
e.preview && (h(t), n());
};
!function() {
a(e.input, c), e.preview && (e.preview.scrollTop = 0);
}();
}
function o(t, e, n, r, o, a, s) {
function l(t) {
p.focus();
var o = "wmd-link-button" == t.id || "wmd-image-button" == t.id;
if (t.textOp) {
n && !o && n.setCommandMode();
var a = new i(e);
if (!a) return;
var s = a.getChunks(), l = function() {
p.focus(), s && a.setChunks(s), a.restore(), r.refresh();
};
t.textOp(s, l) || (l(), o || p.adjustCursorPosition());
}
t.execute && t.execute(n);
}
function c(t, n) {
var i = t.getElementsByTagName("span")[0];
t.className = t.className.replace(/ disabled/g, ""), n ? (i.style.backgroundPosition = t.XShift + " 0px",
t.onmouseover = function() {
i.style.backgroundPosition = this.XShift + " -40px";
}, t.onmouseout = function() {
i.style.backgroundPosition = this.XShift + " 0px";
}, m.isIE && (t.onmousedown = function() {
e.ieCachedRange = document.selection.createRange(), e.ieCachedScrollTop = e.input.scrollTop;
}), t.isHelp || (t.onclick = function() {
return this.onmouseout && this.onmouseout(), l(this), !1;
})) : (i.style.backgroundPosition = t.XShift + " -20px", t.onmouseover = t.onmouseout = t.onclick = function() {},
t.className += " disabled");
}
function u(t) {
return "string" == typeof t && (t = o[t]), function() {
t.apply(o, arguments);
};
}
function d() {
n && (c(h.undo, n.canUndo()), c(h.redo, n.canRedo()));
}
var p = e.input, h = {};
!function() {
var n = e.buttonBar, i = document.createElement("ul");
i.id = "wmd-button-row" + t, i.className = "wmd-button-row", i = n.appendChild(i);
var r = 0, o = function(e, 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 = e + t, s.appendChild(l), s.title = n, s.XShift = o, a && (s.textOp = a),
c(s, !0), i.appendChild(s), s;
}, l = function(e) {
var n = document.createElement("li");
n.className = "wmd-spacer wmd-spacer" + e, n.id = "wmd-spacer" + e + t, 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(t, e) {
return this.doLinkOrImage(t, e, !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(t, e) {
return this.doLinkOrImage(t, e, !0);
})), l(2), h.olist = o("wmd-olist-button", s("olist"), "-120px", u(function(t, e) {
this.doList(t, e, !0);
})), h.ulist = o("wmd-ulist-button", s("ulist"), "-140px", u(function(t, e) {
this.doList(t, e, !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(t) {
t && t.undo();
}, h.redo = o("wmd-redo-button", s("redo"), "-220px", null), h.redo.execute = function(t) {
t && t.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" + t,
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(t, e) {
this.hooks = t, this.getString = e;
}
function s(t) {
return t.replace(/^\s*(.*?)(?:\s+"(.+)")?\s*$/, function(t, e, n) {
return e = e.replace(/\?.*$/, function(t) {
return t.replace(/\+/g, " ");
}), e = decodeURIComponent(e), e = encodeURI(e).replace(/'/g, "%27").replace(/\(/g, "%28").replace(/\)/g, "%29"),
e = e.replace(/\?.*$/, function(t) {
return t.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 ? e + ' "' + n + '"' : e;
});
}
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(t, 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(t) {
return s.strings[t] || g[t];
};
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 t;
};
var u, p, h = this;
this.run = function() {
if (!u) {
u = new e(i);
var f, m = new a(c, l), g = new r(t, 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(t) {
p.setCommandMode(), t(), 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;
}
};
}, t.prototype.findTags = function(t, e) {
var n, i = this;
t && (n = l.extendRegExp(t, "", "$"), this.before = this.before.replace(n, function(t) {
return i.startTag = i.startTag + t, "";
}), n = l.extendRegExp(t, "^", ""), this.selection = this.selection.replace(n, function(t) {
return i.startTag = i.startTag + t, "";
})), e && (n = l.extendRegExp(e, "", "$"), this.selection = this.selection.replace(n, function(t) {
return i.endTag = t + i.endTag, "";
}), n = l.extendRegExp(e, "^", ""), this.after = this.after.replace(n, function(t) {
return i.endTag = t + i.endTag, "";
}));
}, t.prototype.trimWhitespace = function(t) {
var e, n, i = this;
t ? e = n = "" : (e = function(t) {
return i.before += t, "";
}, n = function(t) {
return i.after = t + i.after, "";
}), this.selection = this.selection.replace(/^(\s*)/, e).replace(/(\s*)$/, n);
}, t.prototype.skipLines = function(t, e, n) {
void 0 === t && (t = 1), void 0 === e && (e = 1), t++, e++;
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 = ""; t--; ) i += "\\n?", r += "\n";
n && (i = "\\n*"), this.before = this.before.replace(new p(i + "$", ""), r);
}
if (this.after) {
for (i = r = ""; e--; ) i += "\\n?", r += "\n";
n && (i = "\\n*"), this.after = this.after.replace(new p(i, ""), r);
}
}, l.isVisible = function(t) {
return window.getComputedStyle ? "none" !== window.getComputedStyle(t, null).getPropertyValue("display") : t.currentStyle ? "none" !== t.currentStyle.display : void 0;
}, l.addEvent = function(t, e, n) {
t.attachEvent ? t.attachEvent("on" + e, n) : t.addEventListener(e, n, !1);
}, l.removeEvent = function(t, e, n) {
t.detachEvent ? t.detachEvent("on" + e, n) : t.removeEventListener(e, n, !1);
}, l.fixEolChars = function(t) {
return t = t.replace(/\r\n/g, "\n"), t = t.replace(/\r/g, "\n");
}, l.extendRegExp = function(t, e, n) {
null !== e && void 0 !== e || (e = ""), null !== n && void 0 !== n || (n = "");
var i, r = t.toString();
return r = r.replace(/\/([gim]*)$/, function(t, e) {
return i = e, "";
}), r = r.replace(/(^\/|\/$)/g, ""), r = e + r + n, new p(r, i);
}, c.getTop = function(t, e) {
var n = t.offsetTop;
if (!e) for (;t = t.offsetParent; ) n += t.offsetTop;
return n;
}, c.getHeight = function(t) {
return t.offsetHeight || t.scrollHeight;
}, c.getWidth = function(t) {
return t.offsetWidth || t.scrollWidth;
}, c.getPageSize = function() {
var t, e, n, i;
return self.innerHeight && self.scrollMaxY ? (t = d.body.scrollWidth, e = self.innerHeight + self.scrollMaxY) : d.body.scrollHeight > d.body.offsetHeight ? (t = d.body.scrollWidth,
e = d.body.scrollHeight) : (t = d.body.offsetWidth, e = 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(t, n), Math.max(e, i), n, i ];
}, u.createBackground = function() {
var t = d.createElement("div"), e = t.style;
t.className = "wmd-prompt-background", e.position = "absolute", e.top = "0", e.zIndex = "1000",
m.isIE ? e.filter = "alpha(opacity=50)" : e.opacity = "0.5";
var n = c.getPageSize();
return e.height = n[1] + "px", m.isIE ? (e.left = d.documentElement.scrollLeft,
e.width = d.documentElement.clientWidth) : (e.left = "0", e.width = "100%"), d.body.appendChild(t),
t;
}, u.prompt = function(t, e, n) {
var i, r;
void 0 === e && (e = "");
var o = function(t) {
27 === (t.charCode || t.keyCode) && a(!0);
}, a = function(t) {
l.removeEvent(d.body, "keydown", o);
var e = r.value;
return t ? e = null : (e = e.replace(/^http:\/\/(https?|ftp):\/\//, "$1://"), /^(?:https?|ftp):\/\//.test(e) || (e = "http://" + e)),
i.parentNode.removeChild(i), n(e), !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 = t, 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 = e, 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 t = e.length;
if (void 0 !== r.selectionStart) r.selectionStart = 0, r.selectionEnd = t; else if (r.createTextRange) {
var n = r.createTextRange();
n.collapse(!1), n.moveStart("character", -t), n.moveEnd("character", t), n.select();
}
r.focus();
}, 0);
};
var v = a.prototype;
v.prefixes = "(?:\\s{4,}|\\s*>|\\s*-\\s+|\\s*\\d+\\.|=|\\+|-|_|\\*|#|\\s*\\[[^\n]]+\\]:)",
v.unwrap = function(t) {
var e = new p("([^\\n])\\n(?!(\\n|" + this.prefixes + "))", "g");
t.selection = t.selection.replace(e, "$1 $2");
}, v.wrap = function(t, e) {
this.unwrap(t);
var n = new p("(.{1," + e + "})( +|$\\n?)", "gm"), i = this;
t.selection = t.selection.replace(n, function(t, e) {
return new p("^" + i.prefixes, "").test(t) ? t : e + "\n";
}), t.selection = t.selection.replace(/\s+$/, "");
}, v.doBold = function(t, e) {
return this.doBorI(t, e, 2, this.getString("boldexample"));
}, v.doItalic = function(t, e) {
return this.doBorI(t, e, 1, this.getString("italicexample"));
}, v.doBorI = function(t, e, n, i) {
t.trimWhitespace(), t.selection = t.selection.replace(/\n{2,}/g, "\n");
var r = /(\**$)/.exec(t.before)[0], o = /(^\**)/.exec(t.after)[0], a = Math.min(r.length, o.length);
if (a >= n && (2 != a || 1 != n)) t.before = t.before.replace(p("[*]{" + n + "}$", ""), ""),
t.after = t.after.replace(p("^[*]{" + n + "}", ""), ""); else if (!t.selection && o) {
t.after = t.after.replace(/^([*_]*)/, ""), t.before = t.before.replace(/(\s?)$/, "");
var s = p.$1;
t.before = t.before + o + s;
} else {
t.selection || o || (t.selection = i);
var l = n <= 1 ? "*" : "**";
t.before = t.before + l, t.after = l + t.after;
}
}, v.stripLinkDefs = function(t, e) {
return t = t.replace(/^[ ]{0,3}\[(\d+)\]:[ \t]*\n?[ \t]*<?(\S+?)>?[ \t]*\n?[ \t]*(?:(\n*)["(](.+?)[")][ \t]*)?(?:\n+|$)/gm, function(t, n, i, r, o) {
return e[n] = t.replace(/\s*$/, ""), r ? (e[n] = t.replace(/["(](.+?)[")]$/, ""),
r + o) : "";
});
}, v.addLinkDef = function(t, e) {
var n = 0, i = {};
t.before = this.stripLinkDefs(t.before, i), t.selection = this.stripLinkDefs(t.selection, i),
t.after = this.stripLinkDefs(t.after, i);
var r = "", o = /(\[)((?:\[[^\]]*\]|[^\[\]])*)(\][ ]?(?:\n[ ]*)?\[)(\d+)(\])/g, a = function(t) {
n++, t = t.replace(/^[ ]{0,3}\[(\d+)\]:/, " [" + n + "]:"), r += "\n" + t;
}, s = function(t, e, r, l, c, u) {
return r = r.replace(o, s), i[c] ? (a(i[c]), e + r + l + n + u) : t;
};
t.before = t.before.replace(o, s), e ? a(e) : t.selection = t.selection.replace(o, s);
var l = n;
return t.after = t.after.replace(o, s), t.after && (t.after = t.after.replace(/\n*$/, "")),
t.after || (t.selection = t.selection.replace(/\n*$/, "")), t.after += "\n\n" + r,
l;
}, v.doLinkOrImage = function(t, e, n) {
t.trimWhitespace(), t.findTags(/\s*!?\[/, /\][ ]?(?:\n[ ]*)?(\(.*?\))?/);
var i;
if (!(t.endTag.length > 1 && t.startTag.length > 0)) {
if (t.selection = t.startTag + t.selection + t.endTag, t.startTag = t.endTag = "",
/\n\n/.test(t.selection)) return void this.addLinkDef(t, null);
var r = this, o = function(o) {
i.parentNode.removeChild(i), null !== o && (t.selection = (" " + t.selection).replace(/([^\\](?:\\\\)*)(?=[[\]])/g, "$1\\").substr(1),
t.startTag = n ? "![" : "[", t.endTag = "](" + s(o) + ")", t.selection || (t.selection = n ? r.getString("imagedescription") : r.getString("linkdescription"))),
e();
};
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;
}
t.startTag = t.startTag.replace(/!?\[/, ""), t.endTag = "", this.addLinkDef(t, null);
}, v.doAutoindent = function(t, e) {
var n = this, i = !1;
t.before = t.before.replace(/(\n|^)[ ]{0,3}([*+-]|\d+[.])[ \t]*\n$/, "\n\n"), t.before = t.before.replace(/(\n|^)[ ]{0,3}>[ \t]*\n$/, "\n\n"),
t.before = t.before.replace(/(\n|^)[ \t]+\n$/, "\n\n"), t.selection || /^[ \t]*(?:\n|$)/.test(t.after) || (t.after = t.after.replace(/^[^\n]*/, function(e) {
return t.selection = e, "";
}), i = !0), /(\n|^)[ ]{0,3}([*+-]|\d+[.])[ \t]+.*\n$/.test(t.before) && n.doList && n.doList(t),
/(\n|^)[ ]{0,3}>[ \t]+.*\n$/.test(t.before) && n.doBlockquote && n.doBlockquote(t),
/(\n|^)(\t|[ ]{4,}).*\n$/.test(t.before) && n.doCode && n.doCode(t), i && (t.after = t.selection + t.after,
t.selection = "");
}, v.doBlockquote = function(t, e) {
t.selection = t.selection.replace(/^(\n*)([^\r]+?)(\n*)$/, function(e, n, i, r) {
return t.before += n, t.after = r + t.after, i;
}), t.before = t.before.replace(/(>[ \t]*)$/, function(e, n) {
return t.selection = n + t.selection, "";
}), t.selection = t.selection.replace(/^(\s|>)+$/, ""), t.selection = t.selection || this.getString("quoteexample");
var n, i = "", r = "";
if (t.before) {
for (var o = t.before.replace(/\n$/, "").split("\n"), a = !1, s = 0; s < o.length; s++) {
var l = !1;
n = o[s], a = a && n.length > 0, /^>/.test(n) ? (l = !0, !a && n.length > 1 && (a = !0)) : l = !!/^[ \t]*$/.test(n) || a,
l ? i += n + "\n" : (r += i + n, i = "\n");
}
/(^|\n)>/.test(i) || (r += i, i = "");
}
t.startTag = i, t.before = r, t.after && (t.after = t.after.replace(/^\n?/, "\n")),
t.after = t.after.replace(/^(((\n|^)(\n[ \t]*)*>(.+\n)*.*)+(\n[ \t]*)*)/, function(e) {
return t.endTag = e, "";
});
var c = function(e) {
var n = e ? "> " : "";
t.startTag && (t.startTag = t.startTag.replace(/\n((>|\s)*)\n$/, function(t, e) {
return "\n" + e.replace(/^[ ]{0,3}>?[ \t]*$/gm, n) + "\n";
})), t.endTag && (t.endTag = t.endTag.replace(/^\n((>|\s)*)\n/, function(t, e) {
return "\n" + e.replace(/^[ ]{0,3}>?[ \t]*$/gm, n) + "\n";
}));
};
/^(?![ ]{0,3}>)/m.test(t.selection) ? (this.wrap(t, f.lineLength - 2), t.selection = t.selection.replace(/^/gm, "> "),
c(!0), t.skipLines()) : (t.selection = t.selection.replace(/^[ ]{0,3}> ?/gm, ""),
this.unwrap(t), c(!1), !/^(\n|^)[ ]{0,3}>/.test(t.selection) && t.startTag && (t.startTag = t.startTag.replace(/\n{0,2}$/, "\n\n")),
!/(\n|^)[ ]{0,3}>.*$/.test(t.selection) && t.endTag && (t.endTag = t.endTag.replace(/^\n{0,2}/, "\n\n"))),
t.selection = this.hooks.postBlockquoteCreation(t.selection), /\n/.test(t.selection) || (t.selection = t.selection.replace(/^(> *)/, function(e, n) {
return t.startTag += n, "";
}));
}, v.doCode = function(t, e) {
var n = /\S[ ]*$/.test(t.before);
if (!/^[ ]*\S/.test(t.after) && !n || /\n/.test(t.selection)) {
t.before = t.before.replace(/[ ]{4}$/, function(e) {
return t.selection = e + t.selection, "";
});
var i = 1, r = 1;
/(\n|^)(\t|[ ]{4,}).*\n$/.test(t.before) && (i = 0), /^\n(\t|[ ]{4,})/.test(t.after) && (r = 0),
t.skipLines(i, r), t.selection ? /^[ ]{0,3}\S/m.test(t.selection) ? /\n/.test(t.selection) ? t.selection = t.selection.replace(/^/gm, " ") : t.before += " " : t.selection = t.selection.replace(/^(?:[ ]{4}|[ ]{0,3}\t)/gm, "") : (t.startTag = " ",
t.selection = this.getString("codeexample"));
} else t.trimWhitespace(), t.findTags(/`/, /`/), t.startTag || t.endTag ? t.endTag && !t.startTag ? (t.before += t.endTag,
t.endTag = "") : t.startTag = t.endTag = "" : (t.startTag = t.endTag = "`", t.selection || (t.selection = this.getString("codeexample")));
}, v.doList = function(t, e, 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 t;
return n ? (t = " " + a + ". ", a++) : t = " " + o + " ", t;
}, l = function(t) {
return void 0 === n && (n = /^\s*\d/.test(t)), t = t.replace(/^[ ]{0,3}([*+-]|\d+[.])\s/gm, function(t) {
return s();
});
};
if (t.findTags(/(\n|^)*[ ]{0,3}([*+-]|\d+[.])\s+/, null), !t.before || /\n$/.test(t.before) || /^\n/.test(t.startTag) || (t.before += t.startTag,
t.startTag = ""), t.startTag) {
var c = /\d+[.]/.test(t.startTag);
if (t.startTag = "", t.selection = t.selection.replace(/\n[ ]{4}/g, "\n"), this.unwrap(t),
t.skipLines(), c && (t.after = t.after.replace(r, l)), n == c) return;
}
var u = 1;
t.before = t.before.replace(i, function(t) {
return /^\s*([*+-])/.test(t) && (o = p.$1), u = /[^\n]\n\n[^\n]/.test(t) ? 1 : 0,
l(t);
}), t.selection || (t.selection = this.getString("litem"));
var d = s(), h = 1;
t.after = t.after.replace(r, function(t) {
return h = /[^\n]\n\n[^\n]/.test(t) ? 1 : 0, l(t);
}), t.trimWhitespace(!0), t.skipLines(u, h, !0), t.startTag = d;
var m = d.replace(/./g, " ");
this.wrap(t, f.lineLength - m.length), t.selection = t.selection.replace(/\n/g, "\n" + m);
}, v.doHeading = function(t, e) {
if (t.selection = t.selection.replace(/\s+/g, " "), t.selection = t.selection.replace(/(^\s+|\s+$)/g, ""),
!t.selection) return t.startTag = "## ", t.selection = this.getString("headingexample"),
void (t.endTag = " ##");
var n = 0;
t.findTags(/#+[ ]*/, /[ ]*#+/), /#+/.test(t.startTag) && (n = p.lastMatch.length),
t.startTag = t.endTag = "", t.findTags(null, /\s?(-+|=+)/), /=+/.test(t.endTag) && (n = 1),
/-+/.test(t.endTag) && (n = 2), t.startTag = t.endTag = "", t.skipLines(1, 1);
var i = 0 == n ? 2 : n - 1;
if (i > 0) {
var r = i >= 2 ? "-" : "=", o = t.selection.length;
for (o > f.lineLength && (o = f.lineLength), t.endTag = "\n"; o--; ) t.endTag += r;
}
}, v.doHorizontalRule = function(t, e) {
t.startTag = "----------\n", t.selection = "", t.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(t, e, n, i, r, o, a, s, l, c, u, d, p, h, f) {
function m() {
I = !0, D = !0;
var t = a.currentTime;
t > M + 1e3 && (M = t, 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), t(".modal").modal("hide"), t(".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,
t.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(e) {
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", e, .1, 10),
n.maxWidthRatio = a.getInputFloatValue("#input-settings-max-width", e, .1, 10),
n.cursorFocusRatio = a.getInputFloatValue("#input-settings-cursor-focus", e, 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", e), 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", e),
n.pdfTemplate = a.getInputTextValue("#textarea-settings-pdf-template", e), n.pdfOptions = a.getInputJSONValue("#textarea-settings-pdf-options", e),
n.couchdbUrl = a.getInputValue("#input-settings-couchdb-url", e), n.extensionSettings = {},
c.onSaveSettings(n.extensionSettings, e), e.isPropagationStopped() || (l.dropboxFullAccess !== n.dropboxFullAccess && s.removeItem("dropbox.lastChangeId"),
t.extend(l, n), s.settings = JSON.stringify(l), s.themeV4 = i);
}
function S(t) {
var e = t && t.app == F && (t.chargeOption && "once" == t.chargeOption.alias || t.subscriptionOption && "yearly" == t.subscriptionOption.alias);
return c.isSponsor = e, e;
}
function C() {
j.remove(), j = t();
}
function _() {
B.getPayments({
pricingOptions: [ "once", "yearly" ]
}, function(t, e) {
S(e) && (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(e) {
if (void 0 !== O && c.onFileClosed(O), O = e, void 0 !== P) return i.undoMgr.init(),
P.uiManager.setUndoRedoButtonStates();
var n = new Markdown.Converter(), r = {
_DoItalicsAndBold: function(t) {
return t = t.replace(/(\*\*|__)(?=\S)(.+?[*_]*)(?=\S)\1/g, "<strong>$2</strong>"),
t = t.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(e) {
return T.insertLinkCallback = e, a.resetModalInputs(), t(".modal-insert-link").modal(),
!0;
}), P.hooks.set("insertImageDialog", function(e) {
return T.insertLinkCallback = e, !!T.catchModal || (a.resetModalInputs(), t(".modal-insert-image").modal(),
!0);
}), c.onPagedownConfigure(P), P.hooks.chain("onPreviewRefresh", c.onAsyncPreview),
P.run(), i.undoMgr.init(), t(".wmd-button-row li").addClass("btn btn-success").css("left", 0).find("span").hide();
var o = t(".wmd-button-group1");
t("#wmd-bold-button").append(t('<i class="icon-bold">')).appendTo(o), t("#wmd-italic-button").append(t('<i class="icon-italic">')).appendTo(o),
o = t(".wmd-button-group2"), t("#wmd-link-button").append(t('<i class="icon-globe">')).appendTo(o),
t("#wmd-quote-button").append(t('<i class="icon-indent-right">')).appendTo(o), t("#wmd-code-button").append(t('<i class="icon-code">')).appendTo(o),
t("#wmd-image-button").append(t('<i class="icon-picture">')).appendTo(o), o = t(".wmd-button-group3"),
t("#wmd-olist-button").append(t('<i class="icon-list-numbered">')).appendTo(o),
t("#wmd-ulist-button").append(t('<i class="icon-list-bullet">')).appendTo(o), t("#wmd-heading-button").append(t('<i class="icon-text-height">')).appendTo(o),
t("#wmd-hr-button").append(t('<i class="icon-ellipsis">')).appendTo(o), o = t(".wmd-button-group5"),
t("#wmd-undo-button").append(t('<i class="icon-reply">')).appendTo(o), t("#wmd-redo-button").append(t('<i class="icon-forward">')).appendTo(o);
}, T.onReady = function() {
document.body.className += " " + l.editMode, !0 === window.viewerMode ? document.body.innerHTML = p : document.body.innerHTML = d,
a.init(), t(window).on("offline", T.setOffline), t(window).on("online", b), !1 === navigator.onLine && T.setOffline(),
t(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 = t(), $ = e.debounce(function() {
L || B.getPaymentsImmediate(function(n, i) {
C(), S(i) || e.each(document.querySelectorAll(".modal-body"), function(e) {
var n = t('<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(_), e.insertBefore(n[0], e.firstChild), j = j.add(n);
});
});
}, 3e3);
return c.addListener("onOfflineChanged", $), c.addListener("onReady", function() {
function n(t) {
if (t = t || "default", r != t) {
var e = "less!themes/" + t;
-1 !== window.baseDir.indexOf("-min") && (e = "css!themes/" + t), requirejs.undef(e),
require([ e ]), r = t;
}
}
t(document.body).on("shown.bs.modal", ".modal", function() {
var e = t(this);
setTimeout(function() {
e.find(".btn:first").focus(), e.find("button:first").focus(), e.find("input:enabled:visible:first").focus();
}, 50);
}).on("hidden.bs.modal", ".modal", function() {
i.focus(), n(window.theme);
}).on("keypress", ".modal", function(e) {
13 != e.which || t(e.target).is("textarea") || t(this).find(".modal-footer a:last").click();
}), t(".action-insert-link").click(function(e) {
var n = a.getInputTextValue(t("#input-insert-link"), e);
void 0 !== n && (T.insertLinkCallback(n), T.insertLinkCallback = void 0);
}), t(".action-insert-image").click(function(e) {
var n = a.getInputTextValue(t("#input-insert-image"), e);
void 0 !== n && (T.insertLinkCallback(n), T.insertLinkCallback = void 0);
}), t(".modal-insert-link, .modal-insert-image").on("hidden.bs.modal", function() {
void 0 !== T.insertLinkCallback && (T.insertLinkCallback(null), T.insertLinkCallback = void 0);
}), t(".action-load-settings").click(function() {
x();
}), t(".action-apply-settings").click(function(t) {
w(t), t.isPropagationStopped() || window.location.reload();
}), t(".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 = t("#input-settings-theme"), R.on("change", function() {
n(this.value);
}), t(".action-import-docs-settings").click(function() {
t("#input-file-import-docs-settings").click();
});
var u;
if (t("#input-file-import-docs-settings").change(function(n) {
var i = (n.dataTransfer || n.target).files;
t(".modal-settings").modal("hide"), e.each(i, function(t) {
var e = new FileReader();
e.onload = function(t) {
return function(e) {
try {
u = JSON.parse(e.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: " + t.name);
}
n("#input-file-import-docs-settings").val("");
};
}(t), e.readAsText(t);
});
}), t(".action-import-docs-settings-confirm").click(function() {
s.clear();
var t = /^file\.|^folder\.|^publish\.|^settings$|^sync\.|^google\.|^author\.|^themeV4$|^version$/;
e.each(u, function(e, n) {
t.test(n) && (s[n] = e);
}), window.location.reload();
}), t(".action-export-docs-settings").click(function() {
a.saveAs(JSON.stringify(s), "StackEdit local storage.json");
}), t(".action-default-settings").click(function() {
s.removeItem("settings"), s.removeItem("theme"), l.dropboxFullAccess || s.removeItem("dropbox.lastChangeId"),
window.location.reload();
}), t(".action-app-reset").click(function() {
s.clear(), window.location.reload();
}), t(".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),
t("div.dropdown-menu").click(function(t) {
t.stopPropagation();
}), t(".modal-non-unique").modal({
backdrop: "static",
keyboard: !1,
show: !1
}), e.each(document.querySelectorAll("img"), function(e) {
var n = t(e), i = n.data("stackeditSrc");
i && n.attr("src", window.baseDir + "/img/" + i);
}), !1 === window.viewerMode) {
var d = e.reduce(o.THEME_LIST, function(t, e, n) {
return t + '<option value="' + n + '">' + e + "</option>";
}, "");
document.getElementById("input-settings-theme").innerHTML = d;
}
t(".modal-header").append('<a class="dialog-header-message" href="app" target="_blank"><i class="icon-megaphone"></i> Switch to StackEdit 5 now!</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\t> 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(t, e, 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 === e.size(l) ? d.createFile(n.WELCOME_DOCUMENT_TITLE, u) : e.max(l, function(t) {
return t.selectTime || 0;
})), d.currentFile !== r && (d.currentFile = r, r.selectTime = new Date().getTime(),
s.onFileSelected(r), t(".action-edit-document").toggleClass("hide", r.fileIndex != n.TEMPORARY_FILE_INDEX)),
i.initEditor(r);
}, d.createFile = function(t, i, u, d, p) {
if (i = void 0 !== i ? i : a.defaultContent, !t) {
t = n.DEFAULT_FILE_TITLE;
for (var h = 2, f = function(e) {
return e.title == t;
}; e.some(l, f); ) t = n.DEFAULT_FILE_TITLE + h++;
}
var m = n.TEMPORARY_FILE_INDEX;
if (!p) do m = "file." + r.id(); while (e.has(l, m));
d = d || {};
var g = e.reduce(d, function(t, e) {
return r.storeAttributes(e), t + e.syncIndex + ";";
}, ";");
o[m + ".title"] = t, o[m + ".content"] = i, o[m + ".sync"] = g, o[m + ".publish"] = ";";
var v = new c(m, t, d);
return u && (v.discussionListJSON = u), p || (r.appendIndexToArray("file.list", m),
l[m] = v, s.onFileCreated(v)), v;
}, d.deleteFile = function(t) {
t = t || d.currentFile, t.folder && (t.folder.removeFile(t), s.onFoldersChanged()),
r.removeIndexFromArray("file.list", t.fileIndex), delete l[t.fileIndex], d.currentFile === t && (d.currentFile = void 0,
d.selectFile()), s.onFileDeleted(t);
}, d.getFileFromSyncIndex = function(t) {
return e.find(l, function(n) {
return e.has(n.syncLocations, t);
});
}, d.getFileFromPublishIndex = function(t) {
return e.find(l, function(n) {
return e.has(n.publishLocations, t);
});
}, s.addListener("onReady", function() {
function e() {
if (a) {
o.addClass("hide"), r.removeClass("hide");
var e = t.trim(o.val()), n = d.currentFile;
e && e != n.title && (n.title = e, s.onTitleChanged(n)), o.val(n.title), i.focus(),
a = !1;
}
}
var i = t("#wmd-input");
d.selectFile();
var r = t(".file-title-navbar"), o = t(".input-file-title");
t(".action-create-file").click(function() {
setTimeout(function() {
var t = d.createFile();
d.selectFile(t), r.click();
}, 400);
}), t(".action-remove-file-confirm").click(function() {
t(".modal-remove-file-confirm").modal("show");
}), t(".action-remove-file").click(function() {
d.deleteFile();
});
var a;
r.click(function() {
if (!0 !== window.viewerMode) {
r.addClass("hide");
var t = o.removeClass("hide");
a = !0, setTimeout(function() {
t.focus().get(0).select();
}, 10);
}
}), o.blur(function() {
setTimeout(function() {
e();
}, 0);
}).keypress(function(t) {
13 == t.keyCode && (e(), t.preventDefault()), 27 == t.keyCode && (o.val(""), e());
}), t(".action-open-stackedit").click(function() {
window.location.href = "editor";
}), t(".action-edit-document").click(function() {
var t = i.val(), e = d.currentFile.title, n = d.createFile(e, t);
d.selectFile(n), window.location.href = "editor";
}), t(".action-welcome-file").click(function() {
var t = d.createFile(n.WELCOME_DOCUMENT_TITLE, u);
d.selectFile(t);
});
}), s.onFileMgrCreated(d), d;
}), define("classes/Provider", [ "underscore", "utils", "settings", "eventMgr", "fileMgr", "editor", "diff_match_patch_uncompressed", "jsondiffpatch" ], function(t, e, n, i, r, o, a, s) {
function l(t, e) {
this.providerId = t, this.providerName = e, this.isPublishEnabled = !0;
}
l.prototype.parseDiscussionList = function(t) {
try {
var e = JSON.parse(t);
return n.each(e, function(t, e) {
if (t.discussionIndex != e || !n.isNumber(t.selectionStart) || !n.isNumber(t.selectionEnd)) throw "invalid";
t.commentList && t.commentList.forEach(function(t) {
if (t.author && !n.isString(t.author) || !n.isString(t.content)) throw "invalid";
});
}), e;
} catch (n) {}
}, l.prototype.serializeContent = function(t, e) {
return e.length > 2 ? t + "<!--se_discussion_list:" + e + "-->" : t;
}, l.prototype.parseContent = function(t) {
var e, n = "{}", i = /<!--se_discussion_list:([\s\S]+)-->$/.exec(t);
return i && (e = this.parseDiscussionList(i[1])) && (t = t.substring(0, i.index),
n = i[1]), {
content: t,
discussionList: e || {},
discussionListJSON: n
};
};
var c = new a();
c.Match_Threshold = 0, c.Patch_DeleteThreshold = 0;
var u = s.create({
objectHash: function(t) {
return JSON.stringify(t);
},
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 = e.crc32(f), y = e.crc32(m), x = e.crc32(g), w = e.crc32(s), S = e.crc32(l), C = e.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, q = p, G = !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(t.identity)) {
I = c.diff_main(f, j), I = function(t) {
function e() {
(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 t.forEach(function(o, a) {
function s() {
return 0 === a || a === t.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 ? (e(), 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] ]) : e(), n;
}(I), j = "";
var W;
I.forEach(function(t) {
var e = t[0], n = t[1];
0 === e || W ? 0 === e && 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 && (G = !0), P ? H = !0 : (G = !0, q = 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)), G && (Q = Q.concat(t.values(v))),
O |= o.adjustCommentOffsets(f, j, Q);
}
if (H) {
var Y = t.values(p);
o.adjustCommentOffsets(s, j, Y);
}
if (U) {
var K = JSON.parse(a.discussionList);
I = u.diff(K, v), u.patch(p, I), t.each(p, function(t, e) {
t || delete p[e];
});
}
return B.length && (O = !0, B.forEach(function(n) {
var i;
do i = e.id(); while (t.has(q, i));
n.discussionIndex = i, q[i] = n;
})), L && (n.title = $, i.onTitleChanged(n), i.onMessage('"' + m + '" has been renamed to "' + $ + '" on ' + this.providerName + ".")),
(E || O) && o.watcher.noWatch(t.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 = q;
var e = u.diff(v, q), a = !1;
t.each(e, function(e, r) {
t.isArray(e) ? 1 === e.length ? i.onDiscussionCreated(n, q[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(t, e, n, i) {
function r(t) {
this.finished = !1, this.timeout = e.ASYNC_TASK_DEFAULT_TIMEOUT, this.retryCounter = 0,
this.runCallbacks = [], this.successCallbacks = [], this.errorCallbacks = [], this.force = t;
}
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(e, n, r) {
try {
t.each(n, function(t) {
t(r);
});
} finally {
e.finished = !0, u === e && (u = void 0, c = !1), 0 === s.length ? (d = !1, i.onAsyncRunning(!1)) : o();
}
}
var s = [];
r.prototype.onRun = function(t) {
this.runCallbacks.push(t);
}, r.prototype.onSuccess = function(t) {
this.successCallbacks.push(t);
}, r.prototype.onError = function(t) {
this.errorCallbacks.push(t);
};
var l = 0;
r.prototype.chain = function(t) {
if (l = n.currentTime, n.logStackTrace(), !0 !== this.finished) {
if (void 0 === this.queue && (this.queue = this.runCallbacks.slice()), void 0 !== t) return void t();
if (0 === this.queue.length) return void a(this, this.successCallbacks);
this.queue.shift()();
}
}, r.prototype.error = function(t) {
if (n.logStackTrace(), !0 !== this.finished) throw t = t || new Error("Unknown error"),
t.message && i.onError(t), a(this, this.errorCallbacks, t), t;
};
var c = !1;
r.prototype.retry = function(t, e) {
if (!0 !== this.finished) {
if (e = e || 5, this.queue = void 0, this.retryCounter >= e) return void this.error(t);
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(t, e, n, i, r, o, a, s, l, c) {
function u(e) {
e.onRun(function() {
return !0 === v ? (f = void 0, e.error(new Error("Operation not available in offline mode.|stopPublish"))) : void 0 !== f ? e.chain() : void t.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
})), e.chain();
}).fail(function(t) {
p({
status: t.status,
responseText: t.statusText
}, e);
});
});
}
function d(t) {
t.onRun(function() {
function e() {
r.redirectConfirm("You are being redirected to <strong>Dropbox</strong> authorization page.", function() {
t.chain(i);
}, function() {
t.error(new Error("Operation canceled."));
});
}
function i() {
!1 === o ? t.timeout = n.ASYNC_TASK_LONG_TIMEOUT : f.reset(), f.authenticate({
interactive: !o
}, function(n, i) {
return !0 === i.isAuthenticated() ? (m = !0, t.chain()) : !0 === o ? (o = !1, t.chain(e)) : void t.error(new Error("Access to Dropbox account is not authorized."));
});
}
if (!0 === m) return t.chain();
var o = !0;
t.chain(i);
});
}
function p(t, n) {
var r = !0;
if (t) if (a.error(t), "string" == typeof t) r = t; else {
if (r = "Dropbox error (" + t.status + ": " + t.responseText + ").", 401 === t.status || 403 === t.status) return m = !1,
r = "Access to Dropbox account is not authorized.", n.retry(new Error(r), 1);
if (400 === t.status && -1 !== t.responseText.indexOf("oauth_nonce")) return e.each(e.keys(o), function(t) {
0 === t.indexOf("dropbox-auth") && o.removeItem(t);
}), m = !1, n.retry(new Error(r), 1);
t.status <= 0 && (f = void 0, m = !1, i.setOffline(), r = "|stopPublish");
}
n.error(new Error(r));
}
function h(e) {
e.onRun(function() {
function i() {
r.redirectConfirm("You are being redirected to <strong>Dropbox Chooser</strong> page.", function() {
e.chain();
}, function() {
e.error(new Error("Operation canceled."));
});
}
return !0 === b ? e.chain() : void t.ajax({
url: "https://www.dropbox.com/static/api/1/dropbox.js",
dataType: "script",
timeout: n.AJAX_TIMEOUT
}).done(function() {
b = !0, e.chain(i);
}).fail(function(t) {
p({
status: t.status,
responseText: t.statusText
}, e);
});
});
}
var f, m = !1, g = {}, v = !1;
l.addListener("onOfflineChanged", function(t) {
v = t;
}), g.upload = function(t, e, n) {
var i, r = new c();
u(r), d(r), r.onRun(function() {
f.writeFile(t, e, function(e, n) {
return e ? (400 === e.status && (e = 'Could not upload document into path "' + t + '".'),
void p(e, r)) : (i = n, r.chain());
});
}), r.onSuccess(function() {
n(void 0, i);
}), r.onError(function(t) {
n(t);
}), r.enqueue();
}, g.checkChanges = function(t, e) {
var n = [], i = t || 0, r = new c();
u(r), d(r), r.onRun(function() {
function t() {
f.pullChanges(i, function(e, o) {
return e ? p(e, r) : (i = o.cursor(), void 0 !== o.changes && (n = n.concat(o.changes)),
o.shouldPullAgain ? r.chain(t) : r.chain(), void 0);
});
}
r.chain(t);
}), r.onSuccess(function() {
e(void 0, n, i);
}), r.onError(function(t) {
e(t);
}), r.enqueue();
}, g.downloadMetadata = function(t, e) {
var n = [], i = new c();
u(i), d(i), i.onRun(function() {
function e() {
if (0 === t.length) return i.chain();
var r = t[0];
f.stat(r, function(r, o) {
return o ? (n.push(o), t.shift(), i.chain(e)) : void p(r, i);
});
}
i.chain(e);
}), i.onSuccess(function() {
e(void 0, n);
}), i.onError(function(t) {
e(t);
}), i.enqueue();
}, g.downloadContent = function(t, n) {
var i = [], r = new c();
u(r), d(r), r.onRun(function() {
function n() {
if (0 === t.length) return r.chain();
var o = t[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 e.isString(o) ? (a.content = o, t.shift(), r.chain(n)) : void p(i, r);
}) : (t.shift(), r.chain(n));
}
r.chain(n);
}), r.onSuccess(function() {
n(void 0, i);
}), r.onError(function(t) {
n(t);
}), r.enqueue();
};
var b = !1;
return g.picker = function(t) {
var e = [], i = new c();
i.timeout = n.ASYNC_TASK_LONG_TIMEOUT, u(i), h(i), i.onRun(function() {
var t = {};
t.multiselect = !0, t.linkType = "direct", t.success = function(t) {
for (var n = 0; n < t.length; n++) {
var r = t[n].link;
r = r.replace(/.*\/view\/[^\/]*/, ""), e.push(decodeURI(r));
}
i.chain();
}, t.cancel = function() {
i.chain();
}, Dropbox.choose(t);
}), i.onSuccess(function() {
t(void 0, e);
}), i.onError(function(e) {
t(e);
}), i.enqueue();
}, g;
}), define("providers/dropboxProvider", [ "underscore", "utils", "storage", "settings", "classes/Provider", "eventMgr", "fileMgr", "helpers/dropboxHelper" ], function(t, e, n, i, r, o, a, s) {
function l(t) {
if (void 0 !== t) return t.match(/^[^\\<>:"\|?\*]+$/) ? 0 !== t.indexOf("/") ? "/" + t : t : void o.onError('"' + t + '" contains invalid characters.');
}
function c(t) {
return "sync." + p + "." + encodeURIComponent(t.toLowerCase());
}
function u(t, n, i, r) {
r = r || "{}";
var o = {};
return o.provider = h, o.path = t, o.version = n, o.contentCRC = e.crc32(i), o.discussionListCRC = e.crc32(r),
o.syncIndex = c(t), !0 === f && (o.content = i, o.discussionList = r), o;
}
function d(e) {
s.downloadMetadata(e, function(e, n) {
e || s.downloadContent(n, function(e, n) {
if (!e) {
var i = [];
t.each(n, function(t) {
var e = h.parseContent(t.content), n = u(t.path, t.versionTag, e.content, e.discussionListJSON), r = {};
r[n.syncIndex] = n;
var o = a.createFile(t.name, e.content, e.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(t) {
var e = t.path.split("/").map(encodeURIComponent), n = e.pop();
return [ "https://www.dropbox.com/home", e.join("/"), "?select=", n ].join("");
};
var f = "merge" == i.conflictMode;
return h.importFiles = function() {
s.picker(function(e, n) {
if (!e && 0 !== n.length) {
var i = [];
t.each(n, function(t) {
var e = c(t), n = a.getFileFromSyncIndex(e);
return void 0 !== n ? o.onError('"' + n.title + '" is already in your local documents.') : void i.push(t);
}), d(i);
}
});
}, h.exportFile = function(t, n, i, r, d, p) {
var f = e.getInputTextValue("#input-sync-export-dropbox-path", t);
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(t, e) {
if (t) return p(t);
var n = u(e.path, e.versionTag, i, r);
p(void 0, n);
});
}, h.syncUp = function(t, e, n, i, r, o, a, l, c) {
if (l.contentCRC == e && l.discussionListCRC == o) return c(void 0, !1);
var u = h.serializeContent(t, r);
s.upload(l.path, u, function(n, a) {
return n ? c(n, !0) : (l.version = a.versionTag, !0 === f && (l.content = t, l.discussionList = r),
l.contentCRC = e, 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 = [];
t.each(l, function(t) {
var e = c(t.path), n = a.getFileFromSyncIndex(e), i = n && n.syncLocations[e];
if (i) {
if (t.fileDesc = n, t.syncAttributes = i, !0 === t.wasRemoved) return void d.push(t);
i.version != t.stat.versionTag && d.push(t);
}
}), s.downloadContent(d, function(t, r) {
function a() {
if (0 === r.length) return n[p + ".lastChangeId"] = u, i();
var t = r.pop(), s = t.fileDesc, l = t.syncAttributes;
if (!0 === t.wasRemoved) return o.onError('"' + s.title + '" has been removed from Dropbox.'),
s.removeSyncLocation(l), o.onSyncRemoved(s, l);
var c = t.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, e.storeAttributes(l), setTimeout(a, 5);
}
return t ? void i(t) : void setTimeout(a, 5);
});
});
}, h.publish = function(t, e, n, i, r) {
var o = l(t.path);
return void 0 === o ? r(!0) : void s.upload(o, i, r);
}, h.newPublishAttributes = function(t) {
var n = {};
if (n.path = e.getInputTextValue("#input-publish-dropbox-path", t), !t.isPropagationStopped()) return n;
}, h;
}), function(t, e) {
"use strict";
var n, i = t.document;
n = function() {
var e, n, 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 t, e, n = !1, r = i.createElement("fakeelement"), o = {
WebkitTransition: "webkitTransitionEnd",
MozTransition: "transitionend",
OTransition: "otransitionend",
transition: "transitionend"
};
for (t in o) if (void 0 !== r.style[t]) {
e = o[t], n = !0;
break;
}
return {
type: e,
supported: n
};
}, e = function(t) {
return i.getElementById(t);
}, m = {
labels: {
ok: "OK",
cancel: "Cancel"
},
delay: 5e3,
buttonReverse: !1,
buttonFocus: "ok",
transition: void 0,
addListeners: function(t) {
var e, s, l, c, u, d = void 0 !== r, p = void 0 !== n, f = void 0 !== h, m = "", g = this;
e = function(e) {
return void 0 !== e.preventDefault && e.preventDefault(), l(e), void 0 !== h && (m = h.value),
"function" == typeof t && (void 0 !== h ? t(!0, m) : t(!0)), !1;
}, s = function(e) {
return void 0 !== e.preventDefault && e.preventDefault(), l(e), "function" == typeof t && t(!1),
!1;
}, l = function(t) {
g.hide(), g.unbind(i.body, "keyup", c), g.unbind(o, "focus", u), d && g.unbind(r, "click", e),
p && g.unbind(n, "click", s);
}, c = function(t) {
var n = t.keyCode;
(n === b.SPACE && !f || f && n === b.ENTER) && e(t), n === b.ESC && p && s(t);
}, u = function(t) {
f ? h.focus() : !p || g.buttonReverse ? r.focus() : n.focus();
}, this.bind(o, "focus", u), this.bind(a, "focus", u), d && this.bind(r, "click", e),
p && this.bind(n, "click", s), this.bind(i.body, "keyup", c), this.transition.supported || this.setFocus();
},
bind: function(t, e, n) {
"function" == typeof t.addEventListener ? t.addEventListener(e, n, !1) : t.attachEvent && t.attachEvent("on" + e, n);
},
handleErrors: function() {
if (void 0 !== t.onerror) {
var e = this;
return t.onerror = function(t, n, i) {
e.error("[" + t + " on line " + i + " of " + n + "]", 0);
}, !0;
}
return !1;
},
appendButtons: function(t, e) {
return this.buttonReverse ? e + t : t + e;
},
build: function(t) {
var e = "", n = t.type, i = t.message, r = t.cssClass || "";
switch (e += '<div class="alertify-dialog">', e += '<a id="alertify-resetFocusBack" class="alertify-resetFocus" href="#">Reset Focus</a>',
"none" === m.buttonFocus && (e += '<a href="#" id="alertify-noneFocus" class="alertify-hidden"></a>'),
"prompt" === n && (e += '<div id="alertify-form">'), e += '<article class="alertify-inner">',
e += g.message.replace("{{message}}", i), "prompt" === n && (e += g.input), e += g.buttons.holder,
e += "</article>", "prompt" === n && (e += "</div>"), e += '<a id="alertify-resetFocus" class="alertify-resetFocus" href="#">Reset Focus</a>',
e += "</div>", n) {
case "confirm":
e = e.replace("{{buttons}}", this.appendButtons(g.buttons.cancel, g.buttons.ok)),
e = e.replace("{{ok}}", this.labels.ok).replace("{{cancel}}", this.labels.cancel);
break;
case "prompt":
e = e.replace("{{buttons}}", this.appendButtons(g.buttons.cancel, g.buttons.submit)),
e = e.replace("{{ok}}", this.labels.ok).replace("{{cancel}}", this.labels.cancel);
break;
case "alert":
e = e.replace("{{buttons}}", g.buttons.ok), e = e.replace("{{ok}}", this.labels.ok);
}
return u.className = "alertify alertify-" + n + " " + r, c.className = "alertify-cover",
e;
},
close: function(t, e) {
var n, i, r = e && !isNaN(e) ? +e : this.delay, o = this;
this.bind(t, "click", function() {
n(t);
}), i = function(t) {
t.stopPropagation(), o.unbind(this, o.transition.type, i), d.removeChild(this),
d.hasChildNodes() || (d.className += " alertify-logs-hidden");
}, n = function(t) {
void 0 !== t && t.parentNode === d && (o.transition.supported ? (o.bind(t, o.transition.type, i),
t.className += " alertify-log-hide") : (d.removeChild(t), d.hasChildNodes() || (d.className += " alertify-logs-hidden")));
}, 0 !== e && setTimeout(function() {
n(t);
}, r);
},
dialog: function(t, e, n, r, o) {
l = i.activeElement;
var a = function() {
d && null !== d.scrollTop && c && null !== c.scrollTop || a();
};
if ("string" != typeof t) throw new Error("message must be a string");
if ("string" != typeof e) throw new Error("type must be a string");
if (void 0 !== n && "function" != typeof n) throw new Error("fn must be a function");
return this.init(), a(), y.push({
type: e,
message: t,
callback: n,
placeholder: r,
cssClass: o
}), v || this.setup(), this;
},
extend: function(t) {
if ("string" != typeof t) throw new Error("extend method must have exactly one paramter");
return function(e, n) {
return this.log(e, t, n), this;
};
},
hide: function() {
var t, e = this;
y.splice(0, 1), y.length > 0 ? this.setup(!0) : (v = !1, t = function(n) {
n.stopPropagation(), e.unbind(u, e.transition.type, t);
}, this.transition.supported ? (this.bind(u, this.transition.type, t), 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() {
i.createElement("nav"), i.createElement("article"), i.createElement("section"),
null == e("alertify-cover") && (c = i.createElement("div"), c.setAttribute("id", "alertify-cover"),
c.className = "alertify-cover alertify-cover-hidden", i.body.appendChild(c)), null == e("alertify") && (v = !1,
y = [], u = i.createElement("section"), u.setAttribute("id", "alertify"), u.className = "alertify alertify-hidden",
i.body.appendChild(u)), null == e("alertify-logs") && (d = i.createElement("section"),
d.setAttribute("id", "alertify-logs"), d.className = "alertify-logs alertify-logs-hidden",
i.body.appendChild(d)), i.body.setAttribute("tabindex", "0"), this.transition = f();
},
log: function(t, e, n) {
var i = function() {
d && null !== d.scrollTop || i();
};
return this.init(), i(), d.className = "alertify-logs", this.notify(t, e, n), this;
},
notify: function(t, e, n) {
var r = i.createElement("article");
r.className = "alertify-log" + ("string" == typeof e && "" !== e ? " alertify-log-" + e : ""),
r.innerHTML = t, d.appendChild(r), setTimeout(function() {
r.className = r.className + " alertify-log-show";
}, 50), this.close(r, n);
},
set: function(t) {
var e;
if ("object" != typeof t && t instanceof Array) throw new Error("args must be an object");
for (e in t) t.hasOwnProperty(e) && (this[e] = t[e]);
},
setFocus: function() {
h ? (h.focus(), h.select()) : s.focus();
},
setup: function(t) {
var i, l = y[0], c = this;
v = !0, i = function(t) {
t.stopPropagation(), c.setFocus(), c.unbind(u, c.transition.type, i);
}, this.transition.supported && !t && this.bind(u, this.transition.type, i), u.innerHTML = this.build(l),
o = e("alertify-resetFocus"), a = e("alertify-resetFocusBack"), r = e("alertify-ok") || void 0,
n = e("alertify-cancel") || void 0, s = "cancel" === m.buttonFocus ? n : "none" === m.buttonFocus ? e("alertify-noneFocus") : r,
h = e("alertify-text") || void 0, p = e("alertify-form") || void 0, "string" == typeof l.placeholder && "" !== l.placeholder && (h.value = l.placeholder),
t && this.setFocus(), this.addListeners(l.callback);
},
unbind: function(t, e, n) {
"function" == typeof t.removeEventListener ? t.removeEventListener(e, n, !1) : t.detachEvent && t.detachEvent("on" + e, n);
}
}, {
alert: function(t, e, n) {
return m.dialog(t, "alert", e, "", n), this;
},
confirm: function(t, e, n) {
return m.dialog(t, "confirm", e, "", n), this;
},
extend: m.extend,
init: m.init,
log: function(t, e, n) {
return m.log(t, e, n), this;
},
prompt: function(t, e, n, i) {
return m.dialog(t, "prompt", e, n, i), this;
},
success: function(t, e) {
return m.log(t, "success", e), this;
},
error: function(t, e) {
return m.log(t, "error", e), this;
},
set: function(t) {
m.set(t);
},
labels: m.labels,
debug: m.handleErrors
};
}, "function" == typeof define ? define("alertify", [], function() {
return new n();
}) : void 0 === t.alertify && (t.alertify = new n());
}(this), define("helpers/couchdbHelper", [ "jquery", "underscore", "core", "utils", "storage", "logger", "constants", "settings", "eventMgr", "classes/AsyncTask" ], function(t, e, n, i, r, o, a, s, l, c) {
function u(t, e) {
var n, i = {
code: t.status,
message: t.statusText,
reason: (t.responseJSON || {}).reason
};
i && (o.error(i), n = "string" == typeof i ? i : "Error " + i.code + ": " + (i.reason || i.message)),
e.error(new Error(n));
}
var d = {}, p = !1;
return l.addListener("onOfflineChanged", function(t) {
p = t;
}), d.uploadDocument = function(n, r, o, a, l, d) {
var p, h = new c();
h.onRun(function() {
a ? (e.isArray(a) || (a = e.chain(("" + a).split(/,/)).compact().unique().value()),
a = a.filter(function(t) {
return e.isString(t) && t.length < 32;
}), a = a.slice(0, 16)) : a = void 0, t.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(t) {
p = t, h.chain();
}).fail(function(t) {
u(t, h);
});
}), h.onSuccess(function() {
d(void 0, p);
}), h.onError(function(t) {
d(t);
}), h.enqueue();
}, d.checkChanges = function(n, i, r) {
var o, a = n || 0, l = new c();
l.onRun(function() {
t.ajax({
type: "POST",
url: s.couchdbUrl + "/_changes?" + t.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(t) {
a = t.last_seq, o = e.map(t.results, function(t) {
return t.deleted ? {
_id: t.id,
deleted: !0
} : t.doc;
}), l.chain();
}).fail(function(t) {
u(t, l);
});
}), l.onSuccess(function() {
r(void 0, o, a);
}), l.onError(function(t) {
r(t);
}), 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 t.ajax({
url: s.couchdbUrl + "/" + encodeURIComponent(a._id),
headers: {
Accept: "application/json"
},
contentType: "application/json",
dataType: "json",
data: {
attachments: !0
}
}).done(function(t) {
n.shift(), e.extend(a, t), o.chain(i);
}).fail(function(t) {
u(t, o);
});
}
o.chain(i);
}), o.onSuccess(function() {
i(void 0, r);
}), o.onError(function(t) {
i(t);
}), 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;
t.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(t) {
o = e.pluck(t.rows, "doc"), l.chain();
}).fail(function(t) {
u(t, l);
});
}), l.onSuccess(function() {
r(void 0, o);
}), l.onError(function(t) {
r(t);
}), l.enqueue();
}, d.deleteDocuments = function(e) {
var n = new c();
n.onRun(function() {
t.ajax({
type: "POST",
url: s.couchdbUrl + "/_bulk_docs",
data: JSON.stringify({
docs: e.map(function(t) {
return {
_id: t._id,
_rev: t._rev,
_deleted: !0
};
})
}),
contentType: "application/json",
dataType: "json"
}).done(function() {
n.chain();
}).fail(function(t) {
u(t, 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(t, e, n, i, r, o, a, s, l, c, u, d, p, h, f) {
function m(t) {
return "sync." + y + "." + t;
}
function g(t, e, n, i, r) {
r = r || "{}";
var a = {};
return a.provider = x, a.id = t, a.rev = e, a.contentCRC = o.crc32(n), a.titleCRC = o.crc32(i),
a.discussionListCRC = o.crc32(r), a.syncIndex = m(t), !0 === S && (a.content = n,
a.title = i, a.discussionList = r), a;
}
function v(t, n) {
var i = [];
return e.each(t, function(t) {
var e = m(t), n = d.getFileFromSyncIndex(e);
return void 0 !== n ? u.onError('"' + n.title + '" is already in your local documents.') : void i.push(t);
}), 0 === t.length ? n && n() : void f.downloadContent(i.map(function(t) {
return {
_id: t
};
}), function(t, i) {
if (t) return n && n(t);
var r, a = [];
e.each(i, function(t) {
var e, n = o.decodeBase64(t._attachments.content.data), i = x.parseContent(n), s = g(t._id, t._rev, i.content, t.title, i.discussionListJSON);
e = {}, e[s.syncIndex] = s, r = d.createFile(t.title, i.content, i.discussionListJSON, e),
a.push(r);
}), void 0 !== r && (u.onSyncImportSuccess(a, x), d.selectFile(r)), n && n();
});
}
function b(t, e) {
var n = t && t.tags, i = e.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(t) {
return [ c.couchdbUrl, "/", t.id, "/content" ].join("");
};
var w, S = "merge" == c.conflictMode;
return x.importFiles = function() {
t("#select-sync-import-couchdb-tag").val() || v(e.chain((w.val() || "").split(/\s+/)).compact().unique().value());
}, x.exportFile = function(t, e, n, i, r, o) {
var a = x.serializeContent(n, i), s = b(r, e);
f.uploadDocument(void 0, e, a, s, void 0, function(t, r) {
if (t) return o(t);
var a = g(r.id, r.rev, n, e, i);
o(void 0, a);
});
}, x.syncUp = function(t, e, n, i, r, o, a, s, l) {
if (s.contentCRC == e && s.titleCRC == i && s.discussionListCRC == o) return l(void 0, !1);
var c = x.serializeContent(t, 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 = t, s.title = n, s.discussionList = r),
s.contentCRC = e, s.titleCRC = i, s.discussionListCRC = o, l(void 0, !0), void 0);
});
}, x.syncDown = function(t) {
var n = parseInt(a[y + ".lastChangeId"], 10), i = {};
e.each(p, function(t) {
e.each(t.syncLocations, function(t) {
t.provider === x && (i[t.id] = t);
});
}), f.checkChanges(n, i, function(n, i, r) {
if (n) return t(n);
var s = [];
e.each(i, function(t) {
var e = m(t._id), n = d.getFileFromSyncIndex(e), i = n && n.syncLocations[e];
i && (t.fileDesc = n, t.syncAttributes = i, s.push(t));
}), f.downloadContent(s, function(e, n) {
function i() {
if (0 === n.length) return a[y + ".lastChangeId"] = r, t();
var e = n.pop(), s = e.fileDesc, l = e.syncAttributes;
if (!0 === e.deleted) return u.onError('"' + s.title + '" has been removed from CouchDB.'),
s.removeSyncLocation(l), u.onSyncRemoved(s, l);
var c = e, 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 e ? t(e) : void setTimeout(i, 5);
});
});
}, x.importPrivate = function(t, e) {
v([ t.id ], e);
}, u.addListener("onReady", function() {
function s() {
v = x.children(".active").clone(), g = [];
var e = [];
v.each(function() {
var n = t(this).data("documentId");
e.push(n), g.push(h[n]);
}), w.val(e.join(" ")), S.empty().append(v), t(b.querySelectorAll(".action-delete-items")).parent().toggleClass("disabled", 0 === g.length);
}
function l() {
h = {}, m = void 0, x.empty(), s();
}
function u(e) {
t(b.querySelectorAll(".list-mode")).toggleClass("hide", "list" != e), t(b.querySelectorAll(".delete-mode")).toggleClass("hide", "delete" != e),
t(b.querySelectorAll(".byid-mode")).toggleClass("hide", "byid" != e);
}
function d() {
I.empty().append(n("option", {
value: ""
}, "none")), e.sortBy(T, function(t) {
return t.toLowerCase();
}).forEach(function(t) {
I.append(n("option", {
value: t
}, t));
});
}
r.COUCHDB_URL == c.couchdbUrl && t(".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 = t("#input-sync-import-couchdb-documentid");
var h, m, g, v, b = document.querySelector(".modal-download-couchdb"), x = t(b.querySelector(".document-list")), S = t(b.querySelector(".selected-document-list")), C = t(b.querySelector(".please-wait")), _ = t(b.querySelector(".no-document")), k = t(b.querySelector(".more-documents"));
l();
var E = e.debounce(function() {
C.removeClass("hide"), _.addClass("hide"), k.addClass("hide"), f.listDocuments(I.val(), m && m.updated, function(t, n) {
if (C.addClass("hide"), t) return void k.removeClass("hide");
n.length === r.COUCHDB_PAGE_SIZE && (k.removeClass("hide"), m = n.pop());
var i = e.reduce(n, function(t, n) {
return h[n._id] = n, t + e.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 = t("#input-sync-import-couchdb-tag").on("change", function() {
l(), E();
});
d(), t(b).on("show.bs.modal", function() {
l(), E();
}).on("click", ".document-list .document", function() {
t(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(t, n) {
t && n && (T.push(n), T = e.chain(T).sortBy(function(t) {
return t.toLowerCase();
}).unique(!0).value(), a[y + ".tagList"] = JSON.stringify(T), d(), I.val(n).change());
}, "Tag");
}).on("click", ".action-remove-tag", function() {
var t = I.val();
t && i.confirm("You are removing <b>" + I.val() + "</b> from your list of filters.", function(n) {
n && (T = e.without(T, t), 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(t, e, n, i, r, o, a, s, l, c) {
function u(e) {
var n = {
profile: !0
}, i = !0;
t.each((o[e + ".permissions"] || "").split(";"), function(t) {
t && (n[t] = !0);
}), this.setRefreshFlag = function() {
i = !0;
}, this.isAuthorized = function(e) {
return !1 === i && t.has(n, e);
}, this.add = function(r) {
n[r] = !0, o[e + ".permissions"] = t.keys(n).join(";"), i = !1;
}, this.getListWithNew = function(e) {
var i = t.keys(n);
return t.has(n, e) || i.push(e), i;
};
var r = o[e + ".userId"];
this.setUserId = function(t) {
r = t, o[e + ".userId"] = r;
}, this.getUserId = function() {
return r;
};
var a = parseInt(o[e + ".authUser"] || 0);
this.setAuthUser = function(t) {
a = t, o[e + ".authUser"] = a;
}, this.getAuthUser = function() {
return a;
};
}
function d(t) {
t.onRun(function() {
return !0 === y ? (g = !1, t.error(new Error("Operation not available in offline mode.|stopPublish"))) : !0 === g ? t.chain() : (window.delayedFunction = function() {
gapi.load("client", function() {
gapi.client.load("drive", "v2", function() {
g = !0, t.chain();
});
});
}, void e.ajax({
url: "https://apis.google.com/js/api.js?onload=runDelayedFunction",
dataType: "script",
timeout: n.AJAX_TIMEOUT
}).fail(function(e) {
f({
code: e.status,
message: e.statusText
}, t);
}));
});
}
function p(i, o, a) {
var s = b.getAuthorizationMgr(a);
i.onRun(function() {
function a() {
e.ajax({
url: "https://www.googleapis.com/oauth2/v1/tokeninfo",
data: {
access_token: d.access_token
},
timeout: n.AJAX_TIMEOUT,
type: "GET"
}).done(function(t) {
s.getUserId() && s.getUserId() != t.user_id ? u() : (s.setUserId(t.user_id), s.add(o),
s.token = d, i.chain());
}).fail(function(t) {
f({
code: t.status,
message: t.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 e = t.chain(x).pick(s.getListWithNew(o)).flatten().value();
gapi.auth.authorize({
client_id: n.GOOGLE_CLIENT_ID,
scope: e,
immediate: p,
authuser: !1 === p ? "" : m
}, function(t) {
d = gapi.auth.getToken(), gapi.auth.setToken(h), !t || t.error ? !0 === g && !0 === p ? (m < 5 && 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(t, e) {
var n = gapi.auth.getToken(), i = v[t];
gapi.auth.setToken(i.token), e(), gapi.auth.setToken(n);
}
function f(e, n) {
var r;
if (e) if (a.error(e), "string" == typeof e) r = e; else {
if (r = "Google error (" + e.code + ": " + e.message + ").", e.code >= 500 && e.code < 600) return n.retry(new Error(r));
if (401 === e.code || 403 === e.code || "token_refresh_required" == e.code) return t.each(v, function(t) {
t.setRefreshFlag();
}), r = "Access to Google account is not authorized.", n.retry(new Error(r), 1);
0 !== e.code && -1 !== e.code || (g = !1, t.each(v, function(t) {
t.setRefreshFlag();
}), i.setOffline(), r = "|stopPublish");
}
n.error(new Error(r));
}
function m(t) {
t.onRun(function() {
return !0 === w ? t.chain() : void e.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() {
t.chain();
}
}), w = !0;
}).fail(function(e) {
f({
code: e.status,
message: e.statusText
}, t);
});
});
}
var g = !1, v = {}, b = {}, y = !1;
l.addListener("onOfflineChanged", function(t) {
y = t;
});
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(t) {
var e = v[t];
return e || (e = new u(t), v[t] = e), e;
}, b.refreshGdriveToken = function(t) {
var e = new c();
d(e);
var n = v[t];
n && n.setRefreshFlag(), p(e, "gdrive", t), e.enqueue();
}, b.upload = function(t, e, 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
};
e && (d.parents = [ {
kind: "drive#fileLink",
id: e
} ]);
var p = "/upload/drive/v2/files", m = "POST";
t && (p += "/" + t, 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(e) {
if (e && e.id) return g = e, g.content = i, v.chain();
var n = e.error;
void 0 !== n && void 0 !== t && (404 === n.code ? n = 'File ID "' + t + '" not found on Google Drive.|removePublish' : 412 === n.code && (o.removeItem(u + ".gdrive.lastChangeId"),
n = 'Conflict on file ID "' + t + '". Please restart the synchronization.')), f(n, v);
});
});
}), v.onSuccess(function() {
m(void 0, g);
}), v.onError(function(t) {
m(t);
}), v.enqueue();
}, b.rename = function(t, e, n, i) {
var r, o = new c();
d(o), p(o, "gdrive", n), o.onRun(function() {
var i = {
title: e
};
h(n, function() {
gapi.client.drive.files.patch({
fileId: t,
resource: i
}).execute(function(e) {
if (e && e.id) return r = e, o.chain();
var n = e.error;
void 0 !== n && void 0 !== t && 404 === n.code && (n = 'File ID "' + t + '" not found on Google Drive.|removePublish'),
f(n, o);
});
});
}), o.onSuccess(function() {
i(void 0, r);
}), o.onError(function(t) {
i(t);
}), o.enqueue();
}, b.checkChanges = function(t, e, n) {
var i = [], r = t || 0, o = new c();
d(o), p(o, "gdrive", e), o.onRun(function() {
function t() {
h(e, function() {
var e;
e = void 0 === n ? gapi.client.drive.changes.list({
startChangeId: r + 1
}) : gapi.client.drive.changes.list({
pageToken: n
}), e.execute(function(e) {
return e && e.largestChangeId ? (r = e.largestChangeId, n = e.nextPageToken, void 0 !== e.items && (i = i.concat(e.items)),
void 0 !== n ? o.chain(t) : o.chain(), void 0) : f(e.error, o);
});
});
}
var n;
o.chain(t);
}), o.onSuccess(function() {
n(void 0, i, r);
}), o.onError(function(t) {
n(t);
}), o.enqueue();
}, b.downloadMetadata = function(t, i, r, o) {
var a = [], s = new c();
d(s), o || p(s, "gdrive", i), s.onRun(function() {
function r() {
if (0 === t.length) return s.chain();
var o = t[0], l = {}, c = v[i];
c && c.token && (l.Authorization = "Bearer " + c.token.access_token), e.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(e) {
a.push(e), t.shift(), s.chain(r);
}).fail(function(t) {
var e = {
code: t.status,
message: t.statusText
};
404 === e.code && (e = 'File ID "' + o + '" not found on Google Drive.'), f(e, s);
});
}
s.chain(r);
}), s.onSuccess(function() {
r(void 0, a);
}), s.onError(function(t) {
r(t);
}), s.enqueue();
}, b.downloadContent = function(t, 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 === t.length) return s.chain();
var o = t[0];
a.push(o);
var l;
if ("drive#file" == o.kind ? l = o : "drive#change" == o.kind && (l = o.file), !l) return t.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), e.ajax({
url: c,
headers: u,
data: {
key: n.GOOGLE_API_KEY
},
dataType: l.isRealtime ? "json" : "text",
timeout: n.AJAX_TIMEOUT
}).done(function(e) {
l.content = l.isRealtime ? e.data.value.content.value : e, t.shift(), s.chain(r);
}).fail(function(t) {
f({
code: t.status,
message: t.statusText
}, s);
});
}
s.chain(r);
}), s.onSuccess(function() {
r(void 0, a);
}), s.onError(function(t) {
r(t);
}), s.enqueue();
}, b.uploadImg = function(t, i, r, o) {
var a, s = new c();
d(s), p(s, "picasa", "google.picasa0"), s.onRun(function() {
var o = {
Slug: t
};
t.match(/.jpe?g$/i) ? o["Content-Type"] = "image/jpeg" : t.match(/.png$/i) ? o["Content-Type"] = "image/png" : t.match(/.gif$/i) && (o["Content-Type"] = "image/gif");
var l = v["google.picasa0"];
l && l.token && (o.Authorization = "Bearer " + l.token.access_token), e.ajax({
url: n.PICASA_IMPORT_IMG_URL + "?" + e.param({
albumId: r
}),
headers: o,
data: i,
processData: !1,
dataType: "xml",
timeout: n.AJAX_TIMEOUT,
type: "POST"
}).done(function(t) {
a = t, s.chain();
}).fail(function(t) {
var e = {
code: t.status,
message: t.statusText
};
200 == e.code && (e.message = t.responseText), f(e, s);
});
}), s.onSuccess(function() {
o(void 0, a);
}), s.onError(function(t) {
o(t);
}), s.enqueue();
};
var w = !1;
return b.picker = function(t, i, o) {
function a() {
void 0 !== s && (s.setVisible(!1), e(".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 t = 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), t && t.token && c.setOAuthToken(t.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), t && t.token && c.setOAuthToken(t.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), t && t.token && c.setOAuthToken(t.token.access_token)),
c.setCallback(function(t) {
t.action != google.picker.Action.PICKED && t.action != google.picker.Action.CANCEL || (t.action == google.picker.Action.PICKED && (l = t.docs),
a(), u.chain());
}), s = c.build(), e(r.createBackdrop()).on("click.backdrop", function() {
a(), u.chain();
}), s.setVisible(!0);
}), u.onSuccess(function() {
t(void 0, l);
}), u.onError(function(e) {
a(), t(e);
}), u.enqueue();
}, b.uploadBlogger = function(t, 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 t = "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 && (t += r, a.id = r, c = "PUT"), e.ajax({
url: t,
data: JSON.stringify(a),
headers: h,
type: c,
contentType: "application/json",
dataType: "json",
timeout: n.AJAX_TIMEOUT
}).done(function(t) {
r = t.id, m.chain(d);
}).fail(function(t) {
var e = {
code: t.status,
message: t.statusText
};
404 === e.code && void 0 !== r && (e = "Post " + r + " not found on Blogger.|removePublish"),
f(e, m);
});
}
function d() {
var t = "https://www.googleapis.com/blogger/v3/blogs/" + i + "/posts/" + r;
a ? t += "/revert" : (t += "/publish", s && (t += "?publishDate=" + s.toISOString())),
e.ajax({
url: t,
headers: h,
type: "POST",
dataType: "json",
timeout: n.AJAX_TIMEOUT
}).done(function() {
m.chain();
}).fail(function(t) {
var e = {
code: t.status,
message: t.statusText
};
404 === e.code && (e = "Post " + r + " not found on Blogger.|removePublish"), f(e, m);
});
}
function p() {
return void 0 !== i ? void m.chain(c) : void e.ajax({
url: "https://www.googleapis.com/blogger/v3/blogs/byurl",
data: {
url: t
},
headers: h,
dataType: "json",
timeout: n.AJAX_TIMEOUT
}).done(function(t) {
i = t.id, m.chain(c);
}).fail(function(e) {
var n = {
code: e.status,
message: e.statusText
};
404 === n.code && (n = 'Blog "' + t + '" 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(t) {
h(t);
}), m.enqueue();
}, b.uploadBloggerPage = function(t, i, r, o, a, s, l, u) {
var h = new c();
d(h), p(h, "blogger", "google.blogger0"), h.onRun(function() {
function o() {
var t = "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 && (t += r, o.id = r, a = "PUT"), e.ajax({
url: t,
data: JSON.stringify(o),
headers: c,
type: a,
contentType: "application/json",
dataType: "json",
timeout: n.AJAX_TIMEOUT
}).done(function(t) {
r = t.id, h.chain();
}).fail(function(t) {
var e = {
code: t.status,
message: t.statusText
};
404 === e.code && void 0 !== r && (e = "Page " + r + " not found on Blogger.|removePublish"),
f(e, h);
});
}
function a() {
return void 0 !== i ? void h.chain(o) : void e.ajax({
url: "https://www.googleapis.com/blogger/v3/blogs/byurl",
data: {
url: t
},
headers: c,
dataType: "json",
timeout: n.AJAX_TIMEOUT
}).done(function(t) {
i = t.id, h.chain(o);
}).fail(function(e) {
var n = {
code: e.status,
message: e.statusText
};
404 === n.code && (n = 'Blog "' + t + '" 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(t) {
u(t);
}), 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\t<div class="modal-content">\n\n\t\t<div class="modal-header">\n\t\t\t<button type="button" class="close" data-dismiss="modal"\n\t\t\t\taria-hidden="true">&times;</button>\n\t\t\t<h2 class="modal-title">Save on <%= providerName %></h2>\n\t\t</div>\n\t\t<div class="modal-body">\n\t\t\t<p>\n\t\t\t\tThis will save "<span class="file-title"></span>" to your <i\n\t\t\t\t\tclass="icon-provider-<%= providerId %>"></i>\n\t\t\t\t<b>Google Drive</b>\n\t\t\t\taccount and keep it synchronized.\n\t\t\t</p>\n\t\t\t<div class="collapse form-horizontal sync-export-<%= providerId %>-options-collapse">\n\t\t\t\t<div class="form-group">\n\t\t\t\t\t<label class="col-lg-3 control-label"\n\t\t\t\t\t\tfor="input-sync-export-<%= providerId %>-parentid">Folder ID\n\t\t\t\t\t\t(optional)</label>\n\t\t\t\t\t<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\t\t\t\t\t\t<span class="help-block"> If no folder ID is supplied, the\n\t\t\t\t\t\t\tfile will be created in your root folder. </span>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class="form-group">\n\t\t\t\t\t<label class="col-lg-3 control-label"\n\t\t\t\t\t\tfor="input-sync-export-<%= providerId %>-fileid">Existing file ID\n\t\t\t\t\t\t(optional)</label>\n\t\t\t\t\t<div class="col-lg-8">\n\t\t\t\t\t\t<input type="text" id="input-sync-export-<%= providerId %>-fileid"\n\t\t\t\t\t\t\tplaceholder="FileID" class="form-control"> <span\n\t\t\t\t\t\t\tclass="help-block"> This will overwrite the existing file\n\t\t\t\t\t\t\ton the server. </span>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<p class="align-right">\n\t\t\t\t<a href="#" data-toggle="collapse" data-target=".sync-export-<%= providerId %>-options-collapse" class="collapsed">\n\t\t\t\t\tOptions <i class="icon-up-dir"></i>\n\t\t\t\t</a>\n\t\t\t</p>\n\t\t\t<blockquote>\n\t\t\t\t<p><b>Tip:</b> You can move or rename the file afterwards within Google\n\t\t\t\t\t\tDrive.</p>\n\t\t\t</blockquote>\n\t\t</div>\n\t\t<div class="modal-footer">\n\t\t\t<a href="#" class="btn btn-default pull-left action-autosync-dialog-<%= providerId %>" data-dismiss="modal"><i\n\t\t\t\tclass="icon-provider-gdrive"></i> Setup AutoSync</a>\n\t\t\t<a href="#" class="btn btn-default" data-dismiss="modal">Cancel</a>\n\t\t\t<a href="#" data-dismiss="modal"\n\t\t\t\tclass="btn btn-primary action-sync-export-<%= providerId %>">OK</a>\n\t\t</div>\n\t</div>\n</div>\n';
}), define("text!html/dialogAutoSyncGdrive.html", [], function() {
return '<div class="modal-dialog">\n\t<div class="modal-content">\n\n\t\t<div class="modal-header">\n\t\t\t<button type="button" class="close" data-dismiss="modal"\n\t\t\t\taria-hidden="true">&times;</button>\n\t\t\t<h2 class="modal-title">AutoSync to <%= providerName %></h2>\n\t\t</div>\n\t\t<div class="modal-body">\n\t\t\t<p>\n\t\t\t\t<b>AutoSync</b> feature automatically saves all documents to your <i\n\t\t\t\t\tclass="icon-provider-<%= providerId %>"></i>\n\t\t\t\t<b>Google Drive</b>\n\t\t\t\taccount and keep them synchronized.\n\t\t\t</p>\n\t\t\t<div class="form-horizontal">\n \t\t\t<div class="form-group">\n \t\t\t\t<div class="col-lg-3 control-label"></div>\n \t\t\t\t<div class="col-lg-8">\n\t\t\t\t\t\t<div class="radio">\n\t\t\t\t\t\t\t<label> <input type="radio"\n\t\t\t\t\t\t\t\tname="radio-autosync-<%= providerId %>-mode" value="off">\n\t\t\t\t\t\t\t\tDisabled\n\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class="radio">\n\t\t\t\t\t\t\t<label> <input type="radio"\n\t\t\t\t\t\t\t\tname="radio-autosync-<%= providerId %>-mode" value="new">\n\t\t\t\t\t\t\t\tNew documents (not current)\n\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class="radio">\n\t\t\t\t\t\t\t<label> <input type="radio"\n\t\t\t\t\t\t\t\tname="radio-autosync-<%= providerId %>-mode" value="all">\n\t\t\t\t\t\t\t\tEvery document not yet synchronized\n\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t</div>\n \t\t\t\t</div>\n \t\t\t</div>\n\t\t\t <br/>\n \t\t\t<div class="form-group">\n \t\t\t\t<label class="col-lg-3 control-label"\n \t\t\t\t\tfor="input-autosync-<%= providerId %>-parentid">Folder ID\n \t\t\t\t\t(optional)</label>\n \t\t\t\t<div class="col-lg-8">\n \t\t\t\t\t<div class="input-group">\n \t\t\t\t\t\t<input type="text" id="input-autosync-<%= providerId %>-parentid"\n \t\t\t\t\t\t\tplaceholder="FolderID" class="form-control">\n \t\t\t\t\t\t<div class="input-group-btn">\n \t\t\t\t\t\t\t<a class="btn btn-link action-autosync-<%= providerId %>-choose-folder"\n \t\t\t\t\t\t\t\ttitle="Choose folder" data-dismiss="modal"><i\n \t\t\t\t\t\t\t\tclass="icon-folder-open"></i></a>\n \t\t\t\t\t\t</div>\n \t\t\t\t\t</div>\n \t\t\t\t\t<span class="help-block"> If no folder ID is supplied,\n \t\t\t\t\t\tfiles will be created in your root folder. </span>\n \t\t\t\t</div>\n \t\t\t</div>\n \t\t</div>\n\t\t\t<blockquote>\n\t\t\t\t<p><b>Note:</b> Removing a local document will not delete the linked file on Google\n\t\t\t\t\t\tDrive.</p>\n\t\t\t</blockquote>\n\t\t</div>\n\t\t<div class="modal-footer">\n\t\t\t<a href="#" class="btn btn-default" data-dismiss="modal">Cancel</a>\n\t\t\t<a href="#" data-dismiss="modal"\n\t\t\t\tclass="btn btn-primary action-autosync-<%= providerId %>">OK</a>\n\t\t</div>\n\t</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(t, e, n, i, r, o, a, s, l, c, u, d, p, h) {
return function(o, u, f) {
function m(t) {
return "sync." + o + "." + t;
}
function g(t, e, n, r, o) {
o = o || "{}";
var a = {};
return a.provider = y, a.id = t, a.etag = e, a.contentCRC = i.crc32(n), a.titleCRC = i.crc32(r),
a.discussionListCRC = i.crc32(o), a.syncIndex = m(t), !0 === x && (a.content = n,
a.title = r, a.discussionList = o), a;
}
function v(t, n) {
d.downloadMetadata(t, b, function(t, i) {
return t ? n && n(t) : void d.downloadContent(i, b, function(t, i) {
if (t) return n && n(t);
var r, o = [];
e.each(i, function(t) {
var e, n = y.parseContent(t.content);
if (t.isRealtime) l.onError("Real time synchronization is not supported anymore. Please use standard synchronization."); else {
var i = g(t.id, t.etag, n.content, t.title, n.discussionListJSON);
e = {}, e[i.syncIndex] = i;
}
r = c.createFile(t.title, n.content, n.discussionListJSON, e), 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(t) {
var e = d.getAuthorizationMgr(b).getAuthUser();
return [ "https://docs.google.com/file/d/", t.id, "/edit", e ? "?authuser=" + e : "" ].join("");
};
var x = "merge" == s.conflictMode;
return y.importFiles = function() {
d.picker(function(t, n) {
if (!t && 0 !== n.length) {
var i = [];
e.each(n, function(t) {
var e = m(t.id), n = c.getFileFromSyncIndex(e);
return void 0 !== n ? l.onError('"' + n.title + '" is already in your local documents.') : void i.push(t.id);
}), v(i);
}
}, "doc", b);
}, y.exportFile = function(t, e, 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, e, v, void 0, void 0, b, function(t, i) {
if (t) return s(t);
var o = g(i.id, i.etag, n, e, r);
s(void 0, o);
});
}, y.syncUp = function(t, e, n, i, r, o, a, s, u) {
if (s.contentCRC == e && 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(t, 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 = t,
s.title = n, s.discussionList = r), s.contentCRC = e, s.titleCRC = i, s.discussionListCRC = o,
u(void 0, !0), void 0);
});
}, y.syncDown = function(t) {
var n = parseInt(r[b + ".gdrive.lastChangeId"], 10);
d.checkChanges(n, b, function(n, o, a) {
if (n) return t(n);
var s = [];
e.each(o, function(t) {
var e = m(t.fileId), n = c.getFileFromSyncIndex(e), i = n && n.syncLocations[e];
if (i) {
if (t.fileDesc = n, t.syncAttributes = i, !0 === t.deleted) return void s.push(t);
i.etag != t.file.etag && s.push(t);
}
}), d.downloadContent(s, b, function(e, n) {
function o() {
if (0 === n.length) return r[b + ".gdrive.lastChangeId"] = a, t();
var e = n.pop(), s = e.fileDesc, c = e.syncAttributes;
if (!0 === e.deleted) return l.onError('"' + s.title + '" has been removed from ' + u + "."),
s.removeSyncLocation(c), l.onSyncRemoved(s, c);
var d = e.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 e ? void t(e) : void setTimeout(o, 5);
});
});
}, y.publish = function(t, e, n, i, r) {
var o = "markdown" != t.format ? "text/html" : void 0;
d.upload(t.id, void 0, t.fileName || n, i, o, void 0, b, function(e, n) {
return e ? void r(e) : (t.id = n.id, void r());
});
}, y.newPublishAttributes = function(t) {
var e = {};
if (e.id = i.getInputTextValue("#input-publish-" + o + "-fileid"), e.fileName = i.getInputTextValue("#input-publish-" + o + "-filename"),
!t.isPropagationStopped()) return e;
}, y.setAutosyncDialogConfig = function() {
var t = y.autosyncConfig;
i.setInputRadio("radio-autosync-" + o + "-mode", t.mode || "off"), i.setInputValue("#input-autosync-" + o + "-parentid", t.parentId);
}, y.getAutosyncDialogConfig = function() {
var t = {};
return t.mode = i.getInputRadio("radio-autosync-" + o + "-mode"), t.parentId = i.getInputTextValue("#input-autosync-" + o + "-parentid"),
t;
}, y.autosyncFile = function(t, e, n, i, r) {
var o = i.parentId;
d.upload(void 0, o, t, e, void 0, void 0, b, function(i, o) {
if (i) return void r(i);
var a = g(o.id, o.etag, e, t, n);
r(void 0, a);
});
}, y.isPublishEnabled = s.gdriveMultiAccount > f, l.addListener("onReady", function() {
t(".submenu-sync-" + o).toggle(s.gdriveMultiAccount > f);
var a = document.querySelector(".modal-upload-" + o);
a && (a.innerHTML = e.template(p, {
providerId: o,
providerName: u
}));
var y = document.querySelector(".modal-autosync-" + o);
if (y && (y.innerHTML = e.template(h, {
providerId: o,
providerName: u
})), t(".action-export-" + o + "-choose-folder").click(function() {
d.picker(function(e, n) {
e || 0 === n.length || (t(".modal-upload-" + o).modal(), i.setInputValue("#input-sync-export-" + o + "-parentid", n[0].id));
}, "folder", b);
}), t(".action-autosync-" + o + "-choose-folder").click(function() {
d.picker(function(e, n) {
e || 0 === n.length || (t(".modal-autosync-" + o).modal(), i.setInputValue("#input-autosync-" + o + "-parentid", n[0].id));
}, "folder", b);
}), t(".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")) : t(".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(t, e) {
if (!t) {
var n = g(e.id, e.etag, e.content, e.title), i = {};
i[n.syncIndex] = n;
var r = c.createFile(e.title, e.content, void 0, i);
c.selectFile(r), l.onMessage('"' + e.title + '" created successfully on ' + u + ".");
}
})); else if ("open" == x.action) {
var S = [];
e.each(x.ids, function(t) {
var e = m(t), n = c.getFileFromSyncIndex(e);
void 0 !== n ? n !== c.currentFile && c.selectFile(n) : S.push(t);
}), v(S, i.lockUI());
}
}
}
}), y;
};
}), define("providers/gdriveProvider", [ "providers/gdriveProviderBuilder" ], function(t) {
return t("gdrive", "Google Drive", 0);
}), define("providers/gdrivesecProvider", [ "providers/gdriveProviderBuilder" ], function(t) {
return t("gdrivesec", "Google Drive (2nd account)", 1);
}), define("providers/gdriveterProvider", [ "providers/gdriveProviderBuilder" ], function(t) {
return t("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(t, e, n, i, r, o, a, s) {
function l(t) {
function i() {
function o() {
if (0 === s.length) return i();
var e = s.pop();
e.provider.syncUp(c, u, d, p, h, f, m, e, function(i, r) {
return !0 === r && (g = !0), i ? t(i) : (r && n.storeAttributes(e), void o());
});
}
if (0 === r.length) return l(t);
var a = r.pop(), s = e.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 = e.values(o), i()) : t();
}
function c(t) {
function n() {
if (0 === i.length) return t();
var e = i.pop();
return f.hasSync(e) ? void e.syncDown(function(e) {
return e ? t(e) : void n();
}) : n();
}
var i = e.values(m);
n();
}
function u(t) {
function n() {
function o() {
if (0 === s.length) return n();
var e = s.pop();
e.autosyncFile(a.title, a.content, a.discussionListJSON, e.autosyncConfig, function(e, n) {
return e ? t(e) : (a.addSyncLocation(n), r.onSyncExportSuccess(a, n), o(), void 0);
});
}
if (0 === i.length) return t();
var a = i.pop(), s = e.filter(m, function(t) {
return "all" == t.autosyncConfig.mode;
});
o();
}
var i = e.filter(o, function(t) {
return 0 === e.size(t.syncLocations);
});
n();
}
function d(t, i) {
n.resetModalInputs();
var r = n.retrieveIgnoreError(t.providerId + "." + i + "Preferences");
r && e.each(t[i + "PreferencesInputIds"], function(t) {
var o = r[t], a = n.setInputValue;
e.isBoolean(o) && (a = n.setInputChecked), a("#input-sync-" + i + "-" + t, o);
});
}
function p(e) {
d(e, "import"), t(".modal-download-" + e.providerId).modal();
}
function h(e) {
d(e, "export"), t(".modal-upload-" + e.providerId).modal();
}
var f = {}, m = e.chain(arguments).map(function(t) {
return t instanceof s && [ t.providerId, t ];
}).compact().object().value();
!function() {
var t = {};
e.each(o, function(t) {
n.retrieveIndexArray(t.fileIndex + ".sync").forEach(function(e) {
try {
var o = JSON.parse(i[e]);
o.syncIndex = e;
var a = m[o.provider];
if (!a) throw new Error("Invalid provider ID: " + o.provider);
o.provider = a, t.syncLocations[e] = o, s[e] = o;
} catch (s) {
r.onError(s), n.removeIndexFromArray(t.fileIndex + ".sync", e);
}
});
}), Object.keys(i).forEach(function(e) {
var n = e.match(/sync\.\S+/);
n && !t.hasOwnProperty(n[0]) && i.removeItem(e);
});
}(), e.each(m, function(t) {
t.autosyncConfig = n.retrieveIgnoreError(t.providerId + ".autosyncConfig") || {};
}), f.hasSync = function(t) {
return e.some(o, function(n) {
return e.some(n.syncLocations, function(e) {
return void 0 === t || e.provider === t;
});
});
};
var g = !1, v = !1;
r.addListener("onOfflineChanged", function(t) {
v = t;
});
var b = !1;
return f.sync = function() {
function t(t) {
return void 0 !== t && (b = !1, r.onSyncRunning(!1), !0);
}
return !0 !== b && !0 !== v && (b = !0, r.onSyncRunning(!0), g = !0, u(function(e) {
t(e) || c(function(e) {
t(e) || l(function(e) {
t(e) || (b = !1, r.onSyncRunning(!1), r.onSyncSuccess());
});
});
}), !0);
}, r.addListener("onFileCreated", function(t) {
0 === e.size(t.syncLocations) && e.each(m, function(e) {
"new" == e.autosyncConfig.mode && e.autosyncFile(t.title, t.content, t.discussionListJSON, e.autosyncConfig, function(e, n) {
e || (t.addSyncLocation(n), r.onSyncExportSuccess(t, n));
});
});
}), r.addListener("onReady", function() {
e.each(m, function(o) {
t(".action-sync-import-" + o.providerId).click(function(t) {
o.importFiles(t);
var n = {};
e.each(o.importPreferencesInputIds, function(t) {
var e = document.getElementById("input-sync-import-" + t);
"checkbox" == e.type ? n[t] = e.checked : n[t] = e.value;
}), i[o.providerId + ".importPreferences"] = JSON.stringify(n);
}), t(".action-sync-import-dialog-" + o.providerId).click(function() {
p(o);
}), t(".action-sync-export-dialog-" + o.providerId).click(function() {
h(o);
}), t(".action-autosync-dialog-" + o.providerId).click(function() {
n.resetModalInputs(), o.setAutosyncDialogConfig(o), t(".modal-autosync-" + o.providerId).modal();
}), t(".action-sync-export-" + o.providerId).click(function(t) {
var n = a.currentFile;
o.exportFile(t, n.title, n.content, n.discussionListJSON, n.frontMatter, function(t, e) {
t || (n.addSyncLocation(e), r.onSyncExportSuccess(n, e));
});
var s = {};
e.each(o.exportPreferencesInputIds, function(t) {
var e = document.getElementById("input-sync-export-" + t);
"checkbox" == e.type ? s[t] = e.checked : s[t] = e.value;
}), i[o.providerId + ".exportPreferences"] = JSON.stringify(s);
}), t(".action-autosync-" + o.providerId).click(function(t) {
var e = o.getAutosyncDialogConfig(t);
void 0 !== e && (i[o.providerId + ".autosyncConfig"] = JSON.stringify(e), o.autosyncConfig = e);
});
});
}), r.onSynchronizerCreated(f), f;
}), define("providers/bloggerProvider", [ "underscore", "utils", "classes/Provider", "helpers/googleHelper" ], function(t, e, n, i) {
var r = new n("blogger", "Blogger");
return r.defaultPublishFormat = "html", r.publishPreferencesInputIds = [ "blogger-url" ],
r.getPublishLocationLink = function(t) {
return [ "https://www.blogger.com/blogger.g?blogID=", t.blogId, "#editor/target=post;postID=", t.postId ].join("");
}, r.publish = function(e, n, r, o, a) {
var s = e.labelList || [];
n && void 0 !== n.tags && (s = n.tags), t.isString(s) && (s = t.compact(s.split(/[\s,]/)));
var l = n && !1 === n.published, c = n && n.date;
i.uploadBlogger(e.blogUrl, e.blogId, e.postId, s, l, c, r, o, function(t, n, i) {
return t ? void a(t) : (e.blogId = n, e.postId = i, a(), void 0);
});
}, r.newPublishAttributes = function(t) {
var n = {}, i = e.getInputTextValue("#input-publish-blogger-url", t);
if (void 0 !== i && (n.blogUrl = e.checkUrl(i)), n.postId = e.getInputTextValue("#input-publish-postid"),
!t.isPropagationStopped()) return n;
}, r;
}), define("providers/bloggerPageProvider", [ "underscore", "utils", "classes/Provider", "helpers/googleHelper" ], function(t, e, n, i) {
var r = new n("bloggerpage", "Blogger Page");
return r.defaultPublishFormat = "html", r.publishPreferencesInputIds = [ "blogger-url" ],
r.getPublishLocationLink = function(t) {
return [ "https://www.blogger.com/blogger.g?blogID=", t.blogId, "#editor/target=page;pageID=", t.pageId ].join("");
}, r.publish = function(t, e, n, r, o) {
var a = e && !1 === e.published, s = e && e.date;
i.uploadBloggerPage(t.blogUrl, t.blogId, t.pageId, a, s, n, r, function(e, n, i) {
return e ? void o(e) : (t.blogId = n, t.pageId = i, o(), void 0);
});
}, r.newPublishAttributes = function(t) {
var n = {}, i = e.getInputTextValue("#input-publish-blogger-url", t);
if (void 0 !== i && (n.blogUrl = e.checkUrl(i)), n.pageId = e.getInputTextValue("#input-publish-pageid"),
!t.isPropagationStopped()) return n;
}, r;
}), define("helpers/githubHelper", [ "jquery", "constants", "core", "utils", "storage", "logger", "settings", "eventMgr", "classes/AsyncTask" ], function(t, e, 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 t.ajax({
url: "libs/github.js",
dataType: "script",
timeout: e.AJAX_TIMEOUT
}).done(function() {
p = !0, n.chain();
}).fail(function(t) {
d({
error: t.status,
message: t.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 t = a.githubFullAccess ? "repo,gist" : "public_repo,gist";
o = i.popupWindow("html/github-oauth-client.html?client_id=" + e.GITHUB_CLIENT_ID + "&scope=" + t, "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() {
t.getJSON(e.GATEKEEPER_URL + "authenticate/" + f, function(t) {
void 0 !== t.token ? (d = t.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 = e.ASYNC_TASK_LONG_TIMEOUT;
var f;
n.chain(l);
}), n.onError(function() {
void 0 !== s && clearInterval(s), void 0 !== o && o.close();
});
}
function d(t, e) {
var i;
if (t) if (o.error(t), "string" == typeof t) i = t; else {
if (i = "Could not publish on GitHub.", 401 === t.error || 403 === t.error) return h = void 0,
r.removeItem("githubToken"), i = "Access to GitHub account is not authorized.",
void e.retry(new Error(i), 1);
t.error <= 0 && (p = !1, h = void 0, n.setOffline(), i = "|stopPublish");
}
e.error(new Error(i));
}
var p, h, f = {}, m = !1;
return s.addListener("onOfflineChanged", function(t) {
m = t;
}), f.upload = function(t, e, n, i, r, o, a) {
var s = new l();
c(s), u(s), s.onRun(function() {
function a() {
h.getUser().show(void 0, function(t, n) {
return t ? void d(t, s) : (e = n.login, void s.chain(l));
});
}
function l() {
h.getRepo(e, t).write(n, i, r, o, function(t) {
return t ? void d(t, s) : void s.chain();
});
}
e ? s.chain(l) : s.chain(a);
}), s.onSuccess(function() {
a(void 0, e);
}), s.onError(function(t) {
a(t);
}), s.enqueue();
}, f.uploadGist = function(t, e, n, i, r, o) {
var a = new l();
c(a), u(a), a.onRun(function() {
var o = h.getGist(t), s = {};
s[e] = {
content: r
};
var l = o.update;
void 0 === t && (l = o.create), l({
description: i,
"public": n,
files: s
}, function(e, n) {
return e ? (404 === e.error && void 0 !== t && (e = "Gist " + t + " not found on GitHub.|removePublish"),
void d(e, a)) : (t = n.id, void a.chain());
});
}), a.onSuccess(function() {
o(void 0, t);
}), a.onError(function(t) {
o(t);
}), a.enqueue();
}, f.downloadGist = function(t, e, n) {
var i = new l((!0));
c(i);
var r, o;
i.onRun(function() {
new Github({}).getGist(t).read(function(n, a) {
if (n) return void i.error(new Error("Error trying to access Gist " + t + "."));
r = a.description;
var s = a.files[e];
return void 0 === s ? void i.error(new Error("Gist " + t + ' does not contain "' + e + '".')) : (o = s.content,
void i.chain());
});
}), i.onSuccess(function() {
n(void 0, r, o);
}), i.onError(function(t) {
n(t);
}), i.enqueue();
}, f;
}), define("providers/gistProvider", [ "utils", "classes/Provider", "helpers/githubHelper" ], function(t, e, n) {
var i = new e("gist", "Gist");
return i.publishPreferencesInputIds = [ "gist-public" ], i.viewerSharingAttributes = [ "gistId", "filename" ],
i.getPublishLocationLink = function(t) {
return [ "https://gist.github.com/", t.gistId ].join("");
}, i.publish = function(t, e, i, r, o) {
n.uploadGist(t.gistId, t.filename, t.isPublic, i, r, function(e, n) {
return e ? void o(e) : (t.gistId = n, void o());
});
}, i.newPublishAttributes = function(e) {
var n = {};
if (n.gistId = t.getInputTextValue("#input-publish-gist-id"), n.filename = t.getInputTextValue("#input-publish-filename", e),
n.isPublic = t.getInputChecked("#input-publish-gist-public"), !e.isPropagationStopped()) return n;
}, i.importPublic = function(t, e) {
n.downloadGist(t.gistId, t.filename, e);
}, i;
}), define("providers/githubProvider", [ "utils", "classes/Provider", "settings", "helpers/githubHelper" ], function(t, e, n, i) {
var r = new e("github", "GitHub");
return r.publishPreferencesInputIds = [ "github-repo", "github-branch" ], r.getPublishLocationLink = function(t) {
return [ "https://github.com", t.username, t.repository, "blob", t.branch ].concat(t.path.split("/").map(encodeURIComponent)).join("/");
}, r.publish = function(t, e, r, o, a) {
var s = n.commitMsg;
i.upload(t.repository, t.username, t.branch, t.path, o, s, function(e, n) {
t.username = n, a(e);
});
}, r.newPublishAttributes = function(e) {
var n = {};
if (n.repository = t.getInputTextValue("#input-publish-github-repo", e), n.branch = t.getInputTextValue("#input-publish-github-branch", e),
n.path = t.getInputTextValue("#input-publish-file-path", e), !e.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(t, e, n, i, r, o, a) {
function s(t) {
t.onRun(function() {
return !0 === u ? t.error(new Error("Operation not available in offline mode.|stopPublish")) : void t.chain();
});
}
function l(t, e) {
var r;
t && (i.error(t), "string" == typeof t ? r = "SSH error: " + t + "." : (r = "Could not publish on SSH server.",
t.code <= 0 && (n.setOffline(), r = "|stopPublish"))), e.error(new Error(r));
}
var c = {}, u = !1;
return r.addListener("onOfflineChanged", function(t) {
u = t;
}), c.upload = function(n, i, r, o, c, u, d, p) {
var h = new a();
s(h), h.onRun(function() {
var a = e.SSH_PUBLISH_URL + "?" + t.param({
host: n,
port: i,
username: r,
password: o,
path: c,
title: u
});
t.ajax({
url: a,
data: d,
type: "POST",
timeout: e.AJAX_TIMEOUT
}).done(function(t) {
return void 0 === t.error ? h.chain() : void l(t.error, h);
}).fail(function(t) {
l({
code: t.status,
message: t.statusText
}, h);
});
}), h.onSuccess(function() {
p();
}), h.onError(function(t) {
p(t);
}), h.enqueue();
}, c;
}), define("providers/sshProvider", [ "utils", "classes/Provider", "helpers/sshHelper" ], function(t, e, n) {
var i = new e("ssh", "SSH server");
return i.publishPreferencesInputIds = [ "ssh-host", "ssh-port", "ssh-username", "ssh-password" ],
i.publish = function(t, e, i, r, o) {
n.upload(t.host, t.port, t.username, t.password, t.path, i, r, o);
}, i.newPublishAttributes = function(e) {
var n = {};
if (n.host = t.getInputTextValue("#input-publish-ssh-host", 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.port = t.getInputIntValue("#input-publish-ssh-port", void 0, 0), n.username = t.getInputTextValue("#input-publish-ssh-username", e),
n.password = t.getInputTextValue("#input-publish-ssh-password", e), n.path = t.getInputTextValue("#input-publish-file-path", e),
!e.isPropagationStopped()) return n;
}, i;
}), define("helpers/tumblrHelper", [ "jquery", "constants", "core", "utils", "storage", "logger", "eventMgr", "classes/AsyncTask" ], function(t, e, n, i, r, o, a, s) {
function l(t) {
t.onRun(function() {
return !0 === h ? void t.error(new Error("Operation not available in offline mode.|stopPublish")) : void t.chain();
});
}
function c(n) {
var o, a;
n.onRun(function() {
function s() {
t.getJSON(e.TUMBLR_PROXY_URL + "request_token", function(t) {
void 0 !== t.oauth_token ? (f = t, 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() {
t.getJSON(e.TUMBLR_PROXY_URL + "access_token", f, function(t) {
void 0 !== t.access_token && void 0 !== t.access_token_secret ? (r.tumblrOauthParams = JSON.stringify(t),
d = t, 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 = e.ASYNC_TASK_LONG_TIMEOUT;
var f;
n.chain(s);
}), n.onError(function() {
void 0 !== a && clearInterval(a), void 0 !== o && o.close();
});
}
function u(t, e) {
var i;
if (t) if (o.error(t), "string" == typeof t) i = t; else {
if (i = "Could not publish on Tumblr.", 401 === t.code || 403 === t.code) return d = void 0,
r.removeItem("tumblrOauthParams"), i = "Access to Tumblr account is not authorized.",
void e.retry(new Error(i), 1);
t.code <= 0 && (n.setOffline(), i = "|stopPublish");
}
e.error(new Error(i));
}
var d, p = {}, h = !1;
return a.addListener("onOfflineChanged", function(t) {
h = t;
}), 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 = t.extend({
blog_hostname: n,
post_id: i,
tags: r,
format: o,
state: a,
date: p,
title: h,
content: f
}, d);
t.ajax({
url: e.TUMBLR_PROXY_URL + "post",
data: s,
type: "POST",
dataType: "json",
timeout: e.AJAX_TIMEOUT
}).done(function(t) {
i = t.id, g.chain();
}).fail(function(t) {
var e = {
code: t.status,
message: t.statusText
};
404 === e.code && void 0 !== i && (e = "Post " + i + " not found on Tumblr.|removePublish"),
u(e, g);
});
}), g.onSuccess(function() {
m(void 0, i);
}), g.onError(function(t) {
m(t);
}), g.enqueue();
}, p;
}), define("providers/tumblrProvider", [ "underscore", "settings", "utils", "classes/Provider", "helpers/tumblrHelper" ], function(t, e, n, i, r) {
var o = new i("tumblr", "Tumblr");
return o.publishPreferencesInputIds = [ "tumblr-hostname" ], o.getPublishLocationLink = function(t) {
return [ "http://", t.blogHostname, "/post/", t.postId ].join("");
}, o.publish = function(n, i, o, a, s) {
var l = n.tags || [];
i && void 0 !== i.tags && (l = i.tags), t.isString(l) && (l = t.compact(l.split(/[\s,]/)));
var c = function() {
return "html" == n.format ? "html" : "template" == n.format && -1 !== (n.customTmpl || e.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(t, e) {
return t ? void s(t) : (n.postId = e, void s());
});
}, o.newPublishAttributes = function(t) {
var e = {};
if (e.blogHostname = n.getInputTextValue("#input-publish-tumblr-hostname", 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])$/),
e.postId = n.getInputTextValue("#input-publish-postid"), !t.isPropagationStopped()) return e;
}, o;
}), define("helpers/wordpressHelper", [ "jquery", "constants", "core", "utils", "storage", "logger", "eventMgr", "classes/AsyncTask" ], function(t, e, n, i, r, o, a, s) {
function l(t) {
t.onRun(function() {
return !0 === h ? t.error(new Error("Operation not available in offline mode.|stopPublish")) : void t.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=" + e.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() {
t.getJSON(e.WORDPRESS_PROXY_URL + "authenticate/" + p, function(t) {
void 0 !== t.token ? (d = t.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 = e.ASYNC_TASK_LONG_TIMEOUT;
var p;
n.chain(s);
}), n.onError(function() {
void 0 !== a && clearInterval(a), void 0 !== o && o.close();
});
}
function u(t, e) {
var i;
if (t) if (o.error(t), "string" == typeof t) i = t; else {
if (i = "Could not publish on WordPress.", 400 === t.code && "invalid_token" == t.message || 401 === t.code || 403 === t.code) return r.removeItem("wordpressToken"),
i = "Access to WordPress account is not authorized.", e.retry(new Error(i), 1);
t.code <= 0 && (n.setOffline(), i = "|stopPublish");
}
e.error(new Error(i));
}
var d, p = {}, h = !1;
return a.addListener("onOfflineChanged", function(t) {
h = t;
}), 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 = e.WORDPRESS_PROXY_URL + "post", l = {
token: d,
site: n,
postId: i,
tags: r,
status: o,
date: a,
title: p,
content: h
};
t.ajax({
url: s,
data: l,
type: "POST",
dataType: "json",
timeout: e.AJAX_TIMEOUT
}).done(function(t) {
if (t.body.ID) return i = t.body.ID, g = t.body.site_ID, m.chain();
var e = {
code: t.code,
message: t.body.error
};
404 === e.code && ("unknown_blog" == e.message ? e = 'Site "' + n + '" not found on WordPress.|removePublish' : "unknown_post" == e.message && (e = "Post " + i + " not found on WordPress.|removePublish")),
u(e, m);
}).fail(function(t) {
u({
code: t.status,
message: t.statusText
}, m);
});
}), m.onSuccess(function() {
f(void 0, g, i);
}), m.onError(function(t) {
f(t);
}), m.enqueue();
}, p;
}), define("providers/wordpressProvider", [ "underscore", "utils", "classes/Provider", "helpers/wordpressHelper" ], function(t, e, n, i) {
var r = new n("wordpress", "WordPress");
return r.defaultPublishFormat = "html", r.publishPreferencesInputIds = [ "wordpress-site" ],
r.getPublishLocationLink = function(t) {
return t.siteId && [ "https://wordpress.com/post", t.siteId, t.postId ].join("/");
}, r.publish = function(e, n, r, o, a) {
var s = e.tags || [];
n && void 0 !== n.tags && (s = n.tags);
var l = n && !1 === n.published ? "draft" : "publish", c = n && n.date;
t.isString(s) && (s = t.compact(s.split(/[\s,]/))), i.upload(e.site, e.postId, s.join(","), l, c, r, o, function(t, n, i) {
return t ? a(t) : (e.siteId = n, e.postId = i, a(), void 0);
});
}, r.newPublishAttributes = function(t) {
var n = {};
if (n.site = e.getInputTextValue("#input-publish-wordpress-site", 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.postId = e.getInputTextValue("#input-publish-postid"), !t.isPropagationStopped()) return 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(t, e, n, i, r, o, a, s, l, c, u, d) {
function p(t, e, n) {
return void 0 === e.format && (e.format = i.getInputRadio("radio-publish-format"),
"template" == e.format && i.getInputChecked("#checkbox-publish-custom-template") && (e.customTmpl = i.getInputValue("#textarea-publish-custom-template"))),
"markdown" == e.format ? t.content : "html" == e.format ? n.withoutComments : v.applyTemplate(t, e, n);
}
function h(t, e) {
if (0 === S.length) return void t(e);
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 t(i);
}
h(t, e || i);
});
}
function f(t, n) {
var o;
do o = "publish." + i.id(); while (e.has(r, o));
n.publishIndex = o, t.addPublishLocation(n), a.onNewPublishSuccess(t, n);
}
function m(n) {
var r = n.defaultPublishFormat || "markdown";
k = n, t(".publish-provider-name").text(n.providerName), t('.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 && (e.each(n.publishPreferencesInputIds, function(t) {
var n = a[t];
e.isBoolean(n) ? i.setInputChecked("#input-publish-" + t, n) : i.setInputValue("#input-publish-" + t, 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)),
t(".modal-publish").modal();
}
function g(t) {
var n = k, i = n.newPublishAttributes(t);
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(t) {
void 0 === t && (i.provider = n, f(o, i));
});
var c = {};
e.each(n.publishPreferencesInputIds, function(t) {
var e = document.getElementById("input-publish-" + t);
"checkbox" == e.type ? c[t] = e.checked : c[t] = e.value;
}), c.format = i.format, c.customTmpl = i.customTmpl, r[n.providerId + ".publishPreferences"] = JSON.stringify(c);
}
}
var v = {}, b = e.chain(arguments).map(function(t) {
return t instanceof u && !0 === t.isPublishEnabled && [ t.providerId, t ];
}).compact().object().value();
!function() {
var t = {};
e.each(s, function(t) {
i.retrieveIndexArray(t.fileIndex + ".publish").forEach(function(e) {
try {
var n = JSON.parse(r[e]);
n.publishIndex = e;
var o = b[n.provider];
if (!o) throw new Error("Invalid provider ID: " + n.provider);
n.provider = o, t.publishLocations[e] = n, s[e] = n;
} catch (s) {
a.onError(s), i.removeIndexFromArray(t.fileIndex + ".publish", e);
}
});
}), Object.keys(r).forEach(function(e) {
var n = e.match(/publish\.\S+/);
n && !t.hasOwnProperty(n[0]) && r.removeItem(e);
});
}(), v.applyTemplate = function(t, n, i) {
try {
var r = n && n.customTmpl || o.template;
return e.template(r, {
documentTitle: t.title,
documentMarkdown: t.content,
strippedDocumentMarkdown: t.content.substring(t.frontMatter ? t.frontMatter._frontMatter.length : 0),
documentHTML: i.withoutComments,
documentHTMLWithFrontMatter: (t.frontMatter ? t.frontMatter._frontMatter : "") + i.withoutComments,
documentHTMLWithComments: i.withComments,
frontMatter: t.frontMatter,
publishAttributes: n
});
} catch (t) {
return a.onError(t), t.message;
}
};
var y, x, w, S = [];
a.addListener("onPreviewFinished", function(t, e) {
w = {
withComments: t,
withoutComments: e
};
});
var C = !1;
a.addListener("onOfflineChanged", function(t) {
C = t;
});
var _ = !1;
v.publish = function() {
!0 !== _ && !0 !== C && (_ = !0, a.onPublishRunning(!0), y = l.currentFile, x = w,
S = e.values(y.publishLocations), h(function(t) {
_ = !1, a.onPublishRunning(!1), void 0 === t && 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 = e.reduce(b, function(t, n) {
return t + e.template(E, {
provider: n
});
}, "");
r.innerHTML = s, e.each(b, function(e) {
t(r.querySelector(".action-init-publish-" + e.providerId)).click(function() {
m(e);
}), t(".action-publish-" + e.providerId).click(function() {
m(e);
});
});
}
t(".action-process-publish").click(g);
var u = t(".publish-custom-template-collapse").collapse({
toggle: !1
}), p = t("#textarea-publish-custom-template"), h = e.debounce(function() {
u.collapse("template" == i.getInputRadio("radio-publish-format") ? "show" : "hide");
}, 100);
t("#checkbox-publish-custom-template").change(function() {
p.prop("disabled", !this.checked);
}), t("input:radio[name=radio-publish-format]").change(function() {
h();
}), t(".modal-publish").on("hidden.bs.modal", function() {
u.collapse("hide");
}), t(".action-download-md").click(function() {
var t = l.currentFile.content, e = l.currentFile.title;
i.saveAs(t, e + ".md");
}), t(".action-download-html").click(function() {
var t = l.currentFile.title;
i.saveAs(w.withoutComments, t + ".html");
}), t(".action-download-template").click(function() {
var t = l.currentFile, e = v.applyTemplate(t, void 0, w);
i.saveAs(e, t.title + (-1 === o.template.indexOf("documentHTML") ? ".md" : ".html"));
});
var f = new c({
applicationID: "ESTHdCYOi18iLhhO"
});
t(".action-download-pdf").click(function() {
var e, 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(t, e) {
r = e, u.chain();
}) : (t(".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 + "?" + t.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 ? e = this.response : a.onError("Error when trying to generate PDF: " + this.statusText),
u.chain());
}, i.send(c);
}), u.onSuccess(function() {
e && i.saveAs(e, l.currentFile.title + ".pdf");
}), u.enqueue();
});
}), a.onPublisherCreated(v), v;
}), define("providers/downloadProvider", [ "jquery", "constants", "eventMgr", "utils", "fileMgr", "classes/Provider", "classes/AsyncTask" ], function(t, e, 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 t.ajax({
url: e.DOWNLOAD_IMPORT_URL + "?" + t.param({
url: i
}),
dataType: "text",
timeout: e.AJAX_TIMEOUT
}).done(function(t) {
o = t, s.chain();
}).fail(function() {
s.error(new Error("Unable to access URL " + i));
}));
}), s.onSuccess(function() {
i(void 0, r, o);
}), s.onError(function(t) {
i(t);
}), s.enqueue();
}, n.addListener("onReady", function() {
t(".action-import-url").click(function(t) {
var e = i.getInputTextValue("#input-import-url", t);
e && s.importPublic({
url: e
}, function(t, e, n) {
if (!t) {
var i = r.createFile(e, n);
r.selectFile(i);
}
});
});
}), s;
}), define("sharing", [ "jquery", "underscore", "constants", "utils", "eventMgr", "fileMgr", "classes/AsyncTask", "classes/Provider", "providers/couchdbProvider", "providers/downloadProvider", "providers/gistProvider" ], function(t, e, n, i, r, o, a, s) {
var l = {}, c = e.chain(arguments).map(function(t) {
return t instanceof s && [ t.providerId, t ];
}).compact().object().value(), u = !1;
return r.addListener("onOfflineChanged", function(t) {
u = t;
}), l.getEditorParams = function(t) {
var n = t.provider, i = {
provider: n.providerId
};
if (n.editorSharingAttributes) return e.each(n.editorSharingAttributes, function(e) {
i[e] = t[e];
}), i;
}, l.getViewerParams = function(t) {
var n = t.provider;
if ("markdown" == t.format) {
var i = {
provider: n.providerId
};
if (n.viewerSharingAttributes) return e.each(n.viewerSharingAttributes, function(e) {
i[e] = t[e];
}), i;
}
}, r.addListener("onReady", function() {
var t, n, r = i.getURLParameter("provider");
if (window.viewerMode) {
if (void 0 === r && (r = "download"), void 0 === (n = c[r])) return;
if (t = {}, e.some(n.viewerSharingAttributes, function(e) {
var n = i.getURLParameter(e);
return n ? void (t[e] = n) : 1;
})) return;
n.importPublic(t, i.lockUI(function(t, e, n) {
if (!t) {
var i = o.createFile(e, n, void 0, void 0, !0);
o.selectFile(i);
}
}));
} else if (r) {
if (void 0 === (n = c[r])) return;
if (t = {}, e.some(n.editorSharingAttributes, function(e) {
var n = i.getURLParameter(e);
return n ? void (t[e] = n) : 1;
})) return;
n.importPrivate(t, i.lockUI());
}
}), r.onSharingCreated(l), l;
}), define("providers/gplusProvider", [ "jquery", "underscore", "utils", "storage", "classes/Provider", "eventMgr", "helpers/googleHelper" ], function(t, e, n, i, r, o, a) {
function s(t, n) {
var i;
return e.find(t.thumbnails, function(t) {
var e = !1;
return t.url.replace(/^(.*[\/=]s)\d.*?(\/[^\/]+)?$/, function(t, r, o) {
i = r + n + (o || ""), e = !0;
}), e;
}), i;
}
function l() {
return c.thumbnails ? (n.resetModalInputs(), t(".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),
t(".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(t) {
u = t, a.picker(function(e, n) {
return e || 0 === n.length ? void t(e) : (c = n[0], void l());
}, "img");
}, d.uploadImage = function(e, n, i) {
u = i, a.uploadImg(e, n, "default", function(n, r) {
return n || !r ? void i(n) : (c = {
name: e,
thumbnails: []
}, t(r).find("thumbnail").each(function() {
c.thumbnails.push({
url: t(this).attr("url")
});
}), l(), void 0);
});
}, o.addListener("onReady", function() {
t(".action-import-image").click(function() {
var t = n.getInputIntValue("#input-import-image-size", void 0, 0) || 0, e = n.getInputTextValue("#input-import-image-title"), r = s(c, t);
e && (r += ' "' + e + '"'), u(void 0, r), p = {}, t && (p.size = t), i["gplus.importImagePreferences"] = JSON.stringify(p);
});
}), d;
}), define("mediaImporter", [ "jquery", "underscore", "constants", "classes/Provider", "core", "eventMgr", "providers/gplusProvider" ], function(t, e, n, i, r, o) {
var a = {}, s = e.chain(arguments).map(function(t) {
return t instanceof i && [ t.providerId, t ];
}).compact().object().value();
return o.addListener("onReady", function() {
function i(i) {
var o = (i.dataTransfer || i.target).files, a = e.first(o);
if (a.name.match(/.(jpe?g|png|gif)$/i)) {
i.stopPropagation(), i.preventDefault();
var l = new FileReader();
l.onload = function(e) {
return function(n) {
var i = new Uint8Array(n.target.result);
s.gplus.uploadImage(e.name, i, function(e, n) {
if (!e) {
r.catchModal = !0, t("#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(t) {
t.stopPropagation(), t.preventDefault(), t.dataTransfer.dropEffect = "copy";
}
e.each(s, function(e) {
t(".action-import-image-" + e.providerId).click(function() {
var t = r.insertLinkCallback;
r.insertLinkCallback = void 0, e.importImage(function(e, n) {
return e ? void t(null) : void t(n || null);
});
});
}), !window.viewerMode && function(t) {
t.addEventListener("dragover", o, !1), t.addEventListener("drop", i, !1);
}(document.querySelector(".layout-wrapper-l3"));
}), a;
}), define("css/css", [], function() {
if ("undefined" == typeof window) return {
load: function(t, e, n) {
n();
}
};
var t = document.getElementsByTagName("head")[0], e = window.navigator.userAgent.match(/Trident\/([^ ;]*)|AppleWebKit\/([^ ;]*)|Opera\/([^ ;]*)|rv\:([^ ;]*)(.*?)Gecko\/([^ ;]*)|MSIE\s([^ ;]*)/) || 0, n = !1, i = !0;
e[1] || e[7] ? n = parseInt(e[1]) < 6 || parseInt(e[7]) <= 9 : e[2] ? i = !1 : e[4] && (n = parseInt(e[4]) < 18);
var r = {};
r.pluginBuilder = "./css-builder";
var o, a, s, l = function() {
o = document.createElement("style"), t.appendChild(o), a = o.styleSheet || o.sheet;
}, c = 0, u = [], d = function(t) {
c++, 32 == c && (l(), c = 0), a.addImport(t), o.onload = function() {
p();
};
}, p = function() {
s();
var t = u.shift();
return t ? (s = t[1], void d(t[0])) : void (s = null);
}, h = function(t, e) {
if (a && a.addImport || l(), a && a.addImport) s ? u.push([ t, e ]) : (d(t), s = e); else {
o.textContent = '@import "' + t + '";';
var n = setInterval(function() {
try {
o.sheet.cssRules, clearInterval(n), e();
} catch (t) {}
}, 10);
}
}, f = function(e, 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 t = 0; t < document.styleSheets.length; t++) if (document.styleSheets[t].href == r.href) return clearInterval(o),
n();
}, 10);
r.href = e, t.appendChild(r);
};
return r.normalize = function(t, e) {
return ".css" == t.substr(t.length - 4, 4) && (t = t.substr(0, t.length - 4)), e(t);
}, r.load = function(t, e, i, r) {
(n ? h : f)(e.toUrl(t + ".css"), i);
}, r;
}), define("css", [ "css/css" ], function(t) {
return t;
}), rangy.createModule("CssClassApplier", function(t, e) {
function n(t) {
return t.replace(/^\s\s*/, "").replace(/\s\s*$/, "");
}
function i(t, e) {
return t.className && new RegExp("(?:^|\\s)" + e + "(?:\\s|$)").test(t.className);
}
function r(t, e) {
t.className ? i(t, e) || (t.className += " " + e) : t.className = e;
}
function o(t) {
return t.split(/\s+/).sort().join(" ");
}
function a(t) {
return o(t.className);
}
function s(t, e) {
return a(t) == a(e);
}
function l(t) {
for (var e = t.parentNode; t.hasChildNodes(); ) e.insertBefore(t.firstChild, t);
e.removeChild(t);
}
function c(t, e) {
var n = t.cloneRange();
n.selectNodeContents(e);
var i = n.intersection(t), r = i ? i.toString() : "";
return n.detach(), "" != r;
}
function u(t) {
return t.getNodes([ 3 ], function(e) {
return c(t, e);
});
}
function d(t, e) {
if (t.attributes.length != e.attributes.length) return !1;
for (var n, i, r, o = 0, a = t.attributes.length; o < a; ++o) if (n = t.attributes[o],
"class" != (r = n.name)) {
if (i = e.attributes.getNamedItem(r), n.specified != i.specified) return !1;
if (n.specified && n.nodeValue !== i.nodeValue) return !1;
}
return !0;
}
function p(t, e) {
for (var n, i = 0, r = t.attributes.length; i < r; ++i) if (n = t.attributes[i].name,
(!e || !E.arrayContains(e, n)) && t.attributes[i].specified && "class" != n) return !0;
return !1;
}
function h(t, e) {
for (var n in e) if (e.hasOwnProperty(n) && t[n] !== e[n]) return !1;
return !0;
}
function f(t) {
var e;
return t && 1 == t.nodeType && ((e = t.parentNode) && 9 == e.nodeType && "on" == e.designMode || I(t) && !I(t.parentNode));
}
function m(t) {
return (I(t) || 1 != t.nodeType && I(t.parentNode)) && !f(t);
}
function g(t) {
return t && 1 == t.nodeType && !D.test(k(t, "display"));
}
function v(t) {
if (0 == t.data.length) return !0;
if (N.test(t.data)) return !1;
switch (k(t.parentNode, "whiteSpace")) {
case "pre":
case "pre-wrap":
case "-moz-pre-wrap":
return !1;
case "pre-line":
if (/[\r\n]/.test(t.data)) return !1;
}
return g(t.previousSibling) || g(t.nextSibling);
}
function b(t, e) {
return E.isCharacterDataNode(t) ? 0 == e ? !!t.previousSibling : e != t.length || !!t.nextSibling : e > 0 && e < t.childNodes.length;
}
function y(t, n, i, r) {
var o, a = 0 == i;
if (E.isAncestorOf(n, t)) return t;
if (E.isCharacterDataNode(n)) if (0 == i) i = E.getNodeIndex(n), n = n.parentNode; else {
if (i != n.length) throw e.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 == t ? o : y(t, o.parentNode, E.getNodeIndex(o), r);
}
if (t != n) {
o = n.parentNode;
var l = E.getNodeIndex(n);
return a || l++, y(t, o, l, r);
}
return t;
}
function x(t, e) {
return t.tagName == e.tagName && s(t, e) && d(t, e);
}
function w(t) {
var e = t ? "nextSibling" : "previousSibling";
return function(n, i) {
var r = n.parentNode, o = n[e];
if (o) {
if (o && 3 == o.nodeType) return o;
} else if (i && (o = r[e]) && 1 == o.nodeType && x(r, o)) return o[t ? "firstChild" : "lastChild"];
return null;
};
}
function S(t) {
this.isElementMerge = 1 == t.nodeType, this.firstTextNode = this.isElementMerge ? t.lastChild : t,
this.textNodes = [ this.firstTextNode ];
}
function C(t, e, i) {
this.cssClass = t;
var r, a, s, l, c = null;
if ("object" == typeof e && null !== e) {
for (i = e.tagNames, c = e.elementProperties, a = 0; l = A[a++]; ) e.hasOwnProperty(l) && (this[l] = e[l]);
r = e.normalize;
} else r = e;
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 + " " + t) : t,
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; a < s; ++a) "*" == i[a] ? this.applyToAnyTagName = !0 : this.tagNames.push(i[a].toLowerCase()); else this.tagNames = [ this.elementTagName ];
}
function _(t, e, n) {
return new C(t, e, n);
}
t.requireModules([ "WrappedSelection", "WrappedRange" ]);
var k, E = t.dom, T = function() {
function t(t, e, n) {
return e && n ? " " : "";
}
return function(e, n) {
e.className && (e.className = e.className.replace(new RegExp("(?:^|\\s)" + n + "(?:\\s|$)"), t));
};
}();
void 0 !== window.getComputedStyle ? k = function(t, e) {
return E.getWindow(t).getComputedStyle(t, null)[e];
} : void 0 !== document.documentElement.currentStyle ? k = function(t, e) {
return t.currentStyle[e];
} : e.fail("No means of obtaining computed style properties found");
var I;
!function() {
var t = document.createElement("div");
I = "boolean" == typeof t.isContentEditable ? function(t) {
return t && 1 == t.nodeType && t.isContentEditable;
} : function(t) {
return !(!t || 1 != t.nodeType || "false" == t.contentEditable) && ("true" == t.contentEditable || I(t.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 t, e, n, i = [], r = 0, o = this.textNodes.length; r < o; ++r) t = this.textNodes[r],
e = t.parentNode, i[r] = t.data, r && (e.removeChild(t), e.hasChildNodes() || e.parentNode.removeChild(e));
return this.firstTextNode.data = n = i.join(""), n;
},
getLength: function() {
for (var t = this.textNodes.length, e = 0; t--; ) e += this.textNodes[t].length;
return e;
},
toString: function() {
for (var t = [], e = 0, n = this.textNodes.length; e < n; ++e) t[e] = "'" + this.textNodes[e].data + "'";
return "[Merge(" + t.join(",") + ")]";
}
};
var A = [ "elementTagName", "ignoreWhiteSpace", "applyToEditableOnly" ], R = {
"class": "className"
};
C.prototype = {
elementTagName: "span",
elementProperties: {},
ignoreWhiteSpace: !0,
applyToEditableOnly: !1,
hasClass: function(t) {
return 1 == t.nodeType && E.arrayContains(this.tagNames, t.tagName.toLowerCase()) && i(t, this.cssClass);
},
getSelfOrAncestorWithClass: function(t) {
for (;t; ) {
if (this.hasClass(t, this.cssClass)) return t;
t = t.parentNode;
}
return null;
},
isModifiable: function(t) {
return !this.applyToEditableOnly || m(t);
},
isIgnorableWhiteSpaceNode: function(t) {
return this.ignoreWhiteSpace && t && 3 == t.nodeType && v(t);
},
postApply: function(t, e, n) {
for (var i, r, o, a = t[0], s = t[t.length - 1], l = [], c = a, u = s, d = 0, p = s.length, h = 0, f = t.length; h < f; ++h) r = t[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; h < f; ++h) l[h].doMerge();
e.setStart(c, d), e.setEnd(u, p);
}
},
createContainer: function(e) {
var n = e.createElement(this.elementTagName);
return t.util.extend(n, this.elementProperties), r(n, this.cssClass), n;
},
applyToTextNode: function(t) {
var e = t.parentNode;
if (1 == e.childNodes.length && E.arrayContains(this.tagNames, e.tagName.toLowerCase())) r(e, this.cssClass); else {
var n = this.createContainer(E.getDocument(t));
t.parentNode.insertBefore(n, t), n.appendChild(t);
}
},
isRemovable: function(t) {
return t.tagName.toLowerCase() == this.elementTagName && a(t) == this.elementSortedClassName && h(t, this.elementProperties) && !p(t, this.attrExceptions) && this.isModifiable(t);
},
undoToTextNode: function(t, e, n) {
if (!e.containsNode(n)) {
var i = e.cloneRange();
i.selectNode(n), i.isPointInRange(e.endContainer, e.endOffset) && (y(n, e.endContainer, e.endOffset, [ e ]),
e.setEndAfter(n)), i.isPointInRange(e.startContainer, e.startOffset) && (n = y(n, e.startContainer, e.startOffset, [ e ]));
}
this.isRemovable(n) ? l(n) : T(n, this.cssClass);
},
applyToRange: function(t) {
t.splitBoundaries();
var e = u(t);
if (e.length) {
for (var n, i = 0, r = e.length; i < r; ++i) n = e[i], this.isIgnorableWhiteSpaceNode(n) || this.getSelfOrAncestorWithClass(n) || !this.isModifiable(n) || this.applyToTextNode(n);
t.setStart(e[0], 0), n = e[e.length - 1], t.setEnd(n, n.length), this.normalize && this.postApply(e, t, !1);
}
},
applyToSelection: function(e) {
e = e || window;
var n, i = t.getSelection(e), r = i.getAllRanges();
i.removeAllRanges();
for (var o = r.length; o--; ) n = r[o], this.applyToRange(n), i.addRange(n);
},
undoToRange: function(t) {
t.splitBoundaries();
var e, n, i = u(t), r = i[i.length - 1];
if (i.length) {
for (var o = 0, a = i.length; o < a; ++o) e = i[o], n = this.getSelfOrAncestorWithClass(e),
n && this.isModifiable(e) && this.undoToTextNode(e, t, n), t.setStart(i[0], 0),
t.setEnd(r, r.length);
this.normalize && this.postApply(i, t, !0);
}
},
undoToSelection: function(e) {
e = e || window;
var n, i = t.getSelection(e), r = i.getAllRanges();
i.removeAllRanges();
for (var o = 0, a = r.length; o < a; ++o) n = r[o], this.undoToRange(n), i.addRange(n);
},
getTextSelectedByRange: function(t, e) {
var n = e.cloneRange();
n.selectNodeContents(t);
var i = n.intersection(e), r = i ? i.toString() : "";
return n.detach(), r;
},
isAppliedToRange: function(t) {
if (t.collapsed) return !!this.getSelfOrAncestorWithClass(t.commonAncestorContainer);
for (var e, n = t.getNodes([ 3 ]), i = 0; e = n[i++]; ) if (!this.isIgnorableWhiteSpaceNode(e) && c(t, e) && this.isModifiable(e) && !this.getSelfOrAncestorWithClass(e)) return !1;
return !0;
},
isAppliedToSelection: function(e) {
e = e || window;
for (var n = t.getSelection(e), i = n.getAllRanges(), r = i.length; r--; ) if (!this.isAppliedToRange(i[r])) return !1;
return !0;
},
toggleRange: function(t) {
this.isAppliedToRange(t) ? this.undoToRange(t) : this.applyToRange(t);
},
toggleSelection: function(t) {
this.isAppliedToSelection(t) ? this.undoToSelection(t) : this.applyToSelection(t);
},
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
}, t.CssClassApplier = C, t.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(t, e, n, i) {
window.noStart || t(function() {
e.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() {});