;(function(omidGlobal) {
  'use strict';var n;function aa(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}}function p(a){var b='undefined'!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:aa(a)}}function q(a){if(!(a instanceof Array)){a=p(a);for(var b,c=[];!(b=a.next()).done;)c.push(b.value);a=c}return a}var ba='function'==typeof Object.create?Object.create:function(a){function b(){}b.prototype=a;return new b},ca;
if('function'==typeof Object.setPrototypeOf)ca=Object.setPrototypeOf;else{var da;a:{var ea={I:!0},fa={};try{fa.__proto__=ea;da=fa.I;break a}catch(a){}da=!1}ca=da?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+' is not extensible');return a}:null}var ha=ca;
function r(a,b){a.prototype=ba(b.prototype);a.prototype.constructor=a;if(ha)ha(a,b);else for(var c in b)if('prototype'!=c)if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else a[c]=b[c];a.sa=b.prototype}var t='undefined'!=typeof window&&window===this?this:'undefined'!=typeof global&&null!=global?global:this;function u(a,b){return Object.prototype.hasOwnProperty.call(a,b)}
var ia='function'==typeof Object.assign?Object.assign:function(a,b){for(var c=1;c<arguments.length;c++){var d=arguments[c];if(d)for(var e in d)u(d,e)&&(a[e]=d[e])}return a},v='function'==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)};
function x(a,b){if(b){var c=t;a=a.split('.');for(var d=0;d<a.length-1;d++){var e=a[d];e in c||(c[e]={});c=c[e]}a=a[a.length-1];d=c[a];b=b(d);b!=d&&null!=b&&v(c,a,{configurable:!0,writable:!0,value:b})}}x('Object.assign',function(a){return a||ia});x('Object.values',function(a){return a?a:function(b){var c=[],d;for(d in b)u(b,d)&&c.push(b[d]);return c}});function ka(){ka=function(){};t.Symbol||(t.Symbol=la)}function ma(a,b){this.a=a;v(this,'description',{configurable:!0,writable:!0,value:b})}
ma.prototype.toString=function(){return this.a};var la=function(){function a(c){if(this instanceof a)throw new TypeError('Symbol is not a constructor');return new ma('jscomp_symbol_'+(c||'')+'_'+b++,c)}var b=0;return a}();function y(){ka();var a=t.Symbol.iterator;a||(a=t.Symbol.iterator=t.Symbol('Symbol.iterator'));'function'!=typeof Array.prototype[a]&&v(Array.prototype,a,{configurable:!0,writable:!0,value:function(){return na(aa(this))}});y=function(){}}
function na(a){y();a={next:a};a[t.Symbol.iterator]=function(){return this};return a}
x('WeakMap',function(a){function b(f){this.a=(l+=Math.random()+1).toString();if(f){f=p(f);for(var h;!(h=f.next()).done;)h=h.value,this.set(h[0],h[1])}}function c(){}function d(f){if(!u(f,g)){var h=new c;v(f,g,{value:h})}}function e(f){var h=Object[f];h&&(Object[f]=function(k){if(k instanceof c)return k;d(k);return h(k)})}if(function(){if(!a||!Object.seal)return!1;try{var f=Object.seal({}),h=Object.seal({}),k=new a([[f,2],[h,3]]);if(2!=k.get(f)||3!=k.get(h))return!1;k.delete(f);k.set(h,4);return!k.has(f)&&
4==k.get(h)}catch(m){return!1}}())return a;var g='$jscomp_hidden_'+Math.random();e('freeze');e('preventExtensions');e('seal');var l=0;b.prototype.set=function(f,h){d(f);if(!u(f,g))throw Error('WeakMap key fail: '+f);f[g][this.a]=h;return this};b.prototype.get=function(f){return u(f,g)?f[g][this.a]:void 0};b.prototype.has=function(f){return u(f,g)&&u(f[g],this.a)};b.prototype.delete=function(f){return u(f,g)&&u(f[g],this.a)?delete f[g][this.a]:!1};return b});
x('Map',function(a){function b(){var f={};return f.u=f.next=f.head=f}function c(f,h){var k=f.a;return na(function(){if(k){for(;k.head!=f.a;)k=k.u;for(;k.next!=k.head;)return k=k.next,{done:!1,value:h(k)};k=null}return{done:!0,value:void 0}})}function d(f,h){var k=h&&typeof h;'object'==k||'function'==k?g.has(h)?k=g.get(h):(k=''+ ++l,g.set(h,k)):k='p_'+h;var m=f.b[k];if(m&&u(f.b,k))for(f=0;f<m.length;f++){var w=m[f];if(h!==h&&w.key!==w.key||h===w.key)return{id:k,list:m,index:f,l:w}}return{id:k,list:m,
index:-1,l:void 0}}function e(f){this.b={};this.a=b();this.size=0;if(f){f=p(f);for(var h;!(h=f.next()).done;)h=h.value,this.set(h[0],h[1])}}if(function(){if(!a||'function'!=typeof a||!a.prototype.entries||'function'!=typeof Object.seal)return!1;try{var f=Object.seal({x:4}),h=new a(p([[f,'s']]));if('s'!=h.get(f)||1!=h.size||h.get({x:4})||h.set({x:4},'t')!=h||2!=h.size)return!1;var k=h.entries(),m=k.next();if(m.done||m.value[0]!=f||'s'!=m.value[1])return!1;m=k.next();return m.done||4!=m.value[0].x||
't'!=m.value[1]||!k.next().done?!1:!0}catch(w){return!1}}())return a;y();var g=new WeakMap;e.prototype.set=function(f,h){f=0===f?0:f;var k=d(this,f);k.list||(k.list=this.b[k.id]=[]);k.l?k.l.value=h:(k.l={next:this.a,u:this.a.u,head:this.a,key:f,value:h},k.list.push(k.l),this.a.u.next=k.l,this.a.u=k.l,this.size++);return this};e.prototype.delete=function(f){f=d(this,f);return f.l&&f.list?(f.list.splice(f.index,1),f.list.length||delete this.b[f.id],f.l.u.next=f.l.next,f.l.next.u=f.l.u,f.l.head=null,
this.size--,!0):!1};e.prototype.clear=function(){this.b={};this.a=this.a.u=b();this.size=0};e.prototype.has=function(f){return!!d(this,f).l};e.prototype.get=function(f){return(f=d(this,f).l)&&f.value};e.prototype.entries=function(){return c(this,function(f){return[f.key,f.value]})};e.prototype.keys=function(){return c(this,function(f){return f.key})};e.prototype.values=function(){return c(this,function(f){return f.value})};e.prototype.forEach=function(f,h){for(var k=this.entries(),m;!(m=k.next()).done;)m=
m.value,f.call(h,m[1],m[0],this)};e.prototype[Symbol.iterator]=e.prototype.entries;var l=0;return e});
x('Set',function(a){function b(c){this.a=new Map;if(c){c=p(c);for(var d;!(d=c.next()).done;)this.add(d.value)}this.size=this.a.size}if(function(){if(!a||'function'!=typeof a||!a.prototype.entries||'function'!=typeof Object.seal)return!1;try{var c=Object.seal({x:4}),d=new a(p([c]));if(!d.has(c)||1!=d.size||d.add(c)!=d||1!=d.size||d.add({x:4})!=d||2!=d.size)return!1;var e=d.entries(),g=e.next();if(g.done||g.value[0]!=c||g.value[1]!=c)return!1;g=e.next();return g.done||g.value[0]==c||4!=g.value[0].x||
g.value[1]!=g.value[0]?!1:e.next().done}catch(l){return!1}}())return a;y();b.prototype.add=function(c){c=0===c?0:c;this.a.set(c,c);this.size=this.a.size;return this};b.prototype.delete=function(c){c=this.a.delete(c);this.size=this.a.size;return c};b.prototype.clear=function(){this.a.clear();this.size=0};b.prototype.has=function(c){return this.a.has(c)};b.prototype.entries=function(){return this.a.entries()};b.prototype.values=function(){return this.a.values()};b.prototype.keys=b.prototype.values;
b.prototype[Symbol.iterator]=b.prototype.values;b.prototype.forEach=function(c,d){var e=this;this.a.forEach(function(g){return c.call(d,g,g,e)})};return b});x('Object.is',function(a){return a?a:function(b,c){return b===c?0!==b||1/b===1/c:b!==b&&c!==c}});x('Array.prototype.includes',function(a){return a?a:function(b,c){var d=this;d instanceof String&&(d=String(d));var e=d.length;c=c||0;for(0>c&&(c=Math.max(c+e,0));c<e;c++){var g=d[c];if(g===b||Object.is(g,b))return!0}return!1}});
var z={ha:'loaded',na:'start',aa:'firstQuartile',ia:'midpoint',oa:'thirdQuartile',$:'complete',ja:'pause',la:'resume',Z:'bufferStart',Y:'bufferFinish',ma:'skipped',qa:'volumeChange',ka:'playerStateChange',V:'adUserInteraction'},oa={da:'generic',pa:'video'},qa={H:'native',ea:'html'},ra={H:'native',fa:'javascript',NONE:'none'},sa={ca:'full',ga:'limited'},ta={X:'backgrounded',ba:'foregrounded'},ua={W:'app',ra:'web'};function A(a,b){this.x=null!=a.x?a.x:a.left;this.y=null!=a.y?a.y:a.top;this.width=a.width;this.height=a.height;this.endX=this.x+this.width;this.endY=this.y+this.height;this.adSessionId=a.adSessionId||void 0;this.isFriendlyObstructionFor=a.isFriendlyObstructionFor||[];this.clipsToBounds=void 0!==a.clipsToBounds?!0===a.clipsToBounds:!0;this.notVisibleReason=a.notVisibleReason||void 0;this.childViews=a.childViews||[];this.isCreative=a.isCreative||!1;this.a=b}
function va(a){var b={};return b.width=a.width,b.height=a.height,b}function D(a){var b={};return Object.assign({},va(a),(b.x=a.x,b.y=a.y,b))}function E(a){var b=D(a),c={};return Object.assign({},b,(c.endX=a.endX,c.endY=a.endY,c))}function wa(a,b,c){a.x+=b;a.y+=c;a.endX+=b;a.endY+=c}A.prototype.C=function(a){if(null==a)return!1;a=D(a);var b=a.y,c=a.width,d=a.height;return this.x===a.x&&this.y===b&&this.width===c&&this.height===d};function xa(a){return a.width*a.height};function ya(a,b){a=D(a);for(var c=[],d=[],e=0;e<b.length;e++){var g=D(b[e]),l=Math.max(a.y,g.y),f=Math.min(a.x+a.width,g.x+g.width),h=Math.min(a.y+a.height,g.y+g.height);F(c,Math.max(a.x,g.x));F(c,f);F(d,l);F(d,h)}c=c.sort(function(k,m){return k-m});d=d.sort(function(k,m){return k-m});return{T:c,U:d}}function F(a,b){-1===a.indexOf(b)&&a.push(b)};function za(){this.a=this.b=this.m=this.j=this.c=this.i=void 0;this.o=0;this.f=[];this.g=[];this.h=[]}za.prototype.C=function(a){return null==a?!1:JSON.stringify(G(this))===JSON.stringify(G(a))};
function G(a){var b=[],c={viewport:a.i,adView:{percentageInView:a.o,reasons:a.h}};if(void 0!==a.b){c.adView.geometry=D(a.b);c.adView.onScreenGeometry=D(a.a);for(var d=0;d<a.g.length;d++)b.push(D(a.g[d]));c.adView.onScreenGeometry.obstructions=b;void 0!==a.j&&void 0!==a.m&&(c.adView.containerGeometry=D(a.j),c.adView.onScreenContainerGeometry=D(a.m),c.adView.measuringElement=!0)}return c}
function Aa(a,b){b=va(b);a.i={};a.i.width=b.width;a.i.height=b.height;a.c={};a.c.x=0;a.c.y=0;a.c.width=b.width;a.c.height=b.height;a.c.endX=b.width;a.c.endY=b.height}function Ba(){return{x:0,y:0,endX:0,endY:0,width:0,height:0}}function Ca(a,b){var c={};c.x=Math.max(a.x,b.x);c.y=Math.max(a.y,b.y);c.endX=Math.min(a.endX,b.endX);c.endY=Math.min(a.endY,b.endY);c.width=Math.max(0,c.endX-c.x);c.height=Math.max(0,c.endY-c.y);return c}function Da(a,b){return a.width<b.width||a.height<b.height}
function Ea(a){var b=xa(a.b);if(0!==b){var c=xa(a.a);var d=a.g,e=0;if(0<d.length){var g=ya(a.a,d),l=g.T;g=g.U;for(var f=0;f<l.length-1;f++)for(var h=(l[f]+(l[f]+1))/2,k=l[f+1]-l[f],m=0;m<g.length-1;m++){for(var w=(g[m]+(g[m]+1))/2,pa=g[m+1]-g[m],Z=!1,P=0;P<d.length;P++){var C=D(d[P]);if(C.x<h&&C.x+C.width>h&&C.y<w&&C.y+C.height>w){Z=!0;break}}Z&&(e+=Math.round(k)*Math.round(pa))}}b=Math.round((c-e)/b*100);a.o=Math.max(b,0)}}
function H(a,b){for(var c=!1,d=0;d<a.h.length;d++)a.h[d]===b&&(c=!0);c||a.h.push(b)};function Fa(){}function Ga(a,b,c,d){var e=new za;b=new A(b,!1);Aa(e,b);Ha(a,b,e,d);if('backgrounded'===c)H(e,'backgrounded');else if(void 0!==e.b){for(a=0;a<e.f.length;a++){c=e.f[a];if(0!==c.width&&0!==c.height&&e.a){d=E(e.a);b=d.y;var g=d.endX,l=d.endY;c=!(c.endX<=d.x||c.x>=g||c.endY<=b||c.y>=l)}else c=!1;if(c){a:{c=e.f[a];for(d=0;d<e.g.length;d++)if(e.g[d].C(c)){c=!0;break a}c=!1}c=!c}c&&(H(e,'obstructed'),e.g.push(e.f[a]))}Ea(e)}else H(e,'notFound');return e}
function Ha(a,b,c,d){var e=b.isCreative?!0:b.adSessionId===d;if(e){c.b=b;var g=E(c.b);a=Ca(c.c,g);var l=c.b;'notAttached'===l.notVisibleReason||'noWindowFocus'===l.notVisibleReason||'noAdView'===l.notVisibleReason?(H(c,'notFound'),c.a=new A(Ba(),!1)):(l=c.b,'viewInvisible'===l.notVisibleReason||'viewGone'===l.notVisibleReason||'viewNotVisible'===l.notVisibleReason||'viewAlphaZero'===l.notVisibleReason||'viewHidden'===l.notVisibleReason||void 0!==c.b.notVisibleReason?(H(c,'hidden'),c.a=new A(Ba(),
!1)):(Da(a,g)&&H(c,'clipped'),c.a=new A(a,!1)))}else if(g=!0,b.a&&(g=-1!==b.isFriendlyObstructionFor.indexOf(d)?!1:!1===b.clipsToBounds),g){l=b.childViews;for(var f=0;f<l.length;f++)g=void 0!==c.b,Ha(a,new A(l[f],g),c,d)}e||void 0===c.b||(b.a?-1!==b.isFriendlyObstructionFor.indexOf(d)||c.f.push(b):(e=E(b),d=E(c.a),D(c.a),a=c.a,0!==a.width&&0!==a.height&&b.clipsToBounds&&(b=Ca(d,e),Da(b,d)&&(H(c,'clipped'),c.a=new A(b,!1)))))};function Ia(a,b){this.y=this.x=0;this.width=a;this.height=b};function Ja(){return{apiVersion:'1.0',accessMode:'limited',environment:'app',omidJsInfo:{omidImplementer:'omsdk',serviceVersion:'1.2.20-iab1793'}}}function Ka(){this.adSessionId=null;this.b=Ja();this.j='foregrounded';this.h=this.a='none';this.c=this.f=this.g=this.A=this.B=this.m=null;this.o=!0}var I;function J(){I||(I=new Ka);return I};function La(a,b){this.a=a;this.b=b}t.Object.defineProperties(La.prototype,{event:{configurable:!0,enumerable:!0,get:function(){return this.a}},origin:{configurable:!0,enumerable:!0,get:function(){return this.b}}});function K(a){for(var b=[],c=0;c<arguments.length;++c)b[c]=arguments[c];Ma(function(){throw new (Function.prototype.bind.apply(Error,[null,'Could not complete the test successfully - '].concat(q(b))));},function(){return console.error.apply(console,q(b))})}function Na(a){for(var b=[],c=0;c<arguments.length;++c)b[c]=arguments[c];Ma(function(){},function(){return console.error.apply(console,q(b))})}
function Ma(a,b){'undefined'!==typeof jasmine&&jasmine?a():'undefined'!==typeof console&&console&&console.error&&b()};function Oa(){this.b=[];this.c=[];this.f=[];this.h=[];this.g={};this.a=J()}function Pa(a){a.b=[];a.c=[];a.f=[];a.h=[];a.g={};I.adSessionId=null;I.b=Ja();I.s=void 0;I.w=void 0;I.D=null;I.F=null;I.i=null;I.j='foregrounded';I.a='none';I.h='none';I.m=null;I.B=null;I.A=null;I.g=null;I.f=null;I.c=null;I.o=!0}function Qa(a,b){void 0!==a.a&&a.a.adSessionId&&!1!==Ra(b)&&a.f.filter(function(c){return c.type===b.event.type}).forEach(function(c){return a.i(c.v,b.event)})}
function Sa(a,b,c){void 0!==a.a&&a.a.adSessionId&&a.b.filter(function(d){return d.event.type===b&&Ra(d)}).map(function(d){return d.event}).forEach(c)}function Ra(a){var b=a.event.type,c=-1!==Object.values(z).indexOf(b)&&'volumeChange'!==b;return'impression'===b?a.origin===J().h:c?a.origin===J().a:!0}function Ta(a,b,c){'video'===b?Ua(a,c):(a.f.push({type:b,v:c}),Sa(a,b,c))}function Ua(a,b){Object.keys(z).forEach(function(c){c=z[c];a.f.push({type:c,v:b});Sa(a,c,b)})}
function Va(a,b,c){a.h.push({S:c,v:b});a.c.forEach(function(d){var e=Wa(d);'sessionStart'===d.event.type&&(e.data.verificationParameters=c&&a.g[c]);a.i(b,e)})}function Xa(a,b,c){var d=L(a,'sessionError','native',{errorType:b,message:c});a.c.push(d);a.h.forEach(function(e){a.i(e.v,d.event)})}
function Ya(a,b){a.g=Object.assign(a.g,b);b=a.a.b;if(void 0!==b){var c=L(a,'sessionStart','native',{context:b});a.c.push(c);a.h.forEach(function(d){var e=d.v,g=Wa(c);d=d.S;g.data.verificationParameters=d&&a.g[d];a.i(e,g)},a);Za(a)}}function $a(a){var b=a.h,c=L(a,'sessionFinish','native');a.c.push(c);Pa(a);b.forEach(function(d){return a.i(d.v,c.event)})}Oa.prototype.i=function(a,b){for(var c=[],d=1;d<arguments.length;++d)c[d-1]=arguments[d];try{a.apply(null,q(c))}catch(e){Na(e)}};
function ab(a,b){var c=a.a.A;var d=(d=J().i)?G(d).viewport:void 0;var e=(e=J().i)?G(e).adView:void 0;b=L(a,'impression',b,{mediaType:c,viewport:d,adView:e});a.b.push(b);Qa(a,b)}function bb(a,b,c,d){'start'!==b&&'volumeChange'!==b||null!=(d&&d.deviceVolume)||(d.deviceVolume=a.a.m);'start'!==b&&'volumeChange'!==b||null==(d&&d.videoPlayerVolume)||(a.a.B=d.videoPlayerVolume);b=L(a,b,c,d);a.b.push(b);Qa(a,b)}
function Za(a){var b=a.a.a,c=a.b.filter(function(f){return Object.values(z).includes(f.event.type)&&f.origin===b}).map(function(f){return f.event}),d=a.a.adSessionId||'';c=p(c);for(var e=c.next();!e.done;e=c.next()){e=e.value;e.adSessionId||(e.adSessionId=d);for(var g=p(a.f),l=g.next();!l.done;l=g.next())l=l.value,l.type===e.type&&l.v(e)}}
function cb(a,b,c){a:{c=new Set(c);a=p(a.b.concat(a.c));for(var d=a.next();!d.done;d=a.next())if(d=d.value,c.has(d.event.type)&&d.origin!=b){b=!0;break a}b=!1}return b?(K('Event owner cannot be registered after its events have already been published.'),!1):!0}function db(a,b){cb(a,b,Object.values(z))&&eb(a,b)&&(a.a.a=b,fb(a))}function gb(a,b){cb(a,b,['impression'])&&hb(a,b)&&(a.a.h=b,fb(a))}
function hb(a,b){var c=a.a.h;return'none'!=c&&c!=b?(K('Impression event is owned by '+(a.a.h+', not ')+(b+'.')),!1):!0}function eb(a,b){var c=a.a.a;return'none'!=c&&c!=b?(K('Video events are owned by '+(a.a.a+', not '+b+'.')),!1):!0}function fb(a){a.a.A=null!=a.a.a&&'none'!=a.a.a?'video':'display'}function L(a,b,c,d){return new La({adSessionId:a.a.adSessionId||'',timestamp:(new Date).getTime(),type:b,data:d},c)}
function Wa(a){a=a.event;return{adSessionId:a.adSessionId,timestamp:a.timestamp,type:a.type,data:a.data}};function ib(a,b,c){'container'===b&&void 0!==a.a.s&&void 0!==a.a&&null!=a.a.adSessionId&&(a.a.D=Ga(a.b,a.a.s,a.a.j,a.a.adSessionId));'creative'===b&&a.a.w&&(a.a.F=Ga(a.b,a.a.w,a.a.j,a.a.adSessionId));b=a.a;var d=b.D,e=b.F;if(d)if(e){b=new za;var g=d.i,l=d.b,f=d.a,h=e.b;e=e.a;g&&l&&f&&h&&e&&(Aa(b,g),b.j=new A(l,!1),b.m=new A(f,!1),b.f=Object.assign([],d.f),b.g=Object.assign([],d.g),b.h=Object.assign([],d.h),d=b.j.x,g=b.j.y,h=new A(h,!1),e=new A(e,!1),wa(h,d,g),wa(e,d,g),b.b=h,b.a=Ca(e,f),-1===b.h.indexOf('backgrounded')&&
Ea(b))}else b=d;else b=null;f=a.a.i;if(b&&!b.C(f)||c)f=G(b),c&&(f.adView.reasons=f.adView.reasons||[c]),c=a.c,f=L(c,'geometryChange','native',{viewport:f.viewport,adView:f.adView}),c.b.push(f),Qa(c,f),a.a.i=b};function M(a,b,c){this.g=a;this.D=b;this.A=c;this.c=J();this.b=null;this.a=this.h=void 0;this.B=!0;this.w=void 0;N(this)}function N(a){if(!a.b){var b;a:{if((b=a.g.document)&&b.getElementsByClassName&&(b=b.getElementsByClassName('omid-element'))){if(1==b.length){b=b[0];break a}1<b.length&&a.B&&(Xa(a.A,'generic',"More than one element with 'omid-element' class name."),a.B=!1)}b=null}b&&(b.tagName&&'video'===b.tagName.toLowerCase()?a.c.f=b:a.c.g=b,jb(a))}}
function jb(a){a.c.f?(a.b=a.c.f,a.i()):a.c.g&&(a.b=a.c.g,'iframe'===a.b.tagName.toLowerCase()?a.c.c&&a.i():a.i())}function kb(a){a.a&&a.h&&(a.b.tagName&&'iframe'===a.b.tagName.toLowerCase()?a.c.c&&(a.a.isCreative=!1,lb(a),mb(a)):(a.c.c?(a.a.isCreative=!1,lb(a)):a.a.isCreative=!0,mb(a)))}M.prototype.o=function(){this.w&&(this.g.document.removeEventListener('visibilitychange',this.w),this.w=void 0)};M.prototype.i=function(){};function mb(a){a.c.w=a.h;ib(a.D,'creative')}
function lb(a){if(a.c.c){var b=new A(a.c.c,!1);wa(b,a.a.x,a.a.y);b.clipsToBounds=!0;b.isCreative=!0;for(var c=0;c<a.a.childViews.length;c++)if(a.a.childViews[c].isCreative){a.a.childViews[c]=b;return}a.a.childViews.push(b)}};function nb(a,b,c){return ob(a,'setInterval')(b,c)}function pb(a,b){ob(a,'clearInterval')(b)}function qb(a,b){ob(a,'clearTimeout')(b)}function ob(a,b){return a.a&&a.a[b]?a.a[b]:rb(a,b)}
function sb(a,b,c,d){if(a.a.document&&a.a.document.body){var e=a.a.document.createElement('img');e.width=1;e.height=1;e.style.display='none';e.src=b;c&&e.addEventListener('load',function(){return c()});d&&e.addEventListener('error',function(){return d()});a.a.document.body.appendChild(e)}else rb(a,'sendUrl')(b,c,d)}function rb(a,b){if(a.a&&a.a.omidNative&&a.a.omidNative[b])return a.a.omidNative[b].bind(a.a.omidNative);throw Error('Native interface method "'+b+'" not found.');};function tb(a,b,c,d){M.call(this,a,b,d);this.f=void 0;this.j=c}r(tb,M);tb.prototype.o=function(){void 0!==this.f&&(pb(this.j,this.f),this.f=void 0);M.prototype.o.call(this)};tb.prototype.i=function(){var a=this;M.prototype.i.call(this);null==this.b?this.f=void 0:void 0===this.f&&(this.f=nb(this.j,function(){return ub(a)},200),ub(this))};
function ub(a){if(void 0!==a.f){b:{try{var b=a.g.top;var c=0<=b.innerHeight&&0<=b.innerWidth;break b}catch(d){}c=!1}c?(c=a.g.top,c=new A(new Ia(c.innerWidth,c.innerHeight),!1)):c=new A(new Ia(0,0),!1);b=a.b.getBoundingClientRect();if(null==b.x||isNaN(b.x))b.x=b.left;if(null==b.y||isNaN(b.y))b.y=b.top;b=new A(b,!1);c.C(a.h)&&b.C(a.a)||(a.a=b,a.a.clipsToBounds=!0,a.h=c,a.h.childViews.push(a.a),kb(a))}};function vb(a,b,c){M.call(this,a,b,c);this.s=this.j=this.m=this.f=void 0}r(vb,M);vb.prototype.o=function(){this.f&&this.f.disconnect();wb(this);M.prototype.o.call(this)};vb.prototype.i=function(){M.prototype.i.call(this);this.b&&(this.f||(this.f=xb(this)),yb(this),zb(this.b)&&Ab(this))};function wb(a){a.m&&(a.m.disconnect(),a.m=void 0);a.j&&(a.j.disconnect(),a.j=void 0);a.s&&((0,a.g.removeEventListener)('resize',a.s),a.s=void 0)}function yb(a){a.f&&a.b&&(a.f.unobserve(a.b),a.f.observe(a.b))}
function zb(a){a=a.getBoundingClientRect();return 0==a.width||0==a.height}
function xb(a){return new a.g.IntersectionObserver(function(b){try{if(b.length){for(var c,d=b[0],e=1;e<b.length;e++)b[e].time>d.time&&(d=b[e]);c=d;a.h=new A(c.rootBounds,!1);a.a=new A(c.boundingClientRect,!1);a.a.clipsToBounds=!0;a.h.childViews.push(a.a);kb(a)}}catch(g){a.o(),Xa(a.A,'generic','Problem handling IntersectionObserver callback: '+g.message)}},{root:null,rootMargin:'0px',threshold:[0,.1,.2,.3,.4,.5,.6,.7,.8,.9,1]})}
function Ab(a){a.g.ResizeObserver?a.m||(a.m=Bb(a,function(){return Cb(a)}),a.m.observe(a.b)):(a.s||(a.s=function(){return Cb(a)},(0,a.g.addEventListener)('resize',a.s)),a.j||(a.j=new MutationObserver(function(){return Cb(a)}),a.j.observe(a.b,{childList:!1,attributes:!0,subtree:!1})))}function Cb(a){a.b&&!zb(a.b)&&(yb(a),wb(a))}function Bb(a,b){return new a.g.ResizeObserver(b)};function O(a){return'object'===typeof a}function Db(a){return'number'===typeof a&&!isNaN(a)&&0<=a}function Q(a){return'string'===typeof a}function R(a,b){return Q(a)&&-1!==Object.values(b).indexOf(a)};function S(a,b,c,d){this.b=a;this.method=b;this.version=c;this.a=d}function Eb(a){return!!a&&void 0!==a.omid_message_guid&&void 0!==a.omid_message_method&&void 0!==a.omid_message_version&&'string'===typeof a.omid_message_guid&&'string'===typeof a.omid_message_method&&'string'===typeof a.omid_message_version&&(void 0===a.omid_message_args||void 0!==a.omid_message_args)}function Fb(a){return new S(a.omid_message_guid,a.omid_message_method,a.omid_message_version,a.omid_message_args)}
function Gb(a){var b={};b=(b.omid_message_guid=a.b,b.omid_message_method=a.method,b.omid_message_version=a.version,b);void 0!==a.a&&(b.omid_message_args=a.a);return b};function Hb(a){this.c=a};function U(a){this.c=a;this.handleExportedMessage=U.prototype.g.bind(this)}r(U,Hb);U.prototype.b=function(a,b){b=void 0===b?this.c:b;if(!b)throw Error('Message destination must be defined at construction time or when sending the message.');b.handleExportedMessage(Gb(a),this)};U.prototype.g=function(a,b){Eb(a)&&this.a&&this.a(Fb(a),b)};var Ib=eval('this'),V=function(){if('undefined'!==typeof omidGlobal&&omidGlobal)return omidGlobal;if('undefined'!==typeof global&&global)return global;if('undefined'!==typeof window&&window)return window;if('undefined'!==typeof Ib&&Ib)return Ib;throw Error('Could not determine global object context.');}();function Jb(a,b){this.c=b=void 0===b?V:b;var c=this;a.addEventListener('message',function(d){if('object'===typeof d.data){var e=d.data;Eb(e)&&d.source&&c.a&&c.a(Fb(e),d.source)}})}r(Jb,Hb);Jb.prototype.b=function(a,b){b=void 0===b?this.c:b;if(!b)throw Error('Message destination must be defined at construction time or when sending the message.');b.postMessage(Gb(a),'*')};function Kb(){var a=W;var b=void 0===b?V:b;this.c=a;this.b=b;this.a=[]}
function Lb(a){if(!a.b||!a.b.document)throw Error('OMID Service Script is not running within a window.');var b=a.a;a.a=[];for(var c=0;c<b.length;c++){var d=a,e=b[c],g=c,l=e,f=J().o?'limited':'full',h=R(l.accessMode,sa)?l.accessMode:null,k=g,m=e.resourceUrl,w=e.verificationParameters;g=d.b.document;l=g.createElement('iframe');'limited'==(h?'full'==h&&'limited'==f?f:h:f)&&(l.sandbox='allow-scripts');l.id='omid-verification-script-frame-'+k;l.style.display='none';f=m.replace(/"/g,'&quot;');h=void 0===
w?'':w;h=((void 0===h?'':h)||'undefined').replace(/<\//g,'<" + "/');h=JSON.stringify(h);l.srcdoc='<html><head>\n'+('<script type="text/javascript">\n      window[\'omid\'] = {\n        "serviceWindow": window.parent,\n        "verificationParameters": '+h+',\n      };\n    \x3c/script>').trim()+'\n<script type="text/javascript" src="'+f+'">\x3c/script>\n</head><body></body></html>';g.body.appendChild(l);f=e.vendorKey;e=e.verificationParameters;f=void 0===f?'':f;e=void 0===e?'':e;f&&'string'===typeof f&&
''!==f&&e&&'string'===typeof e&&''!==e&&(d.c.g[f]=e)}};function Mb(){return'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g,function(a){var b=16*Math.random()|0;return'y'===a?(b&3|8).toString(16):b.toString(16)})};function Nb(){var a=Ob,b=new Kb,c=this;this.b=W;this.a=a;this.c=J();this.f=b;this.g=!1;this.registerSessionObserver(function(d){return Pb(c,d)})}n=Nb.prototype;n.registerSessionObserver=function(a){Va(this.b,a)};n.setSlotElement=function(a){this.c.g=a;this.a&&jb(this.a)};n.setElementBounds=function(a){this.c.c=a;this.a&&jb(this.a);this.a&&kb(this.a)};n.error=function(a,b){Xa(this.b,a,b)};n.registerAdEvents=function(){gb(this.b,'javascript')};
function X(a,b,c){'impression'==b?hb(a.b,'javascript')&&(ab(a.b,'javascript'),a.a&&N(a.a)):(eb(a.b,'javascript')&&bb(a.b,b,'javascript',c),['loaded','start'].includes(b)&&a.a&&N(a.a))}n.injectVerificationScriptResources=function(a){var b=this.f;b.a.push.apply(b.a,q(a));if(this.g)try{Lb(this.f)}catch(c){K(c.message)}};function Pb(a,b){if('sessionStart'===b.type){a.g=!0;try{Lb(a.f)}catch(c){K(c.message)}}'sessionFinish'===b.type&&(a.g=!1,a.registerSessionObserver(function(c){return Pb(a,c)}))}
n.setClientInfo=function(a,b,c){var d=this.c.b||{};d.omidJsInfo=Object.assign({},d.omidJsInfo,{sessionClientVersion:a,partnerName:b,partnerVersion:c});this.c.b=d;return this.c.b.omidJsInfo.serviceVersion};function Qb(a){return/\d+\.\d+\.\d+(-.*)?/.test(a)}function Rb(a){a=a.split('-')[0].split('.');for(var b=['1','0','3'],c=0;3>c;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 Sb(a,b){return Qb(a)&&Rb(a)?b?b:[]:b&&'string'===typeof b?JSON.parse(b):[]};function Tb(){var a=Ub;var b=void 0===b?omidGlobal:b;this.a=a;this.g=b;this.b=new U;this.g.omid=this.g.omid||{};this.g.omid.v1_SessionServiceCommunication=this.b;this.c=b&&b.addEventListener&&b.postMessage?new Jb(b):null;this.f=null;this.b.a=this.h.bind(this);this.c&&(this.c.a=this.i.bind(this))}Tb.prototype.h=function(a,b){Vb(this,a,b,this.b)};
Tb.prototype.i=function(a,b){this.f||(this.f=b);this.f!=b?K('The source window of session client post messages cannot be changed from the source of the first message.'):Vb(this,a,b,this.c)};
function Vb(a,b,c,d){function e(h){for(var k=[],m=0;m<arguments.length;++m)k[m]=arguments[m];k=new S(g,'response',f,Qb(f)&&Rb(f)?k:JSON.stringify(k));d.b(k,c)}var g=b.b,l=b.method,f=b.version;b=Sb(f,b.a);try{Wb(a,l,e,b)}catch(h){d.b(new S(g,'error',f,'\n        name: '+h.name+'\n        message: '+h.message+'\n        filename: '+h.filename+'\n        lineNumber: '+h.lineNumber+'\n        columnNumber: '+h.columnNumber+'\n        stack: '+h.stack+'\n        toString(): '+h.toString()),c)}}
function Wb(a,b,c,d){switch(b){case 'SessionService.registerAdEvents':a.a.registerAdEvents();break;case 'SessionService.registerVideoEvents':db(a.a.b,'javascript');break;case 'SessionService.registerSessionObserver':a.a.registerSessionObserver(c);break;case 'SessionService.setSlotElement':c=p(d).next().value;a.a.setSlotElement(c);break;case 'SessionService.setVideoElement':c=p(d).next().value;a=a.a;a.c.f=c;a.a&&jb(a.a);break;case 'SessionService.setElementBounds':c=p(d).next().value;a.a.setElementBounds(c);
break;case 'SessionService.startSession':K('Session start from JS is not supported in mobile app.');break;case 'SessionService.finishSession':K('Session finish from JS is not supported in mobile app.');break;case 'SessionService.impressionOccurred':X(a.a,'impression');break;case 'SessionService.loaded':c=p(d).next().value;b={skippable:c.isSkippable,autoPlay:c.isAutoPlay,position:c.position};c.isSkippable&&(b.skipOffset=c.skipOffset);X(a.a,'loaded',b);break;case 'SessionService.start':b=p(d);c=b.next().value;
b=b.next().value;X(a.a,'start',{duration:c,videoPlayerVolume:b});break;case 'SessionService.firstQuartile':X(a.a,'firstQuartile');break;case 'SessionService.midpoint':X(a.a,'midpoint');break;case 'SessionService.thirdQuartile':X(a.a,'thirdQuartile');break;case 'SessionService.complete':X(a.a,'complete');break;case 'SessionService.pause':X(a.a,'pause');break;case 'SessionService.resume':X(a.a,'resume');break;case 'SessionService.bufferStart':X(a.a,'bufferStart');break;case 'SessionService.bufferFinish':X(a.a,
'bufferFinish');break;case 'SessionService.skipped':X(a.a,'skipped');break;case 'SessionService.volumeChange':c={videoPlayerVolume:p(d).next().value};X(a.a,'volumeChange',c);break;case 'SessionService.playerStateChange':c={state:p(d).next().value};X(a.a,'playerStateChange',c);break;case 'SessionService.adUserInteraction':c={interactionType:p(d).next().value};X(a.a,'adUserInteraction',c);break;case 'SessionService.setClientInfo':var e=p(d);b=e.next().value;d=e.next().value;e=e.next().value;a=a.a.setClientInfo(b,
d,e);c(a);break;case 'SessionService.injectVerificationScriptResources':c=p(d).next().value;a.a.injectVerificationScriptResources(c);break;case 'SessionService.sessionError':b=p(d),c=b.next().value,b=b.next().value,a.a.error(c,b)}};function Y(){var a=W,b=Xb,c=Yb,d=Ob;this.f=Ub;this.a=a;this.c=b;this.h=c;this.g=d;this.b=J()}n=Y.prototype;n.J=function(a){if(a&&O(a)&&R(a.impressionOwner,ra)&&(!('videoEventsOwner'in a&&null!=a.videoEventsOwner)||R(a.videoEventsOwner,ra))){var b=a.impressionOwner,c=a.videoEventsOwner;a&&null!=a.isolateVerificationScripts&&'boolean'===typeof a.isolateVerificationScripts&&(this.b.o=a.isolateVerificationScripts);gb(this.a,b);db(this.a,c)}};
n.M=function(a,b,c){var d;if(O(b)){if(d=R(b.environment,ua)&&R(b.adSessionType,qa))d=b.omidNativeInfo,d=O(d)?Q(d.partnerName)&&Q(d.partnerVersion):!1;d&&(d=b.app,d=O(d)?Q(d.libraryVersion)&&Q(d.appId):!1)}else d=!1;if(d){d=this.f;c=void 0===c?null:c;null==a&&(a=Mb());d.c.adSessionId=a;a=d.c;var e=a.b||{};b.omidJsInfo=Object.assign({},e.omidJsInfo||{},b.omidJsInfo||{});e=b=Object.assign({},e,b);a.o||(null!=a.f?(e.videoElement=a.f,e.accessMode='full'):null!=a.g&&(e.slotElement=a.g,e.accessMode='full'));
a.b=b;Ya(d.b,c);d.a&&N(d.a)}};n.K=function(){var a=this.f;$a(a.b);a.a.o()};n.P=function(a){O(a)&&Db(a.x)&&Db(a.y)&&Db(a.width)&&Db(a.height)&&(this.b.s=a,ib(this.c,'container'))};n.R=function(a){R(a,ta)&&(this.b.j=a,'backgrounded'===a?ib(this.c,'container','backgrounded'):ib(this.c,'container'))};n.N=function(a){'impression'===a&&(this.G(),this.g&&N(this.g))};n.G=function(){hb(this.a,'native')&&ab(this.a,'native')};n.error=function(a,b){R(a,oa)&&Xa(this.a,a,b)};
n.L=function(a,b){eb(this.a,'native')&&R(a,z)&&(void 0===b||O(b))&&bb(this.a,a,'native',b)};n.O=function(a){if('none'!==this.a.a.a&&'number'===typeof a&&!isNaN(a)){this.b.m=a;a=this.h;var b=a.a.B;null!=b&&bb(a.b,'volumeChange','native',{videoPlayerVolume:b,deviceVolume:a.a.m})}};Y.prototype.startSession=Y.prototype.M;Y.prototype.error=Y.prototype.error;Y.prototype.finishSession=Y.prototype.K;Y.prototype.publishAdEvent=Y.prototype.N;Y.prototype.publishImpressionEvent=Y.prototype.G;
Y.prototype.publishVideoEvent=Y.prototype.L;Y.prototype.setNativeViewHierarchy=Y.prototype.P;Y.prototype.setState=Y.prototype.R;Y.prototype.setDeviceVolume=Y.prototype.O;Y.prototype.init=Y.prototype.J;function Zb(){var a=W,b=$b;var c=void 0===c?V:c;this.f=a;this.a=b;this.h={};this.g={};this.c=new U;c.omid=c.omid||{};c.omid.v1_VerificationServiceCommunication=this.c;this.b=null;c&&c.addEventListener&&c.postMessage&&(this.b=new Jb(c));this.c.a=this.i.bind(this);this.b&&(this.b.a=this.j.bind(this))}function ac(a,b,c,d){sb(a.a,b,c,d)}function bc(a,b,c,d){rb(a.a,'downloadJavaScriptResource')(b,c,d)}Zb.prototype.j=function(a,b){this.b&&cc(this,a,b,this.b)};Zb.prototype.i=function(a,b){cc(this,a,b,this.c)};
function cc(a,b,c,d){function e(B){for(var T=[],ja=0;ja<arguments.length;++ja)T[ja]=arguments[ja];T=new S(g,'response',f,Qb(f)&&Rb(f)?T:JSON.stringify(T));d.b(T,c)}var g=b.b,l=b.method,f=b.version;b=Sb(f,b.a);try{switch(l){case 'VerificationService.addEventListener':var h=p(b).next().value;Ta(a.f,h,e);break;case 'VerificationService.addSessionListener':var k=p(b).next().value;Va(a.f,e,k);break;case 'VerificationService.sendUrl':var m=p(b).next().value;ac(a,m,function(){return e(!0)},function(){return e(!1)});
break;case 'VerificationService.setTimeout':var w=p(b),pa=w.next().value,Z=w.next().value;a.h[pa]=ob(a.a,'setTimeout')(e,Z);break;case 'VerificationService.clearTimeout':var P=p(b).next().value;qb(a.a,a.h[P]);break;case 'VerificationService.setInterval':var C=p(b),gc=C.next().value,hc=C.next().value;a.g[gc]=nb(a.a,e,hc);break;case 'VerificationService.clearInterval':var ic=p(b).next().value;pb(a.a,a.g[ic]);break;case 'VerificationService.injectJavaScriptResource':var jc=p(b).next().value;bc(a,jc,
function(B){return e(!0,B)},function(){return e(!1)});break;case 'VerificationService.getVersion':p(b).next();var kc=J().b.omidJsInfo;e(kc.serviceVersion)}}catch(B){d.b(new S(g,'error',f,'\n              name: '+B.name+'\n              message: '+B.message+'\n              filename: '+B.filename+'\n              lineNumber: '+B.lineNumber+'\n              columnNumber: '+B.columnNumber+'\n              stack: '+B.stack+'\n              toString(): '+B.toString()+'\n          '),c)}};function dc(){var a=V.document.createElement('iframe');a.id='omid_v1_present';a.name='omid_v1_present';a.style.display='none';V.document.body.appendChild(a)}function ec(){var a=new MutationObserver(function(b){b.forEach(function(c){'BODY'===c.addedNodes[0].nodeName&&(dc(),a.disconnect())})});a.observe(V.document.documentElement,{childList:!0})};var W=new Oa,$b=new function(){var a;this.a=a=void 0===a?omidGlobal:a};new Zb;var Xb=new function(){var a=new Fa;this.c=W;this.b=a;this.a=J()},fc;V?fc=V.IntersectionObserver&&(V.MutationObserver||V.ResizeObserver)?new vb(V,Xb,W):new tb(V,Xb,$b,W):fc=null;var Ob=fc,Ub=new Nb,Yb=new function(){var a=W,b=J();this.b=a;this.a=b};V.omidBridge=new Y;new Tb;if(V.frames&&V.document&&!('omid_v1_present'in V.frames)){var lc;if(lc=null==V.document.body)lc='MutationObserver'in V;lc?ec():V.document.body?dc():V.document.write('<iframe style="display:none" id="omid_v1_present" name="omid_v1_present"></iframe>')};
}).call(this, this);

