@bygd/gd-sdk-pes 1.34.1 → 1.35.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- import e from"@babel/runtime/helpers/asyncToGenerator";import t from"@babel/runtime/helpers/newArrowCheck";import n from"@babel/runtime/helpers/typeof";import r from"@babel/runtime/regenerator";import{parseJSON as i,getParentUrl as a,getParentDomain as s,getIframeDepth as o,getQueryParams as c,getTopDomain as d,getMobilePlatform as u,MessageRouter as l,extendDefaults as h,dankLog as p,getScript as f,Ls as m,AdType as g,Layers as v,getKeyByValue as b,getQueryString as y,EventBus as _,getIMASampleTags as w,SDKEvents as A,IMAEvents as k,Macros as E,setDankLog as x,ImplementationTest as S}from"@bygd/gd-sdk-era/dist/default";import R from"@babel/runtime/helpers/createClass";import D from"@babel/runtime/helpers/classCallCheck";import T from"@babel/runtime/helpers/defineProperty";import O from"url-parse";import{Base64 as I}from"js-base64";import P from"validator";import C from"is-valid-domain";import L from"get-value";import U from"set-value";import M from"lodash.clonedeep";import{EventEmitter as j}from"events";import B from"can-autoplay";import{isPlainObject as G}from"is-plain-object";import N from"querystringify";import q from"lodash.merge";import{v4 as F}from"uuid";var V="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},z=function(e){return e&&e.Math==Math&&e},H=z("object"==typeof globalThis&&globalThis)||z("object"==typeof window&&window)||z("object"==typeof self&&self)||z("object"==typeof V&&V)||function(){return this}()||Function("return this")(),W={exports:{}},K=H,$=Object.defineProperty,Q=function(e,t){try{$(K,e,{value:t,configurable:!0,writable:!0})}catch(n){K[e]=t}return t},Y=Q,J="__core-js_shared__",X=H[J]||Y(J,{}),Z=X;(W.exports=function(e,t){return Z[e]||(Z[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.30.1",mode:"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.30.1/LICENSE",source:"https://github.com/zloirock/core-js"});var ee,te,ne=function(e){try{return!!e()}catch(e){return!0}},re=!ne((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),ie=re,ae=Function.prototype,se=ae.call,oe=ie&&ae.bind.bind(se,se),ce=ie?oe:function(e){return function(){return se.apply(e,arguments)}},de=function(e){return null==e},ue=de,le=TypeError,he=function(e){if(ue(e))throw le("Can't call method on "+e);return e},pe=he,fe=Object,me=function(e){return fe(pe(e))},ge=me,ve=ce({}.hasOwnProperty),be=Object.hasOwn||function(e,t){return ve(ge(e),t)},ye=ce,_e=0,we=Math.random(),Ae=ye(1..toString),ke=function(e){return"Symbol("+(void 0===e?"":e)+")_"+Ae(++_e+we,36)},Ee="undefined"!=typeof navigator&&String(navigator.userAgent)||"",xe=H,Se=Ee,Re=xe.process,De=xe.Deno,Te=Re&&Re.versions||De&&De.version,Oe=Te&&Te.v8;Oe&&(te=(ee=Oe.split("."))[0]>0&&ee[0]<4?1:+(ee[0]+ee[1])),!te&&Se&&(!(ee=Se.match(/Edge\/(\d+)/))||ee[1]>=74)&&(ee=Se.match(/Chrome\/(\d+)/))&&(te=+ee[1]);var Ie=te,Pe=Ie,Ce=ne,Le=!!Object.getOwnPropertySymbols&&!Ce((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Pe&&Pe<41})),Ue=Le&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Me=H,je=W.exports,Be=be,Ge=ke,Ne=Le,qe=Ue,Fe=Me.Symbol,Ve=je("wks"),ze=qe?Fe.for||Fe:Fe&&Fe.withoutSetter||Ge,He=function(e){return Be(Ve,e)||(Ve[e]=Ne&&Be(Fe,e)?Fe[e]:ze("Symbol."+e)),Ve[e]},We={};We[He("toStringTag")]="z";var Ke="[object z]"===String(We),$e="object"==typeof document&&document.all,Qe={all:$e,IS_HTMLDDA:void 0===$e&&void 0!==$e},Ye=Qe.all,Je=Qe.IS_HTMLDDA?function(e){return"function"==typeof e||e===Ye}:function(e){return"function"==typeof e},Xe={},Ze=!ne((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),et=Je,tt=Qe.all,nt=Qe.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:et(e)||e===tt}:function(e){return"object"==typeof e?null!==e:et(e)},rt=nt,it=H.document,at=rt(it)&&rt(it.createElement),st=function(e){return at?it.createElement(e):{}},ot=st,ct=!Ze&&!ne((function(){return 7!=Object.defineProperty(ot("div"),"a",{get:function(){return 7}}).a})),dt=Ze&&ne((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),ut=nt,lt=String,ht=TypeError,pt=function(e){if(ut(e))return e;throw ht(lt(e)+" is not an object")},ft=re,mt=Function.prototype.call,gt=ft?mt.bind(mt):function(){return mt.apply(mt,arguments)},vt=H,bt=Je,yt=function(e,t){return arguments.length<2?(n=vt[e],bt(n)?n:void 0):vt[e]&&vt[e][t];var n},_t=ce({}.isPrototypeOf),wt=yt,At=Je,kt=_t,Et=Object,xt=Ue?function(e){return"symbol"==typeof e}:function(e){var t=wt("Symbol");return At(t)&&kt(t.prototype,Et(e))},St=String,Rt=function(e){try{return St(e)}catch(e){return"Object"}},Dt=Je,Tt=Rt,Ot=TypeError,It=function(e){if(Dt(e))return e;throw Ot(Tt(e)+" is not a function")},Pt=It,Ct=de,Lt=function(e,t){var n=e[t];return Ct(n)?void 0:Pt(n)},Ut=gt,Mt=Je,jt=nt,Bt=TypeError,Gt=gt,Nt=nt,qt=xt,Ft=Lt,Vt=function(e,t){var n,r;if("string"===t&&Mt(n=e.toString)&&!jt(r=Ut(n,e)))return r;if(Mt(n=e.valueOf)&&!jt(r=Ut(n,e)))return r;if("string"!==t&&Mt(n=e.toString)&&!jt(r=Ut(n,e)))return r;throw Bt("Can't convert object to primitive value")},zt=TypeError,Ht=He("toPrimitive"),Wt=function(e,t){if(!Nt(e)||qt(e))return e;var n,r=Ft(e,Ht);if(r){if(void 0===t&&(t="default"),n=Gt(r,e,t),!Nt(n)||qt(n))return n;throw zt("Can't convert object to primitive value")}return void 0===t&&(t="number"),Vt(e,t)},Kt=xt,$t=function(e){var t=Wt(e,"string");return Kt(t)?t:t+""},Qt=Ze,Yt=ct,Jt=dt,Xt=pt,Zt=$t,en=TypeError,tn=Object.defineProperty,nn=Object.getOwnPropertyDescriptor,rn="enumerable",an="configurable",sn="writable";Xe.f=Qt?Jt?function(e,t,n){if(Xt(e),t=Zt(t),Xt(n),"function"==typeof e&&"prototype"===t&&"value"in n&&sn in n&&!n[sn]){var r=nn(e,t);r&&r[sn]&&(e[t]=n.value,n={configurable:an in n?n[an]:r[an],enumerable:rn in n?n[rn]:r[rn],writable:!1})}return tn(e,t,n)}:tn:function(e,t,n){if(Xt(e),t=Zt(t),Xt(n),Yt)try{return tn(e,t,n)}catch(e){}if("get"in n||"set"in n)throw en("Accessors not supported");return"value"in n&&(e[t]=n.value),e};var on={exports:{}},cn=Ze,dn=be,un=Function.prototype,ln=cn&&Object.getOwnPropertyDescriptor,hn=dn(un,"name"),pn={EXISTS:hn,PROPER:hn&&"something"===function(){}.name,CONFIGURABLE:hn&&(!cn||cn&&ln(un,"name").configurable)},fn=Je,mn=X,gn=ce(Function.toString);fn(mn.inspectSource)||(mn.inspectSource=function(e){return gn(e)});var vn,bn,yn,_n=mn.inspectSource,wn=Je,An=H.WeakMap,kn=wn(An)&&/native code/.test(String(An)),En=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},xn=Xe,Sn=En,Rn=Ze?function(e,t,n){return xn.f(e,t,Sn(1,n))}:function(e,t,n){return e[t]=n,e},Dn=W.exports,Tn=ke,On=Dn("keys"),In=function(e){return On[e]||(On[e]=Tn(e))},Pn={},Cn=kn,Ln=H,Un=nt,Mn=Rn,jn=be,Bn=X,Gn=In,Nn=Pn,qn="Object already initialized",Fn=Ln.TypeError,Vn=Ln.WeakMap;if(Cn||Bn.state){var zn=Bn.state||(Bn.state=new Vn);zn.get=zn.get,zn.has=zn.has,zn.set=zn.set,vn=function(e,t){if(zn.has(e))throw Fn(qn);return t.facade=e,zn.set(e,t),t},bn=function(e){return zn.get(e)||{}},yn=function(e){return zn.has(e)}}else{var Hn=Gn("state");Nn[Hn]=!0,vn=function(e,t){if(jn(e,Hn))throw Fn(qn);return t.facade=e,Mn(e,Hn,t),t},bn=function(e){return jn(e,Hn)?e[Hn]:{}},yn=function(e){return jn(e,Hn)}}var Wn={set:vn,get:bn,has:yn,enforce:function(e){return yn(e)?bn(e):vn(e,{})},getterFor:function(e){return function(t){var n;if(!Un(t)||(n=bn(t)).type!==e)throw Fn("Incompatible receiver, "+e+" required");return n}}},Kn=ce,$n=ne,Qn=Je,Yn=be,Jn=Ze,Xn=pn.CONFIGURABLE,Zn=_n,er=Wn.enforce,tr=Wn.get,nr=String,rr=Object.defineProperty,ir=Kn("".slice),ar=Kn("".replace),sr=Kn([].join),or=Jn&&!$n((function(){return 8!==rr((function(){}),"length",{value:8}).length})),cr=String(String).split("String"),dr=on.exports=function(e,t,n){"Symbol("===ir(nr(t),0,7)&&(t="["+ar(nr(t),/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!Yn(e,"name")||Xn&&e.name!==t)&&(Jn?rr(e,"name",{value:t,configurable:!0}):e.name=t),or&&n&&Yn(n,"arity")&&e.length!==n.arity&&rr(e,"length",{value:n.arity});try{n&&Yn(n,"constructor")&&n.constructor?Jn&&rr(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var r=er(e);return Yn(r,"source")||(r.source=sr(cr,"string"==typeof t?t:"")),e};Function.prototype.toString=dr((function(){return Qn(this)&&tr(this).source||Zn(this)}),"toString");var ur=Je,lr=Xe,hr=on.exports,pr=Q,fr=function(e,t,n,r){r||(r={});var i=r.enumerable,a=void 0!==r.name?r.name:t;if(ur(n)&&hr(n,a,r),r.global)i?e[t]=n:pr(t,n);else{try{r.unsafe?e[t]&&(i=!0):delete e[t]}catch(e){}i?e[t]=n:lr.f(e,t,{value:n,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return e},mr=ce,gr=mr({}.toString),vr=mr("".slice),br=function(e){return vr(gr(e),8,-1)},yr=Ke,_r=Je,wr=br,Ar=He("toStringTag"),kr=Object,Er="Arguments"==wr(function(){return arguments}()),xr=yr?wr: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=kr(e),Ar))?n:Er?wr(t):"Object"==(r=wr(t))&&_r(t.callee)?"Arguments":r},Sr=xr,Rr=Ke?{}.toString:function(){return"[object "+Sr(this)+"]"};Ke||fr(Object.prototype,"toString",Rr,{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},Tr=st("span").classList,Or=Tr&&Tr.constructor&&Tr.constructor.prototype,Ir=Or===Object.prototype?void 0:Or,Pr=br,Cr=ce,Lr=function(e){if("Function"===Pr(e))return Cr(e)},Ur=It,Mr=re,jr=Lr(Lr.bind),Br=function(e,t){return Ur(e),void 0===t?e:Mr?jr(e,t):function(){return e.apply(t,arguments)}},Gr=ne,Nr=br,qr=Object,Fr=ce("".split),Vr=Gr((function(){return!qr("z").propertyIsEnumerable(0)}))?function(e){return"String"==Nr(e)?Fr(e,""):qr(e)}:qr,zr=Math.ceil,Hr=Math.floor,Wr=Math.trunc||function(e){var t=+e;return(t>0?Hr:zr)(t)},Kr=function(e){var t=+e;return t!=t||0===t?0:Wr(t)},$r=Kr,Qr=Math.min,Yr=function(e){return e>0?Qr($r(e),9007199254740991):0},Jr=Yr,Xr=function(e){return Jr(e.length)},Zr=br,ei=Array.isArray||function(e){return"Array"==Zr(e)},ti=ce,ni=ne,ri=Je,ii=xr,ai=_n,si=function(){},oi=[],ci=yt("Reflect","construct"),di=/^\s*(?:class|function)\b/,ui=ti(di.exec),li=!di.exec(si),hi=function(e){if(!ri(e))return!1;try{return ci(si,oi,e),!0}catch(e){return!1}},pi=function(e){if(!ri(e))return!1;switch(ii(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return li||!!ui(di,ai(e))}catch(e){return!0}};pi.sham=!0;var fi=!ci||ni((function(){var e;return hi(hi.call)||!hi(Object)||!hi((function(){e=!0}))||e}))?pi:hi,mi=ei,gi=fi,vi=nt,bi=He("species"),yi=Array,_i=function(e){var t;return mi(e)&&(t=e.constructor,(gi(t)&&(t===yi||mi(t.prototype))||vi(t)&&null===(t=t[bi]))&&(t=void 0)),void 0===t?yi:t},wi=function(e,t){return new(_i(e))(0===t?0:t)},Ai=Br,ki=Vr,Ei=me,xi=Xr,Si=wi,Ri=ce([].push),Di=function(e){var t=1==e,n=2==e,r=3==e,i=4==e,a=6==e,s=7==e,o=5==e||a;return function(c,d,u,l){for(var h,p,f=Ei(c),m=ki(f),g=Ai(d,u),v=xi(m),b=0,y=l||Si,_=t?y(c,v):n||s?y(c,0):void 0;v>b;b++)if((o||b in m)&&(p=g(h=m[b],b,f),e))if(t)_[b]=p;else if(p)switch(e){case 3:return!0;case 5:return h;case 6:return b;case 2:Ri(_,h)}else switch(e){case 4:return!1;case 7:Ri(_,h)}return a?-1:r||i?i:_}},Ti={forEach:Di(0),map:Di(1),filter:Di(2),some:Di(3),every:Di(4),find:Di(5),findIndex:Di(6),filterReject:Di(7)},Oi=ne,Ii=function(e,t){var n=[][e];return!!n&&Oi((function(){n.call(null,t||function(){return 1},1)}))},Pi=Ti.forEach,Ci=H,Li=Dr,Ui=Ir,Mi=Ii("forEach")?[].forEach:function(e){return Pi(this,e,arguments.length>1?arguments[1]:void 0)},ji=Rn,Bi=function(e){if(e&&e.forEach!==Mi)try{ji(e,"forEach",Mi)}catch(t){e.forEach=Mi}};for(var Gi in Li)Li[Gi]&&Bi(Ci[Gi]&&Ci[Gi].prototype);Bi(Ui);var Ni={},qi={},Fi={}.propertyIsEnumerable,Vi=Object.getOwnPropertyDescriptor,zi=Vi&&!Fi.call({1:2},1);qi.f=zi?function(e){var t=Vi(this,e);return!!t&&t.enumerable}:Fi;var Hi=Vr,Wi=he,Ki=function(e){return Hi(Wi(e))},$i=Ze,Qi=gt,Yi=qi,Ji=En,Xi=Ki,Zi=$t,ea=be,ta=ct,na=Object.getOwnPropertyDescriptor;Ni.f=$i?na:function(e,t){if(e=Xi(e),t=Zi(t),ta)try{return na(e,t)}catch(e){}if(ea(e,t))return Ji(!Qi(Yi.f,e,t),e[t])};var ra={},ia=Kr,aa=Math.max,sa=Math.min,oa=function(e,t){var n=ia(e);return n<0?aa(n+t,0):sa(n,t)},ca=Ki,da=oa,ua=Xr,la=function(e){return function(t,n,r){var i,a=ca(t),s=ua(a),o=da(r,s);if(e&&n!=n){for(;s>o;)if((i=a[o++])!=i)return!0}else for(;s>o;o++)if((e||o in a)&&a[o]===n)return e||o||0;return!e&&-1}},ha={includes:la(!0),indexOf:la(!1)},pa=be,fa=Ki,ma=ha.indexOf,ga=Pn,va=ce([].push),ba=function(e,t){var n,r=fa(e),i=0,a=[];for(n in r)!pa(ga,n)&&pa(r,n)&&va(a,n);for(;t.length>i;)pa(r,n=t[i++])&&(~ma(a,n)||va(a,n));return a},ya=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],_a=ba,wa=ya.concat("length","prototype");ra.f=Object.getOwnPropertyNames||function(e){return _a(e,wa)};var Aa={};Aa.f=Object.getOwnPropertySymbols;var ka=yt,Ea=ra,xa=Aa,Sa=pt,Ra=ce([].concat),Da=ka("Reflect","ownKeys")||function(e){var t=Ea.f(Sa(e)),n=xa.f;return n?Ra(t,n(e)):t},Ta=be,Oa=Da,Ia=Ni,Pa=Xe,Ca=function(e,t,n){for(var r=Oa(t),i=Pa.f,a=Ia.f,s=0;s<r.length;s++){var o=r[s];Ta(e,o)||n&&Ta(n,o)||i(e,o,a(t,o))}},La=ne,Ua=Je,Ma=/#|\.prototype\./,ja=function(e,t){var n=Ga[Ba(e)];return n==qa||n!=Na&&(Ua(t)?La(t):!!t)},Ba=ja.normalize=function(e){return String(e).replace(Ma,".").toLowerCase()},Ga=ja.data={},Na=ja.NATIVE="N",qa=ja.POLYFILL="P",Fa=ja,Va=H,za=Ni.f,Ha=Rn,Wa=fr,Ka=Q,$a=Ca,Qa=Fa,Ya=function(e,t){var n,r,i,a,s,o=e.target,c=e.global,d=e.stat;if(n=c?Va:d?Va[o]||Ka(o,{}):(Va[o]||{}).prototype)for(r in t){if(a=t[r],i=e.dontCallGetSet?(s=za(n,r))&&s.value:n[r],!Qa(c?r:o+(d?".":"#")+r,e.forced)&&void 0!==i){if(typeof a==typeof i)continue;$a(a,i)}(e.sham||i&&i.sham)&&Ha(a,"sham",!0),Wa(n,r,a,e)}},Ja=ba,Xa=ya,Za=Object.keys||function(e){return Ja(e,Xa)},es=me,ts=Za;Ya({target:"Object",stat:!0,forced:ne((function(){ts(1)}))},{keys:function(e){return ts(es(e))}});var ns=Array.isArray,rs=Object.prototype.toString,is=ns||function(e){return!!e&&"[object Array]"==rs.call(e)},as={name:"@bygd/gd-sdk-pes",version:"1.34.1",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"}},ss=function(e){var t=os("object"===n(e)?e:i(e));return t&&t.version?as.version>=t.version?t:void 0:t},os=function(e){var n=this;if(!is(e)||0===e.length)return e;if(1===e.length)return e[0];var r=0;e.forEach(function(e){t(this,n),e.weight=e.weight||1,r+=e.weight}.bind(this));var i=Math.floor(Math.random()*Math.floor(r));r=0;for(var a=0;a<e.length;a++){var s=e[a];if(i<(r+=s.weight))return s}},cs=function(){var e;(e=console).log.apply(e,arguments)},ds=function(){var e;(e=console).log.apply(e,arguments)};JSON.stringify({adapters:{default:["ima","adsense","ima","adsense"],preroll:["ima","adsense","ima","adsense"],midroll:["ima","adsense","ima","adsense"],rewarded:["ima","adsense","ima","adsense"]}}),JSON.stringify({adapters:{default:["ima","adsense","ima","adsense"],preroll:["ima","adsense","ima"],midroll:["ima","adsense","ima"],rewarded:["ima","adsense","ima","adsense"]}});var us={},ls=xr,hs=String,ps=function(e){if("Symbol"===ls(e))throw TypeError("Cannot convert a Symbol value to a string");return hs(e)},fs={},ms=Ze,gs=dt,vs=Xe,bs=pt,ys=Ki,_s=Za;fs.f=ms&&!gs?Object.defineProperties:function(e,t){bs(e);for(var n,r=ys(t),i=_s(t),a=i.length,s=0;a>s;)vs.f(e,n=i[s++],r[n]);return e};var ws,As=yt("document","documentElement"),ks=pt,Es=fs,xs=ya,Ss=Pn,Rs=As,Ds=st,Ts="prototype",Os="script",Is=In("IE_PROTO"),Ps=function(){},Cs=function(e){return"<"+Os+">"+e+"</"+Os+">"},Ls=function(e){e.write(Cs("")),e.close();var t=e.parentWindow.Object;return e=null,t},Us=function(){try{ws=new ActiveXObject("htmlfile")}catch(e){}var e,t,n;Us="undefined"!=typeof document?document.domain&&ws?Ls(ws):(t=Ds("iframe"),n="java"+Os+":",t.style.display="none",Rs.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(Cs("document.F=Object")),e.close(),e.F):Ls(ws);for(var r=xs.length;r--;)delete Us[Ts][xs[r]];return Us()};Ss[Is]=!0;var Ms=Object.create||function(e,t){var n;return null!==e?(Ps[Ts]=ks(e),n=new Ps,Ps[Ts]=null,n[Is]=e):n=Us(),void 0===t?n:Es.f(n,t)},js={},Bs=$t,Gs=Xe,Ns=En,Fs=function(e,t,n){var r=Bs(t);r in e?Gs.f(e,r,Ns(0,n)):e[r]=n},Vs=oa,zs=Xr,Hs=Fs,Ws=Array,Ks=Math.max,$s=function(e,t,n){for(var r=zs(e),i=Vs(t,r),a=Vs(void 0===n?r:n,r),s=Ws(Ks(a-i,0)),o=0;i<a;i++,o++)Hs(s,o,e[i]);return s.length=o,s},Qs=br,Ys=Ki,Js=ra.f,Xs=$s,Zs="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];js.f=function(e){return Zs&&"Window"==Qs(e)?function(e){try{return Js(e)}catch(e){return Xs(Zs)}}(e):Js(Ys(e))};var eo=on.exports,to=Xe,no=function(e,t,n){return n.get&&eo(n.get,t,{getter:!0}),n.set&&eo(n.set,t,{setter:!0}),to.f(e,t,n)},ro={},io=He;ro.f=io;var ao=H,so=be,oo=ro,co=Xe.f,uo=function(e){var t=ao.Symbol||(ao.Symbol={});so(t,e)||co(t,e,{value:oo.f(e)})},lo=gt,ho=yt,po=He,fo=fr,mo=Xe.f,go=be,vo=He("toStringTag"),bo=function(e,t,n){e&&!n&&(e=e.prototype),e&&!go(e,vo)&&mo(e,vo,{configurable:!0,value:t})},yo=Ya,_o=H,wo=gt,Ao=ce,ko=Ze,Eo=Le,xo=ne,So=be,Ro=_t,Do=pt,To=Ki,Oo=$t,Io=ps,Po=En,Co=Ms,Lo=Za,Uo=ra,Mo=js,jo=Aa,Bo=Ni,Go=Xe,No=fs,qo=qi,Fo=fr,Vo=no,zo=W.exports,Ho=Pn,Wo=ke,Ko=He,$o=ro,Qo=uo,Yo=function(){var e=ho("Symbol"),t=e&&e.prototype,n=t&&t.valueOf,r=po("toPrimitive");t&&!t[r]&&fo(t,r,(function(e){return lo(n,this)}),{arity:1})},Jo=bo,Xo=Wn,Zo=Ti.forEach,ec=In("hidden"),tc="Symbol",nc="prototype",rc=Xo.set,ic=Xo.getterFor(tc),ac=Object[nc],sc=_o.Symbol,oc=sc&&sc[nc],cc=_o.TypeError,dc=_o.QObject,uc=Bo.f,lc=Go.f,hc=Mo.f,pc=qo.f,fc=Ao([].push),mc=zo("symbols"),gc=zo("op-symbols"),vc=zo("wks"),bc=!dc||!dc[nc]||!dc[nc].findChild,yc=ko&&xo((function(){return 7!=Co(lc({},"a",{get:function(){return lc(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=uc(ac,t);r&&delete ac[t],lc(e,t,n),r&&e!==ac&&lc(ac,t,r)}:lc,_c=function(e,t){var n=mc[e]=Co(oc);return rc(n,{type:tc,tag:e,description:t}),ko||(n.description=t),n},wc=function(e,t,n){e===ac&&wc(gc,t,n),Do(e);var r=Oo(t);return Do(n),So(mc,r)?(n.enumerable?(So(e,ec)&&e[ec][r]&&(e[ec][r]=!1),n=Co(n,{enumerable:Po(0,!1)})):(So(e,ec)||lc(e,ec,Po(1,{})),e[ec][r]=!0),yc(e,r,n)):lc(e,r,n)},Ac=function(e,t){Do(e);var n=To(t),r=Lo(n).concat(Sc(n));return Zo(r,(function(t){ko&&!wo(kc,n,t)||wc(e,t,n[t])})),e},kc=function(e){var t=Oo(e),n=wo(pc,this,t);return!(this===ac&&So(mc,t)&&!So(gc,t))&&(!(n||!So(this,t)||!So(mc,t)||So(this,ec)&&this[ec][t])||n)},Ec=function(e,t){var n=To(e),r=Oo(t);if(n!==ac||!So(mc,r)||So(gc,r)){var i=uc(n,r);return!i||!So(mc,r)||So(n,ec)&&n[ec][r]||(i.enumerable=!0),i}},xc=function(e){var t=hc(To(e)),n=[];return Zo(t,(function(e){So(mc,e)||So(Ho,e)||fc(n,e)})),n},Sc=function(e){var t=e===ac,n=hc(t?gc:To(e)),r=[];return Zo(n,(function(e){!So(mc,e)||t&&!So(ac,e)||fc(r,mc[e])})),r};Eo||(Fo(oc=(sc=function(){if(Ro(oc,this))throw cc("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?Io(arguments[0]):void 0,t=Wo(e),n=function(e){this===ac&&wo(n,gc,e),So(this,ec)&&So(this[ec],t)&&(this[ec][t]=!1),yc(this,t,Po(1,e))};return ko&&bc&&yc(ac,t,{configurable:!0,set:n}),_c(t,e)})[nc],"toString",(function(){return ic(this).tag})),Fo(sc,"withoutSetter",(function(e){return _c(Wo(e),e)})),qo.f=kc,Go.f=wc,No.f=Ac,Bo.f=Ec,Uo.f=Mo.f=xc,jo.f=Sc,$o.f=function(e){return _c(Ko(e),e)},ko&&(Vo(oc,"description",{configurable:!0,get:function(){return ic(this).description}}),Fo(ac,"propertyIsEnumerable",kc,{unsafe:!0}))),yo({global:!0,constructor:!0,wrap:!0,forced:!Eo,sham:!Eo},{Symbol:sc}),Zo(Lo(vc),(function(e){Qo(e)})),yo({target:tc,stat:!0,forced:!Eo},{useSetter:function(){bc=!0},useSimple:function(){bc=!1}}),yo({target:"Object",stat:!0,forced:!Eo,sham:!ko},{create:function(e,t){return void 0===t?Co(e):Ac(Co(e),t)},defineProperty:wc,defineProperties:Ac,getOwnPropertyDescriptor:Ec}),yo({target:"Object",stat:!0,forced:!Eo},{getOwnPropertyNames:xc}),Yo(),Jo(sc,tc),Ho[ec]=!0;var Rc=Le&&!!Symbol.for&&!!Symbol.keyFor,Dc=Ya,Tc=yt,Oc=be,Ic=ps,Pc=W.exports,Cc=Rc,Lc=Pc("string-to-symbol-registry"),Uc=Pc("symbol-to-string-registry");Dc({target:"Symbol",stat:!0,forced:!Cc},{for:function(e){var t=Ic(e);if(Oc(Lc,t))return Lc[t];var n=Tc("Symbol")(t);return Lc[t]=n,Uc[n]=t,n}});var Mc=Ya,jc=be,Bc=xt,Gc=Rt,Nc=Rc,qc=(0,W.exports)("symbol-to-string-registry");Mc({target:"Symbol",stat:!0,forced:!Nc},{keyFor:function(e){if(!Bc(e))throw TypeError(Gc(e)+" is not a symbol");if(jc(qc,e))return qc[e]}});var Fc=re,Vc=Function.prototype,zc=Vc.apply,Hc=Vc.call,Wc="object"==typeof Reflect&&Reflect.apply||(Fc?Hc.bind(zc):function(){return Hc.apply(zc,arguments)}),Kc=ce([].slice),$c=ei,Qc=Je,Yc=br,Jc=ps,Xc=ce([].push),Zc=Ya,ed=yt,td=Wc,nd=gt,rd=ce,id=ne,ad=Je,sd=xt,od=Kc,cd=function(e){if(Qc(e))return e;if($c(e)){for(var t=e.length,n=[],r=0;r<t;r++){var i=e[r];"string"==typeof i?Xc(n,i):"number"!=typeof i&&"Number"!=Yc(i)&&"String"!=Yc(i)||Xc(n,Jc(i))}var a=n.length,s=!0;return function(e,t){if(s)return s=!1,t;if($c(this))return t;for(var r=0;r<a;r++)if(n[r]===e)return t}}},dd=Le,ud=String,ld=ed("JSON","stringify"),hd=rd(/./.exec),pd=rd("".charAt),fd=rd("".charCodeAt),md=rd("".replace),gd=rd(1..toString),vd=/[\uD800-\uDFFF]/g,bd=/^[\uD800-\uDBFF]$/,yd=/^[\uDC00-\uDFFF]$/,_d=!dd||id((function(){var e=ed("Symbol")();return"[null]"!=ld([e])||"{}"!=ld({a:e})||"{}"!=ld(Object(e))})),wd=id((function(){return'"\\udf06\\ud834"'!==ld("\udf06\ud834")||'"\\udead"'!==ld("\udead")})),Ad=function(e,t){var n=od(arguments),r=cd(t);if(ad(r)||void 0!==e&&!sd(e))return n[1]=function(e,t){if(ad(r)&&(t=nd(r,this,ud(e),t)),!sd(t))return t},td(ld,null,n)},kd=function(e,t,n){var r=pd(n,t-1),i=pd(n,t+1);return hd(bd,e)&&!hd(yd,i)||hd(yd,e)&&!hd(bd,r)?"\\u"+gd(fd(e,0),16):e};ld&&Zc({target:"JSON",stat:!0,arity:3,forced:_d||wd},{stringify:function(e,t,n){var r=od(arguments),i=td(_d?Ad:ld,null,r);return wd&&"string"==typeof i?md(i,vd,kd):i}});var Ed=Aa,xd=me;Ya({target:"Object",stat:!0,forced:!Le||ne((function(){Ed.f(1)}))},{getOwnPropertySymbols:function(e){var t=Ed.f;return t?t(xd(e)):[]}});var Sd=ne,Rd=Ie,Dd=He("species"),Td=function(e){return Rd>=51||!Sd((function(){var t=[];return(t.constructor={})[Dd]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},Od=Ti.filter;Ya({target:"Array",proto:!0,forced:!Td("filter")},{filter:function(e){return Od(this,e,arguments.length>1?arguments[1]:void 0)}});var Id=Ya,Pd=ne,Cd=Ki,Ld=Ni.f,Ud=Ze;Id({target:"Object",stat:!0,forced:!Ud||Pd((function(){Ld(1)})),sham:!Ud},{getOwnPropertyDescriptor:function(e,t){return Ld(Cd(e),t)}});var Md=Da,jd=Ki,Bd=Ni,Gd=Fs;Ya({target:"Object",stat:!0,sham:!Ze},{getOwnPropertyDescriptors:function(e){for(var t,n,r=jd(e),i=Bd.f,a=Md(r),s={},o=0;a.length>o;)void 0!==(n=i(r,t=a[o++]))&&Gd(s,t,n);return s}});var Nd=Ya,qd=ei,Fd=fi,Vd=nt,zd=oa,Hd=Xr,Wd=Ki,Kd=Fs,$d=He,Qd=Kc,Yd=Td("slice"),Jd=$d("species"),Xd=Array,Zd=Math.max;Nd({target:"Array",proto:!0,forced:!Yd},{slice:function(e,t){var n,r,i,a=Wd(this),s=Hd(a),o=zd(e,s),c=zd(void 0===t?s:t,s);if(qd(a)&&(n=a.constructor,(Fd(n)&&(n===Xd||qd(n.prototype))||Vd(n)&&null===(n=n[Jd]))&&(n=void 0),n===Xd||void 0===n))return Qd(a,o,c);for(r=new(void 0===n?Xd:n)(Zd(c-o,0)),i=0;o<c;o++,i++)o in a&&Kd(r,i,a[o]);return r.length=i,r}});var eu=gt,tu=pt,nu=Lt,ru=function(e,t,n){var r,i;tu(e);try{if(!(r=nu(e,"return"))){if("throw"===t)throw n;return n}r=eu(r,e)}catch(e){i=!0,r=e}if("throw"===t)throw n;if(i)throw r;return tu(r),n},iu=pt,au=ru,su={},ou=su,cu=He("iterator"),du=Array.prototype,uu=function(e){return void 0!==e&&(ou.Array===e||du[cu]===e)},lu=xr,hu=Lt,pu=de,fu=su,mu=He("iterator"),gu=function(e){if(!pu(e))return hu(e,mu)||hu(e,"@@iterator")||fu[lu(e)]},vu=gt,bu=It,yu=pt,_u=Rt,wu=gu,Au=TypeError,ku=function(e,t){var n=arguments.length<2?wu(e):t;if(bu(n))return yu(vu(n,e));throw Au(_u(e)+" is not iterable")},Eu=Br,xu=gt,Su=me,Ru=function(e,t,n,r){try{return r?t(iu(n)[0],n[1]):t(n)}catch(t){au(e,"throw",t)}},Du=uu,Tu=fi,Ou=Xr,Iu=Fs,Pu=ku,Cu=gu,Lu=Array,Uu=function(e){var t=Su(e),n=Tu(this),r=arguments.length,i=r>1?arguments[1]:void 0,a=void 0!==i;a&&(i=Eu(i,r>2?arguments[2]:void 0));var s,o,c,d,u,l,h=Cu(t),p=0;if(!h||this===Lu&&Du(h))for(s=Ou(t),o=n?new this(s):Lu(s);s>p;p++)l=a?i(t[p],p):t[p],Iu(o,p,l);else for(u=(d=Pu(t,h)).next,o=n?new this:[];!(c=xu(u,d)).done;p++)l=a?Ru(d,i,[c.value,p],!0):c.value,Iu(o,p,l);return o.length=p,o},Mu=He("iterator"),ju=!1;try{var Bu=0,Gu={next:function(){return{done:!!Bu++}},return:function(){ju=!0}};Gu[Mu]=function(){return this},Array.from(Gu,(function(){throw 2}))}catch(e){}var Nu=function(e,t){if(!t&&!ju)return!1;var n=!1;try{var r={};r[Mu]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch(e){}return n},qu=Uu;Ya({target:"Array",stat:!0,forced:!Nu((function(e){Array.from(e)}))},{from:qu});var Fu,Vu,zu,Hu=ce,Wu=Kr,Ku=ps,$u=he,Qu=Hu("".charAt),Yu=Hu("".charCodeAt),Ju=Hu("".slice),Xu=function(e){return function(t,n){var r,i,a=Ku($u(t)),s=Wu(n),o=a.length;return s<0||s>=o?e?"":void 0:(r=Yu(a,s))<55296||r>56319||s+1===o||(i=Yu(a,s+1))<56320||i>57343?e?Qu(a,s):r:e?Ju(a,s,s+2):i-56320+(r-55296<<10)+65536}},Zu={codeAt:Xu(!1),charAt:Xu(!0)},el=!ne((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),tl=be,nl=Je,rl=me,il=el,al=In("IE_PROTO"),sl=Object,ol=sl.prototype,cl=il?sl.getPrototypeOf:function(e){var t=rl(e);if(tl(t,al))return t[al];var n=t.constructor;return nl(n)&&t instanceof n?n.prototype:t instanceof sl?ol:null},dl=ne,ul=Je,ll=nt,hl=cl,pl=fr,fl=He("iterator"),ml=!1;[].keys&&("next"in(zu=[].keys())?(Vu=hl(hl(zu)))!==Object.prototype&&(Fu=Vu):ml=!0);var gl=!ll(Fu)||dl((function(){var e={};return Fu[fl].call(e)!==e}));gl&&(Fu={}),ul(Fu[fl])||pl(Fu,fl,(function(){return this}));var vl={IteratorPrototype:Fu,BUGGY_SAFARI_ITERATORS:ml},bl=vl.IteratorPrototype,yl=Ms,_l=En,wl=bo,Al=su,kl=function(){return this},El=function(e,t,n,r){var i=t+" Iterator";return e.prototype=yl(bl,{next:_l(+!r,n)}),wl(e,i,!1),Al[i]=kl,e},xl=ce,Sl=It,Rl=Je,Dl=String,Tl=TypeError,Ol=function(e,t,n){try{return xl(Sl(Object.getOwnPropertyDescriptor(e,t)[n]))}catch(e){}},Il=pt,Pl=function(e){if("object"==typeof e||Rl(e))return e;throw Tl("Can't set "+Dl(e)+" as a prototype")},Cl=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Ol(Object.prototype,"__proto__","set"))(n,[]),t=n instanceof Array}catch(e){}return function(n,r){return Il(n),Pl(r),t?e(n,r):n.__proto__=r,n}}():void 0),Ll=Ya,Ul=gt,Ml=Je,jl=El,Bl=cl,Gl=Cl,Nl=bo,ql=Rn,Fl=fr,Vl=su,zl=pn.PROPER,Hl=pn.CONFIGURABLE,Wl=vl.IteratorPrototype,Kl=vl.BUGGY_SAFARI_ITERATORS,$l=He("iterator"),Ql="keys",Yl="values",Jl="entries",Xl=function(){return this},Zl=function(e,t,n,r,i,a,s){jl(n,t,r);var o,c,d,u=function(e){if(e===i&&m)return m;if(!Kl&&e in p)return p[e];switch(e){case Ql:case Yl:case Jl:return function(){return new n(this,e)}}return function(){return new n(this)}},l=t+" Iterator",h=!1,p=e.prototype,f=p[$l]||p["@@iterator"]||i&&p[i],m=!Kl&&f||u(i),g="Array"==t&&p.entries||f;if(g&&(o=Bl(g.call(new e)))!==Object.prototype&&o.next&&(Bl(o)!==Wl&&(Gl?Gl(o,Wl):Ml(o[$l])||Fl(o,$l,Xl)),Nl(o,l,!0)),zl&&i==Yl&&f&&f.name!==Yl&&(Hl?ql(p,"name",Yl):(h=!0,m=function(){return Ul(f,this)})),i)if(c={values:u(Yl),keys:a?m:u(Ql),entries:u(Jl)},s)for(d in c)(Kl||h||!(d in p))&&Fl(p,d,c[d]);else Ll({target:t,proto:!0,forced:Kl||h},c);return p[$l]!==m&&Fl(p,$l,m,{name:i}),Vl[t]=m,c},eh=function(e,t){return{value:e,done:t}},th=Zu.charAt,nh=ps,rh=Wn,ih=Zl,ah=eh,sh="String Iterator",oh=rh.set,ch=rh.getterFor(sh);ih(String,"String",(function(e){oh(this,{type:sh,string:nh(e),index:0})}),(function(){var e,t=ch(this),n=t.string,r=t.index;return r>=n.length?ah(void 0,!0):(e=th(n,r),t.index+=e.length,ah(e,!1))}));var dh=pt,uh=function(){var e=dh(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t},lh=ne,hh=H.RegExp,ph=lh((function(){var e=hh("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),fh=ph||lh((function(){return!hh("a","y").sticky})),mh={BROKEN_CARET:ph||lh((function(){var e=hh("^r","gy");return e.lastIndex=2,null!=e.exec("str")})),MISSED_STICKY:fh,UNSUPPORTED_Y:ph},gh=ne,vh=H.RegExp,bh=gh((function(){var e=vh(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)})),yh=ne,_h=H.RegExp,wh=yh((function(){var e=_h("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),Ah=gt,kh=ce,Eh=ps,xh=uh,Sh=mh,Rh=W.exports,Dh=Ms,Th=Wn.get,Oh=bh,Ih=wh,Ph=Rh("native-string-replace",String.prototype.replace),Ch=RegExp.prototype.exec,Lh=Ch,Uh=kh("".charAt),Mh=kh("".indexOf),jh=kh("".replace),Bh=kh("".slice),Gh=function(){var e=/a/,t=/b*/g;return Ah(Ch,e,"a"),Ah(Ch,t,"a"),0!==e.lastIndex||0!==t.lastIndex}(),Nh=Sh.BROKEN_CARET,qh=void 0!==/()??/.exec("")[1];(Gh||qh||Nh||Oh||Ih)&&(Lh=function(e){var t,n,r,i,a,s,o,c=this,d=Th(c),u=Eh(e),l=d.raw;if(l)return l.lastIndex=c.lastIndex,t=Ah(Lh,l,u),c.lastIndex=l.lastIndex,t;var h=d.groups,p=Nh&&c.sticky,f=Ah(xh,c),m=c.source,g=0,v=u;if(p&&(f=jh(f,"y",""),-1===Mh(f,"g")&&(f+="g"),v=Bh(u,c.lastIndex),c.lastIndex>0&&(!c.multiline||c.multiline&&"\n"!==Uh(u,c.lastIndex-1))&&(m="(?: "+m+")",v=" "+v,g++),n=new RegExp("^(?:"+m+")",f)),qh&&(n=new RegExp("^"+m+"$(?!\\s)",f)),Gh&&(r=c.lastIndex),i=Ah(Ch,p?n:c,v),p?i?(i.input=Bh(i.input,g),i[0]=Bh(i[0],g),i.index=c.lastIndex,c.lastIndex+=i[0].length):c.lastIndex=0:Gh&&i&&(c.lastIndex=c.global?i.index+i[0].length:r),qh&&i&&i.length>1&&Ah(Ph,i[0],n,(function(){for(a=1;a<arguments.length-2;a++)void 0===arguments[a]&&(i[a]=void 0)})),i&&h)for(i.groups=s=Dh(null),a=0;a<h.length;a++)s[(o=h[a])[0]]=i[o[1]];return i});var Fh=Lh;Ya({target:"RegExp",proto:!0,forced:/./.exec!==Fh},{exec:Fh});var Vh=Ya,zh=Ze,Hh=ce,Wh=be,Kh=Je,$h=_t,Qh=ps,Yh=no,Jh=Ca,Xh=H.Symbol,Zh=Xh&&Xh.prototype;if(zh&&Kh(Xh)&&(!("description"in Zh)||void 0!==Xh().description)){var ep={},tp=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:Qh(arguments[0]),t=$h(Zh,this)?new Xh(e):void 0===e?Xh():Xh(e);return""===e&&(ep[t]=!0),t};Jh(tp,Xh),tp.prototype=Zh,Zh.constructor=tp;var np="Symbol(test)"==String(Xh("test")),rp=Hh(Zh.valueOf),ip=Hh(Zh.toString),ap=/^Symbol\((.*)\)[^)]+$/,sp=Hh("".replace),op=Hh("".slice);Yh(Zh,"description",{configurable:!0,get:function(){var e=rp(this);if(Wh(ep,e))return"";var t=ip(e),n=np?op(t,7,-1):sp(t,ap,"$1");return""===n?void 0:n}}),Vh({global:!0,constructor:!0,forced:!0},{Symbol:tp})}uo("iterator");var cp=He,dp=Ms,up=Xe.f,lp=cp("unscopables"),hp=Array.prototype;null==hp[lp]&&up(hp,lp,{configurable:!0,value:dp(null)});var pp=function(e){hp[lp][e]=!0},fp=Ki,mp=pp,gp=su,vp=Wn,bp=Xe.f,yp=Zl,_p=eh,wp=Ze,Ap="Array Iterator",kp=vp.set,Ep=vp.getterFor(Ap),xp=yp(Array,"Array",(function(e,t){kp(this,{type:Ap,target:fp(e),index:0,kind:t})}),(function(){var e=Ep(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,_p(void 0,!0)):_p("keys"==n?r:"values"==n?t[r]:[r,t[r]],!1)}),"values"),Sp=gp.Arguments=gp.Array;if(mp("keys"),mp("values"),mp("entries"),wp&&"values"!==Sp.name)try{bp(Sp,"name",{value:"values"})}catch(e){}var Rp=H,Dp=Dr,Tp=Ir,Op=xp,Ip=Rn,Pp=He,Cp=Pp("iterator"),Lp=Pp("toStringTag"),Up=Op.values,Mp=function(e,t){if(e){if(e[Cp]!==Up)try{Ip(e,Cp,Up)}catch(t){e[Cp]=Up}if(e[Lp]||Ip(e,Lp,t),Dp[t])for(var n in Op)if(e[n]!==Op[n])try{Ip(e,n,Op[n])}catch(t){e[n]=Op[n]}}};for(var jp in Dp)Mp(Rp[jp]&&Rp[jp].prototype,jp);Mp(Tp,"DOMTokenList");var Bp,Gp,Np,qp,Fp="undefined"!=typeof process&&"process"==br(process),Vp=yt,zp=no,Hp=Ze,Wp=He("species"),Kp=function(e){var t=Vp(e);Hp&&t&&!t[Wp]&&zp(t,Wp,{configurable:!0,get:function(){return this}})},$p=_t,Qp=TypeError,Yp=function(e,t){if($p(t,e))return e;throw Qp("Incorrect invocation")},Jp=fi,Xp=Rt,Zp=TypeError,ef=pt,tf=function(e){if(Jp(e))return e;throw Zp(Xp(e)+" is not a constructor")},nf=de,rf=He("species"),af=function(e,t){var n,r=ef(e).constructor;return void 0===r||nf(n=ef(r)[rf])?t:tf(n)},sf=TypeError,of=function(e,t){if(e<t)throw sf("Not enough arguments");return e},cf=/(?:ipad|iphone|ipod).*applewebkit/i.test(Ee),df=H,uf=Wc,lf=Br,hf=Je,pf=be,ff=ne,mf=As,gf=Kc,vf=st,bf=of,yf=cf,_f=Fp,wf=df.setImmediate,Af=df.clearImmediate,kf=df.process,Ef=df.Dispatch,xf=df.Function,Sf=df.MessageChannel,Rf=df.String,Df=0,Tf={},Of="onreadystatechange";ff((function(){Bp=df.location}));var If=function(e){if(pf(Tf,e)){var t=Tf[e];delete Tf[e],t()}},Pf=function(e){return function(){If(e)}},Cf=function(e){If(e.data)},Lf=function(e){df.postMessage(Rf(e),Bp.protocol+"//"+Bp.host)};wf&&Af||(wf=function(e){bf(arguments.length,1);var t=hf(e)?e:xf(e),n=gf(arguments,1);return Tf[++Df]=function(){uf(t,void 0,n)},Gp(Df),Df},Af=function(e){delete Tf[e]},_f?Gp=function(e){kf.nextTick(Pf(e))}:Ef&&Ef.now?Gp=function(e){Ef.now(Pf(e))}:Sf&&!yf?(qp=(Np=new Sf).port2,Np.port1.onmessage=Cf,Gp=lf(qp.postMessage,qp)):df.addEventListener&&hf(df.postMessage)&&!df.importScripts&&Bp&&"file:"!==Bp.protocol&&!ff(Lf)?(Gp=Lf,df.addEventListener("message",Cf,!1)):Gp=Of in vf("script")?function(e){mf.appendChild(vf("script"))[Of]=function(){mf.removeChild(this),If(e)}}:function(e){setTimeout(Pf(e),0)});var Uf={set:wf,clear:Af},Mf=function(){this.head=null,this.tail=null};Mf.prototype={add:function(e){var t={item:e,next:null},n=this.tail;n?n.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return null===(this.head=e.next)&&(this.tail=null),e.item}};var jf,Bf,Gf,Nf,qf,Ff=Mf,Vf=/ipad|iphone|ipod/i.test(Ee)&&"undefined"!=typeof Pebble,zf=/web0s(?!.*chrome)/i.test(Ee),Hf=H,Wf=Br,Kf=Ni.f,$f=Uf.set,Qf=Ff,Yf=cf,Jf=Vf,Xf=zf,Zf=Fp,em=Hf.MutationObserver||Hf.WebKitMutationObserver,tm=Hf.document,nm=Hf.process,rm=Hf.Promise,im=Kf(Hf,"queueMicrotask"),am=im&&im.value;if(!am){var sm=new Qf,om=function(){var e,t;for(Zf&&(e=nm.domain)&&e.exit();t=sm.get();)try{t()}catch(e){throw sm.head&&jf(),e}e&&e.enter()};Yf||Zf||Xf||!em||!tm?!Jf&&rm&&rm.resolve?((Nf=rm.resolve(void 0)).constructor=rm,qf=Wf(Nf.then,Nf),jf=function(){qf(om)}):Zf?jf=function(){nm.nextTick(om)}:($f=Wf($f,Hf),jf=function(){$f(om)}):(Bf=!0,Gf=tm.createTextNode(""),new em(om).observe(Gf,{characterData:!0}),jf=function(){Gf.data=Bf=!Bf}),am=function(e){sm.head||jf(),sm.add(e)}}var cm=am,dm=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},um=H.Promise,lm="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,hm=!lm&&!Fp&&"object"==typeof window&&"object"==typeof document,pm=H,fm=um,mm=Je,gm=Fa,vm=_n,bm=He,ym=hm,_m=lm,wm=Ie;fm&&fm.prototype;var Am=bm("species"),km=!1,Em=mm(pm.PromiseRejectionEvent),xm=gm("Promise",(function(){var e=vm(fm),t=e!==String(fm);if(!t&&66===wm)return!0;if(!wm||wm<51||!/native code/.test(e)){var n=new fm((function(e){e(1)})),r=function(e){e((function(){}),(function(){}))};if((n.constructor={})[Am]=r,!(km=n.then((function(){}))instanceof r))return!0}return!t&&(ym||_m)&&!Em})),Sm={CONSTRUCTOR:xm,REJECTION_EVENT:Em,SUBCLASSING:km},Rm={},Dm=It,Tm=TypeError,Om=function(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw Tm("Bad Promise constructor");t=e,n=r})),this.resolve=Dm(t),this.reject=Dm(n)};Rm.f=function(e){return new Om(e)};var Im,Pm,Cm,Lm=Ya,Um=Fp,Mm=H,jm=gt,Bm=fr,Gm=Cl,Nm=bo,qm=Kp,Fm=It,Vm=Je,zm=nt,Hm=Yp,Wm=af,Km=Uf.set,$m=cm,Qm=function(e,t){try{1==arguments.length?console.error(e):console.error(e,t)}catch(e){}},Ym=dm,Jm=Ff,Xm=Wn,Zm=um,eg=Rm,tg="Promise",ng=Sm.CONSTRUCTOR,rg=Sm.REJECTION_EVENT,ig=Sm.SUBCLASSING,ag=Xm.getterFor(tg),sg=Xm.set,og=Zm&&Zm.prototype,cg=Zm,dg=og,ug=Mm.TypeError,lg=Mm.document,hg=Mm.process,pg=eg.f,fg=pg,mg=!!(lg&&lg.createEvent&&Mm.dispatchEvent),gg="unhandledrejection",vg=function(e){var t;return!(!zm(e)||!Vm(t=e.then))&&t},bg=function(e,t){var n,r,i,a=t.value,s=1==t.state,o=s?e.ok:e.fail,c=e.resolve,d=e.reject,u=e.domain;try{o?(s||(2===t.rejection&&kg(t),t.rejection=1),!0===o?n=a:(u&&u.enter(),n=o(a),u&&(u.exit(),i=!0)),n===e.promise?d(ug("Promise-chain cycle")):(r=vg(n))?jm(r,n,c,d):c(n)):d(a)}catch(e){u&&!i&&u.exit(),d(e)}},yg=function(e,t){e.notified||(e.notified=!0,$m((function(){for(var n,r=e.reactions;n=r.get();)bg(n,e);e.notified=!1,t&&!e.rejection&&wg(e)})))},_g=function(e,t,n){var r,i;mg?((r=lg.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),Mm.dispatchEvent(r)):r={promise:t,reason:n},!rg&&(i=Mm["on"+e])?i(r):e===gg&&Qm("Unhandled promise rejection",n)},wg=function(e){jm(Km,Mm,(function(){var t,n=e.facade,r=e.value;if(Ag(e)&&(t=Ym((function(){Um?hg.emit("unhandledRejection",r,n):_g(gg,n,r)})),e.rejection=Um||Ag(e)?2:1,t.error))throw t.value}))},Ag=function(e){return 1!==e.rejection&&!e.parent},kg=function(e){jm(Km,Mm,(function(){var t=e.facade;Um?hg.emit("rejectionHandled",t):_g("rejectionhandled",t,e.value)}))},Eg=function(e,t,n){return function(r){e(t,r,n)}},xg=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,yg(e,!0))},Sg=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw ug("Promise can't be resolved itself");var r=vg(t);r?$m((function(){var n={done:!1};try{jm(r,t,Eg(Sg,n,e),Eg(xg,n,e))}catch(t){xg(n,t,e)}})):(e.value=t,e.state=1,yg(e,!1))}catch(t){xg({done:!1},t,e)}}};if(ng&&(dg=(cg=function(e){Hm(this,dg),Fm(e),jm(Im,this);var t=ag(this);try{e(Eg(Sg,t),Eg(xg,t))}catch(e){xg(t,e)}}).prototype,(Im=function(e){sg(this,{type:tg,done:!1,notified:!1,parent:!1,reactions:new Jm,rejection:!1,state:0,value:void 0})}).prototype=Bm(dg,"then",(function(e,t){var n=ag(this),r=pg(Wm(this,cg));return n.parent=!0,r.ok=!Vm(e)||e,r.fail=Vm(t)&&t,r.domain=Um?hg.domain:void 0,0==n.state?n.reactions.add(r):$m((function(){bg(r,n)})),r.promise})),Pm=function(){var e=new Im,t=ag(e);this.promise=e,this.resolve=Eg(Sg,t),this.reject=Eg(xg,t)},eg.f=pg=function(e){return e===cg||undefined===e?new Pm(e):fg(e)},Vm(Zm)&&og!==Object.prototype)){Cm=og.then,ig||Bm(og,"then",(function(e,t){var n=this;return new cg((function(e,t){jm(Cm,n,e,t)})).then(e,t)}),{unsafe:!0});try{delete og.constructor}catch(e){}Gm&&Gm(og,dg)}Lm({global:!0,constructor:!0,wrap:!0,forced:ng},{Promise:cg}),Nm(cg,tg,!1),qm(tg);var Rg=Br,Dg=gt,Tg=pt,Og=Rt,Ig=uu,Pg=Xr,Cg=_t,Lg=ku,Ug=gu,Mg=ru,jg=TypeError,Bg=function(e,t){this.stopped=e,this.result=t},Gg=Bg.prototype,Ng=function(e,t,n){var r,i,a,s,o,c,d,u=n&&n.that,l=!(!n||!n.AS_ENTRIES),h=!(!n||!n.IS_RECORD),p=!(!n||!n.IS_ITERATOR),f=!(!n||!n.INTERRUPTED),m=Rg(t,u),g=function(e){return r&&Mg(r,"normal",e),new Bg(!0,e)},v=function(e){return l?(Tg(e),f?m(e[0],e[1],g):m(e[0],e[1])):f?m(e,g):m(e)};if(h)r=e.iterator;else if(p)r=e;else{if(!(i=Ug(e)))throw jg(Og(e)+" is not iterable");if(Ig(i)){for(a=0,s=Pg(e);s>a;a++)if((o=v(e[a]))&&Cg(Gg,o))return o;return new Bg(!1)}r=Lg(e,i)}for(c=h?e.next:r.next;!(d=Dg(c,r)).done;){try{o=v(d.value)}catch(e){Mg(r,"throw",e)}if("object"==typeof o&&o&&Cg(Gg,o))return o}return new Bg(!1)},qg=um,Fg=Sm.CONSTRUCTOR||!Nu((function(e){qg.all(e).then(void 0,(function(){}))})),Vg=gt,zg=It,Hg=Rm,Wg=dm,Kg=Ng;Ya({target:"Promise",stat:!0,forced:Fg},{all:function(e){var t=this,n=Hg.f(t),r=n.resolve,i=n.reject,a=Wg((function(){var n=zg(t.resolve),a=[],s=0,o=1;Kg(e,(function(e){var c=s++,d=!1;o++,Vg(n,t,e).then((function(e){d||(d=!0,a[c]=e,--o||r(a))}),i)})),--o||r(a)}));return a.error&&i(a.value),n.promise}});var $g=Ya,Qg=Sm.CONSTRUCTOR,Yg=um,Jg=yt,Xg=Je,Zg=fr,ev=Yg&&Yg.prototype;if($g({target:"Promise",proto:!0,forced:Qg,real:!0},{catch:function(e){return this.then(void 0,e)}}),Xg(Yg)){var tv=Jg("Promise").prototype.catch;ev.catch!==tv&&Zg(ev,"catch",tv,{unsafe:!0})}var nv=gt,rv=It,iv=Rm,av=dm,sv=Ng;Ya({target:"Promise",stat:!0,forced:Fg},{race:function(e){var t=this,n=iv.f(t),r=n.reject,i=av((function(){var i=rv(t.resolve);sv(e,(function(e){nv(i,t,e).then(n.resolve,r)}))}));return i.error&&r(i.value),n.promise}});var ov=gt,cv=Rm;Ya({target:"Promise",stat:!0,forced:Sm.CONSTRUCTOR},{reject:function(e){var t=cv.f(this);return ov(t.reject,void 0,e),t.promise}});var dv=pt,uv=nt,lv=Rm,hv=function(e,t){if(dv(e),uv(t)&&t.constructor===e)return t;var n=lv.f(e);return(0,n.resolve)(t),n.promise},pv=Ya,fv=Sm.CONSTRUCTOR,mv=hv;yt("Promise"),pv({target:"Promise",stat:!0,forced:fv},{resolve:function(e){return mv(this,e)}});var gv=TypeError,vv=Ya,bv=ne,yv=ei,_v=nt,wv=me,Av=Xr,kv=function(e){if(e>9007199254740991)throw gv("Maximum allowed index exceeded");return e},Ev=Fs,xv=wi,Sv=Td,Rv=Ie,Dv=He("isConcatSpreadable"),Tv=Rv>=51||!bv((function(){var e=[];return e[Dv]=!1,e.concat()[0]!==e})),Ov=function(e){if(!_v(e))return!1;var t=e[Dv];return void 0!==t?!!t:yv(e)};vv({target:"Array",proto:!0,arity:1,forced:!Tv||!Sv("concat")},{concat:function(e){var t,n,r,i,a,s=wv(this),o=xv(s,0),c=0;for(t=-1,r=arguments.length;t<r;t++)if(Ov(a=-1===t?s:arguments[t]))for(i=Av(a),kv(c+i),n=0;n<i;n++,c++)n in a&&Ev(o,c,a[n]);else kv(c+1),Ev(o,c++,a);return o.length=c,o}});var Iv=Ze,Pv=pn.EXISTS,Cv=ce,Lv=no,Uv=Function.prototype,Mv=Cv(Uv.toString),jv=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,Bv=Cv(jv.exec);function Gv(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 Nv(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 Nv(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,o=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){o=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(o)throw a}}}}function Nv(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 qv(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 Fv(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qv(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qv(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}Iv&&!Pv&&Lv(Uv,"name",{configurable:!0,get:function(){try{return Bv(jv,Mv(this))[1]}catch(e){return""}}});var Vv,zv={react:{src:"https://pm.azerioncircle.com/react/16.14.0/umd/react.production.min.js",name:"React"},"react-dom":{src:"https://pm.azerioncircle.com/react-dom/16.14.0/umd/react-dom.production.min.js",name:"ReactDOM"},redux:{src:"https://pm.azerioncircle.com/redux/4.0.5/dist/redux.min.js",name:"Redux"},"react-redux":{src:"https://pm.azerioncircle.com/react-redux/7.2.1/dist/react-redux.min.js",name:"ReactRedux"},"material-ui-core":{src:"https://pm.azerioncircle.com/@material-ui/core/4.11.3/umd/material-ui.production.min.js",name:"MaterialUI"}},Hv={},Wv=function(e,t){Hv[e]=Fv(Fv({},t),{},{isLoading:!1})},Kv=function(e){var n=this,r=e.id,i=e.src;return new Promise(function(e,a){if(t(this,n),document.getElementById(r))e();else{var s=document.createElement("script");s.onload=function(){e()},s.id=r,s.setAttribute("crossorigin",!0),s.src=i,document.head.appendChild(s)}}.bind(this))},$v=function(){var t=e(r.mark((function e(t){var n,i,a,s,o,c,d,u;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n=window[t])){e.next=3;break}return e.abrupt("return",n);case 3:if(!(i=Hv[t]).isLoading){e.next=6;break}return e.abrupt("return");case 6:i.isLoading=!0,a=Gv(i.dependencies),e.prev=8,a.s();case 10:if((s=a.n()).done){e.next=26;break}if(o=s.value,e.prev=12,c=zv[o].name,!window[c]){e.next=16;break}return e.abrupt("continue",24);case 16:return e.next=18,Kv({id:o,src:zv[o].src});case 18:e.next=24;break;case 20:e.prev=20,e.t0=e.catch(12),d=o.id,u=o.src,console.log("Could not load external script ".concat(d," ").concat(u),e.t0);case 24:e.next=10;break;case 26:e.next=31;break;case 28:e.prev=28,e.t1=e.catch(8),a.e(e.t1);case 31:return e.prev=31,a.f(),e.finish(31);case 34:return e.prev=34,e.next=37,Kv({id:t,src:i.source});case 37:n=window[t],e.next=43;break;case 40:e.prev=40,e.t2=e.catch(34),console.log("Could not load module ".concat(t," ").concat(i.source,"."),e.t2);case 43:return i.isLoading=!1,e.abrupt("return",n);case 45:case"end":return e.stop()}}),e,null,[[8,28,31,34],[12,20],[34,40]])})));return function(e){return t.apply(this,arguments)}}(),Qv=R((function t(){var n=this;D(this,t),T(this,"load",e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,$v("Leaderboard");case 2:n.leaderboard=e.sent;case 3:case"end":return e.stop()}}),e)})))),T(this,"showLeaderboard",function(){var t=e(r.mark((function e(t){var i;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=window.GD_OPTIONS.gameId,n.leaderboard){e.next=4;break}return e.next=4,n.load();case 4:n.leaderboard.showLeaderBoard(i,t);case 5:case"end":return e.stop()}}),e)})));return function(e){return t.apply(this,arguments)}}()),T(this,"addScore",function(){var t=e(r.mark((function e(t){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.leaderboard){e.next=3;break}return e.next=3,n.load();case 3:n.leaderboard.addScore(t);case 4:case"end":return e.stop()}}),e)})));return function(e){return t.apply(this,arguments)}}()),this.moduleName="Leaderboard",this.moduleConfig={source:"https://pm.azerioncircle.com/@bygd/gd-sdk-leaderboard/0.1.43/dist/default/iife/index.js",dependencies:["react","react-dom","redux","react-redux","material-ui-core"]},Wv(this.moduleName,this.moduleConfig)})),Yv=new Qv,Jv=nt,Xv=br,Zv=He("match"),eb=function(e){var t;return Jv(e)&&(void 0!==(t=e[Zv])?!!t:"RegExp"==Xv(e))},tb=eb,nb=TypeError,rb=function(e){if(tb(e))throw nb("The method doesn't accept regular expressions");return e},ib=He("match"),ab=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[ib]=!1,"/./"[e](t)}catch(e){}}return!1},sb=Ya,ob=Lr,cb=Ni.f,db=Yr,ub=ps,lb=rb,hb=he,pb=ab,fb=ob("".startsWith),mb=ob("".slice),gb=Math.min,vb=pb("startsWith");sb({target:"String",proto:!0,forced:!!(vb||(Vv=cb(String.prototype,"startsWith"),!Vv||Vv.writable))&&!vb},{startsWith:function(e){var t=ub(hb(this));lb(e);var n=db(gb(arguments.length>1?arguments[1]:void 0,t.length)),r=ub(e);return fb?fb(t,r,n):mb(t,n,n+r.length)===r}});var bb=gt,yb=be,_b=_t,wb=uh,Ab=RegExp.prototype,kb=function(e){var t=e.flags;return void 0!==t||"flags"in Ab||yb(e,"flags")||!_b(Ab,e)?t:bb(wb,e)},Eb=pn.PROPER,xb=fr,Sb=pt,Rb=ps,Db=ne,Tb=kb,Ob="toString",Ib=RegExp.prototype[Ob],Pb=Db((function(){return"/a/b"!=Ib.call({source:"a",flags:"b"})})),Cb=Eb&&Ib.name!=Ob;(Pb||Cb)&&xb(RegExp.prototype,Ob,(function(){var e=Sb(this);return"/"+Rb(e.source)+"/"+Rb(Tb(e))}),{unsafe:!0});var Lb=Lr,Ub=fr,Mb=Fh,jb=ne,Bb=He,Gb=Rn,Nb=Bb("species"),qb=RegExp.prototype,Fb=function(e,t,n,r){var i=Bb(e),a=!jb((function(){var t={};return t[i]=function(){return 7},7!=""[e](t)})),s=a&&!jb((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[Nb]=function(){return n},n.flags="",n[i]=/./[i]),n.exec=function(){return t=!0,null},n[i](""),!t}));if(!a||!s||n){var o=Lb(/./[i]),c=t(i,""[e],(function(e,t,n,r,i){var s=Lb(e),c=t.exec;return c===Mb||c===qb.exec?a&&!i?{done:!0,value:o(t,n,r)}:{done:!0,value:s(n,t,r)}:{done:!1}}));Ub(String.prototype,e,c[0]),Ub(qb,i,c[1])}r&&Gb(qb[i],"sham",!0)},Vb=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t},zb=gt,Hb=pt,Wb=Je,Kb=br,$b=Fh,Qb=TypeError,Yb=function(e,t){var n=e.exec;if(Wb(n)){var r=zb(n,e,t);return null!==r&&Hb(r),r}if("RegExp"===Kb(e))return zb($b,e,t);throw Qb("RegExp#exec called on incompatible receiver")},Jb=gt,Xb=pt,Zb=de,ey=he,ty=Vb,ny=ps,ry=Lt,iy=Yb;function ay(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 sy(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ay(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ay(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}Fb("search",(function(e,t,n){return[function(t){var n=ey(this),r=Zb(t)?void 0:ry(t,e);return r?Jb(r,t,n):new RegExp(t)[e](ny(n))},function(e){var r=Xb(this),i=ny(e),a=n(t,r,i);if(a.done)return a.value;var s=r.lastIndex;ty(s,0)||(r.lastIndex=0);var o=iy(r,i);return ty(r.lastIndex,s)||(r.lastIndex=s),null===o?-1:o.index}]}));var oy,cy,dy=function(){function e(){D(this,e)}return R(e,[{key:"getBridgeContext",value:function(){var e=this._isTokenGameURL(),t=this._isMasterGameURL(),n=this._isExtHostedGameURL(),r=e||n?this._getTokenGameURLConfig():{};r=r||{};var i=decodeURIComponent((e||n)&&r.parentURL?r.parentURL:a()),c=decodeURIComponent((e||n)&&r.parentDomain?r.parentDomain:s()),u=decodeURIComponent((e||n)&&r.topDomain?r.topDomain:n&&0===o()?c:d()),l=(e||n)&&r.loaderEnabled,h=(e||n)&&r.loaderEnabled,p=(e||n)&&r.loaderEnabled,f=(e||n)&&r.loaderEnabled,m=(e||n)&&r.loaderEnabled,g=(e||n)&&r.loaderEnabled,v=(e||n)&&r.loaderEnabled;console.log("noMinijuegosSDK",v);var b=(e||n)&&r.loaderEnabled,y=(e||n)&&r.loaderEnabled&&r.hasImpression&&r.version>="1.1.24";return{isTokenGameURL:e,isMasterGameURL:t,isExtHostedGameURL:n,noConsoleBanner:l,noLoadedEvent:h,noBlockerEvent:p,noPreroll:b,parentURL:i,parentDomain:c,topDomain:u&&u.length?u:c,noGAPageView:f,noLotamePageView:m,noGamedockSDK:g,noMinijuegosSDK:v,version:r.version,pauseGameOnStartup:y,depth:o(),domainMatched:c===u,exports:{formatTokenURLSearch:this._formatTokenURLSearch.bind(this),extendUrlQuery:this._extendUrlQuery.bind(this),base64Encode:this._base64_encode.bind(this)}}}},{key:"_isMasterGameURL",value:function(){var e=/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Fa-f0-9]{32})(.*)$/i;return e.test(location.href)||!this._isTokenGameURL()&&e.test(document.referrer)}},{key:"_isTokenGameURL",value:function(){var e=/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Za-z0-9]{8})\/(.*)$/i;return e.test(location.href)||e.test(document.referrer)}},{key:"_isExtHostedGameURL",value:function(){var e=/^http[s]?:\/\/.*?gd_sdk_referrer_url=.*$/i;return e.test(location.href)||e.test(document.referrer)}},{key:"_isLoaderGameURL",value:function(){return/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Fa-f0-9]{32})(.*)$/i.test(location.href)&&location.href.startsWith("https://html5.gamedistribution.com")}},{key:"_getTokenGameURLConfig",value:function(){try{var e,t=/http[s]?:\/\/html5\.gamedistribution\.com\/[A-Za-z0-9]{8}\/[A-Fa-f0-9]{32}\/.*/i;if(t.test(location.href)){var n=new O(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 O(document.referrer,!0);if(!r.query.gd_zone_config)return;e=r.query.gd_zone_config}else{var i=new O(location.href,!0);if(!i.query.gd_zone_config)return;e=i.query.gd_zone_config}return JSON.parse(I.decode(decodeURIComponent(e)))}catch(e){}}},{key:"_formatTokenURLSearch",value:function(e){var t="";try{t=encodeURIComponent(I.encode(JSON.stringify(e)))}catch(e){}try{var n=new O(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 O(e,!0);return n.query=sy(sy({},n.query),t),n.toString()}},{key:"_base64_encode",value:function(e){return I.encode(JSON.stringify(e))}}]),e}(),uy=function(){try{return(new dy).getBridgeContext()}catch(e){return{}}}(),ly={userDeclinedTracking:document.location.search.indexOf("gdpr-tracking=0")>=0||document.cookie.indexOf("ogdpr_tracking=0")>=0,whitelabelPartner:(oy=!1,(cy=c("xanthophyll")).hasOwnProperty("xanthophyll")&&"true"===cy.xanthophyll&&(oy=!0),oy)},hy=Zu.charAt,py=ce,fy=me,my=Math.floor,gy=py("".charAt),vy=py("".replace),by=py("".slice),yy=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,_y=/\$([$&'`]|\d{1,2})/g,wy=Wc,Ay=gt,ky=ce,Ey=Fb,xy=ne,Sy=pt,Ry=Je,Dy=de,Ty=Kr,Oy=Yr,Iy=ps,Py=he,Cy=function(e,t,n){return t+(n?hy(e,t).length:1)},Ly=Lt,Uy=function(e,t,n,r,i,a){var s=n+e.length,o=r.length,c=_y;return void 0!==i&&(i=fy(i),c=yy),vy(a,c,(function(a,c){var d;switch(gy(c,0)){case"$":return"$";case"&":return e;case"`":return by(t,0,n);case"'":return by(t,s);case"<":d=i[by(c,1,-1)];break;default:var u=+c;if(0===u)return a;if(u>o){var l=my(u/10);return 0===l?a:l<=o?void 0===r[l-1]?gy(c,1):r[l-1]+gy(c,1):a}d=r[u-1]}return void 0===d?"":d}))},My=Yb,jy=He("replace"),By=Math.max,Gy=Math.min,Ny=ky([].concat),qy=ky([].push),Fy=ky("".indexOf),Vy=ky("".slice),zy="$0"==="a".replace(/./,"$0"),Hy=!!/./[jy]&&""===/./[jy]("a","$0");Ey("replace",(function(e,t,n){var r=Hy?"$":"$0";return[function(e,n){var r=Py(this),i=Dy(e)?void 0:Ly(e,jy);return i?Ay(i,e,r,n):Ay(t,Iy(r),e,n)},function(e,i){var a=Sy(this),s=Iy(e);if("string"==typeof i&&-1===Fy(i,r)&&-1===Fy(i,"$<")){var o=n(t,a,s,i);if(o.done)return o.value}var c=Ry(i);c||(i=Iy(i));var d=a.global;if(d){var u=a.unicode;a.lastIndex=0}for(var l=[];;){var h=My(a,s);if(null===h)break;if(qy(l,h),!d)break;""===Iy(h[0])&&(a.lastIndex=Cy(s,Oy(a.lastIndex),u))}for(var p,f="",m=0,g=0;g<l.length;g++){for(var v=Iy((h=l[g])[0]),b=By(Gy(Ty(h.index),s.length),0),y=[],_=1;_<h.length;_++)qy(y,void 0===(p=h[_])?p:String(p));var w=h.groups;if(c){var A=Ny([v],y,b,s);void 0!==w&&qy(A,w);var k=Iy(wy(i,void 0,A))}else k=Uy(v,s,b,y,w,i);b>=m&&(f+=Vy(s,m,b)+k,m=b+v.length)}return f+Vy(s,m)}]}),!!xy((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}))||!zy||Hy);var Wy=ne,Ky=Ze,$y=He("iterator"),Qy=!Wy((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,n="";return e.pathname="c%20d",t.forEach((function(e,r){t.delete("b"),n+=r+e})),!t.size&&!Ky||!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[$y]||"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})),Yy=fr,Jy=$s,Xy=Math.floor,Zy=function(e,t){var n=e.length,r=Xy(n/2);return n<8?e_(e,t):t_(e,Zy(Jy(e,0,r),t),Zy(Jy(e,r),t),t)},e_=function(e,t){for(var n,r,i=e.length,a=1;a<i;){for(r=a,n=e[a];r&&t(e[r-1],n)>0;)e[r]=e[--r];r!==a++&&(e[r]=n)}return e},t_=function(e,t,n,r){for(var i=t.length,a=n.length,s=0,o=0;s<i||o<a;)e[s+o]=s<i&&o<a?r(t[s],n[o])<=0?t[s++]:n[o++]:s<i?t[s++]:n[o++];return e},n_=Ya,r_=H,i_=gt,a_=ce,s_=Ze,o_=Qy,c_=fr,d_=no,u_=function(e,t,n){for(var r in t)Yy(e,r,t[r],n);return e},l_=bo,h_=El,p_=Wn,f_=Yp,m_=Je,g_=be,v_=Br,b_=xr,y_=pt,__=nt,w_=ps,A_=Ms,k_=En,E_=ku,x_=gu,S_=of,R_=Zy,D_=He("iterator"),T_="URLSearchParams",O_=T_+"Iterator",I_=p_.set,P_=p_.getterFor(T_),C_=p_.getterFor(O_),L_=Object.getOwnPropertyDescriptor,U_=function(e){if(!s_)return r_[e];var t=L_(r_,e);return t&&t.value},M_=U_("fetch"),j_=U_("Request"),B_=U_("Headers"),G_=j_&&j_.prototype,N_=B_&&B_.prototype,q_=r_.RegExp,F_=r_.TypeError,V_=r_.decodeURIComponent,z_=r_.encodeURIComponent,H_=a_("".charAt),W_=a_([].join),K_=a_([].push),$_=a_("".replace),Q_=a_([].shift),Y_=a_([].splice),J_=a_("".split),X_=a_("".slice),Z_=/\+/g,ew=Array(4),tw=function(e){return ew[e-1]||(ew[e-1]=q_("((?:%[\\da-f]{2}){"+e+"})","gi"))},nw=function(e){try{return V_(e)}catch(t){return e}},rw=function(e){var t=$_(e,Z_," "),n=4;try{return V_(t)}catch(e){for(;n;)t=$_(t,tw(n--),nw);return t}},iw=/[!'()~]|%20/g,aw={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},sw=function(e){return aw[e]},ow=function(e){return $_(z_(e),iw,sw)},cw=h_((function(e,t){I_(this,{type:O_,iterator:E_(P_(e).entries),kind:t})}),"Iterator",(function(){var e=C_(this),t=e.kind,n=e.iterator.next(),r=n.value;return n.done||(n.value="keys"===t?r.key:"values"===t?r.value:[r.key,r.value]),n}),!0),dw=function(e){this.entries=[],this.url=null,void 0!==e&&(__(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===H_(e,0)?X_(e,1):e:w_(e)))};dw.prototype={type:T_,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,n,r,i,a,s,o,c=x_(e);if(c)for(n=(t=E_(e,c)).next;!(r=i_(n,t)).done;){if(a=(i=E_(y_(r.value))).next,(s=i_(a,i)).done||(o=i_(a,i)).done||!i_(a,i).done)throw F_("Expected sequence with length 2");K_(this.entries,{key:w_(s.value),value:w_(o.value)})}else for(var d in e)g_(e,d)&&K_(this.entries,{key:d,value:w_(e[d])})},parseQuery:function(e){if(e)for(var t,n,r=J_(e,"&"),i=0;i<r.length;)(t=r[i++]).length&&(n=J_(t,"="),K_(this.entries,{key:rw(Q_(n)),value:rw(W_(n,"="))}))},serialize:function(){for(var e,t=this.entries,n=[],r=0;r<t.length;)e=t[r++],K_(n,ow(e.key)+"="+ow(e.value));return W_(n,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var uw=function(){f_(this,lw);var e=I_(this,new dw(arguments.length>0?arguments[0]:void 0));s_||(this.length=e.entries.length)},lw=uw.prototype;if(u_(lw,{append:function(e,t){S_(arguments.length,2);var n=P_(this);K_(n.entries,{key:w_(e),value:w_(t)}),s_||this.length++,n.updateURL()},delete:function(e){S_(arguments.length,1);for(var t=P_(this),n=t.entries,r=w_(e),i=0;i<n.length;)n[i].key===r?Y_(n,i,1):i++;s_||(this.length=n.length),t.updateURL()},get:function(e){S_(arguments.length,1);for(var t=P_(this).entries,n=w_(e),r=0;r<t.length;r++)if(t[r].key===n)return t[r].value;return null},getAll:function(e){S_(arguments.length,1);for(var t=P_(this).entries,n=w_(e),r=[],i=0;i<t.length;i++)t[i].key===n&&K_(r,t[i].value);return r},has:function(e){S_(arguments.length,1);for(var t=P_(this).entries,n=w_(e),r=0;r<t.length;)if(t[r++].key===n)return!0;return!1},set:function(e,t){S_(arguments.length,1);for(var n,r=P_(this),i=r.entries,a=!1,s=w_(e),o=w_(t),c=0;c<i.length;c++)(n=i[c]).key===s&&(a?Y_(i,c--,1):(a=!0,n.value=o));a||K_(i,{key:s,value:o}),s_||(this.length=i.length),r.updateURL()},sort:function(){var e=P_(this);R_(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,n=P_(this).entries,r=v_(e,arguments.length>1?arguments[1]:void 0),i=0;i<n.length;)r((t=n[i++]).value,t.key,this)},keys:function(){return new cw(this,"keys")},values:function(){return new cw(this,"values")},entries:function(){return new cw(this,"entries")}},{enumerable:!0}),c_(lw,D_,lw.entries,{name:"entries"}),c_(lw,"toString",(function(){return P_(this).serialize()}),{enumerable:!0}),s_&&d_(lw,"size",{get:function(){return P_(this).entries.length},configurable:!0,enumerable:!0}),l_(uw,T_),n_({global:!0,constructor:!0,forced:!o_},{URLSearchParams:uw}),!o_&&m_(B_)){var hw=a_(N_.has),pw=a_(N_.set),fw=function(e){if(__(e)){var t,n=e.body;if(b_(n)===T_)return t=e.headers?new B_(e.headers):new B_,hw(t,"content-type")||pw(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),A_(e,{body:k_(0,w_(n)),headers:k_(0,t)})}return e};if(m_(M_)&&n_({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return M_(e,arguments.length>1?fw(arguments[1]):{})}}),m_(j_)){var mw=function(e){return f_(this,G_),new j_(e,arguments.length>1?fw(arguments[1]):{})};G_.constructor=mw,mw.prototype=G_,n_({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:mw})}}var gw={URLSearchParams:uw,getState:P_},vw=ha.includes,bw=pp;Ya({target:"Array",proto:!0,forced:ne((function(){return!Array(1).includes()}))},{includes:function(e){return vw(this,e,arguments.length>1?arguments[1]:void 0)}}),bw("includes");var yw=Ya,_w=rb,ww=he,Aw=ps,kw=ab,Ew=ce("".indexOf);function xw(e){var n=this,r={},i=(null==e?void 0:e._ancestor_origins)||window.location.ancestorOrigins,a=(null==e?void 0:e.self_url)||window.location.href,s=(null==e?void 0:e.self_origin)||window.location.origin,o=(null==e?void 0:e.referrer_url)||document.referrer;function c(e){return L(r,e)}function d(e,t){return U(r,e,t)}function u(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(e&&""!==e)try{return new O(e,t)}catch(e){console.log(e)}}function l(){for(var t=(null==e?void 0:e.urls)||[a,o],n=0;n<t.length;n++){var r,i=u(t[n]);if(i){var s=null===(r=i.query)||void 0===r?void 0:r.gd_sdk_referrer_url;if(s&&(s=decodeURIComponent(s),P.isURL(s)))return s}}}return function(){var e;t(this,n),function(){var e=0,t=window;try{for(;t!=t.parent;)e++,t=t.parent}catch(e){d("depth.error",e.message)}d("depth.value",e)}(),function(){var e=i,t=r.depth.value,n=s;if(d("top.domain.from","fallback"),e&&e.length>0)n=e[e.length-1],d("top.domain.from","origins");else if(0===t)n=s,d("top.domain.from","self-top");else if(1===t){var a=u(o);a&&(n=a.origin,d("top.domain.from","referrer"))}d("top.domain.value",n.replace(/^https?:\/\/(www\.)?(.*)$/i,"$2"))}(),function(){var e=l();if(e)if(C(e))d("partner.domain.value",e),d("partner.domain.from","partner-domain");else{var t=u(e,!1);if(t)d("partner.domain.value",t.origin.replace(/^https?:\/\/(www\.)?(.*)$/i,"$2")),d("partner.domain.from","partner-url");else d("partner.domain.value",r.top.domain.value),d("partner.domain.from","partner-fallback")}else d("partner.domain.value",r.top.domain.value),d("partner.domain.from","fallback")}(),e=l(),0===r.depth.value?(d("partner.url.value",a),d("partner.url.from","self-top")):e?C(e)?(d("partner.url.value",a),d("partner.url.from","partner-domain")):(d("partner.url.value",e),d("partner.url.from","partner-url")):(d("partner.url.value",o),d("partner.url.from","fallback"))}.bind(this)(),{get:c,print:function(e){console.log(c(e))}}}yw({target:"String",proto:!0,forced:!kw("includes")},{includes:function(e){return!!~Ew(Aw(ww(this)),Aw(_w(e)),arguments.length>1?arguments[1]:void 0)}});var Sw="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==Sw&&Sw,Rw={searchParams:"URLSearchParams"in Sw,iterable:"Symbol"in Sw&&"iterator"in Symbol,blob:"FileReader"in Sw&&"Blob"in Sw&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in Sw,arrayBuffer:"ArrayBuffer"in Sw};if(Rw.arrayBuffer)var Dw=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],Tw=ArrayBuffer.isView||function(e){return e&&Dw.indexOf(Object.prototype.toString.call(e))>-1};function Ow(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 Iw(e){return"string"!=typeof e&&(e=String(e)),e}function Pw(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return Rw.iterable&&(t[Symbol.iterator]=function(){return t}),t}function Cw(e){this.map={},e instanceof Cw?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 Lw(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function Uw(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function Mw(e){var t=new FileReader,n=Uw(t);return t.readAsArrayBuffer(e),n}function jw(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function Bw(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:Rw.blob&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:Rw.formData&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:Rw.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():Rw.arrayBuffer&&Rw.blob&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=jw(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):Rw.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(e)||Tw(e))?this._bodyArrayBuffer=jw(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):Rw.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},Rw.blob&&(this.blob=function(){var e=Lw(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=Lw(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(Mw)}),this.text=function(){var e=Lw(this);if(e)return e;if(this._bodyBlob)return function(e){var t=new FileReader,n=Uw(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)},Rw.formData&&(this.formData=function(){return this.text().then(qw)}),this.json=function(){return this.text().then(JSON.parse)},this}Cw.prototype.append=function(e,t){e=Ow(e),t=Iw(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},Cw.prototype.delete=function(e){delete this.map[Ow(e)]},Cw.prototype.get=function(e){return e=Ow(e),this.has(e)?this.map[e]:null},Cw.prototype.has=function(e){return this.map.hasOwnProperty(Ow(e))},Cw.prototype.set=function(e,t){this.map[Ow(e)]=Iw(t)},Cw.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},Cw.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),Pw(e)},Cw.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),Pw(e)},Cw.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),Pw(e)},Rw.iterable&&(Cw.prototype[Symbol.iterator]=Cw.prototype.entries);var Gw=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function Nw(e,t){if(!(this instanceof Nw))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 Nw){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new Cw(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 Cw(t.headers)),this.method=function(e){var t=e.toUpperCase();return Gw.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 qw(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(i))}})),t}function Fw(e,t){if(!(this instanceof Fw))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 Cw(t.headers),this.url=t.url||"",this._initBody(e)}Nw.prototype.clone=function(){return new Nw(this,{body:this._bodyInit})},Bw.call(Nw.prototype),Bw.call(Fw.prototype),Fw.prototype.clone=function(){return new Fw(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new Cw(this.headers),url:this.url})},Fw.error=function(){var e=new Fw(null,{status:0,statusText:""});return e.type="error",e};var Vw=[301,302,303,307,308];Fw.redirect=function(e,t){if(-1===Vw.indexOf(t))throw new RangeError("Invalid status code");return new Fw(null,{status:t,headers:{location:e}})};var zw,Hw=Sw.DOMException;try{new Hw}catch(e){Hw=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},Hw.prototype=Object.create(Error.prototype),Hw.prototype.constructor=Hw}function Ww(e,t){return new Promise((function(n,r){var i=new Nw(e,t);if(i.signal&&i.signal.aborted)return r(new Hw("Aborted","AbortError"));var a=new XMLHttpRequest;function s(){a.abort()}a.onload=function(){var e,t,r={status:a.status,statusText:a.statusText,headers:(e=a.getAllResponseHeaders()||"",t=new Cw,e.replace(/\r?\n[\t ]+/g," ").split("\r").map((function(e){return 0===e.indexOf("\n")?e.substr(1,e.length):e})).forEach((function(e){var n=e.split(":"),r=n.shift().trim();if(r){var i=n.join(":").trim();t.append(r,i)}})),t)};r.url="responseURL"in a?a.responseURL:r.headers.get("X-Request-URL");var i="response"in a?a.response:a.responseText;setTimeout((function(){n(new Fw(i,r))}),0)},a.onerror=function(){setTimeout((function(){r(new TypeError("Network request failed"))}),0)},a.ontimeout=function(){setTimeout((function(){r(new TypeError("Network request failed"))}),0)},a.onabort=function(){setTimeout((function(){r(new Hw("Aborted","AbortError"))}),0)},a.open(i.method,function(e){try{return""===e&&Sw.location.href?Sw.location.href:e}catch(t){return e}}(i.url),!0),"include"===i.credentials?a.withCredentials=!0:"omit"===i.credentials&&(a.withCredentials=!1),"responseType"in a&&(Rw.blob?a.responseType="blob":Rw.arrayBuffer&&i.headers.get("Content-Type")&&-1!==i.headers.get("Content-Type").indexOf("application/octet-stream")&&(a.responseType="arraybuffer")),!t||"object"!=typeof t.headers||t.headers instanceof Cw?i.headers.forEach((function(e,t){a.setRequestHeader(t,e)})):Object.getOwnPropertyNames(t.headers).forEach((function(e){a.setRequestHeader(e,Iw(t.headers[e]))})),i.signal&&(i.signal.addEventListener("abort",s),a.onreadystatechange=function(){4===a.readyState&&i.signal.removeEventListener("abort",s)}),a.send(void 0===i._bodyInit?null:i._bodyInit)}))}Ww.polyfill=!0,Sw.fetch||(Sw.fetch=Ww,Sw.Headers=Cw,Sw.Request=Nw,Sw.Response=Fw);var Kw=function(e){var n=this;if(!zw){var r={gameId:e.gameId,hours:(new Date).getHours(),topDomain:uy.topDomain,domain:uy.parentDomain,referrer:uy.parentURL,depth:o(),version:as.version,byloader:uy.isTokenGameURL,isTokenGameURL:uy.isTokenGameURL,isMasterGameURL:uy.isMasterGameURL,isExtHostedGameURL:uy.isExtHostedGameURL,byloaderVersion:uy.version,tracking:ly.userDeclinedTracking,whitelabel:ly.whitelabelPartner,platform:u()};zw=new l(r)}return zw||{send:function(){t(this,n)}.bind(this)}},$w={getGameData:function(e){var n=this;try{var r=e.replace("game.api.gamedistribution.com","game-api.gamedistribution.com");fetch(r).then(function(e){t(this,n)}.bind(this)).catch(function(e){t(this,n)}.bind(this))}catch(e){}},getGameLoaderIndex:function(e){var n=this;try{var r="https://html5-prod-aws.gamedistribution.com/".concat(e,"/");fetch(r).then(function(e){t(this,n)}.bind(this)).catch(function(e){t(this,n)}.bind(this))}catch(e){}}},Qw={prod:["html5.gamedistribution.com","revision.gamedistribution.com"],acc:["html5-acc-real-aws.gamedistribution.com","acceptance-revision.gamedistribution.com"]},Yw={gameAPI:"game.api.gamedistribution.com"},Jw={gameAPI:"game-api-acc-real-aws.gamedistribution.com"},Xw=function(){var e=this,n=Qw.acc.some(function(n){var r;return t(this,e),n===(null===(r=window.location.host)||void 0===r?void 0:r.toLowerCase())}.bind(this));return{env:n?"acc":"prod",config:n?Jw:Yw}},Zw=function(e){var n=this,r=e.url;return new Promise(function(e,i){t(this,n);var a=new XMLHttpRequest;a.open("GET",r,!0),a.onreadystatechange=function(){if(4==a.readyState)if(200==a.status){var t=JSON.parse(a.responseText);e(t)}else i(Error("Error occured on request: ".concat(a.status,", ").concat(a.statusText)))},a.onerror=function(e){i(e)},a.send()}.bind(this))};function eA(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 tA(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?eA(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eA(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var nA,rA,iA,aA=new j,sA=[],oA=function(e){sA.push(e)},cA=function(){var t=e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(rA){e.next=6;break}return e.next=3,lA(iA);case 3:rA=e.sent,aA.emit("game-data-ready",rA),dA();case 6:return e.abrupt("return",rA);case 7:case"end":return e.stop()}}),e)})));return function(){return t.apply(this,arguments)}}(),dA=function(){var t,n;if(null!==(t=rA)&&void 0!==t&&null!==(n=t.aws_tst)&&void 0!==n&&n.enabled){var i,a,s,o,c;if(uA(),null!==(i=rA)&&void 0!==i&&null!==(a=i.aws_tst)&&void 0!==a&&null!==(s=a.ep)&&void 0!==s&&s.api&&null!==(o=rA)&&void 0!==o&&o.url)$w.getGameData(null===(c=rA)||void 0===c?void 0:c.url);setInterval(e(r.mark((function e(){var t;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,lA(iA);case 3:rA=e.sent,null===(t=rA)||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)}},uA=function(){var n=window.fetch;window.fetch=e(r.mark((function e(){var i,a,s,o,c,d,u,l,h,p,f,m,g,v,b,y,_,w,A,k=this,E=arguments;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(u=E.length,l=new Array(u),h=0;h<u;h++)l[h]=E[h];p=l[0],f=l[1],m=null===(i=rA)||void 0===i||null===(a=i.aws_tst)||void 0===a||null===(s=a.ep)||void 0===s?void 0:s.atm,g=null===(o=rA)||void 0===o||null===(c=o.aws_tst)||void 0===c||null===(d=c.ep)||void 0===d?void 0:d.msgrt,v=function(e,r){var i=this;t(this,k);var a=p.replace(e,r);n(a,f).then(function(){t(this,i)}.bind(this))}.bind(this);try{m&&p.indexOf("tag.atom")>0&&v("tag.atom.gamedistribution.com","atom-tag-prod-aws.gamedistribution.com"),g&&p.indexOf("msgrt.gamedistribution.com")>0&&(null===(b=rA)||void 0===b||b.aws_tst,null===(y=rA)||void 0===y||null===(_=y.aws_tst)||void 0===_||null===(w=_.ep)||void 0===w||w.msgrt,v("msgrt.gamedistribution.com","msgrt-prod-aws.gamedistribution.com"))}catch(e){}return e.next=9,n(p,f);case 9:return A=e.sent,e.abrupt("return",A);case 11:case"end":return e.stop()}}),e,this)})))},lA=function(n){var i=this;nA.send("gdfw.loading",{message:"loading"}),sA=[],oA("1"),oA("2");var a=new xw;oA("3");var s=a.get("partner.domain.value");oA("4");var o=function(){return t(this,i),{gameId:n.gameId,disableAds:{},preroll:!0,midroll:12e4,rewardedAds:!1,title:"",tags:[],category:"",assets:[],dmain:!0,sdk:{},loader:{},splash:{},promo:{},dAds:{},pAds:{},mAds:{},rAds:{}}}.bind(this);oA("5");var c=function(){t(this,i);var e=d(),r=e?"&mode=".concat(e):"",a=Xw().config;return"https://".concat(a.gameAPI,"/game/v4/get/").concat(n.gameId.replace(/-/g,""),"/?domain=").concat(s).concat(r,"&v=").concat(as.version,"&localTime=").concat((new Date).getHours())}.bind(this);oA("6");var d=function(){var e=this;t(this,i);var n=new Proxy(new URLSearchParams(window.location.search),{get:function(n,r){return t(this,e),n.get(r)}.bind(this)});return!n.gd_mode&&window.location.search.includes("gd_mode")?window.location.search.split("gd_mode=")[1]:n.gd_mode}.bind(this);return oA("7"),new Promise(function(n){var a=this;t(this,i),oA("7.1");var s=o();try{oA("7.2");var d=c();oA("7.3"),fetch(d).then(function(){var t=e(r.mark((function e(t){var n;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return oA("7.4"),e.prev=1,e.next=4,t.json();case 4:n=e.sent,e.next=13;break;case 7:return e.prev=7,e.t0=e.catch(1),e.t0,e.next=12,Zw({url:d});case 12:n=e.sent;case 13:return e.abrupt("return",n);case 14:case"end":return e.stop()}}),e,null,[[1,7]])})));return function(e){return t.apply(this,arguments)}}()).then(function(e){var r=this;if(t(this,a),oA("7.5"),e.success){var i,o,c,u=e.result.game;oA("7.6");var l={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,publishedAt:u.publishedAt,tags:u.tags,category:u.category,assets:u.assets,disp_2nd_prer:u.disp_2nd_prer,ctry_vst:u.ctry_vst,ctry:u.ctry,crtv:u.crtv,dmain:u.dmain,aws_tst:u.aws_tst,meta:u.meta,__t4r:ss(u.__t4r)||{},block_exts:ss(u.push_cuda),bloc_gard:ss(u.bloc_gard),cookie:ss(u.cookie),gdpr:ss(u.gdpr),diagnostic:ss(u.diagnostic),cmp:ss(u.cmp),gft:ss(u.gft)||{},sdk:ss(u.sdk)||{},sdkfw:ss(u.sdkfw)||{},loader:ss(u.loader)||{},splash:ss(u.splash)||{},promo:ss(u.promo)||{},dAds:ss(u.dads)||{},pAds:ss(u.pads)||{},mAds:ss(u.mads)||{},rAds:ss(u.rads)||{},lp:ss(u.lp)||{},extsc:ss(u.extsc)||{},evnts:ss(u.evnts)||{},dp:ss(u.dp)||{},adflw:ss(u.adflw)||{},afgszf:ss(u.afgszf)||{},fllc:ss(u.fllc)||{},lotm:ss(u.lotm)||{},t4rc:ss(u.t4rc)||{},midroll_plus:ss(u.midroll_plus)||{},gmky:ss(u.gmky)||{},urlBlockExc:ss(u.url_blck_exc)||{}};oA("7.7");var p=h(M(s),l);oA("7.8"),p.afg_disabled=!1===(null===(i=p.sdk)||void 0===i||null===(o=i.afg)||void 0===o?void 0:o.enabled),p.url=d,function(){t(this,r),void 0!==us.afgEnabled&&(p.afg_disabled=!us.afgEnabled),void 0!==us.promoEnabled&&(p.promo=p.promo||{},p.promo=tA(tA({},p.promo),{},{rainbow:{enabled:us.promoEnabled}}))}.bind(this),oA("7.9"),null!==(c=p.pAds)&&void 0!==c&&c.enabled&&(p.preroll=!0),oA("7.10"),nA.send("gdfw.success",{message:"success"}),n(p)}else{s.failed=!0;var f=sA[sA.length-1];nA.send("gdfw.err",{message:"".concat(f,": json error")}),n(s)}}.bind(this)).catch(function(e){t(this,a);var r=sA[sA.length-1];nA.send("gdfw.err",{message:"".concat(r,": ").concat(e.message?e.message:e)}),s.failed=!0,n(s)}.bind(this))}catch(e){var u=sA[sA.length-1];nA.send("gdfw.err",{message:"".concat(u,": global ").concat(e.message?e.message:e)}),s.failed=!0,n(s)}}.bind(this))},hA=function(){var t=e(r.mark((function e(){var t,n;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,cA();case 2:return n=e.sent,e.abrupt("return",!(null==n||null===(t=n.sdkfw)||void 0===t||!t.enabled));case 4:case"end":return e.stop()}}),e)})));return function(){return t.apply(this,arguments)}}(),pA=function(){var t=e(r.mark((function e(){var t,n,i;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,cA();case 2:return n=e.sent,i=null==n||null===(t=n.diagnostic)||void 0===t||!t.close_ga,e.abrupt("return",i);case 5:case"end":return e.stop()}}),e)})));return function(){return t.apply(this,arguments)}}(),fA=function(){var t=e(r.mark((function e(){var t,n;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,cA();case 2:return n=e.sent,e.next=5,hA();case 5:if(e.t0=e.sent,!e.t0){e.next=8;break}e.t0=!(null==n||null===(t=n.sdkfw)||void 0===t||!t.handshake);case 8:return e.abrupt("return",e.t0);case 9:case"end":return e.stop()}}),e)})));return function(){return t.apply(this,arguments)}}(),mA=function(){var t=e(r.mark((function e(){var t,n,i,a,s,o,c,d;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,cA();case 2:return c=e.sent,d=!(null==c||null===(t=c.extsc)||void 0===t||!t.enabled),e.abrupt("return",{enabled:d,path:d?null==c||null===(n=c.extsc)||void 0===n?void 0:n.path:"",name:d?null==c||null===(i=c.extsc)||void 0===i?void 0:i.name:"",ref:d?null==c||null===(a=c.extsc)||void 0===a?void 0:a.ref:"",loadedFlag:d?null==c||null===(s=c.extsc)||void 0===s?void 0:s.loadedFlag:void 0,loadedFlagCheck:!!d&&!(null==c||null===(o=c.extsc)||void 0===o||!o.loadedFlagCheck)});case 5:case"end":return e.stop()}}),e)})));return function(){return t.apply(this,arguments)}}(),gA=function(){var n=e(r.mark((function e(){var n,i,a,s,o,c=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,mA();case 2:if((n=e.sent).enabled){e.next=5;break}return e.abrupt("return");case 5:return i=n.path,a=n.name,s=n.ref,e.prev=6,o={},e.next=10,f(i,a,{error_prefix:"Blocked:",exists:function(){return t(this,c),!!s&&!!window[s]}.bind(this),attrs:o});case 10:e.next=16;break;case 12:e.prev=12,e.t0=e.catch(6),console.log("extsc: error on external partner script load",a,e.t0),p("DEVELOPER_ERROR",e.t0,"warning");case 16:case"end":return e.stop()}}),e,this,[[6,12]])})));return function(){return n.apply(this,arguments)}}(),vA=!1,bA=!1,yA=function(){return new Promise(function(){var n=e(r.mark((function e(n,i){var a,s,o,c,d,u=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!vA){e.next=4;break}return e.abrupt("return",n(bA));case 4:vA=!0;case 5:return e.next=7,mA();case 7:if((a=e.sent).enabled){e.next=10;break}return e.abrupt("return",n(!1));case 10:if(s=a.loadedFlag,!(o=a.loadedFlagCheck)||s){e.next=13;break}return e.abrupt("return",n(!1));case 13:if(o){e.next=16;break}return bA=!0,e.abrupt("return",n(!0));case 16:c=!0,setTimeout(function(){t(this,u),c&&(c=!1,vA=!0,n(!1))}.bind(this),5e3),d=setInterval(function(){t(this,u),c&&o&&window[s]?(c=!1,vA=!0,bA=!0,clearInterval(d),n(!0)):c||clearInterval(d)}.bind(this),100);case 19:case"end":return e.stop()}}),e,this)})));return function(e,t){return n.apply(this,arguments)}}())},_A=Ya,wA=um,AA=ne,kA=yt,EA=Je,xA=af,SA=hv,RA=fr,DA=wA&&wA.prototype;if(_A({target:"Promise",proto:!0,real:!0,forced:!!wA&&AA((function(){DA.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=xA(this,kA("Promise")),n=EA(e);return this.then(n?function(n){return SA(t,e()).then((function(){return n}))}:e,n?function(n){return SA(t,e()).then((function(){throw n}))}:e)}}),EA(wA)){var TA=kA("Promise").prototype.finally;DA.finally!==TA&&RA(DA,"finally",TA,{unsafe:!0})}var OA="\t\n\v\f\r                 \u2028\u2029\ufeff",IA=he,PA=ps,CA=OA,LA=ce("".replace),UA=RegExp("^["+CA+"]+"),MA=RegExp("(^|[^"+CA+"])["+CA+"]+$"),jA=function(e){return function(t){var n=PA(IA(t));return 1&e&&(n=LA(n,UA,"")),2&e&&(n=LA(n,MA,"$1")),n}},BA={start:jA(1),end:jA(2),trim:jA(3)},GA=pn.PROPER,NA=ne,qA=OA,FA=BA.trim;Ya({target:"String",proto:!0,forced:function(e){return NA((function(){return!!qA[e]()||"​…᠎"!=="​…᠎"[e]()||GA&&qA[e].name!==e}))}("trim")},{trim:function(){return FA(this)}});var VA=Ya,zA=Ti.find,HA=pp,WA="find",KA=!0;WA in[]&&Array(1)[WA]((function(){KA=!1})),VA({target:"Array",proto:!0,forced:KA},{find:function(e){return zA(this,e,arguments.length>1?arguments[1]:void 0)}}),HA(WA);var $A=Je,QA=nt,YA=Cl,JA=Xe.f,XA=Ze,ZA=H,ek=ce,tk=Fa,nk=function(e,t,n){var r,i;return YA&&$A(r=t.constructor)&&r!==n&&QA(i=r.prototype)&&i!==n.prototype&&YA(e,i),e},rk=Rn,ik=ra.f,ak=_t,sk=eb,ok=ps,ck=kb,dk=mh,uk=function(e,t,n){n in e||JA(e,n,{configurable:!0,get:function(){return t[n]},set:function(e){t[n]=e}})},lk=fr,hk=ne,pk=be,fk=Wn.enforce,mk=Kp,gk=bh,vk=wh,bk=He("match"),yk=ZA.RegExp,_k=yk.prototype,wk=ZA.SyntaxError,Ak=ek(_k.exec),kk=ek("".charAt),Ek=ek("".replace),xk=ek("".indexOf),Sk=ek("".slice),Rk=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,Dk=/a/g,Tk=/a/g,Ok=new yk(Dk)!==Dk,Ik=dk.MISSED_STICKY,Pk=dk.UNSUPPORTED_Y,Ck=XA&&(!Ok||Ik||gk||vk||hk((function(){return Tk[bk]=!1,yk(Dk)!=Dk||yk(Tk)==Tk||"/a/i"!=yk(Dk,"i")})));if(tk("RegExp",Ck)){for(var Lk=function(e,t){var n,r,i,a,s,o,c=ak(_k,this),d=sk(e),u=void 0===t,l=[],h=e;if(!c&&d&&u&&e.constructor===Lk)return e;if((d||ak(_k,e))&&(e=e.source,u&&(t=ck(h))),e=void 0===e?"":ok(e),t=void 0===t?"":ok(t),h=e,gk&&"dotAll"in Dk&&(r=!!t&&xk(t,"s")>-1)&&(t=Ek(t,/s/g,"")),n=t,Ik&&"sticky"in Dk&&(i=!!t&&xk(t,"y")>-1)&&Pk&&(t=Ek(t,/y/g,"")),vk&&(a=function(e){for(var t,n=e.length,r=0,i="",a=[],s={},o=!1,c=!1,d=0,u="";r<=n;r++){if("\\"===(t=kk(e,r)))t+=kk(e,++r);else if("]"===t)o=!1;else if(!o)switch(!0){case"["===t:o=!0;break;case"("===t:Ak(Rk,Sk(e,r+1))&&(r+=2,c=!0),i+=t,d++;continue;case">"===t&&c:if(""===u||pk(s,u))throw new wk("Invalid capture group name");s[u]=!0,a[a.length]=[u,d],c=!1,u="";continue}c?u+=t:i+=t}return[i,a]}(e),e=a[0],l=a[1]),s=nk(yk(e,t),c?this:_k,Lk),(r||i||l.length)&&(o=fk(s),r&&(o.dotAll=!0,o.raw=Lk(function(e){for(var t,n=e.length,r=0,i="",a=!1;r<=n;r++)"\\"!==(t=kk(e,r))?a||"."!==t?("["===t?a=!0:"]"===t&&(a=!1),i+=t):i+="[\\s\\S]":i+=t+kk(e,++r);return i}(e),n)),i&&(o.sticky=!0),l.length&&(o.groups=l)),e!==h)try{rk(s,"source",""===h?"(?:)":h)}catch(e){}return s},Uk=ik(yk),Mk=0;Uk.length>Mk;)uk(Lk,yk,Uk[Mk++]);_k.constructor=Lk,Lk.prototype=_k,lk(ZA,"RegExp",Lk,{constructor:!0})}mk("RegExp");var jk=Ya,Bk=Vr,Gk=Ki,Nk=Ii,qk=ce([].join);jk({target:"Array",proto:!0,forced:Bk!=Object||!Nk("join",",")},{join:function(e){return qk(Gk(this),void 0===e?",":e)}});var Fk=Ti.map;Ya({target:"Array",proto:!0,forced:!Td("map")},{map:function(e){return Fk(this,e,arguments.length>1?arguments[1]:void 0)}});var Vk=Ze,zk=ce,Hk=gt,Wk=ne,Kk=Za,$k=Aa,Qk=qi,Yk=me,Jk=Vr,Xk=Object.assign,Zk=Object.defineProperty,eE=zk([].concat),tE=!Xk||Wk((function(){if(Vk&&1!==Xk({b:1},Xk(Zk({},"a",{enumerable:!0,get:function(){Zk(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!=Xk({},e)[n]||Kk(Xk({},t)).join("")!=r}))?function(e,t){for(var n=Yk(e),r=arguments.length,i=1,a=$k.f,s=Qk.f;r>i;)for(var o,c=Jk(arguments[i++]),d=a?eE(Kk(c),a(c)):Kk(c),u=d.length,l=0;u>l;)o=d[l++],Vk&&!Hk(s,c,o)||(n[o]=c[o]);return n}:Xk,nE=tE;Ya({target:"Object",stat:!0,arity:2,forced:Object.assign!==nE},{assign:nE});var rE,iE=ce,aE=2147483647,sE=/[^\0-\u007E]/,oE=/[.\u3002\uFF0E\uFF61]/g,cE="Overflow: input needs wider integers to process",dE=RangeError,uE=iE(oE.exec),lE=Math.floor,hE=String.fromCharCode,pE=iE("".charCodeAt),fE=iE([].join),mE=iE([].push),gE=iE("".replace),vE=iE("".split),bE=iE("".toLowerCase),yE=function(e){return e+22+75*(e<26)},_E=function(e,t,n){var r=0;for(e=n?lE(e/700):e>>1,e+=lE(e/t);e>455;)e=lE(e/35),r+=36;return lE(r+36*e/(e+38))},wE=function(e){var t=[];e=function(e){for(var t=[],n=0,r=e.length;n<r;){var i=pE(e,n++);if(i>=55296&&i<=56319&&n<r){var a=pE(e,n++);56320==(64512&a)?mE(t,((1023&i)<<10)+(1023&a)+65536):(mE(t,i),n--)}else mE(t,i)}return t}(e);var n,r,i=e.length,a=128,s=0,o=72;for(n=0;n<e.length;n++)(r=e[n])<128&&mE(t,hE(r));var c=t.length,d=c;for(c&&mE(t,"-");d<i;){var u=aE;for(n=0;n<e.length;n++)(r=e[n])>=a&&r<u&&(u=r);var l=d+1;if(u-a>lE((aE-s)/l))throw dE(cE);for(s+=(u-a)*l,a=u,n=0;n<e.length;n++){if((r=e[n])<a&&++s>aE)throw dE(cE);if(r==a){for(var h=s,p=36;;){var f=p<=o?1:p>=o+26?26:p-o;if(h<f)break;var m=h-f,g=36-f;mE(t,hE(yE(f+m%g))),h=lE(m/g),p+=36}mE(t,hE(yE(h))),o=_E(s,l,d==c),s=0,d++}}s++,a++}return fE(t,"")},AE=Ya,kE=Ze,EE=Qy,xE=H,SE=Br,RE=ce,DE=fr,TE=no,OE=Yp,IE=be,PE=tE,CE=Uu,LE=$s,UE=Zu.codeAt,ME=function(e){var t,n,r=[],i=vE(gE(bE(e),oE,"."),".");for(t=0;t<i.length;t++)n=i[t],mE(r,uE(sE,n)?"xn--"+wE(n):n);return fE(r,".")},jE=ps,BE=bo,GE=of,NE=gw,qE=Wn,FE=qE.set,VE=qE.getterFor("URL"),zE=NE.URLSearchParams,HE=NE.getState,WE=xE.URL,KE=xE.TypeError,$E=xE.parseInt,QE=Math.floor,YE=Math.pow,JE=RE("".charAt),XE=RE(/./.exec),ZE=RE([].join),ex=RE(1..toString),tx=RE([].pop),nx=RE([].push),rx=RE("".replace),ix=RE([].shift),ax=RE("".split),sx=RE("".slice),ox=RE("".toLowerCase),cx=RE([].unshift),dx="Invalid scheme",ux="Invalid host",lx="Invalid port",hx=/[a-z]/i,px=/[\d+-.a-z]/i,fx=/\d/,mx=/^0x/i,gx=/^[0-7]+$/,vx=/^\d+$/,bx=/^[\da-f]+$/i,yx=/[\0\t\n\r #%/:<>?@[\\\]^|]/,_x=/[\0\t\n\r #/:<>?@[\\\]^|]/,wx=/^[\u0000-\u0020]+/,Ax=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,kx=/[\t\n\r]/g,Ex=function(e){var t,n,r,i;if("number"==typeof e){for(t=[],n=0;n<4;n++)cx(t,e%256),e=QE(e/256);return ZE(t,".")}if("object"==typeof e){for(t="",r=function(e){for(var t=null,n=1,r=null,i=0,a=0;a<8;a++)0!==e[a]?(i>n&&(t=r,n=i),r=null,i=0):(null===r&&(r=a),++i);return i>n&&(t=r,n=i),t}(e),n=0;n<8;n++)i&&0===e[n]||(i&&(i=!1),r===n?(t+=n?":":"::",i=!0):(t+=ex(e[n],16),n<7&&(t+=":")));return"["+t+"]"}return e},xx={},Sx=PE({},xx,{" ":1,'"':1,"<":1,">":1,"`":1}),Rx=PE({},Sx,{"#":1,"?":1,"{":1,"}":1}),Dx=PE({},Rx,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),Tx=function(e,t){var n=UE(e,0);return n>32&&n<127&&!IE(t,e)?e:encodeURIComponent(e)},Ox={ftp:21,file:null,http:80,https:443,ws:80,wss:443},Ix=function(e,t){var n;return 2==e.length&&XE(hx,JE(e,0))&&(":"==(n=JE(e,1))||!t&&"|"==n)},Px=function(e){var t;return e.length>1&&Ix(sx(e,0,2))&&(2==e.length||"/"===(t=JE(e,2))||"\\"===t||"?"===t||"#"===t)},Cx=function(e){return"."===e||"%2e"===ox(e)},Lx={},Ux={},Mx={},jx={},Bx={},Gx={},Nx={},qx={},Fx={},Vx={},zx={},Hx={},Wx={},Kx={},$x={},Qx={},Yx={},Jx={},Xx={},Zx={},eS={},tS=function(e,t,n){var r,i,a,s=jE(e);if(t){if(i=this.parse(s))throw KE(i);this.searchParams=null}else{if(void 0!==n&&(r=new tS(n,!0)),i=this.parse(s,null,r))throw KE(i);(a=HE(new zE)).bindURL(this),this.searchParams=a}};tS.prototype={type:"URL",parse:function(e,t,n){var r,i,a,s,o,c=this,d=t||Lx,u=0,l="",h=!1,p=!1,f=!1;for(e=jE(e),t||(c.scheme="",c.username="",c.password="",c.host=null,c.port=null,c.path=[],c.query=null,c.fragment=null,c.cannotBeABaseURL=!1,e=rx(e,wx,""),e=rx(e,Ax,"$1")),e=rx(e,kx,""),r=CE(e);u<=r.length;){switch(i=r[u],d){case Lx:if(!i||!XE(hx,i)){if(t)return dx;d=Mx;continue}l+=ox(i),d=Ux;break;case Ux:if(i&&(XE(px,i)||"+"==i||"-"==i||"."==i))l+=ox(i);else{if(":"!=i){if(t)return dx;l="",d=Mx,u=0;continue}if(t&&(c.isSpecial()!=IE(Ox,l)||"file"==l&&(c.includesCredentials()||null!==c.port)||"file"==c.scheme&&!c.host))return;if(c.scheme=l,t)return void(c.isSpecial()&&Ox[c.scheme]==c.port&&(c.port=null));l="","file"==c.scheme?d=Kx:c.isSpecial()&&n&&n.scheme==c.scheme?d=jx:c.isSpecial()?d=qx:"/"==r[u+1]?(d=Bx,u++):(c.cannotBeABaseURL=!0,nx(c.path,""),d=Xx)}break;case Mx:if(!n||n.cannotBeABaseURL&&"#"!=i)return dx;if(n.cannotBeABaseURL&&"#"==i){c.scheme=n.scheme,c.path=LE(n.path),c.query=n.query,c.fragment="",c.cannotBeABaseURL=!0,d=eS;break}d="file"==n.scheme?Kx:Gx;continue;case jx:if("/"!=i||"/"!=r[u+1]){d=Gx;continue}d=Fx,u++;break;case Bx:if("/"==i){d=Vx;break}d=Jx;continue;case Gx:if(c.scheme=n.scheme,i==rE)c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=LE(n.path),c.query=n.query;else if("/"==i||"\\"==i&&c.isSpecial())d=Nx;else if("?"==i)c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=LE(n.path),c.query="",d=Zx;else{if("#"!=i){c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=LE(n.path),c.path.length--,d=Jx;continue}c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=LE(n.path),c.query=n.query,c.fragment="",d=eS}break;case Nx:if(!c.isSpecial()||"/"!=i&&"\\"!=i){if("/"!=i){c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,d=Jx;continue}d=Vx}else d=Fx;break;case qx:if(d=Fx,"/"!=i||"/"!=JE(l,u+1))continue;u++;break;case Fx:if("/"!=i&&"\\"!=i){d=Vx;continue}break;case Vx:if("@"==i){h&&(l="%40"+l),h=!0,a=CE(l);for(var m=0;m<a.length;m++){var g=a[m];if(":"!=g||f){var v=Tx(g,Dx);f?c.password+=v:c.username+=v}else f=!0}l=""}else if(i==rE||"/"==i||"?"==i||"#"==i||"\\"==i&&c.isSpecial()){if(h&&""==l)return"Invalid authority";u-=CE(l).length+1,l="",d=zx}else l+=i;break;case zx:case Hx:if(t&&"file"==c.scheme){d=Qx;continue}if(":"!=i||p){if(i==rE||"/"==i||"?"==i||"#"==i||"\\"==i&&c.isSpecial()){if(c.isSpecial()&&""==l)return ux;if(t&&""==l&&(c.includesCredentials()||null!==c.port))return;if(s=c.parseHost(l))return s;if(l="",d=Yx,t)return;continue}"["==i?p=!0:"]"==i&&(p=!1),l+=i}else{if(""==l)return ux;if(s=c.parseHost(l))return s;if(l="",d=Wx,t==Hx)return}break;case Wx:if(!XE(fx,i)){if(i==rE||"/"==i||"?"==i||"#"==i||"\\"==i&&c.isSpecial()||t){if(""!=l){var b=$E(l,10);if(b>65535)return lx;c.port=c.isSpecial()&&b===Ox[c.scheme]?null:b,l=""}if(t)return;d=Yx;continue}return lx}l+=i;break;case Kx:if(c.scheme="file","/"==i||"\\"==i)d=$x;else{if(!n||"file"!=n.scheme){d=Jx;continue}if(i==rE)c.host=n.host,c.path=LE(n.path),c.query=n.query;else if("?"==i)c.host=n.host,c.path=LE(n.path),c.query="",d=Zx;else{if("#"!=i){Px(ZE(LE(r,u),""))||(c.host=n.host,c.path=LE(n.path),c.shortenPath()),d=Jx;continue}c.host=n.host,c.path=LE(n.path),c.query=n.query,c.fragment="",d=eS}}break;case $x:if("/"==i||"\\"==i){d=Qx;break}n&&"file"==n.scheme&&!Px(ZE(LE(r,u),""))&&(Ix(n.path[0],!0)?nx(c.path,n.path[0]):c.host=n.host),d=Jx;continue;case Qx:if(i==rE||"/"==i||"\\"==i||"?"==i||"#"==i){if(!t&&Ix(l))d=Jx;else if(""==l){if(c.host="",t)return;d=Yx}else{if(s=c.parseHost(l))return s;if("localhost"==c.host&&(c.host=""),t)return;l="",d=Yx}continue}l+=i;break;case Yx:if(c.isSpecial()){if(d=Jx,"/"!=i&&"\\"!=i)continue}else if(t||"?"!=i)if(t||"#"!=i){if(i!=rE&&(d=Jx,"/"!=i))continue}else c.fragment="",d=eS;else c.query="",d=Zx;break;case Jx:if(i==rE||"/"==i||"\\"==i&&c.isSpecial()||!t&&("?"==i||"#"==i)){if(".."===(o=ox(o=l))||"%2e."===o||".%2e"===o||"%2e%2e"===o?(c.shortenPath(),"/"==i||"\\"==i&&c.isSpecial()||nx(c.path,"")):Cx(l)?"/"==i||"\\"==i&&c.isSpecial()||nx(c.path,""):("file"==c.scheme&&!c.path.length&&Ix(l)&&(c.host&&(c.host=""),l=JE(l,0)+":"),nx(c.path,l)),l="","file"==c.scheme&&(i==rE||"?"==i||"#"==i))for(;c.path.length>1&&""===c.path[0];)ix(c.path);"?"==i?(c.query="",d=Zx):"#"==i&&(c.fragment="",d=eS)}else l+=Tx(i,Rx);break;case Xx:"?"==i?(c.query="",d=Zx):"#"==i?(c.fragment="",d=eS):i!=rE&&(c.path[0]+=Tx(i,xx));break;case Zx:t||"#"!=i?i!=rE&&("'"==i&&c.isSpecial()?c.query+="%27":c.query+="#"==i?"%23":Tx(i,xx)):(c.fragment="",d=eS);break;case eS:i!=rE&&(c.fragment+=Tx(i,Sx))}u++}},parseHost:function(e){var t,n,r;if("["==JE(e,0)){if("]"!=JE(e,e.length-1))return ux;if(t=function(e){var t,n,r,i,a,s,o,c=[0,0,0,0,0,0,0,0],d=0,u=null,l=0,h=function(){return JE(e,l)};if(":"==h()){if(":"!=JE(e,1))return;l+=2,u=++d}for(;h();){if(8==d)return;if(":"!=h()){for(t=n=0;n<4&&XE(bx,h());)t=16*t+$E(h(),16),l++,n++;if("."==h()){if(0==n)return;if(l-=n,d>6)return;for(r=0;h();){if(i=null,r>0){if(!("."==h()&&r<4))return;l++}if(!XE(fx,h()))return;for(;XE(fx,h());){if(a=$E(h(),10),null===i)i=a;else{if(0==i)return;i=10*i+a}if(i>255)return;l++}c[d]=256*c[d]+i,2!=++r&&4!=r||d++}if(4!=r)return;break}if(":"==h()){if(l++,!h())return}else if(h())return;c[d++]=t}else{if(null!==u)return;l++,u=++d}}if(null!==u)for(s=d-u,d=7;0!=d&&s>0;)o=c[d],c[d--]=c[u+s-1],c[u+--s]=o;else if(8!=d)return;return c}(sx(e,1,-1)),!t)return ux;this.host=t}else if(this.isSpecial()){if(e=ME(e),XE(yx,e))return ux;if(t=function(e){var t,n,r,i,a,s,o,c=ax(e,".");if(c.length&&""==c[c.length-1]&&c.length--,(t=c.length)>4)return e;for(n=[],r=0;r<t;r++){if(""==(i=c[r]))return e;if(a=10,i.length>1&&"0"==JE(i,0)&&(a=XE(mx,i)?16:8,i=sx(i,8==a?1:2)),""===i)s=0;else{if(!XE(10==a?vx:8==a?gx:bx,i))return e;s=$E(i,a)}nx(n,s)}for(r=0;r<t;r++)if(s=n[r],r==t-1){if(s>=YE(256,5-t))return null}else if(s>255)return null;for(o=tx(n),r=0;r<n.length;r++)o+=n[r]*YE(256,3-r);return o}(e),null===t)return ux;this.host=t}else{if(XE(_x,e))return ux;for(t="",n=CE(e),r=0;r<n.length;r++)t+=Tx(n[r],xx);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return IE(Ox,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"==this.scheme&&1==t&&Ix(e[0],!0)||e.length--},serialize:function(){var e=this,t=e.scheme,n=e.username,r=e.password,i=e.host,a=e.port,s=e.path,o=e.query,c=e.fragment,d=t+":";return null!==i?(d+="//",e.includesCredentials()&&(d+=n+(r?":"+r:"")+"@"),d+=Ex(i),null!==a&&(d+=":"+a)):"file"==t&&(d+="//"),d+=e.cannotBeABaseURL?s[0]:s.length?"/"+ZE(s,"/"):"",null!==o&&(d+="?"+o),null!==c&&(d+="#"+c),d},setHref:function(e){var t=this.parse(e);if(t)throw KE(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"==e)try{return new nS(e.path[0]).origin}catch(e){return"null"}return"file"!=e&&this.isSpecial()?e+"://"+Ex(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(jE(e)+":",Lx)},getUsername:function(){return this.username},setUsername:function(e){var t=CE(jE(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var n=0;n<t.length;n++)this.username+=Tx(t[n],Dx)}},getPassword:function(){return this.password},setPassword:function(e){var t=CE(jE(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var n=0;n<t.length;n++)this.password+=Tx(t[n],Dx)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?Ex(e):Ex(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,zx)},getHostname:function(){var e=this.host;return null===e?"":Ex(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,Hx)},getPort:function(){var e=this.port;return null===e?"":jE(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""==(e=jE(e))?this.port=null:this.parse(e,Wx))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+ZE(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,Yx))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""==(e=jE(e))?this.query=null:("?"==JE(e,0)&&(e=sx(e,1)),this.query="",this.parse(e,Zx)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!=(e=jE(e))?("#"==JE(e,0)&&(e=sx(e,1)),this.fragment="",this.parse(e,eS)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var nS=function(e){var t=OE(this,rS),n=GE(arguments.length,1)>1?arguments[1]:void 0,r=FE(t,new tS(e,!1,n));kE||(t.href=r.serialize(),t.origin=r.getOrigin(),t.protocol=r.getProtocol(),t.username=r.getUsername(),t.password=r.getPassword(),t.host=r.getHost(),t.hostname=r.getHostname(),t.port=r.getPort(),t.pathname=r.getPathname(),t.search=r.getSearch(),t.searchParams=r.getSearchParams(),t.hash=r.getHash())},rS=nS.prototype,iS=function(e,t){return{get:function(){return VE(this)[e]()},set:t&&function(e){return VE(this)[t](e)},configurable:!0,enumerable:!0}};if(kE&&(TE(rS,"href",iS("serialize","setHref")),TE(rS,"origin",iS("getOrigin")),TE(rS,"protocol",iS("getProtocol","setProtocol")),TE(rS,"username",iS("getUsername","setUsername")),TE(rS,"password",iS("getPassword","setPassword")),TE(rS,"host",iS("getHost","setHost")),TE(rS,"hostname",iS("getHostname","setHostname")),TE(rS,"port",iS("getPort","setPort")),TE(rS,"pathname",iS("getPathname","setPathname")),TE(rS,"search",iS("getSearch","setSearch")),TE(rS,"searchParams",iS("getSearchParams")),TE(rS,"hash",iS("getHash","setHash"))),DE(rS,"toJSON",(function(){return VE(this).serialize()}),{enumerable:!0}),DE(rS,"toString",(function(){return VE(this).serialize()}),{enumerable:!0}),WE){var aS=WE.createObjectURL,sS=WE.revokeObjectURL;aS&&DE(nS,"createObjectURL",SE(aS,WE)),sS&&DE(nS,"revokeObjectURL",SE(sS,WE))}BE(nS,"URL"),AE({global:!0,constructor:!0,forced:!EE,sham:!kE},{URL:nS});var oS=function(){function e(t){D(this,e),this.gameData=t,this.customParamKeys=["vid","_1ld","_1lp"]}return R(e,[{key:"_getFakeCustomParams",value:function(){var e={_vid:["bla_bla1","bla_bla2","bla_bla3"],_1ld:["1ld_1","1ld_2","1ld_3","1ld_4"],_1lp:["1lp_1","1lp_2"]},t={};for(var n in e){var r=e[n];t[n]=r[Math.floor(Math.random()*r.length)]}return t}},{key:"checkCustomParams",value:function(){var e=this;try{var n={},r=this.gameData.diagnostic&&this.gameData.diagnostic.cp&&this.gameData.diagnostic.cp.enabled,i=new O(location.href,!0);for(var a in i.query)n[a]=i.query[a];return Object.keys(n).filter(function(n){var r=this;return t(this,e),this.customParamKeys.some(function(e){return t(this,r),e===n}.bind(this))}.bind(this)).length>0||r?(console.log("custom-params",n,r),n):void console.log("custom-params, none")}catch(e){console.log("_checkCustomParams.Error",e)}}}]),e}(),cS=function(){function e(t,n){D(this,e),this.adContainer=t,this.onResume=n}return R(e,[{key:"show",value:function(){this.adResumeButton.style.display="block",this.adResumeButtonOverlay.style.display="block"}},{key:"hide",value:function(){this.adResumeButton.style.display="none",this.adResumeButtonOverlay.style.display="none"}},{key:"add",value:function(){var e=this;try{var n=document.createElement("div");this.adResumeButton=n,n.id="gd__resume__button",n.setAttribute("title","Resume"),this.addStyles(),n.classList.add("gd__resume__button"),n.addEventListener("click",function(){t(this,e),this.onResume()}.bind(this)),this.adContainer.appendChild(n);var r=document.createElement("div");this.adResumeButtonOverlay=r,r.id="gd__resume__button__overlay",r.classList.add("gd__resume__button__overlay"),this.adContainer.appendChild(r)}catch(e){console.log("Resume button add error",e)}}},{key:"addStyles",value:function(){var e=document.body||document.getElementsByTagName("body")[0];this.addStylesheet("gd__resume__button__style",e,'\n .gd__resume__button{\n background-image: url("https://img.gamedistribution.com/play-black.svg");\n background-color:white; \n width: 120px;\n height: 120px;\n position: absolute;\n display: none;\n z-index: 2000;\n cursor: pointer;\n top: calc(50% - 60px);\n left: calc(50% - 60px);\n margin: 0;\n border-radius: 50%;\n border: 2px solid white;\n animation: play-button 1s ease-in-out infinite alternate;\n -webkit-animation: play-button 1s ease-in-out infinite alternate;\n }\n \n .gd__resume__button__overlay {\n position: fixed;\n display: none;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: rgba(0,0,0,0.5);\n z-index: 1999;\n cursor: pointer;\n }\n @keyframes play-button {\n 0% {\n transform: scale(1.0);\n -webkit-transform: scale(1.0);\n }\n 100% {\n transform: scale(1.1);\n -webkit-transform: scale(1.1);\n }\n }\n .gd__resume__button:hover{\n filter: invert(100%) sepia(51%) saturate(0%) hue-rotate(346deg) brightness(104%) contrast(100%); \n }\n ')}},{key:"addStylesheet",value:function(e,t,n){if(!document.getElementById(e)){var r=document.createElement("style");r.type="text/css",r.id=e,r.styleSheet?r.styleSheet.cssText=n:r.appendChild(document.createTextNode(n)),t.appendChild(r)}}}]),e}(),dS=function(){function e(t,n){D(this,e),this.adContainer=t,this.onResume=n}return R(e,[{key:"show",value:function(){this.rewardLabel.style.display="block"}},{key:"hide",value:function(){this.rewardLabel.style.display="none"}},{key:"add",value:function(){try{var e=document.createElement("div");this.rewardLabel=e;var t=document.createElement("span");t.innerText="To receive the reward, please do not skip the ad",this.addStyles(),e.classList.add("gd__reward__label"),t.classList.add("gd__reward__span"),this.rewardLabel.appendChild(t),this.adContainer.appendChild(e)}catch(e){console.log(e)}}},{key:"addStyles",value:function(){var e=document.body||document.getElementsByTagName("body")[0];this.addStylesheet("gd__reward__label__style",e,"\n .gd__reward__label{\n background-color:black; \n width: 160px;\n // height: 35px;\n position: absolute;\n display: none;\n z-index: 2000;\n cursor: pointer;\n bottom: 40px;\n left: 10px;\n margin: 0;\n border-radius: 5px;\n border: .5px solid gray;\n text-align: center;\n }\n .gd__reward__label:hover{\n filter: invert(100%) sepia(51%) saturate(0%) hue-rotate(346deg) brightness(104%) contrast(100%); \n }\n .gd__reward__span{\n color: white;\n font-size: 12px;\n padding-left: 5px;\n font-family: Verdana, Arial, Helvetica, sans-serif;\n text-align: center;\n }\n ")}},{key:"addStylesheet",value:function(e,t,n){if(!document.getElementById(e)){var r=document.createElement("style");r.type="text/css",r.id=e,r.styleSheet?r.styleSheet.cssText=n:r.appendChild(document.createTextNode(n)),t.appendChild(r)}}}]),e}(),uS=function(){function e(t){D(this,e),this.adContainer=t}return R(e,[{key:"show",value:function(){this.audioLabel.style.display="block"}},{key:"hide",value:function(){this.audioLabel.style.display="none"}},{key:"mute",value:function(){document.getElementById("game").contentWindow.postMessage("mute","*")}},{key:"unmute",value:function(){document.getElementById("game").contentWindow.postMessage("unmute","*")}},{key:"add",value:function(){try{var e=document.createElement("div");this.audioLabel=e;var t=document.createElement("span");t.innerText="Audio Ad is Playing";var n=document.createElement("span");n.innerHTML="&#9432;",this.addStyles(),e.classList.add("gd__audio__label"),t.classList.add("gd__audio__span"),n.classList.add("gd__audio__span"),this.audioLabel.appendChild(n),this.audioLabel.appendChild(t),this.adContainer.appendChild(e)}catch(e){console.log(e)}}},{key:"addStyles",value:function(){var e=document.body||document.getElementsByTagName("body")[0];this.addStylesheet("gd__audio__label__style",e,"\n .gd__audio__label{\n background-color: #ffca00; \n width: 200px;\n position: relative;\n display: none;\n z-index: 2000;\n cursor: pointer;\n top: 0px;\n margin: 0 auto;\n border-radius: 0px;\n border: 0px;\n text-align: center;\n height: 30px;\n border-bottom-left-radius: 3px;\n border-bottom-right-radius: 3px;\n padding: 5px;\n }\n .gd__audio__span{\n color: black;\n font-size: 14px;\n padding-left: 5px;\n font-family: Verdana, Arial, Helvetica, sans-serif;\n text-align: center;\n }\n ")}},{key:"addStylesheet",value:function(e,t,n){if(!document.getElementById(e)){var r=document.createElement("style");r.type="text/css",r.id=e,r.styleSheet?r.styleSheet.cssText=n:r.appendChild(document.createTextNode(n)),t.appendChild(r)}}}]),e}(),lS=function(){function e(t){D(this,e),this.adContainer=t}return R(e,[{key:"show",value:function(){this.t4rButton.style.display="block"}},{key:"hide",value:function(){this.t4rButton.style.display="none"}},{key:"add",value:function(){try{var e=document.createElement("div"),t=document.createElement("p");this.addStyles(),t.innerText="x",e.appendChild(t),e.id="gd__exit__button",e.setAttribute("title","Exit"),e.classList.add("gd__exit__button"),this.t4rButton=e,document.body.appendChild(e)}catch(e){console.log("Exit button add error",e)}}},{key:"addStyles",value:function(){var e=document.body||document.getElementsByTagName("body")[0];this.addStylesheet("gd__exit__button__style",e,"\n .gd__exit__button{\n background-color: transparent; \n width: 50px;\n height: 50px;\n position: absolute;\n pointer-events:none; \n z-index: 2000;\n top: 17px;\n right: 17px;\n margin: 0;\n border-radius: 50px;\n border: 1px solid white;\n text-align: center; \n font-size: 16px;\n line-height: normal;\n font-family: 'Arial';\n font-weight: bolder;\n }\n .gd__exit__button:hover{\n filter: invert(100%) sepia(51%) saturate(0%) hue-rotate(346deg) brightness(104%) contrast(100%); \n }")}},{key:"addStylesheet",value:function(e,t,n){if(!document.getElementById(e)){var r=document.createElement("style");r.type="text/css",r.id=e,r.styleSheet?r.styleSheet.cssText=n:r.appendChild(document.createTextNode(n)),t.appendChild(r)}}}]),e}(),hS=function(e){if(!e)return!1;var t=pS.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)},pS=Object.prototype.toString;function fS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function mS(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?fS(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fS(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function gS(e){return null!=e&&e.error_url?"<vmap:VASTAdData>".concat(function(e){return e.promo_url?'<VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper fallbackOnNoAd="true">\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="0" />\n </Extensions>\n </Wrapper>\n </Ad>\n <Ad id="promo">\n <Wrapper>\n <AdSystem>Rainbow</AdSystem>\n <Impression><![CDATA[').concat(e.promo_imp_green_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.promo_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="1" />\n </Extensions>\n </Wrapper>\n </Ad>\n </VAST>').trim():e.fallback_url?'<VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper fallbackOnNoAd="true">\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="0" />\n </Extensions>\n </Wrapper>\n </Ad>\n <Ad id="fallback">\n <Wrapper>\n <AdSystem>Rainbow</AdSystem>\n <Impression><![CDATA[').concat(e.fallback_imp_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.fallback_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="1" />\n </Extensions>\n </Wrapper>\n </Ad>\n </VAST>').trim():'<VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper>\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,"]]></VASTAdTagURI>\n </Wrapper>\n </Ad>\n </VAST>").trim()}(e),"</vmap:VASTAdData>"):'<vmap:AdTagURI templateType="vast3"><![CDATA['.concat(null==e?void 0:e.adtag_url,"]]></vmap:AdTagURI>")}var vS,bS="13998",yS="_cc".concat(bS),_S=["https://tags.crwdcntrl.net/c/".concat(bS,"/cc.js?ns=").concat(yS)],wS=function(){return!!vS&&"function"==typeof vS.bcpf&&"function"==typeof vS.add},AS=function(e,t){try{if(!wS())return;vS.add(e,t),"lotame add success ".concat(e," ").concat(t)}catch(e){err}},kS=function(e,t){try{if(!wS())return;vS.bcpw(e,t),"lotame send success ".concat(e," ").concat(t)}catch(e){}},ES=function(e){var n=this;try{AS("act","play"),AS("med","game"),"complete"===document.readyState?vS.bcpf():vS.bcp(),e.tags.forEach(function(e){t(this,n),kS("int","tags : ".concat(e.title.toLowerCase()))}.bind(this)),kS("int","category : ".concat(e.category.toLowerCase()))}catch(e){}},xS=function(){window.addEventListener("load",(function(){aA.once("game-data-ready",function(){var t=e(r.mark((function e(t){var i;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=1,e.t0=null!=uy&&uy.noLotamePageView,!e.t0){e.next=7;break}return e.next=6,hA();case 6:e.t0=e.sent;case 7:if(!e.t0){e.next=10;break}return e.abrupt("return");case 10:if(null!==(i=t.lotm)&&void 0!==i&&i.enabled){e.next=13;break}return e.abrupt("return");case 13:return e.next=16,f(_S[0],"LOTCC_".concat(bS),{alternates:_S});case 16:"object"===n(window[yS])&&(vS=window[yS]),wS()&&ES(t),e.next=23;break;case 20:e.prev=20,e.t1=e.catch(1),e.t1;case 23:case"end":return e.stop()}}),e,null,[[1,20]])})));return function(e){return t.apply(this,arguments)}}())}))},SS=function(){kS("genp","ad video"),kS("act","ad impression")},RS=function(){kS("act","ad skipped")},DS=function(){kS("act","ad click")},TS=function(){kS("act","ad complete")},OS=new xw,IS={preroll:"game-start-video",midroll:"mid-level-video",rewarded:"rewarded-video"},PS=function(e,n){var r=this,i=function(e,t){var n=OS.get("partner.url.value"),r=IS[t],i="".concat("web.latimes/games-puzzles-crossword","/").concat(e,"/").concat(r);return{env:"vp",iu:"/".concat("21787098806","/").concat(i),description_url:n,tfcd:0,npa:0,sz:"400x300|480x360|480x361|640x360|640x480",gdfp_req:1,output:"vast",unviewed_position_start:1,impl:"s",correlator:"".concat(Date.now())}}(e,n),a=Object.keys(i).map(function(e){return t(this,r),"".concat(e,"=").concat(i[e])}.bind(this)).join("&");return"".concat("https://pubads.g.doubleclick.net/gampad/ads","?").concat(a)},CS=(new xw).get("partner.domain.value"),LS=["latimes.com"],US={exist:function(e){var n=this;return"Softgames-Azerion"===e.dname&&LS.some(function(e){return t(this,n),e===CS}.bind(this))},get:function(e,t){return function(e,t){return{"latimes.com":function(){var n=t.slug;return PS(n,e)}}[CS](e)}(e,t)}},MS=function(){var e=(new xw).get("partner.url.value"),t=new O(e,!0),n={isRevisionTest:!1,useTestAds:!1,disableMidrolltimer:!1};if("revision.gamedistribution.com"===t.host){var r=t.query.test,i="1"===r||"2"===r,a="1"===r;n={useTestAds:i,disableMidrolltimer:a,isRevisionTest:a||i}}return n};function jS(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 BS(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?jS(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jS(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var GS=new j,NS=null,qS=function(){function n(e,r,i){var a=this;if(D(this,n),NS)return NS;NS=this;var s={debug:!1,width:640,height:360,locale:"en"};this.options=r?h(s,r):s,this.prefix="gdsdk__",this.adsLoader=null,this.adsManager=null,this.adDisplayContainer=null,this.eventBus=new _,this.safetyTimer=null,this.containerTransitionSpeed=0,this.adCounter={},this.adPrerollCount=0,this.adMidrollCount=0,this.adRewardedCount=0,this.preloadedAdType=null,this.requestRunning=!1,this.parentDomain=i.parentDomain,this.topDomain=i.topDomain,this.parentURL=i.parentURL,this.adDisplayContainerInitialized=!1,this.IMASampleTags=w(),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=""!==e?document.getElementById(e):null,this.options.width="number"==typeof this.options.width?this.options.width:"100%"===this.options.width?640:this.options.width.replace(/[^0-9]/g,""),this.options.height="number"==typeof this.options.height?this.options.height:"100%"===this.options.height?360:this.options.height.replace(/[^0-9]/g,"");var o=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,c=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;this.options.width=this.thirdPartyContainer?this.thirdPartyContainer.offsetWidth:o,this.options.height=this.thirdPartyContainer?this.thirdPartyContainer.offsetHeight:c,this.category="",this.tags=[],this.eventCategory="AD",this.eventBus.subscribe("LOADED",function(){t(this,a),this._clearSafetyTimer("LOADED"),this._startSafetyTimer(8e3,"LOADED")}.bind(this),"ima"),this.eventBus.subscribe("STARTED",function(){t(this,a),this._clearSafetyTimer("STARTED")}.bind(this),"ima")}var i,a,s,o,c,d,u,l,p,A,k,E,x,S,P,C,L,U,j,F,V,z,H;return R(n,[{key:"start",value:(H=e(r.mark((function n(){var i,a,s,o=this;return r.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,this.adSystemInitialize(e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,o._init_afg_script({adsense_channel:"4089988593"});case 2:case"end":return e.stop()}}),e)}))));case 3:return i=n.sent,this.afgInitSuccess=i.success,n.next=7,this.adSystemInitialize(e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,o._init_hl_script();case 2:return e.next=4,o._init_ima_script();case 4:o._createPlayer(),o._setUpIMA();case 6:case"end":return e.stop()}}),e)}))));case 7:if(a=n.sent,this.imaInitSuccess=a.success,s=[],this.afgInitSuccess||s.push(i.error),this.imaInitSuccess||s.push(a.error),!(s.length>0)){n.next=14;break}throw s[0];case 14:window.eventTest=function(e){t(this,o),this._broadcast(e,{message:"",status:"success"})}.bind(this),n.next=21;break;case 17:throw n.prev=17,n.t0=n.catch(0),ds("gd-adflow error on ads.start",n.t0),new Error(n.t0);case 21:case"end":return n.stop()}}),n,this,[[0,17]])}))),function(){return H.apply(this,arguments)})},{key:"adSystemInitialize",value:(z=e(r.mark((function e(t){var n;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n={success:!1},e.prev=1,e.next=4,t();case 4:n.success=!0,e.next=10;break;case 7:e.prev=7,e.t0=e.catch(1),n.error=e.t0;case 10:return e.abrupt("return",n);case 12:case"end":return e.stop()}}),e,null,[[1,7]])}))),function(e){return z.apply(this,arguments)})},{key:"_getDefaultSpilAdapterConfig",value:function(){return{vast:null,url:"https://pubads.g.doubleclick.net/gampad/ads",query:{correlator:"{{CACHEBUSTER}}",description_url:"{{PAGE_URL}}",env:"vp",gdfp_req:1,impl:"s",iu:"/59392726/gd_instream",npa:0,output:"vast",sz:"640x480|400x300",tfcd:0,unviewed_position_start:1}}}},{key:"_getSpilUrl",value:(V=e(r.mark((function e(t){var n,i,a,s,o,c,d,u,l,h,p,f;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.adType,i=t.options,e.prev=1,o=null===(a=this.gameData.adflw)||void 0===a||null===(s=a.adapterConfig)||void 0===s?void 0:s.spil,c=this.nextAdPosition(n),e.next=6,this._create_dp_context(c,i);case 6:return d=e.sent,o?(this.gameData,u=o[c]||o.default||this._getDefaultSpilAdapterConfig()):u=this._getDefaultSpilAdapterConfig(),l=100*d.floor_price,d.floor_price,h=this._createCustomAdVastUrl(u,{tnl_keys:{floor_price:l}}),p=h.url,f={url:p,dp:d,hl:{bidFloorApplied:!0}},e.abrupt("return",f);case 17:e.prev=17,e.t0=e.catch(1),console.log("spil-adaptor: Error on getting spil",e.t0);case 20:case"end":return e.stop()}}),e,this,[[1,17]])}))),function(e){return V.apply(this,arguments)})},{key:"_getAdVast",value:function(n,i){var a=this;return new Promise(function(){var s=e(r.mark((function e(s){var o,c,d,u,l,h,p,f,g=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(m.available&&m.getBoolean("gd_debug_ex")&&m.getBoolean("gd_tag")||MS().useTestAds)){e.next=6;break}return o=a.IMASampleTags[n],c=Math.floor(Math.random()*o.length),d=o[c],s({url:d}),e.abrupt("return");case 6:if("spil"!==i.adapter){e.next=8;break}return e.abrupt("return",s(a._getSpilUrl({adType:n,options:i})));case 8:if(void 0!==window.idhb.requestAds){e.next=10;break}throw new Error("Prebid.js wrapper script hit an error or didn't exist!");case 10:return e.prev=10,u=a.nextAdPosition(n),a._broadcast("AD_REQUEST",{message:u}),l=a.options,"preroll"===u&&G(l.preroll)?l=l.preroll:"midroll"===u&&G(l.midroll)?l=l.midroll:"rewarded"===u&&G(l.rewarded)&&(l=l.rewarded),h="","audio"===i.adapter||"audio"===i.giftType?(a.isAudioAd=!0,h="midrollaudio"):(a.isAudioAd=!1,h="rewarded"===u?"rewardedVideo":"gdbanner"===u?"gd__banner":"midroll"===u?"midroll":"video1"),e.next=19,window.idhb.isLoaded();case 19:return e.next=21,a._create_dp_context(u,i);case 21:p=e.sent,cs("gd-adflow, before idhb",u,h),f=window.idhb.getAdserverTargetingForAdSlot(h),window.idhb.setAdserverTargeting(BS(BS({},f),{},{adaptor_order:i.adapterIndex})),window.idhb.getAdserverTargetingForAdSlot(h),window.idhb.requestAds({slots:T({},h,{bidFloor:(null==p?void 0:p.floor_price)||void 0}),callback:function(e,n){var r=this;t(this,g),!p||null!=n&&n.bidFloorApplied||fetch(p.skip_url).catch(function(e){t(this,r)}.bind(this));var i={src:"hl",tnl_keys:BS(BS({},window.idhb.getAdserverTargetingForAdSlot(h)),{},{tnl_ad_pos:u,tnl_asset_id:a.gameData.gameId}),url:e,dp:p,hl:n};a._extend_hl_url(i),s(i)}.bind(this)}),e.next=33;break;case 30:throw e.prev=30,e.t0=e.catch(10),new Error(e.t0);case 33:case"end":return e.stop()}}),e,this,[[10,30]])})));return function(e){return s.apply(this,arguments)}}())}},{key:"nextAdPosition",value:function(e){if(e===g.Rewarded)return this.adRewardedCount++,"rewarded";if(e===g.Interstitial){var t=!1===this.gameData.preroll||1===this.adPrerollCount;return t?this.adMidrollCount++:this.adPrerollCount++,t||this.adMidrollCount>0?"midroll":"preroll"}return"midroll"}},{key:"getAdPosition",value:function(e){return e===g.Rewarded?"rewarded":e===g.Interstitial?!1===this.gameData.preroll||1===this.adPrerollCount||this.adMidrollCount>0?"midroll":"preroll":"midroll"}},{key:"getCurrentAdPosition",value:function(e){return e===g.Interstitial?1===this.adPrerollCount&&0===this.adMidrollCount?"preroll":"midroll":e===g.Rewarded?"rewarded":void 0}},{key:"_requestPromo",value:function(e,t){var n=new google.ima.AdsRequest;return n.adsResponse=function(e){return'<VAST version="3.0"> \n <Ad id="promo">\n <Wrapper>\n <AdSystem>Rainbow</AdSystem>\n <Impression><![CDATA['.concat(e.promo_imp_green_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.promo_url,"]]></VASTAdTagURI> \n </Wrapper>\n </Ad>\n </VAST>").trim()}(e),n.linearAdSlotWidth=this.options.width,n.linearAdSlotHeight=this.options.height,n.nonLinearAdSlotWidth=this.options.width,n.nonLinearAdSlotHeight=this.options.height,n.forceNonLinearFullSlot=!0,this.options.vast_load_timeout&&(n.vastLoadTimeout=this.options.vast_load_timeout),n.setAdWillAutoPlay(t.autoplayAllowed),n.setAdWillPlayMuted(t.autoplayRequiresMute),this.adsLoader.requestAds(n),n}},{key:"_requestAd",value:function(e,n){var r=this;return n=n||{},new Promise(function(i){var a=this;if(t(this,r),"undefined"==typeof google)throw new Error("Unable to load ad, google IMA SDK not defined.");try{var s,o,c=null==e||null===(s=e.tnl_keys)||void 0===s?void 0:s.tnl_ad_pos;this.adSuccess=!1,this.contentPaused=!1;var d=new google.ima.AdsRequest,u=this._transformVast(e,n),l=BS(BS({},n),{},{adTag:u,tnl_ad_pos:c});this.adCounter[c]=this.adCounter[c]||0,this.adCounter[c]++;var h=e.dp,p=e.hl;this.current_dp=h,h&&!u.bidder&&(h.adtag_url=u.url,this._extend_dp_with_adsense(h,p,null==e?void 0:e.tnl_keys));var f=this._isVMAP(c);(function(){t(this,a),n.shouldFail&&(h?(h.adtag_url="dp_original_broken",h.fallback_url="dp_fallback_broken"):u.url="original_broken",null==h||h.adtag_url,null==h||h.fallback_url,u.url)}).bind(this);var m=this._getExternalVast(null===(o=n)||void 0===o?void 0:o.adType);if(m)d.adTagUrl=m;else if(f){var g=function(e){for(var t=[],n="",r=Date.now(),i={ppos:1,lip:!0,vad_type:"linear"},a=0;a<e.length;a++){var s=new O(e[a].adtag.url,!0);s.query=mS(mS({},s.query),{},{ad_rule:0,vpos:e[a].positon,pod:1,correlator:0===a?r:++r,output:"xml_vast3"}),0===a&&(s.query=mS(mS({},s.query),i)),t.push(s.toString())}for(var o=Date.now(),c=1;c<=t.length;c++){var d,u,l,h;n+='<vmap:AdBreak timeOffset="start" breakType="linear" breakId="break-'.concat(c,'">\n <vmap:AdSource id="').concat(o++,'" allowMultipleAds="false" followRedirects="true">\n ').concat(gS({id:o++,adtag_url:t[c-1],error_url:null===(d=e[c-1].dp)||void 0===d?void 0:d.error_url,impression_url:null===(u=e[c-1].dp)||void 0===u?void 0:u.impression_url,fallback_url:null===(l=e[c-1].dp)||void 0===l?void 0:l.fallback_url,fallback_imp_url:null===(h=e[c-1].dp)||void 0===h?void 0:h.fallback_imp_url}),"</vmap:AdSource>\n </vmap:AdBreak>")}return'<?xml version="1.0" encoding="UTF-8"?>\n <vmap:VMAP xmlns:vmap="http://www.iab.net/videosuite/vmap" version="1.0">\n '.concat(n,"\n </vmap:VMAP>").trim()}(this._get_vmap_context({dp:h,adtag:u,position:"preroll"===l.tnl_ad_pos?"preroll":"midroll",config:this._get_vmap_config(c)}));d.adsResponse=g}else if(h&&p.bidFloorApplied){h.adtag_url||(h.adtag_url=u.url);var v=function(e){return e.promo_url?e.fallback_url?'<?xml version="1.0" encoding="utf-8"?>\n <VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper fallbackOnNoAd="true">\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="0" />\n </Extensions>\n </Wrapper>\n </Ad>\n <Ad id="fallback">\n <Wrapper>\n <AdSystem>ADS</AdSystem>\n <Impression><![CDATA[').concat(e.fallback_imp_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.fallback_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="1" />\n </Extensions>\n </Wrapper>\n </Ad>\n <Ad id="promo">\n <Wrapper>\n <AdSystem>Rainbow</AdSystem>\n <Impression><![CDATA[').concat(e.promo_imp_green_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.promo_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="2" />\n </Extensions>\n </Wrapper>\n </Ad>\n </VAST>').trim():'<?xml version="1.0" encoding="utf-8"?>\n <VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper fallbackOnNoAd="true">\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="0" />\n </Extensions>\n </Wrapper>\n </Ad>\n <Ad id="promo">\n <Wrapper>\n <AdSystem>Rainbow</AdSystem>\n <Impression><![CDATA[').concat(e.promo_imp_green_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.promo_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="1" />\n </Extensions>\n </Wrapper>\n </Ad>\n </VAST>').trim():e.fallback_url?'<?xml version="1.0" encoding="utf-8"?>\n <VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper fallbackOnNoAd="true">\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="0" />\n </Extensions>\n </Wrapper>\n </Ad>\n <Ad id="fallback">\n <Wrapper>\n <AdSystem>ADS</AdSystem>\n <Impression><![CDATA[').concat(e.fallback_imp_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.fallback_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="1" />\n </Extensions>\n </Wrapper>\n </Ad>\n </VAST>').trim():'<?xml version="1.0" encoding="utf-8"?>\n <VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper>\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,"]]></VASTAdTagURI>\n </Wrapper>\n </Ad>\n </VAST>").trim()}(h);d.adsResponse=v}else if(h&&h.fallback_url){var b=function(e){return'<?xml version="1.0" encoding="utf-8"?>\n <VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper fallbackOnNoAd="true">\n <AdSystem>GDFP</AdSystem>\n <Impression><![CDATA[').concat(e.fallback_imp_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="0" />\n </Extensions>\n </Wrapper>\n </Ad>\n <Ad id="fallback">\n <Wrapper>\n <AdSystem>ADS</AdSystem>\n <Impression><![CDATA[').concat(e.fallback_imp_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.fallback_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="1" />\n </Extensions>\n </Wrapper>\n </Ad>\n </VAST>').trim()}(h);d.adsResponse=b}else d.adTagUrl=u.url;d.linearAdSlotWidth=this.options.width,d.linearAdSlotHeight=this.options.height,d.nonLinearAdSlotWidth=this.options.width,d.nonLinearAdSlotHeight=this.options.height,d.forceNonLinearFullSlot=!0,this.options.vast_load_timeout&&(d.vastLoadTimeout=this.options.vast_load_timeout),d.setAdWillAutoPlay(n.autoplayAllowed),d.setAdWillPlayMuted(n.autoplayRequiresMute),this.adsLoader.requestAds(d,l);try{this._broadcast("AD_SDK_REQUEST",{message:l})}catch(e){}i(d)}catch(e){throw new Error(e)}}.bind(this))}},{key:"_getExternalVast",value:function(e){var t;try{var n=this.getCurrentAdPosition(e);t=US.exist(this.gameData)&&US.get(n,this.gameData)}catch(e){console.log("external-vast err",e)}return t}},{key:"cancel",value:function(e){var t;if(!1!==this.requestRunning){this.requestRunning=!1,this._resetAdsLoader(),this._hide("cancel");var n=(null==e||null===(t=e.message)||void 0===t?void 0:t.indexOf("NO_VAST_URL"))>=0,r="AD_SDK_CANCELED";this._broadcast(r,{name:r,message:"Advertisement has been canceled.",status:"warning",noVast:n,analytics:{category:this.eventCategory,action:r,label:this.gameData.gameId}})}}},{key:"_checkAutoPlay",value:(F=e(r.mark((function e(){var n=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(e,r){var i=this;t(this,n);var a=navigator.userAgent.toLowerCase();a.indexOf("safari")>-1&&a.indexOf("chrome")<0?e({autoplayAllowed:!0,autoplayRequiresMute:!0}):B.video({inline:!0,muted:!1}).then(function(n){t(this,i);var r=n.result;n.error,e(!0===r?{autoplayAllowed:!0,autoplayRequiresMute:!1}:{autoplayAllowed:!0,autoplayRequiresMute:!0})}.bind(this))}.bind(this)));case 1:case"end":return e.stop()}}),e,this)}))),function(){return F.apply(this,arguments)})},{key:"_initDisplayContainerWithAutoPlay",value:(j=e(r.mark((function e(){var t;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._checkAutoPlay(!1);case 2:return t=e.sent,this._autoplay=t,this.video_ad_player.autoplay=t.autoplayAllowed,this.video_ad_player.volume=t.autoplayRequiresMute?0:1,this.video_ad_player.muted=!!t.autoplayRequiresMute,t.adDisplayContainerInitialized||(this.adDisplayContainer.initialize(),this.adDisplayContainerInitialized=!0),e.abrupt("return",t);case 9:case"end":return e.stop()}}),e,this)}))),function(){return j.apply(this,arguments)})},{key:"startAd",value:(U=e(r.mark((function e(n){var i,a,s=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=n.adType,a=n.params,this.adType_=i,this.isAudioAd=!1,this.adContext=BS(BS({},a),{},{adType:i}),"promo"!==(null==a?void 0:a.adapter)){e.next=6;break}return e.abrupt("return",this._startPromo(a,i));case 6:if("adsense"!==(null==a?void 0:a.adapter)){e.next=30;break}if(i!==g.Interstitial){e.next=23;break}if("preroll"!==(null==a?void 0:a.position)){e.next=12;break}return e.abrupt("return",this._startAdsensePlacementPreroll(n));case 12:if("start"!==(null==a?void 0:a.position)){e.next=16;break}return e.abrupt("return",this._startAdsensePlacementStart(n));case 16:if("next"!==(null==a?void 0:a.position)){e.next=20;break}return e.abrupt("return",this._startAdsensePlacementNext(n));case 20:return e.abrupt("return",this._startAdsensePlacementPreroll(n));case 21:e.next=28;break;case 23:if(i!==g.Rewarded){e.next=27;break}return e.abrupt("return",this._startAdsensePlacementRewardedAd(n));case 27:case 40:throw new Error("Unsupported ad type");case 28:e.next=41;break;case 30:if(!["ima","spil","audio"].some(function(e){return t(this,s),e===(null==a?void 0:a.adapter)}.bind(this))){e.next=41;break}if(i!==g.Interstitial){e.next=36;break}return e.abrupt("return",this._startInterstitialAd(a));case 36:if(i!==g.Rewarded){e.next=40;break}return e.abrupt("return",this._startRewardedAd(a));case 41:case"end":return e.stop()}}),e,this)}))),function(e){return U.apply(this,arguments)})},{key:"preloadAd",value:(L=e(r.mark((function e(t){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t!==g.Interstitial){e.next=4;break}return e.abrupt("return","gdsdk://preloaded");case 4:if(t!==g.Rewarded){e.next=8;break}return e.abrupt("return","gdsdk://preloaded");case 8:throw new Error("Unsupported ad type");case 9:case"end":return e.stop()}}),e)}))),function(e){return L.apply(this,arguments)})},{key:"addAdComponents",value:function(){var e=this,n=function(){t(this,e),this.adsManager.resume()}.bind(this);try{this.adResume=new cS(this.adContainer,n),this.adResume.add(),this.rewardedLabel=new dS(this.adContainer,n),this.rewardedLabel.add(),this.audioAdLabel=new uS(window.document.body),this.audioAdLabel.add(),this.audioAdLabel.hide()}catch(e){console.log("error on adding adResume",e)}}},{key:"loadDisplayAd",value:(C=e(r.mark((function n(i){var a=this;return r.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",new Promise(function(){var n=e(r.mark((function e(n,s){var o,c,d,u,l,h,p,f,m,g=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,(c=i?i.containerId:null)||s("Container id is not specified"),d=document.getElementById(c),document.getElementById(c)||s("No container is found with this id - ".concat(c)),void 0===window.idhb.requestAds&&s("Prebid.js wrapper script hit an error or didn't exist!"),u=i.slotId?i.slotId:"gd__banner@".concat(c),document.getElementById(u)||(l="\n .gd__banner{\n z-index: ".concat(v.DisplayContainer.zIndex,";\n height: 100%;\n display: flex !important;\n align-items: center;\n justify-content: center;\n }"),document.getElementById("gd__banner__style")||((h=document.createElement("style")).type="text/css",h.id="gd__banner__style",h.styleSheet?h.styleSheet.cssText=l:h.appendChild(document.createTextNode(l)),d.appendChild(h)),(p=document.createElement("div")).id=u,p.classList.add("gd__banner"),d.appendChild(p)),e.next=11,a._create_dp_display_context();case 11:a.atom_display=e.sent,a.atom_display,null!==(o=a.atom_display)&&void 0!==o&&o.params&&window.idhb.setAdserverTargeting(null===(f=a.atom_display)||void 0===f?void 0:f.params),(m={})[u]={maxSize:[d.offsetWidth,d.offsetHeight]},window.idhb.requestAds({slots:m,callback:function(e){t(this,g),JSON.stringify(e,null,2)}.bind(this)}),n(),e.next=24;break;case 20:e.prev=20,e.t0=e.catch(0),console.log("display_test error",e.t0),s(e.t0.message||e.t0);case 24:case"end":return e.stop()}}),e,this,[[0,20]])})));return function(e,t){return n.apply(this,arguments)}}()));case 1:case"end":return n.stop()}}),n)}))),function(e){return C.apply(this,arguments)})},{key:"_startInterstitialAd",value:(P=e(r.mark((function e(n){var i,a,s,o=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!this.requestRunning){e.next=4;break}return this._broadcast("AD_IS_ALREADY_RUNNING",{status:"warning"}),e.abrupt("return");case 4:if(!void function(){if(t(this,o),us.fictionalIMAError)return this._broadcast("AD_ERROR",{message:"fictional IMA error",status:"error",skipForward:!0}),!0}.bind(this)){e.next=7;break}return e.abrupt("return");case 7:return this.requestRunning=!0,e.next=10,this._initDisplayContainerWithAutoPlay();case 10:return i=e.sent,e.next=13,this._loadInterstitialAd(BS(BS({},i),n));case 13:if(a=e.sent,s=a.success,a.args,s){e.next=18;break}return e.abrupt("return");case 18:i.autoplayRequiresMute&&this.adsManager.setVolume(0),this.adsManager.init(this.options.width,this.options.height,google.ima.ViewMode.NORMAL),this.adsManager.start(),e.next=28;break;case 23:throw e.prev=23,e.t0=e.catch(0),e.t0,this._onError(e.t0),e.t0;case 28:case"end":return e.stop()}}),e,this,[[0,23]])}))),function(e){return P.apply(this,arguments)})},{key:"_startPromo",value:(S=e(r.mark((function e(t,n){var i,a,s;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!this.requestRunning){e.next=4;break}return this._broadcast("AD_IS_ALREADY_RUNNING",{status:"warning"}),e.abrupt("return");case 4:return this.requestRunning=!0,this.adSuccess=!1,e.next=8,this._initDisplayContainerWithAutoPlay();case 8:return i=e.sent,e.next=11,this._loadPromo(BS(BS({},i),t),n);case 11:if(a=e.sent,s=a.success,a.args,s){e.next=16;break}return e.abrupt("return");case 16:i.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 S.apply(this,arguments)})},{key:"_loadPromo",value:(x=e(r.mark((function e(t,n){var i,a;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this._resetAdsLoader(),e.prev=1,i=this.nextAdPosition(n),a=this._create_promo_context(i),this._requestPromo(a,BS({adType:g.Interstitial},t)),e.next=7,this._waitOnAdLoad();case 7:return e.abrupt("return",e.sent);case 10:throw e.prev=10,e.t0=e.catch(1),new Error(e.t0);case 13:case"end":return e.stop()}}),e,this,[[1,10]])}))),function(e,t){return x.apply(this,arguments)})},{key:"_loadInterstitialAd",value:(E=e(r.mark((function e(t){var n;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._resetAdsLoader(),e.prev=1,e.t0=this.preloadedInterstitialAdVast,e.t0){e.next=7;break}return e.next=6,this._getAdVast(g.Interstitial,t);case 6:e.t0=e.sent;case 7:if(n=e.t0,delete this.preloadedInterstitialAdVast,n.url){e.next=12;break}throw new Error("NO_VAST_URL");case 12:return e.next=14,this._requestAd(n,BS({adType:g.Interstitial},t));case 14:return e.sent,e.next=17,this._waitOnAdLoad();case 17:return e.abrupt("return",e.sent);case 20:throw e.prev=20,e.t1=e.catch(1),console.log("VAST_URL error",e.t1),new Error(e.t1);case 24:case"end":return e.stop()}}),e,this,[[1,20]])}))),function(e){return E.apply(this,arguments)})},{key:"_waitOnAdLoad",value:function(){var e=this;return new Promise(function(n,r){var i=this;t(this,e);var a="videoad.preloadad";this.eventBus.unsubscribeScope(a);var s=function(e){var r=this;t(this,i),setTimeout(function(){t(this,r),this.eventBus.unsubscribeScope(a),n({success:!0,args:e})}.bind(this),1)}.bind(this),o=function(e){var r=this;t(this,i),setTimeout(function(){t(this,r),this.eventBus.unsubscribeScope(a),n({success:!1,args:e})}.bind(this),1)}.bind(this);this.eventBus.subscribe("AD_SDK_MANAGER_READY",s,a),this.eventBus.subscribe("AD_SDK_CANCELED",o,a),this.eventBus.subscribe("AD_ERROR",o,a)}.bind(this))}},{key:"_startRewardedAd",value:(k=e(r.mark((function e(n){var i,a,s,o=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!this.requestRunning){e.next=4;break}return this._broadcast("AD_IS_ALREADY_RUNNING",{status:"warning"}),e.abrupt("return");case 4:if(!void function(){if(t(this,o),us.fictionalIMAError)return this._broadcast("AD_ERROR",{message:"fictional IMA error",status:"error",skipForward:!0}),!0}.bind(this)){e.next=7;break}return e.abrupt("return");case 7:return this.requestRunning=!0,e.next=10,this._initDisplayContainerWithAutoPlay();case 10:return i=e.sent,e.next=13,this._loadRewardedAd(BS(BS({},i),n));case 13:if(a=e.sent,s=a.success,a.args,s){e.next=18;break}return e.abrupt("return");case 18:i.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 k.apply(this,arguments)})},{key:"_loadRewardedAd",value:(A=e(r.mark((function e(t){var n;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._resetAdsLoader(),e.prev=1,e.t0=this.preloadedRewardedAdVast,e.t0){e.next=7;break}return e.next=6,this._getAdVast(g.Rewarded,t);case 6:e.t0=e.sent;case 7:return n=e.t0,delete this.preloadedRewardedAdVast,e.next=11,this._requestAd(n,BS({adType:g.Rewarded},t));case 11:return e.sent,e.next=14,this._waitOnAdLoad();case 14:return e.abrupt("return",e.sent);case 17:throw e.prev=17,e.t1=e.catch(1),new Error(e.t1);case 20:case"end":return e.stop()}}),e,this,[[1,17]])}))),function(e){return A.apply(this,arguments)})},{key:"_preloadInterstitialAd",value:(p=e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,e.t0=this.preloadedInterstitialAdVast,e.t0){e.next=6;break}return e.next=5,this._getAdVast(g.Interstitial);case 5:e.t0=e.sent;case 6:return this.preloadedInterstitialAdVast=e.t0,e.abrupt("return",this.preloadedInterstitialAdVast.url);case 10:throw e.prev=10,e.t1=e.catch(0),new Error(e.t1);case 13:case"end":return e.stop()}}),e,this,[[0,10]])}))),function(){return p.apply(this,arguments)})},{key:"_preloadRewardedAd",value:(l=e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,e.t0=this.preloadedRewardedAdVast,e.t0){e.next=6;break}return e.next=5,this._getAdVast(g.Rewarded);case 5:e.t0=e.sent;case 6:return this.preloadedRewardedAdVast=e.t0,e.abrupt("return",this.preloadedRewardedAdVast.url);case 10:throw e.prev=10,e.t1=e.catch(0),new Error(e.t1);case 13:case"end":return e.stop()}}),e,this,[[0,10]])}))),function(){return l.apply(this,arguments)})},{key:"_onError",value:function(e){this.cancel(e),this._clearSafetyTimer("ERROR")}},{key:"_hide",value:function(e){this.video_ad_player&&(this.video_ad_player.src=""),this.activeAdContainer&&(this.activeAdContainer.style.visibility="hidden")}},{key:"_show",value:function(e){var n=this;if(this.activeAdContainer){this.isAudioAd||(this.activeAdContainer.style.visibility="visible");var r=null==e?void 0:e.mode;e.t4r=this.gameData.__t4r;var i=this._isT4R(e),a=this._getT4ROptions(e);if("loaded"===r)this.activeAdContainer.style.opacity=i?.001:1,i&&null!=e&&e.contentType.startsWith("video/")&&(this.t4rButton=new lS(this.adContainer),this.t4rButton.add()),i&&this.adsManager.setVolume(0),i&&this._broadcast("AD_T4R"),i&&setTimeout(function(){t(this,n),this.activeAdContainer.style.opacity=1,this.adsManager.setVolume(1),this.t4rButton&&this.t4rButton.hide()}.bind(this),((null==a?void 0:a.min)||1234)+Math.random()*((null==a?void 0:a.max)||3210));else if("click"===r||"first_quartile"===r){if(i&&"click"===r){var s,o=null===(s=this._adrequest_user_context)||void 0===s?void 0:s.tnl_ad_pos;this.clickCount[o]++}this.t4rButton&&this.t4rButton.hide(),this.activeAdContainer.style.opacity=1,this.adsManager.setVolume(1)}}}},{key:"_createPlayer",value:function(){var e=this,n=document.body||document.getElementsByTagName("body")[0];this.adContainer=document.createElement("div"),this.adContainer.id="".concat(this.prefix,"advertisement"),this.adContainer.style.position=this.thirdPartyContainer?"absolute":"fixed",this.adContainer.style.zIndex=v.AdsContainer.zIndex,this.adContainer.style.top="0",this.adContainer.style.left="0",this.adContainer.style.width="100%",this.adContainer.style.height="100%",this.thirdPartyContainer&&(this.thirdPartyContainer.style.transform=null);var r=document.createElement("video");r.setAttribute("playsinline",!0),r.setAttribute("webkit-playsinline",!0),r.id="".concat(this.prefix,"advertisement_video"),r.style.position="absolute",r.style.backgroundColor="#000000",r.style.top="0",r.style.left="0",r.style.width=this.options.width+"px",r.style.height=this.options.height+"px",this.video_ad_player=r,this.adContainer.appendChild(r);var i=document.createElement("div");i.id="".concat(this.prefix,"advertisement_slot"),i.style.position="absolute",i.style.top="0",i.style.left="0",i.style.width=this.options.width+"px",i.style.height=this.options.height+"px",this.adContainerInner=i,this.activeAdContainer=this.adContainer,window.activeAdContainer=this.activeAdContainer,this.thirdPartyContainer?(this.adContainer.appendChild(i),this.thirdPartyContainer.appendChild(this.adContainer),this.activeAdContainer=this.thirdPartyContainer):(this.adContainer.appendChild(i),n.appendChild(this.adContainer)),this.addAdComponents(),this.activeAdContainer.style.visibility="hidden";var a=function(){t(this,e);var n=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,a=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;this.options.width=this.thirdPartyContainer?this.thirdPartyContainer.offsetWidth:n,this.options.height=this.thirdPartyContainer?this.thirdPartyContainer.offsetHeight:a,i.style.width=this.options.width+"px",i.style.height=this.options.height+"px",r.style.width=this.options.width+"px",r.style.height=this.options.height+"px"}.bind(this);window.addEventListener("resize",a),window.document.addEventListener("DOMContentLoaded",a)}},{key:"_setUpIMA",value:function(){this.adDisplayContainer=new google.ima.AdDisplayContainer(this.adContainerInner,this.video_ad_player),this.adsLoader=new google.ima.AdsLoader(this.adDisplayContainer),this.adsLoader.getSettings().setDisableCustomPlaybackForIOS10Plus(!0),this.adsLoader.getSettings().setLocale(this.options.locale),this.adsLoader.getSettings().setVpaidMode(this._getVPAIDMode()),this.adsLoader.getSettings().setAutoPlayAdBreaks(!0);var e=this.adsLoader.getSettings().getNumRedirects();this.adsLoader.getSettings().setNumRedirects(2*e),this.adsLoader.addEventListener(google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,this._onAdsManagerLoaded,!1,this),this.adsLoader.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,this._onAdError,!1,this)}},{key:"_onAdsManagerLoaded",value:function(e){var n=this,r=new google.ima.AdsRenderingSettings;r.autoAlign=!1,r.enablePreloading=!1,r.restoreCustomPlaybackStateOnAdBreakComplete=!0,r.useStyledNonLinearAds=!0,r.uiElements=[google.ima.UiElements.AD_ATTRIBUTION,google.ima.UiElements.COUNTDOWN],this.adsManager=e.getAdsManager(this.video_ad_player,r),this.adsManager.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,this._onAdError.bind(this),!1,this),this.adsManager.addEventListener(google.ima.AdEvent.Type.AD_BREAK_READY,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.AD_METADATA,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.ALL_ADS_COMPLETED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.CLICK,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.COMPLETE,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.DURATION_CHANGE,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.FIRST_QUARTILE,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.IMPRESSION,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.INTERACTION,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.LINEAR_CHANGED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.LOADED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.LOG,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.MIDPOINT,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.PAUSED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.RESUMED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.SKIPPED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.STARTED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.THIRD_QUARTILE,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.USER_CLOSE,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.VOLUME_CHANGED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.VOLUME_MUTED,this._onAdEvent.bind(this),this),window.addEventListener("resize",function(){t(this,n),this.adsManager&&this.adsManager.resize(this.options.width,this.options.height,google.ima.ViewMode.NORMAL)}.bind(this)),this.adDisplayContainerInitialized||(this.adDisplayContainer.initialize(),this.adDisplayContainerInitialized=!0);var i=new Date,a=i.getHours(),s=i.getDate(),o=i.getMonth(),c=i.getFullYear(),d="AD_SDK_MANAGER_READY";this._broadcast(d,{name:d,message:"AD SDK is ready",status:"success",analytics:{category:d,action:this.parentDomain,label:"h".concat(a," d").concat(s," m").concat(o," y").concat(c)}}),this._adrequest_user_context=e.getUserRequestContext()}},{key:"_onAdEvent",value:function(e){var n,r=this,i=new Date,a=i.getHours(),s=i.getDate(),o=i.getMonth(),c=i.getFullYear(),d=b(google.ima.AdEvent.Type,e.type),u=!1,l=(null==e||null===(n=e.getAd())||void 0===n?void 0:n.getContentType())||"",h=!l.startsWith("image")&&!l.startsWith("text");this._sendIMAEventsToHB(e);var p=document.getElementById("game"),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:this.contentPaused&&(u=!0),this.isAudioAd&&(this.audioAdLabel.hide(),this.isAudioAd=!1),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 m=e.getAd().getContentType();this._show({mode:"click",contentType:m}),DS();break;case google.ima.AdEvent.Type.COMPLETE:e.getAd(),u=this._is_completed(e.getAd()),f="Fired when the ad completes playing.",this.adType_===g.Rewarded&&this._broadcast("SDK_REWARDED_WATCH_COMPLETE",{message:"",status:"success"});break;case google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED:this.gameData.fllc.enabled&&(p.style.display="none"),this.contentPaused=!0,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:this.gameData.fllc.enabled&&(p.style.display="block"),f="Fired when content should be resumed. This usually happens when an ad finishes or collapses.",this.contentPaused?u=!0:(this.requestRunning=!1,this._broadcast("AD_ERROR",{message:"got resume without pause, possibly with VMAP",status:"error",skipForward:!0})),this._hideAddResume(),this._hideRewardedLabel(),this.t4rButton&&this.t4rButton.hide();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 v=e.getAd().getContentType();this._show({mode:"first_quartile",contentType:v});break;case google.ima.AdEvent.Type.IMPRESSION:f="Fired when the impression URL has been pinged.",e.getAd(),console.log("gdsdk: eventname IMPRESSION",this.isAudioAd),this.isAudioAd&&this.audioAdLabel.show();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 y=e.getAd().getContentType();f=y,this._show({mode:"loaded",contentType:y});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(),this.rewardedLabel.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:u=this._is_completed(e.getAd()),f="Fired when the ad is skipped by the user.",RS(),this.t4rButton&&this.t4rButton.hide();break;case google.ima.AdEvent.Type.STARTED:this.adType_===g.Rewarded&&this.rewardedLabel.show(),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:u=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){var _=!this.contentPaused&&e.type===google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,w=!this.contentPaused&&e.type===google.ima.AdEvent.Type.ALL_ADS_COMPLETED;_||w||this.isAudioAd||this._broadcast(d,{name:d,message:f,status:"success",analytics:{category:d,action:this.parentDomain,label:"h".concat(a," d").concat(s," m").concat(o," y").concat(c)}})}if(u&&!this.adSuccess){this.adSuccess=!0;var A=e.getAd(),k="Rainbow"===(null==A?void 0:A.getAdSystem())&&(null==A?void 0:A.getWrapperAdIds().some(function(e){return t(this,r),"promo"===e}.bind(this)));null==A||A.getAdSystem(),null==A||A.getWrapperAdIds(),this._broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success",isPromoSuccess:k}),this.resetForNext(e)}}},{key:"_run_atom_tag_aws_test",value:function(e){var n=this;try{var r,i,a,s,o;if(!((null===(r=this.gameData)||void 0===r||null===(i=r.aws_tst)||void 0===i?void 0:i.enabled)&&(null===(a=this.gameData)||void 0===a||null===(s=a.aws_tst)||void 0===s||null===(o=s.ep)||void 0===o?void 0:o.atm)))return;var c=e.type,d=e.url;if("none"===c||!d)return;d=d.replace("tag.atom.gamedistribution.com","atom-tag-prod-aws.gamedistribution.com"),fetch(d).then(function(){t(this,n)}.bind(this))}catch(e){}}},{key:"_findAtomTagUrl",value:function(e,n){var r=this,i={type:"none"};try{var a=this.current_dp,s=a.id,o=a.error_url,c=a.impression_url,d=a.fallback_imp_url,u=a.promo_imp_green_url;if(!e&&!n)return i={type:"imp_err",url:o};var l=e.getWrapperAdIds().some(function(e){return t(this,r),e==="".concat(s)}.bind(this)),h=e.getWrapperAdIds().some(function(e){return t(this,r),"fallback"===e}.bind(this)),p=e.getWrapperAdIds().some(function(e){return t(this,r),"promo"===e}.bind(this));l&&n?i={type:"normal_imp",url:c}:l&&!n?i={type:"normal_err",url:o}:p&&n?i={type:"promo_imp",url:u}:h&&n&&(i={type:"fallbacj_imp",url:d})}catch(e){}return i}},{key:"_onAdError",value:function(e){this.requestRunning=!1,this._resetAdsLoader(),this._clearSafetyTimer("ERROR"),this._hide("_onAdError"),this._sendIMAEventsToHB(e);try{var t="AD_ERROR",n=e.getError(),r=n.getErrorCode().toString()||n.getVastErrorCode().toString(),i=this._getInnerErrorCode(n);GS.emit("AD_ERROR",r),this._broadcast(t,{message:r,details:i,status:"warning",analytics:{category:t,action:i,label:r}}),this._hideAddResume()}catch(e){}}},{key:"_hideAddResume",value:function(){try{this.adResume&&this.adResume.hide()}catch(e){console.log("Error on hide adResume",e)}}},{key:"_hideRewardedLabel",value:function(){try{this.adType_===g.Rewarded&&this.rewardedLabel&&this.rewardedLabel.hide()}catch(e){console.log("Error on hide adResume",e)}}},{key:"_sendIMAEventsToHB",value:function(e){if(window.idhb&&"function"==typeof window.idhb.onImaEvent)try{window.idhb.onImaEvent({event:e})}catch(e){}}},{key:"_resetAdsLoader",value:function(){this.adsManager&&(this.adsManager.destroy(),this.adsManager=null,this._adrequest_user_context=null),this.adsLoader&&this.adsLoader.contentComplete()}},{key:"_startSafetyTimer",value:function(e,n){var r=this;this.safetyTimer&&clearTimeout(this.safetyTimer),this.safetyTimer=window.setTimeout(function(){t(this,r),this.cancel(),this._clearSafetyTimer(n)}.bind(this),e)}},{key:"_clearSafetyTimer",value:function(e){void 0!==this.safetyTimer&&null!==this.safetyTimer&&(clearTimeout(this.safetyTimer),this.safetyTimer=void 0)}},{key:"_getVPAIDMode",value:function(){return google.ima.ImaSdkSettings.VpaidMode.ENABLED}},{key:"_getPrebidScripts",value:function(){var e=["https://hb.improvedigital.com/pbw/headerlift.min.js","http://hb.improvedigital.com/pbw/headerlift.min.js"];return this.options.hb_script?[this.options.hb_script].concat(e):e}},{key:"_getInnerErrorCode",value:function(e){if(hS(e.getInnerError)){var t=e.getInnerError();if(t)return hS(t.getErrorCode)&&hS(t.getVastErrorCode)?t.getErrorCode().toString()||t.getVastErrorCode().toString():t.message}}},{key:"resetForNext",value:function(){this.requestRunning=!1,this._hide("resetForNext")}},{key:"_createCustomAdVastUrl",value:function(e,n){var r=this;if(e){var i=this.macros.transform(e,{get:function(e){if(t(this,r),n&&n.tnl_keys)return n.tnl_keys[e.toLowerCase()]}.bind(this)});for(var a in i.query||{}){var s=i.query[a];G(s)&&(i.query[a]=N.stringify(s))}var o=new O(i.url,!0);return q(o.query,i.query||{}),BS({url:o.toString()},n)}}},{key:"_transformVast",value:function(e,t){var n={url:e.url};try{var r=new O(e.url,!0),i=this._transformQuery(e,t,r);i&&(n.url=r.toString());var a=i?r:new O(e.url,!0);if(a.query.cust_params){var s=N.parse(a.query.cust_params);n.bidder=s.hb_bidder,n.cust_params=s}n.url_parsed=a}catch(e){n.hasError=!0,n.message=e.message,n.bidder="error",console.log(e.message)}return n}},{key:"_transformQuery",value:function(e,n,r){var i=this;if(e&&n&&e.tnl_keys){var a=this.options.vast_query;if(n.retry_on_success&&this.options.retry_on_success&&G(this.options.retry_on_success.vast_query)?a=this.options.retry_on_success.vast_query:n.retry_on_failure&&this.options.retry_on_failure&&G(this.options.retry_on_failure.vast_query)&&(a=this.options.retry_on_failure.vast_query),a=M(a),G(a)){var s=r.query;if(a.$$remove){for(var o in s){new RegExp(a.$$remove,"i").test(o)&&delete s[o]}delete a.$$remove}var c=N.parse(s.cust_params);if(a.cust_params&&a.cust_params.$$remove){for(var d in c){new RegExp(a.cust_params.$$remove,"i").test(d)&&delete c[d]}delete a.cust_params.$$remove}var u=this.macros.transform(a,{get:function(n){return t(this,i),e.tnl_keys[n.toLowerCase()]}.bind(this)});return s.cust_params=c,q(s,u),s.cust_params=N.stringify(s.cust_params),!0}}}},{key:"_isExcludedBidderForT4R",value:function(){var e=this;try{var n,r,i,a,s=(null===(n=this._adrequest_user_context)||void 0===n||null===(r=n.adTag)||void 0===r?void 0:r.bidder)||"adx";this.msgrt.send("bidder",{message:s}),this._adrequest_user_context,'bidder:"'.concat(s,'"');var o=(null===(i=this.gameData.t4rc)||void 0===i?void 0:i.bidder_exc)||[],c=(null===(a=this.gameData.t4rc)||void 0===a?void 0:a.bidder_inc)||[],d=!1;return c.length>0?d=!c.some(function(n){return t(this,e),n===s}.bind(this)):o.length>0&&(d=o.some(function(n){return t(this,e),n===s}.bind(this))),d}catch(e){console.log("ex_bidder ERR",e)}}},{key:"_isT4R",value:function(e){var t,n,r;if(!this.gameData.publishedAt)return!1;var i=new Date(this.gameData.publishedAt);if(((new Date).getTime()-i.getTime())/864e5<=10)return!1;var a=this.gameData.meta,s=e.t4r.meta;if((null==a?void 0:a.ast.c)>=(null==s?void 0:s.ast.c)&&(null==a?void 0:a.sit.c)>=(null==s?void 0:s.sit.c))return!1;if(this._isExcludedBidderForT4R())return this.msgrt.send("bidder.ex",{message:"true"}),!1;this.msgrt.send("bidder.ex",{message:"false"});var o,c=null===(t=this._adrequest_user_context)||void 0===t?void 0:t.tnl_ad_pos;if(this.clickCount[c]>=(null===(n=e.t4r[c])||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 c&&(null===(o=e.t4r[c])||void 0===o?void 0:o.enabled);if(null!=e&&e.contentType.startsWith("video/")){var d,u=(null===(d=e.t4r[c])||void 0===d?void 0:d.viper)||0;if(u>0){var l,h=Math.random()<u;return c&&h&&(null===(l=e.t4r[c])||void 0===l?void 0:l.enabled)}return!1}return!1}},{key:"_isVMAP",value:function(e){var t,n,r,i,a,s,o,c,d,u,l,h,p,f,m;if(!e)return!1;var g="preroll"===e&&(!0===(null===(t=this.gameData)||void 0===t||null===(n=t.pAds)||void 0===n?void 0:n.vmap)||!0===(null===(r=this.gameData)||void 0===r||null===(i=r.pAds)||void 0===i||null===(a=i.vmap)||void 0===a?void 0:a.enabled))||"midroll"===e&&(!0===(null===(s=this.gameData)||void 0===s||null===(o=s.mAds)||void 0===o?void 0:o.vmap)||!0===(null===(c=this.gameData)||void 0===c||null===(d=c.mAds)||void 0===d||null===(u=d.vmap)||void 0===u?void 0:u.enabled))||"rewarded"===e&&(!0===(null===(l=this.gameData)||void 0===l||null===(h=l.rAds)||void 0===h?void 0:h.vmap)||!0===(null===(p=this.gameData)||void 0===p||null===(f=p.rAds)||void 0===f||null===(m=f.vmap)||void 0===m?void 0:m.enabled));if(!g)return!1;var v=this._get_vmap_config(e),b=this.adCounter[e];return void 0!==(null==v?void 0:v.start)?b>=(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){for(var t=e.adtag,n=e.position,r=e.config,i=e.dp,a=r.count||2,s=[],o=1;o<=a;o++){var c={};c.adtag=this._createCustomAdVastUrl(r["vast_"+o])||t,c.position=n,c.dp=r["vast_"+o]?void 0:i,s.push(c)}return s}},{key:"_get_vmap_config",value:function(e){var t,n,r,i,a,s,o,c;switch(e){case"preroll":return null===(t=this.gameData)||void 0===t||null===(n=t.pAds)||void 0===n?void 0:n.vmap;case"midroll":return null===(r=this.gameData)||void 0===r||null===(i=r.mAds)||void 0===i?void 0:i.vmap;case"rewarded":return null===(a=this.gameData)||void 0===a||null===(s=a.rAds)||void 0===s?void 0:s.vmap;default:return null===(o=this.gameData)||void 0===o||null===(c=o.pAds)||void 0===c?void 0:c.vmap}}},{key:"_isDP",value:function(e){var t,n,r;return!!e&&!0===(null===(t=this.gameData)||void 0===t||null===(n=t.dp)||void 0===n||null===(r=n[e])||void 0===r?void 0:r.enabled)}},{key:"_create_dp_display_context",value:function(){var e=this;return new Promise(function(n){var r=this;t(this,e);try{var i={id:this.topDomain||this.parentDomain,au:"display",ty:"display",aid:this.gameData.gameId,pgu:this.parentURL},a=new oS(this.gameData).checkCustomParams();a&&(i.cp=a);var s=encodeURIComponent(I.encode(JSON.stringify(i)));fetch("https://tag.atom.gamedistribution.com/v1/atm?ar=".concat(s)).then(function(e){return t(this,r),e.json()}.bind(this)).then(function(e){if(t(this,r),!e||!e.p)return this.msgrt.send("dp.na",{message:"atom"}),n();var i=e.p/100;this.msgrt.send("dp.fp",{message:i}),n({params:{fp:i},error_url:"https://tag.atom.gamedistribution.com/v1/err?ar=".concat(s),impression_url:"https://tag.atom.gamedistribution.com/v1/imp?ar=".concat(s)})}.bind(this)).catch(function(e){t(this,r),this.msgrt.send("dp.err",{message:(null==e?void 0:e.message)||e}),n()}.bind(this))}catch(e){this.msgrt.send("dp.err",{message:(null==e?void 0:e.message)||e}),n()}}.bind(this))}},{key:"_create_promo_context",value:function(e){var n,r=this,i={id:this.topDomain||this.parentDomain,au:e||"unknown",ty:"video",aid:this.gameData.gameId,pgu:this.parentURL},a=Object.keys(i).map(function(e){return t(this,r),"".concat(e,"=").concat(encodeURIComponent(i[e]))}.bind(this)).join("&");encodeURIComponent(I.encode(JSON.stringify(i)));var s=null===(n=this.gameData.promo)||void 0===n?void 0:n.rainbow,o=null==s?void 0:s.enabled,c="https://tag.atom.gamedistribution.com/v1/rainbow/?".concat(a),d=o?c:void 0;return function(){t(this,r),us.promoError&&(console.log("promo-test fictional promo error"),d=void 0)}.bind(this),{promo_url:d,promo_imp_blue_url:o?"https://tag.atom.gamedistribution.com/v1/rainbow/blue":void 0,promo_imp_green_url:o?"https://tag.atom.gamedistribution.com/v1/rainbow/green":void 0}}},{key:"_create_dp_context",value:function(n,i){var a=this;return new Promise(function(){var s=e(r.mark((function e(s){var o,c,d,u,l,h=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,a._isDP(n)){e.next=5;break}return a.msgrt.send("dp.na",{message:"rule"}),e.abrupt("return",s());case 5:c={id:a.topDomain||a.parentDomain,au:n||"unknown",ty:"video",aid:a.gameData.gameId,pgu:a.parentURL},(d=new oS(a.gameData).checkCustomParams())&&(c.cp=d),u=encodeURIComponent(I.encode(JSON.stringify(c))),null==i||i.adapterIndex,null==i||i.isLastAdapter,l=null===(o=a.gameData.promo)||void 0===o?void 0:o.rainbow,!1,null==l||l.enabled,null==i||i.isLastAdapter,fetch("https://tag.atom.gamedistribution.com/v1/atm?ar=".concat(u)).then(function(e){return t(this,h),e.json()}.bind(this)).then(function(e){if(t(this,h),!e||!e.p)return a.msgrt.send("dp.na",{message:"atom"}),s();var n=e.p/100;a.msgrt.send("dp.fp",{message:n}),s({id:Date.now(),floor_price:n,error_url:"https://tag.atom.gamedistribution.com/v1/err?ar=".concat(u,"&ec=[ERRORCODE]"),impression_url:"https://tag.atom.gamedistribution.com/v1/imp?ar=".concat(u),skip_url:"https://tag.atom.gamedistribution.com/v1/skp?ar=".concat(u),promo_url:void 0,promo_imp_blue_url:void 0,promo_imp_green_url:void 0})}.bind(this)).catch(function(e){t(this,h),a.msgrt.send("dp.err",{message:(null==e?void 0:e.message)||e}),s()}.bind(this)),e.next=20;break;case 16:e.prev=16,e.t0=e.catch(0),a.msgrt.send("dp.err",{message:(null===e.t0||void 0===e.t0?void 0:e.t0.message)||e.t0}),s();case 20:case"end":return e.stop()}}),e,this,[[0,16]])})));return function(e){return s.apply(this,arguments)}}())}},{key:"_extend_dp_with_adsense",value:function(e,t){if(e&&t)try{var n,r=new O(t.vastUrl,!0);if(null===(n=r.query)||void 0===n||!n.cust_params)return;var i=N.parse(r.query.cust_params);if(!i.tnl_asset_id)return;i.adsense=1,r.query.cust_params=N.stringify(i,!1),e.fallback_url=r.toString(),e.fallback_imp_url="https://tag.atom.gamedistribution.com/v1/rainbow/green"}catch(e){}}},{key:"_extend_hl_url",value:function(e){e.dp;var t=e.hl;e.src;var n=e.tnl_keys,r=!0!==(null==t?void 0:t.bidFloorApplied)?0:1;0===r&&null!=n&&n.hasOwnProperty("fp")?r=2:1!==r||null!=n&&n.hasOwnProperty("fp")||(r=3),n.bfa=r;try{var i,a=new O(e.url,!0);if(null===(i=a.query)||void 0===i||!i.cust_params)return;var s=N.parse(a.query.cust_params);s.bfa=r,s.adsense=0,a.query.cust_params=N.stringify(s,!1),e.url=a.toString(),t.vastUrl=e.url}catch(e){}finally{this.msgrt.send("bfa",{message:r})}}},{key:"_init_hl_script",value:(u=e(r.mark((function e(n){var i,a,s,o,c,d,u,l=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=this._getPrebidScripts(),a=i[0],s=function(){return t(this,l),!1}.bind(this),window.idhb=window.idhb||{iabCmpExists:s},window.idhb.options=window.idhb.options||{},Object.assign(window.idhb.options,{assetId:this.gameData.gameId,configUrl:this.topDomain||this.parentDomain,parentUrl:this.parentURL,pageType:"gd"}),"undefined"===window.idhb.options.configUrl&&(window.idhb.options.configUrl=null),window.idhb.que=window.idhb.que||[],(o=new URL(a)).searchParams.append("referer",window.idhb.options.configUrl),a=o.href,e.next=13,f(a,"gdsdk_prebid",{alternates:i,error_prefix:"Blocked:",exists:function(){return t(this,l),window.idhb.requestAds}.bind(this)});case 13:c=y("ch",window.location.href),d=y("ch_date",window.location.href),u={tnl_content_category:this.category.toLowerCase()},c&&(u.channel=c),d&&(u.ch_date=d),window.idhb.setAdserverTargeting(u),window.idhb.allowPersonalizedAds(!!parseInt(this.userAllowedPersonalizedAds)),window.idhb.addEventListener("slotRenderEnded",function(e){var n=this;t(this,l);try{var r,i=e.slotId.split("@");i=1===i.length?i[0]:i[1],e.isEmpty?(null!==(r=this.atom_display)&&void 0!==r&&r.error_url&&(fetch(this.atom_display.error_url).catch(function(e){t(this,n)}.bind(this)),delete this.atom_display),this._broadcast("DISPLAYAD_ERROR",{message:i,status:"warning"})):(this.atom_display.impression_url&&(fetch(this.atom_display.impression_url).catch(function(e){t(this,n)}.bind(this)),delete this.atom_display),this._broadcast("DISPLAYAD_IMPRESSION",{message:i,status:"success"}))}catch(e){}}.bind(this));case 21:case"end":return e.stop()}}),e,this)}))),function(e){return u.apply(this,arguments)})},{key:"_init_ima_script",value:(d=e(r.mark((function e(n){var i,a,s=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=["https://imasdk.googleapis.com/js/sdkloader/ima3_debug.js","https://imasdk.googleapis.com/js/sdkloader/ima3.js","http://imasdk.googleapis.com/js/sdkloader/ima3_debug.js","http://imasdk.googleapis.com/js/sdkloader/ima3.js"],a=this.options.debug?i[0]:i[1],e.next=4,f(a,"gdsdk_ima",{alternates:i,error_prefix:"Blocked:",exists:function(){return t(this,s),window.google&&window.google.ima}.bind(this)});case 4:case"end":return e.stop()}}),e,this)}))),function(e){return d.apply(this,arguments)})},{key:"_init_afg_script",value:(c=e(r.mark((function e(n){var i,a,s,o,c=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.gameData.afg_disabled){e.next=3;break}return e.abrupt("return");case 3:return(o={}).crossorigin="anonymous",o["data-ad-client"]=(null==n||null===(i=n.adsense_client)||void 0===i?void 0:i.length)>0?n.adsense_client:"ca-pub-2316275586951220",o["data-ad-frequency-hint"]="30s",o.allow="autoplay",(null==n||null===(a=n.adsense_channel)||void 0===a?void 0:a.length)>0&&(o["data-ad-channel"]=n.adsense_channel),(null==n||null===(s=n.adsense_host)||void 0===s?void 0:s.length)>0&&(o["data-ad-host"]=n.adsense_host),!0===(null==n?void 0:n.adsense_adbreak_test)&&(o["data-adbreak-test"]="on"),e.next=14,f("https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js","afg",{error_prefix:"Blocked:",exists:function(){return t(this,c),!!window.adsbygoogle}.bind(this),attrs:o});case 14:window.adsbygoogle=window.adsbygoogle||[],window.adsbygoogle.push({sound:"on",preloadAdBreaks:"on"});case 16:case"end":return e.stop()}}),e,this)}))),function(e){return c.apply(this,arguments)})},{key:"fixOutOfBounds",value:function(){try{if(!(this.gameData.afgszf&&this.gameData.afgszf.enabled))return;for(var e=this.gameData.afgszf,t=e.height,n=e.scrolls,r=t||"120vh",i=n||!0,a=document.getElementsByClassName("adsbygoogle"),s=0;s<a.length;s++){var o,c=a[s],d=c&&(null===(o=c.children[0])||void 0===o?void 0:o.children[0]);d&&"IFRAME"===d.tagName&&d.style.height!==r&&(d.style.height=r,i&&(d.parentElement.style.overflow="auto"))}}catch(e){"out-of-bounds error: ".concat(e.message)}}},{key:"clearSession",value:function(){this.requestRunning=!1}},{key:"_startAdsensePlacementRewardedAd",value:(o=e(r.mark((function e(n){var i,a,s,o,c,d,u,l,h=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.params,e.prev=1,!this.requestRunning){e.next=5;break}return this._broadcast("AD_IS_ALREADY_RUNNING",{status:"warning"}),e.abrupt("return");case 5:if(!void function(){if(t(this,h),us.fictionalAdSenseError||n.params.shouldFail)return this._broadcast("AD_ERROR",{message:"fictional adsense rewarded error",status:"error",skipForward:!0}),!0}.bind(this)){e.next=8;break}return e.abrupt("return");case 8:this.requestRunning=!0,this._send_atom_event("sg.ad.rw.requested"),i=!1,a=function(){t(this,h),i=!0,this.fixOutOfBounds(),this._broadcast("CONTENT_PAUSE_REQUESTED",{message:"",status:"success"}),this._broadcast("IMPRESSION",{message:"",status:"success"})}.bind(this),s=function(){t(this,h),i=!0,this._broadcast("CONTENT_RESUME_REQUESTED",{message:"",status:"success"})}.bind(this),o=function(){t(this,h),i=!0,this._send_atom_event("sg.ad.rw.dismissed")}.bind(this),c=function(){t(this,h),i=!0,this._broadcast("COMPLETE",{message:"",status:"success"}),this._broadcast("SDK_REWARDED_WATCH_COMPLETE",{message:"",status:"success"}),this._send_atom_event("sg.ad.rw.viewed")}.bind(this),d=function(e){t(this,h),i=!0,e()}.bind(this),u=function(e){t(this,h),i=!0,this.resetForNext();var n="rewarded";this.adCounter[n]=this.adCounter[n]||0,this.adCounter[n]++,"viewed"===e.breakStatus?this._broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success"}):(this._broadcast("AD_ERROR",{message:e.breakStatus,status:"error",skipForward:!0}),"dismissed"!==e.breakStatus&&this._send_atom_event("sg.dbg.rw",e))}.bind(this),l=function(e){window.adsbygoogle.push(e)},setTimeout(function(){t(this,h),i||(cs("gd-adflow adsense.reward timeout happened!"),this.requestRunning=!1,this._broadcast("AD_ERROR",{message:"timeout",status:"error",skipForward:!0}),this._send_atom_event("sg.dbg.rw",{breakStatus:"timeout"}))}.bind(this),1e3),l({type:"reward",name:"reward-in-game",beforeAd:a,afterAd:s,adDismissed:o,adViewed:c,beforeReward:d,adBreakDone:u}),e.next=26;break;case 22:throw e.prev=22,e.t0=e.catch(1),this._onError(e.t0),e.t0;case 26:case"end":return e.stop()}}),e,this,[[1,22]])}))),function(e){return o.apply(this,arguments)})},{key:"_startAdsensePlacementPreroll",value:(s=e(r.mark((function e(n){var i,a=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.params,e.prev=1,!this.requestRunning){e.next=5;break}return this._broadcast("AD_IS_ALREADY_RUNNING",{status:"warning"}),e.abrupt("return");case 5:if(!void function(){if(t(this,a),us.fictionalAdSenseError||n.params.shouldFail)return this._broadcast("AD_ERROR",{message:"fictional adsense preroll error",status:"error"}),!0}.bind(this)){e.next=8;break}return e.abrupt("return");case 8:this.requestRunning=!0,this._send_atom_event("sg.ad.pr.requested"),i=function(e){t(this,a),this.resetForNext();var n="preroll";this.adCounter[n]=this.adCounter[n]||0,this.adCounter[n]++,"viewed"===e.breakStatus?(this._send_atom_event("sg.ad.pr.viewed"),this._broadcast("CONTENT_PAUSE_REQUESTED",{message:"",status:"success"}),this._broadcast("IMPRESSION",{message:"",status:"success"}),this._broadcast("COMPLETE",{message:"",status:"success"}),this._broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success"}),this._broadcast("CONTENT_RESUME_REQUESTED",{message:"",status:"success"})):(this._broadcast("AD_ERROR",{message:e.breakStatus,status:"error"}),this._send_atom_event("sg.dbg.pr",e))}.bind(this),r={type:"preroll",adBreakDone:i},window.adsbygoogle.push(r),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 r}),e,this,[[1,15]])}))),function(e){return s.apply(this,arguments)})},{key:"_startAdsensePlacementStart",value:(a=e(r.mark((function e(n){var i,a,s,o=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.params,e.prev=1,!this.requestRunning){e.next=5;break}return this._broadcast("AD_IS_ALREADY_RUNNING",{status:"warning"}),e.abrupt("return");case 5:if(!void function(){if(t(this,o),us.fictionalAdSenseError||n.params.shouldFail)return this._broadcast("AD_ERROR",{message:"fictional adsense preroll error 2",status:"error"}),!0}.bind(this)){e.next=8;break}return e.abrupt("return");case 8:this.requestRunning=!0,this._send_atom_event("sg.ad.pr.requested"),i=function(){t(this,o),this.fixOutOfBounds(),this._broadcast("CONTENT_PAUSE_REQUESTED",{message:"",status:"success"}),this._broadcast("IMPRESSION",{message:"",status:"success"})}.bind(this),a=function(){t(this,o),this._broadcast("CONTENT_RESUME_REQUESTED",{message:"",status:"success"})}.bind(this),s=function(e){t(this,o),this.resetForNext();var n="preroll";this.adCounter[n]=this.adCounter[n]||0,this.adCounter[n]++,"viewed"===e.breakStatus?(this._send_atom_event("sg.ad.pr.viewed"),this._broadcast("COMPLETE",{message:"",status:"success"}),this._broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success"})):(this._broadcast("AD_ERROR",{message:e.breakStatus,status:"error"}),this._send_atom_event("sg.dbg.pr",e))}.bind(this),r={type:"start",name:"start-in-game",beforeAd:i,afterAd:a,adBreakDone:s},window.adsbygoogle.push(r),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 r}),e,this,[[1,17]])}))),function(e){return a.apply(this,arguments)})},{key:"_startAdsensePlacementNext",value:(i=e(r.mark((function e(n){var i,a,s,o=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.params,e.prev=1,!this.requestRunning){e.next=5;break}return this._broadcast("AD_IS_ALREADY_RUNNING",{status:"warning"}),e.abrupt("return");case 5:if(!void function(){if(t(this,o),us.fictionalAdSenseError||n.params.shouldFail)return this._broadcast("AD_ERROR",{message:"fictional adsense midroll error",status:"error"}),!0}.bind(this)){e.next=8;break}return e.abrupt("return");case 8:this.requestRunning=!0,this._send_atom_event("sg.ad.mr.requested"),i=function(){t(this,o),this.fixOutOfBounds(),this._broadcast("CONTENT_PAUSE_REQUESTED",{message:"",status:"success"}),this._broadcast("IMPRESSION",{message:"",status:"success"})}.bind(this),a=function(){t(this,o),this._broadcast("CONTENT_RESUME_REQUESTED",{message:"",status:"success"})}.bind(this),s=function(e){t(this,o),this.resetForNext();var n="midroll";this.adCounter[n]=this.adCounter[n]||0,this.adCounter[n]++,"viewed"===e.breakStatus?(this._send_atom_event("sg.ad.mr.viewed"),this._broadcast("COMPLETE",{message:"",status:"success"}),this._broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success"})):(this._broadcast("AD_ERROR",{message:e.breakStatus,status:"error"}),this._send_atom_event("sg.dbg.mr",e))}.bind(this),r={type:"next",name:"next-in-game",beforeAd:i,afterAd:a,adBreakDone:s},window.adsbygoogle.push(r),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 r}),e,this,[[1,17]])}))),function(e){return i.apply(this,arguments)})},{key:"_send",value:function(e,t){try{var n=this.msgrt,r=n._layout,i=n._ua,a={tp:e,ct:0,vrs:this.PackageJSON.version,url:this.parentURL,rfr:document.referrer,tdmn:this.topDomain||this.parentDomain,dpth:0,args:t,ua:{brnm:i.browser.name,brvs:i.browser.version,osnm:i.os.name,osvs:i.os.version,dvmd:i.device.model,w:r.w,h:r.h}};fetch("https://tag.atom.gamedistribution.com/v1/dmp?ar=".concat(encodeURIComponent(I.encode(JSON.stringify(a)))))}catch(e){}}},{key:"_send_atom_event",value:function(e,t){var n={gid:this.gameData.slug,md5:this.gameData.gameId,pid:0,pnm:this.gameData.pname,ctry:this.gameData.ctry,lcl:"en",hle:1,ads:1,args:t,href:window.location.href},r=(new xw).get();n=BS(BS({},n),r),n=t?BS(BS({},n),t):n,this._send(e,n)}},{key:"_isAfgPositionNext",value:function(e){return void 0!==e.adTimestamp}},{key:"_isAfgPositionStart",value:function(e){if(void 0!==e.adTimestamp)return!1;var t="preroll";return this.adCounter[t]=this.adCounter[t]||0,0===this.adCounter[t]}},{key:"attachAfgPosition",value:function(e){var t=e.params.position;switch(t){case"preroll":case"start":case"pause":case"next":case"browse":case"reward":return}var n=e.adType;if(n===g.Rewarded)t="reward";else if(n===g.Interstitial){var r,i;if(this._isAfgPositionStart(e))t=null===(r=this.gameData.pAds)||void 0===r||!r.enabled||null!==(i=this.gameData.loader)&&void 0!==i&&i.enabled?"start":"next";else this._isAfgPositionNext(e)&&(t="next")}t||(t="preroll"),e.params.position=t}},{key:"_broadcast",value:function(e,n){var r=this,i=!1;["AD_ERROR"].some(function(n){return t(this,r),n===e}.bind(this))&&(i=!this.adContext.isLastAdapter||this.adContext.extraPromoRunOnFail);var a=this.getCurrentAdPosition(this.adContext.adType);this.eventBus.broadcast(e,BS(BS({},n),{},{skipForward:i,adPosition:a}))}}]),n}(),FS=R((function t(n){var i=this;D(this,t),T(this,"load",e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,$v(i.moduleName);case 2:i.module=e.sent;case 3:case"end":return e.stop()}}),e)})))),T(this,"promo",e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i.module){e.next=3;break}return e.next=3,i.load();case 3:return e.abrupt("return",i.module[i.moduleDefault]);case 4:case"end":return e.stop()}}),e)}))));var a=n.package||"gd-sdk-stone-dynamic",s=n.package_version||"1.1.1",o=n.template||"puzzle",c=n.dependencies||[];this.moduleName="GDPromoByOrbit",this.moduleDefault=o.charAt(0).toUpperCase()+o.slice(1),this.moduleConfig={source:"https://pm.azerioncircle.com/@bygd/".concat(a,"/").concat(s,"/dist/").concat(o.toLowerCase(),"/iife/index.js"),dependencies:c},Wv(this.moduleName,this.moduleConfig)})),VS=R((function t(n){var i=this;D(this,t),T(this,"load",e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,$v(i.moduleName);case 2:i.module=e.sent;case 3:case"end":return e.stop()}}),e)})))),T(this,"splash",e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i.module){e.next=3;break}return e.next=3,i.load();case 3:return e.abrupt("return",i.module[i.moduleDefault]);case 4:case"end":return e.stop()}}),e)}))));var a=n.package||"gd-sdk-air-dynamic",s=n.package_version||"1.2.0",o=n.template||"pluto",c=n.dependencies||[];this.moduleName="GDSplashDynamic",this.moduleDefault=o.charAt(0).toUpperCase()+o.slice(1),this.moduleConfig={source:"https://pm.azerioncircle.com/@bygd/".concat(a,"/").concat(s,"/dist/").concat(o.toLowerCase(),"/iife/index.js"),dependencies:c},Wv(this.moduleName,this.moduleConfig)})),zS=function(e,t){console.log(e,t)},HS={},WS={},KS=null;function $S(){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 HS.version=r,HS.frame=e,HS.function=n,HS.version}function QS(e){var n=this;return KS||(KS=new Promise(function(r){function i(t,n){if(zS("Received a response from CMP",t),n){var i,a;if(!1!==t.gdprApplies)return"tcloaded"===t.eventStatus||"useractioncomplete"===t.eventStatus?(("boolean"!=typeof(a=(i=t)&&"boolean"==typeof i.gdprApplies?i.gdprApplies:e.defaultGdprScope)||!0===a&&"string"!=typeof i.tcString)&&r({result:"cmpUnexpectedResponse",cmp:HS,consentData:i}),void r({result:"ok",consentData:t})):void 0;r({result:"ok",consentData:t})}else r({result:"cmpCallFailed"})}t(this,n),$S(),HS.frame?2===HS.version?(zS("TCF v2 CMP found. Fetching the consent."),HS.function?(zS("CMP API is directly accessible, calling it now..."),HS.function("addEventListener",HS.version,i)):(zS("CMP API is outside the current iframe, calling it now..."),function(e,n,r){var i=this,a="__tcfapi";function s(e){var t="".concat(a,"Return"),n="string"==typeof e.data&&e.data.indexOf(t)>=0?JSON.parse(e.data):e.data;if(n[t]&&n[t].callId){var r=n[t];void 0!==WS[r.callId]&&WS[r.callId](r.returnValue,r.success)}}window[a]=function(e,r,s,o){t(this,i);var c=Math.random()+"",d="".concat(a,"Call"),u=T({},d,{command:e,parameter:o,callId:c,version:r});WS[c]=s,n.postMessage(u,"*")}.bind(this),window.addEventListener("message",s,!1),window[a](e,HS.version,r)}("addEventListener",HS.frame,i))):r({result:"cmpVersionNotV2",cmp:HS}):r({result:"cmpNotFound"})}.bind(this)),KS)}var YS=new(function(){function t(){D(this,t),this.productName="Game Distribution"}var n;return R(t,[{key:"checkIfExcluded",value:function(e){try{var t,n;return!(null===(t=e.diagnostic)||void 0===t||null===(n=t.gameDock)||void 0===n||!n.excluded)}catch(e){return console.log("Error on checkIfExclude check",e),!1}}},{key:"track",value:(n=e(r.mark((function e(t,n){var i,a,s,o,c,d,u;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.checkIfExcluded(n)){e.next=3;break}return e.abrupt("return");case 3:if(s=null==t||null===(i=t.visitor)||void 0===i||null===(a=i.visitorData)||void 0===a?void 0:a.visitorId){e.next=6;break}return e.abrupt("return");case 6:return o=encodeURIComponent(this.productName),c=encodeURIComponent(s),e.prev=8,d="https://tracker-v4.gamedock.io/v1/events-tracker/track/product/".concat(o,"/user_id/").concat(c),e.next=12,fetch(d,{method:"POST"});case 12:e.sent,e.next=28;break;case 15:return e.prev=15,e.t0=e.catch(8),console.log("GAME_DOCK. fail v4",e.t0),e.prev=18,u="https://tracker.gamedock.io/v1/events-tracker/track/product/".concat(o,"/user_id/").concat(c),e.next=22,fetch(u,{method:"POST"});case 22:e.sent,e.next=28;break;case 25:e.prev=25,e.t1=e.catch(18),console.log("GAME_DOCK. fail v6",e.t1);case 28:case"end":return e.stop()}}),e,this,[[8,15],[18,25]])}))),function(e,t){return n.apply(this,arguments)})}]),t}());function JS(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return XS(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 XS(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,o=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){o=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(o)throw a}}}}function XS(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 ZS=function(e){var n=this,r=e.src,i=e.attributes,a=e.target,s=e.isAsync;return new Promise(function(e,o){var c=this;t(this,n);try{var d=document.createElement("script");if(d.async=null==s||s,d.type="text/javascript",d.onload=function(){t(this,c),e()}.bind(this),d.onerror=function(){t(this,c);var e="Error on script load, Error: ".concat(r);console.log(e),o(e)}.bind(this),d.src=r,i){var u,l=JS(i);try{for(l.s();!(u=l.n()).done;){var h=u.value,p=h.key,f=h.value;d.setAttribute(p,f)}}catch(e){l.e(e)}finally{l.f()}}a||(a=document.head),a.appendChild(d)}catch(e){var m="Error on script load catch, Error: ".concat(r);console.log(m,e),o(m)}}.bind(this))},eR="140feb72-7952-4420-8ae5-e8978d87bc17",tR=function(){var t=e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,ZS({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,ZS({src:"https://cookie-cdn.cookiepro.com/consent/".concat(eR,"/OtAutoBlock.js"),attributes:[{key:"id",value:"gd-cookie-pro-autoblock"}],isAsync:!1});case 5:return e.next=7,ZS({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:eR}],isAsync:!1});case 7:n=void 0,r=void 0,i=void 0,n=(t={inlineScript:"function OptanonWrapper() { }"}).inlineScript,r=t.target,(i=document.createElement("script")).text=n,r||(r=document.head),r.appendChild(i),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(0),console.log("GD: CMP error on load",e.t0);case 13:case"end":return e.stop()}var t,n,r,i}),e,null,[[0,10]])})));return function(){return t.apply(this,arguments)}}(),nR=new j,rR={"https://games.softgames.com":{"splash-hidden":"splash-hidden"},"https://sg.gamedistribution.com":{"splash-hidden":"splash-hidden"},"https://html5.gamedistribution.com":{key:"value"}},iR=!1;function aR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}window.addEventListener("message",(function(e){var n=this,r=e.data,i=e.origin,a=r.type;if(Object.keys(rR).some(function(e){return t(this,n),e===i}.bind(this))&&(null==r||!r.__tcfapiCall)){var s=!r.type||!r.type.startsWith("gd-sdk")&&!("parent-data-response"===r.type)||"sg-game-event"===r.type;!function(e){if("gd-sdk-on-event"===(null==e?void 0:e.type)){var t,n,r;if("midroll"!==(null==e||null===(t=e.event)||void 0===t?void 0:t.adPosition))return;var i="CONTENT_RESUME_REQUESTED"===(null===(n=e.event)||void 0===n?void 0:n.name);"CONTENT_PAUSE_REQUESTED"===(null===(r=e.event)||void 0===r?void 0:r.name)&&(iR=!0),i&&iR&&(iR=!1,window.parent.postMessage({type:"sg-game-event",eventName:"levelFinish",data:{score:100}},"*"))}}(r);var o=function(){t(this,n);try{var r,i;return null==e||null===(r=e.source)||void 0===r||null===(i=r.location)||void 0===i?void 0:i.href}catch(e){}}.bind(this);if(window.parent&&s){if("https://html5.gamedistribution.com"===i){var c=o();if(!c)return;var d=c&&["9555f04e1900482aaaef710cd2f8c440"].some(function(e){return t(this,n),c.indexOf(e)>0}.bind(this)),u=["sg-game-event"].some(function(e){return t(this,n),e===(null==r?void 0:r.type)}.bind(this));if(!d&&!u)return}var l=r.eventName,h=r.data;window.mpHelper&&(console.log("SG_EVENTS sending to minijuegos!"),"levelStart"!==l&&"levelFinish"!==l||window.mpHelper.sendStat("level",h.level),"levelFinish"===l&&window.mpHelper.sendStat("score",h.score)),window.parent.postMessage(r,"*")}if(a){var p=rR[i][a];p&&nR.emit(p,r)}}}),!1);var sR="__msgr",oR=F(),cR=function(e){var n=this;if(!window[sR]){var r=document.createElement("iframe");if(r.src="https://static.gamedistribution.com/message/index.html",r.style.display="none",r.name=sR,document.body.appendChild(r),window!==window.top){var i={gameId:e.gameId,target:e.evnts.domain,token:oR,event_name:"TokenGenerated",timestamp:Date.now()};r.onload=function(){lR(i)},setInterval(function(){t(this,n),i.timestamp=Date.now(),i.event_name="Heartbeat",lR(i)}.bind(this),1e3*e.evnts.heartbeatDuration)}}window.addEventListener("message",function(e){t(this,n);try{var r=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?aR(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):aR(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e.data);if(!r.event_name)return;r.token=oR,lR(r)}catch(e){console.error("GD Messager Error",e.message)}}.bind(this),!1)},dR=function(e){try{var t={gameId:e.game.gameId,target:e.game.evnts.domain,event_name:e.event,timestamp:Date.now()},n=uR(window);n!==window.top&&(null==n||n.postMessage(t,"https://html5.gamedistribution.com"))}catch(e){}},uR=function e(t){try{var n,r,i=null==t?void 0:t.parent;if("game"===(null===(n=i.document)||void 0===n||null===(r=n.activeElement)||void 0===r?void 0:r.id))return i;e(i)}catch(e){return t}},lR=function(e){try{window[sR]&&window[sR].postMessage(e,"*")}catch(e){console.log("GD Messager initialization, please wait....")}},hR=function(){function n(e){D(this,n),this.adContainer=document.getElementById("gdsdk__advertisement"),this.adContainerInner=document.getElementById("gdsdk__advertisement_slot"),this._adRequest=e.adRequest,this._gameData=e._gameData,this._msgrt=e._msgrt,this._adInstance=e._adInstance,this._eventBus=e._eventBus,this.blockedAdsMap=e._blockedAdsMap,this._parentURL=e._parentURL,this._parentDomain=e._parentDomain,this._onResumeGame=e._onResumeGame.bind(e),this._onPauseGame=e._onPauseGame.bind(e),this._onRewardedWatchComplete=e._onRewardedWatchComplete.bind(e),this._onAdError=e._onAdError.bind(e),this._promoShowSuccess=!1}var i,a,s;return R(n,[{key:"run",value:function(n){var i=n.duration,a=this;return new Promise(function(){var n=e(r.mark((function e(n,s){var o,c=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,a.add();case 3:o=a.show(),setTimeout(function(){t(this,c);try{a.hide(),n({success:o})}catch(e){s(e)}}.bind(this),1e3*i),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),s(e.t0);case 10:case"end":return e.stop()}}),e,this,[[0,7]])})));return function(e,t){return n.apply(this,arguments)}}())}},{key:"show",value:function(){return this.promo_data.game?(this.adContainer.style.visibility="visible",this.promo.style.display="block",this._onPauseGame("Pause the game for the promo","success"),this._promoShowSuccess=!0):this._onAdError("Promo not found"),this._promoShowSuccess}},{key:"hide",value:function(){var e;(this.promo.remove(),this.adContainer.style.visibility="hidden",this._promoShowSuccess)&&("reward"===(null===(e=this._adRequest.params)||void 0===e?void 0:e.position)&&this._onRewardedWatchComplete());this._onResumeGame("Advertisement(s) are done. Start / resume the game.","success")}},{key:"add",value:(s=e(r.mark((function t(){var n,i,a,s=this;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.fetch_promo();case 3:this.promo_data=t.sent,n=document.createElement("div"),this.promo=n,i=this.promo_data,this.promo.addEventListener("click",function(){var t=e(r.mark((function e(t){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.preventDefault(),console.log(i),s.track_click(i.click_tracking),window.open(i.click_through,"_blank");case 4:case"end":return e.stop()}}),e)})));return function(e){return t.apply(this,arguments)}}()),(a=document.createElement("iframe")).src=this.promo_data.renderer_url,a.setAttribute("frameborder",0),this.addStyles(),this.promo.classList.add("gd__promo"),a.classList.add("gd__promo__iframe"),this.promo.appendChild(a),this.adContainer.appendChild(this.promo),t.next=21;break;case 18:t.prev=18,t.t0=t.catch(0),console.log(t.t0);case 21:case"end":return t.stop()}}),t,this,[[0,18]])}))),function(){return s.apply(this,arguments)})},{key:"addStyles",value:function(){var e="\n .gd__promo{\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background-color: transparent;\n z-index: 1;\n cursor: pointer;\n }\n .gd__promo__iframe{\n position: relative;\n z-index: -1;\n width:".concat(this.adContainerInner.style.width,";\n height:").concat(this.adContainerInner.style.height,";\n }\n "),t=document.body||document.getElementsByTagName("body")[0];this.addStylesheet("gd__promo__style",t,e)}},{key:"addStylesheet",value:function(e,t,n){if(!document.getElementById(e)){var r=document.createElement("style");r.id=e,r.styleSheet?r.styleSheet.cssText=n:r.appendChild(document.createTextNode(n)),t.appendChild(r)}}},{key:"fetch_promo",value:(a=e(r.mark((function e(){var n,i=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch("https://tag.atom.gamedistribution.com/v1/rainbow/pick?id=".concat(this._parentDomain,"&aid=").concat(this._gameData.gameId)).then(function(e){return t(this,i),e.json()}.bind(this));case 2:return n=e.sent,e.abrupt("return",n);case 4:case"end":return e.stop()}}),e,this)}))),function(){return a.apply(this,arguments)})},{key:"track_click",value:(i=e(r.mark((function e(t){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(t);case 2:case"end":return e.stop()}}),e)}))),function(e){return i.apply(this,arguments)})}]),n}();function pR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function fR(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?pR(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pR(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function mR(e,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 gR(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 gR(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,o=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){o=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(o)throw a}}}}function gR(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 vR,bR,yR=function(){function n(e){var r=this;D(this,n),T(this,"_getAdTypeByAfgPosition",function(e){var n=this;t(this,r);var i={preroll:["preroll","start"],midroll:["next"],rewarded:["reward"]},a=Object.keys(i).find(function(r){var a=this;return t(this,n),i[r].some(function(n){return t(this,a),n===e.params.position}.bind(this))}.bind(this));return a||"midroll"}.bind(this)),this._gameData=e._gameData,this._msgrt=e.msgrt,this._adInstance=e.adInstance,this._eventBus=e.eventBus,this.blockedAdsMap=e.blockedAdsMap,this._parentURL=e._parentURL,this._parentDomain=e._parentDomain,this._onResumeGame=e.onResumeGame.bind(e),this._onPauseGame=e.onPauseGame.bind(e),this._onRewardedWatchComplete=e.onRewardedWatchComplete.bind(e),this._onAdError=e.onAdError.bind(e),this._setAdRequestTimer=e._setAdRequestTimer.bind(e),this._giveGift=e._giveGift.bind(e),this._runAutoResume=e._runAutoResume.bind(e),this.send_atom_event=e.send_atom_event.bind(e),this.get_session_id=e.get_session_id.bind(e),this.get_ad_system_init_result=e.get_ad_system_init_result.bind(e),this.eventBus=new _}var i,a;return R(n,[{key:"runAdFlow",value:(a=e(r.mark((function e(n){var i,a,s,o,c,d,u,l,h,p,f,m,g,v,b,y,_,w,A,k,E,x,S,R,D,O,I,P,C,L,U,M,j,B,G,N,q,F,V,z,H,W=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.adRequest=n,c=this._getAdTypeByAfgPosition(n),n.params.position,d=this._getAdFlow(c),u=this._gameData,l=u.afg_disabled,h=null===(i=n.params)||void 0===i?void 0:i.isGift,null===(a=n.params)||void 0===a||a.position,p=null===(s=u.promo)||void 0===s?void 0:s.rainbow,f=(null==p?void 0:p.enabled)&&(null===(o=p.position)||void 0===o?void 0:o[c]),m=null==p?void 0:p.gift,g=f&&null!=p&&p.duration?null==p?void 0:p.duration:5,v=l?d.filter(function(e){return t(this,W),"adsense"!==e}.bind(this)):d,b=this.get_ad_system_init_result(),y=b.afg,_=b.ima,this.adsBlocked=!y||!_,this.adsBlocked?(cs("gd-adflow adsBlocked so changing the flow"),v=[]):(y||(v=v.filter(function(e){return t(this,W),"adsense"!==e}.bind(this))),_||(v=v.filter(function(e){return t(this,W),"ima"!==e}.bind(this)))),w=!1,A=!1,k=[],E=0,x=!1,S=mR(v),e.prev=26,S.s();case 28:if((R=S.n()).done){e.next=62;break}return D=R.value,n.params.adapter=D,O=E===v.length-1,I=h&&m||!h,P=O&&f&&I,n.params=fR(fR({},n.params),{},{adapterIndex:E,isLastAdapter:O,shouldFail:!1,extraPromoRunOnFail:P}),function(){t(this,W),us.firstSuccessOrder&&!isNaN(us.firstSuccessOrder)&&(n.params.shouldFail=E<us.firstSuccessOrder)}.bind(this),cs("gd-adflow, before adInvoke",E,D,n.params.shouldFail),e.next=39,this.adInvoke(n);case 39:if(C=e.sent,L=C.success,U=C.args,M=C.isSkipped,j=C.noVast,!L){e.next=51;break}return cs("gd-adflow, adapter-result-success",E,D,U),w=!0,A=!(null==U||!U.isPromoSuccess),e.abrupt("break",62);case 51:if(cs("gd-adflow, adapter-result-failure",E,D,U.message),E++,k.push(U.message),!M){e.next=56;break}return e.abrupt("break",62);case 56:if(!j){e.next=59;break}return this._runAutoResume(),e.abrupt("break",62);case 59:x=P;case 60:e.next=28;break;case 62:e.next=67;break;case 64:e.prev=64,e.t0=e.catch(26),S.e(e.t0);case 67:return e.prev=67,S.f(),e.finish(67);case 70:if(!x){e.next=76;break}return e.next=73,new hR(this).run({duration:g});case 73:e.sent.success&&(A=!0);case 76:return function(){var e;t(this,W),us.disableGift&&null!==(e=u.gft)&&void 0!==e&&e[c].enabled&&(u.gft[c].enabled=!1)}.bind(this),B=k.join(" /n"),w?(this._setAdRequestTimer(),this._onResumeGame("Advertisement(s) are done. Start / resume the game.","success"),this._giveGift(c)):(this._onResumeGame(B,"warning"),this._giveGift(c)),G="-1",N="none",w?(G="index_".concat(E),N=v[E]):A&&(G="promo",N="promo"),q=this.get_session_id(),this.adsBlocked&&"-1"===G?(F="rewarded"===c?"rewarded":this.blockedAdsMap.preroll?"midroll":"preroll",this.blockedAdsMap[F]=this.blockedAdsMap[F]?this.blockedAdsMap[F]+1:1,JSON.stringify(this.blockedAdsMap),this._msgrt.send("adflow.blocked.pos",{message:"".concat(F)}),this.send_atom_event("gd.adflow",{adBlocker:!0,afgBlocked:!0,imaBlocked:!0,adType:F,sessionId:q,successAdapter:"none",adFlowIndex:G})):(T(V={},"adflow.all.index",{message:"".concat(G)}),T(V,"adflow.all.success_adapter",{message:"".concat(N)}),T(V,"adflow.".concat(c,".index"),{message:"".concat(G)}),T(V,"adflow.".concat(c,".success_adapter"),{message:"".concat(N)}),z=V,Object.keys(z).forEach(function(e){t(this,W);var n=z[e];this._msgrt.send(e,n)}.bind(this)),this.send_atom_event("gd.adflow",{adFlowIndex:G,successAdapter:N,adBlocker:!1,afgBlocked:!y,imaBlocked:!_,adType:c,sessionId:q})),H={adType:c},this.eventBus.broadcast("AD_FLOW_COMPLETE",H),e.abrupt("return",H);case 89:case"end":return e.stop()}}),e,this,[[26,64,67,70]])}))),function(e){return a.apply(this,arguments)})},{key:"adInvoke",value:(i=e(r.mark((function n(i){var a=this;return r.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",new Promise(function(){var n=e(r.mark((function e(n,s){var o,c,d,u=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o="main.showad.".concat(i.params.adapter,".").concat(i.params.adapterIndex),c=function(e){t(this,u),a._eventBus.unsubscribeScope(o);var r="dismissed"===(null==e?void 0:e.message);n({success:!1,args:e,isSkipped:r,noVast:e.noVast})}.bind(this),d=function(e){t(this,u),a._eventBus.unsubscribeScope(o),n({success:!0,args:e})}.bind(this),a._eventBus.subscribe("AD_ERROR",c,o),a._eventBus.subscribe("AD_SDK_CANCELED",c,o),a._eventBus.subscribe("AD_SUCCESS",d,o),e.prev=6,e.next=9,a._adInstance.startAd(i);case 9:e.next=15;break;case 11:e.prev=11,e.t0=e.catch(6),ds("gd-adflow startAd error",e.t0),n({success:!1,err:e.t0});case 15:case"end":return e.stop()}}),e,this,[[6,11]])})));return function(e,t){return n.apply(this,arguments)}}()));case 1:case"end":return n.stop()}}),n)}))),function(e){return i.apply(this,arguments)})},{key:"_getAdFlow",value:function(e){var n,r,i,a,s,o,c,d,u=this,l=void function(){if(t(this,u),us.customAdFlow)return JSON.parse(us.customAdFlow)}.bind(this),h=this._gameData.adflw;l&&(h=l);var p=null!==(n=h)&&void 0!==n&&null!==(r=n.adapters)&&void 0!==r&&r.default?null===(i=h)||void 0===i||null===(a=i.adapters)||void 0===a?void 0:a.default:["ima","adsense"];return p=null!==(s=h)&&void 0!==s&&null!==(o=s.adapters)&&void 0!==o&&o[e]?null===(c=h)||void 0===c||null===(d=c.adapters)||void 0===d?void 0:d[e]:p}}]),n}(),_R=function(){function t(){D(this,t),this.moduleName="GDAeria",this.moduleConfig={source:"https://pm.azerioncircle.com/@bygd/gd-sdk-aeria/1.0.1/dist/default/iife/index.js",dependencies:[]},Wv(this.moduleName,this.moduleConfig)}var n,i;return R(t,[{key:"load",value:(i=e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,$v(this.moduleName);case 3:this.module=e.sent,this.module,e.next=11;break;case 7:e.prev=7,e.t0=e.catch(0),console.log("aeria module load error",e.t0),this.module=null;case 11:case"end":return e.stop()}}),e,this,[[0,7]])}))),function(){return i.apply(this,arguments)})},{key:"runYMenu",value:(n=e(r.mark((function e(t){var n;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.gameId,this.module){e.next=4;break}return e.next=4,this.load();case 4:(new this.module.Aeria).renderYMenu({gameId:n});case 6:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})}]),t}(),wR=function(){var e=this,n=function(){t(this,e);return/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Fa-f0-9]{32})(.*)$/i.test(location.href)}.bind(this),r=function(){t(this,e);return/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Za-z0-9]{8})\/(.*)$/i.test(location.href)}.bind(this),i=function(){t(this,e);return/^http[s]?:\/\/.*?gd_sdk_referrer_url=.*$/i.test(location.href)}.bind(this),a=function(){t(this,e);var i="html5.gamedistribution.com"!==O(window.location.href).host;return n()&&!(r()||i)?"loader-frame":"game-frame"}.bind(this);return{isMasterGameURL:n,isTokenGameURL:r,isExtHostedGameURL:i,whichFrame:a}},AR={isAeriaDomain:"minigame.aeriagames.jp"===(bR=(vR=new xw).get("partner.domain.value")||vR.get("top.domain.value"))||"minigame-stg.aeriagames.jp"===bR,isAeriaStagingDomain:"minigame-stg.aeriagames.jp"===bR},kR=AR.isAeriaStagingDomain;if(AR.isAeriaDomain){var ER=function(){var e,t="ae-soft-323";try{var n=(e=(new xw).get("partner.url.value"),new O(e,!0)),r=n.pathname,i=r.split("/"),a=i[i.length-1];cs("aeria-ylogin:loc",n,r,a),t=a}catch(e){ds("Error on getting aeria game id",e)}return t}(),xR={action:"score",data:{gameId:ER,score:100},env:kR?"staging":"production",system:"Softgames"};(new _).subscribe("AD_FLOW_COMPLETE",(function(e){"midroll"===e.adType&&function(){var e=window.parent||window,t=xR;e.postMessage(t,"*")}()}));var SR=function(){var t=e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(new _R).runYMenu({gameId:ER});case 2:case"end":return e.stop()}}),e)})));return function(){return t.apply(this,arguments)}}();"game-frame"===(0,wR().whichFrame)()&&SR()}var RR,DR=new j,TR=["https://games.softgames.com","https://sg.gamedistribution.com","https://minigame-stg.aeriagames.jp","https://minigame.aeriagames.jp","https://html5.gamedistribution.com","http://localhost:3005","https://yjgames.gamedistribution.com","https://portal-staging-sgweb.gamedistribution.com/"];window.addEventListener("message",(function(e){var n=this,r=e.data,i=e.origin,a=e.source;if(TR.some(function(e){return t(this,n),e===i}.bind(this))&&(null==r||!r.__tcfapiCall)){var s=r.system;r.action;var o="aeriaExternalHostsConnector"===s;if("Softgames"===s)RR=a,(window.parent||window).postMessage(r,"*"),DR.emit("aeria-event",r);else if(o){RR&&RR.postMessage(r,"*");var c=window.parent||window;c&&c.postMessage(r,"*")}}}),!1);var OR="https://html5.gamedistribution.com",IR="parent-data-request",PR="parent-data-response",CR=function(){function n(){D(this,n)}var i;return R(n,[{key:"init",value:function(e){var n=this;this._registerForDataRequests(e),this._askForParentFrameData().then(function(r){if(t(this,n),r){var i=r.adRequestTimer;e.adRequestTimer=i,e.adRequestTimer}}.bind(this))}},{key:"_registerForDataRequests",value:function(e){var n=this;window.addEventListener("message",function(r){t(this,n);var i=r.data,a=r.origin,s=r.source,o=i.type;if(i.value,a===OR&&o===IR){var c={adRequestTimer:e.adRequestTimer};s.postMessage({type:PR,value:c})}}.bind(this))}},{key:"_askForParentFrameData",value:(i=e(r.mark((function e(){var n=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(e,r){var i=this;t(this,n);var a=!1;window.addEventListener("message",(function(t){var n=t.data,r=t.origin;t.source;var i=n.type,s=n.value;r===OR&&i===PR&&(e(s),a=!0)})),setTimeout(function(){t(this,i),a||e()}.bind(this),1e3);var s={type:IR};window.parent.postMessage(s,"*")}.bind(this)));case 1:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})}]),n}(),LR=new CR;function UR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function MR(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?UR(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):UR(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var jR=F(),BR=null,GR=null,NR=function(){function n(e){var r=this;if(D(this,n),BR)return BR;BR=this,this.blockedAdsMap={},this._defaults=this._getDefaultOptions(),this._extendDefaultOptions(this._defaults,e),this._version=e.version||"0.0.0",this._bridge=this._getBridgeContext(),this._location=new xw,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={preroll:0,midroll:0,rewarded:0},this._mplus_count=0,this._setConsoleBanner(),this._initializeMessageRouter(),this._checkConsole(),this._subscribeToEvents(),this.sdkReady=new Promise(this._initializeSDKWithGameData.bind(this)),this.sdkReady.then(function(e){t(this,r),this._sdk_ready=!0}.bind(this)).catch(function(e){t(this,r),this._sdk_ready=!1}.bind(this)).finally(function(){var e,n,i=this;t(this,r),!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!==(n=this._gameData.evnts)&&void 0!==n&&n.enabled&&this._isLoaderGameURL()&&(cR(this._gameData),this._gameData.evnts.gameId===this.options.gameId&&setInterval(function(){t(this,i),this._send_gametag_data("heartbeat")}.bind(this),1e3*this._gameData.evnts.heartbeatDuration)),LR.init(this),this._send_gametag_data("sdk_init"),this._executeMidrollPlus()}.bind(this)),this._registerSGBridge(),this._whichFrame(),this._loadLocus()}var i,v,b,y,w,T,P,C,L,U,j,B,G;return R(n,[{key:"_initUnityHandler",value:function(){var e=this;window.addEventListener("DOMNodeInserted",function(){if(t(this,e),this._gameData.block_exts&&this._removeExternalsInHtml({enabled:!1}),document.getElementsByClassName("webgl-content")[0]){var n=document.getElementsByClassName("webgl-content")[0].getElementsByClassName("footer")[0];n&&n.setAttribute("style","display:none")}}.bind(this))}},{key:"_send_gametag_data",value:(G=e(r.mark((function e(t){var n;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this._getGdModeIfExist()&&(n=u()||"web",this.adInstance._send("tg.created",{gmid:this.options.gameId,dvc:n,qint:t}));case 1:case"end":return e.stop()}}),e,this)}))),function(e){return G.apply(this,arguments)})},{key:"_loadCMP",value:(B=e(r.mark((function e(){var t,n,i,a;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._isMasterGameURL()){e.next=6;break}if(i=new xw,0!==(null==(a=i.get("depth"))?void 0:a.value)||null===(t=this._gameData)||void 0===t||null===(n=t.cmp)||void 0===n||!n.enabled||"html5.gamedistribution.com"!==this._topDomain){e.next=6;break}return e.next=6,tR();case 6:case"end":return e.stop()}}),e,this)}))),function(){return B.apply(this,arguments)})},{key:"testConsent",value:function(){try{$S();e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,QS({});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;nR.on("splash-hidden",function(n){t(this,e),this._hideCMPButton()}.bind(this))}},{key:"_hideCMPButton",value:function(){var e=document.getElementById("ot-sdk-btn-floating");e&&(e.style.display="none")}},{key:"_sendLoadedEvent",value:function(){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:(j=e(r.mark((function e(n,i){var a,s=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this._getGameData();case 3:return this._gameData=e.sent,e.next=6,this._loadCMP();case 6:this._bridge.isCoreSDKMode=(null===(a=this._gameData.disableAds)||void 0===a?void 0:a.default)||!1,this._safeInit(),this._checkGameId(),this._checkGameDeleted(),this._checkBlocking(),this._changeMidrollInDebugMode(),void 0!==this._gameData.diagnostic&&void 0!==this._gameData.diagnostic.close_ads&&!1!==this._gameData.diagnostic.close_ads||(this.videoAdReady=this._initializeVideoAd().then(function(){t(this,s),(this._isMasterGameURL()||this._isExtHostedGameURL())&&(this.msgrt.send("adblocker.flw",{message:"ok"}),this.msgrt.send("adblocker.adapters",{message:"none"}))}.bind(this)).catch(function(e){t(this,s);var n="".concat(e).startsWith("Error: Blocked:");cs("gd-adflow adsBlocked",n,e);var r=this.get_ad_system_init_result(),i=r.ima,a=r.afg;if(this.adsBlocked=!i&&!a,this._isMasterGameURL()||this._isExtHostedGameURL()){this.msgrt.send("adblocker.flw",{message:"".concat(this.adsBlocked?"blocked":"ok")});var o=i||a?i?a?"none":"adsense":"ima":"all";this.msgrt.send("adblocker.adapters",{message:"".concat(o)})}console.error(e.message||e)}.bind(this))),n(this._gameData),e.next=21;break;case 16:e.prev=16,e.t0=e.catch(0),this._sendSDKError(e.t0),this.onResumeGame(e.t0.message,"warning"),i(e.t0);case 21:case"end":return e.stop()}}),e,this,[[0,16]])}))),function(e,t){return j.apply(this,arguments)})},{key:"_getDefaultOptions",value:function(){return{debug:!1,testing:!1,gameId:"4f3d7d38d24b740c95da2b03dc3a2333",prefix:"gdsdk__",onEvent:function(e){},onLoaderEvent:function(e){},flashSettings:{adContainerId:"",splashContainerId:""},advertisementSettings:{},resumeGame:function(){},pauseGame:function(){},onInit:function(e){},onError:function(e){},loader:{}}}},{key:"_extendDefaultOptions",value:function(e,t){var n=M(e);this.options=t?h(n,t):n,this.options.gameId=this.options.gameId.trim()}},{key:"_setConsoleBanner",value:function(){if(!this._bridge.noConsoleBanner){var e=as.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 n=this;void 0!==this._topDomain&&"undefined"!==this._topDomain||(this._topDomain=void 0);var r={page_url:this._topDomain||this._parentDomain,game_id:this.options.gameId,eventtype:e,ts:Date.now()};fetch("https://ana.headerlift.com/event?".concat(N.stringify(r))).catch(function(e){t(this,n)}.bind(this)),this.adInstance._send_atom_event("hl.config",r),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=c("xanthophyll");e.hasOwnProperty("xanthophyll")&&"true"===e.xanthophyll&&(this._whitelabelPartner=!0,p("White label publisher","".concat(this._whitelabelPartner),"success"))}},{key:"_checkConsole",value:function(){try{if(!m.available)return;"developer.gamedistribution.com"===this._parentDomain?(m.set("gd_debug_ex",!0),m.set("gd_disable_midroll_timer",!0),m.set("gd_tag",!0)):"localhost:3000"===this._parentDomain&&(m.set("gd_debug_ex",!0),m.set("gd_disable_midroll_timer",!0)),m.getBoolean("gd_debug_ex")&&(this.openConsole(),this.msgrt.send("dev.console",{message:this._parentDomain}))}catch(e){}}},{key:"_checkUserDeclinedTracking",value:function(){this._userDeclinedTracking=this._bridge.isCoreSDKMode||document.location.search.indexOf("gdpr-tracking=0")>=0||document.cookie.indexOf("ogdpr_tracking=0")>=0}},{key:"_initializeMessageRouter",value:function(){this.msgrt=new l({gameId:this.options.gameId,hours:(new Date).getHours(),topDomain:this._topDomain,domain:this._parentDomain,referrer:this._parentURL,depth:o(),version:as.version,tracking:this._userDeclinedTracking,whitelabel:this._whitelabelPartner,platform:u(),byloader:this._bridge.isTokenGameURL,isTokenGameURL:this._bridge.isTokenGameURL,isMasterGameURL:this._bridge.isMasterGameURL,isExtHostedGameURL:this._bridge.isExtHostedGameURL,byloaderVersion:this._bridge.version})}},{key:"_loadGamedockTracker",value:function(){var e=this;try{var n=[this._gameData.gmky.url];f(n[0],"GamedockSDK",{alternates:n}).then(function(){var n,r;t(this,e),GR=this._initGamedockTracker(window.GamedockSDK),this._sendGamedockEvent("pageview"),null!==(n=this._gameData.diagnostic)&&void 0!==n&&null!==(r=n.gameDock)&&void 0!==r&&r.adViewEvent&&GR.tracking.enableHeartBeatForPage({pageId:this.options.gameId,pageType:"game"},this._gameData.diagnostic.gameDock.heartbeatConfig),YS.track(GR,this._gameData)}.bind(this)).catch(function(n){t(this,e),this._sendSDKError(n)}.bind(this))}catch(e){}}},{key:"_initGamedockTracker",value:function(e){if(!this._bridge.isCoreSDKMode)return e.initialize("gd",this._parentDomain)}},{key:"_sendGamedockEvent",value:function(e){var t,n;null===(t=GR)||void 0===t||null===(n=t.tracking)||void 0===n||n.trackEvent(e,{pageId:this.options.gameId,pageType:"game"})}},{key:"_loadMiniJuegosGratisTracker",value:function(){var e=this;window.mpConfig={game:this.options.gameId,partner:"game-distribution"};var n=["https://ext.minijuegosgratis.com/external-host/main.js"];console.log("noMinijuegosSDK loading"),f(n[0],"MinijuegosSDK",{alternates:n}).catch(function(n){t(this,e),this._sendSDKError(n)}.bind(this))}},{key:"_loadLocus",value:function(){var n=e(r.mark((function e(){var n,i=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,pA();case 2:if(e.sent){e.next=6;break}return console.log("locus-disabled"),e.abrupt("return");case 6:n=["https://pm.azerioncircle.com/p/locus"],console.log("locus loading"),f(n[0],"locus",{alternates:n}).catch(function(e){t(this,i),this._sendSDKError(e)}.bind(this));case 9:case"end":return e.stop()}}),e,this)})));return function(){return n.apply(this,arguments)}}()},{key:"_loadGoogleAnalytics",value:function(){var e=this,n=["https://www.google-analytics.com/analytics.js"];f(n[0],"gdsdk_google_analytics",{alternates:n,error_prefix:"Blocked:",exists:function(){return t(this,e),window.ga}.bind(this)}).then(function(){t(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(n){t(this,e),this._sendSDKError(n)}.bind(this))}},{key:"_subscribeToEvents",value:function(){var e=this;this.eventBus=new _,A.forEach(function(n){var r=this;return t(this,e),this.eventBus.subscribe(n,function(e){return t(this,r),this._onEvent(e)}.bind(this),"sdk")}.bind(this)),k.forEach(function(n){var r=this;return t(this,e),this.eventBus.subscribe(n,function(e){return t(this,r),this._onEvent(e)}.bind(this),"ima")}.bind(this)),this.eventBus.subscribe("COMPLETE",function(){t(this,e);var n=this._getDeveloperDomains(),r=n.developerDomain,i=n.gameApiDomain;if(r){fetch("https://".concat(i,"/game/v2/hasapi/").concat(this.options.gameId,"?timestamp=").concat((new Date).valueOf()));try{var a=JSON.stringify({type:"GD_SDK_IMPLEMENTED",gameID:this.options.gameId});window.location!==window.top.location?window.top.postMessage(a,"*"):null!==window.opener&&window.opener.location!==window.location&&window.opener.postMessage(a,"*")}catch(e){}}TS()}.bind(this),"ima"),this.eventBus.subscribe("CONTENT_PAUSE_REQUESTED",function(){return t(this,e),this.onPauseGame("New advertisements requested and loaded","success")}.bind(this),"ima"),this.eventBus.subscribe("IMPRESSION",function(n){var r,i;t(this,e),this.msgrt.send("ad.impression"),SS(),null!==(r=this._gameData.diagnostic)&&void 0!==r&&null!==(i=r.gameDock)&&void 0!==i&&i.adViewEvent&&YS.track(GR,this._gameData)}.bind(this),"ima"),this.eventBus.subscribe("AD_ERROR",function(n){t(this,e),this.msgrt.send("ad.error",{message:n.message,details:n.details})}.bind(this),"ima"),this.eventBus.subscribe("AD_SDK_REQUEST",function(n){t(this,e),this._sendAdRequestContext(n.message)}.bind(this),"sdk"),this.eventBus.subscribe("SDK_ERROR",function(n){if(t(this,e),n.message.startsWith("Blocked:")){if(!this._bridge.noBlockerEvent&&(this.msgrt.send("error",{message:n.message}),!this._hasBlocker)){this._hasBlocker=!0;var r=Math.random()<.25;this.msgrt.send("adblck.src",{message:n.message}),r&&this._sendTunnlEvent(3)}}else this.msgrt.send("error",{message:n.message})}.bind(this),"sdk"),this.eventBus.subscribe("AD_REQUEST_KEYS_EMPTY",function(n){t(this,e),this.msgrt.send("tunnl.keys.empty",{message:n.message,details:n.details})}.bind(this),"sdk"),this.eventBus.subscribe("AD_REQUEST_KEYS_FALLBACK",function(n){t(this,e),this.msgrt.send("tunnl.keys.fallback",{message:n.message,details:n.details})}.bind(this),"sdk"),this.eventBus.subscribe("AD_T4R",function(n){return t(this,e),this.msgrt.send("adt4r")}.bind(this),"sdk")}},{key:"_checkGameId",value:function(){this.options.gameId===this._defaults.gameId&&this._sendSDKError("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,t=Xw().config;return"https://".concat(t.gameAPI,"/game/v4/get/").concat(this.options.gameId.replace(/-/g,""),"/?domain=").concat(e,"&v=").concat(as.version,"&localTime=").concat((new Date).getHours())}},{key:"_checkBlocking",value:(U=e(r.mark((function e(){var n,i,a=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=this._gameData,n=void 0===this._gameData.dmain||this._gameData.dmain,(i.bloc_gard&&!0===i.bloc_gard.enabled||!n)&&(this.msgrt.send("blocked"),setTimeout(function(){t(this,a),window.location.href="https://html5.api.gamedistribution.com/blocked.html?".concat(N.stringify({domain:this._parentDomain,id:i.gameId,img:this._get_game_thumbnail_url(),title:i.title}))}.bind(this),100));case 5:case"end":return e.stop()}}),e,this)}))),function(){return U.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(){t(this,e),document.location="https://html5.api.gamedistribution.com/deleted.html"}.bind(this),100))}},{key:"_changeMidrollInDebugMode",value:function(){var e=this._gameData;MS().disableMidrolltimer?e.midroll=0:m.available&&m.getBoolean("gd_debug_ex")&&(m.getBoolean("gd_disable_midroll_timer")?e.midroll=0:e.midroll=this._getDefaultGameData().midroll)}},{key:"_checkSplashAndPromoScreens",value:function(){var e,t,n;this._gameData.loader&&!1===this._gameData.loader.mobile&&this._getisMobile()&&(this._gameData.loader.enabled=!1);var r,i=this._gameData,a=i.gdpr&&!0===i.gdpr.consent,s=i.loader,o=null===(e=i.promo)||void 0===e?void 0:e[null===(t=i.promo)||void 0===t||null===(n=t.template)||void 0===n?void 0:n.preroll];(i.preroll||(this.adRequestTimer=Date.now()),this.options.loader.enabled)?null!=o&&o.enabled?this._createPromoBeforeSplash(i,a):s.enabled&&!0!==(null===(r=s.splash)||void 0===r?void 0:r.skip)?this._createSplash(i,a):this.onResumeGame("Skipped splash.","success"):s.enabled||this._bridge.isTokenGameURL&&this._bridge.isExtHostedGameURL||(this.options.advertisementSettings.autoplay||a?null!=o&&o.enabled?this._createPromoBeforeSplash(i,a):!1!==s.enabled&&this._createSplash(i,a):null!=o&&o.enabled&&this._createPromo(i,a))}},{key:"_initializeVideoAd",value:(L=e(r.mark((function e(){var t;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._bridge.isCoreSDKMode){e.next=2;break}return e.abrupt("return");case 2:return(t=this._gameData).sdk.enabled&&(this.options.advertisementSettings=h(this.options.advertisementSettings,t.sdk)),this.macros=new E({game:t,bridge:this._bridge}),this.adInstance=new qS(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=as,this.adInstance._send_atom_event("gd.location"),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){p("DEVELOPER_ERROR",e.message,"warning")}}},{key:"_sendSDKError",value:function(e){e=e.message?e:{message:e};this.eventBus.broadcast("SDK_ERROR",{message:e.message,status:"error"});try{this.options.onError(e)}catch(e){p("DEVELOPER_ERROR",e.message,"warning")}}},{key:"_onEvent",value:function(e){p(e.name,e.message,e.status);try{this.options.onEvent({name:e.name,message:e.message,status:e.status,skipForward:e.skipForward,adPosition:e.adPosition})}catch(e){p("DEVELOPER_ERROR",e.message,"warning")}}},{key:"_getGameData",value:(C=e(r.mark((function e(){var t;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,cA();case 2:return t=e.sent,this.msgrt.setGameData(t),x(t.diagnostic),e.abrupt("return",t);case 6:case"end":return e.stop()}}),e,this)}))),function(){return C.apply(this,arguments)})},{key:"_createSplash",value:(P=e(r.mark((function e(n,i){var a,s,o,c,d=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._getSplashTemplate(n);case 2:return a=e.sent,s=new a(MR(MR({},this.options),{},{isConsentDomain:i,version:as.version}),n,this._parentDomain),e.next=6,mA();case 6:o=e.sent,c=o.enabled,s.on("playClick",function(){var e,n,r=this;if(t(this,d),i){var a=new Date;a.setDate(a.getDate()+90),document.cookie="ogdpr_tracking=1; expires=".concat(a.toUTCString(),"; path=/")}if(this._hideCMPButton(),c)window.gdsdk.showAd(g.Interstitial,{position:"preroll"}).catch(function(e){t(this,r),s.hide()}.bind(this));else{var o={position:"preroll"};(function(){t(this,r),us.firstAdapterModeAdsense&&(console.log("promo-test, set first adapter to adssense 1"),o.adapter="adsense")}).bind(this),this.showAd(g.Interstitial,o).catch(function(e){t(this,r)}.bind(this))}null!==(e=this._gameData)&&void 0!==e&&null!==(n=e.evnts)&&void 0!==n&&n.enabled&&(dR({event:"FirstInteraction",game:this._gameData}),this._send_gametag_data("first_interaction"))}.bind(this)),this.onPauseGame("Pause the game and wait for a user gesture","success"),this.eventBus.subscribe("SDK_GAME_PAUSE",function(){t(this,d),s.hide()}.bind(this)),this.eventBus.subscribe("SDK_GAME_START",function(){t(this,d),s.hide()}.bind(this));case 12:case"end":return e.stop()}}),e,this)}))),function(e,t){return P.apply(this,arguments)})},{key:"_createPromoBeforeSplash",value:(T=e(r.mark((function e(n,i){var a,s,o,c,d=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this._createPrerollPromoTemplate(n);case 3:o=e.sent,(c=new o(MR(MR({},this.options),{},{isConsentDomain:i,version:as.version,template:null===(a=n.promo)||void 0===a||null===(s=a.template)||void 0===s?void 0:s.preroll}),n)).on("done",function(){t(this,d),c.hide(),this._createSplash(n,i)}.bind(this)),e.next=12;break;case 8:e.prev=8,e.t0=e.catch(0),console.log(e.t0),this._createSplash(n,i);case 12:case"end":return e.stop()}}),e,this,[[0,8]])}))),function(e,t){return T.apply(this,arguments)})},{key:"_createPromo",value:(w=e(r.mark((function e(n,i){var a,s,o,c,d=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this._createPrerollPromoTemplate(n);case 3:o=e.sent,(c=new o(MR(MR({},this.options),{},{isConsentDomain:i,version:as.version,template:null===(a=n.promo)||void 0===a||null===(s=a.template)||void 0===s?void 0:s.preroll}),n)).on("done",function(){t(this,d),c.hide(),this.onResumeGame("Resumed after the promo","warning")}.bind(this)),this.onPauseGame("Pause the game for the promo","success"),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(0),this.onResumeGame("Resumed after the promo","warning");case 12:case"end":return e.stop()}}),e,this,[[0,9]])}))),function(e,t){return w.apply(this,arguments)})},{key:"showBanner",value:function(){var e=this;this.showAd(g.Interstitial).catch(function(){t(this,e)}.bind(this))}},{key:"showAd",value:(y=e(r.mark((function t(n){var i,a=this,s=arguments;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=s.length>1&&void 0!==s[1]?s[1]:{},t.abrupt("return",new Promise(function(){var t=e(r.mark((function e(t,s){var o,c,d,u;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!a._autoResumeIfAdsAreDisabled(n||"interstitial")){e.next=5;break}return e.abrupt("return",t());case 5:return c={adType:n||"interstitial",params:i,adTimestamp:a.adRequestTimer},e.next=9,a.sdkReady;case 9:return d=e.sent,e.next=12,a.videoAdReady;case 12:if(null!==(o=a._gameData.lp)&&void 0!==o&&o.load||a._sendLoadedEvent(),a._sendGamedockGamePlay(),a._rejectAdIfGameBlocked({gameData:d,adRequest:c}),a._rejectAdIfAdDisabled({gameData:d,adRequest:c}),a._rejectAdIfUnsupportedType({adRequest:c}),"rewarded"===n&&a._setGameRewardedFlag(),null!=i&&i.isGift||a._rejectAdIfAdRateHits({gameData:d,adRequest:c}),a.adInstance.attachAfgPosition(c),!a.adFlowRunning){e.next=22;break}return e.abrupt("return",t());case 22:return a.adFlowRunning=!0,u=new yR(a),e.next=26,u.runAdFlow(c);case 26:a.adFlowRunning=!1,t(),a._post_message({topic:"adrequest.instream"}),e.next=36;break;case 31:e.prev=31,e.t0=e.catch(0),a.adFlowRunning=!1,a.onResumeGame(e.t0.message,"warning"),s(e.t0.message);case 36:case"end":return e.stop()}}),e,null,[[0,31]])})));return function(e,n){return t.apply(this,arguments)}}()));case 2:case"end":return t.stop()}}),t)}))),function(e){return y.apply(this,arguments)})},{key:"_autoResumeIfAdsAreDisabled",value:function(e){var t=!1,n=this._gameData.diagnostic.close_ads,r=this._gameData.disableAds[e],i=n||r;return this._gameData.diagnostic,this._gameData.disableAds,i&&(this._runAutoResume(),t=!0),t}},{key:"_runAutoResume",value:function(){var e="CONTENT_PAUSE_REQUESTED",t="CONTENT_RESUME_REQUESTED";this.eventBus.broadcast(e,{name:e,message:"Auto pause when ads are disabled"}),this.eventBus.broadcast(t,{name:t,message:"Auto resume when ads are disabled"}),this.onResumeGame("Advertisement(s) are cancelled. Start / resume the game.","success")}},{key:"_giveGift",value:function(e){var t,n,r,i,a,s,o,c,d,u,l,h,p,f,m;switch(e){case"preroll":null!==(t=this._gameData)&&void 0!==t&&null!==(n=t.gft)&&void 0!==n&&n[e].enabled&&(null===(r=this._gameData)||void 0===r||null===(i=r.gft)||void 0===i||null===(a=i[e].durations[this._giftCount[e]])||void 0===a?void 0:a.after)===this.adInstance.adPrerollCount&&this.decideToGiveAGift(e);break;case"midroll":null!==(s=this._gameData)&&void 0!==s&&null!==(o=s.gft)&&void 0!==o&&o[e].enabled&&(null===(c=this._gameData)||void 0===c||null===(d=c.gft)||void 0===d||null===(u=d[e].durations[this._giftCount[e]])||void 0===u?void 0:u.after)===this.adInstance.adMidrollCount&&this.decideToGiveAGift(e);break;case"rewarded":null!==(l=this._gameData)&&void 0!==l&&null!==(h=l.gft)&&void 0!==h&&h[e].enabled&&(null===(p=this._gameData)||void 0===p||null===(f=p.gft)||void 0===f||null===(m=f[e].durations[this._giftCount[e]])||void 0===m?void 0:m.after)===this.adInstance.adRewardedCount&&this.decideToGiveAGift(e)}}},{key:"_setAdRequestTimer",value:function(){this.adRequestTimer=Date.now()}},{key:"clearSession",value:function(){this.adInstance.clearSession()}},{key:"_attachAfgFallback",value:function(e){var t=e.gameData,n=e.adRequest;if(!t.afg_disabled&&!n.params.hasOwnProperty("fallback_adsense"))switch(n.params.position){case"preroll":case"start":case"next":n.params.fallback_adsense=!0}}},{key:"_rejectAdIfGameBlocked",value:function(e){var t=e.gameData;if(t.bloc_gard&&!0===t.bloc_gard.enabled)throw new Error("Game or domain is blocked.")}},{key:"_rejectAdIfAdDisabled",value:function(e){var t=e.gameData,n=e.adRequest;if(t.disableAds[n.adType]||this._whitelabelPartner)throw new Error("Advertisements are disabled.")}},{key:"_rejectAdIfUnsupportedType",value:function(e){var t=e.adRequest;if(t.adType){if(t.adType!==g.Interstitial&&t.adType!==g.Rewarded)throw new Error("Unsupported an advertisement type: ",t.adType)}else t.adType=g.Interstitial}},{key:"_rejectAdIfRewardedDisabled",value:function(e){var t=e.gameData;if(e.adRequest.adType===g.Rewarded&&!t.rewardedAds)throw new Error("Rewarded ads are disabled.")}},{key:"_rejectAdIfAdRateHits",value:function(e){var t,n,r,i,a,s,o=e.gameData,c=e.adRequest,d=null;c.adType===g.Interstitial&&null!==(t=o.diagnostic)&&void 0!==t&&null!==(n=t.useMidrollIndex)&&void 0!==n&&n.enabled&&this.adInstance.noPreroll?this.adInstance.adMidrollCount>(null===(r=o.diagnostic)||void 0===r||null===(i=r.useMidrollIndex)||void 0===i?void 0:i.indexes.length)-1||(d=6e4*(null===(a=o.diagnostic)||void 0===a||null===(s=a.useMidrollIndex)||void 0===s?void 0:s.indexes[this.adInstance.adMidrollCount])):d=o.midroll;if(c.adType===g.Interstitial&&void 0!==this.adRequestTimer&&Date.now()-this.adRequestTimer<d)throw new Error("The advertisement was requested too soon.")}},{key:"preloadAd",value:(b=e(r.mark((function t(n){var i=this;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise(function(){var t=e(r.mark((function e(t,a){var s,o;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,i.sdkReady;case 3:return s=e.sent,e.next=6,i.videoAdReady;case 6:if(!s.bloc_gard||!0!==s.bloc_gard.enabled){e.next=8;break}throw new Error("Game or domain is blocked.");case 8:if(!s.disableAds[n]&&!i._whitelabelPartner){e.next=10;break}throw new Error("Advertisements are disabled for this ad type => ".concat(n,"..."));case 10:if(n){e.next=14;break}n=g.Rewarded,e.next=16;break;case 14:if(n===g.Interstitial||n===g.Rewarded){e.next=16;break}throw new Error("Unsupported an advertisement type:"+n);case 16:return e.next=18,i.adInstance.preloadAd(n);case 18:o=e.sent,t(o),e.next=25;break;case 22:e.prev=22,e.t0=e.catch(0),a(e.t0);case 25:case"end":return e.stop()}}),e,null,[[0,22]])})));return function(e,n){return t.apply(this,arguments)}}()));case 1:case"end":return t.stop()}}),t)}))),function(e){return b.apply(this,arguments)})},{key:"cancelAd",value:(v=e(r.mark((function t(){var n=this;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise(function(){var t=e(r.mark((function e(t,i){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:try{n.adInstance.cancel(),n.onResumeGame("Advertisement(s) are cancelled. Start / resume the game.","success"),i()}catch(e){n.onResumeGame("Advertisement(s) are cancelled. Start / resume the game.","success"),t(e.message)}case 1:case"end":return e.stop()}}),e)})));return function(e,n){return t.apply(this,arguments)}}()));case 1:case"end":return t.stop()}}),t)}))),function(){return v.apply(this,arguments)})},{key:"showDisplayAd",value:function(t){var n=this;return new Promise(function(){var i=e(r.mark((function e(i,a){var s;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,n.sdkReady;case 3:return s=e.sent,e.next=6,n.videoAdReady;case 6:if(!s.dAds.enabled){e.next=13;break}return e.next=9,n.adInstance.loadDisplayAd(t);case 9:n._post_message({topic:"adrequest.display"}),i(),e.next=14;break;case 13:a("Display-Ads are disabled.");case 14:e.next=19;break;case 16:e.prev=16,e.t0=e.catch(0),a(e.t0.message||e.t0);case 19:case"end":return e.stop()}}),e,null,[[0,16]])})));return function(e,t){return i.apply(this,arguments)}}())}},{key:"onResumeGame",value:function(e,t){var n;this._allowExternals({enabled:!1});try{this.options.resumeGame()}catch(e){console.log("gd-adflow error onResumeGame",e),p("DEVELOPER_ERROR",e.message,"warning")}var r="SDK_GAME_START";this.eventBus.broadcast(r,{name:r,message:e,status:t,analytics:{category:"SDK",action:r,label:this.options.gameId+""}}),this.adInstance&&this.adInstance._hideAddResume(),null===(n=this._gameData.evnts)||void 0===n||!n.enabled||this._isMasterGameURL()&&!this._isExtHostedGameURL()||(dR({event:"GameStarted",game:this._gameData}),this._send_gametag_data("game_started"))}},{key:"onPauseGame",value:function(e,t){var n;this._allowExternals({enabled:!0});try{this.options.pauseGame()}catch(e){p("DEVELOPER_ERROR",e.message,"warning")}var r="SDK_GAME_PAUSE";this.eventBus.broadcast(r,{name:r,message:e,status:t,analytics:{category:"SDK",action:r,label:this.options.gameId+""}}),null===(n=this._gameData.evnts)||void 0===n||!n.enabled||this._isMasterGameURL()&&!this._isExtHostedGameURL()||(dR({event:"GamePaused",game:this._gameData}),this._send_gametag_data("game_paused"))}},{key:"onRewardedWatchComplete",value:function(){this.eventBus.broadcast("SDK_REWARDED_WATCH_COMPLETE",{message:"",status:"success"})}},{key:"onAdError",value:function(e){this.eventBus.broadcast("AD_ERROR",{message:e,status:"error"})}},{key:"openConsole",value:function(){try{new S(this).start(),m.set("gd_debug_ex",!0)}catch(e){console.log(e)}}},{key:"_initBlockingExternals",value:function(){var e=this._gameData;(e.failed||e.block_exts&&e.block_exts.enabled)&&(this.window_open=window.open,this._allowExternals({enabled:!1}),this._removeExternalsInHtml({enabled:!1}))}},{key:"_checkFullscreen",value:function(){var e=this;try{var n=this._gameData;n.sdk.fullscreen&&"auto"===n.sdk.fullscreen&&document.addEventListener("click",function(){if(t(this,e),!this._isFullScreen){var n=document.body,r=n.requestFullScreen||n.webkitRequestFullScreen||n.mozRequestFullScreen||n.msRequestFullscreen;if(r)r.call(n);else if(void 0!==window.ActiveXObject){var i=new ActiveXObject("WScript.Shell");null!==i&&i.SendKeys("{F11}")}this._isFullScreen=!0}}.bind(this))}catch(e){console.log("Fullscreen error handled...",e)}}},{key:"_allowExternals",value:function(e){var n=this;void 0!==this.window_open&&(!1===e.enabled?window.open=function(e){t(this,n),this.msgrt.send("external",{message:"C> ".concat(e)}),(e.startsWith("https://play.google.com")||e.startsWith("https://itunes.apple.com"))&&this.window_open.call(null,e)}.bind(this):window.open=this.window_open)}},{key:"_shouldAllowExternalUrl",value:function(e){var n,r=this,i=new O(e),a=i.host;return i.href,((null===(n=this._gameData.urlBlockExc)||void 0===n?void 0:n.hosts)||[]).some(function(e){return t(this,r),e===a}.bind(this))}},{key:"_removeExternalsInHtml",value:function(e){var n=this;!1===e.enabled&&window.document.querySelectorAll("a").forEach(function(e){var r=this;t(this,n);var i=!!(e.innerText.toLowerCase().includes("start")||e.innerText.toLowerCase().includes("play")||e.innerText.toLowerCase().includes("continue")),a=e.getAttribute("href");if(!this._shouldAllowExternalUrl(a)){var s=e.getAttribute("href");e.removeAttribute("href"),i||(e.onclick=function(e){return t(this,r),e.preventDefault(),this.msgrt.send("external",{message:"H> ".concat(s)}),!1}.bind(this))}}.bind(this))}},{key:"_getBridgeContext",value:function(){var e=this._isTokenGameURL(),t=this._isMasterGameURL(),n=this._isExtHostedGameURL(),r=e||n?this._getTokenGameURLConfig():{};r=r||{};var i=decodeURIComponent((e||n)&&r.parentURL?r.parentURL:a()),c=decodeURIComponent((e||n)&&r.parentDomain?r.parentDomain:s()),u=decodeURIComponent((e||n)&&r.topDomain?r.topDomain:n&&0===o()?c:d()),l=(e||n)&&r.loaderEnabled,h=(e||n)&&r.loaderEnabled,p=(e||n)&&r.loaderEnabled,f=(e||n)&&r.loaderEnabled,m=(e||n)&&r.loaderEnabled,g=(e||n)&&r.loaderEnabled,v=(e||n)&&r.loaderEnabled,b=(e||n)&&r.loaderEnabled,y=(e||n)&&r.loaderEnabled&&r.hasImpression&&r.version>="1.1.24";return{isTokenGameURL:e,isMasterGameURL:t,isExtHostedGameURL:n,noConsoleBanner:l,noLoadedEvent:h,noBlockerEvent:p,noPreroll:b,parentURL:i,parentDomain:c,topDomain:u&&u.length?u:c,noGAPageView:f,noLotamePageView:m,noGamedockSDK:g,noMinijuegosSDK:v,version:r.version,pauseGameOnStartup:y,depth:o(),domainMatched:c===u,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 O(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 O(document.referrer,!0);if(!r.query.gd_zone_config)return;e=r.query.gd_zone_config}else{var i=new O(location.href,!0);if(!i.query.gd_zone_config)return;e=i.query.gd_zone_config}return JSON.parse(I.decode(decodeURIComponent(e)))}catch(e){}}},{key:"_getSplashTemplate",value:function(e){var t=e.splash;return new VS(t).splash()}},{key:"_createPrerollPromoTemplate",value:(i=e(r.mark((function e(t){var n,i,a,s,o;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=null===(n=t.promo)||void 0===n?void 0:n[null===(i=t.promo)||void 0===i||null===(a=i.template)||void 0===a?void 0:a.preroll],o=new FS(s),e.abrupt("return",o.promo());case 3:case"end":return e.stop()}}),e)}))),function(e){return i.apply(this,arguments)})},{key:"_formatTokenURLSearch",value:function(e){var t="";try{t=encodeURIComponent(I.encode(JSON.stringify(e)))}catch(e){}try{var n=new O(location.href,!0);return n.query=n.query||{},n.query.gd_zone_config=t,"?".concat(N.stringify(n.query))}catch(e){return"?gd_zone_config=".concat(t)}}},{key:"_extendUrlQuery",value:function(e,t){var n=new O(e,!0);return n.query=MR(MR({},n.query),t),n.toString()}},{key:"_base64_encode",value:function(e){return I.encode(JSON.stringify(e))}},{key:"session",value:function(){var t=this;return new Promise(function(){var n=e(r.mark((function e(n,i){var a;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t.sdkReady;case 3:e.next=7;break;case 5:e.prev=5,e.t0=e.catch(0);case 7:a=t._gameData,n({ads:{display:{enabled:a.dAds.enabled},rewarded:{enabled:a.rewardedAds}},location:{parentDomain:t._bridge.parentDomain,topDomain:t._bridge.topDomain,parentURL:t._bridge.parentURL,depth:t._bridge.depth,loadedByGameZone:t._bridge.isTokenGameURL}});case 9:case"end":return e.stop()}}),e,null,[[0,5]])})));return function(e,t){return n.apply(this,arguments)}}())}},{key:"sendGenericEvent",value:function(e){console.log("Received generic event",e,this._isMasterGameURL());try{var t,n;if("track-milestone"==e.eventName)GR.tracking.trackEvent("milestoneAchieved",{pageId:this.options.gameId,pageType:"game",isAuthorized:null===(t=e.data)||void 0===t?void 0:t.isAuthorized,milestoneDescription:null===(n=e.data)||void 0===n?void 0:n.milestoneDescription});else if("game_event"==e.eventName)return this._gameEventPostMessage(e)}catch(e){console.log(e.message)}}},{key:"_gameEventPostMessage",value:function(e){if(void 0!==e.data.level&&this._numberValidator(e.data.level))if(void 0!==e.data.score&&this._numberValidator(e.data.score)){var t={type:e.eventName,data:e.data};window.location!==window.top.location&&window.top.postMessage(t,"*")}else console.log("Level data type should be number!");else console.log("Level data type should be number!")}},{key:"_numberValidator",value:function(e){return"number"==typeof e&&/^\d*$/.test(e)}},{key:"_getisMobile",value:function(){var e,t=!1;return e=navigator.userAgent||navigator.vendor||window.opera,(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(e.substr(0,4)))&&(t=!0),!1===t&&window.orientation>-1&&(t=!0),t}},{key:"_get_game_thumbnail_url",value:function(){var e=this,n=this._gameData,r=n.assets.find(function(n){return t(this,e),n.hasOwnProperty("name")&&512===n.width&&512===n.height}.bind(this));return r||(r=n.assets.length>0?n.assets[0]:{name:"logo.svg"}),"https://img.gamedistribution.com/".concat(r.name)}},{key:"_post_message",value:function(e){var t,n=e.topic,r=e.data,i=null!==(t=location.ancestorOrigins)&&void 0!==t&&t.length?location.ancestorOrigins[location.ancestorOrigins.length-1]:"*";try{var a=window.top||window.parent;a&&a.postMessage({source:"gdsdk",topic:n,data:r},i)}catch(e){console.error((null==e?void 0:e.message)||e)}}},{key:"decideToGiveAGift",value:function(n){var i=this;try{var a,s=null===(a=this._gameData)||void 0===a?void 0:a.gft[n],o=setInterval(e(r.mark((function e(){var a=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i.adInstance.requestRunning||i.adFlowRunning?console.log("Advertisement already running..."):(i.showAd(g.Interstitial,{position:n,isGift:!0}).catch(function(e){t(this,a)}.bind(this)),clearInterval(o),i._giftCount[n]++);case 1:case"end":return e.stop()}}),e,this)}))),1e3*s.durations[this._giftCount[n]].wait)}catch(e){console.log("Advertisement Error...")}}},{key:"send_atom_event",value:function(e,t){this.adInstance._send_atom_event(e,t)}},{key:"get_session_id",value:function(){return jR}},{key:"get_ad_system_init_result",value:function(){return{afg:this.adInstance.afgInitSuccess,ima:this.adInstance.imaInitSuccess}}},{key:"_getDeveloperDomains",value:function(){var e,t;return"developer.gamedistribution.com"===this._parentDomain||"developer-acc.gamedistribution.com"===this._parentDomain?e=this._parentDomain:!0===new RegExp("^localhost").test(this._parentDomain)&&(e="localhost"),e&&(t={"developer-acc.gamedistribution.com":"game-api-acc-real-aws.gamedistribution.com","developer.gamedistribution.com":"game.api.gamedistribution.com",localhost:"game-api-acc-real-aws.gamedistribution.com"}[e]),{developerDomain:e,gameApiDomain:t}}},{key:"_setGameRewardedFlag",value:function(){try{var e=this._getDeveloperDomains(),t=e.developerDomain,n=e.gameApiDomain;if(t){fetch("https://".concat(n,"/game/v2/hasrewarded/").concat(this.options.gameId,"?timestamp=").concat((new Date).valueOf()));try{var r=JSON.stringify({type:"GD_SDK_REWARDED_SET",gameID:this.options.gameId});window.location!==window.top.location?window.top.postMessage(r,"*"):null!==window.opener&&window.opener.location!==window.location&&window.opener.postMessage(r,"*")}catch(e){}}}catch(e){}}},{key:"_getGdModeIfExist",value:function(){var e=this,n=new Proxy(new URLSearchParams(window.location.search),{get:function(n,r){return t(this,e),n.get(r)}.bind(this)});return!n.gd_mode&&window.location.search.includes("gd_mode")?window.location.search.split("gd_mode=")[1]:n.gd_mode}},{key:"_executeMidrollPlus",value:function(){var e,n=this;if(null!==(e=this._gameData.midroll_plus)&&void 0!==e&&e.enabled&&this.adInstance.adMidrollCount<=0){var r,i=this._gameData.midroll_plus.type||"midroll";if(null!==(r=this._gameData.midroll_plus)&&void 0!==r&&r.interval)var a=setInterval(function(){var e,r,s=this;(t(this,n),this.adFlowRunning)||(this.showAd(g.Interstitial,{position:"midroll",giftType:i}).catch(function(e){t(this,s)}.bind(this)),this._mplus_count++,"infinite"!==(null===(e=this._gameData.midroll_plus)||void 0===e?void 0:e.interval)&&this._mplus_count===(null===(r=this._gameData.midroll_plus)||void 0===r?void 0:r.interval)&&clearInterval(a))}.bind(this),6e4*this._gameData.midroll_plus.timer);else setTimeout(function(){var e=this;t(this,n),this.showAd(g.Interstitial,{position:"midroll",giftType:i}).catch(function(n){t(this,e)}.bind(this))}.bind(this),this._gameData.midroll)}}}]),n}();function qR(){return(qR=e(r.mark((function e(){var n,i=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,pA();case 2:if(e.sent){e.next=6;break}return console.log("locus-disabled on proxy level"),e.abrupt("return");case 6:n=["https://pm.azerioncircle.com/p/locus"],console.log("locus loading"),f(n[0],"locus",{alternates:n}).catch(function(e){t(this,i),this._sendSDKError(e)}.bind(this));case 9:case"end":return e.stop()}}),e,this)})))).apply(this,arguments)}var FR=new j,VR=function(e){var n=this;!function(){qR.apply(this,arguments)}();var r,i=function(e){var r=this;return t(this,n),new Promise(function(n,i){var a=this;t(this,r);var s=function(e){t(this,a),"SDK_GAME_START"===e.name&&(FR.off("sdk-event",s),n())}.bind(this);FR.on("sdk-event",s),m("showAd",{adType:e})}.bind(this))}.bind(this),a=function(){return t(this,n),r||(r=new NR(e)),r}.bind(this),s=function(e){return t(this,n),i(e)}.bind(this),o=function(e){return t(this,n),"gdsdk://preloaded"}.bind(this),c=function(e){return t(this,n),a().showDisplayAd(e)}.bind(this),d=function(){return t(this,n),m("cancelAd")}.bind(this),u=function(){return t(this,n),m("openConsole")}.bind(this),l=function(){return t(this,n),m("showBanner")}.bind(this),h=function(){return t(this,n),m("session")}.bind(this),p=function(e){return t(this,n),m("sendGenericEvent",{options:e})}.bind(this),f=function(){t(this,n),console.log("_sendSDKReady")}.bind(this),m=function(e,r){var i=this;return t(this,n),r||(r={}),new Promise(function(n,a){t(this,i);try{var s={type:"gd-sdk",method:e,options:r};window.parent.postMessage(s,"*"),n()}catch(e){console.log("gd:adp:m:s:error",e),n()}}.bind(this))}.bind(this),g=function(){t(this,n);window.addEventListener("message",(function(e){var t=e.data;e.origin,e.source;var n=t.type,r=t.event;"gd-sdk-on-event"===n&&r&&b(r)}),!1)}.bind(this),v=function(){t(this,n),g(),m("init")}.bind(this),b=function(r){t(this,n);try{FR.emit("sdk-event",r),e.onEvent&&e.onEvent(r)}catch(e){console.log("DEVELOPER ERROR on forwarder-sdk")}}.bind(this);return{showBanner:l,showAd:s,preloadAd:o,showDisplayAd:c,cancelAd:d,openConsole:u,getSession:h,onEvent:b,init:v,_sendSDKReady:f,sendGenericEvent:p}},zR=function(e){var t=VR(e);return t.init(),t},HR="gd-sdk-frame-handshake-request",WR="gd-sdk-frame-handshake-response",KR=function(e){var n=this;return new Promise(function(r,i){var a=this;t(this,n);var s={type:HR},o=!1;window.addEventListener("message",(function(e){var t=e.data,n=e.origin,i=e.source,a=t.type;if(a===HR){var s={type:WR};i.postMessage(s,n)}else a===WR&&(o=!0,r({origin:n,source:i}))})),e?r():(setTimeout(function(){t(this,a),o||r()}.bind(this),200),window.parent!==window?window.parent.postMessage(s,"*"):r())}.bind(this))},$R=function(){var t=e(r.mark((function e(){var t,n,i,a,s,o,c,d;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,hA();case 2:return t=e.sent,n=!t,e.next=6,KR(n);case 6:if(i=e.sent,t){e.next=9;break}return e.abrupt("return",!1);case 9:return a=wR(),s=a.isMasterGameURL,a.isTokenGameURL,o=s(),e.next=13,fA();case 13:return c=e.sent,d=!1,d=c?!o&&!!i:!o,e.abrupt("return",d);case 17:case"end":return e.stop()}}),e)})));return function(){return t.apply(this,arguments)}}(),QR=Ze,YR=ce,JR=Za,XR=Ki,ZR=YR(qi.f),eD=YR([].push),tD=function(e){return function(t){for(var n,r=XR(t),i=JR(r),a=i.length,s=0,o=[];a>s;)n=i[s++],QR&&!ZR(r,n)||eD(o,e?[n,r[n]]:r[n]);return o}},nD={entries:tD(!0),values:tD(!1)}.values;Ya({target:"Object",stat:!0},{values:function(e){return nD(e)}});var rD,iD={},aD=function(e){try{if(e.skipForward)return;if(iD.source){var t={type:"gd-sdk-on-event",event:e};iD.source.postMessage(t,iD.origin)}}catch(e){console.log("gd-sdk forwardEvent err",e)}},sD=function(){aD({name:"SDK_READY",status:"success",message:"Everything is ready."}),aD({name:"SDK_GAME_START",status:"success",message:"Advertisement(s) are done. Start / resume the game."}),aD({name:"CONTENT_RESUME_REQUESTED",status:"success",message:"Fired when content should be resumed. This usually happens when an ad finishes or collapses."})},oD=function(n){window.addEventListener("message",(function(i){var a=i.data,s=i.origin,o=i.source,c=a.type,d=a.method,u=a.options;if("gd-sdk-self"!==c){if("gd-sdk"===c){if(!iD.source&&"init"===d)return function(e){var t=e.source,n=e.origin;iD={source:t,origin:n}}({source:o,origin:s}),void sD();var l=n[d];l&&e(r.mark((function e(){var i,a=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,function(){t(this,a),"showAd"===d&&us.firstAdapterModeAdsense&&"rewarded"!==u.adType&&(console.log("promo-test, set first adapter to adssense 3"),u.params=u.params?u.params:{},u.params.adapter="adsense")}.bind(this),!(i=l.apply(n,Object.values(u)))||!i.then){e.next=6;break}return e.next=6,i;case 6:e.next=11;break;case 8:e.prev=8,e.t0=e.catch(0),console.log("gd:adp:m:r onFrameMessage error",e.t0);case 11:case"end":return e.stop()}}),e,this,[[0,8]])})))()}}else{var h={type:"gd-sdk",method:d,options:u};window.postMessage(h,location.origin)}}),!1)},cD=function(e){!function(e){var t=e.onEvent;e.onEvent=function(e){aD(e),t.apply(this,arguments)}}(e);var t=new NR(e);return oD(t),t},dD=function(e){try{var t=Kw(e);e.gameId||t.send("nogameid",{message:"".concat(uy.parentURL)})}catch(e){}},uD={create:function(){var t=e(r.mark((function e(t){var n,i;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,dD(t),nA=Kw(iA=t),e.next=5,$R();case 5:return n=e.sent,i=n?zR(t):cD(t),gA(),e.abrupt("return",i);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",cD(t));case 15:case"end":return e.stop()}}),e,null,[[0,11]])})));return function(e){return t.apply(this,arguments)}}()};function lD(){return(lD=e(r.mark((function e(t,n){var i;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,yA();case 2:if(!e.sent){e.next=7;break}e.t0=window.gdsdk,e.next=10;break;case 7:return e.next=9,pD(t);case 9:e.t0=e.sent;case 10:return i=e.t0,e.abrupt("return",n(i));case 12:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var hD=!1;function pD(e){var n=this;return new Promise(function(r,i){var a=this;if(t(this,n),rD)return r(rD);if(hD)var s=setInterval(function(){t(this,a),rD&&(hD=!1,clearInterval(s),r(rD))}.bind(this),100);else hD=!0,uD.create(e).then(function(e){t(this,a),rD=e,e._sendSDKReady(),hD=!1,r(rD)}.bind(this))}.bind(this))}xS();var fD,mD=(pD(fD=function(){var e={};try{"object"===("undefined"==typeof GD_OPTIONS?"undefined":n(GD_OPTIONS))&&GD_OPTIONS?e=GD_OPTIONS:window.gdApi&&"object"===n(window.gdApi.q[0][0])&&window.gdApi.q[0][0]&&((e=window.gdApi.q[0][0]).hasOwnProperty("advertisementSettings")||(e.advertisementSettings={autoplay:!0}))}catch(e){console.log("_get_developer_sets failed",e)}return e}()),{invoke:function(e){return function(e,t){return lD.apply(this,arguments)}(fD,e)}});function gD(){var n=this;this.AdType=g,this.preloadAd=function(e){var n=this;return mD.invoke(function(r){return t(this,n),r.preloadAd(e)}.bind(this))},this.showAd=function(){var n=e(r.mark((function e(n,i){var a=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",mD.invoke(function(e){var r=this;if(t(this,a),n===g.Display)return e.showDisplayAd(i);var s={};return function(){t(this,r),us.firstAdapterModeAdsense&&(console.log("promo-test, set first adapter to adssense 2"),s.adapter="adsense")}.bind(this),e.showAd(n,s)}.bind(this)));case 1:case"end":return e.stop()}}),e,this)})));return function(e,t){return n.apply(this,arguments)}}(),this.cancelAd=function(){var e=this;return mD.invoke(function(n){return t(this,e),n.cancelAd()}.bind(this))},this.openConsole=function(){var e=this;return mD.invoke(function(n){return t(this,e),n.openConsole()}.bind(this))},this.getSession=function(){var e=this;return mD.invoke(function(n){return t(this,e),n.session()}.bind(this))},this.sendEvent=function(e){var n=this;return mD.invoke(function(r){return t(this,n),r.sendGenericEvent(e)}.bind(this))},this.leaderboard={show:function(){t(this,n),Yv.showLeaderboard()}.bind(this),addScore:function(e){t(this,n),Yv.addScore(e)}.bind(this)}}gD.prototype=new function(){this.showBanner=function(){var e=this;return mD.invoke(function(n){return t(this,e),n.showBanner()}.bind(this))},this.play=function(){},this.customLog=function(){}},window.gdsdk=new gD,window.gdApi=window.gdsdk;
1
+ import e from"@babel/runtime/helpers/asyncToGenerator";import t from"@babel/runtime/helpers/newArrowCheck";import n from"@babel/runtime/helpers/typeof";import r from"@babel/runtime/regenerator";import{parseJSON as i,getParentUrl as a,getParentDomain as s,getIframeDepth as o,getQueryParams as c,getTopDomain as d,getMobilePlatform as u,MessageRouter as l,extendDefaults as h,dankLog as p,getScript as f,Ls as m,AdType as g,Layers as v,getKeyByValue as b,getQueryString as y,EventBus as _,getIMASampleTags as w,SDKEvents as A,IMAEvents as k,Macros as E,setDankLog as x,ImplementationTest as S}from"@bygd/gd-sdk-era/dist/default";import R from"@babel/runtime/helpers/createClass";import D from"@babel/runtime/helpers/classCallCheck";import T from"@babel/runtime/helpers/defineProperty";import O from"url-parse";import{Base64 as I}from"js-base64";import P from"validator";import C from"is-valid-domain";import L from"get-value";import U from"set-value";import M from"lodash.clonedeep";import{EventEmitter as j}from"events";import B from"can-autoplay";import{isPlainObject as G}from"is-plain-object";import N from"querystringify";import q from"lodash.merge";import{v4 as F}from"uuid";var V="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},z=function(e){return e&&e.Math==Math&&e},H=z("object"==typeof globalThis&&globalThis)||z("object"==typeof window&&window)||z("object"==typeof self&&self)||z("object"==typeof V&&V)||function(){return this}()||Function("return this")(),W={exports:{}},K=H,$=Object.defineProperty,Q=function(e,t){try{$(K,e,{value:t,configurable:!0,writable:!0})}catch(n){K[e]=t}return t},Y=Q,J="__core-js_shared__",X=H[J]||Y(J,{}),Z=X;(W.exports=function(e,t){return Z[e]||(Z[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.30.1",mode:"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.30.1/LICENSE",source:"https://github.com/zloirock/core-js"});var ee,te,ne=function(e){try{return!!e()}catch(e){return!0}},re=!ne((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),ie=re,ae=Function.prototype,se=ae.call,oe=ie&&ae.bind.bind(se,se),ce=ie?oe:function(e){return function(){return se.apply(e,arguments)}},de=function(e){return null==e},ue=de,le=TypeError,he=function(e){if(ue(e))throw le("Can't call method on "+e);return e},pe=he,fe=Object,me=function(e){return fe(pe(e))},ge=me,ve=ce({}.hasOwnProperty),be=Object.hasOwn||function(e,t){return ve(ge(e),t)},ye=ce,_e=0,we=Math.random(),Ae=ye(1..toString),ke=function(e){return"Symbol("+(void 0===e?"":e)+")_"+Ae(++_e+we,36)},Ee="undefined"!=typeof navigator&&String(navigator.userAgent)||"",xe=H,Se=Ee,Re=xe.process,De=xe.Deno,Te=Re&&Re.versions||De&&De.version,Oe=Te&&Te.v8;Oe&&(te=(ee=Oe.split("."))[0]>0&&ee[0]<4?1:+(ee[0]+ee[1])),!te&&Se&&(!(ee=Se.match(/Edge\/(\d+)/))||ee[1]>=74)&&(ee=Se.match(/Chrome\/(\d+)/))&&(te=+ee[1]);var Ie=te,Pe=Ie,Ce=ne,Le=!!Object.getOwnPropertySymbols&&!Ce((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Pe&&Pe<41})),Ue=Le&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Me=H,je=W.exports,Be=be,Ge=ke,Ne=Le,qe=Ue,Fe=Me.Symbol,Ve=je("wks"),ze=qe?Fe.for||Fe:Fe&&Fe.withoutSetter||Ge,He=function(e){return Be(Ve,e)||(Ve[e]=Ne&&Be(Fe,e)?Fe[e]:ze("Symbol."+e)),Ve[e]},We={};We[He("toStringTag")]="z";var Ke="[object z]"===String(We),$e="object"==typeof document&&document.all,Qe={all:$e,IS_HTMLDDA:void 0===$e&&void 0!==$e},Ye=Qe.all,Je=Qe.IS_HTMLDDA?function(e){return"function"==typeof e||e===Ye}:function(e){return"function"==typeof e},Xe={},Ze=!ne((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),et=Je,tt=Qe.all,nt=Qe.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:et(e)||e===tt}:function(e){return"object"==typeof e?null!==e:et(e)},rt=nt,it=H.document,at=rt(it)&&rt(it.createElement),st=function(e){return at?it.createElement(e):{}},ot=st,ct=!Ze&&!ne((function(){return 7!=Object.defineProperty(ot("div"),"a",{get:function(){return 7}}).a})),dt=Ze&&ne((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),ut=nt,lt=String,ht=TypeError,pt=function(e){if(ut(e))return e;throw ht(lt(e)+" is not an object")},ft=re,mt=Function.prototype.call,gt=ft?mt.bind(mt):function(){return mt.apply(mt,arguments)},vt=H,bt=Je,yt=function(e,t){return arguments.length<2?(n=vt[e],bt(n)?n:void 0):vt[e]&&vt[e][t];var n},_t=ce({}.isPrototypeOf),wt=yt,At=Je,kt=_t,Et=Object,xt=Ue?function(e){return"symbol"==typeof e}:function(e){var t=wt("Symbol");return At(t)&&kt(t.prototype,Et(e))},St=String,Rt=function(e){try{return St(e)}catch(e){return"Object"}},Dt=Je,Tt=Rt,Ot=TypeError,It=function(e){if(Dt(e))return e;throw Ot(Tt(e)+" is not a function")},Pt=It,Ct=de,Lt=function(e,t){var n=e[t];return Ct(n)?void 0:Pt(n)},Ut=gt,Mt=Je,jt=nt,Bt=TypeError,Gt=gt,Nt=nt,qt=xt,Ft=Lt,Vt=function(e,t){var n,r;if("string"===t&&Mt(n=e.toString)&&!jt(r=Ut(n,e)))return r;if(Mt(n=e.valueOf)&&!jt(r=Ut(n,e)))return r;if("string"!==t&&Mt(n=e.toString)&&!jt(r=Ut(n,e)))return r;throw Bt("Can't convert object to primitive value")},zt=TypeError,Ht=He("toPrimitive"),Wt=function(e,t){if(!Nt(e)||qt(e))return e;var n,r=Ft(e,Ht);if(r){if(void 0===t&&(t="default"),n=Gt(r,e,t),!Nt(n)||qt(n))return n;throw zt("Can't convert object to primitive value")}return void 0===t&&(t="number"),Vt(e,t)},Kt=xt,$t=function(e){var t=Wt(e,"string");return Kt(t)?t:t+""},Qt=Ze,Yt=ct,Jt=dt,Xt=pt,Zt=$t,en=TypeError,tn=Object.defineProperty,nn=Object.getOwnPropertyDescriptor,rn="enumerable",an="configurable",sn="writable";Xe.f=Qt?Jt?function(e,t,n){if(Xt(e),t=Zt(t),Xt(n),"function"==typeof e&&"prototype"===t&&"value"in n&&sn in n&&!n[sn]){var r=nn(e,t);r&&r[sn]&&(e[t]=n.value,n={configurable:an in n?n[an]:r[an],enumerable:rn in n?n[rn]:r[rn],writable:!1})}return tn(e,t,n)}:tn:function(e,t,n){if(Xt(e),t=Zt(t),Xt(n),Yt)try{return tn(e,t,n)}catch(e){}if("get"in n||"set"in n)throw en("Accessors not supported");return"value"in n&&(e[t]=n.value),e};var on={exports:{}},cn=Ze,dn=be,un=Function.prototype,ln=cn&&Object.getOwnPropertyDescriptor,hn=dn(un,"name"),pn={EXISTS:hn,PROPER:hn&&"something"===function(){}.name,CONFIGURABLE:hn&&(!cn||cn&&ln(un,"name").configurable)},fn=Je,mn=X,gn=ce(Function.toString);fn(mn.inspectSource)||(mn.inspectSource=function(e){return gn(e)});var vn,bn,yn,_n=mn.inspectSource,wn=Je,An=H.WeakMap,kn=wn(An)&&/native code/.test(String(An)),En=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},xn=Xe,Sn=En,Rn=Ze?function(e,t,n){return xn.f(e,t,Sn(1,n))}:function(e,t,n){return e[t]=n,e},Dn=W.exports,Tn=ke,On=Dn("keys"),In=function(e){return On[e]||(On[e]=Tn(e))},Pn={},Cn=kn,Ln=H,Un=nt,Mn=Rn,jn=be,Bn=X,Gn=In,Nn=Pn,qn="Object already initialized",Fn=Ln.TypeError,Vn=Ln.WeakMap;if(Cn||Bn.state){var zn=Bn.state||(Bn.state=new Vn);zn.get=zn.get,zn.has=zn.has,zn.set=zn.set,vn=function(e,t){if(zn.has(e))throw Fn(qn);return t.facade=e,zn.set(e,t),t},bn=function(e){return zn.get(e)||{}},yn=function(e){return zn.has(e)}}else{var Hn=Gn("state");Nn[Hn]=!0,vn=function(e,t){if(jn(e,Hn))throw Fn(qn);return t.facade=e,Mn(e,Hn,t),t},bn=function(e){return jn(e,Hn)?e[Hn]:{}},yn=function(e){return jn(e,Hn)}}var Wn={set:vn,get:bn,has:yn,enforce:function(e){return yn(e)?bn(e):vn(e,{})},getterFor:function(e){return function(t){var n;if(!Un(t)||(n=bn(t)).type!==e)throw Fn("Incompatible receiver, "+e+" required");return n}}},Kn=ce,$n=ne,Qn=Je,Yn=be,Jn=Ze,Xn=pn.CONFIGURABLE,Zn=_n,er=Wn.enforce,tr=Wn.get,nr=String,rr=Object.defineProperty,ir=Kn("".slice),ar=Kn("".replace),sr=Kn([].join),or=Jn&&!$n((function(){return 8!==rr((function(){}),"length",{value:8}).length})),cr=String(String).split("String"),dr=on.exports=function(e,t,n){"Symbol("===ir(nr(t),0,7)&&(t="["+ar(nr(t),/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!Yn(e,"name")||Xn&&e.name!==t)&&(Jn?rr(e,"name",{value:t,configurable:!0}):e.name=t),or&&n&&Yn(n,"arity")&&e.length!==n.arity&&rr(e,"length",{value:n.arity});try{n&&Yn(n,"constructor")&&n.constructor?Jn&&rr(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var r=er(e);return Yn(r,"source")||(r.source=sr(cr,"string"==typeof t?t:"")),e};Function.prototype.toString=dr((function(){return Qn(this)&&tr(this).source||Zn(this)}),"toString");var ur=Je,lr=Xe,hr=on.exports,pr=Q,fr=function(e,t,n,r){r||(r={});var i=r.enumerable,a=void 0!==r.name?r.name:t;if(ur(n)&&hr(n,a,r),r.global)i?e[t]=n:pr(t,n);else{try{r.unsafe?e[t]&&(i=!0):delete e[t]}catch(e){}i?e[t]=n:lr.f(e,t,{value:n,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return e},mr=ce,gr=mr({}.toString),vr=mr("".slice),br=function(e){return vr(gr(e),8,-1)},yr=Ke,_r=Je,wr=br,Ar=He("toStringTag"),kr=Object,Er="Arguments"==wr(function(){return arguments}()),xr=yr?wr: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=kr(e),Ar))?n:Er?wr(t):"Object"==(r=wr(t))&&_r(t.callee)?"Arguments":r},Sr=xr,Rr=Ke?{}.toString:function(){return"[object "+Sr(this)+"]"};Ke||fr(Object.prototype,"toString",Rr,{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},Tr=st("span").classList,Or=Tr&&Tr.constructor&&Tr.constructor.prototype,Ir=Or===Object.prototype?void 0:Or,Pr=br,Cr=ce,Lr=function(e){if("Function"===Pr(e))return Cr(e)},Ur=It,Mr=re,jr=Lr(Lr.bind),Br=function(e,t){return Ur(e),void 0===t?e:Mr?jr(e,t):function(){return e.apply(t,arguments)}},Gr=ne,Nr=br,qr=Object,Fr=ce("".split),Vr=Gr((function(){return!qr("z").propertyIsEnumerable(0)}))?function(e){return"String"==Nr(e)?Fr(e,""):qr(e)}:qr,zr=Math.ceil,Hr=Math.floor,Wr=Math.trunc||function(e){var t=+e;return(t>0?Hr:zr)(t)},Kr=function(e){var t=+e;return t!=t||0===t?0:Wr(t)},$r=Kr,Qr=Math.min,Yr=function(e){return e>0?Qr($r(e),9007199254740991):0},Jr=Yr,Xr=function(e){return Jr(e.length)},Zr=br,ei=Array.isArray||function(e){return"Array"==Zr(e)},ti=ce,ni=ne,ri=Je,ii=xr,ai=_n,si=function(){},oi=[],ci=yt("Reflect","construct"),di=/^\s*(?:class|function)\b/,ui=ti(di.exec),li=!di.exec(si),hi=function(e){if(!ri(e))return!1;try{return ci(si,oi,e),!0}catch(e){return!1}},pi=function(e){if(!ri(e))return!1;switch(ii(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return li||!!ui(di,ai(e))}catch(e){return!0}};pi.sham=!0;var fi=!ci||ni((function(){var e;return hi(hi.call)||!hi(Object)||!hi((function(){e=!0}))||e}))?pi:hi,mi=ei,gi=fi,vi=nt,bi=He("species"),yi=Array,_i=function(e){var t;return mi(e)&&(t=e.constructor,(gi(t)&&(t===yi||mi(t.prototype))||vi(t)&&null===(t=t[bi]))&&(t=void 0)),void 0===t?yi:t},wi=function(e,t){return new(_i(e))(0===t?0:t)},Ai=Br,ki=Vr,Ei=me,xi=Xr,Si=wi,Ri=ce([].push),Di=function(e){var t=1==e,n=2==e,r=3==e,i=4==e,a=6==e,s=7==e,o=5==e||a;return function(c,d,u,l){for(var h,p,f=Ei(c),m=ki(f),g=Ai(d,u),v=xi(m),b=0,y=l||Si,_=t?y(c,v):n||s?y(c,0):void 0;v>b;b++)if((o||b in m)&&(p=g(h=m[b],b,f),e))if(t)_[b]=p;else if(p)switch(e){case 3:return!0;case 5:return h;case 6:return b;case 2:Ri(_,h)}else switch(e){case 4:return!1;case 7:Ri(_,h)}return a?-1:r||i?i:_}},Ti={forEach:Di(0),map:Di(1),filter:Di(2),some:Di(3),every:Di(4),find:Di(5),findIndex:Di(6),filterReject:Di(7)},Oi=ne,Ii=function(e,t){var n=[][e];return!!n&&Oi((function(){n.call(null,t||function(){return 1},1)}))},Pi=Ti.forEach,Ci=H,Li=Dr,Ui=Ir,Mi=Ii("forEach")?[].forEach:function(e){return Pi(this,e,arguments.length>1?arguments[1]:void 0)},ji=Rn,Bi=function(e){if(e&&e.forEach!==Mi)try{ji(e,"forEach",Mi)}catch(t){e.forEach=Mi}};for(var Gi in Li)Li[Gi]&&Bi(Ci[Gi]&&Ci[Gi].prototype);Bi(Ui);var Ni={},qi={},Fi={}.propertyIsEnumerable,Vi=Object.getOwnPropertyDescriptor,zi=Vi&&!Fi.call({1:2},1);qi.f=zi?function(e){var t=Vi(this,e);return!!t&&t.enumerable}:Fi;var Hi=Vr,Wi=he,Ki=function(e){return Hi(Wi(e))},$i=Ze,Qi=gt,Yi=qi,Ji=En,Xi=Ki,Zi=$t,ea=be,ta=ct,na=Object.getOwnPropertyDescriptor;Ni.f=$i?na:function(e,t){if(e=Xi(e),t=Zi(t),ta)try{return na(e,t)}catch(e){}if(ea(e,t))return Ji(!Qi(Yi.f,e,t),e[t])};var ra={},ia=Kr,aa=Math.max,sa=Math.min,oa=function(e,t){var n=ia(e);return n<0?aa(n+t,0):sa(n,t)},ca=Ki,da=oa,ua=Xr,la=function(e){return function(t,n,r){var i,a=ca(t),s=ua(a),o=da(r,s);if(e&&n!=n){for(;s>o;)if((i=a[o++])!=i)return!0}else for(;s>o;o++)if((e||o in a)&&a[o]===n)return e||o||0;return!e&&-1}},ha={includes:la(!0),indexOf:la(!1)},pa=be,fa=Ki,ma=ha.indexOf,ga=Pn,va=ce([].push),ba=function(e,t){var n,r=fa(e),i=0,a=[];for(n in r)!pa(ga,n)&&pa(r,n)&&va(a,n);for(;t.length>i;)pa(r,n=t[i++])&&(~ma(a,n)||va(a,n));return a},ya=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],_a=ba,wa=ya.concat("length","prototype");ra.f=Object.getOwnPropertyNames||function(e){return _a(e,wa)};var Aa={};Aa.f=Object.getOwnPropertySymbols;var ka=yt,Ea=ra,xa=Aa,Sa=pt,Ra=ce([].concat),Da=ka("Reflect","ownKeys")||function(e){var t=Ea.f(Sa(e)),n=xa.f;return n?Ra(t,n(e)):t},Ta=be,Oa=Da,Ia=Ni,Pa=Xe,Ca=function(e,t,n){for(var r=Oa(t),i=Pa.f,a=Ia.f,s=0;s<r.length;s++){var o=r[s];Ta(e,o)||n&&Ta(n,o)||i(e,o,a(t,o))}},La=ne,Ua=Je,Ma=/#|\.prototype\./,ja=function(e,t){var n=Ga[Ba(e)];return n==qa||n!=Na&&(Ua(t)?La(t):!!t)},Ba=ja.normalize=function(e){return String(e).replace(Ma,".").toLowerCase()},Ga=ja.data={},Na=ja.NATIVE="N",qa=ja.POLYFILL="P",Fa=ja,Va=H,za=Ni.f,Ha=Rn,Wa=fr,Ka=Q,$a=Ca,Qa=Fa,Ya=function(e,t){var n,r,i,a,s,o=e.target,c=e.global,d=e.stat;if(n=c?Va:d?Va[o]||Ka(o,{}):(Va[o]||{}).prototype)for(r in t){if(a=t[r],i=e.dontCallGetSet?(s=za(n,r))&&s.value:n[r],!Qa(c?r:o+(d?".":"#")+r,e.forced)&&void 0!==i){if(typeof a==typeof i)continue;$a(a,i)}(e.sham||i&&i.sham)&&Ha(a,"sham",!0),Wa(n,r,a,e)}},Ja=ba,Xa=ya,Za=Object.keys||function(e){return Ja(e,Xa)},es=me,ts=Za;Ya({target:"Object",stat:!0,forced:ne((function(){ts(1)}))},{keys:function(e){return ts(es(e))}});var ns=Array.isArray,rs=Object.prototype.toString,is=ns||function(e){return!!e&&"[object Array]"==rs.call(e)},as={name:"@bygd/gd-sdk-pes",version:"1.35.2",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"}},ss=function(e){var t=os("object"===n(e)?e:i(e));return t&&t.version?as.version>=t.version?t:void 0:t},os=function(e){var n=this;if(!is(e)||0===e.length)return e;if(1===e.length)return e[0];var r=0;e.forEach(function(e){t(this,n),e.weight=e.weight||1,r+=e.weight}.bind(this));var i=Math.floor(Math.random()*Math.floor(r));r=0;for(var a=0;a<e.length;a++){var s=e[a];if(i<(r+=s.weight))return s}},cs=function(){var e;(e=console).log.apply(e,arguments)},ds=function(){var e;(e=console).log.apply(e,arguments)};JSON.stringify({adapters:{default:["ima","adsense","ima","adsense"],preroll:["ima","adsense","ima","adsense"],midroll:["ima","adsense","ima","adsense"],rewarded:["ima","adsense","ima","adsense"]}}),JSON.stringify({adapters:{default:["ima","adsense","ima","adsense"],preroll:["ima","adsense","ima"],midroll:["ima","adsense","ima"],rewarded:["ima","adsense","ima","adsense"]}});var us={},ls=xr,hs=String,ps=function(e){if("Symbol"===ls(e))throw TypeError("Cannot convert a Symbol value to a string");return hs(e)},fs={},ms=Ze,gs=dt,vs=Xe,bs=pt,ys=Ki,_s=Za;fs.f=ms&&!gs?Object.defineProperties:function(e,t){bs(e);for(var n,r=ys(t),i=_s(t),a=i.length,s=0;a>s;)vs.f(e,n=i[s++],r[n]);return e};var ws,As=yt("document","documentElement"),ks=pt,Es=fs,xs=ya,Ss=Pn,Rs=As,Ds=st,Ts="prototype",Os="script",Is=In("IE_PROTO"),Ps=function(){},Cs=function(e){return"<"+Os+">"+e+"</"+Os+">"},Ls=function(e){e.write(Cs("")),e.close();var t=e.parentWindow.Object;return e=null,t},Us=function(){try{ws=new ActiveXObject("htmlfile")}catch(e){}var e,t,n;Us="undefined"!=typeof document?document.domain&&ws?Ls(ws):(t=Ds("iframe"),n="java"+Os+":",t.style.display="none",Rs.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(Cs("document.F=Object")),e.close(),e.F):Ls(ws);for(var r=xs.length;r--;)delete Us[Ts][xs[r]];return Us()};Ss[Is]=!0;var Ms=Object.create||function(e,t){var n;return null!==e?(Ps[Ts]=ks(e),n=new Ps,Ps[Ts]=null,n[Is]=e):n=Us(),void 0===t?n:Es.f(n,t)},js={},Bs=$t,Gs=Xe,Ns=En,Fs=function(e,t,n){var r=Bs(t);r in e?Gs.f(e,r,Ns(0,n)):e[r]=n},Vs=oa,zs=Xr,Hs=Fs,Ws=Array,Ks=Math.max,$s=function(e,t,n){for(var r=zs(e),i=Vs(t,r),a=Vs(void 0===n?r:n,r),s=Ws(Ks(a-i,0)),o=0;i<a;i++,o++)Hs(s,o,e[i]);return s.length=o,s},Qs=br,Ys=Ki,Js=ra.f,Xs=$s,Zs="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];js.f=function(e){return Zs&&"Window"==Qs(e)?function(e){try{return Js(e)}catch(e){return Xs(Zs)}}(e):Js(Ys(e))};var eo=on.exports,to=Xe,no=function(e,t,n){return n.get&&eo(n.get,t,{getter:!0}),n.set&&eo(n.set,t,{setter:!0}),to.f(e,t,n)},ro={},io=He;ro.f=io;var ao=H,so=be,oo=ro,co=Xe.f,uo=function(e){var t=ao.Symbol||(ao.Symbol={});so(t,e)||co(t,e,{value:oo.f(e)})},lo=gt,ho=yt,po=He,fo=fr,mo=Xe.f,go=be,vo=He("toStringTag"),bo=function(e,t,n){e&&!n&&(e=e.prototype),e&&!go(e,vo)&&mo(e,vo,{configurable:!0,value:t})},yo=Ya,_o=H,wo=gt,Ao=ce,ko=Ze,Eo=Le,xo=ne,So=be,Ro=_t,Do=pt,To=Ki,Oo=$t,Io=ps,Po=En,Co=Ms,Lo=Za,Uo=ra,Mo=js,jo=Aa,Bo=Ni,Go=Xe,No=fs,qo=qi,Fo=fr,Vo=no,zo=W.exports,Ho=Pn,Wo=ke,Ko=He,$o=ro,Qo=uo,Yo=function(){var e=ho("Symbol"),t=e&&e.prototype,n=t&&t.valueOf,r=po("toPrimitive");t&&!t[r]&&fo(t,r,(function(e){return lo(n,this)}),{arity:1})},Jo=bo,Xo=Wn,Zo=Ti.forEach,ec=In("hidden"),tc="Symbol",nc="prototype",rc=Xo.set,ic=Xo.getterFor(tc),ac=Object[nc],sc=_o.Symbol,oc=sc&&sc[nc],cc=_o.TypeError,dc=_o.QObject,uc=Bo.f,lc=Go.f,hc=Mo.f,pc=qo.f,fc=Ao([].push),mc=zo("symbols"),gc=zo("op-symbols"),vc=zo("wks"),bc=!dc||!dc[nc]||!dc[nc].findChild,yc=ko&&xo((function(){return 7!=Co(lc({},"a",{get:function(){return lc(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=uc(ac,t);r&&delete ac[t],lc(e,t,n),r&&e!==ac&&lc(ac,t,r)}:lc,_c=function(e,t){var n=mc[e]=Co(oc);return rc(n,{type:tc,tag:e,description:t}),ko||(n.description=t),n},wc=function(e,t,n){e===ac&&wc(gc,t,n),Do(e);var r=Oo(t);return Do(n),So(mc,r)?(n.enumerable?(So(e,ec)&&e[ec][r]&&(e[ec][r]=!1),n=Co(n,{enumerable:Po(0,!1)})):(So(e,ec)||lc(e,ec,Po(1,{})),e[ec][r]=!0),yc(e,r,n)):lc(e,r,n)},Ac=function(e,t){Do(e);var n=To(t),r=Lo(n).concat(Sc(n));return Zo(r,(function(t){ko&&!wo(kc,n,t)||wc(e,t,n[t])})),e},kc=function(e){var t=Oo(e),n=wo(pc,this,t);return!(this===ac&&So(mc,t)&&!So(gc,t))&&(!(n||!So(this,t)||!So(mc,t)||So(this,ec)&&this[ec][t])||n)},Ec=function(e,t){var n=To(e),r=Oo(t);if(n!==ac||!So(mc,r)||So(gc,r)){var i=uc(n,r);return!i||!So(mc,r)||So(n,ec)&&n[ec][r]||(i.enumerable=!0),i}},xc=function(e){var t=hc(To(e)),n=[];return Zo(t,(function(e){So(mc,e)||So(Ho,e)||fc(n,e)})),n},Sc=function(e){var t=e===ac,n=hc(t?gc:To(e)),r=[];return Zo(n,(function(e){!So(mc,e)||t&&!So(ac,e)||fc(r,mc[e])})),r};Eo||(Fo(oc=(sc=function(){if(Ro(oc,this))throw cc("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?Io(arguments[0]):void 0,t=Wo(e),n=function(e){this===ac&&wo(n,gc,e),So(this,ec)&&So(this[ec],t)&&(this[ec][t]=!1),yc(this,t,Po(1,e))};return ko&&bc&&yc(ac,t,{configurable:!0,set:n}),_c(t,e)})[nc],"toString",(function(){return ic(this).tag})),Fo(sc,"withoutSetter",(function(e){return _c(Wo(e),e)})),qo.f=kc,Go.f=wc,No.f=Ac,Bo.f=Ec,Uo.f=Mo.f=xc,jo.f=Sc,$o.f=function(e){return _c(Ko(e),e)},ko&&(Vo(oc,"description",{configurable:!0,get:function(){return ic(this).description}}),Fo(ac,"propertyIsEnumerable",kc,{unsafe:!0}))),yo({global:!0,constructor:!0,wrap:!0,forced:!Eo,sham:!Eo},{Symbol:sc}),Zo(Lo(vc),(function(e){Qo(e)})),yo({target:tc,stat:!0,forced:!Eo},{useSetter:function(){bc=!0},useSimple:function(){bc=!1}}),yo({target:"Object",stat:!0,forced:!Eo,sham:!ko},{create:function(e,t){return void 0===t?Co(e):Ac(Co(e),t)},defineProperty:wc,defineProperties:Ac,getOwnPropertyDescriptor:Ec}),yo({target:"Object",stat:!0,forced:!Eo},{getOwnPropertyNames:xc}),Yo(),Jo(sc,tc),Ho[ec]=!0;var Rc=Le&&!!Symbol.for&&!!Symbol.keyFor,Dc=Ya,Tc=yt,Oc=be,Ic=ps,Pc=W.exports,Cc=Rc,Lc=Pc("string-to-symbol-registry"),Uc=Pc("symbol-to-string-registry");Dc({target:"Symbol",stat:!0,forced:!Cc},{for:function(e){var t=Ic(e);if(Oc(Lc,t))return Lc[t];var n=Tc("Symbol")(t);return Lc[t]=n,Uc[n]=t,n}});var Mc=Ya,jc=be,Bc=xt,Gc=Rt,Nc=Rc,qc=(0,W.exports)("symbol-to-string-registry");Mc({target:"Symbol",stat:!0,forced:!Nc},{keyFor:function(e){if(!Bc(e))throw TypeError(Gc(e)+" is not a symbol");if(jc(qc,e))return qc[e]}});var Fc=re,Vc=Function.prototype,zc=Vc.apply,Hc=Vc.call,Wc="object"==typeof Reflect&&Reflect.apply||(Fc?Hc.bind(zc):function(){return Hc.apply(zc,arguments)}),Kc=ce([].slice),$c=ei,Qc=Je,Yc=br,Jc=ps,Xc=ce([].push),Zc=Ya,ed=yt,td=Wc,nd=gt,rd=ce,id=ne,ad=Je,sd=xt,od=Kc,cd=function(e){if(Qc(e))return e;if($c(e)){for(var t=e.length,n=[],r=0;r<t;r++){var i=e[r];"string"==typeof i?Xc(n,i):"number"!=typeof i&&"Number"!=Yc(i)&&"String"!=Yc(i)||Xc(n,Jc(i))}var a=n.length,s=!0;return function(e,t){if(s)return s=!1,t;if($c(this))return t;for(var r=0;r<a;r++)if(n[r]===e)return t}}},dd=Le,ud=String,ld=ed("JSON","stringify"),hd=rd(/./.exec),pd=rd("".charAt),fd=rd("".charCodeAt),md=rd("".replace),gd=rd(1..toString),vd=/[\uD800-\uDFFF]/g,bd=/^[\uD800-\uDBFF]$/,yd=/^[\uDC00-\uDFFF]$/,_d=!dd||id((function(){var e=ed("Symbol")();return"[null]"!=ld([e])||"{}"!=ld({a:e})||"{}"!=ld(Object(e))})),wd=id((function(){return'"\\udf06\\ud834"'!==ld("\udf06\ud834")||'"\\udead"'!==ld("\udead")})),Ad=function(e,t){var n=od(arguments),r=cd(t);if(ad(r)||void 0!==e&&!sd(e))return n[1]=function(e,t){if(ad(r)&&(t=nd(r,this,ud(e),t)),!sd(t))return t},td(ld,null,n)},kd=function(e,t,n){var r=pd(n,t-1),i=pd(n,t+1);return hd(bd,e)&&!hd(yd,i)||hd(yd,e)&&!hd(bd,r)?"\\u"+gd(fd(e,0),16):e};ld&&Zc({target:"JSON",stat:!0,arity:3,forced:_d||wd},{stringify:function(e,t,n){var r=od(arguments),i=td(_d?Ad:ld,null,r);return wd&&"string"==typeof i?md(i,vd,kd):i}});var Ed=Aa,xd=me;Ya({target:"Object",stat:!0,forced:!Le||ne((function(){Ed.f(1)}))},{getOwnPropertySymbols:function(e){var t=Ed.f;return t?t(xd(e)):[]}});var Sd=ne,Rd=Ie,Dd=He("species"),Td=function(e){return Rd>=51||!Sd((function(){var t=[];return(t.constructor={})[Dd]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},Od=Ti.filter;Ya({target:"Array",proto:!0,forced:!Td("filter")},{filter:function(e){return Od(this,e,arguments.length>1?arguments[1]:void 0)}});var Id=Ya,Pd=ne,Cd=Ki,Ld=Ni.f,Ud=Ze;Id({target:"Object",stat:!0,forced:!Ud||Pd((function(){Ld(1)})),sham:!Ud},{getOwnPropertyDescriptor:function(e,t){return Ld(Cd(e),t)}});var Md=Da,jd=Ki,Bd=Ni,Gd=Fs;Ya({target:"Object",stat:!0,sham:!Ze},{getOwnPropertyDescriptors:function(e){for(var t,n,r=jd(e),i=Bd.f,a=Md(r),s={},o=0;a.length>o;)void 0!==(n=i(r,t=a[o++]))&&Gd(s,t,n);return s}});var Nd=Ya,qd=ei,Fd=fi,Vd=nt,zd=oa,Hd=Xr,Wd=Ki,Kd=Fs,$d=He,Qd=Kc,Yd=Td("slice"),Jd=$d("species"),Xd=Array,Zd=Math.max;Nd({target:"Array",proto:!0,forced:!Yd},{slice:function(e,t){var n,r,i,a=Wd(this),s=Hd(a),o=zd(e,s),c=zd(void 0===t?s:t,s);if(qd(a)&&(n=a.constructor,(Fd(n)&&(n===Xd||qd(n.prototype))||Vd(n)&&null===(n=n[Jd]))&&(n=void 0),n===Xd||void 0===n))return Qd(a,o,c);for(r=new(void 0===n?Xd:n)(Zd(c-o,0)),i=0;o<c;o++,i++)o in a&&Kd(r,i,a[o]);return r.length=i,r}});var eu=gt,tu=pt,nu=Lt,ru=function(e,t,n){var r,i;tu(e);try{if(!(r=nu(e,"return"))){if("throw"===t)throw n;return n}r=eu(r,e)}catch(e){i=!0,r=e}if("throw"===t)throw n;if(i)throw r;return tu(r),n},iu=pt,au=ru,su={},ou=su,cu=He("iterator"),du=Array.prototype,uu=function(e){return void 0!==e&&(ou.Array===e||du[cu]===e)},lu=xr,hu=Lt,pu=de,fu=su,mu=He("iterator"),gu=function(e){if(!pu(e))return hu(e,mu)||hu(e,"@@iterator")||fu[lu(e)]},vu=gt,bu=It,yu=pt,_u=Rt,wu=gu,Au=TypeError,ku=function(e,t){var n=arguments.length<2?wu(e):t;if(bu(n))return yu(vu(n,e));throw Au(_u(e)+" is not iterable")},Eu=Br,xu=gt,Su=me,Ru=function(e,t,n,r){try{return r?t(iu(n)[0],n[1]):t(n)}catch(t){au(e,"throw",t)}},Du=uu,Tu=fi,Ou=Xr,Iu=Fs,Pu=ku,Cu=gu,Lu=Array,Uu=function(e){var t=Su(e),n=Tu(this),r=arguments.length,i=r>1?arguments[1]:void 0,a=void 0!==i;a&&(i=Eu(i,r>2?arguments[2]:void 0));var s,o,c,d,u,l,h=Cu(t),p=0;if(!h||this===Lu&&Du(h))for(s=Ou(t),o=n?new this(s):Lu(s);s>p;p++)l=a?i(t[p],p):t[p],Iu(o,p,l);else for(u=(d=Pu(t,h)).next,o=n?new this:[];!(c=xu(u,d)).done;p++)l=a?Ru(d,i,[c.value,p],!0):c.value,Iu(o,p,l);return o.length=p,o},Mu=He("iterator"),ju=!1;try{var Bu=0,Gu={next:function(){return{done:!!Bu++}},return:function(){ju=!0}};Gu[Mu]=function(){return this},Array.from(Gu,(function(){throw 2}))}catch(e){}var Nu=function(e,t){if(!t&&!ju)return!1;var n=!1;try{var r={};r[Mu]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch(e){}return n},qu=Uu;Ya({target:"Array",stat:!0,forced:!Nu((function(e){Array.from(e)}))},{from:qu});var Fu,Vu,zu,Hu=ce,Wu=Kr,Ku=ps,$u=he,Qu=Hu("".charAt),Yu=Hu("".charCodeAt),Ju=Hu("".slice),Xu=function(e){return function(t,n){var r,i,a=Ku($u(t)),s=Wu(n),o=a.length;return s<0||s>=o?e?"":void 0:(r=Yu(a,s))<55296||r>56319||s+1===o||(i=Yu(a,s+1))<56320||i>57343?e?Qu(a,s):r:e?Ju(a,s,s+2):i-56320+(r-55296<<10)+65536}},Zu={codeAt:Xu(!1),charAt:Xu(!0)},el=!ne((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),tl=be,nl=Je,rl=me,il=el,al=In("IE_PROTO"),sl=Object,ol=sl.prototype,cl=il?sl.getPrototypeOf:function(e){var t=rl(e);if(tl(t,al))return t[al];var n=t.constructor;return nl(n)&&t instanceof n?n.prototype:t instanceof sl?ol:null},dl=ne,ul=Je,ll=nt,hl=cl,pl=fr,fl=He("iterator"),ml=!1;[].keys&&("next"in(zu=[].keys())?(Vu=hl(hl(zu)))!==Object.prototype&&(Fu=Vu):ml=!0);var gl=!ll(Fu)||dl((function(){var e={};return Fu[fl].call(e)!==e}));gl&&(Fu={}),ul(Fu[fl])||pl(Fu,fl,(function(){return this}));var vl={IteratorPrototype:Fu,BUGGY_SAFARI_ITERATORS:ml},bl=vl.IteratorPrototype,yl=Ms,_l=En,wl=bo,Al=su,kl=function(){return this},El=function(e,t,n,r){var i=t+" Iterator";return e.prototype=yl(bl,{next:_l(+!r,n)}),wl(e,i,!1),Al[i]=kl,e},xl=ce,Sl=It,Rl=Je,Dl=String,Tl=TypeError,Ol=function(e,t,n){try{return xl(Sl(Object.getOwnPropertyDescriptor(e,t)[n]))}catch(e){}},Il=pt,Pl=function(e){if("object"==typeof e||Rl(e))return e;throw Tl("Can't set "+Dl(e)+" as a prototype")},Cl=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Ol(Object.prototype,"__proto__","set"))(n,[]),t=n instanceof Array}catch(e){}return function(n,r){return Il(n),Pl(r),t?e(n,r):n.__proto__=r,n}}():void 0),Ll=Ya,Ul=gt,Ml=Je,jl=El,Bl=cl,Gl=Cl,Nl=bo,ql=Rn,Fl=fr,Vl=su,zl=pn.PROPER,Hl=pn.CONFIGURABLE,Wl=vl.IteratorPrototype,Kl=vl.BUGGY_SAFARI_ITERATORS,$l=He("iterator"),Ql="keys",Yl="values",Jl="entries",Xl=function(){return this},Zl=function(e,t,n,r,i,a,s){jl(n,t,r);var o,c,d,u=function(e){if(e===i&&m)return m;if(!Kl&&e in p)return p[e];switch(e){case Ql:case Yl:case Jl:return function(){return new n(this,e)}}return function(){return new n(this)}},l=t+" Iterator",h=!1,p=e.prototype,f=p[$l]||p["@@iterator"]||i&&p[i],m=!Kl&&f||u(i),g="Array"==t&&p.entries||f;if(g&&(o=Bl(g.call(new e)))!==Object.prototype&&o.next&&(Bl(o)!==Wl&&(Gl?Gl(o,Wl):Ml(o[$l])||Fl(o,$l,Xl)),Nl(o,l,!0)),zl&&i==Yl&&f&&f.name!==Yl&&(Hl?ql(p,"name",Yl):(h=!0,m=function(){return Ul(f,this)})),i)if(c={values:u(Yl),keys:a?m:u(Ql),entries:u(Jl)},s)for(d in c)(Kl||h||!(d in p))&&Fl(p,d,c[d]);else Ll({target:t,proto:!0,forced:Kl||h},c);return p[$l]!==m&&Fl(p,$l,m,{name:i}),Vl[t]=m,c},eh=function(e,t){return{value:e,done:t}},th=Zu.charAt,nh=ps,rh=Wn,ih=Zl,ah=eh,sh="String Iterator",oh=rh.set,ch=rh.getterFor(sh);ih(String,"String",(function(e){oh(this,{type:sh,string:nh(e),index:0})}),(function(){var e,t=ch(this),n=t.string,r=t.index;return r>=n.length?ah(void 0,!0):(e=th(n,r),t.index+=e.length,ah(e,!1))}));var dh=pt,uh=function(){var e=dh(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t},lh=ne,hh=H.RegExp,ph=lh((function(){var e=hh("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),fh=ph||lh((function(){return!hh("a","y").sticky})),mh={BROKEN_CARET:ph||lh((function(){var e=hh("^r","gy");return e.lastIndex=2,null!=e.exec("str")})),MISSED_STICKY:fh,UNSUPPORTED_Y:ph},gh=ne,vh=H.RegExp,bh=gh((function(){var e=vh(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)})),yh=ne,_h=H.RegExp,wh=yh((function(){var e=_h("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),Ah=gt,kh=ce,Eh=ps,xh=uh,Sh=mh,Rh=W.exports,Dh=Ms,Th=Wn.get,Oh=bh,Ih=wh,Ph=Rh("native-string-replace",String.prototype.replace),Ch=RegExp.prototype.exec,Lh=Ch,Uh=kh("".charAt),Mh=kh("".indexOf),jh=kh("".replace),Bh=kh("".slice),Gh=function(){var e=/a/,t=/b*/g;return Ah(Ch,e,"a"),Ah(Ch,t,"a"),0!==e.lastIndex||0!==t.lastIndex}(),Nh=Sh.BROKEN_CARET,qh=void 0!==/()??/.exec("")[1];(Gh||qh||Nh||Oh||Ih)&&(Lh=function(e){var t,n,r,i,a,s,o,c=this,d=Th(c),u=Eh(e),l=d.raw;if(l)return l.lastIndex=c.lastIndex,t=Ah(Lh,l,u),c.lastIndex=l.lastIndex,t;var h=d.groups,p=Nh&&c.sticky,f=Ah(xh,c),m=c.source,g=0,v=u;if(p&&(f=jh(f,"y",""),-1===Mh(f,"g")&&(f+="g"),v=Bh(u,c.lastIndex),c.lastIndex>0&&(!c.multiline||c.multiline&&"\n"!==Uh(u,c.lastIndex-1))&&(m="(?: "+m+")",v=" "+v,g++),n=new RegExp("^(?:"+m+")",f)),qh&&(n=new RegExp("^"+m+"$(?!\\s)",f)),Gh&&(r=c.lastIndex),i=Ah(Ch,p?n:c,v),p?i?(i.input=Bh(i.input,g),i[0]=Bh(i[0],g),i.index=c.lastIndex,c.lastIndex+=i[0].length):c.lastIndex=0:Gh&&i&&(c.lastIndex=c.global?i.index+i[0].length:r),qh&&i&&i.length>1&&Ah(Ph,i[0],n,(function(){for(a=1;a<arguments.length-2;a++)void 0===arguments[a]&&(i[a]=void 0)})),i&&h)for(i.groups=s=Dh(null),a=0;a<h.length;a++)s[(o=h[a])[0]]=i[o[1]];return i});var Fh=Lh;Ya({target:"RegExp",proto:!0,forced:/./.exec!==Fh},{exec:Fh});var Vh=Ya,zh=Ze,Hh=ce,Wh=be,Kh=Je,$h=_t,Qh=ps,Yh=no,Jh=Ca,Xh=H.Symbol,Zh=Xh&&Xh.prototype;if(zh&&Kh(Xh)&&(!("description"in Zh)||void 0!==Xh().description)){var ep={},tp=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:Qh(arguments[0]),t=$h(Zh,this)?new Xh(e):void 0===e?Xh():Xh(e);return""===e&&(ep[t]=!0),t};Jh(tp,Xh),tp.prototype=Zh,Zh.constructor=tp;var np="Symbol(test)"==String(Xh("test")),rp=Hh(Zh.valueOf),ip=Hh(Zh.toString),ap=/^Symbol\((.*)\)[^)]+$/,sp=Hh("".replace),op=Hh("".slice);Yh(Zh,"description",{configurable:!0,get:function(){var e=rp(this);if(Wh(ep,e))return"";var t=ip(e),n=np?op(t,7,-1):sp(t,ap,"$1");return""===n?void 0:n}}),Vh({global:!0,constructor:!0,forced:!0},{Symbol:tp})}uo("iterator");var cp=He,dp=Ms,up=Xe.f,lp=cp("unscopables"),hp=Array.prototype;null==hp[lp]&&up(hp,lp,{configurable:!0,value:dp(null)});var pp=function(e){hp[lp][e]=!0},fp=Ki,mp=pp,gp=su,vp=Wn,bp=Xe.f,yp=Zl,_p=eh,wp=Ze,Ap="Array Iterator",kp=vp.set,Ep=vp.getterFor(Ap),xp=yp(Array,"Array",(function(e,t){kp(this,{type:Ap,target:fp(e),index:0,kind:t})}),(function(){var e=Ep(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,_p(void 0,!0)):_p("keys"==n?r:"values"==n?t[r]:[r,t[r]],!1)}),"values"),Sp=gp.Arguments=gp.Array;if(mp("keys"),mp("values"),mp("entries"),wp&&"values"!==Sp.name)try{bp(Sp,"name",{value:"values"})}catch(e){}var Rp=H,Dp=Dr,Tp=Ir,Op=xp,Ip=Rn,Pp=He,Cp=Pp("iterator"),Lp=Pp("toStringTag"),Up=Op.values,Mp=function(e,t){if(e){if(e[Cp]!==Up)try{Ip(e,Cp,Up)}catch(t){e[Cp]=Up}if(e[Lp]||Ip(e,Lp,t),Dp[t])for(var n in Op)if(e[n]!==Op[n])try{Ip(e,n,Op[n])}catch(t){e[n]=Op[n]}}};for(var jp in Dp)Mp(Rp[jp]&&Rp[jp].prototype,jp);Mp(Tp,"DOMTokenList");var Bp,Gp,Np,qp,Fp="undefined"!=typeof process&&"process"==br(process),Vp=yt,zp=no,Hp=Ze,Wp=He("species"),Kp=function(e){var t=Vp(e);Hp&&t&&!t[Wp]&&zp(t,Wp,{configurable:!0,get:function(){return this}})},$p=_t,Qp=TypeError,Yp=function(e,t){if($p(t,e))return e;throw Qp("Incorrect invocation")},Jp=fi,Xp=Rt,Zp=TypeError,ef=pt,tf=function(e){if(Jp(e))return e;throw Zp(Xp(e)+" is not a constructor")},nf=de,rf=He("species"),af=function(e,t){var n,r=ef(e).constructor;return void 0===r||nf(n=ef(r)[rf])?t:tf(n)},sf=TypeError,of=function(e,t){if(e<t)throw sf("Not enough arguments");return e},cf=/(?:ipad|iphone|ipod).*applewebkit/i.test(Ee),df=H,uf=Wc,lf=Br,hf=Je,pf=be,ff=ne,mf=As,gf=Kc,vf=st,bf=of,yf=cf,_f=Fp,wf=df.setImmediate,Af=df.clearImmediate,kf=df.process,Ef=df.Dispatch,xf=df.Function,Sf=df.MessageChannel,Rf=df.String,Df=0,Tf={},Of="onreadystatechange";ff((function(){Bp=df.location}));var If=function(e){if(pf(Tf,e)){var t=Tf[e];delete Tf[e],t()}},Pf=function(e){return function(){If(e)}},Cf=function(e){If(e.data)},Lf=function(e){df.postMessage(Rf(e),Bp.protocol+"//"+Bp.host)};wf&&Af||(wf=function(e){bf(arguments.length,1);var t=hf(e)?e:xf(e),n=gf(arguments,1);return Tf[++Df]=function(){uf(t,void 0,n)},Gp(Df),Df},Af=function(e){delete Tf[e]},_f?Gp=function(e){kf.nextTick(Pf(e))}:Ef&&Ef.now?Gp=function(e){Ef.now(Pf(e))}:Sf&&!yf?(qp=(Np=new Sf).port2,Np.port1.onmessage=Cf,Gp=lf(qp.postMessage,qp)):df.addEventListener&&hf(df.postMessage)&&!df.importScripts&&Bp&&"file:"!==Bp.protocol&&!ff(Lf)?(Gp=Lf,df.addEventListener("message",Cf,!1)):Gp=Of in vf("script")?function(e){mf.appendChild(vf("script"))[Of]=function(){mf.removeChild(this),If(e)}}:function(e){setTimeout(Pf(e),0)});var Uf={set:wf,clear:Af},Mf=function(){this.head=null,this.tail=null};Mf.prototype={add:function(e){var t={item:e,next:null},n=this.tail;n?n.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return null===(this.head=e.next)&&(this.tail=null),e.item}};var jf,Bf,Gf,Nf,qf,Ff=Mf,Vf=/ipad|iphone|ipod/i.test(Ee)&&"undefined"!=typeof Pebble,zf=/web0s(?!.*chrome)/i.test(Ee),Hf=H,Wf=Br,Kf=Ni.f,$f=Uf.set,Qf=Ff,Yf=cf,Jf=Vf,Xf=zf,Zf=Fp,em=Hf.MutationObserver||Hf.WebKitMutationObserver,tm=Hf.document,nm=Hf.process,rm=Hf.Promise,im=Kf(Hf,"queueMicrotask"),am=im&&im.value;if(!am){var sm=new Qf,om=function(){var e,t;for(Zf&&(e=nm.domain)&&e.exit();t=sm.get();)try{t()}catch(e){throw sm.head&&jf(),e}e&&e.enter()};Yf||Zf||Xf||!em||!tm?!Jf&&rm&&rm.resolve?((Nf=rm.resolve(void 0)).constructor=rm,qf=Wf(Nf.then,Nf),jf=function(){qf(om)}):Zf?jf=function(){nm.nextTick(om)}:($f=Wf($f,Hf),jf=function(){$f(om)}):(Bf=!0,Gf=tm.createTextNode(""),new em(om).observe(Gf,{characterData:!0}),jf=function(){Gf.data=Bf=!Bf}),am=function(e){sm.head||jf(),sm.add(e)}}var cm=am,dm=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},um=H.Promise,lm="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,hm=!lm&&!Fp&&"object"==typeof window&&"object"==typeof document,pm=H,fm=um,mm=Je,gm=Fa,vm=_n,bm=He,ym=hm,_m=lm,wm=Ie;fm&&fm.prototype;var Am=bm("species"),km=!1,Em=mm(pm.PromiseRejectionEvent),xm=gm("Promise",(function(){var e=vm(fm),t=e!==String(fm);if(!t&&66===wm)return!0;if(!wm||wm<51||!/native code/.test(e)){var n=new fm((function(e){e(1)})),r=function(e){e((function(){}),(function(){}))};if((n.constructor={})[Am]=r,!(km=n.then((function(){}))instanceof r))return!0}return!t&&(ym||_m)&&!Em})),Sm={CONSTRUCTOR:xm,REJECTION_EVENT:Em,SUBCLASSING:km},Rm={},Dm=It,Tm=TypeError,Om=function(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw Tm("Bad Promise constructor");t=e,n=r})),this.resolve=Dm(t),this.reject=Dm(n)};Rm.f=function(e){return new Om(e)};var Im,Pm,Cm,Lm=Ya,Um=Fp,Mm=H,jm=gt,Bm=fr,Gm=Cl,Nm=bo,qm=Kp,Fm=It,Vm=Je,zm=nt,Hm=Yp,Wm=af,Km=Uf.set,$m=cm,Qm=function(e,t){try{1==arguments.length?console.error(e):console.error(e,t)}catch(e){}},Ym=dm,Jm=Ff,Xm=Wn,Zm=um,eg=Rm,tg="Promise",ng=Sm.CONSTRUCTOR,rg=Sm.REJECTION_EVENT,ig=Sm.SUBCLASSING,ag=Xm.getterFor(tg),sg=Xm.set,og=Zm&&Zm.prototype,cg=Zm,dg=og,ug=Mm.TypeError,lg=Mm.document,hg=Mm.process,pg=eg.f,fg=pg,mg=!!(lg&&lg.createEvent&&Mm.dispatchEvent),gg="unhandledrejection",vg=function(e){var t;return!(!zm(e)||!Vm(t=e.then))&&t},bg=function(e,t){var n,r,i,a=t.value,s=1==t.state,o=s?e.ok:e.fail,c=e.resolve,d=e.reject,u=e.domain;try{o?(s||(2===t.rejection&&kg(t),t.rejection=1),!0===o?n=a:(u&&u.enter(),n=o(a),u&&(u.exit(),i=!0)),n===e.promise?d(ug("Promise-chain cycle")):(r=vg(n))?jm(r,n,c,d):c(n)):d(a)}catch(e){u&&!i&&u.exit(),d(e)}},yg=function(e,t){e.notified||(e.notified=!0,$m((function(){for(var n,r=e.reactions;n=r.get();)bg(n,e);e.notified=!1,t&&!e.rejection&&wg(e)})))},_g=function(e,t,n){var r,i;mg?((r=lg.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),Mm.dispatchEvent(r)):r={promise:t,reason:n},!rg&&(i=Mm["on"+e])?i(r):e===gg&&Qm("Unhandled promise rejection",n)},wg=function(e){jm(Km,Mm,(function(){var t,n=e.facade,r=e.value;if(Ag(e)&&(t=Ym((function(){Um?hg.emit("unhandledRejection",r,n):_g(gg,n,r)})),e.rejection=Um||Ag(e)?2:1,t.error))throw t.value}))},Ag=function(e){return 1!==e.rejection&&!e.parent},kg=function(e){jm(Km,Mm,(function(){var t=e.facade;Um?hg.emit("rejectionHandled",t):_g("rejectionhandled",t,e.value)}))},Eg=function(e,t,n){return function(r){e(t,r,n)}},xg=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,yg(e,!0))},Sg=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw ug("Promise can't be resolved itself");var r=vg(t);r?$m((function(){var n={done:!1};try{jm(r,t,Eg(Sg,n,e),Eg(xg,n,e))}catch(t){xg(n,t,e)}})):(e.value=t,e.state=1,yg(e,!1))}catch(t){xg({done:!1},t,e)}}};if(ng&&(dg=(cg=function(e){Hm(this,dg),Fm(e),jm(Im,this);var t=ag(this);try{e(Eg(Sg,t),Eg(xg,t))}catch(e){xg(t,e)}}).prototype,(Im=function(e){sg(this,{type:tg,done:!1,notified:!1,parent:!1,reactions:new Jm,rejection:!1,state:0,value:void 0})}).prototype=Bm(dg,"then",(function(e,t){var n=ag(this),r=pg(Wm(this,cg));return n.parent=!0,r.ok=!Vm(e)||e,r.fail=Vm(t)&&t,r.domain=Um?hg.domain:void 0,0==n.state?n.reactions.add(r):$m((function(){bg(r,n)})),r.promise})),Pm=function(){var e=new Im,t=ag(e);this.promise=e,this.resolve=Eg(Sg,t),this.reject=Eg(xg,t)},eg.f=pg=function(e){return e===cg||undefined===e?new Pm(e):fg(e)},Vm(Zm)&&og!==Object.prototype)){Cm=og.then,ig||Bm(og,"then",(function(e,t){var n=this;return new cg((function(e,t){jm(Cm,n,e,t)})).then(e,t)}),{unsafe:!0});try{delete og.constructor}catch(e){}Gm&&Gm(og,dg)}Lm({global:!0,constructor:!0,wrap:!0,forced:ng},{Promise:cg}),Nm(cg,tg,!1),qm(tg);var Rg=Br,Dg=gt,Tg=pt,Og=Rt,Ig=uu,Pg=Xr,Cg=_t,Lg=ku,Ug=gu,Mg=ru,jg=TypeError,Bg=function(e,t){this.stopped=e,this.result=t},Gg=Bg.prototype,Ng=function(e,t,n){var r,i,a,s,o,c,d,u=n&&n.that,l=!(!n||!n.AS_ENTRIES),h=!(!n||!n.IS_RECORD),p=!(!n||!n.IS_ITERATOR),f=!(!n||!n.INTERRUPTED),m=Rg(t,u),g=function(e){return r&&Mg(r,"normal",e),new Bg(!0,e)},v=function(e){return l?(Tg(e),f?m(e[0],e[1],g):m(e[0],e[1])):f?m(e,g):m(e)};if(h)r=e.iterator;else if(p)r=e;else{if(!(i=Ug(e)))throw jg(Og(e)+" is not iterable");if(Ig(i)){for(a=0,s=Pg(e);s>a;a++)if((o=v(e[a]))&&Cg(Gg,o))return o;return new Bg(!1)}r=Lg(e,i)}for(c=h?e.next:r.next;!(d=Dg(c,r)).done;){try{o=v(d.value)}catch(e){Mg(r,"throw",e)}if("object"==typeof o&&o&&Cg(Gg,o))return o}return new Bg(!1)},qg=um,Fg=Sm.CONSTRUCTOR||!Nu((function(e){qg.all(e).then(void 0,(function(){}))})),Vg=gt,zg=It,Hg=Rm,Wg=dm,Kg=Ng;Ya({target:"Promise",stat:!0,forced:Fg},{all:function(e){var t=this,n=Hg.f(t),r=n.resolve,i=n.reject,a=Wg((function(){var n=zg(t.resolve),a=[],s=0,o=1;Kg(e,(function(e){var c=s++,d=!1;o++,Vg(n,t,e).then((function(e){d||(d=!0,a[c]=e,--o||r(a))}),i)})),--o||r(a)}));return a.error&&i(a.value),n.promise}});var $g=Ya,Qg=Sm.CONSTRUCTOR,Yg=um,Jg=yt,Xg=Je,Zg=fr,ev=Yg&&Yg.prototype;if($g({target:"Promise",proto:!0,forced:Qg,real:!0},{catch:function(e){return this.then(void 0,e)}}),Xg(Yg)){var tv=Jg("Promise").prototype.catch;ev.catch!==tv&&Zg(ev,"catch",tv,{unsafe:!0})}var nv=gt,rv=It,iv=Rm,av=dm,sv=Ng;Ya({target:"Promise",stat:!0,forced:Fg},{race:function(e){var t=this,n=iv.f(t),r=n.reject,i=av((function(){var i=rv(t.resolve);sv(e,(function(e){nv(i,t,e).then(n.resolve,r)}))}));return i.error&&r(i.value),n.promise}});var ov=gt,cv=Rm;Ya({target:"Promise",stat:!0,forced:Sm.CONSTRUCTOR},{reject:function(e){var t=cv.f(this);return ov(t.reject,void 0,e),t.promise}});var dv=pt,uv=nt,lv=Rm,hv=function(e,t){if(dv(e),uv(t)&&t.constructor===e)return t;var n=lv.f(e);return(0,n.resolve)(t),n.promise},pv=Ya,fv=Sm.CONSTRUCTOR,mv=hv;yt("Promise"),pv({target:"Promise",stat:!0,forced:fv},{resolve:function(e){return mv(this,e)}});var gv=TypeError,vv=Ya,bv=ne,yv=ei,_v=nt,wv=me,Av=Xr,kv=function(e){if(e>9007199254740991)throw gv("Maximum allowed index exceeded");return e},Ev=Fs,xv=wi,Sv=Td,Rv=Ie,Dv=He("isConcatSpreadable"),Tv=Rv>=51||!bv((function(){var e=[];return e[Dv]=!1,e.concat()[0]!==e})),Ov=function(e){if(!_v(e))return!1;var t=e[Dv];return void 0!==t?!!t:yv(e)};vv({target:"Array",proto:!0,arity:1,forced:!Tv||!Sv("concat")},{concat:function(e){var t,n,r,i,a,s=wv(this),o=xv(s,0),c=0;for(t=-1,r=arguments.length;t<r;t++)if(Ov(a=-1===t?s:arguments[t]))for(i=Av(a),kv(c+i),n=0;n<i;n++,c++)n in a&&Ev(o,c,a[n]);else kv(c+1),Ev(o,c++,a);return o.length=c,o}});var Iv=Ze,Pv=pn.EXISTS,Cv=ce,Lv=no,Uv=Function.prototype,Mv=Cv(Uv.toString),jv=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,Bv=Cv(jv.exec);function Gv(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 Nv(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 Nv(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,o=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){o=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(o)throw a}}}}function Nv(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 qv(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 Fv(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qv(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qv(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}Iv&&!Pv&&Lv(Uv,"name",{configurable:!0,get:function(){try{return Bv(jv,Mv(this))[1]}catch(e){return""}}});var Vv,zv={react:{src:"https://pm.azerioncircle.com/react/16.14.0/umd/react.production.min.js",name:"React"},"react-dom":{src:"https://pm.azerioncircle.com/react-dom/16.14.0/umd/react-dom.production.min.js",name:"ReactDOM"},redux:{src:"https://pm.azerioncircle.com/redux/4.0.5/dist/redux.min.js",name:"Redux"},"react-redux":{src:"https://pm.azerioncircle.com/react-redux/7.2.1/dist/react-redux.min.js",name:"ReactRedux"},"material-ui-core":{src:"https://pm.azerioncircle.com/@material-ui/core/4.11.3/umd/material-ui.production.min.js",name:"MaterialUI"}},Hv={},Wv=function(e,t){Hv[e]=Fv(Fv({},t),{},{isLoading:!1})},Kv=function(e){var n=this,r=e.id,i=e.src;return new Promise(function(e,a){if(t(this,n),document.getElementById(r))e();else{var s=document.createElement("script");s.onload=function(){e()},s.id=r,s.setAttribute("crossorigin",!0),s.src=i,document.head.appendChild(s)}}.bind(this))},$v=function(){var t=e(r.mark((function e(t){var n,i,a,s,o,c,d,u;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n=window[t])){e.next=3;break}return e.abrupt("return",n);case 3:if(!(i=Hv[t]).isLoading){e.next=6;break}return e.abrupt("return");case 6:i.isLoading=!0,a=Gv(i.dependencies),e.prev=8,a.s();case 10:if((s=a.n()).done){e.next=26;break}if(o=s.value,e.prev=12,c=zv[o].name,!window[c]){e.next=16;break}return e.abrupt("continue",24);case 16:return e.next=18,Kv({id:o,src:zv[o].src});case 18:e.next=24;break;case 20:e.prev=20,e.t0=e.catch(12),d=o.id,u=o.src,console.log("Could not load external script ".concat(d," ").concat(u),e.t0);case 24:e.next=10;break;case 26:e.next=31;break;case 28:e.prev=28,e.t1=e.catch(8),a.e(e.t1);case 31:return e.prev=31,a.f(),e.finish(31);case 34:return e.prev=34,e.next=37,Kv({id:t,src:i.source});case 37:n=window[t],e.next=43;break;case 40:e.prev=40,e.t2=e.catch(34),console.log("Could not load module ".concat(t," ").concat(i.source,"."),e.t2);case 43:return i.isLoading=!1,e.abrupt("return",n);case 45:case"end":return e.stop()}}),e,null,[[8,28,31,34],[12,20],[34,40]])})));return function(e){return t.apply(this,arguments)}}(),Qv=R((function t(){var n=this;D(this,t),T(this,"load",e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,$v("Leaderboard");case 2:n.leaderboard=e.sent;case 3:case"end":return e.stop()}}),e)})))),T(this,"showLeaderboard",function(){var t=e(r.mark((function e(t){var i;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=window.GD_OPTIONS.gameId,n.leaderboard){e.next=4;break}return e.next=4,n.load();case 4:n.leaderboard.showLeaderBoard(i,t);case 5:case"end":return e.stop()}}),e)})));return function(e){return t.apply(this,arguments)}}()),T(this,"addScore",function(){var t=e(r.mark((function e(t){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.leaderboard){e.next=3;break}return e.next=3,n.load();case 3:n.leaderboard.addScore(t);case 4:case"end":return e.stop()}}),e)})));return function(e){return t.apply(this,arguments)}}()),this.moduleName="Leaderboard",this.moduleConfig={source:"https://pm.azerioncircle.com/@bygd/gd-sdk-leaderboard/0.1.43/dist/default/iife/index.js",dependencies:["react","react-dom","redux","react-redux","material-ui-core"]},Wv(this.moduleName,this.moduleConfig)})),Yv=new Qv,Jv=nt,Xv=br,Zv=He("match"),eb=function(e){var t;return Jv(e)&&(void 0!==(t=e[Zv])?!!t:"RegExp"==Xv(e))},tb=eb,nb=TypeError,rb=function(e){if(tb(e))throw nb("The method doesn't accept regular expressions");return e},ib=He("match"),ab=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[ib]=!1,"/./"[e](t)}catch(e){}}return!1},sb=Ya,ob=Lr,cb=Ni.f,db=Yr,ub=ps,lb=rb,hb=he,pb=ab,fb=ob("".startsWith),mb=ob("".slice),gb=Math.min,vb=pb("startsWith");sb({target:"String",proto:!0,forced:!!(vb||(Vv=cb(String.prototype,"startsWith"),!Vv||Vv.writable))&&!vb},{startsWith:function(e){var t=ub(hb(this));lb(e);var n=db(gb(arguments.length>1?arguments[1]:void 0,t.length)),r=ub(e);return fb?fb(t,r,n):mb(t,n,n+r.length)===r}});var bb=gt,yb=be,_b=_t,wb=uh,Ab=RegExp.prototype,kb=function(e){var t=e.flags;return void 0!==t||"flags"in Ab||yb(e,"flags")||!_b(Ab,e)?t:bb(wb,e)},Eb=pn.PROPER,xb=fr,Sb=pt,Rb=ps,Db=ne,Tb=kb,Ob="toString",Ib=RegExp.prototype[Ob],Pb=Db((function(){return"/a/b"!=Ib.call({source:"a",flags:"b"})})),Cb=Eb&&Ib.name!=Ob;(Pb||Cb)&&xb(RegExp.prototype,Ob,(function(){var e=Sb(this);return"/"+Rb(e.source)+"/"+Rb(Tb(e))}),{unsafe:!0});var Lb=Lr,Ub=fr,Mb=Fh,jb=ne,Bb=He,Gb=Rn,Nb=Bb("species"),qb=RegExp.prototype,Fb=function(e,t,n,r){var i=Bb(e),a=!jb((function(){var t={};return t[i]=function(){return 7},7!=""[e](t)})),s=a&&!jb((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[Nb]=function(){return n},n.flags="",n[i]=/./[i]),n.exec=function(){return t=!0,null},n[i](""),!t}));if(!a||!s||n){var o=Lb(/./[i]),c=t(i,""[e],(function(e,t,n,r,i){var s=Lb(e),c=t.exec;return c===Mb||c===qb.exec?a&&!i?{done:!0,value:o(t,n,r)}:{done:!0,value:s(n,t,r)}:{done:!1}}));Ub(String.prototype,e,c[0]),Ub(qb,i,c[1])}r&&Gb(qb[i],"sham",!0)},Vb=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t},zb=gt,Hb=pt,Wb=Je,Kb=br,$b=Fh,Qb=TypeError,Yb=function(e,t){var n=e.exec;if(Wb(n)){var r=zb(n,e,t);return null!==r&&Hb(r),r}if("RegExp"===Kb(e))return zb($b,e,t);throw Qb("RegExp#exec called on incompatible receiver")},Jb=gt,Xb=pt,Zb=de,ey=he,ty=Vb,ny=ps,ry=Lt,iy=Yb;function ay(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 sy(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ay(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ay(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}Fb("search",(function(e,t,n){return[function(t){var n=ey(this),r=Zb(t)?void 0:ry(t,e);return r?Jb(r,t,n):new RegExp(t)[e](ny(n))},function(e){var r=Xb(this),i=ny(e),a=n(t,r,i);if(a.done)return a.value;var s=r.lastIndex;ty(s,0)||(r.lastIndex=0);var o=iy(r,i);return ty(r.lastIndex,s)||(r.lastIndex=s),null===o?-1:o.index}]}));var oy,cy,dy=function(){function e(){D(this,e)}return R(e,[{key:"getBridgeContext",value:function(){var e=this._isTokenGameURL(),t=this._isMasterGameURL(),n=this._isExtHostedGameURL(),r=e||n?this._getTokenGameURLConfig():{};r=r||{};var i=decodeURIComponent((e||n)&&r.parentURL?r.parentURL:a()),c=decodeURIComponent((e||n)&&r.parentDomain?r.parentDomain:s()),u=decodeURIComponent((e||n)&&r.topDomain?r.topDomain:n&&0===o()?c:d()),l=(e||n)&&r.loaderEnabled,h=(e||n)&&r.loaderEnabled,p=(e||n)&&r.loaderEnabled,f=(e||n)&&r.loaderEnabled,m=(e||n)&&r.loaderEnabled,g=(e||n)&&r.loaderEnabled,v=(e||n)&&r.loaderEnabled;console.log("noMinijuegosSDK",v);var b=(e||n)&&r.loaderEnabled,y=(e||n)&&r.loaderEnabled&&r.hasImpression&&r.version>="1.1.24";return{isTokenGameURL:e,isMasterGameURL:t,isExtHostedGameURL:n,noConsoleBanner:l,noLoadedEvent:h,noBlockerEvent:p,noPreroll:b,parentURL:i,parentDomain:c,topDomain:u&&u.length?u:c,noGAPageView:f,noLotamePageView:m,noGamedockSDK:g,noMinijuegosSDK:v,version:r.version,pauseGameOnStartup:y,depth:o(),domainMatched:c===u,exports:{formatTokenURLSearch:this._formatTokenURLSearch.bind(this),extendUrlQuery:this._extendUrlQuery.bind(this),base64Encode:this._base64_encode.bind(this)}}}},{key:"_isMasterGameURL",value:function(){var e=/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Fa-f0-9]{32})(.*)$/i;return e.test(location.href)||!this._isTokenGameURL()&&e.test(document.referrer)}},{key:"_isTokenGameURL",value:function(){var e=/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Za-z0-9]{8})\/(.*)$/i;return e.test(location.href)||e.test(document.referrer)}},{key:"_isExtHostedGameURL",value:function(){var e=/^http[s]?:\/\/.*?gd_sdk_referrer_url=.*$/i;return e.test(location.href)||e.test(document.referrer)}},{key:"_isLoaderGameURL",value:function(){return/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Fa-f0-9]{32})(.*)$/i.test(location.href)&&location.href.startsWith("https://html5.gamedistribution.com")}},{key:"_getTokenGameURLConfig",value:function(){try{var e,t=/http[s]?:\/\/html5\.gamedistribution\.com\/[A-Za-z0-9]{8}\/[A-Fa-f0-9]{32}\/.*/i;if(t.test(location.href)){var n=new O(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 O(document.referrer,!0);if(!r.query.gd_zone_config)return;e=r.query.gd_zone_config}else{var i=new O(location.href,!0);if(!i.query.gd_zone_config)return;e=i.query.gd_zone_config}return JSON.parse(I.decode(decodeURIComponent(e)))}catch(e){}}},{key:"_formatTokenURLSearch",value:function(e){var t="";try{t=encodeURIComponent(I.encode(JSON.stringify(e)))}catch(e){}try{var n=new O(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 O(e,!0);return n.query=sy(sy({},n.query),t),n.toString()}},{key:"_base64_encode",value:function(e){return I.encode(JSON.stringify(e))}}]),e}(),uy=function(){try{return(new dy).getBridgeContext()}catch(e){return{}}}(),ly={userDeclinedTracking:document.location.search.indexOf("gdpr-tracking=0")>=0||document.cookie.indexOf("ogdpr_tracking=0")>=0,whitelabelPartner:(oy=!1,(cy=c("xanthophyll")).hasOwnProperty("xanthophyll")&&"true"===cy.xanthophyll&&(oy=!0),oy)},hy=Zu.charAt,py=ce,fy=me,my=Math.floor,gy=py("".charAt),vy=py("".replace),by=py("".slice),yy=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,_y=/\$([$&'`]|\d{1,2})/g,wy=Wc,Ay=gt,ky=ce,Ey=Fb,xy=ne,Sy=pt,Ry=Je,Dy=de,Ty=Kr,Oy=Yr,Iy=ps,Py=he,Cy=function(e,t,n){return t+(n?hy(e,t).length:1)},Ly=Lt,Uy=function(e,t,n,r,i,a){var s=n+e.length,o=r.length,c=_y;return void 0!==i&&(i=fy(i),c=yy),vy(a,c,(function(a,c){var d;switch(gy(c,0)){case"$":return"$";case"&":return e;case"`":return by(t,0,n);case"'":return by(t,s);case"<":d=i[by(c,1,-1)];break;default:var u=+c;if(0===u)return a;if(u>o){var l=my(u/10);return 0===l?a:l<=o?void 0===r[l-1]?gy(c,1):r[l-1]+gy(c,1):a}d=r[u-1]}return void 0===d?"":d}))},My=Yb,jy=He("replace"),By=Math.max,Gy=Math.min,Ny=ky([].concat),qy=ky([].push),Fy=ky("".indexOf),Vy=ky("".slice),zy="$0"==="a".replace(/./,"$0"),Hy=!!/./[jy]&&""===/./[jy]("a","$0");Ey("replace",(function(e,t,n){var r=Hy?"$":"$0";return[function(e,n){var r=Py(this),i=Dy(e)?void 0:Ly(e,jy);return i?Ay(i,e,r,n):Ay(t,Iy(r),e,n)},function(e,i){var a=Sy(this),s=Iy(e);if("string"==typeof i&&-1===Fy(i,r)&&-1===Fy(i,"$<")){var o=n(t,a,s,i);if(o.done)return o.value}var c=Ry(i);c||(i=Iy(i));var d=a.global;if(d){var u=a.unicode;a.lastIndex=0}for(var l=[];;){var h=My(a,s);if(null===h)break;if(qy(l,h),!d)break;""===Iy(h[0])&&(a.lastIndex=Cy(s,Oy(a.lastIndex),u))}for(var p,f="",m=0,g=0;g<l.length;g++){for(var v=Iy((h=l[g])[0]),b=By(Gy(Ty(h.index),s.length),0),y=[],_=1;_<h.length;_++)qy(y,void 0===(p=h[_])?p:String(p));var w=h.groups;if(c){var A=Ny([v],y,b,s);void 0!==w&&qy(A,w);var k=Iy(wy(i,void 0,A))}else k=Uy(v,s,b,y,w,i);b>=m&&(f+=Vy(s,m,b)+k,m=b+v.length)}return f+Vy(s,m)}]}),!!xy((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}))||!zy||Hy);var Wy=ne,Ky=Ze,$y=He("iterator"),Qy=!Wy((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,n="";return e.pathname="c%20d",t.forEach((function(e,r){t.delete("b"),n+=r+e})),!t.size&&!Ky||!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[$y]||"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})),Yy=fr,Jy=$s,Xy=Math.floor,Zy=function(e,t){var n=e.length,r=Xy(n/2);return n<8?e_(e,t):t_(e,Zy(Jy(e,0,r),t),Zy(Jy(e,r),t),t)},e_=function(e,t){for(var n,r,i=e.length,a=1;a<i;){for(r=a,n=e[a];r&&t(e[r-1],n)>0;)e[r]=e[--r];r!==a++&&(e[r]=n)}return e},t_=function(e,t,n,r){for(var i=t.length,a=n.length,s=0,o=0;s<i||o<a;)e[s+o]=s<i&&o<a?r(t[s],n[o])<=0?t[s++]:n[o++]:s<i?t[s++]:n[o++];return e},n_=Ya,r_=H,i_=gt,a_=ce,s_=Ze,o_=Qy,c_=fr,d_=no,u_=function(e,t,n){for(var r in t)Yy(e,r,t[r],n);return e},l_=bo,h_=El,p_=Wn,f_=Yp,m_=Je,g_=be,v_=Br,b_=xr,y_=pt,__=nt,w_=ps,A_=Ms,k_=En,E_=ku,x_=gu,S_=of,R_=Zy,D_=He("iterator"),T_="URLSearchParams",O_=T_+"Iterator",I_=p_.set,P_=p_.getterFor(T_),C_=p_.getterFor(O_),L_=Object.getOwnPropertyDescriptor,U_=function(e){if(!s_)return r_[e];var t=L_(r_,e);return t&&t.value},M_=U_("fetch"),j_=U_("Request"),B_=U_("Headers"),G_=j_&&j_.prototype,N_=B_&&B_.prototype,q_=r_.RegExp,F_=r_.TypeError,V_=r_.decodeURIComponent,z_=r_.encodeURIComponent,H_=a_("".charAt),W_=a_([].join),K_=a_([].push),$_=a_("".replace),Q_=a_([].shift),Y_=a_([].splice),J_=a_("".split),X_=a_("".slice),Z_=/\+/g,ew=Array(4),tw=function(e){return ew[e-1]||(ew[e-1]=q_("((?:%[\\da-f]{2}){"+e+"})","gi"))},nw=function(e){try{return V_(e)}catch(t){return e}},rw=function(e){var t=$_(e,Z_," "),n=4;try{return V_(t)}catch(e){for(;n;)t=$_(t,tw(n--),nw);return t}},iw=/[!'()~]|%20/g,aw={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},sw=function(e){return aw[e]},ow=function(e){return $_(z_(e),iw,sw)},cw=h_((function(e,t){I_(this,{type:O_,iterator:E_(P_(e).entries),kind:t})}),"Iterator",(function(){var e=C_(this),t=e.kind,n=e.iterator.next(),r=n.value;return n.done||(n.value="keys"===t?r.key:"values"===t?r.value:[r.key,r.value]),n}),!0),dw=function(e){this.entries=[],this.url=null,void 0!==e&&(__(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===H_(e,0)?X_(e,1):e:w_(e)))};dw.prototype={type:T_,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,n,r,i,a,s,o,c=x_(e);if(c)for(n=(t=E_(e,c)).next;!(r=i_(n,t)).done;){if(a=(i=E_(y_(r.value))).next,(s=i_(a,i)).done||(o=i_(a,i)).done||!i_(a,i).done)throw F_("Expected sequence with length 2");K_(this.entries,{key:w_(s.value),value:w_(o.value)})}else for(var d in e)g_(e,d)&&K_(this.entries,{key:d,value:w_(e[d])})},parseQuery:function(e){if(e)for(var t,n,r=J_(e,"&"),i=0;i<r.length;)(t=r[i++]).length&&(n=J_(t,"="),K_(this.entries,{key:rw(Q_(n)),value:rw(W_(n,"="))}))},serialize:function(){for(var e,t=this.entries,n=[],r=0;r<t.length;)e=t[r++],K_(n,ow(e.key)+"="+ow(e.value));return W_(n,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var uw=function(){f_(this,lw);var e=I_(this,new dw(arguments.length>0?arguments[0]:void 0));s_||(this.length=e.entries.length)},lw=uw.prototype;if(u_(lw,{append:function(e,t){S_(arguments.length,2);var n=P_(this);K_(n.entries,{key:w_(e),value:w_(t)}),s_||this.length++,n.updateURL()},delete:function(e){S_(arguments.length,1);for(var t=P_(this),n=t.entries,r=w_(e),i=0;i<n.length;)n[i].key===r?Y_(n,i,1):i++;s_||(this.length=n.length),t.updateURL()},get:function(e){S_(arguments.length,1);for(var t=P_(this).entries,n=w_(e),r=0;r<t.length;r++)if(t[r].key===n)return t[r].value;return null},getAll:function(e){S_(arguments.length,1);for(var t=P_(this).entries,n=w_(e),r=[],i=0;i<t.length;i++)t[i].key===n&&K_(r,t[i].value);return r},has:function(e){S_(arguments.length,1);for(var t=P_(this).entries,n=w_(e),r=0;r<t.length;)if(t[r++].key===n)return!0;return!1},set:function(e,t){S_(arguments.length,1);for(var n,r=P_(this),i=r.entries,a=!1,s=w_(e),o=w_(t),c=0;c<i.length;c++)(n=i[c]).key===s&&(a?Y_(i,c--,1):(a=!0,n.value=o));a||K_(i,{key:s,value:o}),s_||(this.length=i.length),r.updateURL()},sort:function(){var e=P_(this);R_(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,n=P_(this).entries,r=v_(e,arguments.length>1?arguments[1]:void 0),i=0;i<n.length;)r((t=n[i++]).value,t.key,this)},keys:function(){return new cw(this,"keys")},values:function(){return new cw(this,"values")},entries:function(){return new cw(this,"entries")}},{enumerable:!0}),c_(lw,D_,lw.entries,{name:"entries"}),c_(lw,"toString",(function(){return P_(this).serialize()}),{enumerable:!0}),s_&&d_(lw,"size",{get:function(){return P_(this).entries.length},configurable:!0,enumerable:!0}),l_(uw,T_),n_({global:!0,constructor:!0,forced:!o_},{URLSearchParams:uw}),!o_&&m_(B_)){var hw=a_(N_.has),pw=a_(N_.set),fw=function(e){if(__(e)){var t,n=e.body;if(b_(n)===T_)return t=e.headers?new B_(e.headers):new B_,hw(t,"content-type")||pw(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),A_(e,{body:k_(0,w_(n)),headers:k_(0,t)})}return e};if(m_(M_)&&n_({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return M_(e,arguments.length>1?fw(arguments[1]):{})}}),m_(j_)){var mw=function(e){return f_(this,G_),new j_(e,arguments.length>1?fw(arguments[1]):{})};G_.constructor=mw,mw.prototype=G_,n_({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:mw})}}var gw={URLSearchParams:uw,getState:P_},vw=ha.includes,bw=pp;Ya({target:"Array",proto:!0,forced:ne((function(){return!Array(1).includes()}))},{includes:function(e){return vw(this,e,arguments.length>1?arguments[1]:void 0)}}),bw("includes");var yw=Ya,_w=rb,ww=he,Aw=ps,kw=ab,Ew=ce("".indexOf);function xw(e){var n=this,r={},i=(null==e?void 0:e._ancestor_origins)||window.location.ancestorOrigins,a=(null==e?void 0:e.self_url)||window.location.href,s=(null==e?void 0:e.self_origin)||window.location.origin,o=(null==e?void 0:e.referrer_url)||document.referrer;function c(e){return L(r,e)}function d(e,t){return U(r,e,t)}function u(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(e&&""!==e)try{return new O(e,t)}catch(e){console.log(e)}}function l(){for(var t=(null==e?void 0:e.urls)||[a,o],n=0;n<t.length;n++){var r,i=u(t[n]);if(i){var s=null===(r=i.query)||void 0===r?void 0:r.gd_sdk_referrer_url;if(s&&(s=decodeURIComponent(s),P.isURL(s)))return s}}}return function(){var e;t(this,n),function(){var e=0,t=window;try{for(;t!=t.parent;)e++,t=t.parent}catch(e){d("depth.error",e.message)}d("depth.value",e)}(),function(){var e=i,t=r.depth.value,n=s;if(d("top.domain.from","fallback"),e&&e.length>0)n=e[e.length-1],d("top.domain.from","origins");else if(0===t)n=s,d("top.domain.from","self-top");else if(1===t){var a=u(o);a&&(n=a.origin,d("top.domain.from","referrer"))}d("top.domain.value",n.replace(/^https?:\/\/(www\.)?(.*)$/i,"$2"))}(),function(){var e=l();if(e)if(C(e))d("partner.domain.value",e),d("partner.domain.from","partner-domain");else{var t=u(e,!1);if(t)d("partner.domain.value",t.origin.replace(/^https?:\/\/(www\.)?(.*)$/i,"$2")),d("partner.domain.from","partner-url");else d("partner.domain.value",r.top.domain.value),d("partner.domain.from","partner-fallback")}else d("partner.domain.value",r.top.domain.value),d("partner.domain.from","fallback")}(),e=l(),0===r.depth.value?(d("partner.url.value",a),d("partner.url.from","self-top")):e?C(e)?(d("partner.url.value",a),d("partner.url.from","partner-domain")):(d("partner.url.value",e),d("partner.url.from","partner-url")):(d("partner.url.value",o),d("partner.url.from","fallback"))}.bind(this)(),{get:c,print:function(e){console.log(c(e))}}}yw({target:"String",proto:!0,forced:!kw("includes")},{includes:function(e){return!!~Ew(Aw(ww(this)),Aw(_w(e)),arguments.length>1?arguments[1]:void 0)}});var Sw="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==Sw&&Sw,Rw={searchParams:"URLSearchParams"in Sw,iterable:"Symbol"in Sw&&"iterator"in Symbol,blob:"FileReader"in Sw&&"Blob"in Sw&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in Sw,arrayBuffer:"ArrayBuffer"in Sw};if(Rw.arrayBuffer)var Dw=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],Tw=ArrayBuffer.isView||function(e){return e&&Dw.indexOf(Object.prototype.toString.call(e))>-1};function Ow(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 Iw(e){return"string"!=typeof e&&(e=String(e)),e}function Pw(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return Rw.iterable&&(t[Symbol.iterator]=function(){return t}),t}function Cw(e){this.map={},e instanceof Cw?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 Lw(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function Uw(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function Mw(e){var t=new FileReader,n=Uw(t);return t.readAsArrayBuffer(e),n}function jw(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function Bw(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:Rw.blob&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:Rw.formData&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:Rw.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():Rw.arrayBuffer&&Rw.blob&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=jw(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):Rw.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(e)||Tw(e))?this._bodyArrayBuffer=jw(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):Rw.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},Rw.blob&&(this.blob=function(){var e=Lw(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=Lw(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(Mw)}),this.text=function(){var e=Lw(this);if(e)return e;if(this._bodyBlob)return function(e){var t=new FileReader,n=Uw(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)},Rw.formData&&(this.formData=function(){return this.text().then(qw)}),this.json=function(){return this.text().then(JSON.parse)},this}Cw.prototype.append=function(e,t){e=Ow(e),t=Iw(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},Cw.prototype.delete=function(e){delete this.map[Ow(e)]},Cw.prototype.get=function(e){return e=Ow(e),this.has(e)?this.map[e]:null},Cw.prototype.has=function(e){return this.map.hasOwnProperty(Ow(e))},Cw.prototype.set=function(e,t){this.map[Ow(e)]=Iw(t)},Cw.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},Cw.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),Pw(e)},Cw.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),Pw(e)},Cw.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),Pw(e)},Rw.iterable&&(Cw.prototype[Symbol.iterator]=Cw.prototype.entries);var Gw=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function Nw(e,t){if(!(this instanceof Nw))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 Nw){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new Cw(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 Cw(t.headers)),this.method=function(e){var t=e.toUpperCase();return Gw.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 qw(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(i))}})),t}function Fw(e,t){if(!(this instanceof Fw))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 Cw(t.headers),this.url=t.url||"",this._initBody(e)}Nw.prototype.clone=function(){return new Nw(this,{body:this._bodyInit})},Bw.call(Nw.prototype),Bw.call(Fw.prototype),Fw.prototype.clone=function(){return new Fw(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new Cw(this.headers),url:this.url})},Fw.error=function(){var e=new Fw(null,{status:0,statusText:""});return e.type="error",e};var Vw=[301,302,303,307,308];Fw.redirect=function(e,t){if(-1===Vw.indexOf(t))throw new RangeError("Invalid status code");return new Fw(null,{status:t,headers:{location:e}})};var zw,Hw=Sw.DOMException;try{new Hw}catch(e){Hw=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},Hw.prototype=Object.create(Error.prototype),Hw.prototype.constructor=Hw}function Ww(e,t){return new Promise((function(n,r){var i=new Nw(e,t);if(i.signal&&i.signal.aborted)return r(new Hw("Aborted","AbortError"));var a=new XMLHttpRequest;function s(){a.abort()}a.onload=function(){var e,t,r={status:a.status,statusText:a.statusText,headers:(e=a.getAllResponseHeaders()||"",t=new Cw,e.replace(/\r?\n[\t ]+/g," ").split("\r").map((function(e){return 0===e.indexOf("\n")?e.substr(1,e.length):e})).forEach((function(e){var n=e.split(":"),r=n.shift().trim();if(r){var i=n.join(":").trim();t.append(r,i)}})),t)};r.url="responseURL"in a?a.responseURL:r.headers.get("X-Request-URL");var i="response"in a?a.response:a.responseText;setTimeout((function(){n(new Fw(i,r))}),0)},a.onerror=function(){setTimeout((function(){r(new TypeError("Network request failed"))}),0)},a.ontimeout=function(){setTimeout((function(){r(new TypeError("Network request failed"))}),0)},a.onabort=function(){setTimeout((function(){r(new Hw("Aborted","AbortError"))}),0)},a.open(i.method,function(e){try{return""===e&&Sw.location.href?Sw.location.href:e}catch(t){return e}}(i.url),!0),"include"===i.credentials?a.withCredentials=!0:"omit"===i.credentials&&(a.withCredentials=!1),"responseType"in a&&(Rw.blob?a.responseType="blob":Rw.arrayBuffer&&i.headers.get("Content-Type")&&-1!==i.headers.get("Content-Type").indexOf("application/octet-stream")&&(a.responseType="arraybuffer")),!t||"object"!=typeof t.headers||t.headers instanceof Cw?i.headers.forEach((function(e,t){a.setRequestHeader(t,e)})):Object.getOwnPropertyNames(t.headers).forEach((function(e){a.setRequestHeader(e,Iw(t.headers[e]))})),i.signal&&(i.signal.addEventListener("abort",s),a.onreadystatechange=function(){4===a.readyState&&i.signal.removeEventListener("abort",s)}),a.send(void 0===i._bodyInit?null:i._bodyInit)}))}Ww.polyfill=!0,Sw.fetch||(Sw.fetch=Ww,Sw.Headers=Cw,Sw.Request=Nw,Sw.Response=Fw);var Kw=function(e){var n=this;if(!zw){var r={gameId:e.gameId,hours:(new Date).getHours(),topDomain:uy.topDomain,domain:uy.parentDomain,referrer:uy.parentURL,depth:o(),version:as.version,byloader:uy.isTokenGameURL,isTokenGameURL:uy.isTokenGameURL,isMasterGameURL:uy.isMasterGameURL,isExtHostedGameURL:uy.isExtHostedGameURL,byloaderVersion:uy.version,tracking:ly.userDeclinedTracking,whitelabel:ly.whitelabelPartner,platform:u()};zw=new l(r)}return zw||{send:function(){t(this,n)}.bind(this)}},$w={getGameData:function(e){var n=this;try{var r=e.replace("game.api.gamedistribution.com","game-api.gamedistribution.com");fetch(r).then(function(e){t(this,n)}.bind(this)).catch(function(e){t(this,n)}.bind(this))}catch(e){}},getGameLoaderIndex:function(e){var n=this;try{var r="https://html5-prod-aws.gamedistribution.com/".concat(e,"/");fetch(r).then(function(e){t(this,n)}.bind(this)).catch(function(e){t(this,n)}.bind(this))}catch(e){}}},Qw={prod:["html5.gamedistribution.com","revision.gamedistribution.com"],acc:["html5-acc-real-aws.gamedistribution.com","acceptance-revision.gamedistribution.com"]},Yw={gameAPI:"game.api.gamedistribution.com"},Jw={gameAPI:"game-api-acc-real-aws.gamedistribution.com"},Xw=function(){var e=this,n=Qw.acc.some(function(n){var r;return t(this,e),n===(null===(r=window.location.host)||void 0===r?void 0:r.toLowerCase())}.bind(this));return{env:n?"acc":"prod",config:n?Jw:Yw}},Zw=function(e){var n=this,r=e.url;return new Promise(function(e,i){t(this,n);var a=new XMLHttpRequest;a.open("GET",r,!0),a.onreadystatechange=function(){if(4==a.readyState)if(200==a.status){var t=JSON.parse(a.responseText);e(t)}else i(Error("Error occured on request: ".concat(a.status,", ").concat(a.statusText)))},a.onerror=function(e){i(e)},a.send()}.bind(this))};function eA(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 tA(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?eA(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eA(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var nA,rA,iA,aA=new j,sA=[],oA=function(e){sA.push(e)},cA=function(){var t=e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(rA){e.next=6;break}return e.next=3,lA(iA);case 3:rA=e.sent,aA.emit("game-data-ready",rA),dA();case 6:return e.abrupt("return",rA);case 7:case"end":return e.stop()}}),e)})));return function(){return t.apply(this,arguments)}}(),dA=function(){var t,n;if(null!==(t=rA)&&void 0!==t&&null!==(n=t.aws_tst)&&void 0!==n&&n.enabled){var i,a,s,o,c;if(uA(),null!==(i=rA)&&void 0!==i&&null!==(a=i.aws_tst)&&void 0!==a&&null!==(s=a.ep)&&void 0!==s&&s.api&&null!==(o=rA)&&void 0!==o&&o.url)$w.getGameData(null===(c=rA)||void 0===c?void 0:c.url);setInterval(e(r.mark((function e(){var t;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,lA(iA);case 3:rA=e.sent,null===(t=rA)||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)}},uA=function(){var n=window.fetch;window.fetch=e(r.mark((function e(){var i,a,s,o,c,d,u,l,h,p,f,m,g,v,b,y,_,w,A,k=this,E=arguments;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(u=E.length,l=new Array(u),h=0;h<u;h++)l[h]=E[h];p=l[0],f=l[1],m=null===(i=rA)||void 0===i||null===(a=i.aws_tst)||void 0===a||null===(s=a.ep)||void 0===s?void 0:s.atm,g=null===(o=rA)||void 0===o||null===(c=o.aws_tst)||void 0===c||null===(d=c.ep)||void 0===d?void 0:d.msgrt,v=function(e,r){var i=this;t(this,k);var a=p.replace(e,r);n(a,f).then(function(){t(this,i)}.bind(this))}.bind(this);try{m&&p.indexOf("tag.atom")>0&&v("tag.atom.gamedistribution.com","atom-tag-prod-aws.gamedistribution.com"),g&&p.indexOf("msgrt.gamedistribution.com")>0&&(null===(b=rA)||void 0===b||b.aws_tst,null===(y=rA)||void 0===y||null===(_=y.aws_tst)||void 0===_||null===(w=_.ep)||void 0===w||w.msgrt,v("msgrt.gamedistribution.com","msgrt-prod-aws.gamedistribution.com"))}catch(e){}return e.next=9,n(p,f);case 9:return A=e.sent,e.abrupt("return",A);case 11:case"end":return e.stop()}}),e,this)})))},lA=function(n){var i=this;nA.send("gdfw.loading",{message:"loading"}),sA=[],oA("1"),oA("2");var a=new xw;oA("3");var s=a.get("partner.domain.value");oA("4");var o=function(){return t(this,i),{gameId:n.gameId,disableAds:{},preroll:!0,midroll:12e4,rewardedAds:!1,title:"",tags:[],category:"",assets:[],dmain:!0,sdk:{},loader:{},splash:{},promo:{},dAds:{},pAds:{},mAds:{},rAds:{}}}.bind(this);oA("5");var c=function(){t(this,i);var e=d(),r=e?"&mode=".concat(e):"",a=Xw().config;return"https://".concat(a.gameAPI,"/game/v4/get/").concat(n.gameId.replace(/-/g,""),"/?domain=").concat(s).concat(r,"&v=").concat(as.version,"&localTime=").concat((new Date).getHours())}.bind(this);oA("6");var d=function(){var e=this;t(this,i);var n=new Proxy(new URLSearchParams(window.location.search),{get:function(n,r){return t(this,e),n.get(r)}.bind(this)});return!n.gd_mode&&window.location.search.includes("gd_mode")?window.location.search.split("gd_mode=")[1]:n.gd_mode}.bind(this);return oA("7"),new Promise(function(n){var a=this;t(this,i),oA("7.1");var s=o();try{oA("7.2");var d=c();oA("7.3"),fetch(d).then(function(){var t=e(r.mark((function e(t){var n;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return oA("7.4"),e.prev=1,e.next=4,t.json();case 4:n=e.sent,e.next=13;break;case 7:return e.prev=7,e.t0=e.catch(1),e.t0,e.next=12,Zw({url:d});case 12:n=e.sent;case 13:return e.abrupt("return",n);case 14:case"end":return e.stop()}}),e,null,[[1,7]])})));return function(e){return t.apply(this,arguments)}}()).then(function(e){var r=this;if(t(this,a),oA("7.5"),e.success){var i,o,c,u=e.result.game;oA("7.6");var l={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,publishedAt:u.publishedAt,tags:u.tags,category:u.category,assets:u.assets,disp_2nd_prer:u.disp_2nd_prer,ctry_vst:u.ctry_vst,ctry:u.ctry,crtv:u.crtv,dmain:u.dmain,aws_tst:u.aws_tst,meta:u.meta,__t4r:ss(u.__t4r)||{},block_exts:ss(u.push_cuda),bloc_gard:ss(u.bloc_gard),cookie:ss(u.cookie),gdpr:ss(u.gdpr),diagnostic:ss(u.diagnostic),cmp:ss(u.cmp),gft:ss(u.gft)||{},sdk:ss(u.sdk)||{},sdkfw:ss(u.sdkfw)||{},loader:ss(u.loader)||{},splash:ss(u.splash)||{},promo:ss(u.promo)||{},dAds:ss(u.dads)||{},pAds:ss(u.pads)||{},mAds:ss(u.mads)||{},rAds:ss(u.rads)||{},lp:ss(u.lp)||{},extsc:ss(u.extsc)||{},evnts:ss(u.evnts)||{},dp:ss(u.dp)||{},adflw:ss(u.adflw)||{},afgszf:ss(u.afgszf)||{},fllc:ss(u.fllc)||{},lotm:ss(u.lotm)||{},t4rc:ss(u.t4rc)||{},midroll_plus:ss(u.midroll_plus)||{},gmky:ss(u.gmky)||{},urlBlockExc:ss(u.url_blck_exc)||{}};oA("7.7");var p=h(M(s),l);oA("7.8"),p.afg_disabled=!1===(null===(i=p.sdk)||void 0===i||null===(o=i.afg)||void 0===o?void 0:o.enabled),p.url=d,function(){t(this,r),void 0!==us.afgEnabled&&(p.afg_disabled=!us.afgEnabled),void 0!==us.promoEnabled&&(p.promo=p.promo||{},p.promo=tA(tA({},p.promo),{},{rainbow:{enabled:us.promoEnabled}}))}.bind(this),oA("7.9"),null!==(c=p.pAds)&&void 0!==c&&c.enabled&&(p.preroll=!0),oA("7.10"),nA.send("gdfw.success",{message:"success"}),n(p)}else{s.failed=!0;var f=sA[sA.length-1];nA.send("gdfw.err",{message:"".concat(f,": json error")}),n(s)}}.bind(this)).catch(function(e){t(this,a);var r=sA[sA.length-1];nA.send("gdfw.err",{message:"".concat(r,": ").concat(e.message?e.message:e)}),s.failed=!0,n(s)}.bind(this))}catch(e){var u=sA[sA.length-1];nA.send("gdfw.err",{message:"".concat(u,": global ").concat(e.message?e.message:e)}),s.failed=!0,n(s)}}.bind(this))},hA=function(){var t=e(r.mark((function e(){var t,n;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,cA();case 2:return n=e.sent,e.abrupt("return",!(null==n||null===(t=n.sdkfw)||void 0===t||!t.enabled));case 4:case"end":return e.stop()}}),e)})));return function(){return t.apply(this,arguments)}}(),pA=function(){var t=e(r.mark((function e(){var t,n,i;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,cA();case 2:return n=e.sent,i=null==n||null===(t=n.diagnostic)||void 0===t||!t.close_ga,e.abrupt("return",i);case 5:case"end":return e.stop()}}),e)})));return function(){return t.apply(this,arguments)}}(),fA=function(){var t=e(r.mark((function e(){var t,n;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,cA();case 2:return n=e.sent,e.next=5,hA();case 5:if(e.t0=e.sent,!e.t0){e.next=8;break}e.t0=!(null==n||null===(t=n.sdkfw)||void 0===t||!t.handshake);case 8:return e.abrupt("return",e.t0);case 9:case"end":return e.stop()}}),e)})));return function(){return t.apply(this,arguments)}}(),mA=function(){var t=e(r.mark((function e(){var t,n,i,a,s,o,c,d;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,cA();case 2:return c=e.sent,d=!(null==c||null===(t=c.extsc)||void 0===t||!t.enabled),e.abrupt("return",{enabled:d,path:d?null==c||null===(n=c.extsc)||void 0===n?void 0:n.path:"",name:d?null==c||null===(i=c.extsc)||void 0===i?void 0:i.name:"",ref:d?null==c||null===(a=c.extsc)||void 0===a?void 0:a.ref:"",loadedFlag:d?null==c||null===(s=c.extsc)||void 0===s?void 0:s.loadedFlag:void 0,loadedFlagCheck:!!d&&!(null==c||null===(o=c.extsc)||void 0===o||!o.loadedFlagCheck)});case 5:case"end":return e.stop()}}),e)})));return function(){return t.apply(this,arguments)}}(),gA=function(){var n=e(r.mark((function e(){var n,i,a,s,o,c=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,mA();case 2:if((n=e.sent).enabled){e.next=5;break}return e.abrupt("return");case 5:return i=n.path,a=n.name,s=n.ref,e.prev=6,o={},e.next=10,f(i,a,{error_prefix:"Blocked:",exists:function(){return t(this,c),!!s&&!!window[s]}.bind(this),attrs:o});case 10:e.next=16;break;case 12:e.prev=12,e.t0=e.catch(6),console.log("extsc: error on external partner script load",a,e.t0),p("DEVELOPER_ERROR",e.t0,"warning");case 16:case"end":return e.stop()}}),e,this,[[6,12]])})));return function(){return n.apply(this,arguments)}}(),vA=!1,bA=!1,yA=function(){return new Promise(function(){var n=e(r.mark((function e(n,i){var a,s,o,c,d,u=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!vA){e.next=4;break}return e.abrupt("return",n(bA));case 4:vA=!0;case 5:return e.next=7,mA();case 7:if((a=e.sent).enabled){e.next=10;break}return e.abrupt("return",n(!1));case 10:if(s=a.loadedFlag,!(o=a.loadedFlagCheck)||s){e.next=13;break}return e.abrupt("return",n(!1));case 13:if(o){e.next=16;break}return bA=!0,e.abrupt("return",n(!0));case 16:c=!0,setTimeout(function(){t(this,u),c&&(c=!1,vA=!0,n(!1))}.bind(this),5e3),d=setInterval(function(){t(this,u),c&&o&&window[s]?(c=!1,vA=!0,bA=!0,clearInterval(d),n(!0)):c||clearInterval(d)}.bind(this),100);case 19:case"end":return e.stop()}}),e,this)})));return function(e,t){return n.apply(this,arguments)}}())},_A=Ya,wA=um,AA=ne,kA=yt,EA=Je,xA=af,SA=hv,RA=fr,DA=wA&&wA.prototype;if(_A({target:"Promise",proto:!0,real:!0,forced:!!wA&&AA((function(){DA.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=xA(this,kA("Promise")),n=EA(e);return this.then(n?function(n){return SA(t,e()).then((function(){return n}))}:e,n?function(n){return SA(t,e()).then((function(){throw n}))}:e)}}),EA(wA)){var TA=kA("Promise").prototype.finally;DA.finally!==TA&&RA(DA,"finally",TA,{unsafe:!0})}var OA="\t\n\v\f\r                 \u2028\u2029\ufeff",IA=he,PA=ps,CA=OA,LA=ce("".replace),UA=RegExp("^["+CA+"]+"),MA=RegExp("(^|[^"+CA+"])["+CA+"]+$"),jA=function(e){return function(t){var n=PA(IA(t));return 1&e&&(n=LA(n,UA,"")),2&e&&(n=LA(n,MA,"$1")),n}},BA={start:jA(1),end:jA(2),trim:jA(3)},GA=pn.PROPER,NA=ne,qA=OA,FA=BA.trim;Ya({target:"String",proto:!0,forced:function(e){return NA((function(){return!!qA[e]()||"​…᠎"!=="​…᠎"[e]()||GA&&qA[e].name!==e}))}("trim")},{trim:function(){return FA(this)}});var VA=Ya,zA=Ti.find,HA=pp,WA="find",KA=!0;WA in[]&&Array(1)[WA]((function(){KA=!1})),VA({target:"Array",proto:!0,forced:KA},{find:function(e){return zA(this,e,arguments.length>1?arguments[1]:void 0)}}),HA(WA);var $A=Je,QA=nt,YA=Cl,JA=Xe.f,XA=Ze,ZA=H,ek=ce,tk=Fa,nk=function(e,t,n){var r,i;return YA&&$A(r=t.constructor)&&r!==n&&QA(i=r.prototype)&&i!==n.prototype&&YA(e,i),e},rk=Rn,ik=ra.f,ak=_t,sk=eb,ok=ps,ck=kb,dk=mh,uk=function(e,t,n){n in e||JA(e,n,{configurable:!0,get:function(){return t[n]},set:function(e){t[n]=e}})},lk=fr,hk=ne,pk=be,fk=Wn.enforce,mk=Kp,gk=bh,vk=wh,bk=He("match"),yk=ZA.RegExp,_k=yk.prototype,wk=ZA.SyntaxError,Ak=ek(_k.exec),kk=ek("".charAt),Ek=ek("".replace),xk=ek("".indexOf),Sk=ek("".slice),Rk=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,Dk=/a/g,Tk=/a/g,Ok=new yk(Dk)!==Dk,Ik=dk.MISSED_STICKY,Pk=dk.UNSUPPORTED_Y,Ck=XA&&(!Ok||Ik||gk||vk||hk((function(){return Tk[bk]=!1,yk(Dk)!=Dk||yk(Tk)==Tk||"/a/i"!=yk(Dk,"i")})));if(tk("RegExp",Ck)){for(var Lk=function(e,t){var n,r,i,a,s,o,c=ak(_k,this),d=sk(e),u=void 0===t,l=[],h=e;if(!c&&d&&u&&e.constructor===Lk)return e;if((d||ak(_k,e))&&(e=e.source,u&&(t=ck(h))),e=void 0===e?"":ok(e),t=void 0===t?"":ok(t),h=e,gk&&"dotAll"in Dk&&(r=!!t&&xk(t,"s")>-1)&&(t=Ek(t,/s/g,"")),n=t,Ik&&"sticky"in Dk&&(i=!!t&&xk(t,"y")>-1)&&Pk&&(t=Ek(t,/y/g,"")),vk&&(a=function(e){for(var t,n=e.length,r=0,i="",a=[],s={},o=!1,c=!1,d=0,u="";r<=n;r++){if("\\"===(t=kk(e,r)))t+=kk(e,++r);else if("]"===t)o=!1;else if(!o)switch(!0){case"["===t:o=!0;break;case"("===t:Ak(Rk,Sk(e,r+1))&&(r+=2,c=!0),i+=t,d++;continue;case">"===t&&c:if(""===u||pk(s,u))throw new wk("Invalid capture group name");s[u]=!0,a[a.length]=[u,d],c=!1,u="";continue}c?u+=t:i+=t}return[i,a]}(e),e=a[0],l=a[1]),s=nk(yk(e,t),c?this:_k,Lk),(r||i||l.length)&&(o=fk(s),r&&(o.dotAll=!0,o.raw=Lk(function(e){for(var t,n=e.length,r=0,i="",a=!1;r<=n;r++)"\\"!==(t=kk(e,r))?a||"."!==t?("["===t?a=!0:"]"===t&&(a=!1),i+=t):i+="[\\s\\S]":i+=t+kk(e,++r);return i}(e),n)),i&&(o.sticky=!0),l.length&&(o.groups=l)),e!==h)try{rk(s,"source",""===h?"(?:)":h)}catch(e){}return s},Uk=ik(yk),Mk=0;Uk.length>Mk;)uk(Lk,yk,Uk[Mk++]);_k.constructor=Lk,Lk.prototype=_k,lk(ZA,"RegExp",Lk,{constructor:!0})}mk("RegExp");var jk=Ya,Bk=Vr,Gk=Ki,Nk=Ii,qk=ce([].join);jk({target:"Array",proto:!0,forced:Bk!=Object||!Nk("join",",")},{join:function(e){return qk(Gk(this),void 0===e?",":e)}});var Fk=Ti.map;Ya({target:"Array",proto:!0,forced:!Td("map")},{map:function(e){return Fk(this,e,arguments.length>1?arguments[1]:void 0)}});var Vk=Ze,zk=ce,Hk=gt,Wk=ne,Kk=Za,$k=Aa,Qk=qi,Yk=me,Jk=Vr,Xk=Object.assign,Zk=Object.defineProperty,eE=zk([].concat),tE=!Xk||Wk((function(){if(Vk&&1!==Xk({b:1},Xk(Zk({},"a",{enumerable:!0,get:function(){Zk(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!=Xk({},e)[n]||Kk(Xk({},t)).join("")!=r}))?function(e,t){for(var n=Yk(e),r=arguments.length,i=1,a=$k.f,s=Qk.f;r>i;)for(var o,c=Jk(arguments[i++]),d=a?eE(Kk(c),a(c)):Kk(c),u=d.length,l=0;u>l;)o=d[l++],Vk&&!Hk(s,c,o)||(n[o]=c[o]);return n}:Xk,nE=tE;Ya({target:"Object",stat:!0,arity:2,forced:Object.assign!==nE},{assign:nE});var rE,iE=ce,aE=2147483647,sE=/[^\0-\u007E]/,oE=/[.\u3002\uFF0E\uFF61]/g,cE="Overflow: input needs wider integers to process",dE=RangeError,uE=iE(oE.exec),lE=Math.floor,hE=String.fromCharCode,pE=iE("".charCodeAt),fE=iE([].join),mE=iE([].push),gE=iE("".replace),vE=iE("".split),bE=iE("".toLowerCase),yE=function(e){return e+22+75*(e<26)},_E=function(e,t,n){var r=0;for(e=n?lE(e/700):e>>1,e+=lE(e/t);e>455;)e=lE(e/35),r+=36;return lE(r+36*e/(e+38))},wE=function(e){var t=[];e=function(e){for(var t=[],n=0,r=e.length;n<r;){var i=pE(e,n++);if(i>=55296&&i<=56319&&n<r){var a=pE(e,n++);56320==(64512&a)?mE(t,((1023&i)<<10)+(1023&a)+65536):(mE(t,i),n--)}else mE(t,i)}return t}(e);var n,r,i=e.length,a=128,s=0,o=72;for(n=0;n<e.length;n++)(r=e[n])<128&&mE(t,hE(r));var c=t.length,d=c;for(c&&mE(t,"-");d<i;){var u=aE;for(n=0;n<e.length;n++)(r=e[n])>=a&&r<u&&(u=r);var l=d+1;if(u-a>lE((aE-s)/l))throw dE(cE);for(s+=(u-a)*l,a=u,n=0;n<e.length;n++){if((r=e[n])<a&&++s>aE)throw dE(cE);if(r==a){for(var h=s,p=36;;){var f=p<=o?1:p>=o+26?26:p-o;if(h<f)break;var m=h-f,g=36-f;mE(t,hE(yE(f+m%g))),h=lE(m/g),p+=36}mE(t,hE(yE(h))),o=_E(s,l,d==c),s=0,d++}}s++,a++}return fE(t,"")},AE=Ya,kE=Ze,EE=Qy,xE=H,SE=Br,RE=ce,DE=fr,TE=no,OE=Yp,IE=be,PE=tE,CE=Uu,LE=$s,UE=Zu.codeAt,ME=function(e){var t,n,r=[],i=vE(gE(bE(e),oE,"."),".");for(t=0;t<i.length;t++)n=i[t],mE(r,uE(sE,n)?"xn--"+wE(n):n);return fE(r,".")},jE=ps,BE=bo,GE=of,NE=gw,qE=Wn,FE=qE.set,VE=qE.getterFor("URL"),zE=NE.URLSearchParams,HE=NE.getState,WE=xE.URL,KE=xE.TypeError,$E=xE.parseInt,QE=Math.floor,YE=Math.pow,JE=RE("".charAt),XE=RE(/./.exec),ZE=RE([].join),ex=RE(1..toString),tx=RE([].pop),nx=RE([].push),rx=RE("".replace),ix=RE([].shift),ax=RE("".split),sx=RE("".slice),ox=RE("".toLowerCase),cx=RE([].unshift),dx="Invalid scheme",ux="Invalid host",lx="Invalid port",hx=/[a-z]/i,px=/[\d+-.a-z]/i,fx=/\d/,mx=/^0x/i,gx=/^[0-7]+$/,vx=/^\d+$/,bx=/^[\da-f]+$/i,yx=/[\0\t\n\r #%/:<>?@[\\\]^|]/,_x=/[\0\t\n\r #/:<>?@[\\\]^|]/,wx=/^[\u0000-\u0020]+/,Ax=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,kx=/[\t\n\r]/g,Ex=function(e){var t,n,r,i;if("number"==typeof e){for(t=[],n=0;n<4;n++)cx(t,e%256),e=QE(e/256);return ZE(t,".")}if("object"==typeof e){for(t="",r=function(e){for(var t=null,n=1,r=null,i=0,a=0;a<8;a++)0!==e[a]?(i>n&&(t=r,n=i),r=null,i=0):(null===r&&(r=a),++i);return i>n&&(t=r,n=i),t}(e),n=0;n<8;n++)i&&0===e[n]||(i&&(i=!1),r===n?(t+=n?":":"::",i=!0):(t+=ex(e[n],16),n<7&&(t+=":")));return"["+t+"]"}return e},xx={},Sx=PE({},xx,{" ":1,'"':1,"<":1,">":1,"`":1}),Rx=PE({},Sx,{"#":1,"?":1,"{":1,"}":1}),Dx=PE({},Rx,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),Tx=function(e,t){var n=UE(e,0);return n>32&&n<127&&!IE(t,e)?e:encodeURIComponent(e)},Ox={ftp:21,file:null,http:80,https:443,ws:80,wss:443},Ix=function(e,t){var n;return 2==e.length&&XE(hx,JE(e,0))&&(":"==(n=JE(e,1))||!t&&"|"==n)},Px=function(e){var t;return e.length>1&&Ix(sx(e,0,2))&&(2==e.length||"/"===(t=JE(e,2))||"\\"===t||"?"===t||"#"===t)},Cx=function(e){return"."===e||"%2e"===ox(e)},Lx={},Ux={},Mx={},jx={},Bx={},Gx={},Nx={},qx={},Fx={},Vx={},zx={},Hx={},Wx={},Kx={},$x={},Qx={},Yx={},Jx={},Xx={},Zx={},eS={},tS=function(e,t,n){var r,i,a,s=jE(e);if(t){if(i=this.parse(s))throw KE(i);this.searchParams=null}else{if(void 0!==n&&(r=new tS(n,!0)),i=this.parse(s,null,r))throw KE(i);(a=HE(new zE)).bindURL(this),this.searchParams=a}};tS.prototype={type:"URL",parse:function(e,t,n){var r,i,a,s,o,c=this,d=t||Lx,u=0,l="",h=!1,p=!1,f=!1;for(e=jE(e),t||(c.scheme="",c.username="",c.password="",c.host=null,c.port=null,c.path=[],c.query=null,c.fragment=null,c.cannotBeABaseURL=!1,e=rx(e,wx,""),e=rx(e,Ax,"$1")),e=rx(e,kx,""),r=CE(e);u<=r.length;){switch(i=r[u],d){case Lx:if(!i||!XE(hx,i)){if(t)return dx;d=Mx;continue}l+=ox(i),d=Ux;break;case Ux:if(i&&(XE(px,i)||"+"==i||"-"==i||"."==i))l+=ox(i);else{if(":"!=i){if(t)return dx;l="",d=Mx,u=0;continue}if(t&&(c.isSpecial()!=IE(Ox,l)||"file"==l&&(c.includesCredentials()||null!==c.port)||"file"==c.scheme&&!c.host))return;if(c.scheme=l,t)return void(c.isSpecial()&&Ox[c.scheme]==c.port&&(c.port=null));l="","file"==c.scheme?d=Kx:c.isSpecial()&&n&&n.scheme==c.scheme?d=jx:c.isSpecial()?d=qx:"/"==r[u+1]?(d=Bx,u++):(c.cannotBeABaseURL=!0,nx(c.path,""),d=Xx)}break;case Mx:if(!n||n.cannotBeABaseURL&&"#"!=i)return dx;if(n.cannotBeABaseURL&&"#"==i){c.scheme=n.scheme,c.path=LE(n.path),c.query=n.query,c.fragment="",c.cannotBeABaseURL=!0,d=eS;break}d="file"==n.scheme?Kx:Gx;continue;case jx:if("/"!=i||"/"!=r[u+1]){d=Gx;continue}d=Fx,u++;break;case Bx:if("/"==i){d=Vx;break}d=Jx;continue;case Gx:if(c.scheme=n.scheme,i==rE)c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=LE(n.path),c.query=n.query;else if("/"==i||"\\"==i&&c.isSpecial())d=Nx;else if("?"==i)c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=LE(n.path),c.query="",d=Zx;else{if("#"!=i){c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=LE(n.path),c.path.length--,d=Jx;continue}c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=LE(n.path),c.query=n.query,c.fragment="",d=eS}break;case Nx:if(!c.isSpecial()||"/"!=i&&"\\"!=i){if("/"!=i){c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,d=Jx;continue}d=Vx}else d=Fx;break;case qx:if(d=Fx,"/"!=i||"/"!=JE(l,u+1))continue;u++;break;case Fx:if("/"!=i&&"\\"!=i){d=Vx;continue}break;case Vx:if("@"==i){h&&(l="%40"+l),h=!0,a=CE(l);for(var m=0;m<a.length;m++){var g=a[m];if(":"!=g||f){var v=Tx(g,Dx);f?c.password+=v:c.username+=v}else f=!0}l=""}else if(i==rE||"/"==i||"?"==i||"#"==i||"\\"==i&&c.isSpecial()){if(h&&""==l)return"Invalid authority";u-=CE(l).length+1,l="",d=zx}else l+=i;break;case zx:case Hx:if(t&&"file"==c.scheme){d=Qx;continue}if(":"!=i||p){if(i==rE||"/"==i||"?"==i||"#"==i||"\\"==i&&c.isSpecial()){if(c.isSpecial()&&""==l)return ux;if(t&&""==l&&(c.includesCredentials()||null!==c.port))return;if(s=c.parseHost(l))return s;if(l="",d=Yx,t)return;continue}"["==i?p=!0:"]"==i&&(p=!1),l+=i}else{if(""==l)return ux;if(s=c.parseHost(l))return s;if(l="",d=Wx,t==Hx)return}break;case Wx:if(!XE(fx,i)){if(i==rE||"/"==i||"?"==i||"#"==i||"\\"==i&&c.isSpecial()||t){if(""!=l){var b=$E(l,10);if(b>65535)return lx;c.port=c.isSpecial()&&b===Ox[c.scheme]?null:b,l=""}if(t)return;d=Yx;continue}return lx}l+=i;break;case Kx:if(c.scheme="file","/"==i||"\\"==i)d=$x;else{if(!n||"file"!=n.scheme){d=Jx;continue}if(i==rE)c.host=n.host,c.path=LE(n.path),c.query=n.query;else if("?"==i)c.host=n.host,c.path=LE(n.path),c.query="",d=Zx;else{if("#"!=i){Px(ZE(LE(r,u),""))||(c.host=n.host,c.path=LE(n.path),c.shortenPath()),d=Jx;continue}c.host=n.host,c.path=LE(n.path),c.query=n.query,c.fragment="",d=eS}}break;case $x:if("/"==i||"\\"==i){d=Qx;break}n&&"file"==n.scheme&&!Px(ZE(LE(r,u),""))&&(Ix(n.path[0],!0)?nx(c.path,n.path[0]):c.host=n.host),d=Jx;continue;case Qx:if(i==rE||"/"==i||"\\"==i||"?"==i||"#"==i){if(!t&&Ix(l))d=Jx;else if(""==l){if(c.host="",t)return;d=Yx}else{if(s=c.parseHost(l))return s;if("localhost"==c.host&&(c.host=""),t)return;l="",d=Yx}continue}l+=i;break;case Yx:if(c.isSpecial()){if(d=Jx,"/"!=i&&"\\"!=i)continue}else if(t||"?"!=i)if(t||"#"!=i){if(i!=rE&&(d=Jx,"/"!=i))continue}else c.fragment="",d=eS;else c.query="",d=Zx;break;case Jx:if(i==rE||"/"==i||"\\"==i&&c.isSpecial()||!t&&("?"==i||"#"==i)){if(".."===(o=ox(o=l))||"%2e."===o||".%2e"===o||"%2e%2e"===o?(c.shortenPath(),"/"==i||"\\"==i&&c.isSpecial()||nx(c.path,"")):Cx(l)?"/"==i||"\\"==i&&c.isSpecial()||nx(c.path,""):("file"==c.scheme&&!c.path.length&&Ix(l)&&(c.host&&(c.host=""),l=JE(l,0)+":"),nx(c.path,l)),l="","file"==c.scheme&&(i==rE||"?"==i||"#"==i))for(;c.path.length>1&&""===c.path[0];)ix(c.path);"?"==i?(c.query="",d=Zx):"#"==i&&(c.fragment="",d=eS)}else l+=Tx(i,Rx);break;case Xx:"?"==i?(c.query="",d=Zx):"#"==i?(c.fragment="",d=eS):i!=rE&&(c.path[0]+=Tx(i,xx));break;case Zx:t||"#"!=i?i!=rE&&("'"==i&&c.isSpecial()?c.query+="%27":c.query+="#"==i?"%23":Tx(i,xx)):(c.fragment="",d=eS);break;case eS:i!=rE&&(c.fragment+=Tx(i,Sx))}u++}},parseHost:function(e){var t,n,r;if("["==JE(e,0)){if("]"!=JE(e,e.length-1))return ux;if(t=function(e){var t,n,r,i,a,s,o,c=[0,0,0,0,0,0,0,0],d=0,u=null,l=0,h=function(){return JE(e,l)};if(":"==h()){if(":"!=JE(e,1))return;l+=2,u=++d}for(;h();){if(8==d)return;if(":"!=h()){for(t=n=0;n<4&&XE(bx,h());)t=16*t+$E(h(),16),l++,n++;if("."==h()){if(0==n)return;if(l-=n,d>6)return;for(r=0;h();){if(i=null,r>0){if(!("."==h()&&r<4))return;l++}if(!XE(fx,h()))return;for(;XE(fx,h());){if(a=$E(h(),10),null===i)i=a;else{if(0==i)return;i=10*i+a}if(i>255)return;l++}c[d]=256*c[d]+i,2!=++r&&4!=r||d++}if(4!=r)return;break}if(":"==h()){if(l++,!h())return}else if(h())return;c[d++]=t}else{if(null!==u)return;l++,u=++d}}if(null!==u)for(s=d-u,d=7;0!=d&&s>0;)o=c[d],c[d--]=c[u+s-1],c[u+--s]=o;else if(8!=d)return;return c}(sx(e,1,-1)),!t)return ux;this.host=t}else if(this.isSpecial()){if(e=ME(e),XE(yx,e))return ux;if(t=function(e){var t,n,r,i,a,s,o,c=ax(e,".");if(c.length&&""==c[c.length-1]&&c.length--,(t=c.length)>4)return e;for(n=[],r=0;r<t;r++){if(""==(i=c[r]))return e;if(a=10,i.length>1&&"0"==JE(i,0)&&(a=XE(mx,i)?16:8,i=sx(i,8==a?1:2)),""===i)s=0;else{if(!XE(10==a?vx:8==a?gx:bx,i))return e;s=$E(i,a)}nx(n,s)}for(r=0;r<t;r++)if(s=n[r],r==t-1){if(s>=YE(256,5-t))return null}else if(s>255)return null;for(o=tx(n),r=0;r<n.length;r++)o+=n[r]*YE(256,3-r);return o}(e),null===t)return ux;this.host=t}else{if(XE(_x,e))return ux;for(t="",n=CE(e),r=0;r<n.length;r++)t+=Tx(n[r],xx);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return IE(Ox,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"==this.scheme&&1==t&&Ix(e[0],!0)||e.length--},serialize:function(){var e=this,t=e.scheme,n=e.username,r=e.password,i=e.host,a=e.port,s=e.path,o=e.query,c=e.fragment,d=t+":";return null!==i?(d+="//",e.includesCredentials()&&(d+=n+(r?":"+r:"")+"@"),d+=Ex(i),null!==a&&(d+=":"+a)):"file"==t&&(d+="//"),d+=e.cannotBeABaseURL?s[0]:s.length?"/"+ZE(s,"/"):"",null!==o&&(d+="?"+o),null!==c&&(d+="#"+c),d},setHref:function(e){var t=this.parse(e);if(t)throw KE(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"==e)try{return new nS(e.path[0]).origin}catch(e){return"null"}return"file"!=e&&this.isSpecial()?e+"://"+Ex(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(jE(e)+":",Lx)},getUsername:function(){return this.username},setUsername:function(e){var t=CE(jE(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var n=0;n<t.length;n++)this.username+=Tx(t[n],Dx)}},getPassword:function(){return this.password},setPassword:function(e){var t=CE(jE(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var n=0;n<t.length;n++)this.password+=Tx(t[n],Dx)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?Ex(e):Ex(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,zx)},getHostname:function(){var e=this.host;return null===e?"":Ex(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,Hx)},getPort:function(){var e=this.port;return null===e?"":jE(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""==(e=jE(e))?this.port=null:this.parse(e,Wx))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+ZE(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,Yx))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""==(e=jE(e))?this.query=null:("?"==JE(e,0)&&(e=sx(e,1)),this.query="",this.parse(e,Zx)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!=(e=jE(e))?("#"==JE(e,0)&&(e=sx(e,1)),this.fragment="",this.parse(e,eS)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var nS=function(e){var t=OE(this,rS),n=GE(arguments.length,1)>1?arguments[1]:void 0,r=FE(t,new tS(e,!1,n));kE||(t.href=r.serialize(),t.origin=r.getOrigin(),t.protocol=r.getProtocol(),t.username=r.getUsername(),t.password=r.getPassword(),t.host=r.getHost(),t.hostname=r.getHostname(),t.port=r.getPort(),t.pathname=r.getPathname(),t.search=r.getSearch(),t.searchParams=r.getSearchParams(),t.hash=r.getHash())},rS=nS.prototype,iS=function(e,t){return{get:function(){return VE(this)[e]()},set:t&&function(e){return VE(this)[t](e)},configurable:!0,enumerable:!0}};if(kE&&(TE(rS,"href",iS("serialize","setHref")),TE(rS,"origin",iS("getOrigin")),TE(rS,"protocol",iS("getProtocol","setProtocol")),TE(rS,"username",iS("getUsername","setUsername")),TE(rS,"password",iS("getPassword","setPassword")),TE(rS,"host",iS("getHost","setHost")),TE(rS,"hostname",iS("getHostname","setHostname")),TE(rS,"port",iS("getPort","setPort")),TE(rS,"pathname",iS("getPathname","setPathname")),TE(rS,"search",iS("getSearch","setSearch")),TE(rS,"searchParams",iS("getSearchParams")),TE(rS,"hash",iS("getHash","setHash"))),DE(rS,"toJSON",(function(){return VE(this).serialize()}),{enumerable:!0}),DE(rS,"toString",(function(){return VE(this).serialize()}),{enumerable:!0}),WE){var aS=WE.createObjectURL,sS=WE.revokeObjectURL;aS&&DE(nS,"createObjectURL",SE(aS,WE)),sS&&DE(nS,"revokeObjectURL",SE(sS,WE))}BE(nS,"URL"),AE({global:!0,constructor:!0,forced:!EE,sham:!kE},{URL:nS});var oS=function(){function e(t){D(this,e),this.gameData=t,this.customParamKeys=["vid","_1ld","_1lp"]}return R(e,[{key:"_getFakeCustomParams",value:function(){var e={_vid:["bla_bla1","bla_bla2","bla_bla3"],_1ld:["1ld_1","1ld_2","1ld_3","1ld_4"],_1lp:["1lp_1","1lp_2"]},t={};for(var n in e){var r=e[n];t[n]=r[Math.floor(Math.random()*r.length)]}return t}},{key:"checkCustomParams",value:function(){var e=this;try{var n={},r=this.gameData.diagnostic&&this.gameData.diagnostic.cp&&this.gameData.diagnostic.cp.enabled,i=new O(location.href,!0);for(var a in i.query)n[a]=i.query[a];return Object.keys(n).filter(function(n){var r=this;return t(this,e),this.customParamKeys.some(function(e){return t(this,r),e===n}.bind(this))}.bind(this)).length>0||r?(console.log("custom-params",n,r),n):void console.log("custom-params, none")}catch(e){console.log("_checkCustomParams.Error",e)}}}]),e}(),cS=function(){function e(t,n){D(this,e),this.adContainer=t,this.onResume=n}return R(e,[{key:"show",value:function(){this.adResumeButton.style.display="block",this.adResumeButtonOverlay.style.display="block"}},{key:"hide",value:function(){this.adResumeButton.style.display="none",this.adResumeButtonOverlay.style.display="none"}},{key:"add",value:function(){var e=this;try{var n=document.createElement("div");this.adResumeButton=n,n.id="gd__resume__button",n.setAttribute("title","Resume"),this.addStyles(),n.classList.add("gd__resume__button"),n.addEventListener("click",function(){t(this,e),this.onResume()}.bind(this)),this.adContainer.appendChild(n);var r=document.createElement("div");this.adResumeButtonOverlay=r,r.id="gd__resume__button__overlay",r.classList.add("gd__resume__button__overlay"),this.adContainer.appendChild(r)}catch(e){console.log("Resume button add error",e)}}},{key:"addStyles",value:function(){var e=document.body||document.getElementsByTagName("body")[0];this.addStylesheet("gd__resume__button__style",e,'\n .gd__resume__button{\n background-image: url("https://img.gamedistribution.com/play-black.svg");\n background-color:white; \n width: 120px;\n height: 120px;\n position: absolute;\n display: none;\n z-index: 2000;\n cursor: pointer;\n top: calc(50% - 60px);\n left: calc(50% - 60px);\n margin: 0;\n border-radius: 50%;\n border: 2px solid white;\n animation: play-button 1s ease-in-out infinite alternate;\n -webkit-animation: play-button 1s ease-in-out infinite alternate;\n }\n \n .gd__resume__button__overlay {\n position: fixed;\n display: none;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: rgba(0,0,0,0.5);\n z-index: 1999;\n cursor: pointer;\n }\n @keyframes play-button {\n 0% {\n transform: scale(1.0);\n -webkit-transform: scale(1.0);\n }\n 100% {\n transform: scale(1.1);\n -webkit-transform: scale(1.1);\n }\n }\n .gd__resume__button:hover{\n filter: invert(100%) sepia(51%) saturate(0%) hue-rotate(346deg) brightness(104%) contrast(100%); \n }\n ')}},{key:"addStylesheet",value:function(e,t,n){if(!document.getElementById(e)){var r=document.createElement("style");r.type="text/css",r.id=e,r.styleSheet?r.styleSheet.cssText=n:r.appendChild(document.createTextNode(n)),t.appendChild(r)}}}]),e}(),dS=function(){function e(t,n){D(this,e),this.adContainer=t,this.onResume=n}return R(e,[{key:"show",value:function(){this.rewardLabel.style.display="block"}},{key:"hide",value:function(){this.rewardLabel.style.display="none"}},{key:"add",value:function(){try{var e=document.createElement("div");this.rewardLabel=e;var t=document.createElement("span");t.innerText="To receive the reward, please do not skip the ad",this.addStyles(),e.classList.add("gd__reward__label"),t.classList.add("gd__reward__span"),this.rewardLabel.appendChild(t),this.adContainer.appendChild(e)}catch(e){console.log(e)}}},{key:"addStyles",value:function(){var e=document.body||document.getElementsByTagName("body")[0];this.addStylesheet("gd__reward__label__style",e,"\n .gd__reward__label{\n background-color:black; \n width: 160px;\n // height: 35px;\n position: absolute;\n display: none;\n z-index: 2000;\n cursor: pointer;\n bottom: 40px;\n left: 10px;\n margin: 0;\n border-radius: 5px;\n border: .5px solid gray;\n text-align: center;\n }\n .gd__reward__label:hover{\n filter: invert(100%) sepia(51%) saturate(0%) hue-rotate(346deg) brightness(104%) contrast(100%); \n }\n .gd__reward__span{\n color: white;\n font-size: 12px;\n padding-left: 5px;\n font-family: Verdana, Arial, Helvetica, sans-serif;\n text-align: center;\n }\n ")}},{key:"addStylesheet",value:function(e,t,n){if(!document.getElementById(e)){var r=document.createElement("style");r.type="text/css",r.id=e,r.styleSheet?r.styleSheet.cssText=n:r.appendChild(document.createTextNode(n)),t.appendChild(r)}}}]),e}(),uS=function(){function e(t){D(this,e),this.adContainer=t}return R(e,[{key:"show",value:function(){this.audioLabel.style.display="block"}},{key:"hide",value:function(){this.audioLabel.style.display="none"}},{key:"mute",value:function(){document.getElementById("game").contentWindow.postMessage("mute","*")}},{key:"unmute",value:function(){document.getElementById("game").contentWindow.postMessage("unmute","*")}},{key:"add",value:function(){try{var e=document.createElement("div");this.audioLabel=e;var t=document.createElement("span");t.innerText="Audio Ad is Playing";var n=document.createElement("span");n.innerHTML="&#9432;",this.addStyles(),e.classList.add("gd__audio__label"),t.classList.add("gd__audio__span"),n.classList.add("gd__audio__span"),this.audioLabel.appendChild(n),this.audioLabel.appendChild(t),this.adContainer.appendChild(e)}catch(e){console.log(e)}}},{key:"addStyles",value:function(){var e=document.body||document.getElementsByTagName("body")[0];this.addStylesheet("gd__audio__label__style",e,"\n .gd__audio__label{\n background-color: #ffca00; \n width: 200px;\n position: relative;\n display: none;\n z-index: 2000;\n cursor: pointer;\n top: 0px;\n margin: 0 auto;\n border-radius: 0px;\n border: 0px;\n text-align: center;\n height: 30px;\n border-bottom-left-radius: 3px;\n border-bottom-right-radius: 3px;\n padding: 5px;\n }\n .gd__audio__span{\n color: black;\n font-size: 14px;\n padding-left: 5px;\n font-family: Verdana, Arial, Helvetica, sans-serif;\n text-align: center;\n }\n ")}},{key:"addStylesheet",value:function(e,t,n){if(!document.getElementById(e)){var r=document.createElement("style");r.type="text/css",r.id=e,r.styleSheet?r.styleSheet.cssText=n:r.appendChild(document.createTextNode(n)),t.appendChild(r)}}}]),e}(),lS=function(){function e(t){D(this,e),this.adContainer=t}return R(e,[{key:"show",value:function(){this.t4rButton.style.display="block"}},{key:"hide",value:function(){this.t4rButton.style.display="none"}},{key:"add",value:function(){try{var e=document.createElement("div"),t=document.createElement("p");this.addStyles(),t.innerText="x",e.appendChild(t),e.id="gd__exit__button",e.setAttribute("title","Exit"),e.classList.add("gd__exit__button"),this.t4rButton=e,document.body.appendChild(e)}catch(e){console.log("Exit button add error",e)}}},{key:"addStyles",value:function(){var e=document.body||document.getElementsByTagName("body")[0];this.addStylesheet("gd__exit__button__style",e,"\n .gd__exit__button{\n background-color: transparent; \n width: 50px;\n height: 50px;\n position: absolute;\n pointer-events:none; \n z-index: 2000;\n top: 17px;\n right: 17px;\n margin: 0;\n border-radius: 50px;\n border: 1px solid white;\n text-align: center; \n font-size: 16px;\n line-height: normal;\n font-family: 'Arial';\n font-weight: bolder;\n }\n .gd__exit__button:hover{\n filter: invert(100%) sepia(51%) saturate(0%) hue-rotate(346deg) brightness(104%) contrast(100%); \n }")}},{key:"addStylesheet",value:function(e,t,n){if(!document.getElementById(e)){var r=document.createElement("style");r.type="text/css",r.id=e,r.styleSheet?r.styleSheet.cssText=n:r.appendChild(document.createTextNode(n)),t.appendChild(r)}}}]),e}(),hS=function(e){if(!e)return!1;var t=pS.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)},pS=Object.prototype.toString;function fS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function mS(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?fS(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fS(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function gS(e){return null!=e&&e.error_url?"<vmap:VASTAdData>".concat(function(e){return e.promo_url?'<VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper fallbackOnNoAd="true">\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="0" />\n </Extensions>\n </Wrapper>\n </Ad>\n <Ad id="promo">\n <Wrapper>\n <AdSystem>Rainbow</AdSystem>\n <Impression><![CDATA[').concat(e.promo_imp_green_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.promo_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="1" />\n </Extensions>\n </Wrapper>\n </Ad>\n </VAST>').trim():e.fallback_url?'<VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper fallbackOnNoAd="true">\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="0" />\n </Extensions>\n </Wrapper>\n </Ad>\n <Ad id="fallback">\n <Wrapper>\n <AdSystem>Rainbow</AdSystem>\n <Impression><![CDATA[').concat(e.fallback_imp_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.fallback_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="1" />\n </Extensions>\n </Wrapper>\n </Ad>\n </VAST>').trim():'<VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper>\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,"]]></VASTAdTagURI>\n </Wrapper>\n </Ad>\n </VAST>").trim()}(e),"</vmap:VASTAdData>"):'<vmap:AdTagURI templateType="vast3"><![CDATA['.concat(null==e?void 0:e.adtag_url,"]]></vmap:AdTagURI>")}var vS,bS="13998",yS="_cc".concat(bS),_S=["https://tags.crwdcntrl.net/c/".concat(bS,"/cc.js?ns=").concat(yS)],wS=function(){return!!vS&&"function"==typeof vS.bcpf&&"function"==typeof vS.add},AS=function(e,t){try{if(!wS())return;vS.add(e,t),"lotame add success ".concat(e," ").concat(t)}catch(e){err}},kS=function(e,t){try{if(!wS())return;vS.bcpw(e,t),"lotame send success ".concat(e," ").concat(t)}catch(e){}},ES=function(e){var n=this;try{AS("act","play"),AS("med","game"),"complete"===document.readyState?vS.bcpf():vS.bcp(),e.tags.forEach(function(e){t(this,n),kS("int","tags : ".concat(e.title.toLowerCase()))}.bind(this)),kS("int","category : ".concat(e.category.toLowerCase()))}catch(e){}},xS=function(){window.addEventListener("load",(function(){aA.once("game-data-ready",function(){var t=e(r.mark((function e(t){var i;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=1,e.t0=null!=uy&&uy.noLotamePageView,!e.t0){e.next=7;break}return e.next=6,hA();case 6:e.t0=e.sent;case 7:if(!e.t0){e.next=10;break}return e.abrupt("return");case 10:if(null!==(i=t.lotm)&&void 0!==i&&i.enabled){e.next=13;break}return e.abrupt("return");case 13:return e.next=16,f(_S[0],"LOTCC_".concat(bS),{alternates:_S});case 16:"object"===n(window[yS])&&(vS=window[yS]),wS()&&ES(t),e.next=23;break;case 20:e.prev=20,e.t1=e.catch(1),e.t1;case 23:case"end":return e.stop()}}),e,null,[[1,20]])})));return function(e){return t.apply(this,arguments)}}())}))},SS=function(){kS("genp","ad video"),kS("act","ad impression")},RS=function(){kS("act","ad skipped")},DS=function(){kS("act","ad click")},TS=function(){kS("act","ad complete")},OS=new xw,IS={preroll:"game-start-video",midroll:"mid-level-video",rewarded:"rewarded-video"},PS=function(e,n){var r=this,i=function(e,t){var n=OS.get("partner.url.value"),r=IS[t],i="".concat("web.latimes/games-puzzles-crossword","/").concat(e,"/").concat(r);return{env:"vp",iu:"/".concat("21787098806","/").concat(i),description_url:n,tfcd:0,npa:0,sz:"400x300|480x360|480x361|640x360|640x480",gdfp_req:1,output:"vast",unviewed_position_start:1,impl:"s",correlator:"".concat(Date.now())}}(e,n),a=Object.keys(i).map(function(e){return t(this,r),"".concat(e,"=").concat(i[e])}.bind(this)).join("&");return"".concat("https://pubads.g.doubleclick.net/gampad/ads","?").concat(a)},CS=(new xw).get("partner.domain.value"),LS=["latimes.com"],US={exist:function(e){var n=this;return"Softgames-Azerion"===e.dname&&LS.some(function(e){return t(this,n),e===CS}.bind(this))},get:function(e,t){return function(e,t){return{"latimes.com":function(){var n=t.slug;return PS(n,e)}}[CS](e)}(e,t)}},MS=function(){var e=(new xw).get("partner.url.value"),t=new O(e,!0),n={isRevisionTest:!1,useTestAds:!1,disableMidrolltimer:!1};if("revision.gamedistribution.com"===t.host){var r=t.query.test,i="1"===r||"2"===r,a="1"===r;n={useTestAds:i,disableMidrolltimer:a,isRevisionTest:a||i}}return n};function jS(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 BS(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?jS(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jS(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var GS=new j,NS=null,qS=function(){function n(e,r,i){var a=this;if(D(this,n),NS)return NS;NS=this;var s={debug:!1,width:640,height:360,locale:"en"};this.options=r?h(s,r):s,this.prefix="gdsdk__",this.adsLoader=null,this.adsManager=null,this.adDisplayContainer=null,this.eventBus=new _,this.safetyTimer=null,this.containerTransitionSpeed=0,this.adCounter={},this.adPrerollCount=0,this.adMidrollCount=0,this.adRewardedCount=0,this.preloadedAdType=null,this.requestRunning=!1,this.parentDomain=i.parentDomain,this.topDomain=i.topDomain,this.parentURL=i.parentURL,this.adDisplayContainerInitialized=!1,this.IMASampleTags=w(),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=""!==e?document.getElementById(e):null,this.options.width="number"==typeof this.options.width?this.options.width:"100%"===this.options.width?640:this.options.width.replace(/[^0-9]/g,""),this.options.height="number"==typeof this.options.height?this.options.height:"100%"===this.options.height?360:this.options.height.replace(/[^0-9]/g,"");var o=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,c=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;this.options.width=this.thirdPartyContainer?this.thirdPartyContainer.offsetWidth:o,this.options.height=this.thirdPartyContainer?this.thirdPartyContainer.offsetHeight:c,this.category="",this.tags=[],this.eventCategory="AD",this.eventBus.subscribe("LOADED",function(){t(this,a),this._clearSafetyTimer("LOADED"),this._startSafetyTimer(8e3,"LOADED")}.bind(this),"ima"),this.eventBus.subscribe("STARTED",function(){t(this,a),this._clearSafetyTimer("STARTED")}.bind(this),"ima")}var i,a,s,o,c,d,u,l,p,A,k,E,x,S,P,C,L,U,j,F,V,z,H;return R(n,[{key:"start",value:(H=e(r.mark((function n(){var i,a,s,o=this;return r.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,this.adSystemInitialize(e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,o._init_afg_script({adsense_channel:"4089988593"});case 2:case"end":return e.stop()}}),e)}))));case 3:return i=n.sent,this.afgInitSuccess=i.success,n.next=7,this.adSystemInitialize(e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,o._init_hl_script();case 2:return e.next=4,o._init_ima_script();case 4:o._createPlayer(),o._setUpIMA();case 6:case"end":return e.stop()}}),e)}))));case 7:if(a=n.sent,this.imaInitSuccess=a.success,s=[],this.afgInitSuccess||s.push(i.error),this.imaInitSuccess||s.push(a.error),!(s.length>0)){n.next=14;break}throw s[0];case 14:window.eventTest=function(e){t(this,o),this._broadcast(e,{message:"",status:"success"})}.bind(this),n.next=21;break;case 17:throw n.prev=17,n.t0=n.catch(0),ds("gd-adflow error on ads.start",n.t0),new Error(n.t0);case 21:case"end":return n.stop()}}),n,this,[[0,17]])}))),function(){return H.apply(this,arguments)})},{key:"adSystemInitialize",value:(z=e(r.mark((function e(t){var n;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n={success:!1},e.prev=1,e.next=4,t();case 4:n.success=!0,e.next=10;break;case 7:e.prev=7,e.t0=e.catch(1),n.error=e.t0;case 10:return e.abrupt("return",n);case 12:case"end":return e.stop()}}),e,null,[[1,7]])}))),function(e){return z.apply(this,arguments)})},{key:"_getDefaultSpilAdapterConfig",value:function(){return{vast:null,url:"https://pubads.g.doubleclick.net/gampad/ads",query:{correlator:"{{CACHEBUSTER}}",description_url:"{{PAGE_URL}}",env:"vp",gdfp_req:1,impl:"s",iu:"/59392726/gd_instream",npa:0,output:"vast",sz:"640x480|400x300",tfcd:0,unviewed_position_start:1}}}},{key:"_getSpilUrl",value:(V=e(r.mark((function e(t){var n,i,a,s,o,c,d,u,l,h,p,f;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.adType,i=t.options,e.prev=1,o=null===(a=this.gameData.adflw)||void 0===a||null===(s=a.adapterConfig)||void 0===s?void 0:s.spil,c=this.nextAdPosition(n),e.next=6,this._create_dp_context(c,i);case 6:return d=e.sent,o?(this.gameData,u=o[c]||o.default||this._getDefaultSpilAdapterConfig()):u=this._getDefaultSpilAdapterConfig(),l=100*d.floor_price,d.floor_price,h=this._createCustomAdVastUrl(u,{tnl_keys:{floor_price:l}}),p=h.url,f={url:p,dp:d,hl:{bidFloorApplied:!0}},e.abrupt("return",f);case 17:e.prev=17,e.t0=e.catch(1),console.log("spil-adaptor: Error on getting spil",e.t0);case 20:case"end":return e.stop()}}),e,this,[[1,17]])}))),function(e){return V.apply(this,arguments)})},{key:"_getAdVast",value:function(n,i){var a=this;return new Promise(function(){var s=e(r.mark((function e(s){var o,c,d,u,l,h,p,f,g=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(m.available&&m.getBoolean("gd_debug_ex")&&m.getBoolean("gd_tag")||MS().useTestAds)){e.next=6;break}return o=a.IMASampleTags[n],c=Math.floor(Math.random()*o.length),d=o[c],s({url:d}),e.abrupt("return");case 6:if("spil"!==i.adapter){e.next=8;break}return e.abrupt("return",s(a._getSpilUrl({adType:n,options:i})));case 8:if(void 0!==window.idhb.requestAds){e.next=10;break}throw new Error("Prebid.js wrapper script hit an error or didn't exist!");case 10:return e.prev=10,u=a.nextAdPosition(n),a._broadcast("AD_REQUEST",{message:u}),l=a.options,"preroll"===u&&G(l.preroll)?l=l.preroll:"midroll"===u&&G(l.midroll)?l=l.midroll:"rewarded"===u&&G(l.rewarded)&&(l=l.rewarded),h="","audio"===i.adapter||"audio"===i.giftType?(a.isAudioAd=!0,h="midrollaudio"):(a.isAudioAd=!1,h="rewarded"===u?"rewardedVideo":"gdbanner"===u?"gd__banner":"midroll"===u?"midroll":"video1"),e.next=19,window.idhb.isLoaded();case 19:return e.next=21,a._create_dp_context(u,i);case 21:p=e.sent,cs("gd-adflow, before idhb",u,h),f=window.idhb.getAdserverTargetingForAdSlot(h),window.idhb.setAdserverTargeting(BS(BS({},f),{},{adaptor_order:i.adapterIndex})),window.idhb.getAdserverTargetingForAdSlot(h),window.idhb.requestAds({slots:T({},h,{bidFloor:(null==p?void 0:p.floor_price)||void 0}),callback:function(e,n){var r=this;t(this,g),!p||null!=n&&n.bidFloorApplied||fetch(p.skip_url).catch(function(e){t(this,r)}.bind(this));var i={src:"hl",tnl_keys:BS(BS({},window.idhb.getAdserverTargetingForAdSlot(h)),{},{tnl_ad_pos:u,tnl_asset_id:a.gameData.gameId}),url:e,dp:p,hl:n};a._extend_hl_url(i),s(i)}.bind(this)}),e.next=33;break;case 30:throw e.prev=30,e.t0=e.catch(10),new Error(e.t0);case 33:case"end":return e.stop()}}),e,this,[[10,30]])})));return function(e){return s.apply(this,arguments)}}())}},{key:"nextAdPosition",value:function(e){if(e===g.Rewarded)return this.adRewardedCount++,"rewarded";if(e===g.Interstitial){var t=!1===this.gameData.preroll||1===this.adPrerollCount;return t?this.adMidrollCount++:this.adPrerollCount++,t||this.adMidrollCount>0?"midroll":"preroll"}return"midroll"}},{key:"getAdPosition",value:function(e){return e===g.Rewarded?"rewarded":e===g.Interstitial?!1===this.gameData.preroll||1===this.adPrerollCount||this.adMidrollCount>0?"midroll":"preroll":"midroll"}},{key:"getCurrentAdPosition",value:function(e){return e===g.Interstitial?1===this.adPrerollCount&&0===this.adMidrollCount?"preroll":"midroll":e===g.Rewarded?"rewarded":void 0}},{key:"_requestPromo",value:function(e,t){var n=new google.ima.AdsRequest;return n.adsResponse=function(e){return'<VAST version="3.0"> \n <Ad id="promo">\n <Wrapper>\n <AdSystem>Rainbow</AdSystem>\n <Impression><![CDATA['.concat(e.promo_imp_green_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.promo_url,"]]></VASTAdTagURI> \n </Wrapper>\n </Ad>\n </VAST>").trim()}(e),n.linearAdSlotWidth=this.options.width,n.linearAdSlotHeight=this.options.height,n.nonLinearAdSlotWidth=this.options.width,n.nonLinearAdSlotHeight=this.options.height,n.forceNonLinearFullSlot=!0,this.options.vast_load_timeout&&(n.vastLoadTimeout=this.options.vast_load_timeout),n.setAdWillAutoPlay(t.autoplayAllowed),n.setAdWillPlayMuted(t.autoplayRequiresMute),this.adsLoader.requestAds(n),n}},{key:"_requestAd",value:function(e,n){var r=this;return n=n||{},new Promise(function(i){var a=this;if(t(this,r),"undefined"==typeof google)throw new Error("Unable to load ad, google IMA SDK not defined.");try{var s,o,c=null==e||null===(s=e.tnl_keys)||void 0===s?void 0:s.tnl_ad_pos;this.adSuccess=!1,this.contentPaused=!1;var d=new google.ima.AdsRequest,u=this._transformVast(e,n),l=BS(BS({},n),{},{adTag:u,tnl_ad_pos:c});this.adCounter[c]=this.adCounter[c]||0,this.adCounter[c]++;var h=e.dp,p=e.hl;this.current_dp=h,h&&!u.bidder&&(h.adtag_url=u.url,this._extend_dp_with_adsense(h,p,null==e?void 0:e.tnl_keys));var f=this._isVMAP(c);(function(){t(this,a),n.shouldFail&&(h?(h.adtag_url="dp_original_broken",h.fallback_url="dp_fallback_broken"):u.url="original_broken",null==h||h.adtag_url,null==h||h.fallback_url,u.url)}).bind(this);var m=this._getExternalVast(null===(o=n)||void 0===o?void 0:o.adType);if(m)d.adTagUrl=m;else if(f){var g=function(e){for(var t=[],n="",r=Date.now(),i={ppos:1,lip:!0,vad_type:"linear"},a=0;a<e.length;a++){var s=new O(e[a].adtag.url,!0);s.query=mS(mS({},s.query),{},{ad_rule:0,vpos:e[a].positon,pod:1,correlator:0===a?r:++r,output:"xml_vast3"}),0===a&&(s.query=mS(mS({},s.query),i)),t.push(s.toString())}for(var o=Date.now(),c=1;c<=t.length;c++){var d,u,l,h;n+='<vmap:AdBreak timeOffset="start" breakType="linear" breakId="break-'.concat(c,'">\n <vmap:AdSource id="').concat(o++,'" allowMultipleAds="false" followRedirects="true">\n ').concat(gS({id:o++,adtag_url:t[c-1],error_url:null===(d=e[c-1].dp)||void 0===d?void 0:d.error_url,impression_url:null===(u=e[c-1].dp)||void 0===u?void 0:u.impression_url,fallback_url:null===(l=e[c-1].dp)||void 0===l?void 0:l.fallback_url,fallback_imp_url:null===(h=e[c-1].dp)||void 0===h?void 0:h.fallback_imp_url}),"</vmap:AdSource>\n </vmap:AdBreak>")}return'<?xml version="1.0" encoding="UTF-8"?>\n <vmap:VMAP xmlns:vmap="http://www.iab.net/videosuite/vmap" version="1.0">\n '.concat(n,"\n </vmap:VMAP>").trim()}(this._get_vmap_context({dp:h,adtag:u,position:"preroll"===l.tnl_ad_pos?"preroll":"midroll",config:this._get_vmap_config(c)}));d.adsResponse=g}else if(h&&p.bidFloorApplied){h.adtag_url||(h.adtag_url=u.url);var v=function(e){return e.promo_url?e.fallback_url?'<?xml version="1.0" encoding="utf-8"?>\n <VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper fallbackOnNoAd="true">\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="0" />\n </Extensions>\n </Wrapper>\n </Ad>\n <Ad id="fallback">\n <Wrapper>\n <AdSystem>ADS</AdSystem>\n <Impression><![CDATA[').concat(e.fallback_imp_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.fallback_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="1" />\n </Extensions>\n </Wrapper>\n </Ad>\n <Ad id="promo">\n <Wrapper>\n <AdSystem>Rainbow</AdSystem>\n <Impression><![CDATA[').concat(e.promo_imp_green_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.promo_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="2" />\n </Extensions>\n </Wrapper>\n </Ad>\n </VAST>').trim():'<?xml version="1.0" encoding="utf-8"?>\n <VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper fallbackOnNoAd="true">\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="0" />\n </Extensions>\n </Wrapper>\n </Ad>\n <Ad id="promo">\n <Wrapper>\n <AdSystem>Rainbow</AdSystem>\n <Impression><![CDATA[').concat(e.promo_imp_green_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.promo_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="1" />\n </Extensions>\n </Wrapper>\n </Ad>\n </VAST>').trim():e.fallback_url?'<?xml version="1.0" encoding="utf-8"?>\n <VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper fallbackOnNoAd="true">\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="0" />\n </Extensions>\n </Wrapper>\n </Ad>\n <Ad id="fallback">\n <Wrapper>\n <AdSystem>ADS</AdSystem>\n <Impression><![CDATA[').concat(e.fallback_imp_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.fallback_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="1" />\n </Extensions>\n </Wrapper>\n </Ad>\n </VAST>').trim():'<?xml version="1.0" encoding="utf-8"?>\n <VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper>\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,"]]></VASTAdTagURI>\n </Wrapper>\n </Ad>\n </VAST>").trim()}(h);d.adsResponse=v}else if(h&&h.fallback_url){var b=function(e){return'<?xml version="1.0" encoding="utf-8"?>\n <VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper fallbackOnNoAd="true">\n <AdSystem>GDFP</AdSystem>\n <Impression><![CDATA[').concat(e.fallback_imp_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="0" />\n </Extensions>\n </Wrapper>\n </Ad>\n <Ad id="fallback">\n <Wrapper>\n <AdSystem>ADS</AdSystem>\n <Impression><![CDATA[').concat(e.fallback_imp_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.fallback_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="1" />\n </Extensions>\n </Wrapper>\n </Ad>\n </VAST>').trim()}(h);d.adsResponse=b}else d.adTagUrl=u.url;d.linearAdSlotWidth=this.options.width,d.linearAdSlotHeight=this.options.height,d.nonLinearAdSlotWidth=this.options.width,d.nonLinearAdSlotHeight=this.options.height,d.forceNonLinearFullSlot=!0,this.options.vast_load_timeout&&(d.vastLoadTimeout=this.options.vast_load_timeout),d.setAdWillAutoPlay(n.autoplayAllowed),d.setAdWillPlayMuted(n.autoplayRequiresMute),this.adsLoader.requestAds(d,l);try{this._broadcast("AD_SDK_REQUEST",{message:l})}catch(e){}i(d)}catch(e){throw new Error(e)}}.bind(this))}},{key:"_getExternalVast",value:function(e){var t;try{var n=this.getCurrentAdPosition(e);t=US.exist(this.gameData)&&US.get(n,this.gameData)}catch(e){console.log("external-vast err",e)}return t}},{key:"cancel",value:function(e){var t;if(!1!==this.requestRunning){this.requestRunning=!1,this._resetAdsLoader(),this._hide("cancel");var n=(null==e||null===(t=e.message)||void 0===t?void 0:t.indexOf("NO_VAST_URL"))>=0,r="AD_SDK_CANCELED";this._broadcast(r,{name:r,message:"Advertisement has been canceled.",status:"warning",noVast:n,analytics:{category:this.eventCategory,action:r,label:this.gameData.gameId}})}}},{key:"_checkAutoPlay",value:(F=e(r.mark((function e(){var n=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(e,r){var i=this;t(this,n);var a=navigator.userAgent.toLowerCase();a.indexOf("safari")>-1&&a.indexOf("chrome")<0?e({autoplayAllowed:!0,autoplayRequiresMute:!0}):B.video({inline:!0,muted:!1}).then(function(n){t(this,i);var r=n.result;n.error,e(!0===r?{autoplayAllowed:!0,autoplayRequiresMute:!1}:{autoplayAllowed:!0,autoplayRequiresMute:!0})}.bind(this))}.bind(this)));case 1:case"end":return e.stop()}}),e,this)}))),function(){return F.apply(this,arguments)})},{key:"_initDisplayContainerWithAutoPlay",value:(j=e(r.mark((function e(){var t;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._checkAutoPlay(!1);case 2:return t=e.sent,this._autoplay=t,this.video_ad_player.autoplay=t.autoplayAllowed,this.video_ad_player.volume=t.autoplayRequiresMute?0:1,this.video_ad_player.muted=!!t.autoplayRequiresMute,t.adDisplayContainerInitialized||(this.adDisplayContainer.initialize(),this.adDisplayContainerInitialized=!0),e.abrupt("return",t);case 9:case"end":return e.stop()}}),e,this)}))),function(){return j.apply(this,arguments)})},{key:"startAd",value:(U=e(r.mark((function e(n){var i,a,s=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=n.adType,a=n.params,this.adType_=i,this.isAudioAd=!1,this.adContext=BS(BS({},a),{},{adType:i}),"promo"!==(null==a?void 0:a.adapter)){e.next=6;break}return e.abrupt("return",this._startPromo(a,i));case 6:if("adsense"!==(null==a?void 0:a.adapter)){e.next=30;break}if(i!==g.Interstitial){e.next=23;break}if("preroll"!==(null==a?void 0:a.position)){e.next=12;break}return e.abrupt("return",this._startAdsensePlacementPreroll(n));case 12:if("start"!==(null==a?void 0:a.position)){e.next=16;break}return e.abrupt("return",this._startAdsensePlacementStart(n));case 16:if("next"!==(null==a?void 0:a.position)){e.next=20;break}return e.abrupt("return",this._startAdsensePlacementNext(n));case 20:return e.abrupt("return",this._startAdsensePlacementPreroll(n));case 21:e.next=28;break;case 23:if(i!==g.Rewarded){e.next=27;break}return e.abrupt("return",this._startAdsensePlacementRewardedAd(n));case 27:case 40:throw new Error("Unsupported ad type");case 28:e.next=41;break;case 30:if(!["ima","spil","audio"].some(function(e){return t(this,s),e===(null==a?void 0:a.adapter)}.bind(this))){e.next=41;break}if(i!==g.Interstitial){e.next=36;break}return e.abrupt("return",this._startInterstitialAd(a));case 36:if(i!==g.Rewarded){e.next=40;break}return e.abrupt("return",this._startRewardedAd(a));case 41:case"end":return e.stop()}}),e,this)}))),function(e){return U.apply(this,arguments)})},{key:"preloadAd",value:(L=e(r.mark((function e(t){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t!==g.Interstitial){e.next=4;break}return e.abrupt("return","gdsdk://preloaded");case 4:if(t!==g.Rewarded){e.next=8;break}return e.abrupt("return","gdsdk://preloaded");case 8:throw new Error("Unsupported ad type");case 9:case"end":return e.stop()}}),e)}))),function(e){return L.apply(this,arguments)})},{key:"addAdComponents",value:function(){var e=this,n=function(){t(this,e),this.adsManager.resume()}.bind(this);try{this.adResume=new cS(this.adContainer,n),this.adResume.add(),this.rewardedLabel=new dS(this.adContainer,n),this.rewardedLabel.add(),this.audioAdLabel=new uS(window.document.body),this.audioAdLabel.add(),this.audioAdLabel.hide()}catch(e){console.log("error on adding adResume",e)}}},{key:"loadDisplayAd",value:(C=e(r.mark((function n(i){var a=this;return r.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",new Promise(function(){var n=e(r.mark((function e(n,s){var o,c,d,u,l,h,p,f,m,g=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,(c=i?i.containerId:null)||s("Container id is not specified"),d=document.getElementById(c),document.getElementById(c)||s("No container is found with this id - ".concat(c)),void 0===window.idhb.requestAds&&s("Prebid.js wrapper script hit an error or didn't exist!"),u=i.slotId?i.slotId:"gd__banner@".concat(c),document.getElementById(u)||(l="\n .gd__banner{\n z-index: ".concat(v.DisplayContainer.zIndex,";\n height: 100%;\n display: flex !important;\n align-items: center;\n justify-content: center;\n }"),document.getElementById("gd__banner__style")||((h=document.createElement("style")).type="text/css",h.id="gd__banner__style",h.styleSheet?h.styleSheet.cssText=l:h.appendChild(document.createTextNode(l)),d.appendChild(h)),(p=document.createElement("div")).id=u,p.classList.add("gd__banner"),d.appendChild(p)),e.next=11,a._create_dp_display_context();case 11:a.atom_display=e.sent,a.atom_display,null!==(o=a.atom_display)&&void 0!==o&&o.params&&window.idhb.setAdserverTargeting(null===(f=a.atom_display)||void 0===f?void 0:f.params),(m={})[u]={maxSize:[d.offsetWidth,d.offsetHeight]},window.idhb.requestAds({slots:m,callback:function(e){t(this,g),JSON.stringify(e,null,2)}.bind(this)}),n(),e.next=24;break;case 20:e.prev=20,e.t0=e.catch(0),console.log("display_test error",e.t0),s(e.t0.message||e.t0);case 24:case"end":return e.stop()}}),e,this,[[0,20]])})));return function(e,t){return n.apply(this,arguments)}}()));case 1:case"end":return n.stop()}}),n)}))),function(e){return C.apply(this,arguments)})},{key:"_startInterstitialAd",value:(P=e(r.mark((function e(n){var i,a,s,o=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!this.requestRunning){e.next=4;break}return this._broadcast("AD_IS_ALREADY_RUNNING",{status:"warning"}),e.abrupt("return");case 4:if(!void function(){if(t(this,o),us.fictionalIMAError)return this._broadcast("AD_ERROR",{message:"fictional IMA error",status:"error",skipForward:!0}),!0}.bind(this)){e.next=7;break}return e.abrupt("return");case 7:return this.requestRunning=!0,e.next=10,this._initDisplayContainerWithAutoPlay();case 10:return i=e.sent,e.next=13,this._loadInterstitialAd(BS(BS({},i),n));case 13:if(a=e.sent,s=a.success,a.args,s){e.next=18;break}return e.abrupt("return");case 18:i.autoplayRequiresMute&&this.adsManager.setVolume(0),this.adsManager.init(this.options.width,this.options.height,google.ima.ViewMode.NORMAL),this.adsManager.start(),e.next=28;break;case 23:throw e.prev=23,e.t0=e.catch(0),e.t0,this._onError(e.t0),e.t0;case 28:case"end":return e.stop()}}),e,this,[[0,23]])}))),function(e){return P.apply(this,arguments)})},{key:"_startPromo",value:(S=e(r.mark((function e(t,n){var i,a,s;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!this.requestRunning){e.next=4;break}return this._broadcast("AD_IS_ALREADY_RUNNING",{status:"warning"}),e.abrupt("return");case 4:return this.requestRunning=!0,this.adSuccess=!1,e.next=8,this._initDisplayContainerWithAutoPlay();case 8:return i=e.sent,e.next=11,this._loadPromo(BS(BS({},i),t),n);case 11:if(a=e.sent,s=a.success,a.args,s){e.next=16;break}return e.abrupt("return");case 16:i.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 S.apply(this,arguments)})},{key:"_loadPromo",value:(x=e(r.mark((function e(t,n){var i,a;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this._resetAdsLoader(),e.prev=1,i=this.nextAdPosition(n),a=this._create_promo_context(i),this._requestPromo(a,BS({adType:g.Interstitial},t)),e.next=7,this._waitOnAdLoad();case 7:return e.abrupt("return",e.sent);case 10:throw e.prev=10,e.t0=e.catch(1),new Error(e.t0);case 13:case"end":return e.stop()}}),e,this,[[1,10]])}))),function(e,t){return x.apply(this,arguments)})},{key:"_loadInterstitialAd",value:(E=e(r.mark((function e(t){var n;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._resetAdsLoader(),e.prev=1,e.t0=this.preloadedInterstitialAdVast,e.t0){e.next=7;break}return e.next=6,this._getAdVast(g.Interstitial,t);case 6:e.t0=e.sent;case 7:if(n=e.t0,delete this.preloadedInterstitialAdVast,n.url){e.next=12;break}throw new Error("NO_VAST_URL");case 12:return e.next=14,this._requestAd(n,BS({adType:g.Interstitial},t));case 14:return e.sent,e.next=17,this._waitOnAdLoad();case 17:return e.abrupt("return",e.sent);case 20:throw e.prev=20,e.t1=e.catch(1),console.log("VAST_URL error",e.t1),new Error(e.t1);case 24:case"end":return e.stop()}}),e,this,[[1,20]])}))),function(e){return E.apply(this,arguments)})},{key:"_waitOnAdLoad",value:function(){var e=this;return new Promise(function(n,r){var i=this;t(this,e);var a="videoad.preloadad";this.eventBus.unsubscribeScope(a);var s=function(e){var r=this;t(this,i),setTimeout(function(){t(this,r),this.eventBus.unsubscribeScope(a),n({success:!0,args:e})}.bind(this),1)}.bind(this),o=function(e){var r=this;t(this,i),setTimeout(function(){t(this,r),this.eventBus.unsubscribeScope(a),n({success:!1,args:e})}.bind(this),1)}.bind(this);this.eventBus.subscribe("AD_SDK_MANAGER_READY",s,a),this.eventBus.subscribe("AD_SDK_CANCELED",o,a),this.eventBus.subscribe("AD_ERROR",o,a)}.bind(this))}},{key:"_startRewardedAd",value:(k=e(r.mark((function e(n){var i,a,s,o=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!this.requestRunning){e.next=4;break}return this._broadcast("AD_IS_ALREADY_RUNNING",{status:"warning"}),e.abrupt("return");case 4:if(!void function(){if(t(this,o),us.fictionalIMAError)return this._broadcast("AD_ERROR",{message:"fictional IMA error",status:"error",skipForward:!0}),!0}.bind(this)){e.next=7;break}return e.abrupt("return");case 7:return this.requestRunning=!0,e.next=10,this._initDisplayContainerWithAutoPlay();case 10:return i=e.sent,e.next=13,this._loadRewardedAd(BS(BS({},i),n));case 13:if(a=e.sent,s=a.success,a.args,s){e.next=18;break}return e.abrupt("return");case 18:i.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 k.apply(this,arguments)})},{key:"_loadRewardedAd",value:(A=e(r.mark((function e(t){var n;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._resetAdsLoader(),e.prev=1,e.t0=this.preloadedRewardedAdVast,e.t0){e.next=7;break}return e.next=6,this._getAdVast(g.Rewarded,t);case 6:e.t0=e.sent;case 7:return n=e.t0,delete this.preloadedRewardedAdVast,e.next=11,this._requestAd(n,BS({adType:g.Rewarded},t));case 11:return e.sent,e.next=14,this._waitOnAdLoad();case 14:return e.abrupt("return",e.sent);case 17:throw e.prev=17,e.t1=e.catch(1),new Error(e.t1);case 20:case"end":return e.stop()}}),e,this,[[1,17]])}))),function(e){return A.apply(this,arguments)})},{key:"_preloadInterstitialAd",value:(p=e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,e.t0=this.preloadedInterstitialAdVast,e.t0){e.next=6;break}return e.next=5,this._getAdVast(g.Interstitial);case 5:e.t0=e.sent;case 6:return this.preloadedInterstitialAdVast=e.t0,e.abrupt("return",this.preloadedInterstitialAdVast.url);case 10:throw e.prev=10,e.t1=e.catch(0),new Error(e.t1);case 13:case"end":return e.stop()}}),e,this,[[0,10]])}))),function(){return p.apply(this,arguments)})},{key:"_preloadRewardedAd",value:(l=e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,e.t0=this.preloadedRewardedAdVast,e.t0){e.next=6;break}return e.next=5,this._getAdVast(g.Rewarded);case 5:e.t0=e.sent;case 6:return this.preloadedRewardedAdVast=e.t0,e.abrupt("return",this.preloadedRewardedAdVast.url);case 10:throw e.prev=10,e.t1=e.catch(0),new Error(e.t1);case 13:case"end":return e.stop()}}),e,this,[[0,10]])}))),function(){return l.apply(this,arguments)})},{key:"_onError",value:function(e){this.cancel(e),this._clearSafetyTimer("ERROR")}},{key:"_hide",value:function(e){this.video_ad_player&&(this.video_ad_player.src=""),this.activeAdContainer&&(this.activeAdContainer.style.visibility="hidden")}},{key:"_show",value:function(e){var n=this;if(this.activeAdContainer){this.isAudioAd||(this.activeAdContainer.style.visibility="visible");var r=null==e?void 0:e.mode;e.t4r=this.gameData.__t4r;var i=this._isT4R(e),a=this._getT4ROptions(e);if("loaded"===r)this.activeAdContainer.style.opacity=i?.001:1,i&&null!=e&&e.contentType.startsWith("video/")&&(this.t4rButton=new lS(this.adContainer),this.t4rButton.add()),i&&this.adsManager.setVolume(0),i&&this._broadcast("AD_T4R"),i&&setTimeout(function(){t(this,n),this.activeAdContainer.style.opacity=1,this.adsManager.setVolume(1),this.t4rButton&&this.t4rButton.hide()}.bind(this),((null==a?void 0:a.min)||1234)+Math.random()*((null==a?void 0:a.max)||3210));else if("click"===r||"first_quartile"===r){if(i&&"click"===r){var s,o=null===(s=this._adrequest_user_context)||void 0===s?void 0:s.tnl_ad_pos;this.clickCount[o]++}this.t4rButton&&this.t4rButton.hide(),this.activeAdContainer.style.opacity=1,this.adsManager.setVolume(1)}}}},{key:"_createPlayer",value:function(){var e=this,n=document.body||document.getElementsByTagName("body")[0];this.adContainer=document.createElement("div"),this.adContainer.id="".concat(this.prefix,"advertisement"),this.adContainer.style.position=this.thirdPartyContainer?"absolute":"fixed",this.adContainer.style.zIndex=v.AdsContainer.zIndex,this.adContainer.style.top="0",this.adContainer.style.left="0",this.adContainer.style.width="100%",this.adContainer.style.height="100%",this.thirdPartyContainer&&(this.thirdPartyContainer.style.transform=null);var r=document.createElement("video");r.setAttribute("playsinline",!0),r.setAttribute("webkit-playsinline",!0),r.id="".concat(this.prefix,"advertisement_video"),r.style.position="absolute",r.style.backgroundColor="#000000",r.style.top="0",r.style.left="0",r.style.width=this.options.width+"px",r.style.height=this.options.height+"px",this.video_ad_player=r,this.adContainer.appendChild(r);var i=document.createElement("div");i.id="".concat(this.prefix,"advertisement_slot"),i.style.position="absolute",i.style.top="0",i.style.left="0",i.style.width=this.options.width+"px",i.style.height=this.options.height+"px",this.adContainerInner=i,this.activeAdContainer=this.adContainer,window.activeAdContainer=this.activeAdContainer,this.thirdPartyContainer?(this.adContainer.appendChild(i),this.thirdPartyContainer.appendChild(this.adContainer),this.activeAdContainer=this.thirdPartyContainer):(this.adContainer.appendChild(i),n.appendChild(this.adContainer)),this.addAdComponents(),this.activeAdContainer.style.visibility="hidden";var a=function(){t(this,e);var n=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,a=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;this.options.width=this.thirdPartyContainer?this.thirdPartyContainer.offsetWidth:n,this.options.height=this.thirdPartyContainer?this.thirdPartyContainer.offsetHeight:a,i.style.width=this.options.width+"px",i.style.height=this.options.height+"px",r.style.width=this.options.width+"px",r.style.height=this.options.height+"px"}.bind(this);window.addEventListener("resize",a),window.document.addEventListener("DOMContentLoaded",a)}},{key:"_setUpIMA",value:function(){this.adDisplayContainer=new google.ima.AdDisplayContainer(this.adContainerInner,this.video_ad_player),this.adsLoader=new google.ima.AdsLoader(this.adDisplayContainer),this.adsLoader.getSettings().setDisableCustomPlaybackForIOS10Plus(!0),this.adsLoader.getSettings().setLocale(this.options.locale),this.adsLoader.getSettings().setVpaidMode(this._getVPAIDMode()),this.adsLoader.getSettings().setAutoPlayAdBreaks(!0);var e=this.adsLoader.getSettings().getNumRedirects();this.adsLoader.getSettings().setNumRedirects(2*e),this.adsLoader.addEventListener(google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,this._onAdsManagerLoaded,!1,this),this.adsLoader.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,this._onAdError,!1,this)}},{key:"_onAdsManagerLoaded",value:function(e){var n=this,r=new google.ima.AdsRenderingSettings;r.autoAlign=!1,r.enablePreloading=!1,r.restoreCustomPlaybackStateOnAdBreakComplete=!0,r.useStyledNonLinearAds=!0,r.uiElements=[google.ima.UiElements.AD_ATTRIBUTION,google.ima.UiElements.COUNTDOWN],this.adsManager=e.getAdsManager(this.video_ad_player,r),this.adsManager.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,this._onAdError.bind(this),!1,this),this.adsManager.addEventListener(google.ima.AdEvent.Type.AD_BREAK_READY,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.AD_METADATA,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.ALL_ADS_COMPLETED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.CLICK,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.COMPLETE,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.DURATION_CHANGE,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.FIRST_QUARTILE,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.IMPRESSION,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.INTERACTION,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.LINEAR_CHANGED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.LOADED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.LOG,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.MIDPOINT,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.PAUSED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.RESUMED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.SKIPPED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.STARTED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.THIRD_QUARTILE,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.USER_CLOSE,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.VOLUME_CHANGED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.VOLUME_MUTED,this._onAdEvent.bind(this),this),window.addEventListener("resize",function(){t(this,n),this.adsManager&&this.adsManager.resize(this.options.width,this.options.height,google.ima.ViewMode.NORMAL)}.bind(this)),this.adDisplayContainerInitialized||(this.adDisplayContainer.initialize(),this.adDisplayContainerInitialized=!0);var i=new Date,a=i.getHours(),s=i.getDate(),o=i.getMonth(),c=i.getFullYear(),d="AD_SDK_MANAGER_READY";this._broadcast(d,{name:d,message:"AD SDK is ready",status:"success",analytics:{category:d,action:this.parentDomain,label:"h".concat(a," d").concat(s," m").concat(o," y").concat(c)}}),this._adrequest_user_context=e.getUserRequestContext()}},{key:"_onAdEvent",value:function(e){var n,r=this,i=new Date,a=i.getHours(),s=i.getDate(),o=i.getMonth(),c=i.getFullYear(),d=b(google.ima.AdEvent.Type,e.type),u=!1,l=(null==e||null===(n=e.getAd())||void 0===n?void 0:n.getContentType())||"",h=!l.startsWith("image")&&!l.startsWith("text");this._sendIMAEventsToHB(e);var p=document.getElementById("game"),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:this.contentPaused&&(u=!0),this.isAudioAd&&(this.audioAdLabel.hide(),this.isAudioAd=!1),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 m=e.getAd().getContentType();this._show({mode:"click",contentType:m}),DS();break;case google.ima.AdEvent.Type.COMPLETE:e.getAd(),u=this._is_completed(e.getAd()),f="Fired when the ad completes playing.",this.adType_===g.Rewarded&&this._broadcast("SDK_REWARDED_WATCH_COMPLETE",{message:"",status:"success"});break;case google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED:this.gameData.fllc.enabled&&(p.style.display="none"),this.contentPaused=!0,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:this.gameData.fllc.enabled&&(p.style.display="block"),f="Fired when content should be resumed. This usually happens when an ad finishes or collapses.",this.contentPaused?u=!0:(this.requestRunning=!1,this._broadcast("AD_ERROR",{message:"got resume without pause, possibly with VMAP",status:"error",skipForward:!0})),this._hideAddResume(),this._hideRewardedLabel(),this.t4rButton&&this.t4rButton.hide();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 v=e.getAd().getContentType();this._show({mode:"first_quartile",contentType:v});break;case google.ima.AdEvent.Type.IMPRESSION:f="Fired when the impression URL has been pinged.",e.getAd(),console.log("gdsdk: eventname IMPRESSION",this.isAudioAd),this.isAudioAd&&this.audioAdLabel.show();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 y=e.getAd().getContentType();f=y,this._show({mode:"loaded",contentType:y});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(),this.rewardedLabel.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:u=this._is_completed(e.getAd()),f="Fired when the ad is skipped by the user.",RS(),this.t4rButton&&this.t4rButton.hide();break;case google.ima.AdEvent.Type.STARTED:this.adType_===g.Rewarded&&this.rewardedLabel.show(),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:u=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){var _=!this.contentPaused&&e.type===google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,w=!this.contentPaused&&e.type===google.ima.AdEvent.Type.ALL_ADS_COMPLETED;_||w||this.isAudioAd||this._broadcast(d,{name:d,message:f,status:"success",analytics:{category:d,action:this.parentDomain,label:"h".concat(a," d").concat(s," m").concat(o," y").concat(c)}})}if(u&&!this.adSuccess){this.adSuccess=!0;var A=e.getAd(),k="Rainbow"===(null==A?void 0:A.getAdSystem())&&(null==A?void 0:A.getWrapperAdIds().some(function(e){return t(this,r),"promo"===e}.bind(this)));null==A||A.getAdSystem(),null==A||A.getWrapperAdIds(),this._broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success",isPromoSuccess:k}),this.resetForNext(e)}}},{key:"_run_atom_tag_aws_test",value:function(e){var n=this;try{var r,i,a,s,o;if(!((null===(r=this.gameData)||void 0===r||null===(i=r.aws_tst)||void 0===i?void 0:i.enabled)&&(null===(a=this.gameData)||void 0===a||null===(s=a.aws_tst)||void 0===s||null===(o=s.ep)||void 0===o?void 0:o.atm)))return;var c=e.type,d=e.url;if("none"===c||!d)return;d=d.replace("tag.atom.gamedistribution.com","atom-tag-prod-aws.gamedistribution.com"),fetch(d).then(function(){t(this,n)}.bind(this))}catch(e){}}},{key:"_findAtomTagUrl",value:function(e,n){var r=this,i={type:"none"};try{var a=this.current_dp,s=a.id,o=a.error_url,c=a.impression_url,d=a.fallback_imp_url,u=a.promo_imp_green_url;if(!e&&!n)return i={type:"imp_err",url:o};var l=e.getWrapperAdIds().some(function(e){return t(this,r),e==="".concat(s)}.bind(this)),h=e.getWrapperAdIds().some(function(e){return t(this,r),"fallback"===e}.bind(this)),p=e.getWrapperAdIds().some(function(e){return t(this,r),"promo"===e}.bind(this));l&&n?i={type:"normal_imp",url:c}:l&&!n?i={type:"normal_err",url:o}:p&&n?i={type:"promo_imp",url:u}:h&&n&&(i={type:"fallbacj_imp",url:d})}catch(e){}return i}},{key:"_onAdError",value:function(e){this.requestRunning=!1,this._resetAdsLoader(),this._clearSafetyTimer("ERROR"),this._hide("_onAdError"),this._sendIMAEventsToHB(e);try{var t="AD_ERROR",n=e.getError(),r=n.getErrorCode().toString()||n.getVastErrorCode().toString(),i=this._getInnerErrorCode(n);GS.emit("AD_ERROR",r),this._broadcast(t,{message:r,details:i,status:"warning",analytics:{category:t,action:i,label:r}}),this._hideAddResume()}catch(e){}}},{key:"_hideAddResume",value:function(){try{this.adResume&&this.adResume.hide()}catch(e){console.log("Error on hide adResume",e)}}},{key:"_hideRewardedLabel",value:function(){try{this.adType_===g.Rewarded&&this.rewardedLabel&&this.rewardedLabel.hide()}catch(e){console.log("Error on hide adResume",e)}}},{key:"_sendIMAEventsToHB",value:function(e){if(window.idhb&&"function"==typeof window.idhb.onImaEvent)try{window.idhb.onImaEvent({event:e})}catch(e){}}},{key:"_resetAdsLoader",value:function(){this.adsManager&&(this.adsManager.destroy(),this.adsManager=null,this._adrequest_user_context=null),this.adsLoader&&this.adsLoader.contentComplete()}},{key:"_startSafetyTimer",value:function(e,n){var r=this;this.safetyTimer&&clearTimeout(this.safetyTimer),this.safetyTimer=window.setTimeout(function(){t(this,r),this.cancel(),this._clearSafetyTimer(n)}.bind(this),e)}},{key:"_clearSafetyTimer",value:function(e){void 0!==this.safetyTimer&&null!==this.safetyTimer&&(clearTimeout(this.safetyTimer),this.safetyTimer=void 0)}},{key:"_getVPAIDMode",value:function(){return google.ima.ImaSdkSettings.VpaidMode.ENABLED}},{key:"_getPrebidScripts",value:function(){var e=["https://hb.improvedigital.com/pbw/headerlift.min.js","http://hb.improvedigital.com/pbw/headerlift.min.js"];return this.options.hb_script?[this.options.hb_script].concat(e):e}},{key:"_getInnerErrorCode",value:function(e){if(hS(e.getInnerError)){var t=e.getInnerError();if(t)return hS(t.getErrorCode)&&hS(t.getVastErrorCode)?t.getErrorCode().toString()||t.getVastErrorCode().toString():t.message}}},{key:"resetForNext",value:function(){this.requestRunning=!1,this._hide("resetForNext")}},{key:"_createCustomAdVastUrl",value:function(e,n){var r=this;if(e){var i=this.macros.transform(e,{get:function(e){if(t(this,r),n&&n.tnl_keys)return n.tnl_keys[e.toLowerCase()]}.bind(this)});for(var a in i.query||{}){var s=i.query[a];G(s)&&(i.query[a]=N.stringify(s))}var o=new O(i.url,!0);return q(o.query,i.query||{}),BS({url:o.toString()},n)}}},{key:"_transformVast",value:function(e,t){var n={url:e.url};try{var r=new O(e.url,!0),i=this._transformQuery(e,t,r);i&&(n.url=r.toString());var a=i?r:new O(e.url,!0);if(a.query.cust_params){var s=N.parse(a.query.cust_params);n.bidder=s.hb_bidder,n.cust_params=s}n.url_parsed=a}catch(e){n.hasError=!0,n.message=e.message,n.bidder="error",console.log(e.message)}return n}},{key:"_transformQuery",value:function(e,n,r){var i=this;if(e&&n&&e.tnl_keys){var a=this.options.vast_query;if(n.retry_on_success&&this.options.retry_on_success&&G(this.options.retry_on_success.vast_query)?a=this.options.retry_on_success.vast_query:n.retry_on_failure&&this.options.retry_on_failure&&G(this.options.retry_on_failure.vast_query)&&(a=this.options.retry_on_failure.vast_query),a=M(a),G(a)){var s=r.query;if(a.$$remove){for(var o in s){new RegExp(a.$$remove,"i").test(o)&&delete s[o]}delete a.$$remove}var c=N.parse(s.cust_params);if(a.cust_params&&a.cust_params.$$remove){for(var d in c){new RegExp(a.cust_params.$$remove,"i").test(d)&&delete c[d]}delete a.cust_params.$$remove}var u=this.macros.transform(a,{get:function(n){return t(this,i),e.tnl_keys[n.toLowerCase()]}.bind(this)});return s.cust_params=c,q(s,u),s.cust_params=N.stringify(s.cust_params),!0}}}},{key:"_isExcludedBidderForT4R",value:function(){var e=this;try{var n,r,i,a,s=(null===(n=this._adrequest_user_context)||void 0===n||null===(r=n.adTag)||void 0===r?void 0:r.bidder)||"adx";this.msgrt.send("bidder",{message:s}),this._adrequest_user_context,'bidder:"'.concat(s,'"');var o=(null===(i=this.gameData.t4rc)||void 0===i?void 0:i.bidder_exc)||[],c=(null===(a=this.gameData.t4rc)||void 0===a?void 0:a.bidder_inc)||[],d=!1;return c.length>0?d=!c.some(function(n){return t(this,e),n===s}.bind(this)):o.length>0&&(d=o.some(function(n){return t(this,e),n===s}.bind(this))),d}catch(e){console.log("ex_bidder ERR",e)}}},{key:"_isT4R",value:function(e){var t,n,r;if(!this.gameData.publishedAt)return!1;var i=new Date(this.gameData.publishedAt);if(((new Date).getTime()-i.getTime())/864e5<=10)return!1;var a=this.gameData.meta,s=e.t4r.meta;if((null==a?void 0:a.ast.c)>=(null==s?void 0:s.ast.c)&&(null==a?void 0:a.sit.c)>=(null==s?void 0:s.sit.c))return!1;if(this._isExcludedBidderForT4R())return this.msgrt.send("bidder.ex",{message:"true"}),!1;this.msgrt.send("bidder.ex",{message:"false"});var o,c=null===(t=this._adrequest_user_context)||void 0===t?void 0:t.tnl_ad_pos;if(this.clickCount[c]>=(null===(n=e.t4r[c])||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 c&&(null===(o=e.t4r[c])||void 0===o?void 0:o.enabled);if(null!=e&&e.contentType.startsWith("video/")){var d,u=(null===(d=e.t4r[c])||void 0===d?void 0:d.viper)||0;if(u>0){var l,h=Math.random()<u;return c&&h&&(null===(l=e.t4r[c])||void 0===l?void 0:l.enabled)}return!1}return!1}},{key:"_isVMAP",value:function(e){var t,n,r,i,a,s,o,c,d,u,l,h,p,f,m;if(!e)return!1;var g="preroll"===e&&(!0===(null===(t=this.gameData)||void 0===t||null===(n=t.pAds)||void 0===n?void 0:n.vmap)||!0===(null===(r=this.gameData)||void 0===r||null===(i=r.pAds)||void 0===i||null===(a=i.vmap)||void 0===a?void 0:a.enabled))||"midroll"===e&&(!0===(null===(s=this.gameData)||void 0===s||null===(o=s.mAds)||void 0===o?void 0:o.vmap)||!0===(null===(c=this.gameData)||void 0===c||null===(d=c.mAds)||void 0===d||null===(u=d.vmap)||void 0===u?void 0:u.enabled))||"rewarded"===e&&(!0===(null===(l=this.gameData)||void 0===l||null===(h=l.rAds)||void 0===h?void 0:h.vmap)||!0===(null===(p=this.gameData)||void 0===p||null===(f=p.rAds)||void 0===f||null===(m=f.vmap)||void 0===m?void 0:m.enabled));if(!g)return!1;var v=this._get_vmap_config(e),b=this.adCounter[e];return void 0!==(null==v?void 0:v.start)?b>=(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){for(var t=e.adtag,n=e.position,r=e.config,i=e.dp,a=r.count||2,s=[],o=1;o<=a;o++){var c={};c.adtag=this._createCustomAdVastUrl(r["vast_"+o])||t,c.position=n,c.dp=r["vast_"+o]?void 0:i,s.push(c)}return s}},{key:"_get_vmap_config",value:function(e){var t,n,r,i,a,s,o,c;switch(e){case"preroll":return null===(t=this.gameData)||void 0===t||null===(n=t.pAds)||void 0===n?void 0:n.vmap;case"midroll":return null===(r=this.gameData)||void 0===r||null===(i=r.mAds)||void 0===i?void 0:i.vmap;case"rewarded":return null===(a=this.gameData)||void 0===a||null===(s=a.rAds)||void 0===s?void 0:s.vmap;default:return null===(o=this.gameData)||void 0===o||null===(c=o.pAds)||void 0===c?void 0:c.vmap}}},{key:"_isDP",value:function(e){var t,n,r;return!!e&&!0===(null===(t=this.gameData)||void 0===t||null===(n=t.dp)||void 0===n||null===(r=n[e])||void 0===r?void 0:r.enabled)}},{key:"_create_dp_display_context",value:function(){var e=this;return new Promise(function(n){var r=this;t(this,e);try{var i={id:this.topDomain||this.parentDomain,au:"display",ty:"display",aid:this.gameData.gameId,pgu:this.parentURL},a=new oS(this.gameData).checkCustomParams();a&&(i.cp=a);var s=encodeURIComponent(I.encode(JSON.stringify(i)));fetch("https://tag.atom.gamedistribution.com/v1/atm?ar=".concat(s)).then(function(e){return t(this,r),e.json()}.bind(this)).then(function(e){if(t(this,r),!e||!e.p)return this.msgrt.send("dp.na",{message:"atom"}),n();var i=e.p/100;this.msgrt.send("dp.fp",{message:i}),n({params:{fp:i},error_url:"https://tag.atom.gamedistribution.com/v1/err?ar=".concat(s),impression_url:"https://tag.atom.gamedistribution.com/v1/imp?ar=".concat(s)})}.bind(this)).catch(function(e){t(this,r),this.msgrt.send("dp.err",{message:(null==e?void 0:e.message)||e}),n()}.bind(this))}catch(e){this.msgrt.send("dp.err",{message:(null==e?void 0:e.message)||e}),n()}}.bind(this))}},{key:"_create_promo_context",value:function(e){var n,r=this,i={id:this.topDomain||this.parentDomain,au:e||"unknown",ty:"video",aid:this.gameData.gameId,pgu:this.parentURL},a=Object.keys(i).map(function(e){return t(this,r),"".concat(e,"=").concat(encodeURIComponent(i[e]))}.bind(this)).join("&");encodeURIComponent(I.encode(JSON.stringify(i)));var s=null===(n=this.gameData.promo)||void 0===n?void 0:n.rainbow,o=null==s?void 0:s.enabled,c="https://tag.atom.gamedistribution.com/v1/rainbow/?".concat(a),d=o?c:void 0;return function(){t(this,r),us.promoError&&(console.log("promo-test fictional promo error"),d=void 0)}.bind(this),{promo_url:d,promo_imp_blue_url:o?"https://tag.atom.gamedistribution.com/v1/rainbow/blue":void 0,promo_imp_green_url:o?"https://tag.atom.gamedistribution.com/v1/rainbow/green":void 0}}},{key:"_create_dp_context",value:function(n,i){var a=this;return new Promise(function(){var s=e(r.mark((function e(s){var o,c,d,u,l,h=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,a._isDP(n)){e.next=5;break}return a.msgrt.send("dp.na",{message:"rule"}),e.abrupt("return",s());case 5:c={id:a.topDomain||a.parentDomain,au:n||"unknown",ty:"video",aid:a.gameData.gameId,pgu:a.parentURL},(d=new oS(a.gameData).checkCustomParams())&&(c.cp=d),u=encodeURIComponent(I.encode(JSON.stringify(c))),null==i||i.adapterIndex,null==i||i.isLastAdapter,l=null===(o=a.gameData.promo)||void 0===o?void 0:o.rainbow,!1,null==l||l.enabled,null==i||i.isLastAdapter,fetch("https://tag.atom.gamedistribution.com/v1/atm?ar=".concat(u)).then(function(e){return t(this,h),e.json()}.bind(this)).then(function(e){if(t(this,h),!e||!e.p)return a.msgrt.send("dp.na",{message:"atom"}),s();var n=e.p/100;a.msgrt.send("dp.fp",{message:n}),s({id:Date.now(),floor_price:n,error_url:"https://tag.atom.gamedistribution.com/v1/err?ar=".concat(u,"&ec=[ERRORCODE]"),impression_url:"https://tag.atom.gamedistribution.com/v1/imp?ar=".concat(u),skip_url:"https://tag.atom.gamedistribution.com/v1/skp?ar=".concat(u),promo_url:void 0,promo_imp_blue_url:void 0,promo_imp_green_url:void 0})}.bind(this)).catch(function(e){t(this,h),a.msgrt.send("dp.err",{message:(null==e?void 0:e.message)||e}),s()}.bind(this)),e.next=20;break;case 16:e.prev=16,e.t0=e.catch(0),a.msgrt.send("dp.err",{message:(null===e.t0||void 0===e.t0?void 0:e.t0.message)||e.t0}),s();case 20:case"end":return e.stop()}}),e,this,[[0,16]])})));return function(e){return s.apply(this,arguments)}}())}},{key:"_extend_dp_with_adsense",value:function(e,t){if(e&&t)try{var n,r=new O(t.vastUrl,!0);if(null===(n=r.query)||void 0===n||!n.cust_params)return;var i=N.parse(r.query.cust_params);if(!i.tnl_asset_id)return;i.adsense=1,r.query.cust_params=N.stringify(i,!1),e.fallback_url=r.toString(),e.fallback_imp_url="https://tag.atom.gamedistribution.com/v1/rainbow/green"}catch(e){}}},{key:"_extend_hl_url",value:function(e){e.dp;var t=e.hl;e.src;var n=e.tnl_keys,r=!0!==(null==t?void 0:t.bidFloorApplied)?0:1;0===r&&null!=n&&n.hasOwnProperty("fp")?r=2:1!==r||null!=n&&n.hasOwnProperty("fp")||(r=3),n.bfa=r;try{var i,a=new O(e.url,!0);if(null===(i=a.query)||void 0===i||!i.cust_params)return;var s=N.parse(a.query.cust_params);s.bfa=r,s.adsense=0,a.query.cust_params=N.stringify(s,!1),e.url=a.toString(),t.vastUrl=e.url}catch(e){}finally{this.msgrt.send("bfa",{message:r})}}},{key:"_init_hl_script",value:(u=e(r.mark((function e(n){var i,a,s,o,c,d,u,l=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=this._getPrebidScripts(),a=i[0],s=function(){return t(this,l),!1}.bind(this),window.idhb=window.idhb||{iabCmpExists:s},window.idhb.options=window.idhb.options||{},Object.assign(window.idhb.options,{assetId:this.gameData.gameId,configUrl:this.topDomain||this.parentDomain,parentUrl:this.parentURL,pageType:"gd"}),"undefined"===window.idhb.options.configUrl&&(window.idhb.options.configUrl=null),window.idhb.que=window.idhb.que||[],(o=new URL(a)).searchParams.append("referer",window.idhb.options.configUrl),a=o.href,e.next=13,f(a,"gdsdk_prebid",{alternates:i,error_prefix:"Blocked:",exists:function(){return t(this,l),window.idhb.requestAds}.bind(this)});case 13:c=y("ch",window.location.href),d=y("ch_date",window.location.href),u={tnl_content_category:this.category.toLowerCase()},c&&(u.channel=c),d&&(u.ch_date=d),window.idhb.setAdserverTargeting(u),window.idhb.allowPersonalizedAds(!!parseInt(this.userAllowedPersonalizedAds)),window.idhb.addEventListener("slotRenderEnded",function(e){var n=this;t(this,l);try{var r,i=e.slotId.split("@");i=1===i.length?i[0]:i[1],e.isEmpty?(null!==(r=this.atom_display)&&void 0!==r&&r.error_url&&(fetch(this.atom_display.error_url).catch(function(e){t(this,n)}.bind(this)),delete this.atom_display),this._broadcast("DISPLAYAD_ERROR",{message:i,status:"warning"})):(this.atom_display.impression_url&&(fetch(this.atom_display.impression_url).catch(function(e){t(this,n)}.bind(this)),delete this.atom_display),this._broadcast("DISPLAYAD_IMPRESSION",{message:i,status:"success"}))}catch(e){}}.bind(this));case 21:case"end":return e.stop()}}),e,this)}))),function(e){return u.apply(this,arguments)})},{key:"_init_ima_script",value:(d=e(r.mark((function e(n){var i,a,s=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=["https://imasdk.googleapis.com/js/sdkloader/ima3_debug.js","https://imasdk.googleapis.com/js/sdkloader/ima3.js","http://imasdk.googleapis.com/js/sdkloader/ima3_debug.js","http://imasdk.googleapis.com/js/sdkloader/ima3.js"],a=this.options.debug?i[0]:i[1],e.next=4,f(a,"gdsdk_ima",{alternates:i,error_prefix:"Blocked:",exists:function(){return t(this,s),window.google&&window.google.ima}.bind(this)});case 4:case"end":return e.stop()}}),e,this)}))),function(e){return d.apply(this,arguments)})},{key:"_init_afg_script",value:(c=e(r.mark((function e(n){var i,a,s,o,c=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.gameData.afg_disabled){e.next=3;break}return e.abrupt("return");case 3:return(o={}).crossorigin="anonymous",o["data-ad-client"]=(null==n||null===(i=n.adsense_client)||void 0===i?void 0:i.length)>0?n.adsense_client:"ca-pub-2316275586951220",o["data-ad-frequency-hint"]="30s",o.allow="autoplay",(null==n||null===(a=n.adsense_channel)||void 0===a?void 0:a.length)>0&&(o["data-ad-channel"]=n.adsense_channel),(null==n||null===(s=n.adsense_host)||void 0===s?void 0:s.length)>0&&(o["data-ad-host"]=n.adsense_host),!0===(null==n?void 0:n.adsense_adbreak_test)&&(o["data-adbreak-test"]="on"),e.next=14,f("https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js","afg",{error_prefix:"Blocked:",exists:function(){return t(this,c),!!window.adsbygoogle}.bind(this),attrs:o});case 14:window.adsbygoogle=window.adsbygoogle||[],window.adsbygoogle.push({sound:"on",preloadAdBreaks:"on"});case 16:case"end":return e.stop()}}),e,this)}))),function(e){return c.apply(this,arguments)})},{key:"fixOutOfBounds",value:function(){try{if(!(this.gameData.afgszf&&this.gameData.afgszf.enabled))return;for(var e=this.gameData.afgszf,t=e.height,n=e.scrolls,r=t||"120vh",i=n||!0,a=document.getElementsByClassName("adsbygoogle"),s=0;s<a.length;s++){var o,c=a[s],d=c&&(null===(o=c.children[0])||void 0===o?void 0:o.children[0]);d&&"IFRAME"===d.tagName&&d.style.height!==r&&(d.style.height=r,i&&(d.parentElement.style.overflow="auto"))}}catch(e){"out-of-bounds error: ".concat(e.message)}}},{key:"clearSession",value:function(){this.requestRunning=!1}},{key:"_startAdsensePlacementRewardedAd",value:(o=e(r.mark((function e(n){var i,a,s,o,c,d,u,l,h=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.params,e.prev=1,!this.requestRunning){e.next=5;break}return this._broadcast("AD_IS_ALREADY_RUNNING",{status:"warning"}),e.abrupt("return");case 5:if(!void function(){if(t(this,h),us.fictionalAdSenseError||n.params.shouldFail)return this._broadcast("AD_ERROR",{message:"fictional adsense rewarded error",status:"error",skipForward:!0}),!0}.bind(this)){e.next=8;break}return e.abrupt("return");case 8:this.requestRunning=!0,this._send_atom_event("sg.ad.rw.requested"),i=!1,a=function(){t(this,h),i=!0,this.fixOutOfBounds(),this._broadcast("CONTENT_PAUSE_REQUESTED",{message:"",status:"success"}),this._broadcast("IMPRESSION",{message:"",status:"success"})}.bind(this),s=function(){t(this,h),i=!0,this._broadcast("CONTENT_RESUME_REQUESTED",{message:"",status:"success"})}.bind(this),o=function(){t(this,h),i=!0,this._send_atom_event("sg.ad.rw.dismissed")}.bind(this),c=function(){t(this,h),i=!0,this._broadcast("COMPLETE",{message:"",status:"success"}),this._broadcast("SDK_REWARDED_WATCH_COMPLETE",{message:"",status:"success"}),this._send_atom_event("sg.ad.rw.viewed")}.bind(this),d=function(e){t(this,h),i=!0,e()}.bind(this),u=function(e){t(this,h),i=!0,this.resetForNext();var n="rewarded";this.adCounter[n]=this.adCounter[n]||0,this.adCounter[n]++,"viewed"===e.breakStatus?this._broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success"}):(this._broadcast("AD_ERROR",{message:e.breakStatus,status:"error",skipForward:!0}),"dismissed"!==e.breakStatus&&this._send_atom_event("sg.dbg.rw",e))}.bind(this),l=function(e){window.adsbygoogle.push(e)},setTimeout(function(){t(this,h),i||(cs("gd-adflow adsense.reward timeout happened!"),this.requestRunning=!1,this._broadcast("AD_ERROR",{message:"timeout",status:"error",skipForward:!0}),this._send_atom_event("sg.dbg.rw",{breakStatus:"timeout"}))}.bind(this),1e3),l({type:"reward",name:"reward-in-game",beforeAd:a,afterAd:s,adDismissed:o,adViewed:c,beforeReward:d,adBreakDone:u}),e.next=26;break;case 22:throw e.prev=22,e.t0=e.catch(1),this._onError(e.t0),e.t0;case 26:case"end":return e.stop()}}),e,this,[[1,22]])}))),function(e){return o.apply(this,arguments)})},{key:"_startAdsensePlacementPreroll",value:(s=e(r.mark((function e(n){var i,a=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.params,e.prev=1,!this.requestRunning){e.next=5;break}return this._broadcast("AD_IS_ALREADY_RUNNING",{status:"warning"}),e.abrupt("return");case 5:if(!void function(){if(t(this,a),us.fictionalAdSenseError||n.params.shouldFail)return this._broadcast("AD_ERROR",{message:"fictional adsense preroll error",status:"error"}),!0}.bind(this)){e.next=8;break}return e.abrupt("return");case 8:this.requestRunning=!0,this._send_atom_event("sg.ad.pr.requested"),i=function(e){t(this,a),this.resetForNext();var n="preroll";this.adCounter[n]=this.adCounter[n]||0,this.adCounter[n]++,"viewed"===e.breakStatus?(this._send_atom_event("sg.ad.pr.viewed"),this._broadcast("CONTENT_PAUSE_REQUESTED",{message:"",status:"success"}),this._broadcast("IMPRESSION",{message:"",status:"success"}),this._broadcast("COMPLETE",{message:"",status:"success"}),this._broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success"}),this._broadcast("CONTENT_RESUME_REQUESTED",{message:"",status:"success"})):(this._broadcast("AD_ERROR",{message:e.breakStatus,status:"error"}),this._send_atom_event("sg.dbg.pr",e))}.bind(this),r={type:"preroll",adBreakDone:i},window.adsbygoogle.push(r),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 r}),e,this,[[1,15]])}))),function(e){return s.apply(this,arguments)})},{key:"_startAdsensePlacementStart",value:(a=e(r.mark((function e(n){var i,a,s,o=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.params,e.prev=1,!this.requestRunning){e.next=5;break}return this._broadcast("AD_IS_ALREADY_RUNNING",{status:"warning"}),e.abrupt("return");case 5:if(!void function(){if(t(this,o),us.fictionalAdSenseError||n.params.shouldFail)return this._broadcast("AD_ERROR",{message:"fictional adsense preroll error 2",status:"error"}),!0}.bind(this)){e.next=8;break}return e.abrupt("return");case 8:this.requestRunning=!0,this._send_atom_event("sg.ad.pr.requested"),i=function(){t(this,o),this.fixOutOfBounds(),this._broadcast("CONTENT_PAUSE_REQUESTED",{message:"",status:"success"}),this._broadcast("IMPRESSION",{message:"",status:"success"})}.bind(this),a=function(){t(this,o),this._broadcast("CONTENT_RESUME_REQUESTED",{message:"",status:"success"})}.bind(this),s=function(e){t(this,o),this.resetForNext();var n="preroll";this.adCounter[n]=this.adCounter[n]||0,this.adCounter[n]++,"viewed"===e.breakStatus?(this._send_atom_event("sg.ad.pr.viewed"),this._broadcast("COMPLETE",{message:"",status:"success"}),this._broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success"})):(this._broadcast("AD_ERROR",{message:e.breakStatus,status:"error"}),this._send_atom_event("sg.dbg.pr",e))}.bind(this),r={type:"start",name:"start-in-game",beforeAd:i,afterAd:a,adBreakDone:s},window.adsbygoogle.push(r),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 r}),e,this,[[1,17]])}))),function(e){return a.apply(this,arguments)})},{key:"_startAdsensePlacementNext",value:(i=e(r.mark((function e(n){var i,a,s,o=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.params,e.prev=1,!this.requestRunning){e.next=5;break}return this._broadcast("AD_IS_ALREADY_RUNNING",{status:"warning"}),e.abrupt("return");case 5:if(!void function(){if(t(this,o),us.fictionalAdSenseError||n.params.shouldFail)return this._broadcast("AD_ERROR",{message:"fictional adsense midroll error",status:"error"}),!0}.bind(this)){e.next=8;break}return e.abrupt("return");case 8:this.requestRunning=!0,this._send_atom_event("sg.ad.mr.requested"),i=function(){t(this,o),this.fixOutOfBounds(),this._broadcast("CONTENT_PAUSE_REQUESTED",{message:"",status:"success"}),this._broadcast("IMPRESSION",{message:"",status:"success"})}.bind(this),a=function(){t(this,o),this._broadcast("CONTENT_RESUME_REQUESTED",{message:"",status:"success"})}.bind(this),s=function(e){t(this,o),this.resetForNext();var n="midroll";this.adCounter[n]=this.adCounter[n]||0,this.adCounter[n]++,"viewed"===e.breakStatus?(this._send_atom_event("sg.ad.mr.viewed"),this._broadcast("COMPLETE",{message:"",status:"success"}),this._broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success"})):(this._broadcast("AD_ERROR",{message:e.breakStatus,status:"error"}),this._send_atom_event("sg.dbg.mr",e))}.bind(this),r={type:"next",name:"next-in-game",beforeAd:i,afterAd:a,adBreakDone:s},window.adsbygoogle.push(r),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 r}),e,this,[[1,17]])}))),function(e){return i.apply(this,arguments)})},{key:"_send",value:function(e,t){try{var n=this.msgrt,r=n._layout,i=n._ua,a={tp:e,ct:0,vrs:this.PackageJSON.version,url:this.parentURL,rfr:document.referrer,tdmn:this.topDomain||this.parentDomain,dpth:0,args:t,ua:{brnm:i.browser.name,brvs:i.browser.version,osnm:i.os.name,osvs:i.os.version,dvmd:i.device.model,w:r.w,h:r.h}};fetch("https://tag.atom.gamedistribution.com/v1/dmp?ar=".concat(encodeURIComponent(I.encode(JSON.stringify(a)))))}catch(e){}}},{key:"_send_atom_event",value:function(e,t){var n={gid:this.gameData.slug,md5:this.gameData.gameId,pid:0,pnm:this.gameData.pname,ctry:this.gameData.ctry,lcl:"en",hle:1,ads:1,args:t,href:window.location.href},r=(new xw).get();n=BS(BS({},n),r),n=t?BS(BS({},n),t):n,this._send(e,n)}},{key:"_isAfgPositionNext",value:function(e){return void 0!==e.adTimestamp}},{key:"_isAfgPositionStart",value:function(e){if(void 0!==e.adTimestamp)return!1;var t="preroll";return this.adCounter[t]=this.adCounter[t]||0,0===this.adCounter[t]}},{key:"attachAfgPosition",value:function(e){var t=e.params.position;switch(t){case"preroll":case"start":case"pause":case"next":case"browse":case"reward":return}var n=e.adType;if(n===g.Rewarded)t="reward";else if(n===g.Interstitial){var r,i;if(this._isAfgPositionStart(e))t=null===(r=this.gameData.pAds)||void 0===r||!r.enabled||null!==(i=this.gameData.loader)&&void 0!==i&&i.enabled?"start":"next";else this._isAfgPositionNext(e)&&(t="next")}t||(t="preroll"),e.params.position=t}},{key:"_broadcast",value:function(e,n){var r=this,i=!1;["AD_ERROR"].some(function(n){return t(this,r),n===e}.bind(this))&&(i=!this.adContext.isLastAdapter||this.adContext.extraPromoRunOnFail);var a=this.getCurrentAdPosition(this.adContext.adType);this.eventBus.broadcast(e,BS(BS({},n),{},{skipForward:i,adPosition:a}))}}]),n}(),FS=R((function t(n){var i=this;D(this,t),T(this,"load",e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,$v(i.moduleName);case 2:i.module=e.sent;case 3:case"end":return e.stop()}}),e)})))),T(this,"promo",e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i.module){e.next=3;break}return e.next=3,i.load();case 3:return e.abrupt("return",i.module[i.moduleDefault]);case 4:case"end":return e.stop()}}),e)}))));var a=n.package||"gd-sdk-stone-dynamic",s=n.package_version||"1.1.1",o=n.template||"puzzle",c=n.dependencies||[];this.moduleName="GDPromoByOrbit",this.moduleDefault=o.charAt(0).toUpperCase()+o.slice(1),this.moduleConfig={source:"https://pm.azerioncircle.com/@bygd/".concat(a,"/").concat(s,"/dist/").concat(o.toLowerCase(),"/iife/index.js"),dependencies:c},Wv(this.moduleName,this.moduleConfig)})),VS=R((function t(n){var i=this;D(this,t),T(this,"load",e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,$v(i.moduleName);case 2:i.module=e.sent;case 3:case"end":return e.stop()}}),e)})))),T(this,"splash",e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i.module){e.next=3;break}return e.next=3,i.load();case 3:return e.abrupt("return",i.module[i.moduleDefault]);case 4:case"end":return e.stop()}}),e)}))));var a=n.package||"gd-sdk-air-dynamic",s=n.package_version||"1.2.0",o=n.template||"pluto",c=n.dependencies||[];this.moduleName="GDSplashDynamic",this.moduleDefault=o.charAt(0).toUpperCase()+o.slice(1),this.moduleConfig={source:"https://pm.azerioncircle.com/@bygd/".concat(a,"/").concat(s,"/dist/").concat(o.toLowerCase(),"/iife/index.js"),dependencies:c},Wv(this.moduleName,this.moduleConfig)})),zS=function(e,t){console.log(e,t)},HS={},WS={},KS=null;function $S(){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 HS.version=r,HS.frame=e,HS.function=n,HS.version}function QS(e){var n=this;return KS||(KS=new Promise(function(r){function i(t,n){if(zS("Received a response from CMP",t),n){var i,a;if(!1!==t.gdprApplies)return"tcloaded"===t.eventStatus||"useractioncomplete"===t.eventStatus?(("boolean"!=typeof(a=(i=t)&&"boolean"==typeof i.gdprApplies?i.gdprApplies:e.defaultGdprScope)||!0===a&&"string"!=typeof i.tcString)&&r({result:"cmpUnexpectedResponse",cmp:HS,consentData:i}),void r({result:"ok",consentData:t})):void 0;r({result:"ok",consentData:t})}else r({result:"cmpCallFailed"})}t(this,n),$S(),HS.frame?2===HS.version?(zS("TCF v2 CMP found. Fetching the consent."),HS.function?(zS("CMP API is directly accessible, calling it now..."),HS.function("addEventListener",HS.version,i)):(zS("CMP API is outside the current iframe, calling it now..."),function(e,n,r){var i=this,a="__tcfapi";function s(e){var t="".concat(a,"Return"),n="string"==typeof e.data&&e.data.indexOf(t)>=0?JSON.parse(e.data):e.data;if(n[t]&&n[t].callId){var r=n[t];void 0!==WS[r.callId]&&WS[r.callId](r.returnValue,r.success)}}window[a]=function(e,r,s,o){t(this,i);var c=Math.random()+"",d="".concat(a,"Call"),u=T({},d,{command:e,parameter:o,callId:c,version:r});WS[c]=s,n.postMessage(u,"*")}.bind(this),window.addEventListener("message",s,!1),window[a](e,HS.version,r)}("addEventListener",HS.frame,i))):r({result:"cmpVersionNotV2",cmp:HS}):r({result:"cmpNotFound"})}.bind(this)),KS)}var YS=new(function(){function t(){D(this,t),this.productName="Game Distribution"}var n;return R(t,[{key:"checkIfExcluded",value:function(e){try{var t,n;return!(null===(t=e.diagnostic)||void 0===t||null===(n=t.gameDock)||void 0===n||!n.excluded)}catch(e){return console.log("Error on checkIfExclude check",e),!1}}},{key:"track",value:(n=e(r.mark((function e(t,n){var i,a,s,o,c,d,u;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.checkIfExcluded(n)){e.next=3;break}return e.abrupt("return");case 3:if(s=null==t||null===(i=t.visitor)||void 0===i||null===(a=i.visitorData)||void 0===a?void 0:a.visitorId){e.next=6;break}return e.abrupt("return");case 6:return o=encodeURIComponent(this.productName),c=encodeURIComponent(s),e.prev=8,d="https://tracker-v4.gamedock.io/v1/events-tracker/track/product/".concat(o,"/user_id/").concat(c),e.next=12,fetch(d,{method:"POST"});case 12:e.sent,e.next=28;break;case 15:return e.prev=15,e.t0=e.catch(8),console.log("GAME_DOCK. fail v4",e.t0),e.prev=18,u="https://tracker.gamedock.io/v1/events-tracker/track/product/".concat(o,"/user_id/").concat(c),e.next=22,fetch(u,{method:"POST"});case 22:e.sent,e.next=28;break;case 25:e.prev=25,e.t1=e.catch(18),console.log("GAME_DOCK. fail v6",e.t1);case 28:case"end":return e.stop()}}),e,this,[[8,15],[18,25]])}))),function(e,t){return n.apply(this,arguments)})}]),t}());function JS(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return XS(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 XS(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,o=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){o=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(o)throw a}}}}function XS(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 ZS=function(e){var n=this,r=e.src,i=e.attributes,a=e.target,s=e.isAsync;return new Promise(function(e,o){var c=this;t(this,n);try{var d=document.createElement("script");if(d.async=null==s||s,d.type="text/javascript",d.onload=function(){t(this,c),e()}.bind(this),d.onerror=function(){t(this,c);var e="Error on script load, Error: ".concat(r);console.log(e),o(e)}.bind(this),d.src=r,i){var u,l=JS(i);try{for(l.s();!(u=l.n()).done;){var h=u.value,p=h.key,f=h.value;d.setAttribute(p,f)}}catch(e){l.e(e)}finally{l.f()}}a||(a=document.head),a.appendChild(d)}catch(e){var m="Error on script load catch, Error: ".concat(r);console.log(m,e),o(m)}}.bind(this))},eR="140feb72-7952-4420-8ae5-e8978d87bc17",tR=function(){var t=e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,ZS({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,ZS({src:"https://cookie-cdn.cookiepro.com/consent/".concat(eR,"/OtAutoBlock.js"),attributes:[{key:"id",value:"gd-cookie-pro-autoblock"}],isAsync:!1});case 5:return e.next=7,ZS({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:eR}],isAsync:!1});case 7:n=void 0,r=void 0,i=void 0,n=(t={inlineScript:"function OptanonWrapper() { }"}).inlineScript,r=t.target,(i=document.createElement("script")).text=n,r||(r=document.head),r.appendChild(i),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(0),console.log("GD: CMP error on load",e.t0);case 13:case"end":return e.stop()}var t,n,r,i}),e,null,[[0,10]])})));return function(){return t.apply(this,arguments)}}(),nR=new j,rR={"https://games.softgames.com":{"splash-hidden":"splash-hidden"},"https://sg.gamedistribution.com":{"splash-hidden":"splash-hidden"},"https://html5.gamedistribution.com":{key:"value"}},iR=!1;function aR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}window.addEventListener("message",(function(e){var n=this,r=e.data,i=e.origin,a=r.type;if(Object.keys(rR).some(function(e){return t(this,n),e===i}.bind(this))&&(null==r||!r.__tcfapiCall)){var s=!r.type||!r.type.startsWith("gd-sdk")&&!("parent-data-response"===r.type)||"sg-game-event"===r.type;!function(e){if("gd-sdk-on-event"===(null==e?void 0:e.type)){var t,n,r;if("midroll"!==(null==e||null===(t=e.event)||void 0===t?void 0:t.adPosition))return;var i="CONTENT_RESUME_REQUESTED"===(null===(n=e.event)||void 0===n?void 0:n.name);"CONTENT_PAUSE_REQUESTED"===(null===(r=e.event)||void 0===r?void 0:r.name)&&(iR=!0),i&&iR&&(iR=!1,window.parent.postMessage({type:"sg-game-event",eventName:"levelFinish",data:{score:100}},"*"))}}(r);var o=function(){t(this,n);try{var r,i;return null==e||null===(r=e.source)||void 0===r||null===(i=r.location)||void 0===i?void 0:i.href}catch(e){}}.bind(this);if(window.parent&&s){if("https://html5.gamedistribution.com"===i){var c=o();if(!c)return;var d=c&&["9555f04e1900482aaaef710cd2f8c440"].some(function(e){return t(this,n),c.indexOf(e)>0}.bind(this)),u=["sg-game-event"].some(function(e){return t(this,n),e===(null==r?void 0:r.type)}.bind(this));if(!d&&!u)return}var l=r.eventName,h=r.data;window.mpHelper&&(console.log("SG_EVENTS sending to minijuegos!"),"levelStart"!==l&&"levelFinish"!==l||window.mpHelper.sendStat("level",h.level),"levelFinish"===l&&window.mpHelper.sendStat("score",h.score)),window.parent.postMessage(r,"*")}if(a){var p=rR[i][a];p&&nR.emit(p,r)}}}),!1);var sR="__msgr",oR=F(),cR=function(e){var n=this;if(!window[sR]){var r=document.createElement("iframe");if(r.src="https://static.gamedistribution.com/message/index.html",r.style.display="none",r.name=sR,document.body.appendChild(r),window!==window.top){var i={gameId:e.gameId,target:e.evnts.domain,token:oR,event_name:"TokenGenerated",timestamp:Date.now()};r.onload=function(){lR(i)},setInterval(function(){t(this,n),i.timestamp=Date.now(),i.event_name="Heartbeat",lR(i)}.bind(this),1e3*e.evnts.heartbeatDuration)}}window.addEventListener("message",function(e){t(this,n);try{var r=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?aR(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):aR(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e.data);if(!r.event_name)return;r.token=oR,lR(r)}catch(e){console.error("GD Messager Error",e.message)}}.bind(this),!1)},dR=function(e){try{var t={gameId:e.game.gameId,target:e.game.evnts.domain,event_name:e.event,timestamp:Date.now()},n=uR(window);n!==window.top&&(null==n||n.postMessage(t,"https://html5.gamedistribution.com"))}catch(e){}},uR=function e(t){try{var n,r,i=null==t?void 0:t.parent;if("game"===(null===(n=i.document)||void 0===n||null===(r=n.activeElement)||void 0===r?void 0:r.id))return i;e(i)}catch(e){return t}},lR=function(e){try{window[sR]&&window[sR].postMessage(e,"*")}catch(e){console.log("GD Messager initialization, please wait....")}},hR=function(){function n(e){D(this,n),this.adContainer=document.getElementById("gdsdk__advertisement"),this.adContainerInner=document.getElementById("gdsdk__advertisement_slot"),this._adRequest=e.adRequest,this._gameData=e._gameData,this._msgrt=e._msgrt,this._adInstance=e._adInstance,this._eventBus=e._eventBus,this.blockedAdsMap=e._blockedAdsMap,this._parentURL=e._parentURL,this._parentDomain=e._parentDomain,this._onResumeGame=e._onResumeGame.bind(e),this._onPauseGame=e._onPauseGame.bind(e),this._onRewardedWatchComplete=e._onRewardedWatchComplete.bind(e),this._onAdError=e._onAdError.bind(e),this._promoShowSuccess=!1}var i,a,s;return R(n,[{key:"run",value:function(n){var i=n.duration,a=this;return new Promise(function(){var n=e(r.mark((function e(n,s){var o,c=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,a.add();case 3:o=a.show(),setTimeout(function(){t(this,c);try{a.hide(),n({success:o})}catch(e){s(e)}}.bind(this),1e3*i),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),s(e.t0);case 10:case"end":return e.stop()}}),e,this,[[0,7]])})));return function(e,t){return n.apply(this,arguments)}}())}},{key:"show",value:function(){return this.promo_data.game?(this.adContainer.style.visibility="visible",this.promo.style.display="block",this._onPauseGame("Pause the game for the promo","success"),this._promoShowSuccess=!0):this._onAdError("Promo not found"),this._promoShowSuccess}},{key:"hide",value:function(){var e;(this.promo.remove(),this.adContainer.style.visibility="hidden",this._promoShowSuccess)&&("reward"===(null===(e=this._adRequest.params)||void 0===e?void 0:e.position)&&this._onRewardedWatchComplete());this._onResumeGame("Advertisement(s) are done. Start / resume the game.","success")}},{key:"add",value:(s=e(r.mark((function t(){var n,i,a,s=this;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.fetch_promo();case 3:this.promo_data=t.sent,n=document.createElement("div"),this.promo=n,i=this.promo_data,this.promo.addEventListener("click",function(){var t=e(r.mark((function e(t){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.preventDefault(),console.log(i),s.track_click(i.click_tracking),window.open(i.click_through,"_blank");case 4:case"end":return e.stop()}}),e)})));return function(e){return t.apply(this,arguments)}}()),(a=document.createElement("iframe")).src=this.promo_data.renderer_url,a.setAttribute("frameborder",0),this.addStyles(),this.promo.classList.add("gd__promo"),a.classList.add("gd__promo__iframe"),this.promo.appendChild(a),this.adContainer.appendChild(this.promo),t.next=21;break;case 18:t.prev=18,t.t0=t.catch(0),console.log(t.t0);case 21:case"end":return t.stop()}}),t,this,[[0,18]])}))),function(){return s.apply(this,arguments)})},{key:"addStyles",value:function(){var e="\n .gd__promo{\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background-color: transparent;\n z-index: 1;\n cursor: pointer;\n }\n .gd__promo__iframe{\n position: relative;\n z-index: -1;\n width:".concat(this.adContainerInner.style.width,";\n height:").concat(this.adContainerInner.style.height,";\n }\n "),t=document.body||document.getElementsByTagName("body")[0];this.addStylesheet("gd__promo__style",t,e)}},{key:"addStylesheet",value:function(e,t,n){if(!document.getElementById(e)){var r=document.createElement("style");r.id=e,r.styleSheet?r.styleSheet.cssText=n:r.appendChild(document.createTextNode(n)),t.appendChild(r)}}},{key:"fetch_promo",value:(a=e(r.mark((function e(){var n,i=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch("https://tag.atom.gamedistribution.com/v1/rainbow/pick?id=".concat(this._parentDomain,"&aid=").concat(this._gameData.gameId)).then(function(e){return t(this,i),e.json()}.bind(this));case 2:return n=e.sent,e.abrupt("return",n);case 4:case"end":return e.stop()}}),e,this)}))),function(){return a.apply(this,arguments)})},{key:"track_click",value:(i=e(r.mark((function e(t){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(t);case 2:case"end":return e.stop()}}),e)}))),function(e){return i.apply(this,arguments)})}]),n}();function pR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function fR(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?pR(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pR(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function mR(e,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 gR(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 gR(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,o=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){o=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(o)throw a}}}}function gR(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 vR,bR,yR=function(){function n(e){var r=this;D(this,n),T(this,"_getAdTypeByAfgPosition",function(e){var n=this;t(this,r);var i={preroll:["preroll","start"],midroll:["next"],rewarded:["reward"]},a=Object.keys(i).find(function(r){var a=this;return t(this,n),i[r].some(function(n){return t(this,a),n===e.params.position}.bind(this))}.bind(this));return a||"midroll"}.bind(this)),this._gameData=e._gameData,this._msgrt=e.msgrt,this._adInstance=e.adInstance,this._eventBus=e.eventBus,this.blockedAdsMap=e.blockedAdsMap,this._parentURL=e._parentURL,this._parentDomain=e._parentDomain,this._onResumeGame=e.onResumeGame.bind(e),this._onPauseGame=e.onPauseGame.bind(e),this._onRewardedWatchComplete=e.onRewardedWatchComplete.bind(e),this._onAdError=e.onAdError.bind(e),this._setAdRequestTimer=e._setAdRequestTimer.bind(e),this._giveGift=e._giveGift.bind(e),this._runAutoResume=e._runAutoResume.bind(e),this.send_atom_event=e.send_atom_event.bind(e),this.get_session_id=e.get_session_id.bind(e),this.get_ad_system_init_result=e.get_ad_system_init_result.bind(e),this.eventBus=new _}var i,a;return R(n,[{key:"runAdFlow",value:(a=e(r.mark((function e(n){var i,a,s,o,c,d,u,l,h,p,f,m,g,v,b,y,_,w,A,k,E,x,S,R,D,O,I,P,C,L,U,M,j,B,G,N,q,F,V,z,H,W=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.adRequest=n,c=this._getAdTypeByAfgPosition(n),n.params.position,d=this._getAdFlow(c),u=this._gameData,l=u.afg_disabled,h=null===(i=n.params)||void 0===i?void 0:i.isGift,null===(a=n.params)||void 0===a||a.position,p=null===(s=u.promo)||void 0===s?void 0:s.rainbow,f=(null==p?void 0:p.enabled)&&(null===(o=p.position)||void 0===o?void 0:o[c]),m=null==p?void 0:p.gift,g=f&&null!=p&&p.duration?null==p?void 0:p.duration:5,v=l?d.filter(function(e){return t(this,W),"adsense"!==e}.bind(this)):d,b=this.get_ad_system_init_result(),y=b.afg,_=b.ima,this.adsBlocked=!y||!_,this.adsBlocked?(cs("gd-adflow adsBlocked so changing the flow"),v=[]):(y||(v=v.filter(function(e){return t(this,W),"adsense"!==e}.bind(this))),_||(v=v.filter(function(e){return t(this,W),"ima"!==e}.bind(this)))),w=!1,A=!1,k=[],E=0,x=!1,S=mR(v),e.prev=26,S.s();case 28:if((R=S.n()).done){e.next=62;break}return D=R.value,n.params.adapter=D,O=E===v.length-1,I=h&&m||!h,P=O&&f&&I,n.params=fR(fR({},n.params),{},{adapterIndex:E,isLastAdapter:O,shouldFail:!1,extraPromoRunOnFail:P}),function(){t(this,W),us.firstSuccessOrder&&!isNaN(us.firstSuccessOrder)&&(n.params.shouldFail=E<us.firstSuccessOrder)}.bind(this),cs("gd-adflow, before adInvoke",E,D,n.params.shouldFail),e.next=39,this.adInvoke(n);case 39:if(C=e.sent,L=C.success,U=C.args,M=C.isSkipped,j=C.noVast,!L){e.next=51;break}return cs("gd-adflow, adapter-result-success",E,D,U),w=!0,A=!(null==U||!U.isPromoSuccess),e.abrupt("break",62);case 51:if(cs("gd-adflow, adapter-result-failure",E,D,U.message),E++,k.push(U.message),!M){e.next=56;break}return e.abrupt("break",62);case 56:if(!j){e.next=59;break}return this._runAutoResume(),e.abrupt("break",62);case 59:x=P;case 60:e.next=28;break;case 62:e.next=67;break;case 64:e.prev=64,e.t0=e.catch(26),S.e(e.t0);case 67:return e.prev=67,S.f(),e.finish(67);case 70:if(!x){e.next=76;break}return e.next=73,new hR(this).run({duration:g});case 73:e.sent.success&&(A=!0);case 76:return function(){var e;t(this,W),us.disableGift&&null!==(e=u.gft)&&void 0!==e&&e[c].enabled&&(u.gft[c].enabled=!1)}.bind(this),B=k.join(" /n"),w?(this._setAdRequestTimer(),this._onResumeGame("Advertisement(s) are done. Start / resume the game.","success"),this._giveGift(c)):(this._onResumeGame(B,"warning"),this._giveGift(c)),G="-1",N="none",w?(G="index_".concat(E),N=v[E]):A&&(G="promo",N="promo"),q=this.get_session_id(),this.adsBlocked&&"-1"===G?(F="rewarded"===c?"rewarded":this.blockedAdsMap.preroll?"midroll":"preroll",this.blockedAdsMap[F]=this.blockedAdsMap[F]?this.blockedAdsMap[F]+1:1,JSON.stringify(this.blockedAdsMap),this._msgrt.send("adflow.blocked.pos",{message:"".concat(F)}),this.send_atom_event("gd.adflow",{adBlocker:!0,afgBlocked:!0,imaBlocked:!0,adType:F,sessionId:q,successAdapter:"none",adFlowIndex:G})):(T(V={},"adflow.all.index",{message:"".concat(G)}),T(V,"adflow.all.success_adapter",{message:"".concat(N)}),T(V,"adflow.".concat(c,".index"),{message:"".concat(G)}),T(V,"adflow.".concat(c,".success_adapter"),{message:"".concat(N)}),z=V,Object.keys(z).forEach(function(e){t(this,W);var n=z[e];this._msgrt.send(e,n)}.bind(this)),this.send_atom_event("gd.adflow",{adFlowIndex:G,successAdapter:N,adBlocker:!1,afgBlocked:!y,imaBlocked:!_,adType:c,sessionId:q})),H={adType:c},this.eventBus.broadcast("AD_FLOW_COMPLETE",H),e.abrupt("return",H);case 89:case"end":return e.stop()}}),e,this,[[26,64,67,70]])}))),function(e){return a.apply(this,arguments)})},{key:"adInvoke",value:(i=e(r.mark((function n(i){var a=this;return r.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",new Promise(function(){var n=e(r.mark((function e(n,s){var o,c,d,u=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o="main.showad.".concat(i.params.adapter,".").concat(i.params.adapterIndex),c=function(e){t(this,u),a._eventBus.unsubscribeScope(o);var r="dismissed"===(null==e?void 0:e.message);n({success:!1,args:e,isSkipped:r,noVast:e.noVast})}.bind(this),d=function(e){t(this,u),a._eventBus.unsubscribeScope(o),n({success:!0,args:e})}.bind(this),a._eventBus.subscribe("AD_ERROR",c,o),a._eventBus.subscribe("AD_SDK_CANCELED",c,o),a._eventBus.subscribe("AD_SUCCESS",d,o),e.prev=6,e.next=9,a._adInstance.startAd(i);case 9:e.next=15;break;case 11:e.prev=11,e.t0=e.catch(6),ds("gd-adflow startAd error",e.t0),n({success:!1,err:e.t0});case 15:case"end":return e.stop()}}),e,this,[[6,11]])})));return function(e,t){return n.apply(this,arguments)}}()));case 1:case"end":return n.stop()}}),n)}))),function(e){return i.apply(this,arguments)})},{key:"_getAdFlow",value:function(e){var n,r,i,a,s,o,c,d,u=this,l=void function(){if(t(this,u),us.customAdFlow)return JSON.parse(us.customAdFlow)}.bind(this),h=this._gameData.adflw;l&&(h=l);var p=null!==(n=h)&&void 0!==n&&null!==(r=n.adapters)&&void 0!==r&&r.default?null===(i=h)||void 0===i||null===(a=i.adapters)||void 0===a?void 0:a.default:["ima","adsense"];return p=null!==(s=h)&&void 0!==s&&null!==(o=s.adapters)&&void 0!==o&&o[e]?null===(c=h)||void 0===c||null===(d=c.adapters)||void 0===d?void 0:d[e]:p}}]),n}(),_R=function(){function t(){D(this,t),this.moduleName="GDAeria",this.moduleConfig={source:"https://pm.azerioncircle.com/@bygd/gd-sdk-aeria/1.0.1/dist/default/iife/index.js",dependencies:[]},Wv(this.moduleName,this.moduleConfig)}var n,i;return R(t,[{key:"load",value:(i=e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,$v(this.moduleName);case 3:this.module=e.sent,this.module,e.next=11;break;case 7:e.prev=7,e.t0=e.catch(0),console.log("aeria module load error",e.t0),this.module=null;case 11:case"end":return e.stop()}}),e,this,[[0,7]])}))),function(){return i.apply(this,arguments)})},{key:"runYMenu",value:(n=e(r.mark((function e(t){var n;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.gameId,this.module){e.next=4;break}return e.next=4,this.load();case 4:(new this.module.Aeria).renderYMenu({gameId:n});case 6:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})}]),t}(),wR=function(){var e=this,n=function(){t(this,e);return/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Fa-f0-9]{32})(.*)$/i.test(location.href)}.bind(this),r=function(){t(this,e);return/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Za-z0-9]{8})\/(.*)$/i.test(location.href)}.bind(this),i=function(){t(this,e);return/^http[s]?:\/\/.*?gd_sdk_referrer_url=.*$/i.test(location.href)}.bind(this),a=function(){t(this,e);var i="html5.gamedistribution.com"!==O(window.location.href).host;return n()&&!(r()||i)?"loader-frame":"game-frame"}.bind(this);return{isMasterGameURL:n,isTokenGameURL:r,isExtHostedGameURL:i,whichFrame:a}},AR={isAeriaDomain:"minigame.aeriagames.jp"===(bR=(vR=new xw).get("partner.domain.value")||vR.get("top.domain.value"))||"minigame-stg.aeriagames.jp"===bR,isAeriaStagingDomain:"minigame-stg.aeriagames.jp"===bR},kR=AR.isAeriaStagingDomain;if(AR.isAeriaDomain){var ER=function(){var e,t="ae-soft-323";try{var n=(e=(new xw).get("partner.url.value"),new O(e,!0)),r=n.pathname,i=r.split("/"),a=i[i.length-1];cs("aeria-ylogin:loc",n,r,a),t=a}catch(e){ds("Error on getting aeria game id",e)}return t}(),xR={action:"score",data:{gameId:ER,score:100},env:kR?"staging":"production",system:"Softgames"};(new _).subscribe("AD_FLOW_COMPLETE",(function(e){"midroll"===e.adType&&function(){var e=window.parent||window,t=xR;e.postMessage(t,"*")}()}));var SR=function(){var t=e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(new _R).runYMenu({gameId:ER});case 2:case"end":return e.stop()}}),e)})));return function(){return t.apply(this,arguments)}}();"game-frame"===(0,wR().whichFrame)()&&SR()}var RR,DR=new j,TR=["https://games.softgames.com","https://sg.gamedistribution.com","https://minigame-stg.aeriagames.jp","https://minigame.aeriagames.jp","https://html5.gamedistribution.com","http://localhost:3005","https://yjgames.gamedistribution.com","https://portal-staging-sgweb.gamedistribution.com/"];window.addEventListener("message",(function(e){var n=this,r=e.data,i=e.origin,a=e.source;if(TR.some(function(e){return t(this,n),e===i}.bind(this))&&(null==r||!r.__tcfapiCall)){var s=r.system;r.action;var o="aeriaExternalHostsConnector"===s;if("Softgames"===s)RR=a,(window.parent||window).postMessage(r,"*"),DR.emit("aeria-event",r);else if(o){RR&&RR.postMessage(r,"*");var c=window.parent||window;c&&c.postMessage(r,"*")}}}),!1);var OR="https://html5.gamedistribution.com",IR="parent-data-request",PR="parent-data-response",CR=function(){function n(){D(this,n)}var i;return R(n,[{key:"init",value:function(e){var n=this;this._registerForDataRequests(e),this._askForParentFrameData().then(function(r){if(t(this,n),r){var i=r.adRequestTimer;e.adRequestTimer=i,e.adRequestTimer}}.bind(this))}},{key:"_registerForDataRequests",value:function(e){var n=this;window.addEventListener("message",function(r){t(this,n);var i=r.data,a=r.origin,s=r.source,o=i.type;if(i.value,a===OR&&o===IR){var c={adRequestTimer:e.adRequestTimer};s.postMessage({type:PR,value:c})}}.bind(this))}},{key:"_askForParentFrameData",value:(i=e(r.mark((function e(){var n=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(e,r){var i=this;t(this,n);var a=!1;window.addEventListener("message",(function(t){var n=t.data,r=t.origin;t.source;var i=n.type,s=n.value;r===OR&&i===PR&&(e(s),a=!0)})),setTimeout(function(){t(this,i),a||e()}.bind(this),1e3);var s={type:IR};window.parent.postMessage(s,"*")}.bind(this)));case 1:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})}]),n}(),LR=new CR;function UR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function MR(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?UR(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):UR(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var jR=F(),BR=null,GR=null,NR=function(){function n(e){var r=this;if(D(this,n),BR)return BR;BR=this,this.blockedAdsMap={},this._defaults=this._getDefaultOptions(),this._extendDefaultOptions(this._defaults,e),this._version=e.version||"0.0.0",this._bridge=this._getBridgeContext(),this._location=new xw,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={preroll:0,midroll:0,rewarded:0},this._mplus_count=0,this._setConsoleBanner(),this._initializeMessageRouter(),this._checkConsole(),this._subscribeToEvents(),this.sdkReady=new Promise(this._initializeSDKWithGameData.bind(this)),this.sdkReady.then(function(e){t(this,r),this._sdk_ready=!0}.bind(this)).catch(function(e){t(this,r),this._sdk_ready=!1}.bind(this)).finally(function(){var e,n,i=this;t(this,r),!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!==(n=this._gameData.evnts)&&void 0!==n&&n.enabled&&this._isLoaderGameURL()&&(cR(this._gameData),this._gameData.evnts.gameId===this.options.gameId&&setInterval(function(){t(this,i),this._send_gametag_data("heartbeat")}.bind(this),1e3*this._gameData.evnts.heartbeatDuration)),LR.init(this),this._send_gametag_data("sdk_init"),this._executeMidrollPlus()}.bind(this)),this._registerSGBridge(),this._whichFrame(),this._loadLocus()}var i,v,b,y,w,T,P,C,L,U,j,B,G;return R(n,[{key:"_initUnityHandler",value:function(){var e=this;window.addEventListener("DOMNodeInserted",function(){if(t(this,e),this._gameData.block_exts&&this._removeExternalsInHtml({enabled:!1}),document.getElementsByClassName("webgl-content")[0]){var n=document.getElementsByClassName("webgl-content")[0].getElementsByClassName("footer")[0];n&&n.setAttribute("style","display:none")}}.bind(this))}},{key:"_send_gametag_data",value:(G=e(r.mark((function e(t){var n;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this._getGdModeIfExist()&&(n=u()||"web",this.adInstance._send("tg.created",{gmid:this.options.gameId,dvc:n,qint:t}));case 1:case"end":return e.stop()}}),e,this)}))),function(e){return G.apply(this,arguments)})},{key:"_loadCMP",value:(B=e(r.mark((function e(){var t,n,i,a;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._isMasterGameURL()){e.next=6;break}if(i=new xw,0!==(null==(a=i.get("depth"))?void 0:a.value)||null===(t=this._gameData)||void 0===t||null===(n=t.cmp)||void 0===n||!n.enabled||"html5.gamedistribution.com"!==this._topDomain){e.next=6;break}return e.next=6,tR();case 6:case"end":return e.stop()}}),e,this)}))),function(){return B.apply(this,arguments)})},{key:"testConsent",value:function(){try{$S();e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,QS({});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;nR.on("splash-hidden",function(n){t(this,e),this._hideCMPButton()}.bind(this))}},{key:"_hideCMPButton",value:function(){var e=document.getElementById("ot-sdk-btn-floating");e&&(e.style.display="none")}},{key:"_sendLoadedEvent",value:function(){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:(j=e(r.mark((function e(n,i){var a,s=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this._getGameData();case 3:return this._gameData=e.sent,e.next=6,this._loadCMP();case 6:this._bridge.isCoreSDKMode=(null===(a=this._gameData.disableAds)||void 0===a?void 0:a.default)||!1,this._safeInit(),this._checkGameId(),this._checkGameDeleted(),this._checkBlocking(),this._changeMidrollInDebugMode(),void 0!==this._gameData.diagnostic&&void 0!==this._gameData.diagnostic.close_ads&&!1!==this._gameData.diagnostic.close_ads||(this.videoAdReady=this._initializeVideoAd().then(function(){t(this,s),(this._isMasterGameURL()||this._isExtHostedGameURL())&&(this.msgrt.send("adblocker.flw",{message:"ok"}),this.msgrt.send("adblocker.adapters",{message:"none"}))}.bind(this)).catch(function(e){t(this,s);var n="".concat(e).startsWith("Error: Blocked:");cs("gd-adflow adsBlocked",n,e);var r=this.get_ad_system_init_result(),i=r.ima,a=r.afg;if(this.adsBlocked=!i&&!a,this._isMasterGameURL()||this._isExtHostedGameURL()){this.msgrt.send("adblocker.flw",{message:"".concat(this.adsBlocked?"blocked":"ok")});var o=i||a?i?a?"none":"adsense":"ima":"all";this.msgrt.send("adblocker.adapters",{message:"".concat(o)})}console.error(e.message||e)}.bind(this))),n(this._gameData),e.next=21;break;case 16:e.prev=16,e.t0=e.catch(0),this._sendSDKError(e.t0),this.onResumeGame(e.t0.message,"warning"),i(e.t0);case 21:case"end":return e.stop()}}),e,this,[[0,16]])}))),function(e,t){return j.apply(this,arguments)})},{key:"_getDefaultOptions",value:function(){return{debug:!1,testing:!1,gameId:"4f3d7d38d24b740c95da2b03dc3a2333",prefix:"gdsdk__",onEvent:function(e){},onLoaderEvent:function(e){},flashSettings:{adContainerId:"",splashContainerId:""},advertisementSettings:{},resumeGame:function(){},pauseGame:function(){},onInit:function(e){},onError:function(e){},loader:{}}}},{key:"_extendDefaultOptions",value:function(e,t){var n=M(e);this.options=t?h(n,t):n,this.options.gameId=this.options.gameId.trim()}},{key:"_setConsoleBanner",value:function(){if(!this._bridge.noConsoleBanner){var e=as.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 n=this;void 0!==this._topDomain&&"undefined"!==this._topDomain||(this._topDomain=void 0);var r={page_url:this._topDomain||this._parentDomain,game_id:this.options.gameId,eventtype:e,ts:Date.now()};fetch("https://ana.headerlift.com/event?".concat(N.stringify(r))).catch(function(e){t(this,n)}.bind(this)),this.adInstance._send_atom_event("hl.config",r),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=c("xanthophyll");e.hasOwnProperty("xanthophyll")&&"true"===e.xanthophyll&&(this._whitelabelPartner=!0,p("White label publisher","".concat(this._whitelabelPartner),"success"))}},{key:"_checkConsole",value:function(){try{if(!m.available)return;"developer.gamedistribution.com"===this._parentDomain?(m.set("gd_debug_ex",!0),m.set("gd_disable_midroll_timer",!0),m.set("gd_tag",!0)):"localhost:3000"===this._parentDomain&&(m.set("gd_debug_ex",!0),m.set("gd_disable_midroll_timer",!0)),m.getBoolean("gd_debug_ex")&&(this.openConsole(),this.msgrt.send("dev.console",{message:this._parentDomain}))}catch(e){}}},{key:"_checkUserDeclinedTracking",value:function(){this._userDeclinedTracking=this._bridge.isCoreSDKMode||document.location.search.indexOf("gdpr-tracking=0")>=0||document.cookie.indexOf("ogdpr_tracking=0")>=0}},{key:"_initializeMessageRouter",value:function(){this.msgrt=new l({gameId:this.options.gameId,hours:(new Date).getHours(),topDomain:this._topDomain,domain:this._parentDomain,referrer:this._parentURL,depth:o(),version:as.version,tracking:this._userDeclinedTracking,whitelabel:this._whitelabelPartner,platform:u(),byloader:this._bridge.isTokenGameURL,isTokenGameURL:this._bridge.isTokenGameURL,isMasterGameURL:this._bridge.isMasterGameURL,isExtHostedGameURL:this._bridge.isExtHostedGameURL,byloaderVersion:this._bridge.version})}},{key:"_loadGamedockTracker",value:function(){var e=this;try{var n=[this._gameData.gmky.url];f(n[0],"GamedockSDK",{alternates:n}).then(function(){var n,r;t(this,e),GR=this._initGamedockTracker(window.GamedockSDK),this._sendGamedockEvent("pageview"),null!==(n=this._gameData.diagnostic)&&void 0!==n&&null!==(r=n.gameDock)&&void 0!==r&&r.adViewEvent&&GR.tracking.enableHeartBeatForPage({pageId:this.options.gameId,pageType:"game"},this._gameData.diagnostic.gameDock.heartbeatConfig),YS.track(GR,this._gameData)}.bind(this)).catch(function(n){t(this,e),this._sendSDKError(n)}.bind(this))}catch(e){}}},{key:"_initGamedockTracker",value:function(e){if(!this._bridge.isCoreSDKMode)return e.initialize("gd",this._parentDomain)}},{key:"_sendGamedockEvent",value:function(e){var t,n;null===(t=GR)||void 0===t||null===(n=t.tracking)||void 0===n||n.trackEvent(e,{pageId:this.options.gameId,pageType:"game"})}},{key:"_loadMiniJuegosGratisTracker",value:function(){var e=this;window.mpConfig={game:this.options.gameId,partner:"game-distribution"};var n=["https://ext.minijuegosgratis.com/external-host/main.js"];console.log("noMinijuegosSDK loading"),f(n[0],"MinijuegosSDK",{alternates:n}).catch(function(n){t(this,e),this._sendSDKError(n)}.bind(this))}},{key:"_loadLocus",value:function(){var n=e(r.mark((function e(){var n,i=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,pA();case 2:if(e.sent){e.next=6;break}return console.log("locus-disabled"),e.abrupt("return");case 6:n=["https://pm.azerioncircle.com/p/locus"],console.log("locus loading"),f(n[0],"locus",{alternates:n}).catch(function(e){t(this,i),this._sendSDKError(e)}.bind(this));case 9:case"end":return e.stop()}}),e,this)})));return function(){return n.apply(this,arguments)}}()},{key:"_loadGoogleAnalytics",value:function(){var e=this,n=["https://www.google-analytics.com/analytics.js"];f(n[0],"gdsdk_google_analytics",{alternates:n,error_prefix:"Blocked:",exists:function(){return t(this,e),window.ga}.bind(this)}).then(function(){t(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(n){t(this,e),this._sendSDKError(n)}.bind(this))}},{key:"_subscribeToEvents",value:function(){var e=this;this.eventBus=new _,A.forEach(function(n){var r=this;return t(this,e),this.eventBus.subscribe(n,function(e){return t(this,r),this._onEvent(e)}.bind(this),"sdk")}.bind(this)),k.forEach(function(n){var r=this;return t(this,e),this.eventBus.subscribe(n,function(e){return t(this,r),this._onEvent(e)}.bind(this),"ima")}.bind(this)),this.eventBus.subscribe("COMPLETE",function(){t(this,e);var n=this._getDeveloperDomains(),r=n.developerDomain,i=n.gameApiDomain;if(r){fetch("https://".concat(i,"/game/v2/hasapi/").concat(this.options.gameId,"?timestamp=").concat((new Date).valueOf()));try{var a=JSON.stringify({type:"GD_SDK_IMPLEMENTED",gameID:this.options.gameId});window.location!==window.top.location?window.top.postMessage(a,"*"):null!==window.opener&&window.opener.location!==window.location&&window.opener.postMessage(a,"*")}catch(e){}}TS()}.bind(this),"ima"),this.eventBus.subscribe("CONTENT_PAUSE_REQUESTED",function(){return t(this,e),this.onPauseGame("New advertisements requested and loaded","success")}.bind(this),"ima"),this.eventBus.subscribe("IMPRESSION",function(n){var r,i;t(this,e),this.msgrt.send("ad.impression"),SS(),null!==(r=this._gameData.diagnostic)&&void 0!==r&&null!==(i=r.gameDock)&&void 0!==i&&i.adViewEvent&&YS.track(GR,this._gameData)}.bind(this),"ima"),this.eventBus.subscribe("AD_ERROR",function(n){t(this,e),this.msgrt.send("ad.error",{message:n.message,details:n.details})}.bind(this),"ima"),this.eventBus.subscribe("AD_SDK_REQUEST",function(n){t(this,e),this._sendAdRequestContext(n.message)}.bind(this),"sdk"),this.eventBus.subscribe("SDK_ERROR",function(n){if(t(this,e),n.message.startsWith("Blocked:")){if(!this._bridge.noBlockerEvent&&(this.msgrt.send("error",{message:n.message}),!this._hasBlocker)){this._hasBlocker=!0;var r=Math.random()<.25;this.msgrt.send("adblck.src",{message:n.message}),r&&this._sendTunnlEvent(3)}}else this.msgrt.send("error",{message:n.message})}.bind(this),"sdk"),this.eventBus.subscribe("AD_REQUEST_KEYS_EMPTY",function(n){t(this,e),this.msgrt.send("tunnl.keys.empty",{message:n.message,details:n.details})}.bind(this),"sdk"),this.eventBus.subscribe("AD_REQUEST_KEYS_FALLBACK",function(n){t(this,e),this.msgrt.send("tunnl.keys.fallback",{message:n.message,details:n.details})}.bind(this),"sdk"),this.eventBus.subscribe("AD_T4R",function(n){return t(this,e),this.msgrt.send("adt4r")}.bind(this),"sdk")}},{key:"_checkGameId",value:function(){this.options.gameId===this._defaults.gameId&&this._sendSDKError("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,t=Xw().config;return"https://".concat(t.gameAPI,"/game/v4/get/").concat(this.options.gameId.replace(/-/g,""),"/?domain=").concat(e,"&v=").concat(as.version,"&localTime=").concat((new Date).getHours())}},{key:"_checkBlocking",value:(U=e(r.mark((function e(){var n,i,a,s=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=!0,i=this._gameData,a=this._parentDomain.indexOf("gamedistribution.com")>=0,n=void 0===this._gameData.dmain||this._gameData.dmain,console.log("zxcv exclude, isAllowedDomain",a,n),n=n||a,(i.bloc_gard&&!0===i.bloc_gard.enabled||!n)&&(this.msgrt.send("blocked"),setTimeout(function(){t(this,s),window.location.href="https://html5.api.gamedistribution.com/blocked.html?".concat(N.stringify({domain:this._parentDomain,id:i.gameId,img:this._get_game_thumbnail_url(),title:i.title}))}.bind(this),100));case 8:case"end":return e.stop()}}),e,this)}))),function(){return U.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(){t(this,e),document.location="https://html5.api.gamedistribution.com/deleted.html"}.bind(this),100))}},{key:"_changeMidrollInDebugMode",value:function(){var e=this._gameData;MS().disableMidrolltimer?e.midroll=0:m.available&&m.getBoolean("gd_debug_ex")&&(m.getBoolean("gd_disable_midroll_timer")?e.midroll=0:e.midroll=this._getDefaultGameData().midroll)}},{key:"_checkSplashAndPromoScreens",value:function(){var e,t,n;this._gameData.loader&&!1===this._gameData.loader.mobile&&this._getisMobile()&&(this._gameData.loader.enabled=!1);var r,i=this._gameData,a=i.gdpr&&!0===i.gdpr.consent,s=i.loader,o=null===(e=i.promo)||void 0===e?void 0:e[null===(t=i.promo)||void 0===t||null===(n=t.template)||void 0===n?void 0:n.preroll];(i.preroll||(this.adRequestTimer=Date.now()),this.options.loader.enabled)?null!=o&&o.enabled?this._createPromoBeforeSplash(i,a):s.enabled&&!0!==(null===(r=s.splash)||void 0===r?void 0:r.skip)?this._createSplash(i,a):this.onResumeGame("Skipped splash.","success"):s.enabled||this._bridge.isTokenGameURL&&this._bridge.isExtHostedGameURL||(this.options.advertisementSettings.autoplay||a?null!=o&&o.enabled?this._createPromoBeforeSplash(i,a):!1!==s.enabled&&this._createSplash(i,a):null!=o&&o.enabled&&this._createPromo(i,a))}},{key:"_initializeVideoAd",value:(L=e(r.mark((function e(){var t;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._bridge.isCoreSDKMode){e.next=2;break}return e.abrupt("return");case 2:return(t=this._gameData).sdk.enabled&&(this.options.advertisementSettings=h(this.options.advertisementSettings,t.sdk)),this.macros=new E({game:t,bridge:this._bridge}),this.adInstance=new qS(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=as,this.adInstance._send_atom_event("gd.location"),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){p("DEVELOPER_ERROR",e.message,"warning")}}},{key:"_sendSDKError",value:function(e){e=e.message?e:{message:e};this.eventBus.broadcast("SDK_ERROR",{message:e.message,status:"error"});try{this.options.onError(e)}catch(e){p("DEVELOPER_ERROR",e.message,"warning")}}},{key:"_onEvent",value:function(e){p(e.name,e.message,e.status);try{this.options.onEvent({name:e.name,message:e.message,status:e.status,skipForward:e.skipForward,adPosition:e.adPosition})}catch(e){p("DEVELOPER_ERROR",e.message,"warning")}}},{key:"_getGameData",value:(C=e(r.mark((function e(){var t;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,cA();case 2:return t=e.sent,this.msgrt.setGameData(t),x(t.diagnostic),e.abrupt("return",t);case 6:case"end":return e.stop()}}),e,this)}))),function(){return C.apply(this,arguments)})},{key:"_createSplash",value:(P=e(r.mark((function e(n,i){var a,s,o,c,d=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._getSplashTemplate(n);case 2:return a=e.sent,s=new a(MR(MR({},this.options),{},{isConsentDomain:i,version:as.version}),n,this._parentDomain),e.next=6,mA();case 6:o=e.sent,c=o.enabled,s.on("playClick",function(){var e,n,r=this;if(t(this,d),i){var a=new Date;a.setDate(a.getDate()+90),document.cookie="ogdpr_tracking=1; expires=".concat(a.toUTCString(),"; path=/")}if(this._hideCMPButton(),c)window.gdsdk.showAd(g.Interstitial,{position:"preroll"}).catch(function(e){t(this,r),s.hide()}.bind(this));else{var o={position:"preroll"};(function(){t(this,r),us.firstAdapterModeAdsense&&(console.log("promo-test, set first adapter to adssense 1"),o.adapter="adsense")}).bind(this),this.showAd(g.Interstitial,o).catch(function(e){t(this,r)}.bind(this))}null!==(e=this._gameData)&&void 0!==e&&null!==(n=e.evnts)&&void 0!==n&&n.enabled&&(dR({event:"FirstInteraction",game:this._gameData}),this._send_gametag_data("first_interaction"))}.bind(this)),this.onPauseGame("Pause the game and wait for a user gesture","success"),this.eventBus.subscribe("SDK_GAME_PAUSE",function(){t(this,d),s.hide()}.bind(this)),this.eventBus.subscribe("SDK_GAME_START",function(){t(this,d),s.hide()}.bind(this));case 12:case"end":return e.stop()}}),e,this)}))),function(e,t){return P.apply(this,arguments)})},{key:"_createPromoBeforeSplash",value:(T=e(r.mark((function e(n,i){var a,s,o,c,d=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this._createPrerollPromoTemplate(n);case 3:o=e.sent,(c=new o(MR(MR({},this.options),{},{isConsentDomain:i,version:as.version,template:null===(a=n.promo)||void 0===a||null===(s=a.template)||void 0===s?void 0:s.preroll}),n)).on("done",function(){t(this,d),c.hide(),this._createSplash(n,i)}.bind(this)),e.next=12;break;case 8:e.prev=8,e.t0=e.catch(0),console.log(e.t0),this._createSplash(n,i);case 12:case"end":return e.stop()}}),e,this,[[0,8]])}))),function(e,t){return T.apply(this,arguments)})},{key:"_createPromo",value:(w=e(r.mark((function e(n,i){var a,s,o,c,d=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this._createPrerollPromoTemplate(n);case 3:o=e.sent,(c=new o(MR(MR({},this.options),{},{isConsentDomain:i,version:as.version,template:null===(a=n.promo)||void 0===a||null===(s=a.template)||void 0===s?void 0:s.preroll}),n)).on("done",function(){t(this,d),c.hide(),this.onResumeGame("Resumed after the promo","warning")}.bind(this)),this.onPauseGame("Pause the game for the promo","success"),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(0),this.onResumeGame("Resumed after the promo","warning");case 12:case"end":return e.stop()}}),e,this,[[0,9]])}))),function(e,t){return w.apply(this,arguments)})},{key:"showBanner",value:function(){var e=this;this.showAd(g.Interstitial).catch(function(){t(this,e)}.bind(this))}},{key:"showAd",value:(y=e(r.mark((function t(n){var i,a=this,s=arguments;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=s.length>1&&void 0!==s[1]?s[1]:{},t.abrupt("return",new Promise(function(){var t=e(r.mark((function e(t,s){var o,c,d,u;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!a._autoResumeIfAdsAreDisabled(n||"interstitial")){e.next=5;break}return e.abrupt("return",t());case 5:return c={adType:n||"interstitial",params:i,adTimestamp:a.adRequestTimer},e.next=9,a.sdkReady;case 9:return d=e.sent,e.next=12,a.videoAdReady;case 12:if(null!==(o=a._gameData.lp)&&void 0!==o&&o.load||a._sendLoadedEvent(),a._sendGamedockGamePlay(),a._rejectAdIfGameBlocked({gameData:d,adRequest:c}),a._rejectAdIfAdDisabled({gameData:d,adRequest:c}),a._rejectAdIfUnsupportedType({adRequest:c}),"rewarded"===n&&a._setGameRewardedFlag(),null!=i&&i.isGift||a._rejectAdIfAdRateHits({gameData:d,adRequest:c}),a.adInstance.attachAfgPosition(c),!a.adFlowRunning){e.next=22;break}return e.abrupt("return",t());case 22:return a.adFlowRunning=!0,u=new yR(a),e.next=26,u.runAdFlow(c);case 26:a.adFlowRunning=!1,t(),a._post_message({topic:"adrequest.instream"}),e.next=36;break;case 31:e.prev=31,e.t0=e.catch(0),a.adFlowRunning=!1,a.onResumeGame(e.t0.message,"warning"),s(e.t0.message);case 36:case"end":return e.stop()}}),e,null,[[0,31]])})));return function(e,n){return t.apply(this,arguments)}}()));case 2:case"end":return t.stop()}}),t)}))),function(e){return y.apply(this,arguments)})},{key:"_autoResumeIfAdsAreDisabled",value:function(e){var t=!1,n=this._gameData.diagnostic.close_ads,r=this._gameData.disableAds[e],i=n||r;return this._gameData.diagnostic,this._gameData.disableAds,i&&(this._runAutoResume(),t=!0),t}},{key:"_runAutoResume",value:function(){var e="CONTENT_PAUSE_REQUESTED",t="CONTENT_RESUME_REQUESTED";this.eventBus.broadcast(e,{name:e,message:"Auto pause when ads are disabled"}),this.eventBus.broadcast(t,{name:t,message:"Auto resume when ads are disabled"}),this.onResumeGame("Advertisement(s) are cancelled. Start / resume the game.","success")}},{key:"_giveGift",value:function(e){var t,n,r,i,a,s,o,c,d,u,l,h,p,f,m;switch(e){case"preroll":null!==(t=this._gameData)&&void 0!==t&&null!==(n=t.gft)&&void 0!==n&&n[e].enabled&&(null===(r=this._gameData)||void 0===r||null===(i=r.gft)||void 0===i||null===(a=i[e].durations[this._giftCount[e]])||void 0===a?void 0:a.after)===this.adInstance.adPrerollCount&&this.decideToGiveAGift(e);break;case"midroll":null!==(s=this._gameData)&&void 0!==s&&null!==(o=s.gft)&&void 0!==o&&o[e].enabled&&(null===(c=this._gameData)||void 0===c||null===(d=c.gft)||void 0===d||null===(u=d[e].durations[this._giftCount[e]])||void 0===u?void 0:u.after)===this.adInstance.adMidrollCount&&this.decideToGiveAGift(e);break;case"rewarded":null!==(l=this._gameData)&&void 0!==l&&null!==(h=l.gft)&&void 0!==h&&h[e].enabled&&(null===(p=this._gameData)||void 0===p||null===(f=p.gft)||void 0===f||null===(m=f[e].durations[this._giftCount[e]])||void 0===m?void 0:m.after)===this.adInstance.adRewardedCount&&this.decideToGiveAGift(e)}}},{key:"_setAdRequestTimer",value:function(){this.adRequestTimer=Date.now()}},{key:"clearSession",value:function(){this.adInstance.clearSession()}},{key:"_attachAfgFallback",value:function(e){var t=e.gameData,n=e.adRequest;if(!t.afg_disabled&&!n.params.hasOwnProperty("fallback_adsense"))switch(n.params.position){case"preroll":case"start":case"next":n.params.fallback_adsense=!0}}},{key:"_rejectAdIfGameBlocked",value:function(e){var t=e.gameData;if(t.bloc_gard&&!0===t.bloc_gard.enabled)throw new Error("Game or domain is blocked.")}},{key:"_rejectAdIfAdDisabled",value:function(e){var t=e.gameData,n=e.adRequest;if(t.disableAds[n.adType]||this._whitelabelPartner)throw new Error("Advertisements are disabled.")}},{key:"_rejectAdIfUnsupportedType",value:function(e){var t=e.adRequest;if(t.adType){if(t.adType!==g.Interstitial&&t.adType!==g.Rewarded)throw new Error("Unsupported an advertisement type: ",t.adType)}else t.adType=g.Interstitial}},{key:"_rejectAdIfRewardedDisabled",value:function(e){var t=e.gameData;if(e.adRequest.adType===g.Rewarded&&!t.rewardedAds)throw new Error("Rewarded ads are disabled.")}},{key:"_rejectAdIfAdRateHits",value:function(e){var t,n,r,i,a,s,o=e.gameData,c=e.adRequest,d=null;c.adType===g.Interstitial&&null!==(t=o.diagnostic)&&void 0!==t&&null!==(n=t.useMidrollIndex)&&void 0!==n&&n.enabled&&this.adInstance.noPreroll?this.adInstance.adMidrollCount>(null===(r=o.diagnostic)||void 0===r||null===(i=r.useMidrollIndex)||void 0===i?void 0:i.indexes.length)-1||(d=6e4*(null===(a=o.diagnostic)||void 0===a||null===(s=a.useMidrollIndex)||void 0===s?void 0:s.indexes[this.adInstance.adMidrollCount])):d=o.midroll;if(c.adType===g.Interstitial&&void 0!==this.adRequestTimer&&Date.now()-this.adRequestTimer<d)throw new Error("The advertisement was requested too soon.")}},{key:"preloadAd",value:(b=e(r.mark((function t(n){var i=this;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise(function(){var t=e(r.mark((function e(t,a){var s,o;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,i.sdkReady;case 3:return s=e.sent,e.next=6,i.videoAdReady;case 6:if(!s.bloc_gard||!0!==s.bloc_gard.enabled){e.next=8;break}throw new Error("Game or domain is blocked.");case 8:if(!s.disableAds[n]&&!i._whitelabelPartner){e.next=10;break}throw new Error("Advertisements are disabled for this ad type => ".concat(n,"..."));case 10:if(n){e.next=14;break}n=g.Rewarded,e.next=16;break;case 14:if(n===g.Interstitial||n===g.Rewarded){e.next=16;break}throw new Error("Unsupported an advertisement type:"+n);case 16:return e.next=18,i.adInstance.preloadAd(n);case 18:o=e.sent,t(o),e.next=25;break;case 22:e.prev=22,e.t0=e.catch(0),a(e.t0);case 25:case"end":return e.stop()}}),e,null,[[0,22]])})));return function(e,n){return t.apply(this,arguments)}}()));case 1:case"end":return t.stop()}}),t)}))),function(e){return b.apply(this,arguments)})},{key:"cancelAd",value:(v=e(r.mark((function t(){var n=this;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise(function(){var t=e(r.mark((function e(t,i){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:try{n.adInstance.cancel(),n.onResumeGame("Advertisement(s) are cancelled. Start / resume the game.","success"),i()}catch(e){n.onResumeGame("Advertisement(s) are cancelled. Start / resume the game.","success"),t(e.message)}case 1:case"end":return e.stop()}}),e)})));return function(e,n){return t.apply(this,arguments)}}()));case 1:case"end":return t.stop()}}),t)}))),function(){return v.apply(this,arguments)})},{key:"showDisplayAd",value:function(t){var n=this;return new Promise(function(){var i=e(r.mark((function e(i,a){var s;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,n.sdkReady;case 3:return s=e.sent,e.next=6,n.videoAdReady;case 6:if(!s.dAds.enabled){e.next=13;break}return e.next=9,n.adInstance.loadDisplayAd(t);case 9:n._post_message({topic:"adrequest.display"}),i(),e.next=14;break;case 13:a("Display-Ads are disabled.");case 14:e.next=19;break;case 16:e.prev=16,e.t0=e.catch(0),a(e.t0.message||e.t0);case 19:case"end":return e.stop()}}),e,null,[[0,16]])})));return function(e,t){return i.apply(this,arguments)}}())}},{key:"onResumeGame",value:function(e,t){var n;this._allowExternals({enabled:!1});try{this.options.resumeGame()}catch(e){console.log("gd-adflow error onResumeGame",e),p("DEVELOPER_ERROR",e.message,"warning")}var r="SDK_GAME_START";this.eventBus.broadcast(r,{name:r,message:e,status:t,analytics:{category:"SDK",action:r,label:this.options.gameId+""}}),this.adInstance&&this.adInstance._hideAddResume(),null===(n=this._gameData.evnts)||void 0===n||!n.enabled||this._isMasterGameURL()&&!this._isExtHostedGameURL()||(dR({event:"GameStarted",game:this._gameData}),this._send_gametag_data("game_started"))}},{key:"onPauseGame",value:function(e,t){var n;this._allowExternals({enabled:!0});try{this.options.pauseGame()}catch(e){p("DEVELOPER_ERROR",e.message,"warning")}var r="SDK_GAME_PAUSE";this.eventBus.broadcast(r,{name:r,message:e,status:t,analytics:{category:"SDK",action:r,label:this.options.gameId+""}}),null===(n=this._gameData.evnts)||void 0===n||!n.enabled||this._isMasterGameURL()&&!this._isExtHostedGameURL()||(dR({event:"GamePaused",game:this._gameData}),this._send_gametag_data("game_paused"))}},{key:"onRewardedWatchComplete",value:function(){this.eventBus.broadcast("SDK_REWARDED_WATCH_COMPLETE",{message:"",status:"success"})}},{key:"onAdError",value:function(e){this.eventBus.broadcast("AD_ERROR",{message:e,status:"error"})}},{key:"openConsole",value:function(){try{new S(this).start(),m.set("gd_debug_ex",!0)}catch(e){console.log(e)}}},{key:"_initBlockingExternals",value:function(){var e=this._gameData;(e.failed||e.block_exts&&e.block_exts.enabled)&&(this.window_open=window.open,this._allowExternals({enabled:!1}),this._removeExternalsInHtml({enabled:!1}))}},{key:"_checkFullscreen",value:function(){var e=this;try{var n=this._gameData;n.sdk.fullscreen&&"auto"===n.sdk.fullscreen&&document.addEventListener("click",function(){if(t(this,e),!this._isFullScreen){var n=document.body,r=n.requestFullScreen||n.webkitRequestFullScreen||n.mozRequestFullScreen||n.msRequestFullscreen;if(r)r.call(n);else if(void 0!==window.ActiveXObject){var i=new ActiveXObject("WScript.Shell");null!==i&&i.SendKeys("{F11}")}this._isFullScreen=!0}}.bind(this))}catch(e){console.log("Fullscreen error handled...",e)}}},{key:"_allowExternals",value:function(e){var n=this;void 0!==this.window_open&&(!1===e.enabled?window.open=function(e){t(this,n),this.msgrt.send("external",{message:"C> ".concat(e)}),(e.startsWith("https://play.google.com")||e.startsWith("https://itunes.apple.com"))&&this.window_open.call(null,e)}.bind(this):window.open=this.window_open)}},{key:"_shouldAllowExternalUrl",value:function(e){var n,r=this,i=new O(e),a=i.host;return i.href,((null===(n=this._gameData.urlBlockExc)||void 0===n?void 0:n.hosts)||[]).some(function(e){return t(this,r),e===a}.bind(this))}},{key:"_removeExternalsInHtml",value:function(e){var n=this;!1===e.enabled&&window.document.querySelectorAll("a").forEach(function(e){var r=this;t(this,n);var i=!!(e.innerText.toLowerCase().includes("start")||e.innerText.toLowerCase().includes("play")||e.innerText.toLowerCase().includes("continue")),a=e.getAttribute("href");if(!this._shouldAllowExternalUrl(a)){var s=e.getAttribute("href");e.removeAttribute("href"),i||(e.onclick=function(e){return t(this,r),e.preventDefault(),this.msgrt.send("external",{message:"H> ".concat(s)}),!1}.bind(this))}}.bind(this))}},{key:"_getBridgeContext",value:function(){var e=this._isTokenGameURL(),t=this._isMasterGameURL(),n=this._isExtHostedGameURL(),r=e||n?this._getTokenGameURLConfig():{};r=r||{};var i=decodeURIComponent((e||n)&&r.parentURL?r.parentURL:a()),c=decodeURIComponent((e||n)&&r.parentDomain?r.parentDomain:s()),u=decodeURIComponent((e||n)&&r.topDomain?r.topDomain:n&&0===o()?c:d()),l=(e||n)&&r.loaderEnabled,h=(e||n)&&r.loaderEnabled,p=(e||n)&&r.loaderEnabled,f=(e||n)&&r.loaderEnabled,m=(e||n)&&r.loaderEnabled,g=(e||n)&&r.loaderEnabled,v=(e||n)&&r.loaderEnabled,b=(e||n)&&r.loaderEnabled,y=(e||n)&&r.loaderEnabled&&r.hasImpression&&r.version>="1.1.24";return{isTokenGameURL:e,isMasterGameURL:t,isExtHostedGameURL:n,noConsoleBanner:l,noLoadedEvent:h,noBlockerEvent:p,noPreroll:b,parentURL:i,parentDomain:c,topDomain:u&&u.length?u:c,noGAPageView:f,noLotamePageView:m,noGamedockSDK:g,noMinijuegosSDK:v,version:r.version,pauseGameOnStartup:y,depth:o(),domainMatched:c===u,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 O(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 O(document.referrer,!0);if(!r.query.gd_zone_config)return;e=r.query.gd_zone_config}else{var i=new O(location.href,!0);if(!i.query.gd_zone_config)return;e=i.query.gd_zone_config}return JSON.parse(I.decode(decodeURIComponent(e)))}catch(e){}}},{key:"_getSplashTemplate",value:function(e){var t=e.splash;return new VS(t).splash()}},{key:"_createPrerollPromoTemplate",value:(i=e(r.mark((function e(t){var n,i,a,s,o;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=null===(n=t.promo)||void 0===n?void 0:n[null===(i=t.promo)||void 0===i||null===(a=i.template)||void 0===a?void 0:a.preroll],o=new FS(s),e.abrupt("return",o.promo());case 3:case"end":return e.stop()}}),e)}))),function(e){return i.apply(this,arguments)})},{key:"_formatTokenURLSearch",value:function(e){var t="";try{t=encodeURIComponent(I.encode(JSON.stringify(e)))}catch(e){}try{var n=new O(location.href,!0);return n.query=n.query||{},n.query.gd_zone_config=t,"?".concat(N.stringify(n.query))}catch(e){return"?gd_zone_config=".concat(t)}}},{key:"_extendUrlQuery",value:function(e,t){var n=new O(e,!0);return n.query=MR(MR({},n.query),t),n.toString()}},{key:"_base64_encode",value:function(e){return I.encode(JSON.stringify(e))}},{key:"session",value:function(){var t=this;return new Promise(function(){var n=e(r.mark((function e(n,i){var a;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t.sdkReady;case 3:e.next=7;break;case 5:e.prev=5,e.t0=e.catch(0);case 7:a=t._gameData,n({ads:{display:{enabled:a.dAds.enabled},rewarded:{enabled:a.rewardedAds}},location:{parentDomain:t._bridge.parentDomain,topDomain:t._bridge.topDomain,parentURL:t._bridge.parentURL,depth:t._bridge.depth,loadedByGameZone:t._bridge.isTokenGameURL}});case 9:case"end":return e.stop()}}),e,null,[[0,5]])})));return function(e,t){return n.apply(this,arguments)}}())}},{key:"sendGenericEvent",value:function(e){console.log("Received generic event",e,this._isMasterGameURL());try{var t,n;if("track-milestone"==e.eventName)GR.tracking.trackEvent("milestoneAchieved",{pageId:this.options.gameId,pageType:"game",isAuthorized:null===(t=e.data)||void 0===t?void 0:t.isAuthorized,milestoneDescription:null===(n=e.data)||void 0===n?void 0:n.milestoneDescription});else if("game_event"==e.eventName)return this._gameEventPostMessage(e)}catch(e){console.log(e.message)}}},{key:"_gameEventPostMessage",value:function(e){if(void 0!==e.data.level&&this._numberValidator(e.data.level))if(void 0!==e.data.score&&this._numberValidator(e.data.score)){var t={type:e.eventName,data:e.data};window.location!==window.top.location&&window.top.postMessage(t,"*")}else console.log("Level data type should be number!");else console.log("Level data type should be number!")}},{key:"_numberValidator",value:function(e){return"number"==typeof e&&/^\d*$/.test(e)}},{key:"_getisMobile",value:function(){var e,t=!1;return e=navigator.userAgent||navigator.vendor||window.opera,(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(e.substr(0,4)))&&(t=!0),!1===t&&window.orientation>-1&&(t=!0),t}},{key:"_get_game_thumbnail_url",value:function(){var e=this,n=this._gameData,r=n.assets.find(function(n){return t(this,e),n.hasOwnProperty("name")&&512===n.width&&512===n.height}.bind(this));return r||(r=n.assets.length>0?n.assets[0]:{name:"logo.svg"}),"https://img.gamedistribution.com/".concat(r.name)}},{key:"_post_message",value:function(e){var t,n=e.topic,r=e.data,i=null!==(t=location.ancestorOrigins)&&void 0!==t&&t.length?location.ancestorOrigins[location.ancestorOrigins.length-1]:"*";try{var a=window.top||window.parent;a&&a.postMessage({source:"gdsdk",topic:n,data:r},i)}catch(e){console.error((null==e?void 0:e.message)||e)}}},{key:"decideToGiveAGift",value:function(n){var i=this;try{var a,s=null===(a=this._gameData)||void 0===a?void 0:a.gft[n],o=setInterval(e(r.mark((function e(){var a=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i.adInstance.requestRunning||i.adFlowRunning?console.log("Advertisement already running..."):(i.showAd(g.Interstitial,{position:n,isGift:!0}).catch(function(e){t(this,a)}.bind(this)),clearInterval(o),i._giftCount[n]++);case 1:case"end":return e.stop()}}),e,this)}))),1e3*s.durations[this._giftCount[n]].wait)}catch(e){console.log("Advertisement Error...")}}},{key:"send_atom_event",value:function(e,t){this.adInstance._send_atom_event(e,t)}},{key:"get_session_id",value:function(){return jR}},{key:"get_ad_system_init_result",value:function(){return{afg:this.adInstance.afgInitSuccess,ima:this.adInstance.imaInitSuccess}}},{key:"_getDeveloperDomains",value:function(){var e,t;return"developer.gamedistribution.com"===this._parentDomain||"developer-acc.gamedistribution.com"===this._parentDomain?e=this._parentDomain:!0===new RegExp("^localhost").test(this._parentDomain)&&(e="localhost"),e&&(t={"developer-acc.gamedistribution.com":"game-api-acc-real-aws.gamedistribution.com","developer.gamedistribution.com":"game.api.gamedistribution.com",localhost:"game-api-acc-real-aws.gamedistribution.com"}[e]),{developerDomain:e,gameApiDomain:t}}},{key:"_setGameRewardedFlag",value:function(){try{var e=this._getDeveloperDomains(),t=e.developerDomain,n=e.gameApiDomain;if(t){fetch("https://".concat(n,"/game/v2/hasrewarded/").concat(this.options.gameId,"?timestamp=").concat((new Date).valueOf()));try{var r=JSON.stringify({type:"GD_SDK_REWARDED_SET",gameID:this.options.gameId});window.location!==window.top.location?window.top.postMessage(r,"*"):null!==window.opener&&window.opener.location!==window.location&&window.opener.postMessage(r,"*")}catch(e){}}}catch(e){}}},{key:"_getGdModeIfExist",value:function(){var e=this,n=new Proxy(new URLSearchParams(window.location.search),{get:function(n,r){return t(this,e),n.get(r)}.bind(this)});return!n.gd_mode&&window.location.search.includes("gd_mode")?window.location.search.split("gd_mode=")[1]:n.gd_mode}},{key:"_executeMidrollPlus",value:function(){var e,n=this;if(null!==(e=this._gameData.midroll_plus)&&void 0!==e&&e.enabled&&this.adInstance.adMidrollCount<=0){var r,i=this._gameData.midroll_plus.type||"midroll";if(null!==(r=this._gameData.midroll_plus)&&void 0!==r&&r.interval)var a=setInterval(function(){var e,r,s=this;(t(this,n),this.adFlowRunning)||(this.showAd(g.Interstitial,{position:"midroll",giftType:i}).catch(function(e){t(this,s)}.bind(this)),this._mplus_count++,"infinite"!==(null===(e=this._gameData.midroll_plus)||void 0===e?void 0:e.interval)&&this._mplus_count===(null===(r=this._gameData.midroll_plus)||void 0===r?void 0:r.interval)&&clearInterval(a))}.bind(this),6e4*this._gameData.midroll_plus.timer);else setTimeout(function(){var e=this;t(this,n),this.showAd(g.Interstitial,{position:"midroll",giftType:i}).catch(function(n){t(this,e)}.bind(this))}.bind(this),this._gameData.midroll)}}}]),n}();function qR(){return(qR=e(r.mark((function e(){var n,i=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,pA();case 2:if(e.sent){e.next=6;break}return console.log("locus-disabled on proxy level"),e.abrupt("return");case 6:n=["https://pm.azerioncircle.com/p/locus"],console.log("locus loading"),f(n[0],"locus",{alternates:n}).catch(function(e){t(this,i),this._sendSDKError(e)}.bind(this));case 9:case"end":return e.stop()}}),e,this)})))).apply(this,arguments)}var FR=new j,VR=function(e){var n=this;!function(){qR.apply(this,arguments)}();var r,i=function(e){var r=this;return t(this,n),new Promise(function(n,i){var a=this;t(this,r);var s=function(e){t(this,a),"SDK_GAME_START"===e.name&&(FR.off("sdk-event",s),n())}.bind(this);FR.on("sdk-event",s),m("showAd",{adType:e})}.bind(this))}.bind(this),a=function(){return t(this,n),r||(r=new NR(e)),r}.bind(this),s=function(e){return t(this,n),i(e)}.bind(this),o=function(e){return t(this,n),"gdsdk://preloaded"}.bind(this),c=function(e){return t(this,n),a().showDisplayAd(e)}.bind(this),d=function(){return t(this,n),m("cancelAd")}.bind(this),u=function(){return t(this,n),m("openConsole")}.bind(this),l=function(){return t(this,n),m("showBanner")}.bind(this),h=function(){return t(this,n),m("session")}.bind(this),p=function(e){return t(this,n),m("sendGenericEvent",{options:e})}.bind(this),f=function(){t(this,n),console.log("_sendSDKReady")}.bind(this),m=function(e,r){var i=this;return t(this,n),r||(r={}),new Promise(function(n,a){t(this,i);try{var s={type:"gd-sdk",method:e,options:r};window.parent.postMessage(s,"*"),n()}catch(e){console.log("gd:adp:m:s:error",e),n()}}.bind(this))}.bind(this),g=function(){t(this,n);window.addEventListener("message",(function(e){var t=e.data;e.origin,e.source;var n=t.type,r=t.event;"gd-sdk-on-event"===n&&r&&b(r)}),!1)}.bind(this),v=function(){t(this,n),g(),m("init")}.bind(this),b=function(r){t(this,n);try{FR.emit("sdk-event",r),e.onEvent&&e.onEvent(r)}catch(e){console.log("DEVELOPER ERROR on forwarder-sdk")}}.bind(this);return{showBanner:l,showAd:s,preloadAd:o,showDisplayAd:c,cancelAd:d,openConsole:u,getSession:h,onEvent:b,init:v,_sendSDKReady:f,sendGenericEvent:p}},zR=function(e){var t=VR(e);return t.init(),t},HR="gd-sdk-frame-handshake-request",WR="gd-sdk-frame-handshake-response",KR=function(e){var n=this;return new Promise(function(r,i){var a=this;t(this,n);var s={type:HR},o=!1;window.addEventListener("message",(function(e){var t=e.data,n=e.origin,i=e.source,a=t.type;if(a===HR){var s={type:WR};i.postMessage(s,n)}else a===WR&&(o=!0,r({origin:n,source:i}))})),e?r():(setTimeout(function(){t(this,a),o||r()}.bind(this),200),window.parent!==window?window.parent.postMessage(s,"*"):r())}.bind(this))},$R=function(){var t=e(r.mark((function e(){var t,n,i,a,s,o,c,d;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,hA();case 2:return t=e.sent,n=!t,e.next=6,KR(n);case 6:if(i=e.sent,t){e.next=9;break}return e.abrupt("return",!1);case 9:return a=wR(),s=a.isMasterGameURL,a.isTokenGameURL,o=s(),e.next=13,fA();case 13:return c=e.sent,d=!1,d=c?!o&&!!i:!o,e.abrupt("return",d);case 17:case"end":return e.stop()}}),e)})));return function(){return t.apply(this,arguments)}}(),QR=Ze,YR=ce,JR=Za,XR=Ki,ZR=YR(qi.f),eD=YR([].push),tD=function(e){return function(t){for(var n,r=XR(t),i=JR(r),a=i.length,s=0,o=[];a>s;)n=i[s++],QR&&!ZR(r,n)||eD(o,e?[n,r[n]]:r[n]);return o}},nD={entries:tD(!0),values:tD(!1)}.values;Ya({target:"Object",stat:!0},{values:function(e){return nD(e)}});var rD,iD={},aD=function(e){try{if(e.skipForward)return;if(iD.source){var t={type:"gd-sdk-on-event",event:e};iD.source.postMessage(t,iD.origin)}}catch(e){console.log("gd-sdk forwardEvent err",e)}},sD=function(){aD({name:"SDK_READY",status:"success",message:"Everything is ready."}),aD({name:"SDK_GAME_START",status:"success",message:"Advertisement(s) are done. Start / resume the game."}),aD({name:"CONTENT_RESUME_REQUESTED",status:"success",message:"Fired when content should be resumed. This usually happens when an ad finishes or collapses."})},oD=function(n){window.addEventListener("message",(function(i){var a=i.data,s=i.origin,o=i.source,c=a.type,d=a.method,u=a.options;if("gd-sdk-self"!==c){if("gd-sdk"===c){if(!iD.source&&"init"===d)return function(e){var t=e.source,n=e.origin;iD={source:t,origin:n}}({source:o,origin:s}),void sD();var l=n[d];l&&e(r.mark((function e(){var i,a=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,function(){t(this,a),"showAd"===d&&us.firstAdapterModeAdsense&&"rewarded"!==u.adType&&(console.log("promo-test, set first adapter to adssense 3"),u.params=u.params?u.params:{},u.params.adapter="adsense")}.bind(this),!(i=l.apply(n,Object.values(u)))||!i.then){e.next=6;break}return e.next=6,i;case 6:e.next=11;break;case 8:e.prev=8,e.t0=e.catch(0),console.log("gd:adp:m:r onFrameMessage error",e.t0);case 11:case"end":return e.stop()}}),e,this,[[0,8]])})))()}}else{var h={type:"gd-sdk",method:d,options:u};window.postMessage(h,location.origin)}}),!1)},cD=function(e){!function(e){var t=e.onEvent;e.onEvent=function(e){aD(e),t.apply(this,arguments)}}(e);var t=new NR(e);return oD(t),t},dD=function(e){try{var t=Kw(e);e.gameId||t.send("nogameid",{message:"".concat(uy.parentURL)})}catch(e){}},uD={create:function(){var t=e(r.mark((function e(t){var n,i;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,dD(t),nA=Kw(iA=t),e.next=5,$R();case 5:return n=e.sent,i=n?zR(t):cD(t),gA(),e.abrupt("return",i);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",cD(t));case 15:case"end":return e.stop()}}),e,null,[[0,11]])})));return function(e){return t.apply(this,arguments)}}()};function lD(){return(lD=e(r.mark((function e(t,n){var i;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,yA();case 2:if(!e.sent){e.next=7;break}e.t0=window.gdsdk,e.next=10;break;case 7:return e.next=9,pD(t);case 9:e.t0=e.sent;case 10:return i=e.t0,e.abrupt("return",n(i));case 12:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var hD=!1;function pD(e){var n=this;return new Promise(function(r,i){var a=this;if(t(this,n),rD)return r(rD);if(hD)var s=setInterval(function(){t(this,a),rD&&(hD=!1,clearInterval(s),r(rD))}.bind(this),100);else hD=!0,uD.create(e).then(function(e){t(this,a),rD=e,e._sendSDKReady(),hD=!1,r(rD)}.bind(this))}.bind(this))}xS();var fD,mD=(pD(fD=function(){var e={};try{"object"===("undefined"==typeof GD_OPTIONS?"undefined":n(GD_OPTIONS))&&GD_OPTIONS?e=GD_OPTIONS:window.gdApi&&"object"===n(window.gdApi.q[0][0])&&window.gdApi.q[0][0]&&((e=window.gdApi.q[0][0]).hasOwnProperty("advertisementSettings")||(e.advertisementSettings={autoplay:!0}))}catch(e){console.log("_get_developer_sets failed",e)}return e}()),{invoke:function(e){return function(e,t){return lD.apply(this,arguments)}(fD,e)}});function gD(){var n=this;this.AdType=g,this.preloadAd=function(e){var n=this;return mD.invoke(function(r){return t(this,n),r.preloadAd(e)}.bind(this))},this.showAd=function(){var n=e(r.mark((function e(n,i){var a=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",mD.invoke(function(e){var r=this;if(t(this,a),n===g.Display)return e.showDisplayAd(i);var s={};return function(){t(this,r),us.firstAdapterModeAdsense&&(console.log("promo-test, set first adapter to adssense 2"),s.adapter="adsense")}.bind(this),e.showAd(n,s)}.bind(this)));case 1:case"end":return e.stop()}}),e,this)})));return function(e,t){return n.apply(this,arguments)}}(),this.cancelAd=function(){var e=this;return mD.invoke(function(n){return t(this,e),n.cancelAd()}.bind(this))},this.openConsole=function(){var e=this;return mD.invoke(function(n){return t(this,e),n.openConsole()}.bind(this))},this.getSession=function(){var e=this;return mD.invoke(function(n){return t(this,e),n.session()}.bind(this))},this.sendEvent=function(e){var n=this;return mD.invoke(function(r){return t(this,n),r.sendGenericEvent(e)}.bind(this))},this.leaderboard={show:function(){t(this,n),Yv.showLeaderboard()}.bind(this),addScore:function(e){t(this,n),Yv.addScore(e)}.bind(this)}}gD.prototype=new function(){this.showBanner=function(){var e=this;return mD.invoke(function(n){return t(this,e),n.showBanner()}.bind(this))},this.play=function(){},this.customLog=function(){}},window.gdsdk=new gD,window.gdApi=window.gdsdk;