text: //! TrackJS JavaScript error monitoring agent.
  //! COPYRIGHT (c) 2019 ALL RIGHTS RESERVED
  //! See License at https://trackjs.com/terms/
  window.TrackJS=window.trackJs=(function(g,l,n){"use awesome";var t=function(a,b){this.config=a;this.onError=b;a.enabled&&this.watch()};t.prototype={watch:function(){c.forEach(["EventTarget","Node","XMLHttpRequest"],function(a){c.has(g,a+".prototype.addEventListener")&&c.hasOwn(g[a].prototype,"addEventListener")&&this.wrapEventTarget(g[a].prototype)},this);this.wrapTimer("setTimeout");this.wrapTimer("setInterval")},wrap:function(a){function b(){try{return a.apply(this,arguments)}catch(b){throw d.onError("catch",b,{bindTime:f,bindStack:e}),
  c.wrapError(b);}}var d=this;try{if(!c.isFunction(a)||c.hasOwn(a,"__trackjs__"))return a;if(c.hasOwn(a,"__trackjs_state__"))return a.__trackjs_state__}catch(m){return a}var f,e;if(d.config.bindStack)try{throw Error();}catch(m){e=m.stack,f=c.isoNow()}for(var h in a)c.hasOwn(a,h)&&(b[h]=a[h]);b.prototype=a.prototype;b.__trackjs__=!0;return a.__trackjs_state__=b},wrapEventTarget:function(a){var b=this;c.has(a,"addEventListener.call")&&c.has(a,"removeEventListener.call")&&(c.patch(a,"addEventListener",
  function(a){return function(f,e,h,m){try{c.has(e,"handleEvent")&&(e.handleEvent=b.wrap(e.handleEvent))}catch(k){}return a.call(this,f,b.wrap(e),h,m)}}),c.patch(a,"removeEventListener",function(a){return function(b,e,h,c){try{e=e&&(e.__trackjs_state__||e)}catch(k){}return a.call(this,b,e,h,c)}}))},wrapTimer:function(a){var b=this;c.patch(g,a,function(a){return function(f,e){var h=Array.prototype.slice.call(arguments),m=h[0];c.isFunction(m)&&(h[0]=b.wrap(m));return c.has(a,"apply")?a.apply(this,h):
  a(h[0],h[1])}})}};var p=function(a){this.initCurrent(a)};p.prototype={current:{},initOnly:{application:!0,cookie:!0,enabled:!0,token:!0,callback:{enabled:!0},console:{enabled:!0},navigation:{enabled:!0},network:{enabled:!0,fetch:!0},visitor:{enabled:!0},window:{enabled:!0,promise:!0}},defaults:{application:"",cookie:!1,dedupe:!0,dependencies:!0,enabled:!0,errorURL:"https://capture.trackjs.com/capture",errorNoSSLURL:"http://capture.trackjs.com/capture",faultURL:"https://usage.trackjs.com/fault.gif",
  onError:function(){return!0},serialize:function(a){function b(a){var d="<"+a.tagName.toLowerCase();a=a.attributes||[];for(var b=0;b<a.length;b++)d+=" "+a[b].name+'="'+a[b].value+'"';return d+">"}if(""===a)return"Empty String";if(a===n)return"undefined";if(c.isString(a)||c.isNumber(a)||c.isBoolean(a)||c.isFunction(a))return""+a;if(c.isElement(a))return b(a);if("symbol"===typeof a)return Symbol.prototype.toString.call(a);var d;try{d=JSON.stringify(a,function(a,d){return d===n?"undefined":c.isNumber(d)&&
  isNaN(d)?"NaN":c.isError(d)?{name:d.name,message:d.message,stack:d.stack}:c.isElement(d)?b(d):d})}catch(e){d="";for(var f in a)a.hasOwnProperty(f)&&(d+=',"'+f+'":"'+a[f]+'"');d=d?"{"+d.replace(",","")+"}":"Unserializable Object"}return d.replace(/"undefined"/g,"undefined").replace(/"NaN"/g,"NaN")},sessionId:"",token:"",userId:"",version:"",callback:{enabled:!0,bindStack:!1},console:{enabled:!0,display:!0,error:!0,warn:!1,watch:["log","debug","info","warn","error"]},navigation:{enabled:!0},network:{enabled:!0,
  error:!0,fetch:!0},visitor:{enabled:!0},usageURL:"https://usage.trackjs.com/usage.gif",window:{enabled:!0,promise:!0}},initCurrent:function(a){if(this.validate(a,this.defaults,"config",{}))return this.current=c.defaultsDeep({},a,this.defaults),!0;this.current=c.defaultsDeep({},this.defaults);console.log("init current config",this.current);return!1},setCurrent:function(a){return this.validate(a,this.defaults,"config",this.initOnly)?(this.current=c.defaultsDeep({},a,this.current),!0):!1},validate:function(a,
  b,d,f){var e=!0;d=d||"";f=f||{};for(var c in a)if(a.hasOwnProperty(c))if(b.hasOwnProperty(c)){var g=typeof b[c];g!==typeof a[c]?(console.warn(d+"."+c+": property must be type "+g+"."),e=!1):"[object Array]"!==Object.prototype.toString.call(a[c])||this.validateArray(a[c],b[c],d+"."+c)?"[object Object]"===Object.prototype.toString.call(a[c])?e=this.validate(a[c],b[c],d+"."+c,f[c]):f.hasOwnProperty(c)&&(console.warn(d+"."+c+": property cannot be set after load."),e=!1):e=!1}else console.warn(d+"."+c+
  ": property not supported."),e=!1;return e},validateArray:function(a,b,d){var f=!0;d=d||"";for(var e=0;e<a.length;e++)c.contains(b,a[e])||(console.warn(d+"["+e+"]: invalid value: "+a[e]+"."),f=!1);return f}};var q=function(a,b,d,f,e,c,g){this.util=a;this.log=b;this.onError=d;this.onFault=f;this.serialize=e;g.enabled&&(c.console=this.wrapConsoleObject(c.console,g))};q.prototype={wrapConsoleObject:function(a,b){a=a||{};var d=a.log||function(){},f=this,e;for(e=0;e<b.watch.length;e++)(function(e){var g=
  a[e]||d;a[e]=function(){try{var a=Array.prototype.slice.call(arguments);f.log.add("c",{timestamp:f.util.isoNow(),severity:e,message:f.serialize(1===a.length?a[0]:a)});if(b[e])if(c.isError(a[0])&&1===a.length)f.onError("console",a[0]);else try{throw Error(f.serialize(1===a.length?a[0]:a));}catch(d){f.onError("console",d)}b.display&&(f.util.hasFunction(g,"apply")?g.apply(this,a):g(a[0]))}catch(d){f.onFault(d)}}})(b.watch[e]);return a},report:function(){return this.log.all("c")}};var u=function(a,b,
  d,f,e){this.config=a;this.util=b;this.log=d;this.window=f;this.document=e;this.correlationId=this.token=null;this.initialize()};u.prototype={initialize:function(){this.token=this.getCustomerToken();this.correlationId=this.getCorrelationId()},getCustomerToken:function(){if(this.config.current.token)return this.config.current.token;var a=this.document.getElementsByTagName("script");return a[a.length-1].getAttribute("data-token")},getCorrelationId:function(){var a;if(!this.config.current.cookie)return this.util.uuid();
  try{a=this.document.cookie.replace(/(?:(?:^|.*;\s*)TrackJS\s*\=\s*([^;]*).*$)|^.*$/,"$1"),a||(a=this.util.uuid(),this.document.cookie="TrackJS="+a+"; expires=Fri, 31 Dec 9999 23:59:59 GMT; path=/")}catch(b){a=this.util.uuid()}return a},report:function(){return{application:this.config.current.application,correlationId:this.correlationId,sessionId:this.config.current.sessionId,token:this.token,userId:this.config.current.userId,version:this.config.current.version}}};var v=function(a){this.config=a;this.loadedOn=
  (new Date).getTime();this.originalUrl=c.getLocation();this.referrer=l.referrer};v.prototype={discoverDependencies:function(){var a={TrackJS:"3.7.2"};g.jQuery&&g.jQuery.fn&&g.jQuery.fn.jquery&&(a.jQuery=g.jQuery.fn.jquery);g.jQuery&&g.jQuery.ui&&g.jQuery.ui.version&&(a.jQueryUI=g.jQuery.ui.version);g.angular&&g.angular.version&&g.angular.version.full&&(a.angular=g.angular.version.full);for(var b in g)if("_trackJs"!==b&&"_trackJS"!==b&&"_trackjs"!==b&&"webkitStorageInfo"!==b&&"webkitIndexedDB"!==b&&
  "top"!==b&&"parent"!==b&&"frameElement"!==b)try{if(g[b]){var d=g[b].version||g[b].Version||g[b].VERSION;"string"===typeof d&&(a[b]=d)}}catch(f){}a.TrackJS&&a.trackJs&&delete a.trackJs;return a},report:function(){return{age:(new Date).getTime()-this.loadedOn,dependencies:this.config.current.dependencies?this.discoverDependencies():{trackJs:"3.7.2"},originalUrl:this.originalUrl,referrer:this.referrer,userAgent:g.navigator.userAgent,viewportHeight:g.document.documentElement.clientHeight,viewportWidth:g.document.documentElement.clientWidth}}};
  var w=function(a){this.util=a;this.appender=[];this.maxLength=30};w.prototype={all:function(a){var b=[],d,f;for(f=0;f<this.appender.length;f++)(d=this.appender[f])&&d.category===a&&b.push(d.value);return b},clear:function(){this.appender.length=0},truncate:function(){this.appender.length>this.maxLength&&(this.appender=this.appender.slice(Math.max(this.appender.length-this.maxLength,0)))},add:function(a,b){var d=this.util.uuid();this.appender.push({key:d,category:a,value:b});this.truncate();return d},
  get:function(a,b){var d,f;for(f=0;f<this.appender.length;f++)if(d=this.appender[f],d.category===a&&d.key===b)return d.value;return!1}};var D=function(a){var b={};return{addMetadata:function(a,f){b[a]=f},removeMetadata:function(a){delete b[a]},report:function(){var d=[],f;for(f in b)b.hasOwnProperty(f)&&d.push({key:f,value:a(b[f])});return d},store:b}},x=function(a,b){this.log=a;this.options=b;b.enabled&&this.watch()};x.prototype={isCompatible:function(a){a=a||g;return!c.has(a,"chrome.app.runtime")&&
  c.has(a,"addEventListener")&&c.has(a,"history.pushState")},record:function(a,b,d){this.log.add("h",{type:a,from:c.truncate(b,250),to:c.truncate(d,250),on:c.isoNow()})},report:function(){return this.log.all("h")},watch:function(){if(this.isCompatible()){var a=this,b=c.getLocationURL().relative;g.addEventListener("popstate",function(){var d=c.getLocationURL().relative;a.record("popState",b,d);b=d},!0);c.forEach(["pushState","replaceState"],function(d){c.patch(history,d,function(f){return function(){b=
  c.getLocationURL().relative;var e=f.apply(this,arguments),h=c.getLocationURL().relative;a.record(d,b,h);b=h;return e}})})}}};var y=function(a,b,d,f,e,c){this.util=a;this.log=b;this.onError=d;this.onFault=f;this.window=e;this.options=c;c.enabled&&this.initialize(e)};y.prototype={initialize:function(a){a.XMLHttpRequest&&this.util.hasFunction(a.XMLHttpRequest.prototype.open,"apply")&&this.watchNetworkObject(a.XMLHttpRequest);a.XDomainRequest&&this.util.hasFunction(a.XDomainRequest.prototype.open,"apply")&&
  this.watchNetworkObject(a.XDomainRequest);this.options.fetch&&c.isWrappableFunction(a.fetch)&&this.watchFetch()},watchFetch:function(){var a=this.log,b=this.options,d=this.onError;c.patch(g,"fetch",function(f){return function(e,h){var m;try{throw Error();}catch(E){m=E.stack}var k=e instanceof Request?e.url:e,C=e instanceof Request?e.method:(h||{}).method||"GET",l=f.apply(g,arguments);l.__trackjs_state__=a.add("n",{type:"fetch",startedOn:c.isoNow(),method:C,url:c.truncate(k,2E3)});return l.then(function(f){var e=
  a.get("n",l.__trackjs_state__);if(e){c.defaults(e,{completedOn:c.isoNow(),statusCode:f.status,statusText:f.statusText});var h=f.headers.get("trackjs-correlation-id");h&&(e.requestCorrelationId=h);b.error&&400<=f.status&&(e=Error(e.statusCode+" "+e.statusText+": "+e.method+" "+e.url),e.stack=m,d("ajax",e))}return f})["catch"](function(f){f=f||{};var e=a.get("n",l.__trackjs_state__);e&&(c.defaults(e,{completedOn:c.isoNow(),statusCode:0,statusText:f.toString()}),b.error&&(f.message=f.message+": "+e.method+
  " "+e.url,f.stack=f.stack||m,d("ajax",f)));throw f;})}})},watchNetworkObject:function(a){var b=this,d=a.prototype.open,f=a.prototype.send;a.prototype.open=function(a,b){var f=(b||"").toString();0>f.indexOf("localhost:0")&&(this._trackJs={method:a,url:f});return d.apply(this,arguments)};a.prototype.send=function(){try{if(!this._trackJs)return f.apply(this,arguments);this._trackJs.logId=b.log.add("n",{type:"xhr",startedOn:b.util.isoNow(),method:this._trackJs.method,url:c.truncate(this._trackJs.url,
  2E3)});b.listenForNetworkComplete(this)}catch(a){b.onFault(a)}return f.apply(this,arguments)};return a},listenForNetworkComplete:function(a){var b=this;b.window.ProgressEvent&&a.addEventListener&&a.addEventListener("readystatechange",function(){4===a.readyState&&b.finalizeNetworkEvent(a)},!0);a.addEventListener?a.addEventListener("load",function(){b.finalizeNetworkEvent(a);b.checkNetworkFault(a)},!0):setTimeout(function(){try{var d=a.onload;a.onload=function(){b.finalizeNetworkEvent(a);b.checkNetworkFault(a);
  "function"===typeof d&&b.util.hasFunction(d,"apply")&&d.apply(a,arguments)};var f=a.onerror;a.onerror=function(){b.finalizeNetworkEvent(a);b.checkNetworkFault(a);"function"===typeof oldOnError&&f.apply(a,arguments)}}catch(e){b.onFault(e)}},0)},finalizeNetworkEvent:function(a){if(a._trackJs){var b=this.log.get("n",a._trackJs.logId);b&&(b.completedOn=this.util.isoNow(),a.getAllResponseHeaders&&a.getResponseHeader&&0<=(a.getAllResponseHeaders()||"").toLowerCase().indexOf("trackjs-correlation-id")&&(b.requestCorrelationId=
  a.getResponseHeader("trackjs-correlation-id")),b.statusCode=1223==a.status?204:a.status,b.statusText=1223==a.status?"No Content":a.statusText)}},checkNetworkFault:function(a){if(this.options.error&&400<=a.status&&1223!=a.status){var b=a._trackJs||{};this.onError("ajax",a.status+" "+a.statusText+": "+b.method+" "+b.url)}},report:function(){return this.log.all("n")}};var r=function(a,b){this.util=a;this.config=b;this.disabled=!1;this.throttleStats={attemptCount:0,throttledCount:0,lastAttempt:(new Date).getTime()};
  g.JSON&&g.JSON.stringify||(this.disabled=!0)};r.prototype={errorEndpoint:function(a){var b=this.config.current.errorURL;this.util.testCrossdomainXhr()||-1!==g.location.protocol.indexOf("https")||(b=this.config.current.errorNoSSLURL);return b+"?token="+a+"&v=3.7.2"},usageEndpoint:function(a){return this.appendObjectAsQuery(a,this.config.current.usageURL)},trackerFaultEndpoint:function(a){return this.appendObjectAsQuery(a,this.config.current.faultURL)},appendObjectAsQuery:function(a,b){b+="?";for(var d in a)a.hasOwnProperty(d)&&
  (b+=encodeURIComponent(d)+"="+encodeURIComponent(a[d])+"&");return b},getCORSRequest:function(a,b){var d;this.util.testCrossdomainXhr()?(d=new g.XMLHttpRequest,d.open(a,b),d.setRequestHeader("Content-Type","text/plain")):"undefined"!==typeof g.XDomainRequest?(d=new g.XDomainRequest,d.open(a,b)):d=null;return d},sendTrackerFault:function(a){this.throttle(a)||(l.createElement("img").src=this.trackerFaultEndpoint(a))},sendUsage:function(a){l.createElement("img").src=this.usageEndpoint(a)},sendError:function(a,
  b){var d=this;if(!this.disabled&&!this.throttle(a))try{var f=this.getCORSRequest("POST",this.errorEndpoint(b));f.onreadystatechange=function(){4!==f.readyState||c.contains([200,202],f.status)||(d.disabled=!0)};f._trackJs=n;f.send(g.JSON.stringify(a))}catch(e){throw this.disabled=!0,e;}},throttle:function(a){var b=(new Date).getTime();this.throttleStats.attemptCount++;if(this.throttleStats.lastAttempt+1E3>=b){if(this.throttleStats.lastAttempt=b,10<this.throttleStats.attemptCount)return this.throttleStats.throttledCount++,
  !0}else a.throttled=this.throttleStats.throttledCount,this.throttleStats.attemptCount=0,this.throttleStats.lastAttempt=b,this.throttleStats.throttledCount=0;return!1}};var c=function(){function a(d,f,e,h){e=e||!1;h=h||0;c.forEach(f,function(f){c.forEach(c.keys(f),function(c){null===f[c]||f[c]===n?d[c]=f[c]:e&&10>h&&"[object Object]"===b(f[c])?(d[c]=d[c]||{},a(d[c],[f[c]],e,h+1)):d.hasOwnProperty(c)||(d[c]=f[c])})});return d}function b(a){return Object.prototype.toString.call(a)}return{addEventListenerSafe:function(a,
  b,e,c){a.addEventListener?a.addEventListener(b,e,c):a.attachEvent&&a.attachEvent("on"+b,e)},afterDocumentLoad:function(a){var b=!1;"complete"===l.readyState?c.defer(a):(c.addEventListenerSafe(l,"readystatechange",function(){"complete"!==l.readyState||b||(c.defer(a),b=!0)}),setTimeout(function(){b||(c.defer(a),b=!0)},1E4))},bind:function(a,b){return function(){return a.apply(b,Array.prototype.slice.call(arguments))}},contains:function(a,b){return 0<=a.indexOf(b)},defaults:function(d){return a(d,Array.prototype.slice.call(arguments,
  1),!1)},defaultsDeep:function(d){return a(d,Array.prototype.slice.call(arguments,1),!0)},defer:function(a,b){setTimeout(function(){a.apply(b)})},forEach:function(a,b,e){if(c.isArray(a)){if(a.forEach)return a.forEach(b,e);for(var h=0;h<a.length;)b.call(e,a[h],h,a),h++}},getLocation:function(){return g.location.toString().replace(/ /g,"%20")},getLocationURL:function(){return c.parseURL(c.getLocation())},has:function(a,b){try{for(var e=b.split("."),c=a,g=0;g<e.length;g++)if(c[e[g]])c=c[e[g]];else return!1;
  return!0}catch(k){return!1}},hasFunction:function(a,b){try{return!!a[b]}catch(c){return!1}},hasOwn:function(a,b){return Object.prototype.hasOwnProperty.call(a,b)},isArray:function(a){return"[object Array]"===b(a)},isBoolean:function(a){return"boolean"===typeof a||c.isObject(a)&&"[object Boolean]"===b(a)},isBrowserIE:function(a){a=a||g.navigator.userAgent;var b=a.match(/Trident\/([\d.]+)/);return b&&"7.0"===b[1]?11:(a=a.match(/MSIE ([\d.]+)/))?parseInt(a[1],10):!1},isBrowserSupported:function(){var a=
  this.isBrowserIE();return!a||8<=a},isError:function(a){if(!c.isObject(a))return!1;var f=b(a);return"[object Error]"===f||"[object DOMException]"===f||c.isString(a.name)&&c.isString(a.message)},isElement:function(a){return c.isObject(a)&&1===a.nodeType},isFunction:function(a){return!(!a||"function"!==typeof a)},isNumber:function(a){return"number"===typeof a||c.isObject(a)&&"[object Number]"===b(a)},isObject:function(a){return!(!a||"object"!==typeof a)},isString:function(a){return"string"===typeof a||
  !c.isArray(a)&&c.isObject(a)&&"[object String]"===b(a)},isWrappableFunction:function(a){return this.isFunction(a)&&this.hasFunction(a,"apply")},isoNow:function(){var a=new Date;return a.toISOString?a.toISOString():a.getUTCFullYear()+"-"+this.pad(a.getUTCMonth()+1)+"-"+this.pad(a.getUTCDate())+"T"+this.pad(a.getUTCHours())+":"+this.pad(a.getUTCMinutes())+":"+this.pad(a.getUTCSeconds())+"."+String((a.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"},keys:function(a){if(!c.isObject(a))return[];var b=
  [],e;for(e in a)a.hasOwnProperty(e)&&b.push(e);return b},noop:function(){},pad:function(a){a=String(a);1===a.length&&(a="0"+a);return a},parseURL:function(a){var b=a.match(/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!b)return{};b={protocol:b[2],host:b[4],path:b[5],query:b[6],hash:b[8]};b.origin=(b.protocol||"")+"://"+(b.host||"");b.relative=(b.path||"")+(b.query||"")+(b.hash||"");b.href=a;return b},patch:function(a,b,e){a[b]=e(a[b]||c.noop)},testCrossdomainXhr:function(){return"withCredentials"in
  new XMLHttpRequest},truncate:function(a,b){a=""+a;if(a.length<=b)return a;var c=a.length-b;return a.substr(0,b)+"...{"+c+"}"},tryGet:function(a,b){try{return a[b]}catch(c){}},uuid:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(a){var b=16*Math.random()|0;return("x"==a?b:b&3|8).toString(16)})},wrapError:function(a){var b=a||Object.prototype.toString.call(a);if(b&&b.innerError)return a;var c=Error("TrackJS Caught: "+(b.message||b));c.description="TrackJS Caught: "+
  b.description;c.file=b.file;c.line=b.line||b.lineNumber;c.column=b.column||b.columnNumber;c.stack=b.stack;c.innerError=a;return c}}}(),z=function(a,b,d,c,e,g){this.util=a;this.log=b;this.onError=d;this.onFault=c;this.options=g;this.document=e;g.enabled&&this.initialize(e)};z.prototype={initialize:function(a){var b=this.util.bind(this.onDocumentClicked,this),d=this.util.bind(this.onInputChanged,this);a.addEventListener?(a.addEventListener("click",b,!0),a.addEventListener("blur",d,!0)):a.attachEvent&&
  (a.attachEvent("onclick",b),a.attachEvent("onfocusout",d))},onDocumentClicked:function(a){try{var b=this.getElementFromEvent(a);b&&b.tagName&&(this.isDescribedElement(b,"a")||this.isDescribedElement(b,"button")||this.isDescribedElement(b,"input",["button","submit"])?this.writeVisitorEvent(b,"click"):this.isDescribedElement(b,"input",["checkbox","radio"])&&this.writeVisitorEvent(b,"input",b.value,b.checked))}catch(d){this.onFault(d)}},onInputChanged:function(a){try{var b=this.getElementFromEvent(a);
  if(b&&b.tagName)if(this.isDescribedElement(b,"textarea"))this.writeVisitorEvent(b,"input",b.value);else if(this.isDescribedElement(b,"select")&&b.options&&b.options.length)this.onSelectInputChanged(b);else this.isDescribedElement(b,"input")&&!this.isDescribedElement(b,"input",["button","submit","hidden","checkbox","radio"])&&this.writeVisitorEvent(b,"input",b.value)}catch(d){this.onFault(d)}},onSelectInputChanged:function(a){if(a.multiple)for(var b=0;b<a.options.length;b++)a.options[b].selected&&
  this.writeVisitorEvent(a,"input",a.options[b].value);else 0<=a.selectedIndex&&a.options[a.selectedIndex]&&this.writeVisitorEvent(a,"input",a.options[a.selectedIndex].value)},writeVisitorEvent:function(a,b,d,c){"password"===this.getElementType(a)&&(d=n);var e=this.getElementAttributes(a);a.innerText&&(e.__trackjs_element_text=this.util.truncate(a.innerText,500));this.log.add("v",{timestamp:this.util.isoNow(),action:b,element:{tag:a.tagName.toLowerCase(),attributes:e,value:this.getMetaValue(d,c)}})},
  getElementFromEvent:function(a){return a.target||l.elementFromPoint(a.clientX,a.clientY)},isDescribedElement:function(a,b,d){if(a.tagName.toLowerCase()!==b.toLowerCase())return!1;if(!d)return!0;a=this.getElementType(a);for(b=0;b<d.length;b++)if(d[b]===a)return!0;return!1},getElementType:function(a){return(a.getAttribute("type")||"").toLowerCase()},getElementAttributes:function(a){for(var b={},d=Math.min(a.attributes.length,10),f=0;f<d;f++){var e=a.attributes[f];c.contains(["data-value","value"],e.name.toLowerCase())||
  (b[e.name]=c.truncate(e.value,100))}return b},getMetaValue:function(a,b){return a===n?n:{length:a.length,pattern:this.matchInputPattern(a),checked:b}},matchInputPattern:function(a){return""===a?"empty":/^[a-z0-9!#$%&'*+=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/.test(a)?"email":/^(0?[1-9]|[12][0-9]|3[01])[\/\-](0?[1-9]|1[012])[\/\-]\d{4}$/.test(a)||/^(\d{4}[\/\-](0?[1-9]|1[012])[\/\-]0?[1-9]|[12][0-9]|3[01])$/.test(a)?"date":
  /^(?:(?:\+?1\s*(?:[.-]\s*)?)?(?:\(\s*([2-9]1[02-9]|[2-9][02-8]1|[2-9][02-8][02-9])\s*\)|([2-9]1[02-9]|[2-9][02-8]1|[2-9][02-8][02-9]))\s*(?:[.-]\s*)?)?([2-9]1[02-9]|[2-9][02-9]1|[2-9][02-9]{2})\s*(?:[.-]\s*)?([0-9]{4})(?:\s*(?:#|x\.?|ext\.?|extension)\s*(\d+))?$/.test(a)?"usphone":/^\s*$/.test(a)?"whitespace":/^\d*$/.test(a)?"numeric":/^[a-zA-Z]*$/.test(a)?"alpha":/^[a-zA-Z0-9]*$/.test(a)?"alphanumeric":"characters"},report:function(){return this.log.all("v")}};var A=function(a,b,d,c,e){this.onError=
  a;this.onFault=b;this.serialize=d;e.enabled&&this.watchWindowErrors(c);e.promise&&this.watchPromiseErrors(c)};A.prototype={watchPromiseErrors:function(a){var b=this;a.addEventListener?a.addEventListener("unhandledrejection",function(a){a=a||{};a=a.detail?c.tryGet(a.detail,"reason"):c.tryGet(a,"reason");if(a!==n){if(!c.isError(a))try{throw Error(b.serialize(a));}catch(f){a=f}b.onError("promise",a)}}):a.onunhandledrejection=function(a){b.onError("promise",a)}},watchWindowErrors:function(a){var b=this;
  c.patch(a,"onerror",function(a){return function(c,e,g,m,k){try{k=k||{},k.message=k.message||b.serialize(c),k.name=k.name||"Error",k.line=k.line||parseInt(g,10)||null,k.column=k.column||parseInt(m,10)||null,"[object Event]"!==Object.prototype.toString.call(c)||e?k.file=k.file||b.serialize(e):k.file=(c.target||{}).src,b.onError("window",k)}catch(l){b.onFault(l)}a.apply(this,arguments)}})}};var B=function(){this.hasInstalled=!1;this.hasEnabled=!0;this.window=g;this.document=l;this.util=c;this.install=
  c.bind(this.install,this);this.onError=c.bind(this.onError,this);this.onFault=c.bind(this.onFault,this);this.serialize=c.bind(this.serialize,this);this.log=new w(c);this.metadata=new D(this.serialize);var a=g&&(g._trackJs||g._trackJS||g._trackjs);a&&this.install(a)};B.prototype={install:function(a){try{if("undefined"===typeof l)return this.warn("monitoring disabled in node"),!1;if(!c.has(a,"token"))return this.warn("missing token"),!1;if(this.hasInstalled)return this.warn("already installed"),!1;
  this.config=new p(a);this.transmitter=new r(this.util,this.config);this.environment=new v(this.config);this.customer=new u(this.config,this.util,this.log,this.window,this.document);if(!this.config.current.enabled)return this.hasEnabled=!1;this.windowConsoleWatcher=new q(this.util,this.log,this.onError,this.onFault,this.serialize,this.window,this.config.current.console);if(!this.util.isBrowserSupported())return!1;this.callbackWatcher=new t(this.config.current.callback,this.onError,this.onFault);this.visitorWatcher=
  new z(this.util,this.log,this.onError,this.onFault,this.document,this.config.current.visitor);this.navigationWatcher=new x(this.log,this.config.current.navigation);this.networkWatcher=new y(this.util,this.log,this.onError,this.onFault,this.window,this.config.current.network);this.windowWatcher=new A(this.onError,this.onFault,this.serialize,this.window,this.config.current.window);var b=this;c.afterDocumentLoad(function(){b.transmitter.sendUsage({token:b.customer.token,correlationId:b.customer.correlationId,
  application:b.config.current.application,x:b.util.uuid()})});return this.hasInstalled=!0}catch(d){return this.onFault(d),!1}},pub:function(){var a=this,b={addMetadata:this.metadata.addMetadata,attempt:function(b,f){try{var e=Array.prototype.slice.call(arguments,2);return b.apply(f||this,e)}catch(g){throw a.onError("catch",g),c.wrapError(g);}},configure:function(b){return!a.hasInstalled&&a.hasEnabled?(a.warn("agent must be installed"),!1):a.config.setCurrent(b)},hash:"cf5522da9dcedb7390522470840acc128504902d",
  isInstalled:function(){return a.hasInstalled},install:this.install,removeMetadata:this.metadata.removeMetadata,track:function(b){if(!a.hasInstalled&&a.hasEnabled)a.warn("agent must be installed");else{var f=c.isError(b)?b.message:a.serialize(b);b=b||{};if(!b.stack)try{throw Error(f);}catch(e){b=e}a.onError("direct",b)}},version:"3.7.2",watch:function(b,f){return function(){try{var e=Array.prototype.slice.call(arguments,0);return b.apply(f||this,e)}catch(g){throw a.onError("catch",g),c.wrapError(g);
  }}},watchAll:function(a){var b=Array.prototype.slice.call(arguments,1),e;for(e in a)"function"!==typeof a[e]||c.contains(b,e)||(a[e]=this.watch(a[e],a));return a}};new q(c,a.log,a.onError,a.onFault,a.serialize,b,p.prototype.defaults.console);return b},onError:function(){var a,b=!1;return function(d,f,e){if(this.hasInstalled&&this.hasEnabled&&c.isBrowserSupported())try{if(e=e||{bindStack:null,bindTime:null,force:!1},f&&c.isError(f)||(f={name:"Error",message:this.serialize(f,e.force)}),-1===f.message.indexOf("TrackJS Caught"))if(b&&
  -1!==f.message.indexOf("Script error"))b=!1;else{var h=c.defaultsDeep({},{agentPlatform:"browser",bindStack:e.bindStack,bindTime:e.bindTime,column:f.column||f.columnNumber,console:this.windowConsoleWatcher.report(),customer:this.customer.report(),entry:d,environment:this.environment.report(),file:f.file||f.fileName,line:f.line||f.lineNumber,message:f.message,metadata:this.metadata.report(),nav:this.navigationWatcher.report(),network:this.networkWatcher.report(),url:(g.location||"").toString(),stack:f.stack,
  timestamp:this.util.isoNow(),visitor:this.visitorWatcher.report(),version:"3.7.2"});if(!e.force)try{if(!this.config.current.onError(h,f))return}catch(l){h.console.push({timestamp:this.util.isoNow(),severity:"error",message:l.message});var m=this;setTimeout(function(){m.onError("catch",l,{force:!0})},0)}if(this.config.current.dedupe){var k=(h.message+h.stack).substr(0,1E4);if(k===a)return;a=k}(function(){function a(){var b=0;c.forEach(h.console,function(a){b+=(a.message||"").length});return 8E4<=b}
  for(var b=0;a()&&b<h.console.length;)h.console[b].message=c.truncate(h.console[b].message,1E3),b++})();this.log.clear();setTimeout(function(){b=!1});b=!0;this.transmitter.sendError(h,this.customer.token)}}catch(l){this.onFault(l)}}}(),onFault:function(a){var b=this.transmitter||new r;a=a||{};a={token:this.customer.token,file:a.file||a.fileName,msg:a.message||"unknown",stack:(a.stack||"unknown").substr(0,1E3),url:this.window.location,v:"3.7.2",h:"cf5522da9dcedb7390522470840acc128504902d",x:this.util.uuid()};
  b.sendTrackerFault(a)},serialize:function(a,b){if(this.hasInstalled&&this.config.current.serialize&&!b)try{return this.config.current.serialize(a)}catch(c){this.onError("catch",c,{force:!0})}return p.prototype.defaults.serialize(a)},warn:function(a){c.has(g,"console.warn")&&g.console.warn("TrackJS: "+a)}};return(new B).pub()})("undefined"===typeof window?void 0:window,"undefined"===typeof document?void 0:document);
  