@bygd/gd-sdk-pes 1.29.41 → 1.29.44

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
- "use strict";var e=require("@babel/runtime/helpers/asyncToGenerator"),t=require("@babel/runtime/helpers/newArrowCheck"),n=require("@babel/runtime/helpers/typeof"),r=require("@babel/runtime/regenerator"),a=require("@bygd/gd-sdk-era/dist/default"),i=require("@babel/runtime/helpers/classCallCheck"),s=require("@babel/runtime/helpers/defineProperty"),o=require("@babel/runtime/helpers/createClass"),d=require("url-parse"),u=require("js-base64"),c=require("validator"),l=require("is-valid-domain"),h=require("get-value"),f=require("set-value"),p=require("lodash.clonedeep"),m=require("can-autoplay"),g=require("is-plain-object"),v=require("querystringify"),y=require("lodash.merge"),b=require("events"),_=require("uuid");function w(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var A=w(e),k=w(t),E=w(n),x=w(r),R=w(i),S=w(s),D=w(o),T=w(d),I=w(c),O=w(l),P=w(h),C=w(f),L=w(p),U=w(m),M=w(v),j=w(y),G="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},B=function(e){return e&&e.Math==Math&&e},q=B("object"==typeof globalThis&&globalThis)||B("object"==typeof window&&window)||B("object"==typeof self&&self)||B("object"==typeof G&&G)||function(){return this}()||Function("return this")(),N={exports:{}},F=q,V=Object.defineProperty,W=function(e,t){try{V(F,e,{value:t,configurable:!0,writable:!0})}catch(n){F[e]=t}return t},K=W,H=q["__core-js_shared__"]||K("__core-js_shared__",{}),z=H;(N.exports=function(e,t){return z[e]||(z[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.19.1",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"});var $,Q,Y=Function.prototype,J=Y.bind,X=Y.call,Z=J&&J.bind(X),ee=J?function(e){return e&&Z(X,e)}:function(e){return e&&function(){return X.apply(e,arguments)}},te=q.TypeError,ne=function(e){if(null==e)throw te("Can't call method on "+e);return e},re=ne,ae=q.Object,ie=function(e){return ae(re(e))},se=ie,oe=ee({}.hasOwnProperty),de=Object.hasOwn||function(e,t){return oe(se(e),t)},ue=ee,ce=0,le=Math.random(),he=ue(1..toString),fe=function(e){return"Symbol("+(void 0===e?"":e)+")_"+he(++ce+le,36)},pe=function(e){return"function"==typeof e},me=q,ge=pe,ve=function(e){return ge(e)?e:void 0},ye=function(e,t){return arguments.length<2?ve(me[e]):me[e]&&me[e][t]},be=ye("navigator","userAgent")||"",_e=q,we=be,Ae=_e.process,ke=_e.Deno,Ee=Ae&&Ae.versions||ke&&ke.version,xe=Ee&&Ee.v8;xe&&(Q=($=xe.split("."))[0]>0&&$[0]<4?1:+($[0]+$[1])),!Q&&we&&(!($=we.match(/Edge\/(\d+)/))||$[1]>=74)&&($=we.match(/Chrome\/(\d+)/))&&(Q=+$[1]);var Re=Q,Se=function(e){try{return!!e()}catch(e){return!0}},De=Re,Te=Se,Ie=!!Object.getOwnPropertySymbols&&!Te((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&De&&De<41})),Oe=Ie&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Pe=q,Ce=N.exports,Le=de,Ue=fe,Me=Ie,je=Oe,Ge=Ce("wks"),Be=Pe.Symbol,qe=Be&&Be.for,Ne=je?Be:Be&&Be.withoutSetter||Ue,Fe=function(e){if(!Le(Ge,e)||!Me&&"string"!=typeof Ge[e]){var t="Symbol."+e;Me&&Le(Be,e)?Ge[e]=Be[e]:Ge[e]=je&&qe?qe(t):Ne(t)}return Ge[e]},Ve={};Ve[Fe("toStringTag")]="z";var We="[object z]"===String(Ve),Ke={exports:{}},He=!Se((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),ze={},$e=pe,Qe=function(e){return"object"==typeof e?null!==e:$e(e)},Ye=Qe,Je=q.document,Xe=Ye(Je)&&Ye(Je.createElement),Ze=function(e){return Xe?Je.createElement(e):{}},et=Ze,tt=!He&&!Se((function(){return 7!=Object.defineProperty(et("div"),"a",{get:function(){return 7}}).a})),nt=q,rt=Qe,at=nt.String,it=nt.TypeError,st=function(e){if(rt(e))return e;throw it(at(e)+" is not an object")},ot=Function.prototype.call,dt=ot.bind?ot.bind(ot):function(){return ot.apply(ot,arguments)},ut=ee({}.isPrototypeOf),ct=ye,lt=pe,ht=ut,ft=Oe,pt=q.Object,mt=ft?function(e){return"symbol"==typeof e}:function(e){var t=ct("Symbol");return lt(t)&&ht(t.prototype,pt(e))},gt=q.String,vt=function(e){try{return gt(e)}catch(e){return"Object"}},yt=pe,bt=vt,_t=q.TypeError,wt=function(e){if(yt(e))return e;throw _t(bt(e)+" is not a function")},At=wt,kt=function(e,t){var n=e[t];return null==n?void 0:At(n)},Et=dt,xt=pe,Rt=Qe,St=q.TypeError,Dt=dt,Tt=Qe,It=mt,Ot=kt,Pt=function(e,t){var n,r;if("string"===t&&xt(n=e.toString)&&!Rt(r=Et(n,e)))return r;if(xt(n=e.valueOf)&&!Rt(r=Et(n,e)))return r;if("string"!==t&&xt(n=e.toString)&&!Rt(r=Et(n,e)))return r;throw St("Can't convert object to primitive value")},Ct=Fe,Lt=q.TypeError,Ut=Ct("toPrimitive"),Mt=function(e,t){if(!Tt(e)||It(e))return e;var n,r=Ot(e,Ut);if(r){if(void 0===t&&(t="default"),n=Dt(r,e,t),!Tt(n)||It(n))return n;throw Lt("Can't convert object to primitive value")}return void 0===t&&(t="number"),Pt(e,t)},jt=mt,Gt=function(e){var t=Mt(e,"string");return jt(t)?t:t+""},Bt=He,qt=tt,Nt=st,Ft=Gt,Vt=q.TypeError,Wt=Object.defineProperty;ze.f=Bt?Wt:function(e,t,n){if(Nt(e),t=Ft(t),Nt(n),qt)try{return Wt(e,t,n)}catch(e){}if("get"in n||"set"in n)throw Vt("Accessors not supported");return"value"in n&&(e[t]=n.value),e};var Kt=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},Ht=ze,zt=Kt,$t=He?function(e,t,n){return Ht.f(e,t,zt(1,n))}:function(e,t,n){return e[t]=n,e},Qt=pe,Yt=H,Jt=ee(Function.toString);Qt(Yt.inspectSource)||(Yt.inspectSource=function(e){return Jt(e)});var Xt,Zt,en,tn=Yt.inspectSource,nn=pe,rn=tn,an=q.WeakMap,sn=nn(an)&&/native code/.test(rn(an)),on=N.exports,dn=fe,un=on("keys"),cn=function(e){return un[e]||(un[e]=dn(e))},ln={},hn=sn,fn=q,pn=ee,mn=Qe,gn=$t,vn=de,yn=H,bn=cn,_n=ln,wn=fn.TypeError,An=fn.WeakMap;if(hn||yn.state){var kn=yn.state||(yn.state=new An),En=pn(kn.get),xn=pn(kn.has),Rn=pn(kn.set);Xt=function(e,t){if(xn(kn,e))throw new wn("Object already initialized");return t.facade=e,Rn(kn,e,t),t},Zt=function(e){return En(kn,e)||{}},en=function(e){return xn(kn,e)}}else{var Sn=bn("state");_n[Sn]=!0,Xt=function(e,t){if(vn(e,Sn))throw new wn("Object already initialized");return t.facade=e,gn(e,Sn,t),t},Zt=function(e){return vn(e,Sn)?e[Sn]:{}},en=function(e){return vn(e,Sn)}}var Dn={set:Xt,get:Zt,has:en,enforce:function(e){return en(e)?Zt(e):Xt(e,{})},getterFor:function(e){return function(t){var n;if(!mn(t)||(n=Zt(t)).type!==e)throw wn("Incompatible receiver, "+e+" required");return n}}},Tn=He,In=de,On=Function.prototype,Pn=Tn&&Object.getOwnPropertyDescriptor,Cn=In(On,"name"),Ln={EXISTS:Cn,PROPER:Cn&&"something"===function(){}.name,CONFIGURABLE:Cn&&(!Tn||Tn&&Pn(On,"name").configurable)},Un=q,Mn=pe,jn=de,Gn=$t,Bn=W,qn=tn,Nn=Ln.CONFIGURABLE,Fn=Dn.get,Vn=Dn.enforce,Wn=String(String).split("String");(Ke.exports=function(e,t,n,r){var a,i=!!r&&!!r.unsafe,s=!!r&&!!r.enumerable,o=!!r&&!!r.noTargetGet,d=r&&void 0!==r.name?r.name:t;Mn(n)&&("Symbol("===String(d).slice(0,7)&&(d="["+String(d).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!jn(n,"name")||Nn&&n.name!==d)&&Gn(n,"name",d),(a=Vn(n)).source||(a.source=Wn.join("string"==typeof d?d:""))),e!==Un?(i?!o&&e[t]&&(s=!0):delete e[t],s?e[t]=n:Gn(e,t,n)):s?e[t]=n:Bn(t,n)})(Function.prototype,"toString",(function(){return Mn(this)&&Fn(this).source||qn(this)}));var Kn=ee,Hn=Kn({}.toString),zn=Kn("".slice),$n=function(e){return zn(Hn(e),8,-1)},Qn=q,Yn=We,Jn=pe,Xn=$n,Zn=Fe("toStringTag"),er=Qn.Object,tr="Arguments"==Xn(function(){return arguments}()),nr=Yn?Xn: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=er(e),Zn))?n:tr?Xn(t):"Object"==(r=Xn(t))&&Jn(t.callee)?"Arguments":r},rr=nr,ar=We?{}.toString:function(){return"[object "+rr(this)+"]"},ir=We,sr=Ke.exports,or=ar;ir||sr(Object.prototype,"toString",or,{unsafe:!0});var dr={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},ur=Ze("span").classList,cr=ur&&ur.constructor&&ur.constructor.prototype,lr=cr===Object.prototype?void 0:cr,hr=wt,fr=ee(ee.bind),pr=function(e,t){return hr(e),void 0===t?e:fr?fr(e,t):function(){return e.apply(t,arguments)}},mr=ee,gr=Se,vr=$n,yr=q.Object,br=mr("".split),_r=gr((function(){return!yr("z").propertyIsEnumerable(0)}))?function(e){return"String"==vr(e)?br(e,""):yr(e)}:yr,wr=Math.ceil,Ar=Math.floor,kr=function(e){var t=+e;return t!=t||0===t?0:(t>0?Ar:wr)(t)},Er=kr,xr=Math.min,Rr=function(e){return e>0?xr(Er(e),9007199254740991):0},Sr=Rr,Dr=function(e){return Sr(e.length)},Tr=$n,Ir=Array.isArray||function(e){return"Array"==Tr(e)},Or=ee,Pr=Se,Cr=pe,Lr=nr,Ur=tn,Mr=function(){},jr=[],Gr=ye("Reflect","construct"),Br=/^\s*(?:class|function)\b/,qr=Or(Br.exec),Nr=!Br.exec(Mr),Fr=function(e){if(!Cr(e))return!1;try{return Gr(Mr,jr,e),!0}catch(e){return!1}},Vr=!Gr||Pr((function(){var e;return Fr(Fr.call)||!Fr(Object)||!Fr((function(){e=!0}))||e}))?function(e){if(!Cr(e))return!1;switch(Lr(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}return Nr||!!qr(Br,Ur(e))}:Fr,Wr=q,Kr=Ir,Hr=Vr,zr=Qe,$r=Fe("species"),Qr=Wr.Array,Yr=function(e){var t;return Kr(e)&&(t=e.constructor,(Hr(t)&&(t===Qr||Kr(t.prototype))||zr(t)&&null===(t=t[$r]))&&(t=void 0)),void 0===t?Qr:t},Jr=function(e,t){return new(Yr(e))(0===t?0:t)},Xr=pr,Zr=_r,ea=ie,ta=Dr,na=Jr,ra=ee([].push),aa=function(e){var t=1==e,n=2==e,r=3==e,a=4==e,i=6==e,s=7==e,o=5==e||i;return function(d,u,c,l){for(var h,f,p=ea(d),m=Zr(p),g=Xr(u,c),v=ta(m),y=0,b=l||na,_=t?b(d,v):n||s?b(d,0):void 0;v>y;y++)if((o||y in m)&&(f=g(h=m[y],y,p),e))if(t)_[y]=f;else if(f)switch(e){case 3:return!0;case 5:return h;case 6:return y;case 2:ra(_,h)}else switch(e){case 4:return!1;case 7:ra(_,h)}return i?-1:r||a?a:_}},ia={forEach:aa(0),map:aa(1),filter:aa(2),some:aa(3),every:aa(4),find:aa(5),findIndex:aa(6),filterReject:aa(7)},sa=Se,oa=function(e,t){var n=[][e];return!!n&&sa((function(){n.call(null,t||function(){throw 1},1)}))},da=ia.forEach,ua=q,ca=dr,la=lr,ha=oa("forEach")?[].forEach:function(e){return da(this,e,arguments.length>1?arguments[1]:void 0)},fa=$t,pa=function(e){if(e&&e.forEach!==ha)try{fa(e,"forEach",ha)}catch(t){e.forEach=ha}};for(var ma in ca)ca[ma]&&pa(ua[ma]&&ua[ma].prototype);pa(la);var ga={},va={},ya={}.propertyIsEnumerable,ba=Object.getOwnPropertyDescriptor,_a=ba&&!ya.call({1:2},1);va.f=_a?function(e){var t=ba(this,e);return!!t&&t.enumerable}:ya;var wa=_r,Aa=ne,ka=function(e){return wa(Aa(e))},Ea=He,xa=dt,Ra=va,Sa=Kt,Da=ka,Ta=Gt,Ia=de,Oa=tt,Pa=Object.getOwnPropertyDescriptor;ga.f=Ea?Pa:function(e,t){if(e=Da(e),t=Ta(t),Oa)try{return Pa(e,t)}catch(e){}if(Ia(e,t))return Sa(!xa(Ra.f,e,t),e[t])};var Ca={},La=kr,Ua=Math.max,Ma=Math.min,ja=function(e,t){var n=La(e);return n<0?Ua(n+t,0):Ma(n,t)},Ga=ka,Ba=ja,qa=Dr,Na=function(e){return function(t,n,r){var a,i=Ga(t),s=qa(i),o=Ba(r,s);if(e&&n!=n){for(;s>o;)if((a=i[o++])!=a)return!0}else for(;s>o;o++)if((e||o in i)&&i[o]===n)return e||o||0;return!e&&-1}},Fa={includes:Na(!0),indexOf:Na(!1)},Va=de,Wa=ka,Ka=Fa.indexOf,Ha=ln,za=ee([].push),$a=function(e,t){var n,r=Wa(e),a=0,i=[];for(n in r)!Va(Ha,n)&&Va(r,n)&&za(i,n);for(;t.length>a;)Va(r,n=t[a++])&&(~Ka(i,n)||za(i,n));return i},Qa=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Ya=$a,Ja=Qa.concat("length","prototype");Ca.f=Object.getOwnPropertyNames||function(e){return Ya(e,Ja)};var Xa={};Xa.f=Object.getOwnPropertySymbols;var Za=ye,ei=Ca,ti=Xa,ni=st,ri=ee([].concat),ai=Za("Reflect","ownKeys")||function(e){var t=ei.f(ni(e)),n=ti.f;return n?ri(t,n(e)):t},ii=de,si=ai,oi=ga,di=ze,ui=function(e,t){for(var n=si(t),r=di.f,a=oi.f,i=0;i<n.length;i++){var s=n[i];ii(e,s)||r(e,s,a(t,s))}},ci=Se,li=pe,hi=/#|\.prototype\./,fi=function(e,t){var n=mi[pi(e)];return n==vi||n!=gi&&(li(t)?ci(t):!!t)},pi=fi.normalize=function(e){return String(e).replace(hi,".").toLowerCase()},mi=fi.data={},gi=fi.NATIVE="N",vi=fi.POLYFILL="P",yi=fi,bi=q,_i=ga.f,wi=$t,Ai=Ke.exports,ki=W,Ei=ui,xi=yi,Ri=function(e,t){var n,r,a,i,s,o=e.target,d=e.global,u=e.stat;if(n=d?bi:u?bi[o]||ki(o,{}):(bi[o]||{}).prototype)for(r in t){if(i=t[r],a=e.noTargetGet?(s=_i(n,r))&&s.value:n[r],!xi(d?r:o+(u?".":"#")+r,e.forced)&&void 0!==a){if(typeof i==typeof a)continue;Ei(i,a)}(e.sham||a&&a.sham)&&wi(i,"sham",!0),Ai(n,r,i,e)}},Si=$a,Di=Qa,Ti=Object.keys||function(e){return Si(e,Di)},Ii=ie,Oi=Ti;Ri({target:"Object",stat:!0,forced:Se((function(){Oi(1)}))},{keys:function(e){return Oi(Ii(e))}});var Pi=Array.isArray,Ci=Object.prototype.toString,Li=Pi||function(e){return!!e&&"[object Array]"==Ci.call(e)},Ui={name:"@bygd/gd-sdk-pes",version:"1.29.41",files:["dist/*"],scripts:{build:"NODE_ENV=production rollup --config",watch:"rollup --config --watch --sourcemap --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",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"}},Mi=function(e){var t=ji("object"===E.default(e)?e:a.parseJSON(e));return t&&t.version?Ui.version>=t.version?t:void 0:t},ji=function(e){var t=this;if(!Li(e)||0===e.length)return e;if(1===e.length)return e[0];var n=0;e.forEach(function(e){k.default(this,t),e.weight=e.weight||1,n+=e.weight}.bind(this));var r=Math.floor(Math.random()*Math.floor(n));n=0;for(var a=0;a<e.length;a++){var i=e[a];if(r<(n+=i.weight))return i}},Gi=function(){var e;(e=console).log.apply(e,arguments)},Bi=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 qi,Ni={},Fi=Function.prototype,Vi=Fi.apply,Wi=Fi.bind,Ki=Fi.call,Hi="object"==typeof Reflect&&Reflect.apply||(Wi?Ki.bind(Vi):function(){return Ki.apply(Vi,arguments)}),zi=nr,$i=q.String,Qi=function(e){if("Symbol"===zi(e))throw TypeError("Cannot convert a Symbol value to a string");return $i(e)},Yi=ze,Ji=st,Xi=ka,Zi=Ti,es=He?Object.defineProperties:function(e,t){Ji(e);for(var n,r=Xi(t),a=Zi(t),i=a.length,s=0;i>s;)Yi.f(e,n=a[s++],r[n]);return e},ts=ye("document","documentElement"),ns=st,rs=es,as=Qa,is=ln,ss=ts,os=Ze,ds=cn("IE_PROTO"),us=function(){},cs=function(e){return"<script>"+e+"<\/script>"},ls=function(e){e.write(cs("")),e.close();var t=e.parentWindow.Object;return e=null,t},hs=function(){try{qi=new ActiveXObject("htmlfile")}catch(e){}var e,t;hs="undefined"!=typeof document?document.domain&&qi?ls(qi):((t=os("iframe")).style.display="none",ss.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(cs("document.F=Object")),e.close(),e.F):ls(qi);for(var n=as.length;n--;)delete hs.prototype[as[n]];return hs()};is[ds]=!0;var fs=Object.create||function(e,t){var n;return null!==e?(us.prototype=ns(e),n=new us,us.prototype=null,n[ds]=e):n=hs(),void 0===t?n:rs(n,t)},ps={},ms=ee([].slice),gs=$n,vs=ka,ys=Ca.f,bs=ms,_s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];ps.f=function(e){return _s&&"Window"==gs(e)?function(e){try{return ys(e)}catch(e){return bs(_s)}}(e):ys(vs(e))};var ws={},As=Fe;ws.f=As;var ks=q,Es=de,xs=ws,Rs=ze.f,Ss=function(e){var t=ks.Symbol||(ks.Symbol={});Es(t,e)||Rs(t,e,{value:xs.f(e)})},Ds=ze.f,Ts=de,Is=Fe("toStringTag"),Os=function(e,t,n){e&&!Ts(e=n?e:e.prototype,Is)&&Ds(e,Is,{configurable:!0,value:t})},Ps=Ri,Cs=q,Ls=ye,Us=Hi,Ms=dt,js=ee,Gs=He,Bs=Ie,Ns=Se,Fs=de,Vs=Ir,Ws=pe,Ks=Qe,Hs=ut,zs=mt,$s=st,Qs=ie,Ys=ka,Js=Gt,Xs=Qi,Zs=Kt,eo=fs,to=Ti,no=Ca,ro=ps,ao=Xa,io=ga,so=ze,oo=va,uo=ms,co=Ke.exports,lo=N.exports,ho=ln,fo=fe,po=Fe,mo=ws,go=Ss,vo=Os,yo=Dn,bo=ia.forEach,_o=cn("hidden"),wo=po("toPrimitive"),Ao=yo.set,ko=yo.getterFor("Symbol"),Eo=Object.prototype,xo=Cs.Symbol,Ro=xo&&xo.prototype,So=Cs.TypeError,Do=Cs.QObject,To=Ls("JSON","stringify"),Io=io.f,Oo=so.f,Po=ro.f,Co=oo.f,Lo=js([].push),Uo=lo("symbols"),Mo=lo("op-symbols"),jo=lo("string-to-symbol-registry"),Go=lo("symbol-to-string-registry"),Bo=lo("wks"),qo=!Do||!Do.prototype||!Do.prototype.findChild,No=Gs&&Ns((function(){return 7!=eo(Oo({},"a",{get:function(){return Oo(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=Io(Eo,t);r&&delete Eo[t],Oo(e,t,n),r&&e!==Eo&&Oo(Eo,t,r)}:Oo,Fo=function(e,t){var n=Uo[e]=eo(Ro);return Ao(n,{type:"Symbol",tag:e,description:t}),Gs||(n.description=t),n},Vo=function(e,t,n){e===Eo&&Vo(Mo,t,n),$s(e);var r=Js(t);return $s(n),Fs(Uo,r)?(n.enumerable?(Fs(e,_o)&&e[_o][r]&&(e[_o][r]=!1),n=eo(n,{enumerable:Zs(0,!1)})):(Fs(e,_o)||Oo(e,_o,Zs(1,{})),e[_o][r]=!0),No(e,r,n)):Oo(e,r,n)},Wo=function(e,t){$s(e);var n=Ys(t),r=to(n).concat($o(n));return bo(r,(function(t){Gs&&!Ms(Ko,n,t)||Vo(e,t,n[t])})),e},Ko=function(e){var t=Js(e),n=Ms(Co,this,t);return!(this===Eo&&Fs(Uo,t)&&!Fs(Mo,t))&&(!(n||!Fs(this,t)||!Fs(Uo,t)||Fs(this,_o)&&this[_o][t])||n)},Ho=function(e,t){var n=Ys(e),r=Js(t);if(n!==Eo||!Fs(Uo,r)||Fs(Mo,r)){var a=Io(n,r);return!a||!Fs(Uo,r)||Fs(n,_o)&&n[_o][r]||(a.enumerable=!0),a}},zo=function(e){var t=Po(Ys(e)),n=[];return bo(t,(function(e){Fs(Uo,e)||Fs(ho,e)||Lo(n,e)})),n},$o=function(e){var t=e===Eo,n=Po(t?Mo:Ys(e)),r=[];return bo(n,(function(e){!Fs(Uo,e)||t&&!Fs(Eo,e)||Lo(r,Uo[e])})),r};(Bs||(co(Ro=(xo=function(){if(Hs(Ro,this))throw So("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?Xs(arguments[0]):void 0,t=fo(e),n=function(e){this===Eo&&Ms(n,Mo,e),Fs(this,_o)&&Fs(this[_o],t)&&(this[_o][t]=!1),No(this,t,Zs(1,e))};return Gs&&qo&&No(Eo,t,{configurable:!0,set:n}),Fo(t,e)}).prototype,"toString",(function(){return ko(this).tag})),co(xo,"withoutSetter",(function(e){return Fo(fo(e),e)})),oo.f=Ko,so.f=Vo,io.f=Ho,no.f=ro.f=zo,ao.f=$o,mo.f=function(e){return Fo(po(e),e)},Gs&&(Oo(Ro,"description",{configurable:!0,get:function(){return ko(this).description}}),co(Eo,"propertyIsEnumerable",Ko,{unsafe:!0}))),Ps({global:!0,wrap:!0,forced:!Bs,sham:!Bs},{Symbol:xo}),bo(to(Bo),(function(e){go(e)})),Ps({target:"Symbol",stat:!0,forced:!Bs},{for:function(e){var t=Xs(e);if(Fs(jo,t))return jo[t];var n=xo(t);return jo[t]=n,Go[n]=t,n},keyFor:function(e){if(!zs(e))throw So(e+" is not a symbol");if(Fs(Go,e))return Go[e]},useSetter:function(){qo=!0},useSimple:function(){qo=!1}}),Ps({target:"Object",stat:!0,forced:!Bs,sham:!Gs},{create:function(e,t){return void 0===t?eo(e):Wo(eo(e),t)},defineProperty:Vo,defineProperties:Wo,getOwnPropertyDescriptor:Ho}),Ps({target:"Object",stat:!0,forced:!Bs},{getOwnPropertyNames:zo,getOwnPropertySymbols:$o}),Ps({target:"Object",stat:!0,forced:Ns((function(){ao.f(1)}))},{getOwnPropertySymbols:function(e){return ao.f(Qs(e))}}),To)&&Ps({target:"JSON",stat:!0,forced:!Bs||Ns((function(){var e=xo();return"[null]"!=To([e])||"{}"!=To({a:e})||"{}"!=To(Object(e))}))},{stringify:function(e,t,n){var r=uo(arguments),a=t;if((Ks(t)||void 0!==e)&&!zs(e))return Vs(t)||(t=function(e,t){if(Ws(a)&&(t=Ms(a,this,e,t)),!zs(t))return t}),r[1]=t,Us(To,null,r)}});if(!Ro[wo]){var Qo=Ro.valueOf;co(Ro,wo,(function(e){return Ms(Qo,this)}))}vo(xo,"Symbol"),ho[_o]=!0;var Yo=Se,Jo=Re,Xo=Fe("species"),Zo=function(e){return Jo>=51||!Yo((function(){var t=[];return(t.constructor={})[Xo]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},ed=ia.filter;Ri({target:"Array",proto:!0,forced:!Zo("filter")},{filter:function(e){return ed(this,e,arguments.length>1?arguments[1]:void 0)}});var td=Ri,nd=Se,rd=ka,ad=ga.f,id=He,sd=nd((function(){ad(1)}));td({target:"Object",stat:!0,forced:!id||sd,sham:!id},{getOwnPropertyDescriptor:function(e,t){return ad(rd(e),t)}});var od=Gt,dd=ze,ud=Kt,cd=function(e,t,n){var r=od(t);r in e?dd.f(e,r,ud(0,n)):e[r]=n},ld=ai,hd=ka,fd=ga,pd=cd;Ri({target:"Object",stat:!0,sham:!He},{getOwnPropertyDescriptors:function(e){for(var t,n,r=hd(e),a=fd.f,i=ld(r),s={},o=0;i.length>o;)void 0!==(n=a(r,t=i[o++]))&&pd(s,t,n);return s}});var md=Ri,gd=q,vd=Ir,yd=Vr,bd=Qe,_d=ja,wd=Dr,Ad=ka,kd=cd,Ed=Fe,xd=ms,Rd=Zo("slice"),Sd=Ed("species"),Dd=gd.Array,Td=Math.max;md({target:"Array",proto:!0,forced:!Rd},{slice:function(e,t){var n,r,a,i=Ad(this),s=wd(i),o=_d(e,s),d=_d(void 0===t?s:t,s);if(vd(i)&&(n=i.constructor,(yd(n)&&(n===Dd||vd(n.prototype))||bd(n)&&null===(n=n[Sd]))&&(n=void 0),n===Dd||void 0===n))return xd(i,o,d);for(r=new(void 0===n?Dd:n)(Td(d-o,0)),a=0;o<d;o++,a++)o in i&&kd(r,a,i[o]);return r.length=a,r}});var Id=dt,Od=st,Pd=kt,Cd=function(e,t,n){var r,a;Od(e);try{if(!(r=Pd(e,"return"))){if("throw"===t)throw n;return n}r=Id(r,e)}catch(e){a=!0,r=e}if("throw"===t)throw n;if(a)throw r;return Od(r),n},Ld=st,Ud=Cd,Md={},jd=Md,Gd=Fe("iterator"),Bd=Array.prototype,qd=function(e){return void 0!==e&&(jd.Array===e||Bd[Gd]===e)},Nd=nr,Fd=kt,Vd=Md,Wd=Fe("iterator"),Kd=function(e){if(null!=e)return Fd(e,Wd)||Fd(e,"@@iterator")||Vd[Nd(e)]},Hd=dt,zd=wt,$d=st,Qd=vt,Yd=Kd,Jd=q.TypeError,Xd=function(e,t){var n=arguments.length<2?Yd(e):t;if(zd(n))return $d(Hd(n,e));throw Jd(Qd(e)+" is not iterable")},Zd=pr,eu=dt,tu=ie,nu=function(e,t,n,r){try{return r?t(Ld(n)[0],n[1]):t(n)}catch(t){Ud(e,"throw",t)}},ru=qd,au=Vr,iu=Dr,su=cd,ou=Xd,du=Kd,uu=q.Array,cu=function(e){var t=tu(e),n=au(this),r=arguments.length,a=r>1?arguments[1]:void 0,i=void 0!==a;i&&(a=Zd(a,r>2?arguments[2]:void 0));var s,o,d,u,c,l,h=du(t),f=0;if(!h||this==uu&&ru(h))for(s=iu(t),o=n?new this(s):uu(s);s>f;f++)l=i?a(t[f],f):t[f],su(o,f,l);else for(c=(u=ou(t,h)).next,o=n?new this:[];!(d=eu(c,u)).done;f++)l=i?nu(u,a,[d.value,f],!0):d.value,su(o,f,l);return o.length=f,o},lu=Fe("iterator"),hu=!1;try{var fu=0,pu={next:function(){return{done:!!fu++}},return:function(){hu=!0}};pu[lu]=function(){return this},Array.from(pu,(function(){throw 2}))}catch(e){}var mu=function(e,t){if(!t&&!hu)return!1;var n=!1;try{var r={};r[lu]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch(e){}return n},gu=cu;Ri({target:"Array",stat:!0,forced:!mu((function(e){Array.from(e)}))},{from:gu});var vu,yu,bu,_u=ee,wu=kr,Au=Qi,ku=ne,Eu=_u("".charAt),xu=_u("".charCodeAt),Ru=_u("".slice),Su=function(e){return function(t,n){var r,a,i=Au(ku(t)),s=wu(n),o=i.length;return s<0||s>=o?e?"":void 0:(r=xu(i,s))<55296||r>56319||s+1===o||(a=xu(i,s+1))<56320||a>57343?e?Eu(i,s):r:e?Ru(i,s,s+2):a-56320+(r-55296<<10)+65536}},Du={codeAt:Su(!1),charAt:Su(!0)},Tu=!Se((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),Iu=q,Ou=de,Pu=pe,Cu=ie,Lu=Tu,Uu=cn("IE_PROTO"),Mu=Iu.Object,ju=Mu.prototype,Gu=Lu?Mu.getPrototypeOf:function(e){var t=Cu(e);if(Ou(t,Uu))return t[Uu];var n=t.constructor;return Pu(n)&&t instanceof n?n.prototype:t instanceof Mu?ju:null},Bu=Se,qu=pe,Nu=Gu,Fu=Ke.exports,Vu=Fe("iterator"),Wu=!1;[].keys&&("next"in(bu=[].keys())?(yu=Nu(Nu(bu)))!==Object.prototype&&(vu=yu):Wu=!0);var Ku=null==vu||Bu((function(){var e={};return vu[Vu].call(e)!==e}));Ku&&(vu={}),qu(vu[Vu])||Fu(vu,Vu,(function(){return this}));var Hu={IteratorPrototype:vu,BUGGY_SAFARI_ITERATORS:Wu},zu=Hu.IteratorPrototype,$u=fs,Qu=Kt,Yu=Os,Ju=Md,Xu=function(){return this},Zu=function(e,t,n){var r=t+" Iterator";return e.prototype=$u(zu,{next:Qu(1,n)}),Yu(e,r,!1),Ju[r]=Xu,e},ec=q,tc=pe,nc=ec.String,rc=ec.TypeError,ac=ee,ic=st,sc=function(e){if("object"==typeof e||tc(e))return e;throw rc("Can't set "+nc(e)+" as a prototype")},oc=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=ac(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(n,[]),t=n instanceof Array}catch(e){}return function(n,r){return ic(n),sc(r),t?e(n,r):n.__proto__=r,n}}():void 0),dc=Ri,uc=dt,cc=Ln,lc=pe,hc=Zu,fc=Gu,pc=oc,mc=Os,gc=$t,vc=Ke.exports,yc=Md,bc=cc.PROPER,_c=cc.CONFIGURABLE,wc=Hu.IteratorPrototype,Ac=Hu.BUGGY_SAFARI_ITERATORS,kc=Fe("iterator"),Ec=function(){return this},xc=function(e,t,n,r,a,i,s){hc(n,t,r);var o,d,u,c=function(e){if(e===a&&m)return m;if(!Ac&&e in f)return f[e];switch(e){case"keys":case"values":case"entries":return function(){return new n(this,e)}}return function(){return new n(this)}},l=t+" Iterator",h=!1,f=e.prototype,p=f[kc]||f["@@iterator"]||a&&f[a],m=!Ac&&p||c(a),g="Array"==t&&f.entries||p;if(g&&(o=fc(g.call(new e)))!==Object.prototype&&o.next&&(fc(o)!==wc&&(pc?pc(o,wc):lc(o[kc])||vc(o,kc,Ec)),mc(o,l,!0)),bc&&"values"==a&&p&&"values"!==p.name&&(_c?gc(f,"name","values"):(h=!0,m=function(){return uc(p,this)})),a)if(d={values:c("values"),keys:i?m:c("keys"),entries:c("entries")},s)for(u in d)(Ac||h||!(u in f))&&vc(f,u,d[u]);else dc({target:t,proto:!0,forced:Ac||h},d);return f[kc]!==m&&vc(f,kc,m,{name:a}),yc[t]=m,d},Rc=Du.charAt,Sc=Qi,Dc=Dn,Tc=xc,Ic=Dc.set,Oc=Dc.getterFor("String Iterator");Tc(String,"String",(function(e){Ic(this,{type:"String Iterator",string:Sc(e),index:0})}),(function(){var e,t=Oc(this),n=t.string,r=t.index;return r>=n.length?{value:void 0,done:!0}:(e=Rc(n,r),t.index+=e.length,{value:e,done:!1})}));var Pc=st,Cc=function(){var e=Pc(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t},Lc={},Uc=Se,Mc=q.RegExp;Lc.UNSUPPORTED_Y=Uc((function(){var e=Mc("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),Lc.BROKEN_CARET=Uc((function(){var e=Mc("^r","gy");return e.lastIndex=2,null!=e.exec("str")}));var jc=Se,Gc=q.RegExp,Bc=jc((function(){var e=Gc(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)})),qc=Se,Nc=q.RegExp,Fc=qc((function(){var e=Nc("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),Vc=dt,Wc=ee,Kc=Qi,Hc=Cc,zc=Lc,$c=N.exports,Qc=fs,Yc=Dn.get,Jc=Bc,Xc=Fc,Zc=$c("native-string-replace",String.prototype.replace),el=RegExp.prototype.exec,tl=el,nl=Wc("".charAt),rl=Wc("".indexOf),al=Wc("".replace),il=Wc("".slice),sl=function(){var e=/a/,t=/b*/g;return Vc(el,e,"a"),Vc(el,t,"a"),0!==e.lastIndex||0!==t.lastIndex}(),ol=zc.UNSUPPORTED_Y||zc.BROKEN_CARET,dl=void 0!==/()??/.exec("")[1];(sl||dl||ol||Jc||Xc)&&(tl=function(e){var t,n,r,a,i,s,o,d=this,u=Yc(d),c=Kc(e),l=u.raw;if(l)return l.lastIndex=d.lastIndex,t=Vc(tl,l,c),d.lastIndex=l.lastIndex,t;var h=u.groups,f=ol&&d.sticky,p=Vc(Hc,d),m=d.source,g=0,v=c;if(f&&(p=al(p,"y",""),-1===rl(p,"g")&&(p+="g"),v=il(c,d.lastIndex),d.lastIndex>0&&(!d.multiline||d.multiline&&"\n"!==nl(c,d.lastIndex-1))&&(m="(?: "+m+")",v=" "+v,g++),n=new RegExp("^(?:"+m+")",p)),dl&&(n=new RegExp("^"+m+"$(?!\\s)",p)),sl&&(r=d.lastIndex),a=Vc(el,f?n:d,v),f?a?(a.input=il(a.input,g),a[0]=il(a[0],g),a.index=d.lastIndex,d.lastIndex+=a[0].length):d.lastIndex=0:sl&&a&&(d.lastIndex=d.global?a.index+a[0].length:r),dl&&a&&a.length>1&&Vc(Zc,a[0],n,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(a[i]=void 0)})),a&&h)for(a.groups=s=Qc(null),i=0;i<h.length;i++)s[(o=h[i])[0]]=a[o[1]];return a});var ul=tl;Ri({target:"RegExp",proto:!0,forced:/./.exec!==ul},{exec:ul});var cl=Ri,ll=He,hl=q,fl=ee,pl=de,ml=pe,gl=ut,vl=Qi,yl=ze.f,bl=ui,_l=hl.Symbol,wl=_l&&_l.prototype;if(ll&&ml(_l)&&(!("description"in wl)||void 0!==_l().description)){var Al={},kl=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:vl(arguments[0]),t=gl(wl,this)?new _l(e):void 0===e?_l():_l(e);return""===e&&(Al[t]=!0),t};bl(kl,_l),kl.prototype=wl,wl.constructor=kl;var El="Symbol(test)"==String(_l("test")),xl=fl(wl.toString),Rl=fl(wl.valueOf),Sl=/^Symbol\((.*)\)[^)]+$/,Dl=fl("".replace),Tl=fl("".slice);yl(wl,"description",{configurable:!0,get:function(){var e=Rl(this),t=xl(e);if(pl(Al,e))return"";var n=El?Tl(t,7,-1):Dl(t,Sl,"$1");return""===n?void 0:n}}),cl({global:!0,forced:!0},{Symbol:kl})}Ss("iterator");var Il=fs,Ol=ze,Pl=Fe("unscopables"),Cl=Array.prototype;null==Cl[Pl]&&Ol.f(Cl,Pl,{configurable:!0,value:Il(null)});var Ll=function(e){Cl[Pl][e]=!0},Ul=ka,Ml=Ll,jl=Md,Gl=Dn,Bl=xc,ql=Gl.set,Nl=Gl.getterFor("Array Iterator"),Fl=Bl(Array,"Array",(function(e,t){ql(this,{type:"Array Iterator",target:Ul(e),index:0,kind:t})}),(function(){var e=Nl(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}}),"values");jl.Arguments=jl.Array,Ml("keys"),Ml("values"),Ml("entries");var Vl=q,Wl=dr,Kl=lr,Hl=Fl,zl=$t,$l=Fe,Ql=$l("iterator"),Yl=$l("toStringTag"),Jl=Hl.values,Xl=function(e,t){if(e){if(e[Ql]!==Jl)try{zl(e,Ql,Jl)}catch(t){e[Ql]=Jl}if(e[Yl]||zl(e,Yl,t),Wl[t])for(var n in Hl)if(e[n]!==Hl[n])try{zl(e,n,Hl[n])}catch(t){e[n]=Hl[n]}}};for(var Zl in Wl)Xl(Vl[Zl]&&Vl[Zl].prototype,Zl);Xl(Kl,"DOMTokenList");var eh,th,nh,rh,ah=q.Promise,ih=Ke.exports,sh=function(e,t,n){for(var r in t)ih(e,r,t[r],n);return e},oh=ye,dh=ze,uh=He,ch=Fe("species"),lh=function(e){var t=oh(e),n=dh.f;uh&&t&&!t[ch]&&n(t,ch,{configurable:!0,get:function(){return this}})},hh=ut,fh=q.TypeError,ph=function(e,t){if(hh(t,e))return e;throw fh("Incorrect invocation")},mh=pr,gh=dt,vh=st,yh=vt,bh=qd,_h=Dr,wh=ut,Ah=Xd,kh=Kd,Eh=Cd,xh=q.TypeError,Rh=function(e,t){this.stopped=e,this.result=t},Sh=Rh.prototype,Dh=Vr,Th=vt,Ih=q.TypeError,Oh=st,Ph=function(e){if(Dh(e))return e;throw Ih(Th(e)+" is not a constructor")},Ch=Fe("species"),Lh=function(e,t){var n,r=Oh(e).constructor;return void 0===r||null==(n=Oh(r)[Ch])?t:Ph(n)},Uh=/(?:ipad|iphone|ipod).*applewebkit/i.test(be),Mh="process"==$n(q.process),jh=q,Gh=Hi,Bh=pr,qh=pe,Nh=de,Fh=Se,Vh=ts,Wh=ms,Kh=Ze,Hh=Uh,zh=Mh,$h=jh.setImmediate,Qh=jh.clearImmediate,Yh=jh.process,Jh=jh.Dispatch,Xh=jh.Function,Zh=jh.MessageChannel,ef=jh.String,tf=0,nf={};try{eh=jh.location}catch(e){}var rf=function(e){if(Nh(nf,e)){var t=nf[e];delete nf[e],t()}},af=function(e){return function(){rf(e)}},sf=function(e){rf(e.data)},of=function(e){jh.postMessage(ef(e),eh.protocol+"//"+eh.host)};$h&&Qh||($h=function(e){var t=Wh(arguments,1);return nf[++tf]=function(){Gh(qh(e)?e:Xh(e),void 0,t)},th(tf),tf},Qh=function(e){delete nf[e]},zh?th=function(e){Yh.nextTick(af(e))}:Jh&&Jh.now?th=function(e){Jh.now(af(e))}:Zh&&!Hh?(rh=(nh=new Zh).port2,nh.port1.onmessage=sf,th=Bh(rh.postMessage,rh)):jh.addEventListener&&qh(jh.postMessage)&&!jh.importScripts&&eh&&"file:"!==eh.protocol&&!Fh(of)?(th=of,jh.addEventListener("message",sf,!1)):th="onreadystatechange"in Kh("script")?function(e){Vh.appendChild(Kh("script")).onreadystatechange=function(){Vh.removeChild(this),rf(e)}}:function(e){setTimeout(af(e),0)});var df,uf,cf,lf,hf,ff,pf,mf,gf={set:$h,clear:Qh},vf=q,yf=/ipad|iphone|ipod/i.test(be)&&void 0!==vf.Pebble,bf=/web0s(?!.*chrome)/i.test(be),_f=q,wf=pr,Af=ga.f,kf=gf.set,Ef=Uh,xf=yf,Rf=bf,Sf=Mh,Df=_f.MutationObserver||_f.WebKitMutationObserver,Tf=_f.document,If=_f.process,Of=_f.Promise,Pf=Af(_f,"queueMicrotask"),Cf=Pf&&Pf.value;Cf||(df=function(){var e,t;for(Sf&&(e=If.domain)&&e.exit();uf;){t=uf.fn,uf=uf.next;try{t()}catch(e){throw uf?lf():cf=void 0,e}}cf=void 0,e&&e.enter()},Ef||Sf||Rf||!Df||!Tf?!xf&&Of&&Of.resolve?((pf=Of.resolve(void 0)).constructor=Of,mf=wf(pf.then,pf),lf=function(){mf(df)}):Sf?lf=function(){If.nextTick(df)}:(kf=wf(kf,_f),lf=function(){kf(df)}):(hf=!0,ff=Tf.createTextNode(""),new Df(df).observe(ff,{characterData:!0}),lf=function(){ff.data=hf=!hf}));var Lf=Cf||function(e){var t={fn:e,next:void 0};cf&&(cf.next=t),uf||(uf=t,lf()),cf=t},Uf={},Mf=wt,jf=function(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=r})),this.resolve=Mf(t),this.reject=Mf(n)};Uf.f=function(e){return new jf(e)};var Gf,Bf,qf,Nf,Ff=st,Vf=Qe,Wf=Uf,Kf=function(e,t){if(Ff(e),Vf(t)&&t.constructor===e)return t;var n=Wf.f(e);return(0,n.resolve)(t),n.promise},Hf=q,zf="object"==typeof window,$f=Ri,Qf=q,Yf=ye,Jf=dt,Xf=ah,Zf=Ke.exports,ep=sh,tp=oc,np=Os,rp=lh,ap=wt,ip=pe,sp=Qe,op=ph,dp=tn,up=function(e,t,n){var r,a,i,s,o,d,u,c=n&&n.that,l=!(!n||!n.AS_ENTRIES),h=!(!n||!n.IS_ITERATOR),f=!(!n||!n.INTERRUPTED),p=mh(t,c),m=function(e){return r&&Eh(r,"normal",e),new Rh(!0,e)},g=function(e){return l?(vh(e),f?p(e[0],e[1],m):p(e[0],e[1])):f?p(e,m):p(e)};if(h)r=e;else{if(!(a=kh(e)))throw xh(yh(e)+" is not iterable");if(bh(a)){for(i=0,s=_h(e);s>i;i++)if((o=g(e[i]))&&wh(Sh,o))return o;return new Rh(!1)}r=Ah(e,a)}for(d=r.next;!(u=gh(d,r)).done;){try{o=g(u.value)}catch(e){Eh(r,"throw",e)}if("object"==typeof o&&o&&wh(Sh,o))return o}return new Rh(!1)},cp=mu,lp=Lh,hp=gf.set,fp=Lf,pp=Kf,mp=function(e,t){var n=Hf.console;n&&n.error&&(1==arguments.length?n.error(e):n.error(e,t))},gp=Uf,vp=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},yp=Dn,bp=yi,_p=zf,wp=Mh,Ap=Re,kp=Fe("species"),Ep=yp.get,xp=yp.set,Rp=yp.getterFor("Promise"),Sp=Xf&&Xf.prototype,Dp=Xf,Tp=Sp,Ip=Qf.TypeError,Op=Qf.document,Pp=Qf.process,Cp=gp.f,Lp=Cp,Up=!!(Op&&Op.createEvent&&Qf.dispatchEvent),Mp=ip(Qf.PromiseRejectionEvent),jp=!1,Gp=bp("Promise",(function(){var e=dp(Dp),t=e!==String(Dp);if(!t&&66===Ap)return!0;if(Ap>=51&&/native code/.test(e))return!1;var n=new Dp((function(e){e(1)})),r=function(e){e((function(){}),(function(){}))};return(n.constructor={})[kp]=r,!(jp=n.then((function(){}))instanceof r)||!t&&_p&&!Mp})),Bp=Gp||!cp((function(e){Dp.all(e).catch((function(){}))})),qp=function(e){var t;return!(!sp(e)||!ip(t=e.then))&&t},Np=function(e,t){if(!e.notified){e.notified=!0;var n=e.reactions;fp((function(){for(var r=e.value,a=1==e.state,i=0;n.length>i;){var s,o,d,u=n[i++],c=a?u.ok:u.fail,l=u.resolve,h=u.reject,f=u.domain;try{c?(a||(2===e.rejection&&Kp(e),e.rejection=1),!0===c?s=r:(f&&f.enter(),s=c(r),f&&(f.exit(),d=!0)),s===u.promise?h(Ip("Promise-chain cycle")):(o=qp(s))?Jf(o,s,l,h):l(s)):h(r)}catch(e){f&&!d&&f.exit(),h(e)}}e.reactions=[],e.notified=!1,t&&!e.rejection&&Vp(e)}))}},Fp=function(e,t,n){var r,a;Up?((r=Op.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),Qf.dispatchEvent(r)):r={promise:t,reason:n},!Mp&&(a=Qf["on"+e])?a(r):"unhandledrejection"===e&&mp("Unhandled promise rejection",n)},Vp=function(e){Jf(hp,Qf,(function(){var t,n=e.facade,r=e.value;if(Wp(e)&&(t=vp((function(){wp?Pp.emit("unhandledRejection",r,n):Fp("unhandledrejection",n,r)})),e.rejection=wp||Wp(e)?2:1,t.error))throw t.value}))},Wp=function(e){return 1!==e.rejection&&!e.parent},Kp=function(e){Jf(hp,Qf,(function(){var t=e.facade;wp?Pp.emit("rejectionHandled",t):Fp("rejectionhandled",t,e.value)}))},Hp=function(e,t,n){return function(r){e(t,r,n)}},zp=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,Np(e,!0))},$p=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw Ip("Promise can't be resolved itself");var r=qp(t);r?fp((function(){var n={done:!1};try{Jf(r,t,Hp($p,n,e),Hp(zp,n,e))}catch(t){zp(n,t,e)}})):(e.value=t,e.state=1,Np(e,!1))}catch(t){zp({done:!1},t,e)}}};if(Gp&&(Tp=(Dp=function(e){op(this,Tp),ap(e),Jf(Gf,this);var t=Ep(this);try{e(Hp($p,t),Hp(zp,t))}catch(e){zp(t,e)}}).prototype,(Gf=function(e){xp(this,{type:"Promise",done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=ep(Tp,{then:function(e,t){var n=Rp(this),r=n.reactions,a=Cp(lp(this,Dp));return a.ok=!ip(e)||e,a.fail=ip(t)&&t,a.domain=wp?Pp.domain:void 0,n.parent=!0,r[r.length]=a,0!=n.state&&Np(n,!1),a.promise},catch:function(e){return this.then(void 0,e)}}),Bf=function(){var e=new Gf,t=Ep(e);this.promise=e,this.resolve=Hp($p,t),this.reject=Hp(zp,t)},gp.f=Cp=function(e){return e===Dp||e===qf?new Bf(e):Lp(e)},ip(Xf)&&Sp!==Object.prototype)){Nf=Sp.then,jp||(Zf(Sp,"then",(function(e,t){var n=this;return new Dp((function(e,t){Jf(Nf,n,e,t)})).then(e,t)}),{unsafe:!0}),Zf(Sp,"catch",Tp.catch,{unsafe:!0}));try{delete Sp.constructor}catch(e){}tp&&tp(Sp,Tp)}$f({global:!0,wrap:!0,forced:Gp},{Promise:Dp}),np(Dp,"Promise",!1),rp("Promise"),qf=Yf("Promise"),$f({target:"Promise",stat:!0,forced:Gp},{reject:function(e){var t=Cp(this);return Jf(t.reject,void 0,e),t.promise}}),$f({target:"Promise",stat:!0,forced:Gp},{resolve:function(e){return pp(this,e)}}),$f({target:"Promise",stat:!0,forced:Bp},{all:function(e){var t=this,n=Cp(t),r=n.resolve,a=n.reject,i=vp((function(){var n=ap(t.resolve),i=[],s=0,o=1;up(e,(function(e){var d=s++,u=!1;o++,Jf(n,t,e).then((function(e){u||(u=!0,i[d]=e,--o||r(i))}),a)})),--o||r(i)}));return i.error&&a(i.value),n.promise},race:function(e){var t=this,n=Cp(t),r=n.reject,a=vp((function(){var a=ap(t.resolve);up(e,(function(e){Jf(a,t,e).then(n.resolve,r)}))}));return a.error&&r(a.value),n.promise}});var Qp=Ri,Yp=q,Jp=Se,Xp=Ir,Zp=Qe,em=ie,tm=Dr,nm=cd,rm=Jr,am=Zo,im=Re,sm=Fe("isConcatSpreadable"),om=Yp.TypeError,dm=im>=51||!Jp((function(){var e=[];return e[sm]=!1,e.concat()[0]!==e})),um=am("concat"),cm=function(e){if(!Zp(e))return!1;var t=e[sm];return void 0!==t?!!t:Xp(e)};Qp({target:"Array",proto:!0,forced:!dm||!um},{concat:function(e){var t,n,r,a,i,s=em(this),o=rm(s,0),d=0;for(t=-1,r=arguments.length;t<r;t++)if(cm(i=-1===t?s:arguments[t])){if(d+(a=tm(i))>9007199254740991)throw om("Maximum allowed index exceeded");for(n=0;n<a;n++,d++)n in i&&nm(o,d,i[n])}else{if(d>=9007199254740991)throw om("Maximum allowed index exceeded");nm(o,d++,i)}return o.length=d,o}});var lm=He,hm=Ln.EXISTS,fm=ee,pm=ze.f,mm=Function.prototype,gm=fm(mm.toString),vm=/^\s*function ([^ (]*)/,ym=fm(vm.exec);function bm(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 _m(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 _m(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}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 i,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,i=e},f:function(){try{s||null==n.return||n.return()}finally{if(o)throw i}}}}function _m(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 wm(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 Am(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?wm(Object(n),!0).forEach((function(t){S.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wm(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}lm&&!hm&&pm(mm,"name",{configurable:!0,get:function(){try{return ym(vm,gm(this))[1]}catch(e){return""}}});var km,Em={react:{src:"https://pm.gamedistribution.com/react/16.14.0/umd/react.production.min.js",name:"React"},"react-dom":{src:"https://pm.gamedistribution.com/react-dom/16.14.0/umd/react-dom.production.min.js",name:"ReactDOM"},redux:{src:"https://pm.gamedistribution.com/redux/4.0.5/dist/redux.min.js",name:"Redux"},"react-redux":{src:"https://pm.gamedistribution.com/react-redux/7.2.1/dist/react-redux.min.js",name:"ReactRedux"},"material-ui-core":{src:"https://pm.gamedistribution.com/@material-ui/core/4.11.3/umd/material-ui.production.min.js",name:"MaterialUI"}},xm={},Rm=function(e,t){xm[e]=Am(Am({},t),{},{isLoading:!1})},Sm=function(e){var t=this,n=e.id,r=e.src;return new Promise(function(e,a){if(k.default(this,t),document.getElementById(n))e();else{var i=document.createElement("script");i.onload=function(){e()},i.id=n,i.setAttribute("crossorigin",!0),i.src=r,document.head.appendChild(i)}}.bind(this))},Dm=function(){var e=A.default(x.default.mark((function e(t){var n,r,a,i,s,o,d,u;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n=window[t])){e.next=3;break}return e.abrupt("return",n);case 3:if(!(r=xm[t]).isLoading){e.next=6;break}return e.abrupt("return");case 6:r.isLoading=!0,a=bm(r.dependencies),e.prev=8,a.s();case 10:if((i=a.n()).done){e.next=26;break}if(s=i.value,e.prev=12,o=Em[s].name,!window[o]){e.next=16;break}return e.abrupt("continue",24);case 16:return e.next=18,Sm({id:s,src:Em[s].src});case 18:e.next=24;break;case 20:e.prev=20,e.t0=e.catch(12),d=s.id,u=s.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,Sm({id:t,src:r.source});case 37:n=window[t],e.next=43;break;case 40:e.prev=40,e.t2=e.catch(34),console.log("Could not load module ".concat(t," ").concat(r.source,"."),e.t2);case 43:return r.isLoading=!1,e.abrupt("return",n);case 45:case"end":return e.stop()}}),e,null,[[8,28,31,34],[12,20],[34,40]])})));return function(t){return e.apply(this,arguments)}}(),Tm=new function e(){var t=this;R.default(this,e),S.default(this,"load",A.default(x.default.mark((function e(){return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Dm("Leaderboard");case 2:t.leaderboard=e.sent;case 3:case"end":return e.stop()}}),e)})))),S.default(this,"showLeaderboard",function(){var e=A.default(x.default.mark((function e(n){var r;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=window.GD_OPTIONS.gameId,t.leaderboard){e.next=4;break}return e.next=4,t.load();case 4:t.leaderboard.showLeaderBoard(r,n);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),S.default(this,"addScore",function(){var e=A.default(x.default.mark((function e(n){return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.leaderboard){e.next=3;break}return e.next=3,t.load();case 3:t.leaderboard.addScore(n);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),this.moduleName="Leaderboard",this.moduleConfig={source:"https://pm.gamedistribution.com/@bygd/gd-sdk-leaderboard/0.1.43/dist/default/iife/index.js",dependencies:["react","react-dom","redux","react-redux","material-ui-core"]},Rm(this.moduleName,this.moduleConfig)},Im=Qe,Om=$n,Pm=Fe("match"),Cm=function(e){var t;return Im(e)&&(void 0!==(t=e[Pm])?!!t:"RegExp"==Om(e))},Lm=Cm,Um=q.TypeError,Mm=function(e){if(Lm(e))throw Um("The method doesn't accept regular expressions");return e},jm=Fe("match"),Gm=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[jm]=!1,"/./"[e](t)}catch(e){}}return!1},Bm=Ri,qm=ee,Nm=ga.f,Fm=Rr,Vm=Qi,Wm=Mm,Km=ne,Hm=Gm,zm=qm("".startsWith),$m=qm("".slice),Qm=Math.min,Ym=Hm("startsWith");Bm({target:"String",proto:!0,forced:!!(Ym||(km=Nm(String.prototype,"startsWith"),!km||km.writable))&&!Ym},{startsWith:function(e){var t=Vm(Km(this));Wm(e);var n=Fm(Qm(arguments.length>1?arguments[1]:void 0,t.length)),r=Vm(e);return zm?zm(t,r,n):$m(t,n,n+r.length)===r}});var Jm=ee,Xm=Ln.PROPER,Zm=Ke.exports,eg=st,tg=ut,ng=Qi,rg=Se,ag=Cc,ig=RegExp.prototype,sg=ig.toString,og=Jm(ag),dg=rg((function(){return"/a/b"!=sg.call({source:"a",flags:"b"})})),ug=Xm&&"toString"!=sg.name;(dg||ug)&&Zm(RegExp.prototype,"toString",(function(){var e=eg(this),t=ng(e.source),n=e.flags;return"/"+t+"/"+ng(void 0===n&&tg(ig,e)&&!("flags"in ig)?og(e):n)}),{unsafe:!0});var cg=ee,lg=Ke.exports,hg=ul,fg=Se,pg=Fe,mg=$t,gg=pg("species"),vg=RegExp.prototype,yg=function(e,t,n,r){var a=pg(e),i=!fg((function(){var t={};return t[a]=function(){return 7},7!=""[e](t)})),s=i&&!fg((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[gg]=function(){return n},n.flags="",n[a]=/./[a]),n.exec=function(){return t=!0,null},n[a](""),!t}));if(!i||!s||n){var o=cg(/./[a]),d=t(a,""[e],(function(e,t,n,r,a){var s=cg(e),d=t.exec;return d===hg||d===vg.exec?i&&!a?{done:!0,value:o(t,n,r)}:{done:!0,value:s(n,t,r)}:{done:!1}}));lg(String.prototype,e,d[0]),lg(vg,a,d[1])}r&&mg(vg[a],"sham",!0)},bg=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t},_g=dt,wg=st,Ag=pe,kg=$n,Eg=ul,xg=q.TypeError,Rg=function(e,t){var n=e.exec;if(Ag(n)){var r=_g(n,e,t);return null!==r&&wg(r),r}if("RegExp"===kg(e))return _g(Eg,e,t);throw xg("RegExp#exec called on incompatible receiver")},Sg=dt,Dg=st,Tg=ne,Ig=bg,Og=Qi,Pg=kt,Cg=Rg;function Lg(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 Ug(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Lg(Object(n),!0).forEach((function(t){S.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Lg(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}yg("search",(function(e,t,n){return[function(t){var n=Tg(this),r=null==t?void 0:Pg(t,e);return r?Sg(r,t,n):new RegExp(t)[e](Og(n))},function(e){var r=Dg(this),a=Og(e),i=n(t,r,a);if(i.done)return i.value;var s=r.lastIndex;Ig(s,0)||(r.lastIndex=0);var o=Cg(r,a);return Ig(r.lastIndex,s)||(r.lastIndex=s),null===o?-1:o.index}]}));var Mg,jg,Gg=function(){function e(){R.default(this,e)}return D.default(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.getParentUrl()),s=decodeURIComponent((e||n)&&r.parentDomain?r.parentDomain:a.getParentDomain()),o=decodeURIComponent((e||n)&&r.topDomain?r.topDomain:n&&0===a.getIframeDepth()?s:a.getTopDomain()),d=(e||n)&&r.loaderEnabled,u=(e||n)&&r.loaderEnabled,c=(e||n)&&r.loaderEnabled,l=(e||n)&&r.loaderEnabled,h=(e||n)&&r.loaderEnabled,f=(e||n)&&r.loaderEnabled,p=(e||n)&&r.loaderEnabled;console.log("noMinijuegosSDK",p);var m=(e||n)&&r.loaderEnabled,g=(e||n)&&r.loaderEnabled&&r.hasImpression&&r.version>="1.1.24";return{isTokenGameURL:e,isMasterGameURL:t,isExtHostedGameURL:n,noConsoleBanner:d,noLoadedEvent:u,noBlockerEvent:c,noPreroll:m,parentURL:i,parentDomain:s,topDomain:o&&o.length?o:s,noGAPageView:l,noLotamePageView:h,noGamedockSDK:f,noMinijuegosSDK:p,version:r.version,pauseGameOnStartup:g,depth:a.getIframeDepth(),domainMatched:s===o,exports:{formatTokenURLSearch:this._formatTokenURLSearch.bind(this),extendUrlQuery:this._extendUrlQuery.bind(this),base64Encode:this._base64_encode.bind(this)}}}},{key:"_isMasterGameURL",value:function(){var e=/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Fa-f0-9]{32})(.*)$/i;return e.test(location.href)||!this._isTokenGameURL()&&e.test(document.referrer)}},{key:"_isTokenGameURL",value:function(){var e=/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Za-z0-9]{8})\/(.*)$/i;return e.test(location.href)||e.test(document.referrer)}},{key:"_isExtHostedGameURL",value:function(){var e=/^http[s]?:\/\/.*?gd_sdk_referrer_url=.*$/i;return e.test(location.href)||e.test(document.referrer)}},{key:"_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 T.default(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 T.default(document.referrer,!0);if(!r.query.gd_zone_config)return;e=r.query.gd_zone_config}else{var a=new T.default(location.href,!0);if(!a.query.gd_zone_config)return;e=a.query.gd_zone_config}return JSON.parse(u.Base64.decode(decodeURIComponent(e)))}catch(e){}}},{key:"_formatTokenURLSearch",value:function(e){var t="";try{t=encodeURIComponent(u.Base64.encode(JSON.stringify(e)))}catch(e){}try{var n=new T.default(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 T.default(e,!0);return n.query=Ug(Ug({},n.query),t),n.toString()}},{key:"_base64_encode",value:function(e){return u.Base64.encode(JSON.stringify(e))}}]),e}(),Bg=function(){try{return(new Gg).getBridgeContext()}catch(e){return{}}}(),qg={userDeclinedTracking:document.location.search.indexOf("gdpr-tracking=0")>=0||document.cookie.indexOf("ogdpr_tracking=0")>=0,whitelabelPartner:(Mg=!1,(jg=a.getQueryParams("xanthophyll")).hasOwnProperty("xanthophyll")&&"true"===jg.xanthophyll&&(Mg=!0),Mg)},Ng=Du.charAt,Fg=function(e,t,n){return t+(n?Ng(e,t).length:1)},Vg=ee,Wg=ie,Kg=Math.floor,Hg=Vg("".charAt),zg=Vg("".replace),$g=Vg("".slice),Qg=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Yg=/\$([$&'`]|\d{1,2})/g,Jg=Hi,Xg=dt,Zg=ee,ev=yg,tv=Se,nv=st,rv=pe,av=kr,iv=Rr,sv=Qi,ov=ne,dv=Fg,uv=kt,cv=function(e,t,n,r,a,i){var s=n+e.length,o=r.length,d=Yg;return void 0!==a&&(a=Wg(a),d=Qg),zg(i,d,(function(i,d){var u;switch(Hg(d,0)){case"$":return"$";case"&":return e;case"`":return $g(t,0,n);case"'":return $g(t,s);case"<":u=a[$g(d,1,-1)];break;default:var c=+d;if(0===c)return i;if(c>o){var l=Kg(c/10);return 0===l?i:l<=o?void 0===r[l-1]?Hg(d,1):r[l-1]+Hg(d,1):i}u=r[c-1]}return void 0===u?"":u}))},lv=Rg,hv=Fe("replace"),fv=Math.max,pv=Math.min,mv=Zg([].concat),gv=Zg([].push),vv=Zg("".indexOf),yv=Zg("".slice),bv="$0"==="a".replace(/./,"$0"),_v=!!/./[hv]&&""===/./[hv]("a","$0");ev("replace",(function(e,t,n){var r=_v?"$":"$0";return[function(e,n){var r=ov(this),a=null==e?void 0:uv(e,hv);return a?Xg(a,e,r,n):Xg(t,sv(r),e,n)},function(e,a){var i=nv(this),s=sv(e);if("string"==typeof a&&-1===vv(a,r)&&-1===vv(a,"$<")){var o=n(t,i,s,a);if(o.done)return o.value}var d=rv(a);d||(a=sv(a));var u=i.global;if(u){var c=i.unicode;i.lastIndex=0}for(var l=[];;){var h=lv(i,s);if(null===h)break;if(gv(l,h),!u)break;""===sv(h[0])&&(i.lastIndex=dv(s,iv(i.lastIndex),c))}for(var f,p="",m=0,g=0;g<l.length;g++){for(var v=sv((h=l[g])[0]),y=fv(pv(av(h.index),s.length),0),b=[],_=1;_<h.length;_++)gv(b,void 0===(f=h[_])?f:String(f));var w=h.groups;if(d){var A=mv([v],b,y,s);void 0!==w&&gv(A,w);var k=sv(Jg(a,void 0,A))}else k=cv(v,s,y,b,w,a);y>=m&&(p+=yv(s,m,y)+k,m=y+v.length)}return p+yv(s,m)}]}),!!tv((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}))||!bv||_v);var wv=Se,Av=Fe("iterator"),kv=!wv((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.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[Av]||"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})),Ev=ms,xv=Math.floor,Rv=function(e,t){var n=e.length,r=xv(n/2);return n<8?Sv(e,t):Dv(e,Rv(Ev(e,0,r),t),Rv(Ev(e,r),t),t)},Sv=function(e,t){for(var n,r,a=e.length,i=1;i<a;){for(r=i,n=e[i];r&&t(e[r-1],n)>0;)e[r]=e[--r];r!==i++&&(e[r]=n)}return e},Dv=function(e,t,n,r){for(var a=t.length,i=n.length,s=0,o=0;s<a||o<i;)e[s+o]=s<a&&o<i?r(t[s],n[o])<=0?t[s++]:n[o++]:s<a?t[s++]:n[o++];return e},Tv=Rv,Iv=Ri,Ov=q,Pv=ye,Cv=dt,Lv=ee,Uv=kv,Mv=Ke.exports,jv=sh,Gv=Os,Bv=Zu,qv=Dn,Nv=ph,Fv=pe,Vv=de,Wv=pr,Kv=nr,Hv=st,zv=Qe,$v=Qi,Qv=fs,Yv=Kt,Jv=Xd,Xv=Kd,Zv=Tv,ey=Fe("iterator"),ty=qv.set,ny=qv.getterFor("URLSearchParams"),ry=qv.getterFor("URLSearchParamsIterator"),ay=Pv("fetch"),iy=Pv("Request"),sy=Pv("Headers"),oy=iy&&iy.prototype,dy=sy&&sy.prototype,uy=Ov.RegExp,cy=Ov.TypeError,ly=Ov.decodeURIComponent,hy=Ov.encodeURIComponent,fy=Lv("".charAt),py=Lv([].join),my=Lv([].push),gy=Lv("".replace),vy=Lv([].shift),yy=Lv([].splice),by=Lv("".split),_y=Lv("".slice),wy=/\+/g,Ay=Array(4),ky=function(e){return Ay[e-1]||(Ay[e-1]=uy("((?:%[\\da-f]{2}){"+e+"})","gi"))},Ey=function(e){try{return ly(e)}catch(t){return e}},xy=function(e){var t=gy(e,wy," "),n=4;try{return ly(t)}catch(e){for(;n;)t=gy(t,ky(n--),Ey);return t}},Ry=/[!'()~]|%20/g,Sy={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},Dy=function(e){return Sy[e]},Ty=function(e){return gy(hy(e),Ry,Dy)},Iy=function(e,t){if(t)for(var n,r,a=by(t,"&"),i=0;i<a.length;)(n=a[i++]).length&&(r=by(n,"="),my(e,{key:xy(vy(r)),value:xy(py(r,"="))}))},Oy=function(e){this.entries.length=0,Iy(this.entries,e)},Py=function(e,t){if(e<t)throw cy("Not enough arguments")},Cy=Bv((function(e,t){ty(this,{type:"URLSearchParamsIterator",iterator:Jv(ny(e).entries),kind:t})}),"Iterator",(function(){var e=ry(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})),Ly=function(){Nv(this,Uy);var e,t,n,r,a,i,s,o,d,u=arguments.length>0?arguments[0]:void 0,c=this,l=[];if(ty(c,{type:"URLSearchParams",entries:l,updateURL:function(){},updateSearchParams:Oy}),void 0!==u)if(zv(u))if(e=Xv(u))for(n=(t=Jv(u,e)).next;!(r=Cv(n,t)).done;){if(i=(a=Jv(Hv(r.value))).next,(s=Cv(i,a)).done||(o=Cv(i,a)).done||!Cv(i,a).done)throw cy("Expected sequence with length 2");my(l,{key:$v(s.value),value:$v(o.value)})}else for(d in u)Vv(u,d)&&my(l,{key:d,value:$v(u[d])});else Iy(l,"string"==typeof u?"?"===fy(u,0)?_y(u,1):u:$v(u))},Uy=Ly.prototype;if(jv(Uy,{append:function(e,t){Py(arguments.length,2);var n=ny(this);my(n.entries,{key:$v(e),value:$v(t)}),n.updateURL()},delete:function(e){Py(arguments.length,1);for(var t=ny(this),n=t.entries,r=$v(e),a=0;a<n.length;)n[a].key===r?yy(n,a,1):a++;t.updateURL()},get:function(e){Py(arguments.length,1);for(var t=ny(this).entries,n=$v(e),r=0;r<t.length;r++)if(t[r].key===n)return t[r].value;return null},getAll:function(e){Py(arguments.length,1);for(var t=ny(this).entries,n=$v(e),r=[],a=0;a<t.length;a++)t[a].key===n&&my(r,t[a].value);return r},has:function(e){Py(arguments.length,1);for(var t=ny(this).entries,n=$v(e),r=0;r<t.length;)if(t[r++].key===n)return!0;return!1},set:function(e,t){Py(arguments.length,1);for(var n,r=ny(this),a=r.entries,i=!1,s=$v(e),o=$v(t),d=0;d<a.length;d++)(n=a[d]).key===s&&(i?yy(a,d--,1):(i=!0,n.value=o));i||my(a,{key:s,value:o}),r.updateURL()},sort:function(){var e=ny(this);Zv(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,n=ny(this).entries,r=Wv(e,arguments.length>1?arguments[1]:void 0),a=0;a<n.length;)r((t=n[a++]).value,t.key,this)},keys:function(){return new Cy(this,"keys")},values:function(){return new Cy(this,"values")},entries:function(){return new Cy(this,"entries")}},{enumerable:!0}),Mv(Uy,ey,Uy.entries,{name:"entries"}),Mv(Uy,"toString",(function(){for(var e,t=ny(this).entries,n=[],r=0;r<t.length;)e=t[r++],my(n,Ty(e.key)+"="+Ty(e.value));return py(n,"&")}),{enumerable:!0}),Gv(Ly,"URLSearchParams"),Iv({global:!0,forced:!Uv},{URLSearchParams:Ly}),!Uv&&Fv(sy)){var My=Lv(dy.has),jy=Lv(dy.set),Gy=function(e){if(zv(e)){var t,n=e.body;if("URLSearchParams"===Kv(n))return t=e.headers?new sy(e.headers):new sy,My(t,"content-type")||jy(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),Qv(e,{body:Yv(0,$v(n)),headers:Yv(0,t)})}return e};if(Fv(ay)&&Iv({global:!0,enumerable:!0,forced:!0},{fetch:function(e){return ay(e,arguments.length>1?Gy(arguments[1]):{})}}),Fv(iy)){var By=function(e){return Nv(this,oy),new iy(e,arguments.length>1?Gy(arguments[1]):{})};oy.constructor=By,By.prototype=oy,Iv({global:!0,forced:!0},{Request:By})}}var qy={URLSearchParams:Ly,getState:ny},Ny=Fa.includes,Fy=Ll;Ri({target:"Array",proto:!0},{includes:function(e){return Ny(this,e,arguments.length>1?arguments[1]:void 0)}}),Fy("includes");var Vy=Ri,Wy=Mm,Ky=ne,Hy=Qi,zy=Gm,$y=ee("".indexOf);Vy({target:"String",proto:!0,forced:!zy("includes")},{includes:function(e){return!!~$y(Hy(Ky(this)),Hy(Wy(e)),arguments.length>1?arguments[1]:void 0)}});var Qy=Hi,Yy=dt,Jy=ee,Xy=yg,Zy=Cm,eb=st,tb=ne,nb=Lh,rb=Fg,ab=Rr,ib=Qi,sb=kt,ob=ms,db=Rg,ub=ul,cb=Se,lb=Lc.UNSUPPORTED_Y,hb=Math.min,fb=[].push,pb=Jy(/./.exec),mb=Jy(fb),gb=Jy("".slice);function vb(e){var t=this,n={},r=(null==e?void 0:e._ancestor_origins)||window.location.ancestorOrigins,a=(null==e?void 0:e.self_url)||window.location.href,i=(null==e?void 0:e.self_origin)||window.location.origin,s=(null==e?void 0:e.referrer_url)||document.referrer;function o(e){return P.default(n,e)}function d(e,t){return C.default(n,e,t)}function u(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(e&&""!==e)try{return new T.default(e,t)}catch(e){console.log(e)}}function c(){for(var t=(null==e?void 0:e.urls)||[a,s],n=0;n<t.length;n++){var r,i=u(t[n]);if(i){var o=null===(r=i.query)||void 0===r?void 0:r.gd_sdk_referrer_url;if(o&&(o=decodeURIComponent(o),I.default.isURL(o)))return o}}}return function(){var e;k.default(this,t),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=r,t=n.depth.value,a=i;if(d("top.domain.from","fallback"),e&&e.length>0)a=e[e.length-1],d("top.domain.from","origins");else if(0===t)a=i,d("top.domain.from","self-top");else if(1===t){var o=u(s);o&&(a=o.origin,d("top.domain.from","referrer"))}d("top.domain.value",a.replace(/^https?:\/\/(www\.)?(.*)$/i,"$2"))}(),function(){var e=c();if(e)if(O.default(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",n.top.domain.value),d("partner.domain.from","partner-fallback")}else d("partner.domain.value",n.top.domain.value),d("partner.domain.from","fallback")}(),e=c(),0===n.depth.value?(d("partner.url.value",a),d("partner.url.from","self-top")):e?O.default(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",s),d("partner.url.from","fallback"))}.bind(this)(),{get:o,print:function(e){console.log(o(e))}}}Xy("split",(function(e,t,n){var r;return r="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(e,n){var r=ib(tb(this)),a=void 0===n?4294967295:n>>>0;if(0===a)return[];if(void 0===e)return[r];if(!Zy(e))return Yy(t,r,e,a);for(var i,s,o,d=[],u=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),c=0,l=new RegExp(e.source,u+"g");(i=Yy(ub,l,r))&&!((s=l.lastIndex)>c&&(mb(d,gb(r,c,i.index)),i.length>1&&i.index<r.length&&Qy(fb,d,ob(i,1)),o=i[0].length,c=s,d.length>=a));)l.lastIndex===i.index&&l.lastIndex++;return c===r.length?!o&&pb(l,"")||mb(d,""):mb(d,gb(r,c)),d.length>a?ob(d,0,a):d}:"0".split(void 0,0).length?function(e,n){return void 0===e&&0===n?[]:Yy(t,this,e,n)}:t,[function(t,n){var a=tb(this),i=null==t?void 0:sb(t,e);return i?Yy(i,t,a,n):Yy(r,ib(a),t,n)},function(e,a){var i=eb(this),s=ib(e),o=n(r,i,s,a,r!==t);if(o.done)return o.value;var d=nb(i,RegExp),u=i.unicode,c=(i.ignoreCase?"i":"")+(i.multiline?"m":"")+(i.unicode?"u":"")+(lb?"g":"y"),l=new d(lb?"^(?:"+i.source+")":i,c),h=void 0===a?4294967295:a>>>0;if(0===h)return[];if(0===s.length)return null===db(l,s)?[s]:[];for(var f=0,p=0,m=[];p<s.length;){l.lastIndex=lb?0:p;var g,v=db(l,lb?gb(s,p):s);if(null===v||(g=hb(ab(l.lastIndex+(lb?p:0)),s.length))===f)p=rb(s,p,u);else{if(mb(m,gb(s,f,p)),m.length===h)return m;for(var y=1;y<=v.length-1;y++)if(mb(m,v[y]),m.length===h)return m;p=f=g}}return mb(m,gb(s,f)),m}]}),!!cb((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2!==n.length||"a"!==n[0]||"b"!==n[1]})),lb);var yb="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==yb&&yb,bb="URLSearchParams"in yb,_b="Symbol"in yb&&"iterator"in Symbol,wb="FileReader"in yb&&"Blob"in yb&&function(){try{return new Blob,!0}catch(e){return!1}}(),Ab="FormData"in yb,kb="ArrayBuffer"in yb;if(kb)var Eb=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],xb=ArrayBuffer.isView||function(e){return e&&Eb.indexOf(Object.prototype.toString.call(e))>-1};function Rb(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 Sb(e){return"string"!=typeof e&&(e=String(e)),e}function Db(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return _b&&(t[Symbol.iterator]=function(){return t}),t}function Tb(e){this.map={},e instanceof Tb?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 Ib(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function Ob(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function Pb(e){var t=new FileReader,n=Ob(t);return t.readAsArrayBuffer(e),n}function Cb(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function Lb(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:wb&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:Ab&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:bb&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():kb&&wb&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=Cb(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):kb&&(ArrayBuffer.prototype.isPrototypeOf(e)||xb(e))?this._bodyArrayBuffer=Cb(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):bb&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},wb&&(this.blob=function(){var e=Ib(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=Ib(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(Pb)}),this.text=function(){var e=Ib(this);if(e)return e;if(this._bodyBlob)return function(e){var t=new FileReader,n=Ob(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)},Ab&&(this.formData=function(){return this.text().then(jb)}),this.json=function(){return this.text().then(JSON.parse)},this}Tb.prototype.append=function(e,t){e=Rb(e),t=Sb(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},Tb.prototype.delete=function(e){delete this.map[Rb(e)]},Tb.prototype.get=function(e){return e=Rb(e),this.has(e)?this.map[e]:null},Tb.prototype.has=function(e){return this.map.hasOwnProperty(Rb(e))},Tb.prototype.set=function(e,t){this.map[Rb(e)]=Sb(t)},Tb.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},Tb.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),Db(e)},Tb.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),Db(e)},Tb.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),Db(e)},_b&&(Tb.prototype[Symbol.iterator]=Tb.prototype.entries);var Ub=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function Mb(e,t){if(!(this instanceof Mb))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 Mb){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new Tb(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 Tb(t.headers)),this.method=function(e){var t=e.toUpperCase();return Ub.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 jb(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),a=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(a))}})),t}function Gb(e,t){if(!(this instanceof Gb))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 Tb(t.headers),this.url=t.url||"",this._initBody(e)}Mb.prototype.clone=function(){return new Mb(this,{body:this._bodyInit})},Lb.call(Mb.prototype),Lb.call(Gb.prototype),Gb.prototype.clone=function(){return new Gb(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new Tb(this.headers),url:this.url})},Gb.error=function(){var e=new Gb(null,{status:0,statusText:""});return e.type="error",e};var Bb=[301,302,303,307,308];Gb.redirect=function(e,t){if(-1===Bb.indexOf(t))throw new RangeError("Invalid status code");return new Gb(null,{status:t,headers:{location:e}})};var qb,Nb=yb.DOMException;try{new Nb}catch(e){Nb=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},Nb.prototype=Object.create(Error.prototype),Nb.prototype.constructor=Nb}function Fb(e,t){return new Promise((function(n,r){var a=new Mb(e,t);if(a.signal&&a.signal.aborted)return r(new Nb("Aborted","AbortError"));var i=new XMLHttpRequest;function s(){i.abort()}i.onload=function(){var e,t,r={status:i.status,statusText:i.statusText,headers:(e=i.getAllResponseHeaders()||"",t=new Tb,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 a=n.join(":").trim();t.append(r,a)}})),t)};r.url="responseURL"in i?i.responseURL:r.headers.get("X-Request-URL");var a="response"in i?i.response:i.responseText;setTimeout((function(){n(new Gb(a,r))}),0)},i.onerror=function(){setTimeout((function(){r(new TypeError("Network request failed"))}),0)},i.ontimeout=function(){setTimeout((function(){r(new TypeError("Network request failed"))}),0)},i.onabort=function(){setTimeout((function(){r(new Nb("Aborted","AbortError"))}),0)},i.open(a.method,function(e){try{return""===e&&yb.location.href?yb.location.href:e}catch(t){return e}}(a.url),!0),"include"===a.credentials?i.withCredentials=!0:"omit"===a.credentials&&(i.withCredentials=!1),"responseType"in i&&(wb?i.responseType="blob":kb&&a.headers.get("Content-Type")&&-1!==a.headers.get("Content-Type").indexOf("application/octet-stream")&&(i.responseType="arraybuffer")),!t||"object"!=typeof t.headers||t.headers instanceof Tb?a.headers.forEach((function(e,t){i.setRequestHeader(t,e)})):Object.getOwnPropertyNames(t.headers).forEach((function(e){i.setRequestHeader(e,Sb(t.headers[e]))})),a.signal&&(a.signal.addEventListener("abort",s),i.onreadystatechange=function(){4===i.readyState&&a.signal.removeEventListener("abort",s)}),i.send(void 0===a._bodyInit?null:a._bodyInit)}))}Fb.polyfill=!0,yb.fetch||(yb.fetch=Fb,yb.Headers=Tb,yb.Request=Mb,yb.Response=Gb);var Vb,Wb=function(e){var t=this;if(!qb){var n={gameId:e.gameId,hours:(new Date).getHours(),topDomain:Bg.topDomain,domain:Bg.parentDomain,referrer:Bg.parentURL,depth:a.getIframeDepth(),version:Ui.version,byloader:Bg.isTokenGameURL,isTokenGameURL:Bg.isTokenGameURL,isMasterGameURL:Bg.isMasterGameURL,isExtHostedGameURL:Bg.isExtHostedGameURL,byloaderVersion:Bg.version,tracking:qg.userDeclinedTracking,whitelabel:qg.whitelabelPartner,platform:a.getMobilePlatform()};qb=new a.MessageRouter(n)}return qb||{send:function(){k.default(this,t)}.bind(this)}};var Kb,Hb,zb=[],$b=function(e){zb.push(e)},Qb=function(){var e=A.default(x.default.mark((function e(){return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(Kb){e.next=4;break}return e.next=3,Yb(Hb);case 3:Kb=e.sent;case 4:return e.abrupt("return",Kb);case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Yb=function(e){var t=this;Vb.send("gdfw.loading",{message:"loading"}),zb=[],$b("1"),$b("2");var n=new vb;$b("3");var r=n.get("partner.domain.value");$b("4");var i=function(){return k.default(this,t),{gameId:e.gameId,disableAds:{},preroll:!0,midroll:12e4,rewardedAds:!1,title:"",tags:[],category:"",assets:[],dmain:!0,sdk:{},loader:{},splash:{},promo:{},dAds:{},pAds:{},mAds:{},rAds:{}}}.bind(this);$b("5");var s=function(){k.default(this,t);var n=o(),a=n?"&mode=".concat(n):"";return"https://game.api.gamedistribution.com/game/v4/get/".concat(e.gameId.replace(/-/g,""),"/?domain=").concat(r).concat(a,"&v=").concat(Ui.version,"&localTime=").concat((new Date).getHours())}.bind(this);$b("6");var o=function(){var e=this;k.default(this,t);var n=new Proxy(new URLSearchParams(window.location.search),{get:function(t,n){return k.default(this,e),t.get(n)}.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 $b("7"),new Promise(function(e){var n=this;if(k.default(this,t),Kb)e(Kb);else{$b("7.1");var r=i();try{$b("7.2");var o=s();$b("7.3"),fetch(o).then(function(e){return k.default(this,n),$b("7.4"),e.json()}.bind(this)).then(function(t){var i=this;if(k.default(this,n),$b("7.5"),t.success){var s,o,d,u=t.result.game;$b("7.6");var c={gameId:u.gameMd5,slug:u.slug,pname:u.pname,dname:u.dname,status:u.status,description:u.description,disableAds:u.enableAds,preroll:u.preRoll,midroll:6e4*u.timeAds,rewardedAds:u.rewardedAds,title:u.title,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,__t4r:Mi(u.__t4r)||{},block_exts:Mi(u.push_cuda),bloc_gard:Mi(u.bloc_gard),cookie:Mi(u.cookie),gdpr:Mi(u.gdpr),diagnostic:Mi(u.diagnostic),cmp:Mi(u.cmp),gft:Mi(u.gft)||{},sdk:Mi(u.sdk)||{},sdkfw:Mi(u.sdkfw)||{},loader:Mi(u.loader)||{},splash:Mi(u.splash)||{},promo:Mi(u.promo)||{},dAds:Mi(u.dads)||{},pAds:Mi(u.pads)||{},mAds:Mi(u.mads)||{},rAds:Mi(u.rads)||{},lp:Mi(u.lp)||{},extsc:Mi(u.extsc)||{},evnts:Mi(u.evnts)||{},dp:Mi(u.dp)||{},adflw:Mi(u.adflw)||{}};$b("7.7");var l=a.extendDefaults(L.default(r),c);$b("7.8"),l.afg_disabled=!1===(null===(s=l.sdk)||void 0===s||null===(o=s.afg)||void 0===o?void 0:o.enabled),function(){k.default(this,i)}.bind(this),$b("7.9"),null!==(d=l.pAds)&&void 0!==d&&d.enabled&&(l.preroll=!0),$b("7.10"),Vb.send("gdfw.success",{message:"success"}),e(l)}else{r.failed=!0;var h=zb[zb.length-1];Vb.send("gdfw.err",{message:"".concat(h,": json error")}),e(r)}}.bind(this)).catch(function(t){k.default(this,n);var a=zb[zb.length-1];Vb.send("gdfw.err",{message:"".concat(a,": ").concat(t.message?t.message:t)}),r.failed=!0,e(r)}.bind(this))}catch(t){var d=zb[zb.length-1];Vb.send("gdfw.err",{message:"".concat(d,": global ").concat(t.message?t.message:t)}),r.failed=!0,e(r)}}}.bind(this))},Jb=function(){var e=A.default(x.default.mark((function e(){var t,n;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Qb();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 e.apply(this,arguments)}}(),Xb=function(){var e=A.default(x.default.mark((function e(){var t,n;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Qb();case 2:return n=e.sent,e.next=5,Jb();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 e.apply(this,arguments)}}(),Zb=function(){var e=A.default(x.default.mark((function e(){var t,n,r,a,i,s,o,d;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Qb();case 2:return o=e.sent,d=!(null==o||null===(t=o.extsc)||void 0===t||!t.enabled),e.abrupt("return",{enabled:d,path:d?null==o||null===(n=o.extsc)||void 0===n?void 0:n.path:"",name:d?null==o||null===(r=o.extsc)||void 0===r?void 0:r.name:"",ref:d?null==o||null===(a=o.extsc)||void 0===a?void 0:a.ref:"",loadedFlag:d?null==o||null===(i=o.extsc)||void 0===i?void 0:i.loadedFlag:void 0,loadedFlagCheck:!!d&&!(null==o||null===(s=o.extsc)||void 0===s||!s.loadedFlagCheck)});case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),e_=function(){var e=A.default(x.default.mark((function e(){var t,n,r,i,s,o=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Zb();case 2:if((t=e.sent).enabled){e.next=5;break}return e.abrupt("return");case 5:return n=t.path,r=t.name,i=t.ref,e.prev=6,s={},e.next=10,a.getScript(n,r,{error_prefix:"Blocked:",exists:function(){return k.default(this,o),!!i&&!!window[i]}.bind(this),attrs:s});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",r,e.t0),a.dankLog("DEVELOPER_ERROR",e.t0,"warning");case 16:case"end":return e.stop()}}),e,this,[[6,12]])})));return function(){return e.apply(this,arguments)}}(),t_=!1,n_=!1,r_=function(){return new Promise(function(){var e=A.default(x.default.mark((function e(t,n){var r,a,i,s,o,d=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t_){e.next=4;break}return e.abrupt("return",t(n_));case 4:t_=!0;case 5:return e.next=7,Zb();case 7:if((r=e.sent).enabled){e.next=10;break}return e.abrupt("return",t(!1));case 10:if(a=r.loadedFlag,!(i=r.loadedFlagCheck)||a){e.next=13;break}return e.abrupt("return",t(!1));case 13:if(i){e.next=16;break}return n_=!0,e.abrupt("return",t(!0));case 16:s=!0,setTimeout(function(){k.default(this,d),s&&(s=!1,t_=!0,t(!1))}.bind(this),5e3),o=setInterval(function(){k.default(this,d),s&&i&&window[a]?(s=!1,t_=!0,n_=!0,clearInterval(o),t(!0)):s||clearInterval(o)}.bind(this),100);case 19:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}())},a_=function(e){var t=function(e){var t=this,n=function(e){return k.default(this,t),l("showAd",{adType:e})}.bind(this),r=function(e){return k.default(this,t),l("preloadAd",{adType:e})}.bind(this),a=function(e){return k.default(this,t),l("showDisplayAd",{options:e})}.bind(this),i=function(){return k.default(this,t),l("cancelAd")}.bind(this),s=function(){return k.default(this,t),l("openConsole")}.bind(this),o=function(){return k.default(this,t),l("showBanner")}.bind(this),d=function(){return k.default(this,t),l("session")}.bind(this),u=function(e){return k.default(this,t),l("sendGenericEvent",{options:e})}.bind(this),c=function(){k.default(this,t),console.log("_sendSDKReady")}.bind(this),l=function(e,n){var r=this;return k.default(this,t),n||(n={}),new Promise(function(t,a){k.default(this,r);try{var i={type:"gd-sdk",method:e,options:n};window.parent.postMessage(i,location.origin),t()}catch(e){console.log("gd:adp:m:s:error",e),t()}}.bind(this))}.bind(this),h=function(){k.default(this,t),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&&p(r)}),!1)}.bind(this),f=function(){k.default(this,t),h(),l("init")}.bind(this),p=function(n){k.default(this,t),e.onEvent&&e.onEvent(n)}.bind(this);return{showBanner:o,showAd:n,preloadAd:r,showDisplayAd:a,cancelAd:i,openConsole:s,getSession:d,onEvent:p,init:f,_sendSDKReady:c,sendGenericEvent:u}}(e);return t.init(),t},i_=function(){var e=this;return{isMasterGameURL:function(){k.default(this,e);return/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Fa-f0-9]{32})(.*)$/i.test(location.href)}.bind(this),isTokenGameURL:function(){k.default(this,e);return/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Za-z0-9]{8})\/(.*)$/i.test(location.href)}.bind(this),isExtHostedGameURL:function(){k.default(this,e);return/^http[s]?:\/\/.*?gd_sdk_referrer_url=.*$/i.test(location.href)}.bind(this)}},s_=function(e){var t=this;return new Promise(function(n,r){var a=this;k.default(this,t);var i={type:"gd-sdk-frame-handshake-request"},s=!1;window.addEventListener("message",(function(e){var t=e.data,r=e.origin,a=e.source,i=t.type;if("gd-sdk-frame-handshake-request"===i){var o={type:"gd-sdk-frame-handshake-response"};a.postMessage(o,r)}else"gd-sdk-frame-handshake-response"===i&&(s=!0,n({origin:r,source:a}))})),e?n():(setTimeout(function(){k.default(this,a),s||n()}.bind(this),200),window.parent!==window?window.parent.postMessage(i,"*"):n())}.bind(this))},o_=function(){var e=A.default(x.default.mark((function e(){var t,n,r,a,i,s,o,d;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Jb();case 2:return t=e.sent,n=!t,e.next=6,s_(n);case 6:if(r=e.sent,t){e.next=9;break}return e.abrupt("return",!1);case 9:return a=i_(),i=a.isMasterGameURL,s=i(),e.next=13,Xb();case 13:return o=e.sent,d=!1,d=o?!s&&!!r:!s,e.abrupt("return",d);case 17:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),d_=He,u_=ee,c_=Ti,l_=ka,h_=u_(va.f),f_=u_([].push),p_=function(e){return function(t){for(var n,r=l_(t),a=c_(r),i=a.length,s=0,o=[];i>s;)n=a[s++],d_&&!h_(r,n)||f_(o,e?[n,r[n]]:r[n]);return o}},m_={entries:p_(!0),values:p_(!1)}.values;Ri({target:"Object",stat:!0},{values:function(e){return m_(e)}});var g_=Ri,v_=ah,y_=Se,b_=ye,__=pe,w_=Lh,A_=Kf,k_=Ke.exports;if(g_({target:"Promise",proto:!0,real:!0,forced:!!v_&&y_((function(){v_.prototype.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=w_(this,b_("Promise")),n=__(e);return this.then(n?function(n){return A_(t,e()).then((function(){return n}))}:e,n?function(n){return A_(t,e()).then((function(){throw n}))}:e)}}),__(v_)){var E_=b_("Promise").prototype.finally;v_.prototype.finally!==E_&&k_(v_.prototype,"finally",E_,{unsafe:!0})}var x_=ne,R_=Qi,S_=ee("".replace),D_="[\t\n\v\f\r                 \u2028\u2029\ufeff]",T_=RegExp("^"+D_+D_+"*"),I_=RegExp(D_+D_+"*$"),O_=function(e){return function(t){var n=R_(x_(t));return 1&e&&(n=S_(n,T_,"")),2&e&&(n=S_(n,I_,"")),n}},P_={start:O_(1),end:O_(2),trim:O_(3)},C_=Ln.PROPER,L_=Se,U_="\t\n\v\f\r                 \u2028\u2029\ufeff",M_=P_.trim;Ri({target:"String",proto:!0,forced:function(e){return L_((function(){return!!U_[e]()||"​…᠎"!=="​…᠎"[e]()||C_&&U_[e].name!==e}))}("trim")},{trim:function(){return M_(this)}});var j_=pe,G_=Qe,B_=oc,q_=He,N_=q,F_=ee,V_=yi,W_=function(e,t,n){var r,a;return B_&&j_(r=t.constructor)&&r!==n&&G_(a=r.prototype)&&a!==n.prototype&&B_(e,a),e},K_=$t,H_=ze.f,z_=Ca.f,$_=ut,Q_=Cm,Y_=Qi,J_=Cc,X_=Lc,Z_=Ke.exports,ew=Se,tw=de,nw=Dn.enforce,rw=lh,aw=Bc,iw=Fc,sw=Fe("match"),ow=N_.RegExp,dw=ow.prototype,uw=N_.SyntaxError,cw=F_(J_),lw=F_(dw.exec),hw=F_("".charAt),fw=F_("".replace),pw=F_("".indexOf),mw=F_("".slice),gw=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,vw=/a/g,yw=/a/g,bw=new ow(vw)!==vw,_w=X_.UNSUPPORTED_Y,ww=q_&&(!bw||_w||aw||iw||ew((function(){return yw[sw]=!1,ow(vw)!=vw||ow(yw)==yw||"/a/i"!=ow(vw,"i")})));if(V_("RegExp",ww)){for(var Aw=function(e,t){var n,r,a,i,s,o,d=$_(dw,this),u=Q_(e),c=void 0===t,l=[],h=e;if(!d&&u&&c&&e.constructor===Aw)return e;if((u||$_(dw,e))&&(e=e.source,c&&(t="flags"in h?h.flags:cw(h))),e=void 0===e?"":Y_(e),t=void 0===t?"":Y_(t),h=e,aw&&"dotAll"in vw&&(r=!!t&&pw(t,"s")>-1)&&(t=fw(t,/s/g,"")),n=t,_w&&"sticky"in vw&&(a=!!t&&pw(t,"y")>-1)&&(t=fw(t,/y/g,"")),iw&&(i=function(e){for(var t,n=e.length,r=0,a="",i=[],s={},o=!1,d=!1,u=0,c="";r<=n;r++){if("\\"===(t=hw(e,r)))t+=hw(e,++r);else if("]"===t)o=!1;else if(!o)switch(!0){case"["===t:o=!0;break;case"("===t:lw(gw,mw(e,r+1))&&(r+=2,d=!0),a+=t,u++;continue;case">"===t&&d:if(""===c||tw(s,c))throw new uw("Invalid capture group name");s[c]=!0,i[i.length]=[c,u],d=!1,c="";continue}d?c+=t:a+=t}return[a,i]}(e),e=i[0],l=i[1]),s=W_(ow(e,t),d?this:dw,Aw),(r||a||l.length)&&(o=nw(s),r&&(o.dotAll=!0,o.raw=Aw(function(e){for(var t,n=e.length,r=0,a="",i=!1;r<=n;r++)"\\"!==(t=hw(e,r))?i||"."!==t?("["===t?i=!0:"]"===t&&(i=!1),a+=t):a+="[\\s\\S]":a+=t+hw(e,++r);return a}(e),n)),a&&(o.sticky=!0),l.length&&(o.groups=l)),e!==h)try{K_(s,"source",""===h?"(?:)":h)}catch(e){}return s},kw=function(e){e in Aw||H_(Aw,e,{configurable:!0,get:function(){return ow[e]},set:function(t){ow[e]=t}})},Ew=z_(ow),xw=0;Ew.length>xw;)kw(Ew[xw++]);dw.constructor=Aw,Aw.prototype=dw,Z_(N_,"RegExp",Aw)}rw("RegExp");var Rw=Ri,Sw=ia.find,Dw=Ll,Tw=!0;"find"in[]&&Array(1).find((function(){Tw=!1})),Rw({target:"Array",proto:!0,forced:Tw},{find:function(e){return Sw(this,e,arguments.length>1?arguments[1]:void 0)}}),Dw("find");var Iw=Ri,Ow=_r,Pw=ka,Cw=oa,Lw=ee([].join),Uw=Ow!=Object,Mw=Cw("join",",");Iw({target:"Array",proto:!0,forced:Uw||!Mw},{join:function(e){return Lw(Pw(this),void 0===e?",":e)}});var jw=ia.map;Ri({target:"Array",proto:!0,forced:!Zo("map")},{map:function(e){return jw(this,e,arguments.length>1?arguments[1]:void 0)}});var Gw=He,Bw=ee,qw=dt,Nw=Se,Fw=Ti,Vw=Xa,Ww=va,Kw=ie,Hw=_r,zw=Object.assign,$w=Object.defineProperty,Qw=Bw([].concat),Yw=!zw||Nw((function(){if(Gw&&1!==zw({b:1},zw($w({},"a",{enumerable:!0,get:function(){$w(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!=zw({},e)[n]||Fw(zw({},t)).join("")!=r}))?function(e,t){for(var n=Kw(e),r=arguments.length,a=1,i=Vw.f,s=Ww.f;r>a;)for(var o,d=Hw(arguments[a++]),u=i?Qw(Fw(d),i(d)):Fw(d),c=u.length,l=0;c>l;)o=u[l++],Gw&&!qw(s,d,o)||(n[o]=d[o]);return n}:zw,Jw=Yw;Ri({target:"Object",stat:!0,forced:Object.assign!==Jw},{assign:Jw});var Xw,Zw=ee,eA=/[^\0-\u007E]/,tA=/[.\u3002\uFF0E\uFF61]/g,nA="Overflow: input needs wider integers to process",rA=q.RangeError,aA=Zw(tA.exec),iA=Math.floor,sA=String.fromCharCode,oA=Zw("".charCodeAt),dA=Zw([].join),uA=Zw([].push),cA=Zw("".replace),lA=Zw("".split),hA=Zw("".toLowerCase),fA=function(e){return e+22+75*(e<26)},pA=function(e,t,n){var r=0;for(e=n?iA(e/700):e>>1,e+=iA(e/t);e>455;r+=36)e=iA(e/35);return iA(r+36*e/(e+38))},mA=function(e){var t=[];e=function(e){for(var t=[],n=0,r=e.length;n<r;){var a=oA(e,n++);if(a>=55296&&a<=56319&&n<r){var i=oA(e,n++);56320==(64512&i)?uA(t,((1023&a)<<10)+(1023&i)+65536):(uA(t,a),n--)}else uA(t,a)}return t}(e);var n,r,a=e.length,i=128,s=0,o=72;for(n=0;n<e.length;n++)(r=e[n])<128&&uA(t,sA(r));var d=t.length,u=d;for(d&&uA(t,"-");u<a;){var c=2147483647;for(n=0;n<e.length;n++)(r=e[n])>=i&&r<c&&(c=r);var l=u+1;if(c-i>iA((2147483647-s)/l))throw rA(nA);for(s+=(c-i)*l,i=c,n=0;n<e.length;n++){if((r=e[n])<i&&++s>2147483647)throw rA(nA);if(r==i){for(var h=s,f=36;;f+=36){var p=f<=o?1:f>=o+26?26:f-o;if(h<p)break;var m=h-p,g=36-p;uA(t,sA(fA(p+m%g))),h=iA(m/g)}uA(t,sA(fA(h))),o=pA(s,l,u==d),s=0,++u}}++s,++i}return dA(t,"")},gA=Ri,vA=He,yA=kv,bA=q,_A=pr,wA=dt,AA=ee,kA=es,EA=Ke.exports,xA=ph,RA=de,SA=Yw,DA=cu,TA=ms,IA=Du.codeAt,OA=function(e){var t,n,r=[],a=lA(cA(hA(e),tA,"."),".");for(t=0;t<a.length;t++)n=a[t],uA(r,aA(eA,n)?"xn--"+mA(n):n);return dA(r,".")},PA=Qi,CA=Os,LA=qy,UA=Dn,MA=UA.set,jA=UA.getterFor("URL"),GA=LA.URLSearchParams,BA=LA.getState,qA=bA.URL,NA=bA.TypeError,FA=bA.parseInt,VA=Math.floor,WA=Math.pow,KA=AA("".charAt),HA=AA(/./.exec),zA=AA([].join),$A=AA(1..toString),QA=AA([].pop),YA=AA([].push),JA=AA("".replace),XA=AA([].shift),ZA=AA("".split),ek=AA("".slice),tk=AA("".toLowerCase),nk=AA([].unshift),rk=/[a-z]/i,ak=/[\d+-.a-z]/i,ik=/\d/,sk=/^0x/i,ok=/^[0-7]+$/,dk=/^\d+$/,uk=/^[\da-f]+$/i,ck=/[\0\t\n\r #%/:<>?@[\\\]^|]/,lk=/[\0\t\n\r #/:<>?@[\\\]^|]/,hk=/^[\u0000-\u0020]+|[\u0000-\u0020]+$/g,fk=/[\t\n\r]/g,pk=function(e,t){var n,r,a;if("["==KA(t,0)){if("]"!=KA(t,t.length-1))return"Invalid host";if(!(n=gk(ek(t,1,-1))))return"Invalid host";e.host=n}else if(Ek(e)){if(t=OA(t),HA(ck,t))return"Invalid host";if(null===(n=mk(t)))return"Invalid host";e.host=n}else{if(HA(lk,t))return"Invalid host";for(n="",r=DA(t),a=0;a<r.length;a++)n+=Ak(r[a],yk);e.host=n}},mk=function(e){var t,n,r,a,i,s,o,d=ZA(e,".");if(d.length&&""==d[d.length-1]&&d.length--,(t=d.length)>4)return e;for(n=[],r=0;r<t;r++){if(""==(a=d[r]))return e;if(i=10,a.length>1&&"0"==KA(a,0)&&(i=HA(sk,a)?16:8,a=ek(a,8==i?1:2)),""===a)s=0;else{if(!HA(10==i?dk:8==i?ok:uk,a))return e;s=FA(a,i)}YA(n,s)}for(r=0;r<t;r++)if(s=n[r],r==t-1){if(s>=WA(256,5-t))return null}else if(s>255)return null;for(o=QA(n),r=0;r<n.length;r++)o+=n[r]*WA(256,3-r);return o},gk=function(e){var t,n,r,a,i,s,o,d=[0,0,0,0,0,0,0,0],u=0,c=null,l=0,h=function(){return KA(e,l)};if(":"==h()){if(":"!=KA(e,1))return;l+=2,c=++u}for(;h();){if(8==u)return;if(":"!=h()){for(t=n=0;n<4&&HA(uk,h());)t=16*t+FA(h(),16),l++,n++;if("."==h()){if(0==n)return;if(l-=n,u>6)return;for(r=0;h();){if(a=null,r>0){if(!("."==h()&&r<4))return;l++}if(!HA(ik,h()))return;for(;HA(ik,h());){if(i=FA(h(),10),null===a)a=i;else{if(0==a)return;a=10*a+i}if(a>255)return;l++}d[u]=256*d[u]+a,2!=++r&&4!=r||u++}if(4!=r)return;break}if(":"==h()){if(l++,!h())return}else if(h())return;d[u++]=t}else{if(null!==c)return;l++,c=++u}}if(null!==c)for(s=u-c,u=7;0!=u&&s>0;)o=d[u],d[u--]=d[c+s-1],d[c+--s]=o;else if(8!=u)return;return d},vk=function(e){var t,n,r,a;if("number"==typeof e){for(t=[],n=0;n<4;n++)nk(t,e%256),e=VA(e/256);return zA(t,".")}if("object"==typeof e){for(t="",r=function(e){for(var t=null,n=1,r=null,a=0,i=0;i<8;i++)0!==e[i]?(a>n&&(t=r,n=a),r=null,a=0):(null===r&&(r=i),++a);return a>n&&(t=r,n=a),t}(e),n=0;n<8;n++)a&&0===e[n]||(a&&(a=!1),r===n?(t+=n?":":"::",a=!0):(t+=$A(e[n],16),n<7&&(t+=":")));return"["+t+"]"}return e},yk={},bk=SA({},yk,{" ":1,'"':1,"<":1,">":1,"`":1}),_k=SA({},bk,{"#":1,"?":1,"{":1,"}":1}),wk=SA({},_k,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),Ak=function(e,t){var n=IA(e,0);return n>32&&n<127&&!RA(t,e)?e:encodeURIComponent(e)},kk={ftp:21,file:null,http:80,https:443,ws:80,wss:443},Ek=function(e){return RA(kk,e.scheme)},xk=function(e){return""!=e.username||""!=e.password},Rk=function(e){return!e.host||e.cannotBeABaseURL||"file"==e.scheme},Sk=function(e,t){var n;return 2==e.length&&HA(rk,KA(e,0))&&(":"==(n=KA(e,1))||!t&&"|"==n)},Dk=function(e){var t;return e.length>1&&Sk(ek(e,0,2))&&(2==e.length||"/"===(t=KA(e,2))||"\\"===t||"?"===t||"#"===t)},Tk=function(e){var t=e.path,n=t.length;!n||"file"==e.scheme&&1==n&&Sk(t[0],!0)||t.length--},Ik=function(e){return"."===e||"%2e"===tk(e)},Ok={},Pk={},Ck={},Lk={},Uk={},Mk={},jk={},Gk={},Bk={},qk={},Nk={},Fk={},Vk={},Wk={},Kk={},Hk={},zk={},$k={},Qk={},Yk={},Jk={},Xk=function(e,t,n,r){var a,i,s,o,d,u=n||Ok,c=0,l="",h=!1,f=!1,p=!1;for(n||(e.scheme="",e.username="",e.password="",e.host=null,e.port=null,e.path=[],e.query=null,e.fragment=null,e.cannotBeABaseURL=!1,t=JA(t,hk,"")),t=JA(t,fk,""),a=DA(t);c<=a.length;){switch(i=a[c],u){case Ok:if(!i||!HA(rk,i)){if(n)return"Invalid scheme";u=Ck;continue}l+=tk(i),u=Pk;break;case Pk:if(i&&(HA(ak,i)||"+"==i||"-"==i||"."==i))l+=tk(i);else{if(":"!=i){if(n)return"Invalid scheme";l="",u=Ck,c=0;continue}if(n&&(Ek(e)!=RA(kk,l)||"file"==l&&(xk(e)||null!==e.port)||"file"==e.scheme&&!e.host))return;if(e.scheme=l,n)return void(Ek(e)&&kk[e.scheme]==e.port&&(e.port=null));l="","file"==e.scheme?u=Wk:Ek(e)&&r&&r.scheme==e.scheme?u=Lk:Ek(e)?u=Gk:"/"==a[c+1]?(u=Uk,c++):(e.cannotBeABaseURL=!0,YA(e.path,""),u=Qk)}break;case Ck:if(!r||r.cannotBeABaseURL&&"#"!=i)return"Invalid scheme";if(r.cannotBeABaseURL&&"#"==i){e.scheme=r.scheme,e.path=TA(r.path),e.query=r.query,e.fragment="",e.cannotBeABaseURL=!0,u=Jk;break}u="file"==r.scheme?Wk:Mk;continue;case Lk:if("/"!=i||"/"!=a[c+1]){u=Mk;continue}u=Bk,c++;break;case Uk:if("/"==i){u=qk;break}u=$k;continue;case Mk:if(e.scheme=r.scheme,i==Xw)e.username=r.username,e.password=r.password,e.host=r.host,e.port=r.port,e.path=TA(r.path),e.query=r.query;else if("/"==i||"\\"==i&&Ek(e))u=jk;else if("?"==i)e.username=r.username,e.password=r.password,e.host=r.host,e.port=r.port,e.path=TA(r.path),e.query="",u=Yk;else{if("#"!=i){e.username=r.username,e.password=r.password,e.host=r.host,e.port=r.port,e.path=TA(r.path),e.path.length--,u=$k;continue}e.username=r.username,e.password=r.password,e.host=r.host,e.port=r.port,e.path=TA(r.path),e.query=r.query,e.fragment="",u=Jk}break;case jk:if(!Ek(e)||"/"!=i&&"\\"!=i){if("/"!=i){e.username=r.username,e.password=r.password,e.host=r.host,e.port=r.port,u=$k;continue}u=qk}else u=Bk;break;case Gk:if(u=Bk,"/"!=i||"/"!=KA(l,c+1))continue;c++;break;case Bk:if("/"!=i&&"\\"!=i){u=qk;continue}break;case qk:if("@"==i){h&&(l="%40"+l),h=!0,s=DA(l);for(var m=0;m<s.length;m++){var g=s[m];if(":"!=g||p){var v=Ak(g,wk);p?e.password+=v:e.username+=v}else p=!0}l=""}else if(i==Xw||"/"==i||"?"==i||"#"==i||"\\"==i&&Ek(e)){if(h&&""==l)return"Invalid authority";c-=DA(l).length+1,l="",u=Nk}else l+=i;break;case Nk:case Fk:if(n&&"file"==e.scheme){u=Hk;continue}if(":"!=i||f){if(i==Xw||"/"==i||"?"==i||"#"==i||"\\"==i&&Ek(e)){if(Ek(e)&&""==l)return"Invalid host";if(n&&""==l&&(xk(e)||null!==e.port))return;if(o=pk(e,l))return o;if(l="",u=zk,n)return;continue}"["==i?f=!0:"]"==i&&(f=!1),l+=i}else{if(""==l)return"Invalid host";if(o=pk(e,l))return o;if(l="",u=Vk,n==Fk)return}break;case Vk:if(!HA(ik,i)){if(i==Xw||"/"==i||"?"==i||"#"==i||"\\"==i&&Ek(e)||n){if(""!=l){var y=FA(l,10);if(y>65535)return"Invalid port";e.port=Ek(e)&&y===kk[e.scheme]?null:y,l=""}if(n)return;u=zk;continue}return"Invalid port"}l+=i;break;case Wk:if(e.scheme="file","/"==i||"\\"==i)u=Kk;else{if(!r||"file"!=r.scheme){u=$k;continue}if(i==Xw)e.host=r.host,e.path=TA(r.path),e.query=r.query;else if("?"==i)e.host=r.host,e.path=TA(r.path),e.query="",u=Yk;else{if("#"!=i){Dk(zA(TA(a,c),""))||(e.host=r.host,e.path=TA(r.path),Tk(e)),u=$k;continue}e.host=r.host,e.path=TA(r.path),e.query=r.query,e.fragment="",u=Jk}}break;case Kk:if("/"==i||"\\"==i){u=Hk;break}r&&"file"==r.scheme&&!Dk(zA(TA(a,c),""))&&(Sk(r.path[0],!0)?YA(e.path,r.path[0]):e.host=r.host),u=$k;continue;case Hk:if(i==Xw||"/"==i||"\\"==i||"?"==i||"#"==i){if(!n&&Sk(l))u=$k;else if(""==l){if(e.host="",n)return;u=zk}else{if(o=pk(e,l))return o;if("localhost"==e.host&&(e.host=""),n)return;l="",u=zk}continue}l+=i;break;case zk:if(Ek(e)){if(u=$k,"/"!=i&&"\\"!=i)continue}else if(n||"?"!=i)if(n||"#"!=i){if(i!=Xw&&(u=$k,"/"!=i))continue}else e.fragment="",u=Jk;else e.query="",u=Yk;break;case $k:if(i==Xw||"/"==i||"\\"==i&&Ek(e)||!n&&("?"==i||"#"==i)){if(".."===(d=tk(d=l))||"%2e."===d||".%2e"===d||"%2e%2e"===d?(Tk(e),"/"==i||"\\"==i&&Ek(e)||YA(e.path,"")):Ik(l)?"/"==i||"\\"==i&&Ek(e)||YA(e.path,""):("file"==e.scheme&&!e.path.length&&Sk(l)&&(e.host&&(e.host=""),l=KA(l,0)+":"),YA(e.path,l)),l="","file"==e.scheme&&(i==Xw||"?"==i||"#"==i))for(;e.path.length>1&&""===e.path[0];)XA(e.path);"?"==i?(e.query="",u=Yk):"#"==i&&(e.fragment="",u=Jk)}else l+=Ak(i,_k);break;case Qk:"?"==i?(e.query="",u=Yk):"#"==i?(e.fragment="",u=Jk):i!=Xw&&(e.path[0]+=Ak(i,yk));break;case Yk:n||"#"!=i?i!=Xw&&("'"==i&&Ek(e)?e.query+="%27":e.query+="#"==i?"%23":Ak(i,yk)):(e.fragment="",u=Jk);break;case Jk:i!=Xw&&(e.fragment+=Ak(i,bk))}c++}},Zk=function(e){var t,n,r=xA(this,eE),a=arguments.length>1?arguments[1]:void 0,i=PA(e),s=MA(r,{type:"URL"});if(void 0!==a)try{t=jA(a)}catch(e){if(n=Xk(t={},PA(a)))throw NA(n)}if(n=Xk(s,i,null,t))throw NA(n);var o=s.searchParams=new GA,d=BA(o);d.updateSearchParams(s.query),d.updateURL=function(){s.query=PA(o)||null},vA||(r.href=wA(tE,r),r.origin=wA(nE,r),r.protocol=wA(rE,r),r.username=wA(aE,r),r.password=wA(iE,r),r.host=wA(sE,r),r.hostname=wA(oE,r),r.port=wA(dE,r),r.pathname=wA(uE,r),r.search=wA(cE,r),r.searchParams=wA(lE,r),r.hash=wA(hE,r))},eE=Zk.prototype,tE=function(){var e=jA(this),t=e.scheme,n=e.username,r=e.password,a=e.host,i=e.port,s=e.path,o=e.query,d=e.fragment,u=t+":";return null!==a?(u+="//",xk(e)&&(u+=n+(r?":"+r:"")+"@"),u+=vk(a),null!==i&&(u+=":"+i)):"file"==t&&(u+="//"),u+=e.cannotBeABaseURL?s[0]:s.length?"/"+zA(s,"/"):"",null!==o&&(u+="?"+o),null!==d&&(u+="#"+d),u},nE=function(){var e=jA(this),t=e.scheme,n=e.port;if("blob"==t)try{return new Zk(t.path[0]).origin}catch(e){return"null"}return"file"!=t&&Ek(e)?t+"://"+vk(e.host)+(null!==n?":"+n:""):"null"},rE=function(){return jA(this).scheme+":"},aE=function(){return jA(this).username},iE=function(){return jA(this).password},sE=function(){var e=jA(this),t=e.host,n=e.port;return null===t?"":null===n?vk(t):vk(t)+":"+n},oE=function(){var e=jA(this).host;return null===e?"":vk(e)},dE=function(){var e=jA(this).port;return null===e?"":PA(e)},uE=function(){var e=jA(this),t=e.path;return e.cannotBeABaseURL?t[0]:t.length?"/"+zA(t,"/"):""},cE=function(){var e=jA(this).query;return e?"?"+e:""},lE=function(){return jA(this).searchParams},hE=function(){var e=jA(this).fragment;return e?"#"+e:""},fE=function(e,t){return{get:e,set:t,configurable:!0,enumerable:!0}};if(vA&&kA(eE,{href:fE(tE,(function(e){var t=jA(this),n=PA(e),r=Xk(t,n);if(r)throw NA(r);BA(t.searchParams).updateSearchParams(t.query)})),origin:fE(nE),protocol:fE(rE,(function(e){var t=jA(this);Xk(t,PA(e)+":",Ok)})),username:fE(aE,(function(e){var t=jA(this),n=DA(PA(e));if(!Rk(t)){t.username="";for(var r=0;r<n.length;r++)t.username+=Ak(n[r],wk)}})),password:fE(iE,(function(e){var t=jA(this),n=DA(PA(e));if(!Rk(t)){t.password="";for(var r=0;r<n.length;r++)t.password+=Ak(n[r],wk)}})),host:fE(sE,(function(e){var t=jA(this);t.cannotBeABaseURL||Xk(t,PA(e),Nk)})),hostname:fE(oE,(function(e){var t=jA(this);t.cannotBeABaseURL||Xk(t,PA(e),Fk)})),port:fE(dE,(function(e){var t=jA(this);Rk(t)||(""==(e=PA(e))?t.port=null:Xk(t,e,Vk))})),pathname:fE(uE,(function(e){var t=jA(this);t.cannotBeABaseURL||(t.path=[],Xk(t,PA(e),zk))})),search:fE(cE,(function(e){var t=jA(this);""==(e=PA(e))?t.query=null:("?"==KA(e,0)&&(e=ek(e,1)),t.query="",Xk(t,e,Yk)),BA(t.searchParams).updateSearchParams(t.query)})),searchParams:fE(lE),hash:fE(hE,(function(e){var t=jA(this);""!=(e=PA(e))?("#"==KA(e,0)&&(e=ek(e,1)),t.fragment="",Xk(t,e,Jk)):t.fragment=null}))}),EA(eE,"toJSON",(function(){return wA(tE,this)}),{enumerable:!0}),EA(eE,"toString",(function(){return wA(tE,this)}),{enumerable:!0}),qA){var pE=qA.createObjectURL,mE=qA.revokeObjectURL;pE&&EA(Zk,"createObjectURL",_A(pE,qA)),mE&&EA(Zk,"revokeObjectURL",_A(mE,qA))}CA(Zk,"URL"),gA({global:!0,forced:!yA,sham:!vA},{URL:Zk});var gE=function(){function e(t){R.default(this,e),this.gameData=t,this.customParamKeys=["vid","_1ld","_1lp"]}return D.default(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 t={},n=this.gameData.diagnostic&&this.gameData.diagnostic.cp&&this.gameData.diagnostic.cp.enabled,r=new T.default(location.href,!0);for(var a in r.query)t[a]=r.query[a];return Object.keys(t).filter(function(t){var n=this;return k.default(this,e),this.customParamKeys.some(function(e){return k.default(this,n),e===t}.bind(this))}.bind(this)).length>0||n?(console.log("custom-params",t,n),t):void console.log("custom-params, none")}catch(e){console.log("_checkCustomParams.Error",e)}}}]),e}(),vE=function(){function e(t,n){R.default(this,e),this.adContainer=t,this.onResume=n}return D.default(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 t=document.createElement("div");this.adResumeButton=t,t.id="gd__resume__button",t.setAttribute("title","Resume"),this.addStyles(),t.classList.add("gd__resume__button"),t.addEventListener("click",function(){k.default(this,e),this.onResume()}.bind(this)),this.adContainer.appendChild(t);var n=document.createElement("div");this.adResumeButtonOverlay=n,n.id="gd__resume__button__overlay",n.classList.add("gd__resume__button__overlay"),this.adContainer.appendChild(n)}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}(),yE=function(e){if(!e)return!1;var t=bE.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)},bE=Object.prototype.toString;function _E(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 wE(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_E(Object(n),!0).forEach((function(t){S.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_E(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function AE(e){return null!=e&&e.error_url?"<vmap:VASTAdData>".concat(function(e){return e.promo_url?'<VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper fallbackOnNoAd="true">\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="0" />\n </Extensions>\n </Wrapper>\n </Ad>\n <Ad id="promo">\n <Wrapper>\n <AdSystem>Rainbow</AdSystem>\n <Impression><![CDATA[').concat(e.promo_imp_green_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.promo_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="1" />\n </Extensions>\n </Wrapper>\n </Ad>\n </VAST>').trim():'<VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper>\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,"]]></VASTAdTagURI>\n </Wrapper>\n </Ad>\n </VAST>").trim()}(e),"</vmap:VASTAdData>").trim():'<vmap:AdTagURI templateType="vast3"><![CDATA['.concat(null==e?void 0:e.adtag_url,"]]></vmap:AdTagURI>").trim()}function kE(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 EE(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?kE(Object(n),!0).forEach((function(t){S.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kE(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var xE=new b.EventEmitter,RE=null,SE=function(){function e(t,n,r){var i=this;if(R.default(this,e),RE)return RE;RE=this;var s={debug:!1,width:640,height:360,locale:"en"};this.options=n?a.extendDefaults(s,n):s,this.prefix="gdsdk__",this.adsLoader=null,this.adsManager=null,this.adDisplayContainer=null,this.eventBus=new a.EventBus,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=r.parentDomain,this.topDomain=r.topDomain,this.parentURL=r.parentURL,this.adDisplayContainerInitialized=!1,this.IMASampleTags=a.getIMASampleTags(),this.atom_display,this.adType_="",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=""!==t?document.getElementById(t):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(){k.default(this,i),this._clearSafetyTimer("LOADED"),this._startSafetyTimer(8e3,"LOADED")}.bind(this),"ima"),this.eventBus.subscribe("STARTED",function(){k.default(this,i),this._clearSafetyTimer("STARTED")}.bind(this),"ima")}var t,n,r,i,s,o,d,c,l,h,f,p,m,v,y,b,_,w,E,I,O,P;return D.default(e,[{key:"start",value:(P=A.default(x.default.mark((function e(){var t,n,r,a=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.adSystemInitialize(A.default(x.default.mark((function e(){return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a._init_afg_script({adsense_channel:"4089988593"});case 2:case"end":return e.stop()}}),e)}))));case 3:return t=e.sent,this.afgInitSuccess=t.success,e.next=7,this.adSystemInitialize(A.default(x.default.mark((function e(){return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a._init_hl_script();case 2:return e.next=4,a._init_ima_script();case 4:a._createPlayer(),a._setUpIMA();case 6:case"end":return e.stop()}}),e)}))));case 7:if(n=e.sent,this.imaInitSuccess=n.success,r=[],this.afgInitSuccess||r.push(t.error),this.imaInitSuccess||r.push(n.error),!(r.length>0)){e.next=14;break}throw r[0];case 14:window.eventTest=function(e){k.default(this,a),this._broadcast(e,{message:"",status:"success"})}.bind(this),e.next=21;break;case 17:throw e.prev=17,e.t0=e.catch(0),Bi("gd-adflow error on ads.start",e.t0),new Error(e.t0);case 21:case"end":return e.stop()}}),e,this,[[0,17]])}))),function(){return P.apply(this,arguments)})},{key:"adSystemInitialize",value:(O=A.default(x.default.mark((function e(t){var n;return x.default.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 O.apply(this,arguments)})},{key:"_getAdVast",value:function(e,t){var n=this;return new Promise(function(){var r=A.default(x.default.mark((function r(i){var s,o,d,u,c,l,h,f,p,m=this;return x.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!(a.Ls.available&&a.Ls.getBoolean("gd_debug_ex")&&a.Ls.getBoolean("gd_tag"))){r.next=6;break}return s=n.IMASampleTags[e],o=Math.floor(Math.random()*s.length),d=s[o],i({url:d}),r.abrupt("return");case 6:if(void 0!==window.idhb.requestAds){r.next=8;break}throw new Error("Prebid.js wrapper script hit an error or didn't exist!");case 8:return r.prev=8,u=n.nextAdPosition(e),console.log("GD-SDK Position",u),n._broadcast("AD_REQUEST",{message:u}),c=n.options,"preroll"===u&&g.isPlainObject(c.preroll)?c=c.preroll:"midroll"===u&&g.isPlainObject(c.midroll)?c=c.midroll:"rewarded"===u&&g.isPlainObject(c.rewarded)&&(c=c.rewarded),l="rewarded"===u?"rewardedVideo":"gdbanner"===u?"gd__banner":"midroll"===u?"midroll":"video1",r.next=17,window.idhb.isLoaded();case 17:if(h={tnl_keys:EE(EE({},window.idhb.getAdserverTargetingForAdSlot(l)),{},{tnl_ad_pos:u,tnl_asset_id:n.gameData.gameId})},!(t&&t.retry_on_success&&g.isPlainObject(c.retry_on_success)&&g.isPlainObject(c.retry_on_success.vast))){r.next=22;break}return r.abrupt("return",i(n._createCustomAdVastUrl(c.retry_on_success.vast,h)));case 22:if(!(t&&t.retry_on_failure&&n.options.retry_on_failure&&g.isPlainObject(c.retry_on_failure.vast))){r.next=26;break}return r.abrupt("return",i(n._createCustomAdVastUrl(c.retry_on_failure.vast,h)));case 26:if(!g.isPlainObject(c.vast)){r.next=28;break}return r.abrupt("return",i(n._createCustomAdVastUrl(c.vast,h)));case 28:return r.next=30,n._create_dp_context(u,t);case 30:f=r.sent,Gi("gd-adflow, before idhb",u,l),p=window.idhb.getAdserverTargetingForAdSlot(l),window.idhb.setAdserverTargeting(EE(EE({},p),{},{adaptor_order:t.adapterIndex})),window.idhb.getAdserverTargetingForAdSlot(l),window.idhb.requestAds({slots:S.default({},l,{bidFloor:null!=f&&f.floor_price?f.floor_price:void 0}),callback:function(e,t){var r=this;k.default(this,m),console.log("GD-SDK After HB..."),!f||null!=t&&t.bidFloorApplied||fetch(f.skip_url).catch(function(e){k.default(this,r)}.bind(this)),i({tnl_keys:EE(EE({},window.idhb.getAdserverTargetingForAdSlot(l)),{},{tnl_ad_pos:u,tnl_asset_id:n.gameData.gameId}),url:e,dp:f,hl:t})}.bind(this)}),r.next=42;break;case 39:throw r.prev=39,r.t0=r.catch(8),new Error(r.t0);case 42:case"end":return r.stop()}}),r,this,[[8,39]])})));return function(e){return r.apply(this,arguments)}}())}},{key:"nextAdPosition",value:function(e){if(e===a.AdType.Rewarded)return this.adRewardedCount++,"rewarded";if(e===a.AdType.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.AdType.Rewarded?"rewarded":e===a.AdType.Interstitial?!1===this.gameData.preroll||1===this.adPrerollCount||this.adMidrollCount>0?"midroll":"preroll":"midroll"}},{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,t){var n=this;return t=t||{},new Promise(function(r){var a=this;if(k.default(this,n),"undefined"==typeof google)throw new Error("Unable to load ad, google IMA SDK not defined.");try{var i,s=null==e||null===(i=e.tnl_keys)||void 0===i?void 0:i.tnl_ad_pos;this.adSuccess=!1;var o=new google.ima.AdsRequest,d=this._transformVast(e,t),u=EE(EE({},t),{},{adTag:d,tnl_ad_pos:s});this.adCounter[s]=this.adCounter[s]||0,this.adCounter[s]++;var c=e.dp,l=e.hl;c&&(c.adtag_url=d.url,this._extend_dp_with_adsense(c,l,null==e?void 0:e.tnl_keys));var h=this._isVMAP(s);if(function(){k.default(this,a),t.shouldFail&&(c?(c.adtag_url="dp_original_broken",c.fallback_url="dp_fallback_broken"):d.url="original_broken",null==c||c.adtag_url,null==c||c.fallback_url,d.url),h=!1}.bind(this),h){var f=function(e){var t=e.position||"midroll",n=e.dp_1,r=e.dp_2,a=Date.now(),i=new T.default(e.adtag_url_1,!0);i.query=wE(wE({},i.query),{},{ad_rule:0,vpos:t,pod:1,ppos:1,lip:!0,correlator:a,output:"xml_vast3"});var s=i.toString(),o=new T.default(e.adtag_url_2,!0);o.query=wE(wE({},o.query),{},{ad_rule:0,vpos:t,pod:1,correlator:++a,output:"xml_vast3"});var d=o.toString(),u=Date.now();return'<?xml version="1.0" encoding="UTF-8"?>\n<vmap:VMAP xmlns:vmap="http://www.iab.net/videosuite/vmap" version="1.0">\n<vmap:AdBreak timeOffset="start" breakType="linear,nonlinear" breakId="break-1">\n <vmap:AdSource id="'.concat(u++,'" allowMultipleAds="false" followRedirects="true">\n ').concat(AE({id:u++,adtag_url:s,error_url:null==n?void 0:n.error_url,impression_url:null==n?void 0:n.impression_url}),'\n </vmap:AdSource>\n</vmap:AdBreak>\n<vmap:AdBreak timeOffset="start" breakType="linear,nonlinear" breakId="break-2">\n <vmap:AdSource id="').concat(u++,'" allowMultipleAds="false" followRedirects="true">\n ').concat(AE({id:u++,adtag_url:d,error_url:null==r?void 0:r.error_url,impression_url:null==r?void 0:r.impression_url}),'\n </vmap:AdSource>\n <vmap:Extensions>\n <vmap:Extension type="bumper" suppress_bumper="true"></vmap:Extension>\n </vmap:Extensions>\n</vmap:AdBreak>\n</vmap:VMAP>').trim()}(this._get_vmap_context({dp:c,adtag:d,position:"preroll"===u.tnl_ad_pos?"preroll":"midroll",config:this._get_vmap_config(s)}));o.adsResponse=f}else if(c&&l.bidFloorApplied){var p=function(e){return e.promo_url?e.fallback_url?'<?xml version="1.0" encoding="utf-8"?>\n <VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper fallbackOnNoAd="true">\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="0" />\n </Extensions>\n </Wrapper>\n </Ad>\n <Ad id="fallback">\n <Wrapper>\n <AdSystem>ADS</AdSystem>\n <Impression><![CDATA[').concat(e.fallback_imp_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.fallback_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="1" />\n </Extensions>\n </Wrapper>\n </Ad>\n <Ad id="promo">\n <Wrapper>\n <AdSystem>Rainbow</AdSystem>\n <Impression><![CDATA[').concat(e.promo_imp_green_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.promo_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="2" />\n </Extensions>\n </Wrapper>\n </Ad>\n </VAST>').trim():'<?xml version="1.0" encoding="utf-8"?>\n <VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper fallbackOnNoAd="true">\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="0" />\n </Extensions>\n </Wrapper>\n </Ad>\n <Ad id="promo">\n <Wrapper>\n <AdSystem>Rainbow</AdSystem>\n <Impression><![CDATA[').concat(e.promo_imp_green_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.promo_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="1" />\n </Extensions>\n </Wrapper>\n </Ad>\n </VAST>').trim():e.fallback_url?'<?xml version="1.0" encoding="utf-8"?>\n <VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper fallbackOnNoAd="true">\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="0" />\n </Extensions>\n </Wrapper>\n </Ad>\n <Ad id="fallback">\n <Wrapper>\n <AdSystem>ADS</AdSystem>\n <Impression><![CDATA[').concat(e.fallback_imp_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.fallback_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="1" />\n </Extensions>\n </Wrapper>\n </Ad>\n </VAST>').trim():'<?xml version="1.0" encoding="utf-8"?>\n <VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper>\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,"]]></VASTAdTagURI>\n </Wrapper>\n </Ad>\n </VAST>").trim()}(c);o.adsResponse=p}else if(c&&c.fallback_url){var m=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()}(c);o.adsResponse=m}else o.adTagUrl=d.url;o.linearAdSlotWidth=this.options.width,o.linearAdSlotHeight=this.options.height,o.nonLinearAdSlotWidth=this.options.width,o.nonLinearAdSlotHeight=this.options.height,o.forceNonLinearFullSlot=!0,this.options.vast_load_timeout&&(o.vastLoadTimeout=this.options.vast_load_timeout),o.setAdWillAutoPlay(t.autoplayAllowed),o.setAdWillPlayMuted(t.autoplayRequiresMute),this.adsLoader.requestAds(o,u);try{this._broadcast("AD_SDK_REQUEST",{message:u})}catch(e){}r(o)}catch(e){throw new Error(e)}}.bind(this))}},{key:"cancel",value:function(){if(!1!==this.requestRunning){this.requestRunning=!1,this._resetAdsLoader(),this._hide("cancel");var e="AD_SDK_CANCELED";this._broadcast(e,{name:e,message:"Advertisement has been canceled.",status:"warning",analytics:{category:this.eventCategory,action:e,label:this.gameData.gameId}})}}},{key:"_checkAutoPlay",value:(I=A.default(x.default.mark((function e(){var t=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(e,n){var r=this;k.default(this,t);var a=navigator.userAgent.toLowerCase();a.indexOf("safari")>-1&&a.indexOf("chrome")<0?e({autoplayAllowed:!0,autoplayRequiresMute:!0}):U.default.video({inline:!0,muted:!1}).then(function(t){k.default(this,r);var n=t.result;t.error,e(!0===n?{autoplayAllowed:!0,autoplayRequiresMute:!1}:{autoplayAllowed:!0,autoplayRequiresMute:!0})}.bind(this))}.bind(this)));case 1:case"end":return e.stop()}}),e,this)}))),function(){return I.apply(this,arguments)})},{key:"_initDisplayContainerWithAutoPlay",value:(E=A.default(x.default.mark((function e(){var t;return x.default.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 E.apply(this,arguments)})},{key:"startAd",value:(w=A.default(x.default.mark((function e(t){var n,r;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.adType,r=t.params,this.adType_=n,this.adContext=EE({},r),"promo"!==(null==r?void 0:r.adapter)){e.next=5;break}return e.abrupt("return",this._startPromo(r,n));case 5:if("adsense"!==(null==r?void 0:r.adapter)){e.next=26;break}if(n!==a.AdType.Interstitial){e.next=19;break}if("preroll"!==(null==r?void 0:r.position)){e.next=11;break}return e.abrupt("return",this._startAdsensePlacementPreroll(t));case 11:if("start"!==(null==r?void 0:r.position)){e.next=15;break}return e.abrupt("return",this._startAdsensePlacementStart(t));case 15:if("next"!==(null==r?void 0:r.position)){e.next=17;break}return e.abrupt("return",this._startAdsensePlacementNext(t));case 17:e.next=24;break;case 19:if(n!==a.AdType.Rewarded){e.next=23;break}return e.abrupt("return",this._startAdsensePlacementRewardedAd(t));case 23:case 34:throw new Error("Unsupported ad type");case 24:e.next=35;break;case 26:if(n!==a.AdType.Interstitial){e.next=30;break}return e.abrupt("return",this._startInterstitialAd(r));case 30:if(n!==a.AdType.Rewarded){e.next=34;break}return e.abrupt("return",this._startRewardedAd(r));case 35:case"end":return e.stop()}}),e,this)}))),function(e){return w.apply(this,arguments)})},{key:"preloadAd",value:(_=A.default(x.default.mark((function e(t){return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t!==a.AdType.Interstitial){e.next=4;break}return e.abrupt("return","gdsdk://preloaded");case 4:if(t!==a.AdType.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 _.apply(this,arguments)})},{key:"addAdResume",value:function(){var e=this,t=function(){k.default(this,e),this.adsManager.resume()}.bind(this);try{this.adResume=new vE(this.adContainer,t),this.adResume.add()}catch(e){console.log("error on adding adResume",e)}}},{key:"loadDisplayAd",value:(b=A.default(x.default.mark((function e(t){var n=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(){var e=A.default(x.default.mark((function e(r,i){var s,o,d,u,c,l,h,f,p,m=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,(o=t?t.containerId:null)||i("Container id is not specified"),d=document.getElementById(o),document.getElementById(o)||i("No container is found with this id - ".concat(o)),void 0===window.idhb.requestAds&&i("Prebid.js wrapper script hit an error or didn't exist!"),u=t.slotId?t.slotId:"gd__banner@".concat(o),document.getElementById(u)||(c="\n .gd__banner{\n z-index: ".concat(a.Layers.DisplayContainer.zIndex,";\n height: 100%;\n display: flex !important;\n align-items: center;\n justify-content: center;\n }"),document.getElementById("gd__banner__style")||((l=document.createElement("style")).type="text/css",l.id="gd__banner__style",l.styleSheet?l.styleSheet.cssText=c:l.appendChild(document.createTextNode(c)),d.appendChild(l)),(h=document.createElement("div")).id=u,h.classList.add("gd__banner"),d.appendChild(h)),e.next=10,n._create_dp_display_context();case 10:n.atom_display=e.sent,null!==(s=n.atom_display)&&void 0!==s&&s.params&&window.idhb.setAdserverTargeting(null===(f=n.atom_display)||void 0===f?void 0:f.params),(p={})[u]={maxSize:[d.offsetWidth,d.offsetHeight]},window.idhb.requestAds({slots:p,callback:function(e){k.default(this,m)}.bind(this)}),r(),e.next=21;break;case 18:e.prev=18,e.t0=e.catch(0),i(e.t0.message||e.t0);case 21:case"end":return e.stop()}}),e,this,[[0,18]])})));return function(t,n){return e.apply(this,arguments)}}()));case 1:case"end":return e.stop()}}),e)}))),function(e){return b.apply(this,arguments)})},{key:"_startInterstitialAd",value:(y=A.default(x.default.mark((function e(t){var n,r=this;return x.default.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(){k.default(this,r)}.bind(this)){e.next=7;break}return e.abrupt("return");case 7:return this.requestRunning=!0,e.next=10,this._initDisplayContainerWithAutoPlay();case 10:return n=e.sent,e.next=13,this._loadInterstitialAd(EE(EE({},n),t));case 13:if(e.sent.success){e.next=18;break}return e.abrupt("return");case 18:n.autoplayRequiresMute&&this.adsManager.setVolume(0),this.adsManager.init(this.options.width,this.options.height,google.ima.ViewMode.NORMAL),this.adsManager.start(),e.next=27;break;case 23:throw e.prev=23,e.t0=e.catch(0),this._onError(e.t0),e.t0;case 27:case"end":return e.stop()}}),e,this,[[0,23]])}))),function(e){return y.apply(this,arguments)})},{key:"_startPromo",value:(v=A.default(x.default.mark((function e(t,n){var r;return x.default.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 r=e.sent,e.next=11,this._loadPromo(EE(EE({},r),t),n);case 11:if(e.sent.success){e.next=16;break}return e.abrupt("return");case 16:r.autoplayRequiresMute&&this.adsManager.setVolume(0),this.adsManager.init(this.options.width,this.options.height,google.ima.ViewMode.NORMAL),this.adsManager.start(),this.msgrt.send("promo.adsense",{message:"".concat(t.position," success")}),e.next=27;break;case 22:throw e.prev=22,e.t0=e.catch(0),this.msgrt.send("promo.adsense.err",{message:"".concat(t.position," failure,").concat(e.t0.message?e.t0.message:e.t0,", [").concat(this.parentURL,"]")}),this._onError(e.t0),e.t0;case 27:case"end":return e.stop()}}),e,this,[[0,22]])}))),function(e,t){return v.apply(this,arguments)})},{key:"_loadPromo",value:(m=A.default(x.default.mark((function e(t,n){var r,i;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this._resetAdsLoader(),e.prev=1,r=this.nextAdPosition(n),i=this._create_promo_context(r),this._requestPromo(i,EE({adType:a.AdType.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 m.apply(this,arguments)})},{key:"_loadInterstitialAd",value:(p=A.default(x.default.mark((function e(t){var n;return x.default.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.AdType.Interstitial,t);case 6:e.t0=e.sent;case 7:return n=e.t0,delete this.preloadedInterstitialAdVast,e.next=11,this._requestAd(n,EE({adType:a.AdType.Interstitial},t));case 11:return 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 p.apply(this,arguments)})},{key:"_waitOnAdLoad",value:function(){var e=this;return new Promise(function(t,n){var r=this;k.default(this,e);var a="videoad.preloadad";this.eventBus.unsubscribeScope(a);var i=function(e){var n=this;k.default(this,r),setTimeout(function(){k.default(this,n),this.eventBus.unsubscribeScope(a),t({success:!0,args:e})}.bind(this),1)}.bind(this),s=function(e){var n=this;k.default(this,r),setTimeout(function(){k.default(this,n),this.eventBus.unsubscribeScope(a),t({success:!1,args:e})}.bind(this),1)}.bind(this);this.eventBus.subscribe("AD_SDK_MANAGER_READY",i,a),this.eventBus.subscribe("AD_SDK_CANCELED",s,a),this.eventBus.subscribe("AD_ERROR",s,a)}.bind(this))}},{key:"_startRewardedAd",value:(f=A.default(x.default.mark((function e(t){var n,r=this;return x.default.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(){k.default(this,r)}.bind(this)){e.next=7;break}return e.abrupt("return");case 7:return this.requestRunning=!0,e.next=10,this._initDisplayContainerWithAutoPlay();case 10:return n=e.sent,e.next=13,this._loadRewardedAd(EE(EE({},n),t));case 13:if(e.sent.success){e.next=18;break}return e.abrupt("return");case 18:n.autoplayRequiresMute&&this.adsManager.setVolume(0),this.adsManager.init(this.options.width,this.options.height,google.ima.ViewMode.NORMAL),this.adsManager.start(),e.next=27;break;case 23:throw e.prev=23,e.t0=e.catch(0),this._onError(e.t0),e.t0;case 27:case"end":return e.stop()}}),e,this,[[0,23]])}))),function(e){return f.apply(this,arguments)})},{key:"_loadRewardedAd",value:(h=A.default(x.default.mark((function e(t){var n;return x.default.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.AdType.Rewarded,t);case 6:e.t0=e.sent;case 7:return n=e.t0,delete this.preloadedRewardedAdVast,e.next=11,this._requestAd(n,EE({adType:a.AdType.Rewarded},t));case 11:return 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 h.apply(this,arguments)})},{key:"_preloadInterstitialAd",value:(l=A.default(x.default.mark((function e(){return x.default.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.AdType.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 l.apply(this,arguments)})},{key:"_preloadRewardedAd",value:(c=A.default(x.default.mark((function e(){return x.default.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.AdType.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 c.apply(this,arguments)})},{key:"_onError",value:function(e){this.cancel(),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 t=this;if(this.activeAdContainer){this.activeAdContainer.style.visibility="visible";var n=null==e?void 0:e.mode;e.t4r=this.gameData.__t4r;var r=this._isT4R(e),a=this._getT4ROptions(e);if("loaded"===n)this.activeAdContainer.style.opacity=r?.001:1,r&&this.adsManager.setVolume(0),r&&this._broadcast("AD_T4R"),r&&setTimeout(function(){k.default(this,t),this.activeAdContainer.style.opacity=1,this.adsManager.setVolume(1)}.bind(this),((null==a?void 0:a.min)||1234)+Math.random()*((null==a?void 0:a.max)||3210));else if("click"===n||"first_quartile"===n){if(r&&"click"===n){var i,s=null===(i=this._adrequest_user_context)||void 0===i?void 0:i.tnl_ad_pos;this.clickCount[s]++}this.activeAdContainer.style.opacity=1,this.adsManager.setVolume(1)}}}},{key:"_createPlayer",value:function(){var e=this,t=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.Layers.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 n=document.createElement("video");n.setAttribute("playsinline",!0),n.setAttribute("webkit-playsinline",!0),n.id="".concat(this.prefix,"advertisement_video"),n.style.position="absolute",n.style.backgroundColor="#000000",n.style.top="0",n.style.left="0",n.style.width=this.options.width+"px",n.style.height=this.options.height+"px",this.video_ad_player=n,this.adContainer.appendChild(n);var r=document.createElement("div");r.id="".concat(this.prefix,"advertisement_slot"),r.style.position="absolute",r.style.top="0",r.style.left="0",r.style.width=this.options.width+"px",r.style.height=this.options.height+"px",this.adContainerInner=r,this.activeAdContainer=this.adContainer,window.activeAdContainer=this.activeAdContainer,this.thirdPartyContainer?(this.adContainer.appendChild(r),this.thirdPartyContainer.appendChild(this.adContainer),this.activeAdContainer=this.thirdPartyContainer):(this.adContainer.appendChild(r),t.appendChild(this.adContainer)),this.addAdResume(),this.activeAdContainer.style.visibility="hidden";var i=function(){k.default(this,e);var t=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:t,this.options.height=this.thirdPartyContainer?this.thirdPartyContainer.offsetHeight:a,r.style.width=this.options.width+"px",r.style.height=this.options.height+"px",n.style.width=this.options.width+"px",n.style.height=this.options.height+"px"}.bind(this);window.addEventListener("resize",i),window.document.addEventListener("DOMContentLoaded",i)}},{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 t=this,n=new google.ima.AdsRenderingSettings;n.autoAlign=!1,n.enablePreloading=!1,n.restoreCustomPlaybackStateOnAdBreakComplete=!0,n.useStyledNonLinearAds=!0,n.uiElements=[google.ima.UiElements.AD_ATTRIBUTION,google.ima.UiElements.COUNTDOWN],this.adsManager=e.getAdsManager(this.video_ad_player,n),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(){k.default(this,t),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 r=new Date,a=r.getHours(),i=r.getDate(),s=r.getMonth(),o=r.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(i," m").concat(s," y").concat(o)}}),this._adrequest_user_context=e.getUserRequestContext()}},{key:"_onAdEvent",value:function(e){var t,n=this,r=new Date,i=r.getHours(),s=r.getDate(),o=r.getMonth(),d=r.getFullYear(),u=a.getKeyByValue(google.ima.AdEvent.Type,e.type),c=!1,l=(null==e||null===(t=e.getAd())||void 0===t?void 0:t.getContentType())||"",h=!l.startsWith("image")&&!l.startsWith("text");this._sendIMAEventsToHB(e);var f="";switch(e.type){case google.ima.AdEvent.Type.AD_BREAK_READY:f="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:f="Fired when an ads list is loaded.";break;case google.ima.AdEvent.Type.ALL_ADS_COMPLETED:c=!0,f="Fired when the ads manager is done playing all the ads.";break;case google.ima.AdEvent.Type.CLICK:f="Fired when the ad is clicked.";var p=e.getAd().getContentType();this._show({mode:"click",contentType:p});break;case google.ima.AdEvent.Type.COMPLETE:e.getAd(),c=this._is_completed(e.getAd()),f="Fired when the ad completes playing.",this.adType_===a.AdType.Rewarded&&this._broadcast("SDK_REWARDED_WATCH_COMPLETE",{message:"",status:"success"});break;case google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED:f="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:f="Fired when content should be resumed. This usually happens when an ad finishes or collapses.",c=!0,this._hideAddResume();break;case google.ima.AdEvent.Type.DURATION_CHANGE:f="Fired when the ad's duration changes.";break;case google.ima.AdEvent.Type.FIRST_QUARTILE:f="Fired when the ad playhead crosses first quartile.";var m=e.getAd().getContentType();this._show({mode:"first_quartile",contentType:m});break;case google.ima.AdEvent.Type.IMPRESSION:f="Fired when the impression URL has been pinged.";break;case google.ima.AdEvent.Type.INTERACTION:f="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:f="Fired when the displayed ad changes from linear to nonlinear, or vice versa.";break;case google.ima.AdEvent.Type.LOADED:var g=e.getAd().getContentType();f=g,this._show({mode:"loaded",contentType:g});break;case google.ima.AdEvent.Type.LOG:e.getAdData().adError&&(f=e.getAdData());break;case google.ima.AdEvent.Type.MIDPOINT:f="Fired when the ad playhead crosses midpoint.";break;case google.ima.AdEvent.Type.PAUSED:h&&this.adResume.show(),f="Fired when the ad is paused.";break;case google.ima.AdEvent.Type.RESUMED:f="Fired when the ad is resumed.",h&&this.adResume.hide();break;case google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED:f="Fired when the displayed ads skippable state is changed.";break;case google.ima.AdEvent.Type.SKIPPED:c=this._is_completed(e.getAd()),f="Fired when the ad is skipped by the user.";break;case google.ima.AdEvent.Type.STARTED:this._hideAddResume(),f="Fired when the ad starts playing.";break;case google.ima.AdEvent.Type.THIRD_QUARTILE:f="Fired when the ad playhead crosses third quartile.";break;case google.ima.AdEvent.Type.USER_CLOSE:c=this._is_completed(e.getAd()),f="Fired when the ad is closed by the user.";break;case google.ima.AdEvent.Type.VOLUME_CHANGED:f="Fired when the ad volume has changed.";break;case google.ima.AdEvent.Type.VOLUME_MUTED:f="Fired when the ad volume has been muted."}if(""!==u&&""!==f&&this._broadcast(u,{name:u,message:f,status:"success",analytics:{category:u,action:this.parentDomain,label:"h".concat(i," d").concat(s," m").concat(o," y").concat(d)}}),c&&!this.adSuccess){this.adSuccess=!0;var v=e.getAd(),y="Rainbow"===(null==v?void 0:v.getAdSystem())&&(null==v?void 0:v.getWrapperAdIds().some(function(e){return k.default(this,n),"promo"===e}.bind(this)));null==v||v.getAdSystem(),null==v||v.getWrapperAdIds(),this._broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success",isPromoSuccess:y}),this.resetForNext(e)}}},{key:"_onAdError",value:function(e){this.requestRunning=!1,this._resetAdsLoader(),this._clearSafetyTimer("ERROR"),this._hide("_onAdError"),this._sendIMAEventsToHB(e);try{var t="AD_ERROR",n=e.getError(),r=n.getErrorCode().toString()||n.getVastErrorCode().toString(),a=this._getInnerErrorCode(n);xE.emit("AD_ERROR",r),this._broadcast(t,{message:r,details:a,status:"warning",analytics:{category:t,action:a,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:"_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,t){var n=this;this.safetyTimer&&clearTimeout(this.safetyTimer),this.safetyTimer=window.setTimeout(function(){k.default(this,n),this.cancel(),this._clearSafetyTimer(t)}.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(yE(e.getInnerError)){var t=e.getInnerError();if(t)return yE(t.getErrorCode)&&yE(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,t){var n=this;if(e){var r=this.macros.transform(e,{get:function(e){if(k.default(this,n),t&&t.tnl_keys)return t.tnl_keys[e.toLowerCase()]}.bind(this)});for(var a in r.query||{}){var i=r.query[a];g.isPlainObject(i)&&(r.query[a]=M.default.stringify(i))}var s=new T.default(r.url,!0);return j.default(s.query,r.query||{}),EE({url:s.toString()},t)}}},{key:"_transformVast",value:function(e,t){var n={url:e.url};try{var r=new T.default(e.url,!0),a=this._transformQuery(e,t,r);a&&(n.url=r.toString());var i=a?r:new T.default(e.url,!0);if(i.query.cust_params){var s=M.default.parse(i.query.cust_params);n.bidder=s.hb_bidder,n.cust_params=s}n.url_parsed=i}catch(e){n.hasError=!0,n.message=e.message,n.bidder="error",console.log(e.message)}return n}},{key:"_transformQuery",value:function(e,t,n){var r=this;if(e&&t&&e.tnl_keys){var a=this.options.vast_query;if(t.retry_on_success&&this.options.retry_on_success&&g.isPlainObject(this.options.retry_on_success.vast_query)?a=this.options.retry_on_success.vast_query:t.retry_on_failure&&this.options.retry_on_failure&&g.isPlainObject(this.options.retry_on_failure.vast_query)&&(a=this.options.retry_on_failure.vast_query),a=L.default(a),g.isPlainObject(a)){var i=n.query;if(a.$$remove){for(var s in i){new RegExp(a.$$remove,"i").test(s)&&delete i[s]}delete a.$$remove}var o=M.default.parse(i.cust_params);if(a.cust_params&&a.cust_params.$$remove){for(var d in o){new RegExp(a.cust_params.$$remove,"i").test(d)&&delete o[d]}delete a.cust_params.$$remove}var u=this.macros.transform(a,{get:function(t){return k.default(this,r),e.tnl_keys[t.toLowerCase()]}.bind(this)});return i.cust_params=o,j.default(i,u),i.cust_params=M.default.stringify(i.cust_params),!0}}}},{key:"_isT4R",value:function(e){var t,n,r,a,i=null===(t=this._adrequest_user_context)||void 0===t?void 0:t.tnl_ad_pos;if(this.clickCount[i]>=(null===(n=e.t4r[i])||void 0===n?void 0:n.count))return!1;if(null!=e&&null!==(r=e.contentType)&&void 0!==r&&r.startsWith("image/")||"text"===(null==e?void 0:e.contentType))return i&&(null===(a=e.t4r[i])||void 0===a?void 0:a.enabled);if(null!=e&&e.contentType.startsWith("video/")){var s,o=(null===(s=e.t4r[i])||void 0===s?void 0:s.viper)||0;if(o>0){var d,u=Math.random()<o;return i&&u&&(null===(d=e.t4r[i])||void 0===d?void 0:d.enabled)}return!1}return!1}},{key:"_isVMAP",value:function(e){var t,n,r,a,i,s,o,d,u,c,l,h,f,p,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===(a=r.pAds)||void 0===a||null===(i=a.vmap)||void 0===i?void 0:i.enabled))||"midroll"===e&&(!0===(null===(s=this.gameData)||void 0===s||null===(o=s.mAds)||void 0===o?void 0:o.vmap)||!0===(null===(d=this.gameData)||void 0===d||null===(u=d.mAds)||void 0===u||null===(c=u.vmap)||void 0===c?void 0:c.enabled))||"rewarded"===e&&(!0===(null===(l=this.gameData)||void 0===l||null===(h=l.rAds)||void 0===h?void 0:h.vmap)||!0===(null===(f=this.gameData)||void 0===f||null===(p=f.rAds)||void 0===p||null===(m=p.vmap)||void 0===m?void 0:m.enabled));if(!g)return!1;var v=this._get_vmap_config(e),y=this.adCounter[e];return void 0!==(null==v?void 0:v.start)?y>=(null==v?void 0:v.start):g}},{key:"_getT4ROptions",value:function(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){var t=e.adtag,n=e.position,r=e.config,a=e.dp,i=this._createCustomAdVastUrl(null==r?void 0:r.vast_1)||t,s=this._createCustomAdVastUrl(null==r?void 0:r.vast_2)||t,o=null!=r&&r.vast_1?void 0:a,d=null!=r&&r.vast_2?void 0:a;return{adtag_url_1:null==i?void 0:i.url,adtag_url_2:null==s?void 0:s.url,position:n,dp_1:o,dp_2:d}}},{key:"_get_vmap_config",value:function(e){var t,n,r,a,i,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===(a=r.mAds)||void 0===a?void 0:a.vmap;case"rewarded":return null===(i=this.gameData)||void 0===i||null===(s=i.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(t){var n=this;k.default(this,e);try{var r={id:this.topDomain||this.parentDomain,au:"display",ty:"display",aid:this.gameData.gameId,pgu:this.parentURL},a=new gE(this.gameData).checkCustomParams();a&&(r.cp=a);var i=encodeURIComponent(u.Base64.encode(JSON.stringify(r)));fetch("https://tag.atom.gamedistribution.com/v1/atm?ar=".concat(i)).then(function(e){return k.default(this,n),e.json()}.bind(this)).then(function(e){if(k.default(this,n),!e||!e.p)return this.msgrt.send("dp.na",{message:"atom"}),t();this.msgrt.send("dp.fp",{message:e.p/100}),t({params:{fp:e.p/100},error_url:"https://tag.atom.gamedistribution.com/v1/err?ar=".concat(i),impression_url:"https://tag.atom.gamedistribution.com/v1/imp?ar=".concat(i)})}.bind(this)).catch(function(e){k.default(this,n),this.msgrt.send("dp.err",{message:(null==e?void 0:e.message)||e}),t()}.bind(this))}catch(e){this.msgrt.send("dp.err",{message:(null==e?void 0:e.message)||e}),t()}}.bind(this))}},{key:"_create_promo_context",value:function(e){var t,n=this,r={id:this.topDomain||this.parentDomain,au:e||"unknown",ty:"video",aid:this.gameData.gameId,pgu:this.parentURL},a=Object.keys(r).map(function(e){return k.default(this,n),"".concat(e,"=").concat(encodeURIComponent(r[e]))}.bind(this)).join("&");encodeURIComponent(u.Base64.encode(JSON.stringify(r)));var i=null===(t=this.gameData.promo)||void 0===t?void 0:t.rainbow,s=null==i?void 0:i.enabled,o="https://tag.atom.gamedistribution.com/v1/rainbow/?".concat(a);console.log("gd-adflow openPromoUrl",o);var d=s?o:void 0;return function(){k.default(this,n)}.bind(this),{promo_url:d,promo_imp_blue_url:s?"https://tag.atom.gamedistribution.com/v1/rainbow/blue":void 0,promo_imp_green_url:s?"https://tag.atom.gamedistribution.com/v1/rainbow/green":void 0}}},{key:"_create_dp_context",value:function(e,t){var n=this;return new Promise(function(){var r=A.default(x.default.mark((function r(a){var i,s,o,d,c,l,h=this;return x.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(r.prev=0,n._isDP(e)){r.next=5;break}return n.msgrt.send("dp.na",{message:"rule"}),r.abrupt("return",a());case 5:s={id:n.topDomain||n.parentDomain,au:e||"unknown",ty:"video",aid:n.gameData.gameId,pgu:n.parentURL},(o=new gE(n.gameData).checkCustomParams())&&(s.cp=o),d=encodeURIComponent(u.Base64.encode(JSON.stringify(s))),null==t||t.adapterIndex,null==t||t.isLastAdapter,c=null===(i=n.gameData.promo)||void 0===i?void 0:i.rainbow,l=(null==c?void 0:c.enabled)&&(null==t?void 0:t.isLastAdapter)&&"rewarded"===e,null==c||c.enabled,null==t||t.isLastAdapter,fetch("https://tag.atom.gamedistribution.com/v1/atm?ar=".concat(d)).then(function(e){return k.default(this,h),e.json()}.bind(this)).then(function(e){if(k.default(this,h),!e||!e.p)return n.msgrt.send("dp.na",{message:"atom"}),a();var t=e.p/100;a({id:Date.now(),floor_price:t,error_url:"https://tag.atom.gamedistribution.com/v1/err?ar=".concat(d,"&ec=[ERRORCODE]"),impression_url:"https://tag.atom.gamedistribution.com/v1/imp?ar=".concat(d),skip_url:"https://tag.atom.gamedistribution.com/v1/skp?ar=".concat(d),promo_url:l?"https://tag.atom.gamedistribution.com/v1/rainbow?ar=".concat(d):void 0,promo_imp_blue_url:l?"https://tag.atom.gamedistribution.com/v1/rainbow/blue":void 0,promo_imp_green_url:l?"https://tag.atom.gamedistribution.com/v1/rainbow/green":void 0})}.bind(this)).catch(function(e){k.default(this,h),n.msgrt.send("dp.err",{message:(null==e?void 0:e.message)||e}),a()}.bind(this)),r.next=20;break;case 16:r.prev=16,r.t0=r.catch(0),n.msgrt.send("dp.err",{message:(null===r.t0||void 0===r.t0?void 0:r.t0.message)||r.t0}),a();case 20:case"end":return r.stop()}}),r,this,[[0,16]])})));return function(e){return r.apply(this,arguments)}}())}},{key:"_extend_dp_with_adsense",value:function(e,t){if(e&&t)try{var n,r=new T.default(t.vastUrl,!0);if(null===(n=r.query)||void 0===n||!n.cust_params)return;var a=M.default.parse(r.query.cust_params);if(!a.tnl_asset_id)return;a.adsense=1,r.query.cust_params=M.default.stringify(a,!1),e.fallback_url=r.toString(),e.fallback_imp_url="https://tag.atom.gamedistribution.com/v1/rainbow/green"}catch(e){}}},{key:"_init_hl_script",value:(d=A.default(x.default.mark((function e(t){var n,r,i,s,o,d,u,c=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this._getPrebidScripts(),r=n[0],i=function(){return k.default(this,c),!1}.bind(this),window.idhb=window.idhb||{iabCmpExists:i},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"}),window.idhb.que=window.idhb.que||[],(s=new URL(r)).searchParams.append("referer",window.idhb.options.configUrl),r=s.href,e.next=12,a.getScript(r,"gdsdk_prebid",{alternates:n,error_prefix:"Blocked:",exists:function(){return k.default(this,c),window.idhb.requestAds}.bind(this)});case 12:o=a.getQueryString("ch",window.location.href),d=a.getQueryString("ch_date",window.location.href),u={tnl_content_category:this.category.toLowerCase()},o&&(u.channel=o),d&&(u.ch_date=d),window.idhb.setAdserverTargeting(u),window.idhb.allowPersonalizedAds(!!parseInt(this.userAllowedPersonalizedAds)),window.idhb.addEventListener("slotRenderEnded",function(e){var t=this;k.default(this,c);try{var n,r=e.slotId.split("@");r=1===r.length?r[0]:r[1],e.isEmpty?(null!==(n=this.atom_display)&&void 0!==n&&n.error_url&&(fetch(this.atom_display.error_url).catch(function(e){k.default(this,t)}.bind(this)),delete this.atom_display),this._broadcast("DISPLAYAD_ERROR",{message:r,status:"warning"})):(this.atom_display.impression_url&&(fetch(this.atom_display.impression_url).catch(function(e){k.default(this,t)}.bind(this)),delete this.atom_display),this._broadcast("DISPLAYAD_IMPRESSION",{message:r,status:"success"}))}catch(e){}}.bind(this));case 20:case"end":return e.stop()}}),e,this)}))),function(e){return d.apply(this,arguments)})},{key:"_init_ima_script",value:(o=A.default(x.default.mark((function e(t){var n,r,i=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=["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"],r=this.options.debug?n[0]:n[1],e.next=4,a.getScript(r,"gdsdk_ima",{alternates:n,error_prefix:"Blocked:",exists:function(){return k.default(this,i),window.google&&window.google.ima}.bind(this)});case 4:case"end":return e.stop()}}),e,this)}))),function(e){return o.apply(this,arguments)})},{key:"_init_afg_script",value:(s=A.default(x.default.mark((function e(t){var n,r,i,s,o=this;return x.default.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(s={}).crossorigin="anonymous",s["data-ad-client"]=(null==t||null===(n=t.adsense_client)||void 0===n?void 0:n.length)>0?t.adsense_client:"ca-pub-2316275586951220",s["data-ad-frequency-hint"]="30s",s.allow="autoplay",(null==t||null===(r=t.adsense_channel)||void 0===r?void 0:r.length)>0&&(s["data-ad-channel"]=t.adsense_channel),(null==t||null===(i=t.adsense_host)||void 0===i?void 0:i.length)>0&&(s["data-ad-host"]=t.adsense_host),!0===(null==t?void 0:t.adsense_adbreak_test)&&(s["data-adbreak-test"]="on"),e.next=14,a.getScript("https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js","afg",{error_prefix:"Blocked:",exists:function(){return k.default(this,o),!!window.adsbygoogle}.bind(this),attrs:s});case 14:window.adsbygoogle=window.adsbygoogle||[],window.adsbygoogle.push({sound:"on",preloadAdBreaks:"on"});case 16:case"end":return e.stop()}}),e,this)}))),function(e){return s.apply(this,arguments)})},{key:"clearSession",value:function(){this.requestRunning=!1}},{key:"_startAdsensePlacementRewardedAd",value:(i=A.default(x.default.mark((function e(t){var n,r,a,i,s,o,d=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(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(k.default(this,d),t.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"),n=function(){k.default(this,d),this._broadcast("CONTENT_PAUSE_REQUESTED",{message:"",status:"success"}),this._broadcast("IMPRESSION",{message:"",status:"success"})}.bind(this),r=function(){k.default(this,d),this._broadcast("CONTENT_RESUME_REQUESTED",{message:"",status:"success"})}.bind(this),a=function(){k.default(this,d),this._send_atom_event("sg.ad.rw.dismissed")}.bind(this),i=function(){k.default(this,d),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),s=function(e){k.default(this,d),e()}.bind(this),o=function(e){k.default(this,d),this.resetForNext(),this.adCounter.rewarded=this.adCounter.rewarded||0,this.adCounter.rewarded++,"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),u={type:"reward",name:"reward-in-game",beforeAd:n,afterAd:r,adDismissed:a,adViewed:i,beforeReward:s,adBreakDone:o},window.adsbygoogle.push(u),e.next=24;break;case 20:throw e.prev=20,e.t0=e.catch(1),this._onError(e.t0),e.t0;case 24:case"end":return e.stop()}var u}),e,this,[[1,20]])}))),function(e){return i.apply(this,arguments)})},{key:"_startAdsensePlacementPreroll",value:(r=A.default(x.default.mark((function e(t){var n,r=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(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(k.default(this,r),t.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"),n=function(e){k.default(this,r),this.resetForNext(),this.adCounter.preroll=this.adCounter.preroll||0,this.adCounter.preroll++,"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),a={type:"preroll",adBreakDone:n},window.adsbygoogle.push(a),e.next=19;break;case 15:throw e.prev=15,e.t0=e.catch(1),this._onError(e.t0),e.t0;case 19:case"end":return e.stop()}var a}),e,this,[[1,15]])}))),function(e){return r.apply(this,arguments)})},{key:"_startAdsensePlacementStart",value:(n=A.default(x.default.mark((function e(t){var n,r,a,i=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(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(k.default(this,i),t.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"),n=function(){k.default(this,i),this._broadcast("CONTENT_PAUSE_REQUESTED",{message:"",status:"success"}),this._broadcast("IMPRESSION",{message:"",status:"success"})}.bind(this),r=function(){k.default(this,i),this._broadcast("CONTENT_RESUME_REQUESTED",{message:"",status:"success"})}.bind(this),a=function(e){k.default(this,i),this.resetForNext(),this.adCounter.preroll=this.adCounter.preroll||0,this.adCounter.preroll++,"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),s={type:"start",name:"start-in-game",beforeAd:n,afterAd:r,adBreakDone:a},window.adsbygoogle.push(s),e.next=21;break;case 17:throw e.prev=17,e.t0=e.catch(1),this._onError(e.t0),e.t0;case 21:case"end":return e.stop()}var s}),e,this,[[1,17]])}))),function(e){return n.apply(this,arguments)})},{key:"_startAdsensePlacementNext",value:(t=A.default(x.default.mark((function e(t){var n,r,a,i=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(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(k.default(this,i),t.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"),n=function(){k.default(this,i),this._broadcast("CONTENT_PAUSE_REQUESTED",{message:"",status:"success"}),this._broadcast("IMPRESSION",{message:"",status:"success"})}.bind(this),r=function(){k.default(this,i),this._broadcast("CONTENT_RESUME_REQUESTED",{message:"",status:"success"})}.bind(this),a=function(e){k.default(this,i),this.resetForNext(),this.adCounter.midroll=this.adCounter.midroll||0,this.adCounter.midroll++,"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),s={type:"next",name:"next-in-game",beforeAd:n,afterAd:r,adBreakDone:a},window.adsbygoogle.push(s),e.next=21;break;case 17:throw e.prev=17,e.t0=e.catch(1),this._onError(e.t0),e.t0;case 21:case"end":return e.stop()}var s}),e,this,[[1,17]])}))),function(e){return t.apply(this,arguments)})},{key:"_send",value:function(e,t){try{var n=this.msgrt,r=n._layout,a=n._ua,i={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:a.browser.name,brvs:a.browser.version,osnm:a.os.name,osvs:a.os.version,dvmd:a.device.model,w:r.w,h:r.h}};fetch("https://tag.atom.gamedistribution.com/v1/dmp?ar=".concat(encodeURIComponent(u.Base64.encode(JSON.stringify(i)))))}catch(e){}}},{key:"_send_atom_event",value:function(e,t){this._send(e,{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})}},{key:"_isAfgPositionNext",value:function(e){return void 0!==e.adTimestamp}},{key:"_isAfgPositionStart",value:function(e){if(void 0!==e.adTimestamp)return!1;return this.adCounter.preroll=this.adCounter.preroll||0,0===this.adCounter.preroll}},{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.AdType.Rewarded)t="reward";else if(n===a.AdType.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")}e.params.position=t}},{key:"_broadcast",value:function(e,t){var n=this,r=!1;["AD_ERROR"].some(function(t){return k.default(this,n),t===e}.bind(this))&&(r=!this.adContext.isLastAdapter||this.adContext.extraPromoRunOnFail,console.log("gd-adflow skipForward",e,r,this.adContext.adapterIndex,this.adContext.isLastAdapter,this.adContext.extraPromoRunOnFail)),this.eventBus.broadcast(e,EE(EE({},t),{},{skipForward:r}))}}]),e}(),DE=function e(t){var n=this;R.default(this,e),S.default(this,"load",A.default(x.default.mark((function e(){return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Dm(n.moduleName);case 2:n.module=e.sent;case 3:case"end":return e.stop()}}),e)})))),S.default(this,"promo",A.default(x.default.mark((function e(){return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.module){e.next=3;break}return e.next=3,n.load();case 3:return e.abrupt("return",n.module[n.moduleDefault]);case 4:case"end":return e.stop()}}),e)}))));var r=t.package||"gd-sdk-stone-dynamic",a=t.package_version||"1.1.1",i=t.template||"puzzle",s=t.dependencies||[];this.moduleName="GDPromoByOrbit",this.moduleDefault=i.charAt(0).toUpperCase()+i.slice(1),this.moduleConfig={source:"https://pm.gamedistribution.com/@bygd/".concat(r,"/").concat(a,"/dist/").concat(i.toLowerCase(),"/iife/index.js"),dependencies:s},Rm(this.moduleName,this.moduleConfig)},TE=function e(t){var n=this;R.default(this,e),S.default(this,"load",A.default(x.default.mark((function e(){return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Dm(n.moduleName);case 2:n.module=e.sent;case 3:case"end":return e.stop()}}),e)})))),S.default(this,"splash",A.default(x.default.mark((function e(){return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.module){e.next=3;break}return e.next=3,n.load();case 3:return e.abrupt("return",n.module[n.moduleDefault]);case 4:case"end":return e.stop()}}),e)}))));var r=t.package||"gd-sdk-air-dynamic",a=t.package_version||"1.2.0",i=t.template||"pluto",s=t.dependencies||[];this.moduleName="GDSplashDynamic",this.moduleDefault=i.charAt(0).toUpperCase()+i.slice(1),this.moduleConfig={source:"https://pm.gamedistribution.com/@bygd/".concat(r,"/").concat(a,"/dist/").concat(i.toLowerCase(),"/iife/index.js"),dependencies:s},Rm(this.moduleName,this.moduleConfig)},IE=function(e,t){console.log(e,t)},OE={},PE={},CE=null;function LE(){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 OE.version=r,OE.frame=e,OE.function=n,OE.version}function UE(e){var t=this;return CE||(CE=new Promise(function(n){function r(t,r){if(IE("Received a response from CMP",t),r){var a,i;if(!1!==t.gdprApplies)return"tcloaded"===t.eventStatus||"useractioncomplete"===t.eventStatus?(("boolean"!=typeof(i=(a=t)&&"boolean"==typeof a.gdprApplies?a.gdprApplies:e.defaultGdprScope)||!0===i&&"string"!=typeof a.tcString)&&n({result:"cmpUnexpectedResponse",cmp:OE,consentData:a}),void n({result:"ok",consentData:t})):void 0;n({result:"ok",consentData:t})}else n({result:"cmpCallFailed"})}k.default(this,t),LE(),OE.frame?2===OE.version?(IE("TCF v2 CMP found. Fetching the consent."),OE.function?(IE("CMP API is directly accessible, calling it now..."),OE.function("addEventListener",OE.version,r)):(IE("CMP API is outside the current iframe, calling it now..."),function(e,t,n){var r=this,a="__tcfapi";function i(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!==PE[r.callId]&&PE[r.callId](r.returnValue,r.success)}}window[a]=function(e,n,i,s){k.default(this,r);var o=Math.random()+"",d="".concat(a,"Call"),u=S.default({},d,{command:e,parameter:s,callId:o,version:n});PE[o]=i,t.postMessage(u,"*")}.bind(this),window.addEventListener("message",i,!1),window[a](e,OE.version,n)}("addEventListener",OE.frame,r))):n({result:"cmpVersionNotV2",cmp:OE}):n({result:"cmpNotFound"})}.bind(this)),CE)}var ME=new(function(){function e(){R.default(this,e),this.productName="Game Distribution"}var t;return D.default(e,[{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:(t=A.default(x.default.mark((function e(t,n){var r,a,i,s,o,d,u;return x.default.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(i=null==t||null===(r=t.visitor)||void 0===r||null===(a=r.visitorData)||void 0===a?void 0:a.visitorId){e.next=6;break}return e.abrupt("return");case 6:return s=encodeURIComponent(this.productName),o=encodeURIComponent(i),e.prev=8,d="https://tracker-v4.gamedock.io/v1/events-tracker/track/product/".concat(s,"/user_id/").concat(o),e.next=12,fetch(d,{method:"POST"});case 12:e.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(s,"/user_id/").concat(o),e.next=22,fetch(u,{method:"POST"});case 22: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,n){return t.apply(this,arguments)})}]),e}());function jE(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 GE(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 GE(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}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 i,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,i=e},f:function(){try{s||null==n.return||n.return()}finally{if(o)throw i}}}}function GE(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 BE=function(e){var t=this,n=e.src,r=e.attributes,a=e.target,i=e.isAsync;return new Promise(function(e,s){var o=this;k.default(this,t);try{var d=document.createElement("script");if(d.async=null==i||i,d.type="text/javascript",d.onload=function(){k.default(this,o),e()}.bind(this),d.onerror=function(){k.default(this,o);var e="Error on script load, Error: ".concat(n);console.log(e),s(e)}.bind(this),d.src=n,r){var u,c=jE(r);try{for(c.s();!(u=c.n()).done;){var l=u.value,h=l.key,f=l.value;d.setAttribute(h,f)}}catch(e){c.e(e)}finally{c.f()}}a||(a=document.head),a.appendChild(d)}catch(e){var p="Error on script load catch, Error: ".concat(n);console.log(p,e),s(p)}}.bind(this))},qE=function(){var e=A.default(x.default.mark((function e(){return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,BE({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,BE({src:"https://cookie-cdn.cookiepro.com/consent/".concat("140feb72-7952-4420-8ae5-e8978d87bc17","/OtAutoBlock.js"),attributes:[{key:"id",value:"gd-cookie-pro-autoblock"}],isAsync:!1});case 5:return e.next=7,BE({src:"https://cookie-cdn.cookiepro.com/scripttemplates/otSDKStub.js",attributes:[{key:"id",value:"gd-cookie-pro-stub"},{key:"charset",value:"UTF-8"},{key:"data-domain-script",value:"140feb72-7952-4420-8ae5-e8978d87bc17"}],isAsync:!1});case 7:n=void 0,r=void 0,a=void 0,n=(t={inlineScript:"function OptanonWrapper() { }"}).inlineScript,r=t.target,(a=document.createElement("script")).text=n,r||(r=document.head),r.appendChild(a),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,a}),e,null,[[0,10]])})));return function(){return e.apply(this,arguments)}}(),NE=new b.EventEmitter,FE={"https://games.softgames.com":{"splash-hidden":"splash-hidden"},"https://sg.gamedistribution.com":{"splash-hidden":"splash-hidden"}};function VE(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 t=this,n=e.data,r=e.origin,a=n.type;if(Object.keys(FE).some(function(e){return k.default(this,t),e===r}.bind(this))&&(null==n||!n.__tcfapiCall)){if(window.parent&&!n.type.startsWith("gd-sdk")){console.log("SG_EVENTS received on GD-SDK!",n);var i=n.eventName,s=n.data;console.log("SG_EVENTS GD-SDK eventName,data",i,s),window.mpHelper&&(console.log("SG_EVENTS sending to minijuegos!"),"levelStart"!==i&&"levelFinish"!==i||window.mpHelper.sendStat("level",s.level),"levelFinish"===i&&window.mpHelper.sendStat("score",s.score)),window.parent.postMessage(n,"*")}if(a){var o=FE[r][a];o&&NE.emit(o,n)}}}),!1);var WE=_.v4(),KE=function(e){var t=this;if(!window.__msgr){var n=document.createElement("iframe");if(n.src="https://static.gamedistribution.com/message/index.html",n.style.display="none",n.name="__msgr",document.body.appendChild(n),window!==window.top){var r={gameId:e.gameId,target:e.evnts.domain,token:WE,event_name:"TokenGenerated",timestamp:Date.now()};n.onload=function(){$E(r)},setInterval(function(){k.default(this,t),r.timestamp=Date.now(),r.event_name="Heartbeat",$E(r)}.bind(this),1e3*e.evnts.heartbeatDuration)}}window.addEventListener("message",function(e){k.default(this,t);try{var n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?VE(Object(n),!0).forEach((function(t){S.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):VE(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e.data);if(!n.event_name)return;n.token=WE,$E(n)}catch(e){console.error("GD Messager Error",e.message)}}.bind(this),!1)},HE=function(e){try{var t={gameId:e.game.gameId,target:e.game.evnts.domain,event_name:e.event,timestamp:Date.now()},n=zE(window);n!==window.top&&(null==n||n.postMessage(t,"https://html5.gamedistribution.com"))}catch(e){}},zE=function e(t){try{var n,r,a=null==t?void 0:t.parent;if("game"===(null===(n=a.document)||void 0===n||null===(r=n.activeElement)||void 0===r?void 0:r.id))return a;e(a)}catch(e){return t}},$E=function(e){try{window.__msgr&&window.__msgr.postMessage(e,"*")}catch(e){console.log("GD Messager initialization, please wait....")}};function QE(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 YE(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?QE(Object(n),!0).forEach((function(t){S.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):QE(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function JE(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 XE(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 XE(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}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 i,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,i=e},f:function(){try{s||null==n.return||n.return()}finally{if(o)throw i}}}}function XE(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 ZE,ex=function(){function e(t){var n=this;R.default(this,e),S.default(this,"_getAdTypeByAfgPosition",function(e){var t=this;k.default(this,n);var r={preroll:["preroll","start"],midroll:["next"],rewarded:["reward"]},a=Object.keys(r).find(function(n){var a=this;return k.default(this,t),r[n].some(function(t){return k.default(this,a),t===e.params.position}.bind(this))}.bind(this));return a||"midroll"}.bind(this)),this._gameData=t._gameData,this._msgrt=t.msgrt,this._adInstance=t.adInstance,this._eventBus=t.eventBus,this.blockedAdsMap=t.blockedAdsMap,this._parentURL=t._parentURL,this._onResumeGame=t.onResumeGame.bind(t),this._setAdRequestTimer=t._setAdRequestTimer.bind(t),this._giveGift=t._giveGift.bind(t),this.send_atom_event=t.send_atom_event.bind(t),this.get_session_id=t.get_session_id.bind(t),this.get_ad_system_init_result=t.get_ad_system_init_result.bind(t)}var t,n;return D.default(e,[{key:"runAdFlow",value:(n=A.default(x.default.mark((function e(t){var n,r,a,i,s,o,d,u,c,l,h,f,p,m,g,v,y,b,_,w,A,E,R,S,D,T,I,O,P,C,L,U,M,j=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:s=this._getAdTypeByAfgPosition(t),t.params.position,o=this._getAdFlow(s),d=this._gameData,u=d.afg_disabled,c=null===(n=d.promo)||void 0===n||null===(r=n.rainbow)||void 0===r?void 0:r.enabled,l=null===(a=d.promo)||void 0===a?void 0:a.onadsense,h="reward"===(null===(i=t.params)||void 0===i?void 0:i.position),f=u?o.filter(function(e){return k.default(this,j),"adsense"!==e}.bind(this)):o,p=this.get_ad_system_init_result(),m=p.afg,g=p.ima,this.adsBlocked=!m&&!g,this.adsBlocked?(Gi("gd-adflow adsBlocked so changing the flow"),f=[f[0]]):(m||(f=f.filter(function(e){return k.default(this,j),"adsense"!==e}.bind(this))),g||(f=f.filter(function(e){return k.default(this,j),"ima"!==e}.bind(this)))),v=!1,y=!1,b=[],_=0,w=!1,A=JE(f),e.prev=21,A.s();case 23:if((E=A.n()).done){e.next=50;break}return R=E.value,t.params.adapter=R,S=_===f.length-1,c&&S&&"ima"===R&&(t.params.runPromoAsImaFallback=!0),D=S&&"adsense"===R&&c&&l&&h,t.params=YE(YE({},t.params),{},{adapterIndex:_,isLastAdapter:S,shouldFail:!1,extraPromoRunOnFail:D}),function(){k.default(this,j)}.bind(this),Gi("gd-adflow, before adInvoke",_,R,t.params.shouldFail),e.next=34,this.adInvoke(t);case 34:if(T=e.sent,I=T.success,O=T.args,!I){e.next=44;break}return Gi("gd-adflow, adapter-result-success",_,R,O),v=!0,y=!(null==O||!O.isPromoSuccess),e.abrupt("break",50);case 44:Gi("gd-adflow, adapter-result-failure",_,R,O.message),_++,b.push(O.message),S&&"adsense"===R&&c&&l&&h&&(w=!0);case 48:e.next=23;break;case 50:e.next=55;break;case 52:e.prev=52,e.t0=e.catch(21),A.e(e.t0);case 55:return e.prev=55,A.f(),e.finish(55);case 58:if(!w){e.next=67;break}return t.params.adapter="promo",e.next=63,this.adInvoke(t);case 63:e.sent.success&&(y=!0);case 67:(function(){k.default(this,j)}).bind(this),P=b.join(" /n"),v?(this._setAdRequestTimer(),this._onResumeGame("Advertisement(s) are done. Start / resume the game.","success"),this._giveGift()):(this._onResumeGame(P,"warning"),this._giveGift()),C="-1",L="none",v&&y?C="promo_ima":v?(C="index_".concat(_),L=f[_]):y&&(C="promo_adsense"),U=this.get_session_id(),this.adsBlocked&&"-1"===C?(M="rewarded"===s?"rewarded":this.blockedAdsMap.preroll?"midroll":"preroll",this.blockedAdsMap[M]=this.blockedAdsMap[M]?this.blockedAdsMap[M]+1:1,JSON.stringify(this.blockedAdsMap),this._msgrt.send("adflow.blocked.pos",{message:"".concat(M)}),this.send_atom_event("gd.adflow",{adBlocker:!0,afgBlocked:!0,imaBlocked:!0,adType:M,sessionId:U,successAdapter:"none",adFlowIndex:C})):(this._msgrt.send("adflow.all.index",{message:"".concat(C)}),this._msgrt.send("adflow.all.success_adapter",{message:"".concat(L)}),this._msgrt.send("adflow.".concat(s,".index"),{message:"".concat(C)}),this._msgrt.send("adflow.".concat(s,".success_adapter"),{message:"".concat(L)}),this.send_atom_event("gd.adflow",{adFlowIndex:C,successAdapter:L,adBlocker:!1,afgBlocked:!m,imaBlocked:!g,adType:s,sessionId:U}));case 77:case"end":return e.stop()}}),e,this,[[21,52,55,58]])}))),function(e){return n.apply(this,arguments)})},{key:"adInvoke",value:(t=A.default(x.default.mark((function e(t){var n=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(){var e=A.default(x.default.mark((function e(r,a){var i,s,o,d=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i="main.showad.".concat(t.params.adapter,".").concat(t.params.adapterIndex),s=function(e){k.default(this,d),n._eventBus.unsubscribeScope(i),r({success:!1,args:e})}.bind(this),o=function(e){k.default(this,d),n._eventBus.unsubscribeScope(i),r({success:!0,args:e})}.bind(this),n._eventBus.subscribe("AD_ERROR",s,i),n._eventBus.subscribe("AD_SDK_CANCELED",s,i),n._eventBus.subscribe("AD_SUCCESS",o,i),e.prev=6,e.next=9,n._adInstance.startAd(t);case 9:e.next=15;break;case 11:e.prev=11,e.t0=e.catch(6),Bi("gd-adflow startAd error",e.t0),r({success:!1,err:e.t0});case 15:case"end":return e.stop()}}),e,this,[[6,11]])})));return function(t,n){return e.apply(this,arguments)}}()));case 1:case"end":return e.stop()}}),e)}))),function(e){return t.apply(this,arguments)})},{key:"_getAdFlow",value:function(e){var t,n,r,a,i,s,o,d,u=this,c=void function(){k.default(this,u)}.bind(this),l=this._gameData.adflw;c&&(l=c);var h=null!==(t=l)&&void 0!==t&&null!==(n=t.adapters)&&void 0!==n&&n.default?null===(r=l)||void 0===r||null===(a=r.adapters)||void 0===a?void 0:a.default:["ima","adsense"];return h=null!==(i=l)&&void 0!==i&&null!==(s=i.adapters)&&void 0!==s&&s[e]?null===(o=l)||void 0===o||null===(d=o.adapters)||void 0===d?void 0:d[e]:h}}]),e}(),tx=new b.EventEmitter,nx=["https://games.softgames.com","https://sg.gamedistribution.com","https://minigame-stg.aeriagames.jp","https://minigame.aeriagames.jp"];window.addEventListener("message",(function(e){var t=this,n=e.data,r=e.origin,a=e.source;if(nx.some(function(e){return k.default(this,t),e===r}.bind(this))&&(null==n||!n.__tcfapiCall)){var i=n.system;n.action;var s="aeriaExternalHostsConnector"===i;if("Softgames"===i)ZE=a,(window.parent||window).postMessage(n,"*"),tx.emit("aeria-event",n);else s&&ZE&&ZE.postMessage(n,"*")}}),!1);var rx=function(){function e(){R.default(this,e)}var t;return D.default(e,[{key:"init",value:function(e){var t=this;this._registerForDataRequests(e),this._askForParentFrameData().then(function(n){if(k.default(this,t),n){var r=n.adRequestTimer;e.adRequestTimer=r,e.adRequestTimer}}.bind(this))}},{key:"_registerForDataRequests",value:function(e){var t=this;window.addEventListener("message",function(n){k.default(this,t);var r=n.data,a=n.origin,i=n.source,s=r.type;if(r.value,"https://html5.gamedistribution.com"===a&&"parent-data-request"===s){var o={adRequestTimer:e.adRequestTimer};i.postMessage({type:"parent-data-response",value:o})}}.bind(this))}},{key:"_askForParentFrameData",value:(t=A.default(x.default.mark((function e(){var t=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(e,n){var r=this;k.default(this,t);var a=!1;window.addEventListener("message",(function(t){var n=t.data,r=t.origin;t.source;var i=n.type,s=n.value;"https://html5.gamedistribution.com"===r&&"parent-data-response"===i&&(e(s),a=!0)})),setTimeout(function(){k.default(this,r),a||e()}.bind(this),1e3);var i={type:"parent-data-request"};window.parent.postMessage(i,"*")}.bind(this)));case 1:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}]),e}(),ax=new rx;function ix(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 sx(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ix(Object(n),!0).forEach((function(t){S.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ix(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ox,dx=_.v4(),ux=null,cx=null,lx=function(){function e(t){var n=this;if(R.default(this,e),ux)return ux;ux=this,this.blockedAdsMap={},this._defaults=this._getDefaultOptions(),this._extendDefaultOptions(this._defaults,t),this._version=t.version||"0.0.0",this._bridge=this._getBridgeContext(),this._location=new vb,this._location.print(),this._parentURL=0===this._bridge.depth?encodeURIComponent(this._bridge.parentURL):this._bridge.parentURL,this._parentDomain=this._bridge.parentDomain,this._topDomain=this._bridge.topDomain,this._isFullScreen=!1,this._giftCount=0,this._setConsoleBanner(),this._initializeMessageRouter(),this._checkConsole(),this._subscribeToEvents(),this.sdkReady=new Promise(this._initializeSDKWithGameData.bind(this)),this.sdkReady.then(function(e){k.default(this,n),this._sdk_ready=!0}.bind(this)).catch(function(e){k.default(this,n),this._sdk_ready=!1}.bind(this)).finally(function(){var e,t;k.default(this,n),!0===(null===(e=this._gameData.lp)||void 0===e?void 0:e.load)&&this._sendLoadedEvent(1),this._sendLoaderDataEvent(),this._checkSplashAndPromoScreens(),this._initBlockingExternals(),this._initUnityHandler(),this._checkFullscreen(),null!==(t=this._gameData.evnts)&&void 0!==t&&t.enabled&&this._isLoaderGameURL()&&KE(this._gameData),ax.init(this)}.bind(this)),this._registerSGBridge(),this._whichFrame(),this._send_gametag_data("sdk_init")}var t,n,r,i,s,o,d,c,l,h,f,p,m;return D.default(e,[{key:"_initUnityHandler",value:function(){var e=this;window.addEventListener("DOMNodeInserted",function(){if(k.default(this,e),this._gameData.block_exts&&this._removeExternalsInHtml({enabled:!1}),document.getElementsByClassName("webgl-content")[0]){var t=document.getElementsByClassName("webgl-content")[0].getElementsByClassName("footer")[0];t&&t.setAttribute("style","display:none")}}.bind(this))}},{key:"_send_gametag_data",value:(m=A.default(x.default.mark((function e(t){var n;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this._getGdModeIfExist()&&(n=a.getMobilePlatform()||"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 m.apply(this,arguments)})},{key:"_loadCMP",value:(p=A.default(x.default.mark((function e(){var t,n,r,a;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._isMasterGameURL()){e.next=6;break}if(r=new vb,0!==(null==(a=r.get("depth"))?void 0:a.value)||null===(t=this._gameData)||void 0===t||null===(n=t.cmp)||void 0===n||!n.enabled||"html5.gamedistribution.com"!==this._topDomain){e.next=6;break}return e.next=6,qE();case 6:case"end":return e.stop()}}),e,this)}))),function(){return p.apply(this,arguments)})},{key:"testConsent",value:function(){try{LE();A.default(x.default.mark((function e(){return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,UE({});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;NE.on("splash-hidden",function(t){k.default(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(){if(!this._isLoaded&&(this._isLoaded=!0,"loader-frame"===this._whichFrame()))try{this._whichFrame(),this._sendTunnlEvent(1),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._bridge.isCoreSDKMode&&this._loadGoogleAnalytics(),void 0!==e&&void 0!==e.close_gamedock&&!1!==e.close_gamedock||!this._bridge.isCoreSDKMode&&!this._bridge.noGamedockSDK&&this._loadGamedockTracker(),void 0!==e&&void 0!==e.close_minijuegos&&!1!==e.close_minijuegos||(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=A.default(x.default.mark((function e(t,n){var r,a=this;return x.default.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===(r=this._gameData.disableAds)||void 0===r?void 0:r.default)||!1,this._safeInit(),this._checkGameId(),this._checkGameDeleted(),this._checkBlocking(),this._changeMidrollInDebugMode(),void 0!==this._gameData.diagnostic&&void 0!==this._gameData.diagnostic.close_ads&&!1!==this._gameData.diagnostic.close_ads||(this.videoAdReady=this._initializeVideoAd().then(function(){k.default(this,a),(this._isMasterGameURL()||this._isExtHostedGameURL())&&(this.msgrt.send("adblocker.flw",{message:"ok"}),this.msgrt.send("adblocker.adapters",{message:"none"}))}.bind(this)).catch(function(e){k.default(this,a);var t="".concat(e).startsWith("Error: Blocked:");Gi("gd-adflow adsBlocked",t,e);var n=this.get_ad_system_init_result(),r=n.ima,i=n.afg;if(this.adsBlocked=!r&&!i,this._isMasterGameURL()||this._isExtHostedGameURL()){this.msgrt.send("adblocker.flw",{message:"".concat(this.adsBlocked?"blocked":"ok")});var s=r||i?r?i?"none":"adsense":"ima":"all";this.msgrt.send("adblocker.adapters",{message:"".concat(s)})}console.error(e.message||e)}.bind(this))),t(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"),n(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:"_extendDefaultOptions",value:function(e,t){var n=L.default(e);this.options=t?a.extendDefaults(n,t):n,this.options.gameId=this.options.gameId.trim()}},{key:"_setConsoleBanner",value:function(){if(!this._bridge.noConsoleBanner){var e=Ui.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:"_sendTunnlEvent",value:function(e){var t=this;void 0===this._topDomain&&(this._topDomain=void 0);var n={page_url:this._topDomain||this._parentDomain,game_id:this.options.gameId,eventtype:e,ts:Date.now()};fetch("https://ana.headerlift.com/event?".concat(M.default.stringify(n))).catch(function(e){k.default(this,t)}.bind(this)),this._send_gametag_data("sdk_gameplay")}},{key:"_sendAdRequestContext",value:function(e){this.msgrt.send("adctx",{message:e.adTag.bidder})}},{key:"_checkWhitelabelPartner",value:function(){this._whitelabelPartner=!1;var e=a.getQueryParams("xanthophyll");e.hasOwnProperty("xanthophyll")&&"true"===e.xanthophyll&&(this._whitelabelPartner=!0,a.dankLog("White label publisher","".concat(this._whitelabelPartner),"success"))}},{key:"_checkConsole",value:function(){try{if(!a.Ls.available)return;"developer.gamedistribution.com"===this._parentDomain?(a.Ls.set("gd_debug_ex",!0),a.Ls.set("gd_disable_midroll_timer",!0),a.Ls.set("gd_tag",!0)):"localhost:3000"===this._parentDomain&&(a.Ls.set("gd_debug_ex",!0),a.Ls.set("gd_disable_midroll_timer",!0)),a.Ls.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 a.MessageRouter({gameId:this.options.gameId,hours:(new Date).getHours(),topDomain:this._topDomain,domain:this._parentDomain,referrer:this._parentURL,depth:a.getIframeDepth(),version:Ui.version,tracking:this._userDeclinedTracking,whitelabel:this._whitelabelPartner,platform:a.getMobilePlatform(),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 t=["https://cdn.gamedock.io/gamemonkey-web-tracker/5.0.0/script/gamemonkey-sdk.js"];a.getScript(t[0],"GamedockSDK",{alternates:t}).then(function(){var t,n;k.default(this,e),cx=this._initGamedockTracker(window.GamedockSDK),this._sendGamedockEvent("pageview"),null!==(t=this._gameData.diagnostic)&&void 0!==t&&null!==(n=t.gameDock)&&void 0!==n&&n.adViewEvent&&cx.tracking.enableHeartBeatForPage({pageId:this.options.gameId,pageType:"game"},this._gameData.diagnostic.gameDock.heartbeatConfig),ME.track(cx,this._gameData)}.bind(this)).catch(function(t){k.default(this,e),this._sendSDKError(t)}.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=cx)||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 t=["https://ext.minijuegosgratis.com/external-host/main.js"];console.log("noMinijuegosSDK loading"),a.getScript(t[0],"MinijuegosSDK",{alternates:t}).catch(function(t){k.default(this,e),this._sendSDKError(t)}.bind(this))}},{key:"_loadGoogleAnalytics",value:function(){var e=this,t=["https://www.google-analytics.com/analytics.js"];a.getScript(t[0],"gdsdk_google_analytics",{alternates:t,error_prefix:"Blocked:",exists:function(){return k.default(this,e),window.ga}.bind(this)}).then(function(){k.default(this,e),window.ga("create","UA-60359297-49",{name:"gd",cookieExpires:7776e3,sampleRate:5},"auto"),this._bridge.noGAPageView||window.ga("gd.send","pageview"),this._userDeclinedTracking||window.ga("gd.set","anonymizeIp",!0)}.bind(this)).catch(function(t){k.default(this,e),this._sendSDKError(t)}.bind(this))}},{key:"_subscribeToEvents",value:function(){var e=this;this.eventBus=new a.EventBus,a.SDKEvents.forEach(function(t){var n=this;return k.default(this,e),this.eventBus.subscribe(t,function(e){return k.default(this,n),this._onEvent(e)}.bind(this),"sdk")}.bind(this)),a.IMAEvents.forEach(function(t){var n=this;return k.default(this,e),this.eventBus.subscribe(t,function(e){return k.default(this,n),this._onEvent(e)}.bind(this),"ima")}.bind(this)),this.eventBus.subscribe("COMPLETE",function(){if(k.default(this,e),"developer.gamedistribution.com"===this._parentDomain||!0===new RegExp("^localhost").test(this._parentDomain)){fetch("https://game.api.gamedistribution.com/game/v2/hasapi/".concat(this.options.gameId,"?timestamp=").concat((new Date).valueOf()));try{var t=JSON.stringify({type:"GD_SDK_IMPLEMENTED",gameID:this.options.gameId});window.location!==window.top.location?window.top.postMessage(t,"*"):null!==window.opener&&window.opener.location!==window.location&&window.opener.postMessage(t,"*")}catch(e){}}}.bind(this),"ima"),this.eventBus.subscribe("CONTENT_PAUSE_REQUESTED",function(){return k.default(this,e),this.onPauseGame("New advertisements requested and loaded","success")}.bind(this),"ima"),this.eventBus.subscribe("IMPRESSION",function(t){var n,r;k.default(this,e),this.msgrt.send("ad.impression"),null!==(n=this._gameData.diagnostic)&&void 0!==n&&null!==(r=n.gameDock)&&void 0!==r&&r.adViewEvent&&ME.track(cx,this._gameData)}.bind(this),"ima"),this.eventBus.subscribe("AD_ERROR",function(t){k.default(this,e),this.msgrt.send("ad.error",{message:t.message,details:t.details})}.bind(this),"ima"),this.eventBus.subscribe("AD_SDK_REQUEST",function(t){k.default(this,e),this._sendAdRequestContext(t.message)}.bind(this),"sdk"),this.eventBus.subscribe("SDK_ERROR",function(t){if(k.default(this,e),t.message.startsWith("Blocked:")){if(!this._bridge.noBlockerEvent&&(this.msgrt.send("error",{message:t.message}),!this._hasBlocker)){this._hasBlocker=!0;var n=Math.random()<.25;this.msgrt.send("adblck.src",{message:t.message}),n&&this._sendTunnlEvent(3)}}else this.msgrt.send("error",{message:t.message})}.bind(this),"sdk"),this.eventBus.subscribe("AD_REQUEST_KEYS_EMPTY",function(t){k.default(this,e),this.msgrt.send("tunnl.keys.empty",{message:t.message,details:t.details})}.bind(this),"sdk"),this.eventBus.subscribe("AD_REQUEST_KEYS_FALLBACK",function(t){k.default(this,e),this.msgrt.send("tunnl.keys.fallback",{message:t.message,details:t.details})}.bind(this),"sdk"),this.eventBus.subscribe("AD_T4R",function(t){return k.default(this,e),this.msgrt.send("adt4r")}.bind(this),"sdk")}},{key:"_checkGameId",value:function(){this.options.gameId===this._defaults.gameId&&this._sendSDKError("Check correctness of your GAME ID. Otherwise, no revenue will be recorded.")}},{key:"_getDefaultGameData",value:function(){return{gameId:this.options.gameId,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;return"https://game.api.gamedistribution.com/game/v4/get/".concat(this.options.gameId.replace(/-/g,""),"/?domain=").concat(e,"&v=").concat(Ui.version,"&localTime=").concat((new Date).getHours())}},{key:"_checkBlocking",value:(h=A.default(x.default.mark((function e(){var t,n,r=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=this._gameData,t=void 0===this._gameData.dmain||this._gameData.dmain,(n.bloc_gard&&!0===n.bloc_gard.enabled||!t)&&(this.msgrt.send("blocked"),setTimeout(function(){k.default(this,r),window.location.href="https://html5.api.gamedistribution.com/blocked.html?".concat(M.default.stringify({domain:this._parentDomain,id:n.gameId,img:this._get_game_thumbnail_url(),title:n.title}))}.bind(this),100));case 5:case"end":return e.stop()}}),e,this)}))),function(){return h.apply(this,arguments)})},{key:"_checkGameDeleted",value:function(){var e=this;6===this._gameData.status&&(console.log("%c %c %c This game was deleted, please remove it in your website... ","background: #F2181A","background: #F23818","color: #fff; background: #F23818;","background: #F55E60","background: #F55E60","background: #c4161e; color: #fff;"),setTimeout(function(){k.default(this,e),document.location="https://html5.api.gamedistribution.com/deleted.html"}.bind(this),100))}},{key:"_changeMidrollInDebugMode",value:function(){var e=this._gameData;a.Ls.available&&a.Ls.getBoolean("gd_debug_ex")&&(a.Ls.getBoolean("gd_disable_midroll_timer")?e.midroll=0:e.midroll=this._getDefaultGameData().midroll)}},{key:"_checkSplashAndPromoScreens",value:function(){var e,t,n;this._gameData.loader&&!1===this._gameData.loader.mobile&&this._getisMobile()&&(this._gameData.loader.enabled=!1);var r,a=this._gameData,i=a.gdpr&&!0===a.gdpr.consent,s=a.loader,o=null===(e=a.promo)||void 0===e?void 0:e[null===(t=a.promo)||void 0===t||null===(n=t.template)||void 0===n?void 0:n.preroll];(a.preroll||(this.adRequestTimer=Date.now()),this.options.loader.enabled)?null!=o&&o.enabled?this._createPromoBeforeSplash(a,i):s.enabled&&!0!==(null===(r=s.splash)||void 0===r?void 0:r.skip)?this._createSplash(a,i):this.onResumeGame("Skipped splash.","success"):s.enabled||this._bridge.isTokenGameURL&&this._bridge.isExtHostedGameURL||(this.options.advertisementSettings.autoplay||i?null!=o&&o.enabled?this._createPromoBeforeSplash(a,i):!1!==s.enabled&&this._createSplash(a,i):null!=o&&o.enabled&&this._createPromo(a,i))}},{key:"_initializeVideoAd",value:(l=A.default(x.default.mark((function e(){var t;return x.default.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=a.extendDefaults(this.options.advertisementSettings,t.sdk)),this.macros=new a.Macros({game:t,bridge:this._bridge}),this.adInstance=new SE(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=Ui,this.adInstance._send("gd.location",this._location.get()),e.next=17,this.adInstance.start();case 17:case"end":return e.stop()}}),e,this)}))),function(){return l.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){a.dankLog("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){a.dankLog("DEVELOPER_ERROR",e.message,"warning")}}},{key:"_onEvent",value:function(e){a.dankLog(e.name,e.message,e.status);try{this.options.onEvent({name:e.name,message:e.message,status:e.status,skipForward:e.skipForward})}catch(e){a.dankLog("DEVELOPER_ERROR",e.message,"warning")}}},{key:"_getGameData",value:(c=A.default(x.default.mark((function e(){var t;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Qb();case 2:return t=e.sent,this.msgrt.setGameData(t),a.setDankLog(t.diagnostic),e.abrupt("return",t);case 6:case"end":return e.stop()}}),e,this)}))),function(){return c.apply(this,arguments)})},{key:"_createSplash",value:(d=A.default(x.default.mark((function e(t,n){var r,i,s,o,d=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._getSplashTemplate(t);case 2:return r=e.sent,i=new r(sx(sx({},this.options),{},{isConsentDomain:n,version:Ui.version}),t,this._parentDomain),e.next=6,Zb();case 6:s=e.sent,o=s.enabled,i.on("playClick",function(){var e=this;if(k.default(this,d),n){var t=new Date;t.setDate(t.getDate()+90),document.cookie="ogdpr_tracking=1; expires=".concat(t.toUTCString(),"; path=/")}this._hideCMPButton(),o?window.gdsdk.showAd(a.AdType.Interstitial,{position:"preroll"}).catch(function(t){k.default(this,e),i.hide()}.bind(this)):(function(){k.default(this,e)}.bind(this),this.showAd(a.AdType.Interstitial,{position:"preroll"}).catch(function(t){k.default(this,e)}.bind(this))),HE({event:"FirstInteraction",game:this._gameData})}.bind(this)),this.onPauseGame("Pause the game and wait for a user gesture","success"),this.eventBus.subscribe("SDK_GAME_PAUSE",function(){k.default(this,d),i.hide()}.bind(this)),this.eventBus.subscribe("SDK_GAME_START",function(){k.default(this,d),i.hide()}.bind(this));case 12:case"end":return e.stop()}}),e,this)}))),function(e,t){return d.apply(this,arguments)})},{key:"_createPromoBeforeSplash",value:(o=A.default(x.default.mark((function e(t,n){var r,a,i,s,o=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this._createPrerollPromoTemplate(t);case 3:i=e.sent,(s=new i(sx(sx({},this.options),{},{isConsentDomain:n,version:Ui.version,template:null===(r=t.promo)||void 0===r||null===(a=r.template)||void 0===a?void 0:a.preroll}),t)).on("done",function(){k.default(this,o),s.hide(),this._createSplash(t,n)}.bind(this)),e.next=12;break;case 8:e.prev=8,e.t0=e.catch(0),console.log(e.t0),this._createSplash(t,n);case 12:case"end":return e.stop()}}),e,this,[[0,8]])}))),function(e,t){return o.apply(this,arguments)})},{key:"_createPromo",value:(s=A.default(x.default.mark((function e(t,n){var r,a,i,s,o=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this._createPrerollPromoTemplate(t);case 3:i=e.sent,(s=new i(sx(sx({},this.options),{},{isConsentDomain:n,version:Ui.version,template:null===(r=t.promo)||void 0===r||null===(a=r.template)||void 0===a?void 0:a.preroll}),t)).on("done",function(){k.default(this,o),s.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 s.apply(this,arguments)})},{key:"showBanner",value:function(){var e=this;this.showAd(a.AdType.Interstitial).catch(function(){k.default(this,e)}.bind(this))}},{key:"showAd",value:(i=A.default(x.default.mark((function e(t){var n,r=this,a=arguments;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=a.length>1&&void 0!==a[1]?a[1]:{},e.abrupt("return",new Promise(function(){var e=A.default(x.default.mark((function e(a,i){var s,o,d,u;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,o={adType:t,params:n,adTimestamp:r.adRequestTimer},e.next=5,r.sdkReady;case 5:return d=e.sent,e.next=8,r.videoAdReady;case 8:if(null!==(s=r._gameData.lp)&&void 0!==s&&s.load||r._sendLoadedEvent(),r._sendGamedockGamePlay(),r._rejectAdIfGameBlocked({gameData:d,adRequest:o}),r._rejectAdIfAdDisabled({gameData:d,adRequest:o}),r._rejectAdIfUnsupportedType({adRequest:o}),"rewarded"===t&&r._setGameRewardedFlag(),null!=n&&n.isGift||r._rejectAdIfAdRateHits({gameData:d,adRequest:o}),r.adInstance.attachAfgPosition(o),!r.adFlowRunning){e.next=18;break}return e.abrupt("return",a());case 18:return r.adFlowRunning=!0,u=new ex(r),e.next=22,u.runAdFlow(o);case 22:r.adFlowRunning=!1,a(),r._post_message({topic:"adrequest.instream"}),e.next=32;break;case 27:e.prev=27,e.t0=e.catch(0),r.adFlowRunning=!1,r.onResumeGame(e.t0.message,"warning"),i(e.t0.message);case 32:case"end":return e.stop()}}),e,null,[[0,27]])})));return function(t,n){return e.apply(this,arguments)}}()));case 2:case"end":return e.stop()}}),e)}))),function(e){return i.apply(this,arguments)})},{key:"_giveGift",value:function(){var e,t,n,r,a;null!==(e=this._gameData)&&void 0!==e&&null!==(t=e.gft)&&void 0!==t&&t.enabled&&(null===(n=this._gameData)||void 0===n||null===(r=n.gft)||void 0===r||null===(a=r.durations[this._giftCount])||void 0===a?void 0:a.after)===this.adInstance.adMidrollCount&&this.decideToGiveAGift()}},{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.AdType.Interstitial&&t.adType!==a.AdType.Rewarded)throw new Error("Unsupported an advertisement type: ",t.adType)}else t.adType=a.AdType.Interstitial}},{key:"_rejectAdIfRewardedDisabled",value:function(e){var t=e.gameData;if(e.adRequest.adType===a.AdType.Rewarded&&!t.rewardedAds)throw new Error("Rewarded ads are disabled.")}},{key:"_rejectAdIfAdRateHits",value:function(e){var t,n,r,i,s,o,d=e.gameData,u=e.adRequest,c=null;u.adType===a.AdType.Interstitial&&null!==(t=d.diagnostic)&&void 0!==t&&null!==(n=t.useMidrollIndex)&&void 0!==n&&n.enabled&&this.adInstance.noPreroll?this.adInstance.adMidrollCount>(null===(r=d.diagnostic)||void 0===r||null===(i=r.useMidrollIndex)||void 0===i?void 0:i.indexes.length)-1||(c=6e4*(null===(s=d.diagnostic)||void 0===s||null===(o=s.useMidrollIndex)||void 0===o?void 0:o.indexes[this.adInstance.adMidrollCount])):c=d.midroll;if(u.adType===a.AdType.Interstitial&&void 0!==this.adRequestTimer&&Date.now()-this.adRequestTimer<c)throw new Error("The advertisement was requested too soon.")}},{key:"preloadAd",value:(r=A.default(x.default.mark((function e(t){var n=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(){var e=A.default(x.default.mark((function e(r,i){var s,o;return x.default.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.bloc_gard||!0!==s.bloc_gard.enabled){e.next=8;break}throw new Error("Game or domain is blocked.");case 8:if(!s.disableAds[t]&&!n._whitelabelPartner){e.next=10;break}throw new Error("Advertisements are disabled for this ad type => ".concat(t,"..."));case 10:if(t){e.next=14;break}t=a.AdType.Rewarded,e.next=16;break;case 14:if(t===a.AdType.Interstitial||t===a.AdType.Rewarded){e.next=16;break}throw new Error("Unsupported an advertisement type:"+t);case 16:return e.next=18,n.adInstance.preloadAd(t);case 18:o=e.sent,r(o),e.next=25;break;case 22:e.prev=22,e.t0=e.catch(0),i(e.t0);case 25:case"end":return e.stop()}}),e,null,[[0,22]])})));return function(t,n){return e.apply(this,arguments)}}()));case 1:case"end":return e.stop()}}),e)}))),function(e){return r.apply(this,arguments)})},{key:"cancelAd",value:(n=A.default(x.default.mark((function e(){var t=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(){var e=A.default(x.default.mark((function e(n,r){return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:try{t.adInstance.cancel(),t.onResumeGame("Advertisement(s) are cancelled. Start / resume the game.","success"),r()}catch(e){t.onResumeGame("Advertisement(s) are cancelled. Start / resume the game.","success"),n(e.message)}case 1:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()));case 1:case"end":return e.stop()}}),e)}))),function(){return n.apply(this,arguments)})},{key:"showDisplayAd",value:function(e){var t=this;return new Promise(function(){var n=A.default(x.default.mark((function n(r,a){var i;return x.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,t.sdkReady;case 3:return i=n.sent,n.next=6,t.videoAdReady;case 6:if(!i.dAds.enabled){n.next=13;break}return n.next=9,t.adInstance.loadDisplayAd(e);case 9:t._post_message({topic:"adrequest.display"}),r(),n.next=14;break;case 13:a("Display-Ads are disabled.");case 14:n.next=19;break;case 16:n.prev=16,n.t0=n.catch(0),a(n.t0.message||n.t0);case 19:case"end":return n.stop()}}),n,null,[[0,16]])})));return function(e,t){return n.apply(this,arguments)}}())}},{key:"onResumeGame",value:function(e,t){var n;this._allowExternals({enabled:!1});try{this.options.resumeGame()}catch(e){console.log("gd-adflow error onResumeGame",e),a.dankLog("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(),null===(n=this._gameData.evnts)||void 0===n||!n.enabled||this._isMasterGameURL()&&!this._isExtHostedGameURL()||HE({event:"GameStarted",game:this._gameData})}},{key:"onPauseGame",value:function(e,t){var n;this._allowExternals({enabled:!0});try{this.options.pauseGame()}catch(e){a.dankLog("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()||HE({event:"GamePaused",game:this._gameData})}},{key:"openConsole",value:function(){try{new a.ImplementationTest(this).start(),a.Ls.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 t=this._gameData;t.sdk.fullscreen&&"auto"===t.sdk.fullscreen&&document.addEventListener("click",function(){if(k.default(this,e),!this._isFullScreen){var t=document.body,n=t.requestFullScreen||t.webkitRequestFullScreen||t.mozRequestFullScreen||t.msRequestFullscreen;if(n)n.call(t);else if(void 0!==window.ActiveXObject){var r=new ActiveXObject("WScript.Shell");null!==r&&r.SendKeys("{F11}")}this._isFullScreen=!0}}.bind(this))}catch(e){console.log("Fullscreen error handled...",e)}}},{key:"_allowExternals",value:function(e){var t=this;void 0!==this.window_open&&(!1===e.enabled?window.open=function(e){k.default(this,t),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:"_removeExternalsInHtml",value:function(e){var t=this;!1===e.enabled&&window.document.querySelectorAll("a").forEach(function(e){var n=this;k.default(this,t);var r=!!(e.innerText.toLowerCase().includes("start")||e.innerText.toLowerCase().includes("play")||e.innerText.toLowerCase().includes("continue")),a=e.getAttribute("href");e.removeAttribute("href"),r||(e.onclick=function(e){return k.default(this,n),e.preventDefault(),this.msgrt.send("external",{message:"H> ".concat(a)}),!1}.bind(this))}.bind(this))}},{key:"_getBridgeContext",value:function(){var e=this._isTokenGameURL(),t=this._isMasterGameURL(),n=this._isExtHostedGameURL(),r=e||n?this._getTokenGameURLConfig():{};r=r||{};var i=decodeURIComponent((e||n)&&r.parentURL?r.parentURL:a.getParentUrl()),s=decodeURIComponent((e||n)&&r.parentDomain?r.parentDomain:a.getParentDomain()),o=decodeURIComponent((e||n)&&r.topDomain?r.topDomain:n&&0===a.getIframeDepth()?s:a.getTopDomain()),d=(e||n)&&r.loaderEnabled,u=(e||n)&&r.loaderEnabled,c=(e||n)&&r.loaderEnabled,l=(e||n)&&r.loaderEnabled,h=(e||n)&&r.loaderEnabled,f=(e||n)&&r.loaderEnabled,p=(e||n)&&r.loaderEnabled,m=(e||n)&&r.loaderEnabled,g=(e||n)&&r.loaderEnabled&&r.hasImpression&&r.version>="1.1.24";return{isTokenGameURL:e,isMasterGameURL:t,isExtHostedGameURL:n,noConsoleBanner:d,noLoadedEvent:u,noBlockerEvent:c,noPreroll:m,parentURL:i,parentDomain:s,topDomain:o&&o.length?o:s,noGAPageView:l,noLotamePageView:h,noGamedockSDK:f,noMinijuegosSDK:p,version:r.version,pauseGameOnStartup:g,depth:a.getIframeDepth(),domainMatched:s===o,exports:{formatTokenURLSearch:this._formatTokenURLSearch.bind(this),extendUrlQuery:this._extendUrlQuery.bind(this),base64Encode:this._base64_encode.bind(this)}}}},{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:"_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 T.default(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 T.default(document.referrer,!0);if(!r.query.gd_zone_config)return;e=r.query.gd_zone_config}else{var a=new T.default(location.href,!0);if(!a.query.gd_zone_config)return;e=a.query.gd_zone_config}return JSON.parse(u.Base64.decode(decodeURIComponent(e)))}catch(e){}}},{key:"_getSplashTemplate",value:function(e){var t=e.splash;return new TE(t).splash()}},{key:"_createPrerollPromoTemplate",value:(t=A.default(x.default.mark((function e(t){var n,r,a,i,s;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=null===(n=t.promo)||void 0===n?void 0:n[null===(r=t.promo)||void 0===r||null===(a=r.template)||void 0===a?void 0:a.preroll],s=new DE(i),e.abrupt("return",s.promo());case 3:case"end":return e.stop()}}),e)}))),function(e){return t.apply(this,arguments)})},{key:"_formatTokenURLSearch",value:function(e){var t="";try{t=encodeURIComponent(u.Base64.encode(JSON.stringify(e)))}catch(e){}try{var n=new T.default(location.href,!0);return n.query=n.query||{},n.query.gd_zone_config=t,"?".concat(M.default.stringify(n.query))}catch(e){return"?gd_zone_config=".concat(t)}}},{key:"_extendUrlQuery",value:function(e,t){var n=new T.default(e,!0);return n.query=sx(sx({},n.query),t),n.toString()}},{key:"_base64_encode",value:function(e){return u.Base64.encode(JSON.stringify(e))}},{key:"session",value:function(){var e=this;return new Promise(function(){var t=A.default(x.default.mark((function t(n,r){var a;return x.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e.sdkReady;case 3:t.next=7;break;case 5:t.prev=5,t.t0=t.catch(0);case 7:a=e._gameData,n({ads:{display:{enabled:a.dAds.enabled},rewarded:{enabled:a.rewardedAds}},location:{parentDomain:e._bridge.parentDomain,topDomain:e._bridge.topDomain,parentURL:e._bridge.parentURL,depth:e._bridge.depth,loadedByGameZone:e._bridge.isTokenGameURL}});case 9:case"end":return t.stop()}}),t,null,[[0,5]])})));return function(e,n){return t.apply(this,arguments)}}())}},{key:"sendGenericEvent",value:function(e){console.log("Received generic event",e,this._isMasterGameURL());try{var t,n;if("track-milestone"==e.eventName)cx.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,t=this._gameData,n=t.assets.find(function(t){return k.default(this,e),t.hasOwnProperty("name")&&512===t.width&&512===t.height}.bind(this));return n||(n=t.assets.length>0?t.assets[0]:{name:"logo.svg"}),"https://img.gamedistribution.com/".concat(n.name)}},{key:"_post_message",value:function(e){var t,n=e.topic,r=e.data,a=null!==(t=location.ancestorOrigins)&&void 0!==t&&t.length?location.ancestorOrigins[location.ancestorOrigins.length-1]:"*";try{var i=window.top||window.parent;i&&i.postMessage({source:"gdsdk",topic:n,data:r},a)}catch(e){console.error((null==e?void 0:e.message)||e)}}},{key:"decideToGiveAGift",value:function(){var e=this;try{var t,n=null===(t=this._gameData)||void 0===t?void 0:t.gft,r=setInterval(A.default(x.default.mark((function t(){var n=this;return x.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.adInstance.requestRunning||e.adFlowRunning?console.log("Advertisement already running..."):(e.showAd(a.AdType.Interstitial,{position:"midroll",isGift:!0}).catch(function(e){k.default(this,n)}.bind(this)),clearInterval(r),e._giftCount++);case 1:case"end":return t.stop()}}),t,this)}))),1e3*n.durations[this._giftCount].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 dx}},{key:"get_ad_system_init_result",value:function(){return{afg:this.adInstance.afgInitSuccess,ima:this.adInstance.imaInitSuccess}}},{key:"_setGameRewardedFlag",value:function(){try{if("developer.gamedistribution.com"===this._parentDomain||!0===new RegExp("^localhost").test(this._parentDomain)){fetch("https://game.api.gamedistribution.com/game/v2/hasrewarded/".concat(this.options.gameId,"?timestamp=").concat((new Date).valueOf()));try{var e=JSON.stringify({type:"GD_SDK_REWARDED_SET",gameID:this.options.gameId});window.location!==window.top.location?window.top.postMessage(e,"*"):null!==window.opener&&window.opener.location!==window.location&&window.opener.postMessage(e,"*")}catch(e){}}}catch(e){}}},{key:"_getGdModeIfExist",value:function(){var e=this,t=new Proxy(new URLSearchParams(window.location.search),{get:function(t,n){return k.default(this,e),t.get(n)}.bind(this)});return!t.gd_mode&&window.location.search.includes("gd_mode")?window.location.search.split("gd_mode=")[1]:t.gd_mode}}]),e}(),hx={},fx=function(e){try{if(e.skipForward)return;if(hx.source){var t={type:"gd-sdk-on-event",event:e};hx.source.postMessage(t,hx.origin)}}catch(e){console.log("gd-sdk forwardEvent err",e)}},px=function(){fx({name:"SDK_READY",status:"success",message:"Everything is ready."}),fx({name:"SDK_GAME_START",status:"success",message:"Advertisement(s) are done. Start / resume the game."}),fx({name:"CONTENT_RESUME_REQUESTED",status:"success",message:"Fired when content should be resumed. This usually happens when an ad finishes or collapses."})},mx=function(e){window.addEventListener("message",(function(t){var n=t.data,r=t.origin,a=t.source,i=n.type,s=n.method,o=n.options;if("gd-sdk-self"!==i){if("gd-sdk"===i){if(!hx.source&&"init"===s)return function(e){var t=e.source,n=e.origin;hx={source:t,origin:n}}({source:a,origin:r}),void px();var d=e[s];d&&A.default(x.default.mark((function t(){var n,r=this;return x.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,function(){k.default(this,r),"showAd"===s&&Ni.firstAdapterModeAdsense&&"rewarded"!==o.adType&&(console.log("promo-test, set first adapter to adssense 3"),o.params=o.params?o.params:{},o.params.adapter="adsense")}.bind(this),!(n=d.apply(e,Object.values(o)))||!n.then){t.next=6;break}return t.next=6,n;case 6:t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0),console.log("gd:adp:m:r onFrameMessage error",t.t0);case 11:case"end":return t.stop()}}),t,this,[[0,8]])})))()}}else{var u={type:"gd-sdk",method:s,options:o};window.postMessage(u,location.origin)}}),!1)},gx=function(e){!function(e){var t=e.onEvent;e.onEvent=function(e){fx(e),t.apply(this,arguments)}}(e);var t=new lx(e);return mx(t),t},vx=function(e){try{var t=Wb(e);e.gameId||t.send("nogameid",{message:"".concat(Bg.parentURL)})}catch(e){}},yx={create:function(){var e=A.default(x.default.mark((function e(t){var n,r;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,vx(t),Vb=Wb(Hb=t),e.next=5,o_();case 5:return n=e.sent,r=n?a_(t):gx(t),e_(),e.abrupt("return",r);case 11:return e.prev=11,e.t0=e.catch(0),console.log("gd:adp: sdk adaptor create failed, fallback to default adapter",e.t0),e.abrupt("return",gx(t));case 15:case"end":return e.stop()}}),e,null,[[0,11]])})));return function(t){return e.apply(this,arguments)}}()};function bx(){return(bx=A.default(x.default.mark((function e(t,n){var r;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r_();case 2:if(!e.sent){e.next=7;break}e.t0=window.gdsdk,e.next=10;break;case 7:return e.next=9,wx(t);case 9:e.t0=e.sent;case 10:return r=e.t0,e.abrupt("return",n(r));case 12:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var _x=!1;function wx(e){var t=this;return new Promise(function(n,r){var a=this;if(k.default(this,t),ox)return n(ox);if(_x)var i=setInterval(function(){k.default(this,a),ox&&(_x=!1,clearInterval(i),n(ox))}.bind(this),100);else _x=!0,yx.create(e).then(function(e){k.default(this,a),ox=e,e._sendSDKReady(),_x=!1,n(ox)}.bind(this))}.bind(this))}var Ax,kx=(wx(Ax=function(){var e={};try{"object"===("undefined"==typeof GD_OPTIONS?"undefined":E.default(GD_OPTIONS))&&GD_OPTIONS?e=GD_OPTIONS:window.gdApi&&"object"===E.default(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}()),{invoke:function(e){return function(e,t){return bx.apply(this,arguments)}(Ax,e)}});function Ex(){var e=this;this.AdType=a.AdType,this.preloadAd=function(e){var t=this;return kx.invoke(function(n){return k.default(this,t),n.preloadAd(e)}.bind(this))},this.showAd=function(){var e=A.default(x.default.mark((function e(t,n){var r=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",kx.invoke(function(e){var i=this;if(k.default(this,r),t===a.AdType.Display)return e.showDisplayAd(n);return function(){k.default(this,i)}.bind(this),e.showAd(t,{})}.bind(this)));case 1:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}(),this.cancelAd=function(){var e=this;return kx.invoke(function(t){return k.default(this,e),t.cancelAd()}.bind(this))},this.openConsole=function(){var e=this;return kx.invoke(function(t){return k.default(this,e),t.openConsole()}.bind(this))},this.getSession=function(){var e=this;return kx.invoke(function(t){return k.default(this,e),t.session()}.bind(this))},this.sendEvent=function(e){var t=this;return kx.invoke(function(n){return k.default(this,t),n.sendGenericEvent(e)}.bind(this))},this.leaderboard={show:function(){k.default(this,e),Tm.showLeaderboard()}.bind(this),addScore:function(t){k.default(this,e),Tm.addScore(t)}.bind(this)}}Ex.prototype=new function(){this.showBanner=function(){var e=this;return kx.invoke(function(t){return k.default(this,e),t.showBanner()}.bind(this))},this.play=function(){},this.customLog=function(){}},window.gdsdk=new Ex,window.gdApi=window.gdsdk;
1
+ "use strict";var e=require("@babel/runtime/helpers/asyncToGenerator"),t=require("@babel/runtime/helpers/newArrowCheck"),n=require("@babel/runtime/helpers/typeof"),r=require("@babel/runtime/regenerator"),a=require("@bygd/gd-sdk-era/dist/default"),i=require("@babel/runtime/helpers/classCallCheck"),s=require("@babel/runtime/helpers/defineProperty"),o=require("@babel/runtime/helpers/createClass"),u=require("url-parse"),d=require("js-base64"),c=require("validator"),l=require("is-valid-domain"),h=require("get-value"),f=require("set-value"),p=require("lodash.clonedeep"),m=require("can-autoplay"),g=require("is-plain-object"),v=require("querystringify"),y=require("lodash.merge"),b=require("events"),_=require("uuid");function w(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var A=w(e),k=w(t),E=w(n),x=w(r),S=w(i),R=w(s),D=w(o),T=w(u),I=w(c),O=w(l),P=w(h),C=w(f),L=w(p),U=w(m),M=w(v),j=w(y),G="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},B=function(e){return e&&e.Math==Math&&e},q=B("object"==typeof globalThis&&globalThis)||B("object"==typeof window&&window)||B("object"==typeof self&&self)||B("object"==typeof G&&G)||Function("return this")(),N={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},F=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e},V=F,W=function(e,t,n){if(V(e),void 0===t)return e;switch(n){case 0:return function(){return e.call(t)};case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,a){return e.call(t,n,r,a)}}return function(){return e.apply(t,arguments)}},K=function(e){try{return!!e()}catch(e){return!0}},H={}.toString,z=function(e){return H.call(e).slice(8,-1)},$=z,Q="".split,Y=K((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==$(e)?Q.call(e,""):Object(e)}:Object,J=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e},X=J,Z=function(e){return Object(X(e))},ee=Math.ceil,te=Math.floor,ne=function(e){return isNaN(e=+e)?0:(e>0?te:ee)(e)},re=ne,ae=Math.min,ie=function(e){return e>0?ae(re(e),9007199254740991):0},se=function(e){return"object"==typeof e?null!==e:"function"==typeof e},oe=z,ue=Array.isArray||function(e){return"Array"==oe(e)},de={exports:{}},ce=!K((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),le={},he=se,fe=q.document,pe=he(fe)&&he(fe.createElement),me=function(e){return pe?fe.createElement(e):{}},ge=me,ve=!ce&&!K((function(){return 7!=Object.defineProperty(ge("div"),"a",{get:function(){return 7}}).a})),ye=se,be=function(e){if(!ye(e))throw TypeError(String(e)+" is not an object");return e},_e=se,we=function(e,t){if(!_e(e))return e;var n,r;if(t&&"function"==typeof(n=e.toString)&&!_e(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!_e(r=n.call(e)))return r;if(!t&&"function"==typeof(n=e.toString)&&!_e(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")},Ae=ce,ke=ve,Ee=be,xe=we,Se=Object.defineProperty;le.f=Ae?Se:function(e,t,n){if(Ee(e),t=xe(t,!0),Ee(n),ke)try{return Se(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e};var Re=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},De=le,Te=Re,Ie=ce?function(e,t,n){return De.f(e,t,Te(1,n))}:function(e,t,n){return e[t]=n,e},Oe=q,Pe=Ie,Ce=function(e,t){try{Pe(Oe,e,t)}catch(n){Oe[e]=t}return t},Le=Ce,Ue=q["__core-js_shared__"]||Le("__core-js_shared__",{}),Me=Ue;(de.exports=function(e,t){return Me[e]||(Me[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.6.5",mode:"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"});var je={}.hasOwnProperty,Ge=function(e,t){return je.call(e,t)},Be=0,qe=Math.random(),Ne=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++Be+qe).toString(36)},Fe=K,Ve=!!Object.getOwnPropertySymbols&&!Fe((function(){return!String(Symbol())})),We=Ve&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Ke=q,He=de.exports,ze=Ge,$e=Ne,Qe=Ve,Ye=We,Je=He("wks"),Xe=Ke.Symbol,Ze=Ye?Xe:Xe&&Xe.withoutSetter||$e,et=function(e){return ze(Je,e)||(Qe&&ze(Xe,e)?Je[e]=Xe[e]:Je[e]=Ze("Symbol."+e)),Je[e]},tt=se,nt=ue,rt=et("species"),at=function(e,t){var n;return nt(e)&&("function"!=typeof(n=e.constructor)||n!==Array&&!nt(n.prototype)?tt(n)&&null===(n=n[rt])&&(n=void 0):n=void 0),new(void 0===n?Array:n)(0===t?0:t)},it=W,st=Y,ot=Z,ut=ie,dt=at,ct=[].push,lt=function(e){var t=1==e,n=2==e,r=3==e,a=4==e,i=6==e,s=5==e||i;return function(o,u,d,c){for(var l,h,f=ot(o),p=st(f),m=it(u,d,3),g=ut(p.length),v=0,y=c||dt,b=t?y(o,g):n?y(o,0):void 0;g>v;v++)if((s||v in p)&&(h=m(l=p[v],v,f),e))if(t)b[v]=h;else if(h)switch(e){case 3:return!0;case 5:return l;case 6:return v;case 2:ct.call(b,l)}else if(a)return!1;return i?-1:r||a?a:b}},ht={forEach:lt(0),map:lt(1),filter:lt(2),some:lt(3),every:lt(4),find:lt(5),findIndex:lt(6)},ft=K,pt=function(e,t){var n=[][e];return!!n&&ft((function(){n.call(null,t||function(){throw 1},1)}))},mt=ce,gt=K,vt=Ge,yt=Object.defineProperty,bt={},_t=function(e){throw e},wt=function(e,t){if(vt(bt,e))return bt[e];t||(t={});var n=[][e],r=!!vt(t,"ACCESSORS")&&t.ACCESSORS,a=vt(t,0)?t[0]:_t,i=vt(t,1)?t[1]:void 0;return bt[e]=!!n&&!gt((function(){if(r&&!mt)return!0;var e={length:-1};r?yt(e,1,{enumerable:!0,get:_t}):e[1]=1,n.call(e,a,i)}))},At=ht.forEach,kt=wt,Et=pt("forEach"),xt=kt("forEach"),St=q,Rt=N,Dt=Et&&xt?[].forEach:function(e){return At(this,e,arguments.length>1?arguments[1]:void 0)},Tt=Ie;for(var It in Rt){var Ot=St[It],Pt=Ot&&Ot.prototype;if(Pt&&Pt.forEach!==Dt)try{Tt(Pt,"forEach",Dt)}catch(e){Pt.forEach=Dt}}var Ct={},Lt={},Ut={}.propertyIsEnumerable,Mt=Object.getOwnPropertyDescriptor,jt=Mt&&!Ut.call({1:2},1);Lt.f=jt?function(e){var t=Mt(this,e);return!!t&&t.enumerable}:Ut;var Gt=Y,Bt=J,qt=function(e){return Gt(Bt(e))},Nt=ce,Ft=Lt,Vt=Re,Wt=qt,Kt=we,Ht=Ge,zt=ve,$t=Object.getOwnPropertyDescriptor;Ct.f=Nt?$t:function(e,t){if(e=Wt(e),t=Kt(t,!0),zt)try{return $t(e,t)}catch(e){}if(Ht(e,t))return Vt(!Ft.f.call(e,t),e[t])};var Qt={exports:{}},Yt=Ue,Jt=Function.toString;"function"!=typeof Yt.inspectSource&&(Yt.inspectSource=function(e){return Jt.call(e)});var Xt,Zt,en,tn=Yt.inspectSource,nn=tn,rn=q.WeakMap,an="function"==typeof rn&&/native code/.test(nn(rn)),sn=de.exports,on=Ne,un=sn("keys"),dn=function(e){return un[e]||(un[e]=on(e))},cn={},ln=an,hn=se,fn=Ie,pn=Ge,mn=dn,gn=cn,vn=q.WeakMap;if(ln){var yn=new vn,bn=yn.get,_n=yn.has,wn=yn.set;Xt=function(e,t){return wn.call(yn,e,t),t},Zt=function(e){return bn.call(yn,e)||{}},en=function(e){return _n.call(yn,e)}}else{var An=mn("state");gn[An]=!0,Xt=function(e,t){return fn(e,An,t),t},Zt=function(e){return pn(e,An)?e[An]:{}},en=function(e){return pn(e,An)}}var kn={set:Xt,get:Zt,has:en,enforce:function(e){return en(e)?Zt(e):Xt(e,{})},getterFor:function(e){return function(t){var n;if(!hn(t)||(n=Zt(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}},En=q,xn=Ie,Sn=Ge,Rn=Ce,Dn=tn,Tn=kn.get,In=kn.enforce,On=String(String).split("String");(Qt.exports=function(e,t,n,r){var a=!!r&&!!r.unsafe,i=!!r&&!!r.enumerable,s=!!r&&!!r.noTargetGet;"function"==typeof n&&("string"!=typeof t||Sn(n,"name")||xn(n,"name",t),In(n).source=On.join("string"==typeof t?t:"")),e!==En?(a?!s&&e[t]&&(i=!0):delete e[t],i?e[t]=n:xn(e,t,n)):i?e[t]=n:Rn(t,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&Tn(this).source||Dn(this)}));var Pn=q,Cn=Pn,Ln=q,Un=function(e){return"function"==typeof e?e:void 0},Mn=function(e,t){return arguments.length<2?Un(Cn[e])||Un(Ln[e]):Cn[e]&&Cn[e][t]||Ln[e]&&Ln[e][t]},jn={},Gn=ne,Bn=Math.max,qn=Math.min,Nn=function(e,t){var n=Gn(e);return n<0?Bn(n+t,0):qn(n,t)},Fn=qt,Vn=ie,Wn=Nn,Kn=function(e){return function(t,n,r){var a,i=Fn(t),s=Vn(i.length),o=Wn(r,s);if(e&&n!=n){for(;s>o;)if((a=i[o++])!=a)return!0}else for(;s>o;o++)if((e||o in i)&&i[o]===n)return e||o||0;return!e&&-1}},Hn={includes:Kn(!0),indexOf:Kn(!1)},zn=Ge,$n=qt,Qn=Hn.indexOf,Yn=cn,Jn=function(e,t){var n,r=$n(e),a=0,i=[];for(n in r)!zn(Yn,n)&&zn(r,n)&&i.push(n);for(;t.length>a;)zn(r,n=t[a++])&&(~Qn(i,n)||i.push(n));return i},Xn=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Zn=Jn,er=Xn.concat("length","prototype");jn.f=Object.getOwnPropertyNames||function(e){return Zn(e,er)};var tr={};tr.f=Object.getOwnPropertySymbols;var nr=jn,rr=tr,ar=be,ir=Mn("Reflect","ownKeys")||function(e){var t=nr.f(ar(e)),n=rr.f;return n?t.concat(n(e)):t},sr=Ge,or=ir,ur=Ct,dr=le,cr=function(e,t){for(var n=or(t),r=dr.f,a=ur.f,i=0;i<n.length;i++){var s=n[i];sr(e,s)||r(e,s,a(t,s))}},lr=K,hr=/#|\.prototype\./,fr=function(e,t){var n=mr[pr(e)];return n==vr||n!=gr&&("function"==typeof t?lr(t):!!t)},pr=fr.normalize=function(e){return String(e).replace(hr,".").toLowerCase()},mr=fr.data={},gr=fr.NATIVE="N",vr=fr.POLYFILL="P",yr=fr,br=q,_r=Ct.f,wr=Ie,Ar=Qt.exports,kr=Ce,Er=cr,xr=yr,Sr=function(e,t){var n,r,a,i,s,o=e.target,u=e.global,d=e.stat;if(n=u?br:d?br[o]||kr(o,{}):(br[o]||{}).prototype)for(r in t){if(i=t[r],a=e.noTargetGet?(s=_r(n,r))&&s.value:n[r],!xr(u?r:o+(d?".":"#")+r,e.forced)&&void 0!==a){if(typeof i==typeof a)continue;Er(i,a)}(e.sham||a&&a.sham)&&wr(i,"sham",!0),Ar(n,r,i,e)}},Rr=Jn,Dr=Xn,Tr=Object.keys||function(e){return Rr(e,Dr)},Ir=Z,Or=Tr;Sr({target:"Object",stat:!0,forced:K((function(){Or(1)}))},{keys:function(e){return Or(Ir(e))}});var Pr=Array.isArray,Cr=Object.prototype.toString,Lr=Pr||function(e){return!!e&&"[object Array]"==Cr.call(e)},Ur={name:"@bygd/gd-sdk-pes",version:"1.29.44",files:["dist/*"],scripts:{build:"NODE_ENV=production rollup --config",watch:"rollup --config --watch --sourcemap --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",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"}},Mr=function(e){var t=jr("object"===E.default(e)?e:a.parseJSON(e));return t&&t.version?Ur.version>=t.version?t:void 0:t},jr=function(e){var t=this;if(!Lr(e)||0===e.length)return e;if(1===e.length)return e[0];var n=0;e.forEach(function(e){k.default(this,t),e.weight=e.weight||1,n+=e.weight}.bind(this));var r=Math.floor(Math.random()*Math.floor(n));n=0;for(var a=0;a<e.length;a++){var i=e[a];if(r<(n+=i.weight))return i}},Gr=function(){var e;(e=console).log.apply(e,arguments)},Br=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 qr,Nr={},Fr=le,Vr=be,Wr=Tr,Kr=ce?Object.defineProperties:function(e,t){Vr(e);for(var n,r=Wr(t),a=r.length,i=0;a>i;)Fr.f(e,n=r[i++],t[n]);return e},Hr=Mn("document","documentElement"),zr=be,$r=Kr,Qr=Xn,Yr=cn,Jr=Hr,Xr=me,Zr=dn("IE_PROTO"),ea=function(){},ta=function(e){return"<script>"+e+"<\/script>"},na=function(){try{qr=document.domain&&new ActiveXObject("htmlfile")}catch(e){}var e,t;na=qr?function(e){e.write(ta("")),e.close();var t=e.parentWindow.Object;return e=null,t}(qr):((t=Xr("iframe")).style.display="none",Jr.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(ta("document.F=Object")),e.close(),e.F);for(var n=Qr.length;n--;)delete na.prototype[Qr[n]];return na()};Yr[Zr]=!0;var ra=Object.create||function(e,t){var n;return null!==e?(ea.prototype=zr(e),n=new ea,ea.prototype=null,n[Zr]=e):n=na(),void 0===t?n:$r(n,t)},aa={},ia=qt,sa=jn.f,oa={}.toString,ua="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];aa.f=function(e){return ua&&"[object Window]"==oa.call(e)?function(e){try{return sa(e)}catch(e){return ua.slice()}}(e):sa(ia(e))};var da={},ca=et;da.f=ca;var la=Pn,ha=Ge,fa=da,pa=le.f,ma=function(e){var t=la.Symbol||(la.Symbol={});ha(t,e)||pa(t,e,{value:fa.f(e)})},ga=le.f,va=Ge,ya=et("toStringTag"),ba=function(e,t,n){e&&!va(e=n?e:e.prototype,ya)&&ga(e,ya,{configurable:!0,value:t})},_a=Sr,wa=q,Aa=Mn,ka=ce,Ea=Ve,xa=We,Sa=K,Ra=Ge,Da=ue,Ta=se,Ia=be,Oa=Z,Pa=qt,Ca=we,La=Re,Ua=ra,Ma=Tr,ja=jn,Ga=aa,Ba=tr,qa=Ct,Na=le,Fa=Lt,Va=Ie,Wa=Qt.exports,Ka=de.exports,Ha=cn,za=Ne,$a=et,Qa=da,Ya=ma,Ja=ba,Xa=kn,Za=ht.forEach,ei=dn("hidden"),ti=$a("toPrimitive"),ni=Xa.set,ri=Xa.getterFor("Symbol"),ai=Object.prototype,ii=wa.Symbol,si=Aa("JSON","stringify"),oi=qa.f,ui=Na.f,di=Ga.f,ci=Fa.f,li=Ka("symbols"),hi=Ka("op-symbols"),fi=Ka("string-to-symbol-registry"),pi=Ka("symbol-to-string-registry"),mi=Ka("wks"),gi=wa.QObject,vi=!gi||!gi.prototype||!gi.prototype.findChild,yi=ka&&Sa((function(){return 7!=Ua(ui({},"a",{get:function(){return ui(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=oi(ai,t);r&&delete ai[t],ui(e,t,n),r&&e!==ai&&ui(ai,t,r)}:ui,bi=function(e,t){var n=li[e]=Ua(ii.prototype);return ni(n,{type:"Symbol",tag:e,description:t}),ka||(n.description=t),n},_i=xa?function(e){return"symbol"==typeof e}:function(e){return Object(e)instanceof ii},wi=function(e,t,n){e===ai&&wi(hi,t,n),Ia(e);var r=Ca(t,!0);return Ia(n),Ra(li,r)?(n.enumerable?(Ra(e,ei)&&e[ei][r]&&(e[ei][r]=!1),n=Ua(n,{enumerable:La(0,!1)})):(Ra(e,ei)||ui(e,ei,La(1,{})),e[ei][r]=!0),yi(e,r,n)):ui(e,r,n)},Ai=function(e,t){Ia(e);var n=Pa(t),r=Ma(n).concat(Si(n));return Za(r,(function(t){ka&&!ki.call(n,t)||wi(e,t,n[t])})),e},ki=function(e){var t=Ca(e,!0),n=ci.call(this,t);return!(this===ai&&Ra(li,t)&&!Ra(hi,t))&&(!(n||!Ra(this,t)||!Ra(li,t)||Ra(this,ei)&&this[ei][t])||n)},Ei=function(e,t){var n=Pa(e),r=Ca(t,!0);if(n!==ai||!Ra(li,r)||Ra(hi,r)){var a=oi(n,r);return!a||!Ra(li,r)||Ra(n,ei)&&n[ei][r]||(a.enumerable=!0),a}},xi=function(e){var t=di(Pa(e)),n=[];return Za(t,(function(e){Ra(li,e)||Ra(Ha,e)||n.push(e)})),n},Si=function(e){var t=e===ai,n=di(t?hi:Pa(e)),r=[];return Za(n,(function(e){!Ra(li,e)||t&&!Ra(ai,e)||r.push(li[e])})),r};(Ea||(Wa((ii=function(){if(this instanceof ii)throw TypeError("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?String(arguments[0]):void 0,t=za(e),n=function(e){this===ai&&n.call(hi,e),Ra(this,ei)&&Ra(this[ei],t)&&(this[ei][t]=!1),yi(this,t,La(1,e))};return ka&&vi&&yi(ai,t,{configurable:!0,set:n}),bi(t,e)}).prototype,"toString",(function(){return ri(this).tag})),Wa(ii,"withoutSetter",(function(e){return bi(za(e),e)})),Fa.f=ki,Na.f=wi,qa.f=Ei,ja.f=Ga.f=xi,Ba.f=Si,Qa.f=function(e){return bi($a(e),e)},ka&&(ui(ii.prototype,"description",{configurable:!0,get:function(){return ri(this).description}}),Wa(ai,"propertyIsEnumerable",ki,{unsafe:!0}))),_a({global:!0,wrap:!0,forced:!Ea,sham:!Ea},{Symbol:ii}),Za(Ma(mi),(function(e){Ya(e)})),_a({target:"Symbol",stat:!0,forced:!Ea},{for:function(e){var t=String(e);if(Ra(fi,t))return fi[t];var n=ii(t);return fi[t]=n,pi[n]=t,n},keyFor:function(e){if(!_i(e))throw TypeError(e+" is not a symbol");if(Ra(pi,e))return pi[e]},useSetter:function(){vi=!0},useSimple:function(){vi=!1}}),_a({target:"Object",stat:!0,forced:!Ea,sham:!ka},{create:function(e,t){return void 0===t?Ua(e):Ai(Ua(e),t)},defineProperty:wi,defineProperties:Ai,getOwnPropertyDescriptor:Ei}),_a({target:"Object",stat:!0,forced:!Ea},{getOwnPropertyNames:xi,getOwnPropertySymbols:Si}),_a({target:"Object",stat:!0,forced:Sa((function(){Ba.f(1)}))},{getOwnPropertySymbols:function(e){return Ba.f(Oa(e))}}),si)&&_a({target:"JSON",stat:!0,forced:!Ea||Sa((function(){var e=ii();return"[null]"!=si([e])||"{}"!=si({a:e})||"{}"!=si(Object(e))}))},{stringify:function(e,t,n){for(var r,a=[e],i=1;arguments.length>i;)a.push(arguments[i++]);if(r=t,(Ta(t)||void 0!==e)&&!_i(e))return Da(t)||(t=function(e,t){if("function"==typeof r&&(t=r.call(this,e,t)),!_i(t))return t}),a[1]=t,si.apply(null,a)}});ii.prototype[ti]||Va(ii.prototype,ti,ii.prototype.valueOf),Ja(ii,"Symbol"),Ha[ei]=!0;var Ri,Di,Ti=Mn("navigator","userAgent")||"",Ii=Ti,Oi=q.process,Pi=Oi&&Oi.versions,Ci=Pi&&Pi.v8;Ci?Di=(Ri=Ci.split("."))[0]+Ri[1]:Ii&&(!(Ri=Ii.match(/Edge\/(\d+)/))||Ri[1]>=74)&&(Ri=Ii.match(/Chrome\/(\d+)/))&&(Di=Ri[1]);var Li=Di&&+Di,Ui=K,Mi=Li,ji=et("species"),Gi=function(e){return Mi>=51||!Ui((function(){var t=[];return(t.constructor={})[ji]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},Bi=Sr,qi=ht.filter,Ni=wt,Fi=Gi("filter"),Vi=Ni("filter");Bi({target:"Array",proto:!0,forced:!Fi||!Vi},{filter:function(e){return qi(this,e,arguments.length>1?arguments[1]:void 0)}});var Wi=Sr,Ki=K,Hi=qt,zi=Ct.f,$i=ce,Qi=Ki((function(){zi(1)}));Wi({target:"Object",stat:!0,forced:!$i||Qi,sham:!$i},{getOwnPropertyDescriptor:function(e,t){return zi(Hi(e),t)}});var Yi=we,Ji=le,Xi=Re,Zi=function(e,t,n){var r=Yi(t);r in e?Ji.f(e,r,Xi(0,n)):e[r]=n},es=ir,ts=qt,ns=Ct,rs=Zi;Sr({target:"Object",stat:!0,sham:!ce},{getOwnPropertyDescriptors:function(e){for(var t,n,r=ts(e),a=ns.f,i=es(r),s={},o=0;i.length>o;)void 0!==(n=a(r,t=i[o++]))&&rs(s,t,n);return s}});var as=Sr,is=se,ss=ue,os=Nn,us=ie,ds=qt,cs=Zi,ls=et,hs=wt,fs=Gi("slice"),ps=hs("slice",{ACCESSORS:!0,0:0,1:2}),ms=ls("species"),gs=[].slice,vs=Math.max;as({target:"Array",proto:!0,forced:!fs||!ps},{slice:function(e,t){var n,r,a,i=ds(this),s=us(i.length),o=os(e,s),u=os(void 0===t?s:t,s);if(ss(i)&&("function"!=typeof(n=i.constructor)||n!==Array&&!ss(n.prototype)?is(n)&&null===(n=n[ms])&&(n=void 0):n=void 0,n===Array||void 0===n))return gs.call(i,o,u);for(r=new(void 0===n?Array:n)(vs(u-o,0)),a=0;o<u;o++,a++)o in i&&cs(r,a,i[o]);return r.length=a,r}});var ys=be,bs=function(e,t,n,r){try{return r?t(ys(n)[0],n[1]):t(n)}catch(t){var a=e.return;throw void 0!==a&&ys(a.call(e)),t}},_s={},ws=_s,As=et("iterator"),ks=Array.prototype,Es=function(e){return void 0!==e&&(ws.Array===e||ks[As]===e)},xs={};xs[et("toStringTag")]="z";var Ss="[object z]"===String(xs),Rs=Ss,Ds=z,Ts=et("toStringTag"),Is="Arguments"==Ds(function(){return arguments}()),Os=Rs?Ds:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),Ts))?n:Is?Ds(t):"Object"==(r=Ds(t))&&"function"==typeof t.callee?"Arguments":r},Ps=Os,Cs=_s,Ls=et("iterator"),Us=function(e){if(null!=e)return e[Ls]||e["@@iterator"]||Cs[Ps(e)]},Ms=W,js=Z,Gs=bs,Bs=Es,Ns=ie,Fs=Zi,Vs=Us,Ws=function(e){var t,n,r,a,i,s,o=js(e),u="function"==typeof this?this:Array,d=arguments.length,c=d>1?arguments[1]:void 0,l=void 0!==c,h=Vs(o),f=0;if(l&&(c=Ms(c,d>2?arguments[2]:void 0,2)),null==h||u==Array&&Bs(h))for(n=new u(t=Ns(o.length));t>f;f++)s=l?c(o[f],f):o[f],Fs(n,f,s);else for(i=(a=h.call(o)).next,n=new u;!(r=i.call(a)).done;f++)s=l?Gs(a,c,[r.value,f],!0):r.value,Fs(n,f,s);return n.length=f,n},Ks=et("iterator"),Hs=!1;try{var zs=0,$s={next:function(){return{done:!!zs++}},return:function(){Hs=!0}};$s[Ks]=function(){return this},Array.from($s,(function(){throw 2}))}catch(e){}var Qs=function(e,t){if(!t&&!Hs)return!1;var n=!1;try{var r={};r[Ks]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch(e){}return n},Ys=Ws;Sr({target:"Array",stat:!0,forced:!Qs((function(e){Array.from(e)}))},{from:Ys});var Js,Xs,Zs,eo=ne,to=J,no=function(e){return function(t,n){var r,a,i=String(to(t)),s=eo(n),o=i.length;return s<0||s>=o?e?"":void 0:(r=i.charCodeAt(s))<55296||r>56319||s+1===o||(a=i.charCodeAt(s+1))<56320||a>57343?e?i.charAt(s):r:e?i.slice(s,s+2):a-56320+(r-55296<<10)+65536}},ro={codeAt:no(!1),charAt:no(!0)},ao=!K((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),io=Ge,so=Z,oo=ao,uo=dn("IE_PROTO"),co=Object.prototype,lo=oo?Object.getPrototypeOf:function(e){return e=so(e),io(e,uo)?e[uo]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?co:null},ho=lo,fo=Ie,po=Ge,mo=et("iterator"),go=!1;[].keys&&("next"in(Zs=[].keys())?(Xs=ho(ho(Zs)))!==Object.prototype&&(Js=Xs):go=!0),null==Js&&(Js={}),po(Js,mo)||fo(Js,mo,(function(){return this}));var vo={IteratorPrototype:Js,BUGGY_SAFARI_ITERATORS:go},yo=vo.IteratorPrototype,bo=ra,_o=Re,wo=ba,Ao=_s,ko=function(){return this},Eo=function(e,t,n){var r=t+" Iterator";return e.prototype=bo(yo,{next:_o(1,n)}),wo(e,r,!1),Ao[r]=ko,e},xo=se,So=be,Ro=function(e){if(!xo(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype");return e},Do=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),t=n instanceof Array}catch(e){}return function(n,r){return So(n),Ro(r),t?e.call(n,r):n.__proto__=r,n}}():void 0),To=Sr,Io=Eo,Oo=lo,Po=Do,Co=ba,Lo=Ie,Uo=Qt.exports,Mo=_s,jo=vo.IteratorPrototype,Go=vo.BUGGY_SAFARI_ITERATORS,Bo=et("iterator"),qo=function(){return this},No=function(e,t,n,r,a,i,s){Io(n,t,r);var o,u,d,c=function(e){if(e===a&&m)return m;if(!Go&&e in f)return f[e];switch(e){case"keys":case"values":case"entries":return function(){return new n(this,e)}}return function(){return new n(this)}},l=t+" Iterator",h=!1,f=e.prototype,p=f[Bo]||f["@@iterator"]||a&&f[a],m=!Go&&p||c(a),g="Array"==t&&f.entries||p;if(g&&(o=Oo(g.call(new e)),jo!==Object.prototype&&o.next&&(Oo(o)!==jo&&(Po?Po(o,jo):"function"!=typeof o[Bo]&&Lo(o,Bo,qo)),Co(o,l,!0))),"values"==a&&p&&"values"!==p.name&&(h=!0,m=function(){return p.call(this)}),f[Bo]!==m&&Lo(f,Bo,m),Mo[t]=m,a)if(u={values:c("values"),keys:i?m:c("keys"),entries:c("entries")},s)for(d in u)(Go||h||!(d in f))&&Uo(f,d,u[d]);else To({target:t,proto:!0,forced:Go||h},u);return u},Fo=ro.charAt,Vo=kn,Wo=No,Ko=Vo.set,Ho=Vo.getterFor("String Iterator");Wo(String,"String",(function(e){Ko(this,{type:"String Iterator",string:String(e),index:0})}),(function(){var e,t=Ho(this),n=t.string,r=t.index;return r>=n.length?{value:void 0,done:!0}:(e=Fo(n,r),t.index+=e.length,{value:e,done:!1})}));var zo=Sr,$o=ce,Qo=q,Yo=Ge,Jo=se,Xo=le.f,Zo=cr,eu=Qo.Symbol;if($o&&"function"==typeof eu&&(!("description"in eu.prototype)||void 0!==eu().description)){var tu={},nu=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),t=this instanceof nu?new eu(e):void 0===e?eu():eu(e);return""===e&&(tu[t]=!0),t};Zo(nu,eu);var ru=nu.prototype=eu.prototype;ru.constructor=nu;var au=ru.toString,iu="Symbol(test)"==String(eu("test")),su=/^Symbol\((.*)\)[^)]+$/;Xo(ru,"description",{configurable:!0,get:function(){var e=Jo(this)?this.valueOf():this,t=au.call(e);if(Yo(tu,e))return"";var n=iu?t.slice(7,-1):t.replace(su,"$1");return""===n?void 0:n}}),zo({global:!0,forced:!0},{Symbol:nu})}ma("iterator");var ou=ra,uu=le,du=et("unscopables"),cu=Array.prototype;null==cu[du]&&uu.f(cu,du,{configurable:!0,value:ou(null)});var lu=function(e){cu[du][e]=!0},hu=qt,fu=lu,pu=_s,mu=kn,gu=No,vu=mu.set,yu=mu.getterFor("Array Iterator"),bu=gu(Array,"Array",(function(e,t){vu(this,{type:"Array Iterator",target:hu(e),index:0,kind:t})}),(function(){var e=yu(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}}),"values");pu.Arguments=pu.Array,fu("keys"),fu("values"),fu("entries");var _u=q,wu=N,Au=bu,ku=Ie,Eu=et,xu=Eu("iterator"),Su=Eu("toStringTag"),Ru=Au.values;for(var Du in wu){var Tu=_u[Du],Iu=Tu&&Tu.prototype;if(Iu){if(Iu[xu]!==Ru)try{ku(Iu,xu,Ru)}catch(e){Iu[xu]=Ru}if(Iu[Su]||ku(Iu,Su,Du),wu[Du])for(var Ou in Au)if(Iu[Ou]!==Au[Ou])try{ku(Iu,Ou,Au[Ou])}catch(e){Iu[Ou]=Au[Ou]}}}var Pu=Os,Cu=Ss?{}.toString:function(){return"[object "+Pu(this)+"]"},Lu=Ss,Uu=Qt.exports,Mu=Cu;Lu||Uu(Object.prototype,"toString",Mu,{unsafe:!0});var ju=q.Promise,Gu=Qt.exports,Bu=function(e,t,n){for(var r in t)Gu(e,r,t[r],n);return e},qu=Mn,Nu=le,Fu=ce,Vu=et("species"),Wu=function(e){var t=qu(e),n=Nu.f;Fu&&t&&!t[Vu]&&n(t,Vu,{configurable:!0,get:function(){return this}})},Ku=function(e,t,n){if(!(e instanceof t))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return e},Hu={exports:{}},zu=be,$u=Es,Qu=ie,Yu=W,Ju=Us,Xu=bs,Zu=function(e,t){this.stopped=e,this.result=t};(Hu.exports=function(e,t,n,r,a){var i,s,o,u,d,c,l,h=Yu(t,n,r?2:1);if(a)i=e;else{if("function"!=typeof(s=Ju(e)))throw TypeError("Target is not iterable");if($u(s)){for(o=0,u=Qu(e.length);u>o;o++)if((d=r?h(zu(l=e[o])[0],l[1]):h(e[o]))&&d instanceof Zu)return d;return new Zu(!1)}i=s.call(e)}for(c=i.next;!(l=c.call(i)).done;)if("object"==typeof(d=Xu(i,h,l.value,r))&&d&&d instanceof Zu)return d;return new Zu(!1)}).stop=function(e){return new Zu(!0,e)};var ed,td,nd,rd=be,ad=F,id=et("species"),sd=function(e,t){var n,r=rd(e).constructor;return void 0===r||null==(n=rd(r)[id])?t:ad(n)},od=/(iphone|ipod|ipad).*applewebkit/i.test(Ti),ud=q,dd=K,cd=z,ld=W,hd=Hr,fd=me,pd=od,md=ud.location,gd=ud.setImmediate,vd=ud.clearImmediate,yd=ud.process,bd=ud.MessageChannel,_d=ud.Dispatch,wd=0,Ad={},kd=function(e){if(Ad.hasOwnProperty(e)){var t=Ad[e];delete Ad[e],t()}},Ed=function(e){return function(){kd(e)}},xd=function(e){kd(e.data)},Sd=function(e){ud.postMessage(e+"",md.protocol+"//"+md.host)};gd&&vd||(gd=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return Ad[++wd]=function(){("function"==typeof e?e:Function(e)).apply(void 0,t)},ed(wd),wd},vd=function(e){delete Ad[e]},"process"==cd(yd)?ed=function(e){yd.nextTick(Ed(e))}:_d&&_d.now?ed=function(e){_d.now(Ed(e))}:bd&&!pd?(nd=(td=new bd).port2,td.port1.onmessage=xd,ed=ld(nd.postMessage,nd,1)):!ud.addEventListener||"function"!=typeof postMessage||ud.importScripts||dd(Sd)||"file:"===md.protocol?ed="onreadystatechange"in fd("script")?function(e){hd.appendChild(fd("script")).onreadystatechange=function(){hd.removeChild(this),kd(e)}}:function(e){setTimeout(Ed(e),0)}:(ed=Sd,ud.addEventListener("message",xd,!1)));var Rd,Dd,Td,Id,Od,Pd,Cd,Ld,Ud={set:gd,clear:vd},Md=q,jd=Ct.f,Gd=z,Bd=Ud.set,qd=od,Nd=Md.MutationObserver||Md.WebKitMutationObserver,Fd=Md.process,Vd=Md.Promise,Wd="process"==Gd(Fd),Kd=jd(Md,"queueMicrotask"),Hd=Kd&&Kd.value;Hd||(Rd=function(){var e,t;for(Wd&&(e=Fd.domain)&&e.exit();Dd;){t=Dd.fn,Dd=Dd.next;try{t()}catch(e){throw Dd?Id():Td=void 0,e}}Td=void 0,e&&e.enter()},Wd?Id=function(){Fd.nextTick(Rd)}:Nd&&!qd?(Od=!0,Pd=document.createTextNode(""),new Nd(Rd).observe(Pd,{characterData:!0}),Id=function(){Pd.data=Od=!Od}):Vd&&Vd.resolve?(Cd=Vd.resolve(void 0),Ld=Cd.then,Id=function(){Ld.call(Cd,Rd)}):Id=function(){Bd.call(Md,Rd)});var zd=Hd||function(e){var t={fn:e,next:void 0};Td&&(Td.next=t),Dd||(Dd=t,Id()),Td=t},$d={},Qd=F,Yd=function(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=r})),this.resolve=Qd(t),this.reject=Qd(n)};$d.f=function(e){return new Yd(e)};var Jd,Xd,Zd,ec,tc=be,nc=se,rc=$d,ac=function(e,t){if(tc(e),nc(t)&&t.constructor===e)return t;var n=rc.f(e);return(0,n.resolve)(t),n.promise},ic=q,sc=Sr,oc=q,uc=Mn,dc=ju,cc=Qt.exports,lc=Bu,hc=ba,fc=Wu,pc=se,mc=F,gc=Ku,vc=z,yc=tn,bc=Hu.exports,_c=Qs,wc=sd,Ac=Ud.set,kc=zd,Ec=ac,xc=function(e,t){var n=ic.console;n&&n.error&&(1===arguments.length?n.error(e):n.error(e,t))},Sc=$d,Rc=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},Dc=kn,Tc=yr,Ic=Li,Oc=et("species"),Pc="Promise",Cc=Dc.get,Lc=Dc.set,Uc=Dc.getterFor(Pc),Mc=dc,jc=oc.TypeError,Gc=oc.document,Bc=oc.process,qc=uc("fetch"),Nc=Sc.f,Fc=Nc,Vc="process"==vc(Bc),Wc=!!(Gc&&Gc.createEvent&&oc.dispatchEvent),Kc=Tc(Pc,(function(){if(!(yc(Mc)!==String(Mc))){if(66===Ic)return!0;if(!Vc&&"function"!=typeof PromiseRejectionEvent)return!0}if(Ic>=51&&/native code/.test(Mc))return!1;var e=Mc.resolve(1),t=function(e){e((function(){}),(function(){}))};return(e.constructor={})[Oc]=t,!(e.then((function(){}))instanceof t)})),Hc=Kc||!_c((function(e){Mc.all(e).catch((function(){}))})),zc=function(e){var t;return!(!pc(e)||"function"!=typeof(t=e.then))&&t},$c=function(e,t,n){if(!t.notified){t.notified=!0;var r=t.reactions;kc((function(){for(var a=t.value,i=1==t.state,s=0;r.length>s;){var o,u,d,c=r[s++],l=i?c.ok:c.fail,h=c.resolve,f=c.reject,p=c.domain;try{l?(i||(2===t.rejection&&Xc(e,t),t.rejection=1),!0===l?o=a:(p&&p.enter(),o=l(a),p&&(p.exit(),d=!0)),o===c.promise?f(jc("Promise-chain cycle")):(u=zc(o))?u.call(o,h,f):h(o)):f(a)}catch(e){p&&!d&&p.exit(),f(e)}}t.reactions=[],t.notified=!1,n&&!t.rejection&&Yc(e,t)}))}},Qc=function(e,t,n){var r,a;Wc?((r=Gc.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),oc.dispatchEvent(r)):r={promise:t,reason:n},(a=oc["on"+e])?a(r):"unhandledrejection"===e&&xc("Unhandled promise rejection",n)},Yc=function(e,t){Ac.call(oc,(function(){var n,r=t.value;if(Jc(t)&&(n=Rc((function(){Vc?Bc.emit("unhandledRejection",r,e):Qc("unhandledrejection",e,r)})),t.rejection=Vc||Jc(t)?2:1,n.error))throw n.value}))},Jc=function(e){return 1!==e.rejection&&!e.parent},Xc=function(e,t){Ac.call(oc,(function(){Vc?Bc.emit("rejectionHandled",e):Qc("rejectionhandled",e,t.value)}))},Zc=function(e,t,n,r){return function(a){e(t,n,a,r)}},el=function(e,t,n,r){t.done||(t.done=!0,r&&(t=r),t.value=n,t.state=2,$c(e,t,!0))},tl=function(e,t,n,r){if(!t.done){t.done=!0,r&&(t=r);try{if(e===n)throw jc("Promise can't be resolved itself");var a=zc(n);a?kc((function(){var r={done:!1};try{a.call(n,Zc(tl,e,r,t),Zc(el,e,r,t))}catch(n){el(e,r,n,t)}})):(t.value=n,t.state=1,$c(e,t,!1))}catch(n){el(e,{done:!1},n,t)}}};Kc&&(Mc=function(e){gc(this,Mc,Pc),mc(e),Jd.call(this);var t=Cc(this);try{e(Zc(tl,this,t),Zc(el,this,t))}catch(e){el(this,t,e)}},(Jd=function(e){Lc(this,{type:Pc,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=lc(Mc.prototype,{then:function(e,t){var n=Uc(this),r=Nc(wc(this,Mc));return r.ok="function"!=typeof e||e,r.fail="function"==typeof t&&t,r.domain=Vc?Bc.domain:void 0,n.parent=!0,n.reactions.push(r),0!=n.state&&$c(this,n,!1),r.promise},catch:function(e){return this.then(void 0,e)}}),Xd=function(){var e=new Jd,t=Cc(e);this.promise=e,this.resolve=Zc(tl,e,t),this.reject=Zc(el,e,t)},Sc.f=Nc=function(e){return e===Mc||e===Zd?new Xd(e):Fc(e)},"function"==typeof dc&&(ec=dc.prototype.then,cc(dc.prototype,"then",(function(e,t){var n=this;return new Mc((function(e,t){ec.call(n,e,t)})).then(e,t)}),{unsafe:!0}),"function"==typeof qc&&sc({global:!0,enumerable:!0,forced:!0},{fetch:function(e){return Ec(Mc,qc.apply(oc,arguments))}}))),sc({global:!0,wrap:!0,forced:Kc},{Promise:Mc}),hc(Mc,Pc,!1),fc(Pc),Zd=uc(Pc),sc({target:Pc,stat:!0,forced:Kc},{reject:function(e){var t=Nc(this);return t.reject.call(void 0,e),t.promise}}),sc({target:Pc,stat:!0,forced:Kc},{resolve:function(e){return Ec(this,e)}}),sc({target:Pc,stat:!0,forced:Hc},{all:function(e){var t=this,n=Nc(t),r=n.resolve,a=n.reject,i=Rc((function(){var n=mc(t.resolve),i=[],s=0,o=1;bc(e,(function(e){var u=s++,d=!1;i.push(void 0),o++,n.call(t,e).then((function(e){d||(d=!0,i[u]=e,--o||r(i))}),a)})),--o||r(i)}));return i.error&&a(i.value),n.promise},race:function(e){var t=this,n=Nc(t),r=n.reject,a=Rc((function(){var a=mc(t.resolve);bc(e,(function(e){a.call(t,e).then(n.resolve,r)}))}));return a.error&&r(a.value),n.promise}});var nl=Sr,rl=K,al=ue,il=se,sl=Z,ol=ie,ul=Zi,dl=at,cl=Gi,ll=Li,hl=et("isConcatSpreadable"),fl=ll>=51||!rl((function(){var e=[];return e[hl]=!1,e.concat()[0]!==e})),pl=cl("concat"),ml=function(e){if(!il(e))return!1;var t=e[hl];return void 0!==t?!!t:al(e)};nl({target:"Array",proto:!0,forced:!fl||!pl},{concat:function(e){var t,n,r,a,i,s=sl(this),o=dl(s,0),u=0;for(t=-1,r=arguments.length;t<r;t++)if(ml(i=-1===t?s:arguments[t])){if(u+(a=ol(i.length))>9007199254740991)throw TypeError("Maximum allowed index exceeded");for(n=0;n<a;n++,u++)n in i&&ul(o,u,i[n])}else{if(u>=9007199254740991)throw TypeError("Maximum allowed index exceeded");ul(o,u++,i)}return o.length=u,o}});var gl=ce,vl=le.f,yl=Function.prototype,bl=yl.toString,_l=/^\s*function ([^ (]*)/;function wl(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 Al(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 Al(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}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 i,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,i=e},f:function(){try{s||null==n.return||n.return()}finally{if(o)throw i}}}}function Al(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 kl(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 El(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?kl(Object(n),!0).forEach((function(t){R.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kl(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}gl&&!("name"in yl)&&vl(yl,"name",{configurable:!0,get:function(){try{return bl.call(this).match(_l)[1]}catch(e){return""}}});var xl,Sl={react:{src:"https://pm.gamedistribution.com/react/16.14.0/umd/react.production.min.js",name:"React"},"react-dom":{src:"https://pm.gamedistribution.com/react-dom/16.14.0/umd/react-dom.production.min.js",name:"ReactDOM"},redux:{src:"https://pm.gamedistribution.com/redux/4.0.5/dist/redux.min.js",name:"Redux"},"react-redux":{src:"https://pm.gamedistribution.com/react-redux/7.2.1/dist/react-redux.min.js",name:"ReactRedux"},"material-ui-core":{src:"https://pm.gamedistribution.com/@material-ui/core/4.11.3/umd/material-ui.production.min.js",name:"MaterialUI"}},Rl={},Dl=function(e,t){Rl[e]=El(El({},t),{},{isLoading:!1})},Tl=function(e){var t=this,n=e.id,r=e.src;return new Promise(function(e,a){if(k.default(this,t),document.getElementById(n))e();else{var i=document.createElement("script");i.onload=function(){e()},i.id=n,i.setAttribute("crossorigin",!0),i.src=r,document.head.appendChild(i)}}.bind(this))},Il=function(){var e=A.default(x.default.mark((function e(t){var n,r,a,i,s,o,u,d;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n=window[t])){e.next=3;break}return e.abrupt("return",n);case 3:if(!(r=Rl[t]).isLoading){e.next=6;break}return e.abrupt("return");case 6:r.isLoading=!0,a=wl(r.dependencies),e.prev=8,a.s();case 10:if((i=a.n()).done){e.next=26;break}if(s=i.value,e.prev=12,o=Sl[s].name,!window[o]){e.next=16;break}return e.abrupt("continue",24);case 16:return e.next=18,Tl({id:s,src:Sl[s].src});case 18:e.next=24;break;case 20:e.prev=20,e.t0=e.catch(12),u=s.id,d=s.src,console.log("Could not load external script ".concat(u," ").concat(d),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,Tl({id:t,src:r.source});case 37:n=window[t],e.next=43;break;case 40:e.prev=40,e.t2=e.catch(34),console.log("Could not load module ".concat(t," ").concat(r.source,"."),e.t2);case 43:return r.isLoading=!1,e.abrupt("return",n);case 45:case"end":return e.stop()}}),e,null,[[8,28,31,34],[12,20],[34,40]])})));return function(t){return e.apply(this,arguments)}}(),Ol=new function e(){var t=this;S.default(this,e),R.default(this,"load",A.default(x.default.mark((function e(){return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Il("Leaderboard");case 2:t.leaderboard=e.sent;case 3:case"end":return e.stop()}}),e)})))),R.default(this,"showLeaderboard",function(){var e=A.default(x.default.mark((function e(n){var r;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=window.GD_OPTIONS.gameId,t.leaderboard){e.next=4;break}return e.next=4,t.load();case 4:t.leaderboard.showLeaderBoard(r,n);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),R.default(this,"addScore",function(){var e=A.default(x.default.mark((function e(n){return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.leaderboard){e.next=3;break}return e.next=3,t.load();case 3:t.leaderboard.addScore(n);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),this.moduleName="Leaderboard",this.moduleConfig={source:"https://pm.gamedistribution.com/@bygd/gd-sdk-leaderboard/0.1.43/dist/default/iife/index.js",dependencies:["react","react-dom","redux","react-redux","material-ui-core"]},Dl(this.moduleName,this.moduleConfig)},Pl=se,Cl=z,Ll=et("match"),Ul=function(e){var t;return Pl(e)&&(void 0!==(t=e[Ll])?!!t:"RegExp"==Cl(e))},Ml=Ul,jl=function(e){if(Ml(e))throw TypeError("The method doesn't accept regular expressions");return e},Gl=et("match"),Bl=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[Gl]=!1,"/./"[e](t)}catch(e){}}return!1},ql=Sr,Nl=Ct.f,Fl=ie,Vl=jl,Wl=J,Kl=Bl,Hl="".startsWith,zl=Math.min,$l=Kl("startsWith");ql({target:"String",proto:!0,forced:!!($l||(xl=Nl(String.prototype,"startsWith"),!xl||xl.writable))&&!$l},{startsWith:function(e){var t=String(Wl(this));Vl(e);var n=Fl(zl(arguments.length>1?arguments[1]:void 0,t.length)),r=String(e);return Hl?Hl.call(t,r,n):t.slice(n,n+r.length)===r}});var Ql=be,Yl=function(){var e=Ql(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t},Jl=Qt.exports,Xl=be,Zl=K,eh=Yl,th=RegExp.prototype,nh=th.toString,rh=Zl((function(){return"/a/b"!=nh.call({source:"a",flags:"b"})})),ah="toString"!=nh.name;(rh||ah)&&Jl(RegExp.prototype,"toString",(function(){var e=Xl(this),t=String(e.source),n=e.flags;return"/"+t+"/"+String(void 0===n&&e instanceof RegExp&&!("flags"in th)?eh.call(e):n)}),{unsafe:!0});var ih={},sh=K;function oh(e,t){return RegExp(e,t)}ih.UNSUPPORTED_Y=sh((function(){var e=oh("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),ih.BROKEN_CARET=sh((function(){var e=oh("^r","gy");return e.lastIndex=2,null!=e.exec("str")}));var uh=Yl,dh=ih,ch=RegExp.prototype.exec,lh=String.prototype.replace,hh=ch,fh=function(){var e=/a/,t=/b*/g;return ch.call(e,"a"),ch.call(t,"a"),0!==e.lastIndex||0!==t.lastIndex}(),ph=dh.UNSUPPORTED_Y||dh.BROKEN_CARET,mh=void 0!==/()??/.exec("")[1];(fh||mh||ph)&&(hh=function(e){var t,n,r,a,i=this,s=ph&&i.sticky,o=uh.call(i),u=i.source,d=0,c=e;return s&&(-1===(o=o.replace("y","")).indexOf("g")&&(o+="g"),c=String(e).slice(i.lastIndex),i.lastIndex>0&&(!i.multiline||i.multiline&&"\n"!==e[i.lastIndex-1])&&(u="(?: "+u+")",c=" "+c,d++),n=new RegExp("^(?:"+u+")",o)),mh&&(n=new RegExp("^"+u+"$(?!\\s)",o)),fh&&(t=i.lastIndex),r=ch.call(s?n:i,c),s?r?(r.input=r.input.slice(d),r[0]=r[0].slice(d),r.index=i.lastIndex,i.lastIndex+=r[0].length):i.lastIndex=0:fh&&r&&(i.lastIndex=i.global?r.index+r[0].length:t),mh&&r&&r.length>1&&lh.call(r[0],n,(function(){for(a=1;a<arguments.length-2;a++)void 0===arguments[a]&&(r[a]=void 0)})),r});var gh=hh;Sr({target:"RegExp",proto:!0,forced:/./.exec!==gh},{exec:gh});var vh=Qt.exports,yh=K,bh=et,_h=gh,wh=Ie,Ah=bh("species"),kh=!yh((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")})),Eh="$0"==="a".replace(/./,"$0"),xh=bh("replace"),Sh=!!/./[xh]&&""===/./[xh]("a","$0"),Rh=!yh((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2!==n.length||"a"!==n[0]||"b"!==n[1]})),Dh=function(e,t,n,r){var a=bh(e),i=!yh((function(){var t={};return t[a]=function(){return 7},7!=""[e](t)})),s=i&&!yh((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[Ah]=function(){return n},n.flags="",n[a]=/./[a]),n.exec=function(){return t=!0,null},n[a](""),!t}));if(!i||!s||"replace"===e&&(!kh||!Eh||Sh)||"split"===e&&!Rh){var o=/./[a],u=n(a,""[e],(function(e,t,n,r,a){return t.exec===_h?i&&!a?{done:!0,value:o.call(t,n,r)}:{done:!0,value:e.call(n,t,r)}:{done:!1}}),{REPLACE_KEEPS_$0:Eh,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:Sh}),d=u[0],c=u[1];vh(String.prototype,e,d),vh(RegExp.prototype,a,2==t?function(e,t){return c.call(e,this,t)}:function(e){return c.call(e,this)})}r&&wh(RegExp.prototype[a],"sham",!0)},Th=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t},Ih=z,Oh=gh,Ph=function(e,t){var n=e.exec;if("function"==typeof n){var r=n.call(e,t);if("object"!=typeof r)throw TypeError("RegExp exec method returned something other than an Object or null");return r}if("RegExp"!==Ih(e))throw TypeError("RegExp#exec called on incompatible receiver");return Oh.call(e,t)},Ch=be,Lh=J,Uh=Th,Mh=Ph;function jh(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 Gh(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?jh(Object(n),!0).forEach((function(t){R.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jh(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}Dh("search",1,(function(e,t,n){return[function(t){var n=Lh(this),r=null==t?void 0:t[e];return void 0!==r?r.call(t,n):new RegExp(t)[e](String(n))},function(e){var r=n(t,e,this);if(r.done)return r.value;var a=Ch(e),i=String(this),s=a.lastIndex;Uh(s,0)||(a.lastIndex=0);var o=Mh(a,i);return Uh(a.lastIndex,s)||(a.lastIndex=s),null===o?-1:o.index}]}));var Bh,qh,Nh=function(){function e(){S.default(this,e)}return D.default(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.getParentUrl()),s=decodeURIComponent((e||n)&&r.parentDomain?r.parentDomain:a.getParentDomain()),o=decodeURIComponent((e||n)&&r.topDomain?r.topDomain:n&&0===a.getIframeDepth()?s:a.getTopDomain()),u=(e||n)&&r.loaderEnabled,d=(e||n)&&r.loaderEnabled,c=(e||n)&&r.loaderEnabled,l=(e||n)&&r.loaderEnabled,h=(e||n)&&r.loaderEnabled,f=(e||n)&&r.loaderEnabled,p=(e||n)&&r.loaderEnabled;console.log("noMinijuegosSDK",p);var m=(e||n)&&r.loaderEnabled,g=(e||n)&&r.loaderEnabled&&r.hasImpression&&r.version>="1.1.24";return{isTokenGameURL:e,isMasterGameURL:t,isExtHostedGameURL:n,noConsoleBanner:u,noLoadedEvent:d,noBlockerEvent:c,noPreroll:m,parentURL:i,parentDomain:s,topDomain:o&&o.length?o:s,noGAPageView:l,noLotamePageView:h,noGamedockSDK:f,noMinijuegosSDK:p,version:r.version,pauseGameOnStartup:g,depth:a.getIframeDepth(),domainMatched:s===o,exports:{formatTokenURLSearch:this._formatTokenURLSearch.bind(this),extendUrlQuery:this._extendUrlQuery.bind(this),base64Encode:this._base64_encode.bind(this)}}}},{key:"_isMasterGameURL",value:function(){var e=/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Fa-f0-9]{32})(.*)$/i;return e.test(location.href)||!this._isTokenGameURL()&&e.test(document.referrer)}},{key:"_isTokenGameURL",value:function(){var e=/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Za-z0-9]{8})\/(.*)$/i;return e.test(location.href)||e.test(document.referrer)}},{key:"_isExtHostedGameURL",value:function(){var e=/^http[s]?:\/\/.*?gd_sdk_referrer_url=.*$/i;return e.test(location.href)||e.test(document.referrer)}},{key:"_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 T.default(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 T.default(document.referrer,!0);if(!r.query.gd_zone_config)return;e=r.query.gd_zone_config}else{var a=new T.default(location.href,!0);if(!a.query.gd_zone_config)return;e=a.query.gd_zone_config}return JSON.parse(d.Base64.decode(decodeURIComponent(e)))}catch(e){}}},{key:"_formatTokenURLSearch",value:function(e){var t="";try{t=encodeURIComponent(d.Base64.encode(JSON.stringify(e)))}catch(e){}try{var n=new T.default(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 T.default(e,!0);return n.query=Gh(Gh({},n.query),t),n.toString()}},{key:"_base64_encode",value:function(e){return d.Base64.encode(JSON.stringify(e))}}]),e}(),Fh=function(){try{return(new Nh).getBridgeContext()}catch(e){return{}}}(),Vh={userDeclinedTracking:document.location.search.indexOf("gdpr-tracking=0")>=0||document.cookie.indexOf("ogdpr_tracking=0")>=0,whitelabelPartner:(Bh=!1,(qh=a.getQueryParams("xanthophyll")).hasOwnProperty("xanthophyll")&&"true"===qh.xanthophyll&&(Bh=!0),Bh)},Wh=ro.charAt,Kh=function(e,t,n){return t+(n?Wh(e,t).length:1)},Hh=Dh,zh=be,$h=Z,Qh=ie,Yh=ne,Jh=J,Xh=Kh,Zh=Ph,ef=Math.max,tf=Math.min,nf=Math.floor,rf=/\$([$&'`]|\d\d?|<[^>]*>)/g,af=/\$([$&'`]|\d\d?)/g;Hh("replace",2,(function(e,t,n,r){var a=r.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,i=r.REPLACE_KEEPS_$0,s=a?"$":"$0";return[function(n,r){var a=Jh(this),i=null==n?void 0:n[e];return void 0!==i?i.call(n,a,r):t.call(String(a),n,r)},function(e,r){if(!a&&i||"string"==typeof r&&-1===r.indexOf(s)){var u=n(t,e,this,r);if(u.done)return u.value}var d=zh(e),c=String(this),l="function"==typeof r;l||(r=String(r));var h=d.global;if(h){var f=d.unicode;d.lastIndex=0}for(var p=[];;){var m=Zh(d,c);if(null===m)break;if(p.push(m),!h)break;""===String(m[0])&&(d.lastIndex=Xh(c,Qh(d.lastIndex),f))}for(var g,v="",y=0,b=0;b<p.length;b++){m=p[b];for(var _=String(m[0]),w=ef(tf(Yh(m.index),c.length),0),A=[],k=1;k<m.length;k++)A.push(void 0===(g=m[k])?g:String(g));var E=m.groups;if(l){var x=[_].concat(A,w,c);void 0!==E&&x.push(E);var S=String(r.apply(void 0,x))}else S=o(_,c,w,A,E,r);w>=y&&(v+=c.slice(y,w)+S,y=w+_.length)}return v+c.slice(y)}];function o(e,n,r,a,i,s){var o=r+e.length,u=a.length,d=af;return void 0!==i&&(i=$h(i),d=rf),t.call(s,d,(function(t,s){var d;switch(s.charAt(0)){case"$":return"$";case"&":return e;case"`":return n.slice(0,r);case"'":return n.slice(o);case"<":d=i[s.slice(1,-1)];break;default:var c=+s;if(0===c)return t;if(c>u){var l=nf(c/10);return 0===l?t:l<=u?void 0===a[l-1]?s.charAt(1):a[l-1]+s.charAt(1):t}d=a[c-1]}return void 0===d?"":d}))}}));var sf=K,of=et("iterator"),uf=!sf((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.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[of]||"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})),df=ce,cf=K,lf=Tr,hf=tr,ff=Lt,pf=Z,mf=Y,gf=Object.assign,vf=Object.defineProperty,yf=!gf||cf((function(){if(df&&1!==gf({b:1},gf(vf({},"a",{enumerable:!0,get:function(){vf(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!=gf({},e)[n]||lf(gf({},t)).join("")!=r}))?function(e,t){for(var n=pf(e),r=arguments.length,a=1,i=hf.f,s=ff.f;r>a;)for(var o,u=mf(arguments[a++]),d=i?lf(u).concat(i(u)):lf(u),c=d.length,l=0;c>l;)o=d[l++],df&&!s.call(u,o)||(n[o]=u[o]);return n}:gf,bf=/[^\0-\u007E]/,_f=/[.\u3002\uFF0E\uFF61]/g,wf="Overflow: input needs wider integers to process",Af=Math.floor,kf=String.fromCharCode,Ef=function(e){return e+22+75*(e<26)},xf=function(e,t,n){var r=0;for(e=n?Af(e/700):e>>1,e+=Af(e/t);e>455;r+=36)e=Af(e/35);return Af(r+36*e/(e+38))},Sf=function(e){var t,n,r=[],a=(e=function(e){for(var t=[],n=0,r=e.length;n<r;){var a=e.charCodeAt(n++);if(a>=55296&&a<=56319&&n<r){var i=e.charCodeAt(n++);56320==(64512&i)?t.push(((1023&a)<<10)+(1023&i)+65536):(t.push(a),n--)}else t.push(a)}return t}(e)).length,i=128,s=0,o=72;for(t=0;t<e.length;t++)(n=e[t])<128&&r.push(kf(n));var u=r.length,d=u;for(u&&r.push("-");d<a;){var c=2147483647;for(t=0;t<e.length;t++)(n=e[t])>=i&&n<c&&(c=n);var l=d+1;if(c-i>Af((2147483647-s)/l))throw RangeError(wf);for(s+=(c-i)*l,i=c,t=0;t<e.length;t++){if((n=e[t])<i&&++s>2147483647)throw RangeError(wf);if(n==i){for(var h=s,f=36;;f+=36){var p=f<=o?1:f>=o+26?26:f-o;if(h<p)break;var m=h-p,g=36-p;r.push(kf(Ef(p+m%g))),h=Af(m/g)}r.push(kf(Ef(h))),o=xf(s,l,d==u),s=0,++d}}++s,++i}return r.join("")},Rf=be,Df=Us,Tf=Sr,If=Mn,Of=uf,Pf=Qt.exports,Cf=Bu,Lf=ba,Uf=Eo,Mf=kn,jf=Ku,Gf=Ge,Bf=W,qf=Os,Nf=be,Ff=se,Vf=ra,Wf=Re,Kf=function(e){var t=Df(e);if("function"!=typeof t)throw TypeError(String(e)+" is not iterable");return Rf(t.call(e))},Hf=Us,zf=et,$f=If("fetch"),Qf=If("Headers"),Yf=zf("iterator"),Jf=Mf.set,Xf=Mf.getterFor("URLSearchParams"),Zf=Mf.getterFor("URLSearchParamsIterator"),ep=/\+/g,tp=Array(4),np=function(e){return tp[e-1]||(tp[e-1]=RegExp("((?:%[\\da-f]{2}){"+e+"})","gi"))},rp=function(e){try{return decodeURIComponent(e)}catch(t){return e}},ap=function(e){var t=e.replace(ep," "),n=4;try{return decodeURIComponent(t)}catch(e){for(;n;)t=t.replace(np(n--),rp);return t}},ip=/[!'()~]|%20/g,sp={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},op=function(e){return sp[e]},up=function(e){return encodeURIComponent(e).replace(ip,op)},dp=function(e,t){if(t)for(var n,r,a=t.split("&"),i=0;i<a.length;)(n=a[i++]).length&&(r=n.split("="),e.push({key:ap(r.shift()),value:ap(r.join("="))}))},cp=function(e){this.entries.length=0,dp(this.entries,e)},lp=function(e,t){if(e<t)throw TypeError("Not enough arguments")},hp=Uf((function(e,t){Jf(this,{type:"URLSearchParamsIterator",iterator:Kf(Xf(e).entries),kind:t})}),"Iterator",(function(){var e=Zf(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})),fp=function(){jf(this,fp,"URLSearchParams");var e,t,n,r,a,i,s,o,u,d=arguments.length>0?arguments[0]:void 0,c=this,l=[];if(Jf(c,{type:"URLSearchParams",entries:l,updateURL:function(){},updateSearchParams:cp}),void 0!==d)if(Ff(d))if("function"==typeof(e=Hf(d)))for(n=(t=e.call(d)).next;!(r=n.call(t)).done;){if((s=(i=(a=Kf(Nf(r.value))).next).call(a)).done||(o=i.call(a)).done||!i.call(a).done)throw TypeError("Expected sequence with length 2");l.push({key:s.value+"",value:o.value+""})}else for(u in d)Gf(d,u)&&l.push({key:u,value:d[u]+""});else dp(l,"string"==typeof d?"?"===d.charAt(0)?d.slice(1):d:d+"")},pp=fp.prototype;Cf(pp,{append:function(e,t){lp(arguments.length,2);var n=Xf(this);n.entries.push({key:e+"",value:t+""}),n.updateURL()},delete:function(e){lp(arguments.length,1);for(var t=Xf(this),n=t.entries,r=e+"",a=0;a<n.length;)n[a].key===r?n.splice(a,1):a++;t.updateURL()},get:function(e){lp(arguments.length,1);for(var t=Xf(this).entries,n=e+"",r=0;r<t.length;r++)if(t[r].key===n)return t[r].value;return null},getAll:function(e){lp(arguments.length,1);for(var t=Xf(this).entries,n=e+"",r=[],a=0;a<t.length;a++)t[a].key===n&&r.push(t[a].value);return r},has:function(e){lp(arguments.length,1);for(var t=Xf(this).entries,n=e+"",r=0;r<t.length;)if(t[r++].key===n)return!0;return!1},set:function(e,t){lp(arguments.length,1);for(var n,r=Xf(this),a=r.entries,i=!1,s=e+"",o=t+"",u=0;u<a.length;u++)(n=a[u]).key===s&&(i?a.splice(u--,1):(i=!0,n.value=o));i||a.push({key:s,value:o}),r.updateURL()},sort:function(){var e,t,n,r=Xf(this),a=r.entries,i=a.slice();for(a.length=0,n=0;n<i.length;n++){for(e=i[n],t=0;t<n;t++)if(a[t].key>e.key){a.splice(t,0,e);break}t===n&&a.push(e)}r.updateURL()},forEach:function(e){for(var t,n=Xf(this).entries,r=Bf(e,arguments.length>1?arguments[1]:void 0,3),a=0;a<n.length;)r((t=n[a++]).value,t.key,this)},keys:function(){return new hp(this,"keys")},values:function(){return new hp(this,"values")},entries:function(){return new hp(this,"entries")}},{enumerable:!0}),Pf(pp,Yf,pp.entries),Pf(pp,"toString",(function(){for(var e,t=Xf(this).entries,n=[],r=0;r<t.length;)e=t[r++],n.push(up(e.key)+"="+up(e.value));return n.join("&")}),{enumerable:!0}),Lf(fp,"URLSearchParams"),Tf({global:!0,forced:!Of},{URLSearchParams:fp}),Of||"function"!=typeof $f||"function"!=typeof Qf||Tf({global:!0,enumerable:!0,forced:!0},{fetch:function(e){var t,n,r,a=[e];return arguments.length>1&&(Ff(t=arguments[1])&&(n=t.body,"URLSearchParams"===qf(n)&&((r=t.headers?new Qf(t.headers):new Qf).has("content-type")||r.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"),t=Vf(t,{body:Wf(0,String(n)),headers:Wf(0,r)}))),a.push(t)),$f.apply(this,a)}});var mp,gp={URLSearchParams:fp,getState:Xf},vp=Sr,yp=ce,bp=uf,_p=q,wp=Kr,Ap=Qt.exports,kp=Ku,Ep=Ge,xp=yf,Sp=Ws,Rp=ro.codeAt,Dp=function(e){var t,n,r=[],a=e.toLowerCase().replace(_f,".").split(".");for(t=0;t<a.length;t++)n=a[t],r.push(bf.test(n)?"xn--"+Sf(n):n);return r.join(".")},Tp=ba,Ip=gp,Op=kn,Pp=_p.URL,Cp=Ip.URLSearchParams,Lp=Ip.getState,Up=Op.set,Mp=Op.getterFor("URL"),jp=Math.floor,Gp=Math.pow,Bp=/[A-Za-z]/,qp=/[\d+-.A-Za-z]/,Np=/\d/,Fp=/^(0x|0X)/,Vp=/^[0-7]+$/,Wp=/^\d+$/,Kp=/^[\dA-Fa-f]+$/,Hp=/[\u0000\u0009\u000A\u000D #%/:?@[\\]]/,zp=/[\u0000\u0009\u000A\u000D #/:?@[\\]]/,$p=/^[\u0000-\u001F ]+|[\u0000-\u001F ]+$/g,Qp=/[\u0009\u000A\u000D]/g,Yp=function(e,t){var n,r,a;if("["==t.charAt(0)){if("]"!=t.charAt(t.length-1))return"Invalid host";if(!(n=Xp(t.slice(1,-1))))return"Invalid host";e.host=n}else if(sm(e)){if(t=Dp(t),Hp.test(t))return"Invalid host";if(null===(n=Jp(t)))return"Invalid host";e.host=n}else{if(zp.test(t))return"Invalid host";for(n="",r=Sp(t),a=0;a<r.length;a++)n+=am(r[a],em);e.host=n}},Jp=function(e){var t,n,r,a,i,s,o,u=e.split(".");if(u.length&&""==u[u.length-1]&&u.pop(),(t=u.length)>4)return e;for(n=[],r=0;r<t;r++){if(""==(a=u[r]))return e;if(i=10,a.length>1&&"0"==a.charAt(0)&&(i=Fp.test(a)?16:8,a=a.slice(8==i?1:2)),""===a)s=0;else{if(!(10==i?Wp:8==i?Vp:Kp).test(a))return e;s=parseInt(a,i)}n.push(s)}for(r=0;r<t;r++)if(s=n[r],r==t-1){if(s>=Gp(256,5-t))return null}else if(s>255)return null;for(o=n.pop(),r=0;r<n.length;r++)o+=n[r]*Gp(256,3-r);return o},Xp=function(e){var t,n,r,a,i,s,o,u=[0,0,0,0,0,0,0,0],d=0,c=null,l=0,h=function(){return e.charAt(l)};if(":"==h()){if(":"!=e.charAt(1))return;l+=2,c=++d}for(;h();){if(8==d)return;if(":"!=h()){for(t=n=0;n<4&&Kp.test(h());)t=16*t+parseInt(h(),16),l++,n++;if("."==h()){if(0==n)return;if(l-=n,d>6)return;for(r=0;h();){if(a=null,r>0){if(!("."==h()&&r<4))return;l++}if(!Np.test(h()))return;for(;Np.test(h());){if(i=parseInt(h(),10),null===a)a=i;else{if(0==a)return;a=10*a+i}if(a>255)return;l++}u[d]=256*u[d]+a,2!=++r&&4!=r||d++}if(4!=r)return;break}if(":"==h()){if(l++,!h())return}else if(h())return;u[d++]=t}else{if(null!==c)return;l++,c=++d}}if(null!==c)for(s=d-c,d=7;0!=d&&s>0;)o=u[d],u[d--]=u[c+s-1],u[c+--s]=o;else if(8!=d)return;return u},Zp=function(e){var t,n,r,a;if("number"==typeof e){for(t=[],n=0;n<4;n++)t.unshift(e%256),e=jp(e/256);return t.join(".")}if("object"==typeof e){for(t="",r=function(e){for(var t=null,n=1,r=null,a=0,i=0;i<8;i++)0!==e[i]?(a>n&&(t=r,n=a),r=null,a=0):(null===r&&(r=i),++a);return a>n&&(t=r,n=a),t}(e),n=0;n<8;n++)a&&0===e[n]||(a&&(a=!1),r===n?(t+=n?":":"::",a=!0):(t+=e[n].toString(16),n<7&&(t+=":")));return"["+t+"]"}return e},em={},tm=xp({},em,{" ":1,'"':1,"<":1,">":1,"`":1}),nm=xp({},tm,{"#":1,"?":1,"{":1,"}":1}),rm=xp({},nm,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),am=function(e,t){var n=Rp(e,0);return n>32&&n<127&&!Ep(t,e)?e:encodeURIComponent(e)},im={ftp:21,file:null,http:80,https:443,ws:80,wss:443},sm=function(e){return Ep(im,e.scheme)},om=function(e){return""!=e.username||""!=e.password},um=function(e){return!e.host||e.cannotBeABaseURL||"file"==e.scheme},dm=function(e,t){var n;return 2==e.length&&Bp.test(e.charAt(0))&&(":"==(n=e.charAt(1))||!t&&"|"==n)},cm=function(e){var t;return e.length>1&&dm(e.slice(0,2))&&(2==e.length||"/"===(t=e.charAt(2))||"\\"===t||"?"===t||"#"===t)},lm=function(e){var t=e.path,n=t.length;!n||"file"==e.scheme&&1==n&&dm(t[0],!0)||t.pop()},hm=function(e){return"."===e||"%2e"===e.toLowerCase()},fm={},pm={},mm={},gm={},vm={},ym={},bm={},_m={},wm={},Am={},km={},Em={},xm={},Sm={},Rm={},Dm={},Tm={},Im={},Om={},Pm={},Cm={},Lm=function(e,t,n,r){var a,i,s,o,u,d=n||fm,c=0,l="",h=!1,f=!1,p=!1;for(n||(e.scheme="",e.username="",e.password="",e.host=null,e.port=null,e.path=[],e.query=null,e.fragment=null,e.cannotBeABaseURL=!1,t=t.replace($p,"")),t=t.replace(Qp,""),a=Sp(t);c<=a.length;){switch(i=a[c],d){case fm:if(!i||!Bp.test(i)){if(n)return"Invalid scheme";d=mm;continue}l+=i.toLowerCase(),d=pm;break;case pm:if(i&&(qp.test(i)||"+"==i||"-"==i||"."==i))l+=i.toLowerCase();else{if(":"!=i){if(n)return"Invalid scheme";l="",d=mm,c=0;continue}if(n&&(sm(e)!=Ep(im,l)||"file"==l&&(om(e)||null!==e.port)||"file"==e.scheme&&!e.host))return;if(e.scheme=l,n)return void(sm(e)&&im[e.scheme]==e.port&&(e.port=null));l="","file"==e.scheme?d=Sm:sm(e)&&r&&r.scheme==e.scheme?d=gm:sm(e)?d=_m:"/"==a[c+1]?(d=vm,c++):(e.cannotBeABaseURL=!0,e.path.push(""),d=Om)}break;case mm:if(!r||r.cannotBeABaseURL&&"#"!=i)return"Invalid scheme";if(r.cannotBeABaseURL&&"#"==i){e.scheme=r.scheme,e.path=r.path.slice(),e.query=r.query,e.fragment="",e.cannotBeABaseURL=!0,d=Cm;break}d="file"==r.scheme?Sm:ym;continue;case gm:if("/"!=i||"/"!=a[c+1]){d=ym;continue}d=wm,c++;break;case vm:if("/"==i){d=Am;break}d=Im;continue;case ym:if(e.scheme=r.scheme,i==mp)e.username=r.username,e.password=r.password,e.host=r.host,e.port=r.port,e.path=r.path.slice(),e.query=r.query;else if("/"==i||"\\"==i&&sm(e))d=bm;else if("?"==i)e.username=r.username,e.password=r.password,e.host=r.host,e.port=r.port,e.path=r.path.slice(),e.query="",d=Pm;else{if("#"!=i){e.username=r.username,e.password=r.password,e.host=r.host,e.port=r.port,e.path=r.path.slice(),e.path.pop(),d=Im;continue}e.username=r.username,e.password=r.password,e.host=r.host,e.port=r.port,e.path=r.path.slice(),e.query=r.query,e.fragment="",d=Cm}break;case bm:if(!sm(e)||"/"!=i&&"\\"!=i){if("/"!=i){e.username=r.username,e.password=r.password,e.host=r.host,e.port=r.port,d=Im;continue}d=Am}else d=wm;break;case _m:if(d=wm,"/"!=i||"/"!=l.charAt(c+1))continue;c++;break;case wm:if("/"!=i&&"\\"!=i){d=Am;continue}break;case Am:if("@"==i){h&&(l="%40"+l),h=!0,s=Sp(l);for(var m=0;m<s.length;m++){var g=s[m];if(":"!=g||p){var v=am(g,rm);p?e.password+=v:e.username+=v}else p=!0}l=""}else if(i==mp||"/"==i||"?"==i||"#"==i||"\\"==i&&sm(e)){if(h&&""==l)return"Invalid authority";c-=Sp(l).length+1,l="",d=km}else l+=i;break;case km:case Em:if(n&&"file"==e.scheme){d=Dm;continue}if(":"!=i||f){if(i==mp||"/"==i||"?"==i||"#"==i||"\\"==i&&sm(e)){if(sm(e)&&""==l)return"Invalid host";if(n&&""==l&&(om(e)||null!==e.port))return;if(o=Yp(e,l))return o;if(l="",d=Tm,n)return;continue}"["==i?f=!0:"]"==i&&(f=!1),l+=i}else{if(""==l)return"Invalid host";if(o=Yp(e,l))return o;if(l="",d=xm,n==Em)return}break;case xm:if(!Np.test(i)){if(i==mp||"/"==i||"?"==i||"#"==i||"\\"==i&&sm(e)||n){if(""!=l){var y=parseInt(l,10);if(y>65535)return"Invalid port";e.port=sm(e)&&y===im[e.scheme]?null:y,l=""}if(n)return;d=Tm;continue}return"Invalid port"}l+=i;break;case Sm:if(e.scheme="file","/"==i||"\\"==i)d=Rm;else{if(!r||"file"!=r.scheme){d=Im;continue}if(i==mp)e.host=r.host,e.path=r.path.slice(),e.query=r.query;else if("?"==i)e.host=r.host,e.path=r.path.slice(),e.query="",d=Pm;else{if("#"!=i){cm(a.slice(c).join(""))||(e.host=r.host,e.path=r.path.slice(),lm(e)),d=Im;continue}e.host=r.host,e.path=r.path.slice(),e.query=r.query,e.fragment="",d=Cm}}break;case Rm:if("/"==i||"\\"==i){d=Dm;break}r&&"file"==r.scheme&&!cm(a.slice(c).join(""))&&(dm(r.path[0],!0)?e.path.push(r.path[0]):e.host=r.host),d=Im;continue;case Dm:if(i==mp||"/"==i||"\\"==i||"?"==i||"#"==i){if(!n&&dm(l))d=Im;else if(""==l){if(e.host="",n)return;d=Tm}else{if(o=Yp(e,l))return o;if("localhost"==e.host&&(e.host=""),n)return;l="",d=Tm}continue}l+=i;break;case Tm:if(sm(e)){if(d=Im,"/"!=i&&"\\"!=i)continue}else if(n||"?"!=i)if(n||"#"!=i){if(i!=mp&&(d=Im,"/"!=i))continue}else e.fragment="",d=Cm;else e.query="",d=Pm;break;case Im:if(i==mp||"/"==i||"\\"==i&&sm(e)||!n&&("?"==i||"#"==i)){if(".."===(u=(u=l).toLowerCase())||"%2e."===u||".%2e"===u||"%2e%2e"===u?(lm(e),"/"==i||"\\"==i&&sm(e)||e.path.push("")):hm(l)?"/"==i||"\\"==i&&sm(e)||e.path.push(""):("file"==e.scheme&&!e.path.length&&dm(l)&&(e.host&&(e.host=""),l=l.charAt(0)+":"),e.path.push(l)),l="","file"==e.scheme&&(i==mp||"?"==i||"#"==i))for(;e.path.length>1&&""===e.path[0];)e.path.shift();"?"==i?(e.query="",d=Pm):"#"==i&&(e.fragment="",d=Cm)}else l+=am(i,nm);break;case Om:"?"==i?(e.query="",d=Pm):"#"==i?(e.fragment="",d=Cm):i!=mp&&(e.path[0]+=am(i,em));break;case Pm:n||"#"!=i?i!=mp&&("'"==i&&sm(e)?e.query+="%27":e.query+="#"==i?"%23":am(i,em)):(e.fragment="",d=Cm);break;case Cm:i!=mp&&(e.fragment+=am(i,tm))}c++}},Um=function(e){var t,n,r=kp(this,Um,"URL"),a=arguments.length>1?arguments[1]:void 0,i=String(e),s=Up(r,{type:"URL"});if(void 0!==a)if(a instanceof Um)t=Mp(a);else if(n=Lm(t={},String(a)))throw TypeError(n);if(n=Lm(s,i,null,t))throw TypeError(n);var o=s.searchParams=new Cp,u=Lp(o);u.updateSearchParams(s.query),u.updateURL=function(){s.query=String(o)||null},yp||(r.href=jm.call(r),r.origin=Gm.call(r),r.protocol=Bm.call(r),r.username=qm.call(r),r.password=Nm.call(r),r.host=Fm.call(r),r.hostname=Vm.call(r),r.port=Wm.call(r),r.pathname=Km.call(r),r.search=Hm.call(r),r.searchParams=zm.call(r),r.hash=$m.call(r))},Mm=Um.prototype,jm=function(){var e=Mp(this),t=e.scheme,n=e.username,r=e.password,a=e.host,i=e.port,s=e.path,o=e.query,u=e.fragment,d=t+":";return null!==a?(d+="//",om(e)&&(d+=n+(r?":"+r:"")+"@"),d+=Zp(a),null!==i&&(d+=":"+i)):"file"==t&&(d+="//"),d+=e.cannotBeABaseURL?s[0]:s.length?"/"+s.join("/"):"",null!==o&&(d+="?"+o),null!==u&&(d+="#"+u),d},Gm=function(){var e=Mp(this),t=e.scheme,n=e.port;if("blob"==t)try{return new URL(t.path[0]).origin}catch(e){return"null"}return"file"!=t&&sm(e)?t+"://"+Zp(e.host)+(null!==n?":"+n:""):"null"},Bm=function(){return Mp(this).scheme+":"},qm=function(){return Mp(this).username},Nm=function(){return Mp(this).password},Fm=function(){var e=Mp(this),t=e.host,n=e.port;return null===t?"":null===n?Zp(t):Zp(t)+":"+n},Vm=function(){var e=Mp(this).host;return null===e?"":Zp(e)},Wm=function(){var e=Mp(this).port;return null===e?"":String(e)},Km=function(){var e=Mp(this),t=e.path;return e.cannotBeABaseURL?t[0]:t.length?"/"+t.join("/"):""},Hm=function(){var e=Mp(this).query;return e?"?"+e:""},zm=function(){return Mp(this).searchParams},$m=function(){var e=Mp(this).fragment;return e?"#"+e:""},Qm=function(e,t){return{get:e,set:t,configurable:!0,enumerable:!0}};if(yp&&wp(Mm,{href:Qm(jm,(function(e){var t=Mp(this),n=String(e),r=Lm(t,n);if(r)throw TypeError(r);Lp(t.searchParams).updateSearchParams(t.query)})),origin:Qm(Gm),protocol:Qm(Bm,(function(e){var t=Mp(this);Lm(t,String(e)+":",fm)})),username:Qm(qm,(function(e){var t=Mp(this),n=Sp(String(e));if(!um(t)){t.username="";for(var r=0;r<n.length;r++)t.username+=am(n[r],rm)}})),password:Qm(Nm,(function(e){var t=Mp(this),n=Sp(String(e));if(!um(t)){t.password="";for(var r=0;r<n.length;r++)t.password+=am(n[r],rm)}})),host:Qm(Fm,(function(e){var t=Mp(this);t.cannotBeABaseURL||Lm(t,String(e),km)})),hostname:Qm(Vm,(function(e){var t=Mp(this);t.cannotBeABaseURL||Lm(t,String(e),Em)})),port:Qm(Wm,(function(e){var t=Mp(this);um(t)||(""==(e=String(e))?t.port=null:Lm(t,e,xm))})),pathname:Qm(Km,(function(e){var t=Mp(this);t.cannotBeABaseURL||(t.path=[],Lm(t,e+"",Tm))})),search:Qm(Hm,(function(e){var t=Mp(this);""==(e=String(e))?t.query=null:("?"==e.charAt(0)&&(e=e.slice(1)),t.query="",Lm(t,e,Pm)),Lp(t.searchParams).updateSearchParams(t.query)})),searchParams:Qm(zm),hash:Qm($m,(function(e){var t=Mp(this);""!=(e=String(e))?("#"==e.charAt(0)&&(e=e.slice(1)),t.fragment="",Lm(t,e,Cm)):t.fragment=null}))}),Ap(Mm,"toJSON",(function(){return jm.call(this)}),{enumerable:!0}),Ap(Mm,"toString",(function(){return jm.call(this)}),{enumerable:!0}),Pp){var Ym=Pp.createObjectURL,Jm=Pp.revokeObjectURL;Ym&&Ap(Um,"createObjectURL",(function(e){return Ym.apply(Pp,arguments)})),Jm&&Ap(Um,"revokeObjectURL",(function(e){return Jm.apply(Pp,arguments)}))}Tp(Um,"URL"),vp({global:!0,forced:!bp,sham:!yp},{URL:Um});var Xm=Hn.includes,Zm=lu;Sr({target:"Array",proto:!0,forced:!wt("indexOf",{ACCESSORS:!0,1:0})},{includes:function(e){return Xm(this,e,arguments.length>1?arguments[1]:void 0)}}),Zm("includes");var eg=jl,tg=J;Sr({target:"String",proto:!0,forced:!Bl("includes")},{includes:function(e){return!!~String(tg(this)).indexOf(eg(e),arguments.length>1?arguments[1]:void 0)}});var ng=Dh,rg=Ul,ag=be,ig=J,sg=sd,og=Kh,ug=ie,dg=Ph,cg=gh,lg=K,hg=[].push,fg=Math.min,pg=!lg((function(){return!RegExp(4294967295,"y")}));function mg(e){var t=this,n={},r=(null==e?void 0:e._ancestor_origins)||window.location.ancestorOrigins,a=(null==e?void 0:e.self_url)||window.location.href,i=(null==e?void 0:e.self_origin)||window.location.origin,s=(null==e?void 0:e.referrer_url)||document.referrer;function o(e){return P.default(n,e)}function u(e,t){return C.default(n,e,t)}function d(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(e&&""!==e)try{return new T.default(e,t)}catch(e){console.log(e)}}function c(){for(var t=(null==e?void 0:e.urls)||[a,s],n=0;n<t.length;n++){var r,i=d(t[n]);if(i){var o=null===(r=i.query)||void 0===r?void 0:r.gd_sdk_referrer_url;if(o&&(o=decodeURIComponent(o),I.default.isURL(o)))return o}}}return function(){var e;k.default(this,t),function(){var e=0,t=window;try{for(;t!=t.parent;)e++,t=t.parent}catch(e){u("depth.error",e.message)}u("depth.value",e)}(),function(){var e=r,t=n.depth.value,a=i;if(u("top.domain.from","fallback"),e&&e.length>0)a=e[e.length-1],u("top.domain.from","origins");else if(0===t)a=i,u("top.domain.from","self-top");else if(1===t){var o=d(s);o&&(a=o.origin,u("top.domain.from","referrer"))}u("top.domain.value",a.replace(/^https?:\/\/(www\.)?(.*)$/i,"$2"))}(),function(){var e=c();if(e)if(O.default(e))u("partner.domain.value",e),u("partner.domain.from","partner-domain");else{var t=d(e,!1);if(t)u("partner.domain.value",t.origin.replace(/^https?:\/\/(www\.)?(.*)$/i,"$2")),u("partner.domain.from","partner-url");else u("partner.domain.value",n.top.domain.value),u("partner.domain.from","partner-fallback")}else u("partner.domain.value",n.top.domain.value),u("partner.domain.from","fallback")}(),e=c(),0===n.depth.value?(u("partner.url.value",a),u("partner.url.from","self-top")):e?O.default(e)?(u("partner.url.value",a),u("partner.url.from","partner-domain")):(u("partner.url.value",e),u("partner.url.from","partner-url")):(u("partner.url.value",s),u("partner.url.from","fallback"))}.bind(this)(),{get:o,print:function(e){console.log(o(e))}}}ng("split",2,(function(e,t,n){var r;return r="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(e,n){var r=String(ig(this)),a=void 0===n?4294967295:n>>>0;if(0===a)return[];if(void 0===e)return[r];if(!rg(e))return t.call(r,e,a);for(var i,s,o,u=[],d=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),c=0,l=new RegExp(e.source,d+"g");(i=cg.call(l,r))&&!((s=l.lastIndex)>c&&(u.push(r.slice(c,i.index)),i.length>1&&i.index<r.length&&hg.apply(u,i.slice(1)),o=i[0].length,c=s,u.length>=a));)l.lastIndex===i.index&&l.lastIndex++;return c===r.length?!o&&l.test("")||u.push(""):u.push(r.slice(c)),u.length>a?u.slice(0,a):u}:"0".split(void 0,0).length?function(e,n){return void 0===e&&0===n?[]:t.call(this,e,n)}:t,[function(t,n){var a=ig(this),i=null==t?void 0:t[e];return void 0!==i?i.call(t,a,n):r.call(String(a),t,n)},function(e,a){var i=n(r,e,this,a,r!==t);if(i.done)return i.value;var s=ag(e),o=String(this),u=sg(s,RegExp),d=s.unicode,c=(s.ignoreCase?"i":"")+(s.multiline?"m":"")+(s.unicode?"u":"")+(pg?"y":"g"),l=new u(pg?s:"^(?:"+s.source+")",c),h=void 0===a?4294967295:a>>>0;if(0===h)return[];if(0===o.length)return null===dg(l,o)?[o]:[];for(var f=0,p=0,m=[];p<o.length;){l.lastIndex=pg?p:0;var g,v=dg(l,pg?o:o.slice(p));if(null===v||(g=fg(ug(l.lastIndex+(pg?0:p)),o.length))===f)p=og(o,p,d);else{if(m.push(o.slice(f,p)),m.length===h)return m;for(var y=1;y<=v.length-1;y++)if(m.push(v[y]),m.length===h)return m;p=f=g}}return m.push(o.slice(f)),m}]}),!pg);var gg="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==gg&&gg,vg="URLSearchParams"in gg,yg="Symbol"in gg&&"iterator"in Symbol,bg="FileReader"in gg&&"Blob"in gg&&function(){try{return new Blob,!0}catch(e){return!1}}(),_g="FormData"in gg,wg="ArrayBuffer"in gg;if(wg)var Ag=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],kg=ArrayBuffer.isView||function(e){return e&&Ag.indexOf(Object.prototype.toString.call(e))>-1};function Eg(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||""===e)throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function xg(e){return"string"!=typeof e&&(e=String(e)),e}function Sg(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return yg&&(t[Symbol.iterator]=function(){return t}),t}function Rg(e){this.map={},e instanceof Rg?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 Dg(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function Tg(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function Ig(e){var t=new FileReader,n=Tg(t);return t.readAsArrayBuffer(e),n}function Og(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function Pg(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:bg&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:_g&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:vg&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():wg&&bg&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=Og(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):wg&&(ArrayBuffer.prototype.isPrototypeOf(e)||kg(e))?this._bodyArrayBuffer=Og(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):vg&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},bg&&(this.blob=function(){var e=Dg(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=Dg(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(Ig)}),this.text=function(){var e=Dg(this);if(e)return e;if(this._bodyBlob)return function(e){var t=new FileReader,n=Tg(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)},_g&&(this.formData=function(){return this.text().then(Ug)}),this.json=function(){return this.text().then(JSON.parse)},this}Rg.prototype.append=function(e,t){e=Eg(e),t=xg(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},Rg.prototype.delete=function(e){delete this.map[Eg(e)]},Rg.prototype.get=function(e){return e=Eg(e),this.has(e)?this.map[e]:null},Rg.prototype.has=function(e){return this.map.hasOwnProperty(Eg(e))},Rg.prototype.set=function(e,t){this.map[Eg(e)]=xg(t)},Rg.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},Rg.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),Sg(e)},Rg.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),Sg(e)},Rg.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),Sg(e)},yg&&(Rg.prototype[Symbol.iterator]=Rg.prototype.entries);var Cg=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function Lg(e,t){if(!(this instanceof Lg))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var n,r,a=(t=t||{}).body;if(e instanceof Lg){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new Rg(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,a||null==e._bodyInit||(a=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 Rg(t.headers)),this.method=(n=t.method||this.method||"GET",r=n.toUpperCase(),Cg.indexOf(r)>-1?r:n),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&a)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(a),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==t.cache&&"no-cache"!==t.cache)){var i=/([?&])_=[^&]*/;if(i.test(this.url))this.url=this.url.replace(i,"$1_="+(new Date).getTime());else{this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}}function Ug(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),a=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(a))}})),t}function Mg(e,t){if(!(this instanceof Mg))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="statusText"in t?t.statusText:"",this.headers=new Rg(t.headers),this.url=t.url||"",this._initBody(e)}Lg.prototype.clone=function(){return new Lg(this,{body:this._bodyInit})},Pg.call(Lg.prototype),Pg.call(Mg.prototype),Mg.prototype.clone=function(){return new Mg(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new Rg(this.headers),url:this.url})},Mg.error=function(){var e=new Mg(null,{status:0,statusText:""});return e.type="error",e};var jg=[301,302,303,307,308];Mg.redirect=function(e,t){if(-1===jg.indexOf(t))throw new RangeError("Invalid status code");return new Mg(null,{status:t,headers:{location:e}})};var Gg,Bg=gg.DOMException;try{new Bg}catch(e){(Bg=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack}).prototype=Object.create(Error.prototype),Bg.prototype.constructor=Bg}function qg(e,t){return new Promise((function(n,r){var a=new Lg(e,t);if(a.signal&&a.signal.aborted)return r(new Bg("Aborted","AbortError"));var i=new XMLHttpRequest;function s(){i.abort()}i.onload=function(){var e,t,r={status:i.status,statusText:i.statusText,headers:(e=i.getAllResponseHeaders()||"",t=new Rg,e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(e){var n=e.split(":"),r=n.shift().trim();if(r){var a=n.join(":").trim();t.append(r,a)}})),t)};r.url="responseURL"in i?i.responseURL:r.headers.get("X-Request-URL");var a="response"in i?i.response:i.responseText;setTimeout((function(){n(new Mg(a,r))}),0)},i.onerror=function(){setTimeout((function(){r(new TypeError("Network request failed"))}),0)},i.ontimeout=function(){setTimeout((function(){r(new TypeError("Network request failed"))}),0)},i.onabort=function(){setTimeout((function(){r(new Bg("Aborted","AbortError"))}),0)},i.open(a.method,function(e){try{return""===e&&gg.location.href?gg.location.href:e}catch(t){return e}}(a.url),!0),"include"===a.credentials?i.withCredentials=!0:"omit"===a.credentials&&(i.withCredentials=!1),"responseType"in i&&(bg?i.responseType="blob":wg&&a.headers.get("Content-Type")&&-1!==a.headers.get("Content-Type").indexOf("application/octet-stream")&&(i.responseType="arraybuffer")),!t||"object"!=typeof t.headers||t.headers instanceof Rg?a.headers.forEach((function(e,t){i.setRequestHeader(t,e)})):Object.getOwnPropertyNames(t.headers).forEach((function(e){i.setRequestHeader(e,xg(t.headers[e]))})),a.signal&&(a.signal.addEventListener("abort",s),i.onreadystatechange=function(){4===i.readyState&&a.signal.removeEventListener("abort",s)}),i.send(void 0===a._bodyInit?null:a._bodyInit)}))}qg.polyfill=!0,gg.fetch||(gg.fetch=qg,gg.Headers=Rg,gg.Request=Lg,gg.Response=Mg);var Ng,Fg=function(e){var t=this;if(!Gg){var n={gameId:e.gameId,hours:(new Date).getHours(),topDomain:Fh.topDomain,domain:Fh.parentDomain,referrer:Fh.parentURL,depth:a.getIframeDepth(),version:Ur.version,byloader:Fh.isTokenGameURL,isTokenGameURL:Fh.isTokenGameURL,isMasterGameURL:Fh.isMasterGameURL,isExtHostedGameURL:Fh.isExtHostedGameURL,byloaderVersion:Fh.version,tracking:Vh.userDeclinedTracking,whitelabel:Vh.whitelabelPartner,platform:a.getMobilePlatform()};Gg=new a.MessageRouter(n)}return Gg||{send:function(){k.default(this,t)}.bind(this)}},Vg={getGameData:function(e){var t=this;try{var n=e.replace("game.api.gamedistribution.com","game-api.gamedistribution.com");fetch(n).then(function(e){k.default(this,t)}.bind(this)).catch(function(e){k.default(this,t)}.bind(this))}catch(e){}}};var Wg,Kg,Hg=[],zg=function(e){Hg.push(e)},$g=function(){var e=A.default(x.default.mark((function e(){return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(Wg){e.next=5;break}return e.next=3,Jg(Kg);case 3:Wg=e.sent,Qg();case 5:return e.abrupt("return",Wg);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Qg=function(){var e,t;if(null!==(e=Wg)&&void 0!==e&&null!==(t=e.aws_tst)&&void 0!==t&&t.enabled){var n,r,a,i,s;if(Yg(),null!==(n=Wg)&&void 0!==n&&null!==(r=n.aws_tst)&&void 0!==r&&null!==(a=r.ep)&&void 0!==a&&a.api&&null!==(i=Wg)&&void 0!==i&&i.url)Vg.getGameData(null===(s=Wg)||void 0===s?void 0:s.url);setInterval(A.default(x.default.mark((function e(){var t;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Jg(Kg);case 3:Wg=e.sent,null===(t=Wg)||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)}},Yg=function(){var e=window.fetch;window.fetch=A.default(x.default.mark((function t(){var n,r,a,i,s,o,u,d,c,l,h,f,p,m,g,v,y,b,_,w=this,A=arguments;return x.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(u=A.length,d=new Array(u),c=0;c<u;c++)d[c]=A[c];l=d[0],h=d[1],f=null===(n=Wg)||void 0===n||null===(r=n.aws_tst)||void 0===r||null===(a=r.ep)||void 0===a?void 0:a.atm,p=null===(i=Wg)||void 0===i||null===(s=i.aws_tst)||void 0===s||null===(o=s.ep)||void 0===o?void 0:o.msgrt,m=function(t,n){var r=this;k.default(this,w);var a=l.replace(t,n);e(a,h).then(function(){k.default(this,r)}.bind(this))}.bind(this);try{f&&l.indexOf("tag.atom")>0&&m("tag.atom.gamedistribution.com","atom-tag-prod-aws.gamedistribution.com"),p&&l.indexOf("msgrt.gamedistribution.com")>0&&(null===(g=Wg)||void 0===g||g.aws_tst,null===(v=Wg)||void 0===v||null===(y=v.aws_tst)||void 0===y||null===(b=y.ep)||void 0===b||b.msgrt,m("msgrt.gamedistribution.com","msgrt-prod-aws.gamedistribution.com"))}catch(e){}return t.next=9,e(l,h);case 9:return _=t.sent,t.abrupt("return",_);case 11:case"end":return t.stop()}}),t,this)})))},Jg=function(e){var t=this;Ng.send("gdfw.loading",{message:"loading"}),Hg=[],zg("1"),zg("2");var n=new mg;zg("3");var r=n.get("partner.domain.value");zg("4");var i=function(){return k.default(this,t),{gameId:e.gameId,disableAds:{},preroll:!0,midroll:12e4,rewardedAds:!1,title:"",tags:[],category:"",assets:[],dmain:!0,sdk:{},loader:{},splash:{},promo:{},dAds:{},pAds:{},mAds:{},rAds:{}}}.bind(this);zg("5");var s=function(){k.default(this,t);var n=o(),a=n?"&mode=".concat(n):"";return"https://game.api.gamedistribution.com/game/v4/get/".concat(e.gameId.replace(/-/g,""),"/?domain=").concat(r).concat(a,"&v=").concat(Ur.version,"&localTime=").concat((new Date).getHours())}.bind(this);zg("6");var o=function(){var e=this;k.default(this,t);var n=new Proxy(new URLSearchParams(window.location.search),{get:function(t,n){return k.default(this,e),t.get(n)}.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 zg("7"),new Promise(function(e){var n=this;k.default(this,t),zg("7.1");var r=i();try{zg("7.2");var o=s();zg("7.3"),fetch(o).then(function(e){return k.default(this,n),zg("7.4"),e.json()}.bind(this)).then(function(t){var i=this;if(k.default(this,n),zg("7.5"),t.success){var s,u,d,c=t.result.game;zg("7.6");var l={gameId:c.gameMd5,slug:c.slug,pname:c.pname,dname:c.dname,status:c.status,description:c.description,disableAds:c.enableAds,preroll:c.preRoll,midroll:6e4*c.timeAds,rewardedAds:c.rewardedAds,title:c.title,tags:c.tags,category:c.category,assets:c.assets,disp_2nd_prer:c.disp_2nd_prer,ctry_vst:c.ctry_vst,ctry:c.ctry,crtv:c.crtv,dmain:c.dmain,aws_tst:c.aws_tst,__t4r:Mr(c.__t4r)||{},block_exts:Mr(c.push_cuda),bloc_gard:Mr(c.bloc_gard),cookie:Mr(c.cookie),gdpr:Mr(c.gdpr),diagnostic:Mr(c.diagnostic),cmp:Mr(c.cmp),gft:Mr(c.gft)||{},sdk:Mr(c.sdk)||{},sdkfw:Mr(c.sdkfw)||{},loader:Mr(c.loader)||{},splash:Mr(c.splash)||{},promo:Mr(c.promo)||{},dAds:Mr(c.dads)||{},pAds:Mr(c.pads)||{},mAds:Mr(c.mads)||{},rAds:Mr(c.rads)||{},lp:Mr(c.lp)||{},extsc:Mr(c.extsc)||{},evnts:Mr(c.evnts)||{},dp:Mr(c.dp)||{},adflw:Mr(c.adflw)||{}};zg("7.7");var h=a.extendDefaults(L.default(r),l);zg("7.8"),h.afg_disabled=!1===(null===(s=h.sdk)||void 0===s||null===(u=s.afg)||void 0===u?void 0:u.enabled),h.url=o,function(){k.default(this,i)}.bind(this),zg("7.9"),null!==(d=h.pAds)&&void 0!==d&&d.enabled&&(h.preroll=!0),zg("7.10"),Ng.send("gdfw.success",{message:"success"}),e(h)}else{r.failed=!0;var f=Hg[Hg.length-1];Ng.send("gdfw.err",{message:"".concat(f,": json error")}),e(r)}}.bind(this)).catch(function(t){k.default(this,n);var a=Hg[Hg.length-1];Ng.send("gdfw.err",{message:"".concat(a,": ").concat(t.message?t.message:t)}),r.failed=!0,e(r)}.bind(this))}catch(t){var u=Hg[Hg.length-1];Ng.send("gdfw.err",{message:"".concat(u,": global ").concat(t.message?t.message:t)}),r.failed=!0,e(r)}}.bind(this))},Xg=function(){var e=A.default(x.default.mark((function e(){var t,n;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,$g();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 e.apply(this,arguments)}}(),Zg=function(){var e=A.default(x.default.mark((function e(){var t,n;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,$g();case 2:return n=e.sent,e.next=5,Xg();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 e.apply(this,arguments)}}(),ev=function(){var e=A.default(x.default.mark((function e(){var t,n,r,a,i,s,o,u;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,$g();case 2:return o=e.sent,u=!(null==o||null===(t=o.extsc)||void 0===t||!t.enabled),e.abrupt("return",{enabled:u,path:u?null==o||null===(n=o.extsc)||void 0===n?void 0:n.path:"",name:u?null==o||null===(r=o.extsc)||void 0===r?void 0:r.name:"",ref:u?null==o||null===(a=o.extsc)||void 0===a?void 0:a.ref:"",loadedFlag:u?null==o||null===(i=o.extsc)||void 0===i?void 0:i.loadedFlag:void 0,loadedFlagCheck:!!u&&!(null==o||null===(s=o.extsc)||void 0===s||!s.loadedFlagCheck)});case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),tv=function(){var e=A.default(x.default.mark((function e(){var t,n,r,i,s,o=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ev();case 2:if((t=e.sent).enabled){e.next=5;break}return e.abrupt("return");case 5:return n=t.path,r=t.name,i=t.ref,e.prev=6,s={},e.next=10,a.getScript(n,r,{error_prefix:"Blocked:",exists:function(){return k.default(this,o),!!i&&!!window[i]}.bind(this),attrs:s});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",r,e.t0),a.dankLog("DEVELOPER_ERROR",e.t0,"warning");case 16:case"end":return e.stop()}}),e,this,[[6,12]])})));return function(){return e.apply(this,arguments)}}(),nv=!1,rv=!1,av=function(){return new Promise(function(){var e=A.default(x.default.mark((function e(t,n){var r,a,i,s,o,u=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!nv){e.next=4;break}return e.abrupt("return",t(rv));case 4:nv=!0;case 5:return e.next=7,ev();case 7:if((r=e.sent).enabled){e.next=10;break}return e.abrupt("return",t(!1));case 10:if(a=r.loadedFlag,!(i=r.loadedFlagCheck)||a){e.next=13;break}return e.abrupt("return",t(!1));case 13:if(i){e.next=16;break}return rv=!0,e.abrupt("return",t(!0));case 16:s=!0,setTimeout(function(){k.default(this,u),s&&(s=!1,nv=!0,t(!1))}.bind(this),5e3),o=setInterval(function(){k.default(this,u),s&&i&&window[a]?(s=!1,nv=!0,rv=!0,clearInterval(o),t(!0)):s||clearInterval(o)}.bind(this),100);case 19:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}())},iv=function(e){var t=function(e){var t=this,n=function(e){return k.default(this,t),l("showAd",{adType:e})}.bind(this),r=function(e){return k.default(this,t),l("preloadAd",{adType:e})}.bind(this),a=function(e){return k.default(this,t),l("showDisplayAd",{options:e})}.bind(this),i=function(){return k.default(this,t),l("cancelAd")}.bind(this),s=function(){return k.default(this,t),l("openConsole")}.bind(this),o=function(){return k.default(this,t),l("showBanner")}.bind(this),u=function(){return k.default(this,t),l("session")}.bind(this),d=function(e){return k.default(this,t),l("sendGenericEvent",{options:e})}.bind(this),c=function(){k.default(this,t),console.log("_sendSDKReady")}.bind(this),l=function(e,n){var r=this;return k.default(this,t),n||(n={}),new Promise(function(t,a){k.default(this,r);try{var i={type:"gd-sdk",method:e,options:n};window.parent.postMessage(i,location.origin),t()}catch(e){console.log("gd:adp:m:s:error",e),t()}}.bind(this))}.bind(this),h=function(){k.default(this,t),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&&p(r)}),!1)}.bind(this),f=function(){k.default(this,t),h(),l("init")}.bind(this),p=function(n){k.default(this,t),e.onEvent&&e.onEvent(n)}.bind(this);return{showBanner:o,showAd:n,preloadAd:r,showDisplayAd:a,cancelAd:i,openConsole:s,getSession:u,onEvent:p,init:f,_sendSDKReady:c,sendGenericEvent:d}}(e);return t.init(),t},sv=function(){var e=this;return{isMasterGameURL:function(){k.default(this,e);return/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Fa-f0-9]{32})(.*)$/i.test(location.href)}.bind(this),isTokenGameURL:function(){k.default(this,e);return/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Za-z0-9]{8})\/(.*)$/i.test(location.href)}.bind(this),isExtHostedGameURL:function(){k.default(this,e);return/^http[s]?:\/\/.*?gd_sdk_referrer_url=.*$/i.test(location.href)}.bind(this)}},ov=function(e){var t=this;return new Promise(function(n,r){var a=this;k.default(this,t);var i={type:"gd-sdk-frame-handshake-request"},s=!1;window.addEventListener("message",(function(e){var t=e.data,r=e.origin,a=e.source,i=t.type;if("gd-sdk-frame-handshake-request"===i){var o={type:"gd-sdk-frame-handshake-response"};a.postMessage(o,r)}else"gd-sdk-frame-handshake-response"===i&&(s=!0,n({origin:r,source:a}))})),e?n():(setTimeout(function(){k.default(this,a),s||n()}.bind(this),200),window.parent!==window?window.parent.postMessage(i,"*"):n())}.bind(this))},uv=function(){var e=A.default(x.default.mark((function e(){var t,n,r,a,i,s,o,u;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Xg();case 2:return t=e.sent,n=!t,e.next=6,ov(n);case 6:if(r=e.sent,t){e.next=9;break}return e.abrupt("return",!1);case 9:return a=sv(),i=a.isMasterGameURL,s=i(),e.next=13,Zg();case 13:return o=e.sent,u=!1,u=o?!s&&!!r:!s,e.abrupt("return",u);case 17:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),dv=ce,cv=Tr,lv=qt,hv=Lt.f,fv=function(e){return function(t){for(var n,r=lv(t),a=cv(r),i=a.length,s=0,o=[];i>s;)n=a[s++],dv&&!hv.call(r,n)||o.push(e?[n,r[n]]:r[n]);return o}},pv={entries:fv(!0),values:fv(!1)}.values;Sr({target:"Object",stat:!0},{values:function(e){return pv(e)}});var mv=Sr,gv=ju,vv=K,yv=Mn,bv=sd,_v=ac,wv=Qt.exports;mv({target:"Promise",proto:!0,real:!0,forced:!!gv&&vv((function(){gv.prototype.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=bv(this,yv("Promise")),n="function"==typeof e;return this.then(n?function(n){return _v(t,e()).then((function(){return n}))}:e,n?function(n){return _v(t,e()).then((function(){throw n}))}:e)}}),"function"!=typeof gv||gv.prototype.finally||wv(gv.prototype,"finally",yv("Promise").prototype.finally);var Av=J,kv="[\t\n\v\f\r                 \u2028\u2029\ufeff]",Ev=RegExp("^"+kv+kv+"*"),xv=RegExp(kv+kv+"*$"),Sv=function(e){return function(t){var n=String(Av(t));return 1&e&&(n=n.replace(Ev,"")),2&e&&(n=n.replace(xv,"")),n}},Rv={start:Sv(1),end:Sv(2),trim:Sv(3)},Dv=K,Tv="\t\n\v\f\r                 \u2028\u2029\ufeff",Iv=Rv.trim;Sr({target:"String",proto:!0,forced:function(e){return Dv((function(){return!!Tv[e]()||"​…᠎"!="​…᠎"[e]()||Tv[e].name!==e}))}("trim")},{trim:function(){return Iv(this)}});var Ov=se,Pv=Do,Cv=ce,Lv=q,Uv=yr,Mv=function(e,t,n){var r,a;return Pv&&"function"==typeof(r=t.constructor)&&r!==n&&Ov(a=r.prototype)&&a!==n.prototype&&Pv(e,a),e},jv=le.f,Gv=jn.f,Bv=Ul,qv=Yl,Nv=ih,Fv=Qt.exports,Vv=K,Wv=kn.set,Kv=Wu,Hv=et("match"),zv=Lv.RegExp,$v=zv.prototype,Qv=/a/g,Yv=/a/g,Jv=new zv(Qv)!==Qv,Xv=Nv.UNSUPPORTED_Y;if(Cv&&Uv("RegExp",!Jv||Xv||Vv((function(){return Yv[Hv]=!1,zv(Qv)!=Qv||zv(Yv)==Yv||"/a/i"!=zv(Qv,"i")})))){for(var Zv=function(e,t){var n,r=this instanceof Zv,a=Bv(e),i=void 0===t;if(!r&&a&&e.constructor===Zv&&i)return e;Jv?a&&!i&&(e=e.source):e instanceof Zv&&(i&&(t=qv.call(e)),e=e.source),Xv&&(n=!!t&&t.indexOf("y")>-1)&&(t=t.replace(/y/g,""));var s=Mv(Jv?new zv(e,t):zv(e,t),r?this:$v,Zv);return Xv&&n&&Wv(s,{sticky:n}),s},ey=function(e){e in Zv||jv(Zv,e,{configurable:!0,get:function(){return zv[e]},set:function(t){zv[e]=t}})},ty=Gv(zv),ny=0;ty.length>ny;)ey(ty[ny++]);$v.constructor=Zv,Zv.prototype=$v,Fv(Lv,"RegExp",Zv)}Kv("RegExp");var ry=Sr,ay=ht.find,iy=lu,sy=!0,oy=wt("find");"find"in[]&&Array(1).find((function(){sy=!1})),ry({target:"Array",proto:!0,forced:sy||!oy},{find:function(e){return ay(this,e,arguments.length>1?arguments[1]:void 0)}}),iy("find");var uy=Sr,dy=qt,cy=[].join,ly=Y!=Object,hy=pt("join",",");uy({target:"Array",proto:!0,forced:ly||!hy},{join:function(e){return cy.call(dy(this),void 0===e?",":e)}});var fy=Sr,py=ht.map,my=wt,gy=Gi("map"),vy=my("map");fy({target:"Array",proto:!0,forced:!gy||!vy},{map:function(e){return py(this,e,arguments.length>1?arguments[1]:void 0)}});var yy=yf;Sr({target:"Object",stat:!0,forced:Object.assign!==yy},{assign:yy});var by=function(){function e(t){S.default(this,e),this.gameData=t,this.customParamKeys=["vid","_1ld","_1lp"]}return D.default(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 t={},n=this.gameData.diagnostic&&this.gameData.diagnostic.cp&&this.gameData.diagnostic.cp.enabled,r=new T.default(location.href,!0);for(var a in r.query)t[a]=r.query[a];return Object.keys(t).filter(function(t){var n=this;return k.default(this,e),this.customParamKeys.some(function(e){return k.default(this,n),e===t}.bind(this))}.bind(this)).length>0||n?(console.log("custom-params",t,n),t):void console.log("custom-params, none")}catch(e){console.log("_checkCustomParams.Error",e)}}}]),e}(),_y=function(){function e(t,n){S.default(this,e),this.adContainer=t,this.onResume=n}return D.default(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 t=document.createElement("div");this.adResumeButton=t,t.id="gd__resume__button",t.setAttribute("title","Resume"),this.addStyles(),t.classList.add("gd__resume__button"),t.addEventListener("click",function(){k.default(this,e),this.onResume()}.bind(this)),this.adContainer.appendChild(t);var n=document.createElement("div");this.adResumeButtonOverlay=n,n.id="gd__resume__button__overlay",n.classList.add("gd__resume__button__overlay"),this.adContainer.appendChild(n)}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}(),wy=function(e){if(!e)return!1;var t=Ay.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)},Ay=Object.prototype.toString;function ky(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 Ey(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ky(Object(n),!0).forEach((function(t){R.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ky(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function xy(e){return null!=e&&e.error_url?"<vmap:VASTAdData>".concat(function(e){return e.promo_url?'<VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper fallbackOnNoAd="true">\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="0" />\n </Extensions>\n </Wrapper>\n </Ad>\n <Ad id="promo">\n <Wrapper>\n <AdSystem>Rainbow</AdSystem>\n <Impression><![CDATA[').concat(e.promo_imp_green_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.promo_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="1" />\n </Extensions>\n </Wrapper>\n </Ad>\n </VAST>').trim():'<VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper>\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,"]]></VASTAdTagURI>\n </Wrapper>\n </Ad>\n </VAST>").trim()}(e),"</vmap:VASTAdData>").trim():'<vmap:AdTagURI templateType="vast3"><![CDATA['.concat(null==e?void 0:e.adtag_url,"]]></vmap:AdTagURI>").trim()}function Sy(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 Ry(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Sy(Object(n),!0).forEach((function(t){R.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Sy(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Dy=new b.EventEmitter,Ty=null,Iy=function(){function e(t,n,r){var i=this;if(S.default(this,e),Ty)return Ty;Ty=this;var s={debug:!1,width:640,height:360,locale:"en"};this.options=n?a.extendDefaults(s,n):s,this.prefix="gdsdk__",this.adsLoader=null,this.adsManager=null,this.adDisplayContainer=null,this.eventBus=new a.EventBus,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=r.parentDomain,this.topDomain=r.topDomain,this.parentURL=r.parentURL,this.adDisplayContainerInitialized=!1,this.IMASampleTags=a.getIMASampleTags(),this.atom_display,this.adType_="",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=""!==t?document.getElementById(t):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,u=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:u,this.category="",this.tags=[],this.eventCategory="AD",this.eventBus.subscribe("LOADED",function(){k.default(this,i),this._clearSafetyTimer("LOADED"),this._startSafetyTimer(8e3,"LOADED")}.bind(this),"ima"),this.eventBus.subscribe("STARTED",function(){k.default(this,i),this._clearSafetyTimer("STARTED")}.bind(this),"ima")}var t,n,r,i,s,o,u,c,l,h,f,p,m,v,y,b,_,w,E,I,O,P;return D.default(e,[{key:"start",value:(P=A.default(x.default.mark((function e(){var t,n,r,a=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.adSystemInitialize(A.default(x.default.mark((function e(){return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a._init_afg_script({adsense_channel:"4089988593"});case 2:case"end":return e.stop()}}),e)}))));case 3:return t=e.sent,this.afgInitSuccess=t.success,e.next=7,this.adSystemInitialize(A.default(x.default.mark((function e(){return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a._init_hl_script();case 2:return e.next=4,a._init_ima_script();case 4:a._createPlayer(),a._setUpIMA();case 6:case"end":return e.stop()}}),e)}))));case 7:if(n=e.sent,this.imaInitSuccess=n.success,r=[],this.afgInitSuccess||r.push(t.error),this.imaInitSuccess||r.push(n.error),!(r.length>0)){e.next=14;break}throw r[0];case 14:window.eventTest=function(e){k.default(this,a),this._broadcast(e,{message:"",status:"success"})}.bind(this),e.next=21;break;case 17:throw e.prev=17,e.t0=e.catch(0),Br("gd-adflow error on ads.start",e.t0),new Error(e.t0);case 21:case"end":return e.stop()}}),e,this,[[0,17]])}))),function(){return P.apply(this,arguments)})},{key:"adSystemInitialize",value:(O=A.default(x.default.mark((function e(t){var n;return x.default.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 O.apply(this,arguments)})},{key:"_getAdVast",value:function(e,t){var n=this;return new Promise(function(){var r=A.default(x.default.mark((function r(i){var s,o,u,d,c,l,h,f,p,m=this;return x.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!(a.Ls.available&&a.Ls.getBoolean("gd_debug_ex")&&a.Ls.getBoolean("gd_tag"))){r.next=6;break}return s=n.IMASampleTags[e],o=Math.floor(Math.random()*s.length),u=s[o],i({url:u}),r.abrupt("return");case 6:if(void 0!==window.idhb.requestAds){r.next=8;break}throw new Error("Prebid.js wrapper script hit an error or didn't exist!");case 8:return r.prev=8,d=n.nextAdPosition(e),console.log("GD-SDK Position",d),n._broadcast("AD_REQUEST",{message:d}),c=n.options,"preroll"===d&&g.isPlainObject(c.preroll)?c=c.preroll:"midroll"===d&&g.isPlainObject(c.midroll)?c=c.midroll:"rewarded"===d&&g.isPlainObject(c.rewarded)&&(c=c.rewarded),l="rewarded"===d?"rewardedVideo":"gdbanner"===d?"gd__banner":"midroll"===d?"midroll":"video1",r.next=17,window.idhb.isLoaded();case 17:if(h={tnl_keys:Ry(Ry({},window.idhb.getAdserverTargetingForAdSlot(l)),{},{tnl_ad_pos:d,tnl_asset_id:n.gameData.gameId})},!(t&&t.retry_on_success&&g.isPlainObject(c.retry_on_success)&&g.isPlainObject(c.retry_on_success.vast))){r.next=22;break}return r.abrupt("return",i(n._createCustomAdVastUrl(c.retry_on_success.vast,h)));case 22:if(!(t&&t.retry_on_failure&&n.options.retry_on_failure&&g.isPlainObject(c.retry_on_failure.vast))){r.next=26;break}return r.abrupt("return",i(n._createCustomAdVastUrl(c.retry_on_failure.vast,h)));case 26:if(!g.isPlainObject(c.vast)){r.next=28;break}return r.abrupt("return",i(n._createCustomAdVastUrl(c.vast,h)));case 28:return r.next=30,n._create_dp_context(d,t);case 30:f=r.sent,Gr("gd-adflow, before idhb",d,l),p=window.idhb.getAdserverTargetingForAdSlot(l),window.idhb.setAdserverTargeting(Ry(Ry({},p),{},{adaptor_order:t.adapterIndex})),window.idhb.getAdserverTargetingForAdSlot(l),window.idhb.requestAds({slots:R.default({},l,{bidFloor:null!=f&&f.floor_price?f.floor_price:void 0}),callback:function(e,t){var r=this;k.default(this,m),console.log("GD-SDK After HB..."),!f||null!=t&&t.bidFloorApplied||fetch(f.skip_url).catch(function(e){k.default(this,r)}.bind(this)),i({tnl_keys:Ry(Ry({},window.idhb.getAdserverTargetingForAdSlot(l)),{},{tnl_ad_pos:d,tnl_asset_id:n.gameData.gameId}),url:e,dp:f,hl:t})}.bind(this)}),r.next=42;break;case 39:throw r.prev=39,r.t0=r.catch(8),new Error(r.t0);case 42:case"end":return r.stop()}}),r,this,[[8,39]])})));return function(e){return r.apply(this,arguments)}}())}},{key:"nextAdPosition",value:function(e){if(e===a.AdType.Rewarded)return this.adRewardedCount++,"rewarded";if(e===a.AdType.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.AdType.Rewarded?"rewarded":e===a.AdType.Interstitial?!1===this.gameData.preroll||1===this.adPrerollCount||this.adMidrollCount>0?"midroll":"preroll":"midroll"}},{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,t){var n=this;return t=t||{},new Promise(function(r){var a=this;if(k.default(this,n),"undefined"==typeof google)throw new Error("Unable to load ad, google IMA SDK not defined.");try{var i,s=null==e||null===(i=e.tnl_keys)||void 0===i?void 0:i.tnl_ad_pos;this.adSuccess=!1;var o=new google.ima.AdsRequest,u=this._transformVast(e,t),d=Ry(Ry({},t),{},{adTag:u,tnl_ad_pos:s});this.adCounter[s]=this.adCounter[s]||0,this.adCounter[s]++;var c=e.dp,l=e.hl;this.current_dp=c,c&&(c.adtag_url=u.url,this._extend_dp_with_adsense(c,l,null==e?void 0:e.tnl_keys));var h=this._isVMAP(s);if(function(){k.default(this,a),t.shouldFail&&(c?(c.adtag_url="dp_original_broken",c.fallback_url="dp_fallback_broken"):u.url="original_broken",null==c||c.adtag_url,null==c||c.fallback_url,u.url),h=!1}.bind(this),h){var f=function(e){var t=e.position||"midroll",n=e.dp_1,r=e.dp_2,a=Date.now(),i=new T.default(e.adtag_url_1,!0);i.query=Ey(Ey({},i.query),{},{ad_rule:0,vpos:t,pod:1,ppos:1,lip:!0,correlator:a,output:"xml_vast3"});var s=i.toString(),o=new T.default(e.adtag_url_2,!0);o.query=Ey(Ey({},o.query),{},{ad_rule:0,vpos:t,pod:1,correlator:++a,output:"xml_vast3"});var u=o.toString(),d=Date.now();return'<?xml version="1.0" encoding="UTF-8"?>\n<vmap:VMAP xmlns:vmap="http://www.iab.net/videosuite/vmap" version="1.0">\n<vmap:AdBreak timeOffset="start" breakType="linear,nonlinear" breakId="break-1">\n <vmap:AdSource id="'.concat(d++,'" allowMultipleAds="false" followRedirects="true">\n ').concat(xy({id:d++,adtag_url:s,error_url:null==n?void 0:n.error_url,impression_url:null==n?void 0:n.impression_url}),'\n </vmap:AdSource>\n</vmap:AdBreak>\n<vmap:AdBreak timeOffset="start" breakType="linear,nonlinear" breakId="break-2">\n <vmap:AdSource id="').concat(d++,'" allowMultipleAds="false" followRedirects="true">\n ').concat(xy({id:d++,adtag_url:u,error_url:null==r?void 0:r.error_url,impression_url:null==r?void 0:r.impression_url}),'\n </vmap:AdSource>\n <vmap:Extensions>\n <vmap:Extension type="bumper" suppress_bumper="true"></vmap:Extension>\n </vmap:Extensions>\n</vmap:AdBreak>\n</vmap:VMAP>').trim()}(this._get_vmap_context({dp:c,adtag:u,position:"preroll"===d.tnl_ad_pos?"preroll":"midroll",config:this._get_vmap_config(s)}));o.adsResponse=f}else if(c&&l.bidFloorApplied){var p=function(e){return e.promo_url?e.fallback_url?'<?xml version="1.0" encoding="utf-8"?>\n <VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper fallbackOnNoAd="true">\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="0" />\n </Extensions>\n </Wrapper>\n </Ad>\n <Ad id="fallback">\n <Wrapper>\n <AdSystem>ADS</AdSystem>\n <Impression><![CDATA[').concat(e.fallback_imp_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.fallback_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="1" />\n </Extensions>\n </Wrapper>\n </Ad>\n <Ad id="promo">\n <Wrapper>\n <AdSystem>Rainbow</AdSystem>\n <Impression><![CDATA[').concat(e.promo_imp_green_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.promo_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="2" />\n </Extensions>\n </Wrapper>\n </Ad>\n </VAST>').trim():'<?xml version="1.0" encoding="utf-8"?>\n <VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper fallbackOnNoAd="true">\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="0" />\n </Extensions>\n </Wrapper>\n </Ad>\n <Ad id="promo">\n <Wrapper>\n <AdSystem>Rainbow</AdSystem>\n <Impression><![CDATA[').concat(e.promo_imp_green_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.promo_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="1" />\n </Extensions>\n </Wrapper>\n </Ad>\n </VAST>').trim():e.fallback_url?'<?xml version="1.0" encoding="utf-8"?>\n <VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper fallbackOnNoAd="true">\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="0" />\n </Extensions>\n </Wrapper>\n </Ad>\n <Ad id="fallback">\n <Wrapper>\n <AdSystem>ADS</AdSystem>\n <Impression><![CDATA[').concat(e.fallback_imp_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.fallback_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="1" />\n </Extensions>\n </Wrapper>\n </Ad>\n </VAST>').trim():'<?xml version="1.0" encoding="utf-8"?>\n <VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper>\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,"]]></VASTAdTagURI>\n </Wrapper>\n </Ad>\n </VAST>").trim()}(c);o.adsResponse=p}else if(c&&c.fallback_url){var m=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()}(c);o.adsResponse=m}else o.adTagUrl=u.url;o.linearAdSlotWidth=this.options.width,o.linearAdSlotHeight=this.options.height,o.nonLinearAdSlotWidth=this.options.width,o.nonLinearAdSlotHeight=this.options.height,o.forceNonLinearFullSlot=!0,this.options.vast_load_timeout&&(o.vastLoadTimeout=this.options.vast_load_timeout),o.setAdWillAutoPlay(t.autoplayAllowed),o.setAdWillPlayMuted(t.autoplayRequiresMute),this.adsLoader.requestAds(o,d);try{this._broadcast("AD_SDK_REQUEST",{message:d})}catch(e){}r(o)}catch(e){throw new Error(e)}}.bind(this))}},{key:"cancel",value:function(){if(!1!==this.requestRunning){this.requestRunning=!1,this._resetAdsLoader(),this._hide("cancel");var e="AD_SDK_CANCELED";this._broadcast(e,{name:e,message:"Advertisement has been canceled.",status:"warning",analytics:{category:this.eventCategory,action:e,label:this.gameData.gameId}})}}},{key:"_checkAutoPlay",value:(I=A.default(x.default.mark((function e(){var t=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(e,n){var r=this;k.default(this,t);var a=navigator.userAgent.toLowerCase();a.indexOf("safari")>-1&&a.indexOf("chrome")<0?e({autoplayAllowed:!0,autoplayRequiresMute:!0}):U.default.video({inline:!0,muted:!1}).then(function(t){k.default(this,r);var n=t.result;t.error,e(!0===n?{autoplayAllowed:!0,autoplayRequiresMute:!1}:{autoplayAllowed:!0,autoplayRequiresMute:!0})}.bind(this))}.bind(this)));case 1:case"end":return e.stop()}}),e,this)}))),function(){return I.apply(this,arguments)})},{key:"_initDisplayContainerWithAutoPlay",value:(E=A.default(x.default.mark((function e(){var t;return x.default.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 E.apply(this,arguments)})},{key:"startAd",value:(w=A.default(x.default.mark((function e(t){var n,r;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.adType,r=t.params,this.adType_=n,this.adContext=Ry({},r),"promo"!==(null==r?void 0:r.adapter)){e.next=5;break}return e.abrupt("return",this._startPromo(r,n));case 5:if("adsense"!==(null==r?void 0:r.adapter)){e.next=26;break}if(n!==a.AdType.Interstitial){e.next=19;break}if("preroll"!==(null==r?void 0:r.position)){e.next=11;break}return e.abrupt("return",this._startAdsensePlacementPreroll(t));case 11:if("start"!==(null==r?void 0:r.position)){e.next=15;break}return e.abrupt("return",this._startAdsensePlacementStart(t));case 15:if("next"!==(null==r?void 0:r.position)){e.next=17;break}return e.abrupt("return",this._startAdsensePlacementNext(t));case 17:e.next=24;break;case 19:if(n!==a.AdType.Rewarded){e.next=23;break}return e.abrupt("return",this._startAdsensePlacementRewardedAd(t));case 23:throw new Error("Unsupported ad type");case 24:e.next=35;break;case 26:if(n!==a.AdType.Interstitial){e.next=30;break}return e.abrupt("return",this._startInterstitialAd(r));case 30:if(n!==a.AdType.Rewarded){e.next=34;break}return e.abrupt("return",this._startRewardedAd(r));case 34:throw new Error("Unsupported ad type");case 35:case"end":return e.stop()}}),e,this)}))),function(e){return w.apply(this,arguments)})},{key:"preloadAd",value:(_=A.default(x.default.mark((function e(t){return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t!==a.AdType.Interstitial){e.next=4;break}return e.abrupt("return","gdsdk://preloaded");case 4:if(t!==a.AdType.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 _.apply(this,arguments)})},{key:"addAdResume",value:function(){var e=this,t=function(){k.default(this,e),this.adsManager.resume()}.bind(this);try{this.adResume=new _y(this.adContainer,t),this.adResume.add()}catch(e){console.log("error on adding adResume",e)}}},{key:"loadDisplayAd",value:(b=A.default(x.default.mark((function e(t){var n=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(){var e=A.default(x.default.mark((function e(r,i){var s,o,u,d,c,l,h,f,p,m=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,(o=t?t.containerId:null)||i("Container id is not specified"),u=document.getElementById(o),document.getElementById(o)||i("No container is found with this id - ".concat(o)),void 0===window.idhb.requestAds&&i("Prebid.js wrapper script hit an error or didn't exist!"),d=t.slotId?t.slotId:"gd__banner@".concat(o),document.getElementById(d)||(c="\n .gd__banner{\n z-index: ".concat(a.Layers.DisplayContainer.zIndex,";\n height: 100%;\n display: flex !important;\n align-items: center;\n justify-content: center;\n }"),document.getElementById("gd__banner__style")||((l=document.createElement("style")).type="text/css",l.id="gd__banner__style",l.styleSheet?l.styleSheet.cssText=c:l.appendChild(document.createTextNode(c)),u.appendChild(l)),(h=document.createElement("div")).id=d,h.classList.add("gd__banner"),u.appendChild(h)),e.next=10,n._create_dp_display_context();case 10:n.atom_display=e.sent,null!==(s=n.atom_display)&&void 0!==s&&s.params&&window.idhb.setAdserverTargeting(null===(f=n.atom_display)||void 0===f?void 0:f.params),(p={})[d]={maxSize:[u.offsetWidth,u.offsetHeight]},window.idhb.requestAds({slots:p,callback:function(e){k.default(this,m)}.bind(this)}),r(),e.next=21;break;case 18:e.prev=18,e.t0=e.catch(0),i(e.t0.message||e.t0);case 21:case"end":return e.stop()}}),e,this,[[0,18]])})));return function(t,n){return e.apply(this,arguments)}}()));case 1:case"end":return e.stop()}}),e)}))),function(e){return b.apply(this,arguments)})},{key:"_startInterstitialAd",value:(y=A.default(x.default.mark((function e(t){var n,r=this;return x.default.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(){k.default(this,r)}.bind(this)){e.next=7;break}return e.abrupt("return");case 7:return this.requestRunning=!0,e.next=10,this._initDisplayContainerWithAutoPlay();case 10:return n=e.sent,e.next=13,this._loadInterstitialAd(Ry(Ry({},n),t));case 13:if(e.sent.success){e.next=18;break}return e.abrupt("return");case 18:n.autoplayRequiresMute&&this.adsManager.setVolume(0),this.adsManager.init(this.options.width,this.options.height,google.ima.ViewMode.NORMAL),this.adsManager.start(),e.next=27;break;case 23:throw e.prev=23,e.t0=e.catch(0),this._onError(e.t0),e.t0;case 27:case"end":return e.stop()}}),e,this,[[0,23]])}))),function(e){return y.apply(this,arguments)})},{key:"_startPromo",value:(v=A.default(x.default.mark((function e(t,n){var r;return x.default.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 r=e.sent,e.next=11,this._loadPromo(Ry(Ry({},r),t),n);case 11:if(e.sent.success){e.next=16;break}return e.abrupt("return");case 16:r.autoplayRequiresMute&&this.adsManager.setVolume(0),this.adsManager.init(this.options.width,this.options.height,google.ima.ViewMode.NORMAL),this.adsManager.start(),this.msgrt.send("promo.adsense",{message:"".concat(t.position," success")}),e.next=27;break;case 22:throw e.prev=22,e.t0=e.catch(0),this.msgrt.send("promo.adsense.err",{message:"".concat(t.position," failure,").concat(e.t0.message?e.t0.message:e.t0,", [").concat(this.parentURL,"]")}),this._onError(e.t0),e.t0;case 27:case"end":return e.stop()}}),e,this,[[0,22]])}))),function(e,t){return v.apply(this,arguments)})},{key:"_loadPromo",value:(m=A.default(x.default.mark((function e(t,n){var r,i;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this._resetAdsLoader(),e.prev=1,r=this.nextAdPosition(n),i=this._create_promo_context(r),this._requestPromo(i,Ry({adType:a.AdType.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 m.apply(this,arguments)})},{key:"_loadInterstitialAd",value:(p=A.default(x.default.mark((function e(t){var n;return x.default.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.AdType.Interstitial,t);case 6:e.t0=e.sent;case 7:return n=e.t0,delete this.preloadedInterstitialAdVast,e.next=11,this._requestAd(n,Ry({adType:a.AdType.Interstitial},t));case 11:return 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 p.apply(this,arguments)})},{key:"_waitOnAdLoad",value:function(){var e=this;return new Promise(function(t,n){var r=this;k.default(this,e);var a="videoad.preloadad";this.eventBus.unsubscribeScope(a);var i=function(e){var n=this;k.default(this,r),setTimeout(function(){k.default(this,n),this.eventBus.unsubscribeScope(a),t({success:!0,args:e})}.bind(this),1)}.bind(this),s=function(e){var n=this;k.default(this,r),setTimeout(function(){k.default(this,n),this.eventBus.unsubscribeScope(a),t({success:!1,args:e})}.bind(this),1)}.bind(this);this.eventBus.subscribe("AD_SDK_MANAGER_READY",i,a),this.eventBus.subscribe("AD_SDK_CANCELED",s,a),this.eventBus.subscribe("AD_ERROR",s,a)}.bind(this))}},{key:"_startRewardedAd",value:(f=A.default(x.default.mark((function e(t){var n,r=this;return x.default.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(){k.default(this,r)}.bind(this)){e.next=7;break}return e.abrupt("return");case 7:return this.requestRunning=!0,e.next=10,this._initDisplayContainerWithAutoPlay();case 10:return n=e.sent,e.next=13,this._loadRewardedAd(Ry(Ry({},n),t));case 13:if(e.sent.success){e.next=18;break}return e.abrupt("return");case 18:n.autoplayRequiresMute&&this.adsManager.setVolume(0),this.adsManager.init(this.options.width,this.options.height,google.ima.ViewMode.NORMAL),this.adsManager.start(),e.next=27;break;case 23:throw e.prev=23,e.t0=e.catch(0),this._onError(e.t0),e.t0;case 27:case"end":return e.stop()}}),e,this,[[0,23]])}))),function(e){return f.apply(this,arguments)})},{key:"_loadRewardedAd",value:(h=A.default(x.default.mark((function e(t){var n;return x.default.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.AdType.Rewarded,t);case 6:e.t0=e.sent;case 7:return n=e.t0,delete this.preloadedRewardedAdVast,e.next=11,this._requestAd(n,Ry({adType:a.AdType.Rewarded},t));case 11:return 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 h.apply(this,arguments)})},{key:"_preloadInterstitialAd",value:(l=A.default(x.default.mark((function e(){return x.default.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.AdType.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 l.apply(this,arguments)})},{key:"_preloadRewardedAd",value:(c=A.default(x.default.mark((function e(){return x.default.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.AdType.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 c.apply(this,arguments)})},{key:"_onError",value:function(e){this.cancel(),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 t=this;if(this.activeAdContainer){this.activeAdContainer.style.visibility="visible";var n=null==e?void 0:e.mode;e.t4r=this.gameData.__t4r;var r=this._isT4R(e),a=this._getT4ROptions(e);if("loaded"===n)this.activeAdContainer.style.opacity=r?.001:1,r&&this.adsManager.setVolume(0),r&&this._broadcast("AD_T4R"),r&&setTimeout(function(){k.default(this,t),this.activeAdContainer.style.opacity=1,this.adsManager.setVolume(1)}.bind(this),((null==a?void 0:a.min)||1234)+Math.random()*((null==a?void 0:a.max)||3210));else if("click"===n||"first_quartile"===n){if(r&&"click"===n){var i,s=null===(i=this._adrequest_user_context)||void 0===i?void 0:i.tnl_ad_pos;this.clickCount[s]++}this.activeAdContainer.style.opacity=1,this.adsManager.setVolume(1)}}}},{key:"_createPlayer",value:function(){var e=this,t=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.Layers.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 n=document.createElement("video");n.setAttribute("playsinline",!0),n.setAttribute("webkit-playsinline",!0),n.id="".concat(this.prefix,"advertisement_video"),n.style.position="absolute",n.style.backgroundColor="#000000",n.style.top="0",n.style.left="0",n.style.width=this.options.width+"px",n.style.height=this.options.height+"px",this.video_ad_player=n,this.adContainer.appendChild(n);var r=document.createElement("div");r.id="".concat(this.prefix,"advertisement_slot"),r.style.position="absolute",r.style.top="0",r.style.left="0",r.style.width=this.options.width+"px",r.style.height=this.options.height+"px",this.adContainerInner=r,this.activeAdContainer=this.adContainer,window.activeAdContainer=this.activeAdContainer,this.thirdPartyContainer?(this.adContainer.appendChild(r),this.thirdPartyContainer.appendChild(this.adContainer),this.activeAdContainer=this.thirdPartyContainer):(this.adContainer.appendChild(r),t.appendChild(this.adContainer)),this.addAdResume(),this.activeAdContainer.style.visibility="hidden";var i=function(){k.default(this,e);var t=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:t,this.options.height=this.thirdPartyContainer?this.thirdPartyContainer.offsetHeight:a,r.style.width=this.options.width+"px",r.style.height=this.options.height+"px",n.style.width=this.options.width+"px",n.style.height=this.options.height+"px"}.bind(this);window.addEventListener("resize",i),window.document.addEventListener("DOMContentLoaded",i)}},{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 t=this,n=new google.ima.AdsRenderingSettings;n.autoAlign=!1,n.enablePreloading=!1,n.restoreCustomPlaybackStateOnAdBreakComplete=!0,n.useStyledNonLinearAds=!0,n.uiElements=[google.ima.UiElements.AD_ATTRIBUTION,google.ima.UiElements.COUNTDOWN],this.adsManager=e.getAdsManager(this.video_ad_player,n),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(){k.default(this,t),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 r=new Date,a=r.getHours(),i=r.getDate(),s=r.getMonth(),o=r.getFullYear(),u="AD_SDK_MANAGER_READY";this._broadcast(u,{name:u,message:"AD SDK is ready",status:"success",analytics:{category:u,action:this.parentDomain,label:"h".concat(a," d").concat(i," m").concat(s," y").concat(o)}}),this._adrequest_user_context=e.getUserRequestContext()}},{key:"_onAdEvent",value:function(e){var t,n=this,r=new Date,i=r.getHours(),s=r.getDate(),o=r.getMonth(),u=r.getFullYear(),d=a.getKeyByValue(google.ima.AdEvent.Type,e.type),c=!1,l=(null==e||null===(t=e.getAd())||void 0===t?void 0:t.getContentType())||"",h=!l.startsWith("image")&&!l.startsWith("text");this._sendIMAEventsToHB(e);var f="";switch(e.type){case google.ima.AdEvent.Type.AD_BREAK_READY:f="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:f="Fired when an ads list is loaded.";break;case google.ima.AdEvent.Type.ALL_ADS_COMPLETED:c=!0,f="Fired when the ads manager is done playing all the ads.";break;case google.ima.AdEvent.Type.CLICK:f="Fired when the ad is clicked.";var p=e.getAd().getContentType();this._show({mode:"click",contentType:p});break;case google.ima.AdEvent.Type.COMPLETE:e.getAd(),c=this._is_completed(e.getAd()),f="Fired when the ad completes playing.",this.adType_===a.AdType.Rewarded&&this._broadcast("SDK_REWARDED_WATCH_COMPLETE",{message:"",status:"success"});break;case google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED:f="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:f="Fired when content should be resumed. This usually happens when an ad finishes or collapses.",c=!0,this._hideAddResume();break;case google.ima.AdEvent.Type.DURATION_CHANGE:f="Fired when the ad's duration changes.";break;case google.ima.AdEvent.Type.FIRST_QUARTILE:f="Fired when the ad playhead crosses first quartile.";var m=e.getAd().getContentType();this._show({mode:"first_quartile",contentType:m});break;case google.ima.AdEvent.Type.IMPRESSION:f="Fired when the impression URL has been pinged.";var g=e.getAd();this._run_atom_tag_aws_test(this._findAtomTagUrl(g,!0));break;case google.ima.AdEvent.Type.INTERACTION:f="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:f="Fired when the displayed ad changes from linear to nonlinear, or vice versa.";break;case google.ima.AdEvent.Type.LOADED:var v=e.getAd().getContentType();f=v,this._show({mode:"loaded",contentType:v});break;case google.ima.AdEvent.Type.LOG:e.getAdData().adError&&(f=e.getAdData());break;case google.ima.AdEvent.Type.MIDPOINT:f="Fired when the ad playhead crosses midpoint.";break;case google.ima.AdEvent.Type.PAUSED:h&&this.adResume.show(),f="Fired when the ad is paused.";break;case google.ima.AdEvent.Type.RESUMED:f="Fired when the ad is resumed.",h&&this.adResume.hide();break;case google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED:f="Fired when the displayed ads skippable state is changed.";break;case google.ima.AdEvent.Type.SKIPPED:c=this._is_completed(e.getAd()),f="Fired when the ad is skipped by the user.";break;case google.ima.AdEvent.Type.STARTED:this._hideAddResume(),f="Fired when the ad starts playing.";break;case google.ima.AdEvent.Type.THIRD_QUARTILE:f="Fired when the ad playhead crosses third quartile.";break;case google.ima.AdEvent.Type.USER_CLOSE:c=this._is_completed(e.getAd()),f="Fired when the ad is closed by the user.";break;case google.ima.AdEvent.Type.VOLUME_CHANGED:f="Fired when the ad volume has changed.";break;case google.ima.AdEvent.Type.VOLUME_MUTED:f="Fired when the ad volume has been muted."}if(""!==d&&""!==f&&this._broadcast(d,{name:d,message:f,status:"success",analytics:{category:d,action:this.parentDomain,label:"h".concat(i," d").concat(s," m").concat(o," y").concat(u)}}),c&&!this.adSuccess){this.adSuccess=!0;var y=e.getAd(),b="Rainbow"===(null==y?void 0:y.getAdSystem())&&(null==y?void 0:y.getWrapperAdIds().some(function(e){return k.default(this,n),"promo"===e}.bind(this)));null==y||y.getAdSystem(),null==y||y.getWrapperAdIds(),this._broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success",isPromoSuccess:b}),this.resetForNext(e)}}},{key:"_run_atom_tag_aws_test",value:function(e){var t=this;try{var n,r,a,i,s;if(!((null===(n=this.gameData)||void 0===n||null===(r=n.aws_tst)||void 0===r?void 0:r.enabled)&&(null===(a=this.gameData)||void 0===a||null===(i=a.aws_tst)||void 0===i||null===(s=i.ep)||void 0===s?void 0:s.atm)))return;var o=e.type,u=e.url;if("none"===o||!u)return;u=u.replace("tag.atom.gamedistribution.com","atom-tag-prod-aws.gamedistribution.com"),fetch(u).then(function(){k.default(this,t)}.bind(this))}catch(e){}}},{key:"_findAtomTagUrl",value:function(e,t){var n=this,r={type:"none"};try{var a=this.current_dp,i=a.id,s=a.error_url,o=a.impression_url,u=a.fallback_imp_url,d=a.promo_imp_green_url;if(!e&&!t)return r={type:"imp_err",url:s};var c=e.getWrapperAdIds().some(function(e){return k.default(this,n),e==="".concat(i)}.bind(this)),l=e.getWrapperAdIds().some(function(e){return k.default(this,n),"fallback"===e}.bind(this)),h=e.getWrapperAdIds().some(function(e){return k.default(this,n),"promo"===e}.bind(this));c&&t?r={type:"normal_imp",url:o}:c&&!t?r={type:"normal_err",url:s}:h&&t?r={type:"promo_imp",url:d}:l&&t&&(r={type:"fallbacj_imp",url:u})}catch(e){}return r}},{key:"_onAdError",value:function(e){this.requestRunning=!1,this._run_atom_tag_aws_test(this._findAtomTagUrl(void 0,!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(),a=this._getInnerErrorCode(n);Dy.emit("AD_ERROR",r),this._broadcast(t,{message:r,details:a,status:"warning",analytics:{category:t,action:a,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:"_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,t){var n=this;this.safetyTimer&&clearTimeout(this.safetyTimer),this.safetyTimer=window.setTimeout(function(){k.default(this,n),this.cancel(),this._clearSafetyTimer(t)}.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(wy(e.getInnerError)){var t=e.getInnerError();if(t)return wy(t.getErrorCode)&&wy(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,t){var n=this;if(e){var r=this.macros.transform(e,{get:function(e){if(k.default(this,n),t&&t.tnl_keys)return t.tnl_keys[e.toLowerCase()]}.bind(this)});for(var a in r.query||{}){var i=r.query[a];g.isPlainObject(i)&&(r.query[a]=M.default.stringify(i))}var s=new T.default(r.url,!0);return j.default(s.query,r.query||{}),Ry({url:s.toString()},t)}}},{key:"_transformVast",value:function(e,t){var n={url:e.url};try{var r=new T.default(e.url,!0),a=this._transformQuery(e,t,r);a&&(n.url=r.toString());var i=a?r:new T.default(e.url,!0);if(i.query.cust_params){var s=M.default.parse(i.query.cust_params);n.bidder=s.hb_bidder,n.cust_params=s}n.url_parsed=i}catch(e){n.hasError=!0,n.message=e.message,n.bidder="error",console.log(e.message)}return n}},{key:"_transformQuery",value:function(e,t,n){var r=this;if(e&&t&&e.tnl_keys){var a=this.options.vast_query;if(t.retry_on_success&&this.options.retry_on_success&&g.isPlainObject(this.options.retry_on_success.vast_query)?a=this.options.retry_on_success.vast_query:t.retry_on_failure&&this.options.retry_on_failure&&g.isPlainObject(this.options.retry_on_failure.vast_query)&&(a=this.options.retry_on_failure.vast_query),a=L.default(a),g.isPlainObject(a)){var i=n.query;if(a.$$remove){for(var s in i){new RegExp(a.$$remove,"i").test(s)&&delete i[s]}delete a.$$remove}var o=M.default.parse(i.cust_params);if(a.cust_params&&a.cust_params.$$remove){for(var u in o){new RegExp(a.cust_params.$$remove,"i").test(u)&&delete o[u]}delete a.cust_params.$$remove}var d=this.macros.transform(a,{get:function(t){return k.default(this,r),e.tnl_keys[t.toLowerCase()]}.bind(this)});return i.cust_params=o,j.default(i,d),i.cust_params=M.default.stringify(i.cust_params),!0}}}},{key:"_isT4R",value:function(e){var t,n,r,a,i=null===(t=this._adrequest_user_context)||void 0===t?void 0:t.tnl_ad_pos;if(this.clickCount[i]>=(null===(n=e.t4r[i])||void 0===n?void 0:n.count))return!1;if(null!=e&&null!==(r=e.contentType)&&void 0!==r&&r.startsWith("image/")||"text"===(null==e?void 0:e.contentType))return i&&(null===(a=e.t4r[i])||void 0===a?void 0:a.enabled);if(null!=e&&e.contentType.startsWith("video/")){var s,o=(null===(s=e.t4r[i])||void 0===s?void 0:s.viper)||0;if(o>0){var u,d=Math.random()<o;return i&&d&&(null===(u=e.t4r[i])||void 0===u?void 0:u.enabled)}return!1}return!1}},{key:"_isVMAP",value:function(e){var t,n,r,a,i,s,o,u,d,c,l,h,f,p,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===(a=r.pAds)||void 0===a||null===(i=a.vmap)||void 0===i?void 0:i.enabled))||"midroll"===e&&(!0===(null===(s=this.gameData)||void 0===s||null===(o=s.mAds)||void 0===o?void 0:o.vmap)||!0===(null===(u=this.gameData)||void 0===u||null===(d=u.mAds)||void 0===d||null===(c=d.vmap)||void 0===c?void 0:c.enabled))||"rewarded"===e&&(!0===(null===(l=this.gameData)||void 0===l||null===(h=l.rAds)||void 0===h?void 0:h.vmap)||!0===(null===(f=this.gameData)||void 0===f||null===(p=f.rAds)||void 0===p||null===(m=p.vmap)||void 0===m?void 0:m.enabled));if(!g)return!1;var v=this._get_vmap_config(e),y=this.adCounter[e];return void 0!==(null==v?void 0:v.start)?y>=(null==v?void 0:v.start):g}},{key:"_getT4ROptions",value:function(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){var t=e.adtag,n=e.position,r=e.config,a=e.dp,i=this._createCustomAdVastUrl(null==r?void 0:r.vast_1)||t,s=this._createCustomAdVastUrl(null==r?void 0:r.vast_2)||t,o=null!=r&&r.vast_1?void 0:a,u=null!=r&&r.vast_2?void 0:a;return{adtag_url_1:null==i?void 0:i.url,adtag_url_2:null==s?void 0:s.url,position:n,dp_1:o,dp_2:u}}},{key:"_get_vmap_config",value:function(e){var t,n,r,a,i,s,o,u;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===(a=r.mAds)||void 0===a?void 0:a.vmap;case"rewarded":return null===(i=this.gameData)||void 0===i||null===(s=i.rAds)||void 0===s?void 0:s.vmap;default:return null===(o=this.gameData)||void 0===o||null===(u=o.pAds)||void 0===u?void 0:u.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(t){var n=this;k.default(this,e);try{var r={id:this.topDomain||this.parentDomain,au:"display",ty:"display",aid:this.gameData.gameId,pgu:this.parentURL},a=new by(this.gameData).checkCustomParams();a&&(r.cp=a);var i=encodeURIComponent(d.Base64.encode(JSON.stringify(r)));fetch("https://tag.atom.gamedistribution.com/v1/atm?ar=".concat(i)).then(function(e){return k.default(this,n),e.json()}.bind(this)).then(function(e){if(k.default(this,n),!e||!e.p)return this.msgrt.send("dp.na",{message:"atom"}),t();this.msgrt.send("dp.fp",{message:e.p/100}),t({params:{fp:e.p/100},error_url:"https://tag.atom.gamedistribution.com/v1/err?ar=".concat(i),impression_url:"https://tag.atom.gamedistribution.com/v1/imp?ar=".concat(i)})}.bind(this)).catch(function(e){k.default(this,n),this.msgrt.send("dp.err",{message:(null==e?void 0:e.message)||e}),t()}.bind(this))}catch(e){this.msgrt.send("dp.err",{message:(null==e?void 0:e.message)||e}),t()}}.bind(this))}},{key:"_create_promo_context",value:function(e){var t,n=this,r={id:this.topDomain||this.parentDomain,au:e||"unknown",ty:"video",aid:this.gameData.gameId,pgu:this.parentURL},a=Object.keys(r).map(function(e){return k.default(this,n),"".concat(e,"=").concat(encodeURIComponent(r[e]))}.bind(this)).join("&");encodeURIComponent(d.Base64.encode(JSON.stringify(r)));var i=null===(t=this.gameData.promo)||void 0===t?void 0:t.rainbow,s=null==i?void 0:i.enabled,o="https://tag.atom.gamedistribution.com/v1/rainbow/?".concat(a);console.log("gd-adflow openPromoUrl",o);var u=s?o:void 0;return function(){k.default(this,n)}.bind(this),{promo_url:u,promo_imp_blue_url:s?"https://tag.atom.gamedistribution.com/v1/rainbow/blue":void 0,promo_imp_green_url:s?"https://tag.atom.gamedistribution.com/v1/rainbow/green":void 0}}},{key:"_create_dp_context",value:function(e,t){var n=this;return new Promise(function(){var r=A.default(x.default.mark((function r(a){var i,s,o,u,c,l,h=this;return x.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(r.prev=0,n._isDP(e)){r.next=5;break}return n.msgrt.send("dp.na",{message:"rule"}),r.abrupt("return",a());case 5:s={id:n.topDomain||n.parentDomain,au:e||"unknown",ty:"video",aid:n.gameData.gameId,pgu:n.parentURL},(o=new by(n.gameData).checkCustomParams())&&(s.cp=o),u=encodeURIComponent(d.Base64.encode(JSON.stringify(s))),null==t||t.adapterIndex,null==t||t.isLastAdapter,c=null===(i=n.gameData.promo)||void 0===i?void 0:i.rainbow,l=(null==c?void 0:c.enabled)&&(null==t?void 0:t.isLastAdapter)&&"rewarded"===e,null==c||c.enabled,null==t||t.isLastAdapter,fetch("https://tag.atom.gamedistribution.com/v1/atm?ar=".concat(u)).then(function(e){return k.default(this,h),e.json()}.bind(this)).then(function(e){if(k.default(this,h),!e||!e.p)return n.msgrt.send("dp.na",{message:"atom"}),a();var t=e.p/100;a({id:Date.now(),floor_price:t,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:l?"https://tag.atom.gamedistribution.com/v1/rainbow?ar=".concat(u):void 0,promo_imp_blue_url:l?"https://tag.atom.gamedistribution.com/v1/rainbow/blue":void 0,promo_imp_green_url:l?"https://tag.atom.gamedistribution.com/v1/rainbow/green":void 0})}.bind(this)).catch(function(e){k.default(this,h),n.msgrt.send("dp.err",{message:(null==e?void 0:e.message)||e}),a()}.bind(this)),r.next=20;break;case 16:r.prev=16,r.t0=r.catch(0),n.msgrt.send("dp.err",{message:(null===r.t0||void 0===r.t0?void 0:r.t0.message)||r.t0}),a();case 20:case"end":return r.stop()}}),r,this,[[0,16]])})));return function(e){return r.apply(this,arguments)}}())}},{key:"_extend_dp_with_adsense",value:function(e,t){if(e&&t)try{var n,r=new T.default(t.vastUrl,!0);if(null===(n=r.query)||void 0===n||!n.cust_params)return;var a=M.default.parse(r.query.cust_params);if(!a.tnl_asset_id)return;a.adsense=1,r.query.cust_params=M.default.stringify(a,!1),e.fallback_url=r.toString(),e.fallback_imp_url="https://tag.atom.gamedistribution.com/v1/rainbow/green"}catch(e){}}},{key:"_init_hl_script",value:(u=A.default(x.default.mark((function e(t){var n,r,i,s,o,u,d,c=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this._getPrebidScripts(),r=n[0],i=function(){return k.default(this,c),!1}.bind(this),window.idhb=window.idhb||{iabCmpExists:i},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"}),window.idhb.que=window.idhb.que||[],(s=new URL(r)).searchParams.append("referer",window.idhb.options.configUrl),r=s.href,e.next=12,a.getScript(r,"gdsdk_prebid",{alternates:n,error_prefix:"Blocked:",exists:function(){return k.default(this,c),window.idhb.requestAds}.bind(this)});case 12:o=a.getQueryString("ch",window.location.href),u=a.getQueryString("ch_date",window.location.href),d={tnl_content_category:this.category.toLowerCase()},o&&(d.channel=o),u&&(d.ch_date=u),window.idhb.setAdserverTargeting(d),window.idhb.allowPersonalizedAds(!!parseInt(this.userAllowedPersonalizedAds)),window.idhb.addEventListener("slotRenderEnded",function(e){var t=this;k.default(this,c);try{var n,r=e.slotId.split("@");r=1===r.length?r[0]:r[1],e.isEmpty?(null!==(n=this.atom_display)&&void 0!==n&&n.error_url&&(fetch(this.atom_display.error_url).catch(function(e){k.default(this,t)}.bind(this)),delete this.atom_display),this._broadcast("DISPLAYAD_ERROR",{message:r,status:"warning"})):(this.atom_display.impression_url&&(fetch(this.atom_display.impression_url).catch(function(e){k.default(this,t)}.bind(this)),delete this.atom_display),this._broadcast("DISPLAYAD_IMPRESSION",{message:r,status:"success"}))}catch(e){}}.bind(this));case 20:case"end":return e.stop()}}),e,this)}))),function(e){return u.apply(this,arguments)})},{key:"_init_ima_script",value:(o=A.default(x.default.mark((function e(t){var n,r,i=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=["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"],r=this.options.debug?n[0]:n[1],e.next=4,a.getScript(r,"gdsdk_ima",{alternates:n,error_prefix:"Blocked:",exists:function(){return k.default(this,i),window.google&&window.google.ima}.bind(this)});case 4:case"end":return e.stop()}}),e,this)}))),function(e){return o.apply(this,arguments)})},{key:"_init_afg_script",value:(s=A.default(x.default.mark((function e(t){var n,r,i,s,o=this;return x.default.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(s={}).crossorigin="anonymous",s["data-ad-client"]=(null==t||null===(n=t.adsense_client)||void 0===n?void 0:n.length)>0?t.adsense_client:"ca-pub-2316275586951220",s["data-ad-frequency-hint"]="30s",s.allow="autoplay",(null==t||null===(r=t.adsense_channel)||void 0===r?void 0:r.length)>0&&(s["data-ad-channel"]=t.adsense_channel),(null==t||null===(i=t.adsense_host)||void 0===i?void 0:i.length)>0&&(s["data-ad-host"]=t.adsense_host),!0===(null==t?void 0:t.adsense_adbreak_test)&&(s["data-adbreak-test"]="on"),e.next=14,a.getScript("https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js","afg",{error_prefix:"Blocked:",exists:function(){return k.default(this,o),!!window.adsbygoogle}.bind(this),attrs:s});case 14:window.adsbygoogle=window.adsbygoogle||[],window.adsbygoogle.push({sound:"on",preloadAdBreaks:"on"});case 16:case"end":return e.stop()}}),e,this)}))),function(e){return s.apply(this,arguments)})},{key:"clearSession",value:function(){this.requestRunning=!1}},{key:"_startAdsensePlacementRewardedAd",value:(i=A.default(x.default.mark((function e(t){var n,r,a,i,s,o,u=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(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(k.default(this,u),t.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"),n=function(){k.default(this,u),this._broadcast("CONTENT_PAUSE_REQUESTED",{message:"",status:"success"}),this._broadcast("IMPRESSION",{message:"",status:"success"})}.bind(this),r=function(){k.default(this,u),this._broadcast("CONTENT_RESUME_REQUESTED",{message:"",status:"success"})}.bind(this),a=function(){k.default(this,u),this._send_atom_event("sg.ad.rw.dismissed")}.bind(this),i=function(){k.default(this,u),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),s=function(e){k.default(this,u),e()}.bind(this),o=function(e){k.default(this,u),this.resetForNext(),this.adCounter.rewarded=this.adCounter.rewarded||0,this.adCounter.rewarded++,"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),d={type:"reward",name:"reward-in-game",beforeAd:n,afterAd:r,adDismissed:a,adViewed:i,beforeReward:s,adBreakDone:o},window.adsbygoogle.push(d),e.next=24;break;case 20:throw e.prev=20,e.t0=e.catch(1),this._onError(e.t0),e.t0;case 24:case"end":return e.stop()}var d}),e,this,[[1,20]])}))),function(e){return i.apply(this,arguments)})},{key:"_startAdsensePlacementPreroll",value:(r=A.default(x.default.mark((function e(t){var n,r=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(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(k.default(this,r),t.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"),n=function(e){k.default(this,r),this.resetForNext(),this.adCounter.preroll=this.adCounter.preroll||0,this.adCounter.preroll++,"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),a={type:"preroll",adBreakDone:n},window.adsbygoogle.push(a),e.next=19;break;case 15:throw e.prev=15,e.t0=e.catch(1),this._onError(e.t0),e.t0;case 19:case"end":return e.stop()}var a}),e,this,[[1,15]])}))),function(e){return r.apply(this,arguments)})},{key:"_startAdsensePlacementStart",value:(n=A.default(x.default.mark((function e(t){var n,r,a,i=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(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(k.default(this,i),t.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"),n=function(){k.default(this,i),this._broadcast("CONTENT_PAUSE_REQUESTED",{message:"",status:"success"}),this._broadcast("IMPRESSION",{message:"",status:"success"})}.bind(this),r=function(){k.default(this,i),this._broadcast("CONTENT_RESUME_REQUESTED",{message:"",status:"success"})}.bind(this),a=function(e){k.default(this,i),this.resetForNext(),this.adCounter.preroll=this.adCounter.preroll||0,this.adCounter.preroll++,"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),s={type:"start",name:"start-in-game",beforeAd:n,afterAd:r,adBreakDone:a},window.adsbygoogle.push(s),e.next=21;break;case 17:throw e.prev=17,e.t0=e.catch(1),this._onError(e.t0),e.t0;case 21:case"end":return e.stop()}var s}),e,this,[[1,17]])}))),function(e){return n.apply(this,arguments)})},{key:"_startAdsensePlacementNext",value:(t=A.default(x.default.mark((function e(t){var n,r,a,i=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(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(k.default(this,i),t.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"),n=function(){k.default(this,i),this._broadcast("CONTENT_PAUSE_REQUESTED",{message:"",status:"success"}),this._broadcast("IMPRESSION",{message:"",status:"success"})}.bind(this),r=function(){k.default(this,i),this._broadcast("CONTENT_RESUME_REQUESTED",{message:"",status:"success"})}.bind(this),a=function(e){k.default(this,i),this.resetForNext(),this.adCounter.midroll=this.adCounter.midroll||0,this.adCounter.midroll++,"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),s={type:"next",name:"next-in-game",beforeAd:n,afterAd:r,adBreakDone:a},window.adsbygoogle.push(s),e.next=21;break;case 17:throw e.prev=17,e.t0=e.catch(1),this._onError(e.t0),e.t0;case 21:case"end":return e.stop()}var s}),e,this,[[1,17]])}))),function(e){return t.apply(this,arguments)})},{key:"_send",value:function(e,t){try{var n=this.msgrt,r=n._layout,a=n._ua,i={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:a.browser.name,brvs:a.browser.version,osnm:a.os.name,osvs:a.os.version,dvmd:a.device.model,w:r.w,h:r.h}};fetch("https://tag.atom.gamedistribution.com/v1/dmp?ar=".concat(encodeURIComponent(d.Base64.encode(JSON.stringify(i)))))}catch(e){}}},{key:"_send_atom_event",value:function(e,t){this._send(e,{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})}},{key:"_isAfgPositionNext",value:function(e){return void 0!==e.adTimestamp}},{key:"_isAfgPositionStart",value:function(e){if(void 0!==e.adTimestamp)return!1;return this.adCounter.preroll=this.adCounter.preroll||0,0===this.adCounter.preroll}},{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.AdType.Rewarded)t="reward";else if(n===a.AdType.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")}e.params.position=t}},{key:"_broadcast",value:function(e,t){var n=this,r=!1;["AD_ERROR"].some(function(t){return k.default(this,n),t===e}.bind(this))&&(r=!this.adContext.isLastAdapter||this.adContext.extraPromoRunOnFail,console.log("gd-adflow skipForward",e,r,this.adContext.adapterIndex,this.adContext.isLastAdapter,this.adContext.extraPromoRunOnFail)),this.eventBus.broadcast(e,Ry(Ry({},t),{},{skipForward:r}))}}]),e}(),Oy=function e(t){var n=this;S.default(this,e),R.default(this,"load",A.default(x.default.mark((function e(){return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Il(n.moduleName);case 2:n.module=e.sent;case 3:case"end":return e.stop()}}),e)})))),R.default(this,"promo",A.default(x.default.mark((function e(){return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.module){e.next=3;break}return e.next=3,n.load();case 3:return e.abrupt("return",n.module[n.moduleDefault]);case 4:case"end":return e.stop()}}),e)}))));var r=t.package||"gd-sdk-stone-dynamic",a=t.package_version||"1.1.1",i=t.template||"puzzle",s=t.dependencies||[];this.moduleName="GDPromoByOrbit",this.moduleDefault=i.charAt(0).toUpperCase()+i.slice(1),this.moduleConfig={source:"https://pm.gamedistribution.com/@bygd/".concat(r,"/").concat(a,"/dist/").concat(i.toLowerCase(),"/iife/index.js"),dependencies:s},Dl(this.moduleName,this.moduleConfig)},Py=function e(t){var n=this;S.default(this,e),R.default(this,"load",A.default(x.default.mark((function e(){return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Il(n.moduleName);case 2:n.module=e.sent;case 3:case"end":return e.stop()}}),e)})))),R.default(this,"splash",A.default(x.default.mark((function e(){return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.module){e.next=3;break}return e.next=3,n.load();case 3:return e.abrupt("return",n.module[n.moduleDefault]);case 4:case"end":return e.stop()}}),e)}))));var r=t.package||"gd-sdk-air-dynamic",a=t.package_version||"1.2.0",i=t.template||"pluto",s=t.dependencies||[];this.moduleName="GDSplashDynamic",this.moduleDefault=i.charAt(0).toUpperCase()+i.slice(1),this.moduleConfig={source:"https://pm.gamedistribution.com/@bygd/".concat(r,"/").concat(a,"/dist/").concat(i.toLowerCase(),"/iife/index.js"),dependencies:s},Dl(this.moduleName,this.moduleConfig)},Cy=function(e,t){console.log(e,t)},Ly={},Uy={},My=null;function jy(){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 Ly.version=r,Ly.frame=e,Ly.function=n,Ly.version}function Gy(e){var t=this;return My||(My=new Promise(function(n){function r(t,r){if(Cy("Received a response from CMP",t),r){var a,i;if(!1!==t.gdprApplies)return"tcloaded"===t.eventStatus||"useractioncomplete"===t.eventStatus?(("boolean"!=typeof(i=(a=t)&&"boolean"==typeof a.gdprApplies?a.gdprApplies:e.defaultGdprScope)||!0===i&&"string"!=typeof a.tcString)&&n({result:"cmpUnexpectedResponse",cmp:Ly,consentData:a}),void n({result:"ok",consentData:t})):void 0;n({result:"ok",consentData:t})}else n({result:"cmpCallFailed"})}k.default(this,t),jy(),Ly.frame?2===Ly.version?(Cy("TCF v2 CMP found. Fetching the consent."),Ly.function?(Cy("CMP API is directly accessible, calling it now..."),Ly.function("addEventListener",Ly.version,r)):(Cy("CMP API is outside the current iframe, calling it now..."),function(e,t,n){var r=this,a="__tcfapi";function i(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!==Uy[r.callId]&&Uy[r.callId](r.returnValue,r.success)}}window[a]=function(e,n,i,s){k.default(this,r);var o=Math.random()+"",u="".concat(a,"Call"),d=R.default({},u,{command:e,parameter:s,callId:o,version:n});Uy[o]=i,t.postMessage(d,"*")}.bind(this),window.addEventListener("message",i,!1),window[a](e,Ly.version,n)}("addEventListener",Ly.frame,r))):n({result:"cmpVersionNotV2",cmp:Ly}):n({result:"cmpNotFound"})}.bind(this)))}var By=new(function(){function e(){S.default(this,e),this.productName="Game Distribution"}var t;return D.default(e,[{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:(t=A.default(x.default.mark((function e(t,n){var r,a,i,s,o,u,d;return x.default.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(i=null==t||null===(r=t.visitor)||void 0===r||null===(a=r.visitorData)||void 0===a?void 0:a.visitorId){e.next=6;break}return e.abrupt("return");case 6:return s=encodeURIComponent(this.productName),o=encodeURIComponent(i),e.prev=8,u="https://tracker-v4.gamedock.io/v1/events-tracker/track/product/".concat(s,"/user_id/").concat(o),e.next=12,fetch(u,{method:"POST"});case 12: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,d="https://tracker.gamedock.io/v1/events-tracker/track/product/".concat(s,"/user_id/").concat(o),e.next=22,fetch(d,{method:"POST"});case 22: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,n){return t.apply(this,arguments)})}]),e}());function qy(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 Ny(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 Ny(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}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 i,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,i=e},f:function(){try{s||null==n.return||n.return()}finally{if(o)throw i}}}}function Ny(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 Fy=function(e){var t=this,n=e.src,r=e.attributes,a=e.target,i=e.isAsync;return new Promise(function(e,s){var o=this;k.default(this,t);try{var u=document.createElement("script");if(u.async=null==i||i,u.type="text/javascript",u.onload=function(){k.default(this,o),e()}.bind(this),u.onerror=function(){k.default(this,o);var e="Error on script load, Error: ".concat(n);console.log(e),s(e)}.bind(this),u.src=n,r){var d,c=qy(r);try{for(c.s();!(d=c.n()).done;){var l=d.value,h=l.key,f=l.value;u.setAttribute(h,f)}}catch(e){c.e(e)}finally{c.f()}}a||(a=document.head),a.appendChild(u)}catch(e){var p="Error on script load catch, Error: ".concat(n);console.log(p,e),s(p)}}.bind(this))},Vy=function(){var e=A.default(x.default.mark((function e(){return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Fy({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,Fy({src:"https://cookie-cdn.cookiepro.com/consent/".concat("140feb72-7952-4420-8ae5-e8978d87bc17","/OtAutoBlock.js"),attributes:[{key:"id",value:"gd-cookie-pro-autoblock"}],isAsync:!1});case 5:return e.next=7,Fy({src:"https://cookie-cdn.cookiepro.com/scripttemplates/otSDKStub.js",attributes:[{key:"id",value:"gd-cookie-pro-stub"},{key:"charset",value:"UTF-8"},{key:"data-domain-script",value:"140feb72-7952-4420-8ae5-e8978d87bc17"}],isAsync:!1});case 7:n=void 0,r=void 0,a=void 0,n=(t={inlineScript:"function OptanonWrapper() { }"}).inlineScript,r=t.target,(a=document.createElement("script")).text=n,r||(r=document.head),r.appendChild(a),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,a}),e,null,[[0,10]])})));return function(){return e.apply(this,arguments)}}(),Wy=new b.EventEmitter,Ky={"https://games.softgames.com":{"splash-hidden":"splash-hidden"},"https://sg.gamedistribution.com":{"splash-hidden":"splash-hidden"},"https://html5.gamedistribution.com":{key:"value"}};function Hy(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 t=this,n=e.data,r=e.origin,a=n.type;if(Object.keys(Ky).some(function(e){return k.default(this,t),e===r}.bind(this))&&(null==n||!n.__tcfapiCall)){if(window.parent){console.log("SG_EVENTS received on GD-SDK!",n);var i=n.eventName,s=n.data;console.log("SG_EVENTS GD-SDK eventName,data",i,s),window.mpHelper&&(console.log("SG_EVENTS sending to minijuegos!"),"levelStart"!==i&&"levelFinish"!==i||window.mpHelper.sendStat("level",s.level),"levelFinish"===i&&window.mpHelper.sendStat("score",s.score)),window.parent.postMessage(n,"*")}if(a){var o=Ky[r][a];o&&Wy.emit(o,n)}}}),!1),window.addEventListener("message",(function(e){console.log("DDD",data),window.parent&&window.parent.postMessage(data,"*")}),!1);var zy=_.v4(),$y=function(e){var t=this;if(!window.__msgr){var n=document.createElement("iframe");if(n.src="https://static.gamedistribution.com/message/index.html",n.style.display="none",n.name="__msgr",document.body.appendChild(n),window!==window.top){var r={gameId:e.gameId,target:e.evnts.domain,token:zy,event_name:"TokenGenerated",timestamp:Date.now()};n.onload=function(){Jy(r)},setInterval(function(){k.default(this,t),r.timestamp=Date.now(),r.event_name="Heartbeat",Jy(r)}.bind(this),1e3*e.evnts.heartbeatDuration)}}window.addEventListener("message",function(e){k.default(this,t);try{var n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Hy(Object(n),!0).forEach((function(t){R.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Hy(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e.data);if(!n.event_name)return;n.token=zy,Jy(n)}catch(e){console.error("GD Messager Error",e.message)}}.bind(this),!1)},Qy=function(e){try{var t={gameId:e.game.gameId,target:e.game.evnts.domain,event_name:e.event,timestamp:Date.now()},n=Yy(window);n!==window.top&&(null==n||n.postMessage(t,"https://html5.gamedistribution.com"))}catch(e){}},Yy=function e(t){try{var n,r,a=null==t?void 0:t.parent;if("game"===(null===(n=a.document)||void 0===n||null===(r=n.activeElement)||void 0===r?void 0:r.id))return a;e(a)}catch(e){return t}},Jy=function(e){try{window.__msgr&&window.__msgr.postMessage(e,"*")}catch(e){console.log("GD Messager initialization, please wait....")}};function Xy(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 Zy(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Xy(Object(n),!0).forEach((function(t){R.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xy(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function eb(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 tb(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 tb(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}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 i,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,i=e},f:function(){try{s||null==n.return||n.return()}finally{if(o)throw i}}}}function tb(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 nb,rb=function(){function e(t){var n=this;S.default(this,e),R.default(this,"_getAdTypeByAfgPosition",function(e){var t=this;k.default(this,n);var r={preroll:["preroll","start"],midroll:["next"],rewarded:["reward"]},a=Object.keys(r).find(function(n){var a=this;return k.default(this,t),r[n].some(function(t){return k.default(this,a),t===e.params.position}.bind(this))}.bind(this));return a||"midroll"}.bind(this)),this._gameData=t._gameData,this._msgrt=t.msgrt,this._adInstance=t.adInstance,this._eventBus=t.eventBus,this.blockedAdsMap=t.blockedAdsMap,this._parentURL=t._parentURL,this._onResumeGame=t.onResumeGame.bind(t),this._setAdRequestTimer=t._setAdRequestTimer.bind(t),this._giveGift=t._giveGift.bind(t),this.send_atom_event=t.send_atom_event.bind(t),this.get_session_id=t.get_session_id.bind(t),this.get_ad_system_init_result=t.get_ad_system_init_result.bind(t)}var t,n;return D.default(e,[{key:"runAdFlow",value:(n=A.default(x.default.mark((function e(t){var n,r,a,i,s,o,u,d,c,l,h,f,p,m,g,v,y,b,_,w,A,E,S,R,D,T,I,O,P,C,L,U,M,j=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:s=this._getAdTypeByAfgPosition(t),t.params.position,o=this._getAdFlow(s),u=this._gameData,d=u.afg_disabled,c=null===(n=u.promo)||void 0===n||null===(r=n.rainbow)||void 0===r?void 0:r.enabled,l=null===(a=u.promo)||void 0===a?void 0:a.onadsense,h="reward"===(null===(i=t.params)||void 0===i?void 0:i.position),f=d?o.filter(function(e){return k.default(this,j),"adsense"!==e}.bind(this)):o,p=this.get_ad_system_init_result(),m=p.afg,g=p.ima,this.adsBlocked=!m&&!g,this.adsBlocked?(Gr("gd-adflow adsBlocked so changing the flow"),f=[f[0]]):(m||(f=f.filter(function(e){return k.default(this,j),"adsense"!==e}.bind(this))),g||(f=f.filter(function(e){return k.default(this,j),"ima"!==e}.bind(this)))),v=!1,y=!1,b=[],_=0,w=!1,A=eb(f),e.prev=21,A.s();case 23:if((E=A.n()).done){e.next=50;break}return S=E.value,t.params.adapter=S,R=_===f.length-1,c&&R&&"ima"===S&&(t.params.runPromoAsImaFallback=!0),D=R&&"adsense"===S&&c&&l&&h,t.params=Zy(Zy({},t.params),{},{adapterIndex:_,isLastAdapter:R,shouldFail:!1,extraPromoRunOnFail:D}),function(){k.default(this,j)}.bind(this),Gr("gd-adflow, before adInvoke",_,S,t.params.shouldFail),e.next=34,this.adInvoke(t);case 34:if(T=e.sent,I=T.success,O=T.args,!I){e.next=44;break}return Gr("gd-adflow, adapter-result-success",_,S,O),v=!0,y=!(null==O||!O.isPromoSuccess),e.abrupt("break",50);case 44:Gr("gd-adflow, adapter-result-failure",_,S,O.message),_++,b.push(O.message),R&&"adsense"===S&&c&&l&&h&&(w=!0);case 48:e.next=23;break;case 50:e.next=55;break;case 52:e.prev=52,e.t0=e.catch(21),A.e(e.t0);case 55:return e.prev=55,A.f(),e.finish(55);case 58:if(!w){e.next=67;break}return t.params.adapter="promo",e.next=63,this.adInvoke(t);case 63:e.sent.success&&(y=!0);case 67:(function(){k.default(this,j)}).bind(this),P=b.join(" /n"),v?(this._setAdRequestTimer(),this._onResumeGame("Advertisement(s) are done. Start / resume the game.","success"),this._giveGift()):(this._onResumeGame(P,"warning"),this._giveGift()),C="-1",L="none",v&&y?C="promo_ima":v?(C="index_".concat(_),L=f[_]):y&&(C="promo_adsense"),U=this.get_session_id(),this.adsBlocked&&"-1"===C?(M="rewarded"===s?"rewarded":this.blockedAdsMap.preroll?"midroll":"preroll",this.blockedAdsMap[M]=this.blockedAdsMap[M]?this.blockedAdsMap[M]+1:1,JSON.stringify(this.blockedAdsMap),this._msgrt.send("adflow.blocked.pos",{message:"".concat(M)}),this.send_atom_event("gd.adflow",{adBlocker:!0,afgBlocked:!0,imaBlocked:!0,adType:M,sessionId:U,successAdapter:"none",adFlowIndex:C})):(this._msgrt.send("adflow.all.index",{message:"".concat(C)}),this._msgrt.send("adflow.all.success_adapter",{message:"".concat(L)}),this._msgrt.send("adflow.".concat(s,".index"),{message:"".concat(C)}),this._msgrt.send("adflow.".concat(s,".success_adapter"),{message:"".concat(L)}),this.send_atom_event("gd.adflow",{adFlowIndex:C,successAdapter:L,adBlocker:!1,afgBlocked:!m,imaBlocked:!g,adType:s,sessionId:U}));case 77:case"end":return e.stop()}}),e,this,[[21,52,55,58]])}))),function(e){return n.apply(this,arguments)})},{key:"adInvoke",value:(t=A.default(x.default.mark((function e(t){var n=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(){var e=A.default(x.default.mark((function e(r,a){var i,s,o,u=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i="main.showad.".concat(t.params.adapter,".").concat(t.params.adapterIndex),s=function(e){k.default(this,u),n._eventBus.unsubscribeScope(i),r({success:!1,args:e})}.bind(this),o=function(e){k.default(this,u),n._eventBus.unsubscribeScope(i),r({success:!0,args:e})}.bind(this),n._eventBus.subscribe("AD_ERROR",s,i),n._eventBus.subscribe("AD_SDK_CANCELED",s,i),n._eventBus.subscribe("AD_SUCCESS",o,i),e.prev=6,e.next=9,n._adInstance.startAd(t);case 9:e.next=15;break;case 11:e.prev=11,e.t0=e.catch(6),Br("gd-adflow startAd error",e.t0),r({success:!1,err:e.t0});case 15:case"end":return e.stop()}}),e,this,[[6,11]])})));return function(t,n){return e.apply(this,arguments)}}()));case 1:case"end":return e.stop()}}),e)}))),function(e){return t.apply(this,arguments)})},{key:"_getAdFlow",value:function(e){var t,n,r,a,i,s,o,u,d=this,c=void function(){k.default(this,d)}.bind(this),l=this._gameData.adflw;c&&(l=c);var h=null!==(t=l)&&void 0!==t&&null!==(n=t.adapters)&&void 0!==n&&n.default?null===(r=l)||void 0===r||null===(a=r.adapters)||void 0===a?void 0:a.default:["ima","adsense"];return h=null!==(i=l)&&void 0!==i&&null!==(s=i.adapters)&&void 0!==s&&s[e]?null===(o=l)||void 0===o||null===(u=o.adapters)||void 0===u?void 0:u[e]:h}}]),e}(),ab=new b.EventEmitter,ib=["https://games.softgames.com","https://sg.gamedistribution.com","https://minigame-stg.aeriagames.jp","https://minigame.aeriagames.jp"];window.addEventListener("message",(function(e){var t=this,n=e.data,r=e.origin,a=e.source;if(ib.some(function(e){return k.default(this,t),e===r}.bind(this))&&(null==n||!n.__tcfapiCall)){var i=n.system;n.action;var s="aeriaExternalHostsConnector"===i;if("Softgames"===i)nb=a,(window.parent||window).postMessage(n,"*"),ab.emit("aeria-event",n);else s&&nb&&nb.postMessage(n,"*")}}),!1);var sb=new(function(){function e(){S.default(this,e)}var t;return D.default(e,[{key:"init",value:function(e){var t=this;this._registerForDataRequests(e),this._askForParentFrameData().then(function(n){if(k.default(this,t),n){var r=n.adRequestTimer;e.adRequestTimer=r,e.adRequestTimer}}.bind(this))}},{key:"_registerForDataRequests",value:function(e){var t=this;window.addEventListener("message",function(n){k.default(this,t);var r=n.data,a=n.origin,i=n.source,s=r.type;if(r.value,"https://html5.gamedistribution.com"===a&&"parent-data-request"===s){var o={adRequestTimer:e.adRequestTimer};i.postMessage({type:"parent-data-response",value:o})}}.bind(this))}},{key:"_askForParentFrameData",value:(t=A.default(x.default.mark((function e(){var t=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(e,n){var r=this;k.default(this,t);var a=!1;window.addEventListener("message",(function(t){var n=t.data,r=t.origin;t.source;var i=n.type,s=n.value;"https://html5.gamedistribution.com"===r&&"parent-data-response"===i&&(e(s),a=!0)})),setTimeout(function(){k.default(this,r),a||e()}.bind(this),1e3);var i={type:"parent-data-request"};window.parent.postMessage(i,"*")}.bind(this)));case 1:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}]),e}());function ob(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 ub(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ob(Object(n),!0).forEach((function(t){R.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ob(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var db,cb=_.v4(),lb=null,hb=null,fb=function(){function e(t){var n=this;if(S.default(this,e),lb)return lb;lb=this,this.blockedAdsMap={},this._defaults=this._getDefaultOptions(),this._extendDefaultOptions(this._defaults,t),this._version=t.version||"0.0.0",this._bridge=this._getBridgeContext(),this._location=new mg,this._location.print(),this._parentURL=0===this._bridge.depth?encodeURIComponent(this._bridge.parentURL):this._bridge.parentURL,this._parentDomain=this._bridge.parentDomain,this._topDomain=this._bridge.topDomain,this._isFullScreen=!1,this._giftCount=0,this._setConsoleBanner(),this._initializeMessageRouter(),this._checkConsole(),this._subscribeToEvents(),this.sdkReady=new Promise(this._initializeSDKWithGameData.bind(this)),this.sdkReady.then(function(e){k.default(this,n),this._sdk_ready=!0}.bind(this)).catch(function(e){k.default(this,n),this._sdk_ready=!1}.bind(this)).finally(function(){var e,t;k.default(this,n),!0===(null===(e=this._gameData.lp)||void 0===e?void 0:e.load)&&this._sendLoadedEvent(1),this._sendLoaderDataEvent(),this._checkSplashAndPromoScreens(),this._initBlockingExternals(),this._initUnityHandler(),this._checkFullscreen(),null!==(t=this._gameData.evnts)&&void 0!==t&&t.enabled&&this._isLoaderGameURL()&&$y(this._gameData),sb.init(this),this._send_gametag_data("sdk_init")}.bind(this)),this._registerSGBridge(),this._whichFrame()}var t,n,r,i,s,o,u,c,l,h,f,p,m;return D.default(e,[{key:"_initUnityHandler",value:function(){var e=this;window.addEventListener("DOMNodeInserted",function(){if(k.default(this,e),this._gameData.block_exts&&this._removeExternalsInHtml({enabled:!1}),document.getElementsByClassName("webgl-content")[0]){var t=document.getElementsByClassName("webgl-content")[0].getElementsByClassName("footer")[0];t&&t.setAttribute("style","display:none")}}.bind(this))}},{key:"_send_gametag_data",value:(m=A.default(x.default.mark((function e(t){var n;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this._getGdModeIfExist()&&(n=a.getMobilePlatform()||"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 m.apply(this,arguments)})},{key:"_loadCMP",value:(p=A.default(x.default.mark((function e(){var t,n,r,a;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._isMasterGameURL()){e.next=6;break}if(r=new mg,0!==(null==(a=r.get("depth"))?void 0:a.value)||null===(t=this._gameData)||void 0===t||null===(n=t.cmp)||void 0===n||!n.enabled||"html5.gamedistribution.com"!==this._topDomain){e.next=6;break}return e.next=6,Vy();case 6:case"end":return e.stop()}}),e,this)}))),function(){return p.apply(this,arguments)})},{key:"testConsent",value:function(){try{jy();A.default(x.default.mark((function e(){return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Gy({});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;Wy.on("splash-hidden",function(t){k.default(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(){if(!this._isLoaded&&(this._isLoaded=!0,"loader-frame"===this._whichFrame()))try{this._whichFrame(),this._sendTunnlEvent(1),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._bridge.isCoreSDKMode&&this._loadGoogleAnalytics(),void 0!==e&&void 0!==e.close_gamedock&&!1!==e.close_gamedock||!this._bridge.isCoreSDKMode&&!this._bridge.noGamedockSDK&&this._loadGamedockTracker(),void 0!==e&&void 0!==e.close_minijuegos&&!1!==e.close_minijuegos||(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=A.default(x.default.mark((function e(t,n){var r,a=this;return x.default.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===(r=this._gameData.disableAds)||void 0===r?void 0:r.default)||!1,this._safeInit(),this._checkGameId(),this._checkGameDeleted(),this._checkBlocking(),this._changeMidrollInDebugMode(),void 0!==this._gameData.diagnostic&&void 0!==this._gameData.diagnostic.close_ads&&!1!==this._gameData.diagnostic.close_ads||(this.videoAdReady=this._initializeVideoAd().then(function(){k.default(this,a),(this._isMasterGameURL()||this._isExtHostedGameURL())&&(this.msgrt.send("adblocker.flw",{message:"ok"}),this.msgrt.send("adblocker.adapters",{message:"none"}))}.bind(this)).catch(function(e){k.default(this,a);var t="".concat(e).startsWith("Error: Blocked:");Gr("gd-adflow adsBlocked",t,e);var n=this.get_ad_system_init_result(),r=n.ima,i=n.afg;if(this.adsBlocked=!r&&!i,this._isMasterGameURL()||this._isExtHostedGameURL()){this.msgrt.send("adblocker.flw",{message:"".concat(this.adsBlocked?"blocked":"ok")});var s=r||i?r?i?"none":"adsense":"ima":"all";this.msgrt.send("adblocker.adapters",{message:"".concat(s)})}console.error(e.message||e)}.bind(this))),t(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"),n(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:"_extendDefaultOptions",value:function(e,t){var n=L.default(e);this.options=t?a.extendDefaults(n,t):n,this.options.gameId=this.options.gameId.trim()}},{key:"_setConsoleBanner",value:function(){if(!this._bridge.noConsoleBanner){var e=Ur.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:"_sendTunnlEvent",value:function(e){var t=this;void 0===this._topDomain&&(this._topDomain=void 0);var n={page_url:this._topDomain||this._parentDomain,game_id:this.options.gameId,eventtype:e,ts:Date.now()};fetch("https://ana.headerlift.com/event?".concat(M.default.stringify(n))).catch(function(e){k.default(this,t)}.bind(this)),this._send_gametag_data("sdk_gameplay")}},{key:"_sendAdRequestContext",value:function(e){this.msgrt.send("adctx",{message:e.adTag.bidder})}},{key:"_checkWhitelabelPartner",value:function(){this._whitelabelPartner=!1;var e=a.getQueryParams("xanthophyll");e.hasOwnProperty("xanthophyll")&&"true"===e.xanthophyll&&(this._whitelabelPartner=!0,a.dankLog("White label publisher","".concat(this._whitelabelPartner),"success"))}},{key:"_checkConsole",value:function(){try{if(!a.Ls.available)return;"developer.gamedistribution.com"===this._parentDomain?(a.Ls.set("gd_debug_ex",!0),a.Ls.set("gd_disable_midroll_timer",!0),a.Ls.set("gd_tag",!0)):"localhost:3000"===this._parentDomain&&(a.Ls.set("gd_debug_ex",!0),a.Ls.set("gd_disable_midroll_timer",!0)),a.Ls.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 a.MessageRouter({gameId:this.options.gameId,hours:(new Date).getHours(),topDomain:this._topDomain,domain:this._parentDomain,referrer:this._parentURL,depth:a.getIframeDepth(),version:Ur.version,tracking:this._userDeclinedTracking,whitelabel:this._whitelabelPartner,platform:a.getMobilePlatform(),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 t=["https://cdn.gamedock.io/gamemonkey-web-tracker/5.0.0/script/gamemonkey-sdk.js"];a.getScript(t[0],"GamedockSDK",{alternates:t}).then(function(){var t,n;k.default(this,e),hb=this._initGamedockTracker(window.GamedockSDK),this._sendGamedockEvent("pageview"),null!==(t=this._gameData.diagnostic)&&void 0!==t&&null!==(n=t.gameDock)&&void 0!==n&&n.adViewEvent&&hb.tracking.enableHeartBeatForPage({pageId:this.options.gameId,pageType:"game"},this._gameData.diagnostic.gameDock.heartbeatConfig),By.track(hb,this._gameData)}.bind(this)).catch(function(t){k.default(this,e),this._sendSDKError(t)}.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=hb)||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 t=["https://ext.minijuegosgratis.com/external-host/main.js"];console.log("noMinijuegosSDK loading"),a.getScript(t[0],"MinijuegosSDK",{alternates:t}).catch(function(t){k.default(this,e),this._sendSDKError(t)}.bind(this))}},{key:"_loadGoogleAnalytics",value:function(){var e=this,t=["https://www.google-analytics.com/analytics.js"];a.getScript(t[0],"gdsdk_google_analytics",{alternates:t,error_prefix:"Blocked:",exists:function(){return k.default(this,e),window.ga}.bind(this)}).then(function(){k.default(this,e),window.ga("create","UA-60359297-49",{name:"gd",cookieExpires:7776e3,sampleRate:5},"auto"),this._bridge.noGAPageView||window.ga("gd.send","pageview"),this._userDeclinedTracking||window.ga("gd.set","anonymizeIp",!0)}.bind(this)).catch(function(t){k.default(this,e),this._sendSDKError(t)}.bind(this))}},{key:"_subscribeToEvents",value:function(){var e=this;this.eventBus=new a.EventBus,a.SDKEvents.forEach(function(t){var n=this;return k.default(this,e),this.eventBus.subscribe(t,function(e){return k.default(this,n),this._onEvent(e)}.bind(this),"sdk")}.bind(this)),a.IMAEvents.forEach(function(t){var n=this;return k.default(this,e),this.eventBus.subscribe(t,function(e){return k.default(this,n),this._onEvent(e)}.bind(this),"ima")}.bind(this)),this.eventBus.subscribe("COMPLETE",function(){if(k.default(this,e),"developer.gamedistribution.com"===this._parentDomain||!0===new RegExp("^localhost").test(this._parentDomain)){fetch("https://game.api.gamedistribution.com/game/v2/hasapi/".concat(this.options.gameId,"?timestamp=").concat((new Date).valueOf()));try{var t=JSON.stringify({type:"GD_SDK_IMPLEMENTED",gameID:this.options.gameId});window.location!==window.top.location?window.top.postMessage(t,"*"):null!==window.opener&&window.opener.location!==window.location&&window.opener.postMessage(t,"*")}catch(e){}}}.bind(this),"ima"),this.eventBus.subscribe("CONTENT_PAUSE_REQUESTED",function(){return k.default(this,e),this.onPauseGame("New advertisements requested and loaded","success")}.bind(this),"ima"),this.eventBus.subscribe("IMPRESSION",function(t){var n,r;k.default(this,e),this.msgrt.send("ad.impression"),null!==(n=this._gameData.diagnostic)&&void 0!==n&&null!==(r=n.gameDock)&&void 0!==r&&r.adViewEvent&&By.track(hb,this._gameData)}.bind(this),"ima"),this.eventBus.subscribe("AD_ERROR",function(t){k.default(this,e),this.msgrt.send("ad.error",{message:t.message,details:t.details})}.bind(this),"ima"),this.eventBus.subscribe("AD_SDK_REQUEST",function(t){k.default(this,e),this._sendAdRequestContext(t.message)}.bind(this),"sdk"),this.eventBus.subscribe("SDK_ERROR",function(t){if(k.default(this,e),t.message.startsWith("Blocked:")){if(!this._bridge.noBlockerEvent&&(this.msgrt.send("error",{message:t.message}),!this._hasBlocker)){this._hasBlocker=!0;var n=Math.random()<.25;this.msgrt.send("adblck.src",{message:t.message}),n&&this._sendTunnlEvent(3)}}else this.msgrt.send("error",{message:t.message})}.bind(this),"sdk"),this.eventBus.subscribe("AD_REQUEST_KEYS_EMPTY",function(t){k.default(this,e),this.msgrt.send("tunnl.keys.empty",{message:t.message,details:t.details})}.bind(this),"sdk"),this.eventBus.subscribe("AD_REQUEST_KEYS_FALLBACK",function(t){k.default(this,e),this.msgrt.send("tunnl.keys.fallback",{message:t.message,details:t.details})}.bind(this),"sdk"),this.eventBus.subscribe("AD_T4R",function(t){return k.default(this,e),this.msgrt.send("adt4r")}.bind(this),"sdk")}},{key:"_checkGameId",value:function(){this.options.gameId===this._defaults.gameId&&this._sendSDKError("Check correctness of your GAME ID. Otherwise, no revenue will be recorded.")}},{key:"_getDefaultGameData",value:function(){return{gameId:this.options.gameId,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;return"https://game.api.gamedistribution.com/game/v4/get/".concat(this.options.gameId.replace(/-/g,""),"/?domain=").concat(e,"&v=").concat(Ur.version,"&localTime=").concat((new Date).getHours())}},{key:"_checkBlocking",value:(h=A.default(x.default.mark((function e(){var t,n,r=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=this._gameData,t=void 0===this._gameData.dmain||this._gameData.dmain,(n.bloc_gard&&!0===n.bloc_gard.enabled||!t)&&(this.msgrt.send("blocked"),setTimeout(function(){k.default(this,r),window.location.href="https://html5.api.gamedistribution.com/blocked.html?".concat(M.default.stringify({domain:this._parentDomain,id:n.gameId,img:this._get_game_thumbnail_url(),title:n.title}))}.bind(this),100));case 5:case"end":return e.stop()}}),e,this)}))),function(){return h.apply(this,arguments)})},{key:"_checkGameDeleted",value:function(){var e=this;6===this._gameData.status&&(console.log("%c %c %c This game was deleted, please remove it in your website... ","background: #F2181A","background: #F23818","color: #fff; background: #F23818;","background: #F55E60","background: #F55E60","background: #c4161e; color: #fff;"),setTimeout(function(){k.default(this,e),document.location="https://html5.api.gamedistribution.com/deleted.html"}.bind(this),100))}},{key:"_changeMidrollInDebugMode",value:function(){var e=this._gameData;a.Ls.available&&a.Ls.getBoolean("gd_debug_ex")&&(a.Ls.getBoolean("gd_disable_midroll_timer")?e.midroll=0:e.midroll=this._getDefaultGameData().midroll)}},{key:"_checkSplashAndPromoScreens",value:function(){var e,t,n;this._gameData.loader&&!1===this._gameData.loader.mobile&&this._getisMobile()&&(this._gameData.loader.enabled=!1);var r,a=this._gameData,i=a.gdpr&&!0===a.gdpr.consent,s=a.loader,o=null===(e=a.promo)||void 0===e?void 0:e[null===(t=a.promo)||void 0===t||null===(n=t.template)||void 0===n?void 0:n.preroll];(a.preroll||(this.adRequestTimer=Date.now()),this.options.loader.enabled)?null!=o&&o.enabled?this._createPromoBeforeSplash(a,i):s.enabled&&!0!==(null===(r=s.splash)||void 0===r?void 0:r.skip)?this._createSplash(a,i):this.onResumeGame("Skipped splash.","success"):s.enabled||this._bridge.isTokenGameURL&&this._bridge.isExtHostedGameURL||(this.options.advertisementSettings.autoplay||i?null!=o&&o.enabled?this._createPromoBeforeSplash(a,i):!1!==s.enabled&&this._createSplash(a,i):null!=o&&o.enabled&&this._createPromo(a,i))}},{key:"_initializeVideoAd",value:(l=A.default(x.default.mark((function e(){var t;return x.default.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=a.extendDefaults(this.options.advertisementSettings,t.sdk)),this.macros=new a.Macros({game:t,bridge:this._bridge}),this.adInstance=new Iy(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=Ur,this.adInstance._send("gd.location",this._location.get()),e.next=17,this.adInstance.start();case 17:case"end":return e.stop()}}),e,this)}))),function(){return l.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){a.dankLog("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){a.dankLog("DEVELOPER_ERROR",e.message,"warning")}}},{key:"_onEvent",value:function(e){a.dankLog(e.name,e.message,e.status);try{this.options.onEvent({name:e.name,message:e.message,status:e.status,skipForward:e.skipForward})}catch(e){a.dankLog("DEVELOPER_ERROR",e.message,"warning")}}},{key:"_getGameData",value:(c=A.default(x.default.mark((function e(){var t;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,$g();case 2:return t=e.sent,this.msgrt.setGameData(t),a.setDankLog(t.diagnostic),e.abrupt("return",t);case 6:case"end":return e.stop()}}),e,this)}))),function(){return c.apply(this,arguments)})},{key:"_createSplash",value:(u=A.default(x.default.mark((function e(t,n){var r,i,s,o,u=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._getSplashTemplate(t);case 2:return r=e.sent,i=new r(ub(ub({},this.options),{},{isConsentDomain:n,version:Ur.version}),t,this._parentDomain),e.next=6,ev();case 6:s=e.sent,o=s.enabled,i.on("playClick",function(){var e=this;if(k.default(this,u),n){var t=new Date;t.setDate(t.getDate()+90),document.cookie="ogdpr_tracking=1; expires=".concat(t.toUTCString(),"; path=/")}this._hideCMPButton(),o?window.gdsdk.showAd(a.AdType.Interstitial,{position:"preroll"}).catch(function(t){k.default(this,e),i.hide()}.bind(this)):(function(){k.default(this,e)}.bind(this),this.showAd(a.AdType.Interstitial,{position:"preroll"}).catch(function(t){k.default(this,e)}.bind(this))),Qy({event:"FirstInteraction",game:this._gameData})}.bind(this)),this.onPauseGame("Pause the game and wait for a user gesture","success"),this.eventBus.subscribe("SDK_GAME_PAUSE",function(){k.default(this,u),i.hide()}.bind(this)),this.eventBus.subscribe("SDK_GAME_START",function(){k.default(this,u),i.hide()}.bind(this));case 12:case"end":return e.stop()}}),e,this)}))),function(e,t){return u.apply(this,arguments)})},{key:"_createPromoBeforeSplash",value:(o=A.default(x.default.mark((function e(t,n){var r,a,i,s,o=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this._createPrerollPromoTemplate(t);case 3:i=e.sent,(s=new i(ub(ub({},this.options),{},{isConsentDomain:n,version:Ur.version,template:null===(r=t.promo)||void 0===r||null===(a=r.template)||void 0===a?void 0:a.preroll}),t)).on("done",function(){k.default(this,o),s.hide(),this._createSplash(t,n)}.bind(this)),e.next=12;break;case 8:e.prev=8,e.t0=e.catch(0),console.log(e.t0),this._createSplash(t,n);case 12:case"end":return e.stop()}}),e,this,[[0,8]])}))),function(e,t){return o.apply(this,arguments)})},{key:"_createPromo",value:(s=A.default(x.default.mark((function e(t,n){var r,a,i,s,o=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this._createPrerollPromoTemplate(t);case 3:i=e.sent,(s=new i(ub(ub({},this.options),{},{isConsentDomain:n,version:Ur.version,template:null===(r=t.promo)||void 0===r||null===(a=r.template)||void 0===a?void 0:a.preroll}),t)).on("done",function(){k.default(this,o),s.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 s.apply(this,arguments)})},{key:"showBanner",value:function(){var e=this;this.showAd(a.AdType.Interstitial).catch(function(){k.default(this,e)}.bind(this))}},{key:"showAd",value:(i=A.default(x.default.mark((function e(t){var n,r=this,a=arguments;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=a.length>1&&void 0!==a[1]?a[1]:{},e.abrupt("return",new Promise(function(){var e=A.default(x.default.mark((function e(a,i){var s,o,u,d;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,o={adType:t,params:n,adTimestamp:r.adRequestTimer},e.next=5,r.sdkReady;case 5:return u=e.sent,e.next=8,r.videoAdReady;case 8:if(null!==(s=r._gameData.lp)&&void 0!==s&&s.load||r._sendLoadedEvent(),r._sendGamedockGamePlay(),r._rejectAdIfGameBlocked({gameData:u,adRequest:o}),r._rejectAdIfAdDisabled({gameData:u,adRequest:o}),r._rejectAdIfUnsupportedType({adRequest:o}),"rewarded"===t&&r._setGameRewardedFlag(),null!=n&&n.isGift||r._rejectAdIfAdRateHits({gameData:u,adRequest:o}),r.adInstance.attachAfgPosition(o),!r.adFlowRunning){e.next=18;break}return e.abrupt("return",a());case 18:return r.adFlowRunning=!0,d=new rb(r),e.next=22,d.runAdFlow(o);case 22:r.adFlowRunning=!1,a(),r._post_message({topic:"adrequest.instream"}),e.next=32;break;case 27:e.prev=27,e.t0=e.catch(0),r.adFlowRunning=!1,r.onResumeGame(e.t0.message,"warning"),i(e.t0.message);case 32:case"end":return e.stop()}}),e,null,[[0,27]])})));return function(t,n){return e.apply(this,arguments)}}()));case 2:case"end":return e.stop()}}),e)}))),function(e){return i.apply(this,arguments)})},{key:"_giveGift",value:function(){var e,t,n,r,a;null!==(e=this._gameData)&&void 0!==e&&null!==(t=e.gft)&&void 0!==t&&t.enabled&&(null===(n=this._gameData)||void 0===n||null===(r=n.gft)||void 0===r||null===(a=r.durations[this._giftCount])||void 0===a?void 0:a.after)===this.adInstance.adMidrollCount&&this.decideToGiveAGift()}},{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.AdType.Interstitial&&t.adType!==a.AdType.Rewarded)throw new Error("Unsupported an advertisement type: ",t.adType)}else t.adType=a.AdType.Interstitial}},{key:"_rejectAdIfRewardedDisabled",value:function(e){var t=e.gameData;if(e.adRequest.adType===a.AdType.Rewarded&&!t.rewardedAds)throw new Error("Rewarded ads are disabled.")}},{key:"_rejectAdIfAdRateHits",value:function(e){var t,n,r,i,s,o,u=e.gameData,d=e.adRequest,c=null;d.adType===a.AdType.Interstitial&&null!==(t=u.diagnostic)&&void 0!==t&&null!==(n=t.useMidrollIndex)&&void 0!==n&&n.enabled&&this.adInstance.noPreroll?this.adInstance.adMidrollCount>(null===(r=u.diagnostic)||void 0===r||null===(i=r.useMidrollIndex)||void 0===i?void 0:i.indexes.length)-1||(c=6e4*(null===(s=u.diagnostic)||void 0===s||null===(o=s.useMidrollIndex)||void 0===o?void 0:o.indexes[this.adInstance.adMidrollCount])):c=u.midroll;if(d.adType===a.AdType.Interstitial&&void 0!==this.adRequestTimer&&Date.now()-this.adRequestTimer<c)throw new Error("The advertisement was requested too soon.")}},{key:"preloadAd",value:(r=A.default(x.default.mark((function e(t){var n=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(){var e=A.default(x.default.mark((function e(r,i){var s,o;return x.default.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.bloc_gard||!0!==s.bloc_gard.enabled){e.next=8;break}throw new Error("Game or domain is blocked.");case 8:if(!s.disableAds[t]&&!n._whitelabelPartner){e.next=10;break}throw new Error("Advertisements are disabled for this ad type => ".concat(t,"..."));case 10:if(t){e.next=14;break}t=a.AdType.Rewarded,e.next=16;break;case 14:if(t===a.AdType.Interstitial||t===a.AdType.Rewarded){e.next=16;break}throw new Error("Unsupported an advertisement type:"+t);case 16:return e.next=18,n.adInstance.preloadAd(t);case 18:o=e.sent,r(o),e.next=25;break;case 22:e.prev=22,e.t0=e.catch(0),i(e.t0);case 25:case"end":return e.stop()}}),e,null,[[0,22]])})));return function(t,n){return e.apply(this,arguments)}}()));case 1:case"end":return e.stop()}}),e)}))),function(e){return r.apply(this,arguments)})},{key:"cancelAd",value:(n=A.default(x.default.mark((function e(){var t=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(){var e=A.default(x.default.mark((function e(n,r){return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:try{t.adInstance.cancel(),t.onResumeGame("Advertisement(s) are cancelled. Start / resume the game.","success"),r()}catch(e){t.onResumeGame("Advertisement(s) are cancelled. Start / resume the game.","success"),n(e.message)}case 1:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()));case 1:case"end":return e.stop()}}),e)}))),function(){return n.apply(this,arguments)})},{key:"showDisplayAd",value:function(e){var t=this;return new Promise(function(){var n=A.default(x.default.mark((function n(r,a){var i;return x.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,t.sdkReady;case 3:return i=n.sent,n.next=6,t.videoAdReady;case 6:if(!i.dAds.enabled){n.next=13;break}return n.next=9,t.adInstance.loadDisplayAd(e);case 9:t._post_message({topic:"adrequest.display"}),r(),n.next=14;break;case 13:a("Display-Ads are disabled.");case 14:n.next=19;break;case 16:n.prev=16,n.t0=n.catch(0),a(n.t0.message||n.t0);case 19:case"end":return n.stop()}}),n,null,[[0,16]])})));return function(e,t){return n.apply(this,arguments)}}())}},{key:"onResumeGame",value:function(e,t){var n;this._allowExternals({enabled:!1});try{this.options.resumeGame()}catch(e){console.log("gd-adflow error onResumeGame",e),a.dankLog("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(),null===(n=this._gameData.evnts)||void 0===n||!n.enabled||this._isMasterGameURL()&&!this._isExtHostedGameURL()||Qy({event:"GameStarted",game:this._gameData})}},{key:"onPauseGame",value:function(e,t){var n;this._allowExternals({enabled:!0});try{this.options.pauseGame()}catch(e){a.dankLog("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()||Qy({event:"GamePaused",game:this._gameData})}},{key:"openConsole",value:function(){try{new a.ImplementationTest(this).start(),a.Ls.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 t=this._gameData;t.sdk.fullscreen&&"auto"===t.sdk.fullscreen&&document.addEventListener("click",function(){if(k.default(this,e),!this._isFullScreen){var t=document.body,n=t.requestFullScreen||t.webkitRequestFullScreen||t.mozRequestFullScreen||t.msRequestFullscreen;if(n)n.call(t);else if(void 0!==window.ActiveXObject){var r=new ActiveXObject("WScript.Shell");null!==r&&r.SendKeys("{F11}")}this._isFullScreen=!0}}.bind(this))}catch(e){console.log("Fullscreen error handled...",e)}}},{key:"_allowExternals",value:function(e){var t=this;void 0!==this.window_open&&(!1===e.enabled?window.open=function(e){k.default(this,t),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:"_removeExternalsInHtml",value:function(e){var t=this;!1===e.enabled&&window.document.querySelectorAll("a").forEach(function(e){var n=this;k.default(this,t);var r=!!(e.innerText.toLowerCase().includes("start")||e.innerText.toLowerCase().includes("play")||e.innerText.toLowerCase().includes("continue")),a=e.getAttribute("href");e.removeAttribute("href"),r||(e.onclick=function(e){return k.default(this,n),e.preventDefault(),this.msgrt.send("external",{message:"H> ".concat(a)}),!1}.bind(this))}.bind(this))}},{key:"_getBridgeContext",value:function(){var e=this._isTokenGameURL(),t=this._isMasterGameURL(),n=this._isExtHostedGameURL(),r=e||n?this._getTokenGameURLConfig():{};r=r||{};var i=decodeURIComponent((e||n)&&r.parentURL?r.parentURL:a.getParentUrl()),s=decodeURIComponent((e||n)&&r.parentDomain?r.parentDomain:a.getParentDomain()),o=decodeURIComponent((e||n)&&r.topDomain?r.topDomain:n&&0===a.getIframeDepth()?s:a.getTopDomain()),u=(e||n)&&r.loaderEnabled,d=(e||n)&&r.loaderEnabled,c=(e||n)&&r.loaderEnabled,l=(e||n)&&r.loaderEnabled,h=(e||n)&&r.loaderEnabled,f=(e||n)&&r.loaderEnabled,p=(e||n)&&r.loaderEnabled,m=(e||n)&&r.loaderEnabled,g=(e||n)&&r.loaderEnabled&&r.hasImpression&&r.version>="1.1.24";return{isTokenGameURL:e,isMasterGameURL:t,isExtHostedGameURL:n,noConsoleBanner:u,noLoadedEvent:d,noBlockerEvent:c,noPreroll:m,parentURL:i,parentDomain:s,topDomain:o&&o.length?o:s,noGAPageView:l,noLotamePageView:h,noGamedockSDK:f,noMinijuegosSDK:p,version:r.version,pauseGameOnStartup:g,depth:a.getIframeDepth(),domainMatched:s===o,exports:{formatTokenURLSearch:this._formatTokenURLSearch.bind(this),extendUrlQuery:this._extendUrlQuery.bind(this),base64Encode:this._base64_encode.bind(this)}}}},{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:"_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 T.default(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 T.default(document.referrer,!0);if(!r.query.gd_zone_config)return;e=r.query.gd_zone_config}else{var a=new T.default(location.href,!0);if(!a.query.gd_zone_config)return;e=a.query.gd_zone_config}return JSON.parse(d.Base64.decode(decodeURIComponent(e)))}catch(e){}}},{key:"_getSplashTemplate",value:function(e){var t=e.splash;return new Py(t).splash()}},{key:"_createPrerollPromoTemplate",value:(t=A.default(x.default.mark((function e(t){var n,r,a,i,s;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=null===(n=t.promo)||void 0===n?void 0:n[null===(r=t.promo)||void 0===r||null===(a=r.template)||void 0===a?void 0:a.preroll],s=new Oy(i),e.abrupt("return",s.promo());case 3:case"end":return e.stop()}}),e)}))),function(e){return t.apply(this,arguments)})},{key:"_formatTokenURLSearch",value:function(e){var t="";try{t=encodeURIComponent(d.Base64.encode(JSON.stringify(e)))}catch(e){}try{var n=new T.default(location.href,!0);return n.query=n.query||{},n.query.gd_zone_config=t,"?".concat(M.default.stringify(n.query))}catch(e){return"?gd_zone_config=".concat(t)}}},{key:"_extendUrlQuery",value:function(e,t){var n=new T.default(e,!0);return n.query=ub(ub({},n.query),t),n.toString()}},{key:"_base64_encode",value:function(e){return d.Base64.encode(JSON.stringify(e))}},{key:"session",value:function(){var e=this;return new Promise(function(){var t=A.default(x.default.mark((function t(n,r){var a;return x.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e.sdkReady;case 3:t.next=7;break;case 5:t.prev=5,t.t0=t.catch(0);case 7:a=e._gameData,n({ads:{display:{enabled:a.dAds.enabled},rewarded:{enabled:a.rewardedAds}},location:{parentDomain:e._bridge.parentDomain,topDomain:e._bridge.topDomain,parentURL:e._bridge.parentURL,depth:e._bridge.depth,loadedByGameZone:e._bridge.isTokenGameURL}});case 9:case"end":return t.stop()}}),t,null,[[0,5]])})));return function(e,n){return t.apply(this,arguments)}}())}},{key:"sendGenericEvent",value:function(e){console.log("Received generic event",e,this._isMasterGameURL());try{var t,n;if("track-milestone"==e.eventName)hb.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,t=this._gameData,n=t.assets.find(function(t){return k.default(this,e),t.hasOwnProperty("name")&&512===t.width&&512===t.height}.bind(this));return n||(n=t.assets.length>0?t.assets[0]:{name:"logo.svg"}),"https://img.gamedistribution.com/".concat(n.name)}},{key:"_post_message",value:function(e){var t,n=e.topic,r=e.data,a=null!==(t=location.ancestorOrigins)&&void 0!==t&&t.length?location.ancestorOrigins[location.ancestorOrigins.length-1]:"*";try{var i=window.top||window.parent;i&&i.postMessage({source:"gdsdk",topic:n,data:r},a)}catch(e){console.error((null==e?void 0:e.message)||e)}}},{key:"decideToGiveAGift",value:function(){var e=this;try{var t,n=null===(t=this._gameData)||void 0===t?void 0:t.gft,r=setInterval(A.default(x.default.mark((function t(){var n=this;return x.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.adInstance.requestRunning||e.adFlowRunning?console.log("Advertisement already running..."):(e.showAd(a.AdType.Interstitial,{position:"midroll",isGift:!0}).catch(function(e){k.default(this,n)}.bind(this)),clearInterval(r),e._giftCount++);case 1:case"end":return t.stop()}}),t,this)}))),1e3*n.durations[this._giftCount].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 cb}},{key:"get_ad_system_init_result",value:function(){return{afg:this.adInstance.afgInitSuccess,ima:this.adInstance.imaInitSuccess}}},{key:"_setGameRewardedFlag",value:function(){try{if("developer.gamedistribution.com"===this._parentDomain||!0===new RegExp("^localhost").test(this._parentDomain)){fetch("https://game.api.gamedistribution.com/game/v2/hasrewarded/".concat(this.options.gameId,"?timestamp=").concat((new Date).valueOf()));try{var e=JSON.stringify({type:"GD_SDK_REWARDED_SET",gameID:this.options.gameId});window.location!==window.top.location?window.top.postMessage(e,"*"):null!==window.opener&&window.opener.location!==window.location&&window.opener.postMessage(e,"*")}catch(e){}}}catch(e){}}},{key:"_getGdModeIfExist",value:function(){var e=this,t=new Proxy(new URLSearchParams(window.location.search),{get:function(t,n){return k.default(this,e),t.get(n)}.bind(this)});return!t.gd_mode&&window.location.search.includes("gd_mode")?window.location.search.split("gd_mode=")[1]:t.gd_mode}}]),e}(),pb={},mb=function(e){try{if(e.skipForward)return;if(pb.source){var t={type:"gd-sdk-on-event",event:e};pb.source.postMessage(t,pb.origin)}}catch(e){console.log("gd-sdk forwardEvent err",e)}},gb=function(){mb({name:"SDK_READY",status:"success",message:"Everything is ready."}),mb({name:"SDK_GAME_START",status:"success",message:"Advertisement(s) are done. Start / resume the game."}),mb({name:"CONTENT_RESUME_REQUESTED",status:"success",message:"Fired when content should be resumed. This usually happens when an ad finishes or collapses."})},vb=function(e){window.addEventListener("message",(function(t){var n=t.data,r=t.origin,a=t.source,i=n.type,s=n.method,o=n.options;if("gd-sdk-self"!==i){if("gd-sdk"===i){if(!pb.source&&"init"===s)return function(e){var t=e.source,n=e.origin;pb={source:t,origin:n}}({source:a,origin:r}),void gb();var u=e[s];u&&A.default(x.default.mark((function t(){var n,r=this;return x.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,function(){k.default(this,r),"showAd"===s&&Nr.firstAdapterModeAdsense&&"rewarded"!==o.adType&&(console.log("promo-test, set first adapter to adssense 3"),o.params=o.params?o.params:{},o.params.adapter="adsense")}.bind(this),!(n=u.apply(e,Object.values(o)))||!n.then){t.next=6;break}return t.next=6,n;case 6:t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0),console.log("gd:adp:m:r onFrameMessage error",t.t0);case 11:case"end":return t.stop()}}),t,this,[[0,8]])})))()}}else{var d={type:"gd-sdk",method:s,options:o};window.postMessage(d,location.origin)}}),!1)},yb=function(e){!function(e){var t=e.onEvent;e.onEvent=function(e){mb(e),t.apply(this,arguments)}}(e);var t=new fb(e);return vb(t),t},bb=function(e){try{var t=Fg(e);e.gameId||t.send("nogameid",{message:"".concat(Fh.parentURL)})}catch(e){}},_b={create:function(){var e=A.default(x.default.mark((function e(t){var n,r;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,bb(t),Ng=Fg(Kg=t),e.next=5,uv();case 5:return n=e.sent,r=n?iv(t):yb(t),tv(),e.abrupt("return",r);case 11:return e.prev=11,e.t0=e.catch(0),console.log("gd:adp: sdk adaptor create failed, fallback to default adapter",e.t0),e.abrupt("return",yb(t));case 15:case"end":return e.stop()}}),e,null,[[0,11]])})));return function(t){return e.apply(this,arguments)}}()};function wb(){return(wb=A.default(x.default.mark((function e(t,n){var r;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,av();case 2:if(!e.sent){e.next=7;break}e.t0=window.gdsdk,e.next=10;break;case 7:return e.next=9,kb(t);case 9:e.t0=e.sent;case 10:return r=e.t0,e.abrupt("return",n(r));case 12:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Ab=!1;function kb(e){var t=this;return new Promise(function(n,r){var a=this;if(k.default(this,t),db)return n(db);if(Ab)var i=setInterval(function(){k.default(this,a),db&&(Ab=!1,clearInterval(i),n(db))}.bind(this),100);else Ab=!0,_b.create(e).then(function(e){k.default(this,a),db=e,e._sendSDKReady(),Ab=!1,n(db)}.bind(this))}.bind(this))}var Eb,xb=(kb(Eb=function(){var e={};try{"object"===("undefined"==typeof GD_OPTIONS?"undefined":E.default(GD_OPTIONS))&&GD_OPTIONS?e=GD_OPTIONS:window.gdApi&&"object"===E.default(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}()),{invoke:function(e){return function(e,t){return wb.apply(this,arguments)}(Eb,e)}});function Sb(){var e=this;this.AdType=a.AdType,this.preloadAd=function(e){var t=this;return xb.invoke(function(n){return k.default(this,t),n.preloadAd(e)}.bind(this))},this.showAd=function(){var e=A.default(x.default.mark((function e(t,n){var r=this;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",xb.invoke(function(e){var i=this;if(k.default(this,r),t===a.AdType.Display)return e.showDisplayAd(n);return function(){k.default(this,i)}.bind(this),e.showAd(t,{})}.bind(this)));case 1:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}(),this.cancelAd=function(){var e=this;return xb.invoke(function(t){return k.default(this,e),t.cancelAd()}.bind(this))},this.openConsole=function(){var e=this;return xb.invoke(function(t){return k.default(this,e),t.openConsole()}.bind(this))},this.getSession=function(){var e=this;return xb.invoke(function(t){return k.default(this,e),t.session()}.bind(this))},this.sendEvent=function(e){var t=this;return xb.invoke(function(n){return k.default(this,t),n.sendGenericEvent(e)}.bind(this))},this.leaderboard={show:function(){k.default(this,e),Ol.showLeaderboard()}.bind(this),addScore:function(t){k.default(this,e),Ol.addScore(t)}.bind(this)}}Sb.prototype=new function(){this.showBanner=function(){var e=this;return xb.invoke(function(t){return k.default(this,e),t.showBanner()}.bind(this))},this.play=function(){},this.customLog=function(){}},window.gdsdk=new Sb,window.gdApi=window.gdsdk;