PageSourceSearch

https://buy-purisaki.com/build/assets/tracktor-D_qCyAul.js

js buy-purisaki.com collected 2026-09-28 23:57:49 UTC 4,968 bytes, 1 lines download raw bytes

1import{o as e,t}from"./rolldown-runtime-DAXXjFlN.js";var n=t(((e,t)=>{function n(e){return a(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,e)}function r(e){return a(/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/,e)}function i(e){return a(/^\+?[0-9]{1,4}?[-.\s]?(?:\([0-9]{1,4}\)|[0-9]{1,4})[-.\s]?[0-9]{1,4}[-.\s]?[0-9]{1,9}$/,e)}function a(e,t){return typeof t==`string`?e.test(t.trim()):!1}t.exports={validateUUID:n,validateEmail:r,validatePhoneNumber:i,validateRegex:a}})),r=t(((e,t)=>{function n(){let e=window.location.hostname.split(`.`),t=new Set([`.co.uk`,`.com.au`,`.co.jp`,`.co.in`,`.com.br`,`.com.mx`]);for(let n=0;n<e.length-1;n++){let r=`.`+e.slice(n).join(`.`);if(t.has(r))return e.slice(n-1).join(`.`)}return e.slice(-2).join(`.`)}function r(){return`${window.location.protocol}//tracktor.${n()}`}t.exports={getMainDomain:n,getFirstPartyTrackingDomain:r}})),i=t(((e,t)=>{t.exports=class{constructor(){this.queue=[],this.lock=!1,this.processing=!1,this.initBuffer=[]}async acquire(e=5e3){let t=Date.now();for(;this.lock;){if(Date.now()-t>e){console.error(`Lock acquisition timeout`),this.lock=!1;break}await new Promise(e=>setTimeout(e,10))}return this.lock=!0,!0}release(){this.lock=!1}async enqueue(e,t){if(!t){this.initBuffer.push(e);return}this.queue.push(e),this.processing||await this.processQueue()}async processInitBuffer(){for(let e of this.initBuffer)await this.enqueue(e,!0);this.initBuffer=[]}async processQueue(){if(!this.processing){await this.acquire();try{for(this.processing=!0;this.queue.length>0;){let e=this.queue.shift();try{await e()}catch(t){console.error(`Error processing tracktor event:`,e,t)}}}finally{this.processing=!1,this.release()}}}}})),a=t(((e,t)=>{t.exports=class{constructor(){this.iframe=null}initialize(e,t){this.iframe=document.createElement(`iframe`),this.iframe.width=`1`,this.iframe.height=`1`,this.iframe.style.border=`0`,this.iframe.onload=()=>{t()},this.iframe.onerror=()=>{throw Error(`Tracktor Iframe failed to load`)},this.iframe.src=e,document.body.appendChild(this.iframe)}async postMessage(e,t,n){if(!this.iframe||!e)throw Error(`Tracktor not initialized properly`);let r={type:t,detail:n};this.iframe.contentWindow.postMessage(r,`*`)}}})),o=t(((e,t)=>{var{validateUUID:o,validateEmail:s,validatePhoneNumber:c,validateRegex:l}=n(),{getFirstPartyTrackingDomain:u}=r(),d=i(),f=a(),p=10;t.exports=class{constructor(e=null){this.url=e||u(),this.initialized=!1,this.queueManager=new d,this.iframeManager=new f,this.customEventsBuffer=[],this.pageViewCompleted=!1,this.setupRecordedEventListener()}setupRecordedEventListener(){window.addEventListener(`message`,e=>{e.data&&e.data.type===`client:recorded`&&(this.pageViewCompleted=!0,this.customEventsBuffer.length>0&&this.customEventsBuffer.splice(0).forEach(({name:e,data:t})=>{this.enqueue(()=>this.postMessage(this.uuid,`customEvent`,{uuid:this.uuid,name:e,data:t}))}))})}async acquire(e=5e3){return this.queueManager.acquire(e)}release(){this.queueManager.release()}async enqueue(e){return this.queueManager.enqueue(e,this.initialized)}async waitForQueueEmpty(){return this.queueManager.queue.length===0&&!this.queueManager.processing?Promise.resolve():new Promise(e=>{let t=()=>{this.queueManager.queue.length===0&&!this.queueManager.processing?e():setTimeout(t,10)};t()})}initialize(e){if(!o(e))throw Error(`Tracktor - invalid UUID`);this.uuid=e,this.iframeManager.initialize(this.url,()=>{this.initialized=!0,this.queueManager.processInitBuffer()})}async pageView(e,t,n,r){let i={uuid:this.uuid,data:e,url:window.location.href,related_uuid:n,referrer:document.referrer||r||``};return t&&(i.segments=t),this.enqueue(()=>{let e=this.customEventsBuffer.splice(0,p);return e.length>0&&(i.events=e),this.postMessage(this.uuid,`recordVisit`,i)})}async postMessage(e,t,n){return this.iframeManager.postMessage(e,t,n)}async recordEmail(e){if(s(e))return this.enqueue(()=>this.postMessage(this.uuid,`recordEmail`,{uuid:this.uuid,email:e}))}async recordPhone(e){if(c(e))return this.enqueue(()=>this.postMessage(this.uuid,`recordPhone`,{uuid:this.uuid,phone:e}))}async customEvent(e,t={}){if(!e||typeof e!=`string`){console.error(`Tracktor - invalid event name. Event name must be a non-empty string.`);return}return this.pageViewCompleted?this.enqueue(()=>this.postMessage(this.uuid,`customEvent`,{uuid:this.uuid,name:e,data:t})):(this.customEventsBuffer.push({name:e,data:t}),Promise.resolve())}}})),s=new(e(t(((e,t)=>{t.exports=o()}))())).default;window.addEventListener(`load`,function(){let e=document.querySelector(`input[name="email"]`);e&&e.addEventListener(`change`,function(){s.recordEmail(e.value).cat
1ch(e=>console.error(e))});let t=document.querySelector(`input[name="_phone_number"]`),n=document.querySelector(`input[name="phone_number"]`);t&&n&&t.addEventListener(`change`,function(){s.recordPhone(n.value).catch(e=>console.error(e))})}),window.tracktor=s,window.dispatchEvent(new Event(`tracktor:init`));

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.