@bygd/gd-sdk-pes 1.43.34 → 1.43.35

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.
@@ -1 +1 @@
1
- import e from"@babel/runtime/helpers/asyncToGenerator";import t from"@babel/runtime/helpers/newArrowCheck";import n from"@babel/runtime/helpers/typeof";import r from"@babel/runtime/regenerator";import{parseJSON as i,getParentUrl as a,getParentDomain as s,getIframeDepth as o,getQueryParams as d,getTopDomain as u,getMobilePlatform as c,MessageRouter as l,Ls as h,extendDefaults as p,dankLog as f,getScript as m,AdType as v,Layers as g,getKeyByValue as A,getQueryString as b,EventBus as _,getIMASampleTags as y,SDKEvents as w,IMAEvents as k,Macros as x,setDankLog as E,ImplementationTest as D}from"@bygd/gd-sdk-era/dist/default";import S from"@babel/runtime/helpers/createClass";import R from"@babel/runtime/helpers/classCallCheck";import T from"@babel/runtime/helpers/defineProperty";import I from"url-parse";import{Base64 as C}from"js-base64";import O from"validator";import P from"is-valid-domain";import L from"get-value";import B from"set-value";import U from"lodash.clonedeep";import{EventEmitter as M}from"events";import F from"@fnet/inter-service-js";import j from"ua-parser-js";import G from"@babel/runtime/helpers/toConsumableArray";import N from"can-autoplay";import{isPlainObject as q}from"is-plain-object";import H from"querystringify";import V from"lodash.merge";import{v4 as Q}from"uuid";import z from"@flownet/lib-connect-to-tcf";var W="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},K=function(e){return e&&e.Math==Math&&e},Y=K("object"==typeof globalThis&&globalThis)||K("object"==typeof window&&window)||K("object"==typeof self&&self)||K("object"==typeof W&&W)||function(){return this}()||Function("return this")(),J={exports:{}},X=Y,Z=Object.defineProperty,$=function(e,t){try{Z(X,e,{value:t,configurable:!0,writable:!0})}catch(n){X[e]=t}return t},ee=$,te="__core-js_shared__",ne=Y[te]||ee(te,{}),re=ne;(J.exports=function(e,t){return re[e]||(re[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.30.1",mode:"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.30.1/LICENSE",source:"https://github.com/zloirock/core-js"});var ie,ae,se=function(e){try{return!!e()}catch(e){return!0}},oe=!se((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),de=oe,ue=Function.prototype,ce=ue.call,le=de&&ue.bind.bind(ce,ce),he=de?le:function(e){return function(){return ce.apply(e,arguments)}},pe=function(e){return null==e},fe=pe,me=TypeError,ve=function(e){if(fe(e))throw me("Can't call method on "+e);return e},ge=ve,Ae=Object,be=function(e){return Ae(ge(e))},_e=be,ye=he({}.hasOwnProperty),we=Object.hasOwn||function(e,t){return ye(_e(e),t)},ke=he,xe=0,Ee=Math.random(),De=ke(1..toString),Se=function(e){return"Symbol("+(void 0===e?"":e)+")_"+De(++xe+Ee,36)},Re="undefined"!=typeof navigator&&String(navigator.userAgent)||"",Te=Y,Ie=Re,Ce=Te.process,Oe=Te.Deno,Pe=Ce&&Ce.versions||Oe&&Oe.version,Le=Pe&&Pe.v8;Le&&(ae=(ie=Le.split("."))[0]>0&&ie[0]<4?1:+(ie[0]+ie[1])),!ae&&Ie&&(!(ie=Ie.match(/Edge\/(\d+)/))||ie[1]>=74)&&(ie=Ie.match(/Chrome\/(\d+)/))&&(ae=+ie[1]);var Be=ae,Ue=Be,Me=se,Fe=!!Object.getOwnPropertySymbols&&!Me((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Ue&&Ue<41})),je=Fe&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Ge=Y,Ne=J.exports,qe=we,He=Se,Ve=Fe,Qe=je,ze=Ge.Symbol,We=Ne("wks"),Ke=Qe?ze.for||ze:ze&&ze.withoutSetter||He,Ye=function(e){return qe(We,e)||(We[e]=Ve&&qe(ze,e)?ze[e]:Ke("Symbol."+e)),We[e]},Je={};Je[Ye("toStringTag")]="z";var Xe="[object z]"===String(Je),Ze="object"==typeof document&&document.all,$e={all:Ze,IS_HTMLDDA:void 0===Ze&&void 0!==Ze},et=$e.all,tt=$e.IS_HTMLDDA?function(e){return"function"==typeof e||e===et}:function(e){return"function"==typeof e},nt={},rt=!se((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),it=tt,at=$e.all,st=$e.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:it(e)||e===at}:function(e){return"object"==typeof e?null!==e:it(e)},ot=st,dt=Y.document,ut=ot(dt)&&ot(dt.createElement),ct=function(e){return ut?dt.createElement(e):{}},lt=ct,ht=!rt&&!se((function(){return 7!=Object.defineProperty(lt("div"),"a",{get:function(){return 7}}).a})),pt=rt&&se((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),ft=st,mt=String,vt=TypeError,gt=function(e){if(ft(e))return e;throw vt(mt(e)+" is not an object")},At=oe,bt=Function.prototype.call,_t=At?bt.bind(bt):function(){return bt.apply(bt,arguments)},yt=Y,wt=tt,kt=function(e,t){return arguments.length<2?(n=yt[e],wt(n)?n:void 0):yt[e]&&yt[e][t];var n},xt=he({}.isPrototypeOf),Et=kt,Dt=tt,St=xt,Rt=Object,Tt=je?function(e){return"symbol"==typeof e}:function(e){var t=Et("Symbol");return Dt(t)&&St(t.prototype,Rt(e))},It=String,Ct=function(e){try{return It(e)}catch(e){return"Object"}},Ot=tt,Pt=Ct,Lt=TypeError,Bt=function(e){if(Ot(e))return e;throw Lt(Pt(e)+" is not a function")},Ut=Bt,Mt=pe,Ft=function(e,t){var n=e[t];return Mt(n)?void 0:Ut(n)},jt=_t,Gt=tt,Nt=st,qt=TypeError,Ht=_t,Vt=st,Qt=Tt,zt=Ft,Wt=function(e,t){var n,r;if("string"===t&&Gt(n=e.toString)&&!Nt(r=jt(n,e)))return r;if(Gt(n=e.valueOf)&&!Nt(r=jt(n,e)))return r;if("string"!==t&&Gt(n=e.toString)&&!Nt(r=jt(n,e)))return r;throw qt("Can't convert object to primitive value")},Kt=TypeError,Yt=Ye("toPrimitive"),Jt=function(e,t){if(!Vt(e)||Qt(e))return e;var n,r=zt(e,Yt);if(r){if(void 0===t&&(t="default"),n=Ht(r,e,t),!Vt(n)||Qt(n))return n;throw Kt("Can't convert object to primitive value")}return void 0===t&&(t="number"),Wt(e,t)},Xt=Tt,Zt=function(e){var t=Jt(e,"string");return Xt(t)?t:t+""},$t=rt,en=ht,tn=pt,nn=gt,rn=Zt,an=TypeError,sn=Object.defineProperty,on=Object.getOwnPropertyDescriptor,dn="enumerable",un="configurable",cn="writable";nt.f=$t?tn?function(e,t,n){if(nn(e),t=rn(t),nn(n),"function"==typeof e&&"prototype"===t&&"value"in n&&cn in n&&!n[cn]){var r=on(e,t);r&&r[cn]&&(e[t]=n.value,n={configurable:un in n?n[un]:r[un],enumerable:dn in n?n[dn]:r[dn],writable:!1})}return sn(e,t,n)}:sn:function(e,t,n){if(nn(e),t=rn(t),nn(n),en)try{return sn(e,t,n)}catch(e){}if("get"in n||"set"in n)throw an("Accessors not supported");return"value"in n&&(e[t]=n.value),e};var ln={exports:{}},hn=rt,pn=we,fn=Function.prototype,mn=hn&&Object.getOwnPropertyDescriptor,vn=pn(fn,"name"),gn={EXISTS:vn,PROPER:vn&&"something"===function(){}.name,CONFIGURABLE:vn&&(!hn||hn&&mn(fn,"name").configurable)},An=tt,bn=ne,_n=he(Function.toString);An(bn.inspectSource)||(bn.inspectSource=function(e){return _n(e)});var yn,wn,kn,xn=bn.inspectSource,En=tt,Dn=Y.WeakMap,Sn=En(Dn)&&/native code/.test(String(Dn)),Rn=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},Tn=nt,In=Rn,Cn=rt?function(e,t,n){return Tn.f(e,t,In(1,n))}:function(e,t,n){return e[t]=n,e},On=J.exports,Pn=Se,Ln=On("keys"),Bn=function(e){return Ln[e]||(Ln[e]=Pn(e))},Un={},Mn=Sn,Fn=Y,jn=st,Gn=Cn,Nn=we,qn=ne,Hn=Bn,Vn=Un,Qn="Object already initialized",zn=Fn.TypeError,Wn=Fn.WeakMap;if(Mn||qn.state){var Kn=qn.state||(qn.state=new Wn);Kn.get=Kn.get,Kn.has=Kn.has,Kn.set=Kn.set,yn=function(e,t){if(Kn.has(e))throw zn(Qn);return t.facade=e,Kn.set(e,t),t},wn=function(e){return Kn.get(e)||{}},kn=function(e){return Kn.has(e)}}else{var Yn=Hn("state");Vn[Yn]=!0,yn=function(e,t){if(Nn(e,Yn))throw zn(Qn);return t.facade=e,Gn(e,Yn,t),t},wn=function(e){return Nn(e,Yn)?e[Yn]:{}},kn=function(e){return Nn(e,Yn)}}var Jn={set:yn,get:wn,has:kn,enforce:function(e){return kn(e)?wn(e):yn(e,{})},getterFor:function(e){return function(t){var n;if(!jn(t)||(n=wn(t)).type!==e)throw zn("Incompatible receiver, "+e+" required");return n}}},Xn=he,Zn=se,$n=tt,er=we,tr=rt,nr=gn.CONFIGURABLE,rr=xn,ir=Jn.enforce,ar=Jn.get,sr=String,or=Object.defineProperty,dr=Xn("".slice),ur=Xn("".replace),cr=Xn([].join),lr=tr&&!Zn((function(){return 8!==or((function(){}),"length",{value:8}).length})),hr=String(String).split("String"),pr=ln.exports=function(e,t,n){"Symbol("===dr(sr(t),0,7)&&(t="["+ur(sr(t),/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!er(e,"name")||nr&&e.name!==t)&&(tr?or(e,"name",{value:t,configurable:!0}):e.name=t),lr&&n&&er(n,"arity")&&e.length!==n.arity&&or(e,"length",{value:n.arity});try{n&&er(n,"constructor")&&n.constructor?tr&&or(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var r=ir(e);return er(r,"source")||(r.source=cr(hr,"string"==typeof t?t:"")),e};Function.prototype.toString=pr((function(){return $n(this)&&ar(this).source||rr(this)}),"toString");var fr=tt,mr=nt,vr=ln.exports,gr=$,Ar=function(e,t,n,r){r||(r={});var i=r.enumerable,a=void 0!==r.name?r.name:t;if(fr(n)&&vr(n,a,r),r.global)i?e[t]=n:gr(t,n);else{try{r.unsafe?e[t]&&(i=!0):delete e[t]}catch(e){}i?e[t]=n:mr.f(e,t,{value:n,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return e},br=he,_r=br({}.toString),yr=br("".slice),wr=function(e){return yr(_r(e),8,-1)},kr=Xe,xr=tt,Er=wr,Dr=Ye("toStringTag"),Sr=Object,Rr="Arguments"==Er(function(){return arguments}()),Tr=kr?Er: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=Sr(e),Dr))?n:Rr?Er(t):"Object"==(r=Er(t))&&xr(t.callee)?"Arguments":r},Ir=Tr,Cr=Xe?{}.toString:function(){return"[object "+Ir(this)+"]"};Xe||Ar(Object.prototype,"toString",Cr,{unsafe:!0});var Or={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},Pr=ct("span").classList,Lr=Pr&&Pr.constructor&&Pr.constructor.prototype,Br=Lr===Object.prototype?void 0:Lr,Ur=wr,Mr=he,Fr=function(e){if("Function"===Ur(e))return Mr(e)},jr=Bt,Gr=oe,Nr=Fr(Fr.bind),qr=function(e,t){return jr(e),void 0===t?e:Gr?Nr(e,t):function(){return e.apply(t,arguments)}},Hr=se,Vr=wr,Qr=Object,zr=he("".split),Wr=Hr((function(){return!Qr("z").propertyIsEnumerable(0)}))?function(e){return"String"==Vr(e)?zr(e,""):Qr(e)}:Qr,Kr=Math.ceil,Yr=Math.floor,Jr=Math.trunc||function(e){var t=+e;return(t>0?Yr:Kr)(t)},Xr=function(e){var t=+e;return t!=t||0===t?0:Jr(t)},Zr=Xr,$r=Math.min,ei=function(e){return e>0?$r(Zr(e),9007199254740991):0},ti=ei,ni=function(e){return ti(e.length)},ri=wr,ii=Array.isArray||function(e){return"Array"==ri(e)},ai=he,si=se,oi=tt,di=Tr,ui=xn,ci=function(){},li=[],hi=kt("Reflect","construct"),pi=/^\s*(?:class|function)\b/,fi=ai(pi.exec),mi=!pi.exec(ci),vi=function(e){if(!oi(e))return!1;try{return hi(ci,li,e),!0}catch(e){return!1}},gi=function(e){if(!oi(e))return!1;switch(di(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return mi||!!fi(pi,ui(e))}catch(e){return!0}};gi.sham=!0;var Ai=!hi||si((function(){var e;return vi(vi.call)||!vi(Object)||!vi((function(){e=!0}))||e}))?gi:vi,bi=ii,_i=Ai,yi=st,wi=Ye("species"),ki=Array,xi=function(e){var t;return bi(e)&&(t=e.constructor,(_i(t)&&(t===ki||bi(t.prototype))||yi(t)&&null===(t=t[wi]))&&(t=void 0)),void 0===t?ki:t},Ei=function(e,t){return new(xi(e))(0===t?0:t)},Di=qr,Si=Wr,Ri=be,Ti=ni,Ii=Ei,Ci=he([].push),Oi=function(e){var t=1==e,n=2==e,r=3==e,i=4==e,a=6==e,s=7==e,o=5==e||a;return function(d,u,c,l){for(var h,p,f=Ri(d),m=Si(f),v=Di(u,c),g=Ti(m),A=0,b=l||Ii,_=t?b(d,g):n||s?b(d,0):void 0;g>A;A++)if((o||A in m)&&(p=v(h=m[A],A,f),e))if(t)_[A]=p;else if(p)switch(e){case 3:return!0;case 5:return h;case 6:return A;case 2:Ci(_,h)}else switch(e){case 4:return!1;case 7:Ci(_,h)}return a?-1:r||i?i:_}},Pi={forEach:Oi(0),map:Oi(1),filter:Oi(2),some:Oi(3),every:Oi(4),find:Oi(5),findIndex:Oi(6),filterReject:Oi(7)},Li=se,Bi=function(e,t){var n=[][e];return!!n&&Li((function(){n.call(null,t||function(){return 1},1)}))},Ui=Pi.forEach,Mi=Y,Fi=Or,ji=Br,Gi=Bi("forEach")?[].forEach:function(e){return Ui(this,e,arguments.length>1?arguments[1]:void 0)},Ni=Cn,qi=function(e){if(e&&e.forEach!==Gi)try{Ni(e,"forEach",Gi)}catch(t){e.forEach=Gi}};for(var Hi in Fi)Fi[Hi]&&qi(Mi[Hi]&&Mi[Hi].prototype);qi(ji);var Vi={},Qi={},zi={}.propertyIsEnumerable,Wi=Object.getOwnPropertyDescriptor,Ki=Wi&&!zi.call({1:2},1);Qi.f=Ki?function(e){var t=Wi(this,e);return!!t&&t.enumerable}:zi;var Yi=Wr,Ji=ve,Xi=function(e){return Yi(Ji(e))},Zi=rt,$i=_t,ea=Qi,ta=Rn,na=Xi,ra=Zt,ia=we,aa=ht,sa=Object.getOwnPropertyDescriptor;Vi.f=Zi?sa:function(e,t){if(e=na(e),t=ra(t),aa)try{return sa(e,t)}catch(e){}if(ia(e,t))return ta(!$i(ea.f,e,t),e[t])};var oa={},da=Xr,ua=Math.max,ca=Math.min,la=function(e,t){var n=da(e);return n<0?ua(n+t,0):ca(n,t)},ha=Xi,pa=la,fa=ni,ma=function(e){return function(t,n,r){var i,a=ha(t),s=fa(a),o=pa(r,s);if(e&&n!=n){for(;s>o;)if((i=a[o++])!=i)return!0}else for(;s>o;o++)if((e||o in a)&&a[o]===n)return e||o||0;return!e&&-1}},va={includes:ma(!0),indexOf:ma(!1)},ga=we,Aa=Xi,ba=va.indexOf,_a=Un,ya=he([].push),wa=function(e,t){var n,r=Aa(e),i=0,a=[];for(n in r)!ga(_a,n)&&ga(r,n)&&ya(a,n);for(;t.length>i;)ga(r,n=t[i++])&&(~ba(a,n)||ya(a,n));return a},ka=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],xa=wa,Ea=ka.concat("length","prototype");oa.f=Object.getOwnPropertyNames||function(e){return xa(e,Ea)};var Da={};Da.f=Object.getOwnPropertySymbols;var Sa=kt,Ra=oa,Ta=Da,Ia=gt,Ca=he([].concat),Oa=Sa("Reflect","ownKeys")||function(e){var t=Ra.f(Ia(e)),n=Ta.f;return n?Ca(t,n(e)):t},Pa=we,La=Oa,Ba=Vi,Ua=nt,Ma=function(e,t,n){for(var r=La(t),i=Ua.f,a=Ba.f,s=0;s<r.length;s++){var o=r[s];Pa(e,o)||n&&Pa(n,o)||i(e,o,a(t,o))}},Fa=se,ja=tt,Ga=/#|\.prototype\./,Na=function(e,t){var n=Ha[qa(e)];return n==Qa||n!=Va&&(ja(t)?Fa(t):!!t)},qa=Na.normalize=function(e){return String(e).replace(Ga,".").toLowerCase()},Ha=Na.data={},Va=Na.NATIVE="N",Qa=Na.POLYFILL="P",za=Na,Wa=Y,Ka=Vi.f,Ya=Cn,Ja=Ar,Xa=$,Za=Ma,$a=za,es=function(e,t){var n,r,i,a,s,o=e.target,d=e.global,u=e.stat;if(n=d?Wa:u?Wa[o]||Xa(o,{}):(Wa[o]||{}).prototype)for(r in t){if(a=t[r],i=e.dontCallGetSet?(s=Ka(n,r))&&s.value:n[r],!$a(d?r:o+(u?".":"#")+r,e.forced)&&void 0!==i){if(typeof a==typeof i)continue;Za(a,i)}(e.sham||i&&i.sham)&&Ya(a,"sham",!0),Ja(n,r,a,e)}},ts=wa,ns=ka,rs=Object.keys||function(e){return ts(e,ns)},is=be,as=rs;es({target:"Object",stat:!0,forced:se((function(){as(1)}))},{keys:function(e){return as(is(e))}});var ss=Tr,os=String,ds=function(e){if("Symbol"===ss(e))throw TypeError("Cannot convert a Symbol value to a string");return os(e)},us=gt,cs=function(){var e=us(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t},ls=se,hs=Y.RegExp,ps=ls((function(){var e=hs("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),fs=ps||ls((function(){return!hs("a","y").sticky})),ms={BROKEN_CARET:ps||ls((function(){var e=hs("^r","gy");return e.lastIndex=2,null!=e.exec("str")})),MISSED_STICKY:fs,UNSUPPORTED_Y:ps},vs={},gs=rt,As=pt,bs=nt,_s=gt,ys=Xi,ws=rs;vs.f=gs&&!As?Object.defineProperties:function(e,t){_s(e);for(var n,r=ys(t),i=ws(t),a=i.length,s=0;a>s;)bs.f(e,n=i[s++],r[n]);return e};var ks,xs=kt("document","documentElement"),Es=gt,Ds=vs,Ss=ka,Rs=Un,Ts=xs,Is=ct,Cs="prototype",Os="script",Ps=Bn("IE_PROTO"),Ls=function(){},Bs=function(e){return"<"+Os+">"+e+"</"+Os+">"},Us=function(e){e.write(Bs("")),e.close();var t=e.parentWindow.Object;return e=null,t},Ms=function(){try{ks=new ActiveXObject("htmlfile")}catch(e){}var e,t,n;Ms="undefined"!=typeof document?document.domain&&ks?Us(ks):(t=Is("iframe"),n="java"+Os+":",t.style.display="none",Ts.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(Bs("document.F=Object")),e.close(),e.F):Us(ks);for(var r=Ss.length;r--;)delete Ms[Cs][Ss[r]];return Ms()};Rs[Ps]=!0;var Fs=Object.create||function(e,t){var n;return null!==e?(Ls[Cs]=Es(e),n=new Ls,Ls[Cs]=null,n[Ps]=e):n=Ms(),void 0===t?n:Ds.f(n,t)},js=se,Gs=Y.RegExp,Ns=js((function(){var e=Gs(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)})),Hs=se,Vs=Y.RegExp,Qs=Hs((function(){var e=Vs("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),zs=_t,Ws=he,Ks=ds,Ys=cs,Js=ms,Xs=J.exports,Zs=Fs,$s=Jn.get,eo=Ns,to=Qs,no=Xs("native-string-replace",String.prototype.replace),ro=RegExp.prototype.exec,ao=ro,so=Ws("".charAt),oo=Ws("".indexOf),uo=Ws("".replace),co=Ws("".slice),lo=function(){var e=/a/,t=/b*/g;return zs(ro,e,"a"),zs(ro,t,"a"),0!==e.lastIndex||0!==t.lastIndex}(),ho=Js.BROKEN_CARET,po=void 0!==/()??/.exec("")[1];(lo||po||ho||eo||to)&&(ao=function(e){var t,n,r,i,a,s,o,d=this,u=$s(d),c=Ks(e),l=u.raw;if(l)return l.lastIndex=d.lastIndex,t=zs(ao,l,c),d.lastIndex=l.lastIndex,t;var h=u.groups,p=ho&&d.sticky,f=zs(Ys,d),m=d.source,v=0,g=c;if(p&&(f=uo(f,"y",""),-1===oo(f,"g")&&(f+="g"),g=co(c,d.lastIndex),d.lastIndex>0&&(!d.multiline||d.multiline&&"\n"!==so(c,d.lastIndex-1))&&(m="(?: "+m+")",g=" "+g,v++),n=new RegExp("^(?:"+m+")",f)),po&&(n=new RegExp("^"+m+"$(?!\\s)",f)),lo&&(r=d.lastIndex),i=zs(ro,p?n:d,g),p?i?(i.input=co(i.input,v),i[0]=co(i[0],v),i.index=d.lastIndex,d.lastIndex+=i[0].length):d.lastIndex=0:lo&&i&&(d.lastIndex=d.global?i.index+i[0].length:r),po&&i&&i.length>1&&zs(no,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=s=Zs(null),a=0;a<h.length;a++)s[(o=h[a])[0]]=i[o[1]];return i});var fo=ao;es({target:"RegExp",proto:!0,forced:/./.exec!==fo},{exec:fo});var mo=Array.isArray,vo=Object.prototype.toString,go=mo||function(e){return!!e&&"[object Array]"==vo.call(e)},Ao={name:"@bygd/gd-sdk-pes",version:"1.43.34",files:["dist/*"],scripts:{build:"NODE_ENV=production rollup --config",watch:"rollup --config --watch --sourcemap inline --environment DEVELOPMENT","deploy-base":"npm install && npm run build && npm publish --access public",deploy:"npm run deploy-base && gdtool pm-upload"},repository:{type:"git",url:"git@gitlab.azerdev.com:gamedistribution/gd-sdk-pes.git"},author:"",license:"ISC",devDependencies:{"@babel/core":"^7.14.6","@babel/plugin-transform-runtime":"^7.14.5","@babel/preset-env":"^7.14.7","@rollup/plugin-babel":"^5.2.3","@rollup/plugin-commonjs":"^21.0.1","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.0.0","@rollup/plugin-replace":"^3.0.0",postcss:"^8.3.5",rollup:"^2.52.8","rollup-plugin-analyzer":"^4.0.0","rollup-plugin-browsersync":"^1.3.3","rollup-plugin-delete":"^2.0.0","rollup-plugin-node-polyfills":"^0.2.1","rollup-plugin-peer-deps-external":"^2.2.4","rollup-plugin-postcss":"^4.0.0","rollup-plugin-terser":"^7.0.2"},dependencies:{"@babel/runtime":"^7.14.6","@bygd/gd-sdk-era":"^0.3.6","@flownet/lib-connect-to-tcf":"^0.2.10","@fnet/inter-service-js":"^0.9.4",axios:"^0.26.1","can-autoplay":"^3.0.2",events:"^3.3.0","get-value":"^3.0.1","is-plain-object":"^5.0.0","is-valid-domain":"^0.1.2","js-base64":"^3.6.1","leaderboard-lib":"0.1.11","lodash.clonedeep":"^4.5.0","lodash.merge":"^4.6.2",querystringify:"^2.2.0","set-value":"^4.1.0","url-parse":"^1.4.7",uuid:"^8.3.2",validator:"^13.6.0","ua-parser-js":"^0.7.21"}},bo=function(e){var t=_o("object"===n(e)?e:i(e));return t&&t.version?Ao.version>=t.version?t:void 0:t},_o=function(e){var n=this;if(!go(e)||0===e.length)return e;if(1===e.length)return e[0];var r=0;e.forEach(function(e){t(this,n),e.weight=e.weight||1,r+=e.weight}.bind(this));var i=Math.floor(Math.random()*Math.floor(r));r=0;for(var a=0;a<e.length;a++){var s=e[a];if(i<(r+=s.weight))return s}};var yo=function(){},wo=function(){var e;(e=console).log.apply(e,arguments)},ko=function(){var e;(e=console).log.apply(e,arguments)};JSON.stringify({adapters:{default:["ima","adsense","ima","adsense"],preroll:["ima","adsense","ima","adsense"],midroll:["ima","adsense","ima","adsense"],rewarded:["ima","adsense","ima","adsense"]}}),JSON.stringify({adapters:{default:["ima","adsense","ima","adsense"],preroll:["ima","adsense","ima"],midroll:["ima","adsense","ima"],rewarded:["ima","adsense","ima","adsense"]}});var xo={},Eo={},Do=Zt,So=nt,Ro=Rn,To=function(e,t,n){var r=Do(t);r in e?So.f(e,r,Ro(0,n)):e[r]=n},Io=la,Co=ni,Oo=To,Po=Array,Lo=Math.max,Bo=function(e,t,n){for(var r=Co(e),i=Io(t,r),a=Io(void 0===n?r:n,r),s=Po(Lo(a-i,0)),o=0;i<a;i++,o++)Oo(s,o,e[i]);return s.length=o,s},Uo=wr,Mo=Xi,Fo=oa.f,jo=Bo,Go="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];Eo.f=function(e){return Go&&"Window"==Uo(e)?function(e){try{return Fo(e)}catch(e){return jo(Go)}}(e):Fo(Mo(e))};var No=ln.exports,qo=nt,Ho=function(e,t,n){return n.get&&No(n.get,t,{getter:!0}),n.set&&No(n.set,t,{setter:!0}),qo.f(e,t,n)},Vo={},Qo=Ye;Vo.f=Qo;var zo=Y,Wo=we,Ko=Vo,Yo=nt.f,Jo=function(e){var t=zo.Symbol||(zo.Symbol={});Wo(t,e)||Yo(t,e,{value:Ko.f(e)})},Xo=_t,Zo=kt,$o=Ye,ed=Ar,td=nt.f,nd=we,rd=Ye("toStringTag"),id=function(e,t,n){e&&!n&&(e=e.prototype),e&&!nd(e,rd)&&td(e,rd,{configurable:!0,value:t})},ad=es,sd=Y,od=_t,dd=he,ud=rt,cd=Fe,ld=se,hd=we,pd=xt,fd=gt,md=Xi,vd=Zt,gd=ds,Ad=Rn,bd=Fs,_d=rs,yd=oa,wd=Eo,kd=Da,xd=Vi,Ed=nt,Dd=vs,Sd=Qi,Rd=Ar,Td=Ho,Id=J.exports,Cd=Un,Od=Se,Pd=Ye,Ld=Vo,Bd=Jo,Ud=function(){var e=Zo("Symbol"),t=e&&e.prototype,n=t&&t.valueOf,r=$o("toPrimitive");t&&!t[r]&&ed(t,r,(function(e){return Xo(n,this)}),{arity:1})},Md=id,Fd=Jn,jd=Pi.forEach,Gd=Bn("hidden"),Nd="Symbol",qd="prototype",Hd=Fd.set,Vd=Fd.getterFor(Nd),Qd=Object[qd],zd=sd.Symbol,Wd=zd&&zd[qd],Kd=sd.TypeError,Yd=sd.QObject,Jd=xd.f,Xd=Ed.f,Zd=wd.f,$d=Sd.f,eu=dd([].push),tu=Id("symbols"),nu=Id("op-symbols"),ru=Id("wks"),iu=!Yd||!Yd[qd]||!Yd[qd].findChild,au=ud&&ld((function(){return 7!=bd(Xd({},"a",{get:function(){return Xd(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=Jd(Qd,t);r&&delete Qd[t],Xd(e,t,n),r&&e!==Qd&&Xd(Qd,t,r)}:Xd,su=function(e,t){var n=tu[e]=bd(Wd);return Hd(n,{type:Nd,tag:e,description:t}),ud||(n.description=t),n},ou=function(e,t,n){e===Qd&&ou(nu,t,n),fd(e);var r=vd(t);return fd(n),hd(tu,r)?(n.enumerable?(hd(e,Gd)&&e[Gd][r]&&(e[Gd][r]=!1),n=bd(n,{enumerable:Ad(0,!1)})):(hd(e,Gd)||Xd(e,Gd,Ad(1,{})),e[Gd][r]=!0),au(e,r,n)):Xd(e,r,n)},du=function(e,t){fd(e);var n=md(t),r=_d(n).concat(hu(n));return jd(r,(function(t){ud&&!od(uu,n,t)||ou(e,t,n[t])})),e},uu=function(e){var t=vd(e),n=od($d,this,t);return!(this===Qd&&hd(tu,t)&&!hd(nu,t))&&(!(n||!hd(this,t)||!hd(tu,t)||hd(this,Gd)&&this[Gd][t])||n)},cu=function(e,t){var n=md(e),r=vd(t);if(n!==Qd||!hd(tu,r)||hd(nu,r)){var i=Jd(n,r);return!i||!hd(tu,r)||hd(n,Gd)&&n[Gd][r]||(i.enumerable=!0),i}},lu=function(e){var t=Zd(md(e)),n=[];return jd(t,(function(e){hd(tu,e)||hd(Cd,e)||eu(n,e)})),n},hu=function(e){var t=e===Qd,n=Zd(t?nu:md(e)),r=[];return jd(n,(function(e){!hd(tu,e)||t&&!hd(Qd,e)||eu(r,tu[e])})),r};cd||(Rd(Wd=(zd=function(){if(pd(Wd,this))throw Kd("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?gd(arguments[0]):void 0,t=Od(e),n=function(e){this===Qd&&od(n,nu,e),hd(this,Gd)&&hd(this[Gd],t)&&(this[Gd][t]=!1),au(this,t,Ad(1,e))};return ud&&iu&&au(Qd,t,{configurable:!0,set:n}),su(t,e)})[qd],"toString",(function(){return Vd(this).tag})),Rd(zd,"withoutSetter",(function(e){return su(Od(e),e)})),Sd.f=uu,Ed.f=ou,Dd.f=du,xd.f=cu,yd.f=wd.f=lu,kd.f=hu,Ld.f=function(e){return su(Pd(e),e)},ud&&(Td(Wd,"description",{configurable:!0,get:function(){return Vd(this).description}}),Rd(Qd,"propertyIsEnumerable",uu,{unsafe:!0}))),ad({global:!0,constructor:!0,wrap:!0,forced:!cd,sham:!cd},{Symbol:zd}),jd(_d(ru),(function(e){Bd(e)})),ad({target:Nd,stat:!0,forced:!cd},{useSetter:function(){iu=!0},useSimple:function(){iu=!1}}),ad({target:"Object",stat:!0,forced:!cd,sham:!ud},{create:function(e,t){return void 0===t?bd(e):du(bd(e),t)},defineProperty:ou,defineProperties:du,getOwnPropertyDescriptor:cu}),ad({target:"Object",stat:!0,forced:!cd},{getOwnPropertyNames:lu}),Ud(),Md(zd,Nd),Cd[Gd]=!0;var pu=Fe&&!!Symbol.for&&!!Symbol.keyFor,fu=es,mu=kt,vu=we,gu=ds,Au=J.exports,bu=pu,_u=Au("string-to-symbol-registry"),yu=Au("symbol-to-string-registry");fu({target:"Symbol",stat:!0,forced:!bu},{for:function(e){var t=gu(e);if(vu(_u,t))return _u[t];var n=mu("Symbol")(t);return _u[t]=n,yu[n]=t,n}});var wu=es,ku=we,xu=Tt,Eu=Ct,Du=pu,Su=(0,J.exports)("symbol-to-string-registry");wu({target:"Symbol",stat:!0,forced:!Du},{keyFor:function(e){if(!xu(e))throw TypeError(Eu(e)+" is not a symbol");if(ku(Su,e))return Su[e]}});var Ru=oe,Tu=Function.prototype,Iu=Tu.apply,Cu=Tu.call,Ou="object"==typeof Reflect&&Reflect.apply||(Ru?Cu.bind(Iu):function(){return Cu.apply(Iu,arguments)}),Pu=he([].slice),Lu=ii,Bu=tt,Uu=wr,Mu=ds,Fu=he([].push),ju=es,Gu=kt,Nu=Ou,qu=_t,Hu=he,Vu=se,Qu=tt,zu=Tt,Wu=Pu,Ku=function(e){if(Bu(e))return e;if(Lu(e)){for(var t=e.length,n=[],r=0;r<t;r++){var i=e[r];"string"==typeof i?Fu(n,i):"number"!=typeof i&&"Number"!=Uu(i)&&"String"!=Uu(i)||Fu(n,Mu(i))}var a=n.length,s=!0;return function(e,t){if(s)return s=!1,t;if(Lu(this))return t;for(var r=0;r<a;r++)if(n[r]===e)return t}}},Yu=Fe,Ju=String,Xu=Gu("JSON","stringify"),Zu=Hu(/./.exec),$u=Hu("".charAt),ec=Hu("".charCodeAt),tc=Hu("".replace),nc=Hu(1..toString),rc=/[\uD800-\uDFFF]/g,ic=/^[\uD800-\uDBFF]$/,ac=/^[\uDC00-\uDFFF]$/,sc=!Yu||Vu((function(){var e=Gu("Symbol")();return"[null]"!=Xu([e])||"{}"!=Xu({a:e})||"{}"!=Xu(Object(e))})),oc=Vu((function(){return'"\\udf06\\ud834"'!==Xu("\udf06\ud834")||'"\\udead"'!==Xu("\udead")})),dc=function(e,t){var n=Wu(arguments),r=Ku(t);if(Qu(r)||void 0!==e&&!zu(e))return n[1]=function(e,t){if(Qu(r)&&(t=qu(r,this,Ju(e),t)),!zu(t))return t},Nu(Xu,null,n)},uc=function(e,t,n){var r=$u(n,t-1),i=$u(n,t+1);return Zu(ic,e)&&!Zu(ac,i)||Zu(ac,e)&&!Zu(ic,r)?"\\u"+nc(ec(e,0),16):e};Xu&&ju({target:"JSON",stat:!0,arity:3,forced:sc||oc},{stringify:function(e,t,n){var r=Wu(arguments),i=Nu(sc?dc:Xu,null,r);return oc&&"string"==typeof i?tc(i,rc,uc):i}});var cc=Da,lc=be;es({target:"Object",stat:!0,forced:!Fe||se((function(){cc.f(1)}))},{getOwnPropertySymbols:function(e){var t=cc.f;return t?t(lc(e)):[]}});var hc=se,pc=Be,fc=Ye("species"),mc=function(e){return pc>=51||!hc((function(){var t=[];return(t.constructor={})[fc]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},vc=Pi.filter;es({target:"Array",proto:!0,forced:!mc("filter")},{filter:function(e){return vc(this,e,arguments.length>1?arguments[1]:void 0)}});var gc=es,Ac=se,bc=Xi,_c=Vi.f,yc=rt;gc({target:"Object",stat:!0,forced:!yc||Ac((function(){_c(1)})),sham:!yc},{getOwnPropertyDescriptor:function(e,t){return _c(bc(e),t)}});var wc=Oa,kc=Xi,xc=Vi,Ec=To;es({target:"Object",stat:!0,sham:!rt},{getOwnPropertyDescriptors:function(e){for(var t,n,r=kc(e),i=xc.f,a=wc(r),s={},o=0;a.length>o;)void 0!==(n=i(r,t=a[o++]))&&Ec(s,t,n);return s}});var Dc=es,Sc=ii,Rc=Ai,Tc=st,Ic=la,Cc=ni,Oc=Xi,Pc=To,Lc=Ye,Bc=Pu,Uc=mc("slice"),Mc=Lc("species"),Fc=Array,jc=Math.max;Dc({target:"Array",proto:!0,forced:!Uc},{slice:function(e,t){var n,r,i,a=Oc(this),s=Cc(a),o=Ic(e,s),d=Ic(void 0===t?s:t,s);if(Sc(a)&&(n=a.constructor,(Rc(n)&&(n===Fc||Sc(n.prototype))||Tc(n)&&null===(n=n[Mc]))&&(n=void 0),n===Fc||void 0===n))return Bc(a,o,d);for(r=new(void 0===n?Fc:n)(jc(d-o,0)),i=0;o<d;o++,i++)o in a&&Pc(r,i,a[o]);return r.length=i,r}});var Gc=_t,Nc=gt,qc=Ft,Hc=function(e,t,n){var r,i;Nc(e);try{if(!(r=qc(e,"return"))){if("throw"===t)throw n;return n}r=Gc(r,e)}catch(e){i=!0,r=e}if("throw"===t)throw n;if(i)throw r;return Nc(r),n},Vc=gt,Qc=Hc,zc={},Wc=zc,Kc=Ye("iterator"),Yc=Array.prototype,Jc=function(e){return void 0!==e&&(Wc.Array===e||Yc[Kc]===e)},Xc=Tr,Zc=Ft,$c=pe,el=zc,tl=Ye("iterator"),nl=function(e){if(!$c(e))return Zc(e,tl)||Zc(e,"@@iterator")||el[Xc(e)]},rl=_t,il=Bt,al=gt,sl=Ct,ol=nl,dl=TypeError,ul=function(e,t){var n=arguments.length<2?ol(e):t;if(il(n))return al(rl(n,e));throw dl(sl(e)+" is not iterable")},cl=qr,ll=_t,hl=be,pl=function(e,t,n,r){try{return r?t(Vc(n)[0],n[1]):t(n)}catch(t){Qc(e,"throw",t)}},fl=Jc,ml=Ai,vl=ni,gl=To,Al=ul,bl=nl,_l=Array,yl=function(e){var t=hl(e),n=ml(this),r=arguments.length,i=r>1?arguments[1]:void 0,a=void 0!==i;a&&(i=cl(i,r>2?arguments[2]:void 0));var s,o,d,u,c,l,h=bl(t),p=0;if(!h||this===_l&&fl(h))for(s=vl(t),o=n?new this(s):_l(s);s>p;p++)l=a?i(t[p],p):t[p],gl(o,p,l);else for(c=(u=Al(t,h)).next,o=n?new this:[];!(d=ll(c,u)).done;p++)l=a?pl(u,i,[d.value,p],!0):d.value,gl(o,p,l);return o.length=p,o},wl=Ye("iterator"),kl=!1;try{var xl=0,El={next:function(){return{done:!!xl++}},return:function(){kl=!0}};El[wl]=function(){return this},Array.from(El,(function(){throw 2}))}catch(e){}var Dl=function(e,t){if(!t&&!kl)return!1;var n=!1;try{var r={};r[wl]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch(e){}return n},Sl=yl;es({target:"Array",stat:!0,forced:!Dl((function(e){Array.from(e)}))},{from:Sl});var Rl,Tl,Il,Cl=he,Ol=Xr,Pl=ds,Ll=ve,Bl=Cl("".charAt),Ul=Cl("".charCodeAt),Ml=Cl("".slice),Fl=function(e){return function(t,n){var r,i,a=Pl(Ll(t)),s=Ol(n),o=a.length;return s<0||s>=o?e?"":void 0:(r=Ul(a,s))<55296||r>56319||s+1===o||(i=Ul(a,s+1))<56320||i>57343?e?Bl(a,s):r:e?Ml(a,s,s+2):i-56320+(r-55296<<10)+65536}},jl={codeAt:Fl(!1),charAt:Fl(!0)},Gl=!se((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),Nl=we,ql=tt,Hl=be,Vl=Gl,Ql=Bn("IE_PROTO"),zl=Object,Wl=zl.prototype,Kl=Vl?zl.getPrototypeOf:function(e){var t=Hl(e);if(Nl(t,Ql))return t[Ql];var n=t.constructor;return ql(n)&&t instanceof n?n.prototype:t instanceof zl?Wl:null},Yl=se,Jl=tt,Xl=st,Zl=Kl,$l=Ar,eh=Ye("iterator"),th=!1;[].keys&&("next"in(Il=[].keys())?(Tl=Zl(Zl(Il)))!==Object.prototype&&(Rl=Tl):th=!0);var nh=!Xl(Rl)||Yl((function(){var e={};return Rl[eh].call(e)!==e}));nh&&(Rl={}),Jl(Rl[eh])||$l(Rl,eh,(function(){return this}));var rh={IteratorPrototype:Rl,BUGGY_SAFARI_ITERATORS:th},ih=rh.IteratorPrototype,ah=Fs,sh=Rn,oh=id,dh=zc,uh=function(){return this},ch=function(e,t,n,r){var i=t+" Iterator";return e.prototype=ah(ih,{next:sh(+!r,n)}),oh(e,i,!1),dh[i]=uh,e},lh=he,hh=Bt,ph=tt,fh=String,mh=TypeError,vh=function(e,t,n){try{return lh(hh(Object.getOwnPropertyDescriptor(e,t)[n]))}catch(e){}},gh=gt,Ah=function(e){if("object"==typeof e||ph(e))return e;throw mh("Can't set "+fh(e)+" as a prototype")},bh=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=vh(Object.prototype,"__proto__","set"))(n,[]),t=n instanceof Array}catch(e){}return function(n,r){return gh(n),Ah(r),t?e(n,r):n.__proto__=r,n}}():void 0),_h=es,yh=_t,wh=tt,kh=ch,xh=Kl,Eh=bh,Dh=id,Sh=Cn,Rh=Ar,Th=zc,Ih=gn.PROPER,Ch=gn.CONFIGURABLE,Oh=rh.IteratorPrototype,Ph=rh.BUGGY_SAFARI_ITERATORS,Lh=Ye("iterator"),Bh="keys",Uh="values",Mh="entries",Fh=function(){return this},jh=function(e,t,n,r,i,a,s){kh(n,t,r);var o,d,u,c=function(e){if(e===i&&m)return m;if(!Ph&&e in p)return p[e];switch(e){case Bh:case Uh:case Mh:return function(){return new n(this,e)}}return function(){return new n(this)}},l=t+" Iterator",h=!1,p=e.prototype,f=p[Lh]||p["@@iterator"]||i&&p[i],m=!Ph&&f||c(i),v="Array"==t&&p.entries||f;if(v&&(o=xh(v.call(new e)))!==Object.prototype&&o.next&&(xh(o)!==Oh&&(Eh?Eh(o,Oh):wh(o[Lh])||Rh(o,Lh,Fh)),Dh(o,l,!0)),Ih&&i==Uh&&f&&f.name!==Uh&&(Ch?Sh(p,"name",Uh):(h=!0,m=function(){return yh(f,this)})),i)if(d={values:c(Uh),keys:a?m:c(Bh),entries:c(Mh)},s)for(u in d)(Ph||h||!(u in p))&&Rh(p,u,d[u]);else _h({target:t,proto:!0,forced:Ph||h},d);return p[Lh]!==m&&Rh(p,Lh,m,{name:i}),Th[t]=m,d},Gh=function(e,t){return{value:e,done:t}},Nh=jl.charAt,qh=ds,Hh=Jn,Vh=jh,Qh=Gh,zh="String Iterator",Wh=Hh.set,Kh=Hh.getterFor(zh);Vh(String,"String",(function(e){Wh(this,{type:zh,string:qh(e),index:0})}),(function(){var e,t=Kh(this),n=t.string,r=t.index;return r>=n.length?Qh(void 0,!0):(e=Nh(n,r),t.index+=e.length,Qh(e,!1))}));var Yh=es,Jh=rt,Xh=he,Zh=we,$h=tt,ep=xt,tp=ds,np=Ho,rp=Ma,ip=Y.Symbol,ap=ip&&ip.prototype;if(Jh&&$h(ip)&&(!("description"in ap)||void 0!==ip().description)){var sp={},op=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:tp(arguments[0]),t=ep(ap,this)?new ip(e):void 0===e?ip():ip(e);return""===e&&(sp[t]=!0),t};rp(op,ip),op.prototype=ap,ap.constructor=op;var dp="Symbol(test)"==String(ip("test")),up=Xh(ap.valueOf),cp=Xh(ap.toString),lp=/^Symbol\((.*)\)[^)]+$/,hp=Xh("".replace),pp=Xh("".slice);np(ap,"description",{configurable:!0,get:function(){var e=up(this);if(Zh(sp,e))return"";var t=cp(e),n=dp?pp(t,7,-1):hp(t,lp,"$1");return""===n?void 0:n}}),Yh({global:!0,constructor:!0,forced:!0},{Symbol:op})}Jo("iterator");var fp=Ye,mp=Fs,vp=nt.f,gp=fp("unscopables"),Ap=Array.prototype;null==Ap[gp]&&vp(Ap,gp,{configurable:!0,value:mp(null)});var bp=function(e){Ap[gp][e]=!0},_p=Xi,yp=bp,wp=zc,kp=Jn,xp=nt.f,Ep=jh,Dp=Gh,Sp=rt,Rp="Array Iterator",Tp=kp.set,Ip=kp.getterFor(Rp),Cp=Ep(Array,"Array",(function(e,t){Tp(this,{type:Rp,target:_p(e),index:0,kind:t})}),(function(){var e=Ip(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,Dp(void 0,!0)):Dp("keys"==n?r:"values"==n?t[r]:[r,t[r]],!1)}),"values"),Op=wp.Arguments=wp.Array;if(yp("keys"),yp("values"),yp("entries"),Sp&&"values"!==Op.name)try{xp(Op,"name",{value:"values"})}catch(e){}var Pp=Y,Lp=Or,Bp=Br,Up=Cp,Mp=Cn,Fp=Ye,jp=Fp("iterator"),Gp=Fp("toStringTag"),Np=Up.values,qp=function(e,t){if(e){if(e[jp]!==Np)try{Mp(e,jp,Np)}catch(t){e[jp]=Np}if(e[Gp]||Mp(e,Gp,t),Lp[t])for(var n in Up)if(e[n]!==Up[n])try{Mp(e,n,Up[n])}catch(t){e[n]=Up[n]}}};for(var Hp in Lp)qp(Pp[Hp]&&Pp[Hp].prototype,Hp);qp(Bp,"DOMTokenList");var Vp,Qp,zp,Wp,Kp="undefined"!=typeof process&&"process"==wr(process),Yp=kt,Jp=Ho,Xp=rt,Zp=Ye("species"),$p=function(e){var t=Yp(e);Xp&&t&&!t[Zp]&&Jp(t,Zp,{configurable:!0,get:function(){return this}})},ef=xt,tf=TypeError,nf=function(e,t){if(ef(t,e))return e;throw tf("Incorrect invocation")},rf=Ai,af=Ct,sf=TypeError,of=gt,df=function(e){if(rf(e))return e;throw sf(af(e)+" is not a constructor")},uf=pe,cf=Ye("species"),lf=function(e,t){var n,r=of(e).constructor;return void 0===r||uf(n=of(r)[cf])?t:df(n)},hf=TypeError,pf=function(e,t){if(e<t)throw hf("Not enough arguments");return e},ff=/(?:ipad|iphone|ipod).*applewebkit/i.test(Re),mf=Y,vf=Ou,gf=qr,Af=tt,bf=we,_f=se,yf=xs,wf=Pu,kf=ct,xf=pf,Ef=ff,Df=Kp,Sf=mf.setImmediate,Rf=mf.clearImmediate,Tf=mf.process,If=mf.Dispatch,Cf=mf.Function,Of=mf.MessageChannel,Pf=mf.String,Lf=0,Bf={},Uf="onreadystatechange";_f((function(){Vp=mf.location}));var Mf=function(e){if(bf(Bf,e)){var t=Bf[e];delete Bf[e],t()}},Ff=function(e){return function(){Mf(e)}},jf=function(e){Mf(e.data)},Gf=function(e){mf.postMessage(Pf(e),Vp.protocol+"//"+Vp.host)};Sf&&Rf||(Sf=function(e){xf(arguments.length,1);var t=Af(e)?e:Cf(e),n=wf(arguments,1);return Bf[++Lf]=function(){vf(t,void 0,n)},Qp(Lf),Lf},Rf=function(e){delete Bf[e]},Df?Qp=function(e){Tf.nextTick(Ff(e))}:If&&If.now?Qp=function(e){If.now(Ff(e))}:Of&&!Ef?(Wp=(zp=new Of).port2,zp.port1.onmessage=jf,Qp=gf(Wp.postMessage,Wp)):mf.addEventListener&&Af(mf.postMessage)&&!mf.importScripts&&Vp&&"file:"!==Vp.protocol&&!_f(Gf)?(Qp=Gf,mf.addEventListener("message",jf,!1)):Qp=Uf in kf("script")?function(e){yf.appendChild(kf("script"))[Uf]=function(){yf.removeChild(this),Mf(e)}}:function(e){setTimeout(Ff(e),0)});var Nf={set:Sf,clear:Rf},qf=function(){this.head=null,this.tail=null};qf.prototype={add:function(e){var t={item:e,next:null},n=this.tail;n?n.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return null===(this.head=e.next)&&(this.tail=null),e.item}};var Hf,Vf,Qf,zf,Wf,Kf=qf,Yf=/ipad|iphone|ipod/i.test(Re)&&"undefined"!=typeof Pebble,Jf=/web0s(?!.*chrome)/i.test(Re),Xf=Y,Zf=qr,$f=Vi.f,em=Nf.set,tm=Kf,nm=ff,rm=Yf,im=Jf,am=Kp,sm=Xf.MutationObserver||Xf.WebKitMutationObserver,om=Xf.document,dm=Xf.process,um=Xf.Promise,cm=$f(Xf,"queueMicrotask"),lm=cm&&cm.value;if(!lm){var hm=new tm,pm=function(){var e,t;for(am&&(e=dm.domain)&&e.exit();t=hm.get();)try{t()}catch(e){throw hm.head&&Hf(),e}e&&e.enter()};nm||am||im||!sm||!om?!rm&&um&&um.resolve?((zf=um.resolve(void 0)).constructor=um,Wf=Zf(zf.then,zf),Hf=function(){Wf(pm)}):am?Hf=function(){dm.nextTick(pm)}:(em=Zf(em,Xf),Hf=function(){em(pm)}):(Vf=!0,Qf=om.createTextNode(""),new sm(pm).observe(Qf,{characterData:!0}),Hf=function(){Qf.data=Vf=!Vf}),lm=function(e){hm.head||Hf(),hm.add(e)}}var fm=lm,mm=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},vm=Y.Promise,gm="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,Am=!gm&&!Kp&&"object"==typeof window&&"object"==typeof document,bm=Y,_m=vm,ym=tt,wm=za,km=xn,xm=Ye,Em=Am,Dm=gm,Sm=Be;_m&&_m.prototype;var Rm=xm("species"),Tm=!1,Im=ym(bm.PromiseRejectionEvent),Cm=wm("Promise",(function(){var e=km(_m),t=e!==String(_m);if(!t&&66===Sm)return!0;if(!Sm||Sm<51||!/native code/.test(e)){var n=new _m((function(e){e(1)})),r=function(e){e((function(){}),(function(){}))};if((n.constructor={})[Rm]=r,!(Tm=n.then((function(){}))instanceof r))return!0}return!t&&(Em||Dm)&&!Im})),Om={CONSTRUCTOR:Cm,REJECTION_EVENT:Im,SUBCLASSING:Tm},Pm={},Lm=Bt,Bm=TypeError,Um=function(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw Bm("Bad Promise constructor");t=e,n=r})),this.resolve=Lm(t),this.reject=Lm(n)};Pm.f=function(e){return new Um(e)};var Mm,Fm,jm,Gm=es,Nm=Kp,qm=Y,Hm=_t,Vm=Ar,Qm=bh,zm=id,Wm=$p,Km=Bt,Ym=tt,Jm=st,Xm=nf,Zm=lf,$m=Nf.set,ev=fm,tv=function(e,t){try{1==arguments.length?console.error(e):console.error(e,t)}catch(e){}},nv=mm,rv=Kf,iv=Jn,av=vm,sv=Pm,ov="Promise",dv=Om.CONSTRUCTOR,uv=Om.REJECTION_EVENT,cv=Om.SUBCLASSING,lv=iv.getterFor(ov),hv=iv.set,pv=av&&av.prototype,fv=av,mv=pv,vv=qm.TypeError,gv=qm.document,Av=qm.process,bv=sv.f,_v=bv,yv=!!(gv&&gv.createEvent&&qm.dispatchEvent),wv="unhandledrejection",kv=function(e){var t;return!(!Jm(e)||!Ym(t=e.then))&&t},xv=function(e,t){var n,r,i,a=t.value,s=1==t.state,o=s?e.ok:e.fail,d=e.resolve,u=e.reject,c=e.domain;try{o?(s||(2===t.rejection&&Tv(t),t.rejection=1),!0===o?n=a:(c&&c.enter(),n=o(a),c&&(c.exit(),i=!0)),n===e.promise?u(vv("Promise-chain cycle")):(r=kv(n))?Hm(r,n,d,u):d(n)):u(a)}catch(e){c&&!i&&c.exit(),u(e)}},Ev=function(e,t){e.notified||(e.notified=!0,ev((function(){for(var n,r=e.reactions;n=r.get();)xv(n,e);e.notified=!1,t&&!e.rejection&&Sv(e)})))},Dv=function(e,t,n){var r,i;yv?((r=gv.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),qm.dispatchEvent(r)):r={promise:t,reason:n},!uv&&(i=qm["on"+e])?i(r):e===wv&&tv("Unhandled promise rejection",n)},Sv=function(e){Hm($m,qm,(function(){var t,n=e.facade,r=e.value;if(Rv(e)&&(t=nv((function(){Nm?Av.emit("unhandledRejection",r,n):Dv(wv,n,r)})),e.rejection=Nm||Rv(e)?2:1,t.error))throw t.value}))},Rv=function(e){return 1!==e.rejection&&!e.parent},Tv=function(e){Hm($m,qm,(function(){var t=e.facade;Nm?Av.emit("rejectionHandled",t):Dv("rejectionhandled",t,e.value)}))},Iv=function(e,t,n){return function(r){e(t,r,n)}},Cv=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,Ev(e,!0))},Ov=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw vv("Promise can't be resolved itself");var r=kv(t);r?ev((function(){var n={done:!1};try{Hm(r,t,Iv(Ov,n,e),Iv(Cv,n,e))}catch(t){Cv(n,t,e)}})):(e.value=t,e.state=1,Ev(e,!1))}catch(t){Cv({done:!1},t,e)}}};if(dv&&(mv=(fv=function(e){Xm(this,mv),Km(e),Hm(Mm,this);var t=lv(this);try{e(Iv(Ov,t),Iv(Cv,t))}catch(e){Cv(t,e)}}).prototype,(Mm=function(e){hv(this,{type:ov,done:!1,notified:!1,parent:!1,reactions:new rv,rejection:!1,state:0,value:void 0})}).prototype=Vm(mv,"then",(function(e,t){var n=lv(this),r=bv(Zm(this,fv));return n.parent=!0,r.ok=!Ym(e)||e,r.fail=Ym(t)&&t,r.domain=Nm?Av.domain:void 0,0==n.state?n.reactions.add(r):ev((function(){xv(r,n)})),r.promise})),Fm=function(){var e=new Mm,t=lv(e);this.promise=e,this.resolve=Iv(Ov,t),this.reject=Iv(Cv,t)},sv.f=bv=function(e){return e===fv||undefined===e?new Fm(e):_v(e)},Ym(av)&&pv!==Object.prototype)){jm=pv.then,cv||Vm(pv,"then",(function(e,t){var n=this;return new fv((function(e,t){Hm(jm,n,e,t)})).then(e,t)}),{unsafe:!0});try{delete pv.constructor}catch(e){}Qm&&Qm(pv,mv)}Gm({global:!0,constructor:!0,wrap:!0,forced:dv},{Promise:fv}),zm(fv,ov,!1),Wm(ov);var Pv=qr,Lv=_t,Bv=gt,Uv=Ct,Mv=Jc,Fv=ni,jv=xt,Gv=ul,Nv=nl,qv=Hc,Hv=TypeError,Vv=function(e,t){this.stopped=e,this.result=t},Qv=Vv.prototype,zv=function(e,t,n){var r,i,a,s,o,d,u,c=n&&n.that,l=!(!n||!n.AS_ENTRIES),h=!(!n||!n.IS_RECORD),p=!(!n||!n.IS_ITERATOR),f=!(!n||!n.INTERRUPTED),m=Pv(t,c),v=function(e){return r&&qv(r,"normal",e),new Vv(!0,e)},g=function(e){return l?(Bv(e),f?m(e[0],e[1],v):m(e[0],e[1])):f?m(e,v):m(e)};if(h)r=e.iterator;else if(p)r=e;else{if(!(i=Nv(e)))throw Hv(Uv(e)+" is not iterable");if(Mv(i)){for(a=0,s=Fv(e);s>a;a++)if((o=g(e[a]))&&jv(Qv,o))return o;return new Vv(!1)}r=Gv(e,i)}for(d=h?e.next:r.next;!(u=Lv(d,r)).done;){try{o=g(u.value)}catch(e){qv(r,"throw",e)}if("object"==typeof o&&o&&jv(Qv,o))return o}return new Vv(!1)},Wv=vm,Kv=Om.CONSTRUCTOR||!Dl((function(e){Wv.all(e).then(void 0,(function(){}))})),Yv=_t,Jv=Bt,Xv=Pm,Zv=mm,$v=zv;es({target:"Promise",stat:!0,forced:Kv},{all:function(e){var t=this,n=Xv.f(t),r=n.resolve,i=n.reject,a=Zv((function(){var n=Jv(t.resolve),a=[],s=0,o=1;$v(e,(function(e){var d=s++,u=!1;o++,Yv(n,t,e).then((function(e){u||(u=!0,a[d]=e,--o||r(a))}),i)})),--o||r(a)}));return a.error&&i(a.value),n.promise}});var eg=es,tg=Om.CONSTRUCTOR,ng=vm,rg=kt,ig=tt,ag=Ar,sg=ng&&ng.prototype;if(eg({target:"Promise",proto:!0,forced:tg,real:!0},{catch:function(e){return this.then(void 0,e)}}),ig(ng)){var og=rg("Promise").prototype.catch;sg.catch!==og&&ag(sg,"catch",og,{unsafe:!0})}var dg=_t,ug=Bt,cg=Pm,lg=mm,hg=zv;es({target:"Promise",stat:!0,forced:Kv},{race:function(e){var t=this,n=cg.f(t),r=n.reject,i=lg((function(){var i=ug(t.resolve);hg(e,(function(e){dg(i,t,e).then(n.resolve,r)}))}));return i.error&&r(i.value),n.promise}});var pg=_t,fg=Pm;es({target:"Promise",stat:!0,forced:Om.CONSTRUCTOR},{reject:function(e){var t=fg.f(this);return pg(t.reject,void 0,e),t.promise}});var mg=gt,vg=st,gg=Pm,Ag=function(e,t){if(mg(e),vg(t)&&t.constructor===e)return t;var n=gg.f(e);return(0,n.resolve)(t),n.promise},bg=es,_g=Om.CONSTRUCTOR,yg=Ag;kt("Promise"),bg({target:"Promise",stat:!0,forced:_g},{resolve:function(e){return yg(this,e)}});var wg=TypeError,kg=es,xg=se,Eg=ii,Dg=st,Sg=be,Rg=ni,Tg=function(e){if(e>9007199254740991)throw wg("Maximum allowed index exceeded");return e},Ig=To,Cg=Ei,Og=mc,Pg=Be,Lg=Ye("isConcatSpreadable"),Bg=Pg>=51||!xg((function(){var e=[];return e[Lg]=!1,e.concat()[0]!==e})),Ug=function(e){if(!Dg(e))return!1;var t=e[Lg];return void 0!==t?!!t:Eg(e)};kg({target:"Array",proto:!0,arity:1,forced:!Bg||!Og("concat")},{concat:function(e){var t,n,r,i,a,s=Sg(this),o=Cg(s,0),d=0;for(t=-1,r=arguments.length;t<r;t++)if(Ug(a=-1===t?s:arguments[t]))for(i=Rg(a),Tg(d+i),n=0;n<i;n++,d++)n in a&&Ig(o,d,a[n]);else Tg(d+1),Ig(o,d++,a);return o.length=d,o}});var Mg=rt,Fg=gn.EXISTS,jg=he,Gg=Ho,Ng=Function.prototype,qg=jg(Ng.toString),Hg=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,Vg=jg(Hg.exec);function Qg(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 zg(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 zg(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,s=!0,o=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){o=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(o)throw a}}}}function zg(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 Wg(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 Kg(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Wg(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Wg(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}Mg&&!Fg&&Gg(Ng,"name",{configurable:!0,get:function(){try{return Vg(Hg,qg(this))[1]}catch(e){return""}}});var Yg,Jg={react:{src:"https://pm.azerioncircle.com/react/16.14.0/umd/react.production.min.js",name:"React"},"react-dom":{src:"https://pm.azerioncircle.com/react-dom/16.14.0/umd/react-dom.production.min.js",name:"ReactDOM"},redux:{src:"https://pm.azerioncircle.com/redux/4.0.5/dist/redux.min.js",name:"Redux"},"react-redux":{src:"https://pm.azerioncircle.com/react-redux/7.2.1/dist/react-redux.min.js",name:"ReactRedux"},"material-ui-core":{src:"https://pm.azerioncircle.com/@material-ui/core/4.11.3/umd/material-ui.production.min.js",name:"MaterialUI"}},Xg={},Zg=function(e,t){Xg[e]=Kg(Kg({},t),{},{isLoading:!1})},$g=function(e){var n=this,r=e.id,i=e.src;return new Promise(function(e,a){if(t(this,n),document.getElementById(r))e();else{var s=document.createElement("script");s.onload=function(){e()},s.id=r,s.setAttribute("crossorigin",!0),s.src=i,document.head.appendChild(s)}}.bind(this))},eA=function(){var t=e(r.mark((function e(t){var n,i,a,s,o,d,u,c;return r.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(!(i=Xg[t]).isLoading){e.next=6;break}return e.abrupt("return");case 6:i.isLoading=!0,a=Qg(i.dependencies),e.prev=8,a.s();case 10:if((s=a.n()).done){e.next=26;break}if(o=s.value,e.prev=12,d=Jg[o].name,!window[d]){e.next=16;break}return e.abrupt("continue",24);case 16:return e.next=18,$g({id:o,src:Jg[o].src});case 18:e.next=24;break;case 20:e.prev=20,e.t0=e.catch(12),u=o.id,c=o.src,console.log("Could not load external script ".concat(u," ").concat(c),e.t0);case 24:e.next=10;break;case 26:e.next=31;break;case 28:e.prev=28,e.t1=e.catch(8),a.e(e.t1);case 31:return e.prev=31,a.f(),e.finish(31);case 34:return e.prev=34,e.next=37,$g({id:t,src:i.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(i.source,"."),e.t2);case 43:return i.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(e){return t.apply(this,arguments)}}(),tA=S((function t(){var n=this;R(this,t),T(this,"load",e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,eA("Leaderboard");case 2:n.leaderboard=e.sent;case 3:case"end":return e.stop()}}),e)})))),T(this,"showLeaderboard",function(){var t=e(r.mark((function e(t){var i;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=window.GD_OPTIONS.gameId,n.leaderboard){e.next=4;break}return e.next=4,n.load();case 4:n.leaderboard.showLeaderBoard(i,t);case 5:case"end":return e.stop()}}),e)})));return function(e){return t.apply(this,arguments)}}()),T(this,"addScore",function(){var t=e(r.mark((function e(t){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.leaderboard){e.next=3;break}return e.next=3,n.load();case 3:n.leaderboard.addScore(t);case 4:case"end":return e.stop()}}),e)})));return function(e){return t.apply(this,arguments)}}()),this.moduleName="Leaderboard",this.moduleConfig={source:"https://pm.azerioncircle.com/@bygd/gd-sdk-leaderboard/0.1.43/dist/default/iife/index.js",dependencies:["react","react-dom","redux","react-redux","material-ui-core"]},Zg(this.moduleName,this.moduleConfig)})),nA=new tA,rA=st,iA=wr,aA=Ye("match"),sA=function(e){var t;return rA(e)&&(void 0!==(t=e[aA])?!!t:"RegExp"==iA(e))},oA=sA,dA=TypeError,uA=function(e){if(oA(e))throw dA("The method doesn't accept regular expressions");return e},cA=Ye("match"),lA=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[cA]=!1,"/./"[e](t)}catch(e){}}return!1},hA=es,pA=Fr,fA=Vi.f,mA=ei,vA=ds,gA=uA,AA=ve,bA=lA,_A=pA("".startsWith),yA=pA("".slice),wA=Math.min,kA=bA("startsWith");hA({target:"String",proto:!0,forced:!!(kA||(Yg=fA(String.prototype,"startsWith"),!Yg||Yg.writable))&&!kA},{startsWith:function(e){var t=vA(AA(this));gA(e);var n=mA(wA(arguments.length>1?arguments[1]:void 0,t.length)),r=vA(e);return _A?_A(t,r,n):yA(t,n,n+r.length)===r}});var xA=_t,EA=we,DA=xt,SA=cs,RA=RegExp.prototype,TA=function(e){var t=e.flags;return void 0!==t||"flags"in RA||EA(e,"flags")||!DA(RA,e)?t:xA(SA,e)},IA=gn.PROPER,CA=Ar,OA=gt,PA=ds,LA=se,BA=TA,UA="toString",MA=RegExp.prototype[UA],FA=LA((function(){return"/a/b"!=MA.call({source:"a",flags:"b"})})),jA=IA&&MA.name!=UA;(FA||jA)&&CA(RegExp.prototype,UA,(function(){var e=OA(this);return"/"+PA(e.source)+"/"+PA(BA(e))}),{unsafe:!0});var GA=Fr,NA=Ar,qA=fo,HA=se,VA=Ye,QA=Cn,zA=VA("species"),WA=RegExp.prototype,KA=function(e,t,n,r){var i=VA(e),a=!HA((function(){var t={};return t[i]=function(){return 7},7!=""[e](t)})),s=a&&!HA((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[zA]=function(){return n},n.flags="",n[i]=/./[i]),n.exec=function(){return t=!0,null},n[i](""),!t}));if(!a||!s||n){var o=GA(/./[i]),d=t(i,""[e],(function(e,t,n,r,i){var s=GA(e),d=t.exec;return d===qA||d===WA.exec?a&&!i?{done:!0,value:o(t,n,r)}:{done:!0,value:s(n,t,r)}:{done:!1}}));NA(String.prototype,e,d[0]),NA(WA,i,d[1])}r&&QA(WA[i],"sham",!0)},YA=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t},JA=_t,XA=gt,ZA=tt,$A=wr,eb=fo,tb=TypeError,nb=function(e,t){var n=e.exec;if(ZA(n)){var r=JA(n,e,t);return null!==r&&XA(r),r}if("RegExp"===$A(e))return JA(eb,e,t);throw tb("RegExp#exec called on incompatible receiver")},rb=_t,ib=gt,ab=pe,sb=ve,ob=YA,db=ds,ub=Ft,cb=nb;function lb(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 hb(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?lb(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lb(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}KA("search",(function(e,t,n){return[function(t){var n=sb(this),r=ab(t)?void 0:ub(t,e);return r?rb(r,t,n):new RegExp(t)[e](db(n))},function(e){var r=ib(this),i=db(e),a=n(t,r,i);if(a.done)return a.value;var s=r.lastIndex;ob(s,0)||(r.lastIndex=0);var o=cb(r,i);return ob(r.lastIndex,s)||(r.lastIndex=s),null===o?-1:o.index}]}));var pb,fb,mb=function(){function e(){R(this,e)}return S(e,[{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:a()),d=decodeURIComponent((e||n)&&r.parentDomain?r.parentDomain:s()),c=decodeURIComponent((e||n)&&r.topDomain?r.topDomain:n&&0===o()?d:u()),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,v=(e||n)&&r.loaderEnabled,g=(e||n)&&r.loaderEnabled;console.log("noMinijuegosSDK",g);var A=(e||n)&&r.loaderEnabled,b=(e||n)&&r.loaderEnabled&&r.hasImpression&&r.version>="1.1.24";return{isTokenGameURL:e,isMasterGameURL:t,isExtHostedGameURL:n,noConsoleBanner:l,noLoadedEvent:h,noBlockerEvent:p,noPreroll:A,parentURL:i,parentDomain:d,topDomain:c&&c.length?c:d,noGAPageView:f,noLotamePageView:m,noGamedockSDK:v,noMinijuegosSDK:g,version:r.version,pauseGameOnStartup:b,depth:o(),domainMatched:d===c,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:"_isLoaderGameURL",value:function(){return/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Fa-f0-9]{32})(.*)$/i.test(location.href)&&location.href.startsWith("https://html5.gamedistribution.com")}},{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 I(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 I(document.referrer,!0);if(!r.query.gd_zone_config)return;e=r.query.gd_zone_config}else{var i=new I(location.href,!0);if(!i.query.gd_zone_config)return;e=i.query.gd_zone_config}return JSON.parse(C.decode(decodeURIComponent(e)))}catch(e){}}},{key:"_formatTokenURLSearch",value:function(e){var t="";try{t=encodeURIComponent(C.encode(JSON.stringify(e)))}catch(e){}try{var n=new I(location.href,!0);return n.query=n.query||{},n.query.gd_zone_config=t,"?".concat(qs.stringify(n.query))}catch(e){return"?gd_zone_config=".concat(t)}}},{key:"_extendUrlQuery",value:function(e,t){var n=new I(e,!0);return n.query=hb(hb({},n.query),t),n.toString()}},{key:"_base64_encode",value:function(e){return C.encode(JSON.stringify(e))}}]),e}(),vb=function(){try{return(new mb).getBridgeContext()}catch(e){return{}}}(),gb={userDeclinedTracking:document.location.search.indexOf("gdpr-tracking=0")>=0||document.cookie.indexOf("ogdpr_tracking=0")>=0,whitelabelPartner:(pb=!1,(fb=d("xanthophyll")).hasOwnProperty("xanthophyll")&&"true"===fb.xanthophyll&&(pb=!0),pb)},Ab=jl.charAt,bb=he,_b=be,yb=Math.floor,wb=bb("".charAt),kb=bb("".replace),xb=bb("".slice),Eb=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Db=/\$([$&'`]|\d{1,2})/g,Sb=Ou,Rb=_t,Tb=he,Ib=KA,Cb=se,Ob=gt,Pb=tt,Lb=pe,Bb=Xr,Ub=ei,Mb=ds,Fb=ve,jb=function(e,t,n){return t+(n?Ab(e,t).length:1)},Gb=Ft,Nb=function(e,t,n,r,i,a){var s=n+e.length,o=r.length,d=Db;return void 0!==i&&(i=_b(i),d=Eb),kb(a,d,(function(a,d){var u;switch(wb(d,0)){case"$":return"$";case"&":return e;case"`":return xb(t,0,n);case"'":return xb(t,s);case"<":u=i[xb(d,1,-1)];break;default:var c=+d;if(0===c)return a;if(c>o){var l=yb(c/10);return 0===l?a:l<=o?void 0===r[l-1]?wb(d,1):r[l-1]+wb(d,1):a}u=r[c-1]}return void 0===u?"":u}))},qb=nb,Hb=Ye("replace"),Vb=Math.max,Qb=Math.min,zb=Tb([].concat),Wb=Tb([].push),Kb=Tb("".indexOf),Yb=Tb("".slice),Jb="$0"==="a".replace(/./,"$0"),Xb=!!/./[Hb]&&""===/./[Hb]("a","$0");Ib("replace",(function(e,t,n){var r=Xb?"$":"$0";return[function(e,n){var r=Fb(this),i=Lb(e)?void 0:Gb(e,Hb);return i?Rb(i,e,r,n):Rb(t,Mb(r),e,n)},function(e,i){var a=Ob(this),s=Mb(e);if("string"==typeof i&&-1===Kb(i,r)&&-1===Kb(i,"$<")){var o=n(t,a,s,i);if(o.done)return o.value}var d=Pb(i);d||(i=Mb(i));var u=a.global;if(u){var c=a.unicode;a.lastIndex=0}for(var l=[];;){var h=qb(a,s);if(null===h)break;if(Wb(l,h),!u)break;""===Mb(h[0])&&(a.lastIndex=jb(s,Ub(a.lastIndex),c))}for(var p,f="",m=0,v=0;v<l.length;v++){for(var g=Mb((h=l[v])[0]),A=Vb(Qb(Bb(h.index),s.length),0),b=[],_=1;_<h.length;_++)Wb(b,void 0===(p=h[_])?p:String(p));var y=h.groups;if(d){var w=zb([g],b,A,s);void 0!==y&&Wb(w,y);var k=Mb(Sb(i,void 0,w))}else k=Nb(g,s,A,b,y,i);A>=m&&(f+=Yb(s,m,A)+k,m=A+g.length)}return f+Yb(s,m)}]}),!!Cb((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}))||!Jb||Xb);var Zb=se,$b=rt,e_=Ye("iterator"),t_=!Zb((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,n="";return e.pathname="c%20d",t.forEach((function(e,r){t.delete("b"),n+=r+e})),!t.size&&!$b||!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[e_]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==n||"x"!==new URL("http://x",void 0).host})),n_=Ar,r_=Bo,i_=Math.floor,a_=function(e,t){var n=e.length,r=i_(n/2);return n<8?s_(e,t):o_(e,a_(r_(e,0,r),t),a_(r_(e,r),t),t)},s_=function(e,t){for(var n,r,i=e.length,a=1;a<i;){for(r=a,n=e[a];r&&t(e[r-1],n)>0;)e[r]=e[--r];r!==a++&&(e[r]=n)}return e},o_=function(e,t,n,r){for(var i=t.length,a=n.length,s=0,o=0;s<i||o<a;)e[s+o]=s<i&&o<a?r(t[s],n[o])<=0?t[s++]:n[o++]:s<i?t[s++]:n[o++];return e},d_=es,u_=Y,c_=_t,l_=he,h_=rt,p_=t_,f_=Ar,m_=Ho,v_=function(e,t,n){for(var r in t)n_(e,r,t[r],n);return e},g_=id,A_=ch,b_=Jn,__=nf,y_=tt,w_=we,k_=qr,x_=Tr,E_=gt,D_=st,S_=ds,R_=Fs,T_=Rn,I_=ul,C_=nl,O_=pf,P_=a_,L_=Ye("iterator"),B_="URLSearchParams",U_=B_+"Iterator",M_=b_.set,F_=b_.getterFor(B_),j_=b_.getterFor(U_),G_=Object.getOwnPropertyDescriptor,N_=function(e){if(!h_)return u_[e];var t=G_(u_,e);return t&&t.value},q_=N_("fetch"),H_=N_("Request"),V_=N_("Headers"),Q_=H_&&H_.prototype,z_=V_&&V_.prototype,W_=u_.RegExp,K_=u_.TypeError,Y_=u_.decodeURIComponent,J_=u_.encodeURIComponent,X_=l_("".charAt),Z_=l_([].join),$_=l_([].push),ey=l_("".replace),ty=l_([].shift),ny=l_([].splice),ry=l_("".split),iy=l_("".slice),ay=/\+/g,sy=Array(4),oy=function(e){return sy[e-1]||(sy[e-1]=W_("((?:%[\\da-f]{2}){"+e+"})","gi"))},dy=function(e){try{return Y_(e)}catch(t){return e}},uy=function(e){var t=ey(e,ay," "),n=4;try{return Y_(t)}catch(e){for(;n;)t=ey(t,oy(n--),dy);return t}},cy=/[!'()~]|%20/g,ly={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},hy=function(e){return ly[e]},py=function(e){return ey(J_(e),cy,hy)},fy=A_((function(e,t){M_(this,{type:U_,iterator:I_(F_(e).entries),kind:t})}),"Iterator",(function(){var e=j_(this),t=e.kind,n=e.iterator.next(),r=n.value;return n.done||(n.value="keys"===t?r.key:"values"===t?r.value:[r.key,r.value]),n}),!0),my=function(e){this.entries=[],this.url=null,void 0!==e&&(D_(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===X_(e,0)?iy(e,1):e:S_(e)))};my.prototype={type:B_,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,n,r,i,a,s,o,d=C_(e);if(d)for(n=(t=I_(e,d)).next;!(r=c_(n,t)).done;){if(a=(i=I_(E_(r.value))).next,(s=c_(a,i)).done||(o=c_(a,i)).done||!c_(a,i).done)throw K_("Expected sequence with length 2");$_(this.entries,{key:S_(s.value),value:S_(o.value)})}else for(var u in e)w_(e,u)&&$_(this.entries,{key:u,value:S_(e[u])})},parseQuery:function(e){if(e)for(var t,n,r=ry(e,"&"),i=0;i<r.length;)(t=r[i++]).length&&(n=ry(t,"="),$_(this.entries,{key:uy(ty(n)),value:uy(Z_(n,"="))}))},serialize:function(){for(var e,t=this.entries,n=[],r=0;r<t.length;)e=t[r++],$_(n,py(e.key)+"="+py(e.value));return Z_(n,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var vy=function(){__(this,gy);var e=M_(this,new my(arguments.length>0?arguments[0]:void 0));h_||(this.length=e.entries.length)},gy=vy.prototype;if(v_(gy,{append:function(e,t){O_(arguments.length,2);var n=F_(this);$_(n.entries,{key:S_(e),value:S_(t)}),h_||this.length++,n.updateURL()},delete:function(e){O_(arguments.length,1);for(var t=F_(this),n=t.entries,r=S_(e),i=0;i<n.length;)n[i].key===r?ny(n,i,1):i++;h_||(this.length=n.length),t.updateURL()},get:function(e){O_(arguments.length,1);for(var t=F_(this).entries,n=S_(e),r=0;r<t.length;r++)if(t[r].key===n)return t[r].value;return null},getAll:function(e){O_(arguments.length,1);for(var t=F_(this).entries,n=S_(e),r=[],i=0;i<t.length;i++)t[i].key===n&&$_(r,t[i].value);return r},has:function(e){O_(arguments.length,1);for(var t=F_(this).entries,n=S_(e),r=0;r<t.length;)if(t[r++].key===n)return!0;return!1},set:function(e,t){O_(arguments.length,1);for(var n,r=F_(this),i=r.entries,a=!1,s=S_(e),o=S_(t),d=0;d<i.length;d++)(n=i[d]).key===s&&(a?ny(i,d--,1):(a=!0,n.value=o));a||$_(i,{key:s,value:o}),h_||(this.length=i.length),r.updateURL()},sort:function(){var e=F_(this);P_(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,n=F_(this).entries,r=k_(e,arguments.length>1?arguments[1]:void 0),i=0;i<n.length;)r((t=n[i++]).value,t.key,this)},keys:function(){return new fy(this,"keys")},values:function(){return new fy(this,"values")},entries:function(){return new fy(this,"entries")}},{enumerable:!0}),f_(gy,L_,gy.entries,{name:"entries"}),f_(gy,"toString",(function(){return F_(this).serialize()}),{enumerable:!0}),h_&&m_(gy,"size",{get:function(){return F_(this).entries.length},configurable:!0,enumerable:!0}),g_(vy,B_),d_({global:!0,constructor:!0,forced:!p_},{URLSearchParams:vy}),!p_&&y_(V_)){var Ay=l_(z_.has),by=l_(z_.set),_y=function(e){if(D_(e)){var t,n=e.body;if(x_(n)===B_)return t=e.headers?new V_(e.headers):new V_,Ay(t,"content-type")||by(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),R_(e,{body:T_(0,S_(n)),headers:T_(0,t)})}return e};if(y_(q_)&&d_({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return q_(e,arguments.length>1?_y(arguments[1]):{})}}),y_(H_)){var yy=function(e){return __(this,Q_),new H_(e,arguments.length>1?_y(arguments[1]):{})};Q_.constructor=yy,yy.prototype=Q_,d_({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:yy})}}var wy={URLSearchParams:vy,getState:F_},ky=va.includes,xy=bp;es({target:"Array",proto:!0,forced:se((function(){return!Array(1).includes()}))},{includes:function(e){return ky(this,e,arguments.length>1?arguments[1]:void 0)}}),xy("includes");var Ey=es,Dy=uA,Sy=ve,Ry=ds,Ty=lA,Iy=he("".indexOf);function Cy(e){var n=this,r={},i=(null==e?void 0:e._ancestor_origins)||window.location.ancestorOrigins,a=(null==e?void 0:e.self_url)||window.location.href,s=(null==e?void 0:e.self_origin)||window.location.origin,o=(null==e?void 0:e.referrer_url)||document.referrer;function d(e){return L(r,e)}function u(e,t){return B(r,e,t)}function c(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(e&&""!==e)try{return new I(e,t)}catch(e){console.log(e)}}function l(){for(var t=(null==e?void 0:e.urls)||[a,o],n=0;n<t.length;n++){var r,i=c(t[n]);if(i){var s=null===(r=i.query)||void 0===r?void 0:r.gd_sdk_referrer_url;if(s&&(s=(s=decodeURIComponent(s)).startsWith("https://")||s.startsWith("http://")?s:"https://".concat(s),O.isURL(s)))return s}}}return function(){var e;t(this,n),function(){var e=0,t=window;try{for(;t!=t.parent;)e++,t=t.parent}catch(e){u("depth.error",e.message)}u("depth.value",e)}(),function(){var e=i,t=r.depth.value,n=s;if(u("top.domain.from","fallback"),e&&e.length>0)n=e[e.length-1],u("top.domain.from","origins");else if(0===t)n=s,u("top.domain.from","self-top");else if(1===t){var a=c(o);a&&(n=a.origin,u("top.domain.from","referrer"))}u("top.domain.value",n.replace(/^https?:\/\/(www\.)?(.*)$/i,"$2"))}(),function(){var e=l();if(e)if(P(e))u("partner.domain.value",e),u("partner.domain.from","partner-domain");else{var t=c(e,!1);if(t)u("partner.domain.value",t.origin.replace(/^https?:\/\/(www\.)?(.*)$/i,"$2")),u("partner.domain.from","partner-url");else u("partner.domain.value",r.top.domain.value),u("partner.domain.from","partner-fallback")}else u("partner.domain.value",r.top.domain.value),u("partner.domain.from","fallback")}(),e=l(),0===r.depth.value?(u("partner.url.value",a),u("partner.url.from","self-top")):e?P(e)?(u("partner.url.value",a),u("partner.url.from","partner-domain")):(u("partner.url.value",e),u("partner.url.from","partner-url")):(u("partner.url.value",o),u("partner.url.from","fallback"))}.bind(this)(),{get:d,print:function(e){console.log(d(e))}}}Ey({target:"String",proto:!0,forced:!Ty("includes")},{includes:function(e){return!!~Iy(Ry(Sy(this)),Ry(Dy(e)),arguments.length>1?arguments[1]:void 0)}});var Oy="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==Oy&&Oy,Py={searchParams:"URLSearchParams"in Oy,iterable:"Symbol"in Oy&&"iterator"in Symbol,blob:"FileReader"in Oy&&"Blob"in Oy&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in Oy,arrayBuffer:"ArrayBuffer"in Oy};if(Py.arrayBuffer)var Ly=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],By=ArrayBuffer.isView||function(e){return e&&Ly.indexOf(Object.prototype.toString.call(e))>-1};function Uy(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 My(e){return"string"!=typeof e&&(e=String(e)),e}function Fy(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return Py.iterable&&(t[Symbol.iterator]=function(){return t}),t}function jy(e){this.map={},e instanceof jy?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 Gy(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function Ny(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function qy(e){var t=new FileReader,n=Ny(t);return t.readAsArrayBuffer(e),n}function Hy(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function Vy(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:Py.blob&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:Py.formData&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:Py.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():Py.arrayBuffer&&Py.blob&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=Hy(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):Py.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(e)||By(e))?this._bodyArrayBuffer=Hy(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):Py.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},Py.blob&&(this.blob=function(){var e=Gy(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=Gy(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(qy)}),this.text=function(){var e=Gy(this);if(e)return e;if(this._bodyBlob)return function(e){var t=new FileReader,n=Ny(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)},Py.formData&&(this.formData=function(){return this.text().then(Wy)}),this.json=function(){return this.text().then(JSON.parse)},this}jy.prototype.append=function(e,t){e=Uy(e),t=My(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},jy.prototype.delete=function(e){delete this.map[Uy(e)]},jy.prototype.get=function(e){return e=Uy(e),this.has(e)?this.map[e]:null},jy.prototype.has=function(e){return this.map.hasOwnProperty(Uy(e))},jy.prototype.set=function(e,t){this.map[Uy(e)]=My(t)},jy.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},jy.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),Fy(e)},jy.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),Fy(e)},jy.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),Fy(e)},Py.iterable&&(jy.prototype[Symbol.iterator]=jy.prototype.entries);var Qy=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function zy(e,t){if(!(this instanceof zy))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 zy){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new jy(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 jy(t.headers)),this.method=function(e){var t=e.toUpperCase();return Qy.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 Wy(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 Ky(e,t){if(!(this instanceof Ky))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 jy(t.headers),this.url=t.url||"",this._initBody(e)}zy.prototype.clone=function(){return new zy(this,{body:this._bodyInit})},Vy.call(zy.prototype),Vy.call(Ky.prototype),Ky.prototype.clone=function(){return new Ky(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new jy(this.headers),url:this.url})},Ky.error=function(){var e=new Ky(null,{status:0,statusText:""});return e.type="error",e};var Yy=[301,302,303,307,308];Ky.redirect=function(e,t){if(-1===Yy.indexOf(t))throw new RangeError("Invalid status code");return new Ky(null,{status:t,headers:{location:e}})};var Jy,Xy=Oy.DOMException;try{new Xy}catch(e){Xy=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},Xy.prototype=Object.create(Error.prototype),Xy.prototype.constructor=Xy}function Zy(e,t){return new Promise((function(n,r){var i=new zy(e,t);if(i.signal&&i.signal.aborted)return r(new Xy("Aborted","AbortError"));var a=new XMLHttpRequest;function s(){a.abort()}a.onload=function(){var e,t,r={status:a.status,statusText:a.statusText,headers:(e=a.getAllResponseHeaders()||"",t=new jy,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 Ky(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 Xy("Aborted","AbortError"))}),0)},a.open(i.method,function(e){try{return""===e&&Oy.location.href?Oy.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&&(Py.blob?a.responseType="blob":Py.arrayBuffer&&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 jy?i.headers.forEach((function(e,t){a.setRequestHeader(t,e)})):Object.getOwnPropertyNames(t.headers).forEach((function(e){a.setRequestHeader(e,My(t.headers[e]))})),i.signal&&(i.signal.addEventListener("abort",s),a.onreadystatechange=function(){4===a.readyState&&i.signal.removeEventListener("abort",s)}),a.send(void 0===i._bodyInit?null:i._bodyInit)}))}Zy.polyfill=!0,Oy.fetch||(Oy.fetch=Zy,Oy.Headers=jy,Oy.Request=zy,Oy.Response=Ky);var $y=function(e){var n=this;if(!Jy){var r={gameId:e.gameId,hours:(new Date).getHours(),topDomain:vb.topDomain,domain:vb.parentDomain,referrer:vb.parentURL,depth:o(),version:Ao.version,byloader:vb.isTokenGameURL,isTokenGameURL:vb.isTokenGameURL,isMasterGameURL:vb.isMasterGameURL,isExtHostedGameURL:vb.isExtHostedGameURL,byloaderVersion:vb.version,tracking:gb.userDeclinedTracking,whitelabel:gb.whitelabelPartner,platform:c()};Jy=new l(r)}return Jy||{send:function(){t(this,n)}.bind(this)}},ew={getGameData:function(e){var n=this;try{var r=e.replace("game.api.gamedistribution.com","game-api.gamedistribution.com");fetch(r).then(function(e){t(this,n)}.bind(this)).catch(function(e){t(this,n)}.bind(this))}catch(e){}},getGameLoaderIndex:function(e){var n=this;try{var r="https://html5-prod-aws.gamedistribution.com/".concat(e,"/");fetch(r).then(function(e){t(this,n)}.bind(this)).catch(function(e){t(this,n)}.bind(this))}catch(e){}}},tw={getGameData:function(e){var n=this;try{var r=e.replace("game.api.gamedistribution.com","game-api-acc-real-hwp.gamedistribution.com");fetch(r).then(function(e){t(this,n)}.bind(this)).catch(function(e){t(this,n)}.bind(this))}catch(e){}}},nw={prod:["html5.gamedistribution.com","revision.gamedistribution.com"],acc:["html5-acc-real-aws.gamedistribution.com","acceptance-revision.gamedistribution.com"]},rw={gameAPI:"game.api.gamedistribution.com"},iw={gameAPI:"game-api-acc-real-aws.gamedistribution.com"},aw=function(){var e=this,n=nw.acc.some(function(n){var r;return t(this,e),n===(null===(r=window.location.host)||void 0===r?void 0:r.toLowerCase())}.bind(this));return{env:n?"acc":"prod",config:n?iw:rw}},sw=function(e){var n=this,r=e.url;return new Promise(function(e,i){t(this,n);var a=new XMLHttpRequest;a.open("GET",r,!0),a.onreadystatechange=function(){if(4==a.readyState)if(200==a.status){var t=JSON.parse(a.responseText);e(t)}else i(Error("Error occured on request: ".concat(a.status,", ").concat(a.statusText)))},a.onerror=function(e){i(e)},a.send()}.bind(this))},ow=function(){function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"GD",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"ObjectStore";R(this,n),this.dbName=e,this.storeName=t,this.db=null,this.init()}var i,a,s,o;return S(n,[{key:"init",value:function(){var e=this;return new Promise(function(n,r){var i=this;t(this,e);var a=indexedDB.open(this.dbName,1);a.onerror=function(e){t(this,i),console.error("Database error:",e.target.error),r(e.target.error)}.bind(this),a.onsuccess=function(e){t(this,i),this.db=e.target.result,n(this.db)}.bind(this),a.onupgradeneeded=function(e){t(this,i);var n=e.target.result;n.objectStoreNames.contains(this.storeName)||n.createObjectStore(this.storeName,{keyPath:"key"})}.bind(this)}.bind(this))}},{key:"getItem",value:(o=e(r.mark((function e(n){var i=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.db){e.next=3;break}return e.next=3,this.init();case 3:return e.abrupt("return",new Promise(function(e,r){var a=this;t(this,i);var s=this.db.transaction([this.storeName],"readonly").objectStore(this.storeName).get(n);s.onerror=function(e){t(this,a),console.error("Get item error:",e.target.error),r(e.target.error)}.bind(this),s.onsuccess=function(n){t(this,a),s.result?e(s.result.value):e(null)}.bind(this)}.bind(this)));case 4:case"end":return e.stop()}}),e,this)}))),function(e){return o.apply(this,arguments)})},{key:"setItem",value:(s=e(r.mark((function e(n,i){var a=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.db){e.next=3;break}return e.next=3,this.init();case 3:return e.abrupt("return",new Promise(function(e,r){var s=this;t(this,a);var o=this.db.transaction([this.storeName],"readwrite").objectStore(this.storeName).put({key:n,value:i});o.onerror=function(e){t(this,s),console.error("Set item error:",e.target.error),r(e.target.error)}.bind(this),o.onsuccess=function(n){t(this,s),e()}.bind(this)}.bind(this)));case 4:case"end":return e.stop()}}),e,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"removeItem",value:(a=e(r.mark((function e(n){var i=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.db){e.next=3;break}return e.next=3,this.init();case 3:return e.abrupt("return",new Promise(function(e,r){var a=this;t(this,i);var s=this.db.transaction([this.storeName],"readwrite").objectStore(this.storeName).delete(n);s.onerror=function(e){t(this,a),console.error("Remove item error:",e.target.error),r(e.target.error)}.bind(this),s.onsuccess=function(n){t(this,a),e()}.bind(this)}.bind(this)));case 4:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"clear",value:(i=e(r.mark((function e(){var n=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.db){e.next=3;break}return e.next=3,this.init();case 3:return e.abrupt("return",new Promise(function(e,r){var i=this;t(this,n);var a=this.db.transaction([this.storeName],"readwrite").objectStore(this.storeName).clear();a.onerror=function(e){t(this,i),console.error("Clear store error:",e.target.error),r(e.target.error)}.bind(this),a.onsuccess=function(n){t(this,i),e()}.bind(this)}.bind(this)));case 4:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})}]),n}(),dw=function(){function t(n){var i=n.mode;R(this,t),this.setItem=function(){var t=e(r.mark((function e(t,n){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})));return function(e,n){return t.apply(this,arguments)}}(),this.getItem=function(){var t=e(r.mark((function e(t){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})));return function(e){return t.apply(this,arguments)}}(),"indexed-db"===i?(this.indexedStore=new ow,this.setItem=this.indexedStore.setItem.bind(this.indexedStore),this.getItem=this.indexedStore.getItem.bind(this.indexedStore)):"local-storage"===i&&(this.setItem=function(){var t=e(r.mark((function e(t,n){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",h.set(t,n));case 1:case"end":return e.stop()}}),e)})));return function(e,n){return t.apply(this,arguments)}}(),this.getItem=function(){var t=e(r.mark((function e(t){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",h.getString(t));case 1:case"end":return e.stop()}}),e)})));return function(e){return t.apply(this,arguments)}}())}var n,i;return S(t,[{key:"set",value:(i=e(r.mark((function e(t,n){var i;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=JSON.stringify(n),e.next=3,this.setItem(t,i);case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"get",value:(n=e(r.mark((function e(t){var n;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getItem(t);case 2:return n=e.sent,e.abrupt("return",n?JSON.parse(n):null);case 4:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})}]),t}();function uw(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 cw(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?uw(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):uw(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var lw="_gd_vs";function hw(e){return pw.apply(this,arguments)}function pw(){return(pw=e(r.mark((function e(t){var n,i,a;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.gameId,a=[],!window.indexedDB){e.next=13;break}return e.prev=3,e.next=6,_w({gameId:n});case 6:i=e.sent,e.next=13;break;case 9:e.prev=9,e.t0=e.catch(3),ko("visit-get error, indexedDb",e.t0.message),a.push(e.t0.message);case 13:if(i||!h.available){e.next=24;break}return e.prev=14,e.next=17,ww({gameId:n});case 17:i=e.sent,e.next=24;break;case 20:e.prev=20,e.t1=e.catch(14),ko("visit-get error, Ls",e.t1.message),a.push(e.t1.message);case 24:return e.abrupt("return",cw(cw({},i),{},{errors:a}));case 25:case"end":return e.stop()}}),e,null,[[3,9],[14,20]])})))).apply(this,arguments)}function fw(e){return mw.apply(this,arguments)}function mw(){return mw=e(r.mark((function e(t){var n,i,a,s;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.gameId,i=t.serverDate,s=[],!window.indexedDB){e.next=13;break}return e.prev=3,e.next=6,Aw({gameId:n,serverDate:i});case 6:a=e.sent,e.next=13;break;case 9:e.prev=9,e.t0=e.catch(3),ko("visit-update error, indexedDb",e.t0.message),s.push(e.t0.message);case 13:if(a||!h.available){e.next=24;break}return e.prev=14,e.next=17,vw({gameId:n,serverDate:i});case 17:a=e.sent,e.next=24;break;case 20:e.prev=20,e.t1=e.catch(14),ko("visit-update error, Ls",e.t1.message),s.push(e.t1.message);case 24:return e.abrupt("return",cw(cw({},a),{},{errors:s}));case 25:case"end":return e.stop()}}),e,null,[[3,9],[14,20]])}))),mw.apply(this,arguments)}function vw(e){return gw.apply(this,arguments)}function gw(){return gw=e(r.mark((function e(t){var n,i,a,s,o,d;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.gameId,i=t.serverDate,s=new dw({mode:a="local-storage"}),e.next=5,s.get(lw);case 5:return(o=e.sent)||(o={gids:{}}),o.gids[n]||(o.gids[n]={fv:i,vc:0}),(d=o.gids[n]).vc++,d.lv=i,e.next=13,s.set(lw,o);case 13:return e.abrupt("return",{visit:d,mode:a});case 14:case"end":return e.stop()}}),e)}))),gw.apply(this,arguments)}function Aw(e){return bw.apply(this,arguments)}function bw(){return bw=e(r.mark((function e(t){var n,i,a,s,o;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.gameId,i=t.serverDate,s=new dw({mode:a="indexed-db"}),e.next=5,s.get(n);case 5:return(o=e.sent)||(o={fv:i,vc:0}),o.vc++,o.lv=i,e.next=11,s.set(n,o);case 11:return e.abrupt("return",{visit:o,mode:a});case 12:case"end":return e.stop()}}),e)}))),bw.apply(this,arguments)}function _w(e){return yw.apply(this,arguments)}function yw(){return yw=e(r.mark((function e(t){var n,i,a;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.gameId,"indexed-db",i=new dw({mode:"indexed-db"}),e.next=5,i.get(n);case 5:return(a=e.sent)||(a={fv:null,vc:0}),e.abrupt("return",a);case 8:case"end":return e.stop()}}),e)}))),yw.apply(this,arguments)}function ww(e){return kw.apply(this,arguments)}function kw(){return kw=e(r.mark((function e(t){var n,i,a,s;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.gameId,"local-storage",i=new dw({mode:"local-storage"}),e.next=5,i.get(lw);case 5:return(a=e.sent)||(a={gids:{}}),a.gids[n]||(a.gids[n]={fv:null,vc:0}),s=a.gids[n],e.abrupt("return",s);case 10:case"end":return e.stop()}}),e)}))),kw.apply(this,arguments)}function xw(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 Ew(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?xw(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xw(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Dw,Sw,Rw,Tw,Iw=new M,Cw=[],Ow=function(e){Cw.push(e)},Pw=function(e){Dw=$y(Rw=e)},Lw=function(){var t=e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(Sw){e.next=7;break}return e.next=3,Gw(Rw);case 3:Sw=e.sent,Iw.emit("game-data-ready",Sw),Bw(),Uw();case 7:return e.abrupt("return",Sw);case 8:case"end":return e.stop()}}),e)})));return function(){return t.apply(this,arguments)}}(),Bw=function(){var t,n;if(null!==(t=Sw)&&void 0!==t&&null!==(n=t.aws_tst)&&void 0!==n&&n.enabled){var i,a,s,o,d;if(Fw(),null!==(i=Sw)&&void 0!==i&&null!==(a=i.aws_tst)&&void 0!==a&&null!==(s=a.ep)&&void 0!==s&&s.api&&null!==(o=Sw)&&void 0!==o&&o.url)ew.getGameData(null===(d=Sw)||void 0===d?void 0:d.url);setInterval(e(r.mark((function e(){var t;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Gw(Rw);case 3:Sw=e.sent,yo("gd-aws-test, new game data received",null===(t=Sw)||void 0===t?void 0:t.aws_tst),e.next=9;break;case 7:e.prev=7,e.t0=e.catch(0);case 9:case"end":return e.stop()}}),e,null,[[0,7]])}))),3e5)}},Uw=function(){var t,n;if(null!==(t=Sw)&&void 0!==t&&null!==(n=t.hwei)&&void 0!==n&&n.enabled){var i,a,s;if(Fw(),null!==(i=Sw)&&void 0!==i&&null!==(a=i.hwei)&&void 0!==a&&a.gameApi.enabled)tw.getGameData(null===(s=Sw)||void 0===s?void 0:s.url);setInterval(e(r.mark((function e(){var t;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Gw(Rw);case 3:Sw=e.sent,yo("gd-aws-test, new game data received",null===(t=Sw)||void 0===t?void 0:t.aws_tst),e.next=9;break;case 7:e.prev=7,e.t0=e.catch(0);case 9:case"end":return e.stop()}}),e,null,[[0,7]])}))),3e5)}},Mw=!1,Fw=function(){if(!Mw){Mw=!0;var n=window.fetch;window.fetch=e(r.mark((function e(){var i,a,s,o,d,u,c,l,h,p,f,m,v,g,A,b,_,y,w,k,x,E,D,S,R,T,I,C,O,P,L,B,U,M=this,F=arguments;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(A=F.length,b=new Array(A),_=0;_<A;_++)b[_]=F[_];y=b[0],w=b[1],k=null===(i=Sw)||void 0===i||null===(a=i.aws_tst)||void 0===a||null===(s=a.ep)||void 0===s?void 0:s.atm,x=null===(o=Sw)||void 0===o||null===(d=o.aws_tst)||void 0===d||null===(u=d.ep)||void 0===u?void 0:u.msgrt,E=(null===(c=Sw)||void 0===c||null===(l=c.hwei)||void 0===l?void 0:l.enabled)&&(null===(h=Sw)||void 0===h||null===(p=h.hwei)||void 0===p?void 0:p.atom.enabled),D=(null===(f=Sw)||void 0===f||null===(m=f.hwei)||void 0===m?void 0:m.enabled)&&(null===(v=Sw)||void 0===v||null===(g=v.hwei)||void 0===g?void 0:g.msgrt.enabled),S=function(e,r){var i=this;t(this,M);var a=y.replace(e,r);n(a,w).then(function(){t(this,i)}.bind(this))}.bind(this);try{k&&y.indexOf("tag.atom")>0&&S("tag.atom.gamedistribution.com","atom-tag-prod-aws.gamedistribution.com"),x&&y.indexOf("msgrt.gamedistribution.com")>0&&(yo("gd-aws-test hook",null===(R=Sw)||void 0===R?void 0:R.aws_tst,null===(T=Sw)||void 0===T||null===(I=T.aws_tst)||void 0===I||null===(C=I.ep)||void 0===C?void 0:C.msgrt),S("msgrt.gamedistribution.com","msgrt-prod-aws.gamedistribution.com"),null!==(O=Sw)&&void 0!==O&&null!==(P=O.hwei)&&void 0!==P&&null!==(L=P.msgrt)&&void 0!==L&&L.enabled&&null!==(B=Sw)&&void 0!==B&&B.url&&S("msgrt.gamedistribution.com","msgrt-hwp.gamedistribution.com")),E&&y.indexOf("tag.atom")>0&&S("tag.atom.gamedistribution.com","atom-tag-acc-real-hwp.gamedistribution.com"),D&&y.indexOf("msgrt.gamedistribution.com")>0&&S("msgrt.gamedistribution.com","msgrt-hwp.gamedistribution.com")}catch(e){}return e.next=11,n(y,w);case 11:return U=e.sent,e.abrupt("return",U);case 13:case"end":return e.stop()}}),e,this)})))}},jw=["gamedistribution.com","html5.gamedistribution.com"],Gw=function(n){var i=this;Dw.send("gdfw.loading",{message:"loading"}),Cw=[],Ow("1"),Ow("2"),new Cy,Ow("3");var a=function(){var e=this,n=new Cy,r=n.get("top.domain.value"),i=n.get("partner.domain.value"),a=jw.some(function(n){return t(this,e),n===(null==i?void 0:i.toLowerCase())}.bind(this)),o=s();return(a||o!==i)&&r||i}();Ow("4");var o=function(){return t(this,i),{gameId:n.gameId,disableAds:{},preroll:!0,midroll:12e4,rewardedAds:!1,title:"",tags:[],category:"",assets:[],dmain:!0,sdk:{},loader:{},splash:{},promo:{},dAds:{},pAds:{},mAds:{},rAds:{},gs_trc:{enabled:!0}}}.bind(this);Ow("5");var d=function(){t(this,i);var e=c(),r=e?"&mode=".concat(e):"",s=aw().config,o="https://".concat(s.gameAPI),d=u();return"".concat(o,"/game/v4/get/").concat(n.gameId.replace(/-/g,""),"/?domain=").concat(a).concat(r,"&v=").concat(Ao.version,"&engn=").concat(d.os,"&localTime=").concat((new Date).getHours())}.bind(this),u=function(){t(this,i);var e=navigator.userAgent,n="unknown";return/Windows/i.test(e)?n="Windows":/Mac OS X/i.test(e)&&!/Mobile/i.test(e)?n="macOS":/iPhone|iPad|iPod/i.test(e)?n="iOS":/Android/i.test(e)?n="Android":/Linux/i.test(e)&&(n="Linux"),/Mobi|Tablet/i.test(e),{os:n}}.bind(this);Ow("6");var c=function(){var e=this;t(this,i);var n=new Proxy(new URLSearchParams(window.location.search),{get:function(n,r){return t(this,e),n.get(r)}.bind(this)});return!n.gd_mode&&window.location.search.includes("gd_mode")?window.location.search.split("gd_mode=")[1]:n.gd_mode}.bind(this);Ow("7");var l=function(e){var n=this,r=(null==e?void 0:e.vmap_by_tags)||{},i=r.enabled,a=r.tags;if(i){var s,o,d=a||["co-op","multiplayer","IAPs"];if(e.tags.some(function(e){var r=this;return t(this,n),d.some(function(n){return t(this,r),n===e.title}.bind(this))}.bind(this)))((null===(s=e.adsc)||void 0===s||null===(o=s.t)||void 0===o?void 0:o.rspdur)||0)<1&&(e.mAds=Ew(Ew({},e.mAds||{}),{vmap:{enabled:!0}}),e.pAds=Ew(Ew({},e.pAds||{}),{vmap:{enabled:!0}}),e.rAds=Ew(Ew({},e.rAds||{}),{vmap:{enabled:!0}}),e.vmapByTagsApplied=!0)}},h=function(){var t=e(r.mark((function e(t){var n;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,hw({gameId:t.gameId});case 2:return n=e.sent,t.visit=n,e.abrupt("return",n);case 5:case"end":return e.stop()}}),e)})));return function(e){return t.apply(this,arguments)}}(),f=function(){var t=e(r.mark((function e(t){var n,i,a,s,o,d;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(i=t.visit)&&0===(null===(n=i.errors)||void 0===n?void 0:n.length)&&0===i.vc&&((null==t||null===(a=t.pAds)||void 0===a||null===(s=a.vmap)||void 0===s?void 0:s.enabled)&&(null==t||null===(o=t.pAds)||void 0===o||null===(d=o.vmap)||void 0===d?void 0:d.adtr))&&(t.pAds.vmap.enabled=!1);case 2:case"end":return e.stop()}}),e)})));return function(e){return t.apply(this,arguments)}}();return new Promise(function(n){var a=this;t(this,i),Ow("7.1");var s=o();try{Ow("7.2");var u=d();Ow("7.3"),fetch(u).then(function(){var t=e(r.mark((function e(t){var n;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Ow("7.4"),e.prev=1,e.next=4,t.json();case 4:n=e.sent,e.next=13;break;case 7:return e.prev=7,e.t0=e.catch(1),yo("gameData fetch error, fallback to other ajax api",e.t0),e.next=12,sw({url:u});case 12:n=e.sent;case 13:return e.abrupt("return",n);case 14:case"end":return e.stop()}}),e,null,[[1,7]])})));return function(e){return t.apply(this,arguments)}}()).then(function(){var i=e(r.mark((function e(i){var a,o,d,c,m,v,g,A=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(Ow("7.5"),!i.success){e.next=23;break}return c=i.result.game,Ow("7.6"),m={company:c.company,gameId:c.gameMd5,slug:c.slug,pname:c.pname,dname:c.dname,status:c.status,activeStatus:c.activeStatus,description:c.description,disableAds:c.enableAds,preroll:c.preRoll,midroll:6e4*c.timeAds,rewardedAds:c.rewardedAds,title:c.title,publishedAt:c.publishedAt,tags:c.tags,category:c.category,assets:c.assets,disp_2nd_prer:c.disp_2nd_prer,ctry_vst:c.ctry_vst,ctry:c.ctry,crtv:c.crtv,dmain:c.dmain,dmn:c.dmn,aws_tst:c.aws_tst,meta:c.meta,adsc:c.adsc,igs:c.igs,adspn:bo(c.adspn)||{},__t4r:bo(c.__t4r)||{},block_exts:bo(c.push_cuda),bloc_gard:bo(c.bloc_gard),cookie:bo(c.cookie),gdpr:bo(c.gdpr),diagnostic:bo(c.diagnostic),cmp:bo(c.cmp),gft:bo(c.gft)||{},sdk:bo(c.sdk)||{},sdkfw:bo(c.sdkfw)||{},loader:bo(c.loader)||{},splash:bo(c.splash)||{},promo:bo(c.promo)||{},dAds:bo(c.dads)||{},pAds:bo(c.pads)||{},mAds:bo(c.mads)||{},rAds:bo(c.rads)||{},lp:bo(c.lp)||{},extsc:bo(c.extsc)||{},evnts:bo(c.evnts)||{},dp:bo(c.dp)||{},adflw:bo(c.adflw)||{},afgszf:bo(c.afgszf)||{},fllc:bo(c.fllc)||{},lotm:bo(c.lotm)||{},t4rc:bo(c.t4rc)||{},midroll_plus:bo(c.midroll_plus)||{},gmky:bo(c.gmky)||{},urlBlockExc:bo(c.url_blck_exc)||{},sdk_wrp:bo(c.sdk_wrp)||{},dbglg:bo(c.dbglg)||{},extHosting:bo(c.ext_hosting)||{},directTokenUse:bo(c.dtu)||{},aeria:bo(c.aeria)||{},advlm:bo(c.advlm)||{},ad_blcks:bo(c.ad_blcks)||{},rmblck:bo(c.rmblck)||{},gs_trc:bo(c.gs_trc)||{},rwskp:bo(c.rwskp)||{},isv_fw:bo(c.isv_fw)||{},ext_vst:bo(c.ext_vst)||{},fix_score:bo(c.fix_score)||{},compensation:bo(c.comps)||{},adTimer:bo(c.adtr)||{},cust_vast:bo(c.cust_vast)||{},console_logs:bo(c.c_logs)||{},disable_ads_by_cmp:bo(c.dads_by_cmp)||{},ad_skip:bo(c.adskp)||{},__t4rac:bo(c.__t4rac)||{},vmap_by_tags:bo(c.vmap_by_tags)||{},hwei:bo(c.hwei)||{},_apOps:bo(c._apOps)||{}},Ow("7.7"),v=p(U(s),m),Ow("7.8"),l(v),e.next=11,h(v);case 11:return e.next=13,f(v);case 13:v.afg_disabled=!1===(null===(a=v.sdk)||void 0===a||null===(o=a.afg)||void 0===o?void 0:o.enabled),v.url=u,function(){t(this,A),void 0!==xo.afgEnabled&&(v.afg_disabled=!xo.afgEnabled),void 0!==xo.promoEnabled&&(v.promo=v.promo||{},v.promo=Ew(Ew({},v.promo),{},{rainbow:{enabled:xo.promoEnabled}}))}.bind(this),Ow("7.9"),null!==(d=v.pAds)&&void 0!==d&&d.enabled&&(v.preroll=!0),Ow("7.10"),Dw.send("gdfw.success",{message:"success"}),n(v),e.next=27;break;case 23:s.failed=!0,g=Cw[Cw.length-1],Dw.send("gdfw.err",{message:"".concat(g,": json error")}),n(s);case 27:case"end":return e.stop()}}),e,this)})));return function(e){return i.apply(this,arguments)}}()).catch(function(e){t(this,a);var r=Cw[Cw.length-1];Dw.send("gdfw.err",{message:"".concat(r,": ").concat(e.message?e.message:e)}),s.failed=!0,n(s)}.bind(this))}catch(e){var c=Cw[Cw.length-1];Dw.send("gdfw.err",{message:"".concat(c,": global ").concat(e.message?e.message:e)}),s.failed=!0,n(s)}}.bind(this))},Nw=function(){var t=e(r.mark((function e(){var t,n;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Lw();case 2:return n=e.sent,e.abrupt("return",!(null==n||null===(t=n.sdkfw)||void 0===t||!t.enabled));case 4:case"end":return e.stop()}}),e)})));return function(){return t.apply(this,arguments)}}(),qw=function(){var t=e(r.mark((function e(){var t,n,i;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Lw();case 2:return n=e.sent,i=null==n||null===(t=n.diagnostic)||void 0===t||!t.close_ga,e.abrupt("return",i);case 5:case"end":return e.stop()}}),e)})));return function(){return t.apply(this,arguments)}}(),Hw=function(){var t=e(r.mark((function e(){var t,n;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Lw();case 2:return n=e.sent,e.next=5,Nw();case 5:if(e.t0=e.sent,!e.t0){e.next=8;break}e.t0=!(null==n||null===(t=n.sdkfw)||void 0===t||!t.handshake);case 8:return e.abrupt("return",e.t0);case 9:case"end":return e.stop()}}),e)})));return function(){return t.apply(this,arguments)}}(),Vw=function(){var t=e(r.mark((function e(){var t,n,i,a,s,o,d,u;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Lw();case 2:return d=e.sent,u=!(null==d||null===(t=d.extsc)||void 0===t||!t.enabled),e.abrupt("return",{enabled:u,path:u?null==d||null===(n=d.extsc)||void 0===n?void 0:n.path:"",name:u?null==d||null===(i=d.extsc)||void 0===i?void 0:i.name:"",ref:u?null==d||null===(a=d.extsc)||void 0===a?void 0:a.ref:"",loadedFlag:u?null==d||null===(s=d.extsc)||void 0===s?void 0:s.loadedFlag:void 0,loadedFlagCheck:!!u&&!(null==d||null===(o=d.extsc)||void 0===o||!o.loadedFlagCheck)});case 5:case"end":return e.stop()}}),e)})));return function(){return t.apply(this,arguments)}}(),Qw=function(){var n=e(r.mark((function e(){var n,i,a,s,o,d=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Vw();case 2:if((n=e.sent).enabled){e.next=5;break}return e.abrupt("return");case 5:return i=n.path,a=n.name,s=n.ref,e.prev=6,o={},e.next=10,m(i,a,{error_prefix:"Blocked:",exists:function(){return t(this,d),!!s&&!!window[s]}.bind(this),attrs:o});case 10:e.next=16;break;case 12:e.prev=12,e.t0=e.catch(6),console.log("extsc: error on external partner script load",a,e.t0),f("DEVELOPER_ERROR",e.t0,"warning");case 16:case"end":return e.stop()}}),e,this,[[6,12]])})));return function(){return n.apply(this,arguments)}}(),zw=!1,Ww=!1,Kw=function(){return new Promise(function(){var n=e(r.mark((function e(n,i){var a,s,o,d,u,c=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!zw){e.next=4;break}return e.abrupt("return",n(Ww));case 4:zw=!0;case 5:return e.next=7,Vw();case 7:if((a=e.sent).enabled){e.next=10;break}return e.abrupt("return",n(!1));case 10:if(s=a.loadedFlag,!(o=a.loadedFlagCheck)||s){e.next=13;break}return e.abrupt("return",n(!1));case 13:if(o){e.next=16;break}return Ww=!0,e.abrupt("return",n(!0));case 16:d=!0,setTimeout(function(){t(this,c),d&&(d=!1,zw=!0,n(!1))}.bind(this),5e3),u=setInterval(function(){t(this,c),d&&o&&window[s]?(d=!1,zw=!0,Ww=!0,clearInterval(u),n(!0)):d||clearInterval(u)}.bind(this),100);case 19:case"end":return e.stop()}}),e,this)})));return function(e,t){return n.apply(this,arguments)}}())};function Yw(e){return Jw.apply(this,arguments)}function Jw(){return Jw=e(r.mark((function e(t){var n,i,a,s;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.whichFrame,i=t.options,e.prev=1,a="gd-".concat(n),s=!1,!("loader-frame"===n)){e.next=12;break}return e.next=9,Xw({id:a,verbose:s,options:i});case 9:Tw=e.sent,e.next=15;break;case 12:return e.next=14,$w({id:a,verbose:s,options:i});case 14:Tw=e.sent;case 15:e.next=20;break;case 17:e.prev=17,e.t0=e.catch(1),yo("[GD-IS] GD interservice create error",e.t0);case 20:case"end":return e.stop()}}),e,null,[[1,17]])}))),Jw.apply(this,arguments)}function Xw(e){return Zw.apply(this,arguments)}function Zw(){return Zw=e(r.mark((function n(i){var a,s,o,d,u=this;return r.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return a=i.id,s=i.verbose,o=i.options,n.next=4,F({id:a,verbose:s,router:!0});case 4:return(d=n.sent).on("connected",function(e){t(this,u),"gd-game-frame"===e.service&&d.registerProxy({alias:"isStoreVisible",method:"isStoreVisible",service:"gd-game-frame"})}.bind(this)),d.register({method:"whoami",handler:function(){return t(this,u),"[GD-IS] I am ".concat(a)}.bind(this)}),d.register({method:"isLoader",handler:function(){return t(this,u),!0}.bind(this)}),d.register({method:"hasRouter",handler:function(){return t(this,u),!1}.bind(this)}),d.register({method:"showAd",handler:function(){var t=e(r.mark((function t(n){var i,a,s;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=o.showAd?o.showAd:function(){var t=e(r.mark((function e(t){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",!0);case 1:case"end":return e.stop()}}),e)})));return function(e){return t.apply(this,arguments)}}(),a=n.adType,s=n.params,t.next=4,i(a,s);case 4:return t.abrupt("return",t.sent);case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()}),d.register({method:"getLoaderInfo",handler:function(){return t(this,u),{url:window.location.href}}.bind(this)}),d.register({method:"registerOnEvents",handler:function(){var t=e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return d.registerProxy({alias:"onEvent",method:"onEvent",service:"gd-game-frame"}),e.abrupt("return","[GD-IS] gd-game-frame registered for onEvents");case 3:case"end":return e.stop()}}),e)})));return function(){return t.apply(this,arguments)}}()}),n.next=14,d.whoami();case 14:return n.sent,n.abrupt("return",d);case 17:case"end":return n.stop()}}),n,this)}))),Zw.apply(this,arguments)}function $w(e){return ek.apply(this,arguments)}function ek(){return ek=e(r.mark((function e(n){var i,a,s,o,d,u=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=n.id,a=n.verbose,s=n.options,e.next=4,F({id:i,verbose:a,router:!1});case 4:return o=e.sent,"gd-loader-frame",e.next=8,o.findRouter({where:{id:"gd-loader-frame"}}).catch(function(e){t(this,u)}.bind(this));case 8:if(d=e.sent,e.t0=!!d,!e.t0){e.next=15;break}return e.next=14,o.connect(d).catch(function(e){t(this,u),yo("[GD-IS] Failed to connect to router",(null==e?void 0:e.message)||e)}.bind(this));case 14:e.t0=e.sent;case 15:return e.t0,o.register({method:"whoami",handler:function(){return t(this,u),"[GD-IS] I am ".concat(i)}.bind(this)}),o.register({method:"onEvent",handler:function(e){var n=this;t(this,u);var r=e.event;(s.onEvent||function(e){t(this,n)}.bind(this))(r)}.bind(this)}),o.register({method:"isLoader",handler:function(){return t(this,u),!1}.bind(this)}),o.register({method:"hasRouter",handler:function(){return t(this,u),!!d}.bind(this)}),o.register({method:"isStoreVisible",handler:function(){var e;return t(this,u),(null===(e=window.gdsdk.store)||void 0===e?void 0:e.isVisible)&&window.gdsdk.store.isVisible()}.bind(this)}),d&&(o.registerProxy({alias:"whoIsLoader",method:"whoami"}),o.registerProxy({alias:"registerOnEvents",method:"registerOnEvents"}),o.registerProxy({alias:"showAd",method:"showAd"}),o.registerProxy({alias:"getLoaderInfo",method:"getLoaderInfo"})),e.next=25,o.whoami();case 25:if(e.sent,!d){e.next=36;break}return e.next=30,o.whoIsLoader();case 30:return e.sent,e.next=33,o.registerOnEvents();case 33:e.sent;case 36:return e.abrupt("return",o);case 37:case"end":return e.stop()}}),e,this)}))),ek.apply(this,arguments)}var tk=!1;function nk(){var e=this;return new Promise(function(n,r){var i=this;if(t(this,e),Tw||tk)n(Tw);else{var a=setInterval(function(){t(this,i),Tw&&(tk=!0,clearInterval(a),n(Tw))}.bind(this),100);setTimeout(function(){t(this,i),clearInterval(a),Tw||(tk=!0,n(Tw))}.bind(this),5e3)}}.bind(this))}var rk,ik=function(){var t=e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(Tw){e.next=2;break}return e.abrupt("return",!1);case 2:if(e.t0=Tw.isStoreVisible,!e.t0){e.next=7;break}return e.next=6,Tw.isStoreVisible();case 6:e.t0=e.sent;case 7:return e.abrupt("return",e.t0);case 8:case"end":return e.stop()}}),e)})));return function(){return t.apply(this,arguments)}}(),ak=function(){var t=e(r.mark((function e(){var t,n,i,a;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(rk){e.next=8;break}return t=(new Cy).get(),n=(new j).getResult(),e.next=5,Lw();case 5:i=e.sent,r=void 0,s=void 0,r=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,s=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,a={w:r-=r%64,h:s-=s%64},rk={gameData:i,loc:t,ua:n,layout:a};case 8:return e.abrupt("return",rk);case 9:case"end":return e.stop()}var r,s}),e)})));return function(){return t.apply(this,arguments)}}(),sk=function(){var e=this,n=I(window.location.href,!0),r=n.host,i=n.query,a=function(n){return t(this,e),"revision.gamedistribution.com"===n||"uncached-html5.gamedistribution.com"===n}.bind(this),s=a(r);null!=i&&i.gd_sdk_referrer_url&&(s=a(I(i.gd_sdk_referrer_url).host));return s},ok=function(){var t=e(r.mark((function e(){var t;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!window.isForwarderFrame,!!window.isForwarderFrame){e.next=17;break}if(!sk()){e.next=8;break}return e.abrupt("return",!0);case 8:return e.next=10,nk();case 10:if(t=e.sent,!((null==t?void 0:t.isLoader())||!1)){e.next=15;break}return e.abrupt("return",!1);case 15:e.next=18;break;case 17:case 18:return e.abrupt("return",!0);case 19:case"end":return e.stop()}}),e)})));return function(){return t.apply(this,arguments)}}(),dk=function(){var t=e(r.mark((function e(){var t;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Lw();case 2:if(t=e.sent,null==t?void 0:t.igs){e.next=6;break}return e.abrupt("return",!1);case 6:return wo("[GD-IGS] store config available"),e.next=9,ok();case 9:if(e.sent){e.next=12;break}return e.abrupt("return",!1);case 12:return e.abrupt("return",!0);case 13:case"end":return e.stop()}}),e)})));return function(){return t.apply(this,arguments)}}();function uk(e,n){var r=this,i=!1,a=null;if(e){var s=e,o=I(s,!0),d=o.query;if(Object.keys(d).some(function(e){return t(this,r),e.toLowerCase()===n}.bind(this)))i=!0,a=d[n.toLowerCase()];else if(s=null==d?void 0:d.gd_sdk_referrer_url){var u=(o=I(s,!0)).query;Object.keys(u).some(function(e){return t(this,r),e.toLowerCase()===n}.bind(this))&&(i=!0,a=u[n.toLowerCase()])}}return{exists:i,value:a}}var ck=function(){var t=e(r.mark((function e(){var t,n,i,a,s,o,d;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=!1,e.next=3,nk();case 3:if(n=e.sent,e.t1=n,!e.t1){e.next=9;break}return e.next=8,n.getLoaderInfo();case 8:e.t1=e.sent;case 9:if(e.t0=e.t1,e.t0){e.next=12;break}e.t0={};case 12:return i=e.t0,a=i.url,s=uk(a,"sandbox"),o=s.exists,d=s.value,o&&(t=!0===d||"true"===d||1===d),e.abrupt("return",t);case 17:case"end":return e.stop()}}),e)})));return function(){return t.apply(this,arguments)}}(),lk=function(){var t=e(r.mark((function e(){var t,n,i,a,s;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,nk();case 2:if(t=e.sent,e.t1=t,!e.t1){e.next=8;break}return e.next=7,t.getLoaderInfo();case 7:e.t1=e.sent;case 8:if(e.t0=e.t1,e.t0){e.next=11;break}e.t0={};case 11:return n=e.t0,i=n.url,a=uk(i,"igs"),s=a.exists,a.value,e.abrupt("return",s);case 15:case"end":return e.stop()}}),e)})));return function(){return t.apply(this,arguments)}}(),hk=function(){var n=e(r.mark((function e(n){var i,a,s,o,d,u,c,l,h,p,f,v,g=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=n.onEvent,e.next=3,Lw();case 3:return s=e.sent,o=null==s?void 0:s.igs,e.next=7,dk();case 7:if(e.sent){e.next=10;break}return e.abrupt("return");case 10:return wo("[GD-IGS] store will initalize for frame",{loc:window.location.href}),"https://pm.azerioncircle.com/p/gd-sdk-igs-proxy",e.next=14,m("https://pm.azerioncircle.com/p/gd-sdk-igs-proxy","gd-sdk-igs-proxy",{});case 14:if(!(d=null===(i=window.GD_SDK_IGS_PROXY)||void 0===i?void 0:i.create)){e.next=40;break}return wo("[GD-IGS] store proxy created"),c="https://html5.gamedistribution.com/igs/index.html",e.next=20,lk();case 20:return l=e.sent,e.next=23,ck();case 23:return h=e.sent,wo("[GD-IS-IGS] sandbox",h),e.next=27,ak();case 27:return p=e.sent,e.next=30,d({igs:o,storeFrameUrl:c,showStoreOpener:l,sandbox:h,ctx:p});case 30:if(f=e.sent){e.next=33;break}return e.abrupt("return");case 33:v=!1,(null===(u=f.events)||void 0===u?void 0:u.onAny)&&f.events.onAny(function(e){var n;(t(this,g),"STORE_UI_VISIBILITY_CHANGED"===(null==e?void 0:e.name))&&(v=(null===(n=e.data)||void 0===n?void 0:n.visible)||!1);a&&a(e)}.bind(this)),f.isVisible=function(){return v},window.gdsdk.store=f,window.gdsdk.executeStoreAction=f.executeStoreAction.bind(f),a({name:"STORE_READY",data:{}}),wo("[GD-IGS] store ready");case 40:case"end":return e.stop()}}),e,this)})));return function(e){return n.apply(this,arguments)}}(),pk=es,fk=vm,mk=se,vk=kt,gk=tt,Ak=lf,bk=Ag,_k=Ar,yk=fk&&fk.prototype;if(pk({target:"Promise",proto:!0,real:!0,forced:!!fk&&mk((function(){yk.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=Ak(this,vk("Promise")),n=gk(e);return this.then(n?function(n){return bk(t,e()).then((function(){return n}))}:e,n?function(n){return bk(t,e()).then((function(){throw n}))}:e)}}),gk(fk)){var wk=vk("Promise").prototype.finally;yk.finally!==wk&&_k(yk,"finally",wk,{unsafe:!0})}var kk="\t\n\v\f\r                 \u2028\u2029\ufeff",xk=ve,Ek=ds,Dk=kk,Sk=he("".replace),Rk=RegExp("^["+Dk+"]+"),Tk=RegExp("(^|[^"+Dk+"])["+Dk+"]+$"),Ik=function(e){return function(t){var n=Ek(xk(t));return 1&e&&(n=Sk(n,Rk,"")),2&e&&(n=Sk(n,Tk,"$1")),n}},Ck={start:Ik(1),end:Ik(2),trim:Ik(3)},Ok=gn.PROPER,Pk=se,Lk=kk,Bk=Ck.trim;es({target:"String",proto:!0,forced:function(e){return Pk((function(){return!!Lk[e]()||"​…᠎"!=="​…᠎"[e]()||Ok&&Lk[e].name!==e}))}("trim")},{trim:function(){return Bk(this)}});var Uk=es,Mk=Pi.find,Fk=bp,jk="find",Gk=!0;jk in[]&&Array(1)[jk]((function(){Gk=!1})),Uk({target:"Array",proto:!0,forced:Gk},{find:function(e){return Mk(this,e,arguments.length>1?arguments[1]:void 0)}}),Fk(jk);var Nk=tt,qk=st,Hk=bh,Vk=nt.f,Qk=rt,zk=Y,Wk=he,Kk=za,Yk=function(e,t,n){var r,i;return Hk&&Nk(r=t.constructor)&&r!==n&&qk(i=r.prototype)&&i!==n.prototype&&Hk(e,i),e},Jk=Cn,Xk=oa.f,Zk=xt,$k=sA,ex=ds,tx=TA,nx=ms,rx=function(e,t,n){n in e||Vk(e,n,{configurable:!0,get:function(){return t[n]},set:function(e){t[n]=e}})},ix=Ar,ax=se,sx=we,ox=Jn.enforce,dx=$p,ux=Ns,cx=Qs,lx=Ye("match"),hx=zk.RegExp,px=hx.prototype,fx=zk.SyntaxError,mx=Wk(px.exec),vx=Wk("".charAt),gx=Wk("".replace),Ax=Wk("".indexOf),bx=Wk("".slice),_x=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,yx=/a/g,wx=/a/g,kx=new hx(yx)!==yx,xx=nx.MISSED_STICKY,Ex=nx.UNSUPPORTED_Y,Dx=Qk&&(!kx||xx||ux||cx||ax((function(){return wx[lx]=!1,hx(yx)!=yx||hx(wx)==wx||"/a/i"!=hx(yx,"i")})));if(Kk("RegExp",Dx)){for(var Sx=function(e,t){var n,r,i,a,s,o,d=Zk(px,this),u=$k(e),c=void 0===t,l=[],h=e;if(!d&&u&&c&&e.constructor===Sx)return e;if((u||Zk(px,e))&&(e=e.source,c&&(t=tx(h))),e=void 0===e?"":ex(e),t=void 0===t?"":ex(t),h=e,ux&&"dotAll"in yx&&(r=!!t&&Ax(t,"s")>-1)&&(t=gx(t,/s/g,"")),n=t,xx&&"sticky"in yx&&(i=!!t&&Ax(t,"y")>-1)&&Ex&&(t=gx(t,/y/g,"")),cx&&(a=function(e){for(var t,n=e.length,r=0,i="",a=[],s={},o=!1,d=!1,u=0,c="";r<=n;r++){if("\\"===(t=vx(e,r)))t+=vx(e,++r);else if("]"===t)o=!1;else if(!o)switch(!0){case"["===t:o=!0;break;case"("===t:mx(_x,bx(e,r+1))&&(r+=2,d=!0),i+=t,u++;continue;case">"===t&&d:if(""===c||sx(s,c))throw new fx("Invalid capture group name");s[c]=!0,a[a.length]=[c,u],d=!1,c="";continue}d?c+=t:i+=t}return[i,a]}(e),e=a[0],l=a[1]),s=Yk(hx(e,t),d?this:px,Sx),(r||i||l.length)&&(o=ox(s),r&&(o.dotAll=!0,o.raw=Sx(function(e){for(var t,n=e.length,r=0,i="",a=!1;r<=n;r++)"\\"!==(t=vx(e,r))?a||"."!==t?("["===t?a=!0:"]"===t&&(a=!1),i+=t):i+="[\\s\\S]":i+=t+vx(e,++r);return i}(e),n)),i&&(o.sticky=!0),l.length&&(o.groups=l)),e!==h)try{Jk(s,"source",""===h?"(?:)":h)}catch(e){}return s},Rx=Xk(hx),Tx=0;Rx.length>Tx;)rx(Sx,hx,Rx[Tx++]);px.constructor=Sx,Sx.prototype=px,ix(zk,"RegExp",Sx,{constructor:!0})}dx("RegExp");var Ix=rt,Cx=he,Ox=rs,Px=Xi,Lx=Cx(Qi.f),Bx=Cx([].push),Ux=function(e){return function(t){for(var n,r=Px(t),i=Ox(r),a=i.length,s=0,o=[];a>s;)n=i[s++],Ix&&!Lx(r,n)||Bx(o,e?[n,r[n]]:r[n]);return o}},Mx={entries:Ux(!0),values:Ux(!1)}.values;es({target:"Object",stat:!0},{values:function(e){return Mx(e)}});var Fx=es,jx=Wr,Gx=Xi,Nx=Bi,qx=he([].join);Fx({target:"Array",proto:!0,forced:jx!=Object||!Nx("join",",")},{join:function(e){return qx(Gx(this),void 0===e?",":e)}});var Hx=Pi.map;es({target:"Array",proto:!0,forced:!mc("map")},{map:function(e){return Hx(this,e,arguments.length>1?arguments[1]:void 0)}});var Vx=rt,Qx=he,zx=_t,Wx=se,Kx=rs,Yx=Da,Jx=Qi,Xx=be,Zx=Wr,$x=Object.assign,eE=Object.defineProperty,tE=Qx([].concat),nE=!$x||Wx((function(){if(Vx&&1!==$x({b:1},$x(eE({},"a",{enumerable:!0,get:function(){eE(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach((function(e){t[e]=e})),7!=$x({},e)[n]||Kx($x({},t)).join("")!=r}))?function(e,t){for(var n=Xx(e),r=arguments.length,i=1,a=Yx.f,s=Jx.f;r>i;)for(var o,d=Zx(arguments[i++]),u=a?tE(Kx(d),a(d)):Kx(d),c=u.length,l=0;c>l;)o=u[l++],Vx&&!zx(s,d,o)||(n[o]=d[o]);return n}:$x,rE=nE;es({target:"Object",stat:!0,arity:2,forced:Object.assign!==rE},{assign:rE});var iE,aE=he,sE=2147483647,oE=/[^\0-\u007E]/,dE=/[.\u3002\uFF0E\uFF61]/g,uE="Overflow: input needs wider integers to process",cE=RangeError,lE=aE(dE.exec),hE=Math.floor,pE=String.fromCharCode,fE=aE("".charCodeAt),mE=aE([].join),vE=aE([].push),gE=aE("".replace),AE=aE("".split),bE=aE("".toLowerCase),_E=function(e){return e+22+75*(e<26)},yE=function(e,t,n){var r=0;for(e=n?hE(e/700):e>>1,e+=hE(e/t);e>455;)e=hE(e/35),r+=36;return hE(r+36*e/(e+38))},wE=function(e){var t=[];e=function(e){for(var t=[],n=0,r=e.length;n<r;){var i=fE(e,n++);if(i>=55296&&i<=56319&&n<r){var a=fE(e,n++);56320==(64512&a)?vE(t,((1023&i)<<10)+(1023&a)+65536):(vE(t,i),n--)}else vE(t,i)}return t}(e);var n,r,i=e.length,a=128,s=0,o=72;for(n=0;n<e.length;n++)(r=e[n])<128&&vE(t,pE(r));var d=t.length,u=d;for(d&&vE(t,"-");u<i;){var c=sE;for(n=0;n<e.length;n++)(r=e[n])>=a&&r<c&&(c=r);var l=u+1;if(c-a>hE((sE-s)/l))throw cE(uE);for(s+=(c-a)*l,a=c,n=0;n<e.length;n++){if((r=e[n])<a&&++s>sE)throw cE(uE);if(r==a){for(var h=s,p=36;;){var f=p<=o?1:p>=o+26?26:p-o;if(h<f)break;var m=h-f,v=36-f;vE(t,pE(_E(f+m%v))),h=hE(m/v),p+=36}vE(t,pE(_E(h))),o=yE(s,l,u==d),s=0,u++}}s++,a++}return mE(t,"")},kE=es,xE=rt,EE=t_,DE=Y,SE=qr,RE=he,TE=Ar,IE=Ho,CE=nf,OE=we,PE=nE,LE=yl,BE=Bo,UE=jl.codeAt,ME=function(e){var t,n,r=[],i=AE(gE(bE(e),dE,"."),".");for(t=0;t<i.length;t++)n=i[t],vE(r,lE(oE,n)?"xn--"+wE(n):n);return mE(r,".")},FE=ds,jE=id,GE=pf,NE=wy,qE=Jn,HE=qE.set,VE=qE.getterFor("URL"),QE=NE.URLSearchParams,zE=NE.getState,WE=DE.URL,KE=DE.TypeError,YE=DE.parseInt,JE=Math.floor,XE=Math.pow,ZE=RE("".charAt),$E=RE(/./.exec),eD=RE([].join),tD=RE(1..toString),nD=RE([].pop),rD=RE([].push),iD=RE("".replace),aD=RE([].shift),sD=RE("".split),oD=RE("".slice),dD=RE("".toLowerCase),uD=RE([].unshift),cD="Invalid scheme",lD="Invalid host",hD="Invalid port",pD=/[a-z]/i,fD=/[\d+-.a-z]/i,mD=/\d/,vD=/^0x/i,gD=/^[0-7]+$/,AD=/^\d+$/,bD=/^[\da-f]+$/i,_D=/[\0\t\n\r #%/:<>?@[\\\]^|]/,yD=/[\0\t\n\r #/:<>?@[\\\]^|]/,wD=/^[\u0000-\u0020]+/,kD=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,xD=/[\t\n\r]/g,ED=function(e){var t,n,r,i;if("number"==typeof e){for(t=[],n=0;n<4;n++)uD(t,e%256),e=JE(e/256);return eD(t,".")}if("object"==typeof e){for(t="",r=function(e){for(var t=null,n=1,r=null,i=0,a=0;a<8;a++)0!==e[a]?(i>n&&(t=r,n=i),r=null,i=0):(null===r&&(r=a),++i);return i>n&&(t=r,n=i),t}(e),n=0;n<8;n++)i&&0===e[n]||(i&&(i=!1),r===n?(t+=n?":":"::",i=!0):(t+=tD(e[n],16),n<7&&(t+=":")));return"["+t+"]"}return e},DD={},SD=PE({},DD,{" ":1,'"':1,"<":1,">":1,"`":1}),RD=PE({},SD,{"#":1,"?":1,"{":1,"}":1}),TD=PE({},RD,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),ID=function(e,t){var n=UE(e,0);return n>32&&n<127&&!OE(t,e)?e:encodeURIComponent(e)},CD={ftp:21,file:null,http:80,https:443,ws:80,wss:443},OD=function(e,t){var n;return 2==e.length&&$E(pD,ZE(e,0))&&(":"==(n=ZE(e,1))||!t&&"|"==n)},PD=function(e){var t;return e.length>1&&OD(oD(e,0,2))&&(2==e.length||"/"===(t=ZE(e,2))||"\\"===t||"?"===t||"#"===t)},LD=function(e){return"."===e||"%2e"===dD(e)},BD={},UD={},MD={},FD={},jD={},GD={},ND={},qD={},HD={},VD={},QD={},zD={},WD={},KD={},YD={},JD={},XD={},ZD={},$D={},eS={},tS={},nS=function(e,t,n){var r,i,a,s=FE(e);if(t){if(i=this.parse(s))throw KE(i);this.searchParams=null}else{if(void 0!==n&&(r=new nS(n,!0)),i=this.parse(s,null,r))throw KE(i);(a=zE(new QE)).bindURL(this),this.searchParams=a}};nS.prototype={type:"URL",parse:function(e,t,n){var r,i,a,s,o,d=this,u=t||BD,c=0,l="",h=!1,p=!1,f=!1;for(e=FE(e),t||(d.scheme="",d.username="",d.password="",d.host=null,d.port=null,d.path=[],d.query=null,d.fragment=null,d.cannotBeABaseURL=!1,e=iD(e,wD,""),e=iD(e,kD,"$1")),e=iD(e,xD,""),r=LE(e);c<=r.length;){switch(i=r[c],u){case BD:if(!i||!$E(pD,i)){if(t)return cD;u=MD;continue}l+=dD(i),u=UD;break;case UD:if(i&&($E(fD,i)||"+"==i||"-"==i||"."==i))l+=dD(i);else{if(":"!=i){if(t)return cD;l="",u=MD,c=0;continue}if(t&&(d.isSpecial()!=OE(CD,l)||"file"==l&&(d.includesCredentials()||null!==d.port)||"file"==d.scheme&&!d.host))return;if(d.scheme=l,t)return void(d.isSpecial()&&CD[d.scheme]==d.port&&(d.port=null));l="","file"==d.scheme?u=KD:d.isSpecial()&&n&&n.scheme==d.scheme?u=FD:d.isSpecial()?u=qD:"/"==r[c+1]?(u=jD,c++):(d.cannotBeABaseURL=!0,rD(d.path,""),u=$D)}break;case MD:if(!n||n.cannotBeABaseURL&&"#"!=i)return cD;if(n.cannotBeABaseURL&&"#"==i){d.scheme=n.scheme,d.path=BE(n.path),d.query=n.query,d.fragment="",d.cannotBeABaseURL=!0,u=tS;break}u="file"==n.scheme?KD:GD;continue;case FD:if("/"!=i||"/"!=r[c+1]){u=GD;continue}u=HD,c++;break;case jD:if("/"==i){u=VD;break}u=ZD;continue;case GD:if(d.scheme=n.scheme,i==iE)d.username=n.username,d.password=n.password,d.host=n.host,d.port=n.port,d.path=BE(n.path),d.query=n.query;else if("/"==i||"\\"==i&&d.isSpecial())u=ND;else if("?"==i)d.username=n.username,d.password=n.password,d.host=n.host,d.port=n.port,d.path=BE(n.path),d.query="",u=eS;else{if("#"!=i){d.username=n.username,d.password=n.password,d.host=n.host,d.port=n.port,d.path=BE(n.path),d.path.length--,u=ZD;continue}d.username=n.username,d.password=n.password,d.host=n.host,d.port=n.port,d.path=BE(n.path),d.query=n.query,d.fragment="",u=tS}break;case ND:if(!d.isSpecial()||"/"!=i&&"\\"!=i){if("/"!=i){d.username=n.username,d.password=n.password,d.host=n.host,d.port=n.port,u=ZD;continue}u=VD}else u=HD;break;case qD:if(u=HD,"/"!=i||"/"!=ZE(l,c+1))continue;c++;break;case HD:if("/"!=i&&"\\"!=i){u=VD;continue}break;case VD:if("@"==i){h&&(l="%40"+l),h=!0,a=LE(l);for(var m=0;m<a.length;m++){var v=a[m];if(":"!=v||f){var g=ID(v,TD);f?d.password+=g:d.username+=g}else f=!0}l=""}else if(i==iE||"/"==i||"?"==i||"#"==i||"\\"==i&&d.isSpecial()){if(h&&""==l)return"Invalid authority";c-=LE(l).length+1,l="",u=QD}else l+=i;break;case QD:case zD:if(t&&"file"==d.scheme){u=JD;continue}if(":"!=i||p){if(i==iE||"/"==i||"?"==i||"#"==i||"\\"==i&&d.isSpecial()){if(d.isSpecial()&&""==l)return lD;if(t&&""==l&&(d.includesCredentials()||null!==d.port))return;if(s=d.parseHost(l))return s;if(l="",u=XD,t)return;continue}"["==i?p=!0:"]"==i&&(p=!1),l+=i}else{if(""==l)return lD;if(s=d.parseHost(l))return s;if(l="",u=WD,t==zD)return}break;case WD:if(!$E(mD,i)){if(i==iE||"/"==i||"?"==i||"#"==i||"\\"==i&&d.isSpecial()||t){if(""!=l){var A=YE(l,10);if(A>65535)return hD;d.port=d.isSpecial()&&A===CD[d.scheme]?null:A,l=""}if(t)return;u=XD;continue}return hD}l+=i;break;case KD:if(d.scheme="file","/"==i||"\\"==i)u=YD;else{if(!n||"file"!=n.scheme){u=ZD;continue}if(i==iE)d.host=n.host,d.path=BE(n.path),d.query=n.query;else if("?"==i)d.host=n.host,d.path=BE(n.path),d.query="",u=eS;else{if("#"!=i){PD(eD(BE(r,c),""))||(d.host=n.host,d.path=BE(n.path),d.shortenPath()),u=ZD;continue}d.host=n.host,d.path=BE(n.path),d.query=n.query,d.fragment="",u=tS}}break;case YD:if("/"==i||"\\"==i){u=JD;break}n&&"file"==n.scheme&&!PD(eD(BE(r,c),""))&&(OD(n.path[0],!0)?rD(d.path,n.path[0]):d.host=n.host),u=ZD;continue;case JD:if(i==iE||"/"==i||"\\"==i||"?"==i||"#"==i){if(!t&&OD(l))u=ZD;else if(""==l){if(d.host="",t)return;u=XD}else{if(s=d.parseHost(l))return s;if("localhost"==d.host&&(d.host=""),t)return;l="",u=XD}continue}l+=i;break;case XD:if(d.isSpecial()){if(u=ZD,"/"!=i&&"\\"!=i)continue}else if(t||"?"!=i)if(t||"#"!=i){if(i!=iE&&(u=ZD,"/"!=i))continue}else d.fragment="",u=tS;else d.query="",u=eS;break;case ZD:if(i==iE||"/"==i||"\\"==i&&d.isSpecial()||!t&&("?"==i||"#"==i)){if(".."===(o=dD(o=l))||"%2e."===o||".%2e"===o||"%2e%2e"===o?(d.shortenPath(),"/"==i||"\\"==i&&d.isSpecial()||rD(d.path,"")):LD(l)?"/"==i||"\\"==i&&d.isSpecial()||rD(d.path,""):("file"==d.scheme&&!d.path.length&&OD(l)&&(d.host&&(d.host=""),l=ZE(l,0)+":"),rD(d.path,l)),l="","file"==d.scheme&&(i==iE||"?"==i||"#"==i))for(;d.path.length>1&&""===d.path[0];)aD(d.path);"?"==i?(d.query="",u=eS):"#"==i&&(d.fragment="",u=tS)}else l+=ID(i,RD);break;case $D:"?"==i?(d.query="",u=eS):"#"==i?(d.fragment="",u=tS):i!=iE&&(d.path[0]+=ID(i,DD));break;case eS:t||"#"!=i?i!=iE&&("'"==i&&d.isSpecial()?d.query+="%27":d.query+="#"==i?"%23":ID(i,DD)):(d.fragment="",u=tS);break;case tS:i!=iE&&(d.fragment+=ID(i,SD))}c++}},parseHost:function(e){var t,n,r;if("["==ZE(e,0)){if("]"!=ZE(e,e.length-1))return lD;if(t=function(e){var t,n,r,i,a,s,o,d=[0,0,0,0,0,0,0,0],u=0,c=null,l=0,h=function(){return ZE(e,l)};if(":"==h()){if(":"!=ZE(e,1))return;l+=2,c=++u}for(;h();){if(8==u)return;if(":"!=h()){for(t=n=0;n<4&&$E(bD,h());)t=16*t+YE(h(),16),l++,n++;if("."==h()){if(0==n)return;if(l-=n,u>6)return;for(r=0;h();){if(i=null,r>0){if(!("."==h()&&r<4))return;l++}if(!$E(mD,h()))return;for(;$E(mD,h());){if(a=YE(h(),10),null===i)i=a;else{if(0==i)return;i=10*i+a}if(i>255)return;l++}d[u]=256*d[u]+i,2!=++r&&4!=r||u++}if(4!=r)return;break}if(":"==h()){if(l++,!h())return}else if(h())return;d[u++]=t}else{if(null!==c)return;l++,c=++u}}if(null!==c)for(s=u-c,u=7;0!=u&&s>0;)o=d[u],d[u--]=d[c+s-1],d[c+--s]=o;else if(8!=u)return;return d}(oD(e,1,-1)),!t)return lD;this.host=t}else if(this.isSpecial()){if(e=ME(e),$E(_D,e))return lD;if(t=function(e){var t,n,r,i,a,s,o,d=sD(e,".");if(d.length&&""==d[d.length-1]&&d.length--,(t=d.length)>4)return e;for(n=[],r=0;r<t;r++){if(""==(i=d[r]))return e;if(a=10,i.length>1&&"0"==ZE(i,0)&&(a=$E(vD,i)?16:8,i=oD(i,8==a?1:2)),""===i)s=0;else{if(!$E(10==a?AD:8==a?gD:bD,i))return e;s=YE(i,a)}rD(n,s)}for(r=0;r<t;r++)if(s=n[r],r==t-1){if(s>=XE(256,5-t))return null}else if(s>255)return null;for(o=nD(n),r=0;r<n.length;r++)o+=n[r]*XE(256,3-r);return o}(e),null===t)return lD;this.host=t}else{if($E(yD,e))return lD;for(t="",n=LE(e),r=0;r<n.length;r++)t+=ID(n[r],DD);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return OE(CD,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"==this.scheme&&1==t&&OD(e[0],!0)||e.length--},serialize:function(){var e=this,t=e.scheme,n=e.username,r=e.password,i=e.host,a=e.port,s=e.path,o=e.query,d=e.fragment,u=t+":";return null!==i?(u+="//",e.includesCredentials()&&(u+=n+(r?":"+r:"")+"@"),u+=ED(i),null!==a&&(u+=":"+a)):"file"==t&&(u+="//"),u+=e.cannotBeABaseURL?s[0]:s.length?"/"+eD(s,"/"):"",null!==o&&(u+="?"+o),null!==d&&(u+="#"+d),u},setHref:function(e){var t=this.parse(e);if(t)throw KE(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"==e)try{return new rS(e.path[0]).origin}catch(e){return"null"}return"file"!=e&&this.isSpecial()?e+"://"+ED(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(FE(e)+":",BD)},getUsername:function(){return this.username},setUsername:function(e){var t=LE(FE(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var n=0;n<t.length;n++)this.username+=ID(t[n],TD)}},getPassword:function(){return this.password},setPassword:function(e){var t=LE(FE(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var n=0;n<t.length;n++)this.password+=ID(t[n],TD)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?ED(e):ED(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,QD)},getHostname:function(){var e=this.host;return null===e?"":ED(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,zD)},getPort:function(){var e=this.port;return null===e?"":FE(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""==(e=FE(e))?this.port=null:this.parse(e,WD))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+eD(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,XD))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""==(e=FE(e))?this.query=null:("?"==ZE(e,0)&&(e=oD(e,1)),this.query="",this.parse(e,eS)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!=(e=FE(e))?("#"==ZE(e,0)&&(e=oD(e,1)),this.fragment="",this.parse(e,tS)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var rS=function(e){var t=CE(this,iS),n=GE(arguments.length,1)>1?arguments[1]:void 0,r=HE(t,new nS(e,!1,n));xE||(t.href=r.serialize(),t.origin=r.getOrigin(),t.protocol=r.getProtocol(),t.username=r.getUsername(),t.password=r.getPassword(),t.host=r.getHost(),t.hostname=r.getHostname(),t.port=r.getPort(),t.pathname=r.getPathname(),t.search=r.getSearch(),t.searchParams=r.getSearchParams(),t.hash=r.getHash())},iS=rS.prototype,aS=function(e,t){return{get:function(){return VE(this)[e]()},set:t&&function(e){return VE(this)[t](e)},configurable:!0,enumerable:!0}};if(xE&&(IE(iS,"href",aS("serialize","setHref")),IE(iS,"origin",aS("getOrigin")),IE(iS,"protocol",aS("getProtocol","setProtocol")),IE(iS,"username",aS("getUsername","setUsername")),IE(iS,"password",aS("getPassword","setPassword")),IE(iS,"host",aS("getHost","setHost")),IE(iS,"hostname",aS("getHostname","setHostname")),IE(iS,"port",aS("getPort","setPort")),IE(iS,"pathname",aS("getPathname","setPathname")),IE(iS,"search",aS("getSearch","setSearch")),IE(iS,"searchParams",aS("getSearchParams")),IE(iS,"hash",aS("getHash","setHash"))),TE(iS,"toJSON",(function(){return VE(this).serialize()}),{enumerable:!0}),TE(iS,"toString",(function(){return VE(this).serialize()}),{enumerable:!0}),WE){var sS=WE.createObjectURL,oS=WE.revokeObjectURL;sS&&TE(rS,"createObjectURL",SE(sS,WE)),oS&&TE(rS,"revokeObjectURL",SE(oS,WE))}jE(rS,"URL"),kE({global:!0,constructor:!0,forced:!EE,sham:!xE},{URL:rS});var dS=function(){function e(t){R(this,e),this.gameData=t,this.customParamKeys=["vid","_1ld","_1lp"]}return S(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(){var e=this;try{var n={},r=this.gameData.diagnostic&&this.gameData.diagnostic.cp&&this.gameData.diagnostic.cp.enabled,i=new I(location.href,!0);for(var a in i.query)n[a]=i.query[a];return Object.keys(n).filter(function(n){var r=this;return t(this,e),this.customParamKeys.some(function(e){return t(this,r),e===n}.bind(this))}.bind(this)).length>0||r?(console.log("custom-params",n,r),n):void console.log("custom-params, none")}catch(e){console.log("_checkCustomParams.Error",e)}}}]),e}(),uS=function(){function e(t,n){R(this,e),this.adContainer=t,this.onResume=n}return S(e,[{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 e=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(){t(this,e),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)}}}]),e}(),cS=function(){function e(t,n){R(this,e),this.adContainer=t,this.onResume=n}return S(e,[{key:"show",value:function(){this.rewardLabel.style.display="block"}},{key:"hide",value:function(){this.rewardLabel.style.display="none"}},{key:"add",value:function(){try{var e=document.createElement("div");this.rewardLabel=e;var t=document.createElement("span");t.innerText="To receive the reward, please do not skip the ad",this.addStyles(),e.classList.add("gd__reward__label"),t.classList.add("gd__reward__span"),this.rewardLabel.appendChild(t),this.adContainer.appendChild(e)}catch(e){console.log(e)}}},{key:"addStyles",value:function(){var e=document.body||document.getElementsByTagName("body")[0];this.addStylesheet("gd__reward__label__style",e,"\n .gd__reward__label{\n background-color:black; \n width: 160px;\n // height: 35px;\n position: absolute;\n display: none;\n z-index: 2000;\n cursor: pointer;\n bottom: 40px;\n left: 10px;\n margin: 0;\n border-radius: 5px;\n border: .5px solid gray;\n text-align: center;\n }\n .gd__reward__label:hover{\n filter: invert(100%) sepia(51%) saturate(0%) hue-rotate(346deg) brightness(104%) contrast(100%); \n }\n .gd__reward__span{\n color: white;\n font-size: 12px;\n padding-left: 5px;\n font-family: Verdana, Arial, Helvetica, sans-serif;\n text-align: center;\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)}}}]),e}(),lS=function(){function e(t,n,r){R(this,e),this.adContainer=t,this.onResume=n,this.OnSkip=r}return S(e,[{key:"show",value:function(){this.skipAd.style.display="block"}},{key:"hide",value:function(){this.skipAd.style.display="none"}},{key:"add",value:function(){var e=this;try{var n=document.createElement("div");this.skipAd=n;var r=document.createElement("span");r.innerText="Skip Ad >>",this.addStyles(),n.classList.add("gd__skip__ad"),r.classList.add("gd__skip__span"),this.skipAd.appendChild(r),this.adContainer.appendChild(n),this.skipAd.addEventListener("click",function(){t(this,e),this.OnSkip()}.bind(this))}catch(e){console.log(e)}}},{key:"addStyles",value:function(){var e=document.body||document.getElementsByTagName("body")[0];this.addStylesheet("gd__skip__ad__style",e,"\n .gd__skip__ad{\n background-color:black; \n width: 260px;\n // height: 35px;\n position: absolute;\n display: none;\n z-index: 2000;\n cursor: pointer;\n bottom: 40px;\n right: 0px;\n margin: 0;\n border-radius: 5px;\n border: .5px solid gray;\n text-align: center;\n padding: 10px;\n }\n .gd__skip__ad:hover{\n filter: invert(100%) sepia(51%) saturate(0%) hue-rotate(346deg) brightness(104%) contrast(100%); \n }\n .gd__skip__span{\n color: white;\n font-size: 22px;\n padding-left: 5px;\n font-family: Verdana, Arial, Helvetica, sans-serif;\n text-align: center;\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)}}}]),e}(),hS=function(){function e(t){R(this,e),this.adContainer=t}return S(e,[{key:"show",value:function(){this.audioLabel.style.display="block"}},{key:"hide",value:function(){this.audioLabel.style.display="none"}},{key:"mute",value:function(){document.getElementById("game").contentWindow.postMessage("mute","*")}},{key:"unmute",value:function(){document.getElementById("game").contentWindow.postMessage("unmute","*")}},{key:"add",value:function(){try{var e=document.createElement("div");this.audioLabel=e;var t=document.createElement("span");t.innerText="Audio Ad is Playing";var n=document.createElement("span");n.innerHTML="&#9432;",this.addStyles(),e.classList.add("gd__audio__label"),t.classList.add("gd__audio__span"),n.classList.add("gd__audio__span"),this.audioLabel.appendChild(n),this.audioLabel.appendChild(t),this.adContainer.appendChild(e)}catch(e){console.log(e)}}},{key:"addStyles",value:function(){var e=document.body||document.getElementsByTagName("body")[0];this.addStylesheet("gd__audio__label__style",e,"\n .gd__audio__label{\n background-color: #ffca00; \n width: 200px;\n position: relative;\n display: none;\n z-index: 2000;\n cursor: pointer;\n top: 0px;\n margin: 0 auto;\n border-radius: 0px;\n border: 0px;\n text-align: center;\n height: 30px;\n border-bottom-left-radius: 3px;\n border-bottom-right-radius: 3px;\n padding: 5px;\n }\n .gd__audio__span{\n color: black;\n font-size: 14px;\n padding-left: 5px;\n font-family: Verdana, Arial, Helvetica, sans-serif;\n text-align: center;\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)}}}]),e}(),pS=function(){function e(t){R(this,e),this.adContainer=t,this.counterLabel=null,this.countdownInterval=null}return S(e,[{key:"show",value:function(){this.counterLabel&&(this.counterLabel.style.display="block",this.startCountdown(this.counterSpan,5))}},{key:"hide",value:function(){this.counterLabel&&(this.counterLabel.style.display="none"),this.countdownInterval&&(clearInterval(this.countdownInterval),this.countdownInterval=null)}},{key:"add",value:function(){try{var e=document.createElement("div");this.counterLabel=e;var t=document.createElement("span");this.counterSpan=t,t.innerText="Ad showing in 5...",t.classList.add("gd__counter__span"),this.addStyles(),e.classList.add("gd__counter__label"),e.appendChild(t),this.adContainer.appendChild(e)}catch(e){console.log(e)}}},{key:"startCountdown",value:function(e,n){var r=this,i=n;e.innerText="Ad showing in ".concat(i,"..."),this.countdownInterval=setInterval(function(){t(this,r),(i-=1)>0?e.innerText="Ad showing in ".concat(i,"..."):(clearInterval(this.countdownInterval),e.innerText="Ad is now showing!",this.hide())}.bind(this),1e3)}},{key:"addStyles",value:function(){var e=document.body||document.getElementsByTagName("body")[0];this.addStylesheet("gd__counter__label__style",e,"\n .gd__counter__label {\n position: absolute;\n background-color: rgba(0, 0, 0, 0.5);\n display: none;\n z-index: 2000;\n cursor: pointer;\n top: 0px;\n margin: 0 auto;\n width: 200px;\n height: 40px;\n border-radius: 0px;\n text-align: center;\n padding: 8px;\n top: 87%;\n right: -1px;\n border: 1px solid white;\n }\n .gd__counter__span {\n font-size: 15px;\n font-family: Verdana, Arial, Helvetica, sans-serif;\n text-align: center;\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)}}}]),e}(),fS=function(){function e(t,n){R(this,e),this.adContainer=n,this.infoLabel=null,this.info=t}return S(e,[{key:"show",value:function(){this.infoLabel&&(this.infoLabel.style.display="block")}},{key:"hide",value:function(){this.infoLabel&&(this.infoLabel.style.display="none")}},{key:"add",value:function(){try{var e=document.createElement("div");this.infoLabel=e;var t=document.createElement("span");this.counterSpan=t,t.innerText="".concat(this.info),t.classList.add("gd__ad_info__span"),this.addStyles(),e.classList.add("gd__ad_info__label"),e.appendChild(t),this.adContainer.appendChild(e)}catch(e){console.log(e)}}},{key:"addStyles",value:function(){var e=document.body||document.getElementsByTagName("body")[0];this.addStylesheet("gd__ad_info__label__style",e,"\n .gd__ad_info__label {\n position: absolute;\n background-color: rgba(0, 0, 0, 0.5);\n display: none;\n z-index: 2000;\n cursor: pointer;\n top: 8px;\n left: 8px;\n margin: 0 auto;\n width: 200px;\n border-radius: 0px;\n text-align: center;\n padding: 8px;\n border: 1px solid white;\n }\n .gd__ad_info__span {\n font-size: 15px;\n font-family: Verdana, Arial, Helvetica, sans-serif;\n text-align: center;\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)}}}]),e}(),mS=function(){function e(t){R(this,e),this.adContainer=t}return S(e,[{key:"show",value:function(){this.t4rButton.style.display="block"}},{key:"hide",value:function(){this.t4rButton.style.display="none"}},{key:"add",value:function(){try{var e=document.createElement("div"),t=document.createElement("p");this.addStyles(),t.innerText="x",e.appendChild(t),e.id="gd__exit__button",e.setAttribute("title","Exit"),e.classList.add("gd__exit__button"),this.t4rButton=e,document.body.appendChild(e)}catch(e){console.log("Exit button add error",e)}}},{key:"addStyles",value:function(){var e=document.body||document.getElementsByTagName("body")[0];this.addStylesheet("gd__exit__button__style",e,"\n .gd__exit__button{\n background-color: transparent; \n width: 50px;\n height: 50px;\n position: absolute;\n pointer-events:none; \n z-index: 2000;\n top: 17px;\n right: 17px;\n margin: 0;\n border-radius: 50px;\n border: 1px solid white;\n text-align: center; \n font-size: 16px;\n line-height: normal;\n font-family: 'Arial';\n font-weight: bolder;\n }\n .gd__exit__button:hover{\n filter: invert(100%) sepia(51%) saturate(0%) hue-rotate(346deg) brightness(104%) contrast(100%); \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)}}}]),e}(),vS=!se((function(){return Object.isExtensible(Object.preventExtensions({}))})),gS={exports:{}},AS=se((function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}})),bS=se,_S=st,yS=wr,wS=AS,kS=Object.isExtensible,xS=bS((function(){kS(1)}))||wS?function(e){return!!_S(e)&&((!wS||"ArrayBuffer"!=yS(e))&&(!kS||kS(e)))}:kS,ES=es,DS=he,SS=Un,RS=st,TS=we,IS=nt.f,CS=oa,OS=Eo,PS=xS,LS=vS,BS=!1,US=Se("meta"),MS=0,FS=function(e){IS(e,US,{value:{objectID:"O"+MS++,weakData:{}}})},jS=gS.exports={enable:function(){jS.enable=function(){},BS=!0;var e=CS.f,t=DS([].splice),n={};n[US]=1,e(n).length&&(CS.f=function(n){for(var r=e(n),i=0,a=r.length;i<a;i++)if(r[i]===US){t(r,i,1);break}return r},ES({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:OS.f}))},fastKey:function(e,t){if(!RS(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!TS(e,US)){if(!PS(e))return"F";if(!t)return"E";FS(e)}return e[US].objectID},getWeakData:function(e,t){if(!TS(e,US)){if(!PS(e))return!0;if(!t)return!1;FS(e)}return e[US].weakData},onFreeze:function(e){return LS&&BS&&PS(e)&&!TS(e,US)&&FS(e),e}};SS[US]=!0;var GS=es,NS=vS,qS=se,HS=st,VS=gS.exports.onFreeze,QS=Object.freeze;GS({target:"Object",stat:!0,forced:qS((function(){QS(1)})),sham:!NS},{freeze:function(e){return QS&&HS(e)?QS(VS(e)):e}});var zS=function(){function e(){R(this,e),this.container=null,this.ensureContainer()}return S(e,[{key:"ensureContainer",value:function(){this.container||(this.container=document.createElement("div"),this.container.classList.add("gd__toaster__container"),this.type=Object.freeze({ERROR:"error",SUCCESS:"success",SKIP:"skip"}),document.body.appendChild(this.container),this.addStyles())}},{key:"show",value:function(e,n){var r=this;if(this.isRunningOnRevision()&&this.isToastEnabled()){var i=document.createElement("div");i.classList.add("gd__toaster"),n===this.type.ERROR?i.style.background="rgb(244, 67, 54)":n===this.type.SKIP&&(i.style.background="rgb(255, 165, 0)");var a=document.createElement("img");a.src="https://gamedistribution.com/assets/logos/logo-mark.svg",a.classList.add("gd__toaster__icon");var s=document.createElement("div");s.classList.add("gd__toaster__msg"),s.innerText=e,i.appendChild(a),i.appendChild(s),this.container.appendChild(i),requestAnimationFrame(function(){t(this,r),i.style.opacity="1",i.style.transform="translateY(0)"}.bind(this)),setTimeout(function(){var e=this;t(this,r),i.style.opacity="0",i.style.transform="translateY(20px)",setTimeout(function(){return t(this,e),i.remove()}.bind(this),300)}.bind(this),4e3)}}},{key:"addStyles",value:function(){if(!document.getElementById("gd__toaster__style")){var e=document.createElement("style");e.id="gd__toaster__style",e.appendChild(document.createTextNode("\n .gd__toaster__container {\n position: fixed;\n bottom: 20px;\n right: 20px;\n display: flex;\n flex-direction: column;\n gap: 10px;\n z-index: 3000;\n }\n\n .gd__toaster {\n background: rgb(76, 175, 80);\n border-radius: 8px;\n padding: 12px 16px;\n color: white;\n font-family: Verdana, Arial, Helvetica, sans-serif;\n display: flex;\n align-items: center;\n gap: 10px;\n box-shadow: 0px 0px 10px rgba(0,0,0,0.5);\n min-width: 250px;\n max-width: 300px;\n opacity: 0;\n transform: translateY(20px);\n transition: opacity 0.25s ease, transform 0.25s ease;\n }\n\n .gd__toaster__icon {\n width: 22px;\n height: 22px;\n }\n\n .gd__toaster__msg {\n font-size: 14px;\n line-height: 1.3;\n }\n ")),document.body.appendChild(e)}}},{key:"isRunningOnRevision",value:function(){try{return"revision.gamedistribution.com"===document.location.host}catch(e){return!1}}},{key:"isToastEnabled",value:function(){try{return"true"===new URLSearchParams(window.location.search).get("enableToast")}catch(e){return!1}}}]),e}(),WS=function(e){if(!e)return!1;var t=KS.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)},KS=Object.prototype.toString;function YS(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 JS(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?YS(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):YS(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function XS(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():e.fallback_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="fallback">\n <Wrapper>\n <AdSystem>Rainbow</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():'<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>"):'<vmap:AdTagURI templateType="vast3"><![CDATA['.concat(null==e?void 0:e.adtag_url,"]]></vmap:AdTagURI>")}var ZS,$S="13998",eR="_cc".concat($S),tR=["https://tags.crwdcntrl.net/c/".concat($S,"/cc.js?ns=").concat(eR)],nR=function(){return!!ZS&&"function"==typeof ZS.bcpf&&"function"==typeof ZS.add},rR=function(e,t){try{if(!nR())return;ZS.add(e,t),yo("lotame add success ".concat(e," ").concat(t))}catch(e){yo("lotame add error",err)}},iR=function(e,t){try{if(!nR())return;ZS.bcpw(e,t),yo("lotame send success ".concat(e," ").concat(t))}catch(e){}},aR=function(e){var n=this;try{rR("act","play"),rR("med","game"),"complete"===document.readyState?ZS.bcpf():ZS.bcp(),e.tags.forEach(function(e){t(this,n),iR("int","tags : ".concat(e.title.toLowerCase()))}.bind(this)),iR("int","category : ".concat(e.category.toLowerCase()))}catch(e){}},sR=function(){window.addEventListener("load",(function(){Iw.once("game-data-ready",function(){var t=e(r.mark((function e(t){var i;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=1,e.t0=null!=vb&&vb.noLotamePageView,!e.t0){e.next=7;break}return e.next=6,Nw();case 6:e.t0=e.sent;case 7:if(!e.t0){e.next=10;break}return e.abrupt("return");case 10:if(null!==(i=t.lotm)&&void 0!==i&&i.enabled){e.next=13;break}return e.abrupt("return");case 13:return e.next=16,m(tR[0],"LOTCC_".concat($S),{alternates:tR});case 16:"object"===n(window[eR])&&(ZS=window[eR]),nR()&&aR(t),e.next=23;break;case 20:e.prev=20,e.t1=e.catch(1),yo("lotame init error",e.t1);case 23:case"end":return e.stop()}}),e,null,[[1,20]])})));return function(e){return t.apply(this,arguments)}}())}))},oR=function(){iR("genp","ad video"),iR("act","ad impression")},dR=function(){iR("act","ad skipped")},uR=function(){iR("act","ad click")},cR=function(){iR("act","ad complete")},lR=function(){var e=(new Cy).get("partner.url.value"),t=new I(e,!0),n={isRevisionTest:!1,useTestAds:!1,disableMidrolltimer:!1};if("revision.gamedistribution.com"===t.host){var r=t.query.test,i="1"===r||"2"===r,a="1"===r;n={useTestAds:i,disableMidrolltimer:a,isRevisionTest:a||i}}return n},hR=function(){function e(){R(this,e),this.adContainer=window.document.body}return S(e,[{key:"show",value:function(e){this.adSpinner.style.display="block",this.adSpinnerOverlay.style.display="block",e?(this.adSpinner.style.display="block",this.adSpinnerFail.style.display="none",this.adSpinnerButton.style.display="none"):(this.adSpinner.style.display="none",this.adSpinnerFail.style.display="block",this.adSpinnerButton.style.display="block")}},{key:"hide",value:function(){this.adSpinner.style.display="none",this.adSpinnerOverlay.style.display="none"}},{key:"add",value:function(){var e=this;try{this.addStyles();var n=document.createElement("div");n.id="gd__spinner",n.setAttribute("title","Spinner"),n.classList.add("gd__spinner"),this.adSpinner=n;var r=document.createElement("div");r.id="gd__spinner__fail",r.setAttribute("title","Spinner"),r.classList.add("gd__spinner__fail"),r.innerHTML="No Ads Available!",this.adSpinnerFail=r;var i=document.createElement("div");i.id="gd__spinner__button",i.setAttribute("title","Spinner"),i.classList.add("gd__spinner__button"),i.onclick=function(){t(this,e),this.hide()}.bind(this);var a=document.createElement("p");a.innerText="OK!",i.appendChild(a),this.adSpinnerButton=i;var s=document.createElement("div");s.id="gd__spinner__logo",s.setAttribute("title","Spinner"),s.classList.add("gd__spinner__logo"),this.adSpinnerLogo=s;var o=document.createElement("div");o.id="gd__spinner__container",o.classList.add("gd__spinner__container"),o.appendChild(this.adSpinner),o.appendChild(this.adSpinnerFail),o.appendChild(this.adSpinnerButton),o.appendChild(this.adSpinnerLogo),this.adSpinnerContainer=o;var d=document.createElement("div");d.id="gd__spinner__overlay",d.classList.add("gd__spinner__overlay"),d.appendChild(this.adSpinnerContainer),this.adSpinnerOverlay=d,this.adContainer.appendChild(this.adSpinnerOverlay)}catch(e){console.log("Spinner error",e)}}},{key:"addStyles",value:function(){var e=document.body||document.getElementsByTagName("body")[0];this.addStylesheet("gd__spinner__style",e,'\n .gd__spinner__button{ \n text-align: center; \n width: 150px;\n height: 50px;\n position: absolute;\n display: none;\n z-index: 2000;\n cursor: pointer;\n top: calc(80% - 25px);\n left: calc(50% - 75px);\n margin: 0;\n font-size: large;\n font-family: monospace;\n background-color: #ff8c1c;\n border-radius: 50px;\n color: white;\n }\n\n .gd__spinner__fail{\n text-align: center; \n width: 300px;\n height: 50px;\n position: absolute;\n display: none;\n z-index: 2000;\n cursor: pointer;\n top: calc(65% - 25px);\n left: calc(50% - 150px);\n margin: 0;\n font-size: large;\n font-family: monospace;\n color: #ff8c1c;\n }\n\n .gd__spinner__logo{\n background: url("https://static.gamedistribution.com/android-chrome-192x192.png") no-repeat;\n background-size: cover; \n width: 100px;\n height: 100px;\n position: absolute;\n display: block;\n z-index: 2000;\n cursor: pointer;\n top: calc(30% - 50px);\n left: calc(50% - 50px);\n margin: 0;\n border-radius: 50%;\n }\n\n .gd__spinner__container{ \n background-color: black; \n width: 300px;\n height: 300px;\n position: absolute;\n z-index: 2000;\n cursor: pointer;\n top: calc(50% - 150px);\n left: calc(50% - 150px);\n margin: 0;\n border-radius: 20px;\n border: 2px solid #06b8a2;\n }\n\n\n .gd__spinner{\n background: url("https://static.gamedistribution.com/assets/loader.gif") no-repeat;\n background-size: cover; \n width: 50px;\n height: 50px;\n position: absolute;\n display: none;\n z-index: 2000;\n cursor: pointer;\n top: calc(80% - 25px);\n left: calc(50% - 25px);\n margin: 0;\n border-radius: 50%;\n }\n \n .gd__spinner__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 ')}},{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)}}}]),e}();function pR(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 fR(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?pR(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pR(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function mR(e){var n=e.gameData,r=e.msgrt,i=e.topDomain,a=e.parentDomain,s=e.parentURL;return{send_atom_event:function(e,o){if(function(e){var r=this,i=n.dbglg;return(null==i?void 0:i.enabled)&&i.topics&&i.topics.some(function(n){return t(this,r),n===e}.bind(this))}(e)){var d={gid:n.slug,md5:n.gameId,pid:0,pnm:n.pname,ctry:n.ctry,lcl:"en",hle:1,ads:1,args:o,href:window.location.href},u=(new Cy).get();return d=fR(fR({},d),u),function(e,t){try{var n=r._layout,o=r._ua,d={tp:e,ct:0,vrs:Ao.version,url:s,rfr:document.referrer,tdmn:i||a,dpth:0,args:t,ua:{brnm:o.browser.name,brvs:o.browser.version,osnm:o.os.name,osvs:o.os.version,dvmd:o.device.model,w:n.w,h:n.h}};return fetch("https://tag.atom.gamedistribution.com/v1/dmp?ar=".concat(encodeURIComponent(C.encode(JSON.stringify(d)))))}catch(e){}}(e,d=o?fR(fR({},d),o):d)}}}}function vR(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 gR(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?vR(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vR(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var AR=new M,bR=null,_R=function(){function n(e,r,i){var a=this;if(R(this,n),bR)return bR;bR=this;var s={debug:!1,width:640,height:360,locale:"en"};this.options=r?p(s,r):s,this.prefix="gdsdk__",this.adsLoader=null,this.adsManager=null,this.adDisplayContainer=null,this.eventBus=new _,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=i.parentDomain,this.topDomain=i.topDomain,this.parentURL=i.parentURL,this.adDisplayContainerInitialized=!1,this.IMASampleTags=y(),this.atom_display,this.adType_="",this.rewardGuarantied=!1,this.imaEventList=[],this.clickCount={midroll:0,preroll:0,rewarded:0},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=""!==e?document.getElementById(e):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 o=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,d=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;this.options.width=this.thirdPartyContainer?this.thirdPartyContainer.offsetWidth:o,this.options.height=this.thirdPartyContainer?this.thirdPartyContainer.offsetHeight:d,this.category="",this.tags=[],this.eventCategory="AD",this.adToaster=new zS(window.document.body),this.adToaster.show("GD SDK Loaded Successfully 👍"),this.eventBus.subscribe("LOADED",function(){t(this,a),this._clearSafetyTimer("LOADED"),this._startSafetyTimer(8e3,"LOADED")}.bind(this),"ima"),this.eventBus.subscribe("STARTED",function(){t(this,a),this._clearSafetyTimer("STARTED")}.bind(this),"ima"),this.eventBus.subscribe("AD_SUCCESS",function(){t(this,a),this.adToaster.show("".concat(this.adType_.toUpperCase()," shown successfully!"))}.bind(this)),this.eventBus.subscribe("SDK_GAME_PAUSE",function(){t(this,a),this.adToaster.show("Preparing to show ".concat(this.adType_.toUpperCase()," ad. ==> pause everything!!"))}.bind(this)),this.eventBus.subscribe("AD_ERROR",function(){t(this,a),this.adToaster.show("Failed to show ".concat(this.adType_," Ad"),"error")}.bind(this)),this.eventBus.subscribe("SDK_REWARDED_WATCH_COMPLETE",function(){t(this,a),this.adToaster.show("Grant reward to the user!")}.bind(this))}var i,a,s,o,d,u,c,l,f,w,k,x,E,D,O,P,L,B,M,F,j,G,Q,z,W,K,Y;return S(n,[{key:"start",value:(Y=e(r.mark((function n(){var i,a,s,o=this;return r.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,this.adSystemInitialize(e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,o._init_afg_script({});case 2:case"end":return e.stop()}}),e)}))));case 3:return i=n.sent,this.afgInitSuccess=i.success,n.next=7,this.adSystemInitialize(e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,o._init_hl_script();case 2:return e.next=4,o._init_ima_script();case 4:o._createPlayer(),o._setUpIMA();case 6:case"end":return e.stop()}}),e)}))));case 7:if(a=n.sent,this.imaInitSuccess=a.success,s=[],this.afgInitSuccess||s.push(i.error),this.imaInitSuccess||s.push(a.error),!(s.length>0)){n.next=14;break}throw s[0];case 14:window.eventTest=function(e){t(this,o),this._broadcast(e,{message:"",status:"success"})}.bind(this),n.next=21;break;case 17:throw n.prev=17,n.t0=n.catch(0),ko("gd-adflow error on ads.start",n.t0),new Error(n.t0);case 21:case"end":return n.stop()}}),n,this,[[0,17]])}))),function(){return Y.apply(this,arguments)})},{key:"adSystemInitialize",value:(K=e(r.mark((function e(t){var n;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n={success:!1},e.prev=1,e.next=4,t();case 4:n.success=!0,e.next=10;break;case 7:e.prev=7,e.t0=e.catch(1),n.error=e.t0;case 10:return e.abrupt("return",n);case 12:case"end":return e.stop()}}),e,null,[[1,7]])}))),function(e){return K.apply(this,arguments)})},{key:"_getDefaultSpilAdapterConfig",value:function(){return{vast:null,url:"https://pubads.g.doubleclick.net/gampad/ads",query:{correlator:"{{CACHEBUSTER}}",description_url:"{{PAGE_URL}}",env:"vp",gdfp_req:1,impl:"s",iu:"/59392726/gd_instream",npa:0,output:"vast",sz:"640x480|400x300",tfcd:0,unviewed_position_start:1}}}},{key:"_getSpilUrl",value:(W=e(r.mark((function e(t){var n,i,a,s,o,d,u,c,l,h,p,f;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.adType,i=t.options,e.prev=1,o=null===(a=this.gameData.adflw)||void 0===a||null===(s=a.adapterConfig)||void 0===s?void 0:s.spil,d=this.nextAdPosition(n),e.next=6,this._create_dp_context(d,i);case 6:return u=e.sent,o?(yo("spil-adaptor: in _getSpilUrl, adType, adPosition, gamedata",n,d,this.gameData),c=o[d]||o.default||this._getDefaultSpilAdapterConfig()):c=this._getDefaultSpilAdapterConfig(),l=100*u.floor_price,yo("spil-adaptor: fp",u.floor_price),h=this._createCustomAdVastUrl(c,{tnl_keys:{floor_price:l}}),p=h.url,f={url:p,dp:u,hl:{bidFloorApplied:!0}},e.abrupt("return",f);case 17:e.prev=17,e.t0=e.catch(1),console.log("spil-adaptor: Error on getting spil",e.t0);case 20:case"end":return e.stop()}}),e,this,[[1,17]])}))),function(e){return W.apply(this,arguments)})},{key:"checkIfTestAdsExist",value:function(){return h.available&&h.getBoolean("gd_debug_ex")&&h.getBoolean("gd_tag")||lR().useTestAds}},{key:"_getAdVast",value:function(n,i){var a=this;return new Promise(function(){var s=e(r.mark((function e(s){var o,d,u,c,l,p,f,m,v=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(h.available&&h.getBoolean("gd_debug_ex")&&h.getBoolean("gd_tag")||lR().useTestAds)){e.next=6;break}return o=a.IMASampleTags[n].filter(function(e){return t(this,v),e.indexOf("redirecterror")<0}.bind(this)),d=Math.floor(Math.random()*o.length),u=o[d],s({url:u,tnl_keys:{tnl_ad_pos:null==i?void 0:i.adTypeFound}}),e.abrupt("return");case 6:if("spil"!==i.adapter){e.next=8;break}return e.abrupt("return",s(a._getSpilUrl({adType:n,options:i})));case 8:if(void 0!==window.idhb.requestAds){e.next=10;break}throw new Error("Prebid.js wrapper script hit an error or didn't exist!");case 10:return e.prev=10,c=a.nextAdPosition(n),null!=i&&i.adTypeFound&&(c=null==i?void 0:i.adTypeFound),a._broadcast("AD_REQUEST",{message:c}),l=a.options,"preroll"===c&&q(l.preroll)?l=l.preroll:"midroll"===c&&q(l.midroll)?l=l.midroll:"rewarded"===c&&q(l.rewarded)&&(l=l.rewarded),p="","audio"===i.adapter||"audio"===i.giftType?(a.isAudioAd=!0,p="midrollaudio"):(a.isAudioAd=!1,p="rewarded"===c?"rewardedVideo":"gdbanner"===c?"gd__banner":"midroll"===c?"midroll":"video1"),e.next=20,window.idhb.isLoaded();case 20:return e.next=22,a._create_dp_context(c,i);case 22:f=e.sent,wo("gd-adflow, before idhb",c,p),m=window.idhb.getAdserverTargetingForAdSlot(p),window.idhb.setAdserverTargeting(gR(gR({},m),{},{adaptor_order:i.adapterIndex})),yo("hl-order 2",window.idhb.getAdserverTargetingForAdSlot(p)),window.idhb.requestAds({slots:T({},p,{bidFloor:(null==f?void 0:f.floor_price)||void 0}),callback:function(e,n){var r=this;t(this,v),"Missing configuration"===(null==e?void 0:e.error)&&a._broadcast("HL_CONFIG_ERROR",{status:"warning"}),!f||null!=n&&n.bidFloorApplied||fetch(f.skip_url).catch(function(e){t(this,r)}.bind(this));var i={src:"hl",tnl_keys:gR(gR({},window.idhb.getAdserverTargetingForAdSlot(p)),{},{tnl_ad_pos:c,tnl_asset_id:a.gameData.gameId}),url:e,dp:f,hl:n};a._extend_hl_url(i),s(i)}.bind(this)}),e.next=34;break;case 31:throw e.prev=31,e.t0=e.catch(10),new Error(e.t0);case 34:case"end":return e.stop()}}),e,this,[[10,31]])})));return function(e){return s.apply(this,arguments)}}())}},{key:"nextAdPosition",value:function(e){if(e===v.Rewarded)return this.adRewardedCount++,"rewarded";if(e===v.Interstitial){var t=!1===this.gameData.preroll||1===this.adPrerollCount;return t?this.adMidrollCount++:this.adPrerollCount++,t||this.adMidrollCount>0?"midroll":"preroll"}return"midroll"}},{key:"getAdPosition",value:function(e){return e===v.Rewarded?"rewarded":e===v.Interstitial?!1===this.gameData.preroll||1===this.adPrerollCount||this.adMidrollCount>0?"midroll":"preroll":"midroll"}},{key:"getCurrentAdPosition",value:function(e){return e===v.Interstitial?1===this.adPrerollCount&&0===this.adMidrollCount?"preroll":"midroll":e===v.Rewarded?"rewarded":void 0}},{key:"_requestPromo",value:function(e,t){var n=new google.ima.AdsRequest;return n.adsResponse=function(e){return'<VAST version="3.0"> \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 </Wrapper>\n </Ad>\n </VAST>").trim()}(e),n.linearAdSlotWidth=this.options.width,n.linearAdSlotHeight=this.options.height,n.nonLinearAdSlotWidth=this.options.width,n.nonLinearAdSlotHeight=this.options.height,n.forceNonLinearFullSlot=!0,this.options.vast_load_timeout&&(n.vastLoadTimeout=this.options.vast_load_timeout),n.setAdWillAutoPlay(t.autoplayAllowed),n.setAdWillPlayMuted(t.autoplayRequiresMute),this.adsLoader.requestAds(n),n}},{key:"_requestAd",value:function(e,n){var r=this;return n=n||{},new Promise(function(i){var a=this;if(t(this,r),"undefined"==typeof google)throw new Error("Unable to load ad, google IMA SDK not defined.");try{var s,o,d=null==e||null===(s=e.tnl_keys)||void 0===s?void 0:s.tnl_ad_pos;this.adSuccess=!1,this.contentPaused=!1;var u=new google.ima.AdsRequest,c=this._transformVast(e,n),l=gR(gR({},n),{},{adTag:c,tnl_ad_pos:d});this.adCounter[d]=this.adCounter[d]||0,this.adCounter[d]++;var h=e.dp,p=e.hl;this.current_dp=h,h&&!c.bidder&&(h.adtag_url=c.url);var f=this._isVMAP(d);this.adContext.isVMAP=f,function(){t(this,a),n.shouldFail&&(h?(h.adtag_url="dp_original_broken",h.fallback_url="dp_fallback_broken"):c.url="original_broken",yo("gd-adflow, _requestAd, dp.adtag_url",null==h?void 0:h.adtag_url),yo("gd-adflow, _requestAd, dp.fallback_url",null==h?void 0:h.fallback_url),yo("gd-adflow, _requestAd, adTag.url",c.url))}.bind(this);var m=this._getExternalVast(null===(o=n)||void 0===o?void 0:o.adType);if(m)u.adTagUrl=m;else if(f){wo("gd-adflow, _isVMAP");var v=function(e){for(var t=[],n="",r=Date.now(),i={ppos:1,lip:!0,vad_type:"linear"},a=0;a<e.length;a++){var s=new I(e[a].adtag.url,!0);s.query=JS(JS({},s.query),{},{ad_rule:0,vpos:e[a].position,pod:1,correlator:0===a?r:++r,output:"xml_vast3"}),a<e.length-1&&(s.query=JS(JS({},s.query),i)),t.push(s.toString())}for(var o=Date.now(),d=1;d<=t.length;d++){var u,c,l,h;n+='<vmap:AdBreak timeOffset="start" breakType="linear" breakId="break-'.concat(d,'">\n <vmap:AdSource id="').concat(o++,'" allowMultipleAds="false" followRedirects="true">\n ').concat(XS({id:o++,adtag_url:t[d-1],error_url:null===(u=e[d-1].dp)||void 0===u?void 0:u.error_url,impression_url:null===(c=e[d-1].dp)||void 0===c?void 0:c.impression_url,fallback_url:null===(l=e[d-1].dp)||void 0===l?void 0:l.fallback_url,fallback_imp_url:null===(h=e[d-1].dp)||void 0===h?void 0:h.fallback_imp_url}),"</vmap:AdSource>\n </vmap:AdBreak>")}return'<?xml version="1.0" encoding="UTF-8"?>\n <vmap:VMAP xmlns:vmap="http://www.iab.net/videosuite/vmap" version="1.0">\n '.concat(n,"\n </vmap:VMAP>").trim()}(this._get_vmap_context({dp:h,adtag:c,position:"preroll"===l.tnl_ad_pos?"preroll":"midroll",config:this._get_vmap_config(d)}));u.adsResponse=v}else if(h&&p.bidFloorApplied){yo("gd-adflow, vast wrapper"),h.adtag_url||(h.adtag_url=c.url);var g=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()}(h);u.adsResponse=g}else if(h&&h.fallback_url){yo("gd-adflow, vast wrapper 2");var A=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()}(h);u.adsResponse=A}else yo("gd-adflow, without dp"),u.adTagUrl=c.url;u.linearAdSlotWidth=this.options.width,u.linearAdSlotHeight=this.options.height,u.nonLinearAdSlotWidth=this.options.width,u.nonLinearAdSlotHeight=this.options.height,u.forceNonLinearFullSlot=!0,this.options.vast_load_timeout&&(u.vastLoadTimeout=this.options.vast_load_timeout),u.setAdWillAutoPlay(n.autoplayAllowed);var b=n.opusSuccess||n.autoplayRequiresMute;u.setAdWillPlayMuted(b),this.adsLoader.requestAds(u,l);try{this._broadcast("AD_SDK_REQUEST",{message:l})}catch(e){}i(u)}catch(e){throw new Error(e)}}.bind(this))}},{key:"_getExternalVast",value:function(e){var t;try{var n,r,i,a,s,o,d=this.getCurrentAdPosition(e),u=null===(n=this.gameData)||void 0===n?void 0:n.cust_vast,c=(null==u?void 0:u[d])||(null==u?void 0:u.default);if(!c)return yo("[ext-vast] no custom vast config"),null;yo("[ext-vast] has custom vast config",u);var l=null==c||null===(r=c.maps)||void 0===r||null===(i=r.position)||void 0===i?void 0:i[d],h=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}();yo("[ext-vast] is-mobile",h);var p=h?"mobile":"desktop",f=null==c||null===(a=c.maps)||void 0===a||null===(s=a.env)||void 0===s?void 0:s[p],m=this._createCustomAdVastUrl(c,{tnl_keys:{slug:null===(o=this.gameData)||void 0===o?void 0:o.slug,mapped_position:l,mapped_env:f}});t=null==m?void 0:m.url,yo("[ext-vast] check result",t)}catch(e){ko("[ext-vast] check err",e)}return t}},{key:"cancel",value:function(e){var t,n;if(!1!==this.requestRunning){this.requestRunning=!1,this._resetAdsLoader(),this._hide("cancel"),this.activeAdContainer&&(this.activeAdContainer.style.opacity=1),this.adsManager&&this.adsManager.setVolume(null!==(t=this.adContext)&&void 0!==t&&t.muteRequested?0:1),this.t4rButton&&this.t4rButton.hide();var r=(null==e||null===(n=e.message)||void 0===n?void 0:n.indexOf("NO_VAST_URL"))>=0,i="AD_SDK_CANCELED";this._broadcast(i,{name:i,message:"Advertisement has been canceled.",status:"warning",noVast:r,analytics:{category:this.eventCategory,action:i,label:this.gameData.gameId}})}}},{key:"_checkAutoPlay",value:(z=e(r.mark((function e(){var n=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(e,r){var i,a=this;t(this,n);var s=navigator.userAgent.toLowerCase();s.indexOf("safari")>-1&&s.indexOf("chrome");var o=(null===(i=this.gameData)||void 0===i?void 0:i._apOps)||!0;N.video({inline:!0,muted:!1}).then(function(n){t(this,a);var r=n.result;n.error,e(!0===r?{autoplayAllowed:o,autoplayRequiresMute:!1}:{autoplayAllowed:o,autoplayRequiresMute:!0})}.bind(this))}.bind(this)));case 1:case"end":return e.stop()}}),e,this)}))),function(){return z.apply(this,arguments)})},{key:"_initDisplayContainerWithAutoPlay",value:(Q=e(r.mark((function e(){var t;return r.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 Q.apply(this,arguments)})},{key:"startAd",value:(G=e(r.mark((function e(n){var i,a,s,o=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=n.adType,s=n.params,this.adType_=a,this.isAudioAd=!1,this.adContext=gR(gR({},s),{},{adType:a}),null!==(i=this.gameData.adspn)&&void 0!==i&&i.enabled&&(this.adFlowProcessSpinner||(this.adFlowProcessSpinner=new hR,this.adFlowProcessSpinner.add()),this.adFlowProcessSpinner.show(!0)),"promo"!==(null==s?void 0:s.adapter)){e.next=7;break}return e.abrupt("return",this._startPromo(s,a));case 7:if("adsense"!==(null==s?void 0:s.adapter)){e.next=31;break}if(a!==v.Interstitial){e.next=24;break}if("preroll"!==(null==s?void 0:s.position)){e.next=13;break}return e.abrupt("return",this._startAdsensePlacementPreroll(n));case 13:if("start"!==(null==s?void 0:s.position)){e.next=17;break}return e.abrupt("return",this._startAdsensePlacementStart(n));case 17:if("next"!==(null==s?void 0:s.position)){e.next=21;break}return e.abrupt("return",this._startAdsensePlacementNext(n));case 21:return e.abrupt("return",this._startAdsensePlacementPreroll(n));case 22:e.next=29;break;case 24:if(a!==v.Rewarded){e.next=28;break}return e.abrupt("return",this._startAdsensePlacementRewardedAd(n));case 28:throw new Error("Unsupported ad type");case 29:e.next=44;break;case 31:if(!["ima","spil","audio"].some(function(e){return t(this,o),e===(null==s?void 0:s.adapter)}.bind(this))){e.next=42;break}if(a!==v.Interstitial){e.next=37;break}return e.abrupt("return",this._startInterstitialAd(s));case 37:if(a!==v.Rewarded){e.next=41;break}return e.abrupt("return",this._startRewardedAd(s));case 41:throw new Error("Unsupported ad type");case 42:["opus"].some(function(e){return t(this,o),e===(null==s?void 0:s.adapter)}.bind(this))&&this._startOpusAd(s);case 44:case"end":return e.stop()}}),e,this)}))),function(e){return G.apply(this,arguments)})},{key:"_startOpusAd",value:(j=e(r.mark((function e(n){var i,a,s,o,d,u,c,l,h,p,f,m,v,g,A,b=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a="rewarded"===n.adTypeFound?"reward":n.adTypeFound,this._send_atom_event("opus-ad.start"),!this.requestRunning){e.next=8;break}return this._broadcast("AD_IS_ALREADY_RUNNING",{status:"warning"}),this._broadcast("AD_ERROR",{message:"Ad is already running",status:"error",reason:"request-running"}),this._send_atom_event("opus-ad.already-running"),e.abrupt("return");case 8:if(s=null===(i=window.gdlocus)||void 0===i?void 0:i.adBreak){e.next=13;break}return this._send_atom_event("opus-ad.not-initialized"),this._broadcast("AD_ERROR",{message:"Locus adBreak not found",status:"error",reason:"opus-not-found"}),e.abrupt("return");case 13:this._send_atom_event("opus-ad.ready"),o=void function(){return t(this,b),!0}.bind(this),this.requestRunning=!0,d=this.gameData,u=d.gameId,c=d.slug,l=d.title,h={assetId:u,slug:c,title:l,debug:o},p=function(e){t(this,b),this.opusEventReceived=!0,this._broadcast("CONTENT_PAUSE_REQUESTED",{message:"",status:"success"}),this._broadcast("IMPRESSION",{message:"",status:"success"})}.bind(this),f=function(e){t(this,b),this.opusEventReceived=!0,this._broadcast("CONTENT_RESUME_REQUESTED",{message:"",status:"success"})}.bind(this),m=function(){t(this,b),this.opusEventReceived=!0}.bind(this),v=function(){t(this,b),this.opusEventReceived=!0,this._broadcast("COMPLETE",{message:"",status:"success"}),this._broadcast("SDK_REWARDED_WATCH_COMPLETE",{message:"",status:"success"}),this._send_atom_event("sg.ad.rw.viewed")}.bind(this),g=function(e){t(this,b),this.opusEventReceived=!0,this.resetForNext();var n="".concat(a);this.adCounter[n]=this.adCounter[n]||0,this.adCounter[n]++,"viewed"===e.breakStatus?this._broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success"}):this._broadcast("AD_ERROR",{message:e.errorMessage,errorType:e.errorType,status:e.breakStatus,reason:"opus-error"})}.bind(this),console.log("opus-ad meta",h),A={type:a,meta:h,beforeAd:p,afterAd:f,adBreakDone:g},"reward"===a&&(A=gR(gR({},A),{},{adDismissed:m,adViewed:v})),this.opusEventReceived=!1,this._startTimeoutForOpus(),s&&s(A);case 30:case"end":return e.stop()}}),e,this)}))),function(e){return j.apply(this,arguments)})},{key:"preloadAd",value:(F=e(r.mark((function e(t){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t!==v.Interstitial){e.next=4;break}return e.abrupt("return","gdsdk://preloaded");case 4:if(t!==v.Rewarded){e.next=8;break}return e.abrupt("return","gdsdk://preloaded");case 8:throw new Error("Unsupported ad type");case 9:case"end":return e.stop()}}),e)}))),function(e){return F.apply(this,arguments)})},{key:"addAdComponents",value:function(){var e=this,n=function(){t(this,e),this.adsManager.resume()}.bind(this),r=function(){t(this,e),this.rewardGuarantied||(this._broadcast("SDK_REWARDED_WATCH_COMPLETE",{message:"",status:"success"}),this.rewardGuarantied=!1),this._broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success"}),this._hideSkipButton(),this.cancel()}.bind(this);try{this.adResume=new uS(this.adContainer,n),this.adResume.add(),this.rewardedLabel=new cS(this.adContainer,n),this.rewardedLabel.add(),this.skipAdButton=new lS(this.adContainer,n,r),this.skipAdButton.add(),this.audioAdLabel=new hS(window.document.body),this.audioAdLabel.add(),this.audioAdLabel.hide(),this.adCounterLabel=new pS(window.document.body),this.adCounterLabel.add(),this.adCounterLabel.hide(),this.adInfoLabel=new fS("Watching multiple ads now will reduce adbreaks later",window.document.body),this.adInfoLabel.add(),this.adInfoLabel.hide()}catch(e){console.log("error on adding adResume",e)}}},{key:"loadDisplayAd",value:(M=e(r.mark((function n(i){var a=this;return r.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",new Promise(function(){var n=e(r.mark((function e(n,s){var o,d,u,c,l,h,p,f,m,v=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:try{yo("display_test load",i),(d=i?i.containerId:null)||s("Container id is not specified"),u=document.getElementById(d),document.getElementById(d)||s("No container is found with this id - ".concat(d)),void 0===window.idhb.requestAds&&s("Prebid.js wrapper script hit an error or didn't exist!"),c=i.slotId?i.slotId:"gd__banner@".concat(d),document.getElementById(c)||(l="\n .gd__banner{\n z-index: ".concat(g.DisplayContainer.zIndex,";\n height: 100%;\n display: flex !important;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n }"),document.getElementById("gd__banner__style")||((h=document.createElement("style")).type="text/css",h.id="gd__banner__style",h.styleSheet?h.styleSheet.cssText=l:h.appendChild(document.createTextNode(l)),u.appendChild(h)),(p=document.createElement("div")).id=c,p.classList.add("gd__banner"),u.appendChild(p)),a.atom_display=null,null!==(o=a.atom_display)&&void 0!==o&&o.params&&window.idhb.setAdserverTargeting(null===(f=a.atom_display)||void 0===f?void 0:f.params),(m={})[c]={maxSize:[u.offsetWidth,u.offsetHeight]},yo("display_test slots",m),window.idhb.requestAds({slots:m,callback:function(e){t(this,v),yo("display_test callback",JSON.stringify(e,null,2))}.bind(this)}),n()}catch(e){console.log("display_test error",e),s(e.message||e)}case 1:case"end":return e.stop()}}),e,this)})));return function(e,t){return n.apply(this,arguments)}}()));case 1:case"end":return n.stop()}}),n)}))),function(e){return M.apply(this,arguments)})},{key:"_startInterstitialAd",value:(B=e(r.mark((function e(n){var i,a,s,o,d,u=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!this.requestRunning){e.next=4;break}return this._broadcast("AD_IS_ALREADY_RUNNING",{status:"warning"}),e.abrupt("return");case 4:if(!void function(){if(t(this,u),xo.fictionalIMAError)return this._broadcast("AD_ERROR",{message:"fictional IMA error",status:"error",skipForward:!0}),!0}.bind(this)){e.next=7;break}return e.abrupt("return");case 7:return this.requestRunning=!0,e.next=10,this._initDisplayContainerWithAutoPlay();case 10:return a=e.sent,e.next=13,this._loadInterstitialAd(gR(gR({},a),n));case 13:if(s=e.sent,o=s.success,s.args,o){e.next=18;break}return e.abrupt("return");case 18:null!==(i=this.adContext)&&void 0!==i&&i.muteRequested?this.adsManager.setVolume(0):(a.autoplayRequiresMute&&this.adsManager.setVolume(0),!0===(null===(d=this.gameData.advlm)||void 0===d?void 0:d.mode)&&this.adsManager.setVolume(1)),this.adsManager.init(this.options.width,this.options.height,google.ima.ViewMode.NORMAL),this.adsManager.start(),e.next=28;break;case 23:throw e.prev=23,e.t0=e.catch(0),yo("VAST_URL_2 error",e.t0),this._onError(e.t0),e.t0;case 28:case"end":return e.stop()}}),e,this,[[0,23]])}))),function(e){return B.apply(this,arguments)})},{key:"_startPromo",value:(L=e(r.mark((function e(t,n){var i,a,s,o,d;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!this.requestRunning){e.next=4;break}return this._broadcast("AD_IS_ALREADY_RUNNING",{status:"warning"}),e.abrupt("return");case 4:return this.requestRunning=!0,this.adSuccess=!1,e.next=8,this._initDisplayContainerWithAutoPlay();case 8:return a=e.sent,e.next=11,this._loadPromo(gR(gR({},a),t),n);case 11:if(s=e.sent,o=s.success,s.args,o){e.next=16;break}return e.abrupt("return");case 16:null!==(i=this.adContext)&&void 0!==i&&i.muteRequested?this.adsManager.setVolume(0):(a.autoplayRequiresMute&&this.adsManager.setVolume(0),!0===(null===(d=this.gameData.advlm)||void 0===d?void 0:d.mode)&&this.adsManager.setVolume(1)),this.adsManager.init(this.options.width,this.options.height,google.ima.ViewMode.NORMAL),this.adsManager.start(),this.msgrt.send("promo.adsense",{message:"".concat(t.position," success")}),e.next=27;break;case 22:throw e.prev=22,e.t0=e.catch(0),this.msgrt.send("promo.adsense.err",{message:"".concat(t.position," failure,").concat(e.t0.message?e.t0.message:e.t0,", [").concat(this.parentURL,"]")}),this._onError(e.t0),e.t0;case 27:case"end":return e.stop()}}),e,this,[[0,22]])}))),function(e,t){return L.apply(this,arguments)})},{key:"_loadPromo",value:(P=e(r.mark((function e(t,n){var i,a;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this._resetAdsLoader(),e.prev=1,i=this.nextAdPosition(n),a=this._create_promo_context(i),this._requestPromo(a,gR({adType:v.Interstitial},t)),e.next=7,this._waitOnAdLoad();case 7:return e.abrupt("return",e.sent);case 10:throw e.prev=10,e.t0=e.catch(1),new Error(e.t0);case 13:case"end":return e.stop()}}),e,this,[[1,10]])}))),function(e,t){return P.apply(this,arguments)})},{key:"_loadInterstitialAd",value:(O=e(r.mark((function e(t){var n;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._resetAdsLoader(),e.prev=1,e.t0=this.preloadedInterstitialAdVast,e.t0){e.next=7;break}return e.next=6,this._getAdVast(v.Interstitial,t);case 6:e.t0=e.sent;case 7:if(n=e.t0,delete this.preloadedInterstitialAdVast,n.url){e.next=12;break}throw new Error("NO_VAST_URL");case 12:return e.next=14,this._requestAd(n,gR({adType:v.Interstitial},t));case 14:return e.sent,e.next=17,this._waitOnAdLoad();case 17:return e.abrupt("return",e.sent);case 20:throw e.prev=20,e.t1=e.catch(1),console.log("VAST_URL error",e.t1),new Error(e.t1);case 24:case"end":return e.stop()}}),e,this,[[1,20]])}))),function(e){return O.apply(this,arguments)})},{key:"_waitOnAdLoad",value:function(){var e=this;return new Promise(function(n,r){var i=this;t(this,e);var a="videoad.preloadad";this.eventBus.unsubscribeScope(a);var s=function(e){var r=this;t(this,i),setTimeout(function(){t(this,r),this.eventBus.unsubscribeScope(a),n({success:!0,args:e})}.bind(this),1)}.bind(this),o=function(e){var r=this;t(this,i),setTimeout(function(){t(this,r),this.eventBus.unsubscribeScope(a),n({success:!1,args:e})}.bind(this),1)}.bind(this);this.eventBus.subscribe("AD_SDK_MANAGER_READY",s,a),this.eventBus.subscribe("AD_SDK_CANCELED",o,a),this.eventBus.subscribe("AD_ERROR",o,a)}.bind(this))}},{key:"_startRewardedAd",value:(D=e(r.mark((function e(n){var i,a,s,o,d,u=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!this.requestRunning){e.next=4;break}return this._broadcast("AD_IS_ALREADY_RUNNING",{status:"warning"}),e.abrupt("return");case 4:if(!void function(){if(t(this,u),xo.fictionalIMAError)return this._broadcast("AD_ERROR",{message:"fictional IMA error",status:"error",skipForward:!0}),!0}.bind(this)){e.next=7;break}return e.abrupt("return");case 7:return this.requestRunning=!0,e.next=10,this._initDisplayContainerWithAutoPlay();case 10:return a=e.sent,e.next=13,this._loadRewardedAd(gR(gR({},a),n));case 13:if(s=e.sent,o=s.success,s.args,o){e.next=18;break}return e.abrupt("return");case 18:null!==(i=this.adContext)&&void 0!==i&&i.muteRequested?this.adsManager.setVolume(0):(a.autoplayRequiresMute&&this.adsManager.setVolume(0),!0===(null===(d=this.gameData.advlm)||void 0===d?void 0:d.mode)&&this.adsManager.setVolume(1)),this.adsManager.init(this.options.width,this.options.height,google.ima.ViewMode.NORMAL),this.adsManager.start(),e.next=27;break;case 23:throw e.prev=23,e.t0=e.catch(0),this._onError(e.t0),e.t0;case 27:case"end":return e.stop()}}),e,this,[[0,23]])}))),function(e){return D.apply(this,arguments)})},{key:"_loadRewardedAd",value:(E=e(r.mark((function e(t){var n;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._resetAdsLoader(),e.prev=1,e.t0=this.preloadedRewardedAdVast,e.t0){e.next=7;break}return e.next=6,this._getAdVast(v.Rewarded,t);case 6:e.t0=e.sent;case 7:return n=e.t0,delete this.preloadedRewardedAdVast,e.next=11,this._requestAd(n,gR({adType:v.Rewarded},t));case 11:return e.sent,e.next=14,this._waitOnAdLoad();case 14:return e.abrupt("return",e.sent);case 17:throw e.prev=17,e.t1=e.catch(1),new Error(e.t1);case 20:case"end":return e.stop()}}),e,this,[[1,17]])}))),function(e){return E.apply(this,arguments)})},{key:"_preloadInterstitialAd",value:(x=e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,e.t0=this.preloadedInterstitialAdVast,e.t0){e.next=6;break}return e.next=5,this._getAdVast(v.Interstitial);case 5:e.t0=e.sent;case 6:return this.preloadedInterstitialAdVast=e.t0,e.abrupt("return",this.preloadedInterstitialAdVast.url);case 10:throw e.prev=10,e.t1=e.catch(0),new Error(e.t1);case 13:case"end":return e.stop()}}),e,this,[[0,10]])}))),function(){return x.apply(this,arguments)})},{key:"_preloadRewardedAd",value:(k=e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,e.t0=this.preloadedRewardedAdVast,e.t0){e.next=6;break}return e.next=5,this._getAdVast(v.Rewarded);case 5:e.t0=e.sent;case 6:return this.preloadedRewardedAdVast=e.t0,e.abrupt("return",this.preloadedRewardedAdVast.url);case 10:throw e.prev=10,e.t1=e.catch(0),new Error(e.t1);case 13:case"end":return e.stop()}}),e,this,[[0,10]])}))),function(){return k.apply(this,arguments)})},{key:"_onError",value:function(e){this.cancel(e),this._clearSafetyTimer("ERROR")}},{key:"_hide",value:function(e){this.video_ad_player&&(this.video_ad_player.src=""),this.activeAdContainer&&(this.activeAdContainer.style.visibility="hidden")}},{key:"_show",value:function(e){var n=this;if(this.activeAdContainer){this.isAudioAd||(this.activeAdContainer.style.visibility="visible");var r=null==e?void 0:e.mode;e.t4r=this.gameData.__t4r,e.t4rac=this.gameData.__t4rac;var i=this._adrequest_user_context.t4RResult?this._adrequest_user_context.t4RResult:this._isT4R(e);this._adrequest_user_context.t4RResult=i;var a=i.success,s=i.reason,o=this._getT4ROptions(e);if("loaded"===r){var d,u,c=(null===(d=this._adrequest_user_context)||void 0===d||null===(u=d.adTag)||void 0===u?void 0:u.bidder)||"adx";this._broadcast("AD_BIDDER",{bidder:c}),a||this._broadcast("AD_T4R_NONE",{reason:s}),this.activeAdContainer.style.opacity=a?.001:1,a&&null!=e&&e.contentType.startsWith("video/")&&(this.t4rButton=new mS(this.adContainer),this.t4rButton.add(),this._broadcast("AD_T4R_VIDEO")),a&&this.adsManager.setVolume(0),a&&this._broadcast("AD_T4R"),a&&setTimeout(function(){var e;t(this,n),this.activeAdContainer.style.opacity=1,this.adsManager.setVolume(null!==(e=this.adContext)&&void 0!==e&&e.muteRequested?0:1),this.t4rButton&&this.t4rButton.hide()}.bind(this),((null==o?void 0:o.min)||1234)+Math.random()*((null==o?void 0:o.max)||3210))}else if("click"===r||"first_quartile"===r){var l;if(a&&"click"===r){var h,p=null===(h=this._adrequest_user_context)||void 0===h?void 0:h.tnl_ad_pos;this.clickCount[p]++,this._broadcast("AD_T4R_CLICK")}a||"click"!==r||this._broadcast("AD_CLICK"),this.t4rButton&&this.t4rButton.hide(),this.activeAdContainer.style.opacity=1,this.adsManager.setVolume(null!==(l=this.adContext)&&void 0!==l&&l.muteRequested?0:1)}}}},{key:"_createPlayer",value:function(){var e=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=g.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,window.activeAdContainer=this.activeAdContainer,this.thirdPartyContainer?(this.adContainer.appendChild(i),this.thirdPartyContainer.appendChild(this.adContainer),this.activeAdContainer=this.thirdPartyContainer):(this.adContainer.appendChild(i),n.appendChild(this.adContainer)),this.addAdComponents(),this.activeAdContainer.style.visibility="hidden";var a=function(){t(this,e);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(e){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=e.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(){t(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(),s=i.getDate(),o=i.getMonth(),d=i.getFullYear(),u="AD_SDK_MANAGER_READY";this._broadcast(u,{name:u,message:"AD SDK is ready",status:"success",analytics:{category:u,action:this.parentDomain,label:"h".concat(a," d").concat(s," m").concat(o," y").concat(d)}}),this._adrequest_user_context=e.getUserRequestContext()}},{key:"_onAdEvent",value:function(e){var n,r,i,a,s=this,o=new Date,d=o.getHours(),u=o.getDate(),c=o.getMonth(),l=o.getFullYear(),h=A(google.ima.AdEvent.Type,e.type),p=!1,f=(null==e||null===(n=e.getAd())||void 0===n?void 0:n.getContentType())||"",m=!f.startsWith("image")&&!f.startsWith("text"),g=null==e||null===(r=e.ad)||void 0===r||null===(i=r.data)||void 0===i?void 0:i.title,b=null==e||null===(a=e.getAd())||void 0===a?void 0:a.data.skippable;this._sendIMAEventsToHB(e);var _=document.getElementById("game"),y="";switch(e.type){case google.ima.AdEvent.Type.AD_BREAK_READY:y="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:y="Fired when an ads list is loaded.";break;case google.ima.AdEvent.Type.ALL_ADS_COMPLETED:this.contentPaused&&(p=!0),this.isAudioAd&&(this.audioAdLabel.hide(),this.isAudioAd=!1),this.rewardGuarantied=!1,y="Fired when the ads manager is done playing all the ads.";break;case google.ima.AdEvent.Type.CLICK:y="Fired when the ad is clicked.";var w=e.getAd().getContentType();this._show({mode:"click",contentType:w}),uR();break;case google.ima.AdEvent.Type.COMPLETE:yo("gd-adflow ON COMPLETE!",e.getAd()),p=this._is_completed(e.getAd()),y="Fired when the ad completes playing.",this.adType_!==v.Rewarded||this.rewardGuarantied||(this._broadcast("SDK_REWARDED_WATCH_COMPLETE",{message:"",status:"success"}),this.rewardGuarantied=!0);break;case google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED:this.gameData.fllc.enabled&&(_.style.display="none"),this.contentPaused=!0,y="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:this.gameData.fllc.enabled&&(_.style.display="block"),y="Fired when content should be resumed. This usually happens when an ad finishes or collapses.",this.contentPaused?p=!0:(this.requestRunning=!1,this._broadcast("AD_ERROR",{message:"got resume without pause, possibly with VMAP",status:"error",skipForward:!0})),this._hideAddResume(),this._hideRewardedLabel(),this._hideSkipButton(),this.t4rButton&&this.t4rButton.hide(),this._clearTimeoutForSkipAddButton();break;case google.ima.AdEvent.Type.DURATION_CHANGE:y="Fired when the ad's duration changes.";break;case google.ima.AdEvent.Type.FIRST_QUARTILE:y="Fired when the ad playhead crosses first quartile.";var k=e.getAd().getContentType();this._show({mode:"first_quartile",contentType:k});break;case google.ima.AdEvent.Type.IMPRESSION:var x,E,D,S,R,T;if(y="Fired when the impression URL has been pinged.",e.getAd(),console.log("gdsdk: eventname IMPRESSION",this.isAudioAd),this._hideAdSpinner(),this.isAudioAd&&this.audioAdLabel.show(),"preroll"===this.adContext.adTypeFound)(null===(x=this.gameData)||void 0===x||null===(E=x.pAds)||void 0===E||null===(D=E.vmap)||void 0===D?void 0:D.enabled)&&(null===(S=this.gameData)||void 0===S||null===(R=S.pAds)||void 0===R||null===(T=R.vmap)||void 0===T?void 0:T.adtr)&&this.adInfoLabel.show();break;case google.ima.AdEvent.Type.INTERACTION:y="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:y="Fired when the displayed ad changes from linear to nonlinear, or vice versa.";break;case google.ima.AdEvent.Type.LOADED:var I=e.getAd().getContentType();y=I,this._show({mode:"loaded",contentType:I});break;case google.ima.AdEvent.Type.LOG:e.getAdData().adError&&(y=e.getAdData());break;case google.ima.AdEvent.Type.MIDPOINT:y="Fired when the ad playhead crosses midpoint.";break;case google.ima.AdEvent.Type.PAUSED:m&&"VPAID"!==g&&this.adResume.show(),y="Fired when the ad is paused.";break;case google.ima.AdEvent.Type.RESUMED:y="Fired when the ad is resumed.",m&&(this.adResume.hide(),this.rewardedLabel.hide());break;case google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED:y="Fired when the displayed ads skippable state is changed.";break;case google.ima.AdEvent.Type.SKIPPED:var C;p=!(null!==(C=this.adContext)&&void 0!==C&&C.isVMAP)&&this._is_completed(e.getAd()),this.adToaster.show("⚠️ Ad was skipped ⚠️","skip"),y="Fired when the ad is skipped by the user.",dR(),this.t4rButton&&this.t4rButton.hide();break;case google.ima.AdEvent.Type.STARTED:var O;if(this.skipAdButton&&this.skipAdButton.hide(),this.rewardGuarantied=!1,this.adType_===v.Rewarded)!b&&null!==(O=this.gameData.rwskp)&&void 0!==O&&O.enabled&&(this._skipAdButtonTimeout=setTimeout(function(){t(this,s),this.skipAdButton.show(),this._broadcast("SDK_REWARDED_WATCH_COMPLETE",{message:"",status:"success"}),this.rewardGuarantied=!0}.bind(this),3e4)),this.rewardedLabel.show();this._hideAddResume(),y="Fired when the ad starts playing.";break;case google.ima.AdEvent.Type.THIRD_QUARTILE:y="Fired when the ad playhead crosses third quartile.";break;case google.ima.AdEvent.Type.USER_CLOSE:p=this._is_completed(e.getAd()),y="Fired when the ad is closed by the user.";break;case google.ima.AdEvent.Type.VOLUME_CHANGED:y="Fired when the ad volume has changed.";break;case google.ima.AdEvent.Type.VOLUME_MUTED:y="Fired when the ad volume has been muted."}if(""!==h&&""!==y){var P=!this.contentPaused&&e.type===google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,L=!this.contentPaused&&e.type===google.ima.AdEvent.Type.ALL_ADS_COMPLETED,B=P||L;"VPAID"===g&&this.imaEventList.push(h),B||this.isAudioAd||this._broadcast(h,{name:h,message:y,status:"success",analytics:{category:h,action:this.parentDomain,label:"h".concat(d," d").concat(u," m").concat(c," y").concat(l)}})}if(p&&!this.adSuccess){this.adSuccess=!0;var U=e.getAd();"VPAID"===g&&this._setAtomEvent();var M="Rainbow"===(null==U?void 0:U.getAdSystem())&&(null==U?void 0:U.getWrapperAdIds().some(function(e){return t(this,s),"promo"===e}.bind(this)));yo("gd-adflow isPromoSuccess",M,null==U?void 0:U.getAdSystem(),null==U?void 0:U.getWrapperAdIds()),this._broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success",isPromoSuccess:M}),this.resetForNext(e)}}},{key:"_setAtomEvent",value:function(){this.dumper||(this.dumper=new mR({msgrt:this.msgrt,gameData:this.gameData,parentDomain:this.parentDomain,parentURL:this.parentURL,topDomain:this.parentURL}),this.dumper);var e={eventList:this.imaEventList};this.dumper.send_atom_event("vpaid",e),this.imaEventList=[]}},{key:"_clearTimeoutForSkipAddButton",value:function(){this._skipAdButtonTimeout&&(clearTimeout(this._skipAdButtonTimeout),this._skipAdButtonTimeout=null)}},{key:"_run_atom_tag_aws_test",value:function(e){var n=this;try{var r,i,a,s,o;if(!((null===(r=this.gameData)||void 0===r||null===(i=r.aws_tst)||void 0===i?void 0:i.enabled)&&(null===(a=this.gameData)||void 0===a||null===(s=a.aws_tst)||void 0===s||null===(o=s.ep)||void 0===o?void 0:o.atm)))return;var d=e.type,u=e.url;if("none"===d||!u)return;u=u.replace("tag.atom.gamedistribution.com","atom-tag-prod-aws.gamedistribution.com"),fetch(u).then(function(){t(this,n)}.bind(this))}catch(e){}}},{key:"_findAtomTagUrl",value:function(e,n){var r=this,i={type:"none"};try{var a=this.current_dp,s=a.id,o=a.error_url,d=a.impression_url,u=a.fallback_imp_url,c=a.promo_imp_green_url;if(!e&&!n)return i={type:"imp_err",url:o};var l=e.getWrapperAdIds().some(function(e){return t(this,r),e==="".concat(s)}.bind(this)),h=e.getWrapperAdIds().some(function(e){return t(this,r),"fallback"===e}.bind(this)),p=e.getWrapperAdIds().some(function(e){return t(this,r),"promo"===e}.bind(this));l&&n?i={type:"normal_imp",url:d}:l&&!n?i={type:"normal_err",url:o}:p&&n?i={type:"promo_imp",url:c}:h&&n&&(i={type:"fallbacj_imp",url:u})}catch(e){}return i}},{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);AR.emit("AD_ERROR",r),this._broadcast(t,{message:r,details:i,status:"warning",analytics:{category:t,action:i,label:r}}),this._hideAddResume(),this._clearTimeoutForSkipAddButton()}catch(e){}}},{key:"_hideAddResume",value:function(){try{this.adResume&&this.adResume.hide()}catch(e){console.log("Error on hide adResume",e)}}},{key:"_hideAdSpinner",value:function(){try{var e;null!==(e=this.gameData.adspn)&&void 0!==e&&e.enabled&&this.adFlowProcessSpinner&&this.adFlowProcessSpinner.hide()}catch(e){console.log("Error on hide adSpinner",e)}}},{key:"_hideRewardedLabel",value:function(){try{this.adType_===v.Rewarded&&this.rewardedLabel&&this.rewardedLabel.hide()}catch(e){console.log("Error on hide adResume",e)}}},{key:"_hideSkipButton",value:function(){try{this.adType_===v.Rewarded&&this.skipAdButton&&this.skipAdButton.hide()}catch(e){console.log("Error on hide adResume",e)}}},{key:"_sendIMAEventsToHB",value:function(e){if(window.idhb&&"function"==typeof window.idhb.onImaEvent)try{window.idhb.onImaEvent({event: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(e,n){var r=this;this.safetyTimer&&clearTimeout(this.safetyTimer),this.safetyTimer=window.setTimeout(function(){t(this,r),this.cancel(),this._clearSafetyTimer(n)}.bind(this),e)}},{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/headerlift.min.js","http://hb.improvedigital.com/pbw/headerlift.min.js"];return this.options.hb_script?[this.options.hb_script].concat(e):e}},{key:"_getInnerErrorCode",value:function(e){if(WS(e.getInnerError)){var t=e.getInnerError();if(t)return WS(t.getErrorCode)&&WS(t.getVastErrorCode)?t.getErrorCode().toString()||t.getVastErrorCode().toString():t.message}}},{key:"resetForNext",value:function(){this.requestRunning=!1,this._hide("resetForNext")}},{key:"_createCustomAdVastUrl",value:function(e,n){var r=this;if(e){var i=this.macros.transform(e,{get:function(e){if(t(this,r),n&&n.tnl_keys)return n.tnl_keys[e.toLowerCase()]}.bind(this)});for(var a in i.query||{}){var s=i.query[a];q(s)&&(i.query[a]=H.stringify(s))}var o=new I(i.url,!0);return V(o.query,i.query||{}),gR({url:o.toString()},n)}}},{key:"_transformVast",value:function(e,t){var n={url:e.url};try{var r=new I(e.url,!0),i=this._transformQuery(e,t,r);i&&(n.url=r.toString());var a=i?r:new I(e.url,!0);if(a.query.cust_params){var s=H.parse(a.query.cust_params);n.bidder=s.hb_bidder,n.cust_params=s}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(e,n,r){var i=this;if(e&&n&&e.tnl_keys){var a=this.options.vast_query;if(n.retry_on_success&&this.options.retry_on_success&&q(this.options.retry_on_success.vast_query)?a=this.options.retry_on_success.vast_query:n.retry_on_failure&&this.options.retry_on_failure&&q(this.options.retry_on_failure.vast_query)&&(a=this.options.retry_on_failure.vast_query),a=U(a),q(a)){var s=r.query;if(a.$$remove){for(var o in s){new RegExp(a.$$remove,"i").test(o)&&delete s[o]}delete a.$$remove}var d=H.parse(s.cust_params);if(a.cust_params&&a.cust_params.$$remove){for(var u in d){new RegExp(a.cust_params.$$remove,"i").test(u)&&delete d[u]}delete a.cust_params.$$remove}var c=this.macros.transform(a,{get:function(n){return t(this,i),e.tnl_keys[n.toLowerCase()]}.bind(this)});return s.cust_params=d,V(s,c),s.cust_params=H.stringify(s.cust_params),!0}}}},{key:"_isExcludedBidderForT4R",value:function(){var e=this;try{var n,r,i,a,s=(null===(n=this._adrequest_user_context)||void 0===n||null===(r=n.adTag)||void 0===r?void 0:r.bidder)||"adx";this.msgrt.send("bidder",{message:s}),yo("ex_bidder ad request context",this._adrequest_user_context,'bidder:"'.concat(s,'"'));var o=(null===(i=this.gameData.t4rc)||void 0===i?void 0:i.bidder_exc)||[],d=(null===(a=this.gameData.t4rc)||void 0===a?void 0:a.bidder_inc)||[],u=!1;return d.length>0?u=!d.some(function(n){return t(this,e),n===s}.bind(this)):o.length>0&&(u=o.some(function(n){return t(this,e),n===s}.bind(this))),yo("ex_bidder_result",s,u),u}catch(e){console.log("ex_bidder ERR",e)}}},{key:"_isExcludedBidderForT4RWithBidderExcRate",value:function(){var e,t,n=this._isExcludedBidderForT4R(),r=null===(e=this.gameData)||void 0===e||null===(t=e.t4rc)||void 0===t?void 0:t.bidder_exc_rate,i=null!=r&&r.enabled?(null==r?void 0:r.rate)||.8:0,a=Math.random();return n||a<i}},{key:"_isT4R",value:function(e){var t=null==e?void 0:e.contentType,n={isImage:null==t?void 0:t.startsWith("image/"),isText:"text"===t,isVideo:null==t?void 0:t.startsWith("video/")},r=Object.values(this._getT4RValidators(e)||{}),i={success:!0};try{for(var a=0,s=r;a<s.length;a++){var o=(0,s[a])(n);if(!o.success){i=o;break}}}catch(e){i={success:!1,reason:"internal-error"}}return i}},{key:"_getT4RValidators",value:function(e){var n=this,r=function(r){return t(this,n),e.t4rac.enabled?{success:!0,name:"ddate"}:{success:!1,reason:"ddate",name:"ddate"}}.bind(this),i=function(e){if(t(this,n),this.gameData.publishedAt){var r=new Date(this.gameData.publishedAt);return((new Date).getTime()-r.getTime())/864e5<=10?{success:!1,reason:"pdate-1",name:"pdate"}:{success:!0,name:"pdate"}}return{success:!1,reason:"pdate-2",name:"pdate"}}.bind(this),a=function(r){var i,a,s,o;t(this,n);var d=this.gameData.meta,u=e.t4r.meta;return(null==d||null===(i=d.ast)||void 0===i?void 0:i.c)>=(null==u||null===(a=u.ast)||void 0===a?void 0:a.c)&&(null==d||null===(s=d.sit)||void 0===s?void 0:s.c)>=(null==u||null===(o=u.sit)||void 0===o?void 0:o.c)?{success:!1,reason:"meta",name:"meta"}:{success:!0,name:"meta"}}.bind(this),s=function(e){t(this,n);var r=this._isExcludedBidderForT4RWithBidderExcRate();return this.msgrt.send("bidder.ex",{message:r?"true":"false"}),{success:!r,reason:r?"bidder":null,name:"bidder"}}.bind(this),o=function(r){var i,a;t(this,n);var s=null===(i=this._adrequest_user_context)||void 0===i?void 0:i.tnl_ad_pos,o=s&&this.clickCount[s]>=(null===(a=e.t4r[s])||void 0===a?void 0:a.count);return{success:!o,reason:o?"click-count":null,name:"click-count"}}.bind(this),d=function(r){var i,a;t(this,n);var s=null===(i=this._adrequest_user_context)||void 0===i?void 0:i.tnl_ad_pos,o=s&&(null===(a=e.t4r[s])||void 0===a?void 0:a.enabled);return{success:o,reason:o?null:"rule-check",name:"rule-check"}}.bind(this),u=function(r){var i,a;if(t(this,n),!r.isVideo)return{success:!0,name:"viper-check"};var s=null===(i=this._adrequest_user_context)||void 0===i?void 0:i.tnl_ad_pos,o=(null===(a=e.t4r[s])||void 0===a?void 0:a.viper)||0;if(o>0){var d,u=Math.random()<o,c=s&&u&&(null===(d=e.t4r[s])||void 0===d?void 0:d.enabled);return{success:c,reason:c?null:"viper-check",name:"viper-check"}}return{success:!1,reason:"rule-check-viper",name:"viper-check"}}.bind(this),c=function(e){t(this,n);var r=e.isImage,i=e.isText,a=e.isVideo,s=r||i||a;return{success:s,reason:s?null:"media-format",name:"media-format"}}.bind(this);return{checkRule:d,checkMediaFormat:c,checkPublishDate:i,checkMeta:a,checkClickCount:o,checkViper:u,checkExcludedBidder:s,checkT4rActivation:r}}},{key:"_isVMAP",value:function(e){var t,n,r,i,a,s,o,d,u,c,l,h,p,f,m;if(!e)return!1;var v="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===(s=this.gameData)||void 0===s||null===(o=s.mAds)||void 0===o?void 0:o.vmap)||!0===(null===(d=this.gameData)||void 0===d||null===(u=d.mAds)||void 0===u||null===(c=u.vmap)||void 0===c?void 0:c.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(!v)return!1;var g=this._get_vmap_config(e),A=this.adCounter[e];return void 0!==(null==g?void 0:g.start)?A>=(null==g?void 0:g.start):v}},{key:"_getT4ROptions",value:function(e){var t,n=null===(t=this._adrequest_user_context)||void 0===t?void 0:t.tnl_ad_pos;switch(n){case"preroll":case"midroll":case"rewarded":return e.t4r[n]}}},{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){for(var t=e.adtag,n=e.position,r=e.config,i=e.dp,a=r.count||2,s=[],o=1;o<=a;o++){var d={};d.adtag=this._createCustomAdVastUrl(r["vast_"+o])||t,d.position=n,d.dp=r["vast_"+o]?void 0:i,s.push(d)}return s}},{key:"_get_vmap_config",value:function(e){var t,n,r,i,a,s,o,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===(s=a.rAds)||void 0===s?void 0:s.vmap;default:return null===(o=this.gameData)||void 0===o||null===(d=o.pAds)||void 0===d?void 0:d.vmap}}},{key:"_isDP",value:function(e){var t,n,r;return!!e&&!0===(null===(t=this.gameData)||void 0===t||null===(n=t.dp)||void 0===n||null===(r=n[e])||void 0===r?void 0:r.enabled)}},{key:"_create_dp_display_context",value:function(){var e=this;return new Promise(function(n){var r=this;t(this,e);try{var i={id:this.topDomain||this.parentDomain,au:"display",ty:"display",aid:this.gameData.gameId,pgu:this.parentURL},a=new dS(this.gameData).checkCustomParams();a&&(i.cp=a);var s=encodeURIComponent(C.encode(JSON.stringify(i)));fetch("https://tag.atom.gamedistribution.com/v1/atm?ar=".concat(s)).then(function(e){return t(this,r),e.json()}.bind(this)).then(function(e){if(t(this,r),!e||!e.p)return this.msgrt.send("dp.na",{message:"atom"}),n();var i=e.p/100;this.msgrt.send("dp.fp",{message:i}),n({params:{fp:i},error_url:"https://tag.atom.gamedistribution.com/v1/err?ar=".concat(s),impression_url:"https://tag.atom.gamedistribution.com/v1/imp?ar=".concat(s)})}.bind(this)).catch(function(e){t(this,r),this.msgrt.send("dp.err",{message:(null==e?void 0:e.message)||e}),n()}.bind(this))}catch(e){this.msgrt.send("dp.err",{message:(null==e?void 0:e.message)||e}),n()}}.bind(this))}},{key:"_create_promo_context",value:function(e){var n,r=this,i={id:this.topDomain||this.parentDomain,au:e||"unknown",ty:"video",aid:this.gameData.gameId,pgu:this.parentURL},a=Object.keys(i).map(function(e){return t(this,r),"".concat(e,"=").concat(encodeURIComponent(i[e]))}.bind(this)).join("&");encodeURIComponent(C.encode(JSON.stringify(i)));var s=null===(n=this.gameData.promo)||void 0===n?void 0:n.rainbow,o=null==s?void 0:s.enabled,d="https://tag.atom.gamedistribution.com/v1/rainbow/?".concat(a),u=o?d:void 0;return function(){t(this,r),xo.promoError&&(console.log("promo-test fictional promo error"),u=void 0)}.bind(this),{promo_url:u,promo_imp_blue_url:o?"https://tag.atom.gamedistribution.com/v1/rainbow/blue":void 0,promo_imp_green_url:o?"https://tag.atom.gamedistribution.com/v1/rainbow/green":void 0}}},{key:"_create_dp_context",value:function(n,i){var a=this;return new Promise(function(){var s=e(r.mark((function e(s){var o,d,u,c,l,h=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,a._isDP(n)){e.next=5;break}return a.msgrt.send("dp.na",{message:"rule"}),e.abrupt("return",s());case 5:d={id:a.topDomain||a.parentDomain,au:n||"unknown",ty:"video",aid:a.gameData.gameId,pgu:a.parentURL},(u=new dS(a.gameData).checkCustomParams())&&(d.cp=u),c=encodeURIComponent(C.encode(JSON.stringify(d))),yo("gd-adflow isLastAdapter",null==i?void 0:i.adapterIndex,null==i?void 0:i.isLastAdapter),l=null===(o=a.gameData.promo)||void 0===o?void 0:o.rainbow,yo("gd-adflow promo_enabled",!1,null==l?void 0:l.enabled,null==i?void 0:i.isLastAdapter),fetch("https://tag.atom.gamedistribution.com/v1/atm?ar=".concat(c)).then(function(e){return t(this,h),e.json()}.bind(this)).then(function(e){if(t(this,h),!e||!e.p)return a.msgrt.send("dp.na",{message:"atom"}),s();var n=e.p/100;a.msgrt.send("dp.fp",{message:n}),s({id:Date.now(),floor_price:n,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:void 0,promo_imp_blue_url:void 0,promo_imp_green_url:void 0})}.bind(this)).catch(function(e){t(this,h),a.msgrt.send("dp.err",{message:(null==e?void 0:e.message)||e}),s()}.bind(this)),e.next=20;break;case 16:e.prev=16,e.t0=e.catch(0),a.msgrt.send("dp.err",{message:(null===e.t0||void 0===e.t0?void 0:e.t0.message)||e.t0}),s();case 20:case"end":return e.stop()}}),e,this,[[0,16]])})));return function(e){return s.apply(this,arguments)}}())}},{key:"_extend_dp_with_adsense",value:function(e,t){if(e&&t)try{var n,r=new I(t.vastUrl,!0);if(null===(n=r.query)||void 0===n||!n.cust_params)return;var i=H.parse(r.query.cust_params);if(!i.tnl_asset_id)return;i.adsense=1,r.query.cust_params=H.stringify(i,!1),e.fallback_url=r.toString(),e.fallback_imp_url="https://tag.atom.gamedistribution.com/v1/rainbow/green"}catch(e){}}},{key:"_extend_hl_url",value:function(e){e.dp;var t=e.hl;e.src;var n=e.tnl_keys,r=!0!==(null==t?void 0:t.bidFloorApplied)?0:1;0===r&&null!=n&&n.hasOwnProperty("fp")?r=2:1!==r||null!=n&&n.hasOwnProperty("fp")||(r=3),n.bfa=r;try{var i,a=new I(e.url,!0);if(null===(i=a.query)||void 0===i||!i.cust_params)return;var s=H.parse(a.query.cust_params);s.bfa=r,s.adsense=0,a.query.cust_params=H.stringify(s,!1),e.url=a.toString(),t.vastUrl=e.url}catch(e){}finally{this.msgrt.send("bfa",{message:r})}}},{key:"_init_hl_script",value:(w=e(r.mark((function e(n){var i,a,s,o,d,u,c,l,h,p,f,v,g=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=this._getPrebidScripts(),d=o[0],u=function(){return t(this,g),!1}.bind(this),window.idhb=window.idhb||{iabCmpExists:u},window.idhb.options=window.idhb.options||{},Object.assign(window.idhb.options,{assetId:this.gameData.gameId,configUrl:this.topDomain||this.parentDomain,parentUrl:this.parentURL,pageType:"gd"}),"undefined"===window.idhb.options.configUrl&&(window.idhb.options.configUrl=null),window.idhb.que=window.idhb.que||[],(c=new URL(d)).searchParams.append("referer",window.idhb.options.configUrl),d=c.href,e.next=13,m(d,"gdsdk_prebid",{alternates:o,error_prefix:"Blocked:",exists:function(){return t(this,g),window.idhb.requestAds}.bind(this)});case 13:return e.next=15,this.checkOpphbPath();case 15:l=b("ch",window.location.href),h=b("ch_date",window.location.href),p={tnl_content_category:this.category.toLowerCase()},l&&(p.channel=l),h&&(p.ch_date=h),(f=b("hl_label",this.parentURL)||b("hl_label",window.location.href))&&(p.label=f),window.idhb.setAdserverTargeting(p),window.idhb.allowPersonalizedAds(!!parseInt(this.userAllowedPersonalizedAds)),null!=(v=window.idhb.getConfig())&&null!==(i=v.hbw)&&void 0!==i&&null!==(a=i.slots)&&void 0!==a&&null!==(s=a.gd__banner)&&void 0!==s&&s.sizes&&(v.hbw.slots.gd__banner.sizes=[[120,600],[160,600],[250,250],[300,50],[300,100],[300,250],[300,600],[320,50],[320,480],[336,280],[728,90]],window.idhb.setConfig(v)),window.idhb.addEventListener("slotRenderEnded",function(e){var n=this;t(this,g);try{var r,i,a=e.slotId.split("@");a=1===a.length?a[0]:a[1],e.isEmpty?(null!==(r=this.atom_display)&&void 0!==r&&r.error_url&&(fetch(this.atom_display.error_url).catch(function(e){t(this,n)}.bind(this)),delete this.atom_display),yo("display_test DISPLAYAD_ERR",e),this._broadcast("DISPLAYAD_ERROR",{message:a,status:"warning"})):(null!==(i=this.atom_display)&&void 0!==i&&i.impression_url&&(fetch(this.atom_display.impression_url).catch(function(e){t(this,n)}.bind(this)),delete this.atom_display),yo("display_test DISPLAYAD_IMPRESSION"),this._broadcast("DISPLAYAD_IMPRESSION",{message:a,status:"success"}))}catch(e){}}.bind(this));case 27:case"end":return e.stop()}}),e,this)}))),function(e){return w.apply(this,arguments)})},{key:"checkOpphbPath",value:(f=e(r.mark((function e(){var t,n,i,a,s,o;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,i=this.topDomain||this.parentDomain||"",a=(null===(t=this.gameData)||void 0===t?void 0:t.gameId)||"",s=(null===(n=this.options)||void 0===n?void 0:n.width)||640,e.next=6,fetch("https://pub.headerlift.com/opphb?page_url=".concat(i,"&page_type=gd&page_width=").concat(s,"&aid=").concat(a));case 6:o=e.sent,wo("opphb load success",o),e.next=13;break;case 10:throw e.prev=10,e.t0=e.catch(0),new Error("Blocked: https://pub.headerlift.com/opphb");case 13:case"end":return e.stop()}}),e,this,[[0,10]])}))),function(){return f.apply(this,arguments)})},{key:"_init_ima_script",value:(l=e(r.mark((function e(n){var i,a,s=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return 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],e.next=4,m(a,"gdsdk_ima",{alternates:i,error_prefix:"Blocked:",exists:function(){return t(this,s),window.google&&window.google.ima}.bind(this)});case 4:case"end":return e.stop()}}),e,this)}))),function(e){return l.apply(this,arguments)})},{key:"_init_afg_script",value:(c=e(r.mark((function e(n){var i,a,s,o,d,u,c=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.gameData.afg_disabled){e.next=3;break}return e.abrupt("return");case 3:return(u={}).crossorigin="anonymous",u["data-ad-client"]=(null==n||null===(i=n.adsense_client)||void 0===i?void 0:i.length)>0?n.adsense_client:"ca-pub-2316275586951220",u["data-ad-frequency-hint"]="30s",u.allow="autoplay",(null==n||null===(a=n.adsense_channel)||void 0===a?void 0:a.length)>0&&(u["data-ad-channel"]=n.adsense_channel),(null==n||null===(s=n.adsense_host)||void 0===s?void 0:s.length)>0&&(u["data-ad-host"]=n.adsense_host),!0===(null==n?void 0:n.adsense_adbreak_test)&&(u["data-adbreak-test"]="on"),null!==(o=this.gameData.sdk.afg)&&void 0!==o&&o.enabled&&null!==(d=this.gameData.sdk.afg)&&void 0!==d&&d.use_own&&(u["data-ad-client"]=this.gameData.sdk.afg.adsense_client,u["data-ad-slot"]=this.gameData.sdk.afg.adsense_ad_slot,u["data-ad-format"]="auto"),e.next=16,m("https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js","afg",{error_prefix:"Blocked:",exists:function(){return t(this,c),!!window.adsbygoogle}.bind(this),attrs:u});case 16:window.adsbygoogle=window.adsbygoogle||[],window.adsbygoogle.push({sound:"on",preloadAdBreaks:"on"});case 18:case"end":return e.stop()}}),e,this)}))),function(e){return c.apply(this,arguments)})},{key:"fixOutOfBounds",value:function(){try{if(!(this.gameData.afgszf&&this.gameData.afgszf.enabled))return;for(var e=this.gameData.afgszf,t=e.height,n=e.scrolls,r=t||"120vh",i=n||!0,a=document.getElementsByClassName("adsbygoogle"),s=0;s<a.length;s++){var o,d=a[s],u=d&&(null===(o=d.children[0])||void 0===o?void 0:o.children[0]);u&&"IFRAME"===u.tagName&&u.style.height!==r&&(yo("out-of-bounds fix apply"),u.style.height=r,i&&(u.parentElement.style.overflow="auto"))}}catch(e){yo("out-of-bounds error: ".concat(e.message))}}},{key:"clearSession",value:function(){this.requestRunning=!1}},{key:"_startAdsensePlacementRewardedAd",value:(u=e(r.mark((function e(n){var i,a,s,o,d,u,c,l,h=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.params,e.prev=1,!this.requestRunning){e.next=5;break}return this._broadcast("AD_IS_ALREADY_RUNNING",{status:"warning"}),e.abrupt("return");case 5:if(!void function(){if(t(this,h),xo.fictionalAdSenseError||n.params.shouldFail)return this._broadcast("AD_ERROR",{message:"fictional adsense rewarded error",status:"error",skipForward:!0}),!0}.bind(this)){e.next=8;break}return e.abrupt("return");case 8:this.requestRunning=!0,this._send_atom_event("sg.ad.rw.requested"),i=!1,a=function(){t(this,h),i=!0,this.fixOutOfBounds(),this._broadcast("CONTENT_PAUSE_REQUESTED",{message:"",status:"success"}),this._broadcast("IMPRESSION",{message:"",status:"success"})}.bind(this),s=function(){t(this,h),i=!0,this._broadcast("CONTENT_RESUME_REQUESTED",{message:"",status:"success"})}.bind(this),o=function(){t(this,h),i=!0,this._send_atom_event("sg.ad.rw.dismissed")}.bind(this),d=function(){t(this,h),i=!0,this._broadcast("COMPLETE",{message:"",status:"success"}),this._broadcast("SDK_REWARDED_WATCH_COMPLETE",{message:"",status:"success"}),this._send_atom_event("sg.ad.rw.viewed")}.bind(this),u=function(e){t(this,h),i=!0,e()}.bind(this),c=function(e){t(this,h),i=!0,this.resetForNext();var n="rewarded";this.adCounter[n]=this.adCounter[n]||0,this.adCounter[n]++,"viewed"===e.breakStatus?this._broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success"}):(this._broadcast("AD_ERROR",{message:e.breakStatus,status:"error",skipForward:!0}),"dismissed"!==e.breakStatus&&this._send_atom_event("sg.dbg.rw",e))}.bind(this),l=function(e){window.adsbygoogle.push(e)},setTimeout(function(){t(this,h),i||(wo("gd-adflow adsense.reward timeout happened!"),this.requestRunning=!1,this._broadcast("AD_ERROR",{message:"timeout",status:"error",skipForward:!0}),this._send_atom_event("sg.dbg.rw",{breakStatus:"timeout"}))}.bind(this),1e3),l({type:"reward",name:"reward-in-game",beforeAd:a,afterAd:s,adDismissed:o,adViewed:d,beforeReward:u,adBreakDone:c}),e.next=26;break;case 22:throw e.prev=22,e.t0=e.catch(1),this._onError(e.t0),e.t0;case 26:case"end":return e.stop()}}),e,this,[[1,22]])}))),function(e){return u.apply(this,arguments)})},{key:"_startAdsensePlacementPreroll",value:(d=e(r.mark((function e(n){var i,a,s=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.params,e.prev=1,!this.requestRunning){e.next=5;break}return this._broadcast("AD_IS_ALREADY_RUNNING",{status:"warning"}),e.abrupt("return");case 5:if(!void function(){if(t(this,s),xo.fictionalAdSenseError||n.params.shouldFail)return this._broadcast("AD_ERROR",{message:"fictional adsense preroll error",status:"error"}),!0}.bind(this)){e.next=8;break}return e.abrupt("return");case 8:this.requestRunning=!0,this._send_atom_event("sg.ad.pr.requested"),this.adPlacementEventReceived=!1,i=function(){t(this,s),this.adPlacementEventReceived=!0}.bind(this),a=function(e){t(this,s),this.adPlacementEventReceived=!0,this.resetForNext();var n="preroll";this.adCounter[n]=this.adCounter[n]||0,this.adCounter[n]++,"viewed"===e.breakStatus?(this._send_atom_event("sg.ad.pr.viewed"),this._broadcast("CONTENT_PAUSE_REQUESTED",{message:"",status:"success"}),this._broadcast("IMPRESSION",{message:"",status:"success"}),this._broadcast("COMPLETE",{message:"",status:"success"}),this._broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success"}),this._broadcast("CONTENT_RESUME_REQUESTED",{message:"",status:"success"})):(this._broadcast("AD_ERROR",{message:e.breakStatus,status:"error"}),this._send_atom_event("sg.dbg.pr",e))}.bind(this),this._startTimeoutForAdBreak({adType:"preroll"}),r={type:"preroll",beforeAd:i,adBreakDone:a},window.adsbygoogle.push(r),e.next=22;break;case 18:throw e.prev=18,e.t0=e.catch(1),this._onError(e.t0),e.t0;case 22:case"end":return e.stop()}var r}),e,this,[[1,18]])}))),function(e){return d.apply(this,arguments)})},{key:"_startAdsensePlacementStart",value:(o=e(r.mark((function e(n){var i,a,s,o=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.params,e.prev=1,!this.requestRunning){e.next=5;break}return this._broadcast("AD_IS_ALREADY_RUNNING",{status:"warning"}),e.abrupt("return");case 5:if(!void function(){if(t(this,o),xo.fictionalAdSenseError||n.params.shouldFail)return this._broadcast("AD_ERROR",{message:"fictional adsense preroll error 2",status:"error"}),!0}.bind(this)){e.next=8;break}return e.abrupt("return");case 8:this.requestRunning=!0,this._send_atom_event("sg.ad.pr.requested"),i=function(){t(this,o),this.adPlacementEventReceived=!0,this.fixOutOfBounds(),this._broadcast("CONTENT_PAUSE_REQUESTED",{message:"",status:"success"}),this._broadcast("IMPRESSION",{message:"",status:"success"})}.bind(this),a=function(){t(this,o),this.adPlacementEventReceived=!0,this._broadcast("CONTENT_RESUME_REQUESTED",{message:"",status:"success"})}.bind(this),this.adPlacementEventReceived=!1,s=function(e){t(this,o),this.adPlacementEventReceived=!0,this.resetForNext();var n="preroll";this.adCounter[n]=this.adCounter[n]||0,this.adCounter[n]++,"viewed"===e.breakStatus?(this._send_atom_event("sg.ad.pr.viewed"),this._broadcast("COMPLETE",{message:"",status:"success"}),this._broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success"})):(this._broadcast("AD_ERROR",{message:e.breakStatus,status:"error"}),this._send_atom_event("sg.dbg.pr",e))}.bind(this),this._startTimeoutForAdBreak({adType:"preroll"}),r={type:"start",name:"start-in-game",beforeAd:i,afterAd:a,adBreakDone:s},window.adsbygoogle.push(r),e.next=23;break;case 19:throw e.prev=19,e.t0=e.catch(1),this._onError(e.t0),e.t0;case 23:case"end":return e.stop()}var r}),e,this,[[1,19]])}))),function(e){return o.apply(this,arguments)})},{key:"_startTimeoutForAdBreak",value:function(e){var n,r,i,a,s,o,d=this;if(null===(n=this.gameData)||void 0===n||null===(r=n.ad_blcks)||void 0===r||null===(i=r.adsenseTimeout)||void 0===i?void 0:i.enabled){null==e||e.adType,null===(a=this.gameData)||void 0===a||null===(s=a.ad_blcks)||void 0===s||null===(o=s.adsenseTimeout)||void 0===o||o.timeout;var u=setTimeout(function(){t(this,d),this.adPlacementEventReceived||(this._broadcast("AD_ERROR",{message:"timeout-_startTimeoutForAdBreak",status:"error"}),this.adPlacementEventReceived=!1,this.requestRunning=!1),clearTimeout(u)}.bind(this),5e3)}}},{key:"_startTimeoutForOpus",value:function(){var e=this,n=setTimeout(function(){t(this,e),this.opusEventReceived||(this._broadcast("AD_ERROR",{message:"opus-sdk-timeout",status:"error",reason:"forced-sdk-timeout"}),this.opusEventReceived=!1,this.requestRunning=!1),clearTimeout(n)}.bind(this),8e3)}},{key:"_startAdsensePlacementNext",value:(s=e(r.mark((function e(n){var i,a,s,o=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.params,e.prev=1,!this.requestRunning){e.next=5;break}return this._broadcast("AD_IS_ALREADY_RUNNING",{status:"warning"}),e.abrupt("return");case 5:if(!void function(){if(t(this,o),xo.fictionalAdSenseError||n.params.shouldFail)return this._broadcast("AD_ERROR",{message:"fictional adsense midroll error",status:"error"}),!0}.bind(this)){e.next=8;break}return e.abrupt("return");case 8:this.requestRunning=!0,this._send_atom_event("sg.ad.mr.requested"),i=function(){t(this,o),this.adPlacementEventReceived=!0,this.fixOutOfBounds(),this._broadcast("CONTENT_PAUSE_REQUESTED",{message:"",status:"success"}),this._broadcast("IMPRESSION",{message:"",status:"success"})}.bind(this),a=function(){t(this,o),this.adPlacementEventReceived=!0,this._broadcast("CONTENT_RESUME_REQUESTED",{message:"",status:"success"})}.bind(this),this.adPlacementEventReceived=!1,s=function(e){t(this,o),this.adPlacementEventReceived=!0,this.resetForNext();var n="midroll";this.adCounter[n]=this.adCounter[n]||0,this.adCounter[n]++,"viewed"===e.breakStatus?(this._send_atom_event("sg.ad.mr.viewed"),this._broadcast("COMPLETE",{message:"",status:"success"}),this._broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success"})):(this._broadcast("AD_ERROR",{message:e.breakStatus,status:"error"}),this._send_atom_event("sg.dbg.mr",e))}.bind(this),this._startTimeoutForAdBreak({adType:"midroll"}),r={type:"next",name:"next-in-game",beforeAd:i,afterAd:a,adBreakDone:s},window.adsbygoogle.push(r),e.next=23;break;case 19:throw e.prev=19,e.t0=e.catch(1),this._onError(e.t0),e.t0;case 23:case"end":return e.stop()}var r}),e,this,[[1,19]])}))),function(e){return s.apply(this,arguments)})},{key:"_send",value:function(e,t){try{var n=this.msgrt,r=n._layout,i=n._ua,a={tp:e,ct:0,vrs:this.PackageJSON.version,url:this.parentURL,rfr:document.referrer,tdmn:this.topDomain||this.parentDomain,dpth:0,args:t,ua:{brnm:i.browser.name,brvs:i.browser.version,osnm:i.os.name,osvs:i.os.version,dvmd:i.device.model,w:r.w,h:r.h}};return fetch("https://tag.atom.gamedistribution.com/v1/dmp?ar=".concat(encodeURIComponent(C.encode(JSON.stringify(a)))))}catch(e){}}},{key:"_send_atom_event",value:function(e,t){var n={gid:this.gameData.slug,md5:this.gameData.gameId,pid:0,pnm:this.gameData.pname,ctry:this.gameData.ctry,lcl:"en",hle:1,ads:1,args:t,href:window.location.href},r=(new Cy).get();return n=gR(gR({},n),r),n=t?gR(gR({},n),t):n,this._send(e,n)}},{key:"_isAfgPositionNext",value:function(e){return void 0!==e.adTimestamp}},{key:"_isAfgPositionStart",value:function(e){if(void 0!==e.adTimestamp)return!1;var t="preroll";return this.adCounter[t]=this.adCounter[t]||0,0===this.adCounter[t]}},{key:"attachAfgPosition",value:function(e){var t=e.params.position;switch(t){case"preroll":case"start":case"pause":case"next":case"browse":case"reward":return}var n=e.adType;if(n===v.Rewarded)t="reward";else if(n===v.Interstitial){var r,i;if(this._isAfgPositionStart(e))t=null===(r=this.gameData.pAds)||void 0===r||!r.enabled||null!==(i=this.gameData.loader)&&void 0!==i&&i.enabled?"start":"next";else this._isAfgPositionNext(e)&&(t="next")}t||(t="preroll"),e.params.position=t}},{key:"_broadcast",value:function(e,n){var r=this,i=!1;["AD_ERROR"].some(function(n){return t(this,r),n===e}.bind(this))&&(i=!this.adContext.isLastAdapter||this.adContext.extraPromoRunOnFail);var a=this.getCurrentAdPosition(this.adContext.adType);this.eventBus.broadcast(e,gR(gR({},n),{},{skipForward:i,adPosition:a}))}},{key:"_findAdPosition",value:function(){var e;return this.getCurrentAdPosition(null===(e=this.adContext)||void 0===e?void 0:e.adType)}},{key:"mute",value:(a=e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.adContext&&(this.adContext.muteRequested=!0),this.adsManager&&this.adsManager.setVolume(0);case 2:case"end":return e.stop()}}),e,this)}))),function(){return a.apply(this,arguments)})},{key:"terminate",value:(i=e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.cancel();case 1:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})}]),n}(),yR=S((function t(n){var i=this;R(this,t),T(this,"load",e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,eA(i.moduleName);case 2:i.module=e.sent;case 3:case"end":return e.stop()}}),e)})))),T(this,"promo",e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i.module){e.next=3;break}return e.next=3,i.load();case 3:return e.abrupt("return",i.module[i.moduleDefault]);case 4:case"end":return e.stop()}}),e)}))));var a=n.package||"gd-sdk-stone-dynamic",s=n.package_version||"1.1.1",o=n.template||"puzzle",d=n.dependencies||[];this.moduleName="GDPromoByOrbit",this.moduleDefault=o.charAt(0).toUpperCase()+o.slice(1),this.moduleConfig={source:"https://pm.azerioncircle.com/@bygd/".concat(a,"/").concat(s,"/dist/").concat(o.toLowerCase(),"/iife/index.js"),dependencies:d},Zg(this.moduleName,this.moduleConfig)})),wR=S((function t(n){var i=this;R(this,t),T(this,"load",e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,eA(i.moduleName);case 2:i.module=e.sent;case 3:case"end":return e.stop()}}),e)})))),T(this,"splash",e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i.module){e.next=3;break}return e.next=3,i.load();case 3:return e.abrupt("return",i.module[i.moduleDefault]);case 4:case"end":return e.stop()}}),e)}))));var a=n.package||"gd-sdk-air-dynamic",s=n.package_version||"1.2.0",o=n.template||"pluto",d=n.dependencies||[];this.moduleName=n.module_name||"GDSplashDynamic",this.moduleDefault=n.module_instance||o.charAt(0).toUpperCase()+o.slice(1),this.moduleConfig={source:"https://pm.azerioncircle.com/@bygd/".concat(a,"/").concat(s,"/dist/").concat(o.toLowerCase(),"/iife/index.js"),dependencies:d},Zg(this.moduleName,this.moduleConfig)})),kR=function(e,t){console.log(e,t)},xR={},ER={},DR=null;function SR(){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 xR.version=r,xR.frame=e,xR.function=n,xR.version}function RR(e){var n=this;return DR||(DR=new Promise(function(r){function i(t,n){if(kR("Received a response from CMP",t),n){var i,a;if(!1!==t.gdprApplies)return"tcloaded"===t.eventStatus||"useractioncomplete"===t.eventStatus?(("boolean"!=typeof(a=(i=t)&&"boolean"==typeof i.gdprApplies?i.gdprApplies:e.defaultGdprScope)||!0===a&&"string"!=typeof i.tcString)&&r({result:"cmpUnexpectedResponse",cmp:xR,consentData:i}),void r({result:"ok",consentData:t})):void 0;r({result:"ok",consentData:t})}else r({result:"cmpCallFailed"})}t(this,n),SR(),xR.frame?2===xR.version?(kR("TCF v2 CMP found. Fetching the consent."),xR.function?(kR("CMP API is directly accessible, calling it now..."),xR.function("addEventListener",xR.version,i)):(kR("CMP API is outside the current iframe, calling it now..."),function(e,n,r){var i=this,a="__tcfapi";function s(e){var t="".concat(a,"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!==ER[r.callId]&&ER[r.callId](r.returnValue,r.success)}}window[a]=function(e,r,s,o){t(this,i);var d=Math.random()+"",u="".concat(a,"Call"),c=T({},u,{command:e,parameter:o,callId:d,version:r});ER[d]=s,n.postMessage(c,"*")}.bind(this),window.addEventListener("message",s,!1),window[a](e,xR.version,r)}("addEventListener",xR.frame,i))):r({result:"cmpVersionNotV2",cmp:xR}):r({result:"cmpNotFound"})}.bind(this)),DR)}var TR=new(function(){function t(){R(this,t),this.productName="Game Distribution"}var n;return S(t,[{key:"checkIfExcluded",value:function(e){try{var t,n;return!(null===(t=e.diagnostic)||void 0===t||null===(n=t.gameDock)||void 0===n||!n.excluded)}catch(e){return console.log("Error on checkIfExclude check",e),!1}}},{key:"track",value:(n=e(r.mark((function e(t,n){var i,a,s,o,d,u,c;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.checkIfExcluded(n)){e.next=3;break}return e.abrupt("return");case 3:if(s=null==t||null===(i=t.visitor)||void 0===i||null===(a=i.visitorData)||void 0===a?void 0:a.visitorId){e.next=6;break}return e.abrupt("return");case 6:return o=encodeURIComponent(this.productName),d=encodeURIComponent(s),e.prev=8,u="https://tracker-v4.gamedock.io/v1/events-tracker/track/product/".concat(o,"/user_id/").concat(d),e.next=12,fetch(u,{method:"POST"});case 12:e.sent,e.next=28;break;case 15:return e.prev=15,e.t0=e.catch(8),console.log("GAME_DOCK. fail v4",e.t0),e.prev=18,c="https://tracker.gamedock.io/v1/events-tracker/track/product/".concat(o,"/user_id/").concat(d),e.next=22,fetch(c,{method:"POST"});case 22:e.sent,e.next=28;break;case 25:e.prev=25,e.t1=e.catch(18),console.log("GAME_DOCK. fail v6",e.t1);case 28:case"end":return e.stop()}}),e,this,[[8,15],[18,25]])}))),function(e,t){return n.apply(this,arguments)})}]),t}());function IR(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 CR(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 CR(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,s=!0,o=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){o=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(o)throw a}}}}function CR(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}var OR=function(e){var n=this,r=e.src,i=e.attributes,a=e.target,s=e.isAsync;return new Promise(function(e,o){var d=this;t(this,n);try{var u=document.createElement("script");if(u.async=null==s||s,u.type="text/javascript",u.onload=function(){t(this,d),e()}.bind(this),u.onerror=function(){t(this,d);var e="Error on script load, Error: ".concat(r);console.log(e),o(e)}.bind(this),u.src=r,i){var c,l=IR(i);try{for(l.s();!(c=l.n()).done;){var h=c.value,p=h.key,f=h.value;u.setAttribute(p,f)}}catch(e){l.e(e)}finally{l.f()}}a||(a=document.head),a.appendChild(u)}catch(e){var m="Error on script load catch, Error: ".concat(r);console.log(m,e),o(m)}}.bind(this))},PR="ffd4774b-99ae-4464-8f40-3afa12b4692e",LR=function(){var t=e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,OR({src:"https://cdn.cookielaw.org/consent/tcf.stub.js",attributes:[{key:"id",value:"gd-cookie-pro-tcf-stub"},{key:"charset",value:"UTF-8"}],isAsync:!1});case 3:return e.next=5,OR({src:"https://cdn.cookielaw.org/consent/".concat(PR,"/OtAutoBlock.js"),attributes:[{key:"id",value:"gd-cookie-pro-autoblock"}],isAsync:!1});case 5:return e.next=7,OR({src:"https://cdn.cookielaw.org/scripttemplates/otSDKStub.js",attributes:[{key:"id",value:"gd-cookie-pro-stub"},{key:"charset",value:"UTF-8"},{key:"data-domain-script",value:PR}],isAsync:!1});case 7:n=void 0,r=void 0,i=void 0,n=(t={inlineScript:"function OptanonWrapper() { }"}).inlineScript,r=t.target,(i=document.createElement("script")).text=n,r||(r=document.head),r.appendChild(i),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(0),console.log("GD: CMP error on load",e.t0);case 13:case"end":return e.stop()}var t,n,r,i}),e,null,[[0,10]])})));return function(){return t.apply(this,arguments)}}(),BR=new M,UR={"https://games.softgames.com":{"splash-hidden":"splash-hidden"},"https://sg.gamedistribution.com":{"splash-hidden":"splash-hidden"},"https://html5.gamedistribution.com":{key:"value"}},MR=!1,FR="CONTENT_PAUSE_REQUESTED",jR="CONTENT_RESUME_REQUESTED",GR="SDK_GAME_START",NR=function(e){if("gd-sdk-on-event"===(null==e?void 0:e.type)){var t,n,r,i;if(!("midroll"===(null==e||null===(t=e.event)||void 0===t?void 0:t.adPosition)))return;var a=(null===(n=e.event)||void 0===n?void 0:n.name)===jR||(null===(r=e.event)||void 0===r?void 0:r.name)===GR;if((null===(i=e.event)||void 0===i?void 0:i.name)===FR&&(MR=!0),a&&MR){MR=!1;window.parent.postMessage({type:"sg-game-event",eventName:"levelFinish",data:{score:100}},"*")}}};function qR(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}window.addEventListener("message",(function(e){var n=this,r=e.data,i=e.origin,a=r.type;if(Object.keys(UR).some(function(e){return t(this,n),e===i}.bind(this))&&(null==r||!r.__tcfapiCall)){var s=!r.type||!r.type.startsWith("gd-sdk")&&!("parent-data-response"===r.type)||"sg-game-event"===r.type;NR(r);var o=function(){t(this,n);try{var r,i;return null==e||null===(r=e.source)||void 0===r||null===(i=r.location)||void 0===i?void 0:i.href}catch(e){}}.bind(this);if(window.parent&&s){if("https://html5.gamedistribution.com"===i){var d=o();if(!d)return;var u=d&&["9555f04e1900482aaaef710cd2f8c440"].some(function(e){return t(this,n),d.indexOf(e)>0}.bind(this)),c=["sg-game-event"].some(function(e){return t(this,n),e===(null==r?void 0:r.type)}.bind(this));if(!u&&!c)return}var l=r.eventName,h=r.data;window.mpHelper&&("levelStart"!==l&&"levelFinish"!==l||window.mpHelper.sendStat("level",h.level),"levelFinish"===l&&window.mpHelper.sendStat("score",h.score)),window.parent.postMessage(r,"*")}if(a){var p=UR[i][a];p&&BR.emit(p,r)}}}),!1),function(){for(var e=new _,t=0,n=[FR,jR,GR];t<n.length;t++){var r=n[t];e.subscribe(r,(function(e){NR({type:"gd-sdk-on-event",event:e})}))}}();var HR="__msgr",VR=Q(),QR=function(e){try{var t=WR(e,e.event),n=JR(window);n&&n!==window.top&&n.postMessage(t,"https://html5.gamedistribution.com")}catch(e){console.error("Error sending event message:",e)}},zR=function(e,t){var n=document.createElement("iframe");return n.src=e,n.style.display="none",n.name=t,n},WR=function(e,t){var n;return{gameId:e.gameId||e.game.gameId,target:(null===(n=e.evnts)||void 0===n?void 0:n.domain)||e.game.evnts.domain,type:"gd-system",token:VR,event_name:t,timestamp:Date.now()}},KR=function(e){var n=this;setInterval(function(){t(this,n);var r=WR(e,"Heartbeat");XR(r)}.bind(this),1e3*e.evnts.heartbeatDuration)},YR=function(e){try{var t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qR(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qR(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e.data);if(!t.event_name)return;t.token=VR,XR(t)}catch(e){console.error("GD Messager Error:",e.message)}},JR=function e(t){try{var n,r,i=null==t?void 0:t.parent;return"game"===(null==i||null===(n=i.document)||void 0===n||null===(r=n.activeElement)||void 0===r?void 0:r.id)?i:e(i)}catch(e){return t}},XR=function(e){try{window[HR]&&window[HR].postMessage(e,"*")}catch(e){console.log("GD Messager initialization, please wait....")}},ZR=function(){function n(e){R(this,n),this.adContainer=document.getElementById("gdsdk__advertisement"),this.adContainerInner=document.getElementById("gdsdk__advertisement_slot"),this._adRequest=e.adRequest,this._gameData=e._gameData,this._msgrt=e._msgrt,this._adInstance=e._adInstance,this._eventBus=e._eventBus,this.blockedAdsMap=e._blockedAdsMap,this._parentURL=e._parentURL,this._parentDomain=e._parentDomain,this._onResumeGame=e._onResumeGame.bind(e),this._onPauseGame=e._onPauseGame.bind(e),this._onRewardedWatchComplete=e._onRewardedWatchComplete.bind(e),this._onAdError=e._onAdError.bind(e),this._promoShowSuccess=!1}var i,a,s;return S(n,[{key:"run",value:function(n){var i=n.duration,a=this;return new Promise(function(){var n=e(r.mark((function e(n,s){var o,d=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,a.add();case 3:o=a.show(),setTimeout(function(){t(this,d);try{a.hide(),n({success:o})}catch(e){s(e)}}.bind(this),1e3*i),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),s(e.t0);case 10:case"end":return e.stop()}}),e,this,[[0,7]])})));return function(e,t){return n.apply(this,arguments)}}())}},{key:"show",value:function(){return this.promo_data.game?(this.adContainer.style.visibility="visible",this.promo.style.display="block",this._onPauseGame("Pause the game for the promo","success"),this._promoShowSuccess=!0):this._onAdError("Promo not found"),this._promoShowSuccess}},{key:"hide",value:function(){var e;(this.promo.remove(),this.adContainer.style.visibility="hidden",this._promoShowSuccess)&&("reward"===(null===(e=this._adRequest.params)||void 0===e?void 0:e.position)&&this._onRewardedWatchComplete());this._onResumeGame("Advertisement(s) are done. Start / resume the game.","success")}},{key:"add",value:(s=e(r.mark((function t(){var n,i,a,s=this;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.fetch_promo();case 3:this.promo_data=t.sent,n=document.createElement("div"),this.promo=n,i=this.promo_data,this.promo.addEventListener("click",function(){var t=e(r.mark((function e(t){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.preventDefault(),console.log(i),s.track_click(i.click_tracking),window.open(i.click_through,"_blank");case 4:case"end":return e.stop()}}),e)})));return function(e){return t.apply(this,arguments)}}()),(a=document.createElement("iframe")).src=this.promo_data.renderer_url,a.setAttribute("frameborder",0),this.addStyles(),this.promo.classList.add("gd__promo"),a.classList.add("gd__promo__iframe"),this.promo.appendChild(a),this.adContainer.appendChild(this.promo),t.next=21;break;case 18:t.prev=18,t.t0=t.catch(0),console.log(t.t0);case 21:case"end":return t.stop()}}),t,this,[[0,18]])}))),function(){return s.apply(this,arguments)})},{key:"addStyles",value:function(){var e="\n .gd__promo{\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background-color: transparent;\n z-index: 1;\n cursor: pointer;\n }\n .gd__promo__iframe{\n position: relative;\n z-index: -1;\n width:".concat(this.adContainerInner.style.width,";\n height:").concat(this.adContainerInner.style.height,";\n }\n "),t=document.body||document.getElementsByTagName("body")[0];this.addStylesheet("gd__promo__style",t,e)}},{key:"addStylesheet",value:function(e,t,n){if(!document.getElementById(e)){var r=document.createElement("style");r.id=e,r.styleSheet?r.styleSheet.cssText=n:r.appendChild(document.createTextNode(n)),t.appendChild(r)}}},{key:"fetch_promo",value:(a=e(r.mark((function e(){var n,i=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch("https://tag.atom.gamedistribution.com/v1/rainbow/pick?id=".concat(this._parentDomain,"&aid=").concat(this._gameData.gameId)).then(function(e){return t(this,i),e.json()}.bind(this));case 2:return n=e.sent,e.abrupt("return",n);case 4:case"end":return e.stop()}}),e,this)}))),function(){return a.apply(this,arguments)})},{key:"track_click",value:(i=e(r.mark((function e(t){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(t);case 2:case"end":return e.stop()}}),e)}))),function(e){return i.apply(this,arguments)})}]),n}();function $R(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 eT(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$R(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$R(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var tT,nT,rT=function(){var t=e(r.mark((function e(){var t;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return"https://cdnjs.cloudflare.com/ajax/libs/socket.io/4.3.1/socket.io.js",t=["https://cdnjs.cloudflare.com/ajax/libs/socket.io/4.3.1/socket.io.js"],e.next=4,m(t[0],"soecket.io.js",{alternates:t});case 4:case"end":return e.stop()}}),e)})));return function(){return t.apply(this,arguments)}}(),iT=[],aT=0,sT=!1,oT=function(){var n=e(r.mark((function n(i){var a,s,o,d,u,c,l,h,p=this;return r.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(a=i.args,s=i.onError,n.prev=1,!window.isForwarderFrame){n.next=5;break}return n.abrupt("return");case 5:return n.next=7,nk();case 7:if(!(o=n.sent)){n.next=18;break}return n.next=11,o.isLoader();case 11:if(!(d=n.sent)&&(d||o.hasRouter())){n.next=16;break}o.register({method:"sendSocketEvent",handler:function(e){t(this,p),cT(e.topic,e.args)}.bind(this)}),n.next=18;break;case 16:return o.registerProxy({alias:"sendSocketEvent",method:"sendSocketEvent"}),n.abrupt("return");case 18:if(u=new I(window.location.href),!((c=!["html5.gamedistribution.com","revision.gamedistribution.com"].some(function(e){return t(this,p),e.toLowerCase()===u.host.toLowerCase()}.bind(this)))&&o&&o.hasRouter())){n.next=24;break}return n.abrupt("return");case 24:return c&&o&&o.hasRouter(),n.next=27,rT();case 27:tT=Q(),l={json:JSON.stringify(a)},h=["wss://ws.gamedistribution.com"],a.isHwp&&h.push("wss://ws-acc-hwp.gamedistribution.com"),iT=h.map(function(n){var i=this;t(this,p);var s=io(n,{query:l,upgrade:!1,transports:["websocket"],reconnectionDelay:6e4,autoConnect:!1});return s.on("connect",function(){t(this,i)}.bind(this)),s.on("after-connect",function(){var t=e(r.mark((function e(t){var n,i,o,d,u,c,l;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return nT=nT||(null==t?void 0:t.serverDate),n=a.gameId,i=a.failed,e.next=4,fw({gameId:n,serverDate:nT});case 4:o=e.sent,d=o.visit,u=o.mode,c=o.errors,a.visit=eT(eT({},d),{},{stm:u,errors:c}),i&&(a.gameId=n?"failed:wrong":"failed:empty"),l={json:JSON.stringify(a)},s.emit("client-info",{clientId:tT,counter:aT++,serverDate:nT,query:l}),sT=!0;case 13:case"end":return e.stop()}}),e)})));return function(e){return t.apply(this,arguments)}}()),s.on("disconnect",function(){t(this,i)}.bind(this)),s.connect(),s}.bind(this)),n.next=37;break;case 34:n.prev=34,n.t0=n.catch(1),s&&s(n.t0);case 37:case"end":return n.stop()}}),n,this,[[1,34]])})));return function(e){return n.apply(this,arguments)}}(),dT=!1,uT=[];function cT(e,t){return lT.apply(this,arguments)}function lT(){return lT=e(r.mark((function e(n,i){var a,s,o,d=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,nk();case 2:if(!(a=e.sent)){e.next=11;break}return e.next=6,a.isLoader();case 6:if(e.sent||!a.hasRouter()){e.next=11;break}return e.next=10,a.sendSocketEvent({topic:n,args:i});case 10:return e.abrupt("return");case 11:if("play"!==n){e.next=15;break}if(!dT){e.next=14;break}return e.abrupt("return");case 14:dT=!0;case 15:s=function(e,n){var r=this;t(this,d);try{var i={json:JSON.stringify(n||{})};iT.forEach(function(n){t(this,r),n.emit("socket-event",{topic:e,clientId:tT,counter:aT,serverDate:nT,query:i})}.bind(this))}catch(e){ko("game-session: Error on sending socket-event",e.message)}}.bind(this),o=function(){t(this,d),s(n,i)}.bind(this),uT.push(o);case 19:case"end":return e.stop()}}),e,this)}))),lT.apply(this,arguments)}function hT(e){var n=this,r={preroll:["preroll","start"],midroll:["next"],rewarded:["reward"]},i=Object.keys(r).find(function(i){var a=this;return t(this,n),r[i].some(function(n){return t(this,a),n===e.params.position}.bind(this))}.bind(this));return i||"midroll"}function pT(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 fT(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 fT(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,s=!0,o=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){o=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(o)throw a}}}}function fT(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 mT(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}setInterval((function(){if(0!==uT.length&&iT.length>0&&sT){for(var e=function(){var e=this,i=r[n];i(),uT=uT.filter(function(n){return t(this,e),n!==i}.bind(this))},n=0,r=G(uT);n<r.length;n++)e();yo("game-session: commands length",uT.length)}}),100);var vT=3,gT=1,AT=5,bT={lastImpressionDate:null,lastInterstitialImpressionDate:null,firstInterstitialImpressionDate:null,imps:0};var _T=new function(){var e={};return{count:function(t){e[t]=e[t]||0,e[t]++},get:function(t){return e[t]=e[t]||0,e[t]},getAll:function(){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?mT(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mT(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e)}}};function yT(){return wT.apply(this,arguments)}function wT(){return(wT=e(r.mark((function e(){var n,i,a,s,o,d,u,c,l,h,p;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i={},e.next=3,Lw();case 3:if(a=e.sent,s=a.compensation||{enabled:!1},o=null==a||null===(n=a.adTimer)||void 0===n?void 0:n.enabled,i.ruleEnabled=(null==s?void 0:s.enabled)&&o,!(void 0===(null==s?void 0:s.exctg)||(null==s?void 0:s.exctg))){e.next=29;break}d=["co-op","multiplayer","IAPs"],u=(null==a?void 0:a.tags)||[],c=!1,l=pT(u),e.prev=13,p=r.mark((function e(){var n,i=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=h.value,d.some(function(e){return t(this,i),e===n.title}.bind(this))&&(c=!0);case 2:case"end":return e.stop()}}),e,this)})),l.s();case 16:if((h=l.n()).done){e.next=20;break}return e.delegateYield(p(),"t0",18);case 18:e.next=16;break;case 20:e.next=25;break;case 22:e.prev=22,e.t1=e.catch(13),l.e(e.t1);case 25:return e.prev=25,l.f(),e.finish(25);case 28:i.disabledByTag=c;case 29:return i.isLowScoreGame=kT(a),i.enabled=i.ruleEnabled&&!i.disabledByTag&&i.isLowScoreGame,a.hasActiveCompensations=i.enabled,e.abrupt("return",i);case 33:case"end":return e.stop()}}),e,null,[[13,22,25,28]])})))).apply(this,arguments)}function kT(e){var t=!1,n=e.compensation||{enabled:!1},r=null==e?void 0:e.adsc;if(1===(null==r?void 0:r.s)&&null!=r&&r.t){var i=null==r?void 0:r.t,a=(null==n?void 0:n.esc)||gT,s=(null==n?void 0:n.ascl)||AT,o=i||{},d=o.adsc,u=o.reqsc,c=o.pdur,l=o.rspdur;o.aspdur,t=(l||u/(c/vT))<=a&&d<s}return t}var xT=!1;function ET(){return DT.apply(this,arguments)}function DT(){return(DT=e(r.mark((function e(){var t;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!xT){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,yT();case 4:(t=e.sent).enabled,t.override,t.giftEnabled,t.midrollPlusEnabled,xT=!0;case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ST(e){var t=e.rateType,n=e.gameData,r=!1;if(n.hasActiveCompensations){var i=n.compensation,a="gift"===t?null==i?void 0:i.gftr:null==i?void 0:i.mpr;a=void 0===a?1:a,r=Math.random()<=a}else r=!0;return r}function RT(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 TT(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 TT(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,s=!0,o=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){o=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(o)throw a}}}}function TT(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}var IT=!1,CT=3,OT=5,PT=1,LT=60,BT=10;function UT(){return MT.apply(this,arguments)}function MT(){return(MT=e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return bT.imps++,bT.lastImpressionDate=new Date,bT.lastInterstitialImpressionDate=new Date,bT.firstInterstitialImpressionDate||(bT.firstInterstitialImpressionDate=bT.lastInterstitialImpressionDate),e.abrupt("return",!0);case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function FT(e){return jT.apply(this,arguments)}function jT(){return jT=e(r.mark((function n(i){var a,s,o,d,u,c,l,h,p,f,m,v,g,A,b,_,y,w,k,x,E,D,S,R,T,I,C,O,P,L,B,U,M,F,j,G,N,q,H,V,Q,z,W,K,Y,J,X,Z,$,ee,te,ne,re,ie,ae,se,oe,de,ue,ce,le,he,pe,fe,me,ve,ge=this;return r.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(E=i.gameData,D=i.executeCompensation,S=function(){var t=e(r.mark((function e(t){var n,i,a;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,n=(null==t?void 0:t.whenAvailable)||!1,!D){e.next=8;break}return e.next=5,D({whenAvailable:n});case 5:e.t0=e.sent,e.next=11;break;case 8:return e.next=10,UT();case 10:e.t0=e.sent;case 11:return i=e.t0,a=i.args,e.abrupt("return",null==a?void 0:a.success);case 16:return e.prev=16,e.t1=e.catch(0),e.next=20,UT();case 20:case"end":return e.stop()}}),e,null,[[0,16]])})));return function(e){return t.apply(this,arguments)}}(),R=!IT,!IT){n.next=5;break}return n.abrupt("return");case 5:if(IT=!0,T=E.adsc){n.next=10;break}return n.abrupt("return");case 10:if(I=T.s,C=T.t,1===I){n.next=13;break}return n.abrupt("return");case 13:if(O=E.compensation||{enabled:!1},P=null==O?void 0:O.enabled,L=null==E||null===(a=E.adTimer)||void 0===a?void 0:a.enabled,B=null==E||null===(s=E.adTimer)||void 0===s?void 0:s.tl,(U=(null==E||null===(o=E.pAds)||void 0===o||null===(d=o.vmap)||void 0===d?void 0:d.enabled)&&(null==E||null===(u=E.pAds)||void 0===u||null===(c=u.vmap)||void 0===c||null===(l=c.adtr)||void 0===l?void 0:l.disabled)||!1)&&yo("[compensation] disabled by preroll vmap",{pAds:null==E?void 0:E.pAds}),P&&L&&!U){n.next=23;break}return n.abrupt("return");case 23:if(!((M=null!=E&&null!==(h=E.pAds)&&void 0!==h&&null!==(p=h.vmap)&&void 0!==p&&p.enabled&&null!=E&&null!==(f=E.pAds)&&void 0!==f&&null!==(m=f.vmap)&&void 0!==m&&null!==(v=m.adtr)&&void 0!==v&&v.delay?null==E||null===(g=E.pAds)||void 0===g||null===(A=g.vmap)||void 0===A||null===(b=A.adtr)||void 0===b?void 0:b.delay:0)>0)){n.next=30;break}return n.next=29,new Promise(function(e){var n=this;t(this,ge),setTimeout(function(){t(this,n),e()}.bind(this),1e3*M)}.bind(this));case 29:case 30:if(!(void 0===(null==O?void 0:O.exctg)||(null==O?void 0:O.exctg))){n.next=54;break}F=["co-op","multiplayer","IAPs"],j=(null==E?void 0:E.tags)||[],G=!1,N=RT(j),n.prev=36,H=r.mark((function e(){var n,i=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=q.value,F.some(function(e){return t(this,i),e===n.title}.bind(this))&&(G=!0);case 2:case"end":return e.stop()}}),e,this)})),N.s();case 39:if((q=N.n()).done){n.next=43;break}return n.delegateYield(H(),"t0",41);case 41:n.next=39;break;case 43:n.next=48;break;case 45:n.prev=45,n.t1=n.catch(36),N.e(n.t1);case 48:return n.prev=48,N.f(),n.finish(48);case 51:if(!G){n.next=54;break}return n.abrupt("return");case 54:if(V=(null==E||null===(_=E.adTimer)||void 0===_?void 0:_.resetOnRewarded)||!1,Q=(null==E||null===(y=E.adTimer)||void 0===y?void 0:y.delayAfterRewarded)||0,z=(null==O?void 0:O.esc)||PT,W=void 0===(null==O?void 0:O.depgft)||(null==O?void 0:O.depgft),K=null!=O&&O.depgftr?null==O?void 0:O.depgftr:1,Y=(null==O?void 0:O.onst)||!1,J=(null==O?void 0:O.sl)||3,X=B||(null==O?void 0:O.tl)||180,Z=(null==E||null===(w=E.gft)||void 0===w?void 0:w.midroll.enabled)||!1,$=(null==E||null===(k=E.midroll_plus)||void 0===k?void 0:k.enabled)||!1,(!Z||!$)&&(X/=K),ee=void 0===(null==O?void 0:O.tc)||(null==O?void 0:O.tc),te=(null==O?void 0:O.ascl)||OT,!W){n.next=76;break}if(ie=(null==E||null===(ne=E.gft)||void 0===ne?void 0:ne.midroll.enabled)||!1,ae=(null==E||null===(re=E.midroll_plus)||void 0===re?void 0:re.enabled)||!1,ie&&ae){n.next=76;break}return n.abrupt("return");case 76:if(oe=(se=C||{}).adsc,de=se.reqsc,ue=se.pdur,ce=se.rspdur,se.aspdur,(ce||de/(ue/CT))<=z&&oe<te){n.next=83;break}return n.abrupt("return");case 83:if(le=Math.ceil(ue/CT),!Y||!R){n.next=90;break}return n.next=90,S({whenAvailable:!0});case 90:return he=0,pe=1,fe=function(){t(this,ge),he=0,pe=1}.bind(this),null===(x=E.sdkfw)||void 0===x||x.enabled,n.next=96,nk();case 96:if(me=n.sent,n.t2=me,!n.t2){n.next=102;break}return n.next=101,me.isLoader();case 101:n.t2=n.sent;case 102:n.t2,ve=setInterval(e(r.mark((function e(){var n,i,a,s,o,d,u=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(ee&&bT.imps>=le)){e.next=4;break}return clearInterval(ve),e.abrupt("return");case 4:if(n=new Date,i=V?bT.lastImpressionDate:bT.lastInterstitialImpressionDate,a=i?GT(i,n):X+1,!((s=X-a)>0)){e.next=21;break}if(!(s<=LT-BT)){e.next=18;break}return e.next=16,new Promise(function(e){var n=this;t(this,u),setTimeout(function(){t(this,n),e()}.bind(this),1e3*s)}.bind(this));case 16:e.next=21;break;case 18:return fe(),e.abrupt("return");case 21:if(++he%pe==0){e.next=25;break}return e.abrupt("return");case 25:if(V){e.next=35;break}if(o=bT.lastImpressionDate?GT(bT.lastImpressionDate,new Date):X+1,!((d=Q-o)>0)){e.next=32;break}return e.next=32,new Promise(function(e){var n=this;t(this,u),setTimeout(function(){t(this,n),e()}.bind(this),1e3*d)}.bind(this));case 32:e.next=36;break;case 35:case 36:return e.next=38,S({});case 38:e.sent?fe():(he=0,pe=pe+1>J?J:pe+1);case 40:case"end":return e.stop()}}),e,this)}))),1e3*LT);case 105:case"end":return n.stop()}}),n,this,[[36,45,48,51]])}))),jT.apply(this,arguments)}function GT(e,t){var n=e.getTime();return(t.getTime()-n)/1e3}function NT(e){return qT.apply(this,arguments)}function qT(){return(qT=e(r.mark((function e(t){var n,i,a,s,o,d,u,c,l,h,p;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=t.gameId,a=t.adTypeFound,s=t.ad_skip_rule,o=_T.get(a),(d=null==s?void 0:s[a])&&d.enabled){e.next=7;break}return e.abrupt("return",!1);case 7:if((u=(null==d?void 0:d.skip_sessions)||0)&&0!==u){e.next=11;break}return e.abrupt("return",!1);case 11:if((c=(null==d?void 0:d.skips)||0)&&0!==c){e.next=15;break}return e.abrupt("return",!1);case 15:return e.next=17,hw({gameId:i});case 17:if((l=e.sent)&&!((null===(n=l.errors)||void 0===n?void 0:n.length)>0)){e.next=21;break}return e.abrupt("return",!1);case 21:return l.fv,l.lv,h=l.vc,p=h<=u&&("preroll"===a||o<=c),e.abrupt("return",p);case 25:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function HT(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 VT(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?HT(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):HT(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function QT(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 zT(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 zT(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,s=!0,o=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){o=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(o)throw a}}}}function zT(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}var WT,KT=function(){function n(e){var r=this;R(this,n),this._gameData=e._gameData,this._msgrt=e.msgrt,this._adInstance=e.adInstance,this._eventBus=e.eventBus,this.blockedAdsMap=e.blockedAdsMap,this._parentURL=e._parentURL,this._parentDomain=e._parentDomain,this._onResumeGame=e.onResumeGame.bind(e),this._onPauseGame=e.onPauseGame.bind(e),this._onRewardedWatchComplete=e.onRewardedWatchComplete.bind(e),this._onAdError=e.onAdError.bind(e),this._setAdRequestTimer=e._setAdRequestTimer.bind(e),this._giveGift=e._giveGift.bind(e),this._executeMidrollPlus=e._executeMidrollPlus.bind(e),this.executeCompensation=e.executeCompensation.bind(e),this._runAutoResume=e._runAutoResume.bind(e),this.send_atom_event=e.send_atom_event.bind(e),this.get_session_id=e.get_session_id.bind(e),this.get_ad_system_init_result=e.get_ad_system_init_result.bind(e),this.eventBus=new _,this.isOpusReady=function(){return t(this,r),e.isOpusReady}.bind(this),this._adCounterLabel=e.adInstance.adCounterLabel,this._adInfoLabel=e.adInstance.adInfoLabel,this._muteRequested=!1,this._terminateRequested=!1,this._adSession=null,this._registerForEvents(),document.addEventListener("visibilitychange",function(){t(this,r),"visible"===document.visibilityState?this._sendTabChange("tab-visible"):this._sendTabChange("tab-invisible")}.bind(this))}var i,a,s;return S(n,[{key:"_registerForEvents",value:function(){var e=this;this.eventBus.subscribe("HL_CONFIG_ERROR",function(n){t(this,e),this.hasHLConfigError=!0}.bind(this))}},{key:"getTimeDiff",value:function(e,t){var n=e.getTime();return(t.getTime()-n)/1e3}},{key:"skipMidrollOnLongVMAP",value:(s=e(r.mark((function e(t){var n,i,a,s,o,d,u,c,l,h,p,f,m,v,g,A,b,_,y,w;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("midroll"===t){e.next=2;break}return e.abrupt("return",!1);case 2:if((null===(n=this._gameData)||void 0===n||null===(i=n.pAds)||void 0===i?void 0:i.vmap.enabled)&&(null===(a=this._gameData)||void 0===a||null===(s=a.pAds)||void 0===s||null===(o=s.vmap)||void 0===o?void 0:o.adtr)){e.next=5;break}return e.abrupt("return",!1);case 5:if(null!==(d=this._gameData)&&void 0!==d&&null!==(u=d.visit)&&void 0!==u&&u.vc&&0!==(null===(c=this._gameData)||void 0===c||null===(l=c.visit)||void 0===l?void 0:l.vc)){e.next=7;break}return e.abrupt("return",!1);case 7:if(_=(null===(h=this._gameData)||void 0===h||null===(p=h.pAds)||void 0===p||null===(f=p.vmap)||void 0===f||null===(m=f.adtr)||void 0===m?void 0:m.skipDuration)||(null===(v=this._gameData)||void 0===v||null===(g=v.pAds)||void 0===g||null===(A=g.vmap)||void 0===A||null===(b=A.adtr)||void 0===b?void 0:b.delay)||360,bT.firstInterstitialImpressionDate){e.next=10;break}return e.abrupt("return",!1);case 10:return y=this.getTimeDiff(bT.firstInterstitialImpressionDate,new Date),(w=y<_)&&wo("gd-adflow skipped by long vmap",{elapsed:y}),e.abrupt("return",w);case 15:case"end":return e.stop()}}),e,this)}))),function(e){return s.apply(this,arguments)})},{key:"runAdFlow",value:(a=e(r.mark((function e(n){var i,a,s,o,d,u,c,l,h,p,f,m,v,g,A,b,_,y,w,k,x,E,D,S,R,I,C,O,P,L,B,U,M,F,j,G,N,q,H,V,Q,z,W,K,Y,J,X,Z,$,ee,te,ne,re,ie,ae,se,oe,de,ue,ce,le,he,pe,fe,me,ve,ge,Ae,be=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._adInstance.adCounter,null===(i=n.params)||void 0===i||!i.isCompensation||!this._gameData.compensation.clbl){e.next=7;break}return this._adCounterLabel.show(),p=function(e){var n=this;return t(this,be),new Promise(function(r){return t(this,n),setTimeout(r,e)}.bind(this))}.bind(this),e.next=7,p(1e3*this._gameData.compensation.ctl);case 7:return e.next=9,nk();case 9:return!(f=e.sent)||f.isLoader(),this.adRequest=n,m=hT(n),n.params.adTypeFound=m,yo("gd-adflow, adTypeFound",m,n.params.position),_T.count(m),yo("gd-adflow, counters",{counters:_T.getAll()}),v=this._gameData,g=v.gameId,A=v.ad_skip,e.next=21,NT({gameId:g,ad_skip_rule:A,adTypeFound:m});case 21:if(!e.sent){e.next=28;break}return this._adInstance.adCounter[m]=this._adInstance.adCounter[m]||0,this._adInstance.adCounter[m]++,this._onResumeGame("Advertisement(s) are done. Start / resume the game.","success"),FT({gameData:this._gameData,executeCompensation:this.executeCompensation}),e.abrupt("return");case 28:return e.next=30,this.skipMidrollOnLongVMAP(m);case 30:if(!e.sent){e.next=34;break}return this._onResumeGame("Advertisement(s) are done. Start / resume the game.","success"),e.abrupt("return");case 34:(b=this._getAdFlow(m)).find(function(e){return t(this,be),"opus"===e}.bind(this))&&!this.isOpusReady()&&(b=b.filter(function(e){return t(this,be),"opus"!==e}.bind(this)),this._msgrt.send("opus.sdk",{message:"Not ready"})),_=this._gameData,y=_.afg_disabled,w=null===(a=n.params)||void 0===a?void 0:a.isGift,k=null===(s=n.params)||void 0===s?void 0:s.isMidrollPlus,x=null===(o=n.params)||void 0===o?void 0:o.isCompensation,null===(d=n.params)||void 0===d||d.position,E=null===(u=_.promo)||void 0===u?void 0:u.rainbow,D=(null==E?void 0:E.enabled)&&(null===(c=E.position)||void 0===c?void 0:c[m]),S=null==E?void 0:E.gift,R=D&&null!=E&&E.duration?null==E?void 0:E.duration:5,I=y?b.filter(function(e){return t(this,be),"adsense"!==e}.bind(this)):b,C=this.get_ad_system_init_result(),O=C.afg,P=C.ima,L=null==_||null===(l=_.ad_blcks)||void 0===l||null===(h=l.removeOtherAdaptors)||void 0===h?void 0:h.enabled,this.anyAdBlocking=!O||!P,this.bothAdBlocking=!O&&!P,this.adsBlocked=L&&this.anyAdBlocking||this.bothAdBlocking,this.adsBlocked?(wo("gd-adflow adsBlocked so changing the flow"),I=[]):(O||(I=I.filter(function(e){return t(this,be),"adsense"!==e}.bind(this))),P||(I=I.filter(function(e){return t(this,be),"ima"!==e}.bind(this)))),B=!1,U=!1,M=[],F=0,j=!1,N=!1,q={reqs:0,imps:0},H={},V=!1,Q=!1,z=QT(I),e.prev=68,z.s();case 70:if((W=z.n()).done){e.next=124;break}if(K=W.value,!this._terminateRequested){e.next=74;break}return e.abrupt("break",124);case 74:if(n.params.adapter=K,Y=F===I.length-1,J=w&&S||!w,X=Y&&D&&J,n.params=VT(VT({},n.params),{},{adapterIndex:F,isLastAdapter:Y,shouldFail:!1,extraPromoRunOnFail:X,muteRequested:this._muteRequested}),!this._muteRequested||"adsense"!==K){e.next=81;break}return e.abrupt("continue",122);case 81:return function(){t(this,be),xo.firstSuccessOrder&&!isNaN(xo.firstSuccessOrder)&&(n.params.shouldFail=F<xo.firstSuccessOrder)}.bind(this),wo("gd-adflow, before adInvoke",F,K,n.params.shouldFail),e.next=85,this.adInvoke(n);case 85:if(Z=e.sent,$=Z.success,ee=Z.args,te=Z.isSkipped,ne=Z.noVast,re=Z.t4r,ie=Z.adContext,ae=Z.isCanceled,(se=(null==ie?void 0:ie.isVMAP)||!1)&&q.reqs++,se&&($||ae)&&q.imps++,oe=null==ee?void 0:ee.reason,de=null==ee?void 0:ee.message,ue=null==ee?void 0:ee.errorType,H[K]=H[K]||{req:0,imp:0,fail:0},H[K].req++,$?H[K].imp++:(H[K].fail++,H[K].failReason=oe,H[K].failMessage=de,H[K].failType=ue),!$){e.next=111;break}return wo("gd-adflow, adapter-result-success",F,K,ee),B=!0,N=se,U=!(null==ee||!ee.isPromoSuccess),G=re,e.abrupt("break",124);case 111:if(wo("gd-adflow, adapter-result-failure",F,K,ee.message),"opus"===K&&"[FC] No ad available"===(null==ee?void 0:ee.message)&&(n.params.opusSuccess=!0,V=!0),ae&&!Q&&(Q=!0),F++,M.push(ee.message),!te){e.next=118;break}return e.abrupt("break",124);case 118:if(!ne){e.next=121;break}return this._runAutoResume(),e.abrupt("break",124);case 121:j=X;case 122:e.next=70;break;case 124:e.next=129;break;case 126:e.prev=126,e.t0=e.catch(68),z.e(e.t0);case 129:return e.prev=129,z.f(),e.finish(129);case 132:if(this._adInfoLabel&&this._adInfoLabel.hide(),!j){e.next=139;break}return e.next=136,new ZR(this).run({duration:R});case 136:e.sent.success&&(U=!0);case 139:return function(){var e;t(this,be),xo.disableGift&&null!==(e=_.gft)&&void 0!==e&&e[m].enabled&&(_.gft[m].enabled=!1)}.bind(this),ce=M.join(" /n"),B||V?(bT.imps++,bT.lastImpressionDate=new Date,"rewarded"!==m&&(bT.lastInterstitialImpressionDate=new Date,bT.firstInterstitialImpressionDate||(bT.firstInterstitialImpressionDate=bT.lastInterstitialImpressionDate)),this._setAdRequestTimer(),this._onResumeGame("Advertisement(s) are done. Start / resume the game.","success"),this._giveGift(m),"midroll"===m&&this._executeMidrollPlus()):(this._onResumeGame(ce,"warning"),this._giveGift(m),"midroll"===m&&this._executeMidrollPlus()),FT({gameData:_,executeCompensation:this.executeCompensation}),le="-1",he="none",B?(le="index_".concat(F),he=I[F]):U?(le="promo",he="promo"):V&&(le="opus",he="opus"),pe=this.get_session_id(),this.anyAdBlocking&&"-1"===le?(fe="rewarded"===m?"rewarded":this.blockedAdsMap.preroll?"midroll":"preroll",this.blockedAdsMap[fe]=this.blockedAdsMap[fe]?this.blockedAdsMap[fe]+1:1,yo("gd-adflow, blocked-ad",JSON.stringify(this.blockedAdsMap)),this._msgrt.send("adflow.blocked.pos",{message:"".concat(fe)}),this.send_atom_event("gd.adflow",{adBlocker:!0,afgBlocked:!O,imaBlocked:!P,isGift:w,isMidrollPlus:k,adType:fe,sessionId:pe,successAdapter:"none",adFlowIndex:le,adapterResults:H,ctry:_.ctry})):(T(me={},"adflow.all.index",{message:"".concat(le)}),T(me,"adflow.all.success_adapter",{message:"".concat(he)}),T(me,"adflow.".concat(m,".index"),{message:"".concat(le)}),T(me,"adflow.".concat(m,".success_adapter"),{message:"".concat(he)}),ve=me,Object.keys(ve).forEach(function(e){t(this,be);var n=ve[e];this._msgrt.send(e,n)}.bind(this)),this.send_atom_event("gd.adflow",{adFlowIndex:le,successAdapter:he,adBlocker:!1,afgBlocked:!O,imaBlocked:!P,isGift:w,isMidrollPlus:k,isCompensation:x,adType:m,sessionId:pe,t4r:G,adapterResults:H,ctry:_.ctry})),ge={adType:m,imp:"-1"!==le&&"promo"!==le||V,promo:"promo"===le,opus:V,blocked:this.anyAdBlocking&&"-1"===le,hasHLConfigError:this.hasHLConfigError,isGift:w,isMidrollPlus:k,isCompensation:x,isVMAP:!V&&N,isAppliedVMAP:!V&&N&&(null==_?void 0:_.vmapByTagsApplied),VMAPs:q},this._adSession=ge,cT("ad-session",{adSession:ge}),V&&Q&&cT("ad-session",{adSession:VT(VT({},ge),{},{opus:!1,cancel:!0,isVMAP:N,isAppliedVMAP:N&&(null==_?void 0:_.vmapByTagsApplied)})}),Ae={adType:m},this.eventBus.broadcast("AD_FLOW_COMPLETE",Ae),e.abrupt("return",VT(VT({},Ae),{},{args:{success:B,isGift:w,isMidrollPlus:k}}));case 159:case"end":return e.stop()}}),e,this,[[68,126,129,132]])}))),function(e){return a.apply(this,arguments)})},{key:"adInvoke",value:(i=e(r.mark((function n(i){var a=this;return r.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",new Promise(function(){var n=e(r.mark((function e(n,s){var o,d,u,c,l=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o="main.showad.".concat(i.params.adapter,".").concat(i.params.adapterIndex),yo("adInvoke.start",{scopeName:o,adRequest:JSON.stringify(i)}),d={},u=function(e){t(this,l);var r=a._adInstance.adContext;yo("adInvoke.failure",{args:e,adRequest:JSON.stringify(i),adContext:r}),a._eventBus.unsubscribeScope(o);var s="dismissed"===(null==e?void 0:e.message),d="AD_SDK_CANCELED"===(null==e?void 0:e.name);n({success:!1,args:e,isSkipped:s,isCanceled:d,noVast:e.noVast,adContext:r})}.bind(this),c=function(e){t(this,l);var r=a._adInstance.adContext;yo("adInvoke.success",{args:e,adRequest:JSON.stringify(i),adContext:r}),a._eventBus.unsubscribeScope(o),n({success:!0,args:e,t4r:d,adContext:r})}.bind(this),a._eventBus.subscribe("AD_ERROR",u,o),a._eventBus.subscribe("AD_SDK_CANCELED",u,o),a._eventBus.subscribe("AD_SUCCESS",c,o),a._eventBus.subscribe("AD_T4R",function(){t(this,l),d.loaded=!0}.bind(this),o),a._eventBus.subscribe("AD_T4R_CLICK",function(){t(this,l),d.t4rClick=!0}.bind(this),o),a._eventBus.subscribe("AD_T4R_VIDEO",function(){t(this,l),d.t4rVideo=!0}.bind(this),o),a._eventBus.subscribe("AD_CLICK",function(){t(this,l),d.click=!0}.bind(this),o),a._eventBus.subscribe("AD_BIDDER",function(e){t(this,l),d.bidder=null==e?void 0:e.bidder}.bind(this),o),a._eventBus.subscribe("AD_T4R_NONE",function(e){t(this,l),d.fail_reason=null==e?void 0:e.reason}.bind(this),o),e.prev=14,e.next=17,a._adInstance.startAd(i);case 17:e.next=23;break;case 19:e.prev=19,e.t0=e.catch(14),ko("gd-adflow startAd error",e.t0),n({success:!1,err:e.t0});case 23:case"end":return e.stop()}}),e,this,[[14,19]])})));return function(e,t){return n.apply(this,arguments)}}()));case 1:case"end":return n.stop()}}),n)}))),function(e){return i.apply(this,arguments)})},{key:"_getAdFlow",value:function(e){var n,r,i,a,s,o,d,u,c=this,l=void function(){if(t(this,c),xo.customAdFlow)return JSON.parse(xo.customAdFlow)}.bind(this),h=this._gameData.adflw;l&&(h=l);var p=null!==(n=h)&&void 0!==n&&null!==(r=n.adapters)&&void 0!==r&&r.default?null===(i=h)||void 0===i||null===(a=i.adapters)||void 0===a?void 0:a.default:["ima","adsense"];return p=null!==(s=h)&&void 0!==s&&null!==(o=s.adapters)&&void 0!==o&&o[e]?null===(d=h)||void 0===d||null===(u=d.adapters)||void 0===u?void 0:u[e]:p}},{key:"_sendTabChange",value:function(e){var n=this;if("tab-invisible"===e&&this._adSession){var r=this._adSession;r.tabState=e,this.eventBus.subscribe("STARTED",function(){t(this,n),"hidden"===document.visibilityState&&(r.tabState=r.tabState+"-STARTED",cT("ad-session-tab",{adSession:r}))}.bind(this)),this.eventBus.subscribe("IMPRESSION",function(){t(this,n),"hidden"===document.visibilityState&&(r.tabState=r.tabState+"-IMPRESSION",cT("ad-session-tab",{adSession:r}))}.bind(this))}}},{key:"mute",value:function(){var e=this;this._muteRequested=!0,this._adInstance.mute().catch(function(n){t(this,e)}.bind(this))}},{key:"terminate",value:function(){var e=this;this._terminateRequested=!0,this._adInstance.terminate().catch(function(n){t(this,e)}.bind(this)),this._setAdRequestTimer()}}]),n}(),YT=new M,JT=["https://games.softgames.com","https://sg.gamedistribution.com","https://minigame-stg.aeriagames.jp","https://minigame.aeriagames.jp","https://html5.gamedistribution.com","http://localhost:3005","https://yjgames.gamedistribution.com","https://portal-staging-sgweb.gamedistribution.com/"];window.addEventListener("message",(function(e){var n=this,r=e.data,i=e.origin,a=e.source;if(JT.some(function(e){return t(this,n),e===i}.bind(this))&&(null==r||!r.__tcfapiCall)){var s=r.system;r.action;var o="aeriaExternalHostsConnector"===s;if("Softgames"===s)WT=a,(window.parent||window).postMessage(r,"*"),YT.emit("aeria-event",r);else if(o){WT&&WT.postMessage(r,"*");var d=window.parent||window;d&&d.postMessage(r,"*")}}}),!1);var XT="https://html5.gamedistribution.com",ZT="parent-data-request",$T="parent-data-response",eI=function(){function n(){R(this,n)}var i;return S(n,[{key:"init",value:function(e){var n=this;this._registerForDataRequests(e),this._askForParentFrameData().then(function(r){if(t(this,n),r){var i=r.adRequestTimer;e.adRequestTimer=i,yo("gd-frame-data-bridge, adRequestTimer on init ",e.adRequestTimer)}}.bind(this))}},{key:"_registerForDataRequests",value:function(e){var n=this;window.addEventListener("message",function(r){t(this,n);var i=r.data,a=r.origin,s=r.source,o=i.type;if(i.value,a===XT&&o===ZT){var d={adRequestTimer:e.adRequestTimer};s.postMessage({type:$T,value:d})}}.bind(this))}},{key:"_askForParentFrameData",value:(i=e(r.mark((function e(){var n=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(e,r){var i=this;t(this,n);var a=!1;window.addEventListener("message",(function(t){var n=t.data,r=t.origin;t.source;var i=n.type,s=n.value;r===XT&&i===$T&&(e(s),a=!0)})),setTimeout(function(){t(this,i),a||e()}.bind(this),1e3);var s={type:ZT};window.parent.postMessage(s,"*")}.bind(this)));case 1:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})}]),n}(),tI=new eI,nI={SDKExistsOnUpperFrame:!1};function rI(){return iI.apply(this,arguments)}function iI(){return(iI=e(r.mark((function e(){var t,n;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,t=["https://pm.azerioncircle.com/p/gd-blck-rmv/"],e.next=4,m(t[0],"blckrmv",{alternates:t});case 4:return n=window.GD_BLCK_RMV||{},console.log("new blocker",n),e.abrupt("return",n.AdBlockerPage);case 9:e.prev=9,e.t0=e.catch(0),console.log("new blcoker error => ",e.t0.message);case 12:case"end":return e.stop()}}),e,null,[[0,9]])})))).apply(this,arguments)}function aI(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 sI(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?aI(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):aI(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var oI=function(){wo("gtag: GA not initialized",arguments)};function dI(e){return uI.apply(this,arguments)}function uI(){return uI=e(r.mark((function e(i){var a,s,o,d,u,c,l,h,p,f,v,g,A=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=i.onError,s=i.args,d="gdSDKDataLayer",u="https://www.googletagmanager.com/gtag/js?id=".concat(o="G-PLRTBHGSEL","&l=").concat(d),c=[u],e.prev=5,e.next=8,m(c[0],"gdsdk_google_analytics",{alternates:c,error_prefix:"Blocked:",exists:function(){return t(this,A),window[d]}.bind(this)});case 8:return window[d]=window[d]||[],oI=function(){window[d].push(arguments)},oI("js",new Date),e.next=14,z();case 14:return l=e.sent,h=l.lookupIabConsent,p=l.getGoogleAdType,e.next=19,h();case 19:f=e.sent,v=p(f.consentData),g=sI(sI({},g=s||{}),{},{cookie_flags:"SameSite=None;Secure",cmp:f.result,gdpr:"ok"===f.result?"object"===n(f.consentData)?!0===f.consentData.gdprApplies:"N/A":f.result,google_ads:null==v?void 0:v.type}),oI("config",o,g),e.next=31;break;case 27:e.prev=27,e.t0=e.catch(5),ko("gtag: load GA error",e.t0),a&&a(e.t0);case 31:case"end":return e.stop()}}),e,this,[[5,27]])}))),uI.apply(this,arguments)}new I("https://securepubads.g.doubleclick.net/gampad/ads?env=vp&gdfp_req=1&output=xml_vast4&unviewed_position_start=1&correlator=3792570314314042&sz=640x480&url=https%3A%2F%2Fwww.gry.pl%2Fgra%2Fkings-and-queens-match&iu=%2F1015413%2FTNL_NS-18101700058%2FTNL_T-17110972893&description_url=https%3A%2F%2Fwww.gry.pl%2Fgra%2Fkings-and-queens-match&max_ad_duration=300000&cust_params=hb_uuid%3Dcefbef16-53a9-4f49-9d3b-13e47e1066ad%26hb_cache_id%3Dundefined%26tnl_paid%3D866%26tnl_pid%3DP-17110700559%26tnl_system%3D1%26tid%3DTNL_T-17110972893%26tnl_ad_type%3Dvideo_image%26tnl_asset_id%3Daeac8455b2024f25abfa943ec96aa749%26tnl_ad_pos%3Dpreroll%26nsid%3DTNL_NS-18101700058%26tnl_pt%3D22%26hb_cache_host%3Dprebid.adnxs.com%26hb_format%3Dvideo%26hb_size%3D0x0%26hb_pb%3D1.15%26hb_adid%3D259407b5792767%26hb_bidder%3Dimprovedigital%26hb_cache_host_improv%3Dprebid.adnxs.com%26hb_uuid_improvedigit%3Dcefbef16-53a9-4f49-9d3b-13e47e1066ad%26hb_format_improvedig%3Dvideo%26hb_size_improvedigit%3D0x0%26hb_pb_improvedigital%3D1.15%26hb_adid_improvedigit%3D259407b5792767%26hb_bidder_improvedig%3Dimprovedigital%26tnl_wog%3D0%26gdGameId%3Daeac8455b2024f25abfa943ec96aa749%26tnl_content_category%3Dpuzzle%26adaptor_order%3D0%26pbct%3D2%26tnl_test%3Da%26fp%3D0.9%26fpt%3D99%26bfa%3D1%26adsense%3D0&gdpr=1&gdpr_consent=CP6lKcgP6lKcgAcABBENApEsAP_gAEPgAAYgg1NV_H__bX9j8Xr1aft0eY1H99j7rsQxBhfJk-4FyDvW_JwXn2EyNA26pqYKmRIEuzZBIQFkHIDURUigSogVrSDMYkGMgTNIJ6BkgFMRY2dYCFxvmQlDMQIY5vp9d3d52D-9_dv83dziz8FHvzU5PmckcICdA58tDfl9bRCb-5IAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHs87_XU-9_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEQaoJIACgAHgAkABcADUAHAAUwAtgBmAD4AH4AYAAygBmgDkAHcAP8Ag4BHQCRAElAKiAXMAvQBfQDPgHUAPaAfYBEwCVQExAJnAUgApoBUgCuQFswLcAt0Bf4DBIGRgZIAywBmYDRgGrgNvAboA3wBywDtgHcgPFgfaB90EqASpAlhBLMEtIJbglxBLoEuwJfQTABMECYYExQJjgTJgmYCZwE0gJqATYgm2CbkE3gTfCCgEGoA8EADAFyAMEAtIQCAAAEAA0ADgAPAAyACwAI4AUAArgBbAEWAJcAX0A1ADVAHOAPIAfIBAwCDgEcAJ2AT-AoYCigF2AM4AbwA9AB8gENgIvAR6AkUBJYCVgEywJsAm0BS4CnwFhQLEAsUBdQC7gF5AMCgYeBiADFoGQgZGAyYBlwDPwGhANGAaYA1MBroDaAG3AN0AcEA6gB2ADuoHkgeUA96B8gHyhIG4ACAAFwAUABUADgAHgAQAAwgBkAGoAPAAiABMACqAG8APQAhIBDAESAI4ASwAmgBhgDLAGyAO-AewB8QD7AP0AgEBFwEYAI0AUEAqABVwC5gGKANoAbgA4gCRAE7AKHAUeApEBbAC5AF3gLzAYMAw0BkgDJwGcwNYA1kBuoDkwHLgPHDAUAAAgAGAAcABQAEUAJwAsABhADwAPYAhACIAEcAJgAVAArwBbAFyAOYA8ACGAESAIsAS4ApABWgDOAGpANkA4ABxgDnAHkAPwAgABGACTAE6AKKAUuArwCvgF2AL8AZwA2wBvADjgHNAOoAdkA9QB-wEJAIbARUAi8BHUCRAJFASXAloCXgE2AJ2AUJApECkgFigLRAXIAugBdwC9AGBAMPAYyAx6BkYGSAMnAZyAzwBoQDTAGtANdAboA6gB3AD3hAE8AAIABgAHAAUABFACcALAAYQA8AD2AIQAiABHACYAFcALcAcwB3AEMAIkARYAlwBSACtAGcANSAbIBwADjAHOAPIAfIA_ACAAEYAJNAToBOwCigFLgK8Ar4BdgC_AGcANQAbYA3gBxwDmgHZAPUAfIA_YCEgENgIvAR3AkQCRQElwJaAl4BNgCdgFCAKSgWIBYoC0QFyALoAXcAvQBgQDDwGMgMeAZIAycBnIDQgGmANaAa6A3QB1ADuAHvCgEYAIoAVABYAEIAJgAXAA8ACOAFIANQAcABHACiwFeAV8AuwBnADeAHNAOyAfsBHoCRQEvAJsAWKAtEBbAC7gF6AMPAZyAzwBoQDWoGuga8A94YAgABFACoALAAhABMAEcAKQAagA4ACOAFFgK8Ar4BdgDOAG8AOaAdkA_YCPQEvAJsAWiAtgBdwC9AGHgM5AZ4A0IBrQDXQHvAPiHAXoADAARAA4ADwALgAZABYADmAHwAfgBHACaAFAAKYAVwAtgBfADQAIQARYAjgBLgCkAFkAL4AYUAzQDOAGoAOcAdwA8gB8wEAAQOAg4CEAERAI4ATgAncBPgE_AKKAUsAqABWQC7AF6AM4AbwA44B0gD0AHyAQ2AiIBFQCPQEigJLASsAmIBMsCbAJtAUgApMBS4CqgFiALUAWzAugC6gF3AL6AYFAxADEwGLAMhAZNAy4DLwGfgNCAaNA0wDTQGpwNdA2ABtADbgHHgOWAc-A7AB3EDyQPKAekA94B8QD5QH2gPxHQRQAFwAUABUADgAIAAXQAwADUAHgARAAmABVgC4ALoAYgAzABvAD1AIYAiQBLACaAFGAMMAZQA0QBsgDvAHtAPsA_QB_wEWARgAoIBVwCxAFzALyAYoA2gBuADiAHUAReAkQBMgCdgFDgKPAU0AsUBbAC4AFyALtAXeAvMBgwDDQGPAMkAZOAyoBlgDOQGiANVAawA3UBxYDkwHLgPHAfWQAXAAIAAyACwAJoAXwA0ACkAFlALkAvgBnADUAHOARwAnABPoChgKKAUsArIBYgC0gF2AN4Ac0A7IB6AEewJsAm0BSYCxAFtALuAXkAwIBiUDPAM_AaEA1MBroDYAG3AOfAdGA7CB5IHlAPeAfEQgPAALAAoAC4AGIATAAqgBcADEAG8APQAjgB3gD_AJSAUEAq4BcwDFAG0AOoApoBYoC0QFwALkAZOAzkBogDVQHjkgF4ABgAHAAXAAyACwAHIARwAmgBUAC-AGQANoAeABCACkAFkAM6AagBqgDuAIAARyApoCoAFZALSAXYA3gB8gEVAI6AR6AkUBKwCWoE2ATaApMBVICxAF3AMWAZZAzwDPwGhANdAbAA7AB5QD3iUB0ABAACwAKAAcgBgAGIAPAAiABMACqAFwAMUAhgCJAEcAKMAbIA7wB-AFXAMUAdQBF4CRAFHgLFAWwAvMBk4DOQGsFIFwAC4AKAAqABwAEEAMAA1AB4AEQAJgAUgAqgBiADNAIYAiQBRgDKAGiANkAd8A_AD9AIsARgAoIBVwC5gF5AMUAbQA3ACLwEiAJ2AUOAsUBbAC4AFyALtAXmAw0BkgDJwGcwNYA1kBuoDkwHjlAIgAFwAMgAsAByAEcAJoAVAAvgBkADaAHgAQgAiwBHACZAFIALIAXwAwgBnQDUANUAc4A7oB8gH2AQAAjgBIgCdgFDAKXAVkBWwCxQF1AXYA14BvADtgHoAP-AjoBHoCRQElgJigTYBNoCkAFPgLEAXQAu4BeQC-gGBAMWAZMAy6BngGfgNCAaJA1IDU4GugbAA4IB0wDsAHcAPKAe8A-IB8oA.f_wACHwAAAAA&plcmt=1&vpmute=1&vpa=auto&sdkv=h.3.633.0&osd=2&frm=2&vis=1&sdr=1&hl=en&afvsz=200x200%2C250x250%2C300x250%2C336x280%2C450x50%2C468x60%2C480x70&is_amp=1&uach=WyJtYWNPUyIsIjE0LjQuMSIsImFybSIsIiIsIjEyMy4wLjYzMTIuMTIyIixudWxsLDAsbnVsbCwiNjQiLFtbIkdvb2dsZSBDaHJvbWUiLCIxMjMuMC42MzEyLjEyMiJdLFsiTm90OkEtQnJhbmQiLCI4LjAuMC4wIl0sWyJDaHJvbWl1bSIsIjEyMy4wLjYzMTIuMTIyIl1dLDBd&u_so=p&ctv=0&sdki=445&ptt=20&adk=2541783110&sdk_apis=2%2C7%2C8&omid_p=Google1%2Fh.3.633.0&sid=E657451B-8F2F-4921-A55A-21D1A6F3C39E&nel=1&eid=44777649%2C44781409%2C44785452%2C95321947%2C95322027%2C95323893%2C95324128%2C95324210%2C95326337&ref=https%3A%2F%2Fwww.gry.pl%2F&top=https%3A%2F%2Fwww.gry.pl%2F&loc=https%3A%2F%2Fhtml5.gamedistribution.com%2Faeac8455b2024f25abfa943ec96aa749%2F%3Ftimestamp%3D1713336375%26countryCode%3Dpl%26siteid%3D88%26channelid%3D1%26siteLocale%3Dpl%26locale%3Dpl%26gd_sdk_referrer_url%3Dhttps%253A%252F%252Fwww.gry.pl%252Fgra%252Fkings-and-queens-match&dlt=1713336379046&idt=2621&dt=1713336390920&scor=3473667703821297&ged=ve4_td12_tt10_pd12_la2000_er0.0.156.300_vi0.0.600.510_vp100_eb24427",!0),new I("https://securepubads.g.doubleclick.net/gampad/ads?env=vp&gdfp_req=1&output=xml_vast4&unviewed_position_start=1&correlator=2275053868608838&sz=640x480&url=https%3A%2F%2Fwww.gry.pl%2Fgra%2Fkings-and-queens-match&iu=%2F1015413%2FTNL_NS-18101700058%2FTNL_T-17110972893&description_url=https%3A%2F%2Fwww.gry.pl%2Fgra%2Fkings-and-queens-match&max_ad_duration=300000&vpa=auto&vpmute=0&plcmt=1&cust_params=tnl_paid%3D866%26tnl_pid%3DP-17110700559%26tnl_system%3D1%26tid%3DTNL_T-17110972893%26tnl_ad_type%3Dvideo_image%26tnl_asset_id%3Daeac8455b2024f25abfa943ec96aa749%26tnl_ad_pos%3Dpreroll%26nsid%3DTNL_NS-18101700058%26tnl_pt%3D22%26gd_opus%3D1%26fp%3D0.9%26gd_np%3D1%26bfa%3D1%26fpt%3D99%26tnl_wog%3D0&sdkv=h.3.633.0&osd=2&frm=0&vis=1&sdr=1&hl=en&afvsz=200x200%2C250x250%2C300x250%2C336x280%2C450x50%2C468x60%2C480x70&is_amp=0&uach=WyJtYWNPUyIsIjE0LjQuMSIsImFybSIsIiIsIjEyMy4wLjYzMTIuMTIyIixudWxsLDAsbnVsbCwiNjQiLFtbIkdvb2dsZSBDaHJvbWUiLCIxMjMuMC42MzEyLjEyMiJdLFsiTm90OkEtQnJhbmQiLCI4LjAuMC4wIl0sWyJDaHJvbWl1bSIsIjEyMy4wLjYzMTIuMTIyIl1dLDBd&u_so=p&ctv=0&gdpr=1&gdpr_consent=CP6lKcgP6lKcgAcABBENApEsAP_gAEPgAAYgg1NV_H__bX9j8Xr1aft0eY1H99j7rsQxBhfJk-4FyDvW_JwXn2EyNA26pqYKmRIEuzZBIQFkHIDURUigSogVrSDMYkGMgTNIJ6BkgFMRY2dYCFxvmQlDMQIY5vp9d3d52D-9_dv83dziz8FHvzU5PmckcICdA58tDfl9bRCb-5IAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHs87_XU-9_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEQaoJIACgAHgAkABcADUAHAAUwAtgBmAD4AH4AYAAygBmgDkAHcAP8Ag4BHQCRAElAKiAXMAvQBfQDPgHUAPaAfYBEwCVQExAJnAUgApoBUgCuQFswLcAt0Bf4DBIGRgZIAywBmYDRgGrgNvAboA3wBywDtgHcgPFgfaB90EqASpAlhBLMEtIJbglxBLoEuwJfQTABMECYYExQJjgTJgmYCZwE0gJqATYgm2CbkE3gTfCCgEGoA8EADAFyAMEAtIQCAAAEAA0ADgAPAAyACwAI4AUAArgBbAEWAJcAX0A1ADVAHOAPIAfIBAwCDgEcAJ2AT-AoYCigF2AM4AbwA9AB8gENgIvAR6AkUBJYCVgEywJsAm0BS4CnwFhQLEAsUBdQC7gF5AMCgYeBiADFoGQgZGAyYBlwDPwGhANGAaYA1MBroDaAG3AN0AcEA6gB2ADuoHkgeUA96B8gHyhIG4ACAAFwAUABUADgAHgAQAAwgBkAGoAPAAiABMACqAG8APQAhIBDAESAI4ASwAmgBhgDLAGyAO-AewB8QD7AP0AgEBFwEYAI0AUEAqABVwC5gGKANoAbgA4gCRAE7AKHAUeApEBbAC5AF3gLzAYMAw0BkgDJwGcwNYA1kBuoDkwHLgPHDAUAAAgAGAAcABQAEUAJwAsABhADwAPYAhACIAEcAJgAVAArwBbAFyAOYA8ACGAESAIsAS4ApABWgDOAGpANkA4ABxgDnAHkAPwAgABGACTAE6AKKAUuArwCvgF2AL8AZwA2wBvADjgHNAOoAdkA9QB-wEJAIbARUAi8BHUCRAJFASXAloCXgE2AJ2AUJApECkgFigLRAXIAugBdwC9AGBAMPAYyAx6BkYGSAMnAZyAzwBoQDTAGtANdAboA6gB3AD3hAE8AAIABgAHAAUABFACcALAAYQA8AD2AIQAiABHACYAFcALcAcwB3AEMAIkARYAlwBSACtAGcANSAbIBwADjAHOAPIAfIA_ACAAEYAJNAToBOwCigFLgK8Ar4BdgC_AGcANQAbYA3gBxwDmgHZAPUAfIA_YCEgENgIvAR3AkQCRQElwJaAl4BNgCdgFCAKSgWIBYoC0QFyALoAXcAvQBgQDDwGMgMeAZIAycBnIDQgGmANaAa6A3QB1ADuAHvCgEYAIoAVABYAEIAJgAXAA8ACOAFIANQAcABHACiwFeAV8AuwBnADeAHNAOyAfsBHoCRQEvAJsAWKAtEBbAC7gF6AMPAZyAzwBoQDWoGuga8A94YAgABFACoALAAhABMAEcAKQAagA4ACOAFFgK8Ar4BdgDOAG8AOaAdkA_YCPQEvAJsAWiAtgBdwC9AGHgM5AZ4A0IBrQDXQHvAPiHAXoADAARAA4ADwALgAZABYADmAHwAfgBHACaAFAAKYAVwAtgBfADQAIQARYAjgBLgCkAFkAL4AYUAzQDOAGoAOcAdwA8gB8wEAAQOAg4CEAERAI4ATgAncBPgE_AKKAUsAqABWQC7AF6AM4AbwA44B0gD0AHyAQ2AiIBFQCPQEigJLASsAmIBMsCbAJtAUgApMBS4CqgFiALUAWzAugC6gF3AL6AYFAxADEwGLAMhAZNAy4DLwGfgNCAaNA0wDTQGpwNdA2ABtADbgHHgOWAc-A7AB3EDyQPKAekA94B8QD5QH2gPxHQRQAFwAUABUADgAIAAXQAwADUAHgARAAmABVgC4ALoAYgAzABvAD1AIYAiQBLACaAFGAMMAZQA0QBsgDvAHtAPsA_QB_wEWARgAoIBVwCxAFzALyAYoA2gBuADiAHUAReAkQBMgCdgFDgKPAU0AsUBbAC4AFyALtAXeAvMBgwDDQGPAMkAZOAyoBlgDOQGiANVAawA3UBxYDkwHLgPHAfWQAXAAIAAyACwAJoAXwA0ACkAFlALkAvgBnADUAHOARwAnABPoChgKKAUsArIBYgC0gF2AN4Ac0A7IB6AEewJsAm0BSYCxAFtALuAXkAwIBiUDPAM_AaEA1MBroDYAG3AOfAdGA7CB5IHlAPeAfEQgPAALAAoAC4AGIATAAqgBcADEAG8APQAjgB3gD_AJSAUEAq4BcwDFAG0AOoApoBYoC0QFwALkAZOAzkBogDVQHjkgF4ABgAHAAXAAyACwAHIARwAmgBUAC-AGQANoAeABCACkAFkAM6AagBqgDuAIAARyApoCoAFZALSAXYA3gB8gEVAI6AR6AkUBKwCWoE2ATaApMBVICxAF3AMWAZZAzwDPwGhANdAbAA7AB5QD3iUB0ABAACwAKAAcgBgAGIAPAAiABMACqAFwAMUAhgCJAEcAKMAbIA7wB-AFXAMUAdQBF4CRAFHgLFAWwAvMBk4DOQGsFIFwAC4AKAAqABwAEEAMAA1AB4AEQAJgAUgAqgBiADNAIYAiQBRgDKAGiANkAd8A_AD9AIsARgAoIBVwC5gF5AMUAbQA3ACLwEiAJ2AUOAsUBbAC4AFyALtAXmAw0BkgDJwGcwNYA1kBuoDkwHjlAIgAFwAMgAsAByAEcAJoAVAAvgBkADaAHgAQgAiwBHACZAFIALIAXwAwgBnQDUANUAc4A7oB8gH2AQAAjgBIgCdgFDAKXAVkBWwCxQF1AXYA14BvADtgHoAP-AjoBHoCRQElgJigTYBNoCkAFPgLEAXQAu4BeQC-gGBAMWAZMAy6BngGfgNCAaJA1IDU4GugbAA4IB0wDsAHcAPKAe8A-IB8oA.f_wACHwAAAAA&sdki=445&ptt=20&adk=1748861338&sdk_apis=2%2C7%2C8&omid_p=Google1%2Fh.3.633.0&media_url=blob%3Ahttps%253a%2F%2Fwww.gry.pl%2Ffa4fae4b-f435-43b4-9cee-af65696fe59e&sid=D3F4C4E1-4002-4BEE-A1F2-2638CD3B9197&a3p=EloKDWNyd2RjbnRybC5uZXQSQGE0MmZkMWJkNGI5MjgyOTY5NzUxNDUyYzVlNmUxNmQ1MzkzODYxY2E5Y2U2MGUzNjk3Y2ZlNTExMTQxYjFhZjgYucX8se4xSAASxgEKCHJ0YmhvdXNlEqwBWVNmZ3hFVno0OXBMOFI2c3ltSWtSdUFNdFg4d2Y0clBkdVMwTlVuLzZpUnhJZWh0cnRjVUtLSjFraHJDQWZERmp1N1pDNHJEc1lxMkduKzJFTFMxRmgzWlEzTUxaK0owbXZoTDR4UFlNc2JUbmlGNkczTWRaZjZQK3hEVVkwTU1FUlpkZzlKMjArcjlQNUtQOFBmWVhMaEkwRitGMUNhYUNwQS9aRVNNMVNnPRjBxfyx7jFIAFICCGoSGQoKdWlkYXBpLmNvbRjDz9ay7jFIAFICCGQSPgoFb3BlbngSLGV5SnBJam9pZEZoNU5XbDNSakZUT0ZjNVoxTlZRbFl5YWtRemR6MDlJbjA9GJ3I_LHuMUgA&nel=1&eid=44776494%2C44777649%2C44781409%2C95321947%2C95322027%2C95323893%2C95324128%2C95324210%2C95326337&top=https%3A%2F%2Fwww.gry.pl%2Fgra%2Fkings-and-queens-match&loc=https%3A%2F%2Fwww.gry.pl%2Fgra%2Fkings-and-queens-match&dt=1713336184147&cookie=ID%3Da17ef48e823e6627%3AT%3D1709727355%3ART%3D1713335981%3AS%3DALNI_MY20KDMmAY5MP3sMYIZndoHFyvxhg&gpic=UID%3D00000d6b0028013d%3AT%3D1709727355%3ART%3D1713335981%3AS%3DALNI_MZ7af9EvfEMcTpwOjK9LSfd-RfFCQ&scor=3968881391553945&ged=ve4_td21_tt0_pd21_la21000_er271.162.427.462_vi0.0.873.1064_vp100_eb24171",!0);var cI,lI=function(e){var n=this,r=e.handler,i=e.timeout,a=e.interval,s=r||function(){return t(this,n),!0}.bind(this),o=i||1e3,d=a||10;return new Promise(function(e,i){var a=this;if(t(this,n),r())e(!0);else{var u=!1,c=setInterval(function(){t(this,a);try{s()&&(clearInterval(c),u=!0,e(!0))}catch(t){clearInterval(c),e(!1)}}.bind(this),d);setTimeout(function(){t(this,a),clearInterval(c),u||e(!1)}.bind(this),o)}}.bind(this))},hI=function(){var n=e(r.mark((function e(n){var i,a,s,o,d=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=n.topic,a=n.args,e.next=3,Lw();case 3:if(s=e.sent,o=s.console_logs,o&&o.allowed.some(function(e){return t(this,d),e===i}.bind(this))){e.next=8;break}return e.abrupt("return");case 8:console.log({topic:i,args:a});case 9:case"end":return e.stop()}}),e,this)})));return function(e){return n.apply(this,arguments)}}();function pI(){return fI.apply(this,arguments)}function fI(){return fI=e(r.mark((function e(){var t,n;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!cI){e.next=2;break}return e.abrupt("return",cI);case 2:return e.next=4,z();case 4:return t=e.sent,n=t.lookupIabConsent,t.getGoogleAdType,e.next=9,n();case 9:return cI=e.sent,e.next=12,hI({topic:"cmp-decoded",args:{key:"[consent-check] cmp-decoded",cmp:cI}});case 12:return e.abrupt("return",cI);case 13:case"end":return e.stop()}}),e)}))),fI.apply(this,arguments)}function mI(){return vI.apply(this,arguments)}function vI(){return vI=e(r.mark((function e(){var n,i,a,s,o,d,u,c,l,h,p,f,m,v=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,pI();case 2:if(s=e.sent,(o=(null==s?void 0:s.consentData)||{}).gdprApplies){e.next=7;break}return wo("[consent-check] gdprApplies=false"),e.abrupt("return",!1);case 7:return d=(null===(n=o.purpose)||void 0===n?void 0:n.consents)||{},u=(null===(i=o.vendor)||void 0===i?void 0:i.consents)||{},c=(null===(a=o.publisher)||void 0===a?void 0:a.consents)||{},l=function(e){return t(this,v),0===Object.keys(e).length}.bind(this),h=l(d),p=l(u),f=l(c),wo("[consent-check]",{fullyRejected:m=h&&p&&f,emptyPurpose:h,emptyVendor:p,emptyPublisher:f}),e.abrupt("return",m);case 17:case"end":return e.stop()}}),e,this)}))),vI.apply(this,arguments)}function gI(){return AI.apply(this,arguments)}function AI(){return AI=e(r.mark((function e(){var t,n,i,a,s;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,pI();case 2:if(a=e.sent,(s=(null==a?void 0:a.consentData)||{}).gdprApplies){e.next=6;break}return e.abrupt("return",!1);case 6:return null===(t=s.purpose)||void 0===t||t.consents,null===(n=s.vendor)||void 0===n||n.consents,null===(i=s.publisher)||void 0===i||i.consents,e.abrupt("return",!1);case 11:case"end":return e.stop()}}),e)}))),AI.apply(this,arguments)}function bI(){return _I.apply(this,arguments)}function _I(){return(_I=e(r.mark((function e(){var t,n,i,a;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Lw();case 3:if(t=e.sent,null!=(n=t.disable_ads_by_cmp)&&n.enabled){e.next=8;break}return wo("[consent-check] returned by no rule",n),e.abrupt("return",!1);case 8:if(i="all-rejected"===(null==n?void 0:n.mode),e.t0=i,!e.t0){e.next=14;break}return e.next=13,mI();case 13:e.t0=e.sent;case 14:if(!e.t0){e.next=17;break}return wo("[consent-check] fully rejected"),e.abrupt("return",!0);case 17:if(a="some-rejected"===(null==n?void 0:n.mode),e.t1=a,!e.t1){e.next=23;break}return e.next=22,gI();case 22:e.t1=e.sent;case 23:if(!e.t1){e.next=26;break}return wo("[consent-check] partially rejected"),e.abrupt("return",!0);case 26:e.next=31;break;case 28:e.prev=28,e.t2=e.catch(0),ko("[consent-check] error on checkIfAdsDisabledByConsent",e.t2.message);case 31:return e.abrupt("return",!1);case 32:case"end":return e.stop()}}),e,null,[[0,28]])})))).apply(this,arguments)}function yI(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 wI(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?yI(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yI(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var kI=Q(),xI=null,EI=null,DI=function(){function n(e){var r,i,a,s,o=this;if(R(this,n),T(this,"_whichFrameV2",function(){var e=this;t(this,o);var n=I(window.location.href,!0),r=n.host,i=n.query,a="html5.gamedistribution.com"!==r,s=function(n){return t(this,e),"revision.gamedistribution.com"===n||"uncached-html5.gamedistribution.com"===n}.bind(this),d=s(r);null!=i&&i.gd_sdk_referrer_url&&(d=s(I(i.gd_sdk_referrer_url).host));return this._isMasterGameURL()&&!(this._isTokenGameURL()||a)||d?"loader-frame":"game-frame"}.bind(this)),xI)return xI;xI=this,this.isOpusReady=!1,this.isMidrollPlusExecuted=!1,this.blockedAdsMap={},this.blockingDetectedKey="d8d9b9b63e704668a29559970c1818be",this._defaults=this._getDefaultOptions(),this._extendDefaultOptions(this._defaults,e),this._version=e.version||"0.0.0",this._bridge=this._getBridgeContext(),this._location=new Cy,this._location.print();var d=this._location.get(),u=(null==d||null===(r=d.top)||void 0===r||null===(i=r.domain)||void 0===i?void 0:i.value)||(null==d||null===(a=d.partner.domain)||void 0===a?void 0:a.value),c=null==d||null===(s=d.partner.url)||void 0===s?void 0:s.value;this._parentURL=0===this._bridge.depth?encodeURIComponent(this._bridge.parentURL):this._bridge.parentURL,this._parentURL=this._parentURL||c,this._parentDomain=this._bridge.parentDomain,this._topDomain=this._bridge.topDomain,this._topDomain=this._topDomain||u,yo("locs found:",this._topDomain,this._parentURL),this._isFullScreen=!1,this._giftCount={preroll:0,midroll:0,rewarded:0},this._mplus_count=0,Yw({whichFrame:this._whichFrameV2(),options:{showAd:this.showAd.bind(this),onEvent:this._onEvent.bind(this)}}),this._setConsoleBanner(),this._initializeMessageRouter(),this._checkConsole(),this._subscribeToEvents(),this.sdkReady=new Promise(this._initializeSDKWithGameData.bind(this)),this.sdkReady.then(function(e){t(this,o),this._sdk_ready=!0}.bind(this)).catch(function(e){t(this,o),this._sdk_ready=!1}.bind(this)).finally(function(){var e,n,r,i,a=this;if((t(this,o),null===(e=this._gameData)||void 0===e||null===(n=e.directTokenUse)||void 0===n?void 0:n.enabled)&&this._blockDirectTokenURLEmbedding().blocked)return;this.dumper=new mR({msgrt:this.msgrt,gameData:this._gameData,parentDomain:this._parentDomain,parentURL:this._parentURL,topDomain:this._parentURL}),this.dumper,this._initGameSessionTracking(),this._sendLoadedEvent(2),!0===(null===(r=this._gameData.lp)||void 0===r?void 0:r.load)&&this._sendLoadedEvent(1),this._sendLoaderDataEvent(),this._checkSplashAndPromoScreens(),this._initBlockingExternals(),this._initUnityHandler(),this._checkFullscreen(),null!==(i=this._gameData.evnts)&&void 0!==i&&i.enabled&&this._isLoaderGameURL()&&(!function(e){var n=this;if(!window[HR]){var r=zR("https://static.gamedistribution.com/message/index.html",HR);if(document.body.appendChild(r),window!==window.top){var i=[WR(e,"TokenGenerated"),WR(e,"PageLoaded")];r.onload=function(){var e=this;return t(this,n),i.forEach(function(n){return t(this,e),XR(n)}.bind(this))}.bind(this),KR(e)}window.addEventListener("message",function(e){return t(this,n),YR(e)}.bind(this),!1)}}(this._gameData),this._gameData.evnts.gameId===this.options.gameId&&setInterval(function(){t(this,a),this._send_gametag_data("heartbeat")}.bind(this),1e3*this._gameData.evnts.heartbeatDuration)),tI.init(this),this._send_gametag_data("sdk_init"),this.fixScore(),this._stableAdFlowForTest(),hk({onEvent:function(e){t(this,a);var n=e.name,r=e.data;(this._onEvent({name:n,message:"In Game Store : ".concat(n),status:"success",data:r,isStoreEvent:!0}),"STORE_UI_VISIBILITY_CHANGED"===n)&&(r.visible?this.onPauseGame("In game store opened","success"):this.onResumeGame("In game store closed","success"))}.bind(this)})}.bind(this)),this._registerSGBridge(),yo("which-frame",this._whichFrame()),this._loadLocus()}var i,g,A,b,y,O,P,L,B,M,F,j,N,q,V,Q,z,W,K,Y,J,X;return S(n,[{key:"_stableAdFlowForTest",value:function(){try{(h.available&&h.getBoolean("gd_debug_ex")&&h.getBoolean("gd_tag")||lR().useTestAds)&&(this._gameData.adflw.adapters={default:["ima"],preroll:["ima"],midroll:["ima"],rewarded:["ima"]},console.log(this._gameData))}catch(e){console.log(e.message)}}},{key:"_getVisitorId",value:(X=e(r.mark((function e(){var n,i,a,s,o,d=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,lI({handler:function(){return t(this,d),!!EI}.bind(this),timeout:1e3,interval:10});case 2:return s=e.sent,o=s?null===(n=EI)||void 0===n||null===(i=n.visitor)||void 0===i||null===(a=i.visitorData)||void 0===a?void 0:a.visitorId:"noVisitorId",e.abrupt("return",o);case 5:case"end":return e.stop()}}),e,this)}))),function(){return X.apply(this,arguments)})},{key:"_initGameSessionTracking",value:(J=e(r.mark((function e(){var n,i,a,s,o,d,u,c,l,h,p,f,m,v,g,A,b,_,y,w,k,x,E,D,S,R,T,I,C,O,P,L=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null===(n=this._gameData)||void 0===n||null===(i=n.gs_trc)||void 0===i?void 0:i.enabled){e.next=3;break}return e.abrupt("return");case 3:return e.next=5,this._getVisitorId();case 5:p=e.sent,f=this._gameData,m=f.category,v=f.dname,g=f.pname,A=f.gameId,b=f.slug,_=f.title,y=f.ctry,w=f.failed,k=this._topDomain||this._parentDomain,x=new Cy,E=x.get(),D=this.msgrt._ua,S=document.referrer,R=this.msgrt._layout,T=Ao.version,I=(null===(a=this._gameData)||void 0===a||null===(s=a.hwei)||void 0===s?void 0:s.enabled)&&(null===(o=this._gameData)||void 0===o||null===(d=o.hwei)||void 0===d?void 0:d.gs.enabled),C=(null===(u=this._gameData)||void 0===u||null===(c=u.gft)||void 0===c?void 0:c.midroll.enabled)||!1,O=(null===(l=this._gameData)||void 0===l||null===(h=l.midroll_plus)||void 0===h?void 0:h.enabled)||!1,P={args:{rfr:S,category:m,dname:v,pname:g,gameId:A,slug:b,title:_,ctry:y,domain:k,loc:E,ua:D,layout:R,version:T,visitorId:p,hasGft:C,hasMp:O,failed:w,isHwp:I},onError:function(e){t(this,L),this._sendSDKError(e)}.bind(this)},oT(P);case 21:case"end":return e.stop()}}),e,this)}))),function(){return J.apply(this,arguments)})},{key:"_initUnityHandler",value:function(){var e=this;window.addEventListener("DOMNodeInserted",function(){if(t(this,e),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))}},{key:"_send_gametag_data",value:(Y=e(r.mark((function e(t){var n;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this._getGdModeIfExist()&&(n=c()||"web",this.adInstance._send("tg.created",{gmid:this.options.gameId,dvc:n,qint:t}));case 1:case"end":return e.stop()}}),e,this)}))),function(e){return Y.apply(this,arguments)})},{key:"_loadCMP",value:(K=e(r.mark((function e(){var t,n,i,a,s,o;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._isMasterGameURL()){e.next=12;break}if(i=new Cy,0!==(null==(a=i.get("depth"))?void 0:a.value)||null===(t=this._gameData)||void 0===t||null===(n=t.cmp)||void 0===n||!n.enabled){e.next=12;break}if(null===(s=this._gameData)||void 0===s||null===(o=s.cmp)||void 0===o||!o.checkDepthOnly){e.next=9;break}return e.next=7,LR();case 7:e.next=12;break;case 9:if("html5.gamedistribution.com"!==this._topDomain){e.next=12;break}return e.next=12,LR();case 12:case"end":return e.stop()}}),e,this)}))),function(){return K.apply(this,arguments)})},{key:"testConsent",value:function(){try{SR();e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,RR({});case 2:e.sent;case 3:case"end":return e.stop()}}),e)})))()}catch(e){console.log("find CMP error",e)}}},{key:"_sendLoaderDataEvent",value:function(){try{this.options.onLoaderEvent&&this.options.onLoaderEvent({name:"LOADER_DATA",message:{game:this._gameData,bridge:this._bridge},status:this._sdk_ready?"success":"error"})}catch(e){}}},{key:"_registerSGBridge",value:function(){var e=this;BR.on("splash-hidden",function(n){t(this,e),this._hideCMPButton()}.bind(this))}},{key:"_hideCMPButton",value:function(){var e=document.getElementById("ot-sdk-btn-floating");e&&(e.style.display="none")}},{key:"_sendLoadedEvent",value:function(e){if(this._isLoaded||(this._isLoaded={}),!this._isLoaded[e]){this._isLoaded[e]=!0;var t="loader-frame"===this._whichFrame()&&(this._isHostHTML5Domain()||this._isExternalHoster());I(location.href,!0);if(this._whichFrame(),this._isMasterGameURL(),this._isExtHostedGameURL(),this._isTokenGameURL(),this._isHostHTML5Domain(),this._isExternalHoster(),location.href,document.referrer,t)try{yo("which-frame, sending tunnel event",this._whichFrame()),this._sendTunnlEvent(e),this.msgrt.send("loaded",{message:this._hasBlocker?"Has Blocker":"No Blocker"})}catch(e){}}}},{key:"_sendGamedockGamePlay",value:function(){var e=this._isTokenGameURL();if(!(this._gameData.loader.enabled&&e||this._gameDockGamePlaySent))try{this._sendGamedockEvent("gameplay"),this._gameDockGamePlaySent=!0}catch(e){}}},{key:"_safeInit",value:function(){this._checkUserDeclinedTracking(),this._checkWhitelabelPartner();var e=this._gameData.diagnostic;void 0!==e&&void 0!==e.close_ga&&!1!==e.close_ga||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||(console.log("noMinijuegosSDK",!this._bridge.isCoreSDKMode,!this._bridge.noMinijuegosSDK,document.location.search.indexOf("mp_game_id")>=0),!this._bridge.isCoreSDKMode&&!this._bridge.noMinijuegosSDK&&document.location.search.indexOf("mp_game_id")>=0&&this._loadMiniJuegosGratisTracker())}},{key:"_initializeSDKWithGameData",value:(W=e(r.mark((function e(n,i){var a,s,o,d,u,c,l=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this._getGameData();case 3:return this._gameData=e.sent,e.next=6,this._loadCMP();case 6:return this._bridge.isCoreSDKMode=(null===(a=this._gameData.disableAds)||void 0===a?void 0:a.default)||!1,this._safeInit(),this._checkGameId(),this._checkGameDeleted(),this._checkBlocking(),this._changeMidrollInDebugMode(),d=void 0===this._gameData.diagnostic||void 0===(null===(s=this._gameData.diagnostic)||void 0===s?void 0:s.close_ads)||!1===(null===(o=this._gameData.diagnostic)||void 0===o?void 0:o.close_ads),e.next=15,bI();case 15:return u=e.sent,wo("[ad-system-init] allowed",{adSystemInitAllowed:c=d&&!u,notDisabledByModuleClose:d,disabledByConsent:u}),c&&(this.videoAdReady=this._initializeVideoAd().then(function(){t(this,l),(this._isMasterGameURL()||this._isExtHostedGameURL())&&(this.msgrt.send("adblocker.flw",{message:"ok"}),this.msgrt.send("adblocker.adapters",{message:"none"})),this._checkAdBlockerRemoval()}.bind(this)).catch(function(e){t(this,l);var n="".concat(e).startsWith("Error: Blocked:");wo("gd-adflow adsBlocked",n,e);var r=this.get_ad_system_init_result(),i=r.ima,a=r.afg;if(this.adsBlocked=!i&&!a,this._isMasterGameURL()||this._isExtHostedGameURL()){this.msgrt.send("adblocker.flw",{message:"".concat(this.adsBlocked?"blocked":"ok")});var s=i||a?i?a?"none":"adsense":"ima":"all";this.msgrt.send("adblocker.adapters",{message:"".concat(s)})}this._sendSDKError(e),this._checkAdBlocker(),console.error(e.message||e)}.bind(this))),e.next=21,ET();case 21:n(this._gameData),e.next=29;break;case 24:e.prev=24,e.t0=e.catch(0),this._sendSDKError(e.t0),this.onResumeGame(e.t0.message,"warning"),i(e.t0);case 29:case"end":return e.stop()}}),e,this,[[0,24]])}))),function(e,t){return W.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:"_checkAdBlockerRemoval",value:function(){h.getBoolean(this.blockingDetectedKey)&&(h.set(this.blockingDetectedKey,!1),this.send_atom_event("ad-blocker-removed"))}},{key:"_checkAdBlocker",value:(z=e(r.mark((function e(){var t,n,i,a,s;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,t=this.get_ad_system_init_result(),n=t.ima,i=t.afg,n&&i){e.next=12;break}if(h.set(this.blockingDetectedKey,!0),null===(a=this._gameData.rmblck)||void 0===a||!a.enabled){e.next=12;break}if(this.adBlockerPage){e.next=12;break}return e.next=9,rI();case 9:s=e.sent,this.adBlockerPage=new s(this._gameData),this.adBlockerPage.add();case 12:e.next=17;break;case 14:e.prev=14,e.t0=e.catch(0),console.log(e.t0.message);case 17:case"end":return e.stop()}}),e,this,[[0,14]])}))),function(){return z.apply(this,arguments)})},{key:"_extendDefaultOptions",value:function(e,t){var n=U(e);this.options=t?p(n,t):n,this.options.gameId=this.options.gameId.trim()}},{key:"_setConsoleBanner",value:function(){if(!this._bridge.noConsoleBanner){var e=Ao.version,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:"_shouldSendTunnlEvent",value:function(e){return this.tunnlEventCounts||(this.tunnlEventCounts={}),this.tunnlEventCounts[e]||(this.tunnlEventCounts[e]=0),this.tunnlEventCounts[e]++,1===this.tunnlEventCounts[e]}},{key:"_sendTunnlEvent",value:function(n){var i=this;e(r.mark((function e(){var a,s,o,d,u,c=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,nk();case 2:if(!(a=e.sent)){e.next=9;break}return e.next=6,a.isLoader();case 6:e.t0=e.sent,e.next=10;break;case 9:e.t0=!0;case 10:if(s=e.t0,o=a.hasRouter(),s||!o){e.next=15;break}return e.abrupt("return");case 15:if(i._shouldSendTunnlEvent(n)){e.next=17;break}return e.abrupt("return");case 17:void 0!==i._topDomain&&"undefined"!==i._topDomain||(i._topDomain=void 0),d=i._topDomain||i._parentDomain,u={page_url:d,game_id:i.options.gameId,eventtype:n,ts:Date.now()},fetch("https://hlana.gamedistribution.com/event?".concat(H.stringify(u))).catch(function(e){t(this,c),i._sendHLAnalyicsLog({query:wI(wI({},u),{},{error:null==e?void 0:e.message}),eventType:-n})}.bind(this)),i._sendHLAnalyicsLog({query:u,eventType:n}),i.adInstance._send_atom_event("hl.config",u),i._send_gametag_data("sdk_gameplay");case 24:case"end":return e.stop()}}),e,this)})))()}},{key:"_sendHLAnalyicsLog",value:function(e){var t,n=e.query,r=e.eventType;if(1===r?t="hl.gameplay":2===r?t="hl.gameload":3===r?t="hl.adblock":-1===r?t="hl.gameplay.error":-2===r?t="hl.gameload.error":-3===r&&(t="hl.adblock.error"),t)try{this.dumper.send_atom_event(t,n)}catch(e){console.log("Error on sending dump!",e)}}},{key:"_sendAdRequestContext",value:function(e){this.msgrt.send("adctx",{message:e.adTag.bidder})}},{key:"_checkWhitelabelPartner",value:function(){this._whitelabelPartner=!1;var e=d("xanthophyll");e.hasOwnProperty("xanthophyll")&&"true"===e.xanthophyll&&(this._whitelabelPartner=!0,f("White label publisher","".concat(this._whitelabelPartner),"success"))}},{key:"_checkRevisionOrigin",value:function(){var e=this;return[document.location.origin].concat(G(document.location.ancestorOrigins)).find(function(n){return t(this,e),"revision.gamedistribution.com"===I(n,!0).hostname}.bind(this))}},{key:"_checkConsole",value:function(){try{if(!h.available)return;if("developer.gamedistribution.com"===this._parentDomain||"developer.gamedistribution.com"===this._topDomain||"developer-acc.gamedistribution.com"===this._parentDomain||"developer-acc.gamedistribution.com"===this._topDomain)this._checkRevisionOrigin()&&(h.set("gd_debug_ex",!0),h.set("gd_disable_midroll_timer",!0),h.set("gd_tag",!0));else"localhost:3000"===this._parentDomain&&(h.set("gd_debug_ex",!0),h.set("gd_disable_midroll_timer",!0));h.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 l({gameId:this.options.gameId,hours:(new Date).getHours(),topDomain:this._topDomain,domain:this._parentDomain,referrer:this._parentURL,depth:o(),version:Ao.version,tracking:this._userDeclinedTracking,whitelabel:this._whitelabelPartner,platform:c(),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 e=this;try{var n=[this._gameData.gmky.url];m(n[0],"GamedockSDK",{alternates:n}).then(function(){var n,r,i,a;(t(this,e),EI=this._initGamedockTracker(window.GamedockSDK),this._sendGamedockEvent("pageview"),null!==(n=this._gameData.diagnostic)&&void 0!==n&&null!==(r=n.gameDock)&&void 0!==r&&r.adViewEvent)&&(null!==(i=this._gameData.diagnostic)&&void 0!==i&&null!==(a=i.gameDock)&&void 0!==a&&a.heartbeatEnable&&EI.tracking.enableHeartBeatForPage({pageId:this.options.gameId,pageType:"game"},this._gameData.diagnostic.gameDock.heartbeatConfig));TR.track(EI,this._gameData)}.bind(this)).catch(function(n){t(this,e),this._sendSDKError(n)}.bind(this))}catch(e){}}},{key:"_initGamedockTracker",value:function(e){if(!this._bridge.isCoreSDKMode)return e.initialize("gd",this._parentDomain)}},{key:"_sendGamedockEvent",value:function(e){var t,n;null===(t=EI)||void 0===t||null===(n=t.tracking)||void 0===n||n.trackEvent(e,{pageId:this.options.gameId,pageType:"game"})}},{key:"_loadMiniJuegosGratisTracker",value:function(){var e=this;window.mpConfig={game:this.options.gameId,partner:"game-distribution"};var n=["https://ext.minijuegosgratis.com/external-host/main.js"];console.log("noMinijuegosSDK loading"),m(n[0],"MinijuegosSDK",{alternates:n}).catch(function(n){t(this,e),this._sendSDKError(n)}.bind(this))}},{key:"_loadLocus",value:function(){var n=e(r.mark((function e(){var n,i=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,qw();case 2:if(e.sent){e.next=6;break}return console.log("locus-disabled"),e.abrupt("return");case 6:n=["https://pm.azerioncircle.com/p/locus/"],window.gdlocus=window.gdlocus||{cmd:[]},window.gdlocus.cmd.push(function(){t(this,i),this.isOpusReady=!0,window.gdlocus.iservice.register({method:"muteAdFlow",handler:this._muteFlowSound.bind(this)}),window.gdlocus.iservice.register({method:"terminateAdFlow",handler:this._terminateFlow.bind(this)})}.bind(this)),m(n[0],"locus",{alternates:n}).catch(function(e){t(this,i),this._sendSDKError(e)}.bind(this)).then(function(){t(this,i)}.bind(this));case 10:case"end":return e.stop()}}),e,this)})));return function(){return n.apply(this,arguments)}}()},{key:"_muteFlowSound",value:(Q=e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._adFlow){e.next=2;break}return e.abrupt("return");case 2:this._adFlow.mute();case 3:case"end":return e.stop()}}),e,this)}))),function(){return Q.apply(this,arguments)})},{key:"_terminateFlow",value:(V=e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._adFlow){e.next=2;break}return e.abrupt("return");case 2:this._adFlow.terminate();case 3:case"end":return e.stop()}}),e,this)}))),function(){return V.apply(this,arguments)})},{key:"_loadGoogleAnalytics",value:function(){var e=this;if(!this._bridge.isCoreSDKMode){var n=this._gameData,r=n.gameId,i=n.slug,a=n.title,s=new Cy,o={provider:"gd-sdk",page_depth:s.get("depth.value"),partner_domain_from:s.get("partner.domain.from"),top_domain_from:s.get("top.domain.from"),top_domain:this._topDomain,parent_domain:this._parentDomain,parent_url:this._parentURL,game_id:r,game_slug:i,game_title:a};dI({onError:function(n){t(this,e),this._sendSDKError(n)}.bind(this),args:o})}}},{key:"_getCleanUrl",value:function(e){var t=e;try{var n=new I(e,!0);t="".concat(n.protocol,"//").concat(n.hostname,"/").concat(n.pathname)}catch(e){}return t}},{key:"_subscribeToEvents",value:function(){var e=this;this.eventBus=new _,w.forEach(function(n){var r=this;return t(this,e),this.eventBus.subscribe(n,function(e){return t(this,r),this._onEvent(e)}.bind(this),"sdk")}.bind(this)),k.forEach(function(n){var r=this;return t(this,e),this.eventBus.subscribe(n,function(e){return t(this,r),this._onEvent(e)}.bind(this),"ima")}.bind(this)),this.eventBus.subscribe("COMPLETE",function(){t(this,e);var n=this._getDeveloperDomains(),r=n.developerDomain,i=n.gameApiDomain;if(r){fetch("https://".concat(i,"/game/v2/hasapi/").concat(this.options.gameId,"?timestamp=").concat((new Date).valueOf()));try{var a=JSON.stringify({type:"GD_SDK_IMPLEMENTED",gameID:this.options.gameId});window.location!==window.top.location?window.top.postMessage(a,"*"):null!==window.opener&&window.opener.location!==window.location&&window.opener.postMessage(a,"*")}catch(e){}}cR()}.bind(this),"ima"),this.eventBus.subscribe("CONTENT_PAUSE_REQUESTED",function(){return t(this,e),this.onPauseGame("New advertisements requested and loaded","success")}.bind(this),"ima"),this.eventBus.subscribe("IMPRESSION",function(n){var r,i;t(this,e),this.msgrt.send("ad.impression"),oR(),null!==(r=this._gameData.diagnostic)&&void 0!==r&&null!==(i=r.gameDock)&&void 0!==i&&i.adViewEvent&&TR.track(EI,this._gameData)}.bind(this),"ima"),this.eventBus.subscribe("AD_ERROR",function(n){t(this,e),this.msgrt.send("ad.error",{message:n.message,details:n.details})}.bind(this),"ima"),this.eventBus.subscribe("AD_SDK_REQUEST",function(n){t(this,e),this._sendAdRequestContext(n.message)}.bind(this),"sdk"),this.eventBus.subscribe("SDK_ERROR",function(n){if(t(this,e),n.message.startsWith("Blocked:")){var r=n.message.replace("Blocked:","").trim(),i=this._getCleanUrl(r),a="Blocked: ".concat(i);if(!this._bridge.noBlockerEvent&&(this.msgrt.send("error",{message:a}),!this._hasBlocker)){this._hasBlocker=!0;this.msgrt.send("adblck.src",{message:a});var s=this.get_ad_system_init_result(),o=s.ima,d=s.afg;(!o||!d)&&this._sendTunnlEvent(3)}}else this.msgrt.send("error",{message:n.message})}.bind(this),"sdk"),this.eventBus.subscribe("AD_REQUEST_KEYS_EMPTY",function(n){t(this,e),this.msgrt.send("tunnl.keys.empty",{message:n.message,details:n.details})}.bind(this),"sdk"),this.eventBus.subscribe("AD_REQUEST_KEYS_FALLBACK",function(n){t(this,e),this.msgrt.send("tunnl.keys.fallback",{message:n.message,details:n.details})}.bind(this),"sdk"),this.eventBus.subscribe("AD_T4R",function(n){return t(this,e),this.msgrt.send("adt4r")}.bind(this),"sdk")}},{key:"_checkGameId",value:function(){this.options.gameId===this._defaults.gameId&&this._sendSDKError("Please check if your GAME ID is correct. Otherwise, no revenue will be reported.")}},{key:"_getDefaultGameData",value:function(){return{gameId:this.options.gameId,disableAds:{},preroll:!0,midroll:12e4,rewardedAds:!1,title:"",tags:[],category:"",assets:[],dmain:!0,sdk:{},loader:{},splash:{},promo:{},dAds:{},pAds:{},mAds:{},rAds:{}}}},{key:"_getGameDataUrl",value:function(){var e=void 0!==this._topDomain&&"undefined"!==this._topDomain?this._topDomain:this._parentDomain,t=aw().config;return"https://".concat(t.gameAPI,"/game/v4/get/").concat(this.options.gameId.replace(/-/g,""),"/?domain=").concat(e,"&v=").concat(Ao.version,"&localTime=").concat((new Date).getHours())}},{key:"_checkBlocking",value:(q=e(r.mark((function e(){var t,n,i;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=!0,n=this._gameData,i=this._parentDomain.indexOf("gamedistribution.com")>=0,t=(t=void 0===this._gameData.dmain||this._gameData.dmain)||i,(n.bloc_gard&&!0===n.bloc_gard.enabled||!t)&&this._redirectToBlocking(!1,!t);case 7:case"end":return e.stop()}}),e,this)}))),function(){return q.apply(this,arguments)})},{key:"_blockDirectTokenURLEmbedding",value:function(){var e,t,n=this._checkTokenGameUrl(),r=new Cy,i="html5.gamedistribution.com"!==I(document.referrer).host,a=n&&!nI.SDKExistsOnUpperFrame&&r.get("depth.value")>0&&i;if(a&&(null===(e=this._gameData)||void 0===e||null===(t=e.directTokenUse)||void 0===t?void 0:t.enabled)){var s,o,d=null===(s=this._gameData)||void 0===s||null===(o=s.directTokenUse)||void 0===o?void 0:o.behavior;"to-loader"===d?this._redirectToLoaderFrame():"to-blocked-page"===d&&this._redirectToBlocking(!0)}return{blocked:a}}},{key:"_redirectToBlocking",value:function(t){var n=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.msgrt.send("blocked");var a=this._gameData;setTimeout(e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t){e.next=9;break}return e.prev=1,e.next=4,n.adInstance._send_atom_event("token-blocked");case 4:e.next=9;break;case 6:e.prev=6,e.t0=e.catch(1),console.log("Could not send dump.token-blocked",e.t0);case 9:window.location.href="https://html5.api.gamedistribution.com/blocked.html?".concat(H.stringify({domain:n._parentDomain,id:a.gameId,img:n._get_game_thumbnail_url(),title:a.title,unregistered:i,utm_source:n._parentDomain,utm_medium:(null==a?void 0:a.slug)||(null==a?void 0:a.title)||(null==a?void 0:a.gameId)||"unknown",utm_campaign:"block-and-redirect"}));case 10:case"end":return e.stop()}}),e,null,[[1,6]])}))),100)}},{key:"_redirectToLoaderFrame",value:function(){var t=this,n=this._gameData;setTimeout(e(r.mark((function e(){var i,a,s,o;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t.adInstance._send_atom_event("loader-redirect");case 3:e.next=8;break;case 5:e.prev=5,e.t0=e.catch(0),console.log("Could not send dump.loader-redirect",e.t0);case 8:i=I(location.href,!0),a=wI(wI({},i.query),{},{rd:"1"}),s=H.stringify(a),o="https://html5.gamedistribution.com/".concat(n.gameId,"/?").concat(s),window.location.href=o;case 13:case"end":return e.stop()}}),e,null,[[0,5]])}))),100)}},{key:"_checkGameDeleted",value:function(){var e=this;6!==this._gameData.status&&4!==this._gameData.activeStatus||(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(){t(this,e),document.location="https://html5.api.gamedistribution.com/deleted.html"}.bind(this),100))}},{key:"_changeMidrollInDebugMode",value:function(){var e=this._gameData;lR().disableMidrolltimer?e.midroll=0:h.available&&h.getBoolean("gd_debug_ex")&&(h.getBoolean("gd_disable_midroll_timer")?e.midroll=0:e.midroll=this._getDefaultGameData().midroll)}},{key:"_checkSplashAndPromoScreens",value:function(){var e,t,n,r;!1===(null===(e=this._gameData.loader)||void 0===e?void 0:e.mobile)&&this._getisMobile()&&(this._gameData.loader.enabled=!1);var i,a=this._gameData,s=a.gdpr&&!0===a.gdpr.consent,o=a.loader,d=null===(t=a.promo)||void 0===t?void 0:t[null===(n=a.promo)||void 0===n||null===(r=n.template)||void 0===r?void 0:r.preroll];(a.preroll||(this.adRequestTimer=Date.now()),this.options.loader.enabled)?null!=d&&d.enabled?this._createPromoBeforeSplash(a,s):o.enabled&&!0!==(null===(i=o.splash)||void 0===i?void 0:i.skip)?this._createSplash(a,s):this.onResumeGame("Skipped splash.","success"):o.enabled||this._bridge.isTokenGameURL&&this._bridge.isExtHostedGameURL||(this.options.advertisementSettings.autoplay||s?null!=d&&d.enabled?this._createPromoBeforeSplash(a,s):!1!==o.enabled&&this._createSplash(a,s):null!=d&&d.enabled&&this._createPromo(a,s))}},{key:"_initializeVideoAd",value:(N=e(r.mark((function e(){var t;return r.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=p(this.options.advertisementSettings,t.sdk)),this.macros=new x({game:t,bridge:this._bridge}),this.adInstance=new _R(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,this.adInstance.PackageJSON=Ao,this.adInstance._send_atom_event("gd.location"),e.next=17,this.adInstance.start();case 17:case"end":return e.stop()}}),e,this)}))),function(){return N.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){f("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){f("DEVELOPER_ERROR",e.message,"warning")}}},{key:"IscForwardOnEvent",value:(j=e(r.mark((function e(t){var n,i,a,s,o;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=!1,e.prev=1,e.next=4,nk();case 4:if(!(i=e.sent)){e.next=14;break}return e.next=8,i.isLoader();case 8:if(o=e.sent,!((null===(a=this._gameData)||void 0===a||null===(s=a.isv_fw)||void 0===s?void 0:s.enabled)&&o&&i.onEvent)){e.next=14;break}return n=!0,i.onEvent({event:t}),e.abrupt("return",n);case 14:e.next=19;break;case 16:e.prev=16,e.t0=e.catch(1),yo("[GD-IS] error on onEvent forward",e.t0);case 19:return e.abrupt("return",n);case 20:case"end":return e.stop()}}),e,this,[[1,16]])}))),function(e){return j.apply(this,arguments)})},{key:"_onEvent",value:(F=e(r.mark((function e(t){var n,i;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.IscForwardOnEvent(t);case 2:if(!e.sent){e.next=5;break}return e.abrupt("return");case 5:if(yo("[GD-IS] onEvent executing",{event:null==t?void 0:t.name,e:t,location:window.location.href}),f(t.name,t.message,t.status),!t.skipForward){e.next=9;break}return e.abrupt("return");case 9:wo("[developer-event]".concat(t.isStoreEvent?"[store]":""),{name:t.name,data:t.data||{},source:"core"}),null!==(n=this._gameData)&&void 0!==n&&null!==(i=n.evnts)&&void 0!==i&&i.enabled&&QR({event:t.name,game:this._gameData});try{this.options.onEvent({name:t.name,message:t.message,status:t.status,data:t.data||{},isStoreEvent:t.isStoreEvent||!1,skipForward:t.skipForward,adPosition:t.adPosition})}catch(e){f("DEVELOPER_ERROR",e.message,"warning")}case 12:case"end":return e.stop()}}),e,this)}))),function(e){return F.apply(this,arguments)})},{key:"_getGameData",value:(M=e(r.mark((function e(){var t;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Lw();case 2:return t=e.sent,this.msgrt.setGameData(t),E(t.diagnostic),e.abrupt("return",t);case 6:case"end":return e.stop()}}),e,this)}))),function(){return M.apply(this,arguments)})},{key:"_createSplash",value:(B=e(r.mark((function n(i,a){var s,o,d,u,c=this;return r.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,this._getSplashTemplate(i);case 2:return s=n.sent,o=new s(wI(wI({},this.options),{},{isConsentDomain:a,version:Ao.version}),i,this._parentDomain),n.next=6,Vw();case 6:d=n.sent,u=d.enabled,o.on("playClick",function(){var n,s,d,l=this;if(t(this,c),((null===(n=window.gdlocus)||void 0===n?void 0:n.firstUserAction)||e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:console.log("gd-adflow locus-first-user-action is not defined");case 1:case"end":return e.stop()}}),e)}))))({game_id:i.gameId}).catch(function(e){t(this,l),console.log("gd-adflow locus-first-user-action error",e)}.bind(this)),a){var h=new Date;h.setDate(h.getDate()+90),document.cookie="ogdpr_tracking=1; expires=".concat(h.toUTCString(),"; path=/")}if(this._hideCMPButton(),cT("play"),u)window.gdsdk.showAd(v.Interstitial,{position:"preroll"}).catch(function(e){t(this,l),o.hide()}.bind(this));else{var p={position:"preroll"};(function(){t(this,l),xo.firstAdapterModeAdsense&&(console.log("promo-test, set first adapter to adssense 1"),p.adapter="adsense")}).bind(this),this.showAd(v.Interstitial,p).catch(function(e){t(this,l)}.bind(this))}null!==(s=this._gameData)&&void 0!==s&&null!==(d=s.evnts)&&void 0!==d&&d.enabled&&(QR({event:"FirstInteraction",game:this._gameData}),this._send_gametag_data("first_interaction"))}.bind(this)),this.onPauseGame("Pause the game and wait for a user gesture","success"),this.eventBus.subscribe("SDK_GAME_PAUSE",function(){t(this,c),o.hide()}.bind(this)),this.eventBus.subscribe("SDK_GAME_START",function(){t(this,c),o.hide()}.bind(this));case 12:case"end":return n.stop()}}),n,this)}))),function(e,t){return B.apply(this,arguments)})},{key:"_createPromoBeforeSplash",value:(L=e(r.mark((function e(n,i){var a,s,o,d,u=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this._createPrerollPromoTemplate(n);case 3:o=e.sent,(d=new o(wI(wI({},this.options),{},{isConsentDomain:i,version:Ao.version,template:null===(a=n.promo)||void 0===a||null===(s=a.template)||void 0===s?void 0:s.preroll}),n)).on("done",function(){t(this,u),d.hide(),this._createSplash(n,i)}.bind(this)),d.on("promoButtonClicked",function(){t(this,u),d.hide(),this.onResumeGame("Resumed after the promo","warning")}.bind(this)),e.next=13;break;case 9:e.prev=9,e.t0=e.catch(0),console.log(e.t0),this._createSplash(n,i);case 13:case"end":return e.stop()}}),e,this,[[0,9]])}))),function(e,t){return L.apply(this,arguments)})},{key:"_createPromo",value:(P=e(r.mark((function e(n,i){var a,s,o,d,u=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this._createPrerollPromoTemplate(n);case 3:o=e.sent,(d=new o(wI(wI({},this.options),{},{isConsentDomain:i,version:Ao.version,template:null===(a=n.promo)||void 0===a||null===(s=a.template)||void 0===s?void 0:s.preroll}),n)).on("done",function(){t(this,u),d.hide(),this.onResumeGame("Resumed after the promo","warning")}.bind(this)),d.on("promoButtonClicked",function(){t(this,u),d.hide(),this.onResumeGame("Resumed after the promo","warning")}.bind(this)),this.onPauseGame("Pause the game for the promo","success"),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(0),this.onResumeGame("Resumed after the promo","warning");case 13:case"end":return e.stop()}}),e,this,[[0,10]])}))),function(e,t){return P.apply(this,arguments)})},{key:"showBanner",value:function(){var e=this;this.showAd(v.Interstitial).catch(function(){t(this,e)}.bind(this))}},{key:"IscForwardShowAd",value:(O=e(r.mark((function e(t){var n,i,a,s,o,d,u,c,l,h=arguments;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=h.length>1&&void 0!==h[1]?h[1]:{},s={forwarded:i=!1,result:a},e.prev=3,null===(o=this._gameData)||void 0===o||null===(d=o.isv_fw)||void 0===d?void 0:d.enabled){e.next=7;break}return e.abrupt("return",s);case 7:return e.next=10,nk();case 10:if(u=e.sent){e.next=13;break}return e.abrupt("return",s);case 13:return e.next=16,u.isLoader();case 16:if(c=e.sent,l=u.hasRouter(),c||!l){e.next=26;break}return wo("[GD-IS] forwarding ad call",{location:window.location.href}),i=!0,e.next=25,u.showAd({adType:t,params:n});case 25:a=e.sent;case 26:e.next=32;break;case 29:e.prev=29,e.t0=e.catch(3),yo("[GD-IS] error on showAd forward",e.t0);case 32:return e.abrupt("return",{forwarded:i,result:a});case 33:case"end":return e.stop()}}),e,this,[[3,29]])}))),function(e){return O.apply(this,arguments)})},{key:"showAd",value:(y=e(r.mark((function t(n){var i,a=this,s=arguments;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=s.length>1&&void 0!==s[1]?s[1]:{},t.abrupt("return",new Promise(function(){var t=e(r.mark((function e(t,s){var o,d,u,c,l,h,p,f,m;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,e.t0=null===(o=a._gameData)||void 0===o?void 0:o.igs,!e.t0){e.next=6;break}return e.next=5,ik();case 5:e.t0=e.sent;case 6:if(!e.t0){e.next=10;break}return wo("[GD-IS-IGS] store-visible so ad was skipped",{loc:window.location.href}),e.abrupt("return");case 10:return e.next=12,a.IscForwardShowAd(n,i);case 12:if(u=e.sent,c=u.forwarded,l=u.result,!c){e.next=18;break}return t(l),e.abrupt("return");case 18:return cT("play"),h={adType:n||"interstitial",params:i,adTimestamp:a.adRequestTimer},e.next=24,a.sdkReady;case 24:return p=e.sent,e.next=27,a.videoAdReady;case 27:if(null!==(d=a._gameData.lp)&&void 0!==d&&d.load||a._sendLoadedEvent(1),a._sendGamedockGamePlay(),a._rejectAdIfGameBlocked({gameData:p,adRequest:h}),a._rejectAdIfUnsupportedType({adRequest:h}),"rewarded"===n&&a._setGameRewardedFlag(),null!=i&&i.isGift||null!=i&&i.isCompensation||a._rejectAdIfAdRateHits({gameData:p,adRequest:h}),i&&(i.isGift||i.isMidrollPlus||i.isCompensation)||!a.adBlockerPage||(a._setAdRequestTimer(),a.adBlockerPage.show()),a.adInstance.attachAfgPosition(h),!a._autoResumeIfAdsAreDisabled(hT(h))){e.next=39;break}return e.abrupt("return",t());case 39:if(a._rejectAdIfAdDisabled({gameData:p,adRequest:h}),!a.adFlowRunning){e.next=42;break}return e.abrupt("return",t());case 42:return a.adFlowRunning=!0,f=new KT(a),a._adFlow=f,e.next=47,f.runAdFlow(h);case 47:m=e.sent,a.adFlowRunning=!1,a._adFlow=null,t(m),a._post_message({topic:"adrequest.instream"}),e.next=61;break;case 54:e.prev=54,e.t1=e.catch(0),a.adFlowRunning=!1,a._adFlow=null,a.onAdError(e.t1.message),a.onResumeGame(e.t1.message,"warning"),s(e.t1.message);case 61:case"end":return e.stop()}}),e,null,[[0,54]])})));return function(e,n){return t.apply(this,arguments)}}()));case 2:case"end":return t.stop()}}),t)}))),function(e){return y.apply(this,arguments)})},{key:"_autoResumeIfAdsAreDisabled",value:function(e){var t,n=!1,r=null===(t=this._gameData.diagnostic)||void 0===t?void 0:t.close_ads,i=this._gameData.disableAds[e],a=r||i;return yo("gd-adflow autoresume result: adModuleDisabled,adDisabled",r,i,e,this._gameData.diagnostic,this._gameData.disableAds),a&&(this._runAutoResume(),n=!0),n}},{key:"_runAutoResume",value:function(){var e=this,n="CONTENT_PAUSE_REQUESTED",r="CONTENT_RESUME_REQUESTED";this.eventBus.broadcast(n,{name:n,message:"Auto pause when ads are disabled"}),setTimeout(function(){t(this,e),this.eventBus.broadcast(r,{name:r,message:"Auto resume when ads are disabled"}),this.onResumeGame("Advertisement(s) are cancelled. Start / resume the game.","success")}.bind(this),3e3)}},{key:"_giveGift",value:function(e){var t,n,r,i,a,s,o,d,u,c,l,h,p,f,m;switch(e){case"preroll":null!==(t=this._gameData)&&void 0!==t&&null!==(n=t.gft)&&void 0!==n&&n[e].enabled&&(null===(r=this._gameData)||void 0===r||null===(i=r.gft)||void 0===i||null===(a=i[e].durations[this._giftCount[e]])||void 0===a?void 0:a.after)===this.adInstance.adPrerollCount&&this.decideToGiveAGift(e);break;case"midroll":null!==(s=this._gameData)&&void 0!==s&&null!==(o=s.gft)&&void 0!==o&&o[e].enabled&&(null===(d=this._gameData)||void 0===d||null===(u=d.gft)||void 0===u||null===(c=u[e].durations[this._giftCount[e]])||void 0===c?void 0:c.after)===this.adInstance.adMidrollCount&&this.decideToGiveAGift(e);break;case"rewarded":null!==(l=this._gameData)&&void 0!==l&&null!==(h=l.gft)&&void 0!==h&&h[e].enabled&&(null===(p=this._gameData)||void 0===p||null===(f=p.gft)||void 0===f||null===(m=f[e].durations[this._giftCount[e]])||void 0===m?void 0:m.after)===this.adInstance.adRewardedCount&&this.decideToGiveAGift(e)}}},{key:"_setAdRequestTimer",value:function(){this.adRequestTimer=Date.now()}},{key:"clearSession",value:function(){this.adInstance.clearSession()}},{key:"_attachAfgFallback",value:function(e){var t=e.gameData,n=e.adRequest;if(!t.afg_disabled&&!n.params.hasOwnProperty("fallback_adsense"))switch(n.params.position){case"preroll":case"start":case"next":n.params.fallback_adsense=!0}}},{key:"_rejectAdIfGameBlocked",value:function(e){var t=e.gameData;if(t.bloc_gard&&!0===t.bloc_gard.enabled)throw new Error("Game or domain is blocked.")}},{key:"_rejectAdIfAdDisabled",value:function(e){var t=e.gameData,n=hT(e.adRequest);if(t.disableAds[n]||this._whitelabelPartner)throw new Error("Advertisements are disabled.")}},{key:"_rejectAdIfUnsupportedType",value:function(e){var t=e.adRequest;if(t.adType){if(t.adType!==v.Interstitial&&t.adType!==v.Rewarded)throw new Error("Unsupported an advertisement type: ",t.adType)}else t.adType=v.Interstitial}},{key:"_rejectAdIfRewardedDisabled",value:function(e){var t=e.gameData;if(e.adRequest.adType===v.Rewarded&&!t.rewardedAds)throw new Error("Rewarded ads are disabled.")}},{key:"_rejectAdIfAdRateHits",value:function(e){var t,n,r,i,a,s,o=e.gameData,d=e.adRequest,u=null;d.adType===v.Interstitial&&null!==(t=o.diagnostic)&&void 0!==t&&null!==(n=t.useMidrollIndex)&&void 0!==n&&n.enabled&&this.adInstance.noPreroll?this.adInstance.adMidrollCount>(null===(r=o.diagnostic)||void 0===r||null===(i=r.useMidrollIndex)||void 0===i?void 0:i.indexes.length)-1||(u=6e4*(null===(a=o.diagnostic)||void 0===a||null===(s=a.useMidrollIndex)||void 0===s?void 0:s.indexes[this.adInstance.adMidrollCount])):u=o.midroll;if(d.adType===v.Interstitial&&void 0!==this.adRequestTimer&&Date.now()-this.adRequestTimer<u)throw new Error("The advertisement was requested too soon.")}},{key:"preloadAd",value:(b=e(r.mark((function t(n){var i=this;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise(function(){var t=e(r.mark((function e(t,a){var s,o;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,i.sdkReady;case 3:return s=e.sent,e.next=6,i.videoAdReady;case 6:if(!s.bloc_gard||!0!==s.bloc_gard.enabled){e.next=8;break}throw new Error("Game or domain is blocked.");case 8:if(!s.disableAds[n]&&!i._whitelabelPartner){e.next=10;break}throw new Error("Advertisements are disabled for this ad type => ".concat(n,"..."));case 10:if(n){e.next=14;break}n=v.Rewarded,e.next=16;break;case 14:if(n===v.Interstitial||n===v.Rewarded){e.next=16;break}throw new Error("Unsupported an advertisement type:"+n);case 16:if(!i.adInstance){e.next=22;break}return e.next=19,i.adInstance.preloadAd(n);case 19:e.t0=e.sent,e.next=23;break;case 22:e.t0="gdsdk://preloaded";case 23:o=e.t0,t(o),e.next=30;break;case 27:e.prev=27,e.t1=e.catch(0),a(e.t1);case 30:case"end":return e.stop()}}),e,null,[[0,27]])})));return function(e,n){return t.apply(this,arguments)}}()));case 1:case"end":return t.stop()}}),t)}))),function(e){return b.apply(this,arguments)})},{key:"cancelAd",value:(A=e(r.mark((function t(){var n=this;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise(function(){var t=e(r.mark((function e(t,i){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:try{n.adInstance.cancel(),n.onResumeGame("Advertisement(s) are cancelled. Start / resume the game.","success"),i()}catch(e){n.onResumeGame("Advertisement(s) are cancelled. Start / resume the game.","success"),t(e.message)}case 1:case"end":return e.stop()}}),e)})));return function(e,n){return t.apply(this,arguments)}}()));case 1:case"end":return t.stop()}}),t)}))),function(){return A.apply(this,arguments)})},{key:"showDisplayAd",value:function(t){var n=this;return new Promise(function(){var i=e(r.mark((function e(i,a){var s;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,n.sdkReady;case 3:return s=e.sent,e.next=6,n.videoAdReady;case 6:if(!s.dAds.enabled){e.next=13;break}return e.next=9,n.adInstance.loadDisplayAd(t);case 9:n._post_message({topic:"adrequest.display"}),i(),e.next=14;break;case 13:a("Display-Ads are disabled.");case 14:e.next=19;break;case 16:e.prev=16,e.t0=e.catch(0),a(e.t0.message||e.t0);case 19:case"end":return e.stop()}}),e,null,[[0,16]])})));return function(e,t){return i.apply(this,arguments)}}())}},{key:"onResumeGame",value:function(e,t){var n,r;try{this._allowExternals({enabled:!1}),this.options.resumeGame()}catch(e){console.log("gd-adflow error onResumeGame",e),f("DEVELOPER_ERROR",e.message,"warning")}var i="SDK_GAME_START";this.eventBus.broadcast(i,{name:i,message:e,status:t,analytics:{category:"SDK",action:i,label:this.options.gameId+""},adPosition:null===(n=this.adInstance)||void 0===n?void 0:n._findAdPosition()}),this.adInstance&&this.adInstance._hideAddResume(),this.adInstance&&this.adInstance._hideAdSpinner(),this.adInstance&&this.adInstance._clearTimeoutForSkipAddButton(),null===(r=this._gameData.evnts)||void 0===r||!r.enabled||this._isMasterGameURL()&&!this._isExtHostedGameURL()||(QR({event:"GameStarted",game:this._gameData}),this._send_gametag_data("game_started"))}},{key:"onPauseGame",value:function(e,t){var n;this._allowExternals({enabled:!0});try{this.options.pauseGame()}catch(e){f("DEVELOPER_ERROR",e.message,"warning")}var r="SDK_GAME_PAUSE";this.eventBus.broadcast(r,{name:r,message:e,status:t,analytics:{category:"SDK",action:r,label:this.options.gameId+""}}),null===(n=this._gameData.evnts)||void 0===n||!n.enabled||this._isMasterGameURL()&&!this._isExtHostedGameURL()||(QR({event:"GamePaused",game:this._gameData}),this._send_gametag_data("game_paused"))}},{key:"onRewardedWatchComplete",value:function(){this.eventBus.broadcast("SDK_REWARDED_WATCH_COMPLETE",{message:"",status:"success"})}},{key:"onAdError",value:function(e){this.eventBus.broadcast("AD_ERROR",{message:e,status:"error"})}},{key:"openConsole",value:function(){try{new D(this).start(),h.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 e=this;try{var n=this._gameData;n.sdk.fullscreen&&"auto"===n.sdk.fullscreen&&document.addEventListener("click",function(){if(t(this,e),!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(e){var n=this;void 0!==this.window_open&&(!1===e.enabled?window.open=function(e){t(this,n),this.msgrt.send("external",{message:"C> ".concat(e)}),(e.startsWith("https://play.google.com")||e.startsWith("https://itunes.apple.com"))&&this.window_open.call(null,e)}.bind(this):window.open=this.window_open)}},{key:"_shouldAllowExternalUrl",value:function(e){var n,r=this,i=new I(e),a=i.host;return i.href,((null===(n=this._gameData.urlBlockExc)||void 0===n?void 0:n.hosts)||[]).some(function(e){return t(this,r),e===a}.bind(this))}},{key:"_removeExternalsInHtml",value:function(e){var n=this;!1===e.enabled&&window.document.querySelectorAll("a").forEach(function(e){var r=this;t(this,n);var i=!!(e.innerText.toLowerCase().includes("start")||e.innerText.toLowerCase().includes("play")||e.innerText.toLowerCase().includes("continue")),a=e.getAttribute("href");if(!this._shouldAllowExternalUrl(a)){var s=e.getAttribute("href");e.removeAttribute("href"),i||(e.onclick=function(e){return t(this,r),e.preventDefault(),this.msgrt.send("external",{message:"H> ".concat(s)}),!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:a()),d=decodeURIComponent((e||n)&&r.parentDomain?r.parentDomain:s()),c=decodeURIComponent((e||n)&&r.topDomain?r.topDomain:n&&0===o()?d:u()),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,v=(e||n)&&r.loaderEnabled,g=(e||n)&&r.loaderEnabled,A=(e||n)&&r.loaderEnabled,b=(e||n)&&r.loaderEnabled&&r.hasImpression&&r.version>="1.1.24";return{isTokenGameURL:e,isMasterGameURL:t,isExtHostedGameURL:n,noConsoleBanner:l,noLoadedEvent:h,noBlockerEvent:p,noPreroll:A,parentURL:i,parentDomain:d,topDomain:c&&c.length?c:d,noGAPageView:f,noLotamePageView:m,noGamedockSDK:v,noMinijuegosSDK:g,version:r.version,pauseGameOnStartup:b,depth:o(),domainMatched:d===c,exports:{formatTokenURLSearch:this._formatTokenURLSearch.bind(this),extendUrlQuery:this._extendUrlQuery.bind(this),base64Encode:this._base64_encode.bind(this)}}}},{key:"_isHostHTML5Domain",value:function(){var e=new I(location.href);return"html5.gamedistribution.com"===(null==e?void 0:e.host.toLowerCase())}},{key:"_isExternalHoster",value:function(){var e,t;return null===(e=this._gameData)||void 0===e||null===(t=e.extHosting)||void 0===t?void 0:t.enabled}},{key:"_whichFrame",value:function(){return(this._isMasterGameURL()||this._isExtHostedGameURL())&&!this._isTokenGameURL()?"loader-frame":"game-frame"}},{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:"_checkTokenGameUrl",value:function(){var e=I(location.href),t=e.origin,n=e.pathname,r="".concat(t).concat(n);return/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Za-z0-9]{8})\/(.*)$/i.test(r)}},{key:"_isTokenGameURL",value:function(){var e,t=/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Za-z0-9]{8})\/(.*)$/i,n="1"===(null===(e=I(location.href,!0).query)||void 0===e?void 0:e.rd);return t.test(location.href)||!n&&t.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:"_isLoaderGameURL",value:function(){return/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Fa-f0-9]{32})(.*)$/i.test(location.href)&&location.href.startsWith("https://html5.gamedistribution.com")}},{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 I(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 I(document.referrer,!0);if(!r.query.gd_zone_config)return;e=r.query.gd_zone_config}else{var i=new I(location.href,!0);if(!i.query.gd_zone_config)return;e=i.query.gd_zone_config}return JSON.parse(C.decode(decodeURIComponent(e)))}catch(e){}}},{key:"_getSplashTemplate",value:function(e){var t=e.splash;return new wR(t).splash()}},{key:"_createPrerollPromoTemplate",value:(g=e(r.mark((function e(t){var n,i,a,s,o;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=null===(n=t.promo)||void 0===n?void 0:n[null===(i=t.promo)||void 0===i||null===(a=i.template)||void 0===a?void 0:a.preroll],o=new yR(s),e.abrupt("return",o.promo());case 3:case"end":return e.stop()}}),e)}))),function(e){return g.apply(this,arguments)})},{key:"_formatTokenURLSearch",value:function(e){var t="";try{t=encodeURIComponent(C.encode(JSON.stringify(e)))}catch(e){}try{var n=new I(location.href,!0);return n.query=n.query||{},n.query.gd_zone_config=t,"?".concat(H.stringify(n.query))}catch(e){return"?gd_zone_config=".concat(t)}}},{key:"_extendUrlQuery",value:function(e,t){var n=new I(e,!0);return n.query=wI(wI({},n.query),t),n.toString()}},{key:"_base64_encode",value:function(e){return C.encode(JSON.stringify(e))}},{key:"session",value:function(){var t=this;return new Promise(function(){var n=e(r.mark((function e(n,i){var a;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t.sdkReady;case 3:e.next=7;break;case 5:e.prev=5,e.t0=e.catch(0);case 7:a=t._gameData,n({ads:{display:{enabled:a.dAds.enabled},rewarded:{enabled:a.rewardedAds}},location:{parentDomain:t._bridge.parentDomain,topDomain:t._bridge.topDomain,parentURL:t._bridge.parentURL,depth:t._bridge.depth,loadedByGameZone:t._bridge.isTokenGameURL}});case 9:case"end":return e.stop()}}),e,null,[[0,5]])})));return function(e,t){return n.apply(this,arguments)}}())}},{key:"sendGenericEvent",value:function(e){console.log("Received generic event",e,this._isMasterGameURL());try{var t,n;if("track-milestone"==e.eventName)EI.tracking.trackEvent("milestoneAchieved",{pageId:this.options.gameId,pageType:"game",isAuthorized:null===(t=e.data)||void 0===t?void 0:t.isAuthorized,milestoneDescription:null===(n=e.data)||void 0===n?void 0:n.milestoneDescription});else if("game_event"==e.eventName)return this._gameEventPostMessage(e)}catch(e){console.log(e.message)}}},{key:"_gameEventPostMessage",value:function(e){if(void 0!==e.data.level&&this._numberValidator(e.data.level))if(void 0!==e.data.score&&this._numberValidator(e.data.score)){var t={type:e.eventName,data:e.data};window.location!==window.top.location&&window.top.postMessage(t,"*")}else console.log("Level data type should be number!");else console.log("Level data type should be number!")}},{key:"_numberValidator",value:function(e){return"number"==typeof e&&/^\d*$/.test(e)}},{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 e=this,n=this._gameData,r=n.assets.find(function(n){return t(this,e),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)}}},{key:"fixScore",value:function(){var e,n,r,i,a=this;if(null===(e=this._gameData)||void 0===e||null===(n=e.fix_score)||void 0===n?void 0:n.enabled){var s=(null===(r=this._gameData)||void 0===r||null===(i=r.fix_score)||void 0===i?void 0:i.wait)||10;setTimeout(function(){var e=this;t(this,a),this.showAd(v.Interstitial,{position:"midroll"}).catch(function(n){t(this,e)}.bind(this))}.bind(this),1e3*s)}}},{key:"executeCompensation",value:(i=e(r.mark((function n(i){var a,s,o,d,u,c,l=this;return r.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(a=(null==i?void 0:i.whenAvailable)||!1,s=!this.adInstance.requestRunning&&!this.adFlowRunning,o=function(){var t=e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l.showAd(v.Interstitial,{position:"midroll",isCompensation:!0});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(){return t.apply(this,arguments)}}(),!s){n.next=10;break}return n.next=7,o();case 7:return d=n.sent,n.abrupt("return",d);case 10:if(!a){n.next=17;break}return u=!1,n.next=15,new Promise(function(n,i){var a=this;t(this,l);var s=!1,d=setInterval(e(r.mark((function e(){var t;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a.adInstance.requestRunning||a.adFlowRunning){e.next=19;break}return clearInterval(d),e.prev=4,e.next=7,o();case 7:t=e.sent,s=!0,n(t),u=!0,e.next=19;break;case 14:e.prev=14,e.t0=e.catch(4),yo("[compensation] execution error after became available",e.t0),n({err:e.t0,success:!1}),u=!0;case 19:case"end":return e.stop()}}),e,null,[[4,14]])}))),1e3);setTimeout(function(){t(this,a),s||u||n({success:!1})}.bind(this),6e4)}.bind(this));case 15:return c=n.sent,n.abrupt("return",c);case 17:case"end":return n.stop()}}),n,this)}))),function(e){return i.apply(this,arguments)})},{key:"decideToGiveAGift",value:function(n){var i=this;try{var a,s=null===(a=this._gameData)||void 0===a?void 0:a.gft[n],o="gift";if(!ST({rateType:o,gameData:this._gameData}))return void yo("[compensation] rate check did not pass for ".concat(o));yo("[compensation] rate check passed for ".concat(o));var d=setInterval(e(r.mark((function e(){var a=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i.adInstance.requestRunning||i.adFlowRunning?console.log("Advertisement already running..."):(yo("gd-adflow WILL GIVE GIFT!!!"),i.showAd(v.Interstitial,{position:n,isGift:!0}).catch(function(e){t(this,a)}.bind(this)),clearInterval(d),i._giftCount[n]++);case 1:case"end":return e.stop()}}),e,this)}))),1e3*s.durations[this._giftCount[n]].wait)}catch(e){console.log("Advertisement Error...")}}},{key:"send_atom_event",value:function(e,t){this.adInstance._send_atom_event(e,t)}},{key:"get_session_id",value:function(){return kI}},{key:"get_ad_system_init_result",value:function(){return{afg:this.adInstance.afgInitSuccess,ima:this.adInstance.imaInitSuccess}}},{key:"_getDeveloperDomains",value:function(){var e,t;return"developer.gamedistribution.com"===this._topDomain||"developer-acc.gamedistribution.com"===this._topDomain?e=this._topDomain:!0===new RegExp("^localhost").test(this._parentDomain)&&(e="localhost"),e&&(t={"developer-acc.gamedistribution.com":"game-api-acc-real-aws.gamedistribution.com","developer.gamedistribution.com":"game.api.gamedistribution.com",localhost:"game-api-acc-real-aws.gamedistribution.com"}[e]),{developerDomain:e,gameApiDomain:t}}},{key:"_setGameRewardedFlag",value:function(){try{var e=this._getDeveloperDomains(),t=e.developerDomain,n=e.gameApiDomain;if(t){fetch("https://".concat(n,"/game/v2/hasrewarded/").concat(this.options.gameId,"?timestamp=").concat((new Date).valueOf()));try{var r=JSON.stringify({type:"GD_SDK_REWARDED_SET",gameID:this.options.gameId});window.location!==window.top.location?window.top.postMessage(r,"*"):null!==window.opener&&window.opener.location!==window.location&&window.opener.postMessage(r,"*")}catch(e){}}}catch(e){}}},{key:"_getGdModeIfExist",value:function(){var e=this,n=new Proxy(new URLSearchParams(window.location.search),{get:function(n,r){return t(this,e),n.get(r)}.bind(this)});return!n.gd_mode&&window.location.search.includes("gd_mode")?window.location.search.split("gd_mode=")[1]:n.gd_mode}},{key:"_executeMidrollPlus",value:function(){var e,n=this;if(!(this.adInstance&&this.adInstance.checkIfTestAdsExist())){if(ST({rateType:"midroll+",gameData:this._gameData})&&null!==(e=this._gameData.midroll_plus)&&void 0!==e&&e.enabled&&!this.isMidrollPlusExecuted){var r;this.isMidrollPlusExecuted=!0;var i=this._gameData.midroll_plus.type||"midroll";if(null!==(r=this._gameData.midroll_plus)&&void 0!==r&&r.interval)var a=setInterval(function(){var e,r,s=this;(t(this,n),this.adFlowRunning)||(this.showAd(v.Interstitial,{position:"midroll",giftType:i,isMidrollPlus:!0}).catch(function(e){t(this,s)}.bind(this)),this._mplus_count++,"infinite"!==(null===(e=this._gameData.midroll_plus)||void 0===e?void 0:e.interval)&&this._mplus_count===(null===(r=this._gameData.midroll_plus)||void 0===r?void 0:r.interval)&&clearInterval(a))}.bind(this),6e4*this._gameData.midroll_plus.timer);else setTimeout(function(){var e=this;t(this,n),this.showAd(v.Interstitial,{position:"midroll",giftType:i,isMidrollPlus:!0}).catch(function(n){t(this,e)}.bind(this))}.bind(this),this._gameData.midroll)}}}}]),n}();function SI(){return(SI=e(r.mark((function e(){var n,i=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,qw();case 2:if(e.sent){e.next=6;break}return console.log("locus-disabled on proxy level"),e.abrupt("return");case 6:n=["https://pm.azerioncircle.com/p/locus/"],console.log("locus loading"),m(n[0],"locus",{alternates:n}).catch(function(e){t(this,i),this._sendSDKError(e)}.bind(this));case 9:case"end":return e.stop()}}),e,this)})))).apply(this,arguments)}var RI,TI=new M,II=function(e){var n=this;!function(){SI.apply(this,arguments)}();var r,i=function(e){var r=this;return t(this,n),new Promise(function(n,i){var a=this;t(this,r);var s=function(e){t(this,a),"SDK_GAME_START"===e.name&&(TI.off("sdk-event",s),n())}.bind(this);TI.on("sdk-event",s),v("showAd",{adType:e})}.bind(this))}.bind(this),a=function(){return t(this,n),r||(r=new DI(e)),r}.bind(this),s=function(){var e;return t(this,n),(null===(e=window.gdsdk.store)||void 0===e?void 0:e.isVisible)&&window.gdsdk.store.isVisible()}.bind(this),o=function(e){if(t(this,n),!s())return i(e);wo("[GD-IS-IGS] store-visible so ad was skipped",{loc:window.location.href})}.bind(this),d=function(e){return t(this,n),"gdsdk://preloaded"}.bind(this),u=function(e){return t(this,n),a().showDisplayAd(e)}.bind(this),c=function(){return t(this,n),v("cancelAd")}.bind(this),l=function(){return t(this,n),v("openConsole")}.bind(this),h=function(){return t(this,n),v("showBanner")}.bind(this),p=function(){return t(this,n),v("session")}.bind(this),f=function(e){return t(this,n),v("sendGenericEvent",{options:e})}.bind(this),m=function(){t(this,n),console.log("_sendSDKReady")}.bind(this),v=function(e,r){var i=this;return t(this,n),r||(r={}),new Promise(function(n,a){t(this,i);try{var s={type:"gd-sdk",method:e,options:r};window.parent.postMessage(s,"*"),n()}catch(e){console.log("gd:adp:m:s:error",e),n()}}.bind(this))}.bind(this),g=function(){t(this,n);window.addEventListener("message",(function(e){var t=e.data;e.origin,e.source;var n=t.type,r=t.event;"gd-sdk-on-event"===n&&r&&b(r)}),!1)}.bind(this),A=function(){t(this,n),g(),v("init")}.bind(this),b=function(r){t(this,n);try{TI.emit("sdk-event",r),e.onEvent&&(wo("[developer-event]".concat(r.isStoreEvent?"[store]":""),{name:r.name,data:r.data,source:"proxy"}),e.onEvent(r)),"SDK_GAME_PAUSE"===r.name?e.pauseGame&&e.pauseGame():"SDK_GAME_START"===r.name&&e.resumeGame&&e.resumeGame()}catch(e){console.log("DEVELOPER ERROR on forwarder-sdk")}}.bind(this);return{showBanner:h,showAd:o,preloadAd:d,showDisplayAd:u,cancelAd:c,openConsole:l,getSession:p,onEvent:b,init:A,_sendSDKReady:m,sendGenericEvent:f}},CI=function(){var n=e(r.mark((function e(n){var i,a=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(i=II(n)).init(),e.next=4,Yw({whichFrame:"game-frame",options:{onEvent:i.onEvent.bind(i)}});case 4:return hk({onEvent:function(e){t(this,a);var n=e.name,r=e.data;(i.onEvent({name:n,message:"In Game Store: ".concat(n),status:"success",data:r,isStoreEvent:!0}),"STORE_UI_VISIBILITY_CHANGED"===n)&&(r.visible?i.onEvent({name:"SDK_GAME_PAUSE",message:"SDK_GAME_PAUSE",status:"success"}):i.onEvent({name:"SDK_GAME_START",message:"SDK_GAME_START",status:"success"}))}.bind(this)}),e.abrupt("return",i);case 6:case"end":return e.stop()}}),e,this)})));return function(e){return n.apply(this,arguments)}}(),OI=function(){var e=this,n=function(){t(this,e);return/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Fa-f0-9]{32})(.*)$/i.test(location.href)}.bind(this),r=function(){t(this,e);return/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Za-z0-9]{8})\/(.*)$/i.test(location.href)}.bind(this),i=function(){t(this,e);return/^http[s]?:\/\/.*?gd_sdk_referrer_url=.*$/i.test(location.href)}.bind(this),a=function(){t(this,e);var i="html5.gamedistribution.com"!==I(window.location.href).host;return n()&&!(r()||i)?"loader-frame":"game-frame"}.bind(this);return{isMasterGameURL:n,isTokenGameURL:r,isExtHostedGameURL:i,whichFrame:a}},PI="gd-sdk-frame-handshake-request",LI="gd-sdk-frame-handshake-response",BI=function(e){var n=this;return new Promise(function(e,r){var i=this;t(this,n);var a={type:PI},s=!1;window.addEventListener("message",(function(t){var n=t.data,r=t.origin,i=t.source,a=n.type;if(a===PI){var o={type:LI};i.postMessage(o,r)}else a===LI&&(s=!0,e({origin:r,source:i}))})),setTimeout(function(){t(this,i),s||e()}.bind(this),200),window.parent!==window?window.parent.postMessage(a,"*"):e()}.bind(this))},UI=function(){var t=e(r.mark((function e(){var t,n,i,a,s,o,d;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Nw();case 2:return t=e.sent,e.next=6,BI();case 6:if(n=e.sent,nI.SDKExistsOnUpperFrame=!!n,t){e.next=10;break}return e.abrupt("return",!1);case 10:return i=OI(),a=i.isMasterGameURL,i.isTokenGameURL,s=a(),e.next=14,Hw();case 14:return o=e.sent,d=!1,d=o?!s&&!!n:!s,e.abrupt("return",d);case 18:case"end":return e.stop()}}),e)})));return function(){return t.apply(this,arguments)}}(),MI={},FI=function(e){try{if(e.skipForward)return void yo("gd-adflow fw-skip-forward",e);if(yo("gd-adflow fw-forwarding",e),MI.source){var t={type:"gd-sdk-on-event",event:e};MI.source.postMessage(t,MI.origin)}}catch(e){console.log("gd-sdk forwardEvent err",e)}},jI=function(){FI({name:"SDK_READY",status:"success",message:"Everything is ready."}),FI({name:"SDK_GAME_START",status:"success",message:"Advertisement(s) are done. Start / resume the game."}),FI({name:"CONTENT_RESUME_REQUESTED",status:"success",message:"Fired when content should be resumed. This usually happens when an ad finishes or collapses."})},GI=function(n){window.addEventListener("message",(function(i){var a=i.data,s=i.origin,o=i.source,d=a.type,u=a.method,c=a.options;if("gd-sdk-self"!==d){if("gd-sdk"===d){if(!MI.source&&"init"===u)return function(e){var t=e.source,n=e.origin;MI={source:t,origin:n}}({source:o,origin:s}),void jI();var l=n[u];l&&e(r.mark((function e(){var i,a=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,function(){t(this,a),"showAd"===u&&xo.firstAdapterModeAdsense&&"rewarded"!==c.adType&&(console.log("promo-test, set first adapter to adssense 3"),c.params=c.params?c.params:{},c.params.adapter="adsense")}.bind(this),!(i=l.apply(n,Object.values(c)))||!i.then){e.next=6;break}return e.next=6,i;case 6:e.next=11;break;case 8:e.prev=8,e.t0=e.catch(0),console.log("gd:adp:m:r onFrameMessage error",e.t0);case 11:case"end":return e.stop()}}),e,this,[[0,8]])})))()}}else{var h={type:"gd-sdk",method:u,options:c};window.postMessage(h,location.origin)}}),!1)},NI=function(e){!function(e){var t=e.onEvent;e.onEvent=function(e){FI(e),t.apply(this,arguments)}}(e);var t=new DI(e);return GI(t),t},qI=function(){function t(){R(this,t),this.moduleName="GDAeria",this.moduleConfig={source:"https://pm.azerioncircle.com/@bygd/gd-sdk-aeria/1.0.1/dist/default/iife/index.js",dependencies:[]},Zg(this.moduleName,this.moduleConfig)}var n,i;return S(t,[{key:"load",value:(i=e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,eA(this.moduleName);case 3:this.module=e.sent,yo("aeria module load success",this.module),e.next=11;break;case 7:e.prev=7,e.t0=e.catch(0),console.log("aeria module load error",e.t0),this.module=null;case 11:case"end":return e.stop()}}),e,this,[[0,7]])}))),function(){return i.apply(this,arguments)})},{key:"runYMenu",value:(n=e(r.mark((function e(t){var n;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.gameId,this.module){e.next=4;break}return e.next=4,this.load();case 4:(new this.module.Aeria).renderYMenu({gameId:n});case 6:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})}]),t}(),HI=function(){var t=e(r.mark((function t(){var n,i,a,s,o,d,u,c,l,h,p,f,m,v,g,A;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=function(){var e,t=(e=new Cy).get("partner.domain.value")||e.get("top.domain.value");return{isAeriaDomain:"minigame.aeriagames.jp"===t||"minigame-stg.aeriagames.jp"===t,isAeriaStagingDomain:"minigame-stg.aeriagames.jp"===t}}(),i=n.isAeriaDomain,a=n.isAeriaStagingDomain,!i){t.next=21;break}return d=function(){var e=(new Cy).get("partner.url.value");return new I(e,!0)},u=function(){var e="ae-soft-323";try{var t=d(),n=t.pathname,r=n.split("/"),i=r[r.length-1];wo("aeria-ylogin:loc",t,n,i),e=i}catch(e){ko("Error on getting aeria game id",e)}return e}(),c={action:"score",data:{gameId:u,score:100},env:a?"staging":"production",system:"Softgames"},l=function(){var e=window.parent||window,t=c;e.postMessage(t,"*")},h=new _,t.next=13,Lw();case 13:p=t.sent,f=null==p||null===(s=p.aeria)||void 0===s?void 0:s.yMenuExcluded,m=null==p||null===(o=p.aeria)||void 0===o?void 0:o.yLoginExcluded,h.subscribe("AD_FLOW_COMPLETE",(function(e){"midroll"===e.adType&&(m||l())})),v=function(){var t=e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(new qI).runYMenu({gameId:u});case 2:case"end":return e.stop()}}),e)})));return function(){return t.apply(this,arguments)}}(),g=OI(),A=g.whichFrame,"game-frame"===A()&&(f||v());case 21:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),VI=function(e){try{var t=$y(e);e.gameId||t.send("nogameid",{message:"".concat(vb.parentURL)})}catch(e){}},QI=function(){var t=e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,HI();case 3:e.next=8;break;case 5:e.prev=5,e.t0=e.catch(0),console.log("error on creating some bridge module");case 8:case"end":return e.stop()}}),e,null,[[0,5]])})));return function(){return t.apply(this,arguments)}}(),zI={create:function(){var t=e(r.mark((function e(t){var n,i;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,VI(t),Pw(t),e.next=5,UI();case 5:return n=e.sent,e.next=8,QI();case 8:if(window.isForwarderFrame=n,!n){e.next=15;break}return e.next=12,CI(t);case 12:e.t0=e.sent,e.next=16;break;case 15:e.t0=NI(t);case 16:return i=e.t0,Qw(),e.abrupt("return",i);case 21:return e.prev=21,e.t1=e.catch(0),console.log("gd:adp: sdk adaptor create failed, fallback to default adapter",e.t1),e.abrupt("return",NI(t));case 25:case"end":return e.stop()}}),e,null,[[0,21]])})));return function(e){return t.apply(this,arguments)}}()};function WI(){return(WI=e(r.mark((function e(t,n){var i;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Kw();case 2:if(!e.sent){e.next=7;break}e.t0=window.gdsdk,e.next=10;break;case 7:return e.next=9,YI(t);case 9:e.t0=e.sent;case 10:return i=e.t0,e.abrupt("return",n(i));case 12:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var KI=!1;function YI(e){var n=this;return new Promise(function(r,i){var a=this;if(t(this,n),RI)return r(RI);if(KI)var s=setInterval(function(){t(this,a),RI&&(KI=!1,clearInterval(s),r(RI))}.bind(this),100);else KI=!0,zI.create(e).then(function(e){t(this,a),RI=e,e._sendSDKReady(),KI=!1,r(RI)}.bind(this))}.bind(this))}function JI(e){return YI(e),{invoke:function(t){return function(e,t){return WI.apply(this,arguments)}(e,t)}}}var XI,ZI,$I=es,eC=Fr,tC=Vi.f,nC=ei,rC=ds,iC=uA,aC=ve,sC=lA,oC=eC("".endsWith),dC=eC("".slice),uC=Math.min,cC=sC("endsWith"),lC=!cC&&!!function(){var e=tC(String.prototype,"endsWith");return e&&!e.writable}();function hC(n,i){var a=this;return new Promise(function(s,o){var d,u=this;t(this,a);var c=function(e){var t="https://pm.azerioncircle.com/pkg/@bygd/gd-sdk-wrp/dist/default/iife/index.js";return e&&(t="https://pm.azerioncircle.com/@bygd/gd-sdk-wrp/".concat(e,"/dist/default/iife/index.js")),[t]}(null==i||null===(d=i.game)||void 0===d?void 0:d.version);pC({text:"sdk-wrapper-script-load"}),m(c[0],"gd-sdk-wrp",{alternates:c}).catch(function(e){t(this,u),pC({text:"sdk-wrapper load error",error:e.message}),this._sendSDKError(e),o(e)}.bind(this)).then(e(r.mark((function e(){var t,a;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,pC({text:"sdk-wrapper load success"}),t=window.GDSDKWRP.GDSDKWRP,a=new t,pC({text:"sdk-wrapper before gdSdkWrp.init"}),e.next=7,a.init(n,i);case 7:ZI=e.sent,pC({text:"sdk-wrapper after gdSdkWrp.init"}),s(ZI),e.next=16;break;case 12:e.prev=12,e.t0=e.catch(0),pC({text:"sdk-wrapper load error 2",error:e.t0.message}),o(e.t0);case 16:case"end":return e.stop()}}),e,null,[[0,12]])}))))}.bind(this))}function pC(e){try{var t={tp:"gd.wrp",args:e};fetch("https://tag.atom.gamedistribution.com/v1/dmp?ar=".concat(encodeURIComponent(C.encode(JSON.stringify(t))))),console.log(G(Object.values(e)))}catch(e){}}function fC(e){if(e){var t=e.name,n=e.message,r=e.status;try{pC({text:"samsung-wrp send-game-event",evt:e,hasOptions:!!XI}),XI&&XI.onEvent({name:t,message:n,status:r})}catch(t){pC({text:"samsung-wrp DEVELOPER-ERROR",evt:e,err:t})}}}function mC(e){try{return"samsungapps.com"===e||e.endsWith(".samsungapps.com")}catch(e){return!1}}function vC(e){return gC.apply(this,arguments)}function gC(){return(gC=e(r.mark((function e(t){var n,i,a,s,o,d,u,c,l;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return XI=t,Pw(t),e.next=4,Lw();case 4:if(s=e.sent,!ZI){e.next=7;break}return e.abrupt("return",ZI);case 7:if(o=null==s||null===(n=s.sdk_wrp)||void 0===n?void 0:n.enabled,d=null==s||null===(i=s.sdk_wrp)||void 0===i?void 0:i.version,u=null==s?void 0:s.gameId,c=null==s?void 0:s.title,bC("isWrapEnabled ".concat(o)),o){e.next=14;break}return e.abrupt("return");case 14:return l=null==s||null===(a=s.sdk_wrp)||void 0===a?void 0:a.wrapper,e.next=17,hC(l,{onEvent:fC,game:{gameId:u,title:c,version:d}});case 17:return ZI=e.sent,e.abrupt("return",ZI);case 19:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function AC(){return AC=e(r.mark((function e(t){var n,i,a;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t._get_developer_sets,bC("beforeGetDeveloperSettings"),i=n(),bC("afterGetDeveloperSettings"),e.prev=4,e.next=7,vC(i);case 7:a=e.sent,bC("after get SDK wrapper: ".concat(!!a)),a&&(bC("setting SDK Wrapper as gd-sdk"),window.sdkWrapper=a,window.gdsdk=a,window.gdApi=window.gdsdk),e.next=16;break;case 12:e.prev=12,e.t0=e.catch(4),console.log("Error on SDK wrapper init",e.t0),bC("Error on SDK wrapper init: ".concat(e.t0.message));case 16:case"end":return e.stop()}}),e,null,[[4,12]])}))),AC.apply(this,arguments)}function bC(e){window.sdkLog.push(e)}function _C(){var e={};try{"object"===("undefined"==typeof GD_OPTIONS?"undefined":n(GD_OPTIONS))&&GD_OPTIONS?e=GD_OPTIONS:window.gdApi&&"object"===n(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}$I({target:"String",proto:!0,forced:!lC&&!cC},{endsWith:function(e){var t=rC(aC(this));iC(e);var n=arguments.length>1?arguments[1]:void 0,r=t.length,i=void 0===n?r:uC(nC(n),r),a=rC(e);return oC?oC(t,a,i):dC(t,i-a.length,i)===a}}),window.sdkLog=[],function(){var e=function(){var e,t=I(window.location.href,!0),n=t.host,r=t.query,i=n,a=null==r?void 0:r.gd_sdk_referrer_url;if(a){var s;a=a.startsWith("https://")||a.startsWith("http://")?a:"https://".concat(a),null!==(s=e=I(a,!0))&&void 0!==s&&s.host&&(i=e.host)}return i}(),t=new Cy,n=t.get("top.domain.value"),r=t.get("partner.domain.value");return mC(e)||mC(n)||mC(r)}()?bC("skipped normal SDK init!"):(!function(){sR();var n=JI(_C());function i(){var i=this;this.AdType=v,this.preloadAd=function(){var i=e(r.mark((function e(i){var a,s=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.invoke(function(e){return t(this,s),e.preloadAd(i)}.bind(this));case 2:return a=e.sent,wo("[developer-event] preloadAd check",a),e.abrupt("return",a);case 5:case"end":return e.stop()}}),e,this)})));return function(e){return i.apply(this,arguments)}}(),this.showAd=function(){var i=e(r.mark((function e(i,a){var s,o=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.invoke(function(e){var n=this;if(t(this,o),i===v.Display)return e.showDisplayAd(a);var r={};return function(){t(this,n),xo.firstAdapterModeAdsense&&(console.log("promo-test, set first adapter to adssense 2"),r.adapter="adsense")}.bind(this),e.showAd(i,r)}.bind(this));case 2:return s=e.sent,wo("[developer-event] after showAd",s),e.abrupt("return",s);case 5:case"end":return e.stop()}}),e,this)})));return function(e,t){return i.apply(this,arguments)}}(),this.cancelAd=function(){var e=this;return n.invoke(function(n){return t(this,e),n.cancelAd()}.bind(this))},this.openConsole=function(){var e=this;return n.invoke(function(n){return t(this,e),n.openConsole()}.bind(this))},this.getSession=function(){var e=this;return n.invoke(function(n){return t(this,e),n.session()}.bind(this))},this.sendEvent=function(e){var r=this;return n.invoke(function(n){return t(this,r),n.sendGenericEvent(e)}.bind(this))},this.leaderboard={show:function(){t(this,i),nA.showLeaderboard()}.bind(this),addScore:function(e){t(this,i),nA.addScore(e)}.bind(this)}}i.prototype=new function(){this.showBanner=function(){var e=this;return n.invoke(function(n){return t(this,e),n.showBanner()}.bind(this))},this.play=function(){},this.customLog=function(){}},window.gdsdk=new i,window.gdApi=window.gdsdk}(),bC("afterSDKInit")),function(e){AC.apply(this,arguments)}({_get_developer_sets:_C});
1
+ import e from"@babel/runtime/helpers/asyncToGenerator";import t from"@babel/runtime/helpers/newArrowCheck";import n from"@babel/runtime/helpers/typeof";import r from"@babel/runtime/regenerator";import{parseJSON as i,getParentUrl as a,getParentDomain as s,getIframeDepth as o,getQueryParams as d,getTopDomain as u,getMobilePlatform as c,MessageRouter as l,Ls as h,extendDefaults as p,dankLog as f,getScript as m,AdType as v,Layers as g,getKeyByValue as A,getQueryString as b,EventBus as _,getIMASampleTags as y,SDKEvents as w,IMAEvents as k,Macros as x,setDankLog as E,ImplementationTest as D}from"@bygd/gd-sdk-era/dist/default";import S from"@babel/runtime/helpers/createClass";import R from"@babel/runtime/helpers/classCallCheck";import T from"@babel/runtime/helpers/defineProperty";import I from"url-parse";import{Base64 as C}from"js-base64";import O from"validator";import P from"is-valid-domain";import L from"get-value";import B from"set-value";import U from"lodash.clonedeep";import{EventEmitter as M}from"events";import F from"@fnet/inter-service-js";import j from"ua-parser-js";import G from"@babel/runtime/helpers/toConsumableArray";import N from"can-autoplay";import{isPlainObject as q}from"is-plain-object";import H from"querystringify";import V from"lodash.merge";import{v4 as Q}from"uuid";import z from"@flownet/lib-connect-to-tcf";var W="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},K=function(e){return e&&e.Math==Math&&e},Y=K("object"==typeof globalThis&&globalThis)||K("object"==typeof window&&window)||K("object"==typeof self&&self)||K("object"==typeof W&&W)||function(){return this}()||Function("return this")(),J={exports:{}},X=Y,Z=Object.defineProperty,$=function(e,t){try{Z(X,e,{value:t,configurable:!0,writable:!0})}catch(n){X[e]=t}return t},ee=$,te="__core-js_shared__",ne=Y[te]||ee(te,{}),re=ne;(J.exports=function(e,t){return re[e]||(re[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.30.1",mode:"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.30.1/LICENSE",source:"https://github.com/zloirock/core-js"});var ie,ae,se=function(e){try{return!!e()}catch(e){return!0}},oe=!se((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),de=oe,ue=Function.prototype,ce=ue.call,le=de&&ue.bind.bind(ce,ce),he=de?le:function(e){return function(){return ce.apply(e,arguments)}},pe=function(e){return null==e},fe=pe,me=TypeError,ve=function(e){if(fe(e))throw me("Can't call method on "+e);return e},ge=ve,Ae=Object,be=function(e){return Ae(ge(e))},_e=be,ye=he({}.hasOwnProperty),we=Object.hasOwn||function(e,t){return ye(_e(e),t)},ke=he,xe=0,Ee=Math.random(),De=ke(1..toString),Se=function(e){return"Symbol("+(void 0===e?"":e)+")_"+De(++xe+Ee,36)},Re="undefined"!=typeof navigator&&String(navigator.userAgent)||"",Te=Y,Ie=Re,Ce=Te.process,Oe=Te.Deno,Pe=Ce&&Ce.versions||Oe&&Oe.version,Le=Pe&&Pe.v8;Le&&(ae=(ie=Le.split("."))[0]>0&&ie[0]<4?1:+(ie[0]+ie[1])),!ae&&Ie&&(!(ie=Ie.match(/Edge\/(\d+)/))||ie[1]>=74)&&(ie=Ie.match(/Chrome\/(\d+)/))&&(ae=+ie[1]);var Be=ae,Ue=Be,Me=se,Fe=!!Object.getOwnPropertySymbols&&!Me((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Ue&&Ue<41})),je=Fe&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Ge=Y,Ne=J.exports,qe=we,He=Se,Ve=Fe,Qe=je,ze=Ge.Symbol,We=Ne("wks"),Ke=Qe?ze.for||ze:ze&&ze.withoutSetter||He,Ye=function(e){return qe(We,e)||(We[e]=Ve&&qe(ze,e)?ze[e]:Ke("Symbol."+e)),We[e]},Je={};Je[Ye("toStringTag")]="z";var Xe="[object z]"===String(Je),Ze="object"==typeof document&&document.all,$e={all:Ze,IS_HTMLDDA:void 0===Ze&&void 0!==Ze},et=$e.all,tt=$e.IS_HTMLDDA?function(e){return"function"==typeof e||e===et}:function(e){return"function"==typeof e},nt={},rt=!se((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),it=tt,at=$e.all,st=$e.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:it(e)||e===at}:function(e){return"object"==typeof e?null!==e:it(e)},ot=st,dt=Y.document,ut=ot(dt)&&ot(dt.createElement),ct=function(e){return ut?dt.createElement(e):{}},lt=ct,ht=!rt&&!se((function(){return 7!=Object.defineProperty(lt("div"),"a",{get:function(){return 7}}).a})),pt=rt&&se((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),ft=st,mt=String,vt=TypeError,gt=function(e){if(ft(e))return e;throw vt(mt(e)+" is not an object")},At=oe,bt=Function.prototype.call,_t=At?bt.bind(bt):function(){return bt.apply(bt,arguments)},yt=Y,wt=tt,kt=function(e,t){return arguments.length<2?(n=yt[e],wt(n)?n:void 0):yt[e]&&yt[e][t];var n},xt=he({}.isPrototypeOf),Et=kt,Dt=tt,St=xt,Rt=Object,Tt=je?function(e){return"symbol"==typeof e}:function(e){var t=Et("Symbol");return Dt(t)&&St(t.prototype,Rt(e))},It=String,Ct=function(e){try{return It(e)}catch(e){return"Object"}},Ot=tt,Pt=Ct,Lt=TypeError,Bt=function(e){if(Ot(e))return e;throw Lt(Pt(e)+" is not a function")},Ut=Bt,Mt=pe,Ft=function(e,t){var n=e[t];return Mt(n)?void 0:Ut(n)},jt=_t,Gt=tt,Nt=st,qt=TypeError,Ht=_t,Vt=st,Qt=Tt,zt=Ft,Wt=function(e,t){var n,r;if("string"===t&&Gt(n=e.toString)&&!Nt(r=jt(n,e)))return r;if(Gt(n=e.valueOf)&&!Nt(r=jt(n,e)))return r;if("string"!==t&&Gt(n=e.toString)&&!Nt(r=jt(n,e)))return r;throw qt("Can't convert object to primitive value")},Kt=TypeError,Yt=Ye("toPrimitive"),Jt=function(e,t){if(!Vt(e)||Qt(e))return e;var n,r=zt(e,Yt);if(r){if(void 0===t&&(t="default"),n=Ht(r,e,t),!Vt(n)||Qt(n))return n;throw Kt("Can't convert object to primitive value")}return void 0===t&&(t="number"),Wt(e,t)},Xt=Tt,Zt=function(e){var t=Jt(e,"string");return Xt(t)?t:t+""},$t=rt,en=ht,tn=pt,nn=gt,rn=Zt,an=TypeError,sn=Object.defineProperty,on=Object.getOwnPropertyDescriptor,dn="enumerable",un="configurable",cn="writable";nt.f=$t?tn?function(e,t,n){if(nn(e),t=rn(t),nn(n),"function"==typeof e&&"prototype"===t&&"value"in n&&cn in n&&!n[cn]){var r=on(e,t);r&&r[cn]&&(e[t]=n.value,n={configurable:un in n?n[un]:r[un],enumerable:dn in n?n[dn]:r[dn],writable:!1})}return sn(e,t,n)}:sn:function(e,t,n){if(nn(e),t=rn(t),nn(n),en)try{return sn(e,t,n)}catch(e){}if("get"in n||"set"in n)throw an("Accessors not supported");return"value"in n&&(e[t]=n.value),e};var ln={exports:{}},hn=rt,pn=we,fn=Function.prototype,mn=hn&&Object.getOwnPropertyDescriptor,vn=pn(fn,"name"),gn={EXISTS:vn,PROPER:vn&&"something"===function(){}.name,CONFIGURABLE:vn&&(!hn||hn&&mn(fn,"name").configurable)},An=tt,bn=ne,_n=he(Function.toString);An(bn.inspectSource)||(bn.inspectSource=function(e){return _n(e)});var yn,wn,kn,xn=bn.inspectSource,En=tt,Dn=Y.WeakMap,Sn=En(Dn)&&/native code/.test(String(Dn)),Rn=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},Tn=nt,In=Rn,Cn=rt?function(e,t,n){return Tn.f(e,t,In(1,n))}:function(e,t,n){return e[t]=n,e},On=J.exports,Pn=Se,Ln=On("keys"),Bn=function(e){return Ln[e]||(Ln[e]=Pn(e))},Un={},Mn=Sn,Fn=Y,jn=st,Gn=Cn,Nn=we,qn=ne,Hn=Bn,Vn=Un,Qn="Object already initialized",zn=Fn.TypeError,Wn=Fn.WeakMap;if(Mn||qn.state){var Kn=qn.state||(qn.state=new Wn);Kn.get=Kn.get,Kn.has=Kn.has,Kn.set=Kn.set,yn=function(e,t){if(Kn.has(e))throw zn(Qn);return t.facade=e,Kn.set(e,t),t},wn=function(e){return Kn.get(e)||{}},kn=function(e){return Kn.has(e)}}else{var Yn=Hn("state");Vn[Yn]=!0,yn=function(e,t){if(Nn(e,Yn))throw zn(Qn);return t.facade=e,Gn(e,Yn,t),t},wn=function(e){return Nn(e,Yn)?e[Yn]:{}},kn=function(e){return Nn(e,Yn)}}var Jn={set:yn,get:wn,has:kn,enforce:function(e){return kn(e)?wn(e):yn(e,{})},getterFor:function(e){return function(t){var n;if(!jn(t)||(n=wn(t)).type!==e)throw zn("Incompatible receiver, "+e+" required");return n}}},Xn=he,Zn=se,$n=tt,er=we,tr=rt,nr=gn.CONFIGURABLE,rr=xn,ir=Jn.enforce,ar=Jn.get,sr=String,or=Object.defineProperty,dr=Xn("".slice),ur=Xn("".replace),cr=Xn([].join),lr=tr&&!Zn((function(){return 8!==or((function(){}),"length",{value:8}).length})),hr=String(String).split("String"),pr=ln.exports=function(e,t,n){"Symbol("===dr(sr(t),0,7)&&(t="["+ur(sr(t),/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!er(e,"name")||nr&&e.name!==t)&&(tr?or(e,"name",{value:t,configurable:!0}):e.name=t),lr&&n&&er(n,"arity")&&e.length!==n.arity&&or(e,"length",{value:n.arity});try{n&&er(n,"constructor")&&n.constructor?tr&&or(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var r=ir(e);return er(r,"source")||(r.source=cr(hr,"string"==typeof t?t:"")),e};Function.prototype.toString=pr((function(){return $n(this)&&ar(this).source||rr(this)}),"toString");var fr=tt,mr=nt,vr=ln.exports,gr=$,Ar=function(e,t,n,r){r||(r={});var i=r.enumerable,a=void 0!==r.name?r.name:t;if(fr(n)&&vr(n,a,r),r.global)i?e[t]=n:gr(t,n);else{try{r.unsafe?e[t]&&(i=!0):delete e[t]}catch(e){}i?e[t]=n:mr.f(e,t,{value:n,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return e},br=he,_r=br({}.toString),yr=br("".slice),wr=function(e){return yr(_r(e),8,-1)},kr=Xe,xr=tt,Er=wr,Dr=Ye("toStringTag"),Sr=Object,Rr="Arguments"==Er(function(){return arguments}()),Tr=kr?Er: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=Sr(e),Dr))?n:Rr?Er(t):"Object"==(r=Er(t))&&xr(t.callee)?"Arguments":r},Ir=Tr,Cr=Xe?{}.toString:function(){return"[object "+Ir(this)+"]"};Xe||Ar(Object.prototype,"toString",Cr,{unsafe:!0});var Or={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},Pr=ct("span").classList,Lr=Pr&&Pr.constructor&&Pr.constructor.prototype,Br=Lr===Object.prototype?void 0:Lr,Ur=wr,Mr=he,Fr=function(e){if("Function"===Ur(e))return Mr(e)},jr=Bt,Gr=oe,Nr=Fr(Fr.bind),qr=function(e,t){return jr(e),void 0===t?e:Gr?Nr(e,t):function(){return e.apply(t,arguments)}},Hr=se,Vr=wr,Qr=Object,zr=he("".split),Wr=Hr((function(){return!Qr("z").propertyIsEnumerable(0)}))?function(e){return"String"==Vr(e)?zr(e,""):Qr(e)}:Qr,Kr=Math.ceil,Yr=Math.floor,Jr=Math.trunc||function(e){var t=+e;return(t>0?Yr:Kr)(t)},Xr=function(e){var t=+e;return t!=t||0===t?0:Jr(t)},Zr=Xr,$r=Math.min,ei=function(e){return e>0?$r(Zr(e),9007199254740991):0},ti=ei,ni=function(e){return ti(e.length)},ri=wr,ii=Array.isArray||function(e){return"Array"==ri(e)},ai=he,si=se,oi=tt,di=Tr,ui=xn,ci=function(){},li=[],hi=kt("Reflect","construct"),pi=/^\s*(?:class|function)\b/,fi=ai(pi.exec),mi=!pi.exec(ci),vi=function(e){if(!oi(e))return!1;try{return hi(ci,li,e),!0}catch(e){return!1}},gi=function(e){if(!oi(e))return!1;switch(di(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return mi||!!fi(pi,ui(e))}catch(e){return!0}};gi.sham=!0;var Ai=!hi||si((function(){var e;return vi(vi.call)||!vi(Object)||!vi((function(){e=!0}))||e}))?gi:vi,bi=ii,_i=Ai,yi=st,wi=Ye("species"),ki=Array,xi=function(e){var t;return bi(e)&&(t=e.constructor,(_i(t)&&(t===ki||bi(t.prototype))||yi(t)&&null===(t=t[wi]))&&(t=void 0)),void 0===t?ki:t},Ei=function(e,t){return new(xi(e))(0===t?0:t)},Di=qr,Si=Wr,Ri=be,Ti=ni,Ii=Ei,Ci=he([].push),Oi=function(e){var t=1==e,n=2==e,r=3==e,i=4==e,a=6==e,s=7==e,o=5==e||a;return function(d,u,c,l){for(var h,p,f=Ri(d),m=Si(f),v=Di(u,c),g=Ti(m),A=0,b=l||Ii,_=t?b(d,g):n||s?b(d,0):void 0;g>A;A++)if((o||A in m)&&(p=v(h=m[A],A,f),e))if(t)_[A]=p;else if(p)switch(e){case 3:return!0;case 5:return h;case 6:return A;case 2:Ci(_,h)}else switch(e){case 4:return!1;case 7:Ci(_,h)}return a?-1:r||i?i:_}},Pi={forEach:Oi(0),map:Oi(1),filter:Oi(2),some:Oi(3),every:Oi(4),find:Oi(5),findIndex:Oi(6),filterReject:Oi(7)},Li=se,Bi=function(e,t){var n=[][e];return!!n&&Li((function(){n.call(null,t||function(){return 1},1)}))},Ui=Pi.forEach,Mi=Y,Fi=Or,ji=Br,Gi=Bi("forEach")?[].forEach:function(e){return Ui(this,e,arguments.length>1?arguments[1]:void 0)},Ni=Cn,qi=function(e){if(e&&e.forEach!==Gi)try{Ni(e,"forEach",Gi)}catch(t){e.forEach=Gi}};for(var Hi in Fi)Fi[Hi]&&qi(Mi[Hi]&&Mi[Hi].prototype);qi(ji);var Vi={},Qi={},zi={}.propertyIsEnumerable,Wi=Object.getOwnPropertyDescriptor,Ki=Wi&&!zi.call({1:2},1);Qi.f=Ki?function(e){var t=Wi(this,e);return!!t&&t.enumerable}:zi;var Yi=Wr,Ji=ve,Xi=function(e){return Yi(Ji(e))},Zi=rt,$i=_t,ea=Qi,ta=Rn,na=Xi,ra=Zt,ia=we,aa=ht,sa=Object.getOwnPropertyDescriptor;Vi.f=Zi?sa:function(e,t){if(e=na(e),t=ra(t),aa)try{return sa(e,t)}catch(e){}if(ia(e,t))return ta(!$i(ea.f,e,t),e[t])};var oa={},da=Xr,ua=Math.max,ca=Math.min,la=function(e,t){var n=da(e);return n<0?ua(n+t,0):ca(n,t)},ha=Xi,pa=la,fa=ni,ma=function(e){return function(t,n,r){var i,a=ha(t),s=fa(a),o=pa(r,s);if(e&&n!=n){for(;s>o;)if((i=a[o++])!=i)return!0}else for(;s>o;o++)if((e||o in a)&&a[o]===n)return e||o||0;return!e&&-1}},va={includes:ma(!0),indexOf:ma(!1)},ga=we,Aa=Xi,ba=va.indexOf,_a=Un,ya=he([].push),wa=function(e,t){var n,r=Aa(e),i=0,a=[];for(n in r)!ga(_a,n)&&ga(r,n)&&ya(a,n);for(;t.length>i;)ga(r,n=t[i++])&&(~ba(a,n)||ya(a,n));return a},ka=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],xa=wa,Ea=ka.concat("length","prototype");oa.f=Object.getOwnPropertyNames||function(e){return xa(e,Ea)};var Da={};Da.f=Object.getOwnPropertySymbols;var Sa=kt,Ra=oa,Ta=Da,Ia=gt,Ca=he([].concat),Oa=Sa("Reflect","ownKeys")||function(e){var t=Ra.f(Ia(e)),n=Ta.f;return n?Ca(t,n(e)):t},Pa=we,La=Oa,Ba=Vi,Ua=nt,Ma=function(e,t,n){for(var r=La(t),i=Ua.f,a=Ba.f,s=0;s<r.length;s++){var o=r[s];Pa(e,o)||n&&Pa(n,o)||i(e,o,a(t,o))}},Fa=se,ja=tt,Ga=/#|\.prototype\./,Na=function(e,t){var n=Ha[qa(e)];return n==Qa||n!=Va&&(ja(t)?Fa(t):!!t)},qa=Na.normalize=function(e){return String(e).replace(Ga,".").toLowerCase()},Ha=Na.data={},Va=Na.NATIVE="N",Qa=Na.POLYFILL="P",za=Na,Wa=Y,Ka=Vi.f,Ya=Cn,Ja=Ar,Xa=$,Za=Ma,$a=za,es=function(e,t){var n,r,i,a,s,o=e.target,d=e.global,u=e.stat;if(n=d?Wa:u?Wa[o]||Xa(o,{}):(Wa[o]||{}).prototype)for(r in t){if(a=t[r],i=e.dontCallGetSet?(s=Ka(n,r))&&s.value:n[r],!$a(d?r:o+(u?".":"#")+r,e.forced)&&void 0!==i){if(typeof a==typeof i)continue;Za(a,i)}(e.sham||i&&i.sham)&&Ya(a,"sham",!0),Ja(n,r,a,e)}},ts=wa,ns=ka,rs=Object.keys||function(e){return ts(e,ns)},is=be,as=rs;es({target:"Object",stat:!0,forced:se((function(){as(1)}))},{keys:function(e){return as(is(e))}});var ss=Tr,os=String,ds=function(e){if("Symbol"===ss(e))throw TypeError("Cannot convert a Symbol value to a string");return os(e)},us=gt,cs=function(){var e=us(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t},ls=se,hs=Y.RegExp,ps=ls((function(){var e=hs("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),fs=ps||ls((function(){return!hs("a","y").sticky})),ms={BROKEN_CARET:ps||ls((function(){var e=hs("^r","gy");return e.lastIndex=2,null!=e.exec("str")})),MISSED_STICKY:fs,UNSUPPORTED_Y:ps},vs={},gs=rt,As=pt,bs=nt,_s=gt,ys=Xi,ws=rs;vs.f=gs&&!As?Object.defineProperties:function(e,t){_s(e);for(var n,r=ys(t),i=ws(t),a=i.length,s=0;a>s;)bs.f(e,n=i[s++],r[n]);return e};var ks,xs=kt("document","documentElement"),Es=gt,Ds=vs,Ss=ka,Rs=Un,Ts=xs,Is=ct,Cs="prototype",Os="script",Ps=Bn("IE_PROTO"),Ls=function(){},Bs=function(e){return"<"+Os+">"+e+"</"+Os+">"},Us=function(e){e.write(Bs("")),e.close();var t=e.parentWindow.Object;return e=null,t},Ms=function(){try{ks=new ActiveXObject("htmlfile")}catch(e){}var e,t,n;Ms="undefined"!=typeof document?document.domain&&ks?Us(ks):(t=Is("iframe"),n="java"+Os+":",t.style.display="none",Ts.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(Bs("document.F=Object")),e.close(),e.F):Us(ks);for(var r=Ss.length;r--;)delete Ms[Cs][Ss[r]];return Ms()};Rs[Ps]=!0;var Fs=Object.create||function(e,t){var n;return null!==e?(Ls[Cs]=Es(e),n=new Ls,Ls[Cs]=null,n[Ps]=e):n=Ms(),void 0===t?n:Ds.f(n,t)},js=se,Gs=Y.RegExp,Ns=js((function(){var e=Gs(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)})),Hs=se,Vs=Y.RegExp,Qs=Hs((function(){var e=Vs("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),zs=_t,Ws=he,Ks=ds,Ys=cs,Js=ms,Xs=J.exports,Zs=Fs,$s=Jn.get,eo=Ns,to=Qs,no=Xs("native-string-replace",String.prototype.replace),ro=RegExp.prototype.exec,ao=ro,so=Ws("".charAt),oo=Ws("".indexOf),uo=Ws("".replace),co=Ws("".slice),lo=function(){var e=/a/,t=/b*/g;return zs(ro,e,"a"),zs(ro,t,"a"),0!==e.lastIndex||0!==t.lastIndex}(),ho=Js.BROKEN_CARET,po=void 0!==/()??/.exec("")[1];(lo||po||ho||eo||to)&&(ao=function(e){var t,n,r,i,a,s,o,d=this,u=$s(d),c=Ks(e),l=u.raw;if(l)return l.lastIndex=d.lastIndex,t=zs(ao,l,c),d.lastIndex=l.lastIndex,t;var h=u.groups,p=ho&&d.sticky,f=zs(Ys,d),m=d.source,v=0,g=c;if(p&&(f=uo(f,"y",""),-1===oo(f,"g")&&(f+="g"),g=co(c,d.lastIndex),d.lastIndex>0&&(!d.multiline||d.multiline&&"\n"!==so(c,d.lastIndex-1))&&(m="(?: "+m+")",g=" "+g,v++),n=new RegExp("^(?:"+m+")",f)),po&&(n=new RegExp("^"+m+"$(?!\\s)",f)),lo&&(r=d.lastIndex),i=zs(ro,p?n:d,g),p?i?(i.input=co(i.input,v),i[0]=co(i[0],v),i.index=d.lastIndex,d.lastIndex+=i[0].length):d.lastIndex=0:lo&&i&&(d.lastIndex=d.global?i.index+i[0].length:r),po&&i&&i.length>1&&zs(no,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=s=Zs(null),a=0;a<h.length;a++)s[(o=h[a])[0]]=i[o[1]];return i});var fo=ao;es({target:"RegExp",proto:!0,forced:/./.exec!==fo},{exec:fo});var mo=Array.isArray,vo=Object.prototype.toString,go=mo||function(e){return!!e&&"[object Array]"==vo.call(e)},Ao={name:"@bygd/gd-sdk-pes",version:"1.43.35",files:["dist/*"],scripts:{build:"NODE_ENV=production rollup --config",watch:"rollup --config --watch --sourcemap inline --environment DEVELOPMENT","deploy-base":"npm install && npm run build && npm publish --access public",deploy:"npm run deploy-base && gdtool pm-upload"},repository:{type:"git",url:"git@gitlab.azerdev.com:gamedistribution/gd-sdk-pes.git"},author:"",license:"ISC",devDependencies:{"@babel/core":"^7.14.6","@babel/plugin-transform-runtime":"^7.14.5","@babel/preset-env":"^7.14.7","@rollup/plugin-babel":"^5.2.3","@rollup/plugin-commonjs":"^21.0.1","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.0.0","@rollup/plugin-replace":"^3.0.0",postcss:"^8.3.5",rollup:"^2.52.8","rollup-plugin-analyzer":"^4.0.0","rollup-plugin-browsersync":"^1.3.3","rollup-plugin-delete":"^2.0.0","rollup-plugin-node-polyfills":"^0.2.1","rollup-plugin-peer-deps-external":"^2.2.4","rollup-plugin-postcss":"^4.0.0","rollup-plugin-terser":"^7.0.2"},dependencies:{"@babel/runtime":"^7.14.6","@bygd/gd-sdk-era":"^0.3.6","@flownet/lib-connect-to-tcf":"^0.2.10","@fnet/inter-service-js":"^0.9.4",axios:"^0.26.1","can-autoplay":"^3.0.2",events:"^3.3.0","get-value":"^3.0.1","is-plain-object":"^5.0.0","is-valid-domain":"^0.1.2","js-base64":"^3.6.1","leaderboard-lib":"0.1.11","lodash.clonedeep":"^4.5.0","lodash.merge":"^4.6.2",querystringify:"^2.2.0","set-value":"^4.1.0","url-parse":"^1.4.7",uuid:"^8.3.2",validator:"^13.6.0","ua-parser-js":"^0.7.21"}},bo=function(e){var t=_o("object"===n(e)?e:i(e));return t&&t.version?Ao.version>=t.version?t:void 0:t},_o=function(e){var n=this;if(!go(e)||0===e.length)return e;if(1===e.length)return e[0];var r=0;e.forEach(function(e){t(this,n),e.weight=e.weight||1,r+=e.weight}.bind(this));var i=Math.floor(Math.random()*Math.floor(r));r=0;for(var a=0;a<e.length;a++){var s=e[a];if(i<(r+=s.weight))return s}};var yo=function(){},wo=function(){var e;(e=console).log.apply(e,arguments)},ko=function(){var e;(e=console).log.apply(e,arguments)};JSON.stringify({adapters:{default:["ima","adsense","ima","adsense"],preroll:["ima","adsense","ima","adsense"],midroll:["ima","adsense","ima","adsense"],rewarded:["ima","adsense","ima","adsense"]}}),JSON.stringify({adapters:{default:["ima","adsense","ima","adsense"],preroll:["ima","adsense","ima"],midroll:["ima","adsense","ima"],rewarded:["ima","adsense","ima","adsense"]}});var xo={},Eo={},Do=Zt,So=nt,Ro=Rn,To=function(e,t,n){var r=Do(t);r in e?So.f(e,r,Ro(0,n)):e[r]=n},Io=la,Co=ni,Oo=To,Po=Array,Lo=Math.max,Bo=function(e,t,n){for(var r=Co(e),i=Io(t,r),a=Io(void 0===n?r:n,r),s=Po(Lo(a-i,0)),o=0;i<a;i++,o++)Oo(s,o,e[i]);return s.length=o,s},Uo=wr,Mo=Xi,Fo=oa.f,jo=Bo,Go="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];Eo.f=function(e){return Go&&"Window"==Uo(e)?function(e){try{return Fo(e)}catch(e){return jo(Go)}}(e):Fo(Mo(e))};var No=ln.exports,qo=nt,Ho=function(e,t,n){return n.get&&No(n.get,t,{getter:!0}),n.set&&No(n.set,t,{setter:!0}),qo.f(e,t,n)},Vo={},Qo=Ye;Vo.f=Qo;var zo=Y,Wo=we,Ko=Vo,Yo=nt.f,Jo=function(e){var t=zo.Symbol||(zo.Symbol={});Wo(t,e)||Yo(t,e,{value:Ko.f(e)})},Xo=_t,Zo=kt,$o=Ye,ed=Ar,td=nt.f,nd=we,rd=Ye("toStringTag"),id=function(e,t,n){e&&!n&&(e=e.prototype),e&&!nd(e,rd)&&td(e,rd,{configurable:!0,value:t})},ad=es,sd=Y,od=_t,dd=he,ud=rt,cd=Fe,ld=se,hd=we,pd=xt,fd=gt,md=Xi,vd=Zt,gd=ds,Ad=Rn,bd=Fs,_d=rs,yd=oa,wd=Eo,kd=Da,xd=Vi,Ed=nt,Dd=vs,Sd=Qi,Rd=Ar,Td=Ho,Id=J.exports,Cd=Un,Od=Se,Pd=Ye,Ld=Vo,Bd=Jo,Ud=function(){var e=Zo("Symbol"),t=e&&e.prototype,n=t&&t.valueOf,r=$o("toPrimitive");t&&!t[r]&&ed(t,r,(function(e){return Xo(n,this)}),{arity:1})},Md=id,Fd=Jn,jd=Pi.forEach,Gd=Bn("hidden"),Nd="Symbol",qd="prototype",Hd=Fd.set,Vd=Fd.getterFor(Nd),Qd=Object[qd],zd=sd.Symbol,Wd=zd&&zd[qd],Kd=sd.TypeError,Yd=sd.QObject,Jd=xd.f,Xd=Ed.f,Zd=wd.f,$d=Sd.f,eu=dd([].push),tu=Id("symbols"),nu=Id("op-symbols"),ru=Id("wks"),iu=!Yd||!Yd[qd]||!Yd[qd].findChild,au=ud&&ld((function(){return 7!=bd(Xd({},"a",{get:function(){return Xd(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=Jd(Qd,t);r&&delete Qd[t],Xd(e,t,n),r&&e!==Qd&&Xd(Qd,t,r)}:Xd,su=function(e,t){var n=tu[e]=bd(Wd);return Hd(n,{type:Nd,tag:e,description:t}),ud||(n.description=t),n},ou=function(e,t,n){e===Qd&&ou(nu,t,n),fd(e);var r=vd(t);return fd(n),hd(tu,r)?(n.enumerable?(hd(e,Gd)&&e[Gd][r]&&(e[Gd][r]=!1),n=bd(n,{enumerable:Ad(0,!1)})):(hd(e,Gd)||Xd(e,Gd,Ad(1,{})),e[Gd][r]=!0),au(e,r,n)):Xd(e,r,n)},du=function(e,t){fd(e);var n=md(t),r=_d(n).concat(hu(n));return jd(r,(function(t){ud&&!od(uu,n,t)||ou(e,t,n[t])})),e},uu=function(e){var t=vd(e),n=od($d,this,t);return!(this===Qd&&hd(tu,t)&&!hd(nu,t))&&(!(n||!hd(this,t)||!hd(tu,t)||hd(this,Gd)&&this[Gd][t])||n)},cu=function(e,t){var n=md(e),r=vd(t);if(n!==Qd||!hd(tu,r)||hd(nu,r)){var i=Jd(n,r);return!i||!hd(tu,r)||hd(n,Gd)&&n[Gd][r]||(i.enumerable=!0),i}},lu=function(e){var t=Zd(md(e)),n=[];return jd(t,(function(e){hd(tu,e)||hd(Cd,e)||eu(n,e)})),n},hu=function(e){var t=e===Qd,n=Zd(t?nu:md(e)),r=[];return jd(n,(function(e){!hd(tu,e)||t&&!hd(Qd,e)||eu(r,tu[e])})),r};cd||(Rd(Wd=(zd=function(){if(pd(Wd,this))throw Kd("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?gd(arguments[0]):void 0,t=Od(e),n=function(e){this===Qd&&od(n,nu,e),hd(this,Gd)&&hd(this[Gd],t)&&(this[Gd][t]=!1),au(this,t,Ad(1,e))};return ud&&iu&&au(Qd,t,{configurable:!0,set:n}),su(t,e)})[qd],"toString",(function(){return Vd(this).tag})),Rd(zd,"withoutSetter",(function(e){return su(Od(e),e)})),Sd.f=uu,Ed.f=ou,Dd.f=du,xd.f=cu,yd.f=wd.f=lu,kd.f=hu,Ld.f=function(e){return su(Pd(e),e)},ud&&(Td(Wd,"description",{configurable:!0,get:function(){return Vd(this).description}}),Rd(Qd,"propertyIsEnumerable",uu,{unsafe:!0}))),ad({global:!0,constructor:!0,wrap:!0,forced:!cd,sham:!cd},{Symbol:zd}),jd(_d(ru),(function(e){Bd(e)})),ad({target:Nd,stat:!0,forced:!cd},{useSetter:function(){iu=!0},useSimple:function(){iu=!1}}),ad({target:"Object",stat:!0,forced:!cd,sham:!ud},{create:function(e,t){return void 0===t?bd(e):du(bd(e),t)},defineProperty:ou,defineProperties:du,getOwnPropertyDescriptor:cu}),ad({target:"Object",stat:!0,forced:!cd},{getOwnPropertyNames:lu}),Ud(),Md(zd,Nd),Cd[Gd]=!0;var pu=Fe&&!!Symbol.for&&!!Symbol.keyFor,fu=es,mu=kt,vu=we,gu=ds,Au=J.exports,bu=pu,_u=Au("string-to-symbol-registry"),yu=Au("symbol-to-string-registry");fu({target:"Symbol",stat:!0,forced:!bu},{for:function(e){var t=gu(e);if(vu(_u,t))return _u[t];var n=mu("Symbol")(t);return _u[t]=n,yu[n]=t,n}});var wu=es,ku=we,xu=Tt,Eu=Ct,Du=pu,Su=(0,J.exports)("symbol-to-string-registry");wu({target:"Symbol",stat:!0,forced:!Du},{keyFor:function(e){if(!xu(e))throw TypeError(Eu(e)+" is not a symbol");if(ku(Su,e))return Su[e]}});var Ru=oe,Tu=Function.prototype,Iu=Tu.apply,Cu=Tu.call,Ou="object"==typeof Reflect&&Reflect.apply||(Ru?Cu.bind(Iu):function(){return Cu.apply(Iu,arguments)}),Pu=he([].slice),Lu=ii,Bu=tt,Uu=wr,Mu=ds,Fu=he([].push),ju=es,Gu=kt,Nu=Ou,qu=_t,Hu=he,Vu=se,Qu=tt,zu=Tt,Wu=Pu,Ku=function(e){if(Bu(e))return e;if(Lu(e)){for(var t=e.length,n=[],r=0;r<t;r++){var i=e[r];"string"==typeof i?Fu(n,i):"number"!=typeof i&&"Number"!=Uu(i)&&"String"!=Uu(i)||Fu(n,Mu(i))}var a=n.length,s=!0;return function(e,t){if(s)return s=!1,t;if(Lu(this))return t;for(var r=0;r<a;r++)if(n[r]===e)return t}}},Yu=Fe,Ju=String,Xu=Gu("JSON","stringify"),Zu=Hu(/./.exec),$u=Hu("".charAt),ec=Hu("".charCodeAt),tc=Hu("".replace),nc=Hu(1..toString),rc=/[\uD800-\uDFFF]/g,ic=/^[\uD800-\uDBFF]$/,ac=/^[\uDC00-\uDFFF]$/,sc=!Yu||Vu((function(){var e=Gu("Symbol")();return"[null]"!=Xu([e])||"{}"!=Xu({a:e})||"{}"!=Xu(Object(e))})),oc=Vu((function(){return'"\\udf06\\ud834"'!==Xu("\udf06\ud834")||'"\\udead"'!==Xu("\udead")})),dc=function(e,t){var n=Wu(arguments),r=Ku(t);if(Qu(r)||void 0!==e&&!zu(e))return n[1]=function(e,t){if(Qu(r)&&(t=qu(r,this,Ju(e),t)),!zu(t))return t},Nu(Xu,null,n)},uc=function(e,t,n){var r=$u(n,t-1),i=$u(n,t+1);return Zu(ic,e)&&!Zu(ac,i)||Zu(ac,e)&&!Zu(ic,r)?"\\u"+nc(ec(e,0),16):e};Xu&&ju({target:"JSON",stat:!0,arity:3,forced:sc||oc},{stringify:function(e,t,n){var r=Wu(arguments),i=Nu(sc?dc:Xu,null,r);return oc&&"string"==typeof i?tc(i,rc,uc):i}});var cc=Da,lc=be;es({target:"Object",stat:!0,forced:!Fe||se((function(){cc.f(1)}))},{getOwnPropertySymbols:function(e){var t=cc.f;return t?t(lc(e)):[]}});var hc=se,pc=Be,fc=Ye("species"),mc=function(e){return pc>=51||!hc((function(){var t=[];return(t.constructor={})[fc]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},vc=Pi.filter;es({target:"Array",proto:!0,forced:!mc("filter")},{filter:function(e){return vc(this,e,arguments.length>1?arguments[1]:void 0)}});var gc=es,Ac=se,bc=Xi,_c=Vi.f,yc=rt;gc({target:"Object",stat:!0,forced:!yc||Ac((function(){_c(1)})),sham:!yc},{getOwnPropertyDescriptor:function(e,t){return _c(bc(e),t)}});var wc=Oa,kc=Xi,xc=Vi,Ec=To;es({target:"Object",stat:!0,sham:!rt},{getOwnPropertyDescriptors:function(e){for(var t,n,r=kc(e),i=xc.f,a=wc(r),s={},o=0;a.length>o;)void 0!==(n=i(r,t=a[o++]))&&Ec(s,t,n);return s}});var Dc=es,Sc=ii,Rc=Ai,Tc=st,Ic=la,Cc=ni,Oc=Xi,Pc=To,Lc=Ye,Bc=Pu,Uc=mc("slice"),Mc=Lc("species"),Fc=Array,jc=Math.max;Dc({target:"Array",proto:!0,forced:!Uc},{slice:function(e,t){var n,r,i,a=Oc(this),s=Cc(a),o=Ic(e,s),d=Ic(void 0===t?s:t,s);if(Sc(a)&&(n=a.constructor,(Rc(n)&&(n===Fc||Sc(n.prototype))||Tc(n)&&null===(n=n[Mc]))&&(n=void 0),n===Fc||void 0===n))return Bc(a,o,d);for(r=new(void 0===n?Fc:n)(jc(d-o,0)),i=0;o<d;o++,i++)o in a&&Pc(r,i,a[o]);return r.length=i,r}});var Gc=_t,Nc=gt,qc=Ft,Hc=function(e,t,n){var r,i;Nc(e);try{if(!(r=qc(e,"return"))){if("throw"===t)throw n;return n}r=Gc(r,e)}catch(e){i=!0,r=e}if("throw"===t)throw n;if(i)throw r;return Nc(r),n},Vc=gt,Qc=Hc,zc={},Wc=zc,Kc=Ye("iterator"),Yc=Array.prototype,Jc=function(e){return void 0!==e&&(Wc.Array===e||Yc[Kc]===e)},Xc=Tr,Zc=Ft,$c=pe,el=zc,tl=Ye("iterator"),nl=function(e){if(!$c(e))return Zc(e,tl)||Zc(e,"@@iterator")||el[Xc(e)]},rl=_t,il=Bt,al=gt,sl=Ct,ol=nl,dl=TypeError,ul=function(e,t){var n=arguments.length<2?ol(e):t;if(il(n))return al(rl(n,e));throw dl(sl(e)+" is not iterable")},cl=qr,ll=_t,hl=be,pl=function(e,t,n,r){try{return r?t(Vc(n)[0],n[1]):t(n)}catch(t){Qc(e,"throw",t)}},fl=Jc,ml=Ai,vl=ni,gl=To,Al=ul,bl=nl,_l=Array,yl=function(e){var t=hl(e),n=ml(this),r=arguments.length,i=r>1?arguments[1]:void 0,a=void 0!==i;a&&(i=cl(i,r>2?arguments[2]:void 0));var s,o,d,u,c,l,h=bl(t),p=0;if(!h||this===_l&&fl(h))for(s=vl(t),o=n?new this(s):_l(s);s>p;p++)l=a?i(t[p],p):t[p],gl(o,p,l);else for(c=(u=Al(t,h)).next,o=n?new this:[];!(d=ll(c,u)).done;p++)l=a?pl(u,i,[d.value,p],!0):d.value,gl(o,p,l);return o.length=p,o},wl=Ye("iterator"),kl=!1;try{var xl=0,El={next:function(){return{done:!!xl++}},return:function(){kl=!0}};El[wl]=function(){return this},Array.from(El,(function(){throw 2}))}catch(e){}var Dl=function(e,t){if(!t&&!kl)return!1;var n=!1;try{var r={};r[wl]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch(e){}return n},Sl=yl;es({target:"Array",stat:!0,forced:!Dl((function(e){Array.from(e)}))},{from:Sl});var Rl,Tl,Il,Cl=he,Ol=Xr,Pl=ds,Ll=ve,Bl=Cl("".charAt),Ul=Cl("".charCodeAt),Ml=Cl("".slice),Fl=function(e){return function(t,n){var r,i,a=Pl(Ll(t)),s=Ol(n),o=a.length;return s<0||s>=o?e?"":void 0:(r=Ul(a,s))<55296||r>56319||s+1===o||(i=Ul(a,s+1))<56320||i>57343?e?Bl(a,s):r:e?Ml(a,s,s+2):i-56320+(r-55296<<10)+65536}},jl={codeAt:Fl(!1),charAt:Fl(!0)},Gl=!se((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),Nl=we,ql=tt,Hl=be,Vl=Gl,Ql=Bn("IE_PROTO"),zl=Object,Wl=zl.prototype,Kl=Vl?zl.getPrototypeOf:function(e){var t=Hl(e);if(Nl(t,Ql))return t[Ql];var n=t.constructor;return ql(n)&&t instanceof n?n.prototype:t instanceof zl?Wl:null},Yl=se,Jl=tt,Xl=st,Zl=Kl,$l=Ar,eh=Ye("iterator"),th=!1;[].keys&&("next"in(Il=[].keys())?(Tl=Zl(Zl(Il)))!==Object.prototype&&(Rl=Tl):th=!0);var nh=!Xl(Rl)||Yl((function(){var e={};return Rl[eh].call(e)!==e}));nh&&(Rl={}),Jl(Rl[eh])||$l(Rl,eh,(function(){return this}));var rh={IteratorPrototype:Rl,BUGGY_SAFARI_ITERATORS:th},ih=rh.IteratorPrototype,ah=Fs,sh=Rn,oh=id,dh=zc,uh=function(){return this},ch=function(e,t,n,r){var i=t+" Iterator";return e.prototype=ah(ih,{next:sh(+!r,n)}),oh(e,i,!1),dh[i]=uh,e},lh=he,hh=Bt,ph=tt,fh=String,mh=TypeError,vh=function(e,t,n){try{return lh(hh(Object.getOwnPropertyDescriptor(e,t)[n]))}catch(e){}},gh=gt,Ah=function(e){if("object"==typeof e||ph(e))return e;throw mh("Can't set "+fh(e)+" as a prototype")},bh=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=vh(Object.prototype,"__proto__","set"))(n,[]),t=n instanceof Array}catch(e){}return function(n,r){return gh(n),Ah(r),t?e(n,r):n.__proto__=r,n}}():void 0),_h=es,yh=_t,wh=tt,kh=ch,xh=Kl,Eh=bh,Dh=id,Sh=Cn,Rh=Ar,Th=zc,Ih=gn.PROPER,Ch=gn.CONFIGURABLE,Oh=rh.IteratorPrototype,Ph=rh.BUGGY_SAFARI_ITERATORS,Lh=Ye("iterator"),Bh="keys",Uh="values",Mh="entries",Fh=function(){return this},jh=function(e,t,n,r,i,a,s){kh(n,t,r);var o,d,u,c=function(e){if(e===i&&m)return m;if(!Ph&&e in p)return p[e];switch(e){case Bh:case Uh:case Mh:return function(){return new n(this,e)}}return function(){return new n(this)}},l=t+" Iterator",h=!1,p=e.prototype,f=p[Lh]||p["@@iterator"]||i&&p[i],m=!Ph&&f||c(i),v="Array"==t&&p.entries||f;if(v&&(o=xh(v.call(new e)))!==Object.prototype&&o.next&&(xh(o)!==Oh&&(Eh?Eh(o,Oh):wh(o[Lh])||Rh(o,Lh,Fh)),Dh(o,l,!0)),Ih&&i==Uh&&f&&f.name!==Uh&&(Ch?Sh(p,"name",Uh):(h=!0,m=function(){return yh(f,this)})),i)if(d={values:c(Uh),keys:a?m:c(Bh),entries:c(Mh)},s)for(u in d)(Ph||h||!(u in p))&&Rh(p,u,d[u]);else _h({target:t,proto:!0,forced:Ph||h},d);return p[Lh]!==m&&Rh(p,Lh,m,{name:i}),Th[t]=m,d},Gh=function(e,t){return{value:e,done:t}},Nh=jl.charAt,qh=ds,Hh=Jn,Vh=jh,Qh=Gh,zh="String Iterator",Wh=Hh.set,Kh=Hh.getterFor(zh);Vh(String,"String",(function(e){Wh(this,{type:zh,string:qh(e),index:0})}),(function(){var e,t=Kh(this),n=t.string,r=t.index;return r>=n.length?Qh(void 0,!0):(e=Nh(n,r),t.index+=e.length,Qh(e,!1))}));var Yh=es,Jh=rt,Xh=he,Zh=we,$h=tt,ep=xt,tp=ds,np=Ho,rp=Ma,ip=Y.Symbol,ap=ip&&ip.prototype;if(Jh&&$h(ip)&&(!("description"in ap)||void 0!==ip().description)){var sp={},op=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:tp(arguments[0]),t=ep(ap,this)?new ip(e):void 0===e?ip():ip(e);return""===e&&(sp[t]=!0),t};rp(op,ip),op.prototype=ap,ap.constructor=op;var dp="Symbol(test)"==String(ip("test")),up=Xh(ap.valueOf),cp=Xh(ap.toString),lp=/^Symbol\((.*)\)[^)]+$/,hp=Xh("".replace),pp=Xh("".slice);np(ap,"description",{configurable:!0,get:function(){var e=up(this);if(Zh(sp,e))return"";var t=cp(e),n=dp?pp(t,7,-1):hp(t,lp,"$1");return""===n?void 0:n}}),Yh({global:!0,constructor:!0,forced:!0},{Symbol:op})}Jo("iterator");var fp=Ye,mp=Fs,vp=nt.f,gp=fp("unscopables"),Ap=Array.prototype;null==Ap[gp]&&vp(Ap,gp,{configurable:!0,value:mp(null)});var bp=function(e){Ap[gp][e]=!0},_p=Xi,yp=bp,wp=zc,kp=Jn,xp=nt.f,Ep=jh,Dp=Gh,Sp=rt,Rp="Array Iterator",Tp=kp.set,Ip=kp.getterFor(Rp),Cp=Ep(Array,"Array",(function(e,t){Tp(this,{type:Rp,target:_p(e),index:0,kind:t})}),(function(){var e=Ip(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,Dp(void 0,!0)):Dp("keys"==n?r:"values"==n?t[r]:[r,t[r]],!1)}),"values"),Op=wp.Arguments=wp.Array;if(yp("keys"),yp("values"),yp("entries"),Sp&&"values"!==Op.name)try{xp(Op,"name",{value:"values"})}catch(e){}var Pp=Y,Lp=Or,Bp=Br,Up=Cp,Mp=Cn,Fp=Ye,jp=Fp("iterator"),Gp=Fp("toStringTag"),Np=Up.values,qp=function(e,t){if(e){if(e[jp]!==Np)try{Mp(e,jp,Np)}catch(t){e[jp]=Np}if(e[Gp]||Mp(e,Gp,t),Lp[t])for(var n in Up)if(e[n]!==Up[n])try{Mp(e,n,Up[n])}catch(t){e[n]=Up[n]}}};for(var Hp in Lp)qp(Pp[Hp]&&Pp[Hp].prototype,Hp);qp(Bp,"DOMTokenList");var Vp,Qp,zp,Wp,Kp="undefined"!=typeof process&&"process"==wr(process),Yp=kt,Jp=Ho,Xp=rt,Zp=Ye("species"),$p=function(e){var t=Yp(e);Xp&&t&&!t[Zp]&&Jp(t,Zp,{configurable:!0,get:function(){return this}})},ef=xt,tf=TypeError,nf=function(e,t){if(ef(t,e))return e;throw tf("Incorrect invocation")},rf=Ai,af=Ct,sf=TypeError,of=gt,df=function(e){if(rf(e))return e;throw sf(af(e)+" is not a constructor")},uf=pe,cf=Ye("species"),lf=function(e,t){var n,r=of(e).constructor;return void 0===r||uf(n=of(r)[cf])?t:df(n)},hf=TypeError,pf=function(e,t){if(e<t)throw hf("Not enough arguments");return e},ff=/(?:ipad|iphone|ipod).*applewebkit/i.test(Re),mf=Y,vf=Ou,gf=qr,Af=tt,bf=we,_f=se,yf=xs,wf=Pu,kf=ct,xf=pf,Ef=ff,Df=Kp,Sf=mf.setImmediate,Rf=mf.clearImmediate,Tf=mf.process,If=mf.Dispatch,Cf=mf.Function,Of=mf.MessageChannel,Pf=mf.String,Lf=0,Bf={},Uf="onreadystatechange";_f((function(){Vp=mf.location}));var Mf=function(e){if(bf(Bf,e)){var t=Bf[e];delete Bf[e],t()}},Ff=function(e){return function(){Mf(e)}},jf=function(e){Mf(e.data)},Gf=function(e){mf.postMessage(Pf(e),Vp.protocol+"//"+Vp.host)};Sf&&Rf||(Sf=function(e){xf(arguments.length,1);var t=Af(e)?e:Cf(e),n=wf(arguments,1);return Bf[++Lf]=function(){vf(t,void 0,n)},Qp(Lf),Lf},Rf=function(e){delete Bf[e]},Df?Qp=function(e){Tf.nextTick(Ff(e))}:If&&If.now?Qp=function(e){If.now(Ff(e))}:Of&&!Ef?(Wp=(zp=new Of).port2,zp.port1.onmessage=jf,Qp=gf(Wp.postMessage,Wp)):mf.addEventListener&&Af(mf.postMessage)&&!mf.importScripts&&Vp&&"file:"!==Vp.protocol&&!_f(Gf)?(Qp=Gf,mf.addEventListener("message",jf,!1)):Qp=Uf in kf("script")?function(e){yf.appendChild(kf("script"))[Uf]=function(){yf.removeChild(this),Mf(e)}}:function(e){setTimeout(Ff(e),0)});var Nf={set:Sf,clear:Rf},qf=function(){this.head=null,this.tail=null};qf.prototype={add:function(e){var t={item:e,next:null},n=this.tail;n?n.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return null===(this.head=e.next)&&(this.tail=null),e.item}};var Hf,Vf,Qf,zf,Wf,Kf=qf,Yf=/ipad|iphone|ipod/i.test(Re)&&"undefined"!=typeof Pebble,Jf=/web0s(?!.*chrome)/i.test(Re),Xf=Y,Zf=qr,$f=Vi.f,em=Nf.set,tm=Kf,nm=ff,rm=Yf,im=Jf,am=Kp,sm=Xf.MutationObserver||Xf.WebKitMutationObserver,om=Xf.document,dm=Xf.process,um=Xf.Promise,cm=$f(Xf,"queueMicrotask"),lm=cm&&cm.value;if(!lm){var hm=new tm,pm=function(){var e,t;for(am&&(e=dm.domain)&&e.exit();t=hm.get();)try{t()}catch(e){throw hm.head&&Hf(),e}e&&e.enter()};nm||am||im||!sm||!om?!rm&&um&&um.resolve?((zf=um.resolve(void 0)).constructor=um,Wf=Zf(zf.then,zf),Hf=function(){Wf(pm)}):am?Hf=function(){dm.nextTick(pm)}:(em=Zf(em,Xf),Hf=function(){em(pm)}):(Vf=!0,Qf=om.createTextNode(""),new sm(pm).observe(Qf,{characterData:!0}),Hf=function(){Qf.data=Vf=!Vf}),lm=function(e){hm.head||Hf(),hm.add(e)}}var fm=lm,mm=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},vm=Y.Promise,gm="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,Am=!gm&&!Kp&&"object"==typeof window&&"object"==typeof document,bm=Y,_m=vm,ym=tt,wm=za,km=xn,xm=Ye,Em=Am,Dm=gm,Sm=Be;_m&&_m.prototype;var Rm=xm("species"),Tm=!1,Im=ym(bm.PromiseRejectionEvent),Cm=wm("Promise",(function(){var e=km(_m),t=e!==String(_m);if(!t&&66===Sm)return!0;if(!Sm||Sm<51||!/native code/.test(e)){var n=new _m((function(e){e(1)})),r=function(e){e((function(){}),(function(){}))};if((n.constructor={})[Rm]=r,!(Tm=n.then((function(){}))instanceof r))return!0}return!t&&(Em||Dm)&&!Im})),Om={CONSTRUCTOR:Cm,REJECTION_EVENT:Im,SUBCLASSING:Tm},Pm={},Lm=Bt,Bm=TypeError,Um=function(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw Bm("Bad Promise constructor");t=e,n=r})),this.resolve=Lm(t),this.reject=Lm(n)};Pm.f=function(e){return new Um(e)};var Mm,Fm,jm,Gm=es,Nm=Kp,qm=Y,Hm=_t,Vm=Ar,Qm=bh,zm=id,Wm=$p,Km=Bt,Ym=tt,Jm=st,Xm=nf,Zm=lf,$m=Nf.set,ev=fm,tv=function(e,t){try{1==arguments.length?console.error(e):console.error(e,t)}catch(e){}},nv=mm,rv=Kf,iv=Jn,av=vm,sv=Pm,ov="Promise",dv=Om.CONSTRUCTOR,uv=Om.REJECTION_EVENT,cv=Om.SUBCLASSING,lv=iv.getterFor(ov),hv=iv.set,pv=av&&av.prototype,fv=av,mv=pv,vv=qm.TypeError,gv=qm.document,Av=qm.process,bv=sv.f,_v=bv,yv=!!(gv&&gv.createEvent&&qm.dispatchEvent),wv="unhandledrejection",kv=function(e){var t;return!(!Jm(e)||!Ym(t=e.then))&&t},xv=function(e,t){var n,r,i,a=t.value,s=1==t.state,o=s?e.ok:e.fail,d=e.resolve,u=e.reject,c=e.domain;try{o?(s||(2===t.rejection&&Tv(t),t.rejection=1),!0===o?n=a:(c&&c.enter(),n=o(a),c&&(c.exit(),i=!0)),n===e.promise?u(vv("Promise-chain cycle")):(r=kv(n))?Hm(r,n,d,u):d(n)):u(a)}catch(e){c&&!i&&c.exit(),u(e)}},Ev=function(e,t){e.notified||(e.notified=!0,ev((function(){for(var n,r=e.reactions;n=r.get();)xv(n,e);e.notified=!1,t&&!e.rejection&&Sv(e)})))},Dv=function(e,t,n){var r,i;yv?((r=gv.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),qm.dispatchEvent(r)):r={promise:t,reason:n},!uv&&(i=qm["on"+e])?i(r):e===wv&&tv("Unhandled promise rejection",n)},Sv=function(e){Hm($m,qm,(function(){var t,n=e.facade,r=e.value;if(Rv(e)&&(t=nv((function(){Nm?Av.emit("unhandledRejection",r,n):Dv(wv,n,r)})),e.rejection=Nm||Rv(e)?2:1,t.error))throw t.value}))},Rv=function(e){return 1!==e.rejection&&!e.parent},Tv=function(e){Hm($m,qm,(function(){var t=e.facade;Nm?Av.emit("rejectionHandled",t):Dv("rejectionhandled",t,e.value)}))},Iv=function(e,t,n){return function(r){e(t,r,n)}},Cv=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,Ev(e,!0))},Ov=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw vv("Promise can't be resolved itself");var r=kv(t);r?ev((function(){var n={done:!1};try{Hm(r,t,Iv(Ov,n,e),Iv(Cv,n,e))}catch(t){Cv(n,t,e)}})):(e.value=t,e.state=1,Ev(e,!1))}catch(t){Cv({done:!1},t,e)}}};if(dv&&(mv=(fv=function(e){Xm(this,mv),Km(e),Hm(Mm,this);var t=lv(this);try{e(Iv(Ov,t),Iv(Cv,t))}catch(e){Cv(t,e)}}).prototype,(Mm=function(e){hv(this,{type:ov,done:!1,notified:!1,parent:!1,reactions:new rv,rejection:!1,state:0,value:void 0})}).prototype=Vm(mv,"then",(function(e,t){var n=lv(this),r=bv(Zm(this,fv));return n.parent=!0,r.ok=!Ym(e)||e,r.fail=Ym(t)&&t,r.domain=Nm?Av.domain:void 0,0==n.state?n.reactions.add(r):ev((function(){xv(r,n)})),r.promise})),Fm=function(){var e=new Mm,t=lv(e);this.promise=e,this.resolve=Iv(Ov,t),this.reject=Iv(Cv,t)},sv.f=bv=function(e){return e===fv||undefined===e?new Fm(e):_v(e)},Ym(av)&&pv!==Object.prototype)){jm=pv.then,cv||Vm(pv,"then",(function(e,t){var n=this;return new fv((function(e,t){Hm(jm,n,e,t)})).then(e,t)}),{unsafe:!0});try{delete pv.constructor}catch(e){}Qm&&Qm(pv,mv)}Gm({global:!0,constructor:!0,wrap:!0,forced:dv},{Promise:fv}),zm(fv,ov,!1),Wm(ov);var Pv=qr,Lv=_t,Bv=gt,Uv=Ct,Mv=Jc,Fv=ni,jv=xt,Gv=ul,Nv=nl,qv=Hc,Hv=TypeError,Vv=function(e,t){this.stopped=e,this.result=t},Qv=Vv.prototype,zv=function(e,t,n){var r,i,a,s,o,d,u,c=n&&n.that,l=!(!n||!n.AS_ENTRIES),h=!(!n||!n.IS_RECORD),p=!(!n||!n.IS_ITERATOR),f=!(!n||!n.INTERRUPTED),m=Pv(t,c),v=function(e){return r&&qv(r,"normal",e),new Vv(!0,e)},g=function(e){return l?(Bv(e),f?m(e[0],e[1],v):m(e[0],e[1])):f?m(e,v):m(e)};if(h)r=e.iterator;else if(p)r=e;else{if(!(i=Nv(e)))throw Hv(Uv(e)+" is not iterable");if(Mv(i)){for(a=0,s=Fv(e);s>a;a++)if((o=g(e[a]))&&jv(Qv,o))return o;return new Vv(!1)}r=Gv(e,i)}for(d=h?e.next:r.next;!(u=Lv(d,r)).done;){try{o=g(u.value)}catch(e){qv(r,"throw",e)}if("object"==typeof o&&o&&jv(Qv,o))return o}return new Vv(!1)},Wv=vm,Kv=Om.CONSTRUCTOR||!Dl((function(e){Wv.all(e).then(void 0,(function(){}))})),Yv=_t,Jv=Bt,Xv=Pm,Zv=mm,$v=zv;es({target:"Promise",stat:!0,forced:Kv},{all:function(e){var t=this,n=Xv.f(t),r=n.resolve,i=n.reject,a=Zv((function(){var n=Jv(t.resolve),a=[],s=0,o=1;$v(e,(function(e){var d=s++,u=!1;o++,Yv(n,t,e).then((function(e){u||(u=!0,a[d]=e,--o||r(a))}),i)})),--o||r(a)}));return a.error&&i(a.value),n.promise}});var eg=es,tg=Om.CONSTRUCTOR,ng=vm,rg=kt,ig=tt,ag=Ar,sg=ng&&ng.prototype;if(eg({target:"Promise",proto:!0,forced:tg,real:!0},{catch:function(e){return this.then(void 0,e)}}),ig(ng)){var og=rg("Promise").prototype.catch;sg.catch!==og&&ag(sg,"catch",og,{unsafe:!0})}var dg=_t,ug=Bt,cg=Pm,lg=mm,hg=zv;es({target:"Promise",stat:!0,forced:Kv},{race:function(e){var t=this,n=cg.f(t),r=n.reject,i=lg((function(){var i=ug(t.resolve);hg(e,(function(e){dg(i,t,e).then(n.resolve,r)}))}));return i.error&&r(i.value),n.promise}});var pg=_t,fg=Pm;es({target:"Promise",stat:!0,forced:Om.CONSTRUCTOR},{reject:function(e){var t=fg.f(this);return pg(t.reject,void 0,e),t.promise}});var mg=gt,vg=st,gg=Pm,Ag=function(e,t){if(mg(e),vg(t)&&t.constructor===e)return t;var n=gg.f(e);return(0,n.resolve)(t),n.promise},bg=es,_g=Om.CONSTRUCTOR,yg=Ag;kt("Promise"),bg({target:"Promise",stat:!0,forced:_g},{resolve:function(e){return yg(this,e)}});var wg=TypeError,kg=es,xg=se,Eg=ii,Dg=st,Sg=be,Rg=ni,Tg=function(e){if(e>9007199254740991)throw wg("Maximum allowed index exceeded");return e},Ig=To,Cg=Ei,Og=mc,Pg=Be,Lg=Ye("isConcatSpreadable"),Bg=Pg>=51||!xg((function(){var e=[];return e[Lg]=!1,e.concat()[0]!==e})),Ug=function(e){if(!Dg(e))return!1;var t=e[Lg];return void 0!==t?!!t:Eg(e)};kg({target:"Array",proto:!0,arity:1,forced:!Bg||!Og("concat")},{concat:function(e){var t,n,r,i,a,s=Sg(this),o=Cg(s,0),d=0;for(t=-1,r=arguments.length;t<r;t++)if(Ug(a=-1===t?s:arguments[t]))for(i=Rg(a),Tg(d+i),n=0;n<i;n++,d++)n in a&&Ig(o,d,a[n]);else Tg(d+1),Ig(o,d++,a);return o.length=d,o}});var Mg=rt,Fg=gn.EXISTS,jg=he,Gg=Ho,Ng=Function.prototype,qg=jg(Ng.toString),Hg=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,Vg=jg(Hg.exec);function Qg(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 zg(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 zg(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,s=!0,o=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){o=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(o)throw a}}}}function zg(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 Wg(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 Kg(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Wg(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Wg(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}Mg&&!Fg&&Gg(Ng,"name",{configurable:!0,get:function(){try{return Vg(Hg,qg(this))[1]}catch(e){return""}}});var Yg,Jg={react:{src:"https://pm.azerioncircle.com/react/16.14.0/umd/react.production.min.js",name:"React"},"react-dom":{src:"https://pm.azerioncircle.com/react-dom/16.14.0/umd/react-dom.production.min.js",name:"ReactDOM"},redux:{src:"https://pm.azerioncircle.com/redux/4.0.5/dist/redux.min.js",name:"Redux"},"react-redux":{src:"https://pm.azerioncircle.com/react-redux/7.2.1/dist/react-redux.min.js",name:"ReactRedux"},"material-ui-core":{src:"https://pm.azerioncircle.com/@material-ui/core/4.11.3/umd/material-ui.production.min.js",name:"MaterialUI"}},Xg={},Zg=function(e,t){Xg[e]=Kg(Kg({},t),{},{isLoading:!1})},$g=function(e){var n=this,r=e.id,i=e.src;return new Promise(function(e,a){if(t(this,n),document.getElementById(r))e();else{var s=document.createElement("script");s.onload=function(){e()},s.id=r,s.setAttribute("crossorigin",!0),s.src=i,document.head.appendChild(s)}}.bind(this))},eA=function(){var t=e(r.mark((function e(t){var n,i,a,s,o,d,u,c;return r.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(!(i=Xg[t]).isLoading){e.next=6;break}return e.abrupt("return");case 6:i.isLoading=!0,a=Qg(i.dependencies),e.prev=8,a.s();case 10:if((s=a.n()).done){e.next=26;break}if(o=s.value,e.prev=12,d=Jg[o].name,!window[d]){e.next=16;break}return e.abrupt("continue",24);case 16:return e.next=18,$g({id:o,src:Jg[o].src});case 18:e.next=24;break;case 20:e.prev=20,e.t0=e.catch(12),u=o.id,c=o.src,console.log("Could not load external script ".concat(u," ").concat(c),e.t0);case 24:e.next=10;break;case 26:e.next=31;break;case 28:e.prev=28,e.t1=e.catch(8),a.e(e.t1);case 31:return e.prev=31,a.f(),e.finish(31);case 34:return e.prev=34,e.next=37,$g({id:t,src:i.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(i.source,"."),e.t2);case 43:return i.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(e){return t.apply(this,arguments)}}(),tA=S((function t(){var n=this;R(this,t),T(this,"load",e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,eA("Leaderboard");case 2:n.leaderboard=e.sent;case 3:case"end":return e.stop()}}),e)})))),T(this,"showLeaderboard",function(){var t=e(r.mark((function e(t){var i;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=window.GD_OPTIONS.gameId,n.leaderboard){e.next=4;break}return e.next=4,n.load();case 4:n.leaderboard.showLeaderBoard(i,t);case 5:case"end":return e.stop()}}),e)})));return function(e){return t.apply(this,arguments)}}()),T(this,"addScore",function(){var t=e(r.mark((function e(t){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.leaderboard){e.next=3;break}return e.next=3,n.load();case 3:n.leaderboard.addScore(t);case 4:case"end":return e.stop()}}),e)})));return function(e){return t.apply(this,arguments)}}()),this.moduleName="Leaderboard",this.moduleConfig={source:"https://pm.azerioncircle.com/@bygd/gd-sdk-leaderboard/0.1.43/dist/default/iife/index.js",dependencies:["react","react-dom","redux","react-redux","material-ui-core"]},Zg(this.moduleName,this.moduleConfig)})),nA=new tA,rA=st,iA=wr,aA=Ye("match"),sA=function(e){var t;return rA(e)&&(void 0!==(t=e[aA])?!!t:"RegExp"==iA(e))},oA=sA,dA=TypeError,uA=function(e){if(oA(e))throw dA("The method doesn't accept regular expressions");return e},cA=Ye("match"),lA=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[cA]=!1,"/./"[e](t)}catch(e){}}return!1},hA=es,pA=Fr,fA=Vi.f,mA=ei,vA=ds,gA=uA,AA=ve,bA=lA,_A=pA("".startsWith),yA=pA("".slice),wA=Math.min,kA=bA("startsWith");hA({target:"String",proto:!0,forced:!!(kA||(Yg=fA(String.prototype,"startsWith"),!Yg||Yg.writable))&&!kA},{startsWith:function(e){var t=vA(AA(this));gA(e);var n=mA(wA(arguments.length>1?arguments[1]:void 0,t.length)),r=vA(e);return _A?_A(t,r,n):yA(t,n,n+r.length)===r}});var xA=_t,EA=we,DA=xt,SA=cs,RA=RegExp.prototype,TA=function(e){var t=e.flags;return void 0!==t||"flags"in RA||EA(e,"flags")||!DA(RA,e)?t:xA(SA,e)},IA=gn.PROPER,CA=Ar,OA=gt,PA=ds,LA=se,BA=TA,UA="toString",MA=RegExp.prototype[UA],FA=LA((function(){return"/a/b"!=MA.call({source:"a",flags:"b"})})),jA=IA&&MA.name!=UA;(FA||jA)&&CA(RegExp.prototype,UA,(function(){var e=OA(this);return"/"+PA(e.source)+"/"+PA(BA(e))}),{unsafe:!0});var GA=Fr,NA=Ar,qA=fo,HA=se,VA=Ye,QA=Cn,zA=VA("species"),WA=RegExp.prototype,KA=function(e,t,n,r){var i=VA(e),a=!HA((function(){var t={};return t[i]=function(){return 7},7!=""[e](t)})),s=a&&!HA((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[zA]=function(){return n},n.flags="",n[i]=/./[i]),n.exec=function(){return t=!0,null},n[i](""),!t}));if(!a||!s||n){var o=GA(/./[i]),d=t(i,""[e],(function(e,t,n,r,i){var s=GA(e),d=t.exec;return d===qA||d===WA.exec?a&&!i?{done:!0,value:o(t,n,r)}:{done:!0,value:s(n,t,r)}:{done:!1}}));NA(String.prototype,e,d[0]),NA(WA,i,d[1])}r&&QA(WA[i],"sham",!0)},YA=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t},JA=_t,XA=gt,ZA=tt,$A=wr,eb=fo,tb=TypeError,nb=function(e,t){var n=e.exec;if(ZA(n)){var r=JA(n,e,t);return null!==r&&XA(r),r}if("RegExp"===$A(e))return JA(eb,e,t);throw tb("RegExp#exec called on incompatible receiver")},rb=_t,ib=gt,ab=pe,sb=ve,ob=YA,db=ds,ub=Ft,cb=nb;function lb(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 hb(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?lb(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lb(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}KA("search",(function(e,t,n){return[function(t){var n=sb(this),r=ab(t)?void 0:ub(t,e);return r?rb(r,t,n):new RegExp(t)[e](db(n))},function(e){var r=ib(this),i=db(e),a=n(t,r,i);if(a.done)return a.value;var s=r.lastIndex;ob(s,0)||(r.lastIndex=0);var o=cb(r,i);return ob(r.lastIndex,s)||(r.lastIndex=s),null===o?-1:o.index}]}));var pb,fb,mb=function(){function e(){R(this,e)}return S(e,[{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:a()),d=decodeURIComponent((e||n)&&r.parentDomain?r.parentDomain:s()),c=decodeURIComponent((e||n)&&r.topDomain?r.topDomain:n&&0===o()?d:u()),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,v=(e||n)&&r.loaderEnabled,g=(e||n)&&r.loaderEnabled;console.log("noMinijuegosSDK",g);var A=(e||n)&&r.loaderEnabled,b=(e||n)&&r.loaderEnabled&&r.hasImpression&&r.version>="1.1.24";return{isTokenGameURL:e,isMasterGameURL:t,isExtHostedGameURL:n,noConsoleBanner:l,noLoadedEvent:h,noBlockerEvent:p,noPreroll:A,parentURL:i,parentDomain:d,topDomain:c&&c.length?c:d,noGAPageView:f,noLotamePageView:m,noGamedockSDK:v,noMinijuegosSDK:g,version:r.version,pauseGameOnStartup:b,depth:o(),domainMatched:d===c,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:"_isLoaderGameURL",value:function(){return/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Fa-f0-9]{32})(.*)$/i.test(location.href)&&location.href.startsWith("https://html5.gamedistribution.com")}},{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 I(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 I(document.referrer,!0);if(!r.query.gd_zone_config)return;e=r.query.gd_zone_config}else{var i=new I(location.href,!0);if(!i.query.gd_zone_config)return;e=i.query.gd_zone_config}return JSON.parse(C.decode(decodeURIComponent(e)))}catch(e){}}},{key:"_formatTokenURLSearch",value:function(e){var t="";try{t=encodeURIComponent(C.encode(JSON.stringify(e)))}catch(e){}try{var n=new I(location.href,!0);return n.query=n.query||{},n.query.gd_zone_config=t,"?".concat(qs.stringify(n.query))}catch(e){return"?gd_zone_config=".concat(t)}}},{key:"_extendUrlQuery",value:function(e,t){var n=new I(e,!0);return n.query=hb(hb({},n.query),t),n.toString()}},{key:"_base64_encode",value:function(e){return C.encode(JSON.stringify(e))}}]),e}(),vb=function(){try{return(new mb).getBridgeContext()}catch(e){return{}}}(),gb={userDeclinedTracking:document.location.search.indexOf("gdpr-tracking=0")>=0||document.cookie.indexOf("ogdpr_tracking=0")>=0,whitelabelPartner:(pb=!1,(fb=d("xanthophyll")).hasOwnProperty("xanthophyll")&&"true"===fb.xanthophyll&&(pb=!0),pb)},Ab=jl.charAt,bb=he,_b=be,yb=Math.floor,wb=bb("".charAt),kb=bb("".replace),xb=bb("".slice),Eb=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Db=/\$([$&'`]|\d{1,2})/g,Sb=Ou,Rb=_t,Tb=he,Ib=KA,Cb=se,Ob=gt,Pb=tt,Lb=pe,Bb=Xr,Ub=ei,Mb=ds,Fb=ve,jb=function(e,t,n){return t+(n?Ab(e,t).length:1)},Gb=Ft,Nb=function(e,t,n,r,i,a){var s=n+e.length,o=r.length,d=Db;return void 0!==i&&(i=_b(i),d=Eb),kb(a,d,(function(a,d){var u;switch(wb(d,0)){case"$":return"$";case"&":return e;case"`":return xb(t,0,n);case"'":return xb(t,s);case"<":u=i[xb(d,1,-1)];break;default:var c=+d;if(0===c)return a;if(c>o){var l=yb(c/10);return 0===l?a:l<=o?void 0===r[l-1]?wb(d,1):r[l-1]+wb(d,1):a}u=r[c-1]}return void 0===u?"":u}))},qb=nb,Hb=Ye("replace"),Vb=Math.max,Qb=Math.min,zb=Tb([].concat),Wb=Tb([].push),Kb=Tb("".indexOf),Yb=Tb("".slice),Jb="$0"==="a".replace(/./,"$0"),Xb=!!/./[Hb]&&""===/./[Hb]("a","$0");Ib("replace",(function(e,t,n){var r=Xb?"$":"$0";return[function(e,n){var r=Fb(this),i=Lb(e)?void 0:Gb(e,Hb);return i?Rb(i,e,r,n):Rb(t,Mb(r),e,n)},function(e,i){var a=Ob(this),s=Mb(e);if("string"==typeof i&&-1===Kb(i,r)&&-1===Kb(i,"$<")){var o=n(t,a,s,i);if(o.done)return o.value}var d=Pb(i);d||(i=Mb(i));var u=a.global;if(u){var c=a.unicode;a.lastIndex=0}for(var l=[];;){var h=qb(a,s);if(null===h)break;if(Wb(l,h),!u)break;""===Mb(h[0])&&(a.lastIndex=jb(s,Ub(a.lastIndex),c))}for(var p,f="",m=0,v=0;v<l.length;v++){for(var g=Mb((h=l[v])[0]),A=Vb(Qb(Bb(h.index),s.length),0),b=[],_=1;_<h.length;_++)Wb(b,void 0===(p=h[_])?p:String(p));var y=h.groups;if(d){var w=zb([g],b,A,s);void 0!==y&&Wb(w,y);var k=Mb(Sb(i,void 0,w))}else k=Nb(g,s,A,b,y,i);A>=m&&(f+=Yb(s,m,A)+k,m=A+g.length)}return f+Yb(s,m)}]}),!!Cb((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}))||!Jb||Xb);var Zb=se,$b=rt,e_=Ye("iterator"),t_=!Zb((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,n="";return e.pathname="c%20d",t.forEach((function(e,r){t.delete("b"),n+=r+e})),!t.size&&!$b||!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[e_]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==n||"x"!==new URL("http://x",void 0).host})),n_=Ar,r_=Bo,i_=Math.floor,a_=function(e,t){var n=e.length,r=i_(n/2);return n<8?s_(e,t):o_(e,a_(r_(e,0,r),t),a_(r_(e,r),t),t)},s_=function(e,t){for(var n,r,i=e.length,a=1;a<i;){for(r=a,n=e[a];r&&t(e[r-1],n)>0;)e[r]=e[--r];r!==a++&&(e[r]=n)}return e},o_=function(e,t,n,r){for(var i=t.length,a=n.length,s=0,o=0;s<i||o<a;)e[s+o]=s<i&&o<a?r(t[s],n[o])<=0?t[s++]:n[o++]:s<i?t[s++]:n[o++];return e},d_=es,u_=Y,c_=_t,l_=he,h_=rt,p_=t_,f_=Ar,m_=Ho,v_=function(e,t,n){for(var r in t)n_(e,r,t[r],n);return e},g_=id,A_=ch,b_=Jn,__=nf,y_=tt,w_=we,k_=qr,x_=Tr,E_=gt,D_=st,S_=ds,R_=Fs,T_=Rn,I_=ul,C_=nl,O_=pf,P_=a_,L_=Ye("iterator"),B_="URLSearchParams",U_=B_+"Iterator",M_=b_.set,F_=b_.getterFor(B_),j_=b_.getterFor(U_),G_=Object.getOwnPropertyDescriptor,N_=function(e){if(!h_)return u_[e];var t=G_(u_,e);return t&&t.value},q_=N_("fetch"),H_=N_("Request"),V_=N_("Headers"),Q_=H_&&H_.prototype,z_=V_&&V_.prototype,W_=u_.RegExp,K_=u_.TypeError,Y_=u_.decodeURIComponent,J_=u_.encodeURIComponent,X_=l_("".charAt),Z_=l_([].join),$_=l_([].push),ey=l_("".replace),ty=l_([].shift),ny=l_([].splice),ry=l_("".split),iy=l_("".slice),ay=/\+/g,sy=Array(4),oy=function(e){return sy[e-1]||(sy[e-1]=W_("((?:%[\\da-f]{2}){"+e+"})","gi"))},dy=function(e){try{return Y_(e)}catch(t){return e}},uy=function(e){var t=ey(e,ay," "),n=4;try{return Y_(t)}catch(e){for(;n;)t=ey(t,oy(n--),dy);return t}},cy=/[!'()~]|%20/g,ly={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},hy=function(e){return ly[e]},py=function(e){return ey(J_(e),cy,hy)},fy=A_((function(e,t){M_(this,{type:U_,iterator:I_(F_(e).entries),kind:t})}),"Iterator",(function(){var e=j_(this),t=e.kind,n=e.iterator.next(),r=n.value;return n.done||(n.value="keys"===t?r.key:"values"===t?r.value:[r.key,r.value]),n}),!0),my=function(e){this.entries=[],this.url=null,void 0!==e&&(D_(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===X_(e,0)?iy(e,1):e:S_(e)))};my.prototype={type:B_,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,n,r,i,a,s,o,d=C_(e);if(d)for(n=(t=I_(e,d)).next;!(r=c_(n,t)).done;){if(a=(i=I_(E_(r.value))).next,(s=c_(a,i)).done||(o=c_(a,i)).done||!c_(a,i).done)throw K_("Expected sequence with length 2");$_(this.entries,{key:S_(s.value),value:S_(o.value)})}else for(var u in e)w_(e,u)&&$_(this.entries,{key:u,value:S_(e[u])})},parseQuery:function(e){if(e)for(var t,n,r=ry(e,"&"),i=0;i<r.length;)(t=r[i++]).length&&(n=ry(t,"="),$_(this.entries,{key:uy(ty(n)),value:uy(Z_(n,"="))}))},serialize:function(){for(var e,t=this.entries,n=[],r=0;r<t.length;)e=t[r++],$_(n,py(e.key)+"="+py(e.value));return Z_(n,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var vy=function(){__(this,gy);var e=M_(this,new my(arguments.length>0?arguments[0]:void 0));h_||(this.length=e.entries.length)},gy=vy.prototype;if(v_(gy,{append:function(e,t){O_(arguments.length,2);var n=F_(this);$_(n.entries,{key:S_(e),value:S_(t)}),h_||this.length++,n.updateURL()},delete:function(e){O_(arguments.length,1);for(var t=F_(this),n=t.entries,r=S_(e),i=0;i<n.length;)n[i].key===r?ny(n,i,1):i++;h_||(this.length=n.length),t.updateURL()},get:function(e){O_(arguments.length,1);for(var t=F_(this).entries,n=S_(e),r=0;r<t.length;r++)if(t[r].key===n)return t[r].value;return null},getAll:function(e){O_(arguments.length,1);for(var t=F_(this).entries,n=S_(e),r=[],i=0;i<t.length;i++)t[i].key===n&&$_(r,t[i].value);return r},has:function(e){O_(arguments.length,1);for(var t=F_(this).entries,n=S_(e),r=0;r<t.length;)if(t[r++].key===n)return!0;return!1},set:function(e,t){O_(arguments.length,1);for(var n,r=F_(this),i=r.entries,a=!1,s=S_(e),o=S_(t),d=0;d<i.length;d++)(n=i[d]).key===s&&(a?ny(i,d--,1):(a=!0,n.value=o));a||$_(i,{key:s,value:o}),h_||(this.length=i.length),r.updateURL()},sort:function(){var e=F_(this);P_(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,n=F_(this).entries,r=k_(e,arguments.length>1?arguments[1]:void 0),i=0;i<n.length;)r((t=n[i++]).value,t.key,this)},keys:function(){return new fy(this,"keys")},values:function(){return new fy(this,"values")},entries:function(){return new fy(this,"entries")}},{enumerable:!0}),f_(gy,L_,gy.entries,{name:"entries"}),f_(gy,"toString",(function(){return F_(this).serialize()}),{enumerable:!0}),h_&&m_(gy,"size",{get:function(){return F_(this).entries.length},configurable:!0,enumerable:!0}),g_(vy,B_),d_({global:!0,constructor:!0,forced:!p_},{URLSearchParams:vy}),!p_&&y_(V_)){var Ay=l_(z_.has),by=l_(z_.set),_y=function(e){if(D_(e)){var t,n=e.body;if(x_(n)===B_)return t=e.headers?new V_(e.headers):new V_,Ay(t,"content-type")||by(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),R_(e,{body:T_(0,S_(n)),headers:T_(0,t)})}return e};if(y_(q_)&&d_({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return q_(e,arguments.length>1?_y(arguments[1]):{})}}),y_(H_)){var yy=function(e){return __(this,Q_),new H_(e,arguments.length>1?_y(arguments[1]):{})};Q_.constructor=yy,yy.prototype=Q_,d_({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:yy})}}var wy={URLSearchParams:vy,getState:F_},ky=va.includes,xy=bp;es({target:"Array",proto:!0,forced:se((function(){return!Array(1).includes()}))},{includes:function(e){return ky(this,e,arguments.length>1?arguments[1]:void 0)}}),xy("includes");var Ey=es,Dy=uA,Sy=ve,Ry=ds,Ty=lA,Iy=he("".indexOf);function Cy(e){var n=this,r={},i=(null==e?void 0:e._ancestor_origins)||window.location.ancestorOrigins,a=(null==e?void 0:e.self_url)||window.location.href,s=(null==e?void 0:e.self_origin)||window.location.origin,o=(null==e?void 0:e.referrer_url)||document.referrer;function d(e){return L(r,e)}function u(e,t){return B(r,e,t)}function c(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(e&&""!==e)try{return new I(e,t)}catch(e){console.log(e)}}function l(){for(var t=(null==e?void 0:e.urls)||[a,o],n=0;n<t.length;n++){var r,i=c(t[n]);if(i){var s=null===(r=i.query)||void 0===r?void 0:r.gd_sdk_referrer_url;if(s&&(s=(s=decodeURIComponent(s)).startsWith("https://")||s.startsWith("http://")?s:"https://".concat(s),O.isURL(s)))return s}}}return function(){var e;t(this,n),function(){var e=0,t=window;try{for(;t!=t.parent;)e++,t=t.parent}catch(e){u("depth.error",e.message)}u("depth.value",e)}(),function(){var e=i,t=r.depth.value,n=s;if(u("top.domain.from","fallback"),e&&e.length>0)n=e[e.length-1],u("top.domain.from","origins");else if(0===t)n=s,u("top.domain.from","self-top");else if(1===t){var a=c(o);a&&(n=a.origin,u("top.domain.from","referrer"))}u("top.domain.value",n.replace(/^https?:\/\/(www\.)?(.*)$/i,"$2"))}(),function(){var e=l();if(e)if(P(e))u("partner.domain.value",e),u("partner.domain.from","partner-domain");else{var t=c(e,!1);if(t)u("partner.domain.value",t.origin.replace(/^https?:\/\/(www\.)?(.*)$/i,"$2")),u("partner.domain.from","partner-url");else u("partner.domain.value",r.top.domain.value),u("partner.domain.from","partner-fallback")}else u("partner.domain.value",r.top.domain.value),u("partner.domain.from","fallback")}(),e=l(),0===r.depth.value?(u("partner.url.value",a),u("partner.url.from","self-top")):e?P(e)?(u("partner.url.value",a),u("partner.url.from","partner-domain")):(u("partner.url.value",e),u("partner.url.from","partner-url")):(u("partner.url.value",o),u("partner.url.from","fallback"))}.bind(this)(),{get:d,print:function(e){console.log(d(e))}}}Ey({target:"String",proto:!0,forced:!Ty("includes")},{includes:function(e){return!!~Iy(Ry(Sy(this)),Ry(Dy(e)),arguments.length>1?arguments[1]:void 0)}});var Oy="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==Oy&&Oy,Py={searchParams:"URLSearchParams"in Oy,iterable:"Symbol"in Oy&&"iterator"in Symbol,blob:"FileReader"in Oy&&"Blob"in Oy&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in Oy,arrayBuffer:"ArrayBuffer"in Oy};if(Py.arrayBuffer)var Ly=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],By=ArrayBuffer.isView||function(e){return e&&Ly.indexOf(Object.prototype.toString.call(e))>-1};function Uy(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 My(e){return"string"!=typeof e&&(e=String(e)),e}function Fy(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return Py.iterable&&(t[Symbol.iterator]=function(){return t}),t}function jy(e){this.map={},e instanceof jy?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 Gy(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function Ny(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function qy(e){var t=new FileReader,n=Ny(t);return t.readAsArrayBuffer(e),n}function Hy(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function Vy(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:Py.blob&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:Py.formData&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:Py.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():Py.arrayBuffer&&Py.blob&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=Hy(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):Py.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(e)||By(e))?this._bodyArrayBuffer=Hy(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):Py.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},Py.blob&&(this.blob=function(){var e=Gy(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=Gy(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(qy)}),this.text=function(){var e=Gy(this);if(e)return e;if(this._bodyBlob)return function(e){var t=new FileReader,n=Ny(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)},Py.formData&&(this.formData=function(){return this.text().then(Wy)}),this.json=function(){return this.text().then(JSON.parse)},this}jy.prototype.append=function(e,t){e=Uy(e),t=My(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},jy.prototype.delete=function(e){delete this.map[Uy(e)]},jy.prototype.get=function(e){return e=Uy(e),this.has(e)?this.map[e]:null},jy.prototype.has=function(e){return this.map.hasOwnProperty(Uy(e))},jy.prototype.set=function(e,t){this.map[Uy(e)]=My(t)},jy.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},jy.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),Fy(e)},jy.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),Fy(e)},jy.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),Fy(e)},Py.iterable&&(jy.prototype[Symbol.iterator]=jy.prototype.entries);var Qy=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function zy(e,t){if(!(this instanceof zy))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 zy){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new jy(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 jy(t.headers)),this.method=function(e){var t=e.toUpperCase();return Qy.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 Wy(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 Ky(e,t){if(!(this instanceof Ky))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 jy(t.headers),this.url=t.url||"",this._initBody(e)}zy.prototype.clone=function(){return new zy(this,{body:this._bodyInit})},Vy.call(zy.prototype),Vy.call(Ky.prototype),Ky.prototype.clone=function(){return new Ky(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new jy(this.headers),url:this.url})},Ky.error=function(){var e=new Ky(null,{status:0,statusText:""});return e.type="error",e};var Yy=[301,302,303,307,308];Ky.redirect=function(e,t){if(-1===Yy.indexOf(t))throw new RangeError("Invalid status code");return new Ky(null,{status:t,headers:{location:e}})};var Jy,Xy=Oy.DOMException;try{new Xy}catch(e){Xy=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},Xy.prototype=Object.create(Error.prototype),Xy.prototype.constructor=Xy}function Zy(e,t){return new Promise((function(n,r){var i=new zy(e,t);if(i.signal&&i.signal.aborted)return r(new Xy("Aborted","AbortError"));var a=new XMLHttpRequest;function s(){a.abort()}a.onload=function(){var e,t,r={status:a.status,statusText:a.statusText,headers:(e=a.getAllResponseHeaders()||"",t=new jy,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 Ky(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 Xy("Aborted","AbortError"))}),0)},a.open(i.method,function(e){try{return""===e&&Oy.location.href?Oy.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&&(Py.blob?a.responseType="blob":Py.arrayBuffer&&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 jy?i.headers.forEach((function(e,t){a.setRequestHeader(t,e)})):Object.getOwnPropertyNames(t.headers).forEach((function(e){a.setRequestHeader(e,My(t.headers[e]))})),i.signal&&(i.signal.addEventListener("abort",s),a.onreadystatechange=function(){4===a.readyState&&i.signal.removeEventListener("abort",s)}),a.send(void 0===i._bodyInit?null:i._bodyInit)}))}Zy.polyfill=!0,Oy.fetch||(Oy.fetch=Zy,Oy.Headers=jy,Oy.Request=zy,Oy.Response=Ky);var $y=function(e){var n=this;if(!Jy){var r={gameId:e.gameId,hours:(new Date).getHours(),topDomain:vb.topDomain,domain:vb.parentDomain,referrer:vb.parentURL,depth:o(),version:Ao.version,byloader:vb.isTokenGameURL,isTokenGameURL:vb.isTokenGameURL,isMasterGameURL:vb.isMasterGameURL,isExtHostedGameURL:vb.isExtHostedGameURL,byloaderVersion:vb.version,tracking:gb.userDeclinedTracking,whitelabel:gb.whitelabelPartner,platform:c()};Jy=new l(r)}return Jy||{send:function(){t(this,n)}.bind(this)}},ew={getGameData:function(e){var n=this;try{var r=e.replace("game.api.gamedistribution.com","game-api.gamedistribution.com");fetch(r).then(function(e){t(this,n)}.bind(this)).catch(function(e){t(this,n)}.bind(this))}catch(e){}},getGameLoaderIndex:function(e){var n=this;try{var r="https://html5-prod-aws.gamedistribution.com/".concat(e,"/");fetch(r).then(function(e){t(this,n)}.bind(this)).catch(function(e){t(this,n)}.bind(this))}catch(e){}}},tw={getGameData:function(e){var n=this;try{var r=e.replace("game.api.gamedistribution.com","game-api-acc-real-hwp.gamedistribution.com");fetch(r).then(function(e){t(this,n)}.bind(this)).catch(function(e){t(this,n)}.bind(this))}catch(e){}}},nw={prod:["html5.gamedistribution.com","revision.gamedistribution.com"],acc:["html5-acc-real-aws.gamedistribution.com","acceptance-revision.gamedistribution.com"]},rw={gameAPI:"game.api.gamedistribution.com"},iw={gameAPI:"game-api-acc-real-aws.gamedistribution.com"},aw=function(){var e=this,n=nw.acc.some(function(n){var r;return t(this,e),n===(null===(r=window.location.host)||void 0===r?void 0:r.toLowerCase())}.bind(this));return{env:n?"acc":"prod",config:n?iw:rw}},sw=function(e){var n=this,r=e.url;return new Promise(function(e,i){t(this,n);var a=new XMLHttpRequest;a.open("GET",r,!0),a.onreadystatechange=function(){if(4==a.readyState)if(200==a.status){var t=JSON.parse(a.responseText);e(t)}else i(Error("Error occured on request: ".concat(a.status,", ").concat(a.statusText)))},a.onerror=function(e){i(e)},a.send()}.bind(this))},ow=function(){function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"GD",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"ObjectStore";R(this,n),this.dbName=e,this.storeName=t,this.db=null,this.init()}var i,a,s,o;return S(n,[{key:"init",value:function(){var e=this;return new Promise(function(n,r){var i=this;t(this,e);var a=indexedDB.open(this.dbName,1);a.onerror=function(e){t(this,i),console.error("Database error:",e.target.error),r(e.target.error)}.bind(this),a.onsuccess=function(e){t(this,i),this.db=e.target.result,n(this.db)}.bind(this),a.onupgradeneeded=function(e){t(this,i);var n=e.target.result;n.objectStoreNames.contains(this.storeName)||n.createObjectStore(this.storeName,{keyPath:"key"})}.bind(this)}.bind(this))}},{key:"getItem",value:(o=e(r.mark((function e(n){var i=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.db){e.next=3;break}return e.next=3,this.init();case 3:return e.abrupt("return",new Promise(function(e,r){var a=this;t(this,i);var s=this.db.transaction([this.storeName],"readonly").objectStore(this.storeName).get(n);s.onerror=function(e){t(this,a),console.error("Get item error:",e.target.error),r(e.target.error)}.bind(this),s.onsuccess=function(n){t(this,a),s.result?e(s.result.value):e(null)}.bind(this)}.bind(this)));case 4:case"end":return e.stop()}}),e,this)}))),function(e){return o.apply(this,arguments)})},{key:"setItem",value:(s=e(r.mark((function e(n,i){var a=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.db){e.next=3;break}return e.next=3,this.init();case 3:return e.abrupt("return",new Promise(function(e,r){var s=this;t(this,a);var o=this.db.transaction([this.storeName],"readwrite").objectStore(this.storeName).put({key:n,value:i});o.onerror=function(e){t(this,s),console.error("Set item error:",e.target.error),r(e.target.error)}.bind(this),o.onsuccess=function(n){t(this,s),e()}.bind(this)}.bind(this)));case 4:case"end":return e.stop()}}),e,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"removeItem",value:(a=e(r.mark((function e(n){var i=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.db){e.next=3;break}return e.next=3,this.init();case 3:return e.abrupt("return",new Promise(function(e,r){var a=this;t(this,i);var s=this.db.transaction([this.storeName],"readwrite").objectStore(this.storeName).delete(n);s.onerror=function(e){t(this,a),console.error("Remove item error:",e.target.error),r(e.target.error)}.bind(this),s.onsuccess=function(n){t(this,a),e()}.bind(this)}.bind(this)));case 4:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"clear",value:(i=e(r.mark((function e(){var n=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.db){e.next=3;break}return e.next=3,this.init();case 3:return e.abrupt("return",new Promise(function(e,r){var i=this;t(this,n);var a=this.db.transaction([this.storeName],"readwrite").objectStore(this.storeName).clear();a.onerror=function(e){t(this,i),console.error("Clear store error:",e.target.error),r(e.target.error)}.bind(this),a.onsuccess=function(n){t(this,i),e()}.bind(this)}.bind(this)));case 4:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})}]),n}(),dw=function(){function t(n){var i=n.mode;R(this,t),this.setItem=function(){var t=e(r.mark((function e(t,n){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})));return function(e,n){return t.apply(this,arguments)}}(),this.getItem=function(){var t=e(r.mark((function e(t){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})));return function(e){return t.apply(this,arguments)}}(),"indexed-db"===i?(this.indexedStore=new ow,this.setItem=this.indexedStore.setItem.bind(this.indexedStore),this.getItem=this.indexedStore.getItem.bind(this.indexedStore)):"local-storage"===i&&(this.setItem=function(){var t=e(r.mark((function e(t,n){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",h.set(t,n));case 1:case"end":return e.stop()}}),e)})));return function(e,n){return t.apply(this,arguments)}}(),this.getItem=function(){var t=e(r.mark((function e(t){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",h.getString(t));case 1:case"end":return e.stop()}}),e)})));return function(e){return t.apply(this,arguments)}}())}var n,i;return S(t,[{key:"set",value:(i=e(r.mark((function e(t,n){var i;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=JSON.stringify(n),e.next=3,this.setItem(t,i);case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"get",value:(n=e(r.mark((function e(t){var n;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getItem(t);case 2:return n=e.sent,e.abrupt("return",n?JSON.parse(n):null);case 4:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})}]),t}();function uw(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 cw(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?uw(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):uw(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var lw="_gd_vs";function hw(e){return pw.apply(this,arguments)}function pw(){return(pw=e(r.mark((function e(t){var n,i,a;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.gameId,a=[],!window.indexedDB){e.next=13;break}return e.prev=3,e.next=6,_w({gameId:n});case 6:i=e.sent,e.next=13;break;case 9:e.prev=9,e.t0=e.catch(3),ko("visit-get error, indexedDb",e.t0.message),a.push(e.t0.message);case 13:if(i||!h.available){e.next=24;break}return e.prev=14,e.next=17,ww({gameId:n});case 17:i=e.sent,e.next=24;break;case 20:e.prev=20,e.t1=e.catch(14),ko("visit-get error, Ls",e.t1.message),a.push(e.t1.message);case 24:return e.abrupt("return",cw(cw({},i),{},{errors:a}));case 25:case"end":return e.stop()}}),e,null,[[3,9],[14,20]])})))).apply(this,arguments)}function fw(e){return mw.apply(this,arguments)}function mw(){return mw=e(r.mark((function e(t){var n,i,a,s;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.gameId,i=t.serverDate,s=[],!window.indexedDB){e.next=13;break}return e.prev=3,e.next=6,Aw({gameId:n,serverDate:i});case 6:a=e.sent,e.next=13;break;case 9:e.prev=9,e.t0=e.catch(3),ko("visit-update error, indexedDb",e.t0.message),s.push(e.t0.message);case 13:if(a||!h.available){e.next=24;break}return e.prev=14,e.next=17,vw({gameId:n,serverDate:i});case 17:a=e.sent,e.next=24;break;case 20:e.prev=20,e.t1=e.catch(14),ko("visit-update error, Ls",e.t1.message),s.push(e.t1.message);case 24:return e.abrupt("return",cw(cw({},a),{},{errors:s}));case 25:case"end":return e.stop()}}),e,null,[[3,9],[14,20]])}))),mw.apply(this,arguments)}function vw(e){return gw.apply(this,arguments)}function gw(){return gw=e(r.mark((function e(t){var n,i,a,s,o,d;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.gameId,i=t.serverDate,s=new dw({mode:a="local-storage"}),e.next=5,s.get(lw);case 5:return(o=e.sent)||(o={gids:{}}),o.gids[n]||(o.gids[n]={fv:i,vc:0}),(d=o.gids[n]).vc++,d.lv=i,e.next=13,s.set(lw,o);case 13:return e.abrupt("return",{visit:d,mode:a});case 14:case"end":return e.stop()}}),e)}))),gw.apply(this,arguments)}function Aw(e){return bw.apply(this,arguments)}function bw(){return bw=e(r.mark((function e(t){var n,i,a,s,o;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.gameId,i=t.serverDate,s=new dw({mode:a="indexed-db"}),e.next=5,s.get(n);case 5:return(o=e.sent)||(o={fv:i,vc:0}),o.vc++,o.lv=i,e.next=11,s.set(n,o);case 11:return e.abrupt("return",{visit:o,mode:a});case 12:case"end":return e.stop()}}),e)}))),bw.apply(this,arguments)}function _w(e){return yw.apply(this,arguments)}function yw(){return yw=e(r.mark((function e(t){var n,i,a;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.gameId,"indexed-db",i=new dw({mode:"indexed-db"}),e.next=5,i.get(n);case 5:return(a=e.sent)||(a={fv:null,vc:0}),e.abrupt("return",a);case 8:case"end":return e.stop()}}),e)}))),yw.apply(this,arguments)}function ww(e){return kw.apply(this,arguments)}function kw(){return kw=e(r.mark((function e(t){var n,i,a,s;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.gameId,"local-storage",i=new dw({mode:"local-storage"}),e.next=5,i.get(lw);case 5:return(a=e.sent)||(a={gids:{}}),a.gids[n]||(a.gids[n]={fv:null,vc:0}),s=a.gids[n],e.abrupt("return",s);case 10:case"end":return e.stop()}}),e)}))),kw.apply(this,arguments)}function xw(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 Ew(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?xw(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xw(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Dw,Sw,Rw,Tw,Iw=new M,Cw=[],Ow=function(e){Cw.push(e)},Pw=function(e){Dw=$y(Rw=e)},Lw=function(){var t=e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(Sw){e.next=7;break}return e.next=3,Gw(Rw);case 3:Sw=e.sent,Iw.emit("game-data-ready",Sw),Bw(),Uw();case 7:return e.abrupt("return",Sw);case 8:case"end":return e.stop()}}),e)})));return function(){return t.apply(this,arguments)}}(),Bw=function(){var t,n;if(null!==(t=Sw)&&void 0!==t&&null!==(n=t.aws_tst)&&void 0!==n&&n.enabled){var i,a,s,o,d;if(Fw(),null!==(i=Sw)&&void 0!==i&&null!==(a=i.aws_tst)&&void 0!==a&&null!==(s=a.ep)&&void 0!==s&&s.api&&null!==(o=Sw)&&void 0!==o&&o.url)ew.getGameData(null===(d=Sw)||void 0===d?void 0:d.url);setInterval(e(r.mark((function e(){var t;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Gw(Rw);case 3:Sw=e.sent,yo("gd-aws-test, new game data received",null===(t=Sw)||void 0===t?void 0:t.aws_tst),e.next=9;break;case 7:e.prev=7,e.t0=e.catch(0);case 9:case"end":return e.stop()}}),e,null,[[0,7]])}))),3e5)}},Uw=function(){var t,n;if(null!==(t=Sw)&&void 0!==t&&null!==(n=t.hwei)&&void 0!==n&&n.enabled){var i,a,s;if(Fw(),null!==(i=Sw)&&void 0!==i&&null!==(a=i.hwei)&&void 0!==a&&a.gameApi.enabled)tw.getGameData(null===(s=Sw)||void 0===s?void 0:s.url);setInterval(e(r.mark((function e(){var t;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Gw(Rw);case 3:Sw=e.sent,yo("gd-aws-test, new game data received",null===(t=Sw)||void 0===t?void 0:t.aws_tst),e.next=9;break;case 7:e.prev=7,e.t0=e.catch(0);case 9:case"end":return e.stop()}}),e,null,[[0,7]])}))),3e5)}},Mw=!1,Fw=function(){if(!Mw){Mw=!0;var n=window.fetch;window.fetch=e(r.mark((function e(){var i,a,s,o,d,u,c,l,h,p,f,m,v,g,A,b,_,y,w,k,x,E,D,S,R,T,I,C,O,P,L,B,U,M=this,F=arguments;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(A=F.length,b=new Array(A),_=0;_<A;_++)b[_]=F[_];y=b[0],w=b[1],k=null===(i=Sw)||void 0===i||null===(a=i.aws_tst)||void 0===a||null===(s=a.ep)||void 0===s?void 0:s.atm,x=null===(o=Sw)||void 0===o||null===(d=o.aws_tst)||void 0===d||null===(u=d.ep)||void 0===u?void 0:u.msgrt,E=(null===(c=Sw)||void 0===c||null===(l=c.hwei)||void 0===l?void 0:l.enabled)&&(null===(h=Sw)||void 0===h||null===(p=h.hwei)||void 0===p?void 0:p.atom.enabled),D=(null===(f=Sw)||void 0===f||null===(m=f.hwei)||void 0===m?void 0:m.enabled)&&(null===(v=Sw)||void 0===v||null===(g=v.hwei)||void 0===g?void 0:g.msgrt.enabled),S=function(e,r){var i=this;t(this,M);var a=y.replace(e,r);n(a,w).then(function(){t(this,i)}.bind(this))}.bind(this);try{k&&y.indexOf("tag.atom")>0&&S("tag.atom.gamedistribution.com","atom-tag-prod-aws.gamedistribution.com"),x&&y.indexOf("msgrt.gamedistribution.com")>0&&(yo("gd-aws-test hook",null===(R=Sw)||void 0===R?void 0:R.aws_tst,null===(T=Sw)||void 0===T||null===(I=T.aws_tst)||void 0===I||null===(C=I.ep)||void 0===C?void 0:C.msgrt),S("msgrt.gamedistribution.com","msgrt-prod-aws.gamedistribution.com"),null!==(O=Sw)&&void 0!==O&&null!==(P=O.hwei)&&void 0!==P&&null!==(L=P.msgrt)&&void 0!==L&&L.enabled&&null!==(B=Sw)&&void 0!==B&&B.url&&S("msgrt.gamedistribution.com","msgrt-hwp.gamedistribution.com")),E&&y.indexOf("tag.atom")>0&&S("tag.atom.gamedistribution.com","atom-tag-acc-real-hwp.gamedistribution.com"),D&&y.indexOf("msgrt.gamedistribution.com")>0&&S("msgrt.gamedistribution.com","msgrt-hwp.gamedistribution.com")}catch(e){}return e.next=11,n(y,w);case 11:return U=e.sent,e.abrupt("return",U);case 13:case"end":return e.stop()}}),e,this)})))}},jw=["gamedistribution.com","html5.gamedistribution.com"],Gw=function(n){var i=this;Dw.send("gdfw.loading",{message:"loading"}),Cw=[],Ow("1"),Ow("2"),new Cy,Ow("3");var a=function(){var e=this,n=new Cy,r=n.get("top.domain.value"),i=n.get("partner.domain.value"),a=jw.some(function(n){return t(this,e),n===(null==i?void 0:i.toLowerCase())}.bind(this)),o=s();return(a||o!==i)&&r||i}();Ow("4");var o=function(){return t(this,i),{gameId:n.gameId,disableAds:{},preroll:!0,midroll:12e4,rewardedAds:!1,title:"",tags:[],category:"",assets:[],dmain:!0,sdk:{},loader:{},splash:{},promo:{},dAds:{},pAds:{},mAds:{},rAds:{},gs_trc:{enabled:!0}}}.bind(this);Ow("5");var d=function(){t(this,i);var e=c(),r=e?"&mode=".concat(e):"",s=aw().config,o="https://".concat(s.gameAPI),d=u();return"".concat(o,"/game/v4/get/").concat(n.gameId.replace(/-/g,""),"/?domain=").concat(a).concat(r,"&v=").concat(Ao.version,"&engn=").concat(d.os,"&localTime=").concat((new Date).getHours())}.bind(this),u=function(){t(this,i);var e=navigator.userAgent,n="unknown";return/Windows/i.test(e)?n="Windows":/Mac OS X/i.test(e)&&!/Mobile/i.test(e)?n="macOS":/iPhone|iPad|iPod/i.test(e)?n="iOS":/Android/i.test(e)?n="Android":/Linux/i.test(e)&&(n="Linux"),/Mobi|Tablet/i.test(e),{os:n}}.bind(this);Ow("6");var c=function(){var e=this;t(this,i);var n=new Proxy(new URLSearchParams(window.location.search),{get:function(n,r){return t(this,e),n.get(r)}.bind(this)});return!n.gd_mode&&window.location.search.includes("gd_mode")?window.location.search.split("gd_mode=")[1]:n.gd_mode}.bind(this);Ow("7");var l=function(e){var n=this,r=(null==e?void 0:e.vmap_by_tags)||{},i=r.enabled,a=r.tags;if(i){var s,o,d=a||["co-op","multiplayer","IAPs"];if(e.tags.some(function(e){var r=this;return t(this,n),d.some(function(n){return t(this,r),n===e.title}.bind(this))}.bind(this)))((null===(s=e.adsc)||void 0===s||null===(o=s.t)||void 0===o?void 0:o.rspdur)||0)<1&&(e.mAds=Ew(Ew({},e.mAds||{}),{vmap:{enabled:!0}}),e.pAds=Ew(Ew({},e.pAds||{}),{vmap:{enabled:!0}}),e.rAds=Ew(Ew({},e.rAds||{}),{vmap:{enabled:!0}}),e.vmapByTagsApplied=!0)}},h=function(){var t=e(r.mark((function e(t){var n;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,hw({gameId:t.gameId});case 2:return n=e.sent,t.visit=n,e.abrupt("return",n);case 5:case"end":return e.stop()}}),e)})));return function(e){return t.apply(this,arguments)}}(),f=function(){var t=e(r.mark((function e(t){var n,i,a,s,o,d;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(i=t.visit)&&0===(null===(n=i.errors)||void 0===n?void 0:n.length)&&0===i.vc&&((null==t||null===(a=t.pAds)||void 0===a||null===(s=a.vmap)||void 0===s?void 0:s.enabled)&&(null==t||null===(o=t.pAds)||void 0===o||null===(d=o.vmap)||void 0===d?void 0:d.adtr))&&(t.pAds.vmap.enabled=!1);case 2:case"end":return e.stop()}}),e)})));return function(e){return t.apply(this,arguments)}}();return new Promise(function(n){var a=this;t(this,i),Ow("7.1");var s=o();try{Ow("7.2");var u=d();Ow("7.3"),fetch(u).then(function(){var t=e(r.mark((function e(t){var n;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Ow("7.4"),e.prev=1,e.next=4,t.json();case 4:n=e.sent,e.next=13;break;case 7:return e.prev=7,e.t0=e.catch(1),yo("gameData fetch error, fallback to other ajax api",e.t0),e.next=12,sw({url:u});case 12:n=e.sent;case 13:return e.abrupt("return",n);case 14:case"end":return e.stop()}}),e,null,[[1,7]])})));return function(e){return t.apply(this,arguments)}}()).then(function(){var i=e(r.mark((function e(i){var a,o,d,c,m,v,g,A=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(Ow("7.5"),!i.success){e.next=23;break}return c=i.result.game,Ow("7.6"),m={company:c.company,gameId:c.gameMd5,slug:c.slug,pname:c.pname,dname:c.dname,status:c.status,activeStatus:c.activeStatus,description:c.description,disableAds:c.enableAds,preroll:c.preRoll,midroll:6e4*c.timeAds,rewardedAds:c.rewardedAds,title:c.title,publishedAt:c.publishedAt,tags:c.tags,category:c.category,assets:c.assets,disp_2nd_prer:c.disp_2nd_prer,ctry_vst:c.ctry_vst,ctry:c.ctry,crtv:c.crtv,dmain:c.dmain,dmn:c.dmn,aws_tst:c.aws_tst,meta:c.meta,adsc:c.adsc,igs:c.igs,adspn:bo(c.adspn)||{},__t4r:bo(c.__t4r)||{},block_exts:bo(c.push_cuda),bloc_gard:bo(c.bloc_gard),cookie:bo(c.cookie),gdpr:bo(c.gdpr),diagnostic:bo(c.diagnostic),cmp:bo(c.cmp),gft:bo(c.gft)||{},sdk:bo(c.sdk)||{},sdkfw:bo(c.sdkfw)||{},loader:bo(c.loader)||{},splash:bo(c.splash)||{},promo:bo(c.promo)||{},dAds:bo(c.dads)||{},pAds:bo(c.pads)||{},mAds:bo(c.mads)||{},rAds:bo(c.rads)||{},lp:bo(c.lp)||{},extsc:bo(c.extsc)||{},evnts:bo(c.evnts)||{},dp:bo(c.dp)||{},adflw:bo(c.adflw)||{},afgszf:bo(c.afgszf)||{},fllc:bo(c.fllc)||{},lotm:bo(c.lotm)||{},t4rc:bo(c.t4rc)||{},midroll_plus:bo(c.midroll_plus)||{},gmky:bo(c.gmky)||{},urlBlockExc:bo(c.url_blck_exc)||{},sdk_wrp:bo(c.sdk_wrp)||{},dbglg:bo(c.dbglg)||{},extHosting:bo(c.ext_hosting)||{},directTokenUse:bo(c.dtu)||{},aeria:bo(c.aeria)||{},advlm:bo(c.advlm)||{},ad_blcks:bo(c.ad_blcks)||{},rmblck:bo(c.rmblck)||{},gs_trc:bo(c.gs_trc)||{},rwskp:bo(c.rwskp)||{},isv_fw:bo(c.isv_fw)||{},ext_vst:bo(c.ext_vst)||{},fix_score:bo(c.fix_score)||{},compensation:bo(c.comps)||{},adTimer:bo(c.adtr)||{},cust_vast:bo(c.cust_vast)||{},console_logs:bo(c.c_logs)||{},disable_ads_by_cmp:bo(c.dads_by_cmp)||{},ad_skip:bo(c.adskp)||{},__t4rac:bo(c.__t4rac)||{},vmap_by_tags:bo(c.vmap_by_tags)||{},hwei:bo(c.hwei)||{},_apOps:bo(c._apOps)||{}},Ow("7.7"),v=p(U(s),m),Ow("7.8"),l(v),e.next=11,h(v);case 11:return e.next=13,f(v);case 13:v.afg_disabled=!1===(null===(a=v.sdk)||void 0===a||null===(o=a.afg)||void 0===o?void 0:o.enabled),v.url=u,function(){t(this,A),void 0!==xo.afgEnabled&&(v.afg_disabled=!xo.afgEnabled),void 0!==xo.promoEnabled&&(v.promo=v.promo||{},v.promo=Ew(Ew({},v.promo),{},{rainbow:{enabled:xo.promoEnabled}}))}.bind(this),Ow("7.9"),null!==(d=v.pAds)&&void 0!==d&&d.enabled&&(v.preroll=!0),Ow("7.10"),Dw.send("gdfw.success",{message:"success"}),n(v),e.next=27;break;case 23:s.failed=!0,g=Cw[Cw.length-1],Dw.send("gdfw.err",{message:"".concat(g,": json error")}),n(s);case 27:case"end":return e.stop()}}),e,this)})));return function(e){return i.apply(this,arguments)}}()).catch(function(e){t(this,a);var r=Cw[Cw.length-1];Dw.send("gdfw.err",{message:"".concat(r,": ").concat(e.message?e.message:e)}),s.failed=!0,n(s)}.bind(this))}catch(e){var c=Cw[Cw.length-1];Dw.send("gdfw.err",{message:"".concat(c,": global ").concat(e.message?e.message:e)}),s.failed=!0,n(s)}}.bind(this))},Nw=function(){var t=e(r.mark((function e(){var t,n;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Lw();case 2:return n=e.sent,e.abrupt("return",!(null==n||null===(t=n.sdkfw)||void 0===t||!t.enabled));case 4:case"end":return e.stop()}}),e)})));return function(){return t.apply(this,arguments)}}(),qw=function(){var t=e(r.mark((function e(){var t,n,i;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Lw();case 2:return n=e.sent,i=null==n||null===(t=n.diagnostic)||void 0===t||!t.close_ga,e.abrupt("return",i);case 5:case"end":return e.stop()}}),e)})));return function(){return t.apply(this,arguments)}}(),Hw=function(){var t=e(r.mark((function e(){var t,n;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Lw();case 2:return n=e.sent,e.next=5,Nw();case 5:if(e.t0=e.sent,!e.t0){e.next=8;break}e.t0=!(null==n||null===(t=n.sdkfw)||void 0===t||!t.handshake);case 8:return e.abrupt("return",e.t0);case 9:case"end":return e.stop()}}),e)})));return function(){return t.apply(this,arguments)}}(),Vw=function(){var t=e(r.mark((function e(){var t,n,i,a,s,o,d,u;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Lw();case 2:return d=e.sent,u=!(null==d||null===(t=d.extsc)||void 0===t||!t.enabled),e.abrupt("return",{enabled:u,path:u?null==d||null===(n=d.extsc)||void 0===n?void 0:n.path:"",name:u?null==d||null===(i=d.extsc)||void 0===i?void 0:i.name:"",ref:u?null==d||null===(a=d.extsc)||void 0===a?void 0:a.ref:"",loadedFlag:u?null==d||null===(s=d.extsc)||void 0===s?void 0:s.loadedFlag:void 0,loadedFlagCheck:!!u&&!(null==d||null===(o=d.extsc)||void 0===o||!o.loadedFlagCheck)});case 5:case"end":return e.stop()}}),e)})));return function(){return t.apply(this,arguments)}}(),Qw=function(){var n=e(r.mark((function e(){var n,i,a,s,o,d=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Vw();case 2:if((n=e.sent).enabled){e.next=5;break}return e.abrupt("return");case 5:return i=n.path,a=n.name,s=n.ref,e.prev=6,o={},e.next=10,m(i,a,{error_prefix:"Blocked:",exists:function(){return t(this,d),!!s&&!!window[s]}.bind(this),attrs:o});case 10:e.next=16;break;case 12:e.prev=12,e.t0=e.catch(6),console.log("extsc: error on external partner script load",a,e.t0),f("DEVELOPER_ERROR",e.t0,"warning");case 16:case"end":return e.stop()}}),e,this,[[6,12]])})));return function(){return n.apply(this,arguments)}}(),zw=!1,Ww=!1,Kw=function(){return new Promise(function(){var n=e(r.mark((function e(n,i){var a,s,o,d,u,c=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!zw){e.next=4;break}return e.abrupt("return",n(Ww));case 4:zw=!0;case 5:return e.next=7,Vw();case 7:if((a=e.sent).enabled){e.next=10;break}return e.abrupt("return",n(!1));case 10:if(s=a.loadedFlag,!(o=a.loadedFlagCheck)||s){e.next=13;break}return e.abrupt("return",n(!1));case 13:if(o){e.next=16;break}return Ww=!0,e.abrupt("return",n(!0));case 16:d=!0,setTimeout(function(){t(this,c),d&&(d=!1,zw=!0,n(!1))}.bind(this),5e3),u=setInterval(function(){t(this,c),d&&o&&window[s]?(d=!1,zw=!0,Ww=!0,clearInterval(u),n(!0)):d||clearInterval(u)}.bind(this),100);case 19:case"end":return e.stop()}}),e,this)})));return function(e,t){return n.apply(this,arguments)}}())};function Yw(e){return Jw.apply(this,arguments)}function Jw(){return Jw=e(r.mark((function e(t){var n,i,a,s;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.whichFrame,i=t.options,e.prev=1,a="gd-".concat(n),s=!1,!("loader-frame"===n)){e.next=12;break}return e.next=9,Xw({id:a,verbose:s,options:i});case 9:Tw=e.sent,e.next=15;break;case 12:return e.next=14,$w({id:a,verbose:s,options:i});case 14:Tw=e.sent;case 15:e.next=20;break;case 17:e.prev=17,e.t0=e.catch(1),yo("[GD-IS] GD interservice create error",e.t0);case 20:case"end":return e.stop()}}),e,null,[[1,17]])}))),Jw.apply(this,arguments)}function Xw(e){return Zw.apply(this,arguments)}function Zw(){return Zw=e(r.mark((function n(i){var a,s,o,d,u=this;return r.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return a=i.id,s=i.verbose,o=i.options,n.next=4,F({id:a,verbose:s,router:!0});case 4:return(d=n.sent).on("connected",function(e){t(this,u),"gd-game-frame"===e.service&&d.registerProxy({alias:"isStoreVisible",method:"isStoreVisible",service:"gd-game-frame"})}.bind(this)),d.register({method:"whoami",handler:function(){return t(this,u),"[GD-IS] I am ".concat(a)}.bind(this)}),d.register({method:"isLoader",handler:function(){return t(this,u),!0}.bind(this)}),d.register({method:"hasRouter",handler:function(){return t(this,u),!1}.bind(this)}),d.register({method:"showAd",handler:function(){var t=e(r.mark((function t(n){var i,a,s;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=o.showAd?o.showAd:function(){var t=e(r.mark((function e(t){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",!0);case 1:case"end":return e.stop()}}),e)})));return function(e){return t.apply(this,arguments)}}(),a=n.adType,s=n.params,t.next=4,i(a,s);case 4:return t.abrupt("return",t.sent);case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()}),d.register({method:"getLoaderInfo",handler:function(){return t(this,u),{url:window.location.href}}.bind(this)}),d.register({method:"registerOnEvents",handler:function(){var t=e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return d.registerProxy({alias:"onEvent",method:"onEvent",service:"gd-game-frame"}),e.abrupt("return","[GD-IS] gd-game-frame registered for onEvents");case 3:case"end":return e.stop()}}),e)})));return function(){return t.apply(this,arguments)}}()}),n.next=14,d.whoami();case 14:return n.sent,n.abrupt("return",d);case 17:case"end":return n.stop()}}),n,this)}))),Zw.apply(this,arguments)}function $w(e){return ek.apply(this,arguments)}function ek(){return ek=e(r.mark((function e(n){var i,a,s,o,d,u=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=n.id,a=n.verbose,s=n.options,e.next=4,F({id:i,verbose:a,router:!1});case 4:return o=e.sent,"gd-loader-frame",e.next=8,o.findRouter({where:{id:"gd-loader-frame"}}).catch(function(e){t(this,u)}.bind(this));case 8:if(d=e.sent,e.t0=!!d,!e.t0){e.next=15;break}return e.next=14,o.connect(d).catch(function(e){t(this,u),yo("[GD-IS] Failed to connect to router",(null==e?void 0:e.message)||e)}.bind(this));case 14:e.t0=e.sent;case 15:return e.t0,o.register({method:"whoami",handler:function(){return t(this,u),"[GD-IS] I am ".concat(i)}.bind(this)}),o.register({method:"onEvent",handler:function(e){var n=this;t(this,u);var r=e.event;(s.onEvent||function(e){t(this,n)}.bind(this))(r)}.bind(this)}),o.register({method:"isLoader",handler:function(){return t(this,u),!1}.bind(this)}),o.register({method:"hasRouter",handler:function(){return t(this,u),!!d}.bind(this)}),o.register({method:"isStoreVisible",handler:function(){var e;return t(this,u),(null===(e=window.gdsdk.store)||void 0===e?void 0:e.isVisible)&&window.gdsdk.store.isVisible()}.bind(this)}),d&&(o.registerProxy({alias:"whoIsLoader",method:"whoami"}),o.registerProxy({alias:"registerOnEvents",method:"registerOnEvents"}),o.registerProxy({alias:"showAd",method:"showAd"}),o.registerProxy({alias:"getLoaderInfo",method:"getLoaderInfo"})),e.next=25,o.whoami();case 25:if(e.sent,!d){e.next=36;break}return e.next=30,o.whoIsLoader();case 30:return e.sent,e.next=33,o.registerOnEvents();case 33:e.sent;case 36:return e.abrupt("return",o);case 37:case"end":return e.stop()}}),e,this)}))),ek.apply(this,arguments)}var tk=!1;function nk(){var e=this;return new Promise(function(n,r){var i=this;if(t(this,e),Tw||tk)n(Tw);else{var a=setInterval(function(){t(this,i),Tw&&(tk=!0,clearInterval(a),n(Tw))}.bind(this),100);setTimeout(function(){t(this,i),clearInterval(a),Tw||(tk=!0,n(Tw))}.bind(this),5e3)}}.bind(this))}var rk,ik=function(){var t=e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(Tw){e.next=2;break}return e.abrupt("return",!1);case 2:if(e.t0=Tw.isStoreVisible,!e.t0){e.next=7;break}return e.next=6,Tw.isStoreVisible();case 6:e.t0=e.sent;case 7:return e.abrupt("return",e.t0);case 8:case"end":return e.stop()}}),e)})));return function(){return t.apply(this,arguments)}}(),ak=function(){var t=e(r.mark((function e(){var t,n,i,a;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(rk){e.next=8;break}return t=(new Cy).get(),n=(new j).getResult(),e.next=5,Lw();case 5:i=e.sent,r=void 0,s=void 0,r=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,s=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,a={w:r-=r%64,h:s-=s%64},rk={gameData:i,loc:t,ua:n,layout:a};case 8:return e.abrupt("return",rk);case 9:case"end":return e.stop()}var r,s}),e)})));return function(){return t.apply(this,arguments)}}(),sk=function(){var e=this,n=I(window.location.href,!0),r=n.host,i=n.query,a=function(n){return t(this,e),"revision.gamedistribution.com"===n||"uncached-html5.gamedistribution.com"===n}.bind(this),s=a(r);null!=i&&i.gd_sdk_referrer_url&&(s=a(I(i.gd_sdk_referrer_url).host));return s},ok=function(){var t=e(r.mark((function e(){var t;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!window.isForwarderFrame,!!window.isForwarderFrame){e.next=17;break}if(!sk()){e.next=8;break}return e.abrupt("return",!0);case 8:return e.next=10,nk();case 10:if(t=e.sent,!((null==t?void 0:t.isLoader())||!1)){e.next=15;break}return e.abrupt("return",!1);case 15:e.next=18;break;case 17:case 18:return e.abrupt("return",!0);case 19:case"end":return e.stop()}}),e)})));return function(){return t.apply(this,arguments)}}(),dk=function(){var t=e(r.mark((function e(){var t;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Lw();case 2:if(t=e.sent,null==t?void 0:t.igs){e.next=6;break}return e.abrupt("return",!1);case 6:return wo("[GD-IGS] store config available"),e.next=9,ok();case 9:if(e.sent){e.next=12;break}return e.abrupt("return",!1);case 12:return e.abrupt("return",!0);case 13:case"end":return e.stop()}}),e)})));return function(){return t.apply(this,arguments)}}();function uk(e,n){var r=this,i=!1,a=null;if(e){var s=e,o=I(s,!0),d=o.query;if(Object.keys(d).some(function(e){return t(this,r),e.toLowerCase()===n}.bind(this)))i=!0,a=d[n.toLowerCase()];else if(s=null==d?void 0:d.gd_sdk_referrer_url){var u=(o=I(s,!0)).query;Object.keys(u).some(function(e){return t(this,r),e.toLowerCase()===n}.bind(this))&&(i=!0,a=u[n.toLowerCase()])}}return{exists:i,value:a}}var ck=function(){var t=e(r.mark((function e(){var t,n,i,a,s,o,d;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=!1,e.next=3,nk();case 3:if(n=e.sent,e.t1=n,!e.t1){e.next=9;break}return e.next=8,n.getLoaderInfo();case 8:e.t1=e.sent;case 9:if(e.t0=e.t1,e.t0){e.next=12;break}e.t0={};case 12:return i=e.t0,a=i.url,s=uk(a,"sandbox"),o=s.exists,d=s.value,o&&(t=!0===d||"true"===d||1===d),e.abrupt("return",t);case 17:case"end":return e.stop()}}),e)})));return function(){return t.apply(this,arguments)}}(),lk=function(){var t=e(r.mark((function e(){var t,n,i,a,s;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,nk();case 2:if(t=e.sent,e.t1=t,!e.t1){e.next=8;break}return e.next=7,t.getLoaderInfo();case 7:e.t1=e.sent;case 8:if(e.t0=e.t1,e.t0){e.next=11;break}e.t0={};case 11:return n=e.t0,i=n.url,a=uk(i,"igs"),s=a.exists,a.value,e.abrupt("return",s);case 15:case"end":return e.stop()}}),e)})));return function(){return t.apply(this,arguments)}}(),hk=function(){var n=e(r.mark((function e(n){var i,a,s,o,d,u,c,l,h,p,f,v,g=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=n.onEvent,e.next=3,Lw();case 3:return s=e.sent,o=null==s?void 0:s.igs,e.next=7,dk();case 7:if(e.sent){e.next=10;break}return e.abrupt("return");case 10:return wo("[GD-IGS] store will initalize for frame",{loc:window.location.href}),"https://pm.azerioncircle.com/p/gd-sdk-igs-proxy",e.next=14,m("https://pm.azerioncircle.com/p/gd-sdk-igs-proxy","gd-sdk-igs-proxy",{});case 14:if(!(d=null===(i=window.GD_SDK_IGS_PROXY)||void 0===i?void 0:i.create)){e.next=40;break}return wo("[GD-IGS] store proxy created"),c="https://html5.gamedistribution.com/igs/index.html",e.next=20,lk();case 20:return l=e.sent,e.next=23,ck();case 23:return h=e.sent,wo("[GD-IS-IGS] sandbox",h),e.next=27,ak();case 27:return p=e.sent,e.next=30,d({igs:o,storeFrameUrl:c,showStoreOpener:l,sandbox:h,ctx:p});case 30:if(f=e.sent){e.next=33;break}return e.abrupt("return");case 33:v=!1,(null===(u=f.events)||void 0===u?void 0:u.onAny)&&f.events.onAny(function(e){var n;(t(this,g),"STORE_UI_VISIBILITY_CHANGED"===(null==e?void 0:e.name))&&(v=(null===(n=e.data)||void 0===n?void 0:n.visible)||!1);a&&a(e)}.bind(this)),f.isVisible=function(){return v},window.gdsdk.store=f,window.gdsdk.executeStoreAction=f.executeStoreAction.bind(f),a({name:"STORE_READY",data:{}}),wo("[GD-IGS] store ready");case 40:case"end":return e.stop()}}),e,this)})));return function(e){return n.apply(this,arguments)}}(),pk=es,fk=vm,mk=se,vk=kt,gk=tt,Ak=lf,bk=Ag,_k=Ar,yk=fk&&fk.prototype;if(pk({target:"Promise",proto:!0,real:!0,forced:!!fk&&mk((function(){yk.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=Ak(this,vk("Promise")),n=gk(e);return this.then(n?function(n){return bk(t,e()).then((function(){return n}))}:e,n?function(n){return bk(t,e()).then((function(){throw n}))}:e)}}),gk(fk)){var wk=vk("Promise").prototype.finally;yk.finally!==wk&&_k(yk,"finally",wk,{unsafe:!0})}var kk="\t\n\v\f\r                 \u2028\u2029\ufeff",xk=ve,Ek=ds,Dk=kk,Sk=he("".replace),Rk=RegExp("^["+Dk+"]+"),Tk=RegExp("(^|[^"+Dk+"])["+Dk+"]+$"),Ik=function(e){return function(t){var n=Ek(xk(t));return 1&e&&(n=Sk(n,Rk,"")),2&e&&(n=Sk(n,Tk,"$1")),n}},Ck={start:Ik(1),end:Ik(2),trim:Ik(3)},Ok=gn.PROPER,Pk=se,Lk=kk,Bk=Ck.trim;es({target:"String",proto:!0,forced:function(e){return Pk((function(){return!!Lk[e]()||"​…᠎"!=="​…᠎"[e]()||Ok&&Lk[e].name!==e}))}("trim")},{trim:function(){return Bk(this)}});var Uk=es,Mk=Pi.find,Fk=bp,jk="find",Gk=!0;jk in[]&&Array(1)[jk]((function(){Gk=!1})),Uk({target:"Array",proto:!0,forced:Gk},{find:function(e){return Mk(this,e,arguments.length>1?arguments[1]:void 0)}}),Fk(jk);var Nk=tt,qk=st,Hk=bh,Vk=nt.f,Qk=rt,zk=Y,Wk=he,Kk=za,Yk=function(e,t,n){var r,i;return Hk&&Nk(r=t.constructor)&&r!==n&&qk(i=r.prototype)&&i!==n.prototype&&Hk(e,i),e},Jk=Cn,Xk=oa.f,Zk=xt,$k=sA,ex=ds,tx=TA,nx=ms,rx=function(e,t,n){n in e||Vk(e,n,{configurable:!0,get:function(){return t[n]},set:function(e){t[n]=e}})},ix=Ar,ax=se,sx=we,ox=Jn.enforce,dx=$p,ux=Ns,cx=Qs,lx=Ye("match"),hx=zk.RegExp,px=hx.prototype,fx=zk.SyntaxError,mx=Wk(px.exec),vx=Wk("".charAt),gx=Wk("".replace),Ax=Wk("".indexOf),bx=Wk("".slice),_x=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,yx=/a/g,wx=/a/g,kx=new hx(yx)!==yx,xx=nx.MISSED_STICKY,Ex=nx.UNSUPPORTED_Y,Dx=Qk&&(!kx||xx||ux||cx||ax((function(){return wx[lx]=!1,hx(yx)!=yx||hx(wx)==wx||"/a/i"!=hx(yx,"i")})));if(Kk("RegExp",Dx)){for(var Sx=function(e,t){var n,r,i,a,s,o,d=Zk(px,this),u=$k(e),c=void 0===t,l=[],h=e;if(!d&&u&&c&&e.constructor===Sx)return e;if((u||Zk(px,e))&&(e=e.source,c&&(t=tx(h))),e=void 0===e?"":ex(e),t=void 0===t?"":ex(t),h=e,ux&&"dotAll"in yx&&(r=!!t&&Ax(t,"s")>-1)&&(t=gx(t,/s/g,"")),n=t,xx&&"sticky"in yx&&(i=!!t&&Ax(t,"y")>-1)&&Ex&&(t=gx(t,/y/g,"")),cx&&(a=function(e){for(var t,n=e.length,r=0,i="",a=[],s={},o=!1,d=!1,u=0,c="";r<=n;r++){if("\\"===(t=vx(e,r)))t+=vx(e,++r);else if("]"===t)o=!1;else if(!o)switch(!0){case"["===t:o=!0;break;case"("===t:mx(_x,bx(e,r+1))&&(r+=2,d=!0),i+=t,u++;continue;case">"===t&&d:if(""===c||sx(s,c))throw new fx("Invalid capture group name");s[c]=!0,a[a.length]=[c,u],d=!1,c="";continue}d?c+=t:i+=t}return[i,a]}(e),e=a[0],l=a[1]),s=Yk(hx(e,t),d?this:px,Sx),(r||i||l.length)&&(o=ox(s),r&&(o.dotAll=!0,o.raw=Sx(function(e){for(var t,n=e.length,r=0,i="",a=!1;r<=n;r++)"\\"!==(t=vx(e,r))?a||"."!==t?("["===t?a=!0:"]"===t&&(a=!1),i+=t):i+="[\\s\\S]":i+=t+vx(e,++r);return i}(e),n)),i&&(o.sticky=!0),l.length&&(o.groups=l)),e!==h)try{Jk(s,"source",""===h?"(?:)":h)}catch(e){}return s},Rx=Xk(hx),Tx=0;Rx.length>Tx;)rx(Sx,hx,Rx[Tx++]);px.constructor=Sx,Sx.prototype=px,ix(zk,"RegExp",Sx,{constructor:!0})}dx("RegExp");var Ix=rt,Cx=he,Ox=rs,Px=Xi,Lx=Cx(Qi.f),Bx=Cx([].push),Ux=function(e){return function(t){for(var n,r=Px(t),i=Ox(r),a=i.length,s=0,o=[];a>s;)n=i[s++],Ix&&!Lx(r,n)||Bx(o,e?[n,r[n]]:r[n]);return o}},Mx={entries:Ux(!0),values:Ux(!1)}.values;es({target:"Object",stat:!0},{values:function(e){return Mx(e)}});var Fx=es,jx=Wr,Gx=Xi,Nx=Bi,qx=he([].join);Fx({target:"Array",proto:!0,forced:jx!=Object||!Nx("join",",")},{join:function(e){return qx(Gx(this),void 0===e?",":e)}});var Hx=Pi.map;es({target:"Array",proto:!0,forced:!mc("map")},{map:function(e){return Hx(this,e,arguments.length>1?arguments[1]:void 0)}});var Vx=rt,Qx=he,zx=_t,Wx=se,Kx=rs,Yx=Da,Jx=Qi,Xx=be,Zx=Wr,$x=Object.assign,eE=Object.defineProperty,tE=Qx([].concat),nE=!$x||Wx((function(){if(Vx&&1!==$x({b:1},$x(eE({},"a",{enumerable:!0,get:function(){eE(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach((function(e){t[e]=e})),7!=$x({},e)[n]||Kx($x({},t)).join("")!=r}))?function(e,t){for(var n=Xx(e),r=arguments.length,i=1,a=Yx.f,s=Jx.f;r>i;)for(var o,d=Zx(arguments[i++]),u=a?tE(Kx(d),a(d)):Kx(d),c=u.length,l=0;c>l;)o=u[l++],Vx&&!zx(s,d,o)||(n[o]=d[o]);return n}:$x,rE=nE;es({target:"Object",stat:!0,arity:2,forced:Object.assign!==rE},{assign:rE});var iE,aE=he,sE=2147483647,oE=/[^\0-\u007E]/,dE=/[.\u3002\uFF0E\uFF61]/g,uE="Overflow: input needs wider integers to process",cE=RangeError,lE=aE(dE.exec),hE=Math.floor,pE=String.fromCharCode,fE=aE("".charCodeAt),mE=aE([].join),vE=aE([].push),gE=aE("".replace),AE=aE("".split),bE=aE("".toLowerCase),_E=function(e){return e+22+75*(e<26)},yE=function(e,t,n){var r=0;for(e=n?hE(e/700):e>>1,e+=hE(e/t);e>455;)e=hE(e/35),r+=36;return hE(r+36*e/(e+38))},wE=function(e){var t=[];e=function(e){for(var t=[],n=0,r=e.length;n<r;){var i=fE(e,n++);if(i>=55296&&i<=56319&&n<r){var a=fE(e,n++);56320==(64512&a)?vE(t,((1023&i)<<10)+(1023&a)+65536):(vE(t,i),n--)}else vE(t,i)}return t}(e);var n,r,i=e.length,a=128,s=0,o=72;for(n=0;n<e.length;n++)(r=e[n])<128&&vE(t,pE(r));var d=t.length,u=d;for(d&&vE(t,"-");u<i;){var c=sE;for(n=0;n<e.length;n++)(r=e[n])>=a&&r<c&&(c=r);var l=u+1;if(c-a>hE((sE-s)/l))throw cE(uE);for(s+=(c-a)*l,a=c,n=0;n<e.length;n++){if((r=e[n])<a&&++s>sE)throw cE(uE);if(r==a){for(var h=s,p=36;;){var f=p<=o?1:p>=o+26?26:p-o;if(h<f)break;var m=h-f,v=36-f;vE(t,pE(_E(f+m%v))),h=hE(m/v),p+=36}vE(t,pE(_E(h))),o=yE(s,l,u==d),s=0,u++}}s++,a++}return mE(t,"")},kE=es,xE=rt,EE=t_,DE=Y,SE=qr,RE=he,TE=Ar,IE=Ho,CE=nf,OE=we,PE=nE,LE=yl,BE=Bo,UE=jl.codeAt,ME=function(e){var t,n,r=[],i=AE(gE(bE(e),dE,"."),".");for(t=0;t<i.length;t++)n=i[t],vE(r,lE(oE,n)?"xn--"+wE(n):n);return mE(r,".")},FE=ds,jE=id,GE=pf,NE=wy,qE=Jn,HE=qE.set,VE=qE.getterFor("URL"),QE=NE.URLSearchParams,zE=NE.getState,WE=DE.URL,KE=DE.TypeError,YE=DE.parseInt,JE=Math.floor,XE=Math.pow,ZE=RE("".charAt),$E=RE(/./.exec),eD=RE([].join),tD=RE(1..toString),nD=RE([].pop),rD=RE([].push),iD=RE("".replace),aD=RE([].shift),sD=RE("".split),oD=RE("".slice),dD=RE("".toLowerCase),uD=RE([].unshift),cD="Invalid scheme",lD="Invalid host",hD="Invalid port",pD=/[a-z]/i,fD=/[\d+-.a-z]/i,mD=/\d/,vD=/^0x/i,gD=/^[0-7]+$/,AD=/^\d+$/,bD=/^[\da-f]+$/i,_D=/[\0\t\n\r #%/:<>?@[\\\]^|]/,yD=/[\0\t\n\r #/:<>?@[\\\]^|]/,wD=/^[\u0000-\u0020]+/,kD=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,xD=/[\t\n\r]/g,ED=function(e){var t,n,r,i;if("number"==typeof e){for(t=[],n=0;n<4;n++)uD(t,e%256),e=JE(e/256);return eD(t,".")}if("object"==typeof e){for(t="",r=function(e){for(var t=null,n=1,r=null,i=0,a=0;a<8;a++)0!==e[a]?(i>n&&(t=r,n=i),r=null,i=0):(null===r&&(r=a),++i);return i>n&&(t=r,n=i),t}(e),n=0;n<8;n++)i&&0===e[n]||(i&&(i=!1),r===n?(t+=n?":":"::",i=!0):(t+=tD(e[n],16),n<7&&(t+=":")));return"["+t+"]"}return e},DD={},SD=PE({},DD,{" ":1,'"':1,"<":1,">":1,"`":1}),RD=PE({},SD,{"#":1,"?":1,"{":1,"}":1}),TD=PE({},RD,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),ID=function(e,t){var n=UE(e,0);return n>32&&n<127&&!OE(t,e)?e:encodeURIComponent(e)},CD={ftp:21,file:null,http:80,https:443,ws:80,wss:443},OD=function(e,t){var n;return 2==e.length&&$E(pD,ZE(e,0))&&(":"==(n=ZE(e,1))||!t&&"|"==n)},PD=function(e){var t;return e.length>1&&OD(oD(e,0,2))&&(2==e.length||"/"===(t=ZE(e,2))||"\\"===t||"?"===t||"#"===t)},LD=function(e){return"."===e||"%2e"===dD(e)},BD={},UD={},MD={},FD={},jD={},GD={},ND={},qD={},HD={},VD={},QD={},zD={},WD={},KD={},YD={},JD={},XD={},ZD={},$D={},eS={},tS={},nS=function(e,t,n){var r,i,a,s=FE(e);if(t){if(i=this.parse(s))throw KE(i);this.searchParams=null}else{if(void 0!==n&&(r=new nS(n,!0)),i=this.parse(s,null,r))throw KE(i);(a=zE(new QE)).bindURL(this),this.searchParams=a}};nS.prototype={type:"URL",parse:function(e,t,n){var r,i,a,s,o,d=this,u=t||BD,c=0,l="",h=!1,p=!1,f=!1;for(e=FE(e),t||(d.scheme="",d.username="",d.password="",d.host=null,d.port=null,d.path=[],d.query=null,d.fragment=null,d.cannotBeABaseURL=!1,e=iD(e,wD,""),e=iD(e,kD,"$1")),e=iD(e,xD,""),r=LE(e);c<=r.length;){switch(i=r[c],u){case BD:if(!i||!$E(pD,i)){if(t)return cD;u=MD;continue}l+=dD(i),u=UD;break;case UD:if(i&&($E(fD,i)||"+"==i||"-"==i||"."==i))l+=dD(i);else{if(":"!=i){if(t)return cD;l="",u=MD,c=0;continue}if(t&&(d.isSpecial()!=OE(CD,l)||"file"==l&&(d.includesCredentials()||null!==d.port)||"file"==d.scheme&&!d.host))return;if(d.scheme=l,t)return void(d.isSpecial()&&CD[d.scheme]==d.port&&(d.port=null));l="","file"==d.scheme?u=KD:d.isSpecial()&&n&&n.scheme==d.scheme?u=FD:d.isSpecial()?u=qD:"/"==r[c+1]?(u=jD,c++):(d.cannotBeABaseURL=!0,rD(d.path,""),u=$D)}break;case MD:if(!n||n.cannotBeABaseURL&&"#"!=i)return cD;if(n.cannotBeABaseURL&&"#"==i){d.scheme=n.scheme,d.path=BE(n.path),d.query=n.query,d.fragment="",d.cannotBeABaseURL=!0,u=tS;break}u="file"==n.scheme?KD:GD;continue;case FD:if("/"!=i||"/"!=r[c+1]){u=GD;continue}u=HD,c++;break;case jD:if("/"==i){u=VD;break}u=ZD;continue;case GD:if(d.scheme=n.scheme,i==iE)d.username=n.username,d.password=n.password,d.host=n.host,d.port=n.port,d.path=BE(n.path),d.query=n.query;else if("/"==i||"\\"==i&&d.isSpecial())u=ND;else if("?"==i)d.username=n.username,d.password=n.password,d.host=n.host,d.port=n.port,d.path=BE(n.path),d.query="",u=eS;else{if("#"!=i){d.username=n.username,d.password=n.password,d.host=n.host,d.port=n.port,d.path=BE(n.path),d.path.length--,u=ZD;continue}d.username=n.username,d.password=n.password,d.host=n.host,d.port=n.port,d.path=BE(n.path),d.query=n.query,d.fragment="",u=tS}break;case ND:if(!d.isSpecial()||"/"!=i&&"\\"!=i){if("/"!=i){d.username=n.username,d.password=n.password,d.host=n.host,d.port=n.port,u=ZD;continue}u=VD}else u=HD;break;case qD:if(u=HD,"/"!=i||"/"!=ZE(l,c+1))continue;c++;break;case HD:if("/"!=i&&"\\"!=i){u=VD;continue}break;case VD:if("@"==i){h&&(l="%40"+l),h=!0,a=LE(l);for(var m=0;m<a.length;m++){var v=a[m];if(":"!=v||f){var g=ID(v,TD);f?d.password+=g:d.username+=g}else f=!0}l=""}else if(i==iE||"/"==i||"?"==i||"#"==i||"\\"==i&&d.isSpecial()){if(h&&""==l)return"Invalid authority";c-=LE(l).length+1,l="",u=QD}else l+=i;break;case QD:case zD:if(t&&"file"==d.scheme){u=JD;continue}if(":"!=i||p){if(i==iE||"/"==i||"?"==i||"#"==i||"\\"==i&&d.isSpecial()){if(d.isSpecial()&&""==l)return lD;if(t&&""==l&&(d.includesCredentials()||null!==d.port))return;if(s=d.parseHost(l))return s;if(l="",u=XD,t)return;continue}"["==i?p=!0:"]"==i&&(p=!1),l+=i}else{if(""==l)return lD;if(s=d.parseHost(l))return s;if(l="",u=WD,t==zD)return}break;case WD:if(!$E(mD,i)){if(i==iE||"/"==i||"?"==i||"#"==i||"\\"==i&&d.isSpecial()||t){if(""!=l){var A=YE(l,10);if(A>65535)return hD;d.port=d.isSpecial()&&A===CD[d.scheme]?null:A,l=""}if(t)return;u=XD;continue}return hD}l+=i;break;case KD:if(d.scheme="file","/"==i||"\\"==i)u=YD;else{if(!n||"file"!=n.scheme){u=ZD;continue}if(i==iE)d.host=n.host,d.path=BE(n.path),d.query=n.query;else if("?"==i)d.host=n.host,d.path=BE(n.path),d.query="",u=eS;else{if("#"!=i){PD(eD(BE(r,c),""))||(d.host=n.host,d.path=BE(n.path),d.shortenPath()),u=ZD;continue}d.host=n.host,d.path=BE(n.path),d.query=n.query,d.fragment="",u=tS}}break;case YD:if("/"==i||"\\"==i){u=JD;break}n&&"file"==n.scheme&&!PD(eD(BE(r,c),""))&&(OD(n.path[0],!0)?rD(d.path,n.path[0]):d.host=n.host),u=ZD;continue;case JD:if(i==iE||"/"==i||"\\"==i||"?"==i||"#"==i){if(!t&&OD(l))u=ZD;else if(""==l){if(d.host="",t)return;u=XD}else{if(s=d.parseHost(l))return s;if("localhost"==d.host&&(d.host=""),t)return;l="",u=XD}continue}l+=i;break;case XD:if(d.isSpecial()){if(u=ZD,"/"!=i&&"\\"!=i)continue}else if(t||"?"!=i)if(t||"#"!=i){if(i!=iE&&(u=ZD,"/"!=i))continue}else d.fragment="",u=tS;else d.query="",u=eS;break;case ZD:if(i==iE||"/"==i||"\\"==i&&d.isSpecial()||!t&&("?"==i||"#"==i)){if(".."===(o=dD(o=l))||"%2e."===o||".%2e"===o||"%2e%2e"===o?(d.shortenPath(),"/"==i||"\\"==i&&d.isSpecial()||rD(d.path,"")):LD(l)?"/"==i||"\\"==i&&d.isSpecial()||rD(d.path,""):("file"==d.scheme&&!d.path.length&&OD(l)&&(d.host&&(d.host=""),l=ZE(l,0)+":"),rD(d.path,l)),l="","file"==d.scheme&&(i==iE||"?"==i||"#"==i))for(;d.path.length>1&&""===d.path[0];)aD(d.path);"?"==i?(d.query="",u=eS):"#"==i&&(d.fragment="",u=tS)}else l+=ID(i,RD);break;case $D:"?"==i?(d.query="",u=eS):"#"==i?(d.fragment="",u=tS):i!=iE&&(d.path[0]+=ID(i,DD));break;case eS:t||"#"!=i?i!=iE&&("'"==i&&d.isSpecial()?d.query+="%27":d.query+="#"==i?"%23":ID(i,DD)):(d.fragment="",u=tS);break;case tS:i!=iE&&(d.fragment+=ID(i,SD))}c++}},parseHost:function(e){var t,n,r;if("["==ZE(e,0)){if("]"!=ZE(e,e.length-1))return lD;if(t=function(e){var t,n,r,i,a,s,o,d=[0,0,0,0,0,0,0,0],u=0,c=null,l=0,h=function(){return ZE(e,l)};if(":"==h()){if(":"!=ZE(e,1))return;l+=2,c=++u}for(;h();){if(8==u)return;if(":"!=h()){for(t=n=0;n<4&&$E(bD,h());)t=16*t+YE(h(),16),l++,n++;if("."==h()){if(0==n)return;if(l-=n,u>6)return;for(r=0;h();){if(i=null,r>0){if(!("."==h()&&r<4))return;l++}if(!$E(mD,h()))return;for(;$E(mD,h());){if(a=YE(h(),10),null===i)i=a;else{if(0==i)return;i=10*i+a}if(i>255)return;l++}d[u]=256*d[u]+i,2!=++r&&4!=r||u++}if(4!=r)return;break}if(":"==h()){if(l++,!h())return}else if(h())return;d[u++]=t}else{if(null!==c)return;l++,c=++u}}if(null!==c)for(s=u-c,u=7;0!=u&&s>0;)o=d[u],d[u--]=d[c+s-1],d[c+--s]=o;else if(8!=u)return;return d}(oD(e,1,-1)),!t)return lD;this.host=t}else if(this.isSpecial()){if(e=ME(e),$E(_D,e))return lD;if(t=function(e){var t,n,r,i,a,s,o,d=sD(e,".");if(d.length&&""==d[d.length-1]&&d.length--,(t=d.length)>4)return e;for(n=[],r=0;r<t;r++){if(""==(i=d[r]))return e;if(a=10,i.length>1&&"0"==ZE(i,0)&&(a=$E(vD,i)?16:8,i=oD(i,8==a?1:2)),""===i)s=0;else{if(!$E(10==a?AD:8==a?gD:bD,i))return e;s=YE(i,a)}rD(n,s)}for(r=0;r<t;r++)if(s=n[r],r==t-1){if(s>=XE(256,5-t))return null}else if(s>255)return null;for(o=nD(n),r=0;r<n.length;r++)o+=n[r]*XE(256,3-r);return o}(e),null===t)return lD;this.host=t}else{if($E(yD,e))return lD;for(t="",n=LE(e),r=0;r<n.length;r++)t+=ID(n[r],DD);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return OE(CD,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"==this.scheme&&1==t&&OD(e[0],!0)||e.length--},serialize:function(){var e=this,t=e.scheme,n=e.username,r=e.password,i=e.host,a=e.port,s=e.path,o=e.query,d=e.fragment,u=t+":";return null!==i?(u+="//",e.includesCredentials()&&(u+=n+(r?":"+r:"")+"@"),u+=ED(i),null!==a&&(u+=":"+a)):"file"==t&&(u+="//"),u+=e.cannotBeABaseURL?s[0]:s.length?"/"+eD(s,"/"):"",null!==o&&(u+="?"+o),null!==d&&(u+="#"+d),u},setHref:function(e){var t=this.parse(e);if(t)throw KE(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"==e)try{return new rS(e.path[0]).origin}catch(e){return"null"}return"file"!=e&&this.isSpecial()?e+"://"+ED(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(FE(e)+":",BD)},getUsername:function(){return this.username},setUsername:function(e){var t=LE(FE(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var n=0;n<t.length;n++)this.username+=ID(t[n],TD)}},getPassword:function(){return this.password},setPassword:function(e){var t=LE(FE(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var n=0;n<t.length;n++)this.password+=ID(t[n],TD)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?ED(e):ED(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,QD)},getHostname:function(){var e=this.host;return null===e?"":ED(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,zD)},getPort:function(){var e=this.port;return null===e?"":FE(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""==(e=FE(e))?this.port=null:this.parse(e,WD))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+eD(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,XD))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""==(e=FE(e))?this.query=null:("?"==ZE(e,0)&&(e=oD(e,1)),this.query="",this.parse(e,eS)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!=(e=FE(e))?("#"==ZE(e,0)&&(e=oD(e,1)),this.fragment="",this.parse(e,tS)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var rS=function(e){var t=CE(this,iS),n=GE(arguments.length,1)>1?arguments[1]:void 0,r=HE(t,new nS(e,!1,n));xE||(t.href=r.serialize(),t.origin=r.getOrigin(),t.protocol=r.getProtocol(),t.username=r.getUsername(),t.password=r.getPassword(),t.host=r.getHost(),t.hostname=r.getHostname(),t.port=r.getPort(),t.pathname=r.getPathname(),t.search=r.getSearch(),t.searchParams=r.getSearchParams(),t.hash=r.getHash())},iS=rS.prototype,aS=function(e,t){return{get:function(){return VE(this)[e]()},set:t&&function(e){return VE(this)[t](e)},configurable:!0,enumerable:!0}};if(xE&&(IE(iS,"href",aS("serialize","setHref")),IE(iS,"origin",aS("getOrigin")),IE(iS,"protocol",aS("getProtocol","setProtocol")),IE(iS,"username",aS("getUsername","setUsername")),IE(iS,"password",aS("getPassword","setPassword")),IE(iS,"host",aS("getHost","setHost")),IE(iS,"hostname",aS("getHostname","setHostname")),IE(iS,"port",aS("getPort","setPort")),IE(iS,"pathname",aS("getPathname","setPathname")),IE(iS,"search",aS("getSearch","setSearch")),IE(iS,"searchParams",aS("getSearchParams")),IE(iS,"hash",aS("getHash","setHash"))),TE(iS,"toJSON",(function(){return VE(this).serialize()}),{enumerable:!0}),TE(iS,"toString",(function(){return VE(this).serialize()}),{enumerable:!0}),WE){var sS=WE.createObjectURL,oS=WE.revokeObjectURL;sS&&TE(rS,"createObjectURL",SE(sS,WE)),oS&&TE(rS,"revokeObjectURL",SE(oS,WE))}jE(rS,"URL"),kE({global:!0,constructor:!0,forced:!EE,sham:!xE},{URL:rS});var dS=function(){function e(t){R(this,e),this.gameData=t,this.customParamKeys=["vid","_1ld","_1lp"]}return S(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(){var e=this;try{var n={},r=this.gameData.diagnostic&&this.gameData.diagnostic.cp&&this.gameData.diagnostic.cp.enabled,i=new I(location.href,!0);for(var a in i.query)n[a]=i.query[a];return Object.keys(n).filter(function(n){var r=this;return t(this,e),this.customParamKeys.some(function(e){return t(this,r),e===n}.bind(this))}.bind(this)).length>0||r?(console.log("custom-params",n,r),n):void console.log("custom-params, none")}catch(e){console.log("_checkCustomParams.Error",e)}}}]),e}(),uS=function(){function e(t,n){R(this,e),this.adContainer=t,this.onResume=n}return S(e,[{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 e=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(){t(this,e),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)}}}]),e}(),cS=function(){function e(t,n){R(this,e),this.adContainer=t,this.onResume=n}return S(e,[{key:"show",value:function(){this.rewardLabel.style.display="block"}},{key:"hide",value:function(){this.rewardLabel.style.display="none"}},{key:"add",value:function(){try{var e=document.createElement("div");this.rewardLabel=e;var t=document.createElement("span");t.innerText="To receive the reward, please do not skip the ad",this.addStyles(),e.classList.add("gd__reward__label"),t.classList.add("gd__reward__span"),this.rewardLabel.appendChild(t),this.adContainer.appendChild(e)}catch(e){console.log(e)}}},{key:"addStyles",value:function(){var e=document.body||document.getElementsByTagName("body")[0];this.addStylesheet("gd__reward__label__style",e,"\n .gd__reward__label{\n background-color:black; \n width: 160px;\n // height: 35px;\n position: absolute;\n display: none;\n z-index: 2000;\n cursor: pointer;\n bottom: 40px;\n left: 10px;\n margin: 0;\n border-radius: 5px;\n border: .5px solid gray;\n text-align: center;\n }\n .gd__reward__label:hover{\n filter: invert(100%) sepia(51%) saturate(0%) hue-rotate(346deg) brightness(104%) contrast(100%); \n }\n .gd__reward__span{\n color: white;\n font-size: 12px;\n padding-left: 5px;\n font-family: Verdana, Arial, Helvetica, sans-serif;\n text-align: center;\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)}}}]),e}(),lS=function(){function e(t,n,r){R(this,e),this.adContainer=t,this.onResume=n,this.OnSkip=r}return S(e,[{key:"show",value:function(){this.skipAd.style.display="block"}},{key:"hide",value:function(){this.skipAd.style.display="none"}},{key:"add",value:function(){var e=this;try{var n=document.createElement("div");this.skipAd=n;var r=document.createElement("span");r.innerText="Skip Ad >>",this.addStyles(),n.classList.add("gd__skip__ad"),r.classList.add("gd__skip__span"),this.skipAd.appendChild(r),this.adContainer.appendChild(n),this.skipAd.addEventListener("click",function(){t(this,e),this.OnSkip()}.bind(this))}catch(e){console.log(e)}}},{key:"addStyles",value:function(){var e=document.body||document.getElementsByTagName("body")[0];this.addStylesheet("gd__skip__ad__style",e,"\n .gd__skip__ad{\n background-color:black; \n width: 260px;\n // height: 35px;\n position: absolute;\n display: none;\n z-index: 2000;\n cursor: pointer;\n bottom: 40px;\n right: 0px;\n margin: 0;\n border-radius: 5px;\n border: .5px solid gray;\n text-align: center;\n padding: 10px;\n }\n .gd__skip__ad:hover{\n filter: invert(100%) sepia(51%) saturate(0%) hue-rotate(346deg) brightness(104%) contrast(100%); \n }\n .gd__skip__span{\n color: white;\n font-size: 22px;\n padding-left: 5px;\n font-family: Verdana, Arial, Helvetica, sans-serif;\n text-align: center;\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)}}}]),e}(),hS=function(){function e(t){R(this,e),this.adContainer=t}return S(e,[{key:"show",value:function(){this.audioLabel.style.display="block"}},{key:"hide",value:function(){this.audioLabel.style.display="none"}},{key:"mute",value:function(){document.getElementById("game").contentWindow.postMessage("mute","*")}},{key:"unmute",value:function(){document.getElementById("game").contentWindow.postMessage("unmute","*")}},{key:"add",value:function(){try{var e=document.createElement("div");this.audioLabel=e;var t=document.createElement("span");t.innerText="Audio Ad is Playing";var n=document.createElement("span");n.innerHTML="&#9432;",this.addStyles(),e.classList.add("gd__audio__label"),t.classList.add("gd__audio__span"),n.classList.add("gd__audio__span"),this.audioLabel.appendChild(n),this.audioLabel.appendChild(t),this.adContainer.appendChild(e)}catch(e){console.log(e)}}},{key:"addStyles",value:function(){var e=document.body||document.getElementsByTagName("body")[0];this.addStylesheet("gd__audio__label__style",e,"\n .gd__audio__label{\n background-color: #ffca00; \n width: 200px;\n position: relative;\n display: none;\n z-index: 2000;\n cursor: pointer;\n top: 0px;\n margin: 0 auto;\n border-radius: 0px;\n border: 0px;\n text-align: center;\n height: 30px;\n border-bottom-left-radius: 3px;\n border-bottom-right-radius: 3px;\n padding: 5px;\n }\n .gd__audio__span{\n color: black;\n font-size: 14px;\n padding-left: 5px;\n font-family: Verdana, Arial, Helvetica, sans-serif;\n text-align: center;\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)}}}]),e}(),pS=function(){function e(t){R(this,e),this.adContainer=t,this.counterLabel=null,this.countdownInterval=null}return S(e,[{key:"show",value:function(){this.counterLabel&&(this.counterLabel.style.display="block",this.startCountdown(this.counterSpan,5))}},{key:"hide",value:function(){this.counterLabel&&(this.counterLabel.style.display="none"),this.countdownInterval&&(clearInterval(this.countdownInterval),this.countdownInterval=null)}},{key:"add",value:function(){try{var e=document.createElement("div");this.counterLabel=e;var t=document.createElement("span");this.counterSpan=t,t.innerText="Ad showing in 5...",t.classList.add("gd__counter__span"),this.addStyles(),e.classList.add("gd__counter__label"),e.appendChild(t),this.adContainer.appendChild(e)}catch(e){console.log(e)}}},{key:"startCountdown",value:function(e,n){var r=this,i=n;e.innerText="Ad showing in ".concat(i,"..."),this.countdownInterval=setInterval(function(){t(this,r),(i-=1)>0?e.innerText="Ad showing in ".concat(i,"..."):(clearInterval(this.countdownInterval),e.innerText="Ad is now showing!",this.hide())}.bind(this),1e3)}},{key:"addStyles",value:function(){var e=document.body||document.getElementsByTagName("body")[0];this.addStylesheet("gd__counter__label__style",e,"\n .gd__counter__label {\n position: absolute;\n background-color: rgba(0, 0, 0, 0.5);\n display: none;\n z-index: 2000;\n cursor: pointer;\n top: 0px;\n margin: 0 auto;\n width: 200px;\n height: 40px;\n border-radius: 0px;\n text-align: center;\n padding: 8px;\n top: 87%;\n right: -1px;\n border: 1px solid white;\n }\n .gd__counter__span {\n font-size: 15px;\n font-family: Verdana, Arial, Helvetica, sans-serif;\n text-align: center;\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)}}}]),e}(),fS=function(){function e(t,n){R(this,e),this.adContainer=n,this.infoLabel=null,this.info=t}return S(e,[{key:"show",value:function(){this.infoLabel&&(this.infoLabel.style.display="block")}},{key:"hide",value:function(){this.infoLabel&&(this.infoLabel.style.display="none")}},{key:"add",value:function(){try{var e=document.createElement("div");this.infoLabel=e;var t=document.createElement("span");this.counterSpan=t,t.innerText="".concat(this.info),t.classList.add("gd__ad_info__span"),this.addStyles(),e.classList.add("gd__ad_info__label"),e.appendChild(t),this.adContainer.appendChild(e)}catch(e){console.log(e)}}},{key:"addStyles",value:function(){var e=document.body||document.getElementsByTagName("body")[0];this.addStylesheet("gd__ad_info__label__style",e,"\n .gd__ad_info__label {\n position: absolute;\n background-color: rgba(0, 0, 0, 0.5);\n display: none;\n z-index: 2000;\n cursor: pointer;\n top: 8px;\n left: 8px;\n margin: 0 auto;\n width: 200px;\n border-radius: 0px;\n text-align: center;\n padding: 8px;\n border: 1px solid white;\n }\n .gd__ad_info__span {\n font-size: 15px;\n font-family: Verdana, Arial, Helvetica, sans-serif;\n text-align: center;\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)}}}]),e}(),mS=function(){function e(t){R(this,e),this.adContainer=t}return S(e,[{key:"show",value:function(){this.t4rButton.style.display="block"}},{key:"hide",value:function(){this.t4rButton.style.display="none"}},{key:"add",value:function(){try{var e=document.createElement("div"),t=document.createElement("p");this.addStyles(),t.innerText="x",e.appendChild(t),e.id="gd__exit__button",e.setAttribute("title","Exit"),e.classList.add("gd__exit__button"),this.t4rButton=e,document.body.appendChild(e)}catch(e){console.log("Exit button add error",e)}}},{key:"addStyles",value:function(){var e=document.body||document.getElementsByTagName("body")[0];this.addStylesheet("gd__exit__button__style",e,"\n .gd__exit__button{\n background-color: transparent; \n width: 50px;\n height: 50px;\n position: absolute;\n pointer-events:none; \n z-index: 2000;\n top: 17px;\n right: 17px;\n margin: 0;\n border-radius: 50px;\n border: 1px solid white;\n text-align: center; \n font-size: 16px;\n line-height: normal;\n font-family: 'Arial';\n font-weight: bolder;\n }\n .gd__exit__button:hover{\n filter: invert(100%) sepia(51%) saturate(0%) hue-rotate(346deg) brightness(104%) contrast(100%); \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)}}}]),e}(),vS=!se((function(){return Object.isExtensible(Object.preventExtensions({}))})),gS={exports:{}},AS=se((function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}})),bS=se,_S=st,yS=wr,wS=AS,kS=Object.isExtensible,xS=bS((function(){kS(1)}))||wS?function(e){return!!_S(e)&&((!wS||"ArrayBuffer"!=yS(e))&&(!kS||kS(e)))}:kS,ES=es,DS=he,SS=Un,RS=st,TS=we,IS=nt.f,CS=oa,OS=Eo,PS=xS,LS=vS,BS=!1,US=Se("meta"),MS=0,FS=function(e){IS(e,US,{value:{objectID:"O"+MS++,weakData:{}}})},jS=gS.exports={enable:function(){jS.enable=function(){},BS=!0;var e=CS.f,t=DS([].splice),n={};n[US]=1,e(n).length&&(CS.f=function(n){for(var r=e(n),i=0,a=r.length;i<a;i++)if(r[i]===US){t(r,i,1);break}return r},ES({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:OS.f}))},fastKey:function(e,t){if(!RS(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!TS(e,US)){if(!PS(e))return"F";if(!t)return"E";FS(e)}return e[US].objectID},getWeakData:function(e,t){if(!TS(e,US)){if(!PS(e))return!0;if(!t)return!1;FS(e)}return e[US].weakData},onFreeze:function(e){return LS&&BS&&PS(e)&&!TS(e,US)&&FS(e),e}};SS[US]=!0;var GS=es,NS=vS,qS=se,HS=st,VS=gS.exports.onFreeze,QS=Object.freeze;GS({target:"Object",stat:!0,forced:qS((function(){QS(1)})),sham:!NS},{freeze:function(e){return QS&&HS(e)?QS(VS(e)):e}});var zS=function(){function e(){R(this,e),this.container=null,this.ensureContainer()}return S(e,[{key:"ensureContainer",value:function(){this.container||(this.container=document.createElement("div"),this.container.classList.add("gd__toaster__container"),this.type=Object.freeze({ERROR:"error",SUCCESS:"success",SKIP:"skip"}),document.body.appendChild(this.container),this.addStyles())}},{key:"show",value:function(e,n){var r=this;if(this.isRunningOnRevision()&&this.isToastEnabled()){var i=document.createElement("div");i.classList.add("gd__toaster"),n===this.type.ERROR?i.style.background="rgb(244, 67, 54)":n===this.type.SKIP&&(i.style.background="rgb(255, 165, 0)");var a=document.createElement("img");a.src="https://gamedistribution.com/assets/logos/logo-mark.svg",a.classList.add("gd__toaster__icon");var s=document.createElement("div");s.classList.add("gd__toaster__msg"),s.innerText=e,i.appendChild(a),i.appendChild(s),this.container.appendChild(i),requestAnimationFrame(function(){t(this,r),i.style.opacity="1",i.style.transform="translateY(0)"}.bind(this)),setTimeout(function(){var e=this;t(this,r),i.style.opacity="0",i.style.transform="translateY(20px)",setTimeout(function(){return t(this,e),i.remove()}.bind(this),300)}.bind(this),4e3)}}},{key:"addStyles",value:function(){if(!document.getElementById("gd__toaster__style")){var e=document.createElement("style");e.id="gd__toaster__style",e.appendChild(document.createTextNode("\n .gd__toaster__container {\n position: fixed;\n bottom: 20px;\n right: 20px;\n display: flex;\n flex-direction: column;\n gap: 10px;\n z-index: 3000;\n }\n\n .gd__toaster {\n background: rgb(76, 175, 80);\n border-radius: 8px;\n padding: 12px 16px;\n color: white;\n font-family: Verdana, Arial, Helvetica, sans-serif;\n display: flex;\n align-items: center;\n gap: 10px;\n box-shadow: 0px 0px 10px rgba(0,0,0,0.5);\n min-width: 250px;\n max-width: 300px;\n opacity: 0;\n transform: translateY(20px);\n transition: opacity 0.25s ease, transform 0.25s ease;\n }\n\n .gd__toaster__icon {\n width: 22px;\n height: 22px;\n }\n\n .gd__toaster__msg {\n font-size: 14px;\n line-height: 1.3;\n }\n ")),document.body.appendChild(e)}}},{key:"isRunningOnRevision",value:function(){try{return"revision.gamedistribution.com"===document.location.host}catch(e){return!1}}},{key:"isToastEnabled",value:function(){try{return"true"===new URLSearchParams(window.location.search).get("enableToast")}catch(e){return!1}}}]),e}(),WS=function(e){if(!e)return!1;var t=KS.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)},KS=Object.prototype.toString;function YS(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 JS(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?YS(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):YS(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function XS(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():e.fallback_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="fallback">\n <Wrapper>\n <AdSystem>Rainbow</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():'<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>"):'<vmap:AdTagURI templateType="vast3"><![CDATA['.concat(null==e?void 0:e.adtag_url,"]]></vmap:AdTagURI>")}var ZS,$S="13998",eR="_cc".concat($S),tR=["https://tags.crwdcntrl.net/c/".concat($S,"/cc.js?ns=").concat(eR)],nR=function(){return!!ZS&&"function"==typeof ZS.bcpf&&"function"==typeof ZS.add},rR=function(e,t){try{if(!nR())return;ZS.add(e,t),yo("lotame add success ".concat(e," ").concat(t))}catch(e){yo("lotame add error",err)}},iR=function(e,t){try{if(!nR())return;ZS.bcpw(e,t),yo("lotame send success ".concat(e," ").concat(t))}catch(e){}},aR=function(e){var n=this;try{rR("act","play"),rR("med","game"),"complete"===document.readyState?ZS.bcpf():ZS.bcp(),e.tags.forEach(function(e){t(this,n),iR("int","tags : ".concat(e.title.toLowerCase()))}.bind(this)),iR("int","category : ".concat(e.category.toLowerCase()))}catch(e){}},sR=function(){window.addEventListener("load",(function(){Iw.once("game-data-ready",function(){var t=e(r.mark((function e(t){var i;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=1,e.t0=null!=vb&&vb.noLotamePageView,!e.t0){e.next=7;break}return e.next=6,Nw();case 6:e.t0=e.sent;case 7:if(!e.t0){e.next=10;break}return e.abrupt("return");case 10:if(null!==(i=t.lotm)&&void 0!==i&&i.enabled){e.next=13;break}return e.abrupt("return");case 13:return e.next=16,m(tR[0],"LOTCC_".concat($S),{alternates:tR});case 16:"object"===n(window[eR])&&(ZS=window[eR]),nR()&&aR(t),e.next=23;break;case 20:e.prev=20,e.t1=e.catch(1),yo("lotame init error",e.t1);case 23:case"end":return e.stop()}}),e,null,[[1,20]])})));return function(e){return t.apply(this,arguments)}}())}))},oR=function(){iR("genp","ad video"),iR("act","ad impression")},dR=function(){iR("act","ad skipped")},uR=function(){iR("act","ad click")},cR=function(){iR("act","ad complete")},lR=function(){var e=(new Cy).get("partner.url.value"),t=new I(e,!0),n={isRevisionTest:!1,useTestAds:!1,disableMidrolltimer:!1};if("revision.gamedistribution.com"===t.host){var r=t.query.test,i="1"===r||"2"===r,a="1"===r;n={useTestAds:i,disableMidrolltimer:a,isRevisionTest:a||i}}return n},hR=function(){function e(){R(this,e),this.adContainer=window.document.body}return S(e,[{key:"show",value:function(e){this.adSpinner.style.display="block",this.adSpinnerOverlay.style.display="block",e?(this.adSpinner.style.display="block",this.adSpinnerFail.style.display="none",this.adSpinnerButton.style.display="none"):(this.adSpinner.style.display="none",this.adSpinnerFail.style.display="block",this.adSpinnerButton.style.display="block")}},{key:"hide",value:function(){this.adSpinner.style.display="none",this.adSpinnerOverlay.style.display="none"}},{key:"add",value:function(){var e=this;try{this.addStyles();var n=document.createElement("div");n.id="gd__spinner",n.setAttribute("title","Spinner"),n.classList.add("gd__spinner"),this.adSpinner=n;var r=document.createElement("div");r.id="gd__spinner__fail",r.setAttribute("title","Spinner"),r.classList.add("gd__spinner__fail"),r.innerHTML="No Ads Available!",this.adSpinnerFail=r;var i=document.createElement("div");i.id="gd__spinner__button",i.setAttribute("title","Spinner"),i.classList.add("gd__spinner__button"),i.onclick=function(){t(this,e),this.hide()}.bind(this);var a=document.createElement("p");a.innerText="OK!",i.appendChild(a),this.adSpinnerButton=i;var s=document.createElement("div");s.id="gd__spinner__logo",s.setAttribute("title","Spinner"),s.classList.add("gd__spinner__logo"),this.adSpinnerLogo=s;var o=document.createElement("div");o.id="gd__spinner__container",o.classList.add("gd__spinner__container"),o.appendChild(this.adSpinner),o.appendChild(this.adSpinnerFail),o.appendChild(this.adSpinnerButton),o.appendChild(this.adSpinnerLogo),this.adSpinnerContainer=o;var d=document.createElement("div");d.id="gd__spinner__overlay",d.classList.add("gd__spinner__overlay"),d.appendChild(this.adSpinnerContainer),this.adSpinnerOverlay=d,this.adContainer.appendChild(this.adSpinnerOverlay)}catch(e){console.log("Spinner error",e)}}},{key:"addStyles",value:function(){var e=document.body||document.getElementsByTagName("body")[0];this.addStylesheet("gd__spinner__style",e,'\n .gd__spinner__button{ \n text-align: center; \n width: 150px;\n height: 50px;\n position: absolute;\n display: none;\n z-index: 2000;\n cursor: pointer;\n top: calc(80% - 25px);\n left: calc(50% - 75px);\n margin: 0;\n font-size: large;\n font-family: monospace;\n background-color: #ff8c1c;\n border-radius: 50px;\n color: white;\n }\n\n .gd__spinner__fail{\n text-align: center; \n width: 300px;\n height: 50px;\n position: absolute;\n display: none;\n z-index: 2000;\n cursor: pointer;\n top: calc(65% - 25px);\n left: calc(50% - 150px);\n margin: 0;\n font-size: large;\n font-family: monospace;\n color: #ff8c1c;\n }\n\n .gd__spinner__logo{\n background: url("https://static.gamedistribution.com/android-chrome-192x192.png") no-repeat;\n background-size: cover; \n width: 100px;\n height: 100px;\n position: absolute;\n display: block;\n z-index: 2000;\n cursor: pointer;\n top: calc(30% - 50px);\n left: calc(50% - 50px);\n margin: 0;\n border-radius: 50%;\n }\n\n .gd__spinner__container{ \n background-color: black; \n width: 300px;\n height: 300px;\n position: absolute;\n z-index: 2000;\n cursor: pointer;\n top: calc(50% - 150px);\n left: calc(50% - 150px);\n margin: 0;\n border-radius: 20px;\n border: 2px solid #06b8a2;\n }\n\n\n .gd__spinner{\n background: url("https://static.gamedistribution.com/assets/loader.gif") no-repeat;\n background-size: cover; \n width: 50px;\n height: 50px;\n position: absolute;\n display: none;\n z-index: 2000;\n cursor: pointer;\n top: calc(80% - 25px);\n left: calc(50% - 25px);\n margin: 0;\n border-radius: 50%;\n }\n \n .gd__spinner__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 ')}},{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)}}}]),e}();function pR(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 fR(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?pR(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pR(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function mR(e){var n=e.gameData,r=e.msgrt,i=e.topDomain,a=e.parentDomain,s=e.parentURL;return{send_atom_event:function(e,o){if(function(e){var r=this,i=n.dbglg;return(null==i?void 0:i.enabled)&&i.topics&&i.topics.some(function(n){return t(this,r),n===e}.bind(this))}(e)){var d={gid:n.slug,md5:n.gameId,pid:0,pnm:n.pname,ctry:n.ctry,lcl:"en",hle:1,ads:1,args:o,href:window.location.href},u=(new Cy).get();return d=fR(fR({},d),u),function(e,t){try{var n=r._layout,o=r._ua,d={tp:e,ct:0,vrs:Ao.version,url:s,rfr:document.referrer,tdmn:i||a,dpth:0,args:t,ua:{brnm:o.browser.name,brvs:o.browser.version,osnm:o.os.name,osvs:o.os.version,dvmd:o.device.model,w:n.w,h:n.h}};return fetch("https://tag.atom.gamedistribution.com/v1/dmp?ar=".concat(encodeURIComponent(C.encode(JSON.stringify(d)))))}catch(e){}}(e,d=o?fR(fR({},d),o):d)}}}}function vR(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 gR(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?vR(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vR(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var AR=new M,bR=null,_R=function(){function n(e,r,i){var a=this;if(R(this,n),bR)return bR;bR=this;var s={debug:!1,width:640,height:360,locale:"en"};this.options=r?p(s,r):s,this.prefix="gdsdk__",this.adsLoader=null,this.adsManager=null,this.adDisplayContainer=null,this.eventBus=new _,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=i.parentDomain,this.topDomain=i.topDomain,this.parentURL=i.parentURL,this.adDisplayContainerInitialized=!1,this.IMASampleTags=y(),this.atom_display,this.adType_="",this.rewardGuarantied=!1,this.imaEventList=[],this.clickCount={midroll:0,preroll:0,rewarded:0},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=""!==e?document.getElementById(e):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 o=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,d=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;this.options.width=this.thirdPartyContainer?this.thirdPartyContainer.offsetWidth:o,this.options.height=this.thirdPartyContainer?this.thirdPartyContainer.offsetHeight:d,this.category="",this.tags=[],this.eventCategory="AD",this.adToaster=new zS(window.document.body),this.adToaster.show("GD SDK Loaded Successfully 👍"),this.eventBus.subscribe("LOADED",function(){t(this,a),this._clearSafetyTimer("LOADED"),this._startSafetyTimer(8e3,"LOADED")}.bind(this),"ima"),this.eventBus.subscribe("STARTED",function(){t(this,a),this._clearSafetyTimer("STARTED")}.bind(this),"ima"),this.eventBus.subscribe("AD_SUCCESS",function(){t(this,a),this.adToaster.show("".concat(this.adType_.toUpperCase()," shown successfully!"))}.bind(this)),this.eventBus.subscribe("SDK_GAME_PAUSE",function(){t(this,a),this.adToaster.show("Preparing to show ".concat(this.adType_.toUpperCase()," ad. ==> pause everything!!"))}.bind(this)),this.eventBus.subscribe("AD_ERROR",function(){t(this,a),this.adToaster.show("Failed to show ".concat(this.adType_," Ad"),"error")}.bind(this)),this.eventBus.subscribe("SDK_REWARDED_WATCH_COMPLETE",function(){t(this,a),this.adToaster.show("Grant reward to the user!")}.bind(this))}var i,a,s,o,d,u,c,l,f,w,k,x,E,D,O,P,L,B,M,F,j,G,Q,z,W,K,Y;return S(n,[{key:"start",value:(Y=e(r.mark((function n(){var i,a,s,o=this;return r.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,this.adSystemInitialize(e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,o._init_afg_script({});case 2:case"end":return e.stop()}}),e)}))));case 3:return i=n.sent,this.afgInitSuccess=i.success,n.next=7,this.adSystemInitialize(e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,o._init_hl_script();case 2:return e.next=4,o._init_ima_script();case 4:o._createPlayer(),o._setUpIMA();case 6:case"end":return e.stop()}}),e)}))));case 7:if(a=n.sent,this.imaInitSuccess=a.success,s=[],this.afgInitSuccess||s.push(i.error),this.imaInitSuccess||s.push(a.error),!(s.length>0)){n.next=14;break}throw s[0];case 14:window.eventTest=function(e){t(this,o),this._broadcast(e,{message:"",status:"success"})}.bind(this),n.next=21;break;case 17:throw n.prev=17,n.t0=n.catch(0),ko("gd-adflow error on ads.start",n.t0),new Error(n.t0);case 21:case"end":return n.stop()}}),n,this,[[0,17]])}))),function(){return Y.apply(this,arguments)})},{key:"adSystemInitialize",value:(K=e(r.mark((function e(t){var n;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n={success:!1},e.prev=1,e.next=4,t();case 4:n.success=!0,e.next=10;break;case 7:e.prev=7,e.t0=e.catch(1),n.error=e.t0;case 10:return e.abrupt("return",n);case 12:case"end":return e.stop()}}),e,null,[[1,7]])}))),function(e){return K.apply(this,arguments)})},{key:"_getDefaultSpilAdapterConfig",value:function(){return{vast:null,url:"https://pubads.g.doubleclick.net/gampad/ads",query:{correlator:"{{CACHEBUSTER}}",description_url:"{{PAGE_URL}}",env:"vp",gdfp_req:1,impl:"s",iu:"/59392726/gd_instream",npa:0,output:"vast",sz:"640x480|400x300",tfcd:0,unviewed_position_start:1}}}},{key:"_getSpilUrl",value:(W=e(r.mark((function e(t){var n,i,a,s,o,d,u,c,l,h,p,f;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.adType,i=t.options,e.prev=1,o=null===(a=this.gameData.adflw)||void 0===a||null===(s=a.adapterConfig)||void 0===s?void 0:s.spil,d=this.nextAdPosition(n),e.next=6,this._create_dp_context(d,i);case 6:return u=e.sent,o?(yo("spil-adaptor: in _getSpilUrl, adType, adPosition, gamedata",n,d,this.gameData),c=o[d]||o.default||this._getDefaultSpilAdapterConfig()):c=this._getDefaultSpilAdapterConfig(),l=100*u.floor_price,yo("spil-adaptor: fp",u.floor_price),h=this._createCustomAdVastUrl(c,{tnl_keys:{floor_price:l}}),p=h.url,f={url:p,dp:u,hl:{bidFloorApplied:!0}},e.abrupt("return",f);case 17:e.prev=17,e.t0=e.catch(1),console.log("spil-adaptor: Error on getting spil",e.t0);case 20:case"end":return e.stop()}}),e,this,[[1,17]])}))),function(e){return W.apply(this,arguments)})},{key:"checkIfTestAdsExist",value:function(){return h.available&&h.getBoolean("gd_debug_ex")&&h.getBoolean("gd_tag")||lR().useTestAds}},{key:"_getAdVast",value:function(n,i){var a=this;return new Promise(function(){var s=e(r.mark((function e(s){var o,d,u,c,l,p,f,m,v=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(h.available&&h.getBoolean("gd_debug_ex")&&h.getBoolean("gd_tag")||lR().useTestAds)){e.next=6;break}return o=a.IMASampleTags[n].filter(function(e){return t(this,v),e.indexOf("redirecterror")<0}.bind(this)),d=Math.floor(Math.random()*o.length),u=o[d],s({url:u,tnl_keys:{tnl_ad_pos:null==i?void 0:i.adTypeFound}}),e.abrupt("return");case 6:if("spil"!==i.adapter){e.next=8;break}return e.abrupt("return",s(a._getSpilUrl({adType:n,options:i})));case 8:if(void 0!==window.idhb.requestAds){e.next=10;break}throw new Error("Prebid.js wrapper script hit an error or didn't exist!");case 10:return e.prev=10,c=a.nextAdPosition(n),null!=i&&i.adTypeFound&&(c=null==i?void 0:i.adTypeFound),a._broadcast("AD_REQUEST",{message:c}),l=a.options,"preroll"===c&&q(l.preroll)?l=l.preroll:"midroll"===c&&q(l.midroll)?l=l.midroll:"rewarded"===c&&q(l.rewarded)&&(l=l.rewarded),p="","audio"===i.adapter||"audio"===i.giftType?(a.isAudioAd=!0,p="midrollaudio"):(a.isAudioAd=!1,p="rewarded"===c?"rewardedVideo":"gdbanner"===c?"gd__banner":"midroll"===c?"midroll":"video1"),e.next=20,window.idhb.isLoaded();case 20:return e.next=22,a._create_dp_context(c,i);case 22:f=e.sent,wo("gd-adflow, before idhb",c,p),m=window.idhb.getAdserverTargetingForAdSlot(p),window.idhb.setAdserverTargeting(gR(gR({},m),{},{adaptor_order:i.adapterIndex})),yo("hl-order 2",window.idhb.getAdserverTargetingForAdSlot(p)),window.idhb.requestAds({slots:T({},p,{bidFloor:(null==f?void 0:f.floor_price)||void 0}),callback:function(e,n){var r=this;t(this,v),"Missing configuration"===(null==e?void 0:e.error)&&a._broadcast("HL_CONFIG_ERROR",{status:"warning"}),!f||null!=n&&n.bidFloorApplied||fetch(f.skip_url).catch(function(e){t(this,r)}.bind(this));var i={src:"hl",tnl_keys:gR(gR({},window.idhb.getAdserverTargetingForAdSlot(p)),{},{tnl_ad_pos:c,tnl_asset_id:a.gameData.gameId}),url:e,dp:f,hl:n};a._extend_hl_url(i),s(i)}.bind(this)}),e.next=34;break;case 31:throw e.prev=31,e.t0=e.catch(10),new Error(e.t0);case 34:case"end":return e.stop()}}),e,this,[[10,31]])})));return function(e){return s.apply(this,arguments)}}())}},{key:"nextAdPosition",value:function(e){if(e===v.Rewarded)return this.adRewardedCount++,"rewarded";if(e===v.Interstitial){var t=!1===this.gameData.preroll||1===this.adPrerollCount;return t?this.adMidrollCount++:this.adPrerollCount++,t||this.adMidrollCount>0?"midroll":"preroll"}return"midroll"}},{key:"getAdPosition",value:function(e){return e===v.Rewarded?"rewarded":e===v.Interstitial?!1===this.gameData.preroll||1===this.adPrerollCount||this.adMidrollCount>0?"midroll":"preroll":"midroll"}},{key:"getCurrentAdPosition",value:function(e){return e===v.Interstitial?1===this.adPrerollCount&&0===this.adMidrollCount?"preroll":"midroll":e===v.Rewarded?"rewarded":void 0}},{key:"_requestPromo",value:function(e,t){var n=new google.ima.AdsRequest;return n.adsResponse=function(e){return'<VAST version="3.0"> \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 </Wrapper>\n </Ad>\n </VAST>").trim()}(e),n.linearAdSlotWidth=this.options.width,n.linearAdSlotHeight=this.options.height,n.nonLinearAdSlotWidth=this.options.width,n.nonLinearAdSlotHeight=this.options.height,n.forceNonLinearFullSlot=!0,this.options.vast_load_timeout&&(n.vastLoadTimeout=this.options.vast_load_timeout),n.setAdWillAutoPlay(t.autoplayAllowed),n.setAdWillPlayMuted(t.autoplayRequiresMute),this.adsLoader.requestAds(n),n}},{key:"_requestAd",value:function(e,n){var r=this;return n=n||{},new Promise(function(i){var a=this;if(t(this,r),"undefined"==typeof google)throw new Error("Unable to load ad, google IMA SDK not defined.");try{var s,o,d=null==e||null===(s=e.tnl_keys)||void 0===s?void 0:s.tnl_ad_pos;this.adSuccess=!1,this.contentPaused=!1;var u=new google.ima.AdsRequest,c=this._transformVast(e,n),l=gR(gR({},n),{},{adTag:c,tnl_ad_pos:d});this.adCounter[d]=this.adCounter[d]||0,this.adCounter[d]++;var h=e.dp,p=e.hl;this.current_dp=h,h&&!c.bidder&&(h.adtag_url=c.url);var f=this._isVMAP(d);this.adContext.isVMAP=f,function(){t(this,a),n.shouldFail&&(h?(h.adtag_url="dp_original_broken",h.fallback_url="dp_fallback_broken"):c.url="original_broken",yo("gd-adflow, _requestAd, dp.adtag_url",null==h?void 0:h.adtag_url),yo("gd-adflow, _requestAd, dp.fallback_url",null==h?void 0:h.fallback_url),yo("gd-adflow, _requestAd, adTag.url",c.url))}.bind(this);var m=this._getExternalVast(null===(o=n)||void 0===o?void 0:o.adType);if(m)u.adTagUrl=m;else if(f){wo("gd-adflow, _isVMAP");var v=function(e){for(var t=[],n="",r=Date.now(),i={ppos:1,lip:!0,vad_type:"linear"},a=0;a<e.length;a++){var s=new I(e[a].adtag.url,!0);s.query=JS(JS({},s.query),{},{ad_rule:0,vpos:e[a].position,pod:1,correlator:0===a?r:++r,output:"xml_vast3"}),a<e.length-1&&(s.query=JS(JS({},s.query),i)),t.push(s.toString())}for(var o=Date.now(),d=1;d<=t.length;d++){var u,c,l,h;n+='<vmap:AdBreak timeOffset="start" breakType="linear" breakId="break-'.concat(d,'">\n <vmap:AdSource id="').concat(o++,'" allowMultipleAds="false" followRedirects="true">\n ').concat(XS({id:o++,adtag_url:t[d-1],error_url:null===(u=e[d-1].dp)||void 0===u?void 0:u.error_url,impression_url:null===(c=e[d-1].dp)||void 0===c?void 0:c.impression_url,fallback_url:null===(l=e[d-1].dp)||void 0===l?void 0:l.fallback_url,fallback_imp_url:null===(h=e[d-1].dp)||void 0===h?void 0:h.fallback_imp_url}),"</vmap:AdSource>\n </vmap:AdBreak>")}return'<?xml version="1.0" encoding="UTF-8"?>\n <vmap:VMAP xmlns:vmap="http://www.iab.net/videosuite/vmap" version="1.0">\n '.concat(n,"\n </vmap:VMAP>").trim()}(this._get_vmap_context({dp:h,adtag:c,position:"preroll"===l.tnl_ad_pos?"preroll":"midroll",config:this._get_vmap_config(d)}));u.adsResponse=v}else if(h&&p.bidFloorApplied){yo("gd-adflow, vast wrapper"),h.adtag_url||(h.adtag_url=c.url);var g=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()}(h);u.adsResponse=g}else if(h&&h.fallback_url){yo("gd-adflow, vast wrapper 2");var A=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()}(h);u.adsResponse=A}else yo("gd-adflow, without dp"),u.adTagUrl=c.url;u.linearAdSlotWidth=this.options.width,u.linearAdSlotHeight=this.options.height,u.nonLinearAdSlotWidth=this.options.width,u.nonLinearAdSlotHeight=this.options.height,u.forceNonLinearFullSlot=!0,this.options.vast_load_timeout&&(u.vastLoadTimeout=this.options.vast_load_timeout),u.setAdWillAutoPlay(n.autoplayAllowed);var b=n.opusSuccess||n.autoplayRequiresMute;u.setAdWillPlayMuted(b),this.adsLoader.requestAds(u,l);try{this._broadcast("AD_SDK_REQUEST",{message:l})}catch(e){}i(u)}catch(e){throw new Error(e)}}.bind(this))}},{key:"_getExternalVast",value:function(e){var t;try{var n,r,i,a,s,o,d=this.getCurrentAdPosition(e),u=null===(n=this.gameData)||void 0===n?void 0:n.cust_vast,c=(null==u?void 0:u[d])||(null==u?void 0:u.default);if(!c)return yo("[ext-vast] no custom vast config"),null;yo("[ext-vast] has custom vast config",u);var l=null==c||null===(r=c.maps)||void 0===r||null===(i=r.position)||void 0===i?void 0:i[d],h=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}();yo("[ext-vast] is-mobile",h);var p=h?"mobile":"desktop",f=null==c||null===(a=c.maps)||void 0===a||null===(s=a.env)||void 0===s?void 0:s[p],m=this._createCustomAdVastUrl(c,{tnl_keys:{slug:null===(o=this.gameData)||void 0===o?void 0:o.slug,mapped_position:l,mapped_env:f}});t=null==m?void 0:m.url,yo("[ext-vast] check result",t)}catch(e){ko("[ext-vast] check err",e)}return t}},{key:"cancel",value:function(e){var t,n;if(!1!==this.requestRunning){this.requestRunning=!1,this._resetAdsLoader(),this._hide("cancel"),this.activeAdContainer&&(this.activeAdContainer.style.opacity=1),this.adsManager&&this.adsManager.setVolume(null!==(t=this.adContext)&&void 0!==t&&t.muteRequested?0:1),this.t4rButton&&this.t4rButton.hide();var r=(null==e||null===(n=e.message)||void 0===n?void 0:n.indexOf("NO_VAST_URL"))>=0,i="AD_SDK_CANCELED";this._broadcast(i,{name:i,message:"Advertisement has been canceled.",status:"warning",noVast:r,analytics:{category:this.eventCategory,action:i,label:this.gameData.gameId}})}}},{key:"_checkAutoPlay",value:(z=e(r.mark((function e(){var n=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(e,r){var i,a=this;t(this,n);var s=navigator.userAgent.toLowerCase();s.indexOf("safari")>-1&&s.indexOf("chrome");var o=(null===(i=this.gameData)||void 0===i?void 0:i._apOps)||!0;N.video({inline:!0,muted:!1}).then(function(n){t(this,a);var r=n.result;n.error,e(!0===r?{autoplayAllowed:o,autoplayRequiresMute:!1}:{autoplayAllowed:o,autoplayRequiresMute:!0})}.bind(this))}.bind(this)));case 1:case"end":return e.stop()}}),e,this)}))),function(){return z.apply(this,arguments)})},{key:"_initDisplayContainerWithAutoPlay",value:(Q=e(r.mark((function e(){var t;return r.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 Q.apply(this,arguments)})},{key:"startAd",value:(G=e(r.mark((function e(n){var i,a,s,o=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=n.adType,s=n.params,this.adType_=a,this.isAudioAd=!1,this.adContext=gR(gR({},s),{},{adType:a}),null!==(i=this.gameData.adspn)&&void 0!==i&&i.enabled&&(this.adFlowProcessSpinner||(this.adFlowProcessSpinner=new hR,this.adFlowProcessSpinner.add()),this.adFlowProcessSpinner.show(!0)),"promo"!==(null==s?void 0:s.adapter)){e.next=7;break}return e.abrupt("return",this._startPromo(s,a));case 7:if("adsense"!==(null==s?void 0:s.adapter)){e.next=31;break}if(a!==v.Interstitial){e.next=24;break}if("preroll"!==(null==s?void 0:s.position)){e.next=13;break}return e.abrupt("return",this._startAdsensePlacementPreroll(n));case 13:if("start"!==(null==s?void 0:s.position)){e.next=17;break}return e.abrupt("return",this._startAdsensePlacementStart(n));case 17:if("next"!==(null==s?void 0:s.position)){e.next=21;break}return e.abrupt("return",this._startAdsensePlacementNext(n));case 21:return e.abrupt("return",this._startAdsensePlacementPreroll(n));case 22:e.next=29;break;case 24:if(a!==v.Rewarded){e.next=28;break}return e.abrupt("return",this._startAdsensePlacementRewardedAd(n));case 28:throw new Error("Unsupported ad type");case 29:e.next=44;break;case 31:if(!["ima","spil","audio"].some(function(e){return t(this,o),e===(null==s?void 0:s.adapter)}.bind(this))){e.next=42;break}if(a!==v.Interstitial){e.next=37;break}return e.abrupt("return",this._startInterstitialAd(s));case 37:if(a!==v.Rewarded){e.next=41;break}return e.abrupt("return",this._startRewardedAd(s));case 41:throw new Error("Unsupported ad type");case 42:["opus"].some(function(e){return t(this,o),e===(null==s?void 0:s.adapter)}.bind(this))&&this._startOpusAd(s);case 44:case"end":return e.stop()}}),e,this)}))),function(e){return G.apply(this,arguments)})},{key:"_startOpusAd",value:(j=e(r.mark((function e(n){var i,a,s,o,d,u,c,l,h,p,f,m,v,g,A,b=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a="rewarded"===n.adTypeFound?"reward":n.adTypeFound,this._send_atom_event("opus-ad.start"),!this.requestRunning){e.next=8;break}return this._broadcast("AD_IS_ALREADY_RUNNING",{status:"warning"}),this._broadcast("AD_ERROR",{message:"Ad is already running",status:"error",reason:"request-running"}),this._send_atom_event("opus-ad.already-running"),e.abrupt("return");case 8:if(s=null===(i=window.gdlocus)||void 0===i?void 0:i.adBreak){e.next=13;break}return this._send_atom_event("opus-ad.not-initialized"),this._broadcast("AD_ERROR",{message:"Locus adBreak not found",status:"error",reason:"opus-not-found"}),e.abrupt("return");case 13:this._send_atom_event("opus-ad.ready"),o=void function(){return t(this,b),!0}.bind(this),this.requestRunning=!0,d=this.gameData,u=d.gameId,c=d.slug,l=d.title,h={assetId:u,slug:c,title:l,debug:o},p=function(e){t(this,b),this.opusEventReceived=!0,this._broadcast("CONTENT_PAUSE_REQUESTED",{message:"",status:"success"}),this._broadcast("IMPRESSION",{message:"",status:"success"})}.bind(this),f=function(e){t(this,b),this.opusEventReceived=!0,this._broadcast("CONTENT_RESUME_REQUESTED",{message:"",status:"success"})}.bind(this),m=function(){t(this,b),this.opusEventReceived=!0}.bind(this),v=function(){t(this,b),this.opusEventReceived=!0,this._broadcast("COMPLETE",{message:"",status:"success"}),this._broadcast("SDK_REWARDED_WATCH_COMPLETE",{message:"",status:"success"}),this._send_atom_event("sg.ad.rw.viewed")}.bind(this),g=function(e){t(this,b),this.opusEventReceived=!0,this.resetForNext();var n="".concat(a);this.adCounter[n]=this.adCounter[n]||0,this.adCounter[n]++,"viewed"===e.breakStatus?this._broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success"}):this._broadcast("AD_ERROR",{message:e.errorMessage,errorType:e.errorType,status:e.breakStatus,reason:"opus-error"})}.bind(this),console.log("opus-ad meta",h),A={type:a,meta:h,beforeAd:p,afterAd:f,adBreakDone:g},"reward"===a&&(A=gR(gR({},A),{},{adDismissed:m,adViewed:v})),this.opusEventReceived=!1,this._startTimeoutForOpus(),s&&s(A);case 30:case"end":return e.stop()}}),e,this)}))),function(e){return j.apply(this,arguments)})},{key:"preloadAd",value:(F=e(r.mark((function e(t){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t!==v.Interstitial){e.next=4;break}return e.abrupt("return","gdsdk://preloaded");case 4:if(t!==v.Rewarded){e.next=8;break}return e.abrupt("return","gdsdk://preloaded");case 8:throw new Error("Unsupported ad type");case 9:case"end":return e.stop()}}),e)}))),function(e){return F.apply(this,arguments)})},{key:"addAdComponents",value:function(){var e=this,n=function(){t(this,e),this.adsManager.resume()}.bind(this),r=function(){t(this,e),this.rewardGuarantied||(this._broadcast("SDK_REWARDED_WATCH_COMPLETE",{message:"",status:"success"}),this.rewardGuarantied=!1),this._broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success"}),this._hideSkipButton(),this.cancel()}.bind(this);try{this.adResume=new uS(this.adContainer,n),this.adResume.add(),this.rewardedLabel=new cS(this.adContainer,n),this.rewardedLabel.add(),this.skipAdButton=new lS(this.adContainer,n,r),this.skipAdButton.add(),this.audioAdLabel=new hS(window.document.body),this.audioAdLabel.add(),this.audioAdLabel.hide(),this.adCounterLabel=new pS(window.document.body),this.adCounterLabel.add(),this.adCounterLabel.hide(),this.adInfoLabel=new fS("Watching multiple ads now will reduce adbreaks later",window.document.body),this.adInfoLabel.add(),this.adInfoLabel.hide()}catch(e){console.log("error on adding adResume",e)}}},{key:"loadDisplayAd",value:(M=e(r.mark((function n(i){var a=this;return r.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",new Promise(function(){var n=e(r.mark((function e(n,s){var o,d,u,c,l,h,p,f,m,v=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:try{yo("display_test load",i),(d=i?i.containerId:null)||s("Container id is not specified"),u=document.getElementById(d),document.getElementById(d)||s("No container is found with this id - ".concat(d)),void 0===window.idhb.requestAds&&s("Prebid.js wrapper script hit an error or didn't exist!"),c=i.slotId?i.slotId:"gd__banner@".concat(d),document.getElementById(c)||(l="\n .gd__banner{\n z-index: ".concat(g.DisplayContainer.zIndex,";\n height: 100%;\n display: flex !important;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n }"),document.getElementById("gd__banner__style")||((h=document.createElement("style")).type="text/css",h.id="gd__banner__style",h.styleSheet?h.styleSheet.cssText=l:h.appendChild(document.createTextNode(l)),u.appendChild(h)),(p=document.createElement("div")).id=c,p.classList.add("gd__banner"),u.appendChild(p)),a.atom_display=null,null!==(o=a.atom_display)&&void 0!==o&&o.params&&window.idhb.setAdserverTargeting(null===(f=a.atom_display)||void 0===f?void 0:f.params),(m={})[c]={maxSize:[u.offsetWidth,u.offsetHeight]},yo("display_test slots",m),window.idhb.requestAds({slots:m,callback:function(e){t(this,v),yo("display_test callback",JSON.stringify(e,null,2))}.bind(this)}),n()}catch(e){console.log("display_test error",e),s(e.message||e)}case 1:case"end":return e.stop()}}),e,this)})));return function(e,t){return n.apply(this,arguments)}}()));case 1:case"end":return n.stop()}}),n)}))),function(e){return M.apply(this,arguments)})},{key:"_startInterstitialAd",value:(B=e(r.mark((function e(n){var i,a,s,o,d,u=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!this.requestRunning){e.next=4;break}return this._broadcast("AD_IS_ALREADY_RUNNING",{status:"warning"}),e.abrupt("return");case 4:if(!void function(){if(t(this,u),xo.fictionalIMAError)return this._broadcast("AD_ERROR",{message:"fictional IMA error",status:"error",skipForward:!0}),!0}.bind(this)){e.next=7;break}return e.abrupt("return");case 7:return this.requestRunning=!0,e.next=10,this._initDisplayContainerWithAutoPlay();case 10:return a=e.sent,e.next=13,this._loadInterstitialAd(gR(gR({},a),n));case 13:if(s=e.sent,o=s.success,s.args,o){e.next=18;break}return e.abrupt("return");case 18:null!==(i=this.adContext)&&void 0!==i&&i.muteRequested?this.adsManager.setVolume(0):(a.autoplayRequiresMute&&this.adsManager.setVolume(0),!0===(null===(d=this.gameData.advlm)||void 0===d?void 0:d.mode)&&this.adsManager.setVolume(1)),this.adsManager.init(this.options.width,this.options.height,google.ima.ViewMode.NORMAL),this.adsManager.start(),e.next=28;break;case 23:throw e.prev=23,e.t0=e.catch(0),yo("VAST_URL_2 error",e.t0),this._onError(e.t0),e.t0;case 28:case"end":return e.stop()}}),e,this,[[0,23]])}))),function(e){return B.apply(this,arguments)})},{key:"_startPromo",value:(L=e(r.mark((function e(t,n){var i,a,s,o,d;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!this.requestRunning){e.next=4;break}return this._broadcast("AD_IS_ALREADY_RUNNING",{status:"warning"}),e.abrupt("return");case 4:return this.requestRunning=!0,this.adSuccess=!1,e.next=8,this._initDisplayContainerWithAutoPlay();case 8:return a=e.sent,e.next=11,this._loadPromo(gR(gR({},a),t),n);case 11:if(s=e.sent,o=s.success,s.args,o){e.next=16;break}return e.abrupt("return");case 16:null!==(i=this.adContext)&&void 0!==i&&i.muteRequested?this.adsManager.setVolume(0):(a.autoplayRequiresMute&&this.adsManager.setVolume(0),!0===(null===(d=this.gameData.advlm)||void 0===d?void 0:d.mode)&&this.adsManager.setVolume(1)),this.adsManager.init(this.options.width,this.options.height,google.ima.ViewMode.NORMAL),this.adsManager.start(),this.msgrt.send("promo.adsense",{message:"".concat(t.position," success")}),e.next=27;break;case 22:throw e.prev=22,e.t0=e.catch(0),this.msgrt.send("promo.adsense.err",{message:"".concat(t.position," failure,").concat(e.t0.message?e.t0.message:e.t0,", [").concat(this.parentURL,"]")}),this._onError(e.t0),e.t0;case 27:case"end":return e.stop()}}),e,this,[[0,22]])}))),function(e,t){return L.apply(this,arguments)})},{key:"_loadPromo",value:(P=e(r.mark((function e(t,n){var i,a;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this._resetAdsLoader(),e.prev=1,i=this.nextAdPosition(n),a=this._create_promo_context(i),this._requestPromo(a,gR({adType:v.Interstitial},t)),e.next=7,this._waitOnAdLoad();case 7:return e.abrupt("return",e.sent);case 10:throw e.prev=10,e.t0=e.catch(1),new Error(e.t0);case 13:case"end":return e.stop()}}),e,this,[[1,10]])}))),function(e,t){return P.apply(this,arguments)})},{key:"_loadInterstitialAd",value:(O=e(r.mark((function e(t){var n;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._resetAdsLoader(),e.prev=1,e.t0=this.preloadedInterstitialAdVast,e.t0){e.next=7;break}return e.next=6,this._getAdVast(v.Interstitial,t);case 6:e.t0=e.sent;case 7:if(n=e.t0,delete this.preloadedInterstitialAdVast,n.url){e.next=12;break}throw new Error("NO_VAST_URL");case 12:return e.next=14,this._requestAd(n,gR({adType:v.Interstitial},t));case 14:return e.sent,e.next=17,this._waitOnAdLoad();case 17:return e.abrupt("return",e.sent);case 20:throw e.prev=20,e.t1=e.catch(1),console.log("VAST_URL error",e.t1),new Error(e.t1);case 24:case"end":return e.stop()}}),e,this,[[1,20]])}))),function(e){return O.apply(this,arguments)})},{key:"_waitOnAdLoad",value:function(){var e=this;return new Promise(function(n,r){var i=this;t(this,e);var a="videoad.preloadad";this.eventBus.unsubscribeScope(a);var s=function(e){var r=this;t(this,i),setTimeout(function(){t(this,r),this.eventBus.unsubscribeScope(a),n({success:!0,args:e})}.bind(this),1)}.bind(this),o=function(e){var r=this;t(this,i),setTimeout(function(){t(this,r),this.eventBus.unsubscribeScope(a),n({success:!1,args:e})}.bind(this),1)}.bind(this);this.eventBus.subscribe("AD_SDK_MANAGER_READY",s,a),this.eventBus.subscribe("AD_SDK_CANCELED",o,a),this.eventBus.subscribe("AD_ERROR",o,a)}.bind(this))}},{key:"_startRewardedAd",value:(D=e(r.mark((function e(n){var i,a,s,o,d,u=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!this.requestRunning){e.next=4;break}return this._broadcast("AD_IS_ALREADY_RUNNING",{status:"warning"}),e.abrupt("return");case 4:if(!void function(){if(t(this,u),xo.fictionalIMAError)return this._broadcast("AD_ERROR",{message:"fictional IMA error",status:"error",skipForward:!0}),!0}.bind(this)){e.next=7;break}return e.abrupt("return");case 7:return this.requestRunning=!0,e.next=10,this._initDisplayContainerWithAutoPlay();case 10:return a=e.sent,e.next=13,this._loadRewardedAd(gR(gR({},a),n));case 13:if(s=e.sent,o=s.success,s.args,o){e.next=18;break}return e.abrupt("return");case 18:null!==(i=this.adContext)&&void 0!==i&&i.muteRequested?this.adsManager.setVolume(0):(a.autoplayRequiresMute&&this.adsManager.setVolume(0),!0===(null===(d=this.gameData.advlm)||void 0===d?void 0:d.mode)&&this.adsManager.setVolume(1)),this.adsManager.init(this.options.width,this.options.height,google.ima.ViewMode.NORMAL),this.adsManager.start(),e.next=27;break;case 23:throw e.prev=23,e.t0=e.catch(0),this._onError(e.t0),e.t0;case 27:case"end":return e.stop()}}),e,this,[[0,23]])}))),function(e){return D.apply(this,arguments)})},{key:"_loadRewardedAd",value:(E=e(r.mark((function e(t){var n;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._resetAdsLoader(),e.prev=1,e.t0=this.preloadedRewardedAdVast,e.t0){e.next=7;break}return e.next=6,this._getAdVast(v.Rewarded,t);case 6:e.t0=e.sent;case 7:return n=e.t0,delete this.preloadedRewardedAdVast,e.next=11,this._requestAd(n,gR({adType:v.Rewarded},t));case 11:return e.sent,e.next=14,this._waitOnAdLoad();case 14:return e.abrupt("return",e.sent);case 17:throw e.prev=17,e.t1=e.catch(1),new Error(e.t1);case 20:case"end":return e.stop()}}),e,this,[[1,17]])}))),function(e){return E.apply(this,arguments)})},{key:"_preloadInterstitialAd",value:(x=e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,e.t0=this.preloadedInterstitialAdVast,e.t0){e.next=6;break}return e.next=5,this._getAdVast(v.Interstitial);case 5:e.t0=e.sent;case 6:return this.preloadedInterstitialAdVast=e.t0,e.abrupt("return",this.preloadedInterstitialAdVast.url);case 10:throw e.prev=10,e.t1=e.catch(0),new Error(e.t1);case 13:case"end":return e.stop()}}),e,this,[[0,10]])}))),function(){return x.apply(this,arguments)})},{key:"_preloadRewardedAd",value:(k=e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,e.t0=this.preloadedRewardedAdVast,e.t0){e.next=6;break}return e.next=5,this._getAdVast(v.Rewarded);case 5:e.t0=e.sent;case 6:return this.preloadedRewardedAdVast=e.t0,e.abrupt("return",this.preloadedRewardedAdVast.url);case 10:throw e.prev=10,e.t1=e.catch(0),new Error(e.t1);case 13:case"end":return e.stop()}}),e,this,[[0,10]])}))),function(){return k.apply(this,arguments)})},{key:"_onError",value:function(e){this.cancel(e),this._clearSafetyTimer("ERROR")}},{key:"_hide",value:function(e){this.video_ad_player&&(this.video_ad_player.src=""),this.activeAdContainer&&(this.activeAdContainer.style.visibility="hidden")}},{key:"_show",value:function(e){var n=this;if(this.activeAdContainer){this.isAudioAd||(this.activeAdContainer.style.visibility="visible");var r=null==e?void 0:e.mode;e.t4r=this.gameData.__t4r,e.t4rac=this.gameData.__t4rac;var i=this._adrequest_user_context.t4RResult?this._adrequest_user_context.t4RResult:this._isT4R(e);this._adrequest_user_context.t4RResult=i;var a=i.success,s=i.reason,o=this._getT4ROptions(e);if("loaded"===r){var d,u,c=(null===(d=this._adrequest_user_context)||void 0===d||null===(u=d.adTag)||void 0===u?void 0:u.bidder)||"adx";this._broadcast("AD_BIDDER",{bidder:c}),a||this._broadcast("AD_T4R_NONE",{reason:s}),this.activeAdContainer.style.opacity=a?.001:1,a&&null!=e&&e.contentType.startsWith("video/")&&(this.t4rButton=new mS(this.adContainer),this.t4rButton.add(),this._broadcast("AD_T4R_VIDEO")),a&&this.adsManager.setVolume(0),a&&this._broadcast("AD_T4R"),a&&setTimeout(function(){var e;t(this,n),this.activeAdContainer.style.opacity=1,this.adsManager.setVolume(null!==(e=this.adContext)&&void 0!==e&&e.muteRequested?0:1),this.t4rButton&&this.t4rButton.hide()}.bind(this),((null==o?void 0:o.min)||1234)+Math.random()*((null==o?void 0:o.max)||3210))}else if("click"===r||"first_quartile"===r){var l;if(a&&"click"===r){var h,p=null===(h=this._adrequest_user_context)||void 0===h?void 0:h.tnl_ad_pos;this.clickCount[p]++,this._broadcast("AD_T4R_CLICK")}a||"click"!==r||this._broadcast("AD_CLICK"),this.t4rButton&&this.t4rButton.hide(),this.activeAdContainer.style.opacity=1,this.adsManager.setVolume(null!==(l=this.adContext)&&void 0!==l&&l.muteRequested?0:1)}}}},{key:"_createPlayer",value:function(){var e=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=g.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,window.activeAdContainer=this.activeAdContainer,this.thirdPartyContainer?(this.adContainer.appendChild(i),this.thirdPartyContainer.appendChild(this.adContainer),this.activeAdContainer=this.thirdPartyContainer):(this.adContainer.appendChild(i),n.appendChild(this.adContainer)),this.addAdComponents(),this.activeAdContainer.style.visibility="hidden";var a=function(){t(this,e);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(e){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=e.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(){t(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(),s=i.getDate(),o=i.getMonth(),d=i.getFullYear(),u="AD_SDK_MANAGER_READY";this._broadcast(u,{name:u,message:"AD SDK is ready",status:"success",analytics:{category:u,action:this.parentDomain,label:"h".concat(a," d").concat(s," m").concat(o," y").concat(d)}}),this._adrequest_user_context=e.getUserRequestContext()}},{key:"_onAdEvent",value:function(e){var n,r,i,a,s=this,o=new Date,d=o.getHours(),u=o.getDate(),c=o.getMonth(),l=o.getFullYear(),h=A(google.ima.AdEvent.Type,e.type),p=!1,f=(null==e||null===(n=e.getAd())||void 0===n?void 0:n.getContentType())||"",m=!f.startsWith("image")&&!f.startsWith("text"),g=null==e||null===(r=e.ad)||void 0===r||null===(i=r.data)||void 0===i?void 0:i.title,b=null==e||null===(a=e.getAd())||void 0===a?void 0:a.data.skippable;this._sendIMAEventsToHB(e);var _=document.getElementById("game"),y="";switch(e.type){case google.ima.AdEvent.Type.AD_BREAK_READY:y="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:y="Fired when an ads list is loaded.";break;case google.ima.AdEvent.Type.ALL_ADS_COMPLETED:this.contentPaused&&(p=!0),this.isAudioAd&&(this.audioAdLabel.hide(),this.isAudioAd=!1),this.rewardGuarantied=!1,y="Fired when the ads manager is done playing all the ads.";break;case google.ima.AdEvent.Type.CLICK:y="Fired when the ad is clicked.";var w=e.getAd().getContentType();this._show({mode:"click",contentType:w}),uR();break;case google.ima.AdEvent.Type.COMPLETE:yo("gd-adflow ON COMPLETE!",e.getAd()),p=this._is_completed(e.getAd()),y="Fired when the ad completes playing.",this.adType_!==v.Rewarded||this.rewardGuarantied||(this._broadcast("SDK_REWARDED_WATCH_COMPLETE",{message:"",status:"success"}),this.rewardGuarantied=!0);break;case google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED:this.gameData.fllc.enabled&&(_.style.display="none"),this.contentPaused=!0,y="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:this.gameData.fllc.enabled&&(_.style.display="block"),y="Fired when content should be resumed. This usually happens when an ad finishes or collapses.",this.contentPaused?p=!0:(this.requestRunning=!1,this._broadcast("AD_ERROR",{message:"got resume without pause, possibly with VMAP",status:"error",skipForward:!0})),this._hideAddResume(),this._hideRewardedLabel(),this._hideSkipButton(),this.t4rButton&&this.t4rButton.hide(),this._clearTimeoutForSkipAddButton();break;case google.ima.AdEvent.Type.DURATION_CHANGE:y="Fired when the ad's duration changes.";break;case google.ima.AdEvent.Type.FIRST_QUARTILE:y="Fired when the ad playhead crosses first quartile.";var k=e.getAd().getContentType();this._show({mode:"first_quartile",contentType:k});break;case google.ima.AdEvent.Type.IMPRESSION:var x,E,D,S,R,T;if(y="Fired when the impression URL has been pinged.",e.getAd(),console.log("gdsdk: eventname IMPRESSION",this.isAudioAd),this._hideAdSpinner(),this.isAudioAd&&this.audioAdLabel.show(),"preroll"===this.adContext.adTypeFound)(null===(x=this.gameData)||void 0===x||null===(E=x.pAds)||void 0===E||null===(D=E.vmap)||void 0===D?void 0:D.enabled)&&(null===(S=this.gameData)||void 0===S||null===(R=S.pAds)||void 0===R||null===(T=R.vmap)||void 0===T?void 0:T.adtr)&&this.adInfoLabel.show();break;case google.ima.AdEvent.Type.INTERACTION:y="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:y="Fired when the displayed ad changes from linear to nonlinear, or vice versa.";break;case google.ima.AdEvent.Type.LOADED:var I=e.getAd().getContentType();y=I,this._show({mode:"loaded",contentType:I});break;case google.ima.AdEvent.Type.LOG:e.getAdData().adError&&(y=e.getAdData());break;case google.ima.AdEvent.Type.MIDPOINT:y="Fired when the ad playhead crosses midpoint.";break;case google.ima.AdEvent.Type.PAUSED:m&&"VPAID"!==g&&this.adResume.show(),y="Fired when the ad is paused.";break;case google.ima.AdEvent.Type.RESUMED:y="Fired when the ad is resumed.",m&&(this.adResume.hide(),this.rewardedLabel.hide());break;case google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED:y="Fired when the displayed ads skippable state is changed.";break;case google.ima.AdEvent.Type.SKIPPED:var C;p=!(null!==(C=this.adContext)&&void 0!==C&&C.isVMAP)&&this._is_completed(e.getAd()),this.adToaster.show("⚠️ Ad was skipped ⚠️","skip"),y="Fired when the ad is skipped by the user.",dR(),this.t4rButton&&this.t4rButton.hide();break;case google.ima.AdEvent.Type.STARTED:var O;if(this.skipAdButton&&this.skipAdButton.hide(),this.rewardGuarantied=!1,this.adType_===v.Rewarded)!b&&null!==(O=this.gameData.rwskp)&&void 0!==O&&O.enabled&&(this._skipAdButtonTimeout=setTimeout(function(){t(this,s),this.skipAdButton.show(),this._broadcast("SDK_REWARDED_WATCH_COMPLETE",{message:"",status:"success"}),this.rewardGuarantied=!0}.bind(this),3e4)),this.rewardedLabel.show();this._hideAddResume(),y="Fired when the ad starts playing.";break;case google.ima.AdEvent.Type.THIRD_QUARTILE:y="Fired when the ad playhead crosses third quartile.";break;case google.ima.AdEvent.Type.USER_CLOSE:p=this._is_completed(e.getAd()),y="Fired when the ad is closed by the user.";break;case google.ima.AdEvent.Type.VOLUME_CHANGED:y="Fired when the ad volume has changed.";break;case google.ima.AdEvent.Type.VOLUME_MUTED:y="Fired when the ad volume has been muted."}if(""!==h&&""!==y){var P=!this.contentPaused&&e.type===google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,L=!this.contentPaused&&e.type===google.ima.AdEvent.Type.ALL_ADS_COMPLETED,B=P||L;"VPAID"===g&&this.imaEventList.push(h),B||this.isAudioAd||this._broadcast(h,{name:h,message:y,status:"success",analytics:{category:h,action:this.parentDomain,label:"h".concat(d," d").concat(u," m").concat(c," y").concat(l)}})}if(p&&!this.adSuccess){this.adSuccess=!0;var U=e.getAd();"VPAID"===g&&this._setAtomEvent();var M="Rainbow"===(null==U?void 0:U.getAdSystem())&&(null==U?void 0:U.getWrapperAdIds().some(function(e){return t(this,s),"promo"===e}.bind(this)));yo("gd-adflow isPromoSuccess",M,null==U?void 0:U.getAdSystem(),null==U?void 0:U.getWrapperAdIds()),this._broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success",isPromoSuccess:M}),this.resetForNext(e)}}},{key:"_setAtomEvent",value:function(){this.dumper||(this.dumper=new mR({msgrt:this.msgrt,gameData:this.gameData,parentDomain:this.parentDomain,parentURL:this.parentURL,topDomain:this.parentURL}),this.dumper);var e={eventList:this.imaEventList};this.dumper.send_atom_event("vpaid",e),this.imaEventList=[]}},{key:"_clearTimeoutForSkipAddButton",value:function(){this._skipAdButtonTimeout&&(clearTimeout(this._skipAdButtonTimeout),this._skipAdButtonTimeout=null)}},{key:"_run_atom_tag_aws_test",value:function(e){var n=this;try{var r,i,a,s,o;if(!((null===(r=this.gameData)||void 0===r||null===(i=r.aws_tst)||void 0===i?void 0:i.enabled)&&(null===(a=this.gameData)||void 0===a||null===(s=a.aws_tst)||void 0===s||null===(o=s.ep)||void 0===o?void 0:o.atm)))return;var d=e.type,u=e.url;if("none"===d||!u)return;u=u.replace("tag.atom.gamedistribution.com","atom-tag-prod-aws.gamedistribution.com"),fetch(u).then(function(){t(this,n)}.bind(this))}catch(e){}}},{key:"_findAtomTagUrl",value:function(e,n){var r=this,i={type:"none"};try{var a=this.current_dp,s=a.id,o=a.error_url,d=a.impression_url,u=a.fallback_imp_url,c=a.promo_imp_green_url;if(!e&&!n)return i={type:"imp_err",url:o};var l=e.getWrapperAdIds().some(function(e){return t(this,r),e==="".concat(s)}.bind(this)),h=e.getWrapperAdIds().some(function(e){return t(this,r),"fallback"===e}.bind(this)),p=e.getWrapperAdIds().some(function(e){return t(this,r),"promo"===e}.bind(this));l&&n?i={type:"normal_imp",url:d}:l&&!n?i={type:"normal_err",url:o}:p&&n?i={type:"promo_imp",url:c}:h&&n&&(i={type:"fallbacj_imp",url:u})}catch(e){}return i}},{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);AR.emit("AD_ERROR",r),this._broadcast(t,{message:r,details:i,status:"warning",analytics:{category:t,action:i,label:r}}),this._hideAddResume(),this._clearTimeoutForSkipAddButton()}catch(e){}}},{key:"_hideAddResume",value:function(){try{this.adResume&&this.adResume.hide()}catch(e){console.log("Error on hide adResume",e)}}},{key:"_hideAdSpinner",value:function(){try{var e;null!==(e=this.gameData.adspn)&&void 0!==e&&e.enabled&&this.adFlowProcessSpinner&&this.adFlowProcessSpinner.hide()}catch(e){console.log("Error on hide adSpinner",e)}}},{key:"_hideRewardedLabel",value:function(){try{this.adType_===v.Rewarded&&this.rewardedLabel&&this.rewardedLabel.hide()}catch(e){console.log("Error on hide adResume",e)}}},{key:"_hideSkipButton",value:function(){try{this.adType_===v.Rewarded&&this.skipAdButton&&this.skipAdButton.hide()}catch(e){console.log("Error on hide adResume",e)}}},{key:"_sendIMAEventsToHB",value:function(e){if(window.idhb&&"function"==typeof window.idhb.onImaEvent)try{window.idhb.onImaEvent({event: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(e,n){var r=this;this.safetyTimer&&clearTimeout(this.safetyTimer),this.safetyTimer=window.setTimeout(function(){t(this,r),this.cancel(),this._clearSafetyTimer(n)}.bind(this),e)}},{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/headerlift.min.js","http://hb.improvedigital.com/pbw/headerlift.min.js"];return this.options.hb_script?[this.options.hb_script].concat(e):e}},{key:"_getInnerErrorCode",value:function(e){if(WS(e.getInnerError)){var t=e.getInnerError();if(t)return WS(t.getErrorCode)&&WS(t.getVastErrorCode)?t.getErrorCode().toString()||t.getVastErrorCode().toString():t.message}}},{key:"resetForNext",value:function(){this.requestRunning=!1,this._hide("resetForNext")}},{key:"_createCustomAdVastUrl",value:function(e,n){var r=this;if(e){var i=this.macros.transform(e,{get:function(e){if(t(this,r),n&&n.tnl_keys)return n.tnl_keys[e.toLowerCase()]}.bind(this)});for(var a in i.query||{}){var s=i.query[a];q(s)&&(i.query[a]=H.stringify(s))}var o=new I(i.url,!0);return V(o.query,i.query||{}),gR({url:o.toString()},n)}}},{key:"_transformVast",value:function(e,t){var n={url:e.url};try{var r=new I(e.url,!0),i=this._transformQuery(e,t,r);i&&(n.url=r.toString());var a=i?r:new I(e.url,!0);if(a.query.cust_params){var s=H.parse(a.query.cust_params);n.bidder=s.hb_bidder,n.cust_params=s}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(e,n,r){var i=this;if(e&&n&&e.tnl_keys){var a=this.options.vast_query;if(n.retry_on_success&&this.options.retry_on_success&&q(this.options.retry_on_success.vast_query)?a=this.options.retry_on_success.vast_query:n.retry_on_failure&&this.options.retry_on_failure&&q(this.options.retry_on_failure.vast_query)&&(a=this.options.retry_on_failure.vast_query),a=U(a),q(a)){var s=r.query;if(a.$$remove){for(var o in s){new RegExp(a.$$remove,"i").test(o)&&delete s[o]}delete a.$$remove}var d=H.parse(s.cust_params);if(a.cust_params&&a.cust_params.$$remove){for(var u in d){new RegExp(a.cust_params.$$remove,"i").test(u)&&delete d[u]}delete a.cust_params.$$remove}var c=this.macros.transform(a,{get:function(n){return t(this,i),e.tnl_keys[n.toLowerCase()]}.bind(this)});return s.cust_params=d,V(s,c),s.cust_params=H.stringify(s.cust_params),!0}}}},{key:"_isExcludedBidderForT4R",value:function(){var e=this;try{var n,r,i,a,s=(null===(n=this._adrequest_user_context)||void 0===n||null===(r=n.adTag)||void 0===r?void 0:r.bidder)||"adx";this.msgrt.send("bidder",{message:s}),yo("ex_bidder ad request context",this._adrequest_user_context,'bidder:"'.concat(s,'"'));var o=(null===(i=this.gameData.t4rc)||void 0===i?void 0:i.bidder_exc)||[],d=(null===(a=this.gameData.t4rc)||void 0===a?void 0:a.bidder_inc)||[],u=!1;return d.length>0?u=!d.some(function(n){return t(this,e),n===s}.bind(this)):o.length>0&&(u=o.some(function(n){return t(this,e),n===s}.bind(this))),yo("ex_bidder_result",s,u),u}catch(e){console.log("ex_bidder ERR",e)}}},{key:"_isExcludedBidderForT4RWithBidderExcRate",value:function(){var e,t,n=this._isExcludedBidderForT4R(),r=null===(e=this.gameData)||void 0===e||null===(t=e.t4rc)||void 0===t?void 0:t.bidder_exc_rate,i=null!=r&&r.enabled?(null==r?void 0:r.rate)||.8:0,a=Math.random();return n||a<i}},{key:"_isT4R",value:function(e){var t=null==e?void 0:e.contentType,n={isImage:null==t?void 0:t.startsWith("image/"),isText:"text"===t,isVideo:null==t?void 0:t.startsWith("video/")},r=Object.values(this._getT4RValidators(e)||{}),i={success:!0};try{for(var a=0,s=r;a<s.length;a++){var o=(0,s[a])(n);if(!o.success){i=o;break}}}catch(e){i={success:!1,reason:"internal-error"}}return i}},{key:"_getT4RValidators",value:function(e){var n=this,r=function(r){return t(this,n),e.t4rac.enabled?{success:!0,name:"ddate"}:{success:!1,reason:"ddate",name:"ddate"}}.bind(this),i=function(e){if(t(this,n),this.gameData.publishedAt){var r=new Date(this.gameData.publishedAt);return((new Date).getTime()-r.getTime())/864e5<=10?{success:!1,reason:"pdate-1",name:"pdate"}:{success:!0,name:"pdate"}}return{success:!1,reason:"pdate-2",name:"pdate"}}.bind(this),a=function(r){var i,a,s,o;t(this,n);var d=this.gameData.meta,u=e.t4r.meta;return(null==d||null===(i=d.ast)||void 0===i?void 0:i.c)>=(null==u||null===(a=u.ast)||void 0===a?void 0:a.c)&&(null==d||null===(s=d.sit)||void 0===s?void 0:s.c)>=(null==u||null===(o=u.sit)||void 0===o?void 0:o.c)?{success:!1,reason:"meta",name:"meta"}:{success:!0,name:"meta"}}.bind(this),s=function(e){t(this,n);var r=this._isExcludedBidderForT4RWithBidderExcRate();return this.msgrt.send("bidder.ex",{message:r?"true":"false"}),{success:!r,reason:r?"bidder":null,name:"bidder"}}.bind(this),o=function(r){var i,a;t(this,n);var s=null===(i=this._adrequest_user_context)||void 0===i?void 0:i.tnl_ad_pos,o=s&&this.clickCount[s]>=(null===(a=e.t4r[s])||void 0===a?void 0:a.count);return{success:!o,reason:o?"click-count":null,name:"click-count"}}.bind(this),d=function(r){var i,a;t(this,n);var s=null===(i=this._adrequest_user_context)||void 0===i?void 0:i.tnl_ad_pos,o=s&&(null===(a=e.t4r[s])||void 0===a?void 0:a.enabled);return{success:o,reason:o?null:"rule-check",name:"rule-check"}}.bind(this),u=function(r){var i,a;if(t(this,n),!r.isVideo)return{success:!0,name:"viper-check"};var s=null===(i=this._adrequest_user_context)||void 0===i?void 0:i.tnl_ad_pos,o=(null===(a=e.t4r[s])||void 0===a?void 0:a.viper)||0;if(o>0){var d,u=Math.random()<o,c=s&&u&&(null===(d=e.t4r[s])||void 0===d?void 0:d.enabled);return{success:c,reason:c?null:"viper-check",name:"viper-check"}}return{success:!1,reason:"rule-check-viper",name:"viper-check"}}.bind(this),c=function(e){t(this,n);var r=e.isImage,i=e.isText,a=e.isVideo,s=r||i||a;return{success:s,reason:s?null:"media-format",name:"media-format"}}.bind(this);return{checkRule:d,checkMediaFormat:c,checkPublishDate:i,checkMeta:a,checkClickCount:o,checkViper:u,checkExcludedBidder:s,checkT4rActivation:r}}},{key:"_isVMAP",value:function(e){var t,n,r,i,a,s,o,d,u,c,l,h,p,f,m;if(!e)return!1;var v="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===(s=this.gameData)||void 0===s||null===(o=s.mAds)||void 0===o?void 0:o.vmap)||!0===(null===(d=this.gameData)||void 0===d||null===(u=d.mAds)||void 0===u||null===(c=u.vmap)||void 0===c?void 0:c.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(!v)return!1;var g=this._get_vmap_config(e),A=this.adCounter[e];return void 0!==(null==g?void 0:g.start)?A>=(null==g?void 0:g.start):v}},{key:"_getT4ROptions",value:function(e){var t,n=null===(t=this._adrequest_user_context)||void 0===t?void 0:t.tnl_ad_pos;switch(n){case"preroll":case"midroll":case"rewarded":return e.t4r[n]}}},{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){for(var t=e.adtag,n=e.position,r=e.config,i=e.dp,a=r.count||2,s=[],o=1;o<=a;o++){var d={};d.adtag=this._createCustomAdVastUrl(r["vast_"+o])||t,d.position=n,d.dp=r["vast_"+o]?void 0:i,s.push(d)}return s}},{key:"_get_vmap_config",value:function(e){var t,n,r,i,a,s,o,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===(s=a.rAds)||void 0===s?void 0:s.vmap;default:return null===(o=this.gameData)||void 0===o||null===(d=o.pAds)||void 0===d?void 0:d.vmap}}},{key:"_isDP",value:function(e){var t,n,r;return!!e&&!0===(null===(t=this.gameData)||void 0===t||null===(n=t.dp)||void 0===n||null===(r=n[e])||void 0===r?void 0:r.enabled)}},{key:"_create_dp_display_context",value:function(){var e=this;return new Promise(function(n){var r=this;t(this,e);try{var i={id:this.topDomain||this.parentDomain,au:"display",ty:"display",aid:this.gameData.gameId,pgu:this.parentURL},a=new dS(this.gameData).checkCustomParams();a&&(i.cp=a);var s=encodeURIComponent(C.encode(JSON.stringify(i)));fetch("https://tag.atom.gamedistribution.com/v1/atm?ar=".concat(s)).then(function(e){return t(this,r),e.json()}.bind(this)).then(function(e){if(t(this,r),!e||!e.p)return this.msgrt.send("dp.na",{message:"atom"}),n();var i=e.p/100;this.msgrt.send("dp.fp",{message:i}),n({params:{fp:i},error_url:"https://tag.atom.gamedistribution.com/v1/err?ar=".concat(s),impression_url:"https://tag.atom.gamedistribution.com/v1/imp?ar=".concat(s)})}.bind(this)).catch(function(e){t(this,r),this.msgrt.send("dp.err",{message:(null==e?void 0:e.message)||e}),n()}.bind(this))}catch(e){this.msgrt.send("dp.err",{message:(null==e?void 0:e.message)||e}),n()}}.bind(this))}},{key:"_create_promo_context",value:function(e){var n,r=this,i={id:this.topDomain||this.parentDomain,au:e||"unknown",ty:"video",aid:this.gameData.gameId,pgu:this.parentURL},a=Object.keys(i).map(function(e){return t(this,r),"".concat(e,"=").concat(encodeURIComponent(i[e]))}.bind(this)).join("&");encodeURIComponent(C.encode(JSON.stringify(i)));var s=null===(n=this.gameData.promo)||void 0===n?void 0:n.rainbow,o=null==s?void 0:s.enabled,d="https://tag.atom.gamedistribution.com/v1/rainbow/?".concat(a),u=o?d:void 0;return function(){t(this,r),xo.promoError&&(console.log("promo-test fictional promo error"),u=void 0)}.bind(this),{promo_url:u,promo_imp_blue_url:o?"https://tag.atom.gamedistribution.com/v1/rainbow/blue":void 0,promo_imp_green_url:o?"https://tag.atom.gamedistribution.com/v1/rainbow/green":void 0}}},{key:"_create_dp_context",value:function(n,i){var a=this;return new Promise(function(){var s=e(r.mark((function e(s){var o,d,u,c,l,h=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,a._isDP(n)){e.next=5;break}return a.msgrt.send("dp.na",{message:"rule"}),e.abrupt("return",s());case 5:d={id:a.topDomain||a.parentDomain,au:n||"unknown",ty:"video",aid:a.gameData.gameId,pgu:a.parentURL},(u=new dS(a.gameData).checkCustomParams())&&(d.cp=u),c=encodeURIComponent(C.encode(JSON.stringify(d))),yo("gd-adflow isLastAdapter",null==i?void 0:i.adapterIndex,null==i?void 0:i.isLastAdapter),l=null===(o=a.gameData.promo)||void 0===o?void 0:o.rainbow,yo("gd-adflow promo_enabled",!1,null==l?void 0:l.enabled,null==i?void 0:i.isLastAdapter),fetch("https://tag.atom.gamedistribution.com/v1/atm?ar=".concat(c)).then(function(e){return t(this,h),e.json()}.bind(this)).then(function(e){if(t(this,h),!e||!e.p)return a.msgrt.send("dp.na",{message:"atom"}),s();var n=e.p/100;a.msgrt.send("dp.fp",{message:n}),s({id:Date.now(),floor_price:n,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:void 0,promo_imp_blue_url:void 0,promo_imp_green_url:void 0})}.bind(this)).catch(function(e){t(this,h),a.msgrt.send("dp.err",{message:(null==e?void 0:e.message)||e}),s()}.bind(this)),e.next=20;break;case 16:e.prev=16,e.t0=e.catch(0),a.msgrt.send("dp.err",{message:(null===e.t0||void 0===e.t0?void 0:e.t0.message)||e.t0}),s();case 20:case"end":return e.stop()}}),e,this,[[0,16]])})));return function(e){return s.apply(this,arguments)}}())}},{key:"_extend_dp_with_adsense",value:function(e,t){if(e&&t)try{var n,r=new I(t.vastUrl,!0);if(null===(n=r.query)||void 0===n||!n.cust_params)return;var i=H.parse(r.query.cust_params);if(!i.tnl_asset_id)return;i.adsense=1,r.query.cust_params=H.stringify(i,!1),e.fallback_url=r.toString(),e.fallback_imp_url="https://tag.atom.gamedistribution.com/v1/rainbow/green"}catch(e){}}},{key:"_extend_hl_url",value:function(e){e.dp;var t=e.hl;e.src;var n=e.tnl_keys,r=!0!==(null==t?void 0:t.bidFloorApplied)?0:1;0===r&&null!=n&&n.hasOwnProperty("fp")?r=2:1!==r||null!=n&&n.hasOwnProperty("fp")||(r=3),n.bfa=r;try{var i,a=new I(e.url,!0);if(null===(i=a.query)||void 0===i||!i.cust_params)return;var s=H.parse(a.query.cust_params);s.bfa=r,s.adsense=0,a.query.cust_params=H.stringify(s,!1),e.url=a.toString(),t.vastUrl=e.url}catch(e){}finally{this.msgrt.send("bfa",{message:r})}}},{key:"_init_hl_script",value:(w=e(r.mark((function e(n){var i,a,s,o,d,u,c,l,h,p,f,v,g=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=this._getPrebidScripts(),d=o[0],u=function(){return t(this,g),!1}.bind(this),window.idhb=window.idhb||{iabCmpExists:u},window.idhb.options=window.idhb.options||{},Object.assign(window.idhb.options,{assetId:this.gameData.gameId,configUrl:this.topDomain||this.parentDomain,parentUrl:this.parentURL,pageType:"gd"}),"undefined"===window.idhb.options.configUrl&&(window.idhb.options.configUrl=null),window.idhb.que=window.idhb.que||[],(c=new URL(d)).searchParams.append("referer",window.idhb.options.configUrl),d=c.href,e.next=13,m(d,"gdsdk_prebid",{alternates:o,error_prefix:"Blocked:",exists:function(){return t(this,g),window.idhb.requestAds}.bind(this)});case 13:return e.next=15,this.checkOpphbPath();case 15:l=b("ch",window.location.href),h=b("ch_date",window.location.href),p={tnl_content_category:this.category.toLowerCase()},l&&(p.channel=l),h&&(p.ch_date=h),(f=b("hl_label",this.parentURL)||b("hl_label",window.location.href))&&(p.label=f),window.idhb.setAdserverTargeting(p),window.idhb.allowPersonalizedAds(!!parseInt(this.userAllowedPersonalizedAds)),null!=(v=window.idhb.getConfig())&&null!==(i=v.hbw)&&void 0!==i&&null!==(a=i.slots)&&void 0!==a&&null!==(s=a.gd__banner)&&void 0!==s&&s.sizes&&(v.hbw.slots.gd__banner.sizes=[[120,600],[160,600],[250,250],[300,50],[300,100],[300,250],[300,600],[320,50],[320,480],[336,280],[728,90]],window.idhb.setConfig(v)),window.idhb.addEventListener("slotRenderEnded",function(e){var n=this;t(this,g);try{var r,i,a=e.slotId.split("@");a=1===a.length?a[0]:a[1],e.isEmpty?(null!==(r=this.atom_display)&&void 0!==r&&r.error_url&&(fetch(this.atom_display.error_url).catch(function(e){t(this,n)}.bind(this)),delete this.atom_display),yo("display_test DISPLAYAD_ERR",e),this._broadcast("DISPLAYAD_ERROR",{message:a,status:"warning"})):(null!==(i=this.atom_display)&&void 0!==i&&i.impression_url&&(fetch(this.atom_display.impression_url).catch(function(e){t(this,n)}.bind(this)),delete this.atom_display),yo("display_test DISPLAYAD_IMPRESSION"),this._broadcast("DISPLAYAD_IMPRESSION",{message:a,status:"success"}))}catch(e){}}.bind(this));case 27:case"end":return e.stop()}}),e,this)}))),function(e){return w.apply(this,arguments)})},{key:"checkOpphbPath",value:(f=e(r.mark((function e(){var t,n,i,a,s,o;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,i=this.topDomain||this.parentDomain||"",a=(null===(t=this.gameData)||void 0===t?void 0:t.gameId)||"",s=(null===(n=this.options)||void 0===n?void 0:n.width)||640,e.next=6,fetch("https://pub.headerlift.com/opphb?page_url=".concat(i,"&page_type=gd&page_width=").concat(s,"&aid=").concat(a));case 6:o=e.sent,wo("opphb load success",o),e.next=13;break;case 10:throw e.prev=10,e.t0=e.catch(0),new Error("Blocked: https://pub.headerlift.com/opphb");case 13:case"end":return e.stop()}}),e,this,[[0,10]])}))),function(){return f.apply(this,arguments)})},{key:"_init_ima_script",value:(l=e(r.mark((function e(n){var i,a,s=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return 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],e.next=4,m(a,"gdsdk_ima",{alternates:i,error_prefix:"Blocked:",exists:function(){return t(this,s),window.google&&window.google.ima}.bind(this)});case 4:case"end":return e.stop()}}),e,this)}))),function(e){return l.apply(this,arguments)})},{key:"_init_afg_script",value:(c=e(r.mark((function e(n){var i,a,s,o,d,u,c=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.gameData.afg_disabled){e.next=3;break}return e.abrupt("return");case 3:return(u={}).crossorigin="anonymous",u["data-ad-client"]=(null==n||null===(i=n.adsense_client)||void 0===i?void 0:i.length)>0?n.adsense_client:"ca-pub-2316275586951220",u["data-ad-frequency-hint"]="30s",u.allow="autoplay",(null==n||null===(a=n.adsense_channel)||void 0===a?void 0:a.length)>0&&(u["data-ad-channel"]=n.adsense_channel),(null==n||null===(s=n.adsense_host)||void 0===s?void 0:s.length)>0&&(u["data-ad-host"]=n.adsense_host),!0===(null==n?void 0:n.adsense_adbreak_test)&&(u["data-adbreak-test"]="on"),null!==(o=this.gameData.sdk.afg)&&void 0!==o&&o.enabled&&null!==(d=this.gameData.sdk.afg)&&void 0!==d&&d.use_own&&(u["data-ad-client"]=this.gameData.sdk.afg.adsense_client,u["data-ad-slot"]=this.gameData.sdk.afg.adsense_ad_slot,u["data-ad-format"]="auto"),e.next=16,m("https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js","afg",{error_prefix:"Blocked:",exists:function(){return t(this,c),!!window.adsbygoogle}.bind(this),attrs:u});case 16:window.adsbygoogle=window.adsbygoogle||[],window.adsbygoogle.push({sound:"on",preloadAdBreaks:"on"});case 18:case"end":return e.stop()}}),e,this)}))),function(e){return c.apply(this,arguments)})},{key:"fixOutOfBounds",value:function(){try{if(!(this.gameData.afgszf&&this.gameData.afgszf.enabled))return;for(var e=this.gameData.afgszf,t=e.height,n=e.scrolls,r=t||"120vh",i=n||!0,a=document.getElementsByClassName("adsbygoogle"),s=0;s<a.length;s++){var o,d=a[s],u=d&&(null===(o=d.children[0])||void 0===o?void 0:o.children[0]);u&&"IFRAME"===u.tagName&&u.style.height!==r&&(yo("out-of-bounds fix apply"),u.style.height=r,i&&(u.parentElement.style.overflow="auto"))}}catch(e){yo("out-of-bounds error: ".concat(e.message))}}},{key:"clearSession",value:function(){this.requestRunning=!1}},{key:"_startAdsensePlacementRewardedAd",value:(u=e(r.mark((function e(n){var i,a,s,o,d,u,c,l,h=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.params,e.prev=1,!this.requestRunning){e.next=5;break}return this._broadcast("AD_IS_ALREADY_RUNNING",{status:"warning"}),e.abrupt("return");case 5:if(!void function(){if(t(this,h),xo.fictionalAdSenseError||n.params.shouldFail)return this._broadcast("AD_ERROR",{message:"fictional adsense rewarded error",status:"error",skipForward:!0}),!0}.bind(this)){e.next=8;break}return e.abrupt("return");case 8:this.requestRunning=!0,this._send_atom_event("sg.ad.rw.requested"),i=!1,a=function(){t(this,h),i=!0,this.fixOutOfBounds(),this._broadcast("CONTENT_PAUSE_REQUESTED",{message:"",status:"success"}),this._broadcast("IMPRESSION",{message:"",status:"success"})}.bind(this),s=function(){t(this,h),i=!0,this._broadcast("CONTENT_RESUME_REQUESTED",{message:"",status:"success"})}.bind(this),o=function(){t(this,h),i=!0,this._send_atom_event("sg.ad.rw.dismissed")}.bind(this),d=function(){t(this,h),i=!0,this._broadcast("COMPLETE",{message:"",status:"success"}),this._broadcast("SDK_REWARDED_WATCH_COMPLETE",{message:"",status:"success"}),this._send_atom_event("sg.ad.rw.viewed")}.bind(this),u=function(e){t(this,h),i=!0,e()}.bind(this),c=function(e){t(this,h),i=!0,this.resetForNext();var n="rewarded";this.adCounter[n]=this.adCounter[n]||0,this.adCounter[n]++,"viewed"===e.breakStatus?this._broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success"}):(this._broadcast("AD_ERROR",{message:e.breakStatus,status:"error",skipForward:!0}),"dismissed"!==e.breakStatus&&this._send_atom_event("sg.dbg.rw",e))}.bind(this),l=function(e){window.adsbygoogle.push(e)},setTimeout(function(){t(this,h),i||(wo("gd-adflow adsense.reward timeout happened!"),this.requestRunning=!1,this._broadcast("AD_ERROR",{message:"timeout",status:"error",skipForward:!0}),this._send_atom_event("sg.dbg.rw",{breakStatus:"timeout"}))}.bind(this),1e3),l({type:"reward",name:"reward-in-game",beforeAd:a,afterAd:s,adDismissed:o,adViewed:d,beforeReward:u,adBreakDone:c}),e.next=26;break;case 22:throw e.prev=22,e.t0=e.catch(1),this._onError(e.t0),e.t0;case 26:case"end":return e.stop()}}),e,this,[[1,22]])}))),function(e){return u.apply(this,arguments)})},{key:"_startAdsensePlacementPreroll",value:(d=e(r.mark((function e(n){var i,a,s=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.params,e.prev=1,!this.requestRunning){e.next=5;break}return this._broadcast("AD_IS_ALREADY_RUNNING",{status:"warning"}),e.abrupt("return");case 5:if(!void function(){if(t(this,s),xo.fictionalAdSenseError||n.params.shouldFail)return this._broadcast("AD_ERROR",{message:"fictional adsense preroll error",status:"error"}),!0}.bind(this)){e.next=8;break}return e.abrupt("return");case 8:this.requestRunning=!0,this._send_atom_event("sg.ad.pr.requested"),this.adPlacementEventReceived=!1,i=function(){t(this,s),this.adPlacementEventReceived=!0}.bind(this),a=function(e){t(this,s),this.adPlacementEventReceived=!0,this.resetForNext();var n="preroll";this.adCounter[n]=this.adCounter[n]||0,this.adCounter[n]++,"viewed"===e.breakStatus?(this._send_atom_event("sg.ad.pr.viewed"),this._broadcast("CONTENT_PAUSE_REQUESTED",{message:"",status:"success"}),this._broadcast("IMPRESSION",{message:"",status:"success"}),this._broadcast("COMPLETE",{message:"",status:"success"}),this._broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success"}),this._broadcast("CONTENT_RESUME_REQUESTED",{message:"",status:"success"})):(this._broadcast("AD_ERROR",{message:e.breakStatus,status:"error"}),this._send_atom_event("sg.dbg.pr",e))}.bind(this),this._startTimeoutForAdBreak({adType:"preroll"}),r={type:"preroll",beforeAd:i,adBreakDone:a},window.adsbygoogle.push(r),e.next=22;break;case 18:throw e.prev=18,e.t0=e.catch(1),this._onError(e.t0),e.t0;case 22:case"end":return e.stop()}var r}),e,this,[[1,18]])}))),function(e){return d.apply(this,arguments)})},{key:"_startAdsensePlacementStart",value:(o=e(r.mark((function e(n){var i,a,s,o=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.params,e.prev=1,!this.requestRunning){e.next=5;break}return this._broadcast("AD_IS_ALREADY_RUNNING",{status:"warning"}),e.abrupt("return");case 5:if(!void function(){if(t(this,o),xo.fictionalAdSenseError||n.params.shouldFail)return this._broadcast("AD_ERROR",{message:"fictional adsense preroll error 2",status:"error"}),!0}.bind(this)){e.next=8;break}return e.abrupt("return");case 8:this.requestRunning=!0,this._send_atom_event("sg.ad.pr.requested"),i=function(){t(this,o),this.adPlacementEventReceived=!0,this.fixOutOfBounds(),this._broadcast("CONTENT_PAUSE_REQUESTED",{message:"",status:"success"}),this._broadcast("IMPRESSION",{message:"",status:"success"})}.bind(this),a=function(){t(this,o),this.adPlacementEventReceived=!0,this._broadcast("CONTENT_RESUME_REQUESTED",{message:"",status:"success"})}.bind(this),this.adPlacementEventReceived=!1,s=function(e){t(this,o),this.adPlacementEventReceived=!0,this.resetForNext();var n="preroll";this.adCounter[n]=this.adCounter[n]||0,this.adCounter[n]++,"viewed"===e.breakStatus?(this._send_atom_event("sg.ad.pr.viewed"),this._broadcast("COMPLETE",{message:"",status:"success"}),this._broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success"})):(this._broadcast("AD_ERROR",{message:e.breakStatus,status:"error"}),this._send_atom_event("sg.dbg.pr",e))}.bind(this),this._startTimeoutForAdBreak({adType:"preroll"}),r={type:"start",name:"start-in-game",beforeAd:i,afterAd:a,adBreakDone:s},window.adsbygoogle.push(r),e.next=23;break;case 19:throw e.prev=19,e.t0=e.catch(1),this._onError(e.t0),e.t0;case 23:case"end":return e.stop()}var r}),e,this,[[1,19]])}))),function(e){return o.apply(this,arguments)})},{key:"_startTimeoutForAdBreak",value:function(e){var n,r,i,a,s,o,d=this;if(null===(n=this.gameData)||void 0===n||null===(r=n.ad_blcks)||void 0===r||null===(i=r.adsenseTimeout)||void 0===i?void 0:i.enabled){null==e||e.adType,null===(a=this.gameData)||void 0===a||null===(s=a.ad_blcks)||void 0===s||null===(o=s.adsenseTimeout)||void 0===o||o.timeout;var u=setTimeout(function(){t(this,d),this.adPlacementEventReceived||(this._broadcast("AD_ERROR",{message:"timeout-_startTimeoutForAdBreak",status:"error"}),this.adPlacementEventReceived=!1,this.requestRunning=!1),clearTimeout(u)}.bind(this),5e3)}}},{key:"_startTimeoutForOpus",value:function(){var e=this,n=setTimeout(function(){t(this,e),this.opusEventReceived||(this._broadcast("AD_ERROR",{message:"opus-sdk-timeout",status:"error",reason:"forced-sdk-timeout"}),this.opusEventReceived=!1,this.requestRunning=!1),clearTimeout(n)}.bind(this),8e3)}},{key:"_startAdsensePlacementNext",value:(s=e(r.mark((function e(n){var i,a,s,o=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.params,e.prev=1,!this.requestRunning){e.next=5;break}return this._broadcast("AD_IS_ALREADY_RUNNING",{status:"warning"}),e.abrupt("return");case 5:if(!void function(){if(t(this,o),xo.fictionalAdSenseError||n.params.shouldFail)return this._broadcast("AD_ERROR",{message:"fictional adsense midroll error",status:"error"}),!0}.bind(this)){e.next=8;break}return e.abrupt("return");case 8:this.requestRunning=!0,this._send_atom_event("sg.ad.mr.requested"),i=function(){t(this,o),this.adPlacementEventReceived=!0,this.fixOutOfBounds(),this._broadcast("CONTENT_PAUSE_REQUESTED",{message:"",status:"success"}),this._broadcast("IMPRESSION",{message:"",status:"success"})}.bind(this),a=function(){t(this,o),this.adPlacementEventReceived=!0,this._broadcast("CONTENT_RESUME_REQUESTED",{message:"",status:"success"})}.bind(this),this.adPlacementEventReceived=!1,s=function(e){t(this,o),this.adPlacementEventReceived=!0,this.resetForNext();var n="midroll";this.adCounter[n]=this.adCounter[n]||0,this.adCounter[n]++,"viewed"===e.breakStatus?(this._send_atom_event("sg.ad.mr.viewed"),this._broadcast("COMPLETE",{message:"",status:"success"}),this._broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success"})):(this._broadcast("AD_ERROR",{message:e.breakStatus,status:"error"}),this._send_atom_event("sg.dbg.mr",e))}.bind(this),this._startTimeoutForAdBreak({adType:"midroll"}),r={type:"next",name:"next-in-game",beforeAd:i,afterAd:a,adBreakDone:s},window.adsbygoogle.push(r),e.next=23;break;case 19:throw e.prev=19,e.t0=e.catch(1),this._onError(e.t0),e.t0;case 23:case"end":return e.stop()}var r}),e,this,[[1,19]])}))),function(e){return s.apply(this,arguments)})},{key:"_send",value:function(e,t){try{var n=this.msgrt,r=n._layout,i=n._ua,a={tp:e,ct:0,vrs:this.PackageJSON.version,url:this.parentURL,rfr:document.referrer,tdmn:this.topDomain||this.parentDomain,dpth:0,args:t,ua:{brnm:i.browser.name,brvs:i.browser.version,osnm:i.os.name,osvs:i.os.version,dvmd:i.device.model,w:r.w,h:r.h}};return fetch("https://tag.atom.gamedistribution.com/v1/dmp?ar=".concat(encodeURIComponent(C.encode(JSON.stringify(a)))))}catch(e){}}},{key:"_send_atom_event",value:function(e,t){var n={gid:this.gameData.slug,md5:this.gameData.gameId,pid:0,pnm:this.gameData.pname,ctry:this.gameData.ctry,lcl:"en",hle:1,ads:1,args:t,href:window.location.href},r=(new Cy).get();return n=gR(gR({},n),r),n=t?gR(gR({},n),t):n,this._send(e,n)}},{key:"_isAfgPositionNext",value:function(e){return void 0!==e.adTimestamp}},{key:"_isAfgPositionStart",value:function(e){if(void 0!==e.adTimestamp)return!1;var t="preroll";return this.adCounter[t]=this.adCounter[t]||0,0===this.adCounter[t]}},{key:"attachAfgPosition",value:function(e){var t=e.params.position;switch(t){case"preroll":case"start":case"pause":case"next":case"browse":case"reward":return}var n=e.adType;if(n===v.Rewarded)t="reward";else if(n===v.Interstitial){var r,i;if(this._isAfgPositionStart(e))t=null===(r=this.gameData.pAds)||void 0===r||!r.enabled||null!==(i=this.gameData.loader)&&void 0!==i&&i.enabled?"start":"next";else this._isAfgPositionNext(e)&&(t="next")}t||(t="preroll"),e.params.position=t}},{key:"_broadcast",value:function(e,n){var r=this,i=!1;["AD_ERROR"].some(function(n){return t(this,r),n===e}.bind(this))&&(i=!this.adContext.isLastAdapter||this.adContext.extraPromoRunOnFail);var a=this.getCurrentAdPosition(this.adContext.adType);this.eventBus.broadcast(e,gR(gR({},n),{},{skipForward:i,adPosition:a}))}},{key:"_findAdPosition",value:function(){var e;return this.getCurrentAdPosition(null===(e=this.adContext)||void 0===e?void 0:e.adType)}},{key:"mute",value:(a=e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.adContext&&(this.adContext.muteRequested=!0),this.adsManager&&this.adsManager.setVolume(0);case 2:case"end":return e.stop()}}),e,this)}))),function(){return a.apply(this,arguments)})},{key:"terminate",value:(i=e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.cancel();case 1:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})}]),n}(),yR=S((function t(n){var i=this;R(this,t),T(this,"load",e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,eA(i.moduleName);case 2:i.module=e.sent;case 3:case"end":return e.stop()}}),e)})))),T(this,"promo",e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i.module){e.next=3;break}return e.next=3,i.load();case 3:return e.abrupt("return",i.module[i.moduleDefault]);case 4:case"end":return e.stop()}}),e)}))));var a=n.package||"gd-sdk-stone-dynamic",s=n.package_version||"1.1.1",o=n.template||"puzzle",d=n.dependencies||[];this.moduleName="GDPromoByOrbit",this.moduleDefault=o.charAt(0).toUpperCase()+o.slice(1),this.moduleConfig={source:"https://pm.azerioncircle.com/@bygd/".concat(a,"/").concat(s,"/dist/").concat(o.toLowerCase(),"/iife/index.js"),dependencies:d},Zg(this.moduleName,this.moduleConfig)})),wR=S((function t(n){var i=this;R(this,t),T(this,"load",e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,eA(i.moduleName);case 2:i.module=e.sent;case 3:case"end":return e.stop()}}),e)})))),T(this,"splash",e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i.module){e.next=3;break}return e.next=3,i.load();case 3:return e.abrupt("return",i.module[i.moduleDefault]);case 4:case"end":return e.stop()}}),e)}))));var a=n.package||"gd-sdk-air-dynamic",s=n.package_version||"1.2.0",o=n.template||"pluto",d=n.dependencies||[];this.moduleName=n.module_name||"GDSplashDynamic",this.moduleDefault=n.module_instance||o.charAt(0).toUpperCase()+o.slice(1),this.moduleConfig={source:"https://pm.azerioncircle.com/@bygd/".concat(a,"/").concat(s,"/dist/").concat(o.toLowerCase(),"/iife/index.js"),dependencies:d},Zg(this.moduleName,this.moduleConfig)})),kR=function(e,t){console.log(e,t)},xR={},ER={},DR=null;function SR(){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 xR.version=r,xR.frame=e,xR.function=n,xR.version}function RR(e){var n=this;return DR||(DR=new Promise(function(r){function i(t,n){if(kR("Received a response from CMP",t),n){var i,a;if(!1!==t.gdprApplies)return"tcloaded"===t.eventStatus||"useractioncomplete"===t.eventStatus?(("boolean"!=typeof(a=(i=t)&&"boolean"==typeof i.gdprApplies?i.gdprApplies:e.defaultGdprScope)||!0===a&&"string"!=typeof i.tcString)&&r({result:"cmpUnexpectedResponse",cmp:xR,consentData:i}),void r({result:"ok",consentData:t})):void 0;r({result:"ok",consentData:t})}else r({result:"cmpCallFailed"})}t(this,n),SR(),xR.frame?2===xR.version?(kR("TCF v2 CMP found. Fetching the consent."),xR.function?(kR("CMP API is directly accessible, calling it now..."),xR.function("addEventListener",xR.version,i)):(kR("CMP API is outside the current iframe, calling it now..."),function(e,n,r){var i=this,a="__tcfapi";function s(e){var t="".concat(a,"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!==ER[r.callId]&&ER[r.callId](r.returnValue,r.success)}}window[a]=function(e,r,s,o){t(this,i);var d=Math.random()+"",u="".concat(a,"Call"),c=T({},u,{command:e,parameter:o,callId:d,version:r});ER[d]=s,n.postMessage(c,"*")}.bind(this),window.addEventListener("message",s,!1),window[a](e,xR.version,r)}("addEventListener",xR.frame,i))):r({result:"cmpVersionNotV2",cmp:xR}):r({result:"cmpNotFound"})}.bind(this)),DR)}var TR=new(function(){function t(){R(this,t),this.productName="Game Distribution"}var n;return S(t,[{key:"checkIfExcluded",value:function(e){try{var t,n;return!(null===(t=e.diagnostic)||void 0===t||null===(n=t.gameDock)||void 0===n||!n.excluded)}catch(e){return console.log("Error on checkIfExclude check",e),!1}}},{key:"track",value:(n=e(r.mark((function e(t,n){var i,a,s,o,d,u,c;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.checkIfExcluded(n)){e.next=3;break}return e.abrupt("return");case 3:if(s=null==t||null===(i=t.visitor)||void 0===i||null===(a=i.visitorData)||void 0===a?void 0:a.visitorId){e.next=6;break}return e.abrupt("return");case 6:return o=encodeURIComponent(this.productName),d=encodeURIComponent(s),e.prev=8,u="https://tracker-v4.gamedock.io/v1/events-tracker/track/product/".concat(o,"/user_id/").concat(d),e.next=12,fetch(u,{method:"POST"});case 12:e.sent,e.next=28;break;case 15:return e.prev=15,e.t0=e.catch(8),console.log("GAME_DOCK. fail v4",e.t0),e.prev=18,c="https://tracker.gamedock.io/v1/events-tracker/track/product/".concat(o,"/user_id/").concat(d),e.next=22,fetch(c,{method:"POST"});case 22:e.sent,e.next=28;break;case 25:e.prev=25,e.t1=e.catch(18),console.log("GAME_DOCK. fail v6",e.t1);case 28:case"end":return e.stop()}}),e,this,[[8,15],[18,25]])}))),function(e,t){return n.apply(this,arguments)})}]),t}());function IR(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 CR(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 CR(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,s=!0,o=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){o=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(o)throw a}}}}function CR(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}var OR=function(e){var n=this,r=e.src,i=e.attributes,a=e.target,s=e.isAsync;return new Promise(function(e,o){var d=this;t(this,n);try{var u=document.createElement("script");if(u.async=null==s||s,u.type="text/javascript",u.onload=function(){t(this,d),e()}.bind(this),u.onerror=function(){t(this,d);var e="Error on script load, Error: ".concat(r);console.log(e),o(e)}.bind(this),u.src=r,i){var c,l=IR(i);try{for(l.s();!(c=l.n()).done;){var h=c.value,p=h.key,f=h.value;u.setAttribute(p,f)}}catch(e){l.e(e)}finally{l.f()}}a||(a=document.head),a.appendChild(u)}catch(e){var m="Error on script load catch, Error: ".concat(r);console.log(m,e),o(m)}}.bind(this))},PR="ffd4774b-99ae-4464-8f40-3afa12b4692e",LR=function(){var t=e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,OR({src:"https://cdn.cookielaw.org/consent/tcf.stub.js",attributes:[{key:"id",value:"gd-cookie-pro-tcf-stub"},{key:"charset",value:"UTF-8"}],isAsync:!1});case 3:return e.next=5,OR({src:"https://cdn.cookielaw.org/consent/".concat(PR,"/OtAutoBlock.js"),attributes:[{key:"id",value:"gd-cookie-pro-autoblock"}],isAsync:!1});case 5:return e.next=7,OR({src:"https://cdn.cookielaw.org/scripttemplates/otSDKStub.js",attributes:[{key:"id",value:"gd-cookie-pro-stub"},{key:"charset",value:"UTF-8"},{key:"data-domain-script",value:PR}],isAsync:!1});case 7:n=void 0,r=void 0,i=void 0,n=(t={inlineScript:"function OptanonWrapper() { }"}).inlineScript,r=t.target,(i=document.createElement("script")).text=n,r||(r=document.head),r.appendChild(i),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(0),console.log("GD: CMP error on load",e.t0);case 13:case"end":return e.stop()}var t,n,r,i}),e,null,[[0,10]])})));return function(){return t.apply(this,arguments)}}(),BR=new M,UR={"https://games.softgames.com":{"splash-hidden":"splash-hidden"},"https://sg.gamedistribution.com":{"splash-hidden":"splash-hidden"},"https://html5.gamedistribution.com":{key:"value"}},MR=!1,FR="CONTENT_PAUSE_REQUESTED",jR="CONTENT_RESUME_REQUESTED",GR="SDK_GAME_START",NR=function(e){if("gd-sdk-on-event"===(null==e?void 0:e.type)){var t,n,r,i;if(!("midroll"===(null==e||null===(t=e.event)||void 0===t?void 0:t.adPosition)))return;var a=(null===(n=e.event)||void 0===n?void 0:n.name)===jR||(null===(r=e.event)||void 0===r?void 0:r.name)===GR;if((null===(i=e.event)||void 0===i?void 0:i.name)===FR&&(MR=!0),a&&MR){MR=!1;window.parent.postMessage({type:"sg-game-event",eventName:"levelFinish",data:{score:100}},"*")}}};function qR(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}window.addEventListener("message",(function(e){var n=this,r=e.data,i=e.origin,a=r.type;if(Object.keys(UR).some(function(e){return t(this,n),e===i}.bind(this))&&(null==r||!r.__tcfapiCall)){var s=!r.type||!r.type.startsWith("gd-sdk")&&!("parent-data-response"===r.type)||"sg-game-event"===r.type;NR(r);var o=function(){t(this,n);try{var r,i;return null==e||null===(r=e.source)||void 0===r||null===(i=r.location)||void 0===i?void 0:i.href}catch(e){}}.bind(this);if(window.parent&&s){if("https://html5.gamedistribution.com"===i){var d=o();if(!d)return;var u=d&&["9555f04e1900482aaaef710cd2f8c440"].some(function(e){return t(this,n),d.indexOf(e)>0}.bind(this)),c=["sg-game-event"].some(function(e){return t(this,n),e===(null==r?void 0:r.type)}.bind(this));if(!u&&!c)return}var l=r.eventName,h=r.data;window.mpHelper&&("levelStart"!==l&&"levelFinish"!==l||window.mpHelper.sendStat("level",h.level),"levelFinish"===l&&window.mpHelper.sendStat("score",h.score)),window.parent.postMessage(r,"*")}if(a){var p=UR[i][a];p&&BR.emit(p,r)}}}),!1),function(){for(var e=new _,t=0,n=[FR,jR,GR];t<n.length;t++){var r=n[t];e.subscribe(r,(function(e){NR({type:"gd-sdk-on-event",event:e})}))}}();var HR="__msgr",VR=Q(),QR=function(e){try{var t=WR(e,e.event),n=JR(window);n&&n!==window.top&&n.postMessage(t,"https://html5.gamedistribution.com")}catch(e){console.error("Error sending event message:",e)}},zR=function(e,t){var n=document.createElement("iframe");return n.src=e,n.style.display="none",n.name=t,n},WR=function(e,t){var n;return{gameId:e.gameId||e.game.gameId,target:(null===(n=e.evnts)||void 0===n?void 0:n.domain)||e.game.evnts.domain,type:"gd-system",token:VR,event_name:t,timestamp:Date.now()}},KR=function(e){var n=this;setInterval(function(){t(this,n);var r=WR(e,"Heartbeat");XR(r)}.bind(this),1e3*e.evnts.heartbeatDuration)},YR=function(e){try{var t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qR(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qR(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e.data);if(!t.event_name)return;t.token=VR,XR(t)}catch(e){console.error("GD Messager Error:",e.message)}},JR=function e(t){try{var n,r,i=null==t?void 0:t.parent;return"game"===(null==i||null===(n=i.document)||void 0===n||null===(r=n.activeElement)||void 0===r?void 0:r.id)?i:e(i)}catch(e){return t}},XR=function(e){try{window[HR]&&window[HR].postMessage(e,"*")}catch(e){console.log("GD Messager initialization, please wait....")}},ZR=function(){function n(e){R(this,n),this.adContainer=document.getElementById("gdsdk__advertisement"),this.adContainerInner=document.getElementById("gdsdk__advertisement_slot"),this._adRequest=e.adRequest,this._gameData=e._gameData,this._msgrt=e._msgrt,this._adInstance=e._adInstance,this._eventBus=e._eventBus,this.blockedAdsMap=e._blockedAdsMap,this._parentURL=e._parentURL,this._parentDomain=e._parentDomain,this._onResumeGame=e._onResumeGame.bind(e),this._onPauseGame=e._onPauseGame.bind(e),this._onRewardedWatchComplete=e._onRewardedWatchComplete.bind(e),this._onAdError=e._onAdError.bind(e),this._promoShowSuccess=!1}var i,a,s;return S(n,[{key:"run",value:function(n){var i=n.duration,a=this;return new Promise(function(){var n=e(r.mark((function e(n,s){var o,d=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,a.add();case 3:o=a.show(),setTimeout(function(){t(this,d);try{a.hide(),n({success:o})}catch(e){s(e)}}.bind(this),1e3*i),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),s(e.t0);case 10:case"end":return e.stop()}}),e,this,[[0,7]])})));return function(e,t){return n.apply(this,arguments)}}())}},{key:"show",value:function(){return this.promo_data.game?(this.adContainer.style.visibility="visible",this.promo.style.display="block",this._onPauseGame("Pause the game for the promo","success"),this._promoShowSuccess=!0):this._onAdError("Promo not found"),this._promoShowSuccess}},{key:"hide",value:function(){var e;(this.promo.remove(),this.adContainer.style.visibility="hidden",this._promoShowSuccess)&&("reward"===(null===(e=this._adRequest.params)||void 0===e?void 0:e.position)&&this._onRewardedWatchComplete());this._onResumeGame("Advertisement(s) are done. Start / resume the game.","success")}},{key:"add",value:(s=e(r.mark((function t(){var n,i,a,s=this;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.fetch_promo();case 3:this.promo_data=t.sent,n=document.createElement("div"),this.promo=n,i=this.promo_data,this.promo.addEventListener("click",function(){var t=e(r.mark((function e(t){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.preventDefault(),console.log(i),s.track_click(i.click_tracking),window.open(i.click_through,"_blank");case 4:case"end":return e.stop()}}),e)})));return function(e){return t.apply(this,arguments)}}()),(a=document.createElement("iframe")).src=this.promo_data.renderer_url,a.setAttribute("frameborder",0),this.addStyles(),this.promo.classList.add("gd__promo"),a.classList.add("gd__promo__iframe"),this.promo.appendChild(a),this.adContainer.appendChild(this.promo),t.next=21;break;case 18:t.prev=18,t.t0=t.catch(0),console.log(t.t0);case 21:case"end":return t.stop()}}),t,this,[[0,18]])}))),function(){return s.apply(this,arguments)})},{key:"addStyles",value:function(){var e="\n .gd__promo{\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background-color: transparent;\n z-index: 1;\n cursor: pointer;\n }\n .gd__promo__iframe{\n position: relative;\n z-index: -1;\n width:".concat(this.adContainerInner.style.width,";\n height:").concat(this.adContainerInner.style.height,";\n }\n "),t=document.body||document.getElementsByTagName("body")[0];this.addStylesheet("gd__promo__style",t,e)}},{key:"addStylesheet",value:function(e,t,n){if(!document.getElementById(e)){var r=document.createElement("style");r.id=e,r.styleSheet?r.styleSheet.cssText=n:r.appendChild(document.createTextNode(n)),t.appendChild(r)}}},{key:"fetch_promo",value:(a=e(r.mark((function e(){var n,i=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch("https://tag.atom.gamedistribution.com/v1/rainbow/pick?id=".concat(this._parentDomain,"&aid=").concat(this._gameData.gameId)).then(function(e){return t(this,i),e.json()}.bind(this));case 2:return n=e.sent,e.abrupt("return",n);case 4:case"end":return e.stop()}}),e,this)}))),function(){return a.apply(this,arguments)})},{key:"track_click",value:(i=e(r.mark((function e(t){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(t);case 2:case"end":return e.stop()}}),e)}))),function(e){return i.apply(this,arguments)})}]),n}();function $R(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 eT(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$R(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$R(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var tT,nT,rT=function(){var t=e(r.mark((function e(){var t;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return"https://cdnjs.cloudflare.com/ajax/libs/socket.io/4.3.1/socket.io.js",t=["https://cdnjs.cloudflare.com/ajax/libs/socket.io/4.3.1/socket.io.js"],e.next=4,m(t[0],"soecket.io.js",{alternates:t});case 4:case"end":return e.stop()}}),e)})));return function(){return t.apply(this,arguments)}}(),iT=[],aT=0,sT=!1,oT=function(){var n=e(r.mark((function n(i){var a,s,o,d,u,c,l,h,p=this;return r.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(a=i.args,s=i.onError,n.prev=1,!window.isForwarderFrame){n.next=5;break}return n.abrupt("return");case 5:return n.next=7,nk();case 7:if(!(o=n.sent)){n.next=18;break}return n.next=11,o.isLoader();case 11:if(!(d=n.sent)&&(d||o.hasRouter())){n.next=16;break}o.register({method:"sendSocketEvent",handler:function(e){t(this,p),cT(e.topic,e.args)}.bind(this)}),n.next=18;break;case 16:return o.registerProxy({alias:"sendSocketEvent",method:"sendSocketEvent"}),n.abrupt("return");case 18:if(u=new I(window.location.href),!((c=!["html5.gamedistribution.com","revision.gamedistribution.com"].some(function(e){return t(this,p),e.toLowerCase()===u.host.toLowerCase()}.bind(this)))&&o&&o.hasRouter())){n.next=24;break}return n.abrupt("return");case 24:return c&&o&&o.hasRouter(),n.next=27,rT();case 27:tT=Q(),l={json:JSON.stringify(a)},h=["wss://ws.gamedistribution.com"],a.isHwp&&h.push("wss://ws-acc-hwp.gamedistribution.com"),iT=h.map(function(n){var i=this;t(this,p);var s=io(n,{query:l,upgrade:!1,transports:["websocket"],reconnectionDelay:6e4,autoConnect:!1});return s.on("connect",function(){t(this,i)}.bind(this)),s.on("after-connect",function(){var t=e(r.mark((function e(t){var n,i,o,d,u,c,l;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return nT=nT||(null==t?void 0:t.serverDate),n=a.gameId,i=a.failed,e.next=4,fw({gameId:n,serverDate:nT});case 4:o=e.sent,d=o.visit,u=o.mode,c=o.errors,a.visit=eT(eT({},d),{},{stm:u,errors:c}),i&&(a.gameId=n?"failed:wrong":"failed:empty"),l={json:JSON.stringify(a)},s.emit("client-info",{clientId:tT,counter:aT++,serverDate:nT,query:l}),sT=!0;case 13:case"end":return e.stop()}}),e)})));return function(e){return t.apply(this,arguments)}}()),s.on("disconnect",function(){t(this,i)}.bind(this)),s.connect(),s}.bind(this)),n.next=37;break;case 34:n.prev=34,n.t0=n.catch(1),s&&s(n.t0);case 37:case"end":return n.stop()}}),n,this,[[1,34]])})));return function(e){return n.apply(this,arguments)}}(),dT=!1,uT=[];function cT(e,t){return lT.apply(this,arguments)}function lT(){return lT=e(r.mark((function e(n,i){var a,s,o,d=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,nk();case 2:if(!(a=e.sent)){e.next=11;break}return e.next=6,a.isLoader();case 6:if(e.sent||!a.hasRouter()){e.next=11;break}return e.next=10,a.sendSocketEvent({topic:n,args:i});case 10:return e.abrupt("return");case 11:if("play"!==n){e.next=15;break}if(!dT){e.next=14;break}return e.abrupt("return");case 14:dT=!0;case 15:s=function(e,n){var r=this;t(this,d);try{var i={json:JSON.stringify(n||{})};iT.forEach(function(n){t(this,r),n.emit("socket-event",{topic:e,clientId:tT,counter:aT,serverDate:nT,query:i})}.bind(this))}catch(e){ko("game-session: Error on sending socket-event",e.message)}}.bind(this),o=function(){t(this,d),s(n,i)}.bind(this),uT.push(o);case 19:case"end":return e.stop()}}),e,this)}))),lT.apply(this,arguments)}function hT(e){var n=this,r={preroll:["preroll","start"],midroll:["next"],rewarded:["reward"]},i=Object.keys(r).find(function(i){var a=this;return t(this,n),r[i].some(function(n){return t(this,a),n===e.params.position}.bind(this))}.bind(this));return i||"midroll"}function pT(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 fT(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 fT(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,s=!0,o=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){o=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(o)throw a}}}}function fT(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 mT(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}setInterval((function(){if(0!==uT.length&&iT.length>0&&sT){for(var e=function(){var e=this,i=r[n];i(),uT=uT.filter(function(n){return t(this,e),n!==i}.bind(this))},n=0,r=G(uT);n<r.length;n++)e();yo("game-session: commands length",uT.length)}}),100);var vT=3,gT=1,AT=5,bT={lastImpressionDate:null,lastInterstitialImpressionDate:null,firstInterstitialImpressionDate:null,imps:0};var _T=new function(){var e={};return{count:function(t){e[t]=e[t]||0,e[t]++},get:function(t){return e[t]=e[t]||0,e[t]},getAll:function(){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?mT(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mT(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e)}}};function yT(){return wT.apply(this,arguments)}function wT(){return(wT=e(r.mark((function e(){var n,i,a,s,o,d,u,c,l,h,p;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i={},e.next=3,Lw();case 3:if(a=e.sent,s=a.compensation||{enabled:!1},o=null==a||null===(n=a.adTimer)||void 0===n?void 0:n.enabled,i.ruleEnabled=(null==s?void 0:s.enabled)&&o,!(void 0===(null==s?void 0:s.exctg)||(null==s?void 0:s.exctg))){e.next=29;break}d=["co-op","multiplayer","IAPs"],u=(null==a?void 0:a.tags)||[],c=!1,l=pT(u),e.prev=13,p=r.mark((function e(){var n,i=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=h.value,d.some(function(e){return t(this,i),e===n.title}.bind(this))&&(c=!0);case 2:case"end":return e.stop()}}),e,this)})),l.s();case 16:if((h=l.n()).done){e.next=20;break}return e.delegateYield(p(),"t0",18);case 18:e.next=16;break;case 20:e.next=25;break;case 22:e.prev=22,e.t1=e.catch(13),l.e(e.t1);case 25:return e.prev=25,l.f(),e.finish(25);case 28:i.disabledByTag=c;case 29:return i.isLowScoreGame=kT(a),i.enabled=i.ruleEnabled&&!i.disabledByTag&&i.isLowScoreGame,a.hasActiveCompensations=i.enabled,e.abrupt("return",i);case 33:case"end":return e.stop()}}),e,null,[[13,22,25,28]])})))).apply(this,arguments)}function kT(e){var t=!1,n=e.compensation||{enabled:!1},r=null==e?void 0:e.adsc;if(1===(null==r?void 0:r.s)&&null!=r&&r.t){var i=null==r?void 0:r.t,a=(null==n?void 0:n.esc)||gT,s=(null==n?void 0:n.ascl)||AT,o=i||{},d=o.adsc,u=o.reqsc,c=o.pdur,l=o.rspdur;o.aspdur,t=(l||u/(c/vT))<=a&&d<s}return t}var xT=!1;function ET(){return DT.apply(this,arguments)}function DT(){return(DT=e(r.mark((function e(){var t;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!xT){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,yT();case 4:(t=e.sent).enabled,t.override,t.giftEnabled,t.midrollPlusEnabled,xT=!0;case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ST(e){var t=e.rateType,n=e.gameData,r=!1;if(n.hasActiveCompensations){var i=n.compensation,a="gift"===t?null==i?void 0:i.gftr:null==i?void 0:i.mpr;a=void 0===a?1:a,r=Math.random()<=a}else r=!0;return r}function RT(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 TT(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 TT(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,s=!0,o=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){o=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(o)throw a}}}}function TT(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}var IT=!1,CT=3,OT=5,PT=1,LT=60,BT=10;function UT(){return MT.apply(this,arguments)}function MT(){return(MT=e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return bT.imps++,bT.lastImpressionDate=new Date,bT.lastInterstitialImpressionDate=new Date,bT.firstInterstitialImpressionDate||(bT.firstInterstitialImpressionDate=bT.lastInterstitialImpressionDate),e.abrupt("return",!0);case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function FT(e){return jT.apply(this,arguments)}function jT(){return jT=e(r.mark((function n(i){var a,s,o,d,u,c,l,h,p,f,m,v,g,A,b,_,y,w,k,x,E,D,S,R,T,I,C,O,P,L,B,U,M,F,j,G,N,q,H,V,Q,z,W,K,Y,J,X,Z,$,ee,te,ne,re,ie,ae,se,oe,de,ue,ce,le,he,pe,fe,me,ve,ge=this;return r.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(E=i.gameData,D=i.executeCompensation,S=function(){var t=e(r.mark((function e(t){var n,i,a;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,n=(null==t?void 0:t.whenAvailable)||!1,!D){e.next=8;break}return e.next=5,D({whenAvailable:n});case 5:e.t0=e.sent,e.next=11;break;case 8:return e.next=10,UT();case 10:e.t0=e.sent;case 11:return i=e.t0,a=i.args,e.abrupt("return",null==a?void 0:a.success);case 16:return e.prev=16,e.t1=e.catch(0),e.next=20,UT();case 20:case"end":return e.stop()}}),e,null,[[0,16]])})));return function(e){return t.apply(this,arguments)}}(),R=!IT,!IT){n.next=5;break}return n.abrupt("return");case 5:if(IT=!0,T=E.adsc){n.next=10;break}return n.abrupt("return");case 10:if(I=T.s,C=T.t,1===I){n.next=13;break}return n.abrupt("return");case 13:if(O=E.compensation||{enabled:!1},P=null==O?void 0:O.enabled,L=null==E||null===(a=E.adTimer)||void 0===a?void 0:a.enabled,B=null==E||null===(s=E.adTimer)||void 0===s?void 0:s.tl,(U=(null==E||null===(o=E.pAds)||void 0===o||null===(d=o.vmap)||void 0===d?void 0:d.enabled)&&(null==E||null===(u=E.pAds)||void 0===u||null===(c=u.vmap)||void 0===c||null===(l=c.adtr)||void 0===l?void 0:l.disabled)||!1)&&yo("[compensation] disabled by preroll vmap",{pAds:null==E?void 0:E.pAds}),P&&L&&!U){n.next=23;break}return n.abrupt("return");case 23:if(!((M=null!=E&&null!==(h=E.pAds)&&void 0!==h&&null!==(p=h.vmap)&&void 0!==p&&p.enabled&&null!=E&&null!==(f=E.pAds)&&void 0!==f&&null!==(m=f.vmap)&&void 0!==m&&null!==(v=m.adtr)&&void 0!==v&&v.delay?null==E||null===(g=E.pAds)||void 0===g||null===(A=g.vmap)||void 0===A||null===(b=A.adtr)||void 0===b?void 0:b.delay:0)>0)){n.next=30;break}return n.next=29,new Promise(function(e){var n=this;t(this,ge),setTimeout(function(){t(this,n),e()}.bind(this),1e3*M)}.bind(this));case 29:case 30:if(!(void 0===(null==O?void 0:O.exctg)||(null==O?void 0:O.exctg))){n.next=54;break}F=["co-op","multiplayer","IAPs"],j=(null==E?void 0:E.tags)||[],G=!1,N=RT(j),n.prev=36,H=r.mark((function e(){var n,i=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=q.value,F.some(function(e){return t(this,i),e===n.title}.bind(this))&&(G=!0);case 2:case"end":return e.stop()}}),e,this)})),N.s();case 39:if((q=N.n()).done){n.next=43;break}return n.delegateYield(H(),"t0",41);case 41:n.next=39;break;case 43:n.next=48;break;case 45:n.prev=45,n.t1=n.catch(36),N.e(n.t1);case 48:return n.prev=48,N.f(),n.finish(48);case 51:if(!G){n.next=54;break}return n.abrupt("return");case 54:if(V=(null==E||null===(_=E.adTimer)||void 0===_?void 0:_.resetOnRewarded)||!1,Q=(null==E||null===(y=E.adTimer)||void 0===y?void 0:y.delayAfterRewarded)||0,z=(null==O?void 0:O.esc)||PT,W=void 0===(null==O?void 0:O.depgft)||(null==O?void 0:O.depgft),K=null!=O&&O.depgftr?null==O?void 0:O.depgftr:1,Y=(null==O?void 0:O.onst)||!1,J=(null==O?void 0:O.sl)||3,X=B||(null==O?void 0:O.tl)||180,Z=(null==E||null===(w=E.gft)||void 0===w?void 0:w.midroll.enabled)||!1,$=(null==E||null===(k=E.midroll_plus)||void 0===k?void 0:k.enabled)||!1,(!Z||!$)&&(X/=K),ee=void 0===(null==O?void 0:O.tc)||(null==O?void 0:O.tc),te=(null==O?void 0:O.ascl)||OT,!W){n.next=76;break}if(ie=(null==E||null===(ne=E.gft)||void 0===ne?void 0:ne.midroll.enabled)||!1,ae=(null==E||null===(re=E.midroll_plus)||void 0===re?void 0:re.enabled)||!1,ie&&ae){n.next=76;break}return n.abrupt("return");case 76:if(oe=(se=C||{}).adsc,de=se.reqsc,ue=se.pdur,ce=se.rspdur,se.aspdur,(ce||de/(ue/CT))<=z&&oe<te){n.next=83;break}return n.abrupt("return");case 83:if(le=Math.ceil(ue/CT),!Y||!R){n.next=90;break}return n.next=90,S({whenAvailable:!0});case 90:return he=0,pe=1,fe=function(){t(this,ge),he=0,pe=1}.bind(this),null===(x=E.sdkfw)||void 0===x||x.enabled,n.next=96,nk();case 96:if(me=n.sent,n.t2=me,!n.t2){n.next=102;break}return n.next=101,me.isLoader();case 101:n.t2=n.sent;case 102:n.t2,ve=setInterval(e(r.mark((function e(){var n,i,a,s,o,d,u=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(ee&&bT.imps>=le)){e.next=4;break}return clearInterval(ve),e.abrupt("return");case 4:if(n=new Date,i=V?bT.lastImpressionDate:bT.lastInterstitialImpressionDate,a=i?GT(i,n):X+1,!((s=X-a)>0)){e.next=21;break}if(!(s<=LT-BT)){e.next=18;break}return e.next=16,new Promise(function(e){var n=this;t(this,u),setTimeout(function(){t(this,n),e()}.bind(this),1e3*s)}.bind(this));case 16:e.next=21;break;case 18:return fe(),e.abrupt("return");case 21:if(++he%pe==0){e.next=25;break}return e.abrupt("return");case 25:if(V){e.next=35;break}if(o=bT.lastImpressionDate?GT(bT.lastImpressionDate,new Date):X+1,!((d=Q-o)>0)){e.next=32;break}return e.next=32,new Promise(function(e){var n=this;t(this,u),setTimeout(function(){t(this,n),e()}.bind(this),1e3*d)}.bind(this));case 32:e.next=36;break;case 35:case 36:return e.next=38,S({});case 38:e.sent?fe():(he=0,pe=pe+1>J?J:pe+1);case 40:case"end":return e.stop()}}),e,this)}))),1e3*LT);case 105:case"end":return n.stop()}}),n,this,[[36,45,48,51]])}))),jT.apply(this,arguments)}function GT(e,t){var n=e.getTime();return(t.getTime()-n)/1e3}function NT(e){return qT.apply(this,arguments)}function qT(){return(qT=e(r.mark((function e(t){var n,i,a,s,o,d,u,c,l,h,p;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=t.gameId,a=t.adTypeFound,s=t.ad_skip_rule,o=_T.get(a),(d=null==s?void 0:s[a])&&d.enabled){e.next=7;break}return e.abrupt("return",!1);case 7:if((u=(null==d?void 0:d.skip_sessions)||0)&&0!==u){e.next=11;break}return e.abrupt("return",!1);case 11:if((c=(null==d?void 0:d.skips)||0)&&0!==c){e.next=15;break}return e.abrupt("return",!1);case 15:return e.next=17,hw({gameId:i});case 17:if((l=e.sent)&&!((null===(n=l.errors)||void 0===n?void 0:n.length)>0)){e.next=21;break}return e.abrupt("return",!1);case 21:return l.fv,l.lv,h=l.vc,p=h<=u&&("preroll"===a||o<=c),e.abrupt("return",p);case 25:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function HT(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 VT(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?HT(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):HT(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function QT(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 zT(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 zT(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,s=!0,o=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){o=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(o)throw a}}}}function zT(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}var WT,KT=function(){function n(e){var r=this;R(this,n),this._gameData=e._gameData,this._msgrt=e.msgrt,this._adInstance=e.adInstance,this._eventBus=e.eventBus,this.blockedAdsMap=e.blockedAdsMap,this._parentURL=e._parentURL,this._parentDomain=e._parentDomain,this._onResumeGame=e.onResumeGame.bind(e),this._onPauseGame=e.onPauseGame.bind(e),this._onRewardedWatchComplete=e.onRewardedWatchComplete.bind(e),this._onAdError=e.onAdError.bind(e),this._setAdRequestTimer=e._setAdRequestTimer.bind(e),this._giveGift=e._giveGift.bind(e),this._executeMidrollPlus=e._executeMidrollPlus.bind(e),this.executeCompensation=e.executeCompensation.bind(e),this._runAutoResume=e._runAutoResume.bind(e),this.send_atom_event=e.send_atom_event.bind(e),this.get_session_id=e.get_session_id.bind(e),this.get_ad_system_init_result=e.get_ad_system_init_result.bind(e),this.eventBus=new _,this.isOpusReady=function(){return t(this,r),e.isOpusReady}.bind(this),this._adCounterLabel=e.adInstance.adCounterLabel,this._adInfoLabel=e.adInstance.adInfoLabel,this._muteRequested=!1,this._terminateRequested=!1,this._adSession=null,this._registerForEvents(),document.addEventListener("visibilitychange",function(){t(this,r),"visible"===document.visibilityState?this._sendTabChange("tab-visible"):this._sendTabChange("tab-invisible")}.bind(this))}var i,a,s;return S(n,[{key:"_registerForEvents",value:function(){var e=this;this.eventBus.subscribe("HL_CONFIG_ERROR",function(n){t(this,e),this.hasHLConfigError=!0}.bind(this))}},{key:"getTimeDiff",value:function(e,t){var n=e.getTime();return(t.getTime()-n)/1e3}},{key:"skipMidrollOnLongVMAP",value:(s=e(r.mark((function e(t){var n,i,a,s,o,d,u,c,l,h,p,f,m,v,g,A,b,_,y,w;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("midroll"===t){e.next=2;break}return e.abrupt("return",!1);case 2:if((null===(n=this._gameData)||void 0===n||null===(i=n.pAds)||void 0===i?void 0:i.vmap.enabled)&&(null===(a=this._gameData)||void 0===a||null===(s=a.pAds)||void 0===s||null===(o=s.vmap)||void 0===o?void 0:o.adtr)){e.next=5;break}return e.abrupt("return",!1);case 5:if(null!==(d=this._gameData)&&void 0!==d&&null!==(u=d.visit)&&void 0!==u&&u.vc&&0!==(null===(c=this._gameData)||void 0===c||null===(l=c.visit)||void 0===l?void 0:l.vc)){e.next=7;break}return e.abrupt("return",!1);case 7:if(_=(null===(h=this._gameData)||void 0===h||null===(p=h.pAds)||void 0===p||null===(f=p.vmap)||void 0===f||null===(m=f.adtr)||void 0===m?void 0:m.skipDuration)||(null===(v=this._gameData)||void 0===v||null===(g=v.pAds)||void 0===g||null===(A=g.vmap)||void 0===A||null===(b=A.adtr)||void 0===b?void 0:b.delay)||360,bT.firstInterstitialImpressionDate){e.next=10;break}return e.abrupt("return",!1);case 10:return y=this.getTimeDiff(bT.firstInterstitialImpressionDate,new Date),(w=y<_)&&wo("gd-adflow skipped by long vmap",{elapsed:y}),e.abrupt("return",w);case 15:case"end":return e.stop()}}),e,this)}))),function(e){return s.apply(this,arguments)})},{key:"runAdFlow",value:(a=e(r.mark((function e(n){var i,a,s,o,d,u,c,l,h,p,f,m,v,g,A,b,_,y,w,k,x,E,D,S,R,I,C,O,P,L,B,U,M,F,j,G,N,q,H,V,Q,z,W,K,Y,J,X,Z,$,ee,te,ne,re,ie,ae,se,oe,de,ue,ce,le,he,pe,fe,me,ve,ge,Ae,be=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._adInstance.adCounter,null===(i=n.params)||void 0===i||!i.isCompensation||!this._gameData.compensation.clbl){e.next=7;break}return this._adCounterLabel.show(),p=function(e){var n=this;return t(this,be),new Promise(function(r){return t(this,n),setTimeout(r,e)}.bind(this))}.bind(this),e.next=7,p(1e3*this._gameData.compensation.ctl);case 7:return e.next=9,nk();case 9:return!(f=e.sent)||f.isLoader(),this.adRequest=n,m=hT(n),n.params.adTypeFound=m,yo("gd-adflow, adTypeFound",m,n.params.position),_T.count(m),yo("gd-adflow, counters",{counters:_T.getAll()}),v=this._gameData,g=v.gameId,A=v.ad_skip,e.next=21,NT({gameId:g,ad_skip_rule:A,adTypeFound:m});case 21:if(!e.sent){e.next=28;break}return this._adInstance.adCounter[m]=this._adInstance.adCounter[m]||0,this._adInstance.adCounter[m]++,this._onResumeGame("Advertisement(s) are done. Start / resume the game.","success"),FT({gameData:this._gameData,executeCompensation:this.executeCompensation}),e.abrupt("return");case 28:return e.next=30,this.skipMidrollOnLongVMAP(m);case 30:if(!e.sent){e.next=34;break}return this._onResumeGame("Advertisement(s) are done. Start / resume the game.","success"),e.abrupt("return");case 34:(b=this._getAdFlow(m)).find(function(e){return t(this,be),"opus"===e}.bind(this))&&!this.isOpusReady()&&(b=b.filter(function(e){return t(this,be),"opus"!==e}.bind(this)),this._msgrt.send("opus.sdk",{message:"Not ready"})),_=this._gameData,y=_.afg_disabled,w=null===(a=n.params)||void 0===a?void 0:a.isGift,k=null===(s=n.params)||void 0===s?void 0:s.isMidrollPlus,x=null===(o=n.params)||void 0===o?void 0:o.isCompensation,null===(d=n.params)||void 0===d||d.position,E=null===(u=_.promo)||void 0===u?void 0:u.rainbow,D=(null==E?void 0:E.enabled)&&(null===(c=E.position)||void 0===c?void 0:c[m]),S=null==E?void 0:E.gift,R=D&&null!=E&&E.duration?null==E?void 0:E.duration:5,I=y?b.filter(function(e){return t(this,be),"adsense"!==e}.bind(this)):b,C=this.get_ad_system_init_result(),O=C.afg,P=C.ima,L=null==_||null===(l=_.ad_blcks)||void 0===l||null===(h=l.removeOtherAdaptors)||void 0===h?void 0:h.enabled,this.anyAdBlocking=!O||!P,this.bothAdBlocking=!O&&!P,this.adsBlocked=L&&this.anyAdBlocking||this.bothAdBlocking,this.adsBlocked?(wo("gd-adflow adsBlocked so changing the flow"),I=[]):(O||(I=I.filter(function(e){return t(this,be),"adsense"!==e}.bind(this))),P||(I=I.filter(function(e){return t(this,be),"ima"!==e}.bind(this)))),B=!1,U=!1,M=[],F=0,j=!1,N=!1,q={reqs:0,imps:0},H={},V=!1,Q=!1,z=QT(I),e.prev=68,z.s();case 70:if((W=z.n()).done){e.next=124;break}if(K=W.value,!this._terminateRequested){e.next=74;break}return e.abrupt("break",124);case 74:if(n.params.adapter=K,Y=F===I.length-1,J=w&&S||!w,X=Y&&D&&J,n.params=VT(VT({},n.params),{},{adapterIndex:F,isLastAdapter:Y,shouldFail:!1,extraPromoRunOnFail:X,muteRequested:this._muteRequested}),!this._muteRequested||"adsense"!==K){e.next=81;break}return e.abrupt("continue",122);case 81:return function(){t(this,be),xo.firstSuccessOrder&&!isNaN(xo.firstSuccessOrder)&&(n.params.shouldFail=F<xo.firstSuccessOrder)}.bind(this),wo("gd-adflow, before adInvoke",F,K,n.params.shouldFail),e.next=85,this.adInvoke(n);case 85:if(Z=e.sent,$=Z.success,ee=Z.args,te=Z.isSkipped,ne=Z.noVast,re=Z.t4r,ie=Z.adContext,ae=Z.isCanceled,(se=(null==ie?void 0:ie.isVMAP)||!1)&&q.reqs++,se&&($||ae)&&q.imps++,oe=null==ee?void 0:ee.reason,de=null==ee?void 0:ee.message,ue=null==ee?void 0:ee.errorType,H[K]=H[K]||{req:0,imp:0,fail:0},H[K].req++,$?H[K].imp++:(H[K].fail++,H[K].failReason=oe,H[K].failMessage=de,H[K].failType=ue),!$){e.next=111;break}return wo("gd-adflow, adapter-result-success",F,K,ee),B=!0,N=se,U=!(null==ee||!ee.isPromoSuccess),G=re,e.abrupt("break",124);case 111:if(wo("gd-adflow, adapter-result-failure",F,K,ee.message),"opus"===K&&"[FC] No ad available"===(null==ee?void 0:ee.message)&&(n.params.opusSuccess=!0,V=!0),ae&&!Q&&(Q=!0),F++,M.push(ee.message),!te){e.next=118;break}return e.abrupt("break",124);case 118:if(!ne){e.next=121;break}return this._runAutoResume(),e.abrupt("break",124);case 121:j=X;case 122:e.next=70;break;case 124:e.next=129;break;case 126:e.prev=126,e.t0=e.catch(68),z.e(e.t0);case 129:return e.prev=129,z.f(),e.finish(129);case 132:if(this._adInfoLabel&&this._adInfoLabel.hide(),!j){e.next=139;break}return e.next=136,new ZR(this).run({duration:R});case 136:e.sent.success&&(U=!0);case 139:return function(){var e;t(this,be),xo.disableGift&&null!==(e=_.gft)&&void 0!==e&&e[m].enabled&&(_.gft[m].enabled=!1)}.bind(this),ce=M.join(" /n"),B||V?(bT.imps++,bT.lastImpressionDate=new Date,"rewarded"!==m&&(bT.lastInterstitialImpressionDate=new Date,bT.firstInterstitialImpressionDate||(bT.firstInterstitialImpressionDate=bT.lastInterstitialImpressionDate)),this._setAdRequestTimer(),this._onResumeGame("Advertisement(s) are done. Start / resume the game.","success"),this._giveGift(m),"midroll"===m&&this._executeMidrollPlus()):(this._onResumeGame(ce,"warning"),this._giveGift(m),"midroll"===m&&this._executeMidrollPlus()),FT({gameData:_,executeCompensation:this.executeCompensation}),le="-1",he="none",B?(le="index_".concat(F),he=I[F]):U?(le="promo",he="promo"):V&&(le="opus",he="opus"),pe=this.get_session_id(),this.anyAdBlocking&&"-1"===le?(fe="rewarded"===m?"rewarded":this.blockedAdsMap.preroll?"midroll":"preroll",this.blockedAdsMap[fe]=this.blockedAdsMap[fe]?this.blockedAdsMap[fe]+1:1,yo("gd-adflow, blocked-ad",JSON.stringify(this.blockedAdsMap)),this._msgrt.send("adflow.blocked.pos",{message:"".concat(fe)}),this.send_atom_event("gd.adflow",{adBlocker:!0,afgBlocked:!O,imaBlocked:!P,isGift:w,isMidrollPlus:k,adType:fe,sessionId:pe,successAdapter:"none",adFlowIndex:le,adapterResults:H,ctry:_.ctry})):(T(me={},"adflow.all.index",{message:"".concat(le)}),T(me,"adflow.all.success_adapter",{message:"".concat(he)}),T(me,"adflow.".concat(m,".index"),{message:"".concat(le)}),T(me,"adflow.".concat(m,".success_adapter"),{message:"".concat(he)}),ve=me,Object.keys(ve).forEach(function(e){t(this,be);var n=ve[e];this._msgrt.send(e,n)}.bind(this)),this.send_atom_event("gd.adflow",{adFlowIndex:le,successAdapter:he,adBlocker:!1,afgBlocked:!O,imaBlocked:!P,isGift:w,isMidrollPlus:k,isCompensation:x,adType:m,sessionId:pe,t4r:G,adapterResults:H,ctry:_.ctry})),ge={adType:m,imp:"-1"!==le&&"promo"!==le||V,promo:"promo"===le,opus:V,blocked:this.anyAdBlocking&&"-1"===le,hasHLConfigError:this.hasHLConfigError,isGift:w,isMidrollPlus:k,isCompensation:x,isVMAP:!V&&N,isAppliedVMAP:!V&&N&&(null==_?void 0:_.vmapByTagsApplied),VMAPs:q},this._adSession=ge,cT("ad-session",{adSession:ge}),V&&Q&&cT("ad-session",{adSession:VT(VT({},ge),{},{opus:!1,cancel:!0,isVMAP:N,isAppliedVMAP:N&&(null==_?void 0:_.vmapByTagsApplied)})}),Ae={adType:m},this.eventBus.broadcast("AD_FLOW_COMPLETE",Ae),e.abrupt("return",VT(VT({},Ae),{},{args:{success:B,isGift:w,isMidrollPlus:k}}));case 159:case"end":return e.stop()}}),e,this,[[68,126,129,132]])}))),function(e){return a.apply(this,arguments)})},{key:"adInvoke",value:(i=e(r.mark((function n(i){var a=this;return r.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",new Promise(function(){var n=e(r.mark((function e(n,s){var o,d,u,c,l=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o="main.showad.".concat(i.params.adapter,".").concat(i.params.adapterIndex),yo("adInvoke.start",{scopeName:o,adRequest:JSON.stringify(i)}),d={},u=function(e){t(this,l);var r=a._adInstance.adContext;yo("adInvoke.failure",{args:e,adRequest:JSON.stringify(i),adContext:r}),a._eventBus.unsubscribeScope(o);var s="dismissed"===(null==e?void 0:e.message),d="AD_SDK_CANCELED"===(null==e?void 0:e.name);n({success:!1,args:e,isSkipped:s,isCanceled:d,noVast:e.noVast,adContext:r})}.bind(this),c=function(e){t(this,l);var r=a._adInstance.adContext;yo("adInvoke.success",{args:e,adRequest:JSON.stringify(i),adContext:r}),a._eventBus.unsubscribeScope(o),n({success:!0,args:e,t4r:d,adContext:r})}.bind(this),a._eventBus.subscribe("AD_ERROR",u,o),a._eventBus.subscribe("AD_SDK_CANCELED",u,o),a._eventBus.subscribe("AD_SUCCESS",c,o),a._eventBus.subscribe("AD_T4R",function(){t(this,l),d.loaded=!0}.bind(this),o),a._eventBus.subscribe("AD_T4R_CLICK",function(){t(this,l),d.t4rClick=!0}.bind(this),o),a._eventBus.subscribe("AD_T4R_VIDEO",function(){t(this,l),d.t4rVideo=!0}.bind(this),o),a._eventBus.subscribe("AD_CLICK",function(){t(this,l),d.click=!0}.bind(this),o),a._eventBus.subscribe("AD_BIDDER",function(e){t(this,l),d.bidder=null==e?void 0:e.bidder}.bind(this),o),a._eventBus.subscribe("AD_T4R_NONE",function(e){t(this,l),d.fail_reason=null==e?void 0:e.reason}.bind(this),o),e.prev=14,e.next=17,a._adInstance.startAd(i);case 17:e.next=23;break;case 19:e.prev=19,e.t0=e.catch(14),ko("gd-adflow startAd error",e.t0),n({success:!1,err:e.t0});case 23:case"end":return e.stop()}}),e,this,[[14,19]])})));return function(e,t){return n.apply(this,arguments)}}()));case 1:case"end":return n.stop()}}),n)}))),function(e){return i.apply(this,arguments)})},{key:"_getAdFlow",value:function(e){var n,r,i,a,s,o,d,u,c=this,l=void function(){if(t(this,c),xo.customAdFlow)return JSON.parse(xo.customAdFlow)}.bind(this),h=this._gameData.adflw;l&&(h=l);var p=null!==(n=h)&&void 0!==n&&null!==(r=n.adapters)&&void 0!==r&&r.default?null===(i=h)||void 0===i||null===(a=i.adapters)||void 0===a?void 0:a.default:["ima","adsense"];return p=null!==(s=h)&&void 0!==s&&null!==(o=s.adapters)&&void 0!==o&&o[e]?null===(d=h)||void 0===d||null===(u=d.adapters)||void 0===u?void 0:u[e]:p}},{key:"_sendTabChange",value:function(e){var n=this;if("tab-invisible"===e&&this._adSession){var r=this._adSession;r.tabState=e,this.eventBus.subscribe("STARTED",function(){t(this,n),"hidden"===document.visibilityState&&(r.tabState=r.tabState+"-STARTED",cT("ad-session-tab",{adSession:r}))}.bind(this)),this.eventBus.subscribe("IMPRESSION",function(){t(this,n),"hidden"===document.visibilityState&&(r.tabState=r.tabState+"-IMPRESSION",cT("ad-session-tab",{adSession:r}))}.bind(this))}}},{key:"mute",value:function(){var e=this;this._muteRequested=!0,this._adInstance.mute().catch(function(n){t(this,e)}.bind(this))}},{key:"terminate",value:function(){var e=this;this._terminateRequested=!0,this._adInstance.terminate().catch(function(n){t(this,e)}.bind(this)),this._setAdRequestTimer()}}]),n}(),YT=new M,JT=["https://games.softgames.com","https://sg.gamedistribution.com","https://minigame-stg.aeriagames.jp","https://minigame.aeriagames.jp","https://html5.gamedistribution.com","http://localhost:3005","https://yjgames.gamedistribution.com","https://portal-staging-sgweb.gamedistribution.com/"];window.addEventListener("message",(function(e){var n=this,r=e.data,i=e.origin,a=e.source;if(JT.some(function(e){return t(this,n),e===i}.bind(this))&&(null==r||!r.__tcfapiCall)){var s=r.system;r.action;var o="aeriaExternalHostsConnector"===s;if("Softgames"===s)WT=a,(window.parent||window).postMessage(r,"*"),YT.emit("aeria-event",r);else if(o){WT&&WT.postMessage(r,"*");var d=window.parent||window;d&&d.postMessage(r,"*")}}}),!1);var XT="https://html5.gamedistribution.com",ZT="parent-data-request",$T="parent-data-response",eI=function(){function n(){R(this,n)}var i;return S(n,[{key:"init",value:function(e){var n=this;this._registerForDataRequests(e),this._askForParentFrameData().then(function(r){if(t(this,n),r){var i=r.adRequestTimer;e.adRequestTimer=i,yo("gd-frame-data-bridge, adRequestTimer on init ",e.adRequestTimer)}}.bind(this))}},{key:"_registerForDataRequests",value:function(e){var n=this;window.addEventListener("message",function(r){t(this,n);var i=r.data,a=r.origin,s=r.source,o=i.type;if(i.value,a===XT&&o===ZT){var d={adRequestTimer:e.adRequestTimer};s.postMessage({type:$T,value:d})}}.bind(this))}},{key:"_askForParentFrameData",value:(i=e(r.mark((function e(){var n=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(e,r){var i=this;t(this,n);var a=!1;window.addEventListener("message",(function(t){var n=t.data,r=t.origin;t.source;var i=n.type,s=n.value;r===XT&&i===$T&&(e(s),a=!0)})),setTimeout(function(){t(this,i),a||e()}.bind(this),1e3);var s={type:ZT};window.parent.postMessage(s,"*")}.bind(this)));case 1:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})}]),n}(),tI=new eI,nI={SDKExistsOnUpperFrame:!1};function rI(){return iI.apply(this,arguments)}function iI(){return(iI=e(r.mark((function e(){var t,n;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,t=["https://pm.azerioncircle.com/p/gd-blck-rmv/"],e.next=4,m(t[0],"blckrmv",{alternates:t});case 4:return n=window.GD_BLCK_RMV||{},console.log("new blocker",n),e.abrupt("return",n.AdBlockerPage);case 9:e.prev=9,e.t0=e.catch(0),console.log("new blcoker error => ",e.t0.message);case 12:case"end":return e.stop()}}),e,null,[[0,9]])})))).apply(this,arguments)}function aI(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 sI(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?aI(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):aI(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var oI=function(){wo("gtag: GA not initialized",arguments)};function dI(e){return uI.apply(this,arguments)}function uI(){return uI=e(r.mark((function e(i){var a,s,o,d,u,c,l,h,p,f,v,g,A=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=i.onError,s=i.args,d="gdSDKDataLayer",u="https://www.googletagmanager.com/gtag/js?id=".concat(o="G-PLRTBHGSEL","&l=").concat(d),c=[u],e.prev=5,e.next=8,m(c[0],"gdsdk_google_analytics",{alternates:c,error_prefix:"Blocked:",exists:function(){return t(this,A),window[d]}.bind(this)});case 8:return window[d]=window[d]||[],oI=function(){window[d].push(arguments)},oI("js",new Date),e.next=14,z();case 14:return l=e.sent,h=l.lookupIabConsent,p=l.getGoogleAdType,e.next=19,h();case 19:f=e.sent,v=p(f.consentData),g=sI(sI({},g=s||{}),{},{cookie_flags:"SameSite=None;Secure",cmp:f.result,gdpr:"ok"===f.result?"object"===n(f.consentData)?!0===f.consentData.gdprApplies:"N/A":f.result,google_ads:null==v?void 0:v.type}),oI("config",o,g),e.next=31;break;case 27:e.prev=27,e.t0=e.catch(5),ko("gtag: load GA error",e.t0),a&&a(e.t0);case 31:case"end":return e.stop()}}),e,this,[[5,27]])}))),uI.apply(this,arguments)}new I("https://securepubads.g.doubleclick.net/gampad/ads?env=vp&gdfp_req=1&output=xml_vast4&unviewed_position_start=1&correlator=3792570314314042&sz=640x480&url=https%3A%2F%2Fwww.gry.pl%2Fgra%2Fkings-and-queens-match&iu=%2F1015413%2FTNL_NS-18101700058%2FTNL_T-17110972893&description_url=https%3A%2F%2Fwww.gry.pl%2Fgra%2Fkings-and-queens-match&max_ad_duration=300000&cust_params=hb_uuid%3Dcefbef16-53a9-4f49-9d3b-13e47e1066ad%26hb_cache_id%3Dundefined%26tnl_paid%3D866%26tnl_pid%3DP-17110700559%26tnl_system%3D1%26tid%3DTNL_T-17110972893%26tnl_ad_type%3Dvideo_image%26tnl_asset_id%3Daeac8455b2024f25abfa943ec96aa749%26tnl_ad_pos%3Dpreroll%26nsid%3DTNL_NS-18101700058%26tnl_pt%3D22%26hb_cache_host%3Dprebid.adnxs.com%26hb_format%3Dvideo%26hb_size%3D0x0%26hb_pb%3D1.15%26hb_adid%3D259407b5792767%26hb_bidder%3Dimprovedigital%26hb_cache_host_improv%3Dprebid.adnxs.com%26hb_uuid_improvedigit%3Dcefbef16-53a9-4f49-9d3b-13e47e1066ad%26hb_format_improvedig%3Dvideo%26hb_size_improvedigit%3D0x0%26hb_pb_improvedigital%3D1.15%26hb_adid_improvedigit%3D259407b5792767%26hb_bidder_improvedig%3Dimprovedigital%26tnl_wog%3D0%26gdGameId%3Daeac8455b2024f25abfa943ec96aa749%26tnl_content_category%3Dpuzzle%26adaptor_order%3D0%26pbct%3D2%26tnl_test%3Da%26fp%3D0.9%26fpt%3D99%26bfa%3D1%26adsense%3D0&gdpr=1&gdpr_consent=CP6lKcgP6lKcgAcABBENApEsAP_gAEPgAAYgg1NV_H__bX9j8Xr1aft0eY1H99j7rsQxBhfJk-4FyDvW_JwXn2EyNA26pqYKmRIEuzZBIQFkHIDURUigSogVrSDMYkGMgTNIJ6BkgFMRY2dYCFxvmQlDMQIY5vp9d3d52D-9_dv83dziz8FHvzU5PmckcICdA58tDfl9bRCb-5IAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHs87_XU-9_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEQaoJIACgAHgAkABcADUAHAAUwAtgBmAD4AH4AYAAygBmgDkAHcAP8Ag4BHQCRAElAKiAXMAvQBfQDPgHUAPaAfYBEwCVQExAJnAUgApoBUgCuQFswLcAt0Bf4DBIGRgZIAywBmYDRgGrgNvAboA3wBywDtgHcgPFgfaB90EqASpAlhBLMEtIJbglxBLoEuwJfQTABMECYYExQJjgTJgmYCZwE0gJqATYgm2CbkE3gTfCCgEGoA8EADAFyAMEAtIQCAAAEAA0ADgAPAAyACwAI4AUAArgBbAEWAJcAX0A1ADVAHOAPIAfIBAwCDgEcAJ2AT-AoYCigF2AM4AbwA9AB8gENgIvAR6AkUBJYCVgEywJsAm0BS4CnwFhQLEAsUBdQC7gF5AMCgYeBiADFoGQgZGAyYBlwDPwGhANGAaYA1MBroDaAG3AN0AcEA6gB2ADuoHkgeUA96B8gHyhIG4ACAAFwAUABUADgAHgAQAAwgBkAGoAPAAiABMACqAG8APQAhIBDAESAI4ASwAmgBhgDLAGyAO-AewB8QD7AP0AgEBFwEYAI0AUEAqABVwC5gGKANoAbgA4gCRAE7AKHAUeApEBbAC5AF3gLzAYMAw0BkgDJwGcwNYA1kBuoDkwHLgPHDAUAAAgAGAAcABQAEUAJwAsABhADwAPYAhACIAEcAJgAVAArwBbAFyAOYA8ACGAESAIsAS4ApABWgDOAGpANkA4ABxgDnAHkAPwAgABGACTAE6AKKAUuArwCvgF2AL8AZwA2wBvADjgHNAOoAdkA9QB-wEJAIbARUAi8BHUCRAJFASXAloCXgE2AJ2AUJApECkgFigLRAXIAugBdwC9AGBAMPAYyAx6BkYGSAMnAZyAzwBoQDTAGtANdAboA6gB3AD3hAE8AAIABgAHAAUABFACcALAAYQA8AD2AIQAiABHACYAFcALcAcwB3AEMAIkARYAlwBSACtAGcANSAbIBwADjAHOAPIAfIA_ACAAEYAJNAToBOwCigFLgK8Ar4BdgC_AGcANQAbYA3gBxwDmgHZAPUAfIA_YCEgENgIvAR3AkQCRQElwJaAl4BNgCdgFCAKSgWIBYoC0QFyALoAXcAvQBgQDDwGMgMeAZIAycBnIDQgGmANaAa6A3QB1ADuAHvCgEYAIoAVABYAEIAJgAXAA8ACOAFIANQAcABHACiwFeAV8AuwBnADeAHNAOyAfsBHoCRQEvAJsAWKAtEBbAC7gF6AMPAZyAzwBoQDWoGuga8A94YAgABFACoALAAhABMAEcAKQAagA4ACOAFFgK8Ar4BdgDOAG8AOaAdkA_YCPQEvAJsAWiAtgBdwC9AGHgM5AZ4A0IBrQDXQHvAPiHAXoADAARAA4ADwALgAZABYADmAHwAfgBHACaAFAAKYAVwAtgBfADQAIQARYAjgBLgCkAFkAL4AYUAzQDOAGoAOcAdwA8gB8wEAAQOAg4CEAERAI4ATgAncBPgE_AKKAUsAqABWQC7AF6AM4AbwA44B0gD0AHyAQ2AiIBFQCPQEigJLASsAmIBMsCbAJtAUgApMBS4CqgFiALUAWzAugC6gF3AL6AYFAxADEwGLAMhAZNAy4DLwGfgNCAaNA0wDTQGpwNdA2ABtADbgHHgOWAc-A7AB3EDyQPKAekA94B8QD5QH2gPxHQRQAFwAUABUADgAIAAXQAwADUAHgARAAmABVgC4ALoAYgAzABvAD1AIYAiQBLACaAFGAMMAZQA0QBsgDvAHtAPsA_QB_wEWARgAoIBVwCxAFzALyAYoA2gBuADiAHUAReAkQBMgCdgFDgKPAU0AsUBbAC4AFyALtAXeAvMBgwDDQGPAMkAZOAyoBlgDOQGiANVAawA3UBxYDkwHLgPHAfWQAXAAIAAyACwAJoAXwA0ACkAFlALkAvgBnADUAHOARwAnABPoChgKKAUsArIBYgC0gF2AN4Ac0A7IB6AEewJsAm0BSYCxAFtALuAXkAwIBiUDPAM_AaEA1MBroDYAG3AOfAdGA7CB5IHlAPeAfEQgPAALAAoAC4AGIATAAqgBcADEAG8APQAjgB3gD_AJSAUEAq4BcwDFAG0AOoApoBYoC0QFwALkAZOAzkBogDVQHjkgF4ABgAHAAXAAyACwAHIARwAmgBUAC-AGQANoAeABCACkAFkAM6AagBqgDuAIAARyApoCoAFZALSAXYA3gB8gEVAI6AR6AkUBKwCWoE2ATaApMBVICxAF3AMWAZZAzwDPwGhANdAbAA7AB5QD3iUB0ABAACwAKAAcgBgAGIAPAAiABMACqAFwAMUAhgCJAEcAKMAbIA7wB-AFXAMUAdQBF4CRAFHgLFAWwAvMBk4DOQGsFIFwAC4AKAAqABwAEEAMAA1AB4AEQAJgAUgAqgBiADNAIYAiQBRgDKAGiANkAd8A_AD9AIsARgAoIBVwC5gF5AMUAbQA3ACLwEiAJ2AUOAsUBbAC4AFyALtAXmAw0BkgDJwGcwNYA1kBuoDkwHjlAIgAFwAMgAsAByAEcAJoAVAAvgBkADaAHgAQgAiwBHACZAFIALIAXwAwgBnQDUANUAc4A7oB8gH2AQAAjgBIgCdgFDAKXAVkBWwCxQF1AXYA14BvADtgHoAP-AjoBHoCRQElgJigTYBNoCkAFPgLEAXQAu4BeQC-gGBAMWAZMAy6BngGfgNCAaJA1IDU4GugbAA4IB0wDsAHcAPKAe8A-IB8oA.f_wACHwAAAAA&plcmt=1&vpmute=1&vpa=auto&sdkv=h.3.633.0&osd=2&frm=2&vis=1&sdr=1&hl=en&afvsz=200x200%2C250x250%2C300x250%2C336x280%2C450x50%2C468x60%2C480x70&is_amp=1&uach=WyJtYWNPUyIsIjE0LjQuMSIsImFybSIsIiIsIjEyMy4wLjYzMTIuMTIyIixudWxsLDAsbnVsbCwiNjQiLFtbIkdvb2dsZSBDaHJvbWUiLCIxMjMuMC42MzEyLjEyMiJdLFsiTm90OkEtQnJhbmQiLCI4LjAuMC4wIl0sWyJDaHJvbWl1bSIsIjEyMy4wLjYzMTIuMTIyIl1dLDBd&u_so=p&ctv=0&sdki=445&ptt=20&adk=2541783110&sdk_apis=2%2C7%2C8&omid_p=Google1%2Fh.3.633.0&sid=E657451B-8F2F-4921-A55A-21D1A6F3C39E&nel=1&eid=44777649%2C44781409%2C44785452%2C95321947%2C95322027%2C95323893%2C95324128%2C95324210%2C95326337&ref=https%3A%2F%2Fwww.gry.pl%2F&top=https%3A%2F%2Fwww.gry.pl%2F&loc=https%3A%2F%2Fhtml5.gamedistribution.com%2Faeac8455b2024f25abfa943ec96aa749%2F%3Ftimestamp%3D1713336375%26countryCode%3Dpl%26siteid%3D88%26channelid%3D1%26siteLocale%3Dpl%26locale%3Dpl%26gd_sdk_referrer_url%3Dhttps%253A%252F%252Fwww.gry.pl%252Fgra%252Fkings-and-queens-match&dlt=1713336379046&idt=2621&dt=1713336390920&scor=3473667703821297&ged=ve4_td12_tt10_pd12_la2000_er0.0.156.300_vi0.0.600.510_vp100_eb24427",!0),new I("https://securepubads.g.doubleclick.net/gampad/ads?env=vp&gdfp_req=1&output=xml_vast4&unviewed_position_start=1&correlator=2275053868608838&sz=640x480&url=https%3A%2F%2Fwww.gry.pl%2Fgra%2Fkings-and-queens-match&iu=%2F1015413%2FTNL_NS-18101700058%2FTNL_T-17110972893&description_url=https%3A%2F%2Fwww.gry.pl%2Fgra%2Fkings-and-queens-match&max_ad_duration=300000&vpa=auto&vpmute=0&plcmt=1&cust_params=tnl_paid%3D866%26tnl_pid%3DP-17110700559%26tnl_system%3D1%26tid%3DTNL_T-17110972893%26tnl_ad_type%3Dvideo_image%26tnl_asset_id%3Daeac8455b2024f25abfa943ec96aa749%26tnl_ad_pos%3Dpreroll%26nsid%3DTNL_NS-18101700058%26tnl_pt%3D22%26gd_opus%3D1%26fp%3D0.9%26gd_np%3D1%26bfa%3D1%26fpt%3D99%26tnl_wog%3D0&sdkv=h.3.633.0&osd=2&frm=0&vis=1&sdr=1&hl=en&afvsz=200x200%2C250x250%2C300x250%2C336x280%2C450x50%2C468x60%2C480x70&is_amp=0&uach=WyJtYWNPUyIsIjE0LjQuMSIsImFybSIsIiIsIjEyMy4wLjYzMTIuMTIyIixudWxsLDAsbnVsbCwiNjQiLFtbIkdvb2dsZSBDaHJvbWUiLCIxMjMuMC42MzEyLjEyMiJdLFsiTm90OkEtQnJhbmQiLCI4LjAuMC4wIl0sWyJDaHJvbWl1bSIsIjEyMy4wLjYzMTIuMTIyIl1dLDBd&u_so=p&ctv=0&gdpr=1&gdpr_consent=CP6lKcgP6lKcgAcABBENApEsAP_gAEPgAAYgg1NV_H__bX9j8Xr1aft0eY1H99j7rsQxBhfJk-4FyDvW_JwXn2EyNA26pqYKmRIEuzZBIQFkHIDURUigSogVrSDMYkGMgTNIJ6BkgFMRY2dYCFxvmQlDMQIY5vp9d3d52D-9_dv83dziz8FHvzU5PmckcICdA58tDfl9bRCb-5IAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHs87_XU-9_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEQaoJIACgAHgAkABcADUAHAAUwAtgBmAD4AH4AYAAygBmgDkAHcAP8Ag4BHQCRAElAKiAXMAvQBfQDPgHUAPaAfYBEwCVQExAJnAUgApoBUgCuQFswLcAt0Bf4DBIGRgZIAywBmYDRgGrgNvAboA3wBywDtgHcgPFgfaB90EqASpAlhBLMEtIJbglxBLoEuwJfQTABMECYYExQJjgTJgmYCZwE0gJqATYgm2CbkE3gTfCCgEGoA8EADAFyAMEAtIQCAAAEAA0ADgAPAAyACwAI4AUAArgBbAEWAJcAX0A1ADVAHOAPIAfIBAwCDgEcAJ2AT-AoYCigF2AM4AbwA9AB8gENgIvAR6AkUBJYCVgEywJsAm0BS4CnwFhQLEAsUBdQC7gF5AMCgYeBiADFoGQgZGAyYBlwDPwGhANGAaYA1MBroDaAG3AN0AcEA6gB2ADuoHkgeUA96B8gHyhIG4ACAAFwAUABUADgAHgAQAAwgBkAGoAPAAiABMACqAG8APQAhIBDAESAI4ASwAmgBhgDLAGyAO-AewB8QD7AP0AgEBFwEYAI0AUEAqABVwC5gGKANoAbgA4gCRAE7AKHAUeApEBbAC5AF3gLzAYMAw0BkgDJwGcwNYA1kBuoDkwHLgPHDAUAAAgAGAAcABQAEUAJwAsABhADwAPYAhACIAEcAJgAVAArwBbAFyAOYA8ACGAESAIsAS4ApABWgDOAGpANkA4ABxgDnAHkAPwAgABGACTAE6AKKAUuArwCvgF2AL8AZwA2wBvADjgHNAOoAdkA9QB-wEJAIbARUAi8BHUCRAJFASXAloCXgE2AJ2AUJApECkgFigLRAXIAugBdwC9AGBAMPAYyAx6BkYGSAMnAZyAzwBoQDTAGtANdAboA6gB3AD3hAE8AAIABgAHAAUABFACcALAAYQA8AD2AIQAiABHACYAFcALcAcwB3AEMAIkARYAlwBSACtAGcANSAbIBwADjAHOAPIAfIA_ACAAEYAJNAToBOwCigFLgK8Ar4BdgC_AGcANQAbYA3gBxwDmgHZAPUAfIA_YCEgENgIvAR3AkQCRQElwJaAl4BNgCdgFCAKSgWIBYoC0QFyALoAXcAvQBgQDDwGMgMeAZIAycBnIDQgGmANaAa6A3QB1ADuAHvCgEYAIoAVABYAEIAJgAXAA8ACOAFIANQAcABHACiwFeAV8AuwBnADeAHNAOyAfsBHoCRQEvAJsAWKAtEBbAC7gF6AMPAZyAzwBoQDWoGuga8A94YAgABFACoALAAhABMAEcAKQAagA4ACOAFFgK8Ar4BdgDOAG8AOaAdkA_YCPQEvAJsAWiAtgBdwC9AGHgM5AZ4A0IBrQDXQHvAPiHAXoADAARAA4ADwALgAZABYADmAHwAfgBHACaAFAAKYAVwAtgBfADQAIQARYAjgBLgCkAFkAL4AYUAzQDOAGoAOcAdwA8gB8wEAAQOAg4CEAERAI4ATgAncBPgE_AKKAUsAqABWQC7AF6AM4AbwA44B0gD0AHyAQ2AiIBFQCPQEigJLASsAmIBMsCbAJtAUgApMBS4CqgFiALUAWzAugC6gF3AL6AYFAxADEwGLAMhAZNAy4DLwGfgNCAaNA0wDTQGpwNdA2ABtADbgHHgOWAc-A7AB3EDyQPKAekA94B8QD5QH2gPxHQRQAFwAUABUADgAIAAXQAwADUAHgARAAmABVgC4ALoAYgAzABvAD1AIYAiQBLACaAFGAMMAZQA0QBsgDvAHtAPsA_QB_wEWARgAoIBVwCxAFzALyAYoA2gBuADiAHUAReAkQBMgCdgFDgKPAU0AsUBbAC4AFyALtAXeAvMBgwDDQGPAMkAZOAyoBlgDOQGiANVAawA3UBxYDkwHLgPHAfWQAXAAIAAyACwAJoAXwA0ACkAFlALkAvgBnADUAHOARwAnABPoChgKKAUsArIBYgC0gF2AN4Ac0A7IB6AEewJsAm0BSYCxAFtALuAXkAwIBiUDPAM_AaEA1MBroDYAG3AOfAdGA7CB5IHlAPeAfEQgPAALAAoAC4AGIATAAqgBcADEAG8APQAjgB3gD_AJSAUEAq4BcwDFAG0AOoApoBYoC0QFwALkAZOAzkBogDVQHjkgF4ABgAHAAXAAyACwAHIARwAmgBUAC-AGQANoAeABCACkAFkAM6AagBqgDuAIAARyApoCoAFZALSAXYA3gB8gEVAI6AR6AkUBKwCWoE2ATaApMBVICxAF3AMWAZZAzwDPwGhANdAbAA7AB5QD3iUB0ABAACwAKAAcgBgAGIAPAAiABMACqAFwAMUAhgCJAEcAKMAbIA7wB-AFXAMUAdQBF4CRAFHgLFAWwAvMBk4DOQGsFIFwAC4AKAAqABwAEEAMAA1AB4AEQAJgAUgAqgBiADNAIYAiQBRgDKAGiANkAd8A_AD9AIsARgAoIBVwC5gF5AMUAbQA3ACLwEiAJ2AUOAsUBbAC4AFyALtAXmAw0BkgDJwGcwNYA1kBuoDkwHjlAIgAFwAMgAsAByAEcAJoAVAAvgBkADaAHgAQgAiwBHACZAFIALIAXwAwgBnQDUANUAc4A7oB8gH2AQAAjgBIgCdgFDAKXAVkBWwCxQF1AXYA14BvADtgHoAP-AjoBHoCRQElgJigTYBNoCkAFPgLEAXQAu4BeQC-gGBAMWAZMAy6BngGfgNCAaJA1IDU4GugbAA4IB0wDsAHcAPKAe8A-IB8oA.f_wACHwAAAAA&sdki=445&ptt=20&adk=1748861338&sdk_apis=2%2C7%2C8&omid_p=Google1%2Fh.3.633.0&media_url=blob%3Ahttps%253a%2F%2Fwww.gry.pl%2Ffa4fae4b-f435-43b4-9cee-af65696fe59e&sid=D3F4C4E1-4002-4BEE-A1F2-2638CD3B9197&a3p=EloKDWNyd2RjbnRybC5uZXQSQGE0MmZkMWJkNGI5MjgyOTY5NzUxNDUyYzVlNmUxNmQ1MzkzODYxY2E5Y2U2MGUzNjk3Y2ZlNTExMTQxYjFhZjgYucX8se4xSAASxgEKCHJ0YmhvdXNlEqwBWVNmZ3hFVno0OXBMOFI2c3ltSWtSdUFNdFg4d2Y0clBkdVMwTlVuLzZpUnhJZWh0cnRjVUtLSjFraHJDQWZERmp1N1pDNHJEc1lxMkduKzJFTFMxRmgzWlEzTUxaK0owbXZoTDR4UFlNc2JUbmlGNkczTWRaZjZQK3hEVVkwTU1FUlpkZzlKMjArcjlQNUtQOFBmWVhMaEkwRitGMUNhYUNwQS9aRVNNMVNnPRjBxfyx7jFIAFICCGoSGQoKdWlkYXBpLmNvbRjDz9ay7jFIAFICCGQSPgoFb3BlbngSLGV5SnBJam9pZEZoNU5XbDNSakZUT0ZjNVoxTlZRbFl5YWtRemR6MDlJbjA9GJ3I_LHuMUgA&nel=1&eid=44776494%2C44777649%2C44781409%2C95321947%2C95322027%2C95323893%2C95324128%2C95324210%2C95326337&top=https%3A%2F%2Fwww.gry.pl%2Fgra%2Fkings-and-queens-match&loc=https%3A%2F%2Fwww.gry.pl%2Fgra%2Fkings-and-queens-match&dt=1713336184147&cookie=ID%3Da17ef48e823e6627%3AT%3D1709727355%3ART%3D1713335981%3AS%3DALNI_MY20KDMmAY5MP3sMYIZndoHFyvxhg&gpic=UID%3D00000d6b0028013d%3AT%3D1709727355%3ART%3D1713335981%3AS%3DALNI_MZ7af9EvfEMcTpwOjK9LSfd-RfFCQ&scor=3968881391553945&ged=ve4_td21_tt0_pd21_la21000_er271.162.427.462_vi0.0.873.1064_vp100_eb24171",!0);var cI,lI=function(e){var n=this,r=e.handler,i=e.timeout,a=e.interval,s=r||function(){return t(this,n),!0}.bind(this),o=i||1e3,d=a||10;return new Promise(function(e,i){var a=this;if(t(this,n),r())e(!0);else{var u=!1,c=setInterval(function(){t(this,a);try{s()&&(clearInterval(c),u=!0,e(!0))}catch(t){clearInterval(c),e(!1)}}.bind(this),d);setTimeout(function(){t(this,a),clearInterval(c),u||e(!1)}.bind(this),o)}}.bind(this))},hI=function(){var n=e(r.mark((function e(n){var i,a,s,o,d=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=n.topic,a=n.args,e.next=3,Lw();case 3:if(s=e.sent,o=s.console_logs,o&&o.allowed.some(function(e){return t(this,d),e===i}.bind(this))){e.next=8;break}return e.abrupt("return");case 8:console.log({topic:i,args:a});case 9:case"end":return e.stop()}}),e,this)})));return function(e){return n.apply(this,arguments)}}();function pI(){return fI.apply(this,arguments)}function fI(){return fI=e(r.mark((function e(){var t,n;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!cI){e.next=2;break}return e.abrupt("return",cI);case 2:return e.next=4,z();case 4:return t=e.sent,n=t.lookupIabConsent,t.getGoogleAdType,e.next=9,n();case 9:return cI=e.sent,e.next=12,hI({topic:"cmp-decoded",args:{key:"[consent-check] cmp-decoded",cmp:cI}});case 12:return e.abrupt("return",cI);case 13:case"end":return e.stop()}}),e)}))),fI.apply(this,arguments)}function mI(){return vI.apply(this,arguments)}function vI(){return vI=e(r.mark((function e(){var n,i,a,s,o,d,u,c,l,h,p,f,m,v=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,pI();case 2:if(s=e.sent,(o=(null==s?void 0:s.consentData)||{}).gdprApplies){e.next=7;break}return wo("[consent-check] gdprApplies=false"),e.abrupt("return",!1);case 7:return d=(null===(n=o.purpose)||void 0===n?void 0:n.consents)||{},u=(null===(i=o.vendor)||void 0===i?void 0:i.consents)||{},c=(null===(a=o.publisher)||void 0===a?void 0:a.consents)||{},l=function(e){return t(this,v),0===Object.keys(e).length}.bind(this),h=l(d),p=l(u),f=l(c),wo("[consent-check]",{fullyRejected:m=h&&p&&f,emptyPurpose:h,emptyVendor:p,emptyPublisher:f}),e.abrupt("return",m);case 17:case"end":return e.stop()}}),e,this)}))),vI.apply(this,arguments)}function gI(){return AI.apply(this,arguments)}function AI(){return AI=e(r.mark((function e(){var t,n,i,a,s;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,pI();case 2:if(a=e.sent,(s=(null==a?void 0:a.consentData)||{}).gdprApplies){e.next=6;break}return e.abrupt("return",!1);case 6:return null===(t=s.purpose)||void 0===t||t.consents,null===(n=s.vendor)||void 0===n||n.consents,null===(i=s.publisher)||void 0===i||i.consents,e.abrupt("return",!1);case 11:case"end":return e.stop()}}),e)}))),AI.apply(this,arguments)}function bI(){return _I.apply(this,arguments)}function _I(){return(_I=e(r.mark((function e(){var t,n,i,a;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Lw();case 3:if(t=e.sent,null!=(n=t.disable_ads_by_cmp)&&n.enabled){e.next=8;break}return wo("[consent-check] returned by no rule",n),e.abrupt("return",!1);case 8:if(i="all-rejected"===(null==n?void 0:n.mode),e.t0=i,!e.t0){e.next=14;break}return e.next=13,mI();case 13:e.t0=e.sent;case 14:if(!e.t0){e.next=17;break}return wo("[consent-check] fully rejected"),e.abrupt("return",!0);case 17:if(a="some-rejected"===(null==n?void 0:n.mode),e.t1=a,!e.t1){e.next=23;break}return e.next=22,gI();case 22:e.t1=e.sent;case 23:if(!e.t1){e.next=26;break}return wo("[consent-check] partially rejected"),e.abrupt("return",!0);case 26:e.next=31;break;case 28:e.prev=28,e.t2=e.catch(0),ko("[consent-check] error on checkIfAdsDisabledByConsent",e.t2.message);case 31:return e.abrupt("return",!1);case 32:case"end":return e.stop()}}),e,null,[[0,28]])})))).apply(this,arguments)}function yI(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 wI(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?yI(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yI(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var kI=Q(),xI=null,EI=null,DI=function(){function n(e){var r,i,a,s,o=this;if(R(this,n),T(this,"_whichFrameV2",function(){var e=this;t(this,o);var n=I(window.location.href,!0),r=n.host,i=n.query,a="html5.gamedistribution.com"!==r,s=function(n){return t(this,e),"revision.gamedistribution.com"===n||"uncached-html5.gamedistribution.com"===n}.bind(this),d=s(r);null!=i&&i.gd_sdk_referrer_url&&(d=s(I(i.gd_sdk_referrer_url).host));return this._isMasterGameURL()&&!(this._isTokenGameURL()||a)||d?"loader-frame":"game-frame"}.bind(this)),xI)return xI;xI=this,this.isOpusReady=!1,this.isMidrollPlusExecuted=!1,this.blockedAdsMap={},this.blockingDetectedKey="d8d9b9b63e704668a29559970c1818be",this._defaults=this._getDefaultOptions(),this._extendDefaultOptions(this._defaults,e),this._version=e.version||"0.0.0",this._bridge=this._getBridgeContext(),this._location=new Cy,this._location.print();var d=this._location.get(),u=(null==d||null===(r=d.top)||void 0===r||null===(i=r.domain)||void 0===i?void 0:i.value)||(null==d||null===(a=d.partner.domain)||void 0===a?void 0:a.value),c=null==d||null===(s=d.partner.url)||void 0===s?void 0:s.value;this._parentURL=0===this._bridge.depth?encodeURIComponent(this._bridge.parentURL):this._bridge.parentURL,this._parentURL=this._parentURL||c,this._parentDomain=this._bridge.parentDomain,this._topDomain=this._bridge.topDomain,this._topDomain=this._topDomain||u,yo("locs found:",this._topDomain,this._parentURL),this._isFullScreen=!1,this._giftCount={preroll:0,midroll:0,rewarded:0},this._mplus_count=0,Yw({whichFrame:this._whichFrameV2(),options:{showAd:this.showAd.bind(this),onEvent:this._onEvent.bind(this)}}),this._setConsoleBanner(),this._initializeMessageRouter(),this._checkConsole(),this._subscribeToEvents(),this.sdkReady=new Promise(this._initializeSDKWithGameData.bind(this)),this.sdkReady.then(function(e){t(this,o),this._sdk_ready=!0}.bind(this)).catch(function(e){t(this,o),this._sdk_ready=!1}.bind(this)).finally(function(){var e,n,r,i,a=this;if((t(this,o),null===(e=this._gameData)||void 0===e||null===(n=e.directTokenUse)||void 0===n?void 0:n.enabled)&&this._blockDirectTokenURLEmbedding().blocked)return;this.dumper=new mR({msgrt:this.msgrt,gameData:this._gameData,parentDomain:this._parentDomain,parentURL:this._parentURL,topDomain:this._parentURL}),this.dumper,this._initGameSessionTracking(),this._sendLoadedEvent(2),!0===(null===(r=this._gameData.lp)||void 0===r?void 0:r.load)&&this._sendLoadedEvent(1),this._sendLoaderDataEvent(),this._checkSplashAndPromoScreens(),this._initBlockingExternals(),this._initUnityHandler(),this._checkFullscreen(),null!==(i=this._gameData.evnts)&&void 0!==i&&i.enabled&&this._isLoaderGameURL()&&(!function(e){var n=this;if(!window[HR]){var r=zR("https://static.gamedistribution.com/message/index.html",HR);if(document.body.appendChild(r),window!==window.top){var i=[WR(e,"TokenGenerated"),WR(e,"PageLoaded")];r.onload=function(){var e=this;return t(this,n),i.forEach(function(n){return t(this,e),XR(n)}.bind(this))}.bind(this),KR(e)}window.addEventListener("message",function(e){return t(this,n),YR(e)}.bind(this),!1)}}(this._gameData),this._gameData.evnts.gameId===this.options.gameId&&setInterval(function(){t(this,a),this._send_gametag_data("heartbeat")}.bind(this),1e3*this._gameData.evnts.heartbeatDuration)),tI.init(this),this._send_gametag_data("sdk_init"),this.fixScore(),this._stableAdFlowForTest(),hk({onEvent:function(e){t(this,a);var n=e.name,r=e.data;(this._onEvent({name:n,message:"In Game Store : ".concat(n),status:"success",data:r,isStoreEvent:!0}),"STORE_UI_VISIBILITY_CHANGED"===n)&&(r.visible?this.onPauseGame("In game store opened","success"):this.onResumeGame("In game store closed","success"))}.bind(this)})}.bind(this)),this._registerSGBridge(),yo("which-frame",this._whichFrame()),this._loadLocus()}var i,g,A,b,y,O,P,L,B,M,F,j,N,q,V,Q,z,W,K,Y,J,X;return S(n,[{key:"_stableAdFlowForTest",value:function(){try{(h.available&&h.getBoolean("gd_debug_ex")&&h.getBoolean("gd_tag")||lR().useTestAds)&&(this._gameData.adflw.adapters={default:["ima"],preroll:["ima"],midroll:["ima"],rewarded:["ima"]},console.log(this._gameData))}catch(e){console.log(e.message)}}},{key:"_getVisitorId",value:(X=e(r.mark((function e(){var n,i,a,s,o,d=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,lI({handler:function(){return t(this,d),!!EI}.bind(this),timeout:1e3,interval:10});case 2:return s=e.sent,o=s?null===(n=EI)||void 0===n||null===(i=n.visitor)||void 0===i||null===(a=i.visitorData)||void 0===a?void 0:a.visitorId:"noVisitorId",e.abrupt("return",o);case 5:case"end":return e.stop()}}),e,this)}))),function(){return X.apply(this,arguments)})},{key:"_initGameSessionTracking",value:(J=e(r.mark((function e(){var n,i,a,s,o,d,u,c,l,h,p,f,m,v,g,A,b,_,y,w,k,x,E,D,S,R,T,I,C,O,P,L=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null===(n=this._gameData)||void 0===n||null===(i=n.gs_trc)||void 0===i?void 0:i.enabled){e.next=3;break}return e.abrupt("return");case 3:return e.next=5,this._getVisitorId();case 5:p=e.sent,f=this._gameData,m=f.category,v=f.dname,g=f.pname,A=f.gameId,b=f.slug,_=f.title,y=f.ctry,w=f.failed,k=this._topDomain||this._parentDomain,x=new Cy,E=x.get(),D=this.msgrt._ua,S=document.referrer,R=this.msgrt._layout,T=Ao.version,I=(null===(a=this._gameData)||void 0===a||null===(s=a.hwei)||void 0===s?void 0:s.enabled)&&(null===(o=this._gameData)||void 0===o||null===(d=o.hwei)||void 0===d?void 0:d.gs.enabled),C=(null===(u=this._gameData)||void 0===u||null===(c=u.gft)||void 0===c?void 0:c.midroll.enabled)||!1,O=(null===(l=this._gameData)||void 0===l||null===(h=l.midroll_plus)||void 0===h?void 0:h.enabled)||!1,P={args:{rfr:S,category:m,dname:v,pname:g,gameId:A,slug:b,title:_,ctry:y,domain:k,loc:E,ua:D,layout:R,version:T,visitorId:p,hasGft:C,hasMp:O,failed:w,isHwp:I},onError:function(e){t(this,L),this._sendSDKError(e)}.bind(this)},oT(P);case 21:case"end":return e.stop()}}),e,this)}))),function(){return J.apply(this,arguments)})},{key:"_initUnityHandler",value:function(){var e=this;window.addEventListener("DOMNodeInserted",function(){if(t(this,e),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))}},{key:"_send_gametag_data",value:(Y=e(r.mark((function e(t){var n;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this._getGdModeIfExist()&&(n=c()||"web",this.adInstance._send("tg.created",{gmid:this.options.gameId,dvc:n,qint:t}));case 1:case"end":return e.stop()}}),e,this)}))),function(e){return Y.apply(this,arguments)})},{key:"_loadCMP",value:(K=e(r.mark((function e(){var t,n,i,a,s,o;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._isMasterGameURL()){e.next=12;break}if(i=new Cy,0!==(null==(a=i.get("depth"))?void 0:a.value)||null===(t=this._gameData)||void 0===t||null===(n=t.cmp)||void 0===n||!n.enabled){e.next=12;break}if(null===(s=this._gameData)||void 0===s||null===(o=s.cmp)||void 0===o||!o.checkDepthOnly){e.next=9;break}return e.next=7,LR();case 7:e.next=12;break;case 9:if("html5.gamedistribution.com"!==this._topDomain){e.next=12;break}return e.next=12,LR();case 12:case"end":return e.stop()}}),e,this)}))),function(){return K.apply(this,arguments)})},{key:"testConsent",value:function(){try{SR();e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,RR({});case 2:e.sent;case 3:case"end":return e.stop()}}),e)})))()}catch(e){console.log("find CMP error",e)}}},{key:"_sendLoaderDataEvent",value:function(){try{this.options.onLoaderEvent&&this.options.onLoaderEvent({name:"LOADER_DATA",message:{game:this._gameData,bridge:this._bridge},status:this._sdk_ready?"success":"error"})}catch(e){}}},{key:"_registerSGBridge",value:function(){var e=this;BR.on("splash-hidden",function(n){t(this,e),this._hideCMPButton()}.bind(this))}},{key:"_hideCMPButton",value:function(){var e=document.getElementById("ot-sdk-btn-floating");e&&(e.style.display="none")}},{key:"_sendLoadedEvent",value:function(e){if(this._isLoaded||(this._isLoaded={}),!this._isLoaded[e]){this._isLoaded[e]=!0;var t="loader-frame"===this._whichFrame()&&(this._isHostHTML5Domain()||this._isExternalHoster());I(location.href,!0);if(this._whichFrame(),this._isMasterGameURL(),this._isExtHostedGameURL(),this._isTokenGameURL(),this._isHostHTML5Domain(),this._isExternalHoster(),location.href,document.referrer,t)try{yo("which-frame, sending tunnel event",this._whichFrame()),this._sendTunnlEvent(e),this.msgrt.send("loaded",{message:this._hasBlocker?"Has Blocker":"No Blocker"})}catch(e){}}}},{key:"_sendGamedockGamePlay",value:function(){var e=this._isTokenGameURL();if(!(this._gameData.loader.enabled&&e||this._gameDockGamePlaySent))try{this._sendGamedockEvent("gameplay"),this._gameDockGamePlaySent=!0}catch(e){}}},{key:"_safeInit",value:function(){this._checkUserDeclinedTracking(),this._checkWhitelabelPartner();var e=this._gameData.diagnostic;void 0!==e&&void 0!==e.close_ga&&!1!==e.close_ga||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||(console.log("noMinijuegosSDK",!this._bridge.isCoreSDKMode,!this._bridge.noMinijuegosSDK,document.location.search.indexOf("mp_game_id")>=0),!this._bridge.isCoreSDKMode&&!this._bridge.noMinijuegosSDK&&document.location.search.indexOf("mp_game_id")>=0&&this._loadMiniJuegosGratisTracker())}},{key:"_initializeSDKWithGameData",value:(W=e(r.mark((function e(n,i){var a,s,o,d,u,c,l=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this._getGameData();case 3:return this._gameData=e.sent,e.next=6,this._loadCMP();case 6:return this._bridge.isCoreSDKMode=(null===(a=this._gameData.disableAds)||void 0===a?void 0:a.default)||!1,this._safeInit(),this._checkGameId(),this._checkGameDeleted(),this._checkBlocking(),this._changeMidrollInDebugMode(),d=void 0===this._gameData.diagnostic||void 0===(null===(s=this._gameData.diagnostic)||void 0===s?void 0:s.close_ads)||!1===(null===(o=this._gameData.diagnostic)||void 0===o?void 0:o.close_ads),e.next=15,bI();case 15:return u=e.sent,wo("[ad-system-init] allowed",{adSystemInitAllowed:c=d&&!u,notDisabledByModuleClose:d,disabledByConsent:u}),c&&(this.videoAdReady=this._initializeVideoAd().then(function(){t(this,l),(this._isMasterGameURL()||this._isExtHostedGameURL())&&(this.msgrt.send("adblocker.flw",{message:"ok"}),this.msgrt.send("adblocker.adapters",{message:"none"})),this._checkAdBlockerRemoval()}.bind(this)).catch(function(e){t(this,l);var n="".concat(e).startsWith("Error: Blocked:");wo("gd-adflow adsBlocked",n,e);var r=this.get_ad_system_init_result(),i=r.ima,a=r.afg;if(this.adsBlocked=!i&&!a,this._isMasterGameURL()||this._isExtHostedGameURL()){this.msgrt.send("adblocker.flw",{message:"".concat(this.adsBlocked?"blocked":"ok")});var s=i||a?i?a?"none":"adsense":"ima":"all";this.msgrt.send("adblocker.adapters",{message:"".concat(s)})}this._sendSDKError(e),this._checkAdBlocker(),console.error(e.message||e)}.bind(this))),e.next=21,ET();case 21:n(this._gameData),e.next=29;break;case 24:e.prev=24,e.t0=e.catch(0),this._sendSDKError(e.t0),this.onResumeGame(e.t0.message,"warning"),i(e.t0);case 29:case"end":return e.stop()}}),e,this,[[0,24]])}))),function(e,t){return W.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:"_checkAdBlockerRemoval",value:function(){h.getBoolean(this.blockingDetectedKey)&&(h.set(this.blockingDetectedKey,!1),this.send_atom_event("ad-blocker-removed"))}},{key:"_checkAdBlocker",value:(z=e(r.mark((function e(){var t,n,i,a,s;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,t=this.get_ad_system_init_result(),n=t.ima,i=t.afg,n&&i){e.next=12;break}if(h.set(this.blockingDetectedKey,!0),null===(a=this._gameData.rmblck)||void 0===a||!a.enabled){e.next=12;break}if(this.adBlockerPage){e.next=12;break}return e.next=9,rI();case 9:s=e.sent,this.adBlockerPage=new s(this._gameData),this.adBlockerPage.add();case 12:e.next=17;break;case 14:e.prev=14,e.t0=e.catch(0),console.log(e.t0.message);case 17:case"end":return e.stop()}}),e,this,[[0,14]])}))),function(){return z.apply(this,arguments)})},{key:"_extendDefaultOptions",value:function(e,t){var n=U(e);this.options=t?p(n,t):n,this.options.gameId=this.options.gameId.trim()}},{key:"_setConsoleBanner",value:function(){if(!this._bridge.noConsoleBanner){var e=Ao.version,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:"_shouldSendTunnlEvent",value:function(e){return this.tunnlEventCounts||(this.tunnlEventCounts={}),this.tunnlEventCounts[e]||(this.tunnlEventCounts[e]=0),this.tunnlEventCounts[e]++,1===this.tunnlEventCounts[e]}},{key:"_sendTunnlEvent",value:function(n){var i=this;e(r.mark((function e(){var a,s,o,d,u,c=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,nk();case 2:if(!(a=e.sent)){e.next=9;break}return e.next=6,a.isLoader();case 6:e.t0=e.sent,e.next=10;break;case 9:e.t0=!0;case 10:if(s=e.t0,o=a.hasRouter(),s||!o){e.next=15;break}return e.abrupt("return");case 15:if(i._shouldSendTunnlEvent(n)){e.next=17;break}return e.abrupt("return");case 17:void 0!==i._topDomain&&"undefined"!==i._topDomain||(i._topDomain=void 0),d=i._topDomain||i._parentDomain,u={page_url:d,game_id:i.options.gameId,eventtype:n,ts:Date.now()},fetch("https://hlana.gamedistribution.com/event?".concat(H.stringify(u))).catch(function(e){t(this,c),i._sendHLAnalyicsLog({query:wI(wI({},u),{},{error:null==e?void 0:e.message}),eventType:-n})}.bind(this)),i._sendHLAnalyicsLog({query:u,eventType:n}),i.adInstance._send_atom_event("hl.config",u),i._send_gametag_data("sdk_gameplay");case 24:case"end":return e.stop()}}),e,this)})))()}},{key:"_sendHLAnalyicsLog",value:function(e){var t,n=e.query,r=e.eventType;if(1===r?t="hl.gameplay":2===r?t="hl.gameload":3===r?t="hl.adblock":-1===r?t="hl.gameplay.error":-2===r?t="hl.gameload.error":-3===r&&(t="hl.adblock.error"),t)try{this.dumper.send_atom_event(t,n)}catch(e){console.log("Error on sending dump!",e)}}},{key:"_sendAdRequestContext",value:function(e){this.msgrt.send("adctx",{message:e.adTag.bidder})}},{key:"_checkWhitelabelPartner",value:function(){this._whitelabelPartner=!1;var e=d("xanthophyll");e.hasOwnProperty("xanthophyll")&&"true"===e.xanthophyll&&(this._whitelabelPartner=!0,f("White label publisher","".concat(this._whitelabelPartner),"success"))}},{key:"_checkRevisionOrigin",value:function(){var e=this;return[document.location.origin].concat(G(document.location.ancestorOrigins)).find(function(n){return t(this,e),"revision.gamedistribution.com"===I(n,!0).hostname}.bind(this))}},{key:"_checkConsole",value:function(){try{if(!h.available)return;if("developer.gamedistribution.com"===this._parentDomain||"developer.gamedistribution.com"===this._topDomain||"developer-acc.gamedistribution.com"===this._parentDomain||"developer-acc.gamedistribution.com"===this._topDomain)this._checkRevisionOrigin()&&(h.set("gd_debug_ex",!0),h.set("gd_disable_midroll_timer",!0),h.set("gd_tag",!0));else"localhost:3000"===this._parentDomain&&(h.set("gd_debug_ex",!0),h.set("gd_disable_midroll_timer",!0));h.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 l({gameId:this.options.gameId,hours:(new Date).getHours(),topDomain:this._topDomain,domain:this._parentDomain,referrer:this._parentURL,depth:o(),version:Ao.version,tracking:this._userDeclinedTracking,whitelabel:this._whitelabelPartner,platform:c(),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 e=this;try{var n=[this._gameData.gmky.url];m(n[0],"GamedockSDK",{alternates:n}).then(function(){var n,r,i,a;(t(this,e),EI=this._initGamedockTracker(window.GamedockSDK),this._sendGamedockEvent("pageview"),null!==(n=this._gameData.diagnostic)&&void 0!==n&&null!==(r=n.gameDock)&&void 0!==r&&r.adViewEvent)&&(null!==(i=this._gameData.diagnostic)&&void 0!==i&&null!==(a=i.gameDock)&&void 0!==a&&a.heartbeatEnable&&EI.tracking.enableHeartBeatForPage({pageId:this.options.gameId,pageType:"game"},this._gameData.diagnostic.gameDock.heartbeatConfig));TR.track(EI,this._gameData)}.bind(this)).catch(function(n){t(this,e),this._sendSDKError(n)}.bind(this))}catch(e){}}},{key:"_initGamedockTracker",value:function(e){if(!this._bridge.isCoreSDKMode)return e.initialize("gd",this._parentDomain)}},{key:"_sendGamedockEvent",value:function(e){var t,n;null===(t=EI)||void 0===t||null===(n=t.tracking)||void 0===n||n.trackEvent(e,{pageId:this.options.gameId,pageType:"game"})}},{key:"_loadMiniJuegosGratisTracker",value:function(){var e=this;window.mpConfig={game:this.options.gameId,partner:"game-distribution"};var n=["https://ext.minijuegosgratis.com/external-host/main.js"];console.log("noMinijuegosSDK loading"),m(n[0],"MinijuegosSDK",{alternates:n}).catch(function(n){t(this,e),this._sendSDKError(n)}.bind(this))}},{key:"_loadLocus",value:function(){var n=e(r.mark((function e(){var n,i=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,qw();case 2:if(e.sent){e.next=6;break}return console.log("locus-disabled"),e.abrupt("return");case 6:n=["https://pm.azerioncircle.com/p/locus/"],window.gdlocus=window.gdlocus||{cmd:[]},window.gdlocus.cmd.push(function(){t(this,i),this.isOpusReady=!0,window.gdlocus.iservice.register({method:"muteAdFlow",handler:this._muteFlowSound.bind(this)}),window.gdlocus.iservice.register({method:"terminateAdFlow",handler:this._terminateFlow.bind(this)})}.bind(this)),m(n[0],"locus",{alternates:n}).catch(function(e){t(this,i),this._sendSDKError(e)}.bind(this)).then(function(){t(this,i)}.bind(this));case 10:case"end":return e.stop()}}),e,this)})));return function(){return n.apply(this,arguments)}}()},{key:"_muteFlowSound",value:(Q=e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._adFlow){e.next=2;break}return e.abrupt("return");case 2:this._adFlow.mute();case 3:case"end":return e.stop()}}),e,this)}))),function(){return Q.apply(this,arguments)})},{key:"_terminateFlow",value:(V=e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._adFlow){e.next=2;break}return e.abrupt("return");case 2:this._adFlow.terminate();case 3:case"end":return e.stop()}}),e,this)}))),function(){return V.apply(this,arguments)})},{key:"_loadGoogleAnalytics",value:function(){var e=this;if(!this._bridge.isCoreSDKMode){var n=this._gameData,r=n.gameId,i=n.slug,a=n.title,s=new Cy,o={provider:"gd-sdk",page_depth:s.get("depth.value"),partner_domain_from:s.get("partner.domain.from"),top_domain_from:s.get("top.domain.from"),top_domain:this._topDomain,parent_domain:this._parentDomain,parent_url:this._parentURL,game_id:r,game_slug:i,game_title:a};dI({onError:function(n){t(this,e),this._sendSDKError(n)}.bind(this),args:o})}}},{key:"_getCleanUrl",value:function(e){var t=e;try{var n=new I(e,!0);t="".concat(n.protocol,"//").concat(n.hostname,"/").concat(n.pathname)}catch(e){}return t}},{key:"_subscribeToEvents",value:function(){var e=this;this.eventBus=new _,w.forEach(function(n){var r=this;return t(this,e),this.eventBus.subscribe(n,function(e){return t(this,r),this._onEvent(e)}.bind(this),"sdk")}.bind(this)),k.forEach(function(n){var r=this;return t(this,e),this.eventBus.subscribe(n,function(e){return t(this,r),this._onEvent(e)}.bind(this),"ima")}.bind(this)),this.eventBus.subscribe("COMPLETE",function(){t(this,e);var n=this._getDeveloperDomains(),r=n.developerDomain,i=n.gameApiDomain;if(r){fetch("https://".concat(i,"/game/v2/hasapi/").concat(this.options.gameId,"?timestamp=").concat((new Date).valueOf()));try{var a=JSON.stringify({type:"GD_SDK_IMPLEMENTED",gameID:this.options.gameId});window.location!==window.top.location?window.top.postMessage(a,"*"):null!==window.opener&&window.opener.location!==window.location&&window.opener.postMessage(a,"*")}catch(e){}}cR()}.bind(this),"ima"),this.eventBus.subscribe("CONTENT_PAUSE_REQUESTED",function(){return t(this,e),this.onPauseGame("New advertisements requested and loaded","success")}.bind(this),"ima"),this.eventBus.subscribe("IMPRESSION",function(n){var r,i;t(this,e),this.msgrt.send("ad.impression"),oR(),null!==(r=this._gameData.diagnostic)&&void 0!==r&&null!==(i=r.gameDock)&&void 0!==i&&i.adViewEvent&&TR.track(EI,this._gameData)}.bind(this),"ima"),this.eventBus.subscribe("AD_ERROR",function(n){t(this,e),this.msgrt.send("ad.error",{message:n.message,details:n.details})}.bind(this),"ima"),this.eventBus.subscribe("AD_SDK_REQUEST",function(n){t(this,e),this._sendAdRequestContext(n.message)}.bind(this),"sdk"),this.eventBus.subscribe("SDK_ERROR",function(n){if(t(this,e),n.message.startsWith("Blocked:")){var r=n.message.replace("Blocked:","").trim(),i=this._getCleanUrl(r),a="Blocked: ".concat(i);if(!this._bridge.noBlockerEvent&&(this.msgrt.send("error",{message:a}),!this._hasBlocker)){this._hasBlocker=!0;this.msgrt.send("adblck.src",{message:a});var s=this.get_ad_system_init_result(),o=s.ima,d=s.afg;(!o||!d)&&this._sendTunnlEvent(3)}}else this.msgrt.send("error",{message:n.message})}.bind(this),"sdk"),this.eventBus.subscribe("AD_REQUEST_KEYS_EMPTY",function(n){t(this,e),this.msgrt.send("tunnl.keys.empty",{message:n.message,details:n.details})}.bind(this),"sdk"),this.eventBus.subscribe("AD_REQUEST_KEYS_FALLBACK",function(n){t(this,e),this.msgrt.send("tunnl.keys.fallback",{message:n.message,details:n.details})}.bind(this),"sdk"),this.eventBus.subscribe("AD_T4R",function(n){return t(this,e),this.msgrt.send("adt4r")}.bind(this),"sdk")}},{key:"_checkGameId",value:function(){this.options.gameId===this._defaults.gameId&&this._sendSDKError("Please check if your GAME ID is correct. Otherwise, no revenue will be reported.")}},{key:"_getDefaultGameData",value:function(){return{gameId:this.options.gameId,disableAds:{},preroll:!0,midroll:12e4,rewardedAds:!1,title:"",tags:[],category:"",assets:[],dmain:!0,sdk:{},loader:{},splash:{},promo:{},dAds:{},pAds:{},mAds:{},rAds:{}}}},{key:"_getGameDataUrl",value:function(){var e=void 0!==this._topDomain&&"undefined"!==this._topDomain?this._topDomain:this._parentDomain,t=aw().config;return"https://".concat(t.gameAPI,"/game/v4/get/").concat(this.options.gameId.replace(/-/g,""),"/?domain=").concat(e,"&v=").concat(Ao.version,"&localTime=").concat((new Date).getHours())}},{key:"_checkBlocking",value:(q=e(r.mark((function e(){var t,n,i;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=!0,n=this._gameData,i=this._topDomain.indexOf("gamedistribution.com")>=0,t=(t=void 0===this._gameData.dmain||this._gameData.dmain)||i,(n.bloc_gard&&!0===n.bloc_gard.enabled||!t)&&this._redirectToBlocking(!1,!t);case 7:case"end":return e.stop()}}),e,this)}))),function(){return q.apply(this,arguments)})},{key:"_blockDirectTokenURLEmbedding",value:function(){var e,t,n=this._checkTokenGameUrl(),r=new Cy,i="html5.gamedistribution.com"!==I(document.referrer).host,a=n&&!nI.SDKExistsOnUpperFrame&&r.get("depth.value")>0&&i;if(a&&(null===(e=this._gameData)||void 0===e||null===(t=e.directTokenUse)||void 0===t?void 0:t.enabled)){var s,o,d=null===(s=this._gameData)||void 0===s||null===(o=s.directTokenUse)||void 0===o?void 0:o.behavior;"to-loader"===d?this._redirectToLoaderFrame():"to-blocked-page"===d&&this._redirectToBlocking(!0)}return{blocked:a}}},{key:"_redirectToBlocking",value:function(t){var n=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.msgrt.send("blocked");var a=this._gameData;setTimeout(e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t){e.next=9;break}return e.prev=1,e.next=4,n.adInstance._send_atom_event("token-blocked");case 4:e.next=9;break;case 6:e.prev=6,e.t0=e.catch(1),console.log("Could not send dump.token-blocked",e.t0);case 9:window.location.href="https://html5.api.gamedistribution.com/blocked.html?".concat(H.stringify({domain:n._parentDomain,id:a.gameId,img:n._get_game_thumbnail_url(),title:a.title,unregistered:i,utm_source:n._parentDomain,utm_medium:(null==a?void 0:a.slug)||(null==a?void 0:a.title)||(null==a?void 0:a.gameId)||"unknown",utm_campaign:"block-and-redirect"}));case 10:case"end":return e.stop()}}),e,null,[[1,6]])}))),100)}},{key:"_redirectToLoaderFrame",value:function(){var t=this,n=this._gameData;setTimeout(e(r.mark((function e(){var i,a,s,o;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t.adInstance._send_atom_event("loader-redirect");case 3:e.next=8;break;case 5:e.prev=5,e.t0=e.catch(0),console.log("Could not send dump.loader-redirect",e.t0);case 8:i=I(location.href,!0),a=wI(wI({},i.query),{},{rd:"1"}),s=H.stringify(a),o="https://html5.gamedistribution.com/".concat(n.gameId,"/?").concat(s),window.location.href=o;case 13:case"end":return e.stop()}}),e,null,[[0,5]])}))),100)}},{key:"_checkGameDeleted",value:function(){var e=this;6!==this._gameData.status&&4!==this._gameData.activeStatus||(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(){t(this,e),document.location="https://html5.api.gamedistribution.com/deleted.html"}.bind(this),100))}},{key:"_changeMidrollInDebugMode",value:function(){var e=this._gameData;lR().disableMidrolltimer?e.midroll=0:h.available&&h.getBoolean("gd_debug_ex")&&(h.getBoolean("gd_disable_midroll_timer")?e.midroll=0:e.midroll=this._getDefaultGameData().midroll)}},{key:"_checkSplashAndPromoScreens",value:function(){var e,t,n,r;!1===(null===(e=this._gameData.loader)||void 0===e?void 0:e.mobile)&&this._getisMobile()&&(this._gameData.loader.enabled=!1);var i,a=this._gameData,s=a.gdpr&&!0===a.gdpr.consent,o=a.loader,d=null===(t=a.promo)||void 0===t?void 0:t[null===(n=a.promo)||void 0===n||null===(r=n.template)||void 0===r?void 0:r.preroll];(a.preroll||(this.adRequestTimer=Date.now()),this.options.loader.enabled)?null!=d&&d.enabled?this._createPromoBeforeSplash(a,s):o.enabled&&!0!==(null===(i=o.splash)||void 0===i?void 0:i.skip)?this._createSplash(a,s):this.onResumeGame("Skipped splash.","success"):o.enabled||this._bridge.isTokenGameURL&&this._bridge.isExtHostedGameURL||(this.options.advertisementSettings.autoplay||s?null!=d&&d.enabled?this._createPromoBeforeSplash(a,s):!1!==o.enabled&&this._createSplash(a,s):null!=d&&d.enabled&&this._createPromo(a,s))}},{key:"_initializeVideoAd",value:(N=e(r.mark((function e(){var t;return r.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=p(this.options.advertisementSettings,t.sdk)),this.macros=new x({game:t,bridge:this._bridge}),this.adInstance=new _R(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,this.adInstance.PackageJSON=Ao,this.adInstance._send_atom_event("gd.location"),e.next=17,this.adInstance.start();case 17:case"end":return e.stop()}}),e,this)}))),function(){return N.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){f("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){f("DEVELOPER_ERROR",e.message,"warning")}}},{key:"IscForwardOnEvent",value:(j=e(r.mark((function e(t){var n,i,a,s,o;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=!1,e.prev=1,e.next=4,nk();case 4:if(!(i=e.sent)){e.next=14;break}return e.next=8,i.isLoader();case 8:if(o=e.sent,!((null===(a=this._gameData)||void 0===a||null===(s=a.isv_fw)||void 0===s?void 0:s.enabled)&&o&&i.onEvent)){e.next=14;break}return n=!0,i.onEvent({event:t}),e.abrupt("return",n);case 14:e.next=19;break;case 16:e.prev=16,e.t0=e.catch(1),yo("[GD-IS] error on onEvent forward",e.t0);case 19:return e.abrupt("return",n);case 20:case"end":return e.stop()}}),e,this,[[1,16]])}))),function(e){return j.apply(this,arguments)})},{key:"_onEvent",value:(F=e(r.mark((function e(t){var n,i;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.IscForwardOnEvent(t);case 2:if(!e.sent){e.next=5;break}return e.abrupt("return");case 5:if(yo("[GD-IS] onEvent executing",{event:null==t?void 0:t.name,e:t,location:window.location.href}),f(t.name,t.message,t.status),!t.skipForward){e.next=9;break}return e.abrupt("return");case 9:wo("[developer-event]".concat(t.isStoreEvent?"[store]":""),{name:t.name,data:t.data||{},source:"core"}),null!==(n=this._gameData)&&void 0!==n&&null!==(i=n.evnts)&&void 0!==i&&i.enabled&&QR({event:t.name,game:this._gameData});try{this.options.onEvent({name:t.name,message:t.message,status:t.status,data:t.data||{},isStoreEvent:t.isStoreEvent||!1,skipForward:t.skipForward,adPosition:t.adPosition})}catch(e){f("DEVELOPER_ERROR",e.message,"warning")}case 12:case"end":return e.stop()}}),e,this)}))),function(e){return F.apply(this,arguments)})},{key:"_getGameData",value:(M=e(r.mark((function e(){var t;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Lw();case 2:return t=e.sent,this.msgrt.setGameData(t),E(t.diagnostic),e.abrupt("return",t);case 6:case"end":return e.stop()}}),e,this)}))),function(){return M.apply(this,arguments)})},{key:"_createSplash",value:(B=e(r.mark((function n(i,a){var s,o,d,u,c=this;return r.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,this._getSplashTemplate(i);case 2:return s=n.sent,o=new s(wI(wI({},this.options),{},{isConsentDomain:a,version:Ao.version}),i,this._parentDomain),n.next=6,Vw();case 6:d=n.sent,u=d.enabled,o.on("playClick",function(){var n,s,d,l=this;if(t(this,c),((null===(n=window.gdlocus)||void 0===n?void 0:n.firstUserAction)||e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:console.log("gd-adflow locus-first-user-action is not defined");case 1:case"end":return e.stop()}}),e)}))))({game_id:i.gameId}).catch(function(e){t(this,l),console.log("gd-adflow locus-first-user-action error",e)}.bind(this)),a){var h=new Date;h.setDate(h.getDate()+90),document.cookie="ogdpr_tracking=1; expires=".concat(h.toUTCString(),"; path=/")}if(this._hideCMPButton(),cT("play"),u)window.gdsdk.showAd(v.Interstitial,{position:"preroll"}).catch(function(e){t(this,l),o.hide()}.bind(this));else{var p={position:"preroll"};(function(){t(this,l),xo.firstAdapterModeAdsense&&(console.log("promo-test, set first adapter to adssense 1"),p.adapter="adsense")}).bind(this),this.showAd(v.Interstitial,p).catch(function(e){t(this,l)}.bind(this))}null!==(s=this._gameData)&&void 0!==s&&null!==(d=s.evnts)&&void 0!==d&&d.enabled&&(QR({event:"FirstInteraction",game:this._gameData}),this._send_gametag_data("first_interaction"))}.bind(this)),this.onPauseGame("Pause the game and wait for a user gesture","success"),this.eventBus.subscribe("SDK_GAME_PAUSE",function(){t(this,c),o.hide()}.bind(this)),this.eventBus.subscribe("SDK_GAME_START",function(){t(this,c),o.hide()}.bind(this));case 12:case"end":return n.stop()}}),n,this)}))),function(e,t){return B.apply(this,arguments)})},{key:"_createPromoBeforeSplash",value:(L=e(r.mark((function e(n,i){var a,s,o,d,u=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this._createPrerollPromoTemplate(n);case 3:o=e.sent,(d=new o(wI(wI({},this.options),{},{isConsentDomain:i,version:Ao.version,template:null===(a=n.promo)||void 0===a||null===(s=a.template)||void 0===s?void 0:s.preroll}),n)).on("done",function(){t(this,u),d.hide(),this._createSplash(n,i)}.bind(this)),d.on("promoButtonClicked",function(){t(this,u),d.hide(),this.onResumeGame("Resumed after the promo","warning")}.bind(this)),e.next=13;break;case 9:e.prev=9,e.t0=e.catch(0),console.log(e.t0),this._createSplash(n,i);case 13:case"end":return e.stop()}}),e,this,[[0,9]])}))),function(e,t){return L.apply(this,arguments)})},{key:"_createPromo",value:(P=e(r.mark((function e(n,i){var a,s,o,d,u=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this._createPrerollPromoTemplate(n);case 3:o=e.sent,(d=new o(wI(wI({},this.options),{},{isConsentDomain:i,version:Ao.version,template:null===(a=n.promo)||void 0===a||null===(s=a.template)||void 0===s?void 0:s.preroll}),n)).on("done",function(){t(this,u),d.hide(),this.onResumeGame("Resumed after the promo","warning")}.bind(this)),d.on("promoButtonClicked",function(){t(this,u),d.hide(),this.onResumeGame("Resumed after the promo","warning")}.bind(this)),this.onPauseGame("Pause the game for the promo","success"),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(0),this.onResumeGame("Resumed after the promo","warning");case 13:case"end":return e.stop()}}),e,this,[[0,10]])}))),function(e,t){return P.apply(this,arguments)})},{key:"showBanner",value:function(){var e=this;this.showAd(v.Interstitial).catch(function(){t(this,e)}.bind(this))}},{key:"IscForwardShowAd",value:(O=e(r.mark((function e(t){var n,i,a,s,o,d,u,c,l,h=arguments;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=h.length>1&&void 0!==h[1]?h[1]:{},s={forwarded:i=!1,result:a},e.prev=3,null===(o=this._gameData)||void 0===o||null===(d=o.isv_fw)||void 0===d?void 0:d.enabled){e.next=7;break}return e.abrupt("return",s);case 7:return e.next=10,nk();case 10:if(u=e.sent){e.next=13;break}return e.abrupt("return",s);case 13:return e.next=16,u.isLoader();case 16:if(c=e.sent,l=u.hasRouter(),c||!l){e.next=26;break}return wo("[GD-IS] forwarding ad call",{location:window.location.href}),i=!0,e.next=25,u.showAd({adType:t,params:n});case 25:a=e.sent;case 26:e.next=32;break;case 29:e.prev=29,e.t0=e.catch(3),yo("[GD-IS] error on showAd forward",e.t0);case 32:return e.abrupt("return",{forwarded:i,result:a});case 33:case"end":return e.stop()}}),e,this,[[3,29]])}))),function(e){return O.apply(this,arguments)})},{key:"showAd",value:(y=e(r.mark((function t(n){var i,a=this,s=arguments;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=s.length>1&&void 0!==s[1]?s[1]:{},t.abrupt("return",new Promise(function(){var t=e(r.mark((function e(t,s){var o,d,u,c,l,h,p,f,m;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,e.t0=null===(o=a._gameData)||void 0===o?void 0:o.igs,!e.t0){e.next=6;break}return e.next=5,ik();case 5:e.t0=e.sent;case 6:if(!e.t0){e.next=10;break}return wo("[GD-IS-IGS] store-visible so ad was skipped",{loc:window.location.href}),e.abrupt("return");case 10:return e.next=12,a.IscForwardShowAd(n,i);case 12:if(u=e.sent,c=u.forwarded,l=u.result,!c){e.next=18;break}return t(l),e.abrupt("return");case 18:return cT("play"),h={adType:n||"interstitial",params:i,adTimestamp:a.adRequestTimer},e.next=24,a.sdkReady;case 24:return p=e.sent,e.next=27,a.videoAdReady;case 27:if(null!==(d=a._gameData.lp)&&void 0!==d&&d.load||a._sendLoadedEvent(1),a._sendGamedockGamePlay(),a._rejectAdIfGameBlocked({gameData:p,adRequest:h}),a._rejectAdIfUnsupportedType({adRequest:h}),"rewarded"===n&&a._setGameRewardedFlag(),null!=i&&i.isGift||null!=i&&i.isCompensation||a._rejectAdIfAdRateHits({gameData:p,adRequest:h}),i&&(i.isGift||i.isMidrollPlus||i.isCompensation)||!a.adBlockerPage||(a._setAdRequestTimer(),a.adBlockerPage.show()),a.adInstance.attachAfgPosition(h),!a._autoResumeIfAdsAreDisabled(hT(h))){e.next=39;break}return e.abrupt("return",t());case 39:if(a._rejectAdIfAdDisabled({gameData:p,adRequest:h}),!a.adFlowRunning){e.next=42;break}return e.abrupt("return",t());case 42:return a.adFlowRunning=!0,f=new KT(a),a._adFlow=f,e.next=47,f.runAdFlow(h);case 47:m=e.sent,a.adFlowRunning=!1,a._adFlow=null,t(m),a._post_message({topic:"adrequest.instream"}),e.next=61;break;case 54:e.prev=54,e.t1=e.catch(0),a.adFlowRunning=!1,a._adFlow=null,a.onAdError(e.t1.message),a.onResumeGame(e.t1.message,"warning"),s(e.t1.message);case 61:case"end":return e.stop()}}),e,null,[[0,54]])})));return function(e,n){return t.apply(this,arguments)}}()));case 2:case"end":return t.stop()}}),t)}))),function(e){return y.apply(this,arguments)})},{key:"_autoResumeIfAdsAreDisabled",value:function(e){var t,n=!1,r=null===(t=this._gameData.diagnostic)||void 0===t?void 0:t.close_ads,i=this._gameData.disableAds[e],a=r||i;return yo("gd-adflow autoresume result: adModuleDisabled,adDisabled",r,i,e,this._gameData.diagnostic,this._gameData.disableAds),a&&(this._runAutoResume(),n=!0),n}},{key:"_runAutoResume",value:function(){var e=this,n="CONTENT_PAUSE_REQUESTED",r="CONTENT_RESUME_REQUESTED";this.eventBus.broadcast(n,{name:n,message:"Auto pause when ads are disabled"}),setTimeout(function(){t(this,e),this.eventBus.broadcast(r,{name:r,message:"Auto resume when ads are disabled"}),this.onResumeGame("Advertisement(s) are cancelled. Start / resume the game.","success")}.bind(this),3e3)}},{key:"_giveGift",value:function(e){var t,n,r,i,a,s,o,d,u,c,l,h,p,f,m;switch(e){case"preroll":null!==(t=this._gameData)&&void 0!==t&&null!==(n=t.gft)&&void 0!==n&&n[e].enabled&&(null===(r=this._gameData)||void 0===r||null===(i=r.gft)||void 0===i||null===(a=i[e].durations[this._giftCount[e]])||void 0===a?void 0:a.after)===this.adInstance.adPrerollCount&&this.decideToGiveAGift(e);break;case"midroll":null!==(s=this._gameData)&&void 0!==s&&null!==(o=s.gft)&&void 0!==o&&o[e].enabled&&(null===(d=this._gameData)||void 0===d||null===(u=d.gft)||void 0===u||null===(c=u[e].durations[this._giftCount[e]])||void 0===c?void 0:c.after)===this.adInstance.adMidrollCount&&this.decideToGiveAGift(e);break;case"rewarded":null!==(l=this._gameData)&&void 0!==l&&null!==(h=l.gft)&&void 0!==h&&h[e].enabled&&(null===(p=this._gameData)||void 0===p||null===(f=p.gft)||void 0===f||null===(m=f[e].durations[this._giftCount[e]])||void 0===m?void 0:m.after)===this.adInstance.adRewardedCount&&this.decideToGiveAGift(e)}}},{key:"_setAdRequestTimer",value:function(){this.adRequestTimer=Date.now()}},{key:"clearSession",value:function(){this.adInstance.clearSession()}},{key:"_attachAfgFallback",value:function(e){var t=e.gameData,n=e.adRequest;if(!t.afg_disabled&&!n.params.hasOwnProperty("fallback_adsense"))switch(n.params.position){case"preroll":case"start":case"next":n.params.fallback_adsense=!0}}},{key:"_rejectAdIfGameBlocked",value:function(e){var t=e.gameData;if(t.bloc_gard&&!0===t.bloc_gard.enabled)throw new Error("Game or domain is blocked.")}},{key:"_rejectAdIfAdDisabled",value:function(e){var t=e.gameData,n=hT(e.adRequest);if(t.disableAds[n]||this._whitelabelPartner)throw new Error("Advertisements are disabled.")}},{key:"_rejectAdIfUnsupportedType",value:function(e){var t=e.adRequest;if(t.adType){if(t.adType!==v.Interstitial&&t.adType!==v.Rewarded)throw new Error("Unsupported an advertisement type: ",t.adType)}else t.adType=v.Interstitial}},{key:"_rejectAdIfRewardedDisabled",value:function(e){var t=e.gameData;if(e.adRequest.adType===v.Rewarded&&!t.rewardedAds)throw new Error("Rewarded ads are disabled.")}},{key:"_rejectAdIfAdRateHits",value:function(e){var t,n,r,i,a,s,o=e.gameData,d=e.adRequest,u=null;d.adType===v.Interstitial&&null!==(t=o.diagnostic)&&void 0!==t&&null!==(n=t.useMidrollIndex)&&void 0!==n&&n.enabled&&this.adInstance.noPreroll?this.adInstance.adMidrollCount>(null===(r=o.diagnostic)||void 0===r||null===(i=r.useMidrollIndex)||void 0===i?void 0:i.indexes.length)-1||(u=6e4*(null===(a=o.diagnostic)||void 0===a||null===(s=a.useMidrollIndex)||void 0===s?void 0:s.indexes[this.adInstance.adMidrollCount])):u=o.midroll;if(d.adType===v.Interstitial&&void 0!==this.adRequestTimer&&Date.now()-this.adRequestTimer<u)throw new Error("The advertisement was requested too soon.")}},{key:"preloadAd",value:(b=e(r.mark((function t(n){var i=this;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise(function(){var t=e(r.mark((function e(t,a){var s,o;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,i.sdkReady;case 3:return s=e.sent,e.next=6,i.videoAdReady;case 6:if(!s.bloc_gard||!0!==s.bloc_gard.enabled){e.next=8;break}throw new Error("Game or domain is blocked.");case 8:if(!s.disableAds[n]&&!i._whitelabelPartner){e.next=10;break}throw new Error("Advertisements are disabled for this ad type => ".concat(n,"..."));case 10:if(n){e.next=14;break}n=v.Rewarded,e.next=16;break;case 14:if(n===v.Interstitial||n===v.Rewarded){e.next=16;break}throw new Error("Unsupported an advertisement type:"+n);case 16:if(!i.adInstance){e.next=22;break}return e.next=19,i.adInstance.preloadAd(n);case 19:e.t0=e.sent,e.next=23;break;case 22:e.t0="gdsdk://preloaded";case 23:o=e.t0,t(o),e.next=30;break;case 27:e.prev=27,e.t1=e.catch(0),a(e.t1);case 30:case"end":return e.stop()}}),e,null,[[0,27]])})));return function(e,n){return t.apply(this,arguments)}}()));case 1:case"end":return t.stop()}}),t)}))),function(e){return b.apply(this,arguments)})},{key:"cancelAd",value:(A=e(r.mark((function t(){var n=this;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise(function(){var t=e(r.mark((function e(t,i){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:try{n.adInstance.cancel(),n.onResumeGame("Advertisement(s) are cancelled. Start / resume the game.","success"),i()}catch(e){n.onResumeGame("Advertisement(s) are cancelled. Start / resume the game.","success"),t(e.message)}case 1:case"end":return e.stop()}}),e)})));return function(e,n){return t.apply(this,arguments)}}()));case 1:case"end":return t.stop()}}),t)}))),function(){return A.apply(this,arguments)})},{key:"showDisplayAd",value:function(t){var n=this;return new Promise(function(){var i=e(r.mark((function e(i,a){var s;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,n.sdkReady;case 3:return s=e.sent,e.next=6,n.videoAdReady;case 6:if(!s.dAds.enabled){e.next=13;break}return e.next=9,n.adInstance.loadDisplayAd(t);case 9:n._post_message({topic:"adrequest.display"}),i(),e.next=14;break;case 13:a("Display-Ads are disabled.");case 14:e.next=19;break;case 16:e.prev=16,e.t0=e.catch(0),a(e.t0.message||e.t0);case 19:case"end":return e.stop()}}),e,null,[[0,16]])})));return function(e,t){return i.apply(this,arguments)}}())}},{key:"onResumeGame",value:function(e,t){var n,r;try{this._allowExternals({enabled:!1}),this.options.resumeGame()}catch(e){console.log("gd-adflow error onResumeGame",e),f("DEVELOPER_ERROR",e.message,"warning")}var i="SDK_GAME_START";this.eventBus.broadcast(i,{name:i,message:e,status:t,analytics:{category:"SDK",action:i,label:this.options.gameId+""},adPosition:null===(n=this.adInstance)||void 0===n?void 0:n._findAdPosition()}),this.adInstance&&this.adInstance._hideAddResume(),this.adInstance&&this.adInstance._hideAdSpinner(),this.adInstance&&this.adInstance._clearTimeoutForSkipAddButton(),null===(r=this._gameData.evnts)||void 0===r||!r.enabled||this._isMasterGameURL()&&!this._isExtHostedGameURL()||(QR({event:"GameStarted",game:this._gameData}),this._send_gametag_data("game_started"))}},{key:"onPauseGame",value:function(e,t){var n;this._allowExternals({enabled:!0});try{this.options.pauseGame()}catch(e){f("DEVELOPER_ERROR",e.message,"warning")}var r="SDK_GAME_PAUSE";this.eventBus.broadcast(r,{name:r,message:e,status:t,analytics:{category:"SDK",action:r,label:this.options.gameId+""}}),null===(n=this._gameData.evnts)||void 0===n||!n.enabled||this._isMasterGameURL()&&!this._isExtHostedGameURL()||(QR({event:"GamePaused",game:this._gameData}),this._send_gametag_data("game_paused"))}},{key:"onRewardedWatchComplete",value:function(){this.eventBus.broadcast("SDK_REWARDED_WATCH_COMPLETE",{message:"",status:"success"})}},{key:"onAdError",value:function(e){this.eventBus.broadcast("AD_ERROR",{message:e,status:"error"})}},{key:"openConsole",value:function(){try{new D(this).start(),h.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 e=this;try{var n=this._gameData;n.sdk.fullscreen&&"auto"===n.sdk.fullscreen&&document.addEventListener("click",function(){if(t(this,e),!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(e){var n=this;void 0!==this.window_open&&(!1===e.enabled?window.open=function(e){t(this,n),this.msgrt.send("external",{message:"C> ".concat(e)}),(e.startsWith("https://play.google.com")||e.startsWith("https://itunes.apple.com"))&&this.window_open.call(null,e)}.bind(this):window.open=this.window_open)}},{key:"_shouldAllowExternalUrl",value:function(e){var n,r=this,i=new I(e),a=i.host;return i.href,((null===(n=this._gameData.urlBlockExc)||void 0===n?void 0:n.hosts)||[]).some(function(e){return t(this,r),e===a}.bind(this))}},{key:"_removeExternalsInHtml",value:function(e){var n=this;!1===e.enabled&&window.document.querySelectorAll("a").forEach(function(e){var r=this;t(this,n);var i=!!(e.innerText.toLowerCase().includes("start")||e.innerText.toLowerCase().includes("play")||e.innerText.toLowerCase().includes("continue")),a=e.getAttribute("href");if(!this._shouldAllowExternalUrl(a)){var s=e.getAttribute("href");e.removeAttribute("href"),i||(e.onclick=function(e){return t(this,r),e.preventDefault(),this.msgrt.send("external",{message:"H> ".concat(s)}),!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:a()),d=decodeURIComponent((e||n)&&r.parentDomain?r.parentDomain:s()),c=decodeURIComponent((e||n)&&r.topDomain?r.topDomain:n&&0===o()?d:u()),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,v=(e||n)&&r.loaderEnabled,g=(e||n)&&r.loaderEnabled,A=(e||n)&&r.loaderEnabled,b=(e||n)&&r.loaderEnabled&&r.hasImpression&&r.version>="1.1.24";return{isTokenGameURL:e,isMasterGameURL:t,isExtHostedGameURL:n,noConsoleBanner:l,noLoadedEvent:h,noBlockerEvent:p,noPreroll:A,parentURL:i,parentDomain:d,topDomain:c&&c.length?c:d,noGAPageView:f,noLotamePageView:m,noGamedockSDK:v,noMinijuegosSDK:g,version:r.version,pauseGameOnStartup:b,depth:o(),domainMatched:d===c,exports:{formatTokenURLSearch:this._formatTokenURLSearch.bind(this),extendUrlQuery:this._extendUrlQuery.bind(this),base64Encode:this._base64_encode.bind(this)}}}},{key:"_isHostHTML5Domain",value:function(){var e=new I(location.href);return"html5.gamedistribution.com"===(null==e?void 0:e.host.toLowerCase())}},{key:"_isExternalHoster",value:function(){var e,t;return null===(e=this._gameData)||void 0===e||null===(t=e.extHosting)||void 0===t?void 0:t.enabled}},{key:"_whichFrame",value:function(){return(this._isMasterGameURL()||this._isExtHostedGameURL())&&!this._isTokenGameURL()?"loader-frame":"game-frame"}},{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:"_checkTokenGameUrl",value:function(){var e=I(location.href),t=e.origin,n=e.pathname,r="".concat(t).concat(n);return/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Za-z0-9]{8})\/(.*)$/i.test(r)}},{key:"_isTokenGameURL",value:function(){var e,t=/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Za-z0-9]{8})\/(.*)$/i,n="1"===(null===(e=I(location.href,!0).query)||void 0===e?void 0:e.rd);return t.test(location.href)||!n&&t.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:"_isLoaderGameURL",value:function(){return/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Fa-f0-9]{32})(.*)$/i.test(location.href)&&location.href.startsWith("https://html5.gamedistribution.com")}},{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 I(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 I(document.referrer,!0);if(!r.query.gd_zone_config)return;e=r.query.gd_zone_config}else{var i=new I(location.href,!0);if(!i.query.gd_zone_config)return;e=i.query.gd_zone_config}return JSON.parse(C.decode(decodeURIComponent(e)))}catch(e){}}},{key:"_getSplashTemplate",value:function(e){var t=e.splash;return new wR(t).splash()}},{key:"_createPrerollPromoTemplate",value:(g=e(r.mark((function e(t){var n,i,a,s,o;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=null===(n=t.promo)||void 0===n?void 0:n[null===(i=t.promo)||void 0===i||null===(a=i.template)||void 0===a?void 0:a.preroll],o=new yR(s),e.abrupt("return",o.promo());case 3:case"end":return e.stop()}}),e)}))),function(e){return g.apply(this,arguments)})},{key:"_formatTokenURLSearch",value:function(e){var t="";try{t=encodeURIComponent(C.encode(JSON.stringify(e)))}catch(e){}try{var n=new I(location.href,!0);return n.query=n.query||{},n.query.gd_zone_config=t,"?".concat(H.stringify(n.query))}catch(e){return"?gd_zone_config=".concat(t)}}},{key:"_extendUrlQuery",value:function(e,t){var n=new I(e,!0);return n.query=wI(wI({},n.query),t),n.toString()}},{key:"_base64_encode",value:function(e){return C.encode(JSON.stringify(e))}},{key:"session",value:function(){var t=this;return new Promise(function(){var n=e(r.mark((function e(n,i){var a;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t.sdkReady;case 3:e.next=7;break;case 5:e.prev=5,e.t0=e.catch(0);case 7:a=t._gameData,n({ads:{display:{enabled:a.dAds.enabled},rewarded:{enabled:a.rewardedAds}},location:{parentDomain:t._bridge.parentDomain,topDomain:t._bridge.topDomain,parentURL:t._bridge.parentURL,depth:t._bridge.depth,loadedByGameZone:t._bridge.isTokenGameURL}});case 9:case"end":return e.stop()}}),e,null,[[0,5]])})));return function(e,t){return n.apply(this,arguments)}}())}},{key:"sendGenericEvent",value:function(e){console.log("Received generic event",e,this._isMasterGameURL());try{var t,n;if("track-milestone"==e.eventName)EI.tracking.trackEvent("milestoneAchieved",{pageId:this.options.gameId,pageType:"game",isAuthorized:null===(t=e.data)||void 0===t?void 0:t.isAuthorized,milestoneDescription:null===(n=e.data)||void 0===n?void 0:n.milestoneDescription});else if("game_event"==e.eventName)return this._gameEventPostMessage(e)}catch(e){console.log(e.message)}}},{key:"_gameEventPostMessage",value:function(e){if(void 0!==e.data.level&&this._numberValidator(e.data.level))if(void 0!==e.data.score&&this._numberValidator(e.data.score)){var t={type:e.eventName,data:e.data};window.location!==window.top.location&&window.top.postMessage(t,"*")}else console.log("Level data type should be number!");else console.log("Level data type should be number!")}},{key:"_numberValidator",value:function(e){return"number"==typeof e&&/^\d*$/.test(e)}},{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 e=this,n=this._gameData,r=n.assets.find(function(n){return t(this,e),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)}}},{key:"fixScore",value:function(){var e,n,r,i,a=this;if(null===(e=this._gameData)||void 0===e||null===(n=e.fix_score)||void 0===n?void 0:n.enabled){var s=(null===(r=this._gameData)||void 0===r||null===(i=r.fix_score)||void 0===i?void 0:i.wait)||10;setTimeout(function(){var e=this;t(this,a),this.showAd(v.Interstitial,{position:"midroll"}).catch(function(n){t(this,e)}.bind(this))}.bind(this),1e3*s)}}},{key:"executeCompensation",value:(i=e(r.mark((function n(i){var a,s,o,d,u,c,l=this;return r.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(a=(null==i?void 0:i.whenAvailable)||!1,s=!this.adInstance.requestRunning&&!this.adFlowRunning,o=function(){var t=e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l.showAd(v.Interstitial,{position:"midroll",isCompensation:!0});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(){return t.apply(this,arguments)}}(),!s){n.next=10;break}return n.next=7,o();case 7:return d=n.sent,n.abrupt("return",d);case 10:if(!a){n.next=17;break}return u=!1,n.next=15,new Promise(function(n,i){var a=this;t(this,l);var s=!1,d=setInterval(e(r.mark((function e(){var t;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a.adInstance.requestRunning||a.adFlowRunning){e.next=19;break}return clearInterval(d),e.prev=4,e.next=7,o();case 7:t=e.sent,s=!0,n(t),u=!0,e.next=19;break;case 14:e.prev=14,e.t0=e.catch(4),yo("[compensation] execution error after became available",e.t0),n({err:e.t0,success:!1}),u=!0;case 19:case"end":return e.stop()}}),e,null,[[4,14]])}))),1e3);setTimeout(function(){t(this,a),s||u||n({success:!1})}.bind(this),6e4)}.bind(this));case 15:return c=n.sent,n.abrupt("return",c);case 17:case"end":return n.stop()}}),n,this)}))),function(e){return i.apply(this,arguments)})},{key:"decideToGiveAGift",value:function(n){var i=this;try{var a,s=null===(a=this._gameData)||void 0===a?void 0:a.gft[n],o="gift";if(!ST({rateType:o,gameData:this._gameData}))return void yo("[compensation] rate check did not pass for ".concat(o));yo("[compensation] rate check passed for ".concat(o));var d=setInterval(e(r.mark((function e(){var a=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i.adInstance.requestRunning||i.adFlowRunning?console.log("Advertisement already running..."):(yo("gd-adflow WILL GIVE GIFT!!!"),i.showAd(v.Interstitial,{position:n,isGift:!0}).catch(function(e){t(this,a)}.bind(this)),clearInterval(d),i._giftCount[n]++);case 1:case"end":return e.stop()}}),e,this)}))),1e3*s.durations[this._giftCount[n]].wait)}catch(e){console.log("Advertisement Error...")}}},{key:"send_atom_event",value:function(e,t){this.adInstance._send_atom_event(e,t)}},{key:"get_session_id",value:function(){return kI}},{key:"get_ad_system_init_result",value:function(){return{afg:this.adInstance.afgInitSuccess,ima:this.adInstance.imaInitSuccess}}},{key:"_getDeveloperDomains",value:function(){var e,t;return"developer.gamedistribution.com"===this._topDomain||"developer-acc.gamedistribution.com"===this._topDomain?e=this._topDomain:!0===new RegExp("^localhost").test(this._parentDomain)&&(e="localhost"),e&&(t={"developer-acc.gamedistribution.com":"game-api-acc-real-aws.gamedistribution.com","developer.gamedistribution.com":"game.api.gamedistribution.com",localhost:"game-api-acc-real-aws.gamedistribution.com"}[e]),{developerDomain:e,gameApiDomain:t}}},{key:"_setGameRewardedFlag",value:function(){try{var e=this._getDeveloperDomains(),t=e.developerDomain,n=e.gameApiDomain;if(t){fetch("https://".concat(n,"/game/v2/hasrewarded/").concat(this.options.gameId,"?timestamp=").concat((new Date).valueOf()));try{var r=JSON.stringify({type:"GD_SDK_REWARDED_SET",gameID:this.options.gameId});window.location!==window.top.location?window.top.postMessage(r,"*"):null!==window.opener&&window.opener.location!==window.location&&window.opener.postMessage(r,"*")}catch(e){}}}catch(e){}}},{key:"_getGdModeIfExist",value:function(){var e=this,n=new Proxy(new URLSearchParams(window.location.search),{get:function(n,r){return t(this,e),n.get(r)}.bind(this)});return!n.gd_mode&&window.location.search.includes("gd_mode")?window.location.search.split("gd_mode=")[1]:n.gd_mode}},{key:"_executeMidrollPlus",value:function(){var e,n=this;if(!(this.adInstance&&this.adInstance.checkIfTestAdsExist())){if(ST({rateType:"midroll+",gameData:this._gameData})&&null!==(e=this._gameData.midroll_plus)&&void 0!==e&&e.enabled&&!this.isMidrollPlusExecuted){var r;this.isMidrollPlusExecuted=!0;var i=this._gameData.midroll_plus.type||"midroll";if(null!==(r=this._gameData.midroll_plus)&&void 0!==r&&r.interval)var a=setInterval(function(){var e,r,s=this;(t(this,n),this.adFlowRunning)||(this.showAd(v.Interstitial,{position:"midroll",giftType:i,isMidrollPlus:!0}).catch(function(e){t(this,s)}.bind(this)),this._mplus_count++,"infinite"!==(null===(e=this._gameData.midroll_plus)||void 0===e?void 0:e.interval)&&this._mplus_count===(null===(r=this._gameData.midroll_plus)||void 0===r?void 0:r.interval)&&clearInterval(a))}.bind(this),6e4*this._gameData.midroll_plus.timer);else setTimeout(function(){var e=this;t(this,n),this.showAd(v.Interstitial,{position:"midroll",giftType:i,isMidrollPlus:!0}).catch(function(n){t(this,e)}.bind(this))}.bind(this),this._gameData.midroll)}}}}]),n}();function SI(){return(SI=e(r.mark((function e(){var n,i=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,qw();case 2:if(e.sent){e.next=6;break}return console.log("locus-disabled on proxy level"),e.abrupt("return");case 6:n=["https://pm.azerioncircle.com/p/locus/"],console.log("locus loading"),m(n[0],"locus",{alternates:n}).catch(function(e){t(this,i),this._sendSDKError(e)}.bind(this));case 9:case"end":return e.stop()}}),e,this)})))).apply(this,arguments)}var RI,TI=new M,II=function(e){var n=this;!function(){SI.apply(this,arguments)}();var r,i=function(e){var r=this;return t(this,n),new Promise(function(n,i){var a=this;t(this,r);var s=function(e){t(this,a),"SDK_GAME_START"===e.name&&(TI.off("sdk-event",s),n())}.bind(this);TI.on("sdk-event",s),v("showAd",{adType:e})}.bind(this))}.bind(this),a=function(){return t(this,n),r||(r=new DI(e)),r}.bind(this),s=function(){var e;return t(this,n),(null===(e=window.gdsdk.store)||void 0===e?void 0:e.isVisible)&&window.gdsdk.store.isVisible()}.bind(this),o=function(e){if(t(this,n),!s())return i(e);wo("[GD-IS-IGS] store-visible so ad was skipped",{loc:window.location.href})}.bind(this),d=function(e){return t(this,n),"gdsdk://preloaded"}.bind(this),u=function(e){return t(this,n),a().showDisplayAd(e)}.bind(this),c=function(){return t(this,n),v("cancelAd")}.bind(this),l=function(){return t(this,n),v("openConsole")}.bind(this),h=function(){return t(this,n),v("showBanner")}.bind(this),p=function(){return t(this,n),v("session")}.bind(this),f=function(e){return t(this,n),v("sendGenericEvent",{options:e})}.bind(this),m=function(){t(this,n),console.log("_sendSDKReady")}.bind(this),v=function(e,r){var i=this;return t(this,n),r||(r={}),new Promise(function(n,a){t(this,i);try{var s={type:"gd-sdk",method:e,options:r};window.parent.postMessage(s,"*"),n()}catch(e){console.log("gd:adp:m:s:error",e),n()}}.bind(this))}.bind(this),g=function(){t(this,n);window.addEventListener("message",(function(e){var t=e.data;e.origin,e.source;var n=t.type,r=t.event;"gd-sdk-on-event"===n&&r&&b(r)}),!1)}.bind(this),A=function(){t(this,n),g(),v("init")}.bind(this),b=function(r){t(this,n);try{TI.emit("sdk-event",r),e.onEvent&&(wo("[developer-event]".concat(r.isStoreEvent?"[store]":""),{name:r.name,data:r.data,source:"proxy"}),e.onEvent(r)),"SDK_GAME_PAUSE"===r.name?e.pauseGame&&e.pauseGame():"SDK_GAME_START"===r.name&&e.resumeGame&&e.resumeGame()}catch(e){console.log("DEVELOPER ERROR on forwarder-sdk")}}.bind(this);return{showBanner:h,showAd:o,preloadAd:d,showDisplayAd:u,cancelAd:c,openConsole:l,getSession:p,onEvent:b,init:A,_sendSDKReady:m,sendGenericEvent:f}},CI=function(){var n=e(r.mark((function e(n){var i,a=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(i=II(n)).init(),e.next=4,Yw({whichFrame:"game-frame",options:{onEvent:i.onEvent.bind(i)}});case 4:return hk({onEvent:function(e){t(this,a);var n=e.name,r=e.data;(i.onEvent({name:n,message:"In Game Store: ".concat(n),status:"success",data:r,isStoreEvent:!0}),"STORE_UI_VISIBILITY_CHANGED"===n)&&(r.visible?i.onEvent({name:"SDK_GAME_PAUSE",message:"SDK_GAME_PAUSE",status:"success"}):i.onEvent({name:"SDK_GAME_START",message:"SDK_GAME_START",status:"success"}))}.bind(this)}),e.abrupt("return",i);case 6:case"end":return e.stop()}}),e,this)})));return function(e){return n.apply(this,arguments)}}(),OI=function(){var e=this,n=function(){t(this,e);return/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Fa-f0-9]{32})(.*)$/i.test(location.href)}.bind(this),r=function(){t(this,e);return/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Za-z0-9]{8})\/(.*)$/i.test(location.href)}.bind(this),i=function(){t(this,e);return/^http[s]?:\/\/.*?gd_sdk_referrer_url=.*$/i.test(location.href)}.bind(this),a=function(){t(this,e);var i="html5.gamedistribution.com"!==I(window.location.href).host;return n()&&!(r()||i)?"loader-frame":"game-frame"}.bind(this);return{isMasterGameURL:n,isTokenGameURL:r,isExtHostedGameURL:i,whichFrame:a}},PI="gd-sdk-frame-handshake-request",LI="gd-sdk-frame-handshake-response",BI=function(e){var n=this;return new Promise(function(e,r){var i=this;t(this,n);var a={type:PI},s=!1;window.addEventListener("message",(function(t){var n=t.data,r=t.origin,i=t.source,a=n.type;if(a===PI){var o={type:LI};i.postMessage(o,r)}else a===LI&&(s=!0,e({origin:r,source:i}))})),setTimeout(function(){t(this,i),s||e()}.bind(this),200),window.parent!==window?window.parent.postMessage(a,"*"):e()}.bind(this))},UI=function(){var t=e(r.mark((function e(){var t,n,i,a,s,o,d;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Nw();case 2:return t=e.sent,e.next=6,BI();case 6:if(n=e.sent,nI.SDKExistsOnUpperFrame=!!n,t){e.next=10;break}return e.abrupt("return",!1);case 10:return i=OI(),a=i.isMasterGameURL,i.isTokenGameURL,s=a(),e.next=14,Hw();case 14:return o=e.sent,d=!1,d=o?!s&&!!n:!s,e.abrupt("return",d);case 18:case"end":return e.stop()}}),e)})));return function(){return t.apply(this,arguments)}}(),MI={},FI=function(e){try{if(e.skipForward)return void yo("gd-adflow fw-skip-forward",e);if(yo("gd-adflow fw-forwarding",e),MI.source){var t={type:"gd-sdk-on-event",event:e};MI.source.postMessage(t,MI.origin)}}catch(e){console.log("gd-sdk forwardEvent err",e)}},jI=function(){FI({name:"SDK_READY",status:"success",message:"Everything is ready."}),FI({name:"SDK_GAME_START",status:"success",message:"Advertisement(s) are done. Start / resume the game."}),FI({name:"CONTENT_RESUME_REQUESTED",status:"success",message:"Fired when content should be resumed. This usually happens when an ad finishes or collapses."})},GI=function(n){window.addEventListener("message",(function(i){var a=i.data,s=i.origin,o=i.source,d=a.type,u=a.method,c=a.options;if("gd-sdk-self"!==d){if("gd-sdk"===d){if(!MI.source&&"init"===u)return function(e){var t=e.source,n=e.origin;MI={source:t,origin:n}}({source:o,origin:s}),void jI();var l=n[u];l&&e(r.mark((function e(){var i,a=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,function(){t(this,a),"showAd"===u&&xo.firstAdapterModeAdsense&&"rewarded"!==c.adType&&(console.log("promo-test, set first adapter to adssense 3"),c.params=c.params?c.params:{},c.params.adapter="adsense")}.bind(this),!(i=l.apply(n,Object.values(c)))||!i.then){e.next=6;break}return e.next=6,i;case 6:e.next=11;break;case 8:e.prev=8,e.t0=e.catch(0),console.log("gd:adp:m:r onFrameMessage error",e.t0);case 11:case"end":return e.stop()}}),e,this,[[0,8]])})))()}}else{var h={type:"gd-sdk",method:u,options:c};window.postMessage(h,location.origin)}}),!1)},NI=function(e){!function(e){var t=e.onEvent;e.onEvent=function(e){FI(e),t.apply(this,arguments)}}(e);var t=new DI(e);return GI(t),t},qI=function(){function t(){R(this,t),this.moduleName="GDAeria",this.moduleConfig={source:"https://pm.azerioncircle.com/@bygd/gd-sdk-aeria/1.0.1/dist/default/iife/index.js",dependencies:[]},Zg(this.moduleName,this.moduleConfig)}var n,i;return S(t,[{key:"load",value:(i=e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,eA(this.moduleName);case 3:this.module=e.sent,yo("aeria module load success",this.module),e.next=11;break;case 7:e.prev=7,e.t0=e.catch(0),console.log("aeria module load error",e.t0),this.module=null;case 11:case"end":return e.stop()}}),e,this,[[0,7]])}))),function(){return i.apply(this,arguments)})},{key:"runYMenu",value:(n=e(r.mark((function e(t){var n;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.gameId,this.module){e.next=4;break}return e.next=4,this.load();case 4:(new this.module.Aeria).renderYMenu({gameId:n});case 6:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})}]),t}(),HI=function(){var t=e(r.mark((function t(){var n,i,a,s,o,d,u,c,l,h,p,f,m,v,g,A;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=function(){var e,t=(e=new Cy).get("partner.domain.value")||e.get("top.domain.value");return{isAeriaDomain:"minigame.aeriagames.jp"===t||"minigame-stg.aeriagames.jp"===t,isAeriaStagingDomain:"minigame-stg.aeriagames.jp"===t}}(),i=n.isAeriaDomain,a=n.isAeriaStagingDomain,!i){t.next=21;break}return d=function(){var e=(new Cy).get("partner.url.value");return new I(e,!0)},u=function(){var e="ae-soft-323";try{var t=d(),n=t.pathname,r=n.split("/"),i=r[r.length-1];wo("aeria-ylogin:loc",t,n,i),e=i}catch(e){ko("Error on getting aeria game id",e)}return e}(),c={action:"score",data:{gameId:u,score:100},env:a?"staging":"production",system:"Softgames"},l=function(){var e=window.parent||window,t=c;e.postMessage(t,"*")},h=new _,t.next=13,Lw();case 13:p=t.sent,f=null==p||null===(s=p.aeria)||void 0===s?void 0:s.yMenuExcluded,m=null==p||null===(o=p.aeria)||void 0===o?void 0:o.yLoginExcluded,h.subscribe("AD_FLOW_COMPLETE",(function(e){"midroll"===e.adType&&(m||l())})),v=function(){var t=e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(new qI).runYMenu({gameId:u});case 2:case"end":return e.stop()}}),e)})));return function(){return t.apply(this,arguments)}}(),g=OI(),A=g.whichFrame,"game-frame"===A()&&(f||v());case 21:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),VI=function(e){try{var t=$y(e);e.gameId||t.send("nogameid",{message:"".concat(vb.parentURL)})}catch(e){}},QI=function(){var t=e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,HI();case 3:e.next=8;break;case 5:e.prev=5,e.t0=e.catch(0),console.log("error on creating some bridge module");case 8:case"end":return e.stop()}}),e,null,[[0,5]])})));return function(){return t.apply(this,arguments)}}(),zI={create:function(){var t=e(r.mark((function e(t){var n,i;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,VI(t),Pw(t),e.next=5,UI();case 5:return n=e.sent,e.next=8,QI();case 8:if(window.isForwarderFrame=n,!n){e.next=15;break}return e.next=12,CI(t);case 12:e.t0=e.sent,e.next=16;break;case 15:e.t0=NI(t);case 16:return i=e.t0,Qw(),e.abrupt("return",i);case 21:return e.prev=21,e.t1=e.catch(0),console.log("gd:adp: sdk adaptor create failed, fallback to default adapter",e.t1),e.abrupt("return",NI(t));case 25:case"end":return e.stop()}}),e,null,[[0,21]])})));return function(e){return t.apply(this,arguments)}}()};function WI(){return(WI=e(r.mark((function e(t,n){var i;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Kw();case 2:if(!e.sent){e.next=7;break}e.t0=window.gdsdk,e.next=10;break;case 7:return e.next=9,YI(t);case 9:e.t0=e.sent;case 10:return i=e.t0,e.abrupt("return",n(i));case 12:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var KI=!1;function YI(e){var n=this;return new Promise(function(r,i){var a=this;if(t(this,n),RI)return r(RI);if(KI)var s=setInterval(function(){t(this,a),RI&&(KI=!1,clearInterval(s),r(RI))}.bind(this),100);else KI=!0,zI.create(e).then(function(e){t(this,a),RI=e,e._sendSDKReady(),KI=!1,r(RI)}.bind(this))}.bind(this))}function JI(e){return YI(e),{invoke:function(t){return function(e,t){return WI.apply(this,arguments)}(e,t)}}}var XI,ZI,$I=es,eC=Fr,tC=Vi.f,nC=ei,rC=ds,iC=uA,aC=ve,sC=lA,oC=eC("".endsWith),dC=eC("".slice),uC=Math.min,cC=sC("endsWith"),lC=!cC&&!!function(){var e=tC(String.prototype,"endsWith");return e&&!e.writable}();function hC(n,i){var a=this;return new Promise(function(s,o){var d,u=this;t(this,a);var c=function(e){var t="https://pm.azerioncircle.com/pkg/@bygd/gd-sdk-wrp/dist/default/iife/index.js";return e&&(t="https://pm.azerioncircle.com/@bygd/gd-sdk-wrp/".concat(e,"/dist/default/iife/index.js")),[t]}(null==i||null===(d=i.game)||void 0===d?void 0:d.version);pC({text:"sdk-wrapper-script-load"}),m(c[0],"gd-sdk-wrp",{alternates:c}).catch(function(e){t(this,u),pC({text:"sdk-wrapper load error",error:e.message}),this._sendSDKError(e),o(e)}.bind(this)).then(e(r.mark((function e(){var t,a;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,pC({text:"sdk-wrapper load success"}),t=window.GDSDKWRP.GDSDKWRP,a=new t,pC({text:"sdk-wrapper before gdSdkWrp.init"}),e.next=7,a.init(n,i);case 7:ZI=e.sent,pC({text:"sdk-wrapper after gdSdkWrp.init"}),s(ZI),e.next=16;break;case 12:e.prev=12,e.t0=e.catch(0),pC({text:"sdk-wrapper load error 2",error:e.t0.message}),o(e.t0);case 16:case"end":return e.stop()}}),e,null,[[0,12]])}))))}.bind(this))}function pC(e){try{var t={tp:"gd.wrp",args:e};fetch("https://tag.atom.gamedistribution.com/v1/dmp?ar=".concat(encodeURIComponent(C.encode(JSON.stringify(t))))),console.log(G(Object.values(e)))}catch(e){}}function fC(e){if(e){var t=e.name,n=e.message,r=e.status;try{pC({text:"samsung-wrp send-game-event",evt:e,hasOptions:!!XI}),XI&&XI.onEvent({name:t,message:n,status:r})}catch(t){pC({text:"samsung-wrp DEVELOPER-ERROR",evt:e,err:t})}}}function mC(e){try{return"samsungapps.com"===e||e.endsWith(".samsungapps.com")}catch(e){return!1}}function vC(e){return gC.apply(this,arguments)}function gC(){return(gC=e(r.mark((function e(t){var n,i,a,s,o,d,u,c,l;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return XI=t,Pw(t),e.next=4,Lw();case 4:if(s=e.sent,!ZI){e.next=7;break}return e.abrupt("return",ZI);case 7:if(o=null==s||null===(n=s.sdk_wrp)||void 0===n?void 0:n.enabled,d=null==s||null===(i=s.sdk_wrp)||void 0===i?void 0:i.version,u=null==s?void 0:s.gameId,c=null==s?void 0:s.title,bC("isWrapEnabled ".concat(o)),o){e.next=14;break}return e.abrupt("return");case 14:return l=null==s||null===(a=s.sdk_wrp)||void 0===a?void 0:a.wrapper,e.next=17,hC(l,{onEvent:fC,game:{gameId:u,title:c,version:d}});case 17:return ZI=e.sent,e.abrupt("return",ZI);case 19:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function AC(){return AC=e(r.mark((function e(t){var n,i,a;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t._get_developer_sets,bC("beforeGetDeveloperSettings"),i=n(),bC("afterGetDeveloperSettings"),e.prev=4,e.next=7,vC(i);case 7:a=e.sent,bC("after get SDK wrapper: ".concat(!!a)),a&&(bC("setting SDK Wrapper as gd-sdk"),window.sdkWrapper=a,window.gdsdk=a,window.gdApi=window.gdsdk),e.next=16;break;case 12:e.prev=12,e.t0=e.catch(4),console.log("Error on SDK wrapper init",e.t0),bC("Error on SDK wrapper init: ".concat(e.t0.message));case 16:case"end":return e.stop()}}),e,null,[[4,12]])}))),AC.apply(this,arguments)}function bC(e){window.sdkLog.push(e)}function _C(){var e={};try{"object"===("undefined"==typeof GD_OPTIONS?"undefined":n(GD_OPTIONS))&&GD_OPTIONS?e=GD_OPTIONS:window.gdApi&&"object"===n(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}$I({target:"String",proto:!0,forced:!lC&&!cC},{endsWith:function(e){var t=rC(aC(this));iC(e);var n=arguments.length>1?arguments[1]:void 0,r=t.length,i=void 0===n?r:uC(nC(n),r),a=rC(e);return oC?oC(t,a,i):dC(t,i-a.length,i)===a}}),window.sdkLog=[],function(){var e=function(){var e,t=I(window.location.href,!0),n=t.host,r=t.query,i=n,a=null==r?void 0:r.gd_sdk_referrer_url;if(a){var s;a=a.startsWith("https://")||a.startsWith("http://")?a:"https://".concat(a),null!==(s=e=I(a,!0))&&void 0!==s&&s.host&&(i=e.host)}return i}(),t=new Cy,n=t.get("top.domain.value"),r=t.get("partner.domain.value");return mC(e)||mC(n)||mC(r)}()?bC("skipped normal SDK init!"):(!function(){sR();var n=JI(_C());function i(){var i=this;this.AdType=v,this.preloadAd=function(){var i=e(r.mark((function e(i){var a,s=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.invoke(function(e){return t(this,s),e.preloadAd(i)}.bind(this));case 2:return a=e.sent,wo("[developer-event] preloadAd check",a),e.abrupt("return",a);case 5:case"end":return e.stop()}}),e,this)})));return function(e){return i.apply(this,arguments)}}(),this.showAd=function(){var i=e(r.mark((function e(i,a){var s,o=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.invoke(function(e){var n=this;if(t(this,o),i===v.Display)return e.showDisplayAd(a);var r={};return function(){t(this,n),xo.firstAdapterModeAdsense&&(console.log("promo-test, set first adapter to adssense 2"),r.adapter="adsense")}.bind(this),e.showAd(i,r)}.bind(this));case 2:return s=e.sent,wo("[developer-event] after showAd",s),e.abrupt("return",s);case 5:case"end":return e.stop()}}),e,this)})));return function(e,t){return i.apply(this,arguments)}}(),this.cancelAd=function(){var e=this;return n.invoke(function(n){return t(this,e),n.cancelAd()}.bind(this))},this.openConsole=function(){var e=this;return n.invoke(function(n){return t(this,e),n.openConsole()}.bind(this))},this.getSession=function(){var e=this;return n.invoke(function(n){return t(this,e),n.session()}.bind(this))},this.sendEvent=function(e){var r=this;return n.invoke(function(n){return t(this,r),n.sendGenericEvent(e)}.bind(this))},this.leaderboard={show:function(){t(this,i),nA.showLeaderboard()}.bind(this),addScore:function(e){t(this,i),nA.addScore(e)}.bind(this)}}i.prototype=new function(){this.showBanner=function(){var e=this;return n.invoke(function(n){return t(this,e),n.showBanner()}.bind(this))},this.play=function(){},this.customLog=function(){}},window.gdsdk=new i,window.gdApi=window.gdsdk}(),bC("afterSDKInit")),function(e){AC.apply(this,arguments)}({_get_developer_sets:_C});