@bygd/gd-sdk-pes 1.39.21 → 1.39.22

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 Q from"@babel/runtime/helpers/toConsumableArray";var V="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 V&&V)||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.30.1",mode:"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.30.1/LICENSE",source:"https://github.com/zloirock/core-js"});var 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 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=!!Object.getOwnPropertySymbols&&!Le((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Be&&Be<41})),Me=Ue&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Fe=W,je=K.exports,Ne=_e,Ge=xe,qe=Ue,He=Me,Qe=Fe.Symbol,Ve=je("wks"),ze=He?Qe.for||Qe:Qe&&Qe.withoutSetter||Ge,We=function(e){return Ne(Ve,e)||(Ve[e]=qe&&Ne(Qe,e)?Qe[e]:ze("Symbol."+e)),Ve[e]},Ke={};Ke[We("toStringTag")]="z";var Ye="[object z]"===String(Ke),Je="object"==typeof document&&document.all,Ze={all:Je,IS_HTMLDDA:void 0===Je&&void 0!==Je},Xe=Ze.all,$e=Ze.IS_HTMLDDA?function(e){return"function"==typeof e||e===Xe}:function(e){return"function"==typeof e},et={},tt=!ie((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),nt=$e,rt=Ze.all,it=Ze.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:nt(e)||e===rt}:function(e){return"object"==typeof e?null!==e:nt(e)},at=it,st=W.document,ot=at(st)&&at(st.createElement),dt=function(e){return ot?st.createElement(e):{}},ct=dt,ut=!tt&&!ie((function(){return 7!=Object.defineProperty(ct("div"),"a",{get:function(){return 7}}).a})),lt=tt&&ie((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),ht=it,pt=String,ft=TypeError,mt=function(e){if(ht(e))return e;throw ft(pt(e)+" is not an object")},At=ae,gt=Function.prototype.call,vt=At?gt.bind(gt):function(){return gt.apply(gt,arguments)},bt=W,_t=$e,yt=function(e,t){return arguments.length<2?(n=bt[e],_t(n)?n:void 0):bt[e]&&bt[e][t];var n},wt=ue({}.isPrototypeOf),kt=yt,Et=$e,xt=wt,Dt=Object,St=Me?function(e){return"symbol"==typeof e}:function(e){var t=kt("Symbol");return Et(t)&&xt(t.prototype,Dt(e))},Rt=String,Tt=function(e){try{return Rt(e)}catch(e){return"Object"}},Ct=$e,It=Tt,Ot=TypeError,Pt=function(e){if(Ct(e))return e;throw Ot(It(e)+" is not a function")},Bt=Pt,Lt=le,Ut=function(e,t){var n=e[t];return Lt(n)?void 0:Bt(n)},Mt=vt,Ft=$e,jt=it,Nt=TypeError,Gt=vt,qt=it,Ht=St,Qt=Ut,Vt=function(e,t){var n,r;if("string"===t&&Ft(n=e.toString)&&!jt(r=Mt(n,e)))return r;if(Ft(n=e.valueOf)&&!jt(r=Mt(n,e)))return r;if("string"!==t&&Ft(n=e.toString)&&!jt(r=Mt(n,e)))return r;throw Nt("Can't convert object to primitive value")},zt=TypeError,Wt=We("toPrimitive"),Kt=function(e,t){if(!qt(e)||Ht(e))return e;var n,r=Qt(e,Wt);if(r){if(void 0===t&&(t="default"),n=Gt(r,e,t),!qt(n)||Ht(n))return n;throw zt("Can't convert object to primitive value")}return void 0===t&&(t="number"),Vt(e,t)},Yt=St,Jt=function(e){var t=Kt(e,"string");return Yt(t)?t:t+""},Zt=tt,Xt=ut,$t=lt,en=mt,tn=Jt,nn=TypeError,rn=Object.defineProperty,an=Object.getOwnPropertyDescriptor,sn="enumerable",on="configurable",dn="writable";et.f=Zt?$t?function(e,t,n){if(en(e),t=tn(t),en(n),"function"==typeof e&&"prototype"===t&&"value"in n&&dn in n&&!n[dn]){var r=an(e,t);r&&r[dn]&&(e[t]=n.value,n={configurable:on in n?n[on]:r[on],enumerable:sn in n?n[sn]:r[sn],writable:!1})}return rn(e,t,n)}:rn:function(e,t,n){if(en(e),t=tn(t),en(n),Xt)try{return rn(e,t,n)}catch(e){}if("get"in n||"set"in n)throw nn("Accessors not supported");return"value"in n&&(e[t]=n.value),e};var cn={exports:{}},un=tt,ln=_e,hn=Function.prototype,pn=un&&Object.getOwnPropertyDescriptor,fn=ln(hn,"name"),mn={EXISTS:fn,PROPER:fn&&"something"===function(){}.name,CONFIGURABLE:fn&&(!un||un&&pn(hn,"name").configurable)},An=$e,gn=ee,vn=ue(Function.toString);An(gn.inspectSource)||(gn.inspectSource=function(e){return vn(e)});var bn,_n,yn,wn=gn.inspectSource,kn=$e,En=W.WeakMap,xn=kn(En)&&/native code/.test(String(En)),Dn=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},Sn=et,Rn=Dn,Tn=tt?function(e,t,n){return Sn.f(e,t,Rn(1,n))}:function(e,t,n){return e[t]=n,e},Cn=K.exports,In=xe,On=Cn("keys"),Pn=function(e){return On[e]||(On[e]=In(e))},Bn={},Ln=xn,Un=W,Mn=it,Fn=Tn,jn=_e,Nn=ee,Gn=Pn,qn=Bn,Hn="Object already initialized",Qn=Un.TypeError,Vn=Un.WeakMap;if(Ln||Nn.state){var zn=Nn.state||(Nn.state=new Vn);zn.get=zn.get,zn.has=zn.has,zn.set=zn.set,bn=function(e,t){if(zn.has(e))throw Qn(Hn);return t.facade=e,zn.set(e,t),t},_n=function(e){return zn.get(e)||{}},yn=function(e){return zn.has(e)}}else{var Wn=Gn("state");qn[Wn]=!0,bn=function(e,t){if(jn(e,Wn))throw Qn(Hn);return t.facade=e,Fn(e,Wn,t),t},_n=function(e){return jn(e,Wn)?e[Wn]:{}},yn=function(e){return jn(e,Wn)}}var Kn={set:bn,get:_n,has:yn,enforce:function(e){return yn(e)?_n(e):bn(e,{})},getterFor:function(e){return function(t){var n;if(!Mn(t)||(n=_n(t)).type!==e)throw Qn("Incompatible receiver, "+e+" required");return n}}},Yn=ue,Jn=ie,Zn=$e,Xn=_e,$n=tt,er=mn.CONFIGURABLE,tr=wn,nr=Kn.enforce,rr=Kn.get,ir=String,ar=Object.defineProperty,sr=Yn("".slice),or=Yn("".replace),dr=Yn([].join),cr=$n&&!Jn((function(){return 8!==ar((function(){}),"length",{value:8}).length})),ur=String(String).split("String"),lr=cn.exports=function(e,t,n){"Symbol("===sr(ir(t),0,7)&&(t="["+or(ir(t),/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!Xn(e,"name")||er&&e.name!==t)&&($n?ar(e,"name",{value:t,configurable:!0}):e.name=t),cr&&n&&Xn(n,"arity")&&e.length!==n.arity&&ar(e,"length",{value:n.arity});try{n&&Xn(n,"constructor")&&n.constructor?$n&&ar(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var r=nr(e);return Xn(r,"source")||(r.source=dr(ur,"string"==typeof t?t:"")),e};Function.prototype.toString=lr((function(){return Zn(this)&&rr(this).source||tr(this)}),"toString");var hr=$e,pr=et,fr=cn.exports,mr=Z,Ar=function(e,t,n,r){r||(r={});var i=r.enumerable,a=void 0!==r.name?r.name:t;if(hr(n)&&fr(n,a,r),r.global)i?e[t]=n:mr(t,n);else{try{r.unsafe?e[t]&&(i=!0):delete e[t]}catch(e){}i?e[t]=n:pr.f(e,t,{value:n,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return e},gr=ue,vr=gr({}.toString),br=gr("".slice),_r=function(e){return br(vr(e),8,-1)},yr=Ye,wr=$e,kr=_r,Er=We("toStringTag"),xr=Object,Dr="Arguments"==kr(function(){return arguments}()),Sr=yr?kr: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=xr(e),Er))?n:Dr?kr(t):"Object"==(r=kr(t))&&wr(t.callee)?"Arguments":r},Rr=Sr,Tr=Ye?{}.toString:function(){return"[object "+Rr(this)+"]"};Ye||Ar(Object.prototype,"toString",Tr,{unsafe:!0});var Cr={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},Ir=dt("span").classList,Or=Ir&&Ir.constructor&&Ir.constructor.prototype,Pr=Or===Object.prototype?void 0:Or,Br=_r,Lr=ue,Ur=function(e){if("Function"===Br(e))return Lr(e)},Mr=Pt,Fr=ae,jr=Ur(Ur.bind),Nr=function(e,t){return Mr(e),void 0===t?e:Fr?jr(e,t):function(){return e.apply(t,arguments)}},Gr=ie,qr=_r,Hr=Object,Qr=ue("".split),Vr=Gr((function(){return!Hr("z").propertyIsEnumerable(0)}))?function(e){return"String"==qr(e)?Qr(e,""):Hr(e)}:Hr,zr=Math.ceil,Wr=Math.floor,Kr=Math.trunc||function(e){var t=+e;return(t>0?Wr:zr)(t)},Yr=function(e){var t=+e;return t!=t||0===t?0:Kr(t)},Jr=Yr,Zr=Math.min,Xr=function(e){return e>0?Zr(Jr(e),9007199254740991):0},$r=Xr,ei=function(e){return $r(e.length)},ti=_r,ni=Array.isArray||function(e){return"Array"==ti(e)},ri=ue,ii=ie,ai=$e,si=Sr,oi=wn,di=function(){},ci=[],ui=yt("Reflect","construct"),li=/^\s*(?:class|function)\b/,hi=ri(li.exec),pi=!li.exec(di),fi=function(e){if(!ai(e))return!1;try{return ui(di,ci,e),!0}catch(e){return!1}},mi=function(e){if(!ai(e))return!1;switch(si(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return pi||!!hi(li,oi(e))}catch(e){return!0}};mi.sham=!0;var Ai=!ui||ii((function(){var e;return fi(fi.call)||!fi(Object)||!fi((function(){e=!0}))||e}))?mi:fi,gi=ni,vi=Ai,bi=it,_i=We("species"),yi=Array,wi=function(e){var t;return gi(e)&&(t=e.constructor,(vi(t)&&(t===yi||gi(t.prototype))||bi(t)&&null===(t=t[_i]))&&(t=void 0)),void 0===t?yi:t},ki=function(e,t){return new(wi(e))(0===t?0:t)},Ei=Nr,xi=Vr,Di=ge,Si=ei,Ri=ki,Ti=ue([].push),Ci=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=Di(d),m=xi(f),A=Ei(c,u),g=Si(m),v=0,b=l||Ri,_=t?b(d,g):n||s?b(d,0):void 0;g>v;v++)if((o||v in m)&&(p=A(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:Ti(_,h)}else switch(e){case 4:return!1;case 7:Ti(_,h)}return a?-1:r||i?i:_}},Ii={forEach:Ci(0),map:Ci(1),filter:Ci(2),some:Ci(3),every:Ci(4),find:Ci(5),findIndex:Ci(6),filterReject:Ci(7)},Oi=ie,Pi=function(e,t){var n=[][e];return!!n&&Oi((function(){n.call(null,t||function(){return 1},1)}))},Bi=Ii.forEach,Li=W,Ui=Cr,Mi=Pr,Fi=Pi("forEach")?[].forEach:function(e){return Bi(this,e,arguments.length>1?arguments[1]:void 0)},ji=Tn,Ni=function(e){if(e&&e.forEach!==Fi)try{ji(e,"forEach",Fi)}catch(t){e.forEach=Fi}};for(var Gi in Ui)Ui[Gi]&&Ni(Li[Gi]&&Li[Gi].prototype);Ni(Mi);var qi={},Hi={},Qi={}.propertyIsEnumerable,Vi=Object.getOwnPropertyDescriptor,zi=Vi&&!Qi.call({1:2},1);Hi.f=zi?function(e){var t=Vi(this,e);return!!t&&t.enumerable}:Qi;var Wi=Vr,Ki=fe,Yi=function(e){return Wi(Ki(e))},Ji=tt,Zi=vt,Xi=Hi,$i=Dn,ea=Yi,ta=Jt,na=_e,ra=ut,ia=Object.getOwnPropertyDescriptor;qi.f=Ji?ia:function(e,t){if(e=ea(e),t=ta(t),ra)try{return ia(e,t)}catch(e){}if(na(e,t))return $i(!Zi(Xi.f,e,t),e[t])};var aa={},sa=Yr,oa=Math.max,da=Math.min,ca=function(e,t){var n=sa(e);return n<0?oa(n+t,0):da(n,t)},ua=Yi,la=ca,ha=ei,pa=function(e){return function(t,n,r){var i,a=ua(t),s=ha(a),o=la(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}},fa={includes:pa(!0),indexOf:pa(!1)},ma=_e,Aa=Yi,ga=fa.indexOf,va=Bn,ba=ue([].push),_a=function(e,t){var n,r=Aa(e),i=0,a=[];for(n in r)!ma(va,n)&&ma(r,n)&&ba(a,n);for(;t.length>i;)ma(r,n=t[i++])&&(~ga(a,n)||ba(a,n));return a},ya=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],wa=_a,ka=ya.concat("length","prototype");aa.f=Object.getOwnPropertyNames||function(e){return wa(e,ka)};var Ea={};Ea.f=Object.getOwnPropertySymbols;var xa=yt,Da=aa,Sa=Ea,Ra=mt,Ta=ue([].concat),Ca=xa("Reflect","ownKeys")||function(e){var t=Da.f(Ra(e)),n=Sa.f;return n?Ta(t,n(e)):t},Ia=_e,Oa=Ca,Pa=qi,Ba=et,La=function(e,t,n){for(var r=Oa(t),i=Ba.f,a=Pa.f,s=0;s<r.length;s++){var o=r[s];Ia(e,o)||n&&Ia(n,o)||i(e,o,a(t,o))}},Ua=ie,Ma=$e,Fa=/#|\.prototype\./,ja=function(e,t){var n=Ga[Na(e)];return n==Ha||n!=qa&&(Ma(t)?Ua(t):!!t)},Na=ja.normalize=function(e){return String(e).replace(Fa,".").toLowerCase()},Ga=ja.data={},qa=ja.NATIVE="N",Ha=ja.POLYFILL="P",Qa=ja,Va=W,za=qi.f,Wa=Tn,Ka=Ar,Ya=Z,Ja=La,Za=Qa,Xa=function(e,t){var n,r,i,a,s,o=e.target,d=e.global,c=e.stat;if(n=d?Va:c?Va[o]||Ya(o,{}):(Va[o]||{}).prototype)for(r in t){if(a=t[r],i=e.dontCallGetSet?(s=za(n,r))&&s.value:n[r],!Za(d?r:o+(c?".":"#")+r,e.forced)&&void 0!==i){if(typeof a==typeof i)continue;Ja(a,i)}(e.sham||i&&i.sham)&&Wa(a,"sham",!0),Ka(n,r,a,e)}},$a=_a,es=ya,ts=Object.keys||function(e){return $a(e,es)},ns=ge,rs=ts;Xa({target:"Object",stat:!0,forced:ie((function(){rs(1)}))},{keys:function(e){return rs(ns(e))}});var is=Array.isArray,as=Object.prototype.toString,ss=is||function(e){return!!e&&"[object Array]"==as.call(e)},os={name:"@bygd/gd-sdk-pes",version:"1.39.21",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"}},ds=function(e){var t=cs("object"===n(e)?e:i(e));return t&&t.version?os.version>=t.version?t:void 0:t},cs=function(e){var n=this;if(!ss(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}},us=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 hs={},ps=Sr,fs=String,ms=function(e){if("Symbol"===ps(e))throw TypeError("Cannot convert a Symbol value to a string");return fs(e)},As={},gs=tt,vs=lt,bs=et,_s=mt,ys=Yi,ws=ts;As.f=gs&&!vs?Object.defineProperties:function(e,t){_s(e);for(var n,r=ys(t),i=ws(t),a=i.length,s=0;a>s;)bs.f(e,n=i[s++],r[n]);return e};var ks,Es=yt("document","documentElement"),xs=mt,Ds=As,Ss=ya,Rs=Bn,Ts=Es,Cs=dt,Is="prototype",Os="script",Ps=Pn("IE_PROTO"),Bs=function(){},Ls=function(e){return"<"+Os+">"+e+"</"+Os+">"},Us=function(e){e.write(Ls("")),e.close();var t=e.parentWindow.Object;return e=null,t},Ms=function(){try{ks=new ActiveXObject("htmlfile")}catch(e){}var e,t,n;Ms="undefined"!=typeof document?document.domain&&ks?Us(ks):(t=Cs("iframe"),n="java"+Os+":",t.style.display="none",Ts.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(Ls("document.F=Object")),e.close(),e.F):Us(ks);for(var r=Ss.length;r--;)delete Ms[Is][Ss[r]];return Ms()};Rs[Ps]=!0;var Fs=Object.create||function(e,t){var n;return null!==e?(Bs[Is]=xs(e),n=new Bs,Bs[Is]=null,n[Ps]=e):n=Ms(),void 0===t?n:Ds.f(n,t)},js={},Ns=Jt,Gs=et,Hs=Dn,Qs=function(e,t,n){var r=Ns(t);r in e?Gs.f(e,r,Hs(0,n)):e[r]=n},Vs=ca,zs=ei,Ws=Qs,Ks=Array,Ys=Math.max,Js=function(e,t,n){for(var r=zs(e),i=Vs(t,r),a=Vs(void 0===n?r:n,r),s=Ks(Ys(a-i,0)),o=0;i<a;i++,o++)Ws(s,o,e[i]);return s.length=o,s},Zs=_r,Xs=Yi,$s=aa.f,eo=Js,to="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];js.f=function(e){return to&&"Window"==Zs(e)?function(e){try{return $s(e)}catch(e){return eo(to)}}(e):$s(Xs(e))};var no=cn.exports,ro=et,ao=function(e,t,n){return n.get&&no(n.get,t,{getter:!0}),n.set&&no(n.set,t,{setter:!0}),ro.f(e,t,n)},so={},oo=We;so.f=oo;var co=W,uo=_e,lo=so,ho=et.f,po=function(e){var t=co.Symbol||(co.Symbol={});uo(t,e)||ho(t,e,{value:lo.f(e)})},fo=vt,mo=yt,Ao=We,go=Ar,vo=et.f,bo=_e,_o=We("toStringTag"),yo=function(e,t,n){e&&!n&&(e=e.prototype),e&&!bo(e,_o)&&vo(e,_o,{configurable:!0,value:t})},wo=Xa,ko=W,Eo=vt,xo=ue,Do=tt,So=Ue,Ro=ie,To=_e,Co=wt,Io=mt,Oo=Yi,Po=Jt,Bo=ms,Lo=Dn,Uo=Fs,Mo=ts,Fo=aa,jo=js,No=Ea,Go=qi,qo=et,Ho=As,Qo=Hi,Vo=Ar,zo=ao,Wo=K.exports,Ko=Bn,Yo=xe,Jo=We,Zo=so,Xo=po,$o=function(){var e=mo("Symbol"),t=e&&e.prototype,n=t&&t.valueOf,r=Ao("toPrimitive");t&&!t[r]&&go(t,r,(function(e){return fo(n,this)}),{arity:1})},ed=yo,td=Kn,nd=Ii.forEach,rd=Pn("hidden"),id="Symbol",ad="prototype",sd=td.set,od=td.getterFor(id),dd=Object[ad],cd=ko.Symbol,ud=cd&&cd[ad],ld=ko.TypeError,hd=ko.QObject,pd=Go.f,fd=qo.f,md=jo.f,Ad=Qo.f,gd=xo([].push),vd=Wo("symbols"),bd=Wo("op-symbols"),_d=Wo("wks"),yd=!hd||!hd[ad]||!hd[ad].findChild,wd=Do&&Ro((function(){return 7!=Uo(fd({},"a",{get:function(){return fd(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=pd(dd,t);r&&delete dd[t],fd(e,t,n),r&&e!==dd&&fd(dd,t,r)}:fd,kd=function(e,t){var n=vd[e]=Uo(ud);return sd(n,{type:id,tag:e,description:t}),Do||(n.description=t),n},Ed=function(e,t,n){e===dd&&Ed(bd,t,n),Io(e);var r=Po(t);return Io(n),To(vd,r)?(n.enumerable?(To(e,rd)&&e[rd][r]&&(e[rd][r]=!1),n=Uo(n,{enumerable:Lo(0,!1)})):(To(e,rd)||fd(e,rd,Lo(1,{})),e[rd][r]=!0),wd(e,r,n)):fd(e,r,n)},xd=function(e,t){Io(e);var n=Oo(t),r=Mo(n).concat(Td(n));return nd(r,(function(t){Do&&!Eo(Dd,n,t)||Ed(e,t,n[t])})),e},Dd=function(e){var t=Po(e),n=Eo(Ad,this,t);return!(this===dd&&To(vd,t)&&!To(bd,t))&&(!(n||!To(this,t)||!To(vd,t)||To(this,rd)&&this[rd][t])||n)},Sd=function(e,t){var n=Oo(e),r=Po(t);if(n!==dd||!To(vd,r)||To(bd,r)){var i=pd(n,r);return!i||!To(vd,r)||To(n,rd)&&n[rd][r]||(i.enumerable=!0),i}},Rd=function(e){var t=md(Oo(e)),n=[];return nd(t,(function(e){To(vd,e)||To(Ko,e)||gd(n,e)})),n},Td=function(e){var t=e===dd,n=md(t?bd:Oo(e)),r=[];return nd(n,(function(e){!To(vd,e)||t&&!To(dd,e)||gd(r,vd[e])})),r};So||(Vo(ud=(cd=function(){if(Co(ud,this))throw ld("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?Bo(arguments[0]):void 0,t=Yo(e),n=function(e){this===dd&&Eo(n,bd,e),To(this,rd)&&To(this[rd],t)&&(this[rd][t]=!1),wd(this,t,Lo(1,e))};return Do&&yd&&wd(dd,t,{configurable:!0,set:n}),kd(t,e)})[ad],"toString",(function(){return od(this).tag})),Vo(cd,"withoutSetter",(function(e){return kd(Yo(e),e)})),Qo.f=Dd,qo.f=Ed,Ho.f=xd,Go.f=Sd,Fo.f=jo.f=Rd,No.f=Td,Zo.f=function(e){return kd(Jo(e),e)},Do&&(zo(ud,"description",{configurable:!0,get:function(){return od(this).description}}),Vo(dd,"propertyIsEnumerable",Dd,{unsafe:!0}))),wo({global:!0,constructor:!0,wrap:!0,forced:!So,sham:!So},{Symbol:cd}),nd(Mo(_d),(function(e){Xo(e)})),wo({target:id,stat:!0,forced:!So},{useSetter:function(){yd=!0},useSimple:function(){yd=!1}}),wo({target:"Object",stat:!0,forced:!So,sham:!Do},{create:function(e,t){return void 0===t?Uo(e):xd(Uo(e),t)},defineProperty:Ed,defineProperties:xd,getOwnPropertyDescriptor:Sd}),wo({target:"Object",stat:!0,forced:!So},{getOwnPropertyNames:Rd}),$o(),ed(cd,id),Ko[rd]=!0;var Cd=Ue&&!!Symbol.for&&!!Symbol.keyFor,Id=Xa,Od=yt,Pd=_e,Bd=ms,Ld=K.exports,Ud=Cd,Md=Ld("string-to-symbol-registry"),Fd=Ld("symbol-to-string-registry");Id({target:"Symbol",stat:!0,forced:!Ud},{for:function(e){var t=Bd(e);if(Pd(Md,t))return Md[t];var n=Od("Symbol")(t);return Md[t]=n,Fd[n]=t,n}});var jd=Xa,Nd=_e,Gd=St,qd=Tt,Hd=Cd,Qd=(0,K.exports)("symbol-to-string-registry");jd({target:"Symbol",stat:!0,forced:!Hd},{keyFor:function(e){if(!Gd(e))throw TypeError(qd(e)+" is not a symbol");if(Nd(Qd,e))return Qd[e]}});var Vd=ae,zd=Function.prototype,Wd=zd.apply,Kd=zd.call,Yd="object"==typeof Reflect&&Reflect.apply||(Vd?Kd.bind(Wd):function(){return Kd.apply(Wd,arguments)}),Jd=ue([].slice),Zd=ni,Xd=$e,$d=_r,ec=ms,tc=ue([].push),nc=Xa,rc=yt,ic=Yd,ac=vt,sc=ue,oc=ie,dc=$e,cc=St,uc=Jd,lc=function(e){if(Xd(e))return e;if(Zd(e)){for(var t=e.length,n=[],r=0;r<t;r++){var i=e[r];"string"==typeof i?tc(n,i):"number"!=typeof i&&"Number"!=$d(i)&&"String"!=$d(i)||tc(n,ec(i))}var a=n.length,s=!0;return function(e,t){if(s)return s=!1,t;if(Zd(this))return t;for(var r=0;r<a;r++)if(n[r]===e)return t}}},hc=Ue,pc=String,fc=rc("JSON","stringify"),mc=sc(/./.exec),Ac=sc("".charAt),gc=sc("".charCodeAt),vc=sc("".replace),bc=sc(1..toString),_c=/[\uD800-\uDFFF]/g,yc=/^[\uD800-\uDBFF]$/,wc=/^[\uDC00-\uDFFF]$/,kc=!hc||oc((function(){var e=rc("Symbol")();return"[null]"!=fc([e])||"{}"!=fc({a:e})||"{}"!=fc(Object(e))})),Ec=oc((function(){return'"\\udf06\\ud834"'!==fc("\udf06\ud834")||'"\\udead"'!==fc("\udead")})),xc=function(e,t){var n=uc(arguments),r=lc(t);if(dc(r)||void 0!==e&&!cc(e))return n[1]=function(e,t){if(dc(r)&&(t=ac(r,this,pc(e),t)),!cc(t))return t},ic(fc,null,n)},Dc=function(e,t,n){var r=Ac(n,t-1),i=Ac(n,t+1);return mc(yc,e)&&!mc(wc,i)||mc(wc,e)&&!mc(yc,r)?"\\u"+bc(gc(e,0),16):e};fc&&nc({target:"JSON",stat:!0,arity:3,forced:kc||Ec},{stringify:function(e,t,n){var r=uc(arguments),i=ic(kc?xc:fc,null,r);return Ec&&"string"==typeof i?vc(i,_c,Dc):i}});var Sc=Ea,Rc=ge;Xa({target:"Object",stat:!0,forced:!Ue||ie((function(){Sc.f(1)}))},{getOwnPropertySymbols:function(e){var t=Sc.f;return t?t(Rc(e)):[]}});var Tc=ie,Cc=Pe,Ic=We("species"),Oc=function(e){return Cc>=51||!Tc((function(){var t=[];return(t.constructor={})[Ic]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},Pc=Ii.filter;Xa({target:"Array",proto:!0,forced:!Oc("filter")},{filter:function(e){return Pc(this,e,arguments.length>1?arguments[1]:void 0)}});var Bc=Xa,Lc=ie,Uc=Yi,Mc=qi.f,Fc=tt;Bc({target:"Object",stat:!0,forced:!Fc||Lc((function(){Mc(1)})),sham:!Fc},{getOwnPropertyDescriptor:function(e,t){return Mc(Uc(e),t)}});var jc=Ca,Nc=Yi,Gc=qi,qc=Qs;Xa({target:"Object",stat:!0,sham:!tt},{getOwnPropertyDescriptors:function(e){for(var t,n,r=Nc(e),i=Gc.f,a=jc(r),s={},o=0;a.length>o;)void 0!==(n=i(r,t=a[o++]))&&qc(s,t,n);return s}});var Hc=Xa,Qc=ni,Vc=Ai,zc=it,Wc=ca,Kc=ei,Yc=Yi,Jc=Qs,Zc=We,Xc=Jd,$c=Oc("slice"),eu=Zc("species"),tu=Array,nu=Math.max;Hc({target:"Array",proto:!0,forced:!$c},{slice:function(e,t){var n,r,i,a=Yc(this),s=Kc(a),o=Wc(e,s),d=Wc(void 0===t?s:t,s);if(Qc(a)&&(n=a.constructor,(Vc(n)&&(n===tu||Qc(n.prototype))||zc(n)&&null===(n=n[eu]))&&(n=void 0),n===tu||void 0===n))return Xc(a,o,d);for(r=new(void 0===n?tu:n)(nu(d-o,0)),i=0;o<d;o++,i++)o in a&&Jc(r,i,a[o]);return r.length=i,r}});var ru=vt,iu=mt,au=Ut,su=function(e,t,n){var r,i;iu(e);try{if(!(r=au(e,"return"))){if("throw"===t)throw n;return n}r=ru(r,e)}catch(e){i=!0,r=e}if("throw"===t)throw n;if(i)throw r;return iu(r),n},ou=mt,du=su,cu={},uu=cu,lu=We("iterator"),hu=Array.prototype,pu=function(e){return void 0!==e&&(uu.Array===e||hu[lu]===e)},fu=Sr,mu=Ut,Au=le,gu=cu,vu=We("iterator"),bu=function(e){if(!Au(e))return mu(e,vu)||mu(e,"@@iterator")||gu[fu(e)]},_u=vt,yu=Pt,wu=mt,ku=Tt,Eu=bu,xu=TypeError,Du=function(e,t){var n=arguments.length<2?Eu(e):t;if(yu(n))return wu(_u(n,e));throw xu(ku(e)+" is not iterable")},Su=Nr,Ru=vt,Tu=ge,Cu=function(e,t,n,r){try{return r?t(ou(n)[0],n[1]):t(n)}catch(t){du(e,"throw",t)}},Iu=pu,Ou=Ai,Pu=ei,Bu=Qs,Lu=Du,Uu=bu,Mu=Array,Fu=function(e){var t=Tu(e),n=Ou(this),r=arguments.length,i=r>1?arguments[1]:void 0,a=void 0!==i;a&&(i=Su(i,r>2?arguments[2]:void 0));var s,o,d,c,u,l,h=Uu(t),p=0;if(!h||this===Mu&&Iu(h))for(s=Pu(t),o=n?new this(s):Mu(s);s>p;p++)l=a?i(t[p],p):t[p],Bu(o,p,l);else for(u=(c=Lu(t,h)).next,o=n?new this:[];!(d=Ru(u,c)).done;p++)l=a?Cu(c,i,[d.value,p],!0):d.value,Bu(o,p,l);return o.length=p,o},ju=We("iterator"),Nu=!1;try{var Gu=0,qu={next:function(){return{done:!!Gu++}},return:function(){Nu=!0}};qu[ju]=function(){return this},Array.from(qu,(function(){throw 2}))}catch(e){}var Hu=function(e,t){if(!t&&!Nu)return!1;var n=!1;try{var r={};r[ju]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch(e){}return n},Qu=Fu;Xa({target:"Array",stat:!0,forced:!Hu((function(e){Array.from(e)}))},{from:Qu});var Vu,zu,Wu,Ku=ue,Yu=Yr,Ju=ms,Zu=fe,Xu=Ku("".charAt),$u=Ku("".charCodeAt),el=Ku("".slice),tl=function(e){return function(t,n){var r,i,a=Ju(Zu(t)),s=Yu(n),o=a.length;return s<0||s>=o?e?"":void 0:(r=$u(a,s))<55296||r>56319||s+1===o||(i=$u(a,s+1))<56320||i>57343?e?Xu(a,s):r:e?el(a,s,s+2):i-56320+(r-55296<<10)+65536}},nl={codeAt:tl(!1),charAt:tl(!0)},rl=!ie((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),il=_e,al=$e,sl=ge,ol=rl,dl=Pn("IE_PROTO"),cl=Object,ul=cl.prototype,ll=ol?cl.getPrototypeOf:function(e){var t=sl(e);if(il(t,dl))return t[dl];var n=t.constructor;return al(n)&&t instanceof n?n.prototype:t instanceof cl?ul:null},hl=ie,pl=$e,fl=it,ml=ll,Al=Ar,gl=We("iterator"),vl=!1;[].keys&&("next"in(Wu=[].keys())?(zu=ml(ml(Wu)))!==Object.prototype&&(Vu=zu):vl=!0);var bl=!fl(Vu)||hl((function(){var e={};return Vu[gl].call(e)!==e}));bl&&(Vu={}),pl(Vu[gl])||Al(Vu,gl,(function(){return this}));var _l={IteratorPrototype:Vu,BUGGY_SAFARI_ITERATORS:vl},yl=_l.IteratorPrototype,wl=Fs,kl=Dn,El=yo,xl=cu,Dl=function(){return this},Sl=function(e,t,n,r){var i=t+" Iterator";return e.prototype=wl(yl,{next:kl(+!r,n)}),El(e,i,!1),xl[i]=Dl,e},Rl=ue,Tl=Pt,Cl=$e,Il=String,Ol=TypeError,Pl=function(e,t,n){try{return Rl(Tl(Object.getOwnPropertyDescriptor(e,t)[n]))}catch(e){}},Bl=mt,Ll=function(e){if("object"==typeof e||Cl(e))return e;throw Ol("Can't set "+Il(e)+" as a prototype")},Ul=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Pl(Object.prototype,"__proto__","set"))(n,[]),t=n instanceof Array}catch(e){}return function(n,r){return Bl(n),Ll(r),t?e(n,r):n.__proto__=r,n}}():void 0),Ml=Xa,Fl=vt,jl=$e,Nl=Sl,Gl=ll,ql=Ul,Hl=yo,Ql=Tn,Vl=Ar,zl=cu,Wl=mn.PROPER,Kl=mn.CONFIGURABLE,Yl=_l.IteratorPrototype,Jl=_l.BUGGY_SAFARI_ITERATORS,Zl=We("iterator"),Xl="keys",$l="values",eh="entries",th=function(){return this},nh=function(e,t,n,r,i,a,s){Nl(n,t,r);var o,d,c,u=function(e){if(e===i&&m)return m;if(!Jl&&e in p)return p[e];switch(e){case Xl:case $l:case eh:return function(){return new n(this,e)}}return function(){return new n(this)}},l=t+" Iterator",h=!1,p=e.prototype,f=p[Zl]||p["@@iterator"]||i&&p[i],m=!Jl&&f||u(i),A="Array"==t&&p.entries||f;if(A&&(o=Gl(A.call(new e)))!==Object.prototype&&o.next&&(Gl(o)!==Yl&&(ql?ql(o,Yl):jl(o[Zl])||Vl(o,Zl,th)),Hl(o,l,!0)),Wl&&i==$l&&f&&f.name!==$l&&(Kl?Ql(p,"name",$l):(h=!0,m=function(){return Fl(f,this)})),i)if(d={values:u($l),keys:a?m:u(Xl),entries:u(eh)},s)for(c in d)(Jl||h||!(c in p))&&Vl(p,c,d[c]);else Ml({target:t,proto:!0,forced:Jl||h},d);return p[Zl]!==m&&Vl(p,Zl,m,{name:i}),zl[t]=m,d},rh=function(e,t){return{value:e,done:t}},ih=nl.charAt,ah=ms,sh=Kn,oh=nh,dh=rh,ch="String Iterator",uh=sh.set,lh=sh.getterFor(ch);oh(String,"String",(function(e){uh(this,{type:ch,string:ah(e),index:0})}),(function(){var e,t=lh(this),n=t.string,r=t.index;return r>=n.length?dh(void 0,!0):(e=ih(n,r),t.index+=e.length,dh(e,!1))}));var hh=mt,ph=function(){var e=hh(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},fh=ie,mh=W.RegExp,Ah=fh((function(){var e=mh("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),gh=Ah||fh((function(){return!mh("a","y").sticky})),vh={BROKEN_CARET:Ah||fh((function(){var e=mh("^r","gy");return e.lastIndex=2,null!=e.exec("str")})),MISSED_STICKY:gh,UNSUPPORTED_Y:Ah},bh=ie,_h=W.RegExp,yh=bh((function(){var e=_h(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)})),wh=ie,kh=W.RegExp,Eh=wh((function(){var e=kh("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),xh=vt,Dh=ue,Sh=ms,Rh=ph,Th=vh,Ch=K.exports,Ih=Fs,Oh=Kn.get,Ph=yh,Bh=Eh,Lh=Ch("native-string-replace",String.prototype.replace),Uh=RegExp.prototype.exec,Mh=Uh,Fh=Dh("".charAt),jh=Dh("".indexOf),Nh=Dh("".replace),Gh=Dh("".slice),qh=function(){var e=/a/,t=/b*/g;return xh(Uh,e,"a"),xh(Uh,t,"a"),0!==e.lastIndex||0!==t.lastIndex}(),Hh=Th.BROKEN_CARET,Qh=void 0!==/()??/.exec("")[1];(qh||Qh||Hh||Ph||Bh)&&(Mh=function(e){var t,n,r,i,a,s,o,d=this,c=Oh(d),u=Sh(e),l=c.raw;if(l)return l.lastIndex=d.lastIndex,t=xh(Mh,l,u),d.lastIndex=l.lastIndex,t;var h=c.groups,p=Hh&&d.sticky,f=xh(Rh,d),m=d.source,A=0,g=u;if(p&&(f=Nh(f,"y",""),-1===jh(f,"g")&&(f+="g"),g=Gh(u,d.lastIndex),d.lastIndex>0&&(!d.multiline||d.multiline&&"\n"!==Fh(u,d.lastIndex-1))&&(m="(?: "+m+")",g=" "+g,A++),n=new RegExp("^(?:"+m+")",f)),Qh&&(n=new RegExp("^"+m+"$(?!\\s)",f)),qh&&(r=d.lastIndex),i=xh(Uh,p?n:d,g),p?i?(i.input=Gh(i.input,A),i[0]=Gh(i[0],A),i.index=d.lastIndex,d.lastIndex+=i[0].length):d.lastIndex=0:qh&&i&&(d.lastIndex=d.global?i.index+i[0].length:r),Qh&&i&&i.length>1&&xh(Lh,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=Ih(null),a=0;a<h.length;a++)s[(o=h[a])[0]]=i[o[1]];return i});var Vh=Mh;Xa({target:"RegExp",proto:!0,forced:/./.exec!==Vh},{exec:Vh});var zh=Xa,Wh=tt,Kh=ue,Yh=_e,Jh=$e,Zh=wt,Xh=ms,$h=ao,ep=La,tp=W.Symbol,np=tp&&tp.prototype;if(Wh&&Jh(tp)&&(!("description"in np)||void 0!==tp().description)){var rp={},ip=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:Xh(arguments[0]),t=Zh(np,this)?new tp(e):void 0===e?tp():tp(e);return""===e&&(rp[t]=!0),t};ep(ip,tp),ip.prototype=np,np.constructor=ip;var ap="Symbol(test)"==String(tp("test")),sp=Kh(np.valueOf),op=Kh(np.toString),dp=/^Symbol\((.*)\)[^)]+$/,cp=Kh("".replace),up=Kh("".slice);$h(np,"description",{configurable:!0,get:function(){var e=sp(this);if(Yh(rp,e))return"";var t=op(e),n=ap?up(t,7,-1):cp(t,dp,"$1");return""===n?void 0:n}}),zh({global:!0,constructor:!0,forced:!0},{Symbol:ip})}po("iterator");var lp=We,hp=Fs,pp=et.f,fp=lp("unscopables"),mp=Array.prototype;null==mp[fp]&&pp(mp,fp,{configurable:!0,value:hp(null)});var Ap=function(e){mp[fp][e]=!0},gp=Yi,vp=Ap,bp=cu,_p=Kn,yp=et.f,wp=nh,kp=rh,Ep=tt,xp="Array Iterator",Dp=_p.set,Sp=_p.getterFor(xp),Rp=wp(Array,"Array",(function(e,t){Dp(this,{type:xp,target:gp(e),index:0,kind:t})}),(function(){var e=Sp(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,kp(void 0,!0)):kp("keys"==n?r:"values"==n?t[r]:[r,t[r]],!1)}),"values"),Tp=bp.Arguments=bp.Array;if(vp("keys"),vp("values"),vp("entries"),Ep&&"values"!==Tp.name)try{yp(Tp,"name",{value:"values"})}catch(e){}var Cp=W,Ip=Cr,Op=Pr,Pp=Rp,Bp=Tn,Lp=We,Up=Lp("iterator"),Mp=Lp("toStringTag"),Fp=Pp.values,jp=function(e,t){if(e){if(e[Up]!==Fp)try{Bp(e,Up,Fp)}catch(t){e[Up]=Fp}if(e[Mp]||Bp(e,Mp,t),Ip[t])for(var n in Pp)if(e[n]!==Pp[n])try{Bp(e,n,Pp[n])}catch(t){e[n]=Pp[n]}}};for(var Np in Ip)jp(Cp[Np]&&Cp[Np].prototype,Np);jp(Op,"DOMTokenList");var Gp,qp,Hp,Qp,Vp="undefined"!=typeof process&&"process"==_r(process),zp=yt,Wp=ao,Kp=tt,Yp=We("species"),Jp=function(e){var t=zp(e);Kp&&t&&!t[Yp]&&Wp(t,Yp,{configurable:!0,get:function(){return this}})},Zp=wt,Xp=TypeError,$p=function(e,t){if(Zp(t,e))return e;throw Xp("Incorrect invocation")},ef=Ai,tf=Tt,nf=TypeError,rf=mt,af=function(e){if(ef(e))return e;throw nf(tf(e)+" is not a constructor")},sf=le,of=We("species"),df=function(e,t){var n,r=rf(e).constructor;return void 0===r||sf(n=rf(r)[of])?t:af(n)},cf=TypeError,uf=function(e,t){if(e<t)throw cf("Not enough arguments");return e},lf=/(?:ipad|iphone|ipod).*applewebkit/i.test(De),hf=W,pf=Yd,ff=Nr,mf=$e,Af=_e,gf=ie,vf=Es,bf=Jd,_f=dt,yf=uf,wf=lf,kf=Vp,Ef=hf.setImmediate,xf=hf.clearImmediate,Df=hf.process,Sf=hf.Dispatch,Rf=hf.Function,Tf=hf.MessageChannel,Cf=hf.String,If=0,Of={},Pf="onreadystatechange";gf((function(){Gp=hf.location}));var Bf=function(e){if(Af(Of,e)){var t=Of[e];delete Of[e],t()}},Lf=function(e){return function(){Bf(e)}},Uf=function(e){Bf(e.data)},Mf=function(e){hf.postMessage(Cf(e),Gp.protocol+"//"+Gp.host)};Ef&&xf||(Ef=function(e){yf(arguments.length,1);var t=mf(e)?e:Rf(e),n=bf(arguments,1);return Of[++If]=function(){pf(t,void 0,n)},qp(If),If},xf=function(e){delete Of[e]},kf?qp=function(e){Df.nextTick(Lf(e))}:Sf&&Sf.now?qp=function(e){Sf.now(Lf(e))}:Tf&&!wf?(Qp=(Hp=new Tf).port2,Hp.port1.onmessage=Uf,qp=ff(Qp.postMessage,Qp)):hf.addEventListener&&mf(hf.postMessage)&&!hf.importScripts&&Gp&&"file:"!==Gp.protocol&&!gf(Mf)?(qp=Mf,hf.addEventListener("message",Uf,!1)):qp=Pf in _f("script")?function(e){vf.appendChild(_f("script"))[Pf]=function(){vf.removeChild(this),Bf(e)}}:function(e){setTimeout(Lf(e),0)});var Ff={set:Ef,clear:xf},jf=function(){this.head=null,this.tail=null};jf.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 Nf,Gf,qf,Hf,Qf,Vf=jf,zf=/ipad|iphone|ipod/i.test(De)&&"undefined"!=typeof Pebble,Wf=/web0s(?!.*chrome)/i.test(De),Kf=W,Yf=Nr,Jf=qi.f,Zf=Ff.set,Xf=Vf,$f=lf,em=zf,tm=Wf,nm=Vp,rm=Kf.MutationObserver||Kf.WebKitMutationObserver,im=Kf.document,am=Kf.process,sm=Kf.Promise,om=Jf(Kf,"queueMicrotask"),dm=om&&om.value;if(!dm){var cm=new Xf,um=function(){var e,t;for(nm&&(e=am.domain)&&e.exit();t=cm.get();)try{t()}catch(e){throw cm.head&&Nf(),e}e&&e.enter()};$f||nm||tm||!rm||!im?!em&&sm&&sm.resolve?((Hf=sm.resolve(void 0)).constructor=sm,Qf=Yf(Hf.then,Hf),Nf=function(){Qf(um)}):nm?Nf=function(){am.nextTick(um)}:(Zf=Yf(Zf,Kf),Nf=function(){Zf(um)}):(Gf=!0,qf=im.createTextNode(""),new rm(um).observe(qf,{characterData:!0}),Nf=function(){qf.data=Gf=!Gf}),dm=function(e){cm.head||Nf(),cm.add(e)}}var lm=dm,hm=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},pm=W.Promise,fm="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,mm=!fm&&!Vp&&"object"==typeof window&&"object"==typeof document,Am=W,gm=pm,vm=$e,bm=Qa,_m=wn,ym=We,wm=mm,km=fm,Em=Pe;gm&&gm.prototype;var xm=ym("species"),Dm=!1,Sm=vm(Am.PromiseRejectionEvent),Rm=bm("Promise",(function(){var e=_m(gm),t=e!==String(gm);if(!t&&66===Em)return!0;if(!Em||Em<51||!/native code/.test(e)){var n=new gm((function(e){e(1)})),r=function(e){e((function(){}),(function(){}))};if((n.constructor={})[xm]=r,!(Dm=n.then((function(){}))instanceof r))return!0}return!t&&(wm||km)&&!Sm})),Tm={CONSTRUCTOR:Rm,REJECTION_EVENT:Sm,SUBCLASSING:Dm},Cm={},Im=Pt,Om=TypeError,Pm=function(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw Om("Bad Promise constructor");t=e,n=r})),this.resolve=Im(t),this.reject=Im(n)};Cm.f=function(e){return new Pm(e)};var Bm,Lm,Um,Mm=Xa,Fm=Vp,jm=W,Nm=vt,Gm=Ar,qm=Ul,Hm=yo,Qm=Jp,Vm=Pt,zm=$e,Wm=it,Km=$p,Ym=df,Jm=Ff.set,Zm=lm,Xm=function(e,t){try{1==arguments.length?console.error(e):console.error(e,t)}catch(e){}},$m=hm,eA=Vf,tA=Kn,nA=pm,rA=Cm,iA="Promise",aA=Tm.CONSTRUCTOR,sA=Tm.REJECTION_EVENT,oA=Tm.SUBCLASSING,dA=tA.getterFor(iA),cA=tA.set,uA=nA&&nA.prototype,lA=nA,hA=uA,pA=jm.TypeError,fA=jm.document,mA=jm.process,AA=rA.f,gA=AA,vA=!!(fA&&fA.createEvent&&jm.dispatchEvent),bA="unhandledrejection",_A=function(e){var t;return!(!Wm(e)||!zm(t=e.then))&&t},yA=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&&DA(t),t.rejection=1),!0===o?n=a:(u&&u.enter(),n=o(a),u&&(u.exit(),i=!0)),n===e.promise?c(pA("Promise-chain cycle")):(r=_A(n))?Nm(r,n,d,c):d(n)):c(a)}catch(e){u&&!i&&u.exit(),c(e)}},wA=function(e,t){e.notified||(e.notified=!0,Zm((function(){for(var n,r=e.reactions;n=r.get();)yA(n,e);e.notified=!1,t&&!e.rejection&&EA(e)})))},kA=function(e,t,n){var r,i;vA?((r=fA.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),jm.dispatchEvent(r)):r={promise:t,reason:n},!sA&&(i=jm["on"+e])?i(r):e===bA&&Xm("Unhandled promise rejection",n)},EA=function(e){Nm(Jm,jm,(function(){var t,n=e.facade,r=e.value;if(xA(e)&&(t=$m((function(){Fm?mA.emit("unhandledRejection",r,n):kA(bA,n,r)})),e.rejection=Fm||xA(e)?2:1,t.error))throw t.value}))},xA=function(e){return 1!==e.rejection&&!e.parent},DA=function(e){Nm(Jm,jm,(function(){var t=e.facade;Fm?mA.emit("rejectionHandled",t):kA("rejectionhandled",t,e.value)}))},SA=function(e,t,n){return function(r){e(t,r,n)}},RA=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,wA(e,!0))},TA=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw pA("Promise can't be resolved itself");var r=_A(t);r?Zm((function(){var n={done:!1};try{Nm(r,t,SA(TA,n,e),SA(RA,n,e))}catch(t){RA(n,t,e)}})):(e.value=t,e.state=1,wA(e,!1))}catch(t){RA({done:!1},t,e)}}};if(aA&&(hA=(lA=function(e){Km(this,hA),Vm(e),Nm(Bm,this);var t=dA(this);try{e(SA(TA,t),SA(RA,t))}catch(e){RA(t,e)}}).prototype,(Bm=function(e){cA(this,{type:iA,done:!1,notified:!1,parent:!1,reactions:new eA,rejection:!1,state:0,value:void 0})}).prototype=Gm(hA,"then",(function(e,t){var n=dA(this),r=AA(Ym(this,lA));return n.parent=!0,r.ok=!zm(e)||e,r.fail=zm(t)&&t,r.domain=Fm?mA.domain:void 0,0==n.state?n.reactions.add(r):Zm((function(){yA(r,n)})),r.promise})),Lm=function(){var e=new Bm,t=dA(e);this.promise=e,this.resolve=SA(TA,t),this.reject=SA(RA,t)},rA.f=AA=function(e){return e===lA||undefined===e?new Lm(e):gA(e)},zm(nA)&&uA!==Object.prototype)){Um=uA.then,oA||Gm(uA,"then",(function(e,t){var n=this;return new lA((function(e,t){Nm(Um,n,e,t)})).then(e,t)}),{unsafe:!0});try{delete uA.constructor}catch(e){}qm&&qm(uA,hA)}Mm({global:!0,constructor:!0,wrap:!0,forced:aA},{Promise:lA}),Hm(lA,iA,!1),Qm(iA);var CA=Nr,IA=vt,OA=mt,PA=Tt,BA=pu,LA=ei,UA=wt,MA=Du,FA=bu,jA=su,NA=TypeError,GA=function(e,t){this.stopped=e,this.result=t},qA=GA.prototype,HA=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=CA(t,u),A=function(e){return r&&jA(r,"normal",e),new GA(!0,e)},g=function(e){return l?(OA(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=FA(e)))throw NA(PA(e)+" is not iterable");if(BA(i)){for(a=0,s=LA(e);s>a;a++)if((o=g(e[a]))&&UA(qA,o))return o;return new GA(!1)}r=MA(e,i)}for(d=h?e.next:r.next;!(c=IA(d,r)).done;){try{o=g(c.value)}catch(e){jA(r,"throw",e)}if("object"==typeof o&&o&&UA(qA,o))return o}return new GA(!1)},QA=pm,VA=Tm.CONSTRUCTOR||!Hu((function(e){QA.all(e).then(void 0,(function(){}))})),zA=vt,WA=Pt,KA=Cm,YA=hm,JA=HA;Xa({target:"Promise",stat:!0,forced:VA},{all:function(e){var t=this,n=KA.f(t),r=n.resolve,i=n.reject,a=YA((function(){var n=WA(t.resolve),a=[],s=0,o=1;JA(e,(function(e){var d=s++,c=!1;o++,zA(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 ZA=Xa,XA=Tm.CONSTRUCTOR,$A=pm,eg=yt,tg=$e,ng=Ar,rg=$A&&$A.prototype;if(ZA({target:"Promise",proto:!0,forced:XA,real:!0},{catch:function(e){return this.then(void 0,e)}}),tg($A)){var ig=eg("Promise").prototype.catch;rg.catch!==ig&&ng(rg,"catch",ig,{unsafe:!0})}var ag=vt,sg=Pt,og=Cm,dg=hm,cg=HA;Xa({target:"Promise",stat:!0,forced:VA},{race:function(e){var t=this,n=og.f(t),r=n.reject,i=dg((function(){var i=sg(t.resolve);cg(e,(function(e){ag(i,t,e).then(n.resolve,r)}))}));return i.error&&r(i.value),n.promise}});var ug=vt,lg=Cm;Xa({target:"Promise",stat:!0,forced:Tm.CONSTRUCTOR},{reject:function(e){var t=lg.f(this);return ug(t.reject,void 0,e),t.promise}});var hg=mt,pg=it,fg=Cm,mg=function(e,t){if(hg(e),pg(t)&&t.constructor===e)return t;var n=fg.f(e);return(0,n.resolve)(t),n.promise},Ag=Xa,gg=Tm.CONSTRUCTOR,vg=mg;yt("Promise"),Ag({target:"Promise",stat:!0,forced:gg},{resolve:function(e){return vg(this,e)}});var bg=TypeError,_g=Xa,yg=ie,wg=ni,kg=it,Eg=ge,xg=ei,Dg=function(e){if(e>9007199254740991)throw bg("Maximum allowed index exceeded");return e},Sg=Qs,Rg=ki,Tg=Oc,Cg=Pe,Ig=We("isConcatSpreadable"),Og=Cg>=51||!yg((function(){var e=[];return e[Ig]=!1,e.concat()[0]!==e})),Pg=function(e){if(!kg(e))return!1;var t=e[Ig];return void 0!==t?!!t:wg(e)};_g({target:"Array",proto:!0,arity:1,forced:!Og||!Tg("concat")},{concat:function(e){var t,n,r,i,a,s=Eg(this),o=Rg(s,0),d=0;for(t=-1,r=arguments.length;t<r;t++)if(Pg(a=-1===t?s:arguments[t]))for(i=xg(a),Dg(d+i),n=0;n<i;n++,d++)n in a&&Sg(o,d,a[n]);else Dg(d+1),Sg(o,d++,a);return o.length=d,o}});var Bg=tt,Lg=mn.EXISTS,Ug=ue,Mg=ao,Fg=Function.prototype,jg=Ug(Fg.toString),Ng=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,Gg=Ug(Ng.exec);function qg(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return Hg(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 Hg(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 Hg(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 Qg(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 Vg(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Qg(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qg(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}Bg&&!Lg&&Mg(Fg,"name",{configurable:!0,get:function(){try{return Gg(Ng,jg(this))[1]}catch(e){return""}}});var zg,Wg={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"}},Kg={},Yg=function(e,t){Kg[e]=Vg(Vg({},t),{},{isLoading:!1})},Jg=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))},Zg=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=Kg[t]).isLoading){e.next=6;break}return e.abrupt("return");case 6:i.isLoading=!0,a=qg(i.dependencies),e.prev=8,a.s();case 10:if((s=a.n()).done){e.next=26;break}if(o=s.value,e.prev=12,d=Wg[o].name,!window[d]){e.next=16;break}return e.abrupt("continue",24);case 16:return e.next=18,Jg({id:o,src:Wg[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,Jg({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)}}(),Xg=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,Zg("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"]},Yg(this.moduleName,this.moduleConfig)})),$g=new Xg,ev=it,tv=_r,nv=We("match"),rv=function(e){var t;return ev(e)&&(void 0!==(t=e[nv])?!!t:"RegExp"==tv(e))},iv=rv,av=TypeError,sv=function(e){if(iv(e))throw av("The method doesn't accept regular expressions");return e},ov=We("match"),dv=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[ov]=!1,"/./"[e](t)}catch(e){}}return!1},cv=Xa,uv=Ur,lv=qi.f,hv=Xr,pv=ms,fv=sv,mv=fe,Av=dv,gv=uv("".startsWith),vv=uv("".slice),bv=Math.min,_v=Av("startsWith");cv({target:"String",proto:!0,forced:!!(_v||(zg=lv(String.prototype,"startsWith"),!zg||zg.writable))&&!_v},{startsWith:function(e){var t=pv(mv(this));fv(e);var n=hv(bv(arguments.length>1?arguments[1]:void 0,t.length)),r=pv(e);return gv?gv(t,r,n):vv(t,n,n+r.length)===r}});var yv=vt,wv=_e,kv=wt,Ev=ph,xv=RegExp.prototype,Dv=function(e){var t=e.flags;return void 0!==t||"flags"in xv||wv(e,"flags")||!kv(xv,e)?t:yv(Ev,e)},Sv=mn.PROPER,Rv=Ar,Tv=mt,Cv=ms,Iv=ie,Ov=Dv,Pv="toString",Bv=RegExp.prototype[Pv],Lv=Iv((function(){return"/a/b"!=Bv.call({source:"a",flags:"b"})})),Uv=Sv&&Bv.name!=Pv;(Lv||Uv)&&Rv(RegExp.prototype,Pv,(function(){var e=Tv(this);return"/"+Cv(e.source)+"/"+Cv(Ov(e))}),{unsafe:!0});var Mv=Ur,Fv=Ar,jv=Vh,Nv=ie,Gv=We,qv=Tn,Hv=Gv("species"),Qv=RegExp.prototype,Vv=function(e,t,n,r){var i=Gv(e),a=!Nv((function(){var t={};return t[i]=function(){return 7},7!=""[e](t)})),s=a&&!Nv((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[Hv]=function(){return n},n.flags="",n[i]=/./[i]),n.exec=function(){return t=!0,null},n[i](""),!t}));if(!a||!s||n){var o=Mv(/./[i]),d=t(i,""[e],(function(e,t,n,r,i){var s=Mv(e),d=t.exec;return d===jv||d===Qv.exec?a&&!i?{done:!0,value:o(t,n,r)}:{done:!0,value:s(n,t,r)}:{done:!1}}));Fv(String.prototype,e,d[0]),Fv(Qv,i,d[1])}r&&qv(Qv[i],"sham",!0)},zv=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t},Wv=vt,Kv=mt,Yv=$e,Jv=_r,Zv=Vh,Xv=TypeError,$v=function(e,t){var n=e.exec;if(Yv(n)){var r=Wv(n,e,t);return null!==r&&Kv(r),r}if("RegExp"===Jv(e))return Wv(Zv,e,t);throw Xv("RegExp#exec called on incompatible receiver")},eb=vt,tb=mt,nb=le,rb=fe,ib=zv,ab=ms,sb=Ut,ob=$v;function db(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 cb(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?db(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):db(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}Vv("search",(function(e,t,n){return[function(t){var n=rb(this),r=nb(t)?void 0:sb(t,e);return r?eb(r,t,n):new RegExp(t)[e](ab(n))},function(e){var r=tb(this),i=ab(e),a=n(t,r,i);if(a.done)return a.value;var s=r.lastIndex;ib(s,0)||(r.lastIndex=0);var o=ob(r,i);return ib(r.lastIndex,s)||(r.lastIndex=s),null===o?-1:o.index}]}));var ub,lb,hb=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=cb(cb({},n.query),t),n.toString()}},{key:"_base64_encode",value:function(e){return I.encode(JSON.stringify(e))}}]),e}(),pb=function(){try{return(new hb).getBridgeContext()}catch(e){return{}}}(),fb={userDeclinedTracking:document.location.search.indexOf("gdpr-tracking=0")>=0||document.cookie.indexOf("ogdpr_tracking=0")>=0,whitelabelPartner:(ub=!1,(lb=d("xanthophyll")).hasOwnProperty("xanthophyll")&&"true"===lb.xanthophyll&&(ub=!0),ub)},mb=nl.charAt,Ab=ue,gb=ge,vb=Math.floor,bb=Ab("".charAt),_b=Ab("".replace),yb=Ab("".slice),wb=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,kb=/\$([$&'`]|\d{1,2})/g,Eb=Yd,xb=vt,Db=ue,Sb=Vv,Rb=ie,Tb=mt,Cb=$e,Ib=le,Ob=Yr,Pb=Xr,Bb=ms,Lb=fe,Ub=function(e,t,n){return t+(n?mb(e,t).length:1)},Mb=Ut,Fb=function(e,t,n,r,i,a){var s=n+e.length,o=r.length,d=kb;return void 0!==i&&(i=gb(i),d=wb),_b(a,d,(function(a,d){var c;switch(bb(d,0)){case"$":return"$";case"&":return e;case"`":return yb(t,0,n);case"'":return yb(t,s);case"<":c=i[yb(d,1,-1)];break;default:var u=+d;if(0===u)return a;if(u>o){var l=vb(u/10);return 0===l?a:l<=o?void 0===r[l-1]?bb(d,1):r[l-1]+bb(d,1):a}c=r[u-1]}return void 0===c?"":c}))},jb=$v,Nb=We("replace"),Gb=Math.max,qb=Math.min,Hb=Db([].concat),Qb=Db([].push),Vb=Db("".indexOf),zb=Db("".slice),Wb="$0"==="a".replace(/./,"$0"),Kb=!!/./[Nb]&&""===/./[Nb]("a","$0");Sb("replace",(function(e,t,n){var r=Kb?"$":"$0";return[function(e,n){var r=Lb(this),i=Ib(e)?void 0:Mb(e,Nb);return i?xb(i,e,r,n):xb(t,Bb(r),e,n)},function(e,i){var a=Tb(this),s=Bb(e);if("string"==typeof i&&-1===Vb(i,r)&&-1===Vb(i,"$<")){var o=n(t,a,s,i);if(o.done)return o.value}var d=Cb(i);d||(i=Bb(i));var c=a.global;if(c){var u=a.unicode;a.lastIndex=0}for(var l=[];;){var h=jb(a,s);if(null===h)break;if(Qb(l,h),!c)break;""===Bb(h[0])&&(a.lastIndex=Ub(s,Pb(a.lastIndex),u))}for(var p,f="",m=0,A=0;A<l.length;A++){for(var g=Bb((h=l[A])[0]),v=Gb(qb(Ob(h.index),s.length),0),b=[],_=1;_<h.length;_++)Qb(b,void 0===(p=h[_])?p:String(p));var y=h.groups;if(d){var w=Hb([g],b,v,s);void 0!==y&&Qb(w,y);var k=Bb(Eb(i,void 0,w))}else k=Fb(g,s,v,b,y,i);v>=m&&(f+=zb(s,m,v)+k,m=v+g.length)}return f+zb(s,m)}]}),!!Rb((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}))||!Wb||Kb);var Yb=ie,Jb=tt,Zb=We("iterator"),Xb=!Yb((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,n="";return e.pathname="c%20d",t.forEach((function(e,r){t.delete("b"),n+=r+e})),!t.size&&!Jb||!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[Zb]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==n||"x"!==new URL("http://x",void 0).host})),$b=Ar,e_=Js,t_=Math.floor,n_=function(e,t){var n=e.length,r=t_(n/2);return n<8?r_(e,t):i_(e,n_(e_(e,0,r),t),n_(e_(e,r),t),t)},r_=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},i_=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},a_=Xa,s_=W,o_=vt,d_=ue,c_=tt,u_=Xb,l_=Ar,h_=ao,p_=function(e,t,n){for(var r in t)$b(e,r,t[r],n);return e},f_=yo,m_=Sl,A_=Kn,g_=$p,v_=$e,b_=_e,__=Nr,y_=Sr,w_=mt,k_=it,E_=ms,x_=Fs,D_=Dn,S_=Du,R_=bu,T_=uf,C_=n_,I_=We("iterator"),O_="URLSearchParams",P_=O_+"Iterator",B_=A_.set,L_=A_.getterFor(O_),U_=A_.getterFor(P_),M_=Object.getOwnPropertyDescriptor,F_=function(e){if(!c_)return s_[e];var t=M_(s_,e);return t&&t.value},j_=F_("fetch"),N_=F_("Request"),G_=F_("Headers"),q_=N_&&N_.prototype,H_=G_&&G_.prototype,Q_=s_.RegExp,V_=s_.TypeError,z_=s_.decodeURIComponent,W_=s_.encodeURIComponent,K_=d_("".charAt),Y_=d_([].join),J_=d_([].push),Z_=d_("".replace),X_=d_([].shift),$_=d_([].splice),ey=d_("".split),ty=d_("".slice),ny=/\+/g,ry=Array(4),iy=function(e){return ry[e-1]||(ry[e-1]=Q_("((?:%[\\da-f]{2}){"+e+"})","gi"))},ay=function(e){try{return z_(e)}catch(t){return e}},sy=function(e){var t=Z_(e,ny," "),n=4;try{return z_(t)}catch(e){for(;n;)t=Z_(t,iy(n--),ay);return t}},oy=/[!'()~]|%20/g,dy={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},cy=function(e){return dy[e]},uy=function(e){return Z_(W_(e),oy,cy)},ly=m_((function(e,t){B_(this,{type:P_,iterator:S_(L_(e).entries),kind:t})}),"Iterator",(function(){var e=U_(this),t=e.kind,n=e.iterator.next(),r=n.value;return n.done||(n.value="keys"===t?r.key:"values"===t?r.value:[r.key,r.value]),n}),!0),hy=function(e){this.entries=[],this.url=null,void 0!==e&&(k_(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===K_(e,0)?ty(e,1):e:E_(e)))};hy.prototype={type:O_,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,n,r,i,a,s,o,d=R_(e);if(d)for(n=(t=S_(e,d)).next;!(r=o_(n,t)).done;){if(a=(i=S_(w_(r.value))).next,(s=o_(a,i)).done||(o=o_(a,i)).done||!o_(a,i).done)throw V_("Expected sequence with length 2");J_(this.entries,{key:E_(s.value),value:E_(o.value)})}else for(var c in e)b_(e,c)&&J_(this.entries,{key:c,value:E_(e[c])})},parseQuery:function(e){if(e)for(var t,n,r=ey(e,"&"),i=0;i<r.length;)(t=r[i++]).length&&(n=ey(t,"="),J_(this.entries,{key:sy(X_(n)),value:sy(Y_(n,"="))}))},serialize:function(){for(var e,t=this.entries,n=[],r=0;r<t.length;)e=t[r++],J_(n,uy(e.key)+"="+uy(e.value));return Y_(n,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var py=function(){g_(this,fy);var e=B_(this,new hy(arguments.length>0?arguments[0]:void 0));c_||(this.length=e.entries.length)},fy=py.prototype;if(p_(fy,{append:function(e,t){T_(arguments.length,2);var n=L_(this);J_(n.entries,{key:E_(e),value:E_(t)}),c_||this.length++,n.updateURL()},delete:function(e){T_(arguments.length,1);for(var t=L_(this),n=t.entries,r=E_(e),i=0;i<n.length;)n[i].key===r?$_(n,i,1):i++;c_||(this.length=n.length),t.updateURL()},get:function(e){T_(arguments.length,1);for(var t=L_(this).entries,n=E_(e),r=0;r<t.length;r++)if(t[r].key===n)return t[r].value;return null},getAll:function(e){T_(arguments.length,1);for(var t=L_(this).entries,n=E_(e),r=[],i=0;i<t.length;i++)t[i].key===n&&J_(r,t[i].value);return r},has:function(e){T_(arguments.length,1);for(var t=L_(this).entries,n=E_(e),r=0;r<t.length;)if(t[r++].key===n)return!0;return!1},set:function(e,t){T_(arguments.length,1);for(var n,r=L_(this),i=r.entries,a=!1,s=E_(e),o=E_(t),d=0;d<i.length;d++)(n=i[d]).key===s&&(a?$_(i,d--,1):(a=!0,n.value=o));a||J_(i,{key:s,value:o}),c_||(this.length=i.length),r.updateURL()},sort:function(){var e=L_(this);C_(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,n=L_(this).entries,r=__(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 ly(this,"keys")},values:function(){return new ly(this,"values")},entries:function(){return new ly(this,"entries")}},{enumerable:!0}),l_(fy,I_,fy.entries,{name:"entries"}),l_(fy,"toString",(function(){return L_(this).serialize()}),{enumerable:!0}),c_&&h_(fy,"size",{get:function(){return L_(this).entries.length},configurable:!0,enumerable:!0}),f_(py,O_),a_({global:!0,constructor:!0,forced:!u_},{URLSearchParams:py}),!u_&&v_(G_)){var my=d_(H_.has),Ay=d_(H_.set),gy=function(e){if(k_(e)){var t,n=e.body;if(y_(n)===O_)return t=e.headers?new G_(e.headers):new G_,my(t,"content-type")||Ay(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),x_(e,{body:D_(0,E_(n)),headers:D_(0,t)})}return e};if(v_(j_)&&a_({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return j_(e,arguments.length>1?gy(arguments[1]):{})}}),v_(N_)){var vy=function(e){return g_(this,q_),new N_(e,arguments.length>1?gy(arguments[1]):{})};q_.constructor=vy,vy.prototype=q_,a_({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:vy})}}var by={URLSearchParams:py,getState:L_},_y=fa.includes,yy=Ap;Xa({target:"Array",proto:!0,forced:ie((function(){return!Array(1).includes()}))},{includes:function(e){return _y(this,e,arguments.length>1?arguments[1]:void 0)}}),yy("includes");var wy=Xa,ky=sv,Ey=fe,xy=ms,Dy=dv,Sy=ue("".indexOf);function Ry(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))}}}wy({target:"String",proto:!0,forced:!Dy("includes")},{includes:function(e){return!!~Sy(xy(Ey(this)),xy(ky(e)),arguments.length>1?arguments[1]:void 0)}});var Ty="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==Ty&&Ty,Cy={searchParams:"URLSearchParams"in Ty,iterable:"Symbol"in Ty&&"iterator"in Symbol,blob:"FileReader"in Ty&&"Blob"in Ty&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in Ty,arrayBuffer:"ArrayBuffer"in Ty};if(Cy.arrayBuffer)var Iy=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],Oy=ArrayBuffer.isView||function(e){return e&&Iy.indexOf(Object.prototype.toString.call(e))>-1};function Py(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 By(e){return"string"!=typeof e&&(e=String(e)),e}function Ly(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return Cy.iterable&&(t[Symbol.iterator]=function(){return t}),t}function Uy(e){this.map={},e instanceof Uy?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function My(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function Fy(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function jy(e){var t=new FileReader,n=Fy(t);return t.readAsArrayBuffer(e),n}function Ny(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function Gy(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:Cy.blob&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:Cy.formData&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:Cy.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():Cy.arrayBuffer&&Cy.blob&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=Ny(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):Cy.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(e)||Oy(e))?this._bodyArrayBuffer=Ny(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):Cy.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},Cy.blob&&(this.blob=function(){var e=My(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=My(this);return e||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}return this.blob().then(jy)}),this.text=function(){var e=My(this);if(e)return e;if(this._bodyBlob)return function(e){var t=new FileReader,n=Fy(t);return t.readAsText(e),n}(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r<t.length;r++)n[r]=String.fromCharCode(t[r]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},Cy.formData&&(this.formData=function(){return this.text().then(Qy)}),this.json=function(){return this.text().then(JSON.parse)},this}Uy.prototype.append=function(e,t){e=Py(e),t=By(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},Uy.prototype.delete=function(e){delete this.map[Py(e)]},Uy.prototype.get=function(e){return e=Py(e),this.has(e)?this.map[e]:null},Uy.prototype.has=function(e){return this.map.hasOwnProperty(Py(e))},Uy.prototype.set=function(e,t){this.map[Py(e)]=By(t)},Uy.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},Uy.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),Ly(e)},Uy.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),Ly(e)},Uy.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),Ly(e)},Cy.iterable&&(Uy.prototype[Symbol.iterator]=Uy.prototype.entries);var qy=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function Hy(e,t){if(!(this instanceof Hy))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 Hy){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new Uy(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 Uy(t.headers)),this.method=function(e){var t=e.toUpperCase();return qy.indexOf(t)>-1?t:e}(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(n),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==t.cache&&"no-cache"!==t.cache)){var r=/([?&])_=[^&]*/;if(r.test(this.url))this.url=this.url.replace(r,"$1_="+(new Date).getTime());else{this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}}function Qy(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 Vy(e,t){if(!(this instanceof Vy))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText=void 0===t.statusText?"":""+t.statusText,this.headers=new Uy(t.headers),this.url=t.url||"",this._initBody(e)}Hy.prototype.clone=function(){return new Hy(this,{body:this._bodyInit})},Gy.call(Hy.prototype),Gy.call(Vy.prototype),Vy.prototype.clone=function(){return new Vy(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new Uy(this.headers),url:this.url})},Vy.error=function(){var e=new Vy(null,{status:0,statusText:""});return e.type="error",e};var zy=[301,302,303,307,308];Vy.redirect=function(e,t){if(-1===zy.indexOf(t))throw new RangeError("Invalid status code");return new Vy(null,{status:t,headers:{location:e}})};var Wy,Ky=Ty.DOMException;try{new Ky}catch(e){Ky=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},Ky.prototype=Object.create(Error.prototype),Ky.prototype.constructor=Ky}function Yy(e,t){return new Promise((function(n,r){var i=new Hy(e,t);if(i.signal&&i.signal.aborted)return r(new Ky("Aborted","AbortError"));var a=new XMLHttpRequest;function s(){a.abort()}a.onload=function(){var e,t,r={status:a.status,statusText:a.statusText,headers:(e=a.getAllResponseHeaders()||"",t=new Uy,e.replace(/\r?\n[\t ]+/g," ").split("\r").map((function(e){return 0===e.indexOf("\n")?e.substr(1,e.length):e})).forEach((function(e){var n=e.split(":"),r=n.shift().trim();if(r){var i=n.join(":").trim();t.append(r,i)}})),t)};r.url="responseURL"in a?a.responseURL:r.headers.get("X-Request-URL");var i="response"in a?a.response:a.responseText;setTimeout((function(){n(new Vy(i,r))}),0)},a.onerror=function(){setTimeout((function(){r(new TypeError("Network request failed"))}),0)},a.ontimeout=function(){setTimeout((function(){r(new TypeError("Network request failed"))}),0)},a.onabort=function(){setTimeout((function(){r(new Ky("Aborted","AbortError"))}),0)},a.open(i.method,function(e){try{return""===e&&Ty.location.href?Ty.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&&(Cy.blob?a.responseType="blob":Cy.arrayBuffer&&i.headers.get("Content-Type")&&-1!==i.headers.get("Content-Type").indexOf("application/octet-stream")&&(a.responseType="arraybuffer")),!t||"object"!=typeof t.headers||t.headers instanceof Uy?i.headers.forEach((function(e,t){a.setRequestHeader(t,e)})):Object.getOwnPropertyNames(t.headers).forEach((function(e){a.setRequestHeader(e,By(t.headers[e]))})),i.signal&&(i.signal.addEventListener("abort",s),a.onreadystatechange=function(){4===a.readyState&&i.signal.removeEventListener("abort",s)}),a.send(void 0===i._bodyInit?null:i._bodyInit)}))}Yy.polyfill=!0,Ty.fetch||(Ty.fetch=Yy,Ty.Headers=Uy,Ty.Request=Hy,Ty.Response=Vy);var Jy=function(e){var n=this;if(!Wy){var r={gameId:e.gameId,hours:(new Date).getHours(),topDomain:pb.topDomain,domain:pb.parentDomain,referrer:pb.parentURL,depth:o(),version:os.version,byloader:pb.isTokenGameURL,isTokenGameURL:pb.isTokenGameURL,isMasterGameURL:pb.isMasterGameURL,isExtHostedGameURL:pb.isExtHostedGameURL,byloaderVersion:pb.version,tracking:fb.userDeclinedTracking,whitelabel:fb.whitelabelPartner,platform:u()};Wy=new l(r)}return Wy||{send:function(){t(this,n)}.bind(this)}},Zy={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){}}},Xy={prod:["html5.gamedistribution.com","revision.gamedistribution.com"],acc:["html5-acc-real-aws.gamedistribution.com","acceptance-revision.gamedistribution.com"]},$y={gameAPI:"game.api.gamedistribution.com"},ew={gameAPI:"game-api-acc-real-aws.gamedistribution.com"},tw=function(){var e=this,n=Xy.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?ew:$y}},nw=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 rw(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 iw(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?rw(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rw(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var aw,sw,ow,dw=new M,cw=[],uw=function(e){cw.push(e)},lw=function(e){aw=Jy(ow=e)},hw=function(){var t=e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(sw){e.next=6;break}return e.next=3,mw(ow);case 3:sw=e.sent,dw.emit("game-data-ready",sw),pw();case 6:return e.abrupt("return",sw);case 7:case"end":return e.stop()}}),e)})));return function(){return t.apply(this,arguments)}}(),pw=function(){var t,n;if(null!==(t=sw)&&void 0!==t&&null!==(n=t.aws_tst)&&void 0!==n&&n.enabled){var i,a,s,o,d;if(fw(),null!==(i=sw)&&void 0!==i&&null!==(a=i.aws_tst)&&void 0!==a&&null!==(s=a.ep)&&void 0!==s&&s.api&&null!==(o=sw)&&void 0!==o&&o.url)Zy.getGameData(null===(d=sw)||void 0===d?void 0:d.url);setInterval(e(r.mark((function e(){var t;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,mw(ow);case 3:sw=e.sent,null===(t=sw)||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)}},fw=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,v,b,_,y,w,k=this,E=arguments;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(u=E.length,l=new Array(u),h=0;h<u;h++)l[h]=E[h];p=l[0],f=l[1],m=null===(i=sw)||void 0===i||null===(a=i.aws_tst)||void 0===a||null===(s=a.ep)||void 0===s?void 0:s.atm,A=null===(o=sw)||void 0===o||null===(d=o.aws_tst)||void 0===d||null===(c=d.ep)||void 0===c?void 0:c.msgrt,g=function(e,r){var i=this;t(this,k);var a=p.replace(e,r);n(a,f).then(function(){t(this,i)}.bind(this))}.bind(this);try{m&&p.indexOf("tag.atom")>0&&g("tag.atom.gamedistribution.com","atom-tag-prod-aws.gamedistribution.com"),A&&p.indexOf("msgrt.gamedistribution.com")>0&&(null===(v=sw)||void 0===v||v.aws_tst,null===(b=sw)||void 0===b||null===(_=b.aws_tst)||void 0===_||null===(y=_.ep)||void 0===y||y.msgrt,g("msgrt.gamedistribution.com","msgrt-prod-aws.gamedistribution.com"))}catch(e){}return e.next=9,n(p,f);case 9:return w=e.sent,e.abrupt("return",w);case 11:case"end":return e.stop()}}),e,this)})))},mw=function(n){var i=this;aw.send("gdfw.loading",{message:"loading"}),cw=[],uw("1"),uw("2");var a=new Ry;uw("3");var s=a.get("partner.domain.value");uw("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);uw("5");var d=function(){t(this,i);var e=c(),r=e?"&mode=".concat(e):"",a=tw().config;return"https://".concat(a.gameAPI,"/game/v4/get/").concat(n.gameId.replace(/-/g,""),"/?domain=").concat(s).concat(r,"&v=").concat(os.version,"&localTime=").concat((new Date).getHours())}.bind(this);uw("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 uw("7"),new Promise(function(n){var a=this;t(this,i),uw("7.1");var s=o();try{uw("7.2");var c=d();uw("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 uw("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,nw({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),uw("7.5"),e.success){var i,o,d,u=e.result.game;uw("7.6");var l={company:u.company,gameId:u.gameMd5,slug:u.slug,pname:u.pname,dname:u.dname,status:u.status,activeStatus:u.activeStatus,description:u.description,disableAds:u.enableAds,preroll:u.preRoll,midroll:6e4*u.timeAds,rewardedAds:u.rewardedAds,title:u.title,publishedAt:u.publishedAt,tags:u.tags,category:u.category,assets:u.assets,disp_2nd_prer:u.disp_2nd_prer,ctry_vst:u.ctry_vst,ctry:u.ctry,crtv:u.crtv,dmain:u.dmain,aws_tst:u.aws_tst,meta:u.meta,adspn:ds(u.adspn)||{},__t4r:ds(u.__t4r)||{},block_exts:ds(u.push_cuda),bloc_gard:ds(u.bloc_gard),cookie:ds(u.cookie),gdpr:ds(u.gdpr),diagnostic:ds(u.diagnostic),cmp:ds(u.cmp),gft:ds(u.gft)||{},sdk:ds(u.sdk)||{},sdkfw:ds(u.sdkfw)||{},loader:ds(u.loader)||{},splash:ds(u.splash)||{},promo:ds(u.promo)||{},dAds:ds(u.dads)||{},pAds:ds(u.pads)||{},mAds:ds(u.mads)||{},rAds:ds(u.rads)||{},lp:ds(u.lp)||{},extsc:ds(u.extsc)||{},evnts:ds(u.evnts)||{},dp:ds(u.dp)||{},adflw:ds(u.adflw)||{},afgszf:ds(u.afgszf)||{},fllc:ds(u.fllc)||{},lotm:ds(u.lotm)||{},t4rc:ds(u.t4rc)||{},midroll_plus:ds(u.midroll_plus)||{},gmky:ds(u.gmky)||{},urlBlockExc:ds(u.url_blck_exc)||{},sdk_wrp:ds(u.sdk_wrp)||{},dbglg:ds(u.dbglg)||{},extHosting:ds(u.ext_hosting)||{},directTokenUse:ds(u.dtu)||{},aeria:ds(u.aeria)||{},advlm:ds(u.advlm)||{},ad_blcks:ds(u.ad_blcks)||{},rmblck:ds(u.rmblck)||{},gs_trc:ds(u.gs_trc)||{},rwskp:ds(u.rwskp)||{}};uw("7.7");var p=h(U(s),l);uw("7.8"),p.afg_disabled=!1===(null===(i=p.sdk)||void 0===i||null===(o=i.afg)||void 0===o?void 0:o.enabled),p.url=c,function(){t(this,r),void 0!==hs.afgEnabled&&(p.afg_disabled=!hs.afgEnabled),void 0!==hs.promoEnabled&&(p.promo=p.promo||{},p.promo=iw(iw({},p.promo),{},{rainbow:{enabled:hs.promoEnabled}}))}.bind(this),uw("7.9"),null!==(d=p.pAds)&&void 0!==d&&d.enabled&&(p.preroll=!0),uw("7.10"),aw.send("gdfw.success",{message:"success"}),n(p)}else{s.failed=!0;var f=cw[cw.length-1];aw.send("gdfw.err",{message:"".concat(f,": json error")}),n(s)}}.bind(this)).catch(function(e){t(this,a);var r=cw[cw.length-1];aw.send("gdfw.err",{message:"".concat(r,": ").concat(e.message?e.message:e)}),s.failed=!0,n(s)}.bind(this))}catch(e){var u=cw[cw.length-1];aw.send("gdfw.err",{message:"".concat(u,": global ").concat(e.message?e.message:e)}),s.failed=!0,n(s)}}.bind(this))},Aw=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,hw();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)}}(),gw=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,hw();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)}}(),vw=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,hw();case 2:return n=e.sent,e.next=5,Aw();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)}}(),bw=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,hw();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)}}(),_w=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,bw();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)}}(),yw=!1,ww=!1,kw=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(!yw){e.next=4;break}return e.abrupt("return",n(ww));case 4:yw=!0;case 5:return e.next=7,bw();case 7:if((a=e.sent).enabled){e.next=10;break}return e.abrupt("return",n(!1));case 10:if(s=a.loadedFlag,!(o=a.loadedFlagCheck)||s){e.next=13;break}return e.abrupt("return",n(!1));case 13:if(o){e.next=16;break}return ww=!0,e.abrupt("return",n(!0));case 16:d=!0,setTimeout(function(){t(this,u),d&&(d=!1,yw=!0,n(!1))}.bind(this),5e3),c=setInterval(function(){t(this,u),d&&o&&window[s]?(d=!1,yw=!0,ww=!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)}}())},Ew=Xa,xw=pm,Dw=ie,Sw=yt,Rw=$e,Tw=df,Cw=mg,Iw=Ar,Ow=xw&&xw.prototype;if(Ew({target:"Promise",proto:!0,real:!0,forced:!!xw&&Dw((function(){Ow.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=Tw(this,Sw("Promise")),n=Rw(e);return this.then(n?function(n){return Cw(t,e()).then((function(){return n}))}:e,n?function(n){return Cw(t,e()).then((function(){throw n}))}:e)}}),Rw(xw)){var Pw=Sw("Promise").prototype.finally;Ow.finally!==Pw&&Iw(Ow,"finally",Pw,{unsafe:!0})}var Bw="\t\n\v\f\r                 \u2028\u2029\ufeff",Lw=fe,Uw=ms,Mw=Bw,Fw=ue("".replace),jw=RegExp("^["+Mw+"]+"),Nw=RegExp("(^|[^"+Mw+"])["+Mw+"]+$"),Gw=function(e){return function(t){var n=Uw(Lw(t));return 1&e&&(n=Fw(n,jw,"")),2&e&&(n=Fw(n,Nw,"$1")),n}},qw={start:Gw(1),end:Gw(2),trim:Gw(3)},Hw=mn.PROPER,Qw=ie,Vw=Bw,zw=qw.trim;Xa({target:"String",proto:!0,forced:function(e){return Qw((function(){return!!Vw[e]()||"​…᠎"!=="​…᠎"[e]()||Hw&&Vw[e].name!==e}))}("trim")},{trim:function(){return zw(this)}});var Ww=Xa,Kw=Ii.find,Yw=Ap,Jw="find",Zw=!0;Jw in[]&&Array(1)[Jw]((function(){Zw=!1})),Ww({target:"Array",proto:!0,forced:Zw},{find:function(e){return Kw(this,e,arguments.length>1?arguments[1]:void 0)}}),Yw(Jw);var Xw=$e,$w=it,ek=Ul,tk=et.f,nk=tt,rk=W,ik=ue,ak=Qa,sk=function(e,t,n){var r,i;return ek&&Xw(r=t.constructor)&&r!==n&&$w(i=r.prototype)&&i!==n.prototype&&ek(e,i),e},ok=Tn,dk=aa.f,ck=wt,uk=rv,lk=ms,hk=Dv,pk=vh,fk=function(e,t,n){n in e||tk(e,n,{configurable:!0,get:function(){return t[n]},set:function(e){t[n]=e}})},mk=Ar,Ak=ie,gk=_e,vk=Kn.enforce,bk=Jp,_k=yh,yk=Eh,wk=We("match"),kk=rk.RegExp,Ek=kk.prototype,xk=rk.SyntaxError,Dk=ik(Ek.exec),Sk=ik("".charAt),Rk=ik("".replace),Tk=ik("".indexOf),Ck=ik("".slice),Ik=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,Ok=/a/g,Pk=/a/g,Bk=new kk(Ok)!==Ok,Lk=pk.MISSED_STICKY,Uk=pk.UNSUPPORTED_Y,Mk=nk&&(!Bk||Lk||_k||yk||Ak((function(){return Pk[wk]=!1,kk(Ok)!=Ok||kk(Pk)==Pk||"/a/i"!=kk(Ok,"i")})));if(ak("RegExp",Mk)){for(var Fk=function(e,t){var n,r,i,a,s,o,d=ck(Ek,this),c=uk(e),u=void 0===t,l=[],h=e;if(!d&&c&&u&&e.constructor===Fk)return e;if((c||ck(Ek,e))&&(e=e.source,u&&(t=hk(h))),e=void 0===e?"":lk(e),t=void 0===t?"":lk(t),h=e,_k&&"dotAll"in Ok&&(r=!!t&&Tk(t,"s")>-1)&&(t=Rk(t,/s/g,"")),n=t,Lk&&"sticky"in Ok&&(i=!!t&&Tk(t,"y")>-1)&&Uk&&(t=Rk(t,/y/g,"")),yk&&(a=function(e){for(var t,n=e.length,r=0,i="",a=[],s={},o=!1,d=!1,c=0,u="";r<=n;r++){if("\\"===(t=Sk(e,r)))t+=Sk(e,++r);else if("]"===t)o=!1;else if(!o)switch(!0){case"["===t:o=!0;break;case"("===t:Dk(Ik,Ck(e,r+1))&&(r+=2,d=!0),i+=t,c++;continue;case">"===t&&d:if(""===u||gk(s,u))throw new xk("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=sk(kk(e,t),d?this:Ek,Fk),(r||i||l.length)&&(o=vk(s),r&&(o.dotAll=!0,o.raw=Fk(function(e){for(var t,n=e.length,r=0,i="",a=!1;r<=n;r++)"\\"!==(t=Sk(e,r))?a||"."!==t?("["===t?a=!0:"]"===t&&(a=!1),i+=t):i+="[\\s\\S]":i+=t+Sk(e,++r);return i}(e),n)),i&&(o.sticky=!0),l.length&&(o.groups=l)),e!==h)try{ok(s,"source",""===h?"(?:)":h)}catch(e){}return s},jk=dk(kk),Nk=0;jk.length>Nk;)fk(Fk,kk,jk[Nk++]);Ek.constructor=Fk,Fk.prototype=Ek,mk(rk,"RegExp",Fk,{constructor:!0})}bk("RegExp");var Gk=Xa,qk=Vr,Hk=Yi,Qk=Pi,Vk=ue([].join);Gk({target:"Array",proto:!0,forced:qk!=Object||!Qk("join",",")},{join:function(e){return Vk(Hk(this),void 0===e?",":e)}});var zk=Ii.map;Xa({target:"Array",proto:!0,forced:!Oc("map")},{map:function(e){return zk(this,e,arguments.length>1?arguments[1]:void 0)}});var Wk=tt,Kk=ue,Yk=vt,Jk=ie,Zk=ts,Xk=Ea,$k=Hi,eE=ge,tE=Vr,nE=Object.assign,rE=Object.defineProperty,iE=Kk([].concat),aE=!nE||Jk((function(){if(Wk&&1!==nE({b:1},nE(rE({},"a",{enumerable:!0,get:function(){rE(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach((function(e){t[e]=e})),7!=nE({},e)[n]||Zk(nE({},t)).join("")!=r}))?function(e,t){for(var n=eE(e),r=arguments.length,i=1,a=Xk.f,s=$k.f;r>i;)for(var o,d=tE(arguments[i++]),c=a?iE(Zk(d),a(d)):Zk(d),u=c.length,l=0;u>l;)o=c[l++],Wk&&!Yk(s,d,o)||(n[o]=d[o]);return n}:nE,sE=aE;Xa({target:"Object",stat:!0,arity:2,forced:Object.assign!==sE},{assign:sE});var oE,dE=ue,cE=2147483647,uE=/[^\0-\u007E]/,lE=/[.\u3002\uFF0E\uFF61]/g,hE="Overflow: input needs wider integers to process",pE=RangeError,fE=dE(lE.exec),mE=Math.floor,AE=String.fromCharCode,gE=dE("".charCodeAt),vE=dE([].join),bE=dE([].push),_E=dE("".replace),yE=dE("".split),wE=dE("".toLowerCase),kE=function(e){return e+22+75*(e<26)},EE=function(e,t,n){var r=0;for(e=n?mE(e/700):e>>1,e+=mE(e/t);e>455;)e=mE(e/35),r+=36;return mE(r+36*e/(e+38))},xE=function(e){var t=[];e=function(e){for(var t=[],n=0,r=e.length;n<r;){var i=gE(e,n++);if(i>=55296&&i<=56319&&n<r){var a=gE(e,n++);56320==(64512&a)?bE(t,((1023&i)<<10)+(1023&a)+65536):(bE(t,i),n--)}else bE(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&&bE(t,AE(r));var d=t.length,c=d;for(d&&bE(t,"-");c<i;){var u=cE;for(n=0;n<e.length;n++)(r=e[n])>=a&&r<u&&(u=r);var l=c+1;if(u-a>mE((cE-s)/l))throw pE(hE);for(s+=(u-a)*l,a=u,n=0;n<e.length;n++){if((r=e[n])<a&&++s>cE)throw pE(hE);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;bE(t,AE(kE(f+m%A))),h=mE(m/A),p+=36}bE(t,AE(kE(h))),o=EE(s,l,c==d),s=0,c++}}s++,a++}return vE(t,"")},DE=Xa,SE=tt,RE=Xb,TE=W,CE=Nr,IE=ue,OE=Ar,PE=ao,BE=$p,LE=_e,UE=aE,ME=Fu,FE=Js,jE=nl.codeAt,NE=function(e){var t,n,r=[],i=yE(_E(wE(e),lE,"."),".");for(t=0;t<i.length;t++)n=i[t],bE(r,fE(uE,n)?"xn--"+xE(n):n);return vE(r,".")},GE=ms,qE=yo,HE=uf,QE=by,VE=Kn,zE=VE.set,WE=VE.getterFor("URL"),KE=QE.URLSearchParams,YE=QE.getState,JE=TE.URL,ZE=TE.TypeError,XE=TE.parseInt,$E=Math.floor,ex=Math.pow,tx=IE("".charAt),nx=IE(/./.exec),rx=IE([].join),ix=IE(1..toString),ax=IE([].pop),sx=IE([].push),ox=IE("".replace),dx=IE([].shift),cx=IE("".split),ux=IE("".slice),lx=IE("".toLowerCase),hx=IE([].unshift),px="Invalid scheme",fx="Invalid host",mx="Invalid port",Ax=/[a-z]/i,gx=/[\d+-.a-z]/i,vx=/\d/,bx=/^0x/i,_x=/^[0-7]+$/,yx=/^\d+$/,wx=/^[\da-f]+$/i,kx=/[\0\t\n\r #%/:<>?@[\\\]^|]/,Ex=/[\0\t\n\r #/:<>?@[\\\]^|]/,xx=/^[\u0000-\u0020]+/,Dx=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,Sx=/[\t\n\r]/g,Rx=function(e){var t,n,r,i;if("number"==typeof e){for(t=[],n=0;n<4;n++)hx(t,e%256),e=$E(e/256);return rx(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+=ix(e[n],16),n<7&&(t+=":")));return"["+t+"]"}return e},Tx={},Cx=UE({},Tx,{" ":1,'"':1,"<":1,">":1,"`":1}),Ix=UE({},Cx,{"#":1,"?":1,"{":1,"}":1}),Ox=UE({},Ix,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),Px=function(e,t){var n=jE(e,0);return n>32&&n<127&&!LE(t,e)?e:encodeURIComponent(e)},Bx={ftp:21,file:null,http:80,https:443,ws:80,wss:443},Lx=function(e,t){var n;return 2==e.length&&nx(Ax,tx(e,0))&&(":"==(n=tx(e,1))||!t&&"|"==n)},Ux=function(e){var t;return e.length>1&&Lx(ux(e,0,2))&&(2==e.length||"/"===(t=tx(e,2))||"\\"===t||"?"===t||"#"===t)},Mx=function(e){return"."===e||"%2e"===lx(e)},Fx={},jx={},Nx={},Gx={},qx={},Hx={},Qx={},Vx={},zx={},Wx={},Kx={},Yx={},Jx={},Zx={},Xx={},$x={},eD={},tD={},nD={},rD={},iD={},aD=function(e,t,n){var r,i,a,s=GE(e);if(t){if(i=this.parse(s))throw ZE(i);this.searchParams=null}else{if(void 0!==n&&(r=new aD(n,!0)),i=this.parse(s,null,r))throw ZE(i);(a=YE(new KE)).bindURL(this),this.searchParams=a}};aD.prototype={type:"URL",parse:function(e,t,n){var r,i,a,s,o,d=this,c=t||Fx,u=0,l="",h=!1,p=!1,f=!1;for(e=GE(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=ox(e,xx,""),e=ox(e,Dx,"$1")),e=ox(e,Sx,""),r=ME(e);u<=r.length;){switch(i=r[u],c){case Fx:if(!i||!nx(Ax,i)){if(t)return px;c=Nx;continue}l+=lx(i),c=jx;break;case jx:if(i&&(nx(gx,i)||"+"==i||"-"==i||"."==i))l+=lx(i);else{if(":"!=i){if(t)return px;l="",c=Nx,u=0;continue}if(t&&(d.isSpecial()!=LE(Bx,l)||"file"==l&&(d.includesCredentials()||null!==d.port)||"file"==d.scheme&&!d.host))return;if(d.scheme=l,t)return void(d.isSpecial()&&Bx[d.scheme]==d.port&&(d.port=null));l="","file"==d.scheme?c=Zx:d.isSpecial()&&n&&n.scheme==d.scheme?c=Gx:d.isSpecial()?c=Vx:"/"==r[u+1]?(c=qx,u++):(d.cannotBeABaseURL=!0,sx(d.path,""),c=nD)}break;case Nx:if(!n||n.cannotBeABaseURL&&"#"!=i)return px;if(n.cannotBeABaseURL&&"#"==i){d.scheme=n.scheme,d.path=FE(n.path),d.query=n.query,d.fragment="",d.cannotBeABaseURL=!0,c=iD;break}c="file"==n.scheme?Zx:Hx;continue;case Gx:if("/"!=i||"/"!=r[u+1]){c=Hx;continue}c=zx,u++;break;case qx:if("/"==i){c=Wx;break}c=tD;continue;case Hx:if(d.scheme=n.scheme,i==oE)d.username=n.username,d.password=n.password,d.host=n.host,d.port=n.port,d.path=FE(n.path),d.query=n.query;else if("/"==i||"\\"==i&&d.isSpecial())c=Qx;else if("?"==i)d.username=n.username,d.password=n.password,d.host=n.host,d.port=n.port,d.path=FE(n.path),d.query="",c=rD;else{if("#"!=i){d.username=n.username,d.password=n.password,d.host=n.host,d.port=n.port,d.path=FE(n.path),d.path.length--,c=tD;continue}d.username=n.username,d.password=n.password,d.host=n.host,d.port=n.port,d.path=FE(n.path),d.query=n.query,d.fragment="",c=iD}break;case Qx:if(!d.isSpecial()||"/"!=i&&"\\"!=i){if("/"!=i){d.username=n.username,d.password=n.password,d.host=n.host,d.port=n.port,c=tD;continue}c=Wx}else c=zx;break;case Vx:if(c=zx,"/"!=i||"/"!=tx(l,u+1))continue;u++;break;case zx:if("/"!=i&&"\\"!=i){c=Wx;continue}break;case Wx:if("@"==i){h&&(l="%40"+l),h=!0,a=ME(l);for(var m=0;m<a.length;m++){var A=a[m];if(":"!=A||f){var g=Px(A,Ox);f?d.password+=g:d.username+=g}else f=!0}l=""}else if(i==oE||"/"==i||"?"==i||"#"==i||"\\"==i&&d.isSpecial()){if(h&&""==l)return"Invalid authority";u-=ME(l).length+1,l="",c=Kx}else l+=i;break;case Kx:case Yx:if(t&&"file"==d.scheme){c=$x;continue}if(":"!=i||p){if(i==oE||"/"==i||"?"==i||"#"==i||"\\"==i&&d.isSpecial()){if(d.isSpecial()&&""==l)return fx;if(t&&""==l&&(d.includesCredentials()||null!==d.port))return;if(s=d.parseHost(l))return s;if(l="",c=eD,t)return;continue}"["==i?p=!0:"]"==i&&(p=!1),l+=i}else{if(""==l)return fx;if(s=d.parseHost(l))return s;if(l="",c=Jx,t==Yx)return}break;case Jx:if(!nx(vx,i)){if(i==oE||"/"==i||"?"==i||"#"==i||"\\"==i&&d.isSpecial()||t){if(""!=l){var v=XE(l,10);if(v>65535)return mx;d.port=d.isSpecial()&&v===Bx[d.scheme]?null:v,l=""}if(t)return;c=eD;continue}return mx}l+=i;break;case Zx:if(d.scheme="file","/"==i||"\\"==i)c=Xx;else{if(!n||"file"!=n.scheme){c=tD;continue}if(i==oE)d.host=n.host,d.path=FE(n.path),d.query=n.query;else if("?"==i)d.host=n.host,d.path=FE(n.path),d.query="",c=rD;else{if("#"!=i){Ux(rx(FE(r,u),""))||(d.host=n.host,d.path=FE(n.path),d.shortenPath()),c=tD;continue}d.host=n.host,d.path=FE(n.path),d.query=n.query,d.fragment="",c=iD}}break;case Xx:if("/"==i||"\\"==i){c=$x;break}n&&"file"==n.scheme&&!Ux(rx(FE(r,u),""))&&(Lx(n.path[0],!0)?sx(d.path,n.path[0]):d.host=n.host),c=tD;continue;case $x:if(i==oE||"/"==i||"\\"==i||"?"==i||"#"==i){if(!t&&Lx(l))c=tD;else if(""==l){if(d.host="",t)return;c=eD}else{if(s=d.parseHost(l))return s;if("localhost"==d.host&&(d.host=""),t)return;l="",c=eD}continue}l+=i;break;case eD:if(d.isSpecial()){if(c=tD,"/"!=i&&"\\"!=i)continue}else if(t||"?"!=i)if(t||"#"!=i){if(i!=oE&&(c=tD,"/"!=i))continue}else d.fragment="",c=iD;else d.query="",c=rD;break;case tD:if(i==oE||"/"==i||"\\"==i&&d.isSpecial()||!t&&("?"==i||"#"==i)){if(".."===(o=lx(o=l))||"%2e."===o||".%2e"===o||"%2e%2e"===o?(d.shortenPath(),"/"==i||"\\"==i&&d.isSpecial()||sx(d.path,"")):Mx(l)?"/"==i||"\\"==i&&d.isSpecial()||sx(d.path,""):("file"==d.scheme&&!d.path.length&&Lx(l)&&(d.host&&(d.host=""),l=tx(l,0)+":"),sx(d.path,l)),l="","file"==d.scheme&&(i==oE||"?"==i||"#"==i))for(;d.path.length>1&&""===d.path[0];)dx(d.path);"?"==i?(d.query="",c=rD):"#"==i&&(d.fragment="",c=iD)}else l+=Px(i,Ix);break;case nD:"?"==i?(d.query="",c=rD):"#"==i?(d.fragment="",c=iD):i!=oE&&(d.path[0]+=Px(i,Tx));break;case rD:t||"#"!=i?i!=oE&&("'"==i&&d.isSpecial()?d.query+="%27":d.query+="#"==i?"%23":Px(i,Tx)):(d.fragment="",c=iD);break;case iD:i!=oE&&(d.fragment+=Px(i,Cx))}u++}},parseHost:function(e){var t,n,r;if("["==tx(e,0)){if("]"!=tx(e,e.length-1))return fx;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 tx(e,l)};if(":"==h()){if(":"!=tx(e,1))return;l+=2,u=++c}for(;h();){if(8==c)return;if(":"!=h()){for(t=n=0;n<4&&nx(wx,h());)t=16*t+XE(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(!nx(vx,h()))return;for(;nx(vx,h());){if(a=XE(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}(ux(e,1,-1)),!t)return fx;this.host=t}else if(this.isSpecial()){if(e=NE(e),nx(kx,e))return fx;if(t=function(e){var t,n,r,i,a,s,o,d=cx(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"==tx(i,0)&&(a=nx(bx,i)?16:8,i=ux(i,8==a?1:2)),""===i)s=0;else{if(!nx(10==a?yx:8==a?_x:wx,i))return e;s=XE(i,a)}sx(n,s)}for(r=0;r<t;r++)if(s=n[r],r==t-1){if(s>=ex(256,5-t))return null}else if(s>255)return null;for(o=ax(n),r=0;r<n.length;r++)o+=n[r]*ex(256,3-r);return o}(e),null===t)return fx;this.host=t}else{if(nx(Ex,e))return fx;for(t="",n=ME(e),r=0;r<n.length;r++)t+=Px(n[r],Tx);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return LE(Bx,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"==this.scheme&&1==t&&Lx(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+=Rx(i),null!==a&&(c+=":"+a)):"file"==t&&(c+="//"),c+=e.cannotBeABaseURL?s[0]:s.length?"/"+rx(s,"/"):"",null!==o&&(c+="?"+o),null!==d&&(c+="#"+d),c},setHref:function(e){var t=this.parse(e);if(t)throw ZE(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"==e)try{return new sD(e.path[0]).origin}catch(e){return"null"}return"file"!=e&&this.isSpecial()?e+"://"+Rx(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(GE(e)+":",Fx)},getUsername:function(){return this.username},setUsername:function(e){var t=ME(GE(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var n=0;n<t.length;n++)this.username+=Px(t[n],Ox)}},getPassword:function(){return this.password},setPassword:function(e){var t=ME(GE(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var n=0;n<t.length;n++)this.password+=Px(t[n],Ox)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?Rx(e):Rx(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,Kx)},getHostname:function(){var e=this.host;return null===e?"":Rx(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,Yx)},getPort:function(){var e=this.port;return null===e?"":GE(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""==(e=GE(e))?this.port=null:this.parse(e,Jx))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+rx(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,eD))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""==(e=GE(e))?this.query=null:("?"==tx(e,0)&&(e=ux(e,1)),this.query="",this.parse(e,rD)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!=(e=GE(e))?("#"==tx(e,0)&&(e=ux(e,1)),this.fragment="",this.parse(e,iD)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var sD=function(e){var t=BE(this,oD),n=HE(arguments.length,1)>1?arguments[1]:void 0,r=zE(t,new aD(e,!1,n));SE||(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())},oD=sD.prototype,dD=function(e,t){return{get:function(){return WE(this)[e]()},set:t&&function(e){return WE(this)[t](e)},configurable:!0,enumerable:!0}};if(SE&&(PE(oD,"href",dD("serialize","setHref")),PE(oD,"origin",dD("getOrigin")),PE(oD,"protocol",dD("getProtocol","setProtocol")),PE(oD,"username",dD("getUsername","setUsername")),PE(oD,"password",dD("getPassword","setPassword")),PE(oD,"host",dD("getHost","setHost")),PE(oD,"hostname",dD("getHostname","setHostname")),PE(oD,"port",dD("getPort","setPort")),PE(oD,"pathname",dD("getPathname","setPathname")),PE(oD,"search",dD("getSearch","setSearch")),PE(oD,"searchParams",dD("getSearchParams")),PE(oD,"hash",dD("getHash","setHash"))),OE(oD,"toJSON",(function(){return WE(this).serialize()}),{enumerable:!0}),OE(oD,"toString",(function(){return WE(this).serialize()}),{enumerable:!0}),JE){var cD=JE.createObjectURL,uD=JE.revokeObjectURL;cD&&OE(sD,"createObjectURL",CE(cD,JE)),uD&&OE(sD,"revokeObjectURL",CE(uD,JE))}qE(sD,"URL"),DE({global:!0,constructor:!0,forced:!RE,sham:!SE},{URL:sD});var lD=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}(),hD=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}(),pD=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}(),fD=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}(),mD=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}(),AD=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}(),gD=function(e){if(!e)return!1;var t=vD.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)},vD=Object.prototype.toString;function bD(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 _D(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?bD(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bD(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function yD(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 wD,kD="13998",ED="_cc".concat(kD),xD=["https://tags.crwdcntrl.net/c/".concat(kD,"/cc.js?ns=").concat(ED)],DD=function(){return!!wD&&"function"==typeof wD.bcpf&&"function"==typeof wD.add},SD=function(e,t){try{if(!DD())return;wD.add(e,t),"lotame add success ".concat(e," ").concat(t)}catch(e){err}},RD=function(e,t){try{if(!DD())return;wD.bcpw(e,t),"lotame send success ".concat(e," ").concat(t)}catch(e){}},TD=function(e){var n=this;try{SD("act","play"),SD("med","game"),"complete"===document.readyState?wD.bcpf():wD.bcp(),e.tags.forEach(function(e){t(this,n),RD("int","tags : ".concat(e.title.toLowerCase()))}.bind(this)),RD("int","category : ".concat(e.category.toLowerCase()))}catch(e){}},CD=function(){window.addEventListener("load",(function(){dw.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!=pb&&pb.noLotamePageView,!e.t0){e.next=7;break}return e.next=6,Aw();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(xD[0],"LOTCC_".concat(kD),{alternates:xD});case 16:"object"===n(window[ED])&&(wD=window[ED]),DD()&&TD(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)}}())}))},ID=function(){RD("genp","ad video"),RD("act","ad impression")},OD=function(){RD("act","ad skipped")},PD=function(){RD("act","ad click")},BD=function(){RD("act","ad complete")},LD=new Ry,UD={preroll:"game-start-video",midroll:"mid-level-video",rewarded:"rewarded-video"},MD=function(e,n){var r=this,i=function(e,t){var n=LD.get("partner.url.value"),r=UD[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)},FD=(new Ry).get("partner.domain.value"),jD=["latimes.com"],ND={exist:function(e){var n=this;return"Softgames-Azerion"===e.dname&&jD.some(function(e){return t(this,n),e===FD}.bind(this))},get:function(e,t){return function(e,t){return{"latimes.com":function(){var n=t.slug;return MD(n,e)}}[FD](e)}(e,t)}},GD=function(){var e=(new Ry).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},qD=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 HD(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 QD(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?HD(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):HD(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var VD=new M,zD=null,WD=function(){function n(e,r,i){var a=this;if(R(this,n),zD)return zD;zD=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,Q,V,z;return S(n,[{key:"start",value:(z=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 z.apply(this,arguments)})},{key:"adSystemInitialize",value:(V=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 V.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:(Q=e(r.mark((function e(t){var n,i,a,s,o,d,c,u,l,h,p,f;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.adType,i=t.options,e.prev=1,o=null===(a=this.gameData.adflw)||void 0===a||null===(s=a.adapterConfig)||void 0===s?void 0:s.spil,d=this.nextAdPosition(n),e.next=6,this._create_dp_context(d,i);case 6:return c=e.sent,o?(this.gameData,u=o[d]||o.default||this._getDefaultSpilAdapterConfig()):u=this._getDefaultSpilAdapterConfig(),l=100*c.floor_price,c.floor_price,h=this._createCustomAdVastUrl(u,{tnl_keys:{floor_price:l}}),p=h.url,f={url:p,dp:c,hl:{bidFloorApplied:!0}},e.abrupt("return",f);case 17:e.prev=17,e.t0=e.catch(1),console.log("spil-adaptor: Error on getting spil",e.t0);case 20:case"end":return e.stop()}}),e,this,[[1,17]])}))),function(e){return Q.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")||GD().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,us("gd-adflow, before idhb",u,h),f=window.idhb.getAdserverTargetingForAdSlot(h),window.idhb.setAdserverTargeting(QD(QD({},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:QD(QD({},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=QD(QD({},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=_D(_D({},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=_D(_D({},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(yD({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=ND.exist(this.gameData)&&ND.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:(H=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 H.apply(this,arguments)})},{key:"_initDisplayContainerWithAutoPlay",value:(q=e(r.mark((function e(){var t;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._checkAutoPlay(!1);case 2:return t=e.sent,this._autoplay=t,this.video_ad_player.autoplay=t.autoplayAllowed,this.video_ad_player.volume=t.autoplayRequiresMute?0:1,this.video_ad_player.muted=!!t.autoplayRequiresMute,t.adDisplayContainerInitialized||(this.adDisplayContainer.initialize(),this.adDisplayContainerInitialized=!0),e.abrupt("return",t);case 9:case"end":return e.stop()}}),e,this)}))),function(){return q.apply(this,arguments)})},{key:"startAd",value:(M=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=QD(QD({},s),{},{adType:a}),null!==(i=this.gameData.adspn)&&void 0!==i&&i.enabled&&(this.adFlowProcessSpinner||(this.adFlowProcessSpinner=new qD,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 M.apply(this,arguments)})},{key:"_startOpusAd",value:(L=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=QD(QD({},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 L.apply(this,arguments)})},{key:"preloadAd",value:(B=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 B.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 hD(this.adContainer,n),this.adResume.add(),this.rewardedLabel=new pD(this.adContainer,n),this.rewardedLabel.add(),this.skipAdButton=new fD(this.adContainer,n,r),this.skipAdButton.add(),this.audioAdLabel=new mD(window.document.body),this.audioAdLabel.add(),this.audioAdLabel.hide()}catch(e){console.log("error on adding adResume",e)}}},{key:"loadDisplayAd",value:(P=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 P.apply(this,arguments)})},{key:"_startInterstitialAd",value:(O=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(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,d),hs.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(QD(QD({},a),n));case 13:if(s=e.sent,o=s.success,s.args,o){e.next=18;break}return e.abrupt("return");case 18:a.autoplayRequiresMute&&this.adsManager.setVolume(0),!0===(null===(i=this.gameData.advlm)||void 0===i?void 0:i.mode)&&this.adsManager.setVolume(1),this.adsManager.init(this.options.width,this.options.height,google.ima.ViewMode.NORMAL),this.adsManager.start(),e.next=29;break;case 24:throw e.prev=24,e.t0=e.catch(0),e.t0,this._onError(e.t0),e.t0;case 29:case"end":return e.stop()}}),e,this,[[0,24]])}))),function(e){return O.apply(this,arguments)})},{key:"_startPromo",value:(D=e(r.mark((function e(t,n){var i,a,s,o;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(QD(QD({},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:a.autoplayRequiresMute&&this.adsManager.setVolume(0),!0===(null===(i=this.gameData.advlm)||void 0===i?void 0:i.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=28;break;case 23:throw e.prev=23,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 28:case"end":return e.stop()}}),e,this,[[0,23]])}))),function(e,t){return D.apply(this,arguments)})},{key:"_loadPromo",value:(x=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,QD({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 x.apply(this,arguments)})},{key:"_loadInterstitialAd",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.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,QD({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 E.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:(k=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(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,d),hs.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(QD(QD({},a),n));case 13:if(s=e.sent,o=s.success,s.args,o){e.next=18;break}return e.abrupt("return");case 18:a.autoplayRequiresMute&&this.adsManager.setVolume(0),!0===(null===(i=this.gameData.advlm)||void 0===i?void 0:i.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 24:throw e.prev=24,e.t0=e.catch(0),this._onError(e.t0),e.t0;case 28:case"end":return e.stop()}}),e,this,[[0,24]])}))),function(e){return k.apply(this,arguments)})},{key:"_loadRewardedAd",value:(w=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,QD({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 w.apply(this,arguments)})},{key:"_preloadInterstitialAd",value:(p=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 p.apply(this,arguments)})},{key:"_preloadRewardedAd",value:(l=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 l.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,u=(null===(d=this._adrequest_user_context)||void 0===d||null===(c=d.adTag)||void 0===c?void 0:c.bidder)||"adx";this._broadcast("AD_BIDDER",{bidder:u}),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 AD(this.adContainer),this.t4rButton.add(),this._broadcast("AD_T4R_VIDEO")),a&&this.adsManager.setVolume(0),a&&this._broadcast("AD_T4R"),a&&setTimeout(function(){t(this,n),this.activeAdContainer.style.opacity=1,this.adsManager.setVolume(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){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(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,s=this,o=new Date,d=o.getHours(),c=o.getDate(),u=o.getMonth(),l=o.getFullYear(),h=v(google.ima.AdEvent.Type,e.type),p=!1,f=(null==e||null===(n=e.getAd())||void 0===n?void 0:n.getContentType())||"",m=!f.startsWith("image")&&!f.startsWith("text"),g=null==e||null===(r=e.ad)||void 0===r||null===(i=r.data)||void 0===i?void 0:i.title,b=null==e||null===(a=e.getAd())||void 0===a?void 0:a.data.skippable;this._sendIMAEventsToHB(e);var _=document.getElementById("game"),y="";switch(e.type){case google.ima.AdEvent.Type.AD_BREAK_READY:y="Fired when an ad rule or a VMAP ad break would have played if autoPlayAdBreaks is false.";break;case google.ima.AdEvent.Type.AD_METADATA:y="Fired when an ads list is loaded.";break;case google.ima.AdEvent.Type.ALL_ADS_COMPLETED:this.contentPaused&&(p=!0),this.isAudioAd&&(this.audioAdLabel.hide(),this.isAudioAd=!1),this.rewardGuarantied=!1,y="Fired when the ads manager is done playing all the ads.";break;case google.ima.AdEvent.Type.CLICK:y="Fired when the ad is clicked.";var w=e.getAd().getContentType();this._show({mode:"click",contentType:w}),PD();break;case google.ima.AdEvent.Type.COMPLETE:e.getAd(),p=this._is_completed(e.getAd()),y="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&&(_.style.display="none"),this.contentPaused=!0,y="Fired when content should be paused. This usually happens right before an ad is about to cover the content.";break;case google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED:this.gameData.fllc.enabled&&(_.style.display="block"),y="Fired when content should be resumed. This usually happens when an ad finishes or collapses.",this.contentPaused?p=!0:(this.requestRunning=!1,this._broadcast("AD_ERROR",{message:"got resume without pause, possibly with VMAP",status:"error",skipForward:!0})),this._hideAddResume(),this._hideRewardedLabel(),this._hideSkipButton(),this.t4rButton&&this.t4rButton.hide();break;case google.ima.AdEvent.Type.DURATION_CHANGE:y="Fired when the ad's duration changes.";break;case google.ima.AdEvent.Type.FIRST_QUARTILE:y="Fired when the ad playhead crosses first quartile.";var k=e.getAd().getContentType();this._show({mode:"first_quartile",contentType:k});break;case google.ima.AdEvent.Type.IMPRESSION:y="Fired when the impression URL has been pinged.",e.getAd(),console.log("gdsdk: eventname IMPRESSION",this.isAudioAd),this._hideAdSpinner(),this.isAudioAd&&this.audioAdLabel.show();break;case google.ima.AdEvent.Type.INTERACTION:y="Fired when an ad triggers the interaction callback. Ad interactions contain an interaction ID string in the ad data.";break;case google.ima.AdEvent.Type.LINEAR_CHANGED:y="Fired when the displayed ad changes from linear to nonlinear, or vice versa.";break;case google.ima.AdEvent.Type.LOADED:var E=e.getAd().getContentType();y=E,this._show({mode:"loaded",contentType:E});break;case google.ima.AdEvent.Type.LOG:e.getAdData().adError&&(y=e.getAdData());break;case google.ima.AdEvent.Type.MIDPOINT:y="Fired when the ad playhead crosses midpoint.";break;case google.ima.AdEvent.Type.PAUSED:m&&"VPAID"!==g&&this.adResume.show(),y="Fired when the ad is paused.";break;case google.ima.AdEvent.Type.RESUMED:y="Fired when the ad is resumed.",m&&(this.adResume.hide(),this.rewardedLabel.hide());break;case google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED:y="Fired when the displayed ads skippable state is changed.";break;case google.ima.AdEvent.Type.SKIPPED:p=this._is_completed(e.getAd()),y="Fired when the ad is skipped by the user.",OD(),this.t4rButton&&this.t4rButton.hide();break;case google.ima.AdEvent.Type.STARTED:var x;if(this.adType_===A.Rewarded)!b&&null!==(x=this.gameData.rwskp)&&void 0!==x&&x.enabled&&setTimeout(function(){t(this,s),this.skipAdButton.show(),this._broadcast("SDK_REWARDED_WATCH_COMPLETE",{message:"",status:"success"}),this.rewardGuarantied=!0}.bind(this),3e4),this.rewardedLabel.show();this._hideAddResume(),y="Fired when the ad starts playing.";break;case google.ima.AdEvent.Type.THIRD_QUARTILE:y="Fired when the ad playhead crosses third quartile.";break;case google.ima.AdEvent.Type.USER_CLOSE:p=this._is_completed(e.getAd()),y="Fired when the ad is closed by the user.";break;case google.ima.AdEvent.Type.VOLUME_CHANGED:y="Fired when the ad volume has changed.";break;case google.ima.AdEvent.Type.VOLUME_MUTED:y="Fired when the ad volume has been muted."}if(""!==h&&""!==y){var D=!this.contentPaused&&e.type===google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,S=!this.contentPaused&&e.type===google.ima.AdEvent.Type.ALL_ADS_COMPLETED;D||S||this.isAudioAd||this._broadcast(h,{name:h,message:y,status:"success",analytics:{category:h,action:this.parentDomain,label:"h".concat(d," d").concat(c," m").concat(u," y").concat(l)}})}if(p&&!this.adSuccess){this.adSuccess=!0;var R=e.getAd(),T="Rainbow"===(null==R?void 0:R.getAdSystem())&&(null==R?void 0:R.getWrapperAdIds().some(function(e){return t(this,s),"promo"===e}.bind(this)));null==R||R.getAdSystem(),null==R||R.getWrapperAdIds(),this._broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success",isPromoSuccess:T}),this.resetForNext(e)}}},{key:"_run_atom_tag_aws_test",value:function(e){var n=this;try{var r,i,a,s,o;if(!((null===(r=this.gameData)||void 0===r||null===(i=r.aws_tst)||void 0===i?void 0:i.enabled)&&(null===(a=this.gameData)||void 0===a||null===(s=a.aws_tst)||void 0===s||null===(o=s.ep)||void 0===o?void 0:o.atm)))return;var d=e.type,c=e.url;if("none"===d||!c)return;c=c.replace("tag.atom.gamedistribution.com","atom-tag-prod-aws.gamedistribution.com"),fetch(c).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);VD.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(gD(e.getInnerError)){var t=e.getInnerError();if(t)return gD(t.getErrorCode)&&gD(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||{}),QD({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,s=(null===(n=this._adrequest_user_context)||void 0===n||null===(r=n.adTag)||void 0===r?void 0:r.bidder)||"adx";this.msgrt.send("bidder",{message:s}),this._adrequest_user_context,'bidder:"'.concat(s,'"');var o=(null===(i=this.gameData.t4rc)||void 0===i?void 0:i.bidder_exc)||[],d=(null===(a=this.gameData.t4rc)||void 0===a?void 0:a.bidder_inc)||[],c=!1;return d.length>0?c=!d.some(function(n){return t(this,e),n===s}.bind(this)):o.length>0&&(c=o.some(function(n){return t(this,e),n===s}.bind(this))),c}catch(e){console.log("ex_bidder ERR",e)}}},{key:"_isExcludedBidderForT4RWithBidderExcRate",value:function(){var e,t,n,r,i=this._isExcludedBidderForT4R(),a=null===(e=this.gameData)||void 0===e||null===(t=e.t4rc)||void 0===t?void 0:t.bidder_exc_rate,s=null!=a&&a.enabled?(null==a?void 0:a.rate)||.8:0,o=(null===(n=this._adrequest_user_context)||void 0===n||null===(r=n.adTag)||void 0===r?void 0:r.bidder)||"adx",d=Math.random();return i||"adx"!==o&&d<s}},{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,o,d,c,u,l,h,p,f,m;if(!e)return!1;var A="preroll"===e&&(!0===(null===(t=this.gameData)||void 0===t||null===(n=t.pAds)||void 0===n?void 0:n.vmap)||!0===(null===(r=this.gameData)||void 0===r||null===(i=r.pAds)||void 0===i||null===(a=i.vmap)||void 0===a?void 0:a.enabled))||"midroll"===e&&(!0===(null===(s=this.gameData)||void 0===s||null===(o=s.mAds)||void 0===o?void 0:o.vmap)||!0===(null===(d=this.gameData)||void 0===d||null===(c=d.mAds)||void 0===c||null===(u=c.vmap)||void 0===u?void 0:u.enabled))||"rewarded"===e&&(!0===(null===(l=this.gameData)||void 0===l||null===(h=l.rAds)||void 0===h?void 0:h.vmap)||!0===(null===(p=this.gameData)||void 0===p||null===(f=p.rAds)||void 0===f||null===(m=f.vmap)||void 0===m?void 0:m.enabled));if(!A)return!1;var g=this._get_vmap_config(e),v=this.adCounter[e];return void 0!==(null==g?void 0:g.start)?v>=(null==g?void 0:g.start):A}},{key:"_getT4ROptions",value:function(e){var t,n=null===(t=this._adrequest_user_context)||void 0===t?void 0:t.tnl_ad_pos;switch(n){case"preroll":case"midroll":case"rewarded":return e.t4r[n]}}},{key:"_is_completed",value:function(e){var t=e.getContentType(),n=e.getAdPodInfo();return!(!t.startsWith("image/")&&"text"!==t&&1!==n.getTotalAds())}},{key:"_get_vmap_context",value:function(e){for(var t=e.adtag,n=e.position,r=e.config,i=e.dp,a=r.count||2,s=[],o=1;o<=a;o++){var d={};d.adtag=this._createCustomAdVastUrl(r["vast_"+o])||t,d.position=n,d.dp=r["vast_"+o]?void 0:i,s.push(d)}return s}},{key:"_get_vmap_config",value:function(e){var t,n,r,i,a,s,o,d;switch(e){case"preroll":return null===(t=this.gameData)||void 0===t||null===(n=t.pAds)||void 0===n?void 0:n.vmap;case"midroll":return null===(r=this.gameData)||void 0===r||null===(i=r.mAds)||void 0===i?void 0:i.vmap;case"rewarded":return null===(a=this.gameData)||void 0===a||null===(s=a.rAds)||void 0===s?void 0:s.vmap;default:return null===(o=this.gameData)||void 0===o||null===(d=o.pAds)||void 0===d?void 0:d.vmap}}},{key:"_isDP",value:function(e){var t,n,r;return!!e&&!0===(null===(t=this.gameData)||void 0===t||null===(n=t.dp)||void 0===n||null===(r=n[e])||void 0===r?void 0:r.enabled)}},{key:"_create_dp_display_context",value:function(){var e=this;return new Promise(function(n){var r=this;t(this,e);try{var i={id:this.topDomain||this.parentDomain,au:"display",ty:"display",aid:this.gameData.gameId,pgu:this.parentURL},a=new lD(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),hs.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 lD(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:(u=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 u.apply(this,arguments)})},{key:"_init_ima_script",value:(c=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 c.apply(this,arguments)})},{key:"_init_afg_script",value:(d=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 d.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:(o=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),hs.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||(us("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 o.apply(this,arguments)})},{key:"_startAdsensePlacementPreroll",value:(s=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),hs.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 s.apply(this,arguments)})},{key:"_startAdsensePlacementStart",value:(a=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),hs.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 a.apply(this,arguments)})},{key:"_startTimeoutForAdBreak",value:function(e){var n,r,i,a,s,o,d=this;if(null===(n=this.gameData)||void 0===n||null===(r=n.ad_blcks)||void 0===r||null===(i=r.adsenseTimeout)||void 0===i?void 0:i.enabled){null==e||e.adType,null===(a=this.gameData)||void 0===a||null===(s=a.ad_blcks)||void 0===s||null===(o=s.adsenseTimeout)||void 0===o||o.timeout;var c=setTimeout(function(){t(this,d),this.adPlacementEventReceived||(this._broadcast("AD_ERROR",{message:"timeout-_startTimeoutForAdBreak",status:"error"}),this.adPlacementEventReceived=!1,this.requestRunning=!1),clearTimeout(c)}.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:(i=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),hs.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 i.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 Ry).get();return n=QD(QD({},n),r),n=t?QD(QD({},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,QD(QD({},n),{},{skipForward:i,adPosition:a}))}}]),n}(),KD=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,Zg(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},Yg(this.moduleName,this.moduleConfig)})),YD=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,Zg(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},Yg(this.moduleName,this.moduleConfig)})),JD=function(e,t){console.log(e,t)},ZD={},XD={},$D=null;function eS(){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 ZD.version=r,ZD.frame=e,ZD.function=n,ZD.version}function tS(e){var n=this;return $D||($D=new Promise(function(r){function i(t,n){if(JD("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:ZD,consentData:i}),void r({result:"ok",consentData:t})):void 0;r({result:"ok",consentData:t})}else r({result:"cmpCallFailed"})}t(this,n),eS(),ZD.frame?2===ZD.version?(JD("TCF v2 CMP found. Fetching the consent."),ZD.function?(JD("CMP API is directly accessible, calling it now..."),ZD.function("addEventListener",ZD.version,i)):(JD("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!==XD[r.callId]&&XD[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});XD[d]=s,n.postMessage(u,"*")}.bind(this),window.addEventListener("message",s,!1),window[a](e,ZD.version,r)}("addEventListener",ZD.frame,i))):r({result:"cmpVersionNotV2",cmp:ZD}):r({result:"cmpNotFound"})}.bind(this)),$D)}var nS=new(function(){function t(){R(this,t),this.productName="Game Distribution"}var n;return S(t,[{key:"checkIfExcluded",value:function(e){try{var t,n;return!(null===(t=e.diagnostic)||void 0===t||null===(n=t.gameDock)||void 0===n||!n.excluded)}catch(e){return console.log("Error on checkIfExclude check",e),!1}}},{key:"track",value:(n=e(r.mark((function e(t,n){var i,a,s,o,d,c,u;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.checkIfExcluded(n)){e.next=3;break}return e.abrupt("return");case 3:if(s=null==t||null===(i=t.visitor)||void 0===i||null===(a=i.visitorData)||void 0===a?void 0:a.visitorId){e.next=6;break}return e.abrupt("return");case 6:return o=encodeURIComponent(this.productName),d=encodeURIComponent(s),e.prev=8,c="https://tracker-v4.gamedock.io/v1/events-tracker/track/product/".concat(o,"/user_id/").concat(d),e.next=12,fetch(c,{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,u="https://tracker.gamedock.io/v1/events-tracker/track/product/".concat(o,"/user_id/").concat(d),e.next=22,fetch(u,{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 rS(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 iS(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 iS(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 iS(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 aS=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=rS(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))},sS="ffd4774b-99ae-4464-8f40-3afa12b4692e",oS=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,aS({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,aS({src:"https://cdn.cookielaw.org/consent/".concat(sS,"/OtAutoBlock.js"),attributes:[{key:"id",value:"gd-cookie-pro-autoblock"}],isAsync:!1});case 5:return e.next=7,aS({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:sS}],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)}}(),dS=new M,cS={"https://games.softgames.com":{"splash-hidden":"splash-hidden"},"https://sg.gamedistribution.com":{"splash-hidden":"splash-hidden"},"https://html5.gamedistribution.com":{key:"value"}},uS=!1;function lS(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(cS).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)&&(uS=!0),i&&uS&&(uS=!1,window.parent.postMessage({type:"sg-game-event",eventName:"levelFinish",data:{score:100}},"*"))}}(r);var o=function(){t(this,n);try{var r,i;return null==e||null===(r=e.source)||void 0===r||null===(i=r.location)||void 0===i?void 0:i.href}catch(e){}}.bind(this);if(window.parent&&s){if("https://html5.gamedistribution.com"===i){var d=o();if(!d)return;var 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=cS[i][a];p&&dS.emit(p,r)}}}),!1);var hS="__msgr",pS=q(),fS=function(e){var n=this;if(!window[hS]){var r=document.createElement("iframe");if(r.src="https://static.gamedistribution.com/message/index.html",r.style.display="none",r.name=hS,document.body.appendChild(r),window!==window.top){var i={gameId:e.gameId,target:e.evnts.domain,token:pS,event_name:"TokenGenerated",timestamp:Date.now()};r.onload=function(){gS(i)},setInterval(function(){t(this,n),i.timestamp=Date.now(),i.event_name="Heartbeat",gS(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?lS(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lS(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e.data);if(!r.event_name)return;r.token=pS,gS(r)}catch(e){console.error("GD Messager Error",e.message)}}.bind(this),!1)},mS=function(e){try{var t={gameId:e.game.gameId,target:e.game.evnts.domain,event_name:e.event,timestamp:Date.now()},n=AS(window);n!==window.top&&(null==n||n.postMessage(t,"https://html5.gamedistribution.com"))}catch(e){}},AS=function e(t){try{var n,r,i=null==t?void 0:t.parent;if("game"===(null===(n=i.document)||void 0===n||null===(r=n.activeElement)||void 0===r?void 0:r.id))return i;e(i)}catch(e){return t}},gS=function(e){try{window[hS]&&window[hS].postMessage(e,"*")}catch(e){console.log("GD Messager initialization, please wait....")}},vS=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}(),bS=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}(),_S=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 bS,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 yS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function wS(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?yS(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yS(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var kS="_gd_vs";function ES(e){return xS.apply(this,arguments)}function xS(){return xS=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,RS({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,DS({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",wS(wS({},a),{},{errors:s}));case 25:case"end":return e.stop()}}),e,null,[[3,9],[14,20]])}))),xS.apply(this,arguments)}function DS(e){return SS.apply(this,arguments)}function SS(){return SS=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 _S({mode:a="local-storage"}),e.next=5,s.get(kS);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(kS,o);case 13:return e.abrupt("return",{visit:d,mode:a});case 14:case"end":return e.stop()}}),e)}))),SS.apply(this,arguments)}function RS(e){return TS.apply(this,arguments)}function TS(){return TS=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 _S({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)}))),TS.apply(this,arguments)}function CS(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 IS(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?CS(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):CS(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var OS,PS,BS,LS=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)}}(),US=0,MS=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,LS();case 12:PS=q(),d={json:JSON.stringify(a)},"wss://ws.gamedistribution.com",(OS=io("wss://ws.gamedistribution.com",{query:d,upgrade:!1,transports:["websocket"],reconnectionDelay:6e4,autoConnect:!1})).on("connect",function(){t(this,c)}.bind(this)),OS.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 BS=BS||(null==t?void 0:t.serverDate),n=a.gameId,e.next=4,ES({gameId:n,serverDate:BS});case 4:i=e.sent,s=i.visit,o=i.mode,d=i.errors,a.visit=IS(IS({},s),{},{stm:o,errors:d}),c={json:JSON.stringify(a)},OS.emit("client-info",{clientId:PS,counter:US++,serverDate:BS,query:c});case 11:case"end":return e.stop()}}),e)})));return function(e){return t.apply(this,arguments)}}()),OS.on("disconnect",function(e){t(this,c)}.bind(this)),OS.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)}}(),FS=!1;function jS(e,t){try{if("play"===e){if(FS)return;FS=!0}if(OS){var n={json:JSON.stringify(t||{})};OS.emit("socket-event",{topic:e,clientId:PS,counter:US,serverDate:BS,query:n})}}catch(e){console.log("Error on sending socket-event",e.message)}}function NS(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 GS(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?NS(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):NS(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function qS(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 QS,VS=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)}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,Q,V,z,W,K,Y,J,Z,X,$,ee,te,ne,re=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.adRequest=n,l=this._getAdTypeByAfgPosition(n),n.params.adTypeFound=l,n.params.position,(h=this._getAdFlow(l)).find(function(e){return t(this,re),"opus"===e}.bind(this))&&!this.isOpusReady()&&(h=h.filter(function(e){return t(this,re),"opus"!==e}.bind(this)),this._msgrt.send("opus.sdk",{message:"Not ready"})),p=this._gameData,f=p.afg_disabled,m=null===(i=n.params)||void 0===i?void 0:i.isGift,A=null===(a=n.params)||void 0===a?void 0:a.isMidrollPlus,null===(s=n.params)||void 0===s||s.position,g=null===(o=p.promo)||void 0===o?void 0:o.rainbow,v=(null==g?void 0:g.enabled)&&(null===(d=g.position)||void 0===d?void 0:d[l]),b=null==g?void 0:g.gift,_=v&&null!=g&&g.duration?null==g?void 0:g.duration:5,y=f?h.filter(function(e){return t(this,re),"adsense"!==e}.bind(this)):h,w=this.get_ad_system_init_result(),k=w.afg,E=w.ima,x=null==p||null===(c=p.ad_blcks)||void 0===c||null===(u=c.removeOtherAdaptors)||void 0===u?void 0:u.enabled,this.anyAdBlocking=!k||!E,this.bothAdBlocking=!k&&!E,this.adsBlocked=x&&this.anyAdBlocking||this.bothAdBlocking,this.adsBlocked?(us("gd-adflow adsBlocked so changing the flow"),y=[]):(k||(y=y.filter(function(e){return t(this,re),"adsense"!==e}.bind(this))),E||(y=y.filter(function(e){return t(this,re),"ima"!==e}.bind(this)))),D=!1,S=!1,R=[],C=0,I=!1,P={},B=qS(y),e.prev=33,B.s();case 35:if((L=B.n()).done){e.next=77;break}return U=L.value,n.params.adapter=U,M=C===y.length-1,F=m&&b||!m,j=M&&v&&F,n.params=GS(GS({},n.params),{},{adapterIndex:C,isLastAdapter:M,shouldFail:!1,extraPromoRunOnFail:j}),function(){t(this,re),hs.firstSuccessOrder&&!isNaN(hs.firstSuccessOrder)&&(n.params.shouldFail=C<hs.firstSuccessOrder)}.bind(this),us("gd-adflow, before adInvoke",C,U,n.params.shouldFail),e.next=46,this.adInvoke(n);case 46:if(N=e.sent,G=N.success,q=N.args,H=N.isSkipped,Q=N.noVast,V=N.t4r,z=null==q?void 0:q.reason,W=null==q?void 0:q.message,K=null==q?void 0:q.errorType,P[U]=P[U]||{req:0,imp:0,fail:0},P[U].req++,G?P[U].imp++:(P[U].fail++,P[U].failReason=z,P[U].failMessage=W,P[U].failType=K),!G){e.next=66;break}return us("gd-adflow, adapter-result-success",C,U,q,V),D=!0,S=!(null==q||!q.isPromoSuccess),O=V,e.abrupt("break",77);case 66:if(us("gd-adflow, adapter-result-failure",C,U,q.message),C++,R.push(q.message),!H){e.next=71;break}return e.abrupt("break",77);case 71:if(!Q){e.next=74;break}return this._runAutoResume(),e.abrupt("break",77);case 74:I=j;case 75:e.next=35;break;case 77:e.next=82;break;case 79:e.prev=79,e.t0=e.catch(33),B.e(e.t0);case 82:return e.prev=82,B.f(),e.finish(82);case 85:if(!I){e.next=91;break}return e.next=88,new vS(this).run({duration:_});case 88:e.sent.success&&(S=!0);case 91:return function(){var e;t(this,re),hs.disableGift&&null!==(e=p.gft)&&void 0!==e&&e[l].enabled&&(p.gft[l].enabled=!1)}.bind(this),Y=R.join(" /n"),D?(this._setAdRequestTimer(),this._onResumeGame("Advertisement(s) are done. Start / resume the game.","success"),this._giveGift(l),"midroll"===l&&this._executeMidrollPlus()):(this._onResumeGame(Y,"warning"),this._giveGift(l),"midroll"===l&&this._executeMidrollPlus()),J="-1",Z="none",D?(J="index_".concat(C),Z=y[C]):S&&(J="promo",Z="promo"),X=this.get_session_id(),this.anyAdBlocking&&"-1"===J?($="rewarded"===l?"rewarded":this.blockedAdsMap.preroll?"midroll":"preroll",this.blockedAdsMap[$]=this.blockedAdsMap[$]?this.blockedAdsMap[$]+1:1,JSON.stringify(this.blockedAdsMap),this._msgrt.send("adflow.blocked.pos",{message:"".concat($)}),this.send_atom_event("gd.adflow",{adBlocker:!0,afgBlocked:!k,imaBlocked:!E,isGift:m,isMidrollPlus:A,adType:$,sessionId:X,successAdapter:"none",adFlowIndex:J,adapterResults:P})):(T(ee={},"adflow.all.index",{message:"".concat(J)}),T(ee,"adflow.all.success_adapter",{message:"".concat(Z)}),T(ee,"adflow.".concat(l,".index"),{message:"".concat(J)}),T(ee,"adflow.".concat(l,".success_adapter"),{message:"".concat(Z)}),te=ee,Object.keys(te).forEach(function(e){t(this,re);var n=te[e];this._msgrt.send(e,n)}.bind(this)),this.send_atom_event("gd.adflow",{adFlowIndex:J,successAdapter:Z,adBlocker:!1,afgBlocked:!k,imaBlocked:!E,isGift:m,isMidrollPlus:A,adType:l,sessionId:X,t4r:O,adapterResults:P}),jS("ad-session",{adSession:{adType:l,imp:"-1"!==J&&"promo"!==J,promo:"promo"===J,blocked:this.anyAdBlocking&&"-1"===J}})),ne={adType:l},this.eventBus.broadcast("AD_FLOW_COMPLETE",ne),e.abrupt("return",ne);case 106:case"end":return e.stop()}}),e,this,[[33,79,82,85]])}))),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,o,d,c,u=this,l=void function(){if(t(this,u),hs.customAdFlow)return JSON.parse(hs.customAdFlow)}.bind(this),h=this._gameData.adflw;l&&(h=l);var p=null!==(n=h)&&void 0!==n&&null!==(r=n.adapters)&&void 0!==r&&r.default?null===(i=h)||void 0===i||null===(a=i.adapters)||void 0===a?void 0:a.default:["ima","adsense"];return p=null!==(s=h)&&void 0!==s&&null!==(o=s.adapters)&&void 0!==o&&o[e]?null===(d=h)||void 0===d||null===(c=d.adapters)||void 0===c?void 0:c[e]:p}}]),n}(),zS=new M,WS=["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(WS.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)QS=a,(window.parent||window).postMessage(r,"*"),zS.emit("aeria-event",r);else if(o){QS&&QS.postMessage(r,"*");var d=window.parent||window;d&&d.postMessage(r,"*")}}}),!1);var KS="https://html5.gamedistribution.com",YS="parent-data-request",JS="parent-data-response",ZS=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===KS&&o===YS){var d={adRequestTimer:e.adRequestTimer};s.postMessage({type:JS,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===KS&&i===JS&&(e(s),a=!0)})),setTimeout(function(){t(this,i),a||e()}.bind(this),1e3);var s={type:YS};window.parent.postMessage(s,"*")}.bind(this)));case 1:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})}]),n}(),XS=new ZS,$S={SDKExistsOnUpperFrame:!1},eR=function(){function e(t){R(this,e),this.adContainer=window.document.body,this.gameData=t,this.adBlockerTimer=Date.now(),this.adBlockerTimeInverval=18e4,this.isFirstTime=!0}return S(e,[{key:"show",value:function(){var e=Date.now()-this.adBlockerTimer;if(m.getBoolean("infdl1JMwI9JRg3U2MAIiQ==")){var t=this.gameData.rmblck,n="reminder"===(null==t?void 0:t.blockerMode);n&&(e>this.adBlockerTimeInverval||this.isFirstTime)?this.showAdBlocker():n||this.showAdBlocker()}}},{key:"showAdBlocker",value:function(){this.adBlockerOverlay.style.display="block",this.adBlockerTimer=Date.now(),this.isFirstTime=!1}},{key:"hide",value:function(){this.adBlockerOverlay.style.display="none"}},{key:"add",value:function(){var e=this;try{this.addStyles(),m.getBoolean("infdl1JMwI9JRg3U2MAIiQ==")||setTimeout(function(){t(this,e),m.set("infdl1JMwI9JRg3U2MAIiQ==",!0)}.bind(this),this.adBlockerTimeInverval);var n=document.createElement("div");n.id="gd__adblocker__button",n.setAttribute("title","AdBlocker"),n.classList.add("gd__adblocker__button"),n.onclick=function(){var n;t(this,e),"reminder"===(null===(n=this.gameData.rmblck)||void 0===n?void 0:n.blockerMode)?this.hide():(this.hide(),window.location.reload())}.bind(this);var r=document.createElement("p");r.innerText="Continue",n.appendChild(r),this.adBlockerButton=n;var i=document.createElement("div");i.id="gd__adblocker__logo",i.setAttribute("title","AdBlocker"),i.classList.add("gd__adblocker__logo"),this.adBlockerLogo=i;var a=document.createElement("p");a.id="gd__adblocker__text",a.classList.add("gd__adblocker__text1"),a.innerText="Thanks for playing!",this.adBlockerText1=a;var s=document.createElement("p");s.id="gd__adblocker__text",s.classList.add("gd__adblocker__text1"),s.innerHTML='It seems you’re using a plugin to block advertising within this game. \n To ensure the game works properly and to support our game creators, we kindly ask that you to whitelist \n <a class="gd__block__link" href="https://gamedistribution.com" target="_blank">gamedistribution.com</a> \n in your adblocker.',this.adBlockerText2=s;var o=document.createElement("p");o.id="gd__adblocker__text",o.classList.add("gd__adblocker__text1"),o.innerText="Thank you!",this.adBlockerText3=o;var d=document.createElement("div");d.id="gd__adblocker__container",d.classList.add("gd__adblocker__container"),d.appendChild(this.adBlockerText1),d.appendChild(this.adBlockerText2),d.appendChild(this.adBlockerText3),d.appendChild(this.adBlockerButton),d.appendChild(this.adBlockerLogo),this.adBlockerContainer=d;var c=document.createElement("div");c.id="gd__adblocker__overlay",c.classList.add("gd__adblocker__overlay"),c.appendChild(this.adBlockerContainer),this.adBlockerOverlay=c,this.adContainer.appendChild(this.adBlockerOverlay)}catch(e){console.log("AdBlocker error",e)}}},{key:"addStyles",value:function(){var e=document.body||document.getElementsByTagName("body")[0];this.addStylesheet("gd__adblocker__style",e,'\n .gd__adblocker__button {\n text-align: center;\n width: 90%;\n height: 50px;\n position: absolute;\n z-index: 2000;\n cursor: pointer;\n bottom: calc(10% - 20px);\n left: 5%; \n right: 5%; \n font-size: large;\n font-family: monospace;\n background-color: #ff8c1c;\n border-radius: 50px;\n color: white;\n margin: 0 auto;\n }\n\n .gd__adblocker__button > p {\n position: relative;\n text-align: center;\n margin: 0 auto;\n height: 100%;\n top: 30%;\n color: white;\n }\n\n .gd__adblocker__logo{\n background: url("https://static.gamedistribution.com/block-logo.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(20% - 50px);\n left: calc(50% - 50px);\n margin: 0;\n border-radius: 50%;\n }\n\n .gd__adblocker__container {\n position: absolute;\n // z-index: 2000;\n cursor: pointer;\n border-radius: 20px;\n border: 5px solid #06b8a2;\n margin: 0 auto;\n top: 10%;\n left: 10%;\n right: 10%;\n bottom: 10%;\n max-width: 80%; \n max-height: 80%; \n width: auto; \n height: auto; \n }\n \n .gd__adblocker__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,1);\n z-index: 1999;\n cursor: pointer;\n }\n\n .gd__adblocker__text1 {\n text-align: center;\n top: 35%;\n position: relative;\n font-family: monospace;\n color: white;\n margin: 10px;\n font-size: 1rem;\n padding: 0rem 10rem 0rem 10rem;\n line-height: 1rem;\n }\n\n .gd__block__link{\n color: #06b8a2;\n text-decoration: underline;\n }\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 tR(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 nR(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?tR(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tR(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var rR=function(){us("gtag: GA not initialized",arguments)};function iR(e){return aR.apply(this,arguments)}function aR(){return aR=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]||[],rR=function(){window[d].push(arguments)},rR("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=nR(nR({},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}),rR("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]])}))),aR.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 sR=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 oR(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 dR(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?oR(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oR(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function cR(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 Ry).get();return d=dR(dR({},d),c),function(e,t){try{var n=r._layout,o=r._ua,d={tp:e,ct:0,vrs:os.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?dR(dR({},d),o):d)}}}}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=q(),pR=null,fR=null,mR=function(){function n(e){var r,i,a,s,o=this;if(R(this,n),pR)return pR;pR=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 Ry,this._location.print();var d=this._location.get(),c=(null==d||null===(r=d.top)||void 0===r||null===(i=r.domain)||void 0===i?void 0:i.value)||(null==d||null===(a=d.partner.domain)||void 0===a?void 0:a.value),u=null==d||null===(s=d.partner.url)||void 0===s?void 0:s.value;this._parentURL=0===this._bridge.depth?encodeURIComponent(this._bridge.parentURL):this._bridge.parentURL,this._parentURL=this._parentURL||u,this._parentDomain=this._bridge.parentDomain,this._topDomain=this._bridge.topDomain,this._topDomain=this._topDomain||c,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,o),this._sdk_ready=!0}.bind(this)).catch(function(e){t(this,o),this._sdk_ready=!1}.bind(this)).finally(function(){var e,n,r,i,a=this;if((t(this,o),null===(e=this._gameData)||void 0===e||null===(n=e.directTokenUse)||void 0===n?void 0:n.enabled)&&this._blockDirectTokenURLEmbedding().blocked)return;this.dumper=new cR({msgrt:this.msgrt,gameData:this._gameData,parentDomain:this._parentDomain,parentURL:this._parentURL,topDomain:this._parentURL}),this.dumper,this._initGameSessionTracking(),this._sendLoadedEvent(2),!0===(null===(r=this._gameData.lp)||void 0===r?void 0:r.load)&&this._sendLoadedEvent(1),this._sendLoaderDataEvent(),this._checkSplashAndPromoScreens(),this._initBlockingExternals(),this._initUnityHandler(),this._checkFullscreen(),null!==(i=this._gameData.evnts)&&void 0!==i&&i.enabled&&this._isLoaderGameURL()&&(fS(this._gameData),this._gameData.evnts.gameId===this.options.gameId&&setInterval(function(){t(this,a),this._send_gametag_data("heartbeat")}.bind(this),1e3*this._gameData.evnts.heartbeatDuration)),XS.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;return S(n,[{key:"_getVisitorId",value:(q=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,sR({handler:function(){return t(this,d),!!fR}.bind(this),timeout:1e3,interval:10});case 2:return s=e.sent,o=s?null===(n=fR)||void 0===n||null===(i=n.visitor)||void 0===i||null===(a=i.visitorData)||void 0===a?void 0:a.visitorId:"noVisitorId",e.abrupt("return",o);case 5:case"end":return e.stop()}}),e,this)}))),function(){return q.apply(this,arguments)})},{key:"_initGameSessionTracking",value:(G=e(r.mark((function e(){var n,i,a,s,o,d,c,u,l,h,p,f,m,A,g,v,b,_,y,w=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null===(n=this._gameData)||void 0===n||null===(i=n.gs_trc)||void 0===i?void 0:i.enabled){e.next=3;break}return e.abrupt("return");case 3:return e.next=5,this._getVisitorId();case 5:a=e.sent,s=this._gameData,o=s.category,d=s.dname,c=s.pname,u=s.gameId,l=s.slug,h=s.title,p=s.ctry,f=this._topDomain||this._parentDomain,m=new Ry,A=m.get(),g=this.msgrt._ua,v=document.referrer,b=this.msgrt._layout,_=os.version,y={args:{rfr:v,category:o,dname:d,pname:c,gameId:u,slug:l,title:h,ctry:p,domain:f,loc:A,ua:g,layout:b,version:_,visitorId:a},onError:function(e){t(this,w),this._sendSDKError(e)}.bind(this)},MS(y);case 18:case"end":return e.stop()}}),e,this)}))),function(){return G.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:(j=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 j.apply(this,arguments)})},{key:"_loadCMP",value:(F=e(r.mark((function e(){var t,n,i,a,s,o;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._isMasterGameURL()){e.next=12;break}if(i=new Ry,0!==(null==(a=i.get("depth"))?void 0:a.value)||null===(t=this._gameData)||void 0===t||null===(n=t.cmp)||void 0===n||!n.enabled){e.next=12;break}if(null===(s=this._gameData)||void 0===s||null===(o=s.cmp)||void 0===o||!o.checkDepthOnly){e.next=9;break}return e.next=7,oS();case 7:e.next=12;break;case 9:if("html5.gamedistribution.com"!==this._topDomain){e.next=12;break}return e.next=12,oS();case 12:case"end":return e.stop()}}),e,this)}))),function(){return F.apply(this,arguments)})},{key:"testConsent",value:function(){try{eS();e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,tS({});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;dS.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:(M=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:");us("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 M.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:function(){try{var e,t=this.get_ad_system_init_result(),n=t.ima,r=t.afg;if(!n||!r)m.set(this.blockingDetectedKey,!0),null!==(e=this._gameData.rmblck)&&void 0!==e&&e.enabled&&(this.adBlockerPage||(this.adBlockerPage=new eR(this._gameData),this.adBlockerPage.add()))}catch(e){}}},{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=os.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:lR(lR({},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:os.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,r;t(this,e),fR=this._initGamedockTracker(window.GamedockSDK),this._sendGamedockEvent("pageview"),null!==(n=this._gameData.diagnostic)&&void 0!==n&&null!==(r=n.gameDock)&&void 0!==r&&r.adViewEvent&&fR.tracking.enableHeartBeatForPage({pageId:this.options.gameId,pageType:"game"},this._gameData.diagnostic.gameDock.heartbeatConfig),nS.track(fR,this._gameData)}.bind(this)).catch(function(n){t(this,e),this._sendSDKError(n)}.bind(this))}catch(e){}}},{key:"_initGamedockTracker",value:function(e){if(!this._bridge.isCoreSDKMode)return e.initialize("gd",this._parentDomain)}},{key:"_sendGamedockEvent",value:function(e){var t,n;null===(t=fR)||void 0===t||null===(n=t.tracking)||void 0===n||n.trackEvent(e,{pageId:this.options.gameId,pageType:"game"})}},{key:"_loadMiniJuegosGratisTracker",value:function(){var e=this;window.mpConfig={game:this.options.gameId,partner:"game-distribution"};var n=["https://ext.minijuegosgratis.com/external-host/main.js"];console.log("noMinijuegosSDK loading"),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,gw();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}.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:"_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 Ry,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};iR({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){}}BD()}.bind(this),"ima"),this.eventBus.subscribe("CONTENT_PAUSE_REQUESTED",function(){return t(this,e),this.onPauseGame("New advertisements requested and loaded","success")}.bind(this),"ima"),this.eventBus.subscribe("IMPRESSION",function(n){var r,i;t(this,e),this.msgrt.send("ad.impression"),ID(),null!==(r=this._gameData.diagnostic)&&void 0!==r&&null!==(i=r.gameDock)&&void 0!==i&&i.adViewEvent&&nS.track(fR,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=tw().config;return"https://".concat(t.gameAPI,"/game/v4/get/").concat(this.options.gameId.replace(/-/g,""),"/?domain=").concat(e,"&v=").concat(os.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,n=this._checkTokenGameUrl(),r=new Ry,i="html5.gamedistribution.com"!==C(document.referrer).host,a=n&&!$S.SDKExistsOnUpperFrame&&r.get("depth.value")>0&&i;if(a&&(null===(e=this._gameData)||void 0===e||null===(t=e.directTokenUse)||void 0===t?void 0:t.enabled)){var s,o,d=null===(s=this._gameData)||void 0===s||null===(o=s.directTokenUse)||void 0===o?void 0:o.behavior;"to-loader"===d?this._redirectToLoaderFrame():"to-blocked-page"===d&&this._redirectToBlocking(!0)}return{blocked:a}}},{key:"_redirectToBlocking",value:function(t){var n=this;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=lR(lR({},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;GD().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,r;!1===(null===(e=this._gameData.loader)||void 0===e?void 0:e.mobile)&&this._getisMobile()&&(this._gameData.loader.enabled=!1);var i,a=this._gameData,s=a.gdpr&&!0===a.gdpr.consent,o=a.loader,d=null===(t=a.promo)||void 0===t?void 0:t[null===(n=a.promo)||void 0===n||null===(r=n.template)||void 0===r?void 0:r.preroll];(a.preroll||(this.adRequestTimer=Date.now()),this.options.loader.enabled)?null!=d&&d.enabled?this._createPromoBeforeSplash(a,s):o.enabled&&!0!==(null===(i=o.splash)||void 0===i?void 0:i.skip)?this._createSplash(a,s):this.onResumeGame("Skipped splash.","success"):o.enabled||this._bridge.isTokenGameURL&&this._bridge.isExtHostedGameURL||(this.options.advertisementSettings.autoplay||s?null!=d&&d.enabled?this._createPromoBeforeSplash(a,s):!1!==o.enabled&&this._createSplash(a,s):null!=d&&d.enabled&&this._createPromo(a,s))}},{key:"_initializeVideoAd",value:(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 WD(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=os,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,hw();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(lR(lR({},this.options),{},{isConsentDomain:a,version:os.version}),i,this._parentDomain),n.next=6,bw();case 6:d=n.sent,c=d.enabled,o.on("playClick",function(){var n,s,d,l=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,l),console.log("gd-adflow locus-first-user-action error",e)}.bind(this)),a){var h=new Date;h.setDate(h.getDate()+90),document.cookie="ogdpr_tracking=1; expires=".concat(h.toUTCString(),"; path=/")}if(this._hideCMPButton(),jS("play"),c)window.gdsdk.showAd(A.Interstitial,{position:"preroll"}).catch(function(e){t(this,l),o.hide()}.bind(this));else{var p={position:"preroll"};(function(){t(this,l),hs.firstAdapterModeAdsense&&(console.log("promo-test, set first adapter to adssense 1"),p.adapter="adsense")}).bind(this),this.showAd(A.Interstitial,p).catch(function(e){t(this,l)}.bind(this))}null!==(s=this._gameData)&&void 0!==s&&null!==(d=s.evnts)&&void 0!==d&&d.enabled&&(mS({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,c=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this._createPrerollPromoTemplate(n);case 3:o=e.sent,(d=new o(lR(lR({},this.options),{},{isConsentDomain:i,version:os.version,template:null===(a=n.promo)||void 0===a||null===(s=a.template)||void 0===s?void 0:s.preroll}),n)).on("done",function(){t(this,c),d.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,c=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this._createPrerollPromoTemplate(n);case 3:o=e.sent,(d=new o(lR(lR({},this.options),{},{isConsentDomain:i,version:os.version,template:null===(a=n.promo)||void 0===a||null===(s=a.template)||void 0===s?void 0:s.preroll}),n)).on("done",function(){t(this,c),d.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,jS("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 VS(a),e.next=28,u.runAdFlow(d);case 28:a.adFlowRunning=!1,t(),a._post_message({topic:"adrequest.instream"}),e.next=38;break;case 33:e.prev=33,e.t0=e.catch(0),a.adFlowRunning=!1,a.onResumeGame(e.t0.message,"warning"),s(e.t0.message);case 38:case"end":return e.stop()}}),e,null,[[0,33]])})));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,o,d,c,u,l,h,p,f,m;switch(e){case"preroll":null!==(t=this._gameData)&&void 0!==t&&null!==(n=t.gft)&&void 0!==n&&n[e].enabled&&(null===(r=this._gameData)||void 0===r||null===(i=r.gft)||void 0===i||null===(a=i[e].durations[this._giftCount[e]])||void 0===a?void 0:a.after)===this.adInstance.adPrerollCount&&this.decideToGiveAGift(e);break;case"midroll":null!==(s=this._gameData)&&void 0!==s&&null!==(o=s.gft)&&void 0!==o&&o[e].enabled&&(null===(d=this._gameData)||void 0===d||null===(c=d.gft)||void 0===c||null===(u=c[e].durations[this._giftCount[e]])||void 0===u?void 0:u.after)===this.adInstance.adMidrollCount&&this.decideToGiveAGift(e);break;case"rewarded":null!==(l=this._gameData)&&void 0!==l&&null!==(h=l.gft)&&void 0!==h&&h[e].enabled&&(null===(p=this._gameData)||void 0===p||null===(f=p.gft)||void 0===f||null===(m=f[e].durations[this._giftCount[e]])||void 0===m?void 0:m.after)===this.adInstance.adRewardedCount&&this.decideToGiveAGift(e)}}},{key:"_setAdRequestTimer",value:function(){this.adRequestTimer=Date.now()}},{key:"clearSession",value:function(){this.adInstance.clearSession()}},{key:"_attachAfgFallback",value:function(e){var t=e.gameData,n=e.adRequest;if(!t.afg_disabled&&!n.params.hasOwnProperty("fallback_adsense"))switch(n.params.position){case"preroll":case"start":case"next":n.params.fallback_adsense=!0}}},{key:"_rejectAdIfGameBlocked",value:function(e){var t=e.gameData;if(t.bloc_gard&&!0===t.bloc_gard.enabled)throw new Error("Game or domain is blocked.")}},{key:"_rejectAdIfAdDisabled",value:function(e){var t=e.gameData,n=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,a,s,o=e.gameData,d=e.adRequest,c=null;d.adType===A.Interstitial&&null!==(t=o.diagnostic)&&void 0!==t&&null!==(n=t.useMidrollIndex)&&void 0!==n&&n.enabled&&this.adInstance.noPreroll?this.adInstance.adMidrollCount>(null===(r=o.diagnostic)||void 0===r||null===(i=r.useMidrollIndex)||void 0===i?void 0:i.indexes.length)-1||(c=6e4*(null===(a=o.diagnostic)||void 0===a||null===(s=a.useMidrollIndex)||void 0===s?void 0:s.indexes[this.adInstance.adMidrollCount])):c=o.midroll;if(d.adType===A.Interstitial&&void 0!==this.adRequestTimer&&Date.now()-this.adRequestTimer<c)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()||(mS({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()||(mS({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,t;return null===(e=this._gameData)||void 0===e||null===(t=e.extHosting)||void 0===t?void 0:t.enabled}},{key:"_whichFrame",value:function(){return(this._isMasterGameURL()||this._isExtHostedGameURL())&&!this._isTokenGameURL()?"loader-frame":"game-frame"}},{key:"_isMasterGameURL",value:function(){var e=/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Fa-f0-9]{32})(.*)$/i;return e.test(location.href)||!this._isTokenGameURL()&&e.test(document.referrer)}},{key:"_checkTokenGameUrl",value:function(){var e=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 YD(t).splash()}},{key:"_createPrerollPromoTemplate",value:(i=e(r.mark((function e(t){var n,i,a,s,o;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=null===(n=t.promo)||void 0===n?void 0:n[null===(i=t.promo)||void 0===i||null===(a=i.template)||void 0===a?void 0:a.preroll],o=new KD(s),e.abrupt("return",o.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=lR(lR({},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)fR.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 hR}},{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 AR(){return(AR=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,gw();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 gR=new M,vR=function(e){var n=this;!function(){AR.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&&(gR.off("sdk-event",s),n())}.bind(this);gR.on("sdk-event",s),m("showAd",{adType:e})}.bind(this))}.bind(this),a=function(){return t(this,n),r||(r=new mR(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{gR.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}},bR=function(e){var t=vR(e);return t.init(),t},_R=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}},yR="gd-sdk-frame-handshake-request",wR="gd-sdk-frame-handshake-response",kR=function(e){var n=this;return new Promise(function(e,r){var i=this;t(this,n);var a={type:yR},s=!1;window.addEventListener("message",(function(t){var n=t.data,r=t.origin,i=t.source,a=n.type;if(a===yR){var o={type:wR};i.postMessage(o,r)}else a===wR&&(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))},ER=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,Aw();case 2:return t=e.sent,e.next=6,kR();case 6:if(n=e.sent,$S.SDKExistsOnUpperFrame=!!n,t){e.next=10;break}return e.abrupt("return",!1);case 10:return i=_R(),a=i.isMasterGameURL,i.isTokenGameURL,s=a(),e.next=14,vw();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)}}(),xR=tt,DR=ue,SR=ts,RR=Yi,TR=DR(Hi.f),CR=DR([].push),IR=function(e){return function(t){for(var n,r=RR(t),i=SR(r),a=i.length,s=0,o=[];a>s;)n=i[s++],xR&&!TR(r,n)||CR(o,e?[n,r[n]]:r[n]);return o}},OR={entries:IR(!0),values:IR(!1)}.values;Xa({target:"Object",stat:!0},{values:function(e){return OR(e)}});var PR,BR={},LR=function(e){try{if(e.skipForward)return;if(BR.source){var t={type:"gd-sdk-on-event",event:e};BR.source.postMessage(t,BR.origin)}}catch(e){console.log("gd-sdk forwardEvent err",e)}},UR=function(){LR({name:"SDK_READY",status:"success",message:"Everything is ready."}),LR({name:"SDK_GAME_START",status:"success",message:"Advertisement(s) are done. Start / resume the game."}),LR({name:"CONTENT_RESUME_REQUESTED",status:"success",message:"Fired when content should be resumed. This usually happens when an ad finishes or collapses."})},MR=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(!BR.source&&"init"===c)return function(e){var t=e.source,n=e.origin;BR={source:t,origin:n}}({source:o,origin:s}),void UR();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&&hs.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)},FR=function(e){!function(e){var t=e.onEvent;e.onEvent=function(e){LR(e),t.apply(this,arguments)}}(e);var t=new mR(e);return MR(t),t},jR=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:[]},Yg(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,Zg(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}(),NR=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 Ry).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 Ry).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];us("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,hw();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 jR).runYMenu({gameId:c});case 2:case"end":return e.stop()}}),e)})));return function(){return t.apply(this,arguments)}}(),g=_R(),v=g.whichFrame,"game-frame"===v()&&(f||A());case 21:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),GR=function(e){try{var t=Jy(e);e.gameId||t.send("nogameid",{message:"".concat(pb.parentURL)})}catch(e){}},qR=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,NR();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)}}(),HR={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,GR(t),lw(t),e.next=5,ER();case 5:return n=e.sent,e.next=8,qR();case 8:return window.isForwarderFrame=n,i=n?bR(t):FR(t),_w(),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",FR(t));case 18:case"end":return e.stop()}}),e,null,[[0,14]])})));return function(e){return t.apply(this,arguments)}}()};function QR(){return(QR=e(r.mark((function e(t,n){var i;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,kw();case 2:if(!e.sent){e.next=7;break}e.t0=window.gdsdk,e.next=10;break;case 7:return e.next=9,KR(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 VR,zR,WR=!1;function KR(e){var n=this;return new Promise(function(r,i){var a=this;if(t(this,n),PR)return r(PR);if(WR)var s=setInterval(function(){t(this,a),PR&&(WR=!1,clearInterval(s),r(PR))}.bind(this),100);else WR=!0,HR.create(e).then(function(e){t(this,a),PR=e,e._sendSDKReady(),WR=!1,r(PR)}.bind(this))}.bind(this))}function YR(e){return KR(e),{invoke:function(t){return function(e,t){return QR.apply(this,arguments)}(e,t)}}}function JR(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);ZR({text:"sdk-wrapper-script-load"}),f(u[0],"gd-sdk-wrp",{alternates:u}).catch(function(e){t(this,c),ZR({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,ZR({text:"sdk-wrapper load success"}),t=window.GDSDKWRP.GDSDKWRP,a=new t,ZR({text:"sdk-wrapper before gdSdkWrp.init"}),e.next=7,a.init(n,i);case 7:zR=e.sent,ZR({text:"sdk-wrapper after gdSdkWrp.init"}),s(zR),e.next=16;break;case 12:e.prev=12,e.t0=e.catch(0),ZR({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 ZR(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(Q(Object.values(e)))}catch(e){}}function XR(e){if(e){var t=e.name,n=e.message,r=e.status;try{ZR({text:"samsung-wrp send-game-event",evt:e,hasOptions:!!VR}),VR&&VR.onEvent({name:t,message:n,status:r})}catch(t){ZR({text:"samsung-wrp DEVELOPER-ERROR",evt:e,err:t})}}}function $R(e){return eT.apply(this,arguments)}function eT(){return(eT=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 VR=t,lw(t),e.next=4,hw();case 4:if(s=e.sent,!zR){e.next=7;break}return e.abrupt("return",zR);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,iT("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,ZR({text:"sdk-wrapper-load-instant-play"}),e.next=18,nT();case 18:return ZR({text:"sdk-wrapper-load-instant-play-loaded"}),e.next=21,JR(l,{onEvent:XR,game:{gameId:c,title:u,version:d}});case 21:return zR=e.sent,e.abrupt("return",zR);case 23:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function tT(){return tT=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,iT("beforeGetDeveloperSettings"),i=n(),iT("afterGetDeveloperSettings"),e.prev=4,e.next=7,$R(i);case 7:a=e.sent,iT("after get SDK wrapper: ".concat(!!a)),a&&(iT("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),iT("Error on SDK wrapper init: ".concat(e.t0.message));case 16:case"end":return e.stop()}}),e,null,[[4,12]])}))),tT.apply(this,arguments)}function nT(){return rT.apply(this,arguments)}function rT(){return(rT=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 iT(e){window.sdkLog.push(e)}function aT(){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}()?iT("skipped normal SDK init!"):(!function(){CD();var n=YR(aT());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),hs.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),$g.showLeaderboard()}.bind(this),addScore:function(e){t(this,i),$g.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}(),iT("afterSDKInit")),function(e){tT.apply(this,arguments)}({_get_developer_sets:aT});
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 c,getTopDomain as d,getMobilePlatform as u,MessageRouter as l,extendDefaults as h,dankLog as p,getScript as f,Ls as m,AdType as g,Layers as A,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 Q from"@babel/runtime/helpers/toConsumableArray";var V="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 V&&V)||function(){return this}()||Function("return this")(),K={exports:{}},Y=W,J=Object.defineProperty,X=function(e,t){try{J(Y,e,{value:t,configurable:!0,writable:!0})}catch(n){Y[e]=t}return t},Z=X,$="__core-js_shared__",ee=W[$]||Z($,{}),te=ee;(K.exports=function(e,t){return te[e]||(te[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.30.1",mode:"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.30.1/LICENSE",source:"https://github.com/zloirock/core-js"});var 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,ce=oe.call,de=se&&oe.bind.bind(ce,ce),ue=se?de:function(e){return function(){return ce.apply(e,arguments)}},le=function(e){return null==e},he=le,pe=TypeError,fe=function(e){if(he(e))throw pe("Can't call method on "+e);return e},me=fe,ge=Object,Ae=function(e){return ge(me(e))},ve=Ae,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=!!Object.getOwnPropertySymbols&&!Le((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Be&&Be<41})),Me=Ue&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Fe=W,je=K.exports,Ne=_e,Ge=xe,qe=Ue,He=Me,Qe=Fe.Symbol,Ve=je("wks"),ze=He?Qe.for||Qe:Qe&&Qe.withoutSetter||Ge,We=function(e){return Ne(Ve,e)||(Ve[e]=qe&&Ne(Qe,e)?Qe[e]:ze("Symbol."+e)),Ve[e]},Ke={};Ke[We("toStringTag")]="z";var Ye="[object z]"===String(Ke),Je="object"==typeof document&&document.all,Xe={all:Je,IS_HTMLDDA:void 0===Je&&void 0!==Je},Ze=Xe.all,$e=Xe.IS_HTMLDDA?function(e){return"function"==typeof e||e===Ze}:function(e){return"function"==typeof e},et={},tt=!ie((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),nt=$e,rt=Xe.all,it=Xe.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:nt(e)||e===rt}:function(e){return"object"==typeof e?null!==e:nt(e)},at=it,st=W.document,ot=at(st)&&at(st.createElement),ct=function(e){return ot?st.createElement(e):{}},dt=ct,ut=!tt&&!ie((function(){return 7!=Object.defineProperty(dt("div"),"a",{get:function(){return 7}}).a})),lt=tt&&ie((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),ht=it,pt=String,ft=TypeError,mt=function(e){if(ht(e))return e;throw ft(pt(e)+" is not an object")},gt=ae,At=Function.prototype.call,vt=gt?At.bind(At):function(){return At.apply(At,arguments)},bt=W,_t=$e,yt=function(e,t){return arguments.length<2?(n=bt[e],_t(n)?n:void 0):bt[e]&&bt[e][t];var n},wt=ue({}.isPrototypeOf),kt=yt,Et=$e,xt=wt,Dt=Object,St=Me?function(e){return"symbol"==typeof e}:function(e){var t=kt("Symbol");return Et(t)&&xt(t.prototype,Dt(e))},Rt=String,Tt=function(e){try{return Rt(e)}catch(e){return"Object"}},Ct=$e,It=Tt,Ot=TypeError,Pt=function(e){if(Ct(e))return e;throw Ot(It(e)+" is not a function")},Bt=Pt,Lt=le,Ut=function(e,t){var n=e[t];return Lt(n)?void 0:Bt(n)},Mt=vt,Ft=$e,jt=it,Nt=TypeError,Gt=vt,qt=it,Ht=St,Qt=Ut,Vt=function(e,t){var n,r;if("string"===t&&Ft(n=e.toString)&&!jt(r=Mt(n,e)))return r;if(Ft(n=e.valueOf)&&!jt(r=Mt(n,e)))return r;if("string"!==t&&Ft(n=e.toString)&&!jt(r=Mt(n,e)))return r;throw Nt("Can't convert object to primitive value")},zt=TypeError,Wt=We("toPrimitive"),Kt=function(e,t){if(!qt(e)||Ht(e))return e;var n,r=Qt(e,Wt);if(r){if(void 0===t&&(t="default"),n=Gt(r,e,t),!qt(n)||Ht(n))return n;throw zt("Can't convert object to primitive value")}return void 0===t&&(t="number"),Vt(e,t)},Yt=St,Jt=function(e){var t=Kt(e,"string");return Yt(t)?t:t+""},Xt=tt,Zt=ut,$t=lt,en=mt,tn=Jt,nn=TypeError,rn=Object.defineProperty,an=Object.getOwnPropertyDescriptor,sn="enumerable",on="configurable",cn="writable";et.f=Xt?$t?function(e,t,n){if(en(e),t=tn(t),en(n),"function"==typeof e&&"prototype"===t&&"value"in n&&cn in n&&!n[cn]){var r=an(e,t);r&&r[cn]&&(e[t]=n.value,n={configurable:on in n?n[on]:r[on],enumerable:sn in n?n[sn]:r[sn],writable:!1})}return rn(e,t,n)}:rn:function(e,t,n){if(en(e),t=tn(t),en(n),Zt)try{return rn(e,t,n)}catch(e){}if("get"in n||"set"in n)throw nn("Accessors not supported");return"value"in n&&(e[t]=n.value),e};var dn={exports:{}},un=tt,ln=_e,hn=Function.prototype,pn=un&&Object.getOwnPropertyDescriptor,fn=ln(hn,"name"),mn={EXISTS:fn,PROPER:fn&&"something"===function(){}.name,CONFIGURABLE:fn&&(!un||un&&pn(hn,"name").configurable)},gn=$e,An=ee,vn=ue(Function.toString);gn(An.inspectSource)||(An.inspectSource=function(e){return vn(e)});var bn,_n,yn,wn=An.inspectSource,kn=$e,En=W.WeakMap,xn=kn(En)&&/native code/.test(String(En)),Dn=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},Sn=et,Rn=Dn,Tn=tt?function(e,t,n){return Sn.f(e,t,Rn(1,n))}:function(e,t,n){return e[t]=n,e},Cn=K.exports,In=xe,On=Cn("keys"),Pn=function(e){return On[e]||(On[e]=In(e))},Bn={},Ln=xn,Un=W,Mn=it,Fn=Tn,jn=_e,Nn=ee,Gn=Pn,qn=Bn,Hn="Object already initialized",Qn=Un.TypeError,Vn=Un.WeakMap;if(Ln||Nn.state){var zn=Nn.state||(Nn.state=new Vn);zn.get=zn.get,zn.has=zn.has,zn.set=zn.set,bn=function(e,t){if(zn.has(e))throw Qn(Hn);return t.facade=e,zn.set(e,t),t},_n=function(e){return zn.get(e)||{}},yn=function(e){return zn.has(e)}}else{var Wn=Gn("state");qn[Wn]=!0,bn=function(e,t){if(jn(e,Wn))throw Qn(Hn);return t.facade=e,Fn(e,Wn,t),t},_n=function(e){return jn(e,Wn)?e[Wn]:{}},yn=function(e){return jn(e,Wn)}}var Kn={set:bn,get:_n,has:yn,enforce:function(e){return yn(e)?_n(e):bn(e,{})},getterFor:function(e){return function(t){var n;if(!Mn(t)||(n=_n(t)).type!==e)throw Qn("Incompatible receiver, "+e+" required");return n}}},Yn=ue,Jn=ie,Xn=$e,Zn=_e,$n=tt,er=mn.CONFIGURABLE,tr=wn,nr=Kn.enforce,rr=Kn.get,ir=String,ar=Object.defineProperty,sr=Yn("".slice),or=Yn("".replace),cr=Yn([].join),dr=$n&&!Jn((function(){return 8!==ar((function(){}),"length",{value:8}).length})),ur=String(String).split("String"),lr=dn.exports=function(e,t,n){"Symbol("===sr(ir(t),0,7)&&(t="["+or(ir(t),/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!Zn(e,"name")||er&&e.name!==t)&&($n?ar(e,"name",{value:t,configurable:!0}):e.name=t),dr&&n&&Zn(n,"arity")&&e.length!==n.arity&&ar(e,"length",{value:n.arity});try{n&&Zn(n,"constructor")&&n.constructor?$n&&ar(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var r=nr(e);return Zn(r,"source")||(r.source=cr(ur,"string"==typeof t?t:"")),e};Function.prototype.toString=lr((function(){return Xn(this)&&rr(this).source||tr(this)}),"toString");var hr=$e,pr=et,fr=dn.exports,mr=X,gr=function(e,t,n,r){r||(r={});var i=r.enumerable,a=void 0!==r.name?r.name:t;if(hr(n)&&fr(n,a,r),r.global)i?e[t]=n:mr(t,n);else{try{r.unsafe?e[t]&&(i=!0):delete e[t]}catch(e){}i?e[t]=n:pr.f(e,t,{value:n,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return e},Ar=ue,vr=Ar({}.toString),br=Ar("".slice),_r=function(e){return br(vr(e),8,-1)},yr=Ye,wr=$e,kr=_r,Er=We("toStringTag"),xr=Object,Dr="Arguments"==kr(function(){return arguments}()),Sr=yr?kr: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=xr(e),Er))?n:Dr?kr(t):"Object"==(r=kr(t))&&wr(t.callee)?"Arguments":r},Rr=Sr,Tr=Ye?{}.toString:function(){return"[object "+Rr(this)+"]"};Ye||gr(Object.prototype,"toString",Tr,{unsafe:!0});var Cr={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},Ir=ct("span").classList,Or=Ir&&Ir.constructor&&Ir.constructor.prototype,Pr=Or===Object.prototype?void 0:Or,Br=_r,Lr=ue,Ur=function(e){if("Function"===Br(e))return Lr(e)},Mr=Pt,Fr=ae,jr=Ur(Ur.bind),Nr=function(e,t){return Mr(e),void 0===t?e:Fr?jr(e,t):function(){return e.apply(t,arguments)}},Gr=ie,qr=_r,Hr=Object,Qr=ue("".split),Vr=Gr((function(){return!Hr("z").propertyIsEnumerable(0)}))?function(e){return"String"==qr(e)?Qr(e,""):Hr(e)}:Hr,zr=Math.ceil,Wr=Math.floor,Kr=Math.trunc||function(e){var t=+e;return(t>0?Wr:zr)(t)},Yr=function(e){var t=+e;return t!=t||0===t?0:Kr(t)},Jr=Yr,Xr=Math.min,Zr=function(e){return e>0?Xr(Jr(e),9007199254740991):0},$r=Zr,ei=function(e){return $r(e.length)},ti=_r,ni=Array.isArray||function(e){return"Array"==ti(e)},ri=ue,ii=ie,ai=$e,si=Sr,oi=wn,ci=function(){},di=[],ui=yt("Reflect","construct"),li=/^\s*(?:class|function)\b/,hi=ri(li.exec),pi=!li.exec(ci),fi=function(e){if(!ai(e))return!1;try{return ui(ci,di,e),!0}catch(e){return!1}},mi=function(e){if(!ai(e))return!1;switch(si(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return pi||!!hi(li,oi(e))}catch(e){return!0}};mi.sham=!0;var gi=!ui||ii((function(){var e;return fi(fi.call)||!fi(Object)||!fi((function(){e=!0}))||e}))?mi:fi,Ai=ni,vi=gi,bi=it,_i=We("species"),yi=Array,wi=function(e){var t;return Ai(e)&&(t=e.constructor,(vi(t)&&(t===yi||Ai(t.prototype))||bi(t)&&null===(t=t[_i]))&&(t=void 0)),void 0===t?yi:t},ki=function(e,t){return new(wi(e))(0===t?0:t)},Ei=Nr,xi=Vr,Di=Ae,Si=ei,Ri=ki,Ti=ue([].push),Ci=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(c,d,u,l){for(var h,p,f=Di(c),m=xi(f),g=Ei(d,u),A=Si(m),v=0,b=l||Ri,_=t?b(c,A):n||s?b(c,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:Ti(_,h)}else switch(e){case 4:return!1;case 7:Ti(_,h)}return a?-1:r||i?i:_}},Ii={forEach:Ci(0),map:Ci(1),filter:Ci(2),some:Ci(3),every:Ci(4),find:Ci(5),findIndex:Ci(6),filterReject:Ci(7)},Oi=ie,Pi=function(e,t){var n=[][e];return!!n&&Oi((function(){n.call(null,t||function(){return 1},1)}))},Bi=Ii.forEach,Li=W,Ui=Cr,Mi=Pr,Fi=Pi("forEach")?[].forEach:function(e){return Bi(this,e,arguments.length>1?arguments[1]:void 0)},ji=Tn,Ni=function(e){if(e&&e.forEach!==Fi)try{ji(e,"forEach",Fi)}catch(t){e.forEach=Fi}};for(var Gi in Ui)Ui[Gi]&&Ni(Li[Gi]&&Li[Gi].prototype);Ni(Mi);var qi={},Hi={},Qi={}.propertyIsEnumerable,Vi=Object.getOwnPropertyDescriptor,zi=Vi&&!Qi.call({1:2},1);Hi.f=zi?function(e){var t=Vi(this,e);return!!t&&t.enumerable}:Qi;var Wi=Vr,Ki=fe,Yi=function(e){return Wi(Ki(e))},Ji=tt,Xi=vt,Zi=Hi,$i=Dn,ea=Yi,ta=Jt,na=_e,ra=ut,ia=Object.getOwnPropertyDescriptor;qi.f=Ji?ia:function(e,t){if(e=ea(e),t=ta(t),ra)try{return ia(e,t)}catch(e){}if(na(e,t))return $i(!Xi(Zi.f,e,t),e[t])};var aa={},sa=Yr,oa=Math.max,ca=Math.min,da=function(e,t){var n=sa(e);return n<0?oa(n+t,0):ca(n,t)},ua=Yi,la=da,ha=ei,pa=function(e){return function(t,n,r){var i,a=ua(t),s=ha(a),o=la(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}},fa={includes:pa(!0),indexOf:pa(!1)},ma=_e,ga=Yi,Aa=fa.indexOf,va=Bn,ba=ue([].push),_a=function(e,t){var n,r=ga(e),i=0,a=[];for(n in r)!ma(va,n)&&ma(r,n)&&ba(a,n);for(;t.length>i;)ma(r,n=t[i++])&&(~Aa(a,n)||ba(a,n));return a},ya=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],wa=_a,ka=ya.concat("length","prototype");aa.f=Object.getOwnPropertyNames||function(e){return wa(e,ka)};var Ea={};Ea.f=Object.getOwnPropertySymbols;var xa=yt,Da=aa,Sa=Ea,Ra=mt,Ta=ue([].concat),Ca=xa("Reflect","ownKeys")||function(e){var t=Da.f(Ra(e)),n=Sa.f;return n?Ta(t,n(e)):t},Ia=_e,Oa=Ca,Pa=qi,Ba=et,La=function(e,t,n){for(var r=Oa(t),i=Ba.f,a=Pa.f,s=0;s<r.length;s++){var o=r[s];Ia(e,o)||n&&Ia(n,o)||i(e,o,a(t,o))}},Ua=ie,Ma=$e,Fa=/#|\.prototype\./,ja=function(e,t){var n=Ga[Na(e)];return n==Ha||n!=qa&&(Ma(t)?Ua(t):!!t)},Na=ja.normalize=function(e){return String(e).replace(Fa,".").toLowerCase()},Ga=ja.data={},qa=ja.NATIVE="N",Ha=ja.POLYFILL="P",Qa=ja,Va=W,za=qi.f,Wa=Tn,Ka=gr,Ya=X,Ja=La,Xa=Qa,Za=function(e,t){var n,r,i,a,s,o=e.target,c=e.global,d=e.stat;if(n=c?Va:d?Va[o]||Ya(o,{}):(Va[o]||{}).prototype)for(r in t){if(a=t[r],i=e.dontCallGetSet?(s=za(n,r))&&s.value:n[r],!Xa(c?r:o+(d?".":"#")+r,e.forced)&&void 0!==i){if(typeof a==typeof i)continue;Ja(a,i)}(e.sham||i&&i.sham)&&Wa(a,"sham",!0),Ka(n,r,a,e)}},$a=_a,es=ya,ts=Object.keys||function(e){return $a(e,es)},ns=Ae,rs=ts;Za({target:"Object",stat:!0,forced:ie((function(){rs(1)}))},{keys:function(e){return rs(ns(e))}});var is=Array.isArray,as=Object.prototype.toString,ss=is||function(e){return!!e&&"[object Array]"==as.call(e)},os={name:"@bygd/gd-sdk-pes",version:"1.39.22",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"}},cs=function(e){var t=ds("object"===n(e)?e:i(e));return t&&t.version?os.version>=t.version?t:void 0:t},ds=function(e){var n=this;if(!ss(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}},us=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 hs={},ps=Sr,fs=String,ms=function(e){if("Symbol"===ps(e))throw TypeError("Cannot convert a Symbol value to a string");return fs(e)},gs={},As=tt,vs=lt,bs=et,_s=mt,ys=Yi,ws=ts;gs.f=As&&!vs?Object.defineProperties:function(e,t){_s(e);for(var n,r=ys(t),i=ws(t),a=i.length,s=0;a>s;)bs.f(e,n=i[s++],r[n]);return e};var ks,Es=yt("document","documentElement"),xs=mt,Ds=gs,Ss=ya,Rs=Bn,Ts=Es,Cs=ct,Is="prototype",Os="script",Ps=Pn("IE_PROTO"),Bs=function(){},Ls=function(e){return"<"+Os+">"+e+"</"+Os+">"},Us=function(e){e.write(Ls("")),e.close();var t=e.parentWindow.Object;return e=null,t},Ms=function(){try{ks=new ActiveXObject("htmlfile")}catch(e){}var e,t,n;Ms="undefined"!=typeof document?document.domain&&ks?Us(ks):(t=Cs("iframe"),n="java"+Os+":",t.style.display="none",Ts.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(Ls("document.F=Object")),e.close(),e.F):Us(ks);for(var r=Ss.length;r--;)delete Ms[Is][Ss[r]];return Ms()};Rs[Ps]=!0;var Fs=Object.create||function(e,t){var n;return null!==e?(Bs[Is]=xs(e),n=new Bs,Bs[Is]=null,n[Ps]=e):n=Ms(),void 0===t?n:Ds.f(n,t)},js={},Ns=Jt,Gs=et,Hs=Dn,Qs=function(e,t,n){var r=Ns(t);r in e?Gs.f(e,r,Hs(0,n)):e[r]=n},Vs=da,zs=ei,Ws=Qs,Ks=Array,Ys=Math.max,Js=function(e,t,n){for(var r=zs(e),i=Vs(t,r),a=Vs(void 0===n?r:n,r),s=Ks(Ys(a-i,0)),o=0;i<a;i++,o++)Ws(s,o,e[i]);return s.length=o,s},Xs=_r,Zs=Yi,$s=aa.f,eo=Js,to="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];js.f=function(e){return to&&"Window"==Xs(e)?function(e){try{return $s(e)}catch(e){return eo(to)}}(e):$s(Zs(e))};var no=dn.exports,ro=et,ao=function(e,t,n){return n.get&&no(n.get,t,{getter:!0}),n.set&&no(n.set,t,{setter:!0}),ro.f(e,t,n)},so={},oo=We;so.f=oo;var co=W,uo=_e,lo=so,ho=et.f,po=function(e){var t=co.Symbol||(co.Symbol={});uo(t,e)||ho(t,e,{value:lo.f(e)})},fo=vt,mo=yt,go=We,Ao=gr,vo=et.f,bo=_e,_o=We("toStringTag"),yo=function(e,t,n){e&&!n&&(e=e.prototype),e&&!bo(e,_o)&&vo(e,_o,{configurable:!0,value:t})},wo=Za,ko=W,Eo=vt,xo=ue,Do=tt,So=Ue,Ro=ie,To=_e,Co=wt,Io=mt,Oo=Yi,Po=Jt,Bo=ms,Lo=Dn,Uo=Fs,Mo=ts,Fo=aa,jo=js,No=Ea,Go=qi,qo=et,Ho=gs,Qo=Hi,Vo=gr,zo=ao,Wo=K.exports,Ko=Bn,Yo=xe,Jo=We,Xo=so,Zo=po,$o=function(){var e=mo("Symbol"),t=e&&e.prototype,n=t&&t.valueOf,r=go("toPrimitive");t&&!t[r]&&Ao(t,r,(function(e){return fo(n,this)}),{arity:1})},ec=yo,tc=Kn,nc=Ii.forEach,rc=Pn("hidden"),ic="Symbol",ac="prototype",sc=tc.set,oc=tc.getterFor(ic),cc=Object[ac],dc=ko.Symbol,uc=dc&&dc[ac],lc=ko.TypeError,hc=ko.QObject,pc=Go.f,fc=qo.f,mc=jo.f,gc=Qo.f,Ac=xo([].push),vc=Wo("symbols"),bc=Wo("op-symbols"),_c=Wo("wks"),yc=!hc||!hc[ac]||!hc[ac].findChild,wc=Do&&Ro((function(){return 7!=Uo(fc({},"a",{get:function(){return fc(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=pc(cc,t);r&&delete cc[t],fc(e,t,n),r&&e!==cc&&fc(cc,t,r)}:fc,kc=function(e,t){var n=vc[e]=Uo(uc);return sc(n,{type:ic,tag:e,description:t}),Do||(n.description=t),n},Ec=function(e,t,n){e===cc&&Ec(bc,t,n),Io(e);var r=Po(t);return Io(n),To(vc,r)?(n.enumerable?(To(e,rc)&&e[rc][r]&&(e[rc][r]=!1),n=Uo(n,{enumerable:Lo(0,!1)})):(To(e,rc)||fc(e,rc,Lo(1,{})),e[rc][r]=!0),wc(e,r,n)):fc(e,r,n)},xc=function(e,t){Io(e);var n=Oo(t),r=Mo(n).concat(Tc(n));return nc(r,(function(t){Do&&!Eo(Dc,n,t)||Ec(e,t,n[t])})),e},Dc=function(e){var t=Po(e),n=Eo(gc,this,t);return!(this===cc&&To(vc,t)&&!To(bc,t))&&(!(n||!To(this,t)||!To(vc,t)||To(this,rc)&&this[rc][t])||n)},Sc=function(e,t){var n=Oo(e),r=Po(t);if(n!==cc||!To(vc,r)||To(bc,r)){var i=pc(n,r);return!i||!To(vc,r)||To(n,rc)&&n[rc][r]||(i.enumerable=!0),i}},Rc=function(e){var t=mc(Oo(e)),n=[];return nc(t,(function(e){To(vc,e)||To(Ko,e)||Ac(n,e)})),n},Tc=function(e){var t=e===cc,n=mc(t?bc:Oo(e)),r=[];return nc(n,(function(e){!To(vc,e)||t&&!To(cc,e)||Ac(r,vc[e])})),r};So||(Vo(uc=(dc=function(){if(Co(uc,this))throw lc("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?Bo(arguments[0]):void 0,t=Yo(e),n=function(e){this===cc&&Eo(n,bc,e),To(this,rc)&&To(this[rc],t)&&(this[rc][t]=!1),wc(this,t,Lo(1,e))};return Do&&yc&&wc(cc,t,{configurable:!0,set:n}),kc(t,e)})[ac],"toString",(function(){return oc(this).tag})),Vo(dc,"withoutSetter",(function(e){return kc(Yo(e),e)})),Qo.f=Dc,qo.f=Ec,Ho.f=xc,Go.f=Sc,Fo.f=jo.f=Rc,No.f=Tc,Xo.f=function(e){return kc(Jo(e),e)},Do&&(zo(uc,"description",{configurable:!0,get:function(){return oc(this).description}}),Vo(cc,"propertyIsEnumerable",Dc,{unsafe:!0}))),wo({global:!0,constructor:!0,wrap:!0,forced:!So,sham:!So},{Symbol:dc}),nc(Mo(_c),(function(e){Zo(e)})),wo({target:ic,stat:!0,forced:!So},{useSetter:function(){yc=!0},useSimple:function(){yc=!1}}),wo({target:"Object",stat:!0,forced:!So,sham:!Do},{create:function(e,t){return void 0===t?Uo(e):xc(Uo(e),t)},defineProperty:Ec,defineProperties:xc,getOwnPropertyDescriptor:Sc}),wo({target:"Object",stat:!0,forced:!So},{getOwnPropertyNames:Rc}),$o(),ec(dc,ic),Ko[rc]=!0;var Cc=Ue&&!!Symbol.for&&!!Symbol.keyFor,Ic=Za,Oc=yt,Pc=_e,Bc=ms,Lc=K.exports,Uc=Cc,Mc=Lc("string-to-symbol-registry"),Fc=Lc("symbol-to-string-registry");Ic({target:"Symbol",stat:!0,forced:!Uc},{for:function(e){var t=Bc(e);if(Pc(Mc,t))return Mc[t];var n=Oc("Symbol")(t);return Mc[t]=n,Fc[n]=t,n}});var jc=Za,Nc=_e,Gc=St,qc=Tt,Hc=Cc,Qc=(0,K.exports)("symbol-to-string-registry");jc({target:"Symbol",stat:!0,forced:!Hc},{keyFor:function(e){if(!Gc(e))throw TypeError(qc(e)+" is not a symbol");if(Nc(Qc,e))return Qc[e]}});var Vc=ae,zc=Function.prototype,Wc=zc.apply,Kc=zc.call,Yc="object"==typeof Reflect&&Reflect.apply||(Vc?Kc.bind(Wc):function(){return Kc.apply(Wc,arguments)}),Jc=ue([].slice),Xc=ni,Zc=$e,$c=_r,ed=ms,td=ue([].push),nd=Za,rd=yt,id=Yc,ad=vt,sd=ue,od=ie,cd=$e,dd=St,ud=Jc,ld=function(e){if(Zc(e))return e;if(Xc(e)){for(var t=e.length,n=[],r=0;r<t;r++){var i=e[r];"string"==typeof i?td(n,i):"number"!=typeof i&&"Number"!=$c(i)&&"String"!=$c(i)||td(n,ed(i))}var a=n.length,s=!0;return function(e,t){if(s)return s=!1,t;if(Xc(this))return t;for(var r=0;r<a;r++)if(n[r]===e)return t}}},hd=Ue,pd=String,fd=rd("JSON","stringify"),md=sd(/./.exec),gd=sd("".charAt),Ad=sd("".charCodeAt),vd=sd("".replace),bd=sd(1..toString),_d=/[\uD800-\uDFFF]/g,yd=/^[\uD800-\uDBFF]$/,wd=/^[\uDC00-\uDFFF]$/,kd=!hd||od((function(){var e=rd("Symbol")();return"[null]"!=fd([e])||"{}"!=fd({a:e})||"{}"!=fd(Object(e))})),Ed=od((function(){return'"\\udf06\\ud834"'!==fd("\udf06\ud834")||'"\\udead"'!==fd("\udead")})),xd=function(e,t){var n=ud(arguments),r=ld(t);if(cd(r)||void 0!==e&&!dd(e))return n[1]=function(e,t){if(cd(r)&&(t=ad(r,this,pd(e),t)),!dd(t))return t},id(fd,null,n)},Dd=function(e,t,n){var r=gd(n,t-1),i=gd(n,t+1);return md(yd,e)&&!md(wd,i)||md(wd,e)&&!md(yd,r)?"\\u"+bd(Ad(e,0),16):e};fd&&nd({target:"JSON",stat:!0,arity:3,forced:kd||Ed},{stringify:function(e,t,n){var r=ud(arguments),i=id(kd?xd:fd,null,r);return Ed&&"string"==typeof i?vd(i,_d,Dd):i}});var Sd=Ea,Rd=Ae;Za({target:"Object",stat:!0,forced:!Ue||ie((function(){Sd.f(1)}))},{getOwnPropertySymbols:function(e){var t=Sd.f;return t?t(Rd(e)):[]}});var Td=ie,Cd=Pe,Id=We("species"),Od=function(e){return Cd>=51||!Td((function(){var t=[];return(t.constructor={})[Id]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},Pd=Ii.filter;Za({target:"Array",proto:!0,forced:!Od("filter")},{filter:function(e){return Pd(this,e,arguments.length>1?arguments[1]:void 0)}});var Bd=Za,Ld=ie,Ud=Yi,Md=qi.f,Fd=tt;Bd({target:"Object",stat:!0,forced:!Fd||Ld((function(){Md(1)})),sham:!Fd},{getOwnPropertyDescriptor:function(e,t){return Md(Ud(e),t)}});var jd=Ca,Nd=Yi,Gd=qi,qd=Qs;Za({target:"Object",stat:!0,sham:!tt},{getOwnPropertyDescriptors:function(e){for(var t,n,r=Nd(e),i=Gd.f,a=jd(r),s={},o=0;a.length>o;)void 0!==(n=i(r,t=a[o++]))&&qd(s,t,n);return s}});var Hd=Za,Qd=ni,Vd=gi,zd=it,Wd=da,Kd=ei,Yd=Yi,Jd=Qs,Xd=We,Zd=Jc,$d=Od("slice"),eu=Xd("species"),tu=Array,nu=Math.max;Hd({target:"Array",proto:!0,forced:!$d},{slice:function(e,t){var n,r,i,a=Yd(this),s=Kd(a),o=Wd(e,s),c=Wd(void 0===t?s:t,s);if(Qd(a)&&(n=a.constructor,(Vd(n)&&(n===tu||Qd(n.prototype))||zd(n)&&null===(n=n[eu]))&&(n=void 0),n===tu||void 0===n))return Zd(a,o,c);for(r=new(void 0===n?tu:n)(nu(c-o,0)),i=0;o<c;o++,i++)o in a&&Jd(r,i,a[o]);return r.length=i,r}});var ru=vt,iu=mt,au=Ut,su=function(e,t,n){var r,i;iu(e);try{if(!(r=au(e,"return"))){if("throw"===t)throw n;return n}r=ru(r,e)}catch(e){i=!0,r=e}if("throw"===t)throw n;if(i)throw r;return iu(r),n},ou=mt,cu=su,du={},uu=du,lu=We("iterator"),hu=Array.prototype,pu=function(e){return void 0!==e&&(uu.Array===e||hu[lu]===e)},fu=Sr,mu=Ut,gu=le,Au=du,vu=We("iterator"),bu=function(e){if(!gu(e))return mu(e,vu)||mu(e,"@@iterator")||Au[fu(e)]},_u=vt,yu=Pt,wu=mt,ku=Tt,Eu=bu,xu=TypeError,Du=function(e,t){var n=arguments.length<2?Eu(e):t;if(yu(n))return wu(_u(n,e));throw xu(ku(e)+" is not iterable")},Su=Nr,Ru=vt,Tu=Ae,Cu=function(e,t,n,r){try{return r?t(ou(n)[0],n[1]):t(n)}catch(t){cu(e,"throw",t)}},Iu=pu,Ou=gi,Pu=ei,Bu=Qs,Lu=Du,Uu=bu,Mu=Array,Fu=function(e){var t=Tu(e),n=Ou(this),r=arguments.length,i=r>1?arguments[1]:void 0,a=void 0!==i;a&&(i=Su(i,r>2?arguments[2]:void 0));var s,o,c,d,u,l,h=Uu(t),p=0;if(!h||this===Mu&&Iu(h))for(s=Pu(t),o=n?new this(s):Mu(s);s>p;p++)l=a?i(t[p],p):t[p],Bu(o,p,l);else for(u=(d=Lu(t,h)).next,o=n?new this:[];!(c=Ru(u,d)).done;p++)l=a?Cu(d,i,[c.value,p],!0):c.value,Bu(o,p,l);return o.length=p,o},ju=We("iterator"),Nu=!1;try{var Gu=0,qu={next:function(){return{done:!!Gu++}},return:function(){Nu=!0}};qu[ju]=function(){return this},Array.from(qu,(function(){throw 2}))}catch(e){}var Hu=function(e,t){if(!t&&!Nu)return!1;var n=!1;try{var r={};r[ju]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch(e){}return n},Qu=Fu;Za({target:"Array",stat:!0,forced:!Hu((function(e){Array.from(e)}))},{from:Qu});var Vu,zu,Wu,Ku=ue,Yu=Yr,Ju=ms,Xu=fe,Zu=Ku("".charAt),$u=Ku("".charCodeAt),el=Ku("".slice),tl=function(e){return function(t,n){var r,i,a=Ju(Xu(t)),s=Yu(n),o=a.length;return s<0||s>=o?e?"":void 0:(r=$u(a,s))<55296||r>56319||s+1===o||(i=$u(a,s+1))<56320||i>57343?e?Zu(a,s):r:e?el(a,s,s+2):i-56320+(r-55296<<10)+65536}},nl={codeAt:tl(!1),charAt:tl(!0)},rl=!ie((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),il=_e,al=$e,sl=Ae,ol=rl,cl=Pn("IE_PROTO"),dl=Object,ul=dl.prototype,ll=ol?dl.getPrototypeOf:function(e){var t=sl(e);if(il(t,cl))return t[cl];var n=t.constructor;return al(n)&&t instanceof n?n.prototype:t instanceof dl?ul:null},hl=ie,pl=$e,fl=it,ml=ll,gl=gr,Al=We("iterator"),vl=!1;[].keys&&("next"in(Wu=[].keys())?(zu=ml(ml(Wu)))!==Object.prototype&&(Vu=zu):vl=!0);var bl=!fl(Vu)||hl((function(){var e={};return Vu[Al].call(e)!==e}));bl&&(Vu={}),pl(Vu[Al])||gl(Vu,Al,(function(){return this}));var _l={IteratorPrototype:Vu,BUGGY_SAFARI_ITERATORS:vl},yl=_l.IteratorPrototype,wl=Fs,kl=Dn,El=yo,xl=du,Dl=function(){return this},Sl=function(e,t,n,r){var i=t+" Iterator";return e.prototype=wl(yl,{next:kl(+!r,n)}),El(e,i,!1),xl[i]=Dl,e},Rl=ue,Tl=Pt,Cl=$e,Il=String,Ol=TypeError,Pl=function(e,t,n){try{return Rl(Tl(Object.getOwnPropertyDescriptor(e,t)[n]))}catch(e){}},Bl=mt,Ll=function(e){if("object"==typeof e||Cl(e))return e;throw Ol("Can't set "+Il(e)+" as a prototype")},Ul=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Pl(Object.prototype,"__proto__","set"))(n,[]),t=n instanceof Array}catch(e){}return function(n,r){return Bl(n),Ll(r),t?e(n,r):n.__proto__=r,n}}():void 0),Ml=Za,Fl=vt,jl=$e,Nl=Sl,Gl=ll,ql=Ul,Hl=yo,Ql=Tn,Vl=gr,zl=du,Wl=mn.PROPER,Kl=mn.CONFIGURABLE,Yl=_l.IteratorPrototype,Jl=_l.BUGGY_SAFARI_ITERATORS,Xl=We("iterator"),Zl="keys",$l="values",eh="entries",th=function(){return this},nh=function(e,t,n,r,i,a,s){Nl(n,t,r);var o,c,d,u=function(e){if(e===i&&m)return m;if(!Jl&&e in p)return p[e];switch(e){case Zl:case $l:case eh:return function(){return new n(this,e)}}return function(){return new n(this)}},l=t+" Iterator",h=!1,p=e.prototype,f=p[Xl]||p["@@iterator"]||i&&p[i],m=!Jl&&f||u(i),g="Array"==t&&p.entries||f;if(g&&(o=Gl(g.call(new e)))!==Object.prototype&&o.next&&(Gl(o)!==Yl&&(ql?ql(o,Yl):jl(o[Xl])||Vl(o,Xl,th)),Hl(o,l,!0)),Wl&&i==$l&&f&&f.name!==$l&&(Kl?Ql(p,"name",$l):(h=!0,m=function(){return Fl(f,this)})),i)if(c={values:u($l),keys:a?m:u(Zl),entries:u(eh)},s)for(d in c)(Jl||h||!(d in p))&&Vl(p,d,c[d]);else Ml({target:t,proto:!0,forced:Jl||h},c);return p[Xl]!==m&&Vl(p,Xl,m,{name:i}),zl[t]=m,c},rh=function(e,t){return{value:e,done:t}},ih=nl.charAt,ah=ms,sh=Kn,oh=nh,ch=rh,dh="String Iterator",uh=sh.set,lh=sh.getterFor(dh);oh(String,"String",(function(e){uh(this,{type:dh,string:ah(e),index:0})}),(function(){var e,t=lh(this),n=t.string,r=t.index;return r>=n.length?ch(void 0,!0):(e=ih(n,r),t.index+=e.length,ch(e,!1))}));var hh=mt,ph=function(){var e=hh(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},fh=ie,mh=W.RegExp,gh=fh((function(){var e=mh("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),Ah=gh||fh((function(){return!mh("a","y").sticky})),vh={BROKEN_CARET:gh||fh((function(){var e=mh("^r","gy");return e.lastIndex=2,null!=e.exec("str")})),MISSED_STICKY:Ah,UNSUPPORTED_Y:gh},bh=ie,_h=W.RegExp,yh=bh((function(){var e=_h(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)})),wh=ie,kh=W.RegExp,Eh=wh((function(){var e=kh("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),xh=vt,Dh=ue,Sh=ms,Rh=ph,Th=vh,Ch=K.exports,Ih=Fs,Oh=Kn.get,Ph=yh,Bh=Eh,Lh=Ch("native-string-replace",String.prototype.replace),Uh=RegExp.prototype.exec,Mh=Uh,Fh=Dh("".charAt),jh=Dh("".indexOf),Nh=Dh("".replace),Gh=Dh("".slice),qh=function(){var e=/a/,t=/b*/g;return xh(Uh,e,"a"),xh(Uh,t,"a"),0!==e.lastIndex||0!==t.lastIndex}(),Hh=Th.BROKEN_CARET,Qh=void 0!==/()??/.exec("")[1];(qh||Qh||Hh||Ph||Bh)&&(Mh=function(e){var t,n,r,i,a,s,o,c=this,d=Oh(c),u=Sh(e),l=d.raw;if(l)return l.lastIndex=c.lastIndex,t=xh(Mh,l,u),c.lastIndex=l.lastIndex,t;var h=d.groups,p=Hh&&c.sticky,f=xh(Rh,c),m=c.source,g=0,A=u;if(p&&(f=Nh(f,"y",""),-1===jh(f,"g")&&(f+="g"),A=Gh(u,c.lastIndex),c.lastIndex>0&&(!c.multiline||c.multiline&&"\n"!==Fh(u,c.lastIndex-1))&&(m="(?: "+m+")",A=" "+A,g++),n=new RegExp("^(?:"+m+")",f)),Qh&&(n=new RegExp("^"+m+"$(?!\\s)",f)),qh&&(r=c.lastIndex),i=xh(Uh,p?n:c,A),p?i?(i.input=Gh(i.input,g),i[0]=Gh(i[0],g),i.index=c.lastIndex,c.lastIndex+=i[0].length):c.lastIndex=0:qh&&i&&(c.lastIndex=c.global?i.index+i[0].length:r),Qh&&i&&i.length>1&&xh(Lh,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=Ih(null),a=0;a<h.length;a++)s[(o=h[a])[0]]=i[o[1]];return i});var Vh=Mh;Za({target:"RegExp",proto:!0,forced:/./.exec!==Vh},{exec:Vh});var zh=Za,Wh=tt,Kh=ue,Yh=_e,Jh=$e,Xh=wt,Zh=ms,$h=ao,ep=La,tp=W.Symbol,np=tp&&tp.prototype;if(Wh&&Jh(tp)&&(!("description"in np)||void 0!==tp().description)){var rp={},ip=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:Zh(arguments[0]),t=Xh(np,this)?new tp(e):void 0===e?tp():tp(e);return""===e&&(rp[t]=!0),t};ep(ip,tp),ip.prototype=np,np.constructor=ip;var ap="Symbol(test)"==String(tp("test")),sp=Kh(np.valueOf),op=Kh(np.toString),cp=/^Symbol\((.*)\)[^)]+$/,dp=Kh("".replace),up=Kh("".slice);$h(np,"description",{configurable:!0,get:function(){var e=sp(this);if(Yh(rp,e))return"";var t=op(e),n=ap?up(t,7,-1):dp(t,cp,"$1");return""===n?void 0:n}}),zh({global:!0,constructor:!0,forced:!0},{Symbol:ip})}po("iterator");var lp=We,hp=Fs,pp=et.f,fp=lp("unscopables"),mp=Array.prototype;null==mp[fp]&&pp(mp,fp,{configurable:!0,value:hp(null)});var gp=function(e){mp[fp][e]=!0},Ap=Yi,vp=gp,bp=du,_p=Kn,yp=et.f,wp=nh,kp=rh,Ep=tt,xp="Array Iterator",Dp=_p.set,Sp=_p.getterFor(xp),Rp=wp(Array,"Array",(function(e,t){Dp(this,{type:xp,target:Ap(e),index:0,kind:t})}),(function(){var e=Sp(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,kp(void 0,!0)):kp("keys"==n?r:"values"==n?t[r]:[r,t[r]],!1)}),"values"),Tp=bp.Arguments=bp.Array;if(vp("keys"),vp("values"),vp("entries"),Ep&&"values"!==Tp.name)try{yp(Tp,"name",{value:"values"})}catch(e){}var Cp=W,Ip=Cr,Op=Pr,Pp=Rp,Bp=Tn,Lp=We,Up=Lp("iterator"),Mp=Lp("toStringTag"),Fp=Pp.values,jp=function(e,t){if(e){if(e[Up]!==Fp)try{Bp(e,Up,Fp)}catch(t){e[Up]=Fp}if(e[Mp]||Bp(e,Mp,t),Ip[t])for(var n in Pp)if(e[n]!==Pp[n])try{Bp(e,n,Pp[n])}catch(t){e[n]=Pp[n]}}};for(var Np in Ip)jp(Cp[Np]&&Cp[Np].prototype,Np);jp(Op,"DOMTokenList");var Gp,qp,Hp,Qp,Vp="undefined"!=typeof process&&"process"==_r(process),zp=yt,Wp=ao,Kp=tt,Yp=We("species"),Jp=function(e){var t=zp(e);Kp&&t&&!t[Yp]&&Wp(t,Yp,{configurable:!0,get:function(){return this}})},Xp=wt,Zp=TypeError,$p=function(e,t){if(Xp(t,e))return e;throw Zp("Incorrect invocation")},ef=gi,tf=Tt,nf=TypeError,rf=mt,af=function(e){if(ef(e))return e;throw nf(tf(e)+" is not a constructor")},sf=le,of=We("species"),cf=function(e,t){var n,r=rf(e).constructor;return void 0===r||sf(n=rf(r)[of])?t:af(n)},df=TypeError,uf=function(e,t){if(e<t)throw df("Not enough arguments");return e},lf=/(?:ipad|iphone|ipod).*applewebkit/i.test(De),hf=W,pf=Yc,ff=Nr,mf=$e,gf=_e,Af=ie,vf=Es,bf=Jc,_f=ct,yf=uf,wf=lf,kf=Vp,Ef=hf.setImmediate,xf=hf.clearImmediate,Df=hf.process,Sf=hf.Dispatch,Rf=hf.Function,Tf=hf.MessageChannel,Cf=hf.String,If=0,Of={},Pf="onreadystatechange";Af((function(){Gp=hf.location}));var Bf=function(e){if(gf(Of,e)){var t=Of[e];delete Of[e],t()}},Lf=function(e){return function(){Bf(e)}},Uf=function(e){Bf(e.data)},Mf=function(e){hf.postMessage(Cf(e),Gp.protocol+"//"+Gp.host)};Ef&&xf||(Ef=function(e){yf(arguments.length,1);var t=mf(e)?e:Rf(e),n=bf(arguments,1);return Of[++If]=function(){pf(t,void 0,n)},qp(If),If},xf=function(e){delete Of[e]},kf?qp=function(e){Df.nextTick(Lf(e))}:Sf&&Sf.now?qp=function(e){Sf.now(Lf(e))}:Tf&&!wf?(Qp=(Hp=new Tf).port2,Hp.port1.onmessage=Uf,qp=ff(Qp.postMessage,Qp)):hf.addEventListener&&mf(hf.postMessage)&&!hf.importScripts&&Gp&&"file:"!==Gp.protocol&&!Af(Mf)?(qp=Mf,hf.addEventListener("message",Uf,!1)):qp=Pf in _f("script")?function(e){vf.appendChild(_f("script"))[Pf]=function(){vf.removeChild(this),Bf(e)}}:function(e){setTimeout(Lf(e),0)});var Ff={set:Ef,clear:xf},jf=function(){this.head=null,this.tail=null};jf.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 Nf,Gf,qf,Hf,Qf,Vf=jf,zf=/ipad|iphone|ipod/i.test(De)&&"undefined"!=typeof Pebble,Wf=/web0s(?!.*chrome)/i.test(De),Kf=W,Yf=Nr,Jf=qi.f,Xf=Ff.set,Zf=Vf,$f=lf,em=zf,tm=Wf,nm=Vp,rm=Kf.MutationObserver||Kf.WebKitMutationObserver,im=Kf.document,am=Kf.process,sm=Kf.Promise,om=Jf(Kf,"queueMicrotask"),cm=om&&om.value;if(!cm){var dm=new Zf,um=function(){var e,t;for(nm&&(e=am.domain)&&e.exit();t=dm.get();)try{t()}catch(e){throw dm.head&&Nf(),e}e&&e.enter()};$f||nm||tm||!rm||!im?!em&&sm&&sm.resolve?((Hf=sm.resolve(void 0)).constructor=sm,Qf=Yf(Hf.then,Hf),Nf=function(){Qf(um)}):nm?Nf=function(){am.nextTick(um)}:(Xf=Yf(Xf,Kf),Nf=function(){Xf(um)}):(Gf=!0,qf=im.createTextNode(""),new rm(um).observe(qf,{characterData:!0}),Nf=function(){qf.data=Gf=!Gf}),cm=function(e){dm.head||Nf(),dm.add(e)}}var lm=cm,hm=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},pm=W.Promise,fm="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,mm=!fm&&!Vp&&"object"==typeof window&&"object"==typeof document,gm=W,Am=pm,vm=$e,bm=Qa,_m=wn,ym=We,wm=mm,km=fm,Em=Pe;Am&&Am.prototype;var xm=ym("species"),Dm=!1,Sm=vm(gm.PromiseRejectionEvent),Rm=bm("Promise",(function(){var e=_m(Am),t=e!==String(Am);if(!t&&66===Em)return!0;if(!Em||Em<51||!/native code/.test(e)){var n=new Am((function(e){e(1)})),r=function(e){e((function(){}),(function(){}))};if((n.constructor={})[xm]=r,!(Dm=n.then((function(){}))instanceof r))return!0}return!t&&(wm||km)&&!Sm})),Tm={CONSTRUCTOR:Rm,REJECTION_EVENT:Sm,SUBCLASSING:Dm},Cm={},Im=Pt,Om=TypeError,Pm=function(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw Om("Bad Promise constructor");t=e,n=r})),this.resolve=Im(t),this.reject=Im(n)};Cm.f=function(e){return new Pm(e)};var Bm,Lm,Um,Mm=Za,Fm=Vp,jm=W,Nm=vt,Gm=gr,qm=Ul,Hm=yo,Qm=Jp,Vm=Pt,zm=$e,Wm=it,Km=$p,Ym=cf,Jm=Ff.set,Xm=lm,Zm=function(e,t){try{1==arguments.length?console.error(e):console.error(e,t)}catch(e){}},$m=hm,eg=Vf,tg=Kn,ng=pm,rg=Cm,ig="Promise",ag=Tm.CONSTRUCTOR,sg=Tm.REJECTION_EVENT,og=Tm.SUBCLASSING,cg=tg.getterFor(ig),dg=tg.set,ug=ng&&ng.prototype,lg=ng,hg=ug,pg=jm.TypeError,fg=jm.document,mg=jm.process,gg=rg.f,Ag=gg,vg=!!(fg&&fg.createEvent&&jm.dispatchEvent),bg="unhandledrejection",_g=function(e){var t;return!(!Wm(e)||!zm(t=e.then))&&t},yg=function(e,t){var n,r,i,a=t.value,s=1==t.state,o=s?e.ok:e.fail,c=e.resolve,d=e.reject,u=e.domain;try{o?(s||(2===t.rejection&&Dg(t),t.rejection=1),!0===o?n=a:(u&&u.enter(),n=o(a),u&&(u.exit(),i=!0)),n===e.promise?d(pg("Promise-chain cycle")):(r=_g(n))?Nm(r,n,c,d):c(n)):d(a)}catch(e){u&&!i&&u.exit(),d(e)}},wg=function(e,t){e.notified||(e.notified=!0,Xm((function(){for(var n,r=e.reactions;n=r.get();)yg(n,e);e.notified=!1,t&&!e.rejection&&Eg(e)})))},kg=function(e,t,n){var r,i;vg?((r=fg.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),jm.dispatchEvent(r)):r={promise:t,reason:n},!sg&&(i=jm["on"+e])?i(r):e===bg&&Zm("Unhandled promise rejection",n)},Eg=function(e){Nm(Jm,jm,(function(){var t,n=e.facade,r=e.value;if(xg(e)&&(t=$m((function(){Fm?mg.emit("unhandledRejection",r,n):kg(bg,n,r)})),e.rejection=Fm||xg(e)?2:1,t.error))throw t.value}))},xg=function(e){return 1!==e.rejection&&!e.parent},Dg=function(e){Nm(Jm,jm,(function(){var t=e.facade;Fm?mg.emit("rejectionHandled",t):kg("rejectionhandled",t,e.value)}))},Sg=function(e,t,n){return function(r){e(t,r,n)}},Rg=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,wg(e,!0))},Tg=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw pg("Promise can't be resolved itself");var r=_g(t);r?Xm((function(){var n={done:!1};try{Nm(r,t,Sg(Tg,n,e),Sg(Rg,n,e))}catch(t){Rg(n,t,e)}})):(e.value=t,e.state=1,wg(e,!1))}catch(t){Rg({done:!1},t,e)}}};if(ag&&(hg=(lg=function(e){Km(this,hg),Vm(e),Nm(Bm,this);var t=cg(this);try{e(Sg(Tg,t),Sg(Rg,t))}catch(e){Rg(t,e)}}).prototype,(Bm=function(e){dg(this,{type:ig,done:!1,notified:!1,parent:!1,reactions:new eg,rejection:!1,state:0,value:void 0})}).prototype=Gm(hg,"then",(function(e,t){var n=cg(this),r=gg(Ym(this,lg));return n.parent=!0,r.ok=!zm(e)||e,r.fail=zm(t)&&t,r.domain=Fm?mg.domain:void 0,0==n.state?n.reactions.add(r):Xm((function(){yg(r,n)})),r.promise})),Lm=function(){var e=new Bm,t=cg(e);this.promise=e,this.resolve=Sg(Tg,t),this.reject=Sg(Rg,t)},rg.f=gg=function(e){return e===lg||undefined===e?new Lm(e):Ag(e)},zm(ng)&&ug!==Object.prototype)){Um=ug.then,og||Gm(ug,"then",(function(e,t){var n=this;return new lg((function(e,t){Nm(Um,n,e,t)})).then(e,t)}),{unsafe:!0});try{delete ug.constructor}catch(e){}qm&&qm(ug,hg)}Mm({global:!0,constructor:!0,wrap:!0,forced:ag},{Promise:lg}),Hm(lg,ig,!1),Qm(ig);var Cg=Nr,Ig=vt,Og=mt,Pg=Tt,Bg=pu,Lg=ei,Ug=wt,Mg=Du,Fg=bu,jg=su,Ng=TypeError,Gg=function(e,t){this.stopped=e,this.result=t},qg=Gg.prototype,Hg=function(e,t,n){var r,i,a,s,o,c,d,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),g=function(e){return r&&jg(r,"normal",e),new Gg(!0,e)},A=function(e){return l?(Og(e),f?m(e[0],e[1],g):m(e[0],e[1])):f?m(e,g):m(e)};if(h)r=e.iterator;else if(p)r=e;else{if(!(i=Fg(e)))throw Ng(Pg(e)+" is not iterable");if(Bg(i)){for(a=0,s=Lg(e);s>a;a++)if((o=A(e[a]))&&Ug(qg,o))return o;return new Gg(!1)}r=Mg(e,i)}for(c=h?e.next:r.next;!(d=Ig(c,r)).done;){try{o=A(d.value)}catch(e){jg(r,"throw",e)}if("object"==typeof o&&o&&Ug(qg,o))return o}return new Gg(!1)},Qg=pm,Vg=Tm.CONSTRUCTOR||!Hu((function(e){Qg.all(e).then(void 0,(function(){}))})),zg=vt,Wg=Pt,Kg=Cm,Yg=hm,Jg=Hg;Za({target:"Promise",stat:!0,forced:Vg},{all:function(e){var t=this,n=Kg.f(t),r=n.resolve,i=n.reject,a=Yg((function(){var n=Wg(t.resolve),a=[],s=0,o=1;Jg(e,(function(e){var c=s++,d=!1;o++,zg(n,t,e).then((function(e){d||(d=!0,a[c]=e,--o||r(a))}),i)})),--o||r(a)}));return a.error&&i(a.value),n.promise}});var Xg=Za,Zg=Tm.CONSTRUCTOR,$g=pm,eA=yt,tA=$e,nA=gr,rA=$g&&$g.prototype;if(Xg({target:"Promise",proto:!0,forced:Zg,real:!0},{catch:function(e){return this.then(void 0,e)}}),tA($g)){var iA=eA("Promise").prototype.catch;rA.catch!==iA&&nA(rA,"catch",iA,{unsafe:!0})}var aA=vt,sA=Pt,oA=Cm,cA=hm,dA=Hg;Za({target:"Promise",stat:!0,forced:Vg},{race:function(e){var t=this,n=oA.f(t),r=n.reject,i=cA((function(){var i=sA(t.resolve);dA(e,(function(e){aA(i,t,e).then(n.resolve,r)}))}));return i.error&&r(i.value),n.promise}});var uA=vt,lA=Cm;Za({target:"Promise",stat:!0,forced:Tm.CONSTRUCTOR},{reject:function(e){var t=lA.f(this);return uA(t.reject,void 0,e),t.promise}});var hA=mt,pA=it,fA=Cm,mA=function(e,t){if(hA(e),pA(t)&&t.constructor===e)return t;var n=fA.f(e);return(0,n.resolve)(t),n.promise},gA=Za,AA=Tm.CONSTRUCTOR,vA=mA;yt("Promise"),gA({target:"Promise",stat:!0,forced:AA},{resolve:function(e){return vA(this,e)}});var bA=TypeError,_A=Za,yA=ie,wA=ni,kA=it,EA=Ae,xA=ei,DA=function(e){if(e>9007199254740991)throw bA("Maximum allowed index exceeded");return e},SA=Qs,RA=ki,TA=Od,CA=Pe,IA=We("isConcatSpreadable"),OA=CA>=51||!yA((function(){var e=[];return e[IA]=!1,e.concat()[0]!==e})),PA=function(e){if(!kA(e))return!1;var t=e[IA];return void 0!==t?!!t:wA(e)};_A({target:"Array",proto:!0,arity:1,forced:!OA||!TA("concat")},{concat:function(e){var t,n,r,i,a,s=EA(this),o=RA(s,0),c=0;for(t=-1,r=arguments.length;t<r;t++)if(PA(a=-1===t?s:arguments[t]))for(i=xA(a),DA(c+i),n=0;n<i;n++,c++)n in a&&SA(o,c,a[n]);else DA(c+1),SA(o,c++,a);return o.length=c,o}});var BA=tt,LA=mn.EXISTS,UA=ue,MA=ao,FA=Function.prototype,jA=UA(FA.toString),NA=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,GA=UA(NA.exec);function qA(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 HA(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 HA(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 HA(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 QA(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 VA(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?QA(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):QA(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}BA&&!LA&&MA(FA,"name",{configurable:!0,get:function(){try{return GA(NA,jA(this))[1]}catch(e){return""}}});var zA,WA={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"}},KA={},YA=function(e,t){KA[e]=VA(VA({},t),{},{isLoading:!1})},JA=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))},XA=function(){var t=e(r.mark((function e(t){var n,i,a,s,o,c,d,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=KA[t]).isLoading){e.next=6;break}return e.abrupt("return");case 6:i.isLoading=!0,a=qA(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,c=WA[o].name,!window[c]){e.next=16;break}return e.abrupt("continue",24);case 16:return e.next=18,JA({id:o,src:WA[o].src});case 18:e.next=24;break;case 20:e.prev=20,e.t0=e.catch(12),d=o.id,u=o.src,console.log("Could not load external script ".concat(d," ").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,JA({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)}}(),ZA=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,XA("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"]},YA(this.moduleName,this.moduleConfig)})),$A=new ZA,ev=it,tv=_r,nv=We("match"),rv=function(e){var t;return ev(e)&&(void 0!==(t=e[nv])?!!t:"RegExp"==tv(e))},iv=rv,av=TypeError,sv=function(e){if(iv(e))throw av("The method doesn't accept regular expressions");return e},ov=We("match"),cv=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[ov]=!1,"/./"[e](t)}catch(e){}}return!1},dv=Za,uv=Ur,lv=qi.f,hv=Zr,pv=ms,fv=sv,mv=fe,gv=cv,Av=uv("".startsWith),vv=uv("".slice),bv=Math.min,_v=gv("startsWith");dv({target:"String",proto:!0,forced:!!(_v||(zA=lv(String.prototype,"startsWith"),!zA||zA.writable))&&!_v},{startsWith:function(e){var t=pv(mv(this));fv(e);var n=hv(bv(arguments.length>1?arguments[1]:void 0,t.length)),r=pv(e);return Av?Av(t,r,n):vv(t,n,n+r.length)===r}});var yv=vt,wv=_e,kv=wt,Ev=ph,xv=RegExp.prototype,Dv=function(e){var t=e.flags;return void 0!==t||"flags"in xv||wv(e,"flags")||!kv(xv,e)?t:yv(Ev,e)},Sv=mn.PROPER,Rv=gr,Tv=mt,Cv=ms,Iv=ie,Ov=Dv,Pv="toString",Bv=RegExp.prototype[Pv],Lv=Iv((function(){return"/a/b"!=Bv.call({source:"a",flags:"b"})})),Uv=Sv&&Bv.name!=Pv;(Lv||Uv)&&Rv(RegExp.prototype,Pv,(function(){var e=Tv(this);return"/"+Cv(e.source)+"/"+Cv(Ov(e))}),{unsafe:!0});var Mv=Ur,Fv=gr,jv=Vh,Nv=ie,Gv=We,qv=Tn,Hv=Gv("species"),Qv=RegExp.prototype,Vv=function(e,t,n,r){var i=Gv(e),a=!Nv((function(){var t={};return t[i]=function(){return 7},7!=""[e](t)})),s=a&&!Nv((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[Hv]=function(){return n},n.flags="",n[i]=/./[i]),n.exec=function(){return t=!0,null},n[i](""),!t}));if(!a||!s||n){var o=Mv(/./[i]),c=t(i,""[e],(function(e,t,n,r,i){var s=Mv(e),c=t.exec;return c===jv||c===Qv.exec?a&&!i?{done:!0,value:o(t,n,r)}:{done:!0,value:s(n,t,r)}:{done:!1}}));Fv(String.prototype,e,c[0]),Fv(Qv,i,c[1])}r&&qv(Qv[i],"sham",!0)},zv=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t},Wv=vt,Kv=mt,Yv=$e,Jv=_r,Xv=Vh,Zv=TypeError,$v=function(e,t){var n=e.exec;if(Yv(n)){var r=Wv(n,e,t);return null!==r&&Kv(r),r}if("RegExp"===Jv(e))return Wv(Xv,e,t);throw Zv("RegExp#exec called on incompatible receiver")},eb=vt,tb=mt,nb=le,rb=fe,ib=zv,ab=ms,sb=Ut,ob=$v;function cb(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 db(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?cb(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cb(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}Vv("search",(function(e,t,n){return[function(t){var n=rb(this),r=nb(t)?void 0:sb(t,e);return r?eb(r,t,n):new RegExp(t)[e](ab(n))},function(e){var r=tb(this),i=ab(e),a=n(t,r,i);if(a.done)return a.value;var s=r.lastIndex;ib(s,0)||(r.lastIndex=0);var o=ob(r,i);return ib(r.lastIndex,s)||(r.lastIndex=s),null===o?-1:o.index}]}));var ub,lb,hb=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()),c=decodeURIComponent((e||n)&&r.parentDomain?r.parentDomain:s()),u=decodeURIComponent((e||n)&&r.topDomain?r.topDomain:n&&0===o()?c:d()),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,g=(e||n)&&r.loaderEnabled,A=(e||n)&&r.loaderEnabled;console.log("noMinijuegosSDK",A);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:c,topDomain:u&&u.length?u:c,noGAPageView:f,noLotamePageView:m,noGamedockSDK:g,noMinijuegosSDK:A,version:r.version,pauseGameOnStartup:b,depth:o(),domainMatched:c===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=db(db({},n.query),t),n.toString()}},{key:"_base64_encode",value:function(e){return I.encode(JSON.stringify(e))}}]),e}(),pb=function(){try{return(new hb).getBridgeContext()}catch(e){return{}}}(),fb={userDeclinedTracking:document.location.search.indexOf("gdpr-tracking=0")>=0||document.cookie.indexOf("ogdpr_tracking=0")>=0,whitelabelPartner:(ub=!1,(lb=c("xanthophyll")).hasOwnProperty("xanthophyll")&&"true"===lb.xanthophyll&&(ub=!0),ub)},mb=nl.charAt,gb=ue,Ab=Ae,vb=Math.floor,bb=gb("".charAt),_b=gb("".replace),yb=gb("".slice),wb=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,kb=/\$([$&'`]|\d{1,2})/g,Eb=Yc,xb=vt,Db=ue,Sb=Vv,Rb=ie,Tb=mt,Cb=$e,Ib=le,Ob=Yr,Pb=Zr,Bb=ms,Lb=fe,Ub=function(e,t,n){return t+(n?mb(e,t).length:1)},Mb=Ut,Fb=function(e,t,n,r,i,a){var s=n+e.length,o=r.length,c=kb;return void 0!==i&&(i=Ab(i),c=wb),_b(a,c,(function(a,c){var d;switch(bb(c,0)){case"$":return"$";case"&":return e;case"`":return yb(t,0,n);case"'":return yb(t,s);case"<":d=i[yb(c,1,-1)];break;default:var u=+c;if(0===u)return a;if(u>o){var l=vb(u/10);return 0===l?a:l<=o?void 0===r[l-1]?bb(c,1):r[l-1]+bb(c,1):a}d=r[u-1]}return void 0===d?"":d}))},jb=$v,Nb=We("replace"),Gb=Math.max,qb=Math.min,Hb=Db([].concat),Qb=Db([].push),Vb=Db("".indexOf),zb=Db("".slice),Wb="$0"==="a".replace(/./,"$0"),Kb=!!/./[Nb]&&""===/./[Nb]("a","$0");Sb("replace",(function(e,t,n){var r=Kb?"$":"$0";return[function(e,n){var r=Lb(this),i=Ib(e)?void 0:Mb(e,Nb);return i?xb(i,e,r,n):xb(t,Bb(r),e,n)},function(e,i){var a=Tb(this),s=Bb(e);if("string"==typeof i&&-1===Vb(i,r)&&-1===Vb(i,"$<")){var o=n(t,a,s,i);if(o.done)return o.value}var c=Cb(i);c||(i=Bb(i));var d=a.global;if(d){var u=a.unicode;a.lastIndex=0}for(var l=[];;){var h=jb(a,s);if(null===h)break;if(Qb(l,h),!d)break;""===Bb(h[0])&&(a.lastIndex=Ub(s,Pb(a.lastIndex),u))}for(var p,f="",m=0,g=0;g<l.length;g++){for(var A=Bb((h=l[g])[0]),v=Gb(qb(Ob(h.index),s.length),0),b=[],_=1;_<h.length;_++)Qb(b,void 0===(p=h[_])?p:String(p));var y=h.groups;if(c){var w=Hb([A],b,v,s);void 0!==y&&Qb(w,y);var k=Bb(Eb(i,void 0,w))}else k=Fb(A,s,v,b,y,i);v>=m&&(f+=zb(s,m,v)+k,m=v+A.length)}return f+zb(s,m)}]}),!!Rb((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}))||!Wb||Kb);var Yb=ie,Jb=tt,Xb=We("iterator"),Zb=!Yb((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,n="";return e.pathname="c%20d",t.forEach((function(e,r){t.delete("b"),n+=r+e})),!t.size&&!Jb||!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[Xb]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==n||"x"!==new URL("http://x",void 0).host})),$b=gr,e_=Js,t_=Math.floor,n_=function(e,t){var n=e.length,r=t_(n/2);return n<8?r_(e,t):i_(e,n_(e_(e,0,r),t),n_(e_(e,r),t),t)},r_=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},i_=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},a_=Za,s_=W,o_=vt,c_=ue,d_=tt,u_=Zb,l_=gr,h_=ao,p_=function(e,t,n){for(var r in t)$b(e,r,t[r],n);return e},f_=yo,m_=Sl,g_=Kn,A_=$p,v_=$e,b_=_e,__=Nr,y_=Sr,w_=mt,k_=it,E_=ms,x_=Fs,D_=Dn,S_=Du,R_=bu,T_=uf,C_=n_,I_=We("iterator"),O_="URLSearchParams",P_=O_+"Iterator",B_=g_.set,L_=g_.getterFor(O_),U_=g_.getterFor(P_),M_=Object.getOwnPropertyDescriptor,F_=function(e){if(!d_)return s_[e];var t=M_(s_,e);return t&&t.value},j_=F_("fetch"),N_=F_("Request"),G_=F_("Headers"),q_=N_&&N_.prototype,H_=G_&&G_.prototype,Q_=s_.RegExp,V_=s_.TypeError,z_=s_.decodeURIComponent,W_=s_.encodeURIComponent,K_=c_("".charAt),Y_=c_([].join),J_=c_([].push),X_=c_("".replace),Z_=c_([].shift),$_=c_([].splice),ey=c_("".split),ty=c_("".slice),ny=/\+/g,ry=Array(4),iy=function(e){return ry[e-1]||(ry[e-1]=Q_("((?:%[\\da-f]{2}){"+e+"})","gi"))},ay=function(e){try{return z_(e)}catch(t){return e}},sy=function(e){var t=X_(e,ny," "),n=4;try{return z_(t)}catch(e){for(;n;)t=X_(t,iy(n--),ay);return t}},oy=/[!'()~]|%20/g,cy={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},dy=function(e){return cy[e]},uy=function(e){return X_(W_(e),oy,dy)},ly=m_((function(e,t){B_(this,{type:P_,iterator:S_(L_(e).entries),kind:t})}),"Iterator",(function(){var e=U_(this),t=e.kind,n=e.iterator.next(),r=n.value;return n.done||(n.value="keys"===t?r.key:"values"===t?r.value:[r.key,r.value]),n}),!0),hy=function(e){this.entries=[],this.url=null,void 0!==e&&(k_(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===K_(e,0)?ty(e,1):e:E_(e)))};hy.prototype={type:O_,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,n,r,i,a,s,o,c=R_(e);if(c)for(n=(t=S_(e,c)).next;!(r=o_(n,t)).done;){if(a=(i=S_(w_(r.value))).next,(s=o_(a,i)).done||(o=o_(a,i)).done||!o_(a,i).done)throw V_("Expected sequence with length 2");J_(this.entries,{key:E_(s.value),value:E_(o.value)})}else for(var d in e)b_(e,d)&&J_(this.entries,{key:d,value:E_(e[d])})},parseQuery:function(e){if(e)for(var t,n,r=ey(e,"&"),i=0;i<r.length;)(t=r[i++]).length&&(n=ey(t,"="),J_(this.entries,{key:sy(Z_(n)),value:sy(Y_(n,"="))}))},serialize:function(){for(var e,t=this.entries,n=[],r=0;r<t.length;)e=t[r++],J_(n,uy(e.key)+"="+uy(e.value));return Y_(n,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var py=function(){A_(this,fy);var e=B_(this,new hy(arguments.length>0?arguments[0]:void 0));d_||(this.length=e.entries.length)},fy=py.prototype;if(p_(fy,{append:function(e,t){T_(arguments.length,2);var n=L_(this);J_(n.entries,{key:E_(e),value:E_(t)}),d_||this.length++,n.updateURL()},delete:function(e){T_(arguments.length,1);for(var t=L_(this),n=t.entries,r=E_(e),i=0;i<n.length;)n[i].key===r?$_(n,i,1):i++;d_||(this.length=n.length),t.updateURL()},get:function(e){T_(arguments.length,1);for(var t=L_(this).entries,n=E_(e),r=0;r<t.length;r++)if(t[r].key===n)return t[r].value;return null},getAll:function(e){T_(arguments.length,1);for(var t=L_(this).entries,n=E_(e),r=[],i=0;i<t.length;i++)t[i].key===n&&J_(r,t[i].value);return r},has:function(e){T_(arguments.length,1);for(var t=L_(this).entries,n=E_(e),r=0;r<t.length;)if(t[r++].key===n)return!0;return!1},set:function(e,t){T_(arguments.length,1);for(var n,r=L_(this),i=r.entries,a=!1,s=E_(e),o=E_(t),c=0;c<i.length;c++)(n=i[c]).key===s&&(a?$_(i,c--,1):(a=!0,n.value=o));a||J_(i,{key:s,value:o}),d_||(this.length=i.length),r.updateURL()},sort:function(){var e=L_(this);C_(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,n=L_(this).entries,r=__(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 ly(this,"keys")},values:function(){return new ly(this,"values")},entries:function(){return new ly(this,"entries")}},{enumerable:!0}),l_(fy,I_,fy.entries,{name:"entries"}),l_(fy,"toString",(function(){return L_(this).serialize()}),{enumerable:!0}),d_&&h_(fy,"size",{get:function(){return L_(this).entries.length},configurable:!0,enumerable:!0}),f_(py,O_),a_({global:!0,constructor:!0,forced:!u_},{URLSearchParams:py}),!u_&&v_(G_)){var my=c_(H_.has),gy=c_(H_.set),Ay=function(e){if(k_(e)){var t,n=e.body;if(y_(n)===O_)return t=e.headers?new G_(e.headers):new G_,my(t,"content-type")||gy(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),x_(e,{body:D_(0,E_(n)),headers:D_(0,t)})}return e};if(v_(j_)&&a_({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return j_(e,arguments.length>1?Ay(arguments[1]):{})}}),v_(N_)){var vy=function(e){return A_(this,q_),new N_(e,arguments.length>1?Ay(arguments[1]):{})};q_.constructor=vy,vy.prototype=q_,a_({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:vy})}}var by={URLSearchParams:py,getState:L_},_y=fa.includes,yy=gp;Za({target:"Array",proto:!0,forced:ie((function(){return!Array(1).includes()}))},{includes:function(e){return _y(this,e,arguments.length>1?arguments[1]:void 0)}}),yy("includes");var wy=Za,ky=sv,Ey=fe,xy=ms,Dy=cv,Sy=ue("".indexOf);function Ry(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 c(e){return B(r,e)}function d(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){d("depth.error",e.message)}d("depth.value",e)}(),function(){var e=i,t=r.depth.value,n=s;if(d("top.domain.from","fallback"),e&&e.length>0)n=e[e.length-1],d("top.domain.from","origins");else if(0===t)n=s,d("top.domain.from","self-top");else if(1===t){var a=u(o);a&&(n=a.origin,d("top.domain.from","referrer"))}d("top.domain.value",n.replace(/^https?:\/\/(www\.)?(.*)$/i,"$2"))}(),function(){var e=l();if(e)if(P(e))d("partner.domain.value",e),d("partner.domain.from","partner-domain");else{var t=u(e,!1);if(t)d("partner.domain.value",t.origin.replace(/^https?:\/\/(www\.)?(.*)$/i,"$2")),d("partner.domain.from","partner-url");else d("partner.domain.value",r.top.domain.value),d("partner.domain.from","partner-fallback")}else d("partner.domain.value",r.top.domain.value),d("partner.domain.from","fallback")}(),e=l(),0===r.depth.value?(d("partner.url.value",a),d("partner.url.from","self-top")):e?P(e)?(d("partner.url.value",a),d("partner.url.from","partner-domain")):(d("partner.url.value",e),d("partner.url.from","partner-url")):(d("partner.url.value",o),d("partner.url.from","fallback"))}.bind(this)(),{get:c,print:function(e){console.log(c(e))}}}wy({target:"String",proto:!0,forced:!Dy("includes")},{includes:function(e){return!!~Sy(xy(Ey(this)),xy(ky(e)),arguments.length>1?arguments[1]:void 0)}});var Ty="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==Ty&&Ty,Cy={searchParams:"URLSearchParams"in Ty,iterable:"Symbol"in Ty&&"iterator"in Symbol,blob:"FileReader"in Ty&&"Blob"in Ty&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in Ty,arrayBuffer:"ArrayBuffer"in Ty};if(Cy.arrayBuffer)var Iy=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],Oy=ArrayBuffer.isView||function(e){return e&&Iy.indexOf(Object.prototype.toString.call(e))>-1};function Py(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 By(e){return"string"!=typeof e&&(e=String(e)),e}function Ly(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return Cy.iterable&&(t[Symbol.iterator]=function(){return t}),t}function Uy(e){this.map={},e instanceof Uy?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function My(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function Fy(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function jy(e){var t=new FileReader,n=Fy(t);return t.readAsArrayBuffer(e),n}function Ny(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function Gy(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:Cy.blob&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:Cy.formData&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:Cy.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():Cy.arrayBuffer&&Cy.blob&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=Ny(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):Cy.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(e)||Oy(e))?this._bodyArrayBuffer=Ny(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):Cy.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},Cy.blob&&(this.blob=function(){var e=My(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=My(this);return e||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}return this.blob().then(jy)}),this.text=function(){var e=My(this);if(e)return e;if(this._bodyBlob)return function(e){var t=new FileReader,n=Fy(t);return t.readAsText(e),n}(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r<t.length;r++)n[r]=String.fromCharCode(t[r]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},Cy.formData&&(this.formData=function(){return this.text().then(Qy)}),this.json=function(){return this.text().then(JSON.parse)},this}Uy.prototype.append=function(e,t){e=Py(e),t=By(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},Uy.prototype.delete=function(e){delete this.map[Py(e)]},Uy.prototype.get=function(e){return e=Py(e),this.has(e)?this.map[e]:null},Uy.prototype.has=function(e){return this.map.hasOwnProperty(Py(e))},Uy.prototype.set=function(e,t){this.map[Py(e)]=By(t)},Uy.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},Uy.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),Ly(e)},Uy.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),Ly(e)},Uy.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),Ly(e)},Cy.iterable&&(Uy.prototype[Symbol.iterator]=Uy.prototype.entries);var qy=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function Hy(e,t){if(!(this instanceof Hy))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 Hy){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new Uy(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 Uy(t.headers)),this.method=function(e){var t=e.toUpperCase();return qy.indexOf(t)>-1?t:e}(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(n),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==t.cache&&"no-cache"!==t.cache)){var r=/([?&])_=[^&]*/;if(r.test(this.url))this.url=this.url.replace(r,"$1_="+(new Date).getTime());else{this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}}function Qy(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 Vy(e,t){if(!(this instanceof Vy))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText=void 0===t.statusText?"":""+t.statusText,this.headers=new Uy(t.headers),this.url=t.url||"",this._initBody(e)}Hy.prototype.clone=function(){return new Hy(this,{body:this._bodyInit})},Gy.call(Hy.prototype),Gy.call(Vy.prototype),Vy.prototype.clone=function(){return new Vy(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new Uy(this.headers),url:this.url})},Vy.error=function(){var e=new Vy(null,{status:0,statusText:""});return e.type="error",e};var zy=[301,302,303,307,308];Vy.redirect=function(e,t){if(-1===zy.indexOf(t))throw new RangeError("Invalid status code");return new Vy(null,{status:t,headers:{location:e}})};var Wy,Ky=Ty.DOMException;try{new Ky}catch(e){Ky=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},Ky.prototype=Object.create(Error.prototype),Ky.prototype.constructor=Ky}function Yy(e,t){return new Promise((function(n,r){var i=new Hy(e,t);if(i.signal&&i.signal.aborted)return r(new Ky("Aborted","AbortError"));var a=new XMLHttpRequest;function s(){a.abort()}a.onload=function(){var e,t,r={status:a.status,statusText:a.statusText,headers:(e=a.getAllResponseHeaders()||"",t=new Uy,e.replace(/\r?\n[\t ]+/g," ").split("\r").map((function(e){return 0===e.indexOf("\n")?e.substr(1,e.length):e})).forEach((function(e){var n=e.split(":"),r=n.shift().trim();if(r){var i=n.join(":").trim();t.append(r,i)}})),t)};r.url="responseURL"in a?a.responseURL:r.headers.get("X-Request-URL");var i="response"in a?a.response:a.responseText;setTimeout((function(){n(new Vy(i,r))}),0)},a.onerror=function(){setTimeout((function(){r(new TypeError("Network request failed"))}),0)},a.ontimeout=function(){setTimeout((function(){r(new TypeError("Network request failed"))}),0)},a.onabort=function(){setTimeout((function(){r(new Ky("Aborted","AbortError"))}),0)},a.open(i.method,function(e){try{return""===e&&Ty.location.href?Ty.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&&(Cy.blob?a.responseType="blob":Cy.arrayBuffer&&i.headers.get("Content-Type")&&-1!==i.headers.get("Content-Type").indexOf("application/octet-stream")&&(a.responseType="arraybuffer")),!t||"object"!=typeof t.headers||t.headers instanceof Uy?i.headers.forEach((function(e,t){a.setRequestHeader(t,e)})):Object.getOwnPropertyNames(t.headers).forEach((function(e){a.setRequestHeader(e,By(t.headers[e]))})),i.signal&&(i.signal.addEventListener("abort",s),a.onreadystatechange=function(){4===a.readyState&&i.signal.removeEventListener("abort",s)}),a.send(void 0===i._bodyInit?null:i._bodyInit)}))}Yy.polyfill=!0,Ty.fetch||(Ty.fetch=Yy,Ty.Headers=Uy,Ty.Request=Hy,Ty.Response=Vy);var Jy=function(e){var n=this;if(!Wy){var r={gameId:e.gameId,hours:(new Date).getHours(),topDomain:pb.topDomain,domain:pb.parentDomain,referrer:pb.parentURL,depth:o(),version:os.version,byloader:pb.isTokenGameURL,isTokenGameURL:pb.isTokenGameURL,isMasterGameURL:pb.isMasterGameURL,isExtHostedGameURL:pb.isExtHostedGameURL,byloaderVersion:pb.version,tracking:fb.userDeclinedTracking,whitelabel:fb.whitelabelPartner,platform:u()};Wy=new l(r)}return Wy||{send:function(){t(this,n)}.bind(this)}},Xy={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){}}},Zy={prod:["html5.gamedistribution.com","revision.gamedistribution.com"],acc:["html5-acc-real-aws.gamedistribution.com","acceptance-revision.gamedistribution.com"]},$y={gameAPI:"game.api.gamedistribution.com"},ew={gameAPI:"game-api-acc-real-aws.gamedistribution.com"},tw=function(){var e=this,n=Zy.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?ew:$y}},nw=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 rw(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 iw(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?rw(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rw(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var aw,sw,ow,cw=new M,dw=[],uw=function(e){dw.push(e)},lw=function(e){aw=Jy(ow=e)},hw=function(){var t=e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(sw){e.next=6;break}return e.next=3,mw(ow);case 3:sw=e.sent,cw.emit("game-data-ready",sw),pw();case 6:return e.abrupt("return",sw);case 7:case"end":return e.stop()}}),e)})));return function(){return t.apply(this,arguments)}}(),pw=function(){var t,n;if(null!==(t=sw)&&void 0!==t&&null!==(n=t.aws_tst)&&void 0!==n&&n.enabled){var i,a,s,o,c;if(fw(),null!==(i=sw)&&void 0!==i&&null!==(a=i.aws_tst)&&void 0!==a&&null!==(s=a.ep)&&void 0!==s&&s.api&&null!==(o=sw)&&void 0!==o&&o.url)Xy.getGameData(null===(c=sw)||void 0===c?void 0:c.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,mw(ow);case 3:sw=e.sent,null===(t=sw)||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)}},fw=function(){var n=window.fetch;window.fetch=e(r.mark((function e(){var i,a,s,o,c,d,u,l,h,p,f,m,g,A,v,b,_,y,w,k=this,E=arguments;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(u=E.length,l=new Array(u),h=0;h<u;h++)l[h]=E[h];p=l[0],f=l[1],m=null===(i=sw)||void 0===i||null===(a=i.aws_tst)||void 0===a||null===(s=a.ep)||void 0===s?void 0:s.atm,g=null===(o=sw)||void 0===o||null===(c=o.aws_tst)||void 0===c||null===(d=c.ep)||void 0===d?void 0:d.msgrt,A=function(e,r){var i=this;t(this,k);var a=p.replace(e,r);n(a,f).then(function(){t(this,i)}.bind(this))}.bind(this);try{m&&p.indexOf("tag.atom")>0&&A("tag.atom.gamedistribution.com","atom-tag-prod-aws.gamedistribution.com"),g&&p.indexOf("msgrt.gamedistribution.com")>0&&(null===(v=sw)||void 0===v||v.aws_tst,null===(b=sw)||void 0===b||null===(_=b.aws_tst)||void 0===_||null===(y=_.ep)||void 0===y||y.msgrt,A("msgrt.gamedistribution.com","msgrt-prod-aws.gamedistribution.com"))}catch(e){}return e.next=9,n(p,f);case 9:return w=e.sent,e.abrupt("return",w);case 11:case"end":return e.stop()}}),e,this)})))},mw=function(n){var i=this;aw.send("gdfw.loading",{message:"loading"}),dw=[],uw("1"),uw("2");var a=new Ry;uw("3");var s=a.get("partner.domain.value");uw("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);uw("5");var c=function(){t(this,i);var e=d(),r=e?"&mode=".concat(e):"",a=tw().config;return"https://".concat(a.gameAPI,"/game/v4/get/").concat(n.gameId.replace(/-/g,""),"/?domain=").concat(s).concat(r,"&v=").concat(os.version,"&localTime=").concat((new Date).getHours())}.bind(this);uw("6");var d=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 uw("7"),new Promise(function(n){var a=this;t(this,i),uw("7.1");var s=o();try{uw("7.2");var d=c();uw("7.3"),fetch(d).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 uw("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,nw({url:d});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),uw("7.5"),e.success){var i,o,c,u=e.result.game;uw("7.6");var l={company:u.company,gameId:u.gameMd5,slug:u.slug,pname:u.pname,dname:u.dname,status:u.status,activeStatus:u.activeStatus,description:u.description,disableAds:u.enableAds,preroll:u.preRoll,midroll:6e4*u.timeAds,rewardedAds:u.rewardedAds,title:u.title,publishedAt:u.publishedAt,tags:u.tags,category:u.category,assets:u.assets,disp_2nd_prer:u.disp_2nd_prer,ctry_vst:u.ctry_vst,ctry:u.ctry,crtv:u.crtv,dmain:u.dmain,aws_tst:u.aws_tst,meta:u.meta,adspn:cs(u.adspn)||{},__t4r:cs(u.__t4r)||{},block_exts:cs(u.push_cuda),bloc_gard:cs(u.bloc_gard),cookie:cs(u.cookie),gdpr:cs(u.gdpr),diagnostic:cs(u.diagnostic),cmp:cs(u.cmp),gft:cs(u.gft)||{},sdk:cs(u.sdk)||{},sdkfw:cs(u.sdkfw)||{},loader:cs(u.loader)||{},splash:cs(u.splash)||{},promo:cs(u.promo)||{},dAds:cs(u.dads)||{},pAds:cs(u.pads)||{},mAds:cs(u.mads)||{},rAds:cs(u.rads)||{},lp:cs(u.lp)||{},extsc:cs(u.extsc)||{},evnts:cs(u.evnts)||{},dp:cs(u.dp)||{},adflw:cs(u.adflw)||{},afgszf:cs(u.afgszf)||{},fllc:cs(u.fllc)||{},lotm:cs(u.lotm)||{},t4rc:cs(u.t4rc)||{},midroll_plus:cs(u.midroll_plus)||{},gmky:cs(u.gmky)||{},urlBlockExc:cs(u.url_blck_exc)||{},sdk_wrp:cs(u.sdk_wrp)||{},dbglg:cs(u.dbglg)||{},extHosting:cs(u.ext_hosting)||{},directTokenUse:cs(u.dtu)||{},aeria:cs(u.aeria)||{},advlm:cs(u.advlm)||{},ad_blcks:cs(u.ad_blcks)||{},rmblck:cs(u.rmblck)||{},gs_trc:cs(u.gs_trc)||{},rwskp:cs(u.rwskp)||{}};uw("7.7");var p=h(U(s),l);uw("7.8"),p.afg_disabled=!1===(null===(i=p.sdk)||void 0===i||null===(o=i.afg)||void 0===o?void 0:o.enabled),p.url=d,function(){t(this,r),void 0!==hs.afgEnabled&&(p.afg_disabled=!hs.afgEnabled),void 0!==hs.promoEnabled&&(p.promo=p.promo||{},p.promo=iw(iw({},p.promo),{},{rainbow:{enabled:hs.promoEnabled}}))}.bind(this),uw("7.9"),null!==(c=p.pAds)&&void 0!==c&&c.enabled&&(p.preroll=!0),uw("7.10"),aw.send("gdfw.success",{message:"success"}),n(p)}else{s.failed=!0;var f=dw[dw.length-1];aw.send("gdfw.err",{message:"".concat(f,": json error")}),n(s)}}.bind(this)).catch(function(e){t(this,a);var r=dw[dw.length-1];aw.send("gdfw.err",{message:"".concat(r,": ").concat(e.message?e.message:e)}),s.failed=!0,n(s)}.bind(this))}catch(e){var u=dw[dw.length-1];aw.send("gdfw.err",{message:"".concat(u,": global ").concat(e.message?e.message:e)}),s.failed=!0,n(s)}}.bind(this))},gw=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,hw();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)}}(),Aw=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,hw();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)}}(),vw=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,hw();case 2:return n=e.sent,e.next=5,gw();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)}}(),bw=function(){var t=e(r.mark((function e(){var t,n,i,a,s,o,c,d;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,hw();case 2:return c=e.sent,d=!(null==c||null===(t=c.extsc)||void 0===t||!t.enabled),e.abrupt("return",{enabled:d,path:d?null==c||null===(n=c.extsc)||void 0===n?void 0:n.path:"",name:d?null==c||null===(i=c.extsc)||void 0===i?void 0:i.name:"",ref:d?null==c||null===(a=c.extsc)||void 0===a?void 0:a.ref:"",loadedFlag:d?null==c||null===(s=c.extsc)||void 0===s?void 0:s.loadedFlag:void 0,loadedFlagCheck:!!d&&!(null==c||null===(o=c.extsc)||void 0===o||!o.loadedFlagCheck)});case 5:case"end":return e.stop()}}),e)})));return function(){return t.apply(this,arguments)}}(),_w=function(){var n=e(r.mark((function e(){var n,i,a,s,o,c=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,bw();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,c),!!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)}}(),yw=!1,ww=!1,kw=function(){return new Promise(function(){var n=e(r.mark((function e(n,i){var a,s,o,c,d,u=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!yw){e.next=4;break}return e.abrupt("return",n(ww));case 4:yw=!0;case 5:return e.next=7,bw();case 7:if((a=e.sent).enabled){e.next=10;break}return e.abrupt("return",n(!1));case 10:if(s=a.loadedFlag,!(o=a.loadedFlagCheck)||s){e.next=13;break}return e.abrupt("return",n(!1));case 13:if(o){e.next=16;break}return ww=!0,e.abrupt("return",n(!0));case 16:c=!0,setTimeout(function(){t(this,u),c&&(c=!1,yw=!0,n(!1))}.bind(this),5e3),d=setInterval(function(){t(this,u),c&&o&&window[s]?(c=!1,yw=!0,ww=!0,clearInterval(d),n(!0)):c||clearInterval(d)}.bind(this),100);case 19:case"end":return e.stop()}}),e,this)})));return function(e,t){return n.apply(this,arguments)}}())},Ew=Za,xw=pm,Dw=ie,Sw=yt,Rw=$e,Tw=cf,Cw=mA,Iw=gr,Ow=xw&&xw.prototype;if(Ew({target:"Promise",proto:!0,real:!0,forced:!!xw&&Dw((function(){Ow.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=Tw(this,Sw("Promise")),n=Rw(e);return this.then(n?function(n){return Cw(t,e()).then((function(){return n}))}:e,n?function(n){return Cw(t,e()).then((function(){throw n}))}:e)}}),Rw(xw)){var Pw=Sw("Promise").prototype.finally;Ow.finally!==Pw&&Iw(Ow,"finally",Pw,{unsafe:!0})}var Bw="\t\n\v\f\r                 \u2028\u2029\ufeff",Lw=fe,Uw=ms,Mw=Bw,Fw=ue("".replace),jw=RegExp("^["+Mw+"]+"),Nw=RegExp("(^|[^"+Mw+"])["+Mw+"]+$"),Gw=function(e){return function(t){var n=Uw(Lw(t));return 1&e&&(n=Fw(n,jw,"")),2&e&&(n=Fw(n,Nw,"$1")),n}},qw={start:Gw(1),end:Gw(2),trim:Gw(3)},Hw=mn.PROPER,Qw=ie,Vw=Bw,zw=qw.trim;Za({target:"String",proto:!0,forced:function(e){return Qw((function(){return!!Vw[e]()||"​…᠎"!=="​…᠎"[e]()||Hw&&Vw[e].name!==e}))}("trim")},{trim:function(){return zw(this)}});var Ww=Za,Kw=Ii.find,Yw=gp,Jw="find",Xw=!0;Jw in[]&&Array(1)[Jw]((function(){Xw=!1})),Ww({target:"Array",proto:!0,forced:Xw},{find:function(e){return Kw(this,e,arguments.length>1?arguments[1]:void 0)}}),Yw(Jw);var Zw=$e,$w=it,ek=Ul,tk=et.f,nk=tt,rk=W,ik=ue,ak=Qa,sk=function(e,t,n){var r,i;return ek&&Zw(r=t.constructor)&&r!==n&&$w(i=r.prototype)&&i!==n.prototype&&ek(e,i),e},ok=Tn,ck=aa.f,dk=wt,uk=rv,lk=ms,hk=Dv,pk=vh,fk=function(e,t,n){n in e||tk(e,n,{configurable:!0,get:function(){return t[n]},set:function(e){t[n]=e}})},mk=gr,gk=ie,Ak=_e,vk=Kn.enforce,bk=Jp,_k=yh,yk=Eh,wk=We("match"),kk=rk.RegExp,Ek=kk.prototype,xk=rk.SyntaxError,Dk=ik(Ek.exec),Sk=ik("".charAt),Rk=ik("".replace),Tk=ik("".indexOf),Ck=ik("".slice),Ik=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,Ok=/a/g,Pk=/a/g,Bk=new kk(Ok)!==Ok,Lk=pk.MISSED_STICKY,Uk=pk.UNSUPPORTED_Y,Mk=nk&&(!Bk||Lk||_k||yk||gk((function(){return Pk[wk]=!1,kk(Ok)!=Ok||kk(Pk)==Pk||"/a/i"!=kk(Ok,"i")})));if(ak("RegExp",Mk)){for(var Fk=function(e,t){var n,r,i,a,s,o,c=dk(Ek,this),d=uk(e),u=void 0===t,l=[],h=e;if(!c&&d&&u&&e.constructor===Fk)return e;if((d||dk(Ek,e))&&(e=e.source,u&&(t=hk(h))),e=void 0===e?"":lk(e),t=void 0===t?"":lk(t),h=e,_k&&"dotAll"in Ok&&(r=!!t&&Tk(t,"s")>-1)&&(t=Rk(t,/s/g,"")),n=t,Lk&&"sticky"in Ok&&(i=!!t&&Tk(t,"y")>-1)&&Uk&&(t=Rk(t,/y/g,"")),yk&&(a=function(e){for(var t,n=e.length,r=0,i="",a=[],s={},o=!1,c=!1,d=0,u="";r<=n;r++){if("\\"===(t=Sk(e,r)))t+=Sk(e,++r);else if("]"===t)o=!1;else if(!o)switch(!0){case"["===t:o=!0;break;case"("===t:Dk(Ik,Ck(e,r+1))&&(r+=2,c=!0),i+=t,d++;continue;case">"===t&&c:if(""===u||Ak(s,u))throw new xk("Invalid capture group name");s[u]=!0,a[a.length]=[u,d],c=!1,u="";continue}c?u+=t:i+=t}return[i,a]}(e),e=a[0],l=a[1]),s=sk(kk(e,t),c?this:Ek,Fk),(r||i||l.length)&&(o=vk(s),r&&(o.dotAll=!0,o.raw=Fk(function(e){for(var t,n=e.length,r=0,i="",a=!1;r<=n;r++)"\\"!==(t=Sk(e,r))?a||"."!==t?("["===t?a=!0:"]"===t&&(a=!1),i+=t):i+="[\\s\\S]":i+=t+Sk(e,++r);return i}(e),n)),i&&(o.sticky=!0),l.length&&(o.groups=l)),e!==h)try{ok(s,"source",""===h?"(?:)":h)}catch(e){}return s},jk=ck(kk),Nk=0;jk.length>Nk;)fk(Fk,kk,jk[Nk++]);Ek.constructor=Fk,Fk.prototype=Ek,mk(rk,"RegExp",Fk,{constructor:!0})}bk("RegExp");var Gk=Za,qk=Vr,Hk=Yi,Qk=Pi,Vk=ue([].join);Gk({target:"Array",proto:!0,forced:qk!=Object||!Qk("join",",")},{join:function(e){return Vk(Hk(this),void 0===e?",":e)}});var zk=Ii.map;Za({target:"Array",proto:!0,forced:!Od("map")},{map:function(e){return zk(this,e,arguments.length>1?arguments[1]:void 0)}});var Wk=tt,Kk=ue,Yk=vt,Jk=ie,Xk=ts,Zk=Ea,$k=Hi,eE=Ae,tE=Vr,nE=Object.assign,rE=Object.defineProperty,iE=Kk([].concat),aE=!nE||Jk((function(){if(Wk&&1!==nE({b:1},nE(rE({},"a",{enumerable:!0,get:function(){rE(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach((function(e){t[e]=e})),7!=nE({},e)[n]||Xk(nE({},t)).join("")!=r}))?function(e,t){for(var n=eE(e),r=arguments.length,i=1,a=Zk.f,s=$k.f;r>i;)for(var o,c=tE(arguments[i++]),d=a?iE(Xk(c),a(c)):Xk(c),u=d.length,l=0;u>l;)o=d[l++],Wk&&!Yk(s,c,o)||(n[o]=c[o]);return n}:nE,sE=aE;Za({target:"Object",stat:!0,arity:2,forced:Object.assign!==sE},{assign:sE});var oE,cE=ue,dE=2147483647,uE=/[^\0-\u007E]/,lE=/[.\u3002\uFF0E\uFF61]/g,hE="Overflow: input needs wider integers to process",pE=RangeError,fE=cE(lE.exec),mE=Math.floor,gE=String.fromCharCode,AE=cE("".charCodeAt),vE=cE([].join),bE=cE([].push),_E=cE("".replace),yE=cE("".split),wE=cE("".toLowerCase),kE=function(e){return e+22+75*(e<26)},EE=function(e,t,n){var r=0;for(e=n?mE(e/700):e>>1,e+=mE(e/t);e>455;)e=mE(e/35),r+=36;return mE(r+36*e/(e+38))},xE=function(e){var t=[];e=function(e){for(var t=[],n=0,r=e.length;n<r;){var i=AE(e,n++);if(i>=55296&&i<=56319&&n<r){var a=AE(e,n++);56320==(64512&a)?bE(t,((1023&i)<<10)+(1023&a)+65536):(bE(t,i),n--)}else bE(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&&bE(t,gE(r));var c=t.length,d=c;for(c&&bE(t,"-");d<i;){var u=dE;for(n=0;n<e.length;n++)(r=e[n])>=a&&r<u&&(u=r);var l=d+1;if(u-a>mE((dE-s)/l))throw pE(hE);for(s+=(u-a)*l,a=u,n=0;n<e.length;n++){if((r=e[n])<a&&++s>dE)throw pE(hE);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,g=36-f;bE(t,gE(kE(f+m%g))),h=mE(m/g),p+=36}bE(t,gE(kE(h))),o=EE(s,l,d==c),s=0,d++}}s++,a++}return vE(t,"")},DE=Za,SE=tt,RE=Zb,TE=W,CE=Nr,IE=ue,OE=gr,PE=ao,BE=$p,LE=_e,UE=aE,ME=Fu,FE=Js,jE=nl.codeAt,NE=function(e){var t,n,r=[],i=yE(_E(wE(e),lE,"."),".");for(t=0;t<i.length;t++)n=i[t],bE(r,fE(uE,n)?"xn--"+xE(n):n);return vE(r,".")},GE=ms,qE=yo,HE=uf,QE=by,VE=Kn,zE=VE.set,WE=VE.getterFor("URL"),KE=QE.URLSearchParams,YE=QE.getState,JE=TE.URL,XE=TE.TypeError,ZE=TE.parseInt,$E=Math.floor,ex=Math.pow,tx=IE("".charAt),nx=IE(/./.exec),rx=IE([].join),ix=IE(1..toString),ax=IE([].pop),sx=IE([].push),ox=IE("".replace),cx=IE([].shift),dx=IE("".split),ux=IE("".slice),lx=IE("".toLowerCase),hx=IE([].unshift),px="Invalid scheme",fx="Invalid host",mx="Invalid port",gx=/[a-z]/i,Ax=/[\d+-.a-z]/i,vx=/\d/,bx=/^0x/i,_x=/^[0-7]+$/,yx=/^\d+$/,wx=/^[\da-f]+$/i,kx=/[\0\t\n\r #%/:<>?@[\\\]^|]/,Ex=/[\0\t\n\r #/:<>?@[\\\]^|]/,xx=/^[\u0000-\u0020]+/,Dx=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,Sx=/[\t\n\r]/g,Rx=function(e){var t,n,r,i;if("number"==typeof e){for(t=[],n=0;n<4;n++)hx(t,e%256),e=$E(e/256);return rx(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+=ix(e[n],16),n<7&&(t+=":")));return"["+t+"]"}return e},Tx={},Cx=UE({},Tx,{" ":1,'"':1,"<":1,">":1,"`":1}),Ix=UE({},Cx,{"#":1,"?":1,"{":1,"}":1}),Ox=UE({},Ix,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),Px=function(e,t){var n=jE(e,0);return n>32&&n<127&&!LE(t,e)?e:encodeURIComponent(e)},Bx={ftp:21,file:null,http:80,https:443,ws:80,wss:443},Lx=function(e,t){var n;return 2==e.length&&nx(gx,tx(e,0))&&(":"==(n=tx(e,1))||!t&&"|"==n)},Ux=function(e){var t;return e.length>1&&Lx(ux(e,0,2))&&(2==e.length||"/"===(t=tx(e,2))||"\\"===t||"?"===t||"#"===t)},Mx=function(e){return"."===e||"%2e"===lx(e)},Fx={},jx={},Nx={},Gx={},qx={},Hx={},Qx={},Vx={},zx={},Wx={},Kx={},Yx={},Jx={},Xx={},Zx={},$x={},eD={},tD={},nD={},rD={},iD={},aD=function(e,t,n){var r,i,a,s=GE(e);if(t){if(i=this.parse(s))throw XE(i);this.searchParams=null}else{if(void 0!==n&&(r=new aD(n,!0)),i=this.parse(s,null,r))throw XE(i);(a=YE(new KE)).bindURL(this),this.searchParams=a}};aD.prototype={type:"URL",parse:function(e,t,n){var r,i,a,s,o,c=this,d=t||Fx,u=0,l="",h=!1,p=!1,f=!1;for(e=GE(e),t||(c.scheme="",c.username="",c.password="",c.host=null,c.port=null,c.path=[],c.query=null,c.fragment=null,c.cannotBeABaseURL=!1,e=ox(e,xx,""),e=ox(e,Dx,"$1")),e=ox(e,Sx,""),r=ME(e);u<=r.length;){switch(i=r[u],d){case Fx:if(!i||!nx(gx,i)){if(t)return px;d=Nx;continue}l+=lx(i),d=jx;break;case jx:if(i&&(nx(Ax,i)||"+"==i||"-"==i||"."==i))l+=lx(i);else{if(":"!=i){if(t)return px;l="",d=Nx,u=0;continue}if(t&&(c.isSpecial()!=LE(Bx,l)||"file"==l&&(c.includesCredentials()||null!==c.port)||"file"==c.scheme&&!c.host))return;if(c.scheme=l,t)return void(c.isSpecial()&&Bx[c.scheme]==c.port&&(c.port=null));l="","file"==c.scheme?d=Xx:c.isSpecial()&&n&&n.scheme==c.scheme?d=Gx:c.isSpecial()?d=Vx:"/"==r[u+1]?(d=qx,u++):(c.cannotBeABaseURL=!0,sx(c.path,""),d=nD)}break;case Nx:if(!n||n.cannotBeABaseURL&&"#"!=i)return px;if(n.cannotBeABaseURL&&"#"==i){c.scheme=n.scheme,c.path=FE(n.path),c.query=n.query,c.fragment="",c.cannotBeABaseURL=!0,d=iD;break}d="file"==n.scheme?Xx:Hx;continue;case Gx:if("/"!=i||"/"!=r[u+1]){d=Hx;continue}d=zx,u++;break;case qx:if("/"==i){d=Wx;break}d=tD;continue;case Hx:if(c.scheme=n.scheme,i==oE)c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=FE(n.path),c.query=n.query;else if("/"==i||"\\"==i&&c.isSpecial())d=Qx;else if("?"==i)c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=FE(n.path),c.query="",d=rD;else{if("#"!=i){c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=FE(n.path),c.path.length--,d=tD;continue}c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=FE(n.path),c.query=n.query,c.fragment="",d=iD}break;case Qx:if(!c.isSpecial()||"/"!=i&&"\\"!=i){if("/"!=i){c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,d=tD;continue}d=Wx}else d=zx;break;case Vx:if(d=zx,"/"!=i||"/"!=tx(l,u+1))continue;u++;break;case zx:if("/"!=i&&"\\"!=i){d=Wx;continue}break;case Wx:if("@"==i){h&&(l="%40"+l),h=!0,a=ME(l);for(var m=0;m<a.length;m++){var g=a[m];if(":"!=g||f){var A=Px(g,Ox);f?c.password+=A:c.username+=A}else f=!0}l=""}else if(i==oE||"/"==i||"?"==i||"#"==i||"\\"==i&&c.isSpecial()){if(h&&""==l)return"Invalid authority";u-=ME(l).length+1,l="",d=Kx}else l+=i;break;case Kx:case Yx:if(t&&"file"==c.scheme){d=$x;continue}if(":"!=i||p){if(i==oE||"/"==i||"?"==i||"#"==i||"\\"==i&&c.isSpecial()){if(c.isSpecial()&&""==l)return fx;if(t&&""==l&&(c.includesCredentials()||null!==c.port))return;if(s=c.parseHost(l))return s;if(l="",d=eD,t)return;continue}"["==i?p=!0:"]"==i&&(p=!1),l+=i}else{if(""==l)return fx;if(s=c.parseHost(l))return s;if(l="",d=Jx,t==Yx)return}break;case Jx:if(!nx(vx,i)){if(i==oE||"/"==i||"?"==i||"#"==i||"\\"==i&&c.isSpecial()||t){if(""!=l){var v=ZE(l,10);if(v>65535)return mx;c.port=c.isSpecial()&&v===Bx[c.scheme]?null:v,l=""}if(t)return;d=eD;continue}return mx}l+=i;break;case Xx:if(c.scheme="file","/"==i||"\\"==i)d=Zx;else{if(!n||"file"!=n.scheme){d=tD;continue}if(i==oE)c.host=n.host,c.path=FE(n.path),c.query=n.query;else if("?"==i)c.host=n.host,c.path=FE(n.path),c.query="",d=rD;else{if("#"!=i){Ux(rx(FE(r,u),""))||(c.host=n.host,c.path=FE(n.path),c.shortenPath()),d=tD;continue}c.host=n.host,c.path=FE(n.path),c.query=n.query,c.fragment="",d=iD}}break;case Zx:if("/"==i||"\\"==i){d=$x;break}n&&"file"==n.scheme&&!Ux(rx(FE(r,u),""))&&(Lx(n.path[0],!0)?sx(c.path,n.path[0]):c.host=n.host),d=tD;continue;case $x:if(i==oE||"/"==i||"\\"==i||"?"==i||"#"==i){if(!t&&Lx(l))d=tD;else if(""==l){if(c.host="",t)return;d=eD}else{if(s=c.parseHost(l))return s;if("localhost"==c.host&&(c.host=""),t)return;l="",d=eD}continue}l+=i;break;case eD:if(c.isSpecial()){if(d=tD,"/"!=i&&"\\"!=i)continue}else if(t||"?"!=i)if(t||"#"!=i){if(i!=oE&&(d=tD,"/"!=i))continue}else c.fragment="",d=iD;else c.query="",d=rD;break;case tD:if(i==oE||"/"==i||"\\"==i&&c.isSpecial()||!t&&("?"==i||"#"==i)){if(".."===(o=lx(o=l))||"%2e."===o||".%2e"===o||"%2e%2e"===o?(c.shortenPath(),"/"==i||"\\"==i&&c.isSpecial()||sx(c.path,"")):Mx(l)?"/"==i||"\\"==i&&c.isSpecial()||sx(c.path,""):("file"==c.scheme&&!c.path.length&&Lx(l)&&(c.host&&(c.host=""),l=tx(l,0)+":"),sx(c.path,l)),l="","file"==c.scheme&&(i==oE||"?"==i||"#"==i))for(;c.path.length>1&&""===c.path[0];)cx(c.path);"?"==i?(c.query="",d=rD):"#"==i&&(c.fragment="",d=iD)}else l+=Px(i,Ix);break;case nD:"?"==i?(c.query="",d=rD):"#"==i?(c.fragment="",d=iD):i!=oE&&(c.path[0]+=Px(i,Tx));break;case rD:t||"#"!=i?i!=oE&&("'"==i&&c.isSpecial()?c.query+="%27":c.query+="#"==i?"%23":Px(i,Tx)):(c.fragment="",d=iD);break;case iD:i!=oE&&(c.fragment+=Px(i,Cx))}u++}},parseHost:function(e){var t,n,r;if("["==tx(e,0)){if("]"!=tx(e,e.length-1))return fx;if(t=function(e){var t,n,r,i,a,s,o,c=[0,0,0,0,0,0,0,0],d=0,u=null,l=0,h=function(){return tx(e,l)};if(":"==h()){if(":"!=tx(e,1))return;l+=2,u=++d}for(;h();){if(8==d)return;if(":"!=h()){for(t=n=0;n<4&&nx(wx,h());)t=16*t+ZE(h(),16),l++,n++;if("."==h()){if(0==n)return;if(l-=n,d>6)return;for(r=0;h();){if(i=null,r>0){if(!("."==h()&&r<4))return;l++}if(!nx(vx,h()))return;for(;nx(vx,h());){if(a=ZE(h(),10),null===i)i=a;else{if(0==i)return;i=10*i+a}if(i>255)return;l++}c[d]=256*c[d]+i,2!=++r&&4!=r||d++}if(4!=r)return;break}if(":"==h()){if(l++,!h())return}else if(h())return;c[d++]=t}else{if(null!==u)return;l++,u=++d}}if(null!==u)for(s=d-u,d=7;0!=d&&s>0;)o=c[d],c[d--]=c[u+s-1],c[u+--s]=o;else if(8!=d)return;return c}(ux(e,1,-1)),!t)return fx;this.host=t}else if(this.isSpecial()){if(e=NE(e),nx(kx,e))return fx;if(t=function(e){var t,n,r,i,a,s,o,c=dx(e,".");if(c.length&&""==c[c.length-1]&&c.length--,(t=c.length)>4)return e;for(n=[],r=0;r<t;r++){if(""==(i=c[r]))return e;if(a=10,i.length>1&&"0"==tx(i,0)&&(a=nx(bx,i)?16:8,i=ux(i,8==a?1:2)),""===i)s=0;else{if(!nx(10==a?yx:8==a?_x:wx,i))return e;s=ZE(i,a)}sx(n,s)}for(r=0;r<t;r++)if(s=n[r],r==t-1){if(s>=ex(256,5-t))return null}else if(s>255)return null;for(o=ax(n),r=0;r<n.length;r++)o+=n[r]*ex(256,3-r);return o}(e),null===t)return fx;this.host=t}else{if(nx(Ex,e))return fx;for(t="",n=ME(e),r=0;r<n.length;r++)t+=Px(n[r],Tx);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return LE(Bx,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"==this.scheme&&1==t&&Lx(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,c=e.fragment,d=t+":";return null!==i?(d+="//",e.includesCredentials()&&(d+=n+(r?":"+r:"")+"@"),d+=Rx(i),null!==a&&(d+=":"+a)):"file"==t&&(d+="//"),d+=e.cannotBeABaseURL?s[0]:s.length?"/"+rx(s,"/"):"",null!==o&&(d+="?"+o),null!==c&&(d+="#"+c),d},setHref:function(e){var t=this.parse(e);if(t)throw XE(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"==e)try{return new sD(e.path[0]).origin}catch(e){return"null"}return"file"!=e&&this.isSpecial()?e+"://"+Rx(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(GE(e)+":",Fx)},getUsername:function(){return this.username},setUsername:function(e){var t=ME(GE(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var n=0;n<t.length;n++)this.username+=Px(t[n],Ox)}},getPassword:function(){return this.password},setPassword:function(e){var t=ME(GE(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var n=0;n<t.length;n++)this.password+=Px(t[n],Ox)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?Rx(e):Rx(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,Kx)},getHostname:function(){var e=this.host;return null===e?"":Rx(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,Yx)},getPort:function(){var e=this.port;return null===e?"":GE(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""==(e=GE(e))?this.port=null:this.parse(e,Jx))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+rx(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,eD))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""==(e=GE(e))?this.query=null:("?"==tx(e,0)&&(e=ux(e,1)),this.query="",this.parse(e,rD)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!=(e=GE(e))?("#"==tx(e,0)&&(e=ux(e,1)),this.fragment="",this.parse(e,iD)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var sD=function(e){var t=BE(this,oD),n=HE(arguments.length,1)>1?arguments[1]:void 0,r=zE(t,new aD(e,!1,n));SE||(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())},oD=sD.prototype,cD=function(e,t){return{get:function(){return WE(this)[e]()},set:t&&function(e){return WE(this)[t](e)},configurable:!0,enumerable:!0}};if(SE&&(PE(oD,"href",cD("serialize","setHref")),PE(oD,"origin",cD("getOrigin")),PE(oD,"protocol",cD("getProtocol","setProtocol")),PE(oD,"username",cD("getUsername","setUsername")),PE(oD,"password",cD("getPassword","setPassword")),PE(oD,"host",cD("getHost","setHost")),PE(oD,"hostname",cD("getHostname","setHostname")),PE(oD,"port",cD("getPort","setPort")),PE(oD,"pathname",cD("getPathname","setPathname")),PE(oD,"search",cD("getSearch","setSearch")),PE(oD,"searchParams",cD("getSearchParams")),PE(oD,"hash",cD("getHash","setHash"))),OE(oD,"toJSON",(function(){return WE(this).serialize()}),{enumerable:!0}),OE(oD,"toString",(function(){return WE(this).serialize()}),{enumerable:!0}),JE){var dD=JE.createObjectURL,uD=JE.revokeObjectURL;dD&&OE(sD,"createObjectURL",CE(dD,JE)),uD&&OE(sD,"revokeObjectURL",CE(uD,JE))}qE(sD,"URL"),DE({global:!0,constructor:!0,forced:!RE,sham:!SE},{URL:sD});var lD=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}(),hD=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}(),pD=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}(),fD=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}(),mD=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}(),gD=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}(),AD=function(e){if(!e)return!1;var t=vD.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)},vD=Object.prototype.toString;function bD(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 _D(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?bD(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bD(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function yD(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 wD,kD="13998",ED="_cc".concat(kD),xD=["https://tags.crwdcntrl.net/c/".concat(kD,"/cc.js?ns=").concat(ED)],DD=function(){return!!wD&&"function"==typeof wD.bcpf&&"function"==typeof wD.add},SD=function(e,t){try{if(!DD())return;wD.add(e,t),"lotame add success ".concat(e," ").concat(t)}catch(e){err}},RD=function(e,t){try{if(!DD())return;wD.bcpw(e,t),"lotame send success ".concat(e," ").concat(t)}catch(e){}},TD=function(e){var n=this;try{SD("act","play"),SD("med","game"),"complete"===document.readyState?wD.bcpf():wD.bcp(),e.tags.forEach(function(e){t(this,n),RD("int","tags : ".concat(e.title.toLowerCase()))}.bind(this)),RD("int","category : ".concat(e.category.toLowerCase()))}catch(e){}},CD=function(){window.addEventListener("load",(function(){cw.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!=pb&&pb.noLotamePageView,!e.t0){e.next=7;break}return e.next=6,gw();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(xD[0],"LOTCC_".concat(kD),{alternates:xD});case 16:"object"===n(window[ED])&&(wD=window[ED]),DD()&&TD(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)}}())}))},ID=function(){RD("genp","ad video"),RD("act","ad impression")},OD=function(){RD("act","ad skipped")},PD=function(){RD("act","ad click")},BD=function(){RD("act","ad complete")},LD=new Ry,UD={preroll:"game-start-video",midroll:"mid-level-video",rewarded:"rewarded-video"},MD=function(e,n){var r=this,i=function(e,t){var n=LD.get("partner.url.value"),r=UD[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)},FD=(new Ry).get("partner.domain.value"),jD=["latimes.com"],ND={exist:function(e){var n=this;return"Softgames-Azerion"===e.dname&&jD.some(function(e){return t(this,n),e===FD}.bind(this))},get:function(e,t){return function(e,t){return{"latimes.com":function(){var n=t.slug;return MD(n,e)}}[FD](e)}(e,t)}},GD=function(){var e=(new Ry).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},qD=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 c=document.createElement("div");c.id="gd__spinner__overlay",c.classList.add("gd__spinner__overlay"),c.appendChild(this.adSpinnerContainer),this.adSpinnerOverlay=c,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 HD(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 QD(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?HD(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):HD(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var VD=new M,zD=null,WD=function(){function n(e,r,i){var a=this;if(R(this,n),zD)return zD;zD=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,c=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:c,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,c,d,u,l,p,w,k,E,x,D,O,P,B,L,M,q,H,Q,V,z;return S(n,[{key:"start",value:(z=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 z.apply(this,arguments)})},{key:"adSystemInitialize",value:(V=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 V.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:(Q=e(r.mark((function e(t){var n,i,a,s,o,c,d,u,l,h,p,f;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.adType,i=t.options,e.prev=1,o=null===(a=this.gameData.adflw)||void 0===a||null===(s=a.adapterConfig)||void 0===s?void 0:s.spil,c=this.nextAdPosition(n),e.next=6,this._create_dp_context(c,i);case 6:return d=e.sent,o?(this.gameData,u=o[c]||o.default||this._getDefaultSpilAdapterConfig()):u=this._getDefaultSpilAdapterConfig(),l=100*d.floor_price,d.floor_price,h=this._createCustomAdVastUrl(u,{tnl_keys:{floor_price:l}}),p=h.url,f={url:p,dp:d,hl:{bidFloorApplied:!0}},e.abrupt("return",f);case 17:e.prev=17,e.t0=e.catch(1),console.log("spil-adaptor: Error on getting spil",e.t0);case 20:case"end":return e.stop()}}),e,this,[[1,17]])}))),function(e){return Q.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,c,d,u,l,h,p,f,g=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")||GD().useTestAds)){e.next=6;break}return o=a.IMASampleTags[n],c=Math.floor(Math.random()*o.length),d=o[c],s({url:d,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,us("gd-adflow, before idhb",u,h),f=window.idhb.getAdserverTargetingForAdSlot(h),window.idhb.setAdserverTargeting(QD(QD({},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,g),!p||null!=n&&n.bidFloorApplied||fetch(p.skip_url).catch(function(e){t(this,r)}.bind(this));var i={src:"hl",tnl_keys:QD(QD({},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===g.Rewarded)return this.adRewardedCount++,"rewarded";if(e===g.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===g.Rewarded?"rewarded":e===g.Interstitial?!1===this.gameData.preroll||1===this.adPrerollCount||this.adMidrollCount>0?"midroll":"preroll":"midroll"}},{key:"getCurrentAdPosition",value:function(e){return e===g.Interstitial?1===this.adPrerollCount&&0===this.adMidrollCount?"preroll":"midroll":e===g.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,c=null==e||null===(s=e.tnl_keys)||void 0===s?void 0:s.tnl_ad_pos;this.adSuccess=!1,this.contentPaused=!1;var d=new google.ima.AdsRequest,u=this._transformVast(e,n),l=QD(QD({},n),{},{adTag:u,tnl_ad_pos:c});this.adCounter[c]=this.adCounter[c]||0,this.adCounter[c]++;var h=e.dp,p=e.hl;this.current_dp=h,h&&!u.bidder&&(h.adtag_url=u.url);var f=this._isVMAP(c);(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)d.adTagUrl=m;else if(f){var g=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=_D(_D({},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=_D(_D({},s.query),i)),t.push(s.toString())}for(var o=Date.now(),c=1;c<=t.length;c++){var d,u,l,h;n+='<vmap:AdBreak timeOffset="start" breakType="linear" breakId="break-'.concat(c,'">\n <vmap:AdSource id="').concat(o++,'" allowMultipleAds="false" followRedirects="true">\n ').concat(yD({id:o++,adtag_url:t[c-1],error_url:null===(d=e[c-1].dp)||void 0===d?void 0:d.error_url,impression_url:null===(u=e[c-1].dp)||void 0===u?void 0:u.impression_url,fallback_url:null===(l=e[c-1].dp)||void 0===l?void 0:l.fallback_url,fallback_imp_url:null===(h=e[c-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(c)}));d.adsResponse=g}else if(h&&p.bidFloorApplied){h.adtag_url||(h.adtag_url=u.url);var A=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);d.adsResponse=A}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);d.adsResponse=v}else d.adTagUrl=u.url;d.linearAdSlotWidth=this.options.width,d.linearAdSlotHeight=this.options.height,d.nonLinearAdSlotWidth=this.options.width,d.nonLinearAdSlotHeight=this.options.height,d.forceNonLinearFullSlot=!0,this.options.vast_load_timeout&&(d.vastLoadTimeout=this.options.vast_load_timeout),d.setAdWillAutoPlay(n.autoplayAllowed),d.setAdWillPlayMuted(n.autoplayRequiresMute),this.adsLoader.requestAds(d,l);try{this._broadcast("AD_SDK_REQUEST",{message:l})}catch(e){}i(d)}catch(e){throw new Error(e)}}.bind(this))}},{key:"_getExternalVast",value:function(e){var t;try{var n=this.getCurrentAdPosition(e);t=ND.exist(this.gameData)&&ND.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:(H=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 H.apply(this,arguments)})},{key:"_initDisplayContainerWithAutoPlay",value:(q=e(r.mark((function e(){var t;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._checkAutoPlay(!1);case 2:return t=e.sent,this._autoplay=t,this.video_ad_player.autoplay=t.autoplayAllowed,this.video_ad_player.volume=t.autoplayRequiresMute?0:1,this.video_ad_player.muted=!!t.autoplayRequiresMute,t.adDisplayContainerInitialized||(this.adDisplayContainer.initialize(),this.adDisplayContainerInitialized=!0),e.abrupt("return",t);case 9:case"end":return e.stop()}}),e,this)}))),function(){return q.apply(this,arguments)})},{key:"startAd",value:(M=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=QD(QD({},s),{},{adType:a}),null!==(i=this.gameData.adspn)&&void 0!==i&&i.enabled&&(this.adFlowProcessSpinner||(this.adFlowProcessSpinner=new qD,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!==g.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!==g.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!==g.Interstitial){e.next=37;break}return e.abrupt("return",this._startInterstitialAd(s));case 37:if(a!==g.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 M.apply(this,arguments)})},{key:"_startOpusAd",value:(L=e(r.mark((function e(n){var i,a,s,o,c,d,u,l,h,p,f,m,g,A,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,c=this.gameData,d=c.gameId,u=c.slug,l=c.title,h={assetId:d,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),g=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),A=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:A},"reward"===a&&(v=QD(QD({},v),{},{adDismissed:m,adViewed:g})),this.opusEventReceived=!1,this._startTimeoutForOpus(),s&&s(v);case 31:case"end":return e.stop()}}),e,this)}))),function(e){return L.apply(this,arguments)})},{key:"preloadAd",value:(B=e(r.mark((function e(t){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t!==g.Interstitial){e.next=4;break}return e.abrupt("return","gdsdk://preloaded");case 4:if(t!==g.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 B.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 hD(this.adContainer,n),this.adResume.add(),this.rewardedLabel=new pD(this.adContainer,n),this.rewardedLabel.add(),this.skipAdButton=new fD(this.adContainer,n,r),this.skipAdButton.add(),this.audioAdLabel=new mD(window.document.body),this.audioAdLabel.add(),this.audioAdLabel.hide()}catch(e){console.log("error on adding adResume",e)}}},{key:"loadDisplayAd",value:(P=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,c,d,u,l,h,p,f,m,g=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:try{(c=i?i.containerId:null)||s("Container id is not specified"),d=document.getElementById(c),document.getElementById(c)||s("No container is found with this id - ".concat(c)),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(c),document.getElementById(u)||(l="\n .gd__banner{\n z-index: ".concat(A.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)),d.appendChild(h)),(p=document.createElement("div")).id=u,p.classList.add("gd__banner"),d.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:[d.offsetWidth,d.offsetHeight]},window.idhb.requestAds({slots:m,callback:function(e){t(this,g),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 P.apply(this,arguments)})},{key:"_startInterstitialAd",value:(O=e(r.mark((function e(n){var i,a,s,o,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),hs.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(QD(QD({},a),n));case 13:if(s=e.sent,o=s.success,s.args,o){e.next=18;break}return e.abrupt("return");case 18:a.autoplayRequiresMute&&this.adsManager.setVolume(0),!0===(null===(i=this.gameData.advlm)||void 0===i?void 0:i.mode)&&this.adsManager.setVolume(1),this.adsManager.init(this.options.width,this.options.height,google.ima.ViewMode.NORMAL),this.adsManager.start(),e.next=29;break;case 24:throw e.prev=24,e.t0=e.catch(0),e.t0,this._onError(e.t0),e.t0;case 29:case"end":return e.stop()}}),e,this,[[0,24]])}))),function(e){return O.apply(this,arguments)})},{key:"_startPromo",value:(D=e(r.mark((function e(t,n){var i,a,s,o;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(QD(QD({},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:a.autoplayRequiresMute&&this.adsManager.setVolume(0),!0===(null===(i=this.gameData.advlm)||void 0===i?void 0:i.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=28;break;case 23:throw e.prev=23,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 28:case"end":return e.stop()}}),e,this,[[0,23]])}))),function(e,t){return D.apply(this,arguments)})},{key:"_loadPromo",value:(x=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,QD({adType:g.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 x.apply(this,arguments)})},{key:"_loadInterstitialAd",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.preloadedInterstitialAdVast,e.t0){e.next=7;break}return e.next=6,this._getAdVast(g.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,QD({adType:g.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 E.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:(k=e(r.mark((function e(n){var i,a,s,o,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),hs.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(QD(QD({},a),n));case 13:if(s=e.sent,o=s.success,s.args,o){e.next=18;break}return e.abrupt("return");case 18:a.autoplayRequiresMute&&this.adsManager.setVolume(0),!0===(null===(i=this.gameData.advlm)||void 0===i?void 0:i.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 24:throw e.prev=24,e.t0=e.catch(0),this._onError(e.t0),e.t0;case 28:case"end":return e.stop()}}),e,this,[[0,24]])}))),function(e){return k.apply(this,arguments)})},{key:"_loadRewardedAd",value:(w=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(g.Rewarded,t);case 6:e.t0=e.sent;case 7:return n=e.t0,delete this.preloadedRewardedAdVast,e.next=11,this._requestAd(n,QD({adType:g.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 w.apply(this,arguments)})},{key:"_preloadInterstitialAd",value:(p=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(g.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 p.apply(this,arguments)})},{key:"_preloadRewardedAd",value:(l=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(g.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 l.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 c,d,u=(null===(c=this._adrequest_user_context)||void 0===c||null===(d=c.adTag)||void 0===d?void 0:d.bidder)||"adx";this._broadcast("AD_BIDDER",{bidder:u}),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 gD(this.adContainer),this.t4rButton.add(),this._broadcast("AD_T4R_VIDEO")),a&&this.adsManager.setVolume(0),a&&this._broadcast("AD_T4R"),a&&setTimeout(function(){t(this,n),this.activeAdContainer.style.opacity=1,this.adsManager.setVolume(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){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(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=A.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(),c=i.getFullYear(),d="AD_SDK_MANAGER_READY";this._broadcast(d,{name:d,message:"AD SDK is ready",status:"success",analytics:{category:d,action:this.parentDomain,label:"h".concat(a," d").concat(s," m").concat(o," y").concat(c)}}),this._adrequest_user_context=e.getUserRequestContext()}},{key:"_onAdEvent",value:function(e){var n,r,i,a,s=this,o=new Date,c=o.getHours(),d=o.getDate(),u=o.getMonth(),l=o.getFullYear(),h=v(google.ima.AdEvent.Type,e.type),p=!1,f=(null==e||null===(n=e.getAd())||void 0===n?void 0:n.getContentType())||"",m=!f.startsWith("image")&&!f.startsWith("text"),A=null==e||null===(r=e.ad)||void 0===r||null===(i=r.data)||void 0===i?void 0:i.title,b=null==e||null===(a=e.getAd())||void 0===a?void 0:a.data.skippable;this._sendIMAEventsToHB(e);var _=document.getElementById("game"),y="";switch(e.type){case google.ima.AdEvent.Type.AD_BREAK_READY:y="Fired when an ad rule or a VMAP ad break would have played if autoPlayAdBreaks is false.";break;case google.ima.AdEvent.Type.AD_METADATA:y="Fired when an ads list is loaded.";break;case google.ima.AdEvent.Type.ALL_ADS_COMPLETED:this.contentPaused&&(p=!0),this.isAudioAd&&(this.audioAdLabel.hide(),this.isAudioAd=!1),this.rewardGuarantied=!1,y="Fired when the ads manager is done playing all the ads.";break;case google.ima.AdEvent.Type.CLICK:y="Fired when the ad is clicked.";var w=e.getAd().getContentType();this._show({mode:"click",contentType:w}),PD();break;case google.ima.AdEvent.Type.COMPLETE:e.getAd(),p=this._is_completed(e.getAd()),y="Fired when the ad completes playing.",this.adType_!==g.Rewarded||this.rewardGuarantied||(this._broadcast("SDK_REWARDED_WATCH_COMPLETE",{message:"",status:"success"}),this.rewardGuarantied=!0);break;case google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED:this.gameData.fllc.enabled&&(_.style.display="none"),this.contentPaused=!0,y="Fired when content should be paused. This usually happens right before an ad is about to cover the content.";break;case google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED:this.gameData.fllc.enabled&&(_.style.display="block"),y="Fired when content should be resumed. This usually happens when an ad finishes or collapses.",this.contentPaused?p=!0:(this.requestRunning=!1,this._broadcast("AD_ERROR",{message:"got resume without pause, possibly with VMAP",status:"error",skipForward:!0})),this._hideAddResume(),this._hideRewardedLabel(),this._hideSkipButton(),this.t4rButton&&this.t4rButton.hide();break;case google.ima.AdEvent.Type.DURATION_CHANGE:y="Fired when the ad's duration changes.";break;case google.ima.AdEvent.Type.FIRST_QUARTILE:y="Fired when the ad playhead crosses first quartile.";var k=e.getAd().getContentType();this._show({mode:"first_quartile",contentType:k});break;case google.ima.AdEvent.Type.IMPRESSION:y="Fired when the impression URL has been pinged.",e.getAd(),console.log("gdsdk: eventname IMPRESSION",this.isAudioAd),this._hideAdSpinner(),this.isAudioAd&&this.audioAdLabel.show();break;case google.ima.AdEvent.Type.INTERACTION:y="Fired when an ad triggers the interaction callback. Ad interactions contain an interaction ID string in the ad data.";break;case google.ima.AdEvent.Type.LINEAR_CHANGED:y="Fired when the displayed ad changes from linear to nonlinear, or vice versa.";break;case google.ima.AdEvent.Type.LOADED:var E=e.getAd().getContentType();y=E,this._show({mode:"loaded",contentType:E});break;case google.ima.AdEvent.Type.LOG:e.getAdData().adError&&(y=e.getAdData());break;case google.ima.AdEvent.Type.MIDPOINT:y="Fired when the ad playhead crosses midpoint.";break;case google.ima.AdEvent.Type.PAUSED:m&&"VPAID"!==A&&this.adResume.show(),y="Fired when the ad is paused.";break;case google.ima.AdEvent.Type.RESUMED:y="Fired when the ad is resumed.",m&&(this.adResume.hide(),this.rewardedLabel.hide());break;case google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED:y="Fired when the displayed ads skippable state is changed.";break;case google.ima.AdEvent.Type.SKIPPED:p=this._is_completed(e.getAd()),y="Fired when the ad is skipped by the user.",OD(),this.t4rButton&&this.t4rButton.hide();break;case google.ima.AdEvent.Type.STARTED:var x;if(this.adType_===g.Rewarded)!b&&null!==(x=this.gameData.rwskp)&&void 0!==x&&x.enabled&&setTimeout(function(){t(this,s),this.skipAdButton.show(),this._broadcast("SDK_REWARDED_WATCH_COMPLETE",{message:"",status:"success"}),this.rewardGuarantied=!0}.bind(this),3e4),this.rewardedLabel.show();this._hideAddResume(),y="Fired when the ad starts playing.";break;case google.ima.AdEvent.Type.THIRD_QUARTILE:y="Fired when the ad playhead crosses third quartile.";break;case google.ima.AdEvent.Type.USER_CLOSE:p=this._is_completed(e.getAd()),y="Fired when the ad is closed by the user.";break;case google.ima.AdEvent.Type.VOLUME_CHANGED:y="Fired when the ad volume has changed.";break;case google.ima.AdEvent.Type.VOLUME_MUTED:y="Fired when the ad volume has been muted."}if(""!==h&&""!==y){var D=!this.contentPaused&&e.type===google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,S=!this.contentPaused&&e.type===google.ima.AdEvent.Type.ALL_ADS_COMPLETED;D||S||this.isAudioAd||this._broadcast(h,{name:h,message:y,status:"success",analytics:{category:h,action:this.parentDomain,label:"h".concat(c," d").concat(d," m").concat(u," y").concat(l)}})}if(p&&!this.adSuccess){this.adSuccess=!0;var R=e.getAd(),T="Rainbow"===(null==R?void 0:R.getAdSystem())&&(null==R?void 0:R.getWrapperAdIds().some(function(e){return t(this,s),"promo"===e}.bind(this)));null==R||R.getAdSystem(),null==R||R.getWrapperAdIds(),this._broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success",isPromoSuccess:T}),this.resetForNext(e)}}},{key:"_run_atom_tag_aws_test",value:function(e){var n=this;try{var r,i,a,s,o;if(!((null===(r=this.gameData)||void 0===r||null===(i=r.aws_tst)||void 0===i?void 0:i.enabled)&&(null===(a=this.gameData)||void 0===a||null===(s=a.aws_tst)||void 0===s||null===(o=s.ep)||void 0===o?void 0:o.atm)))return;var c=e.type,d=e.url;if("none"===c||!d)return;d=d.replace("tag.atom.gamedistribution.com","atom-tag-prod-aws.gamedistribution.com"),fetch(d).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,c=a.impression_url,d=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:c}:l&&!n?i={type:"normal_err",url:o}:p&&n?i={type:"promo_imp",url:u}:h&&n&&(i={type:"fallbacj_imp",url:d})}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);VD.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_===g.Rewarded&&this.rewardedLabel&&this.rewardedLabel.hide()}catch(e){console.log("Error on hide adResume",e)}}},{key:"_hideSkipButton",value:function(){try{this.adType_===g.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(AD(e.getInnerError)){var t=e.getInnerError();if(t)return AD(t.getErrorCode)&&AD(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||{}),QD({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 c=N.parse(s.cust_params);if(a.cust_params&&a.cust_params.$$remove){for(var d in c){new RegExp(a.cust_params.$$remove,"i").test(d)&&delete c[d]}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=c,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,s=(null===(n=this._adrequest_user_context)||void 0===n||null===(r=n.adTag)||void 0===r?void 0:r.bidder)||"adx";this.msgrt.send("bidder",{message:s}),this._adrequest_user_context,'bidder:"'.concat(s,'"');var o=(null===(i=this.gameData.t4rc)||void 0===i?void 0:i.bidder_exc)||[],c=(null===(a=this.gameData.t4rc)||void 0===a?void 0:a.bidder_inc)||[],d=!1;return c.length>0?d=!c.some(function(n){return t(this,e),n===s}.bind(this)):o.length>0&&(d=o.some(function(n){return t(this,e),n===s}.bind(this))),d}catch(e){console.log("ex_bidder ERR",e)}}},{key:"_isExcludedBidderForT4RWithBidderExcRate",value:function(){var e,t,n,r,i=this._isExcludedBidderForT4R(),a=null===(e=this.gameData)||void 0===e||null===(t=e.t4rc)||void 0===t?void 0:t.bidder_exc_rate,s=null!=a&&a.enabled?(null==a?void 0:a.rate)||.8:0,o=(null===(n=this._adrequest_user_context)||void 0===n||null===(r=n.adTag)||void 0===r?void 0:r.bidder)||"adx",c=Math.random();return i||"adx"!==o&&c<s}},{key:"_isT4R",value:function(e){var t,n,r,i,a,s,o;if(!this.gameData.publishedAt)return{success:!1,reason:"pdate-2"};var c=new Date(this.gameData.publishedAt);if(((new Date).getTime()-c.getTime())/864e5<=10)return{success:!1,reason:"pdate-1"};var d=this.gameData.meta,u=e.t4r.meta;if((null==d||null===(t=d.ast)||void 0===t?void 0:t.c)>=(null==u||null===(n=u.ast)||void 0===n?void 0:n.c)&&(null==d||null===(r=d.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,g=(null===(m=e.t4r[h])||void 0===m?void 0:m.viper)||0;if(g>0){var A,v=Math.random()<g,b=h&&v&&(null===(A=e.t4r[h])||void 0===A?void 0:A.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,o,c,d,u,l,h,p,f,m;if(!e)return!1;var g="preroll"===e&&(!0===(null===(t=this.gameData)||void 0===t||null===(n=t.pAds)||void 0===n?void 0:n.vmap)||!0===(null===(r=this.gameData)||void 0===r||null===(i=r.pAds)||void 0===i||null===(a=i.vmap)||void 0===a?void 0:a.enabled))||"midroll"===e&&(!0===(null===(s=this.gameData)||void 0===s||null===(o=s.mAds)||void 0===o?void 0:o.vmap)||!0===(null===(c=this.gameData)||void 0===c||null===(d=c.mAds)||void 0===d||null===(u=d.vmap)||void 0===u?void 0:u.enabled))||"rewarded"===e&&(!0===(null===(l=this.gameData)||void 0===l||null===(h=l.rAds)||void 0===h?void 0:h.vmap)||!0===(null===(p=this.gameData)||void 0===p||null===(f=p.rAds)||void 0===f||null===(m=f.vmap)||void 0===m?void 0:m.enabled));if(!g)return!1;var A=this._get_vmap_config(e),v=this.adCounter[e];return void 0!==(null==A?void 0:A.start)?v>=(null==A?void 0:A.start):g}},{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 c={};c.adtag=this._createCustomAdVastUrl(r["vast_"+o])||t,c.position=n,c.dp=r["vast_"+o]?void 0:i,s.push(c)}return s}},{key:"_get_vmap_config",value:function(e){var t,n,r,i,a,s,o,c;switch(e){case"preroll":return null===(t=this.gameData)||void 0===t||null===(n=t.pAds)||void 0===n?void 0:n.vmap;case"midroll":return null===(r=this.gameData)||void 0===r||null===(i=r.mAds)||void 0===i?void 0:i.vmap;case"rewarded":return null===(a=this.gameData)||void 0===a||null===(s=a.rAds)||void 0===s?void 0:s.vmap;default:return null===(o=this.gameData)||void 0===o||null===(c=o.pAds)||void 0===c?void 0:c.vmap}}},{key:"_isDP",value:function(e){var t,n,r;return!!e&&!0===(null===(t=this.gameData)||void 0===t||null===(n=t.dp)||void 0===n||null===(r=n[e])||void 0===r?void 0:r.enabled)}},{key:"_create_dp_display_context",value:function(){var e=this;return new Promise(function(n){var r=this;t(this,e);try{var i={id:this.topDomain||this.parentDomain,au:"display",ty:"display",aid:this.gameData.gameId,pgu:this.parentURL},a=new lD(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,c="https://tag.atom.gamedistribution.com/v1/rainbow/?".concat(a),d=o?c:void 0;return function(){t(this,r),hs.promoError&&(console.log("promo-test fictional promo error"),d=void 0)}.bind(this),{promo_url:d,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,c,d,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:c={id:a.topDomain||a.parentDomain,au:n||"unknown",ty:"video",aid:a.gameData.gameId,pgu:a.parentURL},(d=new lD(a.gameData).checkCustomParams())&&(c.cp=d),u=encodeURIComponent(I.encode(JSON.stringify(c))),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:(u=e(r.mark((function e(n){var i,a,s,o,c,d,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:c=b("ch",window.location.href),d=b("ch_date",window.location.href),u={tnl_content_category:this.category.toLowerCase()},c&&(u.channel=c),d&&(u.ch_date=d),(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 u.apply(this,arguments)})},{key:"_init_ima_script",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: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 d.apply(this,arguments)})},{key:"_init_afg_script",value:(c=e(r.mark((function e(n){var i,a,s,o,c=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.gameData.afg_disabled){e.next=3;break}return e.abrupt("return");case 3:return(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,c),!!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 c.apply(this,arguments)})},{key:"fixOutOfBounds",value:function(){try{if(!(this.gameData.afgszf&&this.gameData.afgszf.enabled))return;for(var e=this.gameData.afgszf,t=e.height,n=e.scrolls,r=t||"120vh",i=n||!0,a=document.getElementsByClassName("adsbygoogle"),s=0;s<a.length;s++){var o,c=a[s],d=c&&(null===(o=c.children[0])||void 0===o?void 0:o.children[0]);d&&"IFRAME"===d.tagName&&d.style.height!==r&&(d.style.height=r,i&&(d.parentElement.style.overflow="auto"))}}catch(e){"out-of-bounds error: ".concat(e.message)}}},{key:"clearSession",value:function(){this.requestRunning=!1}},{key:"_startAdsensePlacementRewardedAd",value:(o=e(r.mark((function e(n){var i,a,s,o,c,d,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),hs.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),c=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),d=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||(us("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:c,beforeReward:d,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 o.apply(this,arguments)})},{key:"_startAdsensePlacementPreroll",value:(s=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),hs.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 s.apply(this,arguments)})},{key:"_startAdsensePlacementStart",value:(a=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),hs.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 a.apply(this,arguments)})},{key:"_startTimeoutForAdBreak",value:function(e){var n,r,i,a,s,o,c=this;if(null===(n=this.gameData)||void 0===n||null===(r=n.ad_blcks)||void 0===r||null===(i=r.adsenseTimeout)||void 0===i?void 0:i.enabled){null==e||e.adType,null===(a=this.gameData)||void 0===a||null===(s=a.ad_blcks)||void 0===s||null===(o=s.adsenseTimeout)||void 0===o||o.timeout;var d=setTimeout(function(){t(this,c),this.adPlacementEventReceived||(this._broadcast("AD_ERROR",{message:"timeout-_startTimeoutForAdBreak",status:"error"}),this.adPlacementEventReceived=!1,this.requestRunning=!1),clearTimeout(d)}.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:(i=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),hs.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 i.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 Ry).get();return n=QD(QD({},n),r),n=t?QD(QD({},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===g.Rewarded)t="reward";else if(n===g.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,QD(QD({},n),{},{skipForward:i,adPosition:a}))}}]),n}(),KD=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,XA(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",c=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:c},YA(this.moduleName,this.moduleConfig)})),YD=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,XA(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",c=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:c},YA(this.moduleName,this.moduleConfig)})),JD=function(e,t){console.log(e,t)},XD={},ZD={},$D=null;function eS(){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 XD.version=r,XD.frame=e,XD.function=n,XD.version}function tS(e){var n=this;return $D||($D=new Promise(function(r){function i(t,n){if(JD("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:XD,consentData:i}),void r({result:"ok",consentData:t})):void 0;r({result:"ok",consentData:t})}else r({result:"cmpCallFailed"})}t(this,n),eS(),XD.frame?2===XD.version?(JD("TCF v2 CMP found. Fetching the consent."),XD.function?(JD("CMP API is directly accessible, calling it now..."),XD.function("addEventListener",XD.version,i)):(JD("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!==ZD[r.callId]&&ZD[r.callId](r.returnValue,r.success)}}window[a]=function(e,r,s,o){t(this,i);var c=Math.random()+"",d="".concat(a,"Call"),u=T({},d,{command:e,parameter:o,callId:c,version:r});ZD[c]=s,n.postMessage(u,"*")}.bind(this),window.addEventListener("message",s,!1),window[a](e,XD.version,r)}("addEventListener",XD.frame,i))):r({result:"cmpVersionNotV2",cmp:XD}):r({result:"cmpNotFound"})}.bind(this)),$D)}var nS=new(function(){function t(){R(this,t),this.productName="Game Distribution"}var n;return S(t,[{key:"checkIfExcluded",value:function(e){try{var t,n;return!(null===(t=e.diagnostic)||void 0===t||null===(n=t.gameDock)||void 0===n||!n.excluded)}catch(e){return console.log("Error on checkIfExclude check",e),!1}}},{key:"track",value:(n=e(r.mark((function e(t,n){var i,a,s,o,c,d,u;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.checkIfExcluded(n)){e.next=3;break}return e.abrupt("return");case 3:if(s=null==t||null===(i=t.visitor)||void 0===i||null===(a=i.visitorData)||void 0===a?void 0:a.visitorId){e.next=6;break}return e.abrupt("return");case 6:return o=encodeURIComponent(this.productName),c=encodeURIComponent(s),e.prev=8,d="https://tracker-v4.gamedock.io/v1/events-tracker/track/product/".concat(o,"/user_id/").concat(c),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,u="https://tracker.gamedock.io/v1/events-tracker/track/product/".concat(o,"/user_id/").concat(c),e.next=22,fetch(u,{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 rS(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 iS(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 iS(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 iS(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 aS=function(e){var n=this,r=e.src,i=e.attributes,a=e.target,s=e.isAsync;return new Promise(function(e,o){var c=this;t(this,n);try{var d=document.createElement("script");if(d.async=null==s||s,d.type="text/javascript",d.onload=function(){t(this,c),e()}.bind(this),d.onerror=function(){t(this,c);var e="Error on script load, Error: ".concat(r);console.log(e),o(e)}.bind(this),d.src=r,i){var u,l=rS(i);try{for(l.s();!(u=l.n()).done;){var h=u.value,p=h.key,f=h.value;d.setAttribute(p,f)}}catch(e){l.e(e)}finally{l.f()}}a||(a=document.head),a.appendChild(d)}catch(e){var m="Error on script load catch, Error: ".concat(r);console.log(m,e),o(m)}}.bind(this))},sS="ffd4774b-99ae-4464-8f40-3afa12b4692e",oS=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,aS({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,aS({src:"https://cdn.cookielaw.org/consent/".concat(sS,"/OtAutoBlock.js"),attributes:[{key:"id",value:"gd-cookie-pro-autoblock"}],isAsync:!1});case 5:return e.next=7,aS({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:sS}],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)}}(),cS=new M,dS={"https://games.softgames.com":{"splash-hidden":"splash-hidden"},"https://sg.gamedistribution.com":{"splash-hidden":"splash-hidden"},"https://html5.gamedistribution.com":{key:"value"}},uS=!1;function lS(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(dS).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)&&(uS=!0),i&&uS&&(uS=!1,window.parent.postMessage({type:"sg-game-event",eventName:"levelFinish",data:{score:100}},"*"))}}(r);var o=function(){t(this,n);try{var r,i;return null==e||null===(r=e.source)||void 0===r||null===(i=r.location)||void 0===i?void 0:i.href}catch(e){}}.bind(this);if(window.parent&&s){if("https://html5.gamedistribution.com"===i){var c=o();if(!c)return;var d=c&&["9555f04e1900482aaaef710cd2f8c440"].some(function(e){return t(this,n),c.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(!d&&!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=dS[i][a];p&&cS.emit(p,r)}}}),!1);var hS="__msgr",pS=q(),fS=function(e){var n=this;if(!window[hS]){var r=document.createElement("iframe");if(r.src="https://static.gamedistribution.com/message/index.html",r.style.display="none",r.name=hS,document.body.appendChild(r),window!==window.top){var i={gameId:e.gameId,target:e.evnts.domain,token:pS,event_name:"TokenGenerated",timestamp:Date.now()};r.onload=function(){AS(i)},setInterval(function(){t(this,n),i.timestamp=Date.now(),i.event_name="Heartbeat",AS(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?lS(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lS(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e.data);if(!r.event_name)return;r.token=pS,AS(r)}catch(e){console.error("GD Messager Error",e.message)}}.bind(this),!1)},mS=function(e){try{var t={gameId:e.game.gameId,target:e.game.evnts.domain,event_name:e.event,timestamp:Date.now()},n=gS(window);n!==window.top&&(null==n||n.postMessage(t,"https://html5.gamedistribution.com"))}catch(e){}},gS=function e(t){try{var n,r,i=null==t?void 0:t.parent;if("game"===(null===(n=i.document)||void 0===n||null===(r=n.activeElement)||void 0===r?void 0:r.id))return i;e(i)}catch(e){return t}},AS=function(e){try{window[hS]&&window[hS].postMessage(e,"*")}catch(e){console.log("GD Messager initialization, please wait....")}},vS=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,c=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,c);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}(),bS=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}(),_S=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 bS,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 yS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function wS(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?yS(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yS(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var kS="_gd_vs";function ES(e){return xS.apply(this,arguments)}function xS(){return xS=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,RS({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,DS({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",wS(wS({},a),{},{errors:s}));case 25:case"end":return e.stop()}}),e,null,[[3,9],[14,20]])}))),xS.apply(this,arguments)}function DS(e){return SS.apply(this,arguments)}function SS(){return SS=e(r.mark((function e(t){var n,i,a,s,o,c;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.gameId,i=t.serverDate,s=new _S({mode:a="local-storage"}),e.next=5,s.get(kS);case 5:return(o=e.sent)||(o={gids:{}}),o.gids[n]||(o.gids[n]={fv:i,vc:0}),(c=o.gids[n]).vc++,c.lv=i,e.next=13,s.set(kS,o);case 13:return e.abrupt("return",{visit:c,mode:a});case 14:case"end":return e.stop()}}),e)}))),SS.apply(this,arguments)}function RS(e){return TS.apply(this,arguments)}function TS(){return TS=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 _S({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)}))),TS.apply(this,arguments)}function CS(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 IS(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?CS(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):CS(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var OS,PS,BS,LS=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)}}(),US=0,MS=function(){var n=e(r.mark((function n(i){var a,s,o,c,d=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,LS();case 12:PS=q(),c={json:JSON.stringify(a)},"wss://ws.gamedistribution.com",(OS=io("wss://ws.gamedistribution.com",{query:c,upgrade:!1,transports:["websocket"],reconnectionDelay:6e4,autoConnect:!1})).on("connect",function(){t(this,d)}.bind(this)),OS.on("after-connect",function(){var t=e(r.mark((function e(t){var n,i,s,o,c,d;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return BS=BS||(null==t?void 0:t.serverDate),n=a.gameId,e.next=4,ES({gameId:n,serverDate:BS});case 4:i=e.sent,s=i.visit,o=i.mode,c=i.errors,a.visit=IS(IS({},s),{},{stm:o,errors:c}),d={json:JSON.stringify(a)},OS.emit("client-info",{clientId:PS,counter:US++,serverDate:BS,query:d});case 11:case"end":return e.stop()}}),e)})));return function(e){return t.apply(this,arguments)}}()),OS.on("disconnect",function(e){t(this,d)}.bind(this)),OS.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)}}(),FS=!1;function jS(e,t){try{if("play"===e){if(FS)return;FS=!0}if(OS){var n={json:JSON.stringify(t||{})};OS.emit("socket-event",{topic:e,clientId:PS,counter:US,serverDate:BS,query:n})}}catch(e){console.log("Error on sending socket-event",e.message)}}function NS(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 GS(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?NS(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):NS(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function qS(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 QS,VS=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)}var i,a;return S(n,[{key:"runAdFlow",value:(a=e(r.mark((function e(n){var i,a,s,o,c,d,u,l,h,p,f,m,g,A,v,b,_,y,w,k,E,x,D,S,R,C,I,O,P,B,L,U,M,F,j,N,G,q,H,Q,V,z,W,K,Y,J,X,Z,$,ee,te,ne,re=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.adRequest=n,l=this._getAdTypeByAfgPosition(n),n.params.adTypeFound=l,n.params.position,(h=this._getAdFlow(l)).find(function(e){return t(this,re),"opus"===e}.bind(this))&&!this.isOpusReady()&&(h=h.filter(function(e){return t(this,re),"opus"!==e}.bind(this)),this._msgrt.send("opus.sdk",{message:"Not ready"})),p=this._gameData,f=p.afg_disabled,m=null===(i=n.params)||void 0===i?void 0:i.isGift,g=null===(a=n.params)||void 0===a?void 0:a.isMidrollPlus,null===(s=n.params)||void 0===s||s.position,A=null===(o=p.promo)||void 0===o?void 0:o.rainbow,v=(null==A?void 0:A.enabled)&&(null===(c=A.position)||void 0===c?void 0:c[l]),b=null==A?void 0:A.gift,_=v&&null!=A&&A.duration?null==A?void 0:A.duration:5,y=f?h.filter(function(e){return t(this,re),"adsense"!==e}.bind(this)):h,w=this.get_ad_system_init_result(),k=w.afg,E=w.ima,x=null==p||null===(d=p.ad_blcks)||void 0===d||null===(u=d.removeOtherAdaptors)||void 0===u?void 0:u.enabled,this.anyAdBlocking=!k||!E,this.bothAdBlocking=!k&&!E,this.adsBlocked=x&&this.anyAdBlocking||this.bothAdBlocking,this.adsBlocked?(us("gd-adflow adsBlocked so changing the flow"),y=[]):(k||(y=y.filter(function(e){return t(this,re),"adsense"!==e}.bind(this))),E||(y=y.filter(function(e){return t(this,re),"ima"!==e}.bind(this)))),D=!1,S=!1,R=[],C=0,I=!1,P={},B=qS(y),e.prev=33,B.s();case 35:if((L=B.n()).done){e.next=77;break}return U=L.value,n.params.adapter=U,M=C===y.length-1,F=m&&b||!m,j=M&&v&&F,n.params=GS(GS({},n.params),{},{adapterIndex:C,isLastAdapter:M,shouldFail:!1,extraPromoRunOnFail:j}),function(){t(this,re),hs.firstSuccessOrder&&!isNaN(hs.firstSuccessOrder)&&(n.params.shouldFail=C<hs.firstSuccessOrder)}.bind(this),us("gd-adflow, before adInvoke",C,U,n.params.shouldFail),e.next=46,this.adInvoke(n);case 46:if(N=e.sent,G=N.success,q=N.args,H=N.isSkipped,Q=N.noVast,V=N.t4r,z=null==q?void 0:q.reason,W=null==q?void 0:q.message,K=null==q?void 0:q.errorType,P[U]=P[U]||{req:0,imp:0,fail:0},P[U].req++,G?P[U].imp++:(P[U].fail++,P[U].failReason=z,P[U].failMessage=W,P[U].failType=K),!G){e.next=66;break}return us("gd-adflow, adapter-result-success",C,U,q,V),D=!0,S=!(null==q||!q.isPromoSuccess),O=V,e.abrupt("break",77);case 66:if(us("gd-adflow, adapter-result-failure",C,U,q.message),C++,R.push(q.message),!H){e.next=71;break}return e.abrupt("break",77);case 71:if(!Q){e.next=74;break}return this._runAutoResume(),e.abrupt("break",77);case 74:I=j;case 75:e.next=35;break;case 77:e.next=82;break;case 79:e.prev=79,e.t0=e.catch(33),B.e(e.t0);case 82:return e.prev=82,B.f(),e.finish(82);case 85:if(!I){e.next=91;break}return e.next=88,new vS(this).run({duration:_});case 88:e.sent.success&&(S=!0);case 91:return function(){var e;t(this,re),hs.disableGift&&null!==(e=p.gft)&&void 0!==e&&e[l].enabled&&(p.gft[l].enabled=!1)}.bind(this),Y=R.join(" /n"),D?(this._setAdRequestTimer(),this._onResumeGame("Advertisement(s) are done. Start / resume the game.","success"),this._giveGift(l),"midroll"===l&&this._executeMidrollPlus()):(this._onResumeGame(Y,"warning"),this._giveGift(l),"midroll"===l&&this._executeMidrollPlus()),J="-1",X="none",D?(J="index_".concat(C),X=y[C]):S&&(J="promo",X="promo"),Z=this.get_session_id(),this.anyAdBlocking&&"-1"===J?($="rewarded"===l?"rewarded":this.blockedAdsMap.preroll?"midroll":"preroll",this.blockedAdsMap[$]=this.blockedAdsMap[$]?this.blockedAdsMap[$]+1:1,JSON.stringify(this.blockedAdsMap),this._msgrt.send("adflow.blocked.pos",{message:"".concat($)}),this.send_atom_event("gd.adflow",{adBlocker:!0,afgBlocked:!k,imaBlocked:!E,isGift:m,isMidrollPlus:g,adType:$,sessionId:Z,successAdapter:"none",adFlowIndex:J,adapterResults:P})):(T(ee={},"adflow.all.index",{message:"".concat(J)}),T(ee,"adflow.all.success_adapter",{message:"".concat(X)}),T(ee,"adflow.".concat(l,".index"),{message:"".concat(J)}),T(ee,"adflow.".concat(l,".success_adapter"),{message:"".concat(X)}),te=ee,Object.keys(te).forEach(function(e){t(this,re);var n=te[e];this._msgrt.send(e,n)}.bind(this)),this.send_atom_event("gd.adflow",{adFlowIndex:J,successAdapter:X,adBlocker:!1,afgBlocked:!k,imaBlocked:!E,isGift:m,isMidrollPlus:g,adType:l,sessionId:Z,t4r:O,adapterResults:P}),jS("ad-session",{adSession:{adType:l,imp:"-1"!==J&&"promo"!==J,promo:"promo"===J,blocked:this.anyAdBlocking&&"-1"===J}})),ne={adType:l},this.eventBus.broadcast("AD_FLOW_COMPLETE",ne),e.abrupt("return",ne);case 106:case"end":return e.stop()}}),e,this,[[33,79,82,85]])}))),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,c,d,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),c={},d=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:c})}.bind(this),a._eventBus.subscribe("AD_ERROR",d,o),a._eventBus.subscribe("AD_SDK_CANCELED",d,o),a._eventBus.subscribe("AD_SUCCESS",u,o),a._eventBus.subscribe("AD_T4R",function(){t(this,l),c.loaded=!0}.bind(this),o),a._eventBus.subscribe("AD_T4R_CLICK",function(){t(this,l),c.t4rClick=!0}.bind(this),o),a._eventBus.subscribe("AD_T4R_VIDEO",function(){t(this,l),c.t4rVideo=!0}.bind(this),o),a._eventBus.subscribe("AD_CLICK",function(){t(this,l),c.click=!0}.bind(this),o),a._eventBus.subscribe("AD_BIDDER",function(e){t(this,l),c.bidder=null==e?void 0:e.bidder}.bind(this),o),a._eventBus.subscribe("AD_T4R_NONE",function(e){t(this,l),c.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,o,c,d,u=this,l=void function(){if(t(this,u),hs.customAdFlow)return JSON.parse(hs.customAdFlow)}.bind(this),h=this._gameData.adflw;l&&(h=l);var p=null!==(n=h)&&void 0!==n&&null!==(r=n.adapters)&&void 0!==r&&r.default?null===(i=h)||void 0===i||null===(a=i.adapters)||void 0===a?void 0:a.default:["ima","adsense"];return p=null!==(s=h)&&void 0!==s&&null!==(o=s.adapters)&&void 0!==o&&o[e]?null===(c=h)||void 0===c||null===(d=c.adapters)||void 0===d?void 0:d[e]:p}}]),n}(),zS=new M,WS=["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(WS.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)QS=a,(window.parent||window).postMessage(r,"*"),zS.emit("aeria-event",r);else if(o){QS&&QS.postMessage(r,"*");var c=window.parent||window;c&&c.postMessage(r,"*")}}}),!1);var KS="https://html5.gamedistribution.com",YS="parent-data-request",JS="parent-data-response",XS=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===KS&&o===YS){var c={adRequestTimer:e.adRequestTimer};s.postMessage({type:JS,value:c})}}.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===KS&&i===JS&&(e(s),a=!0)})),setTimeout(function(){t(this,i),a||e()}.bind(this),1e3);var s={type:YS};window.parent.postMessage(s,"*")}.bind(this)));case 1:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})}]),n}(),ZS=new XS,$S={SDKExistsOnUpperFrame:!1};function eR(){!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)}}("gd__adblocker__style",document.body||document.getElementsByTagName("body")[0],'\n .gd__adblocker__button {\n position: relative;\n text-align: center;\n width: 90%;\n height: 50px;\n cursor: pointer;\n font-size: large;\n font-family: monospace;\n background-color: #ff8c1c;\n border-radius: 5px;\n color: white;\n margin: 0 auto;\n bottom: 10px;\n}\n\n.gd__adblocker__button > p {\n position: relative;\n text-align: center;\n margin: 0 auto;\n height: 100%;\n top: 30%;\n color: white;\n}\n\n.gd__adblocker__logo {\n width: 100px;\n height: 100px;\n display: block;\n z-index: 2000;\n cursor: pointer;\n top: calc(20% - 50px);\n left: calc(50% - 50px);\n}\n\n.logo__1 {\n background: url("https://static.gamedistribution.com/block-logo.png") no-repeat;\n background-size: cover;\n}\n.logo__2 {\n background: url("https://static.gamedistribution.com/abp.png") no-repeat;\n background-size: cover;\n}\n.logo__3 {\n background: url("https://static.gamedistribution.com/UBlockOrigin.png") no-repeat;\n background-size: cover;\n}\n.logo__4 {\n background: url("https://static.gamedistribution.com/other.png") no-repeat;\n background-size: cover;\n}\n\n.gd__adblocker__container {\n cursor: pointer;\n border-radius: 5px;\n margin: 0 auto;\n top: 10%;\n max-width: 50%; \n background: white;\n position: relative;\n}\n\n.gd__adblocker__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,1);\n z-index: 1999;\n cursor: pointer;\n}\n\n.gd__adblocker__text1 {\n text-align: center;\n position: relative;\n margin: 10px;\n font-size: 2rem;\n line-height: 1rem;\n padding: 3% 0% 0% 0%;\n}\n\n.tabs {\n left: 50%;\n transform: translateX(-50%);\n position: relative;\n background: white;\n width: auto;\n height: 700px;\n border-radius: 5px;\n text-align: center;\n font-size: 1rem;\n line-height: 1rem;\n}\n\n.tabs input[name="tab-control"] {\n display: none;\n}\n\n.tabs ul {\n list-style-type: none;\n padding-left: 0;\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: flex-end;\n flex-wrap: wrap;\n position: relative;\n}\n\n.tabs ul li {\n box-sizing: border-box;\n flex: 1;\n padding: 0 10px;\n text-align: center;\n position: relative;\n}\n\n.tabs ul li label {\n transition: all 0.3s ease-in-out;\n color: #666;\n padding: 5px auto;\n overflow: hidden;\n text-overflow: ellipsis;\n display: block;\n cursor: pointer;\n transition: all 0.2s ease-in-out;\n white-space: nowrap;\n user-select: none;\n}\n\n.tabs ul li label span {\n margin: 0 auto;\n margin-bottom: 20px;\n}\n\n.tabs ul li label br {\n display: none;\n}\n\n.tabs ul li label:hover {\n background: aliceblue;\n}\n\n.tabs .slider {\n position: relative;\n height: 4px;\n background: #ff8c1c;\n border-radius: 1px;\n bottom: -10px;\n left: 0;\n transition: all 0.33s cubic-bezier(0.38, 0.8, 0.32, 1.07);\n z-index: 1;\n top: -2%;\n}\n\n.tabs .content {\n height:70%\n}\n\n.tabs .content section {\n display: none;\n animation: content 0.3s ease-in-out 1;\n line-height: 1.4;\n width: 100%;\n height: 100%;\n\n embed {\n width: 90%;\n height: 100%;\n }\n}\n\n.tabs .content section h2 {\n color: #ff8c1c;\n display: none;\n}\n\n.tabs .content section h2::after {\n content: "";\n position: relative;\n display: block;\n width: 30px;\n height: 3px;\n background: #ff8c1c;\n margin-top: 5px;\n left: 1px;\n}\n\ninput[id="tab1"]:checked ~ .slider {\n left: 0;\n width: 25%;\n}\n\ninput[id="tab2"]:checked ~ .slider {\n left: 25%;\n width: 25%;\n}\n\ninput[id="tab3"]:checked ~ .slider {\n left: 50%;\n width: 25%;\n}\n\ninput[id="tab4"]:checked ~ .slider {\n left: 75%;\n width: 25%;\n}\n\ninput[id="tab1"]:checked ~ .content section:nth-of-type(1) {\n display: block;\n}\n\ninput[id="tab2"]:checked ~ .content section:nth-of-type(2) {\n display: block;\n}\n\ninput[id="tab3"]:checked ~ .content section:nth-of-type(3) {\n display: block;\n}\n\ninput[id="tab4"]:checked ~ .content section:nth-of-type(4) {\n display: block;\n}\n\n@keyframes content {\n from {\n opacity: 0;\n transform: translateY(5%);\n }\n to {\n opacity: 1;\n transform: translateY(0%);\n }\n}\n\n@media (max-width: 768px) {\n .tabs ul li label {\n white-space: initial;\n }\n\n .tabs ul li label br {\n display: initial;\n }\n\n .tabs .slider {\n display: none;\n }\n\n .tabs .content {\n margin-top: 20px;\n }\n\n .tabs .content section h2 {\n display: block;\n }\n}\n\n@media (max-width: 800px) {\n\n .tabs .content {\n height: 50%;\n }\n\n .gd__adblocker__container {\n max-width: 90%!important;\n }\n\n}\n\n.tabs ul::after {\n content: "";\n display: block;\n width: calc(100% - 5px);\n height: 10px;\n box-shadow: 0px 7px 10px #e0e0e0;\n}\n')}var tR=function(){function n(e){R(this,n),this.adContainer=window.document.body,this.gameData=e,this.adBlockerTimer=Date.now(),this.adBlockerTimeInverval=18e4,this.isFirstTime=!0}var i;return S(n,[{key:"show",value:function(){var e=Date.now()-this.adBlockerTimer;if(m.getBoolean("infdl1JMwI9JRg3U2MAIiQ==")){var t=this.gameData.rmblck,n="reminder"===(null==t?void 0:t.blockerMode);n&&(e>this.adBlockerTimeInverval||this.isFirstTime)?this.showAdBlocker():n||this.showAdBlocker()}}},{key:"showAdBlocker",value:function(){this.adBlockerOverlay.style.display="block",this.adBlockerTimer=Date.now(),this.isFirstTime=!1}},{key:"hide",value:function(){this.adBlockerOverlay.style.display="none"}},{key:"add",value:function(e,n){var r=this;try{eR(),m.getBoolean("infdl1JMwI9JRg3U2MAIiQ==")||setTimeout(function(){t(this,r),m.set("infdl1JMwI9JRg3U2MAIiQ==",!0)}.bind(this),this.adBlockerTimeInverval);var i=document.createElement("div");i.id="gd__adblocker__overlay",i.classList.add("gd__adblocker__overlay"),i.innerHTML=function(e,t){return'\n<div id="gd__adblocker__container" class="gd__adblocker__container">\n <p id="gd__adblocker__text" class="gd__adblocker__text1">Which of these extensions do you have?</p>\n <div class="tabs">\n <input type="radio" id="tab1" name="tab-control" checked>\n <input type="radio" id="tab2" name="tab-control">\n <input type="radio" id="tab3" name="tab-control">\n <input type="radio" id="tab4" name="tab-control">\n <ul>\n <li>\n <label for="tab1" role="button">\n <br><span class="gd__adblocker__logo logo__1"></span>\n AdBlock\n </label>\n </li>\n <li>\n <label for="tab2" role="button">\n <br><span class="gd__adblocker__logo logo__2"></span>\n AdBlock Plus\n </label>\n </li>\n <li>\n <label for="tab3" role="button">\n <br><span class="gd__adblocker__logo logo__3"></span>\n UBlock Origin\n </label>\n </li>\n <li>\n <label for="tab4" role="button">\n <br><span class="gd__adblocker__logo logo__4"></span>\n Other\n </label>\n </li>\n </ul>\n <div class="slider">\n <div class="indicator"></div>\n </div>\n <div class="content">\n <section>\n <embed src="https://static.gamedistribution.com/ad-block/'.concat(e,"/Adblock-").concat(t,'.pdf#toolbar=0" type="application/pdf" width="100%" height="100%" aria-labelledby="PDF document" />\n </section>\n <section>\n <embed src="https://static.gamedistribution.com/ad-block/').concat(e,"/AdblockPLUS-").concat(t,'.pdf#toolbar=0" type="application/pdf" width="100%" height="100%" aria-labelledby="PDF document" />\n </section>\n <section>\n <embed src="https://static.gamedistribution.com/ad-block/').concat(e,"/uBlockOrigin-").concat(t,'.pdf#toolbar=0" type="application/pdf" width="100%" height="100%" aria-labelledby="PDF document" />\n </section>\n <section>\n <embed src="https://static.gamedistribution.com/ad-block/').concat(e,"/Others-").concat(t,'.pdf#toolbar=0" type="application/pdf" width="100%" height="100%" aria-labelledby="PDF document" />\n </section>\n </div>\n </div>\n <div id="gd__adblocker__button" title="AdBlocker" class="gd__adblocker__button">\n <p>Refresh Page</p>\n </div>\n</div>\n')}(e,n),this.adBlockerOverlay=i,this.adContainer.appendChild(this.adBlockerOverlay),document.getElementById("gd__adblocker__button").onclick=function(){var e;t(this,r),"reminder"===(null===(e=this.gameData.rmblck)||void 0===e?void 0:e.blockerMode)?this.hide():(this.hide(),window.location.reload())}.bind(this)}catch(e){console.log("AdBlocker error",e)}}},{key:"checkStorage",value:(i=e(r.mark((function e(t){var n;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,n="https://static.gamedistribution.com/ad-block/".concat(this.gameData.ctry,"/Adblock-").concat(t,".pdf"),e.next=5,fetch("https://cors-anywhere.herokuapp.com/"+n);case 5:if(!e.sent.ok){e.next=10;break}return e.abrupt("return",this.gameData.ctry);case 10:return e.abrupt("return","default");case 11:e.next=16;break;case 13:return e.prev=13,e.t0=e.catch(0),e.abrupt("return","default");case 16:case"end":return e.stop()}}),e,this,[[0,13]])}))),function(e){return i.apply(this,arguments)})}]),n}();function nR(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 rR(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?nR(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nR(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var iR=function(){us("gtag: GA not initialized",arguments)};function aR(e){return sR.apply(this,arguments)}function sR(){return sR=e(r.mark((function e(i){var a,s,o,c,d,u,l,h,p,m,g,A,v=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=i.onError,s=i.args,c="gdSDKDataLayer",d="https://www.googletagmanager.com/gtag/js?id=".concat(o="G-PLRTBHGSEL","&l=").concat(c),u=[d],e.prev=5,e.next=8,f(u[0],"gdsdk_google_analytics",{alternates:u,error_prefix:"Blocked:",exists:function(){return t(this,v),window[c]}.bind(this)});case 8:return window[c]=window[c]||[],iR=function(){window[c].push(arguments)},iR("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,g=p(m.consentData),A=rR(rR({},A=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==g?void 0:g.type}),iR("config",o,A),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]])}))),sR.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 oR=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,c=a||10;return new Promise(function(e,i){var a=this;if(t(this,n),r())e(!0);else{var d=!1,u=setInterval(function(){t(this,a);try{s()&&(clearInterval(u),d=!0,e(!0))}catch(t){clearInterval(u),e(!1)}}.bind(this),c);setTimeout(function(){t(this,a),clearInterval(u),d||e(!1)}.bind(this),o)}}.bind(this))};function cR(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 dR(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?cR(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cR(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function uR(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 c={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},d=(new Ry).get();return c=dR(dR({},c),d),function(e,t){try{var n=r._layout,o=r._ua,c={tp:e,ct:0,vrs:os.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(c)))))}catch(e){}}(e,c=o?dR(dR({},c),o):c)}}}}function lR(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 hR(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?lR(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lR(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var pR=q(),fR=null,mR=null,gR=function(){function n(e){var r,i,a,s,o=this;if(R(this,n),fR)return fR;fR=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 Ry,this._location.print();var c=this._location.get(),d=(null==c||null===(r=c.top)||void 0===r||null===(i=r.domain)||void 0===i?void 0:i.value)||(null==c||null===(a=c.partner.domain)||void 0===a?void 0:a.value),u=null==c||null===(s=c.partner.url)||void 0===s?void 0:s.value;this._parentURL=0===this._bridge.depth?encodeURIComponent(this._bridge.parentURL):this._bridge.parentURL,this._parentURL=this._parentURL||u,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,o),this._sdk_ready=!0}.bind(this)).catch(function(e){t(this,o),this._sdk_ready=!1}.bind(this)).finally(function(){var e,n,r,i,a=this;if((t(this,o),null===(e=this._gameData)||void 0===e||null===(n=e.directTokenUse)||void 0===n?void 0:n.enabled)&&this._blockDirectTokenURLEmbedding().blocked)return;this.dumper=new uR({msgrt:this.msgrt,gameData:this._gameData,parentDomain:this._parentDomain,parentURL:this._parentURL,topDomain:this._parentURL}),this.dumper,this._initGameSessionTracking(),this._sendLoadedEvent(2),!0===(null===(r=this._gameData.lp)||void 0===r?void 0:r.load)&&this._sendLoadedEvent(1),this._sendLoaderDataEvent(),this._checkSplashAndPromoScreens(),this._initBlockingExternals(),this._initUnityHandler(),this._checkFullscreen(),null!==(i=this._gameData.evnts)&&void 0!==i&&i.enabled&&this._isLoaderGameURL()&&(fS(this._gameData),this._gameData.evnts.gameId===this.options.gameId&&setInterval(function(){t(this,a),this._send_gametag_data("heartbeat")}.bind(this),1e3*this._gameData.evnts.heartbeatDuration)),ZS.init(this),this._send_gametag_data("sdk_init")}.bind(this)),this._registerSGBridge(),this._whichFrame(),this._loadLocus()}var i,A,v,b,y,T,O,P,B,L,M,F,j,G,q,H;return S(n,[{key:"_getVisitorId",value:(H=e(r.mark((function e(){var n,i,a,s,o,c=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,oR({handler:function(){return t(this,c),!!mR}.bind(this),timeout:1e3,interval:10});case 2:return s=e.sent,o=s?null===(n=mR)||void 0===n||null===(i=n.visitor)||void 0===i||null===(a=i.visitorData)||void 0===a?void 0:a.visitorId:"noVisitorId",e.abrupt("return",o);case 5:case"end":return e.stop()}}),e,this)}))),function(){return H.apply(this,arguments)})},{key:"_initGameSessionTracking",value:(q=e(r.mark((function e(){var n,i,a,s,o,c,d,u,l,h,p,f,m,g,A,v,b,_,y,w=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null===(n=this._gameData)||void 0===n||null===(i=n.gs_trc)||void 0===i?void 0:i.enabled){e.next=3;break}return e.abrupt("return");case 3:return e.next=5,this._getVisitorId();case 5:a=e.sent,s=this._gameData,o=s.category,c=s.dname,d=s.pname,u=s.gameId,l=s.slug,h=s.title,p=s.ctry,f=this._topDomain||this._parentDomain,m=new Ry,g=m.get(),A=this.msgrt._ua,v=document.referrer,b=this.msgrt._layout,_=os.version,y={args:{rfr:v,category:o,dname:c,pname:d,gameId:u,slug:l,title:h,ctry:p,domain:f,loc:g,ua:A,layout:b,version:_,visitorId:a},onError:function(e){t(this,w),this._sendSDKError(e)}.bind(this)},MS(y);case 18:case"end":return e.stop()}}),e,this)}))),function(){return q.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:(G=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 G.apply(this,arguments)})},{key:"_loadCMP",value:(j=e(r.mark((function e(){var t,n,i,a,s,o;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._isMasterGameURL()){e.next=12;break}if(i=new Ry,0!==(null==(a=i.get("depth"))?void 0:a.value)||null===(t=this._gameData)||void 0===t||null===(n=t.cmp)||void 0===n||!n.enabled){e.next=12;break}if(null===(s=this._gameData)||void 0===s||null===(o=s.cmp)||void 0===o||!o.checkDepthOnly){e.next=9;break}return e.next=7,oS();case 7:e.next=12;break;case 9:if("html5.gamedistribution.com"!==this._topDomain){e.next=12;break}return e.next=12,oS();case 12:case"end":return e.stop()}}),e,this)}))),function(){return j.apply(this,arguments)})},{key:"testConsent",value:function(){try{eS();e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,tS({});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;cS.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:(F=e(r.mark((function e(n,i){var a,s,o,c=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,c),(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,c);var n="".concat(e).startsWith("Error: Blocked:");us("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 F.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:(M=e(r.mark((function e(){var t,n,i,a,s,o,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=14;break}if(m.set(this.blockingDetectedKey,!0),null===(a=this._gameData.rmblck)||void 0===a||!a.enabled){e.next=14;break}if(this.adBlockerPage){e.next=14;break}return this.adBlockerPage=new tR(this._gameData),s=(navigator.language||navigator.userLanguage).split("-")[1],e.next=11,this.adBlockerPage.checkStorage(s);case 11:o=e.sent,c="default"===o?"EN":s,this.adBlockerPage.add(o,c);case 14:e.next=18;break;case 16:e.prev=16,e.t0=e.catch(0);case 18:case"end":return e.stop()}}),e,this,[[0,16]])}))),function(){return M.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=os.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:hR(hR({},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=c("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:os.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,r;t(this,e),mR=this._initGamedockTracker(window.GamedockSDK),this._sendGamedockEvent("pageview"),null!==(n=this._gameData.diagnostic)&&void 0!==n&&null!==(r=n.gameDock)&&void 0!==r&&r.adViewEvent&&mR.tracking.enableHeartBeatForPage({pageId:this.options.gameId,pageType:"game"},this._gameData.diagnostic.gameDock.heartbeatConfig),nS.track(mR,this._gameData)}.bind(this)).catch(function(n){t(this,e),this._sendSDKError(n)}.bind(this))}catch(e){}}},{key:"_initGamedockTracker",value:function(e){if(!this._bridge.isCoreSDKMode)return e.initialize("gd",this._parentDomain)}},{key:"_sendGamedockEvent",value:function(e){var t,n;null===(t=mR)||void 0===t||null===(n=t.tracking)||void 0===n||n.trackEvent(e,{pageId:this.options.gameId,pageType:"game"})}},{key:"_loadMiniJuegosGratisTracker",value:function(){var e=this;window.mpConfig={game:this.options.gameId,partner:"game-distribution"};var n=["https://ext.minijuegosgratis.com/external-host/main.js"];console.log("noMinijuegosSDK loading"),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,Aw();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}.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:"_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 Ry,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};aR({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){}}BD()}.bind(this),"ima"),this.eventBus.subscribe("CONTENT_PAUSE_REQUESTED",function(){return t(this,e),this.onPauseGame("New advertisements requested and loaded","success")}.bind(this),"ima"),this.eventBus.subscribe("IMPRESSION",function(n){var r,i;t(this,e),this.msgrt.send("ad.impression"),ID(),null!==(r=this._gameData.diagnostic)&&void 0!==r&&null!==(i=r.gameDock)&&void 0!==i&&i.adViewEvent&&nS.track(mR,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,c=s.afg;(!o||!c)&&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=tw().config;return"https://".concat(t.gameAPI,"/game/v4/get/").concat(this.options.gameId.replace(/-/g,""),"/?domain=").concat(e,"&v=").concat(os.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,n=this._checkTokenGameUrl(),r=new Ry,i="html5.gamedistribution.com"!==C(document.referrer).host,a=n&&!$S.SDKExistsOnUpperFrame&&r.get("depth.value")>0&&i;if(a&&(null===(e=this._gameData)||void 0===e||null===(t=e.directTokenUse)||void 0===t?void 0:t.enabled)){var s,o,c=null===(s=this._gameData)||void 0===s||null===(o=s.directTokenUse)||void 0===o?void 0:o.behavior;"to-loader"===c?this._redirectToLoaderFrame():"to-blocked-page"===c&&this._redirectToBlocking(!0)}return{blocked:a}}},{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=hR(hR({},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;GD().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,r;!1===(null===(e=this._gameData.loader)||void 0===e?void 0:e.mobile)&&this._getisMobile()&&(this._gameData.loader.enabled=!1);var i,a=this._gameData,s=a.gdpr&&!0===a.gdpr.consent,o=a.loader,c=null===(t=a.promo)||void 0===t?void 0:t[null===(n=a.promo)||void 0===n||null===(r=n.template)||void 0===r?void 0:r.preroll];(a.preroll||(this.adRequestTimer=Date.now()),this.options.loader.enabled)?null!=c&&c.enabled?this._createPromoBeforeSplash(a,s):o.enabled&&!0!==(null===(i=o.splash)||void 0===i?void 0:i.skip)?this._createSplash(a,s):this.onResumeGame("Skipped splash.","success"):o.enabled||this._bridge.isTokenGameURL&&this._bridge.isExtHostedGameURL||(this.options.advertisementSettings.autoplay||s?null!=c&&c.enabled?this._createPromoBeforeSplash(a,s):!1!==o.enabled&&this._createSplash(a,s):null!=c&&c.enabled&&this._createPromo(a,s))}},{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 WD(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=os,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,hw();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,c,d,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(hR(hR({},this.options),{},{isConsentDomain:a,version:os.version}),i,this._parentDomain),n.next=6,bw();case 6:c=n.sent,d=c.enabled,o.on("playClick",function(){var n,s,c,l=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,l),console.log("gd-adflow locus-first-user-action error",e)}.bind(this)),a){var h=new Date;h.setDate(h.getDate()+90),document.cookie="ogdpr_tracking=1; expires=".concat(h.toUTCString(),"; path=/")}if(this._hideCMPButton(),jS("play"),d)window.gdsdk.showAd(g.Interstitial,{position:"preroll"}).catch(function(e){t(this,l),o.hide()}.bind(this));else{var p={position:"preroll"};(function(){t(this,l),hs.firstAdapterModeAdsense&&(console.log("promo-test, set first adapter to adssense 1"),p.adapter="adsense")}).bind(this),this.showAd(g.Interstitial,p).catch(function(e){t(this,l)}.bind(this))}null!==(s=this._gameData)&&void 0!==s&&null!==(c=s.evnts)&&void 0!==c&&c.enabled&&(mS({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,c,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:o=e.sent,(c=new o(hR(hR({},this.options),{},{isConsentDomain:i,version:os.version,template:null===(a=n.promo)||void 0===a||null===(s=a.template)||void 0===s?void 0:s.preroll}),n)).on("done",function(){t(this,d),c.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,c,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:o=e.sent,(c=new o(hR(hR({},this.options),{},{isConsentDomain:i,version:os.version,template:null===(a=n.promo)||void 0===a||null===(s=a.template)||void 0===s?void 0:s.preroll}),n)).on("done",function(){t(this,d),c.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(g.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,c,d,u;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,jS("play"),!a._autoResumeIfAdsAreDisabled(n||"interstitial")){e.next=6;break}return e.abrupt("return",t());case 6:return c={adType:n||"interstitial",params:i,adTimestamp:a.adRequestTimer},e.next=10,a.sdkReady;case 10:return d=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:d,adRequest:c}),a._rejectAdIfAdDisabled({gameData:d,adRequest:c}),a._rejectAdIfUnsupportedType({adRequest:c}),"rewarded"===n&&a._setGameRewardedFlag(),null!=i&&i.isGift||a._rejectAdIfAdRateHits({gameData:d,adRequest:c}),i&&i.isGift&&i.isMidrollPlus||!a.adBlockerPage||(a._setAdRequestTimer(),a.adBlockerPage.show()),a.adInstance.attachAfgPosition(c),!a.adFlowRunning){e.next=24;break}return e.abrupt("return",t());case 24:return a.adFlowRunning=!0,u=new VS(a),e.next=28,u.runAdFlow(c);case 28:a.adFlowRunning=!1,t(),a._post_message({topic:"adrequest.instream"}),e.next=38;break;case 33:e.prev=33,e.t0=e.catch(0),a.adFlowRunning=!1,a.onResumeGame(e.t0.message,"warning"),s(e.t0.message);case 38:case"end":return e.stop()}}),e,null,[[0,33]])})));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,o,c,d,u,l,h,p,f,m;switch(e){case"preroll":null!==(t=this._gameData)&&void 0!==t&&null!==(n=t.gft)&&void 0!==n&&n[e].enabled&&(null===(r=this._gameData)||void 0===r||null===(i=r.gft)||void 0===i||null===(a=i[e].durations[this._giftCount[e]])||void 0===a?void 0:a.after)===this.adInstance.adPrerollCount&&this.decideToGiveAGift(e);break;case"midroll":null!==(s=this._gameData)&&void 0!==s&&null!==(o=s.gft)&&void 0!==o&&o[e].enabled&&(null===(c=this._gameData)||void 0===c||null===(d=c.gft)||void 0===d||null===(u=d[e].durations[this._giftCount[e]])||void 0===u?void 0:u.after)===this.adInstance.adMidrollCount&&this.decideToGiveAGift(e);break;case"rewarded":null!==(l=this._gameData)&&void 0!==l&&null!==(h=l.gft)&&void 0!==h&&h[e].enabled&&(null===(p=this._gameData)||void 0===p||null===(f=p.gft)||void 0===f||null===(m=f[e].durations[this._giftCount[e]])||void 0===m?void 0:m.after)===this.adInstance.adRewardedCount&&this.decideToGiveAGift(e)}}},{key:"_setAdRequestTimer",value:function(){this.adRequestTimer=Date.now()}},{key:"clearSession",value:function(){this.adInstance.clearSession()}},{key:"_attachAfgFallback",value:function(e){var t=e.gameData,n=e.adRequest;if(!t.afg_disabled&&!n.params.hasOwnProperty("fallback_adsense"))switch(n.params.position){case"preroll":case"start":case"next":n.params.fallback_adsense=!0}}},{key:"_rejectAdIfGameBlocked",value:function(e){var t=e.gameData;if(t.bloc_gard&&!0===t.bloc_gard.enabled)throw new Error("Game or domain is blocked.")}},{key:"_rejectAdIfAdDisabled",value:function(e){var t=e.gameData,n=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!==g.Interstitial&&t.adType!==g.Rewarded)throw new Error("Unsupported an advertisement type: ",t.adType)}else t.adType=g.Interstitial}},{key:"_rejectAdIfRewardedDisabled",value:function(e){var t=e.gameData;if(e.adRequest.adType===g.Rewarded&&!t.rewardedAds)throw new Error("Rewarded ads are disabled.")}},{key:"_rejectAdIfAdRateHits",value:function(e){var t,n,r,i,a,s,o=e.gameData,c=e.adRequest,d=null;c.adType===g.Interstitial&&null!==(t=o.diagnostic)&&void 0!==t&&null!==(n=t.useMidrollIndex)&&void 0!==n&&n.enabled&&this.adInstance.noPreroll?this.adInstance.adMidrollCount>(null===(r=o.diagnostic)||void 0===r||null===(i=r.useMidrollIndex)||void 0===i?void 0:i.indexes.length)-1||(d=6e4*(null===(a=o.diagnostic)||void 0===a||null===(s=a.useMidrollIndex)||void 0===s?void 0:s.indexes[this.adInstance.adMidrollCount])):d=o.midroll;if(c.adType===g.Interstitial&&void 0!==this.adRequestTimer&&Date.now()-this.adRequestTimer<d)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=g.Rewarded,e.next=16;break;case 14:if(n===g.Interstitial||n===g.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:(A=e(r.mark((function t(){var n=this;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise(function(){var t=e(r.mark((function e(t,i){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:try{n.adInstance.cancel(),n.onResumeGame("Advertisement(s) are cancelled. Start / resume the game.","success"),i()}catch(e){n.onResumeGame("Advertisement(s) are cancelled. Start / resume the game.","success"),t(e.message)}case 1:case"end":return e.stop()}}),e)})));return function(e,n){return t.apply(this,arguments)}}()));case 1:case"end":return t.stop()}}),t)}))),function(){return A.apply(this,arguments)})},{key:"showDisplayAd",value:function(t){var n=this;return new Promise(function(){var i=e(r.mark((function e(i,a){var s;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,n.sdkReady;case 3:return s=e.sent,e.next=6,n.videoAdReady;case 6:if(!s.dAds.enabled){e.next=13;break}return e.next=9,n.adInstance.loadDisplayAd(t);case 9:n._post_message({topic:"adrequest.display"}),i(),e.next=14;break;case 13:a("Display-Ads are disabled.");case 14:e.next=19;break;case 16:e.prev=16,e.t0=e.catch(0),a(e.t0.message||e.t0);case 19:case"end":return e.stop()}}),e,null,[[0,16]])})));return function(e,t){return i.apply(this,arguments)}}())}},{key:"onResumeGame",value:function(e,t){var n;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()||(mS({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()||(mS({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()),c=decodeURIComponent((e||n)&&r.parentDomain?r.parentDomain:s()),u=decodeURIComponent((e||n)&&r.topDomain?r.topDomain:n&&0===o()?c:d()),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,g=(e||n)&&r.loaderEnabled,A=(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:c,topDomain:u&&u.length?u:c,noGAPageView:f,noLotamePageView:m,noGamedockSDK:g,noMinijuegosSDK:A,version:r.version,pauseGameOnStartup:b,depth:o(),domainMatched:c===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,t;return null===(e=this._gameData)||void 0===e||null===(t=e.extHosting)||void 0===t?void 0:t.enabled}},{key:"_whichFrame",value:function(){return(this._isMasterGameURL()||this._isExtHostedGameURL())&&!this._isTokenGameURL()?"loader-frame":"game-frame"}},{key:"_isMasterGameURL",value:function(){var e=/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Fa-f0-9]{32})(.*)$/i;return e.test(location.href)||!this._isTokenGameURL()&&e.test(document.referrer)}},{key:"_checkTokenGameUrl",value:function(){var e=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 YD(t).splash()}},{key:"_createPrerollPromoTemplate",value:(i=e(r.mark((function e(t){var n,i,a,s,o;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=null===(n=t.promo)||void 0===n?void 0:n[null===(i=t.promo)||void 0===i||null===(a=i.template)||void 0===a?void 0:a.preroll],o=new KD(s),e.abrupt("return",o.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=hR(hR({},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)mR.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(g.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 pR}},{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(g.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(g.Interstitial,{position:"midroll",giftType:i,isMidrollPlus:!0}).catch(function(n){t(this,e)}.bind(this))}.bind(this),this._gameData.midroll)}}}]),n}();function AR(){return(AR=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,Aw();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 vR=new M,bR=function(e){var n=this;!function(){AR.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&&(vR.off("sdk-event",s),n())}.bind(this);vR.on("sdk-event",s),m("showAd",{adType:e})}.bind(this))}.bind(this),a=function(){return t(this,n),r||(r=new gR(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),c=function(e){return t(this,n),a().showDisplayAd(e)}.bind(this),d=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),g=function(){t(this,n);window.addEventListener("message",(function(e){var t=e.data;e.origin,e.source;var n=t.type,r=t.event;"gd-sdk-on-event"===n&&r&&v(r)}),!1)}.bind(this),A=function(){t(this,n),g(),m("init")}.bind(this),v=function(r){t(this,n);try{vR.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:c,cancelAd:d,openConsole:u,getSession:h,onEvent:v,init:A,_sendSDKReady:f,sendGenericEvent:p}},_R=function(e){var t=bR(e);return t.init(),t},yR=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}},wR="gd-sdk-frame-handshake-request",kR="gd-sdk-frame-handshake-response",ER=function(e){var n=this;return new Promise(function(e,r){var i=this;t(this,n);var a={type:wR},s=!1;window.addEventListener("message",(function(t){var n=t.data,r=t.origin,i=t.source,a=n.type;if(a===wR){var o={type:kR};i.postMessage(o,r)}else a===kR&&(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))},xR=function(){var t=e(r.mark((function e(){var t,n,i,a,s,o,c;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,gw();case 2:return t=e.sent,e.next=6,ER();case 6:if(n=e.sent,$S.SDKExistsOnUpperFrame=!!n,t){e.next=10;break}return e.abrupt("return",!1);case 10:return i=yR(),a=i.isMasterGameURL,i.isTokenGameURL,s=a(),e.next=14,vw();case 14:return o=e.sent,c=!1,c=o?!s&&!!n:!s,e.abrupt("return",c);case 18:case"end":return e.stop()}}),e)})));return function(){return t.apply(this,arguments)}}(),DR=tt,SR=ue,RR=ts,TR=Yi,CR=SR(Hi.f),IR=SR([].push),OR=function(e){return function(t){for(var n,r=TR(t),i=RR(r),a=i.length,s=0,o=[];a>s;)n=i[s++],DR&&!CR(r,n)||IR(o,e?[n,r[n]]:r[n]);return o}},PR={entries:OR(!0),values:OR(!1)}.values;Za({target:"Object",stat:!0},{values:function(e){return PR(e)}});var BR,LR={},UR=function(e){try{if(e.skipForward)return;if(LR.source){var t={type:"gd-sdk-on-event",event:e};LR.source.postMessage(t,LR.origin)}}catch(e){console.log("gd-sdk forwardEvent err",e)}},MR=function(){UR({name:"SDK_READY",status:"success",message:"Everything is ready."}),UR({name:"SDK_GAME_START",status:"success",message:"Advertisement(s) are done. Start / resume the game."}),UR({name:"CONTENT_RESUME_REQUESTED",status:"success",message:"Fired when content should be resumed. This usually happens when an ad finishes or collapses."})},FR=function(n){window.addEventListener("message",(function(i){var a=i.data,s=i.origin,o=i.source,c=a.type,d=a.method,u=a.options;if("gd-sdk-self"!==c){if("gd-sdk"===c){if(!LR.source&&"init"===d)return function(e){var t=e.source,n=e.origin;LR={source:t,origin:n}}({source:o,origin:s}),void MR();var l=n[d];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"===d&&hs.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:d,options:u};window.postMessage(h,location.origin)}}),!1)},jR=function(e){!function(e){var t=e.onEvent;e.onEvent=function(e){UR(e),t.apply(this,arguments)}}(e);var t=new gR(e);return FR(t),t},NR=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:[]},YA(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,XA(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}(),GR=function(){var t=e(r.mark((function t(){var n,i,a,s,o,c,d,u,l,h,p,f,m,g,A,v;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=function(){var e,t=(e=new Ry).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 c=function(){var e=(new Ry).get("partner.url.value");return new C(e,!0)},d=function(){var e="ae-soft-323";try{var t=c(),n=t.pathname,r=n.split("/"),i=r[r.length-1];us("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:d,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,hw();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())})),g=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 NR).runYMenu({gameId:d});case 2:case"end":return e.stop()}}),e)})));return function(){return t.apply(this,arguments)}}(),A=yR(),v=A.whichFrame,"game-frame"===v()&&(f||g());case 21:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),qR=function(e){try{var t=Jy(e);e.gameId||t.send("nogameid",{message:"".concat(pb.parentURL)})}catch(e){}},HR=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,GR();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)}}(),QR={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,qR(t),lw(t),e.next=5,xR();case 5:return n=e.sent,e.next=8,HR();case 8:return window.isForwarderFrame=n,i=n?_R(t):jR(t),_w(),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 VR(){return(VR=e(r.mark((function e(t,n){var i;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,kw();case 2:if(!e.sent){e.next=7;break}e.t0=window.gdsdk,e.next=10;break;case 7:return e.next=9,YR(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 zR,WR,KR=!1;function YR(e){var n=this;return new Promise(function(r,i){var a=this;if(t(this,n),BR)return r(BR);if(KR)var s=setInterval(function(){t(this,a),BR&&(KR=!1,clearInterval(s),r(BR))}.bind(this),100);else KR=!0,QR.create(e).then(function(e){t(this,a),BR=e,e._sendSDKReady(),KR=!1,r(BR)}.bind(this))}.bind(this))}function JR(e){return YR(e),{invoke:function(t){return function(e,t){return VR.apply(this,arguments)}(e,t)}}}function XR(n,i){var a=this;return new Promise(function(s,o){var c,d=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===(c=i.game)||void 0===c?void 0:c.version);ZR({text:"sdk-wrapper-script-load"}),f(u[0],"gd-sdk-wrp",{alternates:u}).catch(function(e){t(this,d),ZR({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,ZR({text:"sdk-wrapper load success"}),t=window.GDSDKWRP.GDSDKWRP,a=new t,ZR({text:"sdk-wrapper before gdSdkWrp.init"}),e.next=7,a.init(n,i);case 7:WR=e.sent,ZR({text:"sdk-wrapper after gdSdkWrp.init"}),s(WR),e.next=16;break;case 12:e.prev=12,e.t0=e.catch(0),ZR({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 ZR(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(Q(Object.values(e)))}catch(e){}}function $R(e){if(e){var t=e.name,n=e.message,r=e.status;try{ZR({text:"samsung-wrp send-game-event",evt:e,hasOptions:!!zR}),zR&&zR.onEvent({name:t,message:n,status:r})}catch(t){ZR({text:"samsung-wrp DEVELOPER-ERROR",evt:e,err:t})}}}function eT(e){return tT.apply(this,arguments)}function tT(){return(tT=e(r.mark((function e(t){var n,i,a,s,o,c,d,u,l;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return zR=t,lw(t),e.next=4,hw();case 4:if(s=e.sent,!WR){e.next=7;break}return e.abrupt("return",WR);case 7:if(o=null==s||null===(n=s.sdk_wrp)||void 0===n?void 0:n.enabled,c=null==s||null===(i=s.sdk_wrp)||void 0===i?void 0:i.version,d=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,ZR({text:"sdk-wrapper-load-instant-play"}),e.next=18,rT();case 18:return ZR({text:"sdk-wrapper-load-instant-play-loaded"}),e.next=21,XR(l,{onEvent:$R,game:{gameId:d,title:u,version:c}});case 21:return WR=e.sent,e.abrupt("return",WR);case 23:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function nT(){return nT=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,eT(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]])}))),nT.apply(this,arguments)}function rT(){return iT.apply(this,arguments)}function iT(){return(iT=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 sT(){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(){CD();var n=JR(sT());function i(){var i=this;this.AdType=g,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===g.Display)return e.showDisplayAd(a);var r={};return function(){t(this,n),hs.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),$A.showLeaderboard()}.bind(this),addScore:function(e){t(this,i),$A.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){nT.apply(this,arguments)}({_get_developer_sets:sT});