retropilot-server/cabana/83feda798dbec03978d2.worker.js

2 lines
116 KiB
JavaScript

!function(t){var e={};function __webpack_require__(r){if(e[r])return e[r].exports;var n=e[r]={i:r,l:!1,exports:{}};return t[r].call(n.exports,n,n.exports,__webpack_require__),n.l=!0,n.exports}__webpack_require__.m=t,__webpack_require__.c=e,__webpack_require__.d=function(t,e,r){__webpack_require__.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},__webpack_require__.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},__webpack_require__.t=function(t,e){if(1&e&&(t=__webpack_require__(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(__webpack_require__.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)__webpack_require__.d(r,n,function(e){return t[e]}.bind(null,n));return r},__webpack_require__.n=function(t){var e=t&&t.__esModule?function getDefault(){return t.default}:function getModuleExports(){return t};return __webpack_require__.d(e,"a",e),e},__webpack_require__.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},__webpack_require__.p="/cabana/",__webpack_require__(__webpack_require__.s=20)}([function(t,e,r){"use strict";function _slicedToArray(t,e){return function _arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function _iterableToArrayLimit(t,e){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t)){var r=[],n=!0,i=!1,a=void 0;try{for(var o,s=t[Symbol.iterator]();!(n=(o=s.next()).done)&&(r.push(o.value),!e||r.length!==e);n=!0);}catch(u){i=!0,a=u}finally{try{n||null==s.return||s.return()}finally{if(i)throw a}}return r}}(t,e)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}r.d(e,"a",(function(){return _slicedToArray}))},function(t,e,r){"use strict";(function(t){var n=r(5);function ownKeys(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function createMessageSpec(t,e,r,n){var i=t.getMessageFrame(e),a=i?i.size:8;return{address:e,id:r,bus:n,entries:[],frame:i,byteColors:Array(a).fill(0),byteStateChangeCounts:Array(a).fill(0)}}function determineByteStateChangeTimes(t,e,r,n){var i,a=Array(r).fill(0);if(n){i=n.byteStateChangeTimes;for(var o=0;o<i.length;o++){t.substr(2*o,2)!==n.hexData.substr(2*o,2)&&(i[o]=e,a[o]=1)}}else i=Array(r).fill(e);return{byteStateChangeTimes:i,byteStateChangeCounts:a}}function createMessageEntry(e,r,n,i,a,o){return{signals:e.getSignalValues(r,a),address:r,data:a,time:n,relTime:i,hexData:t.from(a).toString("hex"),byteStateChangeTimes:o,updated:Date.now()}}function parseMessage(e,r,n,i,a,o){var s;"string"===typeof i?(s=i,i=t.from(i,"hex")):s=t.from(i).toString("hex");var u=e.getMessageFrame(n),c=r-a,l=determineByteStateChangeTimes(s,c,u?u.size:8,o),f=l.byteStateChangeTimes,h=l.byteStateChangeCounts;return{msgEntry:createMessageEntry(e,n,r,c,i,f),byteStateChangeCounts:h}}for(var i=[],a=0;a<64;a+=8)for(var o=7;o>-1;o--)i.push(a+o);e.a={bigEndianBitIndex:function bigEndianBitIndex(t){return i.indexOf(t)},addCanMessage:function addCanMessage(t,e,r,n,i,a){var o=t.address,s=t.busTime,u=t.data,c=t.bus,l="".concat(c,":").concat(o.toString(16));void 0===n[l]&&(n[l]=createMessageSpec(e,o,l,c));var f=n[l].entries.length>0?n[l].entries[n[l].entries.length-1]:i[l]||null;a[l]&&n[l].byteStateChangeCounts.every((function(t){return 0===t}))&&(n[l].byteStateChangeCounts=a[l]);var h=parseMessage(e,s,o,u,r,f),p=h.msgEntry,d=h.byteStateChangeCounts;return n[l].byteStateChangeCounts=d.map((function(t,e){return n[l].byteStateChangeCounts[e]+t})),n[l].entries.push(p),p},createMessageSpec:createMessageSpec,matrixBitNumber:function matrixBitNumber(t){return i[t]},parseMessage:parseMessage,reparseMessage:function reparseMessage(t,e,r){var i=t.getMessageFrame(e.address),a=i?i.size:8,o=determineByteStateChangeTimes(e.hexData,e.relTime,a,r),s=o.byteStateChangeTimes,u=o.byteStateChangeCounts;return{msgEntry:function _objectSpread(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ownKeys(r,!0).forEach((function(e){Object(n.a)(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ownKeys(r).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},e,{signals:t.getSignalValues(e.address,e.data),byteStateChangeTimes:s,updated:Date.now()}),byteStateChangeCounts:u}},findMaxByteStateChangeCount:function findMaxByteStateChangeCount(t){return Object.values(t).map((function(t){return t.byteStateChangeCounts})).reduce((function(t,e){return t.concat(e)}),[]).reduce((function(t,e){return t>e?t:e}),0)},setMessageByteColors:function setMessageByteColors(t,e){return t.byteColors=t.byteStateChangeCounts.map((function(t){return isNaN(t)?0:Math.min(255,75+t/e*180)})).map((function(t){return"rgb(".concat(Math.round(t),",0,0)")})),t},createMessageEntry:createMessageEntry}}).call(this,r(10).Buffer)},function(t,e,r){"use strict";function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}r.d(e,"a",(function(){return _classCallCheck}))},function(t,e,r){"use strict";function _defineProperties(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 _createClass(t,e,r){return e&&_defineProperties(t.prototype,e),r&&_defineProperties(t,r),t}r.d(e,"a",(function(){return _createClass}))},function(t,e){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(n){"object"===typeof window&&(r=window)}t.exports=r},function(t,e,r){"use strict";function _defineProperty(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}r.d(e,"a",(function(){return _defineProperty}))},function(t,e,r){"use strict";r.d(e,"a",(function(){return a}));var n=r(2),i=r(3),a=function(){function Frame(t){var e=t.name,r=t.id,i=void 0===r?0:r,a=t.size,o=void 0===a?0:a,s=t.transmitters,u=void 0===s?[]:s,c=t.extended,l=void 0===c?0:c,f=t.comment,h=void 0===f?null:f,p=t.signals,d=void 0===p?{}:p;Object(n.a)(this,Frame),Object.assign(this,{name:e,id:i,size:o,transmitters:u,extended:l,comment:h,signals:d})}return Object(i.a)(Frame,[{key:"nextNewTransmitterName",value:function nextNewTransmitterName(){var t,e=1;do{t="NEW_TRANSMITTER_".concat(e),e++}while(-1!==this.transmitters.indexOf(t));return t}},{key:"addTransmitter",value:function addTransmitter(){var t=this.nextNewTransmitterName();return this.transmitters.push(t),t}},{key:"header",value:function header(){return"BO_ ".concat(this.id," ").concat(this.name,": ").concat(this.size," ")+"".concat(this.transmitters[0]||"XXX")}},{key:"text",value:function text(){var t=Object.values(this.signals).map((function(t){return" ".concat(t.text())})).join("\n");return t.length>0?"".concat(this.header(),"\n").concat(t):this.header()}},{key:"copy",value:function copy(){var copy=Object.assign(Object.create(this),this);return copy}}]),Frame}()},function(t,e,r){"use strict";if("undefined"===typeof n)var n=self;var i=function _indexOf(t,e){for(var r=0;r<t.length;r++)if(e===t[r])return r;return-1},a=function _getAjaxObject(){return"undefined"!==typeof XDomainRequest?new XDomainRequest:new XMLHttpRequest};function LogStream(t){var e,r=t.trace?(Math.random()+Math.PI).toString(36).substring(2,10):null,o=t.page_info,s=t.token,u=t.print,c=t.no_format,l="undefined"===typeof XDomainRequest?t.ssl:"https:"===n.location.protocol;e=(l?"https://":"http://")+(e=n.LEENDPOINT?n.LEENDPOINT:c?"webhook.logentries.com/noformat":"js.logentries.com/v1")+"/logs/"+s;var f=[],h=!1,p=!1,d=function _apiCall(t,r){h=!0;var n=a();n.constructor===XMLHttpRequest?n.onreadystatechange=function(){4===n.readyState&&(n.status>=400?(console.error("Couldn't submit events."),410===n.status&&console.warn("This version of le_js is no longer supported!")):(301===n.status&&console.warn("This version of le_js is deprecated! Consider upgrading."),f.length>0?_apiCall(t,f.shift()):h=!1))}:n.onload=function(){f.length>0?_apiCall(t,f.shift()):h=!1},n.open("POST",e,!0),n.constructor===XMLHttpRequest&&(n.setRequestHeader("X-Requested-With","XMLHttpRequest"),n.setRequestHeader("Content-type","application/json")),n.overrideMimeType&&n.overrideMimeType("text"),n.send(r)},g=function _getEvent(){var t=Array.prototype.slice.call(arguments);if(0===t.length)throw new Error("No arguments!");return 1===t.length?t[0]:t},m=function _agentInfo(){var t=n.navigator||{doNotTrack:void 0},e=n.screen||{};return{url:(n.location||{}).pathname,referrer:document.referrer,screen:{width:e.width,height:e.height},window:{width:n.innerWidth,height:n.innerHeight},browser:{name:t.appName,version:t.appVersion,cookie_enabled:t.cookieEnabled,do_not_track:t.doNotTrack},platform:t.platform}},_=function _rawLog(t){var e=g.apply(this,arguments),n={event:e};return"never"!==o&&(p&&"per-entry"!==o||(p=!0,"undefined"===typeof e.screen&&"undefined"===typeof e.browser&&_rawLog(m()).level("PAGE").send())),r&&(n.trace=r),{level:function level(t){if(u&&"undefined"!==typeof console&&"PAGE"!==t){var e=null;"undefined"!==typeof XDomainRequest&&(e=n.trace+" "+n.event);try{console[t.toLowerCase()].call(console,e||n)}catch(r){console.log(e||n)}}return n.level=t,{send:function send(){var t=[],e=JSON.stringify(n,(function(e,r){if("undefined"===typeof r)return"undefined";if("object"===typeof r&&null!==r){if(-1!==i(t,r))return"<?>";t.push(r)}return r}));h?f.push(e):d(s,e)}}}}};if(t.catchall){var v=n.onerror;n.onerror=function newHandler(t,e,r){return _({error:t,line:r,location:e}).level("ERROR").send(),!!v&&v(t,e,r)}}this.log=_}function Logger(t){var e,r={ssl:!0,catchall:!1,trace:!0,page_info:"never",print:!1,endpoint:null,token:null};if("object"!==typeof t)throw new Error("Invalid parameters for createLogStream()");for(var n in t)r[n]=t[n];if(null===r.token)throw new Error("Token not present.");e=new LogStream(r);var i=function _log(t){if(e)return e.log.apply(this,arguments);throw new Error("You must call LE.init(...) first.")};return{log:function log(){i.apply(this,arguments).level("LOG").send()},warn:function warn(){i.apply(this,arguments).level("WARN").send()},error:function error(){i.apply(this,arguments).level("ERROR").send()},info:function info(){i.apply(this,arguments).level("INFO").send()}}}var o={},s=function _createLogStream(t){if("string"!==typeof t.name)throw new Error("Name not present.");if(o.hasOwnProperty(t.name))throw new Error("A logger with that name already exists!");return o[t.name]=new Logger(t),!0};e.a={init:function _deprecatedInit(t){var e={name:"default"};if("object"===typeof t)for(var r in t)e[r]=t[r];else{if("string"!==typeof t)throw new Error("Invalid parameters for init()");e.token=t}return s(e)},createLogStream:s,to:function _getLogger(t){if(!o.hasOwnProperty(t))throw new Error("Invalid name for logStream");return o[t]},destroy:function _destroyLogStream(t){"undefined"===typeof t&&(t="default"),delete o[t]},log:function log(){for(var t in o)o[t].log.apply(this,arguments)},warn:function warn(){for(var t in o)o[t].warn.apply(this,arguments)},error:function error(){for(var t in o)o[t].error.apply(this,arguments)},info:function info(){for(var t in o)o[t].info.apply(this,arguments)}}},function(t,e,r){"use strict";r.d(e,"a",(function(){return c}));var n=r(0),i=r(2),a=r(3),o=r(18),s=r.n(o),u=r(1),c=function(){function Signal(t){var e=t.name,r=t.startBit,n=void 0===r?0:r,a=t.size,o=void 0===a?0:a,s=t.isLittleEndian,u=void 0===s||s,c=t.isSigned,l=void 0!==c&&c,f=t.isFloat,h=void 0!==f&&f,p=t.factor,d=void 0===p?1:p,g=t.offset,m=void 0===g?0:g,_=t.unit,v=void 0===_?"":_,y=t.receiver,b=void 0===y?["XXX"]:y,w=t.comment,E=void 0===w?null:w,S=t.multiplex,B=void 0===S?null:S,x=t.min,O=void 0===x?null:x,T=t.max,k=void 0===T?null:T,I=t.valueDescriptions,C=void 0===I?new Map:I;Object(i.a)(this,Signal),Object.assign(this,{name:e,startBit:n,size:o,isLittleEndian:u,isSigned:l,isFloat:h,factor:d,offset:m,unit:v,receiver:b,comment:E,multiplex:B,valueDescriptions:C});var U=Math.random().toString(36);null==O&&(O=this.calculateMin()),null==k&&(k=this.calculateMax());var R=this.generateColors();Object.assign(this,{min:O,max:k,uid:U,_colors:R}),Object.defineProperty(this,"colors",{get:function get(){return console.error("Something is still using the old colors"),R},enumberable:!1})}return Object(a.a)(Signal,[{key:"text",value:function text(){var t=this.multiplex?" ".concat(this.multiplex):"",e=this.isLittleEndian?1:0,r=this.isSigned?"-":"+";return"SG_ ".concat(this.name).concat(t," : ")+"".concat(this.startBit,"|").concat(this.size,"@").concat(e).concat(r)+" (".concat(this.factor,",").concat(this.offset,")")+" [".concat(this.min,"|").concat(this.max,"]")+' "'.concat(this.unit,'" ').concat(this.receiver)}},{key:"valueDescriptionText",value:function valueDescriptionText(t){var e=Array.from(this.valueDescriptions.entries()).reduce((function(t,e){var r=Object(n.a)(e,2),i=r[0],a=r[1];return"".concat(t+i,' "').concat(a,'" ')}),"");return"VAL_ ".concat(t," ").concat(this.name," ").concat(e,";")}},{key:"lsbBitIndex",value:function lsbBitIndex(){if(this.isLittleEndian)return this.startBit;var t=this.lsbBitNumber();return u.a.matrixBitNumber(t)}},{key:"lsbBitNumber",value:function lsbBitNumber(){return u.a.bigEndianBitIndex(this.startBit)+this.size-1}},{key:"msbBitIndex",value:function msbBitIndex(){return this.isLittleEndian?this.startBit+this.size-1:this.startBit}},{key:"littleEndianBitDescription",value:function littleEndianBitDescription(t){var e=[this.startBit,this.startBit+this.size-1];return t<e[0]||t>e[1]?null:{bitNumber:t-e[0],isLsb:t===e[0],isMsb:t===e[1]}}},{key:"bigEndianBitDescription",value:function bigEndianBitDescription(t){var e=u.a.bigEndianBitIndex(this.startBit),r=[e,e+this.size-1],n=u.a.bigEndianBitIndex(t);return n<r[0]||n>r[1]?null:{bitNumber:n,isLsb:n===r[1],isMsb:t===this.startBit,range:r}}},{key:"bitDescription",value:function bitDescription(t){return this.isLittleEndian?this.littleEndianBitDescription(t):this.bigEndianBitDescription(t)}},{key:"calculateRawRange",value:function calculateRawRange(){var t=Math.pow(2,this.size);return this.isSigned&&(t/=2),[this.isSigned?-1*t:0,t-1]}},{key:"calculateMin",value:function calculateMin(){var t=this.calculateRawRange()[0];return this.offset+t*this.factor}},{key:"calculateMax",value:function calculateMax(){var t=this.calculateRawRange()[1];return this.offset+t*this.factor}},{key:"getColors",value:function getColors(t){var e=t.split(":").map((function(t){return 3*(3+Number.parseInt(t,16))%253})),r=this._colors||this.generateColors(),n=0;return r.map((function(t){return e=e.map((function(t){return t^n})),n=e.reduce((function(t,e){return t^e}),t)}))}},{key:"generateColors",value:function generateColors(){return s()({format:"rgbArray"})}},{key:"equals",value:function equals(t){var e=this;return t.name===this.name&&t.startBit===this.startBit&&t.size===this.size&&t.isLittleEndian===this.isLittleEndian&&t.isSigned===this.isSigned&&t.isFloat===this.isFloat&&t.factor===this.factor&&t.offset===this.offset&&t.unit===this.unit&&t.receiver.length===this.receiver.length&&t.receiver.every((function(t,r){return t===e.receiver[r]}))&&t.comment===this.comment&&t.multiplex===this.multiplex}}]),Signal}()},function(t,e,r){"use strict";r.d(e,"b",(function(){return isLogAddress})),r.d(e,"a",(function(){return frameForAddress}));var n=r(5),i=r(6),a=r(8);function ownKeys(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function _objectSpread(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ownKeys(r,!0).forEach((function(e){Object(n.a)(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ownKeys(r).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var o={"CarState:WheelSpeeds":{FrontLeftWheel:shortSignal({index:0,factor:.001}),FrontRightWheel:shortSignal({index:1,factor:.001}),RearLeftWheel:shortSignal({index:2,factor:.001}),RearRightWheel:shortSignal({index:3,factor:.001})},"CarState:Ego":{VEgo:shortSignal({index:0,factor:.001}),AEgo:shortSignal({index:1,factor:.001}),VEgoRaw:shortSignal({index:2,factor:.001}),YawRate:shortSignal({index:3,factor:.001})},"CarState:Controls":{SteeringAngle:longSignal({index:0,factor:.001}),Brake:shortSignal({index:2,factor:.001}),Gas:shortSignal({index:3,factor:.001})},"CarState:Flags":{LeftBlinker:boolSignal({index:0}),RightBlinker:boolSignal({index:1}),GenericToggle:boolSignal({index:2}),DoorOpen:boolSignal({index:3}),SeatbeltUnlatched:boolSignal({index:4}),GasPressed:boolSignal({index:5}),BrakeLights:boolSignal({index:6}),SteeringPressed:boolSignal({index:7}),Standstill:boolSignal({index:8}),"CruiseState.Enabled":boolSignal({index:9}),"CruiseState.Available":boolSignal({index:10}),"CruiseState.Standstill":boolSignal({index:11}),GearShifter:{startBit:15,size:4,unsigned:!0},"CruiseState.Speed":charSignal({index:2})},"UbloxGnss:MeasurementReport":{RcvTow:longSignal({index:0}),GpsWeek:shortSignal({index:2}),LeapSeconds:{startBit:55,size:8},NumMeas:{startBit:63,size:8}},"Health:Data":{Voltage:shortSignal({index:0}),Current:charSignal({index:2}),Started:boolSignal({index:24}),ControlsAllowed:boolSignal({index:25}),GasInterceptorDetected:boolSignal({index:26}),StartedSignalDetected:boolSignal({index:27})},"Thermal:CPU":{Cpu0:shortSignal({index:0,unsigned:!0}),Cpu1:shortSignal({index:1,unsigned:!0}),Cpu2:shortSignal({index:2,unsigned:!0}),Cpu3:shortSignal({index:3,unsigned:!0})},"Thermal:Data":{Mem:shortSignal({index:0,unsigned:!0}),Gpu:shortSignal({index:1,unsigned:!0}),FanSpeed:shortSignal({index:2,unsigned:!0}),BatteryPercent:charSignal({index:6,unsigned:!0}),UsbOnline:boolSignal({index:56}),Started:boolSignal({index:57})},"Thermal:FreeSpace":{FreeSpace:longSignal({index:0,unsigned:!0,factor:1e-9})}},s=[];function longSignal(t){return _objectSpread({},t,{size:32,startBit:32*t.index+7})}function shortSignal(t){return _objectSpread({},t,{size:16,startBit:16*t.index+7})}function charSignal(t){return _objectSpread({},t,{size:8,startBit:8*t.index+7})}function boolSignal(t){return _objectSpread({},t,{size:1,startBit:t.index,unsigned:!0})}function nameForAddress(t){return t>=4096?s[t-4096]:null}function isLogAddress(t){return!!nameForAddress(t)}function frameForAddress(t){var e=nameForAddress(t);return new i.a({id:e,name:e,size:8,signals:o[e]})}Object.keys(o).forEach((function(t){Object.keys(o[t]).forEach((function(e){o[t][e]=function createSignalEntry(t){return new a.a({name:t.name,startBit:t.startBit,size:t.size,isLittleEndian:!1,isSigned:!t.unsigned,factor:t.factor||1,offset:t.offset||0,unit:t.unit||""})}(_objectSpread({name:e},o[t][e]))})),function addressForName(t){var e=s.indexOf(t);if(-1===e)return s.push(t),s.indexOf(t)+4096;return e+4096}(t)}))},function(t,e,r){"use strict";(function(t){var n=r(21),i=r(22),a=r(23);function kMaxLength(){return Buffer.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function createBuffer(t,e){if(kMaxLength()<e)throw new RangeError("Invalid typed array length");return Buffer.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=Buffer.prototype:(null===t&&(t=new Buffer(e)),t.length=e),t}function Buffer(t,e,r){if(!Buffer.TYPED_ARRAY_SUPPORT&&!(this instanceof Buffer))return new Buffer(t,e,r);if("number"===typeof t){if("string"===typeof e)throw new Error("If encoding is specified then the first argument must be a string");return allocUnsafe(this,t)}return from(this,t,e,r)}function from(t,e,r,n){if("number"===typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!==typeof ArrayBuffer&&e instanceof ArrayBuffer?function fromArrayBuffer(t,e,r,n){if(e.byteLength,r<0||e.byteLength<r)throw new RangeError("'offset' is out of bounds");if(e.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");e=void 0===r&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,r):new Uint8Array(e,r,n);Buffer.TYPED_ARRAY_SUPPORT?(t=e).__proto__=Buffer.prototype:t=fromArrayLike(t,e);return t}(t,e,r,n):"string"===typeof e?function fromString(t,e,r){"string"===typeof r&&""!==r||(r="utf8");if(!Buffer.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|byteLength(e,r),i=(t=createBuffer(t,n)).write(e,r);i!==n&&(t=t.slice(0,i));return t}(t,e,r):function fromObject(t,e){if(Buffer.isBuffer(e)){var r=0|checked(e.length);return 0===(t=createBuffer(t,r)).length?t:(e.copy(t,0,0,r),t)}if(e){if("undefined"!==typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!==typeof e.length||function isnan(t){return t!==t}(e.length)?createBuffer(t,0):fromArrayLike(t,e);if("Buffer"===e.type&&a(e.data))return fromArrayLike(t,e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function assertSize(t){if("number"!==typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function allocUnsafe(t,e){if(assertSize(e),t=createBuffer(t,e<0?0:0|checked(e)),!Buffer.TYPED_ARRAY_SUPPORT)for(var r=0;r<e;++r)t[r]=0;return t}function fromArrayLike(t,e){var r=e.length<0?0:0|checked(e.length);t=createBuffer(t,r);for(var n=0;n<r;n+=1)t[n]=255&e[n];return t}function checked(t){if(t>=kMaxLength())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+kMaxLength().toString(16)+" bytes");return 0|t}function byteLength(t,e){if(Buffer.isBuffer(t))return t.length;if("undefined"!==typeof ArrayBuffer&&"function"===typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!==typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return utf8ToBytes(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return base64ToBytes(t).length;default:if(n)return utf8ToBytes(t).length;e=(""+e).toLowerCase(),n=!0}}function slowToString(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return hexSlice(this,e,r);case"utf8":case"utf-8":return utf8Slice(this,e,r);case"ascii":return asciiSlice(this,e,r);case"latin1":case"binary":return latin1Slice(this,e,r);case"base64":return base64Slice(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return utf16leSlice(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function swap(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function bidirectionalIndexOf(t,e,r,n,i){if(0===t.length)return-1;if("string"===typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"===typeof e&&(e=Buffer.from(e,n)),Buffer.isBuffer(e))return 0===e.length?-1:arrayIndexOf(t,e,r,n,i);if("number"===typeof e)return e&=255,Buffer.TYPED_ARRAY_SUPPORT&&"function"===typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):arrayIndexOf(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function arrayIndexOf(t,e,r,n,i){var a,o=1,s=t.length,u=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;o=2,s/=2,u/=2,r/=2}function read(t,e){return 1===o?t[e]:t.readUInt16BE(e*o)}if(i){var c=-1;for(a=r;a<s;a++)if(read(t,a)===read(e,-1===c?0:a-c)){if(-1===c&&(c=a),a-c+1===u)return c*o}else-1!==c&&(a-=a-c),c=-1}else for(r+u>s&&(r=s-u),a=r;a>=0;a--){for(var l=!0,f=0;f<u;f++)if(read(t,a+f)!==read(e,f)){l=!1;break}if(l)return a}return-1}function hexWrite(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n))>i&&(n=i):n=i;var a=e.length;if(a%2!==0)throw new TypeError("Invalid hex string");n>a/2&&(n=a/2);for(var o=0;o<n;++o){var s=parseInt(e.substr(2*o,2),16);if(isNaN(s))return o;t[r+o]=s}return o}function utf8Write(t,e,r,n){return blitBuffer(utf8ToBytes(e,t.length-r),t,r,n)}function asciiWrite(t,e,r,n){return blitBuffer(function asciiToBytes(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function latin1Write(t,e,r,n){return asciiWrite(t,e,r,n)}function base64Write(t,e,r,n){return blitBuffer(base64ToBytes(e),t,r,n)}function ucs2Write(t,e,r,n){return blitBuffer(function utf16leToBytes(t,e){for(var r,n,i,a=[],o=0;o<t.length&&!((e-=2)<0);++o)r=t.charCodeAt(o),n=r>>8,i=r%256,a.push(i),a.push(n);return a}(e,t.length-r),t,r,n)}function base64Slice(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function utf8Slice(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i<r;){var a,s,u,c,l=t[i],f=null,h=l>239?4:l>223?3:l>191?2:1;if(i+h<=r)switch(h){case 1:l<128&&(f=l);break;case 2:128===(192&(a=t[i+1]))&&(c=(31&l)<<6|63&a)>127&&(f=c);break;case 3:a=t[i+1],s=t[i+2],128===(192&a)&&128===(192&s)&&(c=(15&l)<<12|(63&a)<<6|63&s)>2047&&(c<55296||c>57343)&&(f=c);break;case 4:a=t[i+1],s=t[i+2],u=t[i+3],128===(192&a)&&128===(192&s)&&128===(192&u)&&(c=(15&l)<<18|(63&a)<<12|(63&s)<<6|63&u)>65535&&c<1114112&&(f=c)}null===f?(f=65533,h=1):f>65535&&(f-=65536,n.push(f>>>10&1023|55296),f=56320|1023&f),n.push(f),i+=h}return function decodeCodePointsArray(t){var e=t.length;if(e<=o)return String.fromCharCode.apply(String,t);var r="",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=o));return r}(n)}e.Buffer=Buffer,e.SlowBuffer=function SlowBuffer(t){+t!=t&&(t=0);return Buffer.alloc(+t)},e.INSPECT_MAX_BYTES=50,Buffer.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function typedArraySupport(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function foo(){return 42}},42===t.foo()&&"function"===typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(e){return!1}}(),e.kMaxLength=kMaxLength(),Buffer.poolSize=8192,Buffer._augment=function(t){return t.__proto__=Buffer.prototype,t},Buffer.from=function(t,e,r){return from(null,t,e,r)},Buffer.TYPED_ARRAY_SUPPORT&&(Buffer.prototype.__proto__=Uint8Array.prototype,Buffer.__proto__=Uint8Array,"undefined"!==typeof Symbol&&Symbol.species&&Buffer[Symbol.species]===Buffer&&Object.defineProperty(Buffer,Symbol.species,{value:null,configurable:!0})),Buffer.alloc=function(t,e,r){return function alloc(t,e,r,n){return assertSize(e),e<=0?createBuffer(t,e):void 0!==r?"string"===typeof n?createBuffer(t,e).fill(r,n):createBuffer(t,e).fill(r):createBuffer(t,e)}(null,t,e,r)},Buffer.allocUnsafe=function(t){return allocUnsafe(null,t)},Buffer.allocUnsafeSlow=function(t){return allocUnsafe(null,t)},Buffer.isBuffer=function isBuffer(t){return!(null==t||!t._isBuffer)},Buffer.compare=function compare(t,e){if(!Buffer.isBuffer(t)||!Buffer.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var r=t.length,n=e.length,i=0,a=Math.min(r,n);i<a;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0},Buffer.isEncoding=function isEncoding(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},Buffer.concat=function concat(t,e){if(!a(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return Buffer.alloc(0);var r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var n=Buffer.allocUnsafe(e),i=0;for(r=0;r<t.length;++r){var o=t[r];if(!Buffer.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(n,i),i+=o.length}return n},Buffer.byteLength=byteLength,Buffer.prototype._isBuffer=!0,Buffer.prototype.swap16=function swap16(){var t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)swap(this,e,e+1);return this},Buffer.prototype.swap32=function swap32(){var t=this.length;if(t%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)swap(this,e,e+3),swap(this,e+1,e+2);return this},Buffer.prototype.swap64=function swap64(){var t=this.length;if(t%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)swap(this,e,e+7),swap(this,e+1,e+6),swap(this,e+2,e+5),swap(this,e+3,e+4);return this},Buffer.prototype.toString=function toString(){var t=0|this.length;return 0===t?"":0===arguments.length?utf8Slice(this,0,t):slowToString.apply(this,arguments)},Buffer.prototype.equals=function equals(t){if(!Buffer.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===Buffer.compare(this,t)},Buffer.prototype.inspect=function inspect(){var t="",r=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),"<Buffer "+t+">"},Buffer.prototype.compare=function compare(t,e,r,n,i){if(!Buffer.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(this===t)return 0;for(var a=(i>>>=0)-(n>>>=0),o=(r>>>=0)-(e>>>=0),s=Math.min(a,o),u=this.slice(n,i),c=t.slice(e,r),l=0;l<s;++l)if(u[l]!==c[l]){a=u[l],o=c[l];break}return a<o?-1:o<a?1:0},Buffer.prototype.includes=function includes(t,e,r){return-1!==this.indexOf(t,e,r)},Buffer.prototype.indexOf=function indexOf(t,e,r){return bidirectionalIndexOf(this,t,e,r,!0)},Buffer.prototype.lastIndexOf=function lastIndexOf(t,e,r){return bidirectionalIndexOf(this,t,e,r,!1)},Buffer.prototype.write=function write(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"===typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(r)?(r|=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var a=!1;;)switch(n){case"hex":return hexWrite(this,t,e,r);case"utf8":case"utf-8":return utf8Write(this,t,e,r);case"ascii":return asciiWrite(this,t,e,r);case"latin1":case"binary":return latin1Write(this,t,e,r);case"base64":return base64Write(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ucs2Write(this,t,e,r);default:if(a)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),a=!0}},Buffer.prototype.toJSON=function toJSON(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var o=4096;function asciiSlice(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(127&t[i]);return n}function latin1Slice(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}function hexSlice(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var i="",a=e;a<r;++a)i+=toHex(t[a]);return i}function utf16leSlice(t,e,r){for(var n=t.slice(e,r),i="",a=0;a<n.length;a+=2)i+=String.fromCharCode(n[a]+256*n[a+1]);return i}function checkOffset(t,e,r){if(t%1!==0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function checkInt(t,e,r,n,i,a){if(!Buffer.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<a)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function objectWriteUInt16(t,e,r,n){e<0&&(e=65535+e+1);for(var i=0,a=Math.min(t.length-r,2);i<a;++i)t[r+i]=(e&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function objectWriteUInt32(t,e,r,n){e<0&&(e=4294967295+e+1);for(var i=0,a=Math.min(t.length-r,4);i<a;++i)t[r+i]=e>>>8*(n?i:3-i)&255}function checkIEEE754(t,e,r,n,i,a){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function writeFloat(t,e,r,n,a){return a||checkIEEE754(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function writeDouble(t,e,r,n,a){return a||checkIEEE754(t,0,r,8),i.write(t,e,r,n,52,8),r+8}Buffer.prototype.slice=function slice(t,e){var r,n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e<t&&(e=t),Buffer.TYPED_ARRAY_SUPPORT)(r=this.subarray(t,e)).__proto__=Buffer.prototype;else{var i=e-t;r=new Buffer(i,void 0);for(var a=0;a<i;++a)r[a]=this[a+t]}return r},Buffer.prototype.readUIntLE=function readUIntLE(t,e,r){t|=0,e|=0,r||checkOffset(t,e,this.length);for(var n=this[t],i=1,a=0;++a<e&&(i*=256);)n+=this[t+a]*i;return n},Buffer.prototype.readUIntBE=function readUIntBE(t,e,r){t|=0,e|=0,r||checkOffset(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},Buffer.prototype.readUInt8=function readUInt8(t,e){return e||checkOffset(t,1,this.length),this[t]},Buffer.prototype.readUInt16LE=function readUInt16LE(t,e){return e||checkOffset(t,2,this.length),this[t]|this[t+1]<<8},Buffer.prototype.readUInt16BE=function readUInt16BE(t,e){return e||checkOffset(t,2,this.length),this[t]<<8|this[t+1]},Buffer.prototype.readUInt32LE=function readUInt32LE(t,e){return e||checkOffset(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},Buffer.prototype.readUInt32BE=function readUInt32BE(t,e){return e||checkOffset(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},Buffer.prototype.readIntLE=function readIntLE(t,e,r){t|=0,e|=0,r||checkOffset(t,e,this.length);for(var n=this[t],i=1,a=0;++a<e&&(i*=256);)n+=this[t+a]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*e)),n},Buffer.prototype.readIntBE=function readIntBE(t,e,r){t|=0,e|=0,r||checkOffset(t,e,this.length);for(var n=e,i=1,a=this[t+--n];n>0&&(i*=256);)a+=this[t+--n]*i;return a>=(i*=128)&&(a-=Math.pow(2,8*e)),a},Buffer.prototype.readInt8=function readInt8(t,e){return e||checkOffset(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},Buffer.prototype.readInt16LE=function readInt16LE(t,e){e||checkOffset(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},Buffer.prototype.readInt16BE=function readInt16BE(t,e){e||checkOffset(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},Buffer.prototype.readInt32LE=function readInt32LE(t,e){return e||checkOffset(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},Buffer.prototype.readInt32BE=function readInt32BE(t,e){return e||checkOffset(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},Buffer.prototype.readFloatLE=function readFloatLE(t,e){return e||checkOffset(t,4,this.length),i.read(this,t,!0,23,4)},Buffer.prototype.readFloatBE=function readFloatBE(t,e){return e||checkOffset(t,4,this.length),i.read(this,t,!1,23,4)},Buffer.prototype.readDoubleLE=function readDoubleLE(t,e){return e||checkOffset(t,8,this.length),i.read(this,t,!0,52,8)},Buffer.prototype.readDoubleBE=function readDoubleBE(t,e){return e||checkOffset(t,8,this.length),i.read(this,t,!1,52,8)},Buffer.prototype.writeUIntLE=function writeUIntLE(t,e,r,n){(t=+t,e|=0,r|=0,n)||checkInt(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,a=0;for(this[e]=255&t;++a<r&&(i*=256);)this[e+a]=t/i&255;return e+r},Buffer.prototype.writeUIntBE=function writeUIntBE(t,e,r,n){(t=+t,e|=0,r|=0,n)||checkInt(this,t,e,r,Math.pow(2,8*r)-1,0);var i=r-1,a=1;for(this[e+i]=255&t;--i>=0&&(a*=256);)this[e+i]=t/a&255;return e+r},Buffer.prototype.writeUInt8=function writeUInt8(t,e,r){return t=+t,e|=0,r||checkInt(this,t,e,1,255,0),Buffer.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},Buffer.prototype.writeUInt16LE=function writeUInt16LE(t,e,r){return t=+t,e|=0,r||checkInt(this,t,e,2,65535,0),Buffer.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):objectWriteUInt16(this,t,e,!0),e+2},Buffer.prototype.writeUInt16BE=function writeUInt16BE(t,e,r){return t=+t,e|=0,r||checkInt(this,t,e,2,65535,0),Buffer.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):objectWriteUInt16(this,t,e,!1),e+2},Buffer.prototype.writeUInt32LE=function writeUInt32LE(t,e,r){return t=+t,e|=0,r||checkInt(this,t,e,4,4294967295,0),Buffer.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):objectWriteUInt32(this,t,e,!0),e+4},Buffer.prototype.writeUInt32BE=function writeUInt32BE(t,e,r){return t=+t,e|=0,r||checkInt(this,t,e,4,4294967295,0),Buffer.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):objectWriteUInt32(this,t,e,!1),e+4},Buffer.prototype.writeIntLE=function writeIntLE(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);checkInt(this,t,e,r,i-1,-i)}var a=0,o=1,s=0;for(this[e]=255&t;++a<r&&(o*=256);)t<0&&0===s&&0!==this[e+a-1]&&(s=1),this[e+a]=(t/o>>0)-s&255;return e+r},Buffer.prototype.writeIntBE=function writeIntBE(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);checkInt(this,t,e,r,i-1,-i)}var a=r-1,o=1,s=0;for(this[e+a]=255&t;--a>=0&&(o*=256);)t<0&&0===s&&0!==this[e+a+1]&&(s=1),this[e+a]=(t/o>>0)-s&255;return e+r},Buffer.prototype.writeInt8=function writeInt8(t,e,r){return t=+t,e|=0,r||checkInt(this,t,e,1,127,-128),Buffer.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},Buffer.prototype.writeInt16LE=function writeInt16LE(t,e,r){return t=+t,e|=0,r||checkInt(this,t,e,2,32767,-32768),Buffer.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):objectWriteUInt16(this,t,e,!0),e+2},Buffer.prototype.writeInt16BE=function writeInt16BE(t,e,r){return t=+t,e|=0,r||checkInt(this,t,e,2,32767,-32768),Buffer.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):objectWriteUInt16(this,t,e,!1),e+2},Buffer.prototype.writeInt32LE=function writeInt32LE(t,e,r){return t=+t,e|=0,r||checkInt(this,t,e,4,2147483647,-2147483648),Buffer.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):objectWriteUInt32(this,t,e,!0),e+4},Buffer.prototype.writeInt32BE=function writeInt32BE(t,e,r){return t=+t,e|=0,r||checkInt(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),Buffer.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):objectWriteUInt32(this,t,e,!1),e+4},Buffer.prototype.writeFloatLE=function writeFloatLE(t,e,r){return writeFloat(this,t,e,!0,r)},Buffer.prototype.writeFloatBE=function writeFloatBE(t,e,r){return writeFloat(this,t,e,!1,r)},Buffer.prototype.writeDoubleLE=function writeDoubleLE(t,e,r){return writeDouble(this,t,e,!0,r)},Buffer.prototype.writeDoubleBE=function writeDoubleBE(t,e,r){return writeDouble(this,t,e,!1,r)},Buffer.prototype.copy=function copy(t,e,r,n){if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);var i,a=n-r;if(this===t&&r<e&&e<n)for(i=a-1;i>=0;--i)t[i+e]=this[i+r];else if(a<1e3||!Buffer.TYPED_ARRAY_SUPPORT)for(i=0;i<a;++i)t[i+e]=this[i+r];else Uint8Array.prototype.set.call(t,this.subarray(r,r+a),e);return a},Buffer.prototype.fill=function fill(t,e,r,n){if("string"===typeof t){if("string"===typeof e?(n=e,e=0,r=this.length):"string"===typeof r&&(n=r,r=this.length),1===t.length){var i=t.charCodeAt(0);i<256&&(t=i)}if(void 0!==n&&"string"!==typeof n)throw new TypeError("encoding must be a string");if("string"===typeof n&&!Buffer.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"===typeof t&&(t&=255);if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;var a;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"===typeof t)for(a=e;a<r;++a)this[a]=t;else{var o=Buffer.isBuffer(t)?t:utf8ToBytes(new Buffer(t,n).toString()),s=o.length;for(a=0;a<r-e;++a)this[a+e]=o[a%s]}return this};var s=/[^+\/0-9A-Za-z-_]/g;function toHex(t){return t<16?"0"+t.toString(16):t.toString(16)}function utf8ToBytes(t,e){var r;e=e||1/0;for(var n=t.length,i=null,a=[],o=0;o<n;++o){if((r=t.charCodeAt(o))>55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&a.push(239,191,189);continue}if(o+1===n){(e-=3)>-1&&a.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&a.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&a.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;a.push(r)}else if(r<2048){if((e-=2)<0)break;a.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;a.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return a}function base64ToBytes(t){return n.toByteArray(function base64clean(t){if((t=function stringtrim(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(s,"")).length<2)return"";for(;t.length%4!==0;)t+="=";return t}(t))}function blitBuffer(t,e,r,n){for(var i=0;i<n&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}}).call(this,r(4))},function(t,e,r){(function(e){var n=r(13),i="undefined"!==typeof window?window:"undefined"!==typeof e?e:"undefined"!==typeof self?self:{};function isUndefined(t){return void 0===t}function isPlainObject(t){return"[object Object]"===Object.prototype.toString.call(t)}function isString(t){return"[object String]"===Object.prototype.toString.call(t)}function isArray(t){return"[object Array]"===Object.prototype.toString.call(t)}function supportsFetch(){if(!("fetch"in i))return!1;try{return new Headers,new Request(""),new Response,!0}catch(t){return!1}}function each(t,e){var r,n;if(isUndefined(t.length))for(r in t)hasKey(t,r)&&e.call(null,r,t[r]);else if(n=t.length)for(r=0;r<n;r++)e.call(null,r,t[r])}function truncate(t,e){if("number"!==typeof e)throw new Error("2nd argument to `truncate` function should be a number");return"string"!==typeof t||0===e?t:t.length<=e?t:t.substr(0,e)+"\u2026"}function hasKey(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function joinRegExp(t){for(var e,r=[],n=0,i=t.length;n<i;n++)isString(e=t[n])?r.push(e.replace(/([.*+?^=!:${}()|\[\]\/\\])/g,"\\$1")):e&&e.source&&r.push(e.source);return new RegExp(r.join("|"),"i")}function htmlElementAsString(t){var e,r,n,i,a,o=[];if(!t||!t.tagName)return"";if(o.push(t.tagName.toLowerCase()),t.id&&o.push("#"+t.id),(e=t.className)&&isString(e))for(r=e.split(/\s+/),a=0;a<r.length;a++)o.push("."+r[a]);var s=["type","name","title","alt"];for(a=0;a<s.length;a++)n=s[a],(i=t.getAttribute(n))&&o.push("["+n+'="'+i+'"]');return o.join("")}function isOnlyOneTruthy(t,e){return!!(!!t^!!e)}function isSameStacktrace(t,e){if(isOnlyOneTruthy(t,e))return!1;var r,n,i=t.frames,a=e.frames;if(void 0===i||void 0===a)return!1;if(i.length!==a.length)return!1;for(var o=0;o<i.length;o++)if(r=i[o],n=a[o],r.filename!==n.filename||r.lineno!==n.lineno||r.colno!==n.colno||r.function!==n.function)return!1;return!0}var a=3,o=51200,s=40;function jsonSize(t){return function utf8Length(t){return~-encodeURI(t).split(/%..|./).length}(JSON.stringify(t))}function serializeValue(t){if("string"===typeof t){return truncate(t,40)}if("number"===typeof t||"boolean"===typeof t||"undefined"===typeof t)return t;var e=Object.prototype.toString.call(t);return"[object Object]"===e?"[Object]":"[object Array]"===e?"[Array]":"[object Function]"===e?t.name?"[Function: "+t.name+"]":"[Function]":t}t.exports={isObject:function isObject(t){return"object"===typeof t&&null!==t},isError:function isError(t){switch(Object.prototype.toString.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return t instanceof Error}},isErrorEvent:function isErrorEvent(t){return"[object ErrorEvent]"===Object.prototype.toString.call(t)},isDOMError:function isDOMError(t){return"[object DOMError]"===Object.prototype.toString.call(t)},isDOMException:function isDOMException(t){return"[object DOMException]"===Object.prototype.toString.call(t)},isUndefined:isUndefined,isFunction:function isFunction(t){return"function"===typeof t},isPlainObject:isPlainObject,isString:isString,isArray:isArray,isEmptyObject:function isEmptyObject(t){if(!isPlainObject(t))return!1;for(var e in t)if(t.hasOwnProperty(e))return!1;return!0},supportsErrorEvent:function supportsErrorEvent(){try{return new ErrorEvent(""),!0}catch(t){return!1}},supportsDOMError:function supportsDOMError(){try{return new DOMError(""),!0}catch(t){return!1}},supportsDOMException:function supportsDOMException(){try{return new DOMException(""),!0}catch(t){return!1}},supportsFetch:supportsFetch,supportsReferrerPolicy:function supportsReferrerPolicy(){if(!supportsFetch())return!1;try{return new Request("pickleRick",{referrerPolicy:"origin"}),!0}catch(t){return!1}},supportsPromiseRejectionEvent:function supportsPromiseRejectionEvent(){return"function"===typeof PromiseRejectionEvent},wrappedCallback:function wrappedCallback(t){return function dataCallback(e,r){var n=t(e)||e;return r&&r(n)||n}},each:each,objectMerge:function objectMerge(t,e){return e?(each(e,(function(e,r){t[e]=r})),t):t},truncate:truncate,objectFrozen:function objectFrozen(t){return!!Object.isFrozen&&Object.isFrozen(t)},hasKey:hasKey,joinRegExp:joinRegExp,urlencode:function urlencode(t){var e=[];return each(t,(function(t,r){e.push(encodeURIComponent(t)+"="+encodeURIComponent(r))})),e.join("&")},uuid4:function uuid4(){var t=i.crypto||i.msCrypto;if(!isUndefined(t)&&t.getRandomValues){var e=new Uint16Array(8);t.getRandomValues(e),e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;var r=function pad(t){for(var e=t.toString(16);e.length<4;)e="0"+e;return e};return r(e[0])+r(e[1])+r(e[2])+r(e[3])+r(e[4])+r(e[5])+r(e[6])+r(e[7])}return"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)}))},htmlTreeAsString:function htmlTreeAsString(t){for(var e,r=[],n=0,i=0,a=" > ".length;t&&n++<5&&!("html"===(e=htmlElementAsString(t))||n>1&&i+r.length*a+e.length>=80);)r.push(e),i+=e.length,t=t.parentNode;return r.reverse().join(" > ")},htmlElementAsString:htmlElementAsString,isSameException:function isSameException(t,e){return!isOnlyOneTruthy(t,e)&&(t=t.values[0],e=e.values[0],t.type===e.type&&t.value===e.value&&(!function isBothUndefined(t,e){return isUndefined(t)&&isUndefined(e)}(t.stacktrace,e.stacktrace)&&isSameStacktrace(t.stacktrace,e.stacktrace)))},isSameStacktrace:isSameStacktrace,parseUrl:function parseUrl(t){if("string"!==typeof t)return{};var e=t.match(/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/),r=e[6]||"",n=e[8]||"";return{protocol:e[2],host:e[4],path:e[5],relative:e[5]+r+n}},fill:function fill(t,e,r,n){if(null!=t){var i=t[e];t[e]=r(i),t[e].__raven__=!0,t[e].__orig__=i,n&&n.push([t,e,i])}},safeJoin:function safeJoin(t,e){if(!isArray(t))return"";for(var r=[],n=0;n<t.length;n++)try{r.push(String(t[n]))}catch(i){r.push("[value cannot be serialized]")}return r.join(e)},serializeException:function serializeException(t,e,r){if(!isPlainObject(t))return t;r="number"!==typeof(e="number"!==typeof e?a:e)?o:r;var i=function serializeObject(t,e){return 0===e?serializeValue(t):isPlainObject(t)?Object.keys(t).reduce((function(r,n){return r[n]=serializeObject(t[n],e-1),r}),{}):Array.isArray(t)?t.map((function(t){return serializeObject(t,e-1)})):serializeValue(t)}(t,e);return jsonSize(n(i))>r?serializeException(t,e-1):i},serializeKeysForMessage:function serializeKeysForMessage(t,e){if("number"===typeof t||"string"===typeof t)return t.toString();if(!Array.isArray(t))return"";if(0===(t=t.filter((function(t){return"string"===typeof t}))).length)return"[object has no keys]";if(e="number"!==typeof e?s:e,t[0].length>=e)return t[0];for(var r=t.length;r>0;r--){var n=t.slice(0,r).join(", ");if(!(n.length>e))return r===t.length?n:n+"\u2026"}return""},sanitize:function sanitize(t,e){if(!isArray(e)||isArray(e)&&0===e.length)return t;var r,i=joinRegExp(e),a="********";try{r=JSON.parse(n(t))}catch(o){return t}return function sanitizeWorker(t){return isArray(t)?t.map((function(t){return sanitizeWorker(t)})):isPlainObject(t)?Object.keys(t).reduce((function(e,r){return i.test(r)?e[r]=a:e[r]=sanitizeWorker(t[r]),e}),{}):t}(r)}}}).call(this,r(4))},function(t,e,r){"use strict";r.d(e,"a",(function(){return a}));var n=r(2),i=r(3),a=function(){function BoardUnit(t){Object(n.a)(this,BoardUnit),this.name=t,this.attributes={},this.comment=null}return Object(i.a)(BoardUnit,[{key:"text",value:function text(){return this.name}}]),BoardUnit}()},function(t,e){function indexOf(t,e){for(var r=0;r<t.length;++r)if(t[r]===e)return r;return-1}function serializer(t,e){var r=[],n=[];return null==e&&(e=function cycleReplacer(t,e){return r[0]===e?"[Circular ~]":"[Circular ~."+n.slice(0,indexOf(r,e)).join(".")+"]"}),function(i,a){if(r.length>0){var o=indexOf(r,this);~o?r.splice(o+1):r.push(this),~o?n.splice(o,1/0,i):n.push(i),~indexOf(r,a)&&(a=e.call(this,i,a))}else r.push(a);return null==t?a instanceof Error?function stringifyError(t){var e={stack:t.stack,message:t.message,name:t.name};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}(a):a:t.call(this,i,a)}}(t.exports=function stringify(t,e,r,n){return JSON.stringify(t,serializer(e,n),r)}).getSerialize=serializer},function(t,e,r){(function(e){var n=r(25),i="undefined"!==typeof window?window:"undefined"!==typeof e?e:"undefined"!==typeof self?self:{},a=i.Raven,o=new n;o.noConflict=function(){return i.Raven=a,o},o.afterLoad(),t.exports=o,t.exports.Client=n}).call(this,r(4))},function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return C}));var n=r(0),i=r(2),a=r(3),o=r(16),s=r.n(o),u=r(17),c=r(8),l=r(6),f=r(12),h=r(1),p=r(9),d=r(31).UINT64,g=/^CM_ *"(.*)";/,m=/^CM_ *"(.*)/,_=/^BO_ (\w+) (\w+) *: (\w+) (\w+)/,v=/^SG_ (\w+) : (\d+)\|(\d+)@(\d+)([+|-]) \(([0-9.+-eE]+),([0-9.+-eE]+)\) \[([0-9.+-eE]+)\|([0-9.+-eE]+)\] "(.*)" (.*)/,y=/^SG_ (\w+) (\w+) *: (\d+)\|(\d+)@(\d+)([+|-]) \(([0-9.+-eE]+),([0-9.+-eE]+)\) \[([0-9.+-eE]+)\|([0-9.+-eE]+)\] "(.*)" (.*)/,b=/^VAL_ (\w+) (\w+) (.*);/,w=/^VAL_TABLE_ (\w+) (.*);/,E=/^BO_TX_BU_ ([0-9]+) *: *(.+);/,S=/^CM_ SG_ *(\w+) *(\w+) *"(.*)";/,B=/^CM_ SG_ *(\w+) *(\w+) *"(.*)/,x=/^CM_ BO_ *(\w+) *"(.*)";/,O=/^CM_ BO_ *(\w+) *"(.*)/,T=/^BU_:(.*)/,k=/^CM_ BU_ *(\w+) *"(.*)";/,I=/^CM_ BU_ *(\w+) *"(.*)/;function floatOrInt(t){return Number.isInteger(t)?parseInt(t,10):parseFloat(t)}var C=function(){function DBC(t){Object(i.a)(this,DBC),this.boardUnits=[],this.comments=[],this.messages=new Map,void 0!==t&&(this.dbcText=t,this.importDbcString(t))}return Object(a.a)(DBC,[{key:"getMessageFrame",value:function getMessageFrame(t){return p.b(t)?p.a(t):this.messages.get(t)}},{key:"nextNewFrameName",value:function nextNewFrameName(){var t=[],e=!0,r=!1,n=void 0;try{for(var i,a=this.messages.values()[Symbol.iterator]();!(e=(i=a.next()).done);e=!0){var o=i.value;t.push(o.name)}}catch(c){r=!0,n=c}finally{try{e||null==a.return||a.return()}finally{if(r)throw n}}var s,u=1;do{s="NEW_MSG_".concat(u),u++}while(-1!==t.indexOf(s));return s}},{key:"updateBoardUnits",value:function updateBoardUnits(){var t=this.boardUnits.map((function(t){return t.name})),e=Array.from(this.messages.entries()).map((function(t){var e=Object(n.a)(t,2),r=(e[0],e[1]);return Object.values(r.signals)})).reduce((function(t,e){return t.concat(e)}),[]).map((function(t){return t.receiver})).reduce((function(t,e){return t.concat(e)}),[]).filter((function(t,e,r){return r.indexOf(t)===e})).filter((function(e){return-1===t.indexOf(e)})).map((function(t){return new f.a(t)}));this.boardUnits=this.boardUnits.concat(e)}},{key:"text",value:function text(){this.updateBoardUnits();var t='VERSION ""\n\n\n';t+="NS_ :".concat(this._newSymbols()),t+="\n\nBS_:\n";var e=this.boardUnits.map((function(t){return t.text()})).join(" ");t+="\nBU_: ".concat(e,"\n\n\n");var r=[],i=!0,a=!1,o=void 0;try{for(var s,u=this.messages.values()[Symbol.iterator]();!(i=(s=u.next()).done);i=!0){var c=s.value;r.push(c)}}catch(h){a=!0,o=h}finally{try{i||null==u.return||u.return()}finally{if(a)throw o}}t+="".concat(r.map((function(t){return t.text()})).join("\n\n"),"\n\n");var l=r.map((function(t){return[t.id,t.transmitters.slice(1)]})).filter((function(t){var e=Object(n.a)(t,2);e[0];return e[1].length>0}));t+="".concat(l.map((function(t){var e=Object(n.a)(t,2),r=e[0],i=e[1];return"BO_TX_BU_ ".concat(r," : ").concat(i.join(","),";")})).join("\n"),"\n\n\n"),t+=this.boardUnits.filter((function(t){return null!==t.comment})).map((function(t){return"CM_ BU_ ".concat(t.name,' "').concat(t.comment,'";')})).join("\n"),t+=r.filter((function(t){return null!==t.comment})).map((function(t){return"CM_ BO_ ".concat(t.address,' "').concat(t.comment,'";')})).join("\n");var f=r.map((function(t){return Object.values(t.signals).map((function(e){return[t.id,e]}))})).reduce((function(t,e){return t.concat(e)}),[]);return t+="".concat(f.filter((function(t){var e=Object(n.a)(t,2);e[0];return null!==e[1].comment})).map((function(t){var e=Object(n.a)(t,2),r=e[0],i=e[1];return"CM_ SG_ ".concat(r," ").concat(i.name,' "').concat(i.comment,'";')})).join("\n"),"\n"),t+="".concat(f.filter((function(t){var e=Object(n.a)(t,2);e[0];return e[1].valueDescriptions.size>0})).map((function(t){var e=Object(n.a)(t,2),r=e[0];return e[1].valueDescriptionText(r)})).join("\n"),"\n"),t+=this.comments.map((function(t){return'CM_ "'.concat(t,'";')})).join("\n"),"".concat(t.trim(),"\n")}},{key:"getMessageName",value:function getMessageName(t){var e=this.getMessageFrame(t);return e&&e.frame?e.frame.name:null}},{key:"getSignals",value:function getSignals(t){var e=this.getMessageFrame(t);return e?e.signals:{}}},{key:"createFrame",value:function createFrame(t){var e=new l.a({name:this.nextNewFrameName(),id:t,size:8});return this.messages.set(t,e),e}},{key:"setSignals",value:function setSignals(t,e){var r=this.getMessageFrame(t);if(r){var n=Object.assign(Object.create(r),r);n.signals=e,this.messages.set(t,n)}else{var i=this.createFrame(t);i.signals=e,this.messages.set(t,i),this.updateBoardUnits()}}},{key:"addSignal",value:function addSignal(t,e){var r=this.getMessageFrame(t);r&&(r.signals[e.name]=e,this.updateBoardUnits())}},{key:"importDbcString",value:function importDbcString(t){for(var e=[],r=new Map,i=[],a=new Map,o=0,s=null,h=t.split("\n"),p=0;p<h.length;p++){var d=h[p].trim();if(0!==d.length){if(null!=s){var C=s,U=C.type,R=C.data;d=d.replace(/" *;/,"");var A="\n".concat(d.substr(0,d.length));if(-1!==d.indexOf('"')&&(s=null,A=A.substr(0,A.length-1)),"FollowUpSignalComment"===U)R.comment+=A;else if("FollowUpMsgComment"===U){R.comment+=A}else if("FollowUpBoardUnitComment"===U){R.comment+=A}else if("FollowUpDbcComment"===U){var M=this.comments[this.comments.length-1];this.comments[this.comments.length-1]=M+A}}if(0===d.indexOf("BO_ ")){var j=d.match(_);if(null===j){e.push("failed to parse message definition on line ".concat(p+1," -- ").concat(d));continue}var N=j.slice(1),L=Object(n.a)(N,4),P=L[0],D=L[1],F=L[2],H=L[3];o=parseInt(P,0),F=parseInt(F,10);var z=new l.a({name:D,id:o,size:F,transmitters:[H]});r.set(o,z)}else if(0===d.indexOf("SG_")){var q=d.match(v);if(null===q){if(null===(q=d.match(y))){e.push("failed to parse signal definition on line ".concat(p+1," -- ").concat(d));continue}q=q[1]+q.slice(3)}else q=q.slice(1);var W=q,Y=Object(n.a)(W,11),G=Y[0],V=Y[1],X=Y[2],K=Y[3],J=Y[4],$=Y[5],Z=Y[6],Q=Y[7],tt=Y[8],et=Y[9],rt=Y[10],nt={name:G,startBit:V=parseInt(V,10),size:X=parseInt(X,10),isLittleEndian:K=1===parseInt(K,10),isSigned:J="-"===J,factor:$=floatOrInt($),offset:Z=floatOrInt(Z),unit:et,min:Q=floatOrInt(Q),max:tt=floatOrInt(tt),receiver:rt.split(",").map((function(t){return t.trim()}))},it=new c.a(nt);void 0!==r.get(o)?r.get(o).signals[G]=it:u.a.warn("importDbcString: could not add signal: ".concat(G," due to missing message: ").concat(o))}else if(0===d.indexOf("VAL_ ")){var at=d.match(b);if(null!==at){var ot=at.slice(1),st=Object(n.a)(ot,3),ut=st[0],ct=st[1],lt=st[2];lt=lt.split('"').map((function(t){return t.trim()})).filter((function(t){return t.length>0})),ut=parseInt(ut,10);var ft=r.get(ut).signals[ct];if(void 0===ft){e.push("could not find signal for value description on line ".concat(p+1," -- ").concat(d));continue}for(var ht=0;ht<lt.length;ht+=2){var pt=lt[ht].trim(),dt=lt[ht+1].trim();ft.valueDescriptions.set(pt,dt)}}else e.push("failed to parse value description on line ".concat(p+1," -- ").concat(d))}else if(0===d.indexOf("VAL_TABLE_ ")){var gt=d.match(w);if(null!==gt){var mt=new Map,_t=gt.slice(1),vt=Object(n.a)(_t,2),yt=vt[0],bt=vt[1];bt=bt.split('"').map((function(t){return t.trim()})).filter((function(t){return t.length>0}));for(var wt=0;wt<bt.length;wt+=2){var Et=bt[wt],St=bt[wt+1];mt.set(Et,St)}a.set(yt,mt)}else e.push("failed to parse value table on line ".concat(p+1," -- ").concat(d))}else if(0===d.indexOf("BO_TX_BU_ ")){var Bt=d.match(E);if(null!==Bt){var xt=Bt.slice(1),Ot=Object(n.a)(xt,2),Tt=Ot[0],kt=Ot[1];Tt=parseInt(Tt,10);var It=r.get(Tt);It.transmitters.push(kt),r.set(Tt,It)}else e.push("failed to parse message transmitter definition on line ".concat(p+1," -- ").concat(d))}else if(0===d.indexOf("CM_ SG_ ")){var Ct=d.match(S),Ut=!1;if(null===Ct&&(Ct=d.match(B),Ut=!0),null===Ct){e.push("failed to parse signal comment on line ".concat(p+1," -- ").concat(d));continue}var Rt=Ct.slice(1),At=Object(n.a)(Rt,3),Mt=At[0],jt=At[1],Nt=At[2];Mt=parseInt(Mt,10);var Lt=r.get(Mt);if(void 0===Lt){e.push("failed to parse signal comment on line ".concat(p+1," -- ").concat(d,":\n message id ").concat(Mt," does not exist prior to this line"));continue}var Pt=Lt.signals[jt];if(void 0===Pt){e.push("failed to parse signal comment on line ".concat(p+1," -- ").concat(d));continue}Pt.comment=Nt,r.set(Mt,Lt),Ut&&(s={type:"FollowUpSignalComment",data:Pt})}else if(0===d.indexOf("CM_ BO_ ")){var Dt=d.match(x),Ft=!1;if(null===Dt&&(Ft=!0,null===(Dt=d.match(O)))){e.push("failed to message comment on line ".concat(p+1," -- ").concat(d));continue}var Ht=Dt.slice(1),zt=Object(n.a)(Ht,2),qt=zt[0],Wt=zt[1];qt=parseInt(qt,10);var Yt=r.get(qt);Yt.comment=Wt,Ft&&(s={type:"FollowUpMsgComment",data:Yt})}else if(0===d.indexOf("BU_: ")){var Gt=d.match(T);if(null===Gt){e.push("failed to parse board unit definition on line ".concat(p+1," -- ").concat(d));continue}var Vt=Gt.slice(1),Xt=Object(n.a)(Vt,1)[0].split(" ").map((function(t){return t.trim()})).filter((function(t){return t.length>0})).map((function(t){return new f.a(t)}));i=i.concat(Xt)}else if(0===d.indexOf("CM_ BU_ ")){if("continue"===function(){var t=d.match(k),r=!1;if(null===t&&(r=!0,null===(t=d.match(I))))return e.push("failed to parse board unit comment on line ".concat(p+1," -- ").concat(d)),"continue";var a=t.slice(1),o=Object(n.a)(a,2),u=o[0],c=o[1],l=i.find((function(t){return t.name===u}));l&&(l.comment=c),r&&(s={type:"FollowUpBoardUnitComment",data:l})}())continue}else if(0===d.indexOf("CM_ ")){var Kt=d.match(g),Jt=!1;if(null===Kt){if(null===(Kt=d.match(m))){e.push("failed to parse dbc comment on line ".concat(p+1," -- ").concat(d));continue}Jt=!0}var $t=Kt.slice(1),Zt=Object(n.a)($t,1)[0];this.comments.push(Zt),Jt&&(s={type:"FollowUpDbcComment",data:Zt})}}}e.length,this.messages=r,this.boardUnits=i,this.valueTables=a}},{key:"valueForInt64Signal",value:function valueForInt64Signal(t,e){var r,n,i,a=4*e.length;if(t.isLittleEndian?(r=d(function swapOrder(t,e,r){for(var n=[],i=0;i<t.length;i+=e)for(var a=t.slice(i,i+e),o=e-r;o>-r;o-=r)n.push(a.slice(o,o+r));return n.join("")}(e,16,2),16),n=t.startBit,i=d(n)):(r=d(e,16),n=h.a.bigEndianBitIndex(t.startBit),i=d(a-(n+t.size))),i<0)return null;var o=d(Math.pow(2,t.size)-1),s=r.shiftr(i).and(o).toNumber();return t.isSigned&&s&Math.pow(2,t.size-1)&&(s-=Math.pow(2,t.size)),s=s*t.factor+t.offset}},{key:"valueForInt32Signal",value:function valueForInt32Signal(t,e){var r,n,i;if(t.isLittleEndian)r=64-t.startBit-t.size;else{var a=(-t.startBit-1)%8;a<0&&(a+=8),r=8*Math.floor(t.startBit/8)+a}var o=Math.min(4,Math.floor(t.startBit/8));return t.isLittleEndian?(i=e.readUInt32LE(o),n=t.startBit-8*o):(i=e.readUInt32BE(o),n=32-(r-8*o+t.size)),i=i>>>n&(1<<t.size)-1,t.isSigned&&i>>>t.size-1&&(i-=1<<t.size),i*t.factor+t.offset}},{key:"getSignalValues",value:function getSignalValues(e,r){var n=this;if(!this.messages.has(e)&&!p.b(e))return{};var i=this.getMessageFrame(e),a=t.from(r),o=a;if(8!==a.length){var u=s()(a.toString("hex"),16,"0");o=t.from(u,"hex")}var c=o.toString("hex"),l={};return Object.values(i.signals).forEach((function(t){var e;e=t.size>32?n.valueForInt64Signal(t,c):n.valueForInt32Signal(t,o),l[t.name]=e})),l}},{key:"getChffrMetricMappings",value:function getChffrMetricMappings(){var t=this.comments.find((function(t){return 0===t.indexOf("CHFFR_METRIC")}));return t?t.split(";").map((function(t){return t.trim().split(" ")})).reduce((function(t,e){var r=Object(n.a)(e,6),i=(r[0],r[1]),a=r[2],o=r[3],s=r[4],u=r[5];return t[o]={messageId:parseInt(i,10),signalName:a,factor:parseFloat(s),offset:parseFloat(u)},t}),{}):null}},{key:"_newSymbols",value:function _newSymbols(){return"\n NS_DESC_\n CM_\n BA_DEF_\n BA_\n VAL_\n CAT_DEF_\n CAT_\n FILTER\n BA_DEF_DEF_\n EV_DATA_\n ENVVAR_DATA_\n SGTYPE_\n SGTYPE_VAL_\n BA_DEF_SGTYPE_\n BA_SGTYPE_\n SIG_TYPE_REF_\n VAL_TABLE_\n SIG_GROUP_\n SIG_VALTYPE_\n SIGTYPE_VALTYPE_\n BO_TX_BU_\n BA_DEF_REL_\n BA_REL_\n BA_DEF_DEF_REL_\n BU_SG_REL_\n BU_EV_REL_\n BU_BO_REL_\n SG_MUL_VAL_"}}]),DBC}()}).call(this,r(10).Buffer)},function(t,e,r){"use strict";t.exports=function rightPad(t,e,r){if("string"!==typeof t)throw new Error("The string parameter must be a string.");if(t.length<1)throw new Error("The string parameter must be 1 character or longer.");if("number"!==typeof e)throw new Error("The length parameter must be a number.");if("string"!==typeof r&&r)throw new Error("The character parameter must be a string.");var n=-1;for(e-=t.length,r||0===r||(r=" ");++n<e;)t+=r;return t}},function(t,e,r){"use strict";(function(t){var n=r(2),i=r(3),a=r(7),o=r(19),s=function(){function CloudLog(){Object(n.a)(this,CloudLog),a.a.init({token:o.a,no_format:!0,catchall:!1}),this.context={}}return Object(i.a)(CloudLog,[{key:"bind",value:function bind(t){this.context.update(t)}},{key:"emit",value:function emit(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"log";if("undefined"===typeof t.__JEST__){var n={ctx:this.context,created:(new Date).getTime()/1e3,msg:e,src:"JSCloudLog"};"log"===r?a.a.log(n):"warn"===r?a.a.warn(n):"error"===r&&a.a.error(n)}}},{key:"log",value:function log(t){this.emit(t)}},{key:"warn",value:function warn(t){this.emit(t,"warn")}},{key:"error",value:function error(t){this.emit(t,"error")}}]),CloudLog}();e.a=new s}).call(this,r(4))},function(t,e,r){(function(t){!function(r,n){var i=function(){var t=null,e={};!function loadColorBounds(){defineColor("monochrome",null,[[0,0],[100,0]]),defineColor("red",[-26,18],[[20,100],[30,92],[40,89],[50,85],[60,78],[70,70],[80,60],[90,55],[100,50]]),defineColor("orange",[19,46],[[20,100],[30,93],[40,88],[50,86],[60,85],[70,70],[100,70]]),defineColor("yellow",[47,62],[[25,100],[40,94],[50,89],[60,86],[70,84],[80,82],[90,80],[100,75]]),defineColor("green",[63,178],[[30,100],[40,90],[50,85],[60,81],[70,74],[80,64],[90,50],[100,40]]),defineColor("blue",[179,257],[[20,100],[30,86],[40,80],[50,74],[60,60],[70,52],[80,44],[90,39],[100,35]]),defineColor("purple",[258,282],[[20,100],[30,87],[40,79],[50,70],[60,65],[70,59],[80,52],[90,45],[100,42]]),defineColor("pink",[283,334],[[20,100],[30,90],[40,86],[60,84],[80,80],[90,75],[100,73]])}();var r=[];function pickHue(t){if(r.length>0){var n=randomWithin(o=function getRealHueRange(t){if(isNaN(t)){if("string"===typeof t)if(e[t]){var r=e[t];if(r.hueRange)return r.hueRange}else if(t.match(/^#?([0-9A-F]{3}|[0-9A-F]{6})$/i)){return getColorInfo(HexToHSB(t)[0]).hueRange}}else{var n=parseInt(t);if(n<360&&n>0)return getColorInfo(t).hueRange}return[0,360]}(t.hue)),i=(o[1]-o[0])/r.length,a=parseInt((n-o[0])/i);return!0===r[a]?a=(a+2)%r.length:r[a]=!0,(n=randomWithin(o=[(o[0]+a*i)%359,(o[0]+(a+1)*i)%359]))<0&&(n=360+n),n}var o;return(n=randomWithin(o=function getHueRange(t){if("number"===typeof parseInt(t)){var r=parseInt(t);if(r<360&&r>0)return[r,r]}if("string"===typeof t)if(e[t]){var n=e[t];if(n.hueRange)return n.hueRange}else if(t.match(/^#?([0-9A-F]{3}|[0-9A-F]{6})$/i)){var i=HexToHSB(t)[0];return[i,i]}return[0,360]}(t.hue)))<0&&(n=360+n),n}function pickSaturation(t,e){if("monochrome"===e.hue)return 0;if("random"===e.luminosity)return randomWithin([0,100]);var r=function getSaturationRange(t){return getColorInfo(t).saturationRange}(t),n=r[0],i=r[1];switch(e.luminosity){case"bright":n=55;break;case"dark":n=i-10;break;case"light":i=55}return randomWithin([n,i])}function pickBrightness(t,e,r){var n=function getMinimumBrightness(t,e){for(var r=getColorInfo(t).lowerBounds,n=0;n<r.length-1;n++){var i=r[n][0],a=r[n][1],o=r[n+1][0],s=r[n+1][1];if(e>=i&&e<=o){var u=(s-a)/(o-i);return u*e+(a-u*i)}}return 0}(t,e),i=100;switch(r.luminosity){case"dark":i=n+20;break;case"light":n=(i+n)/2;break;case"random":n=0,i=100}return randomWithin([n,i])}function setFormat(t,e){switch(e.format){case"hsvArray":return t;case"hslArray":return HSVtoHSL(t);case"hsl":var r=HSVtoHSL(t);return"hsl("+r[0]+", "+r[1]+"%, "+r[2]+"%)";case"hsla":var n=HSVtoHSL(t),i=e.alpha||Math.random();return"hsla("+n[0]+", "+n[1]+"%, "+n[2]+"%, "+i+")";case"rgbArray":return HSVtoRGB(t);case"rgb":return"rgb("+HSVtoRGB(t).join(", ")+")";case"rgba":var a=HSVtoRGB(t);i=e.alpha||Math.random();return"rgba("+a.join(", ")+", "+i+")";default:return function HSVtoHex(t){var e=HSVtoRGB(t);function componentToHex(t){var e=t.toString(16);return 1==e.length?"0"+e:e}return"#"+componentToHex(e[0])+componentToHex(e[1])+componentToHex(e[2])}(t)}}function getColorInfo(t){for(var r in t>=334&&t<=360&&(t-=360),e){var n=e[r];if(n.hueRange&&t>=n.hueRange[0]&&t<=n.hueRange[1])return e[r]}return"Color not found"}function randomWithin(e){if(null===t){var r=Math.random();return r+=.618033988749895,r%=1,Math.floor(e[0]+r*(e[1]+1-e[0]))}var n=e[1]||1,i=e[0]||0,a=(t=(9301*t+49297)%233280)/233280;return Math.floor(i+a*(n-i))}function defineColor(t,r,n){var i=n[0][0],a=n[n.length-1][0],o=n[n.length-1][1],s=n[0][1];e[t]={hueRange:r,lowerBounds:n,saturationRange:[i,a],brightnessRange:[o,s]}}function HSVtoRGB(t){var e=t[0];0===e&&(e=1),360===e&&(e=359),e/=360;var r=t[1]/100,n=t[2]/100,i=Math.floor(6*e),a=6*e-i,o=n*(1-r),s=n*(1-a*r),u=n*(1-(1-a)*r),c=256,l=256,f=256;switch(i){case 0:c=n,l=u,f=o;break;case 1:c=s,l=n,f=o;break;case 2:c=o,l=n,f=u;break;case 3:c=o,l=s,f=n;break;case 4:c=u,l=o,f=n;break;case 5:c=n,l=o,f=s}return[Math.floor(255*c),Math.floor(255*l),Math.floor(255*f)]}function HexToHSB(t){t=3===(t=t.replace(/^#/,"")).length?t.replace(/(.)/g,"$1$1"):t;var e=parseInt(t.substr(0,2),16)/255,r=parseInt(t.substr(2,2),16)/255,n=parseInt(t.substr(4,2),16)/255,i=Math.max(e,r,n),a=i-Math.min(e,r,n),o=i?a/i:0;switch(i){case e:return[(r-n)/a%6*60||0,o,i];case r:return[60*((n-e)/a+2)||0,o,i];case n:return[60*((e-r)/a+4)||0,o,i]}}function HSVtoHSL(t){var e=t[0],r=t[1]/100,n=t[2]/100,i=(2-r)*n;return[e,Math.round(r*n/(i<1?i:2-i)*1e4)/100,i/2*100]}return function randomColor(e){if(void 0!==(e=e||{}).seed&&null!==e.seed&&e.seed===parseInt(e.seed,10))t=e.seed;else if("string"===typeof e.seed)t=function stringToInteger(t){for(var e=0,r=0;r!==t.length&&!(e>=Number.MAX_SAFE_INTEGER);r++)e+=t.charCodeAt(r);return e}(e.seed);else{if(void 0!==e.seed&&null!==e.seed)throw new TypeError("The seed value must be an integer or string");t=null}var n,i;if(null!==e.count&&void 0!==e.count){for(var a=e.count,o=[],s=0;s<e.count;s++)r.push(!1);for(e.count=null;a>o.length;)t&&e.seed&&(e.seed+=1),o.push(randomColor(e));return e.count=a,o}return setFormat([n=pickHue(e),i=pickSaturation(n,e),pickBrightness(n,i,e)],e)}}();t&&t.exports&&(e=t.exports=i),e.randomColor=i}()}).call(this,r(30)(t))},function(t,e,r){"use strict";r(5);r.d(e,"a",(function(){return n}));"undefined"!==typeof window&&function getUrlParameter(t){var e=window.location;t=t.replace(/[[]/,"\\[").replace(/[\]]/,"\\]");var r=new RegExp("[\\?&]".concat(t,"=([^&#]*)")).exec(e.search);return null===r?null:decodeURIComponent(r[1].replace(/\+/g," "))}("unlogger");var n="4bc98019-8277-4fe0-867c-ed21ea843cc5"},function(t,e,r){"use strict";r.r(e),function(t){r(24);var e=r(15),n=r(1);self;self.onmessage=function(t){const{messages:r,dbcText:i,canStartTime:a}=t.data,o=new e.a(i);Object.keys(r).forEach(t=>{let e=null;const i=r[t],a=[];i.entries=i.entries.map(t=>(e=t.hexData?n.a.reparseMessage(o,t,e):n.a.parseMessage(o,t.time,t.address,t.data,t.timeStart,e),a.push(e.byteStateChangeCounts),e=e.msgEntry)),i.byteStateChangeCounts=a.reduce((t,e)=>t?t.map((t,r)=>e[r]+t):e,null),r[t]=i}),self.postMessage({messages:r}),self.close()}}.call(this,r(10).Buffer)},function(t,e,r){"use strict";e.byteLength=function byteLength(t){var e=getLens(t),r=e[0],n=e[1];return 3*(r+n)/4-n},e.toByteArray=function toByteArray(t){var e,r,n=getLens(t),o=n[0],s=n[1],u=new a(function _byteLength(t,e,r){return 3*(e+r)/4-r}(0,o,s)),c=0,l=s>0?o-4:o;for(r=0;r<l;r+=4)e=i[t.charCodeAt(r)]<<18|i[t.charCodeAt(r+1)]<<12|i[t.charCodeAt(r+2)]<<6|i[t.charCodeAt(r+3)],u[c++]=e>>16&255,u[c++]=e>>8&255,u[c++]=255&e;2===s&&(e=i[t.charCodeAt(r)]<<2|i[t.charCodeAt(r+1)]>>4,u[c++]=255&e);1===s&&(e=i[t.charCodeAt(r)]<<10|i[t.charCodeAt(r+1)]<<4|i[t.charCodeAt(r+2)]>>2,u[c++]=e>>8&255,u[c++]=255&e);return u},e.fromByteArray=function fromByteArray(t){for(var e,r=t.length,i=r%3,a=[],o=0,s=r-i;o<s;o+=16383)a.push(encodeChunk(t,o,o+16383>s?s:o+16383));1===i?(e=t[r-1],a.push(n[e>>2]+n[e<<4&63]+"==")):2===i&&(e=(t[r-2]<<8)+t[r-1],a.push(n[e>>10]+n[e>>4&63]+n[e<<2&63]+"="));return a.join("")};for(var n=[],i=[],a="undefined"!==typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,u=o.length;s<u;++s)n[s]=o[s],i[o.charCodeAt(s)]=s;function getLens(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function encodeChunk(t,e,r){for(var i,a,o=[],s=e;s<r;s+=3)i=(t[s]<<16&16711680)+(t[s+1]<<8&65280)+(255&t[s+2]),o.push(n[(a=i)>>18&63]+n[a>>12&63]+n[a>>6&63]+n[63&a]);return o.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(t,e){e.read=function(t,e,r,n,i){var a,o,s=8*i-n-1,u=(1<<s)-1,c=u>>1,l=-7,f=r?i-1:0,h=r?-1:1,p=t[e+f];for(f+=h,a=p&(1<<-l)-1,p>>=-l,l+=s;l>0;a=256*a+t[e+f],f+=h,l-=8);for(o=a&(1<<-l)-1,a>>=-l,l+=n;l>0;o=256*o+t[e+f],f+=h,l-=8);if(0===a)a=1-c;else{if(a===u)return o?NaN:1/0*(p?-1:1);o+=Math.pow(2,n),a-=c}return(p?-1:1)*o*Math.pow(2,a-n)},e.write=function(t,e,r,n,i,a){var o,s,u,c=8*a-i-1,l=(1<<c)-1,f=l>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:a-1,d=n?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,o=l):(o=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-o))<1&&(o--,u*=2),(e+=o+f>=1?h/u:h*Math.pow(2,1-f))*u>=2&&(o++,u/=2),o+f>=l?(s=0,o=l):o+f>=1?(s=(e*u-1)*Math.pow(2,i),o+=f):(s=e*Math.pow(2,f-1)*Math.pow(2,i),o=0));i>=8;t[r+p]=255&s,p+=d,s/=256,i-=8);for(o=o<<i|s,c+=i;c>0;t[r+p]=255&o,p+=d,o/=256,c-=8);t[r+p-d]|=128*g}},function(t,e){var r={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==r.call(t)}},function(t,e,r){"use strict";r(14)},function(t,e,r){(function(e){var n=r(26),i=r(13),a=r(27),o=r(28),s=r(11),u=s.isErrorEvent,c=s.isDOMError,l=s.isDOMException,f=s.isError,h=s.isObject,p=s.isPlainObject,d=s.isUndefined,g=s.isFunction,m=s.isString,_=s.isArray,v=s.isEmptyObject,y=s.each,b=s.objectMerge,w=s.truncate,E=s.objectFrozen,S=s.hasKey,B=s.joinRegExp,x=s.urlencode,O=s.uuid4,T=s.htmlTreeAsString,k=s.isSameException,I=s.isSameStacktrace,C=s.parseUrl,U=s.fill,R=s.supportsFetch,A=s.supportsReferrerPolicy,M=s.serializeKeysForMessage,j=s.serializeException,N=s.sanitize,L=r(29).wrapMethod,P="source protocol user pass host port path".split(" "),D=/^(?:(\w+):)?\/\/(?:(\w+)(:\w+)?@)?([\w\.-]+)(?::(\d+))?(\/.*)/;function now(){return+new Date}var F="undefined"!==typeof window?window:"undefined"!==typeof e?e:"undefined"!==typeof self?self:{},H=F.document,z=F.navigator;function keepOriginalCallback(t,e){return g(e)?function(r){return e(r,t)}:e}function Raven(){for(var t in this._hasJSON=!("object"!==typeof JSON||!JSON.stringify),this._hasDocument=!d(H),this._hasNavigator=!d(z),this._lastCapturedException=null,this._lastData=null,this._lastEventId=null,this._globalServer=null,this._globalKey=null,this._globalProject=null,this._globalContext={},this._globalOptions={release:F.SENTRY_RELEASE&&F.SENTRY_RELEASE.id,logger:"javascript",ignoreErrors:[],ignoreUrls:[],whitelistUrls:[],includePaths:[],headers:null,collectWindowErrors:!0,captureUnhandledRejections:!0,maxMessageLength:0,maxUrlLength:250,stackTraceLimit:50,autoBreadcrumbs:!0,instrument:!0,sampleRate:1,sanitizeKeys:[]},this._fetchDefaults={method:"POST",referrerPolicy:A()?"origin":""},this._ignoreOnError=0,this._isRavenInstalled=!1,this._originalErrorStackTraceLimit=Error.stackTraceLimit,this._originalConsole=F.console||{},this._originalConsoleMethods={},this._plugins=[],this._startTime=now(),this._wrappedBuiltIns=[],this._breadcrumbs=[],this._lastCapturedEvent=null,this._keypressTimeout,this._location=F.location,this._lastHref=this._location&&this._location.href,this._resetBackoff(),this._originalConsole)this._originalConsoleMethods[t]=this._originalConsole[t]}Raven.prototype={VERSION:"3.27.2",debug:!1,TraceKit:n,config:function config(t,e){var r=this;if(r._globalServer)return this._logDebug("error","Error: Raven has already been configured"),r;if(!t)return r;var i=r._globalOptions;e&&y(e,(function(t,e){"tags"===t||"extra"===t||"user"===t?r._globalContext[t]=e:i[t]=e})),r.setDSN(t),i.ignoreErrors.push(/^Script error\.?$/),i.ignoreErrors.push(/^Javascript error: Script error\.? on line 0$/),i.ignoreErrors=B(i.ignoreErrors),i.ignoreUrls=!!i.ignoreUrls.length&&B(i.ignoreUrls),i.whitelistUrls=!!i.whitelistUrls.length&&B(i.whitelistUrls),i.includePaths=B(i.includePaths),i.maxBreadcrumbs=Math.max(0,Math.min(i.maxBreadcrumbs||100,100));var a={xhr:!0,console:!0,dom:!0,location:!0,sentry:!0},o=i.autoBreadcrumbs;"[object Object]"==={}.toString.call(o)?o=b(a,o):!1!==o&&(o=a),i.autoBreadcrumbs=o;var s={tryCatch:!0},u=i.instrument;return"[object Object]"==={}.toString.call(u)?u=b(s,u):!1!==u&&(u=s),i.instrument=u,n.collectWindowErrors=!!i.collectWindowErrors,r},install:function install(){var t=this;return t.isSetup()&&!t._isRavenInstalled&&(n.report.subscribe((function(){t._handleOnErrorStackInfo.apply(t,arguments)})),t._globalOptions.captureUnhandledRejections&&t._attachPromiseRejectionHandler(),t._patchFunctionToString(),t._globalOptions.instrument&&t._globalOptions.instrument.tryCatch&&t._instrumentTryCatch(),t._globalOptions.autoBreadcrumbs&&t._instrumentBreadcrumbs(),t._drainPlugins(),t._isRavenInstalled=!0),Error.stackTraceLimit=t._globalOptions.stackTraceLimit,this},setDSN:function setDSN(t){var e=this._parseDSN(t),r=e.path.lastIndexOf("/"),n=e.path.substr(1,r);this._dsn=t,this._globalKey=e.user,this._globalSecret=e.pass&&e.pass.substr(1),this._globalProject=e.path.substr(r+1),this._globalServer=this._getGlobalServer(e),this._globalEndpoint=this._globalServer+"/"+n+"api/"+this._globalProject+"/store/",this._resetBackoff()},context:function context(t,e,r){return g(t)&&(r=e||[],e=t,t={}),this.wrap(t,e).apply(this,r)},wrap:function wrap(t,e,r){var n=this;if(d(e)&&!g(t))return t;if(g(t)&&(e=t,t=void 0),!g(e))return e;try{if(e.__raven__)return e;if(e.__raven_wrapper__)return e.__raven_wrapper__}catch(a){return e}function wrapped(){var i=[],o=arguments.length,s=!t||t&&!1!==t.deep;for(r&&g(r)&&r.apply(this,arguments);o--;)i[o]=s?n.wrap(t,arguments[o]):arguments[o];try{return e.apply(this,i)}catch(a){throw n._ignoreNextOnError(),n.captureException(a,t),a}}for(var i in e)S(e,i)&&(wrapped[i]=e[i]);return wrapped.prototype=e.prototype,e.__raven_wrapper__=wrapped,wrapped.__raven__=!0,wrapped.__orig__=e,wrapped},uninstall:function uninstall(){return n.report.uninstall(),this._detachPromiseRejectionHandler(),this._unpatchFunctionToString(),this._restoreBuiltIns(),this._restoreConsole(),Error.stackTraceLimit=this._originalErrorStackTraceLimit,this._isRavenInstalled=!1,this},_promiseRejectionHandler:function _promiseRejectionHandler(t){this._logDebug("debug","Raven caught unhandled promise rejection:",t),this.captureException(t.reason,{mechanism:{type:"onunhandledrejection",handled:!1}})},_attachPromiseRejectionHandler:function _attachPromiseRejectionHandler(){return this._promiseRejectionHandler=this._promiseRejectionHandler.bind(this),F.addEventListener&&F.addEventListener("unhandledrejection",this._promiseRejectionHandler),this},_detachPromiseRejectionHandler:function _detachPromiseRejectionHandler(){return F.removeEventListener&&F.removeEventListener("unhandledrejection",this._promiseRejectionHandler),this},captureException:function captureException(t,e){if(e=b({trimHeadFrames:0},e||{}),u(t)&&t.error)t=t.error;else{if(c(t)||l(t)){var r=t.name||(c(t)?"DOMError":"DOMException"),i=t.message?r+": "+t.message:r;return this.captureMessage(i,b(e,{stacktrace:!0,trimHeadFrames:e.trimHeadFrames+1}))}if(f(t))t=t;else{if(!p(t))return this.captureMessage(t,b(e,{stacktrace:!0,trimHeadFrames:e.trimHeadFrames+1}));e=this._getCaptureExceptionOptionsFromPlainObject(e,t),t=new Error(e.message)}}this._lastCapturedException=t;try{var a=n.computeStackTrace(t);this._handleStackInfo(a,e)}catch(o){if(t!==o)throw o}return this},_getCaptureExceptionOptionsFromPlainObject:function _getCaptureExceptionOptionsFromPlainObject(t,e){var r=Object.keys(e).sort(),n=b(t,{message:"Non-Error exception captured with keys: "+M(r),fingerprint:[a(r)],extra:t.extra||{}});return n.extra.__serialized__=j(e),n},captureMessage:function captureMessage(t,e){if(!this._globalOptions.ignoreErrors.test||!this._globalOptions.ignoreErrors.test(t)){var r,i=b({message:t+=""},e=e||{});try{throw new Error(t)}catch(c){r=c}r.name=null;var a=n.computeStackTrace(r),o=_(a.stack)&&a.stack[1];o&&"Raven.captureException"===o.func&&(o=a.stack[2]);var s=o&&o.url||"";if((!this._globalOptions.ignoreUrls.test||!this._globalOptions.ignoreUrls.test(s))&&(!this._globalOptions.whitelistUrls.test||this._globalOptions.whitelistUrls.test(s))){if(this._globalOptions.stacktrace||e.stacktrace||""===i.message){i.fingerprint=null==i.fingerprint?t:i.fingerprint,(e=b({trimHeadFrames:0},e)).trimHeadFrames+=1;var u=this._prepareFrames(a,e);i.stacktrace={frames:u.reverse()}}return i.fingerprint&&(i.fingerprint=_(i.fingerprint)?i.fingerprint:[i.fingerprint]),this._send(i),this}}},captureBreadcrumb:function captureBreadcrumb(t){var e=b({timestamp:now()/1e3},t);if(g(this._globalOptions.breadcrumbCallback)){var r=this._globalOptions.breadcrumbCallback(e);if(h(r)&&!v(r))e=r;else if(!1===r)return this}return this._breadcrumbs.push(e),this._breadcrumbs.length>this._globalOptions.maxBreadcrumbs&&this._breadcrumbs.shift(),this},addPlugin:function addPlugin(t){var e=[].slice.call(arguments,1);return this._plugins.push([t,e]),this._isRavenInstalled&&this._drainPlugins(),this},setUserContext:function setUserContext(t){return this._globalContext.user=t,this},setExtraContext:function setExtraContext(t){return this._mergeContext("extra",t),this},setTagsContext:function setTagsContext(t){return this._mergeContext("tags",t),this},clearContext:function clearContext(){return this._globalContext={},this},getContext:function getContext(){return JSON.parse(i(this._globalContext))},setEnvironment:function setEnvironment(t){return this._globalOptions.environment=t,this},setRelease:function setRelease(t){return this._globalOptions.release=t,this},setDataCallback:function setDataCallback(t){var e=this._globalOptions.dataCallback;return this._globalOptions.dataCallback=keepOriginalCallback(e,t),this},setBreadcrumbCallback:function setBreadcrumbCallback(t){var e=this._globalOptions.breadcrumbCallback;return this._globalOptions.breadcrumbCallback=keepOriginalCallback(e,t),this},setShouldSendCallback:function setShouldSendCallback(t){var e=this._globalOptions.shouldSendCallback;return this._globalOptions.shouldSendCallback=keepOriginalCallback(e,t),this},setTransport:function setTransport(t){return this._globalOptions.transport=t,this},lastException:function lastException(){return this._lastCapturedException},lastEventId:function lastEventId(){return this._lastEventId},isSetup:function isSetup(){return!!this._hasJSON&&(!!this._globalServer||(this.ravenNotConfiguredError||(this.ravenNotConfiguredError=!0,this._logDebug("error","Error: Raven has not been configured.")),!1))},afterLoad:function afterLoad(){var t=F.RavenConfig;t&&this.config(t.dsn,t.config).install()},showReportDialog:function showReportDialog(t){if(H){if(!(t=b({eventId:this.lastEventId(),dsn:this._dsn,user:this._globalContext.user||{}},t)).eventId)throw new o("Missing eventId");if(!t.dsn)throw new o("Missing DSN");var e=encodeURIComponent,r=[];for(var n in t)if("user"===n){var i=t.user;i.name&&r.push("name="+e(i.name)),i.email&&r.push("email="+e(i.email))}else r.push(e(n)+"="+e(t[n]));var a=this._getGlobalServer(this._parseDSN(t.dsn)),s=H.createElement("script");s.async=!0,s.src=a+"/api/embed/error-page/?"+r.join("&"),(H.head||H.body).appendChild(s)}},_ignoreNextOnError:function _ignoreNextOnError(){var t=this;this._ignoreOnError+=1,setTimeout((function(){t._ignoreOnError-=1}))},_triggerEvent:function _triggerEvent(t,e){var r,n;if(this._hasDocument){for(n in e=e||{},t="raven"+t.substr(0,1).toUpperCase()+t.substr(1),H.createEvent?(r=H.createEvent("HTMLEvents")).initEvent(t,!0,!0):(r=H.createEventObject()).eventType=t,e)S(e,n)&&(r[n]=e[n]);if(H.createEvent)H.dispatchEvent(r);else try{H.fireEvent("on"+r.eventType.toLowerCase(),r)}catch(i){}}},_breadcrumbEventHandler:function _breadcrumbEventHandler(t){var e=this;return function(r){if(e._keypressTimeout=null,e._lastCapturedEvent!==r){var n;e._lastCapturedEvent=r;try{n=T(r.target)}catch(i){n="<unknown>"}e.captureBreadcrumb({category:"ui."+t,message:n})}}},_keypressEventHandler:function _keypressEventHandler(){var t=this;return function(e){var r;try{r=e.target}catch(a){return}var n=r&&r.tagName;if(n&&("INPUT"===n||"TEXTAREA"===n||r.isContentEditable)){var i=t._keypressTimeout;i||t._breadcrumbEventHandler("input")(e),clearTimeout(i),t._keypressTimeout=setTimeout((function(){t._keypressTimeout=null}),1e3)}}},_captureUrlChange:function _captureUrlChange(t,e){var r=C(this._location.href),n=C(e),i=C(t);this._lastHref=e,r.protocol===n.protocol&&r.host===n.host&&(e=n.relative),r.protocol===i.protocol&&r.host===i.host&&(t=i.relative),this.captureBreadcrumb({category:"navigation",data:{to:e,from:t}})},_patchFunctionToString:function _patchFunctionToString(){var t=this;t._originalFunctionToString=Function.prototype.toString,Function.prototype.toString=function(){return"function"===typeof this&&this.__raven__?t._originalFunctionToString.apply(this.__orig__,arguments):t._originalFunctionToString.apply(this,arguments)}},_unpatchFunctionToString:function _unpatchFunctionToString(){this._originalFunctionToString&&(Function.prototype.toString=this._originalFunctionToString)},_instrumentTryCatch:function _instrumentTryCatch(){var t=this,e=t._wrappedBuiltIns;function wrapTimeFn(e){return function(r,n){for(var i=new Array(arguments.length),a=0;a<i.length;++a)i[a]=arguments[a];var o=i[0];return g(o)&&(i[0]=t.wrap({mechanism:{type:"instrument",data:{function:e.name||"<anonymous>"}}},o)),e.apply?e.apply(this,i):e(i[0],i[1])}}var r=this._globalOptions.autoBreadcrumbs;function wrapEventTarget(n){var i=F[n]&&F[n].prototype;i&&i.hasOwnProperty&&i.hasOwnProperty("addEventListener")&&(U(i,"addEventListener",(function(e){return function(i,a,o,s){try{a&&a.handleEvent&&(a.handleEvent=t.wrap({mechanism:{type:"instrument",data:{target:n,function:"handleEvent",handler:a&&a.name||"<anonymous>"}}},a.handleEvent))}catch(f){}var u,c,l;return r&&r.dom&&("EventTarget"===n||"Node"===n)&&(c=t._breadcrumbEventHandler("click"),l=t._keypressEventHandler(),u=function before(t){if(t){var e;try{e=t.type}catch(r){return}return"click"===e?c(t):"keypress"===e?l(t):void 0}}),e.call(this,i,t.wrap({mechanism:{type:"instrument",data:{target:n,function:"addEventListener",handler:a&&a.name||"<anonymous>"}}},a,u),o,s)}}),e),U(i,"removeEventListener",(function(t){return function(e,r,n,i){try{r=r&&(r.__raven_wrapper__?r.__raven_wrapper__:r)}catch(a){}return t.call(this,e,r,n,i)}}),e))}U(F,"setTimeout",wrapTimeFn,e),U(F,"setInterval",wrapTimeFn,e),F.requestAnimationFrame&&U(F,"requestAnimationFrame",(function(e){return function(r){return e(t.wrap({mechanism:{type:"instrument",data:{function:"requestAnimationFrame",handler:e&&e.name||"<anonymous>"}}},r))}}),e);for(var n=["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"],i=0;i<n.length;i++)wrapEventTarget(n[i])},_instrumentBreadcrumbs:function _instrumentBreadcrumbs(){var t=this,e=this._globalOptions.autoBreadcrumbs,r=t._wrappedBuiltIns;function wrapProp(e,r){e in r&&g(r[e])&&U(r,e,(function(r){return t.wrap({mechanism:{type:"instrument",data:{function:e,handler:r&&r.name||"<anonymous>"}}},r)}))}if(e.xhr&&"XMLHttpRequest"in F){var n=F.XMLHttpRequest&&F.XMLHttpRequest.prototype;U(n,"open",(function(e){return function(r,n){return m(n)&&-1===n.indexOf(t._globalKey)&&(this.__raven_xhr={method:r,url:n,status_code:null}),e.apply(this,arguments)}}),r),U(n,"send",(function(e){return function(){var r=this;function onreadystatechangeHandler(){if(r.__raven_xhr&&4===r.readyState){try{r.__raven_xhr.status_code=r.status}catch(e){}t.captureBreadcrumb({type:"http",category:"xhr",data:r.__raven_xhr})}}for(var n=["onload","onerror","onprogress"],i=0;i<n.length;i++)wrapProp(n[i],r);return"onreadystatechange"in r&&g(r.onreadystatechange)?U(r,"onreadystatechange",(function(e){return t.wrap({mechanism:{type:"instrument",data:{function:"onreadystatechange",handler:e&&e.name||"<anonymous>"}}},e,onreadystatechangeHandler)})):r.onreadystatechange=onreadystatechangeHandler,e.apply(this,arguments)}}),r)}e.xhr&&R()&&U(F,"fetch",(function(e){return function(){for(var r=new Array(arguments.length),n=0;n<r.length;++n)r[n]=arguments[n];var i,a=r[0],o="GET";if("string"===typeof a?i=a:"Request"in F&&a instanceof F.Request?(i=a.url,a.method&&(o=a.method)):i=""+a,-1!==i.indexOf(t._globalKey))return e.apply(this,r);r[1]&&r[1].method&&(o=r[1].method);var s={method:o,url:i,status_code:null};return e.apply(this,r).then((function(e){return s.status_code=e.status,t.captureBreadcrumb({type:"http",category:"fetch",data:s}),e})).catch((function(e){throw t.captureBreadcrumb({type:"http",category:"fetch",data:s,level:"error"}),e}))}}),r),e.dom&&this._hasDocument&&(H.addEventListener?(H.addEventListener("click",t._breadcrumbEventHandler("click"),!1),H.addEventListener("keypress",t._keypressEventHandler(),!1)):H.attachEvent&&(H.attachEvent("onclick",t._breadcrumbEventHandler("click")),H.attachEvent("onkeypress",t._keypressEventHandler())));var i=F.chrome,a=!(i&&i.app&&i.app.runtime)&&F.history&&F.history.pushState&&F.history.replaceState;if(e.location&&a){var o=F.onpopstate;F.onpopstate=function(){var e=t._location.href;if(t._captureUrlChange(t._lastHref,e),o)return o.apply(this,arguments)};var s=function historyReplacementFunction(e){return function(){var r=arguments.length>2?arguments[2]:void 0;return r&&t._captureUrlChange(t._lastHref,r+""),e.apply(this,arguments)}};U(F.history,"pushState",s,r),U(F.history,"replaceState",s,r)}if(e.console&&"console"in F&&console.log){var u=function consoleMethodCallback(e,r){t.captureBreadcrumb({message:e,level:r.level,category:"console"})};y(["debug","info","warn","error","log"],(function(t,e){L(console,e,u)}))}},_restoreBuiltIns:function _restoreBuiltIns(){for(var t;this._wrappedBuiltIns.length;){var e=(t=this._wrappedBuiltIns.shift())[0],r=t[1],n=t[2];e[r]=n}},_restoreConsole:function _restoreConsole(){for(var t in this._originalConsoleMethods)this._originalConsole[t]=this._originalConsoleMethods[t]},_drainPlugins:function _drainPlugins(){var t=this;y(this._plugins,(function(e,r){var n=r[0],i=r[1];n.apply(t,[t].concat(i))}))},_parseDSN:function _parseDSN(t){var e=D.exec(t),r={},n=7;try{for(;n--;)r[P[n]]=e[n]||""}catch(i){throw new o("Invalid DSN: "+t)}if(r.pass&&!this._globalOptions.allowSecretKey)throw new o("Do not specify your secret key in the DSN. See: http://bit.ly/raven-secret-key");return r},_getGlobalServer:function _getGlobalServer(t){var e="//"+t.host+(t.port?":"+t.port:"");return t.protocol&&(e=t.protocol+":"+e),e},_handleOnErrorStackInfo:function _handleOnErrorStackInfo(t,e){(e=e||{}).mechanism=e.mechanism||{type:"onerror",handled:!1},this._ignoreOnError||this._handleStackInfo(t,e)},_handleStackInfo:function _handleStackInfo(t,e){var r=this._prepareFrames(t,e);this._triggerEvent("handle",{stackInfo:t,options:e}),this._processException(t.name,t.message,t.url,t.lineno,r,e)},_prepareFrames:function _prepareFrames(t,e){var r=this,n=[];if(t.stack&&t.stack.length&&(y(t.stack,(function(e,i){var a=r._normalizeFrame(i,t.url);a&&n.push(a)})),e&&e.trimHeadFrames))for(var i=0;i<e.trimHeadFrames&&i<n.length;i++)n[i].in_app=!1;return n=n.slice(0,this._globalOptions.stackTraceLimit)},_normalizeFrame:function _normalizeFrame(t,e){var r={filename:t.url,lineno:t.line,colno:t.column,function:t.func||"?"};return t.url||(r.filename=e),r.in_app=!(this._globalOptions.includePaths.test&&!this._globalOptions.includePaths.test(r.filename)||/(Raven|TraceKit)\./.test(r.function)||/raven\.(min\.)?js$/.test(r.filename)),r},_processException:function _processException(t,e,r,n,i,a){var o,s=(t?t+": ":"")+(e||"");if((!this._globalOptions.ignoreErrors.test||!this._globalOptions.ignoreErrors.test(e)&&!this._globalOptions.ignoreErrors.test(s))&&(i&&i.length?(r=i[0].filename||r,i.reverse(),o={frames:i}):r&&(o={frames:[{filename:r,lineno:n,in_app:!0}]}),(!this._globalOptions.ignoreUrls.test||!this._globalOptions.ignoreUrls.test(r))&&(!this._globalOptions.whitelistUrls.test||this._globalOptions.whitelistUrls.test(r)))){var u=b({exception:{values:[{type:t,value:e,stacktrace:o}]},transaction:r},a),c=u.exception.values[0];null==c.type&&""===c.value&&(c.value="Unrecoverable error caught"),!u.exception.mechanism&&u.mechanism&&(u.exception.mechanism=u.mechanism,delete u.mechanism),u.exception.mechanism=b({type:"generic",handled:!0},u.exception.mechanism||{}),this._send(u)}},_trimPacket:function _trimPacket(t){var e=this._globalOptions.maxMessageLength;if(t.message&&(t.message=w(t.message,e)),t.exception){var r=t.exception.values[0];r.value=w(r.value,e)}var n=t.request;return n&&(n.url&&(n.url=w(n.url,this._globalOptions.maxUrlLength)),n.Referer&&(n.Referer=w(n.Referer,this._globalOptions.maxUrlLength))),t.breadcrumbs&&t.breadcrumbs.values&&this._trimBreadcrumbs(t.breadcrumbs),t},_trimBreadcrumbs:function _trimBreadcrumbs(t){for(var e,r,n,i=["to","from","url"],a=0;a<t.values.length;++a)if((r=t.values[a]).hasOwnProperty("data")&&h(r.data)&&!E(r.data)){n=b({},r.data);for(var o=0;o<i.length;++o)e=i[o],n.hasOwnProperty(e)&&n[e]&&(n[e]=w(n[e],this._globalOptions.maxUrlLength));t.values[a].data=n}},_getHttpData:function _getHttpData(){if(this._hasNavigator||this._hasDocument){var t={};return this._hasNavigator&&z.userAgent&&(t.headers={"User-Agent":z.userAgent}),F.location&&F.location.href&&(t.url=F.location.href),this._hasDocument&&H.referrer&&(t.headers||(t.headers={}),t.headers.Referer=H.referrer),t}},_resetBackoff:function _resetBackoff(){this._backoffDuration=0,this._backoffStart=null},_shouldBackoff:function _shouldBackoff(){return this._backoffDuration&&now()-this._backoffStart<this._backoffDuration},_isRepeatData:function _isRepeatData(t){var e=this._lastData;return!(!e||t.message!==e.message||t.transaction!==e.transaction)&&(t.stacktrace||e.stacktrace?I(t.stacktrace,e.stacktrace):t.exception||e.exception?k(t.exception,e.exception):!t.fingerprint&&!e.fingerprint||Boolean(t.fingerprint&&e.fingerprint)&&JSON.stringify(t.fingerprint)===JSON.stringify(e.fingerprint))},_setBackoffState:function _setBackoffState(t){if(!this._shouldBackoff()){var e=t.status;if(400===e||401===e||429===e){var r;try{r=R()?t.headers.get("Retry-After"):t.getResponseHeader("Retry-After"),r=1e3*parseInt(r,10)}catch(n){}this._backoffDuration=r||(2*this._backoffDuration||1e3),this._backoffStart=now()}}},_send:function _send(t){var e=this._globalOptions,r={project:this._globalProject,logger:e.logger,platform:"javascript"},n=this._getHttpData();n&&(r.request=n),t.trimHeadFrames&&delete t.trimHeadFrames,(t=b(r,t)).tags=b(b({},this._globalContext.tags),t.tags),t.extra=b(b({},this._globalContext.extra),t.extra),t.extra["session:duration"]=now()-this._startTime,this._breadcrumbs&&this._breadcrumbs.length>0&&(t.breadcrumbs={values:[].slice.call(this._breadcrumbs,0)}),this._globalContext.user&&(t.user=this._globalContext.user),e.environment&&(t.environment=e.environment),e.release&&(t.release=e.release),e.serverName&&(t.server_name=e.serverName),t=this._sanitizeData(t),Object.keys(t).forEach((function(e){(null==t[e]||""===t[e]||v(t[e]))&&delete t[e]})),g(e.dataCallback)&&(t=e.dataCallback(t)||t),t&&!v(t)&&(g(e.shouldSendCallback)&&!e.shouldSendCallback(t)||(this._shouldBackoff()?this._logDebug("warn","Raven dropped error due to backoff: ",t):"number"===typeof e.sampleRate?Math.random()<e.sampleRate&&this._sendProcessedPayload(t):this._sendProcessedPayload(t)))},_sanitizeData:function _sanitizeData(t){return N(t,this._globalOptions.sanitizeKeys)},_getUuid:function _getUuid(){return O()},_sendProcessedPayload:function _sendProcessedPayload(t,e){var r=this,n=this._globalOptions;if(this.isSetup())if(t=this._trimPacket(t),this._globalOptions.allowDuplicates||!this._isRepeatData(t)){this._lastEventId=t.event_id||(t.event_id=this._getUuid()),this._lastData=t,this._logDebug("debug","Raven about to send:",t);var i={sentry_version:"7",sentry_client:"raven-js/"+this.VERSION,sentry_key:this._globalKey};this._globalSecret&&(i.sentry_secret=this._globalSecret);var a=t.exception&&t.exception.values[0];this._globalOptions.autoBreadcrumbs&&this._globalOptions.autoBreadcrumbs.sentry&&this.captureBreadcrumb({category:"sentry",message:a?(a.type?a.type+": ":"")+a.value:t.message,event_id:t.event_id,level:t.level||"error"});var o=this._globalEndpoint;(n.transport||this._makeRequest).call(this,{url:o,auth:i,data:t,options:n,onSuccess:function success(){r._resetBackoff(),r._triggerEvent("success",{data:t,src:o}),e&&e()},onError:function failure(n){r._logDebug("error","Raven transport failed to send: ",n),n.request&&r._setBackoffState(n.request),r._triggerEvent("failure",{data:t,src:o}),n=n||new Error("Raven send failed (no additional details provided)"),e&&e(n)}})}else this._logDebug("warn","Raven dropped repeat event: ",t)},_makeRequest:function _makeRequest(t){var e=t.url+"?"+x(t.auth),r=null,n={};if(t.options.headers&&(r=this._evaluateHash(t.options.headers)),t.options.fetchParameters&&(n=this._evaluateHash(t.options.fetchParameters)),R()){n.body=i(t.data);var a=b({},this._fetchDefaults),o=b(a,n);return r&&(o.headers=r),F.fetch(e,o).then((function(e){if(e.ok)t.onSuccess&&t.onSuccess();else{var r=new Error("Sentry error code: "+e.status);r.request=e,t.onError&&t.onError(r)}})).catch((function(){t.onError&&t.onError(new Error("Sentry error code: network unavailable"))}))}var s=F.XMLHttpRequest&&new F.XMLHttpRequest;s&&(("withCredentials"in s||"undefined"!==typeof XDomainRequest)&&("withCredentials"in s?s.onreadystatechange=function(){if(4===s.readyState)if(200===s.status)t.onSuccess&&t.onSuccess();else if(t.onError){var e=new Error("Sentry error code: "+s.status);e.request=s,t.onError(e)}}:(s=new XDomainRequest,e=e.replace(/^https?:/,""),t.onSuccess&&(s.onload=t.onSuccess),t.onError&&(s.onerror=function(){var e=new Error("Sentry error code: XDomainRequest");e.request=s,t.onError(e)})),s.open("POST",e),r&&y(r,(function(t,e){s.setRequestHeader(t,e)})),s.send(i(t.data))))},_evaluateHash:function _evaluateHash(t){var e={};for(var r in t)if(t.hasOwnProperty(r)){var n=t[r];e[r]="function"===typeof n?n():n}return e},_logDebug:function _logDebug(t){this._originalConsoleMethods[t]&&(this.debug||this._globalOptions.debug)&&Function.prototype.apply.call(this._originalConsoleMethods[t],this._originalConsole,[].slice.call(arguments,1))},_mergeContext:function _mergeContext(t,e){d(e)?delete this._globalContext[t]:this._globalContext[t]=b(this._globalContext[t]||{},e)}},Raven.prototype.setUser=Raven.prototype.setUserContext,Raven.prototype.setReleaseContext=Raven.prototype.setRelease,t.exports=Raven}).call(this,r(4))},function(t,e,r){(function(e){var n=r(11),i={collectWindowErrors:!0,debug:!1},a="undefined"!==typeof window?window:"undefined"!==typeof e?e:"undefined"!==typeof self?self:{},o=[].slice,s="?",u=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/;function getLocationHref(){return"undefined"===typeof document||null==document.location?"":document.location.href}i.report=function reportModuleWrapper(){var t,e,r=[],c=null,l=null,f=null;function notifyHandlers(t,e){var n=null;if(!e||i.collectWindowErrors){for(var a in r)if(r.hasOwnProperty(a))try{r[a].apply(null,[t].concat(o.call(arguments,2)))}catch(s){n=s}if(n)throw n}}function traceKitWindowOnError(e,r,a,o,c){var l=n.isErrorEvent(c)?c.error:c,h=n.isErrorEvent(e)?e.message:e;if(f)i.computeStackTrace.augmentStackTraceWithInitialElement(f,r,a,h),processLastException();else if(l&&n.isError(l))notifyHandlers(i.computeStackTrace(l),!0);else{var p,d={url:r,line:a,column:o},g=void 0;if("[object String]"==={}.toString.call(h))(p=h.match(u))&&(g=p[1],h=p[2]);d.func=s,notifyHandlers({name:g,message:h,url:getLocationHref(),stack:[d]},!0)}return!!t&&t.apply(this,arguments)}function processLastException(){var t=f,e=c;c=null,f=null,l=null,notifyHandlers.apply(null,[t,!1].concat(e))}function report(t,e){var r=o.call(arguments,1);if(f){if(l===t)return;processLastException()}var n=i.computeStackTrace(t);if(f=n,l=t,c=r,setTimeout((function(){l===t&&processLastException()}),n.incomplete?2e3:0),!1!==e)throw t}return report.subscribe=function subscribe(n){!function installGlobalHandler(){if(e)return;t=a.onerror,a.onerror=traceKitWindowOnError,e=!0}(),r.push(n)},report.unsubscribe=function unsubscribe(t){for(var e=r.length-1;e>=0;--e)r[e]===t&&r.splice(e,1)},report.uninstall=function unsubscribeAll(){!function uninstallGlobalHandler(){if(!e)return;a.onerror=t,e=!1,t=void 0}(),r=[]},report}(),i.computeStackTrace=function computeStackTraceWrapper(){function computeStackTraceFromStackProp(t){if("undefined"!==typeof t.stack&&t.stack){for(var e,r,n,i=/^\s*at (?:(.*?) ?\()?((?:file|https?|blob|chrome-extension|native|eval|webpack|<anonymous>|[a-z]:|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,a=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx(?:-web)|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,o=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|moz-extension).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js))(?::(\d+))?(?::(\d+))?\s*$/i,u=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,c=/\((\S*)(?::(\d+))(?::(\d+))\)/,l=t.stack.split("\n"),f=[],h=(/^(.*) is undefined$/.exec(t.message),0),p=l.length;h<p;++h){if(r=i.exec(l[h])){var d=r[2]&&0===r[2].indexOf("native");r[2]&&0===r[2].indexOf("eval")&&(e=c.exec(r[2]))&&(r[2]=e[1],r[3]=e[2],r[4]=e[3]),n={url:d?null:r[2],func:r[1]||s,args:d?[r[2]]:[],line:r[3]?+r[3]:null,column:r[4]?+r[4]:null}}else if(r=a.exec(l[h]))n={url:r[2],func:r[1]||s,args:[],line:+r[3],column:r[4]?+r[4]:null};else{if(!(r=o.exec(l[h])))continue;r[3]&&r[3].indexOf(" > eval")>-1&&(e=u.exec(r[3]))?(r[3]=e[1],r[4]=e[2],r[5]=null):0!==h||r[5]||"undefined"===typeof t.columnNumber||(f[0].column=t.columnNumber+1),n={url:r[3],func:r[1]||s,args:r[2]?r[2].split(","):[],line:r[4]?+r[4]:null,column:r[5]?+r[5]:null}}if(!n.func&&n.line&&(n.func=s),n.url&&"blob:"===n.url.substr(0,5)){var g=new XMLHttpRequest;if(g.open("GET",n.url,!1),g.send(null),200===g.status){var m=g.responseText||"",_=(m=m.slice(-300)).match(/\/\/# sourceMappingURL=(.*)$/);if(_){var v=_[1];"~"===v.charAt(0)&&(v=("undefined"===typeof document||null==document.location?"":document.location.origin?document.location.origin:document.location.protocol+"//"+document.location.hostname+(document.location.port?":"+document.location.port:""))+v.slice(1)),n.url=v.slice(0,-4)}}}f.push(n)}return f.length?{name:t.name,message:t.message,url:getLocationHref(),stack:f}:null}}function augmentStackTraceWithInitialElement(t,e,r,n){var i={url:e,line:r};if(i.url&&i.line){if(t.incomplete=!1,i.func||(i.func=s),t.stack.length>0&&t.stack[0].url===i.url){if(t.stack[0].line===i.line)return!1;if(!t.stack[0].line&&t.stack[0].func===i.func)return t.stack[0].line=i.line,!1}return t.stack.unshift(i),t.partial=!0,!0}return t.incomplete=!0,!1}function computeStackTraceByWalkingCallerChain(t,e){for(var r,n,a=/function\s+([_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*)?\s*\(/i,o=[],u={},c=!1,l=computeStackTraceByWalkingCallerChain.caller;l&&!c;l=l.caller)if(l!==computeStackTrace&&l!==i.report){if(n={url:null,func:s,line:null,column:null},l.name?n.func=l.name:(r=a.exec(l.toString()))&&(n.func=r[1]),"undefined"===typeof n.func)try{n.func=r.input.substring(0,r.input.indexOf("{"))}catch(h){}u[""+l]?c=!0:u[""+l]=!0,o.push(n)}e&&o.splice(0,e);var f={name:t.name,message:t.message,url:getLocationHref(),stack:o};return augmentStackTraceWithInitialElement(f,t.sourceURL||t.fileName,t.line||t.lineNumber,t.message||t.description),f}function computeStackTrace(t,e){var r=null;e=null==e?0:+e;try{if(r=computeStackTraceFromStackProp(t))return r}catch(n){if(i.debug)throw n}try{if(r=computeStackTraceByWalkingCallerChain(t,e+1))return r}catch(n){if(i.debug)throw n}return{name:t.name,message:t.message,url:getLocationHref()}}return computeStackTrace.augmentStackTraceWithInitialElement=augmentStackTraceWithInitialElement,computeStackTrace.computeStackTraceFromStackProp=computeStackTraceFromStackProp,computeStackTrace}(),t.exports=i}).call(this,r(4))},function(t,e){function safeAdd(t,e){var r=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(r>>16)<<16|65535&r}function md5cmn(t,e,r,n,i,a){return safeAdd(function bitRotateLeft(t,e){return t<<e|t>>>32-e}(safeAdd(safeAdd(e,t),safeAdd(n,a)),i),r)}function md5ff(t,e,r,n,i,a,o){return md5cmn(e&r|~e&n,t,e,i,a,o)}function md5gg(t,e,r,n,i,a,o){return md5cmn(e&n|r&~n,t,e,i,a,o)}function md5hh(t,e,r,n,i,a,o){return md5cmn(e^r^n,t,e,i,a,o)}function md5ii(t,e,r,n,i,a,o){return md5cmn(r^(e|~n),t,e,i,a,o)}function binlMD5(t,e){var r,n,i,a,o;t[e>>5]|=128<<e%32,t[14+(e+64>>>9<<4)]=e;var s=1732584193,u=-271733879,c=-1732584194,l=271733878;for(r=0;r<t.length;r+=16)n=s,i=u,a=c,o=l,s=md5ff(s,u,c,l,t[r],7,-680876936),l=md5ff(l,s,u,c,t[r+1],12,-389564586),c=md5ff(c,l,s,u,t[r+2],17,606105819),u=md5ff(u,c,l,s,t[r+3],22,-1044525330),s=md5ff(s,u,c,l,t[r+4],7,-176418897),l=md5ff(l,s,u,c,t[r+5],12,1200080426),c=md5ff(c,l,s,u,t[r+6],17,-1473231341),u=md5ff(u,c,l,s,t[r+7],22,-45705983),s=md5ff(s,u,c,l,t[r+8],7,1770035416),l=md5ff(l,s,u,c,t[r+9],12,-1958414417),c=md5ff(c,l,s,u,t[r+10],17,-42063),u=md5ff(u,c,l,s,t[r+11],22,-1990404162),s=md5ff(s,u,c,l,t[r+12],7,1804603682),l=md5ff(l,s,u,c,t[r+13],12,-40341101),c=md5ff(c,l,s,u,t[r+14],17,-1502002290),s=md5gg(s,u=md5ff(u,c,l,s,t[r+15],22,1236535329),c,l,t[r+1],5,-165796510),l=md5gg(l,s,u,c,t[r+6],9,-1069501632),c=md5gg(c,l,s,u,t[r+11],14,643717713),u=md5gg(u,c,l,s,t[r],20,-373897302),s=md5gg(s,u,c,l,t[r+5],5,-701558691),l=md5gg(l,s,u,c,t[r+10],9,38016083),c=md5gg(c,l,s,u,t[r+15],14,-660478335),u=md5gg(u,c,l,s,t[r+4],20,-405537848),s=md5gg(s,u,c,l,t[r+9],5,568446438),l=md5gg(l,s,u,c,t[r+14],9,-1019803690),c=md5gg(c,l,s,u,t[r+3],14,-187363961),u=md5gg(u,c,l,s,t[r+8],20,1163531501),s=md5gg(s,u,c,l,t[r+13],5,-1444681467),l=md5gg(l,s,u,c,t[r+2],9,-51403784),c=md5gg(c,l,s,u,t[r+7],14,1735328473),s=md5hh(s,u=md5gg(u,c,l,s,t[r+12],20,-1926607734),c,l,t[r+5],4,-378558),l=md5hh(l,s,u,c,t[r+8],11,-2022574463),c=md5hh(c,l,s,u,t[r+11],16,1839030562),u=md5hh(u,c,l,s,t[r+14],23,-35309556),s=md5hh(s,u,c,l,t[r+1],4,-1530992060),l=md5hh(l,s,u,c,t[r+4],11,1272893353),c=md5hh(c,l,s,u,t[r+7],16,-155497632),u=md5hh(u,c,l,s,t[r+10],23,-1094730640),s=md5hh(s,u,c,l,t[r+13],4,681279174),l=md5hh(l,s,u,c,t[r],11,-358537222),c=md5hh(c,l,s,u,t[r+3],16,-722521979),u=md5hh(u,c,l,s,t[r+6],23,76029189),s=md5hh(s,u,c,l,t[r+9],4,-640364487),l=md5hh(l,s,u,c,t[r+12],11,-421815835),c=md5hh(c,l,s,u,t[r+15],16,530742520),s=md5ii(s,u=md5hh(u,c,l,s,t[r+2],23,-995338651),c,l,t[r],6,-198630844),l=md5ii(l,s,u,c,t[r+7],10,1126891415),c=md5ii(c,l,s,u,t[r+14],15,-1416354905),u=md5ii(u,c,l,s,t[r+5],21,-57434055),s=md5ii(s,u,c,l,t[r+12],6,1700485571),l=md5ii(l,s,u,c,t[r+3],10,-1894986606),c=md5ii(c,l,s,u,t[r+10],15,-1051523),u=md5ii(u,c,l,s,t[r+1],21,-2054922799),s=md5ii(s,u,c,l,t[r+8],6,1873313359),l=md5ii(l,s,u,c,t[r+15],10,-30611744),c=md5ii(c,l,s,u,t[r+6],15,-1560198380),u=md5ii(u,c,l,s,t[r+13],21,1309151649),s=md5ii(s,u,c,l,t[r+4],6,-145523070),l=md5ii(l,s,u,c,t[r+11],10,-1120210379),c=md5ii(c,l,s,u,t[r+2],15,718787259),u=md5ii(u,c,l,s,t[r+9],21,-343485551),s=safeAdd(s,n),u=safeAdd(u,i),c=safeAdd(c,a),l=safeAdd(l,o);return[s,u,c,l]}function binl2rstr(t){var e,r="",n=32*t.length;for(e=0;e<n;e+=8)r+=String.fromCharCode(t[e>>5]>>>e%32&255);return r}function rstr2binl(t){var e,r=[];for(r[(t.length>>2)-1]=void 0,e=0;e<r.length;e+=1)r[e]=0;var n=8*t.length;for(e=0;e<n;e+=8)r[e>>5]|=(255&t.charCodeAt(e/8))<<e%32;return r}function rstr2hex(t){var e,r,n="";for(r=0;r<t.length;r+=1)e=t.charCodeAt(r),n+="0123456789abcdef".charAt(e>>>4&15)+"0123456789abcdef".charAt(15&e);return n}function str2rstrUTF8(t){return unescape(encodeURIComponent(t))}function rawMD5(t){return function rstrMD5(t){return binl2rstr(binlMD5(rstr2binl(t),8*t.length))}(str2rstrUTF8(t))}function rawHMACMD5(t,e){return function rstrHMACMD5(t,e){var r,n,i=rstr2binl(t),a=[],o=[];for(a[15]=o[15]=void 0,i.length>16&&(i=binlMD5(i,8*t.length)),r=0;r<16;r+=1)a[r]=909522486^i[r],o[r]=1549556828^i[r];return n=binlMD5(a.concat(rstr2binl(e)),512+8*e.length),binl2rstr(binlMD5(o.concat(n),640))}(str2rstrUTF8(t),str2rstrUTF8(e))}t.exports=function md5(t,e,r){return e?r?rawHMACMD5(e,t):function hexHMACMD5(t,e){return rstr2hex(rawHMACMD5(t,e))}(e,t):r?rawMD5(t):function hexMD5(t){return rstr2hex(rawMD5(t))}(t)}},function(t,e){function RavenConfigError(t){this.name="RavenConfigError",this.message=t}RavenConfigError.prototype=new Error,RavenConfigError.prototype.constructor=RavenConfigError,t.exports=RavenConfigError},function(t,e,r){var n=r(11);t.exports={wrapMethod:function wrapMethod(t,e,r){var i=t[e],a=t;if(e in t){var o="warn"===e?"warning":e;t[e]=function(){var t=[].slice.call(arguments),s=n.safeJoin(t," "),u={level:o,logger:"console",extra:{arguments:t}};"assert"===e?!1===t[0]&&(s="Assertion failed: "+(n.safeJoin(t.slice(1)," ")||"console.assert"),u.extra.arguments=t.slice(1),r&&r(s,u)):r&&r(s,u),i&&Function.prototype.apply.call(i,a,t)}}}}},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function get(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function get(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,r){e.UINT32=r(32),e.UINT64=r(33)},function(t,e,r){var n;!function(r){UINT32(Math.pow(36,5)),UINT32(Math.pow(16,7)),UINT32(Math.pow(10,9)),UINT32(Math.pow(2,30)),UINT32(36),UINT32(16),UINT32(10),UINT32(2);function UINT32(t,e){return this instanceof UINT32?(this._low=0,this._high=0,this.remainder=null,"undefined"==typeof e?fromNumber.call(this,t):"string"==typeof t?fromString.call(this,t,e):void fromBits.call(this,t,e)):new UINT32(t,e)}function fromBits(t,e){return this._low=0|t,this._high=0|e,this}function fromNumber(t){return this._low=65535&t,this._high=t>>>16,this}function fromString(t,e){var r=parseInt(t,e||10);return this._low=65535&r,this._high=r>>>16,this}UINT32.prototype.fromBits=fromBits,UINT32.prototype.fromNumber=fromNumber,UINT32.prototype.fromString=fromString,UINT32.prototype.toNumber=function(){return 65536*this._high+this._low},UINT32.prototype.toString=function(t){return this.toNumber().toString(t||10)},UINT32.prototype.add=function(t){var e=this._low+t._low,r=e>>>16;return r+=this._high+t._high,this._low=65535&e,this._high=65535&r,this},UINT32.prototype.subtract=function(t){return this.add(t.clone().negate())},UINT32.prototype.multiply=function(t){var e,r,n=this._high,i=this._low,a=t._high,o=t._low;return e=(r=i*o)>>>16,e+=n*o,e&=65535,e+=i*a,this._low=65535&r,this._high=65535&e,this},UINT32.prototype.div=function(t){if(0==t._low&&0==t._high)throw Error("division by zero");if(0==t._high&&1==t._low)return this.remainder=new UINT32(0),this;if(t.gt(this))return this.remainder=this.clone(),this._low=0,this._high=0,this;if(this.eq(t))return this.remainder=new UINT32(0),this._low=1,this._high=0,this;for(var e=t.clone(),r=-1;!this.lt(e);)e.shiftLeft(1,!0),r++;for(this.remainder=this.clone(),this._low=0,this._high=0;r>=0;r--)e.shiftRight(1),this.remainder.lt(e)||(this.remainder.subtract(e),r>=16?this._high|=1<<r-16:this._low|=1<<r);return this},UINT32.prototype.negate=function(){var t=1+(65535&~this._low);return this._low=65535&t,this._high=~this._high+(t>>>16)&65535,this},UINT32.prototype.equals=UINT32.prototype.eq=function(t){return this._low==t._low&&this._high==t._high},UINT32.prototype.greaterThan=UINT32.prototype.gt=function(t){return this._high>t._high||!(this._high<t._high)&&this._low>t._low},UINT32.prototype.lessThan=UINT32.prototype.lt=function(t){return this._high<t._high||!(this._high>t._high)&&this._low<t._low},UINT32.prototype.or=function(t){return this._low|=t._low,this._high|=t._high,this},UINT32.prototype.and=function(t){return this._low&=t._low,this._high&=t._high,this},UINT32.prototype.not=function(){return this._low=65535&~this._low,this._high=65535&~this._high,this},UINT32.prototype.xor=function(t){return this._low^=t._low,this._high^=t._high,this},UINT32.prototype.shiftRight=UINT32.prototype.shiftr=function(t){return t>16?(this._low=this._high>>t-16,this._high=0):16==t?(this._low=this._high,this._high=0):(this._low=this._low>>t|this._high<<16-t&65535,this._high>>=t),this},UINT32.prototype.shiftLeft=UINT32.prototype.shiftl=function(t,e){return t>16?(this._high=this._low<<t-16,this._low=0,e||(this._high&=65535)):16==t?(this._high=this._low,this._low=0):(this._high=this._high<<t|this._low>>16-t,this._low=this._low<<t&65535,e||(this._high&=65535)),this},UINT32.prototype.rotateLeft=UINT32.prototype.rotl=function(t){var e=this._high<<16|this._low;return e=e<<t|e>>>32-t,this._low=65535&e,this._high=e>>>16,this},UINT32.prototype.rotateRight=UINT32.prototype.rotr=function(t){var e=this._high<<16|this._low;return e=e>>>t|e<<32-t,this._low=65535&e,this._high=e>>>16,this},UINT32.prototype.clone=function(){return new UINT32(this._low,this._high)},void 0===(n=function(){return UINT32}.apply(e,[]))||(t.exports=n)}()},function(t,e,r){var n;!function(r){var i={16:UINT64(Math.pow(16,5)),10:UINT64(Math.pow(10,5)),2:UINT64(Math.pow(2,5))},a={16:UINT64(16),10:UINT64(10),2:UINT64(2)};function UINT64(t,e,r,n){return this instanceof UINT64?(this.remainder=null,"string"==typeof t?fromString.call(this,t,e):"undefined"==typeof e?fromNumber.call(this,t):void fromBits.apply(this,arguments)):new UINT64(t,e,r,n)}function fromBits(t,e,r,n){return"undefined"==typeof r?(this._a00=65535&t,this._a16=t>>>16,this._a32=65535&e,this._a48=e>>>16,this):(this._a00=0|t,this._a16=0|e,this._a32=0|r,this._a48=0|n,this)}function fromNumber(t){return this._a00=65535&t,this._a16=t>>>16,this._a32=0,this._a48=0,this}function fromString(t,e){e=e||10,this._a00=0,this._a16=0,this._a32=0,this._a48=0;for(var r=i[e]||new UINT64(Math.pow(e,5)),n=0,a=t.length;n<a;n+=5){var o=Math.min(5,a-n),s=parseInt(t.slice(n,n+o),e);this.multiply(o<5?new UINT64(Math.pow(e,o)):r).add(new UINT64(s))}return this}UINT64.prototype.fromBits=fromBits,UINT64.prototype.fromNumber=fromNumber,UINT64.prototype.fromString=fromString,UINT64.prototype.toNumber=function(){return 65536*this._a16+this._a00},UINT64.prototype.toString=function(t){var e=a[t=t||10]||new UINT64(t);if(!this.gt(e))return this.toNumber().toString(t);for(var r=this.clone(),n=new Array(64),i=63;i>=0&&(r.div(e),n[i]=r.remainder.toNumber().toString(t),r.gt(e));i--);return n[i-1]=r.toNumber().toString(t),n.join("")},UINT64.prototype.add=function(t){var e=this._a00+t._a00,r=e>>>16,n=(r+=this._a16+t._a16)>>>16,i=(n+=this._a32+t._a32)>>>16;return i+=this._a48+t._a48,this._a00=65535&e,this._a16=65535&r,this._a32=65535&n,this._a48=65535&i,this},UINT64.prototype.subtract=function(t){return this.add(t.clone().negate())},UINT64.prototype.multiply=function(t){var e=this._a00,r=this._a16,n=this._a32,i=this._a48,a=t._a00,o=t._a16,s=t._a32,u=e*a,c=u>>>16,l=(c+=e*o)>>>16;c&=65535,l+=(c+=r*a)>>>16;var f=(l+=e*s)>>>16;return l&=65535,f+=(l+=r*o)>>>16,l&=65535,f+=(l+=n*a)>>>16,f+=e*t._a48,f&=65535,f+=r*s,f&=65535,f+=n*o,f&=65535,f+=i*a,this._a00=65535&u,this._a16=65535&c,this._a32=65535&l,this._a48=65535&f,this},UINT64.prototype.div=function(t){if(0==t._a16&&0==t._a32&&0==t._a48){if(0==t._a00)throw Error("division by zero");if(1==t._a00)return this.remainder=new UINT64(0),this}if(t.gt(this))return this.remainder=this.clone(),this._a00=0,this._a16=0,this._a32=0,this._a48=0,this;if(this.eq(t))return this.remainder=new UINT64(0),this._a00=1,this._a16=0,this._a32=0,this._a48=0,this;for(var e=t.clone(),r=-1;!this.lt(e);)e.shiftLeft(1,!0),r++;for(this.remainder=this.clone(),this._a00=0,this._a16=0,this._a32=0,this._a48=0;r>=0;r--)e.shiftRight(1),this.remainder.lt(e)||(this.remainder.subtract(e),r>=48?this._a48|=1<<r-48:r>=32?this._a32|=1<<r-32:r>=16?this._a16|=1<<r-16:this._a00|=1<<r);return this},UINT64.prototype.negate=function(){var t=1+(65535&~this._a00);return this._a00=65535&t,t=(65535&~this._a16)+(t>>>16),this._a16=65535&t,t=(65535&~this._a32)+(t>>>16),this._a32=65535&t,this._a48=~this._a48+(t>>>16)&65535,this},UINT64.prototype.equals=UINT64.prototype.eq=function(t){return this._a48==t._a48&&this._a00==t._a00&&this._a32==t._a32&&this._a16==t._a16},UINT64.prototype.greaterThan=UINT64.prototype.gt=function(t){return this._a48>t._a48||!(this._a48<t._a48)&&(this._a32>t._a32||!(this._a32<t._a32)&&(this._a16>t._a16||!(this._a16<t._a16)&&this._a00>t._a00))},UINT64.prototype.lessThan=UINT64.prototype.lt=function(t){return this._a48<t._a48||!(this._a48>t._a48)&&(this._a32<t._a32||!(this._a32>t._a32)&&(this._a16<t._a16||!(this._a16>t._a16)&&this._a00<t._a00))},UINT64.prototype.or=function(t){return this._a00|=t._a00,this._a16|=t._a16,this._a32|=t._a32,this._a48|=t._a48,this},UINT64.prototype.and=function(t){return this._a00&=t._a00,this._a16&=t._a16,this._a32&=t._a32,this._a48&=t._a48,this},UINT64.prototype.xor=function(t){return this._a00^=t._a00,this._a16^=t._a16,this._a32^=t._a32,this._a48^=t._a48,this},UINT64.prototype.not=function(){return this._a00=65535&~this._a00,this._a16=65535&~this._a16,this._a32=65535&~this._a32,this._a48=65535&~this._a48,this},UINT64.prototype.shiftRight=UINT64.prototype.shiftr=function(t){return(t%=64)>=48?(this._a00=this._a48>>t-48,this._a16=0,this._a32=0,this._a48=0):t>=32?(t-=32,this._a00=65535&(this._a32>>t|this._a48<<16-t),this._a16=this._a48>>t&65535,this._a32=0,this._a48=0):t>=16?(t-=16,this._a00=65535&(this._a16>>t|this._a32<<16-t),this._a16=65535&(this._a32>>t|this._a48<<16-t),this._a32=this._a48>>t&65535,this._a48=0):(this._a00=65535&(this._a00>>t|this._a16<<16-t),this._a16=65535&(this._a16>>t|this._a32<<16-t),this._a32=65535&(this._a32>>t|this._a48<<16-t),this._a48=this._a48>>t&65535),this},UINT64.prototype.shiftLeft=UINT64.prototype.shiftl=function(t,e){return(t%=64)>=48?(this._a48=this._a00<<t-48,this._a32=0,this._a16=0,this._a00=0):t>=32?(t-=32,this._a48=this._a16<<t|this._a00>>16-t,this._a32=this._a00<<t&65535,this._a16=0,this._a00=0):t>=16?(t-=16,this._a48=this._a32<<t|this._a16>>16-t,this._a32=65535&(this._a16<<t|this._a00>>16-t),this._a16=this._a00<<t&65535,this._a00=0):(this._a48=this._a48<<t|this._a32>>16-t,this._a32=65535&(this._a32<<t|this._a16>>16-t),this._a16=65535&(this._a16<<t|this._a00>>16-t),this._a00=this._a00<<t&65535),e||(this._a48&=65535),this},UINT64.prototype.rotateLeft=UINT64.prototype.rotl=function(t){if(0==(t%=64))return this;if(t>=32){var e=this._a00;if(this._a00=this._a32,this._a32=e,e=this._a48,this._a48=this._a16,this._a16=e,32==t)return this;t-=32}var r=this._a48<<16|this._a32,n=this._a16<<16|this._a00,i=r<<t|n>>>32-t,a=n<<t|r>>>32-t;return this._a00=65535&a,this._a16=a>>>16,this._a32=65535&i,this._a48=i>>>16,this},UINT64.prototype.rotateRight=UINT64.prototype.rotr=function(t){if(0==(t%=64))return this;if(t>=32){var e=this._a00;if(this._a00=this._a32,this._a32=e,e=this._a48,this._a48=this._a16,this._a16=e,32==t)return this;t-=32}var r=this._a48<<16|this._a32,n=this._a16<<16|this._a00,i=r>>>t|n<<32-t,a=n>>>t|r<<32-t;return this._a00=65535&a,this._a16=a>>>16,this._a32=65535&i,this._a48=i>>>16,this},UINT64.prototype.clone=function(){return new UINT64(this._a00,this._a16,this._a32,this._a48)},void 0===(n=function(){return UINT64}.apply(e,[]))||(t.exports=n)}()}]);
//# sourceMappingURL=83feda798dbec03978d2.worker.js.map