From 632010f3debf1ecd2b2ca25edba6a4827a31d286 Mon Sep 17 00:00:00 2001 From: Stanescu Eduard-Dan Date: Sat, 20 Feb 2021 11:28:26 +0200 Subject: [PATCH] Update version --- dist/elmahio.js | 2 +- dist/elmahio.js.map | 2 +- dist/elmahio.min.js | 2 +- dist/elmahio.min.js.map | 2 +- elmah.io.javascript.nuspec | 2 +- package-lock.json | 2 +- package.json | 2 +- src/elmahio.js | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/dist/elmahio.js b/dist/elmahio.js index 28bc177..0e80e87 100644 --- a/dist/elmahio.js +++ b/dist/elmahio.js @@ -1,5 +1,5 @@ /*! - * elmah.io Javascript Logger - version 3.4.0 + * elmah.io Javascript Logger - version 3.4.1 * (c) 2018 elmah.io, Apache 2.0 License, https://elmah.io */ (function(root, factory) { diff --git a/dist/elmahio.js.map b/dist/elmahio.js.map index 5e3dc27..35117f0 100644 --- a/dist/elmahio.js.map +++ b/dist/elmahio.js.map @@ -1 +1 @@ -{"version":3,"names":[],"mappings":"","sources":["elmahio.js"],"sourcesContent":["/*!\r\n * elmah.io Javascript Logger - version 3.4.0\r\n * (c) 2018 elmah.io, Apache 2.0 License, https://elmah.io\r\n */\r\n\r\n(function (root, factory) {\r\n if (typeof define === 'function' && define.amd) {\r\n define([], function () {\r\n return factory(root);\r\n });\r\n } else if (typeof exports === 'object') {\r\n module.exports = factory(root);\r\n } else {\r\n root.Elmahio = factory(root);\r\n }\r\n})(typeof global !== 'undefined' ? global : typeof window !== 'undefined' ? window : this, function (window) {\r\n\r\n 'use strict';\r\n\r\n //\r\n // ==== STACKFRAME ====\r\n //\r\n\r\n var StackFrame = (function () {\r\n \"use strict\";\r\n function _isNumber(n) {\r\n return !isNaN(parseFloat(n)) && isFinite(n);\r\n }\r\n function _capitalize(str) {\r\n return str.charAt(0).toUpperCase() + str.substring(1);\r\n }\r\n function _getter(p) {\r\n return function () {\r\n return this[p];\r\n };\r\n }\r\n var booleanProps = [\"isConstructor\", \"isEval\", \"isNative\", \"isToplevel\"];\r\n var numericProps = [\"columnNumber\", \"lineNumber\"];\r\n var stringProps = [\"fileName\", \"functionName\", \"source\"];\r\n var arrayProps = [\"args\"];\r\n var props = booleanProps.concat(numericProps, stringProps, arrayProps);\r\n function StackFrame(obj) {\r\n if (obj instanceof Object) {\r\n for (var i = 0; i < props.length; i++) {\r\n if (obj.hasOwnProperty(props[i]) && obj[props[i]] !== undefined) {\r\n this[\"set\" + _capitalize(props[i])](obj[props[i]]);\r\n }\r\n }\r\n }\r\n }\r\n StackFrame.prototype = {\r\n getArgs: function () {\r\n return this.args;\r\n },\r\n setArgs: function (v) {\r\n if (Object.prototype.toString.call(v) !== \"[object Array]\") {\r\n throw new TypeError(\"Args must be an Array\");\r\n }\r\n this.args = v;\r\n },\r\n getEvalOrigin: function () {\r\n return this.evalOrigin;\r\n },\r\n setEvalOrigin: function (v) {\r\n if (v instanceof StackFrame) {\r\n this.evalOrigin = v;\r\n } else if (v instanceof Object) {\r\n this.evalOrigin = new StackFrame(v);\r\n } else {\r\n throw new TypeError(\"Eval Origin must be an Object or StackFrame\");\r\n }\r\n },\r\n toString: function () {\r\n var functionName = this.getFunctionName() || \"{anonymous}\";\r\n var args = \"(\" + (this.getArgs() || []).join(\",\") + \")\";\r\n var fileName = this.getFileName() ? \"@\" + this.getFileName() : \"\";\r\n var lineNumber = _isNumber(this.getLineNumber()) ? \":\" + this.getLineNumber() : \"\";\r\n var columnNumber = _isNumber(this.getColumnNumber()) ? \":\" + this.getColumnNumber() : \"\";\r\n return functionName + args + fileName + lineNumber + columnNumber;\r\n }\r\n };\r\n StackFrame.fromString = function StackFrame$$fromString(str) {\r\n var argsStartIndex = str.indexOf(\"(\");\r\n var argsEndIndex = str.lastIndexOf(\")\");\r\n var functionName = str.substring(0, argsStartIndex);\r\n var args = str.substring(argsStartIndex + 1, argsEndIndex).split(\",\");\r\n var locationString = str.substring(argsEndIndex + 1);\r\n if (locationString.indexOf(\"@\") === 0) {\r\n var parts = /@(.+?)(?::(\\d+))?(?::(\\d+))?$/.exec(locationString, \"\");\r\n var fileName = parts[1];\r\n var lineNumber = parts[2];\r\n var columnNumber = parts[3];\r\n }\r\n return new StackFrame({\r\n functionName: functionName,\r\n args: args || undefined,\r\n fileName: fileName,\r\n lineNumber: lineNumber || undefined,\r\n columnNumber: columnNumber || undefined\r\n });\r\n };\r\n for (var i = 0; i < booleanProps.length; i++) {\r\n StackFrame.prototype[\"get\" + _capitalize(booleanProps[i])] = _getter(booleanProps[i]);\r\n StackFrame.prototype[\"set\" + _capitalize(booleanProps[i])] = function (p) {\r\n return function (v) {\r\n this[p] = Boolean(v);\r\n };\r\n }(booleanProps[i]);\r\n }\r\n for (var j = 0; j < numericProps.length; j++) {\r\n StackFrame.prototype[\"get\" + _capitalize(numericProps[j])] = _getter(numericProps[j]);\r\n StackFrame.prototype[\"set\" + _capitalize(numericProps[j])] = function (p) {\r\n return function (v) {\r\n if (!_isNumber(v)) {\r\n throw new TypeError(p + \" must be a Number\");\r\n }\r\n this[p] = Number(v);\r\n };\r\n }(numericProps[j]);\r\n }\r\n for (var k = 0; k < stringProps.length; k++) {\r\n StackFrame.prototype[\"get\" + _capitalize(stringProps[k])] = _getter(stringProps[k]);\r\n StackFrame.prototype[\"set\" + _capitalize(stringProps[k])] = function (p) {\r\n return function (v) {\r\n this[p] = String(v);\r\n };\r\n }(stringProps[k]);\r\n }\r\n return StackFrame;\r\n })();\r\n\r\n //\r\n // ==== ERROR STACK PARSER ====\r\n //\r\n\r\n var ErrorStackParser = (function () {\r\n \"use strict\";\r\n var FIREFOX_SAFARI_STACK_REGEXP = /(^|@)\\S+\\:\\d+/;\r\n var CHROME_IE_STACK_REGEXP = /^\\s*at .*(\\S+\\:\\d+|\\(native\\))/m;\r\n var SAFARI_NATIVE_CODE_REGEXP = /^(eval@)?(\\[native code\\])?$/;\r\n return {\r\n /**\r\n * Given an Error object, extract the most information from it.\r\n *\r\n * @param {Error} error object\r\n * @return {Array} of StackFrames\r\n */\r\n parse: function ErrorStackParser$$parse(error) {\r\n if (typeof error.stacktrace !== \"undefined\" || typeof error[\"opera#sourceloc\"] !== \"undefined\") {\r\n return this.parseOpera(error);\r\n } else if (error.stack && error.stack.match(CHROME_IE_STACK_REGEXP)) {\r\n return this.parseV8OrIE(error);\r\n } else if (error.stack) {\r\n return this.parseFFOrSafari(error);\r\n } else {\r\n throw new Error(\"Cannot parse given Error object\");\r\n }\r\n },\r\n // Separate line and column numbers from a string of the form: (URI:Line:Column)\r\n extractLocation: function ErrorStackParser$$extractLocation(urlLike) {\r\n // Fail-fast but return locations like \"(native)\"\r\n if (urlLike.indexOf(\":\") === -1) {\r\n return [urlLike];\r\n }\r\n var regExp = /(.+?)(?:\\:(\\d+))?(?:\\:(\\d+))?$/;\r\n var parts = regExp.exec(urlLike.replace(/[\\(\\)]/g, \"\"));\r\n return [parts[1], parts[2] || undefined, parts[3] || undefined];\r\n },\r\n parseV8OrIE: function ErrorStackParser$$parseV8OrIE(error) {\r\n var filtered = error.stack.split(\"\\n\").filter(function (line) {\r\n return !!line.match(CHROME_IE_STACK_REGEXP);\r\n }, this);\r\n return filtered.map(function (line) {\r\n if (line.indexOf(\"(eval \") > -1) {\r\n // Throw away eval information until we implement stacktrace.js/stackframe#8\r\n line = line.replace(/eval code/g, \"eval\").replace(/(\\(eval at [^\\()]*)|(\\)\\,.*$)/g, \"\");\r\n }\r\n var tokens = line.replace(/^\\s+/, \"\").replace(/\\(eval code/g, \"(\").split(/\\s+/).slice(1);\r\n var locationParts = this.extractLocation(tokens.pop());\r\n var functionName = tokens.join(\" \") || undefined;\r\n var fileName = [\"eval\", \"\"].indexOf(locationParts[0]) > -1 ? undefined : locationParts[0];\r\n return new StackFrame({\r\n functionName: functionName,\r\n fileName: fileName,\r\n lineNumber: locationParts[1],\r\n columnNumber: locationParts[2],\r\n source: line\r\n });\r\n }, this);\r\n },\r\n parseFFOrSafari: function ErrorStackParser$$parseFFOrSafari(error) {\r\n var filtered = error.stack.split(\"\\n\").filter(function (line) {\r\n return !line.match(SAFARI_NATIVE_CODE_REGEXP);\r\n }, this);\r\n return filtered.map(function (line) {\r\n // Throw away eval information until we implement stacktrace.js/stackframe#8\r\n if (line.indexOf(\" > eval\") > -1) {\r\n line = line.replace(/ line (\\d+)(?: > eval line \\d+)* > eval\\:\\d+\\:\\d+/g, \":$1\");\r\n }\r\n if (line.indexOf(\"@\") === -1 && line.indexOf(\":\") === -1) {\r\n // Safari eval frames only have function names and nothing else\r\n return new StackFrame({\r\n functionName: line\r\n });\r\n } else {\r\n var functionNameRegex = /((.*\".+\"[^@]*)?[^@]*)(?:@)/;\r\n var matches = line.match(functionNameRegex);\r\n var functionName = matches && matches[1] ? matches[1] : undefined;\r\n var locationParts = this.extractLocation(line.replace(functionNameRegex, \"\"));\r\n return new StackFrame({\r\n functionName: functionName,\r\n fileName: locationParts[0],\r\n lineNumber: locationParts[1],\r\n columnNumber: locationParts[2],\r\n source: line\r\n });\r\n }\r\n }, this);\r\n },\r\n parseOpera: function ErrorStackParser$$parseOpera(e) {\r\n if (!e.stacktrace || e.message.indexOf(\"\\n\") > -1 && e.message.split(\"\\n\").length > e.stacktrace.split(\"\\n\").length) {\r\n return this.parseOpera9(e);\r\n } else if (!e.stack) {\r\n return this.parseOpera10(e);\r\n } else {\r\n return this.parseOpera11(e);\r\n }\r\n },\r\n parseOpera9: function ErrorStackParser$$parseOpera9(e) {\r\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)/i;\r\n var lines = e.message.split(\"\\n\");\r\n var result = [];\r\n for (var i = 2, len = lines.length; i < len; i += 2) {\r\n var match = lineRE.exec(lines[i]);\r\n if (match) {\r\n result.push(new StackFrame({\r\n fileName: match[2],\r\n lineNumber: match[1],\r\n source: lines[i]\r\n }));\r\n }\r\n }\r\n return result;\r\n },\r\n parseOpera10: function ErrorStackParser$$parseOpera10(e) {\r\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)(?:: In function (\\S+))?$/i;\r\n var lines = e.stacktrace.split(\"\\n\");\r\n var result = [];\r\n for (var i = 0, len = lines.length; i < len; i += 2) {\r\n var match = lineRE.exec(lines[i]);\r\n if (match) {\r\n result.push(new StackFrame({\r\n functionName: match[3] || undefined,\r\n fileName: match[2],\r\n lineNumber: match[1],\r\n source: lines[i]\r\n }));\r\n }\r\n }\r\n return result;\r\n },\r\n // Opera 10.65+ Error.stack very similar to FF/Safari\r\n parseOpera11: function ErrorStackParser$$parseOpera11(error) {\r\n var filtered = error.stack.split(\"\\n\").filter(function (line) {\r\n return !!line.match(FIREFOX_SAFARI_STACK_REGEXP) && !line.match(/^Error created at/);\r\n }, this);\r\n return filtered.map(function (line) {\r\n var tokens = line.split(\"@\");\r\n var locationParts = this.extractLocation(tokens.pop());\r\n var functionCall = tokens.shift() || \"\";\r\n var functionName = functionCall.replace(//, \"$2\").replace(/\\([^\\)]*\\)/g, \"\") || undefined;\r\n var argsRaw;\r\n if (functionCall.match(/\\(([^\\)]*)\\)/)) {\r\n argsRaw = functionCall.replace(/^[^\\(]+\\(([^\\)]*)\\)$/, \"$1\");\r\n }\r\n var args = argsRaw === undefined || argsRaw === \"[arguments not available]\" ? undefined : argsRaw.split(\",\");\r\n return new StackFrame({\r\n functionName: functionName,\r\n args: args,\r\n fileName: locationParts[0],\r\n lineNumber: locationParts[1],\r\n columnNumber: locationParts[2],\r\n source: line\r\n });\r\n }, this);\r\n }\r\n };\r\n })();\r\n\r\n //\r\n // ==== STACKTRACE-GPS ====\r\n //\r\n\r\n var SourceMap = function(e){var n={};function r(t){if(n[t])return n[t].exports;var o=n[t]={exports:{},id:t,loaded:!1};return e[t].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}return r.m=e,r.c=n,r.p=\"\",r(0)}([function(e,n,r){var t=r(1),o=r(2),i=r(3).ArraySet,a=r(4),s=r(6).quickSort;function u(e){var n=e;return\"string\"==typeof e&&(n=JSON.parse(e.replace(/^\\)\\]\\}'/,\"\"))),null!=n.sections?new c(n):new l(n)}function l(e){var n=e;\"string\"==typeof e&&(n=JSON.parse(e.replace(/^\\)\\]\\}'/,\"\")));var r=t.getArg(n,\"version\"),o=t.getArg(n,\"sources\"),a=t.getArg(n,\"names\",[]),s=t.getArg(n,\"sourceRoot\",null),u=t.getArg(n,\"sourcesContent\",null),l=t.getArg(n,\"mappings\"),g=t.getArg(n,\"file\",null);if(r!=this._version)throw new Error(\"Unsupported version: \"+r);o=o.map(String).map(t.normalize).map(function(e){return s&&t.isAbsolute(s)&&t.isAbsolute(e)?t.relative(s,e):e}),this._names=i.fromArray(a.map(String),!0),this._sources=i.fromArray(o,!0),this.sourceRoot=s,this.sourcesContent=u,this._mappings=l,this.file=g}function g(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}function c(e){var n=e;\"string\"==typeof e&&(n=JSON.parse(e.replace(/^\\)\\]\\}'/,\"\")));var r=t.getArg(n,\"version\"),o=t.getArg(n,\"sections\");if(r!=this._version)throw new Error(\"Unsupported version: \"+r);this._sources=new i,this._names=new i;var a={line:-1,column:0};this._sections=o.map(function(e){if(e.url)throw new Error(\"Support for url field in sections not implemented.\");var n=t.getArg(e,\"offset\"),r=t.getArg(n,\"line\"),o=t.getArg(n,\"column\");if(r=0){var s=this._originalMappings[a];if(void 0===e.column)for(var u=s.originalLine;s&&s.originalLine===u;)i.push({line:t.getArg(s,\"generatedLine\",null),column:t.getArg(s,\"generatedColumn\",null),lastColumn:t.getArg(s,\"lastGeneratedColumn\",null)}),s=this._originalMappings[++a];else for(var l=s.originalColumn;s&&s.originalLine===n&&s.originalColumn==l;)i.push({line:t.getArg(s,\"generatedLine\",null),column:t.getArg(s,\"generatedColumn\",null),lastColumn:t.getArg(s,\"lastGeneratedColumn\",null)}),s=this._originalMappings[++a]}return i},n.SourceMapConsumer=u,l.prototype=Object.create(u.prototype),l.prototype.consumer=u,l.fromSourceMap=function(e){var n=Object.create(l.prototype),r=n._names=i.fromArray(e._names.toArray(),!0),o=n._sources=i.fromArray(e._sources.toArray(),!0);n.sourceRoot=e._sourceRoot,n.sourcesContent=e._generateSourcesContent(n._sources.toArray(),n.sourceRoot),n.file=e._file;for(var a=e._mappings.toArray().slice(),u=n.__generatedMappings=[],c=n.__originalMappings=[],p=0,h=a.length;p1&&(r.source=d+i[1],d+=i[1],r.originalLine=h+i[2],h=r.originalLine,r.originalLine+=1,r.originalColumn=f+i[3],f=r.originalColumn,i.length>4&&(r.name=m+i[4],m+=i[4])),L.push(r),\"number\"==typeof r.originalLine&&y.push(r)}s(L,t.compareByGeneratedPositionsDeflated),this.__generatedMappings=L,s(y,t.compareByOriginalPositions),this.__originalMappings=y},l.prototype._findMapping=function(e,n,r,t,i,a){if(e[r]<=0)throw new TypeError(\"Line must be greater than or equal to 1, got \"+e[r]);if(e[t]<0)throw new TypeError(\"Column must be greater than or equal to 0, got \"+e[t]);return o.search(e,n,i,a)},l.prototype.computeColumnSpans=function(){for(var e=0;e=0){var o=this._generatedMappings[r];if(o.generatedLine===n.generatedLine){var i=t.getArg(o,\"source\",null);null!==i&&(i=this._sources.at(i),null!=this.sourceRoot&&(i=t.join(this.sourceRoot,i)));var a=t.getArg(o,\"name\",null);return null!==a&&(a=this._names.at(a)),{source:i,line:t.getArg(o,\"originalLine\",null),column:t.getArg(o,\"originalColumn\",null),name:a}}}return{source:null,line:null,column:null,name:null}},l.prototype.hasContentsOfAllSources=function(){return!!this.sourcesContent&&(this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return null==e}))},l.prototype.sourceContentFor=function(e,n){if(!this.sourcesContent)return null;if(null!=this.sourceRoot&&(e=t.relative(this.sourceRoot,e)),this._sources.has(e))return this.sourcesContent[this._sources.indexOf(e)];var r;if(null!=this.sourceRoot&&(r=t.urlParse(this.sourceRoot))){var o=e.replace(/^file:\\/\\//,\"\");if(\"file\"==r.scheme&&this._sources.has(o))return this.sourcesContent[this._sources.indexOf(o)];if((!r.path||\"/\"==r.path)&&this._sources.has(\"/\"+e))return this.sourcesContent[this._sources.indexOf(\"/\"+e)]}if(n)return null;throw new Error('\"'+e+'\" is not in the SourceMap.')},l.prototype.generatedPositionFor=function(e){var n=t.getArg(e,\"source\");if(null!=this.sourceRoot&&(n=t.relative(this.sourceRoot,n)),!this._sources.has(n))return{line:null,column:null,lastColumn:null};var r={source:n=this._sources.indexOf(n),originalLine:t.getArg(e,\"line\"),originalColumn:t.getArg(e,\"column\")},o=this._findMapping(r,this._originalMappings,\"originalLine\",\"originalColumn\",t.compareByOriginalPositions,t.getArg(e,\"bias\",u.GREATEST_LOWER_BOUND));if(o>=0){var i=this._originalMappings[o];if(i.source===r.source)return{line:t.getArg(i,\"generatedLine\",null),column:t.getArg(i,\"generatedColumn\",null),lastColumn:t.getArg(i,\"lastGeneratedColumn\",null)}}return{line:null,column:null,lastColumn:null}},n.BasicSourceMapConsumer=l,c.prototype=Object.create(u.prototype),c.prototype.constructor=u,c.prototype._version=3,Object.defineProperty(c.prototype,\"sources\",{get:function(){for(var e=[],n=0;n=0;g--)\".\"===(a=u[g])?u.splice(g,1):\"..\"===a?l++:l>0&&(\"\"===a?(u.splice(g+1,l),l=0):(u.splice(g,2),l--));return\"\"===(r=u.join(\"/\"))&&(r=s?\"/\":\".\"),t?(t.path=r,i(t)):r}n.urlParse=o,n.urlGenerate=i,n.normalize=a,n.join=function(e,n){\"\"===e&&(e=\".\"),\"\"===n&&(n=\".\");var r=o(n),s=o(e);if(s&&(e=s.path||\"/\"),r&&!r.scheme)return s&&(r.scheme=s.scheme),i(r);if(r||n.match(t))return n;if(s&&!s.host&&!s.path)return s.host=n,i(s);var u=\"/\"===n.charAt(0)?n:a(e.replace(/\\/+$/,\"\")+\"/\"+n);return s?(s.path=u,i(s)):u},n.isAbsolute=function(e){return\"/\"===e.charAt(0)||!!e.match(r)},n.relative=function(e,n){\"\"===e&&(e=\".\"),e=e.replace(/\\/$/,\"\");for(var r=0;0!==n.indexOf(e+\"/\");){var t=e.lastIndexOf(\"/\");if(t<0)return n;if((e=e.slice(0,t)).match(/^([^\\/]+:\\/)?\\/*$/))return n;++r}return Array(r+1).join(\"../\")+n.substr(e.length+1)};var s=!(\"__proto__\"in Object.create(null));function u(e){return e}function l(e){if(!e)return!1;var n=e.length;if(n<9)return!1;if(95!==e.charCodeAt(n-1)||95!==e.charCodeAt(n-2)||111!==e.charCodeAt(n-3)||116!==e.charCodeAt(n-4)||111!==e.charCodeAt(n-5)||114!==e.charCodeAt(n-6)||112!==e.charCodeAt(n-7)||95!==e.charCodeAt(n-8)||95!==e.charCodeAt(n-9))return!1;for(var r=n-10;r>=0;r--)if(36!==e.charCodeAt(r))return!1;return!0}function g(e,n){return e===n?0:e>n?1:-1}n.toSetString=s?u:function(e){return l(e)?\"$\"+e:e},n.fromSetString=s?u:function(e){return l(e)?e.slice(1):e},n.compareByOriginalPositions=function(e,n,r){var t=e.source-n.source;return 0!==t?t:0!=(t=e.originalLine-n.originalLine)?t:0!=(t=e.originalColumn-n.originalColumn)||r?t:0!=(t=e.generatedColumn-n.generatedColumn)?t:0!=(t=e.generatedLine-n.generatedLine)?t:e.name-n.name},n.compareByGeneratedPositionsDeflated=function(e,n,r){var t=e.generatedLine-n.generatedLine;return 0!==t?t:0!=(t=e.generatedColumn-n.generatedColumn)||r?t:0!=(t=e.source-n.source)?t:0!=(t=e.originalLine-n.originalLine)?t:0!=(t=e.originalColumn-n.originalColumn)?t:e.name-n.name},n.compareByGeneratedPositionsInflated=function(e,n){var r=e.generatedLine-n.generatedLine;return 0!==r?r:0!=(r=e.generatedColumn-n.generatedColumn)?r:0!==(r=g(e.source,n.source))?r:0!=(r=e.originalLine-n.originalLine)?r:0!=(r=e.originalColumn-n.originalColumn)?r:g(e.name,n.name)}},function(e,n){n.GREATEST_LOWER_BOUND=1,n.LEAST_UPPER_BOUND=2,n.search=function(e,r,t,o){if(0===r.length)return-1;var i=function e(r,t,o,i,a,s){var u=Math.floor((t-r)/2)+r,l=a(o,i[u],!0);return 0===l?u:l>0?t-u>1?e(u,t,o,i,a,s):s==n.LEAST_UPPER_BOUND?t1?e(r,u,o,i,a,s):s==n.LEAST_UPPER_BOUND?u:r<0?-1:r}(-1,r.length,e,r,t,o||n.GREATEST_LOWER_BOUND);if(i<0)return-1;for(;i-1>=0&&0===t(r[i],r[i-1],!0);)--i;return i}},function(e,n,r){var t=r(1),o=Object.prototype.hasOwnProperty;function i(){this._array=[],this._set=Object.create(null)}i.fromArray=function(e,n){for(var r=new i,t=0,o=e.length;t=0&&e>>=5)>0&&(n|=32),o+=t.encode(n)}while(i>0);return o},n.decode=function(e,n,r){var o,i,a,s,u=e.length,l=0,g=0;do{if(n>=u)throw new Error(\"Expected more digits in base 64 VLQ value.\");if(-1===(i=t.decode(e.charCodeAt(n++))))throw new Error(\"Invalid base64 digit: \"+e.charAt(n-1));o=!!(32&i),l+=(i&=31)<>1,1==(1&a)?-s:s),r.rest=n}},function(e,n){var r=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\".split(\"\");n.encode=function(e){if(0<=e&&e= 200 && req.status < 300 || url.substr(0, 7) === \"file://\" && req.responseText) {\r\n resolve(req.responseText);\r\n } else {\r\n reject(new Error(\"HTTP status: \" + req.status + \" retrieving \" + url));\r\n }\r\n }\r\n };\r\n req.send();\r\n });\r\n }\r\n /**\r\n * Convert a Base64-encoded string into its original representation.\r\n * Used for inline sourcemaps.\r\n *\r\n * @param {String} b64str Base-64 encoded string\r\n * @returns {String} original representation of the base64-encoded string.\r\n */\r\n function _atob(b64str) {\r\n if (typeof window !== \"undefined\" && window.atob) {\r\n return window.atob(b64str);\r\n } else {\r\n throw new Error(\"You must supply a polyfill for window.atob in this environment\");\r\n }\r\n }\r\n function _parseJson(string) {\r\n if (typeof JSON !== \"undefined\" && JSON.parse) {\r\n return JSON.parse(string);\r\n } else {\r\n throw new Error(\"You must supply a polyfill for JSON.parse in this environment\");\r\n }\r\n }\r\n function _findFunctionName(source, lineNumber) {\r\n var syntaxes = [ // {name} = function ({args}) TODO args capture\r\n /['\"]?([$_A-Za-z][$_A-Za-z0-9]*)['\"]?\\s*[:=]\\s*function\\b/, // function {name}({args}) m[1]=name m[2]=args\r\n /function\\s+([^('\"`]*?)\\s*\\(([^)]*)\\)/, // {name} = eval()\r\n /['\"]?([$_A-Za-z][$_A-Za-z0-9]*)['\"]?\\s*[:=]\\s*(?:eval|new Function)\\b/, // fn_name() {\r\n /\\b(?!(?:if|for|switch|while|with|catch)\\b)(?:(?:static)\\s+)?(\\S+)\\s*\\(.*?\\)\\s*\\{/, // {name} = () => {\r\n /['\"]?([$_A-Za-z][$_A-Za-z0-9]*)['\"]?\\s*[:=]\\s*\\(.*?\\)\\s*=>/];\r\n var lines = source.split(\"\\n\");\r\n // Walk backwards in the source lines until we find the line which matches one of the patterns above\r\n var code = \"\";\r\n var maxLines = Math.min(lineNumber, 20);\r\n for (var i = 0; i < maxLines; ++i) {\r\n // lineNo is 1-based, source[] is 0-based\r\n var line = lines[lineNumber - i - 1];\r\n var commentPos = line.indexOf(\"//\");\r\n if (commentPos >= 0) {\r\n line = line.substr(0, commentPos);\r\n }\r\n if (line) {\r\n code = line + code;\r\n var len = syntaxes.length;\r\n for (var index = 0; index < len; index++) {\r\n var m = syntaxes[index].exec(code);\r\n if (m && m[1]) {\r\n return m[1];\r\n }\r\n }\r\n }\r\n }\r\n return undefined;\r\n }\r\n function _ensureSupportedEnvironment() {\r\n if (typeof Object.defineProperty !== \"function\" || typeof Object.create !== \"function\") {\r\n throw new Error(\"Unable to consume source maps in older browsers\");\r\n }\r\n }\r\n function _ensureStackFrameIsLegit(stackframe) {\r\n if (typeof stackframe !== \"object\") {\r\n throw new TypeError(\"Given StackFrame is not an object\");\r\n } else if (typeof stackframe.fileName !== \"string\") {\r\n throw new TypeError(\"Given file name is not a String\");\r\n } else if (typeof stackframe.lineNumber !== \"number\" || stackframe.lineNumber % 1 !== 0 || stackframe.lineNumber < 1) {\r\n throw new TypeError(\"Given line number must be a positive integer\");\r\n } else if (typeof stackframe.columnNumber !== \"number\" || stackframe.columnNumber % 1 !== 0 || stackframe.columnNumber < 0) {\r\n throw new TypeError(\"Given column number must be a non-negative integer\");\r\n }\r\n return true;\r\n }\r\n function _findSourceMappingURL(source) {\r\n var sourceMappingUrlRegExp = /\\/\\/[#@] ?sourceMappingURL=([^\\s'\"]+)\\s*$/gm;\r\n var lastSourceMappingUrl;\r\n var matchSourceMappingUrl;\r\n while (matchSourceMappingUrl = sourceMappingUrlRegExp.exec(source)) {\r\n // jshint ignore:line\r\n lastSourceMappingUrl = matchSourceMappingUrl[1];\r\n }\r\n if (lastSourceMappingUrl) {\r\n return lastSourceMappingUrl;\r\n } else {\r\n throw new Error(\"sourceMappingURL not found\");\r\n }\r\n }\r\n function _extractLocationInfoFromSourceMapSource(stackframe, sourceMapConsumer, sourceCache) {\r\n return new Promise(function (resolve, reject) {\r\n var loc = sourceMapConsumer.originalPositionFor({\r\n line: stackframe.lineNumber,\r\n column: stackframe.columnNumber\r\n });\r\n if (loc.source) {\r\n // cache mapped sources\r\n var mappedSource = sourceMapConsumer.sourceContentFor(loc.source);\r\n if (mappedSource) {\r\n sourceCache[loc.source] = mappedSource;\r\n }\r\n resolve(// given stackframe and source location, update stackframe\r\n new StackFrame({\r\n functionName: loc.name || stackframe.functionName,\r\n args: stackframe.args,\r\n fileName: loc.source,\r\n lineNumber: loc.line,\r\n columnNumber: loc.column\r\n }));\r\n } else {\r\n reject(new Error(\"Could not get original source for given stackframe and source map\"));\r\n }\r\n });\r\n }\r\n /**\r\n * @constructor\r\n * @param {Object} opts\r\n * opts.sourceCache = {url: \"Source String\"} => preload source cache\r\n * opts.sourceMapConsumerCache = {/path/file.js.map: SourceMapConsumer}\r\n * opts.offline = True to prevent network requests.\r\n * Best effort without sources or source maps.\r\n * opts.ajax = Promise returning function to make X-Domain requests\r\n */\r\n return function StackTraceGPS(opts) {\r\n if (!(this instanceof StackTraceGPS)) {\r\n return new StackTraceGPS(opts);\r\n }\r\n opts = opts || {};\r\n this.sourceCache = opts.sourceCache || {};\r\n this.sourceMapConsumerCache = opts.sourceMapConsumerCache || {};\r\n this.ajax = opts.ajax || _xdr;\r\n this._atob = opts.atob || _atob;\r\n\r\n this._get = function _get(location) {\r\n return new Promise(function (resolve, reject) {\r\n var isDataUrl = location.substr(0, 5) === \"data:\";\r\n if (this.sourceCache[location]) {\r\n resolve(this.sourceCache[location]);\r\n } else if (opts.offline && !isDataUrl) {\r\n reject(new Error(\"Cannot make network requests in offline mode\"));\r\n } else {\r\n if (isDataUrl) {\r\n // data URLs can have parameters.\r\n // see http://tools.ietf.org/html/rfc2397\r\n var supportedEncodingRegexp = /^data:application\\/json;([\\w=:\"-]+;)*base64,/;\r\n var match = location.match(supportedEncodingRegexp);\r\n if (match) {\r\n var sourceMapStart = match[0].length;\r\n var encodedSource = location.substr(sourceMapStart);\r\n var source = this._atob(encodedSource);\r\n this.sourceCache[location] = source;\r\n resolve(source);\r\n } else {\r\n reject(new Error(\"The encoding of the inline sourcemap is not supported\"));\r\n }\r\n } else {\r\n var xhrPromise = this.ajax(location, {\r\n method: \"get\"\r\n });\r\n // Cache the Promise to prevent duplicate in-flight requests\r\n this.sourceCache[location] = xhrPromise;\r\n xhrPromise.then(resolve, reject);\r\n }\r\n }\r\n }.bind(this));\r\n };\r\n /**\r\n * Creating SourceMapConsumers is expensive, so this wraps the creation of a\r\n * SourceMapConsumer in a per-instance cache.\r\n *\r\n * @param {String} sourceMappingURL = URL to fetch source map from\r\n * @param {String} defaultSourceRoot = Default source root for source map if undefined\r\n * @returns {Promise} that resolves a SourceMapConsumer\r\n */\r\n this._getSourceMapConsumer = function _getSourceMapConsumer(sourceMappingURL, defaultSourceRoot) {\r\n return new Promise(function (resolve, reject) {\r\n if (this.sourceMapConsumerCache[sourceMappingURL]) {\r\n resolve(this.sourceMapConsumerCache[sourceMappingURL]);\r\n } else {\r\n var sourceMapConsumerPromise = new Promise(function (resolve, reject) {\r\n return this._get(sourceMappingURL).then(function (sourceMapSource) {\r\n if (typeof sourceMapSource === \"string\") {\r\n sourceMapSource = _parseJson(sourceMapSource.replace(/^\\)\\]\\}'/, \"\"));\r\n }\r\n if (typeof sourceMapSource.sourceRoot === \"undefined\") {\r\n sourceMapSource.sourceRoot = defaultSourceRoot;\r\n }\r\n resolve(new SourceMap.SourceMapConsumer(sourceMapSource));\r\n }, reject);\r\n }.bind(this));\r\n this.sourceMapConsumerCache[sourceMappingURL] = sourceMapConsumerPromise;\r\n resolve(sourceMapConsumerPromise);\r\n }\r\n }.bind(this));\r\n };\r\n /**\r\n * Given a StackFrame, enhance function name and use source maps for a\r\n * better StackFrame.\r\n *\r\n * @param {StackFrame} stackframe object\r\n * @returns {Promise} that resolves with with source-mapped StackFrame\r\n */\r\n this.pinpoint = function StackTraceGPS$$pinpoint(stackframe) {\r\n return new Promise(function (resolve, reject) {\r\n this.getMappedLocation(stackframe).then(function (mappedStackFrame) {\r\n function resolveMappedStackFrame() {\r\n resolve(mappedStackFrame);\r\n }\r\n this.findFunctionName(mappedStackFrame).then(resolve, resolveMappedStackFrame)[\"catch\"](resolveMappedStackFrame);\r\n }.bind(this), reject);\r\n }.bind(this));\r\n };\r\n /**\r\n * Given a StackFrame, guess function name from location information.\r\n *\r\n * @param {StackFrame} stackframe\r\n * @returns {Promise} that resolves with enhanced StackFrame.\r\n */\r\n this.findFunctionName = function StackTraceGPS$$findFunctionName(stackframe) {\r\n return new Promise(function (resolve, reject) {\r\n _ensureStackFrameIsLegit(stackframe);\r\n this._get(stackframe.fileName).then(function getSourceCallback(source) {\r\n var lineNumber = stackframe.lineNumber;\r\n var columnNumber = stackframe.columnNumber;\r\n var guessedFunctionName = _findFunctionName(source, lineNumber, columnNumber);\r\n // Only replace functionName if we found something\r\n if (guessedFunctionName) {\r\n resolve(new StackFrame({\r\n functionName: guessedFunctionName,\r\n args: stackframe.args,\r\n fileName: stackframe.fileName,\r\n lineNumber: lineNumber,\r\n columnNumber: columnNumber\r\n }));\r\n } else {\r\n resolve(stackframe);\r\n }\r\n }, reject)[\"catch\"](reject);\r\n }.bind(this));\r\n };\r\n /**\r\n * Given a StackFrame, seek source-mapped location and return new enhanced StackFrame.\r\n *\r\n * @param {StackFrame} stackframe\r\n * @returns {Promise} that resolves with enhanced StackFrame.\r\n */\r\n this.getMappedLocation = function StackTraceGPS$$getMappedLocation(stackframe) {\r\n return new Promise(function (resolve, reject) {\r\n _ensureSupportedEnvironment();\r\n _ensureStackFrameIsLegit(stackframe);\r\n var sourceCache = this.sourceCache;\r\n var fileName = stackframe.fileName;\r\n this._get(fileName).then(function (source) {\r\n var sourceMappingURL = _findSourceMappingURL(source);\r\n var isDataUrl = sourceMappingURL.substr(0, 5) === \"data:\";\r\n var defaultSourceRoot = fileName.substring(0, fileName.lastIndexOf(\"/\") + 1);\r\n if (sourceMappingURL[0] !== \"/\" && !isDataUrl && !/^https?:\\/\\/|^\\/\\//i.test(sourceMappingURL)) {\r\n sourceMappingURL = defaultSourceRoot + sourceMappingURL;\r\n }\r\n return this._getSourceMapConsumer(sourceMappingURL, defaultSourceRoot).then(function (sourceMapConsumer) {\r\n return _extractLocationInfoFromSourceMapSource(stackframe, sourceMapConsumer, sourceCache).then(resolve)[\"catch\"](function () {\r\n resolve(stackframe);\r\n });\r\n });\r\n }.bind(this), reject)[\"catch\"](reject);\r\n }.bind(this));\r\n };\r\n };\r\n })(SourceMap, StackFrame);\r\n\r\n //\r\n // Shared Variables\r\n //\r\n\r\n var scriptFile = document.getElementsByTagName('script');\r\n var scriptIndex = scriptFile.length - 1;\r\n var myScript = scriptFile[scriptIndex];\r\n var queryString = myScript.src.replace(/^[^\\?]+\\??/, '');\r\n var params = parseQuery(queryString);\r\n var paramsLength = objectLength(params);\r\n\r\n var debugSettings = {\r\n label: ' elmah.io debugger : On ',\r\n labelCSS: 'background: #06a89c; color: #ffffff; display: inline-block; font-size: 14px;',\r\n successCSS: 'background: #d4edda; color: #155724; display: inline-block; font-size: 13px;',\r\n errorCSS: 'background: #f8d7da; color: #721c24; display: inline-block; font-size: 13px;',\r\n warningCSS: 'background: #fff3cd; color: #856404; display: inline-block; font-size: 13px;',\r\n lightCSS: 'background: #e2e3e5; color: #383d41; display: inline-block; font-size: 13px;'\r\n };\r\n\r\n var defaults = {\r\n apiKey: null,\r\n logId: null,\r\n debug: false,\r\n application: null,\r\n filter: null,\r\n captureConsoleMinimumLevel: 'none'\r\n };\r\n\r\n //\r\n // Shared Methods\r\n //\r\n\r\n var extend = function () {\r\n\r\n // Variables\r\n var extended = {};\r\n var deep = false;\r\n var i = 0;\r\n\r\n // Check if a deep merge\r\n if (Object.prototype.toString.call(arguments[0]) === '[object Boolean]') {\r\n deep = arguments[0];\r\n i++;\r\n }\r\n\r\n // Merge the object into the extended object\r\n var merge = function (obj) {\r\n for (var prop in obj) {\r\n if (obj.hasOwnProperty(prop)) {\r\n // If property is an object, merge properties\r\n if (deep && Object.prototype.toString.call(obj[prop]) === '[object Object]') {\r\n extended[prop] = extend(extended[prop], obj[prop]);\r\n } else {\r\n extended[prop] = obj[prop];\r\n }\r\n }\r\n }\r\n };\r\n\r\n // Loop through each object and conduct a merge\r\n for (; i < arguments.length; i++) {\r\n var obj = arguments[i];\r\n merge(obj);\r\n }\r\n\r\n return extended;\r\n\r\n };\r\n\r\n //\r\n // Helpers\r\n //\r\n\r\n function parseQuery(query) {\r\n var Params = new Object();\r\n if (!query) return Params; // return empty object\r\n var Pairs = query.split(/[;&]/);\r\n for (var i = 0; i < Pairs.length; i++) {\r\n var KeyVal = Pairs[i].split('=');\r\n if (!KeyVal || KeyVal.length !== 2) continue;\r\n var key = unescape(KeyVal[0]);\r\n var val = unescape(KeyVal[1]);\r\n val = val.replace(/\\+/g, ' ');\r\n Params[key] = val;\r\n }\r\n return Params;\r\n }\r\n\r\n function objectLength(obj) {\r\n var size = 0, key;\r\n for (key in obj) {\r\n if (obj.hasOwnProperty(key)) size++;\r\n }\r\n return size;\r\n };\r\n\r\n function getSearchParameters() {\r\n var prmstr = window.location.search.substr(1);\r\n return prmstr !== null && prmstr !== \"\" ? transformToAssocArray(prmstr) : {};\r\n }\r\n\r\n function transformToAssocArray(prmstr) {\r\n var params = [];\r\n var prmarr = prmstr.split(\"&\");\r\n for (var i = 0; i < prmarr.length; i++) {\r\n var tmparr = prmarr[i].split(\"=\");\r\n params.push({\r\n 'key': tmparr[0],\r\n 'value': tmparr[1]\r\n });\r\n }\r\n return params;\r\n }\r\n\r\n function merge_objects(obj1, obj2) {\r\n var obj3 = {};\r\n for (var attrname1 in obj1) {\r\n obj3[attrname1] = obj1[attrname1];\r\n }\r\n for (var attrname2 in obj2) {\r\n obj3[attrname2] = obj2[attrname2];\r\n }\r\n\r\n return obj3;\r\n }\r\n\r\n // sprintf-js\r\n var sprintfjs = function() {\r\n 'use strict'\r\n var app = {};\r\n var re = {\r\n not_string: /[^s]/,\r\n not_bool: /[^t]/,\r\n not_type: /[^T]/,\r\n not_primitive: /[^v]/,\r\n number: /[diefg]/,\r\n numeric_arg: /[bcdiefguxX]/,\r\n json: /[j]/,\r\n not_json: /[^j]/,\r\n text: /^[^\\x25]+/,\r\n modulo: /^\\x25{2}/,\r\n placeholder: /^\\x25(?:([1-9]\\d*)\\$|\\(([^)]+)\\))?(\\+)?(0|'[^$])?(-)?(\\d+)?(?:\\.(\\d+))?([b-gijostTuvxX])/,\r\n key: /^([a-z_][a-z_\\d]*)/i,\r\n key_access: /^\\.([a-z_][a-z_\\d]*)/i,\r\n index_access: /^\\[(\\d+)\\]/,\r\n sign: /^[+-]/,\r\n mod: /^\\x25\\s/,\r\n notplaceholder: /^\\x25?([^b-gijostTuvxX])/\r\n }\r\n\r\n function sprintf(key) {\r\n // `arguments` is not an array, but should be fine for this call\r\n return sprintf_format(sprintf_parse(key), arguments)\r\n }\r\n\r\n function vsprintf(fmt, argv) {\r\n return sprintf.apply(null, [fmt].concat(argv || []))\r\n }\r\n\r\n function sprintf_format(parse_tree, argv) {\r\n var cursor = 1, tree_length = parse_tree.length, arg, output = '', i, k, ph, pad, pad_character, pad_length, is_positive, sign;\r\n for (i = 0; i < tree_length; i++) {\r\n if (typeof parse_tree[i] === 'string') {\r\n output += parse_tree[i]\r\n }\r\n else if (typeof parse_tree[i] === 'object') {\r\n ph = parse_tree[i]; // placeholder\r\n if (ph.keys) { // keyword argument\r\n arg = argv[cursor]\r\n for (k = 0; k < ph.keys.length; k++) {\r\n if (arg == undefined) {\r\n throw new Error(sprintf('[sprintf] Cannot access property \"%s\" of undefined value \"%s\"', ph.keys[k], ph.keys[k-1]))\r\n }\r\n arg = arg[ph.keys[k]]\r\n }\r\n }\r\n else if (ph.param_no) { // positional argument (explicit)\r\n arg = argv[ph.param_no]\r\n }\r\n else { // positional argument (implicit)\r\n arg = argv[cursor++]\r\n }\r\n\r\n if (re.not_type.test(ph.type) && re.not_primitive.test(ph.type) && arg instanceof Function) {\r\n arg = arg()\r\n }\r\n\r\n if (re.numeric_arg.test(ph.type) && (typeof arg !== 'number' && isNaN(arg) && arg === undefined)) { // treat %_d as string if it has no argument\r\n arg = ph.placeholder;\r\n ph.type = \"s\";\r\n }\r\n\r\n if (re.number.test(ph.type)) {\r\n is_positive = typeof arg === \"string\" ? true : arg >= 0\r\n }\r\n\r\n switch (ph.type) {\r\n case 'b':\r\n arg = parseInt(arg, 10).toString(2)\r\n break\r\n case 'c':\r\n arg = String.fromCharCode(parseInt(arg, 10))\r\n break\r\n case 'd':\r\n case 'i':\r\n arg = typeof arg === \"number\" ? parseInt(arg, 10) : NaN\r\n break\r\n case 'j':\r\n arg = JSON.stringify(arg, null, ph.width ? parseInt(ph.width) : 0)\r\n break\r\n case 'e':\r\n arg = ph.precision ? parseFloat(arg).toExponential(ph.precision) : parseFloat(arg).toExponential()\r\n break\r\n case 'f':\r\n arg = ph.precision ? parseFloat(arg).toFixed(ph.precision) : parseFloat(arg)\r\n break\r\n case 'g':\r\n arg = ph.precision ? String(Number(arg.toPrecision(ph.precision))) : parseFloat(arg)\r\n break\r\n case 'o':\r\n arg = (parseInt(arg, 10) >>> 0).toString(8)\r\n break\r\n case 's':\r\n arg = String(arg)\r\n arg = arg === \"undefined\" ? ph.placeholder : (ph.precision ? arg.substring(0, ph.precision) : arg)\r\n break\r\n case 't':\r\n arg = String(!!arg)\r\n arg = (ph.precision ? arg.substring(0, ph.precision) : arg)\r\n break\r\n case 'T':\r\n arg = Object.prototype.toString.call(arg).slice(8, -1).toLowerCase()\r\n arg = (ph.precision ? arg.substring(0, ph.precision) : arg)\r\n break\r\n case 'u':\r\n arg = parseInt(arg, 10) >>> 0\r\n break\r\n case 'v':\r\n arg = arg.valueOf()\r\n arg = (ph.precision ? arg.substring(0, ph.precision) : arg)\r\n break\r\n case 'x':\r\n arg = (parseInt(arg, 10) >>> 0).toString(16)\r\n break\r\n case 'X':\r\n arg = (parseInt(arg, 10) >>> 0).toString(16).toUpperCase()\r\n break\r\n }\r\n if (re.json.test(ph.type)) {\r\n output += arg\r\n }\r\n else {\r\n if (re.number.test(ph.type) && (!is_positive || ph.sign)) {\r\n sign = is_positive ? '+' : '-'\r\n arg = arg.toString().replace(re.sign, '')\r\n }\r\n else {\r\n sign = ''\r\n }\r\n pad_character = ph.pad_char ? ph.pad_char === '0' ? '0' : ph.pad_char.charAt(1) : ' '\r\n pad_length = ph.width - (sign + arg).length\r\n pad = ph.width ? (pad_length > 0 ? pad_character.repeat(pad_length) : '') : ''\r\n output += ph.align ? sign + arg + pad : (pad_character === '0' ? sign + pad + arg : pad + sign + arg)\r\n }\r\n }\r\n }\r\n return output\r\n }\r\n\r\n var sprintf_cache = Object.create(null)\r\n\r\n function sprintf_parse(fmt) {\r\n var _fmt = fmt, match, parse_tree = [], arg_names = 0;\r\n while (_fmt) {\r\n if ((match = re.text.exec(_fmt)) !== null) {\r\n parse_tree.push(match[0]);\r\n }\r\n else if ((match = re.modulo.exec(_fmt)) !== null) {\r\n parse_tree.push('%');\r\n }\r\n else if ((match = re.placeholder.exec(_fmt)) !== null) {\r\n if (match[2]) {\r\n arg_names |= 1\r\n var field_list = [], replacement_field = match[2], field_match = []\r\n if ((field_match = re.key.exec(replacement_field)) !== null) {\r\n field_list.push(field_match[1])\r\n while ((replacement_field = replacement_field.substring(field_match[0].length)) !== '') {\r\n if ((field_match = re.key_access.exec(replacement_field)) !== null) {\r\n field_list.push(field_match[1])\r\n }\r\n else if ((field_match = re.index_access.exec(replacement_field)) !== null) {\r\n field_list.push(field_match[1])\r\n }\r\n else {\r\n throw new SyntaxError('[sprintf] failed to parse named argument key')\r\n }\r\n }\r\n }\r\n else {\r\n throw new SyntaxError('[sprintf] failed to parse named argument key')\r\n }\r\n match[2] = field_list\r\n }\r\n else {\r\n arg_names |= 2\r\n }\r\n if (arg_names === 3) {\r\n throw new Error('[sprintf] mixing positional and named placeholders is not (yet) supported')\r\n }\r\n\r\n parse_tree.push(\r\n {\r\n placeholder: match[0],\r\n param_no: match[1],\r\n keys: match[2],\r\n sign: match[3],\r\n pad_char: match[4],\r\n align: match[5],\r\n width: match[6],\r\n precision: match[7],\r\n type: match[8]\r\n }\r\n )\r\n }\r\n else if ((match = re.mod.exec(_fmt)) !== null) { // treat %_SPACE as a string\r\n parse_tree.push(match[0]);\r\n }\r\n else if ((match = re.notplaceholder.exec(_fmt)) !== null) { // treat %_NOTPLACEHOLDER as a string\r\n parse_tree.push(match[0]);\r\n }\r\n else {\r\n throw new SyntaxError('[sprintf] unexpected placeholder')\r\n }\r\n _fmt = _fmt.substring(match[0].length)\r\n }\r\n return parse_tree\r\n }\r\n\r\n app.sprintf = sprintf;\r\n app.vsprintf = vsprintf;\r\n return app;\r\n }\r\n\r\n //\r\n // Constructor\r\n // Can be named anything you want\r\n //\r\n\r\n var Constructor = function (options) {\r\n\r\n //\r\n // Unique Variables\r\n //\r\n\r\n var publicAPIs = {};\r\n var settings;\r\n\r\n function getPayload() {\r\n var payload = {\r\n \"url\": document.location.pathname || '/',\r\n \"application\": settings.application\r\n };\r\n\r\n var payload_data = [];\r\n\r\n if (document.documentMode) payload_data.push({ \"key\": \"Document-Mode\", \"value\": document.documentMode });\r\n if (window.innerWidth || document.documentElement.clientWidth || document.getElementsByTagName('body')[0].clientWidth) payload_data.push({ \"key\": \"Browser-Width\", \"value\": window.innerWidth || document.documentElement.clientWidth || document.getElementsByTagName('body')[0].clientWidth });\r\n if (window.innerHeight || document.documentElement.clientHeight || document.getElementsByTagName('body')[0].clientHeight) payload_data.push({ \"key\": \"Browser-Height\", \"value\": window.innerHeight || document.documentElement.clientHeight || document.getElementsByTagName('body')[0].clientHeight });\r\n if ((screen.msOrientation || (screen.orientation || screen.mozOrientation || {}).type) !== undefined) payload_data.push({ \"key\": \"Screen-Orientation\", \"value\": ((screen.msOrientation || (screen.orientation || screen.mozOrientation || {}).type).split(\"-\"))[0] });\r\n if (screen.width) payload_data.push({ \"key\": \"Screen-Width\", \"value\": screen.width });\r\n if (screen.height) payload_data.push({ \"key\": \"Screen-Height\", \"value\": screen.height });\r\n if (screen.colorDepth) payload_data.push({ \"key\": \"Color-Depth\", \"value\": screen.colorDepth });\r\n payload_data.push({ \"key\": \"X-ELMAHIO-SEARCH-isClientside\", \"value\": \"true\" });\r\n\r\n payload.data = payload_data;\r\n\r\n var payload_serverVariables = [];\r\n if (navigator.language) payload_serverVariables.push({ \"key\": \"User-Language\", \"value\": navigator.language });\r\n if (navigator.userAgent) payload_serverVariables.push({ \"key\": \"User-Agent\", \"value\": navigator.userAgent });\r\n if (document.referrer) payload_serverVariables.push({ \"key\": \"Referer\", \"value\": document.referrer });\r\n if (document.location.protocol === \"https:\") payload_serverVariables.push({ \"key\": \"HTTPS\", \"value\": 'on' });\r\n if (document.location.hostname) payload_serverVariables.push({ \"key\": \"Host\", \"value\": document.location.hostname });\r\n\r\n payload.serverVariables = payload_serverVariables;\r\n\r\n return payload;\r\n }\r\n\r\n function confirmResponse(status, response) {\r\n if (settings.debug) {\r\n if (status === 'error') {\r\n console.log('%c \\u2BC8 Error log: ' + '%c \\u2715 Not created ', debugSettings.lightCSS, debugSettings.errorCSS);\r\n } else if (status === 'success') {\r\n console.log('%c \\u2BC8 Error log: ' + '%c \\u2714 ' + response + ' at ' + new Date().toLocaleString() + ' ', debugSettings.lightCSS, debugSettings.successCSS);\r\n } else {\r\n console.log('%c \\u2BC8 Error log: ' + '%c \\u2715 Not created. Title should not be undefined, null or empty ! ', debugSettings.lightCSS, debugSettings.errorCSS);\r\n }\r\n }\r\n }\r\n\r\n function stackGPS(error, xhr, jsonData) {\r\n \tvar errorStack = error.toString().split(\"\\n\")[0];\r\n \tvar gps = new StackTraceGPS();\r\n var promise = new Promise(function(resolve) {\r\n\t var stackframes = ErrorStackParser.parse(error);\r\n\t resolve(Promise.all(stackframes.map(function(sf) {\r\n\t return new Promise(function(resolve) {\r\n\t function resolveOriginal() {\r\n\t resolve(sf);\r\n\t }\r\n\t gps.pinpoint(sf).then(resolve, resolveOriginal)['catch'](resolveOriginal);\r\n\t });\r\n\t })));\r\n \t}\r\n );\r\n\r\n promise.then(function(newFrames){\r\n \tnewFrames.forEach(function(stackFrame, i){\r\n\t\t\t\t\tif(stackFrame.functionName) {\r\n \t\t\tvar fn = stackFrame.functionName + ' ';\r\n \t\t} else {\r\n \t\t\tvar fn = '';\r\n \t\t}\r\n \t\tvar stackString = ' at ' + fn + '(' + stackFrame.fileName + ':' + stackFrame.lineNumber + ':' + stackFrame.columnNumber + ')';\r\n \t\tnewFrames[i] = stackString;\r\n \t});\r\n \tnewFrames.unshift(errorStack);\r\n \tjsonData.detail = newFrames.join(\"\\n\");\r\n \txhr.send(JSON.stringify(jsonData));\r\n });\r\n }\r\n\r\n function stackString(error) {\r\n \tvar typeOF = typeof error.error;\r\n \tvar typeOFCapitalized = typeOF.charAt(0).toUpperCase() + typeOF.slice(1);\r\n\r\n \treturn typeOFCapitalized + ': ' + error.error + '\\n' + ' at ' + '(' + error.source + ':' + error.lineno + ':' + error.colno + ')';\r\n }\r\n\r\n function manipulateStack (errorStack, severity, message) {\r\n var stack = [];\r\n for (var i = 0; i < errorStack.length; i++) {\r\n if(errorStack[i] === \"Error\") {\r\n stack.push(severity + \": \" + message);\r\n }\r\n if(!errorStack[i].match(/elmahio.js|elmahio.min.js/g) && errorStack[i] !== \"Error\") {\r\n stack.push(errorStack[i]);\r\n }\r\n }\r\n return stack.join('\\n');\r\n }\r\n\r\n // Private methods\r\n\r\n var sendPayload = function (apiKey, logId, callback, errorLog) {\r\n\r\n var api_key = apiKey,\r\n log_id = logId,\r\n error = errorLog,\r\n send = 1,\r\n queryParams = getSearchParameters(),\r\n stack = error.error && objectLength(error.error.stack) !== 0 && typeof error.error === \"object\" ? ErrorStackParser.parse(error.error) : '';\r\n\r\n // Ignoring error from an external script\r\n if (error && error.colno === 0 && error.lineno === 0 && (!stack || stack === '') && error.message && (error.message === \"Script error.\" || error.message === \"Script error\")) {\r\n\t\t\t if (settings.debug) {\r\n\t\t\t console.log('%c \\u2BC8 Error log: ' + '%c \\uD83D\\uDEC8 Ignoring error from external script ', debugSettings.lightCSS, debugSettings.warningCSS);\r\n\t\t\t }\r\n\t\t\t return;\r\n\t\t\t}\r\n\r\n if ((api_key !== null && log_id !== null) || (paramsLength === 2)) {\r\n\r\n // Priority for parameters\r\n if (params.hasOwnProperty('apiKey') && params.hasOwnProperty('logId')) {\r\n api_key = params['apiKey'];\r\n log_id = params['logId'];\r\n }\r\n\r\n // get new XHR object\r\n var xhr = new XMLHttpRequest();\r\n xhr.open(\"POST\", \"https://api.elmah.io/v3/messages/\" + log_id + \"?api_key=\" + api_key, true);\r\n\r\n xhr.setRequestHeader('Content-type', 'application/json');\r\n\r\n xhr.onload = function (e) {\r\n if (xhr.readyState === 4) {\r\n if (xhr.status === 201) {\r\n callback('success', xhr.statusText);\r\n }\r\n }\r\n };\r\n\r\n xhr.onerror = function (e) {\r\n callback('error', xhr.statusText);\r\n\r\n // on error event\r\n publicAPIs.emit('error', xhr.status, xhr.statusText);\r\n }\r\n\r\n var jsonData = {\r\n \"detail\": error.error ? error.error.stack : null,\r\n \"title\": error.message || 'Unspecified error',\r\n \"source\": stack && stack.length > 0 ? stack[0].fileName : null,\r\n \"severity\": \"Error\",\r\n \"type\": error.error ? error.error.name : null,\r\n \"queryString\": JSON.parse(JSON.stringify(queryParams))\r\n };\r\n\r\n // Check if error sent is a string and not an object\r\n // Then create the articifial stacktrace and pass source & type of the error\r\n if(error.error && (objectLength(error.error.stack) === 0) && typeof jsonData.detail === \"undefined\") {\r\n \tvar typeOF = typeof errorLog.error;\r\n \t\t\tvar typeOFCapitalized = typeOF.charAt(0).toUpperCase() + typeOF.slice(1);\r\n\r\n \tjsonData.detail = stackString(errorLog);\r\n \tjsonData.source = errorLog.source;\r\n jsonData.title = \"Uncaught \" + typeOFCapitalized + \": \" + errorLog.error;\r\n }\r\n\r\n // Add payload to jsonData\r\n jsonData = merge_objects(jsonData, getPayload());\r\n\r\n // filter callback\r\n if (settings.filter !== null) {\r\n if (settings.filter(jsonData)) {\r\n send = 0;\r\n }\r\n }\r\n\r\n if (send === 1) {\r\n // on message event\r\n publicAPIs.emit('message', jsonData);\r\n\r\n if (error.error && typeof error.error === \"object\" && objectLength(error.error.stack) !== 0 && typeof Promise !== \"undefined\" && Promise.toString().indexOf(\"[native code]\") !== -1) {\r\n \t// send message trying to pinpoint stackframes\r\n \tstackGPS(error.error, xhr, jsonData);\r\n\t } else {\r\n\t \t// send message\r\n \txhr.send(JSON.stringify(jsonData));\r\n\t }\r\n }\r\n\r\n } else {\r\n return console.log('Login api error');\r\n }\r\n };\r\n\r\n var sendManualPayload = function (apiKey, logId, callback, logType, messageLog, errorLog) {\r\n var api_key = apiKey,\r\n log_id = logId,\r\n type = logType,\r\n error = errorLog,\r\n message = messageLog,\r\n send = 1,\r\n queryParams = getSearchParameters();\r\n\r\n if ((api_key !== null && log_id !== null) || (paramsLength === 2)) {\r\n\r\n // Priority for parameters\r\n if (params.hasOwnProperty('apiKey') && params.hasOwnProperty('logId')) {\r\n api_key = params['apiKey'];\r\n log_id = params['logId'];\r\n }\r\n\r\n // get new XHR object\r\n var xhr = new XMLHttpRequest();\r\n xhr.open(\"POST\", \"https://api.elmah.io/v3/messages/\" + log_id + \"?api_key=\" + api_key, true);\r\n xhr.setRequestHeader('Content-type', 'application/json');\r\n\r\n xhr.onload = function (e) {\r\n if (xhr.readyState === 4) {\r\n if (xhr.status === 201) {\r\n callback('success', xhr.statusText);\r\n }\r\n }\r\n };\r\n\r\n xhr.onerror = function (e) {\r\n callback('error', xhr.statusText);\r\n\r\n // on error event\r\n publicAPIs.emit('error', xhr.status, xhr.statusText);\r\n }\r\n\r\n if (type !== \"Log\") {\r\n\r\n var stack = error ? ErrorStackParser.parse(error) : null;\r\n\r\n var jsonData = {\r\n \"title\": message,\r\n \"source\": stack && stack.length > 0 ? stack[0].fileName : null,\r\n \"detail\": error ? error.stack : null,\r\n \"severity\": type,\r\n \"type\": error ? error.name : null,\r\n \"queryString\": JSON.parse(JSON.stringify(queryParams))\r\n };\r\n\r\n // Add payload to jsonData\r\n jsonData = merge_objects(jsonData, getPayload());\r\n\r\n } else {\r\n\r\n jsonData = error;\r\n\r\n }\r\n\r\n // filter callback\r\n if (settings.filter !== null) {\r\n if (settings.filter(jsonData)) {\r\n send = 0;\r\n }\r\n }\r\n\r\n if (send === 1) {\r\n if (jsonData.title) {\r\n\r\n // on message event\r\n publicAPIs.emit('message', jsonData);\r\n\r\n if (error && type !== \"Log\" && typeof Promise !== \"undefined\" && Promise.toString().indexOf(\"[native code]\") !== -1) {\r\n // send message trying to pinpoint stackframes\r\n stackGPS(error, xhr, jsonData);\r\n } else {\r\n // send message\r\n if(jsonData.errorObject) {\r\n error = jsonData.errorObject;\r\n delete jsonData.errorObject;\r\n stackGPS(error, xhr, jsonData);\r\n } else {\r\n xhr.send(JSON.stringify(jsonData));\r\n }\r\n }\r\n\r\n } else {\r\n callback('missing-title', xhr.statusText);\r\n }\r\n }\r\n\r\n } else {\r\n return console.log('Login api error');\r\n }\r\n };\r\n\r\n var sendPayloadFromConsole = function (apiKey, logId, callback, logType, errorLog) {\r\n var api_key = apiKey,\r\n log_id = logId,\r\n message = errorLog.message,\r\n messageTemplate = errorLog.message,\r\n type = logType,\r\n args = Object.values(errorLog.arguments),\r\n send = 1,\r\n queryParams = getSearchParameters();\r\n\r\n // If message has placeholders (%s or %d), check for arguments and replace them\r\n \tif(String(message).match(/(%d|%s)+/ig) && args.length > 1) {\r\n \t\tvar sprintfJS = new sprintfjs();\r\n // Remove the first argument from array, which represents the message\r\n \t\targs.shift();\r\n message = sprintfJS.vsprintf(message, args);\r\n }\r\n\r\n if(typeof message !== \"string\"){\r\n message = message.toString();\r\n }\r\n\r\n if(typeof messageTemplate !== \"string\") {\r\n messageTemplate = messageTemplate.toString();\r\n }\r\n\r\n if ((api_key !== null && log_id !== null) || (paramsLength === 2)) {\r\n\r\n // Priority for parameters\r\n if (params.hasOwnProperty('apiKey') && params.hasOwnProperty('logId')) {\r\n api_key = params['apiKey'];\r\n log_id = params['logId'];\r\n }\r\n\r\n // get new XHR object\r\n var xhr = new XMLHttpRequest();\r\n xhr.open(\"POST\", \"https://api.elmah.io/v3/messages/\" + log_id + \"?api_key=\" + api_key, true);\r\n xhr.setRequestHeader('Content-type', 'application/json');\r\n\r\n xhr.onload = function (e) {\r\n if (xhr.readyState === 4) {\r\n if (xhr.status === 201) {\r\n callback('success', xhr.statusText);\r\n }\r\n }\r\n };\r\n\r\n xhr.onerror = function (e) {\r\n callback('error', xhr.statusText);\r\n // on error event\r\n publicAPIs.emit('error', xhr.status, xhr.statusText);\r\n }\r\n\r\n var jsonData = {\r\n \"title\": message,\r\n \"titleTemplate\": messageTemplate,\r\n \"detail\": manipulateStack(new Error().stack.split('\\n'), type, message),\r\n \"severity\": type,\r\n \"type\": null,\r\n \"queryString\": JSON.parse(JSON.stringify(queryParams))\r\n };\r\n\r\n // Add payload to jsonData\r\n jsonData = merge_objects(jsonData, getPayload());\r\n\r\n // filter callback\r\n if (settings.filter !== null) {\r\n if (settings.filter(jsonData)) {\r\n send = 0;\r\n }\r\n }\r\n\r\n if (send === 1) {\r\n if (jsonData.title) {\r\n // on message event\r\n publicAPIs.emit('message', jsonData);\r\n // send message\r\n xhr.send(JSON.stringify(jsonData));\r\n } else {\r\n callback('missing-title', xhr.statusText);\r\n }\r\n }\r\n\r\n } else {\r\n return console.log('Login api error');\r\n }\r\n };\r\n\r\n var sendPrefilledLogMessage = function(errorLog) {\r\n // without error object\r\n if(!errorLog) return getPayload();\r\n\r\n // with error object\r\n var error = errorLog;\r\n var stack = error ? ErrorStackParser.parse(error) : null;\r\n var jsonData = {\r\n \"title\": error.message,\r\n \"source\": stack && stack.length > 0 ? stack[0].fileName : null,\r\n \"detail\": error ? error.stack : null,\r\n \"severity\": \"Error\",\r\n \"type\": error ? error.name : null,\r\n \"errorObject\": error\r\n };\r\n\r\n jsonData = merge_objects(jsonData, getPayload());\r\n return jsonData;\r\n }\r\n\r\n // Some public methods\r\n\r\n publicAPIs.error = function (msg) {\r\n sendManualPayload(settings.apiKey, settings.logId, confirmResponse, 'Error', msg);\r\n };\r\n publicAPIs.error = function (msg, error) {\r\n sendManualPayload(settings.apiKey, settings.logId, confirmResponse, 'Error', msg, error);\r\n };\r\n\r\n publicAPIs.verbose = function (msg) {\r\n sendManualPayload(settings.apiKey, settings.logId, confirmResponse, 'Verbose', msg);\r\n };\r\n publicAPIs.verbose = function (msg, error) {\r\n sendManualPayload(settings.apiKey, settings.logId, confirmResponse, 'Verbose', msg, error);\r\n };\r\n\r\n publicAPIs.debug = function (msg) {\r\n sendManualPayload(settings.apiKey, settings.logId, confirmResponse, 'Debug', msg);\r\n };\r\n publicAPIs.debug = function (msg, error) {\r\n sendManualPayload(settings.apiKey, settings.logId, confirmResponse, 'Debug', msg, error);\r\n };\r\n\r\n publicAPIs.information = function (msg) {\r\n sendManualPayload(settings.apiKey, settings.logId, confirmResponse, 'Information', msg);\r\n };\r\n publicAPIs.information = function (msg, error) {\r\n sendManualPayload(settings.apiKey, settings.logId, confirmResponse, 'Information', msg, error);\r\n };\r\n\r\n publicAPIs.warning = function (msg) {\r\n sendManualPayload(settings.apiKey, settings.logId, confirmResponse, 'Warning', msg);\r\n };\r\n publicAPIs.warning = function (msg, error) {\r\n sendManualPayload(settings.apiKey, settings.logId, confirmResponse, 'Warning', msg, error);\r\n };\r\n\r\n publicAPIs.fatal = function (msg) {\r\n sendManualPayload(settings.apiKey, settings.logId, confirmResponse, 'Fatal', msg);\r\n };\r\n publicAPIs.fatal = function (msg, error) {\r\n sendManualPayload(settings.apiKey, settings.logId, confirmResponse, 'Fatal', msg, error);\r\n };\r\n\r\n publicAPIs.log = function (obj) {\r\n sendManualPayload(settings.apiKey, settings.logId, confirmResponse, 'Log', null, obj);\r\n };\r\n\r\n publicAPIs.message = function(error) {\r\n return sendPrefilledLogMessage(error);\r\n };\r\n\r\n publicAPIs.on = function (name, callback, ctx) {\r\n var e = this.e || (this.e = {});\r\n\r\n (e[name] || (e[name] = [])).push({\r\n fn: callback,\r\n ctx: ctx\r\n });\r\n\r\n return this;\r\n };\r\n\r\n publicAPIs.emit = function (name) {\r\n var data = [].slice.call(arguments, 1);\r\n var evtArr = ((this.e || (this.e = {}))[name] || []).slice();\r\n var i = 0;\r\n var len = evtArr.length;\r\n\r\n for (i; i < len; i++) {\r\n evtArr[i].fn.apply(evtArr[i].ctx, data);\r\n }\r\n\r\n return this;\r\n };\r\n\r\n publicAPIs.init = function (options) {\r\n\r\n // -- Merge options into defaults\r\n settings = extend(defaults, options || {});\r\n\r\n // -- Log on window error\r\n window.onerror = function (message, source, lineno, colno, error) {\r\n\r\n var errorLog = {\r\n 'message': message,\r\n 'source': source,\r\n 'lineno': lineno,\r\n 'colno': colno,\r\n 'error': error\r\n }\r\n\r\n sendPayload(settings.apiKey, settings.logId, confirmResponse, errorLog);\r\n\r\n return false;\r\n }\r\n\r\n // -- Overriding console methods\r\n // -- Then log messages into the app.elmah.io\r\n if(options && options.captureConsoleMinimumLevel !== \"none\") {\r\n\r\n // If captureConsoleMinimumLevel: info or debug is set (error, warn)\r\n if(options.captureConsoleMinimumLevel === \"info\" || options.captureConsoleMinimumLevel === \"warn\" || options.captureConsoleMinimumLevel === \"error\" || options.captureConsoleMinimumLevel === \"debug\") {\r\n // Log console errors\r\n var _error = console.error;\r\n console.error = function(errMessage){\r\n var errorLog = {\r\n \t\t'message': errMessage,\r\n \t\t'arguments': arguments\r\n \t}\r\n sendPayloadFromConsole(settings.apiKey, settings.logId, confirmResponse, 'Error', errorLog);\r\n _error.apply(console, arguments);\r\n };\r\n if(options.captureConsoleMinimumLevel !== \"error\") {\r\n // Log console warnings\r\n var _warning = console.warn;\r\n console.warn = function(warnMessage){\r\n var errorLog = {\r\n 'message': warnMessage,\r\n 'arguments': arguments\r\n }\r\n sendPayloadFromConsole(settings.apiKey, settings.logId, confirmResponse, 'Warning', errorLog);\r\n _warning.apply(console, arguments);\r\n };\r\n }\r\n }\r\n if(options.captureConsoleMinimumLevel === \"info\" || options.captureConsoleMinimumLevel === \"debug\") {\r\n // Log console info\r\n var _info = console.info;\r\n console.info = function(infoMessage){\r\n var errorLog = {\r\n \t\t'message': infoMessage,\r\n \t\t'arguments': arguments\r\n \t}\r\n sendPayloadFromConsole(settings.apiKey, settings.logId, confirmResponse, 'Information', errorLog);\r\n _info.apply(console, arguments);\r\n };\r\n }\r\n if(options.captureConsoleMinimumLevel === \"debug\") {\r\n // Log console debug\r\n var _debug = console.debug;\r\n console.debug = function(debugMessage){\r\n var errorLog = {\r\n \t\t'message': debugMessage,\r\n \t\t'arguments': arguments\r\n \t}\r\n sendPayloadFromConsole(settings.apiKey, settings.logId, confirmResponse, 'Debug', errorLog);\r\n _debug.apply(console, arguments);\r\n };\r\n }\r\n }\r\n };\r\n\r\n // Initialize the plugin\r\n publicAPIs.init(options);\r\n\r\n if (settings.debug) {\r\n console.log('%c' + debugSettings.label, debugSettings.labelCSS);\r\n }\r\n\r\n // Return the public APIs\r\n return publicAPIs;\r\n\r\n };\r\n\r\n\r\n //\r\n // Return the constructor\r\n //\r\n\r\n if (paramsLength && params.hasOwnProperty('apiKey') && params.hasOwnProperty('logId')) {\r\n // Immediately-Invoked Function Expression (IIFE)\r\n return new Constructor;\r\n } else {\r\n // UMD Constructor\r\n return Constructor;\r\n }\r\n\r\n});"],"file":"elmahio.js"} \ No newline at end of file +{"version":3,"names":[],"mappings":"","sources":["elmahio.js"],"sourcesContent":["/*!\r\n * elmah.io Javascript Logger - version 3.4.1\r\n * (c) 2018 elmah.io, Apache 2.0 License, https://elmah.io\r\n */\r\n\r\n(function (root, factory) {\r\n if (typeof define === 'function' && define.amd) {\r\n define([], function () {\r\n return factory(root);\r\n });\r\n } else if (typeof exports === 'object') {\r\n module.exports = factory(root);\r\n } else {\r\n root.Elmahio = factory(root);\r\n }\r\n})(typeof global !== 'undefined' ? global : typeof window !== 'undefined' ? window : this, function (window) {\r\n\r\n 'use strict';\r\n\r\n //\r\n // ==== STACKFRAME ====\r\n //\r\n\r\n var StackFrame = (function () {\r\n \"use strict\";\r\n function _isNumber(n) {\r\n return !isNaN(parseFloat(n)) && isFinite(n);\r\n }\r\n function _capitalize(str) {\r\n return str.charAt(0).toUpperCase() + str.substring(1);\r\n }\r\n function _getter(p) {\r\n return function () {\r\n return this[p];\r\n };\r\n }\r\n var booleanProps = [\"isConstructor\", \"isEval\", \"isNative\", \"isToplevel\"];\r\n var numericProps = [\"columnNumber\", \"lineNumber\"];\r\n var stringProps = [\"fileName\", \"functionName\", \"source\"];\r\n var arrayProps = [\"args\"];\r\n var props = booleanProps.concat(numericProps, stringProps, arrayProps);\r\n function StackFrame(obj) {\r\n if (obj instanceof Object) {\r\n for (var i = 0; i < props.length; i++) {\r\n if (obj.hasOwnProperty(props[i]) && obj[props[i]] !== undefined) {\r\n this[\"set\" + _capitalize(props[i])](obj[props[i]]);\r\n }\r\n }\r\n }\r\n }\r\n StackFrame.prototype = {\r\n getArgs: function () {\r\n return this.args;\r\n },\r\n setArgs: function (v) {\r\n if (Object.prototype.toString.call(v) !== \"[object Array]\") {\r\n throw new TypeError(\"Args must be an Array\");\r\n }\r\n this.args = v;\r\n },\r\n getEvalOrigin: function () {\r\n return this.evalOrigin;\r\n },\r\n setEvalOrigin: function (v) {\r\n if (v instanceof StackFrame) {\r\n this.evalOrigin = v;\r\n } else if (v instanceof Object) {\r\n this.evalOrigin = new StackFrame(v);\r\n } else {\r\n throw new TypeError(\"Eval Origin must be an Object or StackFrame\");\r\n }\r\n },\r\n toString: function () {\r\n var functionName = this.getFunctionName() || \"{anonymous}\";\r\n var args = \"(\" + (this.getArgs() || []).join(\",\") + \")\";\r\n var fileName = this.getFileName() ? \"@\" + this.getFileName() : \"\";\r\n var lineNumber = _isNumber(this.getLineNumber()) ? \":\" + this.getLineNumber() : \"\";\r\n var columnNumber = _isNumber(this.getColumnNumber()) ? \":\" + this.getColumnNumber() : \"\";\r\n return functionName + args + fileName + lineNumber + columnNumber;\r\n }\r\n };\r\n StackFrame.fromString = function StackFrame$$fromString(str) {\r\n var argsStartIndex = str.indexOf(\"(\");\r\n var argsEndIndex = str.lastIndexOf(\")\");\r\n var functionName = str.substring(0, argsStartIndex);\r\n var args = str.substring(argsStartIndex + 1, argsEndIndex).split(\",\");\r\n var locationString = str.substring(argsEndIndex + 1);\r\n if (locationString.indexOf(\"@\") === 0) {\r\n var parts = /@(.+?)(?::(\\d+))?(?::(\\d+))?$/.exec(locationString, \"\");\r\n var fileName = parts[1];\r\n var lineNumber = parts[2];\r\n var columnNumber = parts[3];\r\n }\r\n return new StackFrame({\r\n functionName: functionName,\r\n args: args || undefined,\r\n fileName: fileName,\r\n lineNumber: lineNumber || undefined,\r\n columnNumber: columnNumber || undefined\r\n });\r\n };\r\n for (var i = 0; i < booleanProps.length; i++) {\r\n StackFrame.prototype[\"get\" + _capitalize(booleanProps[i])] = _getter(booleanProps[i]);\r\n StackFrame.prototype[\"set\" + _capitalize(booleanProps[i])] = function (p) {\r\n return function (v) {\r\n this[p] = Boolean(v);\r\n };\r\n }(booleanProps[i]);\r\n }\r\n for (var j = 0; j < numericProps.length; j++) {\r\n StackFrame.prototype[\"get\" + _capitalize(numericProps[j])] = _getter(numericProps[j]);\r\n StackFrame.prototype[\"set\" + _capitalize(numericProps[j])] = function (p) {\r\n return function (v) {\r\n if (!_isNumber(v)) {\r\n throw new TypeError(p + \" must be a Number\");\r\n }\r\n this[p] = Number(v);\r\n };\r\n }(numericProps[j]);\r\n }\r\n for (var k = 0; k < stringProps.length; k++) {\r\n StackFrame.prototype[\"get\" + _capitalize(stringProps[k])] = _getter(stringProps[k]);\r\n StackFrame.prototype[\"set\" + _capitalize(stringProps[k])] = function (p) {\r\n return function (v) {\r\n this[p] = String(v);\r\n };\r\n }(stringProps[k]);\r\n }\r\n return StackFrame;\r\n })();\r\n\r\n //\r\n // ==== ERROR STACK PARSER ====\r\n //\r\n\r\n var ErrorStackParser = (function () {\r\n \"use strict\";\r\n var FIREFOX_SAFARI_STACK_REGEXP = /(^|@)\\S+\\:\\d+/;\r\n var CHROME_IE_STACK_REGEXP = /^\\s*at .*(\\S+\\:\\d+|\\(native\\))/m;\r\n var SAFARI_NATIVE_CODE_REGEXP = /^(eval@)?(\\[native code\\])?$/;\r\n return {\r\n /**\r\n * Given an Error object, extract the most information from it.\r\n *\r\n * @param {Error} error object\r\n * @return {Array} of StackFrames\r\n */\r\n parse: function ErrorStackParser$$parse(error) {\r\n if (typeof error.stacktrace !== \"undefined\" || typeof error[\"opera#sourceloc\"] !== \"undefined\") {\r\n return this.parseOpera(error);\r\n } else if (error.stack && error.stack.match(CHROME_IE_STACK_REGEXP)) {\r\n return this.parseV8OrIE(error);\r\n } else if (error.stack) {\r\n return this.parseFFOrSafari(error);\r\n } else {\r\n throw new Error(\"Cannot parse given Error object\");\r\n }\r\n },\r\n // Separate line and column numbers from a string of the form: (URI:Line:Column)\r\n extractLocation: function ErrorStackParser$$extractLocation(urlLike) {\r\n // Fail-fast but return locations like \"(native)\"\r\n if (urlLike.indexOf(\":\") === -1) {\r\n return [urlLike];\r\n }\r\n var regExp = /(.+?)(?:\\:(\\d+))?(?:\\:(\\d+))?$/;\r\n var parts = regExp.exec(urlLike.replace(/[\\(\\)]/g, \"\"));\r\n return [parts[1], parts[2] || undefined, parts[3] || undefined];\r\n },\r\n parseV8OrIE: function ErrorStackParser$$parseV8OrIE(error) {\r\n var filtered = error.stack.split(\"\\n\").filter(function (line) {\r\n return !!line.match(CHROME_IE_STACK_REGEXP);\r\n }, this);\r\n return filtered.map(function (line) {\r\n if (line.indexOf(\"(eval \") > -1) {\r\n // Throw away eval information until we implement stacktrace.js/stackframe#8\r\n line = line.replace(/eval code/g, \"eval\").replace(/(\\(eval at [^\\()]*)|(\\)\\,.*$)/g, \"\");\r\n }\r\n var tokens = line.replace(/^\\s+/, \"\").replace(/\\(eval code/g, \"(\").split(/\\s+/).slice(1);\r\n var locationParts = this.extractLocation(tokens.pop());\r\n var functionName = tokens.join(\" \") || undefined;\r\n var fileName = [\"eval\", \"\"].indexOf(locationParts[0]) > -1 ? undefined : locationParts[0];\r\n return new StackFrame({\r\n functionName: functionName,\r\n fileName: fileName,\r\n lineNumber: locationParts[1],\r\n columnNumber: locationParts[2],\r\n source: line\r\n });\r\n }, this);\r\n },\r\n parseFFOrSafari: function ErrorStackParser$$parseFFOrSafari(error) {\r\n var filtered = error.stack.split(\"\\n\").filter(function (line) {\r\n return !line.match(SAFARI_NATIVE_CODE_REGEXP);\r\n }, this);\r\n return filtered.map(function (line) {\r\n // Throw away eval information until we implement stacktrace.js/stackframe#8\r\n if (line.indexOf(\" > eval\") > -1) {\r\n line = line.replace(/ line (\\d+)(?: > eval line \\d+)* > eval\\:\\d+\\:\\d+/g, \":$1\");\r\n }\r\n if (line.indexOf(\"@\") === -1 && line.indexOf(\":\") === -1) {\r\n // Safari eval frames only have function names and nothing else\r\n return new StackFrame({\r\n functionName: line\r\n });\r\n } else {\r\n var functionNameRegex = /((.*\".+\"[^@]*)?[^@]*)(?:@)/;\r\n var matches = line.match(functionNameRegex);\r\n var functionName = matches && matches[1] ? matches[1] : undefined;\r\n var locationParts = this.extractLocation(line.replace(functionNameRegex, \"\"));\r\n return new StackFrame({\r\n functionName: functionName,\r\n fileName: locationParts[0],\r\n lineNumber: locationParts[1],\r\n columnNumber: locationParts[2],\r\n source: line\r\n });\r\n }\r\n }, this);\r\n },\r\n parseOpera: function ErrorStackParser$$parseOpera(e) {\r\n if (!e.stacktrace || e.message.indexOf(\"\\n\") > -1 && e.message.split(\"\\n\").length > e.stacktrace.split(\"\\n\").length) {\r\n return this.parseOpera9(e);\r\n } else if (!e.stack) {\r\n return this.parseOpera10(e);\r\n } else {\r\n return this.parseOpera11(e);\r\n }\r\n },\r\n parseOpera9: function ErrorStackParser$$parseOpera9(e) {\r\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)/i;\r\n var lines = e.message.split(\"\\n\");\r\n var result = [];\r\n for (var i = 2, len = lines.length; i < len; i += 2) {\r\n var match = lineRE.exec(lines[i]);\r\n if (match) {\r\n result.push(new StackFrame({\r\n fileName: match[2],\r\n lineNumber: match[1],\r\n source: lines[i]\r\n }));\r\n }\r\n }\r\n return result;\r\n },\r\n parseOpera10: function ErrorStackParser$$parseOpera10(e) {\r\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)(?:: In function (\\S+))?$/i;\r\n var lines = e.stacktrace.split(\"\\n\");\r\n var result = [];\r\n for (var i = 0, len = lines.length; i < len; i += 2) {\r\n var match = lineRE.exec(lines[i]);\r\n if (match) {\r\n result.push(new StackFrame({\r\n functionName: match[3] || undefined,\r\n fileName: match[2],\r\n lineNumber: match[1],\r\n source: lines[i]\r\n }));\r\n }\r\n }\r\n return result;\r\n },\r\n // Opera 10.65+ Error.stack very similar to FF/Safari\r\n parseOpera11: function ErrorStackParser$$parseOpera11(error) {\r\n var filtered = error.stack.split(\"\\n\").filter(function (line) {\r\n return !!line.match(FIREFOX_SAFARI_STACK_REGEXP) && !line.match(/^Error created at/);\r\n }, this);\r\n return filtered.map(function (line) {\r\n var tokens = line.split(\"@\");\r\n var locationParts = this.extractLocation(tokens.pop());\r\n var functionCall = tokens.shift() || \"\";\r\n var functionName = functionCall.replace(//, \"$2\").replace(/\\([^\\)]*\\)/g, \"\") || undefined;\r\n var argsRaw;\r\n if (functionCall.match(/\\(([^\\)]*)\\)/)) {\r\n argsRaw = functionCall.replace(/^[^\\(]+\\(([^\\)]*)\\)$/, \"$1\");\r\n }\r\n var args = argsRaw === undefined || argsRaw === \"[arguments not available]\" ? undefined : argsRaw.split(\",\");\r\n return new StackFrame({\r\n functionName: functionName,\r\n args: args,\r\n fileName: locationParts[0],\r\n lineNumber: locationParts[1],\r\n columnNumber: locationParts[2],\r\n source: line\r\n });\r\n }, this);\r\n }\r\n };\r\n })();\r\n\r\n //\r\n // ==== STACKTRACE-GPS ====\r\n //\r\n\r\n var SourceMap = function(e){var n={};function r(t){if(n[t])return n[t].exports;var o=n[t]={exports:{},id:t,loaded:!1};return e[t].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}return r.m=e,r.c=n,r.p=\"\",r(0)}([function(e,n,r){var t=r(1),o=r(2),i=r(3).ArraySet,a=r(4),s=r(6).quickSort;function u(e){var n=e;return\"string\"==typeof e&&(n=JSON.parse(e.replace(/^\\)\\]\\}'/,\"\"))),null!=n.sections?new c(n):new l(n)}function l(e){var n=e;\"string\"==typeof e&&(n=JSON.parse(e.replace(/^\\)\\]\\}'/,\"\")));var r=t.getArg(n,\"version\"),o=t.getArg(n,\"sources\"),a=t.getArg(n,\"names\",[]),s=t.getArg(n,\"sourceRoot\",null),u=t.getArg(n,\"sourcesContent\",null),l=t.getArg(n,\"mappings\"),g=t.getArg(n,\"file\",null);if(r!=this._version)throw new Error(\"Unsupported version: \"+r);o=o.map(String).map(t.normalize).map(function(e){return s&&t.isAbsolute(s)&&t.isAbsolute(e)?t.relative(s,e):e}),this._names=i.fromArray(a.map(String),!0),this._sources=i.fromArray(o,!0),this.sourceRoot=s,this.sourcesContent=u,this._mappings=l,this.file=g}function g(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}function c(e){var n=e;\"string\"==typeof e&&(n=JSON.parse(e.replace(/^\\)\\]\\}'/,\"\")));var r=t.getArg(n,\"version\"),o=t.getArg(n,\"sections\");if(r!=this._version)throw new Error(\"Unsupported version: \"+r);this._sources=new i,this._names=new i;var a={line:-1,column:0};this._sections=o.map(function(e){if(e.url)throw new Error(\"Support for url field in sections not implemented.\");var n=t.getArg(e,\"offset\"),r=t.getArg(n,\"line\"),o=t.getArg(n,\"column\");if(r=0){var s=this._originalMappings[a];if(void 0===e.column)for(var u=s.originalLine;s&&s.originalLine===u;)i.push({line:t.getArg(s,\"generatedLine\",null),column:t.getArg(s,\"generatedColumn\",null),lastColumn:t.getArg(s,\"lastGeneratedColumn\",null)}),s=this._originalMappings[++a];else for(var l=s.originalColumn;s&&s.originalLine===n&&s.originalColumn==l;)i.push({line:t.getArg(s,\"generatedLine\",null),column:t.getArg(s,\"generatedColumn\",null),lastColumn:t.getArg(s,\"lastGeneratedColumn\",null)}),s=this._originalMappings[++a]}return i},n.SourceMapConsumer=u,l.prototype=Object.create(u.prototype),l.prototype.consumer=u,l.fromSourceMap=function(e){var n=Object.create(l.prototype),r=n._names=i.fromArray(e._names.toArray(),!0),o=n._sources=i.fromArray(e._sources.toArray(),!0);n.sourceRoot=e._sourceRoot,n.sourcesContent=e._generateSourcesContent(n._sources.toArray(),n.sourceRoot),n.file=e._file;for(var a=e._mappings.toArray().slice(),u=n.__generatedMappings=[],c=n.__originalMappings=[],p=0,h=a.length;p1&&(r.source=d+i[1],d+=i[1],r.originalLine=h+i[2],h=r.originalLine,r.originalLine+=1,r.originalColumn=f+i[3],f=r.originalColumn,i.length>4&&(r.name=m+i[4],m+=i[4])),L.push(r),\"number\"==typeof r.originalLine&&y.push(r)}s(L,t.compareByGeneratedPositionsDeflated),this.__generatedMappings=L,s(y,t.compareByOriginalPositions),this.__originalMappings=y},l.prototype._findMapping=function(e,n,r,t,i,a){if(e[r]<=0)throw new TypeError(\"Line must be greater than or equal to 1, got \"+e[r]);if(e[t]<0)throw new TypeError(\"Column must be greater than or equal to 0, got \"+e[t]);return o.search(e,n,i,a)},l.prototype.computeColumnSpans=function(){for(var e=0;e=0){var o=this._generatedMappings[r];if(o.generatedLine===n.generatedLine){var i=t.getArg(o,\"source\",null);null!==i&&(i=this._sources.at(i),null!=this.sourceRoot&&(i=t.join(this.sourceRoot,i)));var a=t.getArg(o,\"name\",null);return null!==a&&(a=this._names.at(a)),{source:i,line:t.getArg(o,\"originalLine\",null),column:t.getArg(o,\"originalColumn\",null),name:a}}}return{source:null,line:null,column:null,name:null}},l.prototype.hasContentsOfAllSources=function(){return!!this.sourcesContent&&(this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return null==e}))},l.prototype.sourceContentFor=function(e,n){if(!this.sourcesContent)return null;if(null!=this.sourceRoot&&(e=t.relative(this.sourceRoot,e)),this._sources.has(e))return this.sourcesContent[this._sources.indexOf(e)];var r;if(null!=this.sourceRoot&&(r=t.urlParse(this.sourceRoot))){var o=e.replace(/^file:\\/\\//,\"\");if(\"file\"==r.scheme&&this._sources.has(o))return this.sourcesContent[this._sources.indexOf(o)];if((!r.path||\"/\"==r.path)&&this._sources.has(\"/\"+e))return this.sourcesContent[this._sources.indexOf(\"/\"+e)]}if(n)return null;throw new Error('\"'+e+'\" is not in the SourceMap.')},l.prototype.generatedPositionFor=function(e){var n=t.getArg(e,\"source\");if(null!=this.sourceRoot&&(n=t.relative(this.sourceRoot,n)),!this._sources.has(n))return{line:null,column:null,lastColumn:null};var r={source:n=this._sources.indexOf(n),originalLine:t.getArg(e,\"line\"),originalColumn:t.getArg(e,\"column\")},o=this._findMapping(r,this._originalMappings,\"originalLine\",\"originalColumn\",t.compareByOriginalPositions,t.getArg(e,\"bias\",u.GREATEST_LOWER_BOUND));if(o>=0){var i=this._originalMappings[o];if(i.source===r.source)return{line:t.getArg(i,\"generatedLine\",null),column:t.getArg(i,\"generatedColumn\",null),lastColumn:t.getArg(i,\"lastGeneratedColumn\",null)}}return{line:null,column:null,lastColumn:null}},n.BasicSourceMapConsumer=l,c.prototype=Object.create(u.prototype),c.prototype.constructor=u,c.prototype._version=3,Object.defineProperty(c.prototype,\"sources\",{get:function(){for(var e=[],n=0;n=0;g--)\".\"===(a=u[g])?u.splice(g,1):\"..\"===a?l++:l>0&&(\"\"===a?(u.splice(g+1,l),l=0):(u.splice(g,2),l--));return\"\"===(r=u.join(\"/\"))&&(r=s?\"/\":\".\"),t?(t.path=r,i(t)):r}n.urlParse=o,n.urlGenerate=i,n.normalize=a,n.join=function(e,n){\"\"===e&&(e=\".\"),\"\"===n&&(n=\".\");var r=o(n),s=o(e);if(s&&(e=s.path||\"/\"),r&&!r.scheme)return s&&(r.scheme=s.scheme),i(r);if(r||n.match(t))return n;if(s&&!s.host&&!s.path)return s.host=n,i(s);var u=\"/\"===n.charAt(0)?n:a(e.replace(/\\/+$/,\"\")+\"/\"+n);return s?(s.path=u,i(s)):u},n.isAbsolute=function(e){return\"/\"===e.charAt(0)||!!e.match(r)},n.relative=function(e,n){\"\"===e&&(e=\".\"),e=e.replace(/\\/$/,\"\");for(var r=0;0!==n.indexOf(e+\"/\");){var t=e.lastIndexOf(\"/\");if(t<0)return n;if((e=e.slice(0,t)).match(/^([^\\/]+:\\/)?\\/*$/))return n;++r}return Array(r+1).join(\"../\")+n.substr(e.length+1)};var s=!(\"__proto__\"in Object.create(null));function u(e){return e}function l(e){if(!e)return!1;var n=e.length;if(n<9)return!1;if(95!==e.charCodeAt(n-1)||95!==e.charCodeAt(n-2)||111!==e.charCodeAt(n-3)||116!==e.charCodeAt(n-4)||111!==e.charCodeAt(n-5)||114!==e.charCodeAt(n-6)||112!==e.charCodeAt(n-7)||95!==e.charCodeAt(n-8)||95!==e.charCodeAt(n-9))return!1;for(var r=n-10;r>=0;r--)if(36!==e.charCodeAt(r))return!1;return!0}function g(e,n){return e===n?0:e>n?1:-1}n.toSetString=s?u:function(e){return l(e)?\"$\"+e:e},n.fromSetString=s?u:function(e){return l(e)?e.slice(1):e},n.compareByOriginalPositions=function(e,n,r){var t=e.source-n.source;return 0!==t?t:0!=(t=e.originalLine-n.originalLine)?t:0!=(t=e.originalColumn-n.originalColumn)||r?t:0!=(t=e.generatedColumn-n.generatedColumn)?t:0!=(t=e.generatedLine-n.generatedLine)?t:e.name-n.name},n.compareByGeneratedPositionsDeflated=function(e,n,r){var t=e.generatedLine-n.generatedLine;return 0!==t?t:0!=(t=e.generatedColumn-n.generatedColumn)||r?t:0!=(t=e.source-n.source)?t:0!=(t=e.originalLine-n.originalLine)?t:0!=(t=e.originalColumn-n.originalColumn)?t:e.name-n.name},n.compareByGeneratedPositionsInflated=function(e,n){var r=e.generatedLine-n.generatedLine;return 0!==r?r:0!=(r=e.generatedColumn-n.generatedColumn)?r:0!==(r=g(e.source,n.source))?r:0!=(r=e.originalLine-n.originalLine)?r:0!=(r=e.originalColumn-n.originalColumn)?r:g(e.name,n.name)}},function(e,n){n.GREATEST_LOWER_BOUND=1,n.LEAST_UPPER_BOUND=2,n.search=function(e,r,t,o){if(0===r.length)return-1;var i=function e(r,t,o,i,a,s){var u=Math.floor((t-r)/2)+r,l=a(o,i[u],!0);return 0===l?u:l>0?t-u>1?e(u,t,o,i,a,s):s==n.LEAST_UPPER_BOUND?t1?e(r,u,o,i,a,s):s==n.LEAST_UPPER_BOUND?u:r<0?-1:r}(-1,r.length,e,r,t,o||n.GREATEST_LOWER_BOUND);if(i<0)return-1;for(;i-1>=0&&0===t(r[i],r[i-1],!0);)--i;return i}},function(e,n,r){var t=r(1),o=Object.prototype.hasOwnProperty;function i(){this._array=[],this._set=Object.create(null)}i.fromArray=function(e,n){for(var r=new i,t=0,o=e.length;t=0&&e>>=5)>0&&(n|=32),o+=t.encode(n)}while(i>0);return o},n.decode=function(e,n,r){var o,i,a,s,u=e.length,l=0,g=0;do{if(n>=u)throw new Error(\"Expected more digits in base 64 VLQ value.\");if(-1===(i=t.decode(e.charCodeAt(n++))))throw new Error(\"Invalid base64 digit: \"+e.charAt(n-1));o=!!(32&i),l+=(i&=31)<>1,1==(1&a)?-s:s),r.rest=n}},function(e,n){var r=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\".split(\"\");n.encode=function(e){if(0<=e&&e= 200 && req.status < 300 || url.substr(0, 7) === \"file://\" && req.responseText) {\r\n resolve(req.responseText);\r\n } else {\r\n reject(new Error(\"HTTP status: \" + req.status + \" retrieving \" + url));\r\n }\r\n }\r\n };\r\n req.send();\r\n });\r\n }\r\n /**\r\n * Convert a Base64-encoded string into its original representation.\r\n * Used for inline sourcemaps.\r\n *\r\n * @param {String} b64str Base-64 encoded string\r\n * @returns {String} original representation of the base64-encoded string.\r\n */\r\n function _atob(b64str) {\r\n if (typeof window !== \"undefined\" && window.atob) {\r\n return window.atob(b64str);\r\n } else {\r\n throw new Error(\"You must supply a polyfill for window.atob in this environment\");\r\n }\r\n }\r\n function _parseJson(string) {\r\n if (typeof JSON !== \"undefined\" && JSON.parse) {\r\n return JSON.parse(string);\r\n } else {\r\n throw new Error(\"You must supply a polyfill for JSON.parse in this environment\");\r\n }\r\n }\r\n function _findFunctionName(source, lineNumber) {\r\n var syntaxes = [ // {name} = function ({args}) TODO args capture\r\n /['\"]?([$_A-Za-z][$_A-Za-z0-9]*)['\"]?\\s*[:=]\\s*function\\b/, // function {name}({args}) m[1]=name m[2]=args\r\n /function\\s+([^('\"`]*?)\\s*\\(([^)]*)\\)/, // {name} = eval()\r\n /['\"]?([$_A-Za-z][$_A-Za-z0-9]*)['\"]?\\s*[:=]\\s*(?:eval|new Function)\\b/, // fn_name() {\r\n /\\b(?!(?:if|for|switch|while|with|catch)\\b)(?:(?:static)\\s+)?(\\S+)\\s*\\(.*?\\)\\s*\\{/, // {name} = () => {\r\n /['\"]?([$_A-Za-z][$_A-Za-z0-9]*)['\"]?\\s*[:=]\\s*\\(.*?\\)\\s*=>/];\r\n var lines = source.split(\"\\n\");\r\n // Walk backwards in the source lines until we find the line which matches one of the patterns above\r\n var code = \"\";\r\n var maxLines = Math.min(lineNumber, 20);\r\n for (var i = 0; i < maxLines; ++i) {\r\n // lineNo is 1-based, source[] is 0-based\r\n var line = lines[lineNumber - i - 1];\r\n var commentPos = line.indexOf(\"//\");\r\n if (commentPos >= 0) {\r\n line = line.substr(0, commentPos);\r\n }\r\n if (line) {\r\n code = line + code;\r\n var len = syntaxes.length;\r\n for (var index = 0; index < len; index++) {\r\n var m = syntaxes[index].exec(code);\r\n if (m && m[1]) {\r\n return m[1];\r\n }\r\n }\r\n }\r\n }\r\n return undefined;\r\n }\r\n function _ensureSupportedEnvironment() {\r\n if (typeof Object.defineProperty !== \"function\" || typeof Object.create !== \"function\") {\r\n throw new Error(\"Unable to consume source maps in older browsers\");\r\n }\r\n }\r\n function _ensureStackFrameIsLegit(stackframe) {\r\n if (typeof stackframe !== \"object\") {\r\n throw new TypeError(\"Given StackFrame is not an object\");\r\n } else if (typeof stackframe.fileName !== \"string\") {\r\n throw new TypeError(\"Given file name is not a String\");\r\n } else if (typeof stackframe.lineNumber !== \"number\" || stackframe.lineNumber % 1 !== 0 || stackframe.lineNumber < 1) {\r\n throw new TypeError(\"Given line number must be a positive integer\");\r\n } else if (typeof stackframe.columnNumber !== \"number\" || stackframe.columnNumber % 1 !== 0 || stackframe.columnNumber < 0) {\r\n throw new TypeError(\"Given column number must be a non-negative integer\");\r\n }\r\n return true;\r\n }\r\n function _findSourceMappingURL(source) {\r\n var sourceMappingUrlRegExp = /\\/\\/[#@] ?sourceMappingURL=([^\\s'\"]+)\\s*$/gm;\r\n var lastSourceMappingUrl;\r\n var matchSourceMappingUrl;\r\n while (matchSourceMappingUrl = sourceMappingUrlRegExp.exec(source)) {\r\n // jshint ignore:line\r\n lastSourceMappingUrl = matchSourceMappingUrl[1];\r\n }\r\n if (lastSourceMappingUrl) {\r\n return lastSourceMappingUrl;\r\n } else {\r\n throw new Error(\"sourceMappingURL not found\");\r\n }\r\n }\r\n function _extractLocationInfoFromSourceMapSource(stackframe, sourceMapConsumer, sourceCache) {\r\n return new Promise(function (resolve, reject) {\r\n var loc = sourceMapConsumer.originalPositionFor({\r\n line: stackframe.lineNumber,\r\n column: stackframe.columnNumber\r\n });\r\n if (loc.source) {\r\n // cache mapped sources\r\n var mappedSource = sourceMapConsumer.sourceContentFor(loc.source);\r\n if (mappedSource) {\r\n sourceCache[loc.source] = mappedSource;\r\n }\r\n resolve(// given stackframe and source location, update stackframe\r\n new StackFrame({\r\n functionName: loc.name || stackframe.functionName,\r\n args: stackframe.args,\r\n fileName: loc.source,\r\n lineNumber: loc.line,\r\n columnNumber: loc.column\r\n }));\r\n } else {\r\n reject(new Error(\"Could not get original source for given stackframe and source map\"));\r\n }\r\n });\r\n }\r\n /**\r\n * @constructor\r\n * @param {Object} opts\r\n * opts.sourceCache = {url: \"Source String\"} => preload source cache\r\n * opts.sourceMapConsumerCache = {/path/file.js.map: SourceMapConsumer}\r\n * opts.offline = True to prevent network requests.\r\n * Best effort without sources or source maps.\r\n * opts.ajax = Promise returning function to make X-Domain requests\r\n */\r\n return function StackTraceGPS(opts) {\r\n if (!(this instanceof StackTraceGPS)) {\r\n return new StackTraceGPS(opts);\r\n }\r\n opts = opts || {};\r\n this.sourceCache = opts.sourceCache || {};\r\n this.sourceMapConsumerCache = opts.sourceMapConsumerCache || {};\r\n this.ajax = opts.ajax || _xdr;\r\n this._atob = opts.atob || _atob;\r\n\r\n this._get = function _get(location) {\r\n return new Promise(function (resolve, reject) {\r\n var isDataUrl = location.substr(0, 5) === \"data:\";\r\n if (this.sourceCache[location]) {\r\n resolve(this.sourceCache[location]);\r\n } else if (opts.offline && !isDataUrl) {\r\n reject(new Error(\"Cannot make network requests in offline mode\"));\r\n } else {\r\n if (isDataUrl) {\r\n // data URLs can have parameters.\r\n // see http://tools.ietf.org/html/rfc2397\r\n var supportedEncodingRegexp = /^data:application\\/json;([\\w=:\"-]+;)*base64,/;\r\n var match = location.match(supportedEncodingRegexp);\r\n if (match) {\r\n var sourceMapStart = match[0].length;\r\n var encodedSource = location.substr(sourceMapStart);\r\n var source = this._atob(encodedSource);\r\n this.sourceCache[location] = source;\r\n resolve(source);\r\n } else {\r\n reject(new Error(\"The encoding of the inline sourcemap is not supported\"));\r\n }\r\n } else {\r\n var xhrPromise = this.ajax(location, {\r\n method: \"get\"\r\n });\r\n // Cache the Promise to prevent duplicate in-flight requests\r\n this.sourceCache[location] = xhrPromise;\r\n xhrPromise.then(resolve, reject);\r\n }\r\n }\r\n }.bind(this));\r\n };\r\n /**\r\n * Creating SourceMapConsumers is expensive, so this wraps the creation of a\r\n * SourceMapConsumer in a per-instance cache.\r\n *\r\n * @param {String} sourceMappingURL = URL to fetch source map from\r\n * @param {String} defaultSourceRoot = Default source root for source map if undefined\r\n * @returns {Promise} that resolves a SourceMapConsumer\r\n */\r\n this._getSourceMapConsumer = function _getSourceMapConsumer(sourceMappingURL, defaultSourceRoot) {\r\n return new Promise(function (resolve, reject) {\r\n if (this.sourceMapConsumerCache[sourceMappingURL]) {\r\n resolve(this.sourceMapConsumerCache[sourceMappingURL]);\r\n } else {\r\n var sourceMapConsumerPromise = new Promise(function (resolve, reject) {\r\n return this._get(sourceMappingURL).then(function (sourceMapSource) {\r\n if (typeof sourceMapSource === \"string\") {\r\n sourceMapSource = _parseJson(sourceMapSource.replace(/^\\)\\]\\}'/, \"\"));\r\n }\r\n if (typeof sourceMapSource.sourceRoot === \"undefined\") {\r\n sourceMapSource.sourceRoot = defaultSourceRoot;\r\n }\r\n resolve(new SourceMap.SourceMapConsumer(sourceMapSource));\r\n }, reject);\r\n }.bind(this));\r\n this.sourceMapConsumerCache[sourceMappingURL] = sourceMapConsumerPromise;\r\n resolve(sourceMapConsumerPromise);\r\n }\r\n }.bind(this));\r\n };\r\n /**\r\n * Given a StackFrame, enhance function name and use source maps for a\r\n * better StackFrame.\r\n *\r\n * @param {StackFrame} stackframe object\r\n * @returns {Promise} that resolves with with source-mapped StackFrame\r\n */\r\n this.pinpoint = function StackTraceGPS$$pinpoint(stackframe) {\r\n return new Promise(function (resolve, reject) {\r\n this.getMappedLocation(stackframe).then(function (mappedStackFrame) {\r\n function resolveMappedStackFrame() {\r\n resolve(mappedStackFrame);\r\n }\r\n this.findFunctionName(mappedStackFrame).then(resolve, resolveMappedStackFrame)[\"catch\"](resolveMappedStackFrame);\r\n }.bind(this), reject);\r\n }.bind(this));\r\n };\r\n /**\r\n * Given a StackFrame, guess function name from location information.\r\n *\r\n * @param {StackFrame} stackframe\r\n * @returns {Promise} that resolves with enhanced StackFrame.\r\n */\r\n this.findFunctionName = function StackTraceGPS$$findFunctionName(stackframe) {\r\n return new Promise(function (resolve, reject) {\r\n _ensureStackFrameIsLegit(stackframe);\r\n this._get(stackframe.fileName).then(function getSourceCallback(source) {\r\n var lineNumber = stackframe.lineNumber;\r\n var columnNumber = stackframe.columnNumber;\r\n var guessedFunctionName = _findFunctionName(source, lineNumber, columnNumber);\r\n // Only replace functionName if we found something\r\n if (guessedFunctionName) {\r\n resolve(new StackFrame({\r\n functionName: guessedFunctionName,\r\n args: stackframe.args,\r\n fileName: stackframe.fileName,\r\n lineNumber: lineNumber,\r\n columnNumber: columnNumber\r\n }));\r\n } else {\r\n resolve(stackframe);\r\n }\r\n }, reject)[\"catch\"](reject);\r\n }.bind(this));\r\n };\r\n /**\r\n * Given a StackFrame, seek source-mapped location and return new enhanced StackFrame.\r\n *\r\n * @param {StackFrame} stackframe\r\n * @returns {Promise} that resolves with enhanced StackFrame.\r\n */\r\n this.getMappedLocation = function StackTraceGPS$$getMappedLocation(stackframe) {\r\n return new Promise(function (resolve, reject) {\r\n _ensureSupportedEnvironment();\r\n _ensureStackFrameIsLegit(stackframe);\r\n var sourceCache = this.sourceCache;\r\n var fileName = stackframe.fileName;\r\n this._get(fileName).then(function (source) {\r\n var sourceMappingURL = _findSourceMappingURL(source);\r\n var isDataUrl = sourceMappingURL.substr(0, 5) === \"data:\";\r\n var defaultSourceRoot = fileName.substring(0, fileName.lastIndexOf(\"/\") + 1);\r\n if (sourceMappingURL[0] !== \"/\" && !isDataUrl && !/^https?:\\/\\/|^\\/\\//i.test(sourceMappingURL)) {\r\n sourceMappingURL = defaultSourceRoot + sourceMappingURL;\r\n }\r\n return this._getSourceMapConsumer(sourceMappingURL, defaultSourceRoot).then(function (sourceMapConsumer) {\r\n return _extractLocationInfoFromSourceMapSource(stackframe, sourceMapConsumer, sourceCache).then(resolve)[\"catch\"](function () {\r\n resolve(stackframe);\r\n });\r\n });\r\n }.bind(this), reject)[\"catch\"](reject);\r\n }.bind(this));\r\n };\r\n };\r\n })(SourceMap, StackFrame);\r\n\r\n //\r\n // Shared Variables\r\n //\r\n\r\n var scriptFile = document.getElementsByTagName('script');\r\n var scriptIndex = scriptFile.length - 1;\r\n var myScript = scriptFile[scriptIndex];\r\n var queryString = myScript.src.replace(/^[^\\?]+\\??/, '');\r\n var params = parseQuery(queryString);\r\n var paramsLength = objectLength(params);\r\n\r\n var debugSettings = {\r\n label: ' elmah.io debugger : On ',\r\n labelCSS: 'background: #06a89c; color: #ffffff; display: inline-block; font-size: 14px;',\r\n successCSS: 'background: #d4edda; color: #155724; display: inline-block; font-size: 13px;',\r\n errorCSS: 'background: #f8d7da; color: #721c24; display: inline-block; font-size: 13px;',\r\n warningCSS: 'background: #fff3cd; color: #856404; display: inline-block; font-size: 13px;',\r\n lightCSS: 'background: #e2e3e5; color: #383d41; display: inline-block; font-size: 13px;'\r\n };\r\n\r\n var defaults = {\r\n apiKey: null,\r\n logId: null,\r\n debug: false,\r\n application: null,\r\n filter: null,\r\n captureConsoleMinimumLevel: 'none'\r\n };\r\n\r\n //\r\n // Shared Methods\r\n //\r\n\r\n var extend = function () {\r\n\r\n // Variables\r\n var extended = {};\r\n var deep = false;\r\n var i = 0;\r\n\r\n // Check if a deep merge\r\n if (Object.prototype.toString.call(arguments[0]) === '[object Boolean]') {\r\n deep = arguments[0];\r\n i++;\r\n }\r\n\r\n // Merge the object into the extended object\r\n var merge = function (obj) {\r\n for (var prop in obj) {\r\n if (obj.hasOwnProperty(prop)) {\r\n // If property is an object, merge properties\r\n if (deep && Object.prototype.toString.call(obj[prop]) === '[object Object]') {\r\n extended[prop] = extend(extended[prop], obj[prop]);\r\n } else {\r\n extended[prop] = obj[prop];\r\n }\r\n }\r\n }\r\n };\r\n\r\n // Loop through each object and conduct a merge\r\n for (; i < arguments.length; i++) {\r\n var obj = arguments[i];\r\n merge(obj);\r\n }\r\n\r\n return extended;\r\n\r\n };\r\n\r\n //\r\n // Helpers\r\n //\r\n\r\n function parseQuery(query) {\r\n var Params = new Object();\r\n if (!query) return Params; // return empty object\r\n var Pairs = query.split(/[;&]/);\r\n for (var i = 0; i < Pairs.length; i++) {\r\n var KeyVal = Pairs[i].split('=');\r\n if (!KeyVal || KeyVal.length !== 2) continue;\r\n var key = unescape(KeyVal[0]);\r\n var val = unescape(KeyVal[1]);\r\n val = val.replace(/\\+/g, ' ');\r\n Params[key] = val;\r\n }\r\n return Params;\r\n }\r\n\r\n function objectLength(obj) {\r\n var size = 0, key;\r\n for (key in obj) {\r\n if (obj.hasOwnProperty(key)) size++;\r\n }\r\n return size;\r\n };\r\n\r\n function getSearchParameters() {\r\n var prmstr = window.location.search.substr(1);\r\n return prmstr !== null && prmstr !== \"\" ? transformToAssocArray(prmstr) : {};\r\n }\r\n\r\n function transformToAssocArray(prmstr) {\r\n var params = [];\r\n var prmarr = prmstr.split(\"&\");\r\n for (var i = 0; i < prmarr.length; i++) {\r\n var tmparr = prmarr[i].split(\"=\");\r\n params.push({\r\n 'key': tmparr[0],\r\n 'value': tmparr[1]\r\n });\r\n }\r\n return params;\r\n }\r\n\r\n function merge_objects(obj1, obj2) {\r\n var obj3 = {};\r\n for (var attrname1 in obj1) {\r\n obj3[attrname1] = obj1[attrname1];\r\n }\r\n for (var attrname2 in obj2) {\r\n obj3[attrname2] = obj2[attrname2];\r\n }\r\n\r\n return obj3;\r\n }\r\n\r\n // sprintf-js\r\n var sprintfjs = function() {\r\n 'use strict'\r\n var app = {};\r\n var re = {\r\n not_string: /[^s]/,\r\n not_bool: /[^t]/,\r\n not_type: /[^T]/,\r\n not_primitive: /[^v]/,\r\n number: /[diefg]/,\r\n numeric_arg: /[bcdiefguxX]/,\r\n json: /[j]/,\r\n not_json: /[^j]/,\r\n text: /^[^\\x25]+/,\r\n modulo: /^\\x25{2}/,\r\n placeholder: /^\\x25(?:([1-9]\\d*)\\$|\\(([^)]+)\\))?(\\+)?(0|'[^$])?(-)?(\\d+)?(?:\\.(\\d+))?([b-gijostTuvxX])/,\r\n key: /^([a-z_][a-z_\\d]*)/i,\r\n key_access: /^\\.([a-z_][a-z_\\d]*)/i,\r\n index_access: /^\\[(\\d+)\\]/,\r\n sign: /^[+-]/,\r\n mod: /^\\x25\\s/,\r\n notplaceholder: /^\\x25?([^b-gijostTuvxX])/\r\n }\r\n\r\n function sprintf(key) {\r\n // `arguments` is not an array, but should be fine for this call\r\n return sprintf_format(sprintf_parse(key), arguments)\r\n }\r\n\r\n function vsprintf(fmt, argv) {\r\n return sprintf.apply(null, [fmt].concat(argv || []))\r\n }\r\n\r\n function sprintf_format(parse_tree, argv) {\r\n var cursor = 1, tree_length = parse_tree.length, arg, output = '', i, k, ph, pad, pad_character, pad_length, is_positive, sign;\r\n for (i = 0; i < tree_length; i++) {\r\n if (typeof parse_tree[i] === 'string') {\r\n output += parse_tree[i]\r\n }\r\n else if (typeof parse_tree[i] === 'object') {\r\n ph = parse_tree[i]; // placeholder\r\n if (ph.keys) { // keyword argument\r\n arg = argv[cursor]\r\n for (k = 0; k < ph.keys.length; k++) {\r\n if (arg == undefined) {\r\n throw new Error(sprintf('[sprintf] Cannot access property \"%s\" of undefined value \"%s\"', ph.keys[k], ph.keys[k-1]))\r\n }\r\n arg = arg[ph.keys[k]]\r\n }\r\n }\r\n else if (ph.param_no) { // positional argument (explicit)\r\n arg = argv[ph.param_no]\r\n }\r\n else { // positional argument (implicit)\r\n arg = argv[cursor++]\r\n }\r\n\r\n if (re.not_type.test(ph.type) && re.not_primitive.test(ph.type) && arg instanceof Function) {\r\n arg = arg()\r\n }\r\n\r\n if (re.numeric_arg.test(ph.type) && (typeof arg !== 'number' && isNaN(arg) && arg === undefined)) { // treat %_d as string if it has no argument\r\n arg = ph.placeholder;\r\n ph.type = \"s\";\r\n }\r\n\r\n if (re.number.test(ph.type)) {\r\n is_positive = typeof arg === \"string\" ? true : arg >= 0\r\n }\r\n\r\n switch (ph.type) {\r\n case 'b':\r\n arg = parseInt(arg, 10).toString(2)\r\n break\r\n case 'c':\r\n arg = String.fromCharCode(parseInt(arg, 10))\r\n break\r\n case 'd':\r\n case 'i':\r\n arg = typeof arg === \"number\" ? parseInt(arg, 10) : NaN\r\n break\r\n case 'j':\r\n arg = JSON.stringify(arg, null, ph.width ? parseInt(ph.width) : 0)\r\n break\r\n case 'e':\r\n arg = ph.precision ? parseFloat(arg).toExponential(ph.precision) : parseFloat(arg).toExponential()\r\n break\r\n case 'f':\r\n arg = ph.precision ? parseFloat(arg).toFixed(ph.precision) : parseFloat(arg)\r\n break\r\n case 'g':\r\n arg = ph.precision ? String(Number(arg.toPrecision(ph.precision))) : parseFloat(arg)\r\n break\r\n case 'o':\r\n arg = (parseInt(arg, 10) >>> 0).toString(8)\r\n break\r\n case 's':\r\n arg = String(arg)\r\n arg = arg === \"undefined\" ? ph.placeholder : (ph.precision ? arg.substring(0, ph.precision) : arg)\r\n break\r\n case 't':\r\n arg = String(!!arg)\r\n arg = (ph.precision ? arg.substring(0, ph.precision) : arg)\r\n break\r\n case 'T':\r\n arg = Object.prototype.toString.call(arg).slice(8, -1).toLowerCase()\r\n arg = (ph.precision ? arg.substring(0, ph.precision) : arg)\r\n break\r\n case 'u':\r\n arg = parseInt(arg, 10) >>> 0\r\n break\r\n case 'v':\r\n arg = arg.valueOf()\r\n arg = (ph.precision ? arg.substring(0, ph.precision) : arg)\r\n break\r\n case 'x':\r\n arg = (parseInt(arg, 10) >>> 0).toString(16)\r\n break\r\n case 'X':\r\n arg = (parseInt(arg, 10) >>> 0).toString(16).toUpperCase()\r\n break\r\n }\r\n if (re.json.test(ph.type)) {\r\n output += arg\r\n }\r\n else {\r\n if (re.number.test(ph.type) && (!is_positive || ph.sign)) {\r\n sign = is_positive ? '+' : '-'\r\n arg = arg.toString().replace(re.sign, '')\r\n }\r\n else {\r\n sign = ''\r\n }\r\n pad_character = ph.pad_char ? ph.pad_char === '0' ? '0' : ph.pad_char.charAt(1) : ' '\r\n pad_length = ph.width - (sign + arg).length\r\n pad = ph.width ? (pad_length > 0 ? pad_character.repeat(pad_length) : '') : ''\r\n output += ph.align ? sign + arg + pad : (pad_character === '0' ? sign + pad + arg : pad + sign + arg)\r\n }\r\n }\r\n }\r\n return output\r\n }\r\n\r\n var sprintf_cache = Object.create(null)\r\n\r\n function sprintf_parse(fmt) {\r\n var _fmt = fmt, match, parse_tree = [], arg_names = 0;\r\n while (_fmt) {\r\n if ((match = re.text.exec(_fmt)) !== null) {\r\n parse_tree.push(match[0]);\r\n }\r\n else if ((match = re.modulo.exec(_fmt)) !== null) {\r\n parse_tree.push('%');\r\n }\r\n else if ((match = re.placeholder.exec(_fmt)) !== null) {\r\n if (match[2]) {\r\n arg_names |= 1\r\n var field_list = [], replacement_field = match[2], field_match = []\r\n if ((field_match = re.key.exec(replacement_field)) !== null) {\r\n field_list.push(field_match[1])\r\n while ((replacement_field = replacement_field.substring(field_match[0].length)) !== '') {\r\n if ((field_match = re.key_access.exec(replacement_field)) !== null) {\r\n field_list.push(field_match[1])\r\n }\r\n else if ((field_match = re.index_access.exec(replacement_field)) !== null) {\r\n field_list.push(field_match[1])\r\n }\r\n else {\r\n throw new SyntaxError('[sprintf] failed to parse named argument key')\r\n }\r\n }\r\n }\r\n else {\r\n throw new SyntaxError('[sprintf] failed to parse named argument key')\r\n }\r\n match[2] = field_list\r\n }\r\n else {\r\n arg_names |= 2\r\n }\r\n if (arg_names === 3) {\r\n throw new Error('[sprintf] mixing positional and named placeholders is not (yet) supported')\r\n }\r\n\r\n parse_tree.push(\r\n {\r\n placeholder: match[0],\r\n param_no: match[1],\r\n keys: match[2],\r\n sign: match[3],\r\n pad_char: match[4],\r\n align: match[5],\r\n width: match[6],\r\n precision: match[7],\r\n type: match[8]\r\n }\r\n )\r\n }\r\n else if ((match = re.mod.exec(_fmt)) !== null) { // treat %_SPACE as a string\r\n parse_tree.push(match[0]);\r\n }\r\n else if ((match = re.notplaceholder.exec(_fmt)) !== null) { // treat %_NOTPLACEHOLDER as a string\r\n parse_tree.push(match[0]);\r\n }\r\n else {\r\n throw new SyntaxError('[sprintf] unexpected placeholder')\r\n }\r\n _fmt = _fmt.substring(match[0].length)\r\n }\r\n return parse_tree\r\n }\r\n\r\n app.sprintf = sprintf;\r\n app.vsprintf = vsprintf;\r\n return app;\r\n }\r\n\r\n //\r\n // Constructor\r\n // Can be named anything you want\r\n //\r\n\r\n var Constructor = function (options) {\r\n\r\n //\r\n // Unique Variables\r\n //\r\n\r\n var publicAPIs = {};\r\n var settings;\r\n\r\n function getPayload() {\r\n var payload = {\r\n \"url\": document.location.pathname || '/',\r\n \"application\": settings.application\r\n };\r\n\r\n var payload_data = [];\r\n\r\n if (document.documentMode) payload_data.push({ \"key\": \"Document-Mode\", \"value\": document.documentMode });\r\n if (window.innerWidth || document.documentElement.clientWidth || document.getElementsByTagName('body')[0].clientWidth) payload_data.push({ \"key\": \"Browser-Width\", \"value\": window.innerWidth || document.documentElement.clientWidth || document.getElementsByTagName('body')[0].clientWidth });\r\n if (window.innerHeight || document.documentElement.clientHeight || document.getElementsByTagName('body')[0].clientHeight) payload_data.push({ \"key\": \"Browser-Height\", \"value\": window.innerHeight || document.documentElement.clientHeight || document.getElementsByTagName('body')[0].clientHeight });\r\n if ((screen.msOrientation || (screen.orientation || screen.mozOrientation || {}).type) !== undefined) payload_data.push({ \"key\": \"Screen-Orientation\", \"value\": ((screen.msOrientation || (screen.orientation || screen.mozOrientation || {}).type).split(\"-\"))[0] });\r\n if (screen.width) payload_data.push({ \"key\": \"Screen-Width\", \"value\": screen.width });\r\n if (screen.height) payload_data.push({ \"key\": \"Screen-Height\", \"value\": screen.height });\r\n if (screen.colorDepth) payload_data.push({ \"key\": \"Color-Depth\", \"value\": screen.colorDepth });\r\n payload_data.push({ \"key\": \"X-ELMAHIO-SEARCH-isClientside\", \"value\": \"true\" });\r\n\r\n payload.data = payload_data;\r\n\r\n var payload_serverVariables = [];\r\n if (navigator.language) payload_serverVariables.push({ \"key\": \"User-Language\", \"value\": navigator.language });\r\n if (navigator.userAgent) payload_serverVariables.push({ \"key\": \"User-Agent\", \"value\": navigator.userAgent });\r\n if (document.referrer) payload_serverVariables.push({ \"key\": \"Referer\", \"value\": document.referrer });\r\n if (document.location.protocol === \"https:\") payload_serverVariables.push({ \"key\": \"HTTPS\", \"value\": 'on' });\r\n if (document.location.hostname) payload_serverVariables.push({ \"key\": \"Host\", \"value\": document.location.hostname });\r\n\r\n payload.serverVariables = payload_serverVariables;\r\n\r\n return payload;\r\n }\r\n\r\n function confirmResponse(status, response) {\r\n if (settings.debug) {\r\n if (status === 'error') {\r\n console.log('%c \\u2BC8 Error log: ' + '%c \\u2715 Not created ', debugSettings.lightCSS, debugSettings.errorCSS);\r\n } else if (status === 'success') {\r\n console.log('%c \\u2BC8 Error log: ' + '%c \\u2714 ' + response + ' at ' + new Date().toLocaleString() + ' ', debugSettings.lightCSS, debugSettings.successCSS);\r\n } else {\r\n console.log('%c \\u2BC8 Error log: ' + '%c \\u2715 Not created. Title should not be undefined, null or empty ! ', debugSettings.lightCSS, debugSettings.errorCSS);\r\n }\r\n }\r\n }\r\n\r\n function stackGPS(error, xhr, jsonData) {\r\n \tvar errorStack = error.toString().split(\"\\n\")[0];\r\n \tvar gps = new StackTraceGPS();\r\n var promise = new Promise(function(resolve) {\r\n\t var stackframes = ErrorStackParser.parse(error);\r\n\t resolve(Promise.all(stackframes.map(function(sf) {\r\n\t return new Promise(function(resolve) {\r\n\t function resolveOriginal() {\r\n\t resolve(sf);\r\n\t }\r\n\t gps.pinpoint(sf).then(resolve, resolveOriginal)['catch'](resolveOriginal);\r\n\t });\r\n\t })));\r\n \t}\r\n );\r\n\r\n promise.then(function(newFrames){\r\n \tnewFrames.forEach(function(stackFrame, i){\r\n\t\t\t\t\tif(stackFrame.functionName) {\r\n \t\t\tvar fn = stackFrame.functionName + ' ';\r\n \t\t} else {\r\n \t\t\tvar fn = '';\r\n \t\t}\r\n \t\tvar stackString = ' at ' + fn + '(' + stackFrame.fileName + ':' + stackFrame.lineNumber + ':' + stackFrame.columnNumber + ')';\r\n \t\tnewFrames[i] = stackString;\r\n \t});\r\n \tnewFrames.unshift(errorStack);\r\n \tjsonData.detail = newFrames.join(\"\\n\");\r\n \txhr.send(JSON.stringify(jsonData));\r\n });\r\n }\r\n\r\n function stackString(error) {\r\n \tvar typeOF = typeof error.error;\r\n \tvar typeOFCapitalized = typeOF.charAt(0).toUpperCase() + typeOF.slice(1);\r\n\r\n \treturn typeOFCapitalized + ': ' + error.error + '\\n' + ' at ' + '(' + error.source + ':' + error.lineno + ':' + error.colno + ')';\r\n }\r\n\r\n function manipulateStack (errorStack, severity, message) {\r\n var stack = [];\r\n for (var i = 0; i < errorStack.length; i++) {\r\n if(errorStack[i] === \"Error\") {\r\n stack.push(severity + \": \" + message);\r\n }\r\n if(!errorStack[i].match(/elmahio.js|elmahio.min.js/g) && errorStack[i] !== \"Error\") {\r\n stack.push(errorStack[i]);\r\n }\r\n }\r\n return stack.join('\\n');\r\n }\r\n\r\n // Private methods\r\n\r\n var sendPayload = function (apiKey, logId, callback, errorLog) {\r\n\r\n var api_key = apiKey,\r\n log_id = logId,\r\n error = errorLog,\r\n send = 1,\r\n queryParams = getSearchParameters(),\r\n stack = error.error && objectLength(error.error.stack) !== 0 && typeof error.error === \"object\" ? ErrorStackParser.parse(error.error) : '';\r\n\r\n // Ignoring error from an external script\r\n if (error && error.colno === 0 && error.lineno === 0 && (!stack || stack === '') && error.message && (error.message === \"Script error.\" || error.message === \"Script error\")) {\r\n\t\t\t if (settings.debug) {\r\n\t\t\t console.log('%c \\u2BC8 Error log: ' + '%c \\uD83D\\uDEC8 Ignoring error from external script ', debugSettings.lightCSS, debugSettings.warningCSS);\r\n\t\t\t }\r\n\t\t\t return;\r\n\t\t\t}\r\n\r\n if ((api_key !== null && log_id !== null) || (paramsLength === 2)) {\r\n\r\n // Priority for parameters\r\n if (params.hasOwnProperty('apiKey') && params.hasOwnProperty('logId')) {\r\n api_key = params['apiKey'];\r\n log_id = params['logId'];\r\n }\r\n\r\n // get new XHR object\r\n var xhr = new XMLHttpRequest();\r\n xhr.open(\"POST\", \"https://api.elmah.io/v3/messages/\" + log_id + \"?api_key=\" + api_key, true);\r\n\r\n xhr.setRequestHeader('Content-type', 'application/json');\r\n\r\n xhr.onload = function (e) {\r\n if (xhr.readyState === 4) {\r\n if (xhr.status === 201) {\r\n callback('success', xhr.statusText);\r\n }\r\n }\r\n };\r\n\r\n xhr.onerror = function (e) {\r\n callback('error', xhr.statusText);\r\n\r\n // on error event\r\n publicAPIs.emit('error', xhr.status, xhr.statusText);\r\n }\r\n\r\n var jsonData = {\r\n \"detail\": error.error ? error.error.stack : null,\r\n \"title\": error.message || 'Unspecified error',\r\n \"source\": stack && stack.length > 0 ? stack[0].fileName : null,\r\n \"severity\": \"Error\",\r\n \"type\": error.error ? error.error.name : null,\r\n \"queryString\": JSON.parse(JSON.stringify(queryParams))\r\n };\r\n\r\n // Check if error sent is a string and not an object\r\n // Then create the articifial stacktrace and pass source & type of the error\r\n if(error.error && (objectLength(error.error.stack) === 0) && typeof jsonData.detail === \"undefined\") {\r\n \tvar typeOF = typeof errorLog.error;\r\n \t\t\tvar typeOFCapitalized = typeOF.charAt(0).toUpperCase() + typeOF.slice(1);\r\n\r\n \tjsonData.detail = stackString(errorLog);\r\n \tjsonData.source = errorLog.source;\r\n jsonData.title = \"Uncaught \" + typeOFCapitalized + \": \" + errorLog.error;\r\n }\r\n\r\n // Add payload to jsonData\r\n jsonData = merge_objects(jsonData, getPayload());\r\n\r\n // filter callback\r\n if (settings.filter !== null) {\r\n if (settings.filter(jsonData)) {\r\n send = 0;\r\n }\r\n }\r\n\r\n if (send === 1) {\r\n // on message event\r\n publicAPIs.emit('message', jsonData);\r\n\r\n if (error.error && typeof error.error === \"object\" && objectLength(error.error.stack) !== 0 && typeof Promise !== \"undefined\" && Promise.toString().indexOf(\"[native code]\") !== -1) {\r\n \t// send message trying to pinpoint stackframes\r\n \tstackGPS(error.error, xhr, jsonData);\r\n\t } else {\r\n\t \t// send message\r\n \txhr.send(JSON.stringify(jsonData));\r\n\t }\r\n }\r\n\r\n } else {\r\n return console.log('Login api error');\r\n }\r\n };\r\n\r\n var sendManualPayload = function (apiKey, logId, callback, logType, messageLog, errorLog) {\r\n var api_key = apiKey,\r\n log_id = logId,\r\n type = logType,\r\n error = errorLog,\r\n message = messageLog,\r\n send = 1,\r\n queryParams = getSearchParameters();\r\n\r\n if ((api_key !== null && log_id !== null) || (paramsLength === 2)) {\r\n\r\n // Priority for parameters\r\n if (params.hasOwnProperty('apiKey') && params.hasOwnProperty('logId')) {\r\n api_key = params['apiKey'];\r\n log_id = params['logId'];\r\n }\r\n\r\n // get new XHR object\r\n var xhr = new XMLHttpRequest();\r\n xhr.open(\"POST\", \"https://api.elmah.io/v3/messages/\" + log_id + \"?api_key=\" + api_key, true);\r\n xhr.setRequestHeader('Content-type', 'application/json');\r\n\r\n xhr.onload = function (e) {\r\n if (xhr.readyState === 4) {\r\n if (xhr.status === 201) {\r\n callback('success', xhr.statusText);\r\n }\r\n }\r\n };\r\n\r\n xhr.onerror = function (e) {\r\n callback('error', xhr.statusText);\r\n\r\n // on error event\r\n publicAPIs.emit('error', xhr.status, xhr.statusText);\r\n }\r\n\r\n if (type !== \"Log\") {\r\n\r\n var stack = error ? ErrorStackParser.parse(error) : null;\r\n\r\n var jsonData = {\r\n \"title\": message,\r\n \"source\": stack && stack.length > 0 ? stack[0].fileName : null,\r\n \"detail\": error ? error.stack : null,\r\n \"severity\": type,\r\n \"type\": error ? error.name : null,\r\n \"queryString\": JSON.parse(JSON.stringify(queryParams))\r\n };\r\n\r\n // Add payload to jsonData\r\n jsonData = merge_objects(jsonData, getPayload());\r\n\r\n } else {\r\n\r\n jsonData = error;\r\n\r\n }\r\n\r\n // filter callback\r\n if (settings.filter !== null) {\r\n if (settings.filter(jsonData)) {\r\n send = 0;\r\n }\r\n }\r\n\r\n if (send === 1) {\r\n if (jsonData.title) {\r\n\r\n // on message event\r\n publicAPIs.emit('message', jsonData);\r\n\r\n if (error && type !== \"Log\" && typeof Promise !== \"undefined\" && Promise.toString().indexOf(\"[native code]\") !== -1) {\r\n // send message trying to pinpoint stackframes\r\n stackGPS(error, xhr, jsonData);\r\n } else {\r\n // send message\r\n if(jsonData.errorObject) {\r\n error = jsonData.errorObject;\r\n delete jsonData.errorObject;\r\n stackGPS(error, xhr, jsonData);\r\n } else {\r\n xhr.send(JSON.stringify(jsonData));\r\n }\r\n }\r\n\r\n } else {\r\n callback('missing-title', xhr.statusText);\r\n }\r\n }\r\n\r\n } else {\r\n return console.log('Login api error');\r\n }\r\n };\r\n\r\n var sendPayloadFromConsole = function (apiKey, logId, callback, logType, errorLog) {\r\n var api_key = apiKey,\r\n log_id = logId,\r\n message = errorLog.message,\r\n messageTemplate = errorLog.message,\r\n type = logType,\r\n args = Object.values(errorLog.arguments),\r\n send = 1,\r\n queryParams = getSearchParameters();\r\n\r\n // If message has placeholders (%s or %d), check for arguments and replace them\r\n \tif(String(message).match(/(%d|%s)+/ig) && args.length > 1) {\r\n \t\tvar sprintfJS = new sprintfjs();\r\n // Remove the first argument from array, which represents the message\r\n \t\targs.shift();\r\n message = sprintfJS.vsprintf(message, args);\r\n }\r\n\r\n if(typeof message !== \"string\"){\r\n message = message.toString();\r\n }\r\n\r\n if(typeof messageTemplate !== \"string\") {\r\n messageTemplate = messageTemplate.toString();\r\n }\r\n\r\n if ((api_key !== null && log_id !== null) || (paramsLength === 2)) {\r\n\r\n // Priority for parameters\r\n if (params.hasOwnProperty('apiKey') && params.hasOwnProperty('logId')) {\r\n api_key = params['apiKey'];\r\n log_id = params['logId'];\r\n }\r\n\r\n // get new XHR object\r\n var xhr = new XMLHttpRequest();\r\n xhr.open(\"POST\", \"https://api.elmah.io/v3/messages/\" + log_id + \"?api_key=\" + api_key, true);\r\n xhr.setRequestHeader('Content-type', 'application/json');\r\n\r\n xhr.onload = function (e) {\r\n if (xhr.readyState === 4) {\r\n if (xhr.status === 201) {\r\n callback('success', xhr.statusText);\r\n }\r\n }\r\n };\r\n\r\n xhr.onerror = function (e) {\r\n callback('error', xhr.statusText);\r\n // on error event\r\n publicAPIs.emit('error', xhr.status, xhr.statusText);\r\n }\r\n\r\n var jsonData = {\r\n \"title\": message,\r\n \"titleTemplate\": messageTemplate,\r\n \"detail\": manipulateStack(new Error().stack.split('\\n'), type, message),\r\n \"severity\": type,\r\n \"type\": null,\r\n \"queryString\": JSON.parse(JSON.stringify(queryParams))\r\n };\r\n\r\n // Add payload to jsonData\r\n jsonData = merge_objects(jsonData, getPayload());\r\n\r\n // filter callback\r\n if (settings.filter !== null) {\r\n if (settings.filter(jsonData)) {\r\n send = 0;\r\n }\r\n }\r\n\r\n if (send === 1) {\r\n if (jsonData.title) {\r\n // on message event\r\n publicAPIs.emit('message', jsonData);\r\n // send message\r\n xhr.send(JSON.stringify(jsonData));\r\n } else {\r\n callback('missing-title', xhr.statusText);\r\n }\r\n }\r\n\r\n } else {\r\n return console.log('Login api error');\r\n }\r\n };\r\n\r\n var sendPrefilledLogMessage = function(errorLog) {\r\n // without error object\r\n if(!errorLog) return getPayload();\r\n\r\n // with error object\r\n var error = errorLog;\r\n var stack = error ? ErrorStackParser.parse(error) : null;\r\n var jsonData = {\r\n \"title\": error.message,\r\n \"source\": stack && stack.length > 0 ? stack[0].fileName : null,\r\n \"detail\": error ? error.stack : null,\r\n \"severity\": \"Error\",\r\n \"type\": error ? error.name : null,\r\n \"errorObject\": error\r\n };\r\n\r\n jsonData = merge_objects(jsonData, getPayload());\r\n return jsonData;\r\n }\r\n\r\n // Some public methods\r\n\r\n publicAPIs.error = function (msg) {\r\n sendManualPayload(settings.apiKey, settings.logId, confirmResponse, 'Error', msg);\r\n };\r\n publicAPIs.error = function (msg, error) {\r\n sendManualPayload(settings.apiKey, settings.logId, confirmResponse, 'Error', msg, error);\r\n };\r\n\r\n publicAPIs.verbose = function (msg) {\r\n sendManualPayload(settings.apiKey, settings.logId, confirmResponse, 'Verbose', msg);\r\n };\r\n publicAPIs.verbose = function (msg, error) {\r\n sendManualPayload(settings.apiKey, settings.logId, confirmResponse, 'Verbose', msg, error);\r\n };\r\n\r\n publicAPIs.debug = function (msg) {\r\n sendManualPayload(settings.apiKey, settings.logId, confirmResponse, 'Debug', msg);\r\n };\r\n publicAPIs.debug = function (msg, error) {\r\n sendManualPayload(settings.apiKey, settings.logId, confirmResponse, 'Debug', msg, error);\r\n };\r\n\r\n publicAPIs.information = function (msg) {\r\n sendManualPayload(settings.apiKey, settings.logId, confirmResponse, 'Information', msg);\r\n };\r\n publicAPIs.information = function (msg, error) {\r\n sendManualPayload(settings.apiKey, settings.logId, confirmResponse, 'Information', msg, error);\r\n };\r\n\r\n publicAPIs.warning = function (msg) {\r\n sendManualPayload(settings.apiKey, settings.logId, confirmResponse, 'Warning', msg);\r\n };\r\n publicAPIs.warning = function (msg, error) {\r\n sendManualPayload(settings.apiKey, settings.logId, confirmResponse, 'Warning', msg, error);\r\n };\r\n\r\n publicAPIs.fatal = function (msg) {\r\n sendManualPayload(settings.apiKey, settings.logId, confirmResponse, 'Fatal', msg);\r\n };\r\n publicAPIs.fatal = function (msg, error) {\r\n sendManualPayload(settings.apiKey, settings.logId, confirmResponse, 'Fatal', msg, error);\r\n };\r\n\r\n publicAPIs.log = function (obj) {\r\n sendManualPayload(settings.apiKey, settings.logId, confirmResponse, 'Log', null, obj);\r\n };\r\n\r\n publicAPIs.message = function(error) {\r\n return sendPrefilledLogMessage(error);\r\n };\r\n\r\n publicAPIs.on = function (name, callback, ctx) {\r\n var e = this.e || (this.e = {});\r\n\r\n (e[name] || (e[name] = [])).push({\r\n fn: callback,\r\n ctx: ctx\r\n });\r\n\r\n return this;\r\n };\r\n\r\n publicAPIs.emit = function (name) {\r\n var data = [].slice.call(arguments, 1);\r\n var evtArr = ((this.e || (this.e = {}))[name] || []).slice();\r\n var i = 0;\r\n var len = evtArr.length;\r\n\r\n for (i; i < len; i++) {\r\n evtArr[i].fn.apply(evtArr[i].ctx, data);\r\n }\r\n\r\n return this;\r\n };\r\n\r\n publicAPIs.init = function (options) {\r\n\r\n // -- Merge options into defaults\r\n settings = extend(defaults, options || {});\r\n\r\n // -- Log on window error\r\n window.onerror = function (message, source, lineno, colno, error) {\r\n\r\n var errorLog = {\r\n 'message': message,\r\n 'source': source,\r\n 'lineno': lineno,\r\n 'colno': colno,\r\n 'error': error\r\n }\r\n\r\n sendPayload(settings.apiKey, settings.logId, confirmResponse, errorLog);\r\n\r\n return false;\r\n }\r\n\r\n // -- Overriding console methods\r\n // -- Then log messages into the app.elmah.io\r\n if(options && options.captureConsoleMinimumLevel !== \"none\") {\r\n\r\n // If captureConsoleMinimumLevel: info or debug is set (error, warn)\r\n if(options.captureConsoleMinimumLevel === \"info\" || options.captureConsoleMinimumLevel === \"warn\" || options.captureConsoleMinimumLevel === \"error\" || options.captureConsoleMinimumLevel === \"debug\") {\r\n // Log console errors\r\n var _error = console.error;\r\n console.error = function(errMessage){\r\n var errorLog = {\r\n \t\t'message': errMessage,\r\n \t\t'arguments': arguments\r\n \t}\r\n sendPayloadFromConsole(settings.apiKey, settings.logId, confirmResponse, 'Error', errorLog);\r\n _error.apply(console, arguments);\r\n };\r\n if(options.captureConsoleMinimumLevel !== \"error\") {\r\n // Log console warnings\r\n var _warning = console.warn;\r\n console.warn = function(warnMessage){\r\n var errorLog = {\r\n 'message': warnMessage,\r\n 'arguments': arguments\r\n }\r\n sendPayloadFromConsole(settings.apiKey, settings.logId, confirmResponse, 'Warning', errorLog);\r\n _warning.apply(console, arguments);\r\n };\r\n }\r\n }\r\n if(options.captureConsoleMinimumLevel === \"info\" || options.captureConsoleMinimumLevel === \"debug\") {\r\n // Log console info\r\n var _info = console.info;\r\n console.info = function(infoMessage){\r\n var errorLog = {\r\n \t\t'message': infoMessage,\r\n \t\t'arguments': arguments\r\n \t}\r\n sendPayloadFromConsole(settings.apiKey, settings.logId, confirmResponse, 'Information', errorLog);\r\n _info.apply(console, arguments);\r\n };\r\n }\r\n if(options.captureConsoleMinimumLevel === \"debug\") {\r\n // Log console debug\r\n var _debug = console.debug;\r\n console.debug = function(debugMessage){\r\n var errorLog = {\r\n \t\t'message': debugMessage,\r\n \t\t'arguments': arguments\r\n \t}\r\n sendPayloadFromConsole(settings.apiKey, settings.logId, confirmResponse, 'Debug', errorLog);\r\n _debug.apply(console, arguments);\r\n };\r\n }\r\n }\r\n };\r\n\r\n // Initialize the plugin\r\n publicAPIs.init(options);\r\n\r\n if (settings.debug) {\r\n console.log('%c' + debugSettings.label, debugSettings.labelCSS);\r\n }\r\n\r\n // Return the public APIs\r\n return publicAPIs;\r\n\r\n };\r\n\r\n\r\n //\r\n // Return the constructor\r\n //\r\n\r\n if (paramsLength && params.hasOwnProperty('apiKey') && params.hasOwnProperty('logId')) {\r\n // Immediately-Invoked Function Expression (IIFE)\r\n return new Constructor;\r\n } else {\r\n // UMD Constructor\r\n return Constructor;\r\n }\r\n\r\n});"],"file":"elmahio.js"} \ No newline at end of file diff --git a/dist/elmahio.min.js b/dist/elmahio.min.js index db1e3d8..24f0a02 100644 --- a/dist/elmahio.min.js +++ b/dist/elmahio.min.js @@ -1,5 +1,5 @@ /*! - * elmah.io Javascript Logger - version 3.4.0 + * elmah.io Javascript Logger - version 3.4.1 * (c) 2018 elmah.io, Apache 2.0 License, https://elmah.io */ !function(e,n){"function"==typeof define&&define.amd?define([],function(){return n(e)}):"object"==typeof exports?module.exports=n(e):e.Elmahio=n(e)}("undefined"!=typeof global?global:"undefined"!=typeof window?window:this,function(e){"use strict";var n,r,t,o=function(){function e(e){return!isNaN(parseFloat(e))&&isFinite(e)}function n(e){return e.charAt(0).toUpperCase()+e.substring(1)}function r(e){return function(){return this[e]}}var t=["isConstructor","isEval","isNative","isToplevel"],o=["columnNumber","lineNumber"],i=["fileName","functionName","source"],a=t.concat(o,i,["args"]);function s(e){if(e instanceof Object)for(var r=0;r-1&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^\()]*)|(\)\,.*$)/g,""));var n=e.replace(/^\s+/,"").replace(/\(eval code/g,"(").split(/\s+/).slice(1),r=this.extractLocation(n.pop()),t=n.join(" ")||void 0,i=["eval",""].indexOf(r[0])>-1?void 0:r[0];return new o({functionName:t,fileName:i,lineNumber:r[1],columnNumber:r[2],source:e})},this)},parseFFOrSafari:function(e){return e.stack.split("\n").filter(function(e){return!e.match(t)},this).map(function(e){if(e.indexOf(" > eval")>-1&&(e=e.replace(/ line (\d+)(?: > eval line \d+)* > eval\:\d+\:\d+/g,":$1")),-1===e.indexOf("@")&&-1===e.indexOf(":"))return new o({functionName:e});var n=/((.*".+"[^@]*)?[^@]*)(?:@)/,r=e.match(n),t=r&&r[1]?r[1]:void 0,i=this.extractLocation(e.replace(n,""));return new o({functionName:t,fileName:i[0],lineNumber:i[1],columnNumber:i[2],source:e})},this)},parseOpera:function(e){return!e.stacktrace||e.message.indexOf("\n")>-1&&e.message.split("\n").length>e.stacktrace.split("\n").length?this.parseOpera9(e):e.stack?this.parseOpera11(e):this.parseOpera10(e)},parseOpera9:function(e){for(var n=/Line (\d+).*script (?:in )?(\S+)/i,r=e.message.split("\n"),t=[],i=2,a=r.length;i/,"$2").replace(/\([^\)]*\)/g,"")||void 0;i.match(/\(([^\)]*)\)/)&&(n=i.replace(/^[^\(]+\(([^\)]*)\)$/,"$1"));var s=void 0===n||"[arguments not available]"===n?void 0:n.split(",");return new o({functionName:a,args:s,fileName:t[0],lineNumber:t[1],columnNumber:t[2],source:e})},this)}}),a=function(n,r){function t(e){return new Promise(function(n,r){var t=new XMLHttpRequest;t.open("get",e),t.onerror=r,t.onreadystatechange=function(){4===t.readyState&&(t.status>=200&&t.status<300||"file://"===e.substr(0,7)&&t.responseText?n(t.responseText):r(new Error("HTTP status: "+t.status+" retrieving "+e)))},t.send()})}function o(n){if(void 0!==e&&e.atob)return e.atob(n);throw new Error("You must supply a polyfill for window.atob in this environment")}function i(e){if("object"!=typeof e)throw new TypeError("Given StackFrame is not an object");if("string"!=typeof e.fileName)throw new TypeError("Given file name is not a String");if("number"!=typeof e.lineNumber||e.lineNumber%1!=0||e.lineNumber<1)throw new TypeError("Given line number must be a positive integer");if("number"!=typeof e.columnNumber||e.columnNumber%1!=0||e.columnNumber<0)throw new TypeError("Given column number must be a non-negative integer");return!0}return function e(a){if(!(this instanceof e))return new e(a);a=a||{},this.sourceCache=a.sourceCache||{},this.sourceMapConsumerCache=a.sourceMapConsumerCache||{},this.ajax=a.ajax||t,this._atob=a.atob||o,this._get=function(e){return new Promise(function(n,r){var t="data:"===e.substr(0,5);if(this.sourceCache[e])n(this.sourceCache[e]);else if(a.offline&&!t)r(new Error("Cannot make network requests in offline mode"));else if(t){var o=e.match(/^data:application\/json;([\w=:"-]+;)*base64,/);if(o){var i=o[0].length,s=e.substr(i),u=this._atob(s);this.sourceCache[e]=u,n(u)}else r(new Error("The encoding of the inline sourcemap is not supported"))}else{var l=this.ajax(e,{method:"get"});this.sourceCache[e]=l,l.then(n,r)}}.bind(this))},this._getSourceMapConsumer=function(e,r){return new Promise(function(t,o){if(this.sourceMapConsumerCache[e])t(this.sourceMapConsumerCache[e]);else{var i=new Promise(function(t,o){return this._get(e).then(function(e){"string"==typeof e&&(e=function(e){if("undefined"!=typeof JSON&&JSON.parse)return JSON.parse(e);throw new Error("You must supply a polyfill for JSON.parse in this environment")}(e.replace(/^\)\]\}'/,""))),void 0===e.sourceRoot&&(e.sourceRoot=r),t(new n.SourceMapConsumer(e))},o)}.bind(this));this.sourceMapConsumerCache[e]=i,t(i)}}.bind(this))},this.pinpoint=function(e){return new Promise(function(n,r){this.getMappedLocation(e).then(function(e){function r(){n(e)}this.findFunctionName(e).then(n,r).catch(r)}.bind(this),r)}.bind(this))},this.findFunctionName=function(e){return new Promise(function(n,t){i(e),this._get(e.fileName).then(function(t){var o=e.lineNumber,i=e.columnNumber,a=function(e,n){for(var r=[/['"]?([$_A-Za-z][$_A-Za-z0-9]*)['"]?\s*[:=]\s*function\b/,/function\s+([^('"`]*?)\s*\(([^)]*)\)/,/['"]?([$_A-Za-z][$_A-Za-z0-9]*)['"]?\s*[:=]\s*(?:eval|new Function)\b/,/\b(?!(?:if|for|switch|while|with|catch)\b)(?:(?:static)\s+)?(\S+)\s*\(.*?\)\s*\{/,/['"]?([$_A-Za-z][$_A-Za-z0-9]*)['"]?\s*[:=]\s*\(.*?\)\s*=>/],t=e.split("\n"),o="",i=Math.min(n,20),a=0;a=0&&(s=s.substr(0,u)),s){o=s+o;for(var l=r.length,c=0;c=0){var s=this._originalMappings[a];if(void 0===e.column)for(var u=s.originalLine;s&&s.originalLine===u;)i.push({line:t.getArg(s,"generatedLine",null),column:t.getArg(s,"generatedColumn",null),lastColumn:t.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++a];else for(var l=s.originalColumn;s&&s.originalLine===n&&s.originalColumn==l;)i.push({line:t.getArg(s,"generatedLine",null),column:t.getArg(s,"generatedColumn",null),lastColumn:t.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++a]}return i},n.SourceMapConsumer=u,l.prototype=Object.create(u.prototype),l.prototype.consumer=u,l.fromSourceMap=function(e){var n=Object.create(l.prototype),r=n._names=i.fromArray(e._names.toArray(),!0),o=n._sources=i.fromArray(e._sources.toArray(),!0);n.sourceRoot=e._sourceRoot,n.sourcesContent=e._generateSourcesContent(n._sources.toArray(),n.sourceRoot),n.file=e._file;for(var a=e._mappings.toArray().slice(),u=n.__generatedMappings=[],p=n.__originalMappings=[],g=0,f=a.length;g1&&(r.source=m+i[1],m+=i[1],r.originalLine=f+i[2],f=r.originalLine,r.originalLine+=1,r.originalColumn=h+i[3],h=r.originalColumn,i.length>4&&(r.name=d+i[4],d+=i[4])),C.push(r),"number"==typeof r.originalLine&&w.push(r)}s(C,t.compareByGeneratedPositionsDeflated),this.__generatedMappings=C,s(w,t.compareByOriginalPositions),this.__originalMappings=w},l.prototype._findMapping=function(e,n,r,t,i,a){if(e[r]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[r]);if(e[t]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[t]);return o.search(e,n,i,a)},l.prototype.computeColumnSpans=function(){for(var e=0;e=0){var o=this._generatedMappings[r];if(o.generatedLine===n.generatedLine){var i=t.getArg(o,"source",null);null!==i&&(i=this._sources.at(i),null!=this.sourceRoot&&(i=t.join(this.sourceRoot,i)));var a=t.getArg(o,"name",null);return null!==a&&(a=this._names.at(a)),{source:i,line:t.getArg(o,"originalLine",null),column:t.getArg(o,"originalColumn",null),name:a}}}return{source:null,line:null,column:null,name:null}},l.prototype.hasContentsOfAllSources=function(){return!!this.sourcesContent&&this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return null==e})},l.prototype.sourceContentFor=function(e,n){if(!this.sourcesContent)return null;if(null!=this.sourceRoot&&(e=t.relative(this.sourceRoot,e)),this._sources.has(e))return this.sourcesContent[this._sources.indexOf(e)];var r;if(null!=this.sourceRoot&&(r=t.urlParse(this.sourceRoot))){var o=e.replace(/^file:\/\//,"");if("file"==r.scheme&&this._sources.has(o))return this.sourcesContent[this._sources.indexOf(o)];if((!r.path||"/"==r.path)&&this._sources.has("/"+e))return this.sourcesContent[this._sources.indexOf("/"+e)]}if(n)return null;throw new Error('"'+e+'" is not in the SourceMap.')},l.prototype.generatedPositionFor=function(e){var n=t.getArg(e,"source");if(null!=this.sourceRoot&&(n=t.relative(this.sourceRoot,n)),!this._sources.has(n))return{line:null,column:null,lastColumn:null};var r={source:n=this._sources.indexOf(n),originalLine:t.getArg(e,"line"),originalColumn:t.getArg(e,"column")},o=this._findMapping(r,this._originalMappings,"originalLine","originalColumn",t.compareByOriginalPositions,t.getArg(e,"bias",u.GREATEST_LOWER_BOUND));if(o>=0){var i=this._originalMappings[o];if(i.source===r.source)return{line:t.getArg(i,"generatedLine",null),column:t.getArg(i,"generatedColumn",null),lastColumn:t.getArg(i,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},n.BasicSourceMapConsumer=l,p.prototype=Object.create(u.prototype),p.prototype.constructor=u,p.prototype._version=3,Object.defineProperty(p.prototype,"sources",{get:function(){for(var e=[],n=0;n=0;c--)"."===(a=u[c])?u.splice(c,1):".."===a?l++:l>0&&(""===a?(u.splice(c+1,l),l=0):(u.splice(c,2),l--));return""===(r=u.join("/"))&&(r=s?"/":"."),t?(t.path=r,i(t)):r}n.urlParse=o,n.urlGenerate=i,n.normalize=a,n.join=function(e,n){""===e&&(e="."),""===n&&(n=".");var r=o(n),s=o(e);if(s&&(e=s.path||"/"),r&&!r.scheme)return s&&(r.scheme=s.scheme),i(r);if(r||n.match(t))return n;if(s&&!s.host&&!s.path)return s.host=n,i(s);var u="/"===n.charAt(0)?n:a(e.replace(/\/+$/,"")+"/"+n);return s?(s.path=u,i(s)):u},n.isAbsolute=function(e){return"/"===e.charAt(0)||!!e.match(r)},n.relative=function(e,n){""===e&&(e="."),e=e.replace(/\/$/,"");for(var r=0;0!==n.indexOf(e+"/");){var t=e.lastIndexOf("/");if(t<0)return n;if((e=e.slice(0,t)).match(/^([^\/]+:\/)?\/*$/))return n;++r}return Array(r+1).join("../")+n.substr(e.length+1)};var s=!("__proto__"in Object.create(null));function u(e){return e}function l(e){if(!e)return!1;var n=e.length;if(n<9)return!1;if(95!==e.charCodeAt(n-1)||95!==e.charCodeAt(n-2)||111!==e.charCodeAt(n-3)||116!==e.charCodeAt(n-4)||111!==e.charCodeAt(n-5)||114!==e.charCodeAt(n-6)||112!==e.charCodeAt(n-7)||95!==e.charCodeAt(n-8)||95!==e.charCodeAt(n-9))return!1;for(var r=n-10;r>=0;r--)if(36!==e.charCodeAt(r))return!1;return!0}function c(e,n){return e===n?0:e>n?1:-1}n.toSetString=s?u:function(e){return l(e)?"$"+e:e},n.fromSetString=s?u:function(e){return l(e)?e.slice(1):e},n.compareByOriginalPositions=function(e,n,r){var t=e.source-n.source;return 0!==t?t:0!=(t=e.originalLine-n.originalLine)?t:0!=(t=e.originalColumn-n.originalColumn)||r?t:0!=(t=e.generatedColumn-n.generatedColumn)?t:0!=(t=e.generatedLine-n.generatedLine)?t:e.name-n.name},n.compareByGeneratedPositionsDeflated=function(e,n,r){var t=e.generatedLine-n.generatedLine;return 0!==t?t:0!=(t=e.generatedColumn-n.generatedColumn)||r?t:0!=(t=e.source-n.source)?t:0!=(t=e.originalLine-n.originalLine)?t:0!=(t=e.originalColumn-n.originalColumn)?t:e.name-n.name},n.compareByGeneratedPositionsInflated=function(e,n){var r=e.generatedLine-n.generatedLine;return 0!==r?r:0!=(r=e.generatedColumn-n.generatedColumn)?r:0!==(r=c(e.source,n.source))?r:0!=(r=e.originalLine-n.originalLine)?r:0!=(r=e.originalColumn-n.originalColumn)?r:c(e.name,n.name)}},function(e,n){n.GREATEST_LOWER_BOUND=1,n.LEAST_UPPER_BOUND=2,n.search=function(e,r,t,o){if(0===r.length)return-1;var i=function e(r,t,o,i,a,s){var u=Math.floor((t-r)/2)+r,l=a(o,i[u],!0);return 0===l?u:l>0?t-u>1?e(u,t,o,i,a,s):s==n.LEAST_UPPER_BOUND?t1?e(r,u,o,i,a,s):s==n.LEAST_UPPER_BOUND?u:r<0?-1:r}(-1,r.length,e,r,t,o||n.GREATEST_LOWER_BOUND);if(i<0)return-1;for(;i-1>=0&&0===t(r[i],r[i-1],!0);)--i;return i}},function(e,n,r){var t=r(1),o=Object.prototype.hasOwnProperty;function i(){this._array=[],this._set=Object.create(null)}i.fromArray=function(e,n){for(var r=new i,t=0,o=e.length;t=0&&e>>=5)>0&&(n|=32),o+=t.encode(n)}while(i>0);return o},n.decode=function(e,n,r){var o,i,a,s,u=e.length,l=0,c=0;do{if(n>=u)throw new Error("Expected more digits in base 64 VLQ value.");if(-1===(i=t.decode(e.charCodeAt(n++))))throw new Error("Invalid base64 digit: "+e.charAt(n-1));o=!!(32&i),l+=(i&=31)<>1,1==(1&a)?-s:s),r.rest=n}},function(e,n){var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");n.encode=function(e){if(0<=e&&e=0),s.type){case"b":o=parseInt(o,10).toString(2);break;case"c":o=String.fromCharCode(parseInt(o,10));break;case"d":case"i":o="number"==typeof o?parseInt(o,10):NaN;break;case"j":o=JSON.stringify(o,null,s.width?parseInt(s.width):0);break;case"e":o=s.precision?parseFloat(o).toExponential(s.precision):parseFloat(o).toExponential();break;case"f":o=s.precision?parseFloat(o).toFixed(s.precision):parseFloat(o);break;case"g":o=s.precision?String(Number(o.toPrecision(s.precision))):parseFloat(o);break;case"o":o=(parseInt(o,10)>>>0).toString(8);break;case"s":o="undefined"===(o=String(o))?s.placeholder:s.precision?o.substring(0,s.precision):o;break;case"t":o=String(!!o),o=s.precision?o.substring(0,s.precision):o;break;case"T":o=Object.prototype.toString.call(o).slice(8,-1).toLowerCase(),o=s.precision?o.substring(0,s.precision):o;break;case"u":o=parseInt(o,10)>>>0;break;case"v":o=o.valueOf(),o=s.precision?o.substring(0,s.precision):o;break;case"x":o=(parseInt(o,10)>>>0).toString(16);break;case"X":o=(parseInt(o,10)>>>0).toString(16).toUpperCase()}n.json.test(s.type)?m+=o:(!n.number.test(s.type)||p&&!s.sign?g="":(g=p?"+":"-",o=o.toString().replace(n.sign,"")),l=s.pad_char?"0"===s.pad_char?"0":s.pad_char.charAt(1):" ",c=s.width-(g+o).length,u=s.width&&c>0?l.repeat(c):"",m+=s.align?g+o+u:"0"===l?g+u+o:u+g+o)}return m}(function(e){var r,t=e,o=[],i=0;for(;t;){if(null!==(r=n.text.exec(t)))o.push(r[0]);else if(null!==(r=n.modulo.exec(t)))o.push("%");else if(null!==(r=n.placeholder.exec(t))){if(r[2]){i|=1;var a=[],s=r[2],u=[];if(null===(u=n.key.exec(s)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(a.push(u[1]);""!==(s=s.substring(u[0].length));)if(null!==(u=n.key_access.exec(s)))a.push(u[1]);else{if(null===(u=n.index_access.exec(s)))throw new SyntaxError("[sprintf] failed to parse named argument key");a.push(u[1])}r[2]=a}else i|=2;if(3===i)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");o.push({placeholder:r[0],param_no:r[1],keys:r[2],sign:r[3],pad_char:r[4],align:r[5],width:r[6],precision:r[7],type:r[8]})}else if(null!==(r=n.mod.exec(t)))o.push(r[0]);else{if(null===(r=n.notplaceholder.exec(t)))throw new SyntaxError("[sprintf] unexpected placeholder");o.push(r[0])}t=t.substring(r[0].length)}return o}(e),arguments)}Object.create(null);return e.sprintf=r,e.vsprintf=function(e,n){return r.apply(null,[e].concat(n||[]))},e},v=function(n){var r,t={};function o(){var n={url:document.location.pathname||"/",application:r.application},t=[];document.documentMode&&t.push({key:"Document-Mode",value:document.documentMode}),(e.innerWidth||document.documentElement.clientWidth||document.getElementsByTagName("body")[0].clientWidth)&&t.push({key:"Browser-Width",value:e.innerWidth||document.documentElement.clientWidth||document.getElementsByTagName("body")[0].clientWidth}),(e.innerHeight||document.documentElement.clientHeight||document.getElementsByTagName("body")[0].clientHeight)&&t.push({key:"Browser-Height",value:e.innerHeight||document.documentElement.clientHeight||document.getElementsByTagName("body")[0].clientHeight}),void 0!==(screen.msOrientation||(screen.orientation||screen.mozOrientation||{}).type)&&t.push({key:"Screen-Orientation",value:(screen.msOrientation||(screen.orientation||screen.mozOrientation||{}).type).split("-")[0]}),screen.width&&t.push({key:"Screen-Width",value:screen.width}),screen.height&&t.push({key:"Screen-Height",value:screen.height}),screen.colorDepth&&t.push({key:"Color-Depth",value:screen.colorDepth}),t.push({key:"X-ELMAHIO-SEARCH-isClientside",value:"true"}),n.data=t;var o=[];return navigator.language&&o.push({key:"User-Language",value:navigator.language}),navigator.userAgent&&o.push({key:"User-Agent",value:navigator.userAgent}),document.referrer&&o.push({key:"Referer",value:document.referrer}),"https:"===document.location.protocol&&o.push({key:"HTTPS",value:"on"}),document.location.hostname&&o.push({key:"Host",value:document.location.hostname}),n.serverVariables=o,n}function s(e,n){r.debug&&("error"===e?console.log("%c ⯈ Error log: %c ✕ Not created ",c.lightCSS,c.errorCSS):"success"===e?console.log("%c ⯈ Error log: %c ✔ "+n+" at "+(new Date).toLocaleString()+" ",c.lightCSS,c.successCSS):console.log("%c ⯈ Error log: %c ✕ Not created. Title should not be undefined, null or empty ! ",c.lightCSS,c.errorCSS))}function v(e,n,r){var t=e.toString().split("\n")[0],o=new a;new Promise(function(n){var r=i.parse(e);n(Promise.all(r.map(function(e){return new Promise(function(n){function r(){n(e)}o.pinpoint(e).then(n,r).catch(r)})})))}).then(function(e){e.forEach(function(n,r){if(n.functionName)var t=n.functionName+" ";else t="";var o=" at "+t+"("+n.fileName+":"+n.lineNumber+":"+n.columnNumber+")";e[r]=o}),e.unshift(t),r.detail=e.join("\n"),n.send(JSON.stringify(r))})}var y=function(e,n,a,s,c,p){var g=e,f=n,d=s,y=p,b=c,_=1,w=h();if((null===g||null===f)&&2!==l)return console.log("Login api error");u.hasOwnProperty("apiKey")&&u.hasOwnProperty("logId")&&(g=u.apiKey,f=u.logId);var C=new XMLHttpRequest;if(C.open("POST","https://api.elmah.io/v3/messages/"+f+"?api_key="+g,!0),C.setRequestHeader("Content-type","application/json"),C.onload=function(e){4===C.readyState&&201===C.status&&a("success",C.statusText)},C.onerror=function(e){a("error",C.statusText),t.emit("error",C.status,C.statusText)},"Log"!==d){var O=y?i.parse(y):null,S={title:b,source:O&&O.length>0?O[0].fileName:null,detail:y?y.stack:null,severity:d,type:y?y.name:null,queryString:JSON.parse(JSON.stringify(w))};S=m(S,o())}else S=y;null!==r.filter&&r.filter(S)&&(_=0),1===_&&(S.title?(t.emit("message",S),y&&"Log"!==d&&"undefined"!=typeof Promise&&-1!==Promise.toString().indexOf("[native code]")?v(y,C,S):S.errorObject?(y=S.errorObject,delete S.errorObject,v(y,C,S)):C.send(JSON.stringify(S))):a("missing-title",C.statusText))},b=function(e,n,i,a,s){var c=e,p=n,g=s.message,f=s.message,v=a,y=Object.values(s.arguments),b=1,_=h();if(String(g).match(/(%d|%s)+/gi)&&y.length>1){var w=new d;y.shift(),g=w.vsprintf(g,y)}if("string"!=typeof g&&(g=g.toString()),"string"!=typeof f&&(f=f.toString()),(null===c||null===p)&&2!==l)return console.log("Login api error");u.hasOwnProperty("apiKey")&&u.hasOwnProperty("logId")&&(c=u.apiKey,p=u.logId);var C=new XMLHttpRequest;C.open("POST","https://api.elmah.io/v3/messages/"+p+"?api_key="+c,!0),C.setRequestHeader("Content-type","application/json"),C.onload=function(e){4===C.readyState&&201===C.status&&i("success",C.statusText)},C.onerror=function(e){i("error",C.statusText),t.emit("error",C.status,C.statusText)};var O={title:g,titleTemplate:f,detail:function(e,n,r){for(var t=[],o=0;o0?r[0].fileName:null,detail:n?n.stack:null,severity:"Error",type:n?n.name:null,errorObject:n};return t=m(t,o())}(e)},t.on=function(e,n,r){var t=this.e||(this.e={});return(t[e]||(t[e]=[])).push({fn:n,ctx:r}),this},t.emit=function(e){for(var n=[].slice.call(arguments,1),r=((this.e||(this.e={}))[e]||[]).slice(),t=0,o=r.length;t0?_[0].fileName:null,severity:"Error",type:d.error?d.error.name:null,queryString:JSON.parse(JSON.stringify(b))};if(d.error&&0===f(d.error.stack)&&void 0===C.detail){var O=typeof s.error,S=O.charAt(0).toUpperCase()+O.slice(1);C.detail=function(e){var n=typeof e.error;return n.charAt(0).toUpperCase()+n.slice(1)+": "+e.error+"\n at ("+e.source+":"+e.lineno+":"+e.colno+")"}(s),C.source=s.source,C.title="Uncaught "+S+": "+s.error}C=m(C,o()),null!==r.filter&&r.filter(C)&&(y=0),1===y&&(t.emit("message",C),d.error&&"object"==typeof d.error&&0!==f(d.error.stack)&&"undefined"!=typeof Promise&&-1!==Promise.toString().indexOf("[native code]")?v(d.error,w,C):w.send(JSON.stringify(C)))}else r.debug&&console.log("%c ⯈ Error log: %c 🛈 Ignoring error from external script ",c.lightCSS,c.warningCSS)}(r.apiKey,r.logId,s,d),!1},n&&"none"!==n.captureConsoleMinimumLevel){if("info"===n.captureConsoleMinimumLevel||"warn"===n.captureConsoleMinimumLevel||"error"===n.captureConsoleMinimumLevel||"debug"===n.captureConsoleMinimumLevel){var a=console.error;if(console.error=function(e){var n={message:e,arguments:arguments};b(r.apiKey,r.logId,s,"Error",n),a.apply(console,arguments)},"error"!==n.captureConsoleMinimumLevel){var d=console.warn;console.warn=function(e){var n={message:e,arguments:arguments};b(r.apiKey,r.logId,s,"Warning",n),d.apply(console,arguments)}}}if("info"===n.captureConsoleMinimumLevel||"debug"===n.captureConsoleMinimumLevel){var y=console.info;console.info=function(e){var n={message:e,arguments:arguments};b(r.apiKey,r.logId,s,"Information",n),y.apply(console,arguments)}}if("debug"===n.captureConsoleMinimumLevel){var _=console.debug;console.debug=function(e){var n={message:e,arguments:arguments};b(r.apiKey,r.logId,s,"Debug",n),_.apply(console,arguments)}}}},t.init(n),r.debug&&console.log("%c"+c.label,c.labelCSS),t};return l&&u.hasOwnProperty("apiKey")&&u.hasOwnProperty("logId")?new v:v}); diff --git a/dist/elmahio.min.js.map b/dist/elmahio.min.js.map index 020ce7b..6fe2efc 100644 --- a/dist/elmahio.min.js.map +++ b/dist/elmahio.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["elmahio.js"],"names":["root","factory","define","amd","exports","module","Elmahio","global","window","this","FIREFOX_SAFARI_STACK_REGEXP","CHROME_IE_STACK_REGEXP","SAFARI_NATIVE_CODE_REGEXP","StackFrame","_isNumber","n","isNaN","parseFloat","isFinite","_capitalize","str","charAt","toUpperCase","substring","_getter","p","booleanProps","numericProps","stringProps","props","concat","obj","Object","i","length","hasOwnProperty","undefined","prototype","getArgs","args","setArgs","v","toString","call","TypeError","getEvalOrigin","evalOrigin","setEvalOrigin","getFunctionName","join","getFileName","getLineNumber","getColumnNumber","fromString","argsStartIndex","indexOf","argsEndIndex","lastIndexOf","functionName","split","locationString","parts","exec","fileName","lineNumber","columnNumber","Boolean","j","Number","k","String","ErrorStackParser","parse","error","stacktrace","parseOpera","stack","match","parseV8OrIE","parseFFOrSafari","Error","extractLocation","urlLike","replace","filter","line","map","tokens","slice","locationParts","pop","source","functionNameRegex","matches","e","message","parseOpera9","parseOpera11","parseOpera10","lineRE","lines","result","len","push","argsRaw","functionCall","shift","StackTraceGPS","SourceMap","_xdr","url","Promise","resolve","reject","req","XMLHttpRequest","open","onerror","onreadystatechange","readyState","status","substr","responseText","send","_atob","b64str","atob","_ensureStackFrameIsLegit","stackframe","opts","sourceCache","sourceMapConsumerCache","ajax","_get","location","isDataUrl","offline","sourceMapStart","encodedSource","xhrPromise","method","then","bind","_getSourceMapConsumer","sourceMappingURL","defaultSourceRoot","sourceMapConsumerPromise","sourceMapSource","string","JSON","_parseJson","sourceRoot","SourceMapConsumer","pinpoint","getMappedLocation","mappedStackFrame","resolveMappedStackFrame","findFunctionName","guessedFunctionName","syntaxes","code","maxLines","Math","min","commentPos","index","m","_findFunctionName","defineProperty","create","_ensureSupportedEnvironment","lastSourceMappingUrl","matchSourceMappingUrl","sourceMappingUrlRegExp","_findSourceMappingURL","test","sourceMapConsumer","loc","originalPositionFor","column","mappedSource","sourceContentFor","name","_extractLocationInfoFromSourceMapSource","r","t","o","id","loaded","c","ArraySet","a","s","quickSort","u","sections","l","getArg","g","_version","normalize","isAbsolute","relative","_names","fromArray","_sources","sourcesContent","_mappings","file","generatedLine","generatedColumn","originalLine","originalColumn","_sections","generatedOffset","consumer","fromSourceMap","__generatedMappings","get","_parseMappings","__originalMappings","_charIsMappingSeparator","GENERATED_ORDER","ORIGINAL_ORDER","GREATEST_LOWER_BOUND","LEAST_UPPER_BOUND","eachMapping","_generatedMappings","_originalMappings","at","forEach","allGeneratedPositionsFor","has","_findMapping","compareByOriginalPositions","lastColumn","toArray","_sourceRoot","_generateSourcesContent","_file","h","f","d","_","C","A","y","L","decode","value","rest","compareByGeneratedPositionsDeflated","search","computeColumnSpans","lastGeneratedColumn","hasContentsOfAllSources","size","some","urlParse","scheme","path","generatedPositionFor","BasicSourceMapConsumer","constructor","sources","bias","every","add","IndexedSourceMapConsumer","arguments","auth","host","port","splice","urlGenerate","Array","charCodeAt","toSetString","fromSetString","compareByGeneratedPositionsInflated","floor","_array","_set","getOwnPropertyNames","encode","round","random","scriptFile","document","getElementsByTagName","params","query","Params","Pairs","KeyVal","key","unescape","val","parseQuery","src","paramsLength","objectLength","debugSettings","label","labelCSS","successCSS","errorCSS","warningCSS","lightCSS","defaults","apiKey","logId","debug","application","captureConsoleMinimumLevel","extend","extended","deep","merge","prop","getSearchParameters","prmstr","prmarr","tmparr","transformToAssocArray","merge_objects","obj1","obj2","obj3","attrname1","attrname2","sprintfjs","app","re","not_string","not_bool","not_type","not_primitive","number","numeric_arg","json","not_json","text","modulo","placeholder","key_access","index_access","sign","mod","notplaceholder","sprintf","parse_tree","argv","arg","ph","pad","pad_character","pad_length","is_positive","cursor","tree_length","output","keys","param_no","type","Function","parseInt","fromCharCode","NaN","stringify","width","precision","toExponential","toFixed","toPrecision","toLowerCase","valueOf","pad_char","repeat","align","sprintf_format","fmt","_fmt","arg_names","field_list","replacement_field","field_match","SyntaxError","sprintf_parse","vsprintf","apply","Constructor","options","settings","publicAPIs","getPayload","payload","pathname","payload_data","documentMode","innerWidth","documentElement","clientWidth","innerHeight","clientHeight","screen","msOrientation","orientation","mozOrientation","height","colorDepth","data","payload_serverVariables","navigator","language","userAgent","referrer","protocol","hostname","serverVariables","confirmResponse","response","console","log","Date","toLocaleString","stackGPS","xhr","jsonData","errorStack","gps","stackframes","all","sf","resolveOriginal","newFrames","stackFrame","fn","stackString","unshift","detail","sendManualPayload","callback","logType","messageLog","errorLog","api_key","log_id","queryParams","setRequestHeader","onload","statusText","emit","title","severity","queryString","errorObject","sendPayloadFromConsole","messageTemplate","values","sprintfJS","titleTemplate","manipulateStack","msg","verbose","information","warning","fatal","sendPrefilledLogMessage","on","ctx","evtArr","init","lineno","colno","typeOF","typeOFCapitalized","sendPayload","_error","errMessage","_warning","warn","warnMessage","_info","info","infoMessage","_debug","debugMessage"],"mappings":";;;;CAIA,SAAUA,EAAMC,GACQ,mBAAXC,QAAyBA,OAAOC,IACzCD,OAAO,GAAI,WACT,OAAOD,EAAQD,KAEW,iBAAZI,QAChBC,OAAOD,QAAUH,EAAQD,GAEzBA,EAAKM,QAAUL,EAAQD,GAR3B,CAUqB,oBAAXO,OAAyBA,OAA2B,oBAAXC,OAAyBA,OAASC,KAAM,SAASD,GAClG,aACA,IAiHME,EACAC,EACAC,EAnHFC,EAAa,WAGf,SAASC,EAAUC,GACjB,OAAQC,MAAMC,WAAWF,KAAOG,SAASH,GAG3C,SAASI,EAAYC,GACnB,OAAOA,EAAIC,OAAO,GAAGC,cAAgBF,EAAIG,UAAU,GAGrD,SAASC,EAAQC,GACf,OAAO,WACL,OAAOhB,KAAKgB,IAGhB,IAAIC,EAAe,CAAC,gBAAiB,SAAU,WAAY,cACvDC,EAAe,CAAC,eAAgB,cAChCC,EAAc,CAAC,WAAY,eAAgB,UAE3CC,EAAQH,EAAaI,OAAOH,EAAcC,EAD7B,CAAC,SAGlB,SAASf,EAAWkB,GAClB,GAAIA,aAAeC,OACjB,IAAK,IAAIC,EAAI,EAAGA,EAAIJ,EAAMK,OAAQD,IAC5BF,EAAII,eAAeN,EAAMI,UAAyBG,IAAlBL,EAAIF,EAAMI,KAC5CxB,KAAK,MAAQU,EAAYU,EAAMI,KAAKF,EAAIF,EAAMI,KAKtDpB,EAAWwB,UAAY,CACrBC,QAAS,WACP,OAAO7B,KAAK8B,MAEdC,QAAS,SAASC,GAChB,GAA0C,mBAAtCT,OAAOK,UAAUK,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AAO6G,EAAiB,cAAeyB,GACxFsC,EAAM7F,MAAMgC,QAASzJ,YAGzB,GAA2C,UAAvC2H,EAAQ9E,2BAAwC,CAClD,IAAI4K,EAAShE,QAAQ9G,MACrB8G,QAAQ9G,MAAQ,SAAS+K,GACvB,IAAI1C,EAAW,CACb9V,QAAWwY,EACX1N,UAAaA,WAEf4L,EAAuBhE,EAASnF,OAAQmF,EAASlF,MAAO6G,EAAiB,QAASyB,GAClFyC,EAAOhG,MAAMgC,QAASzJ,eAK9B6H,EAAW8E,KAAKhF,GACZC,EAASjF,OACX8G,QAAQC,IAAI,KAAOzH,EAAcC,MAAOD,EAAcE,UAEjD0F,GAET,OAAI9F,GAAgBV,EAAO/P,eAAe,WAAa+P,EAAO/P,eAAe,SACpE,IAAIoW,EAEJA","sourcesContent":["/*!\r\n * elmah.io Javascript Logger - version 3.4.0\r\n * (c) 2018 elmah.io, Apache 2.0 License, https://elmah.io\r\n */\r\n\r\n(function (root, factory) {\r\n if (typeof define === 'function' && define.amd) {\r\n define([], function () {\r\n return factory(root);\r\n });\r\n } else if (typeof exports === 'object') {\r\n module.exports = factory(root);\r\n } else {\r\n root.Elmahio = factory(root);\r\n }\r\n})(typeof global !== 'undefined' ? global : typeof window !== 'undefined' ? window : this, function (window) {\r\n\r\n 'use strict';\r\n\r\n //\r\n // ==== STACKFRAME ====\r\n //\r\n\r\n var StackFrame = (function () {\r\n \"use strict\";\r\n function _isNumber(n) {\r\n return !isNaN(parseFloat(n)) && isFinite(n);\r\n }\r\n function _capitalize(str) {\r\n return str.charAt(0).toUpperCase() + str.substring(1);\r\n }\r\n function _getter(p) {\r\n return function () {\r\n return this[p];\r\n };\r\n }\r\n var booleanProps = [\"isConstructor\", \"isEval\", \"isNative\", \"isToplevel\"];\r\n var numericProps = [\"columnNumber\", \"lineNumber\"];\r\n var stringProps = [\"fileName\", \"functionName\", \"source\"];\r\n var arrayProps = [\"args\"];\r\n var props = booleanProps.concat(numericProps, stringProps, arrayProps);\r\n function StackFrame(obj) {\r\n if (obj instanceof Object) {\r\n for (var i = 0; i < props.length; i++) {\r\n if (obj.hasOwnProperty(props[i]) && obj[props[i]] !== undefined) {\r\n this[\"set\" + _capitalize(props[i])](obj[props[i]]);\r\n }\r\n }\r\n }\r\n }\r\n StackFrame.prototype = {\r\n getArgs: function () {\r\n return this.args;\r\n },\r\n setArgs: function (v) {\r\n if (Object.prototype.toString.call(v) !== \"[object Array]\") {\r\n throw new TypeError(\"Args must be an Array\");\r\n }\r\n this.args = v;\r\n },\r\n getEvalOrigin: function () {\r\n return this.evalOrigin;\r\n },\r\n setEvalOrigin: function (v) {\r\n if (v instanceof StackFrame) {\r\n this.evalOrigin = v;\r\n } else if (v instanceof Object) {\r\n this.evalOrigin = new StackFrame(v);\r\n } else {\r\n throw new TypeError(\"Eval Origin must be an Object or StackFrame\");\r\n }\r\n },\r\n toString: function () {\r\n var functionName = this.getFunctionName() || \"{anonymous}\";\r\n var args = \"(\" + (this.getArgs() || []).join(\",\") + \")\";\r\n var fileName = this.getFileName() ? \"@\" + this.getFileName() : \"\";\r\n var lineNumber = _isNumber(this.getLineNumber()) ? \":\" + this.getLineNumber() : \"\";\r\n var columnNumber = _isNumber(this.getColumnNumber()) ? \":\" + this.getColumnNumber() : \"\";\r\n return functionName + args + fileName + lineNumber + columnNumber;\r\n }\r\n };\r\n StackFrame.fromString = function StackFrame$$fromString(str) {\r\n var argsStartIndex = str.indexOf(\"(\");\r\n var argsEndIndex = str.lastIndexOf(\")\");\r\n var functionName = str.substring(0, argsStartIndex);\r\n var args = str.substring(argsStartIndex + 1, argsEndIndex).split(\",\");\r\n var locationString = str.substring(argsEndIndex + 1);\r\n if (locationString.indexOf(\"@\") === 0) {\r\n var parts = /@(.+?)(?::(\\d+))?(?::(\\d+))?$/.exec(locationString, \"\");\r\n var fileName = parts[1];\r\n var lineNumber = parts[2];\r\n var columnNumber = parts[3];\r\n }\r\n return new StackFrame({\r\n functionName: functionName,\r\n args: args || undefined,\r\n fileName: fileName,\r\n lineNumber: lineNumber || undefined,\r\n columnNumber: columnNumber || undefined\r\n });\r\n };\r\n for (var i = 0; i < booleanProps.length; i++) {\r\n StackFrame.prototype[\"get\" + _capitalize(booleanProps[i])] = _getter(booleanProps[i]);\r\n StackFrame.prototype[\"set\" + _capitalize(booleanProps[i])] = function (p) {\r\n return function (v) {\r\n this[p] = Boolean(v);\r\n };\r\n }(booleanProps[i]);\r\n }\r\n for (var j = 0; j < numericProps.length; j++) {\r\n StackFrame.prototype[\"get\" + _capitalize(numericProps[j])] = _getter(numericProps[j]);\r\n StackFrame.prototype[\"set\" + _capitalize(numericProps[j])] = function (p) {\r\n return function (v) {\r\n if (!_isNumber(v)) {\r\n throw new TypeError(p + \" must be a Number\");\r\n }\r\n this[p] = Number(v);\r\n };\r\n }(numericProps[j]);\r\n }\r\n for (var k = 0; k < stringProps.length; k++) {\r\n StackFrame.prototype[\"get\" + _capitalize(stringProps[k])] = _getter(stringProps[k]);\r\n StackFrame.prototype[\"set\" + _capitalize(stringProps[k])] = function (p) {\r\n return function (v) {\r\n this[p] = String(v);\r\n };\r\n }(stringProps[k]);\r\n }\r\n return StackFrame;\r\n })();\r\n\r\n //\r\n // ==== ERROR STACK PARSER ====\r\n //\r\n\r\n var ErrorStackParser = (function () {\r\n \"use strict\";\r\n var FIREFOX_SAFARI_STACK_REGEXP = /(^|@)\\S+\\:\\d+/;\r\n var CHROME_IE_STACK_REGEXP = /^\\s*at .*(\\S+\\:\\d+|\\(native\\))/m;\r\n var SAFARI_NATIVE_CODE_REGEXP = /^(eval@)?(\\[native code\\])?$/;\r\n return {\r\n /**\r\n * Given an Error object, extract the most information from it.\r\n *\r\n * @param {Error} error object\r\n * @return {Array} of StackFrames\r\n */\r\n parse: function ErrorStackParser$$parse(error) {\r\n if (typeof error.stacktrace !== \"undefined\" || typeof error[\"opera#sourceloc\"] !== \"undefined\") {\r\n return this.parseOpera(error);\r\n } else if (error.stack && error.stack.match(CHROME_IE_STACK_REGEXP)) {\r\n return this.parseV8OrIE(error);\r\n } else if (error.stack) {\r\n return this.parseFFOrSafari(error);\r\n } else {\r\n throw new Error(\"Cannot parse given Error object\");\r\n }\r\n },\r\n // Separate line and column numbers from a string of the form: (URI:Line:Column)\r\n extractLocation: function ErrorStackParser$$extractLocation(urlLike) {\r\n // Fail-fast but return locations like \"(native)\"\r\n if (urlLike.indexOf(\":\") === -1) {\r\n return [urlLike];\r\n }\r\n var regExp = /(.+?)(?:\\:(\\d+))?(?:\\:(\\d+))?$/;\r\n var parts = regExp.exec(urlLike.replace(/[\\(\\)]/g, \"\"));\r\n return [parts[1], parts[2] || undefined, parts[3] || undefined];\r\n },\r\n parseV8OrIE: function ErrorStackParser$$parseV8OrIE(error) {\r\n var filtered = error.stack.split(\"\\n\").filter(function (line) {\r\n return !!line.match(CHROME_IE_STACK_REGEXP);\r\n }, this);\r\n return filtered.map(function (line) {\r\n if (line.indexOf(\"(eval \") > -1) {\r\n // Throw away eval information until we implement stacktrace.js/stackframe#8\r\n line = line.replace(/eval code/g, \"eval\").replace(/(\\(eval at [^\\()]*)|(\\)\\,.*$)/g, \"\");\r\n }\r\n var tokens = line.replace(/^\\s+/, \"\").replace(/\\(eval code/g, \"(\").split(/\\s+/).slice(1);\r\n var locationParts = this.extractLocation(tokens.pop());\r\n var functionName = tokens.join(\" \") || undefined;\r\n var fileName = [\"eval\", \"\"].indexOf(locationParts[0]) > -1 ? undefined : locationParts[0];\r\n return new StackFrame({\r\n functionName: functionName,\r\n fileName: fileName,\r\n lineNumber: locationParts[1],\r\n columnNumber: locationParts[2],\r\n source: line\r\n });\r\n }, this);\r\n },\r\n parseFFOrSafari: function ErrorStackParser$$parseFFOrSafari(error) {\r\n var filtered = error.stack.split(\"\\n\").filter(function (line) {\r\n return !line.match(SAFARI_NATIVE_CODE_REGEXP);\r\n }, this);\r\n return filtered.map(function (line) {\r\n // Throw away eval information until we implement stacktrace.js/stackframe#8\r\n if (line.indexOf(\" > eval\") > -1) {\r\n line = line.replace(/ line (\\d+)(?: > eval line \\d+)* > eval\\:\\d+\\:\\d+/g, \":$1\");\r\n }\r\n if (line.indexOf(\"@\") === -1 && line.indexOf(\":\") === -1) {\r\n // Safari eval frames only have function names and nothing else\r\n return new StackFrame({\r\n functionName: line\r\n });\r\n } else {\r\n var functionNameRegex = /((.*\".+\"[^@]*)?[^@]*)(?:@)/;\r\n var matches = line.match(functionNameRegex);\r\n var functionName = matches && matches[1] ? matches[1] : undefined;\r\n var locationParts = this.extractLocation(line.replace(functionNameRegex, \"\"));\r\n return new StackFrame({\r\n functionName: functionName,\r\n fileName: locationParts[0],\r\n lineNumber: locationParts[1],\r\n columnNumber: locationParts[2],\r\n source: line\r\n });\r\n }\r\n }, this);\r\n },\r\n parseOpera: function ErrorStackParser$$parseOpera(e) {\r\n if (!e.stacktrace || e.message.indexOf(\"\\n\") > -1 && e.message.split(\"\\n\").length > e.stacktrace.split(\"\\n\").length) {\r\n return this.parseOpera9(e);\r\n } else if (!e.stack) {\r\n return this.parseOpera10(e);\r\n } else {\r\n return this.parseOpera11(e);\r\n }\r\n },\r\n parseOpera9: function ErrorStackParser$$parseOpera9(e) {\r\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)/i;\r\n var lines = e.message.split(\"\\n\");\r\n var result = [];\r\n for (var i = 2, len = lines.length; i < len; i += 2) {\r\n var match = lineRE.exec(lines[i]);\r\n if (match) {\r\n result.push(new StackFrame({\r\n fileName: match[2],\r\n lineNumber: match[1],\r\n source: lines[i]\r\n }));\r\n }\r\n }\r\n return result;\r\n },\r\n parseOpera10: function ErrorStackParser$$parseOpera10(e) {\r\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)(?:: In function (\\S+))?$/i;\r\n var lines = e.stacktrace.split(\"\\n\");\r\n var result = [];\r\n for (var i = 0, len = lines.length; i < len; i += 2) {\r\n var match = lineRE.exec(lines[i]);\r\n if (match) {\r\n result.push(new StackFrame({\r\n functionName: match[3] || undefined,\r\n fileName: match[2],\r\n lineNumber: match[1],\r\n source: lines[i]\r\n }));\r\n }\r\n }\r\n return result;\r\n },\r\n // Opera 10.65+ Error.stack very similar to FF/Safari\r\n parseOpera11: function ErrorStackParser$$parseOpera11(error) {\r\n var filtered = error.stack.split(\"\\n\").filter(function (line) {\r\n return !!line.match(FIREFOX_SAFARI_STACK_REGEXP) && !line.match(/^Error created at/);\r\n }, this);\r\n return filtered.map(function (line) {\r\n var tokens = line.split(\"@\");\r\n var locationParts = this.extractLocation(tokens.pop());\r\n var functionCall = tokens.shift() || \"\";\r\n var functionName = functionCall.replace(//, \"$2\").replace(/\\([^\\)]*\\)/g, \"\") || undefined;\r\n var argsRaw;\r\n if (functionCall.match(/\\(([^\\)]*)\\)/)) {\r\n argsRaw = functionCall.replace(/^[^\\(]+\\(([^\\)]*)\\)$/, \"$1\");\r\n }\r\n var args = argsRaw === undefined || argsRaw === \"[arguments not available]\" ? undefined : argsRaw.split(\",\");\r\n return new StackFrame({\r\n functionName: functionName,\r\n args: args,\r\n fileName: locationParts[0],\r\n lineNumber: locationParts[1],\r\n columnNumber: locationParts[2],\r\n source: line\r\n });\r\n }, this);\r\n }\r\n };\r\n })();\r\n\r\n //\r\n // ==== STACKTRACE-GPS ====\r\n //\r\n\r\n var SourceMap = function(e){var n={};function r(t){if(n[t])return n[t].exports;var o=n[t]={exports:{},id:t,loaded:!1};return e[t].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}return r.m=e,r.c=n,r.p=\"\",r(0)}([function(e,n,r){var t=r(1),o=r(2),i=r(3).ArraySet,a=r(4),s=r(6).quickSort;function u(e){var n=e;return\"string\"==typeof e&&(n=JSON.parse(e.replace(/^\\)\\]\\}'/,\"\"))),null!=n.sections?new c(n):new l(n)}function l(e){var n=e;\"string\"==typeof e&&(n=JSON.parse(e.replace(/^\\)\\]\\}'/,\"\")));var r=t.getArg(n,\"version\"),o=t.getArg(n,\"sources\"),a=t.getArg(n,\"names\",[]),s=t.getArg(n,\"sourceRoot\",null),u=t.getArg(n,\"sourcesContent\",null),l=t.getArg(n,\"mappings\"),g=t.getArg(n,\"file\",null);if(r!=this._version)throw new Error(\"Unsupported version: \"+r);o=o.map(String).map(t.normalize).map(function(e){return s&&t.isAbsolute(s)&&t.isAbsolute(e)?t.relative(s,e):e}),this._names=i.fromArray(a.map(String),!0),this._sources=i.fromArray(o,!0),this.sourceRoot=s,this.sourcesContent=u,this._mappings=l,this.file=g}function g(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}function c(e){var n=e;\"string\"==typeof e&&(n=JSON.parse(e.replace(/^\\)\\]\\}'/,\"\")));var r=t.getArg(n,\"version\"),o=t.getArg(n,\"sections\");if(r!=this._version)throw new Error(\"Unsupported version: \"+r);this._sources=new i,this._names=new i;var a={line:-1,column:0};this._sections=o.map(function(e){if(e.url)throw new Error(\"Support for url field in sections not implemented.\");var n=t.getArg(e,\"offset\"),r=t.getArg(n,\"line\"),o=t.getArg(n,\"column\");if(r=0){var s=this._originalMappings[a];if(void 0===e.column)for(var u=s.originalLine;s&&s.originalLine===u;)i.push({line:t.getArg(s,\"generatedLine\",null),column:t.getArg(s,\"generatedColumn\",null),lastColumn:t.getArg(s,\"lastGeneratedColumn\",null)}),s=this._originalMappings[++a];else for(var l=s.originalColumn;s&&s.originalLine===n&&s.originalColumn==l;)i.push({line:t.getArg(s,\"generatedLine\",null),column:t.getArg(s,\"generatedColumn\",null),lastColumn:t.getArg(s,\"lastGeneratedColumn\",null)}),s=this._originalMappings[++a]}return i},n.SourceMapConsumer=u,l.prototype=Object.create(u.prototype),l.prototype.consumer=u,l.fromSourceMap=function(e){var n=Object.create(l.prototype),r=n._names=i.fromArray(e._names.toArray(),!0),o=n._sources=i.fromArray(e._sources.toArray(),!0);n.sourceRoot=e._sourceRoot,n.sourcesContent=e._generateSourcesContent(n._sources.toArray(),n.sourceRoot),n.file=e._file;for(var a=e._mappings.toArray().slice(),u=n.__generatedMappings=[],c=n.__originalMappings=[],p=0,h=a.length;p1&&(r.source=d+i[1],d+=i[1],r.originalLine=h+i[2],h=r.originalLine,r.originalLine+=1,r.originalColumn=f+i[3],f=r.originalColumn,i.length>4&&(r.name=m+i[4],m+=i[4])),L.push(r),\"number\"==typeof r.originalLine&&y.push(r)}s(L,t.compareByGeneratedPositionsDeflated),this.__generatedMappings=L,s(y,t.compareByOriginalPositions),this.__originalMappings=y},l.prototype._findMapping=function(e,n,r,t,i,a){if(e[r]<=0)throw new TypeError(\"Line must be greater than or equal to 1, got \"+e[r]);if(e[t]<0)throw new TypeError(\"Column must be greater than or equal to 0, got \"+e[t]);return o.search(e,n,i,a)},l.prototype.computeColumnSpans=function(){for(var e=0;e=0){var o=this._generatedMappings[r];if(o.generatedLine===n.generatedLine){var i=t.getArg(o,\"source\",null);null!==i&&(i=this._sources.at(i),null!=this.sourceRoot&&(i=t.join(this.sourceRoot,i)));var a=t.getArg(o,\"name\",null);return null!==a&&(a=this._names.at(a)),{source:i,line:t.getArg(o,\"originalLine\",null),column:t.getArg(o,\"originalColumn\",null),name:a}}}return{source:null,line:null,column:null,name:null}},l.prototype.hasContentsOfAllSources=function(){return!!this.sourcesContent&&(this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return null==e}))},l.prototype.sourceContentFor=function(e,n){if(!this.sourcesContent)return null;if(null!=this.sourceRoot&&(e=t.relative(this.sourceRoot,e)),this._sources.has(e))return this.sourcesContent[this._sources.indexOf(e)];var r;if(null!=this.sourceRoot&&(r=t.urlParse(this.sourceRoot))){var o=e.replace(/^file:\\/\\//,\"\");if(\"file\"==r.scheme&&this._sources.has(o))return this.sourcesContent[this._sources.indexOf(o)];if((!r.path||\"/\"==r.path)&&this._sources.has(\"/\"+e))return this.sourcesContent[this._sources.indexOf(\"/\"+e)]}if(n)return null;throw new Error('\"'+e+'\" is not in the SourceMap.')},l.prototype.generatedPositionFor=function(e){var n=t.getArg(e,\"source\");if(null!=this.sourceRoot&&(n=t.relative(this.sourceRoot,n)),!this._sources.has(n))return{line:null,column:null,lastColumn:null};var r={source:n=this._sources.indexOf(n),originalLine:t.getArg(e,\"line\"),originalColumn:t.getArg(e,\"column\")},o=this._findMapping(r,this._originalMappings,\"originalLine\",\"originalColumn\",t.compareByOriginalPositions,t.getArg(e,\"bias\",u.GREATEST_LOWER_BOUND));if(o>=0){var i=this._originalMappings[o];if(i.source===r.source)return{line:t.getArg(i,\"generatedLine\",null),column:t.getArg(i,\"generatedColumn\",null),lastColumn:t.getArg(i,\"lastGeneratedColumn\",null)}}return{line:null,column:null,lastColumn:null}},n.BasicSourceMapConsumer=l,c.prototype=Object.create(u.prototype),c.prototype.constructor=u,c.prototype._version=3,Object.defineProperty(c.prototype,\"sources\",{get:function(){for(var e=[],n=0;n=0;g--)\".\"===(a=u[g])?u.splice(g,1):\"..\"===a?l++:l>0&&(\"\"===a?(u.splice(g+1,l),l=0):(u.splice(g,2),l--));return\"\"===(r=u.join(\"/\"))&&(r=s?\"/\":\".\"),t?(t.path=r,i(t)):r}n.urlParse=o,n.urlGenerate=i,n.normalize=a,n.join=function(e,n){\"\"===e&&(e=\".\"),\"\"===n&&(n=\".\");var r=o(n),s=o(e);if(s&&(e=s.path||\"/\"),r&&!r.scheme)return s&&(r.scheme=s.scheme),i(r);if(r||n.match(t))return n;if(s&&!s.host&&!s.path)return s.host=n,i(s);var u=\"/\"===n.charAt(0)?n:a(e.replace(/\\/+$/,\"\")+\"/\"+n);return s?(s.path=u,i(s)):u},n.isAbsolute=function(e){return\"/\"===e.charAt(0)||!!e.match(r)},n.relative=function(e,n){\"\"===e&&(e=\".\"),e=e.replace(/\\/$/,\"\");for(var r=0;0!==n.indexOf(e+\"/\");){var t=e.lastIndexOf(\"/\");if(t<0)return n;if((e=e.slice(0,t)).match(/^([^\\/]+:\\/)?\\/*$/))return n;++r}return Array(r+1).join(\"../\")+n.substr(e.length+1)};var s=!(\"__proto__\"in Object.create(null));function u(e){return e}function l(e){if(!e)return!1;var n=e.length;if(n<9)return!1;if(95!==e.charCodeAt(n-1)||95!==e.charCodeAt(n-2)||111!==e.charCodeAt(n-3)||116!==e.charCodeAt(n-4)||111!==e.charCodeAt(n-5)||114!==e.charCodeAt(n-6)||112!==e.charCodeAt(n-7)||95!==e.charCodeAt(n-8)||95!==e.charCodeAt(n-9))return!1;for(var r=n-10;r>=0;r--)if(36!==e.charCodeAt(r))return!1;return!0}function g(e,n){return e===n?0:e>n?1:-1}n.toSetString=s?u:function(e){return l(e)?\"$\"+e:e},n.fromSetString=s?u:function(e){return l(e)?e.slice(1):e},n.compareByOriginalPositions=function(e,n,r){var t=e.source-n.source;return 0!==t?t:0!=(t=e.originalLine-n.originalLine)?t:0!=(t=e.originalColumn-n.originalColumn)||r?t:0!=(t=e.generatedColumn-n.generatedColumn)?t:0!=(t=e.generatedLine-n.generatedLine)?t:e.name-n.name},n.compareByGeneratedPositionsDeflated=function(e,n,r){var t=e.generatedLine-n.generatedLine;return 0!==t?t:0!=(t=e.generatedColumn-n.generatedColumn)||r?t:0!=(t=e.source-n.source)?t:0!=(t=e.originalLine-n.originalLine)?t:0!=(t=e.originalColumn-n.originalColumn)?t:e.name-n.name},n.compareByGeneratedPositionsInflated=function(e,n){var r=e.generatedLine-n.generatedLine;return 0!==r?r:0!=(r=e.generatedColumn-n.generatedColumn)?r:0!==(r=g(e.source,n.source))?r:0!=(r=e.originalLine-n.originalLine)?r:0!=(r=e.originalColumn-n.originalColumn)?r:g(e.name,n.name)}},function(e,n){n.GREATEST_LOWER_BOUND=1,n.LEAST_UPPER_BOUND=2,n.search=function(e,r,t,o){if(0===r.length)return-1;var i=function e(r,t,o,i,a,s){var u=Math.floor((t-r)/2)+r,l=a(o,i[u],!0);return 0===l?u:l>0?t-u>1?e(u,t,o,i,a,s):s==n.LEAST_UPPER_BOUND?t1?e(r,u,o,i,a,s):s==n.LEAST_UPPER_BOUND?u:r<0?-1:r}(-1,r.length,e,r,t,o||n.GREATEST_LOWER_BOUND);if(i<0)return-1;for(;i-1>=0&&0===t(r[i],r[i-1],!0);)--i;return i}},function(e,n,r){var t=r(1),o=Object.prototype.hasOwnProperty;function i(){this._array=[],this._set=Object.create(null)}i.fromArray=function(e,n){for(var r=new i,t=0,o=e.length;t=0&&e>>=5)>0&&(n|=32),o+=t.encode(n)}while(i>0);return o},n.decode=function(e,n,r){var o,i,a,s,u=e.length,l=0,g=0;do{if(n>=u)throw new Error(\"Expected more digits in base 64 VLQ value.\");if(-1===(i=t.decode(e.charCodeAt(n++))))throw new Error(\"Invalid base64 digit: \"+e.charAt(n-1));o=!!(32&i),l+=(i&=31)<>1,1==(1&a)?-s:s),r.rest=n}},function(e,n){var r=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\".split(\"\");n.encode=function(e){if(0<=e&&e= 200 && req.status < 300 || url.substr(0, 7) === \"file://\" && req.responseText) {\r\n resolve(req.responseText);\r\n } else {\r\n reject(new Error(\"HTTP status: \" + req.status + \" retrieving \" + url));\r\n }\r\n }\r\n };\r\n req.send();\r\n });\r\n }\r\n /**\r\n * Convert a Base64-encoded string into its original representation.\r\n * Used for inline sourcemaps.\r\n *\r\n * @param {String} b64str Base-64 encoded string\r\n * @returns {String} original representation of the base64-encoded string.\r\n */\r\n function _atob(b64str) {\r\n if (typeof window !== \"undefined\" && window.atob) {\r\n return window.atob(b64str);\r\n } else {\r\n throw new Error(\"You must supply a polyfill for window.atob in this environment\");\r\n }\r\n }\r\n function _parseJson(string) {\r\n if (typeof JSON !== \"undefined\" && JSON.parse) {\r\n return JSON.parse(string);\r\n } else {\r\n throw new Error(\"You must supply a polyfill for JSON.parse in this environment\");\r\n }\r\n }\r\n function _findFunctionName(source, lineNumber) {\r\n var syntaxes = [ // {name} = function ({args}) TODO args capture\r\n /['\"]?([$_A-Za-z][$_A-Za-z0-9]*)['\"]?\\s*[:=]\\s*function\\b/, // function {name}({args}) m[1]=name m[2]=args\r\n /function\\s+([^('\"`]*?)\\s*\\(([^)]*)\\)/, // {name} = eval()\r\n /['\"]?([$_A-Za-z][$_A-Za-z0-9]*)['\"]?\\s*[:=]\\s*(?:eval|new Function)\\b/, // fn_name() {\r\n /\\b(?!(?:if|for|switch|while|with|catch)\\b)(?:(?:static)\\s+)?(\\S+)\\s*\\(.*?\\)\\s*\\{/, // {name} = () => {\r\n /['\"]?([$_A-Za-z][$_A-Za-z0-9]*)['\"]?\\s*[:=]\\s*\\(.*?\\)\\s*=>/];\r\n var lines = source.split(\"\\n\");\r\n // Walk backwards in the source lines until we find the line which matches one of the patterns above\r\n var code = \"\";\r\n var maxLines = Math.min(lineNumber, 20);\r\n for (var i = 0; i < maxLines; ++i) {\r\n // lineNo is 1-based, source[] is 0-based\r\n var line = lines[lineNumber - i - 1];\r\n var commentPos = line.indexOf(\"//\");\r\n if (commentPos >= 0) {\r\n line = line.substr(0, commentPos);\r\n }\r\n if (line) {\r\n code = line + code;\r\n var len = syntaxes.length;\r\n for (var index = 0; index < len; index++) {\r\n var m = syntaxes[index].exec(code);\r\n if (m && m[1]) {\r\n return m[1];\r\n }\r\n }\r\n }\r\n }\r\n return undefined;\r\n }\r\n function _ensureSupportedEnvironment() {\r\n if (typeof Object.defineProperty !== \"function\" || typeof Object.create !== \"function\") {\r\n throw new Error(\"Unable to consume source maps in older browsers\");\r\n }\r\n }\r\n function _ensureStackFrameIsLegit(stackframe) {\r\n if (typeof stackframe !== \"object\") {\r\n throw new TypeError(\"Given StackFrame is not an object\");\r\n } else if (typeof stackframe.fileName !== \"string\") {\r\n throw new TypeError(\"Given file name is not a String\");\r\n } else if (typeof stackframe.lineNumber !== \"number\" || stackframe.lineNumber % 1 !== 0 || stackframe.lineNumber < 1) {\r\n throw new TypeError(\"Given line number must be a positive integer\");\r\n } else if (typeof stackframe.columnNumber !== \"number\" || stackframe.columnNumber % 1 !== 0 || stackframe.columnNumber < 0) {\r\n throw new TypeError(\"Given column number must be a non-negative integer\");\r\n }\r\n return true;\r\n }\r\n function _findSourceMappingURL(source) {\r\n var sourceMappingUrlRegExp = /\\/\\/[#@] ?sourceMappingURL=([^\\s'\"]+)\\s*$/gm;\r\n var lastSourceMappingUrl;\r\n var matchSourceMappingUrl;\r\n while (matchSourceMappingUrl = sourceMappingUrlRegExp.exec(source)) {\r\n // jshint ignore:line\r\n lastSourceMappingUrl = matchSourceMappingUrl[1];\r\n }\r\n if (lastSourceMappingUrl) {\r\n return lastSourceMappingUrl;\r\n } else {\r\n throw new Error(\"sourceMappingURL not found\");\r\n }\r\n }\r\n function _extractLocationInfoFromSourceMapSource(stackframe, sourceMapConsumer, sourceCache) {\r\n return new Promise(function (resolve, reject) {\r\n var loc = sourceMapConsumer.originalPositionFor({\r\n line: stackframe.lineNumber,\r\n column: stackframe.columnNumber\r\n });\r\n if (loc.source) {\r\n // cache mapped sources\r\n var mappedSource = sourceMapConsumer.sourceContentFor(loc.source);\r\n if (mappedSource) {\r\n sourceCache[loc.source] = mappedSource;\r\n }\r\n resolve(// given stackframe and source location, update stackframe\r\n new StackFrame({\r\n functionName: loc.name || stackframe.functionName,\r\n args: stackframe.args,\r\n fileName: loc.source,\r\n lineNumber: loc.line,\r\n columnNumber: loc.column\r\n }));\r\n } else {\r\n reject(new Error(\"Could not get original source for given stackframe and source map\"));\r\n }\r\n });\r\n }\r\n /**\r\n * @constructor\r\n * @param {Object} opts\r\n * opts.sourceCache = {url: \"Source String\"} => preload source cache\r\n * opts.sourceMapConsumerCache = {/path/file.js.map: SourceMapConsumer}\r\n * opts.offline = True to prevent network requests.\r\n * Best effort without sources or source maps.\r\n * opts.ajax = Promise returning function to make X-Domain requests\r\n */\r\n return function StackTraceGPS(opts) {\r\n if (!(this instanceof StackTraceGPS)) {\r\n return new StackTraceGPS(opts);\r\n }\r\n opts = opts || {};\r\n this.sourceCache = opts.sourceCache || {};\r\n this.sourceMapConsumerCache = opts.sourceMapConsumerCache || {};\r\n this.ajax = opts.ajax || _xdr;\r\n this._atob = opts.atob || _atob;\r\n\r\n this._get = function _get(location) {\r\n return new Promise(function (resolve, reject) {\r\n var isDataUrl = location.substr(0, 5) === \"data:\";\r\n if (this.sourceCache[location]) {\r\n resolve(this.sourceCache[location]);\r\n } else if (opts.offline && !isDataUrl) {\r\n reject(new Error(\"Cannot make network requests in offline mode\"));\r\n } else {\r\n if (isDataUrl) {\r\n // data URLs can have parameters.\r\n // see http://tools.ietf.org/html/rfc2397\r\n var supportedEncodingRegexp = /^data:application\\/json;([\\w=:\"-]+;)*base64,/;\r\n var match = location.match(supportedEncodingRegexp);\r\n if (match) {\r\n var sourceMapStart = match[0].length;\r\n var encodedSource = location.substr(sourceMapStart);\r\n var source = this._atob(encodedSource);\r\n this.sourceCache[location] = source;\r\n resolve(source);\r\n } else {\r\n reject(new Error(\"The encoding of the inline sourcemap is not supported\"));\r\n }\r\n } else {\r\n var xhrPromise = this.ajax(location, {\r\n method: \"get\"\r\n });\r\n // Cache the Promise to prevent duplicate in-flight requests\r\n this.sourceCache[location] = xhrPromise;\r\n xhrPromise.then(resolve, reject);\r\n }\r\n }\r\n }.bind(this));\r\n };\r\n /**\r\n * Creating SourceMapConsumers is expensive, so this wraps the creation of a\r\n * SourceMapConsumer in a per-instance cache.\r\n *\r\n * @param {String} sourceMappingURL = URL to fetch source map from\r\n * @param {String} defaultSourceRoot = Default source root for source map if undefined\r\n * @returns {Promise} that resolves a SourceMapConsumer\r\n */\r\n this._getSourceMapConsumer = function _getSourceMapConsumer(sourceMappingURL, defaultSourceRoot) {\r\n return new Promise(function (resolve, reject) {\r\n if (this.sourceMapConsumerCache[sourceMappingURL]) {\r\n resolve(this.sourceMapConsumerCache[sourceMappingURL]);\r\n } else {\r\n var sourceMapConsumerPromise = new Promise(function (resolve, reject) {\r\n return this._get(sourceMappingURL).then(function (sourceMapSource) {\r\n if (typeof sourceMapSource === \"string\") {\r\n sourceMapSource = _parseJson(sourceMapSource.replace(/^\\)\\]\\}'/, \"\"));\r\n }\r\n if (typeof sourceMapSource.sourceRoot === \"undefined\") {\r\n sourceMapSource.sourceRoot = defaultSourceRoot;\r\n }\r\n resolve(new SourceMap.SourceMapConsumer(sourceMapSource));\r\n }, reject);\r\n }.bind(this));\r\n this.sourceMapConsumerCache[sourceMappingURL] = sourceMapConsumerPromise;\r\n resolve(sourceMapConsumerPromise);\r\n }\r\n }.bind(this));\r\n };\r\n /**\r\n * Given a StackFrame, enhance function name and use source maps for a\r\n * better StackFrame.\r\n *\r\n * @param {StackFrame} stackframe object\r\n * @returns {Promise} that resolves with with source-mapped StackFrame\r\n */\r\n this.pinpoint = function StackTraceGPS$$pinpoint(stackframe) {\r\n return new Promise(function (resolve, reject) {\r\n this.getMappedLocation(stackframe).then(function (mappedStackFrame) {\r\n function resolveMappedStackFrame() {\r\n resolve(mappedStackFrame);\r\n }\r\n this.findFunctionName(mappedStackFrame).then(resolve, resolveMappedStackFrame)[\"catch\"](resolveMappedStackFrame);\r\n }.bind(this), reject);\r\n }.bind(this));\r\n };\r\n /**\r\n * Given a StackFrame, guess function name from location information.\r\n *\r\n * @param {StackFrame} stackframe\r\n * @returns {Promise} that resolves with enhanced StackFrame.\r\n */\r\n this.findFunctionName = function StackTraceGPS$$findFunctionName(stackframe) {\r\n return new Promise(function (resolve, reject) {\r\n _ensureStackFrameIsLegit(stackframe);\r\n this._get(stackframe.fileName).then(function getSourceCallback(source) {\r\n var lineNumber = stackframe.lineNumber;\r\n var columnNumber = stackframe.columnNumber;\r\n var guessedFunctionName = _findFunctionName(source, lineNumber, columnNumber);\r\n // Only replace functionName if we found something\r\n if (guessedFunctionName) {\r\n resolve(new StackFrame({\r\n functionName: guessedFunctionName,\r\n args: stackframe.args,\r\n fileName: stackframe.fileName,\r\n lineNumber: lineNumber,\r\n columnNumber: columnNumber\r\n }));\r\n } else {\r\n resolve(stackframe);\r\n }\r\n }, reject)[\"catch\"](reject);\r\n }.bind(this));\r\n };\r\n /**\r\n * Given a StackFrame, seek source-mapped location and return new enhanced StackFrame.\r\n *\r\n * @param {StackFrame} stackframe\r\n * @returns {Promise} that resolves with enhanced StackFrame.\r\n */\r\n this.getMappedLocation = function StackTraceGPS$$getMappedLocation(stackframe) {\r\n return new Promise(function (resolve, reject) {\r\n _ensureSupportedEnvironment();\r\n _ensureStackFrameIsLegit(stackframe);\r\n var sourceCache = this.sourceCache;\r\n var fileName = stackframe.fileName;\r\n this._get(fileName).then(function (source) {\r\n var sourceMappingURL = _findSourceMappingURL(source);\r\n var isDataUrl = sourceMappingURL.substr(0, 5) === \"data:\";\r\n var defaultSourceRoot = fileName.substring(0, fileName.lastIndexOf(\"/\") + 1);\r\n if (sourceMappingURL[0] !== \"/\" && !isDataUrl && !/^https?:\\/\\/|^\\/\\//i.test(sourceMappingURL)) {\r\n sourceMappingURL = defaultSourceRoot + sourceMappingURL;\r\n }\r\n return this._getSourceMapConsumer(sourceMappingURL, defaultSourceRoot).then(function (sourceMapConsumer) {\r\n return _extractLocationInfoFromSourceMapSource(stackframe, sourceMapConsumer, sourceCache).then(resolve)[\"catch\"](function () {\r\n resolve(stackframe);\r\n });\r\n });\r\n }.bind(this), reject)[\"catch\"](reject);\r\n }.bind(this));\r\n };\r\n };\r\n })(SourceMap, StackFrame);\r\n\r\n //\r\n // Shared Variables\r\n //\r\n\r\n var scriptFile = document.getElementsByTagName('script');\r\n var scriptIndex = scriptFile.length - 1;\r\n var myScript = scriptFile[scriptIndex];\r\n var queryString = myScript.src.replace(/^[^\\?]+\\??/, '');\r\n var params = parseQuery(queryString);\r\n var paramsLength = objectLength(params);\r\n\r\n var debugSettings = {\r\n label: ' elmah.io debugger : On ',\r\n labelCSS: 'background: #06a89c; color: #ffffff; display: inline-block; font-size: 14px;',\r\n successCSS: 'background: #d4edda; color: #155724; display: inline-block; font-size: 13px;',\r\n errorCSS: 'background: #f8d7da; color: #721c24; display: inline-block; font-size: 13px;',\r\n warningCSS: 'background: #fff3cd; color: #856404; display: inline-block; font-size: 13px;',\r\n lightCSS: 'background: #e2e3e5; color: #383d41; display: inline-block; font-size: 13px;'\r\n };\r\n\r\n var defaults = {\r\n apiKey: null,\r\n logId: null,\r\n debug: false,\r\n application: null,\r\n filter: null,\r\n captureConsoleMinimumLevel: 'none'\r\n };\r\n\r\n //\r\n // Shared Methods\r\n //\r\n\r\n var extend = function () {\r\n\r\n // Variables\r\n var extended = {};\r\n var deep = false;\r\n var i = 0;\r\n\r\n // Check if a deep merge\r\n if (Object.prototype.toString.call(arguments[0]) === '[object Boolean]') {\r\n deep = arguments[0];\r\n i++;\r\n }\r\n\r\n // Merge the object into the extended object\r\n var merge = function (obj) {\r\n for (var prop in obj) {\r\n if (obj.hasOwnProperty(prop)) {\r\n // If property is an object, merge properties\r\n if (deep && Object.prototype.toString.call(obj[prop]) === '[object Object]') {\r\n extended[prop] = extend(extended[prop], obj[prop]);\r\n } else {\r\n extended[prop] = obj[prop];\r\n }\r\n }\r\n }\r\n };\r\n\r\n // Loop through each object and conduct a merge\r\n for (; i < arguments.length; i++) {\r\n var obj = arguments[i];\r\n merge(obj);\r\n }\r\n\r\n return extended;\r\n\r\n };\r\n\r\n //\r\n // Helpers\r\n //\r\n\r\n function parseQuery(query) {\r\n var Params = new Object();\r\n if (!query) return Params; // return empty object\r\n var Pairs = query.split(/[;&]/);\r\n for (var i = 0; i < Pairs.length; i++) {\r\n var KeyVal = Pairs[i].split('=');\r\n if (!KeyVal || KeyVal.length !== 2) continue;\r\n var key = unescape(KeyVal[0]);\r\n var val = unescape(KeyVal[1]);\r\n val = val.replace(/\\+/g, ' ');\r\n Params[key] = val;\r\n }\r\n return Params;\r\n }\r\n\r\n function objectLength(obj) {\r\n var size = 0, key;\r\n for (key in obj) {\r\n if (obj.hasOwnProperty(key)) size++;\r\n }\r\n return size;\r\n };\r\n\r\n function getSearchParameters() {\r\n var prmstr = window.location.search.substr(1);\r\n return prmstr !== null && prmstr !== \"\" ? transformToAssocArray(prmstr) : {};\r\n }\r\n\r\n function transformToAssocArray(prmstr) {\r\n var params = [];\r\n var prmarr = prmstr.split(\"&\");\r\n for (var i = 0; i < prmarr.length; i++) {\r\n var tmparr = prmarr[i].split(\"=\");\r\n params.push({\r\n 'key': tmparr[0],\r\n 'value': tmparr[1]\r\n });\r\n }\r\n return params;\r\n }\r\n\r\n function merge_objects(obj1, obj2) {\r\n var obj3 = {};\r\n for (var attrname1 in obj1) {\r\n obj3[attrname1] = obj1[attrname1];\r\n }\r\n for (var attrname2 in obj2) {\r\n obj3[attrname2] = obj2[attrname2];\r\n }\r\n\r\n return obj3;\r\n }\r\n\r\n // sprintf-js\r\n var sprintfjs = function() {\r\n 'use strict'\r\n var app = {};\r\n var re = {\r\n not_string: /[^s]/,\r\n not_bool: /[^t]/,\r\n not_type: /[^T]/,\r\n not_primitive: /[^v]/,\r\n number: /[diefg]/,\r\n numeric_arg: /[bcdiefguxX]/,\r\n json: /[j]/,\r\n not_json: /[^j]/,\r\n text: /^[^\\x25]+/,\r\n modulo: /^\\x25{2}/,\r\n placeholder: /^\\x25(?:([1-9]\\d*)\\$|\\(([^)]+)\\))?(\\+)?(0|'[^$])?(-)?(\\d+)?(?:\\.(\\d+))?([b-gijostTuvxX])/,\r\n key: /^([a-z_][a-z_\\d]*)/i,\r\n key_access: /^\\.([a-z_][a-z_\\d]*)/i,\r\n index_access: /^\\[(\\d+)\\]/,\r\n sign: /^[+-]/,\r\n mod: /^\\x25\\s/,\r\n notplaceholder: /^\\x25?([^b-gijostTuvxX])/\r\n }\r\n\r\n function sprintf(key) {\r\n // `arguments` is not an array, but should be fine for this call\r\n return sprintf_format(sprintf_parse(key), arguments)\r\n }\r\n\r\n function vsprintf(fmt, argv) {\r\n return sprintf.apply(null, [fmt].concat(argv || []))\r\n }\r\n\r\n function sprintf_format(parse_tree, argv) {\r\n var cursor = 1, tree_length = parse_tree.length, arg, output = '', i, k, ph, pad, pad_character, pad_length, is_positive, sign;\r\n for (i = 0; i < tree_length; i++) {\r\n if (typeof parse_tree[i] === 'string') {\r\n output += parse_tree[i]\r\n }\r\n else if (typeof parse_tree[i] === 'object') {\r\n ph = parse_tree[i]; // placeholder\r\n if (ph.keys) { // keyword argument\r\n arg = argv[cursor]\r\n for (k = 0; k < ph.keys.length; k++) {\r\n if (arg == undefined) {\r\n throw new Error(sprintf('[sprintf] Cannot access property \"%s\" of undefined value \"%s\"', ph.keys[k], ph.keys[k-1]))\r\n }\r\n arg = arg[ph.keys[k]]\r\n }\r\n }\r\n else if (ph.param_no) { // positional argument (explicit)\r\n arg = argv[ph.param_no]\r\n }\r\n else { // positional argument (implicit)\r\n arg = argv[cursor++]\r\n }\r\n\r\n if (re.not_type.test(ph.type) && re.not_primitive.test(ph.type) && arg instanceof Function) {\r\n arg = arg()\r\n }\r\n\r\n if (re.numeric_arg.test(ph.type) && (typeof arg !== 'number' && isNaN(arg) && arg === undefined)) { // treat %_d as string if it has no argument\r\n arg = ph.placeholder;\r\n ph.type = \"s\";\r\n }\r\n\r\n if (re.number.test(ph.type)) {\r\n is_positive = typeof arg === \"string\" ? true : arg >= 0\r\n }\r\n\r\n switch (ph.type) {\r\n case 'b':\r\n arg = parseInt(arg, 10).toString(2)\r\n break\r\n case 'c':\r\n arg = String.fromCharCode(parseInt(arg, 10))\r\n break\r\n case 'd':\r\n case 'i':\r\n arg = typeof arg === \"number\" ? parseInt(arg, 10) : NaN\r\n break\r\n case 'j':\r\n arg = JSON.stringify(arg, null, ph.width ? parseInt(ph.width) : 0)\r\n break\r\n case 'e':\r\n arg = ph.precision ? parseFloat(arg).toExponential(ph.precision) : parseFloat(arg).toExponential()\r\n break\r\n case 'f':\r\n arg = ph.precision ? parseFloat(arg).toFixed(ph.precision) : parseFloat(arg)\r\n break\r\n case 'g':\r\n arg = ph.precision ? String(Number(arg.toPrecision(ph.precision))) : parseFloat(arg)\r\n break\r\n case 'o':\r\n arg = (parseInt(arg, 10) >>> 0).toString(8)\r\n break\r\n case 's':\r\n arg = String(arg)\r\n arg = arg === \"undefined\" ? ph.placeholder : (ph.precision ? arg.substring(0, ph.precision) : arg)\r\n break\r\n case 't':\r\n arg = String(!!arg)\r\n arg = (ph.precision ? arg.substring(0, ph.precision) : arg)\r\n break\r\n case 'T':\r\n arg = Object.prototype.toString.call(arg).slice(8, -1).toLowerCase()\r\n arg = (ph.precision ? arg.substring(0, ph.precision) : arg)\r\n break\r\n case 'u':\r\n arg = parseInt(arg, 10) >>> 0\r\n break\r\n case 'v':\r\n arg = arg.valueOf()\r\n arg = (ph.precision ? arg.substring(0, ph.precision) : arg)\r\n break\r\n case 'x':\r\n arg = (parseInt(arg, 10) >>> 0).toString(16)\r\n break\r\n case 'X':\r\n arg = (parseInt(arg, 10) >>> 0).toString(16).toUpperCase()\r\n break\r\n }\r\n if (re.json.test(ph.type)) {\r\n output += arg\r\n }\r\n else {\r\n if (re.number.test(ph.type) && (!is_positive || ph.sign)) {\r\n sign = is_positive ? '+' : '-'\r\n arg = arg.toString().replace(re.sign, '')\r\n }\r\n else {\r\n sign = ''\r\n }\r\n pad_character = ph.pad_char ? ph.pad_char === '0' ? '0' : ph.pad_char.charAt(1) : ' '\r\n pad_length = ph.width - (sign + arg).length\r\n pad = ph.width ? (pad_length > 0 ? pad_character.repeat(pad_length) : '') : ''\r\n output += ph.align ? sign + arg + pad : (pad_character === '0' ? sign + pad + arg : pad + sign + arg)\r\n }\r\n }\r\n }\r\n return output\r\n }\r\n\r\n var sprintf_cache = Object.create(null)\r\n\r\n function sprintf_parse(fmt) {\r\n var _fmt = fmt, match, parse_tree = [], arg_names = 0;\r\n while (_fmt) {\r\n if ((match = re.text.exec(_fmt)) !== null) {\r\n parse_tree.push(match[0]);\r\n }\r\n else if ((match = re.modulo.exec(_fmt)) !== null) {\r\n parse_tree.push('%');\r\n }\r\n else if ((match = re.placeholder.exec(_fmt)) !== null) {\r\n if (match[2]) {\r\n arg_names |= 1\r\n var field_list = [], replacement_field = match[2], field_match = []\r\n if ((field_match = re.key.exec(replacement_field)) !== null) {\r\n field_list.push(field_match[1])\r\n while ((replacement_field = replacement_field.substring(field_match[0].length)) !== '') {\r\n if ((field_match = re.key_access.exec(replacement_field)) !== null) {\r\n field_list.push(field_match[1])\r\n }\r\n else if ((field_match = re.index_access.exec(replacement_field)) !== null) {\r\n field_list.push(field_match[1])\r\n }\r\n else {\r\n throw new SyntaxError('[sprintf] failed to parse named argument key')\r\n }\r\n }\r\n }\r\n else {\r\n throw new SyntaxError('[sprintf] failed to parse named argument key')\r\n }\r\n match[2] = field_list\r\n }\r\n else {\r\n arg_names |= 2\r\n }\r\n if (arg_names === 3) {\r\n throw new Error('[sprintf] mixing positional and named placeholders is not (yet) supported')\r\n }\r\n\r\n parse_tree.push(\r\n {\r\n placeholder: match[0],\r\n param_no: match[1],\r\n keys: match[2],\r\n sign: match[3],\r\n pad_char: match[4],\r\n align: match[5],\r\n width: match[6],\r\n precision: match[7],\r\n type: match[8]\r\n }\r\n )\r\n }\r\n else if ((match = re.mod.exec(_fmt)) !== null) { // treat %_SPACE as a string\r\n parse_tree.push(match[0]);\r\n }\r\n else if ((match = re.notplaceholder.exec(_fmt)) !== null) { // treat %_NOTPLACEHOLDER as a string\r\n parse_tree.push(match[0]);\r\n }\r\n else {\r\n throw new SyntaxError('[sprintf] unexpected placeholder')\r\n }\r\n _fmt = _fmt.substring(match[0].length)\r\n }\r\n return parse_tree\r\n }\r\n\r\n app.sprintf = sprintf;\r\n app.vsprintf = vsprintf;\r\n return app;\r\n }\r\n\r\n //\r\n // Constructor\r\n // Can be named anything you want\r\n //\r\n\r\n var Constructor = function (options) {\r\n\r\n //\r\n // Unique Variables\r\n //\r\n\r\n var publicAPIs = {};\r\n var settings;\r\n\r\n function getPayload() {\r\n var payload = {\r\n \"url\": document.location.pathname || '/',\r\n \"application\": settings.application\r\n };\r\n\r\n var payload_data = [];\r\n\r\n if (document.documentMode) payload_data.push({ \"key\": \"Document-Mode\", \"value\": document.documentMode });\r\n if (window.innerWidth || document.documentElement.clientWidth || document.getElementsByTagName('body')[0].clientWidth) payload_data.push({ \"key\": \"Browser-Width\", \"value\": window.innerWidth || document.documentElement.clientWidth || document.getElementsByTagName('body')[0].clientWidth });\r\n if (window.innerHeight || document.documentElement.clientHeight || document.getElementsByTagName('body')[0].clientHeight) payload_data.push({ \"key\": \"Browser-Height\", \"value\": window.innerHeight || document.documentElement.clientHeight || document.getElementsByTagName('body')[0].clientHeight });\r\n if ((screen.msOrientation || (screen.orientation || screen.mozOrientation || {}).type) !== undefined) payload_data.push({ \"key\": \"Screen-Orientation\", \"value\": ((screen.msOrientation || (screen.orientation || screen.mozOrientation || {}).type).split(\"-\"))[0] });\r\n if (screen.width) payload_data.push({ \"key\": \"Screen-Width\", \"value\": screen.width });\r\n if (screen.height) payload_data.push({ \"key\": \"Screen-Height\", \"value\": screen.height });\r\n if (screen.colorDepth) payload_data.push({ \"key\": \"Color-Depth\", \"value\": screen.colorDepth });\r\n payload_data.push({ \"key\": \"X-ELMAHIO-SEARCH-isClientside\", \"value\": \"true\" });\r\n\r\n payload.data = payload_data;\r\n\r\n var payload_serverVariables = [];\r\n if (navigator.language) payload_serverVariables.push({ \"key\": \"User-Language\", \"value\": navigator.language });\r\n if (navigator.userAgent) payload_serverVariables.push({ \"key\": \"User-Agent\", \"value\": navigator.userAgent });\r\n if (document.referrer) payload_serverVariables.push({ \"key\": \"Referer\", \"value\": document.referrer });\r\n if (document.location.protocol === \"https:\") payload_serverVariables.push({ \"key\": \"HTTPS\", \"value\": 'on' });\r\n if (document.location.hostname) payload_serverVariables.push({ \"key\": \"Host\", \"value\": document.location.hostname });\r\n\r\n payload.serverVariables = payload_serverVariables;\r\n\r\n return payload;\r\n }\r\n\r\n function confirmResponse(status, response) {\r\n if (settings.debug) {\r\n if (status === 'error') {\r\n console.log('%c \\u2BC8 Error log: ' + '%c \\u2715 Not created ', debugSettings.lightCSS, debugSettings.errorCSS);\r\n } else if (status === 'success') {\r\n console.log('%c \\u2BC8 Error log: ' + '%c \\u2714 ' + response + ' at ' + new Date().toLocaleString() + ' ', debugSettings.lightCSS, debugSettings.successCSS);\r\n } else {\r\n console.log('%c \\u2BC8 Error log: ' + '%c \\u2715 Not created. Title should not be undefined, null or empty ! ', debugSettings.lightCSS, debugSettings.errorCSS);\r\n }\r\n }\r\n }\r\n\r\n function stackGPS(error, xhr, jsonData) {\r\n \tvar errorStack = error.toString().split(\"\\n\")[0];\r\n \tvar gps = new StackTraceGPS();\r\n var promise = new Promise(function(resolve) {\r\n\t var stackframes = ErrorStackParser.parse(error);\r\n\t resolve(Promise.all(stackframes.map(function(sf) {\r\n\t return new Promise(function(resolve) {\r\n\t function resolveOriginal() {\r\n\t resolve(sf);\r\n\t }\r\n\t gps.pinpoint(sf).then(resolve, resolveOriginal)['catch'](resolveOriginal);\r\n\t });\r\n\t })));\r\n \t}\r\n );\r\n\r\n promise.then(function(newFrames){\r\n \tnewFrames.forEach(function(stackFrame, i){\r\n\t\t\t\t\tif(stackFrame.functionName) {\r\n \t\t\tvar fn = stackFrame.functionName + ' ';\r\n \t\t} else {\r\n \t\t\tvar fn = '';\r\n \t\t}\r\n \t\tvar stackString = ' at ' + fn + '(' + stackFrame.fileName + ':' + stackFrame.lineNumber + ':' + stackFrame.columnNumber + ')';\r\n \t\tnewFrames[i] = stackString;\r\n \t});\r\n \tnewFrames.unshift(errorStack);\r\n \tjsonData.detail = newFrames.join(\"\\n\");\r\n \txhr.send(JSON.stringify(jsonData));\r\n });\r\n }\r\n\r\n function stackString(error) {\r\n \tvar typeOF = typeof error.error;\r\n \tvar typeOFCapitalized = typeOF.charAt(0).toUpperCase() + typeOF.slice(1);\r\n\r\n \treturn typeOFCapitalized + ': ' + error.error + '\\n' + ' at ' + '(' + error.source + ':' + error.lineno + ':' + error.colno + ')';\r\n }\r\n\r\n function manipulateStack (errorStack, severity, message) {\r\n var stack = [];\r\n for (var i = 0; i < errorStack.length; i++) {\r\n if(errorStack[i] === \"Error\") {\r\n stack.push(severity + \": \" + message);\r\n }\r\n if(!errorStack[i].match(/elmahio.js|elmahio.min.js/g) && errorStack[i] !== \"Error\") {\r\n stack.push(errorStack[i]);\r\n }\r\n }\r\n return stack.join('\\n');\r\n }\r\n\r\n // Private methods\r\n\r\n var sendPayload = function (apiKey, logId, callback, errorLog) {\r\n\r\n var api_key = apiKey,\r\n log_id = logId,\r\n error = errorLog,\r\n send = 1,\r\n queryParams = getSearchParameters(),\r\n stack = error.error && objectLength(error.error.stack) !== 0 && typeof error.error === \"object\" ? ErrorStackParser.parse(error.error) : '';\r\n\r\n // Ignoring error from an external script\r\n if (error && error.colno === 0 && error.lineno === 0 && (!stack || stack === '') && error.message && (error.message === \"Script error.\" || error.message === \"Script error\")) {\r\n\t\t\t if (settings.debug) {\r\n\t\t\t console.log('%c \\u2BC8 Error log: ' + '%c \\uD83D\\uDEC8 Ignoring error from external script ', debugSettings.lightCSS, debugSettings.warningCSS);\r\n\t\t\t }\r\n\t\t\t return;\r\n\t\t\t}\r\n\r\n if ((api_key !== null && log_id !== null) || (paramsLength === 2)) {\r\n\r\n // Priority for parameters\r\n if (params.hasOwnProperty('apiKey') && params.hasOwnProperty('logId')) {\r\n api_key = params['apiKey'];\r\n log_id = params['logId'];\r\n }\r\n\r\n // get new XHR object\r\n var xhr = new XMLHttpRequest();\r\n xhr.open(\"POST\", \"https://api.elmah.io/v3/messages/\" + log_id + \"?api_key=\" + api_key, true);\r\n\r\n xhr.setRequestHeader('Content-type', 'application/json');\r\n\r\n xhr.onload = function (e) {\r\n if (xhr.readyState === 4) {\r\n if (xhr.status === 201) {\r\n callback('success', xhr.statusText);\r\n }\r\n }\r\n };\r\n\r\n xhr.onerror = function (e) {\r\n callback('error', xhr.statusText);\r\n\r\n // on error event\r\n publicAPIs.emit('error', xhr.status, xhr.statusText);\r\n }\r\n\r\n var jsonData = {\r\n \"detail\": error.error ? error.error.stack : null,\r\n \"title\": error.message || 'Unspecified error',\r\n \"source\": stack && stack.length > 0 ? stack[0].fileName : null,\r\n \"severity\": \"Error\",\r\n \"type\": error.error ? error.error.name : null,\r\n \"queryString\": JSON.parse(JSON.stringify(queryParams))\r\n };\r\n\r\n // Check if error sent is a string and not an object\r\n // Then create the articifial stacktrace and pass source & type of the error\r\n if(error.error && (objectLength(error.error.stack) === 0) && typeof jsonData.detail === \"undefined\") {\r\n \tvar typeOF = typeof errorLog.error;\r\n \t\t\tvar typeOFCapitalized = typeOF.charAt(0).toUpperCase() + typeOF.slice(1);\r\n\r\n \tjsonData.detail = stackString(errorLog);\r\n \tjsonData.source = errorLog.source;\r\n jsonData.title = \"Uncaught \" + typeOFCapitalized + \": \" + errorLog.error;\r\n }\r\n\r\n // Add payload to jsonData\r\n jsonData = merge_objects(jsonData, getPayload());\r\n\r\n // filter callback\r\n if (settings.filter !== null) {\r\n if (settings.filter(jsonData)) {\r\n send = 0;\r\n }\r\n }\r\n\r\n if (send === 1) {\r\n // on message event\r\n publicAPIs.emit('message', jsonData);\r\n\r\n if (error.error && typeof error.error === \"object\" && objectLength(error.error.stack) !== 0 && typeof Promise !== \"undefined\" && Promise.toString().indexOf(\"[native code]\") !== -1) {\r\n \t// send message trying to pinpoint stackframes\r\n \tstackGPS(error.error, xhr, jsonData);\r\n\t } else {\r\n\t \t// send message\r\n \txhr.send(JSON.stringify(jsonData));\r\n\t }\r\n }\r\n\r\n } else {\r\n return console.log('Login api error');\r\n }\r\n };\r\n\r\n var sendManualPayload = function (apiKey, logId, callback, logType, messageLog, errorLog) {\r\n var api_key = apiKey,\r\n log_id = logId,\r\n type = logType,\r\n error = errorLog,\r\n message = messageLog,\r\n send = 1,\r\n queryParams = getSearchParameters();\r\n\r\n if ((api_key !== null && log_id !== null) || (paramsLength === 2)) {\r\n\r\n // Priority for parameters\r\n if (params.hasOwnProperty('apiKey') && params.hasOwnProperty('logId')) {\r\n api_key = params['apiKey'];\r\n log_id = params['logId'];\r\n }\r\n\r\n // get new XHR object\r\n var xhr = new XMLHttpRequest();\r\n xhr.open(\"POST\", \"https://api.elmah.io/v3/messages/\" + log_id + \"?api_key=\" + api_key, true);\r\n xhr.setRequestHeader('Content-type', 'application/json');\r\n\r\n xhr.onload = function (e) {\r\n if (xhr.readyState === 4) {\r\n if (xhr.status === 201) {\r\n callback('success', xhr.statusText);\r\n }\r\n }\r\n };\r\n\r\n xhr.onerror = function (e) {\r\n callback('error', xhr.statusText);\r\n\r\n // on error event\r\n publicAPIs.emit('error', xhr.status, xhr.statusText);\r\n }\r\n\r\n if (type !== \"Log\") {\r\n\r\n var stack = error ? ErrorStackParser.parse(error) : null;\r\n\r\n var jsonData = {\r\n \"title\": message,\r\n \"source\": stack && stack.length > 0 ? stack[0].fileName : null,\r\n \"detail\": error ? error.stack : null,\r\n \"severity\": type,\r\n \"type\": error ? error.name : null,\r\n \"queryString\": JSON.parse(JSON.stringify(queryParams))\r\n };\r\n\r\n // Add payload to jsonData\r\n jsonData = merge_objects(jsonData, getPayload());\r\n\r\n } else {\r\n\r\n jsonData = error;\r\n\r\n }\r\n\r\n // filter callback\r\n if (settings.filter !== null) {\r\n if (settings.filter(jsonData)) {\r\n send = 0;\r\n }\r\n }\r\n\r\n if (send === 1) {\r\n if (jsonData.title) {\r\n\r\n // on message event\r\n publicAPIs.emit('message', jsonData);\r\n\r\n if (error && type !== \"Log\" && typeof Promise !== \"undefined\" && Promise.toString().indexOf(\"[native code]\") !== -1) {\r\n // send message trying to pinpoint stackframes\r\n stackGPS(error, xhr, jsonData);\r\n } else {\r\n // send message\r\n if(jsonData.errorObject) {\r\n error = jsonData.errorObject;\r\n delete jsonData.errorObject;\r\n stackGPS(error, xhr, jsonData);\r\n } else {\r\n xhr.send(JSON.stringify(jsonData));\r\n }\r\n }\r\n\r\n } else {\r\n callback('missing-title', xhr.statusText);\r\n }\r\n }\r\n\r\n } else {\r\n return console.log('Login api error');\r\n }\r\n };\r\n\r\n var sendPayloadFromConsole = function (apiKey, logId, callback, logType, errorLog) {\r\n var api_key = apiKey,\r\n log_id = logId,\r\n message = errorLog.message,\r\n messageTemplate = errorLog.message,\r\n type = logType,\r\n args = Object.values(errorLog.arguments),\r\n send = 1,\r\n queryParams = getSearchParameters();\r\n\r\n // If message has placeholders (%s or %d), check for arguments and replace them\r\n \tif(String(message).match(/(%d|%s)+/ig) && args.length > 1) {\r\n \t\tvar sprintfJS = new sprintfjs();\r\n // Remove the first argument from array, which represents the message\r\n \t\targs.shift();\r\n message = sprintfJS.vsprintf(message, args);\r\n }\r\n\r\n if(typeof message !== \"string\"){\r\n message = message.toString();\r\n }\r\n\r\n if(typeof messageTemplate !== \"string\") {\r\n messageTemplate = messageTemplate.toString();\r\n }\r\n\r\n if ((api_key !== null && log_id !== null) || (paramsLength === 2)) {\r\n\r\n // Priority for parameters\r\n if (params.hasOwnProperty('apiKey') && params.hasOwnProperty('logId')) {\r\n api_key = params['apiKey'];\r\n log_id = params['logId'];\r\n }\r\n\r\n // get new XHR object\r\n var xhr = new XMLHttpRequest();\r\n xhr.open(\"POST\", \"https://api.elmah.io/v3/messages/\" + log_id + \"?api_key=\" + api_key, true);\r\n xhr.setRequestHeader('Content-type', 'application/json');\r\n\r\n xhr.onload = function (e) {\r\n if (xhr.readyState === 4) {\r\n if (xhr.status === 201) {\r\n callback('success', xhr.statusText);\r\n }\r\n }\r\n };\r\n\r\n xhr.onerror = function (e) {\r\n callback('error', xhr.statusText);\r\n // on error event\r\n publicAPIs.emit('error', xhr.status, xhr.statusText);\r\n }\r\n\r\n var jsonData = {\r\n \"title\": message,\r\n \"titleTemplate\": messageTemplate,\r\n \"detail\": manipulateStack(new Error().stack.split('\\n'), type, message),\r\n \"severity\": type,\r\n \"type\": null,\r\n \"queryString\": JSON.parse(JSON.stringify(queryParams))\r\n };\r\n\r\n // Add payload to jsonData\r\n jsonData = merge_objects(jsonData, getPayload());\r\n\r\n // filter callback\r\n if (settings.filter !== null) {\r\n if (settings.filter(jsonData)) {\r\n send = 0;\r\n }\r\n }\r\n\r\n if (send === 1) {\r\n if (jsonData.title) {\r\n // on message event\r\n publicAPIs.emit('message', jsonData);\r\n // send message\r\n xhr.send(JSON.stringify(jsonData));\r\n } else {\r\n callback('missing-title', xhr.statusText);\r\n }\r\n }\r\n\r\n } else {\r\n return console.log('Login api error');\r\n }\r\n };\r\n\r\n var sendPrefilledLogMessage = function(errorLog) {\r\n // without error object\r\n if(!errorLog) return getPayload();\r\n\r\n // with error object\r\n var error = errorLog;\r\n var stack = error ? ErrorStackParser.parse(error) : null;\r\n var jsonData = {\r\n \"title\": error.message,\r\n \"source\": stack && stack.length > 0 ? stack[0].fileName : null,\r\n \"detail\": error ? error.stack : null,\r\n \"severity\": \"Error\",\r\n \"type\": error ? error.name : null,\r\n \"errorObject\": error\r\n };\r\n\r\n jsonData = merge_objects(jsonData, getPayload());\r\n return jsonData;\r\n }\r\n\r\n // Some public methods\r\n\r\n publicAPIs.error = function (msg) {\r\n sendManualPayload(settings.apiKey, settings.logId, confirmResponse, 'Error', msg);\r\n };\r\n publicAPIs.error = function (msg, error) {\r\n sendManualPayload(settings.apiKey, settings.logId, confirmResponse, 'Error', msg, error);\r\n };\r\n\r\n publicAPIs.verbose = function (msg) {\r\n sendManualPayload(settings.apiKey, settings.logId, confirmResponse, 'Verbose', msg);\r\n };\r\n publicAPIs.verbose = function (msg, error) {\r\n sendManualPayload(settings.apiKey, settings.logId, confirmResponse, 'Verbose', msg, error);\r\n };\r\n\r\n publicAPIs.debug = function (msg) {\r\n sendManualPayload(settings.apiKey, settings.logId, confirmResponse, 'Debug', msg);\r\n };\r\n publicAPIs.debug = function (msg, error) {\r\n sendManualPayload(settings.apiKey, settings.logId, confirmResponse, 'Debug', msg, error);\r\n };\r\n\r\n publicAPIs.information = function (msg) {\r\n sendManualPayload(settings.apiKey, settings.logId, confirmResponse, 'Information', msg);\r\n };\r\n publicAPIs.information = function (msg, error) {\r\n sendManualPayload(settings.apiKey, settings.logId, confirmResponse, 'Information', msg, error);\r\n };\r\n\r\n publicAPIs.warning = function (msg) {\r\n sendManualPayload(settings.apiKey, settings.logId, confirmResponse, 'Warning', msg);\r\n };\r\n publicAPIs.warning = function (msg, error) {\r\n sendManualPayload(settings.apiKey, settings.logId, confirmResponse, 'Warning', msg, error);\r\n };\r\n\r\n publicAPIs.fatal = function (msg) {\r\n sendManualPayload(settings.apiKey, settings.logId, confirmResponse, 'Fatal', msg);\r\n };\r\n publicAPIs.fatal = function (msg, error) {\r\n sendManualPayload(settings.apiKey, settings.logId, confirmResponse, 'Fatal', msg, error);\r\n };\r\n\r\n publicAPIs.log = function (obj) {\r\n sendManualPayload(settings.apiKey, settings.logId, confirmResponse, 'Log', null, obj);\r\n };\r\n\r\n publicAPIs.message = function(error) {\r\n return sendPrefilledLogMessage(error);\r\n };\r\n\r\n publicAPIs.on = function (name, callback, ctx) {\r\n var e = this.e || (this.e = {});\r\n\r\n (e[name] || (e[name] = [])).push({\r\n fn: callback,\r\n ctx: ctx\r\n });\r\n\r\n return this;\r\n };\r\n\r\n publicAPIs.emit = function (name) {\r\n var data = [].slice.call(arguments, 1);\r\n var evtArr = ((this.e || (this.e = {}))[name] || []).slice();\r\n var i = 0;\r\n var len = evtArr.length;\r\n\r\n for (i; i < len; i++) {\r\n evtArr[i].fn.apply(evtArr[i].ctx, data);\r\n }\r\n\r\n return this;\r\n };\r\n\r\n publicAPIs.init = function (options) {\r\n\r\n // -- Merge options into defaults\r\n settings = extend(defaults, options || {});\r\n\r\n // -- Log on window error\r\n window.onerror = function (message, source, lineno, colno, error) {\r\n\r\n var errorLog = {\r\n 'message': message,\r\n 'source': source,\r\n 'lineno': lineno,\r\n 'colno': colno,\r\n 'error': error\r\n }\r\n\r\n sendPayload(settings.apiKey, settings.logId, confirmResponse, errorLog);\r\n\r\n return false;\r\n }\r\n\r\n // -- Overriding console methods\r\n // -- Then log messages into the app.elmah.io\r\n if(options && options.captureConsoleMinimumLevel !== \"none\") {\r\n\r\n // If captureConsoleMinimumLevel: info or debug is set (error, warn)\r\n if(options.captureConsoleMinimumLevel === \"info\" || options.captureConsoleMinimumLevel === \"warn\" || options.captureConsoleMinimumLevel === \"error\" || options.captureConsoleMinimumLevel === \"debug\") {\r\n // Log console errors\r\n var _error = console.error;\r\n console.error = function(errMessage){\r\n var errorLog = {\r\n \t\t'message': errMessage,\r\n \t\t'arguments': arguments\r\n \t}\r\n sendPayloadFromConsole(settings.apiKey, settings.logId, confirmResponse, 'Error', errorLog);\r\n _error.apply(console, arguments);\r\n };\r\n if(options.captureConsoleMinimumLevel !== \"error\") {\r\n // Log console warnings\r\n var _warning = console.warn;\r\n console.warn = function(warnMessage){\r\n var errorLog = {\r\n 'message': warnMessage,\r\n 'arguments': arguments\r\n }\r\n sendPayloadFromConsole(settings.apiKey, settings.logId, confirmResponse, 'Warning', errorLog);\r\n _warning.apply(console, arguments);\r\n };\r\n }\r\n }\r\n if(options.captureConsoleMinimumLevel === \"info\" || options.captureConsoleMinimumLevel === \"debug\") {\r\n // Log console info\r\n var _info = console.info;\r\n console.info = function(infoMessage){\r\n var errorLog = {\r\n \t\t'message': infoMessage,\r\n \t\t'arguments': arguments\r\n \t}\r\n sendPayloadFromConsole(settings.apiKey, settings.logId, confirmResponse, 'Information', errorLog);\r\n _info.apply(console, arguments);\r\n };\r\n }\r\n if(options.captureConsoleMinimumLevel === \"debug\") {\r\n // Log console debug\r\n var _debug = console.debug;\r\n console.debug = function(debugMessage){\r\n var errorLog = {\r\n \t\t'message': debugMessage,\r\n \t\t'arguments': arguments\r\n \t}\r\n sendPayloadFromConsole(settings.apiKey, settings.logId, confirmResponse, 'Debug', errorLog);\r\n _debug.apply(console, arguments);\r\n };\r\n }\r\n }\r\n };\r\n\r\n // Initialize the plugin\r\n publicAPIs.init(options);\r\n\r\n if (settings.debug) {\r\n console.log('%c' + debugSettings.label, debugSettings.labelCSS);\r\n }\r\n\r\n // Return the public APIs\r\n return publicAPIs;\r\n\r\n };\r\n\r\n\r\n //\r\n // Return the constructor\r\n //\r\n\r\n if (paramsLength && params.hasOwnProperty('apiKey') && params.hasOwnProperty('logId')) {\r\n // Immediately-Invoked Function Expression (IIFE)\r\n return new Constructor;\r\n } else {\r\n // UMD Constructor\r\n return Constructor;\r\n }\r\n\r\n});"],"file":"elmahio.min.js"} \ No newline at end of file +{"version":3,"sources":["elmahio.js"],"names":["root","factory","define","amd","exports","module","Elmahio","global","window","this","FIREFOX_SAFARI_STACK_REGEXP","CHROME_IE_STACK_REGEXP","SAFARI_NATIVE_CODE_REGEXP","StackFrame","_isNumber","n","isNaN","parseFloat","isFinite","_capitalize","str","charAt","toUpperCase","substring","_getter","p","booleanProps","numericProps","stringProps","props","concat","obj","Object","i","length","hasOwnProperty","undefined","prototype","getArgs","args","setArgs","v","toString","call","TypeError","getEvalOrigin","evalOrigin","setEvalOrigin","getFunctionName","join","getFileName","getLineNumber","getColumnNumber","fromString","argsStartIndex","indexOf","argsEndIndex","lastIndexOf","functionName","split","locationString","parts","exec","fileName","lineNumber","columnNumber","Boolean","j","Number","k","String","ErrorStackParser","parse","error","stacktrace","parseOpera","stack","match","parseV8OrIE","parseFFOrSafari","Error","extractLocation","urlLike","replace","filter","line","map","tokens","slice","locationParts","pop","source","functionNameRegex","matches","e","message","parseOpera9","parseOpera11","parseOpera10","lineRE","lines","result","len","push","argsRaw","functionCall","shift","StackTraceGPS","SourceMap","_xdr","url","Promise","resolve","reject","req","XMLHttpRequest","open","onerror","onreadystatechange","readyState","status","substr","responseText","send","_atob","b64str","atob","_ensureStackFrameIsLegit","stackframe","opts","sourceCache","sourceMapConsumerCache","ajax","_get","location","isDataUrl","offline","sourceMapStart","encodedSource","xhrPromise","method","then","bind","_getSourceMapConsumer","sourceMappingURL","defaultSourceRoot","sourceMapConsumerPromise","sourceMapSource","string","JSON","_parseJson","sourceRoot","SourceMapConsumer","pinpoint","getMappedLocation","mappedStackFrame","resolveMappedStackFrame","findFunctionName","guessedFunctionName","syntaxes","code","maxLines","Math","min","commentPos","index","m","_findFunctionName","defineProperty","create","_ensureSupportedEnvironment","lastSourceMappingUrl","matchSourceMappingUrl","sourceMappingUrlRegExp","_findSourceMappingURL","test","sourceMapConsumer","loc","originalPositionFor","column","mappedSource","sourceContentFor","name","_extractLocationInfoFromSourceMapSource","r","t","o","id","loaded","c","ArraySet","a","s","quickSort","u","sections","l","getArg","g","_version","normalize","isAbsolute","relative","_names","fromArray","_sources","sourcesContent","_mappings","file","generatedLine","generatedColumn","originalLine","originalColumn","_sections","generatedOffset","consumer","fromSourceMap","__generatedMappings","get","_parseMappings","__originalMappings","_charIsMappingSeparator","GENERATED_ORDER","ORIGINAL_ORDER","GREATEST_LOWER_BOUND","LEAST_UPPER_BOUND","eachMapping","_generatedMappings","_originalMappings","at","forEach","allGeneratedPositionsFor","has","_findMapping","compareByOriginalPositions","lastColumn","toArray","_sourceRoot","_generateSourcesContent","_file","h","f","d","_","C","A","y","L","decode","value","rest","compareByGeneratedPositionsDeflated","search","computeColumnSpans","lastGeneratedColumn","hasContentsOfAllSources","size","some","urlParse","scheme","path","generatedPositionFor","BasicSourceMapConsumer","constructor","sources","bias","every","add","IndexedSourceMapConsumer","arguments","auth","host","port","splice","urlGenerate","Array","charCodeAt","toSetString","fromSetString","compareByGeneratedPositionsInflated","floor","_array","_set","getOwnPropertyNames","encode","round","random","scriptFile","document","getElementsByTagName","params","query","Params","Pairs","KeyVal","key","unescape","val","parseQuery","src","paramsLength","objectLength","debugSettings","label","labelCSS","successCSS","errorCSS","warningCSS","lightCSS","defaults","apiKey","logId","debug","application","captureConsoleMinimumLevel","extend","extended","deep","merge","prop","getSearchParameters","prmstr","prmarr","tmparr","transformToAssocArray","merge_objects","obj1","obj2","obj3","attrname1","attrname2","sprintfjs","app","re","not_string","not_bool","not_type","not_primitive","number","numeric_arg","json","not_json","text","modulo","placeholder","key_access","index_access","sign","mod","notplaceholder","sprintf","parse_tree","argv","arg","ph","pad","pad_character","pad_length","is_positive","cursor","tree_length","output","keys","param_no","type","Function","parseInt","fromCharCode","NaN","stringify","width","precision","toExponential","toFixed","toPrecision","toLowerCase","valueOf","pad_char","repeat","align","sprintf_format","fmt","_fmt","arg_names","field_list","replacement_field","field_match","SyntaxError","sprintf_parse","vsprintf","apply","Constructor","options","settings","publicAPIs","getPayload","payload","pathname","payload_data","documentMode","innerWidth","documentElement","clientWidth","innerHeight","clientHeight","screen","msOrientation","orientation","mozOrientation","height","colorDepth","data","payload_serverVariables","navigator","language","userAgent","referrer","protocol","hostname","serverVariables","confirmResponse","response","console","log","Date","toLocaleString","stackGPS","xhr","jsonData","errorStack","gps","stackframes","all","sf","resolveOriginal","newFrames","stackFrame","fn","stackString","unshift","detail","sendManualPayload","callback","logType","messageLog","errorLog","api_key","log_id","queryParams","setRequestHeader","onload","statusText","emit","title","severity","queryString","errorObject","sendPayloadFromConsole","messageTemplate","values","sprintfJS","titleTemplate","manipulateStack","msg","verbose","information","warning","fatal","sendPrefilledLogMessage","on","ctx","evtArr","init","lineno","colno","typeOF","typeOFCapitalized","sendPayload","_error","errMessage","_warning","warn","warnMessage","_info","info","infoMessage","_debug","debugMessage"],"mappings":";;;;CAIA,SAAUA,EAAMC,GACQ,mBAAXC,QAAyBA,OAAOC,IACzCD,OAAO,GAAI,WACT,OAAOD,EAAQD,KAEW,iBAAZI,QAChBC,OAAOD,QAAUH,EAAQD,GAEzBA,EAAKM,QAAUL,EAAQD,GAR3B,CAUqB,oBAAXO,OAAyBA,OAA2B,oBAAXC,OAAyBA,OAASC,KAAM,SAASD,GAClG,aACA,IAiHME,EACAC,EACAC,EAnHFC,EAAa,WAGf,SAASC,EAAUC,GACjB,OAAQC,MAAMC,WAAWF,KAAOG,SAASH,GAG3C,SAASI,EAAYC,GACnB,OAAOA,EAAIC,OAAO,GAAGC,cAAgBF,EAAIG,UAAU,GAGrD,SAASC,EAAQC,GACf,OAAO,WACL,OAAOhB,KAAKgB,IAGhB,IAAIC,EAAe,CAAC,gBAAiB,SAAU,WAAY,cACvDC,EAAe,CAAC,eAAgB,cAChCC,EAAc,CAAC,WAAY,eAAgB,UAE3CC,EAAQH,EAAaI,OAAOH,EAAcC,EAD7B,CAAC,SAGlB,SAASf,EAAWkB,GAClB,GAAIA,aAAeC,OACjB,IAAK,IAAIC,EAAI,EAAGA,EAAIJ,EAAMK,OAAQD,IA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ASzJ,aAI9B,GAA2C,SAAvC2H,EAAQ9E,4BAAgF,UAAvC8E,EAAQ9E,2BAAwC,CACnG,IAAIyK,EAAQ7D,QAAQ8D,KACpB9D,QAAQ8D,KAAO,SAASC,GACtB,IAAIxC,EAAW,CACb9V,QAAWsY,EACXxN,UAAaA,WAEf4L,EAAuBhE,EAASnF,OAAQmF,EAASlF,MAAO6G,EAAiB,cAAeyB,GACxFsC,EAAM7F,MAAMgC,QAASzJ,YAGzB,GAA2C,UAAvC2H,EAAQ9E,2BAAwC,CAClD,IAAI4K,EAAShE,QAAQ9G,MACrB8G,QAAQ9G,MAAQ,SAAS+K,GACvB,IAAI1C,EAAW,CACb9V,QAAWwY,EACX1N,UAAaA,WAEf4L,EAAuBhE,EAASnF,OAAQmF,EAASlF,MAAO6G,EAAiB,QAASyB,GAClFyC,EAAOhG,MAAMgC,QAASzJ,eAK9B6H,EAAW8E,KAAKhF,GACZC,EAASjF,OACX8G,QAAQC,IAAI,KAAOzH,EAAcC,MAAOD,EAAcE,UAEjD0F,GAET,OAAI9F,GAAgBV,EAAO/P,eAAe,WAAa+P,EAAO/P,eAAe,SACpE,IAAIoW,EAEJA","sourcesContent":["/*!\r\n * elmah.io Javascript Logger - version 3.4.1\r\n * (c) 2018 elmah.io, Apache 2.0 License, https://elmah.io\r\n */\r\n\r\n(function (root, factory) {\r\n if (typeof define === 'function' && define.amd) {\r\n define([], function () {\r\n return factory(root);\r\n });\r\n } else if (typeof exports === 'object') {\r\n module.exports = factory(root);\r\n } else {\r\n root.Elmahio = factory(root);\r\n }\r\n})(typeof global !== 'undefined' ? global : typeof window !== 'undefined' ? window : this, function (window) {\r\n\r\n 'use strict';\r\n\r\n //\r\n // ==== STACKFRAME ====\r\n //\r\n\r\n var StackFrame = (function () {\r\n \"use strict\";\r\n function _isNumber(n) {\r\n return !isNaN(parseFloat(n)) && isFinite(n);\r\n }\r\n function _capitalize(str) {\r\n return str.charAt(0).toUpperCase() + str.substring(1);\r\n }\r\n function _getter(p) {\r\n return function () {\r\n return this[p];\r\n };\r\n }\r\n var booleanProps = [\"isConstructor\", \"isEval\", \"isNative\", \"isToplevel\"];\r\n var numericProps = [\"columnNumber\", \"lineNumber\"];\r\n var stringProps = [\"fileName\", \"functionName\", \"source\"];\r\n var arrayProps = [\"args\"];\r\n var props = booleanProps.concat(numericProps, stringProps, arrayProps);\r\n function StackFrame(obj) {\r\n if (obj instanceof Object) {\r\n for (var i = 0; i < props.length; i++) {\r\n if (obj.hasOwnProperty(props[i]) && obj[props[i]] !== undefined) {\r\n this[\"set\" + _capitalize(props[i])](obj[props[i]]);\r\n }\r\n }\r\n }\r\n }\r\n StackFrame.prototype = {\r\n getArgs: function () {\r\n return this.args;\r\n },\r\n setArgs: function (v) {\r\n if (Object.prototype.toString.call(v) !== \"[object Array]\") {\r\n throw new TypeError(\"Args must be an Array\");\r\n }\r\n this.args = v;\r\n },\r\n getEvalOrigin: function () {\r\n return this.evalOrigin;\r\n },\r\n setEvalOrigin: function (v) {\r\n if (v instanceof StackFrame) {\r\n this.evalOrigin = v;\r\n } else if (v instanceof Object) {\r\n this.evalOrigin = new StackFrame(v);\r\n } else {\r\n throw new TypeError(\"Eval Origin must be an Object or StackFrame\");\r\n }\r\n },\r\n toString: function () {\r\n var functionName = this.getFunctionName() || \"{anonymous}\";\r\n var args = \"(\" + (this.getArgs() || []).join(\",\") + \")\";\r\n var fileName = this.getFileName() ? \"@\" + this.getFileName() : \"\";\r\n var lineNumber = _isNumber(this.getLineNumber()) ? \":\" + this.getLineNumber() : \"\";\r\n var columnNumber = _isNumber(this.getColumnNumber()) ? \":\" + this.getColumnNumber() : \"\";\r\n return functionName + args + fileName + lineNumber + columnNumber;\r\n }\r\n };\r\n StackFrame.fromString = function StackFrame$$fromString(str) {\r\n var argsStartIndex = str.indexOf(\"(\");\r\n var argsEndIndex = str.lastIndexOf(\")\");\r\n var functionName = str.substring(0, argsStartIndex);\r\n var args = str.substring(argsStartIndex + 1, argsEndIndex).split(\",\");\r\n var locationString = str.substring(argsEndIndex + 1);\r\n if (locationString.indexOf(\"@\") === 0) {\r\n var parts = /@(.+?)(?::(\\d+))?(?::(\\d+))?$/.exec(locationString, \"\");\r\n var fileName = parts[1];\r\n var lineNumber = parts[2];\r\n var columnNumber = parts[3];\r\n }\r\n return new StackFrame({\r\n functionName: functionName,\r\n args: args || undefined,\r\n fileName: fileName,\r\n lineNumber: lineNumber || undefined,\r\n columnNumber: columnNumber || undefined\r\n });\r\n };\r\n for (var i = 0; i < booleanProps.length; i++) {\r\n StackFrame.prototype[\"get\" + _capitalize(booleanProps[i])] = _getter(booleanProps[i]);\r\n StackFrame.prototype[\"set\" + _capitalize(booleanProps[i])] = function (p) {\r\n return function (v) {\r\n this[p] = Boolean(v);\r\n };\r\n }(booleanProps[i]);\r\n }\r\n for (var j = 0; j < numericProps.length; j++) {\r\n StackFrame.prototype[\"get\" + _capitalize(numericProps[j])] = _getter(numericProps[j]);\r\n StackFrame.prototype[\"set\" + _capitalize(numericProps[j])] = function (p) {\r\n return function (v) {\r\n if (!_isNumber(v)) {\r\n throw new TypeError(p + \" must be a Number\");\r\n }\r\n this[p] = Number(v);\r\n };\r\n }(numericProps[j]);\r\n }\r\n for (var k = 0; k < stringProps.length; k++) {\r\n StackFrame.prototype[\"get\" + _capitalize(stringProps[k])] = _getter(stringProps[k]);\r\n StackFrame.prototype[\"set\" + _capitalize(stringProps[k])] = function (p) {\r\n return function (v) {\r\n this[p] = String(v);\r\n };\r\n }(stringProps[k]);\r\n }\r\n return StackFrame;\r\n })();\r\n\r\n //\r\n // ==== ERROR STACK PARSER ====\r\n //\r\n\r\n var ErrorStackParser = (function () {\r\n \"use strict\";\r\n var FIREFOX_SAFARI_STACK_REGEXP = /(^|@)\\S+\\:\\d+/;\r\n var CHROME_IE_STACK_REGEXP = /^\\s*at .*(\\S+\\:\\d+|\\(native\\))/m;\r\n var SAFARI_NATIVE_CODE_REGEXP = /^(eval@)?(\\[native code\\])?$/;\r\n return {\r\n /**\r\n * Given an Error object, extract the most information from it.\r\n *\r\n * @param {Error} error object\r\n * @return {Array} of StackFrames\r\n */\r\n parse: function ErrorStackParser$$parse(error) {\r\n if (typeof error.stacktrace !== \"undefined\" || typeof error[\"opera#sourceloc\"] !== \"undefined\") {\r\n return this.parseOpera(error);\r\n } else if (error.stack && error.stack.match(CHROME_IE_STACK_REGEXP)) {\r\n return this.parseV8OrIE(error);\r\n } else if (error.stack) {\r\n return this.parseFFOrSafari(error);\r\n } else {\r\n throw new Error(\"Cannot parse given Error object\");\r\n }\r\n },\r\n // Separate line and column numbers from a string of the form: (URI:Line:Column)\r\n extractLocation: function ErrorStackParser$$extractLocation(urlLike) {\r\n // Fail-fast but return locations like \"(native)\"\r\n if (urlLike.indexOf(\":\") === -1) {\r\n return [urlLike];\r\n }\r\n var regExp = /(.+?)(?:\\:(\\d+))?(?:\\:(\\d+))?$/;\r\n var parts = regExp.exec(urlLike.replace(/[\\(\\)]/g, \"\"));\r\n return [parts[1], parts[2] || undefined, parts[3] || undefined];\r\n },\r\n parseV8OrIE: function ErrorStackParser$$parseV8OrIE(error) {\r\n var filtered = error.stack.split(\"\\n\").filter(function (line) {\r\n return !!line.match(CHROME_IE_STACK_REGEXP);\r\n }, this);\r\n return filtered.map(function (line) {\r\n if (line.indexOf(\"(eval \") > -1) {\r\n // Throw away eval information until we implement stacktrace.js/stackframe#8\r\n line = line.replace(/eval code/g, \"eval\").replace(/(\\(eval at [^\\()]*)|(\\)\\,.*$)/g, \"\");\r\n }\r\n var tokens = line.replace(/^\\s+/, \"\").replace(/\\(eval code/g, \"(\").split(/\\s+/).slice(1);\r\n var locationParts = this.extractLocation(tokens.pop());\r\n var functionName = tokens.join(\" \") || undefined;\r\n var fileName = [\"eval\", \"\"].indexOf(locationParts[0]) > -1 ? undefined : locationParts[0];\r\n return new StackFrame({\r\n functionName: functionName,\r\n fileName: fileName,\r\n lineNumber: locationParts[1],\r\n columnNumber: locationParts[2],\r\n source: line\r\n });\r\n }, this);\r\n },\r\n parseFFOrSafari: function ErrorStackParser$$parseFFOrSafari(error) {\r\n var filtered = error.stack.split(\"\\n\").filter(function (line) {\r\n return !line.match(SAFARI_NATIVE_CODE_REGEXP);\r\n }, this);\r\n return filtered.map(function (line) {\r\n // Throw away eval information until we implement stacktrace.js/stackframe#8\r\n if (line.indexOf(\" > eval\") > -1) {\r\n line = line.replace(/ line (\\d+)(?: > eval line \\d+)* > eval\\:\\d+\\:\\d+/g, \":$1\");\r\n }\r\n if (line.indexOf(\"@\") === -1 && line.indexOf(\":\") === -1) {\r\n // Safari eval frames only have function names and nothing else\r\n return new StackFrame({\r\n functionName: line\r\n });\r\n } else {\r\n var functionNameRegex = /((.*\".+\"[^@]*)?[^@]*)(?:@)/;\r\n var matches = line.match(functionNameRegex);\r\n var functionName = matches && matches[1] ? matches[1] : undefined;\r\n var locationParts = this.extractLocation(line.replace(functionNameRegex, \"\"));\r\n return new StackFrame({\r\n functionName: functionName,\r\n fileName: locationParts[0],\r\n lineNumber: locationParts[1],\r\n columnNumber: locationParts[2],\r\n source: line\r\n });\r\n }\r\n }, this);\r\n },\r\n parseOpera: function ErrorStackParser$$parseOpera(e) {\r\n if (!e.stacktrace || e.message.indexOf(\"\\n\") > -1 && e.message.split(\"\\n\").length > e.stacktrace.split(\"\\n\").length) {\r\n return this.parseOpera9(e);\r\n } else if (!e.stack) {\r\n return this.parseOpera10(e);\r\n } else {\r\n return this.parseOpera11(e);\r\n }\r\n },\r\n parseOpera9: function ErrorStackParser$$parseOpera9(e) {\r\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)/i;\r\n var lines = e.message.split(\"\\n\");\r\n var result = [];\r\n for (var i = 2, len = lines.length; i < len; i += 2) {\r\n var match = lineRE.exec(lines[i]);\r\n if (match) {\r\n result.push(new StackFrame({\r\n fileName: match[2],\r\n lineNumber: match[1],\r\n source: lines[i]\r\n }));\r\n }\r\n }\r\n return result;\r\n },\r\n parseOpera10: function ErrorStackParser$$parseOpera10(e) {\r\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)(?:: In function (\\S+))?$/i;\r\n var lines = e.stacktrace.split(\"\\n\");\r\n var result = [];\r\n for (var i = 0, len = lines.length; i < len; i += 2) {\r\n var match = lineRE.exec(lines[i]);\r\n if (match) {\r\n result.push(new StackFrame({\r\n functionName: match[3] || undefined,\r\n fileName: match[2],\r\n lineNumber: match[1],\r\n source: lines[i]\r\n }));\r\n }\r\n }\r\n return result;\r\n },\r\n // Opera 10.65+ Error.stack very similar to FF/Safari\r\n parseOpera11: function ErrorStackParser$$parseOpera11(error) {\r\n var filtered = error.stack.split(\"\\n\").filter(function (line) {\r\n return !!line.match(FIREFOX_SAFARI_STACK_REGEXP) && !line.match(/^Error created at/);\r\n }, this);\r\n return filtered.map(function (line) {\r\n var tokens = line.split(\"@\");\r\n var locationParts = this.extractLocation(tokens.pop());\r\n var functionCall = tokens.shift() || \"\";\r\n var functionName = functionCall.replace(//, \"$2\").replace(/\\([^\\)]*\\)/g, \"\") || undefined;\r\n var argsRaw;\r\n if (functionCall.match(/\\(([^\\)]*)\\)/)) {\r\n argsRaw = functionCall.replace(/^[^\\(]+\\(([^\\)]*)\\)$/, \"$1\");\r\n }\r\n var args = argsRaw === undefined || argsRaw === \"[arguments not available]\" ? undefined : argsRaw.split(\",\");\r\n return new StackFrame({\r\n functionName: functionName,\r\n args: args,\r\n fileName: locationParts[0],\r\n lineNumber: locationParts[1],\r\n columnNumber: locationParts[2],\r\n source: line\r\n });\r\n }, this);\r\n }\r\n };\r\n })();\r\n\r\n //\r\n // ==== STACKTRACE-GPS ====\r\n //\r\n\r\n var SourceMap = function(e){var n={};function r(t){if(n[t])return n[t].exports;var o=n[t]={exports:{},id:t,loaded:!1};return e[t].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}return r.m=e,r.c=n,r.p=\"\",r(0)}([function(e,n,r){var t=r(1),o=r(2),i=r(3).ArraySet,a=r(4),s=r(6).quickSort;function u(e){var n=e;return\"string\"==typeof e&&(n=JSON.parse(e.replace(/^\\)\\]\\}'/,\"\"))),null!=n.sections?new c(n):new l(n)}function l(e){var n=e;\"string\"==typeof e&&(n=JSON.parse(e.replace(/^\\)\\]\\}'/,\"\")));var r=t.getArg(n,\"version\"),o=t.getArg(n,\"sources\"),a=t.getArg(n,\"names\",[]),s=t.getArg(n,\"sourceRoot\",null),u=t.getArg(n,\"sourcesContent\",null),l=t.getArg(n,\"mappings\"),g=t.getArg(n,\"file\",null);if(r!=this._version)throw new Error(\"Unsupported version: \"+r);o=o.map(String).map(t.normalize).map(function(e){return s&&t.isAbsolute(s)&&t.isAbsolute(e)?t.relative(s,e):e}),this._names=i.fromArray(a.map(String),!0),this._sources=i.fromArray(o,!0),this.sourceRoot=s,this.sourcesContent=u,this._mappings=l,this.file=g}function g(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}function c(e){var n=e;\"string\"==typeof e&&(n=JSON.parse(e.replace(/^\\)\\]\\}'/,\"\")));var r=t.getArg(n,\"version\"),o=t.getArg(n,\"sections\");if(r!=this._version)throw new Error(\"Unsupported version: \"+r);this._sources=new i,this._names=new i;var a={line:-1,column:0};this._sections=o.map(function(e){if(e.url)throw new Error(\"Support for url field in sections not implemented.\");var n=t.getArg(e,\"offset\"),r=t.getArg(n,\"line\"),o=t.getArg(n,\"column\");if(r=0){var s=this._originalMappings[a];if(void 0===e.column)for(var u=s.originalLine;s&&s.originalLine===u;)i.push({line:t.getArg(s,\"generatedLine\",null),column:t.getArg(s,\"generatedColumn\",null),lastColumn:t.getArg(s,\"lastGeneratedColumn\",null)}),s=this._originalMappings[++a];else for(var l=s.originalColumn;s&&s.originalLine===n&&s.originalColumn==l;)i.push({line:t.getArg(s,\"generatedLine\",null),column:t.getArg(s,\"generatedColumn\",null),lastColumn:t.getArg(s,\"lastGeneratedColumn\",null)}),s=this._originalMappings[++a]}return i},n.SourceMapConsumer=u,l.prototype=Object.create(u.prototype),l.prototype.consumer=u,l.fromSourceMap=function(e){var n=Object.create(l.prototype),r=n._names=i.fromArray(e._names.toArray(),!0),o=n._sources=i.fromArray(e._sources.toArray(),!0);n.sourceRoot=e._sourceRoot,n.sourcesContent=e._generateSourcesContent(n._sources.toArray(),n.sourceRoot),n.file=e._file;for(var a=e._mappings.toArray().slice(),u=n.__generatedMappings=[],c=n.__originalMappings=[],p=0,h=a.length;p1&&(r.source=d+i[1],d+=i[1],r.originalLine=h+i[2],h=r.originalLine,r.originalLine+=1,r.originalColumn=f+i[3],f=r.originalColumn,i.length>4&&(r.name=m+i[4],m+=i[4])),L.push(r),\"number\"==typeof r.originalLine&&y.push(r)}s(L,t.compareByGeneratedPositionsDeflated),this.__generatedMappings=L,s(y,t.compareByOriginalPositions),this.__originalMappings=y},l.prototype._findMapping=function(e,n,r,t,i,a){if(e[r]<=0)throw new TypeError(\"Line must be greater than or equal to 1, got \"+e[r]);if(e[t]<0)throw new TypeError(\"Column must be greater than or equal to 0, got \"+e[t]);return o.search(e,n,i,a)},l.prototype.computeColumnSpans=function(){for(var e=0;e=0){var o=this._generatedMappings[r];if(o.generatedLine===n.generatedLine){var i=t.getArg(o,\"source\",null);null!==i&&(i=this._sources.at(i),null!=this.sourceRoot&&(i=t.join(this.sourceRoot,i)));var a=t.getArg(o,\"name\",null);return null!==a&&(a=this._names.at(a)),{source:i,line:t.getArg(o,\"originalLine\",null),column:t.getArg(o,\"originalColumn\",null),name:a}}}return{source:null,line:null,column:null,name:null}},l.prototype.hasContentsOfAllSources=function(){return!!this.sourcesContent&&(this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return null==e}))},l.prototype.sourceContentFor=function(e,n){if(!this.sourcesContent)return null;if(null!=this.sourceRoot&&(e=t.relative(this.sourceRoot,e)),this._sources.has(e))return this.sourcesContent[this._sources.indexOf(e)];var r;if(null!=this.sourceRoot&&(r=t.urlParse(this.sourceRoot))){var o=e.replace(/^file:\\/\\//,\"\");if(\"file\"==r.scheme&&this._sources.has(o))return this.sourcesContent[this._sources.indexOf(o)];if((!r.path||\"/\"==r.path)&&this._sources.has(\"/\"+e))return this.sourcesContent[this._sources.indexOf(\"/\"+e)]}if(n)return null;throw new Error('\"'+e+'\" is not in the SourceMap.')},l.prototype.generatedPositionFor=function(e){var n=t.getArg(e,\"source\");if(null!=this.sourceRoot&&(n=t.relative(this.sourceRoot,n)),!this._sources.has(n))return{line:null,column:null,lastColumn:null};var r={source:n=this._sources.indexOf(n),originalLine:t.getArg(e,\"line\"),originalColumn:t.getArg(e,\"column\")},o=this._findMapping(r,this._originalMappings,\"originalLine\",\"originalColumn\",t.compareByOriginalPositions,t.getArg(e,\"bias\",u.GREATEST_LOWER_BOUND));if(o>=0){var i=this._originalMappings[o];if(i.source===r.source)return{line:t.getArg(i,\"generatedLine\",null),column:t.getArg(i,\"generatedColumn\",null),lastColumn:t.getArg(i,\"lastGeneratedColumn\",null)}}return{line:null,column:null,lastColumn:null}},n.BasicSourceMapConsumer=l,c.prototype=Object.create(u.prototype),c.prototype.constructor=u,c.prototype._version=3,Object.defineProperty(c.prototype,\"sources\",{get:function(){for(var e=[],n=0;n=0;g--)\".\"===(a=u[g])?u.splice(g,1):\"..\"===a?l++:l>0&&(\"\"===a?(u.splice(g+1,l),l=0):(u.splice(g,2),l--));return\"\"===(r=u.join(\"/\"))&&(r=s?\"/\":\".\"),t?(t.path=r,i(t)):r}n.urlParse=o,n.urlGenerate=i,n.normalize=a,n.join=function(e,n){\"\"===e&&(e=\".\"),\"\"===n&&(n=\".\");var r=o(n),s=o(e);if(s&&(e=s.path||\"/\"),r&&!r.scheme)return s&&(r.scheme=s.scheme),i(r);if(r||n.match(t))return n;if(s&&!s.host&&!s.path)return s.host=n,i(s);var u=\"/\"===n.charAt(0)?n:a(e.replace(/\\/+$/,\"\")+\"/\"+n);return s?(s.path=u,i(s)):u},n.isAbsolute=function(e){return\"/\"===e.charAt(0)||!!e.match(r)},n.relative=function(e,n){\"\"===e&&(e=\".\"),e=e.replace(/\\/$/,\"\");for(var r=0;0!==n.indexOf(e+\"/\");){var t=e.lastIndexOf(\"/\");if(t<0)return n;if((e=e.slice(0,t)).match(/^([^\\/]+:\\/)?\\/*$/))return n;++r}return Array(r+1).join(\"../\")+n.substr(e.length+1)};var s=!(\"__proto__\"in Object.create(null));function u(e){return e}function l(e){if(!e)return!1;var n=e.length;if(n<9)return!1;if(95!==e.charCodeAt(n-1)||95!==e.charCodeAt(n-2)||111!==e.charCodeAt(n-3)||116!==e.charCodeAt(n-4)||111!==e.charCodeAt(n-5)||114!==e.charCodeAt(n-6)||112!==e.charCodeAt(n-7)||95!==e.charCodeAt(n-8)||95!==e.charCodeAt(n-9))return!1;for(var r=n-10;r>=0;r--)if(36!==e.charCodeAt(r))return!1;return!0}function g(e,n){return e===n?0:e>n?1:-1}n.toSetString=s?u:function(e){return l(e)?\"$\"+e:e},n.fromSetString=s?u:function(e){return l(e)?e.slice(1):e},n.compareByOriginalPositions=function(e,n,r){var t=e.source-n.source;return 0!==t?t:0!=(t=e.originalLine-n.originalLine)?t:0!=(t=e.originalColumn-n.originalColumn)||r?t:0!=(t=e.generatedColumn-n.generatedColumn)?t:0!=(t=e.generatedLine-n.generatedLine)?t:e.name-n.name},n.compareByGeneratedPositionsDeflated=function(e,n,r){var t=e.generatedLine-n.generatedLine;return 0!==t?t:0!=(t=e.generatedColumn-n.generatedColumn)||r?t:0!=(t=e.source-n.source)?t:0!=(t=e.originalLine-n.originalLine)?t:0!=(t=e.originalColumn-n.originalColumn)?t:e.name-n.name},n.compareByGeneratedPositionsInflated=function(e,n){var r=e.generatedLine-n.generatedLine;return 0!==r?r:0!=(r=e.generatedColumn-n.generatedColumn)?r:0!==(r=g(e.source,n.source))?r:0!=(r=e.originalLine-n.originalLine)?r:0!=(r=e.originalColumn-n.originalColumn)?r:g(e.name,n.name)}},function(e,n){n.GREATEST_LOWER_BOUND=1,n.LEAST_UPPER_BOUND=2,n.search=function(e,r,t,o){if(0===r.length)return-1;var i=function e(r,t,o,i,a,s){var u=Math.floor((t-r)/2)+r,l=a(o,i[u],!0);return 0===l?u:l>0?t-u>1?e(u,t,o,i,a,s):s==n.LEAST_UPPER_BOUND?t1?e(r,u,o,i,a,s):s==n.LEAST_UPPER_BOUND?u:r<0?-1:r}(-1,r.length,e,r,t,o||n.GREATEST_LOWER_BOUND);if(i<0)return-1;for(;i-1>=0&&0===t(r[i],r[i-1],!0);)--i;return i}},function(e,n,r){var t=r(1),o=Object.prototype.hasOwnProperty;function i(){this._array=[],this._set=Object.create(null)}i.fromArray=function(e,n){for(var r=new i,t=0,o=e.length;t=0&&e>>=5)>0&&(n|=32),o+=t.encode(n)}while(i>0);return o},n.decode=function(e,n,r){var o,i,a,s,u=e.length,l=0,g=0;do{if(n>=u)throw new Error(\"Expected more digits in base 64 VLQ value.\");if(-1===(i=t.decode(e.charCodeAt(n++))))throw new Error(\"Invalid base64 digit: \"+e.charAt(n-1));o=!!(32&i),l+=(i&=31)<>1,1==(1&a)?-s:s),r.rest=n}},function(e,n){var r=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\".split(\"\");n.encode=function(e){if(0<=e&&e= 200 && req.status < 300 || url.substr(0, 7) === \"file://\" && req.responseText) {\r\n resolve(req.responseText);\r\n } else {\r\n reject(new Error(\"HTTP status: \" + req.status + \" retrieving \" + url));\r\n }\r\n }\r\n };\r\n req.send();\r\n });\r\n }\r\n /**\r\n * Convert a Base64-encoded string into its original representation.\r\n * Used for inline sourcemaps.\r\n *\r\n * @param {String} b64str Base-64 encoded string\r\n * @returns {String} original representation of the base64-encoded string.\r\n */\r\n function _atob(b64str) {\r\n if (typeof window !== \"undefined\" && window.atob) {\r\n return window.atob(b64str);\r\n } else {\r\n throw new Error(\"You must supply a polyfill for window.atob in this environment\");\r\n }\r\n }\r\n function _parseJson(string) {\r\n if (typeof JSON !== \"undefined\" && JSON.parse) {\r\n return JSON.parse(string);\r\n } else {\r\n throw new Error(\"You must supply a polyfill for JSON.parse in this environment\");\r\n }\r\n }\r\n function _findFunctionName(source, lineNumber) {\r\n var syntaxes = [ // {name} = function ({args}) TODO args capture\r\n /['\"]?([$_A-Za-z][$_A-Za-z0-9]*)['\"]?\\s*[:=]\\s*function\\b/, // function {name}({args}) m[1]=name m[2]=args\r\n /function\\s+([^('\"`]*?)\\s*\\(([^)]*)\\)/, // {name} = eval()\r\n /['\"]?([$_A-Za-z][$_A-Za-z0-9]*)['\"]?\\s*[:=]\\s*(?:eval|new Function)\\b/, // fn_name() {\r\n /\\b(?!(?:if|for|switch|while|with|catch)\\b)(?:(?:static)\\s+)?(\\S+)\\s*\\(.*?\\)\\s*\\{/, // {name} = () => {\r\n /['\"]?([$_A-Za-z][$_A-Za-z0-9]*)['\"]?\\s*[:=]\\s*\\(.*?\\)\\s*=>/];\r\n var lines = source.split(\"\\n\");\r\n // Walk backwards in the source lines until we find the line which matches one of the patterns above\r\n var code = \"\";\r\n var maxLines = Math.min(lineNumber, 20);\r\n for (var i = 0; i < maxLines; ++i) {\r\n // lineNo is 1-based, source[] is 0-based\r\n var line = lines[lineNumber - i - 1];\r\n var commentPos = line.indexOf(\"//\");\r\n if (commentPos >= 0) {\r\n line = line.substr(0, commentPos);\r\n }\r\n if (line) {\r\n code = line + code;\r\n var len = syntaxes.length;\r\n for (var index = 0; index < len; index++) {\r\n var m = syntaxes[index].exec(code);\r\n if (m && m[1]) {\r\n return m[1];\r\n }\r\n }\r\n }\r\n }\r\n return undefined;\r\n }\r\n function _ensureSupportedEnvironment() {\r\n if (typeof Object.defineProperty !== \"function\" || typeof Object.create !== \"function\") {\r\n throw new Error(\"Unable to consume source maps in older browsers\");\r\n }\r\n }\r\n function _ensureStackFrameIsLegit(stackframe) {\r\n if (typeof stackframe !== \"object\") {\r\n throw new TypeError(\"Given StackFrame is not an object\");\r\n } else if (typeof stackframe.fileName !== \"string\") {\r\n throw new TypeError(\"Given file name is not a String\");\r\n } else if (typeof stackframe.lineNumber !== \"number\" || stackframe.lineNumber % 1 !== 0 || stackframe.lineNumber < 1) {\r\n throw new TypeError(\"Given line number must be a positive integer\");\r\n } else if (typeof stackframe.columnNumber !== \"number\" || stackframe.columnNumber % 1 !== 0 || stackframe.columnNumber < 0) {\r\n throw new TypeError(\"Given column number must be a non-negative integer\");\r\n }\r\n return true;\r\n }\r\n function _findSourceMappingURL(source) {\r\n var sourceMappingUrlRegExp = /\\/\\/[#@] ?sourceMappingURL=([^\\s'\"]+)\\s*$/gm;\r\n var lastSourceMappingUrl;\r\n var matchSourceMappingUrl;\r\n while (matchSourceMappingUrl = sourceMappingUrlRegExp.exec(source)) {\r\n // jshint ignore:line\r\n lastSourceMappingUrl = matchSourceMappingUrl[1];\r\n }\r\n if (lastSourceMappingUrl) {\r\n return lastSourceMappingUrl;\r\n } else {\r\n throw new Error(\"sourceMappingURL not found\");\r\n }\r\n }\r\n function _extractLocationInfoFromSourceMapSource(stackframe, sourceMapConsumer, sourceCache) {\r\n return new Promise(function (resolve, reject) {\r\n var loc = sourceMapConsumer.originalPositionFor({\r\n line: stackframe.lineNumber,\r\n column: stackframe.columnNumber\r\n });\r\n if (loc.source) {\r\n // cache mapped sources\r\n var mappedSource = sourceMapConsumer.sourceContentFor(loc.source);\r\n if (mappedSource) {\r\n sourceCache[loc.source] = mappedSource;\r\n }\r\n resolve(// given stackframe and source location, update stackframe\r\n new StackFrame({\r\n functionName: loc.name || stackframe.functionName,\r\n args: stackframe.args,\r\n fileName: loc.source,\r\n lineNumber: loc.line,\r\n columnNumber: loc.column\r\n }));\r\n } else {\r\n reject(new Error(\"Could not get original source for given stackframe and source map\"));\r\n }\r\n });\r\n }\r\n /**\r\n * @constructor\r\n * @param {Object} opts\r\n * opts.sourceCache = {url: \"Source String\"} => preload source cache\r\n * opts.sourceMapConsumerCache = {/path/file.js.map: SourceMapConsumer}\r\n * opts.offline = True to prevent network requests.\r\n * Best effort without sources or source maps.\r\n * opts.ajax = Promise returning function to make X-Domain requests\r\n */\r\n return function StackTraceGPS(opts) {\r\n if (!(this instanceof StackTraceGPS)) {\r\n return new StackTraceGPS(opts);\r\n }\r\n opts = opts || {};\r\n this.sourceCache = opts.sourceCache || {};\r\n this.sourceMapConsumerCache = opts.sourceMapConsumerCache || {};\r\n this.ajax = opts.ajax || _xdr;\r\n this._atob = opts.atob || _atob;\r\n\r\n this._get = function _get(location) {\r\n return new Promise(function (resolve, reject) {\r\n var isDataUrl = location.substr(0, 5) === \"data:\";\r\n if (this.sourceCache[location]) {\r\n resolve(this.sourceCache[location]);\r\n } else if (opts.offline && !isDataUrl) {\r\n reject(new Error(\"Cannot make network requests in offline mode\"));\r\n } else {\r\n if (isDataUrl) {\r\n // data URLs can have parameters.\r\n // see http://tools.ietf.org/html/rfc2397\r\n var supportedEncodingRegexp = /^data:application\\/json;([\\w=:\"-]+;)*base64,/;\r\n var match = location.match(supportedEncodingRegexp);\r\n if (match) {\r\n var sourceMapStart = match[0].length;\r\n var encodedSource = location.substr(sourceMapStart);\r\n var source = this._atob(encodedSource);\r\n this.sourceCache[location] = source;\r\n resolve(source);\r\n } else {\r\n reject(new Error(\"The encoding of the inline sourcemap is not supported\"));\r\n }\r\n } else {\r\n var xhrPromise = this.ajax(location, {\r\n method: \"get\"\r\n });\r\n // Cache the Promise to prevent duplicate in-flight requests\r\n this.sourceCache[location] = xhrPromise;\r\n xhrPromise.then(resolve, reject);\r\n }\r\n }\r\n }.bind(this));\r\n };\r\n /**\r\n * Creating SourceMapConsumers is expensive, so this wraps the creation of a\r\n * SourceMapConsumer in a per-instance cache.\r\n *\r\n * @param {String} sourceMappingURL = URL to fetch source map from\r\n * @param {String} defaultSourceRoot = Default source root for source map if undefined\r\n * @returns {Promise} that resolves a SourceMapConsumer\r\n */\r\n this._getSourceMapConsumer = function _getSourceMapConsumer(sourceMappingURL, defaultSourceRoot) {\r\n return new Promise(function (resolve, reject) {\r\n if (this.sourceMapConsumerCache[sourceMappingURL]) {\r\n resolve(this.sourceMapConsumerCache[sourceMappingURL]);\r\n } else {\r\n var sourceMapConsumerPromise = new Promise(function (resolve, reject) {\r\n return this._get(sourceMappingURL).then(function (sourceMapSource) {\r\n if (typeof sourceMapSource === \"string\") {\r\n sourceMapSource = _parseJson(sourceMapSource.replace(/^\\)\\]\\}'/, \"\"));\r\n }\r\n if (typeof sourceMapSource.sourceRoot === \"undefined\") {\r\n sourceMapSource.sourceRoot = defaultSourceRoot;\r\n }\r\n resolve(new SourceMap.SourceMapConsumer(sourceMapSource));\r\n }, reject);\r\n }.bind(this));\r\n this.sourceMapConsumerCache[sourceMappingURL] = sourceMapConsumerPromise;\r\n resolve(sourceMapConsumerPromise);\r\n }\r\n }.bind(this));\r\n };\r\n /**\r\n * Given a StackFrame, enhance function name and use source maps for a\r\n * better StackFrame.\r\n *\r\n * @param {StackFrame} stackframe object\r\n * @returns {Promise} that resolves with with source-mapped StackFrame\r\n */\r\n this.pinpoint = function StackTraceGPS$$pinpoint(stackframe) {\r\n return new Promise(function (resolve, reject) {\r\n this.getMappedLocation(stackframe).then(function (mappedStackFrame) {\r\n function resolveMappedStackFrame() {\r\n resolve(mappedStackFrame);\r\n }\r\n this.findFunctionName(mappedStackFrame).then(resolve, resolveMappedStackFrame)[\"catch\"](resolveMappedStackFrame);\r\n }.bind(this), reject);\r\n }.bind(this));\r\n };\r\n /**\r\n * Given a StackFrame, guess function name from location information.\r\n *\r\n * @param {StackFrame} stackframe\r\n * @returns {Promise} that resolves with enhanced StackFrame.\r\n */\r\n this.findFunctionName = function StackTraceGPS$$findFunctionName(stackframe) {\r\n return new Promise(function (resolve, reject) {\r\n _ensureStackFrameIsLegit(stackframe);\r\n this._get(stackframe.fileName).then(function getSourceCallback(source) {\r\n var lineNumber = stackframe.lineNumber;\r\n var columnNumber = stackframe.columnNumber;\r\n var guessedFunctionName = _findFunctionName(source, lineNumber, columnNumber);\r\n // Only replace functionName if we found something\r\n if (guessedFunctionName) {\r\n resolve(new StackFrame({\r\n functionName: guessedFunctionName,\r\n args: stackframe.args,\r\n fileName: stackframe.fileName,\r\n lineNumber: lineNumber,\r\n columnNumber: columnNumber\r\n }));\r\n } else {\r\n resolve(stackframe);\r\n }\r\n }, reject)[\"catch\"](reject);\r\n }.bind(this));\r\n };\r\n /**\r\n * Given a StackFrame, seek source-mapped location and return new enhanced StackFrame.\r\n *\r\n * @param {StackFrame} stackframe\r\n * @returns {Promise} that resolves with enhanced StackFrame.\r\n */\r\n this.getMappedLocation = function StackTraceGPS$$getMappedLocation(stackframe) {\r\n return new Promise(function (resolve, reject) {\r\n _ensureSupportedEnvironment();\r\n _ensureStackFrameIsLegit(stackframe);\r\n var sourceCache = this.sourceCache;\r\n var fileName = stackframe.fileName;\r\n this._get(fileName).then(function (source) {\r\n var sourceMappingURL = _findSourceMappingURL(source);\r\n var isDataUrl = sourceMappingURL.substr(0, 5) === \"data:\";\r\n var defaultSourceRoot = fileName.substring(0, fileName.lastIndexOf(\"/\") + 1);\r\n if (sourceMappingURL[0] !== \"/\" && !isDataUrl && !/^https?:\\/\\/|^\\/\\//i.test(sourceMappingURL)) {\r\n sourceMappingURL = defaultSourceRoot + sourceMappingURL;\r\n }\r\n return this._getSourceMapConsumer(sourceMappingURL, defaultSourceRoot).then(function (sourceMapConsumer) {\r\n return _extractLocationInfoFromSourceMapSource(stackframe, sourceMapConsumer, sourceCache).then(resolve)[\"catch\"](function () {\r\n resolve(stackframe);\r\n });\r\n });\r\n }.bind(this), reject)[\"catch\"](reject);\r\n }.bind(this));\r\n };\r\n };\r\n })(SourceMap, StackFrame);\r\n\r\n //\r\n // Shared Variables\r\n //\r\n\r\n var scriptFile = document.getElementsByTagName('script');\r\n var scriptIndex = scriptFile.length - 1;\r\n var myScript = scriptFile[scriptIndex];\r\n var queryString = myScript.src.replace(/^[^\\?]+\\??/, '');\r\n var params = parseQuery(queryString);\r\n var paramsLength = objectLength(params);\r\n\r\n var debugSettings = {\r\n label: ' elmah.io debugger : On ',\r\n labelCSS: 'background: #06a89c; color: #ffffff; display: inline-block; font-size: 14px;',\r\n successCSS: 'background: #d4edda; color: #155724; display: inline-block; font-size: 13px;',\r\n errorCSS: 'background: #f8d7da; color: #721c24; display: inline-block; font-size: 13px;',\r\n warningCSS: 'background: #fff3cd; color: #856404; display: inline-block; font-size: 13px;',\r\n lightCSS: 'background: #e2e3e5; color: #383d41; display: inline-block; font-size: 13px;'\r\n };\r\n\r\n var defaults = {\r\n apiKey: null,\r\n logId: null,\r\n debug: false,\r\n application: null,\r\n filter: null,\r\n captureConsoleMinimumLevel: 'none'\r\n };\r\n\r\n //\r\n // Shared Methods\r\n //\r\n\r\n var extend = function () {\r\n\r\n // Variables\r\n var extended = {};\r\n var deep = false;\r\n var i = 0;\r\n\r\n // Check if a deep merge\r\n if (Object.prototype.toString.call(arguments[0]) === '[object Boolean]') {\r\n deep = arguments[0];\r\n i++;\r\n }\r\n\r\n // Merge the object into the extended object\r\n var merge = function (obj) {\r\n for (var prop in obj) {\r\n if (obj.hasOwnProperty(prop)) {\r\n // If property is an object, merge properties\r\n if (deep && Object.prototype.toString.call(obj[prop]) === '[object Object]') {\r\n extended[prop] = extend(extended[prop], obj[prop]);\r\n } else {\r\n extended[prop] = obj[prop];\r\n }\r\n }\r\n }\r\n };\r\n\r\n // Loop through each object and conduct a merge\r\n for (; i < arguments.length; i++) {\r\n var obj = arguments[i];\r\n merge(obj);\r\n }\r\n\r\n return extended;\r\n\r\n };\r\n\r\n //\r\n // Helpers\r\n //\r\n\r\n function parseQuery(query) {\r\n var Params = new Object();\r\n if (!query) return Params; // return empty object\r\n var Pairs = query.split(/[;&]/);\r\n for (var i = 0; i < Pairs.length; i++) {\r\n var KeyVal = Pairs[i].split('=');\r\n if (!KeyVal || KeyVal.length !== 2) continue;\r\n var key = unescape(KeyVal[0]);\r\n var val = unescape(KeyVal[1]);\r\n val = val.replace(/\\+/g, ' ');\r\n Params[key] = val;\r\n }\r\n return Params;\r\n }\r\n\r\n function objectLength(obj) {\r\n var size = 0, key;\r\n for (key in obj) {\r\n if (obj.hasOwnProperty(key)) size++;\r\n }\r\n return size;\r\n };\r\n\r\n function getSearchParameters() {\r\n var prmstr = window.location.search.substr(1);\r\n return prmstr !== null && prmstr !== \"\" ? transformToAssocArray(prmstr) : {};\r\n }\r\n\r\n function transformToAssocArray(prmstr) {\r\n var params = [];\r\n var prmarr = prmstr.split(\"&\");\r\n for (var i = 0; i < prmarr.length; i++) {\r\n var tmparr = prmarr[i].split(\"=\");\r\n params.push({\r\n 'key': tmparr[0],\r\n 'value': tmparr[1]\r\n });\r\n }\r\n return params;\r\n }\r\n\r\n function merge_objects(obj1, obj2) {\r\n var obj3 = {};\r\n for (var attrname1 in obj1) {\r\n obj3[attrname1] = obj1[attrname1];\r\n }\r\n for (var attrname2 in obj2) {\r\n obj3[attrname2] = obj2[attrname2];\r\n }\r\n\r\n return obj3;\r\n }\r\n\r\n // sprintf-js\r\n var sprintfjs = function() {\r\n 'use strict'\r\n var app = {};\r\n var re = {\r\n not_string: /[^s]/,\r\n not_bool: /[^t]/,\r\n not_type: /[^T]/,\r\n not_primitive: /[^v]/,\r\n number: /[diefg]/,\r\n numeric_arg: /[bcdiefguxX]/,\r\n json: /[j]/,\r\n not_json: /[^j]/,\r\n text: /^[^\\x25]+/,\r\n modulo: /^\\x25{2}/,\r\n placeholder: /^\\x25(?:([1-9]\\d*)\\$|\\(([^)]+)\\))?(\\+)?(0|'[^$])?(-)?(\\d+)?(?:\\.(\\d+))?([b-gijostTuvxX])/,\r\n key: /^([a-z_][a-z_\\d]*)/i,\r\n key_access: /^\\.([a-z_][a-z_\\d]*)/i,\r\n index_access: /^\\[(\\d+)\\]/,\r\n sign: /^[+-]/,\r\n mod: /^\\x25\\s/,\r\n notplaceholder: /^\\x25?([^b-gijostTuvxX])/\r\n }\r\n\r\n function sprintf(key) {\r\n // `arguments` is not an array, but should be fine for this call\r\n return sprintf_format(sprintf_parse(key), arguments)\r\n }\r\n\r\n function vsprintf(fmt, argv) {\r\n return sprintf.apply(null, [fmt].concat(argv || []))\r\n }\r\n\r\n function sprintf_format(parse_tree, argv) {\r\n var cursor = 1, tree_length = parse_tree.length, arg, output = '', i, k, ph, pad, pad_character, pad_length, is_positive, sign;\r\n for (i = 0; i < tree_length; i++) {\r\n if (typeof parse_tree[i] === 'string') {\r\n output += parse_tree[i]\r\n }\r\n else if (typeof parse_tree[i] === 'object') {\r\n ph = parse_tree[i]; // placeholder\r\n if (ph.keys) { // keyword argument\r\n arg = argv[cursor]\r\n for (k = 0; k < ph.keys.length; k++) {\r\n if (arg == undefined) {\r\n throw new Error(sprintf('[sprintf] Cannot access property \"%s\" of undefined value \"%s\"', ph.keys[k], ph.keys[k-1]))\r\n }\r\n arg = arg[ph.keys[k]]\r\n }\r\n }\r\n else if (ph.param_no) { // positional argument (explicit)\r\n arg = argv[ph.param_no]\r\n }\r\n else { // positional argument (implicit)\r\n arg = argv[cursor++]\r\n }\r\n\r\n if (re.not_type.test(ph.type) && re.not_primitive.test(ph.type) && arg instanceof Function) {\r\n arg = arg()\r\n }\r\n\r\n if (re.numeric_arg.test(ph.type) && (typeof arg !== 'number' && isNaN(arg) && arg === undefined)) { // treat %_d as string if it has no argument\r\n arg = ph.placeholder;\r\n ph.type = \"s\";\r\n }\r\n\r\n if (re.number.test(ph.type)) {\r\n is_positive = typeof arg === \"string\" ? true : arg >= 0\r\n }\r\n\r\n switch (ph.type) {\r\n case 'b':\r\n arg = parseInt(arg, 10).toString(2)\r\n break\r\n case 'c':\r\n arg = String.fromCharCode(parseInt(arg, 10))\r\n break\r\n case 'd':\r\n case 'i':\r\n arg = typeof arg === \"number\" ? parseInt(arg, 10) : NaN\r\n break\r\n case 'j':\r\n arg = JSON.stringify(arg, null, ph.width ? parseInt(ph.width) : 0)\r\n break\r\n case 'e':\r\n arg = ph.precision ? parseFloat(arg).toExponential(ph.precision) : parseFloat(arg).toExponential()\r\n break\r\n case 'f':\r\n arg = ph.precision ? parseFloat(arg).toFixed(ph.precision) : parseFloat(arg)\r\n break\r\n case 'g':\r\n arg = ph.precision ? String(Number(arg.toPrecision(ph.precision))) : parseFloat(arg)\r\n break\r\n case 'o':\r\n arg = (parseInt(arg, 10) >>> 0).toString(8)\r\n break\r\n case 's':\r\n arg = String(arg)\r\n arg = arg === \"undefined\" ? ph.placeholder : (ph.precision ? arg.substring(0, ph.precision) : arg)\r\n break\r\n case 't':\r\n arg = String(!!arg)\r\n arg = (ph.precision ? arg.substring(0, ph.precision) : arg)\r\n break\r\n case 'T':\r\n arg = Object.prototype.toString.call(arg).slice(8, -1).toLowerCase()\r\n arg = (ph.precision ? arg.substring(0, ph.precision) : arg)\r\n break\r\n case 'u':\r\n arg = parseInt(arg, 10) >>> 0\r\n break\r\n case 'v':\r\n arg = arg.valueOf()\r\n arg = (ph.precision ? arg.substring(0, ph.precision) : arg)\r\n break\r\n case 'x':\r\n arg = (parseInt(arg, 10) >>> 0).toString(16)\r\n break\r\n case 'X':\r\n arg = (parseInt(arg, 10) >>> 0).toString(16).toUpperCase()\r\n break\r\n }\r\n if (re.json.test(ph.type)) {\r\n output += arg\r\n }\r\n else {\r\n if (re.number.test(ph.type) && (!is_positive || ph.sign)) {\r\n sign = is_positive ? '+' : '-'\r\n arg = arg.toString().replace(re.sign, '')\r\n }\r\n else {\r\n sign = ''\r\n }\r\n pad_character = ph.pad_char ? ph.pad_char === '0' ? '0' : ph.pad_char.charAt(1) : ' '\r\n pad_length = ph.width - (sign + arg).length\r\n pad = ph.width ? (pad_length > 0 ? pad_character.repeat(pad_length) : '') : ''\r\n output += ph.align ? sign + arg + pad : (pad_character === '0' ? sign + pad + arg : pad + sign + arg)\r\n }\r\n }\r\n }\r\n return output\r\n }\r\n\r\n var sprintf_cache = Object.create(null)\r\n\r\n function sprintf_parse(fmt) {\r\n var _fmt = fmt, match, parse_tree = [], arg_names = 0;\r\n while (_fmt) {\r\n if ((match = re.text.exec(_fmt)) !== null) {\r\n parse_tree.push(match[0]);\r\n }\r\n else if ((match = re.modulo.exec(_fmt)) !== null) {\r\n parse_tree.push('%');\r\n }\r\n else if ((match = re.placeholder.exec(_fmt)) !== null) {\r\n if (match[2]) {\r\n arg_names |= 1\r\n var field_list = [], replacement_field = match[2], field_match = []\r\n if ((field_match = re.key.exec(replacement_field)) !== null) {\r\n field_list.push(field_match[1])\r\n while ((replacement_field = replacement_field.substring(field_match[0].length)) !== '') {\r\n if ((field_match = re.key_access.exec(replacement_field)) !== null) {\r\n field_list.push(field_match[1])\r\n }\r\n else if ((field_match = re.index_access.exec(replacement_field)) !== null) {\r\n field_list.push(field_match[1])\r\n }\r\n else {\r\n throw new SyntaxError('[sprintf] failed to parse named argument key')\r\n }\r\n }\r\n }\r\n else {\r\n throw new SyntaxError('[sprintf] failed to parse named argument key')\r\n }\r\n match[2] = field_list\r\n }\r\n else {\r\n arg_names |= 2\r\n }\r\n if (arg_names === 3) {\r\n throw new Error('[sprintf] mixing positional and named placeholders is not (yet) supported')\r\n }\r\n\r\n parse_tree.push(\r\n {\r\n placeholder: match[0],\r\n param_no: match[1],\r\n keys: match[2],\r\n sign: match[3],\r\n pad_char: match[4],\r\n align: match[5],\r\n width: match[6],\r\n precision: match[7],\r\n type: match[8]\r\n }\r\n )\r\n }\r\n else if ((match = re.mod.exec(_fmt)) !== null) { // treat %_SPACE as a string\r\n parse_tree.push(match[0]);\r\n }\r\n else if ((match = re.notplaceholder.exec(_fmt)) !== null) { // treat %_NOTPLACEHOLDER as a string\r\n parse_tree.push(match[0]);\r\n }\r\n else {\r\n throw new SyntaxError('[sprintf] unexpected placeholder')\r\n }\r\n _fmt = _fmt.substring(match[0].length)\r\n }\r\n return parse_tree\r\n }\r\n\r\n app.sprintf = sprintf;\r\n app.vsprintf = vsprintf;\r\n return app;\r\n }\r\n\r\n //\r\n // Constructor\r\n // Can be named anything you want\r\n //\r\n\r\n var Constructor = function (options) {\r\n\r\n //\r\n // Unique Variables\r\n //\r\n\r\n var publicAPIs = {};\r\n var settings;\r\n\r\n function getPayload() {\r\n var payload = {\r\n \"url\": document.location.pathname || '/',\r\n \"application\": settings.application\r\n };\r\n\r\n var payload_data = [];\r\n\r\n if (document.documentMode) payload_data.push({ \"key\": \"Document-Mode\", \"value\": document.documentMode });\r\n if (window.innerWidth || document.documentElement.clientWidth || document.getElementsByTagName('body')[0].clientWidth) payload_data.push({ \"key\": \"Browser-Width\", \"value\": window.innerWidth || document.documentElement.clientWidth || document.getElementsByTagName('body')[0].clientWidth });\r\n if (window.innerHeight || document.documentElement.clientHeight || document.getElementsByTagName('body')[0].clientHeight) payload_data.push({ \"key\": \"Browser-Height\", \"value\": window.innerHeight || document.documentElement.clientHeight || document.getElementsByTagName('body')[0].clientHeight });\r\n if ((screen.msOrientation || (screen.orientation || screen.mozOrientation || {}).type) !== undefined) payload_data.push({ \"key\": \"Screen-Orientation\", \"value\": ((screen.msOrientation || (screen.orientation || screen.mozOrientation || {}).type).split(\"-\"))[0] });\r\n if (screen.width) payload_data.push({ \"key\": \"Screen-Width\", \"value\": screen.width });\r\n if (screen.height) payload_data.push({ \"key\": \"Screen-Height\", \"value\": screen.height });\r\n if (screen.colorDepth) payload_data.push({ \"key\": \"Color-Depth\", \"value\": screen.colorDepth });\r\n payload_data.push({ \"key\": \"X-ELMAHIO-SEARCH-isClientside\", \"value\": \"true\" });\r\n\r\n payload.data = payload_data;\r\n\r\n var payload_serverVariables = [];\r\n if (navigator.language) payload_serverVariables.push({ \"key\": \"User-Language\", \"value\": navigator.language });\r\n if (navigator.userAgent) payload_serverVariables.push({ \"key\": \"User-Agent\", \"value\": navigator.userAgent });\r\n if (document.referrer) payload_serverVariables.push({ \"key\": \"Referer\", \"value\": document.referrer });\r\n if (document.location.protocol === \"https:\") payload_serverVariables.push({ \"key\": \"HTTPS\", \"value\": 'on' });\r\n if (document.location.hostname) payload_serverVariables.push({ \"key\": \"Host\", \"value\": document.location.hostname });\r\n\r\n payload.serverVariables = payload_serverVariables;\r\n\r\n return payload;\r\n }\r\n\r\n function confirmResponse(status, response) {\r\n if (settings.debug) {\r\n if (status === 'error') {\r\n console.log('%c \\u2BC8 Error log: ' + '%c \\u2715 Not created ', debugSettings.lightCSS, debugSettings.errorCSS);\r\n } else if (status === 'success') {\r\n console.log('%c \\u2BC8 Error log: ' + '%c \\u2714 ' + response + ' at ' + new Date().toLocaleString() + ' ', debugSettings.lightCSS, debugSettings.successCSS);\r\n } else {\r\n console.log('%c \\u2BC8 Error log: ' + '%c \\u2715 Not created. Title should not be undefined, null or empty ! ', debugSettings.lightCSS, debugSettings.errorCSS);\r\n }\r\n }\r\n }\r\n\r\n function stackGPS(error, xhr, jsonData) {\r\n \tvar errorStack = error.toString().split(\"\\n\")[0];\r\n \tvar gps = new StackTraceGPS();\r\n var promise = new Promise(function(resolve) {\r\n\t var stackframes = ErrorStackParser.parse(error);\r\n\t resolve(Promise.all(stackframes.map(function(sf) {\r\n\t return new Promise(function(resolve) {\r\n\t function resolveOriginal() {\r\n\t resolve(sf);\r\n\t }\r\n\t gps.pinpoint(sf).then(resolve, resolveOriginal)['catch'](resolveOriginal);\r\n\t });\r\n\t })));\r\n \t}\r\n );\r\n\r\n promise.then(function(newFrames){\r\n \tnewFrames.forEach(function(stackFrame, i){\r\n\t\t\t\t\tif(stackFrame.functionName) {\r\n \t\t\tvar fn = stackFrame.functionName + ' ';\r\n \t\t} else {\r\n \t\t\tvar fn = '';\r\n \t\t}\r\n \t\tvar stackString = ' at ' + fn + '(' + stackFrame.fileName + ':' + stackFrame.lineNumber + ':' + stackFrame.columnNumber + ')';\r\n \t\tnewFrames[i] = stackString;\r\n \t});\r\n \tnewFrames.unshift(errorStack);\r\n \tjsonData.detail = newFrames.join(\"\\n\");\r\n \txhr.send(JSON.stringify(jsonData));\r\n });\r\n }\r\n\r\n function stackString(error) {\r\n \tvar typeOF = typeof error.error;\r\n \tvar typeOFCapitalized = typeOF.charAt(0).toUpperCase() + typeOF.slice(1);\r\n\r\n \treturn typeOFCapitalized + ': ' + error.error + '\\n' + ' at ' + '(' + error.source + ':' + error.lineno + ':' + error.colno + ')';\r\n }\r\n\r\n function manipulateStack (errorStack, severity, message) {\r\n var stack = [];\r\n for (var i = 0; i < errorStack.length; i++) {\r\n if(errorStack[i] === \"Error\") {\r\n stack.push(severity + \": \" + message);\r\n }\r\n if(!errorStack[i].match(/elmahio.js|elmahio.min.js/g) && errorStack[i] !== \"Error\") {\r\n stack.push(errorStack[i]);\r\n }\r\n }\r\n return stack.join('\\n');\r\n }\r\n\r\n // Private methods\r\n\r\n var sendPayload = function (apiKey, logId, callback, errorLog) {\r\n\r\n var api_key = apiKey,\r\n log_id = logId,\r\n error = errorLog,\r\n send = 1,\r\n queryParams = getSearchParameters(),\r\n stack = error.error && objectLength(error.error.stack) !== 0 && typeof error.error === \"object\" ? ErrorStackParser.parse(error.error) : '';\r\n\r\n // Ignoring error from an external script\r\n if (error && error.colno === 0 && error.lineno === 0 && (!stack || stack === '') && error.message && (error.message === \"Script error.\" || error.message === \"Script error\")) {\r\n\t\t\t if (settings.debug) {\r\n\t\t\t console.log('%c \\u2BC8 Error log: ' + '%c \\uD83D\\uDEC8 Ignoring error from external script ', debugSettings.lightCSS, debugSettings.warningCSS);\r\n\t\t\t }\r\n\t\t\t return;\r\n\t\t\t}\r\n\r\n if ((api_key !== null && log_id !== null) || (paramsLength === 2)) {\r\n\r\n // Priority for parameters\r\n if (params.hasOwnProperty('apiKey') && params.hasOwnProperty('logId')) {\r\n api_key = params['apiKey'];\r\n log_id = params['logId'];\r\n }\r\n\r\n // get new XHR object\r\n var xhr = new XMLHttpRequest();\r\n xhr.open(\"POST\", \"https://api.elmah.io/v3/messages/\" + log_id + \"?api_key=\" + api_key, true);\r\n\r\n xhr.setRequestHeader('Content-type', 'application/json');\r\n\r\n xhr.onload = function (e) {\r\n if (xhr.readyState === 4) {\r\n if (xhr.status === 201) {\r\n callback('success', xhr.statusText);\r\n }\r\n }\r\n };\r\n\r\n xhr.onerror = function (e) {\r\n callback('error', xhr.statusText);\r\n\r\n // on error event\r\n publicAPIs.emit('error', xhr.status, xhr.statusText);\r\n }\r\n\r\n var jsonData = {\r\n \"detail\": error.error ? error.error.stack : null,\r\n \"title\": error.message || 'Unspecified error',\r\n \"source\": stack && stack.length > 0 ? stack[0].fileName : null,\r\n \"severity\": \"Error\",\r\n \"type\": error.error ? error.error.name : null,\r\n \"queryString\": JSON.parse(JSON.stringify(queryParams))\r\n };\r\n\r\n // Check if error sent is a string and not an object\r\n // Then create the articifial stacktrace and pass source & type of the error\r\n if(error.error && (objectLength(error.error.stack) === 0) && typeof jsonData.detail === \"undefined\") {\r\n \tvar typeOF = typeof errorLog.error;\r\n \t\t\tvar typeOFCapitalized = typeOF.charAt(0).toUpperCase() + typeOF.slice(1);\r\n\r\n \tjsonData.detail = stackString(errorLog);\r\n \tjsonData.source = errorLog.source;\r\n jsonData.title = \"Uncaught \" + typeOFCapitalized + \": \" + errorLog.error;\r\n }\r\n\r\n // Add payload to jsonData\r\n jsonData = merge_objects(jsonData, getPayload());\r\n\r\n // filter callback\r\n if (settings.filter !== null) {\r\n if (settings.filter(jsonData)) {\r\n send = 0;\r\n }\r\n }\r\n\r\n if (send === 1) {\r\n // on message event\r\n publicAPIs.emit('message', jsonData);\r\n\r\n if (error.error && typeof error.error === \"object\" && objectLength(error.error.stack) !== 0 && typeof Promise !== \"undefined\" && Promise.toString().indexOf(\"[native code]\") !== -1) {\r\n \t// send message trying to pinpoint stackframes\r\n \tstackGPS(error.error, xhr, jsonData);\r\n\t } else {\r\n\t \t// send message\r\n \txhr.send(JSON.stringify(jsonData));\r\n\t }\r\n }\r\n\r\n } else {\r\n return console.log('Login api error');\r\n }\r\n };\r\n\r\n var sendManualPayload = function (apiKey, logId, callback, logType, messageLog, errorLog) {\r\n var api_key = apiKey,\r\n log_id = logId,\r\n type = logType,\r\n error = errorLog,\r\n message = messageLog,\r\n send = 1,\r\n queryParams = getSearchParameters();\r\n\r\n if ((api_key !== null && log_id !== null) || (paramsLength === 2)) {\r\n\r\n // Priority for parameters\r\n if (params.hasOwnProperty('apiKey') && params.hasOwnProperty('logId')) {\r\n api_key = params['apiKey'];\r\n log_id = params['logId'];\r\n }\r\n\r\n // get new XHR object\r\n var xhr = new XMLHttpRequest();\r\n xhr.open(\"POST\", \"https://api.elmah.io/v3/messages/\" + log_id + \"?api_key=\" + api_key, true);\r\n xhr.setRequestHeader('Content-type', 'application/json');\r\n\r\n xhr.onload = function (e) {\r\n if (xhr.readyState === 4) {\r\n if (xhr.status === 201) {\r\n callback('success', xhr.statusText);\r\n }\r\n }\r\n };\r\n\r\n xhr.onerror = function (e) {\r\n callback('error', xhr.statusText);\r\n\r\n // on error event\r\n publicAPIs.emit('error', xhr.status, xhr.statusText);\r\n }\r\n\r\n if (type !== \"Log\") {\r\n\r\n var stack = error ? ErrorStackParser.parse(error) : null;\r\n\r\n var jsonData = {\r\n \"title\": message,\r\n \"source\": stack && stack.length > 0 ? stack[0].fileName : null,\r\n \"detail\": error ? error.stack : null,\r\n \"severity\": type,\r\n \"type\": error ? error.name : null,\r\n \"queryString\": JSON.parse(JSON.stringify(queryParams))\r\n };\r\n\r\n // Add payload to jsonData\r\n jsonData = merge_objects(jsonData, getPayload());\r\n\r\n } else {\r\n\r\n jsonData = error;\r\n\r\n }\r\n\r\n // filter callback\r\n if (settings.filter !== null) {\r\n if (settings.filter(jsonData)) {\r\n send = 0;\r\n }\r\n }\r\n\r\n if (send === 1) {\r\n if (jsonData.title) {\r\n\r\n // on message event\r\n publicAPIs.emit('message', jsonData);\r\n\r\n if (error && type !== \"Log\" && typeof Promise !== \"undefined\" && Promise.toString().indexOf(\"[native code]\") !== -1) {\r\n // send message trying to pinpoint stackframes\r\n stackGPS(error, xhr, jsonData);\r\n } else {\r\n // send message\r\n if(jsonData.errorObject) {\r\n error = jsonData.errorObject;\r\n delete jsonData.errorObject;\r\n stackGPS(error, xhr, jsonData);\r\n } else {\r\n xhr.send(JSON.stringify(jsonData));\r\n }\r\n }\r\n\r\n } else {\r\n callback('missing-title', xhr.statusText);\r\n }\r\n }\r\n\r\n } else {\r\n return console.log('Login api error');\r\n }\r\n };\r\n\r\n var sendPayloadFromConsole = function (apiKey, logId, callback, logType, errorLog) {\r\n var api_key = apiKey,\r\n log_id = logId,\r\n message = errorLog.message,\r\n messageTemplate = errorLog.message,\r\n type = logType,\r\n args = Object.values(errorLog.arguments),\r\n send = 1,\r\n queryParams = getSearchParameters();\r\n\r\n // If message has placeholders (%s or %d), check for arguments and replace them\r\n \tif(String(message).match(/(%d|%s)+/ig) && args.length > 1) {\r\n \t\tvar sprintfJS = new sprintfjs();\r\n // Remove the first argument from array, which represents the message\r\n \t\targs.shift();\r\n message = sprintfJS.vsprintf(message, args);\r\n }\r\n\r\n if(typeof message !== \"string\"){\r\n message = message.toString();\r\n }\r\n\r\n if(typeof messageTemplate !== \"string\") {\r\n messageTemplate = messageTemplate.toString();\r\n }\r\n\r\n if ((api_key !== null && log_id !== null) || (paramsLength === 2)) {\r\n\r\n // Priority for parameters\r\n if (params.hasOwnProperty('apiKey') && params.hasOwnProperty('logId')) {\r\n api_key = params['apiKey'];\r\n log_id = params['logId'];\r\n }\r\n\r\n // get new XHR object\r\n var xhr = new XMLHttpRequest();\r\n xhr.open(\"POST\", \"https://api.elmah.io/v3/messages/\" + log_id + \"?api_key=\" + api_key, true);\r\n xhr.setRequestHeader('Content-type', 'application/json');\r\n\r\n xhr.onload = function (e) {\r\n if (xhr.readyState === 4) {\r\n if (xhr.status === 201) {\r\n callback('success', xhr.statusText);\r\n }\r\n }\r\n };\r\n\r\n xhr.onerror = function (e) {\r\n callback('error', xhr.statusText);\r\n // on error event\r\n publicAPIs.emit('error', xhr.status, xhr.statusText);\r\n }\r\n\r\n var jsonData = {\r\n \"title\": message,\r\n \"titleTemplate\": messageTemplate,\r\n \"detail\": manipulateStack(new Error().stack.split('\\n'), type, message),\r\n \"severity\": type,\r\n \"type\": null,\r\n \"queryString\": JSON.parse(JSON.stringify(queryParams))\r\n };\r\n\r\n // Add payload to jsonData\r\n jsonData = merge_objects(jsonData, getPayload());\r\n\r\n // filter callback\r\n if (settings.filter !== null) {\r\n if (settings.filter(jsonData)) {\r\n send = 0;\r\n }\r\n }\r\n\r\n if (send === 1) {\r\n if (jsonData.title) {\r\n // on message event\r\n publicAPIs.emit('message', jsonData);\r\n // send message\r\n xhr.send(JSON.stringify(jsonData));\r\n } else {\r\n callback('missing-title', xhr.statusText);\r\n }\r\n }\r\n\r\n } else {\r\n return console.log('Login api error');\r\n }\r\n };\r\n\r\n var sendPrefilledLogMessage = function(errorLog) {\r\n // without error object\r\n if(!errorLog) return getPayload();\r\n\r\n // with error object\r\n var error = errorLog;\r\n var stack = error ? ErrorStackParser.parse(error) : null;\r\n var jsonData = {\r\n \"title\": error.message,\r\n \"source\": stack && stack.length > 0 ? stack[0].fileName : null,\r\n \"detail\": error ? error.stack : null,\r\n \"severity\": \"Error\",\r\n \"type\": error ? error.name : null,\r\n \"errorObject\": error\r\n };\r\n\r\n jsonData = merge_objects(jsonData, getPayload());\r\n return jsonData;\r\n }\r\n\r\n // Some public methods\r\n\r\n publicAPIs.error = function (msg) {\r\n sendManualPayload(settings.apiKey, settings.logId, confirmResponse, 'Error', msg);\r\n };\r\n publicAPIs.error = function (msg, error) {\r\n sendManualPayload(settings.apiKey, settings.logId, confirmResponse, 'Error', msg, error);\r\n };\r\n\r\n publicAPIs.verbose = function (msg) {\r\n sendManualPayload(settings.apiKey, settings.logId, confirmResponse, 'Verbose', msg);\r\n };\r\n publicAPIs.verbose = function (msg, error) {\r\n sendManualPayload(settings.apiKey, settings.logId, confirmResponse, 'Verbose', msg, error);\r\n };\r\n\r\n publicAPIs.debug = function (msg) {\r\n sendManualPayload(settings.apiKey, settings.logId, confirmResponse, 'Debug', msg);\r\n };\r\n publicAPIs.debug = function (msg, error) {\r\n sendManualPayload(settings.apiKey, settings.logId, confirmResponse, 'Debug', msg, error);\r\n };\r\n\r\n publicAPIs.information = function (msg) {\r\n sendManualPayload(settings.apiKey, settings.logId, confirmResponse, 'Information', msg);\r\n };\r\n publicAPIs.information = function (msg, error) {\r\n sendManualPayload(settings.apiKey, settings.logId, confirmResponse, 'Information', msg, error);\r\n };\r\n\r\n publicAPIs.warning = function (msg) {\r\n sendManualPayload(settings.apiKey, settings.logId, confirmResponse, 'Warning', msg);\r\n };\r\n publicAPIs.warning = function (msg, error) {\r\n sendManualPayload(settings.apiKey, settings.logId, confirmResponse, 'Warning', msg, error);\r\n };\r\n\r\n publicAPIs.fatal = function (msg) {\r\n sendManualPayload(settings.apiKey, settings.logId, confirmResponse, 'Fatal', msg);\r\n };\r\n publicAPIs.fatal = function (msg, error) {\r\n sendManualPayload(settings.apiKey, settings.logId, confirmResponse, 'Fatal', msg, error);\r\n };\r\n\r\n publicAPIs.log = function (obj) {\r\n sendManualPayload(settings.apiKey, settings.logId, confirmResponse, 'Log', null, obj);\r\n };\r\n\r\n publicAPIs.message = function(error) {\r\n return sendPrefilledLogMessage(error);\r\n };\r\n\r\n publicAPIs.on = function (name, callback, ctx) {\r\n var e = this.e || (this.e = {});\r\n\r\n (e[name] || (e[name] = [])).push({\r\n fn: callback,\r\n ctx: ctx\r\n });\r\n\r\n return this;\r\n };\r\n\r\n publicAPIs.emit = function (name) {\r\n var data = [].slice.call(arguments, 1);\r\n var evtArr = ((this.e || (this.e = {}))[name] || []).slice();\r\n var i = 0;\r\n var len = evtArr.length;\r\n\r\n for (i; i < len; i++) {\r\n evtArr[i].fn.apply(evtArr[i].ctx, data);\r\n }\r\n\r\n return this;\r\n };\r\n\r\n publicAPIs.init = function (options) {\r\n\r\n // -- Merge options into defaults\r\n settings = extend(defaults, options || {});\r\n\r\n // -- Log on window error\r\n window.onerror = function (message, source, lineno, colno, error) {\r\n\r\n var errorLog = {\r\n 'message': message,\r\n 'source': source,\r\n 'lineno': lineno,\r\n 'colno': colno,\r\n 'error': error\r\n }\r\n\r\n sendPayload(settings.apiKey, settings.logId, confirmResponse, errorLog);\r\n\r\n return false;\r\n }\r\n\r\n // -- Overriding console methods\r\n // -- Then log messages into the app.elmah.io\r\n if(options && options.captureConsoleMinimumLevel !== \"none\") {\r\n\r\n // If captureConsoleMinimumLevel: info or debug is set (error, warn)\r\n if(options.captureConsoleMinimumLevel === \"info\" || options.captureConsoleMinimumLevel === \"warn\" || options.captureConsoleMinimumLevel === \"error\" || options.captureConsoleMinimumLevel === \"debug\") {\r\n // Log console errors\r\n var _error = console.error;\r\n console.error = function(errMessage){\r\n var errorLog = {\r\n \t\t'message': errMessage,\r\n \t\t'arguments': arguments\r\n \t}\r\n sendPayloadFromConsole(settings.apiKey, settings.logId, confirmResponse, 'Error', errorLog);\r\n _error.apply(console, arguments);\r\n };\r\n if(options.captureConsoleMinimumLevel !== \"error\") {\r\n // Log console warnings\r\n var _warning = console.warn;\r\n console.warn = function(warnMessage){\r\n var errorLog = {\r\n 'message': warnMessage,\r\n 'arguments': arguments\r\n }\r\n sendPayloadFromConsole(settings.apiKey, settings.logId, confirmResponse, 'Warning', errorLog);\r\n _warning.apply(console, arguments);\r\n };\r\n }\r\n }\r\n if(options.captureConsoleMinimumLevel === \"info\" || options.captureConsoleMinimumLevel === \"debug\") {\r\n // Log console info\r\n var _info = console.info;\r\n console.info = function(infoMessage){\r\n var errorLog = {\r\n \t\t'message': infoMessage,\r\n \t\t'arguments': arguments\r\n \t}\r\n sendPayloadFromConsole(settings.apiKey, settings.logId, confirmResponse, 'Information', errorLog);\r\n _info.apply(console, arguments);\r\n };\r\n }\r\n if(options.captureConsoleMinimumLevel === \"debug\") {\r\n // Log console debug\r\n var _debug = console.debug;\r\n console.debug = function(debugMessage){\r\n var errorLog = {\r\n \t\t'message': debugMessage,\r\n \t\t'arguments': arguments\r\n \t}\r\n sendPayloadFromConsole(settings.apiKey, settings.logId, confirmResponse, 'Debug', errorLog);\r\n _debug.apply(console, arguments);\r\n };\r\n }\r\n }\r\n };\r\n\r\n // Initialize the plugin\r\n publicAPIs.init(options);\r\n\r\n if (settings.debug) {\r\n console.log('%c' + debugSettings.label, debugSettings.labelCSS);\r\n }\r\n\r\n // Return the public APIs\r\n return publicAPIs;\r\n\r\n };\r\n\r\n\r\n //\r\n // Return the constructor\r\n //\r\n\r\n if (paramsLength && params.hasOwnProperty('apiKey') && params.hasOwnProperty('logId')) {\r\n // Immediately-Invoked Function Expression (IIFE)\r\n return new Constructor;\r\n } else {\r\n // UMD Constructor\r\n return Constructor;\r\n }\r\n\r\n});"],"file":"elmahio.min.js"} \ No newline at end of file diff --git a/elmah.io.javascript.nuspec b/elmah.io.javascript.nuspec index 479a84a..f64848a 100644 --- a/elmah.io.javascript.nuspec +++ b/elmah.io.javascript.nuspec @@ -1,7 +1,7 @@  - 3.4.0 + 3.4.1 elmah.io elmah.io elmah.io.javascript diff --git a/package-lock.json b/package-lock.json index dba0af4..9db6064 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "elmah.io.javascript", - "version": "3.4.0", + "version": "3.4.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index cea8272..74c3a22 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "elmah.io.javascript", "description": "elmah.io javascript logger.", - "version": "3.4.0", + "version": "3.4.1", "repository": "https://github.com/elmahio/elmah.io.javascript", "license": "Apache-2.0", "main": "dist/elmahio.js", diff --git a/src/elmahio.js b/src/elmahio.js index 72cced8..e7b9306 100644 --- a/src/elmahio.js +++ b/src/elmahio.js @@ -1,5 +1,5 @@ /*! - * elmah.io Javascript Logger - version 3.4.0 + * elmah.io Javascript Logger - version 3.4.1 * (c) 2018 elmah.io, Apache 2.0 License, https://elmah.io */