@honeybadger-io/js
Advanced tools
Comparing version 4.7.1 to 4.7.4
@@ -1,2 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).Honeybadger=t()}(this,(function(){"use strict";var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function t(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function n(e){var t=e.default;if("function"==typeof t){var n=function(){return t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})})),n}var r={},o={},i={},a={},c="<unknown>";var u=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack|<anonymous>|\/|[a-z]:\\|\\\\).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,s=/\((\S*)(?::(\d+))(?::(\d+))\)/;var l=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;var f=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,d=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;var p=/^\s*(?:([^@]*)(?:\((.*?)\))?@)?(\S.*?):(\d+)(?::(\d+))?\s*$/i;var h=/^\s*at (?:((?:\[object object\])?[^\\/]+(?: \[as \S+\])?) )?\(?(.*?):(\d+)(?::(\d+))?\)?\s*$/i;var g=Object.freeze({__proto__:null,parse:function(e){return e.split("\n").reduce((function(e,t){var n=function(e){var t=u.exec(e);if(!t)return null;var n=t[2]&&0===t[2].indexOf("native"),r=t[2]&&0===t[2].indexOf("eval"),o=s.exec(t[2]);r&&null!=o&&(t[2]=o[1],t[3]=o[2],t[4]=o[3]);return{file:n?null:t[2],methodName:t[1]||c,arguments:n?[t[2]]:[],lineNumber:t[3]?+t[3]:null,column:t[4]?+t[4]:null}}(t)||function(e){var t=l.exec(e);if(!t)return null;return{file:t[2],methodName:t[1]||c,arguments:[],lineNumber:+t[3],column:t[4]?+t[4]:null}}(t)||function(e){var t=f.exec(e);if(!t)return null;var n=t[3]&&t[3].indexOf(" > eval")>-1,r=d.exec(t[3]);n&&null!=r&&(t[3]=r[1],t[4]=r[2],t[5]=null);return{file:t[3],methodName:t[1]||c,arguments:t[2]?t[2].split(","):[],lineNumber:t[4]?+t[4]:null,column:t[5]?+t[5]:null}}(t)||function(e){var t=h.exec(e);if(!t)return null;return{file:t[2],methodName:t[1]||c,arguments:[],lineNumber:+t[3],column:t[4]?+t[4]:null}}(t)||function(e){var t=p.exec(e);if(!t)return null;return{file:t[3],methodName:t[1]||c,arguments:[],lineNumber:+t[4],column:t[5]?+t[5]:null}}(t);return n&&e.push(n),e}),[])}}),m=n(g),y=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),v=e&&e.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),b=e&&e.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&y(t,e,n);return v(t,e),t},_=e&&e.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function c(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,c)}u((r=r.apply(e,t||[])).next())}))},w=e&&e.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}};Object.defineProperty(a,"__esModule",{value:!0}),a.isBrowserConfig=a.clone=a.formatCGIData=a.filterUrl=a.filter=a.generateStackTrace=a.endpoint=a.instrument=a.isErrorObject=a.makeNotice=a.logger=a.sanitize=a.shallowClone=a.runAfterNotifyHandlers=a.runBeforeNotifyHandlers=a.getSourceForBacktrace=a.getCauses=a.makeBacktrace=a.objectIsExtensible=a.objectIsEmpty=a.mergeNotice=a.merge=void 0;var E=b(m);function O(e,t){var n={};for(var r in e)n[r]=e[r];for(var r in t)n[r]=t[r];return n}function j(e,t){void 0===t&&(t=0);try{var n=E.parse(e).map((function(e){return{file:e.file,method:e.methodName,number:e.lineNumber,column:e.column}}));return n.splice(0,t),n}catch(e){return[]}}function k(e){if("object"!=typeof e||null===e)return{};var t={};for(var n in e)t[n]=e[n];return t}function x(e){return e instanceof Error||"[object Error]"===Object.prototype.toString.call(e)}function N(e,t){for(var n=0;n<t.length;n++)if(-1!==e.toLowerCase().indexOf(t[n].toLowerCase()))return!0;return!1}function C(e,t){var n=Object.prototype.toString.call(t).slice(8,-1);return null!=t&&n===e}a.merge=O,a.mergeNotice=function(e,t){var n=O(e,t);return e.context&&t.context&&(n.context=O(e.context,t.context)),n},a.objectIsEmpty=function(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0},a.objectIsExtensible=function(e){return"function"!=typeof Object.isExtensible||Object.isExtensible(e)},a.makeBacktrace=j,a.getCauses=function(e){if(e.cause){for(var t=[],n=e;t.length<3&&(n=n.cause);)t.push({class:n.name,message:n.message,backtrace:"string"==typeof n.stack?j(n.stack):null});return t}return[]},a.getSourceForBacktrace=function(e,t){return _(this,void 0,void 0,(function(){var n,r,o,i;return w(this,(function(a){switch(a.label){case 0:if(n=[],!t||!e||!e.length)return[2,n];r=0,a.label=1;case 1:return e.length?(o=e.splice(0)[r],[4,t(o.file)]):[3,3];case 2:return i=a.sent(),n[r]=function(e,t,n){void 0===n&&(n=2);if(!e)return null;var r=e.split("\n");r.unshift("");for(var o=t+n,i={},a=t-n;a<=o;a++){var c=r[a];"string"==typeof c&&(i[a]=c)}return i}(i,o.number),r++,[3,1];case 3:return[2,n]}}))}))},a.runBeforeNotifyHandlers=function(e,t){for(var n=!0,r=0,o=t.length;r<o;r++){!1===(0,t[r])(e)&&(n=!1)}return n},a.runAfterNotifyHandlers=function(e,t,n){e&&e.afterNotify&&e.afterNotify(n,e);for(var r=0,o=t.length;r<o;r++)t[r](n,e);return!0},a.shallowClone=k,a.sanitize=function(e,t){void 0===t&&(t=8);var n=[];function r(e,r){if(void 0===r&&(r=0),r>=t)return"[DEPTH]";if(!function(e){var t=typeof e;return/function/.test(t)?"toJSON"===e.name:!/symbol/.test(t)&&null!==e&&("object"!=typeof e||void 0!==e.hasOwnProperty)}(e))return Object.prototype.toString.call(e);if(function(e){if(!e||"object"!=typeof e)return!1;for(var t=0;t<n.length;t++)if(n[t]===e)return!0;return n.push(e),!1}(e))return"[RECURSION]";if(Array.isArray(e))return e.map((function(e){return o(e,r+1)}));if("object"==typeof e){var i={};for(var a in e){var c=e[a];Object.prototype.hasOwnProperty.call(e,a)&&null!=a&&null!=c&&(i[a]=o(c,r+1))}return i}return e}function o(e,t){void 0===t&&(t=0);try{return r(e,t)}catch(e){return"[ERROR] ".concat(e)}}return o(e)},a.logger=function(e){var t=function(t){return function(){for(var n,r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];if("debug"===t){if(!e.config.debug)return;t="log"}r.unshift("[Honeybadger]"),(n=e.config.logger)[t].apply(n,r)}};return{log:t("log"),info:t("info"),debug:t("debug"),warn:t("warn"),error:t("error")}},a.makeNotice=function(e){var t;if(e)if(x(e)){var n=e;t=O(e,{name:n.name,message:n.message,stack:n.stack,cause:n.cause})}else if("object"==typeof e)t=k(e);else{t={message:String(e)}}else t={};return t},a.isErrorObject=x,a.instrument=function(e,t,n){if(e&&t&&n&&t in e){for(var r=e[t];r&&r.__hb_original;)r=r.__hb_original;try{e[t]=n(r),e[t].__hb_original=r}catch(e){}}},a.endpoint=function(e,t){var n=e.trim().replace(/\/$/,"");return t=t.trim().replace(/(^\/|\/$)/g,""),"".concat(n,"/").concat(t)},a.generateStackTrace=function(){try{throw new Error("")}catch(e){if(e.stack)return e.stack}for(var e=10,t=[],n=arguments.callee;n&&t.length<e;){/function(?:\s+([\w$]+))+\s*\(/.test(n.toString())?t.push(RegExp.$1||"<anonymous>"):t.push("<anonymous>");try{n=n.caller}catch(e){break}}return t.join("\n")},a.filter=function(e,t){if(C("Object",e)){C("Array",t)||(t=[]);var n=[];return function e(r){var o,i;if(C("Object",r)||C("Array",r)){if(-1!==n.indexOf(r))return"[CIRCULAR DATA STRUCTURE]";n.push(r)}if(C("Object",r)){for(o in i={},r)N(o,t)?i[o]="[FILTERED]":i[o]=e(r[o]);return i}return C("Array",r)?r.map((function(t){return e(t)})):C("Function",r)?"[FUNC]":r}(e)}},a.filterUrl=function(e,t){if(!t)return e;if("string"!=typeof e)return e;var n=e.split(/\?/,2)[1];if(!n)return e;var r=e;return n.split(/[&]\s?/).forEach((function(e){var n=e.split("=",2),o=n[0],i=n[1];N(o,t)&&(r=r.replace("".concat(o,"=").concat(i),"".concat(o,"=[FILTERED]")))})),r},a.formatCGIData=function(e,t){void 0===t&&(t="");var n={};return Object.keys(e).forEach((function(r){var o=t+r.replace(/\W/g,"_").toUpperCase();n[o]=e[r]})),n},a.clone=function(e){return JSON.parse(JSON.stringify(e))},a.isBrowserConfig=function(e){return void 0!==e.async};var S={};Object.defineProperty(S,"__esModule",{value:!0}),S.GlobalStore=void 0;var T=a,P=function(){function e(e,t){this.contents=e,this.breadcrumbsLimit=t}return e.create=function(t,n){return new e(t,n)},e.prototype.available=function(){return!0},e.prototype.getContents=function(e){var t=e?this.contents[e]:this.contents;return JSON.parse(JSON.stringify(t))},e.prototype.setContext=function(e){this.contents.context=(0,T.merge)(this.contents.context,e||{})},e.prototype.addBreadcrumb=function(e){this.contents.breadcrumbs.length==this.breadcrumbsLimit&&this.contents.breadcrumbs.shift(),this.contents.breadcrumbs.push(e)},e.prototype.clear=function(){this.contents.context={},this.contents.breadcrumbs=[]},e.prototype.run=function(e){return e()},e}();S.GlobalStore=P;var R=e&&e.__assign||function(){return R=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},R.apply(this,arguments)};Object.defineProperty(i,"__esModule",{value:!0}),i.Client=void 0;var U=a,H=S,M={name:"honeybadger-js",url:"https://github.com/honeybadger-io/honeybadger-js",version:"4.7.1"},B=/,|\s+/,A=/\S/,L=function(){function e(e,t){void 0===e&&(e={}),this.__pluginsExecuted=!1,this.__store=null,this.__beforeNotifyHandlers=[],this.__afterNotifyHandlers=[],this.config=R({apiKey:null,endpoint:"https://api.honeybadger.io",environment:null,hostname:null,projectRoot:null,component:null,action:null,revision:null,reportData:null,breadcrumbsEnabled:!0,maxBreadcrumbs:40,maxObjectDepth:8,logger:console,developmentEnvironments:["dev","development","test"],debug:!1,tags:null,enableUncaught:!0,enableUnhandledRejection:!0,afterUncaught:function(){return!0},filters:["creditcard","password"],__plugins:[]},e),this.__initStore(),this.__transport=t,this.logger=(0,U.logger)(this)}return e.prototype.getVersion=function(){return M.version},e.prototype.configure=function(e){var t=this;for(var n in void 0===e&&(e={}),e)this.config[n]=e[n];return this.__pluginsExecuted||(this.__pluginsExecuted=!0,this.config.__plugins.forEach((function(e){return e.load(t)}))),this},e.prototype.__initStore=function(){this.__store=new H.GlobalStore({context:{},breadcrumbs:[]},this.config.maxBreadcrumbs)},e.prototype.beforeNotify=function(e){return this.__beforeNotifyHandlers.push(e),this},e.prototype.afterNotify=function(e){return this.__afterNotifyHandlers.push(e),this},e.prototype.setContext=function(e){return"object"==typeof e&&null!=e&&this.__store.setContext(e),this},e.prototype.resetContext=function(e){return this.logger.warn("Deprecation warning: `Honeybadger.resetContext()` has been deprecated; please use `Honeybadger.clear()` instead."),this.__store.clear(),"object"==typeof e&&null!==e&&this.__store.setContext(e),this},e.prototype.clear=function(){return this.__store.clear(),this},e.prototype.notify=function(e,t,n){var r=this;void 0===t&&(t=void 0),void 0===n&&(n=void 0);var o=null,i=this.makeNotice(e,t,n);i||(this.logger.debug("failed to build error report"),o=new Error("failed to build error report")),o||!1!==this.config.reportData||(this.logger.debug("skipping error report: honeybadger.js is disabled",i),o=new Error("honeybadger.js is disabled")),!o&&this.__developmentMode()&&(this.logger.log("honeybadger.js is in development mode; the following error report will be sent in production.",i),o=new Error("honeybadger.js is in development mode")),o||this.config.apiKey||(this.logger.warn("could not send error report: no API key has been configured",i),o=new Error("missing API key"));var a=i&&i.backtrace?i.backtrace.map((function(e){return(0,U.shallowClone)(e)})):null,c=(0,U.runBeforeNotifyHandlers)(i,this.__beforeNotifyHandlers);if(o||c||(this.logger.debug("skipping error report: beforeNotify handlers returned false",i),o=new Error("beforeNotify handlers returned false")),o)return(0,U.runAfterNotifyHandlers)(i,this.__afterNotifyHandlers,o),!1;this.addBreadcrumb("Honeybadger Notice",{category:"notice",metadata:{message:i.message,name:i.name,stack:i.stack}});var u=this.__store.getContents("breadcrumbs");return i.__breadcrumbs=this.config.breadcrumbsEnabled?u:[],(0,U.getSourceForBacktrace)(a,this.__getSourceFileHandler).then((function(e){e.forEach((function(e,t){i.backtrace[t].source=e}));var t=r.__buildPayload(i);r.__transport.send({headers:{"X-API-Key":r.config.apiKey,"Content-Type":"application/json",Accept:"text/json, application/json"},method:"POST",endpoint:(0,U.endpoint)(r.config.endpoint,"/v1/notices/js"),maxObjectDepth:r.config.maxObjectDepth,logger:r.logger,async:(0,U.isBrowserConfig)(r.config)?r.config.async:void 0},t).then((function(e){if(201!==e.statusCode)return(0,U.runAfterNotifyHandlers)(i,r.__afterNotifyHandlers,new Error("Bad HTTP response: ".concat(e.statusCode))),void r.logger.warn("Error report failed: unknown response from server. code=".concat(e.statusCode));var t=JSON.parse(e.body).id;(0,U.runAfterNotifyHandlers)((0,U.merge)(i,{id:t}),r.__afterNotifyHandlers),r.logger.info("Error report sent ⚡ https://app.honeybadger.io/notice/".concat(t))})).catch((function(e){r.logger.error("Error report failed: an unknown error occurred.","message=".concat(e.message)),(0,U.runAfterNotifyHandlers)(i,r.__afterNotifyHandlers,e)}))})),!0},e.prototype.notifyAsync=function(e,t,n){var r=this;return void 0===t&&(t=void 0),void 0===n&&(n=void 0),new Promise((function(o,i){var a,c,u;a=e.afterNotify?e:t&&t.afterNotify?t:n&&n.afterNotify?n:t&&"object"==typeof t?t:n||(t={}),u=(c=a).afterNotify,c.afterNotify=function(e){if(null==u||u.call(r,e),e)return i(e);o()},r.notify(e,t,n)}))},e.prototype.makeNotice=function(e,t,n){void 0===t&&(t=void 0),void 0===n&&(n=void 0);var r=(0,U.makeNotice)(e);t&&"object"!=typeof t&&(t={name:String(t)});if(t&&(r=(0,U.mergeNotice)(r,t)),"object"==typeof n&&null!==n&&(r=(0,U.mergeNotice)(r,n)),(0,U.objectIsEmpty)(r))return null;var o=this.__store.getContents("context"),i=this.__constructTags(r.tags),a=this.__constructTags(o.tags),c=this.__constructTags(this.config.tags),u=i.concat(a).concat(c),s=u.filter((function(e,t){return u.indexOf(e)===t})),l=0;return"string"==typeof(r=(0,U.merge)(r,{name:r.name||"Error",context:(0,U.merge)(o,r.context),projectRoot:r.projectRoot||this.config.projectRoot,environment:r.environment||this.config.environment,component:r.component||this.config.component,action:r.action||this.config.action,revision:r.revision||this.config.revision,tags:s})).stack&&r.stack.trim()||(r.stack=(0,U.generateStackTrace)(),l=2),r.backtrace=(0,U.makeBacktrace)(r.stack,l),r},e.prototype.addBreadcrumb=function(e,t){if(this.config.breadcrumbsEnabled){t=t||{};var n=(0,U.shallowClone)(t.metadata),r=t.category||"custom",o=(new Date).toISOString();return this.__store.addBreadcrumb({category:r,message:e,metadata:n,timestamp:o}),this}},e.prototype.__getBreadcrumbs=function(){return this.__store.getContents("breadcrumbs").slice()},e.prototype.__getContext=function(){return this.__store.getContents("context")},e.prototype.__developmentMode=function(){return!0!==this.config.reportData&&(this.config.environment&&this.config.developmentEnvironments.includes(this.config.environment))},e.prototype.__buildPayload=function(e){var t=(0,U.filter)(e.headers,this.config.filters)||{},n=(0,U.filter)(R(R({},e.cgiData),(0,U.formatCGIData)(t,"HTTP_")),this.config.filters);return{notifier:M,breadcrumbs:{enabled:!!this.config.breadcrumbsEnabled,trail:e.__breadcrumbs||[]},error:{class:e.name,message:e.message,backtrace:e.backtrace,fingerprint:e.fingerprint,tags:e.tags,causes:(0,U.getCauses)(e)},request:{url:(0,U.filterUrl)(e.url,this.config.filters),component:e.component,action:e.action,context:e.context,cgi_data:n,params:(0,U.filter)(e.params,this.config.filters)||{},session:(0,U.filter)(e.session,this.config.filters)||{}},server:{project_root:e.projectRoot,environment_name:e.environment,revision:e.revision,hostname:this.config.hostname,time:(new Date).toUTCString()},details:e.details||{}}},e.prototype.__constructTags=function(e){return e?e.toString().split(B).filter((function(e){return A.test(e)})):[]},e}();i.Client=L;var I={};Object.defineProperty(I,"__esModule",{value:!0}),function(t){var n=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),r=e&&e.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=e&&e.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)},c=e&&e.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var o in e)"default"!==o&&Object.prototype.hasOwnProperty.call(e,o)&&n(t,e,o);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Util=t.Types=t.Client=void 0;var u=i;Object.defineProperty(t,"Client",{enumerable:!0,get:function(){return u.Client}}),o(S,t),t.Types=c(I),t.Util=c(a)}(o);var D={};function q(e){if(!e||!e.tagName)return"";var t=e.tagName.toLowerCase();if("html"===t)return"";e.id&&(t+="#".concat(e.id));var n=e.getAttribute("class");n&&n.split(/\s+/).forEach((function(e){t+=".".concat(e)})),["alt","name","title","type"].forEach((function(n){var r=e.getAttribute(n);r&&(t+="[".concat(n,'="').concat(r,'"]'))}));var r=function(e){try{var t=e.parentNode.childNodes,n=[];return Array.prototype.forEach.call(t,(function(t){t.tagName&&t.tagName===e.tagName&&n.push(t)})),n}catch(e){return[]}}(e);return r.length>1&&(t+=":nth-child(".concat(Array.prototype.indexOf.call(r,e)+1,")")),t}function F(e){return-1!==e.toString().indexOf("native")}function W(e){var t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/)||{};return{protocol:t[2],host:t[4],pathname:t[5]}}Object.defineProperty(D,"__esModule",{value:!0}),D.preferCatch=D.encodeCookie=D.decodeCookie=D.localURLPathname=D.parseURL=D.nativeFetch=D.stringTextOfElement=D.stringSelectorOfElement=D.stringNameOfElement=void 0,D.stringNameOfElement=q,D.stringSelectorOfElement=function e(t){var n=q(t);if(t.parentNode&&t.parentNode.tagName){var r=e(t.parentNode);if(r.length>0)return"".concat(r," > ").concat(n)}return n},D.stringTextOfElement=function(e){var t=e.textContent||e.innerText||"";return t||"submit"!==e.type&&"button"!==e.type||(t=e.value),function(e,t){e.length>t&&(e=e.substr(0,t)+"...");return e}(t.trim(),300)},D.nativeFetch=function(){if(!window.fetch)return!1;if(F(window.fetch))return!0;try{var e=document.createElement("iframe");e.style.display="none",document.head.appendChild(e);var t=e.contentWindow.fetch&&F(e.contentWindow.fetch);return document.head.removeChild(e),t}catch(e){console&&console.warn&&console.warn("failed to detect native fetch via iframe: "+e)}return!1},D.parseURL=W,D.localURLPathname=function(e){var t=W(e),n=W(document.URL);return t.host&&t.protocol?t.protocol===n.protocol&&t.host===n.host?t.pathname:"".concat(t.protocol,"://").concat(t.host).concat(t.pathname):t.pathname},D.decodeCookie=function(e){var t={};return e.split(/[;,]\s?/).forEach((function(e){var n=e.split("=",2),r=n[0],o=n[1];t[r]=o})),t},D.encodeCookie=function(e){if("object"==typeof e){var t=[];for(var n in e)t.push(n+"="+e[n]);return t.join(";")}},D.preferCatch=function(){var e=!0;if(window.atob||(e=!1),window.ErrorEvent)try{0===new window.ErrorEvent("").colno&&(e=!1)}catch(e){}return e}();var G={};Object.defineProperty(G,"__esModule",{value:!0}),G.onError=G.ignoreNextOnError=void 0;var $,J=o,X=J.Util.instrument,K=J.Util.makeNotice,z=0;G.ignoreNextOnError=function(){z+=1,clearTimeout($),$=setTimeout((function(){z=0}))},G.onError=function(e){return void 0===e&&(e=window),{load:function(t){X(e,"onerror",(function(e){var n=function(e,n,r,o,i){if(t.logger.debug("window.onerror callback invoked",arguments),z>0)return t.logger.debug("Ignoring window.onerror (error likely reported earlier)",arguments),void(z-=1);if(0===r&&/Script error\.?/.test(e))t.config.enableUncaught&&t.logger.warn("Ignoring cross-domain script error: enable CORS to track these types of errors",arguments);else{var a=K(i);a.name||(a.name="window.onerror"),a.message||(a.message=e),a.stack||(a.stack=[a.message,"\n at ? (",n||"unknown",":",r||0,":",o||0,")"].join("")),t.addBreadcrumb("window.onerror"!==a.name&&a.name?"window.onerror: ".concat(a.name):"window.onerror",{category:"error",metadata:{name:a.name,message:a.message,stack:a.stack}}),t.config.enableUncaught&&t.notify(a)}};return function(t,r,o,i,a){return n(t,r,o,i,a),"function"==typeof e&&e.apply(window,arguments)}}))}}};var V={};Object.defineProperty(V,"__esModule",{value:!0});var Q=o.Util.instrument;V.default=function(e){return void 0===e&&(e=window),{load:function(t){t.config.enableUnhandledRejection&&Q(e,"onunhandledrejection",(function(e){function n(e){var n;if(t.logger.debug("window.onunhandledrejection callback invoked",arguments),t.config.enableUnhandledRejection){var r=e.reason;if(r instanceof Error){var o="unknown",i=0,a="".concat(r.message,"\n at ? (").concat(o,":").concat(i,")"),c=r.stack||a,u={name:r.name,message:"UnhandledPromiseRejectionWarning: ".concat(r),stack:c};return t.addBreadcrumb("window.onunhandledrejection: ".concat(u.name),{category:"error",metadata:u}),void t.notify(u)}var s="string"==typeof r?r:null!==(n=JSON.stringify(r))&&void 0!==n?n:"Unspecified reason";t.notify({name:"window.onunhandledrejection",message:"UnhandledPromiseRejectionWarning: ".concat(s)})}}return function(t){n(t),"function"==typeof e&&e.apply(this,arguments)}}))}}};var Y={};Object.defineProperty(Y,"__esModule",{value:!0});var Z=o,ee=D,te=Z.Util.sanitize,ne=Z.Util.instrument;Y.default=function(e){return void 0===e&&(e=window),{load:function(t){function n(e){return!0===t.config.breadcrumbsEnabled||(e?!0===t.config.breadcrumbsEnabled[e]:!1!==t.config.breadcrumbsEnabled)}!function(){function r(e){return Array.isArray(e)?e.map((function(e){try{return String(e)}catch(e){return"[unknown]"}})).join(" "):""}n("console")&&["debug","info","warn","error","log"].forEach((function(n){ne(e.console,n,(function(o){return function(){var i=Array.prototype.slice.call(arguments),a=r(i),c={category:"log",metadata:{level:n,arguments:te(i,3)}};t.addBreadcrumb(a,c),"function"==typeof o&&Function.prototype.apply.call(o,e.console,arguments)}}))}))}(),n("dom")&&e.addEventListener("click",(function(e){var n,r,o;try{n=(0,ee.stringNameOfElement)(e.target),r=(0,ee.stringSelectorOfElement)(e.target),o=(0,ee.stringTextOfElement)(e.target)}catch(e){n="UI Click",r="[unknown]",o="[unknown]"}0!==n.length&&t.addBreadcrumb(n,{category:"ui.click",metadata:{selector:r,text:o,event:e}})}),!0),n("network")&&(ne(XMLHttpRequest.prototype,"open",(function(e){return function(){var t=this,n=arguments[1],r="string"==typeof arguments[0]?arguments[0].toUpperCase():arguments[0],o="".concat(r," ").concat((0,ee.localURLPathname)(n));this.__hb_xhr={type:"xhr",method:r,url:n,message:o},"function"==typeof e&&e.apply(t,arguments)}})),ne(XMLHttpRequest.prototype,"send",(function(e){return function(){var n=this;function r(){if(4===n.readyState){var e=void 0;n.__hb_xhr&&(n.__hb_xhr.status_code=n.status,e=n.__hb_xhr.message,delete n.__hb_xhr.message),t.addBreadcrumb(e||"XMLHttpRequest",{category:"request",metadata:n.__hb_xhr})}}"onreadystatechange"in n&&"function"==typeof n.onreadystatechange?ne(n,"onreadystatechange",(function(e){return function(){r(),"function"==typeof e&&e.apply(this,arguments)}})):n.onreadystatechange=r,"function"==typeof e&&e.apply(n,arguments)}}))),n("network")&&(0,ee.nativeFetch)()&&ne(e,"fetch",(function(n){return function(){var r,o=arguments[0],i="GET";"string"==typeof o?r=o:"Request"in e&&o instanceof Request?(r=o.url,o.method&&(i=o.method)):r=String(o),arguments[1]&&arguments[1].method&&(i=arguments[1].method),"string"==typeof i&&(i=i.toUpperCase());var a="".concat(i," ").concat((0,ee.localURLPathname)(r)),c={type:"fetch",method:i,url:r};return n.apply(this,arguments).then((function(e){return c.status_code=e.status,t.addBreadcrumb(a,{category:"request",metadata:c}),e})).catch((function(e){throw t.addBreadcrumb("fetch error",{category:"error",metadata:c}),e}))}})),function(){if(n("navigation")){var r=e.location.href;ne(e,"onpopstate",(function(t){return function(){if(o(r,e.location.href),t)return t.apply(this,arguments)}})),ne(e.history,"pushState",i),ne(e.history,"replaceState",i)}function o(e,n){r=n,t.addBreadcrumb("Page changed",{category:"navigation",metadata:{from:e,to:n}})}function i(e){return function(){var t=arguments.length>2?arguments[2]:void 0;return t&&o(r,String(t)),e.apply(this,arguments)}}}()}}};var re={};Object.defineProperty(re,"__esModule",{value:!0});var oe=o.Util.instrument;re.default=function(e){return void 0===e&&(e=window),{load:function(t){!function(){function n(e){return function(n){return function(r,o){if("function"==typeof r){var i=Array.prototype.slice.call(arguments,2);return r=t.__wrap(r,e),n((function(){r.apply(void 0,i)}),o)}return n(r,o)}}}oe(e,"setTimeout",n({component:"setTimeout"})),oe(e,"setInterval",n({component:"setInterval"}))}()}}};var ie={};Object.defineProperty(ie,"__esModule",{value:!0});var ae=o.Util.instrument;ie.default=function(e){return void 0===e&&(e=window),{load:function(t){["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"].forEach((function(n){var r=e[n]&&e[n].prototype;r&&Object.prototype.hasOwnProperty.call(r,"addEventListener")&&(ae(r,"addEventListener",(function(e){var r={component:"".concat(n,".prototype.addEventListener")};return function(n,o,i,a){try{o&&null!=o.handleEvent&&(o.handleEvent=t.__wrap(o.handleEvent,r))}catch(e){t.logger.error(e)}return e.call(this,n,t.__wrap(o,r),i,a)}})),ae(r,"removeEventListener",(function(e){return function(n,r,o,i){return e.call(this,n,r,o,i),e.call(this,n,t.__wrap(r),o,i)}})))}))}}};var ce={};Object.defineProperty(ce,"__esModule",{value:!0}),ce.BrowserTransport=void 0;var ue=o.Util.sanitize,se=function(){function e(){}return e.prototype.send=function(e,t){return new Promise((function(n,r){try{var o=new XMLHttpRequest;if(o.open(e.method,e.endpoint,e.async),Object.keys(e.headers||[]).length)for(var i in e.headers)void 0!==e.headers[i]&&o.setRequestHeader(i,String(e.headers[i]));o.send(t?JSON.stringify(ue(t,e.maxObjectDepth)):void 0),o.onload=function(){return n({statusCode:o.status,body:o.response})}}catch(e){r(e)}}))},e}();return ce.BrowserTransport=se,function(t){var n,r=e&&e.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=e&&e.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)},a=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Types=void 0;var c=o,u=D,s=G,l=a(V),f=a(Y),d=a(re),p=a(ie),h=ce,g=c.Util.merge,m=c.Util.filter,y=c.Util.objectIsExtensible,v=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,i({async:!0,maxErrors:null,projectRoot:window.location.protocol+"//"+window.location.host},t),new h.BrowserTransport)||this;return n.__errorsSent=0,n.__lastWrapErr=void 0,n.__beforeNotifyHandlers=[function(e){return n.__exceedsMaxErrors()?(n.logger.debug("Dropping notice: max errors exceeded",e),!1):(e&&!e.url&&(e.url=document.URL),n.__incrementErrorsCount(),!0)}],n}return r(t,e),t.prototype.configure=function(t){return void 0===t&&(t={}),e.prototype.configure.call(this,t)},t.prototype.resetMaxErrors=function(){return this.__errorsSent=0},t.prototype.factory=function(e){return new t(e)},t.prototype.checkIn=function(e){throw new Error("Honeybadger.checkIn() is not supported on the browser")},t.prototype.__buildPayload=function(t){var n,r={HTTP_USER_AGENT:void 0,HTTP_REFERER:void 0,HTTP_COOKIE:void 0};r.HTTP_USER_AGENT=navigator.userAgent,document.referrer.match(/\S/)&&(r.HTTP_REFERER=document.referrer),(n="string"==typeof t.cookies?(0,u.decodeCookie)(t.cookies):t.cookies)&&(r.HTTP_COOKIE=(0,u.encodeCookie)(m(n,this.config.filters)));var o=e.prototype.__buildPayload.call(this,t);return o.request.cgi_data=g(r,o.request.cgi_data),o},t.prototype.__wrap=function(e,t){void 0===t&&(t={});var n=e;t||(t={});try{if("function"!=typeof n)return n;if(!y(n))return n;if(!n.___hb){var r=this;n.___hb=function(){if(!u.preferCatch)return n.apply(this,arguments);try{return n.apply(this,arguments)}catch(e){if(r.__lastWrapErr===e)throw e;throw r.__lastWrapErr=e,(0,s.ignoreNextOnError)(),r.addBreadcrumb(t.component?"".concat(t.component,": ").concat(e.name):e.name,{category:"error",metadata:{message:e.message,name:e.name,stack:e.stack}}),r.config.enableUncaught&&r.notify(e),e}}}return n.___hb.___hb=n.___hb,n.___hb}catch(e){return n}},t.prototype.__incrementErrorsCount=function(){return this.__errorsSent++},t.prototype.__exceedsMaxErrors=function(){return this.config.maxErrors&&this.__errorsSent>=this.config.maxErrors},t}(c.Client),b=o;Object.defineProperty(t,"Types",{enumerable:!0,get:function(){return b.Types}}),t.default=new v({__plugins:[(0,s.onError)(),(0,l.default)(),(0,d.default)(),(0,p.default)(),(0,f.default)()]})}(r),t(r)})); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).Honeybadger=t()}(this,(function(){"use strict";var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function t(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function n(e){var t=e.default;if("function"==typeof t){var n=function(){return t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})})),n}var r={},o={},i={},a={},c="<unknown>";var u=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack|<anonymous>|\/|[a-z]:\\|\\\\).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,s=/\((\S*)(?::(\d+))(?::(\d+))\)/;var l=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;var f=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,d=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;var p=/^\s*(?:([^@]*)(?:\((.*?)\))?@)?(\S.*?):(\d+)(?::(\d+))?\s*$/i;var h=/^\s*at (?:((?:\[object object\])?[^\\/]+(?: \[as \S+\])?) )?\(?(.*?):(\d+)(?::(\d+))?\)?\s*$/i;var g=Object.freeze({__proto__:null,parse:function(e){return e.split("\n").reduce((function(e,t){var n=function(e){var t=u.exec(e);if(!t)return null;var n=t[2]&&0===t[2].indexOf("native"),r=t[2]&&0===t[2].indexOf("eval"),o=s.exec(t[2]);r&&null!=o&&(t[2]=o[1],t[3]=o[2],t[4]=o[3]);return{file:n?null:t[2],methodName:t[1]||c,arguments:n?[t[2]]:[],lineNumber:t[3]?+t[3]:null,column:t[4]?+t[4]:null}}(t)||function(e){var t=l.exec(e);if(!t)return null;return{file:t[2],methodName:t[1]||c,arguments:[],lineNumber:+t[3],column:t[4]?+t[4]:null}}(t)||function(e){var t=f.exec(e);if(!t)return null;var n=t[3]&&t[3].indexOf(" > eval")>-1,r=d.exec(t[3]);n&&null!=r&&(t[3]=r[1],t[4]=r[2],t[5]=null);return{file:t[3],methodName:t[1]||c,arguments:t[2]?t[2].split(","):[],lineNumber:t[4]?+t[4]:null,column:t[5]?+t[5]:null}}(t)||function(e){var t=h.exec(e);if(!t)return null;return{file:t[2],methodName:t[1]||c,arguments:[],lineNumber:+t[3],column:t[4]?+t[4]:null}}(t)||function(e){var t=p.exec(e);if(!t)return null;return{file:t[3],methodName:t[1]||c,arguments:[],lineNumber:+t[4],column:t[5]?+t[5]:null}}(t);return n&&e.push(n),e}),[])}}),m=n(g),y=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),v=e&&e.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),b=e&&e.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&y(t,e,n);return v(t,e),t},_=e&&e.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function c(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,c)}u((r=r.apply(e,t||[])).next())}))},w=e&&e.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}};Object.defineProperty(a,"__esModule",{value:!0}),a.isBrowserConfig=a.clone=a.formatCGIData=a.filterUrl=a.filter=a.generateStackTrace=a.endpoint=a.instrument=a.isErrorObject=a.makeNotice=a.logger=a.sanitize=a.shallowClone=a.runAfterNotifyHandlers=a.runBeforeNotifyHandlers=a.getSourceForBacktrace=a.getCauses=a.makeBacktrace=a.objectIsExtensible=a.objectIsEmpty=a.mergeNotice=a.merge=void 0;var E=b(m);function O(e,t){var n={};for(var r in e)n[r]=e[r];for(var r in t)n[r]=t[r];return n}function j(e,t){void 0===t&&(t=0);try{var n=E.parse(e).map((function(e){return{file:e.file,method:e.methodName,number:e.lineNumber,column:e.column}}));return n.splice(0,t),n}catch(e){return[]}}function k(e){if("object"!=typeof e||null===e)return{};var t={};for(var n in e)t[n]=e[n];return t}function x(e){return e instanceof Error||"[object Error]"===Object.prototype.toString.call(e)}function N(e,t){for(var n=0;n<t.length;n++)if(-1!==e.toLowerCase().indexOf(t[n].toLowerCase()))return!0;return!1}function C(e,t){var n=Object.prototype.toString.call(t).slice(8,-1);return null!=t&&n===e}a.merge=O,a.mergeNotice=function(e,t){var n=O(e,t);return e.context&&t.context&&(n.context=O(e.context,t.context)),n},a.objectIsEmpty=function(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0},a.objectIsExtensible=function(e){return"function"!=typeof Object.isExtensible||Object.isExtensible(e)},a.makeBacktrace=j,a.getCauses=function(e){if(e.cause){for(var t=[],n=e;t.length<3&&(n=n.cause);)t.push({class:n.name,message:n.message,backtrace:"string"==typeof n.stack?j(n.stack):null});return t}return[]},a.getSourceForBacktrace=function(e,t){return _(this,void 0,void 0,(function(){var n,r,o,i;return w(this,(function(a){switch(a.label){case 0:if(n=[],!t||!e||!e.length)return[2,n];r=0,a.label=1;case 1:return e.length?(o=e.splice(0)[r],[4,t(o.file)]):[3,3];case 2:return i=a.sent(),n[r]=function(e,t,n){void 0===n&&(n=2);if(!e)return null;var r=e.split("\n");r.unshift("");for(var o=t+n,i={},a=t-n;a<=o;a++){var c=r[a];"string"==typeof c&&(i[a]=c)}return i}(i,o.number),r++,[3,1];case 3:return[2,n]}}))}))},a.runBeforeNotifyHandlers=function(e,t){for(var n=!0,r=0,o=t.length;r<o;r++){!1===(0,t[r])(e)&&(n=!1)}return n},a.runAfterNotifyHandlers=function(e,t,n){e&&e.afterNotify&&e.afterNotify(n,e);for(var r=0,o=t.length;r<o;r++)t[r](n,e);return!0},a.shallowClone=k,a.sanitize=function(e,t){void 0===t&&(t=8);var n=[];function r(e,r){if(void 0===r&&(r=0),r>=t)return"[DEPTH]";if(!function(e){var t=typeof e;return/function/.test(t)?"toJSON"===e.name:!/symbol/.test(t)&&null!==e&&("object"!=typeof e||void 0!==e.hasOwnProperty)}(e))return Object.prototype.toString.call(e);if(function(e){if(!e||"object"!=typeof e)return!1;for(var t=0;t<n.length;t++)if(n[t]===e)return!0;return n.push(e),!1}(e))return"[RECURSION]";if(Array.isArray(e))return e.map((function(e){return o(e,r+1)}));if("object"==typeof e){var i={};for(var a in e){var c=e[a];Object.prototype.hasOwnProperty.call(e,a)&&null!=a&&null!=c&&(i[a]=o(c,r+1))}return i}return e}function o(e,t){void 0===t&&(t=0);try{return r(e,t)}catch(e){return"[ERROR] ".concat(e)}}return o(e)},a.logger=function(e){var t=function(t){return function(){for(var n,r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];if("debug"===t){if(!e.config.debug)return;t="log"}r.unshift("[Honeybadger]"),(n=e.config.logger)[t].apply(n,r)}};return{log:t("log"),info:t("info"),debug:t("debug"),warn:t("warn"),error:t("error")}},a.makeNotice=function(e){var t;if(e)if(x(e)){var n=e;t=O(e,{name:n.name,message:n.message,stack:n.stack,cause:n.cause})}else if("object"==typeof e)t=k(e);else{t={message:String(e)}}else t={};return t},a.isErrorObject=x,a.instrument=function(e,t,n){if(e&&t&&n&&t in e){for(var r=e[t];r&&r.__hb_original;)r=r.__hb_original;try{e[t]=n(r),e[t].__hb_original=r}catch(e){}}},a.endpoint=function(e,t){var n=e.trim().replace(/\/$/,"");return t=t.trim().replace(/(^\/|\/$)/g,""),"".concat(n,"/").concat(t)},a.generateStackTrace=function(){try{throw new Error("")}catch(e){if(e.stack)return e.stack}for(var e=10,t=[],n=arguments.callee;n&&t.length<e;){/function(?:\s+([\w$]+))+\s*\(/.test(n.toString())?t.push(RegExp.$1||"<anonymous>"):t.push("<anonymous>");try{n=n.caller}catch(e){break}}return t.join("\n")},a.filter=function(e,t){if(C("Object",e)){C("Array",t)||(t=[]);var n=[];return function e(r){var o,i;if(C("Object",r)||C("Array",r)){if(-1!==n.indexOf(r))return"[CIRCULAR DATA STRUCTURE]";n.push(r)}if(C("Object",r)){for(o in i={},r)N(o,t)?i[o]="[FILTERED]":i[o]=e(r[o]);return i}return C("Array",r)?r.map((function(t){return e(t)})):C("Function",r)?"[FUNC]":r}(e)}},a.filterUrl=function(e,t){if(!t)return e;if("string"!=typeof e)return e;var n=e.split(/\?/,2)[1];if(!n)return e;var r=e;return n.split(/[&]\s?/).forEach((function(e){var n=e.split("=",2),o=n[0],i=n[1];N(o,t)&&(r=r.replace("".concat(o,"=").concat(i),"".concat(o,"=[FILTERED]")))})),r},a.formatCGIData=function(e,t){void 0===t&&(t="");var n={};return Object.keys(e).forEach((function(r){var o=t+r.replace(/\W/g,"_").toUpperCase();n[o]=e[r]})),n},a.clone=function(e){return JSON.parse(JSON.stringify(e))},a.isBrowserConfig=function(e){return void 0!==e.async};var S={};Object.defineProperty(S,"__esModule",{value:!0}),S.GlobalStore=void 0;var T=a,P=function(){function e(e,t){this.contents=e,this.breadcrumbsLimit=t}return e.create=function(t,n){return new e(t,n)},e.prototype.available=function(){return!0},e.prototype.getContents=function(e){var t=e?this.contents[e]:this.contents;return JSON.parse(JSON.stringify(t))},e.prototype.setContext=function(e){this.contents.context=(0,T.merge)(this.contents.context,e||{})},e.prototype.addBreadcrumb=function(e){this.contents.breadcrumbs.length==this.breadcrumbsLimit&&this.contents.breadcrumbs.shift(),this.contents.breadcrumbs.push(e)},e.prototype.clear=function(){this.contents.context={},this.contents.breadcrumbs=[]},e.prototype.run=function(e){return e()},e}();S.GlobalStore=P;var R=e&&e.__assign||function(){return R=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},R.apply(this,arguments)};Object.defineProperty(i,"__esModule",{value:!0}),i.Client=void 0;var U=a,H=S,M={name:"honeybadger-js",url:"https://github.com/honeybadger-io/honeybadger-js",version:"4.7.4"},B=/,|\s+/,A=/\S/,L=function(){function e(e,t){void 0===e&&(e={}),this.__pluginsExecuted=!1,this.__store=null,this.__beforeNotifyHandlers=[],this.__afterNotifyHandlers=[],this.config=R({apiKey:null,endpoint:"https://api.honeybadger.io",environment:null,hostname:null,projectRoot:null,component:null,action:null,revision:null,reportData:null,breadcrumbsEnabled:!0,maxBreadcrumbs:40,maxObjectDepth:8,logger:console,developmentEnvironments:["dev","development","test"],debug:!1,tags:null,enableUncaught:!0,enableUnhandledRejection:!0,afterUncaught:function(){return!0},filters:["creditcard","password"],__plugins:[]},e),this.__initStore(),this.__transport=t,this.logger=(0,U.logger)(this)}return e.prototype.getVersion=function(){return M.version},e.prototype.configure=function(e){var t=this;for(var n in void 0===e&&(e={}),e)this.config[n]=e[n];return this.__pluginsExecuted||(this.__pluginsExecuted=!0,this.config.__plugins.forEach((function(e){return e.load(t)}))),this},e.prototype.__initStore=function(){this.__store=new H.GlobalStore({context:{},breadcrumbs:[]},this.config.maxBreadcrumbs)},e.prototype.beforeNotify=function(e){return this.__beforeNotifyHandlers.push(e),this},e.prototype.afterNotify=function(e){return this.__afterNotifyHandlers.push(e),this},e.prototype.setContext=function(e){return"object"==typeof e&&null!=e&&this.__store.setContext(e),this},e.prototype.resetContext=function(e){return this.logger.warn("Deprecation warning: `Honeybadger.resetContext()` has been deprecated; please use `Honeybadger.clear()` instead."),this.__store.clear(),"object"==typeof e&&null!==e&&this.__store.setContext(e),this},e.prototype.clear=function(){return this.__store.clear(),this},e.prototype.notify=function(e,t,n){var r=this;void 0===t&&(t=void 0),void 0===n&&(n=void 0);var o=null,i=this.makeNotice(e,t,n);i||(this.logger.debug("failed to build error report"),o=new Error("failed to build error report")),o||!1!==this.config.reportData||(this.logger.debug("skipping error report: honeybadger.js is disabled",i),o=new Error("honeybadger.js is disabled")),!o&&this.__developmentMode()&&(this.logger.log("honeybadger.js is in development mode; the following error report will be sent in production.",i),o=new Error("honeybadger.js is in development mode")),o||this.config.apiKey||(this.logger.warn("could not send error report: no API key has been configured",i),o=new Error("missing API key"));var a=i&&i.backtrace?i.backtrace.map((function(e){return(0,U.shallowClone)(e)})):null,c=(0,U.runBeforeNotifyHandlers)(i,this.__beforeNotifyHandlers);if(o||c||(this.logger.debug("skipping error report: beforeNotify handlers returned false",i),o=new Error("beforeNotify handlers returned false")),o)return(0,U.runAfterNotifyHandlers)(i,this.__afterNotifyHandlers,o),!1;this.addBreadcrumb("Honeybadger Notice",{category:"notice",metadata:{message:i.message,name:i.name,stack:i.stack}});var u=this.__store.getContents("breadcrumbs");return i.__breadcrumbs=this.config.breadcrumbsEnabled?u:[],(0,U.getSourceForBacktrace)(a,this.__getSourceFileHandler).then((function(e){e.forEach((function(e,t){i.backtrace[t].source=e}));var t=r.__buildPayload(i);r.__transport.send({headers:{"X-API-Key":r.config.apiKey,"Content-Type":"application/json",Accept:"text/json, application/json"},method:"POST",endpoint:(0,U.endpoint)(r.config.endpoint,"/v1/notices/js"),maxObjectDepth:r.config.maxObjectDepth,logger:r.logger,async:(0,U.isBrowserConfig)(r.config)?r.config.async:void 0},t).then((function(e){if(201!==e.statusCode)return(0,U.runAfterNotifyHandlers)(i,r.__afterNotifyHandlers,new Error("Bad HTTP response: ".concat(e.statusCode))),void r.logger.warn("Error report failed: unknown response from server. code=".concat(e.statusCode));var t=JSON.parse(e.body).id;(0,U.runAfterNotifyHandlers)((0,U.merge)(i,{id:t}),r.__afterNotifyHandlers),r.logger.info("Error report sent ⚡ https://app.honeybadger.io/notice/".concat(t))})).catch((function(e){r.logger.error("Error report failed: an unknown error occurred.","message=".concat(e.message)),(0,U.runAfterNotifyHandlers)(i,r.__afterNotifyHandlers,e)}))})),!0},e.prototype.notifyAsync=function(e,t,n){var r=this;return void 0===t&&(t=void 0),void 0===n&&(n=void 0),new Promise((function(o,i){var a,c,u;a=e.afterNotify?e:t&&t.afterNotify?t:n&&n.afterNotify?n:t&&"object"==typeof t?t:n||(t={}),u=(c=a).afterNotify,c.afterNotify=function(e){if(null==u||u.call(r,e),e)return i(e);o()},r.notify(e,t,n)}))},e.prototype.makeNotice=function(e,t,n){void 0===t&&(t=void 0),void 0===n&&(n=void 0);var r=(0,U.makeNotice)(e);t&&"object"!=typeof t&&(t={name:String(t)});if(t&&(r=(0,U.mergeNotice)(r,t)),"object"==typeof n&&null!==n&&(r=(0,U.mergeNotice)(r,n)),(0,U.objectIsEmpty)(r))return null;var o=this.__store.getContents("context"),i=this.__constructTags(r.tags),a=this.__constructTags(o.tags),c=this.__constructTags(this.config.tags),u=i.concat(a).concat(c),s=u.filter((function(e,t){return u.indexOf(e)===t})),l=0;return"string"==typeof(r=(0,U.merge)(r,{name:r.name||"Error",context:(0,U.merge)(o,r.context),projectRoot:r.projectRoot||this.config.projectRoot,environment:r.environment||this.config.environment,component:r.component||this.config.component,action:r.action||this.config.action,revision:r.revision||this.config.revision,tags:s})).stack&&r.stack.trim()||(r.stack=(0,U.generateStackTrace)(),l=2),r.backtrace=(0,U.makeBacktrace)(r.stack,l),r},e.prototype.addBreadcrumb=function(e,t){if(this.config.breadcrumbsEnabled){t=t||{};var n=(0,U.shallowClone)(t.metadata),r=t.category||"custom",o=(new Date).toISOString();return this.__store.addBreadcrumb({category:r,message:e,metadata:n,timestamp:o}),this}},e.prototype.__getBreadcrumbs=function(){return this.__store.getContents("breadcrumbs").slice()},e.prototype.__getContext=function(){return this.__store.getContents("context")},e.prototype.__developmentMode=function(){return!0!==this.config.reportData&&(this.config.environment&&this.config.developmentEnvironments.includes(this.config.environment))},e.prototype.__buildPayload=function(e){var t=(0,U.filter)(e.headers,this.config.filters)||{},n=(0,U.filter)(R(R({},e.cgiData),(0,U.formatCGIData)(t,"HTTP_")),this.config.filters);return{notifier:M,breadcrumbs:{enabled:!!this.config.breadcrumbsEnabled,trail:e.__breadcrumbs||[]},error:{class:e.name,message:e.message,backtrace:e.backtrace,fingerprint:e.fingerprint,tags:e.tags,causes:(0,U.getCauses)(e)},request:{url:(0,U.filterUrl)(e.url,this.config.filters),component:e.component,action:e.action,context:e.context,cgi_data:n,params:(0,U.filter)(e.params,this.config.filters)||{},session:(0,U.filter)(e.session,this.config.filters)||{}},server:{project_root:e.projectRoot,environment_name:e.environment,revision:e.revision,hostname:this.config.hostname,time:(new Date).toUTCString()},details:e.details||{}}},e.prototype.__constructTags=function(e){return e?e.toString().split(B).filter((function(e){return A.test(e)})):[]},e}();i.Client=L;var I={};Object.defineProperty(I,"__esModule",{value:!0}),function(t){var n=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),r=e&&e.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=e&&e.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)},c=e&&e.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var o in e)"default"!==o&&Object.prototype.hasOwnProperty.call(e,o)&&n(t,e,o);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Util=t.Types=t.Client=void 0;var u=i;Object.defineProperty(t,"Client",{enumerable:!0,get:function(){return u.Client}}),o(S,t),t.Types=c(I),t.Util=c(a)}(o);var D={};function q(e){if(!e||!e.tagName)return"";var t=e.tagName.toLowerCase();if("html"===t)return"";e.id&&(t+="#".concat(e.id));var n=e.getAttribute("class");n&&n.split(/\s+/).forEach((function(e){t+=".".concat(e)})),["alt","name","title","type"].forEach((function(n){var r=e.getAttribute(n);r&&(t+="[".concat(n,'="').concat(r,'"]'))}));var r=function(e){try{var t=e.parentNode.childNodes,n=[];return Array.prototype.forEach.call(t,(function(t){t.tagName&&t.tagName===e.tagName&&n.push(t)})),n}catch(e){return[]}}(e);return r.length>1&&(t+=":nth-child(".concat(Array.prototype.indexOf.call(r,e)+1,")")),t}function F(e){return-1!==e.toString().indexOf("native")}function W(e){var t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/)||{};return{protocol:t[2],host:t[4],pathname:t[5]}}Object.defineProperty(D,"__esModule",{value:!0}),D.preferCatch=D.encodeCookie=D.decodeCookie=D.localURLPathname=D.parseURL=D.nativeFetch=D.stringTextOfElement=D.stringSelectorOfElement=D.stringNameOfElement=void 0,D.stringNameOfElement=q,D.stringSelectorOfElement=function e(t){var n=q(t);if(t.parentNode&&t.parentNode.tagName){var r=e(t.parentNode);if(r.length>0)return"".concat(r," > ").concat(n)}return n},D.stringTextOfElement=function(e){var t=e.textContent||e.innerText||"";return t||"submit"!==e.type&&"button"!==e.type||(t=e.value),function(e,t){e.length>t&&(e=e.substr(0,t)+"...");return e}(t.trim(),300)},D.nativeFetch=function(){if(!window.fetch)return!1;if(F(window.fetch))return!0;try{var e=document.createElement("iframe");e.style.display="none",document.head.appendChild(e);var t=e.contentWindow.fetch&&F(e.contentWindow.fetch);return document.head.removeChild(e),t}catch(e){console&&console.warn&&console.warn("failed to detect native fetch via iframe: "+e)}return!1},D.parseURL=W,D.localURLPathname=function(e){var t=W(e),n=W(document.URL);return t.host&&t.protocol?t.protocol===n.protocol&&t.host===n.host?t.pathname:"".concat(t.protocol,"://").concat(t.host).concat(t.pathname):t.pathname},D.decodeCookie=function(e){var t={};return e.split(/[;,]\s?/).forEach((function(e){var n=e.split("=",2),r=n[0],o=n[1];t[r]=o})),t},D.encodeCookie=function(e){if("object"==typeof e){var t=[];for(var n in e)t.push(n+"="+e[n]);return t.join(";")}},D.preferCatch=function(){var e=!0;if(window.atob||(e=!1),window.ErrorEvent)try{0===new window.ErrorEvent("").colno&&(e=!1)}catch(e){}return e}();var G={};Object.defineProperty(G,"__esModule",{value:!0}),G.onError=G.ignoreNextOnError=void 0;var $,J=o,X=J.Util.instrument,K=J.Util.makeNotice,z=0;G.ignoreNextOnError=function(){z+=1,clearTimeout($),$=setTimeout((function(){z=0}))},G.onError=function(e){return void 0===e&&(e=window),{load:function(t){X(e,"onerror",(function(e){var n=function(e,n,r,o,i){if(t.logger.debug("window.onerror callback invoked",arguments),z>0)return t.logger.debug("Ignoring window.onerror (error likely reported earlier)",arguments),void(z-=1);if(0===r&&/Script error\.?/.test(e))t.config.enableUncaught&&t.logger.warn("Ignoring cross-domain script error: enable CORS to track these types of errors",arguments);else{var a=K(i);a.name||(a.name="window.onerror"),a.message||(a.message=e),a.stack||(a.stack=[a.message,"\n at ? (",n||"unknown",":",r||0,":",o||0,")"].join("")),t.addBreadcrumb("window.onerror"!==a.name&&a.name?"window.onerror: ".concat(a.name):"window.onerror",{category:"error",metadata:{name:a.name,message:a.message,stack:a.stack}}),t.config.enableUncaught&&t.notify(a)}};return function(t,r,o,i,a){return n(t,r,o,i,a),"function"==typeof e&&e.apply(window,arguments)}}))}}};var V={};Object.defineProperty(V,"__esModule",{value:!0});var Q=o.Util.instrument;V.default=function(e){return void 0===e&&(e=window),{load:function(t){t.config.enableUnhandledRejection&&Q(e,"onunhandledrejection",(function(e){function n(e){var n;if(t.logger.debug("window.onunhandledrejection callback invoked",arguments),t.config.enableUnhandledRejection){var r=e.reason;if(r instanceof Error){var o="unknown",i=0,a="".concat(r.message,"\n at ? (").concat(o,":").concat(i,")"),c=r.stack||a,u={name:r.name,message:"UnhandledPromiseRejectionWarning: ".concat(r),stack:c};return t.addBreadcrumb("window.onunhandledrejection: ".concat(u.name),{category:"error",metadata:u}),void t.notify(u)}var s="string"==typeof r?r:null!==(n=JSON.stringify(r))&&void 0!==n?n:"Unspecified reason";t.notify({name:"window.onunhandledrejection",message:"UnhandledPromiseRejectionWarning: ".concat(s)})}}return function(t){n(t),"function"==typeof e&&e.apply(this,arguments)}}))}}};var Y={};Object.defineProperty(Y,"__esModule",{value:!0});var Z=o,ee=D,te=Z.Util.sanitize,ne=Z.Util.instrument;Y.default=function(e){return void 0===e&&(e=window),{load:function(t){function n(e){return!0===t.config.breadcrumbsEnabled||(e?!0===t.config.breadcrumbsEnabled[e]:!1!==t.config.breadcrumbsEnabled)}!function(){function r(e){return Array.isArray(e)?e.map((function(e){try{return String(e)}catch(e){return"[unknown]"}})).join(" "):""}n("console")&&["debug","info","warn","error","log"].forEach((function(n){ne(e.console,n,(function(o){return function(){var i=Array.prototype.slice.call(arguments),a=r(i),c={category:"log",metadata:{level:n,arguments:te(i,3)}};t.addBreadcrumb(a,c),"function"==typeof o&&Function.prototype.apply.call(o,e.console,arguments)}}))}))}(),n("dom")&&e.addEventListener("click",(function(e){var n,r,o;try{n=(0,ee.stringNameOfElement)(e.target),r=(0,ee.stringSelectorOfElement)(e.target),o=(0,ee.stringTextOfElement)(e.target)}catch(e){n="UI Click",r="[unknown]",o="[unknown]"}0!==n.length&&t.addBreadcrumb(n,{category:"ui.click",metadata:{selector:r,text:o,event:e}})}),!0),n("network")&&(ne(XMLHttpRequest.prototype,"open",(function(e){return function(){var t=this,n=arguments[1],r="string"==typeof arguments[0]?arguments[0].toUpperCase():arguments[0],o="".concat(r," ").concat((0,ee.localURLPathname)(n));this.__hb_xhr={type:"xhr",method:r,url:n,message:o},"function"==typeof e&&e.apply(t,arguments)}})),ne(XMLHttpRequest.prototype,"send",(function(e){return function(){var n=this;function r(){if(4===n.readyState){var e=void 0;n.__hb_xhr&&(n.__hb_xhr.status_code=n.status,e=n.__hb_xhr.message,delete n.__hb_xhr.message),t.addBreadcrumb(e||"XMLHttpRequest",{category:"request",metadata:n.__hb_xhr})}}"onreadystatechange"in n&&"function"==typeof n.onreadystatechange?ne(n,"onreadystatechange",(function(e){return function(){r(),"function"==typeof e&&e.apply(this,arguments)}})):n.onreadystatechange=r,"function"==typeof e&&e.apply(n,arguments)}}))),n("network")&&(0,ee.nativeFetch)()&&ne(e,"fetch",(function(n){return function(){var r,o=arguments[0],i="GET";"string"==typeof o?r=o:"Request"in e&&o instanceof Request?(r=o.url,o.method&&(i=o.method)):r=String(o),arguments[1]&&arguments[1].method&&(i=arguments[1].method),"string"==typeof i&&(i=i.toUpperCase());var a="".concat(i," ").concat((0,ee.localURLPathname)(r)),c={type:"fetch",method:i,url:r};return n.apply(this,arguments).then((function(e){return c.status_code=e.status,t.addBreadcrumb(a,{category:"request",metadata:c}),e})).catch((function(e){throw t.addBreadcrumb("fetch error",{category:"error",metadata:c}),e}))}})),function(){if(n("navigation")){var r=e.location.href;ne(e,"onpopstate",(function(t){return function(){if(o(r,e.location.href),t)return t.apply(this,arguments)}})),ne(e.history,"pushState",i),ne(e.history,"replaceState",i)}function o(e,n){r=n,t.addBreadcrumb("Page changed",{category:"navigation",metadata:{from:e,to:n}})}function i(e){return function(){var t=arguments.length>2?arguments[2]:void 0;return t&&o(r,String(t)),e.apply(this,arguments)}}}()}}};var re={};Object.defineProperty(re,"__esModule",{value:!0});var oe=o.Util.instrument;re.default=function(e){return void 0===e&&(e=window),{load:function(t){!function(){function n(e){return function(n){return function(r,o){if("function"==typeof r){var i=Array.prototype.slice.call(arguments,2);return r=t.__wrap(r,e),n((function(){r.apply(void 0,i)}),o)}return n(r,o)}}}oe(e,"setTimeout",n({component:"setTimeout"})),oe(e,"setInterval",n({component:"setInterval"}))}()}}};var ie={};Object.defineProperty(ie,"__esModule",{value:!0});var ae=o.Util.instrument;ie.default=function(e){return void 0===e&&(e=window),{load:function(t){["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"].forEach((function(n){var r=e[n]&&e[n].prototype;r&&Object.prototype.hasOwnProperty.call(r,"addEventListener")&&(ae(r,"addEventListener",(function(e){var r={component:"".concat(n,".prototype.addEventListener")};return function(n,o,i,a){try{o&&null!=o.handleEvent&&(o.handleEvent=t.__wrap(o.handleEvent,r))}catch(e){t.logger.error(e)}return e.call(this,n,t.__wrap(o,r),i,a)}})),ae(r,"removeEventListener",(function(e){return function(n,r,o,i){return e.call(this,n,r,o,i),e.call(this,n,t.__wrap(r),o,i)}})))}))}}};var ce={};Object.defineProperty(ce,"__esModule",{value:!0}),ce.BrowserTransport=void 0;var ue=o.Util.sanitize,se=function(){function e(){}return e.prototype.send=function(e,t){return new Promise((function(n,r){try{var o=new XMLHttpRequest;if(o.open(e.method,e.endpoint,e.async),Object.keys(e.headers||[]).length)for(var i in e.headers)void 0!==e.headers[i]&&o.setRequestHeader(i,String(e.headers[i]));o.send(t?JSON.stringify(ue(t,e.maxObjectDepth)):void 0),o.onload=function(){return n({statusCode:o.status,body:o.response})}}catch(e){r(e)}}))},e}();return ce.BrowserTransport=se,function(t){var n,r=e&&e.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=e&&e.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)},a=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Types=void 0;var c=o,u=D,s=G,l=a(V),f=a(Y),d=a(re),p=a(ie),h=ce,g=c.Util.merge,m=c.Util.filter,y=c.Util.objectIsExtensible,v=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,i({async:!0,maxErrors:null,projectRoot:window.location.protocol+"//"+window.location.host},t),new h.BrowserTransport)||this;return n.__errorsSent=0,n.__lastWrapErr=void 0,n.__beforeNotifyHandlers=[function(e){return n.__exceedsMaxErrors()?(n.logger.debug("Dropping notice: max errors exceeded",e),!1):(e&&!e.url&&(e.url=document.URL),n.__incrementErrorsCount(),!0)}],n}return r(t,e),t.prototype.configure=function(t){return void 0===t&&(t={}),e.prototype.configure.call(this,t)},t.prototype.resetMaxErrors=function(){return this.__errorsSent=0},t.prototype.factory=function(e){return new t(e)},t.prototype.checkIn=function(e){throw new Error("Honeybadger.checkIn() is not supported on the browser")},t.prototype.__buildPayload=function(t){var n,r={HTTP_USER_AGENT:void 0,HTTP_REFERER:void 0,HTTP_COOKIE:void 0};r.HTTP_USER_AGENT=navigator.userAgent,document.referrer.match(/\S/)&&(r.HTTP_REFERER=document.referrer),(n="string"==typeof t.cookies?(0,u.decodeCookie)(t.cookies):t.cookies)&&(r.HTTP_COOKIE=(0,u.encodeCookie)(m(n,this.config.filters)));var o=e.prototype.__buildPayload.call(this,t);return o.request.cgi_data=g(r,o.request.cgi_data),o},t.prototype.__wrap=function(e,t){void 0===t&&(t={});var n=e;t||(t={});try{if("function"!=typeof n)return n;if(!y(n))return n;if(!n.___hb){var r=this;n.___hb=function(){if(!u.preferCatch)return n.apply(this,arguments);try{return n.apply(this,arguments)}catch(e){if(r.__lastWrapErr===e)throw e;throw r.__lastWrapErr=e,(0,s.ignoreNextOnError)(),r.addBreadcrumb(t.component?"".concat(t.component,": ").concat(e.name):e.name,{category:"error",metadata:{message:e.message,name:e.name,stack:e.stack}}),r.config.enableUncaught&&r.notify(e),e}}}return n.___hb.___hb=n.___hb,n.___hb}catch(e){return n}},t.prototype.__incrementErrorsCount=function(){return this.__errorsSent++},t.prototype.__exceedsMaxErrors=function(){return this.config.maxErrors&&this.__errorsSent>=this.config.maxErrors},t}(c.Client),b=o;Object.defineProperty(t,"Types",{enumerable:!0,get:function(){return b.Types}}),t.default=new v({__plugins:[(0,s.onError)(),(0,l.default)(),(0,d.default)(),(0,p.default)(),(0,f.default)()]})}(r),t(r)})); | ||
//# sourceMappingURL=honeybadger.min.js.map |
{ | ||
"name": "@honeybadger-io/js", | ||
"version": "4.7.1", | ||
"version": "4.7.4", | ||
"license": "MIT", | ||
@@ -77,3 +77,3 @@ "homepage": "https://github.com/honeybadger-io/honeybadger-js/tree/master/packages/js", | ||
}, | ||
"gitHead": "13826156aafc9ec3f304bf1ead7f446029f540a0" | ||
"gitHead": "d113e03e1d8852101a63e540f779e590430fbe8e" | ||
} |
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 too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
614811
26
3948