PageSourceSearch

https://www.ecupl.edu.cn/_js/tracker.min.js

js ecupl.edu.cn collected 2026-10-02 07:18:31 UTC 42,768 bytes, 1 lines download raw bytes

1!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).tracker=t()}(this,(function(){"use strict";var e,t={DEBUG:!1,LIB_VERSION:"1.0.0"};if("undefined"==typeof window){var r={hostname:""};e={navigator:{userAgent:""},document:{location:r,referrer:""},screen:{width:0,height:0},location:r}}else e=window;var n,o,i,s,a,c,u,l,f,d,h,g,p=Array.prototype,m=Object.prototype,_=p.slice,v=m.toString,y=m.hasOwnProperty,b=e.console,S=e.navigator,w=e.document,k=e.opera,I=e.screen,O=S.userAgent,E=Function.prototype.bind,q=p.forEach,x=p.indexOf,B=p.map,A=Array.isArray,T={},R={trim:function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}},C={log:function(){},error:function(){},critical:function(){if(!R.isUndefined(b)&&b){var e=["Tracker error:"].concat(R.toArray(arguments));try{b.error.apply(b,e)}catch(t){R.each(e,(function(e){b.error(e)}))}}}},D=function(e,t){return function(){return arguments[0]="["+t+"] "+arguments[0],e.apply(C,arguments)}},M=function(e){return{log:D(C.log,e),error:D(C.error,e),critical:D(C.critical,e)}};R.bind=function(e,t){var r,n;if(E&&e.bind===E)return E.apply(e,_.call(arguments,1));if(!R.isFunction(e))throw new TypeError;return r=_.call(arguments,2),n=function(){if(!(this instanceof n))return e.apply(t,r.concat(_.call(arguments)));var o={};o.prototype=e.prototype;var i=new o;o.prototype=null;var s=e.apply(i,r.concat(_.call(arguments)));return Object(s)===s?s:i},n},R.bind_instance_methods=function(e){for(var t in e)"function"==typeof e[t]&&(e[t]=R.bind(e[t],e))},R.each=function(e,t,r){if(null!=e)if(q&&e.forEach===q)e.forEach(t,r);else if(e.length===+e.length){for(var n=0,o=e.length;o>n;n++)if(n in e&&t.call(r,e[n],n,e)===T)return}else for(var i in e)if(y.call(e,i)&&t.call(r,e[i],i,e)===T)return},R.escapeHTML=function(e){var t=e;return t&&R.isString(t)&&(t=t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")),t},R.extend=function(e){return R.each(_.call(arguments,1),(function(t){for(var r in t)void 0!==t[r]&&(e[r]=t[r])})),e},R.isArray=A||function(e){return"[object Array]"===v.call(e)},R.isFunction=function(e){try{return/^\s*\bfunction\b/.test(e)}catch(e){return!1}},R.isArguments=function(e){return!(!e||!y.call(e,"callee"))},R.toArray=function(e){return e?e.toArray?e.toArray():R.isArray(e)||R.isArguments(e)?_.call(e):R.values(e):[]},R.map=function(e,t){if(B&&e.map===B)return e.map(t);var r=[];return R.each(e,(function(e){r.push(t(e))})),r},R.keys=function(e){var t=[];return null===e||R.each(e,(function(e,r){t[t.length]=r})),t},R.values=function(e){var t=[];return null===e||R.each(e,(function(e){t[t.length]=e})),t},R.identity=function(e){return e},R.include=function(e,t){var r=!1;return null===e?r:x&&e.indexOf===x?-1!=e.indexOf(t):(R.each(e,(function(e){if(r||(r=e===t))return T})),r)},R.includes=function(e,t){return-1!==e.indexOf(t)},R.inherit=function(e,t){return e.prototype=new t,e.prototype.constructor=e,e.superclass=t.prototype,e},R.isArrayBuffer=function(e){return"function"==typeof ArrayBuffer&&(e instanceof ArrayBuffer||"[object ArrayBuffer]"===Object.prototype.toString.call(e))},R.isObject=function(e){return e===Object(e)&&!R.isArray(e)},R.isEmptyObject=function(e){if(R.isObject(e)){for(var t in e)if(y.call(e,t))return!1;return!0}return!1},R.isEmptyString=function(e){return!e||0===e.length},R.isUndefined=function(e){return void 0===e},R.isString=function(e){return"[object String]"==v.call(e)},R.isDate=function(e){return"[object Date]"==v.call(e)},R.isNumber=function(e){return"[object Number]"==v.call(e)},R.isElement=function(e){return!(!e||1!==e.nodeType)},R.encodeDates=function(e){return R.each(e,(function(t,r){R.isDate(t)?e[r]=R.formatDate(t):R.isObject(t)&&(e[r]=R.encodeDates(t))})),e},R.timestamp=function(){return Date.now=Date.now||function(){return+new Date},Date.now()},R.formatDate=function(e){function t(e){return 10>e?"0"+e:e}return e.getUTCFullYear()+"-"+t(e.getUTCMonth()+1)+"-"+t(e.getUTCDate())+"T"+t(e.getUTCHours())+":"+t(e.getUTCMinutes())+":"+t(e.getUTCSeconds())},R.safewrap=function(e){return function(){try{return e.apply(this,arguments)}catch(e){C.critical("Implementation error. Please turn on debug and contact [email protected].")}}},R.safewrap_class=function(e,t){for(var r=0;t.length>r;r++)e.prototype[t[r]]=R.safewrap(e.prototype[t[r]])},R.safewrap_instance_methods=function(e){for(var t in e)"function"==typeof e[t]&&(e[t]=R.safewrap(e[t]))},R.strip_empty_properties=function(e){var t={};return R.each(e,(function(e,r){R.isString(e)&&e.length>0&&(t[r]=e)})),t},R.truncate=function(e,t){var r;return"string"==typeof e?r=e.slice(0,t):R.isArray(e)?(r=[],R.each(e,(function(e){r.push(R.truncate(e,t))}))):R.isObject(e)?(r={},R.each(e,(function(e,n){r[n]=R.truncate(e,t)}))):r=e,r},R.JSONEncode=function(e){var t=function(e){var t=/[\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,r={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};return t.lastIndex=0,t.test(e)?'"'+e.replace(t,(function(e){var t=r[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)}))+'"':'"'+e+'"'};return function e(r,n){var o="",i=0,s="",a="",c=0,u=o,l=[],f=n[r];switch(f&&"object"==typeof f&&"function"==typeof f.toJSON&&(f=f.toJSON(r)),typeof f){case"string":return t(f);case"number":return isFinite(f)?f+"":"null";case"boolean":case"null":return f+"";case"object":if(!f)return"null";if(o+="    ",l=[],"[object Array]"===v.apply(f)){for(c=f.length,i=0;c>i;i+=1)l[i]=e(i,f)||"null";return a=0===l.length?"[]":o?"[\n"+o+l.join(",\n"+o)+"\n"+u+"]":"["+l.join(",")+"]",o=u,a}for(s in f)y.call(f,s)&&(a=e(s,f))&&l.push(t(s)+(o?": ":":")+a);return a=0===l.length?"{}":o?"{"+l.join(",")+u+"}":"{"+l.join(",")+"}",o=u,a}}("",{"":e})},R.JSONDecode=(a={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"}
1,c=function(e){var t=new SyntaxError(e);throw t.at=n,t.text=i,t},u=function(e){return e&&e!==o&&c("Expected '"+e+"' instead of '"+o+"'"),o=i.charAt(n),n+=1,o},l=function(){var e,t="";for("-"===o&&(t="-",u("-"));o>="0"&&"9">=o;)t+=o,u();if("."===o)for(t+=".";u()&&o>="0"&&"9">=o;)t+=o;if("e"===o||"E"===o)for(t+=o,u(),"-"!==o&&"+"!==o||(t+=o,u());o>="0"&&"9">=o;)t+=o,u();if(e=+t,isFinite(e))return e;c("Bad number")},f=function(){var e,t,r,n="";if('"'===o)for(;u();){if('"'===o)return u(),n;if("\\"===o)if(u(),"u"===o){for(r=0,t=0;4>t&&(e=parseInt(u(),16),isFinite(e));t+=1)r=16*r+e;n+=String.fromCharCode(r)}else{if("string"!=typeof a[o])break;n+=a[o]}else n+=o}c("Bad string")},d=function(){for(;o&&" ">=o;)u()},h=function(){var e=[];if("["===o){if(u("["),d(),"]"===o)return u("]"),e;for(;o;){if(e.push(s()),d(),"]"===o)return u("]"),e;u(","),d()}}c("Bad array")},g=function(){var e,t={};if("{"===o){if(u("{"),d(),"}"===o)return u("}"),t;for(;o;){if(e=f(),d(),u(":"),Object.hasOwnProperty.call(t,e)&&c('Duplicate key "'+e+'"'),t[e]=s(),d(),"}"===o)return u("}"),t;u(","),d()}}c("Bad object")},s=function(){switch(d(),o){case"{":return g();case"[":return h();case'"':return f();case"-":return l();default:return"0">o||o>"9"?function(){switch(o){case"t":return u("t"),u("r"),u("u"),u("e"),!0;case"f":return u("f"),u("a"),u("l"),u("s"),u("e"),!1;case"n":return u("n"),u("u"),u("l"),u("l"),null}c('Unexpected "'+o+'"')}():l()}},function(e){var t;return i=e,n=0,o=" ",t=s(),d(),o&&c("Syntax error"),t}),R.base64Encode=function(e){var t,r,n,o,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",s=0,a=0,c="",u=[];if(!e)return e;e=R.utf8Encode(e);do{t=(o=e.charCodeAt(s++)<<16|e.charCodeAt(s++)<<8|e.charCodeAt(s++))>>12&63,r=o>>6&63,n=63&o,u[a++]=i.charAt(o>>18&63)+i.charAt(t)+i.charAt(r)+i.charAt(n)}while(e.length>s);switch(c=u.join(""),e.length%3){case 1:c=c.slice(0,-2)+"==";break;case 2:c=c.slice(0,-1)+"="}return c},R.utf8Encode=function(e){var t,r,n,o,i="";for(t=r=0,n=(e=(e+"").replace(/\r\n/g,"\n").replace(/\r/g,"\n")).length,o=0;n>o;o++){var s=e.charCodeAt(o),a=null;128>s?r++:a=s>127&&2048>s?String.fromCharCode(s>>6|192,63&s|128):String.fromCharCode(s>>12|224,s>>6&63|128,63&s|128),null!==a&&(r>t&&(i+=e.substring(t,r)),i+=a,t=r=o+1)}return r>t&&(i+=e.substring(t,e.length)),i},R.UUID=function(){var e=(I.height*I.width).toString(16);return function(){for(var e=1*new Date,t=0;e==1*new Date;)t++;return e.toString(16)+t.toString(16)}()+"-"+Math.random().toString(16).replace(".","")+"-"+function(){var e,t,r=O,n=[],o=0;function i(e,t){var r,o=0;for(r=0;t.length>r;r++)o|=n[r]<<8*r;return e^o}for(e=0;r.length>e;e++)t=r.charCodeAt(e),n.unshift(255&t),4>n.length||(o=i(o,n),n=[]);return n.length>0&&(o=i(o,n)),o.toString(16)}()+"-"+e},R.isBlockedUA=function(e){return!!/(google web preview|baiduspider|yandexbot|bingbot|googlebot|yahoo! slurp)/i.test(e)},R.HTTPBuildQuery=function(e,t){var r,n=[];return R.isUndefined(t)&&(t="&"),R.each(e,(function(e,t){r=encodeURIComponent(""+e),n[n.length]=encodeURIComponent(t)+"="+r})),n.join(t)},R.getUrlParams=function(){return location&&(location.search||function(e){if(e){var t=e.indexOf("?");if(t>=0)return e.substring(t)}return""}(location.href))},R.getQueryParamByName=function(e,t){e=e.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var r=RegExp("[\\?&]"+e+"=([^&#]*)").exec(t);return null===r?void 0:decodeURIComponent(r[1].replace(/\+/g," "))},R.getQueryParam=function(e,t){t=t.replace(/[[]/,"\\[").replace(/[\]]/,"\\]");var r=RegExp("[\\?&]"+t+"=([^&#]*)").exec(e);if(null===r||r&&"string"!=typeof r[1]&&r[1].length)return"";var n=r[1];try{n=decodeURIComponent(n)}catch(e){C.error("Skipping decoding for malformed query param: "+n)}return n.replace(/\+/g," ")},R.getHashParam=function(e,t){var r=e.match(RegExp(t+"=([^&]*)"));return r?r[1]:null},R.cookie={get:function(e){for(var t=e+"=",r=w.cookie.split(";"),n=0;r.length>n;n++){for(var o=r[n];" "==o.charAt(0);)o=o.substring(1,o.length);if(0===o.indexOf(t))return decodeURIComponent(o.substring(t.length,o.length))}return null},parse:function(e){var t;try{t=R.JSONDecode(R.cookie.get(e))||{}}catch(e){}return t},set_seconds:function(e,t,r,n,o,i,s){var a="",c="",u="";if(s)a="; domain="+s;else if(n){var l=L(w.location.hostname);a=l?"; domain=."+l:""}if(r){var f=new Date;f.setTime(f.getTime()+1e3*r),c="; expires="+f.toGMTString()}i&&(o=!0,u="; SameSite=None"),o&&(u+="; secure"),w.cookie=e+"="+encodeURIComponent(t)+c+"; path=/"+a+u},set:function(e,t,r,n,o,i,s){var a="",c="",u="";if(s)a="; domain="+s;else if(n){var l=L(w.location.hostname);a=l?"; domain=."+l:""}if(r){var f=new Date;f.setTime(f.getTime()+24*r*60*60*1e3),c="; expires="+f.toGMTString()}i&&(o=!0,u="; SameSite=None"),o&&(u+="; secure");var d=e+"="+encodeURIComponent(t)+c+"; path=/"+a+u;return w.cookie=d,d},remove:function(e,t,r){R.cookie.set(e,"",-1,t,!1,!1,r)}};var P=null,U=function(e,t){if(null!==P&&!t)return P;var r=!0;try{e=e||window.localStorage;var n="__mplss_"+N(8);e.setItem(n,"xyz"),"xyz"!==e.getItem(n)&&(r=!1),e.removeItem(n)}catch(e){r=!1}return P=r,r};R.localStorage={is_supported:function(e){var t=U(null,e);return t||C.error("localStorage unsupported; falling back to cookie store"),t},error:function(e){C.error("localStorage error: "+e)},get:function(e){try{return window.localStorage.getItem(e)}catch(e){R.localStorage.error(e)}return null},parse:function(e){try{return R.JSONDecode(R.localStorage.get(e))||{}}catch(e){}return null},set:function(e,t){try{window.localStorage.setItem(e,t)}catch(e){R.localStorage.error(e)}},remove:function(e){try{window.localStorage.removeItem(e)}catch(e){R.localStorage.error(e)}}},R.register_event=function(){function e(t){return t&&(t.preventDefault=e.preventDefault,t.stopPropagation=e.stopPropagation),t}return e.preventDefault=function(){this.returnValue=!1},e.stopPropagation=function(){this.cancelBubble=!0},function(t,r,n,o,i){if(t)if(t.addEventListener&&!o)t.addEventListener(r,n,!!i);else{var s="on"+r;
1t[s]=function(t,r,n){return function(o){if(o=o||e(window.event)){var i,s,a=!0;return R.isFunction(n)&&(i=n(o)),s=r.call(t,o),!1!==i&&!1!==s||(a=!1),a}}}(t,n,t[s])}else C.error("No valid element provided to register_event")}}();var F=/^(\w*)\[(\w+)([=~\|\^\$\*]?)=?"?([^\]"]*)"?\]$/;R.dom_query=function(){function e(e){return e.all?e.all:e.getElementsByTagName("*")}var t=/[\t\r\n]/g;function r(e,r){var n=" "+r+" ";return(" "+e.className+" ").replace(t," ").indexOf(n)>=0}function n(t){if(!w.getElementsByTagName)return[];var n,o,i,s,a,c,u,l,f,d,h=t.split(" "),g=[w];for(c=0;h.length>c;c++)if((n=h[c].replace(/^\s+/,"").replace(/\s+$/,"")).indexOf("#")>-1){i=(o=n.split("#"))[0];var p=w.getElementById(o[1]);if(!p||i&&p.nodeName.toLowerCase()!=i)return[];g=[p]}else if(-1<n.indexOf(".")){var m=(o=n.split("."))[1];for((i=o[0])||(i="*"),s=[],a=0,u=0;g.length>u;u++)for(f="*"==i?e(g[u]):g[u].getElementsByTagName(i),l=0;f.length>l;l++)s[a++]=f[l];for(g=[],d=0,u=0;s.length>u;u++)s[u].className&&R.isString(s[u].className)&&r(s[u],m)&&(g[d++]=s[u])}else{var _=n.match(F);if(_){var v,y=_[2],b=_[3],S=_[4];for((i=_[1])||(i="*"),s=[],a=0,u=0;g.length>u;u++)for(f="*"==i?e(g[u]):g[u].getElementsByTagName(i),l=0;f.length>l;l++)s[a++]=f[l];switch(g=[],d=0,b){case"=":v=function(e){return e.getAttribute(y)==S};break;case"~":v=function(e){return e.getAttribute(y).match(RegExp("\\b"+S+"\\b"))};break;case"|":v=function(e){return e.getAttribute(y).match(RegExp("^"+S+"-?"))};break;case"^":v=function(e){return 0===e.getAttribute(y).indexOf(S)};break;case"$":v=function(e){return e.getAttribute(y).lastIndexOf(S)==e.getAttribute(y).length-S.length};break;case"*":v=function(e){return e.getAttribute(y).indexOf(S)>-1};break;default:v=function(e){return e.getAttribute(y)}}for(g=[],d=0,u=0;s.length>u;u++)v(s[u])&&(g[d++]=s[u])}else{for(i=n,s=[],a=0,u=0;g.length>u;u++)for(f=g[u].getElementsByTagName(i),l=0;f.length>l;l++)s[a++]=f[l];g=s}}return g}return function(e){return R.isElement(e)?[e]:R.isObject(e)&&!R.isUndefined(e.length)?e:n(e)}}(),R.info={campaignParams:function(){var e="",t={};return R.each("utm_source utm_medium utm_campaign utm_content utm_term".split(" "),(function(r){(e=R.getQueryParam(w.URL,r)).length&&(t[r]=e)})),t},searchEngine:function(e){return 0===e.search("https?://(.*)google.([^/?]*)")?"google":0===e.search("https?://(.*)bing.com")?"bing":0===e.search("https?://(.*)yahoo.com")?"yahoo":0===e.search("https?://(.*)duckduckgo.com")?"duckduckgo":null},searchInfo:function(e){var t=R.info.searchEngine(e),r="yahoo"!=t?"q":"p",n={};if(null!==t){n.$search_engine=t;var o=R.getQueryParam(e,r);o.length&&(n.mp_keyword=o)}return n},browser:function(e,t,r){return t=t||"",r||R.includes(e," OPR/")?R.includes(e,"Mini")?"Opera Mini":"Opera":/(BlackBerry|PlayBook|BB10)/i.test(e)?"BlackBerry":R.includes(e,"IEMobile")||R.includes(e,"WPDesktop")?"Internet Explorer Mobile":R.includes(e,"SamsungBrowser/")?"Samsung Internet":R.includes(e,"Edge")||R.includes(e,"Edg/")?"Microsoft Edge":R.includes(e,"FBIOS")?"Facebook Mobile":R.includes(e,"Chrome")?"Chrome":R.includes(e,"CriOS")?"Chrome iOS":R.includes(e,"UCWEB")||R.includes(e,"UCBrowser")?"UC Browser":R.includes(e,"FxiOS")?"Firefox iOS":R.includes(t,"Apple")?R.includes(e,"Mobile")?"Mobile Safari":"Safari":R.includes(e,"Android")?"Android Mobile":R.includes(e,"Konqueror")?"Konqueror":R.includes(e,"Firefox")?"Firefox":R.includes(e,"MSIE")||R.includes(e,"Trident/")?"Internet Explorer":R.includes(e,"Gecko")?"Mozilla":""},browserVersion:function(e,t,r){var n={"Internet Explorer Mobile":/rv:(\d+(\.\d+)?)/,"Microsoft Edge":/Edge?\/(\d+(\.\d+)?)/,Chrome:/Chrome\/(\d+(\.\d+)?)/,"Chrome iOS":/CriOS\/(\d+(\.\d+)?)/,"UC Browser":/(UCBrowser|UCWEB)\/(\d+(\.\d+)?)/,Safari:/Version\/(\d+(\.\d+)?)/,"Mobile Safari":/Version\/(\d+(\.\d+)?)/,Opera:/(Opera|OPR)\/(\d+(\.\d+)?)/,Firefox:/Firefox\/(\d+(\.\d+)?)/,"Firefox iOS":/FxiOS\/(\d+(\.\d+)?)/,Konqueror:/Konqueror:(\d+(\.\d+)?)/,BlackBerry:/BlackBerry (\d+(\.\d+)?)/,"Android Mobile":/android\s(\d+(\.\d+)?)/,"Samsung Internet":/SamsungBrowser\/(\d+(\.\d+)?)/,"Internet Explorer":/(rv:|MSIE )(\d+(\.\d+)?)/,Mozilla:/rv:(\d+(\.\d+)?)/}[R.info.browser(e,t,r)];if(void 0===n)return null;var o=e.match(n);return o?parseFloat(o[o.length-2]):null},os:function(){var e=O;return/Windows/i.test(e)?/Phone/.test(e)||/WPDesktop/.test(e)?"Windows Phone":"Windows":/(iPhone|iPad|iPod)/.test(e)?"iOS":/Android/.test(e)?"Android":/(BlackBerry|PlayBook|BB10)/i.test(e)?"BlackBerry":/Mac/i.test(e)?"Mac OS X":/Linux/.test(e)?"Linux":/CrOS/.test(e)?"Chrome OS":""},device:function(e){return/Windows Phone/i.test(e)||/WPDesktop/.test(e)?"Windows Phone":/iPad/.test(e)?"iPad":/iPod/.test(e)?"iPod Touch":/iPhone/.test(e)?"iPhone":/(BlackBerry|PlayBook|BB10)/i.test(e)?"BlackBerry":/Android/.test(e)?"Android":""},referringDomain:function(e){var t=e.split("/");return 3>t.length?"":t[2]},properties:function(){return R.extend(R.strip_empty_properties({$os:R.info.os(),$browser:R.info.browser(O,S.vendor,k),$referrer:w.referrer,$referring_domain:R.info.referringDomain(w.referrer),$device:R.info.device(O)}),{$current_url:e.location.href,$browser_version:R.info.browserVersion(O,S.vendor,k),$screen_height:I.height,$screen_width:I.width,mp_lib:"web",$lib_version:t.LIB_VERSION,$insert_id:N(),time:R.timestamp()/1e3})},people_properties:function(){return R.extend(R.strip_empty_properties({$os:R.info.os(),$browser:R.info.browser(O,S.vendor,k)}),{$browser_version:R.info.browserVersion(O,S.vendor,k)})},pageviewInfo:function(e){return R.strip_empty_properties({mp_page:e,mp_referrer:w.referrer,mp_browser:R.info.browser(O,S.vendor,k),mp_platform:R.info.os()})}};var N=function(e){var t=Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10);return e?t.substring(0,e):t};R.safewrap((function(e,t,r){e+=t;
1for(var n=5381,o=0;e.length>o;o++)n=(n<<5)+n+e.charCodeAt(o),n&=n;return r>(n>>>0)%100}));var j=/[a-z0-9][a-z0-9-]*\.[a-z]+$/i,H=/[a-z0-9][a-z0-9-]+\.[a-z.]{2,6}$/i,L=function(e){var t=H,r=e.split("."),n=r[r.length-1];(n.length>4||"com"===n||"org"===n)&&(t=j);var o=e.match(t);return o?o[0]:""},z=null,J=null;void 0!==JSON&&(z=JSON.stringify,J=JSON.parse),z=z||R.JSONEncode,J=J||R.JSONDecode,R.toArray=R.toArray,R.isObject=R.isObject,R.JSONEncode=R.JSONEncode,R.JSONDecode=R.JSONDecode,R.isBlockedUA=R.isBlockedUA,R.isEmptyObject=R.isEmptyObject,R.isEmptyString=R.isEmptyString,R.info=R.info,R.info.device=R.info.device,R.info.browser=R.info.browser,R.info.browserVersion=R.info.browserVersion,R.info.properties=R.info.properties;var W=M("parsers"),$=function(e){try{return{body:R.JSONDecode(e)}}catch(t){return W.log("JSON decode failed"),W.log(t),{transfer_encoding:"base64",body:R.base64Encode(e)}}},X=function(e){if(!e)return{};if(W.log("about to decode buffer"),W.log(e),W.log(e.byteLength),0>=e.byteLength)return{};try{var t=new TextDecoder("utf-8").decode(e);try{return{body:R.JSONDecode(t)}}catch(e){return W.error(e),{transfer_encoding:"base64",body:R.base64Encode(t)}}}catch(t){return W.error(t),W.log(e),{transfer_encoding:"base64",body:"can not be decoded"}}},V=M("capture"),Q="http:"===(document&&document.location.protocol)?"http://":"https://";function K(e,t,r){V.log("processResponse for"+e._url);var n=(new Date).toISOString();if(r){var o=e._url?e._url.toLowerCase():e._url;if(o&&0>
1o.indexOf("track.sudytech.com")&&0>o.indexOf("apirequest.io")){var i={uri:G(e._url),verb:e._method,time:e._startTime,headers:e._requestHeaders};if(t)if("string"==typeof t){V.log("request post data is string"),V.log(t);var s=$(t);i.transfer_encoding=s.transfer_encoding,i.body=s.body}else("object"==typeof t||Array.isArray(t)||"number"==typeof t||"boolean"==typeof t)&&(i.body=t);var a=e.getAllResponseHeaders();V.log("rawResponseHeaders are "+a);var c=function(e){var t={};if(!e)return t;for(var r=e.split("\r\n"),n=0;r.length>n;n++){var o=r[n],i=o.indexOf(": ");if(i>0)t[o.substring(0,i)]=o.substring(i+2)}return t}(a),u=e.status;1223===u&&(u=204);var l={status:u,time:n,headers:c};V.log("responseType: "+e.responseType),V.log("responseText: "+e.responseText),V.log("response: "+e.response);var f=e.responseText,d={};f?(d=$(f),l.body=d.body,l.transfer_encoding=d.transfer_encoding):e.response&&(V.log("no responseText trying with xhr.response"),R.isString(e.response)?(V.log("response is string. attempt to parse"),d=$(e.response),l.body=d.body,l.transfer_encoding=d.transfer_encoding):R.isArrayBuffer(e.response)?(V.log("response is arraybuffer. attempt to parse"),d=X(e.response),l.body=d.body,l.transfer_encoding=d.transfer_encoding):(R.isArray(e.response)||R.isObject(e.response))&&(l.body=e.response)),r({request:i,response:l})}}}function G(e){if(e&&"string"==typeof e){var t=R.trim(e);return 0!==t.indexOf("http")?Q+window.location.host+"/"+t.replace(/^\./,"").replace(/^\//,""):e}return e}var Y=M("web3capture");function Z(e){return e&&e.host?e.host:"/"}function ee(e,t,r,n,o,i){var s={uri:Z(e),verb:"POST",time:t,headers:{}};if(e.headers){var a={};R.each(e.headers,(function(e){a[e.name]=e.value})),s.headers=a}if(n)if("string"==typeof n){Y.log("request post data is string"),Y.log(n);try{s.body=R.JSONDecode(n)}catch(e){Y.log("JSON decode failed"),Y.log(e),s.transfer_encoding="base64",s.body=R.base64Encode(n)}}else("object"==typeof n||Array.isArray(n)||"number"==typeof n||"boolean"==typeof postData)&&(s.body=n);var c={status:200,time:r,headers:{}};o?c.body=o:i&&(c.body={error:i});var u={request:s,response:c,metadata:{_web3:{via_web3_provider:!0,path:e.path,host:e.host}}};return e.isMetaMask&&(u.metadata._web3.is_metamask=!0),u}function te(e,t,r){if(e.currentProvider){Y.log("found my currentProvider, patching it");var n=e.currentProvider,o=n.send,i=n.sendAsync;n.send=function(e){Y.log("patched send is called"),Y.log(e);var r=(new Date).toISOString(),i=o.apply(n,arguments);Y.log("patch send result is back"),Y.log(i);var s=(new Date).toISOString();return t&&t(ee(n,r,s,e,i)),i},n.sendAsync=function(e,r){Y.log("patched sendAsync is called"),Y.log(e);var o=(new Date).toISOString(),s=n;i.call(n,e,(function(n,i){var a=(new Date).toISOString();Y.log("inside patched callback"),Y.log(i),t&&t(ee(s,o,a,e,i,n)),r&&r(n,i)}))};return function(){n.send=o,n.sendAsync=i}}return null}
1var re=M("capture fetch");function ne(e){var t={};re.log("parseheaders is called");for(var r=e.entries(),n=r.next();!n.done;)re.log(n.value),t[n.value[0]]=n.value[1],n=r.next();return t}function oe(e,t,r,n){var o=null;try{o=new Request(r,n)}catch(e){}var i=(new Date).toISOString(),s=null,a=null;a=t(r,n);var c=null;return a=a.then((function(t){return c=t.clone(),s=(new Date).toISOString(),function(e,t,r,n,o){try{setTimeout((function(){if(re.log("interception is here."),re.log(e),re.log(t),e&&t)try{Promise.all([e.arrayBuffer(),t.arrayBuffer()]).then((function(i){var s=i.map(X),a=Object.assign(s[0],{uri:e.url,verb:e.method,time:r,headers:ne(e.headers)}),c=Object.assign(s[1],{status:t.status,time:n,headers:ne(t.headers)});re.log(a),re.log(c),o({request:a,response:c})}))}catch(e){re.error("error processing body")}else re.log("savedRequest")}),50)}catch(e){re.error("error processing saved fetch request and response, but move on anyways."),re.log(e)}}(o,c,i,s,e),t})),a}var ie=M("referrer");function se(e){if(R.isEmptyString(e))return null;var t=e.split("/");return 3>t.length?null:t[2]}function ae(){var e=document&&document.referrer;if(ie.log(e),!R.isEmptyString(e)){if(0!==e.indexOf(location.protocol+"//"+location.host))return{referrer:e,referring_domain:se(e)};ie.log("referrer is the same so skipping")}}var ce=M("utm"),ue={UTM_SOURCE:"utm_source",UTM_MEDIUM:"utm_medium",UTM_CAMPAIGN:"utm_campaign",UTM_TERM:"utm_term",UTM_CONTENT:"utm_content"};function le(e,t){e=R.getUrlParams();var r=function(e,t){var r=e?"?"+e.split(".").slice(-1)[0].replace(/\|/g,"&"):"";ce.log("cookie"),ce.log(r);var n=function(e,t,r,n){return R.getQueryParamByName(e,t)||R.getQueryParamByName(r,n)},o=n("utm_source",t,"utmcsr",r),i=n("utm_medium",t,"utmcmd",r),s=n("utm_campaign",t,"utmccn",r),a=n("utm_term",t,"utmctr",r),c=n("utm_content",t,"utmcct",r),u={},l=function(e,t){R.isEmptyString(t)||(u[e]=t)};return l("utm_source",o),l("utm_medium",i),l("utm_campaign",s),l("utm_term",a),l("utm_content",c),u}(R.cookie.get("__utmz"),e);return r}var fe="tracker_stored_user_id",de="tracker_stored_company_id",he="tracker_stored_session_id",ge="tracker_anonymous_id",pe="tracker_campaign_data";function me(e,t){return t&&0===e.indexOf("tracker_")?e.replace("tracker_",t):e}function _e(e,t){var r=t&&t.persistence,n=me(e,t&&t.persistence_key_prefix);if(R.localStorage.is_supported()){var o=R.localStorage.get(n),i=R.cookie.get(n);return!o&&i&&"localStorage"===r&&R.localStorage.set(n,i),o||i}return R.cookie.get(n)}function ve(e){var t=e&&e.persistence_key_prefix;R.cookie.remove(me(fe,t)),R.cookie.remove(me(de,t)),R.cookie.remove(me(ge,t)),R.cookie.remove(me(he,t)),R.cookie.remove(me(pe,t))}function ye(e){var t=e&&e.persistence_key_prefix;R.localStorage.remove(me(fe,t)),R.localStorage.remove(me(de,t)),R.localStorage.remove(me(ge,t)),R.localStorage.remove(me(he,t)),R.localStorage.remove(me(pe,t))}var be=M("campaign");function Se(e){try{var t={};if(e.disableUtm||(t=le()||{}),!e.disableReferer){var r=ae();r&&(t.referrer=r.referrer,t.referring_domain=r.referring_domain)}if(!e.disableRGclid){var n=function(e){var t=R.getQueryParamByName("gclid",e);if(!R.isEmptyString(t))return t}(R.getUrlParams());n&&(t.gclid=n)}return t}catch(e){be.log(e)}}function we(e,t){var r=null,n=null;try{(n=_e(pe,t))&&"null"!==n&&(r=R.JSONDecode(n))}catch(e){be.error("failed to decode campaign data "+n),be.error(e)}var o=Se(t);be.log("current campaignData"),be.log(R.JSONEncode(o));var i=function(e,t){if(!t)return e;if(!e)return t;var r=R.extend({},e,t);if(t&&t.utm_source)for(var n in ue)r[ue[n]]=t[ue[n]];return r}(r,o);be.log("merged campaignData"),be.log(R.JSONEncode(i));try{e&&i&&"null"!==i&&e(pe,R.JSONEncode(i))}catch(e){be.error("failed to persist campaign data"),be.error(e)}return i}var ke=M("lock"),Ie=function(e,t){t=t||{},this.storageKey=e,this.storage=t.storage||window.localStorage,this.pollIntervalMS=t.pollIntervalMS||100,this.timeoutMS=t.timeoutMS||2e3};Ie.prototype.withLock=function(e,t,r){r||"function"==typeof t||(r=t,t=null);var n=r||(new Date).getTime()+"|"+Math.random(),o=(new Date).getTime(),i=this.storageKey,s=this.pollIntervalMS,a=this.timeoutMS,c=this.storage,u=i+":X",l=i+":Y",f=i+":Z",d=function(e){t&&t(e)},h=function(e){if((new Date).getTime()-o>a)return ke.error("Timeout waiting for mutex on "+i+"; clearing lock. ["+n+"]"),c.removeItem(f),c.removeItem(l),void m();setTimeout((function(){try{e()}catch(e){d(e)}}),s*(Math.random()+.1))},g=function e(t,r){t()?r():h((function(){e(t,r)}))},p=function(){var e=c.getItem(l);if(e&&e!==n)return!1;if(c.setItem(l,n),c.getItem(l)===n)return!0;
1if(!U(c,!0))throw Error("localStorage support dropped while acquiring lock");return!1},m=function e(){c.setItem(u,n),g(p,(function(){c.getItem(u)!==n?h((function(){c.getItem(l)===n?g((function(){return!c.getItem(f)}),_):e()})):_()}))},_=function(){c.setItem(f,"1");try{e()}finally{c.removeItem(f),c.getItem(l)===n&&c.removeItem(l),c.getItem(u)===n&&c.removeItem(u)}};try{if(!U(c,!0))throw Error("localStorage support check failed");m()}catch(e){d(e)}};var Oe=M("batch"),Ee=function(e,t){t=t||{},this.storageKey=e,this.storage=t.storage||window.localStorage,this.lock=new Ie(e,{storage:this.storage}),this.pid=t.pid||null,this.memQueue=[]};Ee.prototype.enqueue=function(e,t,r){var n={id:N(),flushAfter:(new Date).getTime()+2*t,payload:e};this.lock.withLock(R.bind((function(){var t;try{var o=this.readFromStorage();o.push(n),(t=this.saveToStorage(o))&&(Oe.log("succeeded saving to storage"),this.memQueue.push(n))}catch(r){Oe.error("Error enqueueing item",e),t=!1}r&&r(t)}),this),(function(e){Oe.error("Error acquiring storage lock",e),r&&r(!1)}),this.pid)},Ee.prototype.fillBatch=function(e){var t=this.memQueue.slice(0,e);if(e>t.length){var r=this.readFromStorage();if(Oe.log("current storedQueue size "+r.length),r.length){var n={};R.each(t,(function(e){n[e.id]=!0}));for(var o=0;r.length>o;o++){var i=r[o];if((new Date).getTime()>i.flushAfter&&!n[i.id]&&(t.push(i),t.length>=e))break}}}return t};var qe=function(e,t){var r=[];return R.each(e,(function(e){e.id&&!t[e.id]&&r.push(e)})),r};Ee.prototype.removeItemsByID=function(e,t){var r={};R.each(e,(function(e){r[e]=!0})),this.memQueue=qe(this.memQueue,r),this.lock.withLock(R.bind((function(){var n;try{var o=this.readFromStorage();o=qe(o,r),Oe.log("new storedQueue "+o&&o.length),n=this.saveToStorage(o)}catch(t){Oe.error("Error removing items",e),n=!1}t&&(Oe.log("triggering callback of removalItems"),t(n))}),this),(function(e){Oe.error("Error acquiring storage lock",e),t&&t(!1)}),this.pid)},Ee.prototype.readFromStorage=function(){var e;try{Oe.log("trying to get storage with storage key "+this.storageKey),(e=this.storage.getItem(this.storageKey))?(e=J(e),R.isArray(e)||(Oe.error("Invalid storage entry:",e),e=null)):Oe.log("storageEntry is empty")}catch(t){Oe.error("Error retrieving queue",t),e=null}return e||[]},Ee.prototype.saveToStorage=function(e){try{return this.storage.setItem(this.storageKey,z(e)),!0}catch(e){return Oe.error("Error saving queue",e),!1}},Ee.prototype.clear=function(){this.memQueue=[],this.storage.removeItem(this.storageKey)};var xe=M("batch"),Be=function(e,t,r){this.queue=new Ee(e,{storage:r.storage}),this.endpoint=t,this.libConfig=r.libConfig,this.sendRequest=r.sendRequestFunc,this.batchSize=this.libConfig.batch_size,this.flushInterval=this.libConfig.batch_flush_interval_ms,this.stopped=!1};function Ae(e){var t=R.UUID();return e&&e(ge,t),t}Be.prototype.enqueue=function(e,t){this.queue.enqueue(e,this.flushInterval,t)},Be.prototype.start=function(){this.stopped=!1,this.flush()},Be.prototype.stop=function(){this.stopped=!0,this.timeoutID&&(clearTimeout(this.timeoutID),this.timeoutID=null)},Be.prototype.clear=function(){this.queue.clear()},Be.prototype.resetBatchSize=function(){this.batchSize=this.libConfig.batch_size},Be.prototype.resetFlush=function(){this.scheduleFlush(this.libConfig.batch_flush_interval_ms)},Be.prototype.scheduleFlush=function(e){this.flushInterval=e,this.stopped||(this.timeoutID=setTimeout(R.bind(this.flush,this),this.flushInterval))},Be.prototype.flush=function(e){try{if(this.requestInProgress)return void xe.log("Flush: Request already in progress");e=e||{};var t=this.batchSize,r=this.queue.fillBatch(t);if(xe.log("current batch size is "+r.length),1>r.length)return void this.resetFlush();this.requestInProgress=!0;var n=this.libConfig.batch_request_timeout_ms,o=(new Date).getTime(),i=R.map(r,(function(e){return e.payload})),s=R.bind((function(e){this.requestInProgress=!1;try{var i=!1;if(R.isObject(e)&&"timeout"===e.error&&(new Date).getTime()-o>=n)xe.error("Network timeout; retrying"),this.flush();else if(!R.isObject(e)||!e.xhr_req||e.xhr_req.status<500&&0<e.xhr_req.status)if(R.isObject(e)&&e.xhr_req&&413===e.xhr_req.status){if(r.length>1)this.batchSize=Math.min(this.batchSize,Math.max(1,Math.floor(t/2)),r.length-1),xe.error("413 response; reducing batch size to "+this.batchSize),this.resetFlush();else xe.error("Single-event request too large; dropping",r),this.resetBatchSize(),i=!0}else i=!0;else{var s=2*this.flushInterval,a=e.xhr_req.responseHeaders;if(a){var c=a["Retry-After"];c&&(s=1e3*parseInt(c,10)||s)}xe.error("Error; retry in "+(s=Math.min(6e5,s))+" ms"),this.scheduleFlush(s)}i&&this.queue.removeItemsByID(R.map(r,(function(e){return e.id})),R.bind(this.flush,this))}catch(e){xe.error("Error handling API response",e),this.resetFlush()}}),this),a={method:"POST",verbose:!0,ignore_json_errors:!0,timeout_ms:n};e.sendBeacon&&(a.transport="sendBeacon"),xe.log("Tracker Request:",this.endpoint,i),this.sendRequest(this.endpoint,i,a,s)}catch(e){xe.error("Error flushing request queue",e),this.resetFlush()}};
1var Te="track.sudytech.com",Re="/v1/events",Ce="/v1/events/batch",De="/v1/actions",Me="/v1/actions/batch",Pe="/v1/users",Ue="/v1/companies",Fe=window.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest;!Fe&&-1===O.indexOf("MSIE")&&O.indexOf("Mozilla");var Ne=null;navigator.sendBeacon&&(Ne=function(){return navigator.sendBeacon.apply(navigator,arguments)});var je="";function He(e){try{return e.request.headers["X-SOP-SDK"]}catch(e){return!1}}function Le(){return C.log("tracker object creator is called"),{init:function(e){window||C.critical("Warning, this library need to be initiated on the client side"),function(e){if(!e)throw Error("options are required by tracker-browser-js middleware");if(!e.applicationId)throw Error("A tracker application id is required. Please obtain it through your settings at track.sudytech.com");if(e.getTags&&!R.isFunction(e.getTags))throw Error("getTags should be a function");if(e.getMetadata&&!R.isFunction(e.getMetadata))throw Error("getMetadata should be a function");if(e.getApiVersion&&!R.isFunction(e.getApiVersion))throw Error("identifyUser should be a function");if(e.maskContent&&!R.isFunction(e.maskContent))throw Error("maskContent should be a function");if(e.skip&&!R.isFunction(e.skip))throw Error("skip should be a function")}(e);var r,n={};n.getTags=e.getTags||function(){},n.maskContent=e.maskContent||function(e){return e},n.getMetadata=e.getMetadata||function(){},n.skip=e.skip||function(){return!1},n.debug=e.debug,n.callback=e.callback,n.applicationId=e.applicationId,n.apiVersion=e.apiVersion,n.disableFetch=e.disableFetch,n.disableReferrer=e.disableReferrer,n.disableGclid=e.disableGclid,n.disableUtm=e.disableUtm,n.eagerBodyLogging=e.eagerBodyLogging,n.host=e.host||Te,n.batchEnabled=e.batchEnabled||!1,n.batch_size=e.batchSize||25,n.batch_flush_interval_ms=e.batchMaxTime||2500,n.batch_request_timeout_ms=e.batchTimeout||9e4,n.persistence=e.persistence||"localStorage",n.cross_site_cookie=e.crossSiteCookie||!1,n.cross_subdomain_cookie=!1!==e.crossSubdomainCookie,n.cookie_expiration=e.cookieExpiration||365,n.secure_cookie=e.secureCookie||!1,n.cookie_domain=e.cookieDomain||"",n.persistence_key_prefix=e.persistenceKeyPrefix,this.requestBatchers={},this._options=n,this._persist=function(e){var r=e.persistence;"cookie"!==r&&"localStorage"!==r&&(C.critical("Unknown persistence type "+r+"; falling back to cookie"),r=t.persistence="localStorage");var n=e.persistence_key_prefix,o=function(t,r){var o=me(t,n);R.localStorage.set(o,r),R.cookie.set(o,r,e.cookie_expiration,e.cross_subdomain_cookie,e.secure_cookie,e.cross_site_cookie,e.cookie_domain)};return"cookie"!==r&&R.localStorage.is_supported()||(o=function(t,r){var o=me(t,n);R.cookie.set(o,r,e.cookie_expiration,e.cross_subdomain_cookie,e.secure_cookie,e.cross_site_cookie,e.cookie_domain)}),"none"===r&&(o=function(){}),o}(n);try{if(this._userId=_e(fe,n),this._session=_e(he,n),this._companyId=_e(de,n),this._anonymousId=(r=this._persist,_e(ge,n)||Ae(r)),this._campaign=we(this._persist,n),this._campaign&&!this._userId){var o={};o.anonymous_id=this._anonymousId,o.campaign=this._campaign,this.updateUser(o,this._options.applicationId,this._options.host,this._options.callback)}}catch(e){C.error("error loading saved data from local storage but continue")}return n.batchEnabled&&(Fe?(this.initBatching(),Ne&&window.addEventListener&&window.addEventListener("unload",R.bind((function(){this.requestBatchers.events.flush({sendBeacon:!0})}),this))):(n.batchEnabled=!1,C.log("Turning off batch processing because it needs XHR and localStorage"))),C.log("tracker initiated"),this},_executeRequest:function(e,r,n,o){var i=n&&n.applicationId||this._options.applicationId,s=n&&n.method||"POST",a=r?r.user_id||r.anonymous_id:"",c=r?r.metadata:null;try{var u=new XMLHttpRequest;if(u.open(s,e),u.setRequestHeader("Content-Type","application/json"),u.setRequestHeader("X-SOP-Application-Id",i),u.setRequestHeader("X-SOP-SDK","tracker-browser-js/"+t.LIB_VERSION),u.setRequestHeader("X-SOP-UID",a),c)for(var l in c)y.call(c,l)&&u.setRequestHeader("X-SOP-"+l,c[l]);if(n.timeout_ms&&void 0!==u.timeout){u.timeout=n.timeout_ms;var f=(new Date).getTime()}u.onreadystatechange=function(){var e;if(4===u.readyState)if(200>u.status||u.status>300)e=!u.timeout||u.status||(new Date).getTime()-f<u.timeout?"Bad HTTP status: "+u.status+" "+u.statusText:"timeout",C.error(e),o&&o({status:0,error:e,xhr_req:u});else if(o){var t=XMLHttpRequest.responseText;o(t)}},u.send(z(r))}catch(e){C.error("failed to send to tracker "+(r&&r.request&&r.request.uri)),
1C.error(e),o&&o({status:0,error:e})}},initBatching:function(){var e=this._options.applicationId,t=this._options.host;if(C.log("does requestBatch.events exists? "+this.requestBatchers.events),!this.requestBatchers.events){var r={libConfig:this._options,sendRequestFunc:R.bind((function(e,t,r,n){this._executeRequest(e,t,r,n)}),this)},n=new Be("__mf_"+e+"_ev",je+t+Ce,r),o=new Be("__mf_"+e+"_ac",je+t+Me,r);this.requestBatchers={events:n,actions:o}}R.each(this.requestBatchers,(function(e){e.start()}))},_sendOrBatch:function(e,t,r,n,o){var i=!0;this._options.batchEnabled&&n?(C.log("current batcher storage key is  "+n.queue.storageKey),n.enqueue(e)):i=this._executeRequest(r,e,{applicationId:t},o);return i},start:function(e){var t=this;if(this._stopRecording||this._stopWeb3Recording)return C.log("recording has already started, please call stop first."),!1;function r(e){t.recordEvent(e)}return C.log("tracker starting"),this._stopRecording=function(e,t){var r=XMLHttpRequest.prototype,n=t&&t.eagerBodyLogging,o=r.open,i=r.send,s=r.setRequestHeader;return r.open=function(e,t){return V.log("XHR open triggered"),this._method=e,this._url=t,this._requestHeaders={},this._startTime=(new Date).toISOString(),o.apply(this,arguments)},r.setRequestHeader=function(e,t){return this._requestHeaders[e]=t,s.apply(this,arguments)},r.send=function(t){V.log("XHR send started for "+this._url);var r=this;if(n||!this.addEventListener){var o=this.onreadystatechange;this.onreadystatechange=function(){var n=r.readyState;if(V.log("readyState "+n),n===XMLHttpRequest.DONE&&(V.log("XHR onreadystatechange DONE triggered for "+r._url),K(r,t,e)),o&&R.isFunction(o))return V.log("trigger old onreadystatechange"),o.apply(this,arguments)}}else this.addEventListener("loadend",(function(){V.log("XHR loadend triggered for "+r._url),K(r,t,e)}));return i.apply(this,arguments)},function(){r.open=o,r.send=i,r.setRequestHeader=s}}(r,this._options),this._options.disableFetch||(C.log("also instrumenting fetch API"),this._stopFetchRecording=function(e,t){var r,n=t||window||self;if(n.fetch){if(re.log("found fetch method."),n.fetch.polyfill)return re.log("skip patching fetch since it is polyfilled"),null;var o=n.fetch;return re.log("fetch is not polyfilled so instrumenting it"),n.fetch=(r=n.fetch,function(t,n){return oe(e,r,t,n)}),function(){n.fetch=o}}re.log("there is no fetch found, so skipping instrumentation.")}(r)),this.useWeb3(e),!0},useWeb3:function(e){var t=this;function r(e){t.recordEvent(e)}return this._stopWeb3Recording&&(this._stopWeb3Recording(),this._stopWeb3Recording=null),e?this._stopWeb3Recording=te(e,r):window.web3&&(C.log("found global web3, will capture from it"),this._stopWeb3Recording=te(window.web3,r)),!!this._stopWeb3Recording},updateUser:function(e,t,r,n){this._executeRequest(je+r+Pe,e,{applicationId:t},n)},identifyUser:function(e,t){if(this._userId=e,!this._options||!this._options.applicationId)throw Error("Init needs to be called with a valid application Id before calling identify User.");var r={user_id:e};t&&(r.metadata=t),this._session&&(r.session_token=this._session),this._campaign&&(r.campaign=this._campaign),this._companyId&&(r.company_id=this._companyId),r.anonymous_id=this._anonymousId,this.updateUser(r,this._options.applicationId,this._options.host,this._options.callback);try{e&&this._persist(fe,e)}catch(e){C.error("error saving to local storage")}},updateCompany:function(e,t,r,n){this._executeRequest(je+r+Ue,e,{applicationId:t},n)},identifyCompany:function(e,t,r){if(this._companyId=e,!this._options||!this._options.applicationId)throw Error("Init needs to be called with a valid application Id before calling identify User.");var n={company_id:e};r&&(n.company_domain=r),t&&(n.metadata=t),this._session&&(n.session_token=this._session),this._campaign&&(n.campaign=this._campaign),this.updateCompany(n,this._options.applicationId,this._options.host,this._options.callback);try{e&&this._persist(de,e)}catch(e){C.error("error saving to local storage")}},identifySession:function(e){if(this._session=e,e)try{this._persist(he,e)}catch(e){C.error("local storage error")}},track:function(e,t){var r=this;if(!e)throw Error("track name must have action Name defined");var n={action_name:e};r._companyId&&(n.company_id=r._companyId),r._userId?n.user_id=r._userId:n.anonymous_id=r._anonymousId,this._session&&(n.session_token=this._session),n.request={uri:document.location.href,verb:"GET",user_agent_string:navigator.userAgent},t&&(n.metadata=t);var o=je+r._options.host+De;return C.log("sending or queuing: "+e),r._sendOrBatch(n,r._options.applicationId,o,r.requestBatchers.actions,r._options.callback)},recordEvent:function(e){if(He(e))C.log("skipped logging for requests to tracker");else{var t=this;C.log("determining if should log: "+e.request.uri);var r=Object.assign({},e);if(t._getUserId()?r.user_id=t._getUserId():r.anonymous_id=t._anonymousId,t._getCompanyId()&&(r.company_id=t._getCompanyId()),t._getSession()&&(r.session_token=t._getSession()),r.tags=t._options.getTags(e)||"",t._options.apiVersion&&(r.request.api_version=t._options.apiVersion),r.request.headers["User-Agent"]||(r.request.headers["User-Agent"]=window.navigator.userAgent),t._options.maskContent&&(r=t._options.maskContent(r)),t._options.getMetadata)if(r.metadata){var n=t._options.getMetadata(r);r.metadata=Object.assign(r.metadata,n)}else r.metadata=t._options.getMetadata(r);if(t._options.skip(e)||He(e))C.log("skipped logging for "+e.request.uri);else C.log("sending or queuing: "+e.request.uri),t._sendOrBatch(r,t._options.applicationId,je+t._options.host+Re,t.requestBatchers.events,t._options.callback)}},_getUserId:function(){return this._userId},_getCompanyId:function(){return this._companyId},_getSession:function(){return this._session},stop:function(){this._stopRecording&&(this._stopRecording(),this._stopRecording=null),this._stopWeb3Recording&&(this._stopWeb3Recording(),this._stopWeb3Recording=null),this._stopFetchRecording&&(this._stopFetchRecording(),this._stopFetchRecording=null)},clearCookies:function(){ve(this._options)},clearStorage:function(){ye(this._options)},resetAnonymousId:function(){return this._anonymousId=Ae(this._persist),this._anonymousId},reset:function(){ve(this._options),ye(this._options),this._anonymousId=Ae(this._persist),this._companyId=null,this._userId=null,this._session=null,this._campaign=null}}}return Le()}));

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.