From ca8506f16564bb8db5a5caae9caa9370b7b2a3b2 Mon Sep 17 00:00:00 2001 From: Jaidyn Ann Date: Fri, 27 Nov 2020 13:20:40 -0600 Subject: [PATCH] Add important documentation bit --- doc/app-js.linted.js | 40747 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40747 insertions(+) create mode 100644 doc/app-js.linted.js diff --git a/doc/app-js.linted.js b/doc/app-js.linted.js new file mode 100644 index 0000000..a3849cd --- /dev/null +++ b/doc/app-js.linted.js @@ -0,0 +1,40747 @@ +function $notificationProvider() { + function e(r, a, e) { + function o(t, n) { + function e() { + n = angular.extend({ + focusWindowOnClick: !0 + }, l.options || {}, n); + try { + i.baseNotification = new r.Notification(t, n) + } catch (e) { + return + } + n.delay && setTimeout(angular.bind(i, i.close), n.delay), n.focusWindowOnClick && i.$on("click", function() { + r.focus() + }), i._events.forEach(function(e) { + i.$on.apply(i, e) + }), i._events = [] + } + if (!r.Notification) return !1; + n = n || {}; + var i = this; + if (this._events = [], "granted" === r.Notification.permission) return e(); + "denied" !== r.Notification.permission && o.requestPermission().then(e) + } + + function t(e, t) { + return new o(e, t) + } + return o.prototype.$on = function s(e, t) { + function n() { + var e = arguments; + a.$apply(function() { + t.apply(i, e) + }) + } + var i = this; + return this.baseNotification ? (this.baseNotification.addEventListener(e, n), function r() { + this.baseNotification.removeListener(event, n) + }) : this._events.push([e, t]) + }, o.prototype.close = function n() { + this.baseNotification && this.baseNotification.close() + }, o.requestPermission = function() { + return e(function(t, e) { + if (!r.Notification) return e(); + r.Notification.requestPermission(function(e) { + r.Notification.permission = r.Notification.permission || e, t(r.Notification.permission) + }) + }) + }, t.requestPermission = o.requestPermission, t + } + var l = this; + this.$get = ["$window", "$rootScope", "$q", e], this.setOptions = function t(e) { + this.options = e + } +} + +function concatenateFields(e, t, n) { + var i = ""; + $.each(e, function(e, t) { + el = $("#" + t)[0], el.value.length <= el.maxLength && (i += el.value, i += n, el.disabled = !0) + }), i = i.slice(0, -1), $("#" + t)[0].value = i +} + +function formBrowseIfComplete(e, t, n) { + event = n || window.event; + var i = event.code; + if (t.length >= e.maxLength && (i.match(/Digit/) || i.match(/Numpad/) || i.match(/Key/))) { + for (next_elmnt = e.nextElementSibling; + "INPUT" != next_elmnt.nodeName;) next_elmnt = next_elmnt.nextElementSibling; + next_elmnt.focus() + } +} + +function formAutoBrowse(e, t, n) { + event = n || window.event; + var i = event.code, + r = ""; + if (e.value = e.value.toUpperCase(), t.length == e.maxLength) { + if (i.match(/Digit/) || i.match(/Numpad/) || i.match(/Key/)) { + for (r = e.nextElementSibling; + "INPUT" != r.nodeName;) r = r.nextElementSibling; + r.focus() + } + } else if (0 == t.length && ("Backspace" == i || "ArrowLeft" == i)) { + for (previous_elmnt = e.previousElementSibling; + "INPUT" != previous_elmnt.nodeName;) previous_elmnt = previous_elmnt.previousElementSibling; + previous_elmnt.focus() + } +} + +function previewAvatar() { + var e = $("#avatar-upload-preview"), + t = $("#avatar-upload").prop("files")[0], + n = new FileReader; + n.onloadend = function() { + e.attr("src", n.result) + }, t ? n.readAsDataURL(t) : e.attr("src", "") +} + +function line_breaks(e) { + return e.replace(/(?:\r\n|\r|\n)/g, "
") +}! function(e, t) { + "object" == typeof module && "object" == typeof module.exports ? module.exports = e.document ? t(e, !0) : function(e) { + if (!e.document) throw new Error("jQuery requires a window with a document"); + return t(e) + } : t(e) +}("undefined" != typeof window ? window : this, function($, e) { + function s(e) { + var t = !!e && "length" in e && e.length, + n = pe.type(e); + return "function" !== n && !pe.isWindow(e) && ("array" === n || 0 === t || "number" == typeof t && 0 < t && t - 1 in e) + } + + function t(e, n, i) { + if (pe.isFunction(n)) return pe.grep(e, function(e, t) { + return !!n.call(e, t, e) !== i + }); + if (n.nodeType) return pe.grep(e, function(e) { + return e === n !== i + }); + if ("string" == typeof n) { + if (xe.test(n)) return pe.filter(n, e, i); + n = pe.filter(n, e) + } + return pe.grep(e, function(e) { + return -1 < pe.inArray(e, n) !== i + }) + } + + function n(e, t) { + for (; + (e = e[t]) && 1 !== e.nodeType;); + return e + } + + function c(e) { + var n = {}; + return pe.each(e.match(Ee) || [], function(e, t) { + n[t] = !0 + }), n + } + + function r() { + re.addEventListener ? (re.removeEventListener("DOMContentLoaded", a), $.removeEventListener("load", a)) : (re.detachEvent("onreadystatechange", a), $.detachEvent("onload", a)) + } + + function a() { + (re.addEventListener || "load" === $.event.type || "complete" === re.readyState) && (r(), pe.ready()) + } + + function l(e, t, n) { + if (n === undefined && 1 === e.nodeType) { + var i = "data-" + t.replace(je, "-$1").toLowerCase(); + if ("string" == typeof(n = e.getAttribute(i))) { + try { + n = "true" === n || "false" !== n && ("null" === n ? null : +n + "" === n ? +n : Ne.test(n) ? pe.parseJSON(n) : n) + } catch (r) {} + pe.data(e, t, n) + } else n = undefined + } + return n + } + + function u(e) { + var t; + for (t in e) + if (("data" !== t || !pe.isEmptyObject(e[t])) && "toJSON" !== t) return !1; + return !0 + } + + function i(e, t, n, i) { + if (Ye(e)) { + var r, a, o = pe.expando, + s = e.nodeType, + l = s ? pe.cache : e, + u = s ? e[o] : e[o] && o; + if (u && l[u] && (i || l[u].data) || n !== undefined || "string" != typeof t) return u || (u = s ? e[o] = ie.pop() || pe.guid++ : o), l[u] || (l[u] = s ? {} : { + toJSON: pe.noop + }), "object" != typeof t && "function" != typeof t || (i ? l[u] = pe.extend(l[u], t) : l[u].data = pe.extend(l[u].data, t)), a = l[u], i || (a.data || (a.data = {}), a = a.data), n !== undefined && (a[pe.camelCase(t)] = n), "string" == typeof t ? null == (r = a[t]) && (r = a[pe.camelCase(t)]) : r = a, r + } + } + + function o(e, t, n) { + if (Ye(e)) { + var i, r, a = e.nodeType, + o = a ? pe.cache : e, + s = a ? e[pe.expando] : pe.expando; + if (o[s]) { + if (t && (i = n ? o[s] : o[s].data)) { + r = (t = pe.isArray(t) ? t.concat(pe.map(t, pe.camelCase)) : t in i ? [t] : (t = pe.camelCase(t)) in i ? [t] : t.split(" ")).length; + for (; r--;) delete i[t[r]]; + if (n ? !u(i) : !pe.isEmptyObject(i)) return + }(n || (delete o[s].data, u(o[s]))) && (a ? pe.cleanData([e], !0) : he.deleteExpando || o != o.window ? delete o[s] : o[s] = undefined) + } + } + } + + function d(e, t, n, i) { + var r, a = 1, + o = 20, + s = i ? function() { + return i.cur() + } : function() { + return pe.css(e, t, "") + }, + l = s(), + u = n && n[3] || (pe.cssNumber[t] ? "" : "px"), + c = (pe.cssNumber[t] || "px" !== u && +l) && Re.exec(pe.css(e, t)); + if (c && c[3] !== u) + for (u = u || c[3], n = n || [], c = +l || 1; c /= a = a || ".5", pe.style(e, t, c + u), a !== (a = s() / l) && 1 !== a && --o;); + return n && (c = +c || +l || 0, r = n[1] ? c + (n[1] + 1) * n[2] : +n[2], i && (i.unit = u, i.start = c, i.end = r)), r + } + + function g(e) { + var t = Ke.split("|"), + n = e.createDocumentFragment(); + if (n.createElement) + for (; t.length;) n.createElement(t.pop()); + return n + } + + function v(e, t) { + var n, i, r = 0, + a = "undefined" != typeof e.getElementsByTagName ? e.getElementsByTagName(t || "*") : "undefined" != typeof e.querySelectorAll ? e.querySelectorAll(t || "*") : undefined; + if (!a) + for (a = [], n = e.childNodes || e; null != (i = n[r]); r++) !t || pe.nodeName(i, t) ? a.push(i) : pe.merge(a, v(i, t)); + return t === undefined || t && pe.nodeName(e, t) ? pe.merge([e], a) : a + } + + function y(e, t) { + for (var n, i = 0; null != (n = e[i]); i++) pe._data(n, "globalEval", !t || pe._data(t[i], "globalEval")) + } + + function b(e) { + ze.test(e.type) && (e.defaultChecked = e.checked) + } + + function m(e, t, n, i, r) { + for (var a, o, s, l, u, c, d, h = e.length, f = g(t), p = [], m = 0; m < h; m++) + if ((o = e[m]) || 0 === o) + if ("object" === pe.type(o)) pe.merge(p, o.nodeType ? [o] : o); + else if (Je.test(o)) { + for (l = l || f.appendChild(t.createElement("div")), u = (Ue.exec(o) || ["", ""])[1].toLowerCase(), d = Ge[u] || Ge._default, l.innerHTML = d[1] + pe.htmlPrefilter(o) + d[2], a = d[0]; a--;) l = l.lastChild; + if (!he.leadingWhitespace && Ve.test(o) && p.push(t.createTextNode(Ve.exec(o)[0])), !he.tbody) + for (a = (o = "table" !== u || Xe.test(o) ? "" !== d[1] || Xe.test(o) ? 0 : l : l.firstChild) && o.childNodes.length; a--;) pe.nodeName(c = o.childNodes[a], "tbody") && !c.childNodes.length && o.removeChild(c); + for (pe.merge(p, l.childNodes), l.textContent = ""; l.firstChild;) l.removeChild(l.firstChild); + l = f.lastChild + } else p.push(t.createTextNode(o)); + for (l && f.removeChild(l), he.appendChecked || pe.grep(v(p, "input"), b), m = 0; o = p[m++];) + if (i && -1 < pe.inArray(o, i)) r && r.push(o); + else if (s = pe.contains(o.ownerDocument, o), l = v(f.appendChild(o), "script"), s && y(l), n) + for (a = 0; o = l[a++];) We.test(o.type || "") && n.push(o); + return l = null, f + } + + function h() { + return !0 + } + + function f() { + return !1 + } + + function p() { + try { + return re.activeElement + } catch (e) {} + } + + function w(e, t, n, i, r, a) { + var o, s; + if ("object" == typeof t) { + for (s in "string" != typeof n && (i = i || n, n = undefined), t) w(e, s, n, i, t[s], a); + return e + } + if (null == i && null == r ? (r = n, i = n = undefined) : null == r && ("string" == typeof n ? (r = i, i = undefined) : (r = i, i = n, n = undefined)), !1 === r) r = f; + else if (!r) return e; + return 1 === a && (o = r, (r = function(e) { + return pe().off(e), o.apply(this, arguments) + }).guid = o.guid || (o.guid = pe.guid++)), e.each(function() { + pe.event.add(this, t, r, i, n) + }) + } + + function k(e, t) { + return pe.nodeName(e, "table") && pe.nodeName(11 !== t.nodeType ? t : t.firstChild, "tr") ? e.getElementsByTagName("tbody")[0] || e.appendChild(e.ownerDocument.createElement("tbody")) : e + } + + function x(e) { + return e.type = (null !== pe.find.attr(e, "type")) + "/" + e.type, e + } + + function M(e) { + var t = lt.exec(e.type); + return t ? e.type = t[1] : e.removeAttribute("type"), e + } + + function L(e, t) { + if (1 === t.nodeType && pe.hasData(e)) { + var n, i, r, a = pe._data(e), + o = pe._data(t, a), + s = a.events; + if (s) + for (n in delete o.handle, o.events = {}, s) + for (i = 0, r = s[n].length; i < r; i++) pe.event.add(t, n, s[n][i]); + o.data && (o.data = pe.extend({}, o.data)) + } + } + + function T(e, t) { + var n, i, r; + if (1 === t.nodeType) { + if (n = t.nodeName.toLowerCase(), !he.noCloneEvent && t[pe.expando]) { + for (i in (r = pe._data(t)).events) pe.removeEvent(t, i, r.handle); + t.removeAttribute(pe.expando) + } + "script" === n && t.text !== e.text ? (x(t).text = e.text, M(t)) : "object" === n ? (t.parentNode && (t.outerHTML = e.outerHTML), he.html5Clone && e.innerHTML && !pe.trim(t.innerHTML) && (t.innerHTML = e.innerHTML)) : "input" === n && ze.test(e.type) ? (t.defaultChecked = t.checked = e.checked, t.value !== e.value && (t.value = e.value)) : "option" === n ? t.defaultSelected = t.selected = e.defaultSelected : "input" !== n && "textarea" !== n || (t.defaultValue = e.defaultValue) + } + } + + function S(n, i, r, a) { + i = oe.apply([], i); + var e, t, o, s, l, u, c = 0, + d = n.length, + h = d - 1, + f = i[0], + p = pe.isFunction(f); + if (p || 1 < d && "string" == typeof f && !he.checkClone && st.test(f)) return n.each(function(e) { + var t = n.eq(e); + p && (i[0] = f.call(this, e, t.html())), S(t, i, r, a) + }); + if (d && (e = (u = m(i, n[0].ownerDocument, !1, n, a)).firstChild, 1 === u.childNodes.length && (u = e), e || a)) { + for (o = (s = pe.map(v(u, "script"), x)).length; c < d; c++) t = u, c !== h && (t = pe.clone(t, !0, !0), o && pe.merge(s, v(t, "script"))), r.call(n[c], t, c); + if (o) + for (l = s[s.length - 1].ownerDocument, pe.map(s, M), c = 0; c < o; c++) t = s[c], We.test(t.type || "") && !pe._data(t, "globalEval") && pe.contains(l, t) && (t.src ? pe._evalUrl && pe._evalUrl(t.src) : pe.globalEval((t.text || t.textContent || t.innerHTML || "").replace(ut, ""))); + u = e = null + } + return n + } + + function C(e, t, n) { + for (var i, r = t ? pe.filter(t, e) : e, a = 0; null != (i = r[a]); a++) n || 1 !== i.nodeType || pe.cleanData(v(i)), i.parentNode && (n && pe.contains(i.ownerDocument, i) && y(v(i, "script")), i.parentNode.removeChild(i)); + return e + } + + function D(e, t) { + var n = pe(t.createElement(e)).appendTo(t.body), + i = pe.css(n[0], "display"); + return n.detach(), i + } + + function E(e) { + var t = re, + n = ht[e]; + return n || ("none" !== (n = D(e, t)) && n || ((t = ((dt = (dt || pe("'; + return e.match(this.opts.regexps.linkyoutube) && (e = e.replace(this.opts.regexps.linkyoutube, t + "//www.youtube.com/embed/$1" + n)), e.match(this.opts.regexps.linkvimeo) && (e = e.replace(this.opts.regexps.linkvimeo, t + "//player.vimeo.com/video/$2" + n)), e + }, + convertImages: function(e) { + var t = e.match(this.opts.regexps.linkimage); + return t ? e.replace(e, '') : e + }, + convertLinks: function(e) { + var n = e.match(this.opts.regexps.url); + if (!n) return e; + for (var t = (n = h.grep(n, function(e, t) { + return h.inArray(e, n) === t + })).length, i = 0; i < t; i++) { + var r = n[i], + a = r, + o = null !== r.match(/(https?|ftp):\/\//i) ? "" : "http://"; + a.length > this.opts.linkSize && (a = a.substring(0, this.opts.linkSize) + "..."), -1 === a.search("%") && (a = decodeURIComponent(a)); + var s = "\\b"; - 1 !== h.inArray(r.slice(-1), ["/", "&", "="]) && (s = ""); + var l = new RegExp("(" + r.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&") + s + ")", "g"); + e = e.replace(l, '' + h.trim(a) + "") + } + return e + } + } + }, + list: function() { + return { + toggle: function(e) { + if (!this.utils.inBlocks(["table", "td", "th", "tr"])) { + var t = "orderedlist" === e || "ol" === e ? "OL" : "UL"; + e = "OL" === t ? "orderedlist" : "unorderedlist"; + var n = h(this.selection.current()).parentsUntil(".redactor-in", "ul, ol").first(); + if (this.placeholder.hide(), this.buffer.set(), 0 !== n.length && n[0].tagName === t && this.utils.isRedactorParent(n)) return this.selection.save(), n.find("ul, ol").each(function() { + var e = h(this).closest("li"); + h(this).find("li").each(function() { + h(e).after(this) + }) + }), n.find("ul, ol").remove(), n.find("li").each(function() { + return h(this).replaceWith(function() { + return h("

").append(h(this).contents()) + }) + }), n.replaceWith(function() { + return h(this).contents() + }), void this.selection.restore(); + this.selection.save(), document.execCommand("insert" + e), this.selection.restore(); + var i = this.list.get(); + if (i) { + i.find("span").replaceWith(function() { + return h(this).contents() + }), i.find(this.opts.inlineTags.join(",")).each(function() { + h(this).removeAttr("style") + }); + var r = i.parent(); + this.utils.isRedactorParent(r) && "LI" !== r[0].tagName && this.utils.isBlock(r) && (this.selection.save(), r.replaceWith(r.contents()), this.selection.restore()) + } else this.selection.block() || document.execCommand("formatblock", !1, "p") + } + }, + get: function() { + var e = this.selection.current(), + t = h(e).closest("ul, ol", this.core.editor()[0]); + return 0 !== t.length && t + }, + combineAfterAndBefore: function(e) { + var t = h(e).prev(), + n = h(e).next(), + i = e && "P" === e.tagName && ("
" === e.innerHTML || "" === e.innerHTML), + r = 1 === t.closest("ol, ul").length && 1 === n.closest("ol, ul").length; + return !(!i || !r) && (t.children("li").last().append(this.marker.get()), t.append(n.contents()), this.selection.restore(), !0) + } + } + }, + marker: function() { + return { + get: function(e) { + e = void 0 === e ? 1 : e; + var t = document.createElement("span"); + return t.id = "selection-marker-" + e, t.className = "redactor-selection-marker", t.innerHTML = this.opts.invisibleSpace, t + }, + html: function(e) { + return this.utils.getOuterHtml(this.marker.get(e)) + }, + find: function(e) { + return e = void 0 === e ? 1 : e, this.core.editor().find("span#selection-marker-" + e) + }, + insert: function() { + var e = this.selection.get(), + t = this.selection.range(e); + this.marker.insertNode(t, this.marker.get(1), !0), t && !1 === t.collapsed && this.marker.insertNode(t, this.marker.get(2), !1) + }, + remove: function() { + this.core.editor().find(".redactor-selection-marker").each(this.marker.iterateRemove) + }, + insertNode: function(e, t, n) { + var i = this.selection.parent(); + if (null !== e && 0 !== h(i).closest(".redactor-in").length) { + e = e.cloneRange(); + try { + e.collapse(n), e.insertNode(t) + } catch (r) { + this.focus.start() + } + } + }, + iterateRemove: function(e, t) { + var n = h(t); + return "" === n.text().replace(/\u200B/g, "") ? n.remove() : n.replaceWith(function() { + return h(this).contents() + }) + } + } + }, + modal: function() { + return { + callbacks: {}, + templates: function() { + this.opts.modal = { + "image-edit": String() + '

", + image: String() + '
', + file: String() + '


', + link: String() + '
" + }, h.extend(this.opts, this.opts.modal) + }, + addCallback: function(e, t) { + this.modal.callbacks[e] = t + }, + addTemplate: function(e, t) { + this.opts.modal[e] = t + }, + getTemplate: function(e) { + return this.opts.modal[e] + }, + getModal: function() { + return this.$modalBody + }, + getActionButton: function() { + return this.$modalBody.find("#redactor-modal-button-action") + }, + getCancelButton: function() { + return this.$modalBody.find("#redactor-modal-button-cancel") + }, + getDeleteButton: function() { + return this.$modalBody.find("#redactor-modal-button-delete") + }, + load: function(e, t, n) { + "undefined" != typeof this.$modalBox && this.$modalBox.hasClass("open") || (this.modal.templateName = e, this.modal.width = n, this.modal.build(), this.modal.enableEvents(), this.modal.setTitle(t), this.modal.setDraggable(), this.modal.setContent(), "undefined" != typeof this.modal.callbacks[e] && this.modal.callbacks[e].call(this)) + }, + show: function() { + this.detect.isDesktop() || document.activeElement.blur(), this.selection.save(), this.modal.buildTabber(), this.detect.isMobile() && (this.modal.width = "96%"), setTimeout(h.proxy(this.modal.buildWidth, this), 0), h(window).on("resize.redactor-modal", h.proxy(this.modal.buildWidth, this)), this.$modalOverlay.redactorAnimation("fadeIn", { + duration: .25 + }), this.$modalBox.addClass("open").show(), this.$modal.redactorAnimation("fadeIn", { + timing: "cubic-bezier(0.175, 0.885, 0.320, 1.105)" + }, h.proxy(function() { + this.utils.saveScroll(), this.utils.disableBodyScroll(), this.core.callback("modalOpened", this.modal.templateName, this.$modal), h(document).off("focusin.modal"), this.$modal.find("input[type=text],input[type=url],input[type=email]").on("keydown.redactor-modal", h.proxy(this.modal.setEnter, this)) + }, this)) + }, + buildWidth: function() { + var e = h(window).height(), + t = h(window).width(), + n = "number" == typeof this.modal.width; + !n && this.modal.width.match(/%$/) ? this.$modal.css({ + width: this.modal.width, + "margin-bottom": "16px" + }) : parseInt(this.modal.width) > t ? this.$modal.css({ + width: "96%", + "margin-bottom": "2%" + }) : (n && (this.modal.width += "px"), this.$modal.css({ + width: this.modal.width, + "margin-bottom": "16px" + })); + var i = this.$modal.outerHeight(), + r = e / 2 - i / 2 + "px"; + this.detect.isMobile() ? r = "2%" : e < i && (r = "16px"), this.$modal.css("margin-top", r) + }, + buildTabber: function() { + this.modal.tabs = this.$modal.find(".redactor-modal-tab"), this.modal.tabs.length < 2 || (this.modal.$tabsBox = h('
'), h.each(this.modal.tabs, h.proxy(function(e, t) { + var n = h('').text(h(t).attr("data-title")); + n.on("click", h.proxy(this.modal.showTab, this)), 0 === e && n.addClass("active"), this.modal.$tabsBox.append(n) + }, this)), this.$modalBody.prepend(this.modal.$tabsBox)) + }, + showTab: function(e) { + e.preventDefault(); + var t = h(e.target), + n = t.attr("rel"); + return this.modal.tabs.hide(), this.modal.tabs.eq(n).show(), h("#redactor-modal-tabber").find("a").removeClass("active"), t.addClass("active"), !1 + }, + setTitle: function(e) { + this.$modalHeader.html(e) + }, + setContent: function() { + this.$modalBody.html(this.modal.getTemplate(this.modal.templateName)), this.modal.getCancelButton().on("mousedown", h.proxy(this.modal.close, this)) + }, + setDraggable: function() { + "undefined" != typeof h.fn.draggable && (this.$modal.draggable({ + handle: this.$modalHeader + }), this.$modalHeader.css("cursor", "move")) + }, + setEnter: function(e) { + 13 === e.which && (e.preventDefault(), this.modal.getActionButton().click()) + }, + build: function() { + this.modal.buildOverlay(), this.$modalBox = h('
').hide(), this.$modal = h('