@bygd/gd-sdk-pes 1.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ import e from"@babel/runtime/helpers/newArrowCheck";import t from"@babel/runtime/helpers/typeof";import n from"@babel/runtime/helpers/defineProperty";import r from"@babel/runtime/helpers/asyncToGenerator";import i from"@babel/runtime/helpers/classCallCheck";import a from"@babel/runtime/helpers/createClass";import o from"@babel/runtime/regenerator";import s from"@babel/runtime/helpers/objectWithoutProperties";import{getScript as d,Ls as c,AdType as u,getQueryString as l,isObjectEmpty as h,Layers as p,getKeyByValue as f,extendDefaults as m,EventBus as g,getIMASampleTags as v,getQueryParams as y,dankLog as b,MessageRouter as _,getIframeDepth as w,getMobilePlatform as A,SDKEvents as E,IMAEvents as k,Macros as D,setDankLog as x,ImplementationTest as S,getParentUrl as T,getParentDomain as R,getTopDomain as O,parseJSON as I}from"@bygd/gd-sdk-era/dist/default";import C from"url-parse";import P from"can-autoplay";import{isPlainObject as L}from"is-plain-object";import M from"lodash.clonedeep";import j from"querystringify";import U from"lodash.merge";import{Base64 as B}from"js-base64";var G="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},N=function(e){return e&&e.Math==Math&&e},q=N("object"==typeof globalThis&&globalThis)||N("object"==typeof window&&window)||N("object"==typeof self&&self)||N("object"==typeof G&&G)||function(){return this}()||Function("return this")(),V={},F=function(e){try{return!!e()}catch(e){return!0}},K=!F((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),z={},W={}.propertyIsEnumerable,H=Object.getOwnPropertyDescriptor,$=H&&!W.call({1:2},1);z.f=$?function(e){var t=H(this,e);return!!t&&t.enumerable}:W;var Y,Q,J=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},X={}.toString,Z=function(e){return X.call(e).slice(8,-1)},ee=Z,te="".split,ne=F((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==ee(e)?te.call(e,""):Object(e)}:Object,re=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e},ie=ne,ae=re,oe=function(e){return ie(ae(e))},se=function(e){return"object"==typeof e?null!==e:"function"==typeof e},de=q,ce=function(e){return"function"==typeof e?e:void 0},ue=function(e,t){return arguments.length<2?ce(de[e]):de[e]&&de[e][t]},le=ue("navigator","userAgent")||"",he=q,pe=le,fe=he.process,me=he.Deno,ge=fe&&fe.versions||me&&me.version,ve=ge&&ge.v8;ve?Q=(Y=ve.split("."))[0]<4?1:Y[0]+Y[1]:pe&&(!(Y=pe.match(/Edge\/(\d+)/))||Y[1]>=74)&&(Y=pe.match(/Chrome\/(\d+)/))&&(Q=Y[1]);var ye=Q&&+Q,be=ye,_e=F,we=!!Object.getOwnPropertySymbols&&!_e((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&be&&be<41})),Ae=we&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Ee=ue,ke=Ae?function(e){return"symbol"==typeof e}:function(e){var t=Ee("Symbol");return"function"==typeof t&&Object(e)instanceof t},De=se,xe={exports:{}},Se=q,Te=function(e,t){try{Object.defineProperty(Se,e,{value:t,configurable:!0,writable:!0})}catch(n){Se[e]=t}return t},Re=Te,Oe=q["__core-js_shared__"]||Re("__core-js_shared__",{}),Ie=Oe;(xe.exports=function(e,t){return Ie[e]||(Ie[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.16.1",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"});var Ce=re,Pe=function(e){return Object(Ce(e))},Le=Pe,Me={}.hasOwnProperty,je=Object.hasOwn||function(e,t){return Me.call(Le(e),t)},Ue=0,Be=Math.random(),Ge=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++Ue+Be).toString(36)},Ne=q,qe=xe.exports,Ve=je,Fe=Ge,Ke=we,ze=Ae,We=qe("wks"),He=Ne.Symbol,$e=ze?He:He&&He.withoutSetter||Fe,Ye=function(e){return Ve(We,e)&&(Ke||"string"==typeof We[e])||(Ke&&Ve(He,e)?We[e]=He[e]:We[e]=$e("Symbol."+e)),We[e]},Qe=se,Je=ke,Xe=function(e,t){var n,r;if("string"===t&&"function"==typeof(n=e.toString)&&!De(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!De(r=n.call(e)))return r;if("string"!==t&&"function"==typeof(n=e.toString)&&!De(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")},Ze=Ye("toPrimitive"),et=function(e,t){if(!Qe(e)||Je(e))return e;var n,r=e[Ze];if(void 0!==r){if(void 0===t&&(t="default"),n=r.call(e,t),!Qe(n)||Je(n))return n;throw TypeError("Can't convert object to primitive value")}return void 0===t&&(t="number"),Xe(e,t)},tt=ke,nt=function(e){var t=et(e,"string");return tt(t)?t:String(t)},rt=se,it=q.document,at=rt(it)&&rt(it.createElement),ot=function(e){return at?it.createElement(e):{}},st=ot,dt=!K&&!F((function(){return 7!=Object.defineProperty(st("div"),"a",{get:function(){return 7}}).a})),ct=K,ut=z,lt=J,ht=oe,pt=nt,ft=je,mt=dt,gt=Object.getOwnPropertyDescriptor;V.f=ct?gt:function(e,t){if(e=ht(e),t=pt(t),mt)try{return gt(e,t)}catch(e){}if(ft(e,t))return lt(!ut.f.call(e,t),e[t])};var vt={},yt=se,bt=function(e){if(!yt(e))throw TypeError(String(e)+" is not an object");return e},_t=K,wt=dt,At=bt,Et=nt,kt=Object.defineProperty;vt.f=_t?kt:function(e,t,n){if(At(e),t=Et(t),At(n),wt)try{return kt(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e};var Dt=vt,xt=J,St=K?function(e,t,n){return Dt.f(e,t,xt(1,n))}:function(e,t,n){return e[t]=n,e},Tt={exports:{}},Rt=Oe,Ot=Function.toString;"function"!=typeof Rt.inspectSource&&(Rt.inspectSource=function(e){return Ot.call(e)});var It,Ct,Pt,Lt=Rt.inspectSource,Mt=Lt,jt=q.WeakMap,Ut="function"==typeof jt&&/native code/.test(Mt(jt)),Bt=xe.exports,Gt=Ge,Nt=Bt("keys"),qt=function(e){return Nt[e]||(Nt[e]=Gt(e))},Vt={},Ft=Ut,Kt=se,zt=St,Wt=je,Ht=Oe,$t=qt,Yt=Vt,Qt=q.WeakMap;if(Ft||Ht.state){var Jt=Ht.state||(Ht.state=new Qt),Xt=Jt.get,Zt=Jt.has,en=Jt.set;It=function(e,t){if(Zt.call(Jt,e))throw new TypeError("Object already initialized");return t.facade=e,en.call(Jt,e,t),t},Ct=function(e){return Xt.call(Jt,e)||{}},Pt=function(e){return Zt.call(Jt,e)}}else{var tn=$t("state");Yt[tn]=!0,It=function(e,t){if(Wt(e,tn))throw new TypeError("Object already initialized");return t.facade=e,zt(e,tn,t),t},Ct=function(e){return Wt(e,tn)?e[tn]:{}},Pt=function(e){return Wt(e,tn)}}var nn={set:It,get:Ct,has:Pt,enforce:function(e){return Pt(e)?Ct(e):It(e,{})},getterFor:function(e){return function(t){var n;if(!Kt(t)||(n=Ct(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}},rn=q,an=St,on=je,sn=Te,dn=Lt,cn=nn.get,un=nn.enforce,ln=String(String).split("String");(Tt.exports=function(e,t,n,r){var i,a=!!r&&!!r.unsafe,o=!!r&&!!r.enumerable,s=!!r&&!!r.noTargetGet;"function"==typeof n&&("string"!=typeof t||on(n,"name")||an(n,"name",t),(i=un(n)).source||(i.source=ln.join("string"==typeof t?t:""))),e!==rn?(a?!s&&e[t]&&(o=!0):delete e[t],o?e[t]=n:an(e,t,n)):o?e[t]=n:sn(t,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&cn(this).source||dn(this)}));var hn={},pn=Math.ceil,fn=Math.floor,mn=function(e){return isNaN(e=+e)?0:(e>0?fn:pn)(e)},gn=mn,vn=Math.min,yn=function(e){return e>0?vn(gn(e),9007199254740991):0},bn=mn,_n=Math.max,wn=Math.min,An=function(e,t){var n=bn(e);return n<0?_n(n+t,0):wn(n,t)},En=oe,kn=yn,Dn=An,xn=function(e){return function(t,n,r){var i,a=En(t),o=kn(a.length),s=Dn(r,o);if(e&&n!=n){for(;o>s;)if((i=a[s++])!=i)return!0}else for(;o>s;s++)if((e||s in a)&&a[s]===n)return e||s||0;return!e&&-1}},Sn={includes:xn(!0),indexOf:xn(!1)},Tn=je,Rn=oe,On=Sn.indexOf,In=Vt,Cn=function(e,t){var n,r=Rn(e),i=0,a=[];for(n in r)!Tn(In,n)&&Tn(r,n)&&a.push(n);for(;t.length>i;)Tn(r,n=t[i++])&&(~On(a,n)||a.push(n));return a},Pn=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Ln=Cn,Mn=Pn.concat("length","prototype");hn.f=Object.getOwnPropertyNames||function(e){return Ln(e,Mn)};var jn={};jn.f=Object.getOwnPropertySymbols;var Un=hn,Bn=jn,Gn=bt,Nn=ue("Reflect","ownKeys")||function(e){var t=Un.f(Gn(e)),n=Bn.f;return n?t.concat(n(e)):t},qn=je,Vn=Nn,Fn=V,Kn=vt,zn=function(e,t){for(var n=Vn(t),r=Kn.f,i=Fn.f,a=0;a<n.length;a++){var o=n[a];qn(e,o)||r(e,o,i(t,o))}},Wn=F,Hn=/#|\.prototype\./,$n=function(e,t){var n=Qn[Yn(e)];return n==Xn||n!=Jn&&("function"==typeof t?Wn(t):!!t)},Yn=$n.normalize=function(e){return String(e).replace(Hn,".").toLowerCase()},Qn=$n.data={},Jn=$n.NATIVE="N",Xn=$n.POLYFILL="P",Zn=$n,er=q,tr=V.f,nr=St,rr=Tt.exports,ir=Te,ar=zn,or=Zn,sr=function(e,t){var n,r,i,a,o,s=e.target,d=e.global,c=e.stat;if(n=d?er:c?er[s]||ir(s,{}):(er[s]||{}).prototype)for(r in t){if(a=t[r],i=e.noTargetGet?(o=tr(n,r))&&o.value:n[r],!or(d?r:s+(c?".":"#")+r,e.forced)&&void 0!==i){if(typeof a==typeof i)continue;ar(a,i)}(e.sham||i&&i.sham)&&nr(a,"sham",!0),rr(n,r,a,e)}},dr=Cn,cr=Pn,ur=Object.keys||function(e){return dr(e,cr)},lr=Pe,hr=ur;sr({target:"Object",stat:!0,forced:F((function(){hr(1)}))},{keys:function(e){return hr(lr(e))}});var pr=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e},fr=pr,mr=function(e,t,n){if(fr(e),void 0===t)return e;switch(n){case 0:return function(){return e.call(t)};case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}},gr=Z,vr=Array.isArray||function(e){return"Array"==gr(e)},yr=se,br=vr,_r=Ye("species"),wr=function(e){var t;return br(e)&&("function"!=typeof(t=e.constructor)||t!==Array&&!br(t.prototype)?yr(t)&&null===(t=t[_r])&&(t=void 0):t=void 0),void 0===t?Array:t},Ar=function(e,t){return new(wr(e))(0===t?0:t)},Er=mr,kr=ne,Dr=Pe,xr=yn,Sr=Ar,Tr=[].push,Rr=function(e){var t=1==e,n=2==e,r=3==e,i=4==e,a=6==e,o=7==e,s=5==e||a;return function(d,c,u,l){for(var h,p,f=Dr(d),m=kr(f),g=Er(c,u,3),v=xr(m.length),y=0,b=l||Sr,_=t?b(d,v):n||o?b(d,0):void 0;v>y;y++)if((s||y in m)&&(p=g(h=m[y],y,f),e))if(t)_[y]=p;else if(p)switch(e){case 3:return!0;case 5:return h;case 6:return y;case 2:Tr.call(_,h)}else switch(e){case 4:return!1;case 7:Tr.call(_,h)}return a?-1:r||i?i:_}},Or={forEach:Rr(0),map:Rr(1),filter:Rr(2),some:Rr(3),every:Rr(4),find:Rr(5),findIndex:Rr(6),filterReject:Rr(7)},Ir=F,Cr=ye,Pr=Ye("species"),Lr=function(e){return Cr>=51||!Ir((function(){var t=[];return(t.constructor={})[Pr]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},Mr=Or.filter;sr({target:"Array",proto:!0,forced:!Lr("filter")},{filter:function(e){return Mr(this,e,arguments.length>1?arguments[1]:void 0)}});var jr=sr,Ur=F,Br=oe,Gr=V.f,Nr=K,qr=Ur((function(){Gr(1)}));jr({target:"Object",stat:!0,forced:!Nr||qr,sham:!Nr},{getOwnPropertyDescriptor:function(e,t){return Gr(Br(e),t)}});var Vr=nt,Fr=vt,Kr=J,zr=function(e,t,n){var r=Vr(t);r in e?Fr.f(e,r,Kr(0,n)):e[r]=n},Wr=Nn,Hr=oe,$r=V,Yr=zr;sr({target:"Object",stat:!0,sham:!K},{getOwnPropertyDescriptors:function(e){for(var t,n,r=Hr(e),i=$r.f,a=Wr(r),o={},s=0;a.length>s;)void 0!==(n=i(r,t=a[s++]))&&Yr(o,t,n);return o}});var Qr={};Qr[Ye("toStringTag")]="z";var Jr="[object z]"===String(Qr),Xr=Jr,Zr=Z,ei=Ye("toStringTag"),ti="Arguments"==Zr(function(){return arguments}()),ni=Xr?Zr:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),ei))?n:ti?Zr(t):"Object"==(r=Zr(t))&&"function"==typeof t.callee?"Arguments":r},ri=ni,ii=Jr?{}.toString:function(){return"[object "+ri(this)+"]"},ai=Jr,oi=Tt.exports,si=ii;ai||oi(Object.prototype,"toString",si,{unsafe:!0});var di=q.Promise,ci=Tt.exports,ui=se,li=bt,hi=function(e){if(!ui(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype");return e},pi=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),t=n instanceof Array}catch(e){}return function(n,r){return li(n),hi(r),t?e.call(n,r):n.__proto__=r,n}}():void 0),fi=vt.f,mi=je,gi=Ye("toStringTag"),vi=function(e,t,n){e&&!mi(e=n?e:e.prototype,gi)&&fi(e,gi,{configurable:!0,value:t})},yi=ue,bi=vt,_i=K,wi=Ye("species"),Ai=function(e){var t=yi(e),n=bi.f;_i&&t&&!t[wi]&&n(t,wi,{configurable:!0,get:function(){return this}})},Ei={},ki=Ei,Di=Ye("iterator"),xi=Array.prototype,Si=function(e){return void 0!==e&&(ki.Array===e||xi[Di]===e)},Ti=ni,Ri=Ei,Oi=Ye("iterator"),Ii=function(e){if(null!=e)return e[Oi]||e["@@iterator"]||Ri[Ti(e)]},Ci=bt,Pi=function(e){var t=e.return;if(void 0!==t)return Ci(t.call(e)).value},Li=bt,Mi=Si,ji=yn,Ui=mr,Bi=Ii,Gi=Pi,Ni=function(e,t){this.stopped=e,this.result=t},qi=Ye("iterator"),Vi=!1;try{var Fi=0,Ki={next:function(){return{done:!!Fi++}},return:function(){Vi=!0}};Ki[qi]=function(){return this},Array.from(Ki,(function(){throw 2}))}catch(e){}var zi,Wi,Hi,$i,Yi=function(e,t){if(!t&&!Vi)return!1;var n=!1;try{var r={};r[qi]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch(e){}return n},Qi=bt,Ji=pr,Xi=Ye("species"),Zi=function(e,t){var n,r=Qi(e).constructor;return void 0===r||null==(n=Qi(r)[Xi])?t:Ji(n)},ea=ue("document","documentElement"),ta=/(?:iphone|ipod|ipad).*applewebkit/i.test(le),na="process"==Z(q.process),ra=q,ia=F,aa=mr,oa=ea,sa=ot,da=ta,ca=na,ua=ra.setImmediate,la=ra.clearImmediate,ha=ra.process,pa=ra.MessageChannel,fa=ra.Dispatch,ma=0,ga={};try{zi=ra.location}catch(e){}var va=function(e){if(ga.hasOwnProperty(e)){var t=ga[e];delete ga[e],t()}},ya=function(e){return function(){va(e)}},ba=function(e){va(e.data)},_a=function(e){ra.postMessage(String(e),zi.protocol+"//"+zi.host)};ua&&la||(ua=function(e){for(var t=[],n=arguments.length,r=1;n>r;)t.push(arguments[r++]);return ga[++ma]=function(){("function"==typeof e?e:Function(e)).apply(void 0,t)},Wi(ma),ma},la=function(e){delete ga[e]},ca?Wi=function(e){ha.nextTick(ya(e))}:fa&&fa.now?Wi=function(e){fa.now(ya(e))}:pa&&!da?($i=(Hi=new pa).port2,Hi.port1.onmessage=ba,Wi=aa($i.postMessage,$i,1)):ra.addEventListener&&"function"==typeof postMessage&&!ra.importScripts&&zi&&"file:"!==zi.protocol&&!ia(_a)?(Wi=_a,ra.addEventListener("message",ba,!1)):Wi="onreadystatechange"in sa("script")?function(e){oa.appendChild(sa("script")).onreadystatechange=function(){oa.removeChild(this),va(e)}}:function(e){setTimeout(ya(e),0)});var wa,Aa,Ea,ka,Da,xa,Sa,Ta,Ra={set:ua,clear:la},Oa=q,Ia=/iphone|ipod|ipad/i.test(le)&&void 0!==Oa.Pebble,Ca=/web0s(?!.*chrome)/i.test(le),Pa=q,La=V.f,Ma=Ra.set,ja=ta,Ua=Ia,Ba=Ca,Ga=na,Na=Pa.MutationObserver||Pa.WebKitMutationObserver,qa=Pa.document,Va=Pa.process,Fa=Pa.Promise,Ka=La(Pa,"queueMicrotask"),za=Ka&&Ka.value;za||(wa=function(){var e,t;for(Ga&&(e=Va.domain)&&e.exit();Aa;){t=Aa.fn,Aa=Aa.next;try{t()}catch(e){throw Aa?ka():Ea=void 0,e}}Ea=void 0,e&&e.enter()},ja||Ga||Ba||!Na||!qa?!Ua&&Fa&&Fa.resolve?((Sa=Fa.resolve(void 0)).constructor=Fa,Ta=Sa.then,ka=function(){Ta.call(Sa,wa)}):ka=Ga?function(){Va.nextTick(wa)}:function(){Ma.call(Pa,wa)}:(Da=!0,xa=qa.createTextNode(""),new Na(wa).observe(xa,{characterData:!0}),ka=function(){xa.data=Da=!Da}));var Wa=za||function(e){var t={fn:e,next:void 0};Ea&&(Ea.next=t),Aa||(Aa=t,ka()),Ea=t},Ha={},$a=pr,Ya=function(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=r})),this.resolve=$a(t),this.reject=$a(n)};Ha.f=function(e){return new Ya(e)};var Qa,Ja,Xa,Za,eo=bt,to=se,no=Ha,ro=function(e,t){if(eo(e),to(t)&&t.constructor===e)return t;var n=no.f(e);return(0,n.resolve)(t),n.promise},io=q,ao="object"==typeof window,oo=sr,so=q,co=ue,uo=di,lo=Tt.exports,ho=function(e,t,n){for(var r in t)ci(e,r,t[r],n);return e},po=pi,fo=vi,mo=Ai,go=se,vo=pr,yo=function(e,t,n){if(!(e instanceof t))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return e},bo=Lt,_o=function(e,t,n){var r,i,a,o,s,d,c,u=n&&n.that,l=!(!n||!n.AS_ENTRIES),h=!(!n||!n.IS_ITERATOR),p=!(!n||!n.INTERRUPTED),f=Ui(t,u,1+l+p),m=function(e){return r&&Gi(r),new Ni(!0,e)},g=function(e){return l?(Li(e),p?f(e[0],e[1],m):f(e[0],e[1])):p?f(e,m):f(e)};if(h)r=e;else{if("function"!=typeof(i=Bi(e)))throw TypeError("Target is not iterable");if(Mi(i)){for(a=0,o=ji(e.length);o>a;a++)if((s=g(e[a]))&&s instanceof Ni)return s;return new Ni(!1)}r=i.call(e)}for(d=r.next;!(c=d.call(r)).done;){try{s=g(c.value)}catch(e){throw Gi(r),e}if("object"==typeof s&&s&&s instanceof Ni)return s}return new Ni(!1)},wo=Yi,Ao=Zi,Eo=Ra.set,ko=Wa,Do=ro,xo=function(e,t){var n=io.console;n&&n.error&&(1===arguments.length?n.error(e):n.error(e,t))},So=Ha,To=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},Ro=nn,Oo=Zn,Io=ao,Co=na,Po=ye,Lo=Ye("species"),Mo="Promise",jo=Ro.get,Uo=Ro.set,Bo=Ro.getterFor(Mo),Go=uo&&uo.prototype,No=uo,qo=Go,Vo=so.TypeError,Fo=so.document,Ko=so.process,zo=So.f,Wo=zo,Ho=!!(Fo&&Fo.createEvent&&so.dispatchEvent),$o="function"==typeof PromiseRejectionEvent,Yo=!1,Qo=Oo(Mo,(function(){var e=bo(No),t=e!==String(No);if(!t&&66===Po)return!0;if(Po>=51&&/native code/.test(e))return!1;var n=new No((function(e){e(1)})),r=function(e){e((function(){}),(function(){}))};return(n.constructor={})[Lo]=r,!(Yo=n.then((function(){}))instanceof r)||!t&&Io&&!$o})),Jo=Qo||!wo((function(e){No.all(e).catch((function(){}))})),Xo=function(e){var t;return!(!go(e)||"function"!=typeof(t=e.then))&&t},Zo=function(e,t){if(!e.notified){e.notified=!0;var n=e.reactions;ko((function(){for(var r=e.value,i=1==e.state,a=0;n.length>a;){var o,s,d,c=n[a++],u=i?c.ok:c.fail,l=c.resolve,h=c.reject,p=c.domain;try{u?(i||(2===e.rejection&&rs(e),e.rejection=1),!0===u?o=r:(p&&p.enter(),o=u(r),p&&(p.exit(),d=!0)),o===c.promise?h(Vo("Promise-chain cycle")):(s=Xo(o))?s.call(o,l,h):l(o)):h(r)}catch(e){p&&!d&&p.exit(),h(e)}}e.reactions=[],e.notified=!1,t&&!e.rejection&&ts(e)}))}},es=function(e,t,n){var r,i;Ho?((r=Fo.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),so.dispatchEvent(r)):r={promise:t,reason:n},!$o&&(i=so["on"+e])?i(r):"unhandledrejection"===e&&xo("Unhandled promise rejection",n)},ts=function(e){Eo.call(so,(function(){var t,n=e.facade,r=e.value;if(ns(e)&&(t=To((function(){Co?Ko.emit("unhandledRejection",r,n):es("unhandledrejection",n,r)})),e.rejection=Co||ns(e)?2:1,t.error))throw t.value}))},ns=function(e){return 1!==e.rejection&&!e.parent},rs=function(e){Eo.call(so,(function(){var t=e.facade;Co?Ko.emit("rejectionHandled",t):es("rejectionhandled",t,e.value)}))},is=function(e,t,n){return function(r){e(t,r,n)}},as=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,Zo(e,!0))},os=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw Vo("Promise can't be resolved itself");var r=Xo(t);r?ko((function(){var n={done:!1};try{r.call(t,is(os,n,e),is(as,n,e))}catch(t){as(n,t,e)}})):(e.value=t,e.state=1,Zo(e,!1))}catch(t){as({done:!1},t,e)}}};if(Qo&&(qo=(No=function(e){yo(this,No,Mo),vo(e),Qa.call(this);var t=jo(this);try{e(is(os,t),is(as,t))}catch(e){as(t,e)}}).prototype,(Qa=function(e){Uo(this,{type:Mo,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=ho(qo,{then:function(e,t){var n=Bo(this),r=zo(Ao(this,No));return r.ok="function"!=typeof e||e,r.fail="function"==typeof t&&t,r.domain=Co?Ko.domain:void 0,n.parent=!0,n.reactions.push(r),0!=n.state&&Zo(n,!1),r.promise},catch:function(e){return this.then(void 0,e)}}),Ja=function(){var e=new Qa,t=jo(e);this.promise=e,this.resolve=is(os,t),this.reject=is(as,t)},So.f=zo=function(e){return e===No||e===Xa?new Ja(e):Wo(e)},"function"==typeof uo&&Go!==Object.prototype)){Za=Go.then,Yo||(lo(Go,"then",(function(e,t){var n=this;return new No((function(e,t){Za.call(n,e,t)})).then(e,t)}),{unsafe:!0}),lo(Go,"catch",qo.catch,{unsafe:!0}));try{delete Go.constructor}catch(e){}po&&po(Go,qo)}oo({global:!0,wrap:!0,forced:Qo},{Promise:No}),fo(No,Mo,!1),mo(Mo),Xa=co(Mo),oo({target:Mo,stat:!0,forced:Qo},{reject:function(e){var t=zo(this);return t.reject.call(void 0,e),t.promise}}),oo({target:Mo,stat:!0,forced:Qo},{resolve:function(e){return Do(this,e)}}),oo({target:Mo,stat:!0,forced:Jo},{all:function(e){var t=this,n=zo(t),r=n.resolve,i=n.reject,a=To((function(){var n=vo(t.resolve),a=[],o=0,s=1;_o(e,(function(e){var d=o++,c=!1;a.push(void 0),s++,n.call(t,e).then((function(e){c||(c=!0,a[d]=e,--s||r(a))}),i)})),--s||r(a)}));return a.error&&i(a.value),n.promise},race:function(e){var t=this,n=zo(t),r=n.reject,i=To((function(){var i=vo(t.resolve);_o(e,(function(e){i.call(t,e).then(n.resolve,r)}))}));return i.error&&r(i.value),n.promise}});var ss=sr,ds=di,cs=F,us=ue,ls=Zi,hs=ro,ps=Tt.exports;if(ss({target:"Promise",proto:!0,real:!0,forced:!!ds&&cs((function(){ds.prototype.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=ls(this,us("Promise")),n="function"==typeof e;return this.then(n?function(n){return hs(t,e()).then((function(){return n}))}:e,n?function(n){return hs(t,e()).then((function(){throw n}))}:e)}}),"function"==typeof ds){var fs=us("Promise").prototype.finally;ds.prototype.finally!==fs&&ps(ds.prototype,"finally",fs,{unsafe:!0})}var ms=ke,gs=function(e){if(ms(e))throw TypeError("Cannot convert a Symbol value to a string");return String(e)},vs=bt,ys=function(){var e=vs(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t},bs={},_s=F,ws=function(e,t){return RegExp(e,t)};bs.UNSUPPORTED_Y=_s((function(){var e=ws("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),bs.BROKEN_CARET=_s((function(){var e=ws("^r","gy");return e.lastIndex=2,null!=e.exec("str")}));var As,Es=vt,ks=bt,Ds=ur,xs=K?Object.defineProperties:function(e,t){ks(e);for(var n,r=Ds(t),i=r.length,a=0;i>a;)Es.f(e,n=r[a++],t[n]);return e},Ss=bt,Ts=xs,Rs=Pn,Os=Vt,Is=ea,Cs=ot,Ps=qt("IE_PROTO"),Ls=function(){},Ms=function(e){return"<script>"+e+"<\/script>"},js=function(e){e.write(Ms("")),e.close();var t=e.parentWindow.Object;return e=null,t},Us=function(){try{As=new ActiveXObject("htmlfile")}catch(e){}Us=document.domain&&As?js(As):function(){var e,t=Cs("iframe");if(t.style)return t.style.display="none",Is.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(Ms("document.F=Object")),e.close(),e.F}()||js(As);for(var e=Rs.length;e--;)delete Us.prototype[Rs[e]];return Us()};Os[Ps]=!0;var Bs=Object.create||function(e,t){var n;return null!==e?(Ls.prototype=Ss(e),n=new Ls,Ls.prototype=null,n[Ps]=e):n=Us(),void 0===t?n:Ts(n,t)},Gs=F((function(){var e=RegExp(".","string".charAt(0));return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)})),Ns=F((function(){var e=RegExp("(?<a>b)","string".charAt(5));return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),qs=gs,Vs=ys,Fs=bs,Ks=xe.exports,zs=Bs,Ws=nn.get,Hs=Gs,$s=Ns,Ys=RegExp.prototype.exec,Qs=Ks("native-string-replace",String.prototype.replace),Js=Ys,Xs=function(){var e=/a/,t=/b*/g;return Ys.call(e,"a"),Ys.call(t,"a"),0!==e.lastIndex||0!==t.lastIndex}(),Zs=Fs.UNSUPPORTED_Y||Fs.BROKEN_CARET,ed=void 0!==/()??/.exec("")[1];(Xs||ed||Zs||Hs||$s)&&(Js=function(e){var t,n,r,i,a,o,s,d=this,c=Ws(d),u=qs(e),l=c.raw;if(l)return l.lastIndex=d.lastIndex,t=Js.call(l,u),d.lastIndex=l.lastIndex,t;var h=c.groups,p=Zs&&d.sticky,f=Vs.call(d),m=d.source,g=0,v=u;if(p&&(-1===(f=f.replace("y","")).indexOf("g")&&(f+="g"),v=u.slice(d.lastIndex),d.lastIndex>0&&(!d.multiline||d.multiline&&"\n"!==u.charAt(d.lastIndex-1))&&(m="(?: "+m+")",v=" "+v,g++),n=new RegExp("^(?:"+m+")",f)),ed&&(n=new RegExp("^"+m+"$(?!\\s)",f)),Xs&&(r=d.lastIndex),i=Ys.call(p?n:d,v),p?i?(i.input=i.input.slice(g),i[0]=i[0].slice(g),i.index=d.lastIndex,d.lastIndex+=i[0].length):d.lastIndex=0:Xs&&i&&(d.lastIndex=d.global?i.index+i[0].length:r),ed&&i&&i.length>1&&Qs.call(i[0],n,(function(){for(a=1;a<arguments.length-2;a++)void 0===arguments[a]&&(i[a]=void 0)})),i&&h)for(i.groups=o=zs(null),a=0;a<h.length;a++)o[(s=h[a])[0]]=i[s[1]];return i});var td=Js;sr({target:"RegExp",proto:!0,forced:/./.exec!==td},{exec:td});var nd=Tt.exports,rd=td,id=F,ad=Ye,od=St,sd=ad("species"),dd=RegExp.prototype,cd=function(e,t,n,r){var i=ad(e),a=!id((function(){var t={};return t[i]=function(){return 7},7!=""[e](t)})),o=a&&!id((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[sd]=function(){return n},n.flags="",n[i]=/./[i]),n.exec=function(){return t=!0,null},n[i](""),!t}));if(!a||!o||n){var s=/./[i],d=t(i,""[e],(function(e,t,n,r,i){var o=t.exec;return o===rd||o===dd.exec?a&&!i?{done:!0,value:s.call(t,n,r)}:{done:!0,value:e.call(n,t,r)}:{done:!1}}));nd(String.prototype,e,d[0]),nd(dd,i,d[1])}r&&od(dd[i],"sham",!0)},ud=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t},ld=Z,hd=td,pd=function(e,t){var n=e.exec;if("function"==typeof n){var r=n.call(e,t);if("object"!=typeof r)throw TypeError("RegExp exec method returned something other than an Object or null");return r}if("RegExp"!==ld(e))throw TypeError("RegExp#exec called on incompatible receiver");return hd.call(e,t)},fd=bt,md=re,gd=ud,vd=gs,yd=pd;cd("search",(function(e,t,n){return[function(t){var n=md(this),r=null==t?void 0:t[e];return void 0!==r?r.call(t,n):new RegExp(t)[e](vd(n))},function(e){var r=fd(this),i=vd(e),a=n(t,r,i);if(a.done)return a.value;var o=r.lastIndex;gd(o,0)||(r.lastIndex=0);var s=yd(r,i);return gd(r.lastIndex,o)||(r.lastIndex=o),null===s?-1:s.index}]}));var bd=re,_d=gs,wd="[\t\n\v\f\r                 \u2028\u2029\ufeff]",Ad=RegExp("^"+wd+wd+"*"),Ed=RegExp(wd+wd+"*$"),kd=function(e){return function(t){var n=_d(bd(t));return 1&e&&(n=n.replace(Ad,"")),2&e&&(n=n.replace(Ed,"")),n}},Dd={start:kd(1),end:kd(2),trim:kd(3)},xd=F,Sd="\t\n\v\f\r                 \u2028\u2029\ufeff",Td=Dd.trim;sr({target:"String",proto:!0,forced:function(e){return xd((function(){return!!Sd[e]()||"​…᠎"!="​…᠎"[e]()||Sd[e].name!==e}))}("trim")},{trim:function(){return Td(this)}});var Rd={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},Od=F,Id=Or.forEach,Cd=q,Pd=Rd,Ld=function(e,t){var n=[][e];return!!n&&Od((function(){n.call(null,t||function(){throw 1},1)}))}("forEach")?[].forEach:function(e){return Id(this,e,arguments.length>1?arguments[1]:void 0)},Md=St;for(var jd in Pd){var Ud=Cd[jd],Bd=Ud&&Ud.prototype;if(Bd&&Bd.forEach!==Ld)try{Md(Bd,"forEach",Ld)}catch(e){Bd.forEach=Ld}}var Gd=se,Nd=pi,qd=se,Vd=Z,Fd=Ye("match"),Kd=function(e){var t;return qd(e)&&(void 0!==(t=e[Fd])?!!t:"RegExp"==Vd(e))},zd=K,Wd=q,Hd=Zn,$d=function(e,t,n){var r,i;return Nd&&"function"==typeof(r=t.constructor)&&r!==n&&Gd(i=r.prototype)&&i!==n.prototype&&Nd(e,i),e},Yd=St,Qd=vt.f,Jd=hn.f,Xd=Kd,Zd=gs,ec=ys,tc=bs,nc=Tt.exports,rc=F,ic=je,ac=nn.enforce,oc=Ai,sc=Gs,dc=Ns,cc=Ye("match"),uc=Wd.RegExp,lc=uc.prototype,hc=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,pc=/a/g,fc=/a/g,mc=new uc(pc)!==pc,gc=tc.UNSUPPORTED_Y,vc=zd&&(!mc||gc||sc||dc||rc((function(){return fc[cc]=!1,uc(pc)!=pc||uc(fc)==fc||"/a/i"!=uc(pc,"i")})));if(Hd("RegExp",vc)){for(var yc=function(e,t){var n,r,i,a,o,s,d=this instanceof yc,c=Xd(e),u=void 0===t,l=[],h=e;if(!d&&c&&u&&e.constructor===yc)return e;if((c||e instanceof yc)&&(e=e.source,u&&(t="flags"in h?h.flags:ec.call(h))),e=void 0===e?"":Zd(e),t=void 0===t?"":Zd(t),h=e,sc&&"dotAll"in pc&&(r=!!t&&t.indexOf("s")>-1)&&(t=t.replace(/s/g,"")),n=t,gc&&"sticky"in pc&&(i=!!t&&t.indexOf("y")>-1)&&(t=t.replace(/y/g,"")),dc&&(e=(a=function(e){for(var t,n=e.length,r=0,i="",a=[],o={},s=!1,d=!1,c=0,u="";r<=n;r++){if("\\"===(t=e.charAt(r)))t+=e.charAt(++r);else if("]"===t)s=!1;else if(!s)switch(!0){case"["===t:s=!0;break;case"("===t:hc.test(e.slice(r+1))&&(r+=2,d=!0),i+=t,c++;continue;case">"===t&&d:if(""===u||ic(o,u))throw new SyntaxError("Invalid capture group name");o[u]=!0,a.push([u,c]),d=!1,u="";continue}d?u+=t:i+=t}return[i,a]}(e))[0],l=a[1]),o=$d(uc(e,t),d?this:lc,yc),(r||i||l.length)&&(s=ac(o),r&&(s.dotAll=!0,s.raw=yc(function(e){for(var t,n=e.length,r=0,i="",a=!1;r<=n;r++)"\\"!==(t=e.charAt(r))?a||"."!==t?("["===t?a=!0:"]"===t&&(a=!1),i+=t):i+="[\\s\\S]":i+=t+e.charAt(++r);return i}(e),n)),i&&(s.sticky=!0),l.length&&(s.groups=l)),e!==h)try{Yd(o,"source",""===h?"(?:)":h)}catch(e){}return o},bc=function(e){e in yc||Qd(yc,e,{configurable:!0,get:function(){return uc[e]},set:function(t){uc[e]=t}})},_c=Jd(uc),wc=0;_c.length>wc;)bc(_c[wc++]);lc.constructor=yc,yc.prototype=lc,nc(Wd,"RegExp",yc)}oc("RegExp");var Ac=Tt.exports,Ec=bt,kc=gs,Dc=F,xc=ys,Sc=RegExp.prototype,Tc=Sc.toString,Rc=Dc((function(){return"/a/b"!=Tc.call({source:"a",flags:"b"})})),Oc="toString"!=Tc.name;(Rc||Oc)&&Ac(RegExp.prototype,"toString",(function(){var e=Ec(this),t=kc(e.source),n=e.flags;return"/"+t+"/"+kc(void 0===n&&e instanceof RegExp&&!("flags"in Sc)?xc.call(e):n)}),{unsafe:!0});var Ic=sr,Cc=F,Pc=vr,Lc=se,Mc=Pe,jc=yn,Uc=zr,Bc=Ar,Gc=Lr,Nc=ye,qc=Ye("isConcatSpreadable"),Vc=Nc>=51||!Cc((function(){var e=[];return e[qc]=!1,e.concat()[0]!==e})),Fc=Gc("concat"),Kc=function(e){if(!Lc(e))return!1;var t=e[qc];return void 0!==t?!!t:Pc(e)};Ic({target:"Array",proto:!0,forced:!Vc||!Fc},{concat:function(e){var t,n,r,i,a,o=Mc(this),s=Bc(o,0),d=0;for(t=-1,r=arguments.length;t<r;t++)if(Kc(a=-1===t?o:arguments[t])){if(d+(i=jc(a.length))>9007199254740991)throw TypeError("Maximum allowed index exceeded");for(n=0;n<i;n++,d++)n in a&&Uc(s,d,a[n])}else{if(d>=9007199254740991)throw TypeError("Maximum allowed index exceeded");Uc(s,d++,a)}return s.length=d,s}});var zc,Wc=Kd,Hc=function(e){if(Wc(e))throw TypeError("The method doesn't accept regular expressions");return e},$c=Ye("match"),Yc=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[$c]=!1,"/./"[e](t)}catch(e){}}return!1},Qc=sr,Jc=V.f,Xc=yn,Zc=gs,eu=Hc,tu=re,nu=Yc,ru="".startsWith,iu=Math.min,au=nu("startsWith");Qc({target:"String",proto:!0,forced:!!(au||(zc=Jc(String.prototype,"startsWith"),!zc||zc.writable))&&!au},{startsWith:function(e){var t=Zc(tu(this));eu(e);var n=Xc(iu(arguments.length>1?arguments[1]:void 0,t.length)),r=Zc(e);return ru?ru.call(t,r,n):t.slice(n,n+r.length)===r}});var ou=K,su=vt.f,du=Function.prototype,cu=du.toString,uu=/^\s*function ([^ (]*)/;ou&&!("name"in du)&&su(du,"name",{configurable:!0,get:function(){try{return cu.call(this).match(uu)[1]}catch(e){return""}}});var lu=mn,hu=gs,pu=re,fu=function(e){return function(t,n){var r,i,a=hu(pu(t)),o=lu(n),s=a.length;return o<0||o>=s?e?"":void 0:(r=a.charCodeAt(o))<55296||r>56319||o+1===s||(i=a.charCodeAt(o+1))<56320||i>57343?e?a.charAt(o):r:e?a.slice(o,o+2):i-56320+(r-55296<<10)+65536}},mu={codeAt:fu(!1),charAt:fu(!0)},gu=mu.charAt,vu=function(e,t,n){return t+(n?gu(e,t).length:1)},yu=Pe,bu=Math.floor,_u="".replace,wu=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Au=/\$([$&'`]|\d{1,2})/g,Eu=cd,ku=F,Du=bt,xu=mn,Su=yn,Tu=gs,Ru=re,Ou=vu,Iu=function(e,t,n,r,i,a){var o=n+e.length,s=r.length,d=Au;return void 0!==i&&(i=yu(i),d=wu),_u.call(a,d,(function(a,d){var c;switch(d.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,n);case"'":return t.slice(o);case"<":c=i[d.slice(1,-1)];break;default:var u=+d;if(0===u)return a;if(u>s){var l=bu(u/10);return 0===l?a:l<=s?void 0===r[l-1]?d.charAt(1):r[l-1]+d.charAt(1):a}c=r[u-1]}return void 0===c?"":c}))},Cu=pd,Pu=Ye("replace"),Lu=Math.max,Mu=Math.min,ju="$0"==="a".replace(/./,"$0"),Uu=!!/./[Pu]&&""===/./[Pu]("a","$0");Eu("replace",(function(e,t,n){var r=Uu?"$":"$0";return[function(e,n){var r=Ru(this),i=null==e?void 0:e[Pu];return void 0!==i?i.call(e,r,n):t.call(Tu(r),e,n)},function(e,i){var a=Du(this),o=Tu(e);if("string"==typeof i&&-1===i.indexOf(r)&&-1===i.indexOf("$<")){var s=n(t,a,o,i);if(s.done)return s.value}var d="function"==typeof i;d||(i=Tu(i));var c=a.global;if(c){var u=a.unicode;a.lastIndex=0}for(var l=[];;){var h=Cu(a,o);if(null===h)break;if(l.push(h),!c)break;""===Tu(h[0])&&(a.lastIndex=Ou(o,Su(a.lastIndex),u))}for(var p,f="",m=0,g=0;g<l.length;g++){h=l[g];for(var v=Tu(h[0]),y=Lu(Mu(xu(h.index),o.length),0),b=[],_=1;_<h.length;_++)b.push(void 0===(p=h[_])?p:String(p));var w=h.groups;if(d){var A=[v].concat(b,y,o);void 0!==w&&A.push(w);var E=Tu(i.apply(void 0,A))}else E=Iu(v,o,y,b,w,i);y>=m&&(f+=o.slice(m,y)+E,m=y+v.length)}return f+o.slice(m)}]}),!!ku((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}))||!ju||Uu);var Bu={},Gu=oe,Nu=hn.f,qu={}.toString,Vu="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];Bu.f=function(e){return Vu&&"[object Window]"==qu.call(e)?function(e){try{return Nu(e)}catch(e){return Vu.slice()}}(e):Nu(Gu(e))};var Fu={},Ku=Ye;Fu.f=Ku;var zu=q,Wu=je,Hu=Fu,$u=vt.f,Yu=function(e){var t=zu.Symbol||(zu.Symbol={});Wu(t,e)||$u(t,e,{value:Hu.f(e)})},Qu=sr,Ju=q,Xu=ue,Zu=K,el=we,tl=F,nl=je,rl=vr,il=se,al=ke,ol=bt,sl=Pe,dl=oe,cl=nt,ul=gs,ll=J,hl=Bs,pl=ur,fl=hn,ml=Bu,gl=jn,vl=V,yl=vt,bl=z,_l=St,wl=Tt.exports,Al=xe.exports,El=Vt,kl=Ge,Dl=Ye,xl=Fu,Sl=Yu,Tl=vi,Rl=nn,Ol=Or.forEach,Il=qt("hidden"),Cl=Dl("toPrimitive"),Pl=Rl.set,Ll=Rl.getterFor("Symbol"),Ml=Object.prototype,jl=Ju.Symbol,Ul=Xu("JSON","stringify"),Bl=vl.f,Gl=yl.f,Nl=ml.f,ql=bl.f,Vl=Al("symbols"),Fl=Al("op-symbols"),Kl=Al("string-to-symbol-registry"),zl=Al("symbol-to-string-registry"),Wl=Al("wks"),Hl=Ju.QObject,$l=!Hl||!Hl.prototype||!Hl.prototype.findChild,Yl=Zu&&tl((function(){return 7!=hl(Gl({},"a",{get:function(){return Gl(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=Bl(Ml,t);r&&delete Ml[t],Gl(e,t,n),r&&e!==Ml&&Gl(Ml,t,r)}:Gl,Ql=function(e,t){var n=Vl[e]=hl(jl.prototype);return Pl(n,{type:"Symbol",tag:e,description:t}),Zu||(n.description=t),n},Jl=function(e,t,n){e===Ml&&Jl(Fl,t,n),ol(e);var r=cl(t);return ol(n),nl(Vl,r)?(n.enumerable?(nl(e,Il)&&e[Il][r]&&(e[Il][r]=!1),n=hl(n,{enumerable:ll(0,!1)})):(nl(e,Il)||Gl(e,Il,ll(1,{})),e[Il][r]=!0),Yl(e,r,n)):Gl(e,r,n)},Xl=function(e,t){ol(e);var n=dl(t),r=pl(n).concat(nh(n));return Ol(r,(function(t){Zu&&!Zl.call(n,t)||Jl(e,t,n[t])})),e},Zl=function(e){var t=cl(e),n=ql.call(this,t);return!(this===Ml&&nl(Vl,t)&&!nl(Fl,t))&&(!(n||!nl(this,t)||!nl(Vl,t)||nl(this,Il)&&this[Il][t])||n)},eh=function(e,t){var n=dl(e),r=cl(t);if(n!==Ml||!nl(Vl,r)||nl(Fl,r)){var i=Bl(n,r);return!i||!nl(Vl,r)||nl(n,Il)&&n[Il][r]||(i.enumerable=!0),i}},th=function(e){var t=Nl(dl(e)),n=[];return Ol(t,(function(e){nl(Vl,e)||nl(El,e)||n.push(e)})),n},nh=function(e){var t=e===Ml,n=Nl(t?Fl:dl(e)),r=[];return Ol(n,(function(e){!nl(Vl,e)||t&&!nl(Ml,e)||r.push(Vl[e])})),r};(el||(wl((jl=function(){if(this instanceof jl)throw TypeError("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?ul(arguments[0]):void 0,t=kl(e),n=function(e){this===Ml&&n.call(Fl,e),nl(this,Il)&&nl(this[Il],t)&&(this[Il][t]=!1),Yl(this,t,ll(1,e))};return Zu&&$l&&Yl(Ml,t,{configurable:!0,set:n}),Ql(t,e)}).prototype,"toString",(function(){return Ll(this).tag})),wl(jl,"withoutSetter",(function(e){return Ql(kl(e),e)})),bl.f=Zl,yl.f=Jl,vl.f=eh,fl.f=ml.f=th,gl.f=nh,xl.f=function(e){return Ql(Dl(e),e)},Zu&&(Gl(jl.prototype,"description",{configurable:!0,get:function(){return Ll(this).description}}),wl(Ml,"propertyIsEnumerable",Zl,{unsafe:!0}))),Qu({global:!0,wrap:!0,forced:!el,sham:!el},{Symbol:jl}),Ol(pl(Wl),(function(e){Sl(e)})),Qu({target:"Symbol",stat:!0,forced:!el},{for:function(e){var t=ul(e);if(nl(Kl,t))return Kl[t];var n=jl(t);return Kl[t]=n,zl[n]=t,n},keyFor:function(e){if(!al(e))throw TypeError(e+" is not a symbol");if(nl(zl,e))return zl[e]},useSetter:function(){$l=!0},useSimple:function(){$l=!1}}),Qu({target:"Object",stat:!0,forced:!el,sham:!Zu},{create:function(e,t){return void 0===t?hl(e):Xl(hl(e),t)},defineProperty:Jl,defineProperties:Xl,getOwnPropertyDescriptor:eh}),Qu({target:"Object",stat:!0,forced:!el},{getOwnPropertyNames:th,getOwnPropertySymbols:nh}),Qu({target:"Object",stat:!0,forced:tl((function(){gl.f(1)}))},{getOwnPropertySymbols:function(e){return gl.f(sl(e))}}),Ul)&&Qu({target:"JSON",stat:!0,forced:!el||tl((function(){var e=jl();return"[null]"!=Ul([e])||"{}"!=Ul({a:e})||"{}"!=Ul(Object(e))}))},{stringify:function(e,t,n){for(var r,i=[e],a=1;arguments.length>a;)i.push(arguments[a++]);if(r=t,(il(t)||void 0!==e)&&!al(e))return rl(t)||(t=function(e,t){if("function"==typeof r&&(t=r.call(this,e,t)),!al(t))return t}),i[1]=t,Ul.apply(null,i)}});jl.prototype[Cl]||_l(jl.prototype,Cl,jl.prototype.valueOf),Tl(jl,"Symbol"),El[Il]=!0;var rh=sr,ih=K,ah=q,oh=je,sh=se,dh=vt.f,ch=zn,uh=ah.Symbol;if(ih&&"function"==typeof uh&&(!("description"in uh.prototype)||void 0!==uh().description)){var lh={},hh=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),t=this instanceof hh?new uh(e):void 0===e?uh():uh(e);return""===e&&(lh[t]=!0),t};ch(hh,uh);var ph=hh.prototype=uh.prototype;ph.constructor=hh;var fh=ph.toString,mh="Symbol(test)"==String(uh("test")),gh=/^Symbol\((.*)\)[^)]+$/;dh(ph,"description",{configurable:!0,get:function(){var e=sh(this)?this.valueOf():this,t=fh.call(e);if(oh(lh,e))return"";var n=mh?t.slice(7,-1):t.replace(gh,"$1");return""===n?void 0:n}}),rh({global:!0,forced:!0},{Symbol:hh})}var vh=Bs,yh=vt,bh=Ye("unscopables"),_h=Array.prototype;null==_h[bh]&&yh.f(_h,bh,{configurable:!0,value:vh(null)});var wh=function(e){_h[bh][e]=!0},Ah=Sn.includes,Eh=wh;sr({target:"Array",proto:!0},{includes:function(e){return Ah(this,e,arguments.length>1?arguments[1]:void 0)}}),Eh("includes");var kh=Hc,Dh=re,xh=gs;sr({target:"String",proto:!0,forced:!Yc("includes")},{includes:function(e){return!!~xh(Dh(this)).indexOf(xh(kh(e)),arguments.length>1?arguments[1]:void 0)}});var Sh=sr,Th=Or.find,Rh=wh,Oh=!0;"find"in[]&&Array(1).find((function(){Oh=!1})),Sh({target:"Array",proto:!0,forced:Oh},{find:function(e){return Th(this,e,arguments.length>1?arguments[1]:void 0)}}),Rh("find");var Ih="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==Ih&&Ih,Ch="URLSearchParams"in Ih,Ph="Symbol"in Ih&&"iterator"in Symbol,Lh="FileReader"in Ih&&"Blob"in Ih&&function(){try{return new Blob,!0}catch(e){return!1}}(),Mh="FormData"in Ih,jh="ArrayBuffer"in Ih;if(jh)var Uh=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],Bh=ArrayBuffer.isView||function(e){return e&&Uh.indexOf(Object.prototype.toString.call(e))>-1};function Gh(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||""===e)throw new TypeError('Invalid character in header field name: "'+e+'"');return e.toLowerCase()}function Nh(e){return"string"!=typeof e&&(e=String(e)),e}function qh(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return Ph&&(t[Symbol.iterator]=function(){return t}),t}function Vh(e){this.map={},e instanceof Vh?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function Fh(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function Kh(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function zh(e){var t=new FileReader,n=Kh(t);return t.readAsArrayBuffer(e),n}function Wh(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function Hh(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:Lh&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:Mh&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:Ch&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():jh&&Lh&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=Wh(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):jh&&(ArrayBuffer.prototype.isPrototypeOf(e)||Bh(e))?this._bodyArrayBuffer=Wh(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):Ch&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},Lh&&(this.blob=function(){var e=Fh(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){if(this._bodyArrayBuffer){var e=Fh(this);return e||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}return this.blob().then(zh)}),this.text=function(){var e=Fh(this);if(e)return e;if(this._bodyBlob)return function(e){var t=new FileReader,n=Kh(t);return t.readAsText(e),n}(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r<t.length;r++)n[r]=String.fromCharCode(t[r]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},Mh&&(this.formData=function(){return this.text().then(Qh)}),this.json=function(){return this.text().then(JSON.parse)},this}Vh.prototype.append=function(e,t){e=Gh(e),t=Nh(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},Vh.prototype.delete=function(e){delete this.map[Gh(e)]},Vh.prototype.get=function(e){return e=Gh(e),this.has(e)?this.map[e]:null},Vh.prototype.has=function(e){return this.map.hasOwnProperty(Gh(e))},Vh.prototype.set=function(e,t){this.map[Gh(e)]=Nh(t)},Vh.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},Vh.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),qh(e)},Vh.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),qh(e)},Vh.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),qh(e)},Ph&&(Vh.prototype[Symbol.iterator]=Vh.prototype.entries);var $h=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function Yh(e,t){if(!(this instanceof Yh))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var n=(t=t||{}).body;if(e instanceof Yh){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new Vh(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,n||null==e._bodyInit||(n=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new Vh(t.headers)),this.method=function(e){var t=e.toUpperCase();return $h.indexOf(t)>-1?t:e}(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(n),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==t.cache&&"no-cache"!==t.cache)){var r=/([?&])_=[^&]*/;if(r.test(this.url))this.url=this.url.replace(r,"$1_="+(new Date).getTime());else{this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}}function Qh(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(i))}})),t}function Jh(e,t){if(!(this instanceof Jh))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText=void 0===t.statusText?"":""+t.statusText,this.headers=new Vh(t.headers),this.url=t.url||"",this._initBody(e)}Yh.prototype.clone=function(){return new Yh(this,{body:this._bodyInit})},Hh.call(Yh.prototype),Hh.call(Jh.prototype),Jh.prototype.clone=function(){return new Jh(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new Vh(this.headers),url:this.url})},Jh.error=function(){var e=new Jh(null,{status:0,statusText:""});return e.type="error",e};var Xh=[301,302,303,307,308];Jh.redirect=function(e,t){if(-1===Xh.indexOf(t))throw new RangeError("Invalid status code");return new Jh(null,{status:t,headers:{location:e}})};var Zh=Ih.DOMException;try{new Zh}catch(e){(Zh=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack}).prototype=Object.create(Error.prototype),Zh.prototype.constructor=Zh}function ep(e,t){return new Promise((function(n,r){var i=new Yh(e,t);if(i.signal&&i.signal.aborted)return r(new Zh("Aborted","AbortError"));var a=new XMLHttpRequest;function o(){a.abort()}a.onload=function(){var e,t,r={status:a.status,statusText:a.statusText,headers:(e=a.getAllResponseHeaders()||"",t=new Vh,e.replace(/\r?\n[\t ]+/g," ").split("\r").map((function(e){return 0===e.indexOf("\n")?e.substr(1,e.length):e})).forEach((function(e){var n=e.split(":"),r=n.shift().trim();if(r){var i=n.join(":").trim();t.append(r,i)}})),t)};r.url="responseURL"in a?a.responseURL:r.headers.get("X-Request-URL");var i="response"in a?a.response:a.responseText;setTimeout((function(){n(new Jh(i,r))}),0)},a.onerror=function(){setTimeout((function(){r(new TypeError("Network request failed"))}),0)},a.ontimeout=function(){setTimeout((function(){r(new TypeError("Network request failed"))}),0)},a.onabort=function(){setTimeout((function(){r(new Zh("Aborted","AbortError"))}),0)},a.open(i.method,function(e){try{return""===e&&Ih.location.href?Ih.location.href:e}catch(t){return e}}(i.url),!0),"include"===i.credentials?a.withCredentials=!0:"omit"===i.credentials&&(a.withCredentials=!1),"responseType"in a&&(Lh?a.responseType="blob":jh&&i.headers.get("Content-Type")&&-1!==i.headers.get("Content-Type").indexOf("application/octet-stream")&&(a.responseType="arraybuffer")),!t||"object"!=typeof t.headers||t.headers instanceof Vh?i.headers.forEach((function(e,t){a.setRequestHeader(t,e)})):Object.getOwnPropertyNames(t.headers).forEach((function(e){a.setRequestHeader(e,Nh(t.headers[e]))})),i.signal&&(i.signal.addEventListener("abort",o),a.onreadystatechange=function(){4===a.readyState&&i.signal.removeEventListener("abort",o)}),a.send(void 0===i._bodyInit?null:i._bodyInit)}))}ep.polyfill=!0,Ih.fetch||(Ih.fetch=ep,Ih.Headers=Vh,Ih.Request=Yh,Ih.Response=Jh);var tp="1.16.0",np=cd,rp=Kd,ip=bt,ap=re,op=Zi,sp=vu,dp=yn,cp=gs,up=pd,lp=td,hp=F,pp=bs.UNSUPPORTED_Y,fp=[].push,mp=Math.min;np("split",(function(e,t,n){var r;return r="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(e,n){var r=cp(ap(this)),i=void 0===n?4294967295:n>>>0;if(0===i)return[];if(void 0===e)return[r];if(!rp(e))return t.call(r,e,i);for(var a,o,s,d=[],c=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),u=0,l=new RegExp(e.source,c+"g");(a=lp.call(l,r))&&!((o=l.lastIndex)>u&&(d.push(r.slice(u,a.index)),a.length>1&&a.index<r.length&&fp.apply(d,a.slice(1)),s=a[0].length,u=o,d.length>=i));)l.lastIndex===a.index&&l.lastIndex++;return u===r.length?!s&&l.test("")||d.push(""):d.push(r.slice(u)),d.length>i?d.slice(0,i):d}:"0".split(void 0,0).length?function(e,n){return void 0===e&&0===n?[]:t.call(this,e,n)}:t,[function(t,n){var i=ap(this),a=null==t?void 0:t[e];return void 0!==a?a.call(t,i,n):r.call(cp(i),t,n)},function(e,i){var a=ip(this),o=cp(e),s=n(r,a,o,i,r!==t);if(s.done)return s.value;var d=op(a,RegExp),c=a.unicode,u=(a.ignoreCase?"i":"")+(a.multiline?"m":"")+(a.unicode?"u":"")+(pp?"g":"y"),l=new d(pp?"^(?:"+a.source+")":a,u),h=void 0===i?4294967295:i>>>0;if(0===h)return[];if(0===o.length)return null===up(l,o)?[o]:[];for(var p=0,f=0,m=[];f<o.length;){l.lastIndex=pp?0:f;var g,v=up(l,pp?o.slice(f):o);if(null===v||(g=mp(dp(l.lastIndex+(pp?f:0)),o.length))===p)f=sp(o,f,c);else{if(m.push(o.slice(p,f)),m.length===h)return m;for(var y=1;y<=v.length-1;y++)if(m.push(v[y]),m.length===h)return m;f=p=g}}return m.push(o.slice(p)),m}]}),!!hp((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2!==n.length||"a"!==n[0]||"b"!==n[1]})),pp);var gp=bt,vp=yn,yp=gs,bp=re,_p=vu,wp=pd;cd("match",(function(e,t,n){return[function(t){var n=bp(this),r=null==t?void 0:t[e];return void 0!==r?r.call(t,n):new RegExp(t)[e](yp(n))},function(e){var r=gp(this),i=yp(e),a=n(t,r,i);if(a.done)return a.value;if(!r.global)return wp(r,i);var o=r.unicode;r.lastIndex=0;for(var s,d=[],c=0;null!==(s=wp(r,i));){var u=yp(s[0]);d[c]=u,""===u&&(r.lastIndex=_p(i,vp(r.lastIndex),o)),c++}return 0===c?null:d}]}));var Ap=function(){function e(t){i(this,e),this.gameData=t}return a(e,[{key:"_getFakeCustomParams",value:function(){var e={_vid:["bla_bla1","bla_bla2","bla_bla3"],_1ld:["1ld_1","1ld_2","1ld_3","1ld_4"],_1lp:["1lp_1","1lp_2"]},t={};for(var n in e){var r=e[n];t[n]=r[Math.floor(Math.random()*r.length)]}return t}},{key:"checkCustomParams",value:function(){try{var e={};if(this.gameData.diagnostic&&this.gameData.diagnostic.cp&&this.gameData.diagnostic.cp.enabled){var t=new C(location.href,!0);for(var n in t.query)e[n]=t.query[n];Object.keys(e).length;return e}}catch(e){console.log("_checkCustomParams.Error",e)}}}]),e}(),Ep=function(){function t(e,n){i(this,t),this.adContainer=e,this.onResume=n}return a(t,[{key:"show",value:function(){this.adResumeButton.style.display="block",this.adResumeButtonOverlay.style.display="block"}},{key:"hide",value:function(){this.adResumeButton.style.display="none",this.adResumeButtonOverlay.style.display="none"}},{key:"add",value:function(){var t=this;try{var n=document.createElement("div");this.adResumeButton=n,n.id="gd__resume__button",n.setAttribute("title","Resume"),this.addStyles(),n.classList.add("gd__resume__button"),n.addEventListener("click",function(){e(this,t),this.onResume()}.bind(this)),this.adContainer.appendChild(n);var r=document.createElement("div");this.adResumeButtonOverlay=r,r.id="gd__resume__button__overlay",r.classList.add("gd__resume__button__overlay"),this.adContainer.appendChild(r)}catch(e){console.log("Resume button add error",e)}}},{key:"addStyles",value:function(){var e=document.body||document.getElementsByTagName("body")[0];this.addStylesheet("gd__resume__button__style",e,'\n .gd__resume__button{\n background-image: url("https://img.gamedistribution.com/play-black.svg");\n background-color:white; \n width: 120px;\n height: 120px;\n position: absolute;\n display: none;\n z-index: 2000;\n cursor: pointer;\n top: calc(50% - 60px);\n left: calc(50% - 60px);\n margin: 0;\n border-radius: 50%;\n border: 2px solid white;\n animation: play-button 1s ease-in-out infinite alternate;\n -webkit-animation: play-button 1s ease-in-out infinite alternate;\n }\n \n .gd__resume__button__overlay {\n position: fixed;\n display: none;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: rgba(0,0,0,0.5);\n z-index: 1999;\n cursor: pointer;\n }\n @keyframes play-button {\n 0% {\n transform: scale(1.0);\n -webkit-transform: scale(1.0);\n }\n 100% {\n transform: scale(1.1);\n -webkit-transform: scale(1.1);\n }\n }\n .gd__resume__button:hover{\n filter: invert(100%) sepia(51%) saturate(0%) hue-rotate(346deg) brightness(104%) contrast(100%); \n }\n ')}},{key:"addStylesheet",value:function(e,t,n){if(!document.getElementById(e)){var r=document.createElement("style");r.type="text/css",r.id=e,r.styleSheet?r.styleSheet.cssText=n:r.appendChild(document.createTextNode(n)),t.appendChild(r)}}}]),t}(),kp=function(e){if(!e)return!1;var t=Dp.call(e);return"[object Function]"===t||"function"==typeof e&&"[object RegExp]"!==t||"undefined"!=typeof window&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)},Dp=Object.prototype.toString;function xp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Sp(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?xp(Object(r),!0).forEach((function(t){n(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xp(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Tp(e){return null!=e&&e.error_url?"<vmap:VASTAdData>".concat(function(e){return e.promo_url?'<VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper fallbackOnNoAd="true">\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="0" />\n </Extensions>\n </Wrapper>\n </Ad>\n <Ad id="promo">\n <Wrapper>\n <AdSystem>Rainbow</AdSystem>\n <Impression><![CDATA[').concat(e.promo_imp_green_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.promo_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="1" />\n </Extensions>\n </Wrapper>\n </Ad>\n </VAST>').trim():'<VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper>\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,"]]></VASTAdTagURI>\n </Wrapper>\n </Ad>\n </VAST>").trim()}(e),"</vmap:VASTAdData>").trim():'<vmap:AdTagURI templateType="vast3"><![CDATA['.concat(null==e?void 0:e.adtag_url,"]]></vmap:AdTagURI>").trim()}var Rp=["bidFloor","isDfpBidding"];function Op(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ip(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Op(Object(r),!0).forEach((function(t){n(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Op(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Cp=null,Pp=function(){function t(n,r,a){var o=this;if(i(this,t),Cp)return Cp;Cp=this;var s={debug:!1,width:640,height:360,locale:"en"};this.options=r?m(s,r):s,this.prefix="gdsdk__",this.adsLoader=null,this.adsManager=null,this.adDisplayContainer=null,this.eventBus=new g,this.safetyTimer=null,this.containerTransitionSpeed=0,this.adCounter={},this.adPrerollCount=0,this.adMidrollCount=0,this.adRewardedCount=0,this.preloadedAdType=null,this.requestRunning=!1,this.parentDomain=a.parentDomain,this.topDomain=a.topDomain,this.parentURL=a.parentURL,this.adDisplayContainerInitialized=!1,this.IMASampleTags=v(),this.atom_display,this.userAllowedPersonalizedAds=document.location.search.indexOf("gdpr-targeting=0")>=0||document.cookie.indexOf("ogdpr_advertisement=0")>=0?"0":"1",this.parentDomain.includes("girlsgogames")&&(this.userAllowedPersonalizedAds=!1),this.thirdPartyContainer=""!==n?document.getElementById(n):null,this.options.width="number"==typeof this.options.width?this.options.width:"100%"===this.options.width?640:this.options.width.replace(/[^0-9]/g,""),this.options.height="number"==typeof this.options.height?this.options.height:"100%"===this.options.height?360:this.options.height.replace(/[^0-9]/g,"");var d=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,c=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;this.options.width=this.thirdPartyContainer?this.thirdPartyContainer.offsetWidth:d,this.options.height=this.thirdPartyContainer?this.thirdPartyContainer.offsetHeight:c,this.gameId="0",this.category="",this.tags=[],this.eventCategory="AD",this.eventBus.subscribe("LOADED",function(){e(this,o),this._clearSafetyTimer("LOADED"),this._startSafetyTimer(8e3,"LOADED")}.bind(this),"ima"),this.eventBus.subscribe("STARTED",function(){e(this,o),this._clearSafetyTimer("STARTED")}.bind(this),"ima")}var y,b,_,w,A,E,k,D,x,S,T,R;return a(t,[{key:"start",value:(R=r(o.mark((function t(){var n,r,i,a,s=this;return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,n=this._getPrebidScripts(),r=n[0],window.HB_OPTIONSgd={gameId:this.gameId},t.next=6,d(r,"gdsdk_prebid",{alternates:n,error_prefix:"Blocked:",exists:function(){return e(this,s),window.idhb}.bind(this)});case 6:return window.idhb=window.idhb||{},window.idhb.que=window.idhb.que||[],window.idhb.que.push(function(){var t=this;e(this,s),window.idhb.addEventListener("slotRenderEnded",function(n){var r=this;e(this,t);try{var i,a=n.slotId.split("@");a=1===a.length?a[0]:a[1],n.isEmpty?(null!==(i=this.atom_display)&&void 0!==i&&i.error_url&&(fetch(this.atom_display.error_url).catch(function(t){e(this,r)}.bind(this)),delete this.atom_display),this.eventBus.broadcast("DISPLAYAD_ERROR",{message:a,status:"warning"})):(this.atom_display.impression_url&&(fetch(this.atom_display.impression_url).catch(function(t){e(this,r)}.bind(this)),delete this.atom_display),this.eventBus.broadcast("DISPLAYAD_IMPRESSION",{message:a,status:"success"}))}catch(e){}}.bind(this))}.bind(this)),i=["https://imasdk.googleapis.com/js/sdkloader/ima3_debug.js","https://imasdk.googleapis.com/js/sdkloader/ima3.js","http://imasdk.googleapis.com/js/sdkloader/ima3_debug.js","http://imasdk.googleapis.com/js/sdkloader/ima3.js"],a=this.options.debug?i[0]:i[1],t.next=13,d(a,"gdsdk_ima",{alternates:i,error_prefix:"Blocked:",exists:function(){return e(this,s),window.google&&window.google.ima}.bind(this)});case 13:this._createPlayer(),this._setUpIMA(),t.next=20;break;case 17:throw t.prev=17,t.t0=t.catch(0),new Error(t.t0);case 20:case"end":return t.stop()}}),t,this,[[0,17]])}))),function(){return R.apply(this,arguments)})},{key:"_getAdVast",value:function(t,i){var a=this;return new Promise(function(){var s=r(o.mark((function r(s){var d,u,l,h,p,f,m,g,v,y,b=this;return o.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!(c.available&&c.getBoolean("gd_debug_ex")&&c.getBoolean("gd_tag"))){r.next=6;break}return d=a.IMASampleTags[t],u=Math.floor(Math.random()*d.length),l=d[u],s({url:l}),r.abrupt("return");case 6:if(void 0!==window.idhb.requestAds){r.next=8;break}throw new Error("Prebid.js wrapper script hit an error or didn't exist!");case 8:return r.prev=8,r.next=11,a._getTunnlKeys(t);case 11:if(h=r.sent,p=h.data,f=p.nsid?p.nsid:"TNL_T-17102571517",m=p.tid?p.tid:"TNL_NS-18101700058",g="".concat(f,"/").concat(m),delete p.nsid,delete p.tid,U(p,{tnl_system:"1",tnl_content_category:a.category.toLowerCase()}),a.eventBus.broadcast("AD_REQUEST",{message:p.tnl_ad_pos}),v=a.options,"preroll"===p.tnl_ad_pos&&L(v.preroll)?v=v.preroll:"midroll"===p.tnl_ad_pos&&L(v.midroll)?v=v.midroll:"rewarded"===p.tnl_ad_pos&&L(v.rewarded)&&(v=v.rewarded),!(i&&i.retry_on_success&&L(v.retry_on_success)&&L(v.retry_on_success.vast))){r.next=26;break}return r.abrupt("return",s(a._createCustomAdVastUrl(v.retry_on_success.vast,{tnl_keys:p})));case 26:if(!(i&&i.retry_on_failure&&a.options.retry_on_failure&&L(v.retry_on_failure.vast))){r.next=30;break}return r.abrupt("return",s(a._createCustomAdVastUrl(v.retry_on_failure.vast,{tnl_keys:p})));case 30:if(!L(v.vast)){r.next=32;break}return r.abrupt("return",s(a._createCustomAdVastUrl(v.vast,{tnl_keys:p})));case 32:return r.next=34,a._create_dp_context(p.tnl_ad_pos);case 34:y=r.sent,window.idhb.que.push(function(){var t=this;e(this,b),window.idhb.setRefererUrl(encodeURIComponent(a.parentURL)),window.idhb.allowPersonalizedAds(!!parseInt(a.userAllowedPersonalizedAds));var r="rewarded"===p.tnl_ad_pos?"rewardedVideo":"gdbanner"===p.tnl_ad_pos?"gd__banner":"midroll"===p.tnl_ad_pos?"midroll":"video1";window.idhb.setDfpAdUnitCodeForAdSlot(r,g),window.idhb.setAdserverTargetingForAdSlot(r,p),window.idhb.requestAds({slots:n({},r,{bidFloor:null!=y&&y.floor_price?y.floor_price:void 0}),callback:function(n,r){var i=this;e(this,t),y&&!r.bidFloorApplied&&fetch(y.skip_url).catch(function(t){e(this,i)}.bind(this)),s({tnl_keys:p,url:n,dp:y,hl:r})}.bind(this)})}.bind(this)),r.next=41;break;case 38:throw r.prev=38,r.t0=r.catch(8),new Error(r.t0);case 41:case"end":return r.stop()}}),r,this,[[8,38]])})));return function(e){return s.apply(this,arguments)}}())}},{key:"nextAdPosition",value:function(e){if(e===u.Rewarded)return this.adRewardedCount++,"rewarded";if(e===u.Interstitial){var t=!1===this.gameData.preroll||!0===this.noPreroll||1===this.adPrerollCount;return t?this.adMidrollCount++:this.adPrerollCount++,t||this.adMidrollCount>0?"midroll":"preroll"}return"midroll"}},{key:"getAdPosition",value:function(e){return e===u.Rewarded?"rewarded":e===u.Interstitial?!1===this.gameData.preroll||!0===this.noPreroll||1===this.adPrerollCount||this.adMidrollCount>0?"midroll":"preroll":"midroll"}},{key:"_getTunnlKeys",value:function(t){var n=this;return new Promise(function(r){var i=this;e(this,n);var a="";a=!navigator.userAgent.match(/Crosswalk/i)&&void 0===window.cordova||"m.hopy.com"!==this.parentDomain?"page_url=".concat(encodeURIComponent(this.parentURL)):"bundle=com.hopy.frivgames";var o=this.nextAdPosition(t),s=l("ch",window.location.href),d=l("ch_date",window.location.href),c=s?"&ch=".concat(s):"",u=d?"&ch_date=".concat(d):"",p="https://pub.headerlift.com/opphb?".concat(a,"&player_width=").concat(this.options.width,"&player_height=").concat(this.options.height,"&ad_type=video_image&game_id=").concat(this.gameId,"&ad_position=").concat(o).concat(c).concat(u,"&correlator=").concat(Date.now()),f=new Request(p,{method:"GET"});fetch(f).then(function(t){e(this,i);var n=t.headers.get("content-type");if(n&&-1!==n.indexOf("application/json"))return t.json();throw new TypeError("Oops, we didn't get JSON!")}.bind(this)).then(function(t){e(this,i),h(t)&&(t=this._createTunnlReportingFallbackKeys(o),this.eventBus.broadcast("AD_REQUEST_KEYS_EMPTY",{message:"Tunnl returned empty response.",details:p})),r({data:t,url:p})}.bind(this)).catch(function(t){e(this,i);var n=this._createTunnlReportingFallbackKeys(o);this.eventBus.broadcast("AD_REQUEST_KEYS_FALLBACK",{message:t.message,details:p}),r({data:n,url:p})}.bind(this))}.bind(this))}},{key:"_createTunnlReportingFallbackKeys",value:function(e){return{tid:"TNL_T-17102571517",nsid:"TNL_NS-18101700058",tnl_tid:"T-17102571517",tnl_nsid:"NS-18101700058",tnl_pw:this.options.width,tnl_ph:this.options.height,tnl_pt:"22",tnl_pid:"P-17101800031",tnl_paid:"17",tnl_ad_type:"video_image",tnl_asset_id:this.gameId.toString(),tnl_ad_pos:e,tnl_skippable:"1",tnl_cp1:"",tnl_cp2:"",tnl_cp3:"",tnl_cp4:"",tnl_cp5:"",tnl_cp6:"",tnl_campaign:"2",tnl_gdpr:"0",tnl_gdpr_consent:"1",consent_string:"BOWJjG9OWJjG9CLAAAENBx-AAAAiDAAA",tnl_content_category:this.category.toLowerCase()}}},{key:"_requestAd",value:function(t,n){var r=this;return n=n||{},new Promise(function(i){if(e(this,r),"undefined"==typeof google)throw new Error("Unable to load ad, google IMA SDK not defined.");try{var a,o=null==t||null===(a=t.tnl_keys)||void 0===a?void 0:a.tnl_ad_pos;this.adSuccess=!1;var s=new google.ima.AdsRequest,d=this._transformVast(t,n),c=Ip(Ip({},n),{},{adTag:d,tnl_ad_pos:o});this.adCounter[o]=this.adCounter[o]||0,this.adCounter[o]++;var u=t.dp,l=t.hl;if(u&&(u.adtag_url=d.url,this._extend_dp_with_adsense(u,l,null==t?void 0:t.tnl_keys)),this._isVMAP(o)){var h=function(e){var t=e.position||"midroll",n=e.dp_1,r=e.dp_2,i=Date.now(),a=new C(e.adtag_url_1,!0);a.query=Sp(Sp({},a.query),{},{ad_rule:0,vpos:t,pod:1,ppos:1,lip:!0,correlator:i,output:"xml_vast3"});var o=a.toString(),s=new C(e.adtag_url_2,!0);s.query=Sp(Sp({},s.query),{},{ad_rule:0,vpos:t,pod:1,correlator:++i,output:"xml_vast3"});var d=s.toString(),c=Date.now();return'<?xml version="1.0" encoding="UTF-8"?>\n<vmap:VMAP xmlns:vmap="http://www.iab.net/videosuite/vmap" version="1.0">\n<vmap:AdBreak timeOffset="start" breakType="linear,nonlinear" breakId="break-1">\n <vmap:AdSource id="'.concat(c++,'" allowMultipleAds="false" followRedirects="true">\n ').concat(Tp({id:c++,adtag_url:o,error_url:null==n?void 0:n.error_url,impression_url:null==n?void 0:n.impression_url}),'\n </vmap:AdSource>\n</vmap:AdBreak>\n<vmap:AdBreak timeOffset="start" breakType="linear,nonlinear" breakId="break-2">\n <vmap:AdSource id="').concat(c++,'" allowMultipleAds="false" followRedirects="true">\n ').concat(Tp({id:c++,adtag_url:d,error_url:null==r?void 0:r.error_url,impression_url:null==r?void 0:r.impression_url}),'\n </vmap:AdSource>\n <vmap:Extensions>\n <vmap:Extension type="bumper" suppress_bumper="true"></vmap:Extension>\n </vmap:Extensions>\n</vmap:AdBreak>\n</vmap:VMAP>').trim()}(this._get_vmap_context({dp:u,adtag:d,position:"preroll"===c.tnl_ad_pos?"preroll":"midroll",config:this._get_vmap_config(o)}));s.adsResponse=h}else if(u&&l.bidFloorApplied){var p=function(e){return e.promo_url?e.fallback_url?'<?xml version="1.0" encoding="utf-8"?>\n <VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper fallbackOnNoAd="true">\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="0" />\n </Extensions>\n </Wrapper>\n </Ad>\n <Ad id="fallback">\n <Wrapper>\n <AdSystem>ADS</AdSystem>\n <Impression><![CDATA[').concat(e.fallback_imp_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.fallback_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="1" />\n </Extensions>\n </Wrapper>\n </Ad>\n <Ad id="promo">\n <Wrapper>\n <AdSystem>Rainbow</AdSystem>\n <Impression><![CDATA[').concat(e.promo_imp_green_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.promo_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="2" />\n </Extensions>\n </Wrapper>\n </Ad>\n </VAST>').trim():'<?xml version="1.0" encoding="utf-8"?>\n <VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper fallbackOnNoAd="true">\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="0" />\n </Extensions>\n </Wrapper>\n </Ad>\n <Ad id="promo">\n <Wrapper>\n <AdSystem>Rainbow</AdSystem>\n <Impression><![CDATA[').concat(e.promo_imp_green_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.promo_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="1" />\n </Extensions>\n </Wrapper>\n </Ad>\n </VAST>').trim():e.fallback_url?'<?xml version="1.0" encoding="utf-8"?>\n <VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper fallbackOnNoAd="true">\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="0" />\n </Extensions>\n </Wrapper>\n </Ad>\n <Ad id="fallback">\n <Wrapper>\n <AdSystem>ADS</AdSystem>\n <Impression><![CDATA[').concat(e.fallback_imp_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.fallback_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="1" />\n </Extensions>\n </Wrapper>\n </Ad>\n </VAST>').trim():'<?xml version="1.0" encoding="utf-8"?>\n <VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper>\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,"]]></VASTAdTagURI>\n </Wrapper>\n </Ad>\n </VAST>").trim()}(u);s.adsResponse=p}else if(u&&u.fallback_url){var f=function(e){return'<?xml version="1.0" encoding="utf-8"?>\n <VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper fallbackOnNoAd="true">\n <AdSystem>GDFP</AdSystem>\n <Impression><![CDATA[').concat(e.fallback_imp_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="0" />\n </Extensions>\n </Wrapper>\n </Ad>\n <Ad id="fallback">\n <Wrapper>\n <AdSystem>ADS</AdSystem>\n <Impression><![CDATA[').concat(e.fallback_imp_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.fallback_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="1" />\n </Extensions>\n </Wrapper>\n </Ad>\n </VAST>').trim()}(u);s.adsResponse=f}else s.adTagUrl=d.url;s.linearAdSlotWidth=this.options.width,s.linearAdSlotHeight=this.options.height,s.nonLinearAdSlotWidth=this.options.width,s.nonLinearAdSlotHeight=this.options.height,s.forceNonLinearFullSlot=!0,this.options.vast_load_timeout&&(s.vastLoadTimeout=this.options.vast_load_timeout),s.setAdWillAutoPlay(n.autoplayAllowed),s.setAdWillPlayMuted(n.autoplayRequiresMute),this.adsLoader.requestAds(s,c);try{this.eventBus.broadcast("AD_SDK_REQUEST",{message:c})}catch(e){}i(s)}catch(e){throw new Error(e)}}.bind(this))}},{key:"cancel",value:function(){if(!1!==this.requestRunning){this.requestRunning=!1,this._resetAdsLoader(),this._hide("cancel");var e="AD_SDK_CANCELED";this.eventBus.broadcast(e,{name:e,message:"Advertisement has been canceled.",status:"warning",analytics:{category:this.eventCategory,action:e,label:this.gameId}})}}},{key:"_checkAutoPlay",value:(T=r(o.mark((function t(){var n=this;return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise(function(t,r){var i=this;e(this,n);var a=navigator.userAgent.toLowerCase();a.indexOf("safari")>-1&&a.indexOf("chrome")<0?t({autoplayAllowed:!0,autoplayRequiresMute:!0}):P.video({inline:!0,muted:!1}).then(function(n){e(this,i);var r=n.result;n.error,t(!0===r?{autoplayAllowed:!0,autoplayRequiresMute:!1}:{autoplayAllowed:!0,autoplayRequiresMute:!0})}.bind(this))}.bind(this)));case 1:case"end":return t.stop()}}),t,this)}))),function(){return T.apply(this,arguments)})},{key:"_initDisplayContainerWithAutoPlay",value:(S=r(o.mark((function e(){var t;return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._checkAutoPlay(!1);case 2:return t=e.sent,this._autoplay=t,this.video_ad_player.autoplay=t.autoplayAllowed,this.video_ad_player.volume=t.autoplayRequiresMute?0:1,this.video_ad_player.muted=!!t.autoplayRequiresMute,t.adDisplayContainerInitialized||(this.adDisplayContainer.initialize(),this.adDisplayContainerInitialized=!0),e.abrupt("return",t);case 9:case"end":return e.stop()}}),e,this)}))),function(){return S.apply(this,arguments)})},{key:"startAd",value:(x=r(o.mark((function e(t,n){return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t!==u.Interstitial){e.next=4;break}return e.abrupt("return",this._startInterstitialAd(n));case 4:if(t!==u.Rewarded){e.next=8;break}return e.abrupt("return",this._startRewardedAd(n));case 8:throw new Error("Unsupported ad type");case 9:case"end":return e.stop()}}),e,this)}))),function(e,t){return x.apply(this,arguments)})},{key:"preloadAd",value:(D=r(o.mark((function e(t){return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t!==u.Interstitial){e.next=4;break}return e.abrupt("return",this._preloadInterstitialAd());case 4:if(t!==u.Rewarded){e.next=8;break}return e.abrupt("return",this._preloadRewardedAd());case 8:throw new Error("Unsupported ad type");case 9:case"end":return e.stop()}}),e,this)}))),function(e){return D.apply(this,arguments)})},{key:"addAdResume",value:function(){var t=this,n=function(){e(this,t),this.adsManager.resume()}.bind(this);try{this.adResume=new Ep(this.adContainer,n),this.adResume.add()}catch(e){console.log("error on adding adResume",e)}}},{key:"loadDisplayAd",value:(k=r(o.mark((function t(n){var i=this;return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise(function(){var t=r(o.mark((function t(r,a){var s,d,c,u,l,h,f=this;return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,(s=n?n.containerId:null)||a("Container id is not specified"),d=document.getElementById(s),document.getElementById(s)||a("No container is found with this id - ".concat(s)),void 0===window.idhb.requestAds&&a("Prebid.js wrapper script hit an error or didn't exist!"),c=n.slotId?n.slotId:"gd__banner@".concat(s),document.getElementById(c)||(u="\n .gd__banner{\n z-index: ".concat(p.DisplayContainer.zIndex,";\n height: 100%;\n display: flex !important;\n align-items: center;\n justify-content: center;\n }"),document.getElementById("gd__banner__style")||((l=document.createElement("style")).type="text/css",l.id="gd__banner__style",l.styleSheet?l.styleSheet.cssText=u:l.appendChild(document.createTextNode(u)),d.appendChild(l)),(h=document.createElement("div")).id=c,h.classList.add("gd__banner"),d.appendChild(h)),t.next=10,i._create_dp_display_context();case 10:i.atom_display=t.sent,window.idhb.que.push(function(){var t,n,r=this;e(this,f),window.idhb.setRefererUrl(encodeURIComponent(i.parentURL)),window.idhb.allowPersonalizedAds(!!parseInt(i.userAllowedPersonalizedAds)),window.idhb.setDefaultGdprConsentString("BOWJjG9OWJjG9CLAAAENBx-AAAAiDAAA"),null!==(t=i.atom_display)&&void 0!==t&&t.params&&window.idhb.setAdserverTargeting(null===(n=i.atom_display)||void 0===n?void 0:n.params);var a={};a[c]={maxSize:[d.offsetWidth,d.offsetHeight]},window.idhb.requestAds({slots:a,callback:function(t){e(this,r)}.bind(this)})}.bind(this)),r(),t.next=18;break;case 15:t.prev=15,t.t0=t.catch(0),a(t.t0.message||t.t0);case 18:case"end":return t.stop()}}),t,this,[[0,15]])})));return function(e,n){return t.apply(this,arguments)}}()));case 1:case"end":return t.stop()}}),t)}))),function(e){return k.apply(this,arguments)})},{key:"_startInterstitialAd",value:(E=r(o.mark((function e(t){var n;return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!this.requestRunning){e.next=4;break}return this.eventBus.broadcast("AD_IS_ALREADY_RUNNING",{status:"warning"}),e.abrupt("return");case 4:return this.requestRunning=!0,e.next=7,this._initDisplayContainerWithAutoPlay();case 7:return n=e.sent,e.next=10,this._loadInterstitialAd(Ip(Ip({},n),t));case 10:n.autoplayRequiresMute&&this.adsManager.setVolume(0),this.adsManager.init(this.options.width,this.options.height,google.ima.ViewMode.NORMAL),this.adsManager.start(),e.next=19;break;case 15:throw e.prev=15,e.t0=e.catch(0),this._onError(e.t0),e.t0;case 19:case"end":return e.stop()}}),e,this,[[0,15]])}))),function(e){return E.apply(this,arguments)})},{key:"_loadInterstitialAd",value:(A=r(o.mark((function t(n){var r,i,a=this;return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this._resetAdsLoader(),t.prev=1,t.t0=this.preloadedInterstitialAdVast,t.t0){t.next=7;break}return t.next=6,this._getAdVast(u.Interstitial,n);case 6:t.t0=t.sent;case 7:return r=t.t0,delete this.preloadedInterstitialAdVast,t.next=11,this._requestAd(r,Ip({adType:u.Interstitial},n));case 11:return i=t.sent,t.next=14,new Promise(function(t,n){var r=this;e(this,a);var i="videoad.preloadad";this.eventBus.unsubscribeScope(i);var o=function(n){e(this,r),this.eventBus.unsubscribeScope(i),t(n.message)}.bind(this),s=function(t){e(this,r),this.eventBus.unsubscribeScope(i),n(t.message)}.bind(this);this.eventBus.subscribe("AD_SDK_MANAGER_READY",o,i),this.eventBus.subscribe("AD_SDK_CANCELED",s,i),this.eventBus.subscribe("AD_ERROR",s,i)}.bind(this));case 14:return t.abrupt("return",i);case 17:throw t.prev=17,t.t1=t.catch(1),new Error(t.t1);case 20:case"end":return t.stop()}}),t,this,[[1,17]])}))),function(e){return A.apply(this,arguments)})},{key:"_startRewardedAd",value:(w=r(o.mark((function e(t){var n;return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!this.requestRunning){e.next=4;break}return this.eventBus.broadcast("AD_IS_ALREADY_RUNNING",{status:"warning"}),e.abrupt("return");case 4:return this.requestRunning=!0,e.next=7,this._initDisplayContainerWithAutoPlay();case 7:return n=e.sent,e.next=10,this._loadRewardedAd(Ip(Ip({},n),t));case 10:n.autoplayRequiresMute&&this.adsManager.setVolume(0),this.adsManager.init(this.options.width,this.options.height,google.ima.ViewMode.NORMAL),this.adsManager.start(),e.next=19;break;case 15:throw e.prev=15,e.t0=e.catch(0),this._onError(e.t0),e.t0;case 19:case"end":return e.stop()}}),e,this,[[0,15]])}))),function(e){return w.apply(this,arguments)})},{key:"_loadRewardedAd",value:(_=r(o.mark((function t(n){var r,i,a=this;return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this._resetAdsLoader(),t.prev=1,t.t0=this.preloadedRewardedAdVast,t.t0){t.next=7;break}return t.next=6,this._getAdVast(u.Rewarded,n);case 6:t.t0=t.sent;case 7:return r=t.t0,delete this.preloadedRewardedAdVast,t.next=11,this._requestAd(r,Ip({adType:u.Rewarded},n));case 11:return i=t.sent,t.next=14,new Promise(function(t,n){var r=this;e(this,a);var i="videoad.preloadad";this.eventBus.unsubscribeScope(i);var o=function(n){e(this,r),this.eventBus.unsubscribeScope(i),t(n.message)}.bind(this),s=function(t){e(this,r),this.eventBus.unsubscribeScope(i),n(t.message)}.bind(this);this.eventBus.subscribe("AD_SDK_MANAGER_READY",o,i),this.eventBus.subscribe("AD_SDK_CANCELED",s,i),this.eventBus.subscribe("AD_ERROR",s,i)}.bind(this));case 14:return t.abrupt("return",i);case 17:throw t.prev=17,t.t1=t.catch(1),new Error(t.t1);case 20:case"end":return t.stop()}}),t,this,[[1,17]])}))),function(e){return _.apply(this,arguments)})},{key:"_preloadInterstitialAd",value:(b=r(o.mark((function e(){return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this._getAdVast(u.Interstitial);case 3:return this.preloadedInterstitialAdVast=e.sent,e.abrupt("return",this.preloadedInterstitialAdVast.url);case 7:throw e.prev=7,e.t0=e.catch(0),new Error(e.t0);case 10:case"end":return e.stop()}}),e,this,[[0,7]])}))),function(){return b.apply(this,arguments)})},{key:"_preloadRewardedAd",value:(y=r(o.mark((function e(){return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this._getAdVast(u.Rewarded);case 3:return this.preloadedRewardedAdVast=e.sent,e.abrupt("return",this.preloadedRewardedAdVast.url);case 7:throw e.prev=7,e.t0=e.catch(0),new Error(e.t0);case 10:case"end":return e.stop()}}),e,this,[[0,7]])}))),function(){return y.apply(this,arguments)})},{key:"_onError",value:function(e){this.cancel(),this._clearSafetyTimer("ERROR")}},{key:"_hide",value:function(e){this.video_ad_player.src="",this.activeAdContainer&&(this.activeAdContainer.style.visibility="hidden")}},{key:"_show",value:function(t){var n=this;if(this.activeAdContainer){this.activeAdContainer.style.visibility="visible";var r=null==t?void 0:t.mode,i=this._isT4R(t),a=this._getT4ROptions();"loaded"===r?(this.activeAdContainer.style.opacity=i?.001:1,i&&this.eventBus.broadcast("AD_T4R"),i&&setTimeout(function(){e(this,n),this.activeAdContainer.style.opacity=1}.bind(this),((null==a?void 0:a.min)||1234)+Math.random()*((null==a?void 0:a.max)||3210))):"click"!==r&&"first_quartile"!==r||(this.activeAdContainer.style.opacity=1)}}},{key:"_createPlayer",value:function(){var t=this,n=document.body||document.getElementsByTagName("body")[0];this.adContainer=document.createElement("div"),this.adContainer.id="".concat(this.prefix,"advertisement"),this.adContainer.style.position=this.thirdPartyContainer?"absolute":"fixed",this.adContainer.style.zIndex=p.AdsContainer.zIndex,this.adContainer.style.top="0",this.adContainer.style.left="0",this.adContainer.style.width="100%",this.adContainer.style.height="100%",this.thirdPartyContainer&&(this.thirdPartyContainer.style.transform=null);var r=document.createElement("video");r.setAttribute("playsinline",!0),r.setAttribute("webkit-playsinline",!0),r.id="".concat(this.prefix,"advertisement_video"),r.style.position="absolute",r.style.backgroundColor="#000000",r.style.top="0",r.style.left="0",r.style.width=this.options.width+"px",r.style.height=this.options.height+"px",this.video_ad_player=r,this.adContainer.appendChild(r);var i=document.createElement("div");i.id="".concat(this.prefix,"advertisement_slot"),i.style.position="absolute",i.style.top="0",i.style.left="0",i.style.width=this.options.width+"px",i.style.height=this.options.height+"px",this.adContainerInner=i,this.activeAdContainer=this.adContainer,this.thirdPartyContainer?(this.adContainer.appendChild(i),this.thirdPartyContainer.appendChild(this.adContainer),this.activeAdContainer=this.thirdPartyContainer):(this.adContainer.appendChild(i),n.appendChild(this.adContainer)),this.addAdResume(),this.activeAdContainer.style.visibility="hidden";var a=function(){e(this,t);var n=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,a=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;this.options.width=this.thirdPartyContainer?this.thirdPartyContainer.offsetWidth:n,this.options.height=this.thirdPartyContainer?this.thirdPartyContainer.offsetHeight:a,i.style.width=this.options.width+"px",i.style.height=this.options.height+"px",r.style.width=this.options.width+"px",r.style.height=this.options.height+"px"}.bind(this);window.addEventListener("resize",a),window.document.addEventListener("DOMContentLoaded",a)}},{key:"_setUpIMA",value:function(){this.adDisplayContainer=new google.ima.AdDisplayContainer(this.adContainerInner,this.video_ad_player),this.adsLoader=new google.ima.AdsLoader(this.adDisplayContainer),this.adsLoader.getSettings().setDisableCustomPlaybackForIOS10Plus(!0),this.adsLoader.getSettings().setLocale(this.options.locale),this.adsLoader.getSettings().setVpaidMode(this._getVPAIDMode()),this.adsLoader.getSettings().setAutoPlayAdBreaks(!0);var e=this.adsLoader.getSettings().getNumRedirects();this.adsLoader.getSettings().setNumRedirects(2*e),this.adsLoader.addEventListener(google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,this._onAdsManagerLoaded,!1,this),this.adsLoader.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,this._onAdError,!1,this)}},{key:"_onAdsManagerLoaded",value:function(t){var n=this,r=new google.ima.AdsRenderingSettings;r.autoAlign=!1,r.enablePreloading=!1,r.restoreCustomPlaybackStateOnAdBreakComplete=!0,r.useStyledNonLinearAds=!0,r.uiElements=[google.ima.UiElements.AD_ATTRIBUTION,google.ima.UiElements.COUNTDOWN],this.adsManager=t.getAdsManager(this.video_ad_player,r),this.adsManager.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,this._onAdError.bind(this),!1,this),this.adsManager.addEventListener(google.ima.AdEvent.Type.AD_BREAK_READY,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.AD_METADATA,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.ALL_ADS_COMPLETED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.CLICK,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.COMPLETE,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.DURATION_CHANGE,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.FIRST_QUARTILE,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.IMPRESSION,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.INTERACTION,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.LINEAR_CHANGED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.LOADED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.LOG,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.MIDPOINT,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.PAUSED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.RESUMED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.SKIPPED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.STARTED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.THIRD_QUARTILE,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.USER_CLOSE,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.VOLUME_CHANGED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.VOLUME_MUTED,this._onAdEvent.bind(this),this),window.addEventListener("resize",function(){e(this,n),this.adsManager&&this.adsManager.resize(this.options.width,this.options.height,google.ima.ViewMode.NORMAL)}.bind(this)),this.adDisplayContainerInitialized||(this.adDisplayContainer.initialize(),this.adDisplayContainerInitialized=!0);var i=new Date,a=i.getHours(),o=i.getDate(),s=i.getMonth(),d=i.getFullYear(),c="AD_SDK_MANAGER_READY";this.eventBus.broadcast(c,{name:c,message:"AD SDK is ready",status:"success",analytics:{category:c,action:this.parentDomain,label:"h".concat(a," d").concat(o," m").concat(s," y").concat(d)}}),this._adrequest_user_context=t.getUserRequestContext()}},{key:"_onAdEvent",value:function(e){var t=new Date,n=t.getHours(),r=t.getDate(),i=t.getMonth(),a=t.getFullYear(),o=f(google.ima.AdEvent.Type,e.type),s=!1,d=e.getAd().getContentType()||"",c=!d.startsWith("image")&&!d.startsWith("text");this._sendIMAEventsToHB(e);var u="";switch(e.type){case google.ima.AdEvent.Type.AD_BREAK_READY:u="Fired when an ad rule or a VMAP ad break would have played if autoPlayAdBreaks is false.";break;case google.ima.AdEvent.Type.AD_METADATA:u="Fired when an ads list is loaded.";break;case google.ima.AdEvent.Type.ALL_ADS_COMPLETED:s=!0,u="Fired when the ads manager is done playing all the ads.";break;case google.ima.AdEvent.Type.CLICK:u="Fired when the ad is clicked.";var l=e.getAd().getContentType();this._show({mode:"click",contentType:l});break;case google.ima.AdEvent.Type.COMPLETE:s=this._is_completed(e.getAd()),u="Fired when the ad completes playing.";break;case google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED:u="Fired when content should be paused. This usually happens right before an ad is about to cover the content.";break;case google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED:u="Fired when content should be resumed. This usually happens when an ad finishes or collapses.",s=!0;break;case google.ima.AdEvent.Type.DURATION_CHANGE:u="Fired when the ad's duration changes.";break;case google.ima.AdEvent.Type.FIRST_QUARTILE:u="Fired when the ad playhead crosses first quartile.";var h=e.getAd().getContentType();this._show({mode:"first_quartile",contentType:h});break;case google.ima.AdEvent.Type.IMPRESSION:u="Fired when the impression URL has been pinged.";break;case google.ima.AdEvent.Type.INTERACTION:u="Fired when an ad triggers the interaction callback. Ad interactions contain an interaction ID string in the ad data.";break;case google.ima.AdEvent.Type.LINEAR_CHANGED:u="Fired when the displayed ad changes from linear to nonlinear, or vice versa.";break;case google.ima.AdEvent.Type.LOADED:var p=e.getAd().getContentType();u=p,this._show({mode:"loaded",contentType:p});break;case google.ima.AdEvent.Type.LOG:e.getAdData().adError&&(u=e.getAdData());break;case google.ima.AdEvent.Type.MIDPOINT:u="Fired when the ad playhead crosses midpoint.";break;case google.ima.AdEvent.Type.PAUSED:c&&this.adResume.show(),u="Fired when the ad is paused.";break;case google.ima.AdEvent.Type.RESUMED:u="Fired when the ad is resumed.",c&&this.adResume.hide();break;case google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED:u="Fired when the displayed ads skippable state is changed.";break;case google.ima.AdEvent.Type.SKIPPED:s=this._is_completed(e.getAd()),u="Fired when the ad is skipped by the user.";break;case google.ima.AdEvent.Type.STARTED:u="Fired when the ad starts playing.";break;case google.ima.AdEvent.Type.THIRD_QUARTILE:u="Fired when the ad playhead crosses third quartile.";break;case google.ima.AdEvent.Type.USER_CLOSE:s=this._is_completed(e.getAd()),u="Fired when the ad is closed by the user.";break;case google.ima.AdEvent.Type.VOLUME_CHANGED:u="Fired when the ad volume has changed.";break;case google.ima.AdEvent.Type.VOLUME_MUTED:u="Fired when the ad volume has been muted."}""!==o&&""!==u&&this.eventBus.broadcast(o,{name:o,message:u,status:"success",analytics:{category:o,action:this.parentDomain,label:"h".concat(n," d").concat(r," m").concat(i," y").concat(a)}}),s&&!this.adSuccess&&(this.adSuccess=!0,this.eventBus.broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success"}),this.resetForNext(e))}},{key:"_onAdError",value:function(e){this.requestRunning=!1,this._resetAdsLoader(),this._clearSafetyTimer("ERROR"),this._hide("_onAdError"),this._sendIMAEventsToHB(e);try{var t="AD_ERROR",n=e.getError(),r=n.getErrorCode().toString()||n.getVastErrorCode().toString(),i=this._getInnerErrorCode(n);this.eventBus.broadcast(t,{message:r,details:i,status:"warning",analytics:{category:t,action:i,label:r}})}catch(e){}}},{key:"_sendIMAEventsToHB",value:function(e){if(window.idhb&&"function"==typeof window.idhb.onImaEvent)try{window.idhb.onImaEvent(e)}catch(e){}}},{key:"_resetAdsLoader",value:function(){this.adsManager&&(this.adsManager.destroy(),this.adsManager=null,this._adrequest_user_context=null),this.adsLoader&&this.adsLoader.contentComplete()}},{key:"_startSafetyTimer",value:function(t,n){var r=this;this.safetyTimer&&clearTimeout(this.safetyTimer),this.safetyTimer=window.setTimeout(function(){e(this,r),this.cancel(),this._clearSafetyTimer(n)}.bind(this),t)}},{key:"_clearSafetyTimer",value:function(e){void 0!==this.safetyTimer&&null!==this.safetyTimer&&(clearTimeout(this.safetyTimer),this.safetyTimer=void 0)}},{key:"_getVPAIDMode",value:function(){return google.ima.ImaSdkSettings.VpaidMode.ENABLED}},{key:"_getPrebidScripts",value:function(){var e=["https://hb.improvedigital.com/pbw/gameDistributionV1.3.min.js","http://hb.improvedigital.com/pbw/gameDistributionV1.3.min.js"];return this.options.hb_script?[this.options.hb_script].concat(e):e}},{key:"_getInnerErrorCode",value:function(e){if(kp(e.getInnerError)){var t=e.getInnerError();if(t)return kp(t.getErrorCode)&&kp(t.getVastErrorCode)?t.getErrorCode().toString()||t.getVastErrorCode().toString():t.message}}},{key:"resetForNext",value:function(){this.requestRunning=!1,this._hide("resetForNext")}},{key:"_createCustomAdVastUrl",value:function(t,n){var r=this;if(t){var i=this.macros.transform(t,{get:function(t){if(e(this,r),n&&n.tnl_keys)return n.tnl_keys[t.toLowerCase()]}.bind(this)});for(var a in i.query||{}){var o=i.query[a];L(o)&&(i.query[a]=j.stringify(o))}var s=new C(i.url,!0);return U(s.query,i.query||{}),Ip({url:s.toString()},n)}}},{key:"_transformVast",value:function(e,t){var n={url:e.url};try{var r=new C(e.url,!0),i=this._transformQuery(e,t,r);i&&(n.url=r.toString());var a=i?r:new C(e.url,!0);if(a.query.cust_params){var o=j.parse(a.query.cust_params);n.bidder=o.hb_bidder,n.cust_params=o}n.url_parsed=a}catch(e){n.hasError=!0,n.message=e.message,n.bidder="error",console.log(e.message)}return n}},{key:"_transformQuery",value:function(t,n,r){var i=this;if(t&&n&&t.tnl_keys){var a=this.options.vast_query;if(n.retry_on_success&&this.options.retry_on_success&&L(this.options.retry_on_success.vast_query)?a=this.options.retry_on_success.vast_query:n.retry_on_failure&&this.options.retry_on_failure&&L(this.options.retry_on_failure.vast_query)&&(a=this.options.retry_on_failure.vast_query),a=M(a),L(a)){var o=r.query;if(a.$$remove){for(var s in o){new RegExp(a.$$remove,"i").test(s)&&delete o[s]}delete a.$$remove}var d=j.parse(o.cust_params);if(a.cust_params&&a.cust_params.$$remove){for(var c in d){new RegExp(a.cust_params.$$remove,"i").test(c)&&delete d[c]}delete a.cust_params.$$remove}var u=this.macros.transform(a,{get:function(n){return e(this,i),t.tnl_keys[n.toLowerCase()]}.bind(this)});return o.cust_params=d,U(o,u),o.cust_params=j.stringify(o.cust_params),!0}}}},{key:"_isT4R",value:function(e){var t,n,r,i,a,o,s,d,c,u,l,h=null===(t=this._adrequest_user_context)||void 0===t?void 0:t.tnl_ad_pos;return h&&((null==e||null===(n=e.contentType)||void 0===n?void 0:n.startsWith("image/"))||"text"===(null==e?void 0:e.contentType))&&("preroll"===h&&(null===(r=this.gameData)||void 0===r||null===(i=r.pAds)||void 0===i||null===(a=i.t4r)||void 0===a?void 0:a.enabled)||"midroll"===h&&(null===(o=this.gameData)||void 0===o||null===(s=o.mAds)||void 0===s||null===(d=s.t4r)||void 0===d?void 0:d.enabled)||"rewarded"===h&&(null===(c=this.gameData)||void 0===c||null===(u=c.rAds)||void 0===u||null===(l=u.t4r)||void 0===l?void 0:l.enabled))}},{key:"_isVMAP",value:function(e){var t,n,r,i,a,o,s,d,c,u,l,h,p,f,m;if(!e)return!1;var g="preroll"===e&&(!0===(null===(t=this.gameData)||void 0===t||null===(n=t.pAds)||void 0===n?void 0:n.vmap)||!0===(null===(r=this.gameData)||void 0===r||null===(i=r.pAds)||void 0===i||null===(a=i.vmap)||void 0===a?void 0:a.enabled))||"midroll"===e&&(!0===(null===(o=this.gameData)||void 0===o||null===(s=o.mAds)||void 0===s?void 0:s.vmap)||!0===(null===(d=this.gameData)||void 0===d||null===(c=d.mAds)||void 0===c||null===(u=c.vmap)||void 0===u?void 0:u.enabled))||"rewarded"===e&&(!0===(null===(l=this.gameData)||void 0===l||null===(h=l.rAds)||void 0===h?void 0:h.vmap)||!0===(null===(p=this.gameData)||void 0===p||null===(f=p.rAds)||void 0===f||null===(m=f.vmap)||void 0===m?void 0:m.enabled));if(!g)return!1;var v=this._get_vmap_config(e),y=this.adCounter[e];return void 0!==(null==v?void 0:v.start)?y>=(null==v?void 0:v.start):g}},{key:"_getT4ROptions",value:function(){var e,t,n,r,i,a,o;switch(null===(e=this._adrequest_user_context)||void 0===e?void 0:e.tnl_ad_pos){case"preroll":return null===(t=this.gameData)||void 0===t||null===(n=t.pAds)||void 0===n?void 0:n.t4r;case"midroll":return null===(r=this.gameData)||void 0===r||null===(i=r.mAds)||void 0===i?void 0:i.t4r;case"rewarded":return null===(a=this.gameData)||void 0===a||null===(o=a.rAds)||void 0===o?void 0:o.t4r}}},{key:"_is_completed",value:function(e){var t=e.getContentType(),n=e.getAdPodInfo();return!(!t.startsWith("image/")&&"text"!==t&&1!==n.getTotalAds())}},{key:"_get_vmap_context",value:function(e){var t=e.adtag,n=e.position,r=e.config,i=e.dp,a=this._createCustomAdVastUrl(null==r?void 0:r.vast_1)||t,o=this._createCustomAdVastUrl(null==r?void 0:r.vast_2)||t,s=null!=r&&r.vast_1?void 0:i,d=null!=r&&r.vast_2?void 0:i;return{adtag_url_1:null==a?void 0:a.url,adtag_url_2:null==o?void 0:o.url,position:n,dp_1:s,dp_2:d}}},{key:"_get_vmap_config",value:function(e){var t,n,r,i,a,o,s,d;switch(e){case"preroll":return null===(t=this.gameData)||void 0===t||null===(n=t.pAds)||void 0===n?void 0:n.vmap;case"midroll":return null===(r=this.gameData)||void 0===r||null===(i=r.mAds)||void 0===i?void 0:i.vmap;case"rewarded":return null===(a=this.gameData)||void 0===a||null===(o=a.rAds)||void 0===o?void 0:o.vmap;default:return null===(s=this.gameData)||void 0===s||null===(d=s.pAds)||void 0===d?void 0:d.vmap}}},{key:"_isDP",value:function(e){var t,n,r,i,a,o,s,d,c,u,l,h,p,f,m;return!!e&&("preroll"===e&&(!0===(null===(t=this.gameData)||void 0===t||null===(n=t.pAds)||void 0===n?void 0:n.dp)||!0===(null===(r=this.gameData)||void 0===r||null===(i=r.pAds)||void 0===i||null===(a=i.dp)||void 0===a?void 0:a.enabled))||"midroll"===e&&(!0===(null===(o=this.gameData)||void 0===o||null===(s=o.mAds)||void 0===s?void 0:s.dp)||!0===(null===(d=this.gameData)||void 0===d||null===(c=d.mAds)||void 0===c||null===(u=c.dp)||void 0===u?void 0:u.enabled))||"rewarded"===e&&(!0===(null===(l=this.gameData)||void 0===l||null===(h=l.rAds)||void 0===h?void 0:h.dp)||!0===(null===(p=this.gameData)||void 0===p||null===(f=p.rAds)||void 0===f||null===(m=f.dp)||void 0===m?void 0:m.enabled)))}},{key:"_create_dp_display_context",value:function(){var t=this;return new Promise(function(n){var r=this;e(this,t);try{var i={id:this.topDomain||this.parentDomain,au:"display",ty:"display",aid:this.gameData.gameId,pgu:this.parentURL},a=new Ap(this.gameData).checkCustomParams();a&&(i.cp=a);var o=encodeURIComponent(B.encode(JSON.stringify(i)));fetch("https://tag.atom.gamedistribution.com/v1/atm?ar=".concat(o)).then(function(t){return e(this,r),t.json()}.bind(this)).then(function(t){if(e(this,r),!t||!t.p)return this.msgrt.send("dp.na",{message:"atom"}),n();this.msgrt.send("dp.fp",{message:t.p/100}),n({params:{fp:t.p/100},error_url:"https://tag.atom.gamedistribution.com/v1/err?ar=".concat(o),impression_url:"https://tag.atom.gamedistribution.com/v1/imp?ar=".concat(o)})}.bind(this)).catch(function(t){e(this,r),this.msgrt.send("dp.err",{message:(null==t?void 0:t.message)||t}),n()}.bind(this))}catch(e){this.msgrt.send("dp.err",{message:(null==e?void 0:e.message)||e}),n()}}.bind(this))}},{key:"_create_dp_context",value:function(t){var n=this;return new Promise(function(){var i=r(o.mark((function r(i){var a,s,d,c,u,l=this;return o.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(r.prev=0,n._isDP(t)){r.next=5;break}return n.msgrt.send("dp.na",{message:"rule"}),r.abrupt("return",i());case 5:s={id:n.topDomain||n.parentDomain,au:t||"unknown",ty:"video",aid:n.gameData.gameId,pgu:n.parentURL},(d=new Ap(n.gameData).checkCustomParams())&&(s.cp=d),c=encodeURIComponent(B.encode(JSON.stringify(s))),u=null===(a=n.gameData.promo)||void 0===a?void 0:a.rainbow,fetch("https://tag.atom.gamedistribution.com/v1/atm?ar=".concat(c)).then(function(t){return e(this,l),t.json()}.bind(this)).then(function(t){if(e(this,l),!t||!t.p)return n.msgrt.send("dp.na",{message:"atom"}),i();var r=t.p/100;i({id:Date.now(),floor_price:r,error_url:"https://tag.atom.gamedistribution.com/v1/err?ar=".concat(c,"&ec=[ERRORCODE]"),impression_url:"https://tag.atom.gamedistribution.com/v1/imp?ar=".concat(c),skip_url:"https://tag.atom.gamedistribution.com/v1/skp?ar=".concat(c),promo_url:null!=u&&u.enabled?"https://tag.atom.gamedistribution.com/v1/rainbow?ar=".concat(c):void 0,promo_imp_blue_url:null!=u&&u.enabled?"https://tag.atom.gamedistribution.com/v1/rainbow/blue":void 0,promo_imp_green_url:null!=u&&u.enabled?"https://tag.atom.gamedistribution.com/v1/rainbow/green":void 0})}.bind(this)).catch(function(t){e(this,l),n.msgrt.send("dp.err",{message:(null==t?void 0:t.message)||t}),i()}.bind(this)),r.next=17;break;case 13:r.prev=13,r.t0=r.catch(0),n.msgrt.send("dp.err",{message:(null===r.t0||void 0===r.t0?void 0:r.t0.message)||r.t0}),i();case 17:case"end":return r.stop()}}),r,this,[[0,13]])})));return function(e){return i.apply(this,arguments)}}())}},{key:"_extend_dp_with_adsense",value:function(e,t,n){if(e&&t&&n)try{var r,i=new C(t.vastUrl,!0);if(null===(r=i.query)||void 0===r||!r.cust_params)return;if(!j.parse(i.query.cust_params).tnl_asset_id)return;n.bidFloor,n.isDfpBidding;var a=s(n,Rp);i.query.cust_params=j.stringify(Ip(Ip({},a),{},{adsense:1}),!1),e.fallback_url=i.toString(),e.fallback_imp_url="https://tag.atom.gamedistribution.com/v1/rainbow/green"}catch(e){}}}]),t}(),Lp=Array.isArray,Mp=Object.prototype.toString,jp=Lp||function(e){return!!e&&"[object Array]"==Mp.call(e)},Up=sr,Bp=se,Gp=vr,Np=An,qp=yn,Vp=oe,Fp=zr,Kp=Ye,zp=Lr("slice"),Wp=Kp("species"),Hp=[].slice,$p=Math.max;Up({target:"Array",proto:!0,forced:!zp},{slice:function(e,t){var n,r,i,a=Vp(this),o=qp(a.length),s=Np(e,o),d=Np(void 0===t?o:t,o);if(Gp(a)&&("function"!=typeof(n=a.constructor)||n!==Array&&!Gp(n.prototype)?Bp(n)&&null===(n=n[Wp])&&(n=void 0):n=void 0,n===Array||void 0===n))return Hp.call(a,s,d);for(r=new(void 0===n?Array:n)($p(d-s,0)),i=0;s<d;s++,i++)s in a&&Fp(r,i,a[s]);return r.length=i,r}});var Yp=bt,Qp=Pi,Jp=mr,Xp=Pe,Zp=function(e,t,n,r){try{return r?t(Yp(n)[0],n[1]):t(n)}catch(t){throw Qp(e),t}},ef=Si,tf=yn,nf=zr,rf=Ii,af=function(e){var t,n,r,i,a,o,s=Xp(e),d="function"==typeof this?this:Array,c=arguments.length,u=c>1?arguments[1]:void 0,l=void 0!==u,h=rf(s),p=0;if(l&&(u=Jp(u,c>2?arguments[2]:void 0,2)),null==h||d==Array&&ef(h))for(n=new d(t=tf(s.length));t>p;p++)o=l?u(s[p],p):s[p],nf(n,p,o);else for(a=(i=h.call(s)).next,n=new d;!(r=a.call(i)).done;p++)o=l?Zp(i,u,[r.value,p],!0):r.value,nf(n,p,o);return n.length=p,n};sr({target:"Array",stat:!0,forced:!Yi((function(e){Array.from(e)}))},{from:af});var of,sf,df,cf=!F((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),uf=je,lf=Pe,hf=cf,pf=qt("IE_PROTO"),ff=Object.prototype,mf=hf?Object.getPrototypeOf:function(e){return e=lf(e),uf(e,pf)?e[pf]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?ff:null},gf=F,vf=mf,yf=St,bf=je,_f=Ye("iterator"),wf=!1;[].keys&&("next"in(df=[].keys())?(sf=vf(vf(df)))!==Object.prototype&&(of=sf):wf=!0),(null==of||gf((function(){var e={};return of[_f].call(e)!==e})))&&(of={}),bf(of,_f)||yf(of,_f,(function(){return this}));var Af={IteratorPrototype:of,BUGGY_SAFARI_ITERATORS:wf},Ef=Af.IteratorPrototype,kf=Bs,Df=J,xf=vi,Sf=Ei,Tf=function(){return this},Rf=sr,Of=function(e,t,n){var r=t+" Iterator";return e.prototype=kf(Ef,{next:Df(1,n)}),xf(e,r,!1),Sf[r]=Tf,e},If=mf,Cf=pi,Pf=vi,Lf=St,Mf=Tt.exports,jf=Ei,Uf=Af.IteratorPrototype,Bf=Af.BUGGY_SAFARI_ITERATORS,Gf=Ye("iterator"),Nf=function(){return this},qf=function(e,t,n,r,i,a,o){Of(n,t,r);var s,d,c,u=function(e){if(e===i&&m)return m;if(!Bf&&e in p)return p[e];switch(e){case"keys":case"values":case"entries":return function(){return new n(this,e)}}return function(){return new n(this)}},l=t+" Iterator",h=!1,p=e.prototype,f=p[Gf]||p["@@iterator"]||i&&p[i],m=!Bf&&f||u(i),g="Array"==t&&p.entries||f;if(g&&(s=If(g.call(new e)),Uf!==Object.prototype&&s.next&&(If(s)!==Uf&&(Cf?Cf(s,Uf):"function"!=typeof s[Gf]&&Lf(s,Gf,Nf)),Pf(s,l,!0))),"values"==i&&f&&"values"!==f.name&&(h=!0,m=function(){return f.call(this)}),p[Gf]!==m&&Lf(p,Gf,m),jf[t]=m,i)if(d={values:u("values"),keys:a?m:u("keys"),entries:u("entries")},o)for(c in d)(Bf||h||!(c in p))&&Mf(p,c,d[c]);else Rf({target:t,proto:!0,forced:Bf||h},d);return d},Vf=mu.charAt,Ff=gs,Kf=nn,zf=qf,Wf=Kf.set,Hf=Kf.getterFor("String Iterator");zf(String,"String",(function(e){Wf(this,{type:"String Iterator",string:Ff(e),index:0})}),(function(){var e,t=Hf(this),n=t.string,r=t.index;return r>=n.length?{value:void 0,done:!0}:(e=Vf(n,r),t.index+=e.length,{value:e,done:!1})})),Yu("iterator");var $f=oe,Yf=wh,Qf=Ei,Jf=nn,Xf=qf,Zf=Jf.set,em=Jf.getterFor("Array Iterator"),tm=Xf(Array,"Array",(function(e,t){Zf(this,{type:"Array Iterator",target:$f(e),index:0,kind:t})}),(function(){var e=em(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}}),"values");Qf.Arguments=Qf.Array,Yf("keys"),Yf("values"),Yf("entries");var nm=q,rm=Rd,im=tm,am=St,om=Ye,sm=om("iterator"),dm=om("toStringTag"),cm=im.values;for(var um in rm){var lm=nm[um],hm=lm&&lm.prototype;if(hm){if(hm[sm]!==cm)try{am(hm,sm,cm)}catch(e){hm[sm]=cm}if(hm[dm]||am(hm,dm,um),rm[um])for(var pm in im)if(hm[pm]!==im[pm])try{am(hm,pm,im[pm])}catch(e){hm[pm]=im[pm]}}}function fm(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return mm(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return mm(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function mm(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function gm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function vm(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?gm(Object(r),!0).forEach((function(t){n(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):gm(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var ym={react:{src:"https://pm.gamedistribution.com/react/16.14.0/umd/react.production.min.js",name:"React"},"react-dom":{src:"https://pm.gamedistribution.com/react-dom/16.14.0/umd/react-dom.production.min.js",name:"ReactDOM"},redux:{src:"https://pm.gamedistribution.com/redux/4.0.5/dist/redux.min.js",name:"Redux"},"react-redux":{src:"https://pm.gamedistribution.com/react-redux/7.2.1/dist/react-redux.min.js",name:"ReactRedux"},"material-ui-core":{src:"https://pm.gamedistribution.com/@material-ui/core/4.11.3/umd/material-ui.production.min.js",name:"MaterialUI"}},bm={},_m=function(e,t){bm[e]=vm(vm({},t),{},{isLoading:!1})},wm=function(t){var n=this,r=t.id,i=t.src;return new Promise(function(t,a){if(e(this,n),document.getElementById(r))t();else{var o=document.createElement("script");o.onload=function(){t()},o.id=r,o.setAttribute("crossorigin",!0),o.src=i,document.head.appendChild(o)}}.bind(this))},Am=function(){var e=r(o.mark((function e(t){var n,r,i,a,s,d,c,u;return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n=window[t])){e.next=3;break}return e.abrupt("return",n);case 3:if(!(r=bm[t]).isLoading){e.next=6;break}return e.abrupt("return");case 6:r.isLoading=!0,i=fm(r.dependencies),e.prev=8,i.s();case 10:if((a=i.n()).done){e.next=26;break}if(s=a.value,e.prev=12,d=ym[s].name,!window[d]){e.next=16;break}return e.abrupt("continue",24);case 16:return e.next=18,wm({id:s,src:ym[s].src});case 18:e.next=24;break;case 20:e.prev=20,e.t0=e.catch(12),c=s.id,u=s.src,console.log("Could not load external script ".concat(c," ").concat(u),e.t0);case 24:e.next=10;break;case 26:e.next=31;break;case 28:e.prev=28,e.t1=e.catch(8),i.e(e.t1);case 31:return e.prev=31,i.f(),e.finish(31);case 34:return e.prev=34,e.next=37,wm({id:t,src:r.source});case 37:n=window[t],e.next=43;break;case 40:e.prev=40,e.t2=e.catch(34),console.log("Could not load module ".concat(t," ").concat(r.source,"."),e.t2);case 43:return r.isLoading=!1,e.abrupt("return",n);case 45:case"end":return e.stop()}}),e,null,[[8,28,31,34],[12,20],[34,40]])})));return function(t){return e.apply(this,arguments)}}(),Em=function e(t){var a=this;i(this,e),n(this,"load",r(o.mark((function e(){return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Am(a.moduleName);case 2:a.stone=e.sent;case 3:case"end":return e.stop()}}),e)})))),n(this,"promo",r(o.mark((function e(){return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a.stone){e.next=3;break}return e.next=3,a.load();case 3:return e.abrupt("return",a.stone[a.modulePromo]);case 4:case"end":return e.stop()}}),e)})))),this.moduleName="GDPromoByOrbit",this.modulePromo=t,this.moduleConfig={source:"https://pm.gamedistribution.com/@bygd/gd-sdk-stone-dynamic/1.0.7/dist/"+this.modulePromo.toLowerCase()+"/iife/index.js",dependencies:["react","react-dom","material-ui-core"]},_m(this.moduleName,this.moduleConfig)},km=function e(t){var a=this;i(this,e),n(this,"load",r(o.mark((function e(){return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Am(a.moduleName);case 2:a.air=e.sent;case 3:case"end":return e.stop()}}),e)})))),n(this,"splash",r(o.mark((function e(){return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a.air){e.next=3;break}return e.next=3,a.load();case 3:return e.abrupt("return",a.air[a.moduleSplash]);case 4:case"end":return e.stop()}}),e)}))));var s=t.package||"gd-sdk-air-dynamic",d=t.package_version||"1.2.0",c=t.template||"pluto",u=t.dependencies||[];this.moduleName="GDSplashDynamic",this.moduleSplash=c.charAt(0).toUpperCase()+c.slice(1),this.moduleConfig={source:"https://pm.gamedistribution.com/@bygd/".concat(s,"/").concat(d,"/dist/").concat(c.toLowerCase(),"/iife/index.js"),dependencies:u},_m(this.moduleName,this.moduleConfig)},Dm=function(e,t){console.log(e,t)},xm={},Sm={},Tm=null;function Rm(){for(var e,t=window,n=null,r=null;!e;){try{if("function"==typeof t.__tcfapi||"function"==typeof t.__cmp){"function"==typeof t.__tcfapi?(r=2,n=t.__tcfapi):(r=1,n=t.__cmp),e=t;break}}catch(e){}try{if(t.frames.__tcfapiLocator){r=2,e=t;break}}catch(e){}try{if(t.frames.__cmpLocator){r=1,e=t;break}}catch(e){}if(t===window.top)break;t=t.parent}return xm.version=r,xm.frame=e,xm.function=n,xm.version}function Om(t){var r=this;return Tm||(Tm=new Promise(function(i){function a(e,n){if(Dm("Received a response from CMP",e),n){var r,a;if(!1!==e.gdprApplies)return"tcloaded"===e.eventStatus||"useractioncomplete"===e.eventStatus?(("boolean"!=typeof(a=(r=e)&&"boolean"==typeof r.gdprApplies?r.gdprApplies:t.defaultGdprScope)||!0===a&&"string"!=typeof r.tcString)&&i({result:"cmpUnexpectedResponse",cmp:xm,consentData:r}),void i({result:"ok",consentData:e})):void 0;i({result:"ok",consentData:e})}else i({result:"cmpCallFailed"})}e(this,r),Rm(),xm.frame?2===xm.version?(Dm("TCF v2 CMP found. Fetching the consent."),xm.function?(Dm("CMP API is directly accessible, calling it now..."),xm.function("addEventListener",xm.version,a)):(Dm("CMP API is outside the current iframe, calling it now..."),function(t,r,i){var a=this,o="__tcfapi";function s(e){var t="".concat(o,"Return"),n="string"==typeof e.data&&e.data.indexOf(t)>=0?JSON.parse(e.data):e.data;if(n[t]&&n[t].callId){var r=n[t];void 0!==Sm[r.callId]&&Sm[r.callId](r.returnValue,r.success)}}window[o]=function(t,i,s,d){e(this,a);var c=Math.random()+"",u="".concat(o,"Call"),l=n({},u,{command:t,parameter:d,callId:c,version:i});Sm[c]=s,r.postMessage(l,"*")}.bind(this),window.addEventListener("message",s,!1),window[o](t,xm.version,i)}("addEventListener",xm.frame,a))):i({result:"cmpVersionNotV2",cmp:xm}):i({result:"cmpNotFound"})}.bind(this)))}var Im=new(function(){function e(){i(this,e),this.productName="Game Distribution"}var t;return a(e,[{key:"track",value:(t=r(o.mark((function e(t){var n,r,i,a,s,d;return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=null==t||null===(n=t.visitor)||void 0===n?void 0:n.visitorId){e.next=3;break}return e.abrupt("return");case 3:return i=encodeURIComponent(this.productName),a=encodeURIComponent(r),e.prev=5,s="https://tracker-v4.gamedock.io/v1/events-tracker/track/product/".concat(i,"/user_id/").concat(a),e.next=9,fetch(s,{method:"POST"});case 9:e.next=25;break;case 12:return e.prev=12,e.t0=e.catch(5),console.log("GAME_DOCK. fail v4",e.t0),e.prev=15,d="https://tracker.gamedock.io/v1/events-tracker/track/product/".concat(i,"/user_id/").concat(a),e.next=19,fetch(d,{method:"POST"});case 19:e.next=25;break;case 22:e.prev=22,e.t1=e.catch(15),console.log("GAME_DOCK. fail v6",e.t1);case 25:case"end":return e.stop()}}),e,this,[[5,12],[15,22]])}))),function(e){return t.apply(this,arguments)})}]),e}());function Cm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Pm(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Cm(Object(r),!0).forEach((function(t){n(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Cm(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Lm=null,Mm=function(){function n(t){var r=this;if(i(this,n),Lm)return Lm;Lm=this,this._defaults=this._getDefaultOptions(),this._extendDefaultOptions(this._defaults,t),this._version=t.version||"0.0.0",this._bridge=this._getBridgeContext(),this._parentURL=this._bridge.parentURL,this._parentDomain=this._bridge.parentDomain,this._topDomain=this._bridge.topDomain,this._isFullScreen=!1,this._setConsoleBanner(),this._initializeMessageRouter(),this._checkConsole(),this._subscribeToEvents(),this.sdkReady=new Promise(this._initializeSDKWithGameData.bind(this)),this.sdkReady.then(function(t){e(this,r),this._sdk_ready=!0}.bind(this)).catch(function(t){e(this,r),this._sdk_ready=!1}.bind(this)).finally(function(){var t=this;e(this,r),this._sendLoaderDataEvent(),this._checkSplashAndPromoScreens(),this._initBlockingExternals(),window.addEventListener("DOMNodeInserted",function(){if(e(this,t),this._gameData.block_exts&&this._removeExternalsInHtml({enabled:!1}),document.getElementsByClassName("webgl-content")[0]){var n=document.getElementsByClassName("webgl-content")[0].getElementsByClassName("footer")[0];n&&n.setAttribute("style","display:none")}}.bind(this)),this._checkFullscreen()}.bind(this))}var s,l,h,p,f,v,P,U,G;return a(n,[{key:"testConsent",value:function(){console.log("test-consent. Finding CMP");try{var e=Rm();console.log("CMP found",e),r(o.mark((function e(){var t;return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Om({});case 2:t=e.sent,console.log("After lookup IAB consent",t);case 4:case"end":return e.stop()}}),e)})))()}catch(e){console.log("find CMP error",e)}}},{key:"_sendLoaderDataEvent",value:function(){try{this.options.onLoaderEvent({name:"LOADER_DATA",message:{game:this._gameData,bridge:this._bridge},status:this._sdk_ready?"success":"error"})}catch(e){}}},{key:"isLoaded",value:function(){if(void 0===this._isLoaded){var e=this._isTokenGameURL(),t=this._isExtHostedGameURL(),n=this._isMasterGameURL();this._isLoaded=(e||t&&!n)&&this._gameData.loader.enabled}return this._isLoaded}},{key:"setIsLoaded",value:function(e){this._isLoaded=e}},{key:"_sendLoadedEvent",value:function(){if(!this.isLoaded()){this.setIsLoaded(!0);try{this._sendTunnlEvent(1),this.msgrt.send("loaded",{message:this._hasBlocker?"Has Blocker":"No Blocker"}),this._initGamedockTracker(window.GamedockSDK,"gameplay")}catch(e){}}}},{key:"_safeInit",value:function(){this._checkUserDeclinedTracking(),this._checkWhitelabelPartner(),this._gdpr();var e=this._gameData.diagnostic;void 0!==e&&void 0!==e.close_ga&&!1!==e.close_ga||!this._bridge.isCoreSDKMode&&this._loadGoogleAnalytics(),void 0!==e&&void 0!==e.close_gamedock&&!1!==e.close_gamedock||!this._bridge.isCoreSDKMode&&!this._bridge.noGamedockSDK&&this._loadGamedockTracker(),void 0!==e&&void 0!==e.close_minijuegos&&!1!==e.close_minijuegos||!this._bridge.isCoreSDKMode&&!this._bridge.noMinijuegosSDK&&document.location.search.indexOf("mp_game_id")>=0&&this._loadMiniJuegosGratisTracker()}},{key:"_initializeSDKWithGameData",value:(G=r(o.mark((function t(n,r){var i,a=this;return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this._getGameData();case 3:this._gameData=t.sent,this._bridge.isCoreSDKMode=!(!0===this._gameData.enableAds||!0===(null===(i=this._gameData.enableAds)||void 0===i?void 0:i.enabled)),this._safeInit(),this._checkGameId(),this._checkGameDeleted(),this._checkBlocking(),this._changeMidrollInDebugMode(),void 0!==this._gameData.diagnostic&&void 0!==this._gameData.diagnostic.close_ads&&!1!==this._gameData.diagnostic.close_ads||(this.videoAdReady=this._initializeVideoAd().catch(function(t){return e(this,a),console.error(t.message||t)}.bind(this))),this._sendSDKReady(),n(this._gameData),t.next=20;break;case 15:t.prev=15,t.t0=t.catch(0),this._sendSDKError(t.t0),this.onResumeGame(t.t0.message,"warning"),r(t.t0);case 20:case"end":return t.stop()}}),t,this,[[0,15]])}))),function(e,t){return G.apply(this,arguments)})},{key:"_getDefaultOptions",value:function(){return{debug:!1,testing:!1,gameId:"4f3d7d38d24b740c95da2b03dc3a2333",prefix:"gdsdk__",onEvent:function(e){},onLoaderEvent:function(e){},flashSettings:{adContainerId:"",splashContainerId:""},advertisementSettings:{},resumeGame:function(){},pauseGame:function(){},onInit:function(e){},onError:function(e){},loader:{}}}},{key:"_extendDefaultOptions",value:function(e,t){var n=M(e);this.options=t?m(n,t):n,this.options.gameId=this.options.gameId.trim()}},{key:"_setConsoleBanner",value:function(){if(!this._bridge.noConsoleBanner){var e=tp,t=console.log("%c %c %c GameDistribution.com HTML5 SDK | Version: "+e+" %c %c %c","background: #9854d8","background: #6c2ca7","color: #fff; background: #450f78;","background: #6c2ca7","background: #9854d8","background: #ffffff");console.log.apply(console,t)}}},{key:"_sendTunnlEvent",value:function(e){var t,n=null!==(t=this._gameData.diagnostic&&this._gameData.diagnostic.useTopDomains)&&void 0!==t&&t,r={page_url:decodeURIComponent(n?this._topDomain:this._parentURL),game_id:this.options.gameId,eventtype:e,ts:Date.now()};fetch("https://ana.headerlift.com/event?".concat(j.stringify(r)))}},{key:"_sendAdRequestContext",value:function(e){this.msgrt.send("adctx",{message:e.adTag.bidder})}},{key:"_checkWhitelabelPartner",value:function(){this._whitelabelPartner=!1;var e=y("xanthophyll");e.hasOwnProperty("xanthophyll")&&"true"===e.xanthophyll&&(this._whitelabelPartner=!0,b("White label publisher","".concat(this._whitelabelPartner),"success"))}},{key:"_checkConsole",value:function(){try{if(!c.available)return;"developer.gamedistribution.com"===this._parentDomain?(c.set("gd_debug_ex",!0),c.set("gd_disable_midroll_timer",!0),c.set("gd_tag",!0)):"localhost:3000"===this._parentDomain&&(c.set("gd_debug_ex",!0),c.set("gd_disable_midroll_timer",!0)),c.getBoolean("gd_debug_ex")&&(this.openConsole(),this.msgrt.send("dev.console",{message:this._parentDomain}))}catch(e){}}},{key:"_checkUserDeclinedTracking",value:function(){this._userDeclinedTracking=this._bridge.isCoreSDKMode||document.location.search.indexOf("gdpr-tracking=0")>=0||document.cookie.indexOf("ogdpr_tracking=0")>=0}},{key:"_initializeMessageRouter",value:function(){this.msgrt=new _({gameId:this.options.gameId,hours:(new Date).getHours(),topDomain:this._topDomain,domain:this._parentDomain,referrer:this._parentURL,depth:w(),version:tp,tracking:this._userDeclinedTracking,whitelabel:this._whitelabelPartner,platform:A(),byloader:this._bridge.isTokenGameURL,isTokenGameURL:this._bridge.isTokenGameURL,isMasterGameURL:this._bridge.isMasterGameURL,isExtHostedGameURL:this._bridge.isExtHostedGameURL,byloaderVersion:this._bridge.version})}},{key:"_loadGamedockTracker",value:function(){var t=this;try{var n=["https://cdn.gamedock.io/gamedock-web-tracker/4.3.0/script/gamedock-sdk.min.js"];d(n[0],"GamedockSDK",{alternates:n}).then(function(){e(this,t);var n=this._initGamedockTracker(window.GamedockSDK,"pageview");Im.track(n)}.bind(this)).catch(function(n){e(this,t),this._sendSDKError(n)}.bind(this))}catch(e){}}},{key:"_initGamedockTracker",value:function(e,t){if(!this._bridge.isCoreSDKMode){var n=e.initialize("gd",this._parentDomain);return n.tracking.trackEvent(t,{pageId:this.options.gameId,pageType:"game"}),n}}},{key:"_loadMiniJuegosGratisTracker",value:function(){var t=this;window.mpConfig={game:this.options.gameId,partner:"game-distribution"};var n=["https://ext.minijuegosgratis.com/external-host/main.js"];d(n[0],"MinijuegosSDK",{alternates:n}).catch(function(n){e(this,t),this._sendSDKError(n)}.bind(this))}},{key:"_loadGoogleAnalytics",value:function(){var t=this,n=["https://www.google-analytics.com/analytics.js"];d(n[0],"gdsdk_google_analytics",{alternates:n,error_prefix:"Blocked:",exists:function(){return e(this,t),window.ga}.bind(this)}).then(function(){e(this,t),window.ga("create","UA-60359297-49",{name:"gd",cookieExpires:7776e3,sampleRate:5},"auto"),this._bridge.noGAPageView||window.ga("gd.send","pageview"),this._userDeclinedTracking||window.ga("gd.set","anonymizeIp",!0)}.bind(this)).catch(function(n){e(this,t),this._sendSDKError(n)}.bind(this))}},{key:"_subscribeToEvents",value:function(){var t=this;this.eventBus=new g,E.forEach(function(n){var r=this;return e(this,t),this.eventBus.subscribe(n,function(t){return e(this,r),this._onEvent(t)}.bind(this),"sdk")}.bind(this)),this.eventBus.subscribe("AD_SDK_CANCELED",function(){e(this,t)}.bind(this),"sdk"),k.forEach(function(n){var r=this;return e(this,t),this.eventBus.subscribe(n,function(t){return e(this,r),this._onEvent(t)}.bind(this),"ima")}.bind(this)),this.eventBus.subscribe("COMPLETE",function(){if(e(this,t),"developer.gamedistribution.com"===this._parentDomain||!0===new RegExp("^localhost").test(this._parentDomain)){fetch("https://game.api.gamedistribution.com/game/v2/hasapi/".concat(this.options.gameId,"?timestamp=").concat((new Date).valueOf()));try{var n=JSON.stringify({type:"GD_SDK_IMPLEMENTED",gameID:this.options.gameId});window.location!==window.top.location?window.top.postMessage(n,"*"):null!==window.opener&&window.opener.location!==window.location&&window.opener.postMessage(n,"*")}catch(e){}}}.bind(this),"ima"),this.eventBus.subscribe("CONTENT_PAUSE_REQUESTED",function(){return e(this,t),this.onPauseGame("New advertisements requested and loaded","success")}.bind(this),"ima"),this.eventBus.subscribe("IMPRESSION",function(n){e(this,t),this.msgrt.send("ad.impression")}.bind(this),"ima"),this.eventBus.subscribe("SKIPPED",function(n){e(this,t)}.bind(this),"ima"),this.eventBus.subscribe("AD_ERROR",function(n){e(this,t),this.msgrt.send("ad.error",{message:n.message,details:n.details})}.bind(this),"ima"),this.eventBus.subscribe("CLICK",function(n){e(this,t)}.bind(this),"ima"),this.eventBus.subscribe("COMPLETE",function(n){e(this,t)}.bind(this),"ima"),this.eventBus.subscribe("AD_SDK_REQUEST",function(n){e(this,t),this._sendAdRequestContext(n.message)}.bind(this),"sdk"),this.eventBus.subscribe("SDK_ERROR",function(n){e(this,t),n.message.startsWith("Blocked:")?this._bridge.noBlockerEvent||(this.msgrt.send("error",{message:n.message}),this._hasBlocker||(this._hasBlocker=!0,this._sendTunnlEvent(3))):this.msgrt.send("error",{message:n.message})}.bind(this),"sdk"),this.eventBus.subscribe("AD_REQUEST",function(n){e(this,t)}.bind(this),"sdk"),this.eventBus.subscribe("AD_REQUEST_KEYS_EMPTY",function(n){e(this,t),this.msgrt.send("tunnl.keys.empty",{message:n.message,details:n.details})}.bind(this),"sdk"),this.eventBus.subscribe("AD_REQUEST_KEYS_FALLBACK",function(n){e(this,t),this.msgrt.send("tunnl.keys.fallback",{message:n.message,details:n.details})}.bind(this),"sdk"),this.eventBus.subscribe("AD_T4R",function(n){return e(this,t),this.msgrt.send("adt4r")}.bind(this),"sdk")}},{key:"_gdpr",value:function(){var t=this,n=!this._bridge.isCoreSDKMode&&document.location.search.indexOf("gdpr-tracking")>=0,r=document.location.search.indexOf("gdpr-tracking=1")>=0,i=!this._bridge.isCoreSDKMode&&document.location.search.indexOf("gdpr-targeting")>=0,a=document.location.search.indexOf("gdpr-targeting=1")>=0,o=!this._bridge.isCoreSDKMode&&document.location.search.indexOf("gdpr-third-party")>=0,s=document.location.search.indexOf("gdpr-third-party=1")>=0;[{name:"SDK_GDPR_TRACKING",message:n?r?"Allowed":"Not allowed":"Not set",status:r?"success":"warning",label:n?r?"1":"0":"not set"},{name:"SDK_GDPR_TARGETING",message:i?a?"Allowed":"Not allowed":"Not set",status:a?"success":"warning",label:i?a?"1":"0":"not set"},{name:"SDK_GDPR_THIRD_PARTY",message:o?s?"Allowed":"Not allowed":"Not set",status:s?"success":"warning",label:o?s?"1":"0":"not set"}].forEach(function(n){e(this,t),this.eventBus.broadcast(n.name,{name:n.name,message:n.message,status:n.status,analytics:{category:n.name,action:this._parentDomain,label:n.label}})}.bind(this))}},{key:"_checkGameId",value:function(){this.options.gameId===this._defaults.gameId&&this._sendSDKError("Check correctness of your GAME ID. Otherwise, no revenue will be recorded.")}},{key:"_getDefaultGameData",value:function(){return{gameId:this.options.gameId,enableAds:!0,preroll:!0,midroll:12e4,rewardedAds:!1,title:"",tags:[],category:"",assets:[],dmain:!0,sdk:this._getDefaultAdSDKData(),loader:this._getDefaultLoaderData(),splash:this._getDefaultSplashData(),promo:this._getDefaultPromoData(),dAds:this._getDefaultDisplayAdsData(),pAds:this._getDefaultPrerollAdsData(),mAds:this._getDefaultMidrollAdsData(),rAds:this._getDefaultRewardedAdsData()}}},{key:"_getDefaultAdSDKData",value:function(){return{}}},{key:"_getDefaultLoaderData",value:function(){return{}}},{key:"_getDefaultSplashData",value:function(){return{}}},{key:"_getDefaultPromoData",value:function(){return{}}},{key:"_getDefaultDisplayAdsData",value:function(){return{enabled:!0}}},{key:"_getDefaultPrerollAdsData",value:function(){return{}}},{key:"_getDefaultMidrollAdsData",value:function(){return{}}},{key:"_getDefaultRewardedAdsData",value:function(){return{}}},{key:"_getGameDataUrl",value:function(){var e=void 0!==this._topDomain&&"undefined"!==this._topDomain?this._topDomain:this._parentDomain;return"https://game.api.gamedistribution.com/game/v4/get/".concat(this.options.gameId.replace(/-/g,""),"/?domain=").concat(e,"&v=").concat(tp,"&localTime=").concat((new Date).getHours())}},{key:"_checkBlocking",value:(U=r(o.mark((function t(){var n,r,i=this;return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=this._gameData,n=void 0===this._gameData.dmain||this._gameData.dmain,(r.bloc_gard&&!0===r.bloc_gard.enabled||!n)&&(this.msgrt.send("blocked"),setTimeout(function(){e(this,i),window.location.href="https://html5.api.gamedistribution.com/blocked.html?".concat(j.stringify({domain:this._parentDomain,id:r.gameId,img:this._get_game_thumbnail_url(),title:r.title}))}.bind(this),100));case 5:case"end":return t.stop()}}),t,this)}))),function(){return U.apply(this,arguments)})},{key:"_checkGameDeleted",value:function(){var t=this;6===this._gameData.status&&(console.log("%c %c %c This game was deleted, please remove it in your website... ","background: #F2181A","background: #F23818","color: #fff; background: #F23818;","background: #F55E60","background: #F55E60","background: #c4161e; color: #fff;"),setTimeout(function(){e(this,t),document.location="https://html5.api.gamedistribution.com/deleted.html"}.bind(this),100))}},{key:"_changeMidrollInDebugMode",value:function(){var e=this._gameData;c.available&&c.getBoolean("gd_debug_ex")&&(c.getBoolean("gd_disable_midroll_timer")?e.midroll=0:e.midroll=this._getDefaultGameData().midroll)}},{key:"_checkSplashAndPromoScreens",value:function(){this._gameData.loader&&!1===this._gameData.loader.mobile&&this._getisMobile()&&(this._gameData.loader.enabled=!1);var e=this._gameData,t=e.gdpr&&!0===e.gdpr.consent,n=e.loader,r=e.promo;e.preroll||(this.adRequestTimer=Date.now()),this.options.loader.enabled?r.enabled?this._createPromoBeforeSplash(e,t):n.enabled?this._createSplash(e,t):this.onResumeGame("Advertisement(s) are done. Start / resume the game.","success"):n.enabled||this._bridge.isTokenGameURL&&this._bridge.isExtHostedGameURL||(this.options.advertisementSettings.autoplay||t?r.enabled?this._createPromoBeforeSplash(e,t):!1!==n.enabled&&this._createSplash(e,t):r.enabled&&this._createPromo(e,t))}},{key:"_initializeVideoAd",value:(P=r(o.mark((function e(){var t;return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._bridge.isCoreSDKMode){e.next=2;break}return e.abrupt("return");case 2:return(t=this._gameData).sdk.enabled&&(this.options.advertisementSettings=m(this.options.advertisementSettings,t.sdk)),this.macros=new D({game:t,bridge:this._bridge}),this.adInstance=new Pp(this.options.flashSettings.adContainerId,this.options.advertisementSettings,{parentURL:this._parentURL,parentDomain:this._parentDomain,topDomain:this._topDomain}),this.adInstance.gameId=t.gameId,this.adInstance.category=t.category,this.adInstance.tags=t.tags,this.adInstance.noPreroll=this._bridge.noPreroll,this.adInstance.macros=this.macros,this.adInstance.gameData=t,this.adInstance.msgrt=this.msgrt,e.next=15,this.adInstance.start();case 15:case"end":return e.stop()}}),e,this)}))),function(){return P.apply(this,arguments)})},{key:"_sendSDKReady",value:function(){var e="Everything is ready.";this.eventBus.broadcast("SDK_READY",{message:e,status:"success"});try{this.options.onInit(e)}catch(e){b("DEVELOPER_ERROR",e.message,"warning")}}},{key:"_sendSDKError",value:function(e){e=e.message?e:{message:e};this.eventBus.broadcast("SDK_ERROR",{message:e.message,status:"error"});try{this.options.onError(e)}catch(e){b("DEVELOPER_ERROR",e.message,"warning")}}},{key:"_onEvent",value:function(e){b(e.name,e.message,e.status);try{this.options.onEvent({name:e.name,message:e.message,status:e.status})}catch(e){b("DEVELOPER_ERROR",e.message,"warning")}}},{key:"_getGameData",value:function(){var t=this;return new Promise(function(n){var r=this;e(this,t);var i=this._getDefaultGameData(),a=this._getGameDataUrl();fetch(a).then(function(t){return e(this,r),t.json()}.bind(this)).then(function(t){if(e(this,r),t.success){var a,o=t.result.game,s={gameId:o.gameMd5,status:o.status,description:o.description,enableAds:!0===o.enableAds||!0===(null===(a=o.enableAds)||void 0===a?void 0:a.enabled),preroll:o.preRoll,midroll:6e4*o.timeAds,rewardedAds:o.rewardedAds,title:o.title,tags:o.tags,category:o.category,assets:o.assets,disp_2nd_prer:o.disp_2nd_prer,ctry_vst:o.ctry_vst,ctry:o.ctry,crtv:o.crtv,dmain:o.dmain,block_exts:this._parseAndSelectRandomOne(o.push_cuda),bloc_gard:this._parseAndSelectRandomOne(o.bloc_gard),cookie:this._parseAndSelectRandomOne(o.cookie),gdpr:this._parseAndSelectRandomOne(o.gdpr),diagnostic:this._parseAndSelectRandomOne(o.diagnostic),sdk:this._parseAndSelectRandomOne(o.sdk)||this._getDefaultAdSDKData(),loader:this._parseAndSelectRandomOne(o.loader)||this._getDefaultLoaderData(),splash:this._parseAndSelectRandomOne(o.splash)||this._getDefaultSplashData(),promo:this._parseAndSelectRandomOne(o.promo)||this._getDefaultPromoData(),dAds:this._parseAndSelectRandomOne(o.dads)||this._getDefaultDisplayAdsData(),pAds:this._parseAndSelectRandomOne(o.pads)||this._getDefaultPrerollAdsData(),mAds:this._parseAndSelectRandomOne(o.mads)||this._getDefaultMidrollAdsData(),rAds:this._parseAndSelectRandomOne(o.rads)||this._getDefaultRewardedAdsData()},d=m(M(i),s);this._bridge.noPreroll=(!this._getisMobile()||!1!==d.loader.mobile)&&this._bridge.noPreroll,this._bridge.noPreroll&&(this.adRequestTimer=Date.now()),this.msgrt.setGameData(d),x(d.diagnostic),n(d)}else i.failed=!0,n(i)}.bind(this)).catch(function(t){e(this,r),i.failed=!0,n(i)}.bind(this))}.bind(this))}},{key:"_createSplash",value:(v=r(o.mark((function t(n,r){var i,a,s=this;return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this._getSplashTemplate(n);case 2:i=t.sent,(a=new i(Pm(Pm({},this.options),{},{isConsentDomain:r,version:tp}),n,this._parentDomain)).on("playClick",function(){var t=this;if(e(this,s),r){var n=new Date;n.setDate(n.getDate()+90),document.cookie="ogdpr_tracking=1; expires=".concat(n.toUTCString(),"; path=/")}this.showAd(u.Interstitial).catch(function(n){e(this,t)}.bind(this))}.bind(this)),a.on("slotVisibilityChanged",function(t){e(this,s)}.bind(this)),this.onPauseGame("Pause the game and wait for a user gesture","success"),this.eventBus.subscribe("SDK_GAME_PAUSE",function(){e(this,s),a.hide()}.bind(this)),this.eventBus.subscribe("SDK_GAME_START",function(){e(this,s),a.hide()}.bind(this));case 9:case"end":return t.stop()}}),t,this)}))),function(e,t){return v.apply(this,arguments)})},{key:"_createPromoBeforeSplash",value:(f=r(o.mark((function t(n,r){var i,a,s=this;return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this._instancePromo(n);case 2:i=t.sent,(a=new i(Pm(Pm({},this.options),{},{isConsentDomain:r,version:tp}),n)).on("skipClick",function(){e(this,s),a.hide(),this._createSplash(n,r)}.bind(this)),a.on("adCompleted",function(){e(this,s),a.hide(),this._createSplash(n,r)}.bind(this));case 6:case"end":return t.stop()}}),t,this)}))),function(e,t){return f.apply(this,arguments)})},{key:"_createPromo",value:(p=r(o.mark((function t(n,r){var i,a,s=this;return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this._instancePromo(n);case 2:i=t.sent,(a=new i(Pm(Pm({},this.options),{},{isConsentDomain:r,version:tp}),n)).on("skipClick",function(){e(this,s),a.hide(),this.onResumeGame("Resumed after the promo","warning")}.bind(this)),this.onPauseGame("Pause the game for the promo","success");case 6:case"end":return t.stop()}}),t,this)}))),function(e,t){return p.apply(this,arguments)})},{key:"showBanner",value:function(){var t=this;this.showAd(u.Interstitial).catch(function(n){e(this,t)}.bind(this))}},{key:"showAd",value:(h=r(o.mark((function t(n,i){var a=this;return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise(function(){var t=r(o.mark((function t(r,s){var d,c,l,h,p,f=this;return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,a.sdkReady;case 3:return d=t.sent,t.next=6,a.videoAdReady;case 6:if(a._sendLoadedEvent(),!d.bloc_gard||!0!==d.bloc_gard.enabled){t.next=9;break}throw new Error("Game or domain is blocked.");case 9:if(d.enableAds&&!a._whitelabelPartner){t.next=11;break}throw new Error("Advertisements are disabled.");case 11:if(n){t.next=15;break}n=u.Interstitial,t.next=17;break;case 15:if(n===u.Interstitial||n===u.Rewarded){t.next=17;break}throw new Error("Unsupported an advertisement type: ",n);case 17:if(n!==u.Rewarded||d.rewardedAds){t.next=19;break}throw new Error("Rewarded ads are disabled.");case 19:if(n!==u.Interstitial||void 0===a.adRequestTimer){t.next=23;break}if(!(Date.now()-a.adRequestTimer<d.midroll)){t.next=23;break}throw new Error("The advertisement was requested too soon.");case 23:return c="main.showad",l=function(t){var i=this;e(this,f),a.adInstance.resetForNext(),a.showAd(n,t).then(function(t){e(this,i),a.adRequestTimer=Date.now(),a.onResumeGame("Advertisement(s) are done. Start / resume the game.","success"),r("")}.bind(this)).catch(function(o){var c=this;if(e(this,i),t.retry_on_success)a.adRequestTimer=Date.now(),a.onResumeGame("Advertisement(s) are done. Start / resume the game.","success"),r("");else if(t.retry_on_failure){var l=(d.promo||{}).puzzle||{};l.enabled&&(l.trigger.interstitial_failure&&n===u.Interstitial||l.trigger.rewarded_failure&&n===u.Rewarded)?a._showPromoDisplayAd().then(function(t){e(this,c),a.onResumeGame("DisplayAd succeded.","success"),r("DisplayAd succeded.")}.bind(this)).catch(function(t){e(this,c),a.onResumeGame("DisplayAd failed.","warning"),s("DisplayAd failed.")}.bind(this)):(a.onResumeGame(o.message||o,"warning"),s(o.message||o))}else a.onResumeGame(o.message||o,"warning"),s(o.message||o)}.bind(this))}.bind(this),h=function(t){var o=this;if(e(this,f),a.eventBus.unsubscribeScope(c),void 0!==i)s(t.message);else if(a._isRetryOnFailureEnabled(n))l({retry_on_failure:!0});else{a.adRequestTimer=Date.now();var h,p,m=(d.promo||{}).puzzle||{};m.enabled&&(m.trigger.interstitial_failure&&n===u.Interstitial||m.trigger.rewarded_failure&&n===u.Rewarded)?a._showPromoDisplayAd().then(function(t){e(this,o),a.onResumeGame("DisplayAd succeded.","success"),r("DisplayAd succeded.")}.bind(this)).catch(function(t){e(this,o),a.onResumeGame("DisplayAd failed.","warning"),s("DisplayAd failed.")}.bind(this)):(!0===(null===(h=a._gameData.promo)||void 0===h||null===(p=h.puzzle)||void 0===p?void 0:p.enableAfterPreroll)&&(a._gameData.promo.puzzle.enabled=!0),a.onResumeGame(t.message,"warning"),s(t.message))}}.bind(this),p=function(t){e(this,f),a.eventBus.unsubscribeScope(c),void 0!==i?r(t.message):a._isRetryOnSuccessEnabled(n)?l({retry_on_success:!0}):(a.adRequestTimer=Date.now(),a.onResumeGame("Advertisement(s) are done. Start / resume the game.","success"),r(t.message))}.bind(this),a.eventBus.subscribe("AD_ERROR",h,c),a.eventBus.subscribe("AD_SDK_CANCELED",h,c),a.eventBus.subscribe("AD_SUCCESS",p,c),t.next=32,a.adInstance.startAd(n,i);case 32:a._post_message({topic:"adrequest.instream"}),t.next=39;break;case 35:t.prev=35,t.t0=t.catch(0),a.onResumeGame(t.t0.message,"warning"),s(t.t0.message);case 39:case"end":return t.stop()}}),t,this,[[0,35]])})));return function(e,n){return t.apply(this,arguments)}}()));case 1:case"end":return t.stop()}}),t)}))),function(e,t){return h.apply(this,arguments)})},{key:"_isRetryOnSuccessEnabled",value:function(e){var t=this._gameData,n=this.adInstance.getAdPosition(e),r=t.sdk.enabled&&(!0===t.sdk.retry_on_success||L(t.sdk.retry_on_success));return"preroll"===n&&void 0!==t.pAds.retry_on_success?r=r&&t.pAds.retry_on_success:"midroll"===n&&void 0!==t.mAds.retry_on_success?r=r&&t.mAds.retry_on_success:"rewarded"===n&&void 0!==t.rAds.retry_on_success&&(r=r&&t.rAds.retry_on_success),r}},{key:"_isRetryOnFailureEnabled",value:function(e){var t=this._gameData,n=this.adInstance.getAdPosition(e),r=t.sdk.enabled&&(!0===t.sdk.retry_on_failure||L(t.sdk.retry_on_failure));return"preroll"===n&&void 0!==t.pAds.retry_on_failure?r=r&&t.pAds.retry_on_failure:"midroll"===n&&void 0!==t.mAds.retry_on_failure?r=r&&t.mAds.retry_on_failure:"rewarded"===n&&void 0!==t.rAds.retry_on_failure&&(r=r&&t.rAds.retry_on_failure),r}},{key:"preloadAd",value:(l=r(o.mark((function e(t){var n=this;return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(){var e=r(o.mark((function e(r,i){var a,s;return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,n.sdkReady;case 3:return a=e.sent,e.next=6,n.videoAdReady;case 6:if(!a.bloc_gard||!0!==a.bloc_gard.enabled){e.next=8;break}throw new Error("Game or domain is blocked.");case 8:if(a.enableAds&&!n._whitelabelPartner){e.next=10;break}throw new Error("Advertisements are disabled.");case 10:if(t){e.next=14;break}t=u.Rewarded,e.next=16;break;case 14:if(t===u.Interstitial||t===u.Rewarded){e.next=16;break}throw new Error("Unsupported an advertisement type:"+t);case 16:if(t!==u.Rewarded||a.rewardedAds){e.next=18;break}throw new Error("Rewarded ads are disabled.");case 18:return e.next=20,n.adInstance.preloadAd(t);case 20:s=e.sent,r(s),e.next=27;break;case 24:e.prev=24,e.t0=e.catch(0),i(e.t0);case 27:case"end":return e.stop()}}),e,null,[[0,24]])})));return function(t,n){return e.apply(this,arguments)}}()));case 1:case"end":return e.stop()}}),e)}))),function(e){return l.apply(this,arguments)})},{key:"cancelAd",value:(s=r(o.mark((function e(){var t=this;return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(){var e=r(o.mark((function e(n,r){return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:try{t.adInstance.cancel(),t.onResumeGame("Advertisement(s) are cancelled. Start / resume the game.","success"),r()}catch(e){t.onResumeGame("Advertisement(s) are cancelled. Start / resume the game.","success"),n(e.message)}case 1:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()));case 1:case"end":return e.stop()}}),e)}))),function(){return s.apply(this,arguments)})},{key:"showDisplayAd",value:function(e){var t=this;return new Promise(function(){var n=r(o.mark((function n(r,i){var a;return o.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,t.sdkReady;case 3:return a=n.sent,n.next=6,t.videoAdReady;case 6:if(!a.dAds.enabled){n.next=13;break}return n.next=9,t.adInstance.loadDisplayAd(e);case 9:t._post_message({topic:"adrequest.display"}),r(),n.next=14;break;case 13:i("Display-Ads are disabled.");case 14:n.next=19;break;case 16:n.prev=16,n.t0=n.catch(0),i(n.t0.message||n.t0);case 19:case"end":return n.stop()}}),n,null,[[0,16]])})));return function(e,t){return n.apply(this,arguments)}}())}},{key:"onResumeGame",value:function(e,t){this._allowExternals({enabled:!1});try{this.options.resumeGame()}catch(e){b("DEVELOPER_ERROR",e.message,"warning")}var n="SDK_GAME_START";this.eventBus.broadcast(n,{name:n,message:e,status:t,analytics:{category:"SDK",action:n,label:this.options.gameId+""}})}},{key:"onPauseGame",value:function(e,t){this._allowExternals({enabled:!0});try{this.options.pauseGame()}catch(e){b("DEVELOPER_ERROR",e.message,"warning")}var n="SDK_GAME_PAUSE";this.eventBus.broadcast(n,{name:n,message:e,status:t,analytics:{category:"SDK",action:n,label:this.options.gameId+""}})}},{key:"openConsole",value:function(){try{new S(this).start(),c.set("gd_debug_ex",!0)}catch(e){console.log(e)}}},{key:"_initBlockingExternals",value:function(){var e=this._gameData;(e.failed||e.block_exts&&e.block_exts.enabled)&&(this.window_open=window.open,this._allowExternals({enabled:!1}),this._removeExternalsInHtml({enabled:!1}))}},{key:"_checkFullscreen",value:function(){var t=this;try{var n=this._gameData;n.sdk.fullscreen&&"auto"===n.sdk.fullscreen&&document.addEventListener("click",function(){if(e(this,t),!this._isFullScreen){var n=document.body,r=n.requestFullScreen||n.webkitRequestFullScreen||n.mozRequestFullScreen||n.msRequestFullscreen;if(r)r.call(n);else if(void 0!==window.ActiveXObject){var i=new ActiveXObject("WScript.Shell");null!==i&&i.SendKeys("{F11}")}this._isFullScreen=!0}}.bind(this))}catch(e){console.log("Fullscreen error handled...",e)}}},{key:"_allowExternals",value:function(t){var n=this;void 0!==this.window_open&&(!1===t.enabled?window.open=function(t){e(this,n),this.msgrt.send("external",{message:"C> ".concat(t)}),(t.startsWith("https://play.google.com")||t.startsWith("https://itunes.apple.com"))&&this.window_open.call(null,t)}.bind(this):window.open=this.window_open)}},{key:"_removeExternalsInHtml",value:function(t){var n=this;!1===t.enabled&&window.document.querySelectorAll("a").forEach(function(t){var r=this;e(this,n);var i=!!(t.innerText.toLowerCase().includes("start")||t.innerText.toLowerCase().includes("play")||t.innerText.toLowerCase().includes("continue")),a=t.getAttribute("href");t.removeAttribute("href"),i||(t.onclick=function(t){return e(this,r),t.preventDefault(),this.msgrt.send("external",{message:"H> ".concat(a)}),!1}.bind(this))}.bind(this))}},{key:"_getBridgeContext",value:function(){var e=this._isTokenGameURL(),t=this._isMasterGameURL(),n=this._isExtHostedGameURL(),r=e||n?this._getTokenGameURLConfig():{};r=r||{};var i=decodeURIComponent((e||n)&&r.parentURL?r.parentURL:T()),a=decodeURIComponent((e||n)&&r.parentDomain?r.parentDomain:R()),o=decodeURIComponent((e||n)&&r.topDomain?r.topDomain:O()),s=(e||n)&&r.loaderEnabled,d=(e||n)&&r.loaderEnabled,c=(e||n)&&r.loaderEnabled,u=(e||n)&&r.loaderEnabled,l=(e||n)&&r.loaderEnabled,h=(e||n)&&r.loaderEnabled,p=(e||n)&&r.loaderEnabled,f=(e||n)&&r.loaderEnabled,m=(e||n)&&r.loaderEnabled&&r.hasImpression&&r.version>="1.1.24";return{isTokenGameURL:e,isMasterGameURL:t,isExtHostedGameURL:n,noConsoleBanner:s,noLoadedEvent:d,noBlockerEvent:c,noPreroll:f,parentURL:i,parentDomain:a,topDomain:o,noGAPageView:u,noLotamePageView:l,noGamedockSDK:h,noMinijuegosSDK:p,version:r.version,pauseGameOnStartup:m,depth:w(),domainMatched:a===o,exports:{formatTokenURLSearch:this._formatTokenURLSearch.bind(this),extendUrlQuery:this._extendUrlQuery.bind(this),base64Encode:this._base64_encode.bind(this)}}}},{key:"_isMasterGameURL",value:function(){var e=/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Fa-f0-9]{32})(.*)$/i;return e.test(location.href)||!this._isTokenGameURL()&&e.test(document.referrer)}},{key:"_isTokenGameURL",value:function(){var e=/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Za-z0-9]{8})\/(.*)$/i;return e.test(location.href)||e.test(document.referrer)}},{key:"_isExtHostedGameURL",value:function(){var e=/^http[s]?:\/\/.*?gd_sdk_referrer_url=.*$/i;return e.test(location.href)||e.test(document.referrer)}},{key:"_getTokenGameURLConfig",value:function(){try{var e,t=/http[s]?:\/\/html5\.gamedistribution\.com\/[A-Za-z0-9]{8}\/[A-Fa-f0-9]{32}\/.*/i;if(t.test(location.href)){var n=new C(location.href,!0);if(!n.query.gd_zone_config)return;e=n.query.gd_zone_config}else if(t.test(document.referrer)){var r=new C(document.referrer,!0);if(!r.query.gd_zone_config)return;e=r.query.gd_zone_config}else{var i=new C(location.href,!0);if(!i.query.gd_zone_config)return;e=i.query.gd_zone_config}return JSON.parse(B.decode(decodeURIComponent(e)))}catch(e){}}},{key:"_getSplashTemplate",value:function(e){return new km(e.splash).splash()}},{key:"_instancePromo",value:function(e){var t,n=null!==(t=e.promo)&&void 0!==t&&t.puzzle?"Puzzle":"Hammer";return new Em(n).promo()}},{key:"_formatTokenURLSearch",value:function(e){var t="";try{t=encodeURIComponent(B.encode(JSON.stringify(e)))}catch(e){}try{var n=new C(location.href,!0);return n.query=n.query||{},n.query.gd_zone_config=t,"?".concat(j.stringify(n.query))}catch(e){return"?gd_zone_config=".concat(t)}}},{key:"_extendUrlQuery",value:function(e,t){var n=new C(e,!0);return n.query=Pm(Pm({},n.query),t),n.toString()}},{key:"_base64_encode",value:function(e){return B.encode(JSON.stringify(e))}},{key:"_parseAndSelectRandomOne",value:function(e){var n=this._selectRandomOne("object"===t(e)?e:I(e));return n&&n.version?tp>=n.version?n:void 0:n}},{key:"_selectRandomOne",value:function(t){var n=this;if(!jp(t)||0===t.length)return t;if(1===t.length)return t[0];var r=0;t.forEach(function(t){e(this,n),t.weight=t.weight||1,r+=t.weight}.bind(this));var i=Math.floor(Math.random()*Math.floor(r));r=0;for(var a=0;a<t.length;a++){var o=t[a];if(i<(r+=o.weight))return o}}},{key:"session",value:function(){var e=this;return new Promise(function(){var t=r(o.mark((function t(n,r){var i;return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e.sdkReady;case 3:t.next=7;break;case 5:t.prev=5,t.t0=t.catch(0);case 7:i=e._gameData,n({ads:{display:{enabled:i.dAds.enabled},rewarded:{enabled:i.rewardedAds}},location:{parentDomain:e._bridge.parentDomain,topDomain:e._bridge.topDomain,parentURL:e._bridge.parentURL,depth:e._bridge.depth,loadedByGameZone:e._bridge.isTokenGameURL}});case 9:case"end":return t.stop()}}),t,null,[[0,5]])})));return function(e,n){return t.apply(this,arguments)}}())}},{key:"_showPromoDisplayAd",value:function(){var t=this;return new Promise(function(n,r){var i=this;e(this,t);var a=this._gameData;this._instancePromo(a).then(function(t){var o=this;e(this,i);var s=new t(Pm(Pm({},this.options),{},{version:tp}),a),d="promo-display";this.eventBus.unsubscribeScope(d);var c=function(){e(this,o),this.eventBus.unsubscribeScope(d),s.show()}.bind(this),u=function(){e(this,o),this.eventBus.unsubscribeScope(d),s.hide(),r("No promo display ad")}.bind(this);this.eventBus.subscribe("DISPLAYAD_IMPRESSION",c,d),this.eventBus.subscribe("DISPLAYAD_ERROR",u,d),this.showDisplayAd({containerId:s.getSlotContainerId(),slotId:s.getSlotId(),visible:!0}).catch(function(t){e(this,o),s.hide(),r(t)}.bind(this)),s.on("skipClick",function(){e(this,o),s.hide(),n()}.bind(this)),s.on("adCompleted",function(){e(this,o),s.hide(),n()}.bind(this))}.bind(this))}.bind(this))}},{key:"_getisMobile",value:function(){var e,t=!1;return e=navigator.userAgent||navigator.vendor||window.opera,(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(e.substr(0,4)))&&(t=!0),!1===t&&window.orientation>-1&&(t=!0),t}},{key:"_get_game_thumbnail_url",value:function(){var t=this,n=this._gameData,r=n.assets.find(function(n){return e(this,t),n.hasOwnProperty("name")&&512===n.width&&512===n.height}.bind(this));return r||(r=n.assets.length>0?n.assets[0]:{name:"logo.svg"}),"https://img.gamedistribution.com/".concat(r.name)}},{key:"_post_message",value:function(e){var t,n=e.topic,r=e.data,i=null!==(t=location.ancestorOrigins)&&void 0!==t&&t.length?location.ancestorOrigins[location.ancestorOrigins.length-1]:"*";try{var a=window.top||window.parent;a&&a.postMessage({source:"gdsdk",topic:n,data:r},i)}catch(e){console.error((null==e?void 0:e.message)||e)}}}]),n}(),jm=new function e(){var t=this;i(this,e),n(this,"load",r(o.mark((function e(){return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Am("Leaderboard");case 2:t.leaderboard=e.sent;case 3:case"end":return e.stop()}}),e)})))),n(this,"showLeaderboard",function(){var e=r(o.mark((function e(n){var r;return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=window.GD_OPTIONS.gameId,t.leaderboard){e.next=4;break}return e.next=4,t.load();case 4:t.leaderboard.showLeaderBoard(r,n);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),n(this,"addScore",function(){var e=r(o.mark((function e(n){return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.leaderboard){e.next=3;break}return e.next=3,t.load();case 3:t.leaderboard.addScore(n);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),this.moduleName="Leaderboard",this.moduleConfig={source:"https://pm.gamedistribution.com/@bygd/gd-sdk-leaderboard/0.1.43/dist/default/iife/index.js",dependencies:["react","react-dom","redux","react-redux","material-ui-core"]},_m(this.moduleName,this.moduleConfig)},Um=new Mm(function(){var e={};try{"object"===("undefined"==typeof GD_OPTIONS?"undefined":t(GD_OPTIONS))&&GD_OPTIONS?e=GD_OPTIONS:window.gdApi&&"object"===t(window.gdApi.q[0][0])&&window.gdApi.q[0][0]&&((e=window.gdApi.q[0][0]).hasOwnProperty("advertisementSettings")||(e.advertisementSettings={autoplay:!0}))}catch(e){console.log("_get_developer_sets failed",e)}return e}());function Bm(){var t=this;this.AdType=u,this.preloadAd=function(e){return Um.preloadAd(e)},this.showAd=function(e,t){return e===u.Display?Um.showDisplayAd(t):Um.showAd(e)},this.cancelAd=function(){return Um.cancelAd()},this.openConsole=function(){Um.openConsole()},this.getSession=function(){return Um.session()},this.leaderboard={show:function(){e(this,t),jm.showLeaderboard()}.bind(this),addScore:function(n){e(this,t),jm.addScore(n)}.bind(this)}}Bm.prototype=new function(){this.showBanner=function(){Um.showBanner()},this.play=function(){},this.customLog=function(){}},window.gdsdk=new Bm,window.gdApi=window.gdsdk;