Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

raven-js

Package Overview
Dependencies
Maintainers
3
Versions
87
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

raven-js - npm Package Compare versions

Comparing version 3.4.1 to 3.5.0

dist/plugins/vue.js

2

bower.json
{
"name": "raven-js",
"version": "3.4.1",
"version": "3.5.0",
"dependencies": {},

@@ -5,0 +5,0 @@ "main": "dist/raven.js",

# Changelog
## 3.5.0
* NEW: Can now disable automatic collection of breadcrumbs via `autoBreadcrumbs` config option. See: https://github.com/getsentry/raven-js/pull/686
* NEW: Can now configure max number of breadcrumbs to collect via `maxBreadcrumbs`. See: https://github.com/getsentry/raven-js/pull/685
* NEW: Added Vue.js plugin. See: https://github.com/getsentry/raven-js/pull/688
* CHANGE: Raven.js now collects 100 breadcrumbs by default. See: https://github.com/getsentry/raven-js/pull/685
* CHANGE: React Native plugin now also normalizes paths from CodePush. See: https://github.com/getsentry/raven-js/pull/683
## 3.4.1

@@ -4,0 +11,0 @@ * BUGFIX: Fix exception breadcrumbs having "undefined" for exception value. See: https://github.com/getsentry/raven-js/pull/681

@@ -1,2 +0,2 @@

/*! Raven.js 3.4.1 (d824691) | github.com/getsentry/raven-js */
/*! Raven.js 3.5.0 (892008a) | github.com/getsentry/raven-js */

@@ -3,0 +3,0 @@ /*

@@ -1,3 +0,3 @@

/*! Raven.js 3.4.1 (d824691) | github.com/getsentry/raven-js */
/*! Raven.js 3.5.0 (892008a) | github.com/getsentry/raven-js */
!function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,b=b.Raven||(b.Raven={}),b=b.Plugins||(b.Plugins={}),b.Angular=a()}}(function(){return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;d.length>g;g++)e(d[g]);return e}({1:[function(a,b,c){"use strict";function d(a,b){function c(){this.$get=["$window",function(b){return a}]}function e(a){a.decorator("$exceptionHandler",["Raven","$delegate",f])}function f(a,b){return function(c,d){a.captureException(c,{extra:{cause:d}}),b(c,d)}}b=b||window.angular,b&&(b.module("ngRaven",[]).provider("Raven",c).config(["$provide",e]),a.setDataCallback(function(a,b){d.a(a),b&&b(a)}))}var e=/^\[((?:[$a-zA-Z0-9]+:)?(?:[$a-zA-Z0-9]+))\] (.*?)\n?(\S+)$/;d.a=function(a){var b=a.exception;if(b){b=b.values[0];var c=e.exec(b.value);c&&(b.type=c[1],b.value=c[2],a.message=b.type+": "+b.value,a.extra.angularDocs=c[3].substr(0,250))}},b.exports=d},{}]},{},[1])(1)});
//# sourceMappingURL=angular.min.js.map

@@ -1,2 +0,2 @@

/*! Raven.js 3.4.1 (d824691) | github.com/getsentry/raven-js */
/*! Raven.js 3.5.0 (892008a) | github.com/getsentry/raven-js */

@@ -3,0 +3,0 @@ /*

@@ -1,3 +0,3 @@

/*! Raven.js 3.4.1 (d824691) | github.com/getsentry/raven-js */
/*! Raven.js 3.5.0 (892008a) | github.com/getsentry/raven-js */
!function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,b=b.Raven||(b.Raven={}),b=b.Plugins||(b.Plugins={}),b.Console=a()}}(function(){return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;d.length>g;g++)e(d[g]);return e}({1:[function(a,b,c){"use strict";function d(a,b,c){b=b||window.console||{},c=c||{};for(var d=c.levels||["debug","info","warn","error"],f=d.pop(),g=function(b,c){a.captureMessage(b,c)};f;)e(b,f,g),f=d.pop()}var e=a(2).wrapMethod;b.exports=d},{2:2}],2:[function(a,b,c){"use strict";var d=function(a,b,c){var d=a[b],e=a;if(b in a){var f="warn"===b?"warning":b;a[b]=function(){var a=[].slice.call(arguments),b=""+a.join(" "),g={level:f,logger:"console",extra:{arguments:a}};c&&c(b,g),d&&Function.prototype.apply.call(d,e,a)}}};b.exports={wrapMethod:d}},{}]},{},[1])(1)});
//# sourceMappingURL=console.min.js.map

@@ -1,2 +0,2 @@

/*! Raven.js 3.4.1 (d824691) | github.com/getsentry/raven-js */
/*! Raven.js 3.5.0 (892008a) | github.com/getsentry/raven-js */

@@ -3,0 +3,0 @@ /*

@@ -1,3 +0,3 @@

/*! Raven.js 3.4.1 (d824691) | github.com/getsentry/raven-js */
/*! Raven.js 3.5.0 (892008a) | github.com/getsentry/raven-js */
!function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,b=b.Raven||(b.Raven={}),b=b.Plugins||(b.Plugins={}),b.Ember=a()}}(function(){return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;d.length>g;g++)e(d[g]);return e}({1:[function(a,b,c){"use strict";function d(a,b){if(b=b||window.Ember){var c=b.onerror;b.onerror=function(b){a.captureException(b),"function"==typeof c&&c.call(this,b)},b.RSVP.on("error",function(b){b instanceof Error?a.captureException(b,{extra:{context:"Unhandled Promise error detected"}}):a.captureMessage("Unhandled Promise error detected",{extra:{reason:b}})})}}b.exports=d},{}]},{},[1])(1)});
//# sourceMappingURL=ember.min.js.map

@@ -1,2 +0,2 @@

/*! Raven.js 3.4.1 (d824691) | github.com/getsentry/raven-js */
/*! Raven.js 3.5.0 (892008a) | github.com/getsentry/raven-js */

@@ -3,0 +3,0 @@ /*

@@ -1,3 +0,3 @@

/*! Raven.js 3.4.1 (d824691) | github.com/getsentry/raven-js */
/*! Raven.js 3.5.0 (892008a) | github.com/getsentry/raven-js */
!function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,b=b.Raven||(b.Raven={}),b=b.Plugins||(b.Plugins={}),b.Require=a()}}(function(){var a;return function b(a,c,d){function e(g,h){if(!c[g]){if(!a[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};a[g][0].call(k.exports,function(b){var c=a[g][1][b];return e(c?c:b)},k,k.exports,b,a,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;d.length>g;g++)e(d[g]);return e}({1:[function(b,c,d){"use strict";function e(c){"function"==typeof a&&a.amd&&(window.define=c.wrap({deep:!1},a),window.require=c.wrap({deep:!1},b))}c.exports=e},{}]},{},[1])(1)});
//# sourceMappingURL=require.min.js.map

@@ -1,3 +0,3 @@

/*! Raven.js 3.4.1 (d824691) | github.com/getsentry/raven-js */
!function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,b.Raven=a()}}(function(){return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;d.length>g;g++)e(d[g]);return e}({1:[function(a,b,c){function d(a,b,c,d){return JSON.stringify(a,e(b,d),c)}function e(a,b){var c=[],d=[];return null==b&&(b=function(a,b){return c[0]===b?"[Circular ~]":"[Circular ~."+d.slice(0,c.indexOf(b)).join(".")+"]"}),function(e,f){if(c.length>0){var g=c.indexOf(this);~g?c.splice(g+1):c.push(this),~g?d.splice(g,1/0,e):d.push(e),~c.indexOf(f)&&(f=b.call(this,e,f))}else c.push(f);return null==a?f:a.call(this,e,f)}}c=b.exports=d,c.getSerialize=e},{}],2:[function(a,b,c){"use strict";function d(a){this.name="RavenConfigError",this.message=a}d.prototype=new Error,d.prototype.constructor=d,b.exports=d},{}],3:[function(a,b,c){"use strict";var d=function(a,b,c){var d=a[b],e=a;if(b in a){var f="warn"===b?"warning":b;a[b]=function(){var a=[].slice.call(arguments),b=""+a.join(" "),g={level:f,logger:"console",extra:{arguments:a}};c&&c(b,g),d&&Function.prototype.apply.call(d,e,a)}}};b.exports={wrapMethod:d}},{}],4:[function(a,b,c){"use strict";function d(){return+new Date}function e(){this.a=!("object"!=typeof JSON||!JSON.stringify),this.b="undefined"!=typeof document,this.c=null,this.d=null,this.e=null,this.f=null,this.g=null,this.h={},this.i={logger:"javascript",ignoreErrors:[],ignoreUrls:[],whitelistUrls:[],includePaths:[],crossOrigin:"anonymous",collectWindowErrors:!0,maxMessageLength:0,stackTraceLimit:50},this.j=0,this.k=!1,this.l=Error.stackTraceLimit,this.m=window.console||{},this.n={},this.o=[],this.p=d(),this.q=[],this.r=[],this.s=20,this.t=null,this.u=window.location,this.v=this.u&&this.u.href;for(var a in this.m)this.n[a]=this.m[a]}var f=a(7),g=a(2),h=a(6),i=a(1),j=h.isFunction,k=h.isUndefined,l=h.isError,m=h.isEmptyObject,n=h.hasKey,o=h.joinRegExp,p=h.each,q=h.objectMerge,r=h.truncate,s=h.urlencode,t=h.uuid4,u=h.htmlTreeAsString,v=h.parseUrl,w=h.isString,x=a(3).wrapMethod,y="source protocol user pass host port path".split(" "),z=/^(?:(\w+):)?\/\/(?:(\w+)(:\w+)?@)?([\w\.-]+)(?::(\d+))?(\/.*)/;e.prototype={VERSION:"3.4.1",debug:!1,TraceKit:f,config:function(a,b){var c=this;if(this.e)return this.w("error","Error: Raven has already been configured"),this;if(!a)return this;b&&p(b,function(a,b){"tags"===a||"extra"===a?c.h[a]=b:c.i[a]=b});var d=this.x(a),e=d.path.lastIndexOf("/"),g=d.path.substr(1,e);return this.y=a,this.i.ignoreErrors.push(/^Script error\.?$/),this.i.ignoreErrors.push(/^Javascript error: Script error\.? on line 0$/),this.i.ignoreErrors=o(this.i.ignoreErrors),this.i.ignoreUrls=this.i.ignoreUrls.length?o(this.i.ignoreUrls):!1,this.i.whitelistUrls=this.i.whitelistUrls.length?o(this.i.whitelistUrls):!1,this.i.includePaths=o(this.i.includePaths),this.f=d.user,this.z=d.pass&&d.pass.substr(1),this.g=d.path.substr(e+1),this.e=this.A(d),this.B=this.e+"/"+g+"api/"+this.g+"/store/",f.collectWindowErrors=!!this.i.collectWindowErrors,this},install:function(){var a=this;return this.isSetup()&&!this.k&&(f.report.subscribe(function(){a.C.apply(a,arguments)}),this.D(),this.E(),this.k=!0),Error.stackTraceLimit=this.i.stackTraceLimit,this},context:function(a,b,c){return j(a)&&(c=b||[],b=a,a=void 0),this.wrap(a,b).apply(this,c)},wrap:function(a,b,c){function d(){var d=[],f=arguments.length,g=!a||a&&a.deep!==!1;for(c&&j(c)&&c.apply(this,arguments);f--;)d[f]=g?e.wrap(a,arguments[f]):arguments[f];try{return b.apply(this,d)}catch(h){throw e.F(),e.captureException(h,a),h}}var e=this;if(k(b)&&!j(a))return a;if(j(a)&&(b=a,a=void 0),!j(b))return b;try{if(b.G)return b}catch(f){return b}if(b.H)return b.H;for(var g in b)n(b,g)&&(d[g]=b[g]);return d.prototype=b.prototype,b.H=d,d.G=!0,d.I=b,d},uninstall:function(){return f.report.uninstall(),this.J(),Error.stackTraceLimit=this.l,this.k=!1,this},captureException:function(a,b){if(!l(a))return this.captureMessage(a,b);this.c=a;try{var c=f.computeStackTrace(a);this.K(c,b)}catch(d){if(a!==d)throw d}return this},captureMessage:function(a,b){return this.i.ignoreErrors.test&&this.i.ignoreErrors.test(a)?void 0:(this.L(q({message:a+""},b)),this)},captureBreadcrumb:function(a){var b=q({timestamp:d()/1e3},a);this.r.push(b),this.r.length>this.s&&this.r.shift()},addPlugin:function(a){var b=Array.prototype.slice.call(arguments,1);return this.o.push([a,b]),this.k&&this.E(),this},setUserContext:function(a){return this.h.user=a,this},setExtraContext:function(a){return this.M("extra",a),this},setTagsContext:function(a){return this.M("tags",a),this},clearContext:function(){return this.h={},this},getContext:function(){return JSON.parse(i(this.h))},setEnvironment:function(a){return this.i.environment=a,this},setRelease:function(a){return this.i.release=a,this},setDataCallback:function(a){var b=this.i.dataCallback;return this.i.dataCallback=j(a)?function(c){return a(c,b)}:a,this},setShouldSendCallback:function(a){var b=this.i.shouldSendCallback;return this.i.shouldSendCallback=j(a)?function(c){return a(c,b)}:a,this},setTransport:function(a){return this.i.transport=a,this},lastException:function(){return this.c},lastEventId:function(){return this.d},isSetup:function(){return this.a?this.e?!0:(this.ravenNotConfiguredError||(this.ravenNotConfiguredError=!0,this.w("error","Error: Raven has not been configured.")),!1):!1},afterLoad:function(){var a=window.RavenConfig;a&&this.config(a.dsn,a.config).install()},showReportDialog:function(a){if(window.document){a=a||{};var b=a.eventId||this.lastEventId();if(!b)throw new g("Missing eventId");var c=a.dsn||this.y;if(!c)throw new g("Missing DSN");var d=encodeURIComponent,e="";e+="?eventId="+d(b),e+="&dsn="+d(c);var f=a.user||this.h.user;f&&(f.name&&(e+="&name="+d(f.name)),f.email&&(e+="&email="+d(f.email)));var h=this.A(this.x(c)),i=document.createElement("script");i.async=!0,i.src=h+"/api/embed/error-page/"+e,(document.head||document.body).appendChild(i)}},F:function(){var a=this;this.j+=1,setTimeout(function(){a.j-=1})},N:function(a,b){var c,d;if(this.b){b=b||{},a="raven"+a.substr(0,1).toUpperCase()+a.substr(1),document.createEvent?(c=document.createEvent("HTMLEvents"),c.initEvent(a,!0,!0)):(c=document.createEventObject(),c.eventType=a);for(d in b)n(b,d)&&(c[d]=b[d]);if(document.createEvent)document.dispatchEvent(c);else try{document.fireEvent("on"+c.eventType.toLowerCase(),c)}catch(e){}}},O:function(a){var b=this;return function(c){if(b.P=null,b.t!==c){b.t=c;var d,e=c.target;try{d=u(e)}catch(f){d="<unknown>"}b.captureBreadcrumb({category:"ui."+a,message:d})}}},Q:function(){var a=this,b=1e3;return function(c){var d=c.target,e=d&&d.tagName;if(e&&("INPUT"===e||"TEXTAREA"===e)){var f=a.P;f||a.O("input")(c),clearTimeout(f),a.P=setTimeout(function(){a.P=null},b)}}},R:function(a,b){var c=v(this.u.href),d=v(b),e=v(a);this.v=b,c.protocol===d.protocol&&c.host===d.host&&(b=d.relative),c.protocol===e.protocol&&c.host===e.host&&(a=e.relative),this.captureBreadcrumb({category:"navigation",data:{to:b,from:a}})},D:function(){function a(a,b,c,d){var f=a[b];a[b]=c(f),d||e.q.push([a,b,f])}function b(a){return function(b,c){for(var d=new Array(arguments.length),f=0;d.length>f;++f)d[f]=arguments[f];var g=d[0];return j(g)&&(d[0]=e.wrap(g)),a.apply?a.apply(this,d):a(d[0],d[1])}}function c(b){var c=window[b]&&window[b].prototype;c&&c.hasOwnProperty&&c.hasOwnProperty("addEventListener")&&(a(c,"addEventListener",function(a){return function(c,d,f,g){try{d&&d.handleEvent&&(d.handleEvent=e.wrap(d.handleEvent))}catch(h){}var i;return("EventTarget"===b||"Node"===b)&&("click"===c?i=e.O(c):"keypress"===c&&(i=e.Q())),a.call(this,c,e.wrap(d,void 0,i),f,g)}}),a(c,"removeEventListener",function(a){return function(b,c,d,e){return c=c&&(c.H?c.H:c),a.call(this,b,c,d,e)}}))}function d(b,c){b in c&&j(c[b])&&a(c,b,function(a){return e.wrap(a)},!0)}var e=this;a(window,"setTimeout",b),a(window,"setInterval",b),window.requestAnimationFrame&&a(window,"requestAnimationFrame",function(a){return function(b){return a(e.wrap(b))}}),this.b&&(document.addEventListener?(document.addEventListener("click",e.O("click"),!1),document.addEventListener("keypress",e.Q(),!1)):(document.attachEvent("onclick",e.O("click")),document.attachEvent("onkeypress",e.Q())));for(var f=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],g=0;f.length>g;g++)c(f[g]);if("XMLHttpRequest"in window){var h=XMLHttpRequest.prototype;a(h,"open",function(a){return function(b,c){return w(c)&&-1===c.indexOf(e.f)&&(this.S={method:b,url:c,status_code:null}),a.apply(this,arguments)}}),a(h,"send",function(b){return function(c){function f(){if(g.S&&(1===g.readyState||4===g.readyState)){try{g.S.status_code=g.status}catch(a){}e.captureBreadcrumb({type:"http",category:"xhr",data:g.S})}}for(var g=this,h=["onload","onerror","onprogress"],i=0;h.length>i;i++)d(h[i],g);return"onreadystatechange"in g&&j(g.onreadystatechange)?a(g,"onreadystatechange",function(a){return e.wrap(a,void 0,f)},!0):g.onreadystatechange=f,b.apply(this,arguments)}})}var i=window.chrome,k=i&&i.app&&i.app.runtime,l=!k&&window.history&&history.pushState;if(l){var m=window.onpopstate;window.onpopstate=function(){var a=e.u.href;return e.R(e.v,a),m?m.apply(this,arguments):void 0},a(history,"pushState",function(a){return function(){var b=arguments.length>2?arguments[2]:void 0;return b&&e.R(e.v,b+""),a.apply(this,arguments)}})}var n=function(a,b){e.captureBreadcrumb({message:a,level:b.level,category:"console"})};"console"in window&&console.log&&p(["debug","info","warn","error","log"],function(a,b){x(console,b,n)});var o=window.jQuery||window.$;o&&o.fn&&o.fn.ready&&a(o.fn,"ready",function(a){return function(b){return a.call(this,e.wrap(b))}})},J:function(){for(var a;this.q.length;){a=this.q.shift();var b=a[0],c=a[1],d=a[2];b[c]=d}},E:function(){var a=this;p(this.o,function(b,c){var d=c[0],e=c[1];d.apply(a,[a].concat(e))})},x:function(a){var b=z.exec(a),c={},d=7;try{for(;d--;)c[y[d]]=b[d]||""}catch(e){throw new g("Invalid DSN: "+a)}if(c.pass&&!this.i.allowSecretKey)throw new g("Do not specify your secret key in the DSN. See: http://bit.ly/raven-secret-key");return c},A:function(a){var b="//"+a.host+(a.port?":"+a.port:"");return a.protocol&&(b=a.protocol+":"+b),b},C:function(){this.j||this.K.apply(this,arguments)},K:function(a,b){var c=this,d=[];a.stack&&a.stack.length&&p(a.stack,function(a,b){var e=c.T(b);e&&d.push(e)}),this.N("handle",{stackInfo:a,options:b}),this.U(a.name,a.message,a.url,a.lineno,d.slice(0,this.i.stackTraceLimit),b)},T:function(a){if(a.url){var b={filename:a.url,lineno:a.line,colno:a.column,"function":a.func||"?"};return b.in_app=!(this.i.includePaths.test&&!this.i.includePaths.test(b.filename)||/(Raven|TraceKit)\./.test(b["function"])||/raven\.(min\.)?js$/.test(b.filename)),b}},U:function(a,b,c,d,e,f){var g;if((!this.i.ignoreErrors.test||!this.i.ignoreErrors.test(b))&&(b+="",e&&e.length?(c=e[0].filename||c,e.reverse(),g={frames:e}):c&&(g={frames:[{filename:c,lineno:d,in_app:!0}]}),(!this.i.ignoreUrls.test||!this.i.ignoreUrls.test(c))&&(!this.i.whitelistUrls.test||this.i.whitelistUrls.test(c)))){var h=q({exception:{values:[{type:a,value:b,stacktrace:g}]},culprit:c},f);this.L(h)}},V:function(a){var b=this.i.maxMessageLength;if(a.message&&(a.message=r(a.message,b)),a.exception){var c=a.exception.values[0];c.value=r(c.value,b)}return a},W:function(){if(this.b&&document.location&&document.location.href){var a={headers:{"User-Agent":navigator.userAgent}};return a.url=document.location.href,document.referrer&&(a.headers.Referer=document.referrer),a}},L:function(a){var b=this.i,c={project:this.g,logger:b.logger,platform:"javascript"},e=this.W();e&&(c.request=e),a=q(c,a),a.tags=q(q({},this.h.tags),a.tags),a.extra=q(q({},this.h.extra),a.extra),a.extra["session:duration"]=d()-this.p,this.r&&this.r.length>0&&(a.breadcrumbs={values:[].slice.call(this.r,0)}),m(a.tags)&&delete a.tags,this.h.user&&(a.user=this.h.user),b.environment&&(a.environment=b.environment),b.release&&(a.release=b.release),b.serverName&&(a.server_name=b.serverName),j(b.dataCallback)&&(a=b.dataCallback(a)||a),a&&!m(a)&&(!j(b.shouldSendCallback)||b.shouldSendCallback(a))&&this.X(a)},X:function(a,b){var c=this,d=this.i;if(this.d=a.event_id||(a.event_id=t()),a=this.V(a),this.w("debug","Raven about to send:",a),this.isSetup()){var e={sentry_version:"7",sentry_client:"raven-js/"+this.VERSION,sentry_key:this.f};this.z&&(e.sentry_secret=this.z);var f=a.exception&&a.exception.values[0];this.captureBreadcrumb({category:"sentry",message:f?(f.type?f.type+": ":"")+f.value:a.message,event_id:a.event_id,level:a.level||"error"});var g=this.B;(d.transport||this.Y).call(this,{url:g,auth:e,data:a,options:d,onSuccess:function(){c.N("success",{data:a,src:g}),b&&b()},onError:function(d){c.N("failure",{data:a,src:g}),d=d||new Error("Raven send failed (no additional details provided)"),b&&b(d)}})}},Y:function(a){function b(){200===c.status?a.onSuccess&&a.onSuccess():a.onError&&a.onError(new Error("Sentry error code: "+c.status))}var c=new XMLHttpRequest,d="withCredentials"in c||"undefined"!=typeof XDomainRequest;if(d){var e=a.url;"withCredentials"in c?c.onreadystatechange=function(){4===c.readyState&&b()}:(c=new XDomainRequest,e=e.replace(/^https?:/,""),c.onload=b),c.open("POST",e+"?"+s(a.auth)),c.send(i(a.data))}},w:function(a){this.n[a]&&this.debug&&Function.prototype.apply.call(this.n[a],this.m,[].slice.call(arguments,1))},M:function(a,b){k(b)?delete this.h[a]:this.h[a]=q(this.h[a]||{},b)}},e.prototype.setUser=e.prototype.setUserContext,e.prototype.setReleaseContext=e.prototype.setRelease,b.exports=e},{1:1,2:2,3:3,6:6,7:7}],5:[function(a,b,c){"use strict";var d=a(4),e=window.Raven,f=new d;f.noConflict=function(){return window.Raven=e,f},f.afterLoad(),b.exports=f},{4:4}],6:[function(a,b,c){"use strict";function d(a){return void 0===a}function e(a){return"function"==typeof a}function f(a){return"[object String]"===t.toString.call(a)}function g(a){return"object"==typeof a&&null!==a}function h(a){for(var b in a)return!1;return!0}function i(a){var b=t.toString.call(a);return g(a)&&"[object Error]"===b||"[object Exception]"===b||a instanceof Error}function j(a,b){var c,e;if(d(a.length))for(c in a)m(a,c)&&b.call(null,c,a[c]);else if(e=a.length)for(c=0;e>c;c++)b.call(null,c,a[c])}function k(a,b){return b?(j(b,function(b,c){a[b]=c}),a):a}function l(a,b){return!b||b>=a.length?a:a.substr(0,b)+"…"}function m(a,b){return t.hasOwnProperty.call(a,b)}function n(a){for(var b,c=[],d=0,e=a.length;e>d;d++)b=a[d],f(b)?c.push(b.replace(/([.*+?^=!:${}()|\[\]\/\\])/g,"\\$1")):b&&b.source&&c.push(b.source);return new RegExp(c.join("|"),"i")}function o(a){var b=[];return j(a,function(a,c){b.push(encodeURIComponent(a)+"="+encodeURIComponent(c))}),b.join("&")}function p(a){var b=a.match(/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!b)return{};var c=b[6]||"",d=b[8]||"";return{protocol:b[2],host:b[4],path:b[5],relative:b[5]+c+d}}function q(){var a=window.crypto||window.msCrypto;if(!d(a)&&a.getRandomValues){var b=new Uint16Array(8);a.getRandomValues(b),b[3]=4095&b[3]|16384,b[4]=16383&b[4]|32768;var c=function(a){for(var b=a.toString(16);4>b.length;)b="0"+b;return b};return c(b[0])+c(b[1])+c(b[2])+c(b[3])+c(b[4])+c(b[5])+c(b[6])+c(b[7])}return"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,function(a){var b=16*Math.random()|0,c="x"===a?b:3&b|8;return c.toString(16)})}function r(a){for(var b,c=5,d=80,e=[],f=0,g=0,h=" > ",i=h.length;a&&f++<c&&(b=s(a),!("html"===b||f>1&&g+e.length*i+b.length>=d));)e.push(b),g+=b.length,a=a.parentNode;return e.reverse().join(h)}function s(a){var b,c,d,e,g,h=[];if(!a||!a.tagName)return"";if(h.push(a.tagName.toLowerCase()),a.id&&h.push("#"+a.id),b=a.className,b&&f(b))for(c=b.split(" "),g=0;c.length>g;g++)h.push("."+c[g]);var i=["type","name","title","alt"];for(g=0;i.length>g;g++)d=i[g],e=a.getAttribute(d),e&&h.push("["+d+'="'+e+'"]');return h.join("")}var t=Object.prototype;b.exports={isUndefined:d,isFunction:e,isString:f,isObject:g,isEmptyObject:h,isError:i,each:j,objectMerge:k,truncate:l,hasKey:m,joinRegExp:n,urlencode:o,uuid4:q,htmlTreeAsString:r,htmlElementAsString:s,parseUrl:p}},{}],7:[function(a,b,c){"use strict";function d(){return"undefined"==typeof document?"":document.location.href}var e=a(6),f=e.hasKey,g=e.isString,h=e.isUndefined,i={collectWindowErrors:!0,debug:!1},j=[].slice,k="?",l=/^(?:Uncaught (?:exception: )?)?((?:Eval|Internal|Range|Reference|Syntax|Type|URI)Error): ?(.*)$/;i.report=function(){function a(a){m(),s.push(a)}function b(a){for(var b=s.length-1;b>=0;--b)s[b]===a&&s.splice(b,1)}function c(){n(),s=[]}function e(a,b){var c=null;if(!b||i.collectWindowErrors){for(var d in s)if(f(s,d))try{s[d].apply(null,[a].concat(j.call(arguments,2)))}catch(e){c=e}if(c)throw c}}function h(a,b,c,f,h){var j=null;if(v)i.computeStackTrace.augmentStackTraceWithInitialElement(v,b,c,a),o();else if(h)j=i.computeStackTrace(h),e(j,!0);else{var m,n={url:b,line:c,column:f},p=void 0,r=a;if(g(a)){var m=a.match(l);m&&(p=m[1],r=m[2])}n.func=k,j={name:p,message:r,url:d(),stack:[n]},e(j,!0)}return q?q.apply(this,arguments):!1}function m(){r||(q=window.onerror,window.onerror=h,r=!0)}function n(){r&&(window.onerror=q,r=!1,q=void 0)}function o(){var a=v,b=t;t=null,v=null,u=null,e.apply(null,[a,!1].concat(b))}function p(a,b){var c=j.call(arguments,1);if(v){if(u===a)return;o()}var d=i.computeStackTrace(a);if(v=d,u=a,t=c,window.setTimeout(function(){u===a&&o()},d.incomplete?2e3:0),b!==!1)throw a}var q,r,s=[],t=null,u=null,v=null;return p.subscribe=a,p.unsubscribe=b,p.uninstall=c,p}(),i.computeStackTrace=function(){function a(a){if(!h(a.stack)&&a.stack){for(var b,c,e=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|<anonymous>).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,f=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|\[native).*?)(?::(\d+))?(?::(\d+))?\s*$/i,g=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,i=a.stack.split("\n"),j=[],l=(/^(.*) is undefined$/.exec(a.message),0),m=i.length;m>l;++l){if(b=e.exec(i[l])){var n=b[2]&&-1!==b[2].indexOf("native");c={url:n?null:b[2],func:b[1]||k,args:n?[b[2]]:[],line:b[3]?+b[3]:null,column:b[4]?+b[4]:null}}else if(b=g.exec(i[l]))c={url:b[2],func:b[1]||k,args:[],line:+b[3],column:b[4]?+b[4]:null};else{if(!(b=f.exec(i[l])))continue;c={url:b[3],func:b[1]||k,args:b[2]?b[2].split(","):[],line:b[4]?+b[4]:null,column:b[5]?+b[5]:null}}!c.func&&c.line&&(c.func=k),j.push(c)}return j.length?(j[0].column||h(a.columnNumber)||(j[0].column=a.columnNumber+1),{name:a.name,message:a.message,url:d(),stack:j}):null}}function b(a){var b=a.stacktrace;if(!h(a.stacktrace)&&a.stacktrace){for(var c,e=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,f=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^\)]+))\((.*)\))? in (.*):\s*$/i,g=b.split("\n"),i=[],j=0;g.length>j;j+=2){var l=null;(c=e.exec(g[j]))?l={url:c[2],line:+c[1],column:null,func:c[3],args:[]}:(c=f.exec(g[j]))&&(l={url:c[6],line:+c[1],column:+c[2],func:c[3]||c[4],args:c[5]?c[5].split(","):[]}),l&&(!l.func&&l.line&&(l.func=k),i.push(l))}return i.length?{name:a.name,message:a.message,url:d(),stack:i}:null}}function c(a){var b=a.message.split("\n");if(4>b.length)return null;for(var c,e=/^\s*Line (\d+) of linked script ((?:file|https?|blob)\S+)(?:: in function (\S+))?\s*$/i,f=/^\s*Line (\d+) of inline#(\d+) script in ((?:file|https?|blob)\S+)(?:: in function (\S+))?\s*$/i,g=/^\s*Line (\d+) of function script\s*$/i,h=[],i=(document.getElementsByTagName("script"),2);b.length>i;i+=2){var j=null;if(c=e.exec(b[i]))j={url:c[2],func:c[3],args:[],line:+c[1],column:null};else if(c=f.exec(b[i])){j={url:c[3],func:c[4],args:[],line:+c[1],column:null}}else if(c=g.exec(b[i])){var l=window.location.href.replace(/#.*$/,"");j={url:l,func:"",args:[],line:c[1],column:null}}j&&(j.func||(j.func=k),h.push(j))}return h.length?{name:a.name,message:b[0],url:d(),stack:h}:null}function e(a,b,c,d){var e={url:b,line:c};if(e.url&&e.line){if(a.incomplete=!1,e.func||(e.func=k),a.stack.length>0&&a.stack[0].url===e.url){if(a.stack[0].line===e.line)return!1;if(!a.stack[0].line&&a.stack[0].func===e.func)return a.stack[0].line=e.line,!1}return a.stack.unshift(e),a.partial=!0,!0}return a.incomplete=!0,!1}function f(a,b){for(var c,h,j=/function\s+([_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*)?\s*\(/i,l=[],m={},n=!1,o=f.caller;o&&!n;o=o.caller)if(o!==g&&o!==i.report){if(h={url:null,func:k,line:null,column:null},o.name?h.func=o.name:(c=j.exec(o.toString()))&&(h.func=c[1]),"undefined"==typeof h.func)try{h.func=c.input.substring(0,c.input.indexOf("{"))}catch(p){}m[""+o]?n=!0:m[""+o]=!0,l.push(h)}b&&l.splice(0,b);var q={name:a.name,message:a.message,url:d(),stack:l};return e(q,a.sourceURL||a.fileName,a.line||a.lineNumber,a.message||a.description),q}function g(e,g){var h=null;g=null==g?0:+g;try{if(h=b(e))return h}catch(j){if(i.debug)throw j}try{if(h=a(e))return h}catch(j){if(i.debug)throw j}try{if(h=c(e))return h}catch(j){if(i.debug)throw j}try{if(h=f(e,g+1))return h}catch(j){if(i.debug)throw j}return{name:e.name,message:e.message,url:d()}}return g.augmentStackTraceWithInitialElement=e,g.computeStackTraceFromStackProp=a,g}(),b.exports=i},{6:6}]},{},[5])(5)});
/*! Raven.js 3.5.0 (892008a) | github.com/getsentry/raven-js */
!function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,b.Raven=a()}}(function(){return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;d.length>g;g++)e(d[g]);return e}({1:[function(a,b,c){function d(a,b,c,d){return JSON.stringify(a,e(b,d),c)}function e(a,b){var c=[],d=[];return null==b&&(b=function(a,b){return c[0]===b?"[Circular ~]":"[Circular ~."+d.slice(0,c.indexOf(b)).join(".")+"]"}),function(e,f){if(c.length>0){var g=c.indexOf(this);~g?c.splice(g+1):c.push(this),~g?d.splice(g,1/0,e):d.push(e),~c.indexOf(f)&&(f=b.call(this,e,f))}else c.push(f);return null==a?f:a.call(this,e,f)}}c=b.exports=d,c.getSerialize=e},{}],2:[function(a,b,c){"use strict";function d(a){this.name="RavenConfigError",this.message=a}d.prototype=new Error,d.prototype.constructor=d,b.exports=d},{}],3:[function(a,b,c){"use strict";var d=function(a,b,c){var d=a[b],e=a;if(b in a){var f="warn"===b?"warning":b;a[b]=function(){var a=[].slice.call(arguments),b=""+a.join(" "),g={level:f,logger:"console",extra:{arguments:a}};c&&c(b,g),d&&Function.prototype.apply.call(d,e,a)}}};b.exports={wrapMethod:d}},{}],4:[function(a,b,c){"use strict";function d(){return+new Date}function e(){this.a=!("object"!=typeof JSON||!JSON.stringify),this.b="undefined"!=typeof document,this.c=null,this.d=null,this.e=null,this.f=null,this.g=null,this.h={},this.i={logger:"javascript",ignoreErrors:[],ignoreUrls:[],whitelistUrls:[],includePaths:[],crossOrigin:"anonymous",collectWindowErrors:!0,maxMessageLength:0,stackTraceLimit:50,autoBreadcrumbs:!0},this.j=0,this.k=!1,this.l=Error.stackTraceLimit,this.m=window.console||{},this.n={},this.o=[],this.p=d(),this.q=[],this.r=[],this.s=null,this.t=window.location,this.u=this.t&&this.t.href;for(var a in this.m)this.n[a]=this.m[a]}var f=a(7),g=a(2),h=a(6),i=a(1),j=h.isFunction,k=h.isUndefined,l=h.isError,m=h.isEmptyObject,n=h.hasKey,o=h.joinRegExp,p=h.each,q=h.objectMerge,r=h.truncate,s=h.urlencode,t=h.uuid4,u=h.htmlTreeAsString,v=h.parseUrl,w=h.isString,x=h.fill,y=a(3).wrapMethod,z="source protocol user pass host port path".split(" "),A=/^(?:(\w+):)?\/\/(?:(\w+)(:\w+)?@)?([\w\.-]+)(?::(\d+))?(\/.*)/;e.prototype={VERSION:"3.5.0",debug:!1,TraceKit:f,config:function(a,b){var c=this;if(this.e)return this.v("error","Error: Raven has already been configured"),this;if(!a)return this;b&&p(b,function(a,b){"tags"===a||"extra"===a?c.h[a]=b:c.i[a]=b});var d=this.w(a),e=d.path.lastIndexOf("/"),g=d.path.substr(1,e);this.x=a,this.i.ignoreErrors.push(/^Script error\.?$/),this.i.ignoreErrors.push(/^Javascript error: Script error\.? on line 0$/),this.i.ignoreErrors=o(this.i.ignoreErrors),this.i.ignoreUrls=this.i.ignoreUrls.length?o(this.i.ignoreUrls):!1,this.i.whitelistUrls=this.i.whitelistUrls.length?o(this.i.whitelistUrls):!1,this.i.includePaths=o(this.i.includePaths),this.i.maxBreadcrumbs=Math.max(0,Math.min(this.i.maxBreadcrumbs||100,100));var h={xhr:!0,console:!0,dom:!0,location:!0},i=this.i.autoBreadcrumbs;return"[object Object]"==={}.toString.call(i)?i=q(h,i):i!==!1&&(i=h),this.i.autoBreadcrumbs=i,this.f=d.user,this.y=d.pass&&d.pass.substr(1),this.g=d.path.substr(e+1),this.e=this.z(d),this.A=this.e+"/"+g+"api/"+this.g+"/store/",f.collectWindowErrors=!!this.i.collectWindowErrors,this},install:function(){var a=this;return this.isSetup()&&!this.k&&(f.report.subscribe(function(){a.B.apply(a,arguments)}),this.C(),a.i.autoBreadcrumbs&&this.D(),this.E(),this.k=!0),Error.stackTraceLimit=this.i.stackTraceLimit,this},context:function(a,b,c){return j(a)&&(c=b||[],b=a,a=void 0),this.wrap(a,b).apply(this,c)},wrap:function(a,b,c){function d(){var d=[],f=arguments.length,g=!a||a&&a.deep!==!1;for(c&&j(c)&&c.apply(this,arguments);f--;)d[f]=g?e.wrap(a,arguments[f]):arguments[f];try{return b.apply(this,d)}catch(h){throw e.F(),e.captureException(h,a),h}}var e=this;if(k(b)&&!j(a))return a;if(j(a)&&(b=a,a=void 0),!j(b))return b;try{if(b.G)return b}catch(f){return b}if(b.H)return b.H;for(var g in b)n(b,g)&&(d[g]=b[g]);return d.prototype=b.prototype,b.H=d,d.G=!0,d.I=b,d},uninstall:function(){return f.report.uninstall(),this.J(),Error.stackTraceLimit=this.l,this.k=!1,this},captureException:function(a,b){if(!l(a))return this.captureMessage(a,b);this.c=a;try{var c=f.computeStackTrace(a);this.K(c,b)}catch(d){if(a!==d)throw d}return this},captureMessage:function(a,b){return this.i.ignoreErrors.test&&this.i.ignoreErrors.test(a)?void 0:(this.L(q({message:a+""},b)),this)},captureBreadcrumb:function(a){var b=q({timestamp:d()/1e3},a);this.r.push(b),this.r.length>this.i.maxBreadcrumbs&&this.r.shift()},addPlugin:function(a){var b=Array.prototype.slice.call(arguments,1);return this.o.push([a,b]),this.k&&this.E(),this},setUserContext:function(a){return this.h.user=a,this},setExtraContext:function(a){return this.M("extra",a),this},setTagsContext:function(a){return this.M("tags",a),this},clearContext:function(){return this.h={},this},getContext:function(){return JSON.parse(i(this.h))},setEnvironment:function(a){return this.i.environment=a,this},setRelease:function(a){return this.i.release=a,this},setDataCallback:function(a){var b=this.i.dataCallback;return this.i.dataCallback=j(a)?function(c){return a(c,b)}:a,this},setShouldSendCallback:function(a){var b=this.i.shouldSendCallback;return this.i.shouldSendCallback=j(a)?function(c){return a(c,b)}:a,this},setTransport:function(a){return this.i.transport=a,this},lastException:function(){return this.c},lastEventId:function(){return this.d},isSetup:function(){return this.a?this.e?!0:(this.ravenNotConfiguredError||(this.ravenNotConfiguredError=!0,this.v("error","Error: Raven has not been configured.")),!1):!1},afterLoad:function(){var a=window.RavenConfig;a&&this.config(a.dsn,a.config).install()},showReportDialog:function(a){if(window.document){a=a||{};var b=a.eventId||this.lastEventId();if(!b)throw new g("Missing eventId");var c=a.dsn||this.x;if(!c)throw new g("Missing DSN");var d=encodeURIComponent,e="";e+="?eventId="+d(b),e+="&dsn="+d(c);var f=a.user||this.h.user;f&&(f.name&&(e+="&name="+d(f.name)),f.email&&(e+="&email="+d(f.email)));var h=this.z(this.w(c)),i=document.createElement("script");i.async=!0,i.src=h+"/api/embed/error-page/"+e,(document.head||document.body).appendChild(i)}},F:function(){var a=this;this.j+=1,setTimeout(function(){a.j-=1})},N:function(a,b){var c,d;if(this.b){b=b||{},a="raven"+a.substr(0,1).toUpperCase()+a.substr(1),document.createEvent?(c=document.createEvent("HTMLEvents"),c.initEvent(a,!0,!0)):(c=document.createEventObject(),c.eventType=a);for(d in b)n(b,d)&&(c[d]=b[d]);if(document.createEvent)document.dispatchEvent(c);else try{document.fireEvent("on"+c.eventType.toLowerCase(),c)}catch(e){}}},O:function(a){var b=this;return function(c){if(b.P=null,b.s!==c){b.s=c;var d,e=c.target;try{d=u(e)}catch(f){d="<unknown>"}b.captureBreadcrumb({category:"ui."+a,message:d})}}},Q:function(){var a=this,b=1e3;return function(c){var d=c.target,e=d&&d.tagName;if(e&&("INPUT"===e||"TEXTAREA"===e)){var f=a.P;f||a.O("input")(c),clearTimeout(f),a.P=setTimeout(function(){a.P=null},b)}}},R:function(a,b){var c=v(this.t.href),d=v(b),e=v(a);this.u=b,c.protocol===d.protocol&&c.host===d.host&&(b=d.relative),c.protocol===e.protocol&&c.host===e.host&&(a=e.relative),this.captureBreadcrumb({category:"navigation",data:{to:b,from:a}})},C:function(){function a(a){return function(b,d){for(var e=new Array(arguments.length),f=0;e.length>f;++f)e[f]=arguments[f];var g=e[0];return j(g)&&(e[0]=c.wrap(g)),a.apply?a.apply(this,e):a(e[0],e[1])}}function b(a){var b=window[a]&&window[a].prototype;b&&b.hasOwnProperty&&b.hasOwnProperty("addEventListener")&&(x(b,"addEventListener",function(b){return function(d,f,g,h){try{f&&f.handleEvent&&(f.handleEvent=c.wrap(f.handleEvent))}catch(i){}var j;return e&&e.dom&&("EventTarget"===a||"Node"===a)&&("click"===d?j=c.O(d):"keypress"===d&&(j=c.Q())),b.call(this,d,c.wrap(f,void 0,j),g,h)}},d),x(b,"removeEventListener",function(a){return function(b,c,d,e){return c=c&&(c.H?c.H:c),a.call(this,b,c,d,e)}},d))}var c=this,d=c.q,e=this.i.autoBreadcrumbs;x(window,"setTimeout",a,d),x(window,"setInterval",a,d),window.requestAnimationFrame&&x(window,"requestAnimationFrame",function(a){return function(b){return a(c.wrap(b))}},d);for(var f=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],g=0;f.length>g;g++)b(f[g]);var h=window.jQuery||window.$;h&&h.fn&&h.fn.ready&&x(h.fn,"ready",function(a){return function(b){return a.call(this,c.wrap(b))}},d)},D:function(){function a(a,c){a in c&&j(c[a])&&x(c,a,function(a){return b.wrap(a)})}var b=this,c=this.i.autoBreadcrumbs,d=b.q;if(c.xhr&&"XMLHttpRequest"in window){var e=XMLHttpRequest.prototype;x(e,"open",function(a){return function(c,d){return w(d)&&-1===d.indexOf(b.f)&&(this.S={method:c,url:d,status_code:null}),a.apply(this,arguments)}},d),x(e,"send",function(c){return function(d){function e(){if(f.S&&(1===f.readyState||4===f.readyState)){try{f.S.status_code=f.status}catch(a){}b.captureBreadcrumb({type:"http",category:"xhr",data:f.S})}}for(var f=this,g=["onload","onerror","onprogress"],h=0;g.length>h;h++)a(g[h],f);return"onreadystatechange"in f&&j(f.onreadystatechange)?x(f,"onreadystatechange",function(a){return b.wrap(a,void 0,e)}):f.onreadystatechange=e,c.apply(this,arguments)}},d)}c.dom&&this.b&&(document.addEventListener?(document.addEventListener("click",b.O("click"),!1),document.addEventListener("keypress",b.Q(),!1)):(document.attachEvent("onclick",b.O("click")),document.attachEvent("onkeypress",b.Q())));var f=window.chrome,g=f&&f.app&&f.app.runtime,h=!g&&window.history&&history.pushState;if(c.location&&h){var i=window.onpopstate;window.onpopstate=function(){var a=b.t.href;return b.R(b.u,a),i?i.apply(this,arguments):void 0},x(history,"pushState",function(a){return function(){var c=arguments.length>2?arguments[2]:void 0;return c&&b.R(b.u,c+""),a.apply(this,arguments)}},d)}if(c.console&&"console"in window&&console.log){var k=function(a,c){b.captureBreadcrumb({message:a,level:c.level,category:"console"})};p(["debug","info","warn","error","log"],function(a,b){y(console,b,k)})}},J:function(){for(var a;this.q.length;){a=this.q.shift();var b=a[0],c=a[1],d=a[2];b[c]=d}},E:function(){var a=this;p(this.o,function(b,c){var d=c[0],e=c[1];d.apply(a,[a].concat(e))})},w:function(a){var b=A.exec(a),c={},d=7;try{for(;d--;)c[z[d]]=b[d]||""}catch(e){throw new g("Invalid DSN: "+a)}if(c.pass&&!this.i.allowSecretKey)throw new g("Do not specify your secret key in the DSN. See: http://bit.ly/raven-secret-key");return c},z:function(a){var b="//"+a.host+(a.port?":"+a.port:"");return a.protocol&&(b=a.protocol+":"+b),b},B:function(){this.j||this.K.apply(this,arguments)},K:function(a,b){var c=this,d=[];a.stack&&a.stack.length&&p(a.stack,function(a,b){var e=c.T(b);e&&d.push(e)}),this.N("handle",{stackInfo:a,options:b}),this.U(a.name,a.message,a.url,a.lineno,d.slice(0,this.i.stackTraceLimit),b)},T:function(a){if(a.url){var b={filename:a.url,lineno:a.line,colno:a.column,"function":a.func||"?"};return b.in_app=!(this.i.includePaths.test&&!this.i.includePaths.test(b.filename)||/(Raven|TraceKit)\./.test(b["function"])||/raven\.(min\.)?js$/.test(b.filename)),b}},U:function(a,b,c,d,e,f){var g;if((!this.i.ignoreErrors.test||!this.i.ignoreErrors.test(b))&&(b+="",e&&e.length?(c=e[0].filename||c,e.reverse(),g={frames:e}):c&&(g={frames:[{filename:c,lineno:d,in_app:!0}]}),(!this.i.ignoreUrls.test||!this.i.ignoreUrls.test(c))&&(!this.i.whitelistUrls.test||this.i.whitelistUrls.test(c)))){var h=q({exception:{values:[{type:a,value:b,stacktrace:g}]},culprit:c},f);this.L(h)}},V:function(a){var b=this.i.maxMessageLength;if(a.message&&(a.message=r(a.message,b)),a.exception){var c=a.exception.values[0];c.value=r(c.value,b)}return a},W:function(){if(this.b&&document.location&&document.location.href){var a={headers:{"User-Agent":navigator.userAgent}};return a.url=document.location.href,document.referrer&&(a.headers.Referer=document.referrer),a}},L:function(a){var b=this.i,c={project:this.g,logger:b.logger,platform:"javascript"},e=this.W();e&&(c.request=e),a=q(c,a),a.tags=q(q({},this.h.tags),a.tags),a.extra=q(q({},this.h.extra),a.extra),a.extra["session:duration"]=d()-this.p,this.r&&this.r.length>0&&(a.breadcrumbs={values:[].slice.call(this.r,0)}),m(a.tags)&&delete a.tags,this.h.user&&(a.user=this.h.user),b.environment&&(a.environment=b.environment),b.release&&(a.release=b.release),b.serverName&&(a.server_name=b.serverName),j(b.dataCallback)&&(a=b.dataCallback(a)||a),a&&!m(a)&&(!j(b.shouldSendCallback)||b.shouldSendCallback(a))&&this.X(a)},X:function(a,b){var c=this,d=this.i;if(this.d=a.event_id||(a.event_id=t()),a=this.V(a),this.v("debug","Raven about to send:",a),this.isSetup()){var e={sentry_version:"7",sentry_client:"raven-js/"+this.VERSION,sentry_key:this.f};this.y&&(e.sentry_secret=this.y);var f=a.exception&&a.exception.values[0];this.captureBreadcrumb({category:"sentry",message:f?(f.type?f.type+": ":"")+f.value:a.message,event_id:a.event_id,level:a.level||"error"});var g=this.A;(d.transport||this.Y).call(this,{url:g,auth:e,data:a,options:d,onSuccess:function(){c.N("success",{data:a,src:g}),b&&b()},onError:function(d){c.N("failure",{data:a,src:g}),d=d||new Error("Raven send failed (no additional details provided)"),b&&b(d)}})}},Y:function(a){function b(){200===c.status?a.onSuccess&&a.onSuccess():a.onError&&a.onError(new Error("Sentry error code: "+c.status))}var c=new XMLHttpRequest,d="withCredentials"in c||"undefined"!=typeof XDomainRequest;if(d){var e=a.url;"withCredentials"in c?c.onreadystatechange=function(){4===c.readyState&&b()}:(c=new XDomainRequest,e=e.replace(/^https?:/,""),c.onload=b),c.open("POST",e+"?"+s(a.auth)),c.send(i(a.data))}},v:function(a){this.n[a]&&this.debug&&Function.prototype.apply.call(this.n[a],this.m,[].slice.call(arguments,1))},M:function(a,b){k(b)?delete this.h[a]:this.h[a]=q(this.h[a]||{},b)}},e.prototype.setUser=e.prototype.setUserContext,e.prototype.setReleaseContext=e.prototype.setRelease,b.exports=e},{1:1,2:2,3:3,6:6,7:7}],5:[function(a,b,c){"use strict";var d=a(4),e=window.Raven,f=new d;f.noConflict=function(){return window.Raven=e,f},f.afterLoad(),b.exports=f},{4:4}],6:[function(a,b,c){"use strict";function d(a){return void 0===a}function e(a){return"function"==typeof a}function f(a){return"[object String]"===u.toString.call(a)}function g(a){return"object"==typeof a&&null!==a}function h(a){for(var b in a)return!1;return!0}function i(a){var b=u.toString.call(a);return g(a)&&"[object Error]"===b||"[object Exception]"===b||a instanceof Error}function j(a,b){var c,e;if(d(a.length))for(c in a)m(a,c)&&b.call(null,c,a[c]);else if(e=a.length)for(c=0;e>c;c++)b.call(null,c,a[c])}function k(a,b){return b?(j(b,function(b,c){a[b]=c}),a):a}function l(a,b){return!b||b>=a.length?a:a.substr(0,b)+"…"}function m(a,b){return u.hasOwnProperty.call(a,b)}function n(a){for(var b,c=[],d=0,e=a.length;e>d;d++)b=a[d],f(b)?c.push(b.replace(/([.*+?^=!:${}()|\[\]\/\\])/g,"\\$1")):b&&b.source&&c.push(b.source);return new RegExp(c.join("|"),"i")}function o(a){var b=[];return j(a,function(a,c){b.push(encodeURIComponent(a)+"="+encodeURIComponent(c))}),b.join("&")}function p(a){var b=a.match(/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!b)return{};var c=b[6]||"",d=b[8]||"";return{protocol:b[2],host:b[4],path:b[5],relative:b[5]+c+d}}function q(){var a=window.crypto||window.msCrypto;if(!d(a)&&a.getRandomValues){var b=new Uint16Array(8);a.getRandomValues(b),b[3]=4095&b[3]|16384,b[4]=16383&b[4]|32768;var c=function(a){for(var b=a.toString(16);4>b.length;)b="0"+b;return b};return c(b[0])+c(b[1])+c(b[2])+c(b[3])+c(b[4])+c(b[5])+c(b[6])+c(b[7])}return"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,function(a){var b=16*Math.random()|0,c="x"===a?b:3&b|8;return c.toString(16)})}function r(a){for(var b,c=5,d=80,e=[],f=0,g=0,h=" > ",i=h.length;a&&f++<c&&(b=s(a),!("html"===b||f>1&&g+e.length*i+b.length>=d));)e.push(b),g+=b.length,a=a.parentNode;return e.reverse().join(h)}function s(a){var b,c,d,e,g,h=[];if(!a||!a.tagName)return"";if(h.push(a.tagName.toLowerCase()),a.id&&h.push("#"+a.id),b=a.className,b&&f(b))for(c=b.split(" "),g=0;c.length>g;g++)h.push("."+c[g]);var i=["type","name","title","alt"];for(g=0;i.length>g;g++)d=i[g],e=a.getAttribute(d),e&&h.push("["+d+'="'+e+'"]');return h.join("")}function t(a,b,c,d){var e=a[b];a[b]=c(e),d&&d.push([a,b,e])}var u=Object.prototype;b.exports={isUndefined:d,isFunction:e,isString:f,isObject:g,isEmptyObject:h,isError:i,each:j,objectMerge:k,truncate:l,hasKey:m,joinRegExp:n,urlencode:o,uuid4:q,htmlTreeAsString:r,htmlElementAsString:s,parseUrl:p,fill:t}},{}],7:[function(a,b,c){"use strict";function d(){return"undefined"==typeof document?"":document.location.href}var e=a(6),f=e.hasKey,g=e.isString,h=e.isUndefined,i={collectWindowErrors:!0,debug:!1},j=[].slice,k="?",l=/^(?:Uncaught (?:exception: )?)?((?:Eval|Internal|Range|Reference|Syntax|Type|URI)Error): ?(.*)$/;i.report=function(){function a(a){m(),s.push(a)}function b(a){for(var b=s.length-1;b>=0;--b)s[b]===a&&s.splice(b,1)}function c(){n(),s=[]}function e(a,b){var c=null;if(!b||i.collectWindowErrors){for(var d in s)if(f(s,d))try{s[d].apply(null,[a].concat(j.call(arguments,2)))}catch(e){c=e}if(c)throw c}}function h(a,b,c,f,h){var j=null;if(v)i.computeStackTrace.augmentStackTraceWithInitialElement(v,b,c,a),o();else if(h)j=i.computeStackTrace(h),e(j,!0);else{var m,n={url:b,line:c,column:f},p=void 0,r=a;if(g(a)){var m=a.match(l);m&&(p=m[1],r=m[2])}n.func=k,j={name:p,message:r,url:d(),stack:[n]},e(j,!0)}return q?q.apply(this,arguments):!1}function m(){r||(q=window.onerror,window.onerror=h,r=!0)}function n(){r&&(window.onerror=q,r=!1,q=void 0)}function o(){var a=v,b=t;t=null,v=null,u=null,e.apply(null,[a,!1].concat(b))}function p(a,b){var c=j.call(arguments,1);if(v){if(u===a)return;o()}var d=i.computeStackTrace(a);if(v=d,u=a,t=c,window.setTimeout(function(){u===a&&o()},d.incomplete?2e3:0),b!==!1)throw a}var q,r,s=[],t=null,u=null,v=null;return p.subscribe=a,p.unsubscribe=b,p.uninstall=c,p}(),i.computeStackTrace=function(){function a(a){if(!h(a.stack)&&a.stack){for(var b,c,e=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|<anonymous>).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,f=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|\[native).*?)(?::(\d+))?(?::(\d+))?\s*$/i,g=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,i=a.stack.split("\n"),j=[],l=(/^(.*) is undefined$/.exec(a.message),0),m=i.length;m>l;++l){if(b=e.exec(i[l])){var n=b[2]&&-1!==b[2].indexOf("native");c={url:n?null:b[2],func:b[1]||k,args:n?[b[2]]:[],line:b[3]?+b[3]:null,column:b[4]?+b[4]:null}}else if(b=g.exec(i[l]))c={url:b[2],func:b[1]||k,args:[],line:+b[3],column:b[4]?+b[4]:null};else{if(!(b=f.exec(i[l])))continue;c={url:b[3],func:b[1]||k,args:b[2]?b[2].split(","):[],line:b[4]?+b[4]:null,column:b[5]?+b[5]:null}}!c.func&&c.line&&(c.func=k),j.push(c)}return j.length?(j[0].column||h(a.columnNumber)||(j[0].column=a.columnNumber+1),{name:a.name,message:a.message,url:d(),stack:j}):null}}function b(a){var b=a.stacktrace;if(!h(a.stacktrace)&&a.stacktrace){for(var c,e=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,f=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^\)]+))\((.*)\))? in (.*):\s*$/i,g=b.split("\n"),i=[],j=0;g.length>j;j+=2){var l=null;(c=e.exec(g[j]))?l={url:c[2],line:+c[1],column:null,func:c[3],args:[]}:(c=f.exec(g[j]))&&(l={url:c[6],line:+c[1],column:+c[2],func:c[3]||c[4],args:c[5]?c[5].split(","):[]}),l&&(!l.func&&l.line&&(l.func=k),i.push(l))}return i.length?{name:a.name,message:a.message,url:d(),stack:i}:null}}function c(a){var b=a.message.split("\n");if(4>b.length)return null;for(var c,e=/^\s*Line (\d+) of linked script ((?:file|https?|blob)\S+)(?:: in function (\S+))?\s*$/i,f=/^\s*Line (\d+) of inline#(\d+) script in ((?:file|https?|blob)\S+)(?:: in function (\S+))?\s*$/i,g=/^\s*Line (\d+) of function script\s*$/i,h=[],i=(document.getElementsByTagName("script"),2);b.length>i;i+=2){var j=null;if(c=e.exec(b[i]))j={url:c[2],func:c[3],args:[],line:+c[1],column:null};else if(c=f.exec(b[i])){j={url:c[3],func:c[4],args:[],line:+c[1],column:null}}else if(c=g.exec(b[i])){var l=window.location.href.replace(/#.*$/,"");j={url:l,func:"",args:[],line:c[1],column:null}}j&&(j.func||(j.func=k),h.push(j))}return h.length?{name:a.name,message:b[0],url:d(),stack:h}:null}function e(a,b,c,d){var e={url:b,line:c};if(e.url&&e.line){if(a.incomplete=!1,e.func||(e.func=k),a.stack.length>0&&a.stack[0].url===e.url){if(a.stack[0].line===e.line)return!1;if(!a.stack[0].line&&a.stack[0].func===e.func)return a.stack[0].line=e.line,!1}return a.stack.unshift(e),a.partial=!0,!0}return a.incomplete=!0,!1}function f(a,b){for(var c,h,j=/function\s+([_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*)?\s*\(/i,l=[],m={},n=!1,o=f.caller;o&&!n;o=o.caller)if(o!==g&&o!==i.report){if(h={url:null,func:k,line:null,column:null},o.name?h.func=o.name:(c=j.exec(o.toString()))&&(h.func=c[1]),"undefined"==typeof h.func)try{h.func=c.input.substring(0,c.input.indexOf("{"))}catch(p){}m[""+o]?n=!0:m[""+o]=!0,l.push(h)}b&&l.splice(0,b);var q={name:a.name,message:a.message,url:d(),stack:l};return e(q,a.sourceURL||a.fileName,a.line||a.lineNumber,a.message||a.description),q}function g(e,g){var h=null;g=null==g?0:+g;try{if(h=b(e))return h}catch(j){if(i.debug)throw j}try{if(h=a(e))return h}catch(j){if(i.debug)throw j}try{if(h=c(e))return h}catch(j){if(i.debug)throw j}try{if(h=f(e,g+1))return h}catch(j){if(i.debug)throw j}return{name:e.name,message:e.message,url:d()}}return g.augmentStackTraceWithInitialElement=e,g.computeStackTraceFromStackProp=a,g}(),b.exports=i},{6:6}]},{},[5])(5)});
//# sourceMappingURL=raven.min.js.map
{
"@dist/raven.js": {
"hashes": {
"sha256": "RM50R0xnAa/1NkxRq0JoXbCAws2ZzPSwwxBZRrPC31w=",
"sha512": "FRmORhyfhvmsrh1QfYmDjEu61TP3IAFICTFLeiPO5tH3ToEJDpgacs/yZ7G0VqVlFRe0frUQKJBjR0Lv/7bkRQ=="
"sha256": "4T6vX55YCKEdsXm2e848GI/Rw7S0w12FN3qHHd14uYA=",
"sha512": "4zFM5q/2zfwVq/jk4+BG6WrlJK5gRMxhz4zfio9N4a6dLY+WAsgUtK8cr8oJ1RZCdehDxzNng5SYc6R9cSEDDA=="
},
"type": null,
"integrity": "sha256-RM50R0xnAa/1NkxRq0JoXbCAws2ZzPSwwxBZRrPC31w= sha512-FRmORhyfhvmsrh1QfYmDjEu61TP3IAFICTFLeiPO5tH3ToEJDpgacs/yZ7G0VqVlFRe0frUQKJBjR0Lv/7bkRQ==",
"integrity": "sha256-4T6vX55YCKEdsXm2e848GI/Rw7S0w12FN3qHHd14uYA= sha512-4zFM5q/2zfwVq/jk4+BG6WrlJK5gRMxhz4zfio9N4a6dLY+WAsgUtK8cr8oJ1RZCdehDxzNng5SYc6R9cSEDDA==",
"path": "dist/raven.js"

@@ -13,9 +13,9 @@ },

"hashes": {
"sha256": "myJlKkvMQXnrsQD1GCNY7stvL+6iExmMu7JiiNu7xH4=",
"sha512": "QkqshXoHkm1vrO3exGTkXns7iYvqXrTJwUg5BnxSWKUKJXPDKL9mCpe+AO8S74k3fiYhcvPcQipULodElFWb7g=="
"sha256": "x2kubc5sdO++lP5Rqf1l7yFL+rSm+mTWVnsX0k6FmCU=",
"sha512": "/D4L3w7gMg1T0MtevriHRQj19bFMjnbhZ3CaPelYVyW6P2oaAZQ7J+GctzCR44ahwjQRZwa8Ujw6jSpgHJ5WPg=="
},
"type": null,
"integrity": "sha256-myJlKkvMQXnrsQD1GCNY7stvL+6iExmMu7JiiNu7xH4= sha512-QkqshXoHkm1vrO3exGTkXns7iYvqXrTJwUg5BnxSWKUKJXPDKL9mCpe+AO8S74k3fiYhcvPcQipULodElFWb7g==",
"integrity": "sha256-x2kubc5sdO++lP5Rqf1l7yFL+rSm+mTWVnsX0k6FmCU= sha512-/D4L3w7gMg1T0MtevriHRQj19bFMjnbhZ3CaPelYVyW6P2oaAZQ7J+GctzCR44ahwjQRZwa8Ujw6jSpgHJ5WPg==",
"path": "dist/raven.min.js"
}
}
{
"name": "raven-js",
"version": "3.4.1",
"version": "3.5.0",
"license": "BSD-2-Clause",

@@ -5,0 +5,0 @@ "homepage": "https://github.com/getsentry/raven-js",

@@ -25,3 +25,3 @@ /*global ErrorUtils:false*/

var PATH_STRIP_RE = /^.*\/[^\.]+\.app/;
var PATH_STRIP_RE = /^.*\/[^\.]+(\.app|CodePush)/;

@@ -28,0 +28,0 @@ var FATAL_ERROR_KEY = '--rn-fatal--';

@@ -23,2 +23,3 @@ /*global XDomainRequest:false*/

var isString = utils.isString;
var fill = utils.fill;

@@ -34,2 +35,3 @@ var wrapConsoleMethod = require('./console').wrapMethod;

// First, check for JSON support

@@ -57,3 +59,4 @@ // If there is no JSON, we no-op the core features of Raven

maxMessageLength: 0,
stackTraceLimit: 50
stackTraceLimit: 50,
autoBreadcrumbs: true
};

@@ -71,3 +74,2 @@ this._ignoreOnError = 0;

this._breadcrumbs = [];
this._breadcrumbLimit = 20;
this._lastCapturedEvent = null;

@@ -94,3 +96,3 @@ this._keypressTimeout;

// See: https://github.com/getsentry/raven-js/issues/465
VERSION: '3.4.1',
VERSION: '3.5.0',

@@ -145,3 +147,19 @@ debug: false,

this._globalOptions.includePaths = joinRegExp(this._globalOptions.includePaths);
this._globalOptions.maxBreadcrumbs = Math.max(0, Math.min(this._globalOptions.maxBreadcrumbs || 100, 100)); // default and hard limit is 100
var autoBreadcrumbDefaults = {
xhr: true,
console: true,
dom: true,
location: true
};
var autoBreadcrumbs = this._globalOptions.autoBreadcrumbs;
if ({}.toString.call(autoBreadcrumbs) === '[object Object]') {
autoBreadcrumbs = objectMerge(autoBreadcrumbDefaults, autoBreadcrumbs);
} else if (autoBreadcrumbs !== false) {
autoBreadcrumbs = autoBreadcrumbDefaults;
}
this._globalOptions.autoBreadcrumbs = autoBreadcrumbs;
this._globalKey = uri.user;

@@ -176,3 +194,5 @@ this._globalSecret = uri.pass && uri.pass.substr(1);

});
this._wrapBuiltIns();
this._instrumentTryCatch();
if (self._globalOptions.autoBreadcrumbs)
this._instrumentBreadcrumbs();

@@ -368,3 +388,3 @@ // Install all of the plugins

this._breadcrumbs.push(crumb);
if (this._breadcrumbs.length > this._breadcrumbLimit) {
if (this._breadcrumbs.length > this._globalOptions.maxBreadcrumbs) {
this._breadcrumbs.shift();

@@ -753,12 +773,6 @@ }

*/
_wrapBuiltIns: function() {
_instrumentTryCatch: function() {
var self = this;
function fill(obj, name, replacement, noUndo) {
var orig = obj[name];
obj[name] = replacement(orig);
if (!noUndo) {
self._wrappedBuiltIns.push([obj, name, orig]);
}
}
var wrappedBuiltIns = self._wrappedBuiltIns;

@@ -789,2 +803,4 @@ function wrapTimeFn(orig) {

var autoBreadcrumbs = this._globalOptions.autoBreadcrumbs;
function wrapEventTarget(global) {

@@ -803,6 +819,6 @@ var proto = window[global] && window[global].prototype;

// TODO: more than just click
// More breadcrumb DOM capture ... done here and not in `_instrumentBreadcrumbs`
// so that we don't have more than one wrapper function
var before;
if (global === 'EventTarget' || global === 'Node') {
if (autoBreadcrumbs && autoBreadcrumbs.dom && (global === 'EventTarget' || global === 'Node')) {
if (evtName === 'click'){

@@ -816,3 +832,3 @@ before = self._breadcrumbEventHandler(evtName);

};
});
}, wrappedBuiltIns);
fill(proto, 'removeEventListener', function (orig) {

@@ -823,16 +839,8 @@ return function (evt, fn, capture, secure) {

};
});
}, wrappedBuiltIns);
}
}
function wrapProp(prop, xhr) {
if (prop in xhr && isFunction(xhr[prop])) {
fill(xhr, prop, function (orig) {
return self.wrap(orig);
}, true /* noUndo */); // don't track filled methods on XHR instances
}
}
fill(window, 'setTimeout', wrapTimeFn);
fill(window, 'setInterval', wrapTimeFn);
fill(window, 'setTimeout', wrapTimeFn, wrappedBuiltIns);
fill(window, 'setInterval', wrapTimeFn, wrappedBuiltIns);
if (window.requestAnimationFrame) {

@@ -843,19 +851,5 @@ fill(window, 'requestAnimationFrame', function (orig) {

};
});
}, wrappedBuiltIns);
}
// Capture breadcrubms from any click that is unhandled / bubbled up all the way
// to the document. Do this before we instrument addEventListener.
if (this._hasDocument) {
if (document.addEventListener) {
document.addEventListener('click', self._breadcrumbEventHandler('click'), false);
document.addEventListener('keypress', self._keypressEventHandler(), false);
}
else {
// IE8 Compatibility
document.attachEvent('onclick', self._breadcrumbEventHandler('click'));
document.attachEvent('onkeypress', self._keypressEventHandler());
}
}
// event targets borrowed from bugsnag-js:

@@ -868,3 +862,37 @@ // https://github.com/bugsnag/bugsnag-js/blob/master/src/bugsnag.js#L666

if ('XMLHttpRequest' in window) {
var $ = window.jQuery || window.$;
if ($ && $.fn && $.fn.ready) {
fill($.fn, 'ready', function (orig) {
return function (fn) {
return orig.call(this, self.wrap(fn));
};
}, wrappedBuiltIns);
}
},
/**
* Instrument browser built-ins w/ breadcrumb capturing
* - XMLHttpRequests
* - DOM interactions (click/typing)
* - window.location changes
* - console
*
* Can be disabled or individually configured via the `autoBreadcrumbs` config option
*/
_instrumentBreadcrumbs: function () {
var self = this;
var autoBreadcrumbs = this._globalOptions.autoBreadcrumbs;
var wrappedBuiltIns = self._wrappedBuiltIns;
function wrapProp(prop, xhr) {
if (prop in xhr && isFunction(xhr[prop])) {
fill(xhr, prop, function (orig) {
return self.wrap(orig);
}); // intentionally don't track filled methods on XHR instances
}
}
if (autoBreadcrumbs.xhr && 'XMLHttpRequest' in window) {
var xhrproto = XMLHttpRequest.prototype;

@@ -885,3 +913,3 @@ fill(xhrproto, 'open', function(origOpen) {

};
});
}, wrappedBuiltIns);

@@ -915,3 +943,3 @@ fill(xhrproto, 'send', function(origSend) {

return self.wrap(orig, undefined, onreadystatechangeHandler);
}, true /* noUndo */);
} /* intentionally don't track this instrumentation */);
} else {

@@ -925,5 +953,19 @@ // if onreadystatechange wasn't actually set by the page on this xhr, we

};
});
}, wrappedBuiltIns);
}
// Capture breadcrumbs from any click that is unhandled / bubbled up all the way
// to the document. Do this before we instrument addEventListener.
if (autoBreadcrumbs.dom && this._hasDocument) {
if (document.addEventListener) {
document.addEventListener('click', self._breadcrumbEventHandler('click'), false);
document.addEventListener('keypress', self._keypressEventHandler(), false);
}
else {
// IE8 Compatibility
document.attachEvent('onclick', self._breadcrumbEventHandler('click'));
document.attachEvent('onkeypress', self._keypressEventHandler());
}
}
// record navigation (URL) changes

@@ -936,3 +978,3 @@ // NOTE: in Chrome App environment, touching history.pushState, *even inside

var hasPushState = !isChromePackagedApp && window.history && history.pushState;
if (hasPushState) {
if (autoBreadcrumbs.location && hasPushState) {
// TODO: remove onpopstate handler on uninstall()

@@ -952,3 +994,3 @@ var oldOnPopState = window.onpopstate;

// params to preserve 0 arity
return function(/* state, title, url */) {
return function (/* state, title, url */) {
var url = arguments.length > 2 ? arguments[2] : undefined;

@@ -964,15 +1006,15 @@

};
});
}, wrappedBuiltIns);
}
// console
var consoleMethodCallback = function (msg, data) {
self.captureBreadcrumb({
message: msg,
level: data.level,
category: 'console'
});
};
if (autoBreadcrumbs.console && 'console' in window && console.log) {
// console
var consoleMethodCallback = function (msg, data) {
self.captureBreadcrumb({
message: msg,
level: data.level,
category: 'console'
});
};
if ('console' in window && console.log) {
each(['debug', 'info', 'warn', 'error', 'log'], function (_, level) {

@@ -983,10 +1025,2 @@ wrapConsoleMethod(console, level, consoleMethodCallback);

var $ = window.jQuery || window.$;
if ($ && $.fn && $.fn.ready) {
fill($.fn, 'ready', function (orig) {
return function (fn) {
return orig.call(this, self.wrap(fn));
};
});
}
},

@@ -993,0 +1027,0 @@

@@ -239,2 +239,17 @@ /*eslint no-extra-parens:0*/

/**
* Polyfill a method
* @param obj object e.g. `document`
* @param name method name present on object e.g. `addEventListener`
* @param replacement replacement function
* @param track {optional} record instrumentation to an array
*/
function fill(obj, name, replacement, track) {
var orig = obj[name];
obj[name] = replacement(orig);
if (track) {
track.push([obj, name, orig]);
}
}
module.exports = {

@@ -256,3 +271,4 @@ isUndefined: isUndefined,

htmlElementAsString: htmlElementAsString,
parseUrl: parseUrl
parseUrl: parseUrl,
fill: fill
};

@@ -20,3 +20,3 @@ var Promise = require('bluebird');

describe('_normalizeData()', function () {
it('should normalize culprit and frame filenames/URLs', function () {
it('should normalize culprit and frame filenames/URLs from app', function () {
var data = {

@@ -56,2 +56,38 @@ project: '2',

});
it('should normalize culprit and frame filenames/URLs from CodePush', function () {
var data = {
project: '2',
logger: 'javascript',
platform: 'javascript',
culprit: 'file:///var/mobile/Containers/Data/Application/ABC/Library/Application%20Support/CodePush/CDE/CodePush/app.js',
message: 'Error: crap',
exception: {
type: 'Error',
values: [{
stacktrace: {
frames: [{
filename: 'file:///var/mobile/Containers/Data/Application/ABC/Library/Application%20Support/CodePush/CDE/CodePush/file1.js',
lineno: 10,
colno: 11,
'function': 'broken'
}, {
filename: 'file:///var/mobile/Containers/Data/Application/ABC/Library/Application%20Support/CodePush/CDE/CodePush/file2.js',
lineno: 12,
colno: 13,
'function': 'lol'
}]
}
}],
}
};
reactNativePlugin._normalizeData(data);
assert.equal(data.culprit, '/app.js');
var frames = data.exception.values[0].stacktrace.frames;
assert.equal(frames[0].filename, '/file1.js');
assert.equal(frames[1].filename, '/file2.js');
});
});

@@ -58,0 +94,0 @@

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc