Files

4 lines
54 KiB
JavaScript
Executable File

!function(){"use strict";var c=setTimeout,p="undefined"!=typeof setImmediate?setImmediate:null;function h(t){return Boolean(t&&void 0!==t.length)}function f(){}function i(t){if(!(this instanceof i))throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],_(t,this)}function l(r,n){for(;3===r._state;)r=r._value;0!==r._state?(r._handled=!0,i._immediateFn(function(){var t,e=1===r._state?n.onFulfilled:n.onRejected;if(null!==e){try{t=e(r._value)}catch(t){return void y(n.promise,t)}d(n.promise,t)}else(1===r._state?d:y)(n.promise,r._value)})):r._deferreds.push(n)}function d(e,t){try{if(t===e)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"==typeof t||"function"==typeof t)){var r=t.then;if(t instanceof i)return e._state=3,e._value=t,void m(e);if("function"==typeof r)return void _((n=r,o=t,function(){n.apply(o,arguments)}),e)}e._state=1,e._value=t,m(e)}catch(t){y(e,t)}var n,o}function y(t,e){t._state=2,t._value=e,m(t)}function m(t){2===t._state&&0===t._deferreds.length&&i._immediateFn(function(){t._handled||i._unhandledRejectionFn(t._value)});for(var e=0,r=t._deferreds.length;e<r;e++)l(t,t._deferreds[e]);t._deferreds=null}function v(t,e,r){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof e?e:null,this.promise=r}function _(t,e){var r=!1;try{t(function(t){r||(r=!0,d(e,t))},function(t){r||(r=!0,y(e,t))})}catch(t){if(r)return;r=!0,y(e,t)}}i.prototype.catch=function(t){return this.then(null,t)},i.prototype.then=function(t,e){var r=new this.constructor(f);return l(this,new v(t,e,r)),r},i.prototype.finally=function(e){var r=this.constructor;return this.then(function(t){return r.resolve(e()).then(function(){return t})},function(t){return r.resolve(e()).then(function(){return r.reject(t)})})},i.all=function(e){return new i(function(o,i){if(!h(e))return i(new TypeError("Promise.all accepts an array"));var s=Array.prototype.slice.call(e);if(0===s.length)return o([]);var a=s.length;for(var t=0;t<s.length;t++)!function e(r,t){try{if(t&&("object"==typeof t||"function"==typeof t)){var n=t.then;if("function"==typeof n)return void n.call(t,function(t){e(r,t)},i)}s[r]=t,0==--a&&o(s)}catch(t){i(t)}}(t,s[t])})},i.allSettled=function(r){return new this(function(o,t){if(!r||void 0===r.length)return t(new TypeError(typeof r+" "+r+" is not iterable(cannot read property Symbol(Symbol.iterator))"));var i=Array.prototype.slice.call(r);if(0===i.length)return o([]);var s=i.length;for(var e=0;e<i.length;e++)!function e(r,t){if(t&&("object"==typeof t||"function"==typeof t)){var n=t.then;if("function"==typeof n)return void n.call(t,function(t){e(r,t)},function(t){i[r]={status:"rejected",reason:t},0==--s&&o(i)})}i[r]={status:"fulfilled",value:t},0==--s&&o(i)}(e,i[e])})},i.resolve=function(e){return e&&"object"==typeof e&&e.constructor===i?e:new i(function(t){t(e)})},i.reject=function(r){return new i(function(t,e){e(r)})},i.race=function(o){return new i(function(t,e){if(!h(o))return e(new TypeError("Promise.race accepts an array"));for(var r=0,n=o.length;r<n;r++)i.resolve(o[r]).then(t,e)})},i._immediateFn="function"==typeof p?function(t){p(t)}:function(t){c(t,0)},i._unhandledRejectionFn=function(t){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",t)};function g(t,e){var e=void 0===e?{}:e,r=e.maxLength,p=void 0===r?64e3:r,r=e.keysBlocklist,h=void 0===r?[]:r;if(t.errors)for(var n=0;n<t.errors.length;n++){var f=new b({keysBlocklist:h});t.errors[n]=f.truncate(t.errors[n])}for(var o="",i=["context","params","environment","session"],s=0;s<8;s++){for(var l={level:s,keysBlocklist:h},a=0,d=i;a<d.length;a++)(c=t[u=d[a]])&&(t[u]=function(t,e){void 0===e&&(e={});return new b(e).truncate(t)}(c,l));if((o=JSON.stringify(t)).length<p)return o}var y={json:o.slice(0,Math.floor(p/2))+"..."};i.push("errors");for(var u,c,m=0,v=i;m<v.length;m++)(c=t[u=v[m]])&&(o=JSON.stringify(c),y[u]=o.length);e=new Error("airbrake: notice exceeds max length and can't be truncated");throw e.params=y,e}function w(t,e){return t>>e||1}O.prototype.truncate=function(t,e,r){if(void 0===e&&(e=""),void 0===r&&(r=0),null==t)return t;switch(typeof t){case"boolean":case"number":case"function":return t;case"string":return this.truncateString(t);case"object":break;default:return this.truncateString(String(t))}if(t instanceof String)return this.truncateString(t.toString());if(t instanceof Boolean||t instanceof Number||t instanceof Date||t instanceof RegExp)return t;if(t instanceof Error)return this.truncateString(t.toString());if(0<=this.seen.indexOf(t))return"[Circular "+this.getPath(t)+"]";var n=Object.prototype.toString.apply(t).slice("[object ".length,-1);if(++r>this.maxDepth)return"[Truncated "+n+"]";switch(this.keys.push(e),this.seen.push(t),n){case"Array":return this.truncateArray(t,r);case"Object":return this.truncateObject(t,r);default:var o=this.maxDepth,i=(this.maxDepth=0,this.truncateObject(t,r));return i.__type=n,this.maxDepth=o,i}},O.prototype.getPath=function(t){for(var e=this.seen.indexOf(t),r=[this.keys[e]],n=e;0<=n;n--){var o=this.seen[n];o&&j(o,r[0])===t&&(t=o,r.unshift(this.keys[n]))}return"~"+r.join(".")},O.prototype.truncateString=function(t){return t.length>this.maxStringLength?t.slice(0,this.maxStringLength)+"...":t},O.prototype.truncateArray=function(t,e){void 0===e&&(e=0);for(var r=0,n=[],o=0;o<t.length;o++){var i=t[o];if(n.push(this.truncate(i,o.toString(),e)),++r>=this.maxArrayLength)break}return n},O.prototype.truncateObject=function(t,e){void 0===e&&(e=0);var r,n=0,o={};for(r in t)if(Object.prototype.hasOwnProperty.call(t,r))if(function(t,e){for(var r=0,n=e;r<n.length;r++){var o=n[r];if(o===t)return!0;if(o instanceof RegExp&&t.match(o))return!0}return!1}(r,this.keysBlocklist))o[r]="[Filtered]";else{var i=j(t,r);if(void 0!==i&&"function"!=typeof i&&(o[r]=this.truncate(i,r,e),++n>=this.maxObjectLength))break}return o};var b=O;function O(t){this.maxStringLength=1024,this.maxObjectLength=128,this.maxArrayLength=128,this.maxDepth=8,this.keys=[],this.keysBlocklist=[],this.seen=[];var e=t.level||0;this.keysBlocklist=t.keysBlocklist||[],this.maxStringLength=w(this.maxStringLength,e),this.maxObjectLength=w(this.maxObjectLength,e),this.maxArrayLength=w(this.maxArrayLength,e),this.maxDepth=w(this.maxDepth,e)}function j(t,e){try{return t[e]}catch(t){return}}S.prototype.end=function(t){this.endTime=t||new Date,this._dur+=this.endTime.getTime()-this.startTime.getTime(),this._metric._incGroup(this.name,this._dur),this._metric=null},S.prototype._pause=function(){var t;this._paused()||(t=new Date,this._dur+=t.getTime()-this.startTime.getTime(),this.startTime=null)},S.prototype._resume=function(){this._paused()&&(this.startTime=new Date)},S.prototype._paused=function(){return null==this.startTime};var k=S;function S(t,e,r){this._dur=0,this._level=0,this._metric=t,this.name=e,this.startTime=r||new Date}T.prototype.end=function(t){this.endTime||(this.endTime=t||new Date)},T.prototype.isRecording=function(){return!0},T.prototype.startSpan=function(t,e){var r=this._spans[t];r?r._level++:(r=new k(this,t,e),this._spans[t]=r)},T.prototype.endSpan=function(t,e){var r=this._spans[t];r?0<r._level?r._level--:(r.end(e),delete this._spans[r.name]):console.error("airbrake: span=%s does not exist",t)},T.prototype._incGroup=function(t,e){this._groups[t]=(this._groups[t]||0)+e},T.prototype._duration=function(){return this.endTime||(this.endTime=new Date),this.endTime.getTime()-this.startTime.getTime()};var E=T;function T(){this._spans={},this._groups={},this.startTime=new Date}A.prototype.isRecording=function(){return!1},A.prototype.startSpan=function(t,e){},A.prototype.endSpan=function(t,e){},A.prototype._incGroup=function(t,e){};var N=A;function A(){}var P=function(){return(P=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},q=(e.prototype.clone=function(){var t=new e;return t._context=P({},this._context),t._history=this._history.slice(),t},e.prototype.setContext=function(t){this._context=P(P({},this._context),t)},e.prototype.context=function(){var t=P({},this._context);return 0<this._history.length&&(t.history=this._history.slice()),t},e.prototype.pushHistory=function(t){this._isDupState(t)?this._lastRecord.num?this._lastRecord.num++:this._lastRecord.num=2:(t.date||(t.date=new Date),this._history.push(t),this._lastRecord=t,this._history.length>this._historyMaxLen&&(this._history=this._history.slice(-this._historyMaxLen)))},e.prototype._isDupState=function(t){if(!this._lastRecord)return!1;for(var e in t)if(t.hasOwnProperty(e)&&"date"!==e&&t[e]!==this._lastRecord[e])return!1;return!0},e.prototype.routeMetric=function(){return this._routeMetric||this._noopMetric},e.prototype.setRouteMetric=function(t){this._routeMetric=t},e.prototype.queueMetric=function(){return this._queueMetric||this._noopMetric},e.prototype.setQueueMetric=function(t){this._queueMetric=t},e);function e(){this._noopMetric=new N,this._context={},this._historyMaxLen=20,this._history=[]}var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function R(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var L={exports:{}},D=(L.exports=function(){function c(t){return!isNaN(parseFloat(t))&&isFinite(t)}function r(t){return t.charAt(0).toUpperCase()+t.substring(1)}function t(t){return function(){return this[t]}}var e=["isConstructor","isEval","isNative","isToplevel"],n=["columnNumber","lineNumber"],o=["fileName","functionName","source"],p,f,i=e.concat(n,o,["args"],["evalOrigin"]);function h(t){if(!t)return;for(var e=0;e<i.length;e++)if(t[i[e]]!==undefined)this["set"+r(i[e])](t[i[e]])}h.prototype={getArgs:function(){return this.args},setArgs:function(t){if(Object.prototype.toString.call(t)!=="[object Array]")throw new TypeError("Args must be an Array");this.args=t},getEvalOrigin:function(){return this.evalOrigin},setEvalOrigin:function(t){if(t instanceof h)this.evalOrigin=t;else if(t instanceof Object)this.evalOrigin=new h(t);else throw new TypeError("Eval Origin must be an Object or StackFrame")},toString:function(){var t=this.getFileName()||"";var e=this.getLineNumber()||"";var r=this.getColumnNumber()||"";var n=this.getFunctionName()||"";if(this.getIsEval()){if(t)return"[eval] ("+t+":"+e+":"+r+")";return"[eval]:"+e+":"+r}if(n)return n+" ("+t+":"+e+":"+r+")";return t+":"+e+":"+r}},h.fromString=function p(t){var e=t.indexOf("(");var r=t.lastIndexOf(")");var n=t.substring(0,e);var o=t.substring(e+1,r).split(",");var i=t.substring(r+1);if(i.indexOf("@")===0){var s=/@(.+?)(?::(\d+))?(?::(\d+))?$/.exec(i,"");var a=s[1];var u=s[2];var c=s[3]}return new h({functionName:n,args:o||undefined,fileName:a,lineNumber:u||undefined,columnNumber:c||undefined})};for(var s=0;s<e.length;s++){h.prototype["get"+r(e[s])]=t(e[s]);h.prototype["set"+r(e[s])]=function(e){return function(t){this[e]=Boolean(t)}}(e[s])}for(var a=0;a<n.length;a++){h.prototype["get"+r(n[a])]=t(n[a]);h.prototype["set"+r(n[a])]=function(e){return function(t){if(!c(t))throw new TypeError(e+" must be a Number");this[e]=Number(t)}}(n[a])}for(var u=0;u<o.length;u++){h.prototype["get"+r(o[u])]=t(o[u]);h.prototype["set"+r(o[u])]=function(e){return function(t){this[e]=String(t)}}(o[u])}return h}(),function(u){var n=/(^|@)\S+:\d+/;var o=/^\s*at .*(\S+:\d+|\(native\))/m;var i=/^(eval@)?(\[native code])?$/;return{parse:function t(e){if(typeof e.stacktrace!=="undefined"||typeof e["opera#sourceloc"]!=="undefined")return this.parseOpera(e);else if(e.stack&&e.stack.match(o))return this.parseV8OrIE(e);else if(e.stack)return this.parseFFOrSafari(e);else throw new Error("Cannot parse given Error object")},extractLocation:function t(e){if(e.indexOf(":")===-1)return[e];var r=/(.+?)(?::(\d+))?(?::(\d+))?$/;var n=r.exec(e.replace(/[()]/g,""));return[n[1],n[2]||undefined,n[3]||undefined]},parseV8OrIE:function t(e){var r=e.stack.split("\n").filter(function(t){return!!t.match(o)},this);return r.map(function(t){if(t.indexOf("(eval ")>-1)t=t.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(,.*$)/g,"");var e=t.replace(/^\s+/,"").replace(/\(eval code/g,"(").replace(/^.*?\s+/,"");var r=e.match(/ (\(.+\)$)/);e=r?e.replace(r[0],""):e;var n=this.extractLocation(r?r[1]:e);var o=r&&e||undefined;var i=["eval","<anonymous>"].indexOf(n[0])>-1?undefined:n[0];return new u({functionName:o,fileName:i,lineNumber:n[1],columnNumber:n[2],source:t})},this)},parseFFOrSafari:function t(e){var r=e.stack.split("\n").filter(function(t){return!t.match(i)},this);return r.map(function(t){if(t.indexOf(" > eval")>-1)t=t.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1");if(t.indexOf("@")===-1&&t.indexOf(":")===-1)return new u({functionName:t});else{var e=/((.*".+"[^@]*)?[^@]*)(?:@)/;var r=t.match(e);var n=r&&r[1]?r[1]:undefined;var o=this.extractLocation(t.replace(e,""));return new u({functionName:n,fileName:o[0],lineNumber:o[1],columnNumber:o[2],source:t})}},this)},parseOpera:function t(e){if(!e.stacktrace||e.message.indexOf("\n")>-1&&e.message.split("\n").length>e.stacktrace.split("\n").length)return this.parseOpera9(e);else if(!e.stack)return this.parseOpera10(e);else return this.parseOpera11(e)},parseOpera9:function t(e){var r=/Line (\d+).*script (?:in )?(\S+)/i;var n=e.message.split("\n");var o=[];for(var i=2,s=n.length;i<s;i+=2){var a=r.exec(n[i]);if(a)o.push(new u({fileName:a[2],lineNumber:a[1],source:n[i]}))}return o},parseOpera10:function t(e){var r=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i;var n=e.stacktrace.split("\n");var o=[];for(var i=0,s=n.length;i<s;i+=2){var a=r.exec(n[i]);if(a)o.push(new u({functionName:a[3]||undefined,fileName:a[2],lineNumber:a[1],source:n[i]}))}return o},parseOpera11:function t(e){var r=e.stack.split("\n").filter(function(t){return!!t.match(n)&&!t.match(/^Error created at/)},this);return r.map(function(t){var e=t.split("@");var r=this.extractLocation(e.pop());var n=e.shift()||"";var o=n.replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||undefined;var i;if(n.match(/\(([^)]*)\)/))i=n.replace(/^[^(]+\(([^)]*)\)$/,"$1");var s=i===undefined||i==="[arguments not available]"?undefined:i.split(",");return new u({functionName:o,args:s,fileName:r[0],lineNumber:r[1],columnNumber:r[2],source:t})},this)}}}(L.exports)),C="object"==typeof console&&console.warn;function I(e){try{return D.parse(e)}catch(t){C&&e.stack&&console.warn("ErrorStackParser:",t.toString(),e.stack)}return e.fileName?[e]:[]}function F(t){var e=[];if(t.noStack)e.push({function:t.functionName||"",file:t.fileName||"",line:t.lineNumber||0,column:t.columnNumber||0});else{var r=I(t);if(0===r.length)try{throw new Error("fake")}catch(t){(r=I(t)).shift(),r.shift()}for(var n=0,o=r;n<o.length;n++){var i=o[n];e.push({function:i.functionName||"",file:i.fileName||"",line:i.lineNumber||0,column:i.columnNumber||0})}}return{type:t.name||"",message:t.message?String(t.message):String(t),backtrace:e}}var B=new RegExp(["^","\\[(\\$.+)\\]","\\s","([\\s\\S]+)","$"].join(""));function M(t){var e=t.errors[0];if(""!==e.type&&"Error"!==e.type)return t;var r=e.message.match(B);return null!==r&&(e.type=r[1],e.message=r[2]),t}var U=["Script error","Script error.","InvalidAccessError"];function H(t){var e=t.errors[0];if(""===e.type&&-1!==U.indexOf(e.message))return null;if(e.backtrace&&0<e.backtrace.length&&"<anonymous>"===e.backtrace[0].file)return null;return t}var J=new RegExp(["^","Uncaught\\s","(.+?)",":\\s","(.+)","$"].join(""));function z(t){var e=t.errors[0];if(""!==e.type&&"Error"!==e.type)return t;var r=e.message.match(J);return null!==r&&(e.type=r[1],e.message=r[2]),t}var x,L={exports:{}},$=L,G=L.exports,W="undefined"!=typeof self?self:t,t=(X.prototype=W,new X);function X(){this.fetch=!1,this.DOMException=W.DOMException}x=t,function(a){var i,s,f="URLSearchParams"in x,l="Symbol"in x&&"iterator"in Symbol,u="FileReader"in x&&"Blob"in x&&function(){try{return new Blob,!0}catch(t){return!1}}(),d="FormData"in x,r="ArrayBuffer"in x;function n(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(t))throw new TypeError("Invalid character in header field name");return t.toLowerCase()}function y(t){return t="string"!=typeof t?String(t):t}function t(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return l&&(t[Symbol.iterator]=function(){return t}),t}function c(e){this.map={},e instanceof c?e.forEach(function(t,e){this.append(e,t)},this):Array.isArray(e)?e.forEach(function(t){this.append(t[0],t[1])},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function o(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function m(r){return new Promise(function(t,e){r.onload=function(){t(r.result)},r.onerror=function(){e(r.error)}})}function v(t){var e=new FileReader,r=m(e);return e.readAsArrayBuffer(t),r}function _(t){var e;return t.slice?t.slice(0):((e=new Uint8Array(t.byteLength)).set(new Uint8Array(t)),e.buffer)}function g(){return this.bodyUsed=!1,this._initBody=function(t){var e;(this._bodyInit=t)?"string"==typeof t?this._bodyText=t:u&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:d&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:f&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():r&&u&&((e=t)&&DataView.prototype.isPrototypeOf(e))?(this._bodyArrayBuffer=_(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):r&&(ArrayBuffer.prototype.isPrototypeOf(t)||s(t))?this._bodyArrayBuffer=_(t):this._bodyText=t=Object.prototype.toString.call(t):this._bodyText="",this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):f&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},u&&(this.blob=function(){var t=o(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?o(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(v)}),this.text=function(){var t,e,r=o(this);if(r)return r;if(this._bodyBlob)return r=this._bodyBlob,t=new FileReader,e=m(t),t.readAsText(r),e;if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),r=new Array(e.length),n=0;n<e.length;n++)r[n]=String.fromCharCode(e[n]);return r.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},d&&(this.formData=function(){return this.text().then(b)}),this.json=function(){return this.text().then(JSON.parse)},this}r&&(i=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],s=ArrayBuffer.isView||function(t){return t&&-1<i.indexOf(Object.prototype.toString.call(t))}),c.prototype.append=function(t,e){t=n(t),e=y(e);var r=this.map[t];this.map[t]=r?r+", "+e:e},c.prototype.delete=function(t){delete this.map[n(t)]},c.prototype.get=function(t){return t=n(t),this.has(t)?this.map[t]:null},c.prototype.has=function(t){return this.map.hasOwnProperty(n(t))},c.prototype.set=function(t,e){this.map[n(t)]=y(e)},c.prototype.forEach=function(t,e){for(var r in this.map)this.map.hasOwnProperty(r)&&t.call(e,this.map[r],r,this)},c.prototype.keys=function(){var r=[];return this.forEach(function(t,e){r.push(e)}),t(r)},c.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),t(e)},c.prototype.entries=function(){var r=[];return this.forEach(function(t,e){r.push([e,t])}),t(r)},l&&(c.prototype[Symbol.iterator]=c.prototype.entries);var w=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function p(t,e){var r,n=(e=e||{}).body;if(t instanceof p){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new c(t.headers)),this.method=t.method,this.mode=t.mode,this.signal=t.signal,n||null==t._bodyInit||(n=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=e.credentials||this.credentials||"same-origin",!e.headers&&this.headers||(this.headers=new c(e.headers)),this.method=(t=e.method||this.method||"GET",r=t.toUpperCase(),-1<w.indexOf(r)?r:t),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(n)}function b(t){var r=new FormData;return t.trim().split("&").forEach(function(t){var e;t&&(e=(t=t.split("=")).shift().replace(/\+/g," "),t=t.join("=").replace(/\+/g," "),r.append(decodeURIComponent(e),decodeURIComponent(t)))}),r}function h(t,e){e=e||{},this.type="default",this.status=void 0===e.status?200:e.status,this.ok=200<=this.status&&this.status<300,this.statusText="statusText"in e?e.statusText:"OK",this.headers=new c(e.headers),this.url=e.url||"",this._initBody(t)}p.prototype.clone=function(){return new p(this,{body:this._bodyInit})},g.call(p.prototype),g.call(h.prototype),h.prototype.clone=function(){return new h(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new c(this.headers),url:this.url})},h.error=function(){var t=new h(null,{status:0,statusText:""});return t.type="error",t};var O=[301,302,303,307,308];h.redirect=function(t,e){if(-1===O.indexOf(e))throw new RangeError("Invalid status code");return new h(null,{status:e,headers:{location:t}})},a.DOMException=x.DOMException;try{new a.DOMException}catch(t){a.DOMException=function(t,e){this.message=t,this.name=e;e=Error(t);this.stack=e.stack},a.DOMException.prototype=Object.create(Error.prototype),a.DOMException.prototype.constructor=a.DOMException}function e(i,s){return new Promise(function(n,t){var e=new p(i,s);if(e.signal&&e.signal.aborted)return t(new a.DOMException("Aborted","AbortError"));var o=new XMLHttpRequest;function r(){o.abort()}o.onload=function(){var r,t={status:o.status,statusText:o.statusText,headers:(t=o.getAllResponseHeaders()||"",r=new c,t.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach(function(t){var t=t.split(":"),e=t.shift().trim();e&&(t=t.join(":").trim(),r.append(e,t))}),r)},e=(t.url="responseURL"in o?o.responseURL:t.headers.get("X-Request-URL"),"response"in o?o.response:o.responseText);n(new h(e,t))},o.onerror=function(){t(new TypeError("Network request failed"))},o.ontimeout=function(){t(new TypeError("Network request failed"))},o.onabort=function(){t(new a.DOMException("Aborted","AbortError"))},o.open(e.method,e.url,!0),"include"===e.credentials?o.withCredentials=!0:"omit"===e.credentials&&(o.withCredentials=!1),"responseType"in o&&u&&(o.responseType="blob"),e.headers.forEach(function(t,e){o.setRequestHeader(e,t)}),e.signal&&(e.signal.addEventListener("abort",r),o.onreadystatechange=function(){4===o.readyState&&e.signal.removeEventListener("abort",r)}),o.send(void 0===e._bodyInit?null:e._bodyInit)})}e.polyfill=!0,x.fetch||(x.fetch=e,x.Headers=c,x.Request=p,x.Response=h),a.Headers=c,a.Request=p,a.Response=h,a.fetch=e,Object.defineProperty(a,"__esModule",{value:!0})}({}),t.fetch.ponyfill=!0,delete t.fetch.polyfill,(G=t.fetch).default=t.fetch,G.fetch=t.fetch,G.Headers=t.Headers,G.Request=t.Request,G.Response=t.Response,$.exports=G;var K=R(L.exports),V={unauthorized:new Error("airbrake: unauthorized: project id or key are wrong"),ipRateLimited:new Error("airbrake: IP is rate limited")},Q=0;function Y(t){if(Date.now()/1e3<Q)return i.reject(V.ipRateLimited);var e={method:t.method,body:t.body,headers:t.headers};return K(t.url,e).then(function(e){if(401===e.status)throw V.unauthorized;if(429===e.status){var t=e.headers.get("X-RateLimit-Delay");if(!t)throw V.ipRateLimited;t=parseInt(t,10);throw 0<t&&(Q=Date.now()/1e3+t),V.ipRateLimited}if(204===e.status)return{json:null};if(404===e.status)throw new Error("404 Not Found");return 200<=e.status&&e.status<300?e.json().then(function(t){return{json:t}}):400<=e.status&&e.status<500?e.json().then(function(t){throw new Error(t.message)}):e.text().then(function(t){throw new Error("airbrake: fetch: unexpected response: code="+e.status+" body='"+t+"'")})})}function Z(n){return function(t){var e=t,r=n;return Date.now()/1e3<tt?i.reject(V.ipRateLimited):new i(function(o,i){r({url:e.url,method:e.method,body:e.body,headers:{"content-type":"application/json"},timeout:e.timeout},function(t,e,r){if(t)i(t);else{if(!e.statusCode)return t=new Error("airbrake: request: response statusCode is "+e.statusCode),void i(t);if(401!==e.statusCode)if(429!==e.statusCode)if(204!==e.statusCode)if(200<=e.statusCode&&e.statusCode<300){var n=void 0;try{n=JSON.parse(r)}catch(t){return void i(t)}o(n)}else{if(400<=e.statusCode&&e.statusCode<500){n=void 0;try{n=JSON.parse(r)}catch(t){return void i(t)}return t=new Error(n.message),void i(t)}r=r.trim(),t=new Error("airbrake: node: unexpected response: code="+e.statusCode+" body='"+r+"'"),i(t)}else o({json:null});else{i(V.ipRateLimited);n=e.headers["x-ratelimit-delay"];if(n){r=void 0;if("string"==typeof n)r=n;else{if(!(n instanceof Array))return;r=n[0]}t=parseInt(r,10);0<t&&(tt=Date.now()/1e3+t)}}else i(V.unauthorized)}})})}}var tt=0;function et(t){return t.request?Z(t.request):Y}var rt,nt,t=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}rt(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},ot=!(rt=function(t,e){return(rt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)});try{nt=require("tdigest"),ot=!0}catch(t){}st.prototype.add=function(t){0===t&&(t=1e-5),this.count+=1,this.sum+=t,this.sumsq+=t*t,this._td&&this._td.push(t)},st.prototype.toJSON=function(){return{count:this.count,sum:this.sum,sumsq:this.sumsq,tdigestCentroids:pt(this._td)}};var it=st;function st(){this.count=0,this.sum=0,this.sumsq=0,this._td=new nt.Digest}t(ct,at=it),ct.prototype.addGroups=function(t,e){for(var r in this.add(t),e)e.hasOwnProperty(r)&&this.addGroup(r,e[r])},ct.prototype.addGroup=function(t,e){var r=this.groups[t];r||(r=new it,this.groups[t]=r),r.add(e)},ct.prototype.toJSON=function(){return{count:this.count,sum:this.sum,sumsq:this.sumsq,tdigestCentroids:pt(this._td),groups:this.groups}};var at,ut=ct;function ct(){var t=null!==at&&at.apply(this,arguments)||this;return t.groups={},t}function pt(t){var e=[],r=[];return t.centroids.each(function(t){e.push(t.mean),r.push(t.n)}),{mean:e,count:r}}var ht=function(){return(ht=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},ft=(lt.prototype._duration=function(){return this.endTime||(this.endTime=new Date),this.endTime.getTime()-this.startTime.getTime()},lt);function lt(t){void 0===t&&(t=""),this.method="",this.route="",this.query="",this.func="",this.file="",this.line=0,this.startTime=new Date,this.query=t}yt.prototype.start=function(t){return new ft(t=void 0===t?"":t)},yt.prototype.notify=function(t){var e,r,n=this;ot&&this._opt.performanceStats&&this._opt.queryStats&&(e=t._duration(),r=new Date(6e4*Math.floor(t.startTime.getTime()/6e4)),t={method:t.method,route:t.route,query:t.query,func:t.func,file:t.file,line:t.line,time:r},r=JSON.stringify(t),(t=this._m[r])||(t=new it,this._m[r]=t),t.add(e),this._timer||(this._timer=setTimeout(function(){n._flush()},15e3)))},yt.prototype._flush=function(){var t,e,r=[];for(t in this._m)this._m.hasOwnProperty(t)&&(e=JSON.parse(t),e=ht(ht({},e),this._m[t].toJSON()),r.push(e));this._m={},this._timer=null;var n=JSON.stringify({environment:this._opt.environment,queries:r}),n={method:"POST",url:this._url,body:n};this._requester(n).then(function(t){}).catch(function(t){console.error&&console.error("can not report queries stats",t)})};var dt=yt;function yt(t){this._m={},this._opt=t,this._url=t.host+"/api/v5/projects/"+t.projectId+"/queries-stats?key="+t.projectKey,this._requester=et(t)}mt=function(t,e){return(mt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)};var mt,vt,_t=function(){return(_t=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},gt=(function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}mt(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}(wt,vt=E),wt);function wt(t){var e=vt.call(this)||this;return e.queue=t,e.startTime=new Date,e}Ot.prototype.notify=function(t){var e,r,n,o=this;ot&&this._opt.performanceStats&&this._opt.queueStats&&(0===(e=t._duration())&&(e=1e-5),r=new Date(6e4*Math.floor(t.startTime.getTime()/6e4)),r={queue:t.queue,time:r},r=JSON.stringify(r),(n=this._m[r])||(n=new ut,this._m[r]=n),n.addGroups(e,t._groups),this._timer||(this._timer=setTimeout(function(){o._flush()},15e3)))},Ot.prototype._flush=function(){var t,e,r=[];for(t in this._m)this._m.hasOwnProperty(t)&&(e=JSON.parse(t),e=_t(_t({},e),this._m[t].toJSON()),r.push(e));this._m={},this._timer=null;var n=JSON.stringify({environment:this._opt.environment,queues:r}),n={method:"POST",url:this._url,body:n};this._requester(n).then(function(t){}).catch(function(t){console.error&&console.error("can not report queues breakdowns",t)})};var bt=Ot;function Ot(t){this._m={},this._opt=t,this._url=t.host+"/api/v5/projects/"+t.projectId+"/queues-stats?key="+t.projectKey,this._requester=et(t)}xt=function(t,e){return(xt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)};var xt,jt,kt=function(){return(kt=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},St=(function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}xt(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}(Et,jt=E),Et);function Et(t,e,r,n){void 0===t&&(t=""),void 0===e&&(e=""),void 0===r&&(r=0),void 0===n&&(n="");var o=jt.call(this)||this;return o.method=t,o.route=e,o.statusCode=r,o.contentType=n,o.startTime=new Date,o}Nt.prototype.notify=function(t){var e,r,n=this;ot&&this._opt.performanceStats&&(e=t._duration(),r=new Date(6e4*Math.floor(t.startTime.getTime()/6e4)),t={method:t.method,route:t.route,statusCode:t.statusCode,time:r},r=JSON.stringify(t),(t=this._m[r])||(t=new it,this._m[r]=t),t.add(e),this._timer||(this._timer=setTimeout(function(){n._flush()},15e3)))},Nt.prototype._flush=function(){var t,e,r=[];for(t in this._m)this._m.hasOwnProperty(t)&&(e=JSON.parse(t),e=kt(kt({},e),this._m[t].toJSON()),r.push(e));this._m={},this._timer=null;var n=JSON.stringify({environment:this._opt.environment,routes:r}),n={method:"POST",url:this._url,body:n};this._requester(n).then(function(t){}).catch(function(t){console.error&&console.error("can not report routes stats",t)})};var Tt=Nt;function Nt(t){this._m={},this._opt=t,this._url=t.host+"/api/v5/projects/"+t.projectId+"/routes-stats?key="+t.projectKey,this._requester=et(t)}Pt.prototype.notify=function(t){var e,r,n,o=this;ot&&this._opt.performanceStats&&(t.statusCode<200||300<=t.statusCode&&t.statusCode<400||404===t.statusCode||0===Object.keys(t._groups).length||(0===(e=t._duration())&&(e=1e-5),r=new Date(6e4*Math.floor(t.startTime.getTime()/6e4)),r={method:t.method,route:t.route,responseType:this._responseType(t),time:r},r=JSON.stringify(r),(n=this._m[r])||(n=new ut,this._m[r]=n),n.addGroups(e,t._groups),this._timer||(this._timer=setTimeout(function(){o._flush()},15e3))))},Pt.prototype._flush=function(){var t,e,r=[];for(t in this._m)this._m.hasOwnProperty(t)&&(e=JSON.parse(t),e=kt(kt({},e),this._m[t].toJSON()),r.push(e));this._m={},this._timer=null;var n=JSON.stringify({environment:this._opt.environment,routes:r}),n={method:"POST",url:this._url,body:n};this._requester(n).then(function(t){}).catch(function(t){console.error&&console.error("can not report routes breakdowns",t)})},Pt.prototype._responseType=function(t){if(500<=t.statusCode)return"5xx";if(400<=t.statusCode)return"4xx";if(!t.contentType)return"";t=t.contentType.split(";")[0].split("/");return t[t.length-1]};var At=Pt;function Pt(t){this._m={},this._opt=t,this._url=t.host+"/api/v5/projects/"+t.projectId+"/routes-breakdowns?key="+t.projectKey,this._requester=et(t)}var qt="airbrake-js/browser",Rt=function(){return(Rt=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Lt={notifier_name:qt,notifier_version:"2.1.7",os:"undefined"!=typeof window&&window.navigator&&window.navigator.userAgent?window.navigator.userAgent:void 0,language:"JavaScript"},Dt=(r.prototype.poll=function(){var t=this,e=setInterval(function(){t._doRequest(),clearInterval(e)},0);return setInterval(this._doRequest.bind(this),6e5)},r.prototype._doRequest=function(){var e=this;this._requester(this._requestParams(this._opt)).then(function(t){e._data.merge(t.json),e._opt.host=e._data.errorHost(),e._opt.apmHost=e._data.apmHost(),e._processErrorNotifications(e._data),e._processPerformanceStats(e._data)}).catch(function(t){})},r.prototype._requestParams=function(t){return{method:"GET",url:this._pollUrl(t),headers:{Accept:"application/json","Cache-Control":"no-cache,no-store"}}},r.prototype._pollUrl=function(t){for(var t=this._data.configRoute(t.remoteConfigHost),e="?",r=0,n=this._entries(Lt);r<n.length;r++){var o=n[r],i=o[0],o=o[1];e+="&"+encodeURIComponent(i)+"="+encodeURIComponent(o)}return t+e},r.prototype._processErrorNotifications=function(t){this._origErrorNotifications&&(this._opt.errorNotifications=t.errorNotifications())},r.prototype._processPerformanceStats=function(t){this._origPerformanceStats&&(this._opt.performanceStats=t.performanceStats())},r.prototype._entries=function(t){for(var e=Object.keys(t),r=e.length,n=new Array(r);r--;)n[r]=[e[r],t[e[r]]];return n},r);function r(t){this._opt=t,this._requester=et(t),this._data=new Ct(t.projectId,{project_id:null,poll_sec:0,updated_at:0,config_route:"",settings:[]}),this._origErrorNotifications=t.errorNotifications,this._origPerformanceStats=t.performanceStats}n.prototype.merge=function(t){this._data=Rt(Rt({},this._data),t)},n.prototype.configRoute=function(t){var t=t.replace(/\/$/,""),e=this._data.config_route;return null==e||""===e?t+"/2020-06-18/config/"+this._projectId+"/config.json":t+"/"+e},n.prototype.errorNotifications=function(){var t=this._findSetting("errors");return null===t||t.enabled},n.prototype.performanceStats=function(){var t=this._findSetting("apm");return null===t||t.enabled},n.prototype.errorHost=function(){var t=this._findSetting("errors");return null===t?null:t.endpoint},n.prototype.apmHost=function(){var t=this._findSetting("apm");return null===t?null:t.endpoint},n.prototype._findSetting=function(e){var t=this._data.settings;if(null==t)return null;t=t.find(function(t){return t.name===e});return void 0===t?null:t};var Ct=n;function n(t,e){this._projectId=t,this._data=e}var It=function(){return(It=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},$=(o.prototype.close=function(){for(var t=0,e=this._onClose;t<e.length;t++)(0,e[t])()},o.prototype.scope=function(){return this._scope},o.prototype.setActiveScope=function(t){this._scope=t},o.prototype.addFilter=function(t){this._filters.push(t)},o.prototype.addPerformanceFilter=function(t){this._performanceFilters.push(t)},o.prototype.notify=function(t){var e={errors:[],context:It(It({severity:"error"},this.scope().context()),t.context),params:t.params||{},environment:t.environment||{},session:t.session||{}};if("object"==typeof t&&void 0!==t.error||(t={error:t}),!this._opt.errorNotifications)return e.error=new Error("airbrake: not sending this error, errorNotifications is disabled err="+JSON.stringify(t.error)),i.resolve(e);if(!t.error)return e.error=new Error("airbrake: got err="+JSON.stringify(t.error)+", wanted an Error"),i.resolve(e);t=this._processor(t.error);e.errors.push(t);for(var r=0,n=this._filters;r<n.length;r++){var o=(0,n[r])(e);if(null===o)return e.error=new Error("airbrake: error is filtered"),i.resolve(e);e=o}return e.context||(e.context={}),e.context.language="JavaScript",this._sendNotice(e)},o.prototype._sendNotice=function(e){var t=g(e,{keysBlocklist:this._opt.keysBlocklist});if(this._opt.reporter){if("function"==typeof this._opt.reporter)return this._opt.reporter(e);console.warn("airbrake: options.reporter must be a function")}t={method:"POST",url:this._url,body:t};return this._requester(t).then(function(t){return e.id=t.json.id,e.url=t.json.url,e}).catch(function(t){return e.error=t,e})},o.prototype.wrap=function(r,t){if(void 0===t&&(t=[]),r._airbrake)return r;function e(){var e=Array.prototype.slice.call(arguments),t=n._wrapArguments(e);try{return r.apply(this,t)}catch(t){throw n.notify({error:t,params:{arguments:e}}),n._ignoreNextWindowError(),t}}var n=this;for(s in r)r.hasOwnProperty(s)&&(e[s]=r[s]);for(var o=0,i=t;o<i.length;o++){var s=i[o];r.hasOwnProperty(s)&&(e[s]=r[s])}return e._airbrake=!0,e.inner=r,e},o.prototype._wrapArguments=function(t){for(var e=0;e<t.length;e++){var r=t[e];"function"==typeof r&&(t[e]=this.wrap(r))}return t},o.prototype._ignoreNextWindowError=function(){},o.prototype.call=function(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];return this.wrap(t).apply(this,Array.prototype.slice.call(arguments,1))},o);function o(t){var r,n,e,o=this;if(this._filters=[],this._performanceFilters=[],this._scope=new q,this._onClose=[],!t.projectId||!t.projectKey)throw new Error("airbrake: projectId and projectKey are required");this._opt=t,this._opt.host=this._opt.host||"https://api.airbrake.io",this._opt.remoteConfigHost=this._opt.remoteConfigHost||"https://notifier-configs.airbrake.io",this._opt.apmHost=this._opt.apmHost||"https://api.airbrake.io",this._opt.timeout=this._opt.timeout||1e4,this._opt.keysBlocklist=this._opt.keysBlocklist||[/password/,/secret/],this._url=this._opt.host+"/api/v3/projects/"+this._opt.projectId+"/notices?key="+this._opt.projectKey,this._opt.errorNotifications=!1!==this._opt.errorNotifications,this._opt.performanceStats=!1!==this._opt.performanceStats,this._opt.queryStats=!1!==this._opt.queryStats,this._opt.queueStats=!1!==this._opt.queueStats,this._opt.remoteConfig=!1!==this._opt.remoteConfig,this._processor=this._opt.processor||F,this._requester=et(this._opt),this.addFilter(H),this.addFilter(function(t){var e=JSON.stringify(t.errors);return e===r?null:(n&&clearTimeout(n),r=e,n=setTimeout(function(){r=""},1e3),t)}),this.addFilter(z),this.addFilter(M),this.addFilter(function(t){return t.context.notifier={name:qt,version:"2.1.7",url:"https://github.com/airbrake/airbrake-js/tree/master/packages/browser"},o._opt.environment&&(t.context.environment=o._opt.environment),t}),this.routes=new Ft(this),this.queues=new Mt(this),this.queries=new dt(this._opt),this._opt.remoteConfig&&(e=new Dt(this._opt).poll(),this._onClose.push(function(){return clearInterval(e)}))}Bt.prototype.start=function(t,e,r,n){r=new St(t=void 0===t?"":t,e=void 0===e?"":e,r=void 0===r?0:r,n=void 0===n?"":n);if(!this._opt.performanceStats)return r;n=this._notifier.scope().clone();return n.setContext({httpMethod:t,route:e}),n.setRouteMetric(r),this._notifier.setActiveScope(n),r},Bt.prototype.notify=function(t){if(this._opt.performanceStats){t.end();for(var e=0,r=this._notifier._performanceFilters;e<r.length;e++)if(null===(0,r[e])(t))return;this._routes.notify(t),this._breakdowns.notify(t)}};var Ft=Bt;function Bt(t){this._notifier=t,this._routes=new Tt(t._opt),this._breakdowns=new At(t._opt),this._opt=t._opt}Ut.prototype.start=function(t){var e=new gt(t);if(!this._opt.performanceStats)return e;var r=this._notifier.scope().clone();return r.setContext({queue:t}),r.setQueueMetric(e),this._notifier.setActiveScope(r),e},Ut.prototype.notify=function(t){this._opt.performanceStats&&(t.end(),this._queues.notify(t))};var Mt=Ut;function Ut(t){this._notifier=t,this._queues=new bt(t._opt),this._opt=t._opt}function Ht(t){return window.navigator&&window.navigator.userAgent&&(t.context.userAgent=window.navigator.userAgent),window.location&&(t.context.url=String(window.location),t.context.rootDirectory=window.location.protocol+"//"+window.location.host),t}var Jt=["debug","log","info","warn","error"];function zt(o){for(var t=function(r){if(!(r in console))return"continue";function t(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];n.apply(console,t),o.scope().pushHistory({type:"log",severity:r,arguments:t})}var n=console[r];t.inner=n,console[r]=t},e=0,r=Jt;e<r.length;e++)t(r[e])}var $t=["type","name","src"];function Gt(t){r=t;var r,e=function(e){var t=Wt(e,"target");if(t){e={type:e.type};try{e.target=function(t){var e=[],r=t;for(;r;){var n=function(t){if(!t)return"";var e=[];t.tagName&&e.push(t.tagName.toLowerCase());t.id&&(e.push("#"),e.push(t.id));{var r;t.classList&&Array.from?(e.push("."),e.push(Array.from(t.classList).join("."))):!t.className||""!==(r=function(t){if(t.split)return t.split(" ").join(".");if(t.baseVal&&t.baseVal.split)return t.baseVal.split(" ").join(".");return console.error("unsupported HTMLElement.className type",typeof t),""}(t.className))&&(e.push("."),e.push(r))}if(t.getAttribute)for(var n=0,o=$t;n<o.length;n++){var i=o[n],s=t.getAttribute(i);s&&e.push("["+i+'="'+s+'"]')}return e.join("")}(r);if(""!==n&&(e.push(n),10<e.length))break;r=r.parentNode}return 0!==e.length?e.reverse().join(" > "):String(t)}(t)}catch(t){e.target="<"+String(t)+">"}r.scope().pushHistory(e)}};window.addEventListener&&(window.addEventListener("load",e),window.addEventListener("error",function(t){Wt(t,"error")||e(t)},!0)),"object"==typeof document&&document.addEventListener&&(document.addEventListener("DOMContentLoaded",e),document.addEventListener("click",e),document.addEventListener("keypress",e))}function Wt(t,e){try{return t[e]}catch(t){return null}}var Xt="";function Kt(){return document.location&&document.location.pathname}function Vt(t,e){var r=e.indexOf("://");0<=r?e=0<=(r=(e=e.slice(r+3)).indexOf("/"))?e.slice(r):"/":"/"!==e.charAt(0)&&(e="/"+e),t.scope().pushHistory({type:"location",from:Xt,to:e}),Xt=e}function Qt(i){var s=XMLHttpRequest.prototype.open,e=(XMLHttpRequest.prototype.open=function(t,e,r,n,o){0===i._ignoreNextXHR&&(this.__state={type:"xhr",method:t,url:e}),s.apply(this,arguments)},XMLHttpRequest.prototype.send);XMLHttpRequest.prototype.send=function(t){var n=this.onreadystatechange;return this.onreadystatechange=function(t){var e,r;if(4===this.readyState&&this.__state&&((r=(e=this).__state).statusCode=e.status,r.duration=(new Date).getTime()-r.date.getTime(),i.scope().pushHistory(r)),n)return n.apply(this,arguments)},this.__state&&(this.__state.date=new Date),e.apply(this,arguments)}}Yt=function(t,e){return(Yt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)};var Yt,Zt,te=function(){return(te=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},G=(function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}Yt(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}(s,Zt=$),s.prototype._instrument=function(t){var e,r,n,o,i,s,a,u;void 0===(t=void 0===t?{}:t).console&&(t.console=!((e=this._opt.environment)&&e.startsWith&&e.startsWith("dev"))),ee(t.onerror)&&(r=this,n=window.onerror,window.onerror=function(){n&&n.apply(this,arguments),r.onerror.apply(r,arguments)}),Gt(this),ee(t.fetch)&&"function"==typeof fetch&&(o=this,i=window.fetch,window.fetch=function(t,e){var r={type:"xhr",date:new Date};return r.method=e&&e.method?e.method:"GET","string"==typeof t?r.url=t:(r.method=t.method,r.url=t.url),o._ignoreNextXHR++,setTimeout(function(){return o._ignoreNextXHR--}),i.apply(this,arguments).then(function(t){return r.statusCode=t.status,r.duration=(new Date).getTime()-r.date.getTime(),o.scope().pushHistory(r),t}).catch(function(t){throw r.error=t,r.duration=(new Date).getTime()-r.date.getTime(),o.scope().pushHistory(r),t})}),ee(t.history)&&"object"==typeof history&&(s=this,Xt=Kt(),a=window.onpopstate,window.onpopstate=function(t){var e=Kt();if(e&&Vt(s,e),a)return a.apply(this,arguments)},u=history.pushState,history.pushState=function(t,e,r){r&&Vt(s,r.toString()),u.apply(this,arguments)}),ee(t.console)&&"object"==typeof console&&zt(this),ee(t.xhr)&&"undefined"!=typeof XMLHttpRequest&&Qt(this)},s.prototype.notify=function(n){var o=this;return this.offline?new i(function(t,e){for(o.todo.push({err:n,resolve:t,reject:e});100<o.todo.length;){var r=o.todo.shift();if(void 0===r)break;r.resolve({error:new Error("airbrake: offline queue is too large")})}}):Zt.prototype.notify.call(this,n)},s.prototype.onOnline=function(){this.offline=!1;for(var t=this,e=0,r=this.todo;e<r.length;e++)!function(e){t.notify(e.err).then(function(t){e.resolve(t)})}(r[e]);this.todo=[]},s.prototype.onOffline=function(){this.offline=!0},s.prototype.onUnhandledrejection=function(t){var e,t=t.reason||t.detail&&t.detail.reason;t&&((e=t.message||String(t)).indexOf&&0===e.indexOf("airbrake: ")||("object"==typeof t&&void 0!==t.error?this.notify(te(te({},t),{context:{unhandledRejection:!0}})):this.notify({error:t,context:{unhandledRejection:!0}})))},s.prototype.onerror=function(t,e,r,n,o){0<this._ignoreWindowError||(o?this.notify({error:o,context:{windowError:!0}}):e&&r&&this.notify({error:{message:t,fileName:e,lineNumber:r,columnNumber:n,noStack:!0},context:{windowError:!0}}))},s.prototype._ignoreNextWindowError=function(){var t=this;this._ignoreWindowError++,setTimeout(function(){return t._ignoreWindowError--})},s);function s(t){var e=Zt.call(this,t)||this;return e.offline=!1,e.todo=[],e._ignoreWindowError=0,e._ignoreNextXHR=0,"undefined"==typeof window||(e.addFilter(Ht),window.addEventListener&&(e.onOnline=e.onOnline.bind(e),window.addEventListener("online",e.onOnline),e.onOffline=e.onOffline.bind(e),window.addEventListener("offline",e.onOffline),e.onUnhandledrejection=e.onUnhandledrejection.bind(e),window.addEventListener("unhandledrejection",e.onUnhandledrejection),e._onClose.push(function(){window.removeEventListener("online",e.onOnline),window.removeEventListener("offline",e.onOffline),window.removeEventListener("unhandledrejection",e.onUnhandledrejection)})),e._instrument(t.instrumentation)),e}function ee(t){return void 0===t||!0===t}function re(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function a(t,e){e=oe(t,e,"get");return e.get?e.get.call(t):e.value}function ne(t,e,r){var e=oe(t,e,"set"),n=r;if(e.set)e.set.call(t,n);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=n}return r}function oe(t,e,r){if(!e.has(t))throw new TypeError("attempted to "+r+" private field on non-instance");return e.get(t)}function ie(t,e,r){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return r}function se(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function ae(t,e,r){se(t,e),e.set(t,r)}function ue(t,e){se(t,e),e.add(t)}var ce=[" daum[\\s/]"," deusu/","(?:^|\\s)site","@[a-z]","\\(at\\)[a-z]","\\(github\\.com/","\\[at\\][a-z]","^12345","^<","^[\\w\\s\\.]+/v?\\d+(\\.\\d+)?(\\.\\d{1,10})?$","^[\\w]+$","^ace explorer","^acoon","^active","^ad muncher","^anglesharp/","^anonymous","^apple-pubsub/","^astute srm","^avsdevicesdk/","^axios/","^bidtellect/","^biglotron","^blackboard safeassign","^blocknote.net","^braze sender","^captivenetworksupport","^castro","^clamav[\\s/]","^cobweb/","^coccoc","^dap ","^ddg[_-]android","^discourse","^dispatch/\\d","^downcast/","^duckduckgo","^email","^enigma browser","^evernote clip resolver","^facebook","^faraday","^fdm[\\s/]\\d","^getright/","^gozilla/","^hatena","^hobbit","^hotzonu","^hwcdn/","^infox-wisg","^invision","^jeode/","^jetbrains","^jetty/","^jigsaw","^linkdex","^lwp[-:\\s]","^mailchimp\\.com$","^metauri","^microsoft bits","^microsoft data","^microsoft office existence","^microsoft office protocol discovery","^microsoft windows network diagnostics","^microsoft-cryptoapi","^microsoft-webdav-miniredir","^movabletype","^mozilla/\\d\\.\\d \\(compatible;?\\)$","^my browser$","^navermailapp","^netsurf","^node-superagent","^octopus","^offline explorer","^pagething","^panscient","^perimeterx","^php","^postman","^postrank","^python","^read","^reed","^restsharp/","^shareaza","^shockwave flash","^snapchat","^space bison","^sprinklr","^svn","^swcd ","^t-online browser","^taringa","^test certificate info","^the knowledge ai","^thinklab","^thumbor/","^traackr.com","^tumblr/","^vbulletin","^venus/fedoraplanet","^w3c","^webbandit/","^webcopier","^wget","^whatsapp","^www-mechanize","^xenu link sleuth","^yahoo","^yandex","^zdm/\\d","^zeushdthree","adbeat\\.com","appinsights","archive","ask jeeves/teoma","bit\\.ly/","bluecoat drtr","bot","browsex","burpcollaborator","capture","catch","check","chrome-lighthouse","chromeframe","client","cloud","crawl","daemon","dareboost","datanyze","dataprovider","dejaclick","dmbrowser","download","evc-batch/","feed","fetch","firephp","freesafeip","ghost","gomezagent","google","headlesschrome/","http","httrack","hubspot marketing grader","hydra","ibisbrowser","images","index","ips-agent","java","jorgee","library","mail\\.ru/","manager","monitor","neustar wpm","news","nutch","offbyone","optimize","pagespeed","parse","perl","phantom","pingdom","powermarks","preview","probe","proxy","ptst[\\s/]\\d","reader","rexx;","rigor","rss","scan","scrape","search","server","sogou","sparkler/","spider","statuscake","stumbleupon\\.com","supercleaner","synapse","synthetic","toolbar","torrent","tracemyfile","transcoder","trendsmapresolver","twingly recon","url","valid","virtuoso","wappalyzer","webglance","webkit2png","websitemetadataretriever","whatcms/","wordpress","zgrab"];!function(t){try{new RegExp("(?<! cu)bot").test("dangerbot")}catch(t){return}t.splice(t.lastIndexOf("bot"),1),t.push("(?<! cu)bot"),t.splice(t.lastIndexOf("google"),1),t.push("(?<! (channel\\/|google\\/))google(?!(app|\\/google))"),t.splice(t.lastIndexOf("search"),1),t.push("(?<! (ya|yandex))search"),t.splice(t.lastIndexOf("http"),1),t.push("(?<!(lib))http"),t.splice(t.lastIndexOf("java"),1),t.push("java(?!;)"),t.splice(t.lastIndexOf("fetch"),1),t.push("(?<!(mozac))fetch")}(ce);var pe="i",u=new WeakMap,he=new WeakMap,fe=new WeakSet,le=new WeakSet;function de(){ne(this,he,new RegExp(a(this,u).join("|"),pe))}function ye(t){return a(this,u).indexOf(t.toLowerCase())}var me=new(function(){function e(t){var o=this;if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");ue(this,le),ue(this,fe),ae(this,u,{writable:!0,value:void 0}),ae(this,he,{writable:!0,value:void 0}),ne(this,u,t||ce.slice()),ie(this,fe,de).call(this);return Object.defineProperties(function(t){return o.test(t)},Object.getOwnPropertyNames(e.prototype).filter(function(t){return!["constructor"].includes(t)}).reduce(function(t,e){return Object.assign(t,(t={get:function(){return o[e].bind(o)}},(n=e)in(r={})?Object.defineProperty(r,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[n]=t,r));var r,n},{}))}var t,r,n;return t=e,(r=[{key:"test",value:function(t){return Boolean(t)&&a(this,he).test(t)}},{key:"find",value:function(){var t=(0<arguments.length&&void 0!==arguments[0]?arguments[0]:"").match(a(this,he));return t&&t[0]}},{key:"matches",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"";return a(this,u).filter(function(t){return new RegExp(t,pe).test(e)})}},{key:"clear",value:function(){this.exclude(this.matches(0<arguments.length&&void 0!==arguments[0]?arguments[0]:""))}},{key:"extend",value:function(){var e=this,t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[];[].push.apply(a(this,u),t.filter(function(t){return-1===ie(e,le,ye).call(e,t)}).map(function(t){return t.toLowerCase()})),ie(this,fe,de).call(this)}},{key:"exclude",value:function(){for(var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[],e=t.length;e--;){var r=ie(this,le,ye).call(this,t[e]);-1<r&&a(this,u).splice(r,1)}ie(this,fe,de).call(this)}},{key:"spawn",value:function(t){return new e(t||a(this,u))}}])&&re(t.prototype,r),n&&re(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}());const ve={messages:["null is not an object (evaluating 'elt.parentNode')","DealPly is not defined","Object doesn't support property or method 'engn'","Cannot read property 'campaign' of undefined","network error","NetworkError","Extension context invalidated","Failed to execute","TypeError: (?P<func>.+) is not a function"],urls:["C:/","D:/","E:/","F:/","G:/","H:/","I:/","W:/","U:/","Y:/","Z:/","/Users/","/Desktop/","/Documents/","https://link.springer.xilesou.top","https://webvpn.nwu.edu.cn","chrome-extension"],backtraces:["chrome-extension","https://cdn.permutive.com/"]},_e=(t,e)=>t.some(t=>-1<e.indexOf(t));{const ge=new G({projectId:131537,projectKey:"8e58e2dfb7e36260114f620c9adcadcb",environment:(()=>{var e=window.dataLayer[0];if(e){let t="Production";return e.page&&e.page.attributes&&e.page.attributes&&((e=e.page.attributes.environment)&&"live"!==e&&(t="Test")),t}})()});ge.addFilter(t=>{return me(window.navigator.userAgent)||(e=>{let n=!1;var t=ve.urls.some(t=>-1<e.context.url.indexOf(t));return(n=t?!0:n)||e.errors.forEach(t=>{var e=_e(ve.messages,t.message);let r=!1;t.backtrace.forEach(t=>{_e(ve.backtraces,t.file)&&(r=!0)}),(e||r)&&(n=!0)}),n})(t)?null:(t.context.rev="js/airbrake-es6-bundle-210e2dfaaa.js",t.context.buildDateTime="Fri Oct 13 2023 15:59:27 GMT+0000 (Coordinated Universal Time)",t)}),ge}}();
//# sourceMappingURL=airbrake-es5-bundle-d56e7bd9a7.js.map