2021-07-20 02:02:14 +00:00
|
|
|
!function (a, b) { "object" == typeof exports && "undefined" != typeof module ? module.exports = b() : "function" == typeof define && define.amd ? define(b) : a.Jotted = b() }(this, function () { "use strict"; function a() { var a = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}, b = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}, c = {}; return Object.keys(a).forEach(function (b) { c[b] = a[b] }), Object.keys(b).forEach(function (d) { "undefined" != typeof c[d] ? c[d] = a[d] : c[d] = b[d] }), c } function b(a, b) { var c = new window.XMLHttpRequest; c.open("GET", a), c.responseType = "text", c.onload = function () { 200 === c.status ? b(null, c.responseText) : b(a, c) }, c.onerror = function (a) { b(a) }, c.send() } function c(a, b, c, e, f) { return function (b, g) { b && e.push(b), a++, a < c.length ? d(a, g, c, e, f) : f(e, g) } } function d(a, b, d, e, f) { d[a](b, c.apply(this, arguments)) } function e(a, b) { var c = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : function () { }, e = []; return a.length ? void d(0, b, a, e, c) : c(e, b) } function f(a, b) { var c = null, d = null; return function () { var e = this, f = arguments; c ? d = !0 : a.apply(this, arguments), clearTimeout(c), c = setTimeout(function () { d && a.apply(e, f), c = null, d = null }, b) } } function g(a, b) { if (!a.className) return !1; var c = " " + a.className + " "; return b = " " + b + " ", c.indexOf(b) !== -1 } function h(a, b) { return g(a, b) ? a.className : (a.className && (b = " " + b), a.className += b, a.className) } function i(a, b) { var c = " " + b, d = b + " "; return a.className.indexOf(c) !== -1 ? a.className = a.className.replace(c, "") : a.className.indexOf(d) !== -1 ? a.className = a.className.replace(d, "") : a.className = a.className.replace(b, ""), a.className } function j(a, b) { return a.getAttribute("data-" + b) } function k() { var b = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "", c = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "", d = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {}, e = a(d, B); for (var f in e) { var g = f.length; if (c.slice(-g++) === "." + f) return e[f] } for (var h in e) if (b === h) return e[h]; return b } function l() { return '\n <ul class="jotted-nav">\n <li class="jotted-nav-item jotted-nav-item-result">\n <a href="#" data-jotted-type="result">\n Result\n </a>\n </li>\n <li class="jotted-nav-item jotted-nav-item-html">\n <a href="#" data-jotted-type="html">\n HTML\n </a>\n </li>\n <li class="jotted-nav-item jotted-nav-item-css">\n <a href="#" data-jotted-type="css">\n CSS\n </a>\n </li>\n <li class="jotted-nav-item jotted-nav-item-js">\n <a href="#" data-jotted-type="js">\n JavaScript\n </a>\n </li>\n </ul>\n <div class="jotted-pane jotted-pane-result"><iframe></iframe></div>\n <div class="jotted-pane jotted-pane-html"></div>\n <div class="jotted-pane jotted-pane-css"></div>\n <div class="jotted-pane jotted-pane-js"></div>\n ' } function m(a) { return "jotted-pane-active-" + a } function n() { return "jotted" } function o(a) { return "jotted-has-" + a } function p(a) { return "jotted-editor jotted-editor-" + a } function q(a) { var b = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : ""; return '\n <textarea data-jotted-type="' + a + '" data-jotted-file="' + b + '"></textarea>\n <div class="jotted-status"></div>\n ' } function r(a) { return "\n <p>" + a + "</p>\n " } function s(a) { return "jotted-status-" + a } function t(a) { return "jotted-status-active-" + a } function u(a) { return "jotted-plugin-" + a } function v(a) { return "Loading <strong>" + a + "</strong>.." } function w(a) { return "There was an error loading <strong>" + a + "</strong>." } function x(a) { for (var b in F) { var c = F[b]; if (c._id === a) return c } throw new Error("Plugin " + a + " is not registered.") } functio
|