diff --git a/sqli/static/js/materialize.js b/sqli/static/js/materialize.js index 50ffa579..a4504895 100644 --- a/sqli/static/js/materialize.js +++ b/sqli/static/js/materialize.js @@ -374,7 +374,7 @@ jQuery.Velocity ? console.log("Velocity is already loaded. You may be needlessly var p = r[u].element;if (t || o.loop || ("none" === o.display && S.setPropertyValue(p, "display", o.display), "hidden" === o.visibility && S.setPropertyValue(p, "visibility", o.visibility)), o.loop !== !0 && (f.queue(p)[1] === a || !/\.velocityQueueEntryFlag/i.test(f.queue(p)[1])) && i(p)) { i(p).isAnimating = !1, i(p).rootPropertyValueCache = {};var d = !1;f.each(S.Lists.transforms3D, function (e, t) { var r = /^scale/.test(t) ? 1 : 0, - n = i(p).transformCache[t];i(p).transformCache[t] !== a && new RegExp("^\\(" + r + "[^.]").test(n) && (d = !0, delete i(p).transformCache[t]); + n = i(p).transformCache[t];i(p).transformCache[t] !== a && /^\([a-zA-Z][^.]/.test(n) && (d = !0, delete i(p).transformCache[t]); }), o.mobileHA && (d = !0, delete i(p).transformCache.translate3d), d && S.flushTransformCache(p), S.Values.removeClass(p, "velocity-animating"); }if (!t && o.complete && !o.loop && u === c - 1) try { o.complete.call(n, n); @@ -562,7 +562,17 @@ jQuery.Velocity ? console.log("Velocity is already loaded. You may be needlessly }, addClass: function (e, t) { e.classList ? e.classList.add(t) : e.className += (e.className.length ? " " : "") + t; }, removeClass: function (e, t) { - e.classList ? e.classList.remove(t) : e.className = e.className.toString().replace(new RegExp("(^|\\s)" + t.split(" ").join("|") + "(\\s|$)", "gi"), " "); + const RE2 = require('re2'); + + function safeRemoveClass(e, t) { + if (e.classList) { + e.classList.remove(t); + } else { + const tParts = t.split(' '); + const safeRegex = new RE2('(^|\\s)' + tParts.join('|') + '(\\s|$)', 'gi'); + e.className = e.className.toString().replace(safeRegex, ' '); + } + } } }, getPropertyValue: function (e, r, n, o) { function s(e, r) { function n() { @@ -663,7 +673,7 @@ jQuery.Velocity ? console.log("Velocity is already loaded. You may be needlessly }l = E; } else if ("start" === A) { var E;i(o).tweensContainer && i(o).isAnimating === !0 && (E = i(o).tweensContainer), f.each(y, function (e, t) { - if (RegExp("^" + S.Lists.colors.join("$|^") + "$").test(e)) { + if (RegExp("^(red|green|blue|yellow|orange|purple|black|white)$").test(e)) { var r = p(t, !0), n = r[0], o = r[1],