Merge branch 'MDL-70299-311' of git://github.com/paulholden/moodle into MOODLE_311_STABLE
This commit is contained in:
Vendored
+1
-1
@@ -1,2 +1,2 @@
|
||||
function _typeof(a){"@babel/helpers - typeof";if("function"==typeof Symbol&&"symbol"==typeof Symbol.iterator){_typeof=function(a){return typeof a}}else{_typeof=function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a}}return _typeof(a)}(function(a,b){"use strict";if("function"==typeof define&&define.amd){define ("core/loglevel",b)}else if("object"===("undefined"==typeof module?"undefined":_typeof(module))&&module.exports){module.exports=b()}else{a.log=b()}})(this,function(){"use strict";var h=function(){},i="undefined",j=("undefined"==typeof window?"undefined":_typeof(window))!==i&&/Trident\/|MSIE /.test(window.navigator.userAgent),k=["trace","debug","info","warn","error"];function a(a,b){var c=a[b];if("function"==typeof c.bind){return c.bind(a)}else{try{return Function.prototype.bind.call(c,a)}catch(b){return function(){return Function.prototype.apply.apply(c,[a,arguments])}}}}function b(){if(console.log){if(console.log.apply){console.log.apply(console,arguments)}else{Function.prototype.apply.apply(console.log,[console,arguments])}}if(console.trace)console.trace()}function c(c){if("debug"===c){c="log"}if(("undefined"==typeof console?"undefined":_typeof(console))===i){return!1}else if("trace"===c&&j){return b}else if(console[c]!==void 0){return a(console,c)}else if(console.log!==void 0){return a(console,"log")}else{return h}}function d(a,b){for(var c=0,d;c<k.length;c++){d=k[c];this[d]=c<a?h:this.methodFactory(d,a,b)}this.log=this.debug}function e(a,b,c){return function(){if(("undefined"==typeof console?"undefined":_typeof(console))!==i){d.call(this,b,c);this[a].apply(this,arguments)}}}function f(a){return c(a)||e.apply(this,arguments)}function g(a,b,c){var h=this,j,l="loglevel";if(a){l+=":"+a}function e(a){var b=(k[a]||"silent").toUpperCase();if(("undefined"==typeof window?"undefined":_typeof(window))===i)return;try{window.localStorage[l]=b;return}catch(a){}try{window.document.cookie=encodeURIComponent(l)+"="+b+";"}catch(a){}}function g(){var a;if(("undefined"==typeof window?"undefined":_typeof(window))===i)return;try{a=window.localStorage[l]}catch(a){}if(_typeof(a)===i){try{var b=window.document.cookie,c=b.indexOf(encodeURIComponent(l)+"=");if(-1!==c){a=/^([^;]+)/.exec(b.slice(c))[1]}}catch(a){}}if(h.levels[a]===void 0){a=void 0}return a}h.name=a;h.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5};h.methodFactory=c||f;h.getLevel=function(){return j};h.setLevel=function(b,c){if("string"==typeof b&&h.levels[b.toUpperCase()]!==void 0){b=h.levels[b.toUpperCase()]}if("number"==typeof b&&0<=b&&b<=h.levels.SILENT){j=b;if(!1!==c){e(b)}d.call(h,b,a);if(("undefined"==typeof console?"undefined":_typeof(console))===i&&b<h.levels.SILENT){return"No console available for logging"}}else{throw"log.setLevel() called with invalid level: "+b}};h.setDefaultLevel=function(a){if(!g()){h.setLevel(a,!1)}};h.enableAll=function(a){h.setLevel(h.levels.TRACE,a)};h.disableAll=function(a){h.setLevel(h.levels.SILENT,a)};var m=g();if(null==m){m=null==b?"WARN":b}h.setLevel(m,!1)}var l=new g,m={};l.getLogger=function(a){if("string"!=typeof a||""===a){throw new TypeError("You must supply a name when creating a logger.")}var b=m[a];if(!b){b=m[a]=new g(a,l.getLevel(),l.methodFactory)}return b};var n=("undefined"==typeof window?"undefined":_typeof(window))!==i?window.log:void 0;l.noConflict=function(){if(("undefined"==typeof window?"undefined":_typeof(window))!==i&&window.log===l){window.log=n}return l};l.getLoggers=function(){return m};return l});
|
||||
function _typeof(a){"@babel/helpers - typeof";if("function"==typeof Symbol&&"symbol"==typeof Symbol.iterator){_typeof=function(a){return typeof a}}else{_typeof=function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a}}return _typeof(a)}(function(a,b){"use strict";if("function"==typeof define&&define.amd){define ("core/loglevel",b)}else if("object"===("undefined"==typeof module?"undefined":_typeof(module))&&module.exports){module.exports=b()}else{a.log=b()}})(this,function(){"use strict";var h=function(){},i="undefined",j=("undefined"==typeof window?"undefined":_typeof(window))!==i&&_typeof(window.navigator)!==i&&/Trident\/|MSIE /.test(window.navigator.userAgent),k=["trace","debug","info","warn","error"];function a(a,b){var c=a[b];if("function"==typeof c.bind){return c.bind(a)}else{try{return Function.prototype.bind.call(c,a)}catch(b){return function(){return Function.prototype.apply.apply(c,[a,arguments])}}}}function b(){if(console.log){if(console.log.apply){console.log.apply(console,arguments)}else{Function.prototype.apply.apply(console.log,[console,arguments])}}if(console.trace)console.trace()}function c(c){if("debug"===c){c="log"}if(("undefined"==typeof console?"undefined":_typeof(console))===i){return!1}else if("trace"===c&&j){return b}else if(console[c]!==void 0){return a(console,c)}else if(console.log!==void 0){return a(console,"log")}else{return h}}function d(a,b){for(var c=0,d;c<k.length;c++){d=k[c];this[d]=c<a?h:this.methodFactory(d,a,b)}this.log=this.debug}function e(a,b,c){return function(){if(("undefined"==typeof console?"undefined":_typeof(console))!==i){d.call(this,b,c);this[a].apply(this,arguments)}}}function f(a){return c(a)||e.apply(this,arguments)}function g(a,b,c){var h=this,j,l="loglevel";if("string"==typeof a){l+=":"+a}else if("symbol"===_typeof(a)){l=void 0}function e(a){var b=(k[a]||"silent").toUpperCase();if(("undefined"==typeof window?"undefined":_typeof(window))===i||!l)return;try{window.localStorage[l]=b;return}catch(a){}try{window.document.cookie=encodeURIComponent(l)+"="+b+";"}catch(a){}}function g(){var a;if(("undefined"==typeof window?"undefined":_typeof(window))===i||!l)return;try{a=window.localStorage[l]}catch(a){}if(_typeof(a)===i){try{var b=window.document.cookie,c=b.indexOf(encodeURIComponent(l)+"=");if(-1!==c){a=/^([^;]+)/.exec(b.slice(c))[1]}}catch(a){}}if(h.levels[a]===void 0){a=void 0}return a}h.name=a;h.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5};h.methodFactory=c||f;h.getLevel=function(){return j};h.setLevel=function(b,c){if("string"==typeof b&&h.levels[b.toUpperCase()]!==void 0){b=h.levels[b.toUpperCase()]}if("number"==typeof b&&0<=b&&b<=h.levels.SILENT){j=b;if(!1!==c){e(b)}d.call(h,b,a);if(("undefined"==typeof console?"undefined":_typeof(console))===i&&b<h.levels.SILENT){return"No console available for logging"}}else{throw"log.setLevel() called with invalid level: "+b}};h.setDefaultLevel=function(a){if(!g()){h.setLevel(a,!1)}};h.enableAll=function(a){h.setLevel(h.levels.TRACE,a)};h.disableAll=function(a){h.setLevel(h.levels.SILENT,a)};var m=g();if(null==m){m=null==b?"WARN":b}h.setLevel(m,!1)}var l=new g,m={};l.getLogger=function(a){if("symbol"!==_typeof(a)&&"string"!=typeof a||""===a){throw new TypeError("You must supply a name when creating a logger.")}var b=m[a];if(!b){b=m[a]=new g(a,l.getLevel(),l.methodFactory)}return b};var n=("undefined"==typeof window?"undefined":_typeof(window))!==i?window.log:void 0;l.noConflict=function(){if(("undefined"==typeof window?"undefined":_typeof(window))!==i&&window.log===l){window.log=n}return l};l.getLoggers=function(){return m};l["default"]=l;return l});
|
||||
//# sourceMappingURL=loglevel.min.js.map
|
||||
|
||||
File diff suppressed because one or more lines are too long
+12
-6
@@ -26,7 +26,7 @@
|
||||
// Copy loglevel.js into lib/amd/src/ in Moodle folder.
|
||||
// Add the license as a comment to the file and these instructions.
|
||||
|
||||
/*! loglevel - v1.6.6 - https://github.com/pimterry/loglevel - (c) 2019 Tim Perry - licensed MIT */
|
||||
/*! loglevel - v1.7.1 - https://github.com/pimterry/loglevel - (c) 2020 Tim Perry - licensed MIT */
|
||||
(function (root, definition) {
|
||||
"use strict";
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
@@ -42,7 +42,7 @@
|
||||
// Slightly dubious tricks to cut down minimized file size
|
||||
var noop = function() {};
|
||||
var undefinedType = "undefined";
|
||||
var isIE = (typeof window !== undefinedType) && (
|
||||
var isIE = (typeof window !== undefinedType) && (typeof window.navigator !== undefinedType) && (
|
||||
/Trident\/|MSIE /.test(window.navigator.userAgent)
|
||||
);
|
||||
|
||||
@@ -141,15 +141,18 @@
|
||||
function Logger(name, defaultLevel, factory) {
|
||||
var self = this;
|
||||
var currentLevel;
|
||||
|
||||
var storageKey = "loglevel";
|
||||
if (name) {
|
||||
if (typeof name === "string") {
|
||||
storageKey += ":" + name;
|
||||
} else if (typeof name === "symbol") {
|
||||
storageKey = undefined;
|
||||
}
|
||||
|
||||
function persistLevelIfPossible(levelNum) {
|
||||
var levelName = (logMethods[levelNum] || 'silent').toUpperCase();
|
||||
|
||||
if (typeof window === undefinedType) return;
|
||||
if (typeof window === undefinedType || !storageKey) return;
|
||||
|
||||
// Use localStorage if available
|
||||
try {
|
||||
@@ -167,7 +170,7 @@
|
||||
function getPersistedLevel() {
|
||||
var storedLevel;
|
||||
|
||||
if (typeof window === undefinedType) return;
|
||||
if (typeof window === undefinedType || !storageKey) return;
|
||||
|
||||
try {
|
||||
storedLevel = window.localStorage[storageKey];
|
||||
@@ -260,7 +263,7 @@
|
||||
|
||||
var _loggersByName = {};
|
||||
defaultLogger.getLogger = function getLogger(name) {
|
||||
if (typeof name !== "string" || name === "") {
|
||||
if ((typeof name !== "symbol" && typeof name !== "string") || name === "") {
|
||||
throw new TypeError("You must supply a name when creating a logger.");
|
||||
}
|
||||
|
||||
@@ -287,5 +290,8 @@
|
||||
return _loggersByName;
|
||||
};
|
||||
|
||||
// ES6 default export, for compatibility
|
||||
defaultLogger['default'] = defaultLogger;
|
||||
|
||||
return defaultLogger;
|
||||
}));
|
||||
|
||||
@@ -193,7 +193,7 @@
|
||||
<location>amd/src/loglevel.js</location>
|
||||
<name>loglevel.js</name>
|
||||
<license>MIT</license>
|
||||
<version>1.6.6</version>
|
||||
<version>1.7.1</version>
|
||||
</library>
|
||||
<library>
|
||||
<location>mustache</location>
|
||||
|
||||
Reference in New Issue
Block a user