diff --git a/bower.json b/bower.json index fa0aaf82..85eef5d1 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "stackedit", - "version": "3.99.9", + "version": "3.99.10", "description": "StackEdit is a free, open-source Markdown editor based on PageDown, the Markdown library used by Stack Overflow and the other Stack Exchange sites.", "dependencies": { "bootstrap": "3.0.3", diff --git a/package.json b/package.json index 90e0cc60..c24c0b56 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "stackedit", - "version": "3.99.9", + "version": "3.99.10", "private": true, "description": "StackEdit is a free, open-source Markdown editor based on PageDown, the Markdown library used by Stack Overflow and the other Stack Exchange sites.", "main": "res/main.js", diff --git a/public/cache.manifest b/public/cache.manifest index 09f5d8fa..c47a5fc1 100644 --- a/public/cache.manifest +++ b/public/cache.manifest @@ -1,5 +1,5 @@ CACHE MANIFEST -#Date Wed May 28 2014 09:04:33 +#Date Mon Jun 09 2014 19:35:40 CACHE: libs/MathJax/MathJax.js?config=TeX-AMS_HTML diff --git a/public/res-min/main.js b/public/res-min/main.js index edcdb514..f97c5441 100644 --- a/public/res-min/main.js +++ b/public/res-min/main.js @@ -365,6 +365,12 @@ THE SOFTWARE. // │ Licensed under the MIT (http://raphaeljs.com/license.html) license. │ \\ // └─────────────────────────────────────────────────────────────────────┘ \\ +/** js sequence diagrams 1.0.4 + * http://bramp.github.io/js-sequence-diagrams/ + * (c) 2012-2013 Andrew Brampton (bramp.net) + * @license Simplified BSD license. + */ + // flowchart, v1.2.10 // Copyright (c)2014 Adriano Raiano (adrai). // Distributed under MIT license @@ -936,7 +942,7 @@ function diff_match_patch() { return a ? (a !== c[0] && c.unshift(a), i[a]) : void 0 } - function A(e, t, n, i) { + function M(e, t, n, i) { var r, o, a, s, l, c = {}, u = e.dataTypes.slice(); if(u[1]) for(a in e.converters) c[a.toLowerCase()] = e.converters[a]; @@ -967,7 +973,7 @@ function diff_match_patch() { } } - function M() { + function A() { return setTimeout(function() { In = t }), In = ot.now() @@ -980,13 +986,13 @@ function diff_match_patch() { function P(e, t, n) { var i, r, o = 0, - a = Mn.length, + a = An.length, s = ot.Deferred().always(function() { delete l.elem }), l = function() { if(r) return !1; - for(var t = In || M(), n = Math.max(0, c.startTime + c.duration - t), i = n / c.duration || 0, o = 1 - i, a = 0, l = c.tweens.length; l > a; a++) c.tweens[a].run(o); + for(var t = In || A(), n = Math.max(0, c.startTime + c.duration - t), i = n / c.duration || 0, o = 1 - i, a = 0, l = c.tweens.length; l > a; a++) c.tweens[a].run(o); return s.notifyWith(e, [c, o, n]), 1 > o && l ? n : (s.resolveWith(e, [c]), !1) }, c = s.promise({ elem: e, @@ -996,7 +1002,7 @@ function diff_match_patch() { }, n), originalProperties: t, originalOptions: n, - startTime: In || M(), + startTime: In || A(), duration: n.duration, tweens: [], createTween: function(t, n) { @@ -1013,7 +1019,7 @@ function diff_match_patch() { }), u = c.props; for(F(u, c.opts.specialEasing); a > o; o++) - if(i = Mn[o].call(c, e, u, c.opts)) return i; + if(i = An[o].call(c, e, u, c.opts)) return i; return ot.map(u, R, c), ot.isFunction(c.opts.start) && c.opts.start.call(e, c), ot.fx.timer(ot.extend(l, { elem: e, anim: c, @@ -1337,7 +1343,7 @@ function diff_match_patch() { function(e, t) { function n(e, t, n, i) { var r, o, a, s, l, c, u, d, f, m; - if((t ? t.ownerDocument || t : $) !== A && L(t), t = t || A, n = n || [], !e || "string" != typeof e) return n; + if((t ? t.ownerDocument || t : $) !== M && L(t), t = t || M, n = n || [], !e || "string" != typeof e) return n; if(1 !== (s = t.nodeType) && 9 !== s) return []; if(R && !i) { if(r = yt.exec(e)) @@ -1378,7 +1384,7 @@ function diff_match_patch() { } function o(e) { - var t = A.createElement("div"); + var t = M.createElement("div"); try { return !!e(t) } catch(n) { @@ -1540,7 +1546,7 @@ function diff_match_patch() { x = N, w = r || a && k.find.TAG("*", u && s.parentNode || s), S = G += null == x ? 1 : Math.random() || .1; - for(y && (N = s !== A && s, _ = i); null != (d = w[v]); v++) { + for(y && (N = s !== M && s, _ = i); null != (d = w[v]); v++) { if(a && d) { for(p = 0; h = e[p++];) if(h(d, s, l)) { @@ -1585,7 +1591,7 @@ function diff_match_patch() { } return I(e, c)(i, t, !R, n, ht.test(e)), n } - var S, C, _, k, T, E, I, N, D, L, A, M, R, P, F, O, B, j = "sizzle" + -new Date, + var S, C, _, k, T, E, I, N, D, L, M, A, R, P, F, O, B, j = "sizzle" + -new Date, $ = e.document, G = 0, q = 0, @@ -1657,7 +1663,7 @@ function diff_match_patch() { }, C = n.support = {}, L = n.setDocument = function(e) { var t = e ? e.ownerDocument || e : $, n = t.defaultView; - return t !== A && 9 === t.nodeType && t.documentElement ? (A = t, M = t.documentElement, R = !E(t), n && n.attachEvent && n !== n.top && n.attachEvent("onbeforeunload", function() { + return t !== M && 9 === t.nodeType && t.documentElement ? (M = t, A = t.documentElement, R = !E(t), n && n.attachEvent && n !== n.top && n.attachEvent("onbeforeunload", function() { L() }), C.attributes = o(function(e) { return e.className = "i", !e.getAttribute("className") @@ -1666,7 +1672,7 @@ function diff_match_patch() { }), C.getElementsByClassName = o(function(e) { return e.innerHTML = "
", e.firstChild.className = "i", 2 === e.getElementsByClassName("i").length }), C.getById = o(function(e) { - return M.appendChild(e).id = j, !t.getElementsByName || !t.getElementsByName(j).length + return A.appendChild(e).id = j, !t.getElementsByName || !t.getElementsByName(j).length }), C.getById ? (k.find.ID = function(e, t) { if(typeof t.getElementById !== X && R) { var n = t.getElementById(e); @@ -1701,9 +1707,9 @@ function diff_match_patch() { }), o(function(e) { var n = t.createElement("input"); n.setAttribute("type", "hidden"), e.appendChild(n).setAttribute("t", ""), e.querySelectorAll("[t^='']").length && P.push("[*^$]=" + rt + "*(?:''|\"\")"), e.querySelectorAll(":enabled").length || P.push(":enabled", ":disabled"), e.querySelectorAll("*,:x"), P.push(",.*:") - })), (C.matchesSelector = bt.test(O = M.webkitMatchesSelector || M.mozMatchesSelector || M.oMatchesSelector || M.msMatchesSelector)) && o(function(e) { + })), (C.matchesSelector = bt.test(O = A.webkitMatchesSelector || A.mozMatchesSelector || A.oMatchesSelector || A.msMatchesSelector)) && o(function(e) { C.disconnectedMatch = O.call(e, "div"), O.call(e, "[s!='']:x"), F.push("!=", ct) - }), P = P.length && new RegExp(P.join("|")), F = F.length && new RegExp(F.join("|")), B = bt.test(M.contains) || M.compareDocumentPosition ? function(e, t) { + }), P = P.length && new RegExp(P.join("|")), F = F.length && new RegExp(F.join("|")), B = bt.test(A.contains) || A.compareDocumentPosition ? function(e, t) { var n = 9 === e.nodeType ? e.documentElement : e, i = t && t.parentNode; return e === i || !(!i || 1 !== i.nodeType || !(n.contains ? n.contains(i) : e.compareDocumentPosition && 16 & e.compareDocumentPosition(i))) @@ -1712,7 +1718,7 @@ function diff_match_patch() { for(; t = t.parentNode;) if(t === e) return !0; return !1 - }, W = M.compareDocumentPosition ? function(e, n) { + }, W = A.compareDocumentPosition ? function(e, n) { if(e === n) return V = !0, 0; var i = n.compareDocumentPosition && e.compareDocumentPosition && e.compareDocumentPosition(n); return i ? 1 & i || !C.sortDetached && n.compareDocumentPosition(e) === i ? e === t || B($, e) ? -1 : n === t || B($, n) ? 1 : D ? nt.call(D, e) - nt.call(D, n) : 0 : 4 & i ? -1 : 1 : e.compareDocumentPosition ? -1 : 1 @@ -1729,19 +1735,19 @@ function diff_match_patch() { for(i = n; i = i.parentNode;) c.unshift(i); for(; l[r] === c[r];) r++; return r ? s(l[r], c[r]) : l[r] === $ ? -1 : c[r] === $ ? 1 : 0 - }, t) : A + }, t) : M }, n.matches = function(e, t) { return n(e, null, null, t) }, n.matchesSelector = function(e, t) { - if((e.ownerDocument || e) !== A && L(e), t = t.replace(ft, "='$1']"), !(!C.matchesSelector || !R || F && F.test(t) || P && P.test(t))) try { + if((e.ownerDocument || e) !== M && L(e), t = t.replace(ft, "='$1']"), !(!C.matchesSelector || !R || F && F.test(t) || P && P.test(t))) try { var i = O.call(e, t); if(i || C.disconnectedMatch || e.document && 11 !== e.document.nodeType) return i } catch(r) {} - return n(t, A, null, [e]).length > 0 + return n(t, M, null, [e]).length > 0 }, n.contains = function(e, t) { - return(e.ownerDocument || e) !== A && L(e), B(e, t) + return(e.ownerDocument || e) !== M && L(e), B(e, t) }, n.attr = function(e, n) { - (e.ownerDocument || e) !== A && L(e); + (e.ownerDocument || e) !== M && L(e); var i = k.attrHandle[n.toLowerCase()], r = i && Y.call(k.attrHandle, n.toLowerCase()) ? i(e, n, !R) : t; return r === t ? C.attributes || !R ? e.getAttribute(n) : (r = e.getAttributeNode(n)) && r.specified ? r.value : null : r @@ -1901,10 +1907,10 @@ function diff_match_patch() { return n && n.slice(1) === t.id }, root: function(e) { - return e === M + return e === A }, focus: function(e) { - return e === A.activeElement && (!A.hasFocus || A.hasFocus()) && !! (e.type || e.href || ~e.tabIndex) + return e === M.activeElement && (!M.hasFocus || M.hasFocus()) && !! (e.type || e.href || ~e.tabIndex) }, enabled: function(e) { return e.disabled === !1 @@ -1989,7 +1995,7 @@ function diff_match_patch() { } return o }, C.sortStable = j.split("").sort(W).join("") === j, C.detectDuplicates = V, L(), C.sortDetached = o(function(e) { - return 1 & e.compareDocumentPosition(A.createElement("div")) + return 1 & e.compareDocumentPosition(M.createElement("div")) }), o(function(e) { return e.innerHTML = "", "#" === e.firstChild.getAttribute("href") }) || a("type|href|height|width", function(e, t, n) { @@ -2812,8 +2818,8 @@ function diff_match_patch() { return n } }); - var At = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi, - Mt = /<([\w:]+)/, + var Mt = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi, + At = /<([\w:]+)/, Rt = /<|?\w+;/, Pt = /<(?:script|style|link)/i, Ft = /^(?:checkbox|radio)$/i, @@ -2879,8 +2885,8 @@ function diff_match_patch() { var n = this[0] || {}, i = 0, r = this.length; if(e === t && 1 === n.nodeType) return n.innerHTML; - if("string" == typeof e && !Pt.test(e) && !Gt[(Mt.exec(e) || ["", ""])[1].toLowerCase()]) { - e = e.replace(At, "<$1>$2>"); + if("string" == typeof e && !Pt.test(e) && !Gt[(At.exec(e) || ["", ""])[1].toLowerCase()]) { + e = e.replace(Mt, "<$1>$2>"); try { for(; r > i; i++) n = this[i] || {}, 1 === n.nodeType && (ot.cleanData(g(n, !1)), n.innerHTML = e); n = 0 @@ -2950,7 +2956,7 @@ function diff_match_patch() { if(r = e[u], r || 0 === r) if("object" === ot.type(r)) ot.merge(h, r.nodeType ? [r] : r); else if(Rt.test(r)) { - for(o = o || p.appendChild(t.createElement("div")), a = (Mt.exec(r) || ["", ""])[1].toLowerCase(), s = Gt[a] || Gt._default, o.innerHTML = s[1] + r.replace(At, "<$1>$2>") + s[2], c = s[0]; c--;) o = o.lastChild; + for(o = o || p.appendChild(t.createElement("div")), a = (At.exec(r) || ["", ""])[1].toLowerCase(), s = Gt[a] || Gt._default, o.innerHTML = s[1] + r.replace(Mt, "<$1>$2>") + s[2], c = s[0]; c--;) o = o.lastChild; ot.merge(h, o.childNodes), o = p.firstChild, o.textContent = "" } else h.push(t.createTextNode(r)); for(p.textContent = "", u = 0; r = h[u++];) @@ -3276,7 +3282,7 @@ function diff_match_patch() { ajax: function(e, n) { function i(e, n, i, s) { var c, d, b, y, w, C = n; - 2 !== x && (x = 2, l && clearTimeout(l), r = t, a = s || "", S.readyState = e > 0 ? 4 : 0, c = e >= 200 && 300 > e || 304 === e, i && (y = L(p, S, i)), y = A(p, y, S, c), c ? (p.ifModified && (w = S.getResponseHeader("Last-Modified"), w && (ot.lastModified[o] = w), w = S.getResponseHeader("etag"), w && (ot.etag[o] = w)), 204 === e || "HEAD" === p.type ? C = "nocontent" : 304 === e ? C = "notmodified" : (C = y.state, d = y.data, b = y.error, c = !b)) : (b = C, (e || !C) && (C = "error", 0 > e && (e = 0))), S.status = e, S.statusText = (n || C) + "", c ? m.resolveWith(h, [d, C, S]) : m.rejectWith(h, [S, C, b]), S.statusCode(v), v = t, u && f.trigger(c ? "ajaxSuccess" : "ajaxError", [S, p, c ? d : b]), g.fireWith(h, [S, C]), u && (f.trigger("ajaxComplete", [S, p]), --ot.active || ot.event.trigger("ajaxStop"))) + 2 !== x && (x = 2, l && clearTimeout(l), r = t, a = s || "", S.readyState = e > 0 ? 4 : 0, c = e >= 200 && 300 > e || 304 === e, i && (y = L(p, S, i)), y = M(p, y, S, c), c ? (p.ifModified && (w = S.getResponseHeader("Last-Modified"), w && (ot.lastModified[o] = w), w = S.getResponseHeader("etag"), w && (ot.etag[o] = w)), 204 === e || "HEAD" === p.type ? C = "nocontent" : 304 === e ? C = "notmodified" : (C = y.state, d = y.data, b = y.error, c = !b)) : (b = C, (e || !C) && (C = "error", 0 > e && (e = 0))), S.status = e, S.statusText = (n || C) + "", c ? m.resolveWith(h, [d, C, S]) : m.rejectWith(h, [S, C, b]), S.statusCode(v), v = t, u && f.trigger(c ? "ajaxSuccess" : "ajaxError", [S, p, c ? d : b]), g.fireWith(h, [S, C]), u && (f.trigger("ajaxComplete", [S, p]), --ot.active || ot.event.trigger("ajaxStop"))) } "object" == typeof e && (n = e, e = t), n = n || {}; var r, o, a, s, l, c, u, d, p = ot.ajaxSetup({}, n), @@ -3447,8 +3453,8 @@ function diff_match_patch() { }); var In, Nn, Dn = /^(?:toggle|show|hide)$/, Ln = new RegExp("^(?:([+-])=|)(" + at + ")([a-z%]*)$", "i"), - An = /queueHooks$/, - Mn = [O], + Mn = /queueHooks$/, + An = [O], Rn = { "*": [ function(e, t) { @@ -3472,7 +3478,7 @@ function diff_match_patch() { for(var n, i = 0, r = e.length; r > i; i++) n = e[i], Rn[n] = Rn[n] || [], Rn[n].unshift(t) }, prefilter: function(e, t) { - t ? Mn.unshift(e) : Mn.push(e) + t ? An.unshift(e) : An.push(e) } }), ot.Tween = B, B.prototype = { constructor: B, @@ -3533,7 +3539,7 @@ function diff_match_patch() { a = gt.get(this); if(n) a[n] && a[n].stop && r(a[n]); else - for(n in a) a[n] && a[n].stop && An.test(n) && r(a[n]); + for(n in a) a[n] && a[n].stop && Mn.test(n) && r(a[n]); for(n = o.length; n--;) o[n].elem !== this || null != e && o[n].queue !== e || (o[n].anim.stop(i), t = !1, o.splice(n, 1)); (t || !i) && ot.dequeue(this, e) }) @@ -4185,7 +4191,7 @@ function diff_match_patch() { } } - function A(n, i, a) { + function M(n, i, a) { function s(e, t) { return function(n) { b(this), y(n, $), y(z(n), G); @@ -4295,14 +4301,14 @@ function diff_match_patch() { }), D(n) } - function M(e) { + function A(e) { e.collapsed = e.startContainer === e.endContainer && e.startOffset === e.endOffset, e.commonAncestorContainer = e.collapsed ? e.startContainer : O.getCommonAncestor(e.startContainer, e.endContainer) } function R(e, t, n, r, o) { var a = e.startContainer !== t || e.startOffset !== n, s = e.endContainer !== r || e.endOffset !== o; - e.startContainer = t, e.startOffset = n, e.endContainer = r, e.endOffset = o, M(e), i(e, "boundarychange", { + e.startContainer = t, e.startOffset = n, e.endContainer = r, e.endOffset = o, A(e), i(e, "boundarychange", { startMoved: a, endMoved: s }) @@ -4316,7 +4322,7 @@ function diff_match_patch() { this.startContainer = e, this.startOffset = 0, this.endContainer = e, this.endOffset = 0, this._listeners = { boundarychange: [], detach: [] - }, M(this) + }, A(this) } e.requireModules(["DomUtil"]); var O = e.dom, @@ -4567,7 +4573,7 @@ function diff_match_patch() { inspect: function() { return p(this) } - }, A(F, R, P), e.rangePrototype = I.prototype, F.rangeProperties = Z, F.RangeIterator = h, F.copyComparisonConstants = D, F.createPrototypeRange = A, F.inspect = p, F.getRangeDocument = n, F.rangesEqual = function(e, t) { + }, M(F, R, P), e.rangePrototype = I.prototype, F.rangeProperties = Z, F.RangeIterator = h, F.copyComparisonConstants = D, F.createPrototypeRange = M, F.inspect = p, F.getRangeDocument = n, F.rangesEqual = function(e, t) { return e.startContainer === t.startContainer && e.startOffset === t.startOffset && e.endContainer === t.endContainer && e.endOffset === t.endOffset }, e.DomRange = F, e.RangeException = f }), rangy.createModule("WrappedRange", function(e) { @@ -4878,18 +4884,18 @@ function diff_match_patch() { }) : N ? (b = n, e.isSelectionValid = function() { return !0 }) : t.fail("Neither document.selection or window.getSelection() detected."), e.getNativeSelection = b; - var A = b(), - M = e.createNativeRange(document), + var M = b(), + A = e.createNativeRange(document), R = S.getBody(document), - P = C.areHostObjects(A, ["anchorNode", "focusNode"] && C.areHostProperties(A, ["anchorOffset", "focusOffset"])); + P = C.areHostObjects(M, ["anchorNode", "focusNode"] && C.areHostProperties(M, ["anchorOffset", "focusOffset"])); e.features.selectionHasAnchorAndFocus = P; - var F = C.isHostMethod(A, "extend"); + var F = C.isHostMethod(M, "extend"); e.features.selectionHasExtend = F; - var O = "number" == typeof A.rangeCount; + var O = "number" == typeof M.rangeCount; e.features.selectionHasRangeCount = O; var B = !1, j = !0; - C.areHostMethods(A, ["addRange", "getRangeAt", "removeAllRanges"]) && "number" == typeof A.rangeCount && e.features.implementsDomRange && ! function() { + C.areHostMethods(M, ["addRange", "getRangeAt", "removeAllRanges"]) && "number" == typeof M.rangeCount && e.features.implementsDomRange && ! function() { var e = document.createElement("iframe"); e.frameBorder = 0, e.style.position = "absolute", e.style.left = "-10000px", R.appendChild(e); var t = S.getIframeDocument(e); @@ -4910,7 +4916,7 @@ function diff_match_patch() { return e.rangeCount ? e.getRangeAt(e.rangeCount - 1).collapsed : !1 }; var q; - C.isHostMethod(A, "getRangeAt") ? q = function(e, t) { + C.isHostMethod(M, "getRangeAt") ? q = function(e, t) { try { return e.getRangeAt(t) } catch(n) { @@ -4930,7 +4936,7 @@ function diff_match_patch() { return e.getSelection(S.getIframeWindow(t)) }; var H = f.prototype; - if(!L && P && C.areHostMethods(A, ["removeAllRanges", "addRange"])) { + if(!L && P && C.areHostMethods(M, ["removeAllRanges", "addRange"])) { H.removeAllRanges = function() { this.nativeSelection.removeAllRanges(), a(this) }; @@ -4962,7 +4968,7 @@ function diff_match_patch() { } } } else { - if(!(C.isHostMethod(A, "empty") && C.isHostMethod(M, "select") && G && L)) return t.fail("No means of selecting a Range or TextRange was found"), !1; + if(!(C.isHostMethod(M, "empty") && C.isHostMethod(A, "select") && G && L)) return t.fail("No means of selecting a Range or TextRange was found"), !1; H.removeAllRanges = function() { try { if(this.docSelection.empty(), "None" != this.docSelection.type) { @@ -4996,7 +5002,7 @@ function diff_match_patch() { var n; e.isSelectionValid(t.win) ? n = t.docSelection.createRange() : (n = S.getBody(t.win.document).createTextRange(), n.collapse(!0)), t.docSelection.type == I ? p(t) : u(n) ? d(t, n) : a(t) }; - else if(C.isHostMethod(A, "getRangeAt") && "number" == typeof A.rangeCount) z = function(t) { + else if(C.isHostMethod(M, "getRangeAt") && "number" == typeof M.rangeCount) z = function(t) { if(G && D && t.docSelection.type == I) p(t); else if(t._ranges.length = t.rangeCount = t.nativeSelection.rangeCount, t.rangeCount) { for(var n = 0, i = t.rangeCount; i > n; ++n) t._ranges[n] = new e.WrappedRange(t.nativeSelection.getRangeAt(n)); @@ -5004,7 +5010,7 @@ function diff_match_patch() { } else a(t) }; else { - if(!P || typeof A.isCollapsed != x || typeof M.collapsed != x || !e.features.implementsDomRange) return t.fail("No means of obtaining a Range or TextRange from the user's selection was found"), !1; + if(!P || typeof M.isCollapsed != x || typeof A.collapsed != x || !e.features.implementsDomRange) return t.fail("No means of obtaining a Range or TextRange from the user's selection was found"), !1; z = function(e) { var t, n = e.nativeSelection; n.anchorNode ? (t = q(n, 0), e._ranges = [t], e.rangeCount = 1, o(e), e.isCollapsed = y(e)) : a(e) @@ -5584,7 +5590,7 @@ function() { }, C.random = function(e, t) { return null == t && (t = e, e = 0), e + Math.floor(Math.random() * (t - e + 1)) }; - var A = { + var M = { escape: { "&": "&", "<": "<", @@ -5594,15 +5600,15 @@ function() { "/": "/" } }; - A.unescape = C.invert(A.escape); - var M = { - escape: new RegExp("[" + C.keys(A.escape).join("") + "]", "g"), - unescape: new RegExp("(" + C.keys(A.unescape).join("|") + ")", "g") + M.unescape = C.invert(M.escape); + var A = { + escape: new RegExp("[" + C.keys(M.escape).join("") + "]", "g"), + unescape: new RegExp("(" + C.keys(M.unescape).join("|") + ")", "g") }; C.each(["escape", "unescape"], function(e) { C[e] = function(t) { - return null == t ? "" : ("" + t).replace(M[e], function(t) { - return A[e][t] + return null == t ? "" : ("" + t).replace(A[e], function(t) { + return M[e][t] }) } }), C.result = function(e, t) { @@ -5805,7 +5811,7 @@ function(e) { } function s(e, t) { - return A.call(e) === "[object " + t + "]" + return M.call(e) === "[object " + t + "]" } function l(e, t, n) { @@ -5886,7 +5892,7 @@ function(e) { i: !0, m: !0, y: D - }, A = {}.toString; + }, M = {}.toString; return g = function(n, r) { var o, a, s, l = { hasNamedCapture: !1, @@ -5952,7 +5958,7 @@ function(e) { }, g.isInstalled = function(e) { return !!y[e] }, g.isRegExp = function(e) { - return "[object RegExp]" === A.call(e) + return "[object RegExp]" === M.call(e) }, g.match = function(e, t, n) { var o, a, s = t.global && "one" !== n || "all" === n, l = (s ? "g" : "") + (t.sticky ? "y" : ""); @@ -7873,6 +7879,26 @@ var saveAs = saveAs || "undefined" != typeof navigator && navigator.msSaveOrOpen o = screen.height / 2 - i / 2; return window.open(e, t, ["toolbar=no, ", "location=no, ", "directories=no, ", "status=no, ", "menubar=no, ", "scrollbars=no, ", "resizable=no, ", "copyhistory=no, ", "width=" + n + ", ", "height=" + i + ", ", "top=" + o + ", ", "left=" + r].join("")) }; + var $windowElt = $(window); + utils.iframe = function(e, t, n) { + function i() { + var e = window.innerWidth - 20; + e > t && (e = t); + var i = window.innerHeight - 50; + i > n && (i = n), a.setAttribute("width", e), a.setAttribute("height", i) + } + + function r() { + o.off("click.backdrop"), o[0].removeBackdrop(), $windowElt.off("resize.iframe"), a.parentNode.removeChild(a) + } + var o = $(utils.createBackdrop()), + a = crel("iframe", { + src: e, + frameborder: 0, + "class": "modal-content modal-iframe" + }); + return document.body.appendChild(a), i(), $windowElt.on("resize.iframe", i), a.removeIframe = r, o.on("click.backdrop", r), a + }; var redirectCallbackConfirm, redirectCallbackCancel; utils.redirectConfirm = function(e, t, n) { redirectCallbackConfirm = t, redirectCallbackCancel = n, $(".modal-redirect-confirm .redirect-msg").html(e), $(".modal-redirect-confirm").modal("show") @@ -7982,7 +8008,7 @@ var saveAs = saveAs || "undefined" != typeof navigator && navigator.msSaveOrOpen }, utils }), define("constants", [], function() { var e = {}; - return e.VERSION = "3.99.9", e.MAIN_URL = "https://stackedit.io/", e.GOOGLE_ANALYTICS_ACCOUNT_ID = "UA-39556145-1", e.GOOGLE_API_KEY = "AIzaSyAeCU8CGcSkn0z9js6iocHuPBX4f_mMWkw", e.GOOGLE_DRIVE_APP_ID = "241271498917", e.DROPBOX_APP_KEY = "lq6mwopab8wskas", e.DROPBOX_APP_SECRET = "851fgnucpezy84t", e.DROPBOX_RESTRICTED_APP_KEY = "sw0hlixhr8q1xk0", e.DROPBOX_RESTRICTED_APP_SECRET = "1r808p2xygs6lbg", e.BITLY_ACCESS_TOKEN = "317e033bfd48cf31155a68a536b1860013b09c4c", e.DEFAULT_FILE_TITLE = "Title", e.DEFAULT_FOLDER_NAME = "New folder", e.GDRIVE_DEFAULT_FILE_TITLE = "New Markdown document", e.EDITOR_DEFAULT_PADDING = 35, e.CHECK_ONLINE_PERIOD = 12e4, e.AJAX_TIMEOUT = 3e4, e.ASYNC_TASK_DEFAULT_TIMEOUT = 6e4, e.ASYNC_TASK_LONG_TIMEOUT = 18e4, e.USER_IDLE_THRESHOLD = 3e5, e.IMPORT_FILE_MAX_CONTENT_SIZE = 1e5, e.IMPORT_IMG_MAX_CONTENT_SIZE = 1e7, e.TEMPORARY_FILE_INDEX = "file.tempIndex", e.WELCOME_DOCUMENT_TITLE = "Welcome document", e.DOWNLOAD_PROXY_URL = "https://stackedit-download-proxy.herokuapp.com/", e.PICASA_PROXY_URL = "https://stackedit-picasa-proxy.herokuapp.com/", e.SSH_PROXY_URL = "https://stackedit-ssh-proxy.herokuapp.com/", e.HTMLTOPDF_URL = "https://stackedit-htmltopdf.herokuapp.com/", e.BASE_URL = "http://localhost/", e.GOOGLE_CLIENT_ID = "241271498917-lev37kef013q85avc91am1gccg5g8lrb.apps.googleusercontent.com", e.GITHUB_CLIENT_ID = "e47fef6055344579799d", e.GATEKEEPER_URL = "https://stackedit-gatekeeper-localhost.herokuapp.com/", e.TUMBLR_PROXY_URL = "https://stackedit-tumblr-proxy-local.herokuapp.com/", e.WORDPRESS_CLIENT_ID = "23361", e.WORDPRESS_PROXY_URL = "https://stackedit-io-wordpress-proxy.herokuapp.com/", 0 === location.hostname.indexOf("stackedit.io") ? (e.BASE_URL = e.MAIN_URL, e.GOOGLE_CLIENT_ID = "241271498917-t4t7d07qis7oc0ahaskbif3ft6tk63cd.apps.googleusercontent.com", e.GITHUB_CLIENT_ID = "710fc67886ab1ae8fee6", e.GATEKEEPER_URL = "https://stackedit-io-gatekeeper.herokuapp.com/", e.TUMBLR_PROXY_URL = "https://stackedit-io-tumblr-proxy.herokuapp.com/") : 0 === location.hostname.indexOf("benweet.github.io") ? (e.BASE_URL = "http://benweet.github.io/stackedit/", e.GOOGLE_CLIENT_ID = "241271498917-jpto9lls9fqnem1e4h6ppds9uob8rpvu.apps.googleusercontent.com", e.GITHUB_CLIENT_ID = "fa0d09514da8377ee32e", e.GATEKEEPER_URL = "https://stackedit-gatekeeper.herokuapp.com/", e.TUMBLR_PROXY_URL = "https://stackedit-tumblr-proxy.herokuapp.com/", e.WORDPRESS_CLIENT_ID = "3185", e.WORDPRESS_PROXY_URL = "https://stackedit-wordpress-proxy.herokuapp.com/") : 0 === location.hostname.indexOf("stackedit-beta.herokuapp.com") ? (e.BASE_URL = "https://stackedit-beta.herokuapp.com/", e.GOOGLE_CLIENT_ID = "241271498917-9bbplknkt0ljv5gaudhoiogp13hd18be.apps.googleusercontent.com", e.GITHUB_CLIENT_ID = "e9034ae191c3a8a1c5ed", e.GATEKEEPER_URL = "https://stackedit-beta-gatekeeper.herokuapp.com/", e.TUMBLR_PROXY_URL = "https://stackedit-beta-tumblr-proxy.herokuapp.com/", e.WORDPRESS_CLIENT_ID = "34786", e.WORDPRESS_PROXY_URL = "https://stackedit-beta-wordpress-proxy.herokuapp.com/") : 0 === location.hostname.indexOf("benweet.insomnia247.nl") && (e.BASE_URL = "http://benweet.insomnia247.nl/stackedit/", e.GOOGLE_CLIENT_ID = "241271498917-52hae7a08hv7ltenv7km8h7lghno9sk3.apps.googleusercontent.com", e.GITHUB_CLIENT_ID = "d2943d6074b2d9c4a830", e.GATEKEEPER_URL = "https://stackedit-gatekeeper-insomnia.herokuapp.com/", e.TUMBLR_PROXY_URL = "https://stackedit-tumblr-proxy-beta.herokuapp.com/"), e.THEME_LIST = { + return e.VERSION = "3.99.10", e.MAIN_URL = "https://stackedit.io/", e.GOOGLE_ANALYTICS_ACCOUNT_ID = "UA-39556145-1", e.GOOGLE_API_KEY = "AIzaSyAeCU8CGcSkn0z9js6iocHuPBX4f_mMWkw", e.GOOGLE_DRIVE_APP_ID = "241271498917", e.DROPBOX_APP_KEY = "lq6mwopab8wskas", e.DROPBOX_APP_SECRET = "851fgnucpezy84t", e.DROPBOX_RESTRICTED_APP_KEY = "sw0hlixhr8q1xk0", e.DROPBOX_RESTRICTED_APP_SECRET = "1r808p2xygs6lbg", e.BITLY_ACCESS_TOKEN = "317e033bfd48cf31155a68a536b1860013b09c4c", e.DEFAULT_FILE_TITLE = "Title", e.DEFAULT_FOLDER_NAME = "New folder", e.GDRIVE_DEFAULT_FILE_TITLE = "New Markdown document", e.EDITOR_DEFAULT_PADDING = 35, e.CHECK_ONLINE_PERIOD = 12e4, e.AJAX_TIMEOUT = 3e4, e.ASYNC_TASK_DEFAULT_TIMEOUT = 6e4, e.ASYNC_TASK_LONG_TIMEOUT = 18e4, e.USER_IDLE_THRESHOLD = 3e5, e.IMPORT_FILE_MAX_CONTENT_SIZE = 1e5, e.IMPORT_IMG_MAX_CONTENT_SIZE = 1e7, e.TEMPORARY_FILE_INDEX = "file.tempIndex", e.WELCOME_DOCUMENT_TITLE = "Welcome document", e.DOWNLOAD_PROXY_URL = "https://stackedit-download-proxy.herokuapp.com/", e.PICASA_PROXY_URL = "https://stackedit-picasa-proxy.herokuapp.com/", e.SSH_PROXY_URL = "https://stackedit-ssh-proxy.herokuapp.com/", e.HTMLTOPDF_URL = "https://stackedit-htmltopdf.herokuapp.com/", e.BASE_URL = "http://localhost/", e.GOOGLE_CLIENT_ID = "241271498917-lev37kef013q85avc91am1gccg5g8lrb.apps.googleusercontent.com", e.GITHUB_CLIENT_ID = "e47fef6055344579799d", e.GATEKEEPER_URL = "https://stackedit-gatekeeper-localhost.herokuapp.com/", e.TUMBLR_PROXY_URL = "https://stackedit-tumblr-proxy-local.herokuapp.com/", e.WORDPRESS_CLIENT_ID = "23361", e.WORDPRESS_PROXY_URL = "https://stackedit-io-wordpress-proxy.herokuapp.com/", 0 === location.hostname.indexOf("stackedit.io") ? (e.BASE_URL = e.MAIN_URL, e.GOOGLE_CLIENT_ID = "241271498917-t4t7d07qis7oc0ahaskbif3ft6tk63cd.apps.googleusercontent.com", e.GITHUB_CLIENT_ID = "710fc67886ab1ae8fee6", e.GATEKEEPER_URL = "https://stackedit-io-gatekeeper.herokuapp.com/", e.TUMBLR_PROXY_URL = "https://stackedit-io-tumblr-proxy.herokuapp.com/") : 0 === location.hostname.indexOf("benweet.github.io") ? (e.BASE_URL = "http://benweet.github.io/stackedit/", e.GOOGLE_CLIENT_ID = "241271498917-jpto9lls9fqnem1e4h6ppds9uob8rpvu.apps.googleusercontent.com", e.GITHUB_CLIENT_ID = "fa0d09514da8377ee32e", e.GATEKEEPER_URL = "https://stackedit-gatekeeper.herokuapp.com/", e.TUMBLR_PROXY_URL = "https://stackedit-tumblr-proxy.herokuapp.com/", e.WORDPRESS_CLIENT_ID = "3185", e.WORDPRESS_PROXY_URL = "https://stackedit-wordpress-proxy.herokuapp.com/") : 0 === location.hostname.indexOf("stackedit-beta.herokuapp.com") ? (e.BASE_URL = "https://stackedit-beta.herokuapp.com/", e.GOOGLE_CLIENT_ID = "241271498917-9bbplknkt0ljv5gaudhoiogp13hd18be.apps.googleusercontent.com", e.GITHUB_CLIENT_ID = "e9034ae191c3a8a1c5ed", e.GATEKEEPER_URL = "https://stackedit-beta-gatekeeper.herokuapp.com/", e.TUMBLR_PROXY_URL = "https://stackedit-beta-tumblr-proxy.herokuapp.com/", e.WORDPRESS_CLIENT_ID = "34786", e.WORDPRESS_PROXY_URL = "https://stackedit-beta-wordpress-proxy.herokuapp.com/") : 0 === location.hostname.indexOf("benweet.insomnia247.nl") && (e.BASE_URL = "http://benweet.insomnia247.nl/stackedit/", e.GOOGLE_CLIENT_ID = "241271498917-52hae7a08hv7ltenv7km8h7lghno9sk3.apps.googleusercontent.com", e.GITHUB_CLIENT_ID = "d2943d6074b2d9c4a830", e.GATEKEEPER_URL = "https://stackedit-gatekeeper-insomnia.herokuapp.com/", e.TUMBLR_PROXY_URL = "https://stackedit-tumblr-proxy-beta.herokuapp.com/"), e.THEME_LIST = { "default": "Default", gray: "Gray", night: "Night", @@ -9183,7 +9209,7 @@ var prettyPrintOne, prettyPrint; var s = ("" + e.keywords).replace(/^ | $/g, ""); s.length && n.push([N, new RegExp("^(?:" + s.replace(/[\s,]+/g, "|") + ")\\b"), null]), t.push([R, /^\s+/, null, " \r\n "]); var l = /^.[^\s\w\.$@\'\"\`\/\\]*/; - return n.push([A, /^@[a-z_$][a-z_$@0-9]*/i, null], [L, /^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/, null], [R, /^[a-z_$][a-z_$@0-9]*/i, null], [A, new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*", "i"), null, "0123456789"], [R, /^\\[\s\S]?/, null], [M, l, null]), r(t, n) + return n.push([M, /^@[a-z_$][a-z_$@0-9]*/i, null], [L, /^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/, null], [R, /^[a-z_$][a-z_$@0-9]*/i, null], [M, new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*", "i"), null, "0123456789"], [R, /^\\[\s\S]?/, null], [A, l, null]), r(t, n) } function a(e, t, n) { @@ -9396,8 +9422,8 @@ var prettyPrintOne, prettyPrint; N = "kwd", D = "com", L = "typ", - A = "lit", - M = "pun", + M = "lit", + A = "pun", R = "pln", P = "tag", F = "dec", @@ -9415,7 +9441,7 @@ var prettyPrintOne, prettyPrint; regexLiterals: !0 }), U = {}; - l(H, ["default-code"]), l(r([], [[R, /^[^]+/], [F, /^]*(?:>|$)/], [D, /^<\!--[\s\S]*?(?:-\->|$)/], ["lang-", /^<\?([\s\S]+?)(?:\?>|$)/], ["lang-", /^<%([\s\S]+?)(?:%>|$)/], [M, /^(?:<[%?]|[%?]>)/], ["lang-", /^