@bygd/gd-sdk-pes 1.21.1 → 1.21.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
- "use strict";var e=require("@babel/runtime/helpers/newArrowCheck"),t=require("@babel/runtime/helpers/typeof"),n=require("@babel/runtime/helpers/defineProperty"),r=require("@babel/runtime/helpers/asyncToGenerator"),a=require("@babel/runtime/helpers/classCallCheck"),i=require("@babel/runtime/helpers/createClass"),s=require("@babel/runtime/regenerator"),o=require("@babel/runtime/helpers/objectWithoutProperties"),d=require("@bygd/gd-sdk-era/dist/default"),u=require("url-parse"),c=require("can-autoplay"),l=require("is-plain-object"),h=require("lodash.clonedeep"),p=require("querystringify"),f=require("lodash.merge"),m=require("js-base64");function g(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var v=g(e),y=g(t),b=g(n),_=g(r),A=g(a),w=g(i),E=g(s),k=g(o),S=g(u),T=g(c),x=g(h),D=g(p),R=g(f),O="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},I=function(e){return e&&e.Math==Math&&e},C=I("object"==typeof globalThis&&globalThis)||I("object"==typeof window&&window)||I("object"==typeof self&&self)||I("object"==typeof O&&O)||function(){return this}()||Function("return this")(),P={},L=function(e){try{return!!e()}catch(e){return!0}},U=!L((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),j={},M={}.propertyIsEnumerable,B=Object.getOwnPropertyDescriptor,N=B&&!M.call({1:2},1);j.f=N?function(e){var t=B(this,e);return!!t&&t.enumerable}:M;var q=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},G={}.toString,F=function(e){return G.call(e).slice(8,-1)},V=F,K="".split,W=L((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==V(e)?K.call(e,""):Object(e)}:Object,z=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e},H=W,$=z,Q=function(e){return H($(e))},Y=function(e){return"object"==typeof e?null!==e:"function"==typeof e},J=Y,X=function(e,t){if(!J(e))return e;var n,r;if(t&&"function"==typeof(n=e.toString)&&!J(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!J(r=n.call(e)))return r;if(!t&&"function"==typeof(n=e.toString)&&!J(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")},Z={}.hasOwnProperty,ee=function(e,t){return Z.call(e,t)},te=Y,ne=C.document,re=te(ne)&&te(ne.createElement),ae=function(e){return re?ne.createElement(e):{}},ie=ae,se=!U&&!L((function(){return 7!=Object.defineProperty(ie("div"),"a",{get:function(){return 7}}).a})),oe=U,de=j,ue=q,ce=Q,le=X,he=ee,pe=se,fe=Object.getOwnPropertyDescriptor;P.f=oe?fe:function(e,t){if(e=ce(e),t=le(t,!0),pe)try{return fe(e,t)}catch(e){}if(he(e,t))return ue(!de.f.call(e,t),e[t])};var me={},ge=Y,ve=function(e){if(!ge(e))throw TypeError(String(e)+" is not an object");return e},ye=U,be=se,_e=ve,Ae=X,we=Object.defineProperty;me.f=ye?we:function(e,t,n){if(_e(e),t=Ae(t,!0),_e(n),be)try{return we(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e};var Ee=me,ke=q,Se=U?function(e,t,n){return Ee.f(e,t,ke(1,n))}:function(e,t,n){return e[t]=n,e},Te={exports:{}},xe=C,De=Se,Re=function(e,t){try{De(xe,e,t)}catch(n){xe[e]=t}return t},Oe=Re,Ie=C["__core-js_shared__"]||Oe("__core-js_shared__",{}),Ce=Ie,Pe=Function.toString;"function"!=typeof Ce.inspectSource&&(Ce.inspectSource=function(e){return Pe.call(e)});var Le=Ce.inspectSource,Ue=Le,je=C.WeakMap,Me="function"==typeof je&&/native code/.test(Ue(je)),Be={exports:{}},Ne=Ie;(Be.exports=function(e,t){return Ne[e]||(Ne[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.10.1",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"});var qe,Ge,Fe,Ve=0,Ke=Math.random(),We=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++Ve+Ke).toString(36)},ze=Be.exports,He=We,$e=ze("keys"),Qe=function(e){return $e[e]||($e[e]=He(e))},Ye={},Je=Me,Xe=Y,Ze=Se,et=ee,tt=Ie,nt=Qe,rt=Ye,at=C.WeakMap;if(Je){var it=tt.state||(tt.state=new at),st=it.get,ot=it.has,dt=it.set;qe=function(e,t){return t.facade=e,dt.call(it,e,t),t},Ge=function(e){return st.call(it,e)||{}},Fe=function(e){return ot.call(it,e)}}else{var ut=nt("state");rt[ut]=!0,qe=function(e,t){return t.facade=e,Ze(e,ut,t),t},Ge=function(e){return et(e,ut)?e[ut]:{}},Fe=function(e){return et(e,ut)}}var ct={set:qe,get:Ge,has:Fe,enforce:function(e){return Fe(e)?Ge(e):qe(e,{})},getterFor:function(e){return function(t){var n;if(!Xe(t)||(n=Ge(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}},lt=C,ht=Se,pt=ee,ft=Re,mt=Le,gt=ct.get,vt=ct.enforce,yt=String(String).split("String");(Te.exports=function(e,t,n,r){var a,i=!!r&&!!r.unsafe,s=!!r&&!!r.enumerable,o=!!r&&!!r.noTargetGet;"function"==typeof n&&("string"!=typeof t||pt(n,"name")||ht(n,"name",t),(a=vt(n)).source||(a.source=yt.join("string"==typeof t?t:""))),e!==lt?(i?!o&&e[t]&&(s=!0):delete e[t],s?e[t]=n:ht(e,t,n)):s?e[t]=n:ft(t,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&gt(this).source||mt(this)}));var bt=C,_t=bt,At=C,wt=function(e){return"function"==typeof e?e:void 0},Et=function(e,t){return arguments.length<2?wt(_t[e])||wt(At[e]):_t[e]&&_t[e][t]||At[e]&&At[e][t]},kt={},St=Math.ceil,Tt=Math.floor,xt=function(e){return isNaN(e=+e)?0:(e>0?Tt:St)(e)},Dt=xt,Rt=Math.min,Ot=function(e){return e>0?Rt(Dt(e),9007199254740991):0},It=xt,Ct=Math.max,Pt=Math.min,Lt=function(e,t){var n=It(e);return n<0?Ct(n+t,0):Pt(n,t)},Ut=Q,jt=Ot,Mt=Lt,Bt=function(e){return function(t,n,r){var a,i=Ut(t),s=jt(i.length),o=Mt(r,s);if(e&&n!=n){for(;s>o;)if((a=i[o++])!=a)return!0}else for(;s>o;o++)if((e||o in i)&&i[o]===n)return e||o||0;return!e&&-1}},Nt={includes:Bt(!0),indexOf:Bt(!1)},qt=ee,Gt=Q,Ft=Nt.indexOf,Vt=Ye,Kt=function(e,t){var n,r=Gt(e),a=0,i=[];for(n in r)!qt(Vt,n)&&qt(r,n)&&i.push(n);for(;t.length>a;)qt(r,n=t[a++])&&(~Ft(i,n)||i.push(n));return i},Wt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],zt=Kt,Ht=Wt.concat("length","prototype");kt.f=Object.getOwnPropertyNames||function(e){return zt(e,Ht)};var $t={};$t.f=Object.getOwnPropertySymbols;var Qt=kt,Yt=$t,Jt=ve,Xt=Et("Reflect","ownKeys")||function(e){var t=Qt.f(Jt(e)),n=Yt.f;return n?t.concat(n(e)):t},Zt=ee,en=Xt,tn=P,nn=me,rn=function(e,t){for(var n=en(t),r=nn.f,a=tn.f,i=0;i<n.length;i++){var s=n[i];Zt(e,s)||r(e,s,a(t,s))}},an=L,sn=/#|\.prototype\./,on=function(e,t){var n=un[dn(e)];return n==ln||n!=cn&&("function"==typeof t?an(t):!!t)},dn=on.normalize=function(e){return String(e).replace(sn,".").toLowerCase()},un=on.data={},cn=on.NATIVE="N",ln=on.POLYFILL="P",hn=on,pn=C,fn=P.f,mn=Se,gn=Te.exports,vn=Re,yn=rn,bn=hn,_n=function(e,t){var n,r,a,i,s,o=e.target,d=e.global,u=e.stat;if(n=d?pn:u?pn[o]||vn(o,{}):(pn[o]||{}).prototype)for(r in t){if(i=t[r],a=e.noTargetGet?(s=fn(n,r))&&s.value:n[r],!bn(d?r:o+(u?".":"#")+r,e.forced)&&void 0!==a){if(typeof i==typeof a)continue;yn(i,a)}(e.sham||a&&a.sham)&&mn(i,"sham",!0),gn(n,r,i,e)}},An=z,wn=function(e){return Object(An(e))},En=Kt,kn=Wt,Sn=Object.keys||function(e){return En(e,kn)},Tn=wn,xn=Sn;_n({target:"Object",stat:!0,forced:L((function(){xn(1)}))},{keys:function(e){return xn(Tn(e))}});var Dn,Rn,On=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e},In=On,Cn=function(e,t,n){if(In(e),void 0===t)return e;switch(n){case 0:return function(){return e.call(t)};case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,a){return e.call(t,n,r,a)}}return function(){return e.apply(t,arguments)}},Pn=F,Ln=Array.isArray||function(e){return"Array"==Pn(e)},Un="process"==F(C.process),jn=Et("navigator","userAgent")||"",Mn=jn,Bn=C.process,Nn=Bn&&Bn.versions,qn=Nn&&Nn.v8;qn?Rn=(Dn=qn.split("."))[0]+Dn[1]:Mn&&(!(Dn=Mn.match(/Edge\/(\d+)/))||Dn[1]>=74)&&(Dn=Mn.match(/Chrome\/(\d+)/))&&(Rn=Dn[1]);var Gn=Rn&&+Rn,Fn=Un,Vn=Gn,Kn=L,Wn=!!Object.getOwnPropertySymbols&&!Kn((function(){return!Symbol.sham&&(Fn?38===Vn:Vn>37&&Vn<41)})),zn=Wn&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Hn=C,$n=Be.exports,Qn=ee,Yn=We,Jn=Wn,Xn=zn,Zn=$n("wks"),er=Hn.Symbol,tr=Xn?er:er&&er.withoutSetter||Yn,nr=function(e){return Qn(Zn,e)&&(Jn||"string"==typeof Zn[e])||(Jn&&Qn(er,e)?Zn[e]=er[e]:Zn[e]=tr("Symbol."+e)),Zn[e]},rr=Y,ar=Ln,ir=nr("species"),sr=function(e,t){var n;return ar(e)&&("function"!=typeof(n=e.constructor)||n!==Array&&!ar(n.prototype)?rr(n)&&null===(n=n[ir])&&(n=void 0):n=void 0),new(void 0===n?Array:n)(0===t?0:t)},or=Cn,dr=W,ur=wn,cr=Ot,lr=sr,hr=[].push,pr=function(e){var t=1==e,n=2==e,r=3==e,a=4==e,i=6==e,s=7==e,o=5==e||i;return function(d,u,c,l){for(var h,p,f=ur(d),m=dr(f),g=or(u,c,3),v=cr(m.length),y=0,b=l||lr,_=t?b(d,v):n||s?b(d,0):void 0;v>y;y++)if((o||y in m)&&(p=g(h=m[y],y,f),e))if(t)_[y]=p;else if(p)switch(e){case 3:return!0;case 5:return h;case 6:return y;case 2:hr.call(_,h)}else switch(e){case 4:return!1;case 7:hr.call(_,h)}return i?-1:r||a?a:_}},fr={forEach:pr(0),map:pr(1),filter:pr(2),some:pr(3),every:pr(4),find:pr(5),findIndex:pr(6),filterOut:pr(7)},mr=L,gr=Gn,vr=nr("species"),yr=function(e){return gr>=51||!mr((function(){var t=[];return(t.constructor={})[vr]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},br=fr.filter;_n({target:"Array",proto:!0,forced:!yr("filter")},{filter:function(e){return br(this,e,arguments.length>1?arguments[1]:void 0)}});var _r=_n,Ar=L,wr=Q,Er=P.f,kr=U,Sr=Ar((function(){Er(1)}));_r({target:"Object",stat:!0,forced:!kr||Sr,sham:!kr},{getOwnPropertyDescriptor:function(e,t){return Er(wr(e),t)}});var Tr=X,xr=me,Dr=q,Rr=function(e,t,n){var r=Tr(t);r in e?xr.f(e,r,Dr(0,n)):e[r]=n},Or=Xt,Ir=Q,Cr=P,Pr=Rr;_n({target:"Object",stat:!0,sham:!U},{getOwnPropertyDescriptors:function(e){for(var t,n,r=Ir(e),a=Cr.f,i=Or(r),s={},o=0;i.length>o;)void 0!==(n=a(r,t=i[o++]))&&Pr(s,t,n);return s}});var Lr={};Lr[nr("toStringTag")]="z";var Ur="[object z]"===String(Lr),jr=Ur,Mr=F,Br=nr("toStringTag"),Nr="Arguments"==Mr(function(){return arguments}()),qr=jr?Mr:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),Br))?n:Nr?Mr(t):"Object"==(r=Mr(t))&&"function"==typeof t.callee?"Arguments":r},Gr=qr,Fr=Ur?{}.toString:function(){return"[object "+Gr(this)+"]"},Vr=Ur,Kr=Te.exports,Wr=Fr;Vr||Kr(Object.prototype,"toString",Wr,{unsafe:!0});var zr=C.Promise,Hr=Te.exports,$r=me.f,Qr=ee,Yr=nr("toStringTag"),Jr=function(e,t,n){e&&!Qr(e=n?e:e.prototype,Yr)&&$r(e,Yr,{configurable:!0,value:t})},Xr=Et,Zr=me,ea=U,ta=nr("species"),na=function(e){var t=Xr(e),n=Zr.f;ea&&t&&!t[ta]&&n(t,ta,{configurable:!0,get:function(){return this}})},ra={},aa=ra,ia=nr("iterator"),sa=Array.prototype,oa=function(e){return void 0!==e&&(aa.Array===e||sa[ia]===e)},da=qr,ua=ra,ca=nr("iterator"),la=function(e){if(null!=e)return e[ca]||e["@@iterator"]||ua[da(e)]},ha=ve,pa=function(e){var t=e.return;if(void 0!==t)return ha(t.call(e)).value},fa=ve,ma=oa,ga=Ot,va=Cn,ya=la,ba=pa,_a=function(e,t){this.stopped=e,this.result=t},Aa=nr("iterator"),wa=!1;try{var Ea=0,ka={next:function(){return{done:!!Ea++}},return:function(){wa=!0}};ka[Aa]=function(){return this},Array.from(ka,(function(){throw 2}))}catch(e){}var Sa,Ta,xa,Da=function(e,t){if(!t&&!wa)return!1;var n=!1;try{var r={};r[Aa]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch(e){}return n},Ra=ve,Oa=On,Ia=nr("species"),Ca=function(e,t){var n,r=Ra(e).constructor;return void 0===r||null==(n=Ra(r)[Ia])?t:Oa(n)},Pa=Et("document","documentElement"),La=/(?:iphone|ipod|ipad).*applewebkit/i.test(jn),Ua=C,ja=L,Ma=Cn,Ba=Pa,Na=ae,qa=La,Ga=Un,Fa=Ua.location,Va=Ua.setImmediate,Ka=Ua.clearImmediate,Wa=Ua.process,za=Ua.MessageChannel,Ha=Ua.Dispatch,$a=0,Qa={},Ya=function(e){if(Qa.hasOwnProperty(e)){var t=Qa[e];delete Qa[e],t()}},Ja=function(e){return function(){Ya(e)}},Xa=function(e){Ya(e.data)},Za=function(e){Ua.postMessage(e+"",Fa.protocol+"//"+Fa.host)};Va&&Ka||(Va=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return Qa[++$a]=function(){("function"==typeof e?e:Function(e)).apply(void 0,t)},Sa($a),$a},Ka=function(e){delete Qa[e]},Ga?Sa=function(e){Wa.nextTick(Ja(e))}:Ha&&Ha.now?Sa=function(e){Ha.now(Ja(e))}:za&&!qa?(xa=(Ta=new za).port2,Ta.port1.onmessage=Xa,Sa=Ma(xa.postMessage,xa,1)):Ua.addEventListener&&"function"==typeof postMessage&&!Ua.importScripts&&Fa&&"file:"!==Fa.protocol&&!ja(Za)?(Sa=Za,Ua.addEventListener("message",Xa,!1)):Sa="onreadystatechange"in Na("script")?function(e){Ba.appendChild(Na("script")).onreadystatechange=function(){Ba.removeChild(this),Ya(e)}}:function(e){setTimeout(Ja(e),0)});var ei,ti,ni,ri,ai,ii,si,oi,di={set:Va,clear:Ka},ui=/web0s(?!.*chrome)/i.test(jn),ci=C,li=P.f,hi=di.set,pi=La,fi=ui,mi=Un,gi=ci.MutationObserver||ci.WebKitMutationObserver,vi=ci.document,yi=ci.process,bi=ci.Promise,_i=li(ci,"queueMicrotask"),Ai=_i&&_i.value;Ai||(ei=function(){var e,t;for(mi&&(e=yi.domain)&&e.exit();ti;){t=ti.fn,ti=ti.next;try{t()}catch(e){throw ti?ri():ni=void 0,e}}ni=void 0,e&&e.enter()},pi||mi||fi||!gi||!vi?bi&&bi.resolve?(si=bi.resolve(void 0),oi=si.then,ri=function(){oi.call(si,ei)}):ri=mi?function(){yi.nextTick(ei)}:function(){hi.call(ci,ei)}:(ai=!0,ii=vi.createTextNode(""),new gi(ei).observe(ii,{characterData:!0}),ri=function(){ii.data=ai=!ai}));var wi=Ai||function(e){var t={fn:e,next:void 0};ni&&(ni.next=t),ti||(ti=t,ri()),ni=t},Ei={},ki=On,Si=function(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=r})),this.resolve=ki(t),this.reject=ki(n)};Ei.f=function(e){return new Si(e)};var Ti,xi,Di,Ri,Oi=ve,Ii=Y,Ci=Ei,Pi=function(e,t){if(Oi(e),Ii(t)&&t.constructor===e)return t;var n=Ci.f(e);return(0,n.resolve)(t),n.promise},Li=C,Ui=_n,ji=C,Mi=Et,Bi=zr,Ni=Te.exports,qi=function(e,t,n){for(var r in t)Hr(e,r,t[r],n);return e},Gi=Jr,Fi=na,Vi=Y,Ki=On,Wi=function(e,t,n){if(!(e instanceof t))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return e},zi=Le,Hi=function(e,t,n){var r,a,i,s,o,d,u,c=n&&n.that,l=!(!n||!n.AS_ENTRIES),h=!(!n||!n.IS_ITERATOR),p=!(!n||!n.INTERRUPTED),f=va(t,c,1+l+p),m=function(e){return r&&ba(r),new _a(!0,e)},g=function(e){return l?(fa(e),p?f(e[0],e[1],m):f(e[0],e[1])):p?f(e,m):f(e)};if(h)r=e;else{if("function"!=typeof(a=ya(e)))throw TypeError("Target is not iterable");if(ma(a)){for(i=0,s=ga(e.length);s>i;i++)if((o=g(e[i]))&&o instanceof _a)return o;return new _a(!1)}r=a.call(e)}for(d=r.next;!(u=d.call(r)).done;){try{o=g(u.value)}catch(e){throw ba(r),e}if("object"==typeof o&&o&&o instanceof _a)return o}return new _a(!1)},$i=Da,Qi=Ca,Yi=di.set,Ji=wi,Xi=Pi,Zi=function(e,t){var n=Li.console;n&&n.error&&(1===arguments.length?n.error(e):n.error(e,t))},es=Ei,ts=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},ns=ct,rs=hn,as=Un,is=Gn,ss=nr("species"),os="Promise",ds=ns.get,us=ns.set,cs=ns.getterFor(os),ls=Bi,hs=ji.TypeError,ps=ji.document,fs=ji.process,ms=Mi("fetch"),gs=es.f,vs=gs,ys=!!(ps&&ps.createEvent&&ji.dispatchEvent),bs="function"==typeof PromiseRejectionEvent,_s=rs(os,(function(){if(!(zi(ls)!==String(ls))){if(66===is)return!0;if(!as&&!bs)return!0}if(is>=51&&/native code/.test(ls))return!1;var e=ls.resolve(1),t=function(e){e((function(){}),(function(){}))};return(e.constructor={})[ss]=t,!(e.then((function(){}))instanceof t)})),As=_s||!$i((function(e){ls.all(e).catch((function(){}))})),ws=function(e){var t;return!(!Vi(e)||"function"!=typeof(t=e.then))&&t},Es=function(e,t){if(!e.notified){e.notified=!0;var n=e.reactions;Ji((function(){for(var r=e.value,a=1==e.state,i=0;n.length>i;){var s,o,d,u=n[i++],c=a?u.ok:u.fail,l=u.resolve,h=u.reject,p=u.domain;try{c?(a||(2===e.rejection&&xs(e),e.rejection=1),!0===c?s=r:(p&&p.enter(),s=c(r),p&&(p.exit(),d=!0)),s===u.promise?h(hs("Promise-chain cycle")):(o=ws(s))?o.call(s,l,h):l(s)):h(r)}catch(e){p&&!d&&p.exit(),h(e)}}e.reactions=[],e.notified=!1,t&&!e.rejection&&Ss(e)}))}},ks=function(e,t,n){var r,a;ys?((r=ps.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),ji.dispatchEvent(r)):r={promise:t,reason:n},!bs&&(a=ji["on"+e])?a(r):"unhandledrejection"===e&&Zi("Unhandled promise rejection",n)},Ss=function(e){Yi.call(ji,(function(){var t,n=e.facade,r=e.value;if(Ts(e)&&(t=ts((function(){as?fs.emit("unhandledRejection",r,n):ks("unhandledrejection",n,r)})),e.rejection=as||Ts(e)?2:1,t.error))throw t.value}))},Ts=function(e){return 1!==e.rejection&&!e.parent},xs=function(e){Yi.call(ji,(function(){var t=e.facade;as?fs.emit("rejectionHandled",t):ks("rejectionhandled",t,e.value)}))},Ds=function(e,t,n){return function(r){e(t,r,n)}},Rs=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,Es(e,!0))},Os=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw hs("Promise can't be resolved itself");var r=ws(t);r?Ji((function(){var n={done:!1};try{r.call(t,Ds(Os,n,e),Ds(Rs,n,e))}catch(t){Rs(n,t,e)}})):(e.value=t,e.state=1,Es(e,!1))}catch(t){Rs({done:!1},t,e)}}};_s&&(ls=function(e){Wi(this,ls,os),Ki(e),Ti.call(this);var t=ds(this);try{e(Ds(Os,t),Ds(Rs,t))}catch(e){Rs(t,e)}},(Ti=function(e){us(this,{type:os,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=qi(ls.prototype,{then:function(e,t){var n=cs(this),r=gs(Qi(this,ls));return r.ok="function"!=typeof e||e,r.fail="function"==typeof t&&t,r.domain=as?fs.domain:void 0,n.parent=!0,n.reactions.push(r),0!=n.state&&Es(n,!1),r.promise},catch:function(e){return this.then(void 0,e)}}),xi=function(){var e=new Ti,t=ds(e);this.promise=e,this.resolve=Ds(Os,t),this.reject=Ds(Rs,t)},es.f=gs=function(e){return e===ls||e===Di?new xi(e):vs(e)},"function"==typeof Bi&&(Ri=Bi.prototype.then,Ni(Bi.prototype,"then",(function(e,t){var n=this;return new ls((function(e,t){Ri.call(n,e,t)})).then(e,t)}),{unsafe:!0}),"function"==typeof ms&&Ui({global:!0,enumerable:!0,forced:!0},{fetch:function(e){return Xi(ls,ms.apply(ji,arguments))}}))),Ui({global:!0,wrap:!0,forced:_s},{Promise:ls}),Gi(ls,os,!1),Fi(os),Di=Mi(os),Ui({target:os,stat:!0,forced:_s},{reject:function(e){var t=gs(this);return t.reject.call(void 0,e),t.promise}}),Ui({target:os,stat:!0,forced:_s},{resolve:function(e){return Xi(this,e)}}),Ui({target:os,stat:!0,forced:As},{all:function(e){var t=this,n=gs(t),r=n.resolve,a=n.reject,i=ts((function(){var n=Ki(t.resolve),i=[],s=0,o=1;Hi(e,(function(e){var d=s++,u=!1;i.push(void 0),o++,n.call(t,e).then((function(e){u||(u=!0,i[d]=e,--o||r(i))}),a)})),--o||r(i)}));return i.error&&a(i.value),n.promise},race:function(e){var t=this,n=gs(t),r=n.reject,a=ts((function(){var a=Ki(t.resolve);Hi(e,(function(e){a.call(t,e).then(n.resolve,r)}))}));return a.error&&r(a.value),n.promise}});var Is=_n,Cs=zr,Ps=L,Ls=Et,Us=Ca,js=Pi,Ms=Te.exports;Is({target:"Promise",proto:!0,real:!0,forced:!!Cs&&Ps((function(){Cs.prototype.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=Us(this,Ls("Promise")),n="function"==typeof e;return this.then(n?function(n){return js(t,e()).then((function(){return n}))}:e,n?function(n){return js(t,e()).then((function(){throw n}))}:e)}}),"function"!=typeof Cs||Cs.prototype.finally||Ms(Cs.prototype,"finally",Ls("Promise").prototype.finally);var Bs=ve,Ns=function(){var e=Bs(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t},qs={},Gs=L;function Fs(e,t){return RegExp(e,t)}qs.UNSUPPORTED_Y=Gs((function(){var e=Fs("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),qs.BROKEN_CARET=Gs((function(){var e=Fs("^r","gy");return e.lastIndex=2,null!=e.exec("str")}));var Vs=Ns,Ks=qs,Ws=Be.exports,zs=RegExp.prototype.exec,Hs=Ws("native-string-replace",String.prototype.replace),$s=zs,Qs=function(){var e=/a/,t=/b*/g;return zs.call(e,"a"),zs.call(t,"a"),0!==e.lastIndex||0!==t.lastIndex}(),Ys=Ks.UNSUPPORTED_Y||Ks.BROKEN_CARET,Js=void 0!==/()??/.exec("")[1];(Qs||Js||Ys)&&($s=function(e){var t,n,r,a,i=this,s=Ys&&i.sticky,o=Vs.call(i),d=i.source,u=0,c=e;return s&&(-1===(o=o.replace("y","")).indexOf("g")&&(o+="g"),c=String(e).slice(i.lastIndex),i.lastIndex>0&&(!i.multiline||i.multiline&&"\n"!==e[i.lastIndex-1])&&(d="(?: "+d+")",c=" "+c,u++),n=new RegExp("^(?:"+d+")",o)),Js&&(n=new RegExp("^"+d+"$(?!\\s)",o)),Qs&&(t=i.lastIndex),r=zs.call(s?n:i,c),s?r?(r.input=r.input.slice(u),r[0]=r[0].slice(u),r.index=i.lastIndex,i.lastIndex+=r[0].length):i.lastIndex=0:Qs&&r&&(i.lastIndex=i.global?r.index+r[0].length:t),Js&&r&&r.length>1&&Hs.call(r[0],n,(function(){for(a=1;a<arguments.length-2;a++)void 0===arguments[a]&&(r[a]=void 0)})),r});var Xs=$s;_n({target:"RegExp",proto:!0,forced:/./.exec!==Xs},{exec:Xs});var Zs=Te.exports,eo=L,to=nr,no=Se,ro=to("species"),ao=!eo((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")})),io="$0"==="a".replace(/./,"$0"),so=to("replace"),oo=!!/./[so]&&""===/./[so]("a","$0"),uo=!eo((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2!==n.length||"a"!==n[0]||"b"!==n[1]})),co=function(e,t,n,r){var a=to(e),i=!eo((function(){var t={};return t[a]=function(){return 7},7!=""[e](t)})),s=i&&!eo((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[ro]=function(){return n},n.flags="",n[a]=/./[a]),n.exec=function(){return t=!0,null},n[a](""),!t}));if(!i||!s||"replace"===e&&(!ao||!io||oo)||"split"===e&&!uo){var o=/./[a],d=n(a,""[e],(function(e,t,n,r,a){return t.exec===RegExp.prototype.exec?i&&!a?{done:!0,value:o.call(t,n,r)}:{done:!0,value:e.call(n,t,r)}:{done:!1}}),{REPLACE_KEEPS_$0:io,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:oo}),u=d[0],c=d[1];Zs(String.prototype,e,u),Zs(RegExp.prototype,a,2==t?function(e,t){return c.call(e,this,t)}:function(e){return c.call(e,this)})}r&&no(RegExp.prototype[a],"sham",!0)},lo=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t},ho=F,po=Xs,fo=function(e,t){var n=e.exec;if("function"==typeof n){var r=n.call(e,t);if("object"!=typeof r)throw TypeError("RegExp exec method returned something other than an Object or null");return r}if("RegExp"!==ho(e))throw TypeError("RegExp#exec called on incompatible receiver");return po.call(e,t)},mo=ve,go=z,vo=lo,yo=fo;co("search",1,(function(e,t,n){return[function(t){var n=go(this),r=null==t?void 0:t[e];return void 0!==r?r.call(t,n):new RegExp(t)[e](String(n))},function(e){var r=n(t,e,this);if(r.done)return r.value;var a=mo(e),i=String(this),s=a.lastIndex;vo(s,0)||(a.lastIndex=0);var o=yo(a,i);return vo(a.lastIndex,s)||(a.lastIndex=s),null===o?-1:o.index}]}));var bo=z,_o="[\t\n\v\f\r                 \u2028\u2029\ufeff]",Ao=RegExp("^"+_o+_o+"*"),wo=RegExp(_o+_o+"*$"),Eo=function(e){return function(t){var n=String(bo(t));return 1&e&&(n=n.replace(Ao,"")),2&e&&(n=n.replace(wo,"")),n}},ko={start:Eo(1),end:Eo(2),trim:Eo(3)},So=L,To="\t\n\v\f\r                 \u2028\u2029\ufeff",xo=ko.trim;_n({target:"String",proto:!0,forced:function(e){return So((function(){return!!To[e]()||"​…᠎"!="​…᠎"[e]()||To[e].name!==e}))}("trim")},{trim:function(){return xo(this)}});var Do={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},Ro=L,Oo=fr.forEach,Io=C,Co=Do,Po=function(e,t){var n=[][e];return!!n&&Ro((function(){n.call(null,t||function(){throw 1},1)}))}("forEach")?[].forEach:function(e){return Oo(this,e,arguments.length>1?arguments[1]:void 0)},Lo=Se;for(var Uo in Co){var jo=Io[Uo],Mo=jo&&jo.prototype;if(Mo&&Mo.forEach!==Po)try{Lo(Mo,"forEach",Po)}catch(e){Mo.forEach=Po}}var Bo=Y,No=ve,qo=function(e){if(!Bo(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype");return e},Go=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),t=n instanceof Array}catch(e){}return function(n,r){return No(n),qo(r),t?e.call(n,r):n.__proto__=r,n}}():void 0),Fo=Y,Vo=Go,Ko=Y,Wo=F,zo=nr("match"),Ho=function(e){var t;return Ko(e)&&(void 0!==(t=e[zo])?!!t:"RegExp"==Wo(e))},$o=U,Qo=C,Yo=hn,Jo=function(e,t,n){var r,a;return Vo&&"function"==typeof(r=t.constructor)&&r!==n&&Fo(a=r.prototype)&&a!==n.prototype&&Vo(e,a),e},Xo=me.f,Zo=kt.f,ed=Ho,td=Ns,nd=qs,rd=Te.exports,ad=L,id=ct.set,sd=na,od=nr("match"),dd=Qo.RegExp,ud=dd.prototype,cd=/a/g,ld=/a/g,hd=new dd(cd)!==cd,pd=nd.UNSUPPORTED_Y;if($o&&Yo("RegExp",!hd||pd||ad((function(){return ld[od]=!1,dd(cd)!=cd||dd(ld)==ld||"/a/i"!=dd(cd,"i")})))){for(var fd=function(e,t){var n,r=this instanceof fd,a=ed(e),i=void 0===t;if(!r&&a&&e.constructor===fd&&i)return e;hd?a&&!i&&(e=e.source):e instanceof fd&&(i&&(t=td.call(e)),e=e.source),pd&&(n=!!t&&t.indexOf("y")>-1)&&(t=t.replace(/y/g,""));var s=Jo(hd?new dd(e,t):dd(e,t),r?this:ud,fd);return pd&&n&&id(s,{sticky:n}),s},md=function(e){e in fd||Xo(fd,e,{configurable:!0,get:function(){return dd[e]},set:function(t){dd[e]=t}})},gd=Zo(dd),vd=0;gd.length>vd;)md(gd[vd++]);ud.constructor=fd,fd.prototype=ud,rd(Qo,"RegExp",fd)}sd("RegExp");var yd=Te.exports,bd=ve,_d=L,Ad=Ns,wd=RegExp.prototype,Ed=wd.toString,kd=_d((function(){return"/a/b"!=Ed.call({source:"a",flags:"b"})})),Sd="toString"!=Ed.name;(kd||Sd)&&yd(RegExp.prototype,"toString",(function(){var e=bd(this),t=String(e.source),n=e.flags;return"/"+t+"/"+String(void 0===n&&e instanceof RegExp&&!("flags"in wd)?Ad.call(e):n)}),{unsafe:!0});var Td=_n,xd=L,Dd=Ln,Rd=Y,Od=wn,Id=Ot,Cd=Rr,Pd=sr,Ld=yr,Ud=Gn,jd=nr("isConcatSpreadable"),Md=Ud>=51||!xd((function(){var e=[];return e[jd]=!1,e.concat()[0]!==e})),Bd=Ld("concat"),Nd=function(e){if(!Rd(e))return!1;var t=e[jd];return void 0!==t?!!t:Dd(e)};Td({target:"Array",proto:!0,forced:!Md||!Bd},{concat:function(e){var t,n,r,a,i,s=Od(this),o=Pd(s,0),d=0;for(t=-1,r=arguments.length;t<r;t++)if(Nd(i=-1===t?s:arguments[t])){if(d+(a=Id(i.length))>9007199254740991)throw TypeError("Maximum allowed index exceeded");for(n=0;n<a;n++,d++)n in i&&Cd(o,d,i[n])}else{if(d>=9007199254740991)throw TypeError("Maximum allowed index exceeded");Cd(o,d++,i)}return o.length=d,o}});var qd,Gd=Ho,Fd=function(e){if(Gd(e))throw TypeError("The method doesn't accept regular expressions");return e},Vd=nr("match"),Kd=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[Vd]=!1,"/./"[e](t)}catch(e){}}return!1},Wd=_n,zd=P.f,Hd=Ot,$d=Fd,Qd=z,Yd=Kd,Jd="".startsWith,Xd=Math.min,Zd=Yd("startsWith");Wd({target:"String",proto:!0,forced:!!(Zd||(qd=zd(String.prototype,"startsWith"),!qd||qd.writable))&&!Zd},{startsWith:function(e){var t=String(Qd(this));$d(e);var n=Hd(Xd(arguments.length>1?arguments[1]:void 0,t.length)),r=String(e);return Jd?Jd.call(t,r,n):t.slice(n,n+r.length)===r}});var eu=xt,tu=z,nu=function(e){return function(t,n){var r,a,i=String(tu(t)),s=eu(n),o=i.length;return s<0||s>=o?e?"":void 0:(r=i.charCodeAt(s))<55296||r>56319||s+1===o||(a=i.charCodeAt(s+1))<56320||a>57343?e?i.charAt(s):r:e?i.slice(s,s+2):a-56320+(r-55296<<10)+65536}},ru={codeAt:nu(!1),charAt:nu(!0)},au=ru.charAt,iu=function(e,t,n){return t+(n?au(e,t).length:1)},su=wn,ou=Math.floor,du="".replace,uu=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,cu=/\$([$&'`]|\d{1,2})/g,lu=co,hu=ve,pu=Ot,fu=xt,mu=z,gu=iu,vu=function(e,t,n,r,a,i){var s=n+e.length,o=r.length,d=cu;return void 0!==a&&(a=su(a),d=uu),du.call(i,d,(function(i,d){var u;switch(d.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,n);case"'":return t.slice(s);case"<":u=a[d.slice(1,-1)];break;default:var c=+d;if(0===c)return i;if(c>o){var l=ou(c/10);return 0===l?i:l<=o?void 0===r[l-1]?d.charAt(1):r[l-1]+d.charAt(1):i}u=r[c-1]}return void 0===u?"":u}))},yu=fo,bu=Math.max,_u=Math.min;lu("replace",2,(function(e,t,n,r){var a=r.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,i=r.REPLACE_KEEPS_$0,s=a?"$":"$0";return[function(n,r){var a=mu(this),i=null==n?void 0:n[e];return void 0!==i?i.call(n,a,r):t.call(String(a),n,r)},function(e,r){if(!a&&i||"string"==typeof r&&-1===r.indexOf(s)){var o=n(t,e,this,r);if(o.done)return o.value}var d=hu(e),u=String(this),c="function"==typeof r;c||(r=String(r));var l=d.global;if(l){var h=d.unicode;d.lastIndex=0}for(var p=[];;){var f=yu(d,u);if(null===f)break;if(p.push(f),!l)break;""===String(f[0])&&(d.lastIndex=gu(u,pu(d.lastIndex),h))}for(var m,g="",v=0,y=0;y<p.length;y++){f=p[y];for(var b=String(f[0]),_=bu(_u(fu(f.index),u.length),0),A=[],w=1;w<f.length;w++)A.push(void 0===(m=f[w])?m:String(m));var E=f.groups;if(c){var k=[b].concat(A,_,u);void 0!==E&&k.push(E);var S=String(r.apply(void 0,k))}else S=vu(b,u,_,A,E,r);_>=v&&(g+=u.slice(v,_)+S,v=_+b.length)}return g+u.slice(v)}]}));var Au=U,wu=me.f,Eu=Function.prototype,ku=Eu.toString,Su=/^\s*function ([^ (]*)/;Au&&!("name"in Eu)&&wu(Eu,"name",{configurable:!0,get:function(){try{return ku.call(this).match(Su)[1]}catch(e){return""}}});var Tu,xu=me,Du=ve,Ru=Sn,Ou=U?Object.defineProperties:function(e,t){Du(e);for(var n,r=Ru(t),a=r.length,i=0;a>i;)xu.f(e,n=r[i++],t[n]);return e},Iu=ve,Cu=Ou,Pu=Wt,Lu=Ye,Uu=Pa,ju=ae,Mu=Qe("IE_PROTO"),Bu=function(){},Nu=function(e){return"<script>"+e+"<\/script>"},qu=function(){try{Tu=document.domain&&new ActiveXObject("htmlfile")}catch(e){}var e,t;qu=Tu?function(e){e.write(Nu("")),e.close();var t=e.parentWindow.Object;return e=null,t}(Tu):((t=ju("iframe")).style.display="none",Uu.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(Nu("document.F=Object")),e.close(),e.F);for(var n=Pu.length;n--;)delete qu.prototype[Pu[n]];return qu()};Lu[Mu]=!0;var Gu=Object.create||function(e,t){var n;return null!==e?(Bu.prototype=Iu(e),n=new Bu,Bu.prototype=null,n[Mu]=e):n=qu(),void 0===t?n:Cu(n,t)},Fu={},Vu=Q,Ku=kt.f,Wu={}.toString,zu="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];Fu.f=function(e){return zu&&"[object Window]"==Wu.call(e)?function(e){try{return Ku(e)}catch(e){return zu.slice()}}(e):Ku(Vu(e))};var Hu={},$u=nr;Hu.f=$u;var Qu=bt,Yu=ee,Ju=Hu,Xu=me.f,Zu=function(e){var t=Qu.Symbol||(Qu.Symbol={});Yu(t,e)||Xu(t,e,{value:Ju.f(e)})},ec=_n,tc=C,nc=Et,rc=U,ac=Wn,ic=zn,sc=L,oc=ee,dc=Ln,uc=Y,cc=ve,lc=wn,hc=Q,pc=X,fc=q,mc=Gu,gc=Sn,vc=kt,yc=Fu,bc=$t,_c=P,Ac=me,wc=j,Ec=Se,kc=Te.exports,Sc=Be.exports,Tc=Ye,xc=We,Dc=nr,Rc=Hu,Oc=Zu,Ic=Jr,Cc=ct,Pc=fr.forEach,Lc=Qe("hidden"),Uc=Dc("toPrimitive"),jc=Cc.set,Mc=Cc.getterFor("Symbol"),Bc=Object.prototype,Nc=tc.Symbol,qc=nc("JSON","stringify"),Gc=_c.f,Fc=Ac.f,Vc=yc.f,Kc=wc.f,Wc=Sc("symbols"),zc=Sc("op-symbols"),Hc=Sc("string-to-symbol-registry"),$c=Sc("symbol-to-string-registry"),Qc=Sc("wks"),Yc=tc.QObject,Jc=!Yc||!Yc.prototype||!Yc.prototype.findChild,Xc=rc&&sc((function(){return 7!=mc(Fc({},"a",{get:function(){return Fc(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=Gc(Bc,t);r&&delete Bc[t],Fc(e,t,n),r&&e!==Bc&&Fc(Bc,t,r)}:Fc,Zc=function(e,t){var n=Wc[e]=mc(Nc.prototype);return jc(n,{type:"Symbol",tag:e,description:t}),rc||(n.description=t),n},el=ic?function(e){return"symbol"==typeof e}:function(e){return Object(e)instanceof Nc},tl=function(e,t,n){e===Bc&&tl(zc,t,n),cc(e);var r=pc(t,!0);return cc(n),oc(Wc,r)?(n.enumerable?(oc(e,Lc)&&e[Lc][r]&&(e[Lc][r]=!1),n=mc(n,{enumerable:fc(0,!1)})):(oc(e,Lc)||Fc(e,Lc,fc(1,{})),e[Lc][r]=!0),Xc(e,r,n)):Fc(e,r,n)},nl=function(e,t){cc(e);var n=hc(t),r=gc(n).concat(sl(n));return Pc(r,(function(t){rc&&!rl.call(n,t)||tl(e,t,n[t])})),e},rl=function(e){var t=pc(e,!0),n=Kc.call(this,t);return!(this===Bc&&oc(Wc,t)&&!oc(zc,t))&&(!(n||!oc(this,t)||!oc(Wc,t)||oc(this,Lc)&&this[Lc][t])||n)},al=function(e,t){var n=hc(e),r=pc(t,!0);if(n!==Bc||!oc(Wc,r)||oc(zc,r)){var a=Gc(n,r);return!a||!oc(Wc,r)||oc(n,Lc)&&n[Lc][r]||(a.enumerable=!0),a}},il=function(e){var t=Vc(hc(e)),n=[];return Pc(t,(function(e){oc(Wc,e)||oc(Tc,e)||n.push(e)})),n},sl=function(e){var t=e===Bc,n=Vc(t?zc:hc(e)),r=[];return Pc(n,(function(e){!oc(Wc,e)||t&&!oc(Bc,e)||r.push(Wc[e])})),r};(ac||(kc((Nc=function(){if(this instanceof Nc)throw TypeError("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?String(arguments[0]):void 0,t=xc(e),n=function(e){this===Bc&&n.call(zc,e),oc(this,Lc)&&oc(this[Lc],t)&&(this[Lc][t]=!1),Xc(this,t,fc(1,e))};return rc&&Jc&&Xc(Bc,t,{configurable:!0,set:n}),Zc(t,e)}).prototype,"toString",(function(){return Mc(this).tag})),kc(Nc,"withoutSetter",(function(e){return Zc(xc(e),e)})),wc.f=rl,Ac.f=tl,_c.f=al,vc.f=yc.f=il,bc.f=sl,Rc.f=function(e){return Zc(Dc(e),e)},rc&&(Fc(Nc.prototype,"description",{configurable:!0,get:function(){return Mc(this).description}}),kc(Bc,"propertyIsEnumerable",rl,{unsafe:!0}))),ec({global:!0,wrap:!0,forced:!ac,sham:!ac},{Symbol:Nc}),Pc(gc(Qc),(function(e){Oc(e)})),ec({target:"Symbol",stat:!0,forced:!ac},{for:function(e){var t=String(e);if(oc(Hc,t))return Hc[t];var n=Nc(t);return Hc[t]=n,$c[n]=t,n},keyFor:function(e){if(!el(e))throw TypeError(e+" is not a symbol");if(oc($c,e))return $c[e]},useSetter:function(){Jc=!0},useSimple:function(){Jc=!1}}),ec({target:"Object",stat:!0,forced:!ac,sham:!rc},{create:function(e,t){return void 0===t?mc(e):nl(mc(e),t)},defineProperty:tl,defineProperties:nl,getOwnPropertyDescriptor:al}),ec({target:"Object",stat:!0,forced:!ac},{getOwnPropertyNames:il,getOwnPropertySymbols:sl}),ec({target:"Object",stat:!0,forced:sc((function(){bc.f(1)}))},{getOwnPropertySymbols:function(e){return bc.f(lc(e))}}),qc)&&ec({target:"JSON",stat:!0,forced:!ac||sc((function(){var e=Nc();return"[null]"!=qc([e])||"{}"!=qc({a:e})||"{}"!=qc(Object(e))}))},{stringify:function(e,t,n){for(var r,a=[e],i=1;arguments.length>i;)a.push(arguments[i++]);if(r=t,(uc(t)||void 0!==e)&&!el(e))return dc(t)||(t=function(e,t){if("function"==typeof r&&(t=r.call(this,e,t)),!el(t))return t}),a[1]=t,qc.apply(null,a)}});Nc.prototype[Uc]||Ec(Nc.prototype,Uc,Nc.prototype.valueOf),Ic(Nc,"Symbol"),Tc[Lc]=!0;var ol=_n,dl=U,ul=C,cl=ee,ll=Y,hl=me.f,pl=rn,fl=ul.Symbol;if(dl&&"function"==typeof fl&&(!("description"in fl.prototype)||void 0!==fl().description)){var ml={},gl=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),t=this instanceof gl?new fl(e):void 0===e?fl():fl(e);return""===e&&(ml[t]=!0),t};pl(gl,fl);var vl=gl.prototype=fl.prototype;vl.constructor=gl;var yl=vl.toString,bl="Symbol(test)"==String(fl("test")),_l=/^Symbol\((.*)\)[^)]+$/;hl(vl,"description",{configurable:!0,get:function(){var e=ll(this)?this.valueOf():this,t=yl.call(e);if(cl(ml,e))return"";var n=bl?t.slice(7,-1):t.replace(_l,"$1");return""===n?void 0:n}}),ol({global:!0,forced:!0},{Symbol:gl})}var Al=Gu,wl=me,El=nr("unscopables"),kl=Array.prototype;null==kl[El]&&wl.f(kl,El,{configurable:!0,value:Al(null)});var Sl=function(e){kl[El][e]=!0},Tl=Nt.includes,xl=Sl;_n({target:"Array",proto:!0},{includes:function(e){return Tl(this,e,arguments.length>1?arguments[1]:void 0)}}),xl("includes");var Dl=Fd,Rl=z;_n({target:"String",proto:!0,forced:!Kd("includes")},{includes:function(e){return!!~String(Rl(this)).indexOf(Dl(e),arguments.length>1?arguments[1]:void 0)}});var Ol=_n,Il=fr.find,Cl=Sl,Pl=!0;"find"in[]&&Array(1).find((function(){Pl=!1})),Ol({target:"Array",proto:!0,forced:Pl},{find:function(e){return Il(this,e,arguments.length>1?arguments[1]:void 0)}}),Cl("find");var Ll="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==Ll&&Ll,Ul="URLSearchParams"in Ll,jl="Symbol"in Ll&&"iterator"in Symbol,Ml="FileReader"in Ll&&"Blob"in Ll&&function(){try{return new Blob,!0}catch(e){return!1}}(),Bl="FormData"in Ll,Nl="ArrayBuffer"in Ll;if(Nl)var ql=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],Gl=ArrayBuffer.isView||function(e){return e&&ql.indexOf(Object.prototype.toString.call(e))>-1};function Fl(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 Vl(e){return"string"!=typeof e&&(e=String(e)),e}function Kl(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return jl&&(t[Symbol.iterator]=function(){return t}),t}function Wl(e){this.map={},e instanceof Wl?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 zl(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function Hl(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function $l(e){var t=new FileReader,n=Hl(t);return t.readAsArrayBuffer(e),n}function Ql(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function Yl(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:Ml&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:Bl&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:Ul&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():Nl&&Ml&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=Ql(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):Nl&&(ArrayBuffer.prototype.isPrototypeOf(e)||Gl(e))?this._bodyArrayBuffer=Ql(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):Ul&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},Ml&&(this.blob=function(){var e=zl(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=zl(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($l)}),this.text=function(){var e=zl(this);if(e)return e;if(this._bodyBlob)return function(e){var t=new FileReader,n=Hl(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)},Bl&&(this.formData=function(){return this.text().then(Zl)}),this.json=function(){return this.text().then(JSON.parse)},this}Wl.prototype.append=function(e,t){e=Fl(e),t=Vl(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},Wl.prototype.delete=function(e){delete this.map[Fl(e)]},Wl.prototype.get=function(e){return e=Fl(e),this.has(e)?this.map[e]:null},Wl.prototype.has=function(e){return this.map.hasOwnProperty(Fl(e))},Wl.prototype.set=function(e,t){this.map[Fl(e)]=Vl(t)},Wl.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},Wl.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),Kl(e)},Wl.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),Kl(e)},Wl.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),Kl(e)},jl&&(Wl.prototype[Symbol.iterator]=Wl.prototype.entries);var Jl=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function Xl(e,t){if(!(this instanceof Xl))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var n,r,a=(t=t||{}).body;if(e instanceof Xl){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new Wl(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,a||null==e._bodyInit||(a=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new Wl(t.headers)),this.method=(n=t.method||this.method||"GET",r=n.toUpperCase(),Jl.indexOf(r)>-1?r:n),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&a)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(a),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==t.cache&&"no-cache"!==t.cache)){var i=/([?&])_=[^&]*/;if(i.test(this.url))this.url=this.url.replace(i,"$1_="+(new Date).getTime());else{this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}}function Zl(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),a=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(a))}})),t}function eh(e,t){if(!(this instanceof eh))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 Wl(t.headers),this.url=t.url||"",this._initBody(e)}Xl.prototype.clone=function(){return new Xl(this,{body:this._bodyInit})},Yl.call(Xl.prototype),Yl.call(eh.prototype),eh.prototype.clone=function(){return new eh(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new Wl(this.headers),url:this.url})},eh.error=function(){var e=new eh(null,{status:0,statusText:""});return e.type="error",e};var th=[301,302,303,307,308];eh.redirect=function(e,t){if(-1===th.indexOf(t))throw new RangeError("Invalid status code");return new eh(null,{status:t,headers:{location:e}})};var nh=Ll.DOMException;try{new nh}catch(e){(nh=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack}).prototype=Object.create(Error.prototype),nh.prototype.constructor=nh}function rh(e,t){return new Promise((function(n,r){var a=new Xl(e,t);if(a.signal&&a.signal.aborted)return r(new nh("Aborted","AbortError"));var i=new XMLHttpRequest;function s(){i.abort()}i.onload=function(){var e,t,r={status:i.status,statusText:i.statusText,headers:(e=i.getAllResponseHeaders()||"",t=new Wl,e.replace(/\r?\n[\t ]+/g," ").split("\r").map((function(e){return 0===e.indexOf("\n")?e.substr(1,e.length):e})).forEach((function(e){var n=e.split(":"),r=n.shift().trim();if(r){var a=n.join(":").trim();t.append(r,a)}})),t)};r.url="responseURL"in i?i.responseURL:r.headers.get("X-Request-URL");var a="response"in i?i.response:i.responseText;setTimeout((function(){n(new eh(a,r))}),0)},i.onerror=function(){setTimeout((function(){r(new TypeError("Network request failed"))}),0)},i.ontimeout=function(){setTimeout((function(){r(new TypeError("Network request failed"))}),0)},i.onabort=function(){setTimeout((function(){r(new nh("Aborted","AbortError"))}),0)},i.open(a.method,function(e){try{return""===e&&Ll.location.href?Ll.location.href:e}catch(t){return e}}(a.url),!0),"include"===a.credentials?i.withCredentials=!0:"omit"===a.credentials&&(i.withCredentials=!1),"responseType"in i&&(Ml?i.responseType="blob":Nl&&a.headers.get("Content-Type")&&-1!==a.headers.get("Content-Type").indexOf("application/octet-stream")&&(i.responseType="arraybuffer")),!t||"object"!=typeof t.headers||t.headers instanceof Wl?a.headers.forEach((function(e,t){i.setRequestHeader(t,e)})):Object.getOwnPropertyNames(t.headers).forEach((function(e){i.setRequestHeader(e,Vl(t.headers[e]))})),a.signal&&(a.signal.addEventListener("abort",s),i.onreadystatechange=function(){4===i.readyState&&a.signal.removeEventListener("abort",s)}),i.send(void 0===a._bodyInit?null:a._bodyInit)}))}rh.polyfill=!0,Ll.fetch||(Ll.fetch=rh,Ll.Headers=Wl,Ll.Request=Xl,Ll.Response=eh);var ah={name:"@bygd/gd-sdk-pes",version:"1.21.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":"^20.0.0","@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.2","can-autoplay":"^3.0.2",events:"^3.3.0","get-value":"^3.0.1","is-plain-object":"^5.0.0","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"}},ih=ve,sh=Ot,oh=z,dh=iu,uh=fo;co("match",1,(function(e,t,n){return[function(t){var n=oh(this),r=null==t?void 0:t[e];return void 0!==r?r.call(t,n):new RegExp(t)[e](String(n))},function(e){var r=n(t,e,this);if(r.done)return r.value;var a=ih(e),i=String(this);if(!a.global)return uh(a,i);var s=a.unicode;a.lastIndex=0;for(var o,d=[],u=0;null!==(o=uh(a,i));){var c=String(o[0]);d[u]=c,""===c&&(a.lastIndex=dh(i,sh(a.lastIndex),s)),u++}return 0===u?null:d}]}));var ch=co,lh=Ho,hh=ve,ph=z,fh=Ca,mh=iu,gh=Ot,vh=fo,yh=Xs,bh=qs.UNSUPPORTED_Y,_h=[].push,Ah=Math.min;ch("split",2,(function(e,t,n){var r;return r="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(e,n){var r=String(ph(this)),a=void 0===n?4294967295:n>>>0;if(0===a)return[];if(void 0===e)return[r];if(!lh(e))return t.call(r,e,a);for(var i,s,o,d=[],u=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),c=0,l=new RegExp(e.source,u+"g");(i=yh.call(l,r))&&!((s=l.lastIndex)>c&&(d.push(r.slice(c,i.index)),i.length>1&&i.index<r.length&&_h.apply(d,i.slice(1)),o=i[0].length,c=s,d.length>=a));)l.lastIndex===i.index&&l.lastIndex++;return c===r.length?!o&&l.test("")||d.push(""):d.push(r.slice(c)),d.length>a?d.slice(0,a):d}:"0".split(void 0,0).length?function(e,n){return void 0===e&&0===n?[]:t.call(this,e,n)}:t,[function(t,n){var a=ph(this),i=null==t?void 0:t[e];return void 0!==i?i.call(t,a,n):r.call(String(a),t,n)},function(e,a){var i=n(r,e,this,a,r!==t);if(i.done)return i.value;var s=hh(e),o=String(this),d=fh(s,RegExp),u=s.unicode,c=(s.ignoreCase?"i":"")+(s.multiline?"m":"")+(s.unicode?"u":"")+(bh?"g":"y"),l=new d(bh?"^(?:"+s.source+")":s,c),h=void 0===a?4294967295:a>>>0;if(0===h)return[];if(0===o.length)return null===vh(l,o)?[o]:[];for(var p=0,f=0,m=[];f<o.length;){l.lastIndex=bh?0:f;var g,v=vh(l,bh?o.slice(f):o);if(null===v||(g=Ah(gh(l.lastIndex+(bh?f:0)),o.length))===p)f=mh(o,f,u);else{if(m.push(o.slice(p,f)),m.length===h)return m;for(var y=1;y<=v.length-1;y++)if(m.push(v[y]),m.length===h)return m;f=p=g}}return m.push(o.slice(p)),m}]}),bh);var wh=function(){function e(t){A.default(this,e),this.gameData=t}return w.default(e,[{key:"_getFakeCustomParams",value:function(){var e={_vid:["bla_bla1","bla_bla2","bla_bla3"],_1ld:["1ld_1","1ld_2","1ld_3","1ld_4"],_1lp:["1lp_1","1lp_2"]},t={};for(var n in e){var r=e[n];t[n]=r[Math.floor(Math.random()*r.length)]}return t}},{key:"checkCustomParams",value:function(){try{var e={};if(this.gameData.diagnostic&&this.gameData.diagnostic.cp&&this.gameData.diagnostic.cp.enabled){var t=new S.default(location.href,!0);for(var n in t.query)e[n]=t.query[n];Object.keys(e).length;return e}}catch(e){console.log("_checkCustomParams.Error",e)}}}]),e}(),Eh=function(){function e(t,n){A.default(this,e),this.adContainer=t,this.onResume=n}return w.default(e,[{key:"show",value:function(){this.adResumeButton.style.display="block",this.adResumeButtonOverlay.style.display="block"}},{key:"hide",value:function(){this.adResumeButton.style.display="none",this.adResumeButtonOverlay.style.display="none"}},{key:"add",value:function(){var e=this;try{var t=document.createElement("div");this.adResumeButton=t,t.id="gd__resume__button",t.setAttribute("title","Resume"),this.addStyles(),t.classList.add("gd__resume__button"),t.addEventListener("click",function(){v.default(this,e),this.onResume()}.bind(this)),this.adContainer.appendChild(t);var n=document.createElement("div");this.adResumeButtonOverlay=n,n.id="gd__resume__button__overlay",n.classList.add("gd__resume__button__overlay"),this.adContainer.appendChild(n)}catch(e){console.log("Resume button add error",e)}}},{key:"addStyles",value:function(){var e=document.body||document.getElementsByTagName("body")[0];this.addStylesheet("gd__resume__button__style",e,'\n .gd__resume__button{\n background-image: url("https://img.gamedistribution.com/play-black.svg");\n background-color:white; \n width: 120px;\n height: 120px;\n position: absolute;\n display: none;\n z-index: 2000;\n cursor: pointer;\n top: calc(50% - 60px);\n left: calc(50% - 60px);\n margin: 0;\n border-radius: 50%;\n border: 2px solid white;\n animation: play-button 1s ease-in-out infinite alternate;\n -webkit-animation: play-button 1s ease-in-out infinite alternate;\n }\n \n .gd__resume__button__overlay {\n position: fixed;\n display: none;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: rgba(0,0,0,0.5);\n z-index: 1999;\n cursor: pointer;\n }\n @keyframes play-button {\n 0% {\n transform: scale(1.0);\n -webkit-transform: scale(1.0);\n }\n 100% {\n transform: scale(1.1);\n -webkit-transform: scale(1.1);\n }\n }\n .gd__resume__button:hover{\n filter: invert(100%) sepia(51%) saturate(0%) hue-rotate(346deg) brightness(104%) contrast(100%); \n }\n ')}},{key:"addStylesheet",value:function(e,t,n){if(!document.getElementById(e)){var r=document.createElement("style");r.type="text/css",r.id=e,r.styleSheet?r.styleSheet.cssText=n:r.appendChild(document.createTextNode(n)),t.appendChild(r)}}}]),e}(),kh=function(e){if(!e)return!1;var t=Sh.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)},Sh=Object.prototype.toString;function Th(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 xh(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Th(Object(n),!0).forEach((function(t){b.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Th(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Dh(e){return null!=e&&e.error_url?"<vmap:VASTAdData>".concat(function(e){return e.promo_url?'<VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper fallbackOnNoAd="true">\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="0" />\n </Extensions>\n </Wrapper>\n </Ad>\n <Ad id="promo">\n <Wrapper>\n <AdSystem>Rainbow</AdSystem>\n <Impression><![CDATA[').concat(e.promo_imp_green_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.promo_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="1" />\n </Extensions>\n </Wrapper>\n </Ad>\n </VAST>').trim():'<VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper>\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,"]]></VASTAdTagURI>\n </Wrapper>\n </Ad>\n </VAST>").trim()}(e),"</vmap:VASTAdData>").trim():'<vmap:AdTagURI templateType="vast3"><![CDATA['.concat(null==e?void 0:e.adtag_url,"]]></vmap:AdTagURI>").trim()}var Rh=["bidFloor","isDfpBidding"];function Oh(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 Ih(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Oh(Object(n),!0).forEach((function(t){b.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Oh(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ch=null,Ph=function(){function e(t,n,r){var a=this;if(A.default(this,e),Ch)return Ch;Ch=this;var i={debug:!1,width:640,height:360,locale:"en"};this.options=n?d.extendDefaults(i,n):i,this.prefix="gdsdk__",this.adsLoader=null,this.adsManager=null,this.adDisplayContainer=null,this.eventBus=new d.EventBus,this.safetyTimer=null,this.containerTransitionSpeed=0,this.adCounter={},this.adPrerollCount=0,this.adMidrollCount=0,this.adRewardedCount=0,this.preloadedAdType=null,this.requestRunning=!1,this.parentDomain=r.parentDomain,this.topDomain=r.topDomain,this.parentURL=r.parentURL,this.adDisplayContainerInitialized=!1,this.IMASampleTags=d.getIMASampleTags(),this.atom_display,this.userAllowedPersonalizedAds=document.location.search.indexOf("gdpr-targeting=0")>=0||document.cookie.indexOf("ogdpr_advertisement=0")>=0?"0":"1",this.parentDomain.includes("girlsgogames")&&(this.userAllowedPersonalizedAds=!1),this.thirdPartyContainer=""!==t?document.getElementById(t):null,this.options.width="number"==typeof this.options.width?this.options.width:"100%"===this.options.width?640:this.options.width.replace(/[^0-9]/g,""),this.options.height="number"==typeof this.options.height?this.options.height:"100%"===this.options.height?360:this.options.height.replace(/[^0-9]/g,"");var s=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,o=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;this.options.width=this.thirdPartyContainer?this.thirdPartyContainer.offsetWidth:s,this.options.height=this.thirdPartyContainer?this.thirdPartyContainer.offsetHeight:o,this.gameId="0",this.category="",this.tags=[],this.eventCategory="AD",this.eventBus.subscribe("LOADED",function(){v.default(this,a),this._clearSafetyTimer("LOADED"),this._startSafetyTimer(8e3,"LOADED")}.bind(this),"ima"),this.eventBus.subscribe("STARTED",function(){v.default(this,a),this._clearSafetyTimer("STARTED")}.bind(this),"ima")}var t,n,r,a,i,s,o,u,c,h,p,f,g,y,O,I,C,P,L;return w.default(e,[{key:"start",value:(L=_.default(E.default.mark((function e(){return E.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this._init_afg_script({adsense_channel:"4089988593"});case 3:return e.next=5,this._init_hl_script();case 5:return e.next=7,this._init_ima_script();case 7:this._createPlayer(),this._setUpIMA(),e.next=14;break;case 11:throw e.prev=11,e.t0=e.catch(0),new Error(e.t0);case 14:case"end":return e.stop()}}),e,this,[[0,11]])}))),function(){return L.apply(this,arguments)})},{key:"_getAdVast",value:function(e,t){var n=this;return new Promise(function(){var r=_.default(E.default.mark((function r(a){var i,s,o,u,c,h,p,f,m,g,y=this;return E.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!(d.Ls.available&&d.Ls.getBoolean("gd_debug_ex")&&d.Ls.getBoolean("gd_tag"))){r.next=6;break}return i=n.IMASampleTags[e],s=Math.floor(Math.random()*i.length),o=i[s],a({url:o}),r.abrupt("return");case 6:if(void 0!==window.idhb.requestAds){r.next=8;break}throw new Error("Prebid.js wrapper script hit an error or didn't exist!");case 8:return r.prev=8,r.next=11,n._getTunnlKeys(e);case 11:if(u=r.sent,c=u.data,h=c.nsid?c.nsid:"TNL_T-17102571517",p=c.tid?c.tid:"TNL_NS-18101700058",f="".concat(h,"/").concat(p),delete c.nsid,delete c.tid,R.default(c,{tnl_system:"1",tnl_content_category:n.category.toLowerCase()}),n.eventBus.broadcast("AD_REQUEST",{message:c.tnl_ad_pos}),m=n.options,"preroll"===c.tnl_ad_pos&&l.isPlainObject(m.preroll)?m=m.preroll:"midroll"===c.tnl_ad_pos&&l.isPlainObject(m.midroll)?m=m.midroll:"rewarded"===c.tnl_ad_pos&&l.isPlainObject(m.rewarded)&&(m=m.rewarded),!(t&&t.retry_on_success&&l.isPlainObject(m.retry_on_success)&&l.isPlainObject(m.retry_on_success.vast))){r.next=26;break}return r.abrupt("return",a(n._createCustomAdVastUrl(m.retry_on_success.vast,{tnl_keys:c})));case 26:if(!(t&&t.retry_on_failure&&n.options.retry_on_failure&&l.isPlainObject(m.retry_on_failure.vast))){r.next=30;break}return r.abrupt("return",a(n._createCustomAdVastUrl(m.retry_on_failure.vast,{tnl_keys:c})));case 30:if(!l.isPlainObject(m.vast)){r.next=32;break}return r.abrupt("return",a(n._createCustomAdVastUrl(m.vast,{tnl_keys:c})));case 32:return r.next=34,n._create_dp_context(c.tnl_ad_pos,t);case 34:g=r.sent,window.idhb.que.push(function(){var e=this;v.default(this,y),window.idhb.setRefererUrl(encodeURIComponent(n.parentURL)),window.idhb.allowPersonalizedAds(!!parseInt(n.userAllowedPersonalizedAds));var t="rewarded"===c.tnl_ad_pos?"rewardedVideo":"gdbanner"===c.tnl_ad_pos?"gd__banner":"midroll"===c.tnl_ad_pos?"midroll":"video1";window.idhb.setDfpAdUnitCodeForAdSlot(t,f),window.idhb.setAdserverTargetingForAdSlot(t,c),window.idhb.requestAds({slots:b.default({},t,{bidFloor:null!=g&&g.floor_price?g.floor_price:void 0}),callback:function(t,n){var r=this;v.default(this,e),g&&!n.bidFloorApplied&&fetch(g.skip_url).catch(function(e){v.default(this,r)}.bind(this)),a({tnl_keys:c,url:t,dp:g,hl:n})}.bind(this)})}.bind(this)),r.next=41;break;case 38:throw r.prev=38,r.t0=r.catch(8),new Error(r.t0);case 41:case"end":return r.stop()}}),r,this,[[8,38]])})));return function(e){return r.apply(this,arguments)}}())}},{key:"nextAdPosition",value:function(e){if(e===d.AdType.Rewarded)return this.adRewardedCount++,"rewarded";if(e===d.AdType.Interstitial){var t=!1===this.gameData.preroll||!0===this.noPreroll||1===this.adPrerollCount;return t?this.adMidrollCount++:this.adPrerollCount++,t||this.adMidrollCount>0?"midroll":"preroll"}return"midroll"}},{key:"getAdPosition",value:function(e){return e===d.AdType.Rewarded?"rewarded":e===d.AdType.Interstitial?!1===this.gameData.preroll||!0===this.noPreroll||1===this.adPrerollCount||this.adMidrollCount>0?"midroll":"preroll":"midroll"}},{key:"_getTunnlKeys",value:function(e){var t=this;return new Promise(function(n){var r=this;v.default(this,t);var a="";a=!navigator.userAgent.match(/Crosswalk/i)&&void 0===window.cordova||"m.hopy.com"!==this.parentDomain?"page_url=".concat(encodeURIComponent(this.topDomain||this.parentDomain)):"bundle=com.hopy.frivgames";var i=this.nextAdPosition(e),s=d.getQueryString("ch",window.location.href),o=d.getQueryString("ch_date",window.location.href),u=s?"&ch=".concat(s):"",c=o?"&ch_date=".concat(o):"",l="https://pub.headerlift.com/opphb?".concat(a,"&player_width=").concat(this.options.width,"&player_height=").concat(this.options.height,"&ad_type=video_image&game_id=").concat(this.gameId,"&ad_position=").concat(i).concat(u).concat(c,"&correlator=").concat(Date.now()),h=new Request(l,{method:"GET"});fetch(h).then(function(e){v.default(this,r);var t=e.headers.get("content-type");if(t&&-1!==t.indexOf("application/json"))return e.json();throw new TypeError("Oops, we didn't get JSON!")}.bind(this)).then(function(e){v.default(this,r),d.isObjectEmpty(e)&&(e=this._createTunnlReportingFallbackKeys(i),this.eventBus.broadcast("AD_REQUEST_KEYS_EMPTY",{message:"Tunnl returned empty response.",details:l})),n({data:e,url:l})}.bind(this)).catch(function(e){v.default(this,r);var t=this._createTunnlReportingFallbackKeys(i);this.eventBus.broadcast("AD_REQUEST_KEYS_FALLBACK",{message:e.message,details:l}),n({data:t,url:l})}.bind(this))}.bind(this))}},{key:"_createTunnlReportingFallbackKeys",value:function(e){return{tid:"TNL_T-17102571517",nsid:"TNL_NS-18101700058",tnl_tid:"T-17102571517",tnl_nsid:"NS-18101700058",tnl_pw:this.options.width,tnl_ph:this.options.height,tnl_pt:"22",tnl_pid:"P-17101800031",tnl_paid:"17",tnl_ad_type:"video_image",tnl_asset_id:this.gameId.toString(),tnl_ad_pos:e,tnl_skippable:"1",tnl_cp1:"",tnl_cp2:"",tnl_cp3:"",tnl_cp4:"",tnl_cp5:"",tnl_cp6:"",tnl_campaign:"2",tnl_gdpr:"0",tnl_gdpr_consent:"1",consent_string:"BOWJjG9OWJjG9CLAAAENBx-AAAAiDAAA",tnl_content_category:this.category.toLowerCase()}}},{key:"_requestAd",value:function(e,t){var n=this;return t=t||{},new Promise(function(r){if(v.default(this,n),"undefined"==typeof google)throw new Error("Unable to load ad, google IMA SDK not defined.");try{var a,i=null==e||null===(a=e.tnl_keys)||void 0===a?void 0:a.tnl_ad_pos;this.adSuccess=!1;var s=new google.ima.AdsRequest,o=this._transformVast(e,t),d=Ih(Ih({},t),{},{adTag:o,tnl_ad_pos:i});this.adCounter[i]=this.adCounter[i]||0,this.adCounter[i]++;var u=e.dp,c=e.hl;if(u&&(u.adtag_url=o.url,this._extend_dp_with_adsense(u,c,null==e?void 0:e.tnl_keys)),this._isVMAP(i)){var l=function(e){var t=e.position||"midroll",n=e.dp_1,r=e.dp_2,a=Date.now(),i=new S.default(e.adtag_url_1,!0);i.query=xh(xh({},i.query),{},{ad_rule:0,vpos:t,pod:1,ppos:1,lip:!0,correlator:a,output:"xml_vast3"});var s=i.toString(),o=new S.default(e.adtag_url_2,!0);o.query=xh(xh({},o.query),{},{ad_rule:0,vpos:t,pod:1,correlator:++a,output:"xml_vast3"});var d=o.toString(),u=Date.now();return'<?xml version="1.0" encoding="UTF-8"?>\n<vmap:VMAP xmlns:vmap="http://www.iab.net/videosuite/vmap" version="1.0">\n<vmap:AdBreak timeOffset="start" breakType="linear,nonlinear" breakId="break-1">\n <vmap:AdSource id="'.concat(u++,'" allowMultipleAds="false" followRedirects="true">\n ').concat(Dh({id:u++,adtag_url:s,error_url:null==n?void 0:n.error_url,impression_url:null==n?void 0:n.impression_url}),'\n </vmap:AdSource>\n</vmap:AdBreak>\n<vmap:AdBreak timeOffset="start" breakType="linear,nonlinear" breakId="break-2">\n <vmap:AdSource id="').concat(u++,'" allowMultipleAds="false" followRedirects="true">\n ').concat(Dh({id:u++,adtag_url:d,error_url:null==r?void 0:r.error_url,impression_url:null==r?void 0:r.impression_url}),'\n </vmap:AdSource>\n <vmap:Extensions>\n <vmap:Extension type="bumper" suppress_bumper="true"></vmap:Extension>\n </vmap:Extensions>\n</vmap:AdBreak>\n</vmap:VMAP>').trim()}(this._get_vmap_context({dp:u,adtag:o,position:"preroll"===d.tnl_ad_pos?"preroll":"midroll",config:this._get_vmap_config(i)}));s.adsResponse=l}else if(u&&c.bidFloorApplied){var h=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()}(u);s.adsResponse=h}else if(u&&u.fallback_url){var p=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()}(u);s.adsResponse=p}else s.adTagUrl=o.url;s.linearAdSlotWidth=this.options.width,s.linearAdSlotHeight=this.options.height,s.nonLinearAdSlotWidth=this.options.width,s.nonLinearAdSlotHeight=this.options.height,s.forceNonLinearFullSlot=!0,this.options.vast_load_timeout&&(s.vastLoadTimeout=this.options.vast_load_timeout),s.setAdWillAutoPlay(t.autoplayAllowed),s.setAdWillPlayMuted(t.autoplayRequiresMute),this.adsLoader.requestAds(s,d);try{this.eventBus.broadcast("AD_SDK_REQUEST",{message:d})}catch(e){}r(s)}catch(e){throw new Error(e)}}.bind(this))}},{key:"cancel",value:function(){if(!1!==this.requestRunning){this.requestRunning=!1,this._resetAdsLoader(),this._hide("cancel");var e="AD_SDK_CANCELED";this.eventBus.broadcast(e,{name:e,message:"Advertisement has been canceled.",status:"warning",analytics:{category:this.eventCategory,action:e,label:this.gameId}})}}},{key:"_checkAutoPlay",value:(P=_.default(E.default.mark((function e(){var t=this;return E.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(e,n){var r=this;v.default(this,t);var a=navigator.userAgent.toLowerCase();a.indexOf("safari")>-1&&a.indexOf("chrome")<0?e({autoplayAllowed:!0,autoplayRequiresMute:!0}):T.default.video({inline:!0,muted:!1}).then(function(t){v.default(this,r);var n=t.result;t.error,e(!0===n?{autoplayAllowed:!0,autoplayRequiresMute:!1}:{autoplayAllowed:!0,autoplayRequiresMute:!0})}.bind(this))}.bind(this)));case 1:case"end":return e.stop()}}),e,this)}))),function(){return P.apply(this,arguments)})},{key:"_initDisplayContainerWithAutoPlay",value:(C=_.default(E.default.mark((function e(){var t;return E.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._checkAutoPlay(!1);case 2:return t=e.sent,this._autoplay=t,this.video_ad_player.autoplay=t.autoplayAllowed,this.video_ad_player.volume=t.autoplayRequiresMute?0:1,this.video_ad_player.muted=!!t.autoplayRequiresMute,t.adDisplayContainerInitialized||(this.adDisplayContainer.initialize(),this.adDisplayContainerInitialized=!0),e.abrupt("return",t);case 9:case"end":return e.stop()}}),e,this)}))),function(){return C.apply(this,arguments)})},{key:"startAd",value:(I=_.default(E.default.mark((function e(t){var n,r,a;return E.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=this.gameData.afg_disabled,r=t.adType,a=t.params,r!==d.AdType.Interstitial){e.next=22;break}if(!n){e.next=7;break}return e.abrupt("return",this._startInterstitialAd(a));case 7:if("preroll"!==(null==a?void 0:a.position)||"adsense"!==(null==a?void 0:a.adapter)){e.next=11;break}return e.abrupt("return",this._startAdsensePlacementPreroll(t));case 11:if("start"!==(null==a?void 0:a.position)||"adsense"!==(null==a?void 0:a.adapter)){e.next=15;break}return e.abrupt("return",this._startAdsensePlacementStart(t));case 15:if("next"!==(null==a?void 0:a.position)||"adsense"!==(null==a?void 0:a.adapter)){e.next=19;break}return e.abrupt("return",this._startAdsensePlacementNext(t));case 19:return e.abrupt("return",this._startInterstitialAd(a));case 20:e.next=31;break;case 22:if(r!==d.AdType.Rewarded){e.next=30;break}if(!n){e.next=27;break}return e.abrupt("return",this._startRewardedAd(a));case 27:return e.abrupt("return",this._startAdsensePlacementRewardedAd(t));case 28:e.next=31;break;case 30:throw new Error("Unsupported ad type");case 31:case"end":return e.stop()}}),e,this)}))),function(e){return I.apply(this,arguments)})},{key:"preloadAd",value:(O=_.default(E.default.mark((function e(t){return E.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t!==d.AdType.Interstitial){e.next=4;break}return e.abrupt("return",this._preloadInterstitialAd());case 4:if(t!==d.AdType.Rewarded){e.next=8;break}return e.abrupt("return",this._preloadRewardedAd());case 8:throw new Error("Unsupported ad type");case 9:case"end":return e.stop()}}),e,this)}))),function(e){return O.apply(this,arguments)})},{key:"addAdResume",value:function(){var e=this,t=function(){v.default(this,e),this.adsManager.resume()}.bind(this);try{this.adResume=new Eh(this.adContainer,t),this.adResume.add()}catch(e){console.log("error on adding adResume",e)}}},{key:"loadDisplayAd",value:(y=_.default(E.default.mark((function e(t){var n=this;return E.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(){var e=_.default(E.default.mark((function e(r,a){var i,s,o,u,c,l,h=this;return E.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,(i=t?t.containerId:null)||a("Container id is not specified"),s=document.getElementById(i),document.getElementById(i)||a("No container is found with this id - ".concat(i)),void 0===window.idhb.requestAds&&a("Prebid.js wrapper script hit an error or didn't exist!"),o=t.slotId?t.slotId:"gd__banner@".concat(i),document.getElementById(o)||(u="\n .gd__banner{\n z-index: ".concat(d.Layers.DisplayContainer.zIndex,";\n height: 100%;\n display: flex !important;\n align-items: center;\n justify-content: center;\n }"),document.getElementById("gd__banner__style")||((c=document.createElement("style")).type="text/css",c.id="gd__banner__style",c.styleSheet?c.styleSheet.cssText=u:c.appendChild(document.createTextNode(u)),s.appendChild(c)),(l=document.createElement("div")).id=o,l.classList.add("gd__banner"),s.appendChild(l)),e.next=10,n._create_dp_display_context();case 10:n.atom_display=e.sent,window.idhb.que.push(function(){var e,t,r=this;v.default(this,h),window.idhb.setRefererUrl(encodeURIComponent(n.parentURL)),window.idhb.allowPersonalizedAds(!!parseInt(n.userAllowedPersonalizedAds)),window.idhb.setDefaultGdprConsentString("BOWJjG9OWJjG9CLAAAENBx-AAAAiDAAA"),null!==(e=n.atom_display)&&void 0!==e&&e.params&&window.idhb.setAdserverTargeting(null===(t=n.atom_display)||void 0===t?void 0:t.params);var a={};a[o]={maxSize:[s.offsetWidth,s.offsetHeight]},window.idhb.requestAds({slots:a,callback:function(e){v.default(this,r)}.bind(this)})}.bind(this)),r(),e.next=18;break;case 15:e.prev=15,e.t0=e.catch(0),a(e.t0.message||e.t0);case 18:case"end":return e.stop()}}),e,this,[[0,15]])})));return function(t,n){return e.apply(this,arguments)}}()));case 1:case"end":return e.stop()}}),e)}))),function(e){return y.apply(this,arguments)})},{key:"_startInterstitialAd",value:(g=_.default(E.default.mark((function e(t){var n;return E.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!this.requestRunning){e.next=4;break}return this.eventBus.broadcast("AD_IS_ALREADY_RUNNING",{status:"warning"}),e.abrupt("return");case 4:return this.requestRunning=!0,e.next=7,this._initDisplayContainerWithAutoPlay();case 7:return n=e.sent,e.next=10,this._loadInterstitialAd(Ih(Ih({},n),t));case 10:n.autoplayRequiresMute&&this.adsManager.setVolume(0),this.adsManager.init(this.options.width,this.options.height,google.ima.ViewMode.NORMAL),this.adsManager.start(),e.next=19;break;case 15:throw e.prev=15,e.t0=e.catch(0),this._onError(e.t0),e.t0;case 19:case"end":return e.stop()}}),e,this,[[0,15]])}))),function(e){return g.apply(this,arguments)})},{key:"_loadInterstitialAd",value:(f=_.default(E.default.mark((function e(t){var n,r,a=this;return E.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._resetAdsLoader(),e.prev=1,e.t0=this.preloadedInterstitialAdVast,e.t0){e.next=7;break}return e.next=6,this._getAdVast(d.AdType.Interstitial,t);case 6:e.t0=e.sent;case 7:return n=e.t0,delete this.preloadedInterstitialAdVast,e.next=11,this._requestAd(n,Ih({adType:d.AdType.Interstitial},t));case 11:return r=e.sent,e.next=14,new Promise(function(e,t){var n=this;v.default(this,a);var r="videoad.preloadad";this.eventBus.unsubscribeScope(r);var i=function(t){v.default(this,n),this.eventBus.unsubscribeScope(r),e(t.message)}.bind(this),s=function(e){v.default(this,n),this.eventBus.unsubscribeScope(r),t(e.message)}.bind(this);this.eventBus.subscribe("AD_SDK_MANAGER_READY",i,r),this.eventBus.subscribe("AD_SDK_CANCELED",s,r),this.eventBus.subscribe("AD_ERROR",s,r)}.bind(this));case 14:return e.abrupt("return",r);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 f.apply(this,arguments)})},{key:"_startRewardedAd",value:(p=_.default(E.default.mark((function e(t){var n;return E.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!this.requestRunning){e.next=4;break}return this.eventBus.broadcast("AD_IS_ALREADY_RUNNING",{status:"warning"}),e.abrupt("return");case 4:return this.requestRunning=!0,e.next=7,this._initDisplayContainerWithAutoPlay();case 7:return n=e.sent,e.next=10,this._loadRewardedAd(Ih(Ih({},n),t));case 10:n.autoplayRequiresMute&&this.adsManager.setVolume(0),this.adsManager.init(this.options.width,this.options.height,google.ima.ViewMode.NORMAL),this.adsManager.start(),e.next=19;break;case 15:throw e.prev=15,e.t0=e.catch(0),this._onError(e.t0),e.t0;case 19:case"end":return e.stop()}}),e,this,[[0,15]])}))),function(e){return p.apply(this,arguments)})},{key:"_loadRewardedAd",value:(h=_.default(E.default.mark((function e(t){var n,r,a=this;return E.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._resetAdsLoader(),e.prev=1,e.t0=this.preloadedRewardedAdVast,e.t0){e.next=7;break}return e.next=6,this._getAdVast(d.AdType.Rewarded,t);case 6:e.t0=e.sent;case 7:return n=e.t0,delete this.preloadedRewardedAdVast,e.next=11,this._requestAd(n,Ih({adType:d.AdType.Rewarded},t));case 11:return r=e.sent,e.next=14,new Promise(function(e,t){var n=this;v.default(this,a);var r="videoad.preloadad";this.eventBus.unsubscribeScope(r);var i=function(t){v.default(this,n),this.eventBus.unsubscribeScope(r),e(t.message)}.bind(this),s=function(e){v.default(this,n),this.eventBus.unsubscribeScope(r),t(e.message)}.bind(this);this.eventBus.subscribe("AD_SDK_MANAGER_READY",i,r),this.eventBus.subscribe("AD_SDK_CANCELED",s,r),this.eventBus.subscribe("AD_ERROR",s,r)}.bind(this));case 14:return e.abrupt("return",r);case 17:throw e.prev=17,e.t1=e.catch(1),new Error(e.t1);case 20:case"end":return e.stop()}}),e,this,[[1,17]])}))),function(e){return h.apply(this,arguments)})},{key:"_preloadInterstitialAd",value:(c=_.default(E.default.mark((function e(){return E.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this._getAdVast(d.AdType.Interstitial);case 3:return this.preloadedInterstitialAdVast=e.sent,e.abrupt("return",this.preloadedInterstitialAdVast.url);case 7:throw e.prev=7,e.t0=e.catch(0),new Error(e.t0);case 10:case"end":return e.stop()}}),e,this,[[0,7]])}))),function(){return c.apply(this,arguments)})},{key:"_preloadRewardedAd",value:(u=_.default(E.default.mark((function e(){return E.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this._getAdVast(d.AdType.Rewarded);case 3:return this.preloadedRewardedAdVast=e.sent,e.abrupt("return",this.preloadedRewardedAdVast.url);case 7:throw e.prev=7,e.t0=e.catch(0),new Error(e.t0);case 10:case"end":return e.stop()}}),e,this,[[0,7]])}))),function(){return u.apply(this,arguments)})},{key:"_onError",value:function(e){this.cancel(),this._clearSafetyTimer("ERROR")}},{key:"_hide",value:function(e){this.video_ad_player.src="",this.activeAdContainer&&(this.activeAdContainer.style.visibility="hidden")}},{key:"_show",value:function(e){var t=this;if(this.activeAdContainer){this.activeAdContainer.style.visibility="visible";var n=null==e?void 0:e.mode,r=this._isT4R(e),a=this._getT4ROptions();"loaded"===n?(this.activeAdContainer.style.opacity=r?.001:1,r&&this.eventBus.broadcast("AD_T4R"),r&&setTimeout(function(){v.default(this,t),this.activeAdContainer.style.opacity=1}.bind(this),((null==a?void 0:a.min)||1234)+Math.random()*((null==a?void 0:a.max)||3210))):"click"!==n&&"first_quartile"!==n||(this.activeAdContainer.style.opacity=1)}}},{key:"_createPlayer",value:function(){var e=this,t=document.body||document.getElementsByTagName("body")[0];this.adContainer=document.createElement("div"),this.adContainer.id="".concat(this.prefix,"advertisement"),this.adContainer.style.position=this.thirdPartyContainer?"absolute":"fixed",this.adContainer.style.zIndex=d.Layers.AdsContainer.zIndex,this.adContainer.style.top="0",this.adContainer.style.left="0",this.adContainer.style.width="100%",this.adContainer.style.height="100%",this.thirdPartyContainer&&(this.thirdPartyContainer.style.transform=null);var n=document.createElement("video");n.setAttribute("playsinline",!0),n.setAttribute("webkit-playsinline",!0),n.id="".concat(this.prefix,"advertisement_video"),n.style.position="absolute",n.style.backgroundColor="#000000",n.style.top="0",n.style.left="0",n.style.width=this.options.width+"px",n.style.height=this.options.height+"px",this.video_ad_player=n,this.adContainer.appendChild(n);var r=document.createElement("div");r.id="".concat(this.prefix,"advertisement_slot"),r.style.position="absolute",r.style.top="0",r.style.left="0",r.style.width=this.options.width+"px",r.style.height=this.options.height+"px",this.adContainerInner=r,this.activeAdContainer=this.adContainer,this.thirdPartyContainer?(this.adContainer.appendChild(r),this.thirdPartyContainer.appendChild(this.adContainer),this.activeAdContainer=this.thirdPartyContainer):(this.adContainer.appendChild(r),t.appendChild(this.adContainer)),this.addAdResume(),this.activeAdContainer.style.visibility="hidden";var a=function(){v.default(this,e);var t=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,a=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;this.options.width=this.thirdPartyContainer?this.thirdPartyContainer.offsetWidth:t,this.options.height=this.thirdPartyContainer?this.thirdPartyContainer.offsetHeight:a,r.style.width=this.options.width+"px",r.style.height=this.options.height+"px",n.style.width=this.options.width+"px",n.style.height=this.options.height+"px"}.bind(this);window.addEventListener("resize",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 t=this,n=new google.ima.AdsRenderingSettings;n.autoAlign=!1,n.enablePreloading=!1,n.restoreCustomPlaybackStateOnAdBreakComplete=!0,n.useStyledNonLinearAds=!0,n.uiElements=[google.ima.UiElements.AD_ATTRIBUTION,google.ima.UiElements.COUNTDOWN],this.adsManager=e.getAdsManager(this.video_ad_player,n),this.adsManager.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,this._onAdError.bind(this),!1,this),this.adsManager.addEventListener(google.ima.AdEvent.Type.AD_BREAK_READY,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.AD_METADATA,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.ALL_ADS_COMPLETED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.CLICK,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.COMPLETE,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.DURATION_CHANGE,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.FIRST_QUARTILE,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.IMPRESSION,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.INTERACTION,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.LINEAR_CHANGED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.LOADED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.LOG,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.MIDPOINT,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.PAUSED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.RESUMED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.SKIPPED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.STARTED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.THIRD_QUARTILE,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.USER_CLOSE,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.VOLUME_CHANGED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.VOLUME_MUTED,this._onAdEvent.bind(this),this),window.addEventListener("resize",function(){v.default(this,t),this.adsManager&&this.adsManager.resize(this.options.width,this.options.height,google.ima.ViewMode.NORMAL)}.bind(this)),this.adDisplayContainerInitialized||(this.adDisplayContainer.initialize(),this.adDisplayContainerInitialized=!0);var r=new Date,a=r.getHours(),i=r.getDate(),s=r.getMonth(),o=r.getFullYear(),d="AD_SDK_MANAGER_READY";this.eventBus.broadcast(d,{name:d,message:"AD SDK is ready",status:"success",analytics:{category:d,action:this.parentDomain,label:"h".concat(a," d").concat(i," m").concat(s," y").concat(o)}}),this._adrequest_user_context=e.getUserRequestContext()}},{key:"_onAdEvent",value:function(e){var t=new Date,n=t.getHours(),r=t.getDate(),a=t.getMonth(),i=t.getFullYear(),s=d.getKeyByValue(google.ima.AdEvent.Type,e.type),o=!1,u=e.getAd().getContentType()||"",c=!u.startsWith("image")&&!u.startsWith("text");this._sendIMAEventsToHB(e);var l="";switch(e.type){case google.ima.AdEvent.Type.AD_BREAK_READY:l="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:l="Fired when an ads list is loaded.";break;case google.ima.AdEvent.Type.ALL_ADS_COMPLETED:o=!0,l="Fired when the ads manager is done playing all the ads.";break;case google.ima.AdEvent.Type.CLICK:l="Fired when the ad is clicked.";var h=e.getAd().getContentType();this._show({mode:"click",contentType:h});break;case google.ima.AdEvent.Type.COMPLETE:o=this._is_completed(e.getAd()),l="Fired when the ad completes playing.";break;case google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED:l="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:l="Fired when content should be resumed. This usually happens when an ad finishes or collapses.",o=!0;break;case google.ima.AdEvent.Type.DURATION_CHANGE:l="Fired when the ad's duration changes.";break;case google.ima.AdEvent.Type.FIRST_QUARTILE:l="Fired when the ad playhead crosses first quartile.";var p=e.getAd().getContentType();this._show({mode:"first_quartile",contentType:p});break;case google.ima.AdEvent.Type.IMPRESSION:l="Fired when the impression URL has been pinged.";break;case google.ima.AdEvent.Type.INTERACTION:l="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:l="Fired when the displayed ad changes from linear to nonlinear, or vice versa.";break;case google.ima.AdEvent.Type.LOADED:var f=e.getAd().getContentType();l=f,this._show({mode:"loaded",contentType:f});break;case google.ima.AdEvent.Type.LOG:e.getAdData().adError&&(l=e.getAdData());break;case google.ima.AdEvent.Type.MIDPOINT:l="Fired when the ad playhead crosses midpoint.";break;case google.ima.AdEvent.Type.PAUSED:c&&this.adResume.show(),l="Fired when the ad is paused.";break;case google.ima.AdEvent.Type.RESUMED:l="Fired when the ad is resumed.",c&&this.adResume.hide();break;case google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED:l="Fired when the displayed ads skippable state is changed.";break;case google.ima.AdEvent.Type.SKIPPED:o=this._is_completed(e.getAd()),l="Fired when the ad is skipped by the user.";break;case google.ima.AdEvent.Type.STARTED:l="Fired when the ad starts playing.";break;case google.ima.AdEvent.Type.THIRD_QUARTILE:l="Fired when the ad playhead crosses third quartile.";break;case google.ima.AdEvent.Type.USER_CLOSE:o=this._is_completed(e.getAd()),l="Fired when the ad is closed by the user.";break;case google.ima.AdEvent.Type.VOLUME_CHANGED:l="Fired when the ad volume has changed.";break;case google.ima.AdEvent.Type.VOLUME_MUTED:l="Fired when the ad volume has been muted."}""!==s&&""!==l&&this.eventBus.broadcast(s,{name:s,message:l,status:"success",analytics:{category:s,action:this.parentDomain,label:"h".concat(n," d").concat(r," m").concat(a," y").concat(i)}}),o&&!this.adSuccess&&(this.adSuccess=!0,this.eventBus.broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success"}),this.resetForNext(e))}},{key:"_onAdError",value:function(e){this.requestRunning=!1,this._resetAdsLoader(),this._clearSafetyTimer("ERROR"),this._hide("_onAdError"),this._sendIMAEventsToHB(e);try{var t="AD_ERROR",n=e.getError(),r=n.getErrorCode().toString()||n.getVastErrorCode().toString(),a=this._getInnerErrorCode(n);this.eventBus.broadcast(t,{message:r,details:a,status:"warning",analytics:{category:t,action:a,label:r}})}catch(e){}}},{key:"_sendIMAEventsToHB",value:function(e){if(window.idhb&&"function"==typeof window.idhb.onImaEvent)try{window.idhb.onImaEvent(e)}catch(e){}}},{key:"_resetAdsLoader",value:function(){this.adsManager&&(this.adsManager.destroy(),this.adsManager=null,this._adrequest_user_context=null),this.adsLoader&&this.adsLoader.contentComplete()}},{key:"_startSafetyTimer",value:function(e,t){var n=this;this.safetyTimer&&clearTimeout(this.safetyTimer),this.safetyTimer=window.setTimeout(function(){v.default(this,n),this.cancel(),this._clearSafetyTimer(t)}.bind(this),e)}},{key:"_clearSafetyTimer",value:function(e){void 0!==this.safetyTimer&&null!==this.safetyTimer&&(clearTimeout(this.safetyTimer),this.safetyTimer=void 0)}},{key:"_getVPAIDMode",value:function(){return google.ima.ImaSdkSettings.VpaidMode.ENABLED}},{key:"_getPrebidScripts",value:function(){var e=["https://hb.improvedigital.com/pbw/gameDistributionV1.3.min.js","http://hb.improvedigital.com/pbw/gameDistributionV1.3.min.js"];return this.options.hb_script?[this.options.hb_script].concat(e):e}},{key:"_getInnerErrorCode",value:function(e){if(kh(e.getInnerError)){var t=e.getInnerError();if(t)return kh(t.getErrorCode)&&kh(t.getVastErrorCode)?t.getErrorCode().toString()||t.getVastErrorCode().toString():t.message}}},{key:"resetForNext",value:function(){this.requestRunning=!1,this._hide("resetForNext")}},{key:"_createCustomAdVastUrl",value:function(e,t){var n=this;if(e){var r=this.macros.transform(e,{get:function(e){if(v.default(this,n),t&&t.tnl_keys)return t.tnl_keys[e.toLowerCase()]}.bind(this)});for(var a in r.query||{}){var i=r.query[a];l.isPlainObject(i)&&(r.query[a]=D.default.stringify(i))}var s=new S.default(r.url,!0);return R.default(s.query,r.query||{}),Ih({url:s.toString()},t)}}},{key:"_transformVast",value:function(e,t){var n={url:e.url};try{var r=new S.default(e.url,!0),a=this._transformQuery(e,t,r);a&&(n.url=r.toString());var i=a?r:new S.default(e.url,!0);if(i.query.cust_params){var s=D.default.parse(i.query.cust_params);n.bidder=s.hb_bidder,n.cust_params=s}n.url_parsed=i}catch(e){n.hasError=!0,n.message=e.message,n.bidder="error",console.log(e.message)}return n}},{key:"_transformQuery",value:function(e,t,n){var r=this;if(e&&t&&e.tnl_keys){var a=this.options.vast_query;if(t.retry_on_success&&this.options.retry_on_success&&l.isPlainObject(this.options.retry_on_success.vast_query)?a=this.options.retry_on_success.vast_query:t.retry_on_failure&&this.options.retry_on_failure&&l.isPlainObject(this.options.retry_on_failure.vast_query)&&(a=this.options.retry_on_failure.vast_query),a=x.default(a),l.isPlainObject(a)){var i=n.query;if(a.$$remove){for(var s in i){new RegExp(a.$$remove,"i").test(s)&&delete i[s]}delete a.$$remove}var o=D.default.parse(i.cust_params);if(a.cust_params&&a.cust_params.$$remove){for(var d in o){new RegExp(a.cust_params.$$remove,"i").test(d)&&delete o[d]}delete a.cust_params.$$remove}var u=this.macros.transform(a,{get:function(t){return v.default(this,r),e.tnl_keys[t.toLowerCase()]}.bind(this)});return i.cust_params=o,R.default(i,u),i.cust_params=D.default.stringify(i.cust_params),!0}}}},{key:"_isT4R",value:function(e){var t,n,r,a,i,s,o,d,u,c,l,h=null===(t=this._adrequest_user_context)||void 0===t?void 0:t.tnl_ad_pos;return h&&((null==e||null===(n=e.contentType)||void 0===n?void 0:n.startsWith("image/"))||"text"===(null==e?void 0:e.contentType))&&("preroll"===h&&(null===(r=this.gameData)||void 0===r||null===(a=r.pAds)||void 0===a||null===(i=a.t4r)||void 0===i?void 0:i.enabled)||"midroll"===h&&(null===(s=this.gameData)||void 0===s||null===(o=s.mAds)||void 0===o||null===(d=o.t4r)||void 0===d?void 0:d.enabled)||"rewarded"===h&&(null===(u=this.gameData)||void 0===u||null===(c=u.rAds)||void 0===c||null===(l=c.t4r)||void 0===l?void 0:l.enabled))}},{key:"_isVMAP",value:function(e){var t,n,r,a,i,s,o,d,u,c,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===(a=r.pAds)||void 0===a||null===(i=a.vmap)||void 0===i?void 0:i.enabled))||"midroll"===e&&(!0===(null===(s=this.gameData)||void 0===s||null===(o=s.mAds)||void 0===o?void 0:o.vmap)||!0===(null===(d=this.gameData)||void 0===d||null===(u=d.mAds)||void 0===u||null===(c=u.vmap)||void 0===c?void 0:c.enabled))||"rewarded"===e&&(!0===(null===(l=this.gameData)||void 0===l||null===(h=l.rAds)||void 0===h?void 0:h.vmap)||!0===(null===(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),y=this.adCounter[e];return void 0!==(null==v?void 0:v.start)?y>=(null==v?void 0:v.start):g}},{key:"_getT4ROptions",value:function(){var e,t,n,r,a,i,s;switch(null===(e=this._adrequest_user_context)||void 0===e?void 0:e.tnl_ad_pos){case"preroll":return null===(t=this.gameData)||void 0===t||null===(n=t.pAds)||void 0===n?void 0:n.t4r;case"midroll":return null===(r=this.gameData)||void 0===r||null===(a=r.mAds)||void 0===a?void 0:a.t4r;case"rewarded":return null===(i=this.gameData)||void 0===i||null===(s=i.rAds)||void 0===s?void 0:s.t4r}}},{key:"_is_completed",value:function(e){var t=e.getContentType(),n=e.getAdPodInfo();return!(!t.startsWith("image/")&&"text"!==t&&1!==n.getTotalAds())}},{key:"_get_vmap_context",value:function(e){var t=e.adtag,n=e.position,r=e.config,a=e.dp,i=this._createCustomAdVastUrl(null==r?void 0:r.vast_1)||t,s=this._createCustomAdVastUrl(null==r?void 0:r.vast_2)||t,o=null!=r&&r.vast_1?void 0:a,d=null!=r&&r.vast_2?void 0:a;return{adtag_url_1:null==i?void 0:i.url,adtag_url_2:null==s?void 0:s.url,position:n,dp_1:o,dp_2:d}}},{key:"_get_vmap_config",value:function(e){var t,n,r,a,i,s,o,d;switch(e){case"preroll":return null===(t=this.gameData)||void 0===t||null===(n=t.pAds)||void 0===n?void 0:n.vmap;case"midroll":return null===(r=this.gameData)||void 0===r||null===(a=r.mAds)||void 0===a?void 0:a.vmap;case"rewarded":return null===(i=this.gameData)||void 0===i||null===(s=i.rAds)||void 0===s?void 0:s.vmap;default:return null===(o=this.gameData)||void 0===o||null===(d=o.pAds)||void 0===d?void 0:d.vmap}}},{key:"_isDP",value:function(e){var t,n,r,a,i,s,o,d,u,c,l,h,p,f,m;return!!e&&("preroll"===e&&(!0===(null===(t=this.gameData)||void 0===t||null===(n=t.pAds)||void 0===n?void 0:n.dp)||!0===(null===(r=this.gameData)||void 0===r||null===(a=r.pAds)||void 0===a||null===(i=a.dp)||void 0===i?void 0:i.enabled))||"midroll"===e&&(!0===(null===(s=this.gameData)||void 0===s||null===(o=s.mAds)||void 0===o?void 0:o.dp)||!0===(null===(d=this.gameData)||void 0===d||null===(u=d.mAds)||void 0===u||null===(c=u.dp)||void 0===c?void 0:c.enabled))||"rewarded"===e&&(!0===(null===(l=this.gameData)||void 0===l||null===(h=l.rAds)||void 0===h?void 0:h.dp)||!0===(null===(p=this.gameData)||void 0===p||null===(f=p.rAds)||void 0===f||null===(m=f.dp)||void 0===m?void 0:m.enabled)))}},{key:"_create_dp_display_context",value:function(){var e=this;return new Promise(function(t){var n=this;v.default(this,e);try{var r={id:this.topDomain||this.parentDomain,au:"display",ty:"display",aid:this.gameData.gameId,pgu:this.parentURL},a=new wh(this.gameData).checkCustomParams();a&&(r.cp=a);var i=encodeURIComponent(m.Base64.encode(JSON.stringify(r)));fetch("https://tag.atom.gamedistribution.com/v1/atm?ar=".concat(i)).then(function(e){return v.default(this,n),e.json()}.bind(this)).then(function(e){if(v.default(this,n),!e||!e.p)return this.msgrt.send("dp.na",{message:"atom"}),t();this.msgrt.send("dp.fp",{message:e.p/100}),t({params:{fp:e.p/100},error_url:"https://tag.atom.gamedistribution.com/v1/err?ar=".concat(i),impression_url:"https://tag.atom.gamedistribution.com/v1/imp?ar=".concat(i)})}.bind(this)).catch(function(e){v.default(this,n),this.msgrt.send("dp.err",{message:(null==e?void 0:e.message)||e}),t()}.bind(this))}catch(e){this.msgrt.send("dp.err",{message:(null==e?void 0:e.message)||e}),t()}}.bind(this))}},{key:"_create_dp_context",value:function(e,t){var n=this;return new Promise(function(){var r=_.default(E.default.mark((function r(a){var i,s,o,d,u,c,l=this;return E.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(r.prev=0,n._isDP(e)){r.next=5;break}return n.msgrt.send("dp.na",{message:"rule"}),r.abrupt("return",a());case 5:s={id:n.topDomain||n.parentDomain,au:e||"unknown",ty:"video",aid:n.gameData.gameId,pgu:n.parentURL},(o=new wh(n.gameData).checkCustomParams())&&(s.cp=o),d=encodeURIComponent(m.Base64.encode(JSON.stringify(s))),u=null===(i=n.gameData.promo)||void 0===i?void 0:i.rainbow,c=(null==u?void 0:u.enabled)&&!0!==(null==t?void 0:t.fallback_adsense),fetch("https://tag.atom.gamedistribution.com/v1/atm?ar=".concat(d)).then(function(e){return v.default(this,l),e.json()}.bind(this)).then(function(e){if(v.default(this,l),!e||!e.p)return n.msgrt.send("dp.na",{message:"atom"}),a();var t=e.p/100;a({id:Date.now(),floor_price:t,error_url:"https://tag.atom.gamedistribution.com/v1/err?ar=".concat(d,"&ec=[ERRORCODE]"),impression_url:"https://tag.atom.gamedistribution.com/v1/imp?ar=".concat(d),skip_url:"https://tag.atom.gamedistribution.com/v1/skp?ar=".concat(d),promo_url:c?"https://tag.atom.gamedistribution.com/v1/rainbow?ar=".concat(d):void 0,promo_imp_blue_url:c?"https://tag.atom.gamedistribution.com/v1/rainbow/blue":void 0,promo_imp_green_url:c?"https://tag.atom.gamedistribution.com/v1/rainbow/green":void 0})}.bind(this)).catch(function(e){v.default(this,l),n.msgrt.send("dp.err",{message:(null==e?void 0:e.message)||e}),a()}.bind(this)),r.next=18;break;case 14:r.prev=14,r.t0=r.catch(0),n.msgrt.send("dp.err",{message:(null===r.t0||void 0===r.t0?void 0:r.t0.message)||r.t0}),a();case 18:case"end":return r.stop()}}),r,this,[[0,14]])})));return function(e){return r.apply(this,arguments)}}())}},{key:"_extend_dp_with_adsense",value:function(e,t,n){if(e&&t&&n)try{var r,a=new S.default(t.vastUrl,!0);if(null===(r=a.query)||void 0===r||!r.cust_params)return;if(!D.default.parse(a.query.cust_params).tnl_asset_id)return;n.bidFloor,n.isDfpBidding;var i=k.default(n,Rh);a.query.cust_params=D.default.stringify(Ih(Ih({},i),{},{adsense:1}),!1),e.fallback_url=a.toString(),e.fallback_imp_url="https://tag.atom.gamedistribution.com/v1/rainbow/green"}catch(e){}}},{key:"_init_hl_script",value:(o=_.default(E.default.mark((function e(t){var n,r,a=this;return E.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this._getPrebidScripts(),r=n[0],window.HB_OPTIONSgd={gameId:this.gameId},e.next=5,d.getScript(r,"gdsdk_prebid",{alternates:n,error_prefix:"Blocked:",exists:function(){return v.default(this,a),window.idhb}.bind(this)});case 5:window.idhb=window.idhb||{},window.idhb.que=window.idhb.que||[],window.idhb.que.push(function(){var e=this;v.default(this,a),window.idhb.addEventListener("slotRenderEnded",function(t){var n=this;v.default(this,e);try{var r,a=t.slotId.split("@");a=1===a.length?a[0]:a[1],t.isEmpty?(null!==(r=this.atom_display)&&void 0!==r&&r.error_url&&(fetch(this.atom_display.error_url).catch(function(e){v.default(this,n)}.bind(this)),delete this.atom_display),this.eventBus.broadcast("DISPLAYAD_ERROR",{message:a,status:"warning"})):(this.atom_display.impression_url&&(fetch(this.atom_display.impression_url).catch(function(e){v.default(this,n)}.bind(this)),delete this.atom_display),this.eventBus.broadcast("DISPLAYAD_IMPRESSION",{message:a,status:"success"}))}catch(e){}}.bind(this))}.bind(this));case 8:case"end":return e.stop()}}),e,this)}))),function(e){return o.apply(this,arguments)})},{key:"_init_ima_script",value:(s=_.default(E.default.mark((function e(t){var n,r,a=this;return E.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=["https://imasdk.googleapis.com/js/sdkloader/ima3_debug.js","https://imasdk.googleapis.com/js/sdkloader/ima3.js","http://imasdk.googleapis.com/js/sdkloader/ima3_debug.js","http://imasdk.googleapis.com/js/sdkloader/ima3.js"],r=this.options.debug?n[0]:n[1],e.next=4,d.getScript(r,"gdsdk_ima",{alternates:n,error_prefix:"Blocked:",exists:function(){return v.default(this,a),window.google&&window.google.ima}.bind(this)});case 4:case"end":return e.stop()}}),e,this)}))),function(e){return s.apply(this,arguments)})},{key:"_init_afg_script",value:(i=_.default(E.default.mark((function e(t){var n,r,a,i,s=this;return E.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.gameData.afg_disabled){e.next=3;break}return e.abrupt("return");case 3:return(i={}).crossorigin="anonymous",i["data-ad-client"]=(null==t||null===(n=t.adsense_client)||void 0===n?void 0:n.length)>0?t.adsense_client:"ca-pub-2316275586951220",i["data-ad-frequency-hint"]="30s",(null==t||null===(r=t.adsense_channel)||void 0===r?void 0:r.length)>0&&(i["data-ad-channel"]=t.adsense_channel),(null==t||null===(a=t.adsense_host)||void 0===a?void 0:a.length)>0&&(i["data-ad-host"]=t.adsense_host),!0===(null==t?void 0:t.adsense_adbreak_test)&&(i["data-adbreak-test"]="on"),e.next=13,d.getScript("https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js","afg",{error_prefix:"Blocked:",exists:function(){return v.default(this,s),!!window.adsbygoogle}.bind(this),attrs:i});case 13:window.adsbygoogle=window.adsbygoogle||[],window.adsbygoogle.push({sound:"on",preloadAdBreaks:"on"});case 15:case"end":return e.stop()}}),e,this)}))),function(e){return i.apply(this,arguments)})},{key:"_startAdsensePlacementRewardedAd",value:(a=_.default(E.default.mark((function e(t){var n,r,a,i,s,o,d=this;return E.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=1,!this.requestRunning){e.next=5;break}return this.eventBus.broadcast("AD_IS_ALREADY_RUNNING",{status:"warning"}),e.abrupt("return");case 5:this.requestRunning=!0,this._send_atom_event("sg.ad.rw.requested"),n=function(){v.default(this,d),this.eventBus.broadcast("CONTENT_PAUSE_REQUESTED",{message:"",status:"success"}),this.eventBus.broadcast("IMPRESSION",{message:"",status:"success"})}.bind(this),r=function(){v.default(this,d),this.eventBus.broadcast("CONTENT_RESUME_REQUESTED",{message:"",status:"success"})}.bind(this),a=function(){v.default(this,d),this._send_atom_event("sg.ad.rw.dismissed")}.bind(this),i=function(){v.default(this,d),this.eventBus.broadcast("COMPLETE",{message:"",status:"success"}),this._send_atom_event("sg.ad.rw.viewed")}.bind(this),s=function(e){v.default(this,d),e()}.bind(this),o=function(e){v.default(this,d),this.resetForNext(),this.adCounter.rewarded=this.adCounter.rewarded||0,this.adCounter.rewarded++,"viewed"===e.breakStatus?this.eventBus.broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success"}):(this.eventBus.broadcast("AD_ERROR",{message:e.breakStatus,status:"error"}),"dismissed"!==e.breakStatus&&this._send_atom_event("sg.dbg.rw",e))}.bind(this),t={type:"reward",name:"reward-in-game",beforeAd:n,afterAd:r,adDismissed:a,adViewed:i,beforeReward:s,adBreakDone:o},window.adsbygoogle.push(t),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 t}),e,this,[[1,17]])}))),function(e){return a.apply(this,arguments)})},{key:"_startAdsensePlacementPreroll",value:(r=_.default(E.default.mark((function e(t){var n,r=this;return E.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=1,!this.requestRunning){e.next=5;break}return this.eventBus.broadcast("AD_IS_ALREADY_RUNNING",{status:"warning"}),e.abrupt("return");case 5:this.requestRunning=!0,this._send_atom_event("sg.ad.pr.requested"),n=function(e){v.default(this,r),this.resetForNext(),this.adCounter.preroll=this.adCounter.preroll||0,this.adCounter.preroll++,"viewed"===e.breakStatus?(this._send_atom_event("sg.ad.pr.viewed"),this.eventBus.broadcast("CONTENT_PAUSE_REQUESTED",{message:"",status:"success"}),this.eventBus.broadcast("IMPRESSION",{message:"",status:"success"}),this.eventBus.broadcast("COMPLETE",{message:"",status:"success"}),this.eventBus.broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success"}),this.eventBus.broadcast("CONTENT_RESUME_REQUESTED",{message:"",status:"success"})):(this.eventBus.broadcast("AD_ERROR",{message:e.breakStatus,status:"error"}),this._send_atom_event("sg.dbg.pr",e))}.bind(this),t={type:"preroll",adBreakDone:n},window.adsbygoogle.push(t),e.next=16;break;case 12:throw e.prev=12,e.t0=e.catch(1),this._onError(e.t0),e.t0;case 16:case"end":return e.stop()}var t}),e,this,[[1,12]])}))),function(e){return r.apply(this,arguments)})},{key:"_startAdsensePlacementStart",value:(n=_.default(E.default.mark((function e(t){var n,r,a,i=this;return E.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=1,!this.requestRunning){e.next=5;break}return this.eventBus.broadcast("AD_IS_ALREADY_RUNNING",{status:"warning"}),e.abrupt("return");case 5:this.requestRunning=!0,this._send_atom_event("sg.ad.pr.requested"),n=function(){v.default(this,i),this.eventBus.broadcast("CONTENT_PAUSE_REQUESTED",{message:"",status:"success"}),this.eventBus.broadcast("IMPRESSION",{message:"",status:"success"})}.bind(this),r=function(){v.default(this,i),this.eventBus.broadcast("CONTENT_RESUME_REQUESTED",{message:"",status:"success"})}.bind(this),a=function(e){v.default(this,i),this.resetForNext(),this.adCounter.preroll=this.adCounter.preroll||0,this.adCounter.preroll++,"viewed"===e.breakStatus?(this._send_atom_event("sg.ad.pr.viewed"),this.eventBus.broadcast("COMPLETE",{message:"",status:"success"}),this.eventBus.broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success"})):(this.eventBus.broadcast("AD_ERROR",{message:e.breakStatus,status:"error"}),this._send_atom_event("sg.dbg.pr",e))}.bind(this),t={type:"start",name:"start-in-game",beforeAd:n,afterAd:r,adBreakDone:a},window.adsbygoogle.push(t),e.next=18;break;case 14:throw e.prev=14,e.t0=e.catch(1),this._onError(e.t0),e.t0;case 18:case"end":return e.stop()}var t}),e,this,[[1,14]])}))),function(e){return n.apply(this,arguments)})},{key:"_startAdsensePlacementNext",value:(t=_.default(E.default.mark((function e(t){var n,r,a,i=this;return E.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=1,!this.requestRunning){e.next=5;break}return this.eventBus.broadcast("AD_IS_ALREADY_RUNNING",{status:"warning"}),e.abrupt("return");case 5:this.requestRunning=!0,this._send_atom_event("sg.ad.mr.requested"),n=function(){v.default(this,i),this.eventBus.broadcast("CONTENT_PAUSE_REQUESTED",{message:"",status:"success"}),this.eventBus.broadcast("IMPRESSION",{message:"",status:"success"})}.bind(this),r=function(){v.default(this,i),this.eventBus.broadcast("CONTENT_RESUME_REQUESTED",{message:"",status:"success"})}.bind(this),a=function(e){v.default(this,i),this.resetForNext(),this.adCounter.midroll=this.adCounter.midroll||0,this.adCounter.midroll++,"viewed"===e.breakStatus?(this._send_atom_event("sg.ad.mr.viewed"),this.eventBus.broadcast("COMPLETE",{message:"",status:"success"}),this.eventBus.broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success"})):(this.eventBus.broadcast("AD_ERROR",{message:e.breakStatus,status:"error"}),this._send_atom_event("sg.dbg.mr",e))}.bind(this),t={type:"next",name:"next-in-game",beforeAd:n,afterAd:r,adBreakDone:a},window.adsbygoogle.push(t),e.next=18;break;case 14:throw e.prev=14,e.t0=e.catch(1),this._onError(e.t0),e.t0;case 18:case"end":return e.stop()}var t}),e,this,[[1,14]])}))),function(e){return t.apply(this,arguments)})},{key:"_send",value:function(e,t){try{var n=this.msgrt,r=n._layout,a=n._ua,i={tp:e,ct:0,vrs:this.PackageJSON.version,url:this.parentURL,rfr:document.referrer,tdmn:this.topDomain||this.parentDomain,dpth:0,args:t,ua:{brnm:a.browser.name,brvs:a.browser.version,osnm:a.os.name,osvs:a.os.version,dvmd:a.device.model,w:r.w,h:r.h}};fetch("https://tag.atom.gamedistribution.com/v1/dmp?ar=".concat(encodeURIComponent(m.Base64.encode(JSON.stringify(i)))))}catch(e){}}},{key:"_send_atom_event",value:function(e,t){this._send(e,{gid:this.gameData.slug,md5:this.gameData.gameId,pid:0,pnm:this.gameData.pname,ctry:this.gameData.ctry,lcl:"en",hle:1,ads:1,args:t})}},{key:"_isAfgPositionNext",value:function(e){return void 0!==e.adTimestamp}},{key:"_isAfgPositionStart",value:function(e){if(void 0!==e.adTimestamp)return!1;return this.adCounter.preroll=this.adCounter.preroll||0,0===this.adCounter.preroll}},{key:"attachAfgPosition",value:function(e){var t=e.params.position;switch(t){case"preroll":case"start":case"pause":case"next":case"browse":case"reward":return}var n=e.adType;n===d.AdType.Rewarded?t="reward":n===d.AdType.Interstitial&&(this._isAfgPositionStart(e)?t="start":this._isAfgPositionNext(e)&&(t="next")),e.params.position=t}}]),e}(),Lh=Array.isArray,Uh=Object.prototype.toString,jh=Lh||function(e){return!!e&&"[object Array]"==Uh.call(e)},Mh=_n,Bh=Y,Nh=Ln,qh=Lt,Gh=Ot,Fh=Q,Vh=Rr,Kh=nr,Wh=yr("slice"),zh=Kh("species"),Hh=[].slice,$h=Math.max;Mh({target:"Array",proto:!0,forced:!Wh},{slice:function(e,t){var n,r,a,i=Fh(this),s=Gh(i.length),o=qh(e,s),d=qh(void 0===t?s:t,s);if(Nh(i)&&("function"!=typeof(n=i.constructor)||n!==Array&&!Nh(n.prototype)?Bh(n)&&null===(n=n[zh])&&(n=void 0):n=void 0,n===Array||void 0===n))return Hh.call(i,o,d);for(r=new(void 0===n?Array:n)($h(d-o,0)),a=0;o<d;o++,a++)o in i&&Vh(r,a,i[o]);return r.length=a,r}});var Qh=ve,Yh=pa,Jh=Cn,Xh=wn,Zh=function(e,t,n,r){try{return r?t(Qh(n)[0],n[1]):t(n)}catch(t){throw Yh(e),t}},ep=oa,tp=Ot,np=Rr,rp=la,ap=function(e){var t,n,r,a,i,s,o=Xh(e),d="function"==typeof this?this:Array,u=arguments.length,c=u>1?arguments[1]:void 0,l=void 0!==c,h=rp(o),p=0;if(l&&(c=Jh(c,u>2?arguments[2]:void 0,2)),null==h||d==Array&&ep(h))for(n=new d(t=tp(o.length));t>p;p++)s=l?c(o[p],p):o[p],np(n,p,s);else for(i=(a=h.call(o)).next,n=new d;!(r=i.call(a)).done;p++)s=l?Zh(a,c,[r.value,p],!0):r.value,np(n,p,s);return n.length=p,n};_n({target:"Array",stat:!0,forced:!Da((function(e){Array.from(e)}))},{from:ap});var ip,sp,op,dp=!L((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),up=ee,cp=wn,lp=dp,hp=Qe("IE_PROTO"),pp=Object.prototype,fp=lp?Object.getPrototypeOf:function(e){return e=cp(e),up(e,hp)?e[hp]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?pp:null},mp=L,gp=fp,vp=Se,yp=ee,bp=nr("iterator"),_p=!1;[].keys&&("next"in(op=[].keys())?(sp=gp(gp(op)))!==Object.prototype&&(ip=sp):_p=!0),(null==ip||mp((function(){var e={};return ip[bp].call(e)!==e})))&&(ip={}),yp(ip,bp)||vp(ip,bp,(function(){return this}));var Ap={IteratorPrototype:ip,BUGGY_SAFARI_ITERATORS:_p},wp=Ap.IteratorPrototype,Ep=Gu,kp=q,Sp=Jr,Tp=ra,xp=function(){return this},Dp=_n,Rp=function(e,t,n){var r=t+" Iterator";return e.prototype=Ep(wp,{next:kp(1,n)}),Sp(e,r,!1),Tp[r]=xp,e},Op=fp,Ip=Go,Cp=Jr,Pp=Se,Lp=Te.exports,Up=ra,jp=Ap.IteratorPrototype,Mp=Ap.BUGGY_SAFARI_ITERATORS,Bp=nr("iterator"),Np=function(){return this},qp=function(e,t,n,r,a,i,s){Rp(n,t,r);var o,d,u,c=function(e){if(e===a&&m)return m;if(!Mp&&e in p)return p[e];switch(e){case"keys":case"values":case"entries":return function(){return new n(this,e)}}return function(){return new n(this)}},l=t+" Iterator",h=!1,p=e.prototype,f=p[Bp]||p["@@iterator"]||a&&p[a],m=!Mp&&f||c(a),g="Array"==t&&p.entries||f;if(g&&(o=Op(g.call(new e)),jp!==Object.prototype&&o.next&&(Op(o)!==jp&&(Ip?Ip(o,jp):"function"!=typeof o[Bp]&&Pp(o,Bp,Np)),Cp(o,l,!0))),"values"==a&&f&&"values"!==f.name&&(h=!0,m=function(){return f.call(this)}),p[Bp]!==m&&Pp(p,Bp,m),Up[t]=m,a)if(d={values:c("values"),keys:i?m:c("keys"),entries:c("entries")},s)for(u in d)(Mp||h||!(u in p))&&Lp(p,u,d[u]);else Dp({target:t,proto:!0,forced:Mp||h},d);return d},Gp=ru.charAt,Fp=ct,Vp=qp,Kp=Fp.set,Wp=Fp.getterFor("String Iterator");Vp(String,"String",(function(e){Kp(this,{type:"String Iterator",string:String(e),index:0})}),(function(){var e,t=Wp(this),n=t.string,r=t.index;return r>=n.length?{value:void 0,done:!0}:(e=Gp(n,r),t.index+=e.length,{value:e,done:!1})})),Zu("iterator");var zp=Q,Hp=Sl,$p=ra,Qp=ct,Yp=qp,Jp=Qp.set,Xp=Qp.getterFor("Array Iterator"),Zp=Yp(Array,"Array",(function(e,t){Jp(this,{type:"Array Iterator",target:zp(e),index:0,kind:t})}),(function(){var e=Xp(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}}),"values");$p.Arguments=$p.Array,Hp("keys"),Hp("values"),Hp("entries");var ef=C,tf=Do,nf=Zp,rf=Se,af=nr,sf=af("iterator"),of=af("toStringTag"),df=nf.values;for(var uf in tf){var cf=ef[uf],lf=cf&&cf.prototype;if(lf){if(lf[sf]!==df)try{rf(lf,sf,df)}catch(e){lf[sf]=df}if(lf[of]||rf(lf,of,uf),tf[uf])for(var hf in nf)if(lf[hf]!==nf[hf])try{rf(lf,hf,nf[hf])}catch(e){lf[hf]=nf[hf]}}}function pf(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 ff(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 ff(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,o=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){o=!0,i=e},f:function(){try{s||null==n.return||n.return()}finally{if(o)throw i}}}}function ff(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 mf(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 gf(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?mf(Object(n),!0).forEach((function(t){b.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mf(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var vf={react:{src:"https://pm.gamedistribution.com/react/16.14.0/umd/react.production.min.js",name:"React"},"react-dom":{src:"https://pm.gamedistribution.com/react-dom/16.14.0/umd/react-dom.production.min.js",name:"ReactDOM"},redux:{src:"https://pm.gamedistribution.com/redux/4.0.5/dist/redux.min.js",name:"Redux"},"react-redux":{src:"https://pm.gamedistribution.com/react-redux/7.2.1/dist/react-redux.min.js",name:"ReactRedux"},"material-ui-core":{src:"https://pm.gamedistribution.com/@material-ui/core/4.11.3/umd/material-ui.production.min.js",name:"MaterialUI"}},yf={},bf=function(e,t){yf[e]=gf(gf({},t),{},{isLoading:!1})},_f=function(e){var t=this,n=e.id,r=e.src;return new Promise(function(e,a){if(v.default(this,t),document.getElementById(n))e();else{var i=document.createElement("script");i.onload=function(){e()},i.id=n,i.setAttribute("crossorigin",!0),i.src=r,document.head.appendChild(i)}}.bind(this))},Af=function(){var e=_.default(E.default.mark((function e(t){var n,r,a,i,s,o,d,u;return E.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n=window[t])){e.next=3;break}return e.abrupt("return",n);case 3:if(!(r=yf[t]).isLoading){e.next=6;break}return e.abrupt("return");case 6:r.isLoading=!0,a=pf(r.dependencies),e.prev=8,a.s();case 10:if((i=a.n()).done){e.next=26;break}if(s=i.value,e.prev=12,o=vf[s].name,!window[o]){e.next=16;break}return e.abrupt("continue",24);case 16:return e.next=18,_f({id:s,src:vf[s].src});case 18:e.next=24;break;case 20:e.prev=20,e.t0=e.catch(12),d=s.id,u=s.src,console.log("Could not load external script ".concat(d," ").concat(u),e.t0);case 24:e.next=10;break;case 26:e.next=31;break;case 28:e.prev=28,e.t1=e.catch(8),a.e(e.t1);case 31:return e.prev=31,a.f(),e.finish(31);case 34:return e.prev=34,e.next=37,_f({id:t,src:r.source});case 37:n=window[t],e.next=43;break;case 40:e.prev=40,e.t2=e.catch(34),console.log("Could not load module ".concat(t," ").concat(r.source,"."),e.t2);case 43:return r.isLoading=!1,e.abrupt("return",n);case 45:case"end":return e.stop()}}),e,null,[[8,28,31,34],[12,20],[34,40]])})));return function(t){return e.apply(this,arguments)}}(),wf=function e(t){var n=this;A.default(this,e),b.default(this,"load",_.default(E.default.mark((function e(){return E.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Af(n.moduleName);case 2:n.module=e.sent;case 3:case"end":return e.stop()}}),e)})))),b.default(this,"promo",_.default(E.default.mark((function e(){return E.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.module){e.next=3;break}return e.next=3,n.load();case 3:return e.abrupt("return",n.module[n.moduleDefault]);case 4:case"end":return e.stop()}}),e)}))));var r=t.package||"gd-sdk-stone-dynamic",a=t.package_version||"1.1.1",i=t.template||"puzzle",s=t.dependencies||[];this.moduleName="GDPromoByOrbit",this.moduleDefault=i.charAt(0).toUpperCase()+i.slice(1),this.moduleConfig={source:"https://pm.gamedistribution.com/@bygd/".concat(r,"/").concat(a,"/dist/").concat(i.toLowerCase(),"/iife/index.js"),dependencies:s},bf(this.moduleName,this.moduleConfig)},Ef=function e(t){var n=this;A.default(this,e),b.default(this,"load",_.default(E.default.mark((function e(){return E.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Af(n.moduleName);case 2:n.module=e.sent;case 3:case"end":return e.stop()}}),e)})))),b.default(this,"splash",_.default(E.default.mark((function e(){return E.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.module){e.next=3;break}return e.next=3,n.load();case 3:return e.abrupt("return",n.module[n.moduleDefault]);case 4:case"end":return e.stop()}}),e)}))));var r=t.package||"gd-sdk-air-dynamic",a=t.package_version||"1.2.0",i=t.template||"pluto",s=t.dependencies||[];this.moduleName="GDSplashDynamic",this.moduleDefault=i.charAt(0).toUpperCase()+i.slice(1),this.moduleConfig={source:"https://pm.gamedistribution.com/@bygd/".concat(r,"/").concat(a,"/dist/").concat(i.toLowerCase(),"/iife/index.js"),dependencies:s},bf(this.moduleName,this.moduleConfig)},kf=function(e,t){console.log(e,t)},Sf={},Tf={},xf=null;function Df(){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 Sf.version=r,Sf.frame=e,Sf.function=n,Sf.version}function Rf(e){var t=this;return xf||(xf=new Promise(function(n){function r(t,r){if(kf("Received a response from CMP",t),r){var a,i;if(!1!==t.gdprApplies)return"tcloaded"===t.eventStatus||"useractioncomplete"===t.eventStatus?(("boolean"!=typeof(i=(a=t)&&"boolean"==typeof a.gdprApplies?a.gdprApplies:e.defaultGdprScope)||!0===i&&"string"!=typeof a.tcString)&&n({result:"cmpUnexpectedResponse",cmp:Sf,consentData:a}),void n({result:"ok",consentData:t})):void 0;n({result:"ok",consentData:t})}else n({result:"cmpCallFailed"})}v.default(this,t),Df(),Sf.frame?2===Sf.version?(kf("TCF v2 CMP found. Fetching the consent."),Sf.function?(kf("CMP API is directly accessible, calling it now..."),Sf.function("addEventListener",Sf.version,r)):(kf("CMP API is outside the current iframe, calling it now..."),function(e,t,n){var r=this,a="__tcfapi";function i(e){var t="".concat(a,"Return"),n="string"==typeof e.data&&e.data.indexOf(t)>=0?JSON.parse(e.data):e.data;if(n[t]&&n[t].callId){var r=n[t];void 0!==Tf[r.callId]&&Tf[r.callId](r.returnValue,r.success)}}window[a]=function(e,n,i,s){v.default(this,r);var o=Math.random()+"",d="".concat(a,"Call"),u=b.default({},d,{command:e,parameter:s,callId:o,version:n});Tf[o]=i,t.postMessage(u,"*")}.bind(this),window.addEventListener("message",i,!1),window[a](e,Sf.version,n)}("addEventListener",Sf.frame,r))):n({result:"cmpVersionNotV2",cmp:Sf}):n({result:"cmpNotFound"})}.bind(this)))}var Of=new(function(){function e(){A.default(this,e),this.productName="Game Distribution"}var t;return w.default(e,[{key:"track",value:(t=_.default(E.default.mark((function e(t){var n,r,a,i,s,o;return E.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=null==t||null===(n=t.visitor)||void 0===n?void 0:n.visitorId){e.next=3;break}return e.abrupt("return");case 3:return a=encodeURIComponent(this.productName),i=encodeURIComponent(r),e.prev=5,s="https://tracker-v4.gamedock.io/v1/events-tracker/track/product/".concat(a,"/user_id/").concat(i),e.next=9,fetch(s,{method:"POST"});case 9:e.next=25;break;case 12:return e.prev=12,e.t0=e.catch(5),console.log("GAME_DOCK. fail v4",e.t0),e.prev=15,o="https://tracker.gamedock.io/v1/events-tracker/track/product/".concat(a,"/user_id/").concat(i),e.next=19,fetch(o,{method:"POST"});case 19:e.next=25;break;case 22:e.prev=22,e.t1=e.catch(15),console.log("GAME_DOCK. fail v6",e.t1);case 25:case"end":return e.stop()}}),e,this,[[5,12],[15,22]])}))),function(e){return t.apply(this,arguments)})}]),e}());function If(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 Cf(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?If(Object(n),!0).forEach((function(t){b.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):If(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Pf=null,Lf=function(){function e(t){var n=this;if(A.default(this,e),Pf)return Pf;Pf=this,this._defaults=this._getDefaultOptions(),this._extendDefaultOptions(this._defaults,t),this._version=t.version||"0.0.0",this._bridge=this._getBridgeContext(),this._parentURL=this._bridge.parentURL,this._parentDomain=this._bridge.parentDomain,this._topDomain=this._bridge.topDomain,this._isFullScreen=!1,this._setConsoleBanner(),this._initializeMessageRouter(),this._checkConsole(),this._subscribeToEvents(),this.sdkReady=new Promise(this._initializeSDKWithGameData.bind(this)),this.sdkReady.then(function(e){v.default(this,n),this._sdk_ready=!0}.bind(this)).catch(function(e){v.default(this,n),this._sdk_ready=!1}.bind(this)).finally(function(){var e=this;v.default(this,n),this._sendLoaderDataEvent(),this._checkSplashAndPromoScreens(),this._initBlockingExternals(),window.addEventListener("DOMNodeInserted",function(){if(v.default(this,e),this._gameData.block_exts&&this._removeExternalsInHtml({enabled:!1}),document.getElementsByClassName("webgl-content")[0]){var t=document.getElementsByClassName("webgl-content")[0].getElementsByClassName("footer")[0];t&&t.setAttribute("style","display:none")}}.bind(this)),this._checkFullscreen()}.bind(this))}var t,n,r,a,i,s,o,u,c,l;return w.default(e,[{key:"testConsent",value:function(){console.log("test-consent. Finding CMP");try{var e=Df();console.log("CMP found",e),_.default(E.default.mark((function e(){var t;return E.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Rf({});case 2:t=e.sent,console.log("After lookup IAB consent",t);case 4: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:"isLoaded",value:function(){if(void 0===this._isLoaded){var e=this._isTokenGameURL(),t=this._isExtHostedGameURL(),n=this._isMasterGameURL();this._isLoaded=(e||t&&!n)&&this._gameData.loader.enabled}return this._isLoaded}},{key:"setIsLoaded",value:function(e){this._isLoaded=e}},{key:"_sendLoadedEvent",value:function(){if(!this.isLoaded()){this.setIsLoaded(!0);try{this._sendTunnlEvent(1),this.msgrt.send("loaded",{message:this._hasBlocker?"Has Blocker":"No Blocker"}),this._initGamedockTracker(window.GamedockSDK,"gameplay")}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||!this._bridge.isCoreSDKMode&&!this._bridge.noMinijuegosSDK&&document.location.search.indexOf("mp_game_id")>=0&&this._loadMiniJuegosGratisTracker()}},{key:"_initializeSDKWithGameData",value:(l=_.default(E.default.mark((function e(t,n){var r,a=this;return E.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this._getGameData();case 3:this._gameData=e.sent,this._bridge.isCoreSDKMode=!(!0===this._gameData.enableAds||!0===(null===(r=this._gameData.enableAds)||void 0===r?void 0:r.enabled)),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().catch(function(e){return v.default(this,a),console.error(e.message||e)}.bind(this))),this._sendSDKReady(),t(this._gameData),e.next=20;break;case 15:e.prev=15,e.t0=e.catch(0),this._sendSDKError(e.t0),this.onResumeGame(e.t0.message,"warning"),n(e.t0);case 20:case"end":return e.stop()}}),e,this,[[0,15]])}))),function(e,t){return l.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=x.default(e);this.options=t?d.extendDefaults(n,t):n,this.options.gameId=this.options.gameId.trim()}},{key:"_setConsoleBanner",value:function(){if(!this._bridge.noConsoleBanner){var e=ah.version,t=console.log("%c %c %c GameDistribution.com HTML5 SDK | Version: "+e+" %c %c %c","background: #9854d8","background: #6c2ca7","color: #fff; background: #450f78;","background: #6c2ca7","background: #9854d8","background: #ffffff");console.log.apply(console,t)}}},{key:"_sendTunnlEvent",value:function(e){var t={page_url:this._topDomain||this._parentDomain,game_id:this.options.gameId,eventtype:e,ts:Date.now()};fetch("https://ana.headerlift.com/event?".concat(D.default.stringify(t)))}},{key:"_sendAdRequestContext",value:function(e){this.msgrt.send("adctx",{message:e.adTag.bidder})}},{key:"_checkWhitelabelPartner",value:function(){this._whitelabelPartner=!1;var e=d.getQueryParams("xanthophyll");e.hasOwnProperty("xanthophyll")&&"true"===e.xanthophyll&&(this._whitelabelPartner=!0,d.dankLog("White label publisher","".concat(this._whitelabelPartner),"success"))}},{key:"_checkConsole",value:function(){try{if(!d.Ls.available)return;"developer.gamedistribution.com"===this._parentDomain?(d.Ls.set("gd_debug_ex",!0),d.Ls.set("gd_disable_midroll_timer",!0),d.Ls.set("gd_tag",!0)):"localhost:3000"===this._parentDomain&&(d.Ls.set("gd_debug_ex",!0),d.Ls.set("gd_disable_midroll_timer",!0)),d.Ls.getBoolean("gd_debug_ex")&&(this.openConsole(),this.msgrt.send("dev.console",{message:this._parentDomain}))}catch(e){}}},{key:"_checkUserDeclinedTracking",value:function(){this._userDeclinedTracking=this._bridge.isCoreSDKMode||document.location.search.indexOf("gdpr-tracking=0")>=0||document.cookie.indexOf("ogdpr_tracking=0")>=0}},{key:"_initializeMessageRouter",value:function(){this.msgrt=new d.MessageRouter({gameId:this.options.gameId,hours:(new Date).getHours(),topDomain:this._topDomain,domain:this._parentDomain,referrer:this._parentURL,depth:d.getIframeDepth(),version:ah.version,tracking:this._userDeclinedTracking,whitelabel:this._whitelabelPartner,platform:d.getMobilePlatform(),byloader:this._bridge.isTokenGameURL,isTokenGameURL:this._bridge.isTokenGameURL,isMasterGameURL:this._bridge.isMasterGameURL,isExtHostedGameURL:this._bridge.isExtHostedGameURL,byloaderVersion:this._bridge.version})}},{key:"_loadGamedockTracker",value:function(){var e=this;try{var t=["https://cdn.gamedock.io/gamedock-web-tracker/4.3.0/script/gamedock-sdk.min.js"];d.getScript(t[0],"GamedockSDK",{alternates:t}).then(function(){v.default(this,e);var t=this._initGamedockTracker(window.GamedockSDK,"pageview");Of.track(t)}.bind(this)).catch(function(t){v.default(this,e),this._sendSDKError(t)}.bind(this))}catch(e){}}},{key:"_initGamedockTracker",value:function(e,t){if(!this._bridge.isCoreSDKMode){var n=e.initialize("gd",this._parentDomain);return n.tracking.trackEvent(t,{pageId:this.options.gameId,pageType:"game"}),n}}},{key:"_loadMiniJuegosGratisTracker",value:function(){var e=this;window.mpConfig={game:this.options.gameId,partner:"game-distribution"};var t=["https://ext.minijuegosgratis.com/external-host/main.js"];d.getScript(t[0],"MinijuegosSDK",{alternates:t}).catch(function(t){v.default(this,e),this._sendSDKError(t)}.bind(this))}},{key:"_loadGoogleAnalytics",value:function(){var e=this,t=["https://www.google-analytics.com/analytics.js"];d.getScript(t[0],"gdsdk_google_analytics",{alternates:t,error_prefix:"Blocked:",exists:function(){return v.default(this,e),window.ga}.bind(this)}).then(function(){v.default(this,e),window.ga("create","UA-60359297-49",{name:"gd",cookieExpires:7776e3,sampleRate:5},"auto"),this._bridge.noGAPageView||window.ga("gd.send","pageview"),this._userDeclinedTracking||window.ga("gd.set","anonymizeIp",!0)}.bind(this)).catch(function(t){v.default(this,e),this._sendSDKError(t)}.bind(this))}},{key:"_subscribeToEvents",value:function(){var e=this;this.eventBus=new d.EventBus,d.SDKEvents.forEach(function(t){var n=this;return v.default(this,e),this.eventBus.subscribe(t,function(e){return v.default(this,n),this._onEvent(e)}.bind(this),"sdk")}.bind(this)),d.IMAEvents.forEach(function(t){var n=this;return v.default(this,e),this.eventBus.subscribe(t,function(e){return v.default(this,n),this._onEvent(e)}.bind(this),"ima")}.bind(this)),this.eventBus.subscribe("COMPLETE",function(){if(v.default(this,e),"developer.gamedistribution.com"===this._parentDomain||!0===new RegExp("^localhost").test(this._parentDomain)){fetch("https://game.api.gamedistribution.com/game/v2/hasapi/".concat(this.options.gameId,"?timestamp=").concat((new Date).valueOf()));try{var t=JSON.stringify({type:"GD_SDK_IMPLEMENTED",gameID:this.options.gameId});window.location!==window.top.location?window.top.postMessage(t,"*"):null!==window.opener&&window.opener.location!==window.location&&window.opener.postMessage(t,"*")}catch(e){}}}.bind(this),"ima"),this.eventBus.subscribe("CONTENT_PAUSE_REQUESTED",function(){return v.default(this,e),this.onPauseGame("New advertisements requested and loaded","success")}.bind(this),"ima"),this.eventBus.subscribe("IMPRESSION",function(t){v.default(this,e),this.msgrt.send("ad.impression")}.bind(this),"ima"),this.eventBus.subscribe("AD_ERROR",function(t){v.default(this,e),this.msgrt.send("ad.error",{message:t.message,details:t.details})}.bind(this),"ima"),this.eventBus.subscribe("AD_SDK_REQUEST",function(t){v.default(this,e),this._sendAdRequestContext(t.message)}.bind(this),"sdk"),this.eventBus.subscribe("SDK_ERROR",function(t){v.default(this,e),t.message.startsWith("Blocked:")?this._bridge.noBlockerEvent||(this.msgrt.send("error",{message:t.message}),this._hasBlocker||(this._hasBlocker=!0,this._sendTunnlEvent(3))):this.msgrt.send("error",{message:t.message})}.bind(this),"sdk"),this.eventBus.subscribe("AD_REQUEST_KEYS_EMPTY",function(t){v.default(this,e),this.msgrt.send("tunnl.keys.empty",{message:t.message,details:t.details})}.bind(this),"sdk"),this.eventBus.subscribe("AD_REQUEST_KEYS_FALLBACK",function(t){v.default(this,e),this.msgrt.send("tunnl.keys.fallback",{message:t.message,details:t.details})}.bind(this),"sdk"),this.eventBus.subscribe("AD_T4R",function(t){return v.default(this,e),this.msgrt.send("adt4r")}.bind(this),"sdk")}},{key:"_checkGameId",value:function(){this.options.gameId===this._defaults.gameId&&this._sendSDKError("Check correctness of your GAME ID. Otherwise, no revenue will be recorded.")}},{key:"_getDefaultGameData",value:function(){return{gameId:this.options.gameId,enableAds:!0,preroll:!0,midroll:12e4,rewardedAds:!1,title:"",tags:[],category:"",assets:[],dmain:!0,sdk:{},loader:{},splash:{},promo:{},dAds:{},pAds:{},mAds:{},rAds:{}}}},{key:"_getGameDataUrl",value:function(){var e=void 0!==this._topDomain&&"undefined"!==this._topDomain?this._topDomain:this._parentDomain;return"https://game.api.gamedistribution.com/game/v4/get/".concat(this.options.gameId.replace(/-/g,""),"/?domain=").concat(e,"&v=").concat(ah.version,"&localTime=").concat((new Date).getHours())}},{key:"_checkBlocking",value:(c=_.default(E.default.mark((function e(){var t,n,r=this;return E.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=this._gameData,t=void 0===this._gameData.dmain||this._gameData.dmain,(n.bloc_gard&&!0===n.bloc_gard.enabled||!t)&&(this.msgrt.send("blocked"),setTimeout(function(){v.default(this,r),window.location.href="https://html5.api.gamedistribution.com/blocked.html?".concat(D.default.stringify({domain:this._parentDomain,id:n.gameId,img:this._get_game_thumbnail_url(),title:n.title}))}.bind(this),100));case 5:case"end":return e.stop()}}),e,this)}))),function(){return c.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(){v.default(this,e),document.location="https://html5.api.gamedistribution.com/deleted.html"}.bind(this),100))}},{key:"_changeMidrollInDebugMode",value:function(){var e=this._gameData;d.Ls.available&&d.Ls.getBoolean("gd_debug_ex")&&(d.Ls.getBoolean("gd_disable_midroll_timer")?e.midroll=0:e.midroll=this._getDefaultGameData().midroll)}},{key:"_checkSplashAndPromoScreens",value:function(){var e,t,n;this._gameData.loader&&!1===this._gameData.loader.mobile&&this._getisMobile()&&(this._gameData.loader.enabled=!1);var r=this._gameData,a=r.gdpr&&!0===r.gdpr.consent,i=r.loader,s=null===(e=r.promo)||void 0===e?void 0:e[null===(t=r.promo)||void 0===t||null===(n=t.template)||void 0===n?void 0:n.preroll];r.preroll||(this.adRequestTimer=Date.now()),this.options.loader.enabled?null!=s&&s.enabled?this._createPromoBeforeSplash(r,a):i.enabled?this._createSplash(r,a):this.onResumeGame("Advertisement(s) are done. Start / resume the game.","success"):i.enabled||this._bridge.isTokenGameURL&&this._bridge.isExtHostedGameURL||(this.options.advertisementSettings.autoplay||a?null!=s&&s.enabled?this._createPromoBeforeSplash(r,a):!1!==i.enabled&&this._createSplash(r,a):null!=s&&s.enabled&&this._createPromo(r,a))}},{key:"_initializeVideoAd",value:(u=_.default(E.default.mark((function e(){var t;return E.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._bridge.isCoreSDKMode){e.next=2;break}return e.abrupt("return");case 2:return(t=this._gameData).sdk.enabled&&(this.options.advertisementSettings=d.extendDefaults(this.options.advertisementSettings,t.sdk)),this.macros=new d.Macros({game:t,bridge:this._bridge}),this.adInstance=new Ph(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=ah,e.next=16,this.adInstance.start();case 16:case"end":return e.stop()}}),e,this)}))),function(){return u.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){d.dankLog("DEVELOPER_ERROR",e.message,"warning")}}},{key:"_sendSDKError",value:function(e){e=e.message?e:{message:e};this.eventBus.broadcast("SDK_ERROR",{message:e.message,status:"error"});try{this.options.onError(e)}catch(e){d.dankLog("DEVELOPER_ERROR",e.message,"warning")}}},{key:"_onEvent",value:function(e){d.dankLog(e.name,e.message,e.status);try{this.options.onEvent({name:e.name,message:e.message,status:e.status})}catch(e){d.dankLog("DEVELOPER_ERROR",e.message,"warning")}}},{key:"_getGameData",value:function(){var e=this;return new Promise(function(t){var n=this;v.default(this,e);var r=this._getDefaultGameData(),a=this._getGameDataUrl();fetch(a).then(function(e){return v.default(this,n),e.json()}.bind(this)).then(function(e){if(v.default(this,n),e.success){var a,i,s,o=e.result.game,u={gameId:o.gameMd5,slug:o.slug,pname:o.pname,dname:o.dname,status:o.status,description:o.description,enableAds:!0===o.enableAds||!0===(null===(a=o.enableAds)||void 0===a?void 0:a.enabled),preroll:o.preRoll,midroll:6e4*o.timeAds,rewardedAds:o.rewardedAds,title:o.title,tags:o.tags,category:o.category,assets:o.assets,disp_2nd_prer:o.disp_2nd_prer,ctry_vst:o.ctry_vst,ctry:o.ctry,crtv:o.crtv,dmain:o.dmain,block_exts:this._parseAndSelectRandomOne(o.push_cuda),bloc_gard:this._parseAndSelectRandomOne(o.bloc_gard),cookie:this._parseAndSelectRandomOne(o.cookie),gdpr:this._parseAndSelectRandomOne(o.gdpr),diagnostic:this._parseAndSelectRandomOne(o.diagnostic),sdk:this._parseAndSelectRandomOne(o.sdk)||{},loader:this._parseAndSelectRandomOne(o.loader)||{},splash:this._parseAndSelectRandomOne(o.splash)||{},promo:this._parseAndSelectRandomOne(o.promo)||{},dAds:this._parseAndSelectRandomOne(o.dads)||{},pAds:this._parseAndSelectRandomOne(o.pads)||{},mAds:this._parseAndSelectRandomOne(o.mads)||{},rAds:this._parseAndSelectRandomOne(o.rads)||{}},c=d.extendDefaults(x.default(r),u);c.afg_disabled=!1===(null===(i=c.sdk)||void 0===i||null===(s=i.afg)||void 0===s?void 0:s.enabled),this._bridge.noPreroll=(!this._getisMobile()||!1!==c.loader.mobile)&&this._bridge.noPreroll,this._bridge.noPreroll&&(this.adRequestTimer=Date.now()),this.msgrt.setGameData(c),d.setDankLog(c.diagnostic),t(c)}else r.failed=!0,t(r)}.bind(this)).catch(function(e){v.default(this,n),r.failed=!0,t(r)}.bind(this))}.bind(this))}},{key:"_createSplash",value:(o=_.default(E.default.mark((function e(t,n){var r,a,i=this;return E.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._getSplashTemplate(t);case 2:r=e.sent,(a=new r(Cf(Cf({},this.options),{},{isConsentDomain:n,version:ah.version}),t,this._parentDomain)).on("playClick",function(){var e=this;if(v.default(this,i),n){var t=new Date;t.setDate(t.getDate()+90),document.cookie="ogdpr_tracking=1; expires=".concat(t.toUTCString(),"; path=/")}this.showAd(d.AdType.Interstitial,{position:"preroll"}).catch(function(t){v.default(this,e)}.bind(this))}.bind(this)),this.onPauseGame("Pause the game and wait for a user gesture","success"),this.eventBus.subscribe("SDK_GAME_PAUSE",function(){v.default(this,i),a.hide()}.bind(this)),this.eventBus.subscribe("SDK_GAME_START",function(){v.default(this,i),a.hide()}.bind(this));case 8:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"_createPromoBeforeSplash",value:(s=_.default(E.default.mark((function e(t,n){var r,a,i,s,o=this;return E.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this._createPrerollPromoTemplate(t);case 3:i=e.sent,(s=new i(Cf(Cf({},this.options),{},{isConsentDomain:n,version:ah.version,template:null===(r=t.promo)||void 0===r||null===(a=r.template)||void 0===a?void 0:a.preroll}),t)).on("done",function(){v.default(this,o),s.hide(),this._createSplash(t,n)}.bind(this)),e.next=12;break;case 8:e.prev=8,e.t0=e.catch(0),console.log(e.t0),this._createSplash(t,n);case 12:case"end":return e.stop()}}),e,this,[[0,8]])}))),function(e,t){return s.apply(this,arguments)})},{key:"_createPromo",value:(i=_.default(E.default.mark((function e(t,n){var r,a,i,s,o=this;return E.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this._createPrerollPromoTemplate(t);case 3:i=e.sent,(s=new i(Cf(Cf({},this.options),{},{isConsentDomain:n,version:ah.version,template:null===(r=t.promo)||void 0===r||null===(a=r.template)||void 0===a?void 0:a.preroll}),t)).on("done",function(){v.default(this,o),s.hide(),this.onResumeGame("Resumed after the promo","warning")}.bind(this)),this.onPauseGame("Pause the game for the promo","success"),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(0),this.onResumeGame("Resumed after the promo","warning");case 12:case"end":return e.stop()}}),e,this,[[0,9]])}))),function(e,t){return i.apply(this,arguments)})},{key:"showBanner",value:function(){var e=this;this.showAd(d.AdType.Interstitial).catch(function(){v.default(this,e)}.bind(this))}},{key:"showAd",value:(a=_.default(E.default.mark((function e(t){var n,r=this,a=arguments;return E.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=a.length>1&&void 0!==a[1]?a[1]:{},e.abrupt("return",new Promise(function(){var e=_.default(E.default.mark((function e(a,i){var s,o,d,u,c,l,h=this;return E.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,s={adType:t,params:n,adTimestamp:r.adRequestTimer},e.next=4,r.sdkReady;case 4:return o=e.sent,e.next=7,r.videoAdReady;case 7:return r._sendLoadedEvent(),r._rejectAdIfGameBlocked({gameData:o,adRequest:s}),r._rejectAdIfAdDisabled({gameData:o,adRequest:s}),r._rejectAdIfUnsupportedType({adRequest:s}),r._rejectAdIfRewardedDisabled({gameData:o,adRequest:s}),r._rejectAdIfAdRateHits({gameData:o,adRequest:s}),r.adInstance.attachAfgPosition(s),r._attachAfgFallback({gameData:o,adRequest:s}),d="main.showad",u=function(e){v.default(this,h),r.eventBus.unsubscribeScope(d),r.onResumeGame(e.message,"warning"),i(e.message)}.bind(this),c=function(e){v.default(this,h),r.eventBus.unsubscribeScope(d),r.adRequestTimer=Date.now(),r.onResumeGame("Advertisement(s) are done. Start / resume the game.","success"),a(e.message)}.bind(this),l=function(e){var s=this;v.default(this,h),r.eventBus.unsubscribeScope(d),n.fallback_adsense=!1,r.showAd(t,Cf(Cf({},n),{},{adapter:"adsense"})).then(function(e){v.default(this,s),a(e)}.bind(this)).catch(function(e){v.default(this,s),i(e)}.bind(this))}.bind(this),r.eventBus.subscribe("AD_ERROR",null!=n&&n.fallback_adsense?l:u,d),r.eventBus.subscribe("AD_SDK_CANCELED",null!=n&&n.fallback_adsense?l:u,d),r.eventBus.subscribe("AD_SUCCESS",c,d),e.next=24,r.adInstance.startAd(s);case 24:r._post_message({topic:"adrequest.instream"}),e.next=31;break;case 27:e.prev=27,e.t0=e.catch(0),r.onResumeGame(e.t0.message,"warning"),i(e.t0.message);case 31:case"end":return e.stop()}}),e,this,[[0,27]])})));return function(t,n){return e.apply(this,arguments)}}()));case 2:case"end":return e.stop()}}),e)}))),function(e){return a.apply(this,arguments)})},{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){if(!e.gameData.enableAds||this._whitelabelPartner)throw new Error("Advertisements are disabled.")}},{key:"_rejectAdIfUnsupportedType",value:function(e){var t=e.adRequest;if(t.adType){if(t.adType!==d.AdType.Interstitial&&t.adType!==d.AdType.Rewarded)throw new Error("Unsupported an advertisement type: ",t.adType)}else t.adType=d.AdType.Interstitial}},{key:"_rejectAdIfRewardedDisabled",value:function(e){var t=e.gameData;if(e.adRequest.adType===d.AdType.Rewarded&&!t.rewardedAds)throw new Error("Rewarded ads are disabled.")}},{key:"_rejectAdIfAdRateHits",value:function(e){var t=e.gameData;if(e.adRequest.adType===d.AdType.Interstitial&&void 0!==this.adRequestTimer&&Date.now()-this.adRequestTimer<t.midroll)throw new Error("The advertisement was requested too soon.")}},{key:"preloadAd",value:(r=_.default(E.default.mark((function e(t){var n=this;return E.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(){var e=_.default(E.default.mark((function e(r,a){var i,s;return E.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,n.sdkReady;case 3:return i=e.sent,e.next=6,n.videoAdReady;case 6:if(!i.bloc_gard||!0!==i.bloc_gard.enabled){e.next=8;break}throw new Error("Game or domain is blocked.");case 8:if(i.enableAds&&!n._whitelabelPartner){e.next=10;break}throw new Error("Advertisements are disabled.");case 10:if(t){e.next=14;break}t=d.AdType.Rewarded,e.next=16;break;case 14:if(t===d.AdType.Interstitial||t===d.AdType.Rewarded){e.next=16;break}throw new Error("Unsupported an advertisement type:"+t);case 16:if(t!==d.AdType.Rewarded||i.rewardedAds){e.next=18;break}throw new Error("Rewarded ads are disabled.");case 18:return e.next=20,n.adInstance.preloadAd(t);case 20:s=e.sent,r(s),e.next=27;break;case 24:e.prev=24,e.t0=e.catch(0),a(e.t0);case 27:case"end":return e.stop()}}),e,null,[[0,24]])})));return function(t,n){return e.apply(this,arguments)}}()));case 1:case"end":return e.stop()}}),e)}))),function(e){return r.apply(this,arguments)})},{key:"cancelAd",value:(n=_.default(E.default.mark((function e(){var t=this;return E.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(){var e=_.default(E.default.mark((function e(n,r){return E.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:try{t.adInstance.cancel(),t.onResumeGame("Advertisement(s) are cancelled. Start / resume the game.","success"),r()}catch(e){t.onResumeGame("Advertisement(s) are cancelled. Start / resume the game.","success"),n(e.message)}case 1:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()));case 1:case"end":return e.stop()}}),e)}))),function(){return n.apply(this,arguments)})},{key:"showDisplayAd",value:function(e){var t=this;return new Promise(function(){var n=_.default(E.default.mark((function n(r,a){var i;return E.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,t.sdkReady;case 3:return i=n.sent,n.next=6,t.videoAdReady;case 6:if(!i.dAds.enabled){n.next=13;break}return n.next=9,t.adInstance.loadDisplayAd(e);case 9:t._post_message({topic:"adrequest.display"}),r(),n.next=14;break;case 13:a("Display-Ads are disabled.");case 14:n.next=19;break;case 16:n.prev=16,n.t0=n.catch(0),a(n.t0.message||n.t0);case 19:case"end":return n.stop()}}),n,null,[[0,16]])})));return function(e,t){return n.apply(this,arguments)}}())}},{key:"onResumeGame",value:function(e,t){this._allowExternals({enabled:!1});try{this.options.resumeGame()}catch(e){d.dankLog("DEVELOPER_ERROR",e.message,"warning")}var n="SDK_GAME_START";this.eventBus.broadcast(n,{name:n,message:e,status:t,analytics:{category:"SDK",action:n,label:this.options.gameId+""}})}},{key:"onPauseGame",value:function(e,t){this._allowExternals({enabled:!0});try{this.options.pauseGame()}catch(e){d.dankLog("DEVELOPER_ERROR",e.message,"warning")}var n="SDK_GAME_PAUSE";this.eventBus.broadcast(n,{name:n,message:e,status:t,analytics:{category:"SDK",action:n,label:this.options.gameId+""}})}},{key:"openConsole",value:function(){try{new d.ImplementationTest(this).start(),d.Ls.set("gd_debug_ex",!0)}catch(e){console.log(e)}}},{key:"_initBlockingExternals",value:function(){var e=this._gameData;(e.failed||e.block_exts&&e.block_exts.enabled)&&(this.window_open=window.open,this._allowExternals({enabled:!1}),this._removeExternalsInHtml({enabled:!1}))}},{key:"_checkFullscreen",value:function(){var e=this;try{var t=this._gameData;t.sdk.fullscreen&&"auto"===t.sdk.fullscreen&&document.addEventListener("click",function(){if(v.default(this,e),!this._isFullScreen){var t=document.body,n=t.requestFullScreen||t.webkitRequestFullScreen||t.mozRequestFullScreen||t.msRequestFullscreen;if(n)n.call(t);else if(void 0!==window.ActiveXObject){var r=new ActiveXObject("WScript.Shell");null!==r&&r.SendKeys("{F11}")}this._isFullScreen=!0}}.bind(this))}catch(e){console.log("Fullscreen error handled...",e)}}},{key:"_allowExternals",value:function(e){var t=this;void 0!==this.window_open&&(!1===e.enabled?window.open=function(e){v.default(this,t),this.msgrt.send("external",{message:"C> ".concat(e)}),(e.startsWith("https://play.google.com")||e.startsWith("https://itunes.apple.com"))&&this.window_open.call(null,e)}.bind(this):window.open=this.window_open)}},{key:"_removeExternalsInHtml",value:function(e){var t=this;!1===e.enabled&&window.document.querySelectorAll("a").forEach(function(e){var n=this;v.default(this,t);var r=!!(e.innerText.toLowerCase().includes("start")||e.innerText.toLowerCase().includes("play")||e.innerText.toLowerCase().includes("continue")),a=e.getAttribute("href");e.removeAttribute("href"),r||(e.onclick=function(e){return v.default(this,n),e.preventDefault(),this.msgrt.send("external",{message:"H> ".concat(a)}),!1}.bind(this))}.bind(this))}},{key:"_getBridgeContext",value:function(){var e=this._isTokenGameURL(),t=this._isMasterGameURL(),n=this._isExtHostedGameURL(),r=d.getIframeDepth();console.log("iframeDepth",r);var a=e||n?this._getTokenGameURLConfig():{};a=a||{};var i=decodeURIComponent((e||n)&&a.parentURL?a.parentURL:d.getParentUrl()),s=decodeURIComponent((e||n)&&a.parentDomain?a.parentDomain:d.getParentDomain()),o=decodeURIComponent((e||n)&&a.topDomain?a.topDomain:n&&0===d.getIframeDepth()?s:d.getTopDomain()),u=(e||n)&&a.loaderEnabled,c=(e||n)&&a.loaderEnabled,l=(e||n)&&a.loaderEnabled,h=(e||n)&&a.loaderEnabled,p=(e||n)&&a.loaderEnabled,f=(e||n)&&a.loaderEnabled,m=(e||n)&&a.loaderEnabled,g=(e||n)&&a.loaderEnabled,v=(e||n)&&a.loaderEnabled&&a.hasImpression&&a.version>="1.1.24";return{isTokenGameURL:e,isMasterGameURL:t,isExtHostedGameURL:n,noConsoleBanner:u,noLoadedEvent:c,noBlockerEvent:l,noPreroll:g,parentURL:i,parentDomain:s,topDomain:o&&o.length?o:s,noGAPageView:h,noLotamePageView:p,noGamedockSDK:f,noMinijuegosSDK:m,version:a.version,pauseGameOnStartup:v,depth:d.getIframeDepth(),domainMatched:s===o,exports:{formatTokenURLSearch:this._formatTokenURLSearch.bind(this),extendUrlQuery:this._extendUrlQuery.bind(this),base64Encode:this._base64_encode.bind(this)}}}},{key:"_isMasterGameURL",value:function(){var e=/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Fa-f0-9]{32})(.*)$/i;return e.test(location.href)||!this._isTokenGameURL()&&e.test(document.referrer)}},{key:"_isTokenGameURL",value:function(){var e=/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Za-z0-9]{8})\/(.*)$/i;return e.test(location.href)||e.test(document.referrer)}},{key:"_isExtHostedGameURL",value:function(){var e=/^http[s]?:\/\/.*?gd_sdk_referrer_url=.*$/i;return e.test(location.href)||e.test(document.referrer)}},{key:"_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 S.default(location.href,!0);if(!n.query.gd_zone_config)return;e=n.query.gd_zone_config}else if(t.test(document.referrer)){var r=new S.default(document.referrer,!0);if(!r.query.gd_zone_config)return;e=r.query.gd_zone_config}else{var a=new S.default(location.href,!0);if(!a.query.gd_zone_config)return;e=a.query.gd_zone_config}return JSON.parse(m.Base64.decode(decodeURIComponent(e)))}catch(e){}}},{key:"_getSplashTemplate",value:function(e){var t=e.splash;return new Ef(t).splash()}},{key:"_createPrerollPromoTemplate",value:(t=_.default(E.default.mark((function e(t){var n,r,a,i,s;return E.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=null===(n=t.promo)||void 0===n?void 0:n[null===(r=t.promo)||void 0===r||null===(a=r.template)||void 0===a?void 0:a.preroll],s=new wf(i),e.abrupt("return",s.promo());case 3:case"end":return e.stop()}}),e)}))),function(e){return t.apply(this,arguments)})},{key:"_formatTokenURLSearch",value:function(e){var t="";try{t=encodeURIComponent(m.Base64.encode(JSON.stringify(e)))}catch(e){}try{var n=new S.default(location.href,!0);return n.query=n.query||{},n.query.gd_zone_config=t,"?".concat(D.default.stringify(n.query))}catch(e){return"?gd_zone_config=".concat(t)}}},{key:"_extendUrlQuery",value:function(e,t){var n=new S.default(e,!0);return n.query=Cf(Cf({},n.query),t),n.toString()}},{key:"_base64_encode",value:function(e){return m.Base64.encode(JSON.stringify(e))}},{key:"_parseAndSelectRandomOne",value:function(e){var t=this._selectRandomOne("object"===y.default(e)?e:d.parseJSON(e));return t&&t.version?ah.version>=t.version?t:void 0:t}},{key:"_selectRandomOne",value:function(e){var t=this;if(!jh(e)||0===e.length)return e;if(1===e.length)return e[0];var n=0;e.forEach(function(e){v.default(this,t),e.weight=e.weight||1,n+=e.weight}.bind(this));var r=Math.floor(Math.random()*Math.floor(n));n=0;for(var a=0;a<e.length;a++){var i=e[a];if(r<(n+=i.weight))return i}}},{key:"session",value:function(){var e=this;return new Promise(function(){var t=_.default(E.default.mark((function t(n,r){var a;return E.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e.sdkReady;case 3:t.next=7;break;case 5:t.prev=5,t.t0=t.catch(0);case 7:a=e._gameData,n({ads:{display:{enabled:a.dAds.enabled},rewarded:{enabled:a.rewardedAds}},location:{parentDomain:e._bridge.parentDomain,topDomain:e._bridge.topDomain,parentURL:e._bridge.parentURL,depth:e._bridge.depth,loadedByGameZone:e._bridge.isTokenGameURL}});case 9:case"end":return t.stop()}}),t,null,[[0,5]])})));return function(e,n){return t.apply(this,arguments)}}())}},{key:"_getisMobile",value:function(){var e,t=!1;return e=navigator.userAgent||navigator.vendor||window.opera,(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(e.substr(0,4)))&&(t=!0),!1===t&&window.orientation>-1&&(t=!0),t}},{key:"_get_game_thumbnail_url",value:function(){var e=this,t=this._gameData,n=t.assets.find(function(t){return v.default(this,e),t.hasOwnProperty("name")&&512===t.width&&512===t.height}.bind(this));return n||(n=t.assets.length>0?t.assets[0]:{name:"logo.svg"}),"https://img.gamedistribution.com/".concat(n.name)}},{key:"_post_message",value:function(e){var t,n=e.topic,r=e.data,a=null!==(t=location.ancestorOrigins)&&void 0!==t&&t.length?location.ancestorOrigins[location.ancestorOrigins.length-1]:"*";try{var i=window.top||window.parent;i&&i.postMessage({source:"gdsdk",topic:n,data:r},a)}catch(e){console.error((null==e?void 0:e.message)||e)}}}]),e}(),Uf=new function e(){var t=this;A.default(this,e),b.default(this,"load",_.default(E.default.mark((function e(){return E.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Af("Leaderboard");case 2:t.leaderboard=e.sent;case 3:case"end":return e.stop()}}),e)})))),b.default(this,"showLeaderboard",function(){var e=_.default(E.default.mark((function e(n){var r;return E.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=window.GD_OPTIONS.gameId,t.leaderboard){e.next=4;break}return e.next=4,t.load();case 4:t.leaderboard.showLeaderBoard(r,n);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),b.default(this,"addScore",function(){var e=_.default(E.default.mark((function e(n){return E.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.leaderboard){e.next=3;break}return e.next=3,t.load();case 3:t.leaderboard.addScore(n);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),this.moduleName="Leaderboard",this.moduleConfig={source:"https://pm.gamedistribution.com/@bygd/gd-sdk-leaderboard/0.1.43/dist/default/iife/index.js",dependencies:["react","react-dom","redux","react-redux","material-ui-core"]},bf(this.moduleName,this.moduleConfig)},jf=new Lf(function(){var e={};try{"object"===("undefined"==typeof GD_OPTIONS?"undefined":y.default(GD_OPTIONS))&&GD_OPTIONS?e=GD_OPTIONS:window.gdApi&&"object"===y.default(window.gdApi.q[0][0])&&window.gdApi.q[0][0]&&((e=window.gdApi.q[0][0]).hasOwnProperty("advertisementSettings")||(e.advertisementSettings={autoplay:!0}))}catch(e){console.log("_get_developer_sets failed",e)}return e}());function Mf(){var e=this;this.AdType=d.AdType,this.preloadAd=function(e){return jf.preloadAd(e)},this.showAd=function(e,t){return e===d.AdType.Display?jf.showDisplayAd(t):jf.showAd(e)},this.cancelAd=function(){return jf.cancelAd()},this.openConsole=function(){jf.openConsole()},this.getSession=function(){return jf.session()},this.leaderboard={show:function(){v.default(this,e),Uf.showLeaderboard()}.bind(this),addScore:function(t){v.default(this,e),Uf.addScore(t)}.bind(this)}}Mf.prototype=new function(){this.showBanner=function(){jf.showBanner()},this.play=function(){},this.customLog=function(){}},window.gdsdk=new Mf,window.gdApi=window.gdsdk;
1
+ "use strict";var e=require("@babel/runtime/helpers/newArrowCheck"),t=require("@babel/runtime/helpers/typeof"),n=require("@babel/runtime/helpers/defineProperty"),r=require("@babel/runtime/helpers/asyncToGenerator"),a=require("@babel/runtime/helpers/classCallCheck"),i=require("@babel/runtime/helpers/createClass"),s=require("@babel/runtime/regenerator"),o=require("@babel/runtime/helpers/objectWithoutProperties"),d=require("@bygd/gd-sdk-era/dist/default"),u=require("url-parse"),c=require("can-autoplay"),l=require("is-plain-object"),h=require("lodash.clonedeep"),p=require("querystringify"),f=require("lodash.merge"),m=require("js-base64");function g(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var v=g(e),y=g(t),b=g(n),_=g(r),A=g(a),w=g(i),E=g(s),k=g(o),S=g(u),T=g(c),x=g(h),D=g(p),R=g(f),O="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},I=function(e){return e&&e.Math==Math&&e},C=I("object"==typeof globalThis&&globalThis)||I("object"==typeof window&&window)||I("object"==typeof self&&self)||I("object"==typeof O&&O)||function(){return this}()||Function("return this")(),P={},L=function(e){try{return!!e()}catch(e){return!0}},U=!L((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),j={},M={}.propertyIsEnumerable,B=Object.getOwnPropertyDescriptor,N=B&&!M.call({1:2},1);j.f=N?function(e){var t=B(this,e);return!!t&&t.enumerable}:M;var q=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},G={}.toString,F=function(e){return G.call(e).slice(8,-1)},V=F,K="".split,W=L((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==V(e)?K.call(e,""):Object(e)}:Object,z=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e},H=W,$=z,Q=function(e){return H($(e))},Y=function(e){return"object"==typeof e?null!==e:"function"==typeof e},J=Y,X=function(e,t){if(!J(e))return e;var n,r;if(t&&"function"==typeof(n=e.toString)&&!J(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!J(r=n.call(e)))return r;if(!t&&"function"==typeof(n=e.toString)&&!J(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")},Z={}.hasOwnProperty,ee=function(e,t){return Z.call(e,t)},te=Y,ne=C.document,re=te(ne)&&te(ne.createElement),ae=function(e){return re?ne.createElement(e):{}},ie=ae,se=!U&&!L((function(){return 7!=Object.defineProperty(ie("div"),"a",{get:function(){return 7}}).a})),oe=U,de=j,ue=q,ce=Q,le=X,he=ee,pe=se,fe=Object.getOwnPropertyDescriptor;P.f=oe?fe:function(e,t){if(e=ce(e),t=le(t,!0),pe)try{return fe(e,t)}catch(e){}if(he(e,t))return ue(!de.f.call(e,t),e[t])};var me={},ge=Y,ve=function(e){if(!ge(e))throw TypeError(String(e)+" is not an object");return e},ye=U,be=se,_e=ve,Ae=X,we=Object.defineProperty;me.f=ye?we:function(e,t,n){if(_e(e),t=Ae(t,!0),_e(n),be)try{return we(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e};var Ee=me,ke=q,Se=U?function(e,t,n){return Ee.f(e,t,ke(1,n))}:function(e,t,n){return e[t]=n,e},Te={exports:{}},xe=C,De=Se,Re=function(e,t){try{De(xe,e,t)}catch(n){xe[e]=t}return t},Oe=Re,Ie=C["__core-js_shared__"]||Oe("__core-js_shared__",{}),Ce=Ie,Pe=Function.toString;"function"!=typeof Ce.inspectSource&&(Ce.inspectSource=function(e){return Pe.call(e)});var Le=Ce.inspectSource,Ue=Le,je=C.WeakMap,Me="function"==typeof je&&/native code/.test(Ue(je)),Be={exports:{}},Ne=Ie;(Be.exports=function(e,t){return Ne[e]||(Ne[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.10.1",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"});var qe,Ge,Fe,Ve=0,Ke=Math.random(),We=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++Ve+Ke).toString(36)},ze=Be.exports,He=We,$e=ze("keys"),Qe=function(e){return $e[e]||($e[e]=He(e))},Ye={},Je=Me,Xe=Y,Ze=Se,et=ee,tt=Ie,nt=Qe,rt=Ye,at=C.WeakMap;if(Je){var it=tt.state||(tt.state=new at),st=it.get,ot=it.has,dt=it.set;qe=function(e,t){return t.facade=e,dt.call(it,e,t),t},Ge=function(e){return st.call(it,e)||{}},Fe=function(e){return ot.call(it,e)}}else{var ut=nt("state");rt[ut]=!0,qe=function(e,t){return t.facade=e,Ze(e,ut,t),t},Ge=function(e){return et(e,ut)?e[ut]:{}},Fe=function(e){return et(e,ut)}}var ct={set:qe,get:Ge,has:Fe,enforce:function(e){return Fe(e)?Ge(e):qe(e,{})},getterFor:function(e){return function(t){var n;if(!Xe(t)||(n=Ge(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}},lt=C,ht=Se,pt=ee,ft=Re,mt=Le,gt=ct.get,vt=ct.enforce,yt=String(String).split("String");(Te.exports=function(e,t,n,r){var a,i=!!r&&!!r.unsafe,s=!!r&&!!r.enumerable,o=!!r&&!!r.noTargetGet;"function"==typeof n&&("string"!=typeof t||pt(n,"name")||ht(n,"name",t),(a=vt(n)).source||(a.source=yt.join("string"==typeof t?t:""))),e!==lt?(i?!o&&e[t]&&(s=!0):delete e[t],s?e[t]=n:ht(e,t,n)):s?e[t]=n:ft(t,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&gt(this).source||mt(this)}));var bt=C,_t=bt,At=C,wt=function(e){return"function"==typeof e?e:void 0},Et=function(e,t){return arguments.length<2?wt(_t[e])||wt(At[e]):_t[e]&&_t[e][t]||At[e]&&At[e][t]},kt={},St=Math.ceil,Tt=Math.floor,xt=function(e){return isNaN(e=+e)?0:(e>0?Tt:St)(e)},Dt=xt,Rt=Math.min,Ot=function(e){return e>0?Rt(Dt(e),9007199254740991):0},It=xt,Ct=Math.max,Pt=Math.min,Lt=function(e,t){var n=It(e);return n<0?Ct(n+t,0):Pt(n,t)},Ut=Q,jt=Ot,Mt=Lt,Bt=function(e){return function(t,n,r){var a,i=Ut(t),s=jt(i.length),o=Mt(r,s);if(e&&n!=n){for(;s>o;)if((a=i[o++])!=a)return!0}else for(;s>o;o++)if((e||o in i)&&i[o]===n)return e||o||0;return!e&&-1}},Nt={includes:Bt(!0),indexOf:Bt(!1)},qt=ee,Gt=Q,Ft=Nt.indexOf,Vt=Ye,Kt=function(e,t){var n,r=Gt(e),a=0,i=[];for(n in r)!qt(Vt,n)&&qt(r,n)&&i.push(n);for(;t.length>a;)qt(r,n=t[a++])&&(~Ft(i,n)||i.push(n));return i},Wt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],zt=Kt,Ht=Wt.concat("length","prototype");kt.f=Object.getOwnPropertyNames||function(e){return zt(e,Ht)};var $t={};$t.f=Object.getOwnPropertySymbols;var Qt=kt,Yt=$t,Jt=ve,Xt=Et("Reflect","ownKeys")||function(e){var t=Qt.f(Jt(e)),n=Yt.f;return n?t.concat(n(e)):t},Zt=ee,en=Xt,tn=P,nn=me,rn=function(e,t){for(var n=en(t),r=nn.f,a=tn.f,i=0;i<n.length;i++){var s=n[i];Zt(e,s)||r(e,s,a(t,s))}},an=L,sn=/#|\.prototype\./,on=function(e,t){var n=un[dn(e)];return n==ln||n!=cn&&("function"==typeof t?an(t):!!t)},dn=on.normalize=function(e){return String(e).replace(sn,".").toLowerCase()},un=on.data={},cn=on.NATIVE="N",ln=on.POLYFILL="P",hn=on,pn=C,fn=P.f,mn=Se,gn=Te.exports,vn=Re,yn=rn,bn=hn,_n=function(e,t){var n,r,a,i,s,o=e.target,d=e.global,u=e.stat;if(n=d?pn:u?pn[o]||vn(o,{}):(pn[o]||{}).prototype)for(r in t){if(i=t[r],a=e.noTargetGet?(s=fn(n,r))&&s.value:n[r],!bn(d?r:o+(u?".":"#")+r,e.forced)&&void 0!==a){if(typeof i==typeof a)continue;yn(i,a)}(e.sham||a&&a.sham)&&mn(i,"sham",!0),gn(n,r,i,e)}},An=z,wn=function(e){return Object(An(e))},En=Kt,kn=Wt,Sn=Object.keys||function(e){return En(e,kn)},Tn=wn,xn=Sn;_n({target:"Object",stat:!0,forced:L((function(){xn(1)}))},{keys:function(e){return xn(Tn(e))}});var Dn,Rn,On=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e},In=On,Cn=function(e,t,n){if(In(e),void 0===t)return e;switch(n){case 0:return function(){return e.call(t)};case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,a){return e.call(t,n,r,a)}}return function(){return e.apply(t,arguments)}},Pn=F,Ln=Array.isArray||function(e){return"Array"==Pn(e)},Un="process"==F(C.process),jn=Et("navigator","userAgent")||"",Mn=jn,Bn=C.process,Nn=Bn&&Bn.versions,qn=Nn&&Nn.v8;qn?Rn=(Dn=qn.split("."))[0]+Dn[1]:Mn&&(!(Dn=Mn.match(/Edge\/(\d+)/))||Dn[1]>=74)&&(Dn=Mn.match(/Chrome\/(\d+)/))&&(Rn=Dn[1]);var Gn=Rn&&+Rn,Fn=Un,Vn=Gn,Kn=L,Wn=!!Object.getOwnPropertySymbols&&!Kn((function(){return!Symbol.sham&&(Fn?38===Vn:Vn>37&&Vn<41)})),zn=Wn&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Hn=C,$n=Be.exports,Qn=ee,Yn=We,Jn=Wn,Xn=zn,Zn=$n("wks"),er=Hn.Symbol,tr=Xn?er:er&&er.withoutSetter||Yn,nr=function(e){return Qn(Zn,e)&&(Jn||"string"==typeof Zn[e])||(Jn&&Qn(er,e)?Zn[e]=er[e]:Zn[e]=tr("Symbol."+e)),Zn[e]},rr=Y,ar=Ln,ir=nr("species"),sr=function(e,t){var n;return ar(e)&&("function"!=typeof(n=e.constructor)||n!==Array&&!ar(n.prototype)?rr(n)&&null===(n=n[ir])&&(n=void 0):n=void 0),new(void 0===n?Array:n)(0===t?0:t)},or=Cn,dr=W,ur=wn,cr=Ot,lr=sr,hr=[].push,pr=function(e){var t=1==e,n=2==e,r=3==e,a=4==e,i=6==e,s=7==e,o=5==e||i;return function(d,u,c,l){for(var h,p,f=ur(d),m=dr(f),g=or(u,c,3),v=cr(m.length),y=0,b=l||lr,_=t?b(d,v):n||s?b(d,0):void 0;v>y;y++)if((o||y in m)&&(p=g(h=m[y],y,f),e))if(t)_[y]=p;else if(p)switch(e){case 3:return!0;case 5:return h;case 6:return y;case 2:hr.call(_,h)}else switch(e){case 4:return!1;case 7:hr.call(_,h)}return i?-1:r||a?a:_}},fr={forEach:pr(0),map:pr(1),filter:pr(2),some:pr(3),every:pr(4),find:pr(5),findIndex:pr(6),filterOut:pr(7)},mr=L,gr=Gn,vr=nr("species"),yr=function(e){return gr>=51||!mr((function(){var t=[];return(t.constructor={})[vr]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},br=fr.filter;_n({target:"Array",proto:!0,forced:!yr("filter")},{filter:function(e){return br(this,e,arguments.length>1?arguments[1]:void 0)}});var _r=_n,Ar=L,wr=Q,Er=P.f,kr=U,Sr=Ar((function(){Er(1)}));_r({target:"Object",stat:!0,forced:!kr||Sr,sham:!kr},{getOwnPropertyDescriptor:function(e,t){return Er(wr(e),t)}});var Tr=X,xr=me,Dr=q,Rr=function(e,t,n){var r=Tr(t);r in e?xr.f(e,r,Dr(0,n)):e[r]=n},Or=Xt,Ir=Q,Cr=P,Pr=Rr;_n({target:"Object",stat:!0,sham:!U},{getOwnPropertyDescriptors:function(e){for(var t,n,r=Ir(e),a=Cr.f,i=Or(r),s={},o=0;i.length>o;)void 0!==(n=a(r,t=i[o++]))&&Pr(s,t,n);return s}});var Lr={};Lr[nr("toStringTag")]="z";var Ur="[object z]"===String(Lr),jr=Ur,Mr=F,Br=nr("toStringTag"),Nr="Arguments"==Mr(function(){return arguments}()),qr=jr?Mr:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),Br))?n:Nr?Mr(t):"Object"==(r=Mr(t))&&"function"==typeof t.callee?"Arguments":r},Gr=qr,Fr=Ur?{}.toString:function(){return"[object "+Gr(this)+"]"},Vr=Ur,Kr=Te.exports,Wr=Fr;Vr||Kr(Object.prototype,"toString",Wr,{unsafe:!0});var zr=C.Promise,Hr=Te.exports,$r=me.f,Qr=ee,Yr=nr("toStringTag"),Jr=function(e,t,n){e&&!Qr(e=n?e:e.prototype,Yr)&&$r(e,Yr,{configurable:!0,value:t})},Xr=Et,Zr=me,ea=U,ta=nr("species"),na=function(e){var t=Xr(e),n=Zr.f;ea&&t&&!t[ta]&&n(t,ta,{configurable:!0,get:function(){return this}})},ra={},aa=ra,ia=nr("iterator"),sa=Array.prototype,oa=function(e){return void 0!==e&&(aa.Array===e||sa[ia]===e)},da=qr,ua=ra,ca=nr("iterator"),la=function(e){if(null!=e)return e[ca]||e["@@iterator"]||ua[da(e)]},ha=ve,pa=function(e){var t=e.return;if(void 0!==t)return ha(t.call(e)).value},fa=ve,ma=oa,ga=Ot,va=Cn,ya=la,ba=pa,_a=function(e,t){this.stopped=e,this.result=t},Aa=nr("iterator"),wa=!1;try{var Ea=0,ka={next:function(){return{done:!!Ea++}},return:function(){wa=!0}};ka[Aa]=function(){return this},Array.from(ka,(function(){throw 2}))}catch(e){}var Sa,Ta,xa,Da=function(e,t){if(!t&&!wa)return!1;var n=!1;try{var r={};r[Aa]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch(e){}return n},Ra=ve,Oa=On,Ia=nr("species"),Ca=function(e,t){var n,r=Ra(e).constructor;return void 0===r||null==(n=Ra(r)[Ia])?t:Oa(n)},Pa=Et("document","documentElement"),La=/(?:iphone|ipod|ipad).*applewebkit/i.test(jn),Ua=C,ja=L,Ma=Cn,Ba=Pa,Na=ae,qa=La,Ga=Un,Fa=Ua.location,Va=Ua.setImmediate,Ka=Ua.clearImmediate,Wa=Ua.process,za=Ua.MessageChannel,Ha=Ua.Dispatch,$a=0,Qa={},Ya=function(e){if(Qa.hasOwnProperty(e)){var t=Qa[e];delete Qa[e],t()}},Ja=function(e){return function(){Ya(e)}},Xa=function(e){Ya(e.data)},Za=function(e){Ua.postMessage(e+"",Fa.protocol+"//"+Fa.host)};Va&&Ka||(Va=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return Qa[++$a]=function(){("function"==typeof e?e:Function(e)).apply(void 0,t)},Sa($a),$a},Ka=function(e){delete Qa[e]},Ga?Sa=function(e){Wa.nextTick(Ja(e))}:Ha&&Ha.now?Sa=function(e){Ha.now(Ja(e))}:za&&!qa?(xa=(Ta=new za).port2,Ta.port1.onmessage=Xa,Sa=Ma(xa.postMessage,xa,1)):Ua.addEventListener&&"function"==typeof postMessage&&!Ua.importScripts&&Fa&&"file:"!==Fa.protocol&&!ja(Za)?(Sa=Za,Ua.addEventListener("message",Xa,!1)):Sa="onreadystatechange"in Na("script")?function(e){Ba.appendChild(Na("script")).onreadystatechange=function(){Ba.removeChild(this),Ya(e)}}:function(e){setTimeout(Ja(e),0)});var ei,ti,ni,ri,ai,ii,si,oi,di={set:Va,clear:Ka},ui=/web0s(?!.*chrome)/i.test(jn),ci=C,li=P.f,hi=di.set,pi=La,fi=ui,mi=Un,gi=ci.MutationObserver||ci.WebKitMutationObserver,vi=ci.document,yi=ci.process,bi=ci.Promise,_i=li(ci,"queueMicrotask"),Ai=_i&&_i.value;Ai||(ei=function(){var e,t;for(mi&&(e=yi.domain)&&e.exit();ti;){t=ti.fn,ti=ti.next;try{t()}catch(e){throw ti?ri():ni=void 0,e}}ni=void 0,e&&e.enter()},pi||mi||fi||!gi||!vi?bi&&bi.resolve?(si=bi.resolve(void 0),oi=si.then,ri=function(){oi.call(si,ei)}):ri=mi?function(){yi.nextTick(ei)}:function(){hi.call(ci,ei)}:(ai=!0,ii=vi.createTextNode(""),new gi(ei).observe(ii,{characterData:!0}),ri=function(){ii.data=ai=!ai}));var wi=Ai||function(e){var t={fn:e,next:void 0};ni&&(ni.next=t),ti||(ti=t,ri()),ni=t},Ei={},ki=On,Si=function(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=r})),this.resolve=ki(t),this.reject=ki(n)};Ei.f=function(e){return new Si(e)};var Ti,xi,Di,Ri,Oi=ve,Ii=Y,Ci=Ei,Pi=function(e,t){if(Oi(e),Ii(t)&&t.constructor===e)return t;var n=Ci.f(e);return(0,n.resolve)(t),n.promise},Li=C,Ui=_n,ji=C,Mi=Et,Bi=zr,Ni=Te.exports,qi=function(e,t,n){for(var r in t)Hr(e,r,t[r],n);return e},Gi=Jr,Fi=na,Vi=Y,Ki=On,Wi=function(e,t,n){if(!(e instanceof t))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return e},zi=Le,Hi=function(e,t,n){var r,a,i,s,o,d,u,c=n&&n.that,l=!(!n||!n.AS_ENTRIES),h=!(!n||!n.IS_ITERATOR),p=!(!n||!n.INTERRUPTED),f=va(t,c,1+l+p),m=function(e){return r&&ba(r),new _a(!0,e)},g=function(e){return l?(fa(e),p?f(e[0],e[1],m):f(e[0],e[1])):p?f(e,m):f(e)};if(h)r=e;else{if("function"!=typeof(a=ya(e)))throw TypeError("Target is not iterable");if(ma(a)){for(i=0,s=ga(e.length);s>i;i++)if((o=g(e[i]))&&o instanceof _a)return o;return new _a(!1)}r=a.call(e)}for(d=r.next;!(u=d.call(r)).done;){try{o=g(u.value)}catch(e){throw ba(r),e}if("object"==typeof o&&o&&o instanceof _a)return o}return new _a(!1)},$i=Da,Qi=Ca,Yi=di.set,Ji=wi,Xi=Pi,Zi=function(e,t){var n=Li.console;n&&n.error&&(1===arguments.length?n.error(e):n.error(e,t))},es=Ei,ts=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},ns=ct,rs=hn,as=Un,is=Gn,ss=nr("species"),os="Promise",ds=ns.get,us=ns.set,cs=ns.getterFor(os),ls=Bi,hs=ji.TypeError,ps=ji.document,fs=ji.process,ms=Mi("fetch"),gs=es.f,vs=gs,ys=!!(ps&&ps.createEvent&&ji.dispatchEvent),bs="function"==typeof PromiseRejectionEvent,_s=rs(os,(function(){if(!(zi(ls)!==String(ls))){if(66===is)return!0;if(!as&&!bs)return!0}if(is>=51&&/native code/.test(ls))return!1;var e=ls.resolve(1),t=function(e){e((function(){}),(function(){}))};return(e.constructor={})[ss]=t,!(e.then((function(){}))instanceof t)})),As=_s||!$i((function(e){ls.all(e).catch((function(){}))})),ws=function(e){var t;return!(!Vi(e)||"function"!=typeof(t=e.then))&&t},Es=function(e,t){if(!e.notified){e.notified=!0;var n=e.reactions;Ji((function(){for(var r=e.value,a=1==e.state,i=0;n.length>i;){var s,o,d,u=n[i++],c=a?u.ok:u.fail,l=u.resolve,h=u.reject,p=u.domain;try{c?(a||(2===e.rejection&&xs(e),e.rejection=1),!0===c?s=r:(p&&p.enter(),s=c(r),p&&(p.exit(),d=!0)),s===u.promise?h(hs("Promise-chain cycle")):(o=ws(s))?o.call(s,l,h):l(s)):h(r)}catch(e){p&&!d&&p.exit(),h(e)}}e.reactions=[],e.notified=!1,t&&!e.rejection&&Ss(e)}))}},ks=function(e,t,n){var r,a;ys?((r=ps.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),ji.dispatchEvent(r)):r={promise:t,reason:n},!bs&&(a=ji["on"+e])?a(r):"unhandledrejection"===e&&Zi("Unhandled promise rejection",n)},Ss=function(e){Yi.call(ji,(function(){var t,n=e.facade,r=e.value;if(Ts(e)&&(t=ts((function(){as?fs.emit("unhandledRejection",r,n):ks("unhandledrejection",n,r)})),e.rejection=as||Ts(e)?2:1,t.error))throw t.value}))},Ts=function(e){return 1!==e.rejection&&!e.parent},xs=function(e){Yi.call(ji,(function(){var t=e.facade;as?fs.emit("rejectionHandled",t):ks("rejectionhandled",t,e.value)}))},Ds=function(e,t,n){return function(r){e(t,r,n)}},Rs=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,Es(e,!0))},Os=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw hs("Promise can't be resolved itself");var r=ws(t);r?Ji((function(){var n={done:!1};try{r.call(t,Ds(Os,n,e),Ds(Rs,n,e))}catch(t){Rs(n,t,e)}})):(e.value=t,e.state=1,Es(e,!1))}catch(t){Rs({done:!1},t,e)}}};_s&&(ls=function(e){Wi(this,ls,os),Ki(e),Ti.call(this);var t=ds(this);try{e(Ds(Os,t),Ds(Rs,t))}catch(e){Rs(t,e)}},(Ti=function(e){us(this,{type:os,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=qi(ls.prototype,{then:function(e,t){var n=cs(this),r=gs(Qi(this,ls));return r.ok="function"!=typeof e||e,r.fail="function"==typeof t&&t,r.domain=as?fs.domain:void 0,n.parent=!0,n.reactions.push(r),0!=n.state&&Es(n,!1),r.promise},catch:function(e){return this.then(void 0,e)}}),xi=function(){var e=new Ti,t=ds(e);this.promise=e,this.resolve=Ds(Os,t),this.reject=Ds(Rs,t)},es.f=gs=function(e){return e===ls||e===Di?new xi(e):vs(e)},"function"==typeof Bi&&(Ri=Bi.prototype.then,Ni(Bi.prototype,"then",(function(e,t){var n=this;return new ls((function(e,t){Ri.call(n,e,t)})).then(e,t)}),{unsafe:!0}),"function"==typeof ms&&Ui({global:!0,enumerable:!0,forced:!0},{fetch:function(e){return Xi(ls,ms.apply(ji,arguments))}}))),Ui({global:!0,wrap:!0,forced:_s},{Promise:ls}),Gi(ls,os,!1),Fi(os),Di=Mi(os),Ui({target:os,stat:!0,forced:_s},{reject:function(e){var t=gs(this);return t.reject.call(void 0,e),t.promise}}),Ui({target:os,stat:!0,forced:_s},{resolve:function(e){return Xi(this,e)}}),Ui({target:os,stat:!0,forced:As},{all:function(e){var t=this,n=gs(t),r=n.resolve,a=n.reject,i=ts((function(){var n=Ki(t.resolve),i=[],s=0,o=1;Hi(e,(function(e){var d=s++,u=!1;i.push(void 0),o++,n.call(t,e).then((function(e){u||(u=!0,i[d]=e,--o||r(i))}),a)})),--o||r(i)}));return i.error&&a(i.value),n.promise},race:function(e){var t=this,n=gs(t),r=n.reject,a=ts((function(){var a=Ki(t.resolve);Hi(e,(function(e){a.call(t,e).then(n.resolve,r)}))}));return a.error&&r(a.value),n.promise}});var Is=_n,Cs=zr,Ps=L,Ls=Et,Us=Ca,js=Pi,Ms=Te.exports;Is({target:"Promise",proto:!0,real:!0,forced:!!Cs&&Ps((function(){Cs.prototype.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=Us(this,Ls("Promise")),n="function"==typeof e;return this.then(n?function(n){return js(t,e()).then((function(){return n}))}:e,n?function(n){return js(t,e()).then((function(){throw n}))}:e)}}),"function"!=typeof Cs||Cs.prototype.finally||Ms(Cs.prototype,"finally",Ls("Promise").prototype.finally);var Bs=ve,Ns=function(){var e=Bs(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t},qs={},Gs=L;function Fs(e,t){return RegExp(e,t)}qs.UNSUPPORTED_Y=Gs((function(){var e=Fs("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),qs.BROKEN_CARET=Gs((function(){var e=Fs("^r","gy");return e.lastIndex=2,null!=e.exec("str")}));var Vs=Ns,Ks=qs,Ws=Be.exports,zs=RegExp.prototype.exec,Hs=Ws("native-string-replace",String.prototype.replace),$s=zs,Qs=function(){var e=/a/,t=/b*/g;return zs.call(e,"a"),zs.call(t,"a"),0!==e.lastIndex||0!==t.lastIndex}(),Ys=Ks.UNSUPPORTED_Y||Ks.BROKEN_CARET,Js=void 0!==/()??/.exec("")[1];(Qs||Js||Ys)&&($s=function(e){var t,n,r,a,i=this,s=Ys&&i.sticky,o=Vs.call(i),d=i.source,u=0,c=e;return s&&(-1===(o=o.replace("y","")).indexOf("g")&&(o+="g"),c=String(e).slice(i.lastIndex),i.lastIndex>0&&(!i.multiline||i.multiline&&"\n"!==e[i.lastIndex-1])&&(d="(?: "+d+")",c=" "+c,u++),n=new RegExp("^(?:"+d+")",o)),Js&&(n=new RegExp("^"+d+"$(?!\\s)",o)),Qs&&(t=i.lastIndex),r=zs.call(s?n:i,c),s?r?(r.input=r.input.slice(u),r[0]=r[0].slice(u),r.index=i.lastIndex,i.lastIndex+=r[0].length):i.lastIndex=0:Qs&&r&&(i.lastIndex=i.global?r.index+r[0].length:t),Js&&r&&r.length>1&&Hs.call(r[0],n,(function(){for(a=1;a<arguments.length-2;a++)void 0===arguments[a]&&(r[a]=void 0)})),r});var Xs=$s;_n({target:"RegExp",proto:!0,forced:/./.exec!==Xs},{exec:Xs});var Zs=Te.exports,eo=L,to=nr,no=Se,ro=to("species"),ao=!eo((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")})),io="$0"==="a".replace(/./,"$0"),so=to("replace"),oo=!!/./[so]&&""===/./[so]("a","$0"),uo=!eo((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2!==n.length||"a"!==n[0]||"b"!==n[1]})),co=function(e,t,n,r){var a=to(e),i=!eo((function(){var t={};return t[a]=function(){return 7},7!=""[e](t)})),s=i&&!eo((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[ro]=function(){return n},n.flags="",n[a]=/./[a]),n.exec=function(){return t=!0,null},n[a](""),!t}));if(!i||!s||"replace"===e&&(!ao||!io||oo)||"split"===e&&!uo){var o=/./[a],d=n(a,""[e],(function(e,t,n,r,a){return t.exec===RegExp.prototype.exec?i&&!a?{done:!0,value:o.call(t,n,r)}:{done:!0,value:e.call(n,t,r)}:{done:!1}}),{REPLACE_KEEPS_$0:io,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:oo}),u=d[0],c=d[1];Zs(String.prototype,e,u),Zs(RegExp.prototype,a,2==t?function(e,t){return c.call(e,this,t)}:function(e){return c.call(e,this)})}r&&no(RegExp.prototype[a],"sham",!0)},lo=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t},ho=F,po=Xs,fo=function(e,t){var n=e.exec;if("function"==typeof n){var r=n.call(e,t);if("object"!=typeof r)throw TypeError("RegExp exec method returned something other than an Object or null");return r}if("RegExp"!==ho(e))throw TypeError("RegExp#exec called on incompatible receiver");return po.call(e,t)},mo=ve,go=z,vo=lo,yo=fo;co("search",1,(function(e,t,n){return[function(t){var n=go(this),r=null==t?void 0:t[e];return void 0!==r?r.call(t,n):new RegExp(t)[e](String(n))},function(e){var r=n(t,e,this);if(r.done)return r.value;var a=mo(e),i=String(this),s=a.lastIndex;vo(s,0)||(a.lastIndex=0);var o=yo(a,i);return vo(a.lastIndex,s)||(a.lastIndex=s),null===o?-1:o.index}]}));var bo=z,_o="[\t\n\v\f\r                 \u2028\u2029\ufeff]",Ao=RegExp("^"+_o+_o+"*"),wo=RegExp(_o+_o+"*$"),Eo=function(e){return function(t){var n=String(bo(t));return 1&e&&(n=n.replace(Ao,"")),2&e&&(n=n.replace(wo,"")),n}},ko={start:Eo(1),end:Eo(2),trim:Eo(3)},So=L,To="\t\n\v\f\r                 \u2028\u2029\ufeff",xo=ko.trim;_n({target:"String",proto:!0,forced:function(e){return So((function(){return!!To[e]()||"​…᠎"!="​…᠎"[e]()||To[e].name!==e}))}("trim")},{trim:function(){return xo(this)}});var Do={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},Ro=L,Oo=fr.forEach,Io=C,Co=Do,Po=function(e,t){var n=[][e];return!!n&&Ro((function(){n.call(null,t||function(){throw 1},1)}))}("forEach")?[].forEach:function(e){return Oo(this,e,arguments.length>1?arguments[1]:void 0)},Lo=Se;for(var Uo in Co){var jo=Io[Uo],Mo=jo&&jo.prototype;if(Mo&&Mo.forEach!==Po)try{Lo(Mo,"forEach",Po)}catch(e){Mo.forEach=Po}}var Bo=Y,No=ve,qo=function(e){if(!Bo(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype");return e},Go=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),t=n instanceof Array}catch(e){}return function(n,r){return No(n),qo(r),t?e.call(n,r):n.__proto__=r,n}}():void 0),Fo=Y,Vo=Go,Ko=Y,Wo=F,zo=nr("match"),Ho=function(e){var t;return Ko(e)&&(void 0!==(t=e[zo])?!!t:"RegExp"==Wo(e))},$o=U,Qo=C,Yo=hn,Jo=function(e,t,n){var r,a;return Vo&&"function"==typeof(r=t.constructor)&&r!==n&&Fo(a=r.prototype)&&a!==n.prototype&&Vo(e,a),e},Xo=me.f,Zo=kt.f,ed=Ho,td=Ns,nd=qs,rd=Te.exports,ad=L,id=ct.set,sd=na,od=nr("match"),dd=Qo.RegExp,ud=dd.prototype,cd=/a/g,ld=/a/g,hd=new dd(cd)!==cd,pd=nd.UNSUPPORTED_Y;if($o&&Yo("RegExp",!hd||pd||ad((function(){return ld[od]=!1,dd(cd)!=cd||dd(ld)==ld||"/a/i"!=dd(cd,"i")})))){for(var fd=function(e,t){var n,r=this instanceof fd,a=ed(e),i=void 0===t;if(!r&&a&&e.constructor===fd&&i)return e;hd?a&&!i&&(e=e.source):e instanceof fd&&(i&&(t=td.call(e)),e=e.source),pd&&(n=!!t&&t.indexOf("y")>-1)&&(t=t.replace(/y/g,""));var s=Jo(hd?new dd(e,t):dd(e,t),r?this:ud,fd);return pd&&n&&id(s,{sticky:n}),s},md=function(e){e in fd||Xo(fd,e,{configurable:!0,get:function(){return dd[e]},set:function(t){dd[e]=t}})},gd=Zo(dd),vd=0;gd.length>vd;)md(gd[vd++]);ud.constructor=fd,fd.prototype=ud,rd(Qo,"RegExp",fd)}sd("RegExp");var yd=Te.exports,bd=ve,_d=L,Ad=Ns,wd=RegExp.prototype,Ed=wd.toString,kd=_d((function(){return"/a/b"!=Ed.call({source:"a",flags:"b"})})),Sd="toString"!=Ed.name;(kd||Sd)&&yd(RegExp.prototype,"toString",(function(){var e=bd(this),t=String(e.source),n=e.flags;return"/"+t+"/"+String(void 0===n&&e instanceof RegExp&&!("flags"in wd)?Ad.call(e):n)}),{unsafe:!0});var Td=_n,xd=L,Dd=Ln,Rd=Y,Od=wn,Id=Ot,Cd=Rr,Pd=sr,Ld=yr,Ud=Gn,jd=nr("isConcatSpreadable"),Md=Ud>=51||!xd((function(){var e=[];return e[jd]=!1,e.concat()[0]!==e})),Bd=Ld("concat"),Nd=function(e){if(!Rd(e))return!1;var t=e[jd];return void 0!==t?!!t:Dd(e)};Td({target:"Array",proto:!0,forced:!Md||!Bd},{concat:function(e){var t,n,r,a,i,s=Od(this),o=Pd(s,0),d=0;for(t=-1,r=arguments.length;t<r;t++)if(Nd(i=-1===t?s:arguments[t])){if(d+(a=Id(i.length))>9007199254740991)throw TypeError("Maximum allowed index exceeded");for(n=0;n<a;n++,d++)n in i&&Cd(o,d,i[n])}else{if(d>=9007199254740991)throw TypeError("Maximum allowed index exceeded");Cd(o,d++,i)}return o.length=d,o}});var qd,Gd=Ho,Fd=function(e){if(Gd(e))throw TypeError("The method doesn't accept regular expressions");return e},Vd=nr("match"),Kd=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[Vd]=!1,"/./"[e](t)}catch(e){}}return!1},Wd=_n,zd=P.f,Hd=Ot,$d=Fd,Qd=z,Yd=Kd,Jd="".startsWith,Xd=Math.min,Zd=Yd("startsWith");Wd({target:"String",proto:!0,forced:!!(Zd||(qd=zd(String.prototype,"startsWith"),!qd||qd.writable))&&!Zd},{startsWith:function(e){var t=String(Qd(this));$d(e);var n=Hd(Xd(arguments.length>1?arguments[1]:void 0,t.length)),r=String(e);return Jd?Jd.call(t,r,n):t.slice(n,n+r.length)===r}});var eu=xt,tu=z,nu=function(e){return function(t,n){var r,a,i=String(tu(t)),s=eu(n),o=i.length;return s<0||s>=o?e?"":void 0:(r=i.charCodeAt(s))<55296||r>56319||s+1===o||(a=i.charCodeAt(s+1))<56320||a>57343?e?i.charAt(s):r:e?i.slice(s,s+2):a-56320+(r-55296<<10)+65536}},ru={codeAt:nu(!1),charAt:nu(!0)},au=ru.charAt,iu=function(e,t,n){return t+(n?au(e,t).length:1)},su=wn,ou=Math.floor,du="".replace,uu=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,cu=/\$([$&'`]|\d{1,2})/g,lu=co,hu=ve,pu=Ot,fu=xt,mu=z,gu=iu,vu=function(e,t,n,r,a,i){var s=n+e.length,o=r.length,d=cu;return void 0!==a&&(a=su(a),d=uu),du.call(i,d,(function(i,d){var u;switch(d.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,n);case"'":return t.slice(s);case"<":u=a[d.slice(1,-1)];break;default:var c=+d;if(0===c)return i;if(c>o){var l=ou(c/10);return 0===l?i:l<=o?void 0===r[l-1]?d.charAt(1):r[l-1]+d.charAt(1):i}u=r[c-1]}return void 0===u?"":u}))},yu=fo,bu=Math.max,_u=Math.min;lu("replace",2,(function(e,t,n,r){var a=r.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,i=r.REPLACE_KEEPS_$0,s=a?"$":"$0";return[function(n,r){var a=mu(this),i=null==n?void 0:n[e];return void 0!==i?i.call(n,a,r):t.call(String(a),n,r)},function(e,r){if(!a&&i||"string"==typeof r&&-1===r.indexOf(s)){var o=n(t,e,this,r);if(o.done)return o.value}var d=hu(e),u=String(this),c="function"==typeof r;c||(r=String(r));var l=d.global;if(l){var h=d.unicode;d.lastIndex=0}for(var p=[];;){var f=yu(d,u);if(null===f)break;if(p.push(f),!l)break;""===String(f[0])&&(d.lastIndex=gu(u,pu(d.lastIndex),h))}for(var m,g="",v=0,y=0;y<p.length;y++){f=p[y];for(var b=String(f[0]),_=bu(_u(fu(f.index),u.length),0),A=[],w=1;w<f.length;w++)A.push(void 0===(m=f[w])?m:String(m));var E=f.groups;if(c){var k=[b].concat(A,_,u);void 0!==E&&k.push(E);var S=String(r.apply(void 0,k))}else S=vu(b,u,_,A,E,r);_>=v&&(g+=u.slice(v,_)+S,v=_+b.length)}return g+u.slice(v)}]}));var Au=U,wu=me.f,Eu=Function.prototype,ku=Eu.toString,Su=/^\s*function ([^ (]*)/;Au&&!("name"in Eu)&&wu(Eu,"name",{configurable:!0,get:function(){try{return ku.call(this).match(Su)[1]}catch(e){return""}}});var Tu,xu=me,Du=ve,Ru=Sn,Ou=U?Object.defineProperties:function(e,t){Du(e);for(var n,r=Ru(t),a=r.length,i=0;a>i;)xu.f(e,n=r[i++],t[n]);return e},Iu=ve,Cu=Ou,Pu=Wt,Lu=Ye,Uu=Pa,ju=ae,Mu=Qe("IE_PROTO"),Bu=function(){},Nu=function(e){return"<script>"+e+"<\/script>"},qu=function(){try{Tu=document.domain&&new ActiveXObject("htmlfile")}catch(e){}var e,t;qu=Tu?function(e){e.write(Nu("")),e.close();var t=e.parentWindow.Object;return e=null,t}(Tu):((t=ju("iframe")).style.display="none",Uu.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(Nu("document.F=Object")),e.close(),e.F);for(var n=Pu.length;n--;)delete qu.prototype[Pu[n]];return qu()};Lu[Mu]=!0;var Gu=Object.create||function(e,t){var n;return null!==e?(Bu.prototype=Iu(e),n=new Bu,Bu.prototype=null,n[Mu]=e):n=qu(),void 0===t?n:Cu(n,t)},Fu={},Vu=Q,Ku=kt.f,Wu={}.toString,zu="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];Fu.f=function(e){return zu&&"[object Window]"==Wu.call(e)?function(e){try{return Ku(e)}catch(e){return zu.slice()}}(e):Ku(Vu(e))};var Hu={},$u=nr;Hu.f=$u;var Qu=bt,Yu=ee,Ju=Hu,Xu=me.f,Zu=function(e){var t=Qu.Symbol||(Qu.Symbol={});Yu(t,e)||Xu(t,e,{value:Ju.f(e)})},ec=_n,tc=C,nc=Et,rc=U,ac=Wn,ic=zn,sc=L,oc=ee,dc=Ln,uc=Y,cc=ve,lc=wn,hc=Q,pc=X,fc=q,mc=Gu,gc=Sn,vc=kt,yc=Fu,bc=$t,_c=P,Ac=me,wc=j,Ec=Se,kc=Te.exports,Sc=Be.exports,Tc=Ye,xc=We,Dc=nr,Rc=Hu,Oc=Zu,Ic=Jr,Cc=ct,Pc=fr.forEach,Lc=Qe("hidden"),Uc=Dc("toPrimitive"),jc=Cc.set,Mc=Cc.getterFor("Symbol"),Bc=Object.prototype,Nc=tc.Symbol,qc=nc("JSON","stringify"),Gc=_c.f,Fc=Ac.f,Vc=yc.f,Kc=wc.f,Wc=Sc("symbols"),zc=Sc("op-symbols"),Hc=Sc("string-to-symbol-registry"),$c=Sc("symbol-to-string-registry"),Qc=Sc("wks"),Yc=tc.QObject,Jc=!Yc||!Yc.prototype||!Yc.prototype.findChild,Xc=rc&&sc((function(){return 7!=mc(Fc({},"a",{get:function(){return Fc(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=Gc(Bc,t);r&&delete Bc[t],Fc(e,t,n),r&&e!==Bc&&Fc(Bc,t,r)}:Fc,Zc=function(e,t){var n=Wc[e]=mc(Nc.prototype);return jc(n,{type:"Symbol",tag:e,description:t}),rc||(n.description=t),n},el=ic?function(e){return"symbol"==typeof e}:function(e){return Object(e)instanceof Nc},tl=function(e,t,n){e===Bc&&tl(zc,t,n),cc(e);var r=pc(t,!0);return cc(n),oc(Wc,r)?(n.enumerable?(oc(e,Lc)&&e[Lc][r]&&(e[Lc][r]=!1),n=mc(n,{enumerable:fc(0,!1)})):(oc(e,Lc)||Fc(e,Lc,fc(1,{})),e[Lc][r]=!0),Xc(e,r,n)):Fc(e,r,n)},nl=function(e,t){cc(e);var n=hc(t),r=gc(n).concat(sl(n));return Pc(r,(function(t){rc&&!rl.call(n,t)||tl(e,t,n[t])})),e},rl=function(e){var t=pc(e,!0),n=Kc.call(this,t);return!(this===Bc&&oc(Wc,t)&&!oc(zc,t))&&(!(n||!oc(this,t)||!oc(Wc,t)||oc(this,Lc)&&this[Lc][t])||n)},al=function(e,t){var n=hc(e),r=pc(t,!0);if(n!==Bc||!oc(Wc,r)||oc(zc,r)){var a=Gc(n,r);return!a||!oc(Wc,r)||oc(n,Lc)&&n[Lc][r]||(a.enumerable=!0),a}},il=function(e){var t=Vc(hc(e)),n=[];return Pc(t,(function(e){oc(Wc,e)||oc(Tc,e)||n.push(e)})),n},sl=function(e){var t=e===Bc,n=Vc(t?zc:hc(e)),r=[];return Pc(n,(function(e){!oc(Wc,e)||t&&!oc(Bc,e)||r.push(Wc[e])})),r};(ac||(kc((Nc=function(){if(this instanceof Nc)throw TypeError("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?String(arguments[0]):void 0,t=xc(e),n=function(e){this===Bc&&n.call(zc,e),oc(this,Lc)&&oc(this[Lc],t)&&(this[Lc][t]=!1),Xc(this,t,fc(1,e))};return rc&&Jc&&Xc(Bc,t,{configurable:!0,set:n}),Zc(t,e)}).prototype,"toString",(function(){return Mc(this).tag})),kc(Nc,"withoutSetter",(function(e){return Zc(xc(e),e)})),wc.f=rl,Ac.f=tl,_c.f=al,vc.f=yc.f=il,bc.f=sl,Rc.f=function(e){return Zc(Dc(e),e)},rc&&(Fc(Nc.prototype,"description",{configurable:!0,get:function(){return Mc(this).description}}),kc(Bc,"propertyIsEnumerable",rl,{unsafe:!0}))),ec({global:!0,wrap:!0,forced:!ac,sham:!ac},{Symbol:Nc}),Pc(gc(Qc),(function(e){Oc(e)})),ec({target:"Symbol",stat:!0,forced:!ac},{for:function(e){var t=String(e);if(oc(Hc,t))return Hc[t];var n=Nc(t);return Hc[t]=n,$c[n]=t,n},keyFor:function(e){if(!el(e))throw TypeError(e+" is not a symbol");if(oc($c,e))return $c[e]},useSetter:function(){Jc=!0},useSimple:function(){Jc=!1}}),ec({target:"Object",stat:!0,forced:!ac,sham:!rc},{create:function(e,t){return void 0===t?mc(e):nl(mc(e),t)},defineProperty:tl,defineProperties:nl,getOwnPropertyDescriptor:al}),ec({target:"Object",stat:!0,forced:!ac},{getOwnPropertyNames:il,getOwnPropertySymbols:sl}),ec({target:"Object",stat:!0,forced:sc((function(){bc.f(1)}))},{getOwnPropertySymbols:function(e){return bc.f(lc(e))}}),qc)&&ec({target:"JSON",stat:!0,forced:!ac||sc((function(){var e=Nc();return"[null]"!=qc([e])||"{}"!=qc({a:e})||"{}"!=qc(Object(e))}))},{stringify:function(e,t,n){for(var r,a=[e],i=1;arguments.length>i;)a.push(arguments[i++]);if(r=t,(uc(t)||void 0!==e)&&!el(e))return dc(t)||(t=function(e,t){if("function"==typeof r&&(t=r.call(this,e,t)),!el(t))return t}),a[1]=t,qc.apply(null,a)}});Nc.prototype[Uc]||Ec(Nc.prototype,Uc,Nc.prototype.valueOf),Ic(Nc,"Symbol"),Tc[Lc]=!0;var ol=_n,dl=U,ul=C,cl=ee,ll=Y,hl=me.f,pl=rn,fl=ul.Symbol;if(dl&&"function"==typeof fl&&(!("description"in fl.prototype)||void 0!==fl().description)){var ml={},gl=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),t=this instanceof gl?new fl(e):void 0===e?fl():fl(e);return""===e&&(ml[t]=!0),t};pl(gl,fl);var vl=gl.prototype=fl.prototype;vl.constructor=gl;var yl=vl.toString,bl="Symbol(test)"==String(fl("test")),_l=/^Symbol\((.*)\)[^)]+$/;hl(vl,"description",{configurable:!0,get:function(){var e=ll(this)?this.valueOf():this,t=yl.call(e);if(cl(ml,e))return"";var n=bl?t.slice(7,-1):t.replace(_l,"$1");return""===n?void 0:n}}),ol({global:!0,forced:!0},{Symbol:gl})}var Al=Gu,wl=me,El=nr("unscopables"),kl=Array.prototype;null==kl[El]&&wl.f(kl,El,{configurable:!0,value:Al(null)});var Sl=function(e){kl[El][e]=!0},Tl=Nt.includes,xl=Sl;_n({target:"Array",proto:!0},{includes:function(e){return Tl(this,e,arguments.length>1?arguments[1]:void 0)}}),xl("includes");var Dl=Fd,Rl=z;_n({target:"String",proto:!0,forced:!Kd("includes")},{includes:function(e){return!!~String(Rl(this)).indexOf(Dl(e),arguments.length>1?arguments[1]:void 0)}});var Ol=_n,Il=fr.find,Cl=Sl,Pl=!0;"find"in[]&&Array(1).find((function(){Pl=!1})),Ol({target:"Array",proto:!0,forced:Pl},{find:function(e){return Il(this,e,arguments.length>1?arguments[1]:void 0)}}),Cl("find");var Ll="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==Ll&&Ll,Ul="URLSearchParams"in Ll,jl="Symbol"in Ll&&"iterator"in Symbol,Ml="FileReader"in Ll&&"Blob"in Ll&&function(){try{return new Blob,!0}catch(e){return!1}}(),Bl="FormData"in Ll,Nl="ArrayBuffer"in Ll;if(Nl)var ql=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],Gl=ArrayBuffer.isView||function(e){return e&&ql.indexOf(Object.prototype.toString.call(e))>-1};function Fl(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 Vl(e){return"string"!=typeof e&&(e=String(e)),e}function Kl(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return jl&&(t[Symbol.iterator]=function(){return t}),t}function Wl(e){this.map={},e instanceof Wl?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 zl(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function Hl(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function $l(e){var t=new FileReader,n=Hl(t);return t.readAsArrayBuffer(e),n}function Ql(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function Yl(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:Ml&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:Bl&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:Ul&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():Nl&&Ml&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=Ql(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):Nl&&(ArrayBuffer.prototype.isPrototypeOf(e)||Gl(e))?this._bodyArrayBuffer=Ql(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):Ul&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},Ml&&(this.blob=function(){var e=zl(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=zl(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($l)}),this.text=function(){var e=zl(this);if(e)return e;if(this._bodyBlob)return function(e){var t=new FileReader,n=Hl(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)},Bl&&(this.formData=function(){return this.text().then(Zl)}),this.json=function(){return this.text().then(JSON.parse)},this}Wl.prototype.append=function(e,t){e=Fl(e),t=Vl(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},Wl.prototype.delete=function(e){delete this.map[Fl(e)]},Wl.prototype.get=function(e){return e=Fl(e),this.has(e)?this.map[e]:null},Wl.prototype.has=function(e){return this.map.hasOwnProperty(Fl(e))},Wl.prototype.set=function(e,t){this.map[Fl(e)]=Vl(t)},Wl.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},Wl.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),Kl(e)},Wl.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),Kl(e)},Wl.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),Kl(e)},jl&&(Wl.prototype[Symbol.iterator]=Wl.prototype.entries);var Jl=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function Xl(e,t){if(!(this instanceof Xl))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var n,r,a=(t=t||{}).body;if(e instanceof Xl){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new Wl(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,a||null==e._bodyInit||(a=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new Wl(t.headers)),this.method=(n=t.method||this.method||"GET",r=n.toUpperCase(),Jl.indexOf(r)>-1?r:n),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&a)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(a),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==t.cache&&"no-cache"!==t.cache)){var i=/([?&])_=[^&]*/;if(i.test(this.url))this.url=this.url.replace(i,"$1_="+(new Date).getTime());else{this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}}function Zl(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),a=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(a))}})),t}function eh(e,t){if(!(this instanceof eh))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 Wl(t.headers),this.url=t.url||"",this._initBody(e)}Xl.prototype.clone=function(){return new Xl(this,{body:this._bodyInit})},Yl.call(Xl.prototype),Yl.call(eh.prototype),eh.prototype.clone=function(){return new eh(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new Wl(this.headers),url:this.url})},eh.error=function(){var e=new eh(null,{status:0,statusText:""});return e.type="error",e};var th=[301,302,303,307,308];eh.redirect=function(e,t){if(-1===th.indexOf(t))throw new RangeError("Invalid status code");return new eh(null,{status:t,headers:{location:e}})};var nh=Ll.DOMException;try{new nh}catch(e){(nh=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack}).prototype=Object.create(Error.prototype),nh.prototype.constructor=nh}function rh(e,t){return new Promise((function(n,r){var a=new Xl(e,t);if(a.signal&&a.signal.aborted)return r(new nh("Aborted","AbortError"));var i=new XMLHttpRequest;function s(){i.abort()}i.onload=function(){var e,t,r={status:i.status,statusText:i.statusText,headers:(e=i.getAllResponseHeaders()||"",t=new Wl,e.replace(/\r?\n[\t ]+/g," ").split("\r").map((function(e){return 0===e.indexOf("\n")?e.substr(1,e.length):e})).forEach((function(e){var n=e.split(":"),r=n.shift().trim();if(r){var a=n.join(":").trim();t.append(r,a)}})),t)};r.url="responseURL"in i?i.responseURL:r.headers.get("X-Request-URL");var a="response"in i?i.response:i.responseText;setTimeout((function(){n(new eh(a,r))}),0)},i.onerror=function(){setTimeout((function(){r(new TypeError("Network request failed"))}),0)},i.ontimeout=function(){setTimeout((function(){r(new TypeError("Network request failed"))}),0)},i.onabort=function(){setTimeout((function(){r(new nh("Aborted","AbortError"))}),0)},i.open(a.method,function(e){try{return""===e&&Ll.location.href?Ll.location.href:e}catch(t){return e}}(a.url),!0),"include"===a.credentials?i.withCredentials=!0:"omit"===a.credentials&&(i.withCredentials=!1),"responseType"in i&&(Ml?i.responseType="blob":Nl&&a.headers.get("Content-Type")&&-1!==a.headers.get("Content-Type").indexOf("application/octet-stream")&&(i.responseType="arraybuffer")),!t||"object"!=typeof t.headers||t.headers instanceof Wl?a.headers.forEach((function(e,t){i.setRequestHeader(t,e)})):Object.getOwnPropertyNames(t.headers).forEach((function(e){i.setRequestHeader(e,Vl(t.headers[e]))})),a.signal&&(a.signal.addEventListener("abort",s),i.onreadystatechange=function(){4===i.readyState&&a.signal.removeEventListener("abort",s)}),i.send(void 0===a._bodyInit?null:a._bodyInit)}))}rh.polyfill=!0,Ll.fetch||(Ll.fetch=rh,Ll.Headers=Wl,Ll.Request=Xl,Ll.Response=eh);var ah={name:"@bygd/gd-sdk-pes",version:"1.21.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":"^20.0.0","@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.2","can-autoplay":"^3.0.2",events:"^3.3.0","get-value":"^3.0.1","is-plain-object":"^5.0.0","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"}},ih=ve,sh=Ot,oh=z,dh=iu,uh=fo;co("match",1,(function(e,t,n){return[function(t){var n=oh(this),r=null==t?void 0:t[e];return void 0!==r?r.call(t,n):new RegExp(t)[e](String(n))},function(e){var r=n(t,e,this);if(r.done)return r.value;var a=ih(e),i=String(this);if(!a.global)return uh(a,i);var s=a.unicode;a.lastIndex=0;for(var o,d=[],u=0;null!==(o=uh(a,i));){var c=String(o[0]);d[u]=c,""===c&&(a.lastIndex=dh(i,sh(a.lastIndex),s)),u++}return 0===u?null:d}]}));var ch=co,lh=Ho,hh=ve,ph=z,fh=Ca,mh=iu,gh=Ot,vh=fo,yh=Xs,bh=qs.UNSUPPORTED_Y,_h=[].push,Ah=Math.min;ch("split",2,(function(e,t,n){var r;return r="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(e,n){var r=String(ph(this)),a=void 0===n?4294967295:n>>>0;if(0===a)return[];if(void 0===e)return[r];if(!lh(e))return t.call(r,e,a);for(var i,s,o,d=[],u=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),c=0,l=new RegExp(e.source,u+"g");(i=yh.call(l,r))&&!((s=l.lastIndex)>c&&(d.push(r.slice(c,i.index)),i.length>1&&i.index<r.length&&_h.apply(d,i.slice(1)),o=i[0].length,c=s,d.length>=a));)l.lastIndex===i.index&&l.lastIndex++;return c===r.length?!o&&l.test("")||d.push(""):d.push(r.slice(c)),d.length>a?d.slice(0,a):d}:"0".split(void 0,0).length?function(e,n){return void 0===e&&0===n?[]:t.call(this,e,n)}:t,[function(t,n){var a=ph(this),i=null==t?void 0:t[e];return void 0!==i?i.call(t,a,n):r.call(String(a),t,n)},function(e,a){var i=n(r,e,this,a,r!==t);if(i.done)return i.value;var s=hh(e),o=String(this),d=fh(s,RegExp),u=s.unicode,c=(s.ignoreCase?"i":"")+(s.multiline?"m":"")+(s.unicode?"u":"")+(bh?"g":"y"),l=new d(bh?"^(?:"+s.source+")":s,c),h=void 0===a?4294967295:a>>>0;if(0===h)return[];if(0===o.length)return null===vh(l,o)?[o]:[];for(var p=0,f=0,m=[];f<o.length;){l.lastIndex=bh?0:f;var g,v=vh(l,bh?o.slice(f):o);if(null===v||(g=Ah(gh(l.lastIndex+(bh?f:0)),o.length))===p)f=mh(o,f,u);else{if(m.push(o.slice(p,f)),m.length===h)return m;for(var y=1;y<=v.length-1;y++)if(m.push(v[y]),m.length===h)return m;f=p=g}}return m.push(o.slice(p)),m}]}),bh);var wh=function(){function e(t){A.default(this,e),this.gameData=t}return w.default(e,[{key:"_getFakeCustomParams",value:function(){var e={_vid:["bla_bla1","bla_bla2","bla_bla3"],_1ld:["1ld_1","1ld_2","1ld_3","1ld_4"],_1lp:["1lp_1","1lp_2"]},t={};for(var n in e){var r=e[n];t[n]=r[Math.floor(Math.random()*r.length)]}return t}},{key:"checkCustomParams",value:function(){try{var e={};if(this.gameData.diagnostic&&this.gameData.diagnostic.cp&&this.gameData.diagnostic.cp.enabled){var t=new S.default(location.href,!0);for(var n in t.query)e[n]=t.query[n];Object.keys(e).length;return e}}catch(e){console.log("_checkCustomParams.Error",e)}}}]),e}(),Eh=function(){function e(t,n){A.default(this,e),this.adContainer=t,this.onResume=n}return w.default(e,[{key:"show",value:function(){this.adResumeButton.style.display="block",this.adResumeButtonOverlay.style.display="block"}},{key:"hide",value:function(){this.adResumeButton.style.display="none",this.adResumeButtonOverlay.style.display="none"}},{key:"add",value:function(){var e=this;try{var t=document.createElement("div");this.adResumeButton=t,t.id="gd__resume__button",t.setAttribute("title","Resume"),this.addStyles(),t.classList.add("gd__resume__button"),t.addEventListener("click",function(){v.default(this,e),this.onResume()}.bind(this)),this.adContainer.appendChild(t);var n=document.createElement("div");this.adResumeButtonOverlay=n,n.id="gd__resume__button__overlay",n.classList.add("gd__resume__button__overlay"),this.adContainer.appendChild(n)}catch(e){console.log("Resume button add error",e)}}},{key:"addStyles",value:function(){var e=document.body||document.getElementsByTagName("body")[0];this.addStylesheet("gd__resume__button__style",e,'\n .gd__resume__button{\n background-image: url("https://img.gamedistribution.com/play-black.svg");\n background-color:white; \n width: 120px;\n height: 120px;\n position: absolute;\n display: none;\n z-index: 2000;\n cursor: pointer;\n top: calc(50% - 60px);\n left: calc(50% - 60px);\n margin: 0;\n border-radius: 50%;\n border: 2px solid white;\n animation: play-button 1s ease-in-out infinite alternate;\n -webkit-animation: play-button 1s ease-in-out infinite alternate;\n }\n \n .gd__resume__button__overlay {\n position: fixed;\n display: none;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: rgba(0,0,0,0.5);\n z-index: 1999;\n cursor: pointer;\n }\n @keyframes play-button {\n 0% {\n transform: scale(1.0);\n -webkit-transform: scale(1.0);\n }\n 100% {\n transform: scale(1.1);\n -webkit-transform: scale(1.1);\n }\n }\n .gd__resume__button:hover{\n filter: invert(100%) sepia(51%) saturate(0%) hue-rotate(346deg) brightness(104%) contrast(100%); \n }\n ')}},{key:"addStylesheet",value:function(e,t,n){if(!document.getElementById(e)){var r=document.createElement("style");r.type="text/css",r.id=e,r.styleSheet?r.styleSheet.cssText=n:r.appendChild(document.createTextNode(n)),t.appendChild(r)}}}]),e}(),kh=function(e){if(!e)return!1;var t=Sh.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)},Sh=Object.prototype.toString;function Th(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 xh(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Th(Object(n),!0).forEach((function(t){b.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Th(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Dh(e){return null!=e&&e.error_url?"<vmap:VASTAdData>".concat(function(e){return e.promo_url?'<VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper fallbackOnNoAd="true">\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="0" />\n </Extensions>\n </Wrapper>\n </Ad>\n <Ad id="promo">\n <Wrapper>\n <AdSystem>Rainbow</AdSystem>\n <Impression><![CDATA[').concat(e.promo_imp_green_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.promo_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="1" />\n </Extensions>\n </Wrapper>\n </Ad>\n </VAST>').trim():'<VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper>\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,"]]></VASTAdTagURI>\n </Wrapper>\n </Ad>\n </VAST>").trim()}(e),"</vmap:VASTAdData>").trim():'<vmap:AdTagURI templateType="vast3"><![CDATA['.concat(null==e?void 0:e.adtag_url,"]]></vmap:AdTagURI>").trim()}var Rh=["bidFloor","isDfpBidding"];function Oh(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 Ih(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Oh(Object(n),!0).forEach((function(t){b.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Oh(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ch=null,Ph=function(){function e(t,n,r){var a=this;if(A.default(this,e),Ch)return Ch;Ch=this;var i={debug:!1,width:640,height:360,locale:"en"};this.options=n?d.extendDefaults(i,n):i,this.prefix="gdsdk__",this.adsLoader=null,this.adsManager=null,this.adDisplayContainer=null,this.eventBus=new d.EventBus,this.safetyTimer=null,this.containerTransitionSpeed=0,this.adCounter={},this.adPrerollCount=0,this.adMidrollCount=0,this.adRewardedCount=0,this.preloadedAdType=null,this.requestRunning=!1,this.parentDomain=r.parentDomain,this.topDomain=r.topDomain,this.parentURL=r.parentURL,this.adDisplayContainerInitialized=!1,this.IMASampleTags=d.getIMASampleTags(),this.atom_display,this.userAllowedPersonalizedAds=document.location.search.indexOf("gdpr-targeting=0")>=0||document.cookie.indexOf("ogdpr_advertisement=0")>=0?"0":"1",this.parentDomain.includes("girlsgogames")&&(this.userAllowedPersonalizedAds=!1),this.thirdPartyContainer=""!==t?document.getElementById(t):null,this.options.width="number"==typeof this.options.width?this.options.width:"100%"===this.options.width?640:this.options.width.replace(/[^0-9]/g,""),this.options.height="number"==typeof this.options.height?this.options.height:"100%"===this.options.height?360:this.options.height.replace(/[^0-9]/g,"");var s=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,o=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;this.options.width=this.thirdPartyContainer?this.thirdPartyContainer.offsetWidth:s,this.options.height=this.thirdPartyContainer?this.thirdPartyContainer.offsetHeight:o,this.gameId="0",this.category="",this.tags=[],this.eventCategory="AD",this.eventBus.subscribe("LOADED",function(){v.default(this,a),this._clearSafetyTimer("LOADED"),this._startSafetyTimer(8e3,"LOADED")}.bind(this),"ima"),this.eventBus.subscribe("STARTED",function(){v.default(this,a),this._clearSafetyTimer("STARTED")}.bind(this),"ima")}var t,n,r,a,i,s,o,u,c,h,p,f,g,y,O,I,C,P,L;return w.default(e,[{key:"start",value:(L=_.default(E.default.mark((function e(){return E.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this._init_afg_script({adsense_channel:"4089988593"});case 3:return e.next=5,this._init_hl_script();case 5:return e.next=7,this._init_ima_script();case 7:this._createPlayer(),this._setUpIMA(),e.next=14;break;case 11:throw e.prev=11,e.t0=e.catch(0),new Error(e.t0);case 14:case"end":return e.stop()}}),e,this,[[0,11]])}))),function(){return L.apply(this,arguments)})},{key:"_getAdVast",value:function(e,t){var n=this;return new Promise(function(){var r=_.default(E.default.mark((function r(a){var i,s,o,u,c,h,p,f,m,g,y=this;return E.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!(d.Ls.available&&d.Ls.getBoolean("gd_debug_ex")&&d.Ls.getBoolean("gd_tag"))){r.next=6;break}return i=n.IMASampleTags[e],s=Math.floor(Math.random()*i.length),o=i[s],a({url:o}),r.abrupt("return");case 6:if(void 0!==window.idhb.requestAds){r.next=8;break}throw new Error("Prebid.js wrapper script hit an error or didn't exist!");case 8:return r.prev=8,r.next=11,n._getTunnlKeys(e);case 11:if(u=r.sent,c=u.data,h=c.nsid?c.nsid:"TNL_T-17102571517",p=c.tid?c.tid:"TNL_NS-18101700058",f="".concat(h,"/").concat(p),delete c.nsid,delete c.tid,R.default(c,{tnl_system:"1",tnl_content_category:n.category.toLowerCase()}),n.eventBus.broadcast("AD_REQUEST",{message:c.tnl_ad_pos}),m=n.options,"preroll"===c.tnl_ad_pos&&l.isPlainObject(m.preroll)?m=m.preroll:"midroll"===c.tnl_ad_pos&&l.isPlainObject(m.midroll)?m=m.midroll:"rewarded"===c.tnl_ad_pos&&l.isPlainObject(m.rewarded)&&(m=m.rewarded),!(t&&t.retry_on_success&&l.isPlainObject(m.retry_on_success)&&l.isPlainObject(m.retry_on_success.vast))){r.next=26;break}return r.abrupt("return",a(n._createCustomAdVastUrl(m.retry_on_success.vast,{tnl_keys:c})));case 26:if(!(t&&t.retry_on_failure&&n.options.retry_on_failure&&l.isPlainObject(m.retry_on_failure.vast))){r.next=30;break}return r.abrupt("return",a(n._createCustomAdVastUrl(m.retry_on_failure.vast,{tnl_keys:c})));case 30:if(!l.isPlainObject(m.vast)){r.next=32;break}return r.abrupt("return",a(n._createCustomAdVastUrl(m.vast,{tnl_keys:c})));case 32:return r.next=34,n._create_dp_context(c.tnl_ad_pos,t);case 34:g=r.sent,window.idhb.que.push(function(){var e=this;v.default(this,y),window.idhb.setRefererUrl(encodeURIComponent(n.parentURL)),window.idhb.allowPersonalizedAds(!!parseInt(n.userAllowedPersonalizedAds));var t="rewarded"===c.tnl_ad_pos?"rewardedVideo":"gdbanner"===c.tnl_ad_pos?"gd__banner":"midroll"===c.tnl_ad_pos?"midroll":"video1";window.idhb.setDfpAdUnitCodeForAdSlot(t,f),window.idhb.setAdserverTargetingForAdSlot(t,c),window.idhb.requestAds({slots:b.default({},t,{bidFloor:null!=g&&g.floor_price?g.floor_price:void 0}),callback:function(t,n){var r=this;v.default(this,e),g&&!n.bidFloorApplied&&fetch(g.skip_url).catch(function(e){v.default(this,r)}.bind(this)),a({tnl_keys:c,url:t,dp:g,hl:n})}.bind(this)})}.bind(this)),r.next=41;break;case 38:throw r.prev=38,r.t0=r.catch(8),new Error(r.t0);case 41:case"end":return r.stop()}}),r,this,[[8,38]])})));return function(e){return r.apply(this,arguments)}}())}},{key:"nextAdPosition",value:function(e){if(e===d.AdType.Rewarded)return this.adRewardedCount++,"rewarded";if(e===d.AdType.Interstitial){var t=!1===this.gameData.preroll||!0===this.noPreroll||1===this.adPrerollCount;return t?this.adMidrollCount++:this.adPrerollCount++,t||this.adMidrollCount>0?"midroll":"preroll"}return"midroll"}},{key:"getAdPosition",value:function(e){return e===d.AdType.Rewarded?"rewarded":e===d.AdType.Interstitial?!1===this.gameData.preroll||!0===this.noPreroll||1===this.adPrerollCount||this.adMidrollCount>0?"midroll":"preroll":"midroll"}},{key:"_getTunnlKeys",value:function(e){var t=this;return new Promise(function(n){var r=this;v.default(this,t);var a="";a=!navigator.userAgent.match(/Crosswalk/i)&&void 0===window.cordova||"m.hopy.com"!==this.parentDomain?"page_url=".concat(encodeURIComponent(this.topDomain||this.parentDomain)):"bundle=com.hopy.frivgames",function(e,t){var n={tp:e,data:t};fetch("https://tag.atom.gamedistribution.com/v1/dmp?ar=".concat(encodeURIComponent(m.Base64.encode(JSON.stringify(n)))))}("page_url",{top_domain:this.topDomain,parent_domain:this.parentDomain,game:this.gameId,pageUrl:a});var i=this.nextAdPosition(e),s=d.getQueryString("ch",window.location.href),o=d.getQueryString("ch_date",window.location.href),u=s?"&ch=".concat(s):"",c=o?"&ch_date=".concat(o):"",l="https://pub.headerlift.com/opphb?".concat(a,"&player_width=").concat(this.options.width,"&player_height=").concat(this.options.height,"&ad_type=video_image&game_id=").concat(this.gameId,"&ad_position=").concat(i).concat(u).concat(c,"&correlator=").concat(Date.now()),h=new Request(l,{method:"GET"});fetch(h).then(function(e){v.default(this,r);var t=e.headers.get("content-type");if(t&&-1!==t.indexOf("application/json"))return e.json();throw new TypeError("Oops, we didn't get JSON!")}.bind(this)).then(function(e){v.default(this,r),d.isObjectEmpty(e)&&(e=this._createTunnlReportingFallbackKeys(i),this.eventBus.broadcast("AD_REQUEST_KEYS_EMPTY",{message:"Tunnl returned empty response.",details:l})),n({data:e,url:l})}.bind(this)).catch(function(e){v.default(this,r);var t=this._createTunnlReportingFallbackKeys(i);this.eventBus.broadcast("AD_REQUEST_KEYS_FALLBACK",{message:e.message,details:l}),n({data:t,url:l})}.bind(this))}.bind(this))}},{key:"_createTunnlReportingFallbackKeys",value:function(e){return{tid:"TNL_T-17102571517",nsid:"TNL_NS-18101700058",tnl_tid:"T-17102571517",tnl_nsid:"NS-18101700058",tnl_pw:this.options.width,tnl_ph:this.options.height,tnl_pt:"22",tnl_pid:"P-17101800031",tnl_paid:"17",tnl_ad_type:"video_image",tnl_asset_id:this.gameId.toString(),tnl_ad_pos:e,tnl_skippable:"1",tnl_cp1:"",tnl_cp2:"",tnl_cp3:"",tnl_cp4:"",tnl_cp5:"",tnl_cp6:"",tnl_campaign:"2",tnl_gdpr:"0",tnl_gdpr_consent:"1",consent_string:"BOWJjG9OWJjG9CLAAAENBx-AAAAiDAAA",tnl_content_category:this.category.toLowerCase()}}},{key:"_requestAd",value:function(e,t){var n=this;return t=t||{},new Promise(function(r){if(v.default(this,n),"undefined"==typeof google)throw new Error("Unable to load ad, google IMA SDK not defined.");try{var a,i=null==e||null===(a=e.tnl_keys)||void 0===a?void 0:a.tnl_ad_pos;this.adSuccess=!1;var s=new google.ima.AdsRequest,o=this._transformVast(e,t),d=Ih(Ih({},t),{},{adTag:o,tnl_ad_pos:i});this.adCounter[i]=this.adCounter[i]||0,this.adCounter[i]++;var u=e.dp,c=e.hl;if(u&&(u.adtag_url=o.url,this._extend_dp_with_adsense(u,c,null==e?void 0:e.tnl_keys)),this._isVMAP(i)){var l=function(e){var t=e.position||"midroll",n=e.dp_1,r=e.dp_2,a=Date.now(),i=new S.default(e.adtag_url_1,!0);i.query=xh(xh({},i.query),{},{ad_rule:0,vpos:t,pod:1,ppos:1,lip:!0,correlator:a,output:"xml_vast3"});var s=i.toString(),o=new S.default(e.adtag_url_2,!0);o.query=xh(xh({},o.query),{},{ad_rule:0,vpos:t,pod:1,correlator:++a,output:"xml_vast3"});var d=o.toString(),u=Date.now();return'<?xml version="1.0" encoding="UTF-8"?>\n<vmap:VMAP xmlns:vmap="http://www.iab.net/videosuite/vmap" version="1.0">\n<vmap:AdBreak timeOffset="start" breakType="linear,nonlinear" breakId="break-1">\n <vmap:AdSource id="'.concat(u++,'" allowMultipleAds="false" followRedirects="true">\n ').concat(Dh({id:u++,adtag_url:s,error_url:null==n?void 0:n.error_url,impression_url:null==n?void 0:n.impression_url}),'\n </vmap:AdSource>\n</vmap:AdBreak>\n<vmap:AdBreak timeOffset="start" breakType="linear,nonlinear" breakId="break-2">\n <vmap:AdSource id="').concat(u++,'" allowMultipleAds="false" followRedirects="true">\n ').concat(Dh({id:u++,adtag_url:d,error_url:null==r?void 0:r.error_url,impression_url:null==r?void 0:r.impression_url}),'\n </vmap:AdSource>\n <vmap:Extensions>\n <vmap:Extension type="bumper" suppress_bumper="true"></vmap:Extension>\n </vmap:Extensions>\n</vmap:AdBreak>\n</vmap:VMAP>').trim()}(this._get_vmap_context({dp:u,adtag:o,position:"preroll"===d.tnl_ad_pos?"preroll":"midroll",config:this._get_vmap_config(i)}));s.adsResponse=l}else if(u&&c.bidFloorApplied){var h=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()}(u);s.adsResponse=h}else if(u&&u.fallback_url){var p=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()}(u);s.adsResponse=p}else s.adTagUrl=o.url;s.linearAdSlotWidth=this.options.width,s.linearAdSlotHeight=this.options.height,s.nonLinearAdSlotWidth=this.options.width,s.nonLinearAdSlotHeight=this.options.height,s.forceNonLinearFullSlot=!0,this.options.vast_load_timeout&&(s.vastLoadTimeout=this.options.vast_load_timeout),s.setAdWillAutoPlay(t.autoplayAllowed),s.setAdWillPlayMuted(t.autoplayRequiresMute),this.adsLoader.requestAds(s,d);try{this.eventBus.broadcast("AD_SDK_REQUEST",{message:d})}catch(e){}r(s)}catch(e){throw new Error(e)}}.bind(this))}},{key:"cancel",value:function(){if(!1!==this.requestRunning){this.requestRunning=!1,this._resetAdsLoader(),this._hide("cancel");var e="AD_SDK_CANCELED";this.eventBus.broadcast(e,{name:e,message:"Advertisement has been canceled.",status:"warning",analytics:{category:this.eventCategory,action:e,label:this.gameId}})}}},{key:"_checkAutoPlay",value:(P=_.default(E.default.mark((function e(){var t=this;return E.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(e,n){var r=this;v.default(this,t);var a=navigator.userAgent.toLowerCase();a.indexOf("safari")>-1&&a.indexOf("chrome")<0?e({autoplayAllowed:!0,autoplayRequiresMute:!0}):T.default.video({inline:!0,muted:!1}).then(function(t){v.default(this,r);var n=t.result;t.error,e(!0===n?{autoplayAllowed:!0,autoplayRequiresMute:!1}:{autoplayAllowed:!0,autoplayRequiresMute:!0})}.bind(this))}.bind(this)));case 1:case"end":return e.stop()}}),e,this)}))),function(){return P.apply(this,arguments)})},{key:"_initDisplayContainerWithAutoPlay",value:(C=_.default(E.default.mark((function e(){var t;return E.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._checkAutoPlay(!1);case 2:return t=e.sent,this._autoplay=t,this.video_ad_player.autoplay=t.autoplayAllowed,this.video_ad_player.volume=t.autoplayRequiresMute?0:1,this.video_ad_player.muted=!!t.autoplayRequiresMute,t.adDisplayContainerInitialized||(this.adDisplayContainer.initialize(),this.adDisplayContainerInitialized=!0),e.abrupt("return",t);case 9:case"end":return e.stop()}}),e,this)}))),function(){return C.apply(this,arguments)})},{key:"startAd",value:(I=_.default(E.default.mark((function e(t){var n,r,a;return E.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=this.gameData.afg_disabled,r=t.adType,a=t.params,r!==d.AdType.Interstitial){e.next=22;break}if(!n){e.next=7;break}return e.abrupt("return",this._startInterstitialAd(a));case 7:if("preroll"!==(null==a?void 0:a.position)||"adsense"!==(null==a?void 0:a.adapter)){e.next=11;break}return e.abrupt("return",this._startAdsensePlacementPreroll(t));case 11:if("start"!==(null==a?void 0:a.position)||"adsense"!==(null==a?void 0:a.adapter)){e.next=15;break}return e.abrupt("return",this._startAdsensePlacementStart(t));case 15:if("next"!==(null==a?void 0:a.position)||"adsense"!==(null==a?void 0:a.adapter)){e.next=19;break}return e.abrupt("return",this._startAdsensePlacementNext(t));case 19:return e.abrupt("return",this._startInterstitialAd(a));case 20:e.next=31;break;case 22:if(r!==d.AdType.Rewarded){e.next=30;break}if(!n){e.next=27;break}return e.abrupt("return",this._startRewardedAd(a));case 27:return e.abrupt("return",this._startAdsensePlacementRewardedAd(t));case 28:e.next=31;break;case 30:throw new Error("Unsupported ad type");case 31:case"end":return e.stop()}}),e,this)}))),function(e){return I.apply(this,arguments)})},{key:"preloadAd",value:(O=_.default(E.default.mark((function e(t){return E.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t!==d.AdType.Interstitial){e.next=4;break}return e.abrupt("return",this._preloadInterstitialAd());case 4:if(t!==d.AdType.Rewarded){e.next=8;break}return e.abrupt("return",this._preloadRewardedAd());case 8:throw new Error("Unsupported ad type");case 9:case"end":return e.stop()}}),e,this)}))),function(e){return O.apply(this,arguments)})},{key:"addAdResume",value:function(){var e=this,t=function(){v.default(this,e),this.adsManager.resume()}.bind(this);try{this.adResume=new Eh(this.adContainer,t),this.adResume.add()}catch(e){console.log("error on adding adResume",e)}}},{key:"loadDisplayAd",value:(y=_.default(E.default.mark((function e(t){var n=this;return E.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(){var e=_.default(E.default.mark((function e(r,a){var i,s,o,u,c,l,h=this;return E.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,(i=t?t.containerId:null)||a("Container id is not specified"),s=document.getElementById(i),document.getElementById(i)||a("No container is found with this id - ".concat(i)),void 0===window.idhb.requestAds&&a("Prebid.js wrapper script hit an error or didn't exist!"),o=t.slotId?t.slotId:"gd__banner@".concat(i),document.getElementById(o)||(u="\n .gd__banner{\n z-index: ".concat(d.Layers.DisplayContainer.zIndex,";\n height: 100%;\n display: flex !important;\n align-items: center;\n justify-content: center;\n }"),document.getElementById("gd__banner__style")||((c=document.createElement("style")).type="text/css",c.id="gd__banner__style",c.styleSheet?c.styleSheet.cssText=u:c.appendChild(document.createTextNode(u)),s.appendChild(c)),(l=document.createElement("div")).id=o,l.classList.add("gd__banner"),s.appendChild(l)),e.next=10,n._create_dp_display_context();case 10:n.atom_display=e.sent,window.idhb.que.push(function(){var e,t,r=this;v.default(this,h),window.idhb.setRefererUrl(encodeURIComponent(n.parentURL)),window.idhb.allowPersonalizedAds(!!parseInt(n.userAllowedPersonalizedAds)),window.idhb.setDefaultGdprConsentString("BOWJjG9OWJjG9CLAAAENBx-AAAAiDAAA"),null!==(e=n.atom_display)&&void 0!==e&&e.params&&window.idhb.setAdserverTargeting(null===(t=n.atom_display)||void 0===t?void 0:t.params);var a={};a[o]={maxSize:[s.offsetWidth,s.offsetHeight]},window.idhb.requestAds({slots:a,callback:function(e){v.default(this,r)}.bind(this)})}.bind(this)),r(),e.next=18;break;case 15:e.prev=15,e.t0=e.catch(0),a(e.t0.message||e.t0);case 18:case"end":return e.stop()}}),e,this,[[0,15]])})));return function(t,n){return e.apply(this,arguments)}}()));case 1:case"end":return e.stop()}}),e)}))),function(e){return y.apply(this,arguments)})},{key:"_startInterstitialAd",value:(g=_.default(E.default.mark((function e(t){var n;return E.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!this.requestRunning){e.next=4;break}return this.eventBus.broadcast("AD_IS_ALREADY_RUNNING",{status:"warning"}),e.abrupt("return");case 4:return this.requestRunning=!0,e.next=7,this._initDisplayContainerWithAutoPlay();case 7:return n=e.sent,e.next=10,this._loadInterstitialAd(Ih(Ih({},n),t));case 10:n.autoplayRequiresMute&&this.adsManager.setVolume(0),this.adsManager.init(this.options.width,this.options.height,google.ima.ViewMode.NORMAL),this.adsManager.start(),e.next=19;break;case 15:throw e.prev=15,e.t0=e.catch(0),this._onError(e.t0),e.t0;case 19:case"end":return e.stop()}}),e,this,[[0,15]])}))),function(e){return g.apply(this,arguments)})},{key:"_loadInterstitialAd",value:(f=_.default(E.default.mark((function e(t){var n,r,a=this;return E.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._resetAdsLoader(),e.prev=1,e.t0=this.preloadedInterstitialAdVast,e.t0){e.next=7;break}return e.next=6,this._getAdVast(d.AdType.Interstitial,t);case 6:e.t0=e.sent;case 7:return n=e.t0,delete this.preloadedInterstitialAdVast,e.next=11,this._requestAd(n,Ih({adType:d.AdType.Interstitial},t));case 11:return r=e.sent,e.next=14,new Promise(function(e,t){var n=this;v.default(this,a);var r="videoad.preloadad";this.eventBus.unsubscribeScope(r);var i=function(t){v.default(this,n),this.eventBus.unsubscribeScope(r),e(t.message)}.bind(this),s=function(e){v.default(this,n),this.eventBus.unsubscribeScope(r),t(e.message)}.bind(this);this.eventBus.subscribe("AD_SDK_MANAGER_READY",i,r),this.eventBus.subscribe("AD_SDK_CANCELED",s,r),this.eventBus.subscribe("AD_ERROR",s,r)}.bind(this));case 14:return e.abrupt("return",r);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 f.apply(this,arguments)})},{key:"_startRewardedAd",value:(p=_.default(E.default.mark((function e(t){var n;return E.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!this.requestRunning){e.next=4;break}return this.eventBus.broadcast("AD_IS_ALREADY_RUNNING",{status:"warning"}),e.abrupt("return");case 4:return this.requestRunning=!0,e.next=7,this._initDisplayContainerWithAutoPlay();case 7:return n=e.sent,e.next=10,this._loadRewardedAd(Ih(Ih({},n),t));case 10:n.autoplayRequiresMute&&this.adsManager.setVolume(0),this.adsManager.init(this.options.width,this.options.height,google.ima.ViewMode.NORMAL),this.adsManager.start(),e.next=19;break;case 15:throw e.prev=15,e.t0=e.catch(0),this._onError(e.t0),e.t0;case 19:case"end":return e.stop()}}),e,this,[[0,15]])}))),function(e){return p.apply(this,arguments)})},{key:"_loadRewardedAd",value:(h=_.default(E.default.mark((function e(t){var n,r,a=this;return E.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._resetAdsLoader(),e.prev=1,e.t0=this.preloadedRewardedAdVast,e.t0){e.next=7;break}return e.next=6,this._getAdVast(d.AdType.Rewarded,t);case 6:e.t0=e.sent;case 7:return n=e.t0,delete this.preloadedRewardedAdVast,e.next=11,this._requestAd(n,Ih({adType:d.AdType.Rewarded},t));case 11:return r=e.sent,e.next=14,new Promise(function(e,t){var n=this;v.default(this,a);var r="videoad.preloadad";this.eventBus.unsubscribeScope(r);var i=function(t){v.default(this,n),this.eventBus.unsubscribeScope(r),e(t.message)}.bind(this),s=function(e){v.default(this,n),this.eventBus.unsubscribeScope(r),t(e.message)}.bind(this);this.eventBus.subscribe("AD_SDK_MANAGER_READY",i,r),this.eventBus.subscribe("AD_SDK_CANCELED",s,r),this.eventBus.subscribe("AD_ERROR",s,r)}.bind(this));case 14:return e.abrupt("return",r);case 17:throw e.prev=17,e.t1=e.catch(1),new Error(e.t1);case 20:case"end":return e.stop()}}),e,this,[[1,17]])}))),function(e){return h.apply(this,arguments)})},{key:"_preloadInterstitialAd",value:(c=_.default(E.default.mark((function e(){return E.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this._getAdVast(d.AdType.Interstitial);case 3:return this.preloadedInterstitialAdVast=e.sent,e.abrupt("return",this.preloadedInterstitialAdVast.url);case 7:throw e.prev=7,e.t0=e.catch(0),new Error(e.t0);case 10:case"end":return e.stop()}}),e,this,[[0,7]])}))),function(){return c.apply(this,arguments)})},{key:"_preloadRewardedAd",value:(u=_.default(E.default.mark((function e(){return E.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this._getAdVast(d.AdType.Rewarded);case 3:return this.preloadedRewardedAdVast=e.sent,e.abrupt("return",this.preloadedRewardedAdVast.url);case 7:throw e.prev=7,e.t0=e.catch(0),new Error(e.t0);case 10:case"end":return e.stop()}}),e,this,[[0,7]])}))),function(){return u.apply(this,arguments)})},{key:"_onError",value:function(e){this.cancel(),this._clearSafetyTimer("ERROR")}},{key:"_hide",value:function(e){this.video_ad_player.src="",this.activeAdContainer&&(this.activeAdContainer.style.visibility="hidden")}},{key:"_show",value:function(e){var t=this;if(this.activeAdContainer){this.activeAdContainer.style.visibility="visible";var n=null==e?void 0:e.mode,r=this._isT4R(e),a=this._getT4ROptions();"loaded"===n?(this.activeAdContainer.style.opacity=r?.001:1,r&&this.eventBus.broadcast("AD_T4R"),r&&setTimeout(function(){v.default(this,t),this.activeAdContainer.style.opacity=1}.bind(this),((null==a?void 0:a.min)||1234)+Math.random()*((null==a?void 0:a.max)||3210))):"click"!==n&&"first_quartile"!==n||(this.activeAdContainer.style.opacity=1)}}},{key:"_createPlayer",value:function(){var e=this,t=document.body||document.getElementsByTagName("body")[0];this.adContainer=document.createElement("div"),this.adContainer.id="".concat(this.prefix,"advertisement"),this.adContainer.style.position=this.thirdPartyContainer?"absolute":"fixed",this.adContainer.style.zIndex=d.Layers.AdsContainer.zIndex,this.adContainer.style.top="0",this.adContainer.style.left="0",this.adContainer.style.width="100%",this.adContainer.style.height="100%",this.thirdPartyContainer&&(this.thirdPartyContainer.style.transform=null);var n=document.createElement("video");n.setAttribute("playsinline",!0),n.setAttribute("webkit-playsinline",!0),n.id="".concat(this.prefix,"advertisement_video"),n.style.position="absolute",n.style.backgroundColor="#000000",n.style.top="0",n.style.left="0",n.style.width=this.options.width+"px",n.style.height=this.options.height+"px",this.video_ad_player=n,this.adContainer.appendChild(n);var r=document.createElement("div");r.id="".concat(this.prefix,"advertisement_slot"),r.style.position="absolute",r.style.top="0",r.style.left="0",r.style.width=this.options.width+"px",r.style.height=this.options.height+"px",this.adContainerInner=r,this.activeAdContainer=this.adContainer,this.thirdPartyContainer?(this.adContainer.appendChild(r),this.thirdPartyContainer.appendChild(this.adContainer),this.activeAdContainer=this.thirdPartyContainer):(this.adContainer.appendChild(r),t.appendChild(this.adContainer)),this.addAdResume(),this.activeAdContainer.style.visibility="hidden";var a=function(){v.default(this,e);var t=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,a=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;this.options.width=this.thirdPartyContainer?this.thirdPartyContainer.offsetWidth:t,this.options.height=this.thirdPartyContainer?this.thirdPartyContainer.offsetHeight:a,r.style.width=this.options.width+"px",r.style.height=this.options.height+"px",n.style.width=this.options.width+"px",n.style.height=this.options.height+"px"}.bind(this);window.addEventListener("resize",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 t=this,n=new google.ima.AdsRenderingSettings;n.autoAlign=!1,n.enablePreloading=!1,n.restoreCustomPlaybackStateOnAdBreakComplete=!0,n.useStyledNonLinearAds=!0,n.uiElements=[google.ima.UiElements.AD_ATTRIBUTION,google.ima.UiElements.COUNTDOWN],this.adsManager=e.getAdsManager(this.video_ad_player,n),this.adsManager.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,this._onAdError.bind(this),!1,this),this.adsManager.addEventListener(google.ima.AdEvent.Type.AD_BREAK_READY,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.AD_METADATA,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.ALL_ADS_COMPLETED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.CLICK,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.COMPLETE,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.DURATION_CHANGE,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.FIRST_QUARTILE,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.IMPRESSION,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.INTERACTION,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.LINEAR_CHANGED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.LOADED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.LOG,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.MIDPOINT,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.PAUSED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.RESUMED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.SKIPPED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.STARTED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.THIRD_QUARTILE,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.USER_CLOSE,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.VOLUME_CHANGED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.VOLUME_MUTED,this._onAdEvent.bind(this),this),window.addEventListener("resize",function(){v.default(this,t),this.adsManager&&this.adsManager.resize(this.options.width,this.options.height,google.ima.ViewMode.NORMAL)}.bind(this)),this.adDisplayContainerInitialized||(this.adDisplayContainer.initialize(),this.adDisplayContainerInitialized=!0);var r=new Date,a=r.getHours(),i=r.getDate(),s=r.getMonth(),o=r.getFullYear(),d="AD_SDK_MANAGER_READY";this.eventBus.broadcast(d,{name:d,message:"AD SDK is ready",status:"success",analytics:{category:d,action:this.parentDomain,label:"h".concat(a," d").concat(i," m").concat(s," y").concat(o)}}),this._adrequest_user_context=e.getUserRequestContext()}},{key:"_onAdEvent",value:function(e){var t=new Date,n=t.getHours(),r=t.getDate(),a=t.getMonth(),i=t.getFullYear(),s=d.getKeyByValue(google.ima.AdEvent.Type,e.type),o=!1,u=e.getAd().getContentType()||"",c=!u.startsWith("image")&&!u.startsWith("text");this._sendIMAEventsToHB(e);var l="";switch(e.type){case google.ima.AdEvent.Type.AD_BREAK_READY:l="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:l="Fired when an ads list is loaded.";break;case google.ima.AdEvent.Type.ALL_ADS_COMPLETED:o=!0,l="Fired when the ads manager is done playing all the ads.";break;case google.ima.AdEvent.Type.CLICK:l="Fired when the ad is clicked.";var h=e.getAd().getContentType();this._show({mode:"click",contentType:h});break;case google.ima.AdEvent.Type.COMPLETE:o=this._is_completed(e.getAd()),l="Fired when the ad completes playing.";break;case google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED:l="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:l="Fired when content should be resumed. This usually happens when an ad finishes or collapses.",o=!0;break;case google.ima.AdEvent.Type.DURATION_CHANGE:l="Fired when the ad's duration changes.";break;case google.ima.AdEvent.Type.FIRST_QUARTILE:l="Fired when the ad playhead crosses first quartile.";var p=e.getAd().getContentType();this._show({mode:"first_quartile",contentType:p});break;case google.ima.AdEvent.Type.IMPRESSION:l="Fired when the impression URL has been pinged.";break;case google.ima.AdEvent.Type.INTERACTION:l="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:l="Fired when the displayed ad changes from linear to nonlinear, or vice versa.";break;case google.ima.AdEvent.Type.LOADED:var f=e.getAd().getContentType();l=f,this._show({mode:"loaded",contentType:f});break;case google.ima.AdEvent.Type.LOG:e.getAdData().adError&&(l=e.getAdData());break;case google.ima.AdEvent.Type.MIDPOINT:l="Fired when the ad playhead crosses midpoint.";break;case google.ima.AdEvent.Type.PAUSED:c&&this.adResume.show(),l="Fired when the ad is paused.";break;case google.ima.AdEvent.Type.RESUMED:l="Fired when the ad is resumed.",c&&this.adResume.hide();break;case google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED:l="Fired when the displayed ads skippable state is changed.";break;case google.ima.AdEvent.Type.SKIPPED:o=this._is_completed(e.getAd()),l="Fired when the ad is skipped by the user.";break;case google.ima.AdEvent.Type.STARTED:l="Fired when the ad starts playing.";break;case google.ima.AdEvent.Type.THIRD_QUARTILE:l="Fired when the ad playhead crosses third quartile.";break;case google.ima.AdEvent.Type.USER_CLOSE:o=this._is_completed(e.getAd()),l="Fired when the ad is closed by the user.";break;case google.ima.AdEvent.Type.VOLUME_CHANGED:l="Fired when the ad volume has changed.";break;case google.ima.AdEvent.Type.VOLUME_MUTED:l="Fired when the ad volume has been muted."}""!==s&&""!==l&&this.eventBus.broadcast(s,{name:s,message:l,status:"success",analytics:{category:s,action:this.parentDomain,label:"h".concat(n," d").concat(r," m").concat(a," y").concat(i)}}),o&&!this.adSuccess&&(this.adSuccess=!0,this.eventBus.broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success"}),this.resetForNext(e))}},{key:"_onAdError",value:function(e){this.requestRunning=!1,this._resetAdsLoader(),this._clearSafetyTimer("ERROR"),this._hide("_onAdError"),this._sendIMAEventsToHB(e);try{var t="AD_ERROR",n=e.getError(),r=n.getErrorCode().toString()||n.getVastErrorCode().toString(),a=this._getInnerErrorCode(n);this.eventBus.broadcast(t,{message:r,details:a,status:"warning",analytics:{category:t,action:a,label:r}})}catch(e){}}},{key:"_sendIMAEventsToHB",value:function(e){if(window.idhb&&"function"==typeof window.idhb.onImaEvent)try{window.idhb.onImaEvent(e)}catch(e){}}},{key:"_resetAdsLoader",value:function(){this.adsManager&&(this.adsManager.destroy(),this.adsManager=null,this._adrequest_user_context=null),this.adsLoader&&this.adsLoader.contentComplete()}},{key:"_startSafetyTimer",value:function(e,t){var n=this;this.safetyTimer&&clearTimeout(this.safetyTimer),this.safetyTimer=window.setTimeout(function(){v.default(this,n),this.cancel(),this._clearSafetyTimer(t)}.bind(this),e)}},{key:"_clearSafetyTimer",value:function(e){void 0!==this.safetyTimer&&null!==this.safetyTimer&&(clearTimeout(this.safetyTimer),this.safetyTimer=void 0)}},{key:"_getVPAIDMode",value:function(){return google.ima.ImaSdkSettings.VpaidMode.ENABLED}},{key:"_getPrebidScripts",value:function(){var e=["https://hb.improvedigital.com/pbw/gameDistributionV1.3.min.js","http://hb.improvedigital.com/pbw/gameDistributionV1.3.min.js"];return this.options.hb_script?[this.options.hb_script].concat(e):e}},{key:"_getInnerErrorCode",value:function(e){if(kh(e.getInnerError)){var t=e.getInnerError();if(t)return kh(t.getErrorCode)&&kh(t.getVastErrorCode)?t.getErrorCode().toString()||t.getVastErrorCode().toString():t.message}}},{key:"resetForNext",value:function(){this.requestRunning=!1,this._hide("resetForNext")}},{key:"_createCustomAdVastUrl",value:function(e,t){var n=this;if(e){var r=this.macros.transform(e,{get:function(e){if(v.default(this,n),t&&t.tnl_keys)return t.tnl_keys[e.toLowerCase()]}.bind(this)});for(var a in r.query||{}){var i=r.query[a];l.isPlainObject(i)&&(r.query[a]=D.default.stringify(i))}var s=new S.default(r.url,!0);return R.default(s.query,r.query||{}),Ih({url:s.toString()},t)}}},{key:"_transformVast",value:function(e,t){var n={url:e.url};try{var r=new S.default(e.url,!0),a=this._transformQuery(e,t,r);a&&(n.url=r.toString());var i=a?r:new S.default(e.url,!0);if(i.query.cust_params){var s=D.default.parse(i.query.cust_params);n.bidder=s.hb_bidder,n.cust_params=s}n.url_parsed=i}catch(e){n.hasError=!0,n.message=e.message,n.bidder="error",console.log(e.message)}return n}},{key:"_transformQuery",value:function(e,t,n){var r=this;if(e&&t&&e.tnl_keys){var a=this.options.vast_query;if(t.retry_on_success&&this.options.retry_on_success&&l.isPlainObject(this.options.retry_on_success.vast_query)?a=this.options.retry_on_success.vast_query:t.retry_on_failure&&this.options.retry_on_failure&&l.isPlainObject(this.options.retry_on_failure.vast_query)&&(a=this.options.retry_on_failure.vast_query),a=x.default(a),l.isPlainObject(a)){var i=n.query;if(a.$$remove){for(var s in i){new RegExp(a.$$remove,"i").test(s)&&delete i[s]}delete a.$$remove}var o=D.default.parse(i.cust_params);if(a.cust_params&&a.cust_params.$$remove){for(var d in o){new RegExp(a.cust_params.$$remove,"i").test(d)&&delete o[d]}delete a.cust_params.$$remove}var u=this.macros.transform(a,{get:function(t){return v.default(this,r),e.tnl_keys[t.toLowerCase()]}.bind(this)});return i.cust_params=o,R.default(i,u),i.cust_params=D.default.stringify(i.cust_params),!0}}}},{key:"_isT4R",value:function(e){var t,n,r,a,i,s,o,d,u,c,l,h=null===(t=this._adrequest_user_context)||void 0===t?void 0:t.tnl_ad_pos;return h&&((null==e||null===(n=e.contentType)||void 0===n?void 0:n.startsWith("image/"))||"text"===(null==e?void 0:e.contentType))&&("preroll"===h&&(null===(r=this.gameData)||void 0===r||null===(a=r.pAds)||void 0===a||null===(i=a.t4r)||void 0===i?void 0:i.enabled)||"midroll"===h&&(null===(s=this.gameData)||void 0===s||null===(o=s.mAds)||void 0===o||null===(d=o.t4r)||void 0===d?void 0:d.enabled)||"rewarded"===h&&(null===(u=this.gameData)||void 0===u||null===(c=u.rAds)||void 0===c||null===(l=c.t4r)||void 0===l?void 0:l.enabled))}},{key:"_isVMAP",value:function(e){var t,n,r,a,i,s,o,d,u,c,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===(a=r.pAds)||void 0===a||null===(i=a.vmap)||void 0===i?void 0:i.enabled))||"midroll"===e&&(!0===(null===(s=this.gameData)||void 0===s||null===(o=s.mAds)||void 0===o?void 0:o.vmap)||!0===(null===(d=this.gameData)||void 0===d||null===(u=d.mAds)||void 0===u||null===(c=u.vmap)||void 0===c?void 0:c.enabled))||"rewarded"===e&&(!0===(null===(l=this.gameData)||void 0===l||null===(h=l.rAds)||void 0===h?void 0:h.vmap)||!0===(null===(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),y=this.adCounter[e];return void 0!==(null==v?void 0:v.start)?y>=(null==v?void 0:v.start):g}},{key:"_getT4ROptions",value:function(){var e,t,n,r,a,i,s;switch(null===(e=this._adrequest_user_context)||void 0===e?void 0:e.tnl_ad_pos){case"preroll":return null===(t=this.gameData)||void 0===t||null===(n=t.pAds)||void 0===n?void 0:n.t4r;case"midroll":return null===(r=this.gameData)||void 0===r||null===(a=r.mAds)||void 0===a?void 0:a.t4r;case"rewarded":return null===(i=this.gameData)||void 0===i||null===(s=i.rAds)||void 0===s?void 0:s.t4r}}},{key:"_is_completed",value:function(e){var t=e.getContentType(),n=e.getAdPodInfo();return!(!t.startsWith("image/")&&"text"!==t&&1!==n.getTotalAds())}},{key:"_get_vmap_context",value:function(e){var t=e.adtag,n=e.position,r=e.config,a=e.dp,i=this._createCustomAdVastUrl(null==r?void 0:r.vast_1)||t,s=this._createCustomAdVastUrl(null==r?void 0:r.vast_2)||t,o=null!=r&&r.vast_1?void 0:a,d=null!=r&&r.vast_2?void 0:a;return{adtag_url_1:null==i?void 0:i.url,adtag_url_2:null==s?void 0:s.url,position:n,dp_1:o,dp_2:d}}},{key:"_get_vmap_config",value:function(e){var t,n,r,a,i,s,o,d;switch(e){case"preroll":return null===(t=this.gameData)||void 0===t||null===(n=t.pAds)||void 0===n?void 0:n.vmap;case"midroll":return null===(r=this.gameData)||void 0===r||null===(a=r.mAds)||void 0===a?void 0:a.vmap;case"rewarded":return null===(i=this.gameData)||void 0===i||null===(s=i.rAds)||void 0===s?void 0:s.vmap;default:return null===(o=this.gameData)||void 0===o||null===(d=o.pAds)||void 0===d?void 0:d.vmap}}},{key:"_isDP",value:function(e){var t,n,r,a,i,s,o,d,u,c,l,h,p,f,m;return!!e&&("preroll"===e&&(!0===(null===(t=this.gameData)||void 0===t||null===(n=t.pAds)||void 0===n?void 0:n.dp)||!0===(null===(r=this.gameData)||void 0===r||null===(a=r.pAds)||void 0===a||null===(i=a.dp)||void 0===i?void 0:i.enabled))||"midroll"===e&&(!0===(null===(s=this.gameData)||void 0===s||null===(o=s.mAds)||void 0===o?void 0:o.dp)||!0===(null===(d=this.gameData)||void 0===d||null===(u=d.mAds)||void 0===u||null===(c=u.dp)||void 0===c?void 0:c.enabled))||"rewarded"===e&&(!0===(null===(l=this.gameData)||void 0===l||null===(h=l.rAds)||void 0===h?void 0:h.dp)||!0===(null===(p=this.gameData)||void 0===p||null===(f=p.rAds)||void 0===f||null===(m=f.dp)||void 0===m?void 0:m.enabled)))}},{key:"_create_dp_display_context",value:function(){var e=this;return new Promise(function(t){var n=this;v.default(this,e);try{var r={id:this.topDomain||this.parentDomain,au:"display",ty:"display",aid:this.gameData.gameId,pgu:this.parentURL},a=new wh(this.gameData).checkCustomParams();a&&(r.cp=a);var i=encodeURIComponent(m.Base64.encode(JSON.stringify(r)));fetch("https://tag.atom.gamedistribution.com/v1/atm?ar=".concat(i)).then(function(e){return v.default(this,n),e.json()}.bind(this)).then(function(e){if(v.default(this,n),!e||!e.p)return this.msgrt.send("dp.na",{message:"atom"}),t();this.msgrt.send("dp.fp",{message:e.p/100}),t({params:{fp:e.p/100},error_url:"https://tag.atom.gamedistribution.com/v1/err?ar=".concat(i),impression_url:"https://tag.atom.gamedistribution.com/v1/imp?ar=".concat(i)})}.bind(this)).catch(function(e){v.default(this,n),this.msgrt.send("dp.err",{message:(null==e?void 0:e.message)||e}),t()}.bind(this))}catch(e){this.msgrt.send("dp.err",{message:(null==e?void 0:e.message)||e}),t()}}.bind(this))}},{key:"_create_dp_context",value:function(e,t){var n=this;return new Promise(function(){var r=_.default(E.default.mark((function r(a){var i,s,o,d,u,c,l=this;return E.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(r.prev=0,n._isDP(e)){r.next=5;break}return n.msgrt.send("dp.na",{message:"rule"}),r.abrupt("return",a());case 5:s={id:n.topDomain||n.parentDomain,au:e||"unknown",ty:"video",aid:n.gameData.gameId,pgu:n.parentURL},(o=new wh(n.gameData).checkCustomParams())&&(s.cp=o),d=encodeURIComponent(m.Base64.encode(JSON.stringify(s))),u=null===(i=n.gameData.promo)||void 0===i?void 0:i.rainbow,c=(null==u?void 0:u.enabled)&&!0!==(null==t?void 0:t.fallback_adsense),fetch("https://tag.atom.gamedistribution.com/v1/atm?ar=".concat(d)).then(function(e){return v.default(this,l),e.json()}.bind(this)).then(function(e){if(v.default(this,l),!e||!e.p)return n.msgrt.send("dp.na",{message:"atom"}),a();var t=e.p/100;a({id:Date.now(),floor_price:t,error_url:"https://tag.atom.gamedistribution.com/v1/err?ar=".concat(d,"&ec=[ERRORCODE]"),impression_url:"https://tag.atom.gamedistribution.com/v1/imp?ar=".concat(d),skip_url:"https://tag.atom.gamedistribution.com/v1/skp?ar=".concat(d),promo_url:c?"https://tag.atom.gamedistribution.com/v1/rainbow?ar=".concat(d):void 0,promo_imp_blue_url:c?"https://tag.atom.gamedistribution.com/v1/rainbow/blue":void 0,promo_imp_green_url:c?"https://tag.atom.gamedistribution.com/v1/rainbow/green":void 0})}.bind(this)).catch(function(e){v.default(this,l),n.msgrt.send("dp.err",{message:(null==e?void 0:e.message)||e}),a()}.bind(this)),r.next=18;break;case 14:r.prev=14,r.t0=r.catch(0),n.msgrt.send("dp.err",{message:(null===r.t0||void 0===r.t0?void 0:r.t0.message)||r.t0}),a();case 18:case"end":return r.stop()}}),r,this,[[0,14]])})));return function(e){return r.apply(this,arguments)}}())}},{key:"_extend_dp_with_adsense",value:function(e,t,n){if(e&&t&&n)try{var r,a=new S.default(t.vastUrl,!0);if(null===(r=a.query)||void 0===r||!r.cust_params)return;if(!D.default.parse(a.query.cust_params).tnl_asset_id)return;n.bidFloor,n.isDfpBidding;var i=k.default(n,Rh);a.query.cust_params=D.default.stringify(Ih(Ih({},i),{},{adsense:1}),!1),e.fallback_url=a.toString(),e.fallback_imp_url="https://tag.atom.gamedistribution.com/v1/rainbow/green"}catch(e){}}},{key:"_init_hl_script",value:(o=_.default(E.default.mark((function e(t){var n,r,a=this;return E.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this._getPrebidScripts(),r=n[0],window.HB_OPTIONSgd={gameId:this.gameId},e.next=5,d.getScript(r,"gdsdk_prebid",{alternates:n,error_prefix:"Blocked:",exists:function(){return v.default(this,a),window.idhb}.bind(this)});case 5:window.idhb=window.idhb||{},window.idhb.que=window.idhb.que||[],window.idhb.que.push(function(){var e=this;v.default(this,a),window.idhb.addEventListener("slotRenderEnded",function(t){var n=this;v.default(this,e);try{var r,a=t.slotId.split("@");a=1===a.length?a[0]:a[1],t.isEmpty?(null!==(r=this.atom_display)&&void 0!==r&&r.error_url&&(fetch(this.atom_display.error_url).catch(function(e){v.default(this,n)}.bind(this)),delete this.atom_display),this.eventBus.broadcast("DISPLAYAD_ERROR",{message:a,status:"warning"})):(this.atom_display.impression_url&&(fetch(this.atom_display.impression_url).catch(function(e){v.default(this,n)}.bind(this)),delete this.atom_display),this.eventBus.broadcast("DISPLAYAD_IMPRESSION",{message:a,status:"success"}))}catch(e){}}.bind(this))}.bind(this));case 8:case"end":return e.stop()}}),e,this)}))),function(e){return o.apply(this,arguments)})},{key:"_init_ima_script",value:(s=_.default(E.default.mark((function e(t){var n,r,a=this;return E.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=["https://imasdk.googleapis.com/js/sdkloader/ima3_debug.js","https://imasdk.googleapis.com/js/sdkloader/ima3.js","http://imasdk.googleapis.com/js/sdkloader/ima3_debug.js","http://imasdk.googleapis.com/js/sdkloader/ima3.js"],r=this.options.debug?n[0]:n[1],e.next=4,d.getScript(r,"gdsdk_ima",{alternates:n,error_prefix:"Blocked:",exists:function(){return v.default(this,a),window.google&&window.google.ima}.bind(this)});case 4:case"end":return e.stop()}}),e,this)}))),function(e){return s.apply(this,arguments)})},{key:"_init_afg_script",value:(i=_.default(E.default.mark((function e(t){var n,r,a,i,s=this;return E.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.gameData.afg_disabled){e.next=3;break}return e.abrupt("return");case 3:return(i={}).crossorigin="anonymous",i["data-ad-client"]=(null==t||null===(n=t.adsense_client)||void 0===n?void 0:n.length)>0?t.adsense_client:"ca-pub-2316275586951220",i["data-ad-frequency-hint"]="30s",(null==t||null===(r=t.adsense_channel)||void 0===r?void 0:r.length)>0&&(i["data-ad-channel"]=t.adsense_channel),(null==t||null===(a=t.adsense_host)||void 0===a?void 0:a.length)>0&&(i["data-ad-host"]=t.adsense_host),!0===(null==t?void 0:t.adsense_adbreak_test)&&(i["data-adbreak-test"]="on"),e.next=13,d.getScript("https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js","afg",{error_prefix:"Blocked:",exists:function(){return v.default(this,s),!!window.adsbygoogle}.bind(this),attrs:i});case 13:window.adsbygoogle=window.adsbygoogle||[],window.adsbygoogle.push({sound:"on",preloadAdBreaks:"on"});case 15:case"end":return e.stop()}}),e,this)}))),function(e){return i.apply(this,arguments)})},{key:"_startAdsensePlacementRewardedAd",value:(a=_.default(E.default.mark((function e(t){var n,r,a,i,s,o,d=this;return E.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=1,!this.requestRunning){e.next=5;break}return this.eventBus.broadcast("AD_IS_ALREADY_RUNNING",{status:"warning"}),e.abrupt("return");case 5:this.requestRunning=!0,this._send_atom_event("sg.ad.rw.requested"),n=function(){v.default(this,d),this.eventBus.broadcast("CONTENT_PAUSE_REQUESTED",{message:"",status:"success"}),this.eventBus.broadcast("IMPRESSION",{message:"",status:"success"})}.bind(this),r=function(){v.default(this,d),this.eventBus.broadcast("CONTENT_RESUME_REQUESTED",{message:"",status:"success"})}.bind(this),a=function(){v.default(this,d),this._send_atom_event("sg.ad.rw.dismissed")}.bind(this),i=function(){v.default(this,d),this.eventBus.broadcast("COMPLETE",{message:"",status:"success"}),this._send_atom_event("sg.ad.rw.viewed")}.bind(this),s=function(e){v.default(this,d),e()}.bind(this),o=function(e){v.default(this,d),this.resetForNext(),this.adCounter.rewarded=this.adCounter.rewarded||0,this.adCounter.rewarded++,"viewed"===e.breakStatus?this.eventBus.broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success"}):(this.eventBus.broadcast("AD_ERROR",{message:e.breakStatus,status:"error"}),"dismissed"!==e.breakStatus&&this._send_atom_event("sg.dbg.rw",e))}.bind(this),t={type:"reward",name:"reward-in-game",beforeAd:n,afterAd:r,adDismissed:a,adViewed:i,beforeReward:s,adBreakDone:o},window.adsbygoogle.push(t),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 t}),e,this,[[1,17]])}))),function(e){return a.apply(this,arguments)})},{key:"_startAdsensePlacementPreroll",value:(r=_.default(E.default.mark((function e(t){var n,r=this;return E.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=1,!this.requestRunning){e.next=5;break}return this.eventBus.broadcast("AD_IS_ALREADY_RUNNING",{status:"warning"}),e.abrupt("return");case 5:this.requestRunning=!0,this._send_atom_event("sg.ad.pr.requested"),n=function(e){v.default(this,r),this.resetForNext(),this.adCounter.preroll=this.adCounter.preroll||0,this.adCounter.preroll++,"viewed"===e.breakStatus?(this._send_atom_event("sg.ad.pr.viewed"),this.eventBus.broadcast("CONTENT_PAUSE_REQUESTED",{message:"",status:"success"}),this.eventBus.broadcast("IMPRESSION",{message:"",status:"success"}),this.eventBus.broadcast("COMPLETE",{message:"",status:"success"}),this.eventBus.broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success"}),this.eventBus.broadcast("CONTENT_RESUME_REQUESTED",{message:"",status:"success"})):(this.eventBus.broadcast("AD_ERROR",{message:e.breakStatus,status:"error"}),this._send_atom_event("sg.dbg.pr",e))}.bind(this),t={type:"preroll",adBreakDone:n},window.adsbygoogle.push(t),e.next=16;break;case 12:throw e.prev=12,e.t0=e.catch(1),this._onError(e.t0),e.t0;case 16:case"end":return e.stop()}var t}),e,this,[[1,12]])}))),function(e){return r.apply(this,arguments)})},{key:"_startAdsensePlacementStart",value:(n=_.default(E.default.mark((function e(t){var n,r,a,i=this;return E.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=1,!this.requestRunning){e.next=5;break}return this.eventBus.broadcast("AD_IS_ALREADY_RUNNING",{status:"warning"}),e.abrupt("return");case 5:this.requestRunning=!0,this._send_atom_event("sg.ad.pr.requested"),n=function(){v.default(this,i),this.eventBus.broadcast("CONTENT_PAUSE_REQUESTED",{message:"",status:"success"}),this.eventBus.broadcast("IMPRESSION",{message:"",status:"success"})}.bind(this),r=function(){v.default(this,i),this.eventBus.broadcast("CONTENT_RESUME_REQUESTED",{message:"",status:"success"})}.bind(this),a=function(e){v.default(this,i),this.resetForNext(),this.adCounter.preroll=this.adCounter.preroll||0,this.adCounter.preroll++,"viewed"===e.breakStatus?(this._send_atom_event("sg.ad.pr.viewed"),this.eventBus.broadcast("COMPLETE",{message:"",status:"success"}),this.eventBus.broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success"})):(this.eventBus.broadcast("AD_ERROR",{message:e.breakStatus,status:"error"}),this._send_atom_event("sg.dbg.pr",e))}.bind(this),t={type:"start",name:"start-in-game",beforeAd:n,afterAd:r,adBreakDone:a},window.adsbygoogle.push(t),e.next=18;break;case 14:throw e.prev=14,e.t0=e.catch(1),this._onError(e.t0),e.t0;case 18:case"end":return e.stop()}var t}),e,this,[[1,14]])}))),function(e){return n.apply(this,arguments)})},{key:"_startAdsensePlacementNext",value:(t=_.default(E.default.mark((function e(t){var n,r,a,i=this;return E.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=1,!this.requestRunning){e.next=5;break}return this.eventBus.broadcast("AD_IS_ALREADY_RUNNING",{status:"warning"}),e.abrupt("return");case 5:this.requestRunning=!0,this._send_atom_event("sg.ad.mr.requested"),n=function(){v.default(this,i),this.eventBus.broadcast("CONTENT_PAUSE_REQUESTED",{message:"",status:"success"}),this.eventBus.broadcast("IMPRESSION",{message:"",status:"success"})}.bind(this),r=function(){v.default(this,i),this.eventBus.broadcast("CONTENT_RESUME_REQUESTED",{message:"",status:"success"})}.bind(this),a=function(e){v.default(this,i),this.resetForNext(),this.adCounter.midroll=this.adCounter.midroll||0,this.adCounter.midroll++,"viewed"===e.breakStatus?(this._send_atom_event("sg.ad.mr.viewed"),this.eventBus.broadcast("COMPLETE",{message:"",status:"success"}),this.eventBus.broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success"})):(this.eventBus.broadcast("AD_ERROR",{message:e.breakStatus,status:"error"}),this._send_atom_event("sg.dbg.mr",e))}.bind(this),t={type:"next",name:"next-in-game",beforeAd:n,afterAd:r,adBreakDone:a},window.adsbygoogle.push(t),e.next=18;break;case 14:throw e.prev=14,e.t0=e.catch(1),this._onError(e.t0),e.t0;case 18:case"end":return e.stop()}var t}),e,this,[[1,14]])}))),function(e){return t.apply(this,arguments)})},{key:"_send",value:function(e,t){try{var n=this.msgrt,r=n._layout,a=n._ua,i={tp:e,ct:0,vrs:this.PackageJSON.version,url:this.parentURL,rfr:document.referrer,tdmn:this.topDomain||this.parentDomain,dpth:0,args:t,ua:{brnm:a.browser.name,brvs:a.browser.version,osnm:a.os.name,osvs:a.os.version,dvmd:a.device.model,w:r.w,h:r.h}};fetch("https://tag.atom.gamedistribution.com/v1/dmp?ar=".concat(encodeURIComponent(m.Base64.encode(JSON.stringify(i)))))}catch(e){}}},{key:"_send_atom_event",value:function(e,t){this._send(e,{gid:this.gameData.slug,md5:this.gameData.gameId,pid:0,pnm:this.gameData.pname,ctry:this.gameData.ctry,lcl:"en",hle:1,ads:1,args:t})}},{key:"_isAfgPositionNext",value:function(e){return void 0!==e.adTimestamp}},{key:"_isAfgPositionStart",value:function(e){if(void 0!==e.adTimestamp)return!1;return this.adCounter.preroll=this.adCounter.preroll||0,0===this.adCounter.preroll}},{key:"attachAfgPosition",value:function(e){var t=e.params.position;switch(t){case"preroll":case"start":case"pause":case"next":case"browse":case"reward":return}var n=e.adType;n===d.AdType.Rewarded?t="reward":n===d.AdType.Interstitial&&(this._isAfgPositionStart(e)?t="start":this._isAfgPositionNext(e)&&(t="next")),e.params.position=t}}]),e}(),Lh=Array.isArray,Uh=Object.prototype.toString,jh=Lh||function(e){return!!e&&"[object Array]"==Uh.call(e)},Mh=_n,Bh=Y,Nh=Ln,qh=Lt,Gh=Ot,Fh=Q,Vh=Rr,Kh=nr,Wh=yr("slice"),zh=Kh("species"),Hh=[].slice,$h=Math.max;Mh({target:"Array",proto:!0,forced:!Wh},{slice:function(e,t){var n,r,a,i=Fh(this),s=Gh(i.length),o=qh(e,s),d=qh(void 0===t?s:t,s);if(Nh(i)&&("function"!=typeof(n=i.constructor)||n!==Array&&!Nh(n.prototype)?Bh(n)&&null===(n=n[zh])&&(n=void 0):n=void 0,n===Array||void 0===n))return Hh.call(i,o,d);for(r=new(void 0===n?Array:n)($h(d-o,0)),a=0;o<d;o++,a++)o in i&&Vh(r,a,i[o]);return r.length=a,r}});var Qh=ve,Yh=pa,Jh=Cn,Xh=wn,Zh=function(e,t,n,r){try{return r?t(Qh(n)[0],n[1]):t(n)}catch(t){throw Yh(e),t}},ep=oa,tp=Ot,np=Rr,rp=la,ap=function(e){var t,n,r,a,i,s,o=Xh(e),d="function"==typeof this?this:Array,u=arguments.length,c=u>1?arguments[1]:void 0,l=void 0!==c,h=rp(o),p=0;if(l&&(c=Jh(c,u>2?arguments[2]:void 0,2)),null==h||d==Array&&ep(h))for(n=new d(t=tp(o.length));t>p;p++)s=l?c(o[p],p):o[p],np(n,p,s);else for(i=(a=h.call(o)).next,n=new d;!(r=i.call(a)).done;p++)s=l?Zh(a,c,[r.value,p],!0):r.value,np(n,p,s);return n.length=p,n};_n({target:"Array",stat:!0,forced:!Da((function(e){Array.from(e)}))},{from:ap});var ip,sp,op,dp=!L((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),up=ee,cp=wn,lp=dp,hp=Qe("IE_PROTO"),pp=Object.prototype,fp=lp?Object.getPrototypeOf:function(e){return e=cp(e),up(e,hp)?e[hp]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?pp:null},mp=L,gp=fp,vp=Se,yp=ee,bp=nr("iterator"),_p=!1;[].keys&&("next"in(op=[].keys())?(sp=gp(gp(op)))!==Object.prototype&&(ip=sp):_p=!0),(null==ip||mp((function(){var e={};return ip[bp].call(e)!==e})))&&(ip={}),yp(ip,bp)||vp(ip,bp,(function(){return this}));var Ap={IteratorPrototype:ip,BUGGY_SAFARI_ITERATORS:_p},wp=Ap.IteratorPrototype,Ep=Gu,kp=q,Sp=Jr,Tp=ra,xp=function(){return this},Dp=_n,Rp=function(e,t,n){var r=t+" Iterator";return e.prototype=Ep(wp,{next:kp(1,n)}),Sp(e,r,!1),Tp[r]=xp,e},Op=fp,Ip=Go,Cp=Jr,Pp=Se,Lp=Te.exports,Up=ra,jp=Ap.IteratorPrototype,Mp=Ap.BUGGY_SAFARI_ITERATORS,Bp=nr("iterator"),Np=function(){return this},qp=function(e,t,n,r,a,i,s){Rp(n,t,r);var o,d,u,c=function(e){if(e===a&&m)return m;if(!Mp&&e in p)return p[e];switch(e){case"keys":case"values":case"entries":return function(){return new n(this,e)}}return function(){return new n(this)}},l=t+" Iterator",h=!1,p=e.prototype,f=p[Bp]||p["@@iterator"]||a&&p[a],m=!Mp&&f||c(a),g="Array"==t&&p.entries||f;if(g&&(o=Op(g.call(new e)),jp!==Object.prototype&&o.next&&(Op(o)!==jp&&(Ip?Ip(o,jp):"function"!=typeof o[Bp]&&Pp(o,Bp,Np)),Cp(o,l,!0))),"values"==a&&f&&"values"!==f.name&&(h=!0,m=function(){return f.call(this)}),p[Bp]!==m&&Pp(p,Bp,m),Up[t]=m,a)if(d={values:c("values"),keys:i?m:c("keys"),entries:c("entries")},s)for(u in d)(Mp||h||!(u in p))&&Lp(p,u,d[u]);else Dp({target:t,proto:!0,forced:Mp||h},d);return d},Gp=ru.charAt,Fp=ct,Vp=qp,Kp=Fp.set,Wp=Fp.getterFor("String Iterator");Vp(String,"String",(function(e){Kp(this,{type:"String Iterator",string:String(e),index:0})}),(function(){var e,t=Wp(this),n=t.string,r=t.index;return r>=n.length?{value:void 0,done:!0}:(e=Gp(n,r),t.index+=e.length,{value:e,done:!1})})),Zu("iterator");var zp=Q,Hp=Sl,$p=ra,Qp=ct,Yp=qp,Jp=Qp.set,Xp=Qp.getterFor("Array Iterator"),Zp=Yp(Array,"Array",(function(e,t){Jp(this,{type:"Array Iterator",target:zp(e),index:0,kind:t})}),(function(){var e=Xp(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}}),"values");$p.Arguments=$p.Array,Hp("keys"),Hp("values"),Hp("entries");var ef=C,tf=Do,nf=Zp,rf=Se,af=nr,sf=af("iterator"),of=af("toStringTag"),df=nf.values;for(var uf in tf){var cf=ef[uf],lf=cf&&cf.prototype;if(lf){if(lf[sf]!==df)try{rf(lf,sf,df)}catch(e){lf[sf]=df}if(lf[of]||rf(lf,of,uf),tf[uf])for(var hf in nf)if(lf[hf]!==nf[hf])try{rf(lf,hf,nf[hf])}catch(e){lf[hf]=nf[hf]}}}function pf(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 ff(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 ff(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,o=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){o=!0,i=e},f:function(){try{s||null==n.return||n.return()}finally{if(o)throw i}}}}function ff(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 mf(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 gf(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?mf(Object(n),!0).forEach((function(t){b.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mf(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var vf={react:{src:"https://pm.gamedistribution.com/react/16.14.0/umd/react.production.min.js",name:"React"},"react-dom":{src:"https://pm.gamedistribution.com/react-dom/16.14.0/umd/react-dom.production.min.js",name:"ReactDOM"},redux:{src:"https://pm.gamedistribution.com/redux/4.0.5/dist/redux.min.js",name:"Redux"},"react-redux":{src:"https://pm.gamedistribution.com/react-redux/7.2.1/dist/react-redux.min.js",name:"ReactRedux"},"material-ui-core":{src:"https://pm.gamedistribution.com/@material-ui/core/4.11.3/umd/material-ui.production.min.js",name:"MaterialUI"}},yf={},bf=function(e,t){yf[e]=gf(gf({},t),{},{isLoading:!1})},_f=function(e){var t=this,n=e.id,r=e.src;return new Promise(function(e,a){if(v.default(this,t),document.getElementById(n))e();else{var i=document.createElement("script");i.onload=function(){e()},i.id=n,i.setAttribute("crossorigin",!0),i.src=r,document.head.appendChild(i)}}.bind(this))},Af=function(){var e=_.default(E.default.mark((function e(t){var n,r,a,i,s,o,d,u;return E.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n=window[t])){e.next=3;break}return e.abrupt("return",n);case 3:if(!(r=yf[t]).isLoading){e.next=6;break}return e.abrupt("return");case 6:r.isLoading=!0,a=pf(r.dependencies),e.prev=8,a.s();case 10:if((i=a.n()).done){e.next=26;break}if(s=i.value,e.prev=12,o=vf[s].name,!window[o]){e.next=16;break}return e.abrupt("continue",24);case 16:return e.next=18,_f({id:s,src:vf[s].src});case 18:e.next=24;break;case 20:e.prev=20,e.t0=e.catch(12),d=s.id,u=s.src,console.log("Could not load external script ".concat(d," ").concat(u),e.t0);case 24:e.next=10;break;case 26:e.next=31;break;case 28:e.prev=28,e.t1=e.catch(8),a.e(e.t1);case 31:return e.prev=31,a.f(),e.finish(31);case 34:return e.prev=34,e.next=37,_f({id:t,src:r.source});case 37:n=window[t],e.next=43;break;case 40:e.prev=40,e.t2=e.catch(34),console.log("Could not load module ".concat(t," ").concat(r.source,"."),e.t2);case 43:return r.isLoading=!1,e.abrupt("return",n);case 45:case"end":return e.stop()}}),e,null,[[8,28,31,34],[12,20],[34,40]])})));return function(t){return e.apply(this,arguments)}}(),wf=function e(t){var n=this;A.default(this,e),b.default(this,"load",_.default(E.default.mark((function e(){return E.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Af(n.moduleName);case 2:n.module=e.sent;case 3:case"end":return e.stop()}}),e)})))),b.default(this,"promo",_.default(E.default.mark((function e(){return E.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.module){e.next=3;break}return e.next=3,n.load();case 3:return e.abrupt("return",n.module[n.moduleDefault]);case 4:case"end":return e.stop()}}),e)}))));var r=t.package||"gd-sdk-stone-dynamic",a=t.package_version||"1.1.1",i=t.template||"puzzle",s=t.dependencies||[];this.moduleName="GDPromoByOrbit",this.moduleDefault=i.charAt(0).toUpperCase()+i.slice(1),this.moduleConfig={source:"https://pm.gamedistribution.com/@bygd/".concat(r,"/").concat(a,"/dist/").concat(i.toLowerCase(),"/iife/index.js"),dependencies:s},bf(this.moduleName,this.moduleConfig)},Ef=function e(t){var n=this;A.default(this,e),b.default(this,"load",_.default(E.default.mark((function e(){return E.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Af(n.moduleName);case 2:n.module=e.sent;case 3:case"end":return e.stop()}}),e)})))),b.default(this,"splash",_.default(E.default.mark((function e(){return E.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.module){e.next=3;break}return e.next=3,n.load();case 3:return e.abrupt("return",n.module[n.moduleDefault]);case 4:case"end":return e.stop()}}),e)}))));var r=t.package||"gd-sdk-air-dynamic",a=t.package_version||"1.2.0",i=t.template||"pluto",s=t.dependencies||[];this.moduleName="GDSplashDynamic",this.moduleDefault=i.charAt(0).toUpperCase()+i.slice(1),this.moduleConfig={source:"https://pm.gamedistribution.com/@bygd/".concat(r,"/").concat(a,"/dist/").concat(i.toLowerCase(),"/iife/index.js"),dependencies:s},bf(this.moduleName,this.moduleConfig)},kf=function(e,t){console.log(e,t)},Sf={},Tf={},xf=null;function Df(){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 Sf.version=r,Sf.frame=e,Sf.function=n,Sf.version}function Rf(e){var t=this;return xf||(xf=new Promise(function(n){function r(t,r){if(kf("Received a response from CMP",t),r){var a,i;if(!1!==t.gdprApplies)return"tcloaded"===t.eventStatus||"useractioncomplete"===t.eventStatus?(("boolean"!=typeof(i=(a=t)&&"boolean"==typeof a.gdprApplies?a.gdprApplies:e.defaultGdprScope)||!0===i&&"string"!=typeof a.tcString)&&n({result:"cmpUnexpectedResponse",cmp:Sf,consentData:a}),void n({result:"ok",consentData:t})):void 0;n({result:"ok",consentData:t})}else n({result:"cmpCallFailed"})}v.default(this,t),Df(),Sf.frame?2===Sf.version?(kf("TCF v2 CMP found. Fetching the consent."),Sf.function?(kf("CMP API is directly accessible, calling it now..."),Sf.function("addEventListener",Sf.version,r)):(kf("CMP API is outside the current iframe, calling it now..."),function(e,t,n){var r=this,a="__tcfapi";function i(e){var t="".concat(a,"Return"),n="string"==typeof e.data&&e.data.indexOf(t)>=0?JSON.parse(e.data):e.data;if(n[t]&&n[t].callId){var r=n[t];void 0!==Tf[r.callId]&&Tf[r.callId](r.returnValue,r.success)}}window[a]=function(e,n,i,s){v.default(this,r);var o=Math.random()+"",d="".concat(a,"Call"),u=b.default({},d,{command:e,parameter:s,callId:o,version:n});Tf[o]=i,t.postMessage(u,"*")}.bind(this),window.addEventListener("message",i,!1),window[a](e,Sf.version,n)}("addEventListener",Sf.frame,r))):n({result:"cmpVersionNotV2",cmp:Sf}):n({result:"cmpNotFound"})}.bind(this)))}var Of=new(function(){function e(){A.default(this,e),this.productName="Game Distribution"}var t;return w.default(e,[{key:"track",value:(t=_.default(E.default.mark((function e(t){var n,r,a,i,s,o;return E.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=null==t||null===(n=t.visitor)||void 0===n?void 0:n.visitorId){e.next=3;break}return e.abrupt("return");case 3:return a=encodeURIComponent(this.productName),i=encodeURIComponent(r),e.prev=5,s="https://tracker-v4.gamedock.io/v1/events-tracker/track/product/".concat(a,"/user_id/").concat(i),e.next=9,fetch(s,{method:"POST"});case 9:e.next=25;break;case 12:return e.prev=12,e.t0=e.catch(5),console.log("GAME_DOCK. fail v4",e.t0),e.prev=15,o="https://tracker.gamedock.io/v1/events-tracker/track/product/".concat(a,"/user_id/").concat(i),e.next=19,fetch(o,{method:"POST"});case 19:e.next=25;break;case 22:e.prev=22,e.t1=e.catch(15),console.log("GAME_DOCK. fail v6",e.t1);case 25:case"end":return e.stop()}}),e,this,[[5,12],[15,22]])}))),function(e){return t.apply(this,arguments)})}]),e}());function If(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 Cf(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?If(Object(n),!0).forEach((function(t){b.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):If(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Pf=null,Lf=function(){function e(t){var n=this;if(A.default(this,e),Pf)return Pf;Pf=this,this._defaults=this._getDefaultOptions(),this._extendDefaultOptions(this._defaults,t),this._version=t.version||"0.0.0",this._bridge=this._getBridgeContext(),this._parentURL=this._bridge.parentURL,this._parentDomain=this._bridge.parentDomain,this._topDomain=this._bridge.topDomain,this._isFullScreen=!1,this._setConsoleBanner(),this._initializeMessageRouter(),this._checkConsole(),this._subscribeToEvents(),this.sdkReady=new Promise(this._initializeSDKWithGameData.bind(this)),this.sdkReady.then(function(e){v.default(this,n),this._sdk_ready=!0}.bind(this)).catch(function(e){v.default(this,n),this._sdk_ready=!1}.bind(this)).finally(function(){var e=this;v.default(this,n),this._sendLoaderDataEvent(),this._checkSplashAndPromoScreens(),this._initBlockingExternals(),window.addEventListener("DOMNodeInserted",function(){if(v.default(this,e),this._gameData.block_exts&&this._removeExternalsInHtml({enabled:!1}),document.getElementsByClassName("webgl-content")[0]){var t=document.getElementsByClassName("webgl-content")[0].getElementsByClassName("footer")[0];t&&t.setAttribute("style","display:none")}}.bind(this)),this._checkFullscreen()}.bind(this))}var t,n,r,a,i,s,o,u,c,l;return w.default(e,[{key:"testConsent",value:function(){console.log("test-consent. Finding CMP");try{var e=Df();console.log("CMP found",e),_.default(E.default.mark((function e(){var t;return E.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Rf({});case 2:t=e.sent,console.log("After lookup IAB consent",t);case 4: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:"isLoaded",value:function(){if(void 0===this._isLoaded){var e=this._isTokenGameURL(),t=this._isExtHostedGameURL(),n=this._isMasterGameURL();this._isLoaded=(e||t&&!n)&&this._gameData.loader.enabled}return this._isLoaded}},{key:"setIsLoaded",value:function(e){this._isLoaded=e}},{key:"_sendLoadedEvent",value:function(){if(!this.isLoaded()){this.setIsLoaded(!0);try{this._sendTunnlEvent(1),this.msgrt.send("loaded",{message:this._hasBlocker?"Has Blocker":"No Blocker"}),this._initGamedockTracker(window.GamedockSDK,"gameplay")}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||!this._bridge.isCoreSDKMode&&!this._bridge.noMinijuegosSDK&&document.location.search.indexOf("mp_game_id")>=0&&this._loadMiniJuegosGratisTracker()}},{key:"_initializeSDKWithGameData",value:(l=_.default(E.default.mark((function e(t,n){var r,a=this;return E.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this._getGameData();case 3:this._gameData=e.sent,this._bridge.isCoreSDKMode=!(!0===this._gameData.enableAds||!0===(null===(r=this._gameData.enableAds)||void 0===r?void 0:r.enabled)),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().catch(function(e){return v.default(this,a),console.error(e.message||e)}.bind(this))),this._sendSDKReady(),t(this._gameData),e.next=20;break;case 15:e.prev=15,e.t0=e.catch(0),this._sendSDKError(e.t0),this.onResumeGame(e.t0.message,"warning"),n(e.t0);case 20:case"end":return e.stop()}}),e,this,[[0,15]])}))),function(e,t){return l.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=x.default(e);this.options=t?d.extendDefaults(n,t):n,this.options.gameId=this.options.gameId.trim()}},{key:"_setConsoleBanner",value:function(){if(!this._bridge.noConsoleBanner){var e=ah.version,t=console.log("%c %c %c GameDistribution.com HTML5 SDK | Version: "+e+" %c %c %c","background: #9854d8","background: #6c2ca7","color: #fff; background: #450f78;","background: #6c2ca7","background: #9854d8","background: #ffffff");console.log.apply(console,t)}}},{key:"_sendTunnlEvent",value:function(e){var t={page_url:this._topDomain||this._parentDomain,game_id:this.options.gameId,eventtype:e,ts:Date.now()};fetch("https://ana.headerlift.com/event?".concat(D.default.stringify(t)))}},{key:"_sendAdRequestContext",value:function(e){this.msgrt.send("adctx",{message:e.adTag.bidder})}},{key:"_checkWhitelabelPartner",value:function(){this._whitelabelPartner=!1;var e=d.getQueryParams("xanthophyll");e.hasOwnProperty("xanthophyll")&&"true"===e.xanthophyll&&(this._whitelabelPartner=!0,d.dankLog("White label publisher","".concat(this._whitelabelPartner),"success"))}},{key:"_checkConsole",value:function(){try{if(!d.Ls.available)return;"developer.gamedistribution.com"===this._parentDomain?(d.Ls.set("gd_debug_ex",!0),d.Ls.set("gd_disable_midroll_timer",!0),d.Ls.set("gd_tag",!0)):"localhost:3000"===this._parentDomain&&(d.Ls.set("gd_debug_ex",!0),d.Ls.set("gd_disable_midroll_timer",!0)),d.Ls.getBoolean("gd_debug_ex")&&(this.openConsole(),this.msgrt.send("dev.console",{message:this._parentDomain}))}catch(e){}}},{key:"_checkUserDeclinedTracking",value:function(){this._userDeclinedTracking=this._bridge.isCoreSDKMode||document.location.search.indexOf("gdpr-tracking=0")>=0||document.cookie.indexOf("ogdpr_tracking=0")>=0}},{key:"_initializeMessageRouter",value:function(){this.msgrt=new d.MessageRouter({gameId:this.options.gameId,hours:(new Date).getHours(),topDomain:this._topDomain,domain:this._parentDomain,referrer:this._parentURL,depth:d.getIframeDepth(),version:ah.version,tracking:this._userDeclinedTracking,whitelabel:this._whitelabelPartner,platform:d.getMobilePlatform(),byloader:this._bridge.isTokenGameURL,isTokenGameURL:this._bridge.isTokenGameURL,isMasterGameURL:this._bridge.isMasterGameURL,isExtHostedGameURL:this._bridge.isExtHostedGameURL,byloaderVersion:this._bridge.version})}},{key:"_loadGamedockTracker",value:function(){var e=this;try{var t=["https://cdn.gamedock.io/gamedock-web-tracker/4.3.0/script/gamedock-sdk.min.js"];d.getScript(t[0],"GamedockSDK",{alternates:t}).then(function(){v.default(this,e);var t=this._initGamedockTracker(window.GamedockSDK,"pageview");Of.track(t)}.bind(this)).catch(function(t){v.default(this,e),this._sendSDKError(t)}.bind(this))}catch(e){}}},{key:"_initGamedockTracker",value:function(e,t){if(!this._bridge.isCoreSDKMode){var n=e.initialize("gd",this._parentDomain);return n.tracking.trackEvent(t,{pageId:this.options.gameId,pageType:"game"}),n}}},{key:"_loadMiniJuegosGratisTracker",value:function(){var e=this;window.mpConfig={game:this.options.gameId,partner:"game-distribution"};var t=["https://ext.minijuegosgratis.com/external-host/main.js"];d.getScript(t[0],"MinijuegosSDK",{alternates:t}).catch(function(t){v.default(this,e),this._sendSDKError(t)}.bind(this))}},{key:"_loadGoogleAnalytics",value:function(){var e=this,t=["https://www.google-analytics.com/analytics.js"];d.getScript(t[0],"gdsdk_google_analytics",{alternates:t,error_prefix:"Blocked:",exists:function(){return v.default(this,e),window.ga}.bind(this)}).then(function(){v.default(this,e),window.ga("create","UA-60359297-49",{name:"gd",cookieExpires:7776e3,sampleRate:5},"auto"),this._bridge.noGAPageView||window.ga("gd.send","pageview"),this._userDeclinedTracking||window.ga("gd.set","anonymizeIp",!0)}.bind(this)).catch(function(t){v.default(this,e),this._sendSDKError(t)}.bind(this))}},{key:"_subscribeToEvents",value:function(){var e=this;this.eventBus=new d.EventBus,d.SDKEvents.forEach(function(t){var n=this;return v.default(this,e),this.eventBus.subscribe(t,function(e){return v.default(this,n),this._onEvent(e)}.bind(this),"sdk")}.bind(this)),d.IMAEvents.forEach(function(t){var n=this;return v.default(this,e),this.eventBus.subscribe(t,function(e){return v.default(this,n),this._onEvent(e)}.bind(this),"ima")}.bind(this)),this.eventBus.subscribe("COMPLETE",function(){if(v.default(this,e),"developer.gamedistribution.com"===this._parentDomain||!0===new RegExp("^localhost").test(this._parentDomain)){fetch("https://game.api.gamedistribution.com/game/v2/hasapi/".concat(this.options.gameId,"?timestamp=").concat((new Date).valueOf()));try{var t=JSON.stringify({type:"GD_SDK_IMPLEMENTED",gameID:this.options.gameId});window.location!==window.top.location?window.top.postMessage(t,"*"):null!==window.opener&&window.opener.location!==window.location&&window.opener.postMessage(t,"*")}catch(e){}}}.bind(this),"ima"),this.eventBus.subscribe("CONTENT_PAUSE_REQUESTED",function(){return v.default(this,e),this.onPauseGame("New advertisements requested and loaded","success")}.bind(this),"ima"),this.eventBus.subscribe("IMPRESSION",function(t){v.default(this,e),this.msgrt.send("ad.impression")}.bind(this),"ima"),this.eventBus.subscribe("AD_ERROR",function(t){v.default(this,e),this.msgrt.send("ad.error",{message:t.message,details:t.details})}.bind(this),"ima"),this.eventBus.subscribe("AD_SDK_REQUEST",function(t){v.default(this,e),this._sendAdRequestContext(t.message)}.bind(this),"sdk"),this.eventBus.subscribe("SDK_ERROR",function(t){v.default(this,e),t.message.startsWith("Blocked:")?this._bridge.noBlockerEvent||(this.msgrt.send("error",{message:t.message}),this._hasBlocker||(this._hasBlocker=!0,this._sendTunnlEvent(3))):this.msgrt.send("error",{message:t.message})}.bind(this),"sdk"),this.eventBus.subscribe("AD_REQUEST_KEYS_EMPTY",function(t){v.default(this,e),this.msgrt.send("tunnl.keys.empty",{message:t.message,details:t.details})}.bind(this),"sdk"),this.eventBus.subscribe("AD_REQUEST_KEYS_FALLBACK",function(t){v.default(this,e),this.msgrt.send("tunnl.keys.fallback",{message:t.message,details:t.details})}.bind(this),"sdk"),this.eventBus.subscribe("AD_T4R",function(t){return v.default(this,e),this.msgrt.send("adt4r")}.bind(this),"sdk")}},{key:"_checkGameId",value:function(){this.options.gameId===this._defaults.gameId&&this._sendSDKError("Check correctness of your GAME ID. Otherwise, no revenue will be recorded.")}},{key:"_getDefaultGameData",value:function(){return{gameId:this.options.gameId,enableAds:!0,preroll:!0,midroll:12e4,rewardedAds:!1,title:"",tags:[],category:"",assets:[],dmain:!0,sdk:{},loader:{},splash:{},promo:{},dAds:{},pAds:{},mAds:{},rAds:{}}}},{key:"_getGameDataUrl",value:function(){var e=void 0!==this._topDomain&&"undefined"!==this._topDomain?this._topDomain:this._parentDomain;return"https://game.api.gamedistribution.com/game/v4/get/".concat(this.options.gameId.replace(/-/g,""),"/?domain=").concat(e,"&v=").concat(ah.version,"&localTime=").concat((new Date).getHours())}},{key:"_checkBlocking",value:(c=_.default(E.default.mark((function e(){var t,n,r=this;return E.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=this._gameData,t=void 0===this._gameData.dmain||this._gameData.dmain,(n.bloc_gard&&!0===n.bloc_gard.enabled||!t)&&(this.msgrt.send("blocked"),setTimeout(function(){v.default(this,r),window.location.href="https://html5.api.gamedistribution.com/blocked.html?".concat(D.default.stringify({domain:this._parentDomain,id:n.gameId,img:this._get_game_thumbnail_url(),title:n.title}))}.bind(this),100));case 5:case"end":return e.stop()}}),e,this)}))),function(){return c.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(){v.default(this,e),document.location="https://html5.api.gamedistribution.com/deleted.html"}.bind(this),100))}},{key:"_changeMidrollInDebugMode",value:function(){var e=this._gameData;d.Ls.available&&d.Ls.getBoolean("gd_debug_ex")&&(d.Ls.getBoolean("gd_disable_midroll_timer")?e.midroll=0:e.midroll=this._getDefaultGameData().midroll)}},{key:"_checkSplashAndPromoScreens",value:function(){var e,t,n;this._gameData.loader&&!1===this._gameData.loader.mobile&&this._getisMobile()&&(this._gameData.loader.enabled=!1);var r=this._gameData,a=r.gdpr&&!0===r.gdpr.consent,i=r.loader,s=null===(e=r.promo)||void 0===e?void 0:e[null===(t=r.promo)||void 0===t||null===(n=t.template)||void 0===n?void 0:n.preroll];r.preroll||(this.adRequestTimer=Date.now()),this.options.loader.enabled?null!=s&&s.enabled?this._createPromoBeforeSplash(r,a):i.enabled?this._createSplash(r,a):this.onResumeGame("Advertisement(s) are done. Start / resume the game.","success"):i.enabled||this._bridge.isTokenGameURL&&this._bridge.isExtHostedGameURL||(this.options.advertisementSettings.autoplay||a?null!=s&&s.enabled?this._createPromoBeforeSplash(r,a):!1!==i.enabled&&this._createSplash(r,a):null!=s&&s.enabled&&this._createPromo(r,a))}},{key:"_initializeVideoAd",value:(u=_.default(E.default.mark((function e(){var t;return E.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._bridge.isCoreSDKMode){e.next=2;break}return e.abrupt("return");case 2:return(t=this._gameData).sdk.enabled&&(this.options.advertisementSettings=d.extendDefaults(this.options.advertisementSettings,t.sdk)),this.macros=new d.Macros({game:t,bridge:this._bridge}),this.adInstance=new Ph(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=ah,e.next=16,this.adInstance.start();case 16:case"end":return e.stop()}}),e,this)}))),function(){return u.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){d.dankLog("DEVELOPER_ERROR",e.message,"warning")}}},{key:"_sendSDKError",value:function(e){e=e.message?e:{message:e};this.eventBus.broadcast("SDK_ERROR",{message:e.message,status:"error"});try{this.options.onError(e)}catch(e){d.dankLog("DEVELOPER_ERROR",e.message,"warning")}}},{key:"_onEvent",value:function(e){d.dankLog(e.name,e.message,e.status);try{this.options.onEvent({name:e.name,message:e.message,status:e.status})}catch(e){d.dankLog("DEVELOPER_ERROR",e.message,"warning")}}},{key:"_getGameData",value:function(){var e=this;return new Promise(function(t){var n=this;v.default(this,e);var r=this._getDefaultGameData(),a=this._getGameDataUrl();fetch(a).then(function(e){return v.default(this,n),e.json()}.bind(this)).then(function(e){if(v.default(this,n),e.success){var a,i,s,o=e.result.game,u={gameId:o.gameMd5,slug:o.slug,pname:o.pname,dname:o.dname,status:o.status,description:o.description,enableAds:!0===o.enableAds||!0===(null===(a=o.enableAds)||void 0===a?void 0:a.enabled),preroll:o.preRoll,midroll:6e4*o.timeAds,rewardedAds:o.rewardedAds,title:o.title,tags:o.tags,category:o.category,assets:o.assets,disp_2nd_prer:o.disp_2nd_prer,ctry_vst:o.ctry_vst,ctry:o.ctry,crtv:o.crtv,dmain:o.dmain,block_exts:this._parseAndSelectRandomOne(o.push_cuda),bloc_gard:this._parseAndSelectRandomOne(o.bloc_gard),cookie:this._parseAndSelectRandomOne(o.cookie),gdpr:this._parseAndSelectRandomOne(o.gdpr),diagnostic:this._parseAndSelectRandomOne(o.diagnostic),sdk:this._parseAndSelectRandomOne(o.sdk)||{},loader:this._parseAndSelectRandomOne(o.loader)||{},splash:this._parseAndSelectRandomOne(o.splash)||{},promo:this._parseAndSelectRandomOne(o.promo)||{},dAds:this._parseAndSelectRandomOne(o.dads)||{},pAds:this._parseAndSelectRandomOne(o.pads)||{},mAds:this._parseAndSelectRandomOne(o.mads)||{},rAds:this._parseAndSelectRandomOne(o.rads)||{}},c=d.extendDefaults(x.default(r),u);c.afg_disabled=!1===(null===(i=c.sdk)||void 0===i||null===(s=i.afg)||void 0===s?void 0:s.enabled),this._bridge.noPreroll=(!this._getisMobile()||!1!==c.loader.mobile)&&this._bridge.noPreroll,this._bridge.noPreroll&&(this.adRequestTimer=Date.now()),this.msgrt.setGameData(c),d.setDankLog(c.diagnostic),t(c)}else r.failed=!0,t(r)}.bind(this)).catch(function(e){v.default(this,n),r.failed=!0,t(r)}.bind(this))}.bind(this))}},{key:"_createSplash",value:(o=_.default(E.default.mark((function e(t,n){var r,a,i=this;return E.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._getSplashTemplate(t);case 2:r=e.sent,(a=new r(Cf(Cf({},this.options),{},{isConsentDomain:n,version:ah.version}),t,this._parentDomain)).on("playClick",function(){var e=this;if(v.default(this,i),n){var t=new Date;t.setDate(t.getDate()+90),document.cookie="ogdpr_tracking=1; expires=".concat(t.toUTCString(),"; path=/")}this.showAd(d.AdType.Interstitial,{position:"preroll"}).catch(function(t){v.default(this,e)}.bind(this))}.bind(this)),this.onPauseGame("Pause the game and wait for a user gesture","success"),this.eventBus.subscribe("SDK_GAME_PAUSE",function(){v.default(this,i),a.hide()}.bind(this)),this.eventBus.subscribe("SDK_GAME_START",function(){v.default(this,i),a.hide()}.bind(this));case 8:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"_createPromoBeforeSplash",value:(s=_.default(E.default.mark((function e(t,n){var r,a,i,s,o=this;return E.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this._createPrerollPromoTemplate(t);case 3:i=e.sent,(s=new i(Cf(Cf({},this.options),{},{isConsentDomain:n,version:ah.version,template:null===(r=t.promo)||void 0===r||null===(a=r.template)||void 0===a?void 0:a.preroll}),t)).on("done",function(){v.default(this,o),s.hide(),this._createSplash(t,n)}.bind(this)),e.next=12;break;case 8:e.prev=8,e.t0=e.catch(0),console.log(e.t0),this._createSplash(t,n);case 12:case"end":return e.stop()}}),e,this,[[0,8]])}))),function(e,t){return s.apply(this,arguments)})},{key:"_createPromo",value:(i=_.default(E.default.mark((function e(t,n){var r,a,i,s,o=this;return E.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this._createPrerollPromoTemplate(t);case 3:i=e.sent,(s=new i(Cf(Cf({},this.options),{},{isConsentDomain:n,version:ah.version,template:null===(r=t.promo)||void 0===r||null===(a=r.template)||void 0===a?void 0:a.preroll}),t)).on("done",function(){v.default(this,o),s.hide(),this.onResumeGame("Resumed after the promo","warning")}.bind(this)),this.onPauseGame("Pause the game for the promo","success"),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(0),this.onResumeGame("Resumed after the promo","warning");case 12:case"end":return e.stop()}}),e,this,[[0,9]])}))),function(e,t){return i.apply(this,arguments)})},{key:"showBanner",value:function(){var e=this;this.showAd(d.AdType.Interstitial).catch(function(){v.default(this,e)}.bind(this))}},{key:"showAd",value:(a=_.default(E.default.mark((function e(t){var n,r=this,a=arguments;return E.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=a.length>1&&void 0!==a[1]?a[1]:{},e.abrupt("return",new Promise(function(){var e=_.default(E.default.mark((function e(a,i){var s,o,d,u,c,l,h=this;return E.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,s={adType:t,params:n,adTimestamp:r.adRequestTimer},e.next=4,r.sdkReady;case 4:return o=e.sent,e.next=7,r.videoAdReady;case 7:return r._sendLoadedEvent(),r._rejectAdIfGameBlocked({gameData:o,adRequest:s}),r._rejectAdIfAdDisabled({gameData:o,adRequest:s}),r._rejectAdIfUnsupportedType({adRequest:s}),r._rejectAdIfRewardedDisabled({gameData:o,adRequest:s}),r._rejectAdIfAdRateHits({gameData:o,adRequest:s}),r.adInstance.attachAfgPosition(s),r._attachAfgFallback({gameData:o,adRequest:s}),d="main.showad",u=function(e){v.default(this,h),r.eventBus.unsubscribeScope(d),r.onResumeGame(e.message,"warning"),i(e.message)}.bind(this),c=function(e){v.default(this,h),r.eventBus.unsubscribeScope(d),r.adRequestTimer=Date.now(),r.onResumeGame("Advertisement(s) are done. Start / resume the game.","success"),a(e.message)}.bind(this),l=function(e){var s=this;v.default(this,h),r.eventBus.unsubscribeScope(d),n.fallback_adsense=!1,r.showAd(t,Cf(Cf({},n),{},{adapter:"adsense"})).then(function(e){v.default(this,s),a(e)}.bind(this)).catch(function(e){v.default(this,s),i(e)}.bind(this))}.bind(this),r.eventBus.subscribe("AD_ERROR",null!=n&&n.fallback_adsense?l:u,d),r.eventBus.subscribe("AD_SDK_CANCELED",null!=n&&n.fallback_adsense?l:u,d),r.eventBus.subscribe("AD_SUCCESS",c,d),e.next=24,r.adInstance.startAd(s);case 24:r._post_message({topic:"adrequest.instream"}),e.next=31;break;case 27:e.prev=27,e.t0=e.catch(0),r.onResumeGame(e.t0.message,"warning"),i(e.t0.message);case 31:case"end":return e.stop()}}),e,this,[[0,27]])})));return function(t,n){return e.apply(this,arguments)}}()));case 2:case"end":return e.stop()}}),e)}))),function(e){return a.apply(this,arguments)})},{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){if(!e.gameData.enableAds||this._whitelabelPartner)throw new Error("Advertisements are disabled.")}},{key:"_rejectAdIfUnsupportedType",value:function(e){var t=e.adRequest;if(t.adType){if(t.adType!==d.AdType.Interstitial&&t.adType!==d.AdType.Rewarded)throw new Error("Unsupported an advertisement type: ",t.adType)}else t.adType=d.AdType.Interstitial}},{key:"_rejectAdIfRewardedDisabled",value:function(e){var t=e.gameData;if(e.adRequest.adType===d.AdType.Rewarded&&!t.rewardedAds)throw new Error("Rewarded ads are disabled.")}},{key:"_rejectAdIfAdRateHits",value:function(e){var t=e.gameData;if(e.adRequest.adType===d.AdType.Interstitial&&void 0!==this.adRequestTimer&&Date.now()-this.adRequestTimer<t.midroll)throw new Error("The advertisement was requested too soon.")}},{key:"preloadAd",value:(r=_.default(E.default.mark((function e(t){var n=this;return E.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(){var e=_.default(E.default.mark((function e(r,a){var i,s;return E.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,n.sdkReady;case 3:return i=e.sent,e.next=6,n.videoAdReady;case 6:if(!i.bloc_gard||!0!==i.bloc_gard.enabled){e.next=8;break}throw new Error("Game or domain is blocked.");case 8:if(i.enableAds&&!n._whitelabelPartner){e.next=10;break}throw new Error("Advertisements are disabled.");case 10:if(t){e.next=14;break}t=d.AdType.Rewarded,e.next=16;break;case 14:if(t===d.AdType.Interstitial||t===d.AdType.Rewarded){e.next=16;break}throw new Error("Unsupported an advertisement type:"+t);case 16:if(t!==d.AdType.Rewarded||i.rewardedAds){e.next=18;break}throw new Error("Rewarded ads are disabled.");case 18:return e.next=20,n.adInstance.preloadAd(t);case 20:s=e.sent,r(s),e.next=27;break;case 24:e.prev=24,e.t0=e.catch(0),a(e.t0);case 27:case"end":return e.stop()}}),e,null,[[0,24]])})));return function(t,n){return e.apply(this,arguments)}}()));case 1:case"end":return e.stop()}}),e)}))),function(e){return r.apply(this,arguments)})},{key:"cancelAd",value:(n=_.default(E.default.mark((function e(){var t=this;return E.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(){var e=_.default(E.default.mark((function e(n,r){return E.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:try{t.adInstance.cancel(),t.onResumeGame("Advertisement(s) are cancelled. Start / resume the game.","success"),r()}catch(e){t.onResumeGame("Advertisement(s) are cancelled. Start / resume the game.","success"),n(e.message)}case 1:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()));case 1:case"end":return e.stop()}}),e)}))),function(){return n.apply(this,arguments)})},{key:"showDisplayAd",value:function(e){var t=this;return new Promise(function(){var n=_.default(E.default.mark((function n(r,a){var i;return E.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,t.sdkReady;case 3:return i=n.sent,n.next=6,t.videoAdReady;case 6:if(!i.dAds.enabled){n.next=13;break}return n.next=9,t.adInstance.loadDisplayAd(e);case 9:t._post_message({topic:"adrequest.display"}),r(),n.next=14;break;case 13:a("Display-Ads are disabled.");case 14:n.next=19;break;case 16:n.prev=16,n.t0=n.catch(0),a(n.t0.message||n.t0);case 19:case"end":return n.stop()}}),n,null,[[0,16]])})));return function(e,t){return n.apply(this,arguments)}}())}},{key:"onResumeGame",value:function(e,t){this._allowExternals({enabled:!1});try{this.options.resumeGame()}catch(e){d.dankLog("DEVELOPER_ERROR",e.message,"warning")}var n="SDK_GAME_START";this.eventBus.broadcast(n,{name:n,message:e,status:t,analytics:{category:"SDK",action:n,label:this.options.gameId+""}})}},{key:"onPauseGame",value:function(e,t){this._allowExternals({enabled:!0});try{this.options.pauseGame()}catch(e){d.dankLog("DEVELOPER_ERROR",e.message,"warning")}var n="SDK_GAME_PAUSE";this.eventBus.broadcast(n,{name:n,message:e,status:t,analytics:{category:"SDK",action:n,label:this.options.gameId+""}})}},{key:"openConsole",value:function(){try{new d.ImplementationTest(this).start(),d.Ls.set("gd_debug_ex",!0)}catch(e){console.log(e)}}},{key:"_initBlockingExternals",value:function(){var e=this._gameData;(e.failed||e.block_exts&&e.block_exts.enabled)&&(this.window_open=window.open,this._allowExternals({enabled:!1}),this._removeExternalsInHtml({enabled:!1}))}},{key:"_checkFullscreen",value:function(){var e=this;try{var t=this._gameData;t.sdk.fullscreen&&"auto"===t.sdk.fullscreen&&document.addEventListener("click",function(){if(v.default(this,e),!this._isFullScreen){var t=document.body,n=t.requestFullScreen||t.webkitRequestFullScreen||t.mozRequestFullScreen||t.msRequestFullscreen;if(n)n.call(t);else if(void 0!==window.ActiveXObject){var r=new ActiveXObject("WScript.Shell");null!==r&&r.SendKeys("{F11}")}this._isFullScreen=!0}}.bind(this))}catch(e){console.log("Fullscreen error handled...",e)}}},{key:"_allowExternals",value:function(e){var t=this;void 0!==this.window_open&&(!1===e.enabled?window.open=function(e){v.default(this,t),this.msgrt.send("external",{message:"C> ".concat(e)}),(e.startsWith("https://play.google.com")||e.startsWith("https://itunes.apple.com"))&&this.window_open.call(null,e)}.bind(this):window.open=this.window_open)}},{key:"_removeExternalsInHtml",value:function(e){var t=this;!1===e.enabled&&window.document.querySelectorAll("a").forEach(function(e){var n=this;v.default(this,t);var r=!!(e.innerText.toLowerCase().includes("start")||e.innerText.toLowerCase().includes("play")||e.innerText.toLowerCase().includes("continue")),a=e.getAttribute("href");e.removeAttribute("href"),r||(e.onclick=function(e){return v.default(this,n),e.preventDefault(),this.msgrt.send("external",{message:"H> ".concat(a)}),!1}.bind(this))}.bind(this))}},{key:"_getBridgeContext",value:function(){var e=this._isTokenGameURL(),t=this._isMasterGameURL(),n=this._isExtHostedGameURL(),r=d.getIframeDepth();console.log("iframeDepth",r);var a=e||n?this._getTokenGameURLConfig():{};a=a||{};var i=decodeURIComponent((e||n)&&a.parentURL?a.parentURL:d.getParentUrl()),s=decodeURIComponent((e||n)&&a.parentDomain?a.parentDomain:d.getParentDomain()),o=decodeURIComponent((e||n)&&a.topDomain?a.topDomain:n&&0===d.getIframeDepth()?s:d.getTopDomain()),u=(e||n)&&a.loaderEnabled,c=(e||n)&&a.loaderEnabled,l=(e||n)&&a.loaderEnabled,h=(e||n)&&a.loaderEnabled,p=(e||n)&&a.loaderEnabled,f=(e||n)&&a.loaderEnabled,m=(e||n)&&a.loaderEnabled,g=(e||n)&&a.loaderEnabled,v=(e||n)&&a.loaderEnabled&&a.hasImpression&&a.version>="1.1.24";return{isTokenGameURL:e,isMasterGameURL:t,isExtHostedGameURL:n,noConsoleBanner:u,noLoadedEvent:c,noBlockerEvent:l,noPreroll:g,parentURL:i,parentDomain:s,topDomain:o&&o.length?o:s,noGAPageView:h,noLotamePageView:p,noGamedockSDK:f,noMinijuegosSDK:m,version:a.version,pauseGameOnStartup:v,depth:d.getIframeDepth(),domainMatched:s===o,exports:{formatTokenURLSearch:this._formatTokenURLSearch.bind(this),extendUrlQuery:this._extendUrlQuery.bind(this),base64Encode:this._base64_encode.bind(this)}}}},{key:"_isMasterGameURL",value:function(){var e=/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Fa-f0-9]{32})(.*)$/i;return e.test(location.href)||!this._isTokenGameURL()&&e.test(document.referrer)}},{key:"_isTokenGameURL",value:function(){var e=/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Za-z0-9]{8})\/(.*)$/i;return e.test(location.href)||e.test(document.referrer)}},{key:"_isExtHostedGameURL",value:function(){var e=/^http[s]?:\/\/.*?gd_sdk_referrer_url=.*$/i;return e.test(location.href)||e.test(document.referrer)}},{key:"_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 S.default(location.href,!0);if(!n.query.gd_zone_config)return;e=n.query.gd_zone_config}else if(t.test(document.referrer)){var r=new S.default(document.referrer,!0);if(!r.query.gd_zone_config)return;e=r.query.gd_zone_config}else{var a=new S.default(location.href,!0);if(!a.query.gd_zone_config)return;e=a.query.gd_zone_config}return JSON.parse(m.Base64.decode(decodeURIComponent(e)))}catch(e){}}},{key:"_getSplashTemplate",value:function(e){var t=e.splash;return new Ef(t).splash()}},{key:"_createPrerollPromoTemplate",value:(t=_.default(E.default.mark((function e(t){var n,r,a,i,s;return E.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=null===(n=t.promo)||void 0===n?void 0:n[null===(r=t.promo)||void 0===r||null===(a=r.template)||void 0===a?void 0:a.preroll],s=new wf(i),e.abrupt("return",s.promo());case 3:case"end":return e.stop()}}),e)}))),function(e){return t.apply(this,arguments)})},{key:"_formatTokenURLSearch",value:function(e){var t="";try{t=encodeURIComponent(m.Base64.encode(JSON.stringify(e)))}catch(e){}try{var n=new S.default(location.href,!0);return n.query=n.query||{},n.query.gd_zone_config=t,"?".concat(D.default.stringify(n.query))}catch(e){return"?gd_zone_config=".concat(t)}}},{key:"_extendUrlQuery",value:function(e,t){var n=new S.default(e,!0);return n.query=Cf(Cf({},n.query),t),n.toString()}},{key:"_base64_encode",value:function(e){return m.Base64.encode(JSON.stringify(e))}},{key:"_parseAndSelectRandomOne",value:function(e){var t=this._selectRandomOne("object"===y.default(e)?e:d.parseJSON(e));return t&&t.version?ah.version>=t.version?t:void 0:t}},{key:"_selectRandomOne",value:function(e){var t=this;if(!jh(e)||0===e.length)return e;if(1===e.length)return e[0];var n=0;e.forEach(function(e){v.default(this,t),e.weight=e.weight||1,n+=e.weight}.bind(this));var r=Math.floor(Math.random()*Math.floor(n));n=0;for(var a=0;a<e.length;a++){var i=e[a];if(r<(n+=i.weight))return i}}},{key:"session",value:function(){var e=this;return new Promise(function(){var t=_.default(E.default.mark((function t(n,r){var a;return E.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e.sdkReady;case 3:t.next=7;break;case 5:t.prev=5,t.t0=t.catch(0);case 7:a=e._gameData,n({ads:{display:{enabled:a.dAds.enabled},rewarded:{enabled:a.rewardedAds}},location:{parentDomain:e._bridge.parentDomain,topDomain:e._bridge.topDomain,parentURL:e._bridge.parentURL,depth:e._bridge.depth,loadedByGameZone:e._bridge.isTokenGameURL}});case 9:case"end":return t.stop()}}),t,null,[[0,5]])})));return function(e,n){return t.apply(this,arguments)}}())}},{key:"_getisMobile",value:function(){var e,t=!1;return e=navigator.userAgent||navigator.vendor||window.opera,(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(e.substr(0,4)))&&(t=!0),!1===t&&window.orientation>-1&&(t=!0),t}},{key:"_get_game_thumbnail_url",value:function(){var e=this,t=this._gameData,n=t.assets.find(function(t){return v.default(this,e),t.hasOwnProperty("name")&&512===t.width&&512===t.height}.bind(this));return n||(n=t.assets.length>0?t.assets[0]:{name:"logo.svg"}),"https://img.gamedistribution.com/".concat(n.name)}},{key:"_post_message",value:function(e){var t,n=e.topic,r=e.data,a=null!==(t=location.ancestorOrigins)&&void 0!==t&&t.length?location.ancestorOrigins[location.ancestorOrigins.length-1]:"*";try{var i=window.top||window.parent;i&&i.postMessage({source:"gdsdk",topic:n,data:r},a)}catch(e){console.error((null==e?void 0:e.message)||e)}}}]),e}(),Uf=new function e(){var t=this;A.default(this,e),b.default(this,"load",_.default(E.default.mark((function e(){return E.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Af("Leaderboard");case 2:t.leaderboard=e.sent;case 3:case"end":return e.stop()}}),e)})))),b.default(this,"showLeaderboard",function(){var e=_.default(E.default.mark((function e(n){var r;return E.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=window.GD_OPTIONS.gameId,t.leaderboard){e.next=4;break}return e.next=4,t.load();case 4:t.leaderboard.showLeaderBoard(r,n);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),b.default(this,"addScore",function(){var e=_.default(E.default.mark((function e(n){return E.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.leaderboard){e.next=3;break}return e.next=3,t.load();case 3:t.leaderboard.addScore(n);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),this.moduleName="Leaderboard",this.moduleConfig={source:"https://pm.gamedistribution.com/@bygd/gd-sdk-leaderboard/0.1.43/dist/default/iife/index.js",dependencies:["react","react-dom","redux","react-redux","material-ui-core"]},bf(this.moduleName,this.moduleConfig)},jf=new Lf(function(){var e={};try{"object"===("undefined"==typeof GD_OPTIONS?"undefined":y.default(GD_OPTIONS))&&GD_OPTIONS?e=GD_OPTIONS:window.gdApi&&"object"===y.default(window.gdApi.q[0][0])&&window.gdApi.q[0][0]&&((e=window.gdApi.q[0][0]).hasOwnProperty("advertisementSettings")||(e.advertisementSettings={autoplay:!0}))}catch(e){console.log("_get_developer_sets failed",e)}return e}());function Mf(){var e=this;this.AdType=d.AdType,this.preloadAd=function(e){return jf.preloadAd(e)},this.showAd=function(e,t){return e===d.AdType.Display?jf.showDisplayAd(t):jf.showAd(e)},this.cancelAd=function(){return jf.cancelAd()},this.openConsole=function(){jf.openConsole()},this.getSession=function(){return jf.session()},this.leaderboard={show:function(){v.default(this,e),Uf.showLeaderboard()}.bind(this),addScore:function(t){v.default(this,e),Uf.addScore(t)}.bind(this)}}Mf.prototype=new function(){this.showBanner=function(){jf.showBanner()},this.play=function(){},this.customLog=function(){}},window.gdsdk=new Mf,window.gdApi=window.gdsdk;