@bygd/gd-sdk-pes 1.40.2 → 1.40.3

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 c,getMobilePlatform as u,MessageRouter as l,extendDefaults as h,dankLog as p,getScript as f,Ls as m,AdType as A,Layers as g,getKeyByValue as v,getQueryString as b,EventBus as _,getIMASampleTags as y,SDKEvents as w,IMAEvents as k,Macros as E,setDankLog as x,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 C from"url-parse";import{Base64 as I}from"js-base64";import O from"validator";import P from"is-valid-domain";import B from"get-value";import L from"set-value";import U from"lodash.clonedeep";import{EventEmitter as M}from"events";import F from"can-autoplay";import{isPlainObject as j}from"is-plain-object";import N from"querystringify";import G from"lodash.merge";import{v4 as q}from"uuid";import H from"@flownet/lib-connect-to-tcf";import V from"@babel/runtime/helpers/toConsumableArray";var Q="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},z=function(e){return e&&e.Math===Math&&e},W=z("object"==typeof globalThis&&globalThis)||z("object"==typeof window&&window)||z("object"==typeof self&&self)||z("object"==typeof Q&&Q)||z("object"==typeof Q&&Q)||function(){return this}()||Function("return this")(),K={exports:{}},Y=W,J=Object.defineProperty,Z=function(e,t){try{J(Y,e,{value:t,configurable:!0,writable:!0})}catch(n){Y[e]=t}return t},X=Z,$="__core-js_shared__",ee=W[$]||X($,{}),te=ee;(K.exports=function(e,t){return te[e]||(te[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.34.0",mode:"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.34.0/LICENSE",source:"https://github.com/zloirock/core-js"});var ne,re,ie=function(e){try{return!!e()}catch(e){return!0}},ae=!ie((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),se=ae,oe=Function.prototype,de=oe.call,ce=se&&oe.bind.bind(de,de),ue=se?ce:function(e){return function(){return de.apply(e,arguments)}},le=function(e){return null==e},he=le,pe=TypeError,fe=function(e){if(he(e))throw new pe("Can't call method on "+e);return e},me=fe,Ae=Object,ge=function(e){return Ae(me(e))},ve=ge,be=ue({}.hasOwnProperty),_e=Object.hasOwn||function(e,t){return be(ve(e),t)},ye=ue,we=0,ke=Math.random(),Ee=ye(1..toString),xe=function(e){return"Symbol("+(void 0===e?"":e)+")_"+Ee(++we+ke,36)},De="undefined"!=typeof navigator&&String(navigator.userAgent)||"",Se=W,Re=De,Te=Se.process,Ce=Se.Deno,Ie=Te&&Te.versions||Ce&&Ce.version,Oe=Ie&&Ie.v8;Oe&&(re=(ne=Oe.split("."))[0]>0&&ne[0]<4?1:+(ne[0]+ne[1])),!re&&Re&&(!(ne=Re.match(/Edge\/(\d+)/))||ne[1]>=74)&&(ne=Re.match(/Chrome\/(\d+)/))&&(re=+ne[1]);var Pe=re,Be=Pe,Le=ie,Ue=W.String,Me=!!Object.getOwnPropertySymbols&&!Le((function(){var e=Symbol("symbol detection");return!Ue(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Be&&Be<41})),Fe=Me&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,je=W,Ne=K.exports,Ge=_e,qe=xe,He=Me,Ve=Fe,Qe=je.Symbol,ze=Ne("wks"),We=Ve?Qe.for||Qe:Qe&&Qe.withoutSetter||qe,Ke=function(e){return Ge(ze,e)||(ze[e]=He&&Ge(Qe,e)?Qe[e]:We("Symbol."+e)),ze[e]},Ye={};Ye[Ke("toStringTag")]="z";var Je="[object z]"===String(Ye),Ze="object"==typeof document&&document.all,Xe={all:Ze,IS_HTMLDDA:void 0===Ze&&void 0!==Ze},$e=Xe.all,et=Xe.IS_HTMLDDA?function(e){return"function"==typeof e||e===$e}:function(e){return"function"==typeof e},tt={},nt=!ie((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})),rt=et,it=Xe.all,at=Xe.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:rt(e)||e===it}:function(e){return"object"==typeof e?null!==e:rt(e)},st=at,ot=W.document,dt=st(ot)&&st(ot.createElement),ct=function(e){return dt?ot.createElement(e):{}},ut=ct,lt=!nt&&!ie((function(){return 7!==Object.defineProperty(ut("div"),"a",{get:function(){return 7}}).a})),ht=nt&&ie((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),pt=at,ft=String,mt=TypeError,At=function(e){if(pt(e))return e;throw new mt(ft(e)+" is not an object")},gt=ae,vt=Function.prototype.call,bt=gt?vt.bind(vt):function(){return vt.apply(vt,arguments)},_t=W,yt=et,wt=function(e,t){return arguments.length<2?(n=_t[e],yt(n)?n:void 0):_t[e]&&_t[e][t];var n},kt=ue({}.isPrototypeOf),Et=wt,xt=et,Dt=kt,St=Object,Rt=Fe?function(e){return"symbol"==typeof e}:function(e){var t=Et("Symbol");return xt(t)&&Dt(t.prototype,St(e))},Tt=String,Ct=function(e){try{return Tt(e)}catch(e){return"Object"}},It=et,Ot=Ct,Pt=TypeError,Bt=function(e){if(It(e))return e;throw new Pt(Ot(e)+" is not a function")},Lt=Bt,Ut=le,Mt=function(e,t){var n=e[t];return Ut(n)?void 0:Lt(n)},Ft=bt,jt=et,Nt=at,Gt=TypeError,qt=bt,Ht=at,Vt=Rt,Qt=Mt,zt=function(e,t){var n,r;if("string"===t&&jt(n=e.toString)&&!Nt(r=Ft(n,e)))return r;if(jt(n=e.valueOf)&&!Nt(r=Ft(n,e)))return r;if("string"!==t&&jt(n=e.toString)&&!Nt(r=Ft(n,e)))return r;throw new Gt("Can't convert object to primitive value")},Wt=TypeError,Kt=Ke("toPrimitive"),Yt=function(e,t){if(!Ht(e)||Vt(e))return e;var n,r=Qt(e,Kt);if(r){if(void 0===t&&(t="default"),n=qt(r,e,t),!Ht(n)||Vt(n))return n;throw new Wt("Can't convert object to primitive value")}return void 0===t&&(t="number"),zt(e,t)},Jt=Rt,Zt=function(e){var t=Yt(e,"string");return Jt(t)?t:t+""},Xt=nt,$t=lt,en=ht,tn=At,nn=Zt,rn=TypeError,an=Object.defineProperty,sn=Object.getOwnPropertyDescriptor,on="enumerable",dn="configurable",cn="writable";tt.f=Xt?en?function(e,t,n){if(tn(e),t=nn(t),tn(n),"function"==typeof e&&"prototype"===t&&"value"in n&&cn in n&&!n[cn]){var r=sn(e,t);r&&r[cn]&&(e[t]=n.value,n={configurable:dn in n?n[dn]:r[dn],enumerable:on in n?n[on]:r[on],writable:!1})}return an(e,t,n)}:an:function(e,t,n){if(tn(e),t=nn(t),tn(n),$t)try{return an(e,t,n)}catch(e){}if("get"in n||"set"in n)throw new rn("Accessors not supported");return"value"in n&&(e[t]=n.value),e};var un={exports:{}},ln=nt,hn=_e,pn=Function.prototype,fn=ln&&Object.getOwnPropertyDescriptor,mn=hn(pn,"name"),An={EXISTS:mn,PROPER:mn&&"something"===function(){}.name,CONFIGURABLE:mn&&(!ln||ln&&fn(pn,"name").configurable)},gn=et,vn=ee,bn=ue(Function.toString);gn(vn.inspectSource)||(vn.inspectSource=function(e){return bn(e)});var _n,yn,wn,kn=vn.inspectSource,En=et,xn=W.WeakMap,Dn=En(xn)&&/native code/.test(String(xn)),Sn=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},Rn=tt,Tn=Sn,Cn=nt?function(e,t,n){return Rn.f(e,t,Tn(1,n))}:function(e,t,n){return e[t]=n,e},In=K.exports,On=xe,Pn=In("keys"),Bn=function(e){return Pn[e]||(Pn[e]=On(e))},Ln={},Un=Dn,Mn=W,Fn=at,jn=Cn,Nn=_e,Gn=ee,qn=Bn,Hn=Ln,Vn="Object already initialized",Qn=Mn.TypeError,zn=Mn.WeakMap;if(Un||Gn.state){var Wn=Gn.state||(Gn.state=new zn);Wn.get=Wn.get,Wn.has=Wn.has,Wn.set=Wn.set,_n=function(e,t){if(Wn.has(e))throw new Qn(Vn);return t.facade=e,Wn.set(e,t),t},yn=function(e){return Wn.get(e)||{}},wn=function(e){return Wn.has(e)}}else{var Kn=qn("state");Hn[Kn]=!0,_n=function(e,t){if(Nn(e,Kn))throw new Qn(Vn);return t.facade=e,jn(e,Kn,t),t},yn=function(e){return Nn(e,Kn)?e[Kn]:{}},wn=function(e){return Nn(e,Kn)}}var Yn={set:_n,get:yn,has:wn,enforce:function(e){return wn(e)?yn(e):_n(e,{})},getterFor:function(e){return function(t){var n;if(!Fn(t)||(n=yn(t)).type!==e)throw new Qn("Incompatible receiver, "+e+" required");return n}}},Jn=ue,Zn=ie,Xn=et,$n=_e,er=nt,tr=An.CONFIGURABLE,nr=kn,rr=Yn.enforce,ir=Yn.get,ar=String,sr=Object.defineProperty,or=Jn("".slice),dr=Jn("".replace),cr=Jn([].join),ur=er&&!Zn((function(){return 8!==sr((function(){}),"length",{value:8}).length})),lr=String(String).split("String"),hr=un.exports=function(e,t,n){"Symbol("===or(ar(t),0,7)&&(t="["+dr(ar(t),/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!$n(e,"name")||tr&&e.name!==t)&&(er?sr(e,"name",{value:t,configurable:!0}):e.name=t),ur&&n&&$n(n,"arity")&&e.length!==n.arity&&sr(e,"length",{value:n.arity});try{n&&$n(n,"constructor")&&n.constructor?er&&sr(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var r=rr(e);return $n(r,"source")||(r.source=cr(lr,"string"==typeof t?t:"")),e};Function.prototype.toString=hr((function(){return Xn(this)&&ir(this).source||nr(this)}),"toString");var pr=et,fr=tt,mr=un.exports,Ar=Z,gr=function(e,t,n,r){r||(r={});var i=r.enumerable,a=void 0!==r.name?r.name:t;if(pr(n)&&mr(n,a,r),r.global)i?e[t]=n:Ar(t,n);else{try{r.unsafe?e[t]&&(i=!0):delete e[t]}catch(e){}i?e[t]=n:fr.f(e,t,{value:n,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return e},vr=ue,br=vr({}.toString),_r=vr("".slice),yr=function(e){return _r(br(e),8,-1)},wr=Je,kr=et,Er=yr,xr=Ke("toStringTag"),Dr=Object,Sr="Arguments"===Er(function(){return arguments}()),Rr=wr?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=Dr(e),xr))?n:Sr?Er(t):"Object"===(r=Er(t))&&kr(t.callee)?"Arguments":r},Tr=Rr,Cr=Je?{}.toString:function(){return"[object "+Tr(this)+"]"};Je||gr(Object.prototype,"toString",Cr,{unsafe:!0});var Ir={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},Or=ct("span").classList,Pr=Or&&Or.constructor&&Or.constructor.prototype,Br=Pr===Object.prototype?void 0:Pr,Lr=yr,Ur=ue,Mr=function(e){if("Function"===Lr(e))return Ur(e)},Fr=Bt,jr=ae,Nr=Mr(Mr.bind),Gr=function(e,t){return Fr(e),void 0===t?e:jr?Nr(e,t):function(){return e.apply(t,arguments)}},qr=ie,Hr=yr,Vr=Object,Qr=ue("".split),zr=qr((function(){return!Vr("z").propertyIsEnumerable(0)}))?function(e){return"String"===Hr(e)?Qr(e,""):Vr(e)}:Vr,Wr=Math.ceil,Kr=Math.floor,Yr=Math.trunc||function(e){var t=+e;return(t>0?Kr:Wr)(t)},Jr=function(e){var t=+e;return t!=t||0===t?0:Yr(t)},Zr=Jr,Xr=Math.min,$r=function(e){return e>0?Xr(Zr(e),9007199254740991):0},ei=$r,ti=function(e){return ei(e.length)},ni=yr,ri=Array.isArray||function(e){return"Array"===ni(e)},ii=ue,ai=ie,si=et,oi=Rr,di=kn,ci=function(){},ui=[],li=wt("Reflect","construct"),hi=/^\s*(?:class|function)\b/,pi=ii(hi.exec),fi=!hi.test(ci),mi=function(e){if(!si(e))return!1;try{return li(ci,ui,e),!0}catch(e){return!1}},Ai=function(e){if(!si(e))return!1;switch(oi(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return fi||!!pi(hi,di(e))}catch(e){return!0}};Ai.sham=!0;var gi=!li||ai((function(){var e;return mi(mi.call)||!mi(Object)||!mi((function(){e=!0}))||e}))?Ai:mi,vi=ri,bi=gi,_i=at,yi=Ke("species"),wi=Array,ki=function(e){var t;return vi(e)&&(t=e.constructor,(bi(t)&&(t===wi||vi(t.prototype))||_i(t)&&null===(t=t[yi]))&&(t=void 0)),void 0===t?wi:t},Ei=function(e,t){return new(ki(e))(0===t?0:t)},xi=Gr,Di=zr,Si=ge,Ri=ti,Ti=Ei,Ci=ue([].push),Ii=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,c,u,l){for(var h,p,f=Si(d),m=Di(f),A=Ri(m),g=xi(c,u),v=0,b=l||Ti,_=t?b(d,A):n||s?b(d,0):void 0;A>v;v++)if((o||v in m)&&(p=g(h=m[v],v,f),e))if(t)_[v]=p;else if(p)switch(e){case 3:return!0;case 5:return h;case 6:return v;case 2:Ci(_,h)}else switch(e){case 4:return!1;case 7:Ci(_,h)}return a?-1:r||i?i:_}},Oi={forEach:Ii(0),map:Ii(1),filter:Ii(2),some:Ii(3),every:Ii(4),find:Ii(5),findIndex:Ii(6),filterReject:Ii(7)},Pi=ie,Bi=function(e,t){var n=[][e];return!!n&&Pi((function(){n.call(null,t||function(){return 1},1)}))},Li=Oi.forEach,Ui=W,Mi=Ir,Fi=Br,ji=Bi("forEach")?[].forEach:function(e){return Li(this,e,arguments.length>1?arguments[1]:void 0)},Ni=Cn,Gi=function(e){if(e&&e.forEach!==ji)try{Ni(e,"forEach",ji)}catch(t){e.forEach=ji}};for(var qi in Mi)Mi[qi]&&Gi(Ui[qi]&&Ui[qi].prototype);Gi(Fi);var Hi={},Vi={},Qi={}.propertyIsEnumerable,zi=Object.getOwnPropertyDescriptor,Wi=zi&&!Qi.call({1:2},1);Vi.f=Wi?function(e){var t=zi(this,e);return!!t&&t.enumerable}:Qi;var Ki=zr,Yi=fe,Ji=function(e){return Ki(Yi(e))},Zi=nt,Xi=bt,$i=Vi,ea=Sn,ta=Ji,na=Zt,ra=_e,ia=lt,aa=Object.getOwnPropertyDescriptor;Hi.f=Zi?aa:function(e,t){if(e=ta(e),t=na(t),ia)try{return aa(e,t)}catch(e){}if(ra(e,t))return ea(!Xi($i.f,e,t),e[t])};var sa={},oa=Jr,da=Math.max,ca=Math.min,ua=function(e,t){var n=oa(e);return n<0?da(n+t,0):ca(n,t)},la=Ji,ha=ua,pa=ti,fa=function(e){return function(t,n,r){var i,a=la(t),s=pa(a),o=ha(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}},ma={includes:fa(!0),indexOf:fa(!1)},Aa=_e,ga=Ji,va=ma.indexOf,ba=Ln,_a=ue([].push),ya=function(e,t){var n,r=ga(e),i=0,a=[];for(n in r)!Aa(ba,n)&&Aa(r,n)&&_a(a,n);for(;t.length>i;)Aa(r,n=t[i++])&&(~va(a,n)||_a(a,n));return a},wa=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],ka=ya,Ea=wa.concat("length","prototype");sa.f=Object.getOwnPropertyNames||function(e){return ka(e,Ea)};var xa={};xa.f=Object.getOwnPropertySymbols;var Da=wt,Sa=sa,Ra=xa,Ta=At,Ca=ue([].concat),Ia=Da("Reflect","ownKeys")||function(e){var t=Sa.f(Ta(e)),n=Ra.f;return n?Ca(t,n(e)):t},Oa=_e,Pa=Ia,Ba=Hi,La=tt,Ua=function(e,t,n){for(var r=Pa(t),i=La.f,a=Ba.f,s=0;s<r.length;s++){var o=r[s];Oa(e,o)||n&&Oa(n,o)||i(e,o,a(t,o))}},Ma=ie,Fa=et,ja=/#|\.prototype\./,Na=function(e,t){var n=qa[Ga(e)];return n===Va||n!==Ha&&(Fa(t)?Ma(t):!!t)},Ga=Na.normalize=function(e){return String(e).replace(ja,".").toLowerCase()},qa=Na.data={},Ha=Na.NATIVE="N",Va=Na.POLYFILL="P",Qa=Na,za=W,Wa=Hi.f,Ka=Cn,Ya=gr,Ja=Z,Za=Ua,Xa=Qa,$a=function(e,t){var n,r,i,a,s,o=e.target,d=e.global,c=e.stat;if(n=d?za:c?za[o]||Ja(o,{}):(za[o]||{}).prototype)for(r in t){if(a=t[r],i=e.dontCallGetSet?(s=Wa(n,r))&&s.value:n[r],!Xa(d?r:o+(c?".":"#")+r,e.forced)&&void 0!==i){if(typeof a==typeof i)continue;Za(a,i)}(e.sham||i&&i.sham)&&Ka(a,"sham",!0),Ya(n,r,a,e)}},es=ya,ts=wa,ns=Object.keys||function(e){return es(e,ts)},rs=ge,is=ns;$a({target:"Object",stat:!0,forced:ie((function(){is(1)}))},{keys:function(e){return is(rs(e))}});var as=TypeError,ss=Zt,os=tt,ds=Sn,cs=function(e,t,n){var r=ss(t);r in e?os.f(e,r,ds(0,n)):e[r]=n},us=ie,ls=Pe,hs=Ke("species"),ps=function(e){return ls>=51||!us((function(){var t=[];return(t.constructor={})[hs]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},fs=$a,ms=ie,As=ri,gs=at,vs=ge,bs=ti,_s=function(e){if(e>9007199254740991)throw as("Maximum allowed index exceeded");return e},ys=cs,ws=Ei,ks=ps,Es=Pe,xs=Ke("isConcatSpreadable"),Ds=Es>=51||!ms((function(){var e=[];return e[xs]=!1,e.concat()[0]!==e})),Ss=function(e){if(!gs(e))return!1;var t=e[xs];return void 0!==t?!!t:As(e)};fs({target:"Array",proto:!0,arity:1,forced:!Ds||!ks("concat")},{concat:function(e){var t,n,r,i,a,s=vs(this),o=ws(s,0),d=0;for(t=-1,r=arguments.length;t<r;t++)if(Ss(a=-1===t?s:arguments[t]))for(i=bs(a),_s(d+i),n=0;n<i;n++,d++)n in a&&ys(o,d,a[n]);else _s(d+1),ys(o,d++,a);return o.length=d,o}});var Rs=Array.isArray,Ts=Object.prototype.toString,Cs=Rs||function(e){return!!e&&"[object Array]"==Ts.call(e)},Is={name:"@bygd/gd-sdk-pes",version:"1.40.2",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",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"}},Os=function(e){var t=Ps("object"===n(e)?e:i(e));return t&&t.version?Is.version>=t.version?t:void 0:t},Ps=function(e){var n=this;if(!Cs(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}},Bs=function(){var e;(e=console).log.apply(e,arguments)},Ls=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 Us={},Ms=Rr,Fs=String,js=function(e){if("Symbol"===Ms(e))throw new TypeError("Cannot convert a Symbol value to a string");return Fs(e)},Ns={},Gs=nt,Hs=ht,Vs=tt,Qs=At,zs=Ji,Ws=ns;Ns.f=Gs&&!Hs?Object.defineProperties:function(e,t){Qs(e);for(var n,r=zs(t),i=Ws(t),a=i.length,s=0;a>s;)Vs.f(e,n=i[s++],r[n]);return e};var Ks,Ys=wt("document","documentElement"),Js=At,Zs=Ns,Xs=wa,$s=Ln,eo=Ys,to=ct,no="prototype",ro="script",ao=Bn("IE_PROTO"),so=function(){},oo=function(e){return"<"+ro+">"+e+"</"+ro+">"},co=function(e){e.write(oo("")),e.close();var t=e.parentWindow.Object;return e=null,t},uo=function(){try{Ks=new ActiveXObject("htmlfile")}catch(e){}var e,t,n;uo="undefined"!=typeof document?document.domain&&Ks?co(Ks):(t=to("iframe"),n="java"+ro+":",t.style.display="none",eo.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(oo("document.F=Object")),e.close(),e.F):co(Ks);for(var r=Xs.length;r--;)delete uo[no][Xs[r]];return uo()};$s[ao]=!0;var lo=Object.create||function(e,t){var n;return null!==e?(so[no]=Js(e),n=new so,so[no]=null,n[ao]=e):n=uo(),void 0===t?n:Zs.f(n,t)},ho={},po=ua,fo=ti,mo=cs,Ao=Array,go=Math.max,vo=function(e,t,n){for(var r=fo(e),i=po(t,r),a=po(void 0===n?r:n,r),s=Ao(go(a-i,0)),o=0;i<a;i++,o++)mo(s,o,e[i]);return s.length=o,s},bo=yr,_o=Ji,yo=sa.f,wo=vo,ko="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];ho.f=function(e){return ko&&"Window"===bo(e)?function(e){try{return yo(e)}catch(e){return wo(ko)}}(e):yo(_o(e))};var Eo=un.exports,xo=tt,Do=function(e,t,n){return n.get&&Eo(n.get,t,{getter:!0}),n.set&&Eo(n.set,t,{setter:!0}),xo.f(e,t,n)},So={},Ro=Ke;So.f=Ro;var To=W,Co=_e,Io=So,Oo=tt.f,Po=function(e){var t=To.Symbol||(To.Symbol={});Co(t,e)||Oo(t,e,{value:Io.f(e)})},Bo=bt,Lo=wt,Uo=Ke,Mo=gr,Fo=tt.f,jo=_e,No=Ke("toStringTag"),Go=function(e,t,n){e&&!n&&(e=e.prototype),e&&!jo(e,No)&&Fo(e,No,{configurable:!0,value:t})},qo=$a,Ho=W,Vo=bt,Qo=ue,zo=nt,Wo=Me,Ko=ie,Yo=_e,Jo=kt,Zo=At,Xo=Ji,$o=Zt,ed=js,td=Sn,nd=lo,rd=ns,id=sa,ad=ho,sd=xa,od=Hi,dd=tt,cd=Ns,ud=Vi,ld=gr,hd=Do,pd=K.exports,fd=Ln,md=xe,Ad=Ke,gd=So,vd=Po,bd=function(){var e=Lo("Symbol"),t=e&&e.prototype,n=t&&t.valueOf,r=Uo("toPrimitive");t&&!t[r]&&Mo(t,r,(function(e){return Bo(n,this)}),{arity:1})},_d=Go,yd=Yn,wd=Oi.forEach,kd=Bn("hidden"),Ed="Symbol",xd="prototype",Dd=yd.set,Sd=yd.getterFor(Ed),Rd=Object[xd],Td=Ho.Symbol,Cd=Td&&Td[xd],Id=Ho.RangeError,Od=Ho.TypeError,Pd=Ho.QObject,Bd=od.f,Ld=dd.f,Ud=ad.f,Md=ud.f,Fd=Qo([].push),jd=pd("symbols"),Nd=pd("op-symbols"),Gd=pd("wks"),qd=!Pd||!Pd[xd]||!Pd[xd].findChild,Hd=function(e,t,n){var r=Bd(Rd,t);r&&delete Rd[t],Ld(e,t,n),r&&e!==Rd&&Ld(Rd,t,r)},Vd=zo&&Ko((function(){return 7!==nd(Ld({},"a",{get:function(){return Ld(this,"a",{value:7}).a}})).a}))?Hd:Ld,Qd=function(e,t){var n=jd[e]=nd(Cd);return Dd(n,{type:Ed,tag:e,description:t}),zo||(n.description=t),n},zd=function(e,t,n){e===Rd&&zd(Nd,t,n),Zo(e);var r=$o(t);return Zo(n),Yo(jd,r)?(n.enumerable?(Yo(e,kd)&&e[kd][r]&&(e[kd][r]=!1),n=nd(n,{enumerable:td(0,!1)})):(Yo(e,kd)||Ld(e,kd,td(1,{})),e[kd][r]=!0),Vd(e,r,n)):Ld(e,r,n)},Wd=function(e,t){Zo(e);var n=Xo(t),r=rd(n).concat(Zd(n));return wd(r,(function(t){zo&&!Vo(Kd,n,t)||zd(e,t,n[t])})),e},Kd=function(e){var t=$o(e),n=Vo(Md,this,t);return!(this===Rd&&Yo(jd,t)&&!Yo(Nd,t))&&(!(n||!Yo(this,t)||!Yo(jd,t)||Yo(this,kd)&&this[kd][t])||n)},Yd=function(e,t){var n=Xo(e),r=$o(t);if(n!==Rd||!Yo(jd,r)||Yo(Nd,r)){var i=Bd(n,r);return!i||!Yo(jd,r)||Yo(n,kd)&&n[kd][r]||(i.enumerable=!0),i}},Jd=function(e){var t=Ud(Xo(e)),n=[];return wd(t,(function(e){Yo(jd,e)||Yo(fd,e)||Fd(n,e)})),n},Zd=function(e){var t=e===Rd,n=Ud(t?Nd:Xo(e)),r=[];return wd(n,(function(e){!Yo(jd,e)||t&&!Yo(Rd,e)||Fd(r,jd[e])})),r};Wo||(ld(Cd=(Td=function(){if(Jo(Cd,this))throw new Od("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?ed(arguments[0]):void 0,t=md(e),n=function(e){var r=void 0===this?Ho:this;r===Rd&&Vo(n,Nd,e),Yo(r,kd)&&Yo(r[kd],t)&&(r[kd][t]=!1);var i=td(1,e);try{Vd(r,t,i)}catch(e){if(!(e instanceof Id))throw e;Hd(r,t,i)}};return zo&&qd&&Vd(Rd,t,{configurable:!0,set:n}),Qd(t,e)})[xd],"toString",(function(){return Sd(this).tag})),ld(Td,"withoutSetter",(function(e){return Qd(md(e),e)})),ud.f=Kd,dd.f=zd,cd.f=Wd,od.f=Yd,id.f=ad.f=Jd,sd.f=Zd,gd.f=function(e){return Qd(Ad(e),e)},zo&&(hd(Cd,"description",{configurable:!0,get:function(){return Sd(this).description}}),ld(Rd,"propertyIsEnumerable",Kd,{unsafe:!0}))),qo({global:!0,constructor:!0,wrap:!0,forced:!Wo,sham:!Wo},{Symbol:Td}),wd(rd(Gd),(function(e){vd(e)})),qo({target:Ed,stat:!0,forced:!Wo},{useSetter:function(){qd=!0},useSimple:function(){qd=!1}}),qo({target:"Object",stat:!0,forced:!Wo,sham:!zo},{create:function(e,t){return void 0===t?nd(e):Wd(nd(e),t)},defineProperty:zd,defineProperties:Wd,getOwnPropertyDescriptor:Yd}),qo({target:"Object",stat:!0,forced:!Wo},{getOwnPropertyNames:Jd}),bd(),_d(Td,Ed),fd[kd]=!0;var Xd=Me&&!!Symbol.for&&!!Symbol.keyFor,$d=$a,ec=wt,tc=_e,nc=js,rc=K.exports,ic=Xd,ac=rc("string-to-symbol-registry"),sc=rc("symbol-to-string-registry");$d({target:"Symbol",stat:!0,forced:!ic},{for:function(e){var t=nc(e);if(tc(ac,t))return ac[t];var n=ec("Symbol")(t);return ac[t]=n,sc[n]=t,n}});var oc=$a,dc=_e,cc=Rt,uc=Ct,lc=Xd,hc=(0,K.exports)("symbol-to-string-registry");oc({target:"Symbol",stat:!0,forced:!lc},{keyFor:function(e){if(!cc(e))throw new TypeError(uc(e)+" is not a symbol");if(dc(hc,e))return hc[e]}});var pc=ae,fc=Function.prototype,mc=fc.apply,Ac=fc.call,gc="object"==typeof Reflect&&Reflect.apply||(pc?Ac.bind(mc):function(){return Ac.apply(mc,arguments)}),vc=ue([].slice),bc=ri,_c=et,yc=yr,wc=js,kc=ue([].push),Ec=$a,xc=wt,Dc=gc,Sc=bt,Rc=ue,Tc=ie,Cc=et,Ic=Rt,Oc=vc,Pc=function(e){if(_c(e))return e;if(bc(e)){for(var t=e.length,n=[],r=0;r<t;r++){var i=e[r];"string"==typeof i?kc(n,i):"number"!=typeof i&&"Number"!==yc(i)&&"String"!==yc(i)||kc(n,wc(i))}var a=n.length,s=!0;return function(e,t){if(s)return s=!1,t;if(bc(this))return t;for(var r=0;r<a;r++)if(n[r]===e)return t}}},Bc=Me,Lc=String,Uc=xc("JSON","stringify"),Mc=Rc(/./.exec),Fc=Rc("".charAt),jc=Rc("".charCodeAt),Nc=Rc("".replace),Gc=Rc(1..toString),qc=/[\uD800-\uDFFF]/g,Hc=/^[\uD800-\uDBFF]$/,Vc=/^[\uDC00-\uDFFF]$/,Qc=!Bc||Tc((function(){var e=xc("Symbol")("stringify detection");return"[null]"!==Uc([e])||"{}"!==Uc({a:e})||"{}"!==Uc(Object(e))})),zc=Tc((function(){return'"\\udf06\\ud834"'!==Uc("\udf06\ud834")||'"\\udead"'!==Uc("\udead")})),Wc=function(e,t){var n=Oc(arguments),r=Pc(t);if(Cc(r)||void 0!==e&&!Ic(e))return n[1]=function(e,t){if(Cc(r)&&(t=Sc(r,this,Lc(e),t)),!Ic(t))return t},Dc(Uc,null,n)},Kc=function(e,t,n){var r=Fc(n,t-1),i=Fc(n,t+1);return Mc(Hc,e)&&!Mc(Vc,i)||Mc(Vc,e)&&!Mc(Hc,r)?"\\u"+Gc(jc(e,0),16):e};Uc&&Ec({target:"JSON",stat:!0,arity:3,forced:Qc||zc},{stringify:function(e,t,n){var r=Oc(arguments),i=Dc(Qc?Wc:Uc,null,r);return zc&&"string"==typeof i?Nc(i,qc,Kc):i}});var Yc=xa,Jc=ge;$a({target:"Object",stat:!0,forced:!Me||ie((function(){Yc.f(1)}))},{getOwnPropertySymbols:function(e){var t=Yc.f;return t?t(Jc(e)):[]}});var Zc=Oi.filter;$a({target:"Array",proto:!0,forced:!ps("filter")},{filter:function(e){return Zc(this,e,arguments.length>1?arguments[1]:void 0)}});var Xc=$a,$c=ie,eu=Ji,tu=Hi.f,nu=nt;Xc({target:"Object",stat:!0,forced:!nu||$c((function(){tu(1)})),sham:!nu},{getOwnPropertyDescriptor:function(e,t){return tu(eu(e),t)}});var ru=Ia,iu=Ji,au=Hi,su=cs;$a({target:"Object",stat:!0,sham:!nt},{getOwnPropertyDescriptors:function(e){for(var t,n,r=iu(e),i=au.f,a=ru(r),s={},o=0;a.length>o;)void 0!==(n=i(r,t=a[o++]))&&su(s,t,n);return s}});var ou=$a,du=ri,cu=gi,uu=at,lu=ua,hu=ti,pu=Ji,fu=cs,mu=Ke,Au=vc,gu=ps("slice"),vu=mu("species"),bu=Array,_u=Math.max;ou({target:"Array",proto:!0,forced:!gu},{slice:function(e,t){var n,r,i,a=pu(this),s=hu(a),o=lu(e,s),d=lu(void 0===t?s:t,s);if(du(a)&&(n=a.constructor,(cu(n)&&(n===bu||du(n.prototype))||uu(n)&&null===(n=n[vu]))&&(n=void 0),n===bu||void 0===n))return Au(a,o,d);for(r=new(void 0===n?bu:n)(_u(d-o,0)),i=0;o<d;o++,i++)o in a&&fu(r,i,a[o]);return r.length=i,r}});var yu=At,wu=function(){var e=yu(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},ku=bt,Eu=_e,xu=kt,Du=wu,Su=RegExp.prototype,Ru=function(e){var t=e.flags;return void 0!==t||"flags"in Su||Eu(e,"flags")||!xu(Su,e)?t:ku(Du,e)},Tu=An.PROPER,Cu=gr,Iu=At,Ou=js,Pu=ie,Bu=Ru,Lu="toString",Uu=RegExp.prototype[Lu],Mu=Pu((function(){return"/a/b"!==Uu.call({source:"a",flags:"b"})})),Fu=Tu&&Uu.name!==Lu;(Mu||Fu)&&Cu(RegExp.prototype,Lu,(function(){var e=Iu(this);return"/"+Ou(e.source)+"/"+Ou(Bu(e))}),{unsafe:!0});var ju=bt,Nu=At,Gu=Mt,qu=function(e,t,n){var r,i;Nu(e);try{if(!(r=Gu(e,"return"))){if("throw"===t)throw n;return n}r=ju(r,e)}catch(e){i=!0,r=e}if("throw"===t)throw n;if(i)throw r;return Nu(r),n},Hu=At,Vu=qu,Qu={},zu=Qu,Wu=Ke("iterator"),Ku=Array.prototype,Yu=function(e){return void 0!==e&&(zu.Array===e||Ku[Wu]===e)},Ju=Rr,Zu=Mt,Xu=le,$u=Qu,el=Ke("iterator"),tl=function(e){if(!Xu(e))return Zu(e,el)||Zu(e,"@@iterator")||$u[Ju(e)]},nl=bt,rl=Bt,il=At,al=Ct,sl=tl,ol=TypeError,dl=function(e,t){var n=arguments.length<2?sl(e):t;if(rl(n))return il(nl(n,e));throw new ol(al(e)+" is not iterable")},cl=Gr,ul=bt,ll=ge,hl=function(e,t,n,r){try{return r?t(Hu(n)[0],n[1]):t(n)}catch(t){Vu(e,"throw",t)}},pl=Yu,fl=gi,ml=ti,Al=cs,gl=dl,vl=tl,bl=Array,_l=function(e){var t=ll(e),n=fl(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,c,u,l,h=vl(t),p=0;if(!h||this===bl&&pl(h))for(s=ml(t),o=n?new this(s):bl(s);s>p;p++)l=a?i(t[p],p):t[p],Al(o,p,l);else for(u=(c=gl(t,h)).next,o=n?new this:[];!(d=ul(u,c)).done;p++)l=a?hl(c,i,[d.value,p],!0):d.value,Al(o,p,l);return o.length=p,o},yl=Ke("iterator"),wl=!1;try{var kl=0,El={next:function(){return{done:!!kl++}},return:function(){wl=!0}};El[yl]=function(){return this},Array.from(El,(function(){throw 2}))}catch(e){}var xl=function(e,t){try{if(!t&&!wl)return!1}catch(e){return!1}var n=!1;try{var r={};r[yl]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch(e){}return n},Dl=_l;$a({target:"Array",stat:!0,forced:!xl((function(e){Array.from(e)}))},{from:Dl});var Sl,Rl,Tl,Cl=ue,Il=Jr,Ol=js,Pl=fe,Bl=Cl("".charAt),Ll=Cl("".charCodeAt),Ul=Cl("".slice),Ml=function(e){return function(t,n){var r,i,a=Ol(Pl(t)),s=Il(n),o=a.length;return s<0||s>=o?e?"":void 0:(r=Ll(a,s))<55296||r>56319||s+1===o||(i=Ll(a,s+1))<56320||i>57343?e?Bl(a,s):r:e?Ul(a,s,s+2):i-56320+(r-55296<<10)+65536}},Fl={codeAt:Ml(!1),charAt:Ml(!0)},jl=!ie((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),Nl=_e,Gl=et,ql=ge,Hl=jl,Vl=Bn("IE_PROTO"),Ql=Object,zl=Ql.prototype,Wl=Hl?Ql.getPrototypeOf:function(e){var t=ql(e);if(Nl(t,Vl))return t[Vl];var n=t.constructor;return Gl(n)&&t instanceof n?n.prototype:t instanceof Ql?zl:null},Kl=ie,Yl=et,Jl=at,Zl=Wl,Xl=gr,$l=Ke("iterator"),eh=!1;[].keys&&("next"in(Tl=[].keys())?(Rl=Zl(Zl(Tl)))!==Object.prototype&&(Sl=Rl):eh=!0);var th=!Jl(Sl)||Kl((function(){var e={};return Sl[$l].call(e)!==e}));th&&(Sl={}),Yl(Sl[$l])||Xl(Sl,$l,(function(){return this}));var nh={IteratorPrototype:Sl,BUGGY_SAFARI_ITERATORS:eh},rh=nh.IteratorPrototype,ih=lo,ah=Sn,sh=Go,oh=Qu,dh=function(){return this},ch=function(e,t,n,r){var i=t+" Iterator";return e.prototype=ih(rh,{next:ah(+!r,n)}),sh(e,i,!1),oh[i]=dh,e},uh=ue,lh=Bt,hh=et,ph=String,fh=TypeError,mh=function(e,t,n){try{return uh(lh(Object.getOwnPropertyDescriptor(e,t)[n]))}catch(e){}},Ah=At,gh=function(e){if("object"==typeof e||hh(e))return e;throw new fh("Can't set "+ph(e)+" as a prototype")},vh=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=mh(Object.prototype,"__proto__","set"))(n,[]),t=n instanceof Array}catch(e){}return function(n,r){return Ah(n),gh(r),t?e(n,r):n.__proto__=r,n}}():void 0),bh=$a,_h=bt,yh=et,wh=ch,kh=Wl,Eh=vh,xh=Go,Dh=Cn,Sh=gr,Rh=Qu,Th=An.PROPER,Ch=An.CONFIGURABLE,Ih=nh.IteratorPrototype,Oh=nh.BUGGY_SAFARI_ITERATORS,Ph=Ke("iterator"),Bh="keys",Lh="values",Uh="entries",Mh=function(){return this},Fh=function(e,t,n,r,i,a,s){wh(n,t,r);var o,d,c,u=function(e){if(e===i&&m)return m;if(!Oh&&e&&e in p)return p[e];switch(e){case Bh:case Lh:case Uh:return function(){return new n(this,e)}}return function(){return new n(this)}},l=t+" Iterator",h=!1,p=e.prototype,f=p[Ph]||p["@@iterator"]||i&&p[i],m=!Oh&&f||u(i),A="Array"===t&&p.entries||f;if(A&&(o=kh(A.call(new e)))!==Object.prototype&&o.next&&(kh(o)!==Ih&&(Eh?Eh(o,Ih):yh(o[Ph])||Sh(o,Ph,Mh)),xh(o,l,!0)),Th&&i===Lh&&f&&f.name!==Lh&&(Ch?Dh(p,"name",Lh):(h=!0,m=function(){return _h(f,this)})),i)if(d={values:u(Lh),keys:a?m:u(Bh),entries:u(Uh)},s)for(c in d)(Oh||h||!(c in p))&&Sh(p,c,d[c]);else bh({target:t,proto:!0,forced:Oh||h},d);return p[Ph]!==m&&Sh(p,Ph,m,{name:i}),Rh[t]=m,d},jh=function(e,t){return{value:e,done:t}},Nh=Fl.charAt,Gh=js,qh=Yn,Hh=Fh,Vh=jh,Qh="String Iterator",zh=qh.set,Wh=qh.getterFor(Qh);Hh(String,"String",(function(e){zh(this,{type:Qh,string:Gh(e),index:0})}),(function(){var e,t=Wh(this),n=t.string,r=t.index;return r>=n.length?Vh(void 0,!0):(e=Nh(n,r),t.index+=e.length,Vh(e,!1))}));var Kh=ie,Yh=W.RegExp,Jh=Kh((function(){var e=Yh("a","y");return e.lastIndex=2,null!==e.exec("abcd")})),Zh=Jh||Kh((function(){return!Yh("a","y").sticky})),Xh={BROKEN_CARET:Jh||Kh((function(){var e=Yh("^r","gy");return e.lastIndex=2,null!==e.exec("str")})),MISSED_STICKY:Zh,UNSUPPORTED_Y:Jh},$h=ie,ep=W.RegExp,tp=$h((function(){var e=ep(".","s");return!(e.dotAll&&e.test("\n")&&"s"===e.flags)})),np=ie,rp=W.RegExp,ip=np((function(){var e=rp("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),ap=bt,sp=ue,op=js,dp=wu,cp=Xh,up=K.exports,lp=lo,hp=Yn.get,pp=tp,fp=ip,mp=up("native-string-replace",String.prototype.replace),Ap=RegExp.prototype.exec,gp=Ap,vp=sp("".charAt),bp=sp("".indexOf),_p=sp("".replace),yp=sp("".slice),wp=function(){var e=/a/,t=/b*/g;return ap(Ap,e,"a"),ap(Ap,t,"a"),0!==e.lastIndex||0!==t.lastIndex}(),kp=cp.BROKEN_CARET,Ep=void 0!==/()??/.exec("")[1];(wp||Ep||kp||pp||fp)&&(gp=function(e){var t,n,r,i,a,s,o,d=this,c=hp(d),u=op(e),l=c.raw;if(l)return l.lastIndex=d.lastIndex,t=ap(gp,l,u),d.lastIndex=l.lastIndex,t;var h=c.groups,p=kp&&d.sticky,f=ap(dp,d),m=d.source,A=0,g=u;if(p&&(f=_p(f,"y",""),-1===bp(f,"g")&&(f+="g"),g=yp(u,d.lastIndex),d.lastIndex>0&&(!d.multiline||d.multiline&&"\n"!==vp(u,d.lastIndex-1))&&(m="(?: "+m+")",g=" "+g,A++),n=new RegExp("^(?:"+m+")",f)),Ep&&(n=new RegExp("^"+m+"$(?!\\s)",f)),wp&&(r=d.lastIndex),i=ap(Ap,p?n:d,g),p?i?(i.input=yp(i.input,A),i[0]=yp(i[0],A),i.index=d.lastIndex,d.lastIndex+=i[0].length):d.lastIndex=0:wp&&i&&(d.lastIndex=d.global?i.index+i[0].length:r),Ep&&i&&i.length>1&&ap(mp,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=lp(null),a=0;a<h.length;a++)s[(o=h[a])[0]]=i[o[1]];return i});var xp=gp;$a({target:"RegExp",proto:!0,forced:/./.exec!==xp},{exec:xp});var Dp=$a,Sp=nt,Rp=ue,Tp=_e,Cp=et,Ip=kt,Op=js,Pp=Do,Bp=Ua,Lp=W.Symbol,Up=Lp&&Lp.prototype;if(Sp&&Cp(Lp)&&(!("description"in Up)||void 0!==Lp().description)){var Mp={},Fp=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:Op(arguments[0]),t=Ip(Up,this)?new Lp(e):void 0===e?Lp():Lp(e);return""===e&&(Mp[t]=!0),t};Bp(Fp,Lp),Fp.prototype=Up,Up.constructor=Fp;var jp="Symbol(description detection)"===String(Lp("description detection")),Np=Rp(Up.valueOf),Gp=Rp(Up.toString),qp=/^Symbol\((.*)\)[^)]+$/,Hp=Rp("".replace),Vp=Rp("".slice);Pp(Up,"description",{configurable:!0,get:function(){var e=Np(this);if(Tp(Mp,e))return"";var t=Gp(e),n=jp?Vp(t,7,-1):Hp(t,qp,"$1");return""===n?void 0:n}}),Dp({global:!0,constructor:!0,forced:!0},{Symbol:Fp})}Po("iterator");var Qp=Ke,zp=lo,Wp=tt.f,Kp=Qp("unscopables"),Yp=Array.prototype;void 0===Yp[Kp]&&Wp(Yp,Kp,{configurable:!0,value:zp(null)});var Jp=function(e){Yp[Kp][e]=!0},Zp=Ji,Xp=Jp,$p=Qu,ef=Yn,tf=tt.f,nf=Fh,rf=jh,af=nt,sf="Array Iterator",of=ef.set,df=ef.getterFor(sf),cf=nf(Array,"Array",(function(e,t){of(this,{type:sf,target:Zp(e),index:0,kind:t})}),(function(){var e=df(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=void 0,rf(void 0,!0);switch(e.kind){case"keys":return rf(n,!1);case"values":return rf(t[n],!1)}return rf([n,t[n]],!1)}),"values"),uf=$p.Arguments=$p.Array;if(Xp("keys"),Xp("values"),Xp("entries"),af&&"values"!==uf.name)try{tf(uf,"name",{value:"values"})}catch(e){}var lf=W,hf=Ir,pf=Br,ff=cf,mf=Cn,Af=Go,gf=Ke("iterator"),vf=ff.values,bf=function(e,t){if(e){if(e[gf]!==vf)try{mf(e,gf,vf)}catch(t){e[gf]=vf}if(Af(e,t,!0),hf[t])for(var n in ff)if(e[n]!==ff[n])try{mf(e,n,ff[n])}catch(t){e[n]=ff[n]}}};for(var _f in hf)bf(lf[_f]&&lf[_f].prototype,_f);bf(pf,"DOMTokenList");var yf,wf,kf,Ef,xf="process"===yr(W.process),Df=wt,Sf=Do,Rf=nt,Tf=Ke("species"),Cf=function(e){var t=Df(e);Rf&&t&&!t[Tf]&&Sf(t,Tf,{configurable:!0,get:function(){return this}})},If=kt,Of=TypeError,Pf=function(e,t){if(If(t,e))return e;throw new Of("Incorrect invocation")},Bf=gi,Lf=Ct,Uf=TypeError,Mf=At,Ff=function(e){if(Bf(e))return e;throw new Uf(Lf(e)+" is not a constructor")},jf=le,Nf=Ke("species"),Gf=function(e,t){var n,r=Mf(e).constructor;return void 0===r||jf(n=Mf(r)[Nf])?t:Ff(n)},qf=TypeError,Hf=function(e,t){if(e<t)throw new qf("Not enough arguments");return e},Vf=/(?:ipad|iphone|ipod).*applewebkit/i.test(De),Qf=W,zf=gc,Wf=Gr,Kf=et,Yf=_e,Jf=ie,Zf=Ys,Xf=vc,$f=ct,em=Hf,tm=Vf,nm=xf,rm=Qf.setImmediate,im=Qf.clearImmediate,am=Qf.process,sm=Qf.Dispatch,om=Qf.Function,dm=Qf.MessageChannel,cm=Qf.String,um=0,lm={},hm="onreadystatechange";Jf((function(){yf=Qf.location}));var pm=function(e){if(Yf(lm,e)){var t=lm[e];delete lm[e],t()}},fm=function(e){return function(){pm(e)}},mm=function(e){pm(e.data)},Am=function(e){Qf.postMessage(cm(e),yf.protocol+"//"+yf.host)};rm&&im||(rm=function(e){em(arguments.length,1);var t=Kf(e)?e:om(e),n=Xf(arguments,1);return lm[++um]=function(){zf(t,void 0,n)},wf(um),um},im=function(e){delete lm[e]},nm?wf=function(e){am.nextTick(fm(e))}:sm&&sm.now?wf=function(e){sm.now(fm(e))}:dm&&!tm?(Ef=(kf=new dm).port2,kf.port1.onmessage=mm,wf=Wf(Ef.postMessage,Ef)):Qf.addEventListener&&Kf(Qf.postMessage)&&!Qf.importScripts&&yf&&"file:"!==yf.protocol&&!Jf(Am)?(wf=Am,Qf.addEventListener("message",mm,!1)):wf=hm in $f("script")?function(e){Zf.appendChild($f("script"))[hm]=function(){Zf.removeChild(this),pm(e)}}:function(e){setTimeout(fm(e),0)});var gm={set:rm,clear:im},vm=function(){this.head=null,this.tail=null};vm.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 bm,_m,ym,wm,km,Em=vm,xm=/ipad|iphone|ipod/i.test(De)&&"undefined"!=typeof Pebble,Dm=/web0s(?!.*chrome)/i.test(De),Sm=W,Rm=Gr,Tm=Hi.f,Cm=gm.set,Im=Em,Om=Vf,Pm=xm,Bm=Dm,Lm=xf,Um=Sm.MutationObserver||Sm.WebKitMutationObserver,Mm=Sm.document,Fm=Sm.process,jm=Sm.Promise,Nm=Tm(Sm,"queueMicrotask"),Gm=Nm&&Nm.value;if(!Gm){var qm=new Im,Hm=function(){var e,t;for(Lm&&(e=Fm.domain)&&e.exit();t=qm.get();)try{t()}catch(e){throw qm.head&&bm(),e}e&&e.enter()};Om||Lm||Bm||!Um||!Mm?!Pm&&jm&&jm.resolve?((wm=jm.resolve(void 0)).constructor=jm,km=Rm(wm.then,wm),bm=function(){km(Hm)}):Lm?bm=function(){Fm.nextTick(Hm)}:(Cm=Rm(Cm,Sm),bm=function(){Cm(Hm)}):(_m=!0,ym=Mm.createTextNode(""),new Um(Hm).observe(ym,{characterData:!0}),bm=function(){ym.data=_m=!_m}),Gm=function(e){qm.head||bm(),qm.add(e)}}var Vm=Gm,Qm=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},zm=W.Promise,Wm="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,Km=!Wm&&!xf&&"object"==typeof window&&"object"==typeof document,Ym=W,Jm=zm,Zm=et,Xm=Qa,$m=kn,eA=Ke,tA=Km,nA=Wm,rA=Pe;Jm&&Jm.prototype;var iA=eA("species"),aA=!1,sA=Zm(Ym.PromiseRejectionEvent),oA=Xm("Promise",(function(){var e=$m(Jm),t=e!==String(Jm);if(!t&&66===rA)return!0;if(!rA||rA<51||!/native code/.test(e)){var n=new Jm((function(e){e(1)})),r=function(e){e((function(){}),(function(){}))};if((n.constructor={})[iA]=r,!(aA=n.then((function(){}))instanceof r))return!0}return!t&&(tA||nA)&&!sA})),dA={CONSTRUCTOR:oA,REJECTION_EVENT:sA,SUBCLASSING:aA},cA={},uA=Bt,lA=TypeError,hA=function(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw new lA("Bad Promise constructor");t=e,n=r})),this.resolve=uA(t),this.reject=uA(n)};cA.f=function(e){return new hA(e)};var pA,fA,mA,AA=$a,gA=xf,vA=W,bA=bt,_A=gr,yA=vh,wA=Go,kA=Cf,EA=Bt,xA=et,DA=at,SA=Pf,RA=Gf,TA=gm.set,CA=Vm,IA=function(e,t){try{1===arguments.length?console.error(e):console.error(e,t)}catch(e){}},OA=Qm,PA=Em,BA=Yn,LA=zm,UA=cA,MA="Promise",FA=dA.CONSTRUCTOR,jA=dA.REJECTION_EVENT,NA=dA.SUBCLASSING,GA=BA.getterFor(MA),qA=BA.set,HA=LA&&LA.prototype,VA=LA,QA=HA,zA=vA.TypeError,WA=vA.document,KA=vA.process,YA=UA.f,JA=YA,ZA=!!(WA&&WA.createEvent&&vA.dispatchEvent),XA="unhandledrejection",$A=function(e){var t;return!(!DA(e)||!xA(t=e.then))&&t},eg=function(e,t){var n,r,i,a=t.value,s=1===t.state,o=s?e.ok:e.fail,d=e.resolve,c=e.reject,u=e.domain;try{o?(s||(2===t.rejection&&ag(t),t.rejection=1),!0===o?n=a:(u&&u.enter(),n=o(a),u&&(u.exit(),i=!0)),n===e.promise?c(new zA("Promise-chain cycle")):(r=$A(n))?bA(r,n,d,c):d(n)):c(a)}catch(e){u&&!i&&u.exit(),c(e)}},tg=function(e,t){e.notified||(e.notified=!0,CA((function(){for(var n,r=e.reactions;n=r.get();)eg(n,e);e.notified=!1,t&&!e.rejection&&rg(e)})))},ng=function(e,t,n){var r,i;ZA?((r=WA.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),vA.dispatchEvent(r)):r={promise:t,reason:n},!jA&&(i=vA["on"+e])?i(r):e===XA&&IA("Unhandled promise rejection",n)},rg=function(e){bA(TA,vA,(function(){var t,n=e.facade,r=e.value;if(ig(e)&&(t=OA((function(){gA?KA.emit("unhandledRejection",r,n):ng(XA,n,r)})),e.rejection=gA||ig(e)?2:1,t.error))throw t.value}))},ig=function(e){return 1!==e.rejection&&!e.parent},ag=function(e){bA(TA,vA,(function(){var t=e.facade;gA?KA.emit("rejectionHandled",t):ng("rejectionhandled",t,e.value)}))},sg=function(e,t,n){return function(r){e(t,r,n)}},og=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,tg(e,!0))},dg=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw new zA("Promise can't be resolved itself");var r=$A(t);r?CA((function(){var n={done:!1};try{bA(r,t,sg(dg,n,e),sg(og,n,e))}catch(t){og(n,t,e)}})):(e.value=t,e.state=1,tg(e,!1))}catch(t){og({done:!1},t,e)}}};if(FA&&(QA=(VA=function(e){SA(this,QA),EA(e),bA(pA,this);var t=GA(this);try{e(sg(dg,t),sg(og,t))}catch(e){og(t,e)}}).prototype,(pA=function(e){qA(this,{type:MA,done:!1,notified:!1,parent:!1,reactions:new PA,rejection:!1,state:0,value:void 0})}).prototype=_A(QA,"then",(function(e,t){var n=GA(this),r=YA(RA(this,VA));return n.parent=!0,r.ok=!xA(e)||e,r.fail=xA(t)&&t,r.domain=gA?KA.domain:void 0,0===n.state?n.reactions.add(r):CA((function(){eg(r,n)})),r.promise})),fA=function(){var e=new pA,t=GA(e);this.promise=e,this.resolve=sg(dg,t),this.reject=sg(og,t)},UA.f=YA=function(e){return e===VA||undefined===e?new fA(e):JA(e)},xA(LA)&&HA!==Object.prototype)){mA=HA.then,NA||_A(HA,"then",(function(e,t){var n=this;return new VA((function(e,t){bA(mA,n,e,t)})).then(e,t)}),{unsafe:!0});try{delete HA.constructor}catch(e){}yA&&yA(HA,QA)}AA({global:!0,constructor:!0,wrap:!0,forced:FA},{Promise:VA}),wA(VA,MA,!1),kA(MA);var cg=Gr,ug=bt,lg=At,hg=Ct,pg=Yu,fg=ti,mg=kt,Ag=dl,gg=tl,vg=qu,bg=TypeError,_g=function(e,t){this.stopped=e,this.result=t},yg=_g.prototype,wg=function(e,t,n){var r,i,a,s,o,d,c,u=n&&n.that,l=!(!n||!n.AS_ENTRIES),h=!(!n||!n.IS_RECORD),p=!(!n||!n.IS_ITERATOR),f=!(!n||!n.INTERRUPTED),m=cg(t,u),A=function(e){return r&&vg(r,"normal",e),new _g(!0,e)},g=function(e){return l?(lg(e),f?m(e[0],e[1],A):m(e[0],e[1])):f?m(e,A):m(e)};if(h)r=e.iterator;else if(p)r=e;else{if(!(i=gg(e)))throw new bg(hg(e)+" is not iterable");if(pg(i)){for(a=0,s=fg(e);s>a;a++)if((o=g(e[a]))&&mg(yg,o))return o;return new _g(!1)}r=Ag(e,i)}for(d=h?e.next:r.next;!(c=ug(d,r)).done;){try{o=g(c.value)}catch(e){vg(r,"throw",e)}if("object"==typeof o&&o&&mg(yg,o))return o}return new _g(!1)},kg=zm,Eg=dA.CONSTRUCTOR||!xl((function(e){kg.all(e).then(void 0,(function(){}))})),xg=bt,Dg=Bt,Sg=cA,Rg=Qm,Tg=wg;$a({target:"Promise",stat:!0,forced:Eg},{all:function(e){var t=this,n=Sg.f(t),r=n.resolve,i=n.reject,a=Rg((function(){var n=Dg(t.resolve),a=[],s=0,o=1;Tg(e,(function(e){var d=s++,c=!1;o++,xg(n,t,e).then((function(e){c||(c=!0,a[d]=e,--o||r(a))}),i)})),--o||r(a)}));return a.error&&i(a.value),n.promise}});var Cg=$a,Ig=dA.CONSTRUCTOR,Og=zm,Pg=wt,Bg=et,Lg=gr,Ug=Og&&Og.prototype;if(Cg({target:"Promise",proto:!0,forced:Ig,real:!0},{catch:function(e){return this.then(void 0,e)}}),Bg(Og)){var Mg=Pg("Promise").prototype.catch;Ug.catch!==Mg&&Lg(Ug,"catch",Mg,{unsafe:!0})}var Fg=bt,jg=Bt,Ng=cA,Gg=Qm,qg=wg;$a({target:"Promise",stat:!0,forced:Eg},{race:function(e){var t=this,n=Ng.f(t),r=n.reject,i=Gg((function(){var i=jg(t.resolve);qg(e,(function(e){Fg(i,t,e).then(n.resolve,r)}))}));return i.error&&r(i.value),n.promise}});var Hg=bt,Vg=cA;$a({target:"Promise",stat:!0,forced:dA.CONSTRUCTOR},{reject:function(e){var t=Vg.f(this);return Hg(t.reject,void 0,e),t.promise}});var Qg=At,zg=at,Wg=cA,Kg=function(e,t){if(Qg(e),zg(t)&&t.constructor===e)return t;var n=Wg.f(e);return(0,n.resolve)(t),n.promise},Yg=$a,Jg=dA.CONSTRUCTOR,Zg=Kg;wt("Promise"),Yg({target:"Promise",stat:!0,forced:Jg},{resolve:function(e){return Zg(this,e)}});var Xg=nt,$g=An.EXISTS,ev=ue,tv=Do,nv=Function.prototype,rv=ev(nv.toString),iv=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,av=ev(iv.exec);function sv(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 ov(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 ov(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 ov(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 dv(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 cv(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?dv(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dv(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}Xg&&!$g&&tv(nv,"name",{configurable:!0,get:function(){try{return av(iv,rv(this))[1]}catch(e){return""}}});var uv,lv={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"}},hv={},pv=function(e,t){hv[e]=cv(cv({},t),{},{isLoading:!1})},fv=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))},mv=function(){var t=e(r.mark((function e(t){var n,i,a,s,o,d,c,u;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=hv[t]).isLoading){e.next=6;break}return e.abrupt("return");case 6:i.isLoading=!0,a=sv(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=lv[o].name,!window[d]){e.next=16;break}return e.abrupt("continue",24);case 16:return e.next=18,fv({id:o,src:lv[o].src});case 18:e.next=24;break;case 20:e.prev=20,e.t0=e.catch(12),c=o.id,u=o.src,console.log("Could not load external script ".concat(c," ").concat(u),e.t0);case 24:e.next=10;break;case 26:e.next=31;break;case 28:e.prev=28,e.t1=e.catch(8),a.e(e.t1);case 31:return e.prev=31,a.f(),e.finish(31);case 34:return e.prev=34,e.next=37,fv({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)}}(),Av=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,mv("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"]},pv(this.moduleName,this.moduleConfig)})),gv=new Av,vv=at,bv=yr,_v=Ke("match"),yv=function(e){var t;return vv(e)&&(void 0!==(t=e[_v])?!!t:"RegExp"===bv(e))},wv=yv,kv=TypeError,Ev=function(e){if(wv(e))throw new kv("The method doesn't accept regular expressions");return e},xv=Ke("match"),Dv=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[xv]=!1,"/./"[e](t)}catch(e){}}return!1},Sv=$a,Rv=Mr,Tv=Hi.f,Cv=$r,Iv=js,Ov=Ev,Pv=fe,Bv=Dv,Lv=Rv("".startsWith),Uv=Rv("".slice),Mv=Math.min,Fv=Bv("startsWith");Sv({target:"String",proto:!0,forced:!!(Fv||(uv=Tv(String.prototype,"startsWith"),!uv||uv.writable))&&!Fv},{startsWith:function(e){var t=Iv(Pv(this));Ov(e);var n=Cv(Mv(arguments.length>1?arguments[1]:void 0,t.length)),r=Iv(e);return Lv?Lv(t,r,n):Uv(t,n,n+r.length)===r}});var jv=Mr,Nv=gr,Gv=xp,qv=ie,Hv=Ke,Vv=Cn,Qv=Hv("species"),zv=RegExp.prototype,Wv=function(e,t,n,r){var i=Hv(e),a=!qv((function(){var t={};return t[i]=function(){return 7},7!==""[e](t)})),s=a&&!qv((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[Qv]=function(){return n},n.flags="",n[i]=/./[i]),n.exec=function(){return t=!0,null},n[i](""),!t}));if(!a||!s||n){var o=jv(/./[i]),d=t(i,""[e],(function(e,t,n,r,i){var s=jv(e),d=t.exec;return d===Gv||d===zv.exec?a&&!i?{done:!0,value:o(t,n,r)}:{done:!0,value:s(n,t,r)}:{done:!1}}));Nv(String.prototype,e,d[0]),Nv(zv,i,d[1])}r&&Vv(zv[i],"sham",!0)},Kv=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t},Yv=bt,Jv=At,Zv=et,Xv=yr,$v=xp,eb=TypeError,tb=function(e,t){var n=e.exec;if(Zv(n)){var r=Yv(n,e,t);return null!==r&&Jv(r),r}if("RegExp"===Xv(e))return Yv($v,e,t);throw new eb("RegExp#exec called on incompatible receiver")},nb=bt,rb=At,ib=le,ab=fe,sb=Kv,ob=js,db=Mt,cb=tb;function ub(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 lb(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ub(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ub(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}Wv("search",(function(e,t,n){return[function(t){var n=ab(this),r=ib(t)?void 0:db(t,e);return r?nb(r,t,n):new RegExp(t)[e](ob(n))},function(e){var r=rb(this),i=ob(e),a=n(t,r,i);if(a.done)return a.value;var s=r.lastIndex;sb(s,0)||(r.lastIndex=0);var o=cb(r,i);return sb(r.lastIndex,s)||(r.lastIndex=s),null===o?-1:o.index}]}));var hb,pb,fb=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()),u=decodeURIComponent((e||n)&&r.topDomain?r.topDomain:n&&0===o()?d:c()),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,A=(e||n)&&r.loaderEnabled,g=(e||n)&&r.loaderEnabled;console.log("noMinijuegosSDK",g);var v=(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:v,parentURL:i,parentDomain:d,topDomain:u&&u.length?u:d,noGAPageView:f,noLotamePageView:m,noGamedockSDK:A,noMinijuegosSDK:g,version:r.version,pauseGameOnStartup:b,depth:o(),domainMatched:d===u,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 C(location.href,!0);if(!n.query.gd_zone_config)return;e=n.query.gd_zone_config}else if(t.test(document.referrer)){var r=new C(document.referrer,!0);if(!r.query.gd_zone_config)return;e=r.query.gd_zone_config}else{var i=new C(location.href,!0);if(!i.query.gd_zone_config)return;e=i.query.gd_zone_config}return JSON.parse(I.decode(decodeURIComponent(e)))}catch(e){}}},{key:"_formatTokenURLSearch",value:function(e){var t="";try{t=encodeURIComponent(I.encode(JSON.stringify(e)))}catch(e){}try{var n=new C(location.href,!0);return n.query=n.query||{},n.query.gd_zone_config=t,"?".concat(qs.stringify(n.query))}catch(e){return"?gd_zone_config=".concat(t)}}},{key:"_extendUrlQuery",value:function(e,t){var n=new C(e,!0);return n.query=lb(lb({},n.query),t),n.toString()}},{key:"_base64_encode",value:function(e){return I.encode(JSON.stringify(e))}}]),e}(),mb=function(){try{return(new fb).getBridgeContext()}catch(e){return{}}}(),Ab={userDeclinedTracking:document.location.search.indexOf("gdpr-tracking=0")>=0||document.cookie.indexOf("ogdpr_tracking=0")>=0,whitelabelPartner:(hb=!1,(pb=d("xanthophyll")).hasOwnProperty("xanthophyll")&&"true"===pb.xanthophyll&&(hb=!0),hb)},gb=Fl.charAt,vb=ue,bb=ge,_b=Math.floor,yb=vb("".charAt),wb=vb("".replace),kb=vb("".slice),Eb=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,xb=/\$([$&'`]|\d{1,2})/g,Db=gc,Sb=bt,Rb=ue,Tb=Wv,Cb=ie,Ib=At,Ob=et,Pb=le,Bb=Jr,Lb=$r,Ub=js,Mb=fe,Fb=function(e,t,n){return t+(n?gb(e,t).length:1)},jb=Mt,Nb=function(e,t,n,r,i,a){var s=n+e.length,o=r.length,d=xb;return void 0!==i&&(i=bb(i),d=Eb),wb(a,d,(function(a,d){var c;switch(yb(d,0)){case"$":return"$";case"&":return e;case"`":return kb(t,0,n);case"'":return kb(t,s);case"<":c=i[kb(d,1,-1)];break;default:var u=+d;if(0===u)return a;if(u>o){var l=_b(u/10);return 0===l?a:l<=o?void 0===r[l-1]?yb(d,1):r[l-1]+yb(d,1):a}c=r[u-1]}return void 0===c?"":c}))},Gb=tb,qb=Ke("replace"),Hb=Math.max,Vb=Math.min,Qb=Rb([].concat),zb=Rb([].push),Wb=Rb("".indexOf),Kb=Rb("".slice),Yb="$0"==="a".replace(/./,"$0"),Jb=!!/./[qb]&&""===/./[qb]("a","$0");Tb("replace",(function(e,t,n){var r=Jb?"$":"$0";return[function(e,n){var r=Mb(this),i=Pb(e)?void 0:jb(e,qb);return i?Sb(i,e,r,n):Sb(t,Ub(r),e,n)},function(e,i){var a=Ib(this),s=Ub(e);if("string"==typeof i&&-1===Wb(i,r)&&-1===Wb(i,"$<")){var o=n(t,a,s,i);if(o.done)return o.value}var d=Ob(i);d||(i=Ub(i));var c,u=a.global;u&&(c=a.unicode,a.lastIndex=0);for(var l,h=[];null!==(l=Gb(a,s))&&(zb(h,l),u);){""===Ub(l[0])&&(a.lastIndex=Fb(s,Lb(a.lastIndex),c))}for(var p,f="",m=0,A=0;A<h.length;A++){for(var g,v=Ub((l=h[A])[0]),b=Hb(Vb(Bb(l.index),s.length),0),_=[],y=1;y<l.length;y++)zb(_,void 0===(p=l[y])?p:String(p));var w=l.groups;if(d){var k=Qb([v],_,b,s);void 0!==w&&zb(k,w),g=Ub(Db(i,void 0,k))}else g=Nb(v,s,b,_,w,i);b>=m&&(f+=Kb(s,m,b)+g,m=b+v.length)}return f+Kb(s,m)}]}),!!Cb((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}))||!Yb||Jb);var Zb=ie,Xb=nt,$b=Ke("iterator"),e_=!Zb((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,n=new URLSearchParams("a=1&a=2&b=3"),r="";return e.pathname="c%20d",t.forEach((function(e,n){t.delete("b"),r+=n+e})),n.delete("a",2),n.delete("b",void 0),!t.size&&!Xb||!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[$b]||"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"!==r||"x"!==new URL("http://x",void 0).host})),t_=gr,n_=vo,r_=Math.floor,i_=function(e,t){var n=e.length,r=r_(n/2);return n<8?a_(e,t):s_(e,i_(n_(e,0,r),t),i_(n_(e,r),t),t)},a_=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},s_=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},o_=$a,d_=W,c_=bt,u_=ue,l_=nt,h_=e_,p_=gr,f_=Do,m_=function(e,t,n){for(var r in t)t_(e,r,t[r],n);return e},A_=Go,g_=ch,v_=Yn,b_=Pf,__=et,y_=_e,w_=Gr,k_=Rr,E_=At,x_=at,D_=js,S_=lo,R_=Sn,T_=dl,C_=tl,I_=jh,O_=Hf,P_=i_,B_=Ke("iterator"),L_="URLSearchParams",U_=L_+"Iterator",M_=v_.set,F_=v_.getterFor(L_),j_=v_.getterFor(U_),N_=Object.getOwnPropertyDescriptor,G_=function(e){if(!l_)return d_[e];var t=N_(d_,e);return t&&t.value},q_=G_("fetch"),H_=G_("Request"),V_=G_("Headers"),Q_=H_&&H_.prototype,z_=V_&&V_.prototype,W_=d_.RegExp,K_=d_.TypeError,Y_=d_.decodeURIComponent,J_=d_.encodeURIComponent,Z_=u_("".charAt),X_=u_([].join),$_=u_([].push),ey=u_("".replace),ty=u_([].shift),ny=u_([].splice),ry=u_("".split),iy=u_("".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}},cy=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}},uy=/[!'()~]|%20/g,ly={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},hy=function(e){return ly[e]},py=function(e){return ey(J_(e),uy,hy)},fy=g_((function(e,t){M_(this,{type:U_,target:F_(e).entries,index:0,kind:t})}),L_,(function(){var e=j_(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=void 0,I_(void 0,!0);var r=t[n];switch(e.kind){case"keys":return I_(r.key,!1);case"values":return I_(r.value,!1)}return I_([r.key,r.value],!1)}),!0),my=function(e){this.entries=[],this.url=null,void 0!==e&&(x_(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===Z_(e,0)?iy(e,1):e:D_(e)))};my.prototype={type:L_,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,n,r,i,a,s,o,d=this.entries,c=C_(e);if(c)for(n=(t=T_(e,c)).next;!(r=c_(n,t)).done;){if(a=(i=T_(E_(r.value))).next,(s=c_(a,i)).done||(o=c_(a,i)).done||!c_(a,i).done)throw new K_("Expected sequence with length 2");$_(d,{key:D_(s.value),value:D_(o.value)})}else for(var u in e)y_(e,u)&&$_(d,{key:u,value:D_(e[u])})},parseQuery:function(e){if(e)for(var t,n,r=this.entries,i=ry(e,"&"),a=0;a<i.length;)(t=i[a++]).length&&(n=ry(t,"="),$_(r,{key:cy(ty(n)),value:cy(X_(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 X_(n,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var Ay=function(){b_(this,gy);var e=M_(this,new my(arguments.length>0?arguments[0]:void 0));l_||(this.size=e.entries.length)},gy=Ay.prototype;if(m_(gy,{append:function(e,t){var n=F_(this);O_(arguments.length,2),$_(n.entries,{key:D_(e),value:D_(t)}),l_||this.length++,n.updateURL()},delete:function(e){for(var t=F_(this),n=O_(arguments.length,1),r=t.entries,i=D_(e),a=n<2?void 0:arguments[1],s=void 0===a?a:D_(a),o=0;o<r.length;){var d=r[o];if(d.key!==i||void 0!==s&&d.value!==s)o++;else if(ny(r,o,1),void 0!==s)break}l_||(this.size=r.length),t.updateURL()},get:function(e){var t=F_(this).entries;O_(arguments.length,1);for(var n=D_(e),r=0;r<t.length;r++)if(t[r].key===n)return t[r].value;return null},getAll:function(e){var t=F_(this).entries;O_(arguments.length,1);for(var n=D_(e),r=[],i=0;i<t.length;i++)t[i].key===n&&$_(r,t[i].value);return r},has:function(e){for(var t=F_(this).entries,n=O_(arguments.length,1),r=D_(e),i=n<2?void 0:arguments[1],a=void 0===i?i:D_(i),s=0;s<t.length;){var o=t[s++];if(o.key===r&&(void 0===a||o.value===a))return!0}return!1},set:function(e,t){var n=F_(this);O_(arguments.length,1);for(var r,i=n.entries,a=!1,s=D_(e),o=D_(t),d=0;d<i.length;d++)(r=i[d]).key===s&&(a?ny(i,d--,1):(a=!0,r.value=o));a||$_(i,{key:s,value:o}),l_||(this.size=i.length),n.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=w_(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}),p_(gy,B_,gy.entries,{name:"entries"}),p_(gy,"toString",(function(){return F_(this).serialize()}),{enumerable:!0}),l_&&f_(gy,"size",{get:function(){return F_(this).entries.length},configurable:!0,enumerable:!0}),A_(Ay,L_),o_({global:!0,constructor:!0,forced:!h_},{URLSearchParams:Ay}),!h_&&__(V_)){var vy=u_(z_.has),by=u_(z_.set),_y=function(e){if(x_(e)){var t,n=e.body;if(k_(n)===L_)return t=e.headers?new V_(e.headers):new V_,vy(t,"content-type")||by(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),S_(e,{body:R_(0,D_(n)),headers:R_(0,t)})}return e};if(__(q_)&&o_({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return q_(e,arguments.length>1?_y(arguments[1]):{})}}),__(H_)){var yy=function(e){return b_(this,Q_),new H_(e,arguments.length>1?_y(arguments[1]):{})};Q_.constructor=yy,yy.prototype=Q_,o_({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:yy})}}var wy={URLSearchParams:Ay,getState:F_},ky=ma.includes,Ey=Jp;$a({target:"Array",proto:!0,forced:ie((function(){return!Array(1).includes()}))},{includes:function(e){return ky(this,e,arguments.length>1?arguments[1]:void 0)}}),Ey("includes");var xy=$a,Dy=Ev,Sy=fe,Ry=js,Ty=Dv,Cy=ue("".indexOf);function Iy(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 B(r,e)}function c(e,t){return L(r,e,t)}function u(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(e&&""!==e)try{return new C(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=u(t[n]);if(i){var s=null===(r=i.query)||void 0===r?void 0:r.gd_sdk_referrer_url;if(s&&(s=decodeURIComponent(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){c("depth.error",e.message)}c("depth.value",e)}(),function(){var e=i,t=r.depth.value,n=s;if(c("top.domain.from","fallback"),e&&e.length>0)n=e[e.length-1],c("top.domain.from","origins");else if(0===t)n=s,c("top.domain.from","self-top");else if(1===t){var a=u(o);a&&(n=a.origin,c("top.domain.from","referrer"))}c("top.domain.value",n.replace(/^https?:\/\/(www\.)?(.*)$/i,"$2"))}(),function(){var e=l();if(e)if(P(e))c("partner.domain.value",e),c("partner.domain.from","partner-domain");else{var t=u(e,!1);if(t)c("partner.domain.value",t.origin.replace(/^https?:\/\/(www\.)?(.*)$/i,"$2")),c("partner.domain.from","partner-url");else c("partner.domain.value",r.top.domain.value),c("partner.domain.from","partner-fallback")}else c("partner.domain.value",r.top.domain.value),c("partner.domain.from","fallback")}(),e=l(),0===r.depth.value?(c("partner.url.value",a),c("partner.url.from","self-top")):e?P(e)?(c("partner.url.value",a),c("partner.url.from","partner-domain")):(c("partner.url.value",e),c("partner.url.from","partner-url")):(c("partner.url.value",o),c("partner.url.from","fallback"))}.bind(this)(),{get:d,print:function(e){console.log(d(e))}}}xy({target:"String",proto:!0,forced:!Ty("includes")},{includes:function(e){return!!~Cy(Ry(Sy(this)),Ry(Dy(e)),arguments.length>1?arguments[1]:void 0)}});var Oy="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||"undefined"!=typeof global&&global||{},Py="URLSearchParams"in Oy,By="Symbol"in Oy&&"iterator"in Symbol,Ly="FileReader"in Oy&&"Blob"in Oy&&function(){try{return new Blob,!0}catch(e){return!1}}(),Uy="FormData"in Oy,My="ArrayBuffer"in Oy;if(My)var Fy=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],jy=ArrayBuffer.isView||function(e){return e&&Fy.indexOf(Object.prototype.toString.call(e))>-1};function Ny(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 Gy(e){return"string"!=typeof e&&(e=String(e)),e}function qy(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return By&&(t[Symbol.iterator]=function(){return t}),t}function Hy(e){this.map={},e instanceof Hy?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){if(2!=e.length)throw new TypeError("Headers constructor: expected name/value pair to be length 2, found"+e.length);this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function Vy(e){if(!e._noBody)return e.bodyUsed?Promise.reject(new TypeError("Already read")):void(e.bodyUsed=!0)}function Qy(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function zy(e){var t=new FileReader,n=Qy(t);return t.readAsArrayBuffer(e),n}function Wy(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function Ky(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:Ly&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:Uy&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:Py&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():My&&Ly&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=Wy(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):My&&(ArrayBuffer.prototype.isPrototypeOf(e)||jy(e))?this._bodyArrayBuffer=Wy(e):this._bodyText=e=Object.prototype.toString.call(e):(this._noBody=!0,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&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},Ly&&(this.blob=function(){var e=Vy(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=Vy(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))}if(Ly)return this.blob().then(zy);throw new Error("could not read as ArrayBuffer")},this.text=function(){var e=Vy(this);if(e)return e;if(this._bodyBlob)return function(e){var t=new FileReader,n=Qy(t),r=/charset=([A-Za-z0-9_-]+)/.exec(e.type),i=r?r[1]:"utf-8";return t.readAsText(e,i),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)},Uy&&(this.formData=function(){return this.text().then(Zy)}),this.json=function(){return this.text().then(JSON.parse)},this}Hy.prototype.append=function(e,t){e=Ny(e),t=Gy(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},Hy.prototype.delete=function(e){delete this.map[Ny(e)]},Hy.prototype.get=function(e){return e=Ny(e),this.has(e)?this.map[e]:null},Hy.prototype.has=function(e){return this.map.hasOwnProperty(Ny(e))},Hy.prototype.set=function(e,t){this.map[Ny(e)]=Gy(t)},Hy.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},Hy.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),qy(e)},Hy.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),qy(e)},Hy.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),qy(e)},By&&(Hy.prototype[Symbol.iterator]=Hy.prototype.entries);var Yy=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function Jy(e,t){if(!(this instanceof Jy))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 Jy){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new Hy(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 Hy(t.headers)),this.method=function(e){var t=e.toUpperCase();return Yy.indexOf(t)>-1?t:e}(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal||function(){if("AbortController"in Oy)return(new AbortController).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 Zy(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 Xy(e,t){if(!(this instanceof Xy))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.status<200||this.status>599)throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");this.ok=this.status>=200&&this.status<300,this.statusText=void 0===t.statusText?"":""+t.statusText,this.headers=new Hy(t.headers),this.url=t.url||"",this._initBody(e)}Jy.prototype.clone=function(){return new Jy(this,{body:this._bodyInit})},Ky.call(Jy.prototype),Ky.call(Xy.prototype),Xy.prototype.clone=function(){return new Xy(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new Hy(this.headers),url:this.url})},Xy.error=function(){var e=new Xy(null,{status:200,statusText:""});return e.status=0,e.type="error",e};var $y=[301,302,303,307,308];Xy.redirect=function(e,t){if(-1===$y.indexOf(t))throw new RangeError("Invalid status code");return new Xy(null,{status:t,headers:{location:e}})};var ew,tw=Oy.DOMException;try{new tw}catch(e){tw=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},tw.prototype=Object.create(Error.prototype),tw.prototype.constructor=tw}function nw(e,t){return new Promise((function(n,r){var i=new Jy(e,t);if(i.signal&&i.signal.aborted)return r(new tw("Aborted","AbortError"));var a=new XMLHttpRequest;function s(){a.abort()}if(a.onload=function(){var e,t,r={statusText:a.statusText,headers:(e=a.getAllResponseHeaders()||"",t=new Hy,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();try{t.append(r,i)}catch(e){console.warn("Response "+e.message)}}})),t)};i.url.startsWith("file://")&&(a.status<200||a.status>599)?r.status=200:r.status=a.status,r.url="responseURL"in a?a.responseURL:r.headers.get("X-Request-URL");var s="response"in a?a.response:a.responseText;setTimeout((function(){n(new Xy(s,r))}),0)},a.onerror=function(){setTimeout((function(){r(new TypeError("Network request failed"))}),0)},a.ontimeout=function(){setTimeout((function(){r(new TypeError("Network request timed out"))}),0)},a.onabort=function(){setTimeout((function(){r(new tw("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&&(Ly?a.responseType="blob":My&&(a.responseType="arraybuffer")),t&&"object"==typeof t.headers&&!(t.headers instanceof Hy||Oy.Headers&&t.headers instanceof Oy.Headers)){var o=[];Object.getOwnPropertyNames(t.headers).forEach((function(e){o.push(Ny(e)),a.setRequestHeader(e,Gy(t.headers[e]))})),i.headers.forEach((function(e,t){-1===o.indexOf(t)&&a.setRequestHeader(t,e)}))}else i.headers.forEach((function(e,t){a.setRequestHeader(t,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)}))}nw.polyfill=!0,Oy.fetch||(Oy.fetch=nw,Oy.Headers=Hy,Oy.Request=Jy,Oy.Response=Xy);var rw=function(e){var n=this;if(!ew){var r={gameId:e.gameId,hours:(new Date).getHours(),topDomain:mb.topDomain,domain:mb.parentDomain,referrer:mb.parentURL,depth:o(),version:Is.version,byloader:mb.isTokenGameURL,isTokenGameURL:mb.isTokenGameURL,isMasterGameURL:mb.isMasterGameURL,isExtHostedGameURL:mb.isExtHostedGameURL,byloaderVersion:mb.version,tracking:Ab.userDeclinedTracking,whitelabel:Ab.whitelabelPartner,platform:u()};ew=new l(r)}return ew||{send:function(){t(this,n)}.bind(this)}},iw={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){}}},aw={prod:["html5.gamedistribution.com","revision.gamedistribution.com"],acc:["html5-acc-real-aws.gamedistribution.com","acceptance-revision.gamedistribution.com"]},sw={gameAPI:"game.api.gamedistribution.com"},ow={gameAPI:"game-api-acc-real-aws.gamedistribution.com"},dw=function(){var e=this,n=aw.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?ow:sw}},cw=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))};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 lw(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 hw,pw,fw,mw=new M,Aw=[],gw=function(e){Aw.push(e)},vw=function(e){hw=rw(fw=e)},bw=function(){var t=e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(pw){e.next=6;break}return e.next=3,ww(fw);case 3:pw=e.sent,mw.emit("game-data-ready",pw),_w();case 6:return e.abrupt("return",pw);case 7:case"end":return e.stop()}}),e)})));return function(){return t.apply(this,arguments)}}(),_w=function(){var t;if(null!==(t=pw)&&void 0!==t&&null!==(t=t.aws_tst)&&void 0!==t&&t.enabled){var n,i,a;if(yw(),null!==(n=pw)&&void 0!==n&&null!==(n=n.aws_tst)&&void 0!==n&&null!==(n=n.ep)&&void 0!==n&&n.api&&null!==(i=pw)&&void 0!==i&&i.url)iw.getGameData(null===(a=pw)||void 0===a?void 0:a.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,ww(fw);case 3:pw=e.sent,null===(t=pw)||void 0===t||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)}},yw=function(){var n=window.fetch;window.fetch=e(r.mark((function e(){var i,a,s,o,d,c,u,l,h,p,f,m,A,g=this,v=arguments;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(s=v.length,o=new Array(s),d=0;d<s;d++)o[d]=v[d];c=o[0],u=o[1],l=null===(i=pw)||void 0===i||null===(i=i.aws_tst)||void 0===i||null===(i=i.ep)||void 0===i?void 0:i.atm,h=null===(a=pw)||void 0===a||null===(a=a.aws_tst)||void 0===a||null===(a=a.ep)||void 0===a?void 0:a.msgrt,p=function(e,r){var i=this;t(this,g);var a=c.replace(e,r);n(a,u).then(function(){t(this,i)}.bind(this))}.bind(this);try{l&&c.indexOf("tag.atom")>0&&p("tag.atom.gamedistribution.com","atom-tag-prod-aws.gamedistribution.com"),h&&c.indexOf("msgrt.gamedistribution.com")>0&&(null===(f=pw)||void 0===f||f.aws_tst,null===(m=pw)||void 0===m||null===(m=m.aws_tst)||void 0===m||null===(m=m.ep)||void 0===m||m.msgrt,p("msgrt.gamedistribution.com","msgrt-prod-aws.gamedistribution.com"))}catch(e){}return e.next=9,n(c,u);case 9:return A=e.sent,e.abrupt("return",A);case 11:case"end":return e.stop()}}),e,this)})))},ww=function(n){var i=this;hw.send("gdfw.loading",{message:"loading"}),Aw=[],gw("1"),gw("2");var a=new Iy;gw("3");var s=a.get("partner.domain.value");gw("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:{}}}.bind(this);gw("5");var d=function(){t(this,i);var e=c(),r=e?"&mode=".concat(e):"",a=dw().config;return"https://".concat(a.gameAPI,"/game/v4/get/").concat(n.gameId.replace(/-/g,""),"/?domain=").concat(s).concat(r,"&v=").concat(Is.version,"&localTime=").concat((new Date).getHours())}.bind(this);gw("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);return gw("7"),new Promise(function(n){var a=this;t(this,i),gw("7.1");var s=o();try{gw("7.2");var c=d();gw("7.3"),fetch(c).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 gw("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),e.t0,e.next=12,cw({url:c});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(e){var r=this;if(t(this,a),gw("7.5"),e.success){var i,o,d=e.result.game;gw("7.6");var u={company:d.company,gameId:d.gameMd5,slug:d.slug,pname:d.pname,dname:d.dname,status:d.status,activeStatus:d.activeStatus,description:d.description,disableAds:d.enableAds,preroll:d.preRoll,midroll:6e4*d.timeAds,rewardedAds:d.rewardedAds,title:d.title,publishedAt:d.publishedAt,tags:d.tags,category:d.category,assets:d.assets,disp_2nd_prer:d.disp_2nd_prer,ctry_vst:d.ctry_vst,ctry:d.ctry,crtv:d.crtv,dmain:d.dmain,aws_tst:d.aws_tst,meta:d.meta,adspn:Os(d.adspn)||{},__t4r:Os(d.__t4r)||{},block_exts:Os(d.push_cuda),bloc_gard:Os(d.bloc_gard),cookie:Os(d.cookie),gdpr:Os(d.gdpr),diagnostic:Os(d.diagnostic),cmp:Os(d.cmp),gft:Os(d.gft)||{},sdk:Os(d.sdk)||{},sdkfw:Os(d.sdkfw)||{},loader:Os(d.loader)||{},splash:Os(d.splash)||{},promo:Os(d.promo)||{},dAds:Os(d.dads)||{},pAds:Os(d.pads)||{},mAds:Os(d.mads)||{},rAds:Os(d.rads)||{},lp:Os(d.lp)||{},extsc:Os(d.extsc)||{},evnts:Os(d.evnts)||{},dp:Os(d.dp)||{},adflw:Os(d.adflw)||{},afgszf:Os(d.afgszf)||{},fllc:Os(d.fllc)||{},lotm:Os(d.lotm)||{},t4rc:Os(d.t4rc)||{},midroll_plus:Os(d.midroll_plus)||{},gmky:Os(d.gmky)||{},urlBlockExc:Os(d.url_blck_exc)||{},sdk_wrp:Os(d.sdk_wrp)||{},dbglg:Os(d.dbglg)||{},extHosting:Os(d.ext_hosting)||{},directTokenUse:Os(d.dtu)||{},aeria:Os(d.aeria)||{},advlm:Os(d.advlm)||{},ad_blcks:Os(d.ad_blcks)||{},rmblck:Os(d.rmblck)||{},gs_trc:Os(d.gs_trc)||{},rwskp:Os(d.rwskp)||{}};gw("7.7");var l=h(U(s),u);gw("7.8"),l.afg_disabled=!1===(null===(i=l.sdk)||void 0===i||null===(i=i.afg)||void 0===i?void 0:i.enabled),l.url=c,function(){t(this,r),void 0!==Us.afgEnabled&&(l.afg_disabled=!Us.afgEnabled),void 0!==Us.promoEnabled&&(l.promo=l.promo||{},l.promo=lw(lw({},l.promo),{},{rainbow:{enabled:Us.promoEnabled}}))}.bind(this),gw("7.9"),null!==(o=l.pAds)&&void 0!==o&&o.enabled&&(l.preroll=!0),gw("7.10"),hw.send("gdfw.success",{message:"success"}),n(l)}else{s.failed=!0;var p=Aw[Aw.length-1];hw.send("gdfw.err",{message:"".concat(p,": json error")}),n(s)}}.bind(this)).catch(function(e){t(this,a);var r=Aw[Aw.length-1];hw.send("gdfw.err",{message:"".concat(r,": ").concat(e.message?e.message:e)}),s.failed=!0,n(s)}.bind(this))}catch(e){var u=Aw[Aw.length-1];hw.send("gdfw.err",{message:"".concat(u,": global ").concat(e.message?e.message:e)}),s.failed=!0,n(s)}}.bind(this))},kw=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,bw();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)}}(),Ew=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,bw();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)}}(),xw=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,bw();case 2:return n=e.sent,e.next=5,kw();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)}}(),Dw=function(){var t=e(r.mark((function e(){var t,n,i,a,s,o,d,c;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,bw();case 2:return d=e.sent,c=!(null==d||null===(t=d.extsc)||void 0===t||!t.enabled),e.abrupt("return",{enabled:c,path:c?null==d||null===(n=d.extsc)||void 0===n?void 0:n.path:"",name:c?null==d||null===(i=d.extsc)||void 0===i?void 0:i.name:"",ref:c?null==d||null===(a=d.extsc)||void 0===a?void 0:a.ref:"",loadedFlag:c?null==d||null===(s=d.extsc)||void 0===s?void 0:s.loadedFlag:void 0,loadedFlagCheck:!!c&&!(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)}}(),Sw=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,Dw();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,f(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),p("DEVELOPER_ERROR",e.t0,"warning");case 16:case"end":return e.stop()}}),e,this,[[6,12]])})));return function(){return n.apply(this,arguments)}}(),Rw=!1,Tw=!1,Cw=function(){return new Promise(function(){var n=e(r.mark((function e(n,i){var a,s,o,d,c,u=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!Rw){e.next=4;break}return e.abrupt("return",n(Tw));case 4:Rw=!0;case 5:return e.next=7,Dw();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 Tw=!0,e.abrupt("return",n(!0));case 16:d=!0,setTimeout(function(){t(this,u),d&&(d=!1,Rw=!0,n(!1))}.bind(this),5e3),c=setInterval(function(){t(this,u),d&&o&&window[s]?(d=!1,Rw=!0,Tw=!0,clearInterval(c),n(!0)):d||clearInterval(c)}.bind(this),100);case 19:case"end":return e.stop()}}),e,this)})));return function(e,t){return n.apply(this,arguments)}}())},Iw=$a,Ow=zm,Pw=ie,Bw=wt,Lw=et,Uw=Gf,Mw=Kg,Fw=gr,jw=Ow&&Ow.prototype;if(Iw({target:"Promise",proto:!0,real:!0,forced:!!Ow&&Pw((function(){jw.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=Uw(this,Bw("Promise")),n=Lw(e);return this.then(n?function(n){return Mw(t,e()).then((function(){return n}))}:e,n?function(n){return Mw(t,e()).then((function(){throw n}))}:e)}}),Lw(Ow)){var Nw=Bw("Promise").prototype.finally;jw.finally!==Nw&&Fw(jw,"finally",Nw,{unsafe:!0})}var Gw="\t\n\v\f\r                 \u2028\u2029\ufeff",qw=fe,Hw=js,Vw=Gw,Qw=ue("".replace),zw=RegExp("^["+Vw+"]+"),Ww=RegExp("(^|[^"+Vw+"])["+Vw+"]+$"),Kw=function(e){return function(t){var n=Hw(qw(t));return 1&e&&(n=Qw(n,zw,"")),2&e&&(n=Qw(n,Ww,"$1")),n}},Yw={start:Kw(1),end:Kw(2),trim:Kw(3)},Jw=An.PROPER,Zw=ie,Xw=Gw,$w=Yw.trim;$a({target:"String",proto:!0,forced:function(e){return Zw((function(){return!!Xw[e]()||"​…᠎"!=="​…᠎"[e]()||Jw&&Xw[e].name!==e}))}("trim")},{trim:function(){return $w(this)}});var ek=$a,tk=Oi.find,nk=Jp,rk="find",ik=!0;rk in[]&&Array(1)[rk]((function(){ik=!1})),ek({target:"Array",proto:!0,forced:ik},{find:function(e){return tk(this,e,arguments.length>1?arguments[1]:void 0)}}),nk(rk);var ak=et,sk=at,ok=vh,dk=tt.f,ck=nt,uk=W,lk=ue,hk=Qa,pk=function(e,t,n){var r,i;return ok&&ak(r=t.constructor)&&r!==n&&sk(i=r.prototype)&&i!==n.prototype&&ok(e,i),e},fk=Cn,mk=lo,Ak=sa.f,gk=kt,vk=yv,bk=js,_k=Ru,yk=Xh,wk=function(e,t,n){n in e||dk(e,n,{configurable:!0,get:function(){return t[n]},set:function(e){t[n]=e}})},kk=gr,Ek=ie,xk=_e,Dk=Yn.enforce,Sk=Cf,Rk=tp,Tk=ip,Ck=Ke("match"),Ik=uk.RegExp,Ok=Ik.prototype,Pk=uk.SyntaxError,Bk=lk(Ok.exec),Lk=lk("".charAt),Uk=lk("".replace),Mk=lk("".indexOf),Fk=lk("".slice),jk=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,Nk=/a/g,Gk=/a/g,qk=new Ik(Nk)!==Nk,Hk=yk.MISSED_STICKY,Vk=yk.UNSUPPORTED_Y,Qk=ck&&(!qk||Hk||Rk||Tk||Ek((function(){return Gk[Ck]=!1,Ik(Nk)!==Nk||Ik(Gk)===Gk||"/a/i"!==String(Ik(Nk,"i"))})));if(hk("RegExp",Qk)){for(var zk=function(e,t){var n,r,i,a,s,o,d=gk(Ok,this),c=vk(e),u=void 0===t,l=[],h=e;if(!d&&c&&u&&e.constructor===zk)return e;if((c||gk(Ok,e))&&(e=e.source,u&&(t=_k(h))),e=void 0===e?"":bk(e),t=void 0===t?"":bk(t),h=e,Rk&&"dotAll"in Nk&&(r=!!t&&Mk(t,"s")>-1)&&(t=Uk(t,/s/g,"")),n=t,Hk&&"sticky"in Nk&&(i=!!t&&Mk(t,"y")>-1)&&Vk&&(t=Uk(t,/y/g,"")),Tk&&(a=function(e){for(var t,n=e.length,r=0,i="",a=[],s=mk(null),o=!1,d=!1,c=0,u="";r<=n;r++){if("\\"===(t=Lk(e,r)))t+=Lk(e,++r);else if("]"===t)o=!1;else if(!o)switch(!0){case"["===t:o=!0;break;case"("===t:Bk(jk,Fk(e,r+1))&&(r+=2,d=!0),i+=t,c++;continue;case">"===t&&d:if(""===u||xk(s,u))throw new Pk("Invalid capture group name");s[u]=!0,a[a.length]=[u,c],d=!1,u="";continue}d?u+=t:i+=t}return[i,a]}(e),e=a[0],l=a[1]),s=pk(Ik(e,t),d?this:Ok,zk),(r||i||l.length)&&(o=Dk(s),r&&(o.dotAll=!0,o.raw=zk(function(e){for(var t,n=e.length,r=0,i="",a=!1;r<=n;r++)"\\"!==(t=Lk(e,r))?a||"."!==t?("["===t?a=!0:"]"===t&&(a=!1),i+=t):i+="[\\s\\S]":i+=t+Lk(e,++r);return i}(e),n)),i&&(o.sticky=!0),l.length&&(o.groups=l)),e!==h)try{fk(s,"source",""===h?"(?:)":h)}catch(e){}return s},Wk=Ak(Ik),Kk=0;Wk.length>Kk;)wk(zk,Ik,Wk[Kk++]);Ok.constructor=zk,zk.prototype=Ok,kk(uk,"RegExp",zk,{constructor:!0})}Sk("RegExp");var Yk=$a,Jk=zr,Zk=Ji,Xk=Bi,$k=ue([].join);Yk({target:"Array",proto:!0,forced:Jk!==Object||!Xk("join",",")},{join:function(e){return $k(Zk(this),void 0===e?",":e)}});var eE=Oi.map;$a({target:"Array",proto:!0,forced:!ps("map")},{map:function(e){return eE(this,e,arguments.length>1?arguments[1]:void 0)}});var tE=nt,nE=ue,rE=bt,iE=ie,aE=ns,sE=xa,oE=Vi,dE=ge,cE=zr,uE=Object.assign,lE=Object.defineProperty,hE=nE([].concat),pE=!uE||iE((function(){if(tE&&1!==uE({b:1},uE(lE({},"a",{enumerable:!0,get:function(){lE(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol("assign detection"),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach((function(e){t[e]=e})),7!==uE({},e)[n]||aE(uE({},t)).join("")!==r}))?function(e,t){for(var n=dE(e),r=arguments.length,i=1,a=sE.f,s=oE.f;r>i;)for(var o,d=cE(arguments[i++]),c=a?hE(aE(d),a(d)):aE(d),u=c.length,l=0;u>l;)o=c[l++],tE&&!rE(s,d,o)||(n[o]=d[o]);return n}:uE,fE=pE;$a({target:"Object",stat:!0,arity:2,forced:Object.assign!==fE},{assign:fE});var mE,AE=ue,gE=2147483647,vE=/[^\0-\u007E]/,bE=/[.\u3002\uFF0E\uFF61]/g,_E="Overflow: input needs wider integers to process",yE=RangeError,wE=AE(bE.exec),kE=Math.floor,EE=String.fromCharCode,xE=AE("".charCodeAt),DE=AE([].join),SE=AE([].push),RE=AE("".replace),TE=AE("".split),CE=AE("".toLowerCase),IE=function(e){return e+22+75*(e<26)},OE=function(e,t,n){var r=0;for(e=n?kE(e/700):e>>1,e+=kE(e/t);e>455;)e=kE(e/35),r+=36;return kE(r+36*e/(e+38))},PE=function(e){var t=[];e=function(e){for(var t=[],n=0,r=e.length;n<r;){var i=xE(e,n++);if(i>=55296&&i<=56319&&n<r){var a=xE(e,n++);56320==(64512&a)?SE(t,((1023&i)<<10)+(1023&a)+65536):(SE(t,i),n--)}else SE(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&&SE(t,EE(r));var d=t.length,c=d;for(d&&SE(t,"-");c<i;){var u=gE;for(n=0;n<e.length;n++)(r=e[n])>=a&&r<u&&(u=r);var l=c+1;if(u-a>kE((gE-s)/l))throw new yE(_E);for(s+=(u-a)*l,a=u,n=0;n<e.length;n++){if((r=e[n])<a&&++s>gE)throw new yE(_E);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,A=36-f;SE(t,EE(IE(f+m%A))),h=kE(m/A),p+=36}SE(t,EE(IE(h))),o=OE(s,l,c===d),s=0,c++}}s++,a++}return DE(t,"")},BE=$a,LE=nt,UE=e_,ME=W,FE=Gr,jE=ue,NE=gr,GE=Do,qE=Pf,HE=_e,VE=pE,QE=_l,zE=vo,WE=Fl.codeAt,KE=function(e){var t,n,r=[],i=TE(RE(CE(e),bE,"."),".");for(t=0;t<i.length;t++)n=i[t],SE(r,wE(vE,n)?"xn--"+PE(n):n);return DE(r,".")},YE=js,JE=Go,ZE=Hf,XE=wy,$E=Yn,ex=$E.set,tx=$E.getterFor("URL"),nx=XE.URLSearchParams,rx=XE.getState,ix=ME.URL,ax=ME.TypeError,sx=ME.parseInt,ox=Math.floor,dx=Math.pow,cx=jE("".charAt),ux=jE(/./.exec),lx=jE([].join),hx=jE(1..toString),px=jE([].pop),fx=jE([].push),mx=jE("".replace),Ax=jE([].shift),gx=jE("".split),vx=jE("".slice),bx=jE("".toLowerCase),_x=jE([].unshift),yx="Invalid scheme",wx="Invalid host",kx="Invalid port",Ex=/[a-z]/i,xx=/[\d+-.a-z]/i,Dx=/\d/,Sx=/^0x/i,Rx=/^[0-7]+$/,Tx=/^\d+$/,Cx=/^[\da-f]+$/i,Ix=/[\0\t\n\r #%/:<>?@[\\\]^|]/,Ox=/[\0\t\n\r #/:<>?@[\\\]^|]/,Px=/^[\u0000-\u0020]+/,Bx=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,Lx=/[\t\n\r]/g,Ux=function(e){var t,n,r,i;if("number"==typeof e){for(t=[],n=0;n<4;n++)_x(t,e%256),e=ox(e/256);return lx(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+=hx(e[n],16),n<7&&(t+=":")));return"["+t+"]"}return e},Mx={},Fx=VE({},Mx,{" ":1,'"':1,"<":1,">":1,"`":1}),jx=VE({},Fx,{"#":1,"?":1,"{":1,"}":1}),Nx=VE({},jx,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),Gx=function(e,t){var n=WE(e,0);return n>32&&n<127&&!HE(t,e)?e:encodeURIComponent(e)},qx={ftp:21,file:null,http:80,https:443,ws:80,wss:443},Hx=function(e,t){var n;return 2===e.length&&ux(Ex,cx(e,0))&&(":"===(n=cx(e,1))||!t&&"|"===n)},Vx=function(e){var t;return e.length>1&&Hx(vx(e,0,2))&&(2===e.length||"/"===(t=cx(e,2))||"\\"===t||"?"===t||"#"===t)},Qx=function(e){return"."===e||"%2e"===bx(e)},zx={},Wx={},Kx={},Yx={},Jx={},Zx={},Xx={},$x={},eD={},tD={},nD={},rD={},iD={},aD={},sD={},oD={},dD={},cD={},uD={},lD={},hD={},pD=function(e,t,n){var r,i,a,s=YE(e);if(t){if(i=this.parse(s))throw new ax(i);this.searchParams=null}else{if(void 0!==n&&(r=new pD(n,!0)),i=this.parse(s,null,r))throw new ax(i);(a=rx(new nx)).bindURL(this),this.searchParams=a}};pD.prototype={type:"URL",parse:function(e,t,n){var r,i,a,s,o,d=this,c=t||zx,u=0,l="",h=!1,p=!1,f=!1;for(e=YE(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=mx(e,Px,""),e=mx(e,Bx,"$1")),e=mx(e,Lx,""),r=QE(e);u<=r.length;){switch(i=r[u],c){case zx:if(!i||!ux(Ex,i)){if(t)return yx;c=Kx;continue}l+=bx(i),c=Wx;break;case Wx:if(i&&(ux(xx,i)||"+"===i||"-"===i||"."===i))l+=bx(i);else{if(":"!==i){if(t)return yx;l="",c=Kx,u=0;continue}if(t&&(d.isSpecial()!==HE(qx,l)||"file"===l&&(d.includesCredentials()||null!==d.port)||"file"===d.scheme&&!d.host))return;if(d.scheme=l,t)return void(d.isSpecial()&&qx[d.scheme]===d.port&&(d.port=null));l="","file"===d.scheme?c=aD:d.isSpecial()&&n&&n.scheme===d.scheme?c=Yx:d.isSpecial()?c=$x:"/"===r[u+1]?(c=Jx,u++):(d.cannotBeABaseURL=!0,fx(d.path,""),c=uD)}break;case Kx:if(!n||n.cannotBeABaseURL&&"#"!==i)return yx;if(n.cannotBeABaseURL&&"#"===i){d.scheme=n.scheme,d.path=zE(n.path),d.query=n.query,d.fragment="",d.cannotBeABaseURL=!0,c=hD;break}c="file"===n.scheme?aD:Zx;continue;case Yx:if("/"!==i||"/"!==r[u+1]){c=Zx;continue}c=eD,u++;break;case Jx:if("/"===i){c=tD;break}c=cD;continue;case Zx:if(d.scheme=n.scheme,i===mE)d.username=n.username,d.password=n.password,d.host=n.host,d.port=n.port,d.path=zE(n.path),d.query=n.query;else if("/"===i||"\\"===i&&d.isSpecial())c=Xx;else if("?"===i)d.username=n.username,d.password=n.password,d.host=n.host,d.port=n.port,d.path=zE(n.path),d.query="",c=lD;else{if("#"!==i){d.username=n.username,d.password=n.password,d.host=n.host,d.port=n.port,d.path=zE(n.path),d.path.length--,c=cD;continue}d.username=n.username,d.password=n.password,d.host=n.host,d.port=n.port,d.path=zE(n.path),d.query=n.query,d.fragment="",c=hD}break;case Xx:if(!d.isSpecial()||"/"!==i&&"\\"!==i){if("/"!==i){d.username=n.username,d.password=n.password,d.host=n.host,d.port=n.port,c=cD;continue}c=tD}else c=eD;break;case $x:if(c=eD,"/"!==i||"/"!==cx(l,u+1))continue;u++;break;case eD:if("/"!==i&&"\\"!==i){c=tD;continue}break;case tD:if("@"===i){h&&(l="%40"+l),h=!0,a=QE(l);for(var m=0;m<a.length;m++){var A=a[m];if(":"!==A||f){var g=Gx(A,Nx);f?d.password+=g:d.username+=g}else f=!0}l=""}else if(i===mE||"/"===i||"?"===i||"#"===i||"\\"===i&&d.isSpecial()){if(h&&""===l)return"Invalid authority";u-=QE(l).length+1,l="",c=nD}else l+=i;break;case nD:case rD:if(t&&"file"===d.scheme){c=oD;continue}if(":"!==i||p){if(i===mE||"/"===i||"?"===i||"#"===i||"\\"===i&&d.isSpecial()){if(d.isSpecial()&&""===l)return wx;if(t&&""===l&&(d.includesCredentials()||null!==d.port))return;if(s=d.parseHost(l))return s;if(l="",c=dD,t)return;continue}"["===i?p=!0:"]"===i&&(p=!1),l+=i}else{if(""===l)return wx;if(s=d.parseHost(l))return s;if(l="",c=iD,t===rD)return}break;case iD:if(!ux(Dx,i)){if(i===mE||"/"===i||"?"===i||"#"===i||"\\"===i&&d.isSpecial()||t){if(""!==l){var v=sx(l,10);if(v>65535)return kx;d.port=d.isSpecial()&&v===qx[d.scheme]?null:v,l=""}if(t)return;c=dD;continue}return kx}l+=i;break;case aD:if(d.scheme="file","/"===i||"\\"===i)c=sD;else{if(!n||"file"!==n.scheme){c=cD;continue}switch(i){case mE:d.host=n.host,d.path=zE(n.path),d.query=n.query;break;case"?":d.host=n.host,d.path=zE(n.path),d.query="",c=lD;break;case"#":d.host=n.host,d.path=zE(n.path),d.query=n.query,d.fragment="",c=hD;break;default:Vx(lx(zE(r,u),""))||(d.host=n.host,d.path=zE(n.path),d.shortenPath()),c=cD;continue}}break;case sD:if("/"===i||"\\"===i){c=oD;break}n&&"file"===n.scheme&&!Vx(lx(zE(r,u),""))&&(Hx(n.path[0],!0)?fx(d.path,n.path[0]):d.host=n.host),c=cD;continue;case oD:if(i===mE||"/"===i||"\\"===i||"?"===i||"#"===i){if(!t&&Hx(l))c=cD;else if(""===l){if(d.host="",t)return;c=dD}else{if(s=d.parseHost(l))return s;if("localhost"===d.host&&(d.host=""),t)return;l="",c=dD}continue}l+=i;break;case dD:if(d.isSpecial()){if(c=cD,"/"!==i&&"\\"!==i)continue}else if(t||"?"!==i)if(t||"#"!==i){if(i!==mE&&(c=cD,"/"!==i))continue}else d.fragment="",c=hD;else d.query="",c=lD;break;case cD:if(i===mE||"/"===i||"\\"===i&&d.isSpecial()||!t&&("?"===i||"#"===i)){if(".."===(o=bx(o=l))||"%2e."===o||".%2e"===o||"%2e%2e"===o?(d.shortenPath(),"/"===i||"\\"===i&&d.isSpecial()||fx(d.path,"")):Qx(l)?"/"===i||"\\"===i&&d.isSpecial()||fx(d.path,""):("file"===d.scheme&&!d.path.length&&Hx(l)&&(d.host&&(d.host=""),l=cx(l,0)+":"),fx(d.path,l)),l="","file"===d.scheme&&(i===mE||"?"===i||"#"===i))for(;d.path.length>1&&""===d.path[0];)Ax(d.path);"?"===i?(d.query="",c=lD):"#"===i&&(d.fragment="",c=hD)}else l+=Gx(i,jx);break;case uD:"?"===i?(d.query="",c=lD):"#"===i?(d.fragment="",c=hD):i!==mE&&(d.path[0]+=Gx(i,Mx));break;case lD:t||"#"!==i?i!==mE&&("'"===i&&d.isSpecial()?d.query+="%27":d.query+="#"===i?"%23":Gx(i,Mx)):(d.fragment="",c=hD);break;case hD:i!==mE&&(d.fragment+=Gx(i,Fx))}u++}},parseHost:function(e){var t,n,r;if("["===cx(e,0)){if("]"!==cx(e,e.length-1))return wx;if(t=function(e){var t,n,r,i,a,s,o,d=[0,0,0,0,0,0,0,0],c=0,u=null,l=0,h=function(){return cx(e,l)};if(":"===h()){if(":"!==cx(e,1))return;l+=2,u=++c}for(;h();){if(8===c)return;if(":"!==h()){for(t=n=0;n<4&&ux(Cx,h());)t=16*t+sx(h(),16),l++,n++;if("."===h()){if(0===n)return;if(l-=n,c>6)return;for(r=0;h();){if(i=null,r>0){if(!("."===h()&&r<4))return;l++}if(!ux(Dx,h()))return;for(;ux(Dx,h());){if(a=sx(h(),10),null===i)i=a;else{if(0===i)return;i=10*i+a}if(i>255)return;l++}d[c]=256*d[c]+i,2!=++r&&4!==r||c++}if(4!==r)return;break}if(":"===h()){if(l++,!h())return}else if(h())return;d[c++]=t}else{if(null!==u)return;l++,u=++c}}if(null!==u)for(s=c-u,c=7;0!==c&&s>0;)o=d[c],d[c--]=d[u+s-1],d[u+--s]=o;else if(8!==c)return;return d}(vx(e,1,-1)),!t)return wx;this.host=t}else if(this.isSpecial()){if(e=KE(e),ux(Ix,e))return wx;if(t=function(e){var t,n,r,i,a,s,o,d=gx(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"===cx(i,0)&&(a=ux(Sx,i)?16:8,i=vx(i,8===a?1:2)),""===i)s=0;else{if(!ux(10===a?Tx:8===a?Rx:Cx,i))return e;s=sx(i,a)}fx(n,s)}for(r=0;r<t;r++)if(s=n[r],r===t-1){if(s>=dx(256,5-t))return null}else if(s>255)return null;for(o=px(n),r=0;r<n.length;r++)o+=n[r]*dx(256,3-r);return o}(e),null===t)return wx;this.host=t}else{if(ux(Ox,e))return wx;for(t="",n=QE(e),r=0;r<n.length;r++)t+=Gx(n[r],Mx);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"===this.scheme},includesCredentials:function(){return""!==this.username||""!==this.password},isSpecial:function(){return HE(qx,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"===this.scheme&&1===t&&Hx(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,c=t+":";return null!==i?(c+="//",e.includesCredentials()&&(c+=n+(r?":"+r:"")+"@"),c+=Ux(i),null!==a&&(c+=":"+a)):"file"===t&&(c+="//"),c+=e.cannotBeABaseURL?s[0]:s.length?"/"+lx(s,"/"):"",null!==o&&(c+="?"+o),null!==d&&(c+="#"+d),c},setHref:function(e){var t=this.parse(e);if(t)throw new ax(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"===e)try{return new fD(e.path[0]).origin}catch(e){return"null"}return"file"!==e&&this.isSpecial()?e+"://"+Ux(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(YE(e)+":",zx)},getUsername:function(){return this.username},setUsername:function(e){var t=QE(YE(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var n=0;n<t.length;n++)this.username+=Gx(t[n],Nx)}},getPassword:function(){return this.password},setPassword:function(e){var t=QE(YE(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var n=0;n<t.length;n++)this.password+=Gx(t[n],Nx)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?Ux(e):Ux(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,nD)},getHostname:function(){var e=this.host;return null===e?"":Ux(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,rD)},getPort:function(){var e=this.port;return null===e?"":YE(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""===(e=YE(e))?this.port=null:this.parse(e,iD))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+lx(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,dD))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""===(e=YE(e))?this.query=null:("?"===cx(e,0)&&(e=vx(e,1)),this.query="",this.parse(e,lD)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!==(e=YE(e))?("#"===cx(e,0)&&(e=vx(e,1)),this.fragment="",this.parse(e,hD)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var fD=function(e){var t=qE(this,mD),n=ZE(arguments.length,1)>1?arguments[1]:void 0,r=ex(t,new pD(e,!1,n));LE||(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())},mD=fD.prototype,AD=function(e,t){return{get:function(){return tx(this)[e]()},set:t&&function(e){return tx(this)[t](e)},configurable:!0,enumerable:!0}};if(LE&&(GE(mD,"href",AD("serialize","setHref")),GE(mD,"origin",AD("getOrigin")),GE(mD,"protocol",AD("getProtocol","setProtocol")),GE(mD,"username",AD("getUsername","setUsername")),GE(mD,"password",AD("getPassword","setPassword")),GE(mD,"host",AD("getHost","setHost")),GE(mD,"hostname",AD("getHostname","setHostname")),GE(mD,"port",AD("getPort","setPort")),GE(mD,"pathname",AD("getPathname","setPathname")),GE(mD,"search",AD("getSearch","setSearch")),GE(mD,"searchParams",AD("getSearchParams")),GE(mD,"hash",AD("getHash","setHash"))),NE(mD,"toJSON",(function(){return tx(this).serialize()}),{enumerable:!0}),NE(mD,"toString",(function(){return tx(this).serialize()}),{enumerable:!0}),ix){var gD=ix.createObjectURL,vD=ix.revokeObjectURL;gD&&NE(fD,"createObjectURL",FE(gD,ix)),vD&&NE(fD,"revokeObjectURL",FE(vD,ix))}JE(fD,"URL"),BE({global:!0,constructor:!0,forced:!UE,sham:!LE},{URL:fD});var bD=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 C(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}(),_D=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}(),yD=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}(),wD=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}(),kD=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}(),ED=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}(),xD=function(e){if(!e)return!1;var t=DD.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)},DD=Object.prototype.toString;function SD(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 RD(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?SD(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):SD(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function TD(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 CD,ID="13998",OD="_cc".concat(ID),PD=["https://tags.crwdcntrl.net/c/".concat(ID,"/cc.js?ns=").concat(OD)],BD=function(){return!!CD&&"function"==typeof CD.bcpf&&"function"==typeof CD.add},LD=function(e,t){try{if(!BD())return;CD.add(e,t),"lotame add success ".concat(e," ").concat(t)}catch(e){err}},UD=function(e,t){try{if(!BD())return;CD.bcpw(e,t),"lotame send success ".concat(e," ").concat(t)}catch(e){}},MD=function(e){var n=this;try{LD("act","play"),LD("med","game"),"complete"===document.readyState?CD.bcpf():CD.bcp(),e.tags.forEach(function(e){t(this,n),UD("int","tags : ".concat(e.title.toLowerCase()))}.bind(this)),UD("int","category : ".concat(e.category.toLowerCase()))}catch(e){}},FD=function(){window.addEventListener("load",(function(){mw.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!=mb&&mb.noLotamePageView,!e.t0){e.next=7;break}return e.next=6,kw();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,f(PD[0],"LOTCC_".concat(ID),{alternates:PD});case 16:"object"===n(window[OD])&&(CD=window[OD]),BD()&&MD(t),e.next=23;break;case 20:e.prev=20,e.t1=e.catch(1),e.t1;case 23:case"end":return e.stop()}}),e,null,[[1,20]])})));return function(e){return t.apply(this,arguments)}}())}))},jD=function(){UD("genp","ad video"),UD("act","ad impression")},ND=function(){UD("act","ad skipped")},GD=function(){UD("act","ad click")},qD=function(){UD("act","ad complete")},HD=new Iy,VD={preroll:"game-start-video",midroll:"mid-level-video",rewarded:"rewarded-video"},QD=function(e,n){var r=this,i=function(e,t){var n=HD.get("partner.url.value"),r=VD[t],i="".concat("web.latimes/games-puzzles-crossword","/").concat(e,"/").concat(r);return{env:"vp",iu:"/".concat("21787098806","/").concat(i),description_url:n,tfcd:0,npa:0,sz:"400x300|480x360|480x361|640x360|640x480",gdfp_req:1,output:"vast",unviewed_position_start:1,impl:"s",correlator:"".concat(Date.now())}}(e,n),a=Object.keys(i).map(function(e){return t(this,r),"".concat(e,"=").concat(i[e])}.bind(this)).join("&");return"".concat("https://pubads.g.doubleclick.net/gampad/ads","?").concat(a)},zD=(new Iy).get("partner.domain.value"),WD=["latimes.com"],KD={exist:function(e){var n=this;return"Softgames-Azerion"===e.dname&&WD.some(function(e){return t(this,n),e===zD}.bind(this))},get:function(e,t){return function(e,t){return{"latimes.com":function(){var n=t.slug;return QD(n,e)}}[zD](e)}(e,t)}},YD=function(){var e=(new Iy).get("partner.url.value"),t=new C(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},JD=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 ZD(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 XD(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ZD(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ZD(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var $D=new M,eS=null,tS=function(){function n(e,r,i){var a=this;if(R(this,n),eS)return eS;eS=this;var s={debug:!1,width:640,height:360,locale:"en"};this.options=r?h(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.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.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")}var i,a,s,o,d,c,u,l,p,w,k,E,x,D,O,P,B,L,M,q,H,V,Q,z,W,K;return S(n,[{key:"start",value:(K=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),Ls("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 K.apply(this,arguments)})},{key:"adSystemInitialize",value:(W=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 W.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:(z=e(r.mark((function e(t){var n,i,a,s,o,d,c,u,l,h,p;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.adType,i=t.options,e.prev=1,s=null===(a=this.gameData.adflw)||void 0===a||null===(a=a.adapterConfig)||void 0===a?void 0:a.spil,o=this.nextAdPosition(n),e.next=6,this._create_dp_context(o,i);case 6:return d=e.sent,s?(this.gameData,c=s[o]||s.default||this._getDefaultSpilAdapterConfig()):c=this._getDefaultSpilAdapterConfig(),u=100*d.floor_price,d.floor_price,l=this._createCustomAdVastUrl(c,{tnl_keys:{floor_price:u}}),h=l.url,p={url:h,dp:d,hl:{bidFloorApplied:!0}},e.abrupt("return",p);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 z.apply(this,arguments)})},{key:"_getAdVast",value:function(n,i){var a=this;return new Promise(function(){var s=e(r.mark((function e(s){var o,d,c,u,l,h,p,f,A=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(m.available&&m.getBoolean("gd_debug_ex")&&m.getBoolean("gd_tag")||YD().useTestAds)){e.next=6;break}return o=a.IMASampleTags[n],d=Math.floor(Math.random()*o.length),c=o[d],s({url:c,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,u=a.nextAdPosition(n),null!=i&&i.adTypeFound&&(u=null==i?void 0:i.adTypeFound),a._broadcast("AD_REQUEST",{message:u}),l=a.options,"preroll"===u&&j(l.preroll)?l=l.preroll:"midroll"===u&&j(l.midroll)?l=l.midroll:"rewarded"===u&&j(l.rewarded)&&(l=l.rewarded),h="","audio"===i.adapter||"audio"===i.giftType?(a.isAudioAd=!0,h="midrollaudio"):(a.isAudioAd=!1,h="rewarded"===u?"rewardedVideo":"gdbanner"===u?"gd__banner":"midroll"===u?"midroll":"video1"),e.next=20,window.idhb.isLoaded();case 20:return e.next=22,a._create_dp_context(u,i);case 22:p=e.sent,Bs("gd-adflow, before idhb",u,h),f=window.idhb.getAdserverTargetingForAdSlot(h),window.idhb.setAdserverTargeting(XD(XD({},f),{},{adaptor_order:i.adapterIndex})),window.idhb.getAdserverTargetingForAdSlot(h),window.idhb.requestAds({slots:T({},h,{bidFloor:(null==p?void 0:p.floor_price)||void 0}),callback:function(e,n){var r=this;t(this,A),!p||null!=n&&n.bidFloorApplied||fetch(p.skip_url).catch(function(e){t(this,r)}.bind(this));var i={src:"hl",tnl_keys:XD(XD({},window.idhb.getAdserverTargetingForAdSlot(h)),{},{tnl_ad_pos:u,tnl_asset_id:a.gameData.gameId}),url:e,dp:p,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===A.Rewarded)return this.adRewardedCount++,"rewarded";if(e===A.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===A.Rewarded?"rewarded":e===A.Interstitial?!1===this.gameData.preroll||1===this.adPrerollCount||this.adMidrollCount>0?"midroll":"preroll":"midroll"}},{key:"getCurrentAdPosition",value:function(e){return e===A.Interstitial?1===this.adPrerollCount&&0===this.adMidrollCount?"preroll":"midroll":e===A.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 c=new google.ima.AdsRequest,u=this._transformVast(e,n),l=XD(XD({},n),{},{adTag:u,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&&!u.bidder&&(h.adtag_url=u.url);var f=this._isVMAP(d);(function(){t(this,a),n.shouldFail&&(h?(h.adtag_url="dp_original_broken",h.fallback_url="dp_fallback_broken"):u.url="original_broken",null==h||h.adtag_url,null==h||h.fallback_url,u.url)}).bind(this);var m=this._getExternalVast(null===(o=n)||void 0===o?void 0:o.adType);if(m)c.adTagUrl=m;else if(f){var A=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 C(e[a].adtag.url,!0);s.query=RD(RD({},s.query),{},{ad_rule:0,vpos:e[a].positon,pod:1,correlator:0===a?r:++r,output:"xml_vast3"}),a<e.length-1&&(s.query=RD(RD({},s.query),i)),t.push(s.toString())}for(var o=Date.now(),d=1;d<=t.length;d++){var c,u,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(TD({id:o++,adtag_url:t[d-1],error_url:null===(c=e[d-1].dp)||void 0===c?void 0:c.error_url,impression_url:null===(u=e[d-1].dp)||void 0===u?void 0:u.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:u,position:"preroll"===l.tnl_ad_pos?"preroll":"midroll",config:this._get_vmap_config(d)}));c.adsResponse=A}else if(h&&p.bidFloorApplied){h.adtag_url||(h.adtag_url=u.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);c.adsResponse=g}else if(h&&h.fallback_url){var v=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);c.adsResponse=v}else c.adTagUrl=u.url;c.linearAdSlotWidth=this.options.width,c.linearAdSlotHeight=this.options.height,c.nonLinearAdSlotWidth=this.options.width,c.nonLinearAdSlotHeight=this.options.height,c.forceNonLinearFullSlot=!0,this.options.vast_load_timeout&&(c.vastLoadTimeout=this.options.vast_load_timeout),c.setAdWillAutoPlay(n.autoplayAllowed),c.setAdWillPlayMuted(n.autoplayRequiresMute),this.adsLoader.requestAds(c,l);try{this._broadcast("AD_SDK_REQUEST",{message:l})}catch(e){}i(c)}catch(e){throw new Error(e)}}.bind(this))}},{key:"_getExternalVast",value:function(e){var t;try{var n=this.getCurrentAdPosition(e);t=KD.exist(this.gameData)&&KD.get(n,this.gameData)}catch(e){console.log("external-vast err",e)}return t}},{key:"cancel",value:function(e){var t;if(!1!==this.requestRunning){this.requestRunning=!1,this._resetAdsLoader(),this._hide("cancel");var n=(null==e||null===(t=e.message)||void 0===t?void 0:t.indexOf("NO_VAST_URL"))>=0,r="AD_SDK_CANCELED";this._broadcast(r,{name:r,message:"Advertisement has been canceled.",status:"warning",noVast:n,analytics:{category:this.eventCategory,action:r,label:this.gameData.gameId}})}}},{key:"_checkAutoPlay",value:(Q=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=navigator.userAgent.toLowerCase();a.indexOf("safari")>-1&&a.indexOf("chrome"),F.video({inline:!0,muted:!1}).then(function(n){t(this,i);var r=n.result;n.error,e(!0===r?{autoplayAllowed:!0,autoplayRequiresMute:!1}:{autoplayAllowed:!0,autoplayRequiresMute:!0})}.bind(this))}.bind(this)));case 1:case"end":return e.stop()}}),e,this)}))),function(){return Q.apply(this,arguments)})},{key:"_initDisplayContainerWithAutoPlay",value:(V=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 V.apply(this,arguments)})},{key:"startAd",value:(H=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=XD(XD({},s),{},{adType:a}),null!==(i=this.gameData.adspn)&&void 0!==i&&i.enabled&&(this.adFlowProcessSpinner||(this.adFlowProcessSpinner=new JD,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!==A.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!==A.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!==A.Interstitial){e.next=37;break}return e.abrupt("return",this._startInterstitialAd(s));case 37:if(a!==A.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 H.apply(this,arguments)})},{key:"_startOpusAd",value:(q=e(r.mark((function e(n){var i,a,s,o,d,c,u,l,h,p,f,m,A,g,v,b=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.adTypeFound="rewarded"===n.adTypeFound?"reward":n.adTypeFound,a=n.adTypeFound,this._send_atom_event("opus-ad.start"),!this.requestRunning){e.next=9;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 9:if(s=null===(i=window.gdlocus)||void 0===i?void 0:i.adBreak){e.next=14;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 14:this._send_atom_event("opus-ad.ready"),o=void function(){return t(this,b),!0}.bind(this),this.requestRunning=!0,d=this.gameData,c=d.gameId,u=d.slug,l=d.title,h={assetId:c,slug:u,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),A=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),v={type:a,meta:h,beforeAd:p,afterAd:f,adBreakDone:g},"reward"===a&&(v=XD(XD({},v),{},{adDismissed:m,adViewed:A})),this.opusEventReceived=!1,this._startTimeoutForOpus(),s&&s(v);case 31:case"end":return e.stop()}}),e,this)}))),function(e){return q.apply(this,arguments)})},{key:"preloadAd",value:(M=e(r.mark((function e(t){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t!==A.Interstitial){e.next=4;break}return e.abrupt("return","gdsdk://preloaded");case 4:if(t!==A.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 M.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 _D(this.adContainer,n),this.adResume.add(),this.rewardedLabel=new yD(this.adContainer,n),this.rewardedLabel.add(),this.skipAdButton=new wD(this.adContainer,n,r),this.skipAdButton.add(),this.audioAdLabel=new kD(window.document.body),this.audioAdLabel.add(),this.audioAdLabel.hide()}catch(e){console.log("error on adding adResume",e)}}},{key:"loadDisplayAd",value:(L=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,c,u,l,h,p,f,m,A=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:try{(d=i?i.containerId:null)||s("Container id is not specified"),c=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!"),u=i.slotId?i.slotId:"gd__banner@".concat(d),document.getElementById(u)||(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)),c.appendChild(h)),(p=document.createElement("div")).id=u,p.classList.add("gd__banner"),c.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={})[u]={maxSize:[c.offsetWidth,c.offsetHeight]},window.idhb.requestAds({slots:m,callback:function(e){t(this,A),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 L.apply(this,arguments)})},{key:"_startInterstitialAd",value:(B=e(r.mark((function e(n){var i,a,s,o,d,c=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,c),Us.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(XD(XD({},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),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:(P=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(XD(XD({},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 P.apply(this,arguments)})},{key:"_loadPromo",value:(O=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,XD({adType:A.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 O.apply(this,arguments)})},{key:"_loadInterstitialAd",value:(D=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(A.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,XD({adType:A.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 D.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:(x=e(r.mark((function e(n){var i,a,s,o,d,c=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,c),Us.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(XD(XD({},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 x.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(A.Rewarded,t);case 6:e.t0=e.sent;case 7:return n=e.t0,delete this.preloadedRewardedAdVast,e.next=11,this._requestAd(n,XD({adType:A.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:(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.preloadedInterstitialAdVast,e.t0){e.next=6;break}return e.next=5,this._getAdVast(A.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 k.apply(this,arguments)})},{key:"_preloadRewardedAd",value:(w=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(A.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 w.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;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,c=(null===(d=this._adrequest_user_context)||void 0===d||null===(d=d.adTag)||void 0===d?void 0:d.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 ED(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 u;if(a&&"click"===r){var l,h=null===(l=this._adrequest_user_context)||void 0===l?void 0:l.tnl_ad_pos;this.clickCount[h]++,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!==(u=this.adContext)&&void 0!==u&&u.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(),c="AD_SDK_MANAGER_READY";this._broadcast(c,{name:c,message:"AD SDK is ready",status:"success",analytics:{category:c,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=this,s=new Date,o=s.getHours(),d=s.getDate(),c=s.getMonth(),u=s.getFullYear(),l=v(google.ima.AdEvent.Type,e.type),h=!1,p=(null==e||null===(n=e.getAd())||void 0===n?void 0:n.getContentType())||"",f=!p.startsWith("image")&&!p.startsWith("text"),m=null==e||null===(r=e.ad)||void 0===r||null===(r=r.data)||void 0===r?void 0:r.title,g=null==e||null===(i=e.getAd())||void 0===i?void 0:i.data.skippable;this._sendIMAEventsToHB(e);var b=document.getElementById("game"),_="";switch(e.type){case google.ima.AdEvent.Type.AD_BREAK_READY:_="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:_="Fired when an ads list is loaded.";break;case google.ima.AdEvent.Type.ALL_ADS_COMPLETED:this.contentPaused&&(h=!0),this.isAudioAd&&(this.audioAdLabel.hide(),this.isAudioAd=!1),this.rewardGuarantied=!1,_="Fired when the ads manager is done playing all the ads.";break;case google.ima.AdEvent.Type.CLICK:_="Fired when the ad is clicked.";var y=e.getAd().getContentType();this._show({mode:"click",contentType:y}),GD();break;case google.ima.AdEvent.Type.COMPLETE:e.getAd(),h=this._is_completed(e.getAd()),_="Fired when the ad completes playing.",this.adType_!==A.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&&(b.style.display="none"),this.contentPaused=!0,_="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&&(b.style.display="block"),_="Fired when content should be resumed. This usually happens when an ad finishes or collapses.",this.contentPaused?h=!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();break;case google.ima.AdEvent.Type.DURATION_CHANGE:_="Fired when the ad's duration changes.";break;case google.ima.AdEvent.Type.FIRST_QUARTILE:_="Fired when the ad playhead crosses first quartile.";var w=e.getAd().getContentType();this._show({mode:"first_quartile",contentType:w});break;case google.ima.AdEvent.Type.IMPRESSION:_="Fired when the impression URL has been pinged.",e.getAd(),console.log("gdsdk: eventname IMPRESSION",this.isAudioAd),this._hideAdSpinner(),this.isAudioAd&&this.audioAdLabel.show();break;case google.ima.AdEvent.Type.INTERACTION:_="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:_="Fired when the displayed ad changes from linear to nonlinear, or vice versa.";break;case google.ima.AdEvent.Type.LOADED:var k=e.getAd().getContentType();_=k,this._show({mode:"loaded",contentType:k});break;case google.ima.AdEvent.Type.LOG:e.getAdData().adError&&(_=e.getAdData());break;case google.ima.AdEvent.Type.MIDPOINT:_="Fired when the ad playhead crosses midpoint.";break;case google.ima.AdEvent.Type.PAUSED:f&&"VPAID"!==m&&this.adResume.show(),_="Fired when the ad is paused.";break;case google.ima.AdEvent.Type.RESUMED:_="Fired when the ad is resumed.",f&&(this.adResume.hide(),this.rewardedLabel.hide());break;case google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED:_="Fired when the displayed ads skippable state is changed.";break;case google.ima.AdEvent.Type.SKIPPED:h=this._is_completed(e.getAd()),_="Fired when the ad is skipped by the user.",ND(),this.t4rButton&&this.t4rButton.hide();break;case google.ima.AdEvent.Type.STARTED:var E;if(this.adType_===A.Rewarded)!g&&null!==(E=this.gameData.rwskp)&&void 0!==E&&E.enabled&&setTimeout(function(){t(this,a),this.skipAdButton.show(),this._broadcast("SDK_REWARDED_WATCH_COMPLETE",{message:"",status:"success"}),this.rewardGuarantied=!0}.bind(this),3e4),this.rewardedLabel.show();this._hideAddResume(),_="Fired when the ad starts playing.";break;case google.ima.AdEvent.Type.THIRD_QUARTILE:_="Fired when the ad playhead crosses third quartile.";break;case google.ima.AdEvent.Type.USER_CLOSE:h=this._is_completed(e.getAd()),_="Fired when the ad is closed by the user.";break;case google.ima.AdEvent.Type.VOLUME_CHANGED:_="Fired when the ad volume has changed.";break;case google.ima.AdEvent.Type.VOLUME_MUTED:_="Fired when the ad volume has been muted."}if(""!==l&&""!==_){var x=!this.contentPaused&&e.type===google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,D=!this.contentPaused&&e.type===google.ima.AdEvent.Type.ALL_ADS_COMPLETED;x||D||this.isAudioAd||this._broadcast(l,{name:l,message:_,status:"success",analytics:{category:l,action:this.parentDomain,label:"h".concat(o," d").concat(d," m").concat(c," y").concat(u)}})}if(h&&!this.adSuccess){this.adSuccess=!0;var S=e.getAd(),R="Rainbow"===(null==S?void 0:S.getAdSystem())&&(null==S?void 0:S.getWrapperAdIds().some(function(e){return t(this,a),"promo"===e}.bind(this)));null==S||S.getAdSystem(),null==S||S.getWrapperAdIds(),this._broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success",isPromoSuccess:R}),this.resetForNext(e)}}},{key:"_run_atom_tag_aws_test",value:function(e){var n=this;try{var r,i;if(!((null===(r=this.gameData)||void 0===r||null===(r=r.aws_tst)||void 0===r?void 0:r.enabled)&&(null===(i=this.gameData)||void 0===i||null===(i=i.aws_tst)||void 0===i||null===(i=i.ep)||void 0===i?void 0:i.atm)))return;var a=e.type,s=e.url;if("none"===a||!s)return;s=s.replace("tag.atom.gamedistribution.com","atom-tag-prod-aws.gamedistribution.com"),fetch(s).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,c=a.fallback_imp_url,u=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:u}:h&&n&&(i={type:"fallbacj_imp",url:c})}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);$D.emit("AD_ERROR",r),this._broadcast(t,{message:r,details:i,status:"warning",analytics:{category:t,action:i,label:r}}),this._hideAddResume()}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_===A.Rewarded&&this.rewardedLabel&&this.rewardedLabel.hide()}catch(e){console.log("Error on hide adResume",e)}}},{key:"_hideSkipButton",value:function(){try{this.adType_===A.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(xD(e.getInnerError)){var t=e.getInnerError();if(t)return xD(t.getErrorCode)&&xD(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];j(s)&&(i.query[a]=N.stringify(s))}var o=new C(i.url,!0);return G(o.query,i.query||{}),XD({url:o.toString()},n)}}},{key:"_transformVast",value:function(e,t){var n={url:e.url};try{var r=new C(e.url,!0),i=this._transformQuery(e,t,r);i&&(n.url=r.toString());var a=i?r:new C(e.url,!0);if(a.query.cust_params){var s=N.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&&j(this.options.retry_on_success.vast_query)?a=this.options.retry_on_success.vast_query:n.retry_on_failure&&this.options.retry_on_failure&&j(this.options.retry_on_failure.vast_query)&&(a=this.options.retry_on_failure.vast_query),a=U(a),j(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=N.parse(s.cust_params);if(a.cust_params&&a.cust_params.$$remove){for(var c in d){new RegExp(a.cust_params.$$remove,"i").test(c)&&delete d[c]}delete a.cust_params.$$remove}var u=this.macros.transform(a,{get:function(n){return t(this,i),e.tnl_keys[n.toLowerCase()]}.bind(this)});return s.cust_params=d,G(s,u),s.cust_params=N.stringify(s.cust_params),!0}}}},{key:"_isExcludedBidderForT4R",value:function(){var e=this;try{var n,r,i,a=(null===(n=this._adrequest_user_context)||void 0===n||null===(n=n.adTag)||void 0===n?void 0:n.bidder)||"adx";this.msgrt.send("bidder",{message:a}),this._adrequest_user_context,'bidder:"'.concat(a,'"');var s=(null===(r=this.gameData.t4rc)||void 0===r?void 0:r.bidder_exc)||[],o=(null===(i=this.gameData.t4rc)||void 0===i?void 0:i.bidder_inc)||[],d=!1;return o.length>0?d=!o.some(function(n){return t(this,e),n===a}.bind(this)):s.length>0&&(d=s.some(function(n){return t(this,e),n===a}.bind(this))),d}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===(e=e.t4rc)||void 0===e?void 0:e.bidder_exc_rate,i=null!=r&&r.enabled?(null==r?void 0:r.rate)||.8:0,a=(null===(t=this._adrequest_user_context)||void 0===t||null===(t=t.adTag)||void 0===t?void 0:t.bidder)||"adx",s=Math.random();return n||"adx"!==a&&s<i}},{key:"_isT4R",value:function(e){var t,n,r,i,a,s,o;if(!this.gameData.publishedAt)return{success:!1,reason:"pdate-2"};var d=new Date(this.gameData.publishedAt);if(((new Date).getTime()-d.getTime())/864e5<=10)return{success:!1,reason:"pdate-1"};var c=this.gameData.meta,u=e.t4r.meta;if((null==c||null===(t=c.ast)||void 0===t?void 0:t.c)>=(null==u||null===(n=u.ast)||void 0===n?void 0:n.c)&&(null==c||null===(r=c.sit)||void 0===r?void 0:r.c)>=(null==u||null===(i=u.sit)||void 0===i?void 0:i.c))return{success:!1,reason:"meta"};var l=this._isExcludedBidderForT4RWithBidderExcRate();if(console.log("zxcv isExcludedBidderForT4R",l),l)return this.msgrt.send("bidder.ex",{message:"true"}),{success:!1,reason:"bidder"};this.msgrt.send("bidder.ex",{message:"false"});var h=null===(a=this._adrequest_user_context)||void 0===a?void 0:a.tnl_ad_pos;if(this.clickCount[h]>=(null===(s=e.t4r[h])||void 0===s?void 0:s.count))return{success:!1,reason:"click-count"};if(null!=e&&null!==(o=e.contentType)&&void 0!==o&&o.startsWith("image/")||"text"===(null==e?void 0:e.contentType)){var p,f=h&&(null===(p=e.t4r[h])||void 0===p?void 0:p.enabled);return{success:f,reason:f?null:"rule-check"}}if(null!=e&&e.contentType.startsWith("video/")){var m,A=(null===(m=e.t4r[h])||void 0===m?void 0:m.viper)||0;if(A>0){var g,v=Math.random()<A,b=h&&v&&(null===(g=e.t4r[h])||void 0===g?void 0:g.enabled);return{success:b,reason:b?null:"viper-check"}}return{success:!1,reason:"rule-check-viper"}}return{success:!1,reason:"media-format"}}},{key:"_isVMAP",value:function(e){var t,n,r,i,a,s;if(!e)return!1;var o="preroll"===e&&(!0===(null===(t=this.gameData)||void 0===t||null===(t=t.pAds)||void 0===t?void 0:t.vmap)||!0===(null===(n=this.gameData)||void 0===n||null===(n=n.pAds)||void 0===n||null===(n=n.vmap)||void 0===n?void 0:n.enabled))||"midroll"===e&&(!0===(null===(r=this.gameData)||void 0===r||null===(r=r.mAds)||void 0===r?void 0:r.vmap)||!0===(null===(i=this.gameData)||void 0===i||null===(i=i.mAds)||void 0===i||null===(i=i.vmap)||void 0===i?void 0:i.enabled))||"rewarded"===e&&(!0===(null===(a=this.gameData)||void 0===a||null===(a=a.rAds)||void 0===a?void 0:a.vmap)||!0===(null===(s=this.gameData)||void 0===s||null===(s=s.rAds)||void 0===s||null===(s=s.vmap)||void 0===s?void 0:s.enabled));if(!o)return!1;var d=this._get_vmap_config(e),c=this.adCounter[e];return void 0!==(null==d?void 0:d.start)?c>=(null==d?void 0:d.start):o}},{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;switch(e){case"preroll":return null===(t=this.gameData)||void 0===t||null===(t=t.pAds)||void 0===t?void 0:t.vmap;case"midroll":return null===(n=this.gameData)||void 0===n||null===(n=n.mAds)||void 0===n?void 0:n.vmap;case"rewarded":return null===(r=this.gameData)||void 0===r||null===(r=r.rAds)||void 0===r?void 0:r.vmap;default:return null===(i=this.gameData)||void 0===i||null===(i=i.pAds)||void 0===i?void 0:i.vmap}}},{key:"_isDP",value:function(e){var t;return!!e&&!0===(null===(t=this.gameData)||void 0===t||null===(t=t.dp)||void 0===t||null===(t=t[e])||void 0===t?void 0:t.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 bD(this.gameData).checkCustomParams();a&&(i.cp=a);var s=encodeURIComponent(I.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(I.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),c=o?d:void 0;return function(){t(this,r),Us.promoError&&(console.log("promo-test fictional promo error"),c=void 0)}.bind(this),{promo_url:c,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,c,u,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},(c=new bD(a.gameData).checkCustomParams())&&(d.cp=c),u=encodeURIComponent(I.encode(JSON.stringify(d))),null==i||i.adapterIndex,null==i||i.isLastAdapter,l=null===(o=a.gameData.promo)||void 0===o?void 0:o.rainbow,!1,null==l||l.enabled,null==i||i.isLastAdapter,fetch("https://tag.atom.gamedistribution.com/v1/atm?ar=".concat(u)).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(u,"&ec=[ERRORCODE]"),impression_url:"https://tag.atom.gamedistribution.com/v1/imp?ar=".concat(u),skip_url:"https://tag.atom.gamedistribution.com/v1/skp?ar=".concat(u),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 C(t.vastUrl,!0);if(null===(n=r.query)||void 0===n||!n.cust_params)return;var i=N.parse(r.query.cust_params);if(!i.tnl_asset_id)return;i.adsense=1,r.query.cust_params=N.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 C(e.url,!0);if(null===(i=a.query)||void 0===i||!i.cust_params)return;var s=N.parse(a.query.cust_params);s.bfa=r,s.adsense=0,a.query.cust_params=N.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:(p=e(r.mark((function e(n){var i,a,s,o,d,c,u,l,h=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=this._getPrebidScripts(),a=i[0],s=function(){return t(this,h),!1}.bind(this),window.idhb=window.idhb||{iabCmpExists:s},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||[],(o=new URL(a)).searchParams.append("referer",window.idhb.options.configUrl),a=o.href,e.next=13,f(a,"gdsdk_prebid",{alternates:i,error_prefix:"Blocked:",exists:function(){return t(this,h),window.idhb.requestAds}.bind(this)});case 13:d=b("ch",window.location.href),c=b("ch_date",window.location.href),u={tnl_content_category:this.category.toLowerCase()},d&&(u.channel=d),c&&(u.ch_date=c),(l=b("hl_label",this.parentURL)||b("hl_label",window.location.href))&&(u.label=l),window.idhb.setAdserverTargeting(u),window.idhb.allowPersonalizedAds(!!parseInt(this.userAllowedPersonalizedAds)),window.idhb.addEventListener("slotRenderEnded",function(e){var n=this;t(this,h);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),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),this._broadcast("DISPLAYAD_IMPRESSION",{message:a,status:"success"}))}catch(e){}}.bind(this));case 23:case"end":return e.stop()}}),e,this)}))),function(e){return p.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,f(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:(u=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:if(!this.gameData.afg_disabled){e.next=3;break}return e.abrupt("return");case 3:return(o={}).crossorigin="anonymous",o["data-ad-client"]=(null==n||null===(i=n.adsense_client)||void 0===i?void 0:i.length)>0?n.adsense_client:"ca-pub-2316275586951220",o["data-ad-frequency-hint"]="30s",o.allow="autoplay",(null==n||null===(a=n.adsense_channel)||void 0===a?void 0:a.length)>0&&(o["data-ad-channel"]=n.adsense_channel),(null==n||null===(s=n.adsense_host)||void 0===s?void 0:s.length)>0&&(o["data-ad-host"]=n.adsense_host),!0===(null==n?void 0:n.adsense_adbreak_test)&&(o["data-adbreak-test"]="on"),e.next=15,f("https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js","afg",{error_prefix:"Blocked:",exists:function(){return t(this,d),!!window.adsbygoogle}.bind(this),attrs:o});case 15:window.adsbygoogle=window.adsbygoogle||[],window.adsbygoogle.push({sound:"on",preloadAdBreaks:"on"});case 17:case"end":return e.stop()}}),e,this)}))),function(e){return u.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],c=d&&(null===(o=d.children[0])||void 0===o?void 0:o.children[0]);c&&"IFRAME"===c.tagName&&c.style.height!==r&&(c.style.height=r,i&&(c.parentElement.style.overflow="auto"))}}catch(e){"out-of-bounds error: ".concat(e.message)}}},{key:"clearSession",value:function(){this.requestRunning=!1}},{key:"_startAdsensePlacementRewardedAd",value:(c=e(r.mark((function e(n){var i,a,s,o,d,c,u,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),Us.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),c=function(e){t(this,h),i=!0,e()}.bind(this),u=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||(Bs("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:c,adBreakDone:u}),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 c.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),Us.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),Us.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=this;if(null===(n=this.gameData)||void 0===n||null===(n=n.ad_blcks)||void 0===n||null===(n=n.adsenseTimeout)||void 0===n?void 0:n.enabled){null==e||e.adType,null===(r=this.gameData)||void 0===r||null===(r=r.ad_blcks)||void 0===r||null===(r=r.adsenseTimeout)||void 0===r||r.timeout;var a=setTimeout(function(){t(this,i),this.adPlacementEventReceived||(this._broadcast("AD_ERROR",{message:"timeout-_startTimeoutForAdBreak",status:"error"}),this.adPlacementEventReceived=!1,this.requestRunning=!1),clearTimeout(a)}.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),5e3)}},{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),Us.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(I.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 Iy).get();return n=XD(XD({},n),r),n=t?XD(XD({},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===A.Rewarded)t="reward";else if(n===A.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,XD(XD({},n),{},{skipForward:i,adPosition:a}))}},{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}(),nS=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,mv(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},pv(this.moduleName,this.moduleConfig)})),rS=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,mv(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="GDSplashDynamic",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},pv(this.moduleName,this.moduleConfig)})),iS=function(e,t){console.log(e,t)},aS={},sS={},oS=null;function dS(){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 aS.version=r,aS.frame=e,aS.function=n,aS.version}function cS(e){var n=this;return oS||(oS=new Promise(function(r){function i(t,n){if(iS("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:aS,consentData:i}),void r({result:"ok",consentData:t})):void 0;r({result:"ok",consentData:t})}else r({result:"cmpCallFailed"})}t(this,n),dS(),aS.frame?2===aS.version?(iS("TCF v2 CMP found. Fetching the consent."),aS.function?(iS("CMP API is directly accessible, calling it now..."),aS.function("addEventListener",aS.version,i)):(iS("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!==sS[r.callId]&&sS[r.callId](r.returnValue,r.success)}}window[a]=function(e,r,s,o){t(this,i);var d=Math.random()+"",c="".concat(a,"Call"),u=T({},c,{command:e,parameter:o,callId:d,version:r});sS[d]=s,n.postMessage(u,"*")}.bind(this),window.addEventListener("message",s,!1),window[a](e,aS.version,r)}("addEventListener",aS.frame,i))):r({result:"cmpVersionNotV2",cmp:aS}):r({result:"cmpNotFound"})}.bind(this)),oS)}var uS=new(function(){function t(){R(this,t),this.productName="Game Distribution"}var n;return S(t,[{key:"checkIfExcluded",value:function(e){try{var t;return!(null===(t=e.diagnostic)||void 0===t||null===(t=t.gameDock)||void 0===t||!t.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,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(a=null==t||null===(i=t.visitor)||void 0===i||null===(i=i.visitorData)||void 0===i?void 0:i.visitorId){e.next=6;break}return e.abrupt("return");case 6:return s=encodeURIComponent(this.productName),o=encodeURIComponent(a),e.prev=8,d="https://tracker-v4.gamedock.io/v1/events-tracker/track/product/".concat(s,"/user_id/").concat(o),e.next=12,fetch(d,{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(s,"/user_id/").concat(o),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 lS(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 hS(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 hS(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 hS(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 pS=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 c=document.createElement("script");if(c.async=null==s||s,c.type="text/javascript",c.onload=function(){t(this,d),e()}.bind(this),c.onerror=function(){t(this,d);var e="Error on script load, Error: ".concat(r);console.log(e),o(e)}.bind(this),c.src=r,i){var u,l=lS(i);try{for(l.s();!(u=l.n()).done;){var h=u.value,p=h.key,f=h.value;c.setAttribute(p,f)}}catch(e){l.e(e)}finally{l.f()}}a||(a=document.head),a.appendChild(c)}catch(e){var m="Error on script load catch, Error: ".concat(r);console.log(m,e),o(m)}}.bind(this))},fS="ffd4774b-99ae-4464-8f40-3afa12b4692e",mS=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,pS({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,pS({src:"https://cdn.cookielaw.org/consent/".concat(fS,"/OtAutoBlock.js"),attributes:[{key:"id",value:"gd-cookie-pro-autoblock"}],isAsync:!1});case 5:return e.next=7,pS({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:fS}],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)}}(),AS=new M,gS={"https://games.softgames.com":{"splash-hidden":"splash-hidden"},"https://sg.gamedistribution.com":{"splash-hidden":"splash-hidden"},"https://html5.gamedistribution.com":{key:"value"}},vS=!1;function bS(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(gS).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;!function(e){if("gd-sdk-on-event"===(null==e?void 0:e.type)){var t,n,r;if("midroll"!==(null==e||null===(t=e.event)||void 0===t?void 0:t.adPosition))return;var i="CONTENT_RESUME_REQUESTED"===(null===(n=e.event)||void 0===n?void 0:n.name);"CONTENT_PAUSE_REQUESTED"===(null===(r=e.event)||void 0===r?void 0:r.name)&&(vS=!0),i&&vS&&(vS=!1,window.parent.postMessage({type:"sg-game-event",eventName:"levelFinish",data:{score:100}},"*"))}}(r);var o=function(){t(this,n);try{var r;return null==e||null===(r=e.source)||void 0===r||null===(r=r.location)||void 0===r?void 0:r.href}catch(e){}}.bind(this);if(window.parent&&s){if("https://html5.gamedistribution.com"===i){var d=o();if(!d)return;var c=d&&["9555f04e1900482aaaef710cd2f8c440"].some(function(e){return t(this,n),d.indexOf(e)>0}.bind(this)),u=["sg-game-event"].some(function(e){return t(this,n),e===(null==r?void 0:r.type)}.bind(this));if(!c&&!u)return}var l=r.eventName,h=r.data;window.mpHelper&&(console.log("SG_EVENTS sending to minijuegos!"),"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=gS[i][a];p&&AS.emit(p,r)}}}),!1);var _S="__msgr",yS=q(),wS=function(e){var n=this;if(!window[_S]){var r=document.createElement("iframe");if(r.src="https://static.gamedistribution.com/message/index.html",r.style.display="none",r.name=_S,document.body.appendChild(r),window!==window.top){var i={gameId:e.gameId,target:e.evnts.domain,token:yS,event_name:"TokenGenerated",timestamp:Date.now()};r.onload=function(){xS(i)},setInterval(function(){t(this,n),i.timestamp=Date.now(),i.event_name="Heartbeat",xS(i)}.bind(this),1e3*e.evnts.heartbeatDuration)}}window.addEventListener("message",function(e){t(this,n);try{var r=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?bS(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bS(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e.data);if(!r.event_name)return;r.token=yS,xS(r)}catch(e){console.error("GD Messager Error",e.message)}}.bind(this),!1)},kS=function(e){try{var t={gameId:e.game.gameId,target:e.game.evnts.domain,event_name:e.event,timestamp:Date.now()},n=ES(window);n!==window.top&&(null==n||n.postMessage(t,"https://html5.gamedistribution.com"))}catch(e){}},ES=function e(t){try{var n,r=null==t?void 0:t.parent;if("game"===(null===(n=r.document)||void 0===n||null===(n=n.activeElement)||void 0===n?void 0:n.id))return r;e(r)}catch(e){return t}},xS=function(e){try{window[_S]&&window[_S].postMessage(e,"*")}catch(e){console.log("GD Messager initialization, please wait....")}},DS=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}(),SS=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}(),RS=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 SS,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",m.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",m.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 TS(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 CS(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?TS(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):TS(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var IS="_gd_vs";function OS(e){return PS.apply(this,arguments)}function PS(){return PS=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,US({gameId:n,serverDate:i});case 6:a=e.sent,e.next=13;break;case 9:e.prev=9,e.t0=e.catch(3),Ls("visit-update error, indexedDb",e.t0.message),s.push(e.t0.message);case 13:if(a||!m.available){e.next=24;break}return e.prev=14,e.next=17,BS({gameId:n,serverDate:i});case 17:a=e.sent,e.next=24;break;case 20:e.prev=20,e.t1=e.catch(14),Ls("visit-update error, Ls",e.t1.message),s.push(e.t1.message);case 24:return e.abrupt("return",CS(CS({},a),{},{errors:s}));case 25:case"end":return e.stop()}}),e,null,[[3,9],[14,20]])}))),PS.apply(this,arguments)}function BS(e){return LS.apply(this,arguments)}function LS(){return LS=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 RS({mode:a="local-storage"}),e.next=5,s.get(IS);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(IS,o);case 13:return e.abrupt("return",{visit:d,mode:a});case 14:case"end":return e.stop()}}),e)}))),LS.apply(this,arguments)}function US(e){return MS.apply(this,arguments)}function MS(){return MS=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 RS({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)}))),MS.apply(this,arguments)}function FS(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?FS(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):FS(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var NS,GS,qS,HS=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,f(t[0],"soecket.io.js",{alternates:t});case 4:case"end":return e.stop()}}),e)})));return function(){return t.apply(this,arguments)}}(),VS=0,QS=function(){var n=e(r.mark((function n(i){var a,s,o,d,c=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:if(o=new C(window.location.href),!("html5.gamedistribution.com"!==o.host)){n.next=10;break}return n.abrupt("return");case 10:return n.next=12,HS();case 12:GS=q(),d={json:JSON.stringify(a)},"wss://ws.gamedistribution.com",(NS=io("wss://ws.gamedistribution.com",{query:d,upgrade:!1,transports:["websocket"],reconnectionDelay:6e4,autoConnect:!1})).on("connect",function(){t(this,c)}.bind(this)),NS.on("after-connect",function(){var t=e(r.mark((function e(t){var n,i,s,o,d,c;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return qS=qS||(null==t?void 0:t.serverDate),n=a.gameId,e.next=4,OS({gameId:n,serverDate:qS});case 4:i=e.sent,s=i.visit,o=i.mode,d=i.errors,a.visit=jS(jS({},s),{},{stm:o,errors:d}),c={json:JSON.stringify(a)},NS.emit("client-info",{clientId:GS,counter:VS++,serverDate:qS,query:c});case 11:case"end":return e.stop()}}),e)})));return function(e){return t.apply(this,arguments)}}()),NS.on("disconnect",function(e){t(this,c)}.bind(this)),NS.connect(),n.next=25;break;case 22:n.prev=22,n.t0=n.catch(1),s&&s(n.t0);case 25:case"end":return n.stop()}}),n,this,[[1,22]])})));return function(e){return n.apply(this,arguments)}}(),zS=!1;function WS(e,t){try{if("play"===e){if(zS)return;zS=!0}if(NS){var n={json:JSON.stringify(t||{})};NS.emit("socket-event",{topic:e,clientId:GS,counter:VS,serverDate:qS,query:n})}}catch(e){console.log("Error on sending socket-event",e.message)}}function KS(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 YS(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?KS(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):KS(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function JS(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 ZS(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 ZS(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 ZS(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 XS,$S=function(){function n(e){var r=this;R(this,n),T(this,"_getAdTypeByAfgPosition",function(e){var n=this;t(this,r);var i={preroll:["preroll","start"],midroll:["next"],rewarded:["reward"]},a=Object.keys(i).find(function(r){var a=this;return t(this,n),i[r].some(function(n){return t(this,a),n===e.params.position}.bind(this))}.bind(this));return a||"midroll"}.bind(this)),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._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._muteRequested=!1,this._terminateRequested=!1}var i,a;return S(n,[{key:"runAdFlow",value:(a=e(r.mark((function e(n){var i,a,s,o,d,c,u,l,h,p,f,m,A,g,v,b,_,y,w,k,E,x,D,S,R,C,I,O,P,B,L,U,M,F,j,N,G,q,H,V,Q,z,W,K,Y,J,Z,X,$,ee,te=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.adRequest=n,u=this._getAdTypeByAfgPosition(n),n.params.adTypeFound=u,n.params.position,(l=this._getAdFlow(u)).find(function(e){return t(this,te),"opus"===e}.bind(this))&&!this.isOpusReady()&&(l=l.filter(function(e){return t(this,te),"opus"!==e}.bind(this)),this._msgrt.send("opus.sdk",{message:"Not ready"})),h=this._gameData,p=h.afg_disabled,f=null===(i=n.params)||void 0===i?void 0:i.isGift,m=null===(a=n.params)||void 0===a?void 0:a.isMidrollPlus,null===(s=n.params)||void 0===s||s.position,A=null===(o=h.promo)||void 0===o?void 0:o.rainbow,g=(null==A?void 0:A.enabled)&&(null===(d=A.position)||void 0===d?void 0:d[u]),v=null==A?void 0:A.gift,b=g&&null!=A&&A.duration?null==A?void 0:A.duration:5,_=p?l.filter(function(e){return t(this,te),"adsense"!==e}.bind(this)):l,y=this.get_ad_system_init_result(),w=y.afg,k=y.ima,E=null==h||null===(c=h.ad_blcks)||void 0===c||null===(c=c.removeOtherAdaptors)||void 0===c?void 0:c.enabled,this.anyAdBlocking=!w||!k,this.bothAdBlocking=!w&&!k,this.adsBlocked=E&&this.anyAdBlocking||this.bothAdBlocking,this.adsBlocked?(Bs("gd-adflow adsBlocked so changing the flow"),_=[]):(w||(_=_.filter(function(e){return t(this,te),"adsense"!==e}.bind(this))),k||(_=_.filter(function(e){return t(this,te),"ima"!==e}.bind(this)))),x=!1,D=!1,S=[],R=0,C=!1,O={},P=JS(_),e.prev=33,P.s();case 35:if((B=P.n()).done){e.next=81;break}if(L=B.value,!this._terminateRequested){e.next=39;break}return e.abrupt("break",81);case 39:if(n.params.adapter=L,U=R===_.length-1,M=f&&v||!f,F=U&&g&&M,n.params=YS(YS({},n.params),{},{adapterIndex:R,isLastAdapter:U,shouldFail:!1,extraPromoRunOnFail:F,muteRequested:this._muteRequested}),!this._muteRequested||"adsense"!==L){e.next=46;break}return e.abrupt("continue",79);case 46:return function(){t(this,te),Us.firstSuccessOrder&&!isNaN(Us.firstSuccessOrder)&&(n.params.shouldFail=R<Us.firstSuccessOrder)}.bind(this),Bs("gd-adflow, before adInvoke",R,L,n.params.shouldFail),e.next=50,this.adInvoke(n);case 50:if(j=e.sent,N=j.success,G=j.args,q=j.isSkipped,H=j.noVast,V=j.t4r,Q=null==G?void 0:G.reason,z=null==G?void 0:G.message,W=null==G?void 0:G.errorType,O[L]=O[L]||{req:0,imp:0,fail:0},O[L].req++,N?O[L].imp++:(O[L].fail++,O[L].failReason=Q,O[L].failMessage=z,O[L].failType=W),!N){e.next=70;break}return Bs("gd-adflow, adapter-result-success",R,L,G,V),x=!0,D=!(null==G||!G.isPromoSuccess),I=V,e.abrupt("break",81);case 70:if(Bs("gd-adflow, adapter-result-failure",R,L,G.message),R++,S.push(G.message),!q){e.next=75;break}return e.abrupt("break",81);case 75:if(!H){e.next=78;break}return this._runAutoResume(),e.abrupt("break",81);case 78:C=F;case 79:e.next=35;break;case 81:e.next=86;break;case 83:e.prev=83,e.t0=e.catch(33),P.e(e.t0);case 86:return e.prev=86,P.f(),e.finish(86);case 89:if(!C){e.next=95;break}return e.next=92,new DS(this).run({duration:b});case 92:e.sent.success&&(D=!0);case 95:return function(){var e;t(this,te),Us.disableGift&&null!==(e=h.gft)&&void 0!==e&&e[u].enabled&&(h.gft[u].enabled=!1)}.bind(this),K=S.join(" /n"),x?(this._setAdRequestTimer(),this._onResumeGame("Advertisement(s) are done. Start / resume the game.","success"),this._giveGift(u),"midroll"===u&&this._executeMidrollPlus()):(this._onResumeGame(K,"warning"),this._giveGift(u),"midroll"===u&&this._executeMidrollPlus()),Y="-1",J="none",x?(Y="index_".concat(R),J=_[R]):D&&(Y="promo",J="promo"),Z=this.get_session_id(),this.anyAdBlocking&&"-1"===Y?(X="rewarded"===u?"rewarded":this.blockedAdsMap.preroll?"midroll":"preroll",this.blockedAdsMap[X]=this.blockedAdsMap[X]?this.blockedAdsMap[X]+1:1,JSON.stringify(this.blockedAdsMap),this._msgrt.send("adflow.blocked.pos",{message:"".concat(X)}),this.send_atom_event("gd.adflow",{adBlocker:!0,afgBlocked:!w,imaBlocked:!k,isGift:f,isMidrollPlus:m,adType:X,sessionId:Z,successAdapter:"none",adFlowIndex:Y,adapterResults:O})):($=T(T(T(T({},"adflow.all.index",{message:"".concat(Y)}),"adflow.all.success_adapter",{message:"".concat(J)}),"adflow.".concat(u,".index"),{message:"".concat(Y)}),"adflow.".concat(u,".success_adapter"),{message:"".concat(J)}),Object.keys($).forEach(function(e){t(this,te);var n=$[e];this._msgrt.send(e,n)}.bind(this)),this.send_atom_event("gd.adflow",{adFlowIndex:Y,successAdapter:J,adBlocker:!1,afgBlocked:!w,imaBlocked:!k,isGift:f,isMidrollPlus:m,adType:u,sessionId:Z,t4r:I,adapterResults:O}),WS("ad-session",{adSession:{adType:u,imp:"-1"!==Y&&"promo"!==Y,promo:"promo"===Y,blocked:this.anyAdBlocking&&"-1"===Y}})),ee={adType:u},this.eventBus.broadcast("AD_FLOW_COMPLETE",ee),e.abrupt("return",ee);case 110:case"end":return e.stop()}}),e,this,[[33,83,86,89]])}))),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,c,u,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),JSON.stringify(i),d={},c=function(e){t(this,l),JSON.stringify(i),a._eventBus.unsubscribeScope(o);var r="dismissed"===(null==e?void 0:e.message);n({success:!1,args:e,isSkipped:r,noVast:e.noVast})}.bind(this),u=function(e){t(this,l),JSON.stringify(i),a._eventBus.unsubscribeScope(o),n({success:!0,args:e,t4r:d})}.bind(this),a._eventBus.subscribe("AD_ERROR",c,o),a._eventBus.subscribe("AD_SDK_CANCELED",c,o),a._eventBus.subscribe("AD_SUCCESS",u,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),Ls("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=this,o=void function(){if(t(this,s),Us.customAdFlow)return JSON.parse(Us.customAdFlow)}.bind(this),d=this._gameData.adflw;o&&(d=o);var c=null!==(n=d)&&void 0!==n&&null!==(n=n.adapters)&&void 0!==n&&n.default?null===(r=d)||void 0===r||null===(r=r.adapters)||void 0===r?void 0:r.default:["ima","adsense"];return c=null!==(i=d)&&void 0!==i&&null!==(i=i.adapters)&&void 0!==i&&i[e]?null===(a=d)||void 0===a||null===(a=a.adapters)||void 0===a?void 0:a[e]:c}},{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))}}]),n}(),eR=new M,tR=["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(tR.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)XS=a,(window.parent||window).postMessage(r,"*"),eR.emit("aeria-event",r);else if(o){XS&&XS.postMessage(r,"*");var d=window.parent||window;d&&d.postMessage(r,"*")}}}),!1);var nR="https://html5.gamedistribution.com",rR="parent-data-request",iR="parent-data-response",aR=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,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===nR&&o===rR){var d={adRequestTimer:e.adRequestTimer};s.postMessage({type:iR,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===nR&&i===iR&&(e(s),a=!0)})),setTimeout(function(){t(this,i),a||e()}.bind(this),1e3);var s={type:rR};window.parent.postMessage(s,"*")}.bind(this)));case 1:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})}]),n}(),sR=new aR,oR={SDKExistsOnUpperFrame:!1};function dR(){return cR.apply(this,arguments)}function cR(){return(cR=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,f(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 uR(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 lR(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?uR(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):uR(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var hR=function(){Bs("gtag: GA not initialized",arguments)};function pR(e){return fR.apply(this,arguments)}function fR(){return fR=e(r.mark((function e(i){var a,s,o,d,c,u,l,h,p,m,A,g,v=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=i.onError,s=i.args,d="gdSDKDataLayer",c="https://www.googletagmanager.com/gtag/js?id=".concat(o="G-PLRTBHGSEL","&l=").concat(d),u=[c],e.prev=5,e.next=8,f(u[0],"gdsdk_google_analytics",{alternates:u,error_prefix:"Blocked:",exists:function(){return t(this,v),window[d]}.bind(this)});case 8:return window[d]=window[d]||[],hR=function(){window[d].push(arguments)},hR("js",new Date),e.next=14,H();case 14:return l=e.sent,h=l.lookupIabConsent,p=l.getGoogleAdType,e.next=19,h();case 19:m=e.sent,A=p(m.consentData),g=lR(lR({},g=s||{}),{},{cookie_flags:"SameSite=None;Secure",cmp:m.result,gdpr:"ok"===m.result?"object"===n(m.consentData)?!0===m.consentData.gdprApplies:"N/A":m.result,google_ads:null==A?void 0:A.type}),hR("config",o,g),e.next=31;break;case 27:e.prev=27,e.t0=e.catch(5),Ls("gtag: load GA error",e.t0),a&&a(e.t0);case 31:case"end":return e.stop()}}),e,this,[[5,27]])}))),fR.apply(this,arguments)}new C("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 C("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 mR=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 c=!1,u=setInterval(function(){t(this,a);try{s()&&(clearInterval(u),c=!0,e(!0))}catch(t){clearInterval(u),e(!1)}}.bind(this),d);setTimeout(function(){t(this,a),clearInterval(u),c||e(!1)}.bind(this),o)}}.bind(this))};function AR(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?AR(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):AR(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function vR(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},c=(new Iy).get();return d=gR(gR({},d),c),function(e,t){try{var n=r._layout,o=r._ua,d={tp:e,ct:0,vrs:Is.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(I.encode(JSON.stringify(d)))))}catch(e){}}(e,d=o?gR(gR({},d),o):d)}}}}function bR(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 _R(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?bR(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bR(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var yR=q(),wR=null,kR=null,ER=function(){function n(e){var r,i,a,s=this;if(R(this,n),wR)return wR;wR=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 Iy,this._location.print();var o=this._location.get(),d=(null==o||null===(r=o.top)||void 0===r||null===(r=r.domain)||void 0===r?void 0:r.value)||(null==o||null===(i=o.partner.domain)||void 0===i?void 0:i.value),c=null==o||null===(a=o.partner.url)||void 0===a?void 0:a.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||d,this._topDomain,this._parentURL,this._isFullScreen=!1,this._giftCount={preroll:0,midroll:0,rewarded:0},this._mplus_count=0,this._setConsoleBanner(),this._initializeMessageRouter(),this._checkConsole(),this._subscribeToEvents(),this.sdkReady=new Promise(this._initializeSDKWithGameData.bind(this)),this.sdkReady.then(function(e){t(this,s),this._sdk_ready=!0}.bind(this)).catch(function(e){t(this,s),this._sdk_ready=!1}.bind(this)).finally(function(){var e,n,r,i=this;if((t(this,s),null===(e=this._gameData)||void 0===e||null===(e=e.directTokenUse)||void 0===e?void 0:e.enabled)&&this._blockDirectTokenURLEmbedding().blocked)return;this.dumper=new vR({msgrt:this.msgrt,gameData:this._gameData,parentDomain:this._parentDomain,parentURL:this._parentURL,topDomain:this._parentURL}),this.dumper,this._initGameSessionTracking(),this._sendLoadedEvent(2),!0===(null===(n=this._gameData.lp)||void 0===n?void 0:n.load)&&this._sendLoadedEvent(1),this._sendLoaderDataEvent(),this._checkSplashAndPromoScreens(),this._initBlockingExternals(),this._initUnityHandler(),this._checkFullscreen(),null!==(r=this._gameData.evnts)&&void 0!==r&&r.enabled&&this._isLoaderGameURL()&&(wS(this._gameData),this._gameData.evnts.gameId===this.options.gameId&&setInterval(function(){t(this,i),this._send_gametag_data("heartbeat")}.bind(this),1e3*this._gameData.evnts.heartbeatDuration)),sR.init(this),this._send_gametag_data("sdk_init")}.bind(this)),this._registerSGBridge(),this._whichFrame(),this._loadLocus()}var i,g,v,b,y,T,O,P,B,L,M,F,j,G,q,H,V,Q;return S(n,[{key:"_getVisitorId",value:(Q=e(r.mark((function e(){var n,i,a,s=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,mR({handler:function(){return t(this,s),!!kR}.bind(this),timeout:1e3,interval:10});case 2:return i=e.sent,a=i?null===(n=kR)||void 0===n||null===(n=n.visitor)||void 0===n||null===(n=n.visitorData)||void 0===n?void 0:n.visitorId:"noVisitorId",e.abrupt("return",a);case 5:case"end":return e.stop()}}),e,this)}))),function(){return Q.apply(this,arguments)})},{key:"_initGameSessionTracking",value:(V=e(r.mark((function e(){var n,i,a,s,o,d,c,u,l,h,p,f,m,A,g,v,b,_=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null===(n=this._gameData)||void 0===n||null===(n=n.gs_trc)||void 0===n?void 0:n.enabled){e.next=3;break}return e.abrupt("return");case 3:return e.next=5,this._getVisitorId();case 5:i=e.sent,a=this._gameData,s=a.category,o=a.dname,d=a.pname,c=a.gameId,u=a.slug,l=a.title,h=a.ctry,p=this._topDomain||this._parentDomain,f=new Iy,m=f.get(),A=this.msgrt._ua,g=document.referrer,v=this.msgrt._layout,b={args:{rfr:g,category:s,dname:o,pname:d,gameId:c,slug:u,title:l,ctry:h,domain:p,loc:m,ua:A,layout:v,version:Is.version,visitorId:i},onError:function(e){t(this,_),this._sendSDKError(e)}.bind(this)},QS(b);case 18:case"end":return e.stop()}}),e,this)}))),function(){return V.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:(H=e(r.mark((function e(t){var n;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this._getGdModeIfExist()&&(n=u()||"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 H.apply(this,arguments)})},{key:"_loadCMP",value:(q=e(r.mark((function e(){var t,n,i,a;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._isMasterGameURL()){e.next=12;break}if(n=new Iy,0!==(null==(i=n.get("depth"))?void 0:i.value)||null===(t=this._gameData)||void 0===t||null===(t=t.cmp)||void 0===t||!t.enabled){e.next=12;break}if(null===(a=this._gameData)||void 0===a||null===(a=a.cmp)||void 0===a||!a.checkDepthOnly){e.next=9;break}return e.next=7,mS();case 7:e.next=12;break;case 9:if("html5.gamedistribution.com"!==this._topDomain){e.next=12;break}return e.next=12,mS();case 12:case"end":return e.stop()}}),e,this)}))),function(){return q.apply(this,arguments)})},{key:"testConsent",value:function(){try{dS();e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,cS({});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;AS.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());C(location.href,!0);if(this._whichFrame(),this._isMasterGameURL(),this._isExtHostedGameURL(),this._isTokenGameURL(),this._isHostHTML5Domain(),this._isExternalHoster(),location.href,document.referrer,t)try{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:(G=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.prev=0,e.next=3,this._getGameData();case 3:return this._gameData=e.sent,e.next=6,this._loadCMP();case 6: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(),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)||(this.videoAdReady=this._initializeVideoAd().then(function(){t(this,d),(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,d);var n="".concat(e).startsWith("Error: Blocked:");Bs("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))),n(this._gameData),e.next=21;break;case 16:e.prev=16,e.t0=e.catch(0),this._sendSDKError(e.t0),this.onResumeGame(e.t0.message,"warning"),i(e.t0);case 21:case"end":return e.stop()}}),e,this,[[0,16]])}))),function(e,t){return G.apply(this,arguments)})},{key:"_getDefaultOptions",value:function(){return{debug:!1,testing:!1,gameId:"4f3d7d38d24b740c95da2b03dc3a2333",prefix:"gdsdk__",onEvent:function(e){},onLoaderEvent:function(e){},flashSettings:{adContainerId:"",splashContainerId:""},advertisementSettings:{},resumeGame:function(){},pauseGame:function(){},onInit:function(e){},onError:function(e){},loader:{}}}},{key:"_checkAdBlockerRemoval",value:function(){m.getBoolean(this.blockingDetectedKey)&&(m.set(this.blockingDetectedKey,!1),this.send_atom_event("ad-blocker-removed"))}},{key:"_checkAdBlocker",value:(j=e(r.mark((function e(){var t,n,i,a,s,o,d,c;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=17;break}if(m.set(this.blockingDetectedKey,!0),null===(a=this._gameData.rmblck)||void 0===a||!a.enabled){e.next=17;break}if(this.adBlockerPage){e.next=17;break}return e.next=9,dR();case 9:return s=e.sent,this.adBlockerPage=new s(this._gameData),o=(navigator.language||navigator.userLanguage).split("-")[1],e.next=14,this.adBlockerPage.checkStorage(o);case 14:d=e.sent,c="default"===d?"EN":o,this.adBlockerPage.add(d,c);case 17:e.next=21;break;case 19:e.prev=19,e.t0=e.catch(0);case 21:case"end":return e.stop()}}),e,this,[[0,19]])}))),function(){return j.apply(this,arguments)})},{key:"_extendDefaultOptions",value:function(e,t){var n=U(e);this.options=t?h(n,t):n,this.options.gameId=this.options.gameId.trim()}},{key:"_setConsoleBanner",value:function(){if(!this._bridge.noConsoleBanner){var e=Is.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(e){var n=this;if(this._shouldSendTunnlEvent(e)){void 0!==this._topDomain&&"undefined"!==this._topDomain||(this._topDomain=void 0);var r={page_url:this._topDomain||this._parentDomain,game_id:this.options.gameId,eventtype:e,ts:Date.now()};fetch("https://hlana.gamedistribution.com/event?".concat(N.stringify(r))).catch(function(i){t(this,n),this._sendHLAnalyicsLog({query:_R(_R({},r),{},{error:null==i?void 0:i.message}),eventType:-e})}.bind(this)),this._sendHLAnalyicsLog({query:r,eventType:e}),this.adInstance._send_atom_event("hl.config",r),this._send_gametag_data("sdk_gameplay")}}},{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("zxcv 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,p("White label publisher","".concat(this._whitelabelPartner),"success"))}},{key:"_checkConsole",value:function(){try{if(!m.available)return;"developer.gamedistribution.com"===this._parentDomain||"developer.gamedistribution.com"===this._topDomain?(m.set("gd_debug_ex",!0),m.set("gd_disable_midroll_timer",!0),m.set("gd_tag",!0)):"localhost:3000"===this._parentDomain&&(m.set("gd_debug_ex",!0),m.set("gd_disable_midroll_timer",!0)),m.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:Is.version,tracking:this._userDeclinedTracking,whitelabel:this._whitelabelPartner,platform:u(),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];f(n[0],"GamedockSDK",{alternates:n}).then(function(){var n;t(this,e),kR=this._initGamedockTracker(window.GamedockSDK),this._sendGamedockEvent("pageview"),null!==(n=this._gameData.diagnostic)&&void 0!==n&&null!==(n=n.gameDock)&&void 0!==n&&n.adViewEvent&&kR.tracking.enableHeartBeatForPage({pageId:this.options.gameId,pageType:"game"},this._gameData.diagnostic.gameDock.heartbeatConfig),uS.track(kR,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;null===(t=kR)||void 0===t||null===(t=t.tracking)||void 0===t||t.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"),f(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,Ew();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)),f(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:(F=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 F.apply(this,arguments)})},{key:"_terminateFlow",value:(M=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 M.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 Iy,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};pR({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 C(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){}}qD()}.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;t(this,e),this.msgrt.send("ad.impression"),jD(),null!==(r=this._gameData.diagnostic)&&void 0!==r&&null!==(r=r.gameDock)&&void 0!==r&&r.adViewEvent&&uS.track(kR,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=dw().config;return"https://".concat(t.gameAPI,"/game/v4/get/").concat(this.options.gameId.replace(/-/g,""),"/?domain=").concat(e,"&v=").concat(Is.version,"&localTime=").concat((new Date).getHours())}},{key:"_checkBlocking",value:(L=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=void 0===this._gameData.dmain||this._gameData.dmain,console.log("zxcv exclude, isAllowedDomain",i,t),t=t||i,(n.bloc_gard&&!0===n.bloc_gard.enabled||!t)&&this._redirectToBlocking();case 8:case"end":return e.stop()}}),e,this)}))),function(){return L.apply(this,arguments)})},{key:"_blockDirectTokenURLEmbedding",value:function(){var e,t=this._checkTokenGameUrl(),n=new Iy,r="html5.gamedistribution.com"!==C(document.referrer).host,i=t&&!oR.SDKExistsOnUpperFrame&&n.get("depth.value")>0&&r;if(i&&(null===(e=this._gameData)||void 0===e||null===(e=e.directTokenUse)||void 0===e?void 0:e.enabled)){var a,s=null===(a=this._gameData)||void 0===a||null===(a=a.directTokenUse)||void 0===a?void 0:a.behavior;"to-loader"===s?this._redirectToLoaderFrame():"to-blocked-page"===s&&this._redirectToBlocking(!0)}return{blocked:i}}},{key:"_redirectToBlocking",value:function(t){var n=this;this.msgrt.send("blocked");var i=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(N.stringify({domain:n._parentDomain,id:i.gameId,img:n._get_game_thumbnail_url(),title:i.title,utm_source:n._parentDomain,utm_medium:(null==i?void 0:i.slug)||(null==i?void 0:i.title)||(null==i?void 0:i.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=C(location.href,!0),a=_R(_R({},i.query),{},{rd:"1"}),s=N.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;YD().disableMidrolltimer?e.midroll=0:m.available&&m.getBoolean("gd_debug_ex")&&(m.getBoolean("gd_disable_midroll_timer")?e.midroll=0:e.midroll=this._getDefaultGameData().midroll)}},{key:"_checkSplashAndPromoScreens",value:function(){var e,t,n;!1===(null===(e=this._gameData.loader)||void 0===e?void 0:e.mobile)&&this._getisMobile()&&(this._gameData.loader.enabled=!1);var r,i=this._gameData,a=i.gdpr&&!0===i.gdpr.consent,s=i.loader,o=null===(t=i.promo)||void 0===t?void 0:t[null===(n=i.promo)||void 0===n||null===(n=n.template)||void 0===n?void 0:n.preroll];(i.preroll||(this.adRequestTimer=Date.now()),this.options.loader.enabled)?null!=o&&o.enabled?this._createPromoBeforeSplash(i,a):s.enabled&&!0!==(null===(r=s.splash)||void 0===r?void 0:r.skip)?this._createSplash(i,a):this.onResumeGame("Skipped splash.","success"):s.enabled||this._bridge.isTokenGameURL&&this._bridge.isExtHostedGameURL||(this.options.advertisementSettings.autoplay||a?null!=o&&o.enabled?this._createPromoBeforeSplash(i,a):!1!==s.enabled&&this._createSplash(i,a):null!=o&&o.enabled&&this._createPromo(i,a))}},{key:"_initializeVideoAd",value:(B=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=h(this.options.advertisementSettings,t.sdk)),this.macros=new E({game:t,bridge:this._bridge}),this.adInstance=new tS(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=Is,this.adInstance._send_atom_event("gd.location"),e.next=17,this.adInstance.start();case 17:case"end":return e.stop()}}),e,this)}))),function(){return B.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){p("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){p("DEVELOPER_ERROR",e.message,"warning")}}},{key:"_onEvent",value:function(e){p(e.name,e.message,e.status);try{this.options.onEvent({name:e.name,message:e.message,status:e.status,skipForward:e.skipForward,adPosition:e.adPosition})}catch(e){p("DEVELOPER_ERROR",e.message,"warning")}}},{key:"_getGameData",value:(P=e(r.mark((function e(){var t;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,bw();case 2:return t=e.sent,this.msgrt.setGameData(t),x(t.diagnostic),e.abrupt("return",t);case 6:case"end":return e.stop()}}),e,this)}))),function(){return P.apply(this,arguments)})},{key:"_createSplash",value:(O=e(r.mark((function n(i,a){var s,o,d,c,u=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(_R(_R({},this.options),{},{isConsentDomain:a,version:Is.version}),i,this._parentDomain),n.next=6,Dw();case 6:d=n.sent,c=d.enabled,o.on("playClick",function(){var n,s,d=this;if(t(this,u),((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,d),console.log("gd-adflow locus-first-user-action error",e)}.bind(this)),a){var l=new Date;l.setDate(l.getDate()+90),document.cookie="ogdpr_tracking=1; expires=".concat(l.toUTCString(),"; path=/")}if(this._hideCMPButton(),WS("play"),c)window.gdsdk.showAd(A.Interstitial,{position:"preroll"}).catch(function(e){t(this,d),o.hide()}.bind(this));else{var h={position:"preroll"};(function(){t(this,d),Us.firstAdapterModeAdsense&&(console.log("promo-test, set first adapter to adssense 1"),h.adapter="adsense")}).bind(this),this.showAd(A.Interstitial,h).catch(function(e){t(this,d)}.bind(this))}null!==(s=this._gameData)&&void 0!==s&&null!==(s=s.evnts)&&void 0!==s&&s.enabled&&(kS({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,u),o.hide()}.bind(this)),this.eventBus.subscribe("SDK_GAME_START",function(){t(this,u),o.hide()}.bind(this));case 12:case"end":return n.stop()}}),n,this)}))),function(e,t){return O.apply(this,arguments)})},{key:"_createPromoBeforeSplash",value:(T=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.prev=0,e.next=3,this._createPrerollPromoTemplate(n);case 3:s=e.sent,(o=new s(_R(_R({},this.options),{},{isConsentDomain:i,version:Is.version,template:null===(a=n.promo)||void 0===a||null===(a=a.template)||void 0===a?void 0:a.preroll}),n)).on("done",function(){t(this,d),o.hide(),this._createSplash(n,i)}.bind(this)),e.next=12;break;case 8:e.prev=8,e.t0=e.catch(0),console.log(e.t0),this._createSplash(n,i);case 12:case"end":return e.stop()}}),e,this,[[0,8]])}))),function(e,t){return T.apply(this,arguments)})},{key:"_createPromo",value:(y=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.prev=0,e.next=3,this._createPrerollPromoTemplate(n);case 3:s=e.sent,(o=new s(_R(_R({},this.options),{},{isConsentDomain:i,version:Is.version,template:null===(a=n.promo)||void 0===a||null===(a=a.template)||void 0===a?void 0:a.preroll}),n)).on("done",function(){t(this,d),o.hide(),this.onResumeGame("Resumed after the promo","warning")}.bind(this)),this.onPauseGame("Pause the game for the promo","success"),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(0),this.onResumeGame("Resumed after the promo","warning");case 12:case"end":return e.stop()}}),e,this,[[0,9]])}))),function(e,t){return y.apply(this,arguments)})},{key:"showBanner",value:function(){var e=this;this.showAd(A.Interstitial).catch(function(){t(this,e)}.bind(this))}},{key:"showAd",value:(b=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,c,u;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,WS("play"),!a._autoResumeIfAdsAreDisabled(n||"interstitial")){e.next=6;break}return e.abrupt("return",t());case 6:return d={adType:n||"interstitial",params:i,adTimestamp:a.adRequestTimer},e.next=10,a.sdkReady;case 10:return c=e.sent,e.next=13,a.videoAdReady;case 13:if(null!==(o=a._gameData.lp)&&void 0!==o&&o.load||a._sendLoadedEvent(1),a._sendGamedockGamePlay(),a._rejectAdIfGameBlocked({gameData:c,adRequest:d}),a._rejectAdIfAdDisabled({gameData:c,adRequest:d}),a._rejectAdIfUnsupportedType({adRequest:d}),"rewarded"===n&&a._setGameRewardedFlag(),null!=i&&i.isGift||a._rejectAdIfAdRateHits({gameData:c,adRequest:d}),i&&i.isGift&&i.isMidrollPlus||!a.adBlockerPage||(a._setAdRequestTimer(),a.adBlockerPage.show()),a.adInstance.attachAfgPosition(d),!a.adFlowRunning){e.next=24;break}return e.abrupt("return",t());case 24:return a.adFlowRunning=!0,u=new $S(a),a._adFlow=u,e.next=29,u.runAdFlow(d);case 29:a.adFlowRunning=!1,a._adFlow=null,t(),a._post_message({topic:"adrequest.instream"}),e.next=41;break;case 35:e.prev=35,e.t0=e.catch(0),a.adFlowRunning=!1,a._adFlow=null,a.onResumeGame(e.t0.message,"warning"),s(e.t0.message);case 41:case"end":return e.stop()}}),e,null,[[0,35]])})));return function(e,n){return t.apply(this,arguments)}}()));case 2:case"end":return t.stop()}}),t)}))),function(e){return b.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 this._gameData.diagnostic,this._gameData.disableAds,a&&(this._runAutoResume(),n=!0),n}},{key:"_runAutoResume",value:function(){var e="CONTENT_PAUSE_REQUESTED",t="CONTENT_RESUME_REQUESTED";this.eventBus.broadcast(e,{name:e,message:"Auto pause when ads are disabled"}),this.eventBus.broadcast(t,{name:t,message:"Auto resume when ads are disabled"}),this.onResumeGame("Advertisement(s) are cancelled. Start / resume the game.","success")}},{key:"_giveGift",value:function(e){var t,n,r,i,a,s;switch(e){case"preroll":null!==(t=this._gameData)&&void 0!==t&&null!==(t=t.gft)&&void 0!==t&&t[e].enabled&&(null===(n=this._gameData)||void 0===n||null===(n=n.gft)||void 0===n||null===(n=n[e].durations[this._giftCount[e]])||void 0===n?void 0:n.after)===this.adInstance.adPrerollCount&&this.decideToGiveAGift(e);break;case"midroll":null!==(r=this._gameData)&&void 0!==r&&null!==(r=r.gft)&&void 0!==r&&r[e].enabled&&(null===(i=this._gameData)||void 0===i||null===(i=i.gft)||void 0===i||null===(i=i[e].durations[this._giftCount[e]])||void 0===i?void 0:i.after)===this.adInstance.adMidrollCount&&this.decideToGiveAGift(e);break;case"rewarded":null!==(a=this._gameData)&&void 0!==a&&null!==(a=a.gft)&&void 0!==a&&a[e].enabled&&(null===(s=this._gameData)||void 0===s||null===(s=s.gft)||void 0===s||null===(s=s[e].durations[this._giftCount[e]])||void 0===s?void 0:s.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=e.adRequest;if(t.disableAds[n.adType]||this._whitelabelPartner)throw new Error("Advertisements are disabled.")}},{key:"_rejectAdIfUnsupportedType",value:function(e){var t=e.adRequest;if(t.adType){if(t.adType!==A.Interstitial&&t.adType!==A.Rewarded)throw new Error("Unsupported an advertisement type: ",t.adType)}else t.adType=A.Interstitial}},{key:"_rejectAdIfRewardedDisabled",value:function(e){var t=e.gameData;if(e.adRequest.adType===A.Rewarded&&!t.rewardedAds)throw new Error("Rewarded ads are disabled.")}},{key:"_rejectAdIfAdRateHits",value:function(e){var t,n,r,i=e.gameData,a=e.adRequest,s=null;a.adType===A.Interstitial&&null!==(t=i.diagnostic)&&void 0!==t&&null!==(t=t.useMidrollIndex)&&void 0!==t&&t.enabled&&this.adInstance.noPreroll?this.adInstance.adMidrollCount>(null===(n=i.diagnostic)||void 0===n||null===(n=n.useMidrollIndex)||void 0===n?void 0:n.indexes.length)-1||(s=6e4*(null===(r=i.diagnostic)||void 0===r||null===(r=r.useMidrollIndex)||void 0===r?void 0:r.indexes[this.adInstance.adMidrollCount])):s=i.midroll;if(a.adType===A.Interstitial&&void 0!==this.adRequestTimer&&Date.now()-this.adRequestTimer<s)throw new Error("The advertisement was requested too soon.")}},{key:"preloadAd",value:(v=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=A.Rewarded,e.next=16;break;case 14:if(n===A.Interstitial||n===A.Rewarded){e.next=16;break}throw new Error("Unsupported an advertisement type:"+n);case 16:return e.next=18,i.adInstance.preloadAd(n);case 18:o=e.sent,t(o),e.next=25;break;case 22:e.prev=22,e.t0=e.catch(0),a(e.t0);case 25:case"end":return e.stop()}}),e,null,[[0,22]])})));return function(e,n){return t.apply(this,arguments)}}()));case 1:case"end":return t.stop()}}),t)}))),function(e){return v.apply(this,arguments)})},{key:"cancelAd",value:(g=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 g.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;try{this._allowExternals({enabled:!1}),this.options.resumeGame()}catch(e){console.log("gd-adflow error onResumeGame",e),p("DEVELOPER_ERROR",e.message,"warning")}var r="SDK_GAME_START";this.eventBus.broadcast(r,{name:r,message:e,status:t,analytics:{category:"SDK",action:r,label:this.options.gameId+""}}),this.adInstance&&this.adInstance._hideAddResume(),this.adInstance&&this.adInstance._hideAdSpinner(),null===(n=this._gameData.evnts)||void 0===n||!n.enabled||this._isMasterGameURL()&&!this._isExtHostedGameURL()||(kS({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){p("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()||(kS({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(),m.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 C(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()),u=decodeURIComponent((e||n)&&r.topDomain?r.topDomain:n&&0===o()?d:c()),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,A=(e||n)&&r.loaderEnabled,g=(e||n)&&r.loaderEnabled,v=(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:v,parentURL:i,parentDomain:d,topDomain:u&&u.length?u:d,noGAPageView:f,noLotamePageView:m,noGamedockSDK:A,noMinijuegosSDK:g,version:r.version,pauseGameOnStartup:b,depth:o(),domainMatched:d===u,exports:{formatTokenURLSearch:this._formatTokenURLSearch.bind(this),extendUrlQuery:this._extendUrlQuery.bind(this),base64Encode:this._base64_encode.bind(this)}}}},{key:"_isHostHTML5Domain",value:function(){var e=new C(location.href);return"html5.gamedistribution.com"===(null==e?void 0:e.host.toLowerCase())}},{key:"_isExternalHoster",value:function(){var e;return null===(e=this._gameData)||void 0===e||null===(e=e.extHosting)||void 0===e?void 0:e.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=C(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=C(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 C(location.href,!0);if(!n.query.gd_zone_config)return;e=n.query.gd_zone_config}else if(t.test(document.referrer)){var r=new C(document.referrer,!0);if(!r.query.gd_zone_config)return;e=r.query.gd_zone_config}else{var i=new C(location.href,!0);if(!i.query.gd_zone_config)return;e=i.query.gd_zone_config}return JSON.parse(I.decode(decodeURIComponent(e)))}catch(e){}}},{key:"_getSplashTemplate",value:function(e){var t=e.splash;return new rS(t).splash()}},{key:"_createPrerollPromoTemplate",value:(i=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 a=null===(n=t.promo)||void 0===n?void 0:n[null===(i=t.promo)||void 0===i||null===(i=i.template)||void 0===i?void 0:i.preroll],s=new nS(a),e.abrupt("return",s.promo());case 3:case"end":return e.stop()}}),e)}))),function(e){return i.apply(this,arguments)})},{key:"_formatTokenURLSearch",value:function(e){var t="";try{t=encodeURIComponent(I.encode(JSON.stringify(e)))}catch(e){}try{var n=new C(location.href,!0);return n.query=n.query||{},n.query.gd_zone_config=t,"?".concat(N.stringify(n.query))}catch(e){return"?gd_zone_config=".concat(t)}}},{key:"_extendUrlQuery",value:function(e,t){var n=new C(e,!0);return n.query=_R(_R({},n.query),t),n.toString()}},{key:"_base64_encode",value:function(e){return I.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)kR.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:"decideToGiveAGift",value:function(n){var i=this;try{var a,s=null===(a=this._gameData)||void 0===a?void 0:a.gft[n],o=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..."):(i.showAd(A.Interstitial,{position:n,isGift:!0}).catch(function(e){t(this,a)}.bind(this)),clearInterval(o),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 yR}},{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(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(A.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(A.Interstitial,{position:"midroll",giftType:i,isMidrollPlus:!0}).catch(function(n){t(this,e)}.bind(this))}.bind(this),this._gameData.midroll)}}}]),n}();function xR(){return(xR=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,Ew();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"),f(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 DR=new M,SR=function(e){var n=this;!function(){xR.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&&(DR.off("sdk-event",s),n())}.bind(this);DR.on("sdk-event",s),m("showAd",{adType:e})}.bind(this))}.bind(this),a=function(){return t(this,n),r||(r=new ER(e)),r}.bind(this),s=function(e){return t(this,n),i(e)}.bind(this),o=function(e){return t(this,n),"gdsdk://preloaded"}.bind(this),d=function(e){return t(this,n),a().showDisplayAd(e)}.bind(this),c=function(){return t(this,n),m("cancelAd")}.bind(this),u=function(){return t(this,n),m("openConsole")}.bind(this),l=function(){return t(this,n),m("showBanner")}.bind(this),h=function(){return t(this,n),m("session")}.bind(this),p=function(e){return t(this,n),m("sendGenericEvent",{options:e})}.bind(this),f=function(){t(this,n),console.log("_sendSDKReady")}.bind(this),m=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),A=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&&v(r)}),!1)}.bind(this),g=function(){t(this,n),A(),m("init")}.bind(this),v=function(r){t(this,n);try{DR.emit("sdk-event",r),e.onEvent&&e.onEvent(r)}catch(e){console.log("DEVELOPER ERROR on forwarder-sdk")}}.bind(this);return{showBanner:l,showAd:s,preloadAd:o,showDisplayAd:d,cancelAd:c,openConsole:u,getSession:h,onEvent:v,init:g,_sendSDKReady:f,sendGenericEvent:p}},RR=function(e){var t=SR(e);return t.init(),t},TR=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"!==C(window.location.href).host;return n()&&!(r()||i)?"loader-frame":"game-frame"}.bind(this);return{isMasterGameURL:n,isTokenGameURL:r,isExtHostedGameURL:i,whichFrame:a}},CR="gd-sdk-frame-handshake-request",IR="gd-sdk-frame-handshake-response",OR=function(e){var n=this;return new Promise(function(e,r){var i=this;t(this,n);var a={type:CR},s=!1;window.addEventListener("message",(function(t){var n=t.data,r=t.origin,i=t.source,a=n.type;if(a===CR){var o={type:IR};i.postMessage(o,r)}else a===IR&&(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))},PR=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,kw();case 2:return t=e.sent,e.next=6,OR();case 6:if(n=e.sent,oR.SDKExistsOnUpperFrame=!!n,t){e.next=10;break}return e.abrupt("return",!1);case 10:return i=TR(),a=i.isMasterGameURL,i.isTokenGameURL,s=a(),e.next=14,xw();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)}}(),BR=nt,LR=ie,UR=ue,MR=Wl,FR=ns,jR=Ji,NR=UR(Vi.f),GR=UR([].push),qR=BR&&LR((function(){var e=Object.create(null);return e[2]=2,!NR(e,2)})),HR=function(e){return function(t){for(var n,r=jR(t),i=FR(r),a=qR&&null===MR(r),s=i.length,o=0,d=[];s>o;)n=i[o++],BR&&!(a?n in r:NR(r,n))||GR(d,e?[n,r[n]]:r[n]);return d}},VR={entries:HR(!0),values:HR(!1)}.values;$a({target:"Object",stat:!0},{values:function(e){return VR(e)}});var QR,zR={},WR=function(e){try{if(e.skipForward)return;if(zR.source){var t={type:"gd-sdk-on-event",event:e};zR.source.postMessage(t,zR.origin)}}catch(e){console.log("gd-sdk forwardEvent err",e)}},KR=function(){WR({name:"SDK_READY",status:"success",message:"Everything is ready."}),WR({name:"SDK_GAME_START",status:"success",message:"Advertisement(s) are done. Start / resume the game."}),WR({name:"CONTENT_RESUME_REQUESTED",status:"success",message:"Fired when content should be resumed. This usually happens when an ad finishes or collapses."})},YR=function(n){window.addEventListener("message",(function(i){var a=i.data,s=i.origin,o=i.source,d=a.type,c=a.method,u=a.options;if("gd-sdk-self"!==d){if("gd-sdk"===d){if(!zR.source&&"init"===c)return function(e){var t=e.source,n=e.origin;zR={source:t,origin:n}}({source:o,origin:s}),void KR();var l=n[c];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"===c&&Us.firstAdapterModeAdsense&&"rewarded"!==u.adType&&(console.log("promo-test, set first adapter to adssense 3"),u.params=u.params?u.params:{},u.params.adapter="adsense")}.bind(this),!(i=l.apply(n,Object.values(u)))||!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:c,options:u};window.postMessage(h,location.origin)}}),!1)},JR=function(e){!function(e){var t=e.onEvent;e.onEvent=function(e){WR(e),t.apply(this,arguments)}}(e);var t=new ER(e);return YR(t),t},ZR=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:[]},pv(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,mv(this.moduleName);case 3:this.module=e.sent,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}(),XR=function(){var t=e(r.mark((function t(){var n,i,a,s,o,d,c,u,l,h,p,f,m,A,g,v;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=function(){var e,t=(e=new Iy).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 Iy).get("partner.url.value");return new C(e,!0)},c=function(){var e="ae-soft-323";try{var t=d(),n=t.pathname,r=n.split("/"),i=r[r.length-1];Bs("aeria-ylogin:loc",t,n,i),e=i}catch(e){Ls("Error on getting aeria game id",e)}return e}(),u={action:"score",data:{gameId:c,score:100},env:a?"staging":"production",system:"Softgames"},l=function(){var e=window.parent||window,t=u;e.postMessage(t,"*")},h=new _,t.next=13,bw();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())})),A=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 ZR).runYMenu({gameId:c});case 2:case"end":return e.stop()}}),e)})));return function(){return t.apply(this,arguments)}}(),g=TR(),v=g.whichFrame,"game-frame"===v()&&(f||A());case 21:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),$R=function(e){try{var t=rw(e);e.gameId||t.send("nogameid",{message:"".concat(mb.parentURL)})}catch(e){}},eT=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,XR();case 3:e.next=8;break;case 5:e.prev=5,e.t0=e.catch(0),console.log("zxcv error on creating some bridge module");case 8:case"end":return e.stop()}}),e,null,[[0,5]])})));return function(){return t.apply(this,arguments)}}(),tT={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,$R(t),vw(t),e.next=5,PR();case 5:return n=e.sent,e.next=8,eT();case 8:return window.isForwarderFrame=n,i=n?RR(t):JR(t),Sw(),e.abrupt("return",i);case 14:return e.prev=14,e.t0=e.catch(0),console.log("gd:adp: sdk adaptor create failed, fallback to default adapter",e.t0),e.abrupt("return",JR(t));case 18:case"end":return e.stop()}}),e,null,[[0,14]])})));return function(e){return t.apply(this,arguments)}}()};function nT(){return(nT=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,Cw();case 2:if(!e.sent){e.next=7;break}e.t0=window.gdsdk,e.next=10;break;case 7:return e.next=9,sT(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 rT,iT,aT=!1;function sT(e){var n=this;return new Promise(function(r,i){var a=this;if(t(this,n),QR)return r(QR);if(aT)var s=setInterval(function(){t(this,a),QR&&(aT=!1,clearInterval(s),r(QR))}.bind(this),100);else aT=!0,tT.create(e).then(function(e){t(this,a),QR=e,e._sendSDKReady(),aT=!1,r(QR)}.bind(this))}.bind(this))}function oT(e){return sT(e),{invoke:function(t){return function(e,t){return nT.apply(this,arguments)}(e,t)}}}function dT(n,i){var a=this;return new Promise(function(s,o){var d,c=this;t(this,a);var u=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);cT({text:"sdk-wrapper-script-load"}),f(u[0],"gd-sdk-wrp",{alternates:u}).catch(function(e){t(this,c),cT({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,cT({text:"sdk-wrapper load success"}),t=window.GDSDKWRP.GDSDKWRP,a=new t,cT({text:"sdk-wrapper before gdSdkWrp.init"}),e.next=7,a.init(n,i);case 7:iT=e.sent,cT({text:"sdk-wrapper after gdSdkWrp.init"}),s(iT),e.next=16;break;case 12:e.prev=12,e.t0=e.catch(0),cT({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 cT(e){try{var t={tp:"gd.wrp",args:e};fetch("https://tag.atom.gamedistribution.com/v1/dmp?ar=".concat(encodeURIComponent(I.encode(JSON.stringify(t))))),console.log(V(Object.values(e)))}catch(e){}}function uT(e){if(e){var t=e.name,n=e.message,r=e.status;try{cT({text:"samsung-wrp send-game-event",evt:e,hasOptions:!!rT}),rT&&rT.onEvent({name:t,message:n,status:r})}catch(t){cT({text:"samsung-wrp DEVELOPER-ERROR",evt:e,err:t})}}}function lT(e){return hT.apply(this,arguments)}function hT(){return(hT=e(r.mark((function e(t){var n,i,a,s,o,d,c,u,l;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return rT=t,vw(t),e.next=4,bw();case 4:if(s=e.sent,!iT){e.next=7;break}return e.abrupt("return",iT);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,c=null==s?void 0:s.gameId,u=null==s?void 0:s.title,AT("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,cT({text:"sdk-wrapper-load-instant-play"}),e.next=18,fT();case 18:return cT({text:"sdk-wrapper-load-instant-play-loaded"}),e.next=21,dT(l,{onEvent:uT,game:{gameId:c,title:u,version:d}});case 21:return iT=e.sent,e.abrupt("return",iT);case 23:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function pT(){return pT=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,AT("beforeGetDeveloperSettings"),i=n(),AT("afterGetDeveloperSettings"),e.prev=4,e.next=7,lT(i);case 7:a=e.sent,AT("after get SDK wrapper: ".concat(!!a)),a&&(AT("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),AT("Error on SDK wrapper init: ".concat(e.t0.message));case 16:case"end":return e.stop()}}),e,null,[[4,12]])}))),pT.apply(this,arguments)}function fT(){return mT.apply(this,arguments)}function mT(){return(mT=e(r.mark((function e(){var n,i=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n="https://gtg.samsungapps.com/gsinstant-sdk/gsinstant.0.43.js",e.next=3,f(n,"samsung_instant_play_sdk",{alternates:[n],error_prefix:"Blocked:",exists:function(){return t(this,i),window.GSInstant}.bind(this)});case 3:case"end":return e.stop()}}),e,this)})))).apply(this,arguments)}function AT(e){window.sdkLog.push(e)}function gT(){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}window.sdkLog=[],"img.samsungapps.com"===function(){var e,t,n=C(window.location.href,!0),r=n.host,i=n.query,a=r,s=null==i?void 0:i.gd_sdk_referrer_url;return s&&(s=s.startsWith("https://")||s.startsWith("http://")?s:"https://".concat(s),null!==(t=e=C(s,!0))&&void 0!==t&&t.host&&(a=e.host)),a}()?AT("skipped normal SDK init!"):(!function(){FD();var n=oT(gT());function i(){var i=this;this.AdType=A,this.preloadAd=function(e){var r=this;return n.invoke(function(n){return t(this,r),n.preloadAd(e)}.bind(this))},this.showAd=function(){var i=e(r.mark((function e(i,a){var s=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",n.invoke(function(e){var n=this;if(t(this,s),i===A.Display)return e.showDisplayAd(a);var r={};return function(){t(this,n),Us.firstAdapterModeAdsense&&(console.log("promo-test, set first adapter to adssense 2"),r.adapter="adsense")}.bind(this),e.showAd(i,r)}.bind(this)));case 1: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),gv.showLeaderboard()}.bind(this),addScore:function(e){t(this,i),gv.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}(),AT("afterSDKInit")),function(e){pT.apply(this,arguments)}({_get_developer_sets:gT});
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 c,getMobilePlatform as u,MessageRouter as l,extendDefaults as h,dankLog as p,getScript as f,Ls as m,AdType as A,Layers as g,getKeyByValue as v,getQueryString as b,EventBus as _,getIMASampleTags as y,SDKEvents as w,IMAEvents as k,Macros as E,setDankLog as x,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 C from"url-parse";import{Base64 as I}from"js-base64";import O from"validator";import P from"is-valid-domain";import B from"get-value";import L from"set-value";import U from"lodash.clonedeep";import{EventEmitter as M}from"events";import F from"can-autoplay";import{isPlainObject as j}from"is-plain-object";import N from"querystringify";import G from"lodash.merge";import{v4 as q}from"uuid";import H from"@flownet/lib-connect-to-tcf";import V from"@babel/runtime/helpers/toConsumableArray";var Q="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},z=function(e){return e&&e.Math===Math&&e},W=z("object"==typeof globalThis&&globalThis)||z("object"==typeof window&&window)||z("object"==typeof self&&self)||z("object"==typeof Q&&Q)||z("object"==typeof Q&&Q)||function(){return this}()||Function("return this")(),K={exports:{}},Y=W,J=Object.defineProperty,Z=function(e,t){try{J(Y,e,{value:t,configurable:!0,writable:!0})}catch(n){Y[e]=t}return t},X=Z,$="__core-js_shared__",ee=W[$]||X($,{}),te=ee;(K.exports=function(e,t){return te[e]||(te[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.34.0",mode:"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.34.0/LICENSE",source:"https://github.com/zloirock/core-js"});var ne,re,ie=function(e){try{return!!e()}catch(e){return!0}},ae=!ie((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),se=ae,oe=Function.prototype,de=oe.call,ce=se&&oe.bind.bind(de,de),ue=se?ce:function(e){return function(){return de.apply(e,arguments)}},le=function(e){return null==e},he=le,pe=TypeError,fe=function(e){if(he(e))throw new pe("Can't call method on "+e);return e},me=fe,Ae=Object,ge=function(e){return Ae(me(e))},ve=ge,be=ue({}.hasOwnProperty),_e=Object.hasOwn||function(e,t){return be(ve(e),t)},ye=ue,we=0,ke=Math.random(),Ee=ye(1..toString),xe=function(e){return"Symbol("+(void 0===e?"":e)+")_"+Ee(++we+ke,36)},De="undefined"!=typeof navigator&&String(navigator.userAgent)||"",Se=W,Re=De,Te=Se.process,Ce=Se.Deno,Ie=Te&&Te.versions||Ce&&Ce.version,Oe=Ie&&Ie.v8;Oe&&(re=(ne=Oe.split("."))[0]>0&&ne[0]<4?1:+(ne[0]+ne[1])),!re&&Re&&(!(ne=Re.match(/Edge\/(\d+)/))||ne[1]>=74)&&(ne=Re.match(/Chrome\/(\d+)/))&&(re=+ne[1]);var Pe=re,Be=Pe,Le=ie,Ue=W.String,Me=!!Object.getOwnPropertySymbols&&!Le((function(){var e=Symbol("symbol detection");return!Ue(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Be&&Be<41})),Fe=Me&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,je=W,Ne=K.exports,Ge=_e,qe=xe,He=Me,Ve=Fe,Qe=je.Symbol,ze=Ne("wks"),We=Ve?Qe.for||Qe:Qe&&Qe.withoutSetter||qe,Ke=function(e){return Ge(ze,e)||(ze[e]=He&&Ge(Qe,e)?Qe[e]:We("Symbol."+e)),ze[e]},Ye={};Ye[Ke("toStringTag")]="z";var Je="[object z]"===String(Ye),Ze="object"==typeof document&&document.all,Xe={all:Ze,IS_HTMLDDA:void 0===Ze&&void 0!==Ze},$e=Xe.all,et=Xe.IS_HTMLDDA?function(e){return"function"==typeof e||e===$e}:function(e){return"function"==typeof e},tt={},nt=!ie((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})),rt=et,it=Xe.all,at=Xe.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:rt(e)||e===it}:function(e){return"object"==typeof e?null!==e:rt(e)},st=at,ot=W.document,dt=st(ot)&&st(ot.createElement),ct=function(e){return dt?ot.createElement(e):{}},ut=ct,lt=!nt&&!ie((function(){return 7!==Object.defineProperty(ut("div"),"a",{get:function(){return 7}}).a})),ht=nt&&ie((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),pt=at,ft=String,mt=TypeError,At=function(e){if(pt(e))return e;throw new mt(ft(e)+" is not an object")},gt=ae,vt=Function.prototype.call,bt=gt?vt.bind(vt):function(){return vt.apply(vt,arguments)},_t=W,yt=et,wt=function(e,t){return arguments.length<2?(n=_t[e],yt(n)?n:void 0):_t[e]&&_t[e][t];var n},kt=ue({}.isPrototypeOf),Et=wt,xt=et,Dt=kt,St=Object,Rt=Fe?function(e){return"symbol"==typeof e}:function(e){var t=Et("Symbol");return xt(t)&&Dt(t.prototype,St(e))},Tt=String,Ct=function(e){try{return Tt(e)}catch(e){return"Object"}},It=et,Ot=Ct,Pt=TypeError,Bt=function(e){if(It(e))return e;throw new Pt(Ot(e)+" is not a function")},Lt=Bt,Ut=le,Mt=function(e,t){var n=e[t];return Ut(n)?void 0:Lt(n)},Ft=bt,jt=et,Nt=at,Gt=TypeError,qt=bt,Ht=at,Vt=Rt,Qt=Mt,zt=function(e,t){var n,r;if("string"===t&&jt(n=e.toString)&&!Nt(r=Ft(n,e)))return r;if(jt(n=e.valueOf)&&!Nt(r=Ft(n,e)))return r;if("string"!==t&&jt(n=e.toString)&&!Nt(r=Ft(n,e)))return r;throw new Gt("Can't convert object to primitive value")},Wt=TypeError,Kt=Ke("toPrimitive"),Yt=function(e,t){if(!Ht(e)||Vt(e))return e;var n,r=Qt(e,Kt);if(r){if(void 0===t&&(t="default"),n=qt(r,e,t),!Ht(n)||Vt(n))return n;throw new Wt("Can't convert object to primitive value")}return void 0===t&&(t="number"),zt(e,t)},Jt=Rt,Zt=function(e){var t=Yt(e,"string");return Jt(t)?t:t+""},Xt=nt,$t=lt,en=ht,tn=At,nn=Zt,rn=TypeError,an=Object.defineProperty,sn=Object.getOwnPropertyDescriptor,on="enumerable",dn="configurable",cn="writable";tt.f=Xt?en?function(e,t,n){if(tn(e),t=nn(t),tn(n),"function"==typeof e&&"prototype"===t&&"value"in n&&cn in n&&!n[cn]){var r=sn(e,t);r&&r[cn]&&(e[t]=n.value,n={configurable:dn in n?n[dn]:r[dn],enumerable:on in n?n[on]:r[on],writable:!1})}return an(e,t,n)}:an:function(e,t,n){if(tn(e),t=nn(t),tn(n),$t)try{return an(e,t,n)}catch(e){}if("get"in n||"set"in n)throw new rn("Accessors not supported");return"value"in n&&(e[t]=n.value),e};var un={exports:{}},ln=nt,hn=_e,pn=Function.prototype,fn=ln&&Object.getOwnPropertyDescriptor,mn=hn(pn,"name"),An={EXISTS:mn,PROPER:mn&&"something"===function(){}.name,CONFIGURABLE:mn&&(!ln||ln&&fn(pn,"name").configurable)},gn=et,vn=ee,bn=ue(Function.toString);gn(vn.inspectSource)||(vn.inspectSource=function(e){return bn(e)});var _n,yn,wn,kn=vn.inspectSource,En=et,xn=W.WeakMap,Dn=En(xn)&&/native code/.test(String(xn)),Sn=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},Rn=tt,Tn=Sn,Cn=nt?function(e,t,n){return Rn.f(e,t,Tn(1,n))}:function(e,t,n){return e[t]=n,e},In=K.exports,On=xe,Pn=In("keys"),Bn=function(e){return Pn[e]||(Pn[e]=On(e))},Ln={},Un=Dn,Mn=W,Fn=at,jn=Cn,Nn=_e,Gn=ee,qn=Bn,Hn=Ln,Vn="Object already initialized",Qn=Mn.TypeError,zn=Mn.WeakMap;if(Un||Gn.state){var Wn=Gn.state||(Gn.state=new zn);Wn.get=Wn.get,Wn.has=Wn.has,Wn.set=Wn.set,_n=function(e,t){if(Wn.has(e))throw new Qn(Vn);return t.facade=e,Wn.set(e,t),t},yn=function(e){return Wn.get(e)||{}},wn=function(e){return Wn.has(e)}}else{var Kn=qn("state");Hn[Kn]=!0,_n=function(e,t){if(Nn(e,Kn))throw new Qn(Vn);return t.facade=e,jn(e,Kn,t),t},yn=function(e){return Nn(e,Kn)?e[Kn]:{}},wn=function(e){return Nn(e,Kn)}}var Yn={set:_n,get:yn,has:wn,enforce:function(e){return wn(e)?yn(e):_n(e,{})},getterFor:function(e){return function(t){var n;if(!Fn(t)||(n=yn(t)).type!==e)throw new Qn("Incompatible receiver, "+e+" required");return n}}},Jn=ue,Zn=ie,Xn=et,$n=_e,er=nt,tr=An.CONFIGURABLE,nr=kn,rr=Yn.enforce,ir=Yn.get,ar=String,sr=Object.defineProperty,or=Jn("".slice),dr=Jn("".replace),cr=Jn([].join),ur=er&&!Zn((function(){return 8!==sr((function(){}),"length",{value:8}).length})),lr=String(String).split("String"),hr=un.exports=function(e,t,n){"Symbol("===or(ar(t),0,7)&&(t="["+dr(ar(t),/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!$n(e,"name")||tr&&e.name!==t)&&(er?sr(e,"name",{value:t,configurable:!0}):e.name=t),ur&&n&&$n(n,"arity")&&e.length!==n.arity&&sr(e,"length",{value:n.arity});try{n&&$n(n,"constructor")&&n.constructor?er&&sr(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var r=rr(e);return $n(r,"source")||(r.source=cr(lr,"string"==typeof t?t:"")),e};Function.prototype.toString=hr((function(){return Xn(this)&&ir(this).source||nr(this)}),"toString");var pr=et,fr=tt,mr=un.exports,Ar=Z,gr=function(e,t,n,r){r||(r={});var i=r.enumerable,a=void 0!==r.name?r.name:t;if(pr(n)&&mr(n,a,r),r.global)i?e[t]=n:Ar(t,n);else{try{r.unsafe?e[t]&&(i=!0):delete e[t]}catch(e){}i?e[t]=n:fr.f(e,t,{value:n,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return e},vr=ue,br=vr({}.toString),_r=vr("".slice),yr=function(e){return _r(br(e),8,-1)},wr=Je,kr=et,Er=yr,xr=Ke("toStringTag"),Dr=Object,Sr="Arguments"===Er(function(){return arguments}()),Rr=wr?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=Dr(e),xr))?n:Sr?Er(t):"Object"===(r=Er(t))&&kr(t.callee)?"Arguments":r},Tr=Rr,Cr=Je?{}.toString:function(){return"[object "+Tr(this)+"]"};Je||gr(Object.prototype,"toString",Cr,{unsafe:!0});var Ir={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},Or=ct("span").classList,Pr=Or&&Or.constructor&&Or.constructor.prototype,Br=Pr===Object.prototype?void 0:Pr,Lr=yr,Ur=ue,Mr=function(e){if("Function"===Lr(e))return Ur(e)},Fr=Bt,jr=ae,Nr=Mr(Mr.bind),Gr=function(e,t){return Fr(e),void 0===t?e:jr?Nr(e,t):function(){return e.apply(t,arguments)}},qr=ie,Hr=yr,Vr=Object,Qr=ue("".split),zr=qr((function(){return!Vr("z").propertyIsEnumerable(0)}))?function(e){return"String"===Hr(e)?Qr(e,""):Vr(e)}:Vr,Wr=Math.ceil,Kr=Math.floor,Yr=Math.trunc||function(e){var t=+e;return(t>0?Kr:Wr)(t)},Jr=function(e){var t=+e;return t!=t||0===t?0:Yr(t)},Zr=Jr,Xr=Math.min,$r=function(e){return e>0?Xr(Zr(e),9007199254740991):0},ei=$r,ti=function(e){return ei(e.length)},ni=yr,ri=Array.isArray||function(e){return"Array"===ni(e)},ii=ue,ai=ie,si=et,oi=Rr,di=kn,ci=function(){},ui=[],li=wt("Reflect","construct"),hi=/^\s*(?:class|function)\b/,pi=ii(hi.exec),fi=!hi.test(ci),mi=function(e){if(!si(e))return!1;try{return li(ci,ui,e),!0}catch(e){return!1}},Ai=function(e){if(!si(e))return!1;switch(oi(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return fi||!!pi(hi,di(e))}catch(e){return!0}};Ai.sham=!0;var gi=!li||ai((function(){var e;return mi(mi.call)||!mi(Object)||!mi((function(){e=!0}))||e}))?Ai:mi,vi=ri,bi=gi,_i=at,yi=Ke("species"),wi=Array,ki=function(e){var t;return vi(e)&&(t=e.constructor,(bi(t)&&(t===wi||vi(t.prototype))||_i(t)&&null===(t=t[yi]))&&(t=void 0)),void 0===t?wi:t},Ei=function(e,t){return new(ki(e))(0===t?0:t)},xi=Gr,Di=zr,Si=ge,Ri=ti,Ti=Ei,Ci=ue([].push),Ii=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,c,u,l){for(var h,p,f=Si(d),m=Di(f),A=Ri(m),g=xi(c,u),v=0,b=l||Ti,_=t?b(d,A):n||s?b(d,0):void 0;A>v;v++)if((o||v in m)&&(p=g(h=m[v],v,f),e))if(t)_[v]=p;else if(p)switch(e){case 3:return!0;case 5:return h;case 6:return v;case 2:Ci(_,h)}else switch(e){case 4:return!1;case 7:Ci(_,h)}return a?-1:r||i?i:_}},Oi={forEach:Ii(0),map:Ii(1),filter:Ii(2),some:Ii(3),every:Ii(4),find:Ii(5),findIndex:Ii(6),filterReject:Ii(7)},Pi=ie,Bi=function(e,t){var n=[][e];return!!n&&Pi((function(){n.call(null,t||function(){return 1},1)}))},Li=Oi.forEach,Ui=W,Mi=Ir,Fi=Br,ji=Bi("forEach")?[].forEach:function(e){return Li(this,e,arguments.length>1?arguments[1]:void 0)},Ni=Cn,Gi=function(e){if(e&&e.forEach!==ji)try{Ni(e,"forEach",ji)}catch(t){e.forEach=ji}};for(var qi in Mi)Mi[qi]&&Gi(Ui[qi]&&Ui[qi].prototype);Gi(Fi);var Hi={},Vi={},Qi={}.propertyIsEnumerable,zi=Object.getOwnPropertyDescriptor,Wi=zi&&!Qi.call({1:2},1);Vi.f=Wi?function(e){var t=zi(this,e);return!!t&&t.enumerable}:Qi;var Ki=zr,Yi=fe,Ji=function(e){return Ki(Yi(e))},Zi=nt,Xi=bt,$i=Vi,ea=Sn,ta=Ji,na=Zt,ra=_e,ia=lt,aa=Object.getOwnPropertyDescriptor;Hi.f=Zi?aa:function(e,t){if(e=ta(e),t=na(t),ia)try{return aa(e,t)}catch(e){}if(ra(e,t))return ea(!Xi($i.f,e,t),e[t])};var sa={},oa=Jr,da=Math.max,ca=Math.min,ua=function(e,t){var n=oa(e);return n<0?da(n+t,0):ca(n,t)},la=Ji,ha=ua,pa=ti,fa=function(e){return function(t,n,r){var i,a=la(t),s=pa(a),o=ha(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}},ma={includes:fa(!0),indexOf:fa(!1)},Aa=_e,ga=Ji,va=ma.indexOf,ba=Ln,_a=ue([].push),ya=function(e,t){var n,r=ga(e),i=0,a=[];for(n in r)!Aa(ba,n)&&Aa(r,n)&&_a(a,n);for(;t.length>i;)Aa(r,n=t[i++])&&(~va(a,n)||_a(a,n));return a},wa=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],ka=ya,Ea=wa.concat("length","prototype");sa.f=Object.getOwnPropertyNames||function(e){return ka(e,Ea)};var xa={};xa.f=Object.getOwnPropertySymbols;var Da=wt,Sa=sa,Ra=xa,Ta=At,Ca=ue([].concat),Ia=Da("Reflect","ownKeys")||function(e){var t=Sa.f(Ta(e)),n=Ra.f;return n?Ca(t,n(e)):t},Oa=_e,Pa=Ia,Ba=Hi,La=tt,Ua=function(e,t,n){for(var r=Pa(t),i=La.f,a=Ba.f,s=0;s<r.length;s++){var o=r[s];Oa(e,o)||n&&Oa(n,o)||i(e,o,a(t,o))}},Ma=ie,Fa=et,ja=/#|\.prototype\./,Na=function(e,t){var n=qa[Ga(e)];return n===Va||n!==Ha&&(Fa(t)?Ma(t):!!t)},Ga=Na.normalize=function(e){return String(e).replace(ja,".").toLowerCase()},qa=Na.data={},Ha=Na.NATIVE="N",Va=Na.POLYFILL="P",Qa=Na,za=W,Wa=Hi.f,Ka=Cn,Ya=gr,Ja=Z,Za=Ua,Xa=Qa,$a=function(e,t){var n,r,i,a,s,o=e.target,d=e.global,c=e.stat;if(n=d?za:c?za[o]||Ja(o,{}):(za[o]||{}).prototype)for(r in t){if(a=t[r],i=e.dontCallGetSet?(s=Wa(n,r))&&s.value:n[r],!Xa(d?r:o+(c?".":"#")+r,e.forced)&&void 0!==i){if(typeof a==typeof i)continue;Za(a,i)}(e.sham||i&&i.sham)&&Ka(a,"sham",!0),Ya(n,r,a,e)}},es=ya,ts=wa,ns=Object.keys||function(e){return es(e,ts)},rs=ge,is=ns;$a({target:"Object",stat:!0,forced:ie((function(){is(1)}))},{keys:function(e){return is(rs(e))}});var as=TypeError,ss=Zt,os=tt,ds=Sn,cs=function(e,t,n){var r=ss(t);r in e?os.f(e,r,ds(0,n)):e[r]=n},us=ie,ls=Pe,hs=Ke("species"),ps=function(e){return ls>=51||!us((function(){var t=[];return(t.constructor={})[hs]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},fs=$a,ms=ie,As=ri,gs=at,vs=ge,bs=ti,_s=function(e){if(e>9007199254740991)throw as("Maximum allowed index exceeded");return e},ys=cs,ws=Ei,ks=ps,Es=Pe,xs=Ke("isConcatSpreadable"),Ds=Es>=51||!ms((function(){var e=[];return e[xs]=!1,e.concat()[0]!==e})),Ss=function(e){if(!gs(e))return!1;var t=e[xs];return void 0!==t?!!t:As(e)};fs({target:"Array",proto:!0,arity:1,forced:!Ds||!ks("concat")},{concat:function(e){var t,n,r,i,a,s=vs(this),o=ws(s,0),d=0;for(t=-1,r=arguments.length;t<r;t++)if(Ss(a=-1===t?s:arguments[t]))for(i=bs(a),_s(d+i),n=0;n<i;n++,d++)n in a&&ys(o,d,a[n]);else _s(d+1),ys(o,d++,a);return o.length=d,o}});var Rs=Array.isArray,Ts=Object.prototype.toString,Cs=Rs||function(e){return!!e&&"[object Array]"==Ts.call(e)},Is={name:"@bygd/gd-sdk-pes",version:"1.40.3",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",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"}},Os=function(e){var t=Ps("object"===n(e)?e:i(e));return t&&t.version?Is.version>=t.version?t:void 0:t},Ps=function(e){var n=this;if(!Cs(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}},Bs=function(){var e;(e=console).log.apply(e,arguments)},Ls=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 Us={},Ms=Rr,Fs=String,js=function(e){if("Symbol"===Ms(e))throw new TypeError("Cannot convert a Symbol value to a string");return Fs(e)},Ns={},Gs=nt,Hs=ht,Vs=tt,Qs=At,zs=Ji,Ws=ns;Ns.f=Gs&&!Hs?Object.defineProperties:function(e,t){Qs(e);for(var n,r=zs(t),i=Ws(t),a=i.length,s=0;a>s;)Vs.f(e,n=i[s++],r[n]);return e};var Ks,Ys=wt("document","documentElement"),Js=At,Zs=Ns,Xs=wa,$s=Ln,eo=Ys,to=ct,no="prototype",ro="script",ao=Bn("IE_PROTO"),so=function(){},oo=function(e){return"<"+ro+">"+e+"</"+ro+">"},co=function(e){e.write(oo("")),e.close();var t=e.parentWindow.Object;return e=null,t},uo=function(){try{Ks=new ActiveXObject("htmlfile")}catch(e){}var e,t,n;uo="undefined"!=typeof document?document.domain&&Ks?co(Ks):(t=to("iframe"),n="java"+ro+":",t.style.display="none",eo.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(oo("document.F=Object")),e.close(),e.F):co(Ks);for(var r=Xs.length;r--;)delete uo[no][Xs[r]];return uo()};$s[ao]=!0;var lo=Object.create||function(e,t){var n;return null!==e?(so[no]=Js(e),n=new so,so[no]=null,n[ao]=e):n=uo(),void 0===t?n:Zs.f(n,t)},ho={},po=ua,fo=ti,mo=cs,Ao=Array,go=Math.max,vo=function(e,t,n){for(var r=fo(e),i=po(t,r),a=po(void 0===n?r:n,r),s=Ao(go(a-i,0)),o=0;i<a;i++,o++)mo(s,o,e[i]);return s.length=o,s},bo=yr,_o=Ji,yo=sa.f,wo=vo,ko="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];ho.f=function(e){return ko&&"Window"===bo(e)?function(e){try{return yo(e)}catch(e){return wo(ko)}}(e):yo(_o(e))};var Eo=un.exports,xo=tt,Do=function(e,t,n){return n.get&&Eo(n.get,t,{getter:!0}),n.set&&Eo(n.set,t,{setter:!0}),xo.f(e,t,n)},So={},Ro=Ke;So.f=Ro;var To=W,Co=_e,Io=So,Oo=tt.f,Po=function(e){var t=To.Symbol||(To.Symbol={});Co(t,e)||Oo(t,e,{value:Io.f(e)})},Bo=bt,Lo=wt,Uo=Ke,Mo=gr,Fo=tt.f,jo=_e,No=Ke("toStringTag"),Go=function(e,t,n){e&&!n&&(e=e.prototype),e&&!jo(e,No)&&Fo(e,No,{configurable:!0,value:t})},qo=$a,Ho=W,Vo=bt,Qo=ue,zo=nt,Wo=Me,Ko=ie,Yo=_e,Jo=kt,Zo=At,Xo=Ji,$o=Zt,ed=js,td=Sn,nd=lo,rd=ns,id=sa,ad=ho,sd=xa,od=Hi,dd=tt,cd=Ns,ud=Vi,ld=gr,hd=Do,pd=K.exports,fd=Ln,md=xe,Ad=Ke,gd=So,vd=Po,bd=function(){var e=Lo("Symbol"),t=e&&e.prototype,n=t&&t.valueOf,r=Uo("toPrimitive");t&&!t[r]&&Mo(t,r,(function(e){return Bo(n,this)}),{arity:1})},_d=Go,yd=Yn,wd=Oi.forEach,kd=Bn("hidden"),Ed="Symbol",xd="prototype",Dd=yd.set,Sd=yd.getterFor(Ed),Rd=Object[xd],Td=Ho.Symbol,Cd=Td&&Td[xd],Id=Ho.RangeError,Od=Ho.TypeError,Pd=Ho.QObject,Bd=od.f,Ld=dd.f,Ud=ad.f,Md=ud.f,Fd=Qo([].push),jd=pd("symbols"),Nd=pd("op-symbols"),Gd=pd("wks"),qd=!Pd||!Pd[xd]||!Pd[xd].findChild,Hd=function(e,t,n){var r=Bd(Rd,t);r&&delete Rd[t],Ld(e,t,n),r&&e!==Rd&&Ld(Rd,t,r)},Vd=zo&&Ko((function(){return 7!==nd(Ld({},"a",{get:function(){return Ld(this,"a",{value:7}).a}})).a}))?Hd:Ld,Qd=function(e,t){var n=jd[e]=nd(Cd);return Dd(n,{type:Ed,tag:e,description:t}),zo||(n.description=t),n},zd=function(e,t,n){e===Rd&&zd(Nd,t,n),Zo(e);var r=$o(t);return Zo(n),Yo(jd,r)?(n.enumerable?(Yo(e,kd)&&e[kd][r]&&(e[kd][r]=!1),n=nd(n,{enumerable:td(0,!1)})):(Yo(e,kd)||Ld(e,kd,td(1,{})),e[kd][r]=!0),Vd(e,r,n)):Ld(e,r,n)},Wd=function(e,t){Zo(e);var n=Xo(t),r=rd(n).concat(Zd(n));return wd(r,(function(t){zo&&!Vo(Kd,n,t)||zd(e,t,n[t])})),e},Kd=function(e){var t=$o(e),n=Vo(Md,this,t);return!(this===Rd&&Yo(jd,t)&&!Yo(Nd,t))&&(!(n||!Yo(this,t)||!Yo(jd,t)||Yo(this,kd)&&this[kd][t])||n)},Yd=function(e,t){var n=Xo(e),r=$o(t);if(n!==Rd||!Yo(jd,r)||Yo(Nd,r)){var i=Bd(n,r);return!i||!Yo(jd,r)||Yo(n,kd)&&n[kd][r]||(i.enumerable=!0),i}},Jd=function(e){var t=Ud(Xo(e)),n=[];return wd(t,(function(e){Yo(jd,e)||Yo(fd,e)||Fd(n,e)})),n},Zd=function(e){var t=e===Rd,n=Ud(t?Nd:Xo(e)),r=[];return wd(n,(function(e){!Yo(jd,e)||t&&!Yo(Rd,e)||Fd(r,jd[e])})),r};Wo||(ld(Cd=(Td=function(){if(Jo(Cd,this))throw new Od("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?ed(arguments[0]):void 0,t=md(e),n=function(e){var r=void 0===this?Ho:this;r===Rd&&Vo(n,Nd,e),Yo(r,kd)&&Yo(r[kd],t)&&(r[kd][t]=!1);var i=td(1,e);try{Vd(r,t,i)}catch(e){if(!(e instanceof Id))throw e;Hd(r,t,i)}};return zo&&qd&&Vd(Rd,t,{configurable:!0,set:n}),Qd(t,e)})[xd],"toString",(function(){return Sd(this).tag})),ld(Td,"withoutSetter",(function(e){return Qd(md(e),e)})),ud.f=Kd,dd.f=zd,cd.f=Wd,od.f=Yd,id.f=ad.f=Jd,sd.f=Zd,gd.f=function(e){return Qd(Ad(e),e)},zo&&(hd(Cd,"description",{configurable:!0,get:function(){return Sd(this).description}}),ld(Rd,"propertyIsEnumerable",Kd,{unsafe:!0}))),qo({global:!0,constructor:!0,wrap:!0,forced:!Wo,sham:!Wo},{Symbol:Td}),wd(rd(Gd),(function(e){vd(e)})),qo({target:Ed,stat:!0,forced:!Wo},{useSetter:function(){qd=!0},useSimple:function(){qd=!1}}),qo({target:"Object",stat:!0,forced:!Wo,sham:!zo},{create:function(e,t){return void 0===t?nd(e):Wd(nd(e),t)},defineProperty:zd,defineProperties:Wd,getOwnPropertyDescriptor:Yd}),qo({target:"Object",stat:!0,forced:!Wo},{getOwnPropertyNames:Jd}),bd(),_d(Td,Ed),fd[kd]=!0;var Xd=Me&&!!Symbol.for&&!!Symbol.keyFor,$d=$a,ec=wt,tc=_e,nc=js,rc=K.exports,ic=Xd,ac=rc("string-to-symbol-registry"),sc=rc("symbol-to-string-registry");$d({target:"Symbol",stat:!0,forced:!ic},{for:function(e){var t=nc(e);if(tc(ac,t))return ac[t];var n=ec("Symbol")(t);return ac[t]=n,sc[n]=t,n}});var oc=$a,dc=_e,cc=Rt,uc=Ct,lc=Xd,hc=(0,K.exports)("symbol-to-string-registry");oc({target:"Symbol",stat:!0,forced:!lc},{keyFor:function(e){if(!cc(e))throw new TypeError(uc(e)+" is not a symbol");if(dc(hc,e))return hc[e]}});var pc=ae,fc=Function.prototype,mc=fc.apply,Ac=fc.call,gc="object"==typeof Reflect&&Reflect.apply||(pc?Ac.bind(mc):function(){return Ac.apply(mc,arguments)}),vc=ue([].slice),bc=ri,_c=et,yc=yr,wc=js,kc=ue([].push),Ec=$a,xc=wt,Dc=gc,Sc=bt,Rc=ue,Tc=ie,Cc=et,Ic=Rt,Oc=vc,Pc=function(e){if(_c(e))return e;if(bc(e)){for(var t=e.length,n=[],r=0;r<t;r++){var i=e[r];"string"==typeof i?kc(n,i):"number"!=typeof i&&"Number"!==yc(i)&&"String"!==yc(i)||kc(n,wc(i))}var a=n.length,s=!0;return function(e,t){if(s)return s=!1,t;if(bc(this))return t;for(var r=0;r<a;r++)if(n[r]===e)return t}}},Bc=Me,Lc=String,Uc=xc("JSON","stringify"),Mc=Rc(/./.exec),Fc=Rc("".charAt),jc=Rc("".charCodeAt),Nc=Rc("".replace),Gc=Rc(1..toString),qc=/[\uD800-\uDFFF]/g,Hc=/^[\uD800-\uDBFF]$/,Vc=/^[\uDC00-\uDFFF]$/,Qc=!Bc||Tc((function(){var e=xc("Symbol")("stringify detection");return"[null]"!==Uc([e])||"{}"!==Uc({a:e})||"{}"!==Uc(Object(e))})),zc=Tc((function(){return'"\\udf06\\ud834"'!==Uc("\udf06\ud834")||'"\\udead"'!==Uc("\udead")})),Wc=function(e,t){var n=Oc(arguments),r=Pc(t);if(Cc(r)||void 0!==e&&!Ic(e))return n[1]=function(e,t){if(Cc(r)&&(t=Sc(r,this,Lc(e),t)),!Ic(t))return t},Dc(Uc,null,n)},Kc=function(e,t,n){var r=Fc(n,t-1),i=Fc(n,t+1);return Mc(Hc,e)&&!Mc(Vc,i)||Mc(Vc,e)&&!Mc(Hc,r)?"\\u"+Gc(jc(e,0),16):e};Uc&&Ec({target:"JSON",stat:!0,arity:3,forced:Qc||zc},{stringify:function(e,t,n){var r=Oc(arguments),i=Dc(Qc?Wc:Uc,null,r);return zc&&"string"==typeof i?Nc(i,qc,Kc):i}});var Yc=xa,Jc=ge;$a({target:"Object",stat:!0,forced:!Me||ie((function(){Yc.f(1)}))},{getOwnPropertySymbols:function(e){var t=Yc.f;return t?t(Jc(e)):[]}});var Zc=Oi.filter;$a({target:"Array",proto:!0,forced:!ps("filter")},{filter:function(e){return Zc(this,e,arguments.length>1?arguments[1]:void 0)}});var Xc=$a,$c=ie,eu=Ji,tu=Hi.f,nu=nt;Xc({target:"Object",stat:!0,forced:!nu||$c((function(){tu(1)})),sham:!nu},{getOwnPropertyDescriptor:function(e,t){return tu(eu(e),t)}});var ru=Ia,iu=Ji,au=Hi,su=cs;$a({target:"Object",stat:!0,sham:!nt},{getOwnPropertyDescriptors:function(e){for(var t,n,r=iu(e),i=au.f,a=ru(r),s={},o=0;a.length>o;)void 0!==(n=i(r,t=a[o++]))&&su(s,t,n);return s}});var ou=$a,du=ri,cu=gi,uu=at,lu=ua,hu=ti,pu=Ji,fu=cs,mu=Ke,Au=vc,gu=ps("slice"),vu=mu("species"),bu=Array,_u=Math.max;ou({target:"Array",proto:!0,forced:!gu},{slice:function(e,t){var n,r,i,a=pu(this),s=hu(a),o=lu(e,s),d=lu(void 0===t?s:t,s);if(du(a)&&(n=a.constructor,(cu(n)&&(n===bu||du(n.prototype))||uu(n)&&null===(n=n[vu]))&&(n=void 0),n===bu||void 0===n))return Au(a,o,d);for(r=new(void 0===n?bu:n)(_u(d-o,0)),i=0;o<d;o++,i++)o in a&&fu(r,i,a[o]);return r.length=i,r}});var yu=At,wu=function(){var e=yu(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},ku=bt,Eu=_e,xu=kt,Du=wu,Su=RegExp.prototype,Ru=function(e){var t=e.flags;return void 0!==t||"flags"in Su||Eu(e,"flags")||!xu(Su,e)?t:ku(Du,e)},Tu=An.PROPER,Cu=gr,Iu=At,Ou=js,Pu=ie,Bu=Ru,Lu="toString",Uu=RegExp.prototype[Lu],Mu=Pu((function(){return"/a/b"!==Uu.call({source:"a",flags:"b"})})),Fu=Tu&&Uu.name!==Lu;(Mu||Fu)&&Cu(RegExp.prototype,Lu,(function(){var e=Iu(this);return"/"+Ou(e.source)+"/"+Ou(Bu(e))}),{unsafe:!0});var ju=bt,Nu=At,Gu=Mt,qu=function(e,t,n){var r,i;Nu(e);try{if(!(r=Gu(e,"return"))){if("throw"===t)throw n;return n}r=ju(r,e)}catch(e){i=!0,r=e}if("throw"===t)throw n;if(i)throw r;return Nu(r),n},Hu=At,Vu=qu,Qu={},zu=Qu,Wu=Ke("iterator"),Ku=Array.prototype,Yu=function(e){return void 0!==e&&(zu.Array===e||Ku[Wu]===e)},Ju=Rr,Zu=Mt,Xu=le,$u=Qu,el=Ke("iterator"),tl=function(e){if(!Xu(e))return Zu(e,el)||Zu(e,"@@iterator")||$u[Ju(e)]},nl=bt,rl=Bt,il=At,al=Ct,sl=tl,ol=TypeError,dl=function(e,t){var n=arguments.length<2?sl(e):t;if(rl(n))return il(nl(n,e));throw new ol(al(e)+" is not iterable")},cl=Gr,ul=bt,ll=ge,hl=function(e,t,n,r){try{return r?t(Hu(n)[0],n[1]):t(n)}catch(t){Vu(e,"throw",t)}},pl=Yu,fl=gi,ml=ti,Al=cs,gl=dl,vl=tl,bl=Array,_l=function(e){var t=ll(e),n=fl(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,c,u,l,h=vl(t),p=0;if(!h||this===bl&&pl(h))for(s=ml(t),o=n?new this(s):bl(s);s>p;p++)l=a?i(t[p],p):t[p],Al(o,p,l);else for(u=(c=gl(t,h)).next,o=n?new this:[];!(d=ul(u,c)).done;p++)l=a?hl(c,i,[d.value,p],!0):d.value,Al(o,p,l);return o.length=p,o},yl=Ke("iterator"),wl=!1;try{var kl=0,El={next:function(){return{done:!!kl++}},return:function(){wl=!0}};El[yl]=function(){return this},Array.from(El,(function(){throw 2}))}catch(e){}var xl=function(e,t){try{if(!t&&!wl)return!1}catch(e){return!1}var n=!1;try{var r={};r[yl]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch(e){}return n},Dl=_l;$a({target:"Array",stat:!0,forced:!xl((function(e){Array.from(e)}))},{from:Dl});var Sl,Rl,Tl,Cl=ue,Il=Jr,Ol=js,Pl=fe,Bl=Cl("".charAt),Ll=Cl("".charCodeAt),Ul=Cl("".slice),Ml=function(e){return function(t,n){var r,i,a=Ol(Pl(t)),s=Il(n),o=a.length;return s<0||s>=o?e?"":void 0:(r=Ll(a,s))<55296||r>56319||s+1===o||(i=Ll(a,s+1))<56320||i>57343?e?Bl(a,s):r:e?Ul(a,s,s+2):i-56320+(r-55296<<10)+65536}},Fl={codeAt:Ml(!1),charAt:Ml(!0)},jl=!ie((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),Nl=_e,Gl=et,ql=ge,Hl=jl,Vl=Bn("IE_PROTO"),Ql=Object,zl=Ql.prototype,Wl=Hl?Ql.getPrototypeOf:function(e){var t=ql(e);if(Nl(t,Vl))return t[Vl];var n=t.constructor;return Gl(n)&&t instanceof n?n.prototype:t instanceof Ql?zl:null},Kl=ie,Yl=et,Jl=at,Zl=Wl,Xl=gr,$l=Ke("iterator"),eh=!1;[].keys&&("next"in(Tl=[].keys())?(Rl=Zl(Zl(Tl)))!==Object.prototype&&(Sl=Rl):eh=!0);var th=!Jl(Sl)||Kl((function(){var e={};return Sl[$l].call(e)!==e}));th&&(Sl={}),Yl(Sl[$l])||Xl(Sl,$l,(function(){return this}));var nh={IteratorPrototype:Sl,BUGGY_SAFARI_ITERATORS:eh},rh=nh.IteratorPrototype,ih=lo,ah=Sn,sh=Go,oh=Qu,dh=function(){return this},ch=function(e,t,n,r){var i=t+" Iterator";return e.prototype=ih(rh,{next:ah(+!r,n)}),sh(e,i,!1),oh[i]=dh,e},uh=ue,lh=Bt,hh=et,ph=String,fh=TypeError,mh=function(e,t,n){try{return uh(lh(Object.getOwnPropertyDescriptor(e,t)[n]))}catch(e){}},Ah=At,gh=function(e){if("object"==typeof e||hh(e))return e;throw new fh("Can't set "+ph(e)+" as a prototype")},vh=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=mh(Object.prototype,"__proto__","set"))(n,[]),t=n instanceof Array}catch(e){}return function(n,r){return Ah(n),gh(r),t?e(n,r):n.__proto__=r,n}}():void 0),bh=$a,_h=bt,yh=et,wh=ch,kh=Wl,Eh=vh,xh=Go,Dh=Cn,Sh=gr,Rh=Qu,Th=An.PROPER,Ch=An.CONFIGURABLE,Ih=nh.IteratorPrototype,Oh=nh.BUGGY_SAFARI_ITERATORS,Ph=Ke("iterator"),Bh="keys",Lh="values",Uh="entries",Mh=function(){return this},Fh=function(e,t,n,r,i,a,s){wh(n,t,r);var o,d,c,u=function(e){if(e===i&&m)return m;if(!Oh&&e&&e in p)return p[e];switch(e){case Bh:case Lh:case Uh:return function(){return new n(this,e)}}return function(){return new n(this)}},l=t+" Iterator",h=!1,p=e.prototype,f=p[Ph]||p["@@iterator"]||i&&p[i],m=!Oh&&f||u(i),A="Array"===t&&p.entries||f;if(A&&(o=kh(A.call(new e)))!==Object.prototype&&o.next&&(kh(o)!==Ih&&(Eh?Eh(o,Ih):yh(o[Ph])||Sh(o,Ph,Mh)),xh(o,l,!0)),Th&&i===Lh&&f&&f.name!==Lh&&(Ch?Dh(p,"name",Lh):(h=!0,m=function(){return _h(f,this)})),i)if(d={values:u(Lh),keys:a?m:u(Bh),entries:u(Uh)},s)for(c in d)(Oh||h||!(c in p))&&Sh(p,c,d[c]);else bh({target:t,proto:!0,forced:Oh||h},d);return p[Ph]!==m&&Sh(p,Ph,m,{name:i}),Rh[t]=m,d},jh=function(e,t){return{value:e,done:t}},Nh=Fl.charAt,Gh=js,qh=Yn,Hh=Fh,Vh=jh,Qh="String Iterator",zh=qh.set,Wh=qh.getterFor(Qh);Hh(String,"String",(function(e){zh(this,{type:Qh,string:Gh(e),index:0})}),(function(){var e,t=Wh(this),n=t.string,r=t.index;return r>=n.length?Vh(void 0,!0):(e=Nh(n,r),t.index+=e.length,Vh(e,!1))}));var Kh=ie,Yh=W.RegExp,Jh=Kh((function(){var e=Yh("a","y");return e.lastIndex=2,null!==e.exec("abcd")})),Zh=Jh||Kh((function(){return!Yh("a","y").sticky})),Xh={BROKEN_CARET:Jh||Kh((function(){var e=Yh("^r","gy");return e.lastIndex=2,null!==e.exec("str")})),MISSED_STICKY:Zh,UNSUPPORTED_Y:Jh},$h=ie,ep=W.RegExp,tp=$h((function(){var e=ep(".","s");return!(e.dotAll&&e.test("\n")&&"s"===e.flags)})),np=ie,rp=W.RegExp,ip=np((function(){var e=rp("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),ap=bt,sp=ue,op=js,dp=wu,cp=Xh,up=K.exports,lp=lo,hp=Yn.get,pp=tp,fp=ip,mp=up("native-string-replace",String.prototype.replace),Ap=RegExp.prototype.exec,gp=Ap,vp=sp("".charAt),bp=sp("".indexOf),_p=sp("".replace),yp=sp("".slice),wp=function(){var e=/a/,t=/b*/g;return ap(Ap,e,"a"),ap(Ap,t,"a"),0!==e.lastIndex||0!==t.lastIndex}(),kp=cp.BROKEN_CARET,Ep=void 0!==/()??/.exec("")[1];(wp||Ep||kp||pp||fp)&&(gp=function(e){var t,n,r,i,a,s,o,d=this,c=hp(d),u=op(e),l=c.raw;if(l)return l.lastIndex=d.lastIndex,t=ap(gp,l,u),d.lastIndex=l.lastIndex,t;var h=c.groups,p=kp&&d.sticky,f=ap(dp,d),m=d.source,A=0,g=u;if(p&&(f=_p(f,"y",""),-1===bp(f,"g")&&(f+="g"),g=yp(u,d.lastIndex),d.lastIndex>0&&(!d.multiline||d.multiline&&"\n"!==vp(u,d.lastIndex-1))&&(m="(?: "+m+")",g=" "+g,A++),n=new RegExp("^(?:"+m+")",f)),Ep&&(n=new RegExp("^"+m+"$(?!\\s)",f)),wp&&(r=d.lastIndex),i=ap(Ap,p?n:d,g),p?i?(i.input=yp(i.input,A),i[0]=yp(i[0],A),i.index=d.lastIndex,d.lastIndex+=i[0].length):d.lastIndex=0:wp&&i&&(d.lastIndex=d.global?i.index+i[0].length:r),Ep&&i&&i.length>1&&ap(mp,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=lp(null),a=0;a<h.length;a++)s[(o=h[a])[0]]=i[o[1]];return i});var xp=gp;$a({target:"RegExp",proto:!0,forced:/./.exec!==xp},{exec:xp});var Dp=$a,Sp=nt,Rp=ue,Tp=_e,Cp=et,Ip=kt,Op=js,Pp=Do,Bp=Ua,Lp=W.Symbol,Up=Lp&&Lp.prototype;if(Sp&&Cp(Lp)&&(!("description"in Up)||void 0!==Lp().description)){var Mp={},Fp=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:Op(arguments[0]),t=Ip(Up,this)?new Lp(e):void 0===e?Lp():Lp(e);return""===e&&(Mp[t]=!0),t};Bp(Fp,Lp),Fp.prototype=Up,Up.constructor=Fp;var jp="Symbol(description detection)"===String(Lp("description detection")),Np=Rp(Up.valueOf),Gp=Rp(Up.toString),qp=/^Symbol\((.*)\)[^)]+$/,Hp=Rp("".replace),Vp=Rp("".slice);Pp(Up,"description",{configurable:!0,get:function(){var e=Np(this);if(Tp(Mp,e))return"";var t=Gp(e),n=jp?Vp(t,7,-1):Hp(t,qp,"$1");return""===n?void 0:n}}),Dp({global:!0,constructor:!0,forced:!0},{Symbol:Fp})}Po("iterator");var Qp=Ke,zp=lo,Wp=tt.f,Kp=Qp("unscopables"),Yp=Array.prototype;void 0===Yp[Kp]&&Wp(Yp,Kp,{configurable:!0,value:zp(null)});var Jp=function(e){Yp[Kp][e]=!0},Zp=Ji,Xp=Jp,$p=Qu,ef=Yn,tf=tt.f,nf=Fh,rf=jh,af=nt,sf="Array Iterator",of=ef.set,df=ef.getterFor(sf),cf=nf(Array,"Array",(function(e,t){of(this,{type:sf,target:Zp(e),index:0,kind:t})}),(function(){var e=df(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=void 0,rf(void 0,!0);switch(e.kind){case"keys":return rf(n,!1);case"values":return rf(t[n],!1)}return rf([n,t[n]],!1)}),"values"),uf=$p.Arguments=$p.Array;if(Xp("keys"),Xp("values"),Xp("entries"),af&&"values"!==uf.name)try{tf(uf,"name",{value:"values"})}catch(e){}var lf=W,hf=Ir,pf=Br,ff=cf,mf=Cn,Af=Go,gf=Ke("iterator"),vf=ff.values,bf=function(e,t){if(e){if(e[gf]!==vf)try{mf(e,gf,vf)}catch(t){e[gf]=vf}if(Af(e,t,!0),hf[t])for(var n in ff)if(e[n]!==ff[n])try{mf(e,n,ff[n])}catch(t){e[n]=ff[n]}}};for(var _f in hf)bf(lf[_f]&&lf[_f].prototype,_f);bf(pf,"DOMTokenList");var yf,wf,kf,Ef,xf="process"===yr(W.process),Df=wt,Sf=Do,Rf=nt,Tf=Ke("species"),Cf=function(e){var t=Df(e);Rf&&t&&!t[Tf]&&Sf(t,Tf,{configurable:!0,get:function(){return this}})},If=kt,Of=TypeError,Pf=function(e,t){if(If(t,e))return e;throw new Of("Incorrect invocation")},Bf=gi,Lf=Ct,Uf=TypeError,Mf=At,Ff=function(e){if(Bf(e))return e;throw new Uf(Lf(e)+" is not a constructor")},jf=le,Nf=Ke("species"),Gf=function(e,t){var n,r=Mf(e).constructor;return void 0===r||jf(n=Mf(r)[Nf])?t:Ff(n)},qf=TypeError,Hf=function(e,t){if(e<t)throw new qf("Not enough arguments");return e},Vf=/(?:ipad|iphone|ipod).*applewebkit/i.test(De),Qf=W,zf=gc,Wf=Gr,Kf=et,Yf=_e,Jf=ie,Zf=Ys,Xf=vc,$f=ct,em=Hf,tm=Vf,nm=xf,rm=Qf.setImmediate,im=Qf.clearImmediate,am=Qf.process,sm=Qf.Dispatch,om=Qf.Function,dm=Qf.MessageChannel,cm=Qf.String,um=0,lm={},hm="onreadystatechange";Jf((function(){yf=Qf.location}));var pm=function(e){if(Yf(lm,e)){var t=lm[e];delete lm[e],t()}},fm=function(e){return function(){pm(e)}},mm=function(e){pm(e.data)},Am=function(e){Qf.postMessage(cm(e),yf.protocol+"//"+yf.host)};rm&&im||(rm=function(e){em(arguments.length,1);var t=Kf(e)?e:om(e),n=Xf(arguments,1);return lm[++um]=function(){zf(t,void 0,n)},wf(um),um},im=function(e){delete lm[e]},nm?wf=function(e){am.nextTick(fm(e))}:sm&&sm.now?wf=function(e){sm.now(fm(e))}:dm&&!tm?(Ef=(kf=new dm).port2,kf.port1.onmessage=mm,wf=Wf(Ef.postMessage,Ef)):Qf.addEventListener&&Kf(Qf.postMessage)&&!Qf.importScripts&&yf&&"file:"!==yf.protocol&&!Jf(Am)?(wf=Am,Qf.addEventListener("message",mm,!1)):wf=hm in $f("script")?function(e){Zf.appendChild($f("script"))[hm]=function(){Zf.removeChild(this),pm(e)}}:function(e){setTimeout(fm(e),0)});var gm={set:rm,clear:im},vm=function(){this.head=null,this.tail=null};vm.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 bm,_m,ym,wm,km,Em=vm,xm=/ipad|iphone|ipod/i.test(De)&&"undefined"!=typeof Pebble,Dm=/web0s(?!.*chrome)/i.test(De),Sm=W,Rm=Gr,Tm=Hi.f,Cm=gm.set,Im=Em,Om=Vf,Pm=xm,Bm=Dm,Lm=xf,Um=Sm.MutationObserver||Sm.WebKitMutationObserver,Mm=Sm.document,Fm=Sm.process,jm=Sm.Promise,Nm=Tm(Sm,"queueMicrotask"),Gm=Nm&&Nm.value;if(!Gm){var qm=new Im,Hm=function(){var e,t;for(Lm&&(e=Fm.domain)&&e.exit();t=qm.get();)try{t()}catch(e){throw qm.head&&bm(),e}e&&e.enter()};Om||Lm||Bm||!Um||!Mm?!Pm&&jm&&jm.resolve?((wm=jm.resolve(void 0)).constructor=jm,km=Rm(wm.then,wm),bm=function(){km(Hm)}):Lm?bm=function(){Fm.nextTick(Hm)}:(Cm=Rm(Cm,Sm),bm=function(){Cm(Hm)}):(_m=!0,ym=Mm.createTextNode(""),new Um(Hm).observe(ym,{characterData:!0}),bm=function(){ym.data=_m=!_m}),Gm=function(e){qm.head||bm(),qm.add(e)}}var Vm=Gm,Qm=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},zm=W.Promise,Wm="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,Km=!Wm&&!xf&&"object"==typeof window&&"object"==typeof document,Ym=W,Jm=zm,Zm=et,Xm=Qa,$m=kn,eA=Ke,tA=Km,nA=Wm,rA=Pe;Jm&&Jm.prototype;var iA=eA("species"),aA=!1,sA=Zm(Ym.PromiseRejectionEvent),oA=Xm("Promise",(function(){var e=$m(Jm),t=e!==String(Jm);if(!t&&66===rA)return!0;if(!rA||rA<51||!/native code/.test(e)){var n=new Jm((function(e){e(1)})),r=function(e){e((function(){}),(function(){}))};if((n.constructor={})[iA]=r,!(aA=n.then((function(){}))instanceof r))return!0}return!t&&(tA||nA)&&!sA})),dA={CONSTRUCTOR:oA,REJECTION_EVENT:sA,SUBCLASSING:aA},cA={},uA=Bt,lA=TypeError,hA=function(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw new lA("Bad Promise constructor");t=e,n=r})),this.resolve=uA(t),this.reject=uA(n)};cA.f=function(e){return new hA(e)};var pA,fA,mA,AA=$a,gA=xf,vA=W,bA=bt,_A=gr,yA=vh,wA=Go,kA=Cf,EA=Bt,xA=et,DA=at,SA=Pf,RA=Gf,TA=gm.set,CA=Vm,IA=function(e,t){try{1===arguments.length?console.error(e):console.error(e,t)}catch(e){}},OA=Qm,PA=Em,BA=Yn,LA=zm,UA=cA,MA="Promise",FA=dA.CONSTRUCTOR,jA=dA.REJECTION_EVENT,NA=dA.SUBCLASSING,GA=BA.getterFor(MA),qA=BA.set,HA=LA&&LA.prototype,VA=LA,QA=HA,zA=vA.TypeError,WA=vA.document,KA=vA.process,YA=UA.f,JA=YA,ZA=!!(WA&&WA.createEvent&&vA.dispatchEvent),XA="unhandledrejection",$A=function(e){var t;return!(!DA(e)||!xA(t=e.then))&&t},eg=function(e,t){var n,r,i,a=t.value,s=1===t.state,o=s?e.ok:e.fail,d=e.resolve,c=e.reject,u=e.domain;try{o?(s||(2===t.rejection&&ag(t),t.rejection=1),!0===o?n=a:(u&&u.enter(),n=o(a),u&&(u.exit(),i=!0)),n===e.promise?c(new zA("Promise-chain cycle")):(r=$A(n))?bA(r,n,d,c):d(n)):c(a)}catch(e){u&&!i&&u.exit(),c(e)}},tg=function(e,t){e.notified||(e.notified=!0,CA((function(){for(var n,r=e.reactions;n=r.get();)eg(n,e);e.notified=!1,t&&!e.rejection&&rg(e)})))},ng=function(e,t,n){var r,i;ZA?((r=WA.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),vA.dispatchEvent(r)):r={promise:t,reason:n},!jA&&(i=vA["on"+e])?i(r):e===XA&&IA("Unhandled promise rejection",n)},rg=function(e){bA(TA,vA,(function(){var t,n=e.facade,r=e.value;if(ig(e)&&(t=OA((function(){gA?KA.emit("unhandledRejection",r,n):ng(XA,n,r)})),e.rejection=gA||ig(e)?2:1,t.error))throw t.value}))},ig=function(e){return 1!==e.rejection&&!e.parent},ag=function(e){bA(TA,vA,(function(){var t=e.facade;gA?KA.emit("rejectionHandled",t):ng("rejectionhandled",t,e.value)}))},sg=function(e,t,n){return function(r){e(t,r,n)}},og=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,tg(e,!0))},dg=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw new zA("Promise can't be resolved itself");var r=$A(t);r?CA((function(){var n={done:!1};try{bA(r,t,sg(dg,n,e),sg(og,n,e))}catch(t){og(n,t,e)}})):(e.value=t,e.state=1,tg(e,!1))}catch(t){og({done:!1},t,e)}}};if(FA&&(QA=(VA=function(e){SA(this,QA),EA(e),bA(pA,this);var t=GA(this);try{e(sg(dg,t),sg(og,t))}catch(e){og(t,e)}}).prototype,(pA=function(e){qA(this,{type:MA,done:!1,notified:!1,parent:!1,reactions:new PA,rejection:!1,state:0,value:void 0})}).prototype=_A(QA,"then",(function(e,t){var n=GA(this),r=YA(RA(this,VA));return n.parent=!0,r.ok=!xA(e)||e,r.fail=xA(t)&&t,r.domain=gA?KA.domain:void 0,0===n.state?n.reactions.add(r):CA((function(){eg(r,n)})),r.promise})),fA=function(){var e=new pA,t=GA(e);this.promise=e,this.resolve=sg(dg,t),this.reject=sg(og,t)},UA.f=YA=function(e){return e===VA||undefined===e?new fA(e):JA(e)},xA(LA)&&HA!==Object.prototype)){mA=HA.then,NA||_A(HA,"then",(function(e,t){var n=this;return new VA((function(e,t){bA(mA,n,e,t)})).then(e,t)}),{unsafe:!0});try{delete HA.constructor}catch(e){}yA&&yA(HA,QA)}AA({global:!0,constructor:!0,wrap:!0,forced:FA},{Promise:VA}),wA(VA,MA,!1),kA(MA);var cg=Gr,ug=bt,lg=At,hg=Ct,pg=Yu,fg=ti,mg=kt,Ag=dl,gg=tl,vg=qu,bg=TypeError,_g=function(e,t){this.stopped=e,this.result=t},yg=_g.prototype,wg=function(e,t,n){var r,i,a,s,o,d,c,u=n&&n.that,l=!(!n||!n.AS_ENTRIES),h=!(!n||!n.IS_RECORD),p=!(!n||!n.IS_ITERATOR),f=!(!n||!n.INTERRUPTED),m=cg(t,u),A=function(e){return r&&vg(r,"normal",e),new _g(!0,e)},g=function(e){return l?(lg(e),f?m(e[0],e[1],A):m(e[0],e[1])):f?m(e,A):m(e)};if(h)r=e.iterator;else if(p)r=e;else{if(!(i=gg(e)))throw new bg(hg(e)+" is not iterable");if(pg(i)){for(a=0,s=fg(e);s>a;a++)if((o=g(e[a]))&&mg(yg,o))return o;return new _g(!1)}r=Ag(e,i)}for(d=h?e.next:r.next;!(c=ug(d,r)).done;){try{o=g(c.value)}catch(e){vg(r,"throw",e)}if("object"==typeof o&&o&&mg(yg,o))return o}return new _g(!1)},kg=zm,Eg=dA.CONSTRUCTOR||!xl((function(e){kg.all(e).then(void 0,(function(){}))})),xg=bt,Dg=Bt,Sg=cA,Rg=Qm,Tg=wg;$a({target:"Promise",stat:!0,forced:Eg},{all:function(e){var t=this,n=Sg.f(t),r=n.resolve,i=n.reject,a=Rg((function(){var n=Dg(t.resolve),a=[],s=0,o=1;Tg(e,(function(e){var d=s++,c=!1;o++,xg(n,t,e).then((function(e){c||(c=!0,a[d]=e,--o||r(a))}),i)})),--o||r(a)}));return a.error&&i(a.value),n.promise}});var Cg=$a,Ig=dA.CONSTRUCTOR,Og=zm,Pg=wt,Bg=et,Lg=gr,Ug=Og&&Og.prototype;if(Cg({target:"Promise",proto:!0,forced:Ig,real:!0},{catch:function(e){return this.then(void 0,e)}}),Bg(Og)){var Mg=Pg("Promise").prototype.catch;Ug.catch!==Mg&&Lg(Ug,"catch",Mg,{unsafe:!0})}var Fg=bt,jg=Bt,Ng=cA,Gg=Qm,qg=wg;$a({target:"Promise",stat:!0,forced:Eg},{race:function(e){var t=this,n=Ng.f(t),r=n.reject,i=Gg((function(){var i=jg(t.resolve);qg(e,(function(e){Fg(i,t,e).then(n.resolve,r)}))}));return i.error&&r(i.value),n.promise}});var Hg=bt,Vg=cA;$a({target:"Promise",stat:!0,forced:dA.CONSTRUCTOR},{reject:function(e){var t=Vg.f(this);return Hg(t.reject,void 0,e),t.promise}});var Qg=At,zg=at,Wg=cA,Kg=function(e,t){if(Qg(e),zg(t)&&t.constructor===e)return t;var n=Wg.f(e);return(0,n.resolve)(t),n.promise},Yg=$a,Jg=dA.CONSTRUCTOR,Zg=Kg;wt("Promise"),Yg({target:"Promise",stat:!0,forced:Jg},{resolve:function(e){return Zg(this,e)}});var Xg=nt,$g=An.EXISTS,ev=ue,tv=Do,nv=Function.prototype,rv=ev(nv.toString),iv=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,av=ev(iv.exec);function sv(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 ov(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 ov(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 ov(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 dv(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 cv(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?dv(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dv(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}Xg&&!$g&&tv(nv,"name",{configurable:!0,get:function(){try{return av(iv,rv(this))[1]}catch(e){return""}}});var uv,lv={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"}},hv={},pv=function(e,t){hv[e]=cv(cv({},t),{},{isLoading:!1})},fv=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))},mv=function(){var t=e(r.mark((function e(t){var n,i,a,s,o,d,c,u;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=hv[t]).isLoading){e.next=6;break}return e.abrupt("return");case 6:i.isLoading=!0,a=sv(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=lv[o].name,!window[d]){e.next=16;break}return e.abrupt("continue",24);case 16:return e.next=18,fv({id:o,src:lv[o].src});case 18:e.next=24;break;case 20:e.prev=20,e.t0=e.catch(12),c=o.id,u=o.src,console.log("Could not load external script ".concat(c," ").concat(u),e.t0);case 24:e.next=10;break;case 26:e.next=31;break;case 28:e.prev=28,e.t1=e.catch(8),a.e(e.t1);case 31:return e.prev=31,a.f(),e.finish(31);case 34:return e.prev=34,e.next=37,fv({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)}}(),Av=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,mv("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"]},pv(this.moduleName,this.moduleConfig)})),gv=new Av,vv=at,bv=yr,_v=Ke("match"),yv=function(e){var t;return vv(e)&&(void 0!==(t=e[_v])?!!t:"RegExp"===bv(e))},wv=yv,kv=TypeError,Ev=function(e){if(wv(e))throw new kv("The method doesn't accept regular expressions");return e},xv=Ke("match"),Dv=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[xv]=!1,"/./"[e](t)}catch(e){}}return!1},Sv=$a,Rv=Mr,Tv=Hi.f,Cv=$r,Iv=js,Ov=Ev,Pv=fe,Bv=Dv,Lv=Rv("".startsWith),Uv=Rv("".slice),Mv=Math.min,Fv=Bv("startsWith");Sv({target:"String",proto:!0,forced:!!(Fv||(uv=Tv(String.prototype,"startsWith"),!uv||uv.writable))&&!Fv},{startsWith:function(e){var t=Iv(Pv(this));Ov(e);var n=Cv(Mv(arguments.length>1?arguments[1]:void 0,t.length)),r=Iv(e);return Lv?Lv(t,r,n):Uv(t,n,n+r.length)===r}});var jv=Mr,Nv=gr,Gv=xp,qv=ie,Hv=Ke,Vv=Cn,Qv=Hv("species"),zv=RegExp.prototype,Wv=function(e,t,n,r){var i=Hv(e),a=!qv((function(){var t={};return t[i]=function(){return 7},7!==""[e](t)})),s=a&&!qv((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[Qv]=function(){return n},n.flags="",n[i]=/./[i]),n.exec=function(){return t=!0,null},n[i](""),!t}));if(!a||!s||n){var o=jv(/./[i]),d=t(i,""[e],(function(e,t,n,r,i){var s=jv(e),d=t.exec;return d===Gv||d===zv.exec?a&&!i?{done:!0,value:o(t,n,r)}:{done:!0,value:s(n,t,r)}:{done:!1}}));Nv(String.prototype,e,d[0]),Nv(zv,i,d[1])}r&&Vv(zv[i],"sham",!0)},Kv=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t},Yv=bt,Jv=At,Zv=et,Xv=yr,$v=xp,eb=TypeError,tb=function(e,t){var n=e.exec;if(Zv(n)){var r=Yv(n,e,t);return null!==r&&Jv(r),r}if("RegExp"===Xv(e))return Yv($v,e,t);throw new eb("RegExp#exec called on incompatible receiver")},nb=bt,rb=At,ib=le,ab=fe,sb=Kv,ob=js,db=Mt,cb=tb;function ub(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 lb(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ub(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ub(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}Wv("search",(function(e,t,n){return[function(t){var n=ab(this),r=ib(t)?void 0:db(t,e);return r?nb(r,t,n):new RegExp(t)[e](ob(n))},function(e){var r=rb(this),i=ob(e),a=n(t,r,i);if(a.done)return a.value;var s=r.lastIndex;sb(s,0)||(r.lastIndex=0);var o=cb(r,i);return sb(r.lastIndex,s)||(r.lastIndex=s),null===o?-1:o.index}]}));var hb,pb,fb=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()),u=decodeURIComponent((e||n)&&r.topDomain?r.topDomain:n&&0===o()?d:c()),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,A=(e||n)&&r.loaderEnabled,g=(e||n)&&r.loaderEnabled;console.log("noMinijuegosSDK",g);var v=(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:v,parentURL:i,parentDomain:d,topDomain:u&&u.length?u:d,noGAPageView:f,noLotamePageView:m,noGamedockSDK:A,noMinijuegosSDK:g,version:r.version,pauseGameOnStartup:b,depth:o(),domainMatched:d===u,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 C(location.href,!0);if(!n.query.gd_zone_config)return;e=n.query.gd_zone_config}else if(t.test(document.referrer)){var r=new C(document.referrer,!0);if(!r.query.gd_zone_config)return;e=r.query.gd_zone_config}else{var i=new C(location.href,!0);if(!i.query.gd_zone_config)return;e=i.query.gd_zone_config}return JSON.parse(I.decode(decodeURIComponent(e)))}catch(e){}}},{key:"_formatTokenURLSearch",value:function(e){var t="";try{t=encodeURIComponent(I.encode(JSON.stringify(e)))}catch(e){}try{var n=new C(location.href,!0);return n.query=n.query||{},n.query.gd_zone_config=t,"?".concat(qs.stringify(n.query))}catch(e){return"?gd_zone_config=".concat(t)}}},{key:"_extendUrlQuery",value:function(e,t){var n=new C(e,!0);return n.query=lb(lb({},n.query),t),n.toString()}},{key:"_base64_encode",value:function(e){return I.encode(JSON.stringify(e))}}]),e}(),mb=function(){try{return(new fb).getBridgeContext()}catch(e){return{}}}(),Ab={userDeclinedTracking:document.location.search.indexOf("gdpr-tracking=0")>=0||document.cookie.indexOf("ogdpr_tracking=0")>=0,whitelabelPartner:(hb=!1,(pb=d("xanthophyll")).hasOwnProperty("xanthophyll")&&"true"===pb.xanthophyll&&(hb=!0),hb)},gb=Fl.charAt,vb=ue,bb=ge,_b=Math.floor,yb=vb("".charAt),wb=vb("".replace),kb=vb("".slice),Eb=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,xb=/\$([$&'`]|\d{1,2})/g,Db=gc,Sb=bt,Rb=ue,Tb=Wv,Cb=ie,Ib=At,Ob=et,Pb=le,Bb=Jr,Lb=$r,Ub=js,Mb=fe,Fb=function(e,t,n){return t+(n?gb(e,t).length:1)},jb=Mt,Nb=function(e,t,n,r,i,a){var s=n+e.length,o=r.length,d=xb;return void 0!==i&&(i=bb(i),d=Eb),wb(a,d,(function(a,d){var c;switch(yb(d,0)){case"$":return"$";case"&":return e;case"`":return kb(t,0,n);case"'":return kb(t,s);case"<":c=i[kb(d,1,-1)];break;default:var u=+d;if(0===u)return a;if(u>o){var l=_b(u/10);return 0===l?a:l<=o?void 0===r[l-1]?yb(d,1):r[l-1]+yb(d,1):a}c=r[u-1]}return void 0===c?"":c}))},Gb=tb,qb=Ke("replace"),Hb=Math.max,Vb=Math.min,Qb=Rb([].concat),zb=Rb([].push),Wb=Rb("".indexOf),Kb=Rb("".slice),Yb="$0"==="a".replace(/./,"$0"),Jb=!!/./[qb]&&""===/./[qb]("a","$0");Tb("replace",(function(e,t,n){var r=Jb?"$":"$0";return[function(e,n){var r=Mb(this),i=Pb(e)?void 0:jb(e,qb);return i?Sb(i,e,r,n):Sb(t,Ub(r),e,n)},function(e,i){var a=Ib(this),s=Ub(e);if("string"==typeof i&&-1===Wb(i,r)&&-1===Wb(i,"$<")){var o=n(t,a,s,i);if(o.done)return o.value}var d=Ob(i);d||(i=Ub(i));var c,u=a.global;u&&(c=a.unicode,a.lastIndex=0);for(var l,h=[];null!==(l=Gb(a,s))&&(zb(h,l),u);){""===Ub(l[0])&&(a.lastIndex=Fb(s,Lb(a.lastIndex),c))}for(var p,f="",m=0,A=0;A<h.length;A++){for(var g,v=Ub((l=h[A])[0]),b=Hb(Vb(Bb(l.index),s.length),0),_=[],y=1;y<l.length;y++)zb(_,void 0===(p=l[y])?p:String(p));var w=l.groups;if(d){var k=Qb([v],_,b,s);void 0!==w&&zb(k,w),g=Ub(Db(i,void 0,k))}else g=Nb(v,s,b,_,w,i);b>=m&&(f+=Kb(s,m,b)+g,m=b+v.length)}return f+Kb(s,m)}]}),!!Cb((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}))||!Yb||Jb);var Zb=ie,Xb=nt,$b=Ke("iterator"),e_=!Zb((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,n=new URLSearchParams("a=1&a=2&b=3"),r="";return e.pathname="c%20d",t.forEach((function(e,n){t.delete("b"),r+=n+e})),n.delete("a",2),n.delete("b",void 0),!t.size&&!Xb||!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[$b]||"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"!==r||"x"!==new URL("http://x",void 0).host})),t_=gr,n_=vo,r_=Math.floor,i_=function(e,t){var n=e.length,r=r_(n/2);return n<8?a_(e,t):s_(e,i_(n_(e,0,r),t),i_(n_(e,r),t),t)},a_=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},s_=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},o_=$a,d_=W,c_=bt,u_=ue,l_=nt,h_=e_,p_=gr,f_=Do,m_=function(e,t,n){for(var r in t)t_(e,r,t[r],n);return e},A_=Go,g_=ch,v_=Yn,b_=Pf,__=et,y_=_e,w_=Gr,k_=Rr,E_=At,x_=at,D_=js,S_=lo,R_=Sn,T_=dl,C_=tl,I_=jh,O_=Hf,P_=i_,B_=Ke("iterator"),L_="URLSearchParams",U_=L_+"Iterator",M_=v_.set,F_=v_.getterFor(L_),j_=v_.getterFor(U_),N_=Object.getOwnPropertyDescriptor,G_=function(e){if(!l_)return d_[e];var t=N_(d_,e);return t&&t.value},q_=G_("fetch"),H_=G_("Request"),V_=G_("Headers"),Q_=H_&&H_.prototype,z_=V_&&V_.prototype,W_=d_.RegExp,K_=d_.TypeError,Y_=d_.decodeURIComponent,J_=d_.encodeURIComponent,Z_=u_("".charAt),X_=u_([].join),$_=u_([].push),ey=u_("".replace),ty=u_([].shift),ny=u_([].splice),ry=u_("".split),iy=u_("".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}},cy=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}},uy=/[!'()~]|%20/g,ly={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},hy=function(e){return ly[e]},py=function(e){return ey(J_(e),uy,hy)},fy=g_((function(e,t){M_(this,{type:U_,target:F_(e).entries,index:0,kind:t})}),L_,(function(){var e=j_(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=void 0,I_(void 0,!0);var r=t[n];switch(e.kind){case"keys":return I_(r.key,!1);case"values":return I_(r.value,!1)}return I_([r.key,r.value],!1)}),!0),my=function(e){this.entries=[],this.url=null,void 0!==e&&(x_(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===Z_(e,0)?iy(e,1):e:D_(e)))};my.prototype={type:L_,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,n,r,i,a,s,o,d=this.entries,c=C_(e);if(c)for(n=(t=T_(e,c)).next;!(r=c_(n,t)).done;){if(a=(i=T_(E_(r.value))).next,(s=c_(a,i)).done||(o=c_(a,i)).done||!c_(a,i).done)throw new K_("Expected sequence with length 2");$_(d,{key:D_(s.value),value:D_(o.value)})}else for(var u in e)y_(e,u)&&$_(d,{key:u,value:D_(e[u])})},parseQuery:function(e){if(e)for(var t,n,r=this.entries,i=ry(e,"&"),a=0;a<i.length;)(t=i[a++]).length&&(n=ry(t,"="),$_(r,{key:cy(ty(n)),value:cy(X_(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 X_(n,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var Ay=function(){b_(this,gy);var e=M_(this,new my(arguments.length>0?arguments[0]:void 0));l_||(this.size=e.entries.length)},gy=Ay.prototype;if(m_(gy,{append:function(e,t){var n=F_(this);O_(arguments.length,2),$_(n.entries,{key:D_(e),value:D_(t)}),l_||this.length++,n.updateURL()},delete:function(e){for(var t=F_(this),n=O_(arguments.length,1),r=t.entries,i=D_(e),a=n<2?void 0:arguments[1],s=void 0===a?a:D_(a),o=0;o<r.length;){var d=r[o];if(d.key!==i||void 0!==s&&d.value!==s)o++;else if(ny(r,o,1),void 0!==s)break}l_||(this.size=r.length),t.updateURL()},get:function(e){var t=F_(this).entries;O_(arguments.length,1);for(var n=D_(e),r=0;r<t.length;r++)if(t[r].key===n)return t[r].value;return null},getAll:function(e){var t=F_(this).entries;O_(arguments.length,1);for(var n=D_(e),r=[],i=0;i<t.length;i++)t[i].key===n&&$_(r,t[i].value);return r},has:function(e){for(var t=F_(this).entries,n=O_(arguments.length,1),r=D_(e),i=n<2?void 0:arguments[1],a=void 0===i?i:D_(i),s=0;s<t.length;){var o=t[s++];if(o.key===r&&(void 0===a||o.value===a))return!0}return!1},set:function(e,t){var n=F_(this);O_(arguments.length,1);for(var r,i=n.entries,a=!1,s=D_(e),o=D_(t),d=0;d<i.length;d++)(r=i[d]).key===s&&(a?ny(i,d--,1):(a=!0,r.value=o));a||$_(i,{key:s,value:o}),l_||(this.size=i.length),n.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=w_(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}),p_(gy,B_,gy.entries,{name:"entries"}),p_(gy,"toString",(function(){return F_(this).serialize()}),{enumerable:!0}),l_&&f_(gy,"size",{get:function(){return F_(this).entries.length},configurable:!0,enumerable:!0}),A_(Ay,L_),o_({global:!0,constructor:!0,forced:!h_},{URLSearchParams:Ay}),!h_&&__(V_)){var vy=u_(z_.has),by=u_(z_.set),_y=function(e){if(x_(e)){var t,n=e.body;if(k_(n)===L_)return t=e.headers?new V_(e.headers):new V_,vy(t,"content-type")||by(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),S_(e,{body:R_(0,D_(n)),headers:R_(0,t)})}return e};if(__(q_)&&o_({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return q_(e,arguments.length>1?_y(arguments[1]):{})}}),__(H_)){var yy=function(e){return b_(this,Q_),new H_(e,arguments.length>1?_y(arguments[1]):{})};Q_.constructor=yy,yy.prototype=Q_,o_({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:yy})}}var wy={URLSearchParams:Ay,getState:F_},ky=ma.includes,Ey=Jp;$a({target:"Array",proto:!0,forced:ie((function(){return!Array(1).includes()}))},{includes:function(e){return ky(this,e,arguments.length>1?arguments[1]:void 0)}}),Ey("includes");var xy=$a,Dy=Ev,Sy=fe,Ry=js,Ty=Dv,Cy=ue("".indexOf);function Iy(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 B(r,e)}function c(e,t){return L(r,e,t)}function u(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(e&&""!==e)try{return new C(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=u(t[n]);if(i){var s=null===(r=i.query)||void 0===r?void 0:r.gd_sdk_referrer_url;if(s&&(s=decodeURIComponent(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){c("depth.error",e.message)}c("depth.value",e)}(),function(){var e=i,t=r.depth.value,n=s;if(c("top.domain.from","fallback"),e&&e.length>0)n=e[e.length-1],c("top.domain.from","origins");else if(0===t)n=s,c("top.domain.from","self-top");else if(1===t){var a=u(o);a&&(n=a.origin,c("top.domain.from","referrer"))}c("top.domain.value",n.replace(/^https?:\/\/(www\.)?(.*)$/i,"$2"))}(),function(){var e=l();if(e)if(P(e))c("partner.domain.value",e),c("partner.domain.from","partner-domain");else{var t=u(e,!1);if(t)c("partner.domain.value",t.origin.replace(/^https?:\/\/(www\.)?(.*)$/i,"$2")),c("partner.domain.from","partner-url");else c("partner.domain.value",r.top.domain.value),c("partner.domain.from","partner-fallback")}else c("partner.domain.value",r.top.domain.value),c("partner.domain.from","fallback")}(),e=l(),0===r.depth.value?(c("partner.url.value",a),c("partner.url.from","self-top")):e?P(e)?(c("partner.url.value",a),c("partner.url.from","partner-domain")):(c("partner.url.value",e),c("partner.url.from","partner-url")):(c("partner.url.value",o),c("partner.url.from","fallback"))}.bind(this)(),{get:d,print:function(e){console.log(d(e))}}}xy({target:"String",proto:!0,forced:!Ty("includes")},{includes:function(e){return!!~Cy(Ry(Sy(this)),Ry(Dy(e)),arguments.length>1?arguments[1]:void 0)}});var Oy="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||"undefined"!=typeof global&&global||{},Py="URLSearchParams"in Oy,By="Symbol"in Oy&&"iterator"in Symbol,Ly="FileReader"in Oy&&"Blob"in Oy&&function(){try{return new Blob,!0}catch(e){return!1}}(),Uy="FormData"in Oy,My="ArrayBuffer"in Oy;if(My)var Fy=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],jy=ArrayBuffer.isView||function(e){return e&&Fy.indexOf(Object.prototype.toString.call(e))>-1};function Ny(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 Gy(e){return"string"!=typeof e&&(e=String(e)),e}function qy(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return By&&(t[Symbol.iterator]=function(){return t}),t}function Hy(e){this.map={},e instanceof Hy?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){if(2!=e.length)throw new TypeError("Headers constructor: expected name/value pair to be length 2, found"+e.length);this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function Vy(e){if(!e._noBody)return e.bodyUsed?Promise.reject(new TypeError("Already read")):void(e.bodyUsed=!0)}function Qy(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function zy(e){var t=new FileReader,n=Qy(t);return t.readAsArrayBuffer(e),n}function Wy(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function Ky(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:Ly&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:Uy&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:Py&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():My&&Ly&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=Wy(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):My&&(ArrayBuffer.prototype.isPrototypeOf(e)||jy(e))?this._bodyArrayBuffer=Wy(e):this._bodyText=e=Object.prototype.toString.call(e):(this._noBody=!0,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&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},Ly&&(this.blob=function(){var e=Vy(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=Vy(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))}if(Ly)return this.blob().then(zy);throw new Error("could not read as ArrayBuffer")},this.text=function(){var e=Vy(this);if(e)return e;if(this._bodyBlob)return function(e){var t=new FileReader,n=Qy(t),r=/charset=([A-Za-z0-9_-]+)/.exec(e.type),i=r?r[1]:"utf-8";return t.readAsText(e,i),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)},Uy&&(this.formData=function(){return this.text().then(Zy)}),this.json=function(){return this.text().then(JSON.parse)},this}Hy.prototype.append=function(e,t){e=Ny(e),t=Gy(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},Hy.prototype.delete=function(e){delete this.map[Ny(e)]},Hy.prototype.get=function(e){return e=Ny(e),this.has(e)?this.map[e]:null},Hy.prototype.has=function(e){return this.map.hasOwnProperty(Ny(e))},Hy.prototype.set=function(e,t){this.map[Ny(e)]=Gy(t)},Hy.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},Hy.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),qy(e)},Hy.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),qy(e)},Hy.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),qy(e)},By&&(Hy.prototype[Symbol.iterator]=Hy.prototype.entries);var Yy=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function Jy(e,t){if(!(this instanceof Jy))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 Jy){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new Hy(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 Hy(t.headers)),this.method=function(e){var t=e.toUpperCase();return Yy.indexOf(t)>-1?t:e}(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal||function(){if("AbortController"in Oy)return(new AbortController).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 Zy(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 Xy(e,t){if(!(this instanceof Xy))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.status<200||this.status>599)throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");this.ok=this.status>=200&&this.status<300,this.statusText=void 0===t.statusText?"":""+t.statusText,this.headers=new Hy(t.headers),this.url=t.url||"",this._initBody(e)}Jy.prototype.clone=function(){return new Jy(this,{body:this._bodyInit})},Ky.call(Jy.prototype),Ky.call(Xy.prototype),Xy.prototype.clone=function(){return new Xy(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new Hy(this.headers),url:this.url})},Xy.error=function(){var e=new Xy(null,{status:200,statusText:""});return e.status=0,e.type="error",e};var $y=[301,302,303,307,308];Xy.redirect=function(e,t){if(-1===$y.indexOf(t))throw new RangeError("Invalid status code");return new Xy(null,{status:t,headers:{location:e}})};var ew,tw=Oy.DOMException;try{new tw}catch(e){tw=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},tw.prototype=Object.create(Error.prototype),tw.prototype.constructor=tw}function nw(e,t){return new Promise((function(n,r){var i=new Jy(e,t);if(i.signal&&i.signal.aborted)return r(new tw("Aborted","AbortError"));var a=new XMLHttpRequest;function s(){a.abort()}if(a.onload=function(){var e,t,r={statusText:a.statusText,headers:(e=a.getAllResponseHeaders()||"",t=new Hy,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();try{t.append(r,i)}catch(e){console.warn("Response "+e.message)}}})),t)};i.url.startsWith("file://")&&(a.status<200||a.status>599)?r.status=200:r.status=a.status,r.url="responseURL"in a?a.responseURL:r.headers.get("X-Request-URL");var s="response"in a?a.response:a.responseText;setTimeout((function(){n(new Xy(s,r))}),0)},a.onerror=function(){setTimeout((function(){r(new TypeError("Network request failed"))}),0)},a.ontimeout=function(){setTimeout((function(){r(new TypeError("Network request timed out"))}),0)},a.onabort=function(){setTimeout((function(){r(new tw("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&&(Ly?a.responseType="blob":My&&(a.responseType="arraybuffer")),t&&"object"==typeof t.headers&&!(t.headers instanceof Hy||Oy.Headers&&t.headers instanceof Oy.Headers)){var o=[];Object.getOwnPropertyNames(t.headers).forEach((function(e){o.push(Ny(e)),a.setRequestHeader(e,Gy(t.headers[e]))})),i.headers.forEach((function(e,t){-1===o.indexOf(t)&&a.setRequestHeader(t,e)}))}else i.headers.forEach((function(e,t){a.setRequestHeader(t,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)}))}nw.polyfill=!0,Oy.fetch||(Oy.fetch=nw,Oy.Headers=Hy,Oy.Request=Jy,Oy.Response=Xy);var rw=function(e){var n=this;if(!ew){var r={gameId:e.gameId,hours:(new Date).getHours(),topDomain:mb.topDomain,domain:mb.parentDomain,referrer:mb.parentURL,depth:o(),version:Is.version,byloader:mb.isTokenGameURL,isTokenGameURL:mb.isTokenGameURL,isMasterGameURL:mb.isMasterGameURL,isExtHostedGameURL:mb.isExtHostedGameURL,byloaderVersion:mb.version,tracking:Ab.userDeclinedTracking,whitelabel:Ab.whitelabelPartner,platform:u()};ew=new l(r)}return ew||{send:function(){t(this,n)}.bind(this)}},iw={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){}}},aw={prod:["html5.gamedistribution.com","revision.gamedistribution.com"],acc:["html5-acc-real-aws.gamedistribution.com","acceptance-revision.gamedistribution.com"]},sw={gameAPI:"game.api.gamedistribution.com"},ow={gameAPI:"game-api-acc-real-aws.gamedistribution.com"},dw=function(){var e=this,n=aw.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?ow:sw}},cw=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))};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 lw(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 hw,pw,fw,mw=new M,Aw=[],gw=function(e){Aw.push(e)},vw=function(e){hw=rw(fw=e)},bw=function(){var t=e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(pw){e.next=6;break}return e.next=3,ww(fw);case 3:pw=e.sent,mw.emit("game-data-ready",pw),_w();case 6:return e.abrupt("return",pw);case 7:case"end":return e.stop()}}),e)})));return function(){return t.apply(this,arguments)}}(),_w=function(){var t;if(null!==(t=pw)&&void 0!==t&&null!==(t=t.aws_tst)&&void 0!==t&&t.enabled){var n,i,a;if(yw(),null!==(n=pw)&&void 0!==n&&null!==(n=n.aws_tst)&&void 0!==n&&null!==(n=n.ep)&&void 0!==n&&n.api&&null!==(i=pw)&&void 0!==i&&i.url)iw.getGameData(null===(a=pw)||void 0===a?void 0:a.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,ww(fw);case 3:pw=e.sent,null===(t=pw)||void 0===t||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)}},yw=function(){var n=window.fetch;window.fetch=e(r.mark((function e(){var i,a,s,o,d,c,u,l,h,p,f,m,A,g=this,v=arguments;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(s=v.length,o=new Array(s),d=0;d<s;d++)o[d]=v[d];c=o[0],u=o[1],l=null===(i=pw)||void 0===i||null===(i=i.aws_tst)||void 0===i||null===(i=i.ep)||void 0===i?void 0:i.atm,h=null===(a=pw)||void 0===a||null===(a=a.aws_tst)||void 0===a||null===(a=a.ep)||void 0===a?void 0:a.msgrt,p=function(e,r){var i=this;t(this,g);var a=c.replace(e,r);n(a,u).then(function(){t(this,i)}.bind(this))}.bind(this);try{l&&c.indexOf("tag.atom")>0&&p("tag.atom.gamedistribution.com","atom-tag-prod-aws.gamedistribution.com"),h&&c.indexOf("msgrt.gamedistribution.com")>0&&(null===(f=pw)||void 0===f||f.aws_tst,null===(m=pw)||void 0===m||null===(m=m.aws_tst)||void 0===m||null===(m=m.ep)||void 0===m||m.msgrt,p("msgrt.gamedistribution.com","msgrt-prod-aws.gamedistribution.com"))}catch(e){}return e.next=9,n(c,u);case 9:return A=e.sent,e.abrupt("return",A);case 11:case"end":return e.stop()}}),e,this)})))},ww=function(n){var i=this;hw.send("gdfw.loading",{message:"loading"}),Aw=[],gw("1"),gw("2");var a=new Iy;gw("3");var s=a.get("partner.domain.value");gw("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:{}}}.bind(this);gw("5");var d=function(){t(this,i);var e=c(),r=e?"&mode=".concat(e):"",a=dw().config;return"https://".concat(a.gameAPI,"/game/v4/get/").concat(n.gameId.replace(/-/g,""),"/?domain=").concat(s).concat(r,"&v=").concat(Is.version,"&localTime=").concat((new Date).getHours())}.bind(this);gw("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);return gw("7"),new Promise(function(n){var a=this;t(this,i),gw("7.1");var s=o();try{gw("7.2");var c=d();gw("7.3"),fetch(c).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 gw("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),e.t0,e.next=12,cw({url:c});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(e){var r=this;if(t(this,a),gw("7.5"),e.success){var i,o,d=e.result.game;gw("7.6");var u={company:d.company,gameId:d.gameMd5,slug:d.slug,pname:d.pname,dname:d.dname,status:d.status,activeStatus:d.activeStatus,description:d.description,disableAds:d.enableAds,preroll:d.preRoll,midroll:6e4*d.timeAds,rewardedAds:d.rewardedAds,title:d.title,publishedAt:d.publishedAt,tags:d.tags,category:d.category,assets:d.assets,disp_2nd_prer:d.disp_2nd_prer,ctry_vst:d.ctry_vst,ctry:d.ctry,crtv:d.crtv,dmain:d.dmain,aws_tst:d.aws_tst,meta:d.meta,adspn:Os(d.adspn)||{},__t4r:Os(d.__t4r)||{},block_exts:Os(d.push_cuda),bloc_gard:Os(d.bloc_gard),cookie:Os(d.cookie),gdpr:Os(d.gdpr),diagnostic:Os(d.diagnostic),cmp:Os(d.cmp),gft:Os(d.gft)||{},sdk:Os(d.sdk)||{},sdkfw:Os(d.sdkfw)||{},loader:Os(d.loader)||{},splash:Os(d.splash)||{},promo:Os(d.promo)||{},dAds:Os(d.dads)||{},pAds:Os(d.pads)||{},mAds:Os(d.mads)||{},rAds:Os(d.rads)||{},lp:Os(d.lp)||{},extsc:Os(d.extsc)||{},evnts:Os(d.evnts)||{},dp:Os(d.dp)||{},adflw:Os(d.adflw)||{},afgszf:Os(d.afgszf)||{},fllc:Os(d.fllc)||{},lotm:Os(d.lotm)||{},t4rc:Os(d.t4rc)||{},midroll_plus:Os(d.midroll_plus)||{},gmky:Os(d.gmky)||{},urlBlockExc:Os(d.url_blck_exc)||{},sdk_wrp:Os(d.sdk_wrp)||{},dbglg:Os(d.dbglg)||{},extHosting:Os(d.ext_hosting)||{},directTokenUse:Os(d.dtu)||{},aeria:Os(d.aeria)||{},advlm:Os(d.advlm)||{},ad_blcks:Os(d.ad_blcks)||{},rmblck:Os(d.rmblck)||{},gs_trc:Os(d.gs_trc)||{},rwskp:Os(d.rwskp)||{}};gw("7.7");var l=h(U(s),u);gw("7.8"),l.afg_disabled=!1===(null===(i=l.sdk)||void 0===i||null===(i=i.afg)||void 0===i?void 0:i.enabled),l.url=c,function(){t(this,r),void 0!==Us.afgEnabled&&(l.afg_disabled=!Us.afgEnabled),void 0!==Us.promoEnabled&&(l.promo=l.promo||{},l.promo=lw(lw({},l.promo),{},{rainbow:{enabled:Us.promoEnabled}}))}.bind(this),gw("7.9"),null!==(o=l.pAds)&&void 0!==o&&o.enabled&&(l.preroll=!0),gw("7.10"),hw.send("gdfw.success",{message:"success"}),n(l)}else{s.failed=!0;var p=Aw[Aw.length-1];hw.send("gdfw.err",{message:"".concat(p,": json error")}),n(s)}}.bind(this)).catch(function(e){t(this,a);var r=Aw[Aw.length-1];hw.send("gdfw.err",{message:"".concat(r,": ").concat(e.message?e.message:e)}),s.failed=!0,n(s)}.bind(this))}catch(e){var u=Aw[Aw.length-1];hw.send("gdfw.err",{message:"".concat(u,": global ").concat(e.message?e.message:e)}),s.failed=!0,n(s)}}.bind(this))},kw=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,bw();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)}}(),Ew=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,bw();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)}}(),xw=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,bw();case 2:return n=e.sent,e.next=5,kw();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)}}(),Dw=function(){var t=e(r.mark((function e(){var t,n,i,a,s,o,d,c;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,bw();case 2:return d=e.sent,c=!(null==d||null===(t=d.extsc)||void 0===t||!t.enabled),e.abrupt("return",{enabled:c,path:c?null==d||null===(n=d.extsc)||void 0===n?void 0:n.path:"",name:c?null==d||null===(i=d.extsc)||void 0===i?void 0:i.name:"",ref:c?null==d||null===(a=d.extsc)||void 0===a?void 0:a.ref:"",loadedFlag:c?null==d||null===(s=d.extsc)||void 0===s?void 0:s.loadedFlag:void 0,loadedFlagCheck:!!c&&!(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)}}(),Sw=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,Dw();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,f(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),p("DEVELOPER_ERROR",e.t0,"warning");case 16:case"end":return e.stop()}}),e,this,[[6,12]])})));return function(){return n.apply(this,arguments)}}(),Rw=!1,Tw=!1,Cw=function(){return new Promise(function(){var n=e(r.mark((function e(n,i){var a,s,o,d,c,u=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!Rw){e.next=4;break}return e.abrupt("return",n(Tw));case 4:Rw=!0;case 5:return e.next=7,Dw();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 Tw=!0,e.abrupt("return",n(!0));case 16:d=!0,setTimeout(function(){t(this,u),d&&(d=!1,Rw=!0,n(!1))}.bind(this),5e3),c=setInterval(function(){t(this,u),d&&o&&window[s]?(d=!1,Rw=!0,Tw=!0,clearInterval(c),n(!0)):d||clearInterval(c)}.bind(this),100);case 19:case"end":return e.stop()}}),e,this)})));return function(e,t){return n.apply(this,arguments)}}())},Iw=$a,Ow=zm,Pw=ie,Bw=wt,Lw=et,Uw=Gf,Mw=Kg,Fw=gr,jw=Ow&&Ow.prototype;if(Iw({target:"Promise",proto:!0,real:!0,forced:!!Ow&&Pw((function(){jw.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=Uw(this,Bw("Promise")),n=Lw(e);return this.then(n?function(n){return Mw(t,e()).then((function(){return n}))}:e,n?function(n){return Mw(t,e()).then((function(){throw n}))}:e)}}),Lw(Ow)){var Nw=Bw("Promise").prototype.finally;jw.finally!==Nw&&Fw(jw,"finally",Nw,{unsafe:!0})}var Gw="\t\n\v\f\r                 \u2028\u2029\ufeff",qw=fe,Hw=js,Vw=Gw,Qw=ue("".replace),zw=RegExp("^["+Vw+"]+"),Ww=RegExp("(^|[^"+Vw+"])["+Vw+"]+$"),Kw=function(e){return function(t){var n=Hw(qw(t));return 1&e&&(n=Qw(n,zw,"")),2&e&&(n=Qw(n,Ww,"$1")),n}},Yw={start:Kw(1),end:Kw(2),trim:Kw(3)},Jw=An.PROPER,Zw=ie,Xw=Gw,$w=Yw.trim;$a({target:"String",proto:!0,forced:function(e){return Zw((function(){return!!Xw[e]()||"​…᠎"!=="​…᠎"[e]()||Jw&&Xw[e].name!==e}))}("trim")},{trim:function(){return $w(this)}});var ek=$a,tk=Oi.find,nk=Jp,rk="find",ik=!0;rk in[]&&Array(1)[rk]((function(){ik=!1})),ek({target:"Array",proto:!0,forced:ik},{find:function(e){return tk(this,e,arguments.length>1?arguments[1]:void 0)}}),nk(rk);var ak=et,sk=at,ok=vh,dk=tt.f,ck=nt,uk=W,lk=ue,hk=Qa,pk=function(e,t,n){var r,i;return ok&&ak(r=t.constructor)&&r!==n&&sk(i=r.prototype)&&i!==n.prototype&&ok(e,i),e},fk=Cn,mk=lo,Ak=sa.f,gk=kt,vk=yv,bk=js,_k=Ru,yk=Xh,wk=function(e,t,n){n in e||dk(e,n,{configurable:!0,get:function(){return t[n]},set:function(e){t[n]=e}})},kk=gr,Ek=ie,xk=_e,Dk=Yn.enforce,Sk=Cf,Rk=tp,Tk=ip,Ck=Ke("match"),Ik=uk.RegExp,Ok=Ik.prototype,Pk=uk.SyntaxError,Bk=lk(Ok.exec),Lk=lk("".charAt),Uk=lk("".replace),Mk=lk("".indexOf),Fk=lk("".slice),jk=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,Nk=/a/g,Gk=/a/g,qk=new Ik(Nk)!==Nk,Hk=yk.MISSED_STICKY,Vk=yk.UNSUPPORTED_Y,Qk=ck&&(!qk||Hk||Rk||Tk||Ek((function(){return Gk[Ck]=!1,Ik(Nk)!==Nk||Ik(Gk)===Gk||"/a/i"!==String(Ik(Nk,"i"))})));if(hk("RegExp",Qk)){for(var zk=function(e,t){var n,r,i,a,s,o,d=gk(Ok,this),c=vk(e),u=void 0===t,l=[],h=e;if(!d&&c&&u&&e.constructor===zk)return e;if((c||gk(Ok,e))&&(e=e.source,u&&(t=_k(h))),e=void 0===e?"":bk(e),t=void 0===t?"":bk(t),h=e,Rk&&"dotAll"in Nk&&(r=!!t&&Mk(t,"s")>-1)&&(t=Uk(t,/s/g,"")),n=t,Hk&&"sticky"in Nk&&(i=!!t&&Mk(t,"y")>-1)&&Vk&&(t=Uk(t,/y/g,"")),Tk&&(a=function(e){for(var t,n=e.length,r=0,i="",a=[],s=mk(null),o=!1,d=!1,c=0,u="";r<=n;r++){if("\\"===(t=Lk(e,r)))t+=Lk(e,++r);else if("]"===t)o=!1;else if(!o)switch(!0){case"["===t:o=!0;break;case"("===t:Bk(jk,Fk(e,r+1))&&(r+=2,d=!0),i+=t,c++;continue;case">"===t&&d:if(""===u||xk(s,u))throw new Pk("Invalid capture group name");s[u]=!0,a[a.length]=[u,c],d=!1,u="";continue}d?u+=t:i+=t}return[i,a]}(e),e=a[0],l=a[1]),s=pk(Ik(e,t),d?this:Ok,zk),(r||i||l.length)&&(o=Dk(s),r&&(o.dotAll=!0,o.raw=zk(function(e){for(var t,n=e.length,r=0,i="",a=!1;r<=n;r++)"\\"!==(t=Lk(e,r))?a||"."!==t?("["===t?a=!0:"]"===t&&(a=!1),i+=t):i+="[\\s\\S]":i+=t+Lk(e,++r);return i}(e),n)),i&&(o.sticky=!0),l.length&&(o.groups=l)),e!==h)try{fk(s,"source",""===h?"(?:)":h)}catch(e){}return s},Wk=Ak(Ik),Kk=0;Wk.length>Kk;)wk(zk,Ik,Wk[Kk++]);Ok.constructor=zk,zk.prototype=Ok,kk(uk,"RegExp",zk,{constructor:!0})}Sk("RegExp");var Yk=$a,Jk=zr,Zk=Ji,Xk=Bi,$k=ue([].join);Yk({target:"Array",proto:!0,forced:Jk!==Object||!Xk("join",",")},{join:function(e){return $k(Zk(this),void 0===e?",":e)}});var eE=Oi.map;$a({target:"Array",proto:!0,forced:!ps("map")},{map:function(e){return eE(this,e,arguments.length>1?arguments[1]:void 0)}});var tE=nt,nE=ue,rE=bt,iE=ie,aE=ns,sE=xa,oE=Vi,dE=ge,cE=zr,uE=Object.assign,lE=Object.defineProperty,hE=nE([].concat),pE=!uE||iE((function(){if(tE&&1!==uE({b:1},uE(lE({},"a",{enumerable:!0,get:function(){lE(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol("assign detection"),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach((function(e){t[e]=e})),7!==uE({},e)[n]||aE(uE({},t)).join("")!==r}))?function(e,t){for(var n=dE(e),r=arguments.length,i=1,a=sE.f,s=oE.f;r>i;)for(var o,d=cE(arguments[i++]),c=a?hE(aE(d),a(d)):aE(d),u=c.length,l=0;u>l;)o=c[l++],tE&&!rE(s,d,o)||(n[o]=d[o]);return n}:uE,fE=pE;$a({target:"Object",stat:!0,arity:2,forced:Object.assign!==fE},{assign:fE});var mE,AE=ue,gE=2147483647,vE=/[^\0-\u007E]/,bE=/[.\u3002\uFF0E\uFF61]/g,_E="Overflow: input needs wider integers to process",yE=RangeError,wE=AE(bE.exec),kE=Math.floor,EE=String.fromCharCode,xE=AE("".charCodeAt),DE=AE([].join),SE=AE([].push),RE=AE("".replace),TE=AE("".split),CE=AE("".toLowerCase),IE=function(e){return e+22+75*(e<26)},OE=function(e,t,n){var r=0;for(e=n?kE(e/700):e>>1,e+=kE(e/t);e>455;)e=kE(e/35),r+=36;return kE(r+36*e/(e+38))},PE=function(e){var t=[];e=function(e){for(var t=[],n=0,r=e.length;n<r;){var i=xE(e,n++);if(i>=55296&&i<=56319&&n<r){var a=xE(e,n++);56320==(64512&a)?SE(t,((1023&i)<<10)+(1023&a)+65536):(SE(t,i),n--)}else SE(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&&SE(t,EE(r));var d=t.length,c=d;for(d&&SE(t,"-");c<i;){var u=gE;for(n=0;n<e.length;n++)(r=e[n])>=a&&r<u&&(u=r);var l=c+1;if(u-a>kE((gE-s)/l))throw new yE(_E);for(s+=(u-a)*l,a=u,n=0;n<e.length;n++){if((r=e[n])<a&&++s>gE)throw new yE(_E);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,A=36-f;SE(t,EE(IE(f+m%A))),h=kE(m/A),p+=36}SE(t,EE(IE(h))),o=OE(s,l,c===d),s=0,c++}}s++,a++}return DE(t,"")},BE=$a,LE=nt,UE=e_,ME=W,FE=Gr,jE=ue,NE=gr,GE=Do,qE=Pf,HE=_e,VE=pE,QE=_l,zE=vo,WE=Fl.codeAt,KE=function(e){var t,n,r=[],i=TE(RE(CE(e),bE,"."),".");for(t=0;t<i.length;t++)n=i[t],SE(r,wE(vE,n)?"xn--"+PE(n):n);return DE(r,".")},YE=js,JE=Go,ZE=Hf,XE=wy,$E=Yn,ex=$E.set,tx=$E.getterFor("URL"),nx=XE.URLSearchParams,rx=XE.getState,ix=ME.URL,ax=ME.TypeError,sx=ME.parseInt,ox=Math.floor,dx=Math.pow,cx=jE("".charAt),ux=jE(/./.exec),lx=jE([].join),hx=jE(1..toString),px=jE([].pop),fx=jE([].push),mx=jE("".replace),Ax=jE([].shift),gx=jE("".split),vx=jE("".slice),bx=jE("".toLowerCase),_x=jE([].unshift),yx="Invalid scheme",wx="Invalid host",kx="Invalid port",Ex=/[a-z]/i,xx=/[\d+-.a-z]/i,Dx=/\d/,Sx=/^0x/i,Rx=/^[0-7]+$/,Tx=/^\d+$/,Cx=/^[\da-f]+$/i,Ix=/[\0\t\n\r #%/:<>?@[\\\]^|]/,Ox=/[\0\t\n\r #/:<>?@[\\\]^|]/,Px=/^[\u0000-\u0020]+/,Bx=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,Lx=/[\t\n\r]/g,Ux=function(e){var t,n,r,i;if("number"==typeof e){for(t=[],n=0;n<4;n++)_x(t,e%256),e=ox(e/256);return lx(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+=hx(e[n],16),n<7&&(t+=":")));return"["+t+"]"}return e},Mx={},Fx=VE({},Mx,{" ":1,'"':1,"<":1,">":1,"`":1}),jx=VE({},Fx,{"#":1,"?":1,"{":1,"}":1}),Nx=VE({},jx,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),Gx=function(e,t){var n=WE(e,0);return n>32&&n<127&&!HE(t,e)?e:encodeURIComponent(e)},qx={ftp:21,file:null,http:80,https:443,ws:80,wss:443},Hx=function(e,t){var n;return 2===e.length&&ux(Ex,cx(e,0))&&(":"===(n=cx(e,1))||!t&&"|"===n)},Vx=function(e){var t;return e.length>1&&Hx(vx(e,0,2))&&(2===e.length||"/"===(t=cx(e,2))||"\\"===t||"?"===t||"#"===t)},Qx=function(e){return"."===e||"%2e"===bx(e)},zx={},Wx={},Kx={},Yx={},Jx={},Zx={},Xx={},$x={},eD={},tD={},nD={},rD={},iD={},aD={},sD={},oD={},dD={},cD={},uD={},lD={},hD={},pD=function(e,t,n){var r,i,a,s=YE(e);if(t){if(i=this.parse(s))throw new ax(i);this.searchParams=null}else{if(void 0!==n&&(r=new pD(n,!0)),i=this.parse(s,null,r))throw new ax(i);(a=rx(new nx)).bindURL(this),this.searchParams=a}};pD.prototype={type:"URL",parse:function(e,t,n){var r,i,a,s,o,d=this,c=t||zx,u=0,l="",h=!1,p=!1,f=!1;for(e=YE(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=mx(e,Px,""),e=mx(e,Bx,"$1")),e=mx(e,Lx,""),r=QE(e);u<=r.length;){switch(i=r[u],c){case zx:if(!i||!ux(Ex,i)){if(t)return yx;c=Kx;continue}l+=bx(i),c=Wx;break;case Wx:if(i&&(ux(xx,i)||"+"===i||"-"===i||"."===i))l+=bx(i);else{if(":"!==i){if(t)return yx;l="",c=Kx,u=0;continue}if(t&&(d.isSpecial()!==HE(qx,l)||"file"===l&&(d.includesCredentials()||null!==d.port)||"file"===d.scheme&&!d.host))return;if(d.scheme=l,t)return void(d.isSpecial()&&qx[d.scheme]===d.port&&(d.port=null));l="","file"===d.scheme?c=aD:d.isSpecial()&&n&&n.scheme===d.scheme?c=Yx:d.isSpecial()?c=$x:"/"===r[u+1]?(c=Jx,u++):(d.cannotBeABaseURL=!0,fx(d.path,""),c=uD)}break;case Kx:if(!n||n.cannotBeABaseURL&&"#"!==i)return yx;if(n.cannotBeABaseURL&&"#"===i){d.scheme=n.scheme,d.path=zE(n.path),d.query=n.query,d.fragment="",d.cannotBeABaseURL=!0,c=hD;break}c="file"===n.scheme?aD:Zx;continue;case Yx:if("/"!==i||"/"!==r[u+1]){c=Zx;continue}c=eD,u++;break;case Jx:if("/"===i){c=tD;break}c=cD;continue;case Zx:if(d.scheme=n.scheme,i===mE)d.username=n.username,d.password=n.password,d.host=n.host,d.port=n.port,d.path=zE(n.path),d.query=n.query;else if("/"===i||"\\"===i&&d.isSpecial())c=Xx;else if("?"===i)d.username=n.username,d.password=n.password,d.host=n.host,d.port=n.port,d.path=zE(n.path),d.query="",c=lD;else{if("#"!==i){d.username=n.username,d.password=n.password,d.host=n.host,d.port=n.port,d.path=zE(n.path),d.path.length--,c=cD;continue}d.username=n.username,d.password=n.password,d.host=n.host,d.port=n.port,d.path=zE(n.path),d.query=n.query,d.fragment="",c=hD}break;case Xx:if(!d.isSpecial()||"/"!==i&&"\\"!==i){if("/"!==i){d.username=n.username,d.password=n.password,d.host=n.host,d.port=n.port,c=cD;continue}c=tD}else c=eD;break;case $x:if(c=eD,"/"!==i||"/"!==cx(l,u+1))continue;u++;break;case eD:if("/"!==i&&"\\"!==i){c=tD;continue}break;case tD:if("@"===i){h&&(l="%40"+l),h=!0,a=QE(l);for(var m=0;m<a.length;m++){var A=a[m];if(":"!==A||f){var g=Gx(A,Nx);f?d.password+=g:d.username+=g}else f=!0}l=""}else if(i===mE||"/"===i||"?"===i||"#"===i||"\\"===i&&d.isSpecial()){if(h&&""===l)return"Invalid authority";u-=QE(l).length+1,l="",c=nD}else l+=i;break;case nD:case rD:if(t&&"file"===d.scheme){c=oD;continue}if(":"!==i||p){if(i===mE||"/"===i||"?"===i||"#"===i||"\\"===i&&d.isSpecial()){if(d.isSpecial()&&""===l)return wx;if(t&&""===l&&(d.includesCredentials()||null!==d.port))return;if(s=d.parseHost(l))return s;if(l="",c=dD,t)return;continue}"["===i?p=!0:"]"===i&&(p=!1),l+=i}else{if(""===l)return wx;if(s=d.parseHost(l))return s;if(l="",c=iD,t===rD)return}break;case iD:if(!ux(Dx,i)){if(i===mE||"/"===i||"?"===i||"#"===i||"\\"===i&&d.isSpecial()||t){if(""!==l){var v=sx(l,10);if(v>65535)return kx;d.port=d.isSpecial()&&v===qx[d.scheme]?null:v,l=""}if(t)return;c=dD;continue}return kx}l+=i;break;case aD:if(d.scheme="file","/"===i||"\\"===i)c=sD;else{if(!n||"file"!==n.scheme){c=cD;continue}switch(i){case mE:d.host=n.host,d.path=zE(n.path),d.query=n.query;break;case"?":d.host=n.host,d.path=zE(n.path),d.query="",c=lD;break;case"#":d.host=n.host,d.path=zE(n.path),d.query=n.query,d.fragment="",c=hD;break;default:Vx(lx(zE(r,u),""))||(d.host=n.host,d.path=zE(n.path),d.shortenPath()),c=cD;continue}}break;case sD:if("/"===i||"\\"===i){c=oD;break}n&&"file"===n.scheme&&!Vx(lx(zE(r,u),""))&&(Hx(n.path[0],!0)?fx(d.path,n.path[0]):d.host=n.host),c=cD;continue;case oD:if(i===mE||"/"===i||"\\"===i||"?"===i||"#"===i){if(!t&&Hx(l))c=cD;else if(""===l){if(d.host="",t)return;c=dD}else{if(s=d.parseHost(l))return s;if("localhost"===d.host&&(d.host=""),t)return;l="",c=dD}continue}l+=i;break;case dD:if(d.isSpecial()){if(c=cD,"/"!==i&&"\\"!==i)continue}else if(t||"?"!==i)if(t||"#"!==i){if(i!==mE&&(c=cD,"/"!==i))continue}else d.fragment="",c=hD;else d.query="",c=lD;break;case cD:if(i===mE||"/"===i||"\\"===i&&d.isSpecial()||!t&&("?"===i||"#"===i)){if(".."===(o=bx(o=l))||"%2e."===o||".%2e"===o||"%2e%2e"===o?(d.shortenPath(),"/"===i||"\\"===i&&d.isSpecial()||fx(d.path,"")):Qx(l)?"/"===i||"\\"===i&&d.isSpecial()||fx(d.path,""):("file"===d.scheme&&!d.path.length&&Hx(l)&&(d.host&&(d.host=""),l=cx(l,0)+":"),fx(d.path,l)),l="","file"===d.scheme&&(i===mE||"?"===i||"#"===i))for(;d.path.length>1&&""===d.path[0];)Ax(d.path);"?"===i?(d.query="",c=lD):"#"===i&&(d.fragment="",c=hD)}else l+=Gx(i,jx);break;case uD:"?"===i?(d.query="",c=lD):"#"===i?(d.fragment="",c=hD):i!==mE&&(d.path[0]+=Gx(i,Mx));break;case lD:t||"#"!==i?i!==mE&&("'"===i&&d.isSpecial()?d.query+="%27":d.query+="#"===i?"%23":Gx(i,Mx)):(d.fragment="",c=hD);break;case hD:i!==mE&&(d.fragment+=Gx(i,Fx))}u++}},parseHost:function(e){var t,n,r;if("["===cx(e,0)){if("]"!==cx(e,e.length-1))return wx;if(t=function(e){var t,n,r,i,a,s,o,d=[0,0,0,0,0,0,0,0],c=0,u=null,l=0,h=function(){return cx(e,l)};if(":"===h()){if(":"!==cx(e,1))return;l+=2,u=++c}for(;h();){if(8===c)return;if(":"!==h()){for(t=n=0;n<4&&ux(Cx,h());)t=16*t+sx(h(),16),l++,n++;if("."===h()){if(0===n)return;if(l-=n,c>6)return;for(r=0;h();){if(i=null,r>0){if(!("."===h()&&r<4))return;l++}if(!ux(Dx,h()))return;for(;ux(Dx,h());){if(a=sx(h(),10),null===i)i=a;else{if(0===i)return;i=10*i+a}if(i>255)return;l++}d[c]=256*d[c]+i,2!=++r&&4!==r||c++}if(4!==r)return;break}if(":"===h()){if(l++,!h())return}else if(h())return;d[c++]=t}else{if(null!==u)return;l++,u=++c}}if(null!==u)for(s=c-u,c=7;0!==c&&s>0;)o=d[c],d[c--]=d[u+s-1],d[u+--s]=o;else if(8!==c)return;return d}(vx(e,1,-1)),!t)return wx;this.host=t}else if(this.isSpecial()){if(e=KE(e),ux(Ix,e))return wx;if(t=function(e){var t,n,r,i,a,s,o,d=gx(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"===cx(i,0)&&(a=ux(Sx,i)?16:8,i=vx(i,8===a?1:2)),""===i)s=0;else{if(!ux(10===a?Tx:8===a?Rx:Cx,i))return e;s=sx(i,a)}fx(n,s)}for(r=0;r<t;r++)if(s=n[r],r===t-1){if(s>=dx(256,5-t))return null}else if(s>255)return null;for(o=px(n),r=0;r<n.length;r++)o+=n[r]*dx(256,3-r);return o}(e),null===t)return wx;this.host=t}else{if(ux(Ox,e))return wx;for(t="",n=QE(e),r=0;r<n.length;r++)t+=Gx(n[r],Mx);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"===this.scheme},includesCredentials:function(){return""!==this.username||""!==this.password},isSpecial:function(){return HE(qx,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"===this.scheme&&1===t&&Hx(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,c=t+":";return null!==i?(c+="//",e.includesCredentials()&&(c+=n+(r?":"+r:"")+"@"),c+=Ux(i),null!==a&&(c+=":"+a)):"file"===t&&(c+="//"),c+=e.cannotBeABaseURL?s[0]:s.length?"/"+lx(s,"/"):"",null!==o&&(c+="?"+o),null!==d&&(c+="#"+d),c},setHref:function(e){var t=this.parse(e);if(t)throw new ax(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"===e)try{return new fD(e.path[0]).origin}catch(e){return"null"}return"file"!==e&&this.isSpecial()?e+"://"+Ux(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(YE(e)+":",zx)},getUsername:function(){return this.username},setUsername:function(e){var t=QE(YE(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var n=0;n<t.length;n++)this.username+=Gx(t[n],Nx)}},getPassword:function(){return this.password},setPassword:function(e){var t=QE(YE(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var n=0;n<t.length;n++)this.password+=Gx(t[n],Nx)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?Ux(e):Ux(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,nD)},getHostname:function(){var e=this.host;return null===e?"":Ux(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,rD)},getPort:function(){var e=this.port;return null===e?"":YE(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""===(e=YE(e))?this.port=null:this.parse(e,iD))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+lx(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,dD))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""===(e=YE(e))?this.query=null:("?"===cx(e,0)&&(e=vx(e,1)),this.query="",this.parse(e,lD)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!==(e=YE(e))?("#"===cx(e,0)&&(e=vx(e,1)),this.fragment="",this.parse(e,hD)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var fD=function(e){var t=qE(this,mD),n=ZE(arguments.length,1)>1?arguments[1]:void 0,r=ex(t,new pD(e,!1,n));LE||(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())},mD=fD.prototype,AD=function(e,t){return{get:function(){return tx(this)[e]()},set:t&&function(e){return tx(this)[t](e)},configurable:!0,enumerable:!0}};if(LE&&(GE(mD,"href",AD("serialize","setHref")),GE(mD,"origin",AD("getOrigin")),GE(mD,"protocol",AD("getProtocol","setProtocol")),GE(mD,"username",AD("getUsername","setUsername")),GE(mD,"password",AD("getPassword","setPassword")),GE(mD,"host",AD("getHost","setHost")),GE(mD,"hostname",AD("getHostname","setHostname")),GE(mD,"port",AD("getPort","setPort")),GE(mD,"pathname",AD("getPathname","setPathname")),GE(mD,"search",AD("getSearch","setSearch")),GE(mD,"searchParams",AD("getSearchParams")),GE(mD,"hash",AD("getHash","setHash"))),NE(mD,"toJSON",(function(){return tx(this).serialize()}),{enumerable:!0}),NE(mD,"toString",(function(){return tx(this).serialize()}),{enumerable:!0}),ix){var gD=ix.createObjectURL,vD=ix.revokeObjectURL;gD&&NE(fD,"createObjectURL",FE(gD,ix)),vD&&NE(fD,"revokeObjectURL",FE(vD,ix))}JE(fD,"URL"),BE({global:!0,constructor:!0,forced:!UE,sham:!LE},{URL:fD});var bD=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 C(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}(),_D=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}(),yD=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}(),wD=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}(),kD=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}(),ED=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}(),xD=function(e){if(!e)return!1;var t=DD.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)},DD=Object.prototype.toString;function SD(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 RD(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?SD(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):SD(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function TD(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 CD,ID="13998",OD="_cc".concat(ID),PD=["https://tags.crwdcntrl.net/c/".concat(ID,"/cc.js?ns=").concat(OD)],BD=function(){return!!CD&&"function"==typeof CD.bcpf&&"function"==typeof CD.add},LD=function(e,t){try{if(!BD())return;CD.add(e,t),"lotame add success ".concat(e," ").concat(t)}catch(e){err}},UD=function(e,t){try{if(!BD())return;CD.bcpw(e,t),"lotame send success ".concat(e," ").concat(t)}catch(e){}},MD=function(e){var n=this;try{LD("act","play"),LD("med","game"),"complete"===document.readyState?CD.bcpf():CD.bcp(),e.tags.forEach(function(e){t(this,n),UD("int","tags : ".concat(e.title.toLowerCase()))}.bind(this)),UD("int","category : ".concat(e.category.toLowerCase()))}catch(e){}},FD=function(){window.addEventListener("load",(function(){mw.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!=mb&&mb.noLotamePageView,!e.t0){e.next=7;break}return e.next=6,kw();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,f(PD[0],"LOTCC_".concat(ID),{alternates:PD});case 16:"object"===n(window[OD])&&(CD=window[OD]),BD()&&MD(t),e.next=23;break;case 20:e.prev=20,e.t1=e.catch(1),e.t1;case 23:case"end":return e.stop()}}),e,null,[[1,20]])})));return function(e){return t.apply(this,arguments)}}())}))},jD=function(){UD("genp","ad video"),UD("act","ad impression")},ND=function(){UD("act","ad skipped")},GD=function(){UD("act","ad click")},qD=function(){UD("act","ad complete")},HD=new Iy,VD={preroll:"game-start-video",midroll:"mid-level-video",rewarded:"rewarded-video"},QD=function(e,n){var r=this,i=function(e,t){var n=HD.get("partner.url.value"),r=VD[t],i="".concat("web.latimes/games-puzzles-crossword","/").concat(e,"/").concat(r);return{env:"vp",iu:"/".concat("21787098806","/").concat(i),description_url:n,tfcd:0,npa:0,sz:"400x300|480x360|480x361|640x360|640x480",gdfp_req:1,output:"vast",unviewed_position_start:1,impl:"s",correlator:"".concat(Date.now())}}(e,n),a=Object.keys(i).map(function(e){return t(this,r),"".concat(e,"=").concat(i[e])}.bind(this)).join("&");return"".concat("https://pubads.g.doubleclick.net/gampad/ads","?").concat(a)},zD=(new Iy).get("partner.domain.value"),WD=["latimes.com"],KD={exist:function(e){var n=this;return"Softgames-Azerion"===e.dname&&WD.some(function(e){return t(this,n),e===zD}.bind(this))},get:function(e,t){return function(e,t){return{"latimes.com":function(){var n=t.slug;return QD(n,e)}}[zD](e)}(e,t)}},YD=function(){var e=(new Iy).get("partner.url.value"),t=new C(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},JD=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 ZD(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 XD(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ZD(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ZD(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var $D=new M,eS=null,tS=function(){function n(e,r,i){var a=this;if(R(this,n),eS)return eS;eS=this;var s={debug:!1,width:640,height:360,locale:"en"};this.options=r?h(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.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.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")}var i,a,s,o,d,c,u,l,p,w,k,E,x,D,O,P,B,L,M,q,H,V,Q,z,W,K;return S(n,[{key:"start",value:(K=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),Ls("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 K.apply(this,arguments)})},{key:"adSystemInitialize",value:(W=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 W.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:(z=e(r.mark((function e(t){var n,i,a,s,o,d,c,u,l,h,p;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.adType,i=t.options,e.prev=1,s=null===(a=this.gameData.adflw)||void 0===a||null===(a=a.adapterConfig)||void 0===a?void 0:a.spil,o=this.nextAdPosition(n),e.next=6,this._create_dp_context(o,i);case 6:return d=e.sent,s?(this.gameData,c=s[o]||s.default||this._getDefaultSpilAdapterConfig()):c=this._getDefaultSpilAdapterConfig(),u=100*d.floor_price,d.floor_price,l=this._createCustomAdVastUrl(c,{tnl_keys:{floor_price:u}}),h=l.url,p={url:h,dp:d,hl:{bidFloorApplied:!0}},e.abrupt("return",p);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 z.apply(this,arguments)})},{key:"_getAdVast",value:function(n,i){var a=this;return new Promise(function(){var s=e(r.mark((function e(s){var o,d,c,u,l,h,p,f,A=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(m.available&&m.getBoolean("gd_debug_ex")&&m.getBoolean("gd_tag")||YD().useTestAds)){e.next=6;break}return o=a.IMASampleTags[n],d=Math.floor(Math.random()*o.length),c=o[d],s({url:c,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,u=a.nextAdPosition(n),null!=i&&i.adTypeFound&&(u=null==i?void 0:i.adTypeFound),a._broadcast("AD_REQUEST",{message:u}),l=a.options,"preroll"===u&&j(l.preroll)?l=l.preroll:"midroll"===u&&j(l.midroll)?l=l.midroll:"rewarded"===u&&j(l.rewarded)&&(l=l.rewarded),h="","audio"===i.adapter||"audio"===i.giftType?(a.isAudioAd=!0,h="midrollaudio"):(a.isAudioAd=!1,h="rewarded"===u?"rewardedVideo":"gdbanner"===u?"gd__banner":"midroll"===u?"midroll":"video1"),e.next=20,window.idhb.isLoaded();case 20:return e.next=22,a._create_dp_context(u,i);case 22:p=e.sent,Bs("gd-adflow, before idhb",u,h),f=window.idhb.getAdserverTargetingForAdSlot(h),window.idhb.setAdserverTargeting(XD(XD({},f),{},{adaptor_order:i.adapterIndex})),window.idhb.getAdserverTargetingForAdSlot(h),window.idhb.requestAds({slots:T({},h,{bidFloor:(null==p?void 0:p.floor_price)||void 0}),callback:function(e,n){var r=this;t(this,A),!p||null!=n&&n.bidFloorApplied||fetch(p.skip_url).catch(function(e){t(this,r)}.bind(this));var i={src:"hl",tnl_keys:XD(XD({},window.idhb.getAdserverTargetingForAdSlot(h)),{},{tnl_ad_pos:u,tnl_asset_id:a.gameData.gameId}),url:e,dp:p,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===A.Rewarded)return this.adRewardedCount++,"rewarded";if(e===A.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===A.Rewarded?"rewarded":e===A.Interstitial?!1===this.gameData.preroll||1===this.adPrerollCount||this.adMidrollCount>0?"midroll":"preroll":"midroll"}},{key:"getCurrentAdPosition",value:function(e){return e===A.Interstitial?1===this.adPrerollCount&&0===this.adMidrollCount?"preroll":"midroll":e===A.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 c=new google.ima.AdsRequest,u=this._transformVast(e,n),l=XD(XD({},n),{},{adTag:u,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&&!u.bidder&&(h.adtag_url=u.url);var f=this._isVMAP(d);(function(){t(this,a),n.shouldFail&&(h?(h.adtag_url="dp_original_broken",h.fallback_url="dp_fallback_broken"):u.url="original_broken",null==h||h.adtag_url,null==h||h.fallback_url,u.url)}).bind(this);var m=this._getExternalVast(null===(o=n)||void 0===o?void 0:o.adType);if(m)c.adTagUrl=m;else if(f){var A=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 C(e[a].adtag.url,!0);s.query=RD(RD({},s.query),{},{ad_rule:0,vpos:e[a].positon,pod:1,correlator:0===a?r:++r,output:"xml_vast3"}),a<e.length-1&&(s.query=RD(RD({},s.query),i)),t.push(s.toString())}for(var o=Date.now(),d=1;d<=t.length;d++){var c,u,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(TD({id:o++,adtag_url:t[d-1],error_url:null===(c=e[d-1].dp)||void 0===c?void 0:c.error_url,impression_url:null===(u=e[d-1].dp)||void 0===u?void 0:u.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:u,position:"preroll"===l.tnl_ad_pos?"preroll":"midroll",config:this._get_vmap_config(d)}));c.adsResponse=A}else if(h&&p.bidFloorApplied){h.adtag_url||(h.adtag_url=u.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);c.adsResponse=g}else if(h&&h.fallback_url){var v=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);c.adsResponse=v}else c.adTagUrl=u.url;c.linearAdSlotWidth=this.options.width,c.linearAdSlotHeight=this.options.height,c.nonLinearAdSlotWidth=this.options.width,c.nonLinearAdSlotHeight=this.options.height,c.forceNonLinearFullSlot=!0,this.options.vast_load_timeout&&(c.vastLoadTimeout=this.options.vast_load_timeout),c.setAdWillAutoPlay(n.autoplayAllowed),c.setAdWillPlayMuted(n.autoplayRequiresMute),this.adsLoader.requestAds(c,l);try{this._broadcast("AD_SDK_REQUEST",{message:l})}catch(e){}i(c)}catch(e){throw new Error(e)}}.bind(this))}},{key:"_getExternalVast",value:function(e){var t;try{var n=this.getCurrentAdPosition(e);t=KD.exist(this.gameData)&&KD.get(n,this.gameData)}catch(e){console.log("external-vast err",e)}return t}},{key:"cancel",value:function(e){var t;if(!1!==this.requestRunning){this.requestRunning=!1,this._resetAdsLoader(),this._hide("cancel");var n=(null==e||null===(t=e.message)||void 0===t?void 0:t.indexOf("NO_VAST_URL"))>=0,r="AD_SDK_CANCELED";this._broadcast(r,{name:r,message:"Advertisement has been canceled.",status:"warning",noVast:n,analytics:{category:this.eventCategory,action:r,label:this.gameData.gameId}})}}},{key:"_checkAutoPlay",value:(Q=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=navigator.userAgent.toLowerCase();a.indexOf("safari")>-1&&a.indexOf("chrome"),F.video({inline:!0,muted:!1}).then(function(n){t(this,i);var r=n.result;n.error,e(!0===r?{autoplayAllowed:!0,autoplayRequiresMute:!1}:{autoplayAllowed:!0,autoplayRequiresMute:!0})}.bind(this))}.bind(this)));case 1:case"end":return e.stop()}}),e,this)}))),function(){return Q.apply(this,arguments)})},{key:"_initDisplayContainerWithAutoPlay",value:(V=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 V.apply(this,arguments)})},{key:"startAd",value:(H=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=XD(XD({},s),{},{adType:a}),null!==(i=this.gameData.adspn)&&void 0!==i&&i.enabled&&(this.adFlowProcessSpinner||(this.adFlowProcessSpinner=new JD,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!==A.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!==A.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!==A.Interstitial){e.next=37;break}return e.abrupt("return",this._startInterstitialAd(s));case 37:if(a!==A.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 H.apply(this,arguments)})},{key:"_startOpusAd",value:(q=e(r.mark((function e(n){var i,a,s,o,d,c,u,l,h,p,f,m,A,g,v,b=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.adTypeFound="rewarded"===n.adTypeFound?"reward":n.adTypeFound,a=n.adTypeFound,this._send_atom_event("opus-ad.start"),!this.requestRunning){e.next=9;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 9:if(s=null===(i=window.gdlocus)||void 0===i?void 0:i.adBreak){e.next=14;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 14:this._send_atom_event("opus-ad.ready"),o=void function(){return t(this,b),!0}.bind(this),this.requestRunning=!0,d=this.gameData,c=d.gameId,u=d.slug,l=d.title,h={assetId:c,slug:u,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),A=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),v={type:a,meta:h,beforeAd:p,afterAd:f,adBreakDone:g},"reward"===a&&(v=XD(XD({},v),{},{adDismissed:m,adViewed:A})),this.opusEventReceived=!1,this._startTimeoutForOpus(),s&&s(v);case 31:case"end":return e.stop()}}),e,this)}))),function(e){return q.apply(this,arguments)})},{key:"preloadAd",value:(M=e(r.mark((function e(t){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t!==A.Interstitial){e.next=4;break}return e.abrupt("return","gdsdk://preloaded");case 4:if(t!==A.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 M.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 _D(this.adContainer,n),this.adResume.add(),this.rewardedLabel=new yD(this.adContainer,n),this.rewardedLabel.add(),this.skipAdButton=new wD(this.adContainer,n,r),this.skipAdButton.add(),this.audioAdLabel=new kD(window.document.body),this.audioAdLabel.add(),this.audioAdLabel.hide()}catch(e){console.log("error on adding adResume",e)}}},{key:"loadDisplayAd",value:(L=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,c,u,l,h,p,f,m,A=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:try{(d=i?i.containerId:null)||s("Container id is not specified"),c=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!"),u=i.slotId?i.slotId:"gd__banner@".concat(d),document.getElementById(u)||(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)),c.appendChild(h)),(p=document.createElement("div")).id=u,p.classList.add("gd__banner"),c.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={})[u]={maxSize:[c.offsetWidth,c.offsetHeight]},window.idhb.requestAds({slots:m,callback:function(e){t(this,A),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 L.apply(this,arguments)})},{key:"_startInterstitialAd",value:(B=e(r.mark((function e(n){var i,a,s,o,d,c=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,c),Us.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(XD(XD({},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),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:(P=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(XD(XD({},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 P.apply(this,arguments)})},{key:"_loadPromo",value:(O=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,XD({adType:A.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 O.apply(this,arguments)})},{key:"_loadInterstitialAd",value:(D=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(A.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,XD({adType:A.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 D.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:(x=e(r.mark((function e(n){var i,a,s,o,d,c=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,c),Us.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(XD(XD({},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 x.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(A.Rewarded,t);case 6:e.t0=e.sent;case 7:return n=e.t0,delete this.preloadedRewardedAdVast,e.next=11,this._requestAd(n,XD({adType:A.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:(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.preloadedInterstitialAdVast,e.t0){e.next=6;break}return e.next=5,this._getAdVast(A.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 k.apply(this,arguments)})},{key:"_preloadRewardedAd",value:(w=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(A.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 w.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;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,c=(null===(d=this._adrequest_user_context)||void 0===d||null===(d=d.adTag)||void 0===d?void 0:d.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 ED(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 u;if(a&&"click"===r){var l,h=null===(l=this._adrequest_user_context)||void 0===l?void 0:l.tnl_ad_pos;this.clickCount[h]++,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!==(u=this.adContext)&&void 0!==u&&u.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(),c="AD_SDK_MANAGER_READY";this._broadcast(c,{name:c,message:"AD SDK is ready",status:"success",analytics:{category:c,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=this,s=new Date,o=s.getHours(),d=s.getDate(),c=s.getMonth(),u=s.getFullYear(),l=v(google.ima.AdEvent.Type,e.type),h=!1,p=(null==e||null===(n=e.getAd())||void 0===n?void 0:n.getContentType())||"",f=!p.startsWith("image")&&!p.startsWith("text"),m=null==e||null===(r=e.ad)||void 0===r||null===(r=r.data)||void 0===r?void 0:r.title,g=null==e||null===(i=e.getAd())||void 0===i?void 0:i.data.skippable;this._sendIMAEventsToHB(e);var b=document.getElementById("game"),_="";switch(e.type){case google.ima.AdEvent.Type.AD_BREAK_READY:_="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:_="Fired when an ads list is loaded.";break;case google.ima.AdEvent.Type.ALL_ADS_COMPLETED:this.contentPaused&&(h=!0),this.isAudioAd&&(this.audioAdLabel.hide(),this.isAudioAd=!1),this.rewardGuarantied=!1,_="Fired when the ads manager is done playing all the ads.";break;case google.ima.AdEvent.Type.CLICK:_="Fired when the ad is clicked.";var y=e.getAd().getContentType();this._show({mode:"click",contentType:y}),GD();break;case google.ima.AdEvent.Type.COMPLETE:e.getAd(),h=this._is_completed(e.getAd()),_="Fired when the ad completes playing.",this.adType_!==A.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&&(b.style.display="none"),this.contentPaused=!0,_="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&&(b.style.display="block"),_="Fired when content should be resumed. This usually happens when an ad finishes or collapses.",this.contentPaused?h=!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();break;case google.ima.AdEvent.Type.DURATION_CHANGE:_="Fired when the ad's duration changes.";break;case google.ima.AdEvent.Type.FIRST_QUARTILE:_="Fired when the ad playhead crosses first quartile.";var w=e.getAd().getContentType();this._show({mode:"first_quartile",contentType:w});break;case google.ima.AdEvent.Type.IMPRESSION:_="Fired when the impression URL has been pinged.",e.getAd(),console.log("gdsdk: eventname IMPRESSION",this.isAudioAd),this._hideAdSpinner(),this.isAudioAd&&this.audioAdLabel.show();break;case google.ima.AdEvent.Type.INTERACTION:_="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:_="Fired when the displayed ad changes from linear to nonlinear, or vice versa.";break;case google.ima.AdEvent.Type.LOADED:var k=e.getAd().getContentType();_=k,this._show({mode:"loaded",contentType:k});break;case google.ima.AdEvent.Type.LOG:e.getAdData().adError&&(_=e.getAdData());break;case google.ima.AdEvent.Type.MIDPOINT:_="Fired when the ad playhead crosses midpoint.";break;case google.ima.AdEvent.Type.PAUSED:f&&"VPAID"!==m&&this.adResume.show(),_="Fired when the ad is paused.";break;case google.ima.AdEvent.Type.RESUMED:_="Fired when the ad is resumed.",f&&(this.adResume.hide(),this.rewardedLabel.hide());break;case google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED:_="Fired when the displayed ads skippable state is changed.";break;case google.ima.AdEvent.Type.SKIPPED:h=this._is_completed(e.getAd()),_="Fired when the ad is skipped by the user.",ND(),this.t4rButton&&this.t4rButton.hide();break;case google.ima.AdEvent.Type.STARTED:var E;if(this.adType_===A.Rewarded)!g&&null!==(E=this.gameData.rwskp)&&void 0!==E&&E.enabled&&setTimeout(function(){t(this,a),this.skipAdButton.show(),this._broadcast("SDK_REWARDED_WATCH_COMPLETE",{message:"",status:"success"}),this.rewardGuarantied=!0}.bind(this),3e4),this.rewardedLabel.show();this._hideAddResume(),_="Fired when the ad starts playing.";break;case google.ima.AdEvent.Type.THIRD_QUARTILE:_="Fired when the ad playhead crosses third quartile.";break;case google.ima.AdEvent.Type.USER_CLOSE:h=this._is_completed(e.getAd()),_="Fired when the ad is closed by the user.";break;case google.ima.AdEvent.Type.VOLUME_CHANGED:_="Fired when the ad volume has changed.";break;case google.ima.AdEvent.Type.VOLUME_MUTED:_="Fired when the ad volume has been muted."}if(""!==l&&""!==_){var x=!this.contentPaused&&e.type===google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,D=!this.contentPaused&&e.type===google.ima.AdEvent.Type.ALL_ADS_COMPLETED;x||D||this.isAudioAd||this._broadcast(l,{name:l,message:_,status:"success",analytics:{category:l,action:this.parentDomain,label:"h".concat(o," d").concat(d," m").concat(c," y").concat(u)}})}if(h&&!this.adSuccess){this.adSuccess=!0;var S=e.getAd(),R="Rainbow"===(null==S?void 0:S.getAdSystem())&&(null==S?void 0:S.getWrapperAdIds().some(function(e){return t(this,a),"promo"===e}.bind(this)));null==S||S.getAdSystem(),null==S||S.getWrapperAdIds(),this._broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success",isPromoSuccess:R}),this.resetForNext(e)}}},{key:"_run_atom_tag_aws_test",value:function(e){var n=this;try{var r,i;if(!((null===(r=this.gameData)||void 0===r||null===(r=r.aws_tst)||void 0===r?void 0:r.enabled)&&(null===(i=this.gameData)||void 0===i||null===(i=i.aws_tst)||void 0===i||null===(i=i.ep)||void 0===i?void 0:i.atm)))return;var a=e.type,s=e.url;if("none"===a||!s)return;s=s.replace("tag.atom.gamedistribution.com","atom-tag-prod-aws.gamedistribution.com"),fetch(s).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,c=a.fallback_imp_url,u=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:u}:h&&n&&(i={type:"fallbacj_imp",url:c})}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);$D.emit("AD_ERROR",r),this._broadcast(t,{message:r,details:i,status:"warning",analytics:{category:t,action:i,label:r}}),this._hideAddResume()}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_===A.Rewarded&&this.rewardedLabel&&this.rewardedLabel.hide()}catch(e){console.log("Error on hide adResume",e)}}},{key:"_hideSkipButton",value:function(){try{this.adType_===A.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(xD(e.getInnerError)){var t=e.getInnerError();if(t)return xD(t.getErrorCode)&&xD(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];j(s)&&(i.query[a]=N.stringify(s))}var o=new C(i.url,!0);return G(o.query,i.query||{}),XD({url:o.toString()},n)}}},{key:"_transformVast",value:function(e,t){var n={url:e.url};try{var r=new C(e.url,!0),i=this._transformQuery(e,t,r);i&&(n.url=r.toString());var a=i?r:new C(e.url,!0);if(a.query.cust_params){var s=N.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&&j(this.options.retry_on_success.vast_query)?a=this.options.retry_on_success.vast_query:n.retry_on_failure&&this.options.retry_on_failure&&j(this.options.retry_on_failure.vast_query)&&(a=this.options.retry_on_failure.vast_query),a=U(a),j(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=N.parse(s.cust_params);if(a.cust_params&&a.cust_params.$$remove){for(var c in d){new RegExp(a.cust_params.$$remove,"i").test(c)&&delete d[c]}delete a.cust_params.$$remove}var u=this.macros.transform(a,{get:function(n){return t(this,i),e.tnl_keys[n.toLowerCase()]}.bind(this)});return s.cust_params=d,G(s,u),s.cust_params=N.stringify(s.cust_params),!0}}}},{key:"_isExcludedBidderForT4R",value:function(){var e=this;try{var n,r,i,a=(null===(n=this._adrequest_user_context)||void 0===n||null===(n=n.adTag)||void 0===n?void 0:n.bidder)||"adx";this.msgrt.send("bidder",{message:a}),this._adrequest_user_context,'bidder:"'.concat(a,'"');var s=(null===(r=this.gameData.t4rc)||void 0===r?void 0:r.bidder_exc)||[],o=(null===(i=this.gameData.t4rc)||void 0===i?void 0:i.bidder_inc)||[],d=!1;return o.length>0?d=!o.some(function(n){return t(this,e),n===a}.bind(this)):s.length>0&&(d=s.some(function(n){return t(this,e),n===a}.bind(this))),d}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===(e=e.t4rc)||void 0===e?void 0:e.bidder_exc_rate,i=null!=r&&r.enabled?(null==r?void 0:r.rate)||.8:0,a=(null===(t=this._adrequest_user_context)||void 0===t||null===(t=t.adTag)||void 0===t?void 0:t.bidder)||"adx",s=Math.random();return n||"adx"!==a&&s<i}},{key:"_isT4R",value:function(e){var t,n,r,i,a,s,o;if(!this.gameData.publishedAt)return{success:!1,reason:"pdate-2"};var d=new Date(this.gameData.publishedAt);if(((new Date).getTime()-d.getTime())/864e5<=10)return{success:!1,reason:"pdate-1"};var c=this.gameData.meta,u=e.t4r.meta;if((null==c||null===(t=c.ast)||void 0===t?void 0:t.c)>=(null==u||null===(n=u.ast)||void 0===n?void 0:n.c)&&(null==c||null===(r=c.sit)||void 0===r?void 0:r.c)>=(null==u||null===(i=u.sit)||void 0===i?void 0:i.c))return{success:!1,reason:"meta"};var l=this._isExcludedBidderForT4RWithBidderExcRate();if(console.log("zxcv isExcludedBidderForT4R",l),l)return this.msgrt.send("bidder.ex",{message:"true"}),{success:!1,reason:"bidder"};this.msgrt.send("bidder.ex",{message:"false"});var h=null===(a=this._adrequest_user_context)||void 0===a?void 0:a.tnl_ad_pos;if(this.clickCount[h]>=(null===(s=e.t4r[h])||void 0===s?void 0:s.count))return{success:!1,reason:"click-count"};if(null!=e&&null!==(o=e.contentType)&&void 0!==o&&o.startsWith("image/")||"text"===(null==e?void 0:e.contentType)){var p,f=h&&(null===(p=e.t4r[h])||void 0===p?void 0:p.enabled);return{success:f,reason:f?null:"rule-check"}}if(null!=e&&e.contentType.startsWith("video/")){var m,A=(null===(m=e.t4r[h])||void 0===m?void 0:m.viper)||0;if(A>0){var g,v=Math.random()<A,b=h&&v&&(null===(g=e.t4r[h])||void 0===g?void 0:g.enabled);return{success:b,reason:b?null:"viper-check"}}return{success:!1,reason:"rule-check-viper"}}return{success:!1,reason:"media-format"}}},{key:"_isVMAP",value:function(e){var t,n,r,i,a,s;if(!e)return!1;var o="preroll"===e&&(!0===(null===(t=this.gameData)||void 0===t||null===(t=t.pAds)||void 0===t?void 0:t.vmap)||!0===(null===(n=this.gameData)||void 0===n||null===(n=n.pAds)||void 0===n||null===(n=n.vmap)||void 0===n?void 0:n.enabled))||"midroll"===e&&(!0===(null===(r=this.gameData)||void 0===r||null===(r=r.mAds)||void 0===r?void 0:r.vmap)||!0===(null===(i=this.gameData)||void 0===i||null===(i=i.mAds)||void 0===i||null===(i=i.vmap)||void 0===i?void 0:i.enabled))||"rewarded"===e&&(!0===(null===(a=this.gameData)||void 0===a||null===(a=a.rAds)||void 0===a?void 0:a.vmap)||!0===(null===(s=this.gameData)||void 0===s||null===(s=s.rAds)||void 0===s||null===(s=s.vmap)||void 0===s?void 0:s.enabled));if(!o)return!1;var d=this._get_vmap_config(e),c=this.adCounter[e];return void 0!==(null==d?void 0:d.start)?c>=(null==d?void 0:d.start):o}},{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;switch(e){case"preroll":return null===(t=this.gameData)||void 0===t||null===(t=t.pAds)||void 0===t?void 0:t.vmap;case"midroll":return null===(n=this.gameData)||void 0===n||null===(n=n.mAds)||void 0===n?void 0:n.vmap;case"rewarded":return null===(r=this.gameData)||void 0===r||null===(r=r.rAds)||void 0===r?void 0:r.vmap;default:return null===(i=this.gameData)||void 0===i||null===(i=i.pAds)||void 0===i?void 0:i.vmap}}},{key:"_isDP",value:function(e){var t;return!!e&&!0===(null===(t=this.gameData)||void 0===t||null===(t=t.dp)||void 0===t||null===(t=t[e])||void 0===t?void 0:t.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 bD(this.gameData).checkCustomParams();a&&(i.cp=a);var s=encodeURIComponent(I.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(I.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),c=o?d:void 0;return function(){t(this,r),Us.promoError&&(console.log("promo-test fictional promo error"),c=void 0)}.bind(this),{promo_url:c,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,c,u,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},(c=new bD(a.gameData).checkCustomParams())&&(d.cp=c),u=encodeURIComponent(I.encode(JSON.stringify(d))),null==i||i.adapterIndex,null==i||i.isLastAdapter,l=null===(o=a.gameData.promo)||void 0===o?void 0:o.rainbow,!1,null==l||l.enabled,null==i||i.isLastAdapter,fetch("https://tag.atom.gamedistribution.com/v1/atm?ar=".concat(u)).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(u,"&ec=[ERRORCODE]"),impression_url:"https://tag.atom.gamedistribution.com/v1/imp?ar=".concat(u),skip_url:"https://tag.atom.gamedistribution.com/v1/skp?ar=".concat(u),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 C(t.vastUrl,!0);if(null===(n=r.query)||void 0===n||!n.cust_params)return;var i=N.parse(r.query.cust_params);if(!i.tnl_asset_id)return;i.adsense=1,r.query.cust_params=N.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 C(e.url,!0);if(null===(i=a.query)||void 0===i||!i.cust_params)return;var s=N.parse(a.query.cust_params);s.bfa=r,s.adsense=0,a.query.cust_params=N.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:(p=e(r.mark((function e(n){var i,a,s,o,d,c,u,l,h=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=this._getPrebidScripts(),a=i[0],s=function(){return t(this,h),!1}.bind(this),window.idhb=window.idhb||{iabCmpExists:s},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||[],(o=new URL(a)).searchParams.append("referer",window.idhb.options.configUrl),a=o.href,e.next=13,f(a,"gdsdk_prebid",{alternates:i,error_prefix:"Blocked:",exists:function(){return t(this,h),window.idhb.requestAds}.bind(this)});case 13:d=b("ch",window.location.href),c=b("ch_date",window.location.href),u={tnl_content_category:this.category.toLowerCase()},d&&(u.channel=d),c&&(u.ch_date=c),(l=b("hl_label",this.parentURL)||b("hl_label",window.location.href))&&(u.label=l),window.idhb.setAdserverTargeting(u),window.idhb.allowPersonalizedAds(!!parseInt(this.userAllowedPersonalizedAds)),window.idhb.addEventListener("slotRenderEnded",function(e){var n=this;t(this,h);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),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),this._broadcast("DISPLAYAD_IMPRESSION",{message:a,status:"success"}))}catch(e){}}.bind(this));case 23:case"end":return e.stop()}}),e,this)}))),function(e){return p.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,f(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:(u=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:if(!this.gameData.afg_disabled){e.next=3;break}return e.abrupt("return");case 3:return(o={}).crossorigin="anonymous",o["data-ad-client"]=(null==n||null===(i=n.adsense_client)||void 0===i?void 0:i.length)>0?n.adsense_client:"ca-pub-2316275586951220",o["data-ad-frequency-hint"]="30s",o.allow="autoplay",(null==n||null===(a=n.adsense_channel)||void 0===a?void 0:a.length)>0&&(o["data-ad-channel"]=n.adsense_channel),(null==n||null===(s=n.adsense_host)||void 0===s?void 0:s.length)>0&&(o["data-ad-host"]=n.adsense_host),!0===(null==n?void 0:n.adsense_adbreak_test)&&(o["data-adbreak-test"]="on"),e.next=15,f("https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js","afg",{error_prefix:"Blocked:",exists:function(){return t(this,d),!!window.adsbygoogle}.bind(this),attrs:o});case 15:window.adsbygoogle=window.adsbygoogle||[],window.adsbygoogle.push({sound:"on",preloadAdBreaks:"on"});case 17:case"end":return e.stop()}}),e,this)}))),function(e){return u.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],c=d&&(null===(o=d.children[0])||void 0===o?void 0:o.children[0]);c&&"IFRAME"===c.tagName&&c.style.height!==r&&(c.style.height=r,i&&(c.parentElement.style.overflow="auto"))}}catch(e){"out-of-bounds error: ".concat(e.message)}}},{key:"clearSession",value:function(){this.requestRunning=!1}},{key:"_startAdsensePlacementRewardedAd",value:(c=e(r.mark((function e(n){var i,a,s,o,d,c,u,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),Us.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),c=function(e){t(this,h),i=!0,e()}.bind(this),u=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||(Bs("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:c,adBreakDone:u}),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 c.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),Us.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),Us.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=this;if(null===(n=this.gameData)||void 0===n||null===(n=n.ad_blcks)||void 0===n||null===(n=n.adsenseTimeout)||void 0===n?void 0:n.enabled){null==e||e.adType,null===(r=this.gameData)||void 0===r||null===(r=r.ad_blcks)||void 0===r||null===(r=r.adsenseTimeout)||void 0===r||r.timeout;var a=setTimeout(function(){t(this,i),this.adPlacementEventReceived||(this._broadcast("AD_ERROR",{message:"timeout-_startTimeoutForAdBreak",status:"error"}),this.adPlacementEventReceived=!1,this.requestRunning=!1),clearTimeout(a)}.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),Us.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(I.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 Iy).get();return n=XD(XD({},n),r),n=t?XD(XD({},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===A.Rewarded)t="reward";else if(n===A.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,XD(XD({},n),{},{skipForward:i,adPosition:a}))}},{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}(),nS=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,mv(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},pv(this.moduleName,this.moduleConfig)})),rS=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,mv(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="GDSplashDynamic",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},pv(this.moduleName,this.moduleConfig)})),iS=function(e,t){console.log(e,t)},aS={},sS={},oS=null;function dS(){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 aS.version=r,aS.frame=e,aS.function=n,aS.version}function cS(e){var n=this;return oS||(oS=new Promise(function(r){function i(t,n){if(iS("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:aS,consentData:i}),void r({result:"ok",consentData:t})):void 0;r({result:"ok",consentData:t})}else r({result:"cmpCallFailed"})}t(this,n),dS(),aS.frame?2===aS.version?(iS("TCF v2 CMP found. Fetching the consent."),aS.function?(iS("CMP API is directly accessible, calling it now..."),aS.function("addEventListener",aS.version,i)):(iS("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!==sS[r.callId]&&sS[r.callId](r.returnValue,r.success)}}window[a]=function(e,r,s,o){t(this,i);var d=Math.random()+"",c="".concat(a,"Call"),u=T({},c,{command:e,parameter:o,callId:d,version:r});sS[d]=s,n.postMessage(u,"*")}.bind(this),window.addEventListener("message",s,!1),window[a](e,aS.version,r)}("addEventListener",aS.frame,i))):r({result:"cmpVersionNotV2",cmp:aS}):r({result:"cmpNotFound"})}.bind(this)),oS)}var uS=new(function(){function t(){R(this,t),this.productName="Game Distribution"}var n;return S(t,[{key:"checkIfExcluded",value:function(e){try{var t;return!(null===(t=e.diagnostic)||void 0===t||null===(t=t.gameDock)||void 0===t||!t.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,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(a=null==t||null===(i=t.visitor)||void 0===i||null===(i=i.visitorData)||void 0===i?void 0:i.visitorId){e.next=6;break}return e.abrupt("return");case 6:return s=encodeURIComponent(this.productName),o=encodeURIComponent(a),e.prev=8,d="https://tracker-v4.gamedock.io/v1/events-tracker/track/product/".concat(s,"/user_id/").concat(o),e.next=12,fetch(d,{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(s,"/user_id/").concat(o),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 lS(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 hS(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 hS(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 hS(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 pS=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 c=document.createElement("script");if(c.async=null==s||s,c.type="text/javascript",c.onload=function(){t(this,d),e()}.bind(this),c.onerror=function(){t(this,d);var e="Error on script load, Error: ".concat(r);console.log(e),o(e)}.bind(this),c.src=r,i){var u,l=lS(i);try{for(l.s();!(u=l.n()).done;){var h=u.value,p=h.key,f=h.value;c.setAttribute(p,f)}}catch(e){l.e(e)}finally{l.f()}}a||(a=document.head),a.appendChild(c)}catch(e){var m="Error on script load catch, Error: ".concat(r);console.log(m,e),o(m)}}.bind(this))},fS="ffd4774b-99ae-4464-8f40-3afa12b4692e",mS=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,pS({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,pS({src:"https://cdn.cookielaw.org/consent/".concat(fS,"/OtAutoBlock.js"),attributes:[{key:"id",value:"gd-cookie-pro-autoblock"}],isAsync:!1});case 5:return e.next=7,pS({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:fS}],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)}}(),AS=new M,gS={"https://games.softgames.com":{"splash-hidden":"splash-hidden"},"https://sg.gamedistribution.com":{"splash-hidden":"splash-hidden"},"https://html5.gamedistribution.com":{key:"value"}},vS=!1;function bS(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(gS).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;!function(e){if("gd-sdk-on-event"===(null==e?void 0:e.type)){var t,n,r;if("midroll"!==(null==e||null===(t=e.event)||void 0===t?void 0:t.adPosition))return;var i="CONTENT_RESUME_REQUESTED"===(null===(n=e.event)||void 0===n?void 0:n.name);"CONTENT_PAUSE_REQUESTED"===(null===(r=e.event)||void 0===r?void 0:r.name)&&(vS=!0),i&&vS&&(vS=!1,window.parent.postMessage({type:"sg-game-event",eventName:"levelFinish",data:{score:100}},"*"))}}(r);var o=function(){t(this,n);try{var r;return null==e||null===(r=e.source)||void 0===r||null===(r=r.location)||void 0===r?void 0:r.href}catch(e){}}.bind(this);if(window.parent&&s){if("https://html5.gamedistribution.com"===i){var d=o();if(!d)return;var c=d&&["9555f04e1900482aaaef710cd2f8c440"].some(function(e){return t(this,n),d.indexOf(e)>0}.bind(this)),u=["sg-game-event"].some(function(e){return t(this,n),e===(null==r?void 0:r.type)}.bind(this));if(!c&&!u)return}var l=r.eventName,h=r.data;window.mpHelper&&(console.log("SG_EVENTS sending to minijuegos!"),"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=gS[i][a];p&&AS.emit(p,r)}}}),!1);var _S="__msgr",yS=q(),wS=function(e){var n=this;if(!window[_S]){var r=document.createElement("iframe");if(r.src="https://static.gamedistribution.com/message/index.html",r.style.display="none",r.name=_S,document.body.appendChild(r),window!==window.top){var i={gameId:e.gameId,target:e.evnts.domain,token:yS,event_name:"TokenGenerated",timestamp:Date.now()};r.onload=function(){xS(i)},setInterval(function(){t(this,n),i.timestamp=Date.now(),i.event_name="Heartbeat",xS(i)}.bind(this),1e3*e.evnts.heartbeatDuration)}}window.addEventListener("message",function(e){t(this,n);try{var r=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?bS(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bS(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e.data);if(!r.event_name)return;r.token=yS,xS(r)}catch(e){console.error("GD Messager Error",e.message)}}.bind(this),!1)},kS=function(e){try{var t={gameId:e.game.gameId,target:e.game.evnts.domain,event_name:e.event,timestamp:Date.now()},n=ES(window);n!==window.top&&(null==n||n.postMessage(t,"https://html5.gamedistribution.com"))}catch(e){}},ES=function e(t){try{var n,r=null==t?void 0:t.parent;if("game"===(null===(n=r.document)||void 0===n||null===(n=n.activeElement)||void 0===n?void 0:n.id))return r;e(r)}catch(e){return t}},xS=function(e){try{window[_S]&&window[_S].postMessage(e,"*")}catch(e){console.log("GD Messager initialization, please wait....")}},DS=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}(),SS=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}(),RS=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 SS,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",m.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",m.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 TS(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 CS(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?TS(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):TS(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var IS="_gd_vs";function OS(e){return PS.apply(this,arguments)}function PS(){return PS=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,US({gameId:n,serverDate:i});case 6:a=e.sent,e.next=13;break;case 9:e.prev=9,e.t0=e.catch(3),Ls("visit-update error, indexedDb",e.t0.message),s.push(e.t0.message);case 13:if(a||!m.available){e.next=24;break}return e.prev=14,e.next=17,BS({gameId:n,serverDate:i});case 17:a=e.sent,e.next=24;break;case 20:e.prev=20,e.t1=e.catch(14),Ls("visit-update error, Ls",e.t1.message),s.push(e.t1.message);case 24:return e.abrupt("return",CS(CS({},a),{},{errors:s}));case 25:case"end":return e.stop()}}),e,null,[[3,9],[14,20]])}))),PS.apply(this,arguments)}function BS(e){return LS.apply(this,arguments)}function LS(){return LS=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 RS({mode:a="local-storage"}),e.next=5,s.get(IS);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(IS,o);case 13:return e.abrupt("return",{visit:d,mode:a});case 14:case"end":return e.stop()}}),e)}))),LS.apply(this,arguments)}function US(e){return MS.apply(this,arguments)}function MS(){return MS=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 RS({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)}))),MS.apply(this,arguments)}function FS(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?FS(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):FS(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var NS,GS,qS,HS=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,f(t[0],"soecket.io.js",{alternates:t});case 4:case"end":return e.stop()}}),e)})));return function(){return t.apply(this,arguments)}}(),VS=0,QS=function(){var n=e(r.mark((function n(i){var a,s,o,d,c=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:if(o=new C(window.location.href),!("html5.gamedistribution.com"!==o.host)){n.next=10;break}return n.abrupt("return");case 10:return n.next=12,HS();case 12:GS=q(),d={json:JSON.stringify(a)},"wss://ws.gamedistribution.com",(NS=io("wss://ws.gamedistribution.com",{query:d,upgrade:!1,transports:["websocket"],reconnectionDelay:6e4,autoConnect:!1})).on("connect",function(){t(this,c)}.bind(this)),NS.on("after-connect",function(){var t=e(r.mark((function e(t){var n,i,s,o,d,c;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return qS=qS||(null==t?void 0:t.serverDate),n=a.gameId,e.next=4,OS({gameId:n,serverDate:qS});case 4:i=e.sent,s=i.visit,o=i.mode,d=i.errors,a.visit=jS(jS({},s),{},{stm:o,errors:d}),c={json:JSON.stringify(a)},NS.emit("client-info",{clientId:GS,counter:VS++,serverDate:qS,query:c});case 11:case"end":return e.stop()}}),e)})));return function(e){return t.apply(this,arguments)}}()),NS.on("disconnect",function(e){t(this,c)}.bind(this)),NS.connect(),n.next=25;break;case 22:n.prev=22,n.t0=n.catch(1),s&&s(n.t0);case 25:case"end":return n.stop()}}),n,this,[[1,22]])})));return function(e){return n.apply(this,arguments)}}(),zS=!1;function WS(e,t){try{if("play"===e){if(zS)return;zS=!0}if(NS){var n={json:JSON.stringify(t||{})};NS.emit("socket-event",{topic:e,clientId:GS,counter:VS,serverDate:qS,query:n})}}catch(e){console.log("Error on sending socket-event",e.message)}}function KS(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 YS(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?KS(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):KS(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function JS(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 ZS(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 ZS(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 ZS(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 XS,$S=function(){function n(e){var r=this;R(this,n),T(this,"_getAdTypeByAfgPosition",function(e){var n=this;t(this,r);var i={preroll:["preroll","start"],midroll:["next"],rewarded:["reward"]},a=Object.keys(i).find(function(r){var a=this;return t(this,n),i[r].some(function(n){return t(this,a),n===e.params.position}.bind(this))}.bind(this));return a||"midroll"}.bind(this)),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._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._muteRequested=!1,this._terminateRequested=!1}var i,a;return S(n,[{key:"runAdFlow",value:(a=e(r.mark((function e(n){var i,a,s,o,d,c,u,l,h,p,f,m,A,g,v,b,_,y,w,k,E,x,D,S,R,C,I,O,P,B,L,U,M,F,j,N,G,q,H,V,Q,z,W,K,Y,J,Z,X,$,ee,te=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.adRequest=n,u=this._getAdTypeByAfgPosition(n),n.params.adTypeFound=u,n.params.position,(l=this._getAdFlow(u)).find(function(e){return t(this,te),"opus"===e}.bind(this))&&!this.isOpusReady()&&(l=l.filter(function(e){return t(this,te),"opus"!==e}.bind(this)),this._msgrt.send("opus.sdk",{message:"Not ready"})),h=this._gameData,p=h.afg_disabled,f=null===(i=n.params)||void 0===i?void 0:i.isGift,m=null===(a=n.params)||void 0===a?void 0:a.isMidrollPlus,null===(s=n.params)||void 0===s||s.position,A=null===(o=h.promo)||void 0===o?void 0:o.rainbow,g=(null==A?void 0:A.enabled)&&(null===(d=A.position)||void 0===d?void 0:d[u]),v=null==A?void 0:A.gift,b=g&&null!=A&&A.duration?null==A?void 0:A.duration:5,_=p?l.filter(function(e){return t(this,te),"adsense"!==e}.bind(this)):l,y=this.get_ad_system_init_result(),w=y.afg,k=y.ima,E=null==h||null===(c=h.ad_blcks)||void 0===c||null===(c=c.removeOtherAdaptors)||void 0===c?void 0:c.enabled,this.anyAdBlocking=!w||!k,this.bothAdBlocking=!w&&!k,this.adsBlocked=E&&this.anyAdBlocking||this.bothAdBlocking,this.adsBlocked?(Bs("gd-adflow adsBlocked so changing the flow"),_=[]):(w||(_=_.filter(function(e){return t(this,te),"adsense"!==e}.bind(this))),k||(_=_.filter(function(e){return t(this,te),"ima"!==e}.bind(this)))),x=!1,D=!1,S=[],R=0,C=!1,O={},P=JS(_),e.prev=33,P.s();case 35:if((B=P.n()).done){e.next=81;break}if(L=B.value,!this._terminateRequested){e.next=39;break}return e.abrupt("break",81);case 39:if(n.params.adapter=L,U=R===_.length-1,M=f&&v||!f,F=U&&g&&M,n.params=YS(YS({},n.params),{},{adapterIndex:R,isLastAdapter:U,shouldFail:!1,extraPromoRunOnFail:F,muteRequested:this._muteRequested}),!this._muteRequested||"adsense"!==L){e.next=46;break}return e.abrupt("continue",79);case 46:return function(){t(this,te),Us.firstSuccessOrder&&!isNaN(Us.firstSuccessOrder)&&(n.params.shouldFail=R<Us.firstSuccessOrder)}.bind(this),Bs("gd-adflow, before adInvoke",R,L,n.params.shouldFail),e.next=50,this.adInvoke(n);case 50:if(j=e.sent,N=j.success,G=j.args,q=j.isSkipped,H=j.noVast,V=j.t4r,Q=null==G?void 0:G.reason,z=null==G?void 0:G.message,W=null==G?void 0:G.errorType,O[L]=O[L]||{req:0,imp:0,fail:0},O[L].req++,N?O[L].imp++:(O[L].fail++,O[L].failReason=Q,O[L].failMessage=z,O[L].failType=W),!N){e.next=70;break}return Bs("gd-adflow, adapter-result-success",R,L,G,V),x=!0,D=!(null==G||!G.isPromoSuccess),I=V,e.abrupt("break",81);case 70:if(Bs("gd-adflow, adapter-result-failure",R,L,G.message),R++,S.push(G.message),!q){e.next=75;break}return e.abrupt("break",81);case 75:if(!H){e.next=78;break}return this._runAutoResume(),e.abrupt("break",81);case 78:C=F;case 79:e.next=35;break;case 81:e.next=86;break;case 83:e.prev=83,e.t0=e.catch(33),P.e(e.t0);case 86:return e.prev=86,P.f(),e.finish(86);case 89:if(!C){e.next=95;break}return e.next=92,new DS(this).run({duration:b});case 92:e.sent.success&&(D=!0);case 95:return function(){var e;t(this,te),Us.disableGift&&null!==(e=h.gft)&&void 0!==e&&e[u].enabled&&(h.gft[u].enabled=!1)}.bind(this),K=S.join(" /n"),x?(this._setAdRequestTimer(),this._onResumeGame("Advertisement(s) are done. Start / resume the game.","success"),this._giveGift(u),"midroll"===u&&this._executeMidrollPlus()):(this._onResumeGame(K,"warning"),this._giveGift(u),"midroll"===u&&this._executeMidrollPlus()),Y="-1",J="none",x?(Y="index_".concat(R),J=_[R]):D&&(Y="promo",J="promo"),Z=this.get_session_id(),this.anyAdBlocking&&"-1"===Y?(X="rewarded"===u?"rewarded":this.blockedAdsMap.preroll?"midroll":"preroll",this.blockedAdsMap[X]=this.blockedAdsMap[X]?this.blockedAdsMap[X]+1:1,JSON.stringify(this.blockedAdsMap),this._msgrt.send("adflow.blocked.pos",{message:"".concat(X)}),this.send_atom_event("gd.adflow",{adBlocker:!0,afgBlocked:!w,imaBlocked:!k,isGift:f,isMidrollPlus:m,adType:X,sessionId:Z,successAdapter:"none",adFlowIndex:Y,adapterResults:O})):($=T(T(T(T({},"adflow.all.index",{message:"".concat(Y)}),"adflow.all.success_adapter",{message:"".concat(J)}),"adflow.".concat(u,".index"),{message:"".concat(Y)}),"adflow.".concat(u,".success_adapter"),{message:"".concat(J)}),Object.keys($).forEach(function(e){t(this,te);var n=$[e];this._msgrt.send(e,n)}.bind(this)),this.send_atom_event("gd.adflow",{adFlowIndex:Y,successAdapter:J,adBlocker:!1,afgBlocked:!w,imaBlocked:!k,isGift:f,isMidrollPlus:m,adType:u,sessionId:Z,t4r:I,adapterResults:O}),WS("ad-session",{adSession:{adType:u,imp:"-1"!==Y&&"promo"!==Y,promo:"promo"===Y,blocked:this.anyAdBlocking&&"-1"===Y}})),ee={adType:u},this.eventBus.broadcast("AD_FLOW_COMPLETE",ee),e.abrupt("return",ee);case 110:case"end":return e.stop()}}),e,this,[[33,83,86,89]])}))),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,c,u,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),JSON.stringify(i),d={},c=function(e){t(this,l),JSON.stringify(i),a._eventBus.unsubscribeScope(o);var r="dismissed"===(null==e?void 0:e.message);n({success:!1,args:e,isSkipped:r,noVast:e.noVast})}.bind(this),u=function(e){t(this,l),JSON.stringify(i),a._eventBus.unsubscribeScope(o),n({success:!0,args:e,t4r:d})}.bind(this),a._eventBus.subscribe("AD_ERROR",c,o),a._eventBus.subscribe("AD_SDK_CANCELED",c,o),a._eventBus.subscribe("AD_SUCCESS",u,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),Ls("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=this,o=void function(){if(t(this,s),Us.customAdFlow)return JSON.parse(Us.customAdFlow)}.bind(this),d=this._gameData.adflw;o&&(d=o);var c=null!==(n=d)&&void 0!==n&&null!==(n=n.adapters)&&void 0!==n&&n.default?null===(r=d)||void 0===r||null===(r=r.adapters)||void 0===r?void 0:r.default:["ima","adsense"];return c=null!==(i=d)&&void 0!==i&&null!==(i=i.adapters)&&void 0!==i&&i[e]?null===(a=d)||void 0===a||null===(a=a.adapters)||void 0===a?void 0:a[e]:c}},{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))}}]),n}(),eR=new M,tR=["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(tR.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)XS=a,(window.parent||window).postMessage(r,"*"),eR.emit("aeria-event",r);else if(o){XS&&XS.postMessage(r,"*");var d=window.parent||window;d&&d.postMessage(r,"*")}}}),!1);var nR="https://html5.gamedistribution.com",rR="parent-data-request",iR="parent-data-response",aR=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,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===nR&&o===rR){var d={adRequestTimer:e.adRequestTimer};s.postMessage({type:iR,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===nR&&i===iR&&(e(s),a=!0)})),setTimeout(function(){t(this,i),a||e()}.bind(this),1e3);var s={type:rR};window.parent.postMessage(s,"*")}.bind(this)));case 1:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})}]),n}(),sR=new aR,oR={SDKExistsOnUpperFrame:!1};function dR(){return cR.apply(this,arguments)}function cR(){return(cR=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,f(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 uR(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 lR(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?uR(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):uR(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var hR=function(){Bs("gtag: GA not initialized",arguments)};function pR(e){return fR.apply(this,arguments)}function fR(){return fR=e(r.mark((function e(i){var a,s,o,d,c,u,l,h,p,m,A,g,v=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=i.onError,s=i.args,d="gdSDKDataLayer",c="https://www.googletagmanager.com/gtag/js?id=".concat(o="G-PLRTBHGSEL","&l=").concat(d),u=[c],e.prev=5,e.next=8,f(u[0],"gdsdk_google_analytics",{alternates:u,error_prefix:"Blocked:",exists:function(){return t(this,v),window[d]}.bind(this)});case 8:return window[d]=window[d]||[],hR=function(){window[d].push(arguments)},hR("js",new Date),e.next=14,H();case 14:return l=e.sent,h=l.lookupIabConsent,p=l.getGoogleAdType,e.next=19,h();case 19:m=e.sent,A=p(m.consentData),g=lR(lR({},g=s||{}),{},{cookie_flags:"SameSite=None;Secure",cmp:m.result,gdpr:"ok"===m.result?"object"===n(m.consentData)?!0===m.consentData.gdprApplies:"N/A":m.result,google_ads:null==A?void 0:A.type}),hR("config",o,g),e.next=31;break;case 27:e.prev=27,e.t0=e.catch(5),Ls("gtag: load GA error",e.t0),a&&a(e.t0);case 31:case"end":return e.stop()}}),e,this,[[5,27]])}))),fR.apply(this,arguments)}new C("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 C("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 mR=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 c=!1,u=setInterval(function(){t(this,a);try{s()&&(clearInterval(u),c=!0,e(!0))}catch(t){clearInterval(u),e(!1)}}.bind(this),d);setTimeout(function(){t(this,a),clearInterval(u),c||e(!1)}.bind(this),o)}}.bind(this))};function AR(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?AR(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):AR(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function vR(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},c=(new Iy).get();return d=gR(gR({},d),c),function(e,t){try{var n=r._layout,o=r._ua,d={tp:e,ct:0,vrs:Is.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(I.encode(JSON.stringify(d)))))}catch(e){}}(e,d=o?gR(gR({},d),o):d)}}}}function bR(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 _R(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?bR(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bR(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var yR=q(),wR=null,kR=null,ER=function(){function n(e){var r,i,a,s=this;if(R(this,n),wR)return wR;wR=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 Iy,this._location.print();var o=this._location.get(),d=(null==o||null===(r=o.top)||void 0===r||null===(r=r.domain)||void 0===r?void 0:r.value)||(null==o||null===(i=o.partner.domain)||void 0===i?void 0:i.value),c=null==o||null===(a=o.partner.url)||void 0===a?void 0:a.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||d,this._topDomain,this._parentURL,this._isFullScreen=!1,this._giftCount={preroll:0,midroll:0,rewarded:0},this._mplus_count=0,this._setConsoleBanner(),this._initializeMessageRouter(),this._checkConsole(),this._subscribeToEvents(),this.sdkReady=new Promise(this._initializeSDKWithGameData.bind(this)),this.sdkReady.then(function(e){t(this,s),this._sdk_ready=!0}.bind(this)).catch(function(e){t(this,s),this._sdk_ready=!1}.bind(this)).finally(function(){var e,n,r,i=this;if((t(this,s),null===(e=this._gameData)||void 0===e||null===(e=e.directTokenUse)||void 0===e?void 0:e.enabled)&&this._blockDirectTokenURLEmbedding().blocked)return;this.dumper=new vR({msgrt:this.msgrt,gameData:this._gameData,parentDomain:this._parentDomain,parentURL:this._parentURL,topDomain:this._parentURL}),this.dumper,this._initGameSessionTracking(),this._sendLoadedEvent(2),!0===(null===(n=this._gameData.lp)||void 0===n?void 0:n.load)&&this._sendLoadedEvent(1),this._sendLoaderDataEvent(),this._checkSplashAndPromoScreens(),this._initBlockingExternals(),this._initUnityHandler(),this._checkFullscreen(),null!==(r=this._gameData.evnts)&&void 0!==r&&r.enabled&&this._isLoaderGameURL()&&(wS(this._gameData),this._gameData.evnts.gameId===this.options.gameId&&setInterval(function(){t(this,i),this._send_gametag_data("heartbeat")}.bind(this),1e3*this._gameData.evnts.heartbeatDuration)),sR.init(this),this._send_gametag_data("sdk_init")}.bind(this)),this._registerSGBridge(),this._whichFrame(),this._loadLocus()}var i,g,v,b,y,T,O,P,B,L,M,F,j,G,q,H,V,Q;return S(n,[{key:"_getVisitorId",value:(Q=e(r.mark((function e(){var n,i,a,s=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,mR({handler:function(){return t(this,s),!!kR}.bind(this),timeout:1e3,interval:10});case 2:return i=e.sent,a=i?null===(n=kR)||void 0===n||null===(n=n.visitor)||void 0===n||null===(n=n.visitorData)||void 0===n?void 0:n.visitorId:"noVisitorId",e.abrupt("return",a);case 5:case"end":return e.stop()}}),e,this)}))),function(){return Q.apply(this,arguments)})},{key:"_initGameSessionTracking",value:(V=e(r.mark((function e(){var n,i,a,s,o,d,c,u,l,h,p,f,m,A,g,v,b,_=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null===(n=this._gameData)||void 0===n||null===(n=n.gs_trc)||void 0===n?void 0:n.enabled){e.next=3;break}return e.abrupt("return");case 3:return e.next=5,this._getVisitorId();case 5:i=e.sent,a=this._gameData,s=a.category,o=a.dname,d=a.pname,c=a.gameId,u=a.slug,l=a.title,h=a.ctry,p=this._topDomain||this._parentDomain,f=new Iy,m=f.get(),A=this.msgrt._ua,g=document.referrer,v=this.msgrt._layout,b={args:{rfr:g,category:s,dname:o,pname:d,gameId:c,slug:u,title:l,ctry:h,domain:p,loc:m,ua:A,layout:v,version:Is.version,visitorId:i},onError:function(e){t(this,_),this._sendSDKError(e)}.bind(this)},QS(b);case 18:case"end":return e.stop()}}),e,this)}))),function(){return V.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:(H=e(r.mark((function e(t){var n;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this._getGdModeIfExist()&&(n=u()||"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 H.apply(this,arguments)})},{key:"_loadCMP",value:(q=e(r.mark((function e(){var t,n,i,a;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._isMasterGameURL()){e.next=12;break}if(n=new Iy,0!==(null==(i=n.get("depth"))?void 0:i.value)||null===(t=this._gameData)||void 0===t||null===(t=t.cmp)||void 0===t||!t.enabled){e.next=12;break}if(null===(a=this._gameData)||void 0===a||null===(a=a.cmp)||void 0===a||!a.checkDepthOnly){e.next=9;break}return e.next=7,mS();case 7:e.next=12;break;case 9:if("html5.gamedistribution.com"!==this._topDomain){e.next=12;break}return e.next=12,mS();case 12:case"end":return e.stop()}}),e,this)}))),function(){return q.apply(this,arguments)})},{key:"testConsent",value:function(){try{dS();e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,cS({});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;AS.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());C(location.href,!0);if(this._whichFrame(),this._isMasterGameURL(),this._isExtHostedGameURL(),this._isTokenGameURL(),this._isHostHTML5Domain(),this._isExternalHoster(),location.href,document.referrer,t)try{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:(G=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.prev=0,e.next=3,this._getGameData();case 3:return this._gameData=e.sent,e.next=6,this._loadCMP();case 6: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(),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)||(this.videoAdReady=this._initializeVideoAd().then(function(){t(this,d),(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,d);var n="".concat(e).startsWith("Error: Blocked:");Bs("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))),n(this._gameData),e.next=21;break;case 16:e.prev=16,e.t0=e.catch(0),this._sendSDKError(e.t0),this.onResumeGame(e.t0.message,"warning"),i(e.t0);case 21:case"end":return e.stop()}}),e,this,[[0,16]])}))),function(e,t){return G.apply(this,arguments)})},{key:"_getDefaultOptions",value:function(){return{debug:!1,testing:!1,gameId:"4f3d7d38d24b740c95da2b03dc3a2333",prefix:"gdsdk__",onEvent:function(e){},onLoaderEvent:function(e){},flashSettings:{adContainerId:"",splashContainerId:""},advertisementSettings:{},resumeGame:function(){},pauseGame:function(){},onInit:function(e){},onError:function(e){},loader:{}}}},{key:"_checkAdBlockerRemoval",value:function(){m.getBoolean(this.blockingDetectedKey)&&(m.set(this.blockingDetectedKey,!1),this.send_atom_event("ad-blocker-removed"))}},{key:"_checkAdBlocker",value:(j=e(r.mark((function e(){var t,n,i,a,s,o,d,c;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=17;break}if(m.set(this.blockingDetectedKey,!0),null===(a=this._gameData.rmblck)||void 0===a||!a.enabled){e.next=17;break}if(this.adBlockerPage){e.next=17;break}return e.next=9,dR();case 9:return s=e.sent,this.adBlockerPage=new s(this._gameData),o=(navigator.language||navigator.userLanguage).split("-")[1],e.next=14,this.adBlockerPage.checkStorage(o);case 14:d=e.sent,c="default"===d?"EN":o,this.adBlockerPage.add(d,c);case 17:e.next=21;break;case 19:e.prev=19,e.t0=e.catch(0);case 21:case"end":return e.stop()}}),e,this,[[0,19]])}))),function(){return j.apply(this,arguments)})},{key:"_extendDefaultOptions",value:function(e,t){var n=U(e);this.options=t?h(n,t):n,this.options.gameId=this.options.gameId.trim()}},{key:"_setConsoleBanner",value:function(){if(!this._bridge.noConsoleBanner){var e=Is.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(e){var n=this;if(this._shouldSendTunnlEvent(e)){void 0!==this._topDomain&&"undefined"!==this._topDomain||(this._topDomain=void 0);var r={page_url:this._topDomain||this._parentDomain,game_id:this.options.gameId,eventtype:e,ts:Date.now()};fetch("https://hlana.gamedistribution.com/event?".concat(N.stringify(r))).catch(function(i){t(this,n),this._sendHLAnalyicsLog({query:_R(_R({},r),{},{error:null==i?void 0:i.message}),eventType:-e})}.bind(this)),this._sendHLAnalyicsLog({query:r,eventType:e}),this.adInstance._send_atom_event("hl.config",r),this._send_gametag_data("sdk_gameplay")}}},{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("zxcv 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,p("White label publisher","".concat(this._whitelabelPartner),"success"))}},{key:"_checkConsole",value:function(){try{if(!m.available)return;"developer.gamedistribution.com"===this._parentDomain||"developer.gamedistribution.com"===this._topDomain?(m.set("gd_debug_ex",!0),m.set("gd_disable_midroll_timer",!0),m.set("gd_tag",!0)):"localhost:3000"===this._parentDomain&&(m.set("gd_debug_ex",!0),m.set("gd_disable_midroll_timer",!0)),m.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:Is.version,tracking:this._userDeclinedTracking,whitelabel:this._whitelabelPartner,platform:u(),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];f(n[0],"GamedockSDK",{alternates:n}).then(function(){var n;t(this,e),kR=this._initGamedockTracker(window.GamedockSDK),this._sendGamedockEvent("pageview"),null!==(n=this._gameData.diagnostic)&&void 0!==n&&null!==(n=n.gameDock)&&void 0!==n&&n.adViewEvent&&kR.tracking.enableHeartBeatForPage({pageId:this.options.gameId,pageType:"game"},this._gameData.diagnostic.gameDock.heartbeatConfig),uS.track(kR,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;null===(t=kR)||void 0===t||null===(t=t.tracking)||void 0===t||t.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"),f(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,Ew();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)),f(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:(F=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 F.apply(this,arguments)})},{key:"_terminateFlow",value:(M=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 M.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 Iy,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};pR({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 C(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){}}qD()}.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;t(this,e),this.msgrt.send("ad.impression"),jD(),null!==(r=this._gameData.diagnostic)&&void 0!==r&&null!==(r=r.gameDock)&&void 0!==r&&r.adViewEvent&&uS.track(kR,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=dw().config;return"https://".concat(t.gameAPI,"/game/v4/get/").concat(this.options.gameId.replace(/-/g,""),"/?domain=").concat(e,"&v=").concat(Is.version,"&localTime=").concat((new Date).getHours())}},{key:"_checkBlocking",value:(L=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=void 0===this._gameData.dmain||this._gameData.dmain,console.log("zxcv exclude, isAllowedDomain",i,t),t=t||i,(n.bloc_gard&&!0===n.bloc_gard.enabled||!t)&&this._redirectToBlocking();case 8:case"end":return e.stop()}}),e,this)}))),function(){return L.apply(this,arguments)})},{key:"_blockDirectTokenURLEmbedding",value:function(){var e,t=this._checkTokenGameUrl(),n=new Iy,r="html5.gamedistribution.com"!==C(document.referrer).host,i=t&&!oR.SDKExistsOnUpperFrame&&n.get("depth.value")>0&&r;if(i&&(null===(e=this._gameData)||void 0===e||null===(e=e.directTokenUse)||void 0===e?void 0:e.enabled)){var a,s=null===(a=this._gameData)||void 0===a||null===(a=a.directTokenUse)||void 0===a?void 0:a.behavior;"to-loader"===s?this._redirectToLoaderFrame():"to-blocked-page"===s&&this._redirectToBlocking(!0)}return{blocked:i}}},{key:"_redirectToBlocking",value:function(t){var n=this;this.msgrt.send("blocked");var i=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(N.stringify({domain:n._parentDomain,id:i.gameId,img:n._get_game_thumbnail_url(),title:i.title,utm_source:n._parentDomain,utm_medium:(null==i?void 0:i.slug)||(null==i?void 0:i.title)||(null==i?void 0:i.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=C(location.href,!0),a=_R(_R({},i.query),{},{rd:"1"}),s=N.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;YD().disableMidrolltimer?e.midroll=0:m.available&&m.getBoolean("gd_debug_ex")&&(m.getBoolean("gd_disable_midroll_timer")?e.midroll=0:e.midroll=this._getDefaultGameData().midroll)}},{key:"_checkSplashAndPromoScreens",value:function(){var e,t,n;!1===(null===(e=this._gameData.loader)||void 0===e?void 0:e.mobile)&&this._getisMobile()&&(this._gameData.loader.enabled=!1);var r,i=this._gameData,a=i.gdpr&&!0===i.gdpr.consent,s=i.loader,o=null===(t=i.promo)||void 0===t?void 0:t[null===(n=i.promo)||void 0===n||null===(n=n.template)||void 0===n?void 0:n.preroll];(i.preroll||(this.adRequestTimer=Date.now()),this.options.loader.enabled)?null!=o&&o.enabled?this._createPromoBeforeSplash(i,a):s.enabled&&!0!==(null===(r=s.splash)||void 0===r?void 0:r.skip)?this._createSplash(i,a):this.onResumeGame("Skipped splash.","success"):s.enabled||this._bridge.isTokenGameURL&&this._bridge.isExtHostedGameURL||(this.options.advertisementSettings.autoplay||a?null!=o&&o.enabled?this._createPromoBeforeSplash(i,a):!1!==s.enabled&&this._createSplash(i,a):null!=o&&o.enabled&&this._createPromo(i,a))}},{key:"_initializeVideoAd",value:(B=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=h(this.options.advertisementSettings,t.sdk)),this.macros=new E({game:t,bridge:this._bridge}),this.adInstance=new tS(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=Is,this.adInstance._send_atom_event("gd.location"),e.next=17,this.adInstance.start();case 17:case"end":return e.stop()}}),e,this)}))),function(){return B.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){p("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){p("DEVELOPER_ERROR",e.message,"warning")}}},{key:"_onEvent",value:function(e){p(e.name,e.message,e.status);try{this.options.onEvent({name:e.name,message:e.message,status:e.status,skipForward:e.skipForward,adPosition:e.adPosition})}catch(e){p("DEVELOPER_ERROR",e.message,"warning")}}},{key:"_getGameData",value:(P=e(r.mark((function e(){var t;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,bw();case 2:return t=e.sent,this.msgrt.setGameData(t),x(t.diagnostic),e.abrupt("return",t);case 6:case"end":return e.stop()}}),e,this)}))),function(){return P.apply(this,arguments)})},{key:"_createSplash",value:(O=e(r.mark((function n(i,a){var s,o,d,c,u=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(_R(_R({},this.options),{},{isConsentDomain:a,version:Is.version}),i,this._parentDomain),n.next=6,Dw();case 6:d=n.sent,c=d.enabled,o.on("playClick",function(){var n,s,d=this;if(t(this,u),((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,d),console.log("gd-adflow locus-first-user-action error",e)}.bind(this)),a){var l=new Date;l.setDate(l.getDate()+90),document.cookie="ogdpr_tracking=1; expires=".concat(l.toUTCString(),"; path=/")}if(this._hideCMPButton(),WS("play"),c)window.gdsdk.showAd(A.Interstitial,{position:"preroll"}).catch(function(e){t(this,d),o.hide()}.bind(this));else{var h={position:"preroll"};(function(){t(this,d),Us.firstAdapterModeAdsense&&(console.log("promo-test, set first adapter to adssense 1"),h.adapter="adsense")}).bind(this),this.showAd(A.Interstitial,h).catch(function(e){t(this,d)}.bind(this))}null!==(s=this._gameData)&&void 0!==s&&null!==(s=s.evnts)&&void 0!==s&&s.enabled&&(kS({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,u),o.hide()}.bind(this)),this.eventBus.subscribe("SDK_GAME_START",function(){t(this,u),o.hide()}.bind(this));case 12:case"end":return n.stop()}}),n,this)}))),function(e,t){return O.apply(this,arguments)})},{key:"_createPromoBeforeSplash",value:(T=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.prev=0,e.next=3,this._createPrerollPromoTemplate(n);case 3:s=e.sent,(o=new s(_R(_R({},this.options),{},{isConsentDomain:i,version:Is.version,template:null===(a=n.promo)||void 0===a||null===(a=a.template)||void 0===a?void 0:a.preroll}),n)).on("done",function(){t(this,d),o.hide(),this._createSplash(n,i)}.bind(this)),e.next=12;break;case 8:e.prev=8,e.t0=e.catch(0),console.log(e.t0),this._createSplash(n,i);case 12:case"end":return e.stop()}}),e,this,[[0,8]])}))),function(e,t){return T.apply(this,arguments)})},{key:"_createPromo",value:(y=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.prev=0,e.next=3,this._createPrerollPromoTemplate(n);case 3:s=e.sent,(o=new s(_R(_R({},this.options),{},{isConsentDomain:i,version:Is.version,template:null===(a=n.promo)||void 0===a||null===(a=a.template)||void 0===a?void 0:a.preroll}),n)).on("done",function(){t(this,d),o.hide(),this.onResumeGame("Resumed after the promo","warning")}.bind(this)),this.onPauseGame("Pause the game for the promo","success"),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(0),this.onResumeGame("Resumed after the promo","warning");case 12:case"end":return e.stop()}}),e,this,[[0,9]])}))),function(e,t){return y.apply(this,arguments)})},{key:"showBanner",value:function(){var e=this;this.showAd(A.Interstitial).catch(function(){t(this,e)}.bind(this))}},{key:"showAd",value:(b=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,c,u;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,WS("play"),!a._autoResumeIfAdsAreDisabled(n||"interstitial")){e.next=6;break}return e.abrupt("return",t());case 6:return d={adType:n||"interstitial",params:i,adTimestamp:a.adRequestTimer},e.next=10,a.sdkReady;case 10:return c=e.sent,e.next=13,a.videoAdReady;case 13:if(null!==(o=a._gameData.lp)&&void 0!==o&&o.load||a._sendLoadedEvent(1),a._sendGamedockGamePlay(),a._rejectAdIfGameBlocked({gameData:c,adRequest:d}),a._rejectAdIfAdDisabled({gameData:c,adRequest:d}),a._rejectAdIfUnsupportedType({adRequest:d}),"rewarded"===n&&a._setGameRewardedFlag(),null!=i&&i.isGift||a._rejectAdIfAdRateHits({gameData:c,adRequest:d}),i&&i.isGift&&i.isMidrollPlus||!a.adBlockerPage||(a._setAdRequestTimer(),a.adBlockerPage.show()),a.adInstance.attachAfgPosition(d),!a.adFlowRunning){e.next=24;break}return e.abrupt("return",t());case 24:return a.adFlowRunning=!0,u=new $S(a),a._adFlow=u,e.next=29,u.runAdFlow(d);case 29:a.adFlowRunning=!1,a._adFlow=null,t(),a._post_message({topic:"adrequest.instream"}),e.next=41;break;case 35:e.prev=35,e.t0=e.catch(0),a.adFlowRunning=!1,a._adFlow=null,a.onResumeGame(e.t0.message,"warning"),s(e.t0.message);case 41:case"end":return e.stop()}}),e,null,[[0,35]])})));return function(e,n){return t.apply(this,arguments)}}()));case 2:case"end":return t.stop()}}),t)}))),function(e){return b.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 this._gameData.diagnostic,this._gameData.disableAds,a&&(this._runAutoResume(),n=!0),n}},{key:"_runAutoResume",value:function(){var e="CONTENT_PAUSE_REQUESTED",t="CONTENT_RESUME_REQUESTED";this.eventBus.broadcast(e,{name:e,message:"Auto pause when ads are disabled"}),this.eventBus.broadcast(t,{name:t,message:"Auto resume when ads are disabled"}),this.onResumeGame("Advertisement(s) are cancelled. Start / resume the game.","success")}},{key:"_giveGift",value:function(e){var t,n,r,i,a,s;switch(e){case"preroll":null!==(t=this._gameData)&&void 0!==t&&null!==(t=t.gft)&&void 0!==t&&t[e].enabled&&(null===(n=this._gameData)||void 0===n||null===(n=n.gft)||void 0===n||null===(n=n[e].durations[this._giftCount[e]])||void 0===n?void 0:n.after)===this.adInstance.adPrerollCount&&this.decideToGiveAGift(e);break;case"midroll":null!==(r=this._gameData)&&void 0!==r&&null!==(r=r.gft)&&void 0!==r&&r[e].enabled&&(null===(i=this._gameData)||void 0===i||null===(i=i.gft)||void 0===i||null===(i=i[e].durations[this._giftCount[e]])||void 0===i?void 0:i.after)===this.adInstance.adMidrollCount&&this.decideToGiveAGift(e);break;case"rewarded":null!==(a=this._gameData)&&void 0!==a&&null!==(a=a.gft)&&void 0!==a&&a[e].enabled&&(null===(s=this._gameData)||void 0===s||null===(s=s.gft)||void 0===s||null===(s=s[e].durations[this._giftCount[e]])||void 0===s?void 0:s.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=e.adRequest;if(t.disableAds[n.adType]||this._whitelabelPartner)throw new Error("Advertisements are disabled.")}},{key:"_rejectAdIfUnsupportedType",value:function(e){var t=e.adRequest;if(t.adType){if(t.adType!==A.Interstitial&&t.adType!==A.Rewarded)throw new Error("Unsupported an advertisement type: ",t.adType)}else t.adType=A.Interstitial}},{key:"_rejectAdIfRewardedDisabled",value:function(e){var t=e.gameData;if(e.adRequest.adType===A.Rewarded&&!t.rewardedAds)throw new Error("Rewarded ads are disabled.")}},{key:"_rejectAdIfAdRateHits",value:function(e){var t,n,r,i=e.gameData,a=e.adRequest,s=null;a.adType===A.Interstitial&&null!==(t=i.diagnostic)&&void 0!==t&&null!==(t=t.useMidrollIndex)&&void 0!==t&&t.enabled&&this.adInstance.noPreroll?this.adInstance.adMidrollCount>(null===(n=i.diagnostic)||void 0===n||null===(n=n.useMidrollIndex)||void 0===n?void 0:n.indexes.length)-1||(s=6e4*(null===(r=i.diagnostic)||void 0===r||null===(r=r.useMidrollIndex)||void 0===r?void 0:r.indexes[this.adInstance.adMidrollCount])):s=i.midroll;if(a.adType===A.Interstitial&&void 0!==this.adRequestTimer&&Date.now()-this.adRequestTimer<s)throw new Error("The advertisement was requested too soon.")}},{key:"preloadAd",value:(v=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=A.Rewarded,e.next=16;break;case 14:if(n===A.Interstitial||n===A.Rewarded){e.next=16;break}throw new Error("Unsupported an advertisement type:"+n);case 16:return e.next=18,i.adInstance.preloadAd(n);case 18:o=e.sent,t(o),e.next=25;break;case 22:e.prev=22,e.t0=e.catch(0),a(e.t0);case 25:case"end":return e.stop()}}),e,null,[[0,22]])})));return function(e,n){return t.apply(this,arguments)}}()));case 1:case"end":return t.stop()}}),t)}))),function(e){return v.apply(this,arguments)})},{key:"cancelAd",value:(g=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 g.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;try{this._allowExternals({enabled:!1}),this.options.resumeGame()}catch(e){console.log("gd-adflow error onResumeGame",e),p("DEVELOPER_ERROR",e.message,"warning")}var r="SDK_GAME_START";this.eventBus.broadcast(r,{name:r,message:e,status:t,analytics:{category:"SDK",action:r,label:this.options.gameId+""}}),this.adInstance&&this.adInstance._hideAddResume(),this.adInstance&&this.adInstance._hideAdSpinner(),null===(n=this._gameData.evnts)||void 0===n||!n.enabled||this._isMasterGameURL()&&!this._isExtHostedGameURL()||(kS({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){p("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()||(kS({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(),m.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 C(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()),u=decodeURIComponent((e||n)&&r.topDomain?r.topDomain:n&&0===o()?d:c()),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,A=(e||n)&&r.loaderEnabled,g=(e||n)&&r.loaderEnabled,v=(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:v,parentURL:i,parentDomain:d,topDomain:u&&u.length?u:d,noGAPageView:f,noLotamePageView:m,noGamedockSDK:A,noMinijuegosSDK:g,version:r.version,pauseGameOnStartup:b,depth:o(),domainMatched:d===u,exports:{formatTokenURLSearch:this._formatTokenURLSearch.bind(this),extendUrlQuery:this._extendUrlQuery.bind(this),base64Encode:this._base64_encode.bind(this)}}}},{key:"_isHostHTML5Domain",value:function(){var e=new C(location.href);return"html5.gamedistribution.com"===(null==e?void 0:e.host.toLowerCase())}},{key:"_isExternalHoster",value:function(){var e;return null===(e=this._gameData)||void 0===e||null===(e=e.extHosting)||void 0===e?void 0:e.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=C(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=C(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 C(location.href,!0);if(!n.query.gd_zone_config)return;e=n.query.gd_zone_config}else if(t.test(document.referrer)){var r=new C(document.referrer,!0);if(!r.query.gd_zone_config)return;e=r.query.gd_zone_config}else{var i=new C(location.href,!0);if(!i.query.gd_zone_config)return;e=i.query.gd_zone_config}return JSON.parse(I.decode(decodeURIComponent(e)))}catch(e){}}},{key:"_getSplashTemplate",value:function(e){var t=e.splash;return new rS(t).splash()}},{key:"_createPrerollPromoTemplate",value:(i=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 a=null===(n=t.promo)||void 0===n?void 0:n[null===(i=t.promo)||void 0===i||null===(i=i.template)||void 0===i?void 0:i.preroll],s=new nS(a),e.abrupt("return",s.promo());case 3:case"end":return e.stop()}}),e)}))),function(e){return i.apply(this,arguments)})},{key:"_formatTokenURLSearch",value:function(e){var t="";try{t=encodeURIComponent(I.encode(JSON.stringify(e)))}catch(e){}try{var n=new C(location.href,!0);return n.query=n.query||{},n.query.gd_zone_config=t,"?".concat(N.stringify(n.query))}catch(e){return"?gd_zone_config=".concat(t)}}},{key:"_extendUrlQuery",value:function(e,t){var n=new C(e,!0);return n.query=_R(_R({},n.query),t),n.toString()}},{key:"_base64_encode",value:function(e){return I.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)kR.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:"decideToGiveAGift",value:function(n){var i=this;try{var a,s=null===(a=this._gameData)||void 0===a?void 0:a.gft[n],o=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..."):(i.showAd(A.Interstitial,{position:n,isGift:!0}).catch(function(e){t(this,a)}.bind(this)),clearInterval(o),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 yR}},{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(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(A.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(A.Interstitial,{position:"midroll",giftType:i,isMidrollPlus:!0}).catch(function(n){t(this,e)}.bind(this))}.bind(this),this._gameData.midroll)}}}]),n}();function xR(){return(xR=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,Ew();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"),f(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 DR=new M,SR=function(e){var n=this;!function(){xR.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&&(DR.off("sdk-event",s),n())}.bind(this);DR.on("sdk-event",s),m("showAd",{adType:e})}.bind(this))}.bind(this),a=function(){return t(this,n),r||(r=new ER(e)),r}.bind(this),s=function(e){return t(this,n),i(e)}.bind(this),o=function(e){return t(this,n),"gdsdk://preloaded"}.bind(this),d=function(e){return t(this,n),a().showDisplayAd(e)}.bind(this),c=function(){return t(this,n),m("cancelAd")}.bind(this),u=function(){return t(this,n),m("openConsole")}.bind(this),l=function(){return t(this,n),m("showBanner")}.bind(this),h=function(){return t(this,n),m("session")}.bind(this),p=function(e){return t(this,n),m("sendGenericEvent",{options:e})}.bind(this),f=function(){t(this,n),console.log("_sendSDKReady")}.bind(this),m=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),A=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&&v(r)}),!1)}.bind(this),g=function(){t(this,n),A(),m("init")}.bind(this),v=function(r){t(this,n);try{DR.emit("sdk-event",r),e.onEvent&&e.onEvent(r)}catch(e){console.log("DEVELOPER ERROR on forwarder-sdk")}}.bind(this);return{showBanner:l,showAd:s,preloadAd:o,showDisplayAd:d,cancelAd:c,openConsole:u,getSession:h,onEvent:v,init:g,_sendSDKReady:f,sendGenericEvent:p}},RR=function(e){var t=SR(e);return t.init(),t},TR=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"!==C(window.location.href).host;return n()&&!(r()||i)?"loader-frame":"game-frame"}.bind(this);return{isMasterGameURL:n,isTokenGameURL:r,isExtHostedGameURL:i,whichFrame:a}},CR="gd-sdk-frame-handshake-request",IR="gd-sdk-frame-handshake-response",OR=function(e){var n=this;return new Promise(function(e,r){var i=this;t(this,n);var a={type:CR},s=!1;window.addEventListener("message",(function(t){var n=t.data,r=t.origin,i=t.source,a=n.type;if(a===CR){var o={type:IR};i.postMessage(o,r)}else a===IR&&(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))},PR=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,kw();case 2:return t=e.sent,e.next=6,OR();case 6:if(n=e.sent,oR.SDKExistsOnUpperFrame=!!n,t){e.next=10;break}return e.abrupt("return",!1);case 10:return i=TR(),a=i.isMasterGameURL,i.isTokenGameURL,s=a(),e.next=14,xw();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)}}(),BR=nt,LR=ie,UR=ue,MR=Wl,FR=ns,jR=Ji,NR=UR(Vi.f),GR=UR([].push),qR=BR&&LR((function(){var e=Object.create(null);return e[2]=2,!NR(e,2)})),HR=function(e){return function(t){for(var n,r=jR(t),i=FR(r),a=qR&&null===MR(r),s=i.length,o=0,d=[];s>o;)n=i[o++],BR&&!(a?n in r:NR(r,n))||GR(d,e?[n,r[n]]:r[n]);return d}},VR={entries:HR(!0),values:HR(!1)}.values;$a({target:"Object",stat:!0},{values:function(e){return VR(e)}});var QR,zR={},WR=function(e){try{if(e.skipForward)return;if(zR.source){var t={type:"gd-sdk-on-event",event:e};zR.source.postMessage(t,zR.origin)}}catch(e){console.log("gd-sdk forwardEvent err",e)}},KR=function(){WR({name:"SDK_READY",status:"success",message:"Everything is ready."}),WR({name:"SDK_GAME_START",status:"success",message:"Advertisement(s) are done. Start / resume the game."}),WR({name:"CONTENT_RESUME_REQUESTED",status:"success",message:"Fired when content should be resumed. This usually happens when an ad finishes or collapses."})},YR=function(n){window.addEventListener("message",(function(i){var a=i.data,s=i.origin,o=i.source,d=a.type,c=a.method,u=a.options;if("gd-sdk-self"!==d){if("gd-sdk"===d){if(!zR.source&&"init"===c)return function(e){var t=e.source,n=e.origin;zR={source:t,origin:n}}({source:o,origin:s}),void KR();var l=n[c];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"===c&&Us.firstAdapterModeAdsense&&"rewarded"!==u.adType&&(console.log("promo-test, set first adapter to adssense 3"),u.params=u.params?u.params:{},u.params.adapter="adsense")}.bind(this),!(i=l.apply(n,Object.values(u)))||!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:c,options:u};window.postMessage(h,location.origin)}}),!1)},JR=function(e){!function(e){var t=e.onEvent;e.onEvent=function(e){WR(e),t.apply(this,arguments)}}(e);var t=new ER(e);return YR(t),t},ZR=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:[]},pv(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,mv(this.moduleName);case 3:this.module=e.sent,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}(),XR=function(){var t=e(r.mark((function t(){var n,i,a,s,o,d,c,u,l,h,p,f,m,A,g,v;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=function(){var e,t=(e=new Iy).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 Iy).get("partner.url.value");return new C(e,!0)},c=function(){var e="ae-soft-323";try{var t=d(),n=t.pathname,r=n.split("/"),i=r[r.length-1];Bs("aeria-ylogin:loc",t,n,i),e=i}catch(e){Ls("Error on getting aeria game id",e)}return e}(),u={action:"score",data:{gameId:c,score:100},env:a?"staging":"production",system:"Softgames"},l=function(){var e=window.parent||window,t=u;e.postMessage(t,"*")},h=new _,t.next=13,bw();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())})),A=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 ZR).runYMenu({gameId:c});case 2:case"end":return e.stop()}}),e)})));return function(){return t.apply(this,arguments)}}(),g=TR(),v=g.whichFrame,"game-frame"===v()&&(f||A());case 21:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),$R=function(e){try{var t=rw(e);e.gameId||t.send("nogameid",{message:"".concat(mb.parentURL)})}catch(e){}},eT=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,XR();case 3:e.next=8;break;case 5:e.prev=5,e.t0=e.catch(0),console.log("zxcv error on creating some bridge module");case 8:case"end":return e.stop()}}),e,null,[[0,5]])})));return function(){return t.apply(this,arguments)}}(),tT={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,$R(t),vw(t),e.next=5,PR();case 5:return n=e.sent,e.next=8,eT();case 8:return window.isForwarderFrame=n,i=n?RR(t):JR(t),Sw(),e.abrupt("return",i);case 14:return e.prev=14,e.t0=e.catch(0),console.log("gd:adp: sdk adaptor create failed, fallback to default adapter",e.t0),e.abrupt("return",JR(t));case 18:case"end":return e.stop()}}),e,null,[[0,14]])})));return function(e){return t.apply(this,arguments)}}()};function nT(){return(nT=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,Cw();case 2:if(!e.sent){e.next=7;break}e.t0=window.gdsdk,e.next=10;break;case 7:return e.next=9,sT(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 rT,iT,aT=!1;function sT(e){var n=this;return new Promise(function(r,i){var a=this;if(t(this,n),QR)return r(QR);if(aT)var s=setInterval(function(){t(this,a),QR&&(aT=!1,clearInterval(s),r(QR))}.bind(this),100);else aT=!0,tT.create(e).then(function(e){t(this,a),QR=e,e._sendSDKReady(),aT=!1,r(QR)}.bind(this))}.bind(this))}function oT(e){return sT(e),{invoke:function(t){return function(e,t){return nT.apply(this,arguments)}(e,t)}}}function dT(n,i){var a=this;return new Promise(function(s,o){var d,c=this;t(this,a);var u=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);cT({text:"sdk-wrapper-script-load"}),f(u[0],"gd-sdk-wrp",{alternates:u}).catch(function(e){t(this,c),cT({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,cT({text:"sdk-wrapper load success"}),t=window.GDSDKWRP.GDSDKWRP,a=new t,cT({text:"sdk-wrapper before gdSdkWrp.init"}),e.next=7,a.init(n,i);case 7:iT=e.sent,cT({text:"sdk-wrapper after gdSdkWrp.init"}),s(iT),e.next=16;break;case 12:e.prev=12,e.t0=e.catch(0),cT({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 cT(e){try{var t={tp:"gd.wrp",args:e};fetch("https://tag.atom.gamedistribution.com/v1/dmp?ar=".concat(encodeURIComponent(I.encode(JSON.stringify(t))))),console.log(V(Object.values(e)))}catch(e){}}function uT(e){if(e){var t=e.name,n=e.message,r=e.status;try{cT({text:"samsung-wrp send-game-event",evt:e,hasOptions:!!rT}),rT&&rT.onEvent({name:t,message:n,status:r})}catch(t){cT({text:"samsung-wrp DEVELOPER-ERROR",evt:e,err:t})}}}function lT(e){return hT.apply(this,arguments)}function hT(){return(hT=e(r.mark((function e(t){var n,i,a,s,o,d,c,u,l;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return rT=t,vw(t),e.next=4,bw();case 4:if(s=e.sent,!iT){e.next=7;break}return e.abrupt("return",iT);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,c=null==s?void 0:s.gameId,u=null==s?void 0:s.title,AT("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,cT({text:"sdk-wrapper-load-instant-play"}),e.next=18,fT();case 18:return cT({text:"sdk-wrapper-load-instant-play-loaded"}),e.next=21,dT(l,{onEvent:uT,game:{gameId:c,title:u,version:d}});case 21:return iT=e.sent,e.abrupt("return",iT);case 23:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function pT(){return pT=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,AT("beforeGetDeveloperSettings"),i=n(),AT("afterGetDeveloperSettings"),e.prev=4,e.next=7,lT(i);case 7:a=e.sent,AT("after get SDK wrapper: ".concat(!!a)),a&&(AT("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),AT("Error on SDK wrapper init: ".concat(e.t0.message));case 16:case"end":return e.stop()}}),e,null,[[4,12]])}))),pT.apply(this,arguments)}function fT(){return mT.apply(this,arguments)}function mT(){return(mT=e(r.mark((function e(){var n,i=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n="https://gtg.samsungapps.com/gsinstant-sdk/gsinstant.0.43.js",e.next=3,f(n,"samsung_instant_play_sdk",{alternates:[n],error_prefix:"Blocked:",exists:function(){return t(this,i),window.GSInstant}.bind(this)});case 3:case"end":return e.stop()}}),e,this)})))).apply(this,arguments)}function AT(e){window.sdkLog.push(e)}function gT(){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}window.sdkLog=[],"img.samsungapps.com"===function(){var e,t,n=C(window.location.href,!0),r=n.host,i=n.query,a=r,s=null==i?void 0:i.gd_sdk_referrer_url;return s&&(s=s.startsWith("https://")||s.startsWith("http://")?s:"https://".concat(s),null!==(t=e=C(s,!0))&&void 0!==t&&t.host&&(a=e.host)),a}()?AT("skipped normal SDK init!"):(!function(){FD();var n=oT(gT());function i(){var i=this;this.AdType=A,this.preloadAd=function(e){var r=this;return n.invoke(function(n){return t(this,r),n.preloadAd(e)}.bind(this))},this.showAd=function(){var i=e(r.mark((function e(i,a){var s=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",n.invoke(function(e){var n=this;if(t(this,s),i===A.Display)return e.showDisplayAd(a);var r={};return function(){t(this,n),Us.firstAdapterModeAdsense&&(console.log("promo-test, set first adapter to adssense 2"),r.adapter="adsense")}.bind(this),e.showAd(i,r)}.bind(this)));case 1: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),gv.showLeaderboard()}.bind(this),addScore:function(e){t(this,i),gv.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}(),AT("afterSDKInit")),function(e){pT.apply(this,arguments)}({_get_developer_sets:gT});