PageSourceSearch

https://mtidistributing.com/wp-content/cache/min/1/up_loader.1.1.0.js?ver=1784221257

js mtidistributing.com collected 2026-10-05 18:40:54 UTC 42,585 bytes, 1 lines download raw bytes

1var TTDConversionEvents;(()=>{"use strict";var e={d:(n,t)=>{for(var r in t)e.o(t,r)&&!e.o(n,r)&&Object.defineProperty(n,r,{enumerable:!0,get:t[r]})},o:(e,n)=>Object.prototype.hasOwnProperty.call(e,n),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},n={};e.r(n),e.d(n,{argsToSdkFunction:()=>Re,clearAllConfigs:()=>$e,dumpConfigs:()=>Ae,event:()=>Ne});var t={tcfV2ConsentVersion:2,consentRequestHasTimedOut:!1,waitForConsentTimeout:null,consentCheckExists:!1,isGdprApplicable:!1,gdprConsentString:null};function r(){return new URL(window.location.href).searchParams.has("upjs_debug")}function i(){return r()||null!=localStorage.getItem("enable-ttd-pixel-debugging")}function o(e){if(!e)return"";var n=void 0!==e.advertiserId&&null!==e.advertiserId?"adv_".concat(e.advertiserId):"merchant_".concat(e.merchantId),t=e.pixelIds&&e.pixelIds.length>0?"|".concat(e.pixelIds.join(",")):"";return"".concat(n).concat(t," ")}function a(e,n){var t=i(),r=(null==n?void 0:n.enableDebug)||!1;if(t||r){var a=o(n);console.info("TTD Pixel v3: ".concat(a).concat(e))}}function c(e,n){var t=i(),r=(null==n?void 0:n.enableDebug)||!1;if(t||r){var a=o(n);console.error("TTD Pixel v3: ".concat(a).concat(e))}}function l(e,n){for(var t=[],r=2;r<arguments.length;r++)t[r-2]=arguments[r];var a=i(),c=(null==n?void 0:n.enableDebug)||!1;if(a||c){var l=o(n);console.warn("TTD Pixel v3: ".concat(l).concat(e),t)}}var d=function(){return d=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var i in n=arguments[t])Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i]);return e},d.apply(this,arguments)},u={merchantId:null,advertiserId:null,enableDebug:!1,enableCookieSyncing:!0,get rootUrl(){return"https://insight.adsrvr.org"},dataProcessingOption:null,pixelVersion:"3.0.0",eventDataSourceVersion:"3.0.4"};function s(e){return!(null==e||"string"==typeof e&&""===e.trim()||"number"==typeof e&&(isNaN(e)||!isFinite(e)))}function v(e){if(null!=e){if("string"==typeof e){var n=e.split(",").map((function(e){return e.trim()})).filter(Boolean);return n.length>0?n:void 0}return Array.isArray(e)?e:void 0}}function f(e,n,t){var r;return r=null!=e?"adv_".concat(e):null!=n?"merchant_".concat(n):"nokey",t?"".concat(r,"|").concat(t):r}function p(e,n,t,r,i){r=v(r);for(var o=s(n),d=s(t),u=r&&r.length>0,p=o||d,g=Array.from(new Set(e.values())),m=0,h=u?r.map((function(e){return f(n,t,e)})):[f(n,t)];m<h.length;m++){var y=h[m],b=e.get(y);if(b)return a("Exact config match found",b),b}if(p&&!u||u&&!p){var w=g.filter((function(e){return!!(o&&e.advertiserId===n||d&&e.merchantId===t)||!(!u||!r.some((function(n){var t;return null===(t=e.pixelIds)||void 0===t?void 0:t.includes(n)})))}));if(w.length>0)return a("Partial config match found",w[0]),w.length>1&&l("Multiple partial config matches found, using first one",w[0],w.slice(1)),w[0];if(p)return void c("No matching config found for adv/merchant '"+n+"/"+t+"', event will not fire")}if(p&&u)c("Event sent ids (advId: "+n+", merchantId: "+t+", pixelIds: "+(null==r?void 0:r.join(","))+") but no exact config match found, event will not fire");else{if(1===g.length)return a("Single config found, using it for event",g[0]),g[0];if(!u)return l("Event ids not sent, will use mostRecentInitConfig",i),i;c("No matching config found for pixel_ids '"+r.join(",")+"', event will queue and fire with default config after timeout")}}var g=function(){return g=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var i in n=arguments[t])Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i]);return e},g.apply(this,arguments)},m=g({},t),h=g({},u);function y(e){if(m=g({},t),h=e,"function"==typeof window.__tcfapi){m.consentCheckExists=!0,m.waitForConsentTimeout=setTimeout(w,1e3),window.__tcfapi("addEventListener",m.tcfV2ConsentVersion,b),_("parse tcf response");var n="&gdpr=".concat(m.isGdprApplicable?1:0),r=null===m.gdprConsentString||void 0===m.gdprConsentString?"":"&gdpr_consent=".concat(m.gdprConsentString);return"".concat(n).concat(r)}_("tcfapi not a function")}function b(e,n){if(m.consentRequestHasTimedOut)return _("tcfapi consent request timed out"),void(m.isGdprApplicable=!0);n&&(clearTimeout(m.waitForConsentTimeout),m.isGdprApplicable=e.gdprApplies,m.gdprConsentString=e.tcString)}function w(){m.consentRequestHasTimedOut=!0}function _(e){(i()||h.enableDebug)&&console.info("TTD Pixel v3: "+e)}var I,x=function(){return x=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var i in n=arguments[t])Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i]);return e},x.apply(this,arguments)},S=null,k={gppString:""},D=x({},u);function E(){I=!0}function T(e){var n;return I?(P("gpp request timed out"),void window.__gpp("removeEventListener",null,e.listenerId)):"signalStatus"===e.eventName&&"ready"===e.data?(k.gppString=null===(n=null==e?void 0:e.pingData)||void 0===n?void 0:n.gppString,clearTimeout(S),window.__gpp("removeEventListener",null,e.listenerId),C(k)):void P("gpp event invalid")}function C(e){var n="&gpp_consent="+e.gppString;return"".concat(n)}function P(e){(i()||D.enableDebug)&&console.info("TTD Pixel v3: "+e)}function L(e,n,t){var r=document.getElementById(n);if(r instanceof HTMLIFrameElement&&r.src===e)return r;!function(e){var n=document.getElementById(e);do{n&&n.parentElement.removeChild(n),n=document.getElementById(e)}while(n)}(n);var i=document.createElement("iframe");function o(){document.body.appendChild(i)}return i.setAttribute("id",n),i.setAttribute("height","0"),i.setAttribute("width","0"),i.setAttribute("hidden",""),i.setAttribute("src",e),i.setAttribute("title",t),"complete"===document.readyState?setTimeout(o,0):window.addEventListener?window.addEventListener("load",o):window.attachEvent?window.attachEvent("onload",o):o(),i}function O(e){var n;try{if(window.self===window.top)return N(e,"strategy 1: found top level"),window.location.href}catch(n){N(e,"strategy 1: cross origin top, continue")}try{var t=null===(n=null===top||void 0===top?void 0:top.location)||void 0===n?void 0:n.href;if(t)return N(e,"strategy 2: top href found"),t}catch(n){N(e,"strategy 2: cross origin top, continue")}for(var r="",i=window;;){try{var o=i.parent.location.href;o&&(r=o)}catch(n){try{var a=i.document.referrer;a&&A(a,r,e)&&(r=a)}catch(e){break}}try{if(i.parent===i)break;i=i.parent}catch(e){break}}if(!r||j(r))try{var c=window.location.ancestorOrigins;if(c&&c.length>0){var l=c[c.length-1];l&&A(l,r,e)&&(r=l,N(e,"strategy 4: found toporigin: "+l+" from origins: "+c))}}catch(n){N(e,"strategy 4: ancestorOrigins unsupported, continue")}if(!r||j(r)){var d=function(e){try{if((t=document.querySelector("link[rel='canonical']"))&&(r=t.href))return r}catch(n){N(e,"strategy 5: canonical link not accessible in current document")}for(var n=window;;)try{if(n.parent===n)break;var t,r;if((t=(n=n.parent).document.querySelector("link[rel='canonical']"))&&(r=t.href))return r}catch(n){N(e,"strategy 5: cross-origin parent, cannot read canonical link");break}return""}(e);d&&A(d,r,e)&&(r=d,N(e,"strategy 5: canonical url found"))}if(!r||j(r)){var u=function(e,n){try{var t=window.dataLayer;if(!t||!Array.isArray(t))return N(n,"strategy 6: dataLayer not present or not an array"),"";var r="";try{r=e?new URL(e).origin:""}
1catch(t){N(n,"strategy 6: could not parse known origin: "+e)}for(var i=t.length-1;i>=0;i--){var o=t[i];if(o&&"object"==typeof o&&!Array.isArray(o))for(var a=0,c=R;a<c.length;a++){var l=c[a],d=o[l];if("string"==typeof d&&d)try{var u=new URL(d);if("/"===u.pathname&&""===u.search)continue;if(!r||u.origin===r||d.startsWith("http"))return d}catch(e){if(r&&d.startsWith("/")&&d.length>1)return r+d;N(n,"strategy 6: dataLayer["+i+"]."+l+" is not a valid URL: "+d)}}}}catch(e){N(n,"strategy 6: error reading dataLayer, continue")}return""}(r,e);u&&A(u,r,e)&&(r=u,N(e,"strategy 6: dataLayer url found: "+u))}var s=function(e,n,t){var r=[];n&&n.includes("?")&&r.push(n),e&&e.includes("?")&&function(e){try{return"/"===new URL(e).pathname||-1!==e.indexOf("cloudfront.net")}catch(e){return!1}}(e)&&r.push(e);for(var i=0,o=r;i<o.length;i++)for(var a=o[i],c=0,l=V;c<l.length;c++){var d=l[c],u=U(a,d);if(u&&u.startsWith("http"))try{return new URL(u),N(t,"strategy 7: found url in param '"+d+"' of "+a.substring(0,80)),u}catch(e){N(t,"strategy 7: param '"+d+"' value is not a valid URL: "+u.substring(0,80))}}return""}(r,window.location.href,e);return s&&A(s,r,e)&&(r=s),r}function U(e,n){n=n.replace(/\[/,"\\[").replace(/]/,"\\]");var t=new RegExp("[\\?&]"+n+"=([^&#]*)").exec(e);return null===t?"":decodeURIComponent(t[1].replace(/\+/g," "))}function j(e){try{var n=new URL(e);return"/"===n.pathname&&""===n.search}catch(e){return!1}}function A(e,n,t){if(!n)return!0;try{var r=new URL(e),i=new URL(n),o="/"!==r.pathname||""!==r.search,a="/"!==i.pathname||""!==i.search;if(o&&!a)return!0;if(!o&&a)return!1}catch(r){N(t,"isBetterUrl: url was malformed. Candidate: "+e+", current: "+n)}return!0}var R=["page_location","page_url","page","dl","page_path"],V=["url","referrer","page_url","ref_url"];function N(e,n){(i()||e)&&console.warn("TTD Pixel v3 - Referrer: "+n)}var q=function(){var e,n,t={"[object Boolean]":"boolean","[object Number]":"number","[object String]":"string","[object Function]":"function","[object Array]":"array","[object Date]":"date","[object RegExp]":"regexp","[object Object]":"object"},r={isReady:!1,readyWait:1,holdReady:function(e){e?r.readyWait++:r.ready(!0)},ready:function(n){if(!0===n&&0==--r.readyWait||!0!==n&&!r.isReady){if(!document.body)return setTimeout((function(){return r.ready()}),1);if(r.isReady=!0,!0!==n&&--r.readyWait>0)return;null==e||e.resolveWith(document,[r])}},bindReady:function(){if(!e){if(e=r._Deferred(),"complete"===document.readyState)return setTimeout((function(){return r.ready()}),1);if(document.addEventListener)document.addEventListener("DOMContentLoaded",n,!1),window.addEventListener("load",(function(){return r.ready()}),!1);else if(document.attachEvent){document.attachEvent("onreadystatechange",n),window.attachEvent("onload",r.ready);var t=!1;try{t=null==window.frameElement}catch(e){console.log(e)}document.documentElement.doScroll&&t&&i()}}},_Deferred:function(){var e,n=[],t=!1,i=!1,o={done:function(){for(var t=[],a=0;a<arguments.length;a++)t[a]=arguments[a];if(!i){var c=void 0;e&&(c=e,e=void 0);for(var l=0,d=t;l<d.length;l++){var u=d[l],s=r.type(u);"array"===s?o.done.apply(o,u):"function"===s&&n.push(u)}c&&o.resolveWith(c[0],c[1])}return o},resolveWith:function(r,a){if(void 0===a&&(a=[]),!i&&!e&&!t){t=!0;try{for(;n.length;){var c=n.shift();null==c||c.apply(r,a)}}finally{e=[r,a],t=!1}}return o},resolve:function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return o.resolveWith(this,e)},isResolved:function(){return!(!t&&!e)},cancel:function(){return i=!0,n=[],o}};return o},type:function(e){return null==e?String(e):t[Object.prototype.toString.call(e)]||"object"}};function i(){if(!r.isReady){try{document.documentElement.doScroll("left")}catch(e){return void setTimeout(i,1)}r.ready()}}return document.addEventListener?n=function(){document.removeEventListener("DOMContentLoaded",n,!1),r.ready()}:document.attachEvent&&(n=function(){"complete"===document.readyState&&(document.detachEvent("onreadystatechange",n),r.ready())}),function(n){r.bindReady(),null==e||e.done(n)}}(),F=function(){return F=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var i in n=arguments[t])Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i]);return e},F.apply(this,arguments)},M=F({},u);function $(e,n){if(M=e,Y("Detection started! Library is configured to detect: ",n.detectionSubject),Y("Detection event type is ",n.detectionEventType),Y("Full config: ",n),"oncl
1ick"===n.detectionEventType&&(n.detectionEventType="click"),"onsubmit"===n.detectionEventType||"click"===n.detectionEventType){var t=document.querySelector("body");t&&(G(t,"document",n),n.detectDynamicNodes&&B(t,"document",n))}else Y("Detection type not supported! We will not start auto detection.")}function G(e,n,t){var r,i,o;t.scopedTriggers=null!==(r=t.scopedTriggers)&&void 0!==r?r:{},t.scopedValidInputs=null!==(i=t.scopedValidInputs)&&void 0!==i?i:{},t.scopedEventListeners=null!==(o=t.scopedEventListeners)&&void 0!==o?o:{},z(n,t),W(e,n,t)}function W(e,n,t){var r,i,o,a=J(e,n,t),c=J(e,n,t);t.scopedTriggers[n]=null!==(r=t.scopedTriggers[n])&&void 0!==r?r:[],t.scopedValidInputs[n]=null!==(i=t.scopedValidInputs[n])&&void 0!==i?i:[],t.scopedEventListeners[n]=null!==(o=t.scopedEventListeners[n])&&void 0!==o?o:[];for(var l=0,d=c;l<d.length;l++){var u=d[l];u&&u.tagName&&"INPUT"===u.tagName&&t.scopedValidInputs[n].push(u)}Y('triggers ["'.concat(n,'"] '),a),Y('validInputs ["'.concat(n,'"] '),c),a.forEach((function(e){t.scopedTriggers[n].push(e)}));for(var s=function(e){var r=function(){try{Y("Detect event: ",t.detectionEventType,"on element, ",e);for(var n=Object.entries(t.scopedValidInputs).map((function(e){return e[1]})).flatMap((function(e){return e})),r=0,i=n;r<i.length;r++){var o=i[r].value.trim();if(Q(o,t)){Y("We detected: ",o),H(t);break}}}catch(e){Y(e)}};t.scopedEventListeners[n].push(r),e.addEventListener(t.detectionEventType,r,{once:!0,capture:!0})},v=0,f=a;v<f.length;v++)s(f[v]);for(var p,g=(p=e,Array.from(p.querySelectorAll("*")).filter((function(e){return!!e.shadowRoot})).map((function(e){return e.shadowRoot}))),m=0;m<g.length;m++){var h=g[m],y=n+"/shadow_root_"+m;W(h,y,t),B(h,y,t)}}function H(e){Y("Detection stopped."),function(e){if(e.detectDynamicNodes){Y("Checking for dynamically added elements is turned off.");for(var n=0,t=Object.entries(e.scopedDynamicObservers);n<t.length;n++){var r=t[n][1];r&&r.disconnect(),e.scopedDynamicObservers={}}}}(e),z("all",e)}function z(e,n){if(Y("clearing detection hooks (".concat(e,")")),"all"===e){for(var t=0,r=Object.entries(n.scopedTriggers);t<r.length;t++){var i=r[t],o=i[0];if(s=i[1])for(var a=0;a<s.length;a++)s[a].removeEventListener(n.detectionEventType,n.scopedEventListeners[o][a],{capture:!0})}n.scopedTriggers={},n.scopedEventListeners={}}else if(n.scopedTriggers){for(var c=[],l=0,d=Object.entries(n.scopedTriggers);l<d.length;l++){var u=d[l],s=(o=u[0],u[1]);if(o.startsWith(e)){if(s)for(a=0;a<s.length;a++)s[a].removeEventListener(n.detectionEventType,n.scopedEventListeners[o][a],{capture:!0});c.push(o)}}for(var v=0;v<c.length;v++)o=c[v],n.scopedTriggers[o]=[],n.scopedEventListeners[o]=[]}}function B(e,n,t){var r;t.detectDynamicNodes&&(t.scopedDynamicObservers=null!==(r=t.scopedDynamicObservers)&&void 0!==r?r:{},t.scopedDynamicObservers[n]=Z((function(){Y("Detected dynamically added nodes."),G(e,n,t)}),500),t.scopedDynamicObservers[n].observe(e,{childList:!0,subtree:!0,attributes:!0}))}function J(e,n,t){Y('collectElements("'.concat(n,'", ').concat(t.cssSelectors,")"));for(var r=[],i=0,o=t.cssSelectors;i<o.length;i++)if((p=o[i]).length>0){var a=e.querySelectorAll(p);a&&a.forEach((function(e){r.includes(e)||r.push(e)}))}for(var c=window.location.hostname,l=document.getElementsByTagName("iframe"),d=0,u=Array.from(l);d<u.length;d++){var s=u[d];if(K(c,s)&&(s.__upixel_detection={root:e,scopeName:n+"/iframe",config:t},s.removeEventListener("load",X),s.addEventListener("load",X),s.contentDocument))for(var v=0,f=t.cssSelectors;v<f.length;v++){var p;(p=f[v]).length>0&&s.contentDocument.querySelectorAll(p).forEach((function(e){r.includes(e)||r.push(e)}))}}return r}function Z(e,n){var t=0,r=null;return new MutationObserver((function(i,o){var a=Date.now(),c=a-t;c>=n?(t=a,e(i,o)):(r&&clearTimeout(r),r=setTimeout((function(){t=Date.now(),e(i,o)}),n-c))}))}function K(e,n){if(!n.src)return!1;try{var t=e===new URL(n.src).hostname;return t&&Y("Iframe "+n.src+" can be accessed"),t}catch(e){return Y("error: ",e),!1}}function X(e){var n=e.currentTarget;if(n&&n.__upixel_detection)try{G(n.__upixel_detection.root,n.__upixel_detection.scopeName,n.__upixel_detection.config)}catch(e){Y(e)}}function Q(e,n){return function(e,n){var t=/((([^<>()[\].,;:\s@"]+(\.[^<>()[\].,;:\s@"]+)*)|(".+"))@(([^<>()[\].,;:\s@"]+\.)+[^<>()[\].,;:\s@"]{2,}))/i;if(n.detectionSubject.includes("email")&&t.test(e)){var r=function(e){return e.toLowerCase().trim()}(e.match(t)[0]);return Y("We detected email: "+r),function(e,n){if(e&&n){var t=new CustomEvent("detected-identifier",{detail:{identifier:e,type:n}});Y("Dispatched event with identifier: ",e," and type: ",n),window.dispatchEvent(t)}}(r,"email"),!0}return!1}(e,n)}function Y(e){for(var n=[],t=1;t<arguments.length;t++)n[t-1]=arguments[t];(i()||M.enableDebug)&&console.info("TTD Pixel v3 - Detection: "+e,n)}Z.prototype.observe=function(e,n){this.mutationObserver.observe(e,n)},Z.prototype.disconnect=function(){null!=this.nextTimeoutHandle&&clearTimeout(this.nextTimeoutHandle),this.mutationObserver.disconnect()},Z.prototype.takeRecords=function(){return this.mutationObserver.takeRecords()},Z.prototype.throttledCallback=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var t=Date.now();null!=this.args?this.args=e:this.lastInvocationTime+this.minDelayMs<t?(this.lastInvocationTime=t,this.callback(this.args)):(this.args=e,this.nextTimeoutHandle=setTimeout(function(){this.lastInvocationTime=Date.now(),this.nextTimeoutHandle=null,this.callback.apply(null,this.args),this.args=null}.bind(this),this.minDelayMs))};var ee=function(){return ee=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var i in n=arguments[t])Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i]);return e},ee.apply(this,arguments)},ne=function(e,n,t,r){return new(t||(t=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function c(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var n;e.done?i(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(a,c)}l((r=r.apply(e,n||[])).next())}))},te=function(e,n){var t,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;
1function c(o){return function(c){return function(o){if(t)throw new TypeError("Generator is already executing.");for(;a;)try{if(t=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=n.call(e,a)}catch(e){o=[6,e],r=0}finally{t=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,c])}}},re=ee({},u),ie={},oe=null;function ae(e,n){var t=this;re=e,se(n,ie),ue(n)?ie.sdkObj=window.__uid2:de(n)&&(ie.sdkObj=window.__euid);try{ie.sdkObj.callbacks.push((function(r,i){return ne(t,void 0,void 0,(function(){var t,o,a;return te(this,(function(c){switch(c.label){case 0:switch(r){case"SdkLoaded":return[3,1];case"InitCompleted":return[3,2];case"IdentityUpdated":return[3,4]}return[3,5];case 1:try{window.__ttd_m_invoke_once=null!==(t=window.__ttd_m_invoke_once)&&void 0!==t?t:{},window.__ttd_m_invoke_once._uid_init||(window.__ttd_m_invoke_once._uid_init=1,null!==(o=n.baseUrl)&&void 0!==o||(n.baseUrl=ie.uidBaseUrl),ie.sdkObj.init({baseUrl:n.baseUrl}))}catch(e){ve("Non-TTD actor initialized UID SDK, mind the consistency of UID baseUrl.",e)}return[3,5];case 2:return[4,le((function(){return i.identity}),e,n)];case 3:return c.sent(),[3,5];case 4:return(null===(a=i.identity)||void 0===a?void 0:a.advertising_token)&&(n.uid_token=i.identity.advertising_token,ve("UID token updated for advertiser ".concat(null==oe?void 0:oe.advertiserId,", pixel ").concat(null==oe?void 0:oe.pixelId))),[3,5];case 5:return[2]}}
1))}))}))}catch(n){fe("Did not setup uid hooks: ",e,n)}}function ce(e,n,t,r,i){var o,a;null===oe?void 0===window._uidSdkListenerLock[e]&&(window._uidSdkListenerLock[e]=1,1===(null!==(a=null===(o=i.pixelIds)||void 0===o?void 0:o.length)&&void 0!==a?a:0)?(oe={advertiserId:i.advertiserId,pixelId:i.pixelIds[0]},ve("UID config claimed by advertiser ".concat(oe.advertiserId,", pixel ").concat(oe.pixelId)),se(n,ie),void 0===ie.sdkObj&&void 0===window.uidSdkLoaderPromise?window.uidSdkLoaderPromise=new Promise((function(e,n){var i=document.createElement("script");i.setAttribute("defer","true"),i.setAttribute("src",ie.uidSdkUrl),i.addEventListener("load",(function(){e(),t()})),i.addEventListener("error",(function(e){n(e),r(e)})),document.body.appendChild(i)})):ne(this,void 0,void 0,(function(){return te(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,window.uidSdkLoaderPromise];case 1:return e.sent(),t(),[3,3];case 2:return fe("Failed to load uid sdk: ",e.sent()),[3,3];case 3:return[2]}}))}))):c("UID configuration currently only supports a single pixel ID, but zero or multiple pixel ids were provided.",i)):fe("UID already configured by advertiser ".concat(oe.advertiserId,", pixel ").concat(oe.pixelId,". Only one UID configuration per page is currently allowed."))}function le(e,n,t){return ne(this,void 0,void 0,(function(){var r,i,o;return te(this,(function(a){switch(a.label){case 0:return a.trys.push([0,8,,9]),(r=e())?[3,3]:t.email?[4,ie.sdkObj.setIdentityFromEmail(t.email,t)]:[3,2];case 1:return a.sent(),[3,3];case 2:t.emailHash?ie.sdkObj.setIdentityFromEmailHash(t.emailHash,t):t.phone?ie.sdkObj.setIdentityFromPhone(t.phone,t):t.phoneHash&&ie.sdkObj.setIdentityFromPhoneHash(t.phoneHash,t),a.label=3;case 3:return r?(t.uid_token=r.advertising_token,ve("UID token set from existing identity for advertiser ".concat(n.advertiserId),n),[3,7]):[3,4];case 4:return window.ttdConversionEvents.activeDetection?[3,7]:(ve("in fire or detect no identity"),i=new Promise((function(e){window.addEventListener("detected-identifier",(function(n){e(n.detail.identifier),window.ttdConversionEvents.activeDetection=null})),window.ttdConversionEvents.startDetection=$,window.ttdConversionEvents.startDetection(n,t)})),window.ttdConversionEvents.activeDetection=i,[4,i]);case 5:return o=a.sent(),[4,ie.sdkObj.setIdentityFromEmail(o,t)];case 6:return a.sent(),[3,7];case 7:return[3,9];case 8:return fe("error setting up cstgOrDetect: ",a.sent()),[3,9];case 9:return[2]}}
1))}))}function de(e){return"EUID"===(null==e?void 0:e.type)||e.serverPublicKey.includes("EUID")}function ue(e){return"UID2"===(null==e?void 0:e.type)||e.serverPublicKey.includes("UID2")}function se(e,n){ue(e)?(n.uidSdkUrl="https://js.adsrvr.org/uid2-sdk-4.0.1.js",n.uidBaseUrl="https://global.prod.uidapi.com",n.rtUidTokenName="uid2_token"):de(e)&&(n.uidSdkUrl="https://js.adsrvr.org/euid-sdk-4.0.1.js",n.uidBaseUrl="https://prod.euid.eu",n.rtUidTokenName="euid_token")}function ve(e){for(var n=[],t=1;t<arguments.length;t++)n[t-1]=arguments[t];(i()||re.enableDebug)&&console.info("TTD Pixel v3 - UnifiedId: "+e,n)}function fe(e){for(var n=[],t=1;t<arguments.length;t++)n[t-1]=arguments[t];(i()||re.enableDebug)&&console.warn("TTD Pixel v3 - UnifiedId: "+e,n)}function pe(){var e={};return document.cookie.split(";").forEach((function(n){if(n){var t=n.split("="),r=t[0].trim(),i=t[1].trim();e[r]=i}})),e}function ge(e,n){(i()||e)&&console.warn("TTD Pixel v3 - GA4: "+n)}var me=function(){return me=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var i in n=arguments[t])Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i]);return e},me.apply(this,arguments)},he=function(e,n,t){if(t||2===arguments.length)for(var r,i=0,o=n.length;i<o;i++)!r&&i in n||(r||(r=Array.prototype.slice.call(n,0,i)),r[i]=n[i]);return e.concat(r||Array.prototype.slice.call(n))};function ye(e){var n=window.ttdConversionEventsLayer.indexOf(e);-1!==n&&window.ttdConversionEventsLayer.splice(n,1)}function be(e){var n=e.config;if(!n)throw"Cannot execute event without config";switch(e.method){case"event":a("event fire triggered",n),Ne(e.params,n,!0),e.hasFired=!0;break;case"optout":a("optout triggered",n),e.params.isoptout="1",Ne(e.params,n,!1),e.hasFired=!0;break;default:throw a("unexpected event triggered: "+e.method,n),"method not implemented"}}var we=/^[a-zA-Z_$][a-zA-Z0-9_$]*(\.[a-zA-Z_$][a-zA-Z0-9_$]*)*$/,_e=/^([a-zA-Z_$][a-zA-Z0-9_$]*(?:\.[a-zA-Z_$][a-zA-Z0-9_$]*)*)\(\)$/,Ie=[/^\{\{[\s\S]+\}\}$/,/^\{[\s\S]+\}$/,/^<%=?[\s\S]+%>$/,/^%%[\s\S]+%%$/,/^%p\w+\s*[=!0-9]+\s*;?$/,/^%[^%\s]+%$/,/^\[+[\s\S]+\]+$/,/^\([\s\S]+\)$/,/^["'][\s\S]+["']$/];function xe(e){var n=window[e];if(void 0!==n)return n;if(we.test(e))try{return new Function("return (".concat(e,");"))()}catch(e){return}}function Se(e){var n,t;return{evaluatedParameter:ke(String(null!==(n=null==e?void 0:e.evaluatedParameter)&&void 0!==n?n:"").trim()),parameterValue:ke(String(null!==(t=null==e?void 0:e.parameterValue)&&void 0!==t?t:"").trim())}}function ke(e){return e.replace(/&(?:#(\d+)|#x([0-9a-fA-F]+)|([a-zA-Z]+));/g,(function(e,n,t,r){if(void 0!==n)return String.fromCharCode(parseInt(n,10));if(void 0!==t)return String.fromCharCode(parseInt(t,16));switch(r){case"amp":return"&";case"quot":return'"';case"apos":return"'";case"lt":return"<";case"gt":return">";case"nbsp":return" ";default:return e}}))}function De(e,n,t,r){var i=e.parameterValue,o=i.match(_e);if(o)return Ee(o[1],i,e,n,t);var a=we.test(i);if(a){var c=xe(i);if("function"==typeof c)return Ee(i,i,e,n,t,c);if(null!=c)return String(c)}var d=function(e){try{var n=e.replace(/\\/g,"\\\\").replace(/"/g,'\\"'),t=document.querySelector('[name="'.concat(n,'"]'));if(!t)return;var r=t.value;return"string"==typeof r?r:void 0}catch(e){return}}(i);if(void 0!==d&&""!==d)return d;if(a)l("DynamicParams:could not resolve '".concat(i,"' for ").concat(e.evaluatedParameter," on pixel ").concat(n,"(tried variable,function,and form field name)"),t);else{if(function(e){return Ie.some((function(n){return n.test(e)}))}(i))return l("DynamicParams:'".concat(i,"' for ").concat(e.evaluatedParameter," on pixel ").concat(n," looks like an unfilled template placeholder and no matching form field exists"),t),void r.add("".concat(e.evaluatedParameter,"t"));l("DynamicParams:'".concat(i,"' for ").concat(e.evaluatedParameter," on pixel ").concat(n," is not a safe identifier path and no matching form field exists"),t),r.add("".concat(e.evaluatedParameter,"u"))}}function Ee(e,n,t,r,i,o){var a=void 0!==o?o:xe(e);if("function"==typeof a){var c;try{c=a()}catch(e){return void l("DynamicParams:'".concat(n,"' for ").concat(t.evaluatedParameter," on pixel ").concat(r," threw when called:").concat(e),i)}if(null!=c)return String(c);l("DynamicParams:'".concat(n,"' for ").concat(t.evaluatedParameter," on pixel ").concat(r," returned ").concat(null===c?"null":"undefined"),i)}else l("DynamicParams:'".concat(n,"' for ").concat(t.evaluatedParameter," on pixel ").concat(r," is not a function"),i)}var Te,Ce,Pe=function(){return Pe=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var i in n=arguments[t])Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i]);return e},Pe.apply(this,arguments)},Le=function(e,n,t,r){return new(t||(t=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function c(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var n;e.done?i(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(a,c)}l((r=r.apply(e,n||[])).next())}))},Oe=function(e,n){var t,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;
1function c(o){return function(c){return function(o){if(t)throw new TypeError("Generator is already executing.");for(;a;)try{if(t=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=n.call(e,a)}catch(e){o=[6,e],r=0}finally{t=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,c])}}},Ue=new Map,je=[];function Ae(){var e=Array.from(new Set(Ue.values())),n=e.some((function(e){return e.enableDebug}));if(i()||n){var t=e.map((function(e){return JSON.parse(JSON.stringify(e))}));return console.info("TTD Pixel v3:dumpConfigs(".concat(t.length," config").concat(1===t.length?"":"s","):"),t),t}console.info("TTD Pixel v3:dumpConfigs requires debug mode.Enable via `?upjs_debug` query param,`localStorage.setItem('enable-ttd-pixel-debugging', '1')`,or `enableDebug: true` on init.")}function Re(e){var n,t,i,o,l,g,m=e[0],h=e[1];if("init"===m){a("init triggered");try{!function(e){var n,t,i,o,a,l,g,m,h,y,b,w,_=e.merchantId,I=e.advertiserId,x=e.enableCookieSyncing,S=e.enableDebug,k=e.rootUrl,D=e.dataProcessingOption,E=e.uidConfig,T=e.pixelIds,C=e.referrerUrl,P=e.ga4MeasurementId,L=e.eventDataSource,O=e.eventDataSourceVersion;Le(this,void 0,void 0,(function(){var e,U;return Oe(this,(function(j){switch(j.label){case 0:if(e=function(e,n,t,r){for(var i,o=(null==(r=v(r))?void 0:r.length)>0?r.map((function(e){return f(n,t,e)})):[f(n,t)],a=0,c=o;a<c.length;a++){var l=c[a];if(i=e.get(l))break}i||(i=d({},u));for(var s=0,p=o;s<p.length;s++)l=p[s],e.set(l,i);return i}(Ue,I,_,T),e.merchantId=null!=_?_:e.merchantId,e.advertiserId=null!=I?I:e.advertiserId,!function(e,n){return s(e)||s(n)}(e.advertiserId,e.merchantId))return c("Init failed:At least one valid identifier(advertiserId or merchantId)is required."),[2];if(void 0!==L&&"JsSdkGtm"!==L)return c('Init failed: eventDataSource "'.concat(L,'" is not supported. Allowed values: "JsSdkGtm".')),[2];e.enableCookieSyncing=null!==(n=null!=x?x:e.enableCookieSyncing)&&void 0!==n?n:u.enableCookieSyncing,e.enableDebug=null!==(i=null!==(t=null!=S?S:e.enableDebug||void 0)&&void 0!==t?t:r())&&void 0!==i?i:null!=localStorage.getItem("enable-ttd-pixel-debugging")||u.enableDebug,e.rootUrl=null!==(o=null!=k?k:e.rootUrl)&&void 0!==o?o:u.rootUrl,e.dataProcessingOption=null!==(a=null!=D?D:e.dataProcessingOption)&&void 0!==a?a:u.dataProcessingOption,e.uidConfig=null!==(l=null!=E?E:e.uidConfig)&&void 0!==l?l:void 0,e.pixelIds=null!==(m=null!==(g=v(T))&&void 0!==g?g:e.pixelIds)&&void 0!==m?m:void 0,e.ga4MeasurementId=null!==(h=null!=P?P:e.ga4MeasurementId)&&void 0!==h?h:void 0,e.referrerUrl=null!==(y=null!=C?C:e.referrerUrl)&&void 0!==y?y:void 0,e.eventDataSource=null!==(b=null!=L?L:e.eventDataSource)&&void 0!==b?b:void 0,e.eventDataSourceVersion=null!==(w=null!=O?O:e.eventDataSourceVersion)&&void 0!==w?w:void 0,Te=e,U=new Promise((function(e){return setTimeout(e,2e3)})),j.label=1;case 1:return j.trys.push([1,3,4,5]),[4,Promise.race([Ve(e),U])];case 2:return j.sent(),[3,5];case 3:return c(j.sent(),e),[3,5];case 4:return e.initComplete=!0,function(e,n,t){for(var r,i,o,a,c,l,d,u,s=[],f=0,g=e;f<g.length;f++){var m=g[f];null!==(r=m.config)&&void 0!==r||(m.config=p(n,null!==(i=m.params.advertiserId)&&void 0!==i?i:m.params.adv,null!==(o=m.params.merchantId)&&void 0!==o?o:m.params.merchant_id,null!==(c=v(null!==(a=m.params.pixelIds)&&void 0!==a?a:m.params.pixel_ids))&&void 0!==c?c:v(null!==(d=null!==(l=m.params.pixel_id)&&void 0!==l?l:m.params.tracker_id)&&void 0!==d?d:m.params.upixel_id),t)),(null===(u=m.config)||void 0===u?void 0:u.initComplete)?(be(m),ye(m.args)):s.push(m)}e.splice.apply(e,he([0,e.length],s,!1))}(je,Ue,Te),[7];case 5:return[2]}}
1))}))}(h)}catch(e){c("Init failed:".concat(e instanceof Error?e.message:String(e)))}}else{var y=p(Ue,null!==(n=h.advertiserId)&&void 0!==n?n:h.adv,null!==(t=h.merchantId)&&void 0!==t?t:h.merchant_id,null!==(o=v(null!==(i=h.pixelIds)&&void 0!==i?i:h.pixel_ids))&&void 0!==o?o:v(null!==(g=null!==(l=h.pixel_id)&&void 0!==l?l:h.tracker_id)&&void 0!==g?g:h.upixel_id),Te),b={method:m,params:h,args:e,config:y};(null==y?void 0:y.initComplete)?(be(b),ye(e)):function(e,n){var t=n.params;n.config||a("No matching config found for event,queuing until init completes"),e.push(n),setTimeout((function(){if(e.includes(n)&&!n.hasFired&&!n.config){var r=t.adv?"adv:".concat(t.adv):t.merchant_id?"merchant_id:".concat(t.merchant_id):"unknown",i=v(t.pixel_ids),o=(null==i?void 0:i.join(","))||"none";c("No matching config for ".concat(r,",pixel_ids:[").concat(o,"],pixel_id:[").concat(t.pixel_id,"].")+"Ensure init is called with matching advertiserId/merchantId and pixelIds.Auto-firing event with default config."),n.hasFired=!0,Ne(t,me({},u),!0),function(e,n){var t=e.indexOf(n);-1!==t&&e.splice(t,1)}(e,n),ye(n.args)}}),5e3)}(je,b)}}function Ve(e){return new Promise((function(n){var t,r,i,o,d="".concat(e.rootUrl,"/track/cei"),u=void 0!==e.merchantId&&null!==e.merchantId?"merchant_id=".concat(e.merchantId):"advertiser_id=".concat(e.advertiserId),s="&cookie_sync=".concat(e.enableCookieSyncing?1:0),v="".concat(d,"?").concat(u).concat(s,"&upv=").concat(e.pixelVersion);null!=e.dataProcessingOption&&(v+="&dpop=".concat(e.dataProcessingOption.policies,"&dpor=").concat(e.dataProcessingOption.region)),e.pixelIds&&(v+="&upid=".concat(e.pixelIds.join(",")));var f=(null!==(t=e.advertiserId)&&void 0!==t?t:e.merchantId)+":"+(null!==(i=null===(r=e.pixelIds)||void 0===r?void 0:r.join(","))&&void 0!==i?i:"");e.uidConfig&&(v+="&uidc_present=1",window._uidSdkListenerLock=null!==(o=window._uidSdkListenerLock)&&void 0!==o?o:{},a("setting up uid config",e),ce(f,e.uidConfig,(function(){return ae(e,e.uidConfig)}),(function(n){return l("UID enabled but failed to register hooks:",e,n)}),e));var p=y(e);if(null!=p)v+="".concat(p);else{var g=function(e){if(D=e,"function"==typeof window.__gpp)return void 0!==(k=function(){var e=window.__gpp("ping");if("1.0"==e.gppVersion){var n=window.__gpp("getGPPData");k.gppString=null==n?void 0:n.gppString}else k.gppString=null==e?void 0:e.gppString;return k}()).gppString?(P("gpp response already loaded,parse response"),C(k)):(S=setTimeout(E,1e3),I=!1,window.__gpp("addEventListener",T),void 0!==k.gppString?(P("gpp response received,parse response"),C(k)):void 0);P("gpp not a function")}(e);v+="".concat(null!=g?g:"")}e.enableDebug&&(v+="&debug=1"),window.addEventListener&&window.addEventListener("message",(function(n){!function(e,n){try{if(null===e.origin||"null"===e.origin)return;var t=new URL(e.origin);if(!qe.some((function(e){return t.hostname.endsWith(e)})))return;if("string"!=typeof e.data)return;var r=JSON.parse(e.data);"UID2"===r.type||"EUID"===r.type?function(e,n){var t;null===oe?e.advertiserId&&"string"==typeof e.advertiserId&&e.advertiserId===n.advertiserId&&(window._uidSdkListenerLock=null!==(t=window._uidSdkListenerLock)&&void 0!==t?t:{},n.uidConfig=e,ce(e.advertiserId+":"+e.pixelId,n.uidConfig,(function(){return ae(n,n.uidConfig)}
1),(function(e){fe("UID enabled but failed to register hooks:",e)}),n)):fe("UID already configured by advertiser ".concat(oe.advertiserId,",pixel ").concat(oe.pixelId,".Only one UID configuration per page is currently allowed."))}(r,n):"DynamicParams"===r.type&&function(e,n){var t;if("DynamicParams"===(null==e?void 0:e.type)&&e.pixelId&&"string"==typeof e.pixelId&&Array.isArray(e.params)&&n.pixelIds&&n.pixelIds.includes(e.pixelId)){var r=e.params.map(Se);n.dynamicParamsConfig=null!==(t=n.dynamicParamsConfig)&&void 0!==t?t:{},n.dynamicParamsConfig[e.pixelId]=r}}(r,n)}catch(e){c("Error handling postMessage:",e)}}(n,e)}));var m=e.referrerUrl||O(e.enableDebug);v+="&ref=".concat(encodeURIComponent(m));var h="universal_pixel";e.pixelIds&&(h+="_"+e.pixelIds.join("_")),a("trigger GET conversion init call",e),L(v,h,"TTD Universal Pixel").onload=function(){return n()}}))}function Ne(e,n,t){var r,i,o,d,u,s,f,p,g,h,y,b=null!==(r=e.privacy_settings)&&void 0!==r?r:[],w=function(){var e;if(m.consentCheckExists)return{privacy_type:"GDPR",is_applicable:m.isGdprApplicable,consent_string:null!==(e=m.gdprConsentString)&&void 0!==e?e:""};_("tcfapi consent status check failed")}(),I=function(){if(""!=k.gppString&&null!=k.gppString)return{privacy_type:"GPP",is_applicable:!0,consent_string:k.gppString}}();if(t&&(w?(b=b.filter((function(e){return e.privacy_type!==w.privacy_type})),e.gdpr=w.is_applicable,e.gdpr_consent=w.consent_string):I&&(b=b.filter((function(e){return e.privacy_type!==I.privacy_type})),e.gpp_consent=I.consent_string)),null!==(i=e.adv)&&void 0!==i||(e.adv=e.advertiserId),e.advertiserId=void 0,null!==(o=e.merchant_id)&&void 0!==o||(e.merchant_id=e.merchantId),e.merchantId=void 0,void 0===n.merchantId||null===n.merchantId||e.merchant_id?void 0===n.advertiserId||null===n.advertiserId||e.adv||(e.adv=n.advertiserId):e.merchant_id=n.merchantId,void 0!==n.ga4MeasurementId){var x=function(e){var n=pe()._ga;if(!n||!n.startsWith("GA"))return ge(e,"_ga cookie not found or malformed"),null;var t=n.split(".");return 4===t.length?t[2]+"."+t[3]:(ge(e,"Unexpected _ga cookie format:"+n),null)}(n.enableDebug),S=function(e,n){var t=pe()["_ga_"+(n=n.startsWith("G-")?n.split("-")[1]:n)];if(!t||!t.startsWith("GS"))return ge(e,"_ga_"+n+" cookie not found or malformed"),null;var r=t.split("."),i=r[0].includes("2"),o=r[2];return i?o.split("$")[0].slice(1):o}(n.enableDebug,n.ga4MeasurementId);x&&S&&(e.ga_client_id=x,e.ga_session_id=S)}n.enableDebug&&(e.debug="1"),null!==(d=e.data_processing_option)&&void 0!==d||(e.data_processing_option=n.dataProcessingOption),e.pixel_ids=v(e.pixel_ids),e.pixelIds=v(e.pixelIds),null!==(u=e.pixel_id)&&void 0!==u||(e.pixel_id=null!==(s=e.tracker_id)&&void 0!==s?s:e.upixel_id),e.tracker_id=void 0,e.upixel_id=void 0,e.pixel_id&&(null!==(f=e.pixel_ids)&&void 0!==f||(e.pixel_ids=v(e.pixel_id))),e.pixel_id=void 0,null!==(p=e.pixel_ids)&&void 0!==p||(e.pixel_ids=null!==(g=e.pixelIds)&&void 0!==g?g:n.pixelIds),e.pixelIds=void 0,null!==(h=e.referrer_url)&&void 0!==h||(e.referrer_url=O(n.enableDebug)),(null===(y=n.uidConfig)||void 0===y?void 0:y.uid_token)&&function(e,n){if(!oe||e!==oe.advertiserId)return!1;var t=v(n);return!(t&&t.length>0)||t.includes(oe.pixelId)}(e.adv,e.pixel_ids)&&(ue(n.uidConfig)?e.uid2_token=n.uidConfig.uid_token:de(n.uidConfig)&&(e.euid_token=n.uidConfig.uid_token)),null!=localStorage.getItem("enable-ttd-pixel-dynamic-params")&&function(e,n){var t;if(n.dynamicParamsConfig){var r=null!==(t=e.pixel_ids)&&void 0!==t?t:n.pixelIds;if(r&&0!==r.length){for(var i=new Set,o=0,c=r;o<c.length;o++){var d=c[o],u=n.dynamicParamsConfig[d];if(u&&0!==u.length)for(var s=0,v=u;s<v.length;s++){var f=v[s];if(f.parameterValue&&""!==f.parameterValue){var p=De(f,d,n,i);if(void 0!==p&&""!==p&&"undefined"!==p&&"null"!==p){var g=f.evaluatedParameter,m=e[g];if(void 0!==m){var h=String(m);h===p?a("DynamicParams:".concat(f.evaluatedParameter," on pixel ").concat(d," client value matches resolved value('").concat(p,"')"),n):(l("DynamicParams:".concat(f.evaluatedParameter," on pixel ").concat(d," client value '").concat(h,"' does NOT match resolved value '").concat(p,"'"),n),i.add("".concat(f.evaluatedParameter,"m")))}else e[g]=p}}}}i.size>0&&(e.rt_dpme=Array.from(i).join(","))}}}(e,n);var D={data:[Pe(Pe({},e),{privacy_settings:b})]};(n.enableDebug||e.debug)&&(D.debug="1"),function(e,n,t){var r=this,i="".concat(e.rootUrl,"/track/realtimeconversion");return a("trigger POST realtime conversion event",e),new Promise((function(o,c){var l=new XMLHttpRequest;l.withCredentials=!0,l.open("POST",i),l.setRequestHeader("Content-type","application/json"),l.setRequestHeader("eventDataSource",e.eventDataSource||"JsSdk"),l.setRequestHeader("eventDataSourceVersion",e.eventDataSourceVersion||e.pixelVersion),l.onload=function(){l.
1status>=200&&l.status<300?o(l.response):c(l.response)},l.onerror=function(){return Le(r,void 0,void 0,(function(){var r;return Oe(this,(function(i){return r=function(e){var n,t=null!==(n=e.responseText)&&void 0!==n?n:JSON.parse(e.responseText);return(null==t?void 0:t.Message)?t.Message:0!==e.status||e.responseText?"Status Code ".concat(e.status):"Request never hit server.Possible CSP violation."}(l),c(l.statusText),function(e,n,t,r){var i,o,c,l;Le(this,void 0,void 0,(function(){var d,u,s,v;return Oe(this,(function(f){var p,g,m;return d="universal_pixel_realtime_fallback_"+(null!==(l=null!==(o=null===(i=t.pixel_ids)||void 0===i?void 0:i.join("_"))&&void 0!==o?o:null===(c=e.pixelIds)||void 0===c?void 0:c.join("_"))&&void 0!==l?l:""),a("trigger GET realtime conversion event fallback",e),p=n.data[0],g=Object.entries(p).filter((function(e){var n=e[0],t=e[1];return("string"==typeof t||"number"==typeof t||"boolean"==typeof t||"pixel_ids"===n)&&null!=t&&""!==t})),m=new URLSearchParams,g.forEach((function(e){var n=e[0],t=e[1];m.append(n,String(t))})),u=m,s=(e.eventDataSource||"JsSdk")+"Get",v=e.eventDataSourceVersion||e.pixelVersion,u.set("eds",s),u.set("edsv",v),u.set("rt_fallback","1"),""!==r&&u.set("rt_fbErr",r),L("".concat(e.rootUrl,"/track/rt?").concat(u.toString()),d,"TTD Universal Pixel Realtime Fallback"),[2]}))}))}(e,n,t,r),[2]}))}))},l.send(JSON.stringify(n))}))}(n,D,e).catch((function(e){return c(e,n)}))}window.ttdConversionEventsLayer=window.ttdConversionEventsLayer||[],window.ttdConversionEvents=null!==(Ce=window.ttdConversionEvents)&&void 0!==Ce?Ce:{activeDetection:null,startDetection:null,dumpConfigs:null},window.ttdConversionEvents.dumpConfigs=Ae,function(e,n,t){if(t||2===arguments.length)for(var r,i=0,o=n.length;i<o;i++)!r&&i in n||(r||(r=Array.prototype.slice.call(n,0,i)),r[i]=n[i]);return e.concat(r||Array.prototype.slice.call(n))}
1([],window.ttdConversionEventsLayer,!0).forEach(Re),window.ttdConversionEventsLayer.push=function(e){return Array.prototype.push.call(window.ttdConversionEventsLayer,e),Re(e),this.length},window.ttd_dom_ready=q,window.TTDUniversalPixelApi=function(e){this.init=function(n,t,r,i,o){Fe(null!=n?n:void 0,null!=t?t:void 0,null!=r?r:void 0,null!=i?i:void 0,null!=o?o:void 0,null!=e?e:void 0)}};var qe=[".adsrvr.org",".adsrvr.cn"];function Fe(e,n,t,r,i,o){return Le(this,void 0,void 0,(function(){var c,l,d,u,s;return Oe(this,(function(f){if(a("Legacy pixel route triggered with advertiserId:"+e+",pixelIds:"+n),n=v(n),!e||""==e||!n||n.length<=0)return a("no advertiser id or pixel id given"),[2];if(c="https:

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.