/*! Raven.js 3.9.1 (0b3c5ff) | 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;g0){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){(function(c){"use strict";function d(){return+new Date}function e(){this.a=!("object"!=typeof JSON||!JSON.stringify),this.b=!f(D),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=C.console||{},this.n={},this.o=[],this.p=d(),this.q=[],this.r=[],this.s=null,this.t=C.location,this.u=this.t&&this.t.href;for(var a in this.m)this.n[a]=this.m[a]}function f(a){return void 0===a}function g(a){return"function"==typeof a}function h(a){return"[object String]"===E.toString.call(a)}function i(a){return"object"==typeof a&&null!==a}function j(a){for(var b in a)return!1;return!0}function k(a){var b=E.toString.call(a);return i(a)&&"[object Error]"===b||"[object Exception]"===b||a instanceof Error}function l(a,b){var c,d;if(f(a.length))for(c in a)o(a,c)&&b.call(null,c,a[c]);else if(d=a.length)for(c=0;c ",i=h.length;a&&f++1&&g+e.length*i+b.length>=d));)e.push(b),g+=b.length,a=a.parentNode;return e.reverse().join(h)}function u(a){var b,c,d,e,f,g=[];if(!a||!a.tagName)return"";if(g.push(a.tagName.toLowerCase()),a.id&&g.push("#"+a.id),b=a.className,b&&h(b))for(c=b.split(" "),f=0;fthis.i.maxBreadcrumbs&&this.r.shift(),this},addPlugin:function(a){var b=[].slice.call(arguments,1);return this.o.push([a,b]),this.k&&this.z(),this},setUserContext:function(a){return this.h.user=a,this},setExtraContext:function(a){return this.N("extra",a),this},setTagsContext:function(a){return this.N("tags",a),this},clearContext:function(){return this.h={},this},getContext:function(){return JSON.parse(y(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=g(a)?function(c){return a(c,b)}:a,this},setBreadcrumbCallback:function(a){var b=this.i.breadcrumbCallback;return this.i.breadcrumbCallback=g(a)?function(c){return a(c,b)}:a,this},setShouldSendCallback:function(a){var b=this.i.shouldSendCallback;return this.i.shouldSendCallback=g(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||(this.ravenNotConfiguredError||(this.ravenNotConfiguredError=!0,this.v("error","Error: Raven has not been configured.")),!1))},afterLoad:function(){var a=C.RavenConfig;a&&this.config(a.dsn,a.config).install()},showReportDialog:function(a){if(D){a=a||{};var b=a.eventId||this.lastEventId();if(!b)throw new x("Missing eventId");var c=a.dsn||this.B;if(!c)throw new x("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 g=this.D(this.A(c)),h=D.createElement("script");h.async=!0,h.src=g+"/api/embed/error-page/"+e,(D.head||D.body).appendChild(h)}},F:function(){var a=this;this.j+=1,setTimeout(function(){a.j-=1})},O:function(a,b){var c,d;if(this.b){b=b||{},a="raven"+a.substr(0,1).toUpperCase()+a.substr(1),D.createEvent?(c=D.createEvent("HTMLEvents"),c.initEvent(a,!0,!0)):(c=D.createEventObject(),c.eventType=a);for(d in b)o(b,d)&&(c[d]=b[d]);if(D.createEvent)D.dispatchEvent(c);else try{D.fireEvent("on"+c.eventType.toLowerCase(),c)}catch(e){}}},P:function(a){var b=this;return function(c){if(b.Q=null,b.s!==c){b.s=c;var d,e=c.target;try{d=t(e)}catch(f){d=""}b.captureBreadcrumb({category:"ui."+a,message:d})}}},R:function(){var a=this,b=1e3;return function(c){var d=c.target,e=d&&d.tagName;if(e&&("INPUT"===e||"TEXTAREA"===e||d.isContentEditable)){var f=a.Q;f||a.P("input")(c),clearTimeout(f),a.Q=setTimeout(function(){a.Q=null},b)}}},S:function(a,b){var c=r(this.t.href),d=r(b),e=r(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}})},x:function(){function a(a){return function(b,d){for(var e=new Array(arguments.length),f=0;f2?arguments[2]:void 0;return c&&b.S(b.u,c+""),a.apply(this,arguments)}},d)}if(c.console&&"console"in C&&console.log){var m=function(a,c){b.captureBreadcrumb({message:a,level:c.level,category:"console"})};l(["debug","info","warn","error","log"],function(a,b){z(console,b,m)})}},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}},z:function(){var a=this;l(this.o,function(b,c){var d=c[0],e=c[1];d.apply(a,[a].concat(e))})},A:function(a){var b=B.exec(a),c={},d=7;try{for(;d--;)c[A[d]]=b[d]||""}catch(e){throw new x("Invalid DSN: "+a)}if(c.pass&&!this.i.allowSecretKey)throw new x("Do not specify your secret key in the DSN. See: http://bit.ly/raven-secret-key");return c},D:function(a){var b="//"+a.host+(a.port?":"+a.port:"");return a.protocol&&(b=a.protocol+":"+b),b},w:function(){this.j||this.K.apply(this,arguments)},K:function(a,b){var c=this.L(a,b);this.O("handle",{stackInfo:a,options:b}),this.U(a.name,a.message,a.url,a.lineno,c,b)},L:function(a,b){var c=this,d=[];if(a.stack&&a.stack.length&&(l(a.stack,function(a,b){var e=c.V(b);e&&d.push(e)}),b&&b.trimHeadFrames))for(var e=0;e0&&(a.breadcrumbs={values:[].slice.call(this.r,0)}),j(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),g(b.dataCallback)&&(a=b.dataCallback(a)||a),a&&!j(a)&&(g(b.shouldSendCallback)&&!b.shouldSendCallback(a)||this.Y(a))},Z:function(){return s()},Y:function(a,b){var c=this,d=this.i;if(this.d=a.event_id||(a.event_id=this.Z()),a=this.W(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.C&&(e.sentry_secret=this.C);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.E;(d.transport||this.$).call(this,{url:g,auth:e,data:a,options:d,onSuccess:function(){c.O("success",{data:a,src:g}),b&&b()},onError:function(d){c.O("failure",{data:a,src:g}),d=d||new Error("Raven send failed (no additional details provided)"),b&&b(d)}})}},$: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+"?"+q(a.auth)),c.send(y(a.data))}},v:function(a){this.n[a]&&this.debug&&Function.prototype.apply.call(this.n[a],this.m,[].slice.call(arguments,1))},N:function(a,b){f(b)?delete this.h[a]:this.h[a]=m(this.h[a]||{},b)}};var E=Object.prototype;e.prototype.setUser=e.prototype.setUserContext,e.prototype.setReleaseContext=e.prototype.setRelease,b.exports=e}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{1:1,2:2,3:3,6:6}],5:[function(a,b,c){(function(c){"use strict";var d=a(4),e="undefined"!=typeof window?window:"undefined"!=typeof c?c:"undefined"!=typeof self?self:{},f=e.Raven,g=new d;g.noConflict=function(){return e.Raven=f,g},g.afterLoad(),b.exports=g}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{4:4}],6:[function(a,b,c){(function(a){"use strict";function c(){return"undefined"==typeof document?"":document.location.href}var d={collectWindowErrors:!0,debug:!1},e="undefined"!=typeof window?window:"undefined"!=typeof a?a:"undefined"!=typeof self?self:{},f=[].slice,g="?",h=/^(?:Uncaught (?:exception: )?)?((?:Eval|Internal|Range|Reference|Syntax|Type|URI)Error): ?(.*)$/;d.report=function(){function a(a){l(),r.push(a)}function b(a){for(var b=r.length-1;b>=0;--b)r[b]===a&&r.splice(b,1)}function i(){m(),r=[]}function j(a,b){var c=null;if(!b||d.collectWindowErrors){for(var e in r)if(r.hasOwnProperty(e))try{r[e].apply(null,[a].concat(f.call(arguments,2)))}catch(g){c=g}if(c)throw c}}function k(a,b,e,f,i){var k=null;if(u)d.computeStackTrace.augmentStackTraceWithInitialElement(u,b,e,a),n();else if(i)k=d.computeStackTrace(i),j(k,!0);else{var l,m={url:b,line:e,column:f},o=void 0,q=a;if("[object String]"==={}.toString.call(a)){var l=a.match(h);l&&(o=l[1],q=l[2])}m.func=g,k={name:o,message:q,url:c(),stack:[m]},j(k,!0)}return!!p&&p.apply(this,arguments)}function l(){q||(p=e.onerror,e.onerror=k,q=!0)}function m(){q&&(e.onerror=p,q=!1,p=void 0)}function n(){var a=u,b=s;s=null,u=null,t=null,j.apply(null,[a,!1].concat(b))}function o(a,b){var c=f.call(arguments,1);if(u){if(t===a)return;n()}var e=d.computeStackTrace(a);if(u=e,t=a,s=c,setTimeout(function(){t===a&&n()},e.incomplete?2e3:0),b!==!1)throw a}var p,q,r=[],s=null,t=null,u=null;return o.subscribe=a,o.unsubscribe=b,o.uninstall=i,o}(),d.computeStackTrace=function(){function a(a){if("undefined"!=typeof a.stack&&a.stack){for(var b,d,e=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,f=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|\[native).*?)(?::(\d+))?(?::(\d+))?\s*$/i,h=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,i=a.stack.split("\n"),j=[],k=(/^(.*) is undefined$/.exec(a.message),0),l=i.length;k0&&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 e(a,h){for(var i,j,k=/function\s+([_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*)?\s*\(/i,l=[],m={},n=!1,o=e.caller;o&&!n;o=o.caller)if(o!==f&&o!==d.report){if(j={url:null,func:g,line:null,column:null},o.name?j.func=o.name:(i=k.exec(o.toString()))&&(j.func=i[1]),"undefined"==typeof j.func)try{j.func=i.input.substring(0,i.input.indexOf("{"))}catch(p){}m[""+o]?n=!0:m[""+o]=!0,l.push(j)}h&&l.splice(0,h);var q={name:a.name,message:a.message,url:c(),stack:l};return b(q,a.sourceURL||a.fileName,a.line||a.lineNumber,a.message||a.description),q}function f(b,f){var g=null;f=null==f?0:+f;try{if(g=a(b))return g}catch(h){if(d.debug)throw h}try{if(g=e(b,f+1))return g}catch(h){if(d.debug)throw h}return{name:b.name,message:b.message,url:c()}}return f.augmentStackTraceWithInitialElement=b,f.computeStackTraceFromStackProp=a,f}(),b.exports=d}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[5])(5)}); //# sourceMappingURL=raven.min.js.map