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