The document contains a complex JavaScript code that defines various functions and objects for handling global objects, iterators, and asynchronous operations. It includes features for message passing, session observation, and event handling, particularly in the context of web and app environments. Additionally, it incorporates error handling and utility functions for managing image requests and verification processes.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
11 views4 pages
F
The document contains a complex JavaScript code that defines various functions and objects for handling global objects, iterators, and asynchronous operations. It includes features for message passing, session observation, and event handling, particularly in the context of web and app environments. Additionally, it incorporates error handling and utility functions for managing image requests and verification processes.
Object.defineProperty:function(a,b,c){if(a==Array.prototype|| a==Object.prototype)return a;a[b]=c.value;return a}; function ca(a){a=["object"==typeof globalThis&&globalThis,a,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var b=0;b<a.length;++b){var c=a[b];if(c&&c.Math==Math)return c}throw Error("Cannot find global object");}var da=ca(this);function k(a,b){if(b)a:{var c=da;a=a.split(".");for(var d=0;d<a.length-1;d++){var e=a[d];if(!(e in c))break a;c=c[e]}a=a[a.length-1];d=c[a];b=b(d);b!=d&&b!=null&&ba(c,a,{configurable:! 0,writable:!0,value:b})}} var ea=typeof Object.create=="function"?Object.create:function(a){function b() {}b.prototype=a;return new b},m;if(typeof Object.setPrototypeOf=="function")m=Object.setPrototypeOf;else{var n;a:{var fa={a:! 0},p={};try{p.__proto__=fa;n=p.a;break a}catch(a){}n=!1}m=n?function(a,b) {a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}var q=m; function r(a,b) {a.prototype=ea(b.prototype);a.prototype.constructor=a;if(q)q(a,b);else for(var c in b)if(c!="prototype")if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else a[c]=b[c];a.C=b.prototype}function t(a){var b=typeof Symbol! ="undefined"&&Symbol.iterator&&a[Symbol.iterator];if(b)return b.call(a);if(typeof a.length=="number")return{next:aa(a)};throw Error(String(a)+" is not an iterable or ArrayLike");} function u(a){for(var b,c=[];!(b=a.next()).done;)c.push(b.value);return c}function v(){for(var a=Number(this),b=[],c=a;c<arguments.length;c++)b[c- a]=arguments[c];return b}k("Object.values",function(a){return a?a:function(b){var c=[],d;for(d in b)Object.prototype.hasOwnProperty.call(b,d)&&c.push(b[d]);return c}});k("Number.isNaN",function(a){return a?a:function(b){return typeof b==="number"&&isNaN(b)}});/*
Copyright The Closure Library Authors.
SPDX-License-Identifier: Apache-2.0 */ var w=this||self;var ha=Array.prototype.indexOf?function(a,b){return Array.prototype.indexOf.call(a,b,void 0)}:function(a,b){if(typeof a==="string")return typeof b!=="string"||b.length!=1?-1:a.indexOf(b,0);for(var c=0;c<a.length;c++)if(c in a&&a[c]===b)return c;return-1};function x(a){x[" "] (a);return a}x[" "]=function(){};function ia(a){var b=!1;b=b===void 0?!1:b;var c=c===void 0?w:c;for(var d=0;c&&d++<40;){var e;if(!(e=b))try{var f;if(f=!! c&&c.location.href!=null)b:{try{x(c.foo);f=!0;break b}catch(h){}f=!1}e=f}catch(h) {e=!1}if(e&&a(c))break;a:{try{var g=c.parent;if(g&&g!=c){c=g;break a}}catch(h) {}c=null}}}function ja(a,b){if(a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&b(a[c],c,a)}function ka(a){a=a===void 0?document:a;return a.createElement("img")};function y(a){var b=this;this.i=! 1;this.g=[];a(function(c){z(b,c)})}function z(a,b){if(!a.i)if(b instanceof y)b.then(function(c){z(a,c)});else{a.i=!0;a.j=b;for(b=0;b<a.g.length;+ +b)A(a,a.g[b]);a.g=[]}}function A(a,b){a.i? b(a.j):a.g.push(b)}y.prototype.then=function(a){var b=this;return new y(function(c) {A(b,function(d){c(a(d))})})};function la(){return new y(function(a){return a(void 0)})};function ma(a,b,c,d){d=d===void 0?!1:d;a.google_image_requests|| (a.google_image_requests=[]);var e=ka(a.document);if(c){var f=function(){if(c){var g=a.google_image_requests,h=ha(g,e);h>=0&&Array.prototype.splice.call(g,h,1)}typeof e.removeEventListener==="function"&&e.removeEventListener("load",f,!1);typeof e.removeEventListener==="function"&&e.removeEventListener("error",f,!1)};typeof e.addEventListener==="function"&&e.addEventListener("load",f,!1);typeof e.addEventListener==="function"&&e.addEventListener("error", f,!1)}d&&(e.attributionSrc="");e.src=b;a.google_image_requests.push(e)}function na(a){var b=b===void 0?!1:b;var c="https://pagead2.googlesyndication.com/pagead/gen_204? id=rhmss";ja(a,function(d,e){if(d|| d===0)c+="&"+e+"="+encodeURIComponent(String(d))});oa(c,b)} function oa(a,b){var c=window;b=b===void 0?!1:b;var d=d===void 0?!1:d;c.fetch? (b={keepalive:!0,credentials:"include",redirect:"follow",method:"get",mode:"no- cors"},d&&(b.mode="cors","setAttributionReporting"in XMLHttpRequest.prototype? b.attributionReporting={eventSourceEligible:"true",triggerEligible:"false"}:b.heade rs={"Attribution-Reporting-Eligible":"event-source"}),c.fetch(a,b)):ma(c,a,b===void 0?!1:b,d===void 0?!1:d)};var pa={A:"app",B:"web"};function B(a){if(!a)throw Error("functionToExecute must not be truthy.");};function C(){return/\d+\.\d+\.\d+ (-.*)?/.test("1.5.2-google_20241009")}function D(){for(var a=["1","5","2"],b=["1","0","3"],c=0;c<3;c++){var d=parseInt(a[c],10),e=parseInt(b[c],10);if(d>e)break;else if(d<e)return!1}return! 0};function E(a,b,c,d){this.i=a;this.method=b;this.version=c;this.g=d}function F(a) {return!!a&&a.omid_message_guid!==void 0&&a.omid_message_method!==void 0&&a.omid_message_version!==void 0&&typeof a.omid_message_guid==="string"&&typeof a.omid_message_method==="string"&&typeof a.omid_message_version==="string"&&(a.omid_message_args===void 0|| a.omid_message_args!==void 0)}function G(a){return new E(a.omid_message_guid,a.omid_message_method,a.omid_message_version,a.omid_message_a rgs)} function H(a){var b={};b=(b.omid_message_guid=a.i,b.omid_message_method=a.method,b.omid_message_versi on=a.version,b);a.g!==void 0&&(b.omid_message_args=a.g);return b};function I(a) {this.i=a};function J(a,b){try{return a.frames&&!!a.frames[b]}catch(c){return! 1}}function qa(a) {return["omid_v1_present","omid_v1_present_web","omid_v1_present_app"].some(functio n(b){return J(a,b)})}function K(a){for(var b=t(Object.values(pa)),c=b.next();! c.done;c=b.next()){c=c.value;var d={};d=(d.app="omid_v1_present_app",d.web="omid_v1_present_web",d) [c];if(J(a,d))return c}return null};function ra(a,b){return a&&(a[b]|| (a[b]={}))};function sa(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(a){var b=Math.random()*16|0;return a==="y"?(b&3|8).toString(16):b.toString(16)})};function ta(){var a=v.apply(0,arguments);ua(function(){throw new (Function.prototype.bind.apply(Error,[null,"Could not complete the test successfully - "].concat(a instanceof Array?a:u(t(a)))));},function(){return console.error.apply(console,a instanceof Array?a:u(t(a)))})}function ua(a,b){typeof jasmine!=="undefined"&&jasmine?a():typeof console! =="undefined"&&console&&console.error&&b()};var L=function(){if(typeof omidGlobal! =="undefined"&&omidGlobal)return omidGlobal;if(typeof global! =="undefined"&&global)return global;if(typeof window!=="undefined"&&window)return window;if(typeof globalThis!=="undefined"&&globalThis)return globalThis;var a=Function("return this")();if(a)return a;throw Error("Could not determine global object context.");}();function M(a) {this.i=a;this.handleExportedMessage=M.prototype.j.bind(this)}r(M,I);M.prototype.se ndMessage=function(a,b){b=b===void 0?this.i:b;if(!b)throw Error("Message destination must be defined at construction time or when sending the message.");b.handleExportedMessage(H(a),this)};M.prototype.j=function(a,b) {F(a)&&this.g&&this.g(G(a),b)};function N(a){return a!=null&&typeof a.top! =="undefined"&&a.top!=null}function va(a){if(a===L)return!1;try{if(typeof a.location.hostname==="undefined")return!0}catch(b){return!0}return!1}function O() {var a;typeof a==="undefined"&&typeof window! =="undefined"&&window&&(a=window);return N(a)?a:L};function P(a,b) {this.i=b=b===void 0?L:b;var c=this;a.addEventListener("message",function(d) {if(typeof d.data==="object"){var e=d.data;F(e)&&d.source&&c.g&&c.g(G(e),d.source)}})}r(P,I);P.prototype.sendMessage= function(a,b){b=b===void 0?this.i:b;if(!b)throw Error("Message destination must be defined at construction time or when sending the message.");b.postMessage(H(a),"*")};var wa=["omid","v1_VerificationServiceCommunication"],xa=["omidVerificationProperties", "serviceWindow"];function Q(a,b){return b.reduce(function(c,d){return c&&c[d]},a)};function R(a){if(!a){a=O();var b=b===void 0?qa:b;var c=[],d=Q(a,xa);d&&c.push(d);c.push(N(a)?a.top:L);a:{c=t(c);for(var e=c.next();! e.done;e=c.next()){b:{d=a;e=e.value;var f=b;if(!va(e))try{var g=Q(e,wa);if(g){var h=new M(g);break b}}catch(l){}h=f(e)?new P(d,e):null}if(d=h){a=d;break a}}a=null}}if(this.g=a)this.g.g=this.m.bind(this);else if(b=(b=L.omid3p)&&typeof b.registerSessionObserver==="function"&&typeof b.addEventListener==="function"? b:null)this.omid3p=b;this.j={};this.i=(b=L.omidVerificationProperties)? b.injectionId:void 0}R.prototype.registerSessionObserver=function(a,b) {B(a);this.omid3p? this.omid3p.registerSessionObserver(a,b,this.i):this.l("addSessionListener",a,b,thi s.i)}; R.prototype.addEventListener=function(a,b){if(!a)throw Error("Value for eventType is undefined, null or blank.");if(typeof a!=="string"&&!(a instanceof String))throw Error("Value for eventType is not a string.");if(a.trim()==="")throw Error("Value for eventType is empty string.");B(b);this.omid3p? this.omid3p.addEventListener(a,b,this.i):this.l("addEventListener",b,a,this.i)}; R.prototype.m=function(a){var b=a.method,c=a.i;a=a.g;if(b==="response"&&this.j[c]) {var d=C()&&D()?a?a:[]:a&&typeof a==="string"?JSON.parse(a): [];this.j[c].apply(this,d)}b==="error"&&window.console&&ta(a)};R.prototype.l=functi on(a,b){var c=v.apply(2,arguments);if(this.g){var d=sa();b&&(this.j[d]=b);var e="VerificationService."+a;c=C()&&D()?c:JSON.stringify(c);this.g.sendMessage(new E(d,e,"1.5.2-google_20241009",c))}};var S=void 0; if(S=S===void 0?typeof omidExports==="undefined"?null:omidExports:S){var T=["OmidVerificationClient"];T.slice(0,T.length-1).reduce(ra,S)[T[T.length- 1]]=R};function ya(){var a=null;ia(function(b){return(b=b.mraid)&&b.IS_GMA_SDK? (a=b,!0):!1});return a}function za(){return new y(function(a) {w.document.readyState&&w.document.readyState==="complete"? a():w.addEventListener("load",a)})}function Aa(){return new y(function(a){var b=ya();b&&(b.getState()==="loading"?b.addEventListener("ready",function() {a(b)}):a(b))})} function Ba(a){a=a===void 0?{}:a;var b=this.m=(b=a.client)!=null?b:new R;var c=O();var d=(d=L.omidVerificationProperties)&&d.injectionSource? d.injectionSource:void 0;this.o=(d||K(c)||K(N(c)?c.top:L))!=="web"||b.i?!(!b.g&&! b.omid3p):!1;this.i=null;this.l=this.o?4:1;this.u=this.o;this.g={};var e;this.j=(e=a.timeout)!=null?e:null;this.v=!1} function Ca(){return new y(function(a){za().then(function(){Aa().then(function(b) {function c(d,e) {e.width>0&&e.height>0&&(a(),b.removeEventListener("exposureChange",c))}b.addEventL istener("exposureChange",c)})})})} function Da(a){a.u?(a.i=new y(function(b){var c=new y(function(e){var f=!1,g,h=(new Date).getTime();a.m.registerSessionObserver(function(l) {l.type==="sessionStart"&&(g&&w.clearTimeout(g),f?(f=!1,l=(new Date).getTime()- h,a.v||(a.v=!0,na({te:l,to:a.j}))): (l=l.data,e(l.context.environment=="app"),l.context.omidNativeInfo&&(a.g.sdk=l.cont ext.omidNativeInfo.partnerName)))});a.j!=null&&(g=w.setTimeout(function(){f=!0;e(! 1)},a.j))}),d=new y(function(e){a.m.addEventListener("geometryChange",function(f) {f= f.data;var g=f.adView.reasons;if(g=!g||g.indexOf("hidden")==- 1)f=f.adView,f=f.onScreenContainerGeometry||f.onScreenGeometry,g=!! (f&&f.width&&f.height);g&&(a.l=3,e())})});c.then(function(e){e?(d.then(function() {a.g.src=1;b(a.g)}),Ca().then(function(){a.g.src=2;a.l=3;b(a.g)})): (a.l=1,b())})}),a.i.then(function(){a.u=!1})):a.i=la()};var U,V=document.currentScript;U=(V=V===void 0?null:V)&&V.getAttribute("data- jc")==="86"?V:document.querySelector('[data-jc="86"]');var W;if(U){for(var X={},Y=U.attributes,Z=Y.length-1;Z>=0;Z--){var Ea=Y[Z].name;Ea.indexOf("data- jcp-")===0&&(X[Ea.substring(9)]=Y[Z].value)}W=X}else W={};window.omrhp=function(a) {var b=+(a==null?NaN:a.owwt);Number.isNaN(b)&&(b=null);return function(c){var d=new Ba({timeout:b===void 0?null:b});d.i||Da(d);d.i.then(c)}}(W);}).call(this);