PageSourceSearch

https://shib.io/_next/static/chunks/81277-eabd8020fb2a9a8d.js

js shib.io collected 2026-10-03 22:22:07 UTC 24,843 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[81277],{9921:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=(0,r(78340).A)("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]])},13057:(e,t,r)=>{function n(e){"use strict";e=e||{},this.depth=e.depth||!1,this.throwOnCircularRef=!("throwOnCircularRef"in e)||!1!==e.throwOnCircularRef}function i(e){"use strict";var t=Array.prototype.slice.call(arguments,0);return t.unshift(null),new(n.bind.apply(n,t))}function o(e){"use strict";var t=r(30397),o=r(73661),a=[],s={};function l(e){return e.reduce(function(e,t){return t instanceof Object?e.push(t):e=[],e},[])}function d(e){var t,r=e[e.length-1];if(r instanceof Array)t=[];else if(r instanceof Function)try{t=o(r)}catch(e){throw Error(e.message)}else t=r instanceof Object?{}:r;return t}function c(e){e.forEach(function(e){if(e instanceof Object&&a.indexOf(e)>-1)throw Error("Circular reference error")}),a=a.concat(e)}function u(e,r){r=!1!==s.depth?r?r+1:1:0,!0===s.throwOnCircularRef&&c(e);var n=d(e);function i(e,t,i){n[t]?n[t]=u([n[t],i[t]],r):n[t]=u([i[t]],r)}function o(e){t(e,i)}return n instanceof Object&&r<=s.depth&&l(e).forEach(o),n}return arguments[0]instanceof n?(s=arguments[0],e=Array.prototype.slice.call(arguments,1)):(s=i(),e=Array.prototype.slice.call(arguments,0)),u(e)}o.createOptions=i,e.exports=o},13545:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=(0,r(78340).A)("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]])},30397:e=>{e.exports=function(e,t){return Object.keys(e).forEach(function(r){t(e[r],r,e)}),e}},36698:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=(0,r(78340).A)("SendToBack",[["rect",{x:"14",y:"14",width:"8",height:"8",rx:"2",key:"1b0bso"}],["rect",{x:"2",y:"2",width:"8",height:"8",rx:"2",key:"1x09vl"}],["path",{d:"M7 14v1a2 2 0 0 0 2 2h1",key:"pao6x6"}],["path",{d:"M14 7h1a2 2 0 0 1 2 2v1",key:"19tdru"}]])},41313:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=(0,r(78340).A)("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]])},54105:(e,t,r)=>{"use strict";let n;r.d(t,{A:()=>d});let i="undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),o=new Uint8Array(16);function a(){if(!n&&!(n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return n(o)}let s=[];for(let e=0;e<256;++e)s.push((e+256).toString(16).slice(1));function l(e,t=0){return s[e[t+0]]+s[e[t+1]]+s[e[t+2]]+s[e[t+3]]+"-"+s[e[t+4]]+s[e[t+5]]+"-"+s[e[t+6]]+s[e[t+7]]+"-"+s[e[t+8]]+s[e[t+9]]+"-"+s[e[t+10]]+s[e[t+11]]+s[e[t+12]]+s[e[t+13]]+s[e[t+14]]+s[e[t+15]]}let d=function(e,t,r){if(i&&!t&&!e)return i();let n=(e=e||{}).random||(e.rng||a)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){r=r||0;for(let e=0;e<16;++e)t[r+e]=n[e];return t}return l(n)}},54508:(e,t,r)=>{"use strict";var n;function i(e,t){return t.major>e.major?n.MAJOR:t.major<e.major?n.NONE:t.minor>e.minor?n.MINOR:t.minor<e.minor?n.NONE:t.patch>e.patch?n.PATCH:n.NONE}function o(e,t){return e===t||typeof e==typeof t&&!!(Array.isArray(e)&&Array.isArray(t))&&e.every(function(e,r){return t[r]===e})}function a(e,t){var r=e.reduce(function(e,t){return e[t.chainId]||(e[t.chainId]={}),e[t.chainId][t.address]=t,e},{}),n=t.reduce(function(e,t){var n,i,a=null==(n=r[t.chainId])?void 0:n[t.address];if(a){var s=Object.keys(t).filter(function(e){return"address"!==e&&"chainId"!==e}).filter(function(e){return!o(t[e],a[e])});s.length>0&&(e.changed[t.chainId]||(e.changed[t.chainId]={}),e.changed[t.chainId][t.address]=s)}else e.added.push(t);return e.index[t.chainId]?e.index[t.chainId][t.address]=!0:e.index[t.chainId]=((i={})[t.address]=!0,i),e},{added:[],changed:{},index:{}}),i=e.reduce(function(e,t){return n.index[t.chainId]&&n.index[t.chainId][t.address]||e.push(t),e},[]);return{added:n.added,changed:n.changed,removed:i}}function s(e,t){var r=a(e,t);return r.removed.length>0?n.MAJOR:r.added.length>0?n.MINOR:Object.keys(r.changed).length>0?n.PATCH:n.NONE}r.d(t,{BW:()=>s,NJ:()=>i,bD:()=>n}),function(e){e[e.NONE=0]="NONE",e[e.PATCH=1]="PATCH",e[e.MINOR=2]="MINOR",e[e.MAJOR=3]="MAJOR"}(n||(n={}))},66088:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=(0,r(78340).A)("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]])},67899:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=(0,r(78340).A)("ShoppingCart",[["circle",{cx:"8",cy:"21",r:"1",key:"jimo8o"}
1],["circle",{cx:"19",cy:"21",r:"1",key:"13723u"}],["path",{d:"M2.05 2.05h2l2.66 12.42a2 2 0 0 0 2 1.58h9.78a2 2 0 0 0 1.95-1.57l1.65-7.43H5.12",key:"9zh506"}]])},71275:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=(0,r(78340).A)("Wallet",[["path",{d:"M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1",key:"18etb6"}],["path",{d:"M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4",key:"xoc0q4"}]])},73661:module=>{"use strict";function cloneFunction(func){var out,str;try{str=func.toString(),out=/\[native code\]/.test(str)?func:eval("(function(){return "+str+"}());")}catch(e){throw Error(e.message+"\r\n\r\n"+str)}return out}module.exports=cloneFunction},85229:(e,t,r)=>{"use strict";var n={value:!0},i=function(){function e(e,t){var r=[],n=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{!n&&s.return&&s.return()}finally{if(i)throw o}}return r}return function(t,r){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,r);throw TypeError("Invalid attempt to destructure non-iterable instance")}}(),o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.UN=S,t.Hh=O,n=_,n=R;var a=s(r(13057));function s(e){return e&&e.__esModule?e:{default:e}}function l(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var d="[Redux-LocalStorage-Simple]",c="redux_localstorage_simple",u="_",h=[],g=[],f=0,p=!1,m=!1,v=null;function y(e){console.warn(d,e)}function I(e){}var w=function(e){return e?I:y};function E(e,t){return void 0===t?null:1===e.length?t[e[0]]:E(e.slice(1),t[e[0]])}function k(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};function r(e,t){return 0===e.length?t:r(e.slice(1),l({},e[0],t))}return r(e.split(".").reverse(),t)}function b(e){this.warnFn=e||y}function S(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.states,r=void 0===t?h:t,n=e.ignoreStates,i=void 0===n?g:n,o=e.namespace,a=void 0===o?c:o,s=e.namespaceSeparator,l=void 0===s?u:s,p=e.debounce,y=void 0===p?f:p,I=e.disableWarnings,k=void 0===I?m:I;return function(e){return function(t){return function(n){var o=w(k),s=t(n),p=void 0;A(r)||(console.error(d,"'states' parameter in 'save()' method was passed a non-array value. Setting default value instead. Check your 'save()' method."),r=h),A(i)||(console.error(d,"'ignoreStates' parameter in 'save()' method was passed a non-array value. Setting default value instead. Check your 'save()' method."),i=g),i.length>0&&(i=i.filter(function(e){if(N(e))return e;console.error(d,"'ignoreStates' array contains a non-string value. Ignoring this value. Check your 'ignoreStates' array.")})),N(a)||(console.error(d,"'namespace' parameter in 'save()' method was passed a non-string value. Setting default value instead. Check your 'save()' method."),a=c),N(l)||(console.error(d,"'namespaceSeparator' parameter in 'save()' method was passed a non-string value. Setting default value instead. Check your 'save()' method."),l=u),T(y)||(console.error(d,"'debounce' parameter in 'save()' method was passed a non-integer value. Setting default value instead. Check your 'save()' method."),y=f),p=i.length>0?P(i,e.getState()):e.getState();var m=new b(o);function I(e,t){var r=".";return e.split(r).length>1?E(e.split(r),t):E([e],t)}function S(){0===r.length?m.setItem(a,p):r.forEach(function(e){var t=a+l+e,r=I(e,p);r?m.setItem(t,r):m.removeItem(t)})}return y?(v&&clearTimeout(v),v=setTimeout(function(){S(r,a)},y)):S(r,a),s}}}}function O(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.states,r=void 0===t?h:t,n=e.immutablejs,i=void 0===n?p:n,o=e.namespace,s=void 0===o?c:o,l=e.namespaceSeparator,g=void 0===l?u:l,f=e.preloadedState,v=void 0===f?{}:f,y=e.disableWarnings,I=w(void 0===y?m:y);A(r)||(console.error(d,"'states' parameter in 'load()' method was passed a non-array value. Setting default value instead. Check your 'load()' method."),r=h),N(s)||(console.error(d,"'namespace' parameter in 'load()' method was passed a non-string value. Setting default value instead. Check your 'load()' method."),s=c),N(g)||(console.error(d,"'namespaceSeparator' parameter in 'load()' method was passed a non-string value. Setting default value instead. Check your 'load()' method."),g=u),!0===i&&I("Support for Immutable.js data structures has been deprecated as of version 2.0.0. Please use version 1.4.0 if you require this functionality.");var E=new b(I),S=v;if(0===r.length){var O=E.getItem(s);O&&(S=O)}else r.forEach(function(e){var t=s+g+e,r=E.getItem(t);r?S=(0,a.default)(S,k(e,r)):I("Invalid load '"+t+"' provided. Check your 'states' in 'load()'. If this is your first time running this app you may see this message. To disable it in future use the 'disableWarnings' flag, see documentation.")});return S}function _(){for(var e={},t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];return r.forEach(function(t){for(var r in C(t)||(console.error(d,"One or more loads provided to 'combineLoads()' is not a valid object. Ignoring the invalid load/s. Check your 'comb
1ineLoads()' method."),t={}),t)e[r]=t[r]}),e}function R(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.namespace,r=void 0===t?c:t,n=e.disableWarnings,i=w(void 0===n?m:n);N(r)||(console.error(d,"'namespace' parameter in 'clear()' method was passed a non-string value. Setting default value instead. Check your 'clear()' method."),r=c);for(var o=new b(i),a=o.length,s=0;s<a;s++){var l=o.key(s);l&&l.slice(0,r.length)===r&&o.removeItem(l)}}function A(e){return"[object Array]"===Object.prototype.toString.call(e)}function N(e){return"string"==typeof e}function T(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e}function C(e){return null!==e&&(void 0===e?"undefined":o(e))==="object"}function P(e,t){return Object.entries(t).reduce(function(r,n){var o=i(n,2),a=o[0];return o[1],-1===e.indexOf(a)&&(r[a]=t[a]),r},{})}Object.defineProperty(b.prototype,"length",{get:function(){try{return localStorage.length}catch(e){this.warnFn(e)}return 0},configurable:!0,enumerable:!0}),b.prototype.key=function(e){try{return localStorage.key(e)}catch(e){this.warnFn(e)}return null},b.prototype.setItem=function(e,t){try{localStorage.setItem(e,JSON.stringify(t))}catch(e){this.warnFn(e)}},b.prototype.getItem=function(e){try{return JSON.parse(localStorage.getItem(e))}catch(e){this.warnFn(e)}return null},b.prototype.removeItem=function(e){try{localStorage.removeItem(e)}catch(e){this.warnFn(e)}}},90016:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=(0,r(78340).A)("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},91900:(e,t,r)=>{"use strict";r.r(t),r.d(t,{Analytics:()=>m});var n,i=Object.defineProperty,o=(e,t,r)=>t in e?i(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,a=(e,t,r)=>(o(e,"symbol"!=typeof t?t+"":t,r),r),s=new Uint8Array(16);function l(){if(!n&&!(n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return n(s)}var d=[];for(let e=0;e<256;++e)d.push((e+256).toString(16).slice(1));function c(e,t=0){return d[e[t+0]]+d[e[t+1]]+d[e[t+2]]+d[e[t+3]]+"-"+d[e[t+4]]+d[e[t+5]]+"-"+d[e[t+6]]+d[e[t+7]]+"-"+d[e[t+8]]+d[e[t+9]]+"-"+d[e[t+10]]+d[e[t+11]]+d[e[t+12]]+d[e[t+13]]+d[e[t+14]]+d[e[t+15]]}var u="undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),h=function(e,t,r){if(u&&!t&&!e)return u();let n=(e=e||{}).random||(e.rng||l)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){r=r||0;for(let e=0;e<16;++e)t[r+e]=n[e];return t}return c(n)},g=()=>{let e=navigator.userAgent||"Unknown User Agent",t=navigator.platform||"Unknown Platform",r="Unknown Manufacturer",n="Unknown Model",i="Unknown OS";for(let t of[{keyword:"iPhone",manufacturer:"Apple",model:"iPhone"},{keyword:"Android",manufacturer:"Android",model:/Android\s([^;]*)/},{keyword:"Windows Phone",manufacturer:"Microsoft",model:"Windows Phone"},{keyword:"Macintosh",manufacturer:"Apple",model:"MacBook"},{keyword:"Linux",manufacturer:"Generic",model:"Laptop"},{keyword:"Windows",manufacturer:"Generic",model:"Laptop"},{keyword:"iPad",manufacturer:"Apple",model:"iPad"},{keyword:"iPad",manufacturer:"Apple",model:"iPad"},{keyword:"iPod",manufacturer:"Apple",model:"iPod"},{keyword:"Kindle",manufacturer:"Amazon",model:"Kindle"},{keyword:"Galaxy Tab",manufacturer:"Samsung",model:"Galaxy Tab"},{keyword:"Galaxy",manufacturer:"Samsung",model:"Galaxy"},{keyword:"Surface",manufacturer:"Microsoft",model:"Surface"},{keyword:"Chromebook",manufacturer:"Generic",model:"Chromebook"},{keyword:"Pixel",manufacturer:"Google",model:"Pixel"}])if(RegExp(t.keyword,"i").test(e)){if(r=t.manufacturer,"string"==typeof t.model)n=t.model;else if(t.model instanceof RegExp){let r=e.match(t.model);r&&r[1]&&(n=r[1])}break}return t.toLowerCase().includes("win")?i="Windows":t.toLowerCase().includes("mac")?i="macOS":t.toLowerCase().includes("linux")?i="Linux":t.toLowerCase().includes("ipad")?i="iPadOS":t.toLowerCase().includes("iphone")?i="iOS":t.toLowerCase().includes("android")?i="Android":t.toLowerCase().includes("blackberry")?i="BlackBerry OS":t.toLowerCase().includes("windows phone")?i="Windows Phone":t.toLowerCase().includes("freebsd")?i="FreeBSD":t.toLowerCase().includes("sunos")?i="SunOS":t.toLowerCase().includes("chrome os")?i="Chrome OS":t.toLowerCase().includes("kindle")?i="Kindle OS":t.toLowerCase().includes("webos")?i="webOS":t.toLowerCase().includes("tizen")?i="Tizen":t.toLowerCase().includes("fire os")?i="Fire OS":t.toLowerCase().includes("unix")&&(i="UNIX"),{manufacturer:r,model:n,OS:i,UA:e,screen_x_size:window.screen.width||0,screen_y_size:window.screen.height||0}};function f(e){if("object"!=typeof e||null===e)return e;let t={};for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r.replace(/([a-z])([A-Z])/g,"$1_$2").toLowerCase()]=f(e[r]));return t}var p=new class{getKey(e){return`woofer_${e}`}addEvent(e,t){let r=this.getKey(e),n=this.getEvents(e);n.push(t),localStorage.setItem(r,JSON.stringify(n))}getEvents(e){let t=this.getKey(e),r=localStorage.getItem(t);return r?JSON.parse(r):[]}updateEvent(e,t,r){let n=this.getKey(e),i=this.getEvents(e);i=i.map(e=>e.event_id===t?{...e,...r}:e),localStorage.setItem(n,JSON.stringify(i))}deleteEvent(e,t){let r=this.getKey(e),n=this.getEvents(e).filter(e=>e.event_id!==t);localStorage.setItem(r,JSON.stringify(n))}findParentEventId(e,t){let r=this.getEvents(e).filter(e=>e.type===t).pop();return r?r.event_id:null}findLatestEvent(e){return this.getEvents(e).reverse()[0]||null}},m=class{constructor(e,t,r,n,i,o){a(this,"clientId"),a(this,"deviceProperties"),a(this,"endpointUrl"),a(this,"pageName"),a(this,"referrer"),a(this,"sessionId"),a(this,"url"),a(this,"config"),a(this,"userProperties"),a(this,"logEnabled",!0),a(this,"liveTrackedEvents",{}),a(this,"REQUIRED_LONG_ARTICLE_PERCENTAGE",30),a(this,"REQUIRED_AD_SMALL_ARTICLE_PERCENTAGE",50),a(this,"TIME_NEEDED_FOR_EVENT",5e3),this.endpointUrl="https://analytics.shib.io",this.clientId=this.validateClientId(e),this.sessionId=this.validateSessionId(t||this.get
1SessionId()),this.pageName=document.title,this.url=window.location.href,this.config=o||{events:{}},this.referrer=this.validateReferrer(this.getRefParam()||r||"N/A"),this.userProperties={language:navigator.language||"",...n},this.deviceProperties={manufacturer:g().manufacturer,model:g().model,os:g().OS,screen_x_size:window.screen.width,screen_y_size:window.screen.height,ua:navigator.userAgent,...i}}getRequestProperties(){let e=new Date().toISOString();return{user_properties:this.userProperties,device_properties:this.deviceProperties,client_id:this.clientId,page_name:this.pageName,referrer:this.referrer||this.getRefParam(),sessionId:this.sessionId,timestamp:e,url:this.url}}getRefParam(){var e;try{let t=document.referrer,r,n;t&&t.length&&(r=new URL(t),n=new URLSearchParams(r.search));let i=new URLSearchParams(window.location.search).get("ref"),o=localStorage.getItem("sdk_ref");if(i&&"string"==typeof i&&null!=i&&i.length)return localStorage.setItem("sdk_ref",i),i;if(o&&null!=o&&o.length&&!o.includes(window.location.hostname))return o;if(t&&r&&n&&(null==(e=n.get("ref"))?void 0:e.trim())!=="")return localStorage.setItem("sdk_ref",n.get("ref")),n.get("ref");if(document.referrer&&document.referrer.length)return localStorage.setItem("sdk_ref",document.referrer),document.referrer}catch(e){console.log("err.get.ref:",e)}return"N/A"}getSessionId(){var e;try{let t="";if("undefined"==typeof document)return h();if(-1!=window.location.href.indexOf("/authorize")&&localStorage.getItem("redirect_session_id")){let e=localStorage.getItem("redirect_session_id");if(e&&e.length)return e}let r=document.referrer,n,i;r&&r.length&&(n=new URL(r),i=new URLSearchParams(n.search));let o=new URLSearchParams("undefined"!=typeof window&&window.location?window.location.search:""),a=o.has("session_id")?o.get("session_id"):null;if("undefined"!=typeof sessionStorage&&sessionStorage.getItem("session_id")){let e=sessionStorage.getItem("session_id");e&&e.length&&(t=e)}return a&&a.length&&(t=a),r&&n&&i&&null!=(e=i.get("session_id"))&&e.trim()&&(sessionStorage.setItem("session_id",i.get("session_id")),t=i.get("session_id")),t.length||(t=h()),"undefined"!=typeof sessionStorage&&sessionStorage.setItem("session_id",t),t}catch(t){console.log("gsi.err, will return new session ID",t);let e=h();return"undefined"!=typeof sessionStorage&&sessionStorage.setItem("session_id",e),e}}init(){this.logger("Initializing Analytics instance","INFO",{clientId:this.clientId,sessionId:this.sessionId,referrer:this.referrer}),this.trackPageView(),this.trackPageClose()}log(){console.log("Logging",this)}setUser(e){null!=e&&e.email&&(this.userProperties.shib_account_email=e.email),null!=e&&e.wallet&&(this.userProperties.wallet_id=e.wallet)}async trackEvent(e){var t;let r=new Date().toISOString(),n=this.generateRandomId();if(!e.eventType)throw Error(`Invalid event type, you need to specify an event type to track, ${e.eventType} is not a valid event type.`);if(!e.parentEventId&&this.config.events[e.eventType]){let t=p.findParentEventId(this.sessionId,this.config.events[e.eventType].parent);t&&(e.parentEventId=t)}let i={clientId:this.clientId,eventId:n,pageName:this.pageName,referrer:this.referrer,sessionId:this.sessionId,timestamp:r,url:(null==(t=null==window?void 0:window.location)?void 0:t.href)||this.url,...e.extra,...e,deviceProperties:{...this.deviceProperties,...e.deviceProperties},userProperties:{...this.userProperties,...e.userProperties}},o=await this.sendTrackingEventToEndpointWithRetry(i,n,e.eventTypeOverride);if(o){let t=f(i),r=e.eventTypeOverride||t.event_type;p.addEvent(this.sessionId,{type:r,timestamp:Date.now(),event_id:n,parent_event_id:null,event_result:o,url:location.href})}return o}async trackVisibleEvent({elementId:e,eventType:t,percent:r=this.REQUIRED_AD_SMALL_ARTICLE_PERCENTAGE,timeInMilliseconds:n=this.TIME_NEEDED_FOR_EVENT,eventData:i,callback:o=()=>{}}){this.logger("Tracking visible event","INFO",{elementId:e,eventType:t,percent:r,timeInMilliseconds:n,eventData:i,callback:o});let a=document.getElementById(e);if(!a)throw Error(`Invalid element ID, element not found. ${e}`);let s=`${t}_${e}`,l=null,d=!1,c="";if(this.liveTrackedEvents[s])return this.logger("Event already tracked","INFO",{eventId:c,elementId:e}),c;let u=()=>{if(d)return this.logger("Event already tracked","INFO",{event,elementId:e}),c;l=setTimeout(async()=>{try{let r=await this.trackEvent({eventType:t,...i});this.logger("Event tracked","INFO",{event:r,elementId:e}),d=!0,c=r;try{o()}catch(e){console.log("visible.callb.err:",e)}this.liveTrackedEvents[s]={id:c,time:Date.now()}}catch(t){this.logger("Error tracking visible event","ERROR",{err:t,elementId:e})}},n)},h=()=>{l&&(clearTimeout(l),l=null)};return new IntersectionObserver(e=>{let t=e[0].isIntersecting,r=e[0].target.id;t?(this.logger("Element is visible","INFO",{elementId:r}),this.logger("Start timer","INFO",{elementId:r,timeInMilliseconds:n}),u()):(this.logger("Element is not visible","INFO",{elementId:r}),this.logger("Reset timer","INFO",{elementId:r,timeInMilliseconds:n}),h())},{threshold:r/100}).observe(a),c}async trackVisibleHeightEvent({elementId:e,eventType:t,percent:r=this.REQUIRED_LONG_ARTICLE_PERCENTAGE,timeInMilliseconds:n=this.TIME_NEEDED_FOR_EVENT,eventData:i}){this.logger("Tracking visible height event","INFO",{elementId:e,eventType:t,percent:r,timeInMilliseconds:n,eventData:i});let o=!1;console.debug("trackVisibleHeightEvent: "+e+" - "+t);let a=document.getElementById(e);if(!a)throw Error(`Invalid element ID, element not found. ${e}`);let s=`${t}_${e}`,l=this.liveTrackedEvents[s];if(l)return this.logger("Event already tracked","INFO",{eventId:l,elementId:e}),l.id;let d="",c,u=!1;new IntersectionObserver(t=>{t[0].isIntersecting?(this.logger("Element is visible through intersection observer","INFO",{elementId:e}),u=!0):(this.logger("Element is not visible through intersection observer","INFO",{elementId:e}),u=!1)}).observe(a);let h=()=>{let l=a.getBoundingClientRect().top,h=window.innerHeight,g=Math.round((h-l)/h*100);if(g<r){c&&(this.logger("Element is not visible enough, reset timer","INFO",{currentPercentageOfElementVisible:g,elementId:e,percent:r}),clearTimeout(c),c=null);return}c||o||!u||(this.logger("Element is visible enough, start timer","INFO",{timeInMilliseconds:n,elementId:e,currentPercentageOfElementVisible:g,percent:r}),c=setTimeout(async()=>{this.logger("trigger view visible event save","INFO",{elementId:e,[
1s]:this.liveTrackedEvents[s]}),c=null;let r=this.liveTrackedEvents[s];if(r)this.logger("Was prev tracked","INFO",{eventType:t,elementId:e}),d=r.id,o=!0;else{let r=await this.trackEvent({eventType:t,...i});d=r,o=!0,this.logger("Event tracked","INFO",{event:r,elementId:e}),sessionStorage.setItem(s,d)}},n))};return window.addEventListener("scroll",h),d}async sendTrackingEventToEndpoint(e,t,r){try{if("object"!=typeof e)throw Error("Invalid request body, you can only send objects.");let n={...e,client_id:this.clientId},i=f(n),o=`${this.endpointUrl}/${r||i.event_type}`,a=await fetch(o,{method:"POST",body:JSON.stringify(i),keepalive:!0,headers:{"Content-Type":"application/json"}});if(200!==a.status)throw Error(`Invalid response status, expected 200, got: ${a.status}, this generally happens when you want to send an event_type to that is not supported.`);return t}catch(t){throw this.logger("Error sending tracking event to endpoint","ERROR",{error:t,requestBody:e}),t}}async sendTrackingEventToEndpointWithRetry(e,t,r,n=3,i=1e3,o=6e4){let a=0,s=i;for(;a<n;)try{return await this.sendTrackingEventToEndpoint(e,t,r)}catch(e){this.logger(`Error sending tracking event (attempt ${a+1} of ${n}):`,"ERROR",{error:e}),a++,s=Math.min(2*s,o),a<n&&await new Promise(e=>setTimeout(e,s))}throw Error(`Failed to send tracking event after ${n} attempts.`)}generateRandomId(){return h()}trackPageView(){this.liveTrackedEvents={},this.trackEvent({eventType:"page-view"})}trackPageClose(){window.addEventListener("beforeunload",()=>{this.trackEvent({eventType:"page-close",eventTypeOverride:"page-view"})})}validateClientId(e){if(!e||"string"!=typeof e)throw Error("Invalid clientId. It must be a non-empty string.");return e}validateSessionId(e){if(!e||"string"!=typeof e)throw Error("Invalid sessionId. It must be a non-empty string.");return e}validateReferrer(e){if(!e||"string"!=typeof e)throw Error("Invalid referrer. It must be a string.");return e}logger(e,t="INFO",r){if(!this.logEnabled)return;let n=new Date().toISOString();"INFO"===t?console.log(`[${n}] [INFO] ${e}`,r):"ERROR"===t?console.error(`[${n}] [ERROR] ${e}`,r):"WARNING"===t?console.warn(`[${n}] [WARNING] ${e}`,r):console.log(`[${n}] [INFO] ${e}`,r)}};console.log("Analytics SDK Loaded")}}]);

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.