diff --git a/bower.json b/bower.json index 3fed38b4..caced1c0 100644 --- a/bower.json +++ b/bower.json @@ -18,6 +18,11 @@ "stacktrace": "~0.5.3", "requirejs-text": "~2.0.10", "bootstrap-tour": "~0.6.0", - "ace": "#51b7cb67a63998c9c0b7d089a85c60e032a7cc17" + "ace": "#51b7cb67a63998c9c0b7d089a85c60e032a7cc17", + "pagedown-ace": "git@github.com:benweet/pagedown-ace.git#master", + "pagedown-extra": "git@github.com:jmcmanus/pagedown-extra.git#master", + "crel": "git@github.com:KoryNunn/crel.git#8dbda04b129fc0aec01a2a080d1cab26816e11c1", + "waitForImages": "git@github.com:alexanderdickson/waitForImages.git#~1.4.2", + "to-markdown": "git@github.com:benweet/to-markdown.git#jquery" } } diff --git a/cache.manifest b/cache.manifest index f37dc56f..f9c3c1a9 100644 --- a/cache.manifest +++ b/cache.manifest @@ -1,5 +1,5 @@ CACHE MANIFEST -#Date Sat Sep 14 2013 17:58:48 +#Date Sun Sep 15 2013 15:14:20 CACHE: index.html diff --git a/index.html b/index.html index 7b69fb26..4fac0866 100644 --- a/index.html +++ b/index.html @@ -3,8 +3,8 @@
Allows users to implement their own extension.
\nAdds a "Markdown syntax" button over the preview.
', i.onCreatePreviewButton = function() { return n; @@ -12039,6 +12232,7 @@ define("config", function() {}), define("settings", [ "underscore", "config" ], return '\nAllows toggling document with keyboard shortcuts.
\n" + i + "\n
", "\n\n" + i + "\n\n" + o;
}), e = e.replace(/~0/, "");
}
function v(e) {
- return e = e.replace(/(^\n+|\n+$)/g, ""), "\n\n~K" + (I.push(e) - 1) + "K\n\n";
+ return e = e.replace(/(^\n+|\n+$)/g, ""), "\n\n~K" + (P.push(e) - 1) + "K\n\n";
}
function b(e) {
return e = e.replace(/(^|[^\\])(`+)([^\r]*?[^`])\2(?!`)/gm, function(e, t, n, i) {
@@ -13275,7 +13553,7 @@ function() {
if (!t) {
r = i.length;
for (var a = 0; r > a; a++) for (var c = !0; c; ) c = !1, i[a] = i[a].replace(/~K(\d+)K/g, function(e, t) {
- return c = !0, I[t];
+ return c = !0, P[t];
});
}
return i.join("\n\n");
@@ -13316,10 +13594,10 @@ function() {
return String.fromCharCode(n);
});
}
- function _(e) {
+ function $(e) {
return e = e.replace(/^(\t|[ ]{1,4})/gm, "~0"), e = e.replace(/~0/g, "");
}
- function $(e) {
+ function _(e) {
if (!/\t/.test(e)) return e;
var t, n = [ " ", " ", " ", " " ], i = 0;
return e.replace(/[\n\t]/g, function(e, o) {
@@ -13345,23 +13623,589 @@ function() {
B.addNoop("plainLinkText"), B.addNoop("preConversion"), B.addNoop("postNormalization"),
B.addNoop("preBlockGamut"), B.addNoop("postBlockGamut"), B.addNoop("preSpanGamut"),
B.addNoop("postSpanGamut"), B.addNoop("postConversion");
- var M, R, I, P;
+ var M, R, P, I;
this.makeHtml = function(n) {
if (M) throw new Error("Recursive call to converter.makeHtml");
- return M = new i(), R = new i(), I = [], P = 0, n = B.preConversion(n), n = n.replace(/~/g, "~T"),
+ return M = new i(), R = new i(), P = [], I = 0, n = B.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 = $(n), n = n.replace(/^[ \t]+$/gm, ""), n = B.postNormalization(n),
+ n = "\n\n" + n + "\n\n", n = _(n), n = n.replace(/^[ \t]+$/gm, ""), n = B.postNormalization(n),
n = t(n), n = e(n), n = r(n), n = F(n), n = n.replace(/~D/g, "$$"), n = n.replace(/~T/g, "~"),
- n = B.postConversion(n), I = R = M = null, n;
+ n = B.postConversion(n), P = R = M = null, n;
};
var N = function(e) {
return r(e);
- }, z = {
+ }, O = {
ol: "\\d+[.]",
ul: "[*+-]"
- }, O = "[-A-Z0-9+&@#/%?=~_|[\\]()!:,.;]", j = "[-A-Z0-9+&@#/%=~_|[\\])]", H = new RegExp('(="|<)?\\b(https?|ftp)(://' + O + "*" + j + ")(?=$|\\W)", "gi"), q = new RegExp(j, "i"), W = /(?:["'*()[\]:]|~D)/g;
+ }, z = "[-A-Z0-9+&@#/%?=~_|[\\]()!:,.;]", j = "[-A-Z0-9+&@#/%=~_|[\\])]", H = new RegExp('(="|<)?\\b(https?|ftp)(://' + z + "*" + j + ")(?=$|\\W)", "gi"), q = new RegExp(j, "i"), W = /(?:["'*()[\]:]|~D)/g;
};
-}(), define("libs/Markdown.Converter", function() {}), window.PR_SHOULD_USE_CONTINUATION = !0;
+}(), define("bower-libs/pagedown-ace/Markdown.Converter", function() {}), function() {
+ function e() {}
+ function t(e, t) {
+ this.buttonBar = u.getElementById("wmd-button-bar" + e), this.preview = u.getElementById("wmd-preview" + e),
+ this.input = t;
+ }
+ function n(t) {
+ var n = this, i = t.input;
+ this.init = function() {
+ var e = "undefined" != typeof require ? require("ace/range").Range : ace.require("ace/range").Range;
+ (function(t) {
+ n.before = i.session.getTextRange(new e(0, 0, t.start.row, t.start.column)), n.selection = i.session.getTextRange(),
+ n.after = i.session.getTextRange(new e(t.end.row, t.end.column, Number.MAX_VALUE, Number.MAX_VALUE));
+ })(i.selection.getRange()), this.text = [ this.before, this.selection, this.after ].join(""),
+ this.length = this.text.length, this.setInputAreaSelectionStartEnd(), this.scrollTop = i.renderer.getScrollTop();
+ }, this.setInputAreaSelection = function() {
+ var e = "undefined" != typeof require ? require("ace/range").Range : ace.require("ace/range").Range;
+ i.selection.setSelectionRange(function(t, n) {
+ return new e(t.row, t.column, n.row, n.column);
+ }(i.session.doc.indexToPosition(n.start), i.session.doc.indexToPosition(n.end))),
+ i.renderer.scrollToY(n.scrollTop), i.focus();
+ }, this.setInputAreaSelectionStartEnd = function() {
+ n.start = n.before.length, n.end = n.after.length;
+ }, this.restore = function() {
+ for (var e = 0, t = n.before.length; t > e && n.before.charCodeAt(e) === n.text.charCodeAt(e); ) e++;
+ for (var o = 0, r = n.after.length, s = n.after.length - 1, a = n.text.length - 1; r > o && n.after.charCodeAt(s - o) === n.text.charCodeAt(a - o); ) o++;
+ var l = "undefined" != typeof require ? require("ace/range").Range : ace.require("ace/range").Range, c = function(e, t) {
+ return new l(e.row, e.column, t.row, t.column);
+ }(i.session.doc.indexToPosition(e), i.session.doc.indexToPosition(n.length - o));
+ i.session.replace(c, n.text.substring(e, a - o + 1)), this.setInputAreaSelection();
+ }, this.getChunks = function() {
+ var t = new e();
+ return t.before = n.before, t.startTag = "", t.selection = n.selection, t.endTag = "",
+ t.after = n.after, t.scrollTop = n.scrollTop, t;
+ }, this.setChunks = function(e) {
+ e.before = e.before + e.startTag, e.after = e.endTag + e.after, this.start = e.before.length,
+ this.end = e.before.length + e.selection.length, this.text = e.before + e.selection + e.after,
+ this.scrollTop = e.scrollTop;
+ }, this.init();
+ }
+ function i(e, t, n, i) {
+ var o, r, s, a = 3e3, c = "delayed", d = function() {
+ var e = 0;
+ return window.innerHeight ? e = window.pageYOffset : u.documentElement && u.documentElement.scrollTop ? e = u.documentElement.scrollTop : u.body && (e = u.body.scrollTop),
+ e;
+ }, h = function() {
+ if (t.preview) {
+ var n = t.input.getValue();
+ if (!n || n != s) {
+ s = n;
+ var i = new Date().getTime();
+ n = e.makeHtml(n);
+ var o = new Date().getTime();
+ r = o - i, x(n);
+ }
+ }
+ };
+ void 0 !== i && (h = i(h));
+ var p = function() {
+ if (o && (clearTimeout(o), o = void 0), "manual" !== c) {
+ var e = 0;
+ "delayed" === c && (e = r), e > a && (e = a), o = setTimeout(h, e);
+ }
+ }, g = function(e) {
+ return e.scrollHeight <= e.clientHeight ? 1 : e.scrollTop / (e.scrollHeight - e.clientHeight);
+ }, m = function() {
+ t.preview && (t.preview.scrollTop = (t.preview.scrollHeight - t.preview.clientHeight) * g(t.preview));
+ };
+ this.refresh = function(e) {
+ e ? (s = "", h()) : p();
+ }, this.processingTime = function() {
+ return r;
+ };
+ var v, b = !0, y = function(e) {
+ var n = t.preview, i = n.parentNode, o = n.nextSibling;
+ i.removeChild(n), n.innerHTML = e, o ? i.insertBefore(n, o) : i.appendChild(n);
+ }, w = function(e) {
+ t.preview.innerHTML = e;
+ }, C = function(e) {
+ if (v) return v(e);
+ try {
+ w(e), v = w;
+ } catch (t) {
+ v = y, v(e);
+ }
+ }, x = function(e) {
+ var i = l.getTop(t.input) - d();
+ if (t.preview && (C(e), n()), m(), b) return b = !1, void 0;
+ var o = l.getTop(t.input) - d();
+ f.isIE ? setTimeout(function() {
+ window.scrollBy(0, o - i);
+ }, 0) : window.scrollBy(0, o - i);
+ }, E = function() {
+ t.input.session.on("change", p), t.preview && (t.preview.scrollTop = 0);
+ };
+ E();
+ }
+ function o(e, t, i, o, r, s, a, l) {
+ function c(e) {
+ if (0 !== e.length) {
+ var t = e.pop();
+ b.commands.addCommand({
+ name: a(t),
+ bindKey: {
+ win: "Ctrl-" + m[t],
+ mac: "Command-" + m[t]
+ },
+ exec: function() {
+ d(y[t]);
+ }
+ }), c(e);
+ }
+ }
+ function d(e) {
+ b.focus();
+ var r = "wmd-link-button" == e.id || "wmd-image-button" == e.id;
+ if (e.textOp) {
+ i && !r && i.setCommandMode();
+ var s = new n(t);
+ if (!s) return;
+ var a = s.getChunks(), l = function() {
+ b.focus(), a && s.setChunks(a), s.restore(), o.refresh();
+ }, c = e.textOp(a, l);
+ c || l();
+ }
+ e.execute && e.execute(i);
+ }
+ function h(e, n) {
+ var i = "0px", o = "-20px", r = "-40px", s = e.getElementsByTagName("span")[0];
+ n ? (s.style.backgroundPosition = e.XShift + " " + i, e.onmouseover = function() {
+ s.style.backgroundPosition = this.XShift + " " + r;
+ }, e.onmouseout = function() {
+ s.style.backgroundPosition = this.XShift + " " + i;
+ }, f.isIE && (e.onmousedown = function() {
+ u.activeElement && u.activeElement !== t.input || (t.ieCachedRange = document.selection.createRange(),
+ t.ieCachedScrollTop = t.input.renderer.getScrollTop());
+ }), e.isHelp || (e.onclick = function() {
+ return this.onmouseout && this.onmouseout(), d(this), !1;
+ }), e.className = e.className.replace(/ disabled/g, "")) : (s.style.backgroundPosition = e.XShift + " " + o,
+ e.onmouseover = e.onmouseout = e.onclick = function() {}, e.className += " disabled");
+ }
+ function p(e) {
+ return "string" == typeof e && (e = r[e]), function() {
+ e.apply(r, arguments);
+ };
+ }
+ function g() {
+ var n = t.buttonBar, i = document.createElement("ul");
+ i.id = "wmd-button-row" + e, i.className = "wmd-button-row", i = n.appendChild(i);
+ var o = 0, r = function(t, n, r, s) {
+ var a = document.createElement("li");
+ a.className = "wmd-button", a.style.left = o + "px", o += 25;
+ var l = document.createElement("span");
+ return a.id = t + e, a.appendChild(l), a.title = n, a.XShift = r, s && (a.textOp = s),
+ h(a, !0), i.appendChild(a), a;
+ }, l = function(t) {
+ var n = document.createElement("li");
+ n.className = "wmd-spacer wmd-spacer" + t, n.id = "wmd-spacer" + t + e, i.appendChild(n),
+ o += 25;
+ };
+ if (y.bold = r("wmd-bold-button", v("bold"), "0px", p("doBold")), y.italic = r("wmd-italic-button", v("italic"), "-20px", p("doItalic")),
+ l(1), y.link = r("wmd-link-button", v("link"), "-40px", p(function(e, t) {
+ return this.doLinkOrImage(e, t, !1);
+ })), y.quote = r("wmd-quote-button", v("quote"), "-60px", p("doBlockquote")), y.code = r("wmd-code-button", v("code"), "-80px", p("doCode")),
+ y.image = r("wmd-image-button", v("image"), "-100px", p(function(e, t) {
+ return this.doLinkOrImage(e, t, !0);
+ })), l(2), y.olist = r("wmd-olist-button", v("olist"), "-120px", p(function(e, t) {
+ this.doList(e, t, !0);
+ })), y.ulist = r("wmd-ulist-button", v("ulist"), "-140px", p(function(e, t) {
+ this.doList(e, t, !1);
+ })), y.heading = r("wmd-heading-button", v("heading"), "-160px", p("doHeading")),
+ y.hr = r("wmd-hr-button", v("hr"), "-180px", p("doHorizontalRule")), l(3), y.undo = r("wmd-undo-button", v("undo"), "-200px", null),
+ y.undo.execute = function() {
+ b.session.getUndoManager().undo();
+ }, y.redo = r("wmd-redo-button", v("redo"), "-220px", null), y.redo.execute = function() {
+ b.session.getUndoManager().redo();
+ }, s) {
+ var c = document.createElement("li"), u = document.createElement("span");
+ c.appendChild(u), c.className = "wmd-button wmd-help-button", c.id = "wmd-help-button" + e,
+ c.XShift = "-240px", c.isHelp = !0, c.style.right = "0px", c.title = a("help"),
+ c.onclick = s.handler, h(c, !0), i.appendChild(c), y.help = c;
+ }
+ w.setUndoRedoButtonStates(), b.session.on("change", function() {
+ w.setUndoRedoButtonStates();
+ });
+ }
+ var v = function(e) {
+ return a(e) + " " + l(e);
+ }, b = t.input, y = {};
+ this.setUndoRedoButtonStates = function() {
+ setTimeout(function() {
+ h(y.undo, b.session.getUndoManager().hasUndo()), h(y.redo, b.session.getUndoManager().hasRedo());
+ }, 50);
+ };
+ var w = this;
+ g();
+ var C = "keydown";
+ f.isOpera && (C = "keypress"), c([ "bold", "italic", "link", "quote", "code", "image", "olist", "ulist", "heading", "hr" ]),
+ this.buttons = y, this.setButtonState = h;
+ }
+ function r(e, t) {
+ this.hooks = e, this.getString = t;
+ }
+ function s(e) {
+ return e.replace(/^\s*(.*?)(?:\s+"(.+)")?\s*$/, function(e, t, n) {
+ return t = t.replace(/\?.*$/, function(e) {
+ return e.replace(/\+/g, " ");
+ }), t = decodeURIComponent(t), t = encodeURI(t).replace(/'/g, "%27").replace(/\(/g, "%28").replace(/\)/g, "%29"),
+ t = t.replace(/\?.*$/, function(e) {
+ return e.replace(/\+/g, "%2b");
+ }), n && (n = n.trim ? n.trim() : n.replace(/^\s*/, "").replace(/\s*$/, ""), n = n.replace(/"/g, "quot;").replace(/\(/g, "(").replace(/\)/g, ")").replace(//g, ">")),
+ n ? t + ' "' + n + '"' : t;
+ });
+ }
+ var a = {}, l = {}, c = {}, u = window.document, d = window.RegExp, h = window.navigator, p = {
+ lineLength: 72
+ }, f = {
+ 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 ",
+ boldexample: "strong text",
+ italic: "Emphasis ",
+ italicexample: "emphasized text",
+ link: "Hyperlink ",
+ linkdescription: "enter link description here",
+ linkdialog: 'Insert Hyperlink
http://example.com/ "optional title"
', + quote: "Blockquote", + quoteexample: "Blockquote", + code: "Code Sample", + codeexample: "enter code here", + image: "Image ", + imagedescription: "enter image description here", + imagedialog: "
Insert Image
http://example.com/images/diagram.jpg \"optional title\"
", + olist: "Numbered List
Need free image hosting?", + ulist: "Bulleted List
", + litem: "List item", + heading: "Heading
/
", + headingexample: "Heading", + hr: "Horizontal Rule
", + undo: "Undo -", + redo: "Redo -", + help: "Markdown Editing Help" + }, m = { + bold: "B", + italic: "I", + link: "L", + quote: "Q", + code: "K", + image: "G", + olist: "O", + ulist: "U", + heading: "H", + hr: "R", + undo: "Z", + redo: "Y" + }, v = "http://", b = "http://"; + Markdown.Editor = function(e, n, 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 a = function(e) { + return s.strings[e] || g[e]; + }, l = function(e) { + return (/win/.test(h.platform.toLowerCase()) ? "Ctrl+" : "Command+") + m[e]; + }; + n = n || ""; + var c = this.hooks = new Markdown.HookCollection(); + c.addNoop("onPreviewRefresh"), c.addNoop("postBlockquoteCreation"), c.addFalse("insertImageDialog"), + c.addFalse("insertLinkDialog"), this.getConverter = function() { + return e; + }; + var u, d, p = this; + this.run = function(h, f) { + if (!u) { + u = new t(n, h); + var g, m = new r(c, a), v = new i(e, u, function() { + c.onPreviewRefresh(); + }, f); + g = new o(n, u, d, v, m, s.helpButton, a, l), g.setUndoRedoButtonStates(); + var b = p.refreshPreview = function() { + v.refresh(!0); + }; + b(), p.uiManager = g; + } + }; + }, e.prototype.findTags = function(e, t) { + var n, i = this; + e && (n = a.extendRegExp(e, "", "$"), this.before = this.before.replace(n, function(e) { + return i.startTag = i.startTag + e, ""; + }), n = a.extendRegExp(e, "^", ""), this.selection = this.selection.replace(n, function(e) { + return i.startTag = i.startTag + e, ""; + })), t && (n = a.extendRegExp(t, "", "$"), this.selection = this.selection.replace(n, function(e) { + return i.endTag = e + i.endTag, ""; + }), n = a.extendRegExp(t, "^", ""), this.after = this.after.replace(n, function(e) { + return i.endTag = e + i.endTag, ""; + })); + }, e.prototype.trimWhitespace = function(e) { + var t, n, i = this; + e ? t = n = "" : (t = function(e) { + return i.before += e, ""; + }, n = function(e) { + return i.after = e + i.after, ""; + }), this.selection = this.selection.replace(/^(\s*)/, t).replace(/(\s*)$/, n); + }, e.prototype.skipLines = function(e, t, n) { + void 0 === e && (e = 1), void 0 === t && (t = 1), e++, t++; + var i, o; + if (navigator.userAgent.match(/Chrome/) && "X".match(/()./), this.selection = this.selection.replace(/(^\n*)/, ""), + this.startTag = this.startTag + d.$1, this.selection = this.selection.replace(/(\n*$)/, ""), + this.endTag = this.endTag + d.$1, this.startTag = this.startTag.replace(/(^\n*)/, ""), + this.before = this.before + d.$1, this.endTag = this.endTag.replace(/(\n*$)/, ""), + this.after = this.after + d.$1, this.before) { + for (i = o = ""; e--; ) i += "\\n?", o += "\n"; + n && (i = "\\n*"), this.before = this.before.replace(new d(i + "$", ""), o); + } + if (this.after) { + for (i = o = ""; t--; ) i += "\\n?", o += "\n"; + n && (i = "\\n*"), this.after = this.after.replace(new d(i, ""), o); + } + }, a.isVisible = function(e) { + return window.getComputedStyle ? "none" !== window.getComputedStyle(e, null).getPropertyValue("display") : e.currentStyle ? "none" !== e.currentStyle.display : void 0; + }, a.addEvent = function(e, t, n) { + e.attachEvent ? e.attachEvent("on" + t, n) : e.addEventListener(t, n, !1); + }, a.removeEvent = function(e, t, n) { + e.detachEvent ? e.detachEvent("on" + t, n) : e.removeEventListener(t, n, !1); + }, a.fixEolChars = function(e) { + return e = e.replace(/\r\n/g, "\n"), e = e.replace(/\r/g, "\n"); + }, a.extendRegExp = function(e, t, n) { + (null === t || void 0 === t) && (t = ""), (null === n || void 0 === n) && (n = ""); + var i, o = e.toString(); + return o = o.replace(/\/([gim]*)$/, function(e, t) { + return i = t, ""; + }), o = o.replace(/(^\/|\/$)/g, ""), o = t + o + n, new d(o, i); + }, l.getTop = function(e, t) { + var n = e.offsetTop; + if (!t) for (;e = e.offsetParent; ) n += e.offsetTop; + return n; + }, l.getHeight = function(e) { + return e.offsetHeight || e.scrollHeight; + }, l.getWidth = function(e) { + return e.offsetWidth || e.scrollWidth; + }, l.getPageSize = function() { + var e, t, n, i; + self.innerHeight && self.scrollMaxY ? (e = u.body.scrollWidth, t = self.innerHeight + self.scrollMaxY) : u.body.scrollHeight > u.body.offsetHeight ? (e = u.body.scrollWidth, + t = u.body.scrollHeight) : (e = u.body.offsetWidth, t = u.body.offsetHeight), self.innerHeight ? (n = self.innerWidth, + i = self.innerHeight) : u.documentElement && u.documentElement.clientHeight ? (n = u.documentElement.clientWidth, + i = u.documentElement.clientHeight) : u.body && (n = u.body.clientWidth, i = u.body.clientHeight); + var o = Math.max(e, n), r = Math.max(t, i); + return [ o, r, n, i ]; + }, c.createBackground = function() { + var e = u.createElement("div"), t = e.style; + e.className = "wmd-prompt-background", t.position = "absolute", t.top = "0", t.zIndex = "1000", + f.isIE ? t.filter = "alpha(opacity=50)" : t.opacity = "0.5"; + var n = l.getPageSize(); + return t.height = n[1] + "px", f.isIE ? (t.left = u.documentElement.scrollLeft, + t.width = u.documentElement.clientWidth) : (t.left = "0", t.width = "100%"), u.body.appendChild(e), + e; + }, c.prompt = function(e, t, n) { + var i, o; + void 0 === t && (t = ""); + var r = function(e) { + var t = e.charCode || e.keyCode; + 27 === t && s(!0); + }, s = function(e) { + a.removeEvent(u.body, "keydown", r); + var t = o.value; + return e ? t = null : (t = t.replace(/^http:\/\/(https?|ftp):\/\//, "$1://"), /^(?:https?|ftp):\/\//.test(t) || (t = "http://" + t)), + i.parentNode.removeChild(i), n(t), !1; + }, c = function() { + i = u.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 = u.createElement("div"); + n.innerHTML = e, n.style.padding = "5px", i.appendChild(n); + var c = u.createElement("form"), d = c.style; + c.onsubmit = function() { + return s(!1); + }, d.padding = "0", d.margin = "0", d.cssFloat = "left", d.width = "100%", d.textAlign = "center", + d.position = "relative", i.appendChild(c), o = u.createElement("input"), o.type = "text", + o.value = t, d = o.style, d.display = "block", d.width = "80%", d.marginLeft = d.marginRight = "auto", + c.appendChild(o); + var h = u.createElement("input"); + h.type = "button", h.onclick = function() { + return s(!1); + }, h.value = "OK", d = h.style, d.margin = "10px", d.display = "inline", d.width = "7em"; + var p = u.createElement("input"); + p.type = "button", p.onclick = function() { + return s(!0); + }, p.value = "Cancel", d = p.style, d.margin = "10px", d.display = "inline", d.width = "7em", + c.appendChild(h), c.appendChild(p), a.addEvent(u.body, "keydown", r), i.style.top = "50%", + i.style.left = "50%", i.style.display = "block", f.isIE_5or6 && (i.style.position = "absolute", + i.style.top = u.documentElement.scrollTop + 200 + "px", i.style.left = "50%"), u.body.appendChild(i), + i.style.marginTop = -(l.getHeight(i) / 2) + "px", i.style.marginLeft = -(l.getWidth(i) / 2) + "px"; + }; + setTimeout(function() { + c(); + var e = t.length; + if (void 0 !== o.selectionStart) o.selectionStart = 0, o.selectionEnd = e; else if (o.createTextRange) { + var n = o.createTextRange(); + n.collapse(!1), n.moveStart("character", -e), n.moveEnd("character", e), n.select(); + } + o.focus(); + }, 0); + }; + var y = r.prototype; + y.prefixes = "(?:\\s{4,}|\\s*>|\\s*-\\s+|\\s*\\d+\\.|=|\\+|-|_|\\*|#|\\s*\\[[^\n]]+\\]:)", + y.unwrap = function(e) { + var t = new d("([^\\n])\\n(?!(\\n|" + this.prefixes + "))", "g"); + e.selection = e.selection.replace(t, "$1 $2"); + }, y.wrap = function(e, t) { + this.unwrap(e); + var n = new d("(.{1," + t + "})( +|$\\n?)", "gm"), i = this; + e.selection = e.selection.replace(n, function(e, t) { + return new d("^" + i.prefixes, "").test(e) ? e : t + "\n"; + }), e.selection = e.selection.replace(/\s+$/, ""); + }, y.doBold = function(e, t) { + return this.doBorI(e, t, 2, this.getString("boldexample")); + }, y.doItalic = function(e, t) { + return this.doBorI(e, t, 1, this.getString("italicexample")); + }, y.doBorI = function(e, t, n, i) { + e.trimWhitespace(), e.selection = e.selection.replace(/\n{2,}/g, "\n"); + var o = /(\**$)/.exec(e.before)[0], r = /(^\**)/.exec(e.after)[0], s = Math.min(o.length, r.length); + if (s >= n && (2 != s || 1 != n)) e.before = e.before.replace(d("[*]{" + n + "}$", ""), ""), + e.after = e.after.replace(d("^[*]{" + n + "}", ""), ""); else if (!e.selection && r) { + e.after = e.after.replace(/^([*_]*)/, ""), e.before = e.before.replace(/(\s?)$/, ""); + var a = d.$1; + e.before = e.before + r + a; + } else { + e.selection || r || (e.selection = i); + var l = 1 >= n ? "*" : "**"; + e.before = e.before + l, e.after = l + e.after; + } + }, y.stripLinkDefs = function(e, t) { + return e = e.replace(/^[ ]{0,3}\[(\d+)\]:[ \t]*\n?[ \t]*(\S+?)>?[ \t]*\n?[ \t]*(?:(\n*)["(](.+?)[")][ \t]*)?(?:\n+|$)/gm, function(e, n, i, o, r) { + return t[n] = e.replace(/\s*$/, ""), o ? (t[n] = e.replace(/["(](.+?)[")]$/, ""), + o + r) : ""; + }); + }, y.addLinkDef = function(e, t) { + var n = 0, i = {}; + e.before = this.stripLinkDefs(e.before, i), e.selection = this.stripLinkDefs(e.selection, i), + e.after = this.stripLinkDefs(e.after, i); + var o = "", r = /(\[)((?:\[[^\]]*\]|[^\[\]])*)(\][ ]?(?:\n[ ]*)?\[)(\d+)(\])/g, s = function(e) { + n++, e = e.replace(/^[ ]{0,3}\[(\d+)\]:/, " [" + n + "]:"), o += "\n" + e; + }, a = function(e, t, o, l, c, u) { + return o = o.replace(r, a), i[c] ? (s(i[c]), t + o + l + n + u) : e; + }; + e.before = e.before.replace(r, a), t ? s(t) : e.selection = e.selection.replace(r, a); + var l = n; + return e.after = e.after.replace(r, a), e.after && (e.after = e.after.replace(/\n*$/, "")), + e.after || (e.selection = e.selection.replace(/\n*$/, "")), e.after += "\n\n" + o, + l; + }, y.doLinkOrImage = function(e, t, n) { + e.trimWhitespace(), e.findTags(/\s*!?\[/, /\][ ]?(?:\n[ ]*)?(\[.*?\])?/); + var i; + if (!(e.endTag.length > 1 && e.startTag.length > 0)) { + if (e.selection = e.startTag + e.selection + e.endTag, e.startTag = e.endTag = "", + /\n\n/.test(e.selection)) return this.addLinkDef(e, null), void 0; + var o = this, r = function(r) { + if (i.parentNode.removeChild(i), null !== r) { + e.selection = (" " + e.selection).replace(/([^\\](?:\\\\)*)(?=[[\]])/g, "$1\\").substr(1); + var a = " [999]: " + s(r), l = o.addLinkDef(e, a); + e.startTag = n ? "![" : "[", e.endTag = "][" + l + "]", e.selection || (e.selection = n ? o.getString("imagedescription") : o.getString("linkdescription")); + } + t(); + }; + return i = c.createBackground(), n ? this.hooks.insertImageDialog(r) || c.prompt(this.getString("imagedialog"), v, r) : this.hooks.insertLinkDialog(r) || c.prompt(this.getString("linkdialog"), b, r), + !0; + } + e.startTag = e.startTag.replace(/!?\[/, ""), e.endTag = "", this.addLinkDef(e, null); + }, y.doAutoindent = function(e) { + var t = this, n = !1; + e.before = e.before.replace(/(\n|^)[ ]{0,3}([*+-]|\d+[.])[ \t]*\n$/, "\n\n"), e.before = e.before.replace(/(\n|^)[ ]{0,3}>[ \t]*\n$/, "\n\n"), + e.before = e.before.replace(/(\n|^)[ \t]+\n$/, "\n\n"), e.selection || /^[ \t]*(?:\n|$)/.test(e.after) || (e.after = e.after.replace(/^[^\n]*/, function(t) { + return e.selection = t, ""; + }), n = !0), /(\n|^)[ ]{0,3}([*+-]|\d+[.])[ \t]+.*\n$/.test(e.before) && t.doList && t.doList(e), + /(\n|^)[ ]{0,3}>[ \t]+.*\n$/.test(e.before) && t.doBlockquote && t.doBlockquote(e), + /(\n|^)(\t|[ ]{4,}).*\n$/.test(e.before) && t.doCode && t.doCode(e), n && (e.after = e.selection + e.after, + e.selection = ""); + }, y.doBlockquote = function(e) { + e.selection = e.selection.replace(/^(\n*)([^\r]+?)(\n*)$/, function(t, n, i, o) { + return e.before += n, e.after = o + e.after, i; + }), e.before = e.before.replace(/(>[ \t]*)$/, function(t, n) { + return e.selection = n + e.selection, ""; + }), e.selection = e.selection.replace(/^(\s|>)+$/, ""), e.selection = e.selection || this.getString("quoteexample"); + var t, n = "", i = ""; + if (e.before) { + for (var o = e.before.replace(/\n$/, "").split("\n"), r = !1, s = 0; s < o.length; s++) { + var a = !1; + t = o[s], r = r && t.length > 0, /^>/.test(t) ? (a = !0, !r && t.length > 1 && (r = !0)) : a = /^[ \t]*$/.test(t) ? !0 : r, + a ? n += t + "\n" : (i += n + t, n = "\n"); + } + /(^|\n)>/.test(n) || (i += n, n = ""); + } + e.startTag = n, e.before = i, e.after && (e.after = e.after.replace(/^\n?/, "\n")), + e.after = e.after.replace(/^(((\n|^)(\n[ \t]*)*>(.+\n)*.*)+(\n[ \t]*)*)/, function(t) { + return e.endTag = t, ""; + }); + var l = function(t) { + var n = t ? "> " : ""; + e.startTag && (e.startTag = e.startTag.replace(/\n((>|\s)*)\n$/, function(e, t) { + return "\n" + t.replace(/^[ ]{0,3}>?[ \t]*$/gm, n) + "\n"; + })), e.endTag && (e.endTag = e.endTag.replace(/^\n((>|\s)*)\n/, function(e, t) { + return "\n" + t.replace(/^[ ]{0,3}>?[ \t]*$/gm, n) + "\n"; + })); + }; + /^(?![ ]{0,3}>)/m.test(e.selection) ? (this.wrap(e, p.lineLength - 2), e.selection = e.selection.replace(/^/gm, "> "), + l(!0), e.skipLines()) : (e.selection = e.selection.replace(/^[ ]{0,3}> ?/gm, ""), + this.unwrap(e), l(!1), !/^(\n|^)[ ]{0,3}>/.test(e.selection) && e.startTag && (e.startTag = e.startTag.replace(/\n{0,2}$/, "\n\n")), + !/(\n|^)[ ]{0,3}>.*$/.test(e.selection) && e.endTag && (e.endTag = e.endTag.replace(/^\n{0,2}/, "\n\n"))), + e.selection = this.hooks.postBlockquoteCreation(e.selection), /\n/.test(e.selection) || (e.selection = e.selection.replace(/^(> *)/, function(t, n) { + return e.startTag += n, ""; + })); + }, y.doCode = function(e) { + var t = /\S[ ]*$/.test(e.before), n = /^[ ]*\S/.test(e.after); + if (!n && !t || /\n/.test(e.selection)) { + e.before = e.before.replace(/[ ]{4}$/, function(t) { + return e.selection = t + e.selection, ""; + }); + var i = 1, o = 1; + /(\n|^)(\t|[ ]{4,}).*\n$/.test(e.before) && (i = 0), /^\n(\t|[ ]{4,})/.test(e.after) && (o = 0), + e.skipLines(i, o), e.selection ? /^[ ]{0,3}\S/m.test(e.selection) ? /\n/.test(e.selection) ? e.selection = e.selection.replace(/^/gm, " ") : e.before += " " : e.selection = e.selection.replace(/^(?:[ ]{4}|[ ]{0,3}\t)/gm, "") : (e.startTag = " ", + e.selection = this.getString("codeexample")); + } else e.trimWhitespace(), e.findTags(/`/, /`/), e.startTag || e.endTag ? e.endTag && !e.startTag ? (e.before += e.endTag, + e.endTag = "") : e.startTag = e.endTag = "" : (e.startTag = e.endTag = "`", e.selection || (e.selection = this.getString("codeexample"))); + }, y.doList = function(e, t, n) { + var i = /(\n|^)(([ ]{0,3}([*+-]|\d+[.])[ \t]+.*)(\n.+|\n{2,}([*+-].*|\d+[.])[ \t]+.*|\n{2,}[ \t]+\S.*)*)\n*$/, o = /^\n*(([ ]{0,3}([*+-]|\d+[.])[ \t]+.*)(\n.+|\n{2,}([*+-].*|\d+[.])[ \t]+.*|\n{2,}[ \t]+\S.*)*)\n*/, r = "-", s = 1, a = function() { + var e; + return n ? (e = " " + s + ". ", s++) : e = " " + r + " ", e; + }, l = function(e) { + return void 0 === n && (n = /^\s*\d/.test(e)), e = e.replace(/^[ ]{0,3}([*+-]|\d+[.])\s/gm, function() { + return a(); + }); + }; + if (e.findTags(/(\n|^)*[ ]{0,3}([*+-]|\d+[.])\s+/, null), !e.before || /\n$/.test(e.before) || /^\n/.test(e.startTag) || (e.before += e.startTag, + e.startTag = ""), e.startTag) { + var c = /\d+[.]/.test(e.startTag); + if (e.startTag = "", e.selection = e.selection.replace(/\n[ ]{4}/g, "\n"), this.unwrap(e), + e.skipLines(), c && (e.after = e.after.replace(o, l)), n == c) return; + } + var u = 1; + e.before = e.before.replace(i, function(e) { + return /^\s*([*+-])/.test(e) && (r = d.$1), u = /[^\n]\n\n[^\n]/.test(e) ? 1 : 0, + l(e); + }), e.selection || (e.selection = this.getString("litem")); + var h = a(), f = 1; + e.after = e.after.replace(o, function(e) { + return f = /[^\n]\n\n[^\n]/.test(e) ? 1 : 0, l(e); + }), e.trimWhitespace(!0), e.skipLines(u, f, !0), e.startTag = h; + var g = h.replace(/./g, " "); + this.wrap(e, p.lineLength - g.length), e.selection = e.selection.replace(/\n/g, "\n" + g); + }, y.doHeading = function(e) { + if (e.selection = e.selection.replace(/\s+/g, " "), e.selection = e.selection.replace(/(^\s+|\s+$)/g, ""), + !e.selection) return e.startTag = "## ", e.selection = this.getString("headingexample"), + e.endTag = " ##", void 0; + var t = 0; + e.findTags(/#+[ ]*/, /[ ]*#+/), /#+/.test(e.startTag) && (t = d.lastMatch.length), + e.startTag = e.endTag = "", e.findTags(null, /\s?(-+|=+)/), /=+/.test(e.endTag) && (t = 1), + /-+/.test(e.endTag) && (t = 2), e.startTag = e.endTag = "", e.skipLines(1, 1); + var n = 0 == t ? 2 : t - 1; + if (n > 0) { + var i = n >= 2 ? "-" : "=", o = e.selection.length; + for (o > p.lineLength && (o = p.lineLength), e.endTag = "\n"; o--; ) e.endTag += i; + } + }, y.doHorizontalRule = function(e) { + e.startTag = "----------\n", e.selection = "", e.skipLines(2, 1, !0); + }; +}(), define("pagedown-ace", function() {}), window.PR_SHOULD_USE_CONTINUATION = !0; var prettyPrintOne, prettyPrint; @@ -13513,7 +14357,7 @@ var prettyPrintOne, prettyPrint; y || (b = M); } m = b.length >= 5 && "lang-" === b.substring(0, 5), !m || y && "string" == typeof y[1] || (m = !1, - b = P), m || (p[v] = b); + b = I), m || (p[v] = b); } var x = d; if (d += v.length, m) { @@ -13529,11 +14373,11 @@ var prettyPrintOne, prettyPrint; } function r(e) { var t = [], n = []; - e.tripleQuotedStrings ? t.push([ _, /^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/, null, "'\"" ]) : e.multiLineStrings ? t.push([ _, /^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/, null, "'\"`" ]) : t.push([ _, /^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/, null, "\"'" ]), - e.verbatimStrings && n.push([ _, /^@\"(?:[^\"]|\"\")*(?:\"|$)/, null ]); + e.tripleQuotedStrings ? t.push([ $, /^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/, null, "'\"" ]) : e.multiLineStrings ? t.push([ $, /^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/, null, "'\"`" ]) : t.push([ $, /^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/, null, "\"'" ]), + e.verbatimStrings && n.push([ $, /^@\"(?:[^\"]|\"\")*(?:\"|$)/, null ]); var i = e.hashComments; if (i && (e.cStyleComments ? (i > 1 ? t.push([ D, /^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/, null, "#" ]) : t.push([ D, /^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/, null, "#" ]), - n.push([ _, /^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/, null ])) : t.push([ D, /^#[^\r\n]*/, null, "#" ])), + n.push([ $, /^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/, null ])) : t.push([ D, /^#[^\r\n]*/, null, "#" ])), e.cStyleComments && (n.push([ D, /^\/\/[^\r\n]*/, null ]), n.push([ D, /^\/\*[\s\S]*?(?:\*\/|$)/, null ])), e.regexLiterals) { var r = "/(?=[^/*])(?:[^/\\x5B\\x5C]|\\x5C[\\s\\S]|\\x5B(?:[^\\x5C\\x5D]|\\x5C[\\s\\S])*(?:\\x5D|$))+/"; @@ -13542,7 +14386,7 @@ var prettyPrintOne, prettyPrint; var s = e.types; s && n.push([ T, s ]); var a = ("" + e.keywords).replace(/^ | $/g, ""); - a.length && n.push([ $, new RegExp("^(?:" + a.replace(/[\s,]+/g, "|") + ")\\b"), null ]), + a.length && n.push([ _, new RegExp("^(?:" + a.replace(/[\s,]+/g, "|") + ")\\b"), null ]), t.push([ M, /^\s+/, null, " \r\n  " ]); var l = /^.[^\s\w\.$@\'\"\`\/\\]*/; return n.push([ L, /^@[a-z_$][a-z_$@0-9]*/i, null ], [ T, /^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/, null ], [ M, /^[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" ], [ M, /^\\[\s\S]?/, null ], [ B, l, null ]), @@ -13706,16 +14550,16 @@ var prettyPrintOne, prettyPrint; var h, f = 0, g = /\blang(?:uage)?-([\w.]+)(?!\S)/, m = /\bprettyprint\b/, v = /\bprettyprinted\b/, b = /pre|xmp/i, y = /^code$/i, w = /^(?:pre|code|xmp)$/i; n(); } - var p = window, f = [ "break,continue,do,else,for,if,return,while" ], g = [ f, "auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile" ], m = [ g, "catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof" ], v = [ m, "alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where" ], b = [ m, "abstract,boolean,byte,extends,final,finally,implements,import,instanceof,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,interface,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" ], w = "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", C = [ m, "debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN" ], x = "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", E = [ 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" ], A = [ 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" ], S = [ f, "case,done,elif,esac,eval,fi,function,in,local,set,then,until" ], k = [ v, y, C, x + E, A, S ], F = /^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)\b/, _ = "str", $ = "kwd", D = "com", T = "typ", L = "lit", B = "pun", M = "pln", R = "tag", I = "dec", P = "src", N = "atn", z = "atv", O = "nocode", j = "(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*", H = /\S/, q = r({ + var p = window, f = [ "break,continue,do,else,for,if,return,while" ], g = [ f, "auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile" ], m = [ g, "catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof" ], v = [ m, "alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where" ], b = [ m, "abstract,boolean,byte,extends,final,finally,implements,import,instanceof,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,interface,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" ], w = "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", C = [ m, "debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN" ], x = "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", E = [ 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" ], A = [ 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" ], S = [ f, "case,done,elif,esac,eval,fi,function,in,local,set,then,until" ], k = [ v, y, C, x + E, A, S ], F = /^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)\b/, $ = "str", _ = "kwd", D = "com", T = "typ", L = "lit", B = "pun", M = "pln", R = "tag", P = "dec", I = "src", N = "atn", O = "atv", z = "nocode", j = "(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*", H = /\S/, q = r({ keywords: k, hashComments: !0, cStyleComments: !0, multiLineStrings: !0, regexLiterals: !0 }), W = {}; - l(q, [ "default-code" ]), l(o([], [ [ M, /^[^]+/ ], [ I, /^]*(?:>|$)/ ], [ D, /^<\!--[\s\S]*?(?:-\->|$)/ ], [ "lang-", /^<\?([\s\S]+?)(?:\?>|$)/ ], [ "lang-", /^<%([\s\S]+?)(?:%>|$)/ ], [ B, /^(?:<[%?]|[%?]>)/ ], [ "lang-", /^]*>([\s\S]+?)<\/xmp\b[^>]*>/i ], [ "lang-js", /^